pax_global_header00006660000000000000000000000064145556775730014542gustar00rootroot0000000000000052 comment=72d92e75a430900c00aeb1a471965d53eb307708 libqmi-1.35.2-dev/000077500000000000000000000000001455567757300136635ustar00rootroot00000000000000libqmi-1.35.2-dev/.gitignore000066400000000000000000000000241455567757300156470ustar00rootroot00000000000000*~ *.bz2 *.pyc tags libqmi-1.35.2-dev/.gitlab-ci.yml000066400000000000000000000157631455567757300163330ustar00rootroot00000000000000include: - project: freedesktop/ci-templates ref: 290b79e0e78eab67a83766f4e9691be554fc4afd file: - templates/ubuntu.yml stages: - container prep - build .common_variables: variables: FDO_UPSTREAM_REPO: mobile-broadband/libqmi FDO_DISTRIBUTION_VERSION: '20.04' FDO_DISTRIBUTION_TAG: '2021-11-05.1' FDO_DISTRIBUTION_PACKAGES: ca-certificates git gcc autoconf automake libtool libgirepository1.0-dev libglib2.0-dev autopoint gtk-doc-tools python-is-python3 libglib2.0-doc libgudev-1.0-dev gobject-introspection valac bash-completion meson ninja-build help2man build container: extends: - .fdo.container-build@ubuntu - .common_variables stage: container prep only: - main - merge_requests - tags - schedules build-no-qrtr-no-mbim-no-rmnet-no-introspection: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dintrospection=false -Dmbim_qmux=false -Dqrtr=false -Drmnet=false - ninja -C build - ninja -C build install build-no-rmnet: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git - pushd libmbim - meson setup build --prefix=/usr -Dgtk_doc=false - ninja -C build - ninja -C build install - popd - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git - pushd libqrtr-glib - meson setup build --prefix=/usr -Dgtk_doc=false - ninja -C build - ninja -C build install - popd - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Drmnet=false - ninja -C build - ninja -C build install build-no-qrtr: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git - pushd libmbim - meson setup build --prefix=/usr -Dgtk_doc=false - ninja -C build - ninja -C build install - popd - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dqrtr=false - ninja -C build - ninja -C build install build-no-qrtr-no-introspection: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git - pushd libmbim - meson setup build --prefix=/usr -Dgtk_doc=false -Dintrospection=false - ninja -C build - ninja -C build install - popd - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dintrospection=false -Dqrtr=false - ninja -C build - ninja -C build install build-no-mbim: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git - pushd libqrtr-glib - meson setup build --prefix=/usr -Dgtk_doc=false - ninja -C build - ninja -C build install - popd - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dmbim_qmux=false - ninja -C build - ninja -C build install build-no-mbim-no-introspection: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git - pushd libqrtr-glib - meson setup build --prefix=/usr -Dgtk_doc=false -Dintrospection=false - ninja -C build - ninja -C build install - popd - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dintrospection=false -Dmbim_qmux=false - ninja -C build - ninja -C build install build-no-deprecated: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - CFLAGS="-DQMI_DISABLE_DEPRECATED" meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dintrospection=false -Dmbim_qmux=false -Dqrtr=false - ninja -C build - ninja -C build install build-collection-minimal: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dintrospection=false -Dmbim_qmux=false -Dqrtr=false -Drmnet=false -Dcollection=minimal -Dfirmware_update=false -Dudev=false - ninja -C build - ninja -C build install build-collection-basic: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - meson setup build --prefix=/usr -Dwerror=true -Dgtk_doc=false -Dintrospection=false -Dmbim_qmux=false -Dqrtr=false -Drmnet=false -Dcollection=basic - ninja -C build - ninja -C build install build-debug: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git - pushd libmbim - meson setup build --prefix=/usr -Dgtk_doc=true - ninja -C build - ninja -C build install - popd - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git - pushd libqrtr-glib - meson setup build --prefix=/usr -Dgtk_doc=true - ninja -C build - ninja -C build install - popd - meson setup build --buildtype=debug --prefix=/usr -Dwerror=true -Dgtk_doc=true - ninja -C build - ninja -C build install - ninja -C build dist - ninja -C build uninstall build-release: stage: build extends: - .fdo.distribution-image@ubuntu - .common_variables only: - main - merge_requests - tags - schedules script: - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libmbim.git - pushd libmbim - meson setup build --prefix=/usr -Dgtk_doc=true - ninja -C build - ninja -C build install - popd - git clone --depth 1 https://gitlab.freedesktop.org/mobile-broadband/libqrtr-glib.git - pushd libqrtr-glib - meson setup build --prefix=/usr -Dgtk_doc=true - ninja -C build - ninja -C build install - popd - meson setup build --buildtype=release --prefix=/usr -Dwerror=true -Dgtk_doc=true - ninja -C build - ninja -C build install - ninja -C build dist - ninja -C build uninstall libqmi-1.35.2-dev/AUTHORS000066400000000000000000000024021455567757300147310ustar00rootroot00000000000000Current maintainers: Aleksander Morgado Dan Williams Other contributors: Eric Caruso Iñigo Martínez Ben Chan Dylan Van Assche Bjørn Mork Andreas Kling Teijo Kinnunen Daniele Palmas Akash Aggarwal Andrew Lassalle Elly Jones Reinhard Speyerer Prakash Pabba Stephan Gerhold Shawn J. Goff Thomas Weißschuh Wolfgang Tolkien Albert Diserholt Carlo Lobrano Joel Selvaraj Mathew McBride A. Wilcox Aliaksandr Barouski Christophe Ronco Lubomir Rintel Luca Weiss Madhav Thomas Haller vpodshiv Madhavadas Pottekkat Michal Mazur Roshan Pius Adrian Bunk Andrew André Valentin Arman Uguray Christof Meerwald Clayton Craft Fabrice Fontaine Freedom Liu Lukas Arnold Marius B. Kotsbak Mikhail Efremov Nikita Orlov Valentin Blot Vincent Palatin Walter Hagstrom Yegor Yefremov carl.yin Alexander Couzens Ana Cabral Brian Lee Carl Yin Colin Walters Džiugas Baltrūnas Evan Nemerson Kasper Holtze Marius Kotsbak Mike Frysinger Nicholas Smith Oliver Kästner Pavan Holla Sean Tranchetti Stuart Cardall Ulrich Ölmann Volker Sobek Wang Jing Yanko Kaneti carlyin goapunk nick black ttuttle wicadmin libqmi-1.35.2-dev/COPYING000066400000000000000000000432541455567757300147260ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. libqmi-1.35.2-dev/COPYING.LIB000066400000000000000000000636421455567757300153360ustar00rootroot00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libqmi-1.35.2-dev/ChangeLog000066400000000000000000000000621455567757300154330ustar00rootroot00000000000000Changes are available via git repository history. libqmi-1.35.2-dev/NEWS000066400000000000000000001531611455567757300143710ustar00rootroot00000000000000 Overview of changes in libqmi 1.34.0 ---------------------------------------- * Build: ** Flag types are now generated in their own 'qmi-flag-types.[c|h]' files. ** A new 'enable_fuzzer' option is available to build LLVM LibFuzzer based unit testers. * New services: ** New 'ATR' service to support AT commands over QMI, defined by Telit, including "Send" request and "Received" indication. ** New 'IMS' service, including "Get IMS Services Enabled Setting" request/response. ** New 'IMSA' (IMS Application) service, including "Get IMS Registration Status" and "Get IMS Services Status" request/responses. ** New 'IMSP' (IMS Presence) service, including "Get Enabler State" request/response. ** New 'SSC' service (Qualcomm Snapdragon Sensor Core), including the "Control" request/response, and "Report Small"/"Report Large" indications. * New TLVs supported in existing messages: ** nas: added the "WCDMA RSCP" TLV in "Get Signal Info" response and "Signal Info" indication. ** wds: added the "Report Profile Changes" TLV in "Indication Register". * libqmi-glib: ** Support for 16-bit service ids added, used in the QRTR backend. ** Response and indication parser messages are now published in the API. ** The library now allows connecting to a unix domain socket named 'qmux_socket' instead of a device file. ** Extended the 'QmiWdsProfileType' enum type with EPC and ALL values. ** Extended the 'QmiUimCardApplicationPersonalizationFeature' enum type with additional GW-related values. ** New 'QmiUimCardApplicationPersonalizationFeatureStatus' enum type. ** New 'QmiImspEnablerState' enum type, used in the IMPS service. ** New 'QmiImsaImsRegistrationStatus', 'QmiImsaServiceStatus' and 'QmiImsaRegistrationTechnology' enum types, used in the IMSA service. ** Updated the QRTR endpoint to ensure error responses are returned early when the builtin CTL operations fail. ** Deprecated QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN, and provided compat symbols. ** Updated the enum type of the "Personalization Feature" field in the Element struct type used in the Applications array in the "UIM Card Status" response and indication messages, and provided appropriate compat symbols. ** Flagged PIN/PUK value fields as personal info. ** Fixed missing 'since' tags in struct and common types. * qmicli: ** New '--uim-remote-unlock' command. ** New '--imsp-get-enabler-state' command. ** New '--imsa-get-ims-registration-status' and '--imsa-get-ims-services-status' commands. ** New '--ims-get-ims-services-enabled-setting' command. ** New '--atr-send', '--atr-send-only' and '--atr-monitor' commands. * collections: ** basic: added NAS cell location retrieval commands. ** basic: added WDS profile event change commands. * Several other minor improvements and fixes. * All fixes and improvements that were backported to 1.32.x releases are also present in libqmi 1.34.0. Overview of changes in libqmi 1.32.0 ---------------------------------------- * There is no longer an upstream-provided source tarball, please use the signed git tag '1.32.0' instead to refer to the sources of this release. * The verbose message logging will now by default hide all fields that are considered personal information. Extended message logging including all field contents should be explicitly requested. * Build: ** The GNU autotools (autoconf/automake/libtool) support has been fully removed, this release requires the use of the meson build system. ** The 'instrospection' meson option is now a boolean. ** New boolean 'man' meson option to allow disabling the man page generation. * New services: ** New 'FOX' service for operations defined by Foxconn, including "Get Firmware Version" for now. * New request/response/indications: ** pdc: implement "Refresh" indication. ** gas: implement "DMS Get USB composition" request/response. ** gas: implement "DMS Set USB composition" request/response. ** wds: implement "Indication Register" request/response. ** wds: implement "Extended Ip Config" indication. ** dsd: implement "Get System Status" request/response. ** dsd: implement "System Status Change" request/response. ** dsd: implement "System Status" indication. ** voice: implement "Burst DTMF" request/response. ** voice: implement "Start Continuous DTMF" request/response. ** voice: implement "Stop Continuous DTMF" request/response. ** uim: implement "Remote Unlock" request/response. ** nas: implement "Config Signal Info v2" request/response. * New TLVs supported in existing messages: ** pdc: added "Enable Refresh" TLV in "Register" request. ** nas: added "5G Signal Strength" TLV in "Signal Info" indication. ** dms: added "NR5G Band Capability" TLV in "Get Band Capabilities" response. ** nas: added "NR5G SA/NSA band preference" TLVs in "Get/Set System Selection Preference" request/response. ** wds: added "Operator Reserved PCO" TLV in "Get Current Settings". ** wda: added "Uplink Data Aggregation Max Datagrams" TLV in "Set Data Format" request. ** wda: added "Uplink Data Aggregation Max Size" TLV in "Set Data Format" request. * libqmi-glib: ** New 'QmiFoxFirmwareVersionType' enum type. ** New 'QmiPdcRefreshEventType' enum type. ** New 'QmiGasUsbCompositionEndpointType' enum type. ** New 'QmiDsdDataSystemNetworkType' enum type. ** New 'QmiDsdRadioAccessTechnology' enum type. ** New 'QmiDsdSoMask' enum type. ** New 'QMI_DMS_RADIO_INTERFACE_TDS' value in the 'QmiDmsRadioInterface' enum type. ** New 'QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_OPERATOR_RESERVED_PCO' value in 'QmiWdsGetCurrentSettingsRequestedSettings'. ** New 'QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV5' and 'QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV5' values in the 'QmiDeviceAddLinkFlags' enum type, enabling support to request QMAPv5 checksum offload for both TX and RX paths. ** Extended the 'QmiNasActiveBand' enum type with 5GNR bands. ** Implemented support to monitor the consecutive QMI request timeouts in the QmiDevice object, with a 'QMI_DEVICE_CONSECUTIVE_TIMEOUTS' signal and a 'qmi_device_get_consecutive_timeouts()' method. ** Fixed the "GERAN Info" TLV in "NAS Get Cell Location Info" compat layer. ** Fixed leak on unexpected message error processing in QmiDevice. ** Renamed the 'QmiWdsGetCurrentSettingsRequestedSettings' flags type to 'QmiWdsRequestedSettings'. ** Updated the code generator to avoid needing intermediate struct types in several operations, and provided appropriate compat methods: *** pdc: removed the 'QmiConfigTypeAndId' intermediate struct. *** loc: removed the 'QmiIndicationLoc...GpsTime intermediate' structs. *** loc: removed the 'QmiIndicationLoc...DilutionOfPrecision' intermediate structs. *** dms: removed the 'QmiMessageDmsGetStoredImageInfoInputImage' intermediate struct. *** dms: removed the 'QmiMessageDmsDeleteStoredImageInputImage' intermediate struct. ** Updated the code generator to avoid needing arrays of arrays in several operations, and provided appropriate compat methods: *** uim: avoid array of arrays in "Slot EID Information". *** uim: avoid array of arrays in "Personalization Status Other". ** Updated the code generator to generate GIR compat helpers for arrays of structs, so that language bindings can properly use the methods using that kind of types. This change makes the library include a lot of new methods suffixed with _gir() which are only expected to be used via introspection. ** Implemented a lot of cleanups and improvements in the code generator. * qmicli: ** New '--verbose-full' option to request enabling logs that include personal information. ** New '--pdc-monitor-refresh' command. ** New '--gas-dms-set-usb-composition' and '--gas-dms-get-usb-composition' commands. ** New '--wms-set-routes' command. ** New '--dsd-get-system-status' command. ** Updated the '--wda-set-data-format' command with new optional fields to configure the uplink data aggregation max size and max datagrams. * qmi-firmware-update: ** Implemented support for normal upgrade operations even when udev is not available in the system (e.g. openwrt). * collections: ** basic: added UIM remote unlock operation. ** basic: added NAS signal info v2 operation. ** basic: added SAR management operations. ** basic: added LTE attach PDN list operation. ** basic: added PCO support related operations. ** basic: added Foxconn firmware version management operation. ** basic: added DSD system status and attach/detach related operations. ** basic: added voice DTMF support operations. * Several other minor improvements and fixes. The following features which were backported to 1.30.x releases are also present in libqmi 1.32.0: ** libqmi-glib: use unaligned netlink attribute length. ** qmi-proxy: remove assert when attempting to close ghost device. ** qmi-firmware-update: use defaults if FLASH variables not reported, enabling support to flash the Sierra Wireless EM91xx modules in USB mode. ** voice: implement "Get All Call Info" request/response. ** dms: implement "Foxconn Set FCC Authentication v2" request/response. ** qmicli: new '--dms-foxconn-set-fcc-authentication-v2' command. Overview of changes in libqmi 1.30.0 ---------------------------------------- * Build now requires GLib/GObject/GIO 2.56 and libgudev 232. * Building from git no longer requires autoconf-archive, the needed AX_ macros are now shipped inside m4/. * In addition to building from a source release tarball, or building from git checkouts using the GNU autotools suite (autoconf/automake/libtool), this release includes the initial support for the meson build system. The meson port is not fully complete yet, as there are some missing things in the doc generation steps, but for system integration or development purposes, the port should be fully operational. This major release, including all its stable updates in the 1.30.x series, will be the last ones providing support for GNU autotools. The next major release will likely be a meson-only one, and will therefore not be based on a source release tarball any more, but on specific git tags instead. * Updated the build to allow better control of the built-in RMNET support: ** A new '--disable-rmnet' configure flag is available to request fully disabling the RMNET support. When RMNET support is disabled, the link management operations are done with the add_mux/del_mux qmi_wwan API exclusively. ** The library sources now ship the RMNET specific types from the kernel API in a custom internal header, so that we don't require the latest kernel headers during configure time and build time. ** A new 'QMI_RMNET_SUPPORTED' symbol is given to flag the existence of the RMNET support in the libqmi-glib headers. * New services: ** New 'DPM' (Data Port Mapper) service, which allows setting up the binding between TX/RX endpoint ids in the hardware and the control port interface, required for IPA based Qualcomm SoCs. * New request/response/indications: ** nas: implement "Get Preferred Networks" request/response. ** nas: implement "Set Preferred Networks" request/response. ** nas: implement "Network Reject" indications ** uim: implement "Get Configuration" request/response. ** uim: implement "Depersonalization" request/response. ** voice: implement "Manage Calls" request/response. ** voice: implement "Supplementary Service" indication. ** voice: implement "Set Supplementary Service" request/response. ** voice: implement "Get Call Waiting" request/response. * New TLVs supported in existing messages: ** nas: added the "Network Reject Information" TLV in "Register Indications". ** nas: renamed several TLVs in the "System Info" response and indication messages, in order to provide a QmiNasRejectCause value instead of a plain guint8. The old names were flagged as deprecated and added to the compat layer in order to avoid breaking API. *** Renamed the "GSM System Info" TLV to "GSM System Info v2". *** Renamed the "WCDMA System Info" TLV to "WCDMA System Info v2". *** Renamed the "LTE System Info" TLV to "LTE System Info v2". *** Renamed the "TD SCMA System Info" TLV to "TD SCMA System Info v2". ** nas: added the "NR5G ARFCN" and "NR5G Cell Information" TLVs in "Get Cell Location Info". ** wds: added the "APN Type" TLV in "Get Profile Settings". ** wds: added the "APN Type" TLV in "Create Profile". ** wds: added the "APN Type" TLV in "Modify Profile". ** nas: renamed the "Common Info" TLV in "Swi Get Status" to "Common Info v2" in order to read the temperature field as a signed integer. The old name was flagged as deprecated and added to the compat layer in order to avoid breaking API. ** nas: renamed the "MNC PDS Digit Include Status" TLV in "Get System Selection Preference" to "MNC PCS Digit Include Status". The old name was flagged as deprecated and added to the compat layer in order to avoid breaking API. ** wda: added the "Uplink Data Aggregation Max Datagrams", "Uplink Data Aggregation Max Size", "Download Minimum Padding" and "Flow Control" TLVs in "Get Data Format" and "Set Data Format" responses. ** nas: added the "NR5G Service Status Info", "NR5G System Info", "EUTRA with NR5G availability", DCNR restriction Info" and "NR5G Tracking Area Code" TLVs in "Get System Info". * libqmi-glib: ** Added support for 'hsic', 'bam-dmux' and 'unknown' endpoint types. ** Added support for QMAPv2, QMAPv3 and QMAPv4 data aggregation types. ** Added support for 'NGRAN' access technology identifier. ** New 'qmi_device_add_link_with_flags()' method, in order to give e.g. rmnet specific checksum offload related flags when creating a new link. * qmicli: ** New '--nas-get-preferred-networks' command. ** New '--nas-set-preferred-networks' command. ** New '--uim-get-configuration' command. ** New '--uim-depersonalization' command. ** New '--wms-get-routes' command. ** New '--dpm-open-port' command. ** New '--dpm-close-port' command. ** Updated '--wds-create-profile' with an additional 'apn-type-mask' setting. ** Updated '--wds-modify-profile' with an additional 'apn-type-mask' setting. ** Updated '--link-add' with an additional optional 'flags' setting. * qmi-network: ** New PROFILE configuration setting to allow specifying which WDS profile to use when connecting. ** New IP-TYPE configuration setting to allow selecting the IP type requested (e.g. IPv4 or IPv6). * collections: ** basic: added voice call management operations. ** basic: added voice supplementary service related operations. ** basic: added NAS preferred networks related operations. ** basic: added NAS network reject indications. ** basic: added UIM depersonalization related operations. * Several other minor improvements and fixes. The following features which were backported to 1.28.x releases are also present in libqmi 1.30.0: ** gir: bindings updated to make all output TLV fields optional. ** gir: bindings fixed with correct string/struct return annotations. ** build: updated to disable gtkdocize during autoreconf. ** build: updated to avoid gtkdoc-rebase on local install step. ** libqmi-glib: added initial "wwan" subsystem support. ** dms: implement "Foxconn Set FCC Authentication" command. Overview of changes in libqmi 1.28.0 ---------------------------------------- * Build now optionally depends on the libqrtr-glib v1.0.0 library, which is no longer maintained inside the libqmi sources. All the QRTR related methods implemented in the QmiDevice object in the libqmi-glib library are considered API/ABI stable. * The pkg-config file now exposes build features as variables, which allows other projects to detect them at configure time. E.g. to check whether the libqmi-glib library was built with QRTR support: qmi_qrtr_supported=$($PKG_CONFIG --variable=qmi_qrtr_supported qmi-glib) if test "x$qmi_qrtr_supported" = "x1"; then .... fi * The QmiDevice interfaces to work with the expected data format and the wwan interface name should now be considered to be specific to QMI devices exposed by the upstream 'qmi_wwan' kernel driver. If the device is exposed with a different driver (e.g. PCIe or QRTR) these methods will always fail. * The QmiDevice now supports configuring the 'pass_through' sysfs setting in the network interfaces exposed by the 'qmi_wwan' kernel driver, with a new 'qmap-pass-through' expected data format type. In this mode, the network device will be managed by the rmnet kernel driver. A new method is also provided to check in runtime whether a given expected data format value is supported by the kernel or not. * The QmiDevice now includes methods to list, create and delete links on the network interface, that can be used to setup QMAP based multiplexing of different data streams, e.g. connected to different APNs. When using the 'qmi_wwan' kernel driver, the link management logic depends on the configured expected data format: ** rmnet netlink operations will be used if 'qmap-pass-through' expected data format is configured. ** add_mux/del_mux operations will be used if 'raw-ip' expected data format is configured. When not using 'qmi_wwan', rmnet netlink operations are assumed. * New services: ** New 'SAR' (Specific Absorption Rate) service, with support for the "Set RF State" and "Get RF State" request/responses. * New request/response/indications: ** uim: implement "Refresh Register" request/response. ** uim: implement "Refresh Register All" request/response. ** uim: implement "Refresh Complete" request/response. ** uim: implement "Refresh" indication. ** loc: implement "Get Engine Lock" request/response. ** loc: implement "Set Engine Lock" request/response. ** nas: implement "Get DRX" request/response. ** nas: implement "Get PLMN Name" request/response. ** wms: implement "Send Ack" request/response. ** wds: implement "Bind Data Port" request/response. ** wds: implement "Get Max LTE Attach PDN Number" request/response. ** wds: implement "Get LTE Attach PDN List" request/response. ** wds: implement "Set LTE Attach PDN List" request/response. ** wds: implement "Set LTE Attach PDN List" indication. ** wds: implement "Get LTE Attach Parameters" request/response. ** wds: renamed "Get Default Profile Num" to "Get Default Profile Number", and provided compat symbols to avoid breaking API. ** wds: renamed "Set Default Profile Num" to "Set Default Profile Number", and provided compat symbols to avoid breaking API. * New TLVs supported in existing messages: ** nas: added the "Rx Chain 2/3 Info" TLVs in "Get Tx Rx Info". ** nas: added the "LTE Info Timing Advance" TLV in "Get Cell Location Info". ** nas: added the "LTE Voice Domain", "CDMA Registration Zone ID", "GSM Routing Area Code", "WCDMA Routing Area Code" and "CDMA Resolved MCC" TLVs in "Get System Info". * libqmi-glib: ** Added support for 'embedded' and 'pcie' endpoint types. ** Added support for QMAPv5 data aggregation type. * qmicli: ** When built with QRTR support, the '--device' option now allows QRTR URIs (e.g. 'qrtr://0'). ** New '--link-list', '--link-add', '--link-delete' and '--link-delete-all' commands. ** New '--uim-monitor-refresh-file' command. ** New '--uim-monitor-refresh-all' command. ** New '--wds-bind-data-port' command. ** New '-loc-get-operation-mode' and '--loc-set-operation-mode' commands. ** New '-loc-get-engine-lock' and '--loc-set-engine-lock' commands. ** New '--wds-get-lte-attach-parameters' command. ** New '--wds-get-max-lte-attach-pdn-num' command. ** New '--wds-get-lte-attach-pdn-list' and '--wds-set-lte-attach-pdn-list' commands. ** Updated the '--wds-start-network' command with a timeout of 180s. ** Updated the '--wds-stop-network' command with a timeout of 120s. ** Updated the '--dms-set-firmware-preference' command to use a key-value pair based input instead of predefined fields. * collections: ** basic: added UIM event registration commands. ** basic: added UIM slot management commands. ** basic: added UIM refresh related commands. ** basic: added WDS bind data port commands. ** basic: added WDS initial LTE bearer management commands. ** basic: added NAS PLMN name commands. The following features which were backported to 1.26.x releases are also present in libqmi 1.28.0: * build: ** Avoid including qmi-version.h in dist, as its contents depend on the given configure options. * libqmi-glib: ** 5G support in the NAS signal info operations. ** BCD encoded strings should be read as arrays instead of NUL-terminated strings. * qmicli: ** nas: report EcIo, RSRP and phase also in 5GNR. Overview of changes in libqmi 1.26.0 ---------------------------------------- * Build now requires GLib/GObject/GIO 2.48. * Build updated with several improvements: ** The build has been updated to use by default all warnings enabled by AX_COMPILER_FLAGS(), and therefore when building the release from a git checkout, autoconf-archive >= 2017.03.21 is now required. This new build dependency isn't required when building from the release tarball. ** Also when building from a git checkout, beware because by default --enable-compile-warnings=error is enabled, which implies -Werror. If you'd like to build from git and avoid -Werror, you should explicitly use --enable-compile-warnings=yes (to keep the warnings but without being errors), --enable-compile-warnings=no (to disable all the extra warnings enabled by default) or --disable-Werror (to unconditionally make all compiler warnings non-fatal). * Added new message collections support, so that users can select which messages to include in the built library during configure with the --enable-collection option. Three predefined sets are given: ** minimal: the bare minimum messages required to control connectivity. ** basic: all messages and indications that ModemManager requires. ** full: all supported messages and indications. Users can install custom collections under data/ and reference them in the same way as the predefined sets. E.g. installing a new data/qmi-collection-custom.json set can be enabled during configure with --enable-collection=custom. * Added new GObject Introspection support in the library, that can be explicitly requested during configure with --enable-introspection=yes. With the new introspection support, the libqmi-glib library can now be used directly from e.g. python programs, as in the example included with the release. * Implemented new QRTR backend support, disabled by default. This new backend allows to perform QMI operations on systems with the Qualcomm IPC router protocol available (since Linux 4.7). Users can build the QRTR backend support with --enable-qrtr, and will require the corresponding kernel headers. When this backend is enabled, a new libqrtr-glib library is built and installed along with libqmi-glib. The API of this libqrtr-glib library, and the QRTR-specific APIs in libqmi-glib (e.g. qmi_device_new_from_node()) must not be considered stable yet, they may change in future versions of the project, even in 1.26.x updates. The libqmi-glib headers include a new QMI_QRTR_SUPPORTED symbol that specifies whether the QRTR backed has been enabled (if set to 1) or not (if set to 0). * Added 5GNR radio access technology support, with new enum values in both the DMS and NAS services. * New services: ** New 'GMS' (Telit General Modem Service) service, for now just implementing basic test get/set value commands. ** New 'DSD' (Data System Determination) service, implementing methods to get and set default bearer APN settings. * New request/response/indications: ** dms: implement "Get MAC Address" request/response. ** dms: renamed "Dell Get Firmware Version" to "Foxconn Get Firmware Version" as the command applies not only to the Dell-branded variant, but also to the generic Foxconn-branded models. The old APIs are kept available but flagged as deprecated. ** loc: implement "Set NMEA Types" request/response. ** loc: implement "Get NMEA Types" request/response. ** uim: implement "Switch Slot" request/response. ** uim: implement "Get Slot Status" request/response. ** uim: implement "Slot Status" indication. ** voice: implement "Indication Register" request/response. ** voice: implement "Originate USSD" request/response. ** voice: implement "Answer USSD" request/response. ** voice: implement "Cancel USSD" request/response. ** voice: implement "Release USSD" request/response. ** voice: implement "USSD" indication. ** voice: implement "Originate USSD No Wait" request/response. ** voice: implement "Originate USSD No Wait" indication. * New TLVs supported in existing messages: ** nas: added 'Extended List' and 'Bandwidth List' in "Get RF Band Information". ** wda: added 'Endpoint Info' in "Get Data Format". * libqmi-glib: ** Added g_autoptr() support to all public types. ** The qmi_message_get_version_introduced_full() method is now deprecated and should no longer be used in newly written code. This method will always return FALSE as the details of which protocol version introduced the message are no longer available. * qmi-proxy: ** Updated to keep track of QMI clients that have not been explicitly released, so that qmicli --client-cid=[CID] and --client-no-release-cid operations can handle indications properly. The following features which were backported to 1.24.x releases are also present in libqmi 1.26.0: * libqmi-glib: ** The logic behind QMI_DEVICE_OPEN_FLAGS_VERSION_INFO has been updated, and from now on it will only make sure the version info of the device is loaded when it's opened. The library will no longer prevent a given message from being sent to the module based on the version information kept in the message database. ** Updated string reading logic to make sure that all strings are valid UTF-8, and also automatically attempt parsing as GSM7 or UCS2 if the initial UTF-8 validation fails. *+ Renamed TLV 0x15 in the "WDA Get Data Format" message, and added new compat methods for the old name. ** Fixed the format of the NITZ information TLV, and added new compat methods for the old name. ** Fixed the format of the Home Network 3GPP2 TLV, and added new compat methods for the old name. ** Added new WDS verbose call end reasons in the IPv6, PPP, 3GPP, CM and Internal groups. ** Updated to detect QMI control ports exposed as 'smdpkt' or 'rpmsg' virtual devices. Overview of changes in libqmi 1.24.0 ---------------------------------------- * New services: ** New 'GAS' (Telit General Application Service) service, which allows switching between stored firmware images in Telit devices. * New request/responses/indications: ** uim: implement 'Change Provisioning Session' request/response. ** nas: implement Sierra-specific 'Swi Get Status' request/response. * New TLVs supported in existing messages: * nas: added 'Usage Preference' in "Get/Set System Selection Preference". * nas: added 'Network Name Source' in "Get Serving System" and "Get Home Network". * nas: added 'LTE Cell Access Status' in "Get System Info". * nas: added 'IMS Voice Support' in "Get System Info". * nas: added 'LTE eMBMS Coverage Info Trace ID' in "Get System Info". * nas: added 'Network Selection Registration Restriction' in "Get System Info". * nas: added 'LTE Registration Domain' in "Get System Info". * nas: added 'Disabled Modes' in "Get System Selection Preference". * nas: added 'Network Selection Registration Restriction" in "Get/Set System Selection Preference". * nas: added 'Voice Domain Preference' in "Get/Set System Selection Preference". * nas: added 'Network Scan Result' in "Network Scan". * dms: added 'Imei Software Version" in "Get IDs". * libqmi: ** New qmi_device_command_abortable() async method is used with requests that are abortable (both "WDS Start Network" and "NAS Network Scan" so far), so that the method waits for either the request succeed or for the abort operation to finish. This new method solves races when a successful response to the message is received after the abort has been requested (e.g. if receiving a successful response to WDS Start Network after the abort request has been sent, the async operation succeeds and the abort will be ignored). The user must understand that aborting a command initiated with qmi_device_command_abortable() doesn't mean it will fail as aborted, the command may actually succeed. Although this is a new command in the interface, both qmi_client_wds_start_network() and qmi_client_nas_network_scan() will use it internally and transparently for the user. ** New qmi_message_new_from_data() and qmi_message_get_data() methods to work with QMI messages that don't have QMUX headers. ** New support for symlinks in /dev/cdc-wdm ports. ** QMI over MBIM transaction timeout logic was simplified in order to rely on the QMI transaction timeout instead of the MBIM one. ** Reworked internals to have different 'QMI endpoint' implementations, in order to easily integrate new transports like QRTR. ** Added definition of LTE bands 164 through 168 in NAS service. ** Added retry support when opening the QmiDevice with the SYNC flag only (without the VERSION_CHECK). * qmi-proxy: ** New '--empty-timeout=[SECS}' option. * qmicli: ** New '--uim-change-provisioning-session' command. ** New '--gas-dms-get-firmware-list' command. ** New '--gas-dms-get-active-firmware' command. ** New '--gas-dms-set-active-firmware' command. ** New '--gas-noop' command. ** New '--nas-swi-get-status' command. ** Added support to request auto/manual network attachment when using '--nas-set-system-selection-preference'. * qmi-firmware-update: ** Added support for upgrading the Sierra Wireless EM7565 module with the new Sahara/Firehose protocol. * Several other minor improvements and fixes. The following features which were backported to 1.22.x releases are also present in libqmi 1.24.0: * Build updated to explicitly define max allowed GLib version. * New request/responses/indications: ** uim: new "Register Events" request/response. ** dms: new "Dell Change Device Mode" request/response. ** dms: new "Dell Get Firmware Version" request/response. * qmicli: ** New '--dms-dell-change-device-mode' command. ** New '--dms-dell-get-firmware-version' command. Overview of changes in libqmi 1.22.0 ---------------------------------------- * Build now looks for the correct python provider in the system during configure. * New services: ** New 'QoS' (Quality of Service) service, with some minimal initial implementation to support flow/network status querying. Additionally, some Sierra-specific commands are also implemented that allow querying per-bearer statistics (e.g. if multiple dedicated and default LTE bearers are used). * New request/responses/indications: ** loc: new "Register Events" request/response. ** loc: new "NMEA" indication. ** loc: new "Engine State" indication. ** loc: new "Fix Recurrence Type" indication. ** loc: new "GNSS Sv Info" indication. ** loc: new "Inject Predicted Orbits Data" request/response/indication. ** loc: new "Get Predicted Orbits Data Source" request/response/indication. ** loc: new "Set Server" request/response/indication. ** loc: new "Get Server" request/response/indication. ** loc: new "Delete Assistance Data" request/response/indication. ** loc: new "Set Operation Mode" request/response/indication. ** loc: new "Get Operation Mode" request/response/indication. ** loc: new "Inject XTRA Data" request/response/indication. ** uim: new "Card Status" indication. ** wds: new "Get Default Profile Num" request/response. ** wds: new "Set Default Profile Num" request/response. ** wds: new Sierra-specific "Swi Create Profile Indexed" request/response. * New TLVs supported in existing messages: ** loc: added multiple new TLVs in the "Position Report" indication, which was a minimal skeleton in previous releases. ** loc: added 'Fix Recurrence Type' TLV in "Start". ** loc: added 'Minimum Interval between Position Reports' TLV in "Start". ** nas: added 'Acquisition Order Preference' TLV in "Set System Selection Preference" and "Get System Selection Preference". ** nas: added 'Phy CA Agg Secondary Cells' TLV in "Get LTE Cphy CA Info". ** wds: added 'WDS APN Disabled Flag' TLV in "Create Profile", "Modify Profile" and "Get Profile Settings". ** wds: added 'WDS Roaming Disallowed Flag' TLV in "Create Profile", "Modify Profile" and "Get Profile Settings". * libqmi: ** Assume TLVs < 0x10 are mandatory by default. ** Fixed some missing QmiProtocolErrors and updated some existing ones. ** Implemented support to allow enabling QMI indications when in MBIM mode. ** Addded missing QmiNasBandPreference and QmiDmsLteBandCapability flags. ** Deprecate QMI_CORE_ERROR_TLV_EMPTY, as empty TLVs are allowed by the protocol and totally valid e.g. in 0-sized string-type TLVs. ** Moved all deprecated APIs to 'qmi-compat.h' header. * qmicli: ** New '--loc-get-position-report' command. ** New '--loc-get-gnss-sv-info' command. ** New '--loc-follow-position-report' command. ** New '--loc-follow-gnss-sv-info' command. ** New '--loc-follow-nmea' command. ** New '--loc-delete-assistance-data' command. ** New '--qos-get-flow-status' command. ** New '--qos-get-network-status' command. ** New '--qos-swi-read-data-stats' command. ** New '--qos-reset' command. ** New '--wds-create-profile' command. ** New '--wds-modify-profile' command. ** New '--wds-delete-profile' command. ** New '--wds-get-default-profile-num' command. ** New '--wds-set-default-profile-num' command. ** New '--wds-swi-create-profile-indexed' command. ** Added support to request acquisition order preference updates when using '--nas-set-system-selection-preference'. ** Fixed slot indices in '--uim-get-card-status'. ** Fixed '--uim-set-pin-protection', '--uim-verify-pin", "--uim-unblock-pin", and '--uim-change-pin', so that a dummy application identifier is always used. ** Updated so that all commands work even through QMI over MBIM, even if indications are required to complete the command (e.g. most PDC and LOC commands). * qmi-network: ** Avoid creating invalid --wds-start-network when APN is not set. * Several other minor improvements and fixes. The following features which were backported to 1.20.x releases are also present in libqmi 1.22.0: * qmicli: ** Exit on --wds-start-network parse errors. ** Fix reading current technology in --wds-get-data-bearer-technology. * qmi-firmware-update: ** Fix --ignore-version-errors. ** Fix byte counts in error message. * libqmi-glib: ** dms: factory settings related operations since 1.0 ** Avoid closing same file descriptor twice. ** Don't leak the inner MbimDevice if MBIM_QMUX_ENABLED. Overview of changes in libqmi 1.20.0 ---------------------------------------- * New services: ** loc: new "LOC" (location) service, which e.g. allows controlling GPS devices in newer modules that don't implement the PDS service. Just some very basic implementation for now. * New request/responses: ** nas: new "Attach/Detach" request/response messages. ** wds: new "Get Channel Rates" request/response messages. ** dms: new 'Swi Get/Set USB Composition' request/response messages. * New TLVs supported in existing messages: ** nas: new 'Extended LTE Band Preference' TLV in "Set/Get SSP". ** dms: new 'Extended LTE Band Capability' TLV in "Get Band Capabilities". * libqmi: ** New 'QMI_DEVICE_SIGNAL_REMOVED' signal in the QmiDevice object, propagated through the qmi-proxy. ** New 'QMI_CLIENT_VALID' property in the QmiClient that allows detecting whether the underlying QmiDevice is usable or not. ** Defined additional LTE bands. * qmicli: ** New '--wds-set-ip-family' command. ** New '--wds-get-channel-rates' command. ** New '--uim-read-record' command. ** New '--dms-swi-get-usb-composition' and '--dms-swi-set-usb-composition' commands. * Several other minor improvements and fixes. The following features which were backported to 1.18.x releases are also present in libqmi 1.20.0: * libqmi-glib: ** Prefer realpath() to canonicalize_file_name(). ** Avoid signals sent to the qmi-proxy process. * qmi-firmware-update: ** Support USB3->USB2 mode changes during upgrade. Overview of changes in libqmi 1.18.0 ---------------------------------------- The full list of new features include: * libqmi: ** Implemented support for vendor-specific commands through a new qmi_device_command_full() operation and a new QmiMessageContext type. The original qmi_device_command() is flagged as deprecated. ** New 'QMI_DEVICE_OPEN_FLAGS_AUTO' flag in qmi_device_open() which allows automatic detection of the underlying protocol in a cdc-wdm device (either QMI or MBIM) and transparently uses it based on that. ** New qmi_device_close_async() operation, which allows closing a QmiDevice asynchronously (especially important when closing devices running QMI over MBIM, as this operation requires MBIM protocol cleanups). The original qmi_device_close() is flagged as deprecated. ** Fixed QmiWmsCdmaCauseCode enum names, and provided a compatibility layer keeping the old names (flagged as deprecated) to avoid breaking API. * New services: ** pdc: new "PDC" (persistent device configuration) service, which among other things, allows configuring the HP lt4120. * New request/responses: ** dms: new sierra-specific "SWI Get Current Firmware" request/response. ** dms: new hp-specific "HP Change Device Mode" request/response. ** dms: new "Set Firmware ID" request/response. ** dms: new "Get Boot Image Download Mode" request/response. ** dms: new "Set Boot Image Download Mode" request/response. ** wds: new "Create Profile" request/response. ** wds: new "Modify Profile" request/response. ** wds: new "Delete Profile" request/response. ** wds: new "Set Event Report" request/response. ** wds: new "Go Dormant" request/response. ** wds: new "Go Active" request/response. ** wds: new "Get Dormancy Status" request/response. ** pdc: new "Reset" request/response. ** pdc: new "Register" request/response. ** pdc: new "Config Change" request/response. ** pdc: new "Get Selected Config" request/response. ** pdc: new "Set Selected Config" request/response. ** pdc: new "List Configs" request/response. ** pdc: new "Delete Config" request/response. ** pdc: new "Load Config" request/response. ** pdc: new "Activate Config" request/response. ** pdc: new "Get Config Info" request/response. ** pdc: new "Get Config Limits" request/response. ** pdc: new "Get Default Config Info" request/response. ** pdc: new "Deactivate Config" request/response. ** uim: new "Power Off SIM" request/response. ** uim: new "Power On SIM" request/response. ** nas: new "Get Operator Name" request/response. ** wds: new "Bind Mux Data Port" request/response. * New indications: ** wds: new "Event report" indication. ** pdc: new "Get Selected Config" indication. ** pdc: new "Set Selected Config" indication. ** pdc: new "List Configs" indication. ** pdc: new "Load Config" indication. ** pdc: new "Activate Config" indication. ** pdc: new "Get Config Info" indication. ** pdc: new "Deactivate Config" indication. ** nas: new "Operator Name" indication. * New TLVs supported in existing messages: ** wda: updated "Set Data Format" request to allow specifying endpoint type and interface number. * qmi-firmware-update: ** This is a completely new tool that allows upgrading firmware in (at least) Sierra Wireless devices with MDM9200, MDM9x15 or MDM9x30 chipsets. Run the tool with --help and --help-examples to get more information on how to use it. * qmicli: ** The CLI no longer requires the '--device-open-mbim' explicit option when opening QMI capable MBIM devices, the automatic detection of QMI over MBIM is enabled by default. ** New '--device-open-qmi' option to disable the automatic detection of protocol and force using QMI. ** New '--dms-set-firmware-id' operation. ** New '--dms-get-software-version' operation. ** New '--dms-set-boot-image-download-mode' and '--dms-get-boot-image-download-mode' operations to configure the default download mode. ** New '--dms-set-firmware-preference' and '--dms-get-firmware-preference' operations to manage the current firmware preference. ** New '--wds-go-dormant', '--wds-go-active' and '--wds-get-dormancy-status' operations to manage dormancy related operations. ** New '--nas-get-rf-band-info' operation. ** New '--uim-sim-power-on' and '--uim-sim-power-off' operations. ** New '--nas-get-operator-name' operation. ** New '--wds-bind-mux-data-port' operation. ** Updated '--wda-set-data-format' to allow specifying endpoint type and interface number. ** If running in MBIM mode, enable MBIM logs and traces. ** By default the QmiDevice will be closed before exiting, e.g. so that the MBIM session is also closed. * docs: ** Updated the documentation so that each QMI message and each TLV specifies in which libqmi version it was introduced, using "since:" tags in the QMI message databases. ** Added indices for new symbols introduced in the major libqmi releases, as well as for symbols flagged as deprecated. * build: ** Bump GLib requirement to 2.36. ** Added GUdev requirement for qmi-firmware-update, that may be explicitly disabled using the new '--without-udev' configure switch. ** The new '--disable-firmware-update' configure switch allows completely disabling the qmi-firmware-update tool build. ** The new '--disable-mm-runtime-check' configure switch allows disabling the runtime check for ModemManager done by the qmi-firmware-update tool. The following features which were backported to 1.16.x releases are also present in libqmi 1.18.0: * dms: flagged several methods as available since DMS 1.1. * nas: Fix RX/TX mixup in 'Get LTE Cphy CA Info'. * libqmi-glib: ** Fix segfault in QmiDevice when cancellable already cancelled. ** Fix releasing transaction on MBIM error. * qmicli: ** Added support for IP type in --wds-start-network. ** Fix options receiving a list of flags. ** Fix second ctrl+c handling. ** Avoid converting to dB invalid SINR values. * qmi-proxy: ** Fix segfault when trying to use already disposed clients. ** Fix segfault when trying to use already disposed transactions. ** Plug several memleaks in error conditions. * build: ** Guard invocations of g_type_init(). ** Fix checking for libmbim. Overview of changes in libqmi 1.16.0 ---------------------------------------- * New `--enable-mbim-qmux' option during configure, which enables the support for using an MBIM control device as transport for the QMI messages, only if the MBIM device implements the "QMI service". This setting is automatically enabled if libmbim >= 1.14.0 is found in the system, and can be explicitly disabled with `--disable-mbim-qmux'. * New request/responses: ** nas: new "Get LTE Cphy CA Info" request/response. ** nas: new "Force Network Search" request/response. * qmi-network: ** Fixed several bashisms. The following features which were backported to 1.14.x releases are also present in libqmi 1.16.0: * Added compatibility symbols for some API breaks introduced in 1.14.0: ** qmi_message_dms_set_service_programming_code_input_get_current was renamed to qmi_message_dms_set_service_programming_code_input_get_current_code. ** qmi_message_dms_set_service_programming_code_input_get_new was renamed to qmi_message_dms_set_service_programming_code_input_get_new_code. ** qmi_message_dms_set_service_programming_code_input_set_current was renamed to qmi_message_dms_set_service_programming_code_input_set_current_code. ** qmi_message_dms_set_service_programming_code_input_set_new was renamed to qmi_message_dms_set_service_programming_code_input_set_new_code. ** QMI_NAS_SIM_REJECT_STATE_SIM_VAILABLE was renamed to QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE. * libqmi-glib: ** Fixed QMI_DMS_BAND_CAPABILITY_BC_15 enum value so that it isn't treated as a negative value. * qmicli: ** Fixed --dms-get-band-capabilities output on 32-bit platforms. ** Fixed license text of the voice service implementation. Overview of changes in libqmi 1.14.0 ---------------------------------------- * This version comes with a couple of small API breaks: ** ECIO value type in "NAS Event Report Indication" is given as unsigned. ** ECIO value in ECIO List array type in "NAS Get Signal Strenght" is given as unsigned. ** QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE enum name was fixed. * The library and tools now support working with modems which only implement raw IP (i.e. no ethernet headers) in the WWAN interface. This relies on the kernel to expose '/sys/class/net//qmi/raw_ip' sysfs files for each WWAN network interface (available since Linux 4.5-rc1). * New initial support for the 'Voice' service. * New request/responses: ** wms: new "Get Supported Messages" request/response. ** wds: new "Get Supported Messages" request/response. ** voice: new "Get Supported Messages" request/response. ** uim: new "Get Supported Messages" request/response. ** nas: new "Get Supported Messages" request/response. ** wda: new "Get Supported Messages" request/response. ** dms: new "Get Supported Messages" request/response. ** wds: new "Set Autoconnect Setting" request/response. ** wds: new "Get Autoconnect Setting" request/response. ** wds: new "Get PDN Throttle Info" request/response. ** uim: new "Change PIN" request/response. ** uim: new "Unblock PIN" request/response. ** uim: new "Verify PIN" request/response. ** uim: new "Set PIN protection" request/response. ** voice: new "Dial Call" request/response. ** voice: new "End Call" request/response. ** voice: new "Answer Call" request/response. ** voice: new "Get Config" request/response. ** voice: new "Get Supported Messages" request/response. * New indications: ** wms: new "SMSC Address" indication. ** pds: new "GPS Ready" indication. ** wds: new "Packet Service Status" indication. * New TLVs supported in existing messages: ** wds: support "UMTS Granted QoS" TLV in 'Get Current Settings'. ** nas: support "Home Network 3GPP MNC" in "Get Home Network" to know whether MNC is 2 or 3 digits. * The qmicli tool has been updated with several new functionalities: ** New '--get-wwan-iface' command line option to allow querying which is the WWAN interface associated with a given /dev/cdc-wdm device. ** New '--wds-get-current-settings' command line option to query the current settings in the WDS service. ** New '--get-expected-data-format' and '--set-expected-data-format' actions to get or set the data format expected by the kernel. ** LTE band descriptions are now printed along with the EARFCN. ** Updated '--wds-start-network' arguments to allow specifying "key=value" pairs. The old legacy "[(APN),(PAP|CHAP|BOTH),(Username),(Password)]" format is kept as valid for backwards compatibility, although it should be assumed deprecated. ** Updated '--wds-start/stop-network' to allow autoconnect settings, and 3GPP or 3GPP2 profile parameters. * The qmi-network helper script has been updated with several new features: ** Allow running with the qmi-proxy. ** Allow running qmi-network with multiple devices at the same time. ** Automatic link layer protocol update before connecting. ** Allow specifying APN user/password. * Added command completion support in qmicli. * Other bugfixes and minor improvements. The following features which were backported to 1.12.x releases are also present in libqmi 1.14.0: * New request/responses: ** dms: new "Set FCC Authentication" request/response. Overview of changes in libqmi 1.12.0 ---------------------------------------- * New `--enable-qmi-username' option during configure, which allows specifying which will be the user owning the /dev/cdc-wdm character devices of all QMI modems (udev rules are installed to change file ownership). If this option is used, the qmi-proxy will only allow connections from processes running by the specified user or by the root user. * New TLV builder and reader API, which is much more strict and secure. The autogenerated code will no longer first check if there is enough space available in the output message buffer and then write the parsed contents. Instead, the new reader API will be used, which is able to check for the expected size directly before writing in the buffer. * New unit tests to check messages built by the libqmi-glib library, using a fake proxy. In order to support these, the QmiDevice has two new properties: ** "device-no-file-check": instructs the QmiDevice to avoid checking if the specified file exists. ** "device-proxy-path": specifies a custom abstract socket path for the QmiProxy, to avoid using the default one. * New A-GPS support in the PDS service: ** pds: added "Get Default Tracking Session" request/response ** pds: added "Set Default Tracking Session" request/response ** pds: added "Get AGPS Config" request/response ** pds: added "Set AGPS Config" request/response * Updated minumum available version of several messages: ** dms: "UIM Get IMSI" seems to be available in DMS 1.1 already ** dms: "UIM Get ICCID" seems to be available in DMS 1.1 already * Other bugfixes and minor improvements: ** Attach timeout and idle events to the thread-default context. ** Fix bashisms in the qmi-network script. ** Fix qmi_message_set_transaction_id() in non-CTL messages. ** Fix segfault due to race condition in the QmiProxy. ** Fixed printing contents of structs with fixed sized strings in qmi-codegen. Overview of changes in libqmi 1.10.0 ---------------------------------------- * Fixed default internal proxy timeout for requests. * Added initial support for the WDA service. * Added support for cell location info retrieval. * Added support for UIM card status retrieval. * Added support to specify net open flags in the command line. Overview of changes in libqmi 1.8.0 ---------------------------------------- This version comes with one small API break: * Enum value QMI_SERVICE_RMTFS is not 0x14, but 14. I doubt anyone has been hit by this issue, anyway. Additional changes include: * Support for sharing the QMI port through multiple processes with the new 'qmi-proxy' infrastructure. * api: added new known service ID enumeration values * wds: added "Get Profile List" request/response * wds: added "Get Profile Settings" request/response * wds: added "Get Default Settings" request/response * cli: add --wds-get-profile-list * cli: add --wds-get-default-settings * man: added qmi-network manpage, autogenerated from --help-all Overview of changes in libqmi 1.6.0 ---------------------------------------- This version comes with one small API break: * dms: 'SID' TLV in "Activate Manual" is a guint8, not a string Additional changes include: * Extended API with macros to check for the libqmi-glib version in use * Setup libtool versioning in libqmi-glib * Added initial support for the PBM (phonebook) service * Added initial support for the UIM service * Added initial support for the OMA (Open Mobile Alliance) service * nas: added "Get Tx Rx Info" request/response * wds: added "Get Packet Statistics" request/response * dms: added support for the 'PRL' TLV in "Activate Manual" * cli: add --nas-get-tx-rx-info * cli: add --wds-get-packet-statistics * cli: add --get-service-version-info * cli: add --uim-read-transparent * cli: add --uim-get-file-attributes * cli: fix following network status until disconnected * tests: use gtester to run unit tests * man: added qmicli manpage, autogenerated from --help-all * Also fixed several minor bugs and memory leaks Overview of changes in libqmi 1.4.0 ---------------------------------------- * dms: fix minimum version requirement for DMS Get/Set Operating Mode * nas: added 'Network Time' indication * utils: fix reading sized uints in BE systems * cli: add --dms-activate-manual * cli: implemented setting System Selection Preference * cli: fix technology preference persistence reporting * cli: fix reading new PIN in '--dms-uim-change-pin' * docs: always generate documentation at dist time * tests: fixed BE/LE tests in BE systems Overview of changes in libqmi 1.2.0 ---------------------------------------- * Builds with Python3 * Fixed DMS activation code string handling * Enhanced "start network" functionality in qmicli Overview of changes in libqmi 1.0 ---------------------------------------- Initial release. libqmi-1.35.2-dev/README.md000066400000000000000000000016201455567757300151410ustar00rootroot00000000000000 # libqmi libqmi is a glib-based library for talking to WWAN modems and devices which speak the Qualcomm MSM Interface (QMI) protocol. ## Documentation Project documentation is kept in: https://modemmanager.org/docs/libqmi/ ## License * `libqmi-glib` library is released under the LGPL-2.1-or-later license. * `qmicli`, `qmi-network` and `qmi-firmware-update` tools are released under the GPL-2.0-or-later license. ## Code of Conduct Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms, which you can find in the following link: https://www.freedesktop.org/wiki/CodeOfConduct CoC issues may be raised to the project maintainers at the following address: libqmi-devel-owner@lists.freedesktop.org libqmi-1.35.2-dev/RELEASING000066400000000000000000000052401455567757300151200ustar00rootroot00000000000000 The libqmi releases are generated using meson. 0.1) For major releases: * Increment qmi_minor_version and reset qmi_micro_version. * Assuming API/ABI compatibility, increment both current and age. 0.2) For stable branch releases: * Increment qmi_micro_version. 1) Add signed tag: $ git tag -s 1.32.0 The description included in the signed tag could be: Release 1.32.0 2) Configure and build the whole project, making sure gtk-doc and introspection are enabled: $ meson setup build \ --prefix=/usr \ --buildtype=release \ -Dintrospection=true \ -Dgtk_doc=true $ ninja -C build 3) Run the test suite and install locally: $ ninja -C build test $ sudo ninja -C build install 4) Create directories for the manpages and gtk-doc documentation in freedesktop.org, and also update the 'latest' links: $ ssh fd.o [fd.o] $ cd ${libqmi}/man/ [fd.o] $ rm latest [fd.o] $ mkdir -p ${VERSION} [fd.o] $ ln -s ${VERSION} latest [fd.o] $ cd ${libqmi}/libqmi-glib/ [fd.o] $ rm latest [fd.o] $ mkdir -p ${VERSION} [fd.o] $ ln -s ${VERSION} latest 5) Generate HTML for the manpages: $ roffit < build/docs/man/qmicli.1 > qmicli.1.html $ roffit < build/docs/man/qmi-network.1 > qmi-network.1.html $ roffit < build/docs/man/qmi-firmware-update.1 > qmi-firmware-update.1.html 6) Upload manpages in HTML to freedesktop.org: $ scp *.1.html fd.o:${libqmi}/man/${VERSION}/ 7) Copy documentation from /usr/share/gtk-doc and fix online references manually $ mkdir html $ cp -r /usr/share/gtk-doc/html/libqmi-glib/* html/ $ for FILE in $(ls html/*.html); do \ sed -i 's|]* href="\.\./glib/[^"]*| # import string from MessageList import MessageList import utils """ The Client class is responsible for providing the QmiClient-based service specific client GObject. """ class Client: """ Constructor """ def __init__(self, objects_dictionary): self.name = None self.service = None # Loop items in the list, looking for the special 'Client' type for object_dictionary in objects_dictionary: if object_dictionary['type'] == 'Client': self.name = object_dictionary['name'] self.since = object_dictionary['since'] if 'since' in object_dictionary else '' elif object_dictionary['type'] == 'Service': self.service = object_dictionary['name'] # We NEED the Client field and the Service field if self.name is None: raise ValueError('Missing Client field') if self.service is None: raise ValueError('Missing Service field') """ Emits the symbol specifying if the service is supported """ def __emit_supported(self, f, supported): translations = { 'service' : self.service.upper() } template = '\n' if supported: template += '#define HAVE_QMI_SERVICE_${service}\n' else: template += '/* HAVE_QMI_SERVICE_${service} */\n' f.write(string.Template(template).substitute(translations)) """ Emits the generic GObject class implementation """ def __emit_class(self, hfile, cfile, message_list): translations = { 'underscore' : utils.build_underscore_name(self.name), 'no_prefix_underscore_upper' : utils.build_underscore_name(self.name[4:]).upper(), 'camelcase' : utils.build_camelcase_name(self.name), 'hyphened' : utils.build_dashed_name(self.name), 'since' : self.since, 'service' : self.service.upper() } # Emit class header template = ( '#define QMI_TYPE_${no_prefix_underscore_upper} (${underscore}_get_type ())\n' '#define QMI_${no_prefix_underscore_upper}(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_${no_prefix_underscore_upper}, ${camelcase}))\n' '#define QMI_${no_prefix_underscore_upper}_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_${no_prefix_underscore_upper}, ${camelcase}Class))\n' '#define QMI_IS_${no_prefix_underscore_upper}(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_${no_prefix_underscore_upper}))\n' '#define QMI_IS_${no_prefix_underscore_upper}_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_${no_prefix_underscore_upper}))\n' '#define QMI_${no_prefix_underscore_upper}_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_${no_prefix_underscore_upper}, ${camelcase}Class))\n' '\n' 'typedef struct _${camelcase} ${camelcase};\n' 'typedef struct _${camelcase}Class ${camelcase}Class;\n' '\n') if self.service != 'CTL': template += ( '/**\n' ' * ${camelcase}:\n' ' *\n' ' * The #${camelcase} structure contains private data and should only be accessed\n' ' * using the provided API.\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( 'struct _${camelcase} {\n' ' /*< private >*/\n' ' QmiClient parent;\n' ' gpointer priv_unused;\n' '};\n' '\n' 'struct _${camelcase}Class {\n' ' /*< private >*/\n' ' QmiClientClass parent;\n' '};\n' '\n' 'GType ${underscore}_get_type (void);\n' 'G_DEFINE_AUTOPTR_CLEANUP_FUNC (${camelcase}, g_object_unref)\n') hfile.write(string.Template(template).substitute(translations)) template = '' if self.service != 'CTL': template += ( '\n' '/**\n' ' * SECTION: ${hyphened}\n' ' * @title: ${camelcase}\n' ' * @short_description: #QmiClient for the ${service} service.\n' ' *\n' ' * #QmiClient which handles operations in the ${service} service.\n' ' */\n' '\n') template += ( 'G_DEFINE_TYPE (${camelcase}, ${underscore}, QMI_TYPE_CLIENT)\n') if len(message_list.indication_list) > 0: template += ( '\n' 'enum {\n') for message in message_list.indication_list: translations['signal_id'] = utils.build_underscore_uppercase_name(message.name) inner_template = ( ' SIGNAL_${signal_id},\n') template += string.Template(inner_template).substitute(translations) template += ( ' SIGNAL_LAST\n' '};\n' '\n' 'static guint signals[SIGNAL_LAST] = { 0 };\n') template += ( '\n' 'static void\n' 'process_indication (QmiClient *self,\n' ' QmiMessage *message)\n' '{\n' ' switch (qmi_message_get_message_id (message)) {\n') for message in message_list.indication_list: translations['enum_name'] = message.id_enum_name translations['message_fullname_underscore'] = utils.build_underscore_name(message.fullname) translations['message_name'] = message.name translations['signal_id'] = utils.build_underscore_uppercase_name(message.name) inner_template = '' if message.output is not None and message.output.fields is not None: # At least one field in the indication translations['output_camelcase'] = utils.build_camelcase_name(message.output.fullname) translations['output_underscore'] = utils.build_underscore_name(message.output.fullname) translations['output_underscore'] = utils.build_underscore_name(message.output.fullname) inner_template += ( ' case ${enum_name}: {\n' ' ${output_camelcase} *output;\n' ' GError *error = NULL;\n' '\n' ' /* Parse indication */\n' ' output = ${message_fullname_underscore}_indication_parse (message, &error);\n' ' if (!output) {\n' ' g_warning ("Couldn\'t parse \'${message_name}\' indication: %s",\n' ' error ? error->message : "Unknown error");\n' ' if (error)\n' ' g_error_free (error);\n' ' } else {\n' ' g_signal_emit (self, signals[SIGNAL_${signal_id}], 0, output);\n' ' ${output_underscore}_unref (output);\n' ' }\n' ' break;\n' ' }\n') else: # No output field in the indication inner_template += ( ' case ${enum_name}: {\n' ' g_signal_emit (self, signals[SIGNAL_${signal_id}], 0, NULL);\n' ' break;\n' ' }\n') template += string.Template(inner_template).substitute(translations) template += ( ' default:\n' ' break;\n' ' }\n' '}\n' '\n' 'static void\n' '${underscore}_init (${camelcase} *self)\n' '{\n' '}\n' '\n' 'static void\n' '${underscore}_class_init (${camelcase}Class *klass)\n' '{\n' ' QmiClientClass *client_class = QMI_CLIENT_CLASS (klass);\n' '\n' ' client_class->process_indication = process_indication;\n') for message in message_list.indication_list: translations['signal_name'] = utils.build_dashed_name(message.name) translations['signal_id'] = utils.build_underscore_uppercase_name(message.name) translations['message_name'] = message.name translations['since'] = message.since inner_template = '' if message.output is not None and message.output.fields is not None: # At least one field in the indication translations['output_camelcase'] = utils.build_camelcase_name(message.output.fullname) translations['bundle_type'] = 'QMI_TYPE_' + utils.remove_prefix(utils.build_underscore_uppercase_name(message.output.fullname), 'QMI_') translations['service'] = self.service.upper() translations['message_name_dashed'] = message.name.replace(' ', '-') inner_template += ( '\n') if self.service != 'CTL': inner_template += ( ' /**\n' ' * ${camelcase}::${signal_name}:\n' ' * @object: A #${camelcase}.\n' ' * @output: A #${output_camelcase}.\n' ' *\n' ' * The ::${signal_name} signal gets emitted when a \'${message_name}\' indication is received.\n' ' *\n' ' * Since: ${since}\n' ' */\n') inner_template += ( ' signals[SIGNAL_${signal_id}] =\n' ' g_signal_new ("${signal_name}",\n' ' G_OBJECT_CLASS_TYPE (G_OBJECT_CLASS (klass)),\n' ' G_SIGNAL_RUN_LAST,\n' ' 0,\n' ' NULL,\n' ' NULL,\n' ' NULL,\n' ' G_TYPE_NONE,\n' ' 1,\n' ' ${bundle_type});\n') else: # No output field in the indication inner_template += ( '\n') if self.service != 'CTL': inner_template += ( ' /**\n' ' * ${camelcase}::${signal_name}:\n' ' * @object: A #${camelcase}.\n' ' *\n' ' * The ::${signal_name} signal gets emitted when a \'${message_name}\' indication is received.\n' ' *\n' ' * Since: ${since}\n' ' */\n') inner_template += ( ' signals[SIGNAL_${signal_id}] =\n' ' g_signal_new ("${signal_name}",\n' ' G_OBJECT_CLASS_TYPE (G_OBJECT_CLASS (klass)),\n' ' G_SIGNAL_RUN_LAST,\n' ' 0,\n' ' NULL,\n' ' NULL,\n' ' NULL,\n' ' G_TYPE_NONE,\n' ' 0);\n') template += string.Template(inner_template).substitute(translations) template += ( '}\n' '\n') cfile.write(string.Template(template).substitute(translations)) """ Emits the async methods for each known request/response """ def __emit_methods(self, hfile, cfile, message_list): translations = { 'underscore' : utils.build_underscore_name(self.name), 'camelcase' : utils.build_camelcase_name (self.name), 'service_lowercase' : self.service.lower(), 'service_uppercase' : self.service.upper(), 'service_camelcase' : string.capwords(self.service) } for message in message_list.request_list: if message.static: continue translations['message_name'] = message.name translations['message_vendor_id'] = message.vendor translations['message_underscore'] = utils.build_underscore_name(message.name) translations['message_fullname_underscore'] = utils.build_underscore_name(message.fullname) translations['input_camelcase'] = utils.build_camelcase_name(message.input.fullname) translations['output_camelcase'] = utils.build_camelcase_name(message.output.fullname) translations['input_underscore'] = utils.build_underscore_name(message.input.fullname) translations['output_underscore'] = utils.build_underscore_name(message.output.fullname) translations['message_since'] = message.since if message.input.fields is None: translations['input_arg'] = 'gpointer unused' translations['input_var'] = 'NULL' translations['input_doc'] = 'unused: %NULL. This message doesn\'t have any input bundle.' else: translations['input_arg'] = translations['input_camelcase'] + ' *input' translations['input_var'] = 'input' translations['input_doc'] = 'input: a #' + translations['input_camelcase'] + '.' template = ( '\n') if self.service != 'CTL': template += ( '/**\n' ' * ${underscore}_${message_underscore}:\n' ' * @self: a #${camelcase}.\n' ' * @${input_doc}\n' ' * @timeout: maximum time to wait for the method to complete, in seconds.\n' ' * @cancellable: a #GCancellable or %NULL.\n' ' * @callback: a #GAsyncReadyCallback to call when the request is satisfied.\n' ' * @user_data: user data to pass to @callback.\n' ' *\n' ' * Asynchronously sends a ${message_name} request to the device.\n') if message.abort: template += ( ' *\n' ' * This message is abortable. If @cancellable is cancelled or if @timeout expires,\n' ' * an abort request will be sent to the device, and the asynchronous operation will\n' ' * not return until the abort response is received. It is not an error if a successful\n' ' * response is returned for the asynchronous operation even after the user has cancelled\n' ' * the cancellable, because it may happen that the response is received before the\n' ' * modem had a chance to run the abort.\n') template += ( ' *\n' ' * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from.\n' ' *\n' ' * You can then call ${underscore}_${message_underscore}_finish() to get the result of the operation.\n' ' *\n' ' * Since: ${message_since}\n' ' */\n') template += ( 'void ${underscore}_${message_underscore} (\n' ' ${camelcase} *self,\n' ' ${input_arg},\n' ' guint timeout,\n' ' GCancellable *cancellable,\n' ' GAsyncReadyCallback callback,\n' ' gpointer user_data);\n' '\n') if self.service != 'CTL': template += ( '/**\n' ' * ${underscore}_${message_underscore}_finish:\n' ' * @self: a #${camelcase}.\n' ' * @res: the #GAsyncResult obtained from the #GAsyncReadyCallback passed to ${underscore}_${message_underscore}().\n' ' * @error: Return location for error or %NULL.\n' ' *\n' ' * Finishes an async operation started with ${underscore}_${message_underscore}().\n' ' *\n' ' * Returns: a #${output_camelcase}, or %NULL if @error is set. The returned value should be freed with ${output_underscore}_unref().\n' ' *\n' ' * Since: ${message_since}\n' ' */\n') template += ( '${output_camelcase} *${underscore}_${message_underscore}_finish (\n' ' ${camelcase} *self,\n' ' GAsyncResult *res,\n' ' GError **error);\n') hfile.write(string.Template(template).substitute(translations)) template = ( '\n' '${output_camelcase} *\n' '${underscore}_${message_underscore}_finish (\n' ' ${camelcase} *self,\n' ' GAsyncResult *res,\n' ' GError **error)\n' '{\n' ' return g_task_propagate_pointer (G_TASK (res), error);\n' '}\n') if message.abort: template += ( '\n' '#if defined HAVE_QMI_MESSAGE_${service_uppercase}_ABORT\n' '\n' 'static QmiMessage *\n' '__${message_fullname_underscore}_abortable_build_request (\n' ' QmiDevice *self,\n' ' QmiMessage *message,\n' ' QmiClient *client,\n' ' GError **error)\n' '{\n' ' QmiMessage *abort_request;\n' ' guint16 transaction_id;\n' ' g_autoptr(QmiMessage${service_camelcase}AbortInput) input = NULL;\n' '\n' ' transaction_id = qmi_message_get_transaction_id (message);\n' ' g_assert (transaction_id != 0);\n' '\n' ' input = qmi_message_${service_lowercase}_abort_input_new ();\n' ' qmi_message_${service_lowercase}_abort_input_set_transaction_id (\n' ' input,\n' ' transaction_id,\n' ' NULL);\n' ' abort_request = __qmi_message_${service_lowercase}_abort_request_create (\n' ' qmi_client_get_next_transaction_id (client),\n' ' qmi_client_get_cid (client),\n' ' input,\n' ' NULL);\n' ' return abort_request;\n' '}\n' '\n' 'static gboolean\n' '__${message_fullname_underscore}_abortable_parse_response (\n' ' QmiDevice *self,\n' ' QmiMessage *abort_response,\n' ' QmiClient *client,\n' ' GError **error)\n' '{\n' ' g_autoptr(QmiMessage${service_camelcase}AbortOutput) output = NULL;\n' '\n' ' output = __qmi_message_${service_lowercase}_abort_response_parse (\n' ' abort_response,\n' ' error);\n' ' return !!output;\n' '}\n' '\n' '#endif /* HAVE_QMI_MESSAGE_${service_uppercase}_ABORT */\n' '\n') template += ( '\n' 'static void\n' '${message_underscore}_ready (\n' ' QmiDevice *device,\n' ' GAsyncResult *res,\n' ' GTask *task)\n' '{\n' ' GError *error = NULL;\n' ' QmiMessage *reply;\n' ' ${output_camelcase} *output;\n' '\n') if message.abort: template += ( ' reply = qmi_device_command_abortable_finish (device, res, &error);\n') else: template += ( ' reply = qmi_device_command_full_finish (device, res, &error);\n') template += ( ' if (!reply) {\n') template += ( ' g_task_return_error (task, error);\n' ' g_object_unref (task);\n' ' return;\n' ' }\n' '\n' ' /* Parse reply */\n' ' output = ${message_fullname_underscore}_response_parse (reply, &error);\n' ' if (!output)\n' ' g_task_return_error (task, error);\n' ' else\n' ' g_task_return_pointer (task,\n' ' output,\n' ' (GDestroyNotify)${output_underscore}_unref);\n' ' g_object_unref (task);\n' ' qmi_message_unref (reply);\n' '}\n' '\n' 'void\n' '${underscore}_${message_underscore} (\n' ' ${camelcase} *self,\n' ' ${input_arg},\n' ' guint timeout,\n' ' GCancellable *cancellable,\n' ' GAsyncReadyCallback callback,\n' ' gpointer user_data)\n' '{\n' ' GTask *task;\n' ' GError *error = NULL;\n' ' guint16 transaction_id;\n' ' g_autoptr(QmiMessage) request = NULL;\n') if message.vendor is not None: template += ( ' g_autoptr(QmiMessageContext) context = NULL;\n') template += ( '\n' ' task = g_task_new (self, cancellable, callback, user_data);\n' ' if (!qmi_client_is_valid (QMI_CLIENT (self))) {\n' ' g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "client invalid");\n' ' g_object_unref (task);\n' ' return;\n' ' }\n' '\n' ' transaction_id = qmi_client_get_next_transaction_id (QMI_CLIENT (self));\n' '\n' ' request = __${message_fullname_underscore}_request_create (\n' ' transaction_id,\n' ' qmi_client_get_cid (QMI_CLIENT (self)),\n' ' ${input_var},\n' ' &error);\n' ' if (!request) {\n' ' g_prefix_error (&error, "Couldn\'t create request message: ");\n' ' g_task_return_error (task, error);\n' ' g_object_unref (task);\n' ' return;\n' ' }\n') if message.vendor is not None: template += ( '\n' ' context = qmi_message_context_new ();\n' ' qmi_message_context_set_vendor_id (context, ${message_vendor_id});\n') if message.abort: template += ( '\n' ' qmi_device_command_abortable (QMI_DEVICE (qmi_client_peek_device (QMI_CLIENT (self))),\n') else: template += ( '\n' ' qmi_device_command_full (QMI_DEVICE (qmi_client_peek_device (QMI_CLIENT (self))),\n') template += ( ' request,\n') if message.vendor is not None: template += ( ' context,\n') else: template += ( ' NULL,\n') template += ( ' timeout,\n') if message.abort: template += ( '#if defined HAVE_QMI_MESSAGE_${service_uppercase}_ABORT\n' ' (QmiDeviceCommandAbortableBuildRequestFn) __${message_fullname_underscore}_abortable_build_request,\n' ' (QmiDeviceCommandAbortableParseResponseFn) __${message_fullname_underscore}_abortable_parse_response,\n' ' g_object_ref (self),\n' ' g_object_unref,\n' '#else\n' ' NULL,\n' ' NULL,\n' ' NULL,\n' ' NULL,\n' '#endif\n') template += ( ' cancellable,\n' ' (GAsyncReadyCallback)${message_underscore}_ready,\n' ' task);\n') template += ( '}\n' '\n') cfile.write(string.Template(template).substitute(translations)) """ Emit the service-specific client implementation """ def emit(self, hfile, cfile, message_list): # Do nothing if no supported messages if len(message_list.indication_list) == 0 and len(message_list.request_list) == 0: self.__emit_supported(hfile, False) return self.__emit_supported(hfile, True) # First, emit common class code utils.add_separator(hfile, 'CLIENT', self.name); utils.add_separator(cfile, 'CLIENT', self.name); self.__emit_class(hfile, cfile, message_list) self.__emit_methods(hfile, cfile, message_list) """ Emit the sections """ def emit_sections(self, sfile, message_list): # Do nothing if no supported messages if len(message_list.indication_list) == 0 and len(message_list.request_list) == 0: return translations = { 'underscore' : utils.build_underscore_name(self.name), 'no_prefix_underscore_upper' : utils.build_underscore_name(self.name[4:]).upper(), 'camelcase' : utils.build_camelcase_name (self.name), 'hyphened' : utils.build_dashed_name (self.name) } template = ( '
\n' '${hyphened}\n' '${camelcase}\n' '${camelcase}\n' '\n' '${camelcase}Class\n' 'QMI_TYPE_${no_prefix_underscore_upper}\n' 'QMI_${no_prefix_underscore_upper}\n' 'QMI_${no_prefix_underscore_upper}_CLASS\n' 'QMI_IS_${no_prefix_underscore_upper}\n' 'QMI_IS_${no_prefix_underscore_upper}_CLASS\n' 'QMI_${no_prefix_underscore_upper}_GET_CLASS\n' '${underscore}_get_type\n' '
\n' '\n') sfile.write(string.Template(template).substitute(translations)) libqmi-1.35.2-dev/build-aux/qmi-codegen/Container.py000066400000000000000000000412201455567757300222400ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # import string import utils from FieldResult import FieldResult from Field import Field """ The Container class takes care of handling collections of Input or Output fields """ class Container: """ Constructor """ def __init__(self, service, prefix, container_type, dictionary, common_objects_dictionary, static, since, compat): # The current QMI service self.service = service # The field container prefix usually contains the name of the Message, # e.g. "Qmi Message Ctl Something" self.prefix = prefix # We may have 'Input' or 'Output' containers if container_type == 'Input': self.readonly = False elif container_type == 'Output': self.readonly = True else: raise ValueError('Cannot handle container type \'%s\'' % container_type) self.name = container_type self.static = static self.since = since self.compat = compat # Create the composed full name (prefix + name), # e.g. "Qmi Message Ctl Something Output" self.fullname = self.prefix + ' ' + self.name self.fields = None if dictionary is not None: self.fields = [] new_dict = [] # First, look for references to common types for field_dictionary in dictionary: if 'common-ref' in field_dictionary: for common in common_objects_dictionary: if common['type'] == 'TLV' and \ common['common-ref'] == field_dictionary['common-ref']: # Replace the reference with a copy of the common dictionary # If the source reference has prerequisites, add them to the copy copy = dict(common) if 'prerequisites' in field_dictionary: copy['prerequisites'] = field_dictionary['prerequisites'] # If an explicit 'since' is given in the field, prefer it over any other one if 'since' in field_dictionary: copy['since'] = field_dictionary['since'] # If the common type does not have any explicit 'since', take the one from the message # If the common type has a 'since', take it only if it is newer than the one from the message elif not 'since' in copy or utils.version_compare(copy['since'],self.since) > 0: copy['since'] = self.since new_dict.append(copy) break else: raise RuntimeError('Common type \'%s\' not found' % field_dictionary['name']) else: new_dict.append(field_dictionary) dictionary = new_dict # We need to sort the fields, so that the ones with prerequisites are # include after the prerequisites themselves. Note: we don't currently # support complex setups yet. sorted_dictionary = [] for field_dictionary in dictionary: if 'prerequisites' in field_dictionary: sorted_dictionary.append(field_dictionary) else: sorted_dictionary.insert(0, field_dictionary) # Then, really parse each field for field_dictionary in sorted_dictionary: if field_dictionary['type'] == 'TLV': if field_dictionary['format'] == 'sequence' and \ field_dictionary['name'] == 'Result': self.fields.append(FieldResult(self.service, self.fullname, field_dictionary, common_objects_dictionary, container_type, static)) else: self.fields.append(Field(self.service, self.fullname, field_dictionary, common_objects_dictionary, container_type, static)) """ Emit enumeration of TLVs in the container """ def __emit_tlv_ids_enum(self, f): if self.fields is None: return f.write('\n') for tlv in self.fields: translations = { 'enum_name' : tlv.id_enum_name, 'enum_value' : tlv.id } template = ( '#define ${enum_name} ${enum_value}\n') f.write(string.Template(template).substitute(translations)) """ Emit new container types """ def __emit_types(self, hfile, cfile, translations): translations['type_macro'] = 'QMI_TYPE_' + utils.remove_prefix(utils.build_underscore_uppercase_name(self.fullname), 'QMI_') # Emit types header template = '\n' if not self.static and self.service != 'CTL': template += ( '/**\n' ' * ${camelcase}:\n' ' *\n' ' * The #${camelcase} structure contains private data and should only be accessed\n' ' * using the provided API.\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( 'typedef struct _${camelcase} ${camelcase};\n' '${static}GType ${underscore}_get_type (void) G_GNUC_CONST;\n' '#define ${type_macro} (${underscore}_get_type ())\n') if self.compat: template += ( 'G_GNUC_INTERNAL\n' 'gpointer ${underscore}_get_compat_context (${camelcase} *self);\n' 'G_GNUC_INTERNAL\n' 'void ${underscore}_set_compat_context (\n' ' ${camelcase} *self,\n' ' gpointer compat_context,\n' ' GDestroyNotify compat_context_free);\n') hfile.write(string.Template(template).substitute(translations)) # Emit types source template = ( '\n' 'struct _${camelcase} {\n' ' volatile gint ref_count;\n') if self.compat: template += ( '\n' ' gpointer compat_context;\n' ' GDestroyNotify compat_context_free;\n') cfile.write(string.Template(template).substitute(translations)) if self.fields is not None: for field in self.fields: if field.variable is not None: translations['field_variable_name'] = field.variable_name translations['field_name'] = field.name template = ( '\n' ' /* ${field_name} */\n' ' gboolean ${field_variable_name}_set;\n') cfile.write(string.Template(template).substitute(translations)) field.emit_variable_declaration(cfile) cfile.write( '};\n') """ Emit container handling core implementation """ def __emit_core(self, hfile, cfile, translations): # Emit container core header template = '\n' if not self.static and self.service != 'CTL': template += ( '\n' '/**\n' ' * ${underscore}_ref:\n' ' * @self: a #${camelcase}.\n' ' *\n' ' * Atomically increments the reference count of @self by one.\n' ' *\n' ' * Returns: the new reference to @self.\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( '${static}${camelcase} *${underscore}_ref (${camelcase} *self);\n' '\n') if not self.static and self.service != 'CTL': template += ( '/**\n' ' * ${underscore}_unref:\n' ' * @self: a #${camelcase}.\n' ' *\n' ' * Atomically decrements the reference count of @self by one.\n' ' * If the reference count drops to 0, @self is completely disposed.\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( '${static}void ${underscore}_unref (${camelcase} *self);\n' 'G_DEFINE_AUTOPTR_CLEANUP_FUNC (${camelcase}, ${underscore}_unref)\n') if not self.readonly: if not self.static: template += ( '\n' '/**\n' ' * ${underscore}_new:\n' ' *\n' ' * Allocates a new #${camelcase}.\n' ' *\n' ' * Returns: the newly created #${camelcase}. The returned value should be freed with ${underscore}_unref().\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( '${static}${camelcase} *${underscore}_new (void);\n') if self.static: cfile.write(string.Template(template).substitute(translations)) else: hfile.write(string.Template(template).substitute(translations)) # Emit container core source template = ( '\n' '${static}GType\n' '${underscore}_get_type (void)\n' '{\n' ' static gsize g_define_type_id_initialized = 0;\n' '\n' ' if (g_once_init_enter (&g_define_type_id_initialized)) {\n' ' GType g_define_type_id =\n' ' g_boxed_type_register_static (g_intern_static_string ("${camelcase}"),\n' ' (GBoxedCopyFunc) ${underscore}_ref,\n' ' (GBoxedFreeFunc) ${underscore}_unref);\n' '\n' ' g_once_init_leave (&g_define_type_id_initialized, g_define_type_id);\n' ' }\n' '\n' ' return g_define_type_id_initialized;\n' '}\n' '\n' '${static}${camelcase} *\n' '${underscore}_ref (${camelcase} *self)\n' '{\n' ' g_return_val_if_fail (self != NULL, NULL);\n' '\n' ' g_atomic_int_inc (&self->ref_count);\n' ' return self;\n' '}\n' '\n' '${static}void\n' '${underscore}_unref (${camelcase} *self)\n' '{\n' ' g_return_if_fail (self != NULL);\n' '\n' ' if (g_atomic_int_dec_and_test (&self->ref_count)) {\n') if self.compat: template += ( ' if (self->compat_context && self->compat_context_free)\n' ' self->compat_context_free (self->compat_context);\n') if self.fields is not None: for field in self.fields: if field.variable is not None and field.variable.needs_dispose: template += field.variable.build_dispose(' ', 'self->' + field.variable_name) if field.variable.needs_compat_gir and self.service != 'CTL': template += field.variable.build_dispose_gir(' ', 'self->' + field.variable_name) template += ( ' g_slice_free (${camelcase}, self);\n' ' }\n' '}\n') if self.compat: template += ( 'gpointer\n' '${underscore}_get_compat_context (${camelcase} *self)\n' '{\n' ' g_return_val_if_fail (self != NULL, NULL);\n' '\n' ' return self->compat_context;\n' '}\n' '\n' 'void\n' '${underscore}_set_compat_context (\n' ' ${camelcase} *self,\n' ' gpointer compat_context,\n' ' GDestroyNotify compat_context_free)\n' '{\n' ' g_return_if_fail (self != NULL);\n' '\n' ' if (self->compat_context && self->compat_context_free)\n' ' self->compat_context_free (self->compat_context);\n' '\n' ' self->compat_context = compat_context;\n' ' self->compat_context_free = compat_context_free;\n' '}\n') cfile.write(string.Template(template).substitute(translations)) # _new() is only generated if the container is not readonly if self.readonly: return template = ( '\n' '${static}${camelcase} *\n' '${underscore}_new (void)\n' '{\n' ' ${camelcase} *self;\n' '\n' ' self = g_slice_new0 (${camelcase});\n' ' self->ref_count = 1;\n' ' return self;\n' '}\n') cfile.write(string.Template(template).substitute(translations)) """ Emit container implementation """ def emit(self, hfile, cfile): translations = { 'name' : self.name, 'camelcase' : utils.build_camelcase_name (self.fullname), 'underscore' : utils.build_underscore_name (self.fullname), 'since' : self.since, 'static' : 'static ' if self.static else '' } auxfile = cfile if self.static else hfile if self.fields is None: template = ('\n' '/* Note: no fields in the ${name} container */\n') auxfile.write(string.Template(template).substitute(translations)) cfile.write(string.Template(template).substitute(translations)) return # Emit the container and field types # Emit field getter/setter if self.fields is not None: for field in self.fields: field.emit_types(auxfile, cfile) self.__emit_types(auxfile, cfile, translations) # Emit TLV enums self.__emit_tlv_ids_enum(cfile) # Emit fields if self.fields is not None: for field in self.fields: field.emit_getter(auxfile, cfile) if not self.readonly: field.emit_setter(auxfile, cfile) # Emit the container core self.__emit_core(auxfile, cfile, translations) """ Add sections """ def add_sections(self, sections): if self.fields is None: return translations = { 'name' : self.name, 'camelcase' : utils.build_camelcase_name (self.fullname), 'underscore' : utils.build_underscore_name (self.fullname), 'type_macro' : 'QMI_TYPE_' + utils.remove_prefix(utils.build_underscore_uppercase_name(self.fullname), 'QMI_') } # Standard template = ( '${underscore}_get_type\n' '${type_macro}\n') sections['standard'] += string.Template(template).substitute(translations) # Private if self.compat: template = ( '${underscore}_get_compat_context\n' '${underscore}_set_compat_context\n') sections['private'] += string.Template(template).substitute(translations) # Public types template = ( '${camelcase}\n') sections['public-types'] += string.Template(template).substitute(translations) # Public methods template = '\n' if not self.readonly: template += ( '${underscore}_new\n') template += ( '${underscore}_ref\n' '${underscore}_unref\n') sections['public-methods'] += string.Template(template).substitute(translations) for field in self.fields: field.add_sections(sections) libqmi-1.35.2-dev/build-aux/qmi-codegen/Field.py000066400000000000000000000550111455567757300213440ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils import VariableFactory import TypeFactory """ The Field class takes care of handling Input and Output TLVs """ class Field: """ Constructor """ def __init__(self, service, prefix, dictionary, common_objects_dictionary, container_type, static): # The current QMI service self.service = service # The field prefix, usually the name of the Container, # e.g. "Qmi Message Ctl Something Output" self.prefix = prefix # The name of the specific field, e.g. "Result" self.name = dictionary['name'] # The specific TLV ID self.id = dictionary['id'] # Overridden mandatory field, the default is calculated from id self._mandatory = dictionary.get('mandatory') # The type, which must always be "TLV" self.type = dictionary['type'] # The container type, which must be either "Input" or "Output" self.container_type = container_type # Whether the whole field is internally used only self.static = static # Create the composed full name (prefix + name), # e.g. "Qmi Message Ctl Something Output Result" self.fullname = dictionary['fullname'] if 'fullname' in dictionary else self.prefix + ' ' + self.name # libqmi version where the message was introduced self.since = dictionary['since'] if 'since' in dictionary else None if self.since is None: raise ValueError('TLV ' + self.fullname + ' requires a "since" tag specifying the major version where it was introduced') # TLVs can no longer be structs, they must be sequences instead if dictionary['format'] == 'struct': raise ValueError('TLV ' + self.fullname + ' cannot have type "struct": use "sequence" instead') # Create our variable object self.variable = VariableFactory.create_variable(self.service, dictionary, self.fullname, self.container_type) # Create the variable name within the Container self.variable_name = 'arg_' + utils.build_underscore_name(self.name).lower() # Create the ID enumeration name self.id_enum_name = utils.build_underscore_name(self.prefix + ' TLV ' + self.name).upper() # Output Fields may have prerequisites self.prerequisites = [] if 'prerequisites' in dictionary: self.prerequisites = dictionary['prerequisites'] # First, look for references to common types for prerequisite_dictionary in self.prerequisites: if 'common-ref' in prerequisite_dictionary: for common in common_objects_dictionary: if common['type'] == 'prerequisite' and \ common['common-ref'] == prerequisite_dictionary['common-ref']: # Replace the reference with a copy of the common dictionary copy = dict(common) self.prerequisites.remove(prerequisite_dictionary) self.prerequisites.append(copy) break else: raise RuntimeError('Common type \'%s\' not found' % prerequisite_dictionary['name']) if 'personal-info' in dictionary: self.personal_info = True; else: self.personal_info = False; @property def mandatory(self): if self._mandatory is None: return int(self.id, 0) < 0x10 return self._mandatory == 'yes' """ Emit new types required by this field """ def emit_types(self, hfile, cfile): if not TypeFactory.is_type_emitted(self.fullname): TypeFactory.set_type_emitted(self.fullname) self.variable.emit_types(hfile, cfile, self.since, False) if self.variable.needs_compat_gir and self.service != 'CTL': self.variable.emit_types_gir(hfile, cfile, self.since) """ Common getter logic """ def emit_getter_common(self, hfile, cfile, dec, doc, imp, since, suffix_gir): translations = { 'name' : self.name, 'variable_name' : self.variable_name, 'variable_getter_dec' : dec, 'variable_getter_doc' : doc, 'variable_getter_imp' : imp, 'underscore' : utils.build_underscore_name(self.name), 'suffix_gir' : suffix_gir, 'prefix_camelcase' : utils.build_camelcase_name(self.prefix), 'prefix_underscore' : utils.build_underscore_name(self.prefix), 'since' : since, 'static' : 'static ' if self.static else '' } # Emit the getter header template = '\n' if not self.static and self.service != 'CTL': template += ( '\n' '/**\n') if self.variable.needs_compat_gir: # Rename the GIR specific method to the original method name, and # skip the original method completely if suffix_gir == '': template += ( ' * ${prefix_underscore}_get_${underscore}: (skip)\n') else: template += ( ' * ${prefix_underscore}_get_${underscore}${suffix_gir}: (rename-to ${prefix_underscore}_get_${underscore})\n') else: if suffix_gir != '': raise RuntimeError('GIR suffix given and variable does not need compat GIR support') template += ( ' * ${prefix_underscore}_get_${underscore}:\n') template += ( ' * @self: a #${prefix_camelcase}.\n' '${variable_getter_doc}' ' * @error: Return location for error or %NULL.\n' ' *\n' ' * Get the \'${name}\' field from @self.\n') if self.variable.needs_compat_gir: if suffix_gir != '': template += ( ' *\n' ' * Version of ${prefix_underscore}_get_${underscore}() using arrays of pointers to\n' ' * structs instead of arrays of structs, for easier binding in other languages.\n') template += ( ' *\n' ' * Returns: (skip): %TRUE if the field is found, %FALSE otherwise.\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( '${static}gboolean ${prefix_underscore}_get_${underscore}${suffix_gir} (\n' ' ${prefix_camelcase} *self,\n' '${variable_getter_dec}' ' GError **error);\n') hfile.write(string.Template(template).substitute(translations)) # Emit the getter source template = ( '\n' '${static}gboolean\n' '${prefix_underscore}_get_${underscore}${suffix_gir} (\n' ' ${prefix_camelcase} *self,\n' '${variable_getter_dec}' ' GError **error)\n' '{\n' ' g_return_val_if_fail (self != NULL, FALSE);\n' '\n' ' if (!self->${variable_name}_set) {\n' ' g_set_error (error,\n' ' QMI_CORE_ERROR,\n' ' QMI_CORE_ERROR_TLV_NOT_FOUND,\n' ' "Field \'${name}\' was not found in the message");\n' ' return FALSE;\n' ' }\n' '\n' '${variable_getter_imp}' '\n' ' return TRUE;\n' '}\n') cfile.write(string.Template(template).substitute(translations)) """ Emit the method responsible for declaring variable(s) for this TLV in the input/output container """ def emit_variable_declaration(self, cfile): template = self.variable.build_variable_declaration(' ', self.variable_name) cfile.write(template) if self.variable.needs_compat_gir and self.service != 'CTL': template = self.variable.build_variable_declaration_gir(' ', self.variable_name) cfile.write(template) """ Emit the method responsible for getting this TLV from the input/output container """ def emit_getter(self, hfile, cfile): input_variable_name = 'value_' + utils.build_underscore_name(self.name) dec = self.variable.build_getter_declaration(' ', input_variable_name) doc = self.variable.build_getter_documentation(' * ', input_variable_name) imp = self.variable.build_getter_implementation(' ', 'self->' + self.variable_name, input_variable_name) since = self.since self.emit_getter_common(hfile, cfile, dec, doc, imp, since, '') if self.variable.needs_compat_gir and self.service != 'CTL': input_variable_name = 'value_' + utils.build_underscore_name(self.name) dec = self.variable.build_getter_declaration_gir(' ', input_variable_name) doc = self.variable.build_getter_documentation_gir(' * ', input_variable_name) imp = self.variable.build_getter_implementation_gir(' ', 'self->' + self.variable_name, input_variable_name) since = self.since if utils.version_compare('1.32',self.since) > 0 else '1.32' self.emit_getter_common(hfile, cfile, dec, doc, imp, since, '_gir') """ Common setter logic """ def emit_setter_common(self, hfile, cfile, dec, doc, imp, since, suffix_gir): translations = { 'name' : self.name, 'variable_name' : self.variable_name, 'variable_setter_dec' : dec, 'variable_setter_doc' : doc, 'variable_setter_imp' : imp, 'underscore' : utils.build_underscore_name(self.name), 'prefix_camelcase' : utils.build_camelcase_name(self.prefix), 'prefix_underscore' : utils.build_underscore_name(self.prefix), 'since' : since, 'suffix_gir' : suffix_gir, 'static' : 'static ' if self.static else '' } # Emit the setter header template = '\n' if not self.static and self.service != 'CTL': template += ( '\n' '/**\n') if self.variable.needs_compat_gir: # Rename the GIR specific method to the original method name, and # skip the original method completely if suffix_gir == '': template += ( ' * ${prefix_underscore}_set_${underscore}: (skip)\n') else: template += ( ' * ${prefix_underscore}_set_${underscore}${suffix_gir}: (rename-to ${prefix_underscore}_set_${underscore})\n') else: if suffix_gir != '': raise RuntimeError('GIR suffix given and variable does not need compat GIR support') template += ( ' * ${prefix_underscore}_set_${underscore}:\n') template += ( ' * @self: a #${prefix_camelcase}.\n' '${variable_setter_doc}' ' * @error: Return location for error or %NULL.\n' ' *\n' ' * Set the \'${name}\' field in the message.\n' ' *\n' ' * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise.\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( '${static}gboolean ${prefix_underscore}_set_${underscore}${suffix_gir} (\n' ' ${prefix_camelcase} *self,\n' '${variable_setter_dec}' ' GError **error);\n') hfile.write(string.Template(template).substitute(translations)) # Emit the setter source template = ( '\n' '${static}gboolean\n' '${prefix_underscore}_set_${underscore}${suffix_gir} (\n' ' ${prefix_camelcase} *self,\n' '${variable_setter_dec}' ' GError **error)\n' '{\n' ' g_return_val_if_fail (self != NULL, FALSE);\n' '\n' '${variable_setter_imp}' ' self->${variable_name}_set = TRUE;\n' '\n' ' return TRUE;\n' '}\n') cfile.write(string.Template(template).substitute(translations)) """ Emit the method responsible for setting this TLV in the input/output container """ def emit_setter(self, hfile, cfile): input_variable_name = 'value_' + utils.build_underscore_name(self.name) dec = self.variable.build_setter_declaration(' ', input_variable_name) doc = self.variable.build_setter_documentation(' * ', input_variable_name) imp = self.variable.build_setter_implementation(' ', input_variable_name, 'self->' + self.variable_name) since = self.since self.emit_setter_common(hfile, cfile, dec, doc, imp, since, '') if self.variable.needs_compat_gir and self.service != 'CTL': input_variable_name = 'value_' + utils.build_underscore_name(self.name) dec = self.variable.build_setter_declaration_gir(' ', input_variable_name) doc = self.variable.build_setter_documentation_gir(' * ', input_variable_name) imp = self.variable.build_setter_implementation_gir(' ', input_variable_name, 'self->' + self.variable_name) since = self.since if utils.version_compare('1.32',self.since) > 0 else '1.32' self.emit_setter_common(hfile, cfile, dec, doc, imp, since, '_gir') """ Emit the code responsible for adding the TLV to the QMI message """ def emit_input_tlv_add(self, f, line_prefix): translations = { 'name' : self.name, 'tlv_id' : self.id_enum_name, 'variable_name' : self.variable_name, 'lp' : line_prefix } template = ( '${lp}gsize tlv_offset;\n' '\n' '${lp}if (!(tlv_offset = qmi_message_tlv_write_init (self, (guint8)${tlv_id}, error))) {\n' '${lp} g_prefix_error (error, "Cannot initialize TLV \'${name}\': ");\n' '${lp} return NULL;\n' '${lp}}\n' '\n') f.write(string.Template(template).substitute(translations)) # Now, write the contents of the variable into the buffer self.variable.emit_buffer_write(f, line_prefix, self.name, 'input->' + self.variable_name) template = ( '\n' '${lp}if (!qmi_message_tlv_write_complete (self, tlv_offset, error)) {\n' '${lp} g_prefix_error (error, "Cannot complete TLV \'${name}\': ");\n' '${lp} return NULL;\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) """ Emit the code responsible for checking prerequisites in output TLVs """ def emit_output_prerequisite_check(self, f, line_prefix): if self.prerequisites == []: f.write('%s/* No Prerequisites for field */\n' % line_prefix) return for prerequisite in self.prerequisites: translations = { 'lp' : line_prefix, 'prerequisite_field' : utils.build_underscore_name(prerequisite['field']), 'prerequisite_operation' : prerequisite['operation'], 'prerequisite_value' : prerequisite['value'] } template = ( '${lp}/* Prerequisite.... */\n' '${lp}if (!(self->arg_${prerequisite_field} ${prerequisite_operation} ${prerequisite_value}))\n' '${lp} break;\n') f.write(string.Template(template).substitute(translations)) """ Emit the code responsible for retrieving the TLV from the QMI message """ def emit_output_tlv_get(self, f, line_prefix): tlv_out = utils.build_underscore_name (self.fullname) + '_out' error = 'error' if self.mandatory else 'NULL' translations = { 'name' : self.name, 'container_underscore' : utils.build_underscore_name (self.prefix), 'tlv_out' : tlv_out, 'tlv_id' : self.id_enum_name, 'variable_name' : self.variable_name, 'lp' : line_prefix, 'error' : error } template = ( '${lp}gsize offset = 0;\n' '${lp}gsize init_offset;\n' '\n' '${lp}if ((init_offset = qmi_message_tlv_read_init (message, ${tlv_id}, NULL, ${error})) == 0) {\n') if self.mandatory: template += ( '${lp} g_prefix_error (${error}, "Couldn\'t get the mandatory ${name} TLV: ");\n' '${lp} ${container_underscore}_unref (self);\n' '${lp} return NULL;\n') else: template += ( '${lp} goto ${tlv_out};\n') template += ( '${lp}}\n') f.write(string.Template(template).substitute(translations)) # Now, read the contents of the buffer into the variable self.variable.emit_buffer_read(f, line_prefix, tlv_out, error, 'self->' + self.variable_name) template = ( '\n' '${lp}/* The remaining size of the buffer needs to be 0 if we successfully read the TLV */\n' '${lp}if ((offset = qmi_message_tlv_read_remaining_size (message, init_offset, offset)) > 0) {\n' '${lp} g_warning ("Left \'%" G_GSIZE_FORMAT "\' bytes unread when getting the \'${name}\' TLV", offset);\n' '${lp}}\n' '\n' '${lp}self->${variable_name}_set = TRUE;\n' '\n' '${tlv_out}:\n') if self.mandatory: template += ( '${lp}if (!self->${variable_name}_set) {\n' '${lp} ${container_underscore}_unref (self);\n' '${lp} return NULL;\n' '${lp}}\n') else: template += ( '${lp};\n') f.write(string.Template(template).substitute(translations)) """ Emit the method responsible for creating a printable representation of the TLV """ def emit_tlv_helpers(self, f): if TypeFactory.helpers_emitted(self.fullname): return TypeFactory.set_helpers_emitted(self.fullname) translations = { 'name' : self.name, 'tlv_id' : self.id_enum_name, 'underscore' : utils.build_underscore_name (self.fullname) } template = ( '\n' 'static gchar *\n' '${underscore}_get_printable (\n' ' QmiMessage *message,\n' ' const gchar *line_prefix)\n' '{\n' ' gsize offset = 0;\n' ' gsize init_offset;\n' ' GString *printable;\n' ' GError *error = NULL;\n' '\n' ' if ((init_offset = qmi_message_tlv_read_init (message, ${tlv_id}, NULL, NULL)) == 0)\n' ' return NULL;\n' '\n' ' printable = g_string_new ("");\n') f.write(string.Template(template).substitute(translations)) # Now, read the contents of the buffer into the printable representation self.variable.emit_get_printable(f, ' ', self.personal_info) template = ( '\n' ' if ((offset = qmi_message_tlv_read_remaining_size (message, init_offset, offset)) > 0)\n' ' g_string_append_printf (printable, "Additional unexpected \'%" G_GSIZE_FORMAT "\' bytes", offset);\n' '\n' 'out:\n' ' if (error) {\n' ' g_string_append_printf (printable, " ERROR: %s", error->message);\n' ' g_error_free (error);\n' ' }\n' ' return g_string_free (printable, FALSE);\n' '}\n') f.write(string.Template(template).substitute(translations)) """ Add sections """ def add_sections(self, sections): translations = { 'underscore' : utils.build_underscore_name(self.name), 'prefix_camelcase' : utils.build_camelcase_name(self.prefix), 'prefix_underscore' : utils.build_underscore_name(self.prefix) } if not TypeFactory.is_section_emitted(self.fullname): TypeFactory.set_section_emitted(self.fullname) self.variable.add_sections(sections) # Public methods template = ( '${prefix_underscore}_get_${underscore}\n') if self.variable.needs_compat_gir and self.service != 'CTL': template += ( '${prefix_underscore}_get_${underscore}_gir\n') if self.container_type == 'Input': template += ( '${prefix_underscore}_set_${underscore}\n') if self.variable.needs_compat_gir and self.service != 'CTL': template += ( '${prefix_underscore}_set_${underscore}_gir\n') sections['public-methods'] += string.Template(template).substitute(translations) libqmi-1.35.2-dev/build-aux/qmi-codegen/FieldResult.py000066400000000000000000000165771455567757300225610ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # import string import utils import TypeFactory from Field import Field """ The FieldResult class takes care of handling the common 'Result' TLV """ class FieldResult(Field): """ Emit the types required to the source file (they will not be exposed in the interface) """ def emit_types(self, hfile, cfile): if not TypeFactory.is_type_emitted(self.fullname): TypeFactory.set_type_emitted(self.fullname) self.variable.emit_types(cfile, cfile, self.since, True) """ Emit the method responsible for getting the Result TLV contents. This special TLV will have its own getter implementation, as we want to have proper GErrors built from the QMI result status/code. """ def emit_getter(self, hfile, cfile): translations = { 'variable_name' : self.variable_name, 'prefix_camelcase' : utils.build_camelcase_name(self.prefix), 'prefix_underscore' : utils.build_underscore_name(self.prefix), 'since' : self.since } # Emit the getter header template = '\n' if not self.static and self.service != 'CTL': template += ( '\n' '/**\n' ' * ${prefix_underscore}_get_result:\n' ' * @self: a ${prefix_camelcase}.\n' ' * @error: Return location for error or %NULL.\n' ' *\n' ' * Get the result of the QMI operation.\n' ' *\n' ' * Returns: (skip): %TRUE if the QMI operation succeeded, %FALSE if @error is set.\n' ' *\n' ' * Since: ${since}\n' ' */\n') template += ( 'gboolean ${prefix_underscore}_get_result (\n' ' ${prefix_camelcase} *self,\n' ' GError **error);\n') hfile.write(string.Template(template).substitute(translations)) # Emit the getter source template = ( '\n' 'gboolean\n' '${prefix_underscore}_get_result (\n' ' ${prefix_camelcase} *self,\n' ' GError **error)\n' '{\n' ' g_return_val_if_fail (self != NULL, FALSE);\n' '\n' ' /* We should always have a result set in the response message */\n' ' if (!self->${variable_name}_set) {\n' ' g_set_error (error,\n' ' QMI_CORE_ERROR,\n' ' QMI_CORE_ERROR_INVALID_MESSAGE,\n' ' "No \'Result\' field given in the message");\n' ' return FALSE;\n' ' }\n' '\n' ' if (self->${variable_name}_error_status == QMI_STATUS_SUCCESS) {\n' ' /* Operation succeeded */\n' ' return TRUE;\n' ' }\n' '\n' ' /* Report a QMI protocol error */\n' ' g_set_error (error,\n' ' QMI_PROTOCOL_ERROR,\n' ' (QmiProtocolError) self->${variable_name}_error_code,\n' ' "QMI protocol error (%u): \'%s\'",\n' ' self->${variable_name}_error_code,\n' ' qmi_protocol_error_get_string ((QmiProtocolError) self->${variable_name}_error_code));\n' ' return FALSE;\n' '}\n') cfile.write(string.Template(template).substitute(translations)) """ Emit the method responsible for getting a printable representation of this TLV field. """ def emit_tlv_helpers(self, f): if TypeFactory.helpers_emitted(self.fullname): return TypeFactory.set_helpers_emitted(self.fullname) translations = { 'name' : self.name, 'tlv_id' : self.id_enum_name, 'underscore' : utils.build_underscore_name (self.fullname) } template = ( '\n' 'static gboolean\n' '${underscore}_validate (\n' ' const guint8 *buffer,\n' ' guint16 buffer_len)\n' '{\n' ' static const guint expected_len = 4;\n' '\n' ' if (buffer_len < expected_len) {\n' ' g_warning ("Cannot read the \'${name}\' TLV: expected \'%u\' bytes, but only got \'%u\' bytes",\n' ' expected_len, buffer_len);\n' ' return FALSE;\n' ' }\n' '\n' ' return TRUE;\n' '}\n') f.write(string.Template(template).substitute(translations)) template = ( '\n' 'static gchar *\n' '${underscore}_get_printable (\n' ' QmiMessage *self,\n' ' const gchar *line_prefix)\n' '{\n' ' gsize offset = 0;\n' ' gsize init_offset;\n' ' guint16 error_status;\n' ' guint16 error_code;\n' '\n' ' if ((init_offset = qmi_message_tlv_read_init (self, ${tlv_id}, NULL, NULL)) == 0)\n' ' return NULL;\n' ' if (!qmi_message_tlv_read_guint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &error_status, NULL))\n' ' return NULL;\n' ' if (!qmi_message_tlv_read_guint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &error_code, NULL))\n' ' return NULL;\n' ' g_warn_if_fail (qmi_message_tlv_read_remaining_size (self, init_offset, offset) == 0);\n' '\n' ' if (error_status == QMI_STATUS_SUCCESS)\n' ' return g_strdup ("SUCCESS");\n' '\n' ' return g_strdup_printf ("FAILURE: %s", qmi_protocol_error_get_string ((QmiProtocolError) error_code));\n' '}\n') f.write(string.Template(template).substitute(translations)) """ Add sections """ def add_sections(self, sections): translations = { 'underscore' : utils.build_underscore_name(self.name), 'prefix_camelcase' : utils.build_camelcase_name(self.prefix), 'prefix_underscore' : utils.build_underscore_name(self.prefix) } # Public methods template = ( '${prefix_underscore}_get_${underscore}\n') sections['public-methods'] += string.Template(template).substitute(translations) libqmi-1.35.2-dev/build-aux/qmi-codegen/Message.py000066400000000000000000000607041455567757300217120ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils from Container import Container """ The Message class takes care of request/response message handling """ class Message: """ Constructor """ def __init__(self, dictionary, common_objects_dictionary): # Validate input fields in the dictionary, and only allow those # explicitly expected. for message_key in dictionary: if message_key not in [ "name", "type", "service", "id", "since", "input", "output", "vendor", "scope", "abort", "output-compat", "input-compat" ]: raise ValueError('Invalid message field: "' + message_key + '"') # The message service, e.g. "Ctl" self.service = dictionary['service'] # The name of the specific message, e.g. "Something" self.name = dictionary['name'] # The specific message ID self.id = dictionary['id'] # The type, which must always be 'Message' or 'Indication' self.type = dictionary['type'] self.static = True if 'scope' in dictionary and dictionary['scope'] == 'library-only' else False self.abort = True if 'abort' in dictionary and dictionary['abort'] == 'yes' else False # libqmi version where the message was introduced self.since = dictionary['since'] if 'since' in dictionary else None if self.since is None: raise ValueError('Message ' + self.name + ' requires a "since" tag specifying the major version where it was introduced') # The vendor id if this command is vendor specific self.vendor = dictionary['vendor'] if 'vendor' in dictionary else None if self.type == 'Indication' and self.vendor is not None: raise ValueError('Vendor-specific indications unsupported') # The message prefix self.prefix = 'Qmi ' + self.type # Create the composed full name (prefix + service + name), # e.g. "Qmi Message Ctl Something" self.fullname = self.prefix + ' ' + self.service + ' ' + self.name # Create the ID enumeration name self.id_enum_name = utils.build_underscore_name(self.fullname).upper() # Create the build symbol name self.build_symbol = 'HAVE_' + self.id_enum_name # Build output container. # Every defined message will have its own output container, which # will generate a new Output type and public getters for each output # field. This applies to both Request/Response and Indications. # Output containers are actually optional in Indications self.output_compat = True if 'output-compat' in dictionary and dictionary['output-compat'] == 'yes' else False self.output = Container(self.service, self.fullname, 'Output', dictionary['output'] if 'output' in dictionary else None, common_objects_dictionary, self.static, self.since, self.output_compat) self.input = None if self.type == 'Message': # Build input container (Request/Response only). # Every defined message will have its own input container, which # will generate a new Input type and public getters for each input # field self.input_compat = True if 'input-compat' in dictionary and dictionary['input-compat'] == 'yes' else False self.input = Container(self.service, self.fullname, 'Input', dictionary['input'] if 'input' in dictionary else None, common_objects_dictionary, self.static, self.since, self.input_compat) """ Emit method responsible for creating a new request of the given type """ def __emit_request_creator(self, hfile, cfile): translations = { 'name' : self.name, 'service' : self.service, 'container' : utils.build_camelcase_name (self.input.fullname), 'underscore' : utils.build_underscore_name (self.fullname), 'message_id' : self.id_enum_name } input_arg_template = 'gpointer unused' if self.input.fields is None else '${container} *input' template = ( '\n' 'static QmiMessage *\n' '__${underscore}_request_create (\n' ' guint16 transaction_id,\n' ' guint8 cid,\n' ' %s,\n' ' GError **error)\n' '{\n' ' g_autoptr(QmiMessage) self = NULL;\n' '\n' ' self = qmi_message_new (QMI_SERVICE_${service},\n' ' cid,\n' ' transaction_id,\n' ' ${message_id});\n' % input_arg_template) cfile.write(string.Template(template).substitute(translations)) if self.input.fields: # Count how many mandatory fields we have n_mandatory = 0 for field in self.input.fields: if field.mandatory: n_mandatory += 1 if n_mandatory == 0: # If we don't have mandatory fields, we do allow to have # a NULL input cfile.write( '\n' ' /* All TLVs are optional, we allow NULL input */\n' ' if (!input)\n' ' return g_steal_pointer (&self);\n') else: # If we do have mandatory fields, issue error if no input # given. template = ( '\n' ' /* There is at least one mandatory TLV, don\'t allow NULL input */\n' ' if (!input) {\n' ' g_set_error (error,\n' ' QMI_CORE_ERROR,\n' ' QMI_CORE_ERROR_INVALID_ARGS,\n' ' "Message \'${name}\' has mandatory TLVs");\n' ' return NULL;\n' ' }\n') cfile.write(string.Template(template).substitute(translations)) # Now iterate fields for field in self.input.fields: translations['tlv_name'] = field.name translations['variable_name'] = field.variable_name template = ( '\n' ' /* Try to add the \'${tlv_name}\' TLV */\n' ' if (input->${variable_name}_set) {\n') cfile.write(string.Template(template).substitute(translations)) # Emit the TLV getter field.emit_input_tlv_add(cfile, ' ') if field.mandatory: template = ( ' } else {\n' ' g_set_error (error,\n' ' QMI_CORE_ERROR,\n' ' QMI_CORE_ERROR_INVALID_ARGS,\n' ' "Missing mandatory TLV \'${tlv_name}\' in message \'${name}\'");\n' ' return NULL;\n') cfile.write(string.Template(template).substitute(translations)) cfile.write( ' }\n') cfile.write( '\n' ' return g_steal_pointer (&self);\n' '}\n') """ Emit method responsible for parsing a response/indication of the given type """ def __emit_response_or_indication_parser(self, hfile, cfile): # If no output fields to parse, don't emit anything if self.output is None or self.output.fields is None: return translations = { 'name' : self.name, 'type' : 'response' if self.type == 'Message' else 'indication', 'method_prefix' : '__' if self.static else '', 'method_scope' : 'static ' if self.static else '', 'since' : self.since if utils.version_compare('1.34',self.since) > 0 else '1.34', 'container' : utils.build_camelcase_name (self.output.fullname), 'container_underscore' : utils.build_underscore_name (self.output.fullname), 'underscore' : utils.build_underscore_name (self.fullname), 'message_id' : self.id_enum_name } if not self.static: template = ( '\n' '/**\n' ' * ${method_prefix}${underscore}_${type}_parse:\n' ' * @message: a #QmiMessage.\n' ' * @error: return location for error or %NULL.\n' ' *\n' ' * Parses a #QmiMessage and builds a #${container} out of it.\n' ' * The operation fails if the message is of the wrong type.\n' ' *\n' ' * Returns: a #${container}, or %NULL if @error is set. The returned value should be freed with ${container_underscore}_unref().\n' ' *\n' ' * Since: ${since}\n' ' */\n' '${container} *${method_prefix}${underscore}_${type}_parse (\n' ' QmiMessage *message,\n' ' GError **error);\n') hfile.write(string.Template(template).substitute(translations)) template = ( '\n' '${method_scope}${container} *\n' '${method_prefix}${underscore}_${type}_parse (\n' ' QmiMessage *message,\n' ' GError **error)\n' '{\n' ' ${container} *self;\n' '\n' ' g_assert_cmphex (qmi_message_get_message_id (message), ==, ${message_id});\n' '\n' ' self = g_slice_new0 (${container});\n' ' self->ref_count = 1;\n') cfile.write(string.Template(template).substitute(translations)) for field in self.output.fields: cfile.write( '\n' ' do {\n') field.emit_output_prerequisite_check(cfile, ' ') cfile.write( '\n' ' {\n') field.emit_output_tlv_get(cfile, ' ') cfile.write( '\n' ' }\n') cfile.write( ' } while (0);\n') cfile.write( '\n' ' return self;\n' '}\n') """ Emit method responsible for getting a printable representation of the whole request/response """ def __emit_helpers(self, hfile, cfile): need_tlv_printable = False if self.input is not None and self.input.fields is not None: need_tlv_printable = True for field in self.input.fields: field.emit_tlv_helpers(cfile) if self.output is not None and self.output.fields is not None: need_tlv_printable = True for field in self.output.fields: field.emit_tlv_helpers(cfile) translations = { 'name' : self.name, 'service' : self.service, 'id' : self.id, 'type' : utils.build_underscore_name(self.type), 'underscore' : utils.build_underscore_name(self.name) } template = '' if need_tlv_printable: template += ( '\n' 'struct ${type}_${underscore}_context {\n' ' QmiMessage *self;\n' ' const gchar *line_prefix;\n' ' GString *printable;\n' '};\n' '\n' 'static void\n' '${type}_${underscore}_get_tlv_printable (\n' ' guint8 type,\n' ' const guint8 *value,\n' ' gsize length,\n' ' struct ${type}_${underscore}_context *ctx)\n' '{\n' ' const gchar *tlv_type_str = NULL;\n' ' g_autofree gchar *translated_value = NULL;\n' ' gboolean value_has_personal_info = FALSE;\n' '\n') if self.type == 'Message': template += ( ' if (!qmi_message_is_response (ctx->self)) {\n' ' switch (type) {\n') if self.input is not None and self.input.fields is not None: for field in self.input.fields: translations['underscore_field'] = utils.build_underscore_name(field.fullname) translations['field_enum'] = field.id_enum_name translations['field_name'] = field.name field_template = ( ' case ${field_enum}:\n' ' tlv_type_str = "${field_name}";\n' ' translated_value = ${underscore_field}_get_printable (\n' ' ctx->self,\n' ' ctx->line_prefix);\n') if field.variable is not None and field.variable.contains_personal_info: field_template += ( ' value_has_personal_info = TRUE;\n') field_template += ( ' break;\n') template += string.Template(field_template).substitute(translations) template += ( ' default:\n' ' break;\n' ' }\n' ' } else {\n') else: template += (' {\n') template += (' switch (type) {\n') if self.output is not None and self.output.fields is not None: for field in self.output.fields: translations['underscore_field'] = utils.build_underscore_name(field.fullname) translations['field_enum'] = field.id_enum_name translations['field_name'] = field.name field_template = ( ' case ${field_enum}:\n' ' tlv_type_str = "${field_name}";\n' ' translated_value = ${underscore_field}_get_printable (\n' ' ctx->self,\n' ' ctx->line_prefix);\n') if field.variable is not None and field.variable.contains_personal_info: field_template += ( ' value_has_personal_info = TRUE;\n') field_template += ( ' break;\n') template += string.Template(field_template).substitute(translations) template += ( ' default:\n' ' break;\n' ' }\n' ' }\n' '\n' ' if (!tlv_type_str) {\n' ' g_autofree gchar *value_str = NULL;\n' '\n' ' value_str = qmi_message_get_tlv_printable (ctx->self,\n' ' ctx->line_prefix,\n' ' type,\n' ' value,\n' ' length);\n' ' g_string_append (ctx->printable, value_str);\n' ' } else {\n' ' g_autofree gchar *value_hex = NULL;\n' '\n' ' if (qmi_utils_get_show_personal_info () || !value_has_personal_info)\n' ' value_hex = qmi_helpers_str_hex (value, length, \':\');\n' ' else\n' ' value_hex = g_strdup ("###...");\n' '\n' ' g_string_append_printf (ctx->printable,\n' ' "%sTLV:\\n"\n' ' "%s type = \\"%s\\" (0x%02x)\\n"\n' ' "%s length = %" G_GSIZE_FORMAT "\\n"\n' ' "%s value = %s\\n"\n' ' "%s translated = %s\\n",\n' ' ctx->line_prefix,\n' ' ctx->line_prefix, tlv_type_str, type,\n' ' ctx->line_prefix, length,\n' ' ctx->line_prefix, value_hex,\n' ' ctx->line_prefix, translated_value ? translated_value : "");\n' ' }\n' '}\n') template += ( '\n' 'static gchar *\n' '${type}_${underscore}_get_printable (\n' ' QmiMessage *self,\n' ' const gchar *line_prefix)\n' '{\n' ' GString *printable;\n' '\n' ' printable = g_string_new ("");\n' ' g_string_append_printf (printable,\n' ' "%s message = \\\"${name}\\\" (${id})\\n",\n' ' line_prefix);\n') if need_tlv_printable: template += ( '\n' ' {\n' ' struct ${type}_${underscore}_context ctx;\n' ' ctx.self = self;\n' ' ctx.line_prefix = line_prefix;\n' ' ctx.printable = printable;\n' ' qmi_message_foreach_raw_tlv (self,\n' ' (QmiMessageForeachRawTlvFn)${type}_${underscore}_get_tlv_printable,\n' ' &ctx);\n' ' }\n') template += ( '\n' ' return g_string_free (printable, FALSE);\n' '}\n') cfile.write(string.Template(template).substitute(translations)) """ Emit request/response/indication handling implementation """ def emit(self, hfile, cfile): if self.type == 'Message': utils.add_separator(hfile, 'REQUEST/RESPONSE', self.fullname); utils.add_separator(cfile, 'REQUEST/RESPONSE', self.fullname); else: utils.add_separator(hfile, 'INDICATION', self.fullname); utils.add_separator(cfile, 'INDICATION', self.fullname); if not self.static and self.service != 'CTL': translations = { 'hyphened' : utils.build_dashed_name (self.fullname), 'fullname' : self.service + ' ' + self.name, 'type' : 'response' if self.type == 'Message' else 'indication', 'operation' : 'create requests and parse responses' if self.type == 'Message' else 'parse indications' } template = ( '\n' '/**\n' ' * SECTION: ${hyphened}\n' ' * @title: ${fullname} ${type}\n' ' * @short_description: Methods to manage the ${fullname} ${type}.\n' ' *\n' ' * Collection of methods to ${operation} of the ${fullname} message.\n' ' */\n') hfile.write(string.Template(template).substitute(translations)) if self.type == 'Message': hfile.write('\n/* --- Input -- */\n'); cfile.write('\n/* --- Input -- */\n'); self.input.emit(hfile, cfile) self.__emit_request_creator(hfile, cfile) hfile.write('\n/* --- Output -- */\n'); cfile.write('\n/* --- Output -- */\n'); self.output.emit(hfile, cfile) self.__emit_helpers(hfile, cfile) self.__emit_response_or_indication_parser(hfile, cfile) """ Emit the sections """ def emit_sections(self, sfile): if self.static: return translations = { 'hyphened' : utils.build_dashed_name (self.fullname), 'fullname_underscore' : utils.build_underscore_name(self.fullname), 'camelcase' : utils.build_camelcase_name (self.fullname), 'service' : utils.build_underscore_name (self.service), 'name_underscore' : utils.build_underscore_name (self.name), 'build_symbol' : self.build_symbol, 'fullname' : self.service + ' ' + self.name, 'type' : 'response' if self.type == 'Message' else 'indication' } sections = { 'public-types' : '', 'public-methods' : '', 'standard' : '', 'private' : '' } if self.input: self.input.add_sections (sections) self.output.add_sections (sections) if self.type == 'Message': template = '' if not self.static and self.output is not None and self.output.fields is not None: template += ( '\n' 'qmi_message_${service}_${name_underscore}_response_parse\n') template += ( '\n' 'qmi_client_${service}_${name_underscore}\n' 'qmi_client_${service}_${name_underscore}_finish\n') sections['public-methods'] += string.Template(template).substitute(translations) translations['message_type'] = 'request' elif self.type == 'Indication': if not self.static and self.output is not None and self.output.fields is not None: template = ( '\n' 'qmi_indication_${service}_${name_underscore}_indication_parse\n') sections['public-methods'] += string.Template(template).substitute(translations) translations['message_type'] = 'indication' translations['public_types'] = sections['public-types'] translations['public_methods'] = sections['public-methods'] translations['standard'] = sections['standard'] translations['private'] = sections['private'] template = ( '
\n' '${hyphened}\n' '${public_types}' '${public_methods}' '\n' '${build_symbol}\n' '${private}' '\n' '${standard}' '
\n' '\n') sfile.write(string.Template(template).substitute(translations)) libqmi-1.35.2-dev/build-aux/qmi-codegen/MessageList.py000066400000000000000000000342041455567757300225420ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # import string from Message import Message import utils """ The MessageList class handles the generation of all messages for a given specific service """ class MessageList: """ Constructor """ def __init__(self, collection, objects_dictionary, common_objects_dictionary): # known requests enabled by the collection self.request_list = [] # known indications enabled by the collection self.indication_list = [] # known requests and indications disabled by the collection self.unsupported_list = [] self.message_id_enum_name = None self.indication_id_enum_name = None self.service = None # Loop items in the list, creating Message objects for the messages # and looking for the special 'Message-ID-Enum' type for object_dictionary in objects_dictionary: if object_dictionary['type'] == 'Message' or \ object_dictionary['type'] == 'Indication': message = Message(object_dictionary, common_objects_dictionary) if collection is None or message.id_enum_name in collection: if message.type == 'Message': self.request_list.append(message) else: self.indication_list.append(message) else: self.unsupported_list.append(message) elif object_dictionary['type'] == 'Message-ID-Enum': self.message_id_enum_name = object_dictionary['name'] elif object_dictionary['type'] == 'Indication-ID-Enum': self.indication_id_enum_name = object_dictionary['name'] elif object_dictionary['type'] == 'Service': self.service = object_dictionary['name'] # We NEED the Message-ID-Enum field if self.message_id_enum_name is None: raise ValueError('Missing Message-ID-Enum field') # We NEED the Service field if self.service is None: raise ValueError('Missing Service field') self.request_prefix = utils.build_underscore_name("Qmi Request " + self.service).upper() self.indication_prefix = utils.build_underscore_name("Qmi Indication " + self.service).upper() def __emit_message_build_symbols(self, f): template = '' for message in self.request_list: translations = { 'build_symbol' : message.build_symbol } message_template = '#define ${build_symbol}\n' template += string.Template(message_template).substitute(translations) for message in self.indication_list: translations = { 'build_symbol' : message.build_symbol } message_template = '#define ${build_symbol}\n' template += string.Template(message_template).substitute(translations) if len(self.unsupported_list) > 0: template += ( '\n' '/* messages unsupported in collection */\n') for message in self.unsupported_list: translations = { 'build_symbol' : message.build_symbol } message_template = '/* ${build_symbol} */\n' template += string.Template(message_template).substitute(translations) f.write(string.Template(template).substitute(translations)) """ Emit the enumeration of the messages found in the specific service """ def __emit_message_ids_enum(self, f): # do nothing if nothing in the supported messages list if len(self.request_list) == 0: return translations = { 'enum_type' : utils.build_camelcase_name (self.message_id_enum_name) } template = ( '\n' 'typedef enum {\n') for message in self.request_list: translations['enum_name'] = message.id_enum_name translations['enum_value'] = message.id if message.vendor is None: enum_template = ( ' ${enum_name} = ${enum_value},\n') else: translations['vendor'] = message.vendor enum_template = ( ' ${enum_name} = ${enum_value}, /* vendor ${vendor} */\n') template += string.Template(enum_template).substitute(translations) template += ( '} ${enum_type};\n' '\n') f.write(string.Template(template).substitute(translations)) """ Emit the enumeration of the indications found in the specific service """ def __emit_indication_ids_enum(self, f): # do nothing if nothing in the supported indications list if len(self.indication_list) == 0: return translations = { 'enum_type' : utils.build_camelcase_name (self.indication_id_enum_name) } template = ( '\n' 'typedef enum {\n') for message in self.indication_list: translations['enum_name'] = message.id_enum_name translations['enum_value'] = message.id enum_template = ( ' ${enum_name} = ${enum_value},\n') template += string.Template(enum_template).substitute(translations) template += ( '} ${enum_type};\n' '\n') f.write(string.Template(template).substitute(translations)) """ Emit the method responsible for getting a printable representation of all messages of a given service. """ def __emit_get_printable(self, hfile, cfile): translations = { 'service' : self.service.lower() } template = ( '\n' '#if defined (LIBQMI_GLIB_COMPILATION)\n' '\n' 'G_GNUC_INTERNAL\n' 'gchar *__qmi_message_${service}_get_printable (\n' ' QmiMessage *self,\n' ' QmiMessageContext *context,\n' ' const gchar *line_prefix);\n' '\n' '#endif\n' '\n') hfile.write(string.Template(template).substitute(translations)) template = ( '\n' 'gchar *\n' '__qmi_message_${service}_get_printable (\n' ' QmiMessage *self,\n' ' QmiMessageContext *context,\n' ' const gchar *line_prefix)\n' '{\n' ' if (qmi_message_is_indication (self)) {\n' ' switch (qmi_message_get_message_id (self)) {\n') for message in self.indication_list: translations['enum_name'] = message.id_enum_name translations['message_underscore'] = utils.build_underscore_name (message.name) inner_template = ( ' case ${enum_name}:\n' ' return indication_${message_underscore}_get_printable (self, line_prefix);\n') template += string.Template(inner_template).substitute(translations) template += ( ' default:\n' ' return NULL;\n' ' }\n' ' } else {\n' ' guint16 vendor_id;\n' '\n' ' vendor_id = (context ? qmi_message_context_get_vendor_id (context) : QMI_MESSAGE_VENDOR_GENERIC);\n' ' if (vendor_id == QMI_MESSAGE_VENDOR_GENERIC) {\n' ' switch (qmi_message_get_message_id (self)) {\n') for message in self.request_list: if message.vendor is None: translations['enum_name'] = message.id_enum_name translations['message_underscore'] = utils.build_underscore_name (message.name) inner_template = ( ' case ${enum_name}:\n' ' return message_${message_underscore}_get_printable (self, line_prefix);\n') template += string.Template(inner_template).substitute(translations) template += ( ' default:\n' ' return NULL;\n' ' }\n' ' } else {\n') for message in self.request_list: if message.vendor is not None: translations['enum_name'] = message.id_enum_name translations['message_underscore'] = utils.build_underscore_name (message.name) translations['message_vendor'] = message.vendor inner_template = ( ' if (vendor_id == ${message_vendor} && (qmi_message_get_message_id (self) == ${enum_name}))\n' ' return message_${message_underscore}_get_printable (self, line_prefix);\n') template += string.Template(inner_template).substitute(translations) template += ( ' return NULL;\n' ' }\n' ' }\n' '}\n') cfile.write(string.Template(template).substitute(translations)) """ Emit the method responsible for checking whether a given message is abortable """ def __emit_is_abortable(self, hfile, cfile): # do nothing if no abortable messages in service for message in self.request_list: if message.abort: break else: return translations = { 'service' : self.service.lower() } template = ( '\n' '#if defined (LIBQMI_GLIB_COMPILATION)\n' '\n' 'G_GNUC_INTERNAL\n' 'gboolean __qmi_message_${service}_is_abortable (\n' ' QmiMessage *self,\n' ' QmiMessageContext *context);\n' '\n' '#endif\n' '\n') hfile.write(string.Template(template).substitute(translations)) template = ( '\n' 'gboolean\n' '__qmi_message_${service}_is_abortable (\n' ' QmiMessage *self,\n' ' QmiMessageContext *context)\n' '{\n' ' guint16 vendor_id;\n' '\n' ' vendor_id = (context ? qmi_message_context_get_vendor_id (context) : QMI_MESSAGE_VENDOR_GENERIC);\n' ' if (vendor_id == QMI_MESSAGE_VENDOR_GENERIC) {\n' ' switch (qmi_message_get_message_id (self)) {\n') for message in self.request_list: if message.vendor is None and message.abort: translations['enum_name'] = message.id_enum_name inner_template = ( ' case ${enum_name}:\n' ' return TRUE;\n') template += string.Template(inner_template).substitute(translations) template += ( ' default:\n' ' return FALSE;\n' ' }\n' ' } else {\n') for message in self.request_list: if message.vendor is not None and message.abort: translations['enum_name'] = message.id_enum_name translations['message_vendor'] = message.vendor inner_template = ( ' if (vendor_id == ${message_vendor} && (qmi_message_get_message_id (self) == ${enum_name})) {\n' ' return TRUE;\n' ' }\n') template += string.Template(inner_template).substitute(translations) template += ( ' return FALSE;\n' ' }\n' '}\n') cfile.write(string.Template(template).substitute(translations)) """ Emit the message list handling implementation """ def emit(self, hfile, cfile): # Always write build symbols, even for unsupported messages self.__emit_message_build_symbols(hfile) # Do nothing else if nothing in the supported lists if len(self.indication_list) == 0 and len(self.request_list) == 0: return # Emit the message/indication IDs enum and the build symbols self.__emit_message_ids_enum(cfile) if self.indication_id_enum_name is not None: self.__emit_indication_ids_enum(cfile) # Then, emit all message handlers for message in self.indication_list: message.emit(hfile, cfile) for message in self.request_list: message.emit(hfile, cfile) # First, emit common class code utils.add_separator(hfile, 'Service-specific utils', self.service); utils.add_separator(cfile, 'Service-specific utils', self.service); self.__emit_get_printable(hfile, cfile) self.__emit_is_abortable(hfile, cfile) """ Emit the sections """ def emit_sections(self, sfile): # do nothing if nothing in the supported lists if len(self.indication_list) == 0 and len(self.request_list) == 0: return # Emit all message sections for message in self.indication_list: message.emit_sections(sfile) for message in self.request_list: message.emit_sections(sfile) """ Check whether a given message exists in the list """ def contains(self, message_id_enum_name): for message in self.request_list: if message.id_enum_name == message_id_enum_name: return True for message in self.indication_list: if message.id_enum_name == message_id_enum_name: return True return False libqmi-1.35.2-dev/build-aux/qmi-codegen/TypeFactory.py000066400000000000000000000047741455567757300226040ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # """ List to keep track of types already emitted to the source/header files. """ emitted_types = [] """ Checks whether a given type has already been emitted. """ def is_type_emitted(type_name): for i in emitted_types: if i == type_name: return True else: return False """ Sets the given type as already emitted. """ def set_type_emitted(type_name): if is_type_emitted(type_name): return False else: emitted_types.append(type_name) return True """ List to keep track of type-specific helper methods already emitted to the source/header files. """ emitted_helpers = [] """ Checks whether a given type-specific helpers have already been emitted. """ def helpers_emitted(type_name): for i in emitted_helpers: if i == type_name: return True else: return False """ Sets the given type-specific get_printable() as already emitted. """ def set_helpers_emitted(type_name): if helpers_emitted(type_name): return False else: emitted_helpers.append(type_name) return True """ List to keep track of sections already emitted to the source/header files. """ emitted_sections = [] """ Checks whether a given section has already been emitted. """ def is_section_emitted(section_name): for i in emitted_sections: if i == section_name: return True else: return False """ Sets the given section as already emitted. """ def set_section_emitted(section_name): if is_section_emitted(section_name): return False else: emitted_sections.append(section_name) return True libqmi-1.35.2-dev/build-aux/qmi-codegen/Variable.py000066400000000000000000000237571455567757300220620ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils """ Base class for every variable type defined in the database """ class Variable: """ Constructor with common variable handling """ def __init__(self, service, dictionary): """ The current QMI service """ self.service = service """ Variables can define specific public and private formats to be used. The public format will be that used in the generated interface file, while the private one will only be used internally. """ self.format = dictionary['format'] self.public_format = None self.private_format = None """ Element type to be used in introspection annotations. """ self.element_type = None """ Whether the variable is visible in public API or is reserved """ self.visible = False if ('visible' in dictionary and dictionary['visible'] == 'no') else True """ Variables that get allocated in heap need to get properly disposed. """ self.needs_dispose = False """ Variables that get allocated in heap need to have a clear method so that it can be used as part of an array of this variable type. """ self.clear_method = '' """ Custom endianness configuration for a specific variable; if none given, defaults to host endian. """ self.endian = "QMI_ENDIAN_LITTLE" if 'endian' in dictionary: endian = dictionary['endian'] if endian == 'network' or endian == 'big': self.endian = "QMI_ENDIAN_BIG" elif endian == 'little': pass else: raise ValueError("Invalid endian value %s" % endian) """ Initially all variables are flagged as not being public """ self.public = False # ----------------------------------------------------------------------------- # Variables to support the new GIR array/struct compat methods in 1.32 """ Flag specifying whether a given variable contains any kind of array, indicating the GIR array/struct compat methods in 1.32 are required. There is no need to flag structs independently, because it is ensured that structs are always array members. """ self.needs_compat_gir = False """ Formats and element types """ self.public_format_gir = None self.private_format_gir = None self.element_type_gir = None """ Types involved in GIR support may need additional free() and new() methods. """ self.new_method_gir = '' self.free_method_gir = '' """ Whether the variable is personal info or not """ if 'personal-info' in dictionary: self.personal_info = True; else: self.personal_info = False; """ Whether the variable contains personal info or not """ self.contains_personal_info = self.personal_info """ Emits the code to declare specific new types required by the variable. """ def emit_types(self, hfile, cfile, since, static): pass """ Emits the code involved in reading the variable from the raw byte stream into the specific private format. """ def emit_buffer_read(self, f, line_prefix, tlv_out, error, variable_name): pass """ Emits the code involved in writing the variable to the raw byte stream from the specific private format. """ def emit_buffer_write(self, f, line_prefix, tlv_name, variable_name): pass """ Emits the code to get the contents of the given variable as a printable string. """ def emit_get_printable(self, f, line_prefix, is_personal): pass """ Builds the code to include the declaration of a variable of this kind, used when generating input/output bundles. """ def build_variable_declaration(self, line_prefix, variable_name): return '' """ Builds the code to include in the getter method declaration for this kind of variable. """ def build_getter_declaration(self, line_prefix, variable_name): return '' """ Builds the documentation of the getter code """ def build_getter_documentation(self, line_prefix, variable_name): return '' """ Builds the code to implement getting this kind of variable. """ def build_getter_implementation(self, line_prefix, variable_name_from, variable_name_to): return '' """ Builds the code to include in the setter method for this kind of variable. """ def build_setter_declaration(self, line_prefix, variable_name): return '' """ Builds the documentation of the setter code """ def build_setter_documentation(self, line_prefix, variable_name): return '' """ Builds the code to implement setting this kind of variable. """ def build_setter_implementation(self, line_prefix, variable_name_from, variable_name_to): return '' """ Builds the code to include the declaration of a variable of this kind as a field in a public struct """ def build_struct_field_declaration(self, line_prefix, variable_name): return '' """ Documentation for the struct field """ def build_struct_field_documentation(self, line_prefix, variable_name): return '' """ Emits the code to dispose the variable. """ def build_dispose(self, line_prefix, variable_name): return '' """ Add sections """ def add_sections(self, sections): pass """ Flag as being public """ def flag_public(self): self.public = True # ----------------------------------------------------------------------------- # Support for GIR array/struct compat methods in 1.32 """ Emits the code to declare specific new types required by the variable """ def emit_types_gir(self, hfile, cfile, since): pass """ Builds the code to include the declaration of a variable of this kind, used when generating input/output bundles """ def build_variable_declaration_gir(self, line_prefix, variable_name): # By default, no extra variable is required in the input/output bundle # for GIR compat methods return '' """ Builds the code to include in the getter method declaration for this kind of variable """ def build_getter_declaration_gir(self, line_prefix, variable_name): return self.build_getter_declaration(line_prefix, variable_name) """ Builds the documentation of the getter code """ def build_getter_documentation_gir(self, line_prefix, variable_name): return self.build_getter_documentation(line_prefix, variable_name) """ Builds the code to implement getting this kind of variable """ def build_getter_implementation_gir(self, line_prefix, variable_name_from, variable_name_to): return self.build_getter_implementation(line_prefix, variable_name_from, variable_name_to) """ Builds the code to include in the setter method declaration for this kind of variable """ def build_setter_declaration_gir(self, line_prefix, variable_name): return self.build_setter_declaration(line_prefix, variable_name) """ Builds the documentation of the setter code """ def build_setter_documentation_gir(self, line_prefix, variable_name): return self.build_setter_documentation(line_prefix, variable_name) """ Builds the code to implement setting this kind of variable """ def build_setter_implementation_gir(self, line_prefix, variable_name_from, variable_name_to): return self.build_setter_implementation(line_prefix, variable_name_from, variable_name_to) """ Declaration of the variable as a struct field """ def build_struct_field_declaration_gir(self, line_prefix, variable_name): return self.build_struct_field_declaration(line_prefix, variable_name) """ Documentation for the struct field """ def build_struct_field_documentation_gir(self, line_prefix, variable_name): return self.build_struct_field_documentation(line_prefix, variable_name) """ Emits the code to dispose the variable """ def build_dispose_gir(self, line_prefix, variable_name): return self.build_dispose(line_prefix, variable_name) """ Emits the code to copy a variable into its GIR specific format """ def build_copy_to_gir(self, line_prefix, variable_name_from, variable_name_to): return '' """ Emits the code to copy a variable from its GIR specific format """ def build_copy_from_gir(self, line_prefix, variable_name_from, variable_name_to): return '' """ Emits the code to copy a variable from its GIR specific format to another variable in the same format """ def build_copy_gir(self, line_prefix, variable_name_from, variable_name_to): return '' libqmi-1.35.2-dev/build-aux/qmi-codegen/VariableArray.py000066400000000000000000001034331455567757300230470ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils from Variable import Variable import VariableFactory """ Variable type for Arrays ('array' format) """ class VariableArray(Variable): def __init__(self, service, dictionary, array_element_type, container_type): # Call the parent constructor Variable.__init__(self, service, dictionary) self.fixed_size = 0 self.name = dictionary['name'] # The array and its contents need to get disposed self.needs_dispose = True # We need to know whether the variable comes in an Input container or in # an Output container, as we should not dump the element clear() helper method # if the variable is from an Input container. self.container_type = container_type # Disallow arrays of arrays, always use an intermediate struct if dictionary['array-element']['format'] == 'array': raise ValueError('Arrays of arrays not allowed in %s array: use an intermediate struct instead' % self.name) # Load variable type of this array if 'name' in dictionary['array-element']: self.array_element = VariableFactory.create_variable(self.service, dictionary['array-element'], array_element_type + ' ' + dictionary['array-element']['name'], self.container_type) else: self.array_element = VariableFactory.create_variable(self.service, dictionary['array-element'], '', self.container_type) if 'size-prefix-format' in dictionary and 'fixed-size' in dictionary: raise ValueError('Cannot give \'size-prefix-format\' and \'fixed-size\' in %s array at the same time' % self.name) elif 'size-prefix-format' in dictionary: # Load variable type for the array size prefix # We do NOT allow 64-bit types as array sizes (GArray won't support them) if dictionary['size-prefix-format'] not in [ 'guint8', 'guint16', 'guint32' ]: raise ValueError('Invalid size prefix format (%s) in %s array: not guint8 or guint16 or guint32' % (dictionary['size-prefix-format'], self.name)) default_array_size = { 'format' : dictionary['size-prefix-format'] } self.array_size_element = VariableFactory.create_variable(self.service, default_array_size, '', self.container_type) # Load variable type for the sequence prefix, if any if 'sequence-prefix-format' in dictionary: sequence = { 'format' : dictionary['sequence-prefix-format'] } self.array_sequence_element = VariableFactory.create_variable(self.service, sequence, '', self.container_type) else: self.array_sequence_element = '' elif 'fixed-size' in dictionary: # fixed-size arrays have no size element, obviously self.fixed_size = dictionary['fixed-size'] if int(self.fixed_size) == 0 or int(self.fixed_size) > 512: raise ValueError('Fixed array size %s out of bounds (not between 0 and 512)' % self.fixed_size) if 'sequence-prefix-format' in dictionary: raise ValueError('\'sequence-prefix-format\' is not supported along with \'fixed-size\' in %s array' % self.name) else: self.array_sequence_element = '' else: raise ValueError('Missing \'size-prefix-format\' or \'fixed-size\' in %s array' % self.name) # Arrays need compat GIR support if the array element needs compat GIR support self.needs_compat_gir = self.array_element.needs_compat_gir # Arrays contain personal info if the array element contains personal info or they themselves are personal info self.contains_personal_info = self.contains_personal_info or self.array_element.contains_personal_info def emit_types(self, hfile, cfile, since, static): self.array_element.emit_types(hfile, cfile, since, static) def emit_types_gir(self, hfile, cfile, since): if self.array_element.needs_compat_gir: self.array_element.emit_types_gir(hfile, cfile, since) def emit_buffer_read(self, f, line_prefix, tlv_out, error, variable_name): common_var_prefix = utils.build_underscore_name(self.name) translations = { 'lp' : line_prefix, 'variable_name' : variable_name, 'private_format' : self.private_format, 'array_element_public_format' : self.array_element.public_format, 'array_element_clear_method' : self.array_element.clear_method, 'common_var_prefix' : common_var_prefix } template = ( '${lp}{\n' '${lp} guint ${common_var_prefix}_i;\n') f.write(string.Template(template).substitute(translations)) if self.fixed_size: translations['fixed_size'] = self.fixed_size template = ( '${lp} guint16 ${common_var_prefix}_n_items = ${fixed_size};\n' '\n') f.write(string.Template(template).substitute(translations)) else: translations['array_size_element_format'] = self.array_size_element.public_format template = ( '${lp} ${array_size_element_format} ${common_var_prefix}_n_items;\n') if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp} ${array_sequence_element_format} ${common_var_prefix}_sequence;\n') template += ( '\n' '${lp} /* Read number of items in the array */\n') f.write(string.Template(template).substitute(translations)) self.array_size_element.emit_buffer_read(f, line_prefix + ' ', tlv_out, error, common_var_prefix + '_n_items') if self.array_sequence_element != '': template = ( '\n' '${lp} /* Read sequence in the array */\n') f.write(string.Template(template).substitute(translations)) self.array_size_element.emit_buffer_read(f, line_prefix + ' ', tlv_out, error, common_var_prefix + '_sequence') template = ( '\n' '${lp} ${variable_name}_sequence = ${common_var_prefix}_sequence;\n') f.write(string.Template(template).substitute(translations)) template = ( '\n' '${lp} ${variable_name} = g_array_sized_new (\n' '${lp} FALSE,\n' '${lp} FALSE,\n' '${lp} sizeof (${array_element_public_format}),\n' '${lp} (guint)${common_var_prefix}_n_items);\n' '\n') if self.array_element.needs_dispose: template += ( '${lp} g_array_set_clear_func (${variable_name}, (GDestroyNotify)${array_element_clear_method});\n' '\n') template += ( '${lp} for (${common_var_prefix}_i = 0; ${common_var_prefix}_i < ${common_var_prefix}_n_items; ${common_var_prefix}_i++) {\n' '${lp} ${array_element_public_format} ${common_var_prefix}_aux;\n' '\n') f.write(string.Template(template).substitute(translations)) self.array_element.emit_buffer_read(f, line_prefix + ' ', tlv_out, error, common_var_prefix + '_aux') template = ( '${lp} g_array_insert_val (${variable_name}, ${common_var_prefix}_i, ${common_var_prefix}_aux);\n' '${lp} }\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) def emit_buffer_write(self, f, line_prefix, tlv_name, variable_name): common_var_prefix = utils.build_underscore_name(self.name) translations = { 'lp' : line_prefix, 'variable_name' : variable_name, 'common_var_prefix' : common_var_prefix } template = ( '${lp}{\n' '${lp} guint ${common_var_prefix}_i;\n') f.write(string.Template(template).substitute(translations)) if self.fixed_size == 0: translations['array_size_element_format'] = self.array_size_element.private_format template = ( '${lp} ${array_size_element_format} ${common_var_prefix}_n_items;\n' '\n' '${lp} /* Write the number of items in the array first */\n' '${lp} ${common_var_prefix}_n_items = (${array_size_element_format}) ${variable_name}->len;\n') f.write(string.Template(template).substitute(translations)) self.array_size_element.emit_buffer_write(f, line_prefix + ' ', tlv_name, common_var_prefix + '_n_items') if self.array_sequence_element != '': self.array_sequence_element.emit_buffer_write(f, line_prefix + ' ', tlv_name, variable_name + '_sequence') template = ( '\n' '${lp} for (${common_var_prefix}_i = 0; ${common_var_prefix}_i < ${variable_name}->len; ${common_var_prefix}_i++) {\n') f.write(string.Template(template).substitute(translations)) self.array_element.emit_buffer_write(f, line_prefix + ' ', tlv_name, 'g_array_index (' + variable_name + ', ' + self.array_element.public_format + ',' + common_var_prefix + '_i)') template = ( '${lp} }\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) def emit_get_printable(self, f, line_prefix, is_personal): common_var_prefix = utils.build_underscore_name(self.name) translations = { 'lp' : line_prefix, 'common_var_prefix' : common_var_prefix } template = ( '${lp}{\n' '${lp} guint ${common_var_prefix}_i;\n') f.write(string.Template(template).substitute(translations)) if self.fixed_size: translations['fixed_size'] = self.fixed_size template = ( '${lp} guint16 ${common_var_prefix}_n_items = ${fixed_size};\n' '\n') f.write(string.Template(template).substitute(translations)) else: translations['array_size_element_format'] = self.array_size_element.public_format template = ( '${lp} ${array_size_element_format} ${common_var_prefix}_n_items;\n') if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp} ${array_sequence_element_format} ${common_var_prefix}_sequence;\n') template += ( '\n' '${lp} /* Read number of items in the array */\n') f.write(string.Template(template).substitute(translations)) self.array_size_element.emit_buffer_read(f, line_prefix + ' ', 'out', '&error', common_var_prefix + '_n_items') if self.array_sequence_element != '': template = ( '\n' '${lp} /* Read sequence */\n') f.write(string.Template(template).substitute(translations)) self.array_sequence_element.emit_buffer_read(f, line_prefix + ' ', 'out', '&error', common_var_prefix + '_sequence') template = ( '\n' '${lp} g_string_append_printf (printable, "[[Seq:%u]] ", ${common_var_prefix}_sequence);\n') f.write(string.Template(template).substitute(translations)) template = ( '\n' '${lp} g_string_append (printable, "{");\n' '\n' '${lp} for (${common_var_prefix}_i = 0; ${common_var_prefix}_i < ${common_var_prefix}_n_items; ${common_var_prefix}_i++) {\n' '${lp} g_string_append_printf (printable, " [%u] = \'", ${common_var_prefix}_i);\n') f.write(string.Template(template).substitute(translations)) self.array_element.emit_get_printable(f, line_prefix + ' ', self.personal_info or is_personal); template = ( '${lp} g_string_append (printable, " \'");\n' '${lp} }\n' '\n' '${lp} g_string_append (printable, "}");\n' '${lp}}') f.write(string.Template(template).substitute(translations)) """ We need to include SEQUENCE + GARRAY """ def build_variable_declaration(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'name' : variable_name } template = '' if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp}${array_sequence_element_format} ${name}_sequence;\n') template += ( '${lp}GArray *${name};\n') return string.Template(template).substitute(translations) """ We need to include GPTRARRAY """ def build_variable_declaration_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: return '' translations = { 'lp' : line_prefix, 'name' : variable_name } template = ( '${lp}GPtrArray *${name}_ptr;\n') return string.Template(template).substitute(translations) """ We need to include SEQUENCE + GARRAY """ def build_struct_field_declaration(self, line_prefix, variable_name): return self.build_variable_declaration(line_prefix, variable_name) """ We need to include SEQUENCE + GPTRARRAY """ def build_struct_field_declaration_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: return self.build_struct_field_declaration(line_prefix, variable_name) translations = { 'lp' : line_prefix, 'name' : variable_name } template = '' if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp}${array_sequence_element_format} ${name}_sequence;\n') template += ( '${lp}GPtrArray *${name};\n') return string.Template(template).substitute(translations) def build_getter_declaration(self, line_prefix, variable_name): if not self.visible: return '' translations = { 'lp' : line_prefix, 'name' : variable_name } template = '' if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp}${array_sequence_element_format} *${name}_sequence,\n') template += ( '${lp}GArray **${name},\n') return string.Template(template).substitute(translations) def build_getter_declaration_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: return self.build_getter_declaration(line_prefix, variable_name) if not self.visible: return '' translations = { 'lp' : line_prefix, 'name' : variable_name } template = '' if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp}${array_sequence_element_format} *${name}_sequence,\n') template += ( '${lp}GPtrArray **${name}_ptr,\n') return string.Template(template).substitute(translations) def build_getter_documentation(self, line_prefix, variable_name): if not self.visible: return '' translations = { 'lp' : line_prefix, 'array_element_public_format' : self.array_element.public_format, 'array_element_element_type' : self.array_element.element_type, 'name' : variable_name } template = '' if self.array_sequence_element != '': template += ( '${lp}@${name}_sequence: (out)(optional): a placeholder for the output sequence number, or %NULL if not required.\n') template += ( '${lp}@${name}: (out)(optional)(element-type ${array_element_element_type})(transfer none): a placeholder for the output #GArray of #${array_element_public_format} elements, or %NULL if not required. Do not free it, it is owned by @self.\n') return string.Template(template).substitute(translations) def build_getter_documentation_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: return self.build_getter_documentation(line_prefix, variable_name) if not self.visible: return '' translations = { 'lp' : line_prefix, 'array_element_public_format' : self.array_element.public_format, 'array_element_element_type_gir' : self.array_element.element_type_gir, 'name' : variable_name } template = '' if self.array_sequence_element != '': template += ( '${lp}@${name}_sequence: (out)(optional): a placeholder for the output sequence number, or %NULL if not required.\n') template += ( '${lp}@${name}_ptr: (out)(optional)(element-type ${array_element_element_type_gir})(transfer none): a placeholder for the output array of #${array_element_public_format} elements, or %NULL if not required. Do not free or modify it, it is owned by @self.\n') return string.Template(template).substitute(translations) def build_getter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return '' translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to } template = '' if self.array_sequence_element != '': template += ( '${lp}if (${to}_sequence)\n' '${lp} *${to}_sequence = ${from}_sequence;\n') template += ( '${lp}if (${to})\n' '${lp} *${to} = ${from};\n') return string.Template(template).substitute(translations) def build_getter_implementation_gir(self, line_prefix, variable_name_from, variable_name_to): if not self.array_element.needs_compat_gir: return self.build_getter_implementation(line_prefix, variable_name_from, variable_name_to) if not self.visible: return '' common_var_prefix = utils.build_underscore_name(self.name) translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to } template = '' if self.array_sequence_element != '': template += ( '${lp}if (${to}_sequence)\n' '${lp} *${to}_sequence = ${from}_sequence;\n') template += ( '${lp}if (${to}_ptr) {\n' '${lp} if (!${from}_ptr) {\n') template += self.build_copy_to_gir(line_prefix + ' ', variable_name_from, variable_name_from + '_ptr') template += ( '${lp} }\n' '${lp} *${to}_ptr = ${from}_ptr;\n' '${lp}}') return string.Template(template).substitute(translations) def build_setter_declaration(self, line_prefix, variable_name): if not self.visible: return '' translations = { 'lp' : line_prefix, 'name' : variable_name } template = '' if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp}${array_sequence_element_format} ${name}_sequence,\n') template += ( '${lp}GArray *${name},\n') return string.Template(template).substitute(translations) def build_setter_declaration_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: return self.build_setter_declaration(line_prefix, variable_name) if not self.visible: return '' translations = { 'lp' : line_prefix, 'name' : variable_name } template = '' if self.array_sequence_element != '': translations['array_sequence_element_format'] = self.array_sequence_element.public_format template += ( '${lp}${array_sequence_element_format} ${name}_sequence,\n') template += ( '${lp}GPtrArray *${name}_ptr,\n') return string.Template(template).substitute(translations) def build_setter_documentation(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'array_element_public_format' : self.array_element.public_format, 'array_element_element_type' : self.array_element.element_type, 'name' : variable_name } template = '' if self.array_sequence_element != '': template += ( '${lp}@${name}_sequence: the sequence number.\n') template += ( '${lp}@${name}: (in)(element-type ${array_element_element_type})(transfer none): a #GArray of #${array_element_public_format} elements. A new reference to @${name} will be taken, so the caller must make sure the array was created with the correct #GDestroyNotify as clear function for each element in the array.\n') return string.Template(template).substitute(translations) def build_setter_documentation_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: return self.build_setter_documentation(line_prefix, variable_name) if not self.visible: return "" translations = { 'lp' : line_prefix, 'array_element_public_format' : self.array_element.public_format, 'array_element_element_type_gir' : self.array_element.element_type_gir, 'name' : variable_name } template = '' if self.array_sequence_element != '': template += ( '${lp}@${name}_sequence: the sequence number.\n') template += ( '${lp}@${name}_ptr: (in)(element-type ${array_element_element_type_gir})(transfer none): array of #${array_element_public_format} elements. The contents of the given array will be copied, the #GPtrArray will not increase its reference count.\n') return string.Template(template).substitute(translations) def build_setter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to } template = '' if self.array_sequence_element != '': template += ( '${lp}${to}_sequence = ${from}_sequence;\n') template += self.build_dispose(line_prefix, variable_name_to) template += self.build_dispose_gir(line_prefix, variable_name_to) template +=( '${lp}${to} = g_array_ref (${from});\n') return string.Template(template).substitute(translations) def build_setter_implementation_gir(self, line_prefix, variable_name_from, variable_name_to): if not self.array_element.needs_compat_gir: return self.build_setter_implementation(line_prefix, variable_name_from, variable_name_to) if not self.visible: return "" common_var_prefix = utils.build_underscore_name(self.name) translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to } template = '' if self.array_sequence_element != '': template += ( '${lp}${to}_sequence = ${from}_sequence;\n') template += self.build_dispose(line_prefix, variable_name_to) template += self.build_dispose_gir(line_prefix, variable_name_to + '_ptr') template += self.build_copy_from_gir(line_prefix, variable_name_from + '_ptr', variable_name_to) return string.Template(template).substitute(translations) def build_struct_field_documentation(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'array_element_public_format' : self.array_element.public_format, 'name' : variable_name } template = '' if self.array_sequence_element != '': template += ( '${lp}@${name}_sequence: the sequence number.\n') template += ( '${lp}@${name}: a #GArray of #${array_element_public_format} elements.\n') return string.Template(template).substitute(translations) def build_struct_field_documentation_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: return self.build_struct_field_documentation(line_prefix, variable_name) translations = { 'lp' : line_prefix, 'array_element_public_format' : self.array_element.public_format, 'array_element_element_type' : self.array_element.element_type, 'name' : variable_name } template = '' if self.array_sequence_element != '': template += ( '${lp}@${name}_sequence: the sequence number.\n') template += ( '${lp}@${name}: (element-type ${array_element_element_type}): an array of #${array_element_public_format} elements.\n') return string.Template(template).substitute(translations) def build_dispose(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'variable_name' : variable_name } template = ( '${lp}g_clear_pointer (&${variable_name}, (GDestroyNotify)g_array_unref);\n') return string.Template(template).substitute(translations) def build_dispose_gir(self, line_prefix, variable_name): if not self.array_element.needs_compat_gir: self.build_dispose(line_prefix, variable_name) translations = { 'lp' : line_prefix, 'variable_name' : variable_name } template = ( '${lp}g_clear_pointer (&${variable_name}, (GDestroyNotify)g_ptr_array_unref);\n') return string.Template(template).substitute(translations) def build_copy_to_gir(self, line_prefix, variable_name_from, variable_name_to): common_var_prefix = utils.build_underscore_name(self.name) translations = { 'lp' : line_prefix, 'to' : variable_name_to, 'from' : variable_name_from } if self.array_element.needs_compat_gir: translations['common_var_prefix'] = common_var_prefix translations['array_element_public_format'] = self.array_element.public_format translations['array_element_public_format_gir'] = self.array_element.public_format_gir translations['array_element_element_type_gir'] = self.array_element.element_type_gir translations['array_element_free_method_gir'] = self.array_element.free_method_gir translations['array_element_new_method_gir'] = self.array_element.new_method_gir template = ( '${lp}{\n' '${lp} guint ${common_var_prefix}_i;\n' '\n' '${lp} ${to} = g_ptr_array_new_full (${from}->len, (GDestroyNotify)${array_element_free_method_gir});\n' '${lp} for (${common_var_prefix}_i = 0; ${common_var_prefix}_i < ${from}->len; ${common_var_prefix}_i++) {\n' '${lp} ${array_element_public_format} *${common_var_prefix}_aux_from;\n' '${lp} ${array_element_public_format_gir} *${common_var_prefix}_aux_to;\n' '\n' '${lp} ${common_var_prefix}_aux_from = &g_array_index (${from}, ${array_element_public_format}, ${common_var_prefix}_i);\n' '\n' '${lp} ${common_var_prefix}_aux_to = ${array_element_new_method_gir} ();\n') template += self.array_element.build_copy_to_gir(line_prefix + ' ', '(*${common_var_prefix}_aux_from)', '${common_var_prefix}_aux_to') template += ( '\n' '${lp} g_ptr_array_add (${to}, ${common_var_prefix}_aux_to);\n' '${lp} }\n' '${lp}}\n') else: template = ( '${lp}${to} = g_array_ref (${from});\n') return string.Template(template).substitute(translations) def build_copy_from_gir(self, line_prefix, variable_name_from, variable_name_to): translations = { 'lp' : line_prefix, 'to' : variable_name_to, 'from' : variable_name_from } if self.array_element.needs_compat_gir: common_var_prefix = utils.build_underscore_name(self.name) translations['common_var_prefix'] = common_var_prefix translations['array_element_public_format'] = self.array_element.public_format translations['array_element_public_format_gir'] = self.array_element.public_format_gir template = ( '${lp}{\n' '${lp} guint ${common_var_prefix}_i;\n' '\n' '${lp} ${to} = g_array_sized_new (FALSE, FALSE, sizeof (${array_element_public_format}), ${from}->len);\n' '${lp} for (${common_var_prefix}_i = 0; ${common_var_prefix}_i < ${from}->len; ${common_var_prefix}_i++) {\n' '${lp} ${array_element_public_format} ${common_var_prefix}_aux_to;\n' '${lp} ${array_element_public_format_gir} *${common_var_prefix}_aux_from;\n' '\n' '${lp} ${common_var_prefix}_aux_from = g_ptr_array_index (${from}, ${common_var_prefix}_i);\n' '\n') template += self.array_element.build_copy_from_gir(line_prefix + ' ', '${common_var_prefix}_aux_from', '${common_var_prefix}_aux_to') template += ( '\n' '${lp} g_array_append_val (${to}, ${common_var_prefix}_aux_to);\n' '${lp} }\n' '${lp}}\n') else: template = ( '${lp}${to} = g_array_ref (${from});\n') return string.Template(template).substitute(translations) def build_copy_gir(self, line_prefix, variable_name_from, variable_name_to): common_var_prefix = utils.build_underscore_name(self.name) translations = { 'lp' : line_prefix, 'to' : variable_name_to, 'from' : variable_name_from } # our GPtrArrays and GArrays are immutable, we can just ref the array as a copy if self.array_element.needs_compat_gir: template = ( '${lp}${to} = g_ptr_array_ref (${from});\n') else: template = ( '${lp}${to} = g_array_ref (${from});\n') return string.Template(template).substitute(translations) def add_sections(self, sections): self.array_element.add_sections(sections) libqmi-1.35.2-dev/build-aux/qmi-codegen/VariableFactory.py000066400000000000000000000040471455567757300234010ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # import utils from VariableInteger import VariableInteger from VariableString import VariableString from VariableStruct import VariableStruct from VariableSequence import VariableSequence from VariableArray import VariableArray """ Helps in the creation of Variable objects based on the specific 'format' found in the given dictionary """ def create_variable(service, dictionary, new_type_name, container_type): if utils.format_is_integer(dictionary['format']): return VariableInteger(service, dictionary) elif utils.format_is_float(dictionary['format']): return VariableInteger(service, dictionary) elif dictionary['format'] == 'string': return VariableString(service, dictionary) elif dictionary['format'] == 'struct': return VariableStruct(service, dictionary, new_type_name, container_type) elif dictionary['format'] == 'sequence': return VariableSequence(service, dictionary, new_type_name, container_type) elif dictionary['format'] == 'array': return VariableArray(service, dictionary, new_type_name, container_type) else: raise RuntimeError('Unexpected field format \'%s\'' % dictionary['format']) libqmi-1.35.2-dev/build-aux/qmi-codegen/VariableInteger.py000066400000000000000000000402031455567757300233610ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils from Variable import Variable """ Variable type for signed/unsigned Integers and floating point numbers: 'guint8', 'gint8' 'guint16', 'gint16' 'guint32', 'gint32' 'guint64', 'gint64' 'guint-sized' 'gfloat', 'gdouble' """ class VariableInteger(Variable): def __init__(self, service, dictionary): # Call the parent constructor Variable.__init__(self, service, dictionary) self.guint_sized_size = '' if self.format == "guint-sized": if 'guint-size' not in dictionary: raise RuntimeError('Format \'guint-sized\' requires \'guint-size\' parameter') else: self.guint_sized_size = dictionary['guint-size'] self.private_format = 'guint64' self.public_format = 'guint64' else: self.private_format = self.format self.public_format = dictionary['public-format'] if 'public-format' in dictionary else self.private_format self.element_type = self.public_format # Public format for the GIR array compat methods in 1.32 self.private_format_gir = self.private_format self.public_format_gir = self.public_format self.element_type_gir = self.element_type def emit_buffer_read(self, f, line_prefix, tlv_out, error, variable_name): translations = { 'lp' : line_prefix, 'tlv_out' : tlv_out, 'variable_name' : variable_name, 'error' : error, 'public_format' : self.public_format, 'private_format' : self.private_format, 'len' : self.guint_sized_size } if self.private_format not in ('guint8', 'gint8'): translations['endian'] = ' ' + self.endian + ',' else: translations['endian'] = '' if self.format == 'guint-sized': template = ( '${lp}if (!qmi_message_tlv_read_sized_guint (message, init_offset, &offset, ${len},${endian} &(${variable_name}), ${error}))\n' '${lp} goto ${tlv_out};\n') elif self.format == 'gfloat': template = ( '${lp}if (!qmi_message_tlv_read_gfloat_endian (message, init_offset, &offset,${endian} &(${variable_name}), ${error}))\n' '${lp} goto ${tlv_out};\n') elif self.private_format == self.public_format: template = ( '${lp}if (!qmi_message_tlv_read_${private_format} (message, init_offset, &offset,${endian} &(${variable_name}), ${error}))\n' '${lp} goto ${tlv_out};\n') else: template = ( '${lp}{\n' '${lp} ${private_format} tmp;\n' '\n' '${lp} if (!qmi_message_tlv_read_${private_format} (message, init_offset, &offset,${endian} &tmp, ${error}))\n' '${lp} goto ${tlv_out};\n' '${lp} ${variable_name} = (${public_format})tmp;\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) @staticmethod def fixed_type_byte_size(fmt): if fmt == 'guint8': return 1 if fmt == 'guint16': return 2 if fmt == 'guint32': return 4 if fmt == 'guint64': return 8 if fmt == 'gint8': return 1 if fmt == 'gint16': return 2 if fmt == 'gint32': return 4 if fmt == 'gint64': return 8 raise Exception("Unsupported format %s" % (fmt)) def emit_buffer_write(self, f, line_prefix, tlv_name, variable_name): translations = { 'lp' : line_prefix, 'private_format' : self.private_format, 'len' : self.guint_sized_size, 'tlv_name' : tlv_name, 'variable_name' : variable_name } if self.private_format != 'guint8' and self.private_format != 'gint8': translations['endian'] = ' ' + self.endian + ',' else: translations['endian'] = '' if self.format == 'guint-sized': template = ( '${lp}/* Write the ${len}-byte long variable to the buffer */\n' '${lp}if (!qmi_message_tlv_write_sized_guint (self, ${len},${endian} ${variable_name}, error)) {\n' '${lp} g_prefix_error (error, "Cannot write sized integer in TLV \'${tlv_name}\': ");\n' '${lp} return NULL;\n' '${lp}}\n') elif self.private_format == self.public_format: template = ( '${lp}/* Write the ${private_format} variable to the buffer */\n' '${lp}if (!qmi_message_tlv_write_${private_format} (self,${endian} ${variable_name}, error)) {\n' '${lp} g_prefix_error (error, "Cannot write integer in TLV \'${tlv_name}\': ");\n' '${lp} return NULL;\n' '${lp}}\n') else: template = ( '${lp}{\n' '${lp} ${private_format} tmp;\n' '\n' '${lp} tmp = (${private_format}) ${variable_name};\n' '${lp} /* Write the ${private_format} variable to the buffer */\n' '${lp} if (!qmi_message_tlv_write_${private_format} (self,${endian} tmp, error)) {\n' '${lp} g_prefix_error (error, "Cannot write enum in TLV \'${tlv_name}\': ");\n' '${lp} return NULL;\n' '${lp} }\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) def emit_get_printable(self, f, line_prefix, is_personal): common_format = '' common_cast = '' if self.private_format == 'guint8': common_format = '%u' common_cast = '(guint)' elif self.private_format == 'guint16': common_format = '%" G_GUINT16_FORMAT "' elif self.private_format == 'guint32': common_format = '%" G_GUINT32_FORMAT "' elif self.private_format == 'guint64': common_format = '%" G_GUINT64_FORMAT "' elif self.private_format == 'gint8': common_format = '%d' common_cast = '(gint)' elif self.private_format == 'gint16': common_format = '%" G_GINT16_FORMAT "' elif self.private_format == 'gint32': common_format = '%" G_GINT32_FORMAT "' elif self.private_format == 'gint64': common_format = '%" G_GINT64_FORMAT "' elif self.private_format in ('gfloat', 'gdouble'): common_format = '%lf' common_cast = '(gdouble)' translations = { 'lp' : line_prefix, 'private_format' : self.private_format, 'public_format' : self.public_format, 'len' : self.guint_sized_size, 'common_format' : common_format, 'common_cast' : common_cast } if self.private_format not in ('guint8', 'gint8'): translations['endian'] = ' ' + self.endian + ',' else: translations['endian'] = '' template = ( '\n' '${lp}{\n' '${lp} ${private_format} tmp;\n' '\n') if self.format == 'guint-sized': template += ( '${lp} if (!qmi_message_tlv_read_sized_guint (message, init_offset, &offset, ${len},${endian} &tmp, &error))\n' '${lp} goto out;\n') elif self.format == 'gfloat': template += ( '${lp} if (!qmi_message_tlv_read_gfloat_endian (message, init_offset, &offset,${endian} &tmp, &error))\n' '${lp} goto out;\n') else: template += ( '${lp} if (!qmi_message_tlv_read_${private_format} (message, init_offset, &offset,${endian} &tmp, &error))\n' '${lp} goto out;\n') if self.personal_info or is_personal: translations['if_show_field'] = 'if (qmi_utils_get_show_personal_info ()) ' else: translations['if_show_field'] = '' template += ( '${lp} ${if_show_field}{\n') if self.public_format == 'gboolean': template += ( '${lp} g_string_append_printf (printable, "%s", tmp ? "yes" : "no");\n') elif self.public_format != self.private_format: translations['public_type_underscore'] = utils.build_underscore_name_from_camelcase(self.public_format) translations['public_type_underscore_upper'] = utils.build_underscore_name_from_camelcase(self.public_format).upper() template += ( '#if defined __${public_type_underscore_upper}_IS_ENUM__\n' '${lp} g_string_append_printf (printable, "%s", ${public_type_underscore}_get_string ((${public_format})tmp));\n' '#elif defined __${public_type_underscore_upper}_IS_FLAGS__\n' '${lp} {\n' '${lp} g_autofree gchar *flags_str = NULL;\n' '\n' '${lp} flags_str = ${public_type_underscore}_build_string_from_mask ((${public_format})tmp);\n' '${lp} g_string_append_printf (printable, "%s", flags_str);\n' '${lp} }\n' '#else\n' '# error unexpected public format: ${public_format}\n' '#endif\n') else: template += ( '${lp} g_string_append_printf (printable, "${common_format}", ${common_cast}tmp);\n') if self.personal_info or is_personal: template += ( '${lp} } else {\n' '${lp} g_string_append_printf (printable, "\'###\'");\n') template += ( '${lp} }\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) def build_variable_declaration(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'private_format' : self.private_format, 'name' : variable_name } template = ( '${lp}${private_format} ${name};\n') return string.Template(template).substitute(translations) def build_struct_field_declaration(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'public_format' : self.public_format, 'name' : variable_name } template = ( '${lp}${public_format} ${name};\n') return string.Template(template).substitute(translations) def build_getter_declaration(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'public_format' : self.public_format, 'name' : variable_name } template = ( '${lp}${public_format} *${name},\n') return string.Template(template).substitute(translations) def build_getter_documentation(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'public_format' : self.public_format, 'name' : variable_name } template = ( '${lp}@${name}: (out)(optional): a placeholder for the output #${public_format}, or %NULL if not required.\n') return string.Template(template).substitute(translations) def build_getter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" needs_cast = True if self.public_format != self.private_format else False translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to, 'cast_ini' : '(' + self.public_format + ')(' if needs_cast else '', 'cast_end' : ')' if needs_cast else '' } template = ( '${lp}if (${to})\n' '${lp} *${to} = ${cast_ini}${from}${cast_end};\n') return string.Template(template).substitute(translations) def build_setter_declaration(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'public_format' : self.public_format, 'name' : variable_name } template = ( '${lp}${public_format} ${name},\n') return string.Template(template).substitute(translations) def build_setter_documentation(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'public_format' : self.public_format, 'name' : variable_name } template = ( '${lp}@${name}: a #${public_format}.\n') return string.Template(template).substitute(translations) def build_setter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" needs_cast = True if self.public_format != self.private_format else False translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to, 'cast_ini' : '(' + self.private_format + ')(' if needs_cast else '', 'cast_end' : ')' if needs_cast else '' } template = ( '${lp}${to} = ${cast_ini}${from}${cast_end};\n') return string.Template(template).substitute(translations) def build_struct_field_documentation(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'public_format' : self.public_format, 'name' : variable_name } template = ( '${lp}@${name}: a #${public_format}.\n') return string.Template(template).substitute(translations) def build_copy_gir(self, line_prefix, variable_name_from, variable_name_to): translations = { 'lp' : line_prefix, 'variable_name_from' : variable_name_from, 'variable_name_to' : variable_name_to } template = ( '${lp}${variable_name_to} = ${variable_name_from};\n') return string.Template(template).substitute(translations) def build_copy_to_gir(self, line_prefix, variable_name_from, variable_name_to): return self.build_copy_gir (line_prefix, variable_name_from, variable_name_to) def build_copy_from_gir(self, line_prefix, variable_name_from, variable_name_to): return self.build_copy_gir (line_prefix, variable_name_from, variable_name_to) libqmi-1.35.2-dev/build-aux/qmi-codegen/VariableSequence.py000066400000000000000000000256431455567757300235470ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils from Variable import Variable import VariableFactory """ Variable type for Sequences ('sequence' format) """ class VariableSequence(Variable): def __init__(self, service, dictionary, sequence_type_name, container_type): # Call the parent constructor Variable.__init__(self, service, dictionary) self.container_type = container_type # Load members of this sequence self.members = [] for member_dictionary in dictionary['contents']: member = {} member['name'] = utils.build_underscore_name(member_dictionary['name']) member['object'] = VariableFactory.create_variable(self.service, member_dictionary, sequence_type_name + ' ' + member_dictionary['name'], self.container_type) self.members.append(member) # We'll need to dispose if at least one of the members needs it for member in self.members: if member['object'].needs_dispose: self.needs_dispose = True break # We'll flag the variable as needing compat GIR methods if we find any # sequence member needing it for member in self.members: if member['object'].needs_compat_gir: self.needs_compat_gir = True break # We'll contain personal info if at least one of the members contains personal info or we ourselves are personal info if not self.contains_personal_info: for member in self.members: if member['object'].contains_personal_info: self.contains_personal_info = True break def emit_types(self, hfile, cfile, since, static): for member in self.members: member['object'].emit_types(hfile, cfile, since, static) def emit_types_gir(self, hfile, cfile, since): for member in self.members: member['object'].emit_types_gir(hfile, cfile, since) def emit_buffer_read(self, f, line_prefix, tlv_out, error, variable_name): for member in self.members: member['object'].emit_buffer_read(f, line_prefix, tlv_out, error, variable_name + '_' + member['name']) def emit_buffer_write(self, f, line_prefix, tlv_name, variable_name): for member in self.members: member['object'].emit_buffer_write(f, line_prefix, tlv_name, variable_name + '_' + member['name']) def emit_get_printable(self, f, line_prefix, is_personal): translations = { 'lp' : line_prefix } template = ( '${lp}g_string_append (printable, "[");\n') f.write(string.Template(template).substitute(translations)) for member in self.members: translations['variable_name'] = member['name'] template = ( '${lp}g_string_append (printable, " ${variable_name} = \'");\n') f.write(string.Template(template).substitute(translations)) member['object'].emit_get_printable(f, line_prefix, self.personal_info or is_personal) template = ( '${lp}g_string_append (printable, "\'");\n') f.write(string.Template(template).substitute(translations)) template = ( '${lp}g_string_append (printable, " ]");\n') f.write(string.Template(template).substitute(translations)) def build_variable_declaration(self, line_prefix, variable_name): built = '' for member in self.members: built += member['object'].build_variable_declaration(line_prefix, variable_name + '_' + member['name']) return built def build_variable_declaration_gir(self, line_prefix, variable_name): built = '' for member in self.members: built += member['object'].build_variable_declaration_gir(line_prefix, variable_name + '_' + member['name']) return built def build_struct_field_declaration(self, line_prefix, variable_name): raise RuntimeError('Variable of type "sequence" is never expected as a struct field') def build_getter_declaration(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_getter_declaration(line_prefix, variable_name + '_' + member['name']) return built def build_getter_declaration_gir(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_getter_declaration_gir(line_prefix, variable_name + '_' + member['name']) return built def build_getter_documentation(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_getter_documentation(line_prefix, variable_name + '_' + member['name']) return built def build_getter_documentation_gir(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_getter_documentation_gir(line_prefix, variable_name + '_' + member['name']) return built def build_getter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_getter_implementation(line_prefix, variable_name_from + '_' + member['name'], variable_name_to + '_' + member['name']) return built def build_getter_implementation_gir(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_getter_implementation_gir(line_prefix, variable_name_from + '_' + member['name'], variable_name_to + '_' + member['name']) return built def build_setter_declaration(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_setter_declaration(line_prefix, variable_name + '_' + member['name']) return built def build_setter_declaration_gir(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_setter_declaration_gir(line_prefix, variable_name + '_' + member['name']) return built def build_setter_documentation(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_setter_documentation(line_prefix, variable_name + '_' + member['name']) return built def build_setter_documentation_gir(self, line_prefix, variable_name): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_setter_documentation_gir(line_prefix, variable_name + '_' + member['name']) return built def build_setter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_setter_implementation(line_prefix, variable_name_from + '_' + member['name'], variable_name_to + '_' + member['name']) return built def build_setter_implementation_gir(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" built = '' for member in self.members: built += member['object'].build_setter_implementation_gir(line_prefix, variable_name_from + '_' + member['name'], variable_name_to + '_' + member['name']) return built def build_dispose(self, line_prefix, variable_name): built = '' for member in self.members: built += member['object'].build_dispose(line_prefix, variable_name + '_' + member['name']) return built def build_dispose_gir(self, line_prefix, variable_name): built = '' for member in self.members: built += member['object'].build_dispose_gir(line_prefix, variable_name + '_' + member['name']) return built def build_copy_to_gir(self, line_prefix, variable_name_from, variable_name_to): built = '' for member in self.members: built += member['object'].build_copy_to_gir(line_prefix, variable_name_from, variable_name_to) return built def build_copy_from_gir(self, line_prefix, variable_name_from, variable_name_to): built = '' for member in self.members: built += member['object'].build_copy_from_gir(line_prefix, variable_name_from, variable_name_to) return built def build_copy_gir(self, line_prefix, variable_name_from, variable_name_to): built = '' for member in self.members: built += member['object'].build_copy_gir(line_prefix, variable_name_from, variable_name_to) return built def add_sections(self, sections): # Add sections for each member for member in self.members: member['object'].add_sections(sections) libqmi-1.35.2-dev/build-aux/qmi-codegen/VariableString.py000066400000000000000000000355721455567757300232470ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils from Variable import Variable """ Variable type for Strings ('string' format) """ class VariableString(Variable): def __init__(self, service, dictionary): # Call the parent constructor Variable.__init__(self, service, dictionary) self.private_format = 'gchar *' self.public_format = self.private_format self.element_type = 'utf8' # Public format for the GIR array compat methods in 1.32 self.private_format_gir = self.private_format self.public_format_gir = self.public_format self.element_type_gir = self.element_type if 'fixed-size' in dictionary: self.is_fixed_size = True # Fixed-size strings self.needs_dispose = False self.length_prefix_size = 0 self.n_size_prefix_bytes = 0 self.fixed_size = dictionary['fixed-size'] self.max_size = '' else: self.is_fixed_size = False self.fixed_size = '-1' # Variable-length strings in heap self.needs_dispose = True self.clear_method = 'qmi_helpers_clear_string' self.free_method_gir = 'g_free' if 'size-prefix-format' in dictionary: if dictionary['size-prefix-format'] == 'guint8': self.length_prefix_size = 8 self.n_size_prefix_bytes = 1 elif dictionary['size-prefix-format'] == 'guint16': self.length_prefix_size = 16 self.n_size_prefix_bytes = 2 else: raise ValueError('Invalid size prefix format (%s): not guint8 or guint16' % dictionary['size-prefix-format']) # Strings which are given as the full value of a TLV and which don't have # a explicit 'size-prefix-format' will NOT have a length prefix elif 'type' in dictionary and dictionary['type'] == 'TLV': self.length_prefix_size = 0 self.n_size_prefix_bytes = 0 else: # Default to UINT8 self.length_prefix_size = 8 self.n_size_prefix_bytes = 1 self.max_size = dictionary['max-size'] if 'max-size' in dictionary else '' def emit_buffer_read(self, f, line_prefix, tlv_out, error, variable_name): translations = { 'lp' : line_prefix, 'tlv_out' : tlv_out, 'variable_name' : variable_name, 'error' : error } if self.is_fixed_size: translations['fixed_size'] = self.fixed_size # Fixed sized strings exposed in public fields will need to be # explicitly allocated in heap if self.public: translations['fixed_size_plus_one'] = int(self.fixed_size) + 1 template = ( '${lp}${variable_name} = g_malloc (${fixed_size_plus_one});\n' '${lp}if (!qmi_message_tlv_read_fixed_size_string (message, init_offset, &offset, ${fixed_size}, &${variable_name}[0], ${error})) {\n' '${lp} g_free (${variable_name});\n' '${lp} ${variable_name} = NULL;\n' '${lp} goto ${tlv_out};\n' '${lp}}\n' '${lp}${variable_name}[${fixed_size}] = \'\\0\';\n') else: template = ( '${lp}if (!qmi_message_tlv_read_fixed_size_string (message, init_offset, &offset, ${fixed_size}, &${variable_name}[0], ${error}))\n' '${lp} goto ${tlv_out};\n' '${lp}${variable_name}[${fixed_size}] = \'\\0\';\n') else: translations['n_size_prefix_bytes'] = self.n_size_prefix_bytes translations['max_size'] = self.max_size if self.max_size != '' else '0' template = ( '${lp}if (!qmi_message_tlv_read_string (message, init_offset, &offset, ${n_size_prefix_bytes}, ${max_size}, &(${variable_name}), ${error}))\n' '${lp} goto ${tlv_out};\n') f.write(string.Template(template).substitute(translations)) def emit_buffer_write(self, f, line_prefix, tlv_name, variable_name): translations = { 'lp' : line_prefix, 'tlv_name' : tlv_name, 'variable_name' : variable_name, 'fixed_size' : self.fixed_size, 'n_size_prefix_bytes' : self.n_size_prefix_bytes } template = ( '${lp}if (!qmi_message_tlv_write_string (self, ${n_size_prefix_bytes}, ${variable_name}, ${fixed_size}, error)) {\n' '${lp} g_prefix_error (error, "Cannot write string in TLV \'${tlv_name}\': ");\n' '${lp} return NULL;\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) def emit_get_printable(self, f, line_prefix, is_personal): translations = { 'lp' : line_prefix } if self.is_fixed_size: translations['fixed_size'] = self.fixed_size translations['fixed_size_plus_one'] = int(self.fixed_size) + 1 template = ( '\n' '${lp}{\n' '${lp} gchar tmp[${fixed_size_plus_one}] = { \'\\0\' };\n' '\n' '${lp} if (!qmi_message_tlv_read_fixed_size_string (message, init_offset, &offset, ${fixed_size}, &tmp[0], &error))\n' '${lp} goto out;\n') else: translations['n_size_prefix_bytes'] = self.n_size_prefix_bytes translations['max_size'] = self.max_size if self.max_size != '' else '0' template = ( '\n' '${lp}{\n' '${lp} g_autofree gchar *tmp = NULL;\n' '\n' '${lp} if (!qmi_message_tlv_read_string (message, init_offset, &offset, ${n_size_prefix_bytes}, ${max_size}, &tmp, &error))\n' '${lp} goto out;\n') if self.personal_info or is_personal: translations['if_show_field'] = 'if (qmi_utils_get_show_personal_info ()) ' else: translations['if_show_field'] = '' template += ( '${lp} ${if_show_field}{\n' '${lp} g_string_append (printable, tmp);\n') if self.personal_info or is_personal: template += ( '${lp} } else {\n' '${lp} g_string_append_printf (printable, "\'###\'");\n') template += ( '${lp} }\n' '${lp}}\n') f.write(string.Template(template).substitute(translations)) def build_variable_declaration(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'name' : variable_name } if self.is_fixed_size: translations['fixed_size_plus_one'] = int(self.fixed_size) + 1 template = ( '${lp}gchar ${name}[${fixed_size_plus_one}];\n') else: template = ( '${lp}gchar *${name};\n') return string.Template(template).substitute(translations) def build_struct_field_declaration(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'name' : variable_name } # Fixed sized strings given in public structs are given as pointers, # instead of as fixed-sized arrays directly in the struct. template = ( '${lp}gchar *${name};\n') return string.Template(template).substitute(translations) def build_getter_declaration(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'name' : variable_name } template = ( '${lp}const gchar **${name},\n') return string.Template(template).substitute(translations) def build_getter_documentation(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'name' : variable_name } template = ( '${lp}@${name}: (out)(optional)(transfer none): a placeholder for the output constant string, or %NULL if not required.\n') return string.Template(template).substitute(translations) def build_getter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to } template = ( '${lp}if (${to})\n' '${lp} *${to} = ${from};\n') return string.Template(template).substitute(translations) def build_setter_declaration(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'name' : variable_name } template = ( '${lp}const gchar *${name},\n') return string.Template(template).substitute(translations) def build_setter_documentation(self, line_prefix, variable_name): if not self.visible: return "" translations = { 'lp' : line_prefix, 'name' : variable_name } if self.is_fixed_size: translations['fixed_size'] = self.fixed_size template = ( '${lp}@${name}: a constant string of exactly ${fixed_size} characters.\n') elif self.max_size != '': translations['max_size'] = self.max_size template = ( '${lp}@${name}: a constant string with a maximum length of ${max_size} characters.\n') else: template = ( '${lp}@${name}: a constant string.\n') return string.Template(template).substitute(translations) def build_setter_implementation(self, line_prefix, variable_name_from, variable_name_to): if not self.visible: return "" translations = { 'lp' : line_prefix, 'from' : variable_name_from, 'to' : variable_name_to } if self.is_fixed_size: translations['fixed_size'] = self.fixed_size template = ( '${lp}if (!${from} || strlen (${from}) != ${fixed_size}) {\n' '${lp} g_set_error (error,\n' '${lp} QMI_CORE_ERROR,\n' '${lp} QMI_CORE_ERROR_INVALID_ARGS,\n' '${lp} "Input variable \'${from}\' must be ${fixed_size} characters long");\n' '${lp} return FALSE;\n' '${lp}}\n' '${lp}memcpy (${to}, ${from}, ${fixed_size});\n' '${lp}${to}[${fixed_size}] = \'\\0\';\n') else: template = '' if self.max_size != '': translations['max_size'] = self.max_size template += ( '${lp}if (${from} && strlen (${from}) > ${max_size}) {\n' '${lp} g_set_error (error,\n' '${lp} QMI_CORE_ERROR,\n' '${lp} QMI_CORE_ERROR_INVALID_ARGS,\n' '${lp} "Input variable \'${from}\' must be less than ${max_size} characters long");\n' '${lp} return FALSE;\n' '${lp}}\n') template += ( '${lp}g_free (${to});\n' '${lp}${to} = g_strdup (${from} ? ${from} : "");\n') return string.Template(template).substitute(translations) def build_struct_field_documentation(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'name' : variable_name } if self.is_fixed_size: translations['fixed_size'] = self.fixed_size template = ( '${lp}@${name}: a string of exactly ${fixed_size} characters.\n') elif self.max_size != '': translations['max_size'] = self.max_size template = ( '${lp}@${name}: a string with a maximum length of ${max_size} characters.\n') else: template = ( '${lp}@${name}: a string.\n') return string.Template(template).substitute(translations) def build_dispose(self, line_prefix, variable_name): # Fixed-size strings don't need dispose if self.is_fixed_size and not self.public: return '' translations = { 'lp' : line_prefix, 'variable_name' : variable_name } template = ( '${lp}g_clear_pointer (&${variable_name}, (GDestroyNotify)g_free);\n') return string.Template(template).substitute(translations) def build_copy_gir(self, line_prefix, variable_name_from, variable_name_to): translations = { 'lp' : line_prefix, 'variable_name_from' : variable_name_from, 'variable_name_to' : variable_name_to } template = ( '${lp}${variable_name_to} = g_strdup (${variable_name_from});\n') return string.Template(template).substitute(translations) def build_copy_to_gir(self, line_prefix, variable_name_from, variable_name_to): return self.build_copy_gir (line_prefix, variable_name_from, variable_name_to) def build_copy_from_gir(self, line_prefix, variable_name_from, variable_name_to): return self.build_copy_gir (line_prefix, variable_name_from, variable_name_to) def flag_public(self): # Call the parent method Variable.flag_public(self) # Fixed-sized strings will need dispose if they are in the public header if self.is_fixed_size: self.needs_dispose = True libqmi-1.35.2-dev/build-aux/qmi-codegen/VariableStruct.py000066400000000000000000000365161455567757300232640ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # Copyright (c) 2022 Qualcomm Innovation Center, Inc. # import string import utils from Variable import Variable import VariableFactory """ Variable type for Structs ('struct' format) These variables are exclusively used as array elements, they can not be used as independent TLVs. Use Sequence instead for that. """ class VariableStruct(Variable): def __init__(self, service, dictionary, struct_type_name, container_type): # Call the parent constructor Variable.__init__(self, service, dictionary) self.container_type = container_type # The public format of the struct is built directly from the suggested # struct type name self.struct_type_name = struct_type_name self.element_type = utils.build_camelcase_name(self.struct_type_name) self.public_format = self.element_type self.private_format = self.public_format self.since = dictionary['since'] if 'since' in dictionary else '' # Load members of this struct self.members = [] for member_dictionary in dictionary['contents']: member = {} member['name'] = utils.build_underscore_name(member_dictionary['name']) member['object'] = VariableFactory.create_variable(self.service, member_dictionary, struct_type_name + ' ' + member['name'], self.container_type) # Specify that the variable will be defined in the public header member['object'].flag_public() self.members.append(member) # We'll need to dispose if at least one of the members needs it for member in self.members: if member['object'].needs_dispose: self.needs_dispose = True break if self.needs_dispose: self.clear_method = '__' + utils.build_underscore_name(self.struct_type_name) + '_clear' # When using structs, we always require GIR compat methods because they're going # to be stored via reference pointers in the arrays self.needs_compat_gir = True # If any of the contents needs GIR compat methods, then we must also create a new # GIR compat struct type; otherwise just use the original one self.content_needs_compat_gir = False for member in self.members: if member['object'].needs_compat_gir: self.content_needs_compat_gir = True break if self.content_needs_compat_gir: self.struct_type_name_gir = self.struct_type_name + ' Gir' else: self.struct_type_name_gir = self.struct_type_name self.element_type_gir = utils.build_camelcase_name(self.struct_type_name_gir) self.public_format_gir = self.element_type_gir self.private_format_gir = self.public_format_gir self.new_method_gir = '__' + utils.build_underscore_name(self.struct_type_name_gir) + '_new' self.free_method_gir = '__' + utils.build_underscore_name(self.struct_type_name_gir) + '_free' # We'll contain personal info if at least one of the members contains personal info or we ourselves are personal info if not self.contains_personal_info: for member in self.members: if member['object'].contains_personal_info: self.contains_personal_info = True break def build_variable_declaration(self, line_prefix, variable_name): raise RuntimeError('Variable of type "struct" can only be defined as array members') def build_struct_field_declaration(self, line_prefix, variable_name): raise RuntimeError('Variable of type "struct" cannot be defined as struct fields') def emit_types(self, hfile, cfile, since, static): for member in self.members: member['object'].emit_types(hfile, cfile, since, static) translations = { 'format' : self.public_format, 'since' : since if not self.since else self.since } template = '\n' hfile.write(string.Template(template).substitute(translations)) if not static and self.service != 'CTL': template = ( '\n' '/**\n') if self.content_needs_compat_gir: template += ( ' * ${format}: (skip)\n') else: template += ( ' * ${format}:\n') hfile.write(string.Template(template).substitute(translations)) for member in self.members: hfile.write(member['object'].build_struct_field_documentation(' * ', member['name'])) template = ( ' *\n' ' * A ${format} struct.\n' ' *\n' ' * Since: ${since}\n' ' */\n') hfile.write(string.Template(template).substitute(translations)) template = ( 'typedef struct _${format} {\n') hfile.write(string.Template(template).substitute(translations)) for member in self.members: hfile.write(member['object'].build_struct_field_declaration(' ', member['name'])) template = ('} ${format};\n') hfile.write(string.Template(template).substitute(translations)) # No need for the clear func if no need to dispose the contents if self.needs_dispose: translations['clear_method'] = self.clear_method template = ( '\n' 'static void\n' '${clear_method} (${format} *value)\n' '{\n') for member in self.members: template += member['object'].build_dispose(' ', 'value->' + member['name']) template += ( '}\n') cfile.write(string.Template(template).substitute(translations)) def emit_types_gir(self, hfile, cfile, since): for member in self.members: member['object'].emit_types_gir(hfile, cfile, since) translations = { 'element_type_no_gir' : self.public_format, 'element_type' : self.element_type_gir, 'underscore' : utils.build_underscore_name(self.struct_type_name_gir), 'new_method' : self.new_method_gir, 'free_method' : self.free_method_gir, 'since' : since if utils.version_compare('1.32',since) > 0 else '1.32' } # The type emission should happen ONLY if the GIR required type is # different to the original one if self.content_needs_compat_gir: template = ( '\n' '/**\n' ' * ${element_type}: (rename-to ${element_type_no_gir})\n') hfile.write(string.Template(template).substitute(translations)) for member in self.members: hfile.write(member['object'].build_struct_field_documentation_gir(' * ', member['name'])) template = ( ' *\n' ' * A ${element_type} struct.\n' ' *\n' ' * This type is a version of #${element_type_no_gir}, using arrays of pointers to\n' ' * structs instead of arrays of structs, for easier binding in other languages.\n' ' *\n' ' * Since: ${since}\n' ' */\n') hfile.write(string.Template(template).substitute(translations)) template = ( 'typedef struct _${element_type} {\n') hfile.write(string.Template(template).substitute(translations)) for member in self.members: hfile.write(member['object'].build_struct_field_declaration_gir(' ', member['name'])) template = ( '} ${element_type};\n') hfile.write(string.Template(template).substitute(translations)) # Free and New methods are required always for the GIR required type, # regardless of whether it's different to the original one or the same template = ( '\n' 'static void\n' '${free_method} (${element_type} *value)\n' '{\n') if not self.content_needs_compat_gir and self.needs_dispose: translations['clear_method'] = self.clear_method template += ' ${clear_method} (value);\n' else: for member in self.members: template += member['object'].build_dispose_gir(' ', 'value->' + member['name']) template += ( ' g_slice_free (${element_type}, value);\n' '}\n' '\n' 'static ${element_type} *\n' '${new_method} (void)\n' '{\n' ' return g_slice_new0 (${element_type});\n' '}\n') cfile.write(string.Template(template).substitute(translations)) template = ( '\n' 'GType ${underscore}_get_type (void) G_GNUC_CONST;\n') hfile.write(string.Template(template).substitute(translations)) template = ( '\n' 'static ${element_type} *\n' '__${underscore}_copy (const ${element_type} *value)\n' '{\n' ' ${element_type} *copy;\n' '\n' ' copy = ${new_method} ();\n') template += self.build_copy_gir(' ', 'value', 'copy') template += ( ' return copy;\n' '}\n' '\n' 'G_DEFINE_BOXED_TYPE (${element_type}, ${underscore}, (GBoxedCopyFunc)__${underscore}_copy, (GBoxedFreeFunc)__${underscore}_free)\n') cfile.write(string.Template(template).substitute(translations)) def emit_buffer_read(self, f, line_prefix, tlv_out, error, variable_name): for member in self.members: member['object'].emit_buffer_read(f, line_prefix, tlv_out, error, variable_name + '.' + member['name']) def emit_buffer_write(self, f, line_prefix, tlv_name, variable_name): for member in self.members: member['object'].emit_buffer_write(f, line_prefix, tlv_name, variable_name + '.' + member['name']) def emit_get_printable(self, f, line_prefix, is_personal): translations = { 'lp' : line_prefix } template = ( '${lp}g_string_append (printable, "[");\n') f.write(string.Template(template).substitute(translations)) for member in self.members: translations['variable_name'] = member['name'] template = ( '${lp}g_string_append (printable, " ${variable_name} = \'");\n') f.write(string.Template(template).substitute(translations)) member['object'].emit_get_printable(f, line_prefix, self.personal_info or is_personal) template = ( '${lp}g_string_append (printable, "\'");\n') f.write(string.Template(template).substitute(translations)) template = ( '${lp}g_string_append (printable, " ]");\n') f.write(string.Template(template).substitute(translations)) def build_dispose(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'underscore' : utils.build_underscore_name(self.struct_type_name), 'variable_name' : variable_name } template = '${lp}${underscore}_clear (&${variable_name});\n' return string.Template(template).substitute(translations) def build_dispose_gir(self, line_prefix, variable_name): translations = { 'lp' : line_prefix, 'underscore' : utils.build_underscore_name(self.struct_type_name_gir), 'variable_name' : variable_name } template = '${lp}${underscore}_free (${variable_name});\n' return string.Template(template).substitute(translations) def build_copy_to_gir(self, line_prefix, variable_name_from, variable_name_to): translations = { 'lp' : line_prefix, 'element_type_gir' : self.element_type_gir, 'variable_name_to' : variable_name_to, 'variable_name_from' : variable_name_from } template = '' for member in self.members: template += member['object'].build_copy_to_gir(line_prefix, '${variable_name_from}.' + member['name'], '${variable_name_to}->' + member['name']) return string.Template(template).substitute(translations) def build_copy_from_gir(self, line_prefix, variable_name_from, variable_name_to): translations = { 'lp' : line_prefix, 'element_type_gir' : self.element_type_gir, 'variable_name_to' : variable_name_to, 'variable_name_from' : variable_name_from } template = '' for member in self.members: template += member['object'].build_copy_from_gir(line_prefix, '${variable_name_from}->' + member['name'], '${variable_name_to}.' + member['name']) return string.Template(template).substitute(translations) def build_copy_gir(self, line_prefix, variable_name_from, variable_name_to): translations = { 'lp' : line_prefix, 'element_type_gir' : self.element_type_gir, 'variable_name_to' : variable_name_to, 'variable_name_from' : variable_name_from } template = '' for member in self.members: template += member['object'].build_copy_gir(line_prefix, '${variable_name_from}->' + member['name'], '${variable_name_to}->' + member['name']) return string.Template(template).substitute(translations) def add_sections(self, sections): for member in self.members: member['object'].add_sections(sections) sections['public-types'] += self.element_type + '\n' sections['standard'] += utils.build_underscore_name(self.struct_type_name) + '_get_type\n' if self.content_needs_compat_gir: sections['public-types'] += self.element_type_gir + '\n' sections['standard'] += utils.build_underscore_name(self.struct_type_name_gir) + '_get_type\n' libqmi-1.35.2-dev/build-aux/qmi-codegen/qmi-codegen000077500000000000000000000105671455567757300220740ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # import os import sys import optparse import json from Client import Client from MessageList import MessageList import utils def codegen_main(): # Input arguments arg_parser = optparse.OptionParser('%prog [options]') arg_parser.add_option('', '--input', metavar='JSONFILE', help='Input JSON-formatted database') arg_parser.add_option('', '--output', metavar='OUTFILES', help='Generate C code in OUTFILES.[ch]') arg_parser.add_option('', '--include', metavar='JSONFILE', action='append', help='Additional common types in a JSON-formatted database') arg_parser.add_option('', '--collection', metavar='[JSONFILE]', help='Collection of messages to be included in the build') (opts, args) = arg_parser.parse_args(); if opts.input == None: raise RuntimeError('Input JSON file is mandatory') if opts.output == None: raise RuntimeError('Output file pattern is mandatory') if opts.include == None: opts.include = [] # Prepare output file names output_file_c = open(opts.output + ".c", 'w') output_file_h = open(opts.output + ".h", 'w') output_file_sections = open(opts.output + ".sections", 'w') # If a collection given, load it collection_list_json = None if opts.collection != None: collection_contents = utils.read_json_file(opts.collection) collection_list_json = json.loads(collection_contents) # Load all common types common_object_list_json = [] opts.include.append(opts.input) for include in opts.include: include_contents = utils.read_json_file(include) include_list = json.loads(include_contents) for obj in include_list: if 'common-ref' in obj: common_object_list_json.append(obj) # Load database file contents database_file_contents = utils.read_json_file(opts.input) # Build message list object_list_json = json.loads(database_file_contents) message_list = MessageList(collection_list_json, object_list_json, common_object_list_json) # Validate that all items in the collection are in the message list if collection_list_json is not None: for message_id_enum_name in collection_list_json: if message_id_enum_name.startswith(message_list.request_prefix) or \ message_id_enum_name.startswith(message_list.indication_prefix): if not message_list.contains(message_id_enum_name): raise ValueError('Message ' + message_id_enum_name + ' in collection does not exist') # Add common stuff to the output files utils.add_copyright(output_file_c); utils.add_copyright(output_file_h); utils.add_header_start(output_file_h, os.path.basename(opts.output), message_list.service) utils.add_source_start(output_file_c, os.path.basename(opts.output)) # Emit the message creation/parsing code message_list.emit(output_file_h, output_file_c) # Build our own client client = Client(object_list_json) client.emit(output_file_h, output_file_c, message_list) # Emit sections client.emit_sections(output_file_sections, message_list) message_list.emit_sections(output_file_sections) utils.add_header_stop(output_file_h, os.path.basename(opts.output)) output_file_c.close() output_file_h.close() output_file_sections.close() sys.exit(0) if __name__ == "__main__": codegen_main() libqmi-1.35.2-dev/build-aux/qmi-codegen/utils.py000066400000000000000000000205561455567757300214670ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012 Lanedo GmbH # Copyright (C) 2012-2022 Aleksander Morgado # import string import re """ Add the common copyright header to the given file """ def add_copyright(f): f.write( "\n" "/* GENERATED CODE... DO NOT EDIT */\n" "\n" "/*\n" " * This library is free software; you can redistribute it and/or\n" " * modify it under the terms of the GNU Lesser General Public\n" " * License as published by the Free Software Foundation; either\n" " * version 2 of the License, or (at your option) any later version.\n" " *\n" " * This library is distributed in the hope that it will be useful,\n" " * but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n" " * Lesser General Public License for more details.\n" " *\n" " * You should have received a copy of the GNU Lesser General Public\n" " * License along with this library; if not, write to the\n" " * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n" " * Boston, MA 02110-1301 USA.\n" " *\n" " * Copyright (C) 2012 Lanedo GmbH\n" " * Copyright (C) 2012-2022 Aleksander Morgado \n" " */\n" "\n"); """ Build a header guard string based on the given filename """ def build_header_guard(output_name): return "__LIBQMI_GLIB_" + output_name.replace('-', '_').upper() + "__" """ Write the common header start chunk """ def add_header_start(f, output_name, service): translations = { 'guard' : build_header_guard(output_name), 'service' : build_underscore_name(service) } template = ( "\n" "#include \n" "#include \n" "#include \n" "\n" "#include \"qmi-enums.h\"\n") # CTL, DPM, GMS, ATR and IMS don't have enums if service not in ('CTL', 'DPM', 'GMS', 'ATR', 'IMS'): template += ( "#include \"qmi-enums-${service}.h\"\n") if service == 'CTL': template += ( "#include \"qmi-enums-private.h\"\n") # DMS, NAS, LOC, DSD and WDS have flags64 if service in ('DMS', 'NAS', 'LOC', 'DSD', 'WDS'): template += ( "#include \"qmi-flags64-${service}.h\"\n") template += ( "#include \"qmi-message.h\"\n" "#include \"qmi-client.h\"\n" "\n" "#ifndef ${guard}\n" "#define ${guard}\n" "\n" "G_BEGIN_DECLS\n" "\n") f.write(string.Template(template).substitute(translations)) """ Write the common header stop chunk """ def add_header_stop(f, output_name): template = string.Template ( "\n" "G_END_DECLS\n" "\n" "#endif /* ${guard} */\n") f.write(template.substitute(guard = build_header_guard(output_name))) """ Write the common source file start chunk """ def add_source_start(f, output_name): template = string.Template ( "\n" "#include \n" "\n" "#include \"${name}.h\"\n" "#include \"qmi-enum-types.h\"\n" "#include \"qmi-flag-types.h\"\n" "#include \"qmi-enum-types-private.h\"\n" "#include \"qmi-flag-types-private.h\"\n" "#include \"qmi-flags64-types.h\"\n" "#include \"qmi-error-types.h\"\n" "#include \"qmi-device.h\"\n" "#include \"qmi-helpers.h\"\n" '\n' '#define QMI_STATUS_SUCCESS 0x0000\n' '#define QMI_STATUS_FAILURE 0x0001\n' "\n") f.write(template.substitute(name = output_name)) """ Write a separator comment in the file """ def add_separator(f, separator_type, separator_name): template = string.Template ( "\n" "/*****************************************************************************/\n" "/* ${type}: ${name} */\n" "\n") f.write(template.substitute(type = separator_type, name = separator_name)) """ Build an underscore name from the given full name e.g.: "This is a message" --> "this_is_a_message" """ def build_underscore_name(name): return name.replace(' ', '_').lower() """ Build an underscore uppercase name from the given full name e.g.: "This is a message" --> "THIS_IS_A_MESSAGE" """ def build_underscore_uppercase_name(name): return name.replace(' ', '_').upper() """ Build an underscore name from the given camelcase name e.g.: "ThisIsAMessage" --> "this_is_a_message" """ def build_underscore_name_from_camelcase(camelcase): s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', camelcase) s2 = re.sub('(.)([0-9][a-z]+)', r'\1_\2', s1) return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s2).lower() """ Build a camelcase name from the given full name e.g.: "This is a message" --> "ThisIsAMessage" """ def build_camelcase_name(name): return string.capwords(name).replace(' ', '') """ Build a dashed lowercase name from the given full name e.g.: "This is a message" --> "this-is-a-message" """ def build_dashed_name(name): return name.lower().replace(' ', '-') """ Remove the given prefix from the string """ def remove_prefix(line, prefix): return line[len(prefix):] if line.startswith(prefix) else line """ Read the contents of the JSON file, skipping lines prefixed with '//', which are considered comments. """ def read_json_file(path): f = open(path) out = '' for line in f.readlines(): stripped = line.strip() if stripped.startswith('//'): # Skip this line # We add an empty line instead so that errors when parsing the JSON # report the proper line number out += "\n" else: out += line return out """ Returns True if the given format corresponds to a basic unsigned integer type """ def format_is_unsigned_integer(fmt): if fmt == 'guint8' or \ fmt == 'guint16' or \ fmt == 'guint32' or \ fmt == 'guint64' or \ fmt == 'guint-sized' : return True else: return False """ Returns True if the given format corresponds to a basic signed integer type """ def format_is_signed_integer(fmt): if fmt == 'gint8' or \ fmt == 'gint16' or \ fmt == 'gint32' or \ fmt == 'gint64': return True else: return False """ Returns True if the given format corresponds to a basic floating point type """ def format_is_float(fmt): return fmt in ('gfloat', 'gdouble') """ Returns True if the given format corresponds to a basic signed or unsigned integer type """ def format_is_integer(fmt): if format_is_unsigned_integer(fmt) or \ format_is_signed_integer(fmt): return True else: return False """ Compare two version strings given in MAJOR.MINOR[.MICRO] format. Just to avoid needing to include e.g. packaging.version.parse just for this """ def version_compare(v1,v2): v1_split = v1.split(".") v2_split = v2.split(".") major_v1 = int(v1_split[0]) major_v2 = int(v2_split[0]) if major_v2 > major_v1: return 1 if major_v2 < major_v1: return -1 # major_v2 == major_v1 minor_v1 = int(v1_split[1]) minor_v2 = int(v2_split[1]) if minor_v2 > minor_v1: return 1 if minor_v2 < minor_v1: return -1 # minor_v2 == minor_v1 micro_v1 = int(v1_split[2]) if len(v1_split) > 2 else 0 micro_v2 = int(v2_split[2]) if len(v2_split) > 2 else 0 if micro_v2 > micro_v1: return 1 if micro_v2 < micro_v1: return -1 # micro_v2 == micro_v1 return 0 libqmi-1.35.2-dev/build-aux/qmi-mkenums000077500000000000000000000732411455567757300177550ustar00rootroot00000000000000#!/usr/bin/env python3 # qmi-mkenums is ported from glib-mkenums. # Same license applies. # If the code below looks horrible and unpythonic, do not panic. # # It is. # # This is a manual conversion from the original Perl script to # Python. Improvements are welcome. # from __future__ import print_function, unicode_literals import argparse import os import re import sys import tempfile import io import errno import codecs import locale VERSION_STR = '''glib-mkenums version 2.64.2 glib-mkenums comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of glib-mkenums under the terms of the GNU General Public License which can be found in the GLib source package. Sources, examples and contact information are available at http://www.gtk.org''' # pylint: disable=too-few-public-methods class Color: '''ANSI Terminal colors''' GREEN = '\033[1;32m' BLUE = '\033[1;34m' YELLOW = '\033[1;33m' RED = '\033[1;31m' END = '\033[0m' def print_color(msg, color=Color.END, prefix='MESSAGE'): '''Print a string with a color prefix''' if os.isatty(sys.stderr.fileno()): real_prefix = '{start}{prefix}{end}'.format(start=color, prefix=prefix, end=Color.END) else: real_prefix = prefix print('{prefix}: {msg}'.format(prefix=real_prefix, msg=msg), file=sys.stderr) def print_error(msg): '''Print an error, and terminate''' print_color(msg, color=Color.RED, prefix='ERROR') sys.exit(1) def print_warning(msg, fatal=False): '''Print a warning, and optionally terminate''' if fatal: color = Color.RED prefix = 'ERROR' else: color = Color.YELLOW prefix = 'WARNING' print_color(msg, color, prefix) if fatal: sys.exit(1) def print_info(msg): '''Print a message''' print_color(msg, color=Color.GREEN, prefix='INFO') def get_rspfile_args(rspfile): ''' Response files are useful on Windows where there is a command-line character limit of 8191 because when passing sources as arguments to glib-mkenums this limit can be exceeded in large codebases. There is no specification for response files and each tool that supports it generally writes them out in slightly different ways, but some sources are: https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-response-files https://docs.microsoft.com/en-us/windows/desktop/midl/the-response-file-command ''' import shlex if not os.path.isfile(rspfile): sys.exit('Response file {!r} does not exist'.format(rspfile)) try: with open(rspfile, 'r') as f: cmdline = f.read() except OSError as e: sys.exit('Response file {!r} could not be read: {}' .format(rspfile, e.strerror)) return shlex.split(cmdline) def write_output(output): global output_stream print(output, file=output_stream) # Python 2 defaults to ASCII in case stdout is redirected. # This should make it match Python 3, which uses the locale encoding. if sys.stdout.encoding is None: output_stream = codecs.getwriter( locale.getpreferredencoding())(sys.stdout) else: output_stream = sys.stdout # Some source files aren't UTF-8 and the old perl version didn't care. # Replace invalid data with a replacement character to keep things working. # https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20 def replace_and_warn(err): # 7 characters of context either side of the offending character print_warning('UnicodeWarning: {} at {} ({})'.format( err.reason, err.start, err.object[err.start - 7:err.end + 7])) return ('?', err.end) codecs.register_error('replace_and_warn', replace_and_warn) # glib-mkenums.py # Information about the current enumeration flags = None # Is enumeration a bitmask? option_underscore_name = '' # Overridden underscore variant of the enum name # for example to fix the cases we don't get the # mixed-case -> underscorized transform right. option_lowercase_name = '' # DEPRECATED. A lower case name to use as part # of the *_get_type() function, instead of the # one that we guess. For instance, when an enum # uses abnormal capitalization and we can not # guess where to put the underscores. option_since = '' # User provided version info for the enum. seenbitshift = 0 # Have we seen bitshift operators? enum_prefix = None # Prefix for this enumeration enumname = '' # Name for this enumeration enumshort = '' # $enumname without prefix enumname_prefix = '' # prefix of $enumname enumindex = 0 # Global enum counter firstenum = 1 # Is this the first enumeration per file? entries = [] # [ name, val ] for each entry sandbox = None # sandbox for safe evaluation of expressions output = '' # Filename to write result into def parse_trigraph(opts): result = {} for opt in re.split(r'\s*,\s*', opts): opt = re.sub(r'^\s*', '', opt) opt = re.sub(r'\s*$', '', opt) m = re.search(r'(\w+)(?:=(.+))?', opt) assert m is not None groups = m.groups() key = groups[0] if len(groups) > 1: val = groups[1] else: val = 1 result[key] = val return result def parse_entries(file, file_name): global entries, enumindex, enumname, seenbitshift, flags looking_for_name = False while True: line = file.readline() if not line: break line = line.strip() # read lines until we have no open comments while re.search(r'/\*([^*]|\*(?!/))*$', line): line += file.readline() # strip comments w/o options line = re.sub(r'''/\*(?!<) ([^*]+|\*(?!/))* \*/''', '', line, flags=re.X) line = line.rstrip() # skip empty lines if len(line.strip()) == 0: continue if looking_for_name: m = re.match(r'\s*(\w+)', line) if m: enumname = m.group(1) return True # Handle include files m = re.match(r'\#include\s*<([^>]*)>', line) if m: newfilename = os.path.join("..", m.group(1)) newfile = io.open(newfilename, encoding="utf-8", errors="replace_and_warn") if not parse_entries(newfile, newfilename): return False else: continue m = re.match(r'\s*\}\s*(\w+)', line) if m: enumname = m.group(1) enumindex += 1 return 1 m = re.match(r'\s*\}', line) if m: enumindex += 1 looking_for_name = True continue m = re.match(r'''\s* (\w+)\s* # name (?:=( # value \s*\w+\s*\(.*\)\s* # macro with multiple args | # OR (?:[^,/]|/(?!\*))* # anything but a comma or comment ))?,?\s* (?:/\*< # options (([^*]|\*(?!/))*) >\s*\*/)?,? \s*$''', line, flags=re.X) if m: groups = m.groups() name = groups[0] value = None options = None if len(groups) > 1: value = groups[1] if len(groups) > 2: options = groups[2] if flags is None and value is not None and '<<' in value: seenbitshift = 1 if options is not None: options = parse_trigraph(options) if 'skip' not in options: entries.append((name, value, options.get('nick'))) else: entries.append((name, value)) elif re.match(r's*\#', line): pass else: print_warning('Failed to parse "{}" in {}'.format(line, file_name)) return False help_epilog = '''Production text substitutions: \u0040EnumName\u0040 PrefixTheXEnum \u0040enum_name\u0040 prefix_the_xenum \u0040ENUMNAME\u0040 PREFIX_THE_XENUM \u0040ENUMSHORT\u0040 THE_XENUM \u0040ENUMPREFIX\u0040 PREFIX \u0040enumsince\u0040 the user-provided since value given (qmi-mkenums only) \u0040VALUENAME\u0040 PREFIX_THE_XVALUE \u0040valuenick\u0040 the-xvalue \u0040valuenum\u0040 the integer value (limited support, Since: 2.26) \u0040type\u0040 either enum or flags \u0040Type\u0040 either Enum or Flags \u0040TYPE\u0040 either ENUM or FLAGS \u0040filename\u0040 name of current input file \u0040basename\u0040 base name of the current input file (Since: 2.22) ''' # production variables: idprefix = "" # "G", "Gtk", etc symprefix = "" # "g", "gtk", etc, if not just lc($idprefix) fhead = "" # output file header fprod = "" # per input file production ftail = "" # output file trailer eprod = "" # per enum text (produced prior to value itarations) vhead = "" # value header, produced before iterating over enum values vprod = "" # value text, produced for each enum value vtail = "" # value tail, produced after iterating over enum values comment_tmpl = "" # comment template def read_template_file(file): global idprefix, symprefix, fhead, fprod, ftail, eprod, vhead, vprod, vtail, comment_tmpl tmpl = {'file-header': fhead, 'file-production': fprod, 'file-tail': ftail, 'enumeration-production': eprod, 'value-header': vhead, 'value-production': vprod, 'value-tail': vtail, 'comment': comment_tmpl, } in_ = 'junk' ifile = io.open(file, encoding="utf-8", errors="replace_and_warn") for line in ifile: m = re.match(r'\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\/', line) if m: if in_ == 'junk' and m.group(1) == 'BEGIN' and m.group(2) in tmpl: in_ = m.group(2) continue elif in_ == m.group(2) and m.group(1) == 'END' and m.group(2) in tmpl: in_ = 'junk' continue else: sys.exit("Malformed template file " + file) if in_ != 'junk': tmpl[in_] += line if in_ != 'junk': sys.exit("Malformed template file " + file) fhead = tmpl['file-header'] fprod = tmpl['file-production'] ftail = tmpl['file-tail'] eprod = tmpl['enumeration-production'] vhead = tmpl['value-header'] vprod = tmpl['value-production'] vtail = tmpl['value-tail'] comment_tmpl = tmpl['comment'] parser = argparse.ArgumentParser(epilog=help_epilog, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('--identifier-prefix', default='', dest='idprefix', help='Identifier prefix') parser.add_argument('--symbol-prefix', default='', dest='symprefix', help='Symbol prefix') parser.add_argument('--fhead', default=[], dest='fhead', action='append', help='Output file header') parser.add_argument('--ftail', default=[], dest='ftail', action='append', help='Output file footer') parser.add_argument('--fprod', default=[], dest='fprod', action='append', help='Put out TEXT every time a new input file is being processed.') parser.add_argument('--eprod', default=[], dest='eprod', action='append', help='Per enum text, produced prior to value iterations') parser.add_argument('--vhead', default=[], dest='vhead', action='append', help='Value header, produced before iterating over enum values') parser.add_argument('--vprod', default=[], dest='vprod', action='append', help='Value text, produced for each enum value.') parser.add_argument('--vtail', default=[], dest='vtail', action='append', help='Value tail, produced after iterating over enum values') parser.add_argument('--comments', default='', dest='comment_tmpl', help='Comment structure') parser.add_argument('--enums-only', default=False, action='store_true', dest='enumsonly', help='Only process enums, not flags') parser.add_argument('--flags-only', default=False, action='store_true', dest='flagsonly', help='Only process flags, not enums') parser.add_argument('--template', default='', dest='template', help='Template file') parser.add_argument('--output', default=None, dest='output') parser.add_argument('--version', '-v', default=False, action='store_true', dest='version', help='Print version information') parser.add_argument('args', nargs='*', help='One or more input files, or a single argument @rspfile_path ' 'pointing to a file that contains the actual arguments') # Support reading an rspfile of the form @filename which contains the args # to be parsed if len(sys.argv) == 2 and sys.argv[1].startswith('@'): args = get_rspfile_args(sys.argv[1][1:]) else: args = sys.argv[1:] options = parser.parse_args(args) if options.version: print(VERSION_STR) sys.exit(0) def unescape_cmdline_args(arg): arg = arg.replace('\\n', '\n') arg = arg.replace('\\r', '\r') return arg.replace('\\t', '\t') if options.template != '': read_template_file(options.template) idprefix += options.idprefix symprefix += options.symprefix enumsonly = options.enumsonly flagsonly = options.flagsonly # This is a hack to maintain some semblance of backward compatibility with # the old, Perl-based glib-mkenums. The old tool had an implicit ordering # on the arguments and templates; each argument was parsed in order, and # all the strings appended. This allowed developers to write: # # glib-mkenums \ # --fhead ... \ # --template a-template-file.c.in \ # --ftail ... # # And have the fhead be prepended to the file-head stanza in the template, # as well as the ftail be appended to the file-tail stanza in the template. # Short of throwing away ArgumentParser and going over sys.argv[] element # by element, we can simulate that behaviour by ensuring some ordering in # how we build the template strings: # # - the head stanzas are always prepended to the template # - the prod stanzas are always appended to the template # - the tail stanzas are always appended to the template # # Within each instance of the command line argument, we append each value # to the array in the order in which it appears on the command line. fhead = ''.join([unescape_cmdline_args(x) for x in options.fhead]) + fhead vhead = ''.join([unescape_cmdline_args(x) for x in options.vhead]) + vhead fprod += ''.join([unescape_cmdline_args(x) for x in options.fprod]) eprod += ''.join([unescape_cmdline_args(x) for x in options.eprod]) vprod += ''.join([unescape_cmdline_args(x) for x in options.vprod]) ftail = ftail + ''.join([unescape_cmdline_args(x) for x in options.ftail]) vtail = vtail + ''.join([unescape_cmdline_args(x) for x in options.vtail]) if options.comment_tmpl != '': comment_tmpl = unescape_cmdline_args(options.comment_tmpl) elif comment_tmpl == "": # default to C-style comments comment_tmpl = "/* \u0040comment\u0040 */" output = options.output if output is not None: (out_dir, out_fn) = os.path.split(options.output) out_suffix = '_' + os.path.splitext(out_fn)[1] if out_dir == '': out_dir = '.' fd, filename = tempfile.mkstemp(dir=out_dir) os.close(fd) tmpfile = io.open(filename, "w", encoding="utf-8") output_stream = tmpfile else: tmpfile = None # put auto-generation comment comment = comment_tmpl.replace('\u0040comment\u0040', 'This file is generated by glib-mkenums, do ' 'not modify it. This code is licensed under ' 'the same license as the containing project. ' 'Note that it links to GLib, so must comply ' 'with the LGPL linking clauses.') write_output("\n" + comment + '\n') def replace_specials(prod): prod = prod.replace(r'\\a', r'\a') prod = prod.replace(r'\\b', r'\b') prod = prod.replace(r'\\t', r'\t') prod = prod.replace(r'\\n', r'\n') prod = prod.replace(r'\\f', r'\f') prod = prod.replace(r'\\r', r'\r') prod = prod.rstrip() return prod def warn_if_filename_basename_used(section, prod): for substitution in ('\u0040filename\u0040', '\u0040basename\u0040'): if substitution in prod: print_warning('{} used in {} section.'.format(substitution, section)) if len(fhead) > 0: prod = fhead warn_if_filename_basename_used('file-header', prod) prod = replace_specials(prod) write_output(prod) def process_file(curfilename): global entries, flags, seenbitshift, enum_prefix firstenum = True try: curfile = io.open(curfilename, encoding="utf-8", errors="replace_and_warn") except IOError as e: if e.errno == errno.ENOENT: print_warning('No file "{}" found.'.format(curfilename)) return raise while True: line = curfile.readline() if not line: break line = line.strip() # read lines until we have no open comments while re.search(r'/\*([^*]|\*(?!/))*$', line): line += curfile.readline() # strip comments w/o options line = re.sub(r'''/\*(?!<) ([^*]+|\*(?!/))* \*/''', '', line) # ignore forward declarations if re.match(r'\s*typedef\s+enum.*;', line): continue m = re.match(r'''\s*typedef\s+enum\s*[_A-Za-z]*[_A-Za-z0-9]*\s* ({)?\s* (?:/\*< (([^*]|\*(?!/))*) >\s*\*/)? \s*({)?''', line, flags=re.X) if m: groups = m.groups() if len(groups) >= 2 and groups[1] is not None: options = parse_trigraph(groups[1]) if 'skip' in options: continue enum_prefix = options.get('prefix', None) flags = options.get('flags', None) if 'flags' in options: if flags is None: flags = 1 else: flags = int(flags) option_lowercase_name = options.get('lowercase_name', None) option_underscore_name = options.get('underscore_name', None) option_since = options.get('since', None) else: enum_prefix = None flags = None option_lowercase_name = None option_underscore_name = None option_since = None if option_lowercase_name is not None: if option_underscore_name is not None: print_warning("lowercase_name overridden with underscore_name") option_lowercase_name = None else: print_warning("lowercase_name is deprecated, use underscore_name") # Didn't have trailing '{' look on next lines if groups[0] is None and (len(groups) < 4 or groups[3] is None): while True: line = curfile.readline() if not line: print_error("Syntax error when looking for opening { in enum") if re.match(r'\s*\{', line): break seenbitshift = 0 entries = [] # Now parse the entries parse_entries(curfile, curfilename) # figure out if this was a flags or enums enumeration if flags is None: flags = seenbitshift if flags and enumsonly: continue elif not flags and flagsonly: continue # Autogenerate a prefix if enum_prefix is None: for entry in entries: if len(entry) < 3 or entry[2] is None: name = entry[0] if enum_prefix is not None: enum_prefix = os.path.commonprefix([name, enum_prefix]) else: enum_prefix = name if enum_prefix is None: enum_prefix = "" else: # Trim so that it ends in an underscore enum_prefix = re.sub(r'_[^_]*$', '_', enum_prefix) else: # canonicalize user defined prefixes enum_prefix = enum_prefix.upper() enum_prefix = enum_prefix.replace('-', '_') enum_prefix = re.sub(r'(.*)([^_])$', r'\1\2_', enum_prefix) fixed_entries = [] for e in entries: name = e[0] num = e[1] if len(e) < 3 or e[2] is None: nick = re.sub(r'^' + enum_prefix, '', name) nick = nick.replace('_', '-').lower() e = (name, num, nick) fixed_entries.append(e) entries = fixed_entries # Spit out the output if option_underscore_name is not None: enumlong = option_underscore_name.upper() enumsym = option_underscore_name.lower() enumshort = re.sub(r'^[A-Z][A-Z0-9]*_', '', enumlong) enumname_prefix = re.sub('_' + enumshort + '$', '', enumlong) elif symprefix == '' and idprefix == '': # enumname is e.g. GMatchType enspace = re.sub(r'^([A-Z][a-z]*).*$', r'\1', enumname) enumshort = re.sub(r'^[A-Z][a-z]*', '', enumname) enumshort = re.sub(r'([^A-Z])([A-Z])', r'\1_\2', enumshort) enumshort = re.sub(r'([A-Z][A-Z])([A-Z][0-9a-z])', r'\1_\2', enumshort) enumshort = enumshort.upper() enumname_prefix = re.sub(r'^([A-Z][a-z]*).*$', r'\1', enumname).upper() enumlong = enspace.upper() + "_" + enumshort enumsym = enspace.lower() + "_" + enumshort.lower() if option_lowercase_name is not None: enumsym = option_lowercase_name else: enumshort = enumname if idprefix: enumshort = re.sub(r'^' + idprefix, '', enumshort) else: enumshort = re.sub(r'/^[A-Z][a-z]*', '', enumshort) enumshort = re.sub(r'([^A-Z])([A-Z])', r'\1_\2', enumshort) enumshort = re.sub(r'([A-Z][A-Z])([A-Z][0-9a-z])', r'\1_\2', enumshort) enumshort = enumshort.upper() if symprefix: enumname_prefix = symprefix.upper() else: enumname_prefix = idprefix.upper() enumlong = enumname_prefix + "_" + enumshort enumsym = enumlong.lower() if option_since is not None: enumsince = option_since else: enumsince = "" if firstenum: firstenum = False if len(fprod) > 0: prod = fprod base = os.path.basename(curfilename) prod = prod.replace('\u0040filename\u0040', curfilename) prod = prod.replace('\u0040basename\u0040', base) prod = replace_specials(prod) write_output(prod) if len(eprod) > 0: prod = eprod prod = prod.replace('\u0040enum_name\u0040', enumsym) prod = prod.replace('\u0040EnumName\u0040', enumname) prod = prod.replace('\u0040ENUMSHORT\u0040', enumshort) prod = prod.replace('\u0040ENUMNAME\u0040', enumlong) prod = prod.replace('\u0040ENUMPREFIX\u0040', enumname_prefix) prod = prod.replace('\u0040enumsince\u0040', enumsince) if flags: prod = prod.replace('\u0040type\u0040', 'flags') else: prod = prod.replace('\u0040type\u0040', 'enum') if flags: prod = prod.replace('\u0040Type\u0040', 'Flags') else: prod = prod.replace('\u0040Type\u0040', 'Enum') if flags: prod = prod.replace('\u0040TYPE\u0040', 'FLAGS') else: prod = prod.replace('\u0040TYPE\u0040', 'ENUM') prod = replace_specials(prod) write_output(prod) if len(vhead) > 0: prod = vhead prod = prod.replace('\u0040enum_name\u0040', enumsym) prod = prod.replace('\u0040EnumName\u0040', enumname) prod = prod.replace('\u0040ENUMSHORT\u0040', enumshort) prod = prod.replace('\u0040ENUMNAME\u0040', enumlong) prod = prod.replace('\u0040ENUMPREFIX\u0040', enumname_prefix) prod = prod.replace('\u0040enumsince\u0040', enumsince) if flags: prod = prod.replace('\u0040type\u0040', 'flags') else: prod = prod.replace('\u0040type\u0040', 'enum') if flags: prod = prod.replace('\u0040Type\u0040', 'Flags') else: prod = prod.replace('\u0040Type\u0040', 'Enum') if flags: prod = prod.replace('\u0040TYPE\u0040', 'FLAGS') else: prod = prod.replace('\u0040TYPE\u0040', 'ENUM') prod = replace_specials(prod) write_output(prod) if len(vprod) > 0: prod = vprod next_num = 0 prod = replace_specials(prod) for name, num, nick in entries: tmp_prod = prod if '\u0040valuenum\u0040' in prod: # only attempt to eval the value if it is requested # this prevents us from throwing errors otherwise if num is not None: # use sandboxed evaluation as a reasonable # approximation to C constant folding inum = eval(num, {}, {}) # make sure it parsed to an integer if not isinstance(inum, int): sys.exit("Unable to parse enum value '%s'" % num) num = inum else: num = next_num tmp_prod = tmp_prod.replace('\u0040valuenum\u0040', str(num)) next_num = int(num) + 1 tmp_prod = tmp_prod.replace('\u0040VALUENAME\u0040', name) tmp_prod = tmp_prod.replace('\u0040valuenick\u0040', nick) if flags: tmp_prod = tmp_prod.replace('\u0040type\u0040', 'flags') else: tmp_prod = tmp_prod.replace('\u0040type\u0040', 'enum') if flags: tmp_prod = tmp_prod.replace('\u0040Type\u0040', 'Flags') else: tmp_prod = tmp_prod.replace('\u0040Type\u0040', 'Enum') if flags: tmp_prod = tmp_prod.replace('\u0040TYPE\u0040', 'FLAGS') else: tmp_prod = tmp_prod.replace('\u0040TYPE\u0040', 'ENUM') tmp_prod = tmp_prod.rstrip() write_output(tmp_prod) if len(vtail) > 0: prod = vtail prod = prod.replace('\u0040enum_name\u0040', enumsym) prod = prod.replace('\u0040EnumName\u0040', enumname) prod = prod.replace('\u0040ENUMSHORT\u0040', enumshort) prod = prod.replace('\u0040ENUMNAME\u0040', enumlong) prod = prod.replace('\u0040ENUMPREFIX\u0040', enumname_prefix) prod = prod.replace('\u0040enumsince\u0040', enumsince) if flags: prod = prod.replace('\u0040type\u0040', 'flags') else: prod = prod.replace('\u0040type\u0040', 'enum') if flags: prod = prod.replace('\u0040Type\u0040', 'Flags') else: prod = prod.replace('\u0040Type\u0040', 'Enum') if flags: prod = prod.replace('\u0040TYPE\u0040', 'FLAGS') else: prod = prod.replace('\u0040TYPE\u0040', 'ENUM') prod = replace_specials(prod) write_output(prod) for fname in sorted(options.args): process_file(fname) if len(ftail) > 0: prod = ftail warn_if_filename_basename_used('file-tail', prod) prod = replace_specials(prod) write_output(prod) # put auto-generation comment comment = comment_tmpl comment = comment.replace('\u0040comment\u0040', 'Generated data ends here') write_output("\n" + comment + "\n") if tmpfile is not None: tmpfilename = tmpfile.name tmpfile.close() try: os.unlink(options.output) except OSError as error: if error.errno != errno.ENOENT: raise error os.rename(tmpfilename, options.output) libqmi-1.35.2-dev/build-aux/templates/000077500000000000000000000000001455567757300175535ustar00rootroot00000000000000libqmi-1.35.2-dev/build-aux/templates/qfu-enum-types.c.template000077700000000000000000000000001455567757300312732qmi-enum-types.c.templateustar00rootroot00000000000000libqmi-1.35.2-dev/build-aux/templates/qfu-enum-types.h.template000077700000000000000000000000001455567757300324052qmi-enum-types-nodoc.h.templateustar00rootroot00000000000000libqmi-1.35.2-dev/build-aux/templates/qmi-enum-types-nodoc.h.template000066400000000000000000000010521455567757300255260ustar00rootroot00000000000000/*** BEGIN file-header ***/ #include G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ GType @enum_name@_get_type (void) G_GNUC_CONST; #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) /* Define type-specific symbols */ #define __@ENUMNAME@_IS_@TYPE@__ const gchar *@enum_name@_get_string (@EnumName@ val); /*** END value-header ***/ /*** BEGIN file-tail ***/ G_END_DECLS /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-enum-types-private.c.template000077700000000000000000000000001455567757300327362qmi-enum-types.c.templateustar00rootroot00000000000000libqmi-1.35.2-dev/build-aux/templates/qmi-enum-types-private.h.template000077700000000000000000000000001455567757300340502qmi-enum-types-nodoc.h.templateustar00rootroot00000000000000libqmi-1.35.2-dev/build-aux/templates/qmi-enum-types.c.template000066400000000000000000000026221455567757300244250ustar00rootroot00000000000000/*** BEGIN file-header ***/ /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ static const G@Type@Value @enum_name@_values[] = { /*** END value-header ***/ /*** BEGIN value-production ***/ { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, /*** END value-production ***/ /*** BEGIN value-tail ***/ { 0, NULL, NULL } }; /* Define type-specific symbols */ GType @enum_name@_get_type (void) { static gsize g_define_type_id_initialized = 0; if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_@type@_register_static (g_intern_static_string ("@EnumName@"), @enum_name@_values); g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } return g_define_type_id_initialized; } /* Enum-specific method to get the value as a string. * We get the nick of the GEnumValue. Note that this will be * valid even if the GEnumClass is not referenced anywhere. */ const gchar * @enum_name@_get_string (@EnumName@ val) { guint i; for (i = 0; @enum_name@_values[i].value_nick; i++) { if ((gint)val == @enum_name@_values[i].value) return @enum_name@_values[i].value_nick; } return NULL; } /*** END value-tail ***/ /*** BEGIN file-tail ***/ /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-enum-types.h.template000066400000000000000000000014631455567757300244340ustar00rootroot00000000000000/*** BEGIN file-header ***/ #include G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ GType @enum_name@_get_type (void) G_GNUC_CONST; #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) /* Define type-specific symbols */ #define __@ENUMNAME@_IS_@TYPE@__ /** * @enum_name@_get_string: * @val: a @EnumName@. * * Gets the nickname string for the #@EnumName@ specified at @val. * * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value. * Since: @enumsince@ */ const gchar *@enum_name@_get_string (@EnumName@ val); /*** END value-header ***/ /*** BEGIN file-tail ***/ G_END_DECLS /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-error-quarks.c.template000066400000000000000000000017431455567757300247570ustar00rootroot00000000000000/*** BEGIN file-header ***/ #include /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ #define ERROR_PREFIX @ENUMNAME@_DBUS_PREFIX static const GDBusErrorEntry @enum_name@_entries[] = { /*** END value-header ***/ /*** BEGIN value-production ***/ { @VALUENAME@, ERROR_PREFIX ".@valuenick@" }, /*** END value-production ***/ /*** BEGIN value-tail ***/ }; #undef ERROR_PREFIX GQuark @enum_name@_quark (void) { static volatile gsize quark_volatile = 0; if (!quark_volatile) g_dbus_error_register_error_domain ("@enum_name@_quark", &quark_volatile, @enum_name@_entries, G_N_ELEMENTS (@enum_name@_entries)); return (GQuark) quark_volatile; } /*** END value-tail ***/ /*** BEGIN file-tail ***/ /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-error-types.c.template000066400000000000000000000026551455567757300246200ustar00rootroot00000000000000/*** BEGIN file-header ***/ /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ static const G@Type@Value @enum_name@_values[] = { /*** END value-header ***/ /*** BEGIN value-production ***/ { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, /*** END value-production ***/ /*** BEGIN value-tail ***/ { 0, NULL, NULL } }; /* @enum_name@_quark() implemented in qmi-errors-quarks.c */ GType @enum_name@_get_type (void) { static gsize g_define_type_id_initialized = 0; if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_@type@_register_static (g_intern_static_string ("@EnumName@"), @enum_name@_values); g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } return g_define_type_id_initialized; } /* Enum-specific method to get the value as a string. * We get the nick of the GEnumValue. Note that this will be * valid even if the GEnumClass is not referenced anywhere. */ const gchar * @enum_name@_get_string (@EnumName@ val) { guint i; for (i = 0; @enum_name@_values[i].value_nick; i++) { if ((gint)val == @enum_name@_values[i].value) return @enum_name@_values[i].value_nick; } return NULL; } /*** END value-tail ***/ /*** BEGIN file-tail ***/ /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-error-types.h.template000066400000000000000000000014741455567757300246230ustar00rootroot00000000000000/*** BEGIN file-header ***/ #include G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ GQuark @enum_name@_quark (void); GType @enum_name@_get_type (void) G_GNUC_CONST; #define @ENUMNAME@ (@enum_name@_quark ()) #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) /** * @enum_name@_get_string: * @val: a @EnumName@. * * Gets the nickname string for the #@EnumName@ specified at @val. * * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value. * Since: @enumsince@ */ const gchar *@enum_name@_get_string (@EnumName@ val); /*** END value-header ***/ /*** BEGIN file-tail ***/ G_END_DECLS /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-flag-types-nodoc.h.template000066400000000000000000000010611455567757300254730ustar00rootroot00000000000000/*** BEGIN file-header ***/ #include G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ GType @enum_name@_get_type (void) G_GNUC_CONST; #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) /* Define type-specific symbols */ #define __@ENUMNAME@_IS_@TYPE@__ gchar *@enum_name@_build_string_from_mask (@EnumName@ mask); /*** END value-header ***/ /*** BEGIN file-tail ***/ G_END_DECLS /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-flag-types-private.c.template000077700000000000000000000000001455567757300326502qmi-flag-types.c.templateustar00rootroot00000000000000libqmi-1.35.2-dev/build-aux/templates/qmi-flag-types-private.h.template000077700000000000000000000000001455567757300337622qmi-flag-types-nodoc.h.templateustar00rootroot00000000000000libqmi-1.35.2-dev/build-aux/templates/qmi-flag-types.c.template000066400000000000000000000044221455567757300243720ustar00rootroot00000000000000/*** BEGIN file-header ***/ /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ static const G@Type@Value @enum_name@_values[] = { /*** END value-header ***/ /*** BEGIN value-production ***/ { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, /*** END value-production ***/ /*** BEGIN value-tail ***/ { 0, NULL, NULL } }; /* Define type-specific symbols */ GType @enum_name@_get_type (void) { static gsize g_define_type_id_initialized = 0; if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_@type@_register_static (g_intern_static_string ("@EnumName@"), @enum_name@_values); g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } return g_define_type_id_initialized; } /* Flags-specific method to build a string with the given mask. * We get a comma separated list of the nicks of the GFlagsValues. * Note that this will be valid even if the GFlagsClass is not referenced * anywhere. */ gchar * @enum_name@_build_string_from_mask (@EnumName@ mask) { guint i; gboolean first = TRUE; GString *str = NULL; for (i = 0; @enum_name@_values[i].value_nick; i++) { /* We also look for exact matches */ if ((guint)mask == @enum_name@_values[i].value) { if (str) g_string_free (str, TRUE); return g_strdup (@enum_name@_values[i].value_nick); } /* Build list with single-bit masks */ if (mask & @enum_name@_values[i].value) { guint c; gulong number = @enum_name@_values[i].value; for (c = 0; number; c++) number &= number - 1; if (c == 1) { if (!str) str = g_string_new (""); g_string_append_printf (str, "%s%s", first ? "" : ", ", @enum_name@_values[i].value_nick); if (first) first = FALSE; } } } return (str ? g_string_free (str, FALSE) : NULL); } /*** END value-tail ***/ /*** BEGIN file-tail ***/ /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-flag-types.h.template000066400000000000000000000016241455567757300244000ustar00rootroot00000000000000/*** BEGIN file-header ***/ #include G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ GType @enum_name@_get_type (void) G_GNUC_CONST; #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) /* Define type-specific symbols */ #define __@ENUMNAME@_IS_@TYPE@__ /** * @enum_name@_build_string_from_mask: * @mask: bitmask of @EnumName@ values. * * Builds a string containing a comma-separated list of nicknames for * each #@EnumName@ in @mask. * * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free(). * Since: @enumsince@ */ gchar *@enum_name@_build_string_from_mask (@EnumName@ mask); /*** END value-header ***/ /*** BEGIN file-tail ***/ G_END_DECLS /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-flags64-types.c.template000066400000000000000000000032721455567757300247310ustar00rootroot00000000000000/*** BEGIN file-header ***/ typedef struct { guint64 value; const gchar *value_name; const gchar *value_nick; } GFlags64Value; /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ static const GFlags64Value @enum_name@_values[] = { /*** END value-header ***/ /*** BEGIN value-production ***/ { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, /*** END value-production ***/ /*** BEGIN value-tail ***/ { 0, NULL, NULL } }; gchar * @enum_name@_build_string_from_mask (@EnumName@ mask) { guint i; gboolean first = TRUE; GString *str = NULL; for (i = 0; @enum_name@_values[i].value_nick; i++) { /* We also look for exact matches */ if (mask == @enum_name@_values[i].value) { if (str) g_string_free (str, TRUE); return g_strdup (@enum_name@_values[i].value_nick); } /* Build list with single-bit masks */ if (mask & @enum_name@_values[i].value) { guint c; guint64 number = @enum_name@_values[i].value; for (c = 0; number; c++) number &= number - 1; if (c == 1) { if (!str) str = g_string_new (""); g_string_append_printf (str, "%s%s", first ? "" : ", ", @enum_name@_values[i].value_nick); if (first) first = FALSE; } } } return (str ? g_string_free (str, FALSE) : NULL); } /*** END value-tail ***/ /*** BEGIN file-tail ***/ /*** END file-tail ***/ libqmi-1.35.2-dev/build-aux/templates/qmi-flags64-types.h.template000066400000000000000000000015451455567757300247370ustar00rootroot00000000000000/*** BEGIN file-header ***/ #include G_BEGIN_DECLS /*** END file-header ***/ /*** BEGIN file-production ***/ /* enumerations from "@filename@" */ /*** END file-production ***/ /*** BEGIN value-header ***/ #define __@ENUMNAME@_IS_@TYPE@__ #if defined __@ENUMNAME@_IS_ENUM__ #error Only flags expected, @EnumName@ is an enumeration #endif /** * @enum_name@_build_string_from_mask: * @mask: bitmask of @EnumName@ values. * * Builds a string containing a comma-separated list of nicknames for * each #@EnumName@ in @mask. * * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free(). * Since: @enumsince@ */ gchar *@enum_name@_build_string_from_mask (@EnumName@ mask); /*** END value-header ***/ /*** BEGIN file-tail ***/ G_END_DECLS /*** END file-tail ***/ libqmi-1.35.2-dev/data/000077500000000000000000000000001455567757300145745ustar00rootroot00000000000000libqmi-1.35.2-dev/data/qmi-collection-basic.json000066400000000000000000000177451455567757300215030ustar00rootroot00000000000000 // Basic set of QMI messages required to use libqmi alongside // the ModemManager daemon, and also including support for the // qmi-firmware-update program [ "QMI_MESSAGE_DMS_SET_EVENT_REPORT", "QMI_INDICATION_DMS_EVENT_REPORT", "QMI_MESSAGE_DMS_GET_CAPABILITIES", "QMI_MESSAGE_DMS_GET_MANUFACTURER", "QMI_MESSAGE_DMS_GET_MODEL", "QMI_MESSAGE_DMS_GET_REVISION", "QMI_MESSAGE_DMS_GET_HARDWARE_REVISION", "QMI_MESSAGE_DMS_GET_IDS", "QMI_MESSAGE_DMS_GET_MSISDN", "QMI_MESSAGE_DMS_UIM_VERIFY_PIN", "QMI_MESSAGE_DMS_UIM_UNBLOCK_PIN", "QMI_MESSAGE_DMS_UIM_CHANGE_PIN", "QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS", "QMI_MESSAGE_DMS_UIM_GET_IMSI", "QMI_MESSAGE_DMS_UIM_GET_ICCID", "QMI_MESSAGE_DMS_UIM_SET_PIN_PROTECTION", "QMI_MESSAGE_DMS_UIM_GET_CK_STATUS", "QMI_MESSAGE_DMS_GET_ACTIVATION_STATE", "QMI_MESSAGE_DMS_ACTIVATE_AUTOMATIC", "QMI_MESSAGE_DMS_ACTIVATE_MANUAL", "QMI_MESSAGE_DMS_GET_OPERATING_MODE", "QMI_MESSAGE_DMS_SET_OPERATING_MODE", "QMI_MESSAGE_DMS_GET_BAND_CAPABILITIES", "QMI_MESSAGE_DMS_RESTORE_FACTORY_DEFAULTS", "QMI_MESSAGE_DMS_SET_FIRMWARE_ID", "QMI_MESSAGE_DMS_GET_FIRMWARE_PREFERENCE", "QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE", "QMI_MESSAGE_DMS_LIST_STORED_IMAGES", "QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO", "QMI_MESSAGE_DMS_SET_BOOT_IMAGE_DOWNLOAD_MODE", "QMI_MESSAGE_DMS_SWI_GET_CURRENT_FIRMWARE", "QMI_MESSAGE_DMS_SET_FCC_AUTHENTICATION", "QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION", "QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION", "QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION_V2", "QMI_MESSAGE_NAS_ABORT", "QMI_MESSAGE_NAS_SET_EVENT_REPORT", "QMI_INDICATION_NAS_EVENT_REPORT", "QMI_MESSAGE_NAS_GET_SERVING_SYSTEM", "QMI_INDICATION_NAS_SERVING_SYSTEM", "QMI_MESSAGE_NAS_GET_HOME_NETWORK", "QMI_MESSAGE_NAS_INITIATE_NETWORK_REGISTER", "QMI_MESSAGE_NAS_NETWORK_SCAN", "QMI_MESSAGE_NAS_REGISTER_INDICATIONS", "QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH", "QMI_MESSAGE_NAS_GET_SIGNAL_INFO", "QMI_INDICATION_NAS_SIGNAL_INFO", "QMI_MESSAGE_NAS_CONFIG_SIGNAL_INFO", "QMI_MESSAGE_NAS_CONFIG_SIGNAL_INFO_V2", "QMI_MESSAGE_NAS_GET_SYSTEM_INFO", "QMI_INDICATION_NAS_SYSTEM_INFO", "QMI_MESSAGE_NAS_GET_TECHNOLOGY_PREFERENCE", "QMI_MESSAGE_NAS_SET_TECHNOLOGY_PREFERENCE", "QMI_MESSAGE_NAS_GET_SYSTEM_SELECTION_PREFERENCE", "QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE", "QMI_MESSAGE_NAS_GET_RF_BAND_INFORMATION", "QMI_MESSAGE_NAS_GET_PLMN_NAME", "QMI_INDICATION_NAS_NETWORK_REJECT", "QMI_MESSAGE_NAS_GET_PREFERRED_NETWORKS", "QMI_MESSAGE_NAS_SET_PREFERRED_NETWORKS", "QMI_MESSAGE_NAS_ATTACH_DETACH", "QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO", "QMI_MESSAGE_UIM_REGISTER_EVENTS", "QMI_MESSAGE_UIM_VERIFY_PIN", "QMI_MESSAGE_UIM_UNBLOCK_PIN", "QMI_MESSAGE_UIM_CHANGE_PIN", "QMI_MESSAGE_UIM_SET_PIN_PROTECTION", "QMI_MESSAGE_UIM_GET_CARD_STATUS", "QMI_MESSAGE_UIM_READ_TRANSPARENT", "QMI_MESSAGE_UIM_SWITCH_SLOT", "QMI_MESSAGE_UIM_GET_SLOT_STATUS", "QMI_INDICATION_UIM_SLOT_STATUS", "QMI_MESSAGE_UIM_REFRESH_REGISTER", "QMI_MESSAGE_UIM_REFRESH_REGISTER_ALL", "QMI_MESSAGE_UIM_REFRESH_COMPLETE", "QMI_INDICATION_UIM_REFRESH", "QMI_MESSAGE_UIM_GET_CONFIGURATION", "QMI_MESSAGE_UIM_DEPERSONALIZATION", "QMI_MESSAGE_UIM_REMOTE_UNLOCK", "QMI_MESSAGE_WDS_ABORT", "QMI_MESSAGE_WDS_SET_EVENT_REPORT", "QMI_INDICATION_WDS_EVENT_REPORT", "QMI_MESSAGE_WDS_START_NETWORK", "QMI_MESSAGE_WDS_STOP_NETWORK", "QMI_MESSAGE_WDS_SET_IP_FAMILY", "QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS", "QMI_INDICATION_WDS_PACKET_SERVICE_STATUS", "QMI_MESSAGE_WDS_GET_PACKET_STATISTICS", "QMI_MESSAGE_WDS_GET_CURRENT_SETTINGS", "QMI_MESSAGE_WDS_GET_AUTOCONNECT_SETTINGS", "QMI_MESSAGE_WDS_SET_AUTOCONNECT_SETTINGS", "QMI_MESSAGE_WDS_BIND_DATA_PORT", "QMI_MESSAGE_WDS_BIND_MUX_DATA_PORT", "QMI_MESSAGE_WDS_CREATE_PROFILE", "QMI_MESSAGE_WDS_MODIFY_PROFILE", "QMI_MESSAGE_WDS_DELETE_PROFILE", "QMI_MESSAGE_WDS_GET_PROFILE_LIST", "QMI_MESSAGE_WDS_GET_PROFILE_SETTINGS", "QMI_MESSAGE_WDS_GET_LTE_ATTACH_PARAMETERS", "QMI_MESSAGE_WDS_GET_LTE_ATTACH_PDN_LIST", "QMI_MESSAGE_WDS_SET_LTE_ATTACH_PDN_LIST", "QMI_MESSAGE_WDS_INDICATION_REGISTER", "QMI_INDICATION_WDS_EXTENDED_IP_CONFIG", "QMI_MESSAGE_WDS_CONFIGURE_PROFILE_EVENT_LIST", "QMI_INDICATION_WDS_PROFILE_CHANGED", "QMI_MESSAGE_WDA_GET_DATA_FORMAT", "QMI_MESSAGE_WDA_SET_DATA_FORMAT", "QMI_MESSAGE_PDC_ACTIVATE_CONFIG", "QMI_INDICATION_PDC_ACTIVATE_CONFIG", "QMI_MESSAGE_PDC_SET_SELECTED_CONFIG", "QMI_INDICATION_PDC_SET_SELECTED_CONFIG", "QMI_MESSAGE_PDC_LIST_CONFIGS", "QMI_INDICATION_PDC_LIST_CONFIGS", "QMI_MESSAGE_PDC_GET_SELECTED_CONFIG", "QMI_INDICATION_PDC_GET_SELECTED_CONFIG", "QMI_MESSAGE_PDC_SET_SELECTED_CONFIG", "QMI_INDICATION_PDC_SET_SELECTED_CONFIG", "QMI_MESSAGE_PDC_GET_CONFIG_INFO", "QMI_INDICATION_PDC_GET_CONFIG_INFO", "QMI_MESSAGE_PDC_REGISTER", "QMI_INDICATION_PDC_REFRESH", "QMI_MESSAGE_PDS_SET_EVENT_REPORT", "QMI_INDICATION_PDS_EVENT_REPORT", "QMI_MESSAGE_PDS_GET_AGPS_CONFIG", "QMI_MESSAGE_PDS_SET_AGPS_CONFIG", "QMI_MESSAGE_PDS_GET_GPS_SERVICE_STATE", "QMI_MESSAGE_PDS_SET_GPS_SERVICE_STATE", "QMI_MESSAGE_PDS_SET_AUTO_TRACKING_STATE", "QMI_MESSAGE_PDS_GET_DEFAULT_TRACKING_SESSION", "QMI_MESSAGE_PDS_SET_DEFAULT_TRACKING_SESSION", "QMI_MESSAGE_LOC_START", "QMI_MESSAGE_LOC_STOP", "QMI_MESSAGE_LOC_REGISTER_EVENTS", "QMI_INDICATION_LOC_NMEA", "QMI_MESSAGE_LOC_GET_SERVER", "QMI_INDICATION_LOC_GET_SERVER", "QMI_MESSAGE_LOC_SET_SERVER", "QMI_INDICATION_LOC_SET_SERVER", "QMI_MESSAGE_LOC_SET_OPERATION_MODE", "QMI_INDICATION_LOC_SET_OPERATION_MODE", "QMI_MESSAGE_LOC_GET_OPERATION_MODE", "QMI_INDICATION_LOC_GET_OPERATION_MODE", "QMI_MESSAGE_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE", "QMI_INDICATION_LOC_GET_PREDICTED_ORBITS_DATA_SOURCE", "QMI_MESSAGE_LOC_INJECT_XTRA_DATA", "QMI_INDICATION_LOC_INJECT_XTRA_DATA", "QMI_MESSAGE_LOC_INJECT_PREDICTED_ORBITS_DATA", "QMI_INDICATION_LOC_INJECT_PREDICTED_ORBITS_DATA", "QMI_MESSAGE_LOC_SET_NMEA_TYPES", "QMI_INDICATION_LOC_SET_NMEA_TYPES", "QMI_MESSAGE_LOC_GET_NMEA_TYPES", "QMI_INDICATION_LOC_GET_NMEA_TYPES", "QMI_MESSAGE_WMS_SET_EVENT_REPORT", "QMI_INDICATION_WMS_EVENT_REPORT", "QMI_MESSAGE_WMS_RAW_WRITE", "QMI_MESSAGE_WMS_RAW_SEND", "QMI_MESSAGE_WMS_RAW_READ", "QMI_MESSAGE_WMS_LIST_MESSAGES", "QMI_MESSAGE_WMS_SEND_FROM_MEMORY_STORAGE", "QMI_MESSAGE_WMS_SET_ROUTES", "QMI_MESSAGE_WMS_DELETE", "QMI_MESSAGE_WMS_SEND_ACK", "QMI_MESSAGE_OMA_SET_EVENT_REPORT", "QMI_INDICATION_OMA_EVENT_REPORT", "QMI_MESSAGE_OMA_GET_FEATURE_SETTING", "QMI_MESSAGE_OMA_SET_FEATURE_SETTING", "QMI_MESSAGE_OMA_START_SESSION", "QMI_MESSAGE_OMA_CANCEL_SESSION", "QMI_MESSAGE_OMA_SEND_SELECTION", "QMI_MESSAGE_SAR_RF_GET_STATE", "QMI_MESSAGE_SAR_RF_SET_STATE", "QMI_MESSAGE_VOICE_INDICATION_REGISTER", "QMI_MESSAGE_VOICE_ORIGINATE_USSD", "QMI_MESSAGE_VOICE_ANSWER_USSD", "QMI_MESSAGE_VOICE_CANCEL_USSD", "QMI_MESSAGE_VOICE_DIAL_CALL", "QMI_MESSAGE_VOICE_END_CALL", "QMI_MESSAGE_VOICE_ANSWER_CALL", "QMI_MESSAGE_VOICE_MANAGE_CALLS", "QMI_MESSAGE_VOICE_SET_SUPPLEMENTARY_SERVICE", "QMI_MESSAGE_VOICE_GET_CALL_WAITING", "QMI_MESSAGE_VOICE_GET_ALL_CALL_INFO", "QMI_MESSAGE_VOICE_BURST_DTMF", "QMI_MESSAGE_VOICE_START_CONTINUOUS_DTMF", "QMI_MESSAGE_VOICE_STOP_CONTINUOUS_DTMF", "QMI_INDICATION_VOICE_SUPPLEMENTARY_SERVICE", "QMI_INDICATION_VOICE_ALL_CALL_STATUS", "QMI_INDICATION_VOICE_USSD", "QMI_INDICATION_VOICE_RELEASE_USSD", "QMI_MESSAGE_DPM_OPEN_PORT", "QMI_MESSAGE_FOX_GET_FIRMWARE_VERSION", "QMI_MESSAGE_DSD_GET_SYSTEM_STATUS", "QMI_MESSAGE_DSD_SYSTEM_STATUS_CHANGE", "QMI_INDICATION_DSD_SYSTEM_STATUS" ] libqmi-1.35.2-dev/data/qmi-collection-minimal.json000066400000000000000000000025451455567757300220400ustar00rootroot00000000000000 // Minimal set of QMI messages required to setup a basic connection // and do basic monitoring of the status. The qmi-network program // will work successfully with this message set, unlike the // qmi-firmware-update program, which cannot even be built. [ "QMI_MESSAGE_DMS_GET_CAPABILITIES", "QMI_MESSAGE_DMS_GET_MANUFACTURER", "QMI_MESSAGE_DMS_GET_MODEL", "QMI_MESSAGE_DMS_GET_IDS", "QMI_MESSAGE_DMS_UIM_VERIFY_PIN", "QMI_MESSAGE_DMS_UIM_UNBLOCK_PIN", "QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS", "QMI_MESSAGE_DMS_UIM_GET_IMSI", "QMI_MESSAGE_DMS_GET_OPERATING_MODE", "QMI_MESSAGE_DMS_SET_OPERATING_MODE", "QMI_MESSAGE_NAS_ABORT", "QMI_MESSAGE_NAS_GET_SERVING_SYSTEM", "QMI_MESSAGE_NAS_GET_HOME_NETWORK", "QMI_MESSAGE_NAS_INITIATE_NETWORK_REGISTER", "QMI_MESSAGE_NAS_NETWORK_SCAN", "QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH", "QMI_MESSAGE_NAS_GET_SIGNAL_INFO", "QMI_MESSAGE_NAS_GET_SYSTEM_INFO", "QMI_MESSAGE_UIM_VERIFY_PIN", "QMI_MESSAGE_UIM_UNBLOCK_PIN", "QMI_MESSAGE_UIM_GET_CARD_STATUS", "QMI_MESSAGE_WDS_ABORT", "QMI_MESSAGE_WDS_START_NETWORK", "QMI_MESSAGE_WDS_STOP_NETWORK", "QMI_MESSAGE_WDS_SET_IP_FAMILY", "QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS", "QMI_MESSAGE_WDS_GET_CURRENT_SETTINGS", "QMI_MESSAGE_WDA_GET_DATA_FORMAT", "QMI_MESSAGE_WDA_SET_DATA_FORMAT" ] libqmi-1.35.2-dev/data/qmi-common.json000066400000000000000000000014241455567757300175440ustar00rootroot00000000000000[ { "common-ref" : "Operation Result", "name" : "Result", "fullname" : "Qmi Message Result", "id" : "0x02", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Error Status", "format" : "guint16" }, { "name" : "Error Code", "format" : "guint16" } ] }, { "common-ref" : "Success", "type" : "prerequisite", "field" : "Result Error Status", "operation" : "==", "value" : "QMI_STATUS_SUCCESS" }, { "common-ref" : "No Success", "type" : "prerequisite", "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" } ] libqmi-1.35.2-dev/data/qmi-service-atr.json000066400000000000000000000035071455567757300205040ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "ATR", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client ATR", "type" : "Client", "since" : "1.34" }, // ********************************************************************************* { "name" : "QMI Message ATR", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication ATR", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Send", "type" : "Message", "service" : "ATR", "id" : "0x0000", "since" : "1.34", "input" : [ { "name" : "Message", "id" : "0x01", "type" : "TLV", "since" : "1.34", "format" : "string", "size-prefix-format" : "guint16", "max-size" : "1024" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Received", "type" : "Indication", "service" : "ATR", "id" : "0x0001", "since" : "1.34", "output" : [ { "name" : "Message", "id" : "0x01", "type" : "TLV", "since" : "1.34", "format" : "string", "size-prefix-format" : "guint16" } ] } ] libqmi-1.35.2-dev/data/qmi-service-ctl.json000066400000000000000000000247721455567757300205070ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "CTL", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client CTL", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message CTL", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication CTL", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Set Instance ID", "type" : "Message", "service" : "CTL", "id" : "0x0020", "since" : "1.0", "input" : [ { "name" : "ID", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Link ID", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint16", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Version Info", "type" : "Message", "service" : "CTL", "id" : "0x0021", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Service list", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Service", "format" : "struct", "contents" : [ { "name" : "Service", "format" : "guint8", "public-format" : "QmiService" }, { "name" : "Major version", "format" : "guint16" }, { "name" : "Minor version", "format" : "guint16" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Allocate CID", "type" : "Message", "service" : "CTL", "id" : "0x0022", "since" : "1.0", "input" : [ { "name" : "Service", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8" , "public-format" : "QmiService" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Allocation Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service", "format" : "guint8", "public-format" : "QmiService" }, { "name" : "Cid", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Release CID", "type" : "Message", "service" : "CTL", "id" : "0x0023", "since" : "1.0", "input" : [ { "name" : "Release Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service", "format" : "guint8", "public-format" : "QmiService" }, { "name" : "Cid", "format" : "guint8" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Release Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service", "format" : "guint8", "public-format" : "QmiService" }, { "name" : "Cid", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Data Format", "type" : "Message", "service" : "CTL", "id" : "0x0026", "since" : "1.0", "input" : [ { "name" : "Format", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiCtlDataFormat" }, { "name" : "Protocol", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiCtlDataLinkProtocol" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Protocol", "id" : "0x10", "mandatory" : "yes", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiCtlDataLinkProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Sync", "type" : "Message", "service" : "CTL", "id" : "0x0027", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Sync", "type" : "Indication", "service" : "CTL", "id" : "0x0027", "since" : "1.0" }, // ********************************************************************************* // Internal { "name" : "Internal Proxy Open", "type" : "Message", "service" : "CTL", "id" : "0xFF00", "since" : "1.8", "input" : [ { "name" : "Device Path", "id" : "0x01", "type" : "TLV", "since" : "1.8", "format" : "string" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* // Internal { "name" : "Internal Allocate CID QRTR", "type" : "Message", "service" : "CTL", "id" : "0xFF22", "since" : "1.0", "input" : [ { "name" : "Service", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint16" , "public-format" : "QmiService" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Allocation Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service", "format" : "guint16", "public-format" : "QmiService" }, { "name" : "Cid", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* // Internal { "name" : "Internal Release CID QRTR", "type" : "Message", "service" : "CTL", "id" : "0xFF23", "since" : "1.0", "input" : [ { "name" : "Release Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service", "format" : "guint16", "public-format" : "QmiService" }, { "name" : "Cid", "format" : "guint8" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Release Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service", "format" : "guint16", "public-format" : "QmiService" }, { "name" : "Cid", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-dms.json000066400000000000000000002231621455567757300205020ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "DMS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client DMS", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message DMS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication DMS", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "DMS", "id" : "0x0000", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Event Report", "type" : "Message", "service" : "DMS", "id" : "0x0001", "since" : "1.0", "input" : [ { "name" : "Power State Reporting", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Battery Level Report Limits", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Lower Limit", "format" : "guint8" }, { "name" : "Upper Limit", "format" : "guint8" } ] }, { "name" : "PIN State Reporting", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Activation State Reporting", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Operating Mode Reporting", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "UIM State Reporting", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Wireless Disable State Reporting", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Init Reporting", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Event Report", "type" : "Indication", "service" : "DMS", "id" : "0x0001", "since" : "1.0", "output" : [ { "name" : "Power State", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Power State Flags", "format" : "guint8" }, { "name" : "Battery Level", "format" : "guint8" } ] }, { "name" : "PIN1 Status", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Current Status", "format" : "guint8", "public-format" : "QmiDmsUimPinStatus" }, { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ] }, { "name" : "PIN2 Status", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Current Status", "format" : "guint8", "public-format" : "QmiDmsUimPinStatus" }, { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ] }, { "name" : "Activation State", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiDmsActivationState" }, { "name" : "Operating Mode", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiDmsOperatingMode" }, { "name" : "UIM State", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiDmsUimState" }, { "name" : "Wireless Disable State", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Init Notification", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ] }, // ********************************************************************************* { "name" : "Get Capabilities", "type" : "Message", "service" : "DMS", "id" : "0x0020", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Max Tx Channel Rate", "format" : "guint32" }, { "name" : "Max Rx Channel Rate", "format" : "guint32" }, { "name" : "Data Service Capability", "format" : "guint8", "public-format" : "QmiDmsDataServiceCapability" }, { "name" : "SIM Capability", "format" : "guint8", "public-format" : "QmiDmsSimCapability" }, { "name" : "Radio Interface List", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8", "public-format" : "QmiDmsRadioInterface" } } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Manufacturer", "type" : "Message", "service" : "DMS", "id" : "0x0021", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Manufacturer", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Model", "type" : "Message", "service" : "DMS", "id" : "0x0022", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Model", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Revision", "type" : "Message", "service" : "DMS", "id" : "0x0023", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Revision", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get MSISDN", "type" : "Message", "service" : "DMS", "id" : "0x0024", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "MSISDN", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get IDs", "type" : "Message", "service" : "DMS", "id" : "0x0025", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Esn", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Imei", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "string", "max-size" : "15", "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Meid", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "string", "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Imei Software Version", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Power State", "type" : "Message", "service" : "DMS", "id" : "0x0026", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Power State Flags", "format" : "guint8" }, { "name" : "Battery Level", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "UIM Set PIN Protection", "type" : "Message", "service" : "DMS", "id" : "0x0027", "since" : "1.0", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Pin ID", "format" : "guint8", "public-format" : "QmiDmsUimPinId" }, { "name" : "Protection Enabled", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PIN", "format" : "string", "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Pin Retries Status", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] } ] }, // ********************************************************************************* { "name" : "UIM Verify PIN", "type" : "Message", "service" : "DMS", "id" : "0x0028", "since" : "1.0", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Pin ID", "format" : "guint8", "public-format" : "QmiDmsUimPinId" }, { "name" : "PIN", "format" : "string", "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Pin Retries Status", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] } ] }, // ********************************************************************************* { "name" : "UIM Unblock PIN", "type" : "Message", "service" : "DMS", "id" : "0x0029", "since" : "1.0", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Pin ID", "format" : "guint8", "public-format" : "QmiDmsUimPinId" }, { "name" : "PUK", "format" : "string", "personal-info" : "true" }, { "name" : "New PIN", "format" : "string", "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Pin Retries Status", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] } ] }, // ********************************************************************************* { "name" : "UIM Change PIN", "type" : "Message", "service" : "DMS", "id" : "0x002A", "since" : "1.0", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Pin ID", "format" : "guint8", "public-format" : "QmiDmsUimPinId" }, { "name" : "Old PIN", "format" : "string", "personal-info" : "true" }, { "name" : "New PIN", "format" : "string", "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Pin Retries Status", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] } ] }, // ********************************************************************************* { "name" : "UIM Get PIN Status", "type" : "Message", "service" : "DMS", "id" : "0x002B", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "PIN1 Status", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Current Status", "format" : "guint8", "public-format" : "QmiDmsUimPinStatus" }, { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ] }, { "name" : "PIN2 Status", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Current Status", "format" : "guint8", "public-format" : "QmiDmsUimPinStatus" }, { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ] } ] }, // ********************************************************************************* { "name" : "Get Hardware Revision", "type" : "Message", "service" : "DMS", "id" : "0x002C", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Revision", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Operating Mode", "type" : "Message", "service" : "DMS", "id" : "0x002D", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Mode", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiDmsOperatingMode", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Offline Reason", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiDmsOfflineReason", "prerequisites": [ { "field" : "Mode", "operation" : "==", "value" : "QMI_DMS_OPERATING_MODE_OFFLINE" } ] }, { "name" : "Hardware Restricted Mode", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Operating Mode", "type" : "Message", "service" : "DMS", "id" : "0x002E", "since" : "1.0", "input" : [ { "name" : "Mode", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiDmsOperatingMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Time", "type" : "Message", "service" : "DMS", "id" : "0x002F", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Device Time", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Time Count", "format" : "guint-sized", "guint-size" : "6" }, { "name" : "Time Source", "format" : "guint16", "public-format" : "QmiDmsTimeSource" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "System Time", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint64", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "User Time", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint64", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get PRL Version", "type" : "Message", "service" : "DMS", "id" : "0x0030", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Version", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint16", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "PRL Only Preference", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Activation State", "type" : "Message", "service" : "DMS", "id" : "0x0031", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiDmsActivationState", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Activate Automatic", "type" : "Message", "service" : "DMS", "id" : "0x0032", "since" : "1.0", "input" : [ { "name" : "Activation Code", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "size-prefix-format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Activate Manual", "type" : "Message", "service" : "DMS", "id" : "0x0033", "since" : "1.0", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", // API updated in 1.6 "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Service Programming Code", "format" : "string", "fixed-size" : "6" }, { "name" : "System Identification Number", "format" : "guint16" }, { "name" : "Mobile Directory Number", "format" : "string", "max-size" : "15" }, { "name" : "Mobile Identification Number", "format" : "string", "max-size" : "15" } ], "personal-info" : "true" }, { "name" : "MN HA key", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "string", "max-size" : "16", "size-prefix-format" : "guint8", "personal-info" : "true" }, { "name" : "MN AAA key", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "string", "max-size" : "16", "size-prefix-format" : "guint8", "personal-info" : "true" }, { "name" : "PRL", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "PRL total length", "format" : "guint16" }, { "name" : "PRL segment", "format" : "array", "size-prefix-format" : "guint16", "sequence-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get User Lock State", "type" : "Message", "service" : "DMS", "id" : "0x0034", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Enabled", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set User Lock State", "type" : "Message", "service" : "DMS", "id" : "0x0035", "since" : "1.0", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Enabled", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Lock Code", "format" : "string", "fixed-size" : "4", "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set User Lock Code", "type" : "Message", "service" : "DMS", "id" : "0x0036", "since" : "1.0", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Old Code", "format" : "string", "fixed-size" : "4" }, { "name" : "New Code", "format" : "string", "fixed-size" : "4" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Read User Data", "type" : "Message", "service" : "DMS", "id" : "0x0037", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "User Data", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Write User Data", "type" : "Message", "service" : "DMS", "id" : "0x0038", "since" : "1.0", "input" : [ { "name" : "User Data", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" } } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Read ERI File", "type" : "Message", "service" : "DMS", "id" : "0x0039", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "ERI File", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Restore Factory Defaults", "type" : "Message", "service" : "DMS", "id" : "0x003A", "since" : "1.0", "input" : [ { "name" : "Service Programming Code", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "fixed-size" : "6" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Validate Service Programming Code", "type" : "Message", "service" : "DMS", "id" : "0x003B", "since" : "1.0", "input" : [ { "name" : "Service Programming Code", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "fixed-size" : "6" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "UIM Get ICCID", "type" : "Message", "service" : "DMS", "id" : "0x003C", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "ICCID", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Firmware ID", "type" : "Message", "service" : "DMS", "id" : "0x003E", "since" : "1.18", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "UIM Get CK Status", "type" : "Message", "service" : "DMS", "id" : "0x0040", "since" : "1.0", "input" : [ { "name" : "Facility", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiDmsUimFacility" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "CK Status", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Facility State", "format" : "guint8", "public-format" : "QmiDmsUimFacilityState" }, { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Operation Blocking Facility", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "UIM Set CK Protection", "type" : "Message", "service" : "DMS", "id" : "0x0041", "since" : "1.0", "input" : [ { "name" : "Facility", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Facility", "format" : "guint8", "public-format" : "QmiDmsUimFacility" }, { "name" : "Facility State", "format" : "guint8", "public-format" : "QmiDmsUimFacilityState" }, { "name" : "Facility Depersonalization Control Key", "format" : "string" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Verify Retries Left", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8" } ] }, // ********************************************************************************* { "name" : "UIM Unblock CK", "type" : "Message", "service" : "DMS", "id" : "0x0042", "since" : "1.0", "input" : [ { "name" : "Facility", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Facility", "format" : "guint8", "public-format" : "QmiDmsUimFacility" }, { "name" : "Facility Control Key", "format" : "string" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Unblock Retries Left", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8" } ] }, // ********************************************************************************* { "name" : "UIM Get IMSI", "type" : "Message", "service" : "DMS", "id" : "0x0043", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "IMSI", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "UIM Get State", "type" : "Message", "service" : "DMS", "id" : "0x0044", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "State", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiDmsUimState", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Band Capabilities", "type" : "Message", "service" : "DMS", "id" : "0x0045", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Band Capability", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiDmsBandCapability", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "LTE Band Capability", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiDmsLteBandCapability", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Extended LTE Band Capability", "id" : "0x12", "type" : "TLV", "since" : "1.20", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint16" }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "NR5G Band Capability", "id" : "0x13", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint16" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Factory SKU", "type" : "Message", "service" : "DMS", "id" : "0x0046", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "SKU", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Firmware Preference", "type" : "Message", "service" : "DMS", "id" : "0x0047", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Image", "format" : "struct", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiDmsFirmwareImageType" }, { "name" : "Unique ID", "format" : "array", "fixed-size" : "16", "array-element" : { "format": "guint8" } }, { "name" : "Build ID", "format" : "string" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Firmware Preference", "type" : "Message", "service" : "DMS", "id" : "0x0048", "since" : "1.0", "input" : [ { "name" : "List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Image", "format" : "struct", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiDmsFirmwareImageType" }, { "name" : "Unique ID", "format" : "array", "fixed-size" : "16", "array-element" : { "format": "guint8" } }, { "name" : "Build ID", "format" : "string" } ] } }, { "name" : "Download Override", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Modem Storage Index", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Image Download List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Image Type", "format" : "guint8", "public-format" : "QmiDmsFirmwareImageType" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "List Stored Images", "type" : "Message", "service" : "DMS", "id" : "0x0049", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Image", "format" : "struct", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiDmsFirmwareImageType" }, { "name" : "Maximum Images", "format" : "guint8" }, { "name" : "Index Of Running Image", "format" : "guint8" }, { "name" : "Sublist", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Sublist Element", "format" : "struct", "contents" : [ { "name" : "Storage Index", "format" : "guint8" }, { "name" : "Failure Count", "format" : "guint8" }, { "name" : "Unique ID", "format" : "array", "fixed-size" : "16", "array-element" : { "format": "guint8" } }, { "name" : "Build ID", "format" : "string" } ] } } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Delete Stored Image", "type" : "Message", "service" : "DMS", "id" : "0x004A", "since" : "1.0", "input" : [ { "name" : "Image Details", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiDmsFirmwareImageType" }, { "name" : "Unique ID", "format" : "array", "fixed-size" : "16", "array-element" : { "format": "guint8" } }, { "name" : "Build ID", "format" : "string" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Time", "type" : "Message", "service" : "DMS", "id" : "0x004B", "since" : "1.0", "input" : [ { "name" : "Time Value", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint64" }, { "name" : "Time Reference Type", "id" : "0x10", "mandatory" : "yes", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiDmsTimeReferenceType" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Stored Image Info", "type" : "Message", "service" : "DMS", "id" : "0x004C", "since" : "1.0", "input" : [ { "name" : "Image Details", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiDmsFirmwareImageType" }, { "name" : "Unique ID", "format" : "array", "fixed-size" : "16", "array-element" : { "format": "guint8" } }, { "name" : "Build ID", "format" : "string" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Boot Version", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Major Version", "format" : "guint16" }, { "name" : "Minor Version", "format" : "guint16" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "PRI Version", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "PRI Version", "format" : "guint32" }, { "name" : "PRI Info", "format" : "string", "fixed-size" : "32" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "OEM Lock ID", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint32", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Alt Net Config", "type" : "Message", "service" : "DMS", "id" : "0x004D", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Config", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Alt Net Config", "type" : "Message", "service" : "DMS", "id" : "0x004E", "since" : "1.0", "input" : [ { "name" : "Config", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Boot Image Download Mode", "type" : "Message", "service" : "DMS", "id" : "0x004F", "since" : "1.18", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Mode", "id" : "0x10", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "QmiDmsBootImageDownloadMode", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Boot Image Download Mode", "type" : "Message", "service" : "DMS", "id" : "0x0050", "since" : "1.18", "input" : [ { "name" : "Mode", "id" : "0x01", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "QmiDmsBootImageDownloadMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Software Version", "type" : "Message", "service" : "DMS", "id" : "0x0051", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Version", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Service Programming Code", "type" : "Message", "service" : "DMS", "id" : "0x0052", "since" : "1.0", "input" : [ { "name" : "Current Code", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "string", "fixed-size" : "6" }, { "name" : "New Code", "id" : "0x02", "type" : "TLV", "since" : "1.0", "format" : "string", "fixed-size" : "6" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get MAC Address", "type" : "Message", "service" : "DMS", "id" : "0x005C", "since" : "1.26", "input" : [ { "name" : "Device", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.26", "format" : "guint32", "public-format" : "QmiDmsMacType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "MAC Address", "id" : "0x10", "type" : "TLV", "since" : "1.26", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format": "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Supported Messages", "type" : "Message", "service" : "DMS", "id" : "0x001E", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "HP Change Device Mode", "type" : "Message", "service" : "DMS", "id" : "0x5556", "vendor" : "0x03f0", "since" : "1.18", "input" : [ { "name" : "Mode", "id" : "0x01", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "QmiDmsHpDeviceMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Swi Get Current Firmware", "type" : "Message", "service" : "DMS", "id" : "0x5556", "vendor" : "0x1199", "since" : "1.18", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Model", "id" : "0x10", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Boot version", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "AMSS version", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "SKU ID", "id" : "0x13", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Package ID", "id" : "0x14", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Carrier ID", "id" : "0x15", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "PRI version", "id" : "0x16", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Carrier", "id" : "0x17", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Config version", "id" : "0x18", "type" : "TLV", "since" : "1.18", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Swi Get USB Composition", "type" : "Message", "service" : "DMS", "id" : "0x555B", "vendor" : "0x1199", "since" : "1.20", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Current", "id" : "0x10", "type" : "TLV", "since" : "1.20", "format" : "guint8", "public-format" : "QmiDmsSwiUsbComposition", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Supported", "id" : "0x11", "type" : "TLV", "since" : "1.20", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8", "public-format" : "QmiDmsSwiUsbComposition" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Swi Set USB Composition", "type" : "Message", "service" : "DMS", "id" : "0x555C", "vendor" : "0x1199", "since" : "1.20", "input" : [ { "name" : "Current", "id" : "0x01", "type" : "TLV", "since" : "1.20", "format" : "guint8", "public-format" : "QmiDmsSwiUsbComposition" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Foxconn Get Firmware Version", "type" : "Message", "service" : "DMS", "id" : "0x555E", "vendor" : "0x0489", "since" : "1.26", "input" : [ { "name" : "Version Type", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "QmiDmsFoxconnFirmwareVersionType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Version", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set FCC Authentication", "type" : "Message", "service" : "DMS", "id" : "0x555F", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Foxconn Change Device Mode", "type" : "Message", "service" : "DMS", "id" : "0x5562", "vendor" : "0x0489", "since" : "1.26", "input" : [ { "name" : "Mode", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "QmiDmsFoxconnDeviceMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Foxconn Set FCC Authentication", "type" : "Message", "service" : "DMS", "id" : "0x5571", "vendor" : "0x0489", "since" : "1.28.6", "input" : [ { "name" : "Value", "id" : "0x01", "type" : "TLV", "since" : "1.28.6", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Foxconn Set FCC Authentication v2", "type" : "Message", "service" : "DMS", "id" : "0x5571", // this vendor id number just needs to be different to any other one // defined in other messages; in this case both are foxconn messages, so // we +1 the foxconn vid. A better solution would be to rename this field // to something like "unique-id" and forget about defining any vendor id // there. "vendor" : "0x0490", "since" : "1.32", "input" : [ { "name" : "Magic String", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "string" }, { "name" : "Magic Number", "id" : "0x02", "type" : "TLV", "since" : "1.32", "format" : "guint8", "prerequisites" : "0x01-first" } ], "output" : [ { "common-ref" : "Operation Result" } ] } ] libqmi-1.35.2-dev/data/qmi-service-dpm.json000066400000000000000000000110051455567757300204660ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "DPM", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client DPM", "type" : "Client", "since" : "1.30" }, // ********************************************************************************* { "name" : "QMI Message DPM", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Open Port", "type" : "Message", "service" : "DPM", "id" : "0x0020", "since" : "1.30", "input" : [ { "name" : "Control Ports", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Port Name", "format" : "string" }, { "name" : "Endpoint Type", "format" : "guint32", "public-format" : "QmiDataEndpointType" }, { "name" : "Interface Number", "format" : "guint32" } ] } }, { "name" : "Hardware Data Ports", "id" : "0x11", "type" : "TLV", "since" : "1.30", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Endpoint Type", "format" : "guint32", "public-format" : "QmiDataEndpointType" }, { "name" : "Interface Number", "format" : "guint32" }, { "name" : "RX Endpoint Number", "format" : "guint32" }, { "name" : "TX Endpoint Number", "format" : "guint32" } ] } }, { "name" : "Software Data Ports", "id" : "0x12", "type" : "TLV", "since" : "1.30", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Endpoint Type", "format" : "guint32", "public-format" : "QmiDataEndpointType" }, { "name" : "Interface Number", "format" : "guint32" }, { "name" : "Port Name", "format" : "string" } ] } } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Close Port", "type" : "Message", "service" : "DPM", "id" : "0x0021", "since" : "1.30", "output" : [ { "common-ref" : "Operation Result" } ] } ] libqmi-1.35.2-dev/data/qmi-service-dsd.json000066400000000000000000000150701455567757300204660ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "DSD", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client DSD", "type" : "Client", "since" : "1.26" }, // ********************************************************************************* { "name" : "QMI Message DSD", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication DSD", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Get System Status", "type" : "Message", "service" : "DSD", "id" : "0x0024", "since" : "1.32", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Available Systems", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "System", "format" : "struct", "contents" : [ { "name" : "Technology", "format" : "guint32", "public-format" : "QmiDsdDataSystemNetworkType" }, { "name" : "RAT", "format" : "guint32", "public-format" : "QmiDsdRadioAccessTechnology" }, { "name" : "SO Mask", "format" : "guint64", "public-format" : "QmiDsdSoMask" } ] } } ] }, // ********************************************************************************* { "name" : "System Status Change", "type" : "Message", "service" : "DSD", "id" : "0x0025", "since" : "1.32", "input" : [ { "name" : "Register Indication", "id" : "0x11", "mandatory" : "no", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "System Status", "type" : "Indication", "service" : "DSD", "id" : "0x0026", "since" : "1.32", "output" : [ { "name" : "Available Systems", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "System", "format" : "struct", "contents" : [ { "name" : "Technology", "format" : "guint32", "public-format" : "QmiDsdDataSystemNetworkType" }, { "name" : "RAT", "format" : "guint32", "public-format" : "QmiDsdRadioAccessTechnology" }, { "name" : "SO Mask", "format" : "guint64", "public-format" : "QmiDsdSoMask" } ] } } ] }, // ********************************************************************************* { "name" : "Get APN Info", "type" : "Message", "service" : "DSD", "id" : "0x0033", "since" : "1.26", "input" : [ { "name" : "APN Type", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.26", "format" : "guint32", "public-format" : "QmiDsdApnType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "APN Name", "id" : "0x10", "mandatory" : "no", "type" : "TLV", "since" : "1.26", "format" : "string" } ] }, // ********************************************************************************* { "name" : "Set APN Type", "type" : "Message", "service" : "DSD", "id" : "0x0051", "since" : "1.26", "input" : [ { "name" : "APN Type", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Name", "format" : "string" }, { "name" : "Type", "format" : "guint64", "public-format" : "QmiDsdApnTypePreference" } ] }, { "name" : "APN Type Preference Mask", "id" : "0x10", "mandatory" : "no", "type" : "TLV", "since" : "1.26", "format" : "guint64", "public-format" : "QmiDsdApnTypePreference" } ], "output" : [ { "common-ref" : "Operation Result" } ] } ] libqmi-1.35.2-dev/data/qmi-service-fox.json000066400000000000000000000025531455567757300205120ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "FOX", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client FOX", "type" : "Client", "since" : "1.32" }, // ********************************************************************************* { "name" : "QMI Message FOX", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Get Firmware Version", "type" : "Message", "service" : "FOX", "id" : "0x555E", "since" : "1.32", "input" : [ { "name" : "Version Type", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format" : "QmiFoxFirmwareVersionType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Version", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "string", "prerequisites": [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-gas.json000066400000000000000000000243301455567757300204650ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "GAS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client GAS", "type" : "Client", "since" : "1.24" }, // ********************************************************************************* { "name" : "QMI Message GAS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "DMS Set USB Composition", "type" : "Message", "service" : "GAS", "id" : "0x0203", "since" : "1.32", "input" : [ { "name" : "USB Composition", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "guint32" }, { "name" : "Endpoint Type", "id" : "0x02", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "QmiGasUsbCompositionEndpointType" }, { "name" : "Composition Persistence", "id" : "0x03", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "gboolean" }, { "name" : "Immediate Setting", "id" : "0x04", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "gboolean" }, { "name" : "Reboot After Setting", "id" : "0x05", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "DMS Get USB Composition", "type" : "Message", "service" : "GAS", "id" : "0x0204", "since" : "1.32", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "USB Composition", "id" : "0x03", "type" : "TLV", "since" : "1.32", "format" : "guint32", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Endpoint Type", "id" : "0x04", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "QmiGasUsbCompositionEndpointType", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Composition Persistence", "id" : "0x05", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Immediate Setting", "id" : "0x06", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Reboot After Setting", "id" : "0x07", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format": "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "DMS Set Active Firmware", "type" : "Message", "service" : "GAS", "id" : "0x0206", "since" : "1.24", "input" : [ { "name" : "Carrier Name", "id" : "0x10", "type" : "TLV", "since" : "1.24", "format" : "string" }, { "name" : "Slot Index", "id" : "0x11", "type" : "TLV", "since" : "1.24", "format" : "guint8" }, { "name" : "Version", "id" : "0x12", "type" : "TLV", "since" : "1.24", "format" : "string" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "DMS Get Firmware List", "type" : "Message", "service" : "GAS", "id" : "0x0208", "since" : "1.24", "input" : [ { "name" : "Mode", "id" : "0x01", "type" : "TLV", "since" : "1.24", "format" : "guint8", "public-format": "QmiGasFirmwareListingMode" }, { "name" : "Slot Index", "id" : "0x10", "type" : "TLV", "since" : "1.24", "format" : "guint8" }, { "name" : "Name", "id" : "0x11", "type" : "TLV", "since" : "1.24", "format" : "string" }, { "name" : "Version", "id" : "0x12", "type" : "TLV", "since" : "1.24", "format" : "string" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Mode", "id" : "0x01", "type" : "TLV", "since" : "1.24", "format" : "guint8", "public-format": "QmiGasFirmwareListingMode", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Stored Firmware 1", "id" : "0x10", "type" : "TLV", "since" : "1.24", "format" : "sequence", "contents" : [ { "name" : "Index", "format" : "guint8" }, { "name" : "Name", "format" : "string" }, { "name" : "Version", "format" : "string" }, { "name" : "PRI revision", "format" : "string" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Stored Firmware 2", "id" : "0x11", "type" : "TLV", "since" : "1.24", "format" : "sequence", "contents" : [ { "name" : "Index", "format" : "guint8" }, { "name" : "Name", "format" : "string" }, { "name" : "Version", "format" : "string" }, { "name" : "PRI revision", "format" : "string" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Stored Firmware 3", "id" : "0x12", "type" : "TLV", "since" : "1.24", "format" : "sequence", "contents" : [ { "name" : "Index", "format" : "guint8" }, { "name" : "Name", "format" : "string" }, { "name" : "Version", "format" : "string" }, { "name" : "PRI revision", "format" : "string" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Stored Firmware 4", "id" : "0x13", "type" : "TLV", "since" : "1.24", "format" : "sequence", "contents" : [ { "name" : "Index", "format" : "guint8" }, { "name" : "Name", "format" : "string" }, { "name" : "Version", "format" : "string" }, { "name" : "PRI revision", "format" : "string" } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-gms.json000066400000000000000000000042511455567757300205010ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "GMS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client GMS", "type" : "Client", "since" : "1.26" }, // ********************************************************************************* { "name" : "QMI Message GMS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Test Set Value", "type" : "Message", "service" : "GMS", "id" : "0x0F00", "since" : "1.26", "input" : [ { "name" : "Test Mandatory Value", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "guint8" }, { "name" : "Test Optional Value", "id" : "0x10", "type" : "TLV", "since" : "1.26", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Test Get Value", "type" : "Message", "service" : "GMS", "id" : "0x0F01", "since" : "1.26", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Test Mandatory Value", "id" : "0x03", "type" : "TLV", "since" : "1.26", "format" : "guint8", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Test Optional Value", "id" : "0x10", "type" : "TLV", "since" : "1.26", "format" : "guint8", "prerequisites": [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-ims.json000066400000000000000000000066441455567757300205130ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "IMS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client IMS", "type" : "Client", "since" : "1.34" }, // ********************************************************************************* { "name" : "QMI Message IMS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Get IMS Services Enabled Setting", "type" : "Message", "service" : "IMS", "id" : "0x0090", "since" : "1.34", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "IMS Voice Service Enabled", "id" : "0x11", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Video Telephony Service Enabled", "id" : "0x12", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Voice WiFi Service Enabled", "id" : "0x15", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Registration Service Enabled", "id" : "0x18", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS UT Service Enabled", "id" : "0x19", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS SMS Service Enabled", "id" : "0x1A", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS USSD Service Enabled", "id" : "0x1C", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-imsa.json000066400000000000000000000145651455567757300206550ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "IMSA", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client IMSA", "type" : "Client", "since" : "1.34" }, // ********************************************************************************* { "name" : "QMI Message IMSA", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Get IMS Registration Status", "type" : "Message", "service" : "IMSA", "id" : "0x0020", "since" : "1.34", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "IMS Registration Status", "id" : "0x12", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaImsRegistrationStatus", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Registration Error Code", "id" : "0x11", "type" : "TLV", "since" : "1.34", "format" : "guint16", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Registration Error Message", "id" : "0x13", "type" : "TLV", "since" : "1.34", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Registration Technology", "id" : "0x14", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaRegistrationTechnology", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get IMS Services Status", "type" : "Message", "service" : "IMSA", "id" : "0x0021", "since" : "1.34", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "IMS SMS Service Status", "id" : "0x10", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaServiceStatus", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Voice Service Status", "id" : "0x11", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaServiceStatus", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Video Telephony Service Status", "id" : "0x12", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaServiceStatus", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS SMS Service Registration Technology", "id" : "0x13", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaRegistrationTechnology", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Voice Service Registration Technology", "id" : "0x14", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaRegistrationTechnology", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Video Telephony Service Registration Technology", "id" : "0x15", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaRegistrationTechnology", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS UE to TAS Service Status", "id" : "0x16", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaServiceStatus", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS UE to TAS Service Registration Technology", "id" : "0x17", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaRegistrationTechnology", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Video Share Service Status", "id" : "0x18", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaServiceStatus", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMS Video Share Service Registration Technology", "id" : "0x19", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImsaRegistrationTechnology", "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-imsp.json000066400000000000000000000021741455567757300206650ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "IMSP", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client IMSP", "type" : "Client", "since" : "1.34" }, // ********************************************************************************* { "name" : "QMI Message IMSP", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Get Enabler State", "type" : "Message", "service" : "IMSP", "id" : "0x0024", "since" : "1.34", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Enabler State", "id" : "0x10", "type" : "TLV", "since" : "1.34", "format" : "guint32", "public-format" : "QmiImspEnablerState", "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-loc.json000066400000000000000000001055221455567757300204730ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "LOC", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client LOC", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message LOC", "type" : "Message-ID-Enum" }, { "name" : "QMI Indication LOC", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "common-ref" : "LOC Indication Status", "name" : "Indication Status", "fullname" : "Qmi LOC Message Status", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocIndicationStatus" }, { "common-ref" : "LOC Fix Recurrence Type", "name" : "Fix Recurrence Type", "id" : "0x10", "mandatory" : "no", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocFixRecurrenceType" }, { "common-ref" : "LOC Server IPv4", "name" : "IPv4", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "sequence", "contents" : [ { "name" : "IPv4 Address", "format" : "guint32", "endian" : "little" }, { "name" : "IPv4 Port", "format" : "guint16" } ] }, { "common-ref" : "LOC Server IPv6", "name" : "IPv6", "id" : "0x11", "type" : "TLV", "since" : "1.22", "format" : "sequence", "contents" : [ { "name" : "IPv6 Address", "format" : "array", "fixed-size" : "8", "array-element" : { "format" : "guint16", "endian" : "network" } }, { "name" : "IPv6 Port", "format" : "guint32" } ] }, { "common-ref" : "LOC Server URL", "name" : "URL", "id" : "0x12", "type" : "TLV", "since" : "1.22", "format" : "string", "max-size" : "256" }, // ********************************************************************************* { "name" : "Register Events", "type" : "Message", "service" : "LOC", "id" : "0x0021", "since" : "1.22", "input" : [ { "name" : "Event Registration Mask", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint64", "public-format" : "QmiLocEventRegistrationFlag" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Start", "type" : "Message", "service" : "LOC", "id" : "0x0022", "since" : "1.20", "input" : [ { "name" : "Session ID", "id" : "0x01", "type" : "TLV", "since" : "1.20", "format" : "guint8" }, { "common-ref" : "LOC Fix Recurrence Type" }, { "name" : "Intermediate Report State", "id" : "0x12", "type" : "TLV", "since" : "1.20", "format" : "guint32", "public-format" : "QmiLocIntermediateReportState" }, { "name" : "Minimum Interval between Position Reports", "id" : "0x13", "type" : "TLV", "since" : "1.22", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Stop", "type" : "Message", "service" : "LOC", "id" : "0x0023", "since" : "1.20", "input" : [ { "name" : "Session ID", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Position Report", "type" : "Indication", "service" : "LOC", "id" : "0x0024", "since" : "1.22", "output" : [ { "name" : "Session Status", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocSessionStatus" }, { "name" : "Session ID", "id" : "0x02", "type" : "TLV", "since" : "1.22", "format" : "guint8" }, { "name" : "Latitude", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "gdouble" }, { "name" : "Longitude", "id" : "0x11", "type" : "TLV", "since" : "1.22", "format" : "gdouble" }, { "name" : "Horizontal Uncertainty Circular", "id" : "0x12", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Horizontal Uncertainty Elliptical Minor", "id" : "0x13", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Horizontal Uncertainty Elliptical Major", "id" : "0x14", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Horizontal Uncertainty Elliptical Azimuth", "id" : "0x15", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Horizontal Confidence", "id" : "0x16", "type" : "TLV", "since" : "1.22", "format" : "guint8" }, { "name" : "Horizontal Reliability", "id" : "0x17", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocReliability" }, { "name" : "Horizontal Speed", "id" : "0x18", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Speed Uncertainty", "id" : "0x19", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Altitude from Ellipsoid", "id" : "0x1A", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Altitude from Sealevel", "id" : "0x1B", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Vertical Uncertainty", "id" : "0x1C", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Vertical Confidence", "id" : "0x1D", "type" : "TLV", "since" : "1.22", "format" : "guint8" }, { "name" : "Vertical Reliability", "id" : "0x1E", "type" : "TLV", "since" : "1.22", "format" : "guint32" }, { "name" : "Vertical Speed", "id" : "0x1F", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Heading", "id" : "0x20", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Heading Uncertainty", "id" : "0x21", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Magnetic Deviation", "id" : "0x22", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Technology Used", "id" : "0x23", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocTechnologyUsed" }, { "name" : "DOP", "id" : "0x24", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "PDOP", "format" : "gfloat" }, { "name" : "HDOP", "format" : "gfloat" }, { "name" : "VDOP", "format" : "gfloat" } ] }, { "name" : "UTC Timestamp", "id" : "0x25", "type" : "TLV", "since" : "1.22", "format" : "guint64" }, { "name" : "Leap Seconds", "id" : "0x26", "type" : "TLV", "since" : "1.22", "format" : "guint8" }, { "name" : "GPS Date Time", "id" : "0x27", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "GPS Weeks", "format" : "guint16" }, { "name" : "GPS Time of Week Milliseconds", "format" : "guint32" } ] }, { "name" : "Time Uncertainty", "id" : "0x28", "type" : "TLV", "since" : "1.22", "format" : "gfloat" }, { "name" : "Time Source", "id" : "0x29", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocTimeSource" }, { "name" : "Sensor Data Usage", "id" : "0x2A", "type" : "TLV", "since" : "1.22", "format" : "guint64", "public-format" : "QmiLocSensorDataUsage" }, { "name" : "Session Fix Count", "id" : "0x2B", "type" : "TLV", "since" : "1.22", "format" : "guint32" }, { "name" : "Satellites Used", "id" : "0x2C", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint16" } }, { "name" : "Altitude Assumed", "id" : "0x2D", "type" : "TLV", "since" : "1.22", "format" : "guint8", "public-format" : "gboolean" } ] }, // ********************************************************************************* { "name" : "NMEA", "type" : "Indication", "service" : "LOC", "id" : "0x0026", "since" : "1.22", "output" : [ { "name" : "NMEA String", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "string" } ] }, // ********************************************************************************* { "name" : "Engine State", "type" : "Indication", "service" : "LOC", "id" : "0x002B", "since" : "1.22", "output" : [ { "name" : "Engine State", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "gint32", "public-format" : "QmiLocEngineState" } ] }, // ********************************************************************************* { "name" : "Fix Recurrence Type", "type" : "Indication", "service" : "LOC", "id" : "0x002C", "since" : "1.22", "output" : [ { "common-ref" : "LOC Fix Recurrence Type" } ] }, // ********************************************************************************* { "name" : "GNSS Sv Info", "type" : "Indication", "service" : "LOC", "id" : "0x0025", "since" : "1.22", "output" : [ { "name" : "Altitude Assumed", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Valid Information", "format" : "guint32", "public-format" : "QmiLocSatelliteValidInformation" }, { "name" : "System", "format" : "guint32", "public-format" : "QmiLocSystem" }, { "name" : "GNSS Satellite ID", "format" : "guint16" }, { "name" : "Health Status", "format" : "guint8", "public-format" : "QmiLocHealthStatus" }, { "name" : "Satellite Status", "format" : "guint32", "public-format" : "QmiLocSatelliteStatus" }, { "name" : "Navigation Data", "format" : "guint8", "public-format" : "QmiLocNavigationData"}, { "name" : "Elevation Degrees", "format" : "gfloat" }, { "name" : "Azimuth Degrees", "format" : "gfloat" }, { "name" : "Signal to Noise Ratio BHz", "format" : "gfloat" } ] } } ] }, // ********************************************************************************* { "name" : "Inject Predicted Orbits Data", "type" : "Message", "service" : "LOC", "id" : "0x0035", "since" : "1.22", "input" : [ { "name" : "Total Size", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint32" }, { "name" : "Total Parts", "id" : "0x02", "type" : "TLV", "since" : "1.22", "format" : "guint16" }, { "name" : "Part Number", "id" : "0x03", "type" : "TLV", "since" : "1.22", "format" : "guint16" }, { "name" : "Part Data", "id" : "0x04", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "max-size" : "1024" }, { "name" : "Format Type", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocPredictedOrbitsDataFormat" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Inject Predicted Orbits Data", "type" : "Indication", "service" : "LOC", "id" : "0x0035", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" }, { "name" : "Part Number", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "guint16" } ] }, // ********************************************************************************* { "name" : "Get Predicted Orbits Data Source", "type" : "Message", "service" : "LOC", "id" : "0x0036", "since" : "1.22", "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Get Predicted Orbits Data Source", "type" : "Indication", "service" : "LOC", "id" : "0x0036", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" }, { "name" : "Allowed Sizes", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "sequence", "contents" : [ { "name" : "Max File Size", "format" : "guint32" }, { "name" : "Max Part Size", "format" : "guint32" } ] }, { "name" : "Server List", "id" : "0x11", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "string", "size-prefix-format" : "guint8" } } ] }, // ********************************************************************************* { "name" : "Set Engine Lock", "type" : "Message", "service" : "LOC", "id" : "0x003A", "since" : "1.28", "input" : [ { "name" : "Lock Type", "id" : "0x01", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiLocLockType" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Set Engine Lock", "type" : "Indication", "service" : "LOC", "id" : "0x003A", "since" : "1.28", "output" : [ { "common-ref" : "LOC Indication Status" , "since" : "1.28" } ] }, // ********************************************************************************* { "name" : "Get Engine Lock", "type" : "Message", "service" : "LOC", "id" : "0x003B", "since" : "1.28", "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Get Engine Lock", "type" : "Indication", "service" : "LOC", "id" : "0x003B", "since" : "1.28", "output" : [ { "common-ref" : "LOC Indication Status", "since" : "1.28" }, { "name" : "Lock Type", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiLocLockType" } ] }, // ********************************************************************************* { "name" : "Set NMEA Types", "type" : "Message", "service" : "LOC", "id" : "0x003E", "since" : "1.26", "input" : [ { "name" : "NMEA Types", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "guint32", "public-format" : "QmiLocNmeaType" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Set NMEA Types", "type" : "Indication", "service" : "LOC", "id" : "0x003E", "since" : "1.26", "output" : [ { "common-ref" : "LOC Indication Status" } ] }, // ********************************************************************************* { "name" : "Get NMEA Types", "type" : "Message", "service" : "LOC", "id" : "0x003F", "since" : "1.26", "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Get NMEA Types", "type" : "Indication", "service" : "LOC", "id" : "0x003F", "since" : "1.26", "output" : [ { "common-ref" : "LOC Indication Status" }, { "name" : "NMEA Types", "id" : "0x10", "type" : "TLV", "since" : "1.26", "format" : "guint32", "public-format" : "QmiLocNmeaType" } ] }, // ********************************************************************************* { "name" : "Set Server", "type" : "Message", "service" : "LOC", "id" : "0x0042", "since" : "1.22", "input" : [ { "name" : "Server Type", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocServerType" }, { "common-ref" : "LOC Server IPv4" }, { "common-ref" : "LOC Server IPv6" }, { "common-ref" : "LOC Server URL" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Set Server", "type" : "Indication", "service" : "LOC", "id" : "0x0042", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" } ] }, // ********************************************************************************* { "name" : "Get Server", "type" : "Message", "service" : "LOC", "id" : "0x0043", "since" : "1.22", "input" : [ { "name" : "Server Type", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocServerType" }, { "name" : "Server Address Type", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "guint8", "public-format" : "QmiLocServerAddressType" }], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Get Server", "type" : "Indication", "service" : "LOC", "id" : "0x0043", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" }, { "name" : "Server Type", "id" : "0x02", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocServerType" }, { "common-ref" : "LOC Server IPv4" }, { "common-ref" : "LOC Server IPv6" }, { "common-ref" : "LOC Server URL" } ] }, // ********************************************************************************* { "name" : "Delete Assistance Data", "type" : "Message", "service" : "LOC", "id" : "0x0044", "since" : "1.22", "input" : [ { "name" : "Delete All", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Delete SV Info", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "GNSS SV ID", "format" : "guint16" }, { "name" : "System", "format" : "guint32", "public-format" : "QmiLocSystem" }, { "name" : "Delete SV Info Mask", "format" : "guint8", "public-format" : "QmiLocDeleteSvInfo" } ] } }, { "name" : "Delete GNSS Data Mask", "id" : "0x11", "type" : "TLV", "since" : "1.22", "format" : "guint64", "public-format" : "QmiLocDeleteGnssData" }, { "name" : "Delete Cell Database Mask", "id" : "0x12", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocDeleteCellDatabase" }, { "name" : "Delete Clock Info Mask", "id" : "0x13", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocDeleteClockInfo" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Delete Assistance Data", "type" : "Indication", "service" : "LOC", "id" : "0x0044", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" } ] }, // ********************************************************************************* { "name" : "Set Operation Mode", "type" : "Message", "service" : "LOC", "id" : "0x004A", "since" : "1.22", "input" : [ { "name" : "Operation Mode", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocOperationMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Set Operation Mode", "type" : "Indication", "service" : "LOC", "id" : "0x004A", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" } ] }, // ********************************************************************************* { "name" : "Get Operation Mode", "type" : "Message", "service" : "LOC", "id" : "0x004B", "since" : "1.22", "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Get Operation Mode", "type" : "Indication", "service" : "LOC", "id" : "0x004B", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" }, { "name" : "Operation Mode", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "guint32", "public-format" : "QmiLocOperationMode" } ] }, // ********************************************************************************* { "name" : "Inject Xtra Data", "type" : "Message", "service" : "LOC", "id" : "0x00A7", "since" : "1.22", "input" : [ { "name" : "Total Size", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint32" }, { "name" : "Total Parts", "id" : "0x02", "type" : "TLV", "since" : "1.22", "format" : "guint16" }, { "name" : "Part Number", "id" : "0x03", "type" : "TLV", "since" : "1.22", "format" : "guint16" }, { "name" : "Part Data", "id" : "0x04", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "max-size" : "1024" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Inject Xtra Data", "type" : "Indication", "service" : "LOC", "id" : "0x00A7", "since" : "1.22", "output" : [ { "common-ref" : "LOC Indication Status" }, { "name" : "Part Number", "id" : "0x10", "type" : "TLV", "since" : "1.22", "format" : "guint16" } ] } ] libqmi-1.35.2-dev/data/qmi-service-nas.json000066400000000000000000010670061455567757300205040ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "NAS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client NAS", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message NAS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication NAS", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "common-ref" : "NAS Service Provider Name", "name" : "Service Provider Name", "id" : "0x10", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Name Display Condition", "format" : "guint8", "public-format" : "QmiNasNetworkNameDisplayCondition" }, { "name" : "Name", "format" : "string" } ] }, { "common-ref" : "NAS Operator PLMN List", "name" : "Operator PLMN List", "id" : "0x11", "type" : "TLV", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "LAC1", "format" : "guint16" }, { "name" : "LAC2", "format" : "guint16" }, { "name" : "PLMN Name Record Identifier", "format" : "guint8" } ] } }, { "common-ref" : "NAS Operator PLMN Name", "name" : "Operator PLMN Name", "id" : "0x12", "type" : "TLV", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Name Encoding", "format" : "guint8", "public-format" : "QmiNasPlmnEncodingScheme" }, { "name" : "Short Country Initials", "format" : "guint8", "public-format" : "QmiNasPlmnNameCountryInitials" }, { "name" : "Long Name Spare Bits", "format" : "guint8", "public-format" : "QmiNasPlmnNameSpareBits" }, { "name" : "Short Name Spare Bits", "format" : "guint8", "public-format" : "QmiNasPlmnNameSpareBits" }, { "name" : "Long Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Short Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] } }, { "common-ref" : "NAS Operator String Name", "name" : "Operator String Name", "id" : "0x13", "type" : "TLV", "format" : "string" }, { "common-ref" : "NAS NITZ Information", "name" : "NITZ Information", "id" : "0x14", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Name Encoding", "format" : "guint8", "public-format" : "QmiNasPlmnEncodingScheme" }, { "name" : "Short Country Initials", "format" : "guint8", "public-format" : "QmiNasPlmnNameCountryInitials" }, { "name" : "Long Name Spare Bits", "format" : "guint8", "public-format" : "QmiNasPlmnNameSpareBits" }, { "name" : "Short Name Spare Bits", "format" : "guint8", "public-format" : "QmiNasPlmnNameSpareBits" }, { "name" : "Long Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Short Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, { "common-ref" : "NAS Preferred Networks", "name" : "Preferred Networks", "id" : "0x10", "type" : "TLV", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Radio Access Technology", "format" : "guint16", "public-format" : "QmiNasPlmnAccessTechnologyIdentifier" } ] } }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "NAS", "id" : "0x0000", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Abort", "type" : "Message", "service" : "NAS", "id" : "0x0001", "since" : "1.0", // This magic tag allows us to avoid creating a method in the client "scope" : "library-only", "input" : [ { "name" : "Transaction ID", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint16" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Event Report", "type" : "Message", "service" : "NAS", "id" : "0x0002", "since" : "1.0", "input" : [ { "name" : "Signal Strength Indicator", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Thresholds", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8" } } ] }, { "name" : "RF Band Information", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Reason", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "RSSI Indicator", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "RSSI Delta", "format" : "guint8" } ] }, { "name" : "ECIO Indicator", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "ECIO Delta", "format" : "guint8" } ] }, { "name" : "IO Indicator", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "IO Delta", "format" : "guint8" } ] }, { "name" : "SINR Indicator", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "SINR Delta", "format" : "guint8" } ] }, { "name" : "Error Rate Indicator", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "ECIO Threshold", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Thresholds", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } } ] }, { "name" : "SINR Threshold", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Thresholds", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, { "name" : "LTE SNR Delta", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "SNR Delta", "format" : "guint8" } ] }, { "name" : "LTE RSRP Delta", "id" : "0x1C", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "RSRP Delta", "format" : "guint8" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Event Report", "type" : "Indication", "service" : "NAS", "id" : "0x0002", "since" : "1.0", "output" : [ { "name" : "Signal Strength", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Strength", "format" : "gint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, { "name" : "RF Band Information", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Active Band Class", "format" : "guint16", "public-format" : "QmiNasActiveBand" }, { "name" : "Active Channel", "format" : "guint16" } ] } }, { "name" : "Registration Reject Reason", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Reject Cause", "format" : "guint16" } ] }, { "name" : "RSSI", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "guint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, { "name" : "ECIO", "id" : "0x14", "type" : "TLV", // API changed in 1.14 "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "ECIO", "format" : "guint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, { "name" : "IO", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "gint32" }, { "name" : "SINR", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasEvdoSinrLevel" }, { "name" : "Error Rate", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Rate", "format" : "guint16" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, { "name" : "RSRQ", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSRQ", "format" : "gint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, { "name" : "LTE SNR", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "gint16" }, { "name" : "LTE RSRP", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "gint16" } ] }, // ********************************************************************************* { "name" : "Register Indications", "type" : "Message", "service" : "NAS", "id" : "0x0003", "since" : "1.0", "input" : [ { "name" : "System Selection Preference", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "DDTM Events", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Serving System Events", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Dual Standby Preference", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Subscription Info", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Network Time", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "System Info", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Signal Info", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Error Rate", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HDR New UATI Assigned", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HDR Session Closed", "id" : "0x1C", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Managed Roaming", "id" : "0x1D", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Current PLMN Name", "id" : "0x1E", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "eMBMS Status", "id" : "0x1F", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "RF Band Information", "id" : "0x20", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Network Reject Information", "id" : "0x21", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Enable Network Reject Indications", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Supress System Info Indications", "format" : "guint8", "public-format" : "gboolean" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Supported Messages", "type" : "Message", "service" : "NAS", "id" : "0x001E", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Signal Strength", "type" : "Message", "service" : "NAS", "id" : "0x0020", "since" : "1.0", "input" : [ { "name" : "Request Mask", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasSignalStrengthRequest" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Signal Strength", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Strength", "format" : "gint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Strength List", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Strength", "format" : "gint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] } }, { "name" : "RSSI List", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "RSSI", "format" : "guint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] } }, { "name" : "ECIO List", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "ECIO", "format" : "guint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] } }, { "name" : "IO", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "gint32" }, { "name" : "SINR", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasEvdoSinrLevel" }, { "name" : "Error Rate List", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Rate", "format" : "guint16" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] } }, { "name" : "RSRQ", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSRQ", "format" : "gint8" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, { "name" : "LTE SNR", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "gint16" }, { "name" : "LTE RSRP", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "gint16" } ] }, // ********************************************************************************* { "name" : "Network Scan", "type" : "Message", "service" : "NAS", "id" : "0x0021", "since" : "1.0", // This method may be aborted "abort" : "yes", "input" : [ { "name" : "Network Type", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasNetworkScanType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Network Information", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Network Status", "format" : "guint8", "public-format" : "QmiNasNetworkStatus" }, { "name" : "Description", "format" : "string" } ] } }, { "name" : "Radio Access Technology", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] } }, { "name" : "MNC PCS Digit Include Status", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] } }, { "name" : "Network Scan Result", "id" : "0x13", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format": "QmiNasNetworkScanResult" } ] }, // ********************************************************************************* { "name" : "Initiate Network Register", "type" : "Message", "service" : "NAS", "id" : "0x0022", "since" : "1.0", "input" : [ { "name" : "Action", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasNetworkRegisterType" }, { "name" : "Manual Registration Info 3GPP", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, { "name" : "Change Duration", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasChangeDuration" }, { "name" : "MNC PCS Digit Include Status", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Attach Detach", "type" : "Message", "service" : "NAS", "id" : "0x0023", "since" : "1.20", "input" : [ { "name" : "Action", "id" : "0x10", "mandatory" : "yes", "type" : "TLV", "since" : "1.20", "format" : "guint8", "public-format" : "QmiNasPsAttachAction" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Serving System", "type" : "Message", "service" : "NAS", "id" : "0x0024", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Serving System", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Registration State", "format" : "guint8", "public-format" : "QmiNasRegistrationState" }, { "name" : "CS Attach State", "format" : "guint8", "public-format" : "QmiNasAttachState" }, { "name" : "PS Attach State", "format" : "guint8", "public-format" : "QmiNasAttachState" }, { "name" : "Selected Network", "format" : "guint8", "public-format" : "QmiNasNetworkType" }, { "name" : "Radio Interfaces", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8", "public-format" : "QmiNasRadioInterface" } } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Roaming Indicator", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasRoamingIndicatorStatus" }, { "name" : "Data Service Capability", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8", "public-format" : "QmiNasDataCapability" } }, { "name" : "Current PLMN", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Description", "format" : "string" } ] }, { "name" : "CDMA System ID", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "SID", "format" : "guint16" }, { "name" : "NID", "format" : "guint16" } ] }, { "name" : "CDMA Base Station Info", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Base Station ID", "format" : "guint16" }, { "name" : "Base Station Latitude", "format" : "gint32" }, { "name" : "Base Station Longitude", "format" : "gint32" } ] }, { "name" : "Roaming Indicator List", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Radio Interface", "format" : "guint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Roaming Indicator", "format" : "guint8", "public-format" : "QmiNasRoamingIndicatorStatus" } ] } }, { "name" : "Default Roaming Indicator", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasRoamingIndicatorStatus" }, { "name" : "Time Zone 3GPP2", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Leap Seconds", "format" : "guint8" }, { "name" : "Local Time Offset", "format" : "gint8" }, { "name" : "Daylight Saving Time", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "CDMA P Rev", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "guint8" }, { "name" : "Time Zone 3GPP", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "gint8" }, { "name" : "Daylight Saving Time Adjustment 3GPP", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "guint8" }, { "name" : "LAC 3GPP", "id" : "0x1C", "type" : "TLV", "since" : "1.0", "format" : "guint16" }, { "name" : "CID 3GPP", "id" : "0x1D", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Concurrent Service Info 3GPP2", "id" : "0x1E", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean"}, { "name" : "PRL Indicator 3GPP2", "id" : "0x1F", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean"}, { "name" : "DTM Support", "id" : "0x20", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean"}, { "name" : "Detailed Service Status", "id" : "0x21", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "HDR Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "HDR Hybrid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "CDMA System Info", "id" : "0x22", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "IMSI_11_12", "format" : "guint8" } ] }, { "name" : "HDR Personality", "id" : "0x23", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasHdrPersonality"}, { "name" : "LTE TAC", "id" : "0x24", "type" : "TLV", "since" : "1.0", "format" : "guint16" }, { "name" : "Call Barring Status", "id" : "0x25", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "CS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" } ] }, { "name" : "UMTS Primary Scrambling Code", "id" : "0x26", "type" : "TLV", "since" : "1.0", "format" : "guint16" }, { "name" : "MNC PCS Digit Include Status", "id" : "0x27", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Network Name Source", "id" : "0x29", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasNetworkNameSource" } ] }, { "name" : "Serving System", "type" : "Indication", "service" : "NAS", "id" : "0x0024", "since" : "1.0", "output" : [ { "name" : "Serving System", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Registration State", "format" : "guint8", "public-format" : "QmiNasRegistrationState" }, { "name" : "CS Attach State", "format" : "guint8", "public-format" : "QmiNasAttachState" }, { "name" : "PS Attach State", "format" : "guint8", "public-format" : "QmiNasAttachState" }, { "name" : "Selected Network", "format" : "guint8", "public-format" : "QmiNasNetworkType" }, { "name" : "Radio Interfaces", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8", "public-format" : "QmiNasRadioInterface" } } ] }, { "name" : "Roaming Indicator", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasRoamingIndicatorStatus" }, { "name" : "Data Service Capability", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8", "public-format" : "QmiNasDataCapability" } }, { "name" : "Current PLMN", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Description", "format" : "string" } ] }, { "name" : "CDMA System ID", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "SID", "format" : "guint16" }, { "name" : "NID", "format" : "guint16" } ] }, { "name" : "CDMA Base Station Info", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Base Station ID", "format" : "guint16" }, { "name" : "Base Station Latitude", "format" : "gint32" }, { "name" : "Base Station Longitude", "format" : "gint32" } ] }, { "name" : "Roaming Indicator List", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Radio Interface", "format" : "guint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Roaming Indicator", "format" : "guint8", "public-format" : "QmiNasRoamingIndicatorStatus" } ] } }, { "name" : "Default Roaming Indicator", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasRoamingIndicatorStatus" }, { "name" : "Time Zone 3GPP2", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Leap Seconds", "format" : "guint8" }, { "name" : "Local Time Offset", "format" : "gint8" }, { "name" : "Daylight Saving Time", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "CDMA P Rev", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "guint8" }, { "name" : "PLMN Name Flag 3GPP", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "gint8", "public-format" : "gboolean" }, { "name" : "Time Zone 3GPP", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "gint8" }, { "name" : "Daylight Saving Time Adjustment 3GPP", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "guint8" }, { "name" : "Universal Time and Local Time Zone 3GPP", "id" : "0x1C", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Year", "format" : "guint16" }, { "name" : "Month", "format" : "guint8" }, { "name" : "Day", "format" : "guint8" }, { "name" : "Hour", "format" : "guint8" }, { "name" : "Minute", "format" : "guint8" }, { "name" : "Second", "format" : "guint8" }, { "name" : "Time Zone", "format" : "guint8" } ] }, { "name" : "LAC 3GPP", "id" : "0x1D", "type" : "TLV", "since" : "1.0", "format" : "guint16" }, { "name" : "CID 3GPP", "id" : "0x1E", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Concurrent Service Info 3GPP2", "id" : "0x1F", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean"}, { "name" : "PRL Indicator 3GPP2", "id" : "0x20", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean"}, { "name" : "DTM Support", "id" : "0x21", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean"}, { "name" : "Detailed Service Status", "id" : "0x22", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "HDR Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "HDR Hybrid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "CDMA System Info", "id" : "0x23", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "IMSI_11_12", "format" : "guint8" } ] }, { "name" : "HDR Personality", "id" : "0x24", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasHdrPersonality"}, { "name" : "LTE TAC", "id" : "0x25", "type" : "TLV", "since" : "1.0", "format" : "guint16" }, { "name" : "Call Barring Status", "id" : "0x26", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "CS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" } ] }, { "name" : "PLMN Not Changed Indication", "id" : "0x27", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "UMTS Primary Scrambling Code", "id" : "0x28", "type" : "TLV", "since" : "1.0", "format" : "guint16" }, { "name" : "MNC PCS Digit Include Status", "id" : "0x29", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Network Name Source", "id" : "0x2B", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasNetworkNameSource" } ] }, // ********************************************************************************* { "name" : "Get Home Network", "type" : "Message", "service" : "NAS", "id" : "0x0025", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Home Network", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Description", "format" : "string" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Home System ID", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "SID", "format" : "guint16" }, { "name" : "NID", "format" : "guint16" } ] }, { "name" : "Home Network 3GPP2 Ext", "id" : "0x11", "type" : "TLV", "since" : "1.24.6", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Display Description", "format" : "guint8", "public-format" : "QmiNasNetworkDescriptionDisplay" }, { "name" : "Description Encoding", "format" : "guint8", "public-format" : "QmiNasNetworkDescriptionEncoding" }, { "name" : "Description", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, { "name" : "Home Network 3GPP MNC", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Is 3GPP", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Network Name Source", "id" : "0x13", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasNetworkNameSource" } ] }, // ********************************************************************************* { "name" : "Get Preferred Networks", "type" : "Message", "service" : "NAS", "id" : "0x0026", "since" : "1.30", "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "NAS Preferred Networks", "since" : "1.30", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "MNC PCS Digit Include Status", "id" : "0x12", "type" : "TLV", "since" : "1.30", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] } } ] }, // ********************************************************************************* { "name" : "Set Preferred Networks", "type" : "Message", "service" : "NAS", "id" : "0x0027", "since" : "1.30", "input" : [ { "common-ref" : "NAS Preferred Networks", "since" : "1.30" }, { "name" : "MNC PCS Digit Include Status", "id" : "0x11", "type" : "TLV", "since" : "1.30", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] } }, { "name" : "Clear Previous Preferred Networks", "id" : "0x12", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Technology Preference", "type" : "Message", "service" : "NAS", "id" : "0x002A", "since" : "1.0", "input" : [ { "name" : "Current", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Technology Preference", "format" : "guint16", "public-format" : "QmiNasRadioTechnologyPreference" }, { "name" : "Technology Preference Duration", "format" : "guint8", "public-format" : "QmiNasPreferenceDuration" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Technology Preference", "type" : "Message", "service" : "NAS", "id" : "0x002B", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Active", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Technology Preference", "format" : "guint16", "public-format" : "QmiNasRadioTechnologyPreference" }, { "name" : "Technology Preference Duration", "format" : "guint8", "public-format" : "QmiNasPreferenceDuration" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Persistent", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasRadioTechnologyPreference" } ] }, // ********************************************************************************* { "name" : "Get RF Band Information", "type" : "Message", "service" : "NAS", "id" : "0x0031", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Active Band Class", "format" : "guint16", "public-format" : "QmiNasActiveBand" }, { "name" : "Active Channel", "format" : "guint16" } ] } }, { "name" : "Extended List", "id" : "0x11", "type" : "TLV", "since" : "1.26", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Active Band Class", "format" : "guint16", "public-format" : "QmiNasActiveBand" }, { "name" : "Active Channel", "format" : "guint32" } ] } }, { "name" : "Bandwidth List", "id" : "0x12", "type" : "TLV", "since" : "1.26", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Radio Interface", "format" : "gint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Bandwidth", "format" : "guint32", "public-format" : "QmiNasDLBandwidth" } ] } } ] }, // ********************************************************************************* { "name" : "Set System Selection Preference", "type" : "Message", "service" : "NAS", "id" : "0x0033", "since" : "1.0", "input" : [ { "name" : "Emergency mode", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Mode Preference", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasRatModePreference" }, { "name" : "Band Preference", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiNasBandPreference" }, { "name" : "CDMA PRL Preference", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasCdmaPrlPreference" }, { "name" : "Roaming Preference", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasRoamingPreference" }, { "name" : "LTE Band Preference", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiNasLteBandPreference" }, { "name" : "Network Selection Preference", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Mode", "format" : "guint8", "public-format" : "QmiNasNetworkSelectionPreference" }, { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" } ] }, { "name" : "Change Duration", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasChangeDuration" }, { "name" : "Service Domain Preference", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiNasServiceDomainPreference" }, { "name" : "GSM WCDMA Acquisition Order Preference", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiNasGsmWcdmaAcquisitionOrderPreference" }, { "name" : "MNC PCS Digit Include Status", "id" : "0x1A", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "TD SCDMA Band Preference", "id" : "0x1D", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiNasTdScdmaBandPreference" }, { "name" : "Acquisition Order Preference", "id" : "0x1E", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8", "public-format" : "QmiNasRadioInterface" } }, { "name" : "Network Selection Registration Restriction", "id" : "0x1F", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasNetworkSelectionRegistrationRestriction" }, { "name" : "Usage Preference", "id" : "0x21", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasUsagePreference" }, { "name" : "Voice Domain Preference", "id" : "0x23", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasVoiceDomainPreference" }, { "name" : "Extended LTE Band Preference", "id" : "0x24", "type" : "TLV", "since" : "1.20", "format" : "sequence", "contents" : [ { "name" : "Mask Low", "format" : "guint64" }, { "name" : "Mask Mid Low", "format" : "guint64" }, { "name" : "Mask Mid High", "format" : "guint64" }, { "name" : "Mask High", "format" : "guint64" } ] }, { "name" : "NR5G SA Band Preference", "id" : "0x2F", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Mask 0", "format" : "guint64" }, { "name" : "Mask 1", "format" : "guint64" }, { "name" : "Mask 2", "format" : "guint64" }, { "name" : "Mask 3", "format" : "guint64" }, { "name" : "Mask 4", "format" : "guint64" }, { "name" : "Mask 5", "format" : "guint64" }, { "name" : "Mask 6", "format" : "guint64" }, { "name" : "Mask 7", "format" : "guint64" } ] }, { "name" : "NR5G NSA Band Preference", "id" : "0x30", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Mask 0", "format" : "guint64" }, { "name" : "Mask 1", "format" : "guint64" }, { "name" : "Mask 2", "format" : "guint64" }, { "name" : "Mask 3", "format" : "guint64" }, { "name" : "Mask 4", "format" : "guint64" }, { "name" : "Mask 5", "format" : "guint64" }, { "name" : "Mask 6", "format" : "guint64" }, { "name" : "Mask 7", "format" : "guint64" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get System Selection Preference", "type" : "Message", "service" : "NAS", "id" : "0x0034", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Emergency mode", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Mode Preference", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasRatModePreference" }, { "name" : "Band Preference", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiNasBandPreference" }, { "name" : "CDMA PRL Preference", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasCdmaPrlPreference" }, { "name" : "Roaming Preference", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiNasRoamingPreference" }, { "name" : "LTE Band Preference", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiNasLteBandPreference" }, { "name" : "Network Selection Preference", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasNetworkSelectionPreference" }, { "name" : "Service Domain Preference", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiNasServiceDomainPreference" }, { "name" : "GSM WCDMA Acquisition Order Preference", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiNasGsmWcdmaAcquisitionOrderPreference" }, { "name" : "TD SCDMA Band Preference", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "guint64", "public-format" : "QmiNasTdScdmaBandPreference" }, { "name" : "Acquisition Order Preference", "id" : "0x1C", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8", "public-format" : "QmiNasRadioInterface" } }, { "name" : "Manual Network Selection", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Network Selection Registration Restriction", "id" : "0x1D", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasNetworkSelectionRegistrationRestriction" }, { "name" : "Usage Preference", "id" : "0x1F", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasUsagePreference" }, { "name" : "Voice Domain Preference", "id" : "0x20", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasVoiceDomainPreference" }, { "name" : "Disabled Modes", "id" : "0x22", "type" : "TLV", "since" : "1.24", "format" : "guint16", "public-format" : "QmiNasRatModePreference" }, { "name" : "Extended LTE Band Preference", "id" : "0x23", "type" : "TLV", "since" : "1.20", "format" : "sequence", "contents" : [ { "name" : "Mask Low", "format" : "guint64" }, { "name" : "Mask Mid Low", "format" : "guint64" }, { "name" : "Mask Mid High", "format" : "guint64" }, { "name" : "Mask High", "format" : "guint64" } ] }, { "name" : "NR5G SA Band Preference", "id" : "0x2C", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Mask 0", "format" : "guint64" }, { "name" : "Mask 1", "format" : "guint64" }, { "name" : "Mask 2", "format" : "guint64" }, { "name" : "Mask 3", "format" : "guint64" }, { "name" : "Mask 4", "format" : "guint64" }, { "name" : "Mask 5", "format" : "guint64" }, { "name" : "Mask 6", "format" : "guint64" }, { "name" : "Mask 7", "format" : "guint64" } ] }, { "name" : "NR5G NSA Band Preference", "id" : "0x2D", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Mask 0", "format" : "guint64" }, { "name" : "Mask 1", "format" : "guint64" }, { "name" : "Mask 2", "format" : "guint64" }, { "name" : "Mask 3", "format" : "guint64" }, { "name" : "Mask 4", "format" : "guint64" }, { "name" : "Mask 5", "format" : "guint64" }, { "name" : "Mask 6", "format" : "guint64" }, { "name" : "Mask 7", "format" : "guint64" } ] } ] }, // ********************************************************************************* { "name" : "Get Operator Name", "type" : "Message", "service" : "NAS", "id" : "0x0039", "since" : "1.18", "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "NAS Service Provider Name", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "NAS Operator PLMN List", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "NAS Operator PLMN Name", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "NAS Operator String Name", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "NAS NITZ Information", "since" : "1.24.6", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, { "name" : "Operator Name", "type" : "Indication", "service" : "NAS", "id" : "0x003A", "since" : "1.18", "output" : [ { "common-ref" : "NAS Service Provider Name", "since" : "1.18" }, { "common-ref" : "NAS Operator PLMN List", "since" : "1.18" }, { "common-ref" : "NAS Operator PLMN Name", "since" : "1.18" }, { "common-ref" : "NAS Operator String Name", "since" : "1.18" }, { "common-ref" : "NAS NITZ Information", "since" : "1.24.6" } ] }, // ********************************************************************************* { "name" : "Get Cell Location Info", "type" : "Message", "service" : "NAS", "id" : "0x0043", "since" : "1.10", "output-compat" : "yes", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "GERAN Info v2", "id" : "0x10", "type" : "TLV", "since" : "1.26.6", "format" : "sequence", "contents" : [ { "name" : "Cell ID", "format" : "guint32" }, { "name" : "PLMN", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } }, { "name" : "LAC", "format" : "guint16" }, { "name" : "GERAN Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Base Station Identity Code", "format" : "guint8" }, { "name" : "Timing Advance", "format" : "guint32" }, { "name" : "RX Level", "format" : "guint16" }, { "name" : "Cell", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Cell ID", "format" : "guint32" }, { "name" : "PLMN", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } }, { "name" : "LAC", "format" : "guint16" }, { "name" : "GERAN Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Base Station Identity Code", "format" : "guint8" }, { "name" : "RX Level", "format" : "guint16" } ] } } ] }, { "name" : "UMTS Info v2", "id" : "0x11", "type" : "TLV", "since" : "1.26.6", "format" : "sequence", "contents" : [ { "name" : "Cell ID", "format" : "guint16" }, { "name" : "PLMN", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } }, { "name" : "LAC", "format" : "guint16" }, { "name" : "UTRA Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Primary Scrambling Code", "format" : "guint16" }, { "name" : "RSCP", "format" : "gint16" }, { "name" : "ECIO", "format" : "gint16" }, { "name" : "Cell", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "UTRA Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Primary Scrambling Code", "format" : "guint16" }, { "name" : "RSCP", "format" : "gint16" }, { "name" : "ECIO", "format" : "gint16" } ] } }, { "name" : "Neighboring GERAN", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "GERAN Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Network Color Code", "format" : "guint8" }, { "name" : "Base Station Color Code", "format" : "guint8" }, { "name" : "RSSI", "format" : "gint16" } ] } } ] }, { "name" : "CDMA Info", "id" : "0x12", "type" : "TLV", "since" : "1.10", "format" : "sequence", "contents" : [ { "name" : "System ID", "format" : "guint16" }, { "name" : "Network ID", "format" : "guint16" }, { "name" : "Base Station ID", "format" : "guint16" }, { "name" : "Reference PN", "format" : "guint16" }, { "name" : "Latitude", "format" : "guint32" }, { "name" : "Longitude", "format" : "guint32" } ] }, { "name" : "Intrafrequency LTE Info v2", "id" : "0x13", "type" : "TLV", "since" : "1.26.6", "format" : "sequence", "contents" : [ { "name" : "UE In Idle", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PLMN", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } }, { "name" : "Tracking Area Code", "format" : "guint16" }, { "name" : "Global Cell ID", "format" : "guint32" }, { "name" : "EUTRA Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Serving Cell ID", "format" : "guint16" }, { "name" : "Cell Reselection Priority", "format" : "guint8" }, { "name" : "S Non Intra Search Threshold", "format" : "guint8" }, { "name" : "Serving Cell Low Threshold", "format" : "guint8" }, { "name" : "S Intra Search Threshold", "format" : "guint8" }, { "name" : "Cell", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Physical Cell ID", "format" : "guint16" }, { "name" : "RSRQ", "format" : "gint16" }, { "name" : "RSRP", "format" : "gint16" }, { "name" : "RSSI", "format" : "gint16" }, { "name" : "Cell Selection RX Level", "format" : "gint16" } ] } } ] }, { "name" : "Interfrequency LTE Info", "id" : "0x14", "type" : "TLV", "since" : "1.10", "format" : "sequence", "contents" : [ { "name" : "UE In Idle", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Frequency", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "EUTRA Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Cell Selection RX Level Low Threshold", "format" : "guint8" }, { "name" : "Cell Selection RX Level High Threshold", "format" : "guint8" }, { "name" : "Cell Reselection Priority", "format" : "guint8" }, { "name" : "Cell", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Physical Cell ID", "format" : "guint16" }, { "name" : "RSRQ", "format" : "gint16" }, { "name" : "RSRP", "format" : "gint16" }, { "name" : "RSSI", "format" : "gint16" }, { "name" : "Cell Selection RX Level", "format" : "gint16" } ] } } ] } } ] }, { "name" : "LTE Info Neighboring GSM", "id" : "0x15", "type" : "TLV", "since" : "1.10", "format" : "sequence", "contents" : [ { "name" : "UE In Idle", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Frequency", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Cell Reselection Priority", "format" : "guint8" }, { "name" : "Cell Reselection High Threshold", "format" : "guint8" }, { "name" : "Cell Reselection Low Threshold", "format" : "guint8" }, { "name" : "NCC Permitted", "format" : "guint8" }, { "name" : "Cell", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "GERAN Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Band Is 1900", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Cell ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Base Station Identity Code", "format" : "guint8" }, { "name" : "RSSI", "format" : "gint16" }, { "name" : "Cell Selection RX Level", "format" : "gint16" } ] } } ] } } ] }, { "name" : "LTE Info Neighboring WCDMA", "id" : "0x16", "type" : "TLV", "since" : "1.10", "format" : "sequence", "contents" : [ { "name" : "UE In Idle", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Frequency", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "UTRA Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Cell Reselection Priority", "format" : "guint8" }, { "name" : "Cell Reselection High Threshold", "format" : "guint16" }, { "name" : "Cell Reselection Low Threshold", "format" : "guint16" }, { "name" : "Cell", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Primary Scrambling Code", "format" : "guint16" }, { "name" : "CPICH RSCP", "format" : "gint16" }, { "name" : "CPICH EcNo", "format" : "gint16" }, { "name" : "Cell Selection RX Level", "format" : "gint16" } ] } } ] } } ] }, { "name" : "UMTS Cell ID", "id" : "0x17", "type" : "TLV", "since" : "1.10", "format" : "guint32" }, { "name" : "UMTS Info Neighboring LTE", "id" : "0x18", "type" : "TLV", "since" : "1.10", "format" : "sequence", "contents" : [ { "name" : "RRC state", "format" : "guint32", "public-format" : "QmiNasWcdmaRrcState" }, { "name" : "Frequency", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "EUTRA Absolute RF Channel Number", "format" : "guint16" }, { "name" : "Physical Cell ID", "format" : "guint16" }, { "name" : "RSRP", "format" : "gfloat" }, { "name" : "RSRQ", "format" : "gfloat" }, { "name" : "Cell Selection RX Level", "format" : "gint16" }, { "name" : "Is TDD", "format" : "guint8", "public-format" : "gboolean" } ] } } ] }, { "name" : "LTE Info Timing Advance", "id" : "0x1E", "type" : "TLV", "since" : "1.28", "format" : "guint32" }, { "name" : "NR5G ARFCN", "id" : "0x2E", "type" : "TLV", "since" : "1.30", "format" : "guint32" }, { "name" : "NR5G Cell Information", "id" : "0x2F", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "PLMN", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } }, { "name" : "Tracking Area Code", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } }, { "name" : "Global Cell ID", "format" : "guint64" }, { "name" : "Physical Cell ID", "format" : "guint16" }, { "name" : "RSRQ", "format" : "gint16" }, { "name" : "RSRP", "format" : "gint16" }, { "name" : "SNR", "format" : "gint16" } ] } ] }, // ********************************************************************************* { "name" : "Get PLMN Name", "type" : "Message", "service" : "NAS", "id" : "0x0044", "since" : "1.28", "input" : [ { "name" : "PLMN", "id" : "0x01", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" } ] }, { "name" : "Suppress SIM Error", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MNC PCS Digit Include Status", "id" : "0x11", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Always Send PLMN Name", "id" : "0x12", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Use Static Table Only", "id" : "0x13", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CSG ID", "id" : "0x14", "type" : "TLV", "since" : "1.28", "format" : "guint32" }, { "name" : "Radio Access Technology", "id" : "0x15", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Send All Information", "id" : "0x16", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "3GPP EONS PLMN Name", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Service Provider Name Encoding", "format" : "guint8", "public-format" : "QmiNasNetworkDescriptionEncoding" }, { "name" : "Service Provider Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Short Name Encoding", "format" : "guint8", "public-format" : "QmiNasNetworkDescriptionEncoding" }, { "name" : "Short Name Country Initials", "format" : "guint8", "public-format" : "QmiNasPlmnNameCountryInitials" }, { "name" : "Short Name Spare Bits", "format" : "guint8", "public-format" : "QmiNasPlmnNameSpareBits" }, { "name" : "Short Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Long Name Encoding", "format" : "guint8", "public-format" : "QmiNasNetworkDescriptionEncoding" }, { "name" : "Long Name Country Initials", "format" : "guint8", "public-format" : "QmiNasPlmnNameCountryInitials" }, { "name" : "Long Name Spare Bits", "format" : "guint8", "public-format" : "QmiNasPlmnNameSpareBits" }, { "name" : "Long Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, { "name" : "Display Bit Information", "id" : "0x11", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Service Provider Name Set", "format" : "guint32", "public-format" : "QmiNasBoolean" }, { "name" : "Plmn Name Set", "format" : "guint32", "public-format" : "QmiNasBoolean" } ] }, { "name" : "Network Information", "id" : "0x12", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiNasBoolean" }, { "name" : "PLMN Name With Language Id", "id" : "0x13", "type" : "TLV", "since" : "1.28", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Long Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint16" } }, { "name" : "Short Name", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint16" } }, { "name" : "Language Id", "format" : "guint32", "public-format" : "QmiNasPlmnLanguageId" } ] } }, { "name" : "Additional Information", "id" : "0x14", "type" : "TLV", "since" : "1.28", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint16" } }, { "name" : "Network Name Source", "id" : "0x15", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiNasNetworkNameSource" } ] }, // ********************************************************************************* { "name" : "Network Time", "type" : "Indication", "service" : "NAS", "id" : "0x004C", "since" : "1.0", "output" : [ { "name" : "Universal Time", "id" : "0x01", "type" : "TLV", "since" : "1.4", "format" : "sequence", "contents" : [ { "name" : "Year", "format" : "guint16" }, { "name" : "Month", "format" : "guint8" }, { "name" : "Day", "format" : "guint8" }, { "name" : "Hour", "format" : "guint8" }, { "name" : "Minute", "format" : "guint8" }, { "name" : "Second", "format" : "guint8" }, { "name" : "Day Of Week", "format" : "guint8", "public-format" : "QmiNasDayOfWeek" } ] }, { "name" : "Timezone Offset", "id" : "0x10", "type" : "TLV", "since" : "1.4", "format" : "gint8" }, { "name" : "Daylight Savings Adjustment", "id" : "0x11", "type" : "TLV", "since" : "1.4", "format" : "guint8", "public-format" : "QmiNasDaylightSavingsAdjustment" }, { "name" : "Radio Interface", "id" : "0x12", "type" : "TLV", "since" : "1.4", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ] }, // ********************************************************************************* { "name" : "Get System Info", "type" : "Message", "service" : "NAS", "id" : "0x004D", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "CDMA Service Status", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "HDR Service Status", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "GSM Service Status", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "WCDMA Service Status", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "LTE Service Status", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "CDMA System Info", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "P Rev Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "P Rev", "format" : "guint8" }, { "name" : "Base Station P Rev Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Base Station P Rev", "format" : "guint8" }, { "name" : "Concurrent Service Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Concurrent Service Support", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CDMA System ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "SID", "format" : "guint16" }, { "name" : "NID", "format" : "guint16" }, { "name" : "Base Station Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Base Station ID", "format" : "guint16" }, { "name" : "Base Station Latitude", "format" : "gint32" }, { "name" : "Base Station Longitude", "format" : "gint32" }, { "name" : "Packet Zone Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Packet Zone", "format" : "guint16" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" } ] }, { "name" : "HDR System Info", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Personality Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Personality", "format" : "guint8", "public-format" : "QmiNasHdrPersonality" }, { "name" : "Protocol Revision Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Protocol Revision", "format" : "guint8", "public-format" : "QmiNasHdrProtocolRevision" }, { "name" : "IS 856 System ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "IS 856 System ID", "format" : "string", "fixed-size" : "16" } ] }, { "name" : "GSM System Info v2", "id" : "0x17", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "EGPRS Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "EGPRS Support", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "DTM Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "DTM Support", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "WCDMA System Info v2", "id" : "0x18", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "HS Call Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Call Status", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "HS Service Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Service", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "Primary Scrambling Code Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Primary Scrambling Code", "format" : "guint16" } ] }, { "name" : "LTE System Info v2", "id" : "0x19", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "TAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "TAC", "format" : "guint16" } ] }, { "name" : "Additional CDMA System Info", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" }, { "name" : "Registration Period", "format" : "guint16" } ] }, { "name" : "Additional HDR System Info", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" } ] }, { "name" : "Additional GSM System Info", "id" : "0x1C", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" }, { "name" : "Cell Broadcast Support", "format" : "guint32", "public-format" : "QmiNasCellBroadcastCapability" } ] }, { "name" : "Additional WCDMA System Info", "id" : "0x1D", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" }, { "name" : "Cell Broadcast Support", "format" : "guint32", "public-format" : "QmiNasCellBroadcastCapability" } ] }, { "name" : "Additional LTE System Info", "id" : "0x1E", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" } ] }, { "name" : "GSM Call Barring Status", "id" : "0x1F", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "CS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" } ] }, { "name" : "WCDMA Call Barring Status", "id" : "0x20", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "CS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" } ] }, { "name" : "LTE Voice Support", "id" : "0x21", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "GSM Cipher Domain", "id" : "0x22", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "WCDMA Cipher Domain", "id" : "0x23", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "TD SCDMA Service Status", "id" : "0x24", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "TD SCDMA System Info v2", "id" : "0x25", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "HS Call Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Call Status", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "HS Service Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Service", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "Cell Parameter ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Cell Parameter ID", "format" : "guint16" }, { "name" : "Cell Broadcast Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Cell Broadcast Support", "format" : "guint32", "public-format" : "QmiNasCellBroadcastCapability" }, { "name" : "CS Call Barring Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CS Call Barring Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Call Barring Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PS Call Barring Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "Cipher Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Cipher Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" } ] }, { "name" : "LTE eMBMS Coverage Info Support", "id" : "0x26", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "SIM Reject Info", "id" : "0x27", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiNasSimRejectState" }, { "name" : "IMS Voice Support", "id" : "0x29", "type" : "TLV", "since" : "1.24", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LTE Voice Domain", "id" : "0x2A", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiNasLteVoiceDomain" }, { "name" : "CDMA Registration Zone ID", "id" : "0x2B", "type" : "TLV", "since" : "1.28", "format" : "guint16" }, { "name" : "GSM Routing Area Code", "id" : "0x2C", "type" : "TLV", "since" : "1.28", "format" : "guint8" }, { "name" : "WCDMA Routing Area Code", "id" : "0x2D", "type" : "TLV", "since" : "1.28", "format" : "guint8" }, { "name" : "CDMA Resolved MCC", "id" : "0x2E", "type" : "TLV", "since" : "1.28", "format" : "guint16" }, { "name" : "Network Selection Registration Restriction", "id" : "0x2F", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasNetworkSelectionRegistrationRestriction" }, { "name" : "LTE Registration Domain", "id" : "0x31", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasLteRegistrationDomain" }, { "name" : "LTE eMBMS Coverage Info Trace ID", "id" : "0x34", "type" : "TLV", "since" : "1.24", "format" : "guint16" }, { "name" : "LTE Cell Access Status", "id" : "0x44", "type" : "TLV", "since" : "1.24", "format" : "guint32", "public-format" : "QmiNasLteCellAccessStatus" }, { "name" : "NR5G Service Status Info", "id" : "0x4A", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "NR5G System Info", "id" : "0x4B", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "TAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "TAC", "format" : "guint16" } ] }, { "name" : "EUTRA with NR5G availability", "id" : "0x4E", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "DCNR restriction Info", "id" : "0x4F", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "NR5G Tracking Area Code", "id" : "0x50", "type" : "TLV", "since" : "1.30", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } } ] }, // ********************************************************************************* { "name" : "System Info", "type" : "Indication", "service" : "NAS", "id" : "0x004E", "since" : "1.0", "output" : [ { "name" : "CDMA Service Status", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "HDR Service Status", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "GSM Service Status", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "WCDMA Service Status", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "LTE Service Status", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "CDMA System Info", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "P Rev Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "P Rev", "format" : "guint8" }, { "name" : "Base Station P Rev Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Base Station P Rev", "format" : "guint8" }, { "name" : "Concurrent Service Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Concurrent Service Support", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CDMA System ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "SID", "format" : "guint16" }, { "name" : "NID", "format" : "guint16" }, { "name" : "Base Station Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Base Station ID", "format" : "guint16" }, { "name" : "Base Station Latitude", "format" : "gint32" }, { "name" : "Base Station Longitude", "format" : "gint32" }, { "name" : "Packet Zone Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Packet Zone", "format" : "guint16" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" } ] }, { "name" : "HDR System Info", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Match", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Personality Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Personality", "format" : "guint8", "public-format" : "QmiNasHdrPersonality" }, { "name" : "Protocol Revision Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Protocol Revision", "format" : "guint8", "public-format" : "QmiNasHdrProtocolRevision" }, { "name" : "IS 856 System ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "IS 856 System ID", "format" : "string", "fixed-size" : "16" } ] }, { "name" : "GSM System Info v2", "id" : "0x17", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "EGPRS Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "EGPRS Support", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "DTM Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "DTM Support", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "WCDMA System Info v2", "id" : "0x18", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "HS Call Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Call Status", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "HS Service Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Service", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "Primary Scrambling Code Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Primary Scrambling Code", "format" : "guint16" } ] }, { "name" : "LTE System Info v2", "id" : "0x19", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "TAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "TAC", "format" : "guint16" } ] }, { "name" : "Additional CDMA System Info", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" }, { "name" : "Registration Period", "format" : "guint16" } ] }, { "name" : "Additional HDR System Info", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" } ] }, { "name" : "Additional GSM System Info", "id" : "0x1C", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" }, { "name" : "Cell Broadcast Support", "format" : "guint32", "public-format" : "QmiNasCellBroadcastCapability" } ] }, { "name" : "Additional WCDMA System Info", "id" : "0x1D", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" }, { "name" : "Cell Broadcast Support", "format" : "guint32", "public-format" : "QmiNasCellBroadcastCapability" } ] }, { "name" : "Additional LTE System Info", "id" : "0x1E", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Geo System Index", "format" : "guint16" } ] }, { "name" : "GSM Call Barring Status", "id" : "0x1F", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "CS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" } ] }, { "name" : "WCDMA Call Barring Status", "id" : "0x20", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "CS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" } ] }, { "name" : "LTE Voice Support", "id" : "0x21", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "GSM Cipher Domain", "id" : "0x22", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "WCDMA Cipher Domain", "id" : "0x23", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "PLMN Not Changed Indication", "id" : "0x24", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "TD SCDMA Service Status", "id" : "0x25", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "TD SCMA System Info v2", "id" : "0x26", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "HS Call Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Call Status", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "HS Service Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HS Service", "format" : "guint8", "public-format" : "QmiNasWcdmaHsService" }, { "name" : "Cell Parameter ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Cell Parameter ID", "format" : "guint16" }, { "name" : "Cell Broadcast Support Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Cell Broadcast Support", "format" : "guint32", "public-format" : "QmiNasCellBroadcastCapability" }, { "name" : "CS Call Barring Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CS Call Barring Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "PS Call Barring Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PS Call Barring Status", "format" : "gint32", "public-format" : "QmiNasCallBarringStatus" }, { "name" : "Cipher Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Cipher Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" } ] }, { "name" : "LTE eMBMS Coverage Info Support", "id" : "0x27", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "SIM Reject Info", "id" : "0x28", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiNasSimRejectState" }, { "name" : "NR5G Service Status Info", "id" : "0x4C", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "True Service Status", "format" : "guint8", "public-format" : "QmiNasServiceStatus" }, { "name" : "Preferred Data Path", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "NR5G System Info", "id" : "0x4D", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Domain Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Service Capability Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Capability", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Roaming Status Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roaming Status", "format" : "guint8", "public-format" : "QmiNasRoamingStatus" }, { "name" : "Forbidden Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Forbidden", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "LAC", "format" : "guint16" }, { "name" : "CID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "CID", "format" : "guint32" }, { "name" : "Registration Reject Info Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Registration Reject Domain", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Registration Reject Cause", "format" : "guint8" }, { "name" : "Network ID Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MCC", "format" : "string", "fixed-size" : "3" }, { "name" : "MNC", "format" : "string", "fixed-size" : "3" }, { "name" : "TAC Valid", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "TAC", "format" : "guint16" } ] }, { "name" : "EUTRA with NR5G availability", "id" : "0x50", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "DCNR restriction Info", "id" : "0x51", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "NR5G Tracking Area Code", "id" : "0x52", "type" : "TLV", "since" : "1.30", "format" : "array", "fixed-size" : "3", "array-element" : { "format" : "guint8" } } ] }, // ********************************************************************************* { "name" : "Get Signal Info", "type" : "Message", "service" : "NAS", "id" : "0x004F", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "CDMA Signal Strength", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "ECIO", "format" : "gint16" } ] }, { "name" : "HDR Signal Strength", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "ECIO", "format" : "gint16" }, { "name" : "SINR", "format" : "guint8", "public-format" : "QmiNasEvdoSinrLevel" }, { "name" : "IO", "format" : "gint32" } ] }, { "name" : "GSM Signal Strength", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "gint8" }, { "name" : "WCDMA Signal Strength", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "ECIO", "format" : "gint16" } ] }, { "name" : "LTE Signal Strength", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "RSRQ", "format" : "gint8" }, { "name" : "RSRP", "format" : "gint16" }, { "name" : "SNR", "format" : "gint16" } ] }, { "name" : "TDMA Signal Strength", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "gint8" } , { "name" : "TDMA Signal Strength Extended", "id" : "0x16", "type" : "TLV", "since" : "1.26.2", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint32" }, { "name" : "RSCP", "format" : "gint32" }, { "name" : "ECIO", "format" : "gint32" }, { "name" : "SINR", "format" : "gint32" } ] }, { "name" : "5G Signal Strength", "id" : "0x17", "type" : "TLV", "since" : "1.26.2", "format" : "sequence", "contents" : [ { "name" : "RSRP", "format" : "gint16" }, { "name" : "SNR", "format" : "gint16" } ] }, { "name" : "5G Signal Strength Extended", "id" : "0x18", "type" : "TLV", "since" : "1.26.2", "format" : "gint16" }, { "name" : "WCDMA RSCP", "id" : "0x19", "type" : "TLV", "since" : "1.34", "format" : "gint16" } ] }, // ********************************************************************************* { "name" : "Config Signal Info", "type" : "Message", "service" : "NAS", "id" : "0x0050", "since" : "1.0", "input" : [ { "name" : "RSSI Threshold", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8" } }, { "name" : "ECIO Threshold", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "SINR Threshold", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "LTE SNR Threshold", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "IO Threshold", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint32" } }, { "name" : "RSRQ Threshold", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8" } }, { "name" : "RSRP Threshold", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "LTE Report", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Rate", "format" : "guint8" }, { "name" : "Average Period", "format" : "guint8" } ] }, { "name" : "RSCP Threshold", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint8" } } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Config Signal Info v2", "type" : "Message", "service" : "NAS", "id" : "0x006C", "since" : "1.32", "input" : [ { "name" : "CDMA RSSI Threshold List", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "CDMA RSSI Delta", "id" : "0x11", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "CDMA ECIO Threshold List", "id" : "0x12", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "CDMA ECIO Delta", "id" : "0x13", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "HDR RSSI Threshold List", "id" : "0x14", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "HDR RSSI Delta", "id" : "0x15", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "HDR ECIO Threshold List", "id" : "0x16", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "HDR ECIO Delta", "id" : "0x17", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "HDR SINR Threshold List", "id" : "0x18", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "HDR SINR Delta", "id" : "0x19", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "HDR IO Threshold List", "id" : "0x1A", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "HDR IO Delta", "id" : "0x1B", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "GSM RSSI Threshold List", "id" : "0x1C", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "GSM RSSI Delta", "id" : "0x1D", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "WCDMA RSSI Threshold List", "id" : "0x1E", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "WCDMA RSSI Delta", "id" : "0x1F", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "WCDMA ECIO Threshold List", "id" : "0x20", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "WCDMA ECIO Delta", "id" : "0x21", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "LTE RSSI Threshold List", "id" : "0x22", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "LTE RSSI Delta", "id" : "0x23", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "LTE SNR Threshold List", "id" : "0x24", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "LTE SNR Delta", "id" : "0x25", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "LTE RSRQ Threshold List", "id" : "0x26", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "LTE RSRQ Delta", "id" : "0x27", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "LTE RSRP Threshold List", "id" : "0x28", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "LTE RSRP Delta", "id" : "0x29", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "LTE Report", "id" : "0x2A", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Rate", "format" : "guint8" }, { "name" : "Average Period", "format" : "guint8" } ] }, { "name" : "NR5G SNR Threshold List", "id" : "0x33", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "NR5G SNR Delta", "id" : "0x34", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "NR5G RSRP Threshold List", "id" : "0x35", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "NR5G RSRP Delta", "id" : "0x36", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "NR5G Report", "id" : "0x37", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Rate", "format" : "guint8" }, { "name" : "Average Period", "format" : "guint8" } ] }, { "name" : "NR5G RSRQ Threshold List", "id" : "0x38", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "NR5G RSRQ Delta", "id" : "0x39", "type" : "TLV", "since" : "1.32", "format" : "guint16" }, { "name" : "WCDMA RSCP Threshold List", "id" : "0x3A", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "gint16" } }, { "name" : "WCDMA RSCP Delta", "id" : "0x3B", "type" : "TLV", "since" : "1.32", "format" : "guint16" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Signal Info", "type" : "Indication", "service" : "NAS", "id" : "0x0051", "since" : "1.0", "output" : [ { "name" : "CDMA Signal Strength", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "ECIO", "format" : "gint16" } ] }, { "name" : "HDR Signal Strength", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "ECIO", "format" : "gint16" }, { "name" : "SINR", "format" : "guint8", "public-format" : "QmiNasEvdoSinrLevel" }, { "name" : "IO", "format" : "gint32" } ] }, { "name" : "GSM Signal Strength", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "gint8" }, { "name" : "WCDMA Signal Strength", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "ECIO", "format" : "gint16" } ] }, { "name" : "LTE Signal Strength", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RSSI", "format" : "gint8" }, { "name" : "RSRQ", "format" : "gint8" }, { "name" : "RSRP", "format" : "gint16" }, { "name" : "SNR", "format" : "gint16" } ] }, { "name" : "TDMA Signal Strength", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "gint8" }, { "name" : "5G Signal Strength", "id" : "0x17", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "RSRP", "format" : "gint16" }, { "name" : "SNR", "format" : "gint16" } ] }, { "name" : "5G Signal Strength Extended", "id" : "0x18", "type" : "TLV", "since" : "1.32", "format" : "gint16" }, { "name" : "WCDMA RSCP", "id" : "0x19", "type" : "TLV", "since" : "1.34", "format" : "gint16" } ] }, // ********************************************************************************* { "name" : "Get Tx Rx Info", "type" : "Message", "service" : "NAS", "id" : "0x005A", "since" : "1.6", "input" : [ { "name" : "Radio Interface", "id" : "0x01", "type" : "TLV", "since" : "1.6", "format" : "gint8", "public-format" : "QmiNasRadioInterface" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Rx Chain 0 Info", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Is Radio Tuned", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Rx Power", "format" : "gint32" }, { "name" : "ECIO", "format" : "gint32" }, { "name" : "RSCP", "format" : "gint32" }, { "name" : "RSRP", "format" : "gint32" }, { "name" : "Phase", "format" : "guint32" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Rx Chain 1 Info", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Is Radio Tuned", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Rx Power", "format" : "gint32" }, { "name" : "ECIO", "format" : "gint32" }, { "name" : "RSCP", "format" : "gint32" }, { "name" : "RSRP", "format" : "gint32" }, { "name" : "Phase", "format" : "guint32" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Tx Info", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Is In Traffic", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Tx Power", "format" : "gint32" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Rx Chain 2 Info", "id" : "0x15", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Is Radio Tuned", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Rx Power", "format" : "gint32" }, { "name" : "ECIO", "format" : "gint32" }, { "name" : "RSCP", "format" : "gint32" }, { "name" : "RSRP", "format" : "gint32" }, { "name" : "Phase", "format" : "guint32" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Rx Chain 3 Info", "id" : "0x16", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Is Radio Tuned", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Rx Power", "format" : "gint32" }, { "name" : "ECIO", "format" : "gint32" }, { "name" : "RSCP", "format" : "gint32" }, { "name" : "RSRP", "format" : "gint32" }, { "name" : "Phase", "format" : "guint32" } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get CDMA Position Info", "type" : "Message", "service" : "NAS", "id" : "0x0065", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "CDMA Position Info", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "UI In Idle Mode", "format" : "gint8" }, { "name" : "BaseStations", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "BaseStation", "format" : "struct", "contents" : [ { "name" : "Pilot Type", "format" : "guint32", "public-format" : "QmiNasCdmaPilotType" }, { "name" : "System ID", "format" : "guint16" }, { "name" : "Network ID", "format" : "guint16" }, { "name" : "Base Station ID", "format" : "guint16" }, { "name" : "Pilot PN", "format" : "guint16" }, { "name" : "Pilot Strength", "format" : "guint16" }, { "name" : "Latitude", "format" : "gint32" }, { "name" : "Longitude", "format" : "gint32" }, { "name" : "GPS Time In Milliseconds", "format" : "guint64" } ] } } ], "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Force Network Search", "type" : "Message", "service" : "NAS", "id" : "0x0067", "since" : "1.16", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Network Reject", "type" : "Indication", "service" : "NAS", "id" : "0x0068", "since" : "1.30", "output" : [ { "name" : "Radio Interface", "id" : "0x01", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "QmiNasRadioInterface" }, { "name" : "Service Domain", "id" : "0x02", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "QmiNasNetworkServiceDomain" }, { "name" : "Reject Cause", "id" : "0x03", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "QmiNasRejectCause" }, { "name" : "PLMN", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" }, { "name" : "Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Closed Subscriber Group", "id" : "0x11", "type" : "TLV", "since" : "1.30", "format" : "guint32" } ] }, // ********************************************************************************* { "name" : "Get DRX", "type" : "Message", "service" : "NAS", "id" : "0x0089", "since" : "1.28", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Info", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiNasDrx", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get LTE Cphy CA Info", "type" : "Message", "service" : "NAS", "id" : "0x00AC", "since" : "1.16", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "DL Bandwidth", "id" : "0x11", "type" : "TLV", "since" : "1.16", "format" : "guint32", "public-format": "QmiNasDLBandwidth", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Phy CA Agg SCell Info", "id" : "0x12", "type" : "TLV", "since" : "1.16", "format" : "sequence", "contents" : [ { "name" : "Physical Cell ID", "format" : "guint16"}, { "name" : "Rx Channel", "format" : "guint16" }, { "name" : "DL Bandwidth", "format" : "guint32", "public-format" : "QmiNasDLBandwidth" }, { "name" : "LTE Band", "format" : "guint16", "public-format" : "QmiNasActiveBand" }, { "name" : "State", "format" : "guint32", "public-format" : "QmiNasScellState" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Phy CA Agg PCell Info", "id" : "0x13", "type" : "TLV", "since" : "1.16", "format" : "sequence", "contents" : [ { "name" : "Physical Cell ID", "format" : "guint16"}, { "name" : "Rx Channel", "format" : "guint16" }, { "name" : "DL Bandwidth", "format" : "guint32", "public-format" : "QmiNasDLBandwidth" }, { "name" : "LTE Band", "format" : "guint16", "public-format" : "QmiNasActiveBand" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "SCell index", "id" : "0x14", "type" : "TLV", "since" : "1.16", "format" : "guint8", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Phy CA Agg Secondary Cells", "id" : "0x15", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "SSC", "format" : "struct", "contents" : [ { "name" : "Physical Cell ID", "format" : "guint16"}, { "name" : "Rx Channel", "format" : "guint16" }, { "name" : "DL Bandwidth", "format" : "guint32", "public-format" : "QmiNasDLBandwidth" }, { "name" : "LTE Band", "format" : "guint16", "public-format" : "QmiNasActiveBand" }, { "name" : "State", "format" : "guint32", "public-format" : "QmiNasScellState" }, { "name" : "Cell Index", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Swi Get Status", "type" : "Message", "service" : "NAS", "id" : "0x5556", "vendor" : "0x1199", "since" : "1.24", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Common Info v2", "id" : "0x01", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Temperature", "format" : "gint8"}, { "name" : "Modem Mode", "format" : "guint8", "public-format" : "QmiNasSwiModemMode"}, { "name" : "System Mode", "format" : "guint8", "public-format" : "QmiNasSwiSystemMode"}, { "name" : "IMS Registration State", "format" : "guint8", "public-format" : "QmiNasSwiImsRegState"}, { "name" : "Packet Service State", "format" : "guint8", "public-format" : "QmiNasSwiPsState" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "LTE Info", "id" : "0x10", "type" : "TLV", "since" : "1.24", "format" : "sequence", "contents" : [ { "name" : "Band", "format" : "guint8", "public-format" : "QmiNasActiveBand" }, { "name" : "Bandwidth", "format" : "guint8", "public-format" : "QmiNasDLBandwidth"}, { "name" : "RX Channel", "format" : "guint16" }, { "name" : "TX Channel", "format" : "guint16" }, { "name" : "EMM State", "format" : "guint8", "public-format" : "QmiNasSwiEmmState"}, { "name" : "EMM Sub State", "format" : "guint8" }, { "name" : "EMM Connection State", "format" : "guint8", "public-format" : "QmiNasSwiEmmConnectionState" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-oma.json000066400000000000000000000256141455567757300204750ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "OMA", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client OMA", "type" : "Client", "since" : "1.6" }, // ********************************************************************************* { "name" : "QMI Message OMA", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication OMA", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "OMA", "id" : "0x0000", "since" : "1.6", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Event Report", "type" : "Message", "service" : "OMA", "id" : "0x0001", "since" : "1.6", "input" : [ { "name" : "Network Initiated Alert Reporting", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Session State Reporting", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Event Report", "type" : "Indication", "service" : "OMA", "id" : "0x0001", "since" : "1.6", "output" : [ { "name" : "Network Initiated Alert", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiOmaSessionType" }, { "name" : "Session ID", "format" : "guint16" } ] }, { "name" : "Session State", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "QmiOmaSessionState" }, { "name" : "Session Fail Reason", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "QmiOmaSessionFailedReason" } ] }, // ********************************************************************************* { "name" : "Start Session", "type" : "Message", "service" : "OMA", "id" : "0x0020", "since" : "1.6", "input" : [ { "name" : "Session Type", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "QmiOmaSessionType" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Cancel Session", "type" : "Message", "service" : "OMA", "id" : "0x0021", "since" : "1.6", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Session Info", "type" : "Message", "service" : "OMA", "id" : "0x0022", "since" : "1.6", "output" : [ { "name" : "Session Info", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Session State", "format" : "guint8", "public-format" : "QmiOmaSessionState" }, { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiOmaSessionType" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Session Failed Reason", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "QmiOmaSessionFailedReason", "prerequisites" : [ { "field" : "Session Info Session State", "operation" : "==", "value" : "QMI_OMA_SESSION_STATE_FAILED" } ] }, { "name" : "Retry Info", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Retry Count", "format" : "guint8" }, { "name" : "Retry Pause Timer", "format" : "guint16" }, { "name" : "Retry Pause Timer Remaining", "format" : "guint16" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Network Initiated Alert", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiOmaSessionType" }, { "name" : "Session ID", "format" : "guint16" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Send Selection", "type" : "Message", "service" : "OMA", "id" : "0x0023", "since" : "1.6", "input" : [ { "name" : "Network Initiated Alert Selection", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Control Point Selection Accept", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Session ID", "format" : "guint16" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Feature Setting", "type" : "Message", "service" : "OMA", "id" : "0x0024", "since" : "1.6", "output" : [ { "name" : "Device Provisioning Service Update Config", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "PRL Update Service Config", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "HFA Feature Config", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "HFA Feature Done State", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "QmiOmaHfaFeatureDoneState", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Feature Setting", "type" : "Message", "service" : "OMA", "id" : "0x0025", "since" : "1.6", "input" : [ { "name" : "Device Provisioning Service Update Config", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PRL Update Service Config", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "HFA Feature Config", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] } ] libqmi-1.35.2-dev/data/qmi-service-pbm.json000066400000000000000000000477401455567757300205030ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "PBM", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client PBM", "type" : "Client", "since" : "1.6" }, // ********************************************************************************* { "name" : "QMI Message PBM", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Indication Register", "type" : "Message", "service" : "PBM", "id" : "0x0001", "since" : "1.6", "input" : [ { "name" : "Event Registration Mask", "id" : "0x01", "type" : "TLV", "since" : "1.6", "format" : "guint32", "public-format" : "QmiPbmEventRegistrationFlag" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Event Registration Mask", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint32", "public-format" : "QmiPbmEventRegistrationFlag", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Capabilities", "type" : "Message", "service" : "PBM", "id" : "0x0002", "since" : "1.6", "input" : [ { "name" : "Phonebook Information", "id" : "0x01", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Phonebook Type", "format" : "guint16", "public-format" : "QmiPbmPhonebookType" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Capability Basic Information", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Phonebook Type", "format" : "guint16", "public-format" : "QmiPbmPhonebookType" }, { "name" : "Used Records", "format" : "guint16" }, { "name" : "Maximum Records", "format" : "guint16" }, { "name" : "Maximum Number Length", "format" : "guint8" }, { "name" : "Maximum Name Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Group Capability", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Maximum Groups", "format" : "guint8" }, { "name" : "Maximum Group Tag Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Additional Number Capability", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Maximum Additional Numbers", "format" : "guint8" }, { "name" : "Maximum Additional Number Length", "format" : "guint8" }, { "name" : "Maximum Additional Number Tag Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Email Capability", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Maximum Emails", "format" : "guint8" }, { "name" : "Maximum Email Address Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Second Name Capability", "id" : "0x14", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Maximum Second Name Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Hidden Records Capability", "id" : "0x15", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Supported", "format" : "guint8", "public-format" : "gboolean" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Grouping Information Alpha String Capability", "id" : "0x16", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Maximum Records", "format" : "guint8" }, { "name" : "Used Records", "format" : "guint8" }, { "name" : "Maximum String Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Additional Number Alpha String Capability", "id" : "0x17", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Maximum Records", "format" : "guint8" }, { "name" : "Used Records", "format" : "guint8" }, { "name" : "Maximum String Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get All Capabilities", "type" : "Message", "service" : "PBM", "id" : "0x0003", "since" : "1.6", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Capability Basic Information", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Phonebooks", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Phonebook Type", "format" : "guint16", "public-format" : "QmiPbmPhonebookType" }, { "name" : "Used Records", "format" : "guint16" }, { "name" : "Maximum Records", "format" : "guint16" }, { "name" : "Maximum Number Length", "format" : "guint8" }, { "name" : "Maximum Name Length", "format" : "guint8" } ] } } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Group Capability", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Maximum Groups", "format" : "guint8" }, { "name" : "Maximum Group Tag Length", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Additional Number Capability", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Maximum Additional Numbers", "format" : "guint8" }, { "name" : "Maximum Additional Number Length", "format" : "guint8" }, { "name" : "Maximum Additional Number Tag Length", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Email Capability", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Maximum Emails", "format" : "guint8" }, { "name" : "Maximum Email Address Length", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Second Name Capability", "id" : "0x14", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Maximum Second Name Length", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Hidden Records Capability", "id" : "0x15", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Supported", "format" : "guint8", "public-format" : "gboolean" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Grouping Information Alpha String Capability", "id" : "0x16", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Maximum Records", "format" : "guint8" }, { "name" : "Used Records", "format" : "guint8" }, { "name" : "Maximum String Length", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Additional Number Alpha String Capability", "id" : "0x17", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiPbmSessionType" }, { "name" : "Maximum Records", "format" : "guint8" }, { "name" : "Used Records", "format" : "guint8" }, { "name" : "Maximum String Length", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-pdc.json000066400000000000000000000457211455567757300204700ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "PDC", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client PDC", "type" : "Client", "since" : "1.18" }, // ********************************************************************************* { "name" : "QMI Message PDC", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication PDC", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "common-ref" : "Config Type", "name" : "Config Type", "id" : "0x1", "type" : "TLV", "format" : "guint32", "public-format" : "QmiPdcConfigurationType" }, { "common-ref" : "Indication Result", "name" : "Indication Result", "id" : "0x01", "type" : "TLV", "format" : "guint16" }, // ********************************************************************************* { "common-ref" : "Config Type And Id", "name" : "Type With Id v2", "id" : "0x01", "since" : "1.32", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Config Type", "format" : "guint32", "public-format" : "QmiPdcConfigurationType"}, { "name" : "Id", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }} ]}, // ********************************************************************************* { "common-ref" : "Token", "name" : "Token", "id" : "0x10", "type" : "TLV", "format" : "guint32"}, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "PDC", "id" : "0x0000", "since" : "1.18", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Register", "type" : "Message", "service" : "PDC", "id" : "0x20", "since" : "1.18", "input" : [ { "name" : "Enable Reporting", "id" : "0x10", "mandatory" : "yes", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean"}, { "name" : "Enable Refresh", "id" : "0x11", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format" : "gboolean"}], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Config Change", "type" : "Message", "service" : "PDC", "id" : "0x21", "since" : "1.18", "input" : [ { "common-ref" : "Config Type And Id" } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Config Type And Id" } ] }, // ********************************************************************************* { "name" : "Get Selected Config", "type" : "Message", "service" : "PDC", "id" : "0x22", "since" : "1.18", "input" : [ { "common-ref" : "Config Type", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }]}, { "name" : "Get Selected Config", "type" : "Indication", "service" : "PDC", "id" : "0x22", "since" : "1.18", "output" : [ { "common-ref" : "Token", "since" : "1.18" }, { "common-ref" : "Indication Result", "since" : "1.18" }, { "name" : "Active Id", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Pending Id", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }]}, // ********************************************************************************* { "name" : "Set Selected Config", "type" : "Message", "service" : "PDC", "id" : "0x23", "since" : "1.18", "input" : [ { "common-ref" : "Config Type And Id" }, { "common-ref" : "Token", "since" : "1.18" }], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }] }, { "name" : "Set Selected Config", "type" : "Indication", "service" : "PDC", "id" : "0x23", "since" : "1.18", "output" : [ { "common-ref" : "Indication Result", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }] }, // ********************************************************************************* { "name" : "List Configs", "type" : "Message", "service" : "PDC", "id" : "0x24", "since" : "1.18", "input" : [ { "common-ref" : "Token", "since" : "1.18" }, { "name" : "Config Type", "id" : "0x11", "mandatory" : "yes", "type" : "TLV", "since" : "1.18", "format" : "guint32", "public-format" : "QmiPdcConfigurationType" }], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "List Configs", "type" : "Indication", "service" : "PDC", "id" : "0x24", "since" : "1.18", "output" : [ { "common-ref" : "Token", "since" : "1.18" }, { "common-ref" : "Indication Result", "since" : "1.18" }, { "name" : "Configs", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Config Type", "format" : "guint32", "public-format" : "QmiPdcConfigurationType" }, { "name" : "Id", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] } } ] }, // ********************************************************************************* { "name" : "Delete Config", "type" : "Message", "service" : "PDC", "id" : "0x25", "since" : "1.18", "input" : [ { "common-ref" : "Config Type", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }, { "name" : "Id", "id" : "0x11", "mandatory" : "yes", "type" : "TLV", "since" : "1.18", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }}], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }] }, // ********************************************************************************* { "name" : "Load Config", "type" : "Message", "service" : "PDC", "id" : "0x26", "since" : "1.18", "input" : [ { "name" : "Config Chunk", "id" : "0x1", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "guint32", "public-format" : "QmiPdcConfigurationType"}, { "name" : "Id", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }}, { "name" : "Total Size", "format" : "guint32" }, { "name" : "Chunk", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }}]}, { "common-ref" : "Token", "since" : "1.18"}], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }] }, { "name" : "Load Config", "type" : "Indication", "service" : "PDC", "id" : "0x26", "since" : "1.18", "output" : [ { "common-ref" : "Token", "since" : "1.18" }, { "common-ref" : "Indication Result", "since" : "1.18" }, { "name" : "Received", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Remaining Size", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Frame Reset", "id" : "0x13", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" } ] }, // ********************************************************************************* { "name" : "Activate Config", "type" : "Message", "service" : "PDC", "id" : "0x27", "since" : "1.18", "input" : [ { "common-ref" : "Config Type", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }] }, { "name" : "Activate Config", "type" : "Indication", "service" : "PDC", "id" : "0x27", "since" : "1.18", "output" : [ { "common-ref" : "Indication Result", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }] }, // ********************************************************************************* { "name" : "Get Config Info", "type" : "Message", "service" : "PDC", "id" : "0x28", "since" : "1.18", "input" : [ { "common-ref" : "Config Type And Id" }, { "common-ref" : "Token", "since" : "1.18" }], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Get Config Info", "type" : "Indication", "service" : "PDC", "id" : "0x28", "since" : "1.18", "output" : [ { "common-ref" : "Token", "since" : "1.18" }, { "common-ref" : "Indication Result", "since" : "1.18" }, { "name" : "Total Size", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Description", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "string", "size-prefix-format" : "guint8"}, { "name" : "Version", "id" : "0x13", "type" : "TLV", "since" : "1.18", "format" : "guint32" } ] }, // ********************************************************************************* { "name" : "Get Config Limits", "type" : "Message", "service" : "PDC", "id" : "0x29", "since" : "1.18", "input" : [ { "common-ref" : "Config Type", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }, { "name" : "Maximum Size", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "guint64" }, { "name" : "Current Size", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "guint64" }] }, // ********************************************************************************* { "name" : "Get Default Config Info", "type" : "Message", "service" : "PDC", "id" : "0x2A", "since" : "1.18", "input" : [ { "common-ref" : "Config Type", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }, { "name" : "Version", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Total Size", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Description", "id" : "0x13", "type" : "TLV", "since" : "1.18", "format" : "string" } ] }, // ********************************************************************************* { "name" : "Deactivate Config", "type" : "Message", "service" : "PDC", "id" : "0x2B", "since" : "1.18", "input" : [ { "common-ref" : "Config Type", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Token", "since" : "1.18" }] }, { "name" : "Deactivate Config", "type" : "Indication", "service" : "PDC", "id" : "0x2B", "since" : "1.18", "output" : [ { "common-ref" : "Indication Result", "since" : "1.18" }, { "common-ref" : "Token", "since" : "1.18" }] }, // ********************************************************************************* { "name" : "Refresh", "type" : "Indication", "service" : "PDC", "id" : "0x2F", "since" : "1.32", "output" : [ { "name" : "Refresh Event", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.32", "format" : "guint32", "public-format" : "QmiPdcRefreshEventType" }, { "name" : "Subscription ID", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "guint32" }, { "name" : "Slot ID", "id" : "0x11", "type" : "TLV", "since" : "1.32", "format" : "guint32" }] } ] libqmi-1.35.2-dev/data/qmi-service-pds.json000066400000000000000000000566051455567757300205130ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "PDS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client PDS", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message PDS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication PDS", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "PDS", "id" : "0x0000", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Event Report", "type" : "Message", "service" : "PDS", "id" : "0x0001", "since" : "1.0", "input" : [ { "name" : "NMEA Position Reporting", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Extended NMEA Position Reporting", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Parsed Position Reporting", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "External XTRA Data Request Reporting", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "External Time Injection Request Reporting", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "External WIFI Position Request Reporting", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Satellite Information Reporting", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "VX Network Initiated Request Reporting", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "SUPL Network Initiated Prompt Reporting", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "UMTS CP Network Initiated Prompt Reporting", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PDS Comm Event Reporting", "id" : "0x1A", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Accelerometer Data Streaming Ready Reporting", "id" : "0x1B", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Gyro Data Streaming Ready Reporting", "id" : "0x1C", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Time Sync Request Reporting", "id" : "0x1D", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Position Reliability Indicator Reporting", "id" : "0x1E", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Sensor Data Usage Indicator Reporting", "id" : "0x1F", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Time Source Information Reporting", "id" : "0x20", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Heading Uncertainty Reporting", "id" : "0x21", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "NMEA Debug Strings Reporting", "id" : "0x22", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Extended External XTRA Data Request Reporting", "id" : "0x23", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Event Report", "type" : "Indication", "service" : "PDS", "id" : "0x0001", "since" : "1.0", "output" : [ { "name" : "NMEA Position", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "string", "max-size" : "200" }, { "name" : "Extended NMEA Position", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Operation Mode", "format" : "gint8", "public-format" : "QmiPdsOperationMode" }, { "name" : "NMEA", "format" : "string", // This was supposed to be only 1 byte for length, but it seems it's not "size-prefix-format" : "guint16", "max-size" : "200" } ] }, { "name" : "Position Session Status", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiPdsPositionSessionStatus" } ] }, // TODO: parse all TLVs of this indication // Reading gfloat/gdouble is still missing //{ "name" : "Parsed Position", // "id" : "0x13", // "type" : "TLV", // "format" : "sequence", // "contents" : [ { "name" : "Valid Mask", // "format" : "gint8" }, // { "name" : "Timestamp Calendar", // "format" : "struct", // "contents" : [ { "name" : "Year", // "format" : "guint16" }, // { "name" : "Month", // "format" : "guint8" }, // { "name" : "Day Of Week", // "format" : "guint8" }, // { "name" : "Day of Month", // "format" : "guint8" }, // { "name" : "Hour", // "format" : "guint8" }, // { "name" : "Minute", // "format" : "guint8" }, // { "name" : "Second", // "format" : "guint8" }, // { "name" : "Millisecond", // "format" : "guint16" } ] }, // { "name" : "Leap Seconds", // "format" : "guint8" }, // { "name" : "Timestamp UTC", // "format" : "guint64" }, // { "name" : "Time Uncertainty", // "format" : "guint32" }, // { "name" : "Latitude", // "format" : "gdouble" }, // { "name" : "Longitude", // "format" : "gdouble" }, // { "name" : "Altitude Ellipsoid", // "format" : "gfloat" }, // { "name" : "Altitude Sea Level", // "format" : "gfloat" }, // { "name" : "Horizontal Speed", // "format" : "gfloat" }, // { "name" : "Vertical Speed", // "format" : "gfloat" }, // { "name" : "Heading", // "format" : "gfloat" }, // { "name" : "Horizontal Uncertainty Circular", // "format" : "gfloat" }, // { "name" : "Horizontal Uncertainty Ellipse Semi Major", // "format" : "gfloat" }, // { "name" : "Horizontal Uncertainty Ellipse Semi Minor", // "format" : "gfloat" }, // { "name" : "Horizontal Uncertainty Ellipse Orient Azimuth", // "format" : "gfloat" }, // { "name" : "Vertical Uncertainty", // "format" : "gfloat" }, // { "name" : "Horizontal Velocity Uncertainty", // "format" : "gfloat" }, // { "name" : "Vertical Velocity Uncertainty", // "format" : "gfloat" }, // { "name" : "Horizontal confidence", // "format" : "guint8" }, // { "name" : "Position DOP", // "format" : "gfloat" }, // { "name" : "Horizontal DOP", // "format" : "gfloat" }, // { "name" : "Vertical DOP", // "format" : "gfloat" }, // { "name" : "Operation Mode", // "format" : "gint8", // "public-format" : "QmiPdsOperationMode" } ], // "prerequisites": [ { "field" : "Position Session Status", // "operation" : "<=", // "value" : "QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS" } ] } ] } // ********************************************************************************* { "name" : "Get GPS Service State", "type" : "Message", "service" : "PDS", "id" : "0x0020", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "State", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "GPS Service State", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Tracking Session State", "format" : "guint8", "public-format" : "QmiPdsTrackingSessionState" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set GPS Service State", "type" : "Message", "service" : "PDS", "id" : "0x0021", "since" : "1.0", "input" : [ { "name" : "State", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "GPS Service State", "format" : "guint8", "public-format" : "gboolean" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Default Tracking Session", "type" : "Message", "service" : "PDS", "id" : "0x0029", "since" : "1.12", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.12", "format" : "sequence", "contents" : [ { "name" : "Session Operation", "format" : "guint8", "public-format" : "QmiPdsOperatingMode" }, { "name" : "Position Data Timeout", "format" : "guint8" }, { "name" : "Interval", "format" : "guint32" }, { "name" : "Accuracy Threshold", "format" : "guint32" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Default Tracking Session", "type" : "Message", "service" : "PDS", "id" : "0x002A", "since" : "1.12", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.12", "format" : "sequence", "contents" : [ { "name" : "Session Operation", "format" : "guint8", "public-format" : "QmiPdsOperatingMode" }, { "name" : "Position Data Timeout", "format" : "guint8" }, { "name" : "Interval", "format" : "guint32" }, { "name" : "Accuracy Threshold", "format" : "guint32" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get AGPS Config", "type" : "Message", "service" : "PDS", "id" : "0x002E", "since" : "1.12", "input" : [ { "name" : "Network Mode", "id" : "0x12", "type" : "TLV", "since" : "1.12", "format" : "guint8", "public-format" : "QmiPdsNetworkMode" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Location Server Address", "id" : "0x10", "type" : "TLV", "since" : "1.12", "format" : "sequence", "contents" : [ { "name" : "IP", "format" : "guint32", "endian" : "little" }, { "name" : "Port", "format" : "guint32" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Location Server URL", "id" : "0x11", "type" : "TLV", "since" : "1.12", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set AGPS Config", "type" : "Message", "service" : "PDS", "id" : "0x002F", "since" : "1.12", "input" : [ { "name" : "Location Server Address", "id" : "0x10", "type" : "TLV", "since" : "1.12", "format" : "sequence", "contents" : [ { "name" : "IP", "format" : "guint32", "format" : "guint32" }, { "name" : "Port", "format" : "guint32" } ] }, { "name" : "Location Server URL", "id" : "0x11", "type" : "TLV", "since" : "1.12", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Network Mode", "id" : "0x14", "type" : "TLV", "since" : "1.12", "format" : "guint8", "public-format" : "QmiPdsNetworkMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Auto Tracking State", "type" : "Message", "service" : "PDS", "id" : "0x0030", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "State", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Auto Tracking State", "format" : "guint8", "public-format" : "gboolean" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Auto Tracking State", "type" : "Message", "service" : "PDS", "id" : "0x0031", "since" : "1.0", "input" : [ { "name" : "State", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Auto Tracking State", "format" : "guint8", "public-format" : "gboolean" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "GPS Ready", "type" : "Indication", "service" : "PDS", "id" : "0x0060", "since" : "1.14" } ] libqmi-1.35.2-dev/data/qmi-service-qos.json000066400000000000000000000157541455567757300205270ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "QOS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client QOS", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message QOS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication QOS", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "QOS", "id" : "0x0000", "since" : "1.22", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Flow Status", "type" : "Message", "service" : "QOS", "id" : "0x0026", "since" : "1.22", "input" : [ { "name" : "Qos Id", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.22", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Value", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint8", "public-format" : "QmiQosStatus", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, { "name" : "Flow Status", "type" : "Indication", "service" : "QOS", "id" : "0x0026", "since" : "1.22", "output" : [ { "name" : "Value", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "sequence", "contents" : [ { "name" : "Qos Id", "format" : "guint32" }, { "name" : "Status", "format" : "guint8", "public-format" : "QmiQosStatus" }, { "name" : "Event", "format" : "guint8", "public-format" : "QmiQosEvent" } ] } ] }, // ********************************************************************************* { "name" : "Get Network Status", "type" : "Message", "service" : "QOS", "id" : "0x0027", "since" : "1.22", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "QoS Supported", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, { "name" : "Network Status", "type" : "Indication", "service" : "QOS", "id" : "0x0027", "since" : "1.22", "output" : [ { "name" : "QoS Supported", "id" : "0x01", "type" : "TLV", "since" : "1.22", "format" : "guint8", "public-format" : "gboolean" } ] }, // ********************************************************************************* { "name" : "Swi Read Data Stats", "type" : "Message", "service" : "QOS", "id" : "0x5556", "since" : "1.22", "input" : [ { "name" : "Apn Id", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.22", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Apn", "id" : "0x03", "type" : "TLV", "since" : "1.22", "format" : "sequence", "contents" : [ { "name" : "Apn Id", "format" : "guint32" }, { "name" : "Tx packets", "format" : "guint32" }, { "name" : "Tx packets dropped", "format" : "guint32" }, { "name" : "Rx packets", "format" : "guint32" }, { "name" : "Tx bytes", "format" : "guint64" }, { "name" : "Tx bytes dropped", "format" : "guint64" }, { "name" : "Rx bytes", "format" : "guint64" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Flow", "id" : "0x04", "type" : "TLV", "since" : "1.22", "format" : "array", "size-prefix-format" : "guint32", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Bearer Id", "format" : "guint32" }, { "name" : "Tx packets", "format" : "guint32" }, { "name" : "Tx packets dropped", "format" : "guint32" }, { "name" : "Tx bytes", "format" : "guint64" }, { "name" : "Tx bytes dropped", "format" : "guint64" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-sar.json000066400000000000000000000033121455567757300204750ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "SAR", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client SAR", "type" : "Client", "since" : "1.28" }, // ********************************************************************************* { "name" : "QMI Message SAR", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication SAR", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "RF Set State", "type" : "Message", "service" : "SAR", "id" : "0x0001", "since" : "1.28", "input" : [ { "name" : "State", "id" : "0x01", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiSarRfState" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "RF Get State", "type" : "Message", "service" : "SAR", "id" : "0x0002", "since" : "1.28", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "State", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiSarRfState" } ] } ] libqmi-1.35.2-dev/data/qmi-service-ssc.json000066400000000000000000000074201455567757300205040ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "SSC", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client SSC", "type" : "Client", "since" : "1.34" }, // ********************************************************************************* { "name" : "QMI Message SSC", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication SSC", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Control", "type" : "Message", "service" : "SSC", "id" : "0x0020", "since" : "1.34", "input" : [ { "name" : "Data", "id" : "0x01", "type" : "TLV", "since" : "1.34", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" } }, { "name" : "Report Type", "id" : "0x10", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "QmiSscReportType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Client ID", "id" : "0x10", "type" : "TLV", "since" : "1.34", "format" : "guint64", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Response", "id" : "0x11", "type" : "TLV", "since" : "1.34", "format" : "guint32", "prerequisites": [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Report Small", "type" : "Indication", "service" : "SSC", "id" : "0x0021", "since" : "1.34", "output" : [ { "name" : "Client ID", "id" : "0x01", "type" : "TLV", "since" : "1.34", "format" : "guint64" }, { "name" : "Data", "id" : "0x02", "type" : "TLV", "since" : "1.34", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" } } ] }, // ********************************************************************************* { "name" : "Report Large", "type" : "Indication", "service" : "SSC", "id" : "0x0022", "since" : "1.34", "output" : [ { "name" : "Client ID", "id" : "0x01", "type" : "TLV", "since" : "1.34", "format" : "guint64" }, { "name" : "Data", "id" : "0x02", "type" : "TLV", "since" : "1.34", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" } } ] } ] libqmi-1.35.2-dev/data/qmi-service-uim.json000066400000000000000000001647401455567757300205170ustar00rootroot00000000000000[ // ********************************************************************************* { "name" : "UIM", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client UIM", "type" : "Client", "since" : "1.6" }, // ********************************************************************************* { "name" : "QMI Message UIM", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication UIM", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "common-ref" : "UIM Card Status", "name" : "Card Status", "id" : "0x10", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Index GW Primary", "format" : "guint16" }, { "name" : "Index 1x Primary", "format" : "guint16" }, { "name" : "Index GW Secondary", "format" : "guint16" }, { "name" : "Index 1x Secondary", "format" : "guint16" }, { "name" : "Cards", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Card State", "format" : "guint8", "public-format" : "QmiUimCardState" }, { "name" : "UPIN State", "format" : "guint8", "public-format" : "QmiUimPinState" }, { "name" : "UPIN Retries", "format" : "guint8" }, { "name" : "UPUK Retries", "format" : "guint8" }, { "name" : "Error code", "format" : "guint8", "public-format" : "QmiUimCardError" }, { "name" : "Applications", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element V2", "format" : "struct", "since" : "1.34", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiUimCardApplicationType" }, { "name" : "State", "format" : "guint8", "public-format" : "QmiUimCardApplicationState" }, { "name" : "Personalization State", "format" : "guint8", "public-format" : "QmiUimCardApplicationPersonalizationState" }, { "name" : "Personalization Feature", "format" : "guint8", "public-format" : "QmiUimCardApplicationPersonalizationFeatureStatus" }, { "name" : "Personalization Retries", "format" : "guint8" }, { "name" : "Personalization Unblock Retries", "format" : "guint8" }, { "name" : "Application Identifier Value", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "UPIN replaces PIN1", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PIN1 State", "format" : "guint8", "public-format" : "QmiUimPinState" }, { "name" : "PIN1 Retries", "format" : "guint8" }, { "name" : "PUK1 Retries", "format" : "guint8" }, { "name" : "PIN2 State", "format" : "guint8", "public-format" : "QmiUimPinState" }, { "name" : "PIN2 Retries", "format" : "guint8" }, { "name" : "PUK2 Retries", "format" : "guint8" } ] } } ] } } ] }, // ********************************************************************************* { "common-ref" : "UIM Session", "name" : "Session", "fullname" : "Qmi UIM Session", "id" : "0x01", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiUimSessionType" }, { "name" : "Application Identifier", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, // ********************************************************************************* { "common-ref" : "Physical Slot Status", "name" : "Physical Slot Status", "fullname" : "Qmi Physical Slot Status", "id" : "0x10", "type" : "TLV", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Slot", "format" : "struct", "contents" : [ { "name" : "Physical Card Status", "format" : "guint32", "public-format" : "QmiUimPhysicalCardState" }, { "name" : "Physical Slot Status", "format" : "guint32", "public-format" : "QmiUimSlotState" }, { "name" : "Logical Slot", "format" : "guint8" }, { "name" : "ICCID", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] } }, // ********************************************************************************* { "common-ref" : "Physical Slot Information", "name" : "Physical Slot Information", "fullname" : "Qmi Physical Slot Information", "id" : "0x11", "type" : "TLV", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Slot", "format" : "struct", "contents" : [ { "name" : "Card Protocol", "format" : "guint32", "public-format" : "QmiUimCardProtocol" }, { "name" : "Valid Applications", "format" : "guint8" }, { "name" : "ATR Value", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Is EUICC", "format" : "guint8", "public-format" : "gboolean" } ] } }, // ********************************************************************************* { "common-ref" : "Slot EID", "name" : "Slot EID", "fullname" : "Qmi Slot EID", "id" : "0x12", "type" : "TLV", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "EID", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] } }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "UIM", "id" : "0x0000", "since" : "1.6", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Supported Messages", "type" : "Message", "service" : "UIM", "id" : "0x001E", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Read Transparent", "type" : "Message", "service" : "UIM", "id" : "0x0020", "since" : "1.6", "input" : [ { "common-ref" : "UIM Session", "since" : "1.22" }, { "name" : "File", "id" : "0x02", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "File ID", "format" : "guint16" }, { "name" : "File Path", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, { "name" : "Read Information", "id" : "0x03", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Offset", "format" : "guint16" }, { "name" : "Length", "format" : "guint16" } ] }, { "name" : "Response In Indication Token", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint32" }, { "name" : "Encrypt Data", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Card result", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "SW1", "format" : "guint8" }, { "name" : "SW2", "format" : "guint8" } ] }, { "name" : "Read result", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Response In Indication Token", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Encrypted Data", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Read Record", "type" : "Message", "service" : "UIM", "id" : "0x0021", "since" : "1.6", "input" : [ { "common-ref" : "UIM Session", "since" : "1.22" }, { "name" : "File", "id" : "0x02", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "File ID", "format" : "guint16" }, { "name" : "File Path", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, { "name" : "Record", "id" : "0x03", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "Record Number", "format" : "guint16" }, { "name" : "Record Length", "format" : "guint16" } ] }, { "name" : "Last Record", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint16" }, { "name" : "Response In Indication Token", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Card result", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "SW1", "format" : "guint8" }, { "name" : "SW2", "format" : "guint8" } ] }, { "name" : "Read Result", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Additional Read Result", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Response In Indication Token", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get File Attributes", "type" : "Message", "service" : "UIM", "id" : "0x0024", "since" : "1.6", "input" : [ { "common-ref" : "UIM Session", "since" : "1.22" }, { "name" : "File", "id" : "0x02", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "File ID", "format" : "guint16" }, { "name" : "File Path", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] }, { "name" : "Response In Indication Token", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Card result", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "SW1", "format" : "guint8" }, { "name" : "SW2", "format" : "guint8" } ] }, { "name" : "File Attributes", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "sequence", "contents" : [ { "name" : "File Size", "format" : "guint16" }, { "name" : "File ID", "format" : "guint16" }, { "name" : "File Type", "format" : "guint8", "public-format" : "QmiUimFileType" }, { "name" : "Record Size", "format" : "guint16" }, { "name" : "Record Count", "format" : "guint16" }, { "name" : "Read Security Attributes Logic", "format" : "guint8", "public-format" : "QmiUimSecurityAttributeLogic" }, { "name" : "Read Security Attributes", "format" : "guint16", "public-format" : "QmiUimSecurityAttribute" }, { "name" : "Write Security Attributes Logic", "format" : "guint8", "public-format" : "QmiUimSecurityAttributeLogic" }, { "name" : "Write Security Attributes", "format" : "guint16", "public-format" : "QmiUimSecurityAttribute" }, { "name" : "Increase Security Attributes Logic", "format" : "guint8", "public-format" : "QmiUimSecurityAttributeLogic" }, { "name" : "Increase Security Attributes", "format" : "guint16", "public-format" : "QmiUimSecurityAttribute" }, { "name" : "Deactivate Security Attributes Logic", "format" : "guint8", "public-format" : "QmiUimSecurityAttributeLogic" }, { "name" : "Deactivate Security Attributes", "format" : "guint16", "public-format" : "QmiUimSecurityAttribute" }, { "name" : "Activate Security Attributes Logic", "format" : "guint8", "public-format" : "QmiUimSecurityAttributeLogic" }, { "name" : "Activate Security Attributes", "format" : "guint16", "public-format" : "QmiUimSecurityAttribute" }, { "name" : "Raw Data", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" } } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Response In Indication Token", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set PIN Protection", "type" : "Message", "service" : "UIM", "id" : "0x0025", "since" : "1.14", "input" : [ { "common-ref" : "UIM Session", "since" : "1.22" }, { "name" : "Info", "id" : "0x02", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "PIN ID", "format" : "guint8", "public-format" : "QmiUimPinId" }, { "name" : "PIN enabled", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PIN Value", "format" : "string", "personal-info" : "true" } ] }, { "name" : "Response In Indication Token", "id" : "0x11", "type" : "TLV", "since" : "1.14", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Retries Remaining", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] }, { "name" : "Response In Indication Token", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Verify PIN", "type" : "Message", "service" : "UIM", "id" : "0x0026", "since" : "1.14", "input" : [ { "common-ref" : "UIM Session", "since" : "1.22" }, { "name" : "Info", "id" : "0x02", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "PIN ID", "format" : "guint8", "public-format" : "QmiUimPinId" }, { "name" : "PIN Value", "format" : "string", "personal-info" : "true" } ] }, { "name" : "Response In Indication Token", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Retries Remaining", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] }, { "name" : "Response In Indication Token", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Card Result", "id" : "0x13", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "SW1", "format" : "guint8" }, { "name" : "SW2", "format" : "guint8" } ] } ] }, // ********************************************************************************* { "name" : "Unblock PIN", "type" : "Message", "service" : "UIM", "id" : "0x0027", "since" : "1.14", "input" : [ { "common-ref" : "UIM Session", "since" : "1.22" }, { "name" : "Info", "id" : "0x02", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "PIN ID", "format" : "guint8", "public-format" : "QmiUimPinId" }, { "name" : "PUK", "format" : "string", "personal-info" : "true" }, { "name" : "New PIN", "format" : "string", "personal-info" : "true" } ] }, { "name" : "Response In Indication Token", "id" : "0x11", "type" : "TLV", "since" : "1.14", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Retries Remaining", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] }, { "name" : "Response In Indication Token", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Card Result", "id" : "0x13", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "SW1", "format" : "guint8" }, { "name" : "SW2", "format" : "guint8" } ] } ] }, // ********************************************************************************* { "name" : "Change PIN", "type" : "Message", "service" : "UIM", "id" : "0x0028", "since" : "1.14", "input" : [ { "common-ref" : "UIM Session", "since" : "1.22" }, { "name" : "Info", "id" : "0x02", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "PIN ID", "format" : "guint8", "public-format" : "QmiUimPinId" }, { "name" : "Old PIN", "format" : "string", "personal-info" : "true" }, { "name" : "New PIN", "format" : "string", "personal-info" : "true" } ] }, { "name" : "Response In Indication Token", "id" : "0x11", "type" : "TLV", "since" : "1.14", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Retries Remaining", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Verify Retries Left", "format" : "guint8" }, { "name" : "Unblock Retries Left", "format" : "guint8" } ], "prerequisites": [ { "common-ref" : "No Success" } ] }, { "name" : "Response In Indication Token", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Card Result", "id" : "0x13", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "SW1", "format" : "guint8" }, { "name" : "SW2", "format" : "guint8" } ] } ] }, // ********************************************************************************* { "name" : "Refresh Register", "type" : "Message", "service" : "UIM", "id" : "0x002A", "since" : "1.28", "input" : [ { "common-ref" : "UIM Session", "since" : "1.28" }, { "name" : "Info", "id" : "0x02", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Register Flag", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Vote For Init", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Files", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "File ID", "format" : "guint16" }, { "name" : "Path", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] } } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Refresh Complete", "type" : "Message", "service" : "UIM", "id" : "0x002C", "since" : "1.28", "input" : [ { "common-ref" : "UIM Session", "since" : "1.28" }, { "name" : "Info", "id" : "0x02", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Refresh Success", "format" : "guint8", "public-format" : "gboolean" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Register Events", "type" : "Message", "service" : "UIM", "id" : "0x002E", "since" : "1.22.4", "input" : [ { "name" : "Event Registration Mask", "id" : "0x01", "type" : "TLV", "since" : "1.22.4", "format" : "guint32", "public-format" : "QmiUimEventRegistrationFlag" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Event Registration Mask", "id" : "0x10", "type" : "TLV", "since" : "1.22.4", "format" : "guint32", "public-format" : "QmiUimEventRegistrationFlag", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Card Status", "type" : "Message", "service" : "UIM", "id" : "0x002F", "since" : "1.10", "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "UIM Card Status", "since" : "1.10" } ] }, // ********************************************************************************* { "name" : "Power Off SIM", "type" : "Message", "service" : "UIM", "id" : "0x0030", "since" : "1.18", "input" : [ { "name" : "Slot", "id" : "0x01", "type" : "TLV", "since" : "1.18", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Power On SIM", "type" : "Message", "service" : "UIM", "id" : "0x0031", "since" : "1.18", "input" : [ { "name" : "Slot", "id" : "0x01", "type" : "TLV", "since" : "1.18", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Card Status", "type" : "Indication", "service" : "UIM", "id" : "0x0032", "since" : "1.22", "output" : [ { "common-ref" : "UIM Card Status", "since" : "1.22" } ] }, // ********************************************************************************* { "name" : "Refresh", "type" : "Indication", "service" : "UIM", "id" : "0x0033", "since" : "1.28", "output" : [ { "name" : "Event", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Stage", "format" : "guint8", "public-format" : "QmiUimRefreshStage" }, { "name" : "Mode", "format" : "guint8", "public-format" : "QmiUimRefreshMode" }, { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiUimSessionType" }, { "name" : "Application Identifier", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Files", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "File ID", "format" : "guint16" }, { "name" : "Path", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] } } ] } ] }, // ********************************************************************************* { "name" : "Change Provisioning Session", "type" : "Message", "service" : "UIM", "id" : "0x0038", "since" : "1.24", "input" : [ { "name" : "Session Change", "id" : "0x01", "type" : "TLV", "since" : "1.24", "format" : "sequence", "contents" : [ { "name" : "Session Type", "format" : "guint8", "public-format" : "QmiUimSessionType" }, { "name" : "Activate", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Application Information", "id" : "0x10", "type" : "TLV", "since" : "1.24", "format" : "sequence", "contents" : [ { "name" : "Slot", "format" : "guint8" }, { "name" : "Application Identifier", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Depersonalization", "type" : "Message", "service" : "UIM", "id" : "0x0029", "since" : "1.30", "input" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Feature", "format" : "guint8", "public-format" : "QmiUimCardApplicationPersonalizationFeature" }, { "name" : "Operation", "format" : "guint8", "public-format" : "QmiUimDepersonalizationOperation" }, { "name" : "Control Key", "format" : "string", "personal-info" : "true" } ] }, { "name" : "Slot", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Retries Remaining", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Verify Left", "format" : "guint8" }, { "name" : "Unblock Left", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "No Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Configuration", "type" : "Message", "service" : "UIM", "id" : "0x003A", "since" : "1.30", "input" : [ { "name" : "Configuration Mask", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "guint32", "public-format" : "QmiUimConfiguration" } ], "output-compat" : "yes", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Automatic Selection", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Personalization Status", "id" : "0x11", "type" : "TLV", "since" : "1.30", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Feature", "format" : "guint8", "public-format" : "QmiUimCardApplicationPersonalizationFeature" }, { "name" : "Verify Left", "format" : "guint8" }, { "name" : "Unblock Left", "format" : "guint8" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Halt Subscription", "id" : "0x12", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Personalization Status Other", "id" : "0x13", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Slot", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Feature", "format" : "guint8", "public-format" : "QmiUimCardApplicationPersonalizationFeature" }, { "name" : "Verify Left", "format" : "guint8" }, { "name" : "Unblock Left", "format" : "guint8" } ] } } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Refresh Register All", "type" : "Message", "service" : "UIM", "id" : "0x0044", "since" : "1.28", "input" : [ { "common-ref" : "UIM Session", "since" : "1.28" }, { "name" : "Info", "id" : "0x02", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Register Flag", "format" : "guint8", "public-format" : "gboolean" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Switch Slot", "type" : "Message", "service" : "UIM", "id" : "0x0046", "since" : "1.26", "input" : [ { "name" : "Logical Slot", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "guint8" }, { "name" : "Physical Slot", "id" : "0x02", "type" : "TLV", "since" : "1.26", "format" : "guint32" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Slot Status", "type" : "Message", "service" : "UIM", "id" : "0x0047", "since" : "1.26", "output-compat" : "yes", "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "Physical Slot Status", "since" : "1.26" }, { "common-ref" : "Physical Slot Information", "since" : "1.26" }, { "common-ref" : "Slot EID", "since" : "1.32" } ] }, // ********************************************************************************* { "name" : "Slot Status", "type" : "Indication", "service" : "UIM", "id" : "0x0048", "since" : "1.26", "output-compat" : "yes", "output" : [ { "common-ref" : "Physical Slot Status", "since" : "1.26" }, { "common-ref" : "Physical Slot Information", "since" : "1.26" }, { "common-ref" : "Slot EID", "since" : "1.32" } ] }, // ********************************************************************************* { "name" : "Remote Unlock", "type" : "Message", "service" : "UIM", "id" : "0x005D", "since" : "1.32", "input" : [ { "name" : "SimLock Data", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true" }, { "name" : "SimLock Extended Data", "id" : "0x12", "type" : "TLV", "since" : "1.32", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ], "output" : [ { "common-ref" : "Operation Result" } ] } ] libqmi-1.35.2-dev/data/qmi-service-voice.json000066400000000000000000001256071455567757300210310ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "VOICE", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client Voice", "type" : "Client", "since" : "1.14" }, // ********************************************************************************* { "name" : "QMI Message Voice", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication Voice", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Indication Register", "type" : "Message", "service" : "VOICE", "id" : "0x0003", "since" : "1.26", "input" : [ { "name" : "DTMF Events", "id" : "0x10", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Voice Privacy Events", "id" : "0x11", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Supplementary Service Notification Events", "id" : "0x12", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Call Notification Events", "id" : "0x13", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Handover Events", "id" : "0x14", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Speech Codec Events", "id" : "0x15", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "USSD Notification Events", "id" : "0x16", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, // TLV 0x17 "Sups Events", reserved for future use { "name" : "Modification Events", "id" : "0x18", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "UUS Events", "id" : "0x19", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "AOC Events", "id" : "0x1A", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Conference Events", "id" : "0x1B", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Extended Burst Type International Information Events", "id" : "0x1C", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MT Page Miss Information Events", "id" : "0x1D", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Supported Messages", "type" : "Message", "service" : "VOICE", "id" : "0x001E", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Dial Call", "type" : "Message", "service" : "VOICE", "id" : "0x0020", "since" : "1.14", "input" : [ { "name" : "Calling Number", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "string", "personal-info" : "true" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Call ID", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint8" } ] }, // ********************************************************************************* { "name" : "End Call", "type" : "Message", "service" : "VOICE", "id" : "0x0021", "since" : "1.14", "input" : [ { "name" : "Call ID", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Call ID", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint8" } ] }, // ********************************************************************************* { "name" : "Answer Call", "type" : "Message", "service" : "VOICE", "id" : "0x0022", "since" : "1.14", "input" : [ { "name" : "Call ID", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Call ID", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint8" } ] }, // ********************************************************************************* { "name" : "All Call Status", "type" : "Indication", "service" : "VOICE", "id" : "0x002E", "since" : "1.14", "output" : [ { "name" : "Call Information", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Call", "format" : "struct", "contents" : [ { "name" : "ID", "format" : "guint8" }, { "name" : "State", "format" : "guint8", "public-format" : "QmiVoiceCallState" }, { "name" : "Type", "format" : "guint8", "public-format" : "QmiVoiceCallType" }, { "name" : "Direction", "format" : "guint8", "public-format" : "QmiVoiceCallDirection" }, { "name" : "Mode", "format" : "guint8", "public-format" : "QmiVoiceCallMode" }, { "name" : "Multipart Indicator", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "ALS", "format" : "guint8", "public-format" : "QmiVoiceAls" } ] } }, { "name" : "Remote Party Number", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Call", "format" : "struct", "contents" : [ { "name" : "ID", "format" : "guint8" }, { "name" : "Presentation Indicator", "format" : "guint8", "public-format" : "QmiVoicePresentation" }, { "name" : "Type", "format" : "string" } ] }, "personal-info" : "true" } ] }, // ********************************************************************************* { "name" : "Get All Call Info", "type" : "Message", "service" : "VOICE", "id" : "0x002F", "since" : "1.30.2", "output" : [ { "common-ref": "Operation Result" }, { "name" : "Call Information", "id" : "0x10", "type" : "TLV", "since" : "1.30.2", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Call", "format" : "struct", "contents" : [ { "name" : "ID", "format" : "guint8" }, { "name" : "State", "format" : "guint8", "public-format" : "QmiVoiceCallState" }, { "name" : "Type", "format" : "guint8", "public-format" : "QmiVoiceCallType" }, { "name" : "Direction", "format" : "guint8", "public-format" : "QmiVoiceCallDirection" }, { "name" : "Mode", "format" : "guint8", "public-format" : "QmiVoiceCallMode" }, { "name" : "Multipart Indicator", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "ALS", "format" : "guint8", "public-format" : "QmiVoiceAls" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Remote Party Number", "id" : "0x11", "type" : "TLV", "since" : "1.30.2", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Call", "format" : "struct", "contents" : [ { "name" : "ID", "format" : "guint8" }, { "name" : "Presentation Indicator", "format" : "guint8", "public-format" : "QmiVoicePresentation" }, { "name" : "Type", "format" : "string" } ] }, "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Manage Calls", "type" : "Message", "service" : "VOICE", "id" : "0x0031", "since" : "1.30", "input" : [ { "name" : "Service Type", "id" : "0x01", "type" : "TLV", "since" : "1.30", "format" : "guint8", "public-format" : "QmiVoiceSupplementaryServiceType" }, { "name" : "Call ID", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Supplementary Service", "type" : "Indication", "service" : "VOICE", "id" : "0x0032", "since" : "1.30", "output" : [ { "name" : "Info", "id" : "0x01", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Call ID", "format" : "guint8" }, { "name" : "Notification Type", "format" : "guint8", "public-format" : "QmiVoiceSupplementaryServiceNotificationType" } ] } ] }, // ********************************************************************************* { "name" : "Set Supplementary Service", "type" : "Message", "service" : "VOICE", "id" : "0x0033", "since" : "1.30", "input" : [ { "name" : "Supplementary Service Information", "id" : "0x01", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Supplementary Service Action", "format" : "guint8", "public-format" : "QmiVoiceSupplementaryServiceAction" }, { "name" : "Supplementary Service Reason", "format" : "guint8", "public-format" : "QmiVoiceSupplementaryServiceReason" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Service Status", "id" : "0x15", "type" : "TLV", "since" : "1.30", "format" : "sequence", "contents" : [ { "name" : "Active", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Provisioned", "format" : "guint8", "public-format" : "gboolean" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Call Waiting", "type" : "Message", "service" : "VOICE", "id" : "0x0034", "since" : "1.30", "input" : [ { "name" : "Service Class", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "guint8" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Service Class", "id" : "0x10", "type" : "TLV", "since" : "1.30", "format" : "guint8", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Originate USSD", "type" : "Message", "service" : "VOICE", "id" : "0x003A", "since" : "1.26", "input" : [ { "name" : "USS Data", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceUssDataCodingScheme" }, { "name" : "Data", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Failure Cause", "id" : "0x10", "type" : "TLV", "since" : "1.26", "format" : "guint16", "public-format" : "QmiVoiceCallEndReason" }, { "name" : "Alpha Identifier", "id" : "0x11", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceAlphaDataCodingScheme" }, { "name" : "Alpha", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "USS Data", "id" : "0x12", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceUssDataCodingScheme" }, { "name" : "Data", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "Call Control Result Type", "id" : "0x13", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "QmiVoiceCallControlResultType" }, { "name" : "Call ID", "id" : "0x14", "type" : "TLV", "since" : "1.26", "format" : "guint8" }, { "name" : "Call Control Supplementary Service Type", "id" : "0x15", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "QmiVoiceCallControlSupplementaryServiceType" }, { "name" : "USS Data UTF16", "id" : "0x16", "type" : "TLV", "since" : "1.26", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint16" }, "personal-info" : "true" } ] }, // ********************************************************************************* { "name" : "Answer USSD", "type" : "Message", "service" : "VOICE", "id" : "0x003B", "since" : "1.26", "input" : [ { "name" : "USS Data", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceUssDataCodingScheme" }, { "name" : "Data", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Cancel USSD", "type" : "Message", "service" : "VOICE", "id" : "0x003C", "since" : "1.26", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Release USSD", "type" : "Indication", "service" : "VOICE", "id" : "0x003D", "since" : "1.26" }, // ********************************************************************************* { "name" : "USSD", "type" : "Indication", "service" : "VOICE", "id" : "0x003E", "since" : "1.26", "output" : [ { "name" : "User Action", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "guint8", "public-format" : "QmiVoiceUserAction" }, { "name" : "USS Data", "id" : "0x10", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceUssDataCodingScheme" }, { "name" : "Data", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "USS Data UTF16", "id" : "0x11", "type" : "TLV", "since" : "1.26", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint16" }, "personal-info" : "true" } ] }, // ********************************************************************************* { "name" : "Get Config", "type" : "Message", "service" : "VOICE", "id" : "0x0041", "since" : "1.14", "input" : [ { "name" : "Auto Answer", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Air Timer", "id" : "0x11", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Roam Timer", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "TTY Mode", "id" : "0x13", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Preferred Voice Service Option", "id" : "0x14", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "AMR Status", "id" : "0x15", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Preferred Voice Privacy", "id" : "0x16", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "NAM Index", "id" : "0x17", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Voice Domain Preference", "id" : "0x18", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Auto Answer Status", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Air Timer Count", "id" : "0x11", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "NAM ID", "format" : "guint8" }, { "name" : "Air Timer", "format" : "guint32" } ] }, { "name" : "Roam Timer Count", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "NAM ID", "format" : "guint8" }, { "name" : "Roam Timer", "format" : "guint32" } ] }, { "name" : "Current TTY Mode", "id" : "0x13", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiVoiceTtyMode" }, { "name" : "Current Preferred Voice SO", "id" : "0x14", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "NAM ID", "format" : "guint8" }, { "name" : "EVRC Capability", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Home Page Voice Service Option", "format" : "guint16", "public-format" : "QmiVoiceServiceOption" }, { "name" : "Home Origination Voice Service Option", "format" : "guint16", "public-format" : "QmiVoiceServiceOption" }, { "name" : "Roaming Origination Voice Service Option", "format" : "guint16", "public-format" : "QmiVoiceServiceOption" } ] }, { "name" : "Current AMR Status", "id" : "0x15", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "GSM", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "WCDMA", "format" : "guint8", "public-format" : "QmiVoiceWcdmaAmrStatus" } ] }, { "name" : "Current Voice Privacy Preference", "id" : "0x16", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiVoicePrivacy" }, { "name" : "Current Voice Domain Preference", "id" : "0x17", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiVoiceDomain" } ] }, // ********************************************************************************* { "name" : "Originate USSD No Wait", "type" : "Message", "service" : "VOICE", "id" : "0x0043", "since" : "1.26", "input" : [ { "name" : "USS Data", "id" : "0x01", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceUssDataCodingScheme" }, { "name" : "Data", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Originate USSD No Wait", "type" : "Indication", "service" : "VOICE", "id" : "0x0043", "since" : "1.26", "output" : [ { "name" : "Error Code", "id" : "0x10", "since" : "1.26", "type" : "TLV", "format" : "guint16" }, { "name" : "Failure Cause", "id" : "0x11", "type" : "TLV", "since" : "1.26", "format" : "guint16", "public-format" : "QmiVoiceCallEndReason" }, { "name" : "USS Data", "id" : "0x12", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceUssDataCodingScheme" }, { "name" : "Data", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "Alpha Identifier", "id" : "0x13", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Data Coding Scheme", "format" : "guint8", "public-format" : "QmiVoiceAlphaDataCodingScheme" }, { "name" : "Alpha", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "USS Data UTF16", "id" : "0x14", "type" : "TLV", "since" : "1.26", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint16" }, "personal-info" : "true" } ] }, // ********************************************************************************* { "name" : "Burst DTMF", "type" : "Message", "service" : "VOICE", "id" : "0x0028", "since" : "1.32", "input" : [ { "name" : "Data", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Call ID", "format" : "guint8" }, { "name" : "Digit Buffer", "format" : "string", "size-prefix-format" : "guint8" } ], "personal-info" : "true" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Call ID", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "guint8", "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, { "name" : "Start Continuous DTMF", "type" : "Message", "service" : "VOICE", "id" : "0x0029", "since" : "1.32", "input" : [ { "name" : "Data", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Call ID", "format" : "guint8" }, { "name" : "Digit", "format" : "guint8" } ], "personal-info" : "true" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Call ID", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "guint8", "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, { "name" : "Stop Continuous DTMF", "type" : "Message", "service" : "VOICE", "id" : "0x002A", "since" : "1.32", "input" : [ { "name" : "Data", "id" : "0x01", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "Call ID", "format" : "guint8" } ], "personal-info" : "true" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Call ID", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "guint8", "personal-info" : "true", "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-wda.json000066400000000000000000000332561455567757300204750ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "WDA", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client WDA", "type" : "Client", "since" : "1.10" }, // ********************************************************************************* { "name" : "QMI Message WDA", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "Get Supported Messages", "type" : "Message", "service" : "WDA", "id" : "0x001E", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Data Format", "type" : "Message", "service" : "WDA", "id" : "0x0020", "since" : "1.10", "input" : [ { "name" : "QoS Format", "id" : "0x10", "type" : "TLV", "since" : "1.10", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Link Layer Protocol", "id" : "0x11", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaLinkLayerProtocol" }, { "name" : "Uplink Data Aggregation Protocol", "id" : "0x12", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaDataAggregationProtocol" }, { "name" : "Downlink Data Aggregation Protocol", "id" : "0x13", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaDataAggregationProtocol" }, { "name" : "NDP Signature", "id" : "0x14", "type" : "TLV", "since" : "1.10", "format" : "guint32" }, { "name" : "Downlink Data Aggregation Max Datagrams", "id" : "0x15", "type" : "TLV", "since" : "1.10", "format" : "guint32" }, { "name" : "Downlink Data Aggregation Max Size", "id" : "0x16", "type" : "TLV", "since" : "1.10", "format" : "guint32" }, { "name" : "Endpoint Info", "id" : "0x17", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Endpoint Type", "format" : "guint32", "public-format" : "QmiDataEndpointType"}, { "name" : "Interface Number", "format" : "guint32"}] }, { "name" : "Uplink Data Aggregation Max Datagrams", "id" : "0x1B", "type" : "TLV", "since" : "1.32", "format" : "guint32" }, { "name" : "Uplink Data Aggregation Max Size", "id" : "0x1C", "type" : "TLV", "since" : "1.32", "format" : "guint32" }], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "QoS Format", "id" : "0x10", "type" : "TLV", "since" : "1.10", "format" : "guint8", "public-format" : "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Link Layer Protocol", "id" : "0x11", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaLinkLayerProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Uplink Data Aggregation Protocol", "id" : "0x12", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaDataAggregationProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Downlink Data Aggregation Protocol", "id" : "0x13", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaDataAggregationProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "NDP Signature", "id" : "0x14", "type" : "TLV", "since" : "1.10", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Downlink Data Aggregation Max Datagrams", "id" : "0x15", "type" : "TLV", "since" : "1.10", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Downlink Data Aggregation Max Size", "id" : "0x16", "type" : "TLV", "since" : "1.10", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Uplink Data Aggregation Max Datagrams", "id" : "0x17", "type" : "TLV", "since" : "1.30", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Uplink Data Aggregation Max Size", "id" : "0x18", "type" : "TLV", "since" : "1.30", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Download Minimum Padding", "id" : "0x1A", "type" : "TLV", "since" : "1.30", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Flow Control", "id" : "0x1B", "type" : "TLV", "since" : "1.30", "format" : "guint8", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Data Format", "type" : "Message", "service" : "WDA", "id" : "0x0021", "since" : "1.10", "input" : [ { "name" : "Endpoint Info", "id" : "0x10", "mandatory" : "no", "type" : "TLV", "since" : "1.26", "format" : "sequence", "contents" : [ { "name" : "Endpoint Type", "format" : "guint32", "public-format" : "QmiDataEndpointType"}, { "name" : "Interface Number", "format" : "guint32"} ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "QoS Format", "id" : "0x10", "type" : "TLV", "since" : "1.10", "format" : "guint8", "public-format" : "gboolean", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Link Layer Protocol", "id" : "0x11", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaLinkLayerProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Uplink Data Aggregation Protocol", "id" : "0x12", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaDataAggregationProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Downlink Data Aggregation Protocol", "id" : "0x13", "type" : "TLV", "since" : "1.10", "format" : "guint32", "public-format" : "QmiWdaDataAggregationProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "NDP Signature", "id" : "0x14", "type" : "TLV", "since" : "1.10", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Downlink Data Aggregation Max Datagrams", "id" : "0x15", "type" : "TLV", "since" : "1.24.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Downlink Data Aggregation Max Size", "id" : "0x16", "type" : "TLV", "since" : "1.10", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Uplink Data Aggregation Max Datagrams", "id" : "0x17", "type" : "TLV", "since" : "1.30", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, // We mistakenly had a different TLV named as "Uplink Data // Aggregation Max Size" since 1.10, and since then we kept // compat support to avoid breaking API/ABI. We now introduce // the correct TLV named in the same way, and so we keep the // original "since" tag and we remove the compat symbols. { "name" : "Uplink Data Aggregation Max Size", "id" : "0x18", "type" : "TLV", "since" : "1.10", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Download Minimum Padding", "id" : "0x1A", "type" : "TLV", "since" : "1.30", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Flow Control", "id" : "0x1B", "type" : "TLV", "since" : "1.30", "format" : "guint8", "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-wds.json000066400000000000000000003600521455567757300205140ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "WDS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client WDS", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message WDS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication WDS", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "common-ref" : "WDS Extended Error Code", "name" : "Extended Error Code", "id" : "0xE0", "type" : "TLV", "format" : "guint16", "public-format" : "QmiWdsDsProfileError", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL" } ] }, { "common-ref" : "WDS Profile Identifier", "name" : "Profile Identifier", "id" : "0x01", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Profile Type", "format" : "guint8", "public-format" : "QmiWdsProfileType" }, { "name" : "Profile Index", "format" : "guint8" } ] }, { "common-ref" : "WDS Profile Name", "name" : "Profile Name", "id" : "0x10", "type" : "TLV", "format" : "string" }, { "common-ref" : "WDS PDP Type", "name" : "PDP Type", "id" : "0x11", "type" : "TLV", "format" : "guint8", "public-format" : "QmiWdsPdpType" }, { "common-ref" : "WDS PDP Header Compression Type", "name" : "PDP Header Compression Type", "id" : "0x12", "type" : "TLV", "format" : "guint8", "public-format" : "QmiWdsPdpHeaderCompressionType" }, { "common-ref" : "WDS PDP Data Compression Type", "name" : "PDP Data Compression Type", "id" : "0x13", "type" : "TLV", "format" : "guint8", "public-format" : "QmiWdsPdpDataCompressionType" }, { "common-ref" : "WDS APN Name", "name" : "APN Name", "id" : "0x14", "type" : "TLV", "format" : "string" }, { "common-ref" : "WDS Primary IPv4 DNS Address", "name" : "Primary IPv4 DNS Address", "id" : "0x15", "type" : "TLV", "endian" : "little", "format" : "guint32" }, { "common-ref" : "WDS Secondary IPv4 DNS Address", "name" : "Secondary IPv4 DNS Address", "id" : "0x16", "type" : "TLV", "endian" : "little", "format" : "guint32" }, { "common-ref" : "WDS UMTS Requested QoS", "name" : "UMTS Requested QoS", "id" : "0x17", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Traffic Class", "format" : "guint8", "public-format" : "QmiWdsTrafficClass" }, { "name" : "Max uplink bitrate", "format" : "guint32" }, { "name" : "Max downlink bitrate", "format" : "guint32" }, { "name" : "Guaranteed uplink bitrate", "format" : "guint32" }, { "name" : "Guaranteed downlink bitrate", "format" : "guint32" }, { "name" : "QoS Delivery Order", "format" : "guint8", "public-format" : "QmiWdsDeliveryOrder" }, { "name" : "Maximum SDU Size", "format" : "guint32" }, { "name" : "SDU Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduErrorRatio" }, { "name" : "Residual Bit Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduResidualBitErrorRatio" }, { "name" : "Delivery Erroneous SDU", "format" : "guint8", "public-format" : "QmiWdsSduErroneousDelivery" }, { "name" : "Transfer Delay", "format" : "guint32" }, { "name" : "Traffic Handling Priority", "format" : "guint32" } ] }, { "common-ref" : "WDS UMTS Minimum QoS", "name" : "UMTS Minimum QoS", "id" : "0x18", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Traffic Class", "format" : "guint8", "public-format" : "QmiWdsTrafficClass" }, { "name" : "Max uplink bitrate", "format" : "guint32" }, { "name" : "Max downlink bitrate", "format" : "guint32" }, { "name" : "Guaranteed uplink bitrate", "format" : "guint32" }, { "name" : "Guaranteed downlink bitrate", "format" : "guint32" }, { "name" : "QoS Delivery Order", "format" : "guint8", "public-format" : "QmiWdsDeliveryOrder" }, { "name" : "Maximum SDU Size", "format" : "guint32" }, { "name" : "SDU Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduErrorRatio" }, { "name" : "Residual Bit Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduResidualBitErrorRatio" }, { "name" : "Delivery Erroneous SDU", "format" : "guint8", "public-format" : "QmiWdsSduErroneousDelivery" }, { "name" : "Transfer Delay", "format" : "guint32" }, { "name" : "Traffic Handling Priority", "format" : "guint32" } ] }, { "common-ref" : "WDS GPRS Requested QoS", "name" : "GPRS Requested QoS", "id" : "0x19", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Precedence Class", "format" : "guint32" }, { "name" : "Delay Class", "format" : "guint32" }, { "name" : "Reliability Class", "format" : "guint32" }, { "name" : "Peak Throughput Class", "format" : "guint32" }, { "name" : "Mean Throughput Class", "format" : "guint32" } ] }, { "common-ref" : "WDS GPRS Minimum QoS", "name" : "GPRS Minimum QoS", "id" : "0x1A", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Precedence Class", "format" : "guint32" }, { "name" : "Delay Class", "format" : "guint32" }, { "name" : "Reliability Class", "format" : "guint32" }, { "name" : "Peak Throughput Class", "format" : "guint32" }, { "name" : "Mean Throughput Class", "format" : "guint32" } ] }, { "common-ref" : "WDS Username", "name" : "Username", "id" : "0x1B", "type" : "TLV", "format" : "string", "personal-info" : "true" }, { "common-ref" : "WDS Password", "name" : "Password", "id" : "0x1C", "type" : "TLV", "format" : "string", "personal-info" : "true" }, { "common-ref" : "WDS Authentication", "name" : "Authentication", "id" : "0x1D", "type" : "TLV", "format" : "guint8", "public-format" : "QmiWdsAuthentication" }, { "common-ref" : "WDS IPv4 Address Preference", "name" : "IPv4 Address Preference", "id" : "0x1E", "type" : "TLV", "endian" : "little", "format" : "guint32" }, { "common-ref" : "WDS PCSCF Address Using PCO", "name" : "PCSCF Address Using PCO", "id" : "0x1F", "type" : "TLV", "format" : "guint8", "public-format" : "gboolean" }, { "common-ref" : "WDS PCSCF Address Using DHCP", "name" : "PCSCF Address Using DHCP", "id" : "0x21", "type" : "TLV", "format" : "guint8", "public-format" : "gboolean" }, { "common-ref" : "WDS IMCN Flag", "name" : "IMCN Flag", "id" : "0x22", "type" : "TLV", "format" : "guint8", "public-format" : "gboolean" }, { "common-ref" : "WDS PDP Context Number", "name" : "PDP Context Number", "id" : "0x25", "type" : "TLV", "format" : "guint8" }, { "common-ref" : "WDS PDP Context Secondary Flag", "name" : "PDP Context Secondary Flag", "id" : "0x26", "type" : "TLV", "format" : "guint8", "public-format" : "gboolean" }, { "common-ref" : "WDS PDP Context Primary ID", "name" : "PDP Context Primary ID", "id" : "0x27", "type" : "TLV", "format" : "guint8" }, { "common-ref" : "WDS IPv6 Address Preference", "name" : "IPv6 Address Preference", "id" : "0x28", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Address", "format" : "array", "fixed-size" : "8", "array-element" : { "format": "guint16", "endian": "network" } } ] }, { "common-ref" : "WDS UMTS Requested QoS With Signaling Indication Flag", "name" : "UMTS Requested QoS With Signaling Indication Flag", "id" : "0x29", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Traffic Class", "format" : "guint8", "public-format" : "QmiWdsTrafficClass" }, { "name" : "Max uplink bitrate", "format" : "guint32" }, { "name" : "Max downlink bitrate", "format" : "guint32" }, { "name" : "Guaranteed uplink bitrate", "format" : "guint32" }, { "name" : "Guaranteed downlink bitrate", "format" : "guint32" }, { "name" : "QoS Delivery Order", "format" : "guint8", "public-format" : "QmiWdsDeliveryOrder" }, { "name" : "Maximum SDU Size", "format" : "guint32" }, { "name" : "SDU Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduErrorRatio" }, { "name" : "Residual Bit Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduResidualBitErrorRatio" }, { "name" : "Delivery Erroneous SDU", "format" : "guint8", "public-format" : "QmiWdsSduErroneousDelivery" }, { "name" : "Transfer Delay", "format" : "guint32" }, { "name" : "Traffic Handling Priority", "format" : "guint32" }, { "name" : "Signaling Indication", "format" : "gint8" } ] }, { "common-ref" : "WDS UMTS Minimum QoS With Signaling Indication Flag", "name" : "UMTS Minimum QoS With Signaling Indication Flag", "id" : "0x2A", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "Traffic Class", "format" : "guint8", "public-format" : "QmiWdsTrafficClass" }, { "name" : "Max uplink bitrate", "format" : "guint32" }, { "name" : "Max downlink bitrate", "format" : "guint32" }, { "name" : "Guaranteed uplink bitrate", "format" : "guint32" }, { "name" : "Guaranteed downlink bitrate", "format" : "guint32" }, { "name" : "QoS Delivery Order", "format" : "guint8", "public-format" : "QmiWdsDeliveryOrder" }, { "name" : "Maximum SDU Size", "format" : "guint32" }, { "name" : "SDU Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduErrorRatio" }, { "name" : "Residual Bit Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduResidualBitErrorRatio" }, { "name" : "Delivery Erroneous SDU", "format" : "guint8", "public-format" : "QmiWdsSduErroneousDelivery" }, { "name" : "Transfer Delay", "format" : "guint32" }, { "name" : "Traffic Handling Priority", "format" : "guint32" }, { "name" : "Signaling Indication", "format" : "gint8" } ] }, { "common-ref" : "WDS IPv6 Primary DNS Address Preference", "name" : "IPv6 Primary DNS Address Preference", "id" : "0x2B", "type" : "TLV", "format" : "array", "fixed-size" : "8", "array-element" : { "format" : "guint16", "endian" : "network" } }, { "common-ref" : "WDS IPv6 Secondary DNS Address Preference", "name" : "IPv6 Secondary DNS Address Preference", "id" : "0x2C", "type" : "TLV", "format" : "array", "fixed-size" : "8", "array-element" : { "format" : "guint16", "endian" : "network" } }, { "common-ref" : "WDS LTE QoS Parameters", "name" : "LTE QoS Parameters", "id" : "0x2E", "type" : "TLV", "format" : "sequence", "contents" : [ { "name" : "QoS Class Identifier", "format" : "guint8", "public-format" : "QmiWdsQosClassIdentifier" }, { "name" : "Guaranteed Downlink Bitrate", "format" : "guint32" }, { "name" : "Max Downlink Bitrate", "format" : "guint32" }, { "name" : "Guaranteed Uplink Bitrate", "format" : "guint32" }, { "name" : "Max Uplink Bitrate", "format" : "guint32" } ] }, { "common-ref" : "WDS APN Disabled Flag", "name" : "APN Disabled Flag", "id" : "0x2F", "type" : "TLV", "format" : "guint8", "public-format" : "gboolean" }, { "common-ref" : "WDS Roaming Disallowed Flag", "name" : "Roaming Disallowed Flag", "id" : "0x3E", "type" : "TLV", "format" : "guint8", "public-format" : "gboolean" }, { "common-ref" : "WDS APN Type", "name" : "APN Type Mask", "id" : "0xDD", "type" : "TLV", "format" : "guint64", "public-format" : "QmiWdsApnTypeMask" }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "WDS", "id" : "0x0000", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Event Report", "type" : "Message", "service" : "WDS", "id" : "0x0001", "since" : "1.18", "input" : [ { "name" : "Channel Rate", "id" : "0x10", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Transfer Statistics", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Interval Seconds", "format" : "guint8" }, { "name" : "Indicators", "format" : "gint32", "public-format" : "QmiWdsSetEventReportTransferStatistics" } ] }, { "name" : "Data Bearer Technology", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Dormancy Status", "id" : "0x13", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "MIP Status", "id" : "0x14", "type" : "TLV", "since" : "1.18", "format" : "guint8" }, { "name" : "Current Data Bearer Technology", "id" : "0x15", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Data Call Status", "id" : "0x17", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Preferred Data System", "id" : "0x18", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "EVDO PM Change", "id" : "0x19", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Data Systems", "id" : "0x1A", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Uplink Flow Control", "id" : "0x1B", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Limited Data System Status", "id" : "0x1C", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "PDN Filter Removals", "id" : "0x1D", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Extended Data Bearer Technology", "id" : "0x1E", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Event Report", "type" : "Indication", "service" : "WDS", "id" : "0x0001", "since" : "1.18", "output" : [ { "name" : "Tx Packets Ok", "id" : "0x10", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Rx Packets Ok", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Tx Packets Error", "id" : "0x12", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Rx Packets Error", "id" : "0x13", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Tx Overflows", "id" : "0x14", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Rx Overflows", "id" : "0x15", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Channel Rates", "id" : "0x16", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Tx Rate BPS", "format" : "gint32" }, { "name" : "Rx Rate BPS", "format" : "gint32" } ] }, { "name" : "Data Bearer Technology", "id" : "0x17", "type" : "TLV", "since" : "1.18", "format" : "gint8", "public-format" : "QmiWdsDataBearerTechnology" }, { "name" : "Dormancy Status", "id" : "0x18", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "QmiWdsDormancyStatus" }, { "name" : "Tx Bytes Ok", "id" : "0x19", "type" : "TLV", "since" : "1.18", "format" : "guint64" }, { "name" : "Rx Bytes Ok", "id" : "0x1A", "type" : "TLV", "since" : "1.18", "format" : "guint64" }, { "name" : "MIP Status", "id" : "0x1B", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Current Data Bearer Technology", "id" : "0x1D", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Network Type", "format" : "guint8", "public-format" : "QmiWdsNetworkType" }, { "name" : "RAT Mask", "format" : "guint32" }, { "name" : "SO Mask", "format" : "guint32" } ] }, { "name" : "Data Call Status", "id" : "0x1F", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "QmiWdsDataCallStatus" }, { "name" : "Preferred Data System", "id" : "0x20", "type" : "TLV", "since" : "1.18", "format" : "guint32", "public-format" : "QmiWdsDataSystem" }, { "name" : "Data Call Type", "id" : "0x22", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Data Call Type", "format" : "guint8", "public-format" : "QmiWdsDataCallType" }, { "name" : "Tethered Call Type", "format" : "guint8", "public-format" : "QmiWdsTetheredCallType" } ] }, { "name" : "EVDO Page Monitor Period Change", "id" : "0x23", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Period Change", "format" : "guint8" }, { "name" : "Force Long Sleep", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Data Systems", "id" : "0x24", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Preferred Network Type", "format" : "guint8", "public-format" : "QmiWdsDataSystemNetworkType" }, { "name" : "Networks", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Network", "format" : "struct", "contents" : [ { "name" : "Network Type", "format" : "guint8", "public-format" : "QmiWdsDataSystemNetworkType" }, { "name" : "RAT Mask", "format" : "guint32" }, { "name" : "SO Mask", "format" : "guint32" } ] } } ] }, { "name" : "Tx Packets Dropped", "id" : "0x25", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Rx Packets Dropped", "id" : "0x26", "type" : "TLV", "since" : "1.18", "format" : "guint32" }, { "name" : "Uplink Flow Control Enabled", "id" : "0x27", "type" : "TLV", "since" : "1.18", "format" : "gint8", "public-format" : "gboolean" }, { "name" : "Data Call Address Family", "id" : "0x28", "type" : "TLV", "since" : "1.18", // Yes, TLV wants a u32 "format" : "guint32", "public-format" : "QmiWdsIpFamily" }, { "name" : "PDN Filters Removed", "id" : "0x29", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "PDN Filter Handler", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format": "guint32" } } ] }, { "name" : "Extended Data Bearer Technology", "id" : "0x2A", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Data Bearer Technology", "format" : "guint32", "public-format" : "QmiWdsDataSystemNetworkType" }, { "name" : "Radio Access Technology", "format" : "guint32", "public-format" : "QmiWdsRadioAccessTechnology" }, { "name" : "Extended Data Bearer Technology 3GPP", "format" : "guint16", "public-format" : "QmiWdsExtendedDataBearerTechnology3gpp" }, { "name" : "Reserved1", "visible" : "no", "format" : "guint8" }, { "name" : "Extended Data Bearer Technology 3GPP2", "format" : "guint16", "public-format" : "QmiWdsExtendedDataBearerTechnology3gpp2" }, { "name" : "Reserved2", "visible" : "no", "format" : "guint8" }, { "name" : "Reserved3", "visible" : "no", "format" : "guint8" }, { "name" : "Reserved4", "visible" : "no", "format" : "guint8" } ] } ] }, // ********************************************************************************* { "name" : "Abort", "type" : "Message", "service" : "WDS", "id" : "0x0002", "since" : "1.0", // This magic tag allows us to avoid creating a method in the client "scope" : "library-only", "input" : [ { "name" : "Transaction ID", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint16" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Indication Register", "type" : "Message", "service" : "WDS", "id" : "0x0003", "since" : "1.32", "input" : [ { "name" : "Report Extended IP Configuration Change", "id" : "0x12", "mandatory" : "no", "type" : "TLV", "since" : "1.32", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Report Profile Changes", "id" : "0x19", "mandatory" : "no", "type" : "TLV", "since" : "1.34", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Supported Messages", "type" : "Message", "service" : "WDS", "id" : "0x001E", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Start Network", "type" : "Message", "service" : "WDS", "id" : "0x0020", "since" : "1.0", // This method may be aborted "abort" : "yes", "input" : [ { "name" : "Primary DNS Address Preference", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Secondary DNS Address Preference", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Primary NBNS Address Preference", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Secondary NBNS Address Preference", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "APN", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "string" }, { "name" : "IPv4 Address Preference", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Authentication Preference", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWdsAuthentication" }, { "name" : "Username", "id" : "0x17", "type" : "TLV", "since" : "1.0", "format" : "string", "personal-info" : "true" }, { "name" : "Password", "id" : "0x18", "type" : "TLV", "since" : "1.0", "format" : "string", "personal-info" : "true" }, { "name" : "IP Family Preference", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWdsIpFamily" }, { "name" : "Technology Preference", "id" : "0x30", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWdsTechnologyPreference" }, { "name" : "Profile Index 3GPP", "id" : "0x31", "type" : "TLV", "since" : "1.0", "format" : "guint8" }, { "name" : "Profile Index 3GPP2", "id" : "0x32", "type" : "TLV", "since" : "1.0", "format" : "guint8" }, { "name" : "Enable Autoconnect", "id" : "0x33", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Extended Technology Preference", "id" : "0x34", "type" : "TLV", "since" : "1.0", // Note: docs give this as gint16 with negative enum values. Instead, we use // guint16 with equivalent positive enum values. "format" : "guint16", "public-format" : "QmiWdsExtendedTechnologyPreference" }, { "name" : "Call Type", "id" : "0x35", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWdsCallType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Packet Data Handle", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint32", "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Call End Reason", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiWdsCallEndReason", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_CALL_FAILED" } ] }, { "name" : "Verbose Call End Reason", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "guint16", "public-format" : "QmiWdsVerboseCallEndReasonType" }, { "name" : "Reason", "format" : "gint16" } ], "prerequisites": [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_CALL_FAILED" } ] } ] }, // ********************************************************************************* { "name" : "Stop Network", "type" : "Message", "service" : "WDS", "id" : "0x0021", "since" : "1.0", "input" : [ { "name" : "Packet Data Handle", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Disable Autoconnect", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Packet Service Status", "type" : "Message", "service" : "WDS", "id" : "0x0022", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Connection Status", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWdsConnectionStatus", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, { "name" : "Packet Service Status", "type" : "Indication", "service" : "WDS", "id" : "0x0022", "since" : "1.14", "output" : [ { "name" : "Connection Status", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Status", "format" : "guint8", "public-format" : "QmiWdsConnectionStatus" }, { "name" : "Reconfiguration Required", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "Call End Reason", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint16", "public-format" : "QmiWdsCallEndReason" }, { "name" : "Verbose Call End Reason", "id" : "0x11", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "guint16", "public-format" : "QmiWdsVerboseCallEndReasonType" }, { "name" : "Reason", "format" : "gint16" } ] }, { "name" : "IP Family", "id" : "0x12", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiWdsIpFamily" }, { "name" : "Extended Technology Preference", "id" : "0x34", "type" : "TLV", "since" : "1.14", // Note: docs give this as gint16 with negative enum values. Instead, we use // guint16 with equivalent positive enum values. "format" : "guint16", "public-format" : "QmiWdsExtendedTechnologyPreference" } ] }, // ********************************************************************************* { "name" : "Get Channel Rates", "type" : "Message", "service" : "WDS", "id" : "0x0023", "since" : "1.20", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Channel Rates", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Channel TX Rate BPS", "format" : "guint32" }, { "name" : "Channel RX Rate BPS", "format" : "guint32" }, { "name" : "Max Channel TX Rate BPS", "format" : "guint32" }, { "name" : "Max Channel RX Rate BPS", "format" : "guint32" } ] } ] }, // ********************************************************************************* { "name" : "Get Packet Statistics", "type" : "Message", "service" : "WDS", "id" : "0x0024", "since" : "1.6", "input" : [ { "name" : "Mask", "id" : "0x01", "type" : "TLV", "since" : "1.6", "format" : "guint32", "public-format" : "QmiWdsPacketStatisticsMaskFlag" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Tx Packets Ok", "id" : "0x10", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Rx Packets Ok", "id" : "0x11", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Tx Packets Error", "id" : "0x12", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Rx Packets Error", "id" : "0x13", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Tx Overflows", "id" : "0x14", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Rx Overflows", "id" : "0x15", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Tx Bytes Ok", "id" : "0x19", "type" : "TLV", "since" : "1.6", "format" : "guint64", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Rx Bytes Ok", "id" : "0x1A", "type" : "TLV", "since" : "1.6", "format" : "guint64", "prerequisites" : [ { "common-ref" : "Success" } ] }, // Note: last call TX/RX given along with QMI Error 'out of call' { "name" : "Last Call Tx Bytes Ok", "id" : "0x1B", "type" : "TLV", "since" : "1.6", "format" : "guint64" }, { "name" : "Last Call Rx Bytes Ok", "id" : "0x1C", "type" : "TLV", "since" : "1.6", "format" : "guint64" }, { "name" : "Tx Packets Dropped", "id" : "0x1D", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Rx Packets Dropped", "id" : "0x1E", "type" : "TLV", "since" : "1.6", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Go Dormant", "type" : "Message", "service" : "WDS", "id" : "0x0025", "since" : "1.18", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Go Active", "type" : "Message", "service" : "WDS", "id" : "0x0026", "since" : "1.18", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Create Profile", "type" : "Message", "service" : "WDS", "id" : "0x0027", "since" : "1.18", "input" : [ { "name" : "Profile Type", "id" : "0x01", "type" : "TLV", "since" : "1.18", "format" : "guint8", "public-format" : "QmiWdsProfileType" }, { "common-ref" : "WDS Profile Name", "since" : "1.18" }, { "common-ref" : "WDS PDP Type", "since" : "1.18" }, { "common-ref" : "WDS PDP Header Compression Type", "since" : "1.18" }, { "common-ref" : "WDS PDP Data Compression Type", "since" : "1.18" }, { "common-ref" : "WDS APN Name", "since" : "1.18" }, { "common-ref" : "WDS Primary IPv4 DNS Address", "since" : "1.18" }, { "common-ref" : "WDS Secondary IPv4 DNS Address", "since" : "1.18" }, { "common-ref" : "WDS UMTS Requested QoS", "since" : "1.18" }, { "common-ref" : "WDS UMTS Minimum QoS", "since" : "1.18" }, { "common-ref" : "WDS GPRS Requested QoS", "since" : "1.18" }, { "common-ref" : "WDS GPRS Minimum QoS", "since" : "1.18" }, { "common-ref" : "WDS Username", "since" : "1.18" }, { "common-ref" : "WDS Password", "since" : "1.18" }, { "common-ref" : "WDS Authentication", "since" : "1.18" }, { "common-ref" : "WDS IPv4 Address Preference", "since" : "1.18" }, { "common-ref" : "WDS PCSCF Address Using PCO", "since" : "1.18" }, // 0x20, PDP access control flag { "common-ref" : "WDS PCSCF Address Using DHCP", "since" : "1.18" }, { "common-ref" : "WDS IMCN Flag", "since" : "1.18" }, // 0x23, TFT ID1 Parameters // 0x24, TFT ID2 Parameters { "common-ref" : "WDS PDP Context Number", "since" : "1.18" }, { "common-ref" : "WDS PDP Context Secondary Flag", "since" : "1.18" }, { "common-ref" : "WDS PDP Context Primary ID", "since" : "1.18" }, { "common-ref" : "WDS IPv6 Address Preference", "since" : "1.18" }, { "common-ref" : "WDS UMTS Requested QoS With Signaling Indication Flag", "since" : "1.18" }, { "common-ref" : "WDS UMTS Minimum QoS With Signaling Indication Flag", "since" : "1.18" }, { "common-ref" : "WDS IPv6 Primary DNS Address Preference", "since" : "1.18" }, { "common-ref" : "WDS IPv6 Secondary DNS Address Preference", "since" : "1.18" }, // 0x2D, DHCP/NAS Preference { "common-ref" : "WDS LTE QoS Parameters", "since" : "1.18" }, { "common-ref" : "WDS APN Disabled Flag", "since" : "1.22" }, // 0x30, PDN inactivity timeout // 0x31, APN class { "common-ref" : "WDS Roaming Disallowed Flag", "since" : "1.22" }, // 0x90, Negotiate DNS server preference // 0x91, PPP session close timer for DO // 0x92, PPP session close timer for 1X // 0x93, Allow/disallow lingering of interface // 0x94, LCP ACK timeout // 0x95, IPCP ACK timeout // 0x96, AUTH timeout // 0x97, LCP configuration request retry count value // 0x98, IPCP configuration request retry count value // 0x99, Authentication retry // 0x9A, Authentication protocol, // 0x9B, User ID // 0x9C, Authentication password // 0x9D, Data rate // 0x9E, Application type // 0x9F, Data mode // 0xA0, Application priority // 0xA1, APN string // 0xA2, PDN type // 0xA3, Is PCSCF address needed // 0xA4, IPv4 Primary DNS address // 0xA5, IPv4 Secondary DNS address // 0xA6, IPv6 Primary DNS address // 0xA7, IPv6 Secondary DNS address // 0xA8, RAT type // 0xA9, APN enabled // 0xAA, PDN inactivity timeout // 0xAB, APN class { "common-ref" : "WDS APN Type", "since" : "1.30" } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Profile Identifier", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Extended Error Code", "since" : "1.18" } ] }, // ********************************************************************************* { "name" : "Modify Profile", "type" : "Message", "service" : "WDS", "id" : "0x0028", "since" : "1.18", "input" : [ { "common-ref" : "WDS Profile Identifier", "since" : "1.18" }, { "common-ref" : "WDS Profile Name", "since" : "1.18" }, { "common-ref" : "WDS PDP Type", "since" : "1.18" }, { "common-ref" : "WDS PDP Header Compression Type", "since" : "1.18" }, { "common-ref" : "WDS PDP Data Compression Type", "since" : "1.18" }, { "common-ref" : "WDS APN Name", "since" : "1.18" }, { "common-ref" : "WDS Primary IPv4 DNS Address", "since" : "1.18" }, { "common-ref" : "WDS Secondary IPv4 DNS Address", "since" : "1.18" }, { "common-ref" : "WDS UMTS Requested QoS", "since" : "1.18" }, { "common-ref" : "WDS UMTS Minimum QoS", "since" : "1.18" }, { "common-ref" : "WDS GPRS Requested QoS", "since" : "1.18" }, { "common-ref" : "WDS GPRS Minimum QoS", "since" : "1.18" }, { "common-ref" : "WDS Username", "since" : "1.18" }, { "common-ref" : "WDS Password", "since" : "1.18" }, { "common-ref" : "WDS Authentication", "since" : "1.18" }, { "common-ref" : "WDS IPv4 Address Preference", "since" : "1.18" }, { "common-ref" : "WDS PCSCF Address Using PCO", "since" : "1.18" }, // 0x20, PDP access control flag { "common-ref" : "WDS PCSCF Address Using DHCP", "since" : "1.18" }, { "common-ref" : "WDS IMCN Flag", "since" : "1.18" }, // 0x23, TFT ID1 Parameters // 0x24, TFT ID2 Parameters { "common-ref" : "WDS PDP Context Number", "since" : "1.18" }, { "common-ref" : "WDS PDP Context Secondary Flag", "since" : "1.18" }, { "common-ref" : "WDS PDP Context Primary ID", "since" : "1.18" }, { "common-ref" : "WDS IPv6 Address Preference", "since" : "1.18" }, { "common-ref" : "WDS UMTS Requested QoS With Signaling Indication Flag", "since" : "1.18" }, { "common-ref" : "WDS UMTS Minimum QoS With Signaling Indication Flag", "since" : "1.18" }, { "common-ref" : "WDS IPv6 Primary DNS Address Preference", "since" : "1.18" }, { "common-ref" : "WDS IPv6 Secondary DNS Address Preference", "since" : "1.18" }, // 0x2D, DHCP/NAS Preference { "common-ref" : "WDS LTE QoS Parameters", "since" : "1.18" }, { "common-ref" : "WDS APN Disabled Flag", "since" : "1.22" }, // 0x30, PDN inactivity timeout // 0x31, APN class { "common-ref" : "WDS Roaming Disallowed Flag", "since" : "1.22" }, // 0x90, Negotiate DNS server preference // 0x91, PPP session close timer for DO // 0x92, PPP session close timer for 1X // 0x93, Allow/disallow lingering of interface // 0x94, LCP ACK timeout // 0x95, IPCP ACK timeout // 0x96, AUTH timeout // 0x97, LCP configuration request retry count value // 0x98, IPCP configuration request retry count value // 0x99, Authentication retry // 0x9A, Authentication protocol, // 0x9B, User ID // 0x9C, Authentication password // 0x9D, Data rate // 0x9E, Application type // 0x9F, Data mode // 0xA0, Application priority // 0xA1, APN string // 0xA2, PDN type // 0xA3, Is PCSCF address needed // 0xA4, IPv4 Primary DNS address // 0xA5, IPv4 Secondary DNS address // 0xA6, IPv6 Primary DNS address // 0xA7, IPv6 Secondary DNS address // 0xA8, RAT type // 0xA9, APN enabled // 0xAA, PDN inactivity timeout // 0xAB, APN class { "common-ref" : "WDS APN Type", "since" : "1.30" } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Extended Error Code", "since" : "1.18" } ] }, // ********************************************************************************* { "name" : "Delete Profile", "type" : "Message", "service" : "WDS", "id" : "0x0029", "since" : "1.18", "input" : [ { "common-ref" : "WDS Profile Identifier", "since" : "1.18" } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Extended Error Code", "since" : "1.18" } ] }, // ********************************************************************************* { "name" : "Get Profile List", "type" : "Message", "service" : "WDS", "id" : "0x002A", "since" : "1.8", "input" : [ { "name" : "Profile Type", "id" : "0x10", "type" : "TLV", "since" : "1.8", "format" : "guint8", "public-format" : "QmiWdsProfileType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Profile List", "id" : "0x01", "type" : "TLV", "since" : "1.8", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Profile", "format" : "struct", "contents" : [ { "name" : "Profile Type", "format" : "guint8", "public-format" : "QmiWdsProfileType" }, { "name" : "Profile Index", "format" : "guint8" }, { "name" : "Profile Name", "format" : "string" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Extended Error Code", "since" : "1.8" } ] }, // ********************************************************************************* { "name" : "Get Profile Settings", "type" : "Message", "service" : "WDS", "id" : "0x002B", "since" : "1.8", "input" : [ { "name" : "Profile ID", "id" : "0x01", "type" : "TLV", "since" : "1.8", "format" : "sequence", "contents" : [ { "name" : "Profile Type", "format" : "guint8", "public-format" : "QmiWdsProfileType" }, { "name" : "Profile Index", "format" : "guint8" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Profile Name", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Type", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Header Compression Type", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Data Compression Type", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS APN Name", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Primary IPv4 DNS Address", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Secondary IPv4 DNS Address", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Requested QoS", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Minimum QoS", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS GPRS Requested QoS", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS GPRS Minimum QoS", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Username", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Password", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Authentication", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv4 Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PCSCF Address Using PCO", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x20, PDP access control flag { "common-ref" : "WDS PCSCF Address Using DHCP", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IMCN Flag", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x23, TFT ID1 Parameters // 0x24, TFT ID2 Parameters { "common-ref" : "WDS PDP Context Number", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Context Secondary Flag", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Context Primary ID", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv6 Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Requested QoS With Signaling Indication Flag", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Minimum QoS With Signaling Indication Flag", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv6 Primary DNS Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv6 Secondary DNS Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x2D, DHCP/NAS Preference { "common-ref" : "WDS LTE QoS Parameters", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS APN Disabled Flag", "since" : "1.22", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x30, PDN inactivity timeout // 0x31, APN class { "common-ref" : "WDS Roaming Disallowed Flag", "since" : "1.22", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x90, Negotiate DNS server preference // 0x91, PPP session close timer for DO // 0x92, PPP session close timer for 1X // 0x93, Allow/disallow lingering of interface // 0x94, LCP ACK timeout // 0x95, IPCP ACK timeout // 0x96, AUTH timeout // 0x97, LCP configuration request retry count value // 0x98, IPCP configuration request retry count value // 0x99, Authentication retry // 0x9A, Authentication protocol, // 0x9B, User ID // 0x9C, Authentication password // 0x9D, Data rate // 0x9E, Application type // 0x9F, Data mode // 0xA0, Application priority // 0xA1, APN string // 0xA2, PDN type // 0xA3, Is PCSCF address needed // 0xA4, IPv4 Primary DNS address // 0xA5, IPv4 Secondary DNS address // 0xA6, IPv6 Primary DNS address // 0xA7, IPv6 Secondary DNS address // 0xA8, RAT type // 0xA9, APN enabled // 0xAA, PDN inactivity timeout // 0xAB, APN class { "common-ref" : "WDS APN Type", "since" : "1.30", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Extended Error Code", "since" : "1.8" } ] }, // ********************************************************************************* { "name" : "Get Default Settings", "type" : "Message", "service" : "WDS", "id" : "0x002C", "since" : "1.8", "input" : [ { "name" : "Profile Type", "id" : "0x01", "type" : "TLV", "since" : "1.8", "format" : "guint8", "public-format" : "QmiWdsProfileType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Profile Name", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Type", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Header Compression Type", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Data Compression Type", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS APN Name", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Primary IPv4 DNS Address", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Secondary IPv4 DNS Address", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Requested QoS", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Minimum QoS", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS GPRS Requested QoS", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS GPRS Minimum QoS", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Username", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Password", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Authentication", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv4 Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PCSCF Address Using PCO", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x20, PDP access control flag { "common-ref" : "WDS PCSCF Address Using DHCP", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IMCN Flag", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x23, TFT ID1 Parameters // 0x24, TFT ID2 Parameters { "common-ref" : "WDS PDP Context Number", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Context Secondary Flag", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Context Primary ID", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv6 Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Requested QoS With Signaling Indication Flag", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS UMTS Minimum QoS With Signaling Indication Flag", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv6 Primary DNS Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS IPv6 Secondary DNS Address Preference", "since" : "1.8", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x2D, DHCP/NAS Preference { "common-ref" : "WDS LTE QoS Parameters", "since" : "1.18", "prerequisites" : [ { "common-ref" : "Success" } ] }, // 0x2F, APN disabled flag // 0x30, PDN inactivity timeout // 0x31, APN class // 0x90, Negotiate DNS server preference // 0x91, PPP session close timer for DO // 0x92, PPP session close timer for 1X // 0x93, Allow/disallow lingering of interface // 0x94, LCP ACK timeout // 0x95, IPCP ACK timeout // 0x96, AUTH timeout // 0x97, LCP configuration request retry count value // 0x98, IPCP configuration request retry count value // 0x99, Authentication retry // 0x9A, Authentication protocol, // 0x9B, User ID // 0x9C, Authentication password // 0x9D, Data rate // 0x9E, Application type // 0x9F, Data mode // 0xA0, Application priority // 0xA1, APN string // 0xA2, PDN type // 0xA3, Is PCSCF address needed // 0xA4, IPv4 Primary DNS address // 0xA5, IPv4 Secondary DNS address // 0xA6, IPv6 Primary DNS address // 0xA7, IPv6 Secondary DNS address // 0xA8, RAT type // 0xA9, APN enabled // 0xAA, PDN inactivity timeout // 0xAB, APN class { "common-ref" : "WDS Extended Error Code", "since" : "1.8" } ] }, // ********************************************************************************* { "name" : "Get Current Settings", "type" : "Message", "service" : "WDS", "id" : "0x002D", "since" : "1.0", "input" : [ { "name" : "Requested Settings", "id" : "0x10", "mandatory" : "yes", "type" : "TLV", "since" : "1.0", "format" : "guint32", "public-format" : "QmiWdsRequestedSettings" } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Profile Name", "since" : "1.0", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS PDP Type", "since" : "1.0", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS APN Name", "since" : "1.0", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Primary IPv4 DNS Address", "since" : "1.0", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Secondary IPv4 DNS Address", "since" : "1.0", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "UMTS Granted QoS", "id" : "0x17", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Traffic Class", "format" : "guint8", "public-format" : "QmiWdsTrafficClass" }, { "name" : "Max uplink bitrate", "format" : "guint32" }, { "name" : "Max downlink bitrate", "format" : "guint32" }, { "name" : "Guaranteed uplink bitrate", "format" : "guint32" }, { "name" : "Guaranteed downlink bitrate", "format" : "guint32" }, { "name" : "QoS Delivery Order", "format" : "guint8", "public-format" : "QmiWdsDeliveryOrder" }, { "name" : "Maximum SDU Size", "format" : "guint32" }, { "name" : "SDU Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduErrorRatio" }, { "name" : "Residual Bit Error Ratio", "format" : "guint8", "public-format" : "QmiWdsSduResidualBitErrorRatio" }, { "name" : "Delivery Erroneous SDU", "format" : "guint8", "public-format" : "QmiWdsSduErroneousDelivery" }, { "name" : "Transfer Delay", "format" : "guint32" }, { "name" : "Traffic Handling Priority", "format" : "guint32" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "GPRS Granted QoS", "id" : "0x19", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Precedence Class", "format" : "guint32" }, { "name" : "Delay Class", "format" : "guint32" }, { "name" : "Reliability Class", "format" : "guint32" }, { "name" : "Peak Throughput Class", "format" : "guint32" }, { "name" : "Mean Throughput Class", "format" : "guint32" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Username", "since" : "1.0", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Authentication", "since" : "1.0", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IPv4 Address", "id" : "0x1E", "type" : "TLV", "since" : "1.0", "endian" : "little", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Profile ID", "id" : "0x1F", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Profile Type", "format" : "guint8", "public-format" : "QmiWdsProfileType" }, { "name" : "Profile Index", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IPv4 Gateway Address", "id" : "0x20", "type" : "TLV", "since" : "1.0", "endian" : "little", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IPv4 Gateway Subnet Mask", "id" : "0x21", "type" : "TLV", "since" : "1.0", "endian" : "little", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "PCSCF Address Using PCO", "id" : "0x22", "type" : "TLV", "since" : "1.0", "format" : "guint8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "PCSCF Server Address List", "id" : "0x23", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "IPv4 Address", "endian" : "little", "format" : "guint32" }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "PCSCF Domain Name List", "id" : "0x24", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "FQDN", "format" : "string", "size-prefix-format" : "guint16" }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IPv6 Address", "id" : "0x25", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Address", "format" : "array", "fixed-size" : "8", "array-element" : { "format": "guint16", "endian": "network" } }, { "name" : "Prefix Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IPv6 Gateway Address", "id" : "0x26", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Address", "format" : "array", "fixed-size" : "8", "array-element" : { "format": "guint16", "endian": "network" } }, { "name" : "Prefix Length", "format" : "guint8" } ], "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IPv6 Primary DNS Address", "id" : "0x27", "type" : "TLV", "since" : "1.0", "format" : "array", "fixed-size" : "8", "array-element" : { "format": "guint16", "endian": "network" }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IPv6 Secondary DNS Address", "id" : "0x28", "type" : "TLV", "since" : "1.0", "format" : "array", "fixed-size" : "8", "array-element" : { "format": "guint16", "endian": "network" }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "MTU", "id" : "0x29", "type" : "TLV", "since" : "1.0", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Domain Name List", "id" : "0x2A", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Domain Name", "format" : "string", "size-prefix-format" : "guint16" }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IP Family", "id" : "0x2B", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWdsIpFamily", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IMCN Flag", "id" : "0x2C", "type" : "TLV", "since" : "1.0", "format" : "gint8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Extended Technology Preference", "id" : "0x2D", "type" : "TLV", "since" : "1.0", // Note: docs give this as gint16 with negative enum values. Instead, we use // guint16 with equivalent positive enum values. "format" : "guint16", "public-format" : "QmiWdsExtendedTechnologyPreference", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Operator Reserved PCO", "id" : "0x2F", "type" : "TLV", "since" : "1.32", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16"}, { "name" : "MNC", "format" : "guint16" }, { "name" : "MNC Includes PCS Digit", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "App Specific Info", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "format" : "guint8" } }, { "name" : "Container Id", "format" : "guint16" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Dormancy Status", "type" : "Message", "service" : "WDS", "id" : "0x0030", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Dormancy Status", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiWdsDormancyStatus", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Autoconnect Settings", "type" : "Message", "service" : "WDS", "id" : "0x0034", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Status", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiWdsAutoconnectSetting", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Roaming", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiWdsAutoconnectSettingRoaming", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get Data Bearer Technology", "type" : "Message", "service" : "WDS", "id" : "0x0037", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Current", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "gint8", "public-format" : "QmiWdsDataBearerTechnology", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Last", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "gint8", "public-format" : "QmiWdsDataBearerTechnology", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_OUT_OF_CALL" } ] } ] }, // ********************************************************************************* { "name" : "Get Current Data Bearer Technology", "type" : "Message", "service" : "WDS", "id" : "0x0044", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Current", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Network Type", "format" : "guint8", "public-format" : "QmiWdsNetworkType" }, { "name" : "RAT Mask", "format" : "guint32" }, { "name" : "SO Mask", "format" : "guint32" } ], "prerequisites": [ { "common-ref" : "Success" } ] }, { "name" : "Last", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Network Type", "format" : "guint8", "public-format" : "QmiWdsNetworkType" }, { "name" : "RAT Mask", "format" : "guint32" }, { "name" : "SO Mask", "format" : "guint32" } ] } ] }, // ********************************************************************************* { "name" : "Get Default Profile Number", "type" : "Message", "service" : "WDS", "id" : "0x0049", "since" : "1.28", "input" : [ { "name" : "Profile Type", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiWdsProfileType"}, { "name" : "Family", "format" : "guint8", "public-format" : "QmiWdsProfileFamily"}] }], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Index", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.28", "format" : "guint8", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "common-ref" : "WDS Extended Error Code", "since" : "1.28" } ] }, // ********************************************************************************* { "name" : "Set Default Profile Number", "type" : "Message", "service" : "WDS", "id" : "0x004A", "since" : "1.28", "input" : [ { "name" : "Profile Identifier", "id" : "0x01", "mandatory" : "yes", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "guint8", "public-format" : "QmiWdsProfileType"}, { "name" : "Family", "format" : "guint8", "public-format" : "QmiWdsProfileFamily"}, { "name" : "Index", "format" : "guint8"}] }], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Extended Error Code", "since" : "1.28" } ] }, // ********************************************************************************* { "name" : "Set IP Family", "type" : "Message", "service" : "WDS", "id" : "0x004D", "since" : "1.0", "input" : [ { "name" : "Preference", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWdsIpFamily" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Autoconnect Settings", "type" : "Message", "service" : "WDS", "id" : "0x0051", "since" : "1.14", "input" : [ { "name" : "Status", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiWdsAutoconnectSetting" }, { "name" : "Roaming", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiWdsAutoconnectSettingRoaming" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get PDN Throttle Info", "type" : "Message", "service" : "WDS", "id" : "0x006C", "since" : "1.14", "input" : [ { "name" : "Network Type", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "guint8", "public-format" : "QmiWdsDataSystemNetworkType" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Info", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "IPv4 Throttled", "format" : "gint8", "public-format" : "gboolean" }, { "name" : "IPv6 Throttled", "format" : "gint8", "public-format" : "gboolean" }, { "name" : "IPv4 Throttle Time Left MS", "format" : "guint32" }, { "name" : "IPv6 Throttle Time Left MS", "format" : "guint32" }, { "name" : "APN", "format" : "string" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Get LTE Attach Parameters", "type" : "Message", "service" : "WDS", "id" : "0x0085", "since" : "1.28", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "APN", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "string", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "IP Support Type", "id" : "0x11", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "QmiWdsIpSupportType", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "OTA Attach Performed", "id" : "0x12", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Bind Data Port", "type" : "Message", "service" : "WDS", "id" : "0x0089", "since" : "1.28", "input" : [ { "name" : "Data Port", "id" : "0x01", "type" : "TLV", "since" : "1.28", "format" : "guint16", "public-format" : "QmiSioPort" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Extended Ip Config", "type" : "Indication", "service" : "WDS", "id" : "0x008C", "since" : "1.32", "output" : [ { "name" : "Changed IP Configuration", "id" : "0x10", "type" : "TLV", "since" : "1.32", "format" : "guint32", "public-format" : "QmiWdsRequestedSettings" } ] }, // ********************************************************************************* { "name" : "Get Max LTE Attach PDN Number", "type" : "Message", "service" : "WDS", "id" : "0x0092", "since" : "1.28", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Info", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "guint8", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set LTE Attach PDN List", "type" : "Message", "service" : "WDS", "id" : "0x0093", "since" : "1.28", "input" : [ { "name" : "List", "id" : "0x01", "type" : "TLV", "since" : "1.28", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "PDN Profile ID", "format" : "guint16" }}, { "name" : "Action", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "guint32", "public-format" : "QmiWdsAttachPdnListAction"} ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Set LTE Attach PDN List", "type" : "Indication", "service" : "WDS", "id" : "0x0093", "since" : "1.28", "output" : [ { "name" : "Action Result", "id" : "0x01", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean" } ] }, // ********************************************************************************* { "name" : "Get LTE Attach PDN List", "type" : "Message", "service" : "WDS", "id" : "0x0094", "since" : "1.28", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Current List", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "PDN Profile ID", "format" : "guint16" }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Pending List", "id" : "0x11", "type" : "TLV", "since" : "1.28", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "PDN Profile ID", "format" : "guint16" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Bind Mux Data Port", "type" : "Message", "service" : "WDS", "id" : "0x00A2", "since" : "1.18", "input" : [ { "name" : "Endpoint Info", "id" : "0x10", "type" : "TLV", "since" : "1.18", "format" : "sequence", "contents" : [ { "name" : "Endpoint Type", "format" : "guint32", "public-format" : "QmiDataEndpointType"}, { "name" : "Interface Number", "format" : "guint32" }]}, { "name" : "Mux ID", "id" : "0x11", "type" : "TLV", "since" : "1.18", "format" : "guint8"}, { "name" : "Client Type", "id" : "0x13", "type" : "TLV", "since" : "1.18", "format" : "guint32", "public-format" : "QmiWdsClientType"} ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Configure Profile Event List", "type" : "Message", "service" : "WDS", "id" : "0x00A7", "since" : "1.34", "input" : [ { "name" : "Register", "id" : "0x10", "type" : "TLV", "since" : "1.34", "format" : "array", "size-prefix-format" : "guint8", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Profile Type", "format" : "guint8", "public-format" : "QmiWdsProfileType" }, { "name" : "Profile Index", "format" : "guint8" } ] } } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Profile Changed", "type" : "Indication", "service" : "WDS", "id" : "0x00A8", "since" : "1.34", "output" : [ { "name" : "Profile Event", "id" : "0x10", "type" : "TLV", "since" : "1.34", "format" : "sequence", "contents" : [ { "name" : "Profile Type", "format" : "guint8", "public-format" : "QmiWdsProfileType" }, { "name" : "Profile Index", "format" : "guint8" }, { "name" : "Change Event", "format" : "guint8", "public-format" : "QmiWdsProfileChangeEvent" } ] } ] }, // ********************************************************************************* { "name" : "Swi Create Profile Indexed", "type" : "Message", "service" : "WDS", "id" : "0x5558", "since" : "1.22", "input" : [ { "common-ref" : "WDS Profile Identifier", "since" : "1.22" } , { "common-ref" : "WDS Profile Name", "since" : "1.22" }, { "common-ref" : "WDS PDP Type", "since" : "1.22" }, { "common-ref" : "WDS APN Name", "since" : "1.22" }, { "common-ref" : "WDS Primary IPv4 DNS Address", "since" : "1.22" }, { "common-ref" : "WDS Secondary IPv4 DNS Address", "since" : "1.22" }, { "common-ref" : "WDS Username", "since" : "1.22" }, { "common-ref" : "WDS Password", "since" : "1.22" }, { "common-ref" : "WDS Authentication", "since" : "1.22" }, { "common-ref" : "WDS IPv4 Address Preference", "since" : "1.22" }, { "common-ref" : "WDS PDP Context Number", "since" : "1.22" }, { "common-ref" : "WDS APN Disabled Flag", "since" : "1.22" }, { "common-ref" : "WDS Roaming Disallowed Flag", "since" : "1.22" } ], "output" : [ { "common-ref" : "Operation Result" }, { "common-ref" : "WDS Profile Identifier", "since" : "1.22", "prerequisites" : [ { "common-ref" : "Success" } ] } ] } ] libqmi-1.35.2-dev/data/qmi-service-wms.json000066400000000000000000001110511455567757300205160ustar00rootroot00000000000000 [ // ********************************************************************************* { "name" : "WMS", "type" : "Service" }, // ********************************************************************************* { "name" : "QMI Client WMS", "type" : "Client", "since" : "1.0" }, // ********************************************************************************* { "name" : "QMI Message WMS", "type" : "Message-ID-Enum" }, // ********************************************************************************* { "name" : "QMI Indication WMS", "type" : "Indication-ID-Enum" }, // ********************************************************************************* { "name" : "Reset", "type" : "Message", "service" : "WMS", "id" : "0x0000", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Set Event Report", "type" : "Message", "service" : "WMS", "id" : "0x0001", "since" : "1.0", "input" : [ { "name" : "New MT Message Indicator", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Report", "format" : "guint8", "public-format" : "gboolean" } ] } ], "output" : [ { "common-ref" : "Operation Result" } ] }, { "name" : "Event Report", "type" : "Indication", "service" : "WMS", "id" : "0x0001", "since" : "1.0", "output" : [ { "name" : "MT Message", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Storage Type", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Memory Index", "format" : "guint32" } ] }, { "name" : "Transfer Route MT Message", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Ack Indicator", "format" : "guint8", "public-format" : "QmiWmsAckIndicator" }, { "name" : "Transaction ID", "format" : "guint32" }, { "name" : "Format", "format" : "guint8", "public-format" : "QmiWmsMessageFormat" }, { "name" : "Raw Data", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "Message Mode", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageMode" }, { "name" : "ETWS Message", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Notification Type", "format" : "guint8", "public-format" : "QmiWmsNotificationType" }, { "name" : "Raw Data", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "ETWS PLMN Information", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "MCC", "format" : "guint16" }, { "name" : "MNC", "format" : "guint16" } ] }, { "name" : "SMSC Address", "id" : "0x15", "type" : "TLV", "since" : "1.0", "format" : "string" }, { "name" : "SMS on IMS", "id" : "0x16", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ] }, // ********************************************************************************* { "name" : "Get Supported Messages", "type" : "Message", "service" : "WMS", "id" : "0x001E", "since" : "1.14", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "List", "id" : "0x10", "type" : "TLV", "since" : "1.14", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Raw Send", "type" : "Message", "service" : "WMS", "id" : "0x0020", "since" : "1.0", "input" : [ { "name" : "Raw Message Data", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Format", "format" : "guint8", "public-format" : "QmiWmsMessageFormat" }, { "name" : "Raw Data", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] }, { "name" : "CDMA Force On DC", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Force", "format" : "guint8", "public-format" : "gboolean" }, { "name" : "Service Option", "format" : "guint8", "public-format" : "QmiWmsCdmaServiceOption" } ] }, { "name" : "CDMA Follow On DC", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Follow", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "GSM WCDMA Link Timer", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8" }, { "name" : "SMS on IMS", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Message ID", "id" : "0x01", // Even if we have this TLV as mandatory, it seems it really isn't "type" : "TLV", "since" : "1.0", "format" : "guint16", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "CDMA Cause Code", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiWmsCdmaCauseCode", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] }, { "name" : "CDMA Error Class", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsCdmaErrorClass", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] }, { "name" : "GSM WCDMA Cause Info", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RP Cause", "format" : "guint16", "public-format" : "QmiWmsGsmUmtsRpCause" }, { "name" : "TP Cause", "format" : "guint8", "public-format" : "QmiWmsGsmUmtsTpCause" } ], "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] }, { "name" : "Message Delivery Failure Type", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageDeliveryFailureType", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] } ] }, // ********************************************************************************* { "name" : "Raw Write", "type" : "Message", "service" : "WMS", "id" : "0x0021", "since" : "1.0", "input" : [ { "name" : "Raw Message Data", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Storage Type", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Format", "format" : "guint8", "public-format" : "QmiWmsMessageFormat" }, { "name" : "Raw Data", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ] } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Memory Index", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint32", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Raw Read", "type" : "Message", "service" : "WMS", "id" : "0x0022", "since" : "1.0", "input" : [ { "name" : "Message Memory Storage ID", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Storage Type", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Memory Index", "format" : "guint32" } ] }, { "name" : "Message Mode", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageMode" }, { "name" : "SMS on IMS", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Raw Message Data", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Message Tag", "format" : "guint8", "public-format" : "QmiWmsMessageTagType" }, { "name" : "Format", "format" : "guint8", "public-format" : "QmiWmsMessageFormat" }, { "name" : "Raw Data", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "format" : "guint8" }, "personal-info" : "true" } ], "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Modify Tag", "type" : "Message", "service" : "WMS", "id" : "0x0023", "since" : "1.0", "input" : [ { "name" : "Message Tag", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Storage Type", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Memory Index", "format" : "guint32" }, { "name" : "Message Tag", "format" : "guint8", "public-format" : "QmiWmsMessageTagType" } ] }, { "name" : "Message Mode", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Delete", "type" : "Message", "service" : "WMS", "id" : "0x0024", "since" : "1.0", "input" : [ { "name" : "Memory Storage", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Memory Index", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint32" }, { "name" : "Message Tag", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageTagType" }, { "name" : "Message Mode", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageMode" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Message Protocol", "type" : "Message", "service" : "WMS", "id" : "0x0030", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Message Protocol", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageProtocol", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "List Messages", "type" : "Message", "service" : "WMS", "id" : "0x0031", "since" : "1.0", "input" : [ { "name" : "Storage Type", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Message Tag", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageTagType" }, { "name" : "Message Mode", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageMode" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Message List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint32" , "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Memory Index", "format" : "guint32" }, { "name" : "Message Tag", "format" : "guint8", "public-format" : "QmiWmsMessageTagType" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Set Routes", "type" : "Message", "service" : "WMS", "id" : "0x0032", "since" : "1.0", "input" : [ { "name" : "Route List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Message Type", "format" : "guint8", "public-format" : "QmiWmsMessageType" }, { "name" : "Message Class", "format" : "guint8", "public-format" : "QmiWmsMessageClass" }, { "name" : "Storage", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Receipt Action", "format" : "guint8", "public-format" : "QmiWmsReceiptAction" } ] } }, { "name" : "Transfer Status Report", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsTransferIndication" } ], "output" : [ { "common-ref" : "Operation Result" } ] }, // ********************************************************************************* { "name" : "Get Routes", "type" : "Message", "service" : "WMS", "id" : "0x0033", "since" : "1.0", "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Route List", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "array", "size-prefix-format" : "guint16", "array-element" : { "name" : "Element", "format" : "struct", "contents" : [ { "name" : "Message Type", "format" : "guint8", "public-format" : "QmiWmsMessageType" }, { "name" : "Message Class", "format" : "guint8", "public-format" : "QmiWmsMessageClass" }, { "name" : "Storage", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Receipt Action", "format" : "guint8", "public-format" : "QmiWmsReceiptAction" } ] }, "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "Transfer Status Report", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsTransferIndication", "prerequisites" : [ { "common-ref" : "Success" } ] } ] }, // ********************************************************************************* { "name" : "Send Ack", "type" : "Message", "service" : "WMS", "id" : "0x0037", "since" : "1.28", "input" : [ { "name" : "Information", "id" : "0x01", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Transaction ID", "format" : "guint32" }, { "name" : "Message Protocol", "format" : "guint8", "public-format" : "QmiWmsMessageProtocol" }, { "name" : "Success", "format" : "guint8", "public-format" : "gboolean" } ] }, { "name" : "3GPP2 Failure Information", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "Error Class", "format" : "guint8", "public-format" : "QmiWmsCdmaErrorClass" }, { "name" : "Cause Code", "format" : "guint8", "public-format" : "QmiWmsCdmaCauseCode" } ] }, { "name" : "3GPP Failure Information", "id" : "0x11", "type" : "TLV", "since" : "1.28", "format" : "sequence", "contents" : [ { "name" : "RP Cause", "format" : "guint8", "public-format" : "QmiWmsGsmUmtsRpCause" }, { "name" : "TP Cause", "format" : "guint8", "public-format" : "QmiWmsGsmUmtsTpCause" } ] }, { "name" : "SMS on IMS", "id" : "0x12", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Failure Cause", "id" : "0x10", "type" : "TLV", "since" : "1.28", "format" : "guint8", "public-format" : "QmiWmsAckFailureCause", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_ACK_NOT_SENT" } ] } ] }, // ********************************************************************************* { "name" : "Send From Memory Storage", "type" : "Message", "service" : "WMS", "id" : "0x0042", "since" : "1.0", "input" : [ { "name" : "Information", "id" : "0x01", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "Storage Type", "format" : "guint8", "public-format" : "QmiWmsStorageType" }, { "name" : "Memory Index", "format" : "guint32" }, { "name" : "Message Mode", "format" : "guint8", "public-format" : "QmiWmsMessageMode" } ] }, { "name" : "SMS on IMS", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "gboolean" } ], "output" : [ { "common-ref" : "Operation Result" }, { "name" : "Message ID", "id" : "0x10", "type" : "TLV", "since" : "1.0", "format" : "guint16", "prerequisites" : [ { "common-ref" : "Success" } ] }, { "name" : "CDMA Cause Code", "id" : "0x11", "type" : "TLV", "since" : "1.0", "format" : "guint16", "public-format" : "QmiWmsCdmaCauseCode", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] }, { "name" : "CDMA Error Class", "id" : "0x12", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsCdmaErrorClass", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] }, { "name" : "GSM WCDMA Cause Info", "id" : "0x13", "type" : "TLV", "since" : "1.0", "format" : "sequence", "contents" : [ { "name" : "RP Cause", "format" : "guint16", "public-format" : "QmiWmsGsmUmtsRpCause" }, { "name" : "TP Cause", "format" : "guint8", "public-format" : "QmiWmsGsmUmtsTpCause" } ], "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] }, { "name" : "Message Delivery Failure Type", "id" : "0x14", "type" : "TLV", "since" : "1.0", "format" : "guint8", "public-format" : "QmiWmsMessageDeliveryFailureType", "prerequisites" : [ { "field" : "Result Error Status", "operation" : "!=", "value" : "QMI_STATUS_SUCCESS" }, { "field" : "Result Error Code", "operation" : "==", "value" : "QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE" } ] } ] }, // ********************************************************************************* { "name" : "SMSC Address", "type" : "Indication", "service" : "WMS", "id" : "0x0046", "since" : "1.14", "output" : [ { "name" : "Address", "id" : "0x01", "type" : "TLV", "since" : "1.14", "format" : "sequence", "contents" : [ { "name" : "Type", "format" : "string", "fixed-size" : "3" }, { "name" : "Digits", "format" : "string", "size-prefix-format" : "guint8" } ] } ] } ] libqmi-1.35.2-dev/docs/000077500000000000000000000000001455567757300146135ustar00rootroot00000000000000libqmi-1.35.2-dev/docs/libqmi-icon.svg000066400000000000000000000145501455567757300175440ustar00rootroot00000000000000 image/svg+xml libqmi-1.35.2-dev/docs/libqmi-logo.png000066400000000000000000000124511455567757300175370ustar00rootroot00000000000000PNG  IHDRFbKGD pHYs  tIME  =iTXtCommentCreated with GIMPd.eIDATxypTƟNw'B'd' !Y (*"(Z:Dj 8zt[\ VŵABAb@eK!}>ǚ>sNtU 9sN$ x8^PPPPPPPPPPPPPPhʝ]k9QcBhhPF@M#B#.>zJ8MkD} $(?kB(B(B(B(Ba?NvUo^X0h}sXn-6돥f3'B$BZZF47Mju@@0lxZ=NN,X,bѱOBp5UU@y>Ǯ.^,z=0|X|}(РI8F-'`ӺK8؝bKkU["$DO4(^)5/Npc 'E_5hjSDFw?0s(׭Ho[x@ixKPO$јn7~ 1 (nDd$I!h@N'L3 &vMDn X|/6vCBmiz>Da!2ڟ2'f >7NDZ2y aHb2F"¥DKիf=HHP V;_@@a.+55o=Bg٥tu{w, ()ϡjibHH` hl4ήFdUcjx A3K-@ాk_!^oB!5wwѩS/#;R_T/ GaӉYD j.^FoB!A\~ڀrx造B1EH\q0ߺ% .NQ: 7g`6I? _]Q_YJ6l\2P^a s/C@eE[A'$fhnfCiRt:loKob@Ia+| oA8EE" 3$Bt PR =|F$>tmoouA46@5WK}=pJpgz!% c l\|J댊E[pU%p C0׏DDJS_QΟ*Z[ dlOCF:G6Tk'~SA-"Bm u꟒^zaƧ+}/%-"䨫yS'i ݫeTWrhs̐GvKvuf& u0~!rIN \qЎJ8w ݯqg{ωoGr>Zr d&:NMIzr]Fhh>>"} ,[" ӗ_ǿgx뀉ę‡BDd6aB:ir`_*je$K{^/s.B_zxc=0g9i$%*;F]P.Gb["' G,:zUGZP}`衣j7@y/i{ȕn. LbyV^/ GUrҞJByD!d`񫀷j-+!I 1QCFIbվs_J(S9rLb]0@/Ƣ`.K €ˤ{P hMt`"ـ_l ,lou"G!xj;Oն6I7x~5Zy}~(Q)TV?'B--l+?~[_ oT"^O;N>sPQT!Tn"v@ 9vU/u8"i#4K$"vSQybf,>BzX9Ϩ (Tٯ`2ɛ6$"moR|}?,Ixk[bȣYL|#LK[x^NLFжPU\ /F`}A-A=]CD#LJF'}̼/0 X6Ȫ4i/2%"t&L{@ӈ   &vKc˖-7oLhx{{#88cǎ?>Nۅ a̝;qqqlF||<222~z=zOY1u;~GJJ0a۵ի1}t$$$d2b`ܸq?>+t)q~ʕ+Df ==< +;X@r!%56)֒&''K͛7ʕ+7-K/$]tI>}ZzG%NjۥBuɊ#++K˓/_.Y,UJMMoknndl6>..Nt=tjс;v``drm6}[rsrrh" nOff&j53gw={paM_|ӧOǾ}zACC^|Ea͚5vʕ+e3dҥqPqf644^s<[[[pB!Ms,k/q^())֭[Fpw, ̙L"<<ũS{n޽Js/.[ ?0p[ ƬY#-- AAAhmmEUUrss~?~Vթߢ둞3f 99#F`SyfCZZ燜l޼W\O?o βzGĉRttꫯJ$ISNTTtȑd9K bcc/33Sڵk&}uu}II[:44p]wa0+ԍܶmrrrStN0D}V+VO? ֡xΦ ?:Պ˕!_cǎSOKaxZqqq?-5f0DXt) U~Iؑ//^<(?88N7dł(!#--M6SNb4apxz=aL2E1niԮ:֑D3l0^4 aѡqNNF@! EQCMEcȑ#9tlN!jcޮ?W =ZJٳ-Bp=~̊ \шO>D1Oh͚5N bsy$W;.]œ9s^x̘1O>"^… QPPW^yy^gΜs=ZFջI.*P{$pӰ۷oǮ]pYd2!44'NDFF}Y:FܹGNNՅ %%gٳ8QPP!::xG`lڴ 7nGrr2Μ9ۓ Xv-Џ퉹FPPPPPPPPPPPSG R-[&;d2PCll,bccy!hB!B!B!2Ԝe^d]!".|;JhB!B!>Q['iE%}~>n BhB!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!B!q?CBxDIENDB`libqmi-1.35.2-dev/docs/libqmi-logo.svg000066400000000000000000000167311455567757300175570ustar00rootroot00000000000000 image/svg+xml libqmi libqmi-1.35.2-dev/docs/man/000077500000000000000000000000001455567757300153665ustar00rootroot00000000000000libqmi-1.35.2-dev/docs/man/meson.build000066400000000000000000000013261455567757300175320ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez help2man = find_program('help2man') mans = [ ['qmicli', [help2man, '--output=@OUTPUT@', '--name=Control QMI devices', '--help-option="--help-all"', qmicli]], ['qmi-network', [help2man, '--output=@OUTPUT@', '--name=Simple network management of QMI devices', qmi_network]], ] if enable_firmware_update mans += [['qmi-firmware-update', [help2man, '--output=@OUTPUT@', '--name=Update firmware in QMI devices', qmi_firmware_update]]] endif foreach man: mans custom_target( man[0], output: man[0] + '.1', command: man[1], install: true, install_dir: qmi_mandir / 'man1', ) endforeach libqmi-1.35.2-dev/docs/reference/000077500000000000000000000000001455567757300165515ustar00rootroot00000000000000libqmi-1.35.2-dev/docs/reference/libqmi-glib/000077500000000000000000000000001455567757300207415ustar00rootroot00000000000000libqmi-1.35.2-dev/docs/reference/libqmi-glib/libqmi-glib-common.sections000066400000000000000000001563371455567757300262070ustar00rootroot00000000000000
qmi-version Version and feature checks QMI_MAJOR_VERSION QMI_MINOR_VERSION QMI_MICRO_VERSION QMI_CHECK_VERSION QMI_MBIM_QMUX_SUPPORTED QMI_QRTR_SUPPORTED QMI_RMNET_SUPPORTED HAVE_QMI_MESSAGE_NAS_ABORT HAVE_QMI_MESSAGE_WDS_ABORT HAVE_QMI_SERVICE_ATR HAVE_QMI_SERVICE_DMS HAVE_QMI_SERVICE_DSD HAVE_QMI_SERVICE_SAR HAVE_QMI_SERVICE_GAS HAVE_QMI_SERVICE_GMS HAVE_QMI_SERVICE_LOC HAVE_QMI_SERVICE_NAS HAVE_QMI_SERVICE_OMA HAVE_QMI_SERVICE_PBM HAVE_QMI_SERVICE_PDC HAVE_QMI_SERVICE_PDS HAVE_QMI_SERVICE_QOS HAVE_QMI_SERVICE_UIM HAVE_QMI_SERVICE_VOICE HAVE_QMI_SERVICE_WDA HAVE_QMI_SERVICE_WDS HAVE_QMI_SERVICE_WMS HAVE_QMI_SERVICE_DPM HAVE_QMI_SERVICE_FOX HAVE_QMI_SERVICE_IMSP HAVE_QMI_SERVICE_IMSA HAVE_QMI_SERVICE_IMS HAVE_QMI_SERVICE_SSC
qmi-client QmiClient QMI_CID_NONE QMI_CID_BROADCAST QMI_CLIENT_DEVICE QMI_CLIENT_SERVICE QMI_CLIENT_CID QMI_CLIENT_VERSION_MAJOR QMI_CLIENT_VERSION_MINOR QMI_CLIENT_VALID QmiClient qmi_client_get_device qmi_client_peek_device qmi_client_get_service qmi_client_get_cid qmi_client_is_valid qmi_client_get_version qmi_client_check_version qmi_client_get_next_transaction_id qmi_client_process_indication QmiClientClass QMI_CLIENT QMI_CLIENT_CLASS QMI_CLIENT_GET_CLASS QMI_IS_CLIENT QMI_IS_CLIENT_CLASS QMI_TYPE_CLIENT QmiClientPrivate qmi_client_get_type
qmi-device QmiDevice QMI_DEVICE_FILE QMI_DEVICE_NO_FILE_CHECK QMI_DEVICE_PROXY_PATH QMI_DEVICE_WWAN_IFACE QMI_DEVICE_CONSECUTIVE_TIMEOUTS QMI_DEVICE_SIGNAL_INDICATION QMI_DEVICE_SIGNAL_REMOVED QmiDevice qmi_device_new qmi_device_new_finish qmi_device_get_file qmi_device_peek_file qmi_device_get_path qmi_device_get_path_display qmi_device_is_open qmi_device_get_consecutive_timeouts QmiDeviceOpenFlags qmi_device_open_flags_build_string_from_mask qmi_device_open qmi_device_open_finish qmi_device_close_async qmi_device_close_finish qmi_device_allocate_client qmi_device_allocate_client_finish QmiDeviceReleaseClientFlags qmi_device_release_client_flags_build_string_from_mask qmi_device_release_client qmi_device_release_client_finish qmi_device_set_instance_id qmi_device_set_instance_id_finish QmiDeviceServiceVersionInfo qmi_device_get_service_version_info qmi_device_get_service_version_info_finish qmi_device_command_full qmi_device_command_full_finish QmiDeviceCommandAbortableBuildRequestFn QmiDeviceCommandAbortableParseResponseFn qmi_device_command_abortable qmi_device_command_abortable_finish QMI_DEVICE_MUX_ID_AUTOMATIC QMI_DEVICE_MUX_ID_UNBOUND QMI_DEVICE_MUX_ID_MIN QMI_DEVICE_MUX_ID_MAX qmi_device_list_links qmi_device_add_link qmi_device_add_link_finish QmiDeviceAddLinkFlags qmi_device_add_link_flags_build_string_from_mask qmi_device_add_link_with_flags qmi_device_add_link_with_flags_finish qmi_device_delete_link qmi_device_delete_link_finish qmi_device_delete_all_links qmi_device_delete_all_links_finish qmi_device_check_link_supported qmi_device_get_wwan_iface QmiDeviceExpectedDataFormat qmi_device_expected_data_format_get_string qmi_device_get_expected_data_format qmi_device_set_expected_data_format qmi_device_check_expected_data_format_supported QMI_DEVICE_NODE qmi_device_new_from_node qmi_device_new_from_node_finish qmi_device_get_node qmi_device_peek_node QmiDeviceClass QMI_DEVICE QMI_DEVICE_CLASS QMI_DEVICE_GET_CLASS QMI_IS_DEVICE QMI_IS_DEVICE_CLASS QMI_TYPE_DEVICE QMI_TYPE_DEVICE_OPEN_FLAGS QMI_TYPE_DEVICE_RELEASE_CLIENT_FLAGS QMI_TYPE_DEVICE_EXPECTED_DATA_FORMAT QMI_TYPE_DEVICE_ADD_LINK_FLAGS QmiDevicePrivate qmi_device_get_type qmi_device_open_flags_get_type qmi_device_release_client_flags_get_type qmi_device_expected_data_format_get_type qmi_device_add_link_flags_get_type
qmi-proxy QmiProxy QMI_PROXY_SOCKET_PATH QMI_PROXY_N_CLIENTS QmiProxy qmi_proxy_new qmi_proxy_get_n_clients QmiProxyClass QMI_PROXY QMI_PROXY_CLASS QMI_PROXY_GET_CLASS QMI_IS_PROXY QMI_IS_PROXY_CLASS QMI_TYPE_PROXY QmiProxyPrivate qmi_proxy_get_type
qmi-enums Common enumerations and flags QmiService QmiEndian QmiDataEndpointType QmiSioPort qmi_service_get_string qmi_endian_get_string qmi_data_endpoint_type_get_string qmi_sio_port_get_string QMI_TYPE_SERVICE QMI_TYPE_ENDIAN QMI_TYPE_DATA_ENDPOINT_TYPE QMI_TYPE_SIO_PORT qmi_service_get_type qmi_endian_get_type qmi_data_endpoint_type_get_type qmi_sio_port_get_type
qmi-enums-dms DMS enumerations and flags QmiDmsDataServiceCapability QmiDmsSimCapability QmiDmsBandCapability QmiDmsLteBandCapability QmiDmsRadioInterface QmiDmsPowerState QmiDmsUimPinId QmiDmsUimPinStatus QmiDmsOperatingMode QmiDmsOfflineReason QmiDmsTimeSource QmiDmsActivationState QmiDmsUimFacility QmiDmsUimFacilityState QmiDmsUimState QmiDmsTimeReferenceType QmiDmsFirmwareImageType QmiDmsBootImageDownloadMode QmiDmsMacType QmiDmsHpDeviceMode QmiDmsSwiUsbComposition QmiDmsFoxconnDeviceMode QmiDmsFoxconnFirmwareVersionType qmi_dms_data_service_capability_get_string qmi_dms_sim_capability_get_string qmi_dms_band_capability_build_string_from_mask qmi_dms_lte_band_capability_build_string_from_mask qmi_dms_radio_interface_get_string qmi_dms_power_state_build_string_from_mask qmi_dms_uim_pin_id_get_string qmi_dms_uim_pin_status_get_string qmi_dms_operating_mode_get_string qmi_dms_offline_reason_build_string_from_mask qmi_dms_time_source_get_string qmi_dms_activation_state_get_string qmi_dms_uim_facility_get_string qmi_dms_uim_facility_state_get_string qmi_dms_uim_state_get_string qmi_dms_time_reference_type_get_string qmi_dms_firmware_image_type_get_string qmi_dms_boot_image_download_mode_get_string qmi_dms_mac_type_get_string qmi_dms_hp_device_mode_get_string qmi_dms_swi_usb_composition_get_string qmi_dms_swi_usb_composition_get_description qmi_dms_foxconn_device_mode_get_string qmi_dms_foxconn_firmware_version_type_get_string QMI_TYPE_DMS_ACTIVATION_STATE QMI_TYPE_DMS_BOOT_IMAGE_DOWNLOAD_MODE QMI_TYPE_DMS_DATA_SERVICE_CAPABILITY QMI_TYPE_DMS_FIRMWARE_IMAGE_TYPE QMI_TYPE_DMS_OFFLINE_REASON QMI_TYPE_DMS_OPERATING_MODE QMI_TYPE_DMS_POWER_STATE QMI_TYPE_DMS_RADIO_INTERFACE QMI_TYPE_DMS_SIM_CAPABILITY QMI_TYPE_DMS_TIME_REFERENCE_TYPE QMI_TYPE_DMS_TIME_SOURCE QMI_TYPE_DMS_UIM_FACILITY QMI_TYPE_DMS_UIM_FACILITY_STATE QMI_TYPE_DMS_UIM_PIN_ID QMI_TYPE_DMS_UIM_PIN_STATUS QMI_TYPE_DMS_UIM_STATE QMI_TYPE_DMS_MAC_TYPE QMI_TYPE_DMS_HP_DEVICE_MODE QMI_TYPE_DMS_SWI_USB_COMPOSITION QMI_TYPE_DMS_FOXCONN_DEVICE_MODE QMI_TYPE_DMS_FOXCONN_FIRMWARE_VERSION_TYPE qmi_dms_activation_state_get_type qmi_dms_boot_image_download_mode_get_type qmi_dms_data_service_capability_get_type qmi_dms_firmware_image_type_get_type qmi_dms_offline_reason_get_type qmi_dms_operating_mode_get_type qmi_dms_power_state_get_type qmi_dms_radio_interface_get_type qmi_dms_sim_capability_get_type qmi_dms_time_reference_type_get_type qmi_dms_time_source_get_type qmi_dms_uim_facility_get_type qmi_dms_uim_facility_state_get_type qmi_dms_uim_pin_id_get_type qmi_dms_uim_pin_status_get_type qmi_dms_uim_state_get_type qmi_dms_mac_type_get_type qmi_dms_hp_device_mode_get_type qmi_dms_swi_usb_composition_get_type qmi_dms_foxconn_device_mode_get_type qmi_dms_foxconn_firmware_version_type_get_type
qmi-enums-nas NAS enumerations and flags QmiNasRadioInterface QmiNasActiveBand QmiNasNetworkServiceDomain QmiNasEvdoSinrLevel QmiNasSignalStrengthRequest QmiNasNetworkScanType QmiNasNetworkStatus QmiNasNetworkRegisterType QmiNasRegistrationState QmiNasAttachState QmiNasNetworkType QmiNasRoamingIndicatorStatus QmiNasDataCapability QmiNasServiceStatus QmiNasHdrPersonality QmiNasCallBarringStatus QmiNasNetworkDescriptionDisplay QmiNasNetworkDescriptionEncoding QmiNasPlmnAccessTechnologyIdentifier QmiNasRadioTechnologyPreference QmiNasPreferenceDuration QmiNasPsAttachAction QmiNasRatModePreference QmiNasCdmaPrlPreference QmiNasRoamingPreference QmiNasNetworkSelectionPreference QmiNasChangeDuration QmiNasServiceDomainPreference QmiNasGsmWcdmaAcquisitionOrderPreference QmiNasBandPreference QmiNasLteBandPreference QmiNasTdScdmaBandPreference QmiNasRoamingStatus QmiNasHdrProtocolRevision QmiNasWcdmaHsService QmiNasCellBroadcastCapability QmiNasSimRejectState QmiNasCdmaPilotType QmiNasDayOfWeek QmiNasDaylightSavingsAdjustment QmiNasWcdmaRrcState QmiNasDLBandwidth QmiNasScellState QmiNasNetworkNameDisplayCondition QmiNasNetworkNameSource QmiNasPlmnEncodingScheme QmiNasPlmnNameCountryInitials QmiNasPlmnNameSpareBits QmiNasUsagePreference QmiNasLteCellAccessStatus QmiNasNetworkSelectionRegistrationRestriction QmiNasLteRegistrationDomain QmiNasVoiceDomainPreference QmiNasNetworkScanResult QmiNasSwiEmmConnectionState QmiNasSwiEmmState QmiNasSwiImsRegState QmiNasSwiModemMode QmiNasSwiPsState QmiNasSwiSystemMode QmiNasDrx QmiNasBoolean QmiNasPlmnLanguageId QmiNasLteVoiceDomain QmiNasRejectCause qmi_nas_radio_interface_get_string qmi_nas_active_band_get_string qmi_nas_network_service_domain_get_string qmi_nas_evdo_sinr_level_get_string qmi_nas_signal_strength_request_build_string_from_mask qmi_nas_network_scan_type_build_string_from_mask qmi_nas_network_status_build_string_from_mask qmi_nas_network_register_type_get_string qmi_nas_registration_state_get_string qmi_nas_attach_state_get_string qmi_nas_network_type_get_string qmi_nas_roaming_indicator_status_get_string qmi_nas_data_capability_get_string qmi_nas_service_status_get_string qmi_nas_hdr_personality_get_string qmi_nas_call_barring_status_get_string qmi_nas_network_description_display_get_string qmi_nas_network_description_encoding_get_string qmi_nas_read_string_from_network_description_encoded_array qmi_nas_plmn_access_technology_identifier_build_string_from_mask qmi_nas_radio_technology_preference_build_string_from_mask qmi_nas_preference_duration_get_string qmi_nas_ps_attach_action_get_string qmi_nas_rat_mode_preference_build_string_from_mask qmi_nas_cdma_prl_preference_get_string qmi_nas_roaming_preference_get_string qmi_nas_network_selection_preference_get_string qmi_nas_change_duration_get_string qmi_nas_service_domain_preference_get_string qmi_nas_gsm_wcdma_acquisition_order_preference_get_string qmi_nas_band_preference_build_string_from_mask qmi_nas_lte_band_preference_build_string_from_mask qmi_nas_td_scdma_band_preference_build_string_from_mask qmi_nas_roaming_status_get_string qmi_nas_hdr_protocol_revision_get_string qmi_nas_wcdma_hs_service_get_string qmi_nas_cell_broadcast_capability_get_string qmi_nas_sim_reject_state_get_string qmi_nas_cdma_pilot_type_get_string qmi_nas_day_of_week_get_string qmi_nas_daylight_savings_adjustment_get_string qmi_nas_wcdma_rrc_state_get_string qmi_nas_dl_bandwidth_get_string qmi_nas_scell_state_get_string qmi_nas_network_name_display_condition_build_string_from_mask qmi_nas_network_name_source_get_string qmi_nas_plmn_encoding_scheme_get_string qmi_nas_read_string_from_plmn_encoded_array qmi_nas_plmn_name_country_initials_get_string qmi_nas_plmn_name_spare_bits_get_string qmi_nas_usage_preference_get_string qmi_nas_lte_cell_access_status_get_string qmi_nas_network_selection_registration_restriction_get_string qmi_nas_lte_registration_domain_get_string qmi_nas_voice_domain_preference_get_string qmi_nas_network_scan_result_get_string qmi_nas_swi_emm_connection_state_get_string qmi_nas_swi_emm_state_get_string qmi_nas_swi_ims_reg_state_get_string qmi_nas_swi_modem_mode_get_string qmi_nas_swi_ps_state_get_string qmi_nas_swi_system_mode_get_string qmi_nas_drx_get_string qmi_nas_boolean_get_string qmi_nas_plmn_language_id_get_string qmi_nas_lte_voice_domain_get_string qmi_nas_reject_cause_get_string QMI_TYPE_NAS_ACTIVE_BAND QMI_TYPE_NAS_ATTACH_STATE QMI_TYPE_NAS_CALL_BARRING_STATUS QMI_TYPE_NAS_CDMA_PRL_PREFERENCE QMI_TYPE_NAS_CELL_BROADCAST_CAPABILITY QMI_TYPE_NAS_CHANGE_DURATION QMI_TYPE_NAS_DATA_CAPABILITY QMI_TYPE_NAS_EVDO_SINR_LEVEL QMI_TYPE_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE QMI_TYPE_NAS_HDR_PERSONALITY QMI_TYPE_NAS_HDR_PROTOCOL_REVISION QMI_TYPE_NAS_NETWORK_DESCRIPTION_DISPLAY QMI_TYPE_NAS_NETWORK_DESCRIPTION_ENCODING QMI_TYPE_NAS_NETWORK_REGISTER_TYPE QMI_TYPE_NAS_NETWORK_SCAN_TYPE QMI_TYPE_NAS_NETWORK_SELECTION_PREFERENCE QMI_TYPE_NAS_NETWORK_SERVICE_DOMAIN QMI_TYPE_NAS_NETWORK_STATUS QMI_TYPE_NAS_NETWORK_TYPE QMI_TYPE_NAS_PREFERENCE_DURATION QMI_TYPE_NAS_PS_ATTACH_ACTION QMI_TYPE_NAS_RADIO_INTERFACE QMI_TYPE_NAS_RADIO_TECHNOLOGY_PREFERENCE QMI_TYPE_NAS_RAT_MODE_PREFERENCE QMI_TYPE_NAS_REGISTRATION_STATE QMI_TYPE_NAS_ROAMING_INDICATOR_STATUS QMI_TYPE_NAS_ROAMING_PREFERENCE QMI_TYPE_NAS_ROAMING_STATUS QMI_TYPE_NAS_SERVICE_DOMAIN_PREFERENCE QMI_TYPE_NAS_SERVICE_STATUS QMI_TYPE_NAS_SIGNAL_STRENGTH_REQUEST QMI_TYPE_NAS_SIM_REJECT_STATE QMI_TYPE_NAS_TD_SCDMA_BAND_PREFERENCE QMI_TYPE_NAS_WCDMA_HS_SERVICE QMI_TYPE_NAS_CDMA_PILOT_TYPE QMI_TYPE_NAS_DAY_OF_WEEK QMI_TYPE_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT QMI_TYPE_NAS_WCDMA_RRC_STATE QMI_TYPE_NAS_DL_BANDWIDTH QMI_TYPE_NAS_SCELL_STATE QMI_TYPE_NAS_NETWORK_NAME_DISPLAY_CONDITION QMI_TYPE_NAS_NETWORK_NAME_SOURCE QMI_TYPE_NAS_PLMN_ENCODING_SCHEME QMI_TYPE_NAS_PLMN_NAME_COUNTRY_INITIALS QMI_TYPE_NAS_PLMN_NAME_SPARE_BITS QMI_TYPE_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER QMI_TYPE_NAS_USAGE_PREFERENCE QMI_TYPE_NAS_LTE_CELL_ACCESS_STATUS QMI_TYPE_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION QMI_TYPE_NAS_LTE_REGISTRATION_DOMAIN QMI_TYPE_NAS_VOICE_DOMAIN_PREFERENCE QMI_TYPE_NAS_NETWORK_SCAN_RESULT QMI_TYPE_NAS_SWI_EMM_CONNECTION_STATE QMI_TYPE_NAS_SWI_EMM_STATE QMI_TYPE_NAS_SWI_IMS_REG_STATE QMI_TYPE_NAS_SWI_MODEM_MODE QMI_TYPE_NAS_SWI_PS_STATE QMI_TYPE_NAS_SWI_SYSTEM_MODE QMI_TYPE_NAS_DRX QMI_TYPE_NAS_BOOLEAN QMI_TYPE_NAS_PLMN_LANGUAGE_ID QMI_TYPE_NAS_LTE_VOICE_DOMAIN QMI_TYPE_NAS_REJECT_CAUSE qmi_nas_active_band_get_type qmi_nas_attach_state_get_type qmi_nas_call_barring_status_get_type qmi_nas_cdma_prl_preference_get_type qmi_nas_cell_broadcast_capability_get_type qmi_nas_change_duration_get_type qmi_nas_data_capability_get_type qmi_nas_evdo_sinr_level_get_type qmi_nas_gsm_wcdma_acquisition_order_preference_get_type qmi_nas_hdr_personality_get_type qmi_nas_hdr_protocol_revision_get_type qmi_nas_network_description_display_get_type qmi_nas_network_description_encoding_get_type qmi_nas_network_register_type_get_type qmi_nas_network_scan_type_get_type qmi_nas_network_selection_preference_get_type qmi_nas_network_service_domain_get_type qmi_nas_network_status_get_type qmi_nas_network_type_get_type qmi_nas_preference_duration_get_type qmi_nas_ps_attach_action_get_type qmi_nas_radio_interface_get_type qmi_nas_radio_technology_preference_get_type qmi_nas_rat_mode_preference_get_type qmi_nas_registration_state_get_type qmi_nas_roaming_indicator_status_get_type qmi_nas_roaming_preference_get_type qmi_nas_roaming_status_get_type qmi_nas_service_domain_preference_get_type qmi_nas_service_status_get_type qmi_nas_signal_strength_request_get_type qmi_nas_sim_reject_state_get_type qmi_nas_td_scdma_band_preference_get_type qmi_nas_wcdma_hs_service_get_type qmi_nas_cdma_pilot_type_get_type qmi_nas_day_of_week_get_type qmi_nas_daylight_savings_adjustment_get_type qmi_nas_wcdma_rrc_state_get_type qmi_nas_dl_bandwidth_get_type qmi_nas_scell_state_get_type qmi_nas_network_name_display_condition_get_type qmi_nas_network_name_source_get_type qmi_nas_plmn_encoding_scheme_get_type qmi_nas_plmn_name_country_initials_get_type qmi_nas_plmn_name_spare_bits_get_type qmi_nas_plmn_access_technology_identifier_get_type qmi_nas_usage_preference_get_type qmi_nas_lte_cell_access_status_get_type qmi_nas_network_selection_registration_restriction_get_type qmi_nas_lte_registration_domain_get_type qmi_nas_voice_domain_preference_get_type qmi_nas_network_scan_result_get_type qmi_nas_swi_emm_connection_state_get_type qmi_nas_swi_emm_state_get_type qmi_nas_swi_ims_reg_state_get_type qmi_nas_swi_modem_mode_get_type qmi_nas_swi_ps_state_get_type qmi_nas_swi_system_mode_get_type qmi_nas_drx_get_type qmi_nas_boolean_get_type qmi_nas_plmn_language_id_get_type qmi_nas_lte_voice_domain_get_type qmi_nas_reject_cause_get_type
qmi-enums-wds WDS enumerations and flags QmiWdsIpFamily QmiWdsProfileFamily QmiWdsTechnologyPreference QmiWdsExtendedTechnologyPreference QmiWdsCallType QmiWdsCallEndReason QmiWdsVerboseCallEndReasonType QmiWdsVerboseCallEndReasonMip QmiWdsVerboseCallEndReasonInternal QmiWdsVerboseCallEndReasonCm QmiWdsVerboseCallEndReason3gpp QmiWdsVerboseCallEndReasonPpp QmiWdsVerboseCallEndReasonEhrpd QmiWdsVerboseCallEndReasonIpv6 QmiWdsConnectionStatus QmiWdsDataBearerTechnology QmiWdsNetworkType QmiWdsDataSystemNetworkType QmiWdsRat3gpp2 QmiWdsRat3gpp QmiWdsSoCdma1x QmiWdsSoEvdoRevA QmiWdsRequestedSettings QmiWdsPdpType QmiWdsPdpHeaderCompressionType QmiWdsPdpDataCompressionType QmiWdsQosClassIdentifier QmiWdsTrafficClass QmiWdsAuthentication QmiWdsProfileType QmiWdsDeliveryOrder QmiWdsSduErrorRatio QmiWdsSduResidualBitErrorRatio QmiWdsSduErroneousDelivery QmiWdsPacketStatisticsMaskFlag QmiWdsDsProfileError QmiWdsAutoconnectSetting QmiWdsAutoconnectSettingRoaming QmiWdsDataCallStatus QmiWdsDataCallType QmiWdsDataSystem QmiWdsDormancyStatus QmiWdsExtendedDataBearerTechnology3gpp QmiWdsExtendedDataBearerTechnology3gpp2 QmiWdsRadioAccessTechnology QmiWdsSetEventReportTransferStatistics QmiWdsSoEvdoRev0 QmiWdsSoEvdoRevB QmiWdsTetheredCallType QmiWdsAttachPdnListAction QmiWdsClientType QmiWdsIpSupportType QmiWdsApnTypeMask QmiWdsProfileChangeEvent QMI_WDS_RATE_UNAVAILABLE qmi_wds_ip_family_get_string qmi_wds_profile_family_get_string qmi_wds_technology_preference_build_string_from_mask qmi_wds_extended_technology_preference_get_string qmi_wds_call_type_get_string qmi_wds_call_end_reason_get_string qmi_wds_verbose_call_end_reason_get_string qmi_wds_verbose_call_end_reason_type_get_string qmi_wds_verbose_call_end_reason_mip_get_string qmi_wds_verbose_call_end_reason_internal_get_string qmi_wds_verbose_call_end_reason_cm_get_string qmi_wds_verbose_call_end_reason_3gpp_get_string qmi_wds_verbose_call_end_reason_ppp_get_string qmi_wds_verbose_call_end_reason_ehrpd_get_string qmi_wds_verbose_call_end_reason_ipv6_get_string qmi_wds_connection_status_get_string qmi_wds_data_bearer_technology_get_string qmi_wds_network_type_get_string qmi_wds_data_system_network_type_get_string qmi_wds_rat_3gpp2_build_string_from_mask qmi_wds_rat_3gpp_build_string_from_mask qmi_wds_so_cdma1x_build_string_from_mask qmi_wds_so_evdo_reva_build_string_from_mask qmi_wds_requested_settings_build_string_from_mask qmi_wds_pdp_type_get_string qmi_wds_pdp_header_compression_type_get_string qmi_wds_pdp_data_compression_type_get_string qmi_wds_qos_class_identifier_get_string qmi_wds_traffic_class_get_string qmi_wds_authentication_build_string_from_mask qmi_wds_profile_type_get_string qmi_wds_delivery_order_get_string qmi_wds_sdu_error_ratio_get_string qmi_wds_sdu_residual_bit_error_ratio_get_string qmi_wds_sdu_erroneous_delivery_get_string qmi_wds_packet_statistics_mask_flag_build_string_from_mask qmi_wds_ds_profile_error_get_string qmi_wds_autoconnect_setting_get_string qmi_wds_autoconnect_setting_roaming_get_string qmi_wds_data_call_status_get_string qmi_wds_data_call_type_get_string qmi_wds_data_system_get_string qmi_wds_dormancy_status_get_string qmi_wds_extended_data_bearer_technology_3gpp2_build_string_from_mask qmi_wds_extended_data_bearer_technology_3gpp_build_string_from_mask qmi_wds_radio_access_technology_get_string qmi_wds_set_event_report_transfer_statistics_build_string_from_mask qmi_wds_so_evdo_rev0_build_string_from_mask qmi_wds_so_evdo_revb_build_string_from_mask qmi_wds_tethered_call_type_get_string qmi_wds_attach_pdn_list_action_get_string qmi_wds_client_type_get_string qmi_wds_ip_support_type_get_string qmi_wds_apn_type_mask_build_string_from_mask qmi_wds_profile_change_event_get_string QMI_TYPE_WDS_AUTHENTICATION QMI_TYPE_WDS_AUTOCONNECT_SETTING QMI_TYPE_WDS_AUTOCONNECT_SETTING_ROAMING QMI_TYPE_WDS_CALL_END_REASON QMI_TYPE_WDS_CALL_TYPE QMI_TYPE_WDS_CONNECTION_STATUS QMI_TYPE_WDS_DATA_BEARER_TECHNOLOGY QMI_TYPE_WDS_EXTENDED_TECHNOLOGY_PREFERENCE QMI_TYPE_WDS_REQUESTED_SETTINGS QMI_TYPE_WDS_IP_FAMILY QMI_TYPE_WDS_PROFILE_FAMILY QMI_TYPE_WDS_NETWORK_TYPE QMI_TYPE_WDS_DATA_SYSTEM_NETWORK_TYPE QMI_TYPE_WDS_PDP_TYPE QMI_TYPE_WDS_PDP_HEADER_COMPRESSION_TYPE QMI_TYPE_WDS_PDP_DATA_COMPRESSION_TYPE QMI_TYPE_WDS_QOS_CLASS_IDENTIFIER QMI_TYPE_WDS_PROFILE_TYPE QMI_TYPE_WDS_RAT_3GPP QMI_TYPE_WDS_RAT_3GPP2 QMI_TYPE_WDS_SO_CDMA1X QMI_TYPE_WDS_SO_EVDO_REVA QMI_TYPE_WDS_TECHNOLOGY_PREFERENCE QMI_TYPE_WDS_TRAFFIC_CLASS QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_3GPP QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_CM QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_EHRPD QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_INTERNAL QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_IPV6 QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_MIP QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_PPP QMI_TYPE_WDS_VERBOSE_CALL_END_REASON_TYPE QMI_TYPE_WDS_PACKET_STATISTICS_MASK_FLAG QMI_TYPE_WDS_DS_PROFILE_ERROR QMI_TYPE_WDS_DELIVERY_ORDER QMI_TYPE_WDS_SDU_ERRONEOUS_DELIVERY QMI_TYPE_WDS_SDU_ERROR_RATIO QMI_TYPE_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO QMI_TYPE_WDS_DATA_CALL_STATUS QMI_TYPE_WDS_DATA_CALL_TYPE QMI_TYPE_WDS_DATA_SYSTEM QMI_TYPE_WDS_DORMANCY_STATUS QMI_TYPE_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP QMI_TYPE_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2 QMI_TYPE_WDS_RADIO_ACCESS_TECHNOLOGY QMI_TYPE_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS QMI_TYPE_WDS_SO_EVDO_REV0 QMI_TYPE_WDS_SO_EVDO_REVB QMI_TYPE_WDS_TETHERED_CALL_TYPE QMI_TYPE_WDS_ATTACH_PDN_LIST_ACTION QMI_TYPE_WDS_CLIENT_TYPE QMI_TYPE_WDS_IP_SUPPORT_TYPE QMI_TYPE_WDS_APN_TYPE_MASK QMI_TYPE_WDS_PROFILE_CHANGE_EVENT qmi_wds_authentication_get_type qmi_wds_autoconnect_setting_get_type qmi_wds_autoconnect_setting_roaming_get_type qmi_wds_call_end_reason_get_type qmi_wds_call_type_get_type qmi_wds_connection_status_get_type qmi_wds_data_bearer_technology_get_type qmi_wds_extended_technology_preference_get_type qmi_wds_requested_settings_get_type qmi_wds_ip_family_get_type qmi_wds_profile_family_get_type qmi_wds_network_type_get_type qmi_wds_data_system_network_type_get_type qmi_wds_pdp_type_get_type qmi_wds_pdp_header_compression_type_get_type qmi_wds_pdp_data_compression_type_get_type qmi_wds_qos_class_identifier_get_type qmi_wds_profile_type_get_type qmi_wds_rat_3gpp2_get_type qmi_wds_rat_3gpp_get_type qmi_wds_so_cdma1x_get_type qmi_wds_so_evdo_reva_get_type qmi_wds_technology_preference_get_type qmi_wds_traffic_class_get_type qmi_wds_verbose_call_end_reason_3gpp_get_type qmi_wds_verbose_call_end_reason_cm_get_type qmi_wds_verbose_call_end_reason_ehrpd_get_type qmi_wds_verbose_call_end_reason_internal_get_type qmi_wds_verbose_call_end_reason_ipv6_get_type qmi_wds_verbose_call_end_reason_mip_get_type qmi_wds_verbose_call_end_reason_ppp_get_type qmi_wds_verbose_call_end_reason_type_get_type qmi_wds_packet_statistics_mask_flag_get_type qmi_wds_ds_profile_error_get_type qmi_wds_delivery_order_get_type qmi_wds_sdu_erroneous_delivery_get_type qmi_wds_sdu_error_ratio_get_type qmi_wds_sdu_residual_bit_error_ratio_get_type qmi_wds_data_call_status_get_type qmi_wds_data_call_type_get_type qmi_wds_data_system_get_type qmi_wds_dormancy_status_get_type qmi_wds_extended_data_bearer_technology_3gpp2_get_type qmi_wds_extended_data_bearer_technology_3gpp_get_type qmi_wds_radio_access_technology_get_type qmi_wds_set_event_report_transfer_statistics_get_type qmi_wds_so_evdo_rev0_get_type qmi_wds_so_evdo_revb_get_type qmi_wds_tethered_call_type_get_type qmi_wds_attach_pdn_list_action_get_type qmi_wds_client_type_get_type qmi_wds_ip_support_type_get_type qmi_wds_apn_type_mask_get_type qmi_wds_profile_change_event_get_type
qmi-enums-wms WMS enumerations and flags QmiWmsStorageType QmiWmsAckIndicator QmiWmsMessageFormat QmiWmsMessageMode QmiWmsNotificationType QmiWmsCdmaServiceOption QmiWmsCdmaCauseCode QmiWmsCdmaErrorClass QmiWmsGsmUmtsRpCause QmiWmsGsmUmtsTpCause QmiWmsMessageDeliveryFailureType QmiWmsMessageTagType QmiWmsMessageProtocol QmiWmsMessageType QmiWmsMessageClass QmiWmsReceiptAction QmiWmsTransferIndication QmiWmsAckFailureCause qmi_wms_storage_type_get_string qmi_wms_ack_indicator_get_string qmi_wms_message_format_get_string qmi_wms_message_mode_get_string qmi_wms_notification_type_get_string qmi_wms_cdma_service_option_get_string qmi_wms_cdma_cause_code_get_string qmi_wms_cdma_error_class_get_string qmi_wms_gsm_umts_rp_cause_get_string qmi_wms_gsm_umts_tp_cause_get_string qmi_wms_message_delivery_failure_type_get_string qmi_wms_message_tag_type_get_string qmi_wms_message_protocol_get_string qmi_wms_message_type_get_string qmi_wms_message_class_get_string qmi_wms_receipt_action_get_string qmi_wms_transfer_indication_get_string qmi_wms_ack_failure_cause_get_string QMI_TYPE_WMS_ACK_INDICATOR QMI_TYPE_WMS_CDMA_CAUSE_CODE QMI_TYPE_WMS_CDMA_ERROR_CLASS QMI_TYPE_WMS_CDMA_SERVICE_OPTION QMI_TYPE_WMS_GSM_UMTS_RP_CAUSE QMI_TYPE_WMS_GSM_UMTS_TP_CAUSE QMI_TYPE_WMS_MESSAGE_CLASS QMI_TYPE_WMS_MESSAGE_DELIVERY_FAILURE_TYPE QMI_TYPE_WMS_MESSAGE_FORMAT QMI_TYPE_WMS_MESSAGE_MODE QMI_TYPE_WMS_MESSAGE_PROTOCOL QMI_TYPE_WMS_MESSAGE_TAG_TYPE QMI_TYPE_WMS_MESSAGE_TYPE QMI_TYPE_WMS_NOTIFICATION_TYPE QMI_TYPE_WMS_RECEIPT_ACTION QMI_TYPE_WMS_STORAGE_TYPE QMI_TYPE_WMS_TRANSFER_INDICATION QMI_TYPE_WMS_ACK_FAILURE_CAUSE qmi_wms_ack_indicator_get_type qmi_wms_cdma_cause_code_get_type qmi_wms_cdma_error_class_get_type qmi_wms_cdma_service_option_get_type qmi_wms_gsm_umts_rp_cause_get_type qmi_wms_gsm_umts_tp_cause_get_type qmi_wms_message_class_get_type qmi_wms_message_delivery_failure_type_get_type qmi_wms_message_format_get_type qmi_wms_message_mode_get_type qmi_wms_message_protocol_get_type qmi_wms_message_tag_type_get_type qmi_wms_message_type_get_type qmi_wms_notification_type_get_type qmi_wms_receipt_action_get_type qmi_wms_storage_type_get_type qmi_wms_transfer_indication_get_type qmi_wms_ack_failure_cause_get_type
qmi-enums-pdc PDC enumerations and flags QmiPdcConfigurationType QmiPdcRefreshEventType qmi_pdc_configuration_type_get_string qmi_pdc_refresh_event_type_get_string QMI_TYPE_PDC_CONFIGURATION_TYPE QMI_TYPE_PDC_REFRESH_EVENT_TYPE qmi_pdc_configuration_type_get_type qmi_pdc_refresh_event_type_get_type
qmi-enums-pds PDS enumerations and flags QmiPdsOperationMode QmiPdsPositionSessionStatus QmiPdsDataValid QmiPdsTrackingSessionState QmiPdsOperatingMode QmiPdsNetworkMode qmi_pds_operation_mode_get_string qmi_pds_position_session_status_get_string qmi_pds_data_valid_build_string_from_mask qmi_pds_tracking_session_state_get_string qmi_pds_operating_mode_get_string qmi_pds_network_mode_get_string QMI_TYPE_PDS_DATA_VALID QMI_TYPE_PDS_OPERATION_MODE QMI_TYPE_PDS_POSITION_SESSION_STATUS QMI_TYPE_PDS_TRACKING_SESSION_STATE QMI_TYPE_PDS_OPERATING_MODE QMI_TYPE_PDS_NETWORK_MODE qmi_pds_data_valid_get_type qmi_pds_operation_mode_get_type qmi_pds_position_session_status_get_type qmi_pds_tracking_session_state_get_type qmi_pds_operating_mode_get_type qmi_pds_network_mode_get_type
qmi-enums-pbm PBM enumerations and flags QmiPbmEventRegistrationFlag QmiPbmPhonebookType QmiPbmSessionType qmi_pbm_event_registration_flag_build_string_from_mask qmi_pbm_phonebook_type_build_string_from_mask qmi_pbm_session_type_get_string QMI_TYPE_PBM_EVENT_REGISTRATION_FLAG QMI_TYPE_PBM_PHONEBOOK_TYPE QMI_TYPE_PBM_SESSION_TYPE qmi_pbm_event_registration_flag_get_type qmi_pbm_phonebook_type_get_type qmi_pbm_session_type_get_type
qmi-enums-uim UIM enumerations and flags QmiUimEventRegistrationFlag QmiUimSessionType QmiUimFileType QmiUimSecurityAttributeLogic QmiUimSecurityAttribute QmiUimCardState QmiUimCardError QmiUimPinState QmiUimCardApplicationType QmiUimCardApplicationState QmiUimCardApplicationPersonalizationState QmiUimCardApplicationPersonalizationFeature QmiUimCardApplicationPersonalizationFeatureStatus QmiUimPinId QmiUimCardProtocol QmiUimPhysicalCardState QmiUimSlotState QmiUimRefreshMode QmiUimRefreshStage QmiUimConfiguration QmiUimDepersonalizationOperation qmi_uim_event_registration_flag_build_string_from_mask qmi_uim_session_type_get_string qmi_uim_file_type_get_string qmi_uim_security_attribute_logic_get_string qmi_uim_security_attribute_build_string_from_mask qmi_uim_card_state_get_string qmi_uim_card_error_get_string qmi_uim_pin_state_get_string qmi_uim_card_application_type_get_string qmi_uim_card_application_state_get_string qmi_uim_card_application_personalization_state_get_string qmi_uim_card_application_personalization_feature_get_string qmi_uim_card_application_personalization_feature_status_get_string qmi_uim_pin_id_get_string qmi_uim_card_protocol_get_string qmi_uim_physical_card_state_get_string qmi_uim_slot_state_get_string qmi_uim_refresh_mode_get_string qmi_uim_refresh_stage_get_string qmi_uim_configuration_build_string_from_mask qmi_uim_depersonalization_operation_get_string QMI_TYPE_UIM_EVENT_REGISTRATION_FLAG QMI_TYPE_UIM_SESSION_TYPE QMI_TYPE_UIM_FILE_TYPE QMI_TYPE_UIM_SECURITY_ATTRIBUTE_LOGIC QMI_TYPE_UIM_SECURITY_ATTRIBUTE QMI_TYPE_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS QMI_TYPE_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE QMI_TYPE_UIM_CARD_APPLICATION_PERSONALIZATION_STATE QMI_TYPE_UIM_CARD_APPLICATION_STATE QMI_TYPE_UIM_CARD_APPLICATION_TYPE QMI_TYPE_UIM_CARD_ERROR QMI_TYPE_UIM_CARD_STATE QMI_TYPE_UIM_PIN_STATE QMI_TYPE_UIM_PIN_ID QMI_TYPE_UIM_CARD_PROTOCOL QMI_TYPE_UIM_PHYSICAL_CARD_STATE QMI_TYPE_UIM_SLOT_STATE QMI_TYPE_UIM_REFRESH_MODE QMI_TYPE_UIM_REFRESH_STAGE QMI_TYPE_UIM_CONFIGURATION QMI_TYPE_UIM_DEPERSONALIZATION_OPERATION qmi_uim_event_registration_flag_get_type qmi_uim_session_type_get_type qmi_uim_file_type_get_type qmi_uim_security_attribute_logic_get_type qmi_uim_security_attribute_get_type qmi_uim_card_application_personalization_feature_status_get_type qmi_uim_card_application_personalization_feature_get_type qmi_uim_card_application_personalization_state_get_type qmi_uim_card_application_state_get_type qmi_uim_card_application_type_get_type qmi_uim_card_error_get_type qmi_uim_card_state_get_type qmi_uim_pin_state_get_type qmi_uim_pin_id_get_type qmi_uim_card_protocol_get_type qmi_uim_physical_card_state_get_type qmi_uim_slot_state_get_type qmi_uim_refresh_mode_get_type qmi_uim_refresh_stage_get_type qmi_uim_configuration_get_type qmi_uim_depersonalization_operation_get_type
qmi-enums-oma OMA enumerations and flags QmiOmaSessionType QmiOmaSessionState QmiOmaSessionFailedReason QmiOmaHfaFeatureDoneState qmi_oma_session_type_get_string qmi_oma_session_state_get_string qmi_oma_session_failed_reason_get_string qmi_oma_hfa_feature_done_state_get_string QMI_TYPE_OMA_SESSION_TYPE QMI_TYPE_OMA_SESSION_STATE QMI_TYPE_OMA_SESSION_FAILED_REASON QMI_TYPE_OMA_HFA_FEATURE_DONE_STATE qmi_oma_session_type_get_type qmi_oma_session_state_get_type qmi_oma_session_failed_reason_get_type qmi_oma_hfa_feature_done_state_get_type
qmi-enums-wda WDA enumerations and flags QmiWdaLinkLayerProtocol QmiWdaDataAggregationProtocol qmi_wda_link_layer_protocol_get_string qmi_wda_data_aggregation_protocol_get_string QMI_TYPE_WDA_LINK_LAYER_PROTOCOL QMI_TYPE_WDA_DATA_AGGREGATION_PROTOCOL qmi_wda_link_layer_protocol_get_type qmi_wda_data_aggregation_protocol_get_type
qmi-enums-voice Voice enumerations and flags QmiVoiceCallState QmiVoiceCallType QmiVoiceCallDirection QmiVoiceCallMode QmiVoiceAls QmiVoicePresentation QmiVoiceDomain QmiVoicePrivacy QmiVoiceServiceOption QmiVoiceTtyMode QmiVoiceWcdmaAmrStatus QmiVoiceUserAction QmiVoiceUssDataCodingScheme QmiVoiceAlphaDataCodingScheme QmiVoiceCallEndReason QmiVoiceCallControlResultType QmiVoiceCallControlSupplementaryServiceType QmiVoiceSupplementaryServiceType QmiVoiceSupplementaryServiceNotificationType QmiVoiceSupplementaryServiceAction QmiVoiceSupplementaryServiceReason qmi_voice_call_state_get_string qmi_voice_call_type_get_string qmi_voice_call_direction_get_string qmi_voice_call_mode_get_string qmi_voice_als_get_string qmi_voice_presentation_get_string qmi_voice_domain_get_string qmi_voice_privacy_get_string qmi_voice_service_option_get_string qmi_voice_tty_mode_get_string qmi_voice_wcdma_amr_status_build_string_from_mask qmi_voice_user_action_get_string qmi_voice_uss_data_coding_scheme_get_string qmi_voice_alpha_data_coding_scheme_get_string qmi_voice_call_end_reason_get_string qmi_voice_call_control_result_type_get_string qmi_voice_call_control_supplementary_service_type_get_string qmi_voice_supplementary_service_type_get_string qmi_voice_supplementary_service_notification_type_get_string qmi_voice_supplementary_service_action_get_string qmi_voice_supplementary_service_reason_get_string QMI_TYPE_VOICE_CALL_STATE QMI_TYPE_VOICE_CALL_TYPE QMI_TYPE_VOICE_CALL_DIRECTION QMI_TYPE_VOICE_CALL_MODE QMI_TYPE_VOICE_ALS QMI_TYPE_VOICE_PRESENTATION QMI_TYPE_VOICE_DOMAIN QMI_TYPE_VOICE_PRIVACY QMI_TYPE_VOICE_SERVICE_OPTION QMI_TYPE_VOICE_TTY_MODE QMI_TYPE_VOICE_WCDMA_AMR_STATUS QMI_TYPE_VOICE_USER_ACTION QMI_TYPE_VOICE_USS_DATA_CODING_SCHEME QMI_TYPE_VOICE_ALPHA_DATA_CODING_SCHEME QMI_TYPE_VOICE_CALL_END_REASON QMI_TYPE_VOICE_CALL_CONTROL_RESULT_TYPE QMI_TYPE_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE QMI_TYPE_VOICE_SUPPLEMENTARY_SERVICE_ACTION QMI_TYPE_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE QMI_TYPE_VOICE_SUPPLEMENTARY_SERVICE_REASON QMI_TYPE_VOICE_SUPPLEMENTARY_SERVICE_TYPE qmi_voice_call_state_get_type qmi_voice_call_type_get_type qmi_voice_call_direction_get_type qmi_voice_call_mode_get_type qmi_voice_als_get_type qmi_voice_presentation_get_type qmi_voice_domain_get_type qmi_voice_privacy_get_type qmi_voice_service_option_get_type qmi_voice_tty_mode_get_type qmi_voice_wcdma_amr_status_get_type qmi_voice_user_action_get_type qmi_voice_uss_data_coding_scheme_get_type qmi_voice_alpha_data_coding_scheme_get_type qmi_voice_call_end_reason_get_type qmi_voice_call_control_result_type_get_type qmi_voice_call_control_supplementary_service_type_get_type qmi_voice_supplementary_service_action_get_type qmi_voice_supplementary_service_notification_type_get_type qmi_voice_supplementary_service_reason_get_type qmi_voice_supplementary_service_type_get_type
qmi-enums-loc LOC enumerations and flags QmiLocIntermediateReportState QmiLocEventRegistrationFlag QmiLocFixRecurrenceType QmiLocOperationMode QmiLocEngineState QmiLocSatelliteValidInformation QmiLocSystem QmiLocHealthStatus QmiLocSatelliteStatus QmiLocNavigationData QmiLocIndicationStatus QmiLocSensorDataUsage QmiLocTimeSource QmiLocTechnologyUsed QmiLocReliability QmiLocSessionStatus QmiLocServerType QmiLocServerAddressType QmiLocPredictedOrbitsDataFormat QmiLocDeleteCellDatabase QmiLocDeleteClockInfo QmiLocDeleteGnssData QmiLocNmeaType QmiLocDeleteSvInfo QmiLocLockType qmi_loc_intermediate_report_state_get_string qmi_loc_event_registration_flag_build_string_from_mask qmi_loc_fix_recurrence_type_get_string qmi_loc_operation_mode_get_string qmi_loc_engine_state_get_string qmi_loc_health_status_get_string qmi_loc_indication_status_get_string qmi_loc_sensor_data_usage_build_string_from_mask qmi_loc_navigation_data_get_string qmi_loc_reliability_get_string qmi_loc_satellite_status_get_string qmi_loc_satellite_valid_information_build_string_from_mask qmi_loc_session_status_get_string qmi_loc_system_get_string qmi_loc_technology_used_build_string_from_mask qmi_loc_time_source_get_string qmi_loc_server_type_get_string qmi_loc_server_address_type_build_string_from_mask qmi_loc_predicted_orbits_data_format_get_string qmi_loc_delete_cell_database_build_string_from_mask qmi_loc_delete_clock_info_build_string_from_mask qmi_loc_delete_gnss_data_build_string_from_mask qmi_loc_delete_sv_info_build_string_from_mask qmi_loc_nmea_type_build_string_from_mask qmi_loc_lock_type_get_string QMI_TYPE_LOC_INTERMEDIATE_REPORT_STATE QMI_TYPE_LOC_FIX_RECURRENCE_TYPE QMI_TYPE_LOC_OPERATION_MODE QMI_TYPE_LOC_ENGINE_STATE QMI_TYPE_LOC_HEALTH_STATUS QMI_TYPE_LOC_INDICATION_STATUS QMI_TYPE_LOC_NAVIGATION_DATA QMI_TYPE_LOC_RELIABILITY QMI_TYPE_LOC_SATELLITE_STATUS QMI_TYPE_LOC_SATELLITE_VALID_INFORMATION QMI_TYPE_LOC_SESSION_STATUS QMI_TYPE_LOC_SYSTEM QMI_TYPE_LOC_TECHNOLOGY_USED QMI_TYPE_LOC_TIME_SOURCE QMI_TYPE_LOC_SERVER_TYPE QMI_TYPE_LOC_SERVER_ADDRESS_TYPE QMI_TYPE_LOC_PREDICTED_ORBITS_DATA_FORMAT QMI_TYPE_LOC_DELETE_CELL_DATABASE QMI_TYPE_LOC_DELETE_CLOCK_INFO QMI_TYPE_LOC_DELETE_SV_INFO QMI_TYPE_LOC_NMEA_TYPE QMI_TYPE_LOC_LOCK_TYPE qmi_loc_intermediate_report_state_get_type qmi_loc_fix_recurrence_type_get_type qmi_loc_operation_mode_get_type qmi_loc_engine_state_get_type qmi_loc_health_status_get_type qmi_loc_indication_status_get_type qmi_loc_navigation_data_get_type qmi_loc_reliability_get_type qmi_loc_satellite_status_get_type qmi_loc_satellite_valid_information_get_type qmi_loc_session_status_get_type qmi_loc_system_get_type qmi_loc_technology_used_get_type qmi_loc_time_source_get_type qmi_loc_server_type_get_type qmi_loc_server_address_type_get_type qmi_loc_predicted_orbits_data_format_get_type qmi_loc_delete_cell_database_get_type qmi_loc_delete_clock_info_get_type qmi_loc_delete_sv_info_get_type qmi_loc_nmea_type_get_type qmi_loc_lock_type_get_type
qmi-enums-qos QOS enumerations and flags QmiQosStatus QmiQosEvent qmi_qos_status_get_string qmi_qos_event_get_string QMI_TYPE_QOS_STATUS QMI_TYPE_QOS_EVENT qmi_qos_status_get_type qmi_qos_event_get_type
qmi-enums-gas GAS enumerations and flags QmiGasFirmwareListingMode QmiGasUsbCompositionEndpointType qmi_gas_firmware_listing_mode_get_string qmi_gas_usb_composition_endpoint_type_get_string QMI_TYPE_GAS_FIRMWARE_LISTING_MODE QMI_TYPE_GAS_USB_COMPOSITION_ENDPOINT_TYPE qmi_gas_firmware_listing_mode_get_type qmi_gas_usb_composition_endpoint_type_get_type
qmi-enums-dsd DSD enumerations and flags QmiDsdApnType QmiDsdApnTypePreference QmiDsdDataSystemNetworkType QmiDsdRadioAccessTechnology QmiDsdSoMask qmi_dsd_apn_type_get_string qmi_dsd_apn_type_preference_build_string_from_mask qmi_dsd_data_system_network_type_get_string qmi_dsd_radio_access_technology_get_string qmi_dsd_so_mask_build_string_from_mask QMI_TYPE_DSD_APN_TYPE QMI_TYPE_DSD_APN_TYPE_PREFERENCE QMI_TYPE_DSD_DATA_SYSTEM_NETWORK_TYPE QMI_TYPE_DSD_RADIO_ACCESS_TECHNOLOGY QMI_TYPE_DSD_SO_MASK qmi_dsd_apn_type_get_type qmi_dsd_apn_type_preference_get_type qmi_dsd_data_system_network_type_get_type qmi_dsd_radio_access_technology_get_type qmi_dsd_so_mask_get_type
qmi-enums-sar SAR enumerations and flags QmiSarRfState qmi_sar_rf_state_get_string QMI_TYPE_SAR_RF_STATE qmi_sar_rf_state_get_type
qmi-enums-fox FOX enumerations and flags QmiFoxFirmwareVersionType qmi_fox_firmware_version_type_get_string QMI_TYPE_FOX_FIRMWARE_VERSION_TYPE qmi_fox_firmware_version_type_get_type
qmi-enums-imsp IMSP enumerations and flags QmiImspEnablerState qmi_imsp_enabler_state_get_string qmi_imsp_enabler_state_build_string_from_mask QMI_TYPE_IMSP_ENABLER_STATE qmi_imsp_enabler_state_get_type
qmi-enums-imsa IMSA enumerations and flags QmiImsaImsRegistrationStatus QmiImsaRegistrationTechnology QmiImsaServiceStatus qmi_imsa_ims_registration_status_get_string qmi_imsa_registration_technology_get_string qmi_imsa_service_status_get_string qmi_imsa_ims_registration_status_build_string_from_mask qmi_imsa_registration_technology_build_string_from_mask qmi_imsa_service_status_build_string_from_mask QMI_TYPE_IMSA_IMS_REGISTRATION_STATUS QMI_TYPE_IMSA_REGISTRATION_TECHNOLOGY QMI_TYPE_IMSA_SERVICE_STATUS qmi_imsa_ims_registration_status_get_type qmi_imsa_registration_technology_get_type qmi_imsa_service_status_get_type
qmi-enums-ssc SSC enumerations and flags QmiSscReportType qmi_ssc_report_type_get_string QMI_TYPE_SSC_REPORT_TYPE qmi_ssc_report_type_get_type
qmi-errors Errors QmiCoreError QmiProtocolError qmi_core_error_get_string qmi_protocol_error_get_string QMI_DBUS_ERROR_PREFIX QMI_CORE_ERROR_DBUS_PREFIX QMI_PROTOCOL_ERROR_DBUS_PREFIX qmi_core_error_quark qmi_protocol_error_quark QMI_CORE_ERROR QMI_PROTOCOL_ERROR QMI_TYPE_CORE_ERROR QMI_TYPE_PROTOCOL_ERROR qmi_core_error_get_type qmi_protocol_error_get_type
qmi-message QmiMessage QMI_MESSAGE_QMUX_MARKER QMI_MESSAGE_QRTR_MARKER QmiMessage qmi_message_new qmi_message_new_from_raw qmi_message_new_from_data qmi_message_response_new qmi_message_ref qmi_message_unref qmi_message_is_request qmi_message_is_response qmi_message_is_indication qmi_message_get_service qmi_message_get_client_id qmi_message_get_transaction_id qmi_message_get_message_id qmi_message_get_length qmi_message_get_raw qmi_message_get_data qmi_message_get_marker qmi_message_tlv_write_init qmi_message_tlv_write_reset qmi_message_tlv_write_complete qmi_message_tlv_write_guint8 qmi_message_tlv_write_gint8 qmi_message_tlv_write_guint16 qmi_message_tlv_write_gint16 qmi_message_tlv_write_guint32 qmi_message_tlv_write_gint32 qmi_message_tlv_write_guint64 qmi_message_tlv_write_gint64 qmi_message_tlv_write_sized_guint qmi_message_tlv_write_string qmi_message_tlv_read_init qmi_message_tlv_read_guint8 qmi_message_tlv_read_gint8 qmi_message_tlv_read_guint16 qmi_message_tlv_read_gint16 qmi_message_tlv_read_guint32 qmi_message_tlv_read_gint32 qmi_message_tlv_read_guint64 qmi_message_tlv_read_gint64 qmi_message_tlv_read_sized_guint qmi_message_tlv_read_gfloat_endian qmi_message_tlv_read_gdouble qmi_message_tlv_read_string qmi_message_tlv_read_fixed_size_string QmiMessageForeachRawTlvFn qmi_message_foreach_raw_tlv qmi_message_get_raw_tlv qmi_message_add_raw_tlv qmi_message_set_transaction_id qmi_message_get_printable_full qmi_message_get_tlv_printable qmi_message_tlv_read_remaining_size
qmi-message-context QmiMessageContext QMI_MESSAGE_VENDOR_GENERIC QmiMessageContext qmi_message_context_new qmi_message_context_ref qmi_message_context_unref qmi_message_context_set_vendor_id qmi_message_context_get_vendor_id qmi_message_context_get_type
qmi-utils Common utilities qmi_utils_get_traces_enabled qmi_utils_set_traces_enabled qmi_utils_set_show_personal_info qmi_utils_get_show_personal_info
qmi-compat Deprecated Interface qmi_device_close qmi_device_command qmi_device_command_finish qmi_utils_read_guint8_from_buffer qmi_utils_read_gint8_from_buffer qmi_utils_read_guint16_from_buffer qmi_utils_read_gint16_from_buffer qmi_utils_read_guint32_from_buffer qmi_utils_read_gint32_from_buffer qmi_utils_read_guint64_from_buffer qmi_utils_read_gint64_from_buffer qmi_utils_read_sized_guint_from_buffer qmi_utils_read_gfloat_from_buffer qmi_utils_read_string_from_buffer qmi_utils_read_fixed_size_string_from_buffer qmi_utils_write_guint8_to_buffer qmi_utils_write_gint8_to_buffer qmi_utils_write_guint16_to_buffer qmi_utils_write_gint16_to_buffer qmi_utils_write_guint32_to_buffer qmi_utils_write_gint32_to_buffer qmi_utils_write_guint64_to_buffer qmi_utils_write_gint64_to_buffer qmi_utils_write_sized_guint_to_buffer qmi_utils_write_string_to_buffer qmi_utils_write_fixed_size_string_to_buffer qmi_message_get_version_introduced qmi_message_get_version_introduced_full qmi_message_get_printable qmi_message_dms_set_service_programming_code_input_get_new qmi_message_dms_set_service_programming_code_input_set_new qmi_message_dms_set_service_programming_code_input_get_current qmi_message_dms_set_service_programming_code_input_set_current qmi_message_tlv_read_gfloat qmi_message_uim_change_pin_input_get_session_information qmi_message_uim_change_pin_input_set_session_information qmi_message_uim_get_file_attributes_input_get_session_information qmi_message_uim_get_file_attributes_input_set_session_information qmi_message_uim_read_record_input_get_session_information qmi_message_uim_read_record_input_set_session_information qmi_message_uim_read_transparent_input_get_session_information qmi_message_uim_read_transparent_input_set_session_information qmi_message_uim_set_pin_protection_input_get_session_information qmi_message_uim_set_pin_protection_input_set_session_information qmi_message_uim_unblock_pin_input_get_session_information qmi_message_uim_unblock_pin_input_set_session_information qmi_message_uim_verify_pin_input_get_session_information qmi_message_uim_verify_pin_input_set_session_information qmi_message_nas_get_operator_name_output_get_operator_nitz_information qmi_indication_nas_operator_name_output_get_operator_nitz_information qmi_message_nas_get_home_network_output_get_home_network_3gpp2 QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement qmi_message_nas_get_cell_location_info_output_get_geran_info QmiMessageNasGetCellLocationInfoOutputUmtsInfoCellElement QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringGeranElement qmi_message_nas_get_cell_location_info_output_get_umts_info QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoCellElement qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info qmi_message_nas_get_system_info_output_get_gsm_system_info qmi_message_nas_get_system_info_output_get_lte_system_info qmi_message_nas_get_system_info_output_get_td_scdma_system_info qmi_message_nas_get_system_info_output_get_wcdma_system_info qmi_indication_nas_system_info_output_get_gsm_system_info qmi_indication_nas_system_info_output_get_lte_system_info qmi_indication_nas_system_info_output_get_td_scma_system_info qmi_indication_nas_system_info_output_get_wcdma_system_info qmi_message_nas_swi_get_status_output_get_common_info qmi_message_nas_set_system_selection_preference_input_get_mnc_pds_digit_include_status qmi_indication_uim_slot_status_output_get_slot_eid_information qmi_message_uim_get_slot_status_output_get_slot_eid_information QMI_NAS_SIM_REJECT_STATE_SIM_VAILABLE QMI_WDS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT QMI_WDS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE QMI_WDS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE QMI_WDS_CDMA_CAUSE_CODE_NETWORK_FAILURE QMI_WDS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID QMI_WDS_CDMA_CAUSE_CODE_NETWORK_OTHER QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_BUSY QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_OTHER QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER QMI_WDS_CDMA_CAUSE_CODE_GENERAL_ENCODING QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED QMI_WDS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER QMI_WDS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER QMI_WDS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE QMI_WDS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE QMI_WDS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR QMI_WDS_CDMA_CAUSE_CODE_GENERAL_OTHER QMI_PROTOCOL_ERROR_QOS_UNAVAILABLE QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFIGURATION_FAILED QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN QmiDmsDellFirmwareVersionType qmi_dms_dell_firmware_version_type_get_string QmiMessageDmsDellGetFirmwareVersionInput qmi_message_dms_dell_get_firmware_version_input_new qmi_message_dms_dell_get_firmware_version_input_ref qmi_message_dms_dell_get_firmware_version_input_set_version_type qmi_message_dms_dell_get_firmware_version_input_get_version_type qmi_message_dms_dell_get_firmware_version_input_unref QmiMessageDmsDellGetFirmwareVersionOutput qmi_message_dms_dell_get_firmware_version_output_ref qmi_message_dms_dell_get_firmware_version_output_unref qmi_message_dms_dell_get_firmware_version_output_get_result qmi_message_dms_dell_get_firmware_version_output_get_version qmi_client_dms_dell_get_firmware_version qmi_client_dms_dell_get_firmware_version_finish QmiDmsDellDeviceMode qmi_dms_dell_device_mode_get_string QmiMessageDmsDellChangeDeviceModeInput qmi_message_dms_dell_change_device_mode_input_new qmi_message_dms_dell_change_device_mode_input_ref qmi_message_dms_dell_change_device_mode_input_set_mode qmi_message_dms_dell_change_device_mode_input_get_mode qmi_message_dms_dell_change_device_mode_input_unref QmiMessageDmsDellChangeDeviceModeOutput qmi_message_dms_dell_change_device_mode_output_ref qmi_message_dms_dell_change_device_mode_output_unref qmi_message_dms_dell_change_device_mode_output_get_result qmi_client_dms_dell_change_device_mode qmi_client_dms_dell_change_device_mode_finish qmi_client_wds_get_default_profile_num qmi_client_wds_get_default_profile_num_finish QmiMessageWdsGetDefaultProfileNumInput qmi_message_wds_get_default_profile_num_input_new qmi_message_wds_get_default_profile_num_input_ref qmi_message_wds_get_default_profile_num_input_get_profile_type qmi_message_wds_get_default_profile_num_input_set_profile_type qmi_message_wds_get_default_profile_num_input_unref QmiMessageWdsGetDefaultProfileNumOutput qmi_message_wds_get_default_profile_num_output_ref qmi_message_wds_get_default_profile_num_output_unref qmi_message_wds_get_default_profile_num_output_get_default_profile_number qmi_message_wds_get_default_profile_num_output_get_extended_error_code qmi_message_wds_get_default_profile_num_output_get_result qmi_client_wds_set_default_profile_num qmi_client_wds_set_default_profile_num_finish QmiMessageWdsSetDefaultProfileNumInput qmi_message_wds_set_default_profile_num_input_new qmi_message_wds_set_default_profile_num_input_ref qmi_message_wds_set_default_profile_num_input_get_profile_identifier qmi_message_wds_set_default_profile_num_input_set_profile_identifier qmi_message_wds_set_default_profile_num_input_unref QmiMessageWdsSetDefaultProfileNumOutput qmi_message_wds_set_default_profile_num_output_get_extended_error_code qmi_message_wds_set_default_profile_num_output_get_result qmi_message_wds_set_default_profile_num_output_ref qmi_message_wds_set_default_profile_num_output_unref QmiConfigTypeAndId qmi_message_pdc_config_change_input_get_type_with_id qmi_message_pdc_config_change_input_set_type_with_id qmi_message_pdc_config_change_output_get_type_with_id qmi_message_pdc_set_selected_config_input_get_type_with_id qmi_message_pdc_set_selected_config_input_set_type_with_id qmi_message_pdc_get_config_info_input_get_type_with_id qmi_message_pdc_get_config_info_input_set_type_with_id QmiMessageDmsDeleteStoredImageInputImage qmi_message_dms_delete_stored_image_input_get_image qmi_message_dms_delete_stored_image_input_set_image QmiMessageDmsGetStoredImageInfoInputImage qmi_message_dms_get_stored_image_info_input_get_image qmi_message_dms_get_stored_image_info_input_set_image QmiIndicationLocPositionReportOutputDilutionOfPrecision qmi_indication_loc_position_report_output_get_dilution_of_precision QmiIndicationLocPositionReportOutputGpsTime qmi_indication_loc_position_report_output_get_gps_time QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherSlotsSlotsElement qmi_message_uim_get_configuration_output_get_personalization_status_other_slots QmiWdsGetCurrentSettingsRequestedSettings qmi_wds_get_current_settings_requested_settings_build_string_from_mask qmi_indication_wds_set_lte_attach_pdn_list_output_get_result QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElement QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement QmiDeprecatedNasSimRejectState QmiDeprecatedWdsCdmaCauseCode QmiDeprecatedProtocolError QmiDeprecatedWdsVerboseCallEndReasonCm QmiDeprecatedDmsDellDeviceMode QmiDeprecatedDmsDellFirmwareVersionType QmiDeprecatedMessageDmsDellGetFirmwareVersionInput QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput QmiDeprecatedMessageDmsDellChangeDeviceModeInput QmiDeprecatedMessageDmsDellChangeDeviceModeOutput QmiDeprecatedMessageWdsGetDefaultProfileNumInput QmiDeprecatedMessageWdsGetDefaultProfileNumOutput QmiDeprecatedMessageWdsSetDefaultProfileNumInput QmiDeprecatedMessageWdsSetDefaultProfileNumOutput QmiDeprecatedConfigTypeAndId QmiDeprecatedMessageDmsDeleteStoredImageInputImage QmiDeprecatedMessageDmsGetStoredImageInfoInputImage QmiDeprecatedIndicationLocPositionReportOutputDilutionOfPrecision QmiDeprecatedIndicationLocPositionReportOutputGpsTime QmiDeprecatedWdsGetCurrentSettingsRequestedSettings QMI_TYPE_DMS_DELL_FIRMWARE_VERSION_TYPE QMI_TYPE_MESSAGE_DMS_DELL_GET_FIRMWARE_VERSION_INPUT QMI_TYPE_MESSAGE_DMS_DELL_GET_FIRMWARE_VERSION_OUTPUT QMI_TYPE_DMS_DELL_DEVICE_MODE QMI_TYPE_MESSAGE_DMS_DELL_CHANGE_DEVICE_MODE_INPUT QMI_TYPE_MESSAGE_DMS_DELL_CHANGE_DEVICE_MODE_OUTPUT QMI_TYPE_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUM_INPUT QMI_TYPE_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUM_OUTPUT QMI_TYPE_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUM_INPUT QMI_TYPE_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUM_OUTPUT QMI_TYPE_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS qmi_dms_dell_firmware_version_type_get_type qmi_message_dms_dell_get_firmware_version_input_get_type qmi_message_dms_dell_get_firmware_version_output_get_type qmi_dms_dell_device_mode_get_type qmi_message_dms_dell_change_device_mode_input_get_type qmi_message_dms_dell_change_device_mode_output_get_type qmi_message_wds_get_default_profile_num_input_get_type qmi_message_wds_get_default_profile_num_output_get_type qmi_message_wds_set_default_profile_num_input_get_type qmi_message_wds_set_default_profile_num_output_get_type qmi_wds_get_current_settings_requested_settings_get_type qmi_indication_uim_card_status_output_card_status_cards_element_applications_element_get_type qmi_message_uim_get_card_status_output_card_status_cards_element_applications_element_get_type
libqmi-1.35.2-dev/docs/reference/libqmi-glib/libqmi-glib-docs.xml000066400000000000000000001043441455567757300246070ustar00rootroot00000000000000 ]> libqmi-glib Reference Manual For libqmi-glib &version;. The latest version of this documentation can be found on-line at https://www.freedesktop.org/software/libqmi/libqmi-glib/latest/. 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 The libqmi-glib authors Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy of the GNU Free Documentation License from the Free Software Foundation by visiting their Web site or by writing to:
The Free Software Foundation, Inc. 51 Franklin Street, Suite 500 Boston, MA 02110-1335 USA
Core Device Management Service (DMS)
DMS Indications
DMS Requests
Network Access Service (NAS)
NAS Indications
NAS Requests
Wireless Data Service (WDS)
WDS Indications
WDS Requests
Wireless Messaging Service (WMS)
WMS Indications
WMS Requests
Persistent Device Configuration (PDC)
PDC Indications
PDC Requests
Position Determination Service (PDS)
PDS Indications
PDS Requests
Phonebook Management Service (PBM)
PBM Requests
User Identity Module (UIM) service
UIM Indications
UIM Requests
Open Mobile Alliance Service (OMA)
OMA Indications
OMA Requests
Wireless Data Administrative Service (WDA)
WDA Requests
Voice
Voice Indications
Voice Requests
Location Service (LOC)
LOC Indications
LOC Requests
QoS Service (QoS)
QoS Indications
QoS Requests
General Application Service (GAS)
GAS Requests
General Modem Service (GMS)
GMS Requests
Data System Determination (DSD)
DSD Indications
DSD Requests
Specific Absorption Rate (SAR)
SAR Requests
Data Port Mapper (DPM)
DPM Requests
Foxconn Modem Service (FOX)
FOX Requests
Telit AT Relay Service (ATR)
ATR Indications
ATR Requests
IP Multimedia Subsystem Presence Service (IMSP)
IMSP Requests
IP Multimedia Subsystem Application Service (IMSA)
IMSA Requests
IP Multimedia Subsystem Settings Service (IMS)
IMS Requests
Snapdragon Sensor Core Service (SSC)
SSC Indications
SSC Requests
Compatibility with older versions Object Hierarchy Index Index of deprecated symbols Index of new symbols in 1.0 Index of new symbols in 1.4 Index of new symbols in 1.6 Index of new symbols in 1.8 Index of new symbols in 1.10 Index of new symbols in 1.12 Index of new symbols in 1.14 Index of new symbols in 1.16 Index of new symbols in 1.18 Index of new symbols in 1.20 Index of new symbols in 1.22 Index of new symbols in 1.22.4 Index of new symbols in 1.24 Index of new symbols in 1.24.6 Index of new symbols in 1.26 Index of new symbols in 1.26.2 Index of new symbols in 1.26.6 Index of new symbols in 1.28 Index of new symbols in 1.28.6 Index of new symbols in 1.30 Index of new symbols in 1.30.2 Index of new symbols in 1.32 Index of new symbols in 1.34
libqmi-1.35.2-dev/docs/reference/libqmi-glib/meson.build000066400000000000000000000037131455567757300231070ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez subdir('xml') doc_module = 'libqmi-glib' src_dirs = [ generated_inc, libqmi_glib_inc, ] private_headers = [ 'qmi-ctl.h', 'qmi-endpoint.h', 'qmi-endpoint-mbim.h', 'qmi-endpoint-qmux.h', 'qmi-endpoint-qrtr.h', 'qmi-enums-private.h', 'qmi-enum-types-private.h', 'qmi-file.h', 'qmi-flag-types-private.h', 'qmi-helpers.h', 'qmi-net-port-manager.h', 'qmi-net-port-manager-rmnet.h', 'qmi-net-port-manager-qmiwwan.h', 'test-fixture.h', 'test-port-context.h', 'if_link_rmnet.h', ] scan_args = [ '--rebuild-types', '--deprecated-guards="QMI_DISABLE_DEPRECATED"', ] glib_prefix = glib_dep.get_pkgconfig_variable('prefix') fixxref_args = [ '--html-dir=' + (qmi_prefix / gnome.gtkdoc_html_dir(doc_module)), '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('glib')), '--extra-dir=' + (glib_prefix / gnome.gtkdoc_html_dir('gio')), ] name = doc_module + '-sections.txt' ''' FIXME: gen_sections should be used in the `input` field but it would add a dependency over file paths that are not yet created, so the `depends` section is used to generate alternate dependency. This is fixed in newer meson versions. ''' sections_txt = custom_target( name, input: 'libqmi-glib-common.sections', output: name, capture: true, command: [find_program('cat'), '@INPUT@'] + gen_sections, depends: gen_sections_deps, ) version_xml = configure_file( input: 'version.xml.in', output: '@BASENAME@', configuration: version_conf, ) gnome.gtkdoc( doc_module, main_xml: doc_module + '-docs.xml', src_dir: src_dirs, ignore_headers: private_headers, include_directories: top_inc, gobject_typesfile: doc_module + '.types', dependencies: libqmi_glib_dep, namespace: 'qmi', scan_args: scan_args, fixxref_args: fixxref_args, content_files: [sections_txt, version_xml], install: true, check: true, ) libqmi-1.35.2-dev/docs/reference/libqmi-glib/version.xml.in000066400000000000000000000000121455567757300235460ustar00rootroot00000000000000@VERSION@ libqmi-1.35.2-dev/docs/reference/libqmi-glib/xml/000077500000000000000000000000001455567757300215415ustar00rootroot00000000000000libqmi-1.35.2-dev/docs/reference/libqmi-glib/xml/gtkdocentities.ent.in000066400000000000000000000004461455567757300257020ustar00rootroot00000000000000 libqmi-1.35.2-dev/docs/reference/libqmi-glib/xml/meson.build000066400000000000000000000010071455567757300237010ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez ent_conf = { 'PACKAGE': qmi_name, 'PACKAGE_BUGREPORT': qmi_name + '-devel@lists.freedesktop.org', 'PACKAGE_NAME': qmi_name, 'PACKAGE_STRING': '@0@ @1@'.format(qmi_name, qmi_version), 'PACKAGE_TARNAME': qmi_name, 'PACKAGE_URL': '', 'PACKAGE_VERSION': qmi_version, } gtkdocentities_ent = configure_file( input: 'gtkdocentities.ent.in', output: '@BASENAME@', configuration: ent_conf, ) libqmi-1.35.2-dev/examples/000077500000000000000000000000001455567757300155015ustar00rootroot00000000000000libqmi-1.35.2-dev/examples/simple-tester-python/000077500000000000000000000000001455567757300216155ustar00rootroot00000000000000libqmi-1.35.2-dev/examples/simple-tester-python/README000066400000000000000000000012711455567757300224760ustar00rootroot00000000000000 The simple-tester-python program makes use of the 'libqmi-glib' library through GObject Introspection. The program will: * Open a connection to the qmi-proxy, or launch the qmi-proxy itself if it isn't already running. * Allocate a DMS client. * Query device capabilities. * Release DMS client. The output will look like this: $ ./simple-tester-python /dev/cdc-wdm0 max tx channel rate: 50000000 max rx channel rate: 100000000 data service: non-simultaneous-cs-ps sim: supported networks: gsm, umts, lte Note that the program requires libqmi-glib to be installed in the system and the introspection typelibs available in the standard paths. Have fun!libqmi-1.35.2-dev/examples/simple-tester-python/simple-tester-python000077500000000000000000000123211455567757300256560ustar00rootroot00000000000000#!/usr/bin/env python3 # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) any # later version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more # details. # # You should have received a copy of the GNU Lesser General Public License along # with this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2020 Aleksander Morgado # import sys, signal, gi gi.require_version('Qmi', '1.0') from gi.repository import GLib, Gio, Qmi main_loop = None def signal_handler(data): main_loop.quit() def device_close_ready(qmidev,result,user_data=None): try: qmidev.close_finish(result) except GLib.GError as error: sys.stderr.write("Couldn't close QMI device: %s\n" % error.message) main_loop.quit() def device_close(qmidev): qmidev.close_async(10, None, device_close_ready, None) def release_client_ready(qmidev,result,user_data=None): try: qmidev.release_client_finish(result) except GLib.GError as error: sys.stderr.write("Couldn't release QMI client: %s\n" % error.message) device_close(qmidev) def release_client(qmidev,qmiclient): qmidev.release_client(qmiclient, Qmi.DeviceReleaseClientFlags.RELEASE_CID, 10, None, release_client_ready, None) def get_ids_ready(qmiclient,result,qmidev): try: output = qmiclient.get_ids_finish(result) output.get_result() except GLib.GError as error: sys.stderr.write("Couldn't query device ids: %s\n" % error.message) release_client(qmidev, qmiclient) return try: imei = output.get_imei() print("imei: %s" % imei) except: pass try: imei_software_version = output.get_imei_software_version() print("imei software version: %s" % imei_software_version) except: pass try: meid = output.get_meid() print("meid: %s" % meid) except: pass try: esn = output.get_esn() print("esn: %s" % esn) except: pass release_client(qmidev, qmiclient) def get_capabilities_ready(qmiclient,result,qmidev): try: output = qmiclient.get_capabilities_finish(result) output.get_result() maxtxrate, maxrxrate, dataservicecaps, simcaps, radioifaces = output.get_info() print("max tx channel rate: %u" % maxtxrate) print("max rx channel rate: %u" % maxrxrate) print("data service: %s" % Qmi.DmsDataServiceCapability.get_string(dataservicecaps)) print("sim: %s" % Qmi.DmsSimCapability.get_string(simcaps)) networks = "" for radioiface in radioifaces: if networks != "": networks += ", " networks += Qmi.DmsRadioInterface.get_string(radioiface) print("networks: %s" % networks) except GLib.GError as error: sys.stderr.write("Couldn't query device capabilities: %s\n" % error.message) qmiclient.get_ids(None, 10, None, get_ids_ready, qmidev) def allocate_client_ready(qmidev,result,user_data=None): try: qmiclient = qmidev.allocate_client_finish(result) except GLib.GError as error: sys.stderr.write("Couldn't allocate QMI client: %s\n" % error.message) device_close(qmidev) return qmiclient.get_capabilities(None, 10, None, get_capabilities_ready, qmidev) def open_ready(qmidev,result,user_data=None): try: qmidev.open_finish(result) except GLib.GError as error: sys.stderr.write("Couldn't open QMI device: %s\n" % error.message) main_loop.quit() return qmidev.allocate_client(Qmi.Service.DMS, Qmi.CID_NONE, 10, None, allocate_client_ready, None) def new_ready(unused,result,user_data=None): try: qmidev = Qmi.Device.new_finish(result) except GLib.GError as error: sys.stderr.write("Couldn't create QMI device: %s\n" % error.message) main_loop.quit() return qmidev.open(Qmi.DeviceOpenFlags.PROXY | Qmi.DeviceOpenFlags.AUTO, 10, None, open_ready, None) if __name__ == "__main__": # Process input arguments if len(sys.argv) != 2: sys.stderr.write('error: wrong number of arguments\n') sys.stdout.write('usage: simple-tester-python \n') sys.exit(1) # Create Mbim device asynchronously file = Gio.File.new_for_path(sys.argv[1]) Qmi.Device.new (file, None, new_ready, None) # Main loop main_loop = GLib.MainLoop() GLib.unix_signal_add(GLib.PRIORITY_HIGH, signal.SIGHUP, signal_handler, None) GLib.unix_signal_add(GLib.PRIORITY_HIGH, signal.SIGTERM, signal_handler, None) try: main_loop.run() except KeyboardInterrupt: pass libqmi-1.35.2-dev/gobi-api/000077500000000000000000000000001455567757300153525ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/000077500000000000000000000000001455567757300173645ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/AUTHORS000066400000000000000000000000001455567757300204220ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/COPYING000066400000000000000000000027711455567757300204260ustar00rootroot00000000000000Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/ChangeLog000066400000000000000000000000001455567757300211240ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/000077500000000000000000000000001455567757300202545ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/BitPacker.cpp000077500000000000000000000346711455567757300226420ustar00rootroot00000000000000/*=========================================================================== FILE: BitPacker.cpp DESCRIPTION: Implementation of cBitPacker class PUBLIC CLASSES AND METHODS: cBitPacker This class packs bits into a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "BitPacker.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: SetUnsignedVal (Public Method) DESCRIPTION: Set an unsigned value in the bit source (writing least significant bits first) PARAMETERS: pData [ O ] - Data buffer to write to currentOffset [I/O] - Current bit offset into above buffer maxOffset [ I ] - Maximum bit offset into above buffer numBits [ I ] - Number of bits to write dataIn [ I ] - Input value to write bLSB [ I ] - Pack LSB -> MSB? RETURN VALUE: DWORD ===========================================================================*/ template DWORD SetUnsignedVal( BYTE * pData, ULONG & currentOffset, ULONG maxOffset, ULONG numBits, T dataIn, bool bLSB = true ) { ASSERT( pData != 0 ); // Number of bits in the passed in type const ULONG TYPE_BIT_COUNT = (ULONG)(sizeof( T ) * BITS_PER_BYTE); ASSERT( numBits > 0 && numBits <= TYPE_BIT_COUNT); // Requesting too much? if (currentOffset < maxOffset) { ULONG bitsToGo = maxOffset - currentOffset; if (bitsToGo < numBits) { return ERROR_NOT_ENOUGH_MEMORY; } } else if (currentOffset == maxOffset) { // Silly rabbit, don't bother to call us if you don't want any bits! return ERROR_INVALID_PARAMETER; } else { return ERROR_NOT_ENOUGH_MEMORY; } // Advance to first valid byte pData += (currentOffset / BITS_PER_BYTE); // Since we don't really care about performance for bit packing // (we do not anticipate this being called as frequently as bit // parsing) we always use the generic approach // Reduce input to a bit array BYTE bits[MAX_TYPE_BITS]; ULONG bitsExtracted = 0; while (bitsExtracted < numBits) { if (bLSB == true) { BYTE bit = (BYTE)(dataIn & (T)1); bits[bitsExtracted++] = bit; } else { BYTE bit = (BYTE)(dataIn & (T)1); bits[numBits - ++bitsExtracted] = bit; } dataIn >>= 1; } // Store current offset ULONG offset = currentOffset; // Add in each bit - one at a time bitsExtracted = 0; while (bitsExtracted != numBits) { // How many bits are left in the current byte? ULONG bitsLeft = BITS_PER_BYTE - (offset % BITS_PER_BYTE); // Shift input bit over to desired destination BYTE tmp = bits[bitsExtracted++]; if (bLSB == true) { tmp <<= (BITS_PER_BYTE - bitsLeft); } else { tmp <<= bitsLeft - 1; } *pData |= tmp; // Advance to next byte in buffer? offset++; if (offset % BITS_PER_BYTE == 0) { pData++; } } currentOffset += numBits; return NO_ERROR; } /*=========================================================================*/ // cBitPacker Methods /*=========================================================================*/ /*=========================================================================== METHOD: cBitPacker (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ cBitPacker::cBitPacker() : mpData( 0 ), mOffset( 0 ), mMaxAttainedOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { // Nothing to do } /*=========================================================================== METHOD: cBitPacker (Public Method) DESCRIPTION: Constructor (from a buffer) PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ cBitPacker::cBitPacker( BYTE * pData, ULONG dataBitSize ) : mpData( 0 ), mOffset( 0 ), mMaxAttainedOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { SetData( pData, dataBitSize ); } /*=========================================================================== METHOD: ~cBitPacker (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cBitPacker::~cBitPacker() { // Nothing to do } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a CHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, CHAR dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a SHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, SHORT dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a LONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, LONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a LONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, LONGLONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a UCHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, UCHAR dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a USHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, USHORT dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a ULONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, ULONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a ULONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, ULONGLONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: ReleaseData (Public Method) DESCRIPTION: Release the data being parsed RETURN VALUE: None ===========================================================================*/ void cBitPacker::ReleaseData() { // Clear out current buffer mpData = 0; mOffset = 0; mMaxAttainedOffset = 0; mMaxOffset = 0; }; /*=========================================================================== METHOD: SetData (Public Method) DESCRIPTION: Set the data being parsed PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ void cBitPacker::SetData( BYTE * pData, ULONG dataBitSize ) { // Release current buffer ReleaseData(); // Anything to parse? if (pData != 0) { // Yes mpData = pData; mMaxOffset = dataBitSize; } else { // No ASSERT( mpData != 0 ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/BitPacker.h000077500000000000000000000134571455567757300223060ustar00rootroot00000000000000/*=========================================================================== FILE: BitPacker.h DESCRIPTION: Declaration of cBitPacker class PUBLIC CLASSES AND METHODS: cBitPacker This class packs bits into a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- #include "BitParser.h" /*=========================================================================*/ // Class cBitPacker // // Class to assist in parsing a buffer into bit/byte specified fields /*=========================================================================*/ class cBitPacker { public: // Constructor (default) cBitPacker(); // Constructor (from a buffer) cBitPacker( BYTE * pData, ULONG dataBitSize ); // Destructor ~cBitPacker(); // (Inline) Returns the number of bits left in the buffer (from the // current working bit offset) ULONG GetNumBitsLeft() const { return (mMaxOffset - mOffset); }; // (Inline) Returns the number of bits in the buffer that have been // written (essentially the current working bit offset) ULONG GetNumBitsWritten() const { return (mOffset); }; // (Inline) Returns the number of bits in the buffer that have been // written (essentially the maximum value the working bit offset // attained up to now) ULONG GetTotalBitsWritten() const { return mMaxAttainedOffset; }; // (Inline) Set current working bit offset void SetOffset( ULONG offset ) { mOffset = offset; if (mOffset > mMaxOffset) { mOffset = mMaxOffset; } if (mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } }; // (Inline) Are we parsing LSB -> MSB (the default)? bool GetLSBMode() { return mbLSB; }; // (Inline) Parse LSB -> MSB (if true) or MSB -> LSB void SetLSBMode( bool bLSB ) { mbLSB = bLSB; }; // Write 'numBits' from a CHAR (advances offset) DWORD Set( ULONG numBits, CHAR dataIn ); // Write 'numBits' from a SHORT (advances offset) DWORD Set( ULONG numBits, SHORT dataIn ); // Write 'numBits' from a LONG (advances offset) DWORD Set( ULONG numBits, LONG dataIn ); // Write 'numBits' from a LONGLONG (advances offset) DWORD Set( ULONG numBits, LONGLONG dataIn ); // Write 'numBits' from a UCHAR (advances offset) DWORD Set( ULONG numBits, UCHAR dataIn ); // Write 'numBits' from a USHORT (advances offset) DWORD Set( ULONG numBits, USHORT dataIn ); // Write 'numBits' from a ULONG (advances offset) DWORD Set( ULONG numBits, ULONG dataIn ); // Write 'numBits' from a ULONGLONG (advances offset) DWORD Set( ULONG numBits, ULONGLONG dataIn ); // Release the data being parsed void ReleaseData(); // Set the data being parsed void SetData( BYTE * pData, ULONG dataBitSize ); protected: /* Data buffer */ BYTE * mpData; /* Current bit-specified offset */ ULONG mOffset; /* Maximum value the above bit offset attained */ ULONG mMaxAttainedOffset; /* Maximum bit-specified offset */ ULONG mMaxOffset; /* Are we parsing LSB -> MSB (the default)? */ bool mbLSB; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/BitParser.cpp000077500000000000000000000362531455567757300226670ustar00rootroot00000000000000/*=========================================================================== FILE: BitParser.cpp DESCRIPTION: Implementation of cBitParser class PUBLIC CLASSES AND METHODS: cBitParser This class extracts bits from a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "BitParser.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- static BYTE MASK[BITS_PER_BYTE + 1] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF }; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetUnsignedVal (Public Method) DESCRIPTION: Get an unsigned value from the bit source (reading least significant bits first) PARAMETERS: pData [ I ] - Data buffer currentOffset [I/O] - Current bit offset into above buffer maxOffset [ I ] - Maximum bit offset into above buffer numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value bLSB [ I ] - Parse LSB -> MSB? RETURN VALUE: DWORD ===========================================================================*/ template DWORD GetUnsignedVal( const BYTE * pData, ULONG & currentOffset, ULONG maxOffset, ULONG numBits, T & dataOut, bool bLSB = true ) { ASSERT( pData != 0 ); // Number of bits in the passed in type const ULONG TYPE_BIT_COUNT = (ULONG)(sizeof( T ) * BITS_PER_BYTE); // Bad parameters? if (numBits == 0 || numBits > TYPE_BIT_COUNT || numBits > MAX_TYPE_BITS) { return ERROR_INVALID_PARAMETER; } // Requesting too much? if (currentOffset < maxOffset) { ULONG bitsToGo = maxOffset - currentOffset; if (bitsToGo < numBits) { return ERROR_NOT_ENOUGH_MEMORY; } } else { // No bits left! return ERROR_NOT_ENOUGH_MEMORY; } // Advance to first valid bit pData += (currentOffset / BITS_PER_BYTE); // Number of bits left in current byte ULONG bitsLeft = BITS_PER_BYTE - (currentOffset % BITS_PER_BYTE); if (bLSB == true) { // Extracting native types on byte boundaries? if (numBits == TYPE_BIT_COUNT && bitsLeft == BITS_PER_BYTE) { // Yes, a simple cast will suffice dataOut = *((T *)pData); currentOffset += numBits; return NO_ERROR; } // Extracting some small number of bits? if (numBits <= bitsLeft) { // Yes, simply shift back to origin and AND with correct mask BYTE tmp = *pData; tmp >>= (BITS_PER_BYTE - bitsLeft); tmp &= MASK[numBits]; dataOut = (T)tmp; currentOffset += numBits; return NO_ERROR; } } // Not either of the simple cases - extract the relevant bits // and then build the output // Extract bits BYTE bits[MAX_TYPE_BITS]; ULONG bitsExtracted = 0; while (bitsExtracted < numBits) { BYTE bit = *pData; if (bLSB == true) { bit <<= (bitsLeft - 1); bit >>= (BITS_PER_BYTE - 1); bits[bitsExtracted++] = bit; } else { bit >>= (bitsLeft - 1); bit &= 0x01; bits[numBits - ++bitsExtracted] = bit; } bitsLeft--; if (bitsLeft == 0) { pData++; bitsLeft = BITS_PER_BYTE; } } // Reassemble to form output value dataOut = 0; T tmp = 0; for (ULONG b = 0; b < numBits; b++) { tmp = bits[b]; tmp <<= b; dataOut |= tmp; } currentOffset += numBits; return NO_ERROR; } /*=========================================================================== METHOD: GetSignedVal (Public Method) DESCRIPTION: Get an signed value from the bit source (reading least significant bits first), just gets the equivalent unsigned representation and then sign-extends as necessary PARAMETERS: pData [ I ] - Data buffer currentOffset [I/O] - Current bit offset into above buffer maxOffset [ I ] - Maximum bit offset into above buffer numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value bLSB [ I ] - Parse LSB -> MSB? RETURN VALUE: DWORD ===========================================================================*/ template DWORD GetSignedVal( const BYTE * pData, ULONG & currentOffset, ULONG maxOffset, ULONG numBits, T & dataOut, bool bLSB = true ) { DWORD rc = GetUnsignedVal( pData, currentOffset, maxOffset, numBits, dataOut, bLSB ); if (rc == NO_ERROR) { // If the highest-order bit is one, we must sign-extend bool bSignExtend = (numBits < (sizeof( T ) * BITS_PER_BYTE)) && ((dataOut >> (numBits - 1)) & 1) == 1; if (bSignExtend == true) { T mask = (T)((~0) << numBits); dataOut |= mask; } } return rc; } /*=========================================================================*/ // cBitParser Methods /*=========================================================================*/ /*=========================================================================== METHOD: cBitParser (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ cBitParser::cBitParser() : mpData( 0 ), mOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { // Nothing to do } /*=========================================================================== METHOD: cBitParser (Public Method) DESCRIPTION: Constructor (from a buffer) PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ cBitParser::cBitParser( const BYTE * pData, ULONG dataBitSize ) : mpData( 0 ), mOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { SetData( pData, dataBitSize ); } /*=========================================================================== METHOD: cBitParser (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cBitParser::~cBitParser() { // Nothing to do } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a CHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, CHAR & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a SHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, SHORT & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a LONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, LONG & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a LONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, LONGLONG & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a UCHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, UCHAR & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a USHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, USHORT & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a ULONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, ULONG & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a ULONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, ULONGLONG & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: ReleaseData (Public Method) DESCRIPTION: Release the data being parsed RETURN VALUE: None ===========================================================================*/ void cBitParser::ReleaseData() { // Clear out current buffer mpData = 0; mOffset = 0; mMaxOffset = 0; }; /*=========================================================================== METHOD: SetData (Public Method) DESCRIPTION: Set the data being parsed PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ void cBitParser::SetData( const BYTE * pData, ULONG dataBitSize ) { // Release current buffer ReleaseData(); // Anything to parse? if (pData != 0) { // Yes mpData = pData; mMaxOffset = dataBitSize; } else { // No ASSERT( mpData != 0 ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/BitParser.h000077500000000000000000000142131455567757300223240ustar00rootroot00000000000000/*=========================================================================== FILE: BitParser.h DESCRIPTION: Declaration of cBitParser class PUBLIC CLASSES AND METHODS: cBitParser This class extracts bits from a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Number of bits in a byte const ULONG BITS_PER_BYTE = 8; // Maximum number of bits we will parse for any supported type const ULONG MAX_TYPE_BITS = (ULONG)sizeof(ULONGLONG) * BITS_PER_BYTE; /*=========================================================================== METHOD: ByteSwap (Inline Public Method) DESCRIPTION: Changes little-endian values to big-endian, and vice versa PARAMETERS: data [ I ] - Data being byte-swapped RETURN VALUE: None ===========================================================================*/ template void ByteSwap( T & data ) { // Just reverse the order of the bytes PBYTE pL; PBYTE pR; for (pL = (PBYTE)&data, pR = pL + sizeof( T ) - 1; pL < pR; ++pL, --pR) { *pL = *pL ^ *pR; *pR = *pL ^ *pR; *pL = *pL ^ *pR; } }; /*=========================================================================*/ // Class cBitParser // // Class to assist in parsing a buffer into bit/byte specified fields /*=========================================================================*/ class cBitParser { public: // Constructor (default) cBitParser(); // Constructor (from a buffer) cBitParser( const BYTE * pData, ULONG dataBitSize ); // Destructor ~cBitParser(); // (Inline) Returns the number of bits left in the buffer (from the // current working bit offset) ULONG GetNumBitsLeft() const { return (mMaxOffset - mOffset); }; // (Inline) Returns the number of bits in the buffer that have been // processed (essentially the current working bit offset) ULONG GetNumBitsParsed() const { return (mOffset); }; // (Inline) Set current working bit offset void SetOffset( ULONG offset ) { mOffset = offset; if (mOffset > mMaxOffset) { mOffset = mMaxOffset; } }; // (Inline) Are we parsing LSB -> MSB (the default)? bool GetLSBMode() { return mbLSB; }; // (Inline) Parse LSB -> MSB (if true) or MSB -> LSB void SetLSBMode( bool bLSB ) { mbLSB = bLSB; }; // Return 'numBits' as a CHAR (advances offset) DWORD Get( ULONG numBits, CHAR & dataOut ); // Return 'numBits' as a SHORT (advances offset) DWORD Get( ULONG numBits, SHORT & dataOut ); // Return 'numBits' as a LONG (advances offset) DWORD Get( ULONG numBits, LONG & dataOut ); // Return 'numBits' as a LONGLONG (advances offset) DWORD Get( ULONG numBits, LONGLONG & dataOut ); // Return 'numBits' as a UCHAR (advances offset) DWORD Get( ULONG numBits, UCHAR & dataOut ); // Return 'numBits' as a USHORT (advances offset) DWORD Get( ULONG numBits, USHORT & dataOut ); // Return 'numBits' as a ULONG (advances offset) DWORD Get( ULONG numBits, ULONG & dataOut ); // Return 'numBits' as a ULONGLONG (advances offset) DWORD Get( ULONG numBits, ULONGLONG & dataOut ); // Release the data being parsed void ReleaseData(); // Set the data being parsed void SetData( const BYTE * pData, ULONG dataBitSize ); protected: /* Data buffer */ const BYTE * mpData; /* Current bit-specified offset */ ULONG mOffset; /* Maximum bit-specified offset */ ULONG mMaxOffset; /* Are we parsing LSB -> MSB (the default)? */ bool mbLSB; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/CRC.cpp000077500000000000000000000152451455567757300214010ustar00rootroot00000000000000/*=========================================================================== FILE: CRC.cpp DESCRIPTION: 16-bit LSB CRC computation/verification PUBLIC CLASSES AND METHODS: SetCRC() CheckCRC() CalculateCRC() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "CRC.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // CRC intermediates static USHORT CRCTable[CRC_TABLE_SIZE] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 }; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: SetCRC (Free Method) DESCRIPTION: Calculate and append a 16-bit CRC to given data PARAMETERS: pData [ I ] - The data buffer dataLen [ I ] - The length of the above buffer RETURN VALUE: None ===========================================================================*/ void SetCRC( PBYTE pData, ULONG dataLen ) { // Calculate CRC USHORT CRC = CalculateCRC( pData, dataLen * 8 ); // Add CRC to data pData[dataLen] = (BYTE)(CRC & 0x00ff); pData[dataLen + 1] = (BYTE)(CRC >> 8); } /*=========================================================================== METHOD: CheckCRC (Free Method) DESCRIPTION: Check the CRC validity of the given data PARAMETERS: pData [ I ] - The data buffer dataLen [ I ] - The length of the above buffer RETURN VALUE: bool: true - CRC checks out OK false - CRC doesn't cut the mustard ===========================================================================*/ bool CheckCRC( const BYTE * pData, ULONG dataLen ) { // There must be data ASSERT( pData != 0 ); ASSERT( dataLen > 0 ); // Calculate CRC USHORT CRC = CalculateCRC( pData, dataLen * 8 ); return (CRC == CRC_16_L_OK ? true : false); } /*=========================================================================== METHOD: CalculateCRC (Free Method) DESCRIPTION: Calculate a 16-bit CRC value PARAMETERS: pBuf [ I ] - The data buffer bitLen [ I ] - The length of the above buffer (in bits) RETURN VALUE: USHORT: The 16-bit calculated CRC ===========================================================================*/ USHORT CalculateCRC( const BYTE * pBuf, ULONG bitLen ) { // Remainders are not allowed ASSERT( bitLen % 8 == 0 ); // There must be a buffer ASSERT( pBuf != 0 ); USHORT CRC; for (CRC = CRC_16_L_SEED; bitLen >= 8; bitLen -= 8, pBuf++) { CRC = CRCTable[(CRC ^ *pBuf) & 0x00ff] ^ (CRC >> 8); } return ~CRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/CRC.h000077500000000000000000000060711455567757300210430ustar00rootroot00000000000000/*=========================================================================== FILE: CRC.h DESCRIPTION: 16-bit LSB CRC computation/verification PUBLIC CLASSES AND METHODS: SetCRC() CheckCRC() CalculateCRC() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const USHORT CRC_16_L_POLYNOMIAL = 0x8408; const USHORT CRC_16_L_SEED = 0xFFFF; const USHORT CRC_16_L_OK = 0x0F47; const USHORT CRC_TABLE_SIZE = 256; const USHORT CRC_SIZE = 2; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // Calculate and append a 16-bit CRC to given data, the calculated CRC // value stored at pData[dataLen] & pData[dataLen + 1] void SetCRC( PBYTE pData, ULONG dataLen ); // Check a CRC value for the given data, dataLen includes the 2 byte CRC // value at the end of the buffer bool CheckCRC( const BYTE * pData, ULONG dataLen ); // Calculate a CRC value for the given data USHORT CalculateCRC( const BYTE * pBuf, ULONG bitLen ); libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/Comm.cpp000077500000000000000000000370431455567757300216650ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.cpp DESCRIPTION: Implementation of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Comm.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads PARAMETERS: pData [ I ] Asynchronous read object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxThread( void * pData ) { cComm * pComm = (cComm*)pData; if (pComm == NULL || pComm->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pComm->mCommandPipe[READING], &inputSet ); int largestFD = pComm->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pComm->mCommandPipe[READING], &outputSet ) == true) { // Read from the pipe BYTE cmd; status = read( pComm->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pComm->mPort, &inputSet ); largestFD = std::max( pComm->mPort, pComm->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; } else { // EXIT_CMD or anything else break; } } else if (FD_ISSET( pComm->mPort, &outputSet ) == true) { // Stop watching for read data FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; // Perform a read status = read( pComm->mPort, pComm->mpBuffer, pComm->mBuffSz ); cIOCallback * pCallback = pComm->mpRxCallback; pComm->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } } return 0; }; /*=========================================================================*/ // cComm Methods /*=========================================================================*/ /*=========================================================================== METHOD: cComm (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cComm::cComm() : mPortName( "" ), mPort( INVALID_HANDLE_VALUE ), mpRxCallback( 0 ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cComm (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cComm::~cComm() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cComm::IsValid() { // Nothing to do, dependant on extended class functionality return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - Name of port to open (IE: /dev/qcqmi0) RETURN VALUE: bool ===========================================================================*/ bool cComm::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mPort != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cComm:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxThread, this ); if (nRet != 0) { TRACE( "cComm::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Opening the com port mPort = open( pPort, O_RDWR ); if (mPort == INVALID_HANDLE_VALUE) { Disconnect(); return false; } // Save port name mPortName = pPort; // Success! return true; } /*=========================================================================== METHOD: RunIOCTL (Public Method) DESCRIPTION: Run an IOCTL on the open file handle PARAMETERS: ioctlReq [ I ] - ioctl request value pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - ioctl return value (0 for success) ===========================================================================*/ int cComm::RunIOCTL( UINT ioctlReq, void * pData ) { if (mPort == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } return ioctl( mPort, ioctlReq, pData ); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cComm::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it TRACE( "cComm::Disconnnect() joining thread\n" ); int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mPort != INVALID_HANDLE_VALUE) { close( mPort ); mPort = INVALID_HANDLE_VALUE; } mPortName.clear(); return bRC; } /*=========================================================================== METHOD: ConfigureSettings (Public Method) DESCRIPTION: Configure the port with the passed in parameters PARAMETERS: pSettings [ I ] - Desired port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::ConfigureSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } tcflush( mPort, TCIOFLUSH ); int nRC = tcsetattr( mPort, TCSANOW, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: GetSettings (Public Method) DESCRIPTION: Return the current port settings PARAMETERS: pSettings [ I ] - Current port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::GetSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } // Get the COM port settings int nRC = tcgetattr( mPort, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelIO() { if (mPort == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelRx() { if (mPort == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelTx() { if (mPort == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cComm::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to stop reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cComm::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // This seems a bit pointless, but we're still going verify // the device is ready for writing, and give it up to // (1000 + num bytes) MS to be ready (in 100 MS chunks) struct timeval TimeOut; fd_set set; int nReady = 0; int nCount = 0; while ( nReady == 0 ) { if (mbCancelWrite == true) { TRACE( "cComm::TxData() write canceled before device was ready\n" ); return false; } if (nCount >= (1000 + bufSz) / 100) { // Timeout is expired break; } FD_ZERO( &set ); FD_SET( mPort, &set ); TimeOut.tv_sec = 0; TimeOut.tv_usec = 100000; nReady = select( mPort + 1, NULL, &set, NULL, &TimeOut ); nCount++; } if (nReady <= 0) { TRACE( "cComm::TxData() Unable to get device ready for" " Write, error %d: %s\n", nReady, strerror( nReady) ); return false; } int nRet = write( mPort, pBuf, bufSz ); if (nRet != bufSz) { TRACE( "cComm::TxData() write returned %d instead of %lu\n", nRet, bufSz ); return false; } #ifdef DEBUG TRACE( "Write of %lu bytes took %llu miliseconds\n", bufSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/Comm.h000077500000000000000000000115401455567757300213240ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.h DESCRIPTION: Declaration of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cIOCallback /*=========================================================================*/ class cIOCallback { public: // (Inline) Constructor cIOCallback() { }; // (Inline) Destructor virtual ~cIOCallback() { }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesTransferred ) = 0; }; /*=========================================================================*/ // Class cComm /*=========================================================================*/ class cComm { public: // Constructor cComm(); // Destructor virtual ~cComm(); // Is this object valid? virtual bool IsValid(); // Connect to the specified port virtual bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int RunIOCTL( UINT ioctlReq, void * pData ); // Disconnect from the current port virtual bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data virtual bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data virtual bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current port name virtual std::string GetPortName() const { return mPortName; }; // Are we currently connected to a port? bool IsConnected() { return (mPort != INVALID_HANDLE_VALUE); }; protected: /* Name of current port */ std::string mPortName; /* Handle to COM port */ int mPort; /* Read callbacks */ cIOCallback * mpRxCallback; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; // Rx thread is allowed complete access friend void * RxThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/CoreDatabase.cpp000077500000000000000000002423321455567757300233060ustar00rootroot00000000000000/*=========================================================================== FILE: CoreDatabase.cpp DESCRIPTION: Implementation of cCoreDatabase class PUBLIC CLASSES AND METHODS: cCoreDatabase This class represents the run-time (read only) version of the core library database Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "CoreDatabase.h" #include "DB2NavTree.h" #include "CoreUtilities.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Uncomment out to enable database load/save timing through cCoreDatabase // #define TIME_DB 1 // Database table file names LPCSTR DB2_FILE_PROTOCOL_FIELD = "Field.txt"; LPCSTR DB2_FILE_PROTOCOL_STRUCT = "Struct.txt"; LPCSTR DB2_FILE_PROTOCOL_ENTITY = "Entity.txt"; LPCSTR DB2_FILE_ENUM_MAIN = "Enum.txt"; LPCSTR DB2_FILE_ENUM_ENTRY = "EnumEntry.txt"; // Database table file names LPCSTR DB2_TABLE_PROTOCOL_FIELD = "Field"; LPCSTR DB2_TABLE_PROTOCOL_STRUCT = "Struct"; LPCSTR DB2_TABLE_PROTOCOL_ENTITY = "Entity"; LPCSTR DB2_TABLE_ENUM_MAIN = "Enum"; LPCSTR DB2_TABLE_ENUM_ENTRY = "Enum Entry"; // An empty (but not NULL) string LPCSTR EMPTY_STRING = ""; // Value seperator for database text LPCSTR DB2_VALUE_SEP = "^"; // Sub-value (i.e. within a particular value) seperator for database text LPCSTR DB2_SUBVAL_SEP = ","; // Maximum amount of recursion allowed in protocol entity structure processing const ULONG MAX_NESTING_LEVEL = 32; // The default logger (for backwards compatibility) cDB2TraceLog gDB2DefaultLog; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: CopyQuotedString (Public Method) DESCRIPTION: Convert a string (in quotes) to a string (minus) quotes and copy into an allocated buffer PARAMETERS: pString [ I ] - The string being de-quoted/copied RETURN VALUE: LPSTR: The copy (returns 0 upon error) ===========================================================================*/ LPCSTR CopyQuotedString( LPSTR pString ) { // Get string length ULONG len = (ULONG)strlen( pString ); // Adjust to remove trailing spaces while (len > 0 && pString[len - 1] == ' ') { pString[len - 1] = 0; len--; } // Long enough (and quoted?) if ( (len >= 2) && (pString[0] == '\"') && (pString[len - 1] == '\"') ) { if (len == 2) { return EMPTY_STRING; } else { // Attempt to allocate a copy LPSTR pRet = new char[len - 1]; if (pRet != 0) { ULONG bytes = (len - 2) * sizeof( char ); memcpy( (PVOID)pRet, (LPCVOID)&pString[1], (SIZE_T)bytes ); pRet[len - 2] = 0; return pRet; } } } return 0; } /*=========================================================================*/ // sDB2ProtocolEntity Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2ProtocolEntity::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: Type // 1: "Key" // 2: "Name" // 3: Struct ID // 4: Format specifier ID (optional) // 5: Internal only flag (optional) // 6: Extended format specifier ID (optional) const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[2] ); if (pCopy != 0) { mpName = pCopy; mType = (eDB2EntityType)strtol( tokens[0], 0, 10 ); // Convert key/populate ID mID.push_back( (ULONG)mType ); CSVStringToContainer( DB2_SUBVAL_SEP, tokens[1], mID, false ); mStructID = strtol( tokens[3], 0, 10 ); // Format specifier? if (toks > NUM_REQ_VALS) { mFormatID = strtol( tokens[NUM_REQ_VALS], 0, 10 ); } // Internal only flag? if (toks > NUM_REQ_VALS + 1) { mbInternal = (strtoul( tokens[NUM_REQ_VALS + 1], 0, 10 ) != 0); } // Extended format specifier ID? if (toks > NUM_REQ_VALS + 2) { mFormatExID = strtol( tokens[NUM_REQ_VALS + 2], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2ProtocolEntity::IsValid() const { // The type has to be valid if (::IsValid( mType ) == false) { return false; } // The ID must consists of at least two entries if (mID.size() < 2) { return false; } // The first entry in the ID has to be the type if (mID[0] != (ULONG)mType) { return false; } // The structure ID has to be >= -1) if (mStructID < -1) { return false; } // The format specifier has to be >= -1) if (mFormatID < -1) { return false; } // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } return true; } /*=========================================================================*/ // sDB2Fragment Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: Order // 2: Type // 3: Val // 4: "Name" // 5: Offset // 6: Mod Type // 7: "Mod Value" const ULONG NUM_REQ_VALS = 8; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from modifier value and copy LPCSTR pVal = CopyQuotedString( tokens[7] ); if (pVal != 0) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[4] ); if (pCopy != 0) { mStructID = strtoul( tokens[0], 0, 10 ); mFragmentOrder = strtoul( tokens[1], 0, 10 ); mFragmentValue = strtoul( tokens[3], 0, 10 ); mFragmentOffset = strtol( tokens[5], 0, 10 ); mFragmentType = (eDB2FragmentType)strtol( tokens[2], 0, 10 ); mModifierType = (eDB2ModifierType)strtol( tokens[6], 0, 10 );; mpModifierValue = pVal; mpName = pCopy; bRC = IsValid(); } } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::IsValid() const { // The fragment type has to be valid if (::IsValid( mFragmentType ) == false) { return false; } // The modifier type has to be valid if (::IsValid( mModifierType ) == false) { return false; } // There has to be a name (possibly empty) if (mpName == 0) { return false; } // There has to be a modifier value (possibly empty) if (mpModifierValue == 0) { return false; } // Directives can only be given for the first fragment if ( (mFragmentType == eDB2_FRAGMENT_MSB_2_LSB) || (mFragmentType == eDB2_FRAGMENT_LSB_2_MSB) ) { if (mFragmentOrder > 0) { return false; } } // Validate modifier switch (mModifierType) { case eDB2_MOD_NONE: if (mpModifierValue != 0 && mpModifierValue[0] != 0) { // Modifier string needs to be empty return false; } break; case eDB2_MOD_CONSTANT_ARRAY: case eDB2_MOD_VARIABLE_ARRAY: case eDB2_MOD_OPTIONAL: case eDB2_MOD_VARIABLE_ARRAY2: case eDB2_MOD_VARIABLE_ARRAY3: if (mpModifierValue == 0 || mpModifierValue[0] == 0) { // Needs to be a modifier string return false; } break; case eDB2_MOD_VARIABLE_STRING1: case eDB2_MOD_VARIABLE_STRING2: case eDB2_MOD_VARIABLE_STRING3: if (mpModifierValue == 0 || mpModifierValue[0] == 0) { // Needs to be a modifier string return false; } if (mFragmentType != eDB2_FRAGMENT_FIELD) { // Only valid when modifying fields (strings) return false; } break; } if (mFragmentType == eDB2_FRAGMENT_CONSTANT_PAD && mFragmentValue == 0) { return false; } return true; } /*=========================================================================== METHOD: BuildCondition (Static Public Method) DESCRIPTION: Build a simple condition string PARAMETERS: id [ I ] - Field ID op [ I ] - Operator val [ I ] - Value (or field ID) bF2F [ I ] - Field to field expression? RETURN VALUE: std::string ===========================================================================*/ std::string sDB2Fragment::BuildCondition( ULONG id, eDB2Operator op, LONGLONG val, bool bF2F ) { std::ostringstream tmp; if (::IsValid( op ) == true) { if (bF2F == false) { switch (op) { case eDB2_OP_LT: tmp << (UINT)id << " " << "<" << val; break; case eDB2_OP_LTE: tmp << (UINT)id << " " << "<=" << val; break; case eDB2_OP_EQ: tmp << (UINT)id << " " << "=" << val; break; case eDB2_OP_NEQ: tmp << (UINT)id << " " << "!=" << val; break; case eDB2_OP_GTE: tmp << (UINT)id << " " << ">=" << val; break; case eDB2_OP_GT: tmp << (UINT)id << " " << ">" << val; break; case eDB2_OP_DIV: tmp << (UINT)id << " " << "%" << val; break; case eDB2_OP_NDIV: tmp << (UINT)id << " " << "!%" << val; break; } } else { switch (op) { case eDB2_OP_LT: tmp << (UINT)id << " " << "f<" << val; break; case eDB2_OP_LTE: tmp << (UINT)id << " " << "f<=" << val; break; case eDB2_OP_EQ: tmp << (UINT)id << " " << "f=" << val; break; case eDB2_OP_NEQ: tmp << (UINT)id << " " << "f!=" << val; break; case eDB2_OP_GTE: tmp << (UINT)id << " " << "f>=" << val; break; case eDB2_OP_GT: tmp << (UINT)id << " " << "f>" << val; break; case eDB2_OP_DIV: tmp << (UINT)id << " " << "f%" << val; break; case eDB2_OP_NDIV: tmp << (UINT)id << " " << "f!%" << val; break; } } } std::string retStr = tmp.str(); return retStr; } /*=========================================================================== METHOD: EvaluateCondition (Static Public Method) DESCRIPTION: Evaluate a simple condition PARAMETERS: valA [ I ] - Left value op [ I ] - Operator valB [ I ] - Right value RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::EvaluateCondition( LONGLONG valA, eDB2Operator op, LONGLONG valB ) { bool bOK = false; if (::IsValid( op ) == true) { switch (op) { case eDB2_OP_LT: bOK = (valA < valB); break; case eDB2_OP_LTE: bOK = (valA <= valB); break; case eDB2_OP_EQ: bOK = (valA == valB); break; case eDB2_OP_NEQ: bOK = (valA != valB); break; case eDB2_OP_GTE: bOK = (valA >= valB); break; case eDB2_OP_GT: bOK = (valA > valB); break; case eDB2_OP_DIV: bOK = ((valA % valB) == 0); break; case eDB2_OP_NDIV: bOK = ((valA % valB) != 0); break; } } return bOK; } /*=========================================================================== METHOD: ParseCondition (Static Public Method) DESCRIPTION: Parse a simple condition PARAMETERS: pCondition [ I ] - Condition string id [ O ] - Field ID op [ O ] - Operator val [ O ] - Value (or field ID) bF2F [ O ] - Field to field expression? RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::ParseCondition( LPCSTR pCondition, ULONG & id, eDB2Operator & op, LONGLONG & val, bool & bF2F ) { // Assume error bool bOK = false; // Even a condition to start with? if (pCondition == 0 || pCondition == EMPTY_STRING) { return bOK; } // Parse condition to tokens (field ID operator value) int nSize = strlen( pCondition ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, pCondition, nSize ); std::vector tokens; ParseTokens( " ", pCopy, tokens ); if (tokens.size() == 3) { // Covert first token to field ID ULONG fieldID = strtoul( tokens[0], 0, 10 ); // Grab the value for the given field ID LONGLONG fieldVal = 0; bOK = StringToLONGLONG( tokens[2], 0, fieldVal ); if (bOK == true) { std::string opStr = tokens[1]; // std::string version of Trim() int nFirst = opStr.find_first_not_of( ' ' ); int nLast = opStr.find_last_not_of( ' ' ); if (nFirst == -1 || nLast == -1) { // Something went horribly wrong, empty string or all spaces delete [] pCopy; return false; } opStr = opStr.substr( nFirst, nLast - nFirst + 1 ); // std::string version of MakeLower() transform( opStr.begin(), opStr.end(), opStr.begin(), tolower ); bF2F = false; if (opStr == "<") { op = eDB2_OP_LT; } else if (opStr == "<=") { op = eDB2_OP_LTE; } else if (opStr == "=") { op = eDB2_OP_EQ; } else if (opStr == "!=") { op = eDB2_OP_NEQ; } else if (opStr == ">=") { op = eDB2_OP_GTE; } else if (opStr == ">") { op = eDB2_OP_GT; } else if (opStr == "%") { op = eDB2_OP_DIV; } else if (opStr == "!%") { op = eDB2_OP_NDIV; } else if (opStr == "f<") { bF2F = true; op = eDB2_OP_LT; } else if (opStr == "f<=") { bF2F = true; op = eDB2_OP_LTE; } else if (opStr == "f=") { bF2F = true; op = eDB2_OP_EQ; } else if (opStr == "f!=") { bF2F = true; op = eDB2_OP_NEQ; } else if (opStr == "f>=") { bF2F = true; op = eDB2_OP_GTE; } else if (opStr == "f>") { bF2F = true; op = eDB2_OP_GT; } else if (opStr == "f%") { bF2F = true; op = eDB2_OP_DIV; } else if (opStr == "f!%") { bF2F = true; op = eDB2_OP_NDIV; } else { bOK = false; } if (bOK == true) { id = fieldID; val = fieldVal; } } } delete [] pCopy; return bOK; } /*=========================================================================== METHOD: BuildExpression (Static Public Method) DESCRIPTION: Build a simple expression string PARAMETERS: id [ I ] - Field ID op [ I ] - Operator val [ I ] - Value (or field ID) bF2F [ I ] - Field to field expression? RETURN VALUE: std::string ===========================================================================*/ std::string sDB2Fragment::BuildExpression( ULONG id, eDB2ExpOperator op, LONGLONG val, bool bF2F ) { std::ostringstream tmp; if (::IsValid( op ) == true) { if (bF2F == false) { switch (op) { case eDB2_EXPOP_ADD: tmp << (UINT)id << " " << "+" << val; break; case eDB2_EXPOP_SUB: tmp << (UINT)id << " " << "-" << val; break; case eDB2_EXPOP_MUL: tmp << (UINT)id << " " << "*" << val; break; case eDB2_EXPOP_DIV: tmp << (UINT)id << " " << "/" << val; break; case eDB2_EXPOP_REM: tmp << (UINT)id << " " << "%" << val; break; case eDB2_EXPOP_MIN: tmp << (UINT)id << " " << "min" << val; break; case eDB2_EXPOP_MAX: tmp << (UINT)id << " " << "max" << val; break; } } else { switch (op) { case eDB2_EXPOP_ADD: tmp << (UINT)id << " " << "f+" << val; break; case eDB2_EXPOP_SUB: tmp << (UINT)id << " " << "f-" << val; break; case eDB2_EXPOP_MUL: tmp << (UINT)id << " " << "f*" << val; break; case eDB2_EXPOP_DIV: tmp << (UINT)id << " " << "f/" << val; break; case eDB2_EXPOP_REM: tmp << (UINT)id << " " << "f%" << val; break; case eDB2_EXPOP_MIN: tmp << (UINT)id << " " << "fmin" << val; break; case eDB2_EXPOP_MAX: tmp << (UINT)id << " " << "fmax" << val; break; } } } std::string retStr = tmp.str(); return retStr; } /*=========================================================================== METHOD: EvaluateExpression (Static Public Method) DESCRIPTION: Evaluate a simple expression PARAMETERS: valA [ I ] - Left value op [ I ] - Operator valB [ I ] - Right value res [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::EvaluateExpression( LONGLONG valA, eDB2ExpOperator op, LONGLONG valB, LONGLONG & res ) { bool bOK = false; if (::IsValid( op ) == true) { bOK = true; switch (op) { case eDB2_EXPOP_ADD: res = valA + valB; break; case eDB2_EXPOP_SUB: res = valA - valB; break; case eDB2_EXPOP_MUL: res = valA * valB; break; case eDB2_EXPOP_DIV: res = valA / valB; break; case eDB2_EXPOP_REM: res = valA % valB; break; case eDB2_EXPOP_MIN: res = valA; if (valA > valB) { res = valB; } break; case eDB2_EXPOP_MAX: res = valA; if (valA < valB) { res = valB; } break; default: bOK = false; break; } } return bOK; } /*=========================================================================== METHOD: ParseExpression (Static Public Method) DESCRIPTION: Parse a simple expression PARAMETERS: pExpr [ I ] - Expression string id [ O ] - Field ID op [ O ] - Operator val [ O ] - Value (or Field ID) bF2F [ O ] - Field to field expression? RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::ParseExpression( LPCSTR pExpr, ULONG & id, eDB2ExpOperator & op, LONGLONG & val, bool & bF2F ) { // Assume error bool bOK = false; // Even a condition to start with? if (pExpr == 0 || pExpr == EMPTY_STRING) { return bOK; } // Parse condition to tokens (field ID operator value) int nSize = strlen( pExpr ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, pExpr, nSize ); std::vector tokens; ParseTokens( " ", pCopy, tokens ); if (tokens.size() == 3) { // Covert first token to field ID ULONG fieldID = strtoul( tokens[0], 0, 10 ); // Grab the value for the given field ID LONGLONG fieldVal = 0; bOK = StringToLONGLONG( tokens[2], 0, fieldVal ); if (bOK == true) { std::string opStr = tokens[1]; // std::string version of Trim() int nFirst = opStr.find_first_not_of( ' ' ); int nLast = opStr.find_last_not_of( ' ' ); if (nFirst == -1 || nLast == -1) { // Something went horribly wrong, empty string or all spaces delete [] pCopy; return false; } opStr = opStr.substr( nFirst, nLast - nFirst + 1 ); // std::string version of MakeLower() transform( opStr.begin(), opStr.end(), opStr.begin(), tolower ); bF2F = false; if (opStr == "+") { op = eDB2_EXPOP_ADD; } else if (opStr == "-") { op = eDB2_EXPOP_SUB; } else if (opStr == "*") { op = eDB2_EXPOP_MUL; } else if (opStr == "/") { op = eDB2_EXPOP_DIV; } else if (opStr == "%") { op = eDB2_EXPOP_REM; } else if (opStr == "min") { op = eDB2_EXPOP_MIN; } else if (opStr == "max") { op = eDB2_EXPOP_MAX; } else if (opStr == "f+") { bF2F = true; op = eDB2_EXPOP_ADD; } else if (opStr == "f-") { bF2F = true; op = eDB2_EXPOP_SUB; } else if (opStr == "f*") { bF2F = true; op = eDB2_EXPOP_MUL; } else if (opStr == "f/") { bF2F = true; op = eDB2_EXPOP_DIV; } else if (opStr == "f%") { bF2F = true; op = eDB2_EXPOP_REM; } else if (opStr == "fmin") { bF2F = true; op = eDB2_EXPOP_MIN; } else if (opStr == "fmax") { bF2F = true; op = eDB2_EXPOP_MAX; } else { bOK = false; } if (bOK == true) { id = fieldID; val = fieldVal; } } } delete [] pCopy; return bOK; } /*=========================================================================*/ // sDB2Field Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Field::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: "Name" // 2: Size // 3: Field type // 4: Field type value // 5: Hexadecimal // 6: Description ID (optional) // 7: Internal only flag (optional) const ULONG NUM_REQ_VALS = 6; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mSize = strtoul( tokens[2], 0, 10 ); mpName = pCopy; mType = (eDB2FieldType)strtol( tokens[3], 0, 10 ); mTypeVal = strtoul( tokens[4], 0, 10 ); mbHex = (strtoul( tokens[5], 0, 10 ) != 0); // Description ID? if (toks > NUM_REQ_VALS) { mDescriptionID = strtol( tokens[NUM_REQ_VALS], 0, 10 ); } // Internal only flag? if (toks > NUM_REQ_VALS + 1) { mbInternal = (strtoul( tokens[NUM_REQ_VALS + 1], 0, 10 ) != 0); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Field::IsValid() const { // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } // The field type must be valid if (::IsValid( mType ) == false) { return false; } // For validating size ULONG minSz = 1; ULONG maxSz = 8; ULONG modVal = 0; // What type of field is this? if (mType == eDB2_FIELD_STD) { eDB2StdFieldType ft = (eDB2StdFieldType)mTypeVal; if (::IsValid( ft ) == false) { return false; } switch (ft) { case eDB2_FIELD_STDTYPE_BOOL: maxSz = 64; break; case eDB2_FIELD_STDTYPE_INT16: case eDB2_FIELD_STDTYPE_UINT16: maxSz = 16; break; case eDB2_FIELD_STDTYPE_INT32: case eDB2_FIELD_STDTYPE_UINT32: case eDB2_FIELD_STDTYPE_FLOAT32: maxSz = 32; break; case eDB2_FIELD_STDTYPE_INT64: case eDB2_FIELD_STDTYPE_UINT64: case eDB2_FIELD_STDTYPE_FLOAT64: maxSz = 64; break; case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U8: // One character, no maximum minSz = 8; maxSz = 0; modVal = 8; break; case eDB2_FIELD_STDTYPE_STRING_U: // One UNICODE character, no maximum minSz = 16; maxSz = 0; modVal = 16; break; case eDB2_FIELD_STDTYPE_STRING_ANT: case eDB2_FIELD_STDTYPE_STRING_UNT: case eDB2_FIELD_STDTYPE_STRING_U8NT: // Size needs to be specified as 0 minSz = maxSz = 0; break; } } else { // Enum must be between 1 - 32 bits in size maxSz = 32; } if (mSize < minSz) { return false; } if (maxSz != 0 && mSize > maxSz) { return false; } if (modVal != 0 && (mSize % modVal) != 0) { return false; } if (mDescriptionID < -1) { return false; } // The name must be valid std::string name = mpName; if (name.find( DB2_VALUE_SEP ) != -1 || name.find( DB2_SUBVAL_SEP ) != -1) { return false; } return true; } /*=========================================================================*/ // sDB2Category Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Category::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: "Name" // 2: Description ID // 3: Parent ID const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mParentID = strtol( tokens[3], 0, 10 ); mpName = pCopy; // Old format used to be a description string, so // first check for quotes if (tokens[2][0] != '\"') { mDescriptionID = strtol( tokens[2], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Category::IsValid() const { // The parent ID has to be greater than or equal to -1 if (mParentID < -1) { return false; } // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // sDB2NVItem Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2NVItem::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: NV Item number // 1: "Name" // 2: "Categories" // 3: Description ID const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { CSVStringToContainer( DB2_SUBVAL_SEP, tokens[2], mCategoryIDs ); mItem = strtoul( tokens[0], 0, 10 ); mpName = pCopy; // Old format used to be a description string, so // first check for quotes if (tokens[3][0] != '\"') { mDescriptionID = strtol( tokens[3], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2NVItem::IsValid() const { // There has to be at least one category ID ULONG cats = (ULONG)mCategoryIDs.size(); if (cats < 1) { return false; } // The category IDs have to be greater than or equal to -1 std::set ::const_iterator pIter = mCategoryIDs.begin(); while (pIter != mCategoryIDs.end()) { if (*pIter++ < -1) { return false; } } // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // sDB2Enum Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Enum::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: "Name" // 2: Description ID // 3: Internal? const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mbInternal = (strtoul( tokens[3], 0, 10 ) != 0); mpName = pCopy; // Old format used to be a description string, so // first check for quotes if (tokens[2][0] != '\"') { mDescriptionID = strtol( tokens[2], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Enum::IsValid() const { // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // sDB2EnumEntry Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2EnumEntry::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: Value // 2: "Name" // 3: Description ID (optional) const ULONG NUM_REQ_VALS = 3; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[2] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mpName = pCopy; // Enum entries are signed by definition, but can be entered // in hexadecimal as they may be unsigned in practice LONG val = -1; StringToLONG( tokens[1], 0, val ); mValue = (INT)val; // Determine hexadecimal flag by performing case-insensitve comparison // of the value string's first two characters with "0x" mbHex = (strncmp( tokens[1], "0x", 2 ) == 0); // Description ID? if (toks > NUM_REQ_VALS) { mDescriptionID = strtol( tokens[NUM_REQ_VALS], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2EnumEntry::IsValid() const { // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // cCoreDatabase Methods /*=========================================================================*/ /*=========================================================================== METHOD: cCoreDatabase (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cCoreDatabase::cCoreDatabase() : mpLog( &gDB2DefaultLog ) { // Nothing to do - database empty, call Initialize() } /*=========================================================================== METHOD: ~cCoreDatabase (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cCoreDatabase::~cCoreDatabase() { Exit(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Version to Load from file Initialize the database - this must be done once (and only once) prior to the database being accessed PARAMETERS pBasePath [ I ] - Base path to database files RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::Initialize( LPCSTR pBasePath ) { bool bRC = true; // Cleanup the last database (if necessary) Exit(); bRC &= LoadEnumTables( pBasePath ); bRC &= LoadStructureTables( pBasePath ); // Build the modifier tables bRC &= BuildModifierTables(); return bRC; } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Version to Load from internal pointers Initialize the database - this must be done once (and only once) prior to the database being accessed PARAMETERS RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::Initialize() { bool bRC = true; // Cleanup the last database (if necessary) Exit(); bRC &= LoadEnumTables(); bRC &= LoadStructureTables(); // Build the modifier tables bRC &= BuildModifierTables(); return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit (cleanup) the database RETURN VALUE: None ===========================================================================*/ void cCoreDatabase::Exit() { FreeDB2Table( mEntityFields ); FreeDB2Table( mEntityStructs ); FreeDB2Table( mProtocolEntities ); FreeDB2Table( mEnumNameMap ); FreeDB2Table( mEnumEntryMap ); tDB2EntityNavMap::iterator pIter = mEntityNavMap.begin(); while (pIter != mEntityNavMap.end()) { cDB2NavTree * pNav = pIter->second; if (pNav != 0) { delete pNav; } pIter++; } mEntityNavMap.clear(); } /*=========================================================================== METHOD: GetEntityNavTree (Public Method) DESCRIPTION: Get the entity navigation tree for the given protocol entity, if none exists one will be built and returned PARAMETERS key [ I ] - Protocol entity key RETURN VALUE: const cDB2NavTree * (0 upon error) ===========================================================================*/ const cDB2NavTree * cCoreDatabase::GetEntityNavTree( const std::vector & key ) const { // Look up entity definition (to find DB string address) sDB2ProtocolEntity tmpEntity; bool bFound = FindEntity( key, tmpEntity ); // Did we find it? if (bFound == false) { // No matching definition in database return 0; } // Obtain the canonical key and use it to look up the nav tree tDB2EntityNavMap::const_iterator pIter = mEntityNavMap.find( key ); if (pIter != mEntityNavMap.end()) { return pIter->second; } // None found, go ahead and build one cDB2NavTree * pNavTree = new cDB2NavTree( *this ); if (pNavTree != 0) { bool bOK = pNavTree->BuildTree( key ); if (bOK == true) { // Store it and return it to the user std::pair , cDB2NavTree *> e( key, pNavTree ); mEntityNavMap.insert( e ); } else { delete pNavTree; pNavTree = 0; } } return pNavTree; } /*=========================================================================== METHOD: FindEntity (Public Method) DESCRIPTION: Find the protocol entity with the specified extended ID PARAMETERS key [ I ] - Protocol entity key to find entity [ O ] - Protocol entity (if found) RETURN VALUE: bool - Success? ===========================================================================*/ bool cCoreDatabase::FindEntity( const std::vector & key, sDB2ProtocolEntity & entity ) const { // Assume failure bool bFound = false; tDB2EntityMap::const_iterator pEntity = mProtocolEntities.find( key ); if (pEntity != mProtocolEntities.end()) { entity = pEntity->second; bFound = true; } return bFound; } /*=========================================================================== METHOD: FindEntity (Public Method) DESCRIPTION: Find the protocol entity with the specified name PARAMETERS pEntityName [ I ] - Protocol entity name to find entity [ O ] - Protocol entity (if found) RETURN VALUE: bool - Success? ===========================================================================*/ bool cCoreDatabase::FindEntity( LPCSTR pEntityName, sDB2ProtocolEntity & entity ) const { // Assume failure bool bFound = false; if (pEntityName != 0 && pEntityName[0] != 0) { tDB2EntityNameMap::const_iterator pIter = mEntityNames.find( pEntityName ); if (pIter != mEntityNames.end()) { const std::vector & key = pIter->second; bFound = FindEntity( key, entity ); } } return bFound; } /*=========================================================================== METHOD: MapEntityNameToID (Public Method) DESCRIPTION: Map a protocol entity name to an ID PARAMETERS pName [ I ] - Protocol entity name key [ O ] - Upon success, the ID corresponding to protocol entity RETURN VALUE: bool - Success? ===========================================================================*/ bool cCoreDatabase::MapEntityNameToID( LPCSTR pName, std::vector & key ) const { // Assume failure bool bOK = false; if (pName != 0 && pName[0] != 0) { std::string tmp = pName; // std::string version of Trim() int nFirst = tmp.find_first_not_of( ' ' ); int nLast = tmp.find_last_not_of( ' ' ); if (nFirst == -1 || nLast == -1) { // Something went wrong, empty string or all spaces return false; } tmp = tmp.substr( nFirst, nLast - nFirst + 1 ); tDB2EntityNameMap::const_iterator pIter = mEntityNames.find( tmp.c_str() ); if (pIter != mEntityNames.end()) { key = pIter->second; bOK = true; } } return bOK; } /*=========================================================================== METHOD: MapEnumToString (Public Method) DESCRIPTION: Map the given enum value (specified by enum ID, and enum value) to the enum value name string PARAMETERS enumID [ I ] - ID of the enumeration enumVal [ I ] - Enum value to map bSimpleErrFmt [ I ] - If the eunum value cannot be mapped to a string what should this method return? If 'true' then just the value as a string If 'false' then the enum ID, value, and 'Unknown' bHex [ I ] - Hexadecimal output on mapping error? RETURN VALUE: std::string - The enum name (or error string if enum value is not found) ===========================================================================*/ std::string cCoreDatabase::MapEnumToString( ULONG enumID, int enumVal, bool bSimpleErrFmt, bool bHex ) const { std::string retStr = ""; // Form the lookup key std::pair key( enumID, enumVal ); // Look up the enum value descriptor tDB2EnumEntryMap::const_iterator pVals = mEnumEntryMap.find( key ); if (pVals != mEnumEntryMap.end()) { const sDB2EnumEntry & entry = pVals->second; retStr = entry.mpName; } // No string? if (retStr.size() <= 0) { std::ostringstream tmp; if (bSimpleErrFmt == false) { tmp << "Unknown [" << (UINT)enumID << "/"; } if (bHex == true) { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << enumVal; } else { tmp << enumVal; } retStr = tmp.str(); } return retStr; } /*=========================================================================== METHOD: MapEnumToString (Public Method) DESCRIPTION: Map the given enum value (specified by enum name, and enum value) to the enum value name string PARAMETERS pEnumName [ I ] - Name of the enumeration enumVal [ I ] - Enum value to map bSimpleErrFmt [ I ] - If the eunum value cannot be mapped to a string what should this method return? If 'true' then just the value as a string If 'false' then the enum ID, value, and 'Unknown' bHex [ I ] - Hexadecimal output on mapping error? RETURN VALUE: std::string - The enum name (or error string if enum value is not found) ===========================================================================*/ std::string cCoreDatabase::MapEnumToString( LPCSTR pEnumName, int enumVal, bool bSimpleErrFmt, bool bHex ) const { std::string retStr = ""; tDB2EnumMap::const_iterator pEnumMapIter = mEnumMap.find( pEnumName ); if (pEnumMapIter != mEnumMap.end()) { const std::map & entries = pEnumMapIter->second.second; std::map ::const_iterator pEntry; pEntry = entries.find( enumVal ); if (pEntry != entries.end()) { retStr = pEntry->second; } } // No string? if (retStr.size() <= 0) { std::ostringstream tmp; if (bSimpleErrFmt == false) { if (pEnumName == 0) { pEnumName = "?"; } tmp << "Unknown [" << pEnumName << "/"; } if (bHex == true) { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << enumVal; } else { tmp << enumVal; } retStr = tmp.str(); } return retStr; } /*=========================================================================== METHOD: AssembleEnumMap (Internal Method) DESCRIPTION: Assemble the internal enum map from the enum and enum entry tables RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::AssembleEnumMap() { bool bOK = true; // Empty it out first mEnumMap.clear(); tDB2EnumEntryMap::const_iterator pEntry = mEnumEntryMap.begin(); if (pEntry == mEnumEntryMap.end()) { return bOK; } // Set initial enum ID ULONG currentID = pEntry->second.mID; std::map entries; while (pEntry != mEnumEntryMap.end()) { const sDB2EnumEntry & entry = pEntry->second; pEntry++; if (entry.IsValid() == false) { continue; } if (currentID != entry.mID) { if (entries.size() > 0) { // Look up the enum name tDB2EnumNameMap::const_iterator pEnum; pEnum = mEnumNameMap.find( currentID ); if (pEnum != mEnumNameMap.end()) { const sDB2Enum & dbEnum = pEnum->second; if (mEnumMap.find( dbEnum.mpName ) == mEnumMap.end()) { tDB2EnumMapPair tmp( dbEnum.mID, entries ); mEnumMap[dbEnum.mpName] = tmp; } else { // Hmm, duplicate enum names discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Duplicate enum (by name) detected \'" << dbEnum.mpName << "\'"; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } else { // Hmm, missing enum ID discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Missing enum ID detected " << currentID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } // Clear out enum entries for next pass and add this entry entries.clear(); entries[entry.mValue] = entry.mpName; // Adjust current enum ID currentID = entry.mID; } } else { if (entries.find( entry.mValue ) == entries.end()) { entries[entry.mValue] = entry.mpName; } else { // Hmm, duplicate enum entry values discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_ENTRY << "] Duplicate enum entries detected \'" << entry.mpName << "\', " << entry.mValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } } // Add in the last enum if (mEnumEntryMap.size() > 0 && entries.size() > 0) { // Look up the enum name tDB2EnumNameMap::const_iterator pEnum; pEnum = mEnumNameMap.find( currentID ); if (pEnum != mEnumNameMap.end()) { const sDB2Enum & dbEnum = pEnum->second; if (mEnumMap.find( dbEnum.mpName ) == mEnumMap.end()) { tDB2EnumMapPair tmp( dbEnum.mID, entries ); mEnumMap[dbEnum.mpName] = tmp; } else { // Hmm, duplicate enum names discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Duplicate enum (by name) detected \'" << dbEnum.mpName << "\'"; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } else { // Hmm, missing enum ID discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Missing enum ID detected " << currentID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } return bOK; } /*=========================================================================== METHOD: AssembleEntityNameMap (Internal Method) DESCRIPTION: Assemble the internal protocol entity name map RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::AssembleEntityNameMap() { // Assume success bool bOK = true; // Empty it out first mEntityNames.clear(); // Go through and build the event name table tDB2EntityMap::const_iterator pIter = mProtocolEntities.begin(); while (pIter != mProtocolEntities.end()) { const sDB2ProtocolEntity & obj = pIter->second; pIter++; if (obj.IsValid() == false) { continue; } tDB2EntityNameMap::const_iterator pNames; pNames = mEntityNames.find( obj.mpName ); if (pNames == mEntityNames.end()) { mEntityNames[obj.mpName] = obj.GetKey(); } else { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_ENTITY << "] Duplicate protocol entity (by name) detected \'" << obj.mpName << "\'"; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } return bOK; } /*=========================================================================== METHOD: BuildModifierTables (Internal Method) DESCRIPTION: Build the parsed fragment modifier maps, i.e. convert the modifier text string to something more useful by database clients RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::BuildModifierTables() { // Assume success bool bOK = true; // Parse all fragment modifiers tDB2FragmentMap::const_iterator pFragIter = mEntityStructs.begin(); while (pFragIter != mEntityStructs.end()) { // Grab new fragment const sDB2Fragment & frag = pFragIter->second; pFragIter++; // Skip invalid/unmodified fragments if ( (frag.IsValid() == false) || (frag.mpModifierValue == 0) || (frag.mpModifierValue == EMPTY_STRING) ) { continue; } switch (frag.mModifierType) { case eDB2_MOD_CONSTANT_ARRAY: case eDB2_MOD_VARIABLE_ARRAY: case eDB2_MOD_VARIABLE_STRING1: case eDB2_MOD_VARIABLE_STRING2: case eDB2_MOD_VARIABLE_STRING3: { ULONG val = strtoul( frag.mpModifierValue, 0, 0 ); mArray1ModMap[frag.mpModifierValue] = val; } break; case eDB2_MOD_VARIABLE_ARRAY2: { // Parse modifier to tokens (start stop) int nSize = strlen( frag.mpModifierValue ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, frag.mpModifierValue, nSize ); std::vector indices; CSVStringToContainer( " ", pCopy, indices ); delete [] pCopy; if (indices.size() == 2) { std::pair val; val.first = indices[0]; val.second = indices[1]; mArray2ModMap[frag.mpModifierValue] = val; } } break; case eDB2_MOD_OPTIONAL: { sDB2SimpleCondition con; // Parse condition to tokens (field ID operator value) bool bRC = sDB2Fragment::ParseCondition( frag.mpModifierValue, con.mID, con.mOperator, con.mValue, con.mbF2F ); if (bRC == true) { mOptionalModMap[frag.mpModifierValue] = con; } } break; case eDB2_MOD_VARIABLE_ARRAY3: { sDB2SimpleExpression exp; // Parse condition to tokens (field ID operator value) bool bRC = sDB2Fragment::ParseExpression( frag.mpModifierValue, exp.mID, exp.mOperator, exp.mValue, exp.mbF2F ); if (bRC == true) { mExpressionModMap[frag.mpModifierValue] = exp; } } break; } } return bOK; } /*=========================================================================== METHOD: CheckAndSetBasePath (Internal Method) DESCRIPTION: Check and set the passed in path to something that is useful PARAMETERS pBasePath [ I ] - Base path RETURN VALUE: std::string - The enum name (or error string if enum value is not found) ===========================================================================*/ std::string cCoreDatabase::CheckAndSetBasePath( LPCSTR pBasePath ) const { std::string basePath = "."; if (pBasePath != 0 && pBasePath[0] != 0) { struct stat fileInfo; if (stat( pBasePath, &fileInfo ) == 0) { if (S_ISDIR( fileInfo.st_mode ) == true) { // It's a directory basePath = pBasePath; } } } return basePath; } /*=========================================================================== METHOD: LoadStructureTables (Internal Method) DESCRIPTION: Load all tables related to structure (entity, struct, field, format spec) PARAMETERS pBasePath [ I ] - Base path to database files RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadStructureTables( LPCSTR pBasePath ) { bool bRC = true; std::string basePath = CheckAndSetBasePath( pBasePath ); basePath += "/"; std::string fn = basePath; fn += DB2_FILE_PROTOCOL_FIELD; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEntityFields, false, DB2_TABLE_PROTOCOL_FIELD, *mpLog ); fn = basePath; fn += DB2_FILE_PROTOCOL_STRUCT; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEntityStructs, false, DB2_TABLE_PROTOCOL_STRUCT, *mpLog ); fn = basePath; fn += DB2_FILE_PROTOCOL_ENTITY; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mProtocolEntities, false, DB2_TABLE_PROTOCOL_ENTITY, *mpLog ); // Validate protocol entities bRC &= ValidateStructures(); // Build internal protocol entity name map bRC &= AssembleEntityNameMap(); return bRC; } /*=========================================================================== METHOD: LoadStructureTables (Internal Method) DESCRIPTION: Load all tables related to structure (entity, struct, field) PARAMETERS RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadStructureTables() { bool bRC = true; // Calculate sizes int nFieldSize = (const char*)&_binary_QMI_Field_txt_end - (const char*)&_binary_QMI_Field_txt_start; int nStructSize = (const char*)&_binary_QMI_Struct_txt_end - (const char*)&_binary_QMI_Struct_txt_start; int nEntitySize = (const char*)&_binary_QMI_Entity_txt_end - (const char*)&_binary_QMI_Entity_txt_start; bRC &= LoadDB2Table( (const char*)&_binary_QMI_Field_txt_start, nFieldSize, mEntityFields, false, DB2_TABLE_PROTOCOL_FIELD, *mpLog ); bRC &= LoadDB2Table( (const char*)&_binary_QMI_Struct_txt_start, nStructSize, mEntityStructs, false, DB2_TABLE_PROTOCOL_STRUCT, *mpLog ); bRC &= LoadDB2Table( (const char*)&_binary_QMI_Entity_txt_start, nEntitySize, mProtocolEntities, false, DB2_TABLE_PROTOCOL_ENTITY, *mpLog ); // Validate protocol entities bRC &= ValidateStructures(); // Build internal protocol entity name map bRC &= AssembleEntityNameMap(); return bRC; } /*=========================================================================== METHOD: LoadEnumTables (Internal Method) DESCRIPTION: Load all enumeration tables PARAMETERS pBasePath [ I ] - Base path to database files RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadEnumTables( LPCSTR pBasePath ) { bool bRC = true; std::string basePath = CheckAndSetBasePath( pBasePath ); basePath += "/"; std::string fn = basePath; fn += DB2_FILE_ENUM_MAIN; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEnumNameMap, false, DB2_TABLE_ENUM_MAIN, *mpLog ); fn = basePath; fn += DB2_FILE_ENUM_ENTRY; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEnumEntryMap, false, DB2_TABLE_ENUM_ENTRY, *mpLog ); // Build the enum map bRC &= AssembleEnumMap(); return bRC; } /*=========================================================================== METHOD: LoadEnumTables (Internal Method) DESCRIPTION: Load all enumeration tables PARAMETERS RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadEnumTables() { bool bRC = true; // Calculate sizes int nEnumSize = (const char*)&_binary_QMI_Enum_txt_end - (const char*)&_binary_QMI_Enum_txt_start; int nEnumEntrySize = (const char*)&_binary_QMI_EnumEntry_txt_end - (const char*)&_binary_QMI_EnumEntry_txt_start; bRC &= LoadDB2Table( (const char*)&_binary_QMI_Enum_txt_start, nEnumSize, mEnumNameMap, false, DB2_TABLE_ENUM_MAIN, *mpLog ); bRC &= LoadDB2Table( (const char*)&_binary_QMI_EnumEntry_txt_start, nEnumEntrySize, mEnumEntryMap, false, DB2_TABLE_ENUM_ENTRY, *mpLog ); // Build the enum map bRC &= AssembleEnumMap(); return bRC; } /*=========================================================================== METHOD: ValidateStructures (Internal Method) DESCRIPTION: Validate (and attempt repair of) structure related tables RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateStructures() { // Assume success bool bRC = true; tDB2EntityMap::iterator pEntity = mProtocolEntities.begin(); while (pEntity != mProtocolEntities.end()) { sDB2ProtocolEntity & entity = pEntity->second; // Structure ID given? if (entity.mStructID != -1) { // Yes, validate individual structure std::set fields; bool bValid = ValidateStructure( (ULONG)entity.mStructID, fields, 0 ); // Not valid? if (bValid == false) { // Invalid structure, reset to none std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid struct, ID " << entity.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); entity.mStructID = -1; // We found at least one bad structure bRC = false; } } pEntity++; } return bRC; } /*=========================================================================== METHOD: ValidateStructure (Internal Method) DESCRIPTION: Validate a single structure PARAMETERS: structID [ I ] - ID of structure being evaluated fields [I/O] - List of 'known' field IDs depth [I/O] - Recursion depth RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateStructure( ULONG structID, std::set & fields, ULONG depth ) { // Assume success bool bRC = true; // Reached our limit? if (depth++ >= MAX_NESTING_LEVEL) { // Invalid structure std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Max depth exceeded, possible loop, struct ID " << structID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } // Grab first fragment of structure std::pair id( structID, 0 ); tDB2FragmentMap::const_iterator pFrag = mEntityStructs.find( id ); // Did we find the first fragment? if (pFrag == mEntityStructs.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing initial fragment, struct ID " << structID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } // Iterate over each fragment in the structure while (pFrag != mEntityStructs.end() && pFrag->second.mStructID == structID) { // Grab fragment const sDB2Fragment & frag = pFrag->second; // Variable array or optional fragment? if ( (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY) || (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY2) ) { bRC = ValidateArraySpecifier( frag, fields ); } else if (frag.mModifierType == eDB2_MOD_OPTIONAL) { bRC = ValidateOptionalSpecifier( frag, fields ); } else if (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY3) { bRC = ValidateExpressionSpecifier( frag, fields ); } else if ( (frag.mModifierType == eDB2_MOD_VARIABLE_STRING1) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) ) { bRC = ValidateArraySpecifier( frag, fields ); if (bRC == true) { // The field being modified has to be a fixed length string ULONG fieldID = frag.mFragmentValue; tDB2FieldMap::const_iterator pIter = mEntityFields.find( fieldID ); if (pIter != mEntityFields.end()) { bool bString = false; const sDB2Field & ft = pIter->second; if (ft.mType == eDB2_FIELD_STD) { if ( (ft.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_A) || (ft.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U) || (ft.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) ) { if ( (ft.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) || (frag.mModifierType != eDB2_MOD_VARIABLE_STRING3) ) { // Not the invalid combination of character length and // varaible length characters bString = true; } } } if (bString == false) { // Not a string so why the string modifier? std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid string modifier, struct ID " << structID << ", ID " << fieldID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } } if (bRC == true) { // What type of fragment is this? switch (frag.mFragmentType) { case eDB2_FRAGMENT_FIELD: { ULONG fieldID = frag.mFragmentValue; bRC = ValidateField( structID, fieldID, fields ); } break; case eDB2_FRAGMENT_VARIABLE_PAD_BITS: case eDB2_FRAGMENT_VARIABLE_PAD_BYTES: { // Does this field exist in the entity? ULONG fieldID = frag.mFragmentValue; if (fields.find( fieldID ) == fields.end()) { // No std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid pad, struct ID " << structID << ", ID " << fieldID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } break; case eDB2_FRAGMENT_STRUCT: { // Grab structure ID and recurse ULONG structID = frag.mFragmentValue; bRC = ValidateStructure( structID, fields, depth ); } break; default: break; } } // Did an error occur? if (bRC == false) { break; } pFrag++; } return bRC; } /*=========================================================================== METHOD: ValidateField (Internal Method) DESCRIPTION: Validate a single field PARAMETERS: structID [ I ] - ID of referencing structure fieldID [ I ] - ID of field being evaluated fields [I/O] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateField( ULONG structID, ULONG fieldID, std::set & fields ) { // Assume success bool bRC = true; tDB2FieldMap::const_iterator pIter = mEntityFields.find( fieldID ); if (pIter == mEntityFields.end()) { // No std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid field, struct ID " << structID << ", ID " << fieldID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } else { // Mark field as part of this structure fields.insert( fieldID ); // Is this field an enumeration? const sDB2Field & theField = pIter->second; if ( (theField.mType == eDB2_FIELD_ENUM_UNSIGNED) || (theField.mType == eDB2_FIELD_ENUM_SIGNED) ) { // Yes, check that the enum exists if (mEnumNameMap.find( theField.mTypeVal ) == mEnumNameMap.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_FIELD << "] Invalid enumeration ID, field ID " << fieldID << ", enum ID " << theField.mTypeVal; mpLog->Log( tmp.str(), eDB2_STATUS_WARNING ); } } } return bRC; } /*=========================================================================== METHOD: ValidateArraySpecifier (Internal Method) DESCRIPTION: Validate an array specifier PARAMETERS: frag [ I ] - Fragment containing array specifier fields [ I ] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateArraySpecifier( const sDB2Fragment & frag, const std::set & fields ) { // Assume success bool bRC = true; // Even an array specifier to start with? if (frag.mpModifierValue == 0 || frag.mpModifierValue == EMPTY_STRING) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing array specifier, struct ID " << frag.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } else if ( (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING1) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) ) { ULONG id = strtoul( frag.mpModifierValue, 0, 0 ); if (fields.find( id ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid modifier specifier, struct ID " << frag.mStructID << ", ID " << id; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } else if (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY2) { // Parse condition to tokens (start stop) int nSize = strlen( frag.mpModifierValue ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, frag.mpModifierValue, nSize ); std::vector indices; CSVStringToContainer( " ", pCopy, indices ); delete [] pCopy; if (indices.size() != 2) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid array specifier, struct ID " << frag.mStructID << ", " << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } else { ULONG sID = indices[0]; ULONG eID = indices[1]; if ( (fields.find( sID ) == fields.end()) || (fields.find( eID ) == fields.end()) ) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid array specifier, struct ID " << frag.mStructID << ", IDs " << sID << " " << eID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } else { ASSERT( 0 ); } return bRC; } /*=========================================================================== METHOD: ValidateOptionalSpecifier (Internal Method) DESCRIPTION: Validate a simple optional fragment specifier PARAMETERS: frag [ I ] - Fragment containing optional fragment specifier fields [ I ] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateOptionalSpecifier( const sDB2Fragment & frag, const std::set & fields ) { // Assume success bool bRC = true; ASSERT( frag.mModifierType == eDB2_MOD_OPTIONAL ); // Even an optional specifier to start with? if (frag.mpModifierValue == 0 || frag.mpModifierValue == EMPTY_STRING) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing optional specifier, struct ID " << frag.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } ULONG conID; eDB2Operator conOp; LONGLONG conVal; bool bF2F; // Parse condition LPCSTR pCon = frag.mpModifierValue; bRC = sDB2Fragment::ParseCondition( pCon, conID, conOp, conVal, bF2F ); if (bRC == true) { // Does the given field ID exist as part of this entity? if (fields.find( conID ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << conID << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } if (bF2F == true) { // Does the given field ID exist as part of this entity? if (fields.find( (ULONG)conVal ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << (ULONG)conVal << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } else { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", " << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); } return bRC; } /*=========================================================================== METHOD: ValidateExpressionSpecifier (Internal Method) DESCRIPTION: Validate a simple expression fragment specifier PARAMETERS: frag [ I ] - Fragment containing expression fragment specifier fields [ I ] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateExpressionSpecifier( const sDB2Fragment & frag, const std::set & fields ) { // Assume success bool bRC = true; ASSERT( frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY3 ); // Even an expression specifier to start with? if (frag.mpModifierValue == 0 || frag.mpModifierValue == EMPTY_STRING) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing array specifier, struct ID " << frag.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } ULONG exprID; eDB2ExpOperator exprOp; LONGLONG exprVal; bool bF2F; // Parse expression LPCSTR pExpr = frag.mpModifierValue; bRC = sDB2Fragment::ParseExpression( pExpr, exprID, exprOp, exprVal, bF2F ); if (bRC == true) { // Does the given field ID exist as part of this entity? if (fields.find( exprID ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << exprID << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } if (bF2F == true) { // Does the given field ID exist as part of this entity? if (fields.find( (ULONG)exprVal ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << (ULONG)exprID << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } else { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", " << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); } return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/CoreDatabase.h000077500000000000000000001676701455567757300227660ustar00rootroot00000000000000/*=========================================================================== FILE: CoreDatabase.h DESCRIPTION: Declaration of cCoreDatabase class PUBLIC CLASSES AND METHODS: cCoreDatabase This class represents the run-time (read only) version of the core library database Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include #include #include #include "DB2TextFile.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cDB2NavTree; //--------------------------------------------------------------------------- // Prototypes //--------------------------------------------------------------------------- // Convert a string (in quotes) to a string (minus) quotes and copy into // an allocated buffer LPCSTR CopyQuotedString( LPSTR pString ); //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // An empty (but not NULL) string extern LPCSTR EMPTY_STRING; // Value seperator for database text extern LPCSTR DB2_VALUE_SEP; // Sub-value (i.e. within a particular value) seperator for database text extern LPCSTR DB2_SUBVAL_SEP; // Database table file names extern LPCSTR DB2_FILE_PROTOCOL_FIELD; extern LPCSTR DB2_FILE_PROTOCOL_STRUCT; extern LPCSTR DB2_FILE_PROTOCOL_ENTITY; extern LPCSTR DB2_FILE_ENUM_MAIN; extern LPCSTR DB2_FILE_ENUM_ENTRY; // Database start pointers extern const int _binary_QMI_Field_txt_start; extern const int _binary_QMI_Struct_txt_start; extern const int _binary_QMI_Entity_txt_start; extern const int _binary_QMI_Enum_txt_start; extern const int _binary_QMI_EnumEntry_txt_start; // Database end pointers extern const int _binary_QMI_Field_txt_end; extern const int _binary_QMI_Struct_txt_end; extern const int _binary_QMI_Entity_txt_end; extern const int _binary_QMI_Enum_txt_end; extern const int _binary_QMI_EnumEntry_txt_end; // Status levels for DB2 logging enum eDB2StatusLevel { eDB2_STATUS_BEGIN = -1, eDB2_STATUS_INFO, // Informational string eDB2_STATUS_WARNING, // Warning string eDB2_STATUS_ERROR, // Error string eDB2_STATUS_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2StatusLevel validity check PARAMETERS: lvl [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2StatusLevel lvl ) { bool retVal = false; if (lvl > eDB2_STATUS_BEGIN && lvl < eDB2_STATUS_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // Class cDB2StatusLog // // Class that defines status logging interface for DB2 initialization // and exit related information /*=========================================================================*/ class cDB2StatusLog { public: // Log an error string virtual void Log( LPCSTR pLog, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) = 0; // Log an error string virtual void Log( const std::string & log, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) = 0; }; /*=========================================================================*/ // Class cDB2TraceLog // Default error logging interface for DB2 initialization and exit // related information - sends output to TRACE /*=========================================================================*/ class cDB2TraceLog : public cDB2StatusLog { public: // (Inline) Constructor cDB2TraceLog() { }; // (Inline) Destructor ~cDB2TraceLog() { }; // (Inline) Log an error string virtual void Log( LPCSTR pLog, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) { if (pLog != 0 && pLog[0] != 0) { std::string formatString = "[0x%02X] "; formatString += pLog; formatString += '\n'; //Note: TRACE is just an alias for printf if DEBUG is used TRACE( formatString.c_str(), lvl ); } }; // (Inline) Log an error string virtual void Log( const std::string & log, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) { if (log.size() > 0) { Log( log.c_str(), lvl ); } }; }; // The default logger (for backwards compatibility) extern cDB2TraceLog gDB2DefaultLog; /*=========================================================================== METHOD: LoadDB2Table (Free Public Method) DESCRIPTION: Load a database table PARAMETERS: pFile [ I ] - The file to load the table from cont [I/0] - The current/resulting database table bDuplicatesOK [ I ] - Duplicate keys acceptable? pName [ I ] - Name (for error reporting) log [I/O] - Where to log errors RETURN VALUE: bool ===========================================================================*/ template bool LoadDB2Table( LPCSTR pFile, Container & cont, bool bDuplicatesOK = false, LPCSTR pName = 0, cDB2StatusLog & log = gDB2DefaultLog ) { // Assume success bool bRC = true; // Sanity check error reporting name if (pName == 0 || pName[0] == 0) { pName = "?"; } // Sanity check file name if (pFile == 0 || pFile[0] == 0) { // Bad file std::ostringstream tmp; tmp << "DB [" << pName << "] Invalid file name"; log.Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } ULONG lineNum = 0; // Attempt to open the file cDB2TextFile inFile( pFile ); if (inFile.IsValid() == true) { std::string line; while (inFile.ReadLine( line ) == true) { std::string lineCopy = line; int nLineSize = lineCopy.size(); LPSTR pLine = new CHAR[ nLineSize + 1 ]; if (pLine == NULL) { return false; } memcpy( pLine, line.c_str(), nLineSize ); // Enforce null terminator pLine[ nLineSize ] = 0; typename Container::mapped_type theType; bool bOK = theType.FromString( pLine ); if (bOK == true) { // Grab key typename Container::key_type theKey = theType.GetKey(); // Key already exists? typename Container::iterator pIter; pIter = cont.find( theKey ); if (pIter != cont.end() && bDuplicatesOK == false) { // The key already exists which indicates a (recoverable) error std::ostringstream tmp; tmp << "DB [" << pName << "] Duplicate key, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); // Free the current object pIter->second.FreeAllocatedStrings(); // ... and then replace it pIter->second = theType; } else { typename Container::value_type entry( theKey, theType ); cont.insert( entry ); } } else if (lineCopy.size() > 0) { // Error parsing line std::ostringstream tmp; tmp << "DB [" << pName << "] Parsing error, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_ERROR ); theType.FreeAllocatedStrings(); bRC = false; } delete [] pLine; lineNum++; } } else { #ifdef DEBUG // Could not open the file std::ostringstream tmp; tmp << "DB [" << pName << "] Error opening file"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); #endif bRC = false; } return bRC; }; /*=========================================================================== METHOD: LoadDB2Table (Free Public Method) DESCRIPTION: Load a database table PARAMETERS: pStart [ I ] - Start location of database nSize [ I ] - Size of database cont [I/0] - The current/resulting database table bDuplicatesOK [ I ] - Duplicate keys acceptable? pName [ I ] - Name (for error reporting) log [I/O] - Where to log errors RETURN VALUE: bool ===========================================================================*/ template bool LoadDB2Table( const char * pStart, const int nSize, Container & cont, bool bDuplicatesOK = false, LPCSTR pName = 0, cDB2StatusLog & log = gDB2DefaultLog ) { // Assume success bool bRC = true; // Sanity check error reporting name if (pName == 0 || pName[0] == 0) { pName = "?"; } ULONG lineNum = 0; // Attempt to open the file cDB2TextFile inFile( pStart, nSize ); if (inFile.IsValid() == true) { std::string line; while (inFile.ReadLine( line ) == true) { std::string lineCopy = line; int nLineSize = lineCopy.size(); LPSTR pLine = new CHAR[ nLineSize + 1 ]; if (pLine == NULL) { return false; } memcpy( pLine, lineCopy.c_str(), nLineSize ); // Enforce null terminator pLine[ nLineSize ] = 0; typename Container::mapped_type theType; bool bOK = theType.FromString( pLine ); if (bOK == true) { // Grab key typename Container::key_type theKey = theType.GetKey(); // Key already exists? typename Container::iterator pIter; pIter = cont.find( theKey ); if (pIter != cont.end() && bDuplicatesOK == false) { // The key already exists which indicates a (recoverable) error std::ostringstream tmp; tmp << "DB [" << pName << "] Duplicate key, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); // Free the current object pIter->second.FreeAllocatedStrings(); // ... and then replace it pIter->second = theType; } else { typename Container::value_type entry( theKey, theType ); cont.insert( entry ); } } else if (lineCopy.size() > 0) { // Error parsing line std::ostringstream tmp; tmp << "DB [" << pName << "] Parsing error, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_ERROR ); theType.FreeAllocatedStrings(); bRC = false; } delete [] pLine; lineNum++; } } else { #ifdef DEBUG // Could not open the file std::ostringstream tmp; tmp << "DB [" << pName << "] Error opening file"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); #endif bRC = false; } return bRC; }; /*=========================================================================== METHOD: FreeDB2Table (Free Public Method) DESCRIPTION: Free up the string allocations in a database table, emptying the table in the process PARAMETERS: cont [ I ] - The database table RETURN VALUE: None ===========================================================================*/ template void FreeDB2Table( Container & cont ) { typename Container::iterator pIter = cont.begin(); while (pIter != cont.end()) { typename Container::mapped_type & theType = pIter->second; theType.FreeAllocatedStrings(); pIter++; } cont.clear(); }; /*=========================================================================*/ // eDB2EntityType Enumeration // // Database protocol entity header/payload type enumeration /*=========================================================================*/ enum eDB2EntityType { eDB2_ET_ENUM_BEGIN = -1, eDB2_ET_DIAG_REQ, // 0 Synchronous request eDB2_ET_DIAG_RSP, // 1 Synchronous response eDB2_ET_DIAG_SUBSYS_REQ, // 2 Synchronous subsystem dispatch request eDB2_ET_DIAG_SUBSYS_RSP, // 3 Synchronous subsystem dispatch response eDB2_ET_DIAG_EVENT, // 4 Asynchronous event eDB2_ET_DIAG_LOG, // 5 Asynchronous log eDB2_ET_DIAG_NV_ITEM, // 6 NVRAM item read/write eDB2_ET_RESERVED7, // 7 Reserved eDB2_ET_RESERVED8, // 8 Reserved eDB2_ET_DIAG_SUBSYS2_REQ, // 9 Sync subsystem V2 dispatch request eDB2_ET_DIAG_SUBSYS2_RSP, // 10 Sync subsystem V2 dispatch response eDB2_ET_DIAG_SUBSYS2_ASYNC, // 11 Async subsystem V2 dispatch response eDB2_ET_QMI_BEGIN = 29, // 29 Start of QMI section eDB2_ET_QMI_CTL_REQ, // 30 QMI CTL request eDB2_ET_QMI_CTL_RSP, // 31 QMI CTL response eDB2_ET_QMI_CTL_IND, // 32 QMI CTL indication eDB2_ET_QMI_WDS_REQ, // 33 QMI WDS request eDB2_ET_QMI_WDS_RSP, // 34 QMI WDS response eDB2_ET_QMI_WDS_IND, // 35 QMI WDS indication eDB2_ET_QMI_DMS_REQ, // 36 QMI DMS request eDB2_ET_QMI_DMS_RSP, // 37 QMI DMS response eDB2_ET_QMI_DMS_IND, // 38 QMI DMS indication eDB2_ET_QMI_NAS_REQ, // 39 QMI NAS request eDB2_ET_QMI_NAS_RSP, // 40 QMI NAS response eDB2_ET_QMI_NAS_IND, // 41 QMI NAS indication eDB2_ET_QMI_QOS_REQ, // 42 QMI QOS request eDB2_ET_QMI_QOS_RSP, // 43 QMI QOS response eDB2_ET_QMI_QOS_IND, // 44 QMI QOS indication eDB2_ET_QMI_WMS_REQ, // 45 QMI WMS request eDB2_ET_QMI_WMS_RSP, // 46 QMI WMS response eDB2_ET_QMI_WMS_IND, // 47 QMI WMS indication eDB2_ET_QMI_PDS_REQ, // 48 QMI PDS request eDB2_ET_QMI_PDS_RSP, // 49 QMI PDS response eDB2_ET_QMI_PDS_IND, // 50 QMI PDS indication eDB2_ET_QMI_AUTH_REQ, // 51 QMI AUTH request eDB2_ET_QMI_AUTH_RSP, // 52 QMI AUTH response eDB2_ET_QMI_AUTH_IND, // 53 QMI AUTH indication eDB2_ET_QMI_CAT_REQ, // 54 QMI CAT request eDB2_ET_QMI_CAT_RSP, // 55 QMI CAT response eDB2_ET_QMI_CAT_IND, // 56 QMI CAT indication eDB2_ET_QMI_RMS_REQ, // 57 QMI RMS request eDB2_ET_QMI_RMS_RSP, // 58 QMI RMS response eDB2_ET_QMI_RMS_IND, // 59 QMI RMS indication eDB2_ET_QMI_OMA_REQ, // 60 QMI OMA request eDB2_ET_QMI_OMA_RSP, // 61 QMI OMA response eDB2_ET_QMI_OMA_IND, // 62 QMI OMA indication eDB2_ET_QMI_VOICE_REQ, // 63 QMI voice request eDB2_ET_QMI_VOICE_RSP, // 64 QMI voice response eDB2_ET_QMI_VOICE_IND, // 65 QMI voice indication eDB2_ET_QMI_END, // 63 End of QMI section eDB2_ET_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2EntityType validity check PARAMETERS: et [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2EntityType et ) { bool retVal = false; if ( (et > eDB2_ET_ENUM_BEGIN && et <= eDB2_ET_DIAG_SUBSYS2_ASYNC) || (et > eDB2_ET_QMI_BEGIN && et < eDB2_ET_QMI_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_REQ || entityType == eDB2_ET_DIAG_RSP || entityType == eDB2_ET_DIAG_SUBSYS_REQ || entityType == eDB2_ET_DIAG_SUBSYS_RSP || entityType == eDB2_ET_DIAG_EVENT || entityType == eDB2_ET_DIAG_LOG || entityType == eDB2_ET_DIAG_NV_ITEM || entityType == eDB2_ET_DIAG_SUBSYS2_REQ || entityType == eDB2_ET_DIAG_SUBSYS2_RSP || entityType == eDB2_ET_DIAG_SUBSYS2_ASYNC) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityRequestType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol and if so does it represent a request? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityRequestType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_REQ || entityType == eDB2_ET_DIAG_SUBSYS_REQ || entityType == eDB2_ET_DIAG_SUBSYS2_REQ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityResponseType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol and if so does it represent a response? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityResponseType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_RSP || entityType == eDB2_ET_DIAG_SUBSYS_RSP || entityType == eDB2_ET_DIAG_SUBSYS2_RSP) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityAsyncType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol and if so does it represent asynchronous incoming data? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityAsyncType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_EVENT || entityType == eDB2_ET_DIAG_LOG || entityType == eDB2_ET_DIAG_SUBSYS2_ASYNC) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol? PARAMETERS: et [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityType( eDB2EntityType et ) { bool retVal = false; if (et > eDB2_ET_QMI_BEGIN && et < eDB2_ET_QMI_END) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityRequestType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol and if so does it represent a request? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityRequestType( eDB2EntityType entityType ) { bool retVal = false; // One QMI service is always a triplet of REQ/RSP/IND DWORD baseVal = (DWORD)eDB2_ET_QMI_BEGIN + 1; if ((DWORD)entityType % baseVal == 0) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityResponseType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol and if so does it represent a response? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityResponseType( eDB2EntityType entityType ) { bool retVal = false; // One QMI service is always a triplet of REQ/RSP/IND DWORD baseVal = (DWORD)eDB2_ET_QMI_BEGIN + 1; if ((DWORD)entityType % baseVal == 1) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityIndicationType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol and if so does it represent an indication? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityIndicationType( eDB2EntityType entityType ) { bool retVal = false; // One QMI service is always a triplet of REQ/RSP/IND DWORD baseVal = (DWORD)eDB2_ET_QMI_BEGIN + 1; if ((DWORD)entityType % baseVal == 2) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2FragmentType Enumeration // // Database fragment type enumeration - determines in what table // (or manner) the fragment is described /*=========================================================================*/ enum eDB2FragmentType { eDB2_FRAGMENT_TYPE_ENUM_BEGIN = -1, eDB2_FRAGMENT_FIELD, // 0 Simple field fragment eDB2_FRAGMENT_STRUCT, // 1 Structure fragment eDB2_FRAGMENT_CONSTANT_PAD, // 2 Pad fragment, fixed length (bits) eDB2_FRAGMENT_VARIABLE_PAD_BITS, // 3 Pad fragment, variable (bits) eDB2_FRAGMENT_VARIABLE_PAD_BYTES, // 4 Pad fragment, variable (bytes) eDB2_FRAGMENT_FULL_BYTE_PAD, // 5 Pad fragment, pad to a full byte eDB2_FRAGMENT_MSB_2_LSB, // 6 Switch to MSB -> LSB order eDB2_FRAGMENT_LSB_2_MSB, // 7 Switch to LSB -> MSB order eDB2_FRAGMENT_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2FragmentType validity check PARAMETERS: fragType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2FragmentType fragType ) { bool retVal = false; if (fragType > eDB2_FRAGMENT_TYPE_ENUM_BEGIN && fragType < eDB2_FRAGMENT_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2ModifierType Enumeration // // Database fragment modifier type enumeration - determines how a // fragment is modified/used /*=========================================================================*/ enum eDB2ModifierType { eDB2_MOD_TYPE_ENUM_BEGIN = -1, eDB2_MOD_NONE, // 0 Modifier is not used eDB2_MOD_CONSTANT_ARRAY, // 1 Constant (elements) array eDB2_MOD_VARIABLE_ARRAY, // 2 Variable (elements) array eDB2_MOD_OBSOLETE_3, // 3 Constant (bits) array [OBS] eDB2_MOD_OBSOLETE_4, // 4 Variable (bits) array [OBS] eDB2_MOD_OPTIONAL, // 5 Fragment is optional eDB2_MOD_VARIABLE_ARRAY2, // 6 Variable (elements) array, start/stop given eDB2_MOD_VARIABLE_ARRAY3, // 7 Variable (elements) array, simple expression eDB2_MOD_VARIABLE_STRING1, // 8 Variable length string (bit length) eDB2_MOD_VARIABLE_STRING2, // 9 Variable length string (byte length) eDB2_MOD_VARIABLE_STRING3, // 10 Variable length string (character length) eDB2_MOD_TYPE_ENUM_END }; /*=========================================================================== METHOD: ModifiedToArray (Inline Method) DESCRIPTION: Does this modifier indicate an array? PARAMETERS: modType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool ModifiedToArray( eDB2ModifierType modType ) { bool bRC = false; if ( (modType == eDB2_MOD_CONSTANT_ARRAY) || (modType == eDB2_MOD_VARIABLE_ARRAY) || (modType == eDB2_MOD_VARIABLE_ARRAY2) || (modType == eDB2_MOD_VARIABLE_ARRAY3) ) { bRC = true; } return bRC; }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2ModifierType validity check PARAMETERS: modType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2ModifierType modType ) { bool retVal = false; if (modType > eDB2_MOD_TYPE_ENUM_BEGIN && modType < eDB2_MOD_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2FieldType Enumeration // // Database field type enumeration - determines whether the field in // question is a standard type or an enumeration /*=========================================================================*/ enum eDB2FieldType { eDB2_FIELD_TYPE_ENUM_BEGIN = -1, eDB2_FIELD_STD, // 0 Field is a standard type (see below) eDB2_FIELD_ENUM_UNSIGNED, // 1 Field is an unsigned enumerated type eDB2_FIELD_ENUM_SIGNED, // 2 Field is a signed enumerated type eDB2_FIELD_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2FieldType validity check PARAMETERS: fieldType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2FieldType fieldType ) { bool retVal = false; if (fieldType > eDB2_FIELD_TYPE_ENUM_BEGIN && fieldType < eDB2_FIELD_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2StdFieldType Enumeration // // Database standard field type enumeration /*=========================================================================*/ enum eDB2StdFieldType { eDB2_FIELD_STDTYPE_ENUM_BEGIN = -1, eDB2_FIELD_STDTYPE_BOOL, // 0 Field is a boolean (0/1, false/true) eDB2_FIELD_STDTYPE_INT8, // 1 Field is 8-bit signed integer eDB2_FIELD_STDTYPE_UINT8, // 2 Field is 8-bit unsigned integer eDB2_FIELD_STDTYPE_INT16, // 3 Field is 16-bit signed integer eDB2_FIELD_STDTYPE_UINT16, // 4 Field is 16-bit unsigned integer eDB2_FIELD_STDTYPE_INT32, // 5 Field is 32-bit signed integer eDB2_FIELD_STDTYPE_UINT32, // 6 Field is 32-bit unsigned integer eDB2_FIELD_STDTYPE_INT64, // 7 Field is 64-bit signed integer eDB2_FIELD_STDTYPE_UINT64, // 8 Field is 64-bit unsigned integer eDB2_FIELD_STDTYPE_STRING_A, // 9 ANSI fixed length string eDB2_FIELD_STDTYPE_STRING_U, // 10 UNICODE fixed length string eDB2_FIELD_STDTYPE_STRING_ANT, // 11 ANSI NULL terminated string eDB2_FIELD_STDTYPE_STRING_UNT, // 12 UNICODE NULL terminated string eDB2_FIELD_STDTYPE_FLOAT32, // 13 Field is 32-bit floating point value eDB2_FIELD_STDTYPE_FLOAT64, // 14 Field is 64-bit floating point value eDB2_FIELD_STDTYPE_STRING_U8, // 15 UTF-8 encoded fixed length string eDB2_FIELD_STDTYPE_STRING_U8NT, // 16 UTF-8 encoded NULL terminated string eDB2_FIELD_STDTYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2StdFieldType validity check PARAMETERS: fieldType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2StdFieldType fieldType ) { bool retVal = false; if (fieldType > eDB2_FIELD_STDTYPE_ENUM_BEGIN && fieldType < eDB2_FIELD_STDTYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2Operator Enumeration // // Database conditional fragment operator type enumeration /*=========================================================================*/ enum eDB2Operator { eDB2_OP_TYPE_ENUM_BEGIN = -1, eDB2_OP_LT, eDB2_OP_LTE, eDB2_OP_EQ, eDB2_OP_NEQ, eDB2_OP_GTE, eDB2_OP_GT, eDB2_OP_DIV, eDB2_OP_NDIV, eDB2_OP_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2Operator validity check PARAMETERS: op [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2Operator op ) { bool retVal = false; if (op > eDB2_OP_TYPE_ENUM_BEGIN && op < eDB2_OP_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2ExpOperator Enumeration // // Database simple expression operator type enumeration /*=========================================================================*/ enum eDB2ExpOperator { eDB2_EXPOP_TYPE_ENUM_BEGIN = -1, eDB2_EXPOP_ADD, eDB2_EXPOP_SUB, eDB2_EXPOP_MUL, eDB2_EXPOP_DIV, eDB2_EXPOP_REM, eDB2_EXPOP_MIN, eDB2_EXPOP_MAX, eDB2_EXPOP_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2ExpOperator validity check PARAMETERS: op [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2ExpOperator op ) { bool retVal = false; if (op > eDB2_EXPOP_TYPE_ENUM_BEGIN && op < eDB2_EXPOP_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // Struct sDB2ProtocolEntity // // Structure that defines the schema for the protocol entity table /*=========================================================================*/ struct sDB2ProtocolEntity { public: // (Inline) Default constructor sDB2ProtocolEntity() : mType( eDB2_ET_ENUM_BEGIN ), mStructID( -1 ), mFormatID( -1 ), mbInternal( false ), mFormatExID( -1 ), mpName( EMPTY_STRING ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key std::vector GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Type of protocol entity 'header/payload' */ eDB2EntityType mType; /* Multi-value ID (includes above type) */ std::vector mID; /* Associated structure ID (-1 = no structure) */ int mStructID; /* Associated format specifier (-1 = none) */ int mFormatID; /* Is this protocol entity internal only? */ bool mbInternal; /* Associated extended format specifier (-1 = none) */ int mFormatExID; /* Name of protocol entity */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2Fragment // // Structure that defines the schema for the protocol structure table /*=========================================================================*/ struct sDB2Fragment { public: // (Inline) Default constructor sDB2Fragment() : mStructID( 0 ), mFragmentOrder( 0 ), mFragmentOffset( 0 ), mFragmentType( eDB2_FRAGMENT_TYPE_ENUM_BEGIN ), mFragmentValue( 0 ), mModifierType( eDB2_MOD_TYPE_ENUM_BEGIN ), mpModifierValue( EMPTY_STRING ), mpName( EMPTY_STRING ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } if (mpModifierValue != 0 && mpModifierValue != EMPTY_STRING) { delete [] mpModifierValue; mpModifierValue = 0; } }; // (Inline) Return object key std::pair GetKey() const { std::pair key( mStructID, mFragmentOrder ); return key; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; // Build a simple condition string static std::string BuildCondition( ULONG id, eDB2Operator op, LONGLONG val, bool bF2F ); // Evaluate a simple condition static bool EvaluateCondition( LONGLONG valA, eDB2Operator op, LONGLONG valB ); // Parse a simple condition static bool ParseCondition( LPCSTR pCondition, ULONG & id, eDB2Operator & op, LONGLONG & val, bool & bF2F ); // Build a simple expression string static std::string BuildExpression( ULONG id, eDB2ExpOperator op, LONGLONG val, bool bF2F ); // Evaluate a simple expression static bool EvaluateExpression( LONGLONG valA, eDB2ExpOperator op, LONGLONG valB, LONGLONG & res ); // Parse a simple expression static bool ParseExpression( LPCSTR pExpr, ULONG & id, eDB2ExpOperator & op, LONGLONG & val, bool & bF2F ); /* Enclosing structure ID */ ULONG mStructID; /* Order of fragment within structure */ ULONG mFragmentOrder; /* Offset (in bits) of fragment from beginning of enclosing structure */ int mFragmentOffset; /* Fragment type, how to interpret the following fragment value */ eDB2FragmentType mFragmentType; /* Fragment Value */ ULONG mFragmentValue; /* Modifier type, how to interpret the following modifier value */ eDB2ModifierType mModifierType; /* Modifier value */ LPCSTR mpModifierValue; /* Fragment Name */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2Field // // Structure that defines the schema for the protocol field table /*=========================================================================*/ struct sDB2Field { public: // (Inline) Default constructor sDB2Field() : mID( 0 ), mSize( 0 ), mType( eDB2_FIELD_TYPE_ENUM_BEGIN ), mTypeVal( 0 ), mbHex( false ), mbInternal( false ), mDescriptionID( -1 ), mpName( EMPTY_STRING ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if ( (mpName != 0) && (mpName != EMPTY_STRING) ) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Field ID */ ULONG mID; /* Size of field (in bits, maximum is 64 bits for integral types) */ ULONG mSize; /* Field type */ eDB2FieldType mType; /* Actual field type (eDB2StdFieldType or enum ID) */ ULONG mTypeVal; /* Display integral fields as hexadecimal? */ bool mbHex; /* Is this field internal only? */ bool mbInternal; /* Description of field */ int mDescriptionID; /* Field name */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2Category // // Structure that defines the generic category table schema, gives // category ID, category name, category description, and parent // category relationship (specified as a category ID into the very // same table) /*=========================================================================*/ struct sDB2Category { public: // (Inline) Default constructor sDB2Category() : mID( 0 ), mParentID( -1 ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Category ID */ ULONG mID; /* Category ID of parent, -1 implies no parent/category is at root */ int mParentID; /* Category display name */ LPCSTR mpName; /* Description of category */ int mDescriptionID; }; /*=========================================================================== METHOD: ValidateDB2Categories (Public Method) DESCRIPTION: Validate the relationship between a pair of DB category/reference tables NOTE: Discovered problems will be repaired, i.e. bogus/problematic category IDs are reset to -1 PARAMETERS: catMap [ I ] - The category table refMap [ I ] - The reference table pName [ I ] - Table name (for error reporting) log [ I ] - Error log RETURN VALUE: bool ===========================================================================*/ template bool ValidateDB2Categories( std::map & catMap, std::map & refMap, LPCSTR pName, cDB2StatusLog & log = gDB2DefaultLog ) { // Assume success bool bRC = true; std::string err; // Sanity check table name if (pName == 0 || pName[0] == 0) { pName = "?"; } // First validate/repair category map; stage 1: bad parent IDs std::map ::iterator pCats = catMap.begin(); while (pCats != catMap.end()) { sDB2Category & cat = pCats->second; pCats++; if (cat.IsValid() == false) { continue; } // The parent ID must be -1 or exist in the category map if (cat.mParentID != -1) { if (catMap.find( cat.mParentID ) == catMap.end()) { // Unable to locate parent category std::ostringstream tmp; tmp << "DB [" << pName << "] Missing ID, parent ID " << cat.mParentID; log.Log( tmp.str(), eDB2_STATUS_ERROR ); cat.mParentID = -1; bRC = false; } } } // Validate/repair category map; stage 2: loop detection pCats = catMap.begin(); while (pCats != catMap.end()) { std::set catsVisited; sDB2Category & cat = pCats->second; // Itererate up through parents int parentID = cat.mParentID; while (parentID != -1) { // Have we already been here? if (catsVisited.find( parentID ) == catsVisited.end()) { // Nope, add ID and go on to the next one catsVisited.insert( parentID ); std::map ::iterator pParent; pParent = catMap.find( parentID ); parentID = pParent->second.mParentID; } else { // Yes, we are caught in a loop std::ostringstream tmp; tmp << "DB [" << pName << "] Loop in category, parent ID " << cat.mParentID; log.Log( tmp.str(), eDB2_STATUS_ERROR ); cat.mParentID = -1; bRC = false; break; } } pCats++; } // Validate that each reference references valid category IDs typename std::map ::iterator pTypes = refMap.begin(); while (pTypes != refMap.end()) { NamedType & theType = pTypes->second; std::set cats = theType.mCategoryIDs; std::set ::iterator pRefCats = cats.begin(); while (pRefCats != cats.end()) { if (*pRefCats != -1) { pCats = catMap.find( *pRefCats ); if (pCats == catMap.end()) { // Unable to locate category std::ostringstream tmp; tmp << "DB [" << pName << "] Missing ID, category ID " << *pRefCats << ", reference " << theType.mpName; log.Log( tmp.str(), eDB2_STATUS_ERROR ); *pRefCats = -1; bRC = false; } } pRefCats++; } pTypes++; } return bRC; }; /*=========================================================================*/ // Struct sDB2NVItem // // NVRAM item structure for database schema /*=========================================================================*/ struct sDB2NVItem { public: // (Inline) Default constructor sDB2NVItem() : mItem( 0 ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mItem; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Category IDs (indices into NV items category table) */ std::set mCategoryIDs; /* Item number */ ULONG mItem; /* NV item display name */ LPCSTR mpName; /* Description of NV item */ int mDescriptionID; }; /*=========================================================================*/ // Struct sDB2Enum // // Structure that defines the schema for the enum table /*=========================================================================*/ struct sDB2Enum { public: // (Inline) Default constructor sDB2Enum() : mID( 0 ), mbInternal( false ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Enum ID */ ULONG mID; /* Is this enum used internally? */ bool mbInternal; /* Description of enum */ int mDescriptionID; /* Name of enum */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2EnumEntry // // Structure that defines the schema for the enum entry table /*=========================================================================*/ struct sDB2EnumEntry { public: // (Inline) Default constructor sDB2EnumEntry() : mID( 0 ), mValue( -1 ), mbHex( false ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key std::pair GetKey() const { std::pair key( mID, mValue ); return key; }; // (Inline) Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Enum ID */ ULONG mID; /* Enum entry value */ int mValue; /* Hexadecimal flag */ bool mbHex; /* Enum value name */ LPCSTR mpName; /* Description of enum value */ int mDescriptionID; }; /*=========================================================================*/ // Struct sDB2SimpleCondition // // Structure that defines a (parsed) simple condition modifier /*=========================================================================*/ struct sDB2SimpleCondition { public: // (Inline) Default constructor sDB2SimpleCondition() : mID( 0 ), mOperator( eDB2_OP_TYPE_ENUM_BEGIN ), mValue( 0 ), mbF2F( false ) { }; // (Inline) Is this object valid? bool IsValid() const { return ::IsValid( mOperator ); }; /* ID of field whose value is to be used */ ULONG mID; /* Operator to be used */ eDB2Operator mOperator; /* Value (or field ID) to compare against */ LONGLONG mValue; /* Field to field expression? */ bool mbF2F; }; /*=========================================================================*/ // Struct sDB2SimpleExpression // // Structure that defines a (parsed) simple expression /*=========================================================================*/ struct sDB2SimpleExpression { public: // (Inline) Default constructor sDB2SimpleExpression() : mID( 0 ), mOperator( eDB2_EXPOP_TYPE_ENUM_BEGIN ), mValue( 0 ), mbF2F( false ) { }; // (Inline) Is this object valid? bool IsValid() const { return (::IsValid( mOperator ) && mValue != 0); }; /* ID of field whose value is to be used */ ULONG mID; /* Operator to be used */ eDB2ExpOperator mOperator; /* Value (or field ID) to compare against */ LONGLONG mValue; /* Field to field expression? */ bool mbF2F; }; /*=========================================================================*/ // Struct sLPCSTRCmp // // Structure that defines the '<' operator for string comparison /*=========================================================================*/ struct sLPCSTRCmp { public: // (Inline) Is A < B? bool operator () ( LPCSTR pStrA, LPCSTR pStrB ) const { bool bLess = false; if (pStrA != 0 && pStrB != 0) { bLess = (strcmp( pStrA, pStrB ) < 0); } return bLess; }; }; /*=========================================================================*/ // Case insensitive compare function /*=========================================================================*/ inline bool InsensitiveCompare( CHAR first, CHAR second ) { return tolower( first ) < tolower( second ); } /*=========================================================================*/ // Struct sLPCSTRCmpI // // Structure that defines the '<' operator for string comparison // (case insensitive version) /*=========================================================================*/ struct sLPCSTRCmpI { public: // (Inline) Is A < B? bool operator () ( LPCSTR pStrA, LPCSTR pStrB ) const { bool bLess = false; if (pStrA != 0 && pStrB != 0) { // Is there a simpler stl function for this? bLess = std::lexicographical_compare( pStrA, pStrA + strlen( pStrA ), pStrB, pStrB + strlen( pStrB ), InsensitiveCompare ); } return bLess; }; }; //--------------------------------------------------------------------------- // Typedefs //--------------------------------------------------------------------------- // The protocol entity table expressed as a type typedef std::multimap , sDB2ProtocolEntity> tDB2EntityMap; // Protocol entity entity name to ID (reverse) table typedef std::map , sLPCSTRCmpI> tDB2EntityNameMap; // The struct table expressed as a type typedef std::map , sDB2Fragment> tDB2FragmentMap; // The field table expressed as a type typedef std::map tDB2FieldMap; // A generic category table expressed as a type typedef std::map tDB2CategoryMap; // NV item table expressed as a map type typedef std::map tDB2NVMap; // Enum table expressed as a map type typedef std::map tDB2EnumNameMap; // Enum entry table expressed as a map type typedef std::map , sDB2EnumEntry> tDB2EnumEntryMap; // The built enumeration map typedef std::pair < ULONG, std::map > tDB2EnumMapPair; typedef std::map tDB2EnumMap; // Parsed fragment modifier map - optional fragment typedef std::map tDB2OptionalModMap; // Parsed fragment modifier map - simple expression based sizes typedef std::map tDB2ExpressionModMap; // Parsed fragment modifier map - element count specified arrays typedef std::map tDB2Array1ModMap; // Parsed fragment modifier map - start/stop index specified arrays typedef std::map > tDB2Array2ModMap; // A protocol entity navigation map expressed as a type typedef std::map , cDB2NavTree *> tDB2EntityNavMap; /*=========================================================================*/ // Class cCoreDatabase /*=========================================================================*/ class cCoreDatabase { public: // Constructor cCoreDatabase(); // Destructor virtual ~cCoreDatabase(); // Initialize the database - must be done once (and only once) prior // to any database object access virtual bool Initialize( LPCSTR pBasePath ); virtual bool Initialize(); // Exit (cleanup) the database virtual void Exit(); // Get the entity navigation tree for the given protocol entity, if // none exists one will be built and returned const cDB2NavTree * GetEntityNavTree( const std::vector & key ) const; // Find the protocol entity with the specified key bool FindEntity( const std::vector & key, sDB2ProtocolEntity & entity ) const; // Find the protocol entity with the specified name bool FindEntity( LPCSTR pEntityName, sDB2ProtocolEntity & entity ) const; // Map a protocol entity name to an ID bool MapEntityNameToID( LPCSTR pName, std::vector & key ) const; // Map the given enum value (specified by enum ID, and enum value) // to the enum value name string std::string MapEnumToString( ULONG enumID, int enumVal, bool bSimpleErrFmt = false, bool bHex = false ) const; // Map the given enum value (specified by enum name, and enum value) // to the enum value name string std::string MapEnumToString( LPCSTR pEnumName, int enumVal, bool bSimpleErrFmt = false, bool bHex = false ) const; // (Inline) Set status log (object must exist for the duration of // the DB or at least until being reset) void SetLog( cDB2StatusLog * pLog ) { if (pLog != 0) { mpLog = pLog; } }; // (Inline) Return protocol entities const tDB2EntityMap & GetProtocolEntities() const { return mProtocolEntities; }; // (Inline) Return protocol entity names const tDB2EntityNameMap & GetProtocolEntityNames() const { return mEntityNames; }; // (Inline) Return protocol structures const tDB2FragmentMap & GetProtocolStructs() const { return mEntityStructs; }; // (Inline) Return protocol fields const tDB2FieldMap & GetProtocolFields() const { return mEntityFields; }; // (Inline) Return assembled enumeration map const tDB2EnumMap & GetEnums() const { return mEnumMap; }; // (Inline) Return raw enumeration map const tDB2EnumNameMap & GetRawEnums() const { return mEnumNameMap; }; // (Inline) Return raw enumeration entry map const tDB2EnumEntryMap & GetRawEnumEntries() const { return mEnumEntryMap; }; // (Inline) Return parsed fragment modifier map - optional const tDB2OptionalModMap & GetOptionalMods() const { return mOptionalModMap; }; // (Inline) Return parsed fragment modifier map - expressions const tDB2ExpressionModMap & GetExpressionMods() const { return mExpressionModMap; }; // (Inline) Return parsed fragment modifier map - element // count specified arrays const tDB2Array1ModMap & GetArray1Mods() const { return mArray1ModMap; }; // (Inline) Return parsed fragment modifier map - start/stop // index specified arrays const tDB2Array2ModMap & GetArray2Mods() const { return mArray2ModMap; }; protected: // Assemble the internal enum map bool AssembleEnumMap(); // Assemble the internal protocol entity name map bool AssembleEntityNameMap(); // Build the modifier tables bool BuildModifierTables(); // Check and set the passed in path to something that is useful std::string CheckAndSetBasePath( LPCSTR pBasePath ) const; // Load all tables related to structure (entity, struct, field) bool LoadStructureTables( LPCSTR pBasePath ); bool LoadStructureTables(); // Load all enumeration related tables bool LoadEnumTables( LPCSTR pBasePath ); bool LoadEnumTables(); // Validate (and attempt repair of) structure related tables bool ValidateStructures(); // Validate a single structure bool ValidateStructure( ULONG structID, std::set & fields, ULONG depth ); // Validate a single field bool ValidateField( ULONG structID, ULONG fieldID, std::set & fields ); // Validate an array specifier bool ValidateArraySpecifier( const sDB2Fragment & frag, const std::set & fields ); // Validate a simple optional fragment specifier bool ValidateOptionalSpecifier( const sDB2Fragment & frag, const std::set & fields ); // Validate a simple expression fragment specifier bool ValidateExpressionSpecifier( const sDB2Fragment & frag, const std::set & fields ); /* Status log */ cDB2StatusLog * mpLog; /* Protocol entity table, referenced by multi-value key */ tDB2EntityMap mProtocolEntities; /* Protocol entity keys, referenced by indexed by entity name */ tDB2EntityNameMap mEntityNames; /* The on-demand Protocol entity navigation map */ mutable tDB2EntityNavMap mEntityNavMap; /* Protocol entity struct table, indexed by struct ID & fragment order */ tDB2FragmentMap mEntityStructs; /* Protocol entity field table, indexed by field ID */ tDB2FieldMap mEntityFields; /* Enum map, indexed by enum ID */ tDB2EnumNameMap mEnumNameMap; /* Enum entry map, indexed by enum ID/value pair */ tDB2EnumEntryMap mEnumEntryMap; /* The assembled enum map */ tDB2EnumMap mEnumMap; /* Parsed fragment modifier map - optional fragments */ tDB2OptionalModMap mOptionalModMap; /* Parsed fragment modifier map - expression fragments */ tDB2ExpressionModMap mExpressionModMap; /* Parsed fragment modifier map - element count specified arrays */ tDB2Array1ModMap mArray1ModMap; /* Parsed fragment modifier map - start/stop index specified arrays */ tDB2Array2ModMap mArray2ModMap; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/CoreUtilities.cpp000077500000000000000000001236471455567757300235640ustar00rootroot00000000000000/*=========================================================================== FILE: CoreUtilities.cpp DESCRIPTION: Collection of various utility methods PUBLIC CLASSES AND METHODS: StringToLONG StringToULONG StringToLONGLONG StringToULONGLONG ParseTokens() ParseCommandLine() ParseFormatSpecifier() FromString( CHAR ) FromString( UCHAR ) FromString( SHORT ) FromString( USHORT ) FromString( int ) FromString( UINT ) FromString( LONG ) FromString( ULONG ) FromString( LONGLONG ) FromString( ULONGLONG ) ToString( CHAR ) ToString( UCHAR ) ToString( SHORT ) ToString( USHORT ) ToString( int ) ToString( UINT ) ToString( LONG ) ToString( ULONG ) ToString( LONGLONG ) ToString( ULONGLONG ) ContainerToCSVString() CSVStringToContainer() CSVStringToValidatedContainer() SetDiff() SetIntersection() SetUnion() GetProgramPath() IsFolder() EnumerateFolders() IsHidden() DepthSearch() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "CoreUtilities.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Format specifier states enum eFormatState { eFMT_STATE_NORMAL, // [0] Normal state; outputting literal characters eFMT_STATE_PERCENT, // [1] Just read '%' eFMT_STATE_FLAG, // [2] Just read flag character eFMT_STATE_WIDTH, // [3] Just read width specifier eFMT_STATE_DOT, // [4] Just read '.' eFMT_STATE_PRECIS, // [5] Just read precision specifier eFMT_STATE_SIZE, // [6] Just read size specifier eFMT_STATE_TYPE, // [7] Just read type specifier eFMT_STATE_INVALID, // [8] Invalid format eFMT_STATES // [9] Number of format states }; // Format specifier character classes enum eFormatCharClass { eFMT_CH_CLASS_OTHER, // [0] Character with no special meaning eFMT_CH_CLASS_PERCENT, // [1] '%' eFMT_CH_CLASS_DOT, // [2] '.' eFMT_CH_CLASS_STAR, // [3] '*' eFMT_CH_CLASS_ZERO, // [4] '0' eFMT_CH_CLASS_DIGIT, // [5] '1'..'9' eFMT_CH_CLASS_FLAG, // [6] ' ', '+', '-', '#' eFMT_CH_CLASS_SIZE, // [7] 'h', 'l', 'L', 'N', 'F', 'w' eFMT_CH_CLASS_TYPE // [8] Type specifying character }; // Lookup table for determining class of a character (lower nibble) // and next format specifier state (upper nibble) const UCHAR gLookupTable[] = { 0x06, // ' ', FLAG 0x80, // '!', OTHER 0x80, // '"', OTHER 0x86, // '#', FLAG 0x80, // '$', OTHER 0x81, // '%', PERCENT 0x80, // '&', OTHER 0x00, // ''', OTHER 0x00, // '(', OTHER 0x10, // ')', OTHER 0x03, // '*', STAR 0x86, // '+', FLAG 0x80, // ',', OTHER 0x86, // '-', FLAG 0x82, // '.', DOT 0x80, // '/', OTHER 0x14, // '0', ZERO 0x05, // '1', DIGIT 0x05, // '2', DIGIT 0x45, // '3', DIGIT 0x45, // '4', DIGIT 0x45, // '5', DIGIT 0x85, // '6', DIGIT 0x85, // '7', DIGIT 0x85, // '8', DIGIT 0x05, // '9', DIGIT 0x00, // :!', OTHER 0x00, // ';', OTHER 0x30, // '<', OTHER 0x30, // '=', OTHER 0x80, // '>', OTHER 0x50, // '?', OTHER 0x80, // '@', OTHER 0x80, // 'A', OTHER 0x00, // 'B', OTHER 0x08, // 'C', TYPE 0x00, // 'D', OTHER 0x28, // 'E', TYPE 0x27, // 'F', SIZE 0x38, // 'G', TYPE 0x50, // 'H', OTHER 0x57, // 'I', SIZE 0x80, // 'J', OTHER 0x00, // 'K', OTHER 0x07, // 'L', SIZE 0x00, // 'M', OTHER 0x37, // 'N', SIZE 0x30, // 'O', OTHER 0x30, // 'P', OTHER 0x50, // 'Q', OTHER 0x50, // 'R', OTHER 0x88, // 'S', TYPE 0x00, // 'T', OTHER 0x00, // 'U', OTHER 0x00, // 'V', OTHER 0x20, // 'W', OTHER 0x28, // 'X', TYPE 0x80, // 'Y', OTHER 0x88, // 'Z', TYPE 0x80, // '[', OTHER 0x80, // '\', OTHER 0x00, // ']', OTHER 0x00, // '^', OTHER 0x00, // '-', OTHER 0x60, // '`', OTHER 0x60, // 'a', OTHER 0x60, // 'b', OTHER 0x68, // 'c', TYPE 0x68, // 'd', TYPE 0x68, // 'e', TYPE 0x08, // 'f', TYPE 0x08, // 'g', TYPE 0x07, // 'h', SIZE 0x78, // 'i', TYPE 0x70, // 'j', OTHER 0x70, // 'k', OTHER 0x77, // 'l', SIZE 0x70, // 'm', OTHER 0x70, // 'n', OTHER 0x08, // 'o', TYPE 0x08, // 'p', TYPE 0x00, // 'q', OTHER 0x00, // 'r', OTHER 0x08, // 's', TYPE 0x00, // 't', OTHER 0x08, // 'u', TYPE 0x00, // 'v', OTHER 0x07, // 'w', SIZE 0x08 // 'x', TYPE }; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: IsWhitespace (Private Free Method) DESCRIPTION: Is this whitespace? PARAMETERS: pStr [ I ] - The string RETURN VALUE: bool ===========================================================================*/ static bool IsWhitespace( LPCSTR pStr ) { bool bWS = false; int c = (int)*pStr; if (isspace( c )) { bWS = true; } return bWS; } /*=========================================================================== METHOD: IsHexadecimalString (Private Free Method) DESCRIPTION: Is this a hexadecimal digits string? PARAMETERS: pStr [ I ] - The string RETURN VALUE: bool ===========================================================================*/ static bool IsHexadecimalString( LPCSTR pStr ) { // Assume not bool bHex = false; // Skip whitespace LPCSTR pTmp = pStr; while (IsWhitespace( pTmp ) == true) { pTmp++; } // Skip leading +/- CHAR ch = *pTmp; if (ch == '+' || ch == '-') { pTmp++; } if (*pTmp == '0') { pTmp++; if (*pTmp == 'x' || *pTmp == 'X') { bHex = true; } } return bHex; } /*=========================================================================== METHOD: IsNegativeString (Private Free Method) DESCRIPTION: Is this a string starting with a negative sign? PARAMETERS: pStr [ I ] - The string RETURN VALUE: bool ===========================================================================*/ static bool IsNegativeString( LPCSTR pStr ) { // Assume not bool bNeg = false; // Skip whitespace LPCSTR pTmp = pStr; while (IsWhitespace( pTmp ) == true) { pTmp++; } CHAR ch = *pTmp; if (ch == '-') { bNeg = true; } return bNeg; } /*=========================================================================== METHOD: StringToLONG (Free Method) DESCRIPTION: Replacement/front end for strtol NOTE: strtol does not correctly handle a negative integer when specified in hexadecimal, so we have to check for that first PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToLONG( LPCSTR pStr, int base, LONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } // Hexadecimal? if (base == 16 || (base == 0 && IsHexadecimalString( pStr ) == true)) { // No negative hexadecimal strings allowed if (IsNegativeString( pStr ) == false) { // Reset error errno = 0; // Use the unsigned version, then cast LPSTR pEnd = (LPSTR)pStr; ULONG tmpVal = strtoul( pStr, &pEnd, base ); if (tmpVal != ULONG_MAX || errno != ERANGE) { // Where did we end? if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = (LONG)tmpVal; bOK = true; } } } } else { // Proceed as normal LPSTR pEnd = (LPSTR)pStr; LONG tmpVal = strtol( pStr, &pEnd, base ); if ((tmpVal != LONG_MAX && tmpVal != LONG_MIN) || errno != ERANGE) { // Where did we end? if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: StringToULONG (Free Method) DESCRIPTION: Replacement/front end for strtoul PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToULONG( LPCSTR pStr, int base, ULONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } // No negative strings allowed if (IsNegativeString( pStr ) == true) { return bOK; } // Reset error errno = 0; LPSTR pEnd = (LPSTR)pStr; ULONG tmpVal = strtoul( pStr, &pEnd, base ); if (tmpVal != ULONG_MAX || errno != ERANGE) { if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } return bOK; } /*=========================================================================== METHOD: StringToLONGLONG (Free Method) DESCRIPTION: Replacement/front end for strtoll NOTE: strtoll does not correctly handle a negative integer when specified in hexadecimal, so we have to check for that first PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToLONGLONG( LPCSTR pStr, int base, LONGLONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } if (base == 16 || (base == 0 && IsHexadecimalString( pStr ) == true)) { // No negative hexadecimal strings allowed if (IsNegativeString( pStr ) == false) { // Reset error errno = 0; // Use the unsigned version, then cast LPSTR pEnd = (LPSTR)pStr; ULONGLONG tmpVal = strtoull( pStr, &pEnd, base ); if (tmpVal != ULLONG_MAX || errno != ERANGE) { // Where did we end? if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = (LONGLONG)tmpVal; bOK = true; } } } } else { // Proceed as normal LPSTR pEnd = (LPSTR)pStr; LONGLONG tmpVal = strtoll( pStr, &pEnd, base ); if ((tmpVal != LLONG_MAX && tmpVal != LLONG_MIN) || errno != ERANGE) { if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: StringToULONGLONG (Free Method) DESCRIPTION: Replacement/front end for strtouill PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToULONGLONG( LPCSTR pStr, int base, ULONGLONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } // No negative strings allowed if (IsNegativeString( pStr ) == true) { return bOK; } // Reset error errno = 0; LPSTR pEnd = (LPSTR)pStr; ULONGLONG tmpVal = strtoull( pStr, &pEnd, base ); if (tmpVal != ULLONG_MAX || errno != ERANGE) { if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } return bOK; } /*=========================================================================== METHOD: ParseCommandLine (Free Method) DESCRIPTION: Parse a command line to tokens (a command line is a string of space delimited values where a value that contains space is enclosed in text) PARAMETERS: commandLine [ I ] - The characters separating tokens tokens [ O ] - The resultant vector of tokens RETURN VALUE: None ===========================================================================*/ void ParseCommandLine( std::string commandLine, std::vector & tokens ) { ULONG count = (ULONG)commandLine.size(); for (ULONG nEndToken = 0; nEndToken < count;) { // Skip leading spaces int nStartToken = commandLine.find_first_not_of( " ", nEndToken ); if (nStartToken == -1) { // All that is left is spaces return; } int stringLength = 0; // In Quotes? If so ignore spaces until next quote if (commandLine[ nStartToken ] == '\"') { nStartToken++; nEndToken = commandLine.find( '\"', nStartToken ); if (nEndToken == -1) { // Unable to find trailing quote, fail return; } stringLength = nEndToken - nStartToken; nEndToken++; } else { nEndToken = commandLine.find( ' ', nStartToken ); if (nEndToken == -1) { // Unable to find trailing space, use end nEndToken = commandLine.size(); } stringLength = nEndToken - nStartToken; } std::string newToken = commandLine.substr( nStartToken, stringLength ); tokens.push_back( newToken ); } } /*=========================================================================== METHOD: ParseTokens (Free Method) DESCRIPTION: Parse a line into individual tokens NOTE: No attempt is made to handle accidental separators, i.e. searching for ',' on 'foo, bar, "foo, bar"' will return four tokens, not three so pick something like '^' instead of ','! PARAMETERS: pSeparator [ I ] - The characters separating tokens pLine [ I ] - The string being parsed tokens [ O ] - The resultant vector of tokens RETURN VALUE: None ===========================================================================*/ void ParseTokens( LPCSTR pSeparator, LPSTR pLine, std::vector & tokens ) { if (pSeparator != 0 && pSeparator[0] != 0 && pLine != 0 && pLine[0] != 0) { LPSTR pToken = strtok( pLine, pSeparator ); while (pToken != 0) { // Store token tokens.push_back( pToken ); // Get next token: pToken = strtok( 0, pSeparator ); } } } /*=========================================================================== METHOD: ParseFormatSpecifier (Free Method) DESCRIPTION: Parse a format specifier into individual format type tokens PARAMETERS: pFmt [ I ] - The format specifier (must be NULL terminated) fmtLen [ I ] - Length of above format specifier fmtTypes [ O ] - The individual format type tokens ('d', 'u', 'us' etc.) RETURN VALUE: bool - Valid format specifier? ===========================================================================*/ bool ParseFormatSpecifier( LPCSTR pFmt, ULONG fmtLen, std::vector & fmtTypes ) { // Assume failure bool bOK = false; // Make sure string is NULL terminated CHAR ch; ULONG chars = 0; while (chars < fmtLen) { if (pFmt[chars] == '\0') { break; } else { chars++; } } if (pFmt[chars] != '\0') { return bOK; } // Extract individual format type tokens eFormatState state = eFMT_STATE_NORMAL; eFormatCharClass cc = eFMT_CH_CLASS_OTHER; while ((ch = *pFmt++) != '\0' && state != eFMT_STATE_INVALID) { // Find character class cc = eFMT_CH_CLASS_OTHER; if (ch >= ' ' && ch <= 'x') { cc = (eFormatCharClass)(gLookupTable[ch - ' '] & 0xF); } // Find next state state = (eFormatState)(gLookupTable[cc * eFMT_STATES + (state)] >> 4); switch (state) { case eFMT_STATE_NORMAL: NORMAL_STATE: break; case eFMT_STATE_PERCENT: case eFMT_STATE_FLAG: case eFMT_STATE_DOT: break; case eFMT_STATE_WIDTH: case eFMT_STATE_PRECIS: if (ch == '*') { fmtTypes.push_back( ch ); } break; case eFMT_STATE_SIZE: switch (ch) { case 'l': if (*pFmt == 'l') { ++pFmt; } break; case 'I': if ( (*pFmt == '6') && (*(pFmt + 1) == '4') ) { pFmt += 2; } else if ( (*pFmt == '3') && (*(pFmt + 1) == '2') ) { pFmt += 2; } else if ( (*pFmt == 'd') || (*pFmt == 'i') || (*pFmt == 'o') || (*pFmt == 'u') || (*pFmt == 'x') || (*pFmt == 'X') ) { // Nothing further needed } else { state = eFMT_STATE_NORMAL; goto NORMAL_STATE; } break; case 'h': case 'w': break; } break; case eFMT_STATE_TYPE: fmtTypes.push_back( ch ); break; } } bOK = (state == eFMT_STATE_NORMAL || state == eFMT_STATE_TYPE); return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, CHAR & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true) { // Reset status bOK = false; // Was this provided as a hexadecimal string? if (IsHexadecimalString( pStr ) == true) { // Yes, the return value is a LONG, so check against // the maximum range for a UCHAR, before casting to // a CHAR (to pick sign back up) if (val <= UCHAR_MAX) { // Success! theType = (CHAR)val; bOK = true; } } else if (val >= SCHAR_MIN && val <= SCHAR_MAX) { // Success! theType = (CHAR)val; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, UCHAR & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true && val <= UCHAR_MAX) { // Success! theType = (UCHAR)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, SHORT & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true) { // Reset status bOK = false; // Was this provided as a hexadecimal string? if (IsHexadecimalString( pStr ) == true) { // Yes, the return value is a LONG, so check against // the maximum range for a USHORT, before casting to // a SHORT (to pick sign back up) if (val <= USHRT_MAX) { // Success! theType = (SHORT)val; bOK = true; } } else if (val >= SHRT_MIN && val <= SHRT_MAX) { // Success! theType = (SHORT)val; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, USHORT & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true && val <= USHRT_MAX) { // Success! theType = (USHORT)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, int & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true && (val >= INT_MIN && val <= INT_MAX)) { // Success! theType = (int)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, UINT & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true && val <= UINT_MAX) { // Success! theType = (UINT)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, LONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, ULONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, LONGLONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONGLONG val = LLONG_MAX; bOK = StringToLONGLONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, ULONGLONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONGLONG val = ULLONG_MAX; bOK = StringToULONGLONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( CHAR val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int tmp = (int)val; int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%d", tmp ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( UCHAR val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%u", (UINT)val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( SHORT val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int tmp = (int)val; int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%d", tmp ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( USHORT val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%u", (UINT)val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( int val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%d", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( UINT val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%u", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( LONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%ld", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( ULONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%lu", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( LONGLONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%lld", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( ULONGLONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%llu", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: GetProgramPath (Public Method) DESCRIPTION: Return the special folder used for storing program files RETURN VALUE: std::string (Static value of "/opt/Qualcomm/Gobi/") ===========================================================================*/ std::string GetProgramPath() { // If running programs's path is desired we could // use readlink with /proc/getpid()/exe // Just using static path, as we don't want them to move it std::string path = "/opt/Qualcomm/Gobi/"; return path; } /*=========================================================================== METHOD: IsFolder (Free Method) DESCRIPTION: Helper function for EnumerateFolders, tells if a dirent is a folder. This reduces the memory usage by scandir, as compared to checking after scandir returns. PARAMETERS: pFile [ I ] - dirent structure describing file RETURN VALUE: int: zero - Ignore this file nonzero - Process this file ===========================================================================*/ int IsFolder( const struct dirent * pFile ) { // Ignore anything beginning with a '.' if (pFile->d_name[0] == '.') { return 0; } return (pFile->d_type == DT_DIR ? 1 : 0); } /*=========================================================================== METHOD: EnumerateFolders (Public Method) DESCRIPTION: Enumerate the subfolders of the given folder (recursive) PARAMETERS: baseFolder [ I ] - Folder to search in foundFolders [ O ] - Fully qualified paths of found folders RETURN VALUE: None ===========================================================================*/ void EnumerateFolders( const std::string & baseFolder, std::vector & foundFolders ) { if (baseFolder.size() == 0) { return; } std::string folderSearch = baseFolder; // Add trailing / if not present int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } dirent ** ppDevFiles; // Yes, scandir really takes a triple pointer for its second param int nNumDevFiles = scandir( folderSearch.c_str(), &ppDevFiles, IsFolder, NULL ); for (int nFile = 0; nFile < nNumDevFiles; nFile++) { std::string newFolder = folderSearch + ppDevFiles[nFile]->d_name; free( ppDevFiles[nFile] ); foundFolders.push_back( newFolder ); EnumerateFolders( newFolder, foundFolders ); } if (nNumDevFiles != -1) { free( ppDevFiles ); } } /*=========================================================================== METHOD: IsHidden (Free Method) DESCRIPTION: Helper function for DepthSearch, tells if a dirent is a hidden file. This reduces the memory usage by scandir, as compared to checking after scandir returns. PARAMETERS: pFile [ I ] - dirent structure describing file RETURN VALUE: int: zero - Ignore this file nonzero - Process this file ===========================================================================*/ int IsHidden( const struct dirent * pFile ) { // Ignore anything beginning with a '.' if (pFile->d_name[0] == '.') { return 0; } return 1; } /*=========================================================================== METHOD: DepthSearch (Public Method) DESCRIPTION: Search for all matching files at a specified depth (recursive) PARAMETERS: baseFolder [ I ] - Folder to search in depth [ I ] - Depth name [ I ] - Partial name of file to search for foundFolders [ O ] - Fully qualified paths of found files RETURN VALUE: None ===========================================================================*/ void DepthSearch( const std::string & baseFolder, int depth, std::string name, std::vector & foundFiles ) { if (baseFolder.size() == 0 || name.size() == 0 || depth < 0) { return; } std::string folderSearch = baseFolder; // Add trailing / if not present int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } dirent ** ppDevFiles; // Yes, scandir really takes a triple pointer for its second param int nNumDevFiles = scandir( folderSearch.c_str(), &ppDevFiles, IsHidden, NULL ); for (int nFile = 0; nFile < nNumDevFiles; nFile++) { std::string newFile = ppDevFiles[nFile]->d_name; // Recurse or not? if (depth == 0) { if (newFile.find( name ) != std::string::npos) { foundFiles.push_back( folderSearch + newFile ); } } else { DepthSearch( folderSearch + newFile, depth - 1, name, foundFiles ); } } if (nNumDevFiles != -1) { free( ppDevFiles ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/CoreUtilities.h000077500000000000000000000426401455567757300232220ustar00rootroot00000000000000/*=========================================================================== FILE: CoreUtilities.h DESCRIPTION: Collection of various utility methods PUBLIC CLASSES AND METHODS: StringToLONG StringToULONG StringToLONGLONG StringToULONGLONG ParseCommandLine() ParseTokens() ParseFormatSpecifier() FromString( CHAR ) FromString( UCHAR ) FromString( SHORT ) FromString( USHORT ) FromString( int ) FromString( UINT ) FromString( LONG ) FromString( ULONG ) FromString( LONGLONG ) FromString( ULONGLONG ) ToString( CHAR ) ToString( UCHAR ) ToString( SHORT ) ToString( USHORT ) ToString( int ) ToString( UINT ) ToString( LONG ) ToString( ULONG ) ToString( LONGLONG ) ToString( ULONGLONG ) GetProgramPath() EnumerateFolders() DepthSearch() ContainerToCSVString() CSVStringToContainer() CSVStringToValidatedContainer() SetDiff() SetIntersection() SetUnion() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Suggested size of an argument buffer to ToString() for any key, each // ToString() should not write more than this size to the passed in buffer const ULONG SUGGESTED_BUFFER_LEN = 64; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // Replacement/front end for _tcstol bool StringToLONG( LPCSTR pStr, int base, LONG & val ); // Replacement/front end for _tcstoul bool StringToULONG( LPCSTR pStr, int base, ULONG & val ); // Replacement/front end for _tcstoi64 bool StringToLONGLONG( LPCSTR pStr, int base, LONGLONG & val ); // Replacement/front end for _tcstoui64 bool StringToULONGLONG( LPCSTR pStr, int base, ULONGLONG & val ); // Parse a command line to tokens (a command line is a string of // space delimited values where a value that contains space is // enclosed in text) void ParseCommandLine( std::string commandLine, std::vector & tokens ); // Parse a line into individual tokens void ParseTokens( LPCSTR pSeparator, LPSTR pLine, std::vector & tokens ); // Parse a format specifier into individual format type tokens bool ParseFormatSpecifier( LPCSTR pFmt, ULONG fmtLen, std::vector & fmtTypes ); // Convert a string to a value bool FromString( LPCSTR pStr, CHAR & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, UCHAR & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, SHORT & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, USHORT & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, int & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, UINT & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, LONG & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, ULONG & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, LONGLONG & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, ULONGLONG & theType ); // Convert a value to a string bool ToString( CHAR val, LPSTR pStr ); // Convert a value to a string bool ToString( UCHAR val, LPSTR pStr ); // Convert a value to a string bool ToString( SHORT val, LPSTR pStr ); // Convert a value to a string bool ToString( USHORT val, LPSTR pStr ); // Convert a value to a string bool ToString( int val, LPSTR pStr ); // Convert a value to a string bool ToString( UINT val, LPSTR pStr ); // Convert a value to a string bool ToString( LONG val, LPSTR pStr ); // Convert a value to a string bool ToString( ULONG val, LPSTR pStr ); // Convert a value to a string bool ToString( LONGLONG val, LPSTR pStr ); // Convert a value to a string bool ToString( ULONGLONG val, LPSTR pStr ); // Return the special folder used for storing program files std::string GetProgramPath(); // Enumerate the subfolders of the given folder (recursive) void EnumerateFolders( const std::string & baseFolder, std::vector & foundFolders ); // Search for a file at a given depth void DepthSearch( const std::string & baseFolder, int depth, std::string name, std::vector & foundFiles ); /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ContainerToCSVString (Free Method) DESCRIPTION: Convert the contents of a container to a CSV string NOTE: ToString() must be defined for the container value type PARAMETERS: cont [ I ] - The container sep [ I ] - The character separating tokens csv [ O ] - The resulting comma separated string RETURN VALUE: None ===========================================================================*/ template void ContainerToCSVString( const Container & cont, CHAR sep, std::string & csv ) { csv = ""; if ((ULONG)cont.size() > (ULONG)0) { CHAR keyBuf[SUGGESTED_BUFFER_LEN]; typename Container::const_iterator pIter = cont.begin(); while (pIter != cont.end()) { const typename Container::value_type & theKey = *pIter; bool bOK = ToString( theKey, &keyBuf[0] ); if (bOK == true && keyBuf[0] != 0) { if (pIter != cont.begin()) { csv += sep; } csv += (LPCSTR)&keyBuf[0]; } pIter++; } } } /*=========================================================================== METHOD: CSVStringToContainer (Free Method) DESCRIPTION: Populate a container from a parsed CSV string NOTE: FromString() must be defined for the container value type NOTE: The container is emptied before this operation is attempted PARAMETERS: pSeparator [ I ] - The characters separating tokens pCSV [ I ] - The comma separated string (will be modified) cont [ O ] - The resulting container bClear [ I ] - Clear the container first? NOTE: if the container is not cleared first then insertions may fail for duplicate keys RETURN VALUE: None ===========================================================================*/ template void CSVStringToContainer( LPCSTR pSeparator, LPSTR pCSV, Container & cont, bool bClear = true ) { if (pCSV != 0 && *pCSV != 0) { // Remove a leading quote? if (*pCSV == '\"') { pCSV++; } // Remove a trailing quote? ULONG len = (ULONG)strlen( pCSV ); if (len > 0) { if (pCSV[len - 1] == '\"') { pCSV[len - 1] = 0; } } // Clear the container first? if (bClear == true) { cont.clear(); } std::vector tokens; ParseTokens( pSeparator, pCSV, tokens ); std::vector ::const_iterator pIter = tokens.begin(); while (pIter != tokens.end()) { LPCSTR pTok = *pIter; typename Container::value_type theKey; bool bOK = ::FromString( pTok, theKey ); if (bOK == true) { std::insert_iterator is( cont, cont.end() ); *is = theKey; } pIter++; } } } /*=========================================================================== METHOD: CSVStringToValidatedContainer (Free Method) DESCRIPTION: Populate a container from a parsed CSV string NOTE: FromString() and IsValid() must be defined for the container value type (the later need not do anything but return true) NOTE: The container is emptied before this operation is attempted PARAMETERS: pSeparator [ I ] - The characters separating tokens pCSV [ I ] - The comma separated string (will be modified) cont [ O ] - The resulting container RETURN VALUE: None ===========================================================================*/ template void CSVStringToValidatedContainer( LPCSTR pSeparator, LPSTR pCSV, Container & cont ) { cont.clear(); if (pCSV != 0 && *pCSV != 0) { // Remove a leading quote? if (*pCSV == '\"') { pCSV++; } // Remove a trailing quote? ULONG len = (ULONG)strlen( pCSV ); if (len > 0) { if (pCSV[len - 1] == '\"') { pCSV[len - 1] = 0; } } cont.clear(); std::vector tokens; ParseTokens( pSeparator, pCSV, tokens ); std::vector ::const_iterator pIter = tokens.begin(); while (pIter != tokens.end()) { LPCSTR pTok = *pIter; typename Container::value_type theKey; bool bOK = ::FromString( pTok, theKey ); if (bOK == true) { bool bValid = IsValid( theKey ); if (bValid == true) { std::insert_iterator is( cont, cont.end() ); *is = theKey; } } pIter++; } } } /*=========================================================================== METHOD: SetDiff (Free Method) DESCRIPTION: Given two sets return a third that contains everything in the first set but not the second set PARAMETERS: setA [ I ] - The first set setB [ I ] - The second set RETURN VALUE: std::set - the difference ===========================================================================*/ template std::set SetDiff( const std::set & setA, const std::set & setB ) { std::set retSet; if (setB.size() == 0) { // Everything that is in the first set but not the second // (empty) set is ... the first set! retSet = setA; } else if (setA.size() == 0) { // The first set is empty, hence the return set is empty } else { // Both sets have elements, therefore the iterators will // be valid and we can use the standard approach typename std::set ::const_iterator pIterA = setA.begin(); typename std::set ::const_iterator pIterB = setB.begin(); for ( ; pIterA != setA.end() && pIterB != setB.end(); ) { if (*pIterA < *pIterB) { retSet.insert( *pIterA ); pIterA++; } else if (*pIterB < *pIterA) { pIterB++; } else { pIterA++; pIterB++; } } while (pIterA != setA.end()) { retSet.insert( *pIterA ); pIterA++; } } return retSet; } /*=========================================================================== METHOD: SetIntersection (Free Method) DESCRIPTION: Given two sets return a third that contains everything that is in both sets PARAMETERS: setA [ I ] - The first set setB [ I ] - The second set RETURN VALUE: std::set - the union ===========================================================================*/ template std::set SetIntersection( const std::set & setA, const std::set & setB ) { std::set retSet; // Neither set can be empty if (setA.size() != 0 && setA.size() != 0) { // Both sets have elements, therefore the iterators will // be valid and we can use the standard approach typename std::set ::const_iterator pIterA = setA.begin(); typename std::set ::const_iterator pIterB = setB.begin(); for ( ; pIterA != setA.end() && pIterB != setB.end(); ) { if (*pIterA < *pIterB) { pIterA++; } else if (*pIterB < *pIterA) { pIterB++; } else { retSet.insert( *pIterA ); pIterA++; pIterB++; } } } return retSet; } /*=========================================================================== METHOD: SetUnion (Free Method) DESCRIPTION: Given two sets return a third that contains everything that is either in the first set or in the second set PARAMETERS: setA [ I ] - The first set setB [ I ] - The second set RETURN VALUE: std::set - the union ===========================================================================*/ template std::set SetUnion( const std::set & setA, const std::set & setB ) { std::set retSet; if (setB.size() == 0) { // Everything that is in the first (possibly empty) set or in // the second (empty) set is ... the first set! retSet = setA; } else if (setA.size() == 0) { // Everything that is in the first (empty) set or in the // second (possibly empty) set is ... the second set! retSet = setB; } else { // Both sets have elements, therefore the iterators will // be valid and we can use the standard approach typename std::set ::const_iterator pIterA = setA.begin(); typename std::set ::const_iterator pIterB = setB.begin(); for ( ; pIterA != setA.end() && pIterB != setB.end(); ) { if (*pIterA < *pIterB) { retSet.insert( *pIterA ); pIterA++; } else if (*pIterB < *pIterA) { retSet.insert( *pIterB ); pIterB++; } else { retSet.insert( *pIterA ); pIterA++; pIterB++; } } while (pIterA != setA.end()) { retSet.insert( *pIterA ); pIterA++; } while (pIterB != setB.end()) { retSet.insert( *pIterB ); pIterB++; } } return retSet; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DB2NavTree.cpp000077500000000000000000000301311455567757300226150ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNavTree.cpp DESCRIPTION: Implementation of cDB2NavTree PUBLIC CLASSES AND METHODS: sDB2NavFragment cDB2NavTree This class distills the database description of a protocol entity into a simple tree structure more suited to efficient navigation for parsing/packing Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DB2NavTree.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sDB2NavFragment Methods /*=========================================================================*/ /*=========================================================================== METHOD: sDB2NavFragment (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ sDB2NavFragment::sDB2NavFragment() : mpField( 0 ), mpFragment( 0 ), mpNextFragment( 0 ), mpLinkFragment( 0 ) { // Nothing to do } /*=========================================================================*/ // cDB2NavTree Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDB2NavTree (Public Method) DESCRIPTION: Constructor PARAMETERS: db [ I ] - Database to use RETURN VALUE: None ===========================================================================*/ cDB2NavTree::cDB2NavTree( const cCoreDatabase & db ) : mDB( db ) { // Nothing to do } /*=========================================================================== METHOD: ~cDB2NavTree (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDB2NavTree::~cDB2NavTree() { // Clean-up our fragment allocations std::list ::iterator pIter; for (pIter = mFragments.begin(); pIter != mFragments.end(); pIter++) { sDB2NavFragment * pFrag = *pIter; if (pFrag != 0) { delete pFrag; } } } /*=========================================================================== METHOD: BuildTree (Internal Method) DESCRIPTION: Build nav tree for the entity described by the given key/name PARAMETERS: key [ I ] - Key into the protocol entity table RETURN VALUE: bool ===========================================================================*/ bool cDB2NavTree::BuildTree( const std::vector & key ) { // Assume failure bool bRC = false; // Look up entity definition bool bFound = mDB.FindEntity( key, mEntity ); // Did we find it? if (bFound == false) { // No definition in database return bRC; } // A structure to navigate? if (mEntity.mStructID == -1) { bRC = true; return bRC; } const tDB2FragmentMap & structTable = mDB.GetProtocolStructs(); // Grab first fragment of structure std::pair id( mEntity.mStructID, 0 ); tDB2FragmentMap::const_iterator pFrag = structTable.find( id ); // Nothing to navigate? if (pFrag == structTable.end()) { ASSERT( 0 ); return bRC; } // No name? if (mEntity.mpName == 0 || mEntity.mpName[0] == 0) { ASSERT( 0 ); return bRC; } // Process the initial structure bRC = ProcessStruct( &pFrag->second, 0 ); return bRC; } /*=========================================================================== METHOD: ProcessStruct (Internal Method) DESCRIPTION: Process a structure described by the given initial fragment PARAMETERS: frag [ I ] - Entry point for structure pOwner [ I ] - Owning fragment RETURN VALUE: bool ===========================================================================*/ bool cDB2NavTree::ProcessStruct( const sDB2Fragment * pFrag, sDB2NavFragment * pOwner ) { // Assume success bool bRC = true; // Grab struct ID/fragment ID from fragment std::pair key = pFrag->GetKey(); ULONG structID = key.first; const tDB2FragmentMap & structTable = mDB.GetProtocolStructs(); const tDB2FieldMap & fieldTable = mDB.GetProtocolFields(); // Sync iterator to fragment tDB2FragmentMap::const_iterator pFragIter = structTable.find( key ); if (pFragIter == structTable.end()) { // This should not happen ASSERT( 0 ); bRC = false; return bRC; } // Fragments we allocate along the way sDB2NavFragment * pOld = 0; sDB2NavFragment * pNew = 0; // Process each fragment in the structure while ( (pFragIter != structTable.end()) && (pFragIter->second.mStructID == structID) ) { pFrag = &pFragIter->second; // Allocate our new fragment pNew = new sDB2NavFragment; if (pNew == 0) { bRC = false; break; } // Store DB fragemnt pNew->mpFragment = pFrag; mFragments.push_back( pNew ); // Hook previous up to us if (pOld != 0 && pOld->mpNextFragment == 0) { pOld->mpNextFragment = pNew; } // Hook owner up to us if (pOwner != 0 && pOwner->mpLinkFragment == 0) { pOwner->mpLinkFragment = pNew; } // Modified? switch (pFrag->mModifierType) { case eDB2_MOD_VARIABLE_ARRAY: case eDB2_MOD_VARIABLE_STRING1: case eDB2_MOD_VARIABLE_STRING2: case eDB2_MOD_VARIABLE_STRING3: { const tDB2Array1ModMap & arrays1 = mDB.GetArray1Mods(); tDB2Array1ModMap::const_iterator pTmp; pTmp = arrays1.find( pFrag->mpModifierValue ); if (pTmp != arrays1.end()) { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[pTmp->second] = entry; } else { bRC = false; } } break; case eDB2_MOD_VARIABLE_ARRAY2: { const tDB2Array2ModMap & arrays2 = mDB.GetArray2Mods(); tDB2Array2ModMap::const_iterator pTmp; pTmp = arrays2.find( pFrag->mpModifierValue ); if (pTmp != arrays2.end()) { // We need to track the value of the given fields std::pair entry( false, 0 ); mTrackedFields[pTmp->second.first] = entry; mTrackedFields[pTmp->second.second] = entry; } else { bRC = false; } } break; case eDB2_MOD_OPTIONAL: { const tDB2OptionalModMap & conditions = mDB.GetOptionalMods(); tDB2OptionalModMap::const_iterator pTmp; pTmp = conditions.find( pFrag->mpModifierValue ); if (pTmp != conditions.end()) { const sDB2SimpleCondition & con = pTmp->second; // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[con.mID] = entry; if (con.mbF2F == true) { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[(ULONG)con.mValue] = entry; } } else { bRC = false; } } break; case eDB2_MOD_VARIABLE_ARRAY3: { const tDB2ExpressionModMap & exprs = mDB.GetExpressionMods(); tDB2ExpressionModMap::const_iterator pTmp; pTmp = exprs.find( pFrag->mpModifierValue ); if (pTmp != exprs.end()) { const sDB2SimpleExpression & expr = pTmp->second; // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[expr.mID] = entry; if (expr.mbF2F == true) { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[(ULONG)expr.mValue] = entry; } } else { bRC = false; } } break; }; // What type of fragment is this? switch (pFrag->mFragmentType) { case eDB2_FRAGMENT_FIELD: { // Grab field ID ULONG fieldID = pFrag->mFragmentValue; // Find field representation in database tDB2FieldMap::const_iterator pField = fieldTable.find( fieldID ); if (pField != fieldTable.end()) { pNew->mpField = &pField->second; } else { bRC = false; } } break; case eDB2_FRAGMENT_STRUCT: { // Grab structure ID ULONG structID = pFrag->mFragmentValue; // Grab first fragment of structure std::pair id( structID, 0 ); tDB2FragmentMap::const_iterator pFragIterTmp; pFragIterTmp = structTable.find( id ); if (pFragIterTmp != structTable.end()) { pFrag = &pFragIterTmp->second; bRC = ProcessStruct( pFrag, pNew ); } else { bRC = false; } } break; case eDB2_FRAGMENT_VARIABLE_PAD_BITS: case eDB2_FRAGMENT_VARIABLE_PAD_BYTES: { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[pFrag->mFragmentValue] = entry; bRC = true; } break; default: bRC = true; break; } if (bRC == true) { pFragIter++; pOld = pNew; pNew = 0; } else { break; } } return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DB2NavTree.h000077500000000000000000000113131455567757300222630ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNavTree.h DESCRIPTION: Declaration of cProtocolEntityNavTree PUBLIC CLASSES AND METHODS: sDB2NavFragment cDB2NavTree This class distills the database description of a protocol entity into a simple tree structure more suited to efficient navigation for parsing/packing Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Struct sDB2NavFragment // Protocol entity navigation fragment /*=========================================================================*/ struct sDB2NavFragment { public: // Constructor sDB2NavFragment(); /* Associated DB fragment (never empty) */ const sDB2Fragment * mpFragment; /* Associated DB field (may be empty) */ const sDB2Field * mpField; /* Next fragment in this structure */ const sDB2NavFragment * mpNextFragment; /* Fragment linked to this structure */ const sDB2NavFragment * mpLinkFragment; }; /*=========================================================================*/ // Class cDB2NavTree // Class to describe a protocol entity suited to efficient navigation /*=========================================================================*/ class cDB2NavTree { public: // Constructor cDB2NavTree( const cCoreDatabase & db ); // Destructor virtual ~cDB2NavTree(); // Build nav tree for the protocol entity described by the given key bool BuildTree( const std::vector & key ); // (Inline) Return protocol entity const sDB2ProtocolEntity & GetEntity() const { return mEntity; }; // (Inline) Return fragments const std::list & GetFragments() const { return mFragments; }; // Return a map of all tracked fields std::map > GetTrackedFields() const { return mTrackedFields; }; protected: // Process a structure described by the given initial fragment bool ProcessStruct( const sDB2Fragment * pFrag, sDB2NavFragment * pOwner ); /* Protocol entity being navigated */ sDB2ProtocolEntity mEntity; /* Database reference */ const cCoreDatabase & mDB; /* List of all allocated fragments */ std::list mFragments; /* Map of all 'tracked' fields */ std::map > mTrackedFields; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DB2TextFile.cpp000077500000000000000000000152021455567757300227770ustar00rootroot00000000000000/*=========================================================================== FILE: DB2TextFile.h DESCRIPTION: Implementation of cDB2TextFile class PUBLIC CLASSES AND METHODS: cDB2TextFile The cDB2TextFile class provides the simple ability to read in an ANSI/UNICODE file and copy it to a dynamically allocated buffer The sole difference between this and CStdioFile is that the issues stemming from supporting both ANSI and UNICODE files are handled in a simpler fashion at the expense of a bit of performance Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "DB2TextFile.h" //----------------------------------------------------------------------------- // Definitions //----------------------------------------------------------------------------- // Maximum size of a file this interface will try to open (8 MB) const DWORD MAX_FILE_SZ = 1024 * 1024 * 8; // Maximum number of characters to run UNICODE check over const INT MAX_UNICODE_CHECK_LEN = 128; /*=========================================================================*/ // cDB2TextFile Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDB2TextFile (Public Method) DESCRIPTION: Construct object/load file into memory PARAMETERS pFileName [ I ] - File name RETURN VALUE: None ===========================================================================*/ cDB2TextFile::cDB2TextFile( LPCSTR pFileName ) : mText( "" ), mStatus( ERROR_FILE_NOT_FOUND ), mCurrentPos( 0 ) { if (pFileName == 0 || pFileName[0] == 0) { return; } // Open the file std::ifstream tempFStream; tempFStream.open( pFileName, std::ios::in | std::ios::binary ); if (tempFStream.fail() == true) { mStatus = ERROR_FILE_NOT_FOUND; return; } // Get size LONG nFileSize = tempFStream.rdbuf()->in_avail(); if (nFileSize == -1 || nFileSize > MAX_FILE_SZ) { tempFStream.close(); mStatus = ERROR_GEN_FAILURE; return; } // Read file into pTempBuffer CHAR * pTempBuffer = new char[ nFileSize ]; if (pTempBuffer == NULL) { tempFStream.close(); mStatus = ERROR_GEN_FAILURE; return; } tempFStream.read( pTempBuffer, nFileSize ); if (tempFStream.fail() == true) { tempFStream.close(); delete [] pTempBuffer; mStatus = ERROR_GEN_FAILURE; return; } tempFStream.close(); // Convert to string mText = std::string( pTempBuffer, nFileSize ); delete [] pTempBuffer; // Final check if (mText.size() != nFileSize) { mStatus = ERROR_GEN_FAILURE; return; } // Success! mStatus = NO_ERROR; } /*=========================================================================== METHOD: cDB2TextFile (Public Method) DESCRIPTION: Construct object/copy from buffer into memory PARAMETERS pBuffer [ I ] - Buffer to copy from bufferLen [ I ] - Size of above buffer RETURN VALUE: None ===========================================================================*/ cDB2TextFile::cDB2TextFile( LPCSTR pBuffer, ULONG bufferLen ) : mText( "" ), mStatus( ERROR_FILE_NOT_FOUND ), mCurrentPos( 0 ) { // Convert to string mText = std::string( pBuffer, bufferLen ); // Final check if (mText.size() != bufferLen) { mStatus = ERROR_GEN_FAILURE; return; } // Success! mStatus = NO_ERROR; } /*=========================================================================== METHOD: ~cDB2TextFile (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDB2TextFile::~cDB2TextFile() { // Nothing to do } /*=========================================================================== METHOD: ReadLine (Public Method) DESCRIPTION: Read the next available line PARAMETERS line [ O ] - Line (minus CR/LF) RETURN VALUE: None ===========================================================================*/ bool cDB2TextFile::ReadLine( std::string & line ) { if (IsValid() == false) { return false; } int len = mText.size(); if (mCurrentPos >= len) { return false; } int newIdx = mText.find( '\n', mCurrentPos ); if (newIdx == -1) { // Possibly the end of the file newIdx = len; } if (newIdx < mCurrentPos) { return false; } if (newIdx == mCurrentPos) { // Return an empty line mCurrentPos++; line = ""; } else { // Grab line line = mText.substr( mCurrentPos, (newIdx - mCurrentPos) ); // Check for CR int nCR = line.find( '\r' ); if (nCR != -1) { line.erase( nCR, 1 ); } mCurrentPos = newIdx + 1; } return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DB2TextFile.h000077500000000000000000000073321455567757300224510ustar00rootroot00000000000000/*=========================================================================== FILE: DB2TextFile.h DESCRIPTION: Declaration of cDB2TextFile class PUBLIC CLASSES AND METHODS: cDB2TextFile The cDB2TextFile class provides the simple ability to read in an ANSI/UNICODE file and copy it to a dynamically allocated buffer The sole difference between this and CStdioFile is that the issues stemming from supporting both ANSI and UNICODE files are handled in a simpler fashion at the expense of a bit of performance Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ #include "StdAfx.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cDB2TextFile /*=========================================================================*/ class cDB2TextFile { public: // Constructor (loads file) cDB2TextFile( LPCSTR pMemFile ); // Constructor (loads file from resource table) cDB2TextFile( HMODULE hModule, LPCSTR pRscTable, DWORD rscID ); // Constructor (loads file from buffer) cDB2TextFile( LPCSTR pBuffer, ULONG bufferLen ); // Destructor ~cDB2TextFile(); // (Inline) Get error status DWORD GetStatus() { return mStatus; }; // (Inline) Get the file contents bool GetText( std::string & copy ) { bool bOK = IsValid(); if (bOK == true) { copy = mText; } return bOK; }; // (Inline) Get file validity virtual bool IsValid() { return (mStatus == NO_ERROR); }; // Read the next available line bool ReadLine( std::string & line ); protected: /* File contents */ std::string mText; /* Current position (in above contents) */ int mCurrentPos; /* Error status */ DWORD mStatus; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DB2Utilities.cpp000077500000000000000000000555511455567757300232410ustar00rootroot00000000000000/*=========================================================================== FILE: DB2Utilities.cpp DESCRIPTION: Utility functions for packing/parsing protocol entities using the database PUBLIC ENUMERATIONS AND METHODS: sProtocolEntityKey sDB2PackingInput sDB2NavInput MapQMIEntityTypeToProtocolType MapQMIEntityTypeToQMIServiceType MapQMIProtocolTypeToEntityType DB2GetMaxBufferSize DB2BuildQMIBuffer DB2PackQMIBuffer DB2ReduceQMIBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DB2Utilities.h" #include "QMIBuffers.h" #include "DataPacker.h" #include "ProtocolEntityFieldEnumerator.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Free Methods //--------------------------------------------------------------------------- /*=========================================================================== METHOD: MapQMIEntityTypeToQMIServiceType (Public Free Method) DESCRIPTION: Map a DB protocol entity type (for QMI) to a QMI service type PARAMETERS: et [ I ] - Protocol entity type RETURN VALUE: eQMIService ===========================================================================*/ eQMIService MapQMIEntityTypeToQMIServiceType( eDB2EntityType et ) { eQMIService st = eQMI_SVC_ENUM_BEGIN; switch (et) { case eDB2_ET_QMI_CTL_REQ: case eDB2_ET_QMI_CTL_RSP: case eDB2_ET_QMI_CTL_IND: st = eQMI_SVC_CONTROL; break; case eDB2_ET_QMI_WDS_REQ: case eDB2_ET_QMI_WDS_RSP: case eDB2_ET_QMI_WDS_IND: st = eQMI_SVC_WDS; break; case eDB2_ET_QMI_DMS_REQ: case eDB2_ET_QMI_DMS_RSP: case eDB2_ET_QMI_DMS_IND: st = eQMI_SVC_DMS; break; case eDB2_ET_QMI_NAS_REQ: case eDB2_ET_QMI_NAS_RSP: case eDB2_ET_QMI_NAS_IND: st = eQMI_SVC_NAS; break; case eDB2_ET_QMI_QOS_REQ: case eDB2_ET_QMI_QOS_RSP: case eDB2_ET_QMI_QOS_IND: st = eQMI_SVC_QOS; break; case eDB2_ET_QMI_WMS_REQ: case eDB2_ET_QMI_WMS_RSP: case eDB2_ET_QMI_WMS_IND: st = eQMI_SVC_WMS; break; case eDB2_ET_QMI_PDS_REQ: case eDB2_ET_QMI_PDS_RSP: case eDB2_ET_QMI_PDS_IND: st = eQMI_SVC_PDS; break; case eDB2_ET_QMI_AUTH_REQ: case eDB2_ET_QMI_AUTH_RSP: case eDB2_ET_QMI_AUTH_IND: st = eQMI_SVC_AUTH; break; case eDB2_ET_QMI_VOICE_REQ: case eDB2_ET_QMI_VOICE_RSP: case eDB2_ET_QMI_VOICE_IND: st = eQMI_SVC_VOICE; break; case eDB2_ET_QMI_CAT_REQ: case eDB2_ET_QMI_CAT_RSP: case eDB2_ET_QMI_CAT_IND: st = eQMI_SVC_CAT; break; case eDB2_ET_QMI_RMS_REQ: case eDB2_ET_QMI_RMS_RSP: case eDB2_ET_QMI_RMS_IND: st = eQMI_SVC_RMS; break; case eDB2_ET_QMI_OMA_REQ: case eDB2_ET_QMI_OMA_RSP: case eDB2_ET_QMI_OMA_IND: st = eQMI_SVC_OMA; break; } return st; } /*=========================================================================== METHOD: MapQMIEntityTypeToProtocolType (Public Free Method) DESCRIPTION: Map a DB protocol entity type (for QMI) to a buffer protocol type PARAMETERS: et [ I ] - Protocol entity type RETURN VALUE: eProtocolType ===========================================================================*/ eProtocolType MapQMIEntityTypeToProtocolType( eDB2EntityType et ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; switch (et) { case eDB2_ET_QMI_WDS_REQ: pt = ePROTOCOL_QMI_WDS_TX; break; case eDB2_ET_QMI_WDS_RSP: case eDB2_ET_QMI_WDS_IND: pt = ePROTOCOL_QMI_WDS_RX; break; case eDB2_ET_QMI_DMS_REQ: pt = ePROTOCOL_QMI_DMS_TX; break; case eDB2_ET_QMI_DMS_RSP: case eDB2_ET_QMI_DMS_IND: pt = ePROTOCOL_QMI_DMS_RX; break; case eDB2_ET_QMI_NAS_REQ: pt = ePROTOCOL_QMI_NAS_TX; break; case eDB2_ET_QMI_NAS_RSP: case eDB2_ET_QMI_NAS_IND: pt = ePROTOCOL_QMI_NAS_RX; break; case eDB2_ET_QMI_QOS_REQ: pt = ePROTOCOL_QMI_QOS_TX; break; case eDB2_ET_QMI_QOS_RSP: case eDB2_ET_QMI_QOS_IND: pt = ePROTOCOL_QMI_QOS_RX; break; case eDB2_ET_QMI_WMS_REQ: pt = ePROTOCOL_QMI_WMS_TX; break; case eDB2_ET_QMI_WMS_RSP: case eDB2_ET_QMI_WMS_IND: pt = ePROTOCOL_QMI_WMS_RX; break; case eDB2_ET_QMI_PDS_REQ: pt = ePROTOCOL_QMI_PDS_TX; break; case eDB2_ET_QMI_PDS_RSP: case eDB2_ET_QMI_PDS_IND: pt = ePROTOCOL_QMI_PDS_RX; break; case eDB2_ET_QMI_AUTH_REQ: pt = ePROTOCOL_QMI_AUTH_TX; break; case eDB2_ET_QMI_AUTH_RSP: case eDB2_ET_QMI_AUTH_IND: pt = ePROTOCOL_QMI_AUTH_RX; break; case eDB2_ET_QMI_VOICE_REQ: pt = ePROTOCOL_QMI_VOICE_TX; break; case eDB2_ET_QMI_VOICE_RSP: case eDB2_ET_QMI_VOICE_IND: pt = ePROTOCOL_QMI_VOICE_RX; break; case eDB2_ET_QMI_CAT_REQ: pt = ePROTOCOL_QMI_CAT_TX; break; case eDB2_ET_QMI_CAT_RSP: case eDB2_ET_QMI_CAT_IND: pt = ePROTOCOL_QMI_CAT_RX; break; case eDB2_ET_QMI_RMS_REQ: pt = ePROTOCOL_QMI_RMS_TX; break; case eDB2_ET_QMI_RMS_RSP: case eDB2_ET_QMI_RMS_IND: pt = ePROTOCOL_QMI_RMS_RX; break; case eDB2_ET_QMI_OMA_REQ: pt = ePROTOCOL_QMI_OMA_TX; break; case eDB2_ET_QMI_OMA_RSP: case eDB2_ET_QMI_OMA_IND: pt = ePROTOCOL_QMI_OMA_RX; break; case eDB2_ET_QMI_CTL_REQ: pt = ePROTOCOL_QMI_CTL_TX; break; case eDB2_ET_QMI_CTL_RSP: case eDB2_ET_QMI_CTL_IND: pt = ePROTOCOL_QMI_CTL_RX; break; } return pt; } /*=========================================================================== METHOD: MapQMIProtocolTypeToEntityType (Public Free Method) DESCRIPTION: Map a buffer protocol type to a DB protocol entity type PARAMETERS: pt [ I ] - Protocol type bIndication [ I ] - Is this for an indication? RETURN VALUE: eDB2EntityType ===========================================================================*/ eDB2EntityType MapQMIProtocolTypeToEntityType( eProtocolType pt, bool bIndication ) { eDB2EntityType et = eDB2_ET_ENUM_BEGIN; switch (pt) { case ePROTOCOL_QMI_WDS_RX: if (bIndication == true) { et = eDB2_ET_QMI_WDS_IND; } else { et = eDB2_ET_QMI_WDS_RSP; } break; case ePROTOCOL_QMI_WDS_TX: et = eDB2_ET_QMI_WDS_REQ; break; case ePROTOCOL_QMI_DMS_RX: if (bIndication == true) { et = eDB2_ET_QMI_DMS_IND; } else { et = eDB2_ET_QMI_DMS_RSP; } break; case ePROTOCOL_QMI_DMS_TX: et = eDB2_ET_QMI_DMS_REQ; break; case ePROTOCOL_QMI_NAS_RX: if (bIndication == true) { et = eDB2_ET_QMI_NAS_IND; } else { et = eDB2_ET_QMI_NAS_RSP; } break; case ePROTOCOL_QMI_NAS_TX: et = eDB2_ET_QMI_NAS_REQ; break; case ePROTOCOL_QMI_QOS_RX: if (bIndication == true) { et = eDB2_ET_QMI_QOS_IND; } else { et = eDB2_ET_QMI_QOS_RSP; } break; case ePROTOCOL_QMI_QOS_TX: et = eDB2_ET_QMI_QOS_REQ; break; case ePROTOCOL_QMI_WMS_RX: if (bIndication == true) { et = eDB2_ET_QMI_WMS_IND; } else { et = eDB2_ET_QMI_WMS_RSP; } break; case ePROTOCOL_QMI_WMS_TX: et = eDB2_ET_QMI_WMS_REQ; break; case ePROTOCOL_QMI_PDS_RX: if (bIndication == true) { et = eDB2_ET_QMI_PDS_IND; } else { et = eDB2_ET_QMI_PDS_RSP; } break; case ePROTOCOL_QMI_PDS_TX: et = eDB2_ET_QMI_PDS_REQ; break; case ePROTOCOL_QMI_AUTH_RX: if (bIndication == true) { et = eDB2_ET_QMI_AUTH_IND; } else { et = eDB2_ET_QMI_AUTH_RSP; } break; case ePROTOCOL_QMI_AUTH_TX: et = eDB2_ET_QMI_AUTH_REQ; break; case ePROTOCOL_QMI_VOICE_RX: if (bIndication == true) { et = eDB2_ET_QMI_VOICE_IND; } else { et = eDB2_ET_QMI_VOICE_RSP; } break; case ePROTOCOL_QMI_VOICE_TX: et = eDB2_ET_QMI_VOICE_REQ; break; case ePROTOCOL_QMI_CAT_RX: if (bIndication == true) { et = eDB2_ET_QMI_CAT_IND; } else { et = eDB2_ET_QMI_CAT_RSP; } break; case ePROTOCOL_QMI_CAT_TX: et = eDB2_ET_QMI_CAT_REQ; break; case ePROTOCOL_QMI_RMS_RX: if (bIndication == true) { et = eDB2_ET_QMI_RMS_IND; } else { et = eDB2_ET_QMI_RMS_RSP; } break; case ePROTOCOL_QMI_RMS_TX: et = eDB2_ET_QMI_RMS_REQ; break; case ePROTOCOL_QMI_OMA_RX: if (bIndication == true) { et = eDB2_ET_QMI_OMA_IND; } else { et = eDB2_ET_QMI_OMA_RSP; } break; case ePROTOCOL_QMI_OMA_TX: et = eDB2_ET_QMI_OMA_REQ; break; case ePROTOCOL_QMI_CTL_RX: if (bIndication == true) { et = eDB2_ET_QMI_CTL_IND; } else { et = eDB2_ET_QMI_CTL_RSP; } break; case ePROTOCOL_QMI_CTL_TX: et = eDB2_ET_QMI_CTL_REQ; break; } return et; } /*=========================================================================== METHOD: DB2GetMaxBufferSize (Public Free Method) DESCRIPTION: Return the maximum size of a payload buffer for given type of protocol entity PARAMETERS: et [ I ] - Protocol entity type RETURN VALUE: ULONG - Maximum ===========================================================================*/ ULONG DB2GetMaxBufferSize( eDB2EntityType et ) { ULONG maxSzInBytes = MAX_SHARED_BUFFER_SIZE; if (IsQMIEntityType( et ) == true) { // QMI items are further constrained in size maxSzInBytes = QMI_MAX_BUFFER_SIZE; } return maxSzInBytes; } /*=========================================================================== METHOD: DB2BuildQMIBuffer (Internal Method) DESCRIPTION: Build and return an allocated shared buffer for the QMI protocol using the specified DB keys and payloads (one per TLV content) PARAMETERS: input [ I ] - Protocol entity key and payload RETURN VALUE: sSharedBuffer * (0 upon failure) ===========================================================================*/ sSharedBuffer * DB2BuildQMIBuffer( const std::vector & input ) { // Assume failure sSharedBuffer * pRef = 0; const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szTLVHdr = (ULONG)sizeof(sQMIRawContentHeader); // Need something to build (but not too much) ULONG tlvs = (ULONG)input.size(); if (tlvs == 0 || tlvs > (ULONG)UCHAR_MAX) { return pRef; } // The protocol entity keys need to be consistent const sDB2NavInput & tlvInput = input[0]; if (tlvInput.IsValid() == false || tlvInput.mKey.size() < 3) { return pRef; } eDB2EntityType et = (eDB2EntityType)tlvInput.mKey[0]; if (IsQMIEntityType( et ) == false) { return pRef; } ULONG t = 0; for (t = 0; t < tlvs; t++) { const sDB2NavInput & tlvInput = input[t]; if (tlvInput.mPayloadLen > QMI_MAX_BUFFER_SIZE) { return pRef; } } ULONG szReq = szTransHdr + szMsgHdr + (tlvs * szTLVHdr); szReq += tlvInput.mPayloadLen; for (t = 1; t < tlvs; t++) { const sDB2NavInput & tlv2Input = input[t]; if (tlv2Input.IsValid() == false || tlv2Input.mKey.size() < 3) { return pRef; } if ( (tlvInput.mKey[0] != tlv2Input.mKey[0]) || (tlvInput.mKey[1] != tlv2Input.mKey[1]) ) { return pRef; } szReq += tlv2Input.mPayloadLen; } // What we are building cannot be too large if (szReq > QMI_MAX_BUFFER_SIZE) { return pRef; } BYTE buf[QMI_MAX_BUFFER_SIZE]; sQMIRawContentHeader * pTLV = 0; pTLV = (sQMIRawContentHeader *)&buf[0]; for (t = 0; t < tlvs; t++) { const sDB2NavInput & tlv2Input = input[t]; pTLV->mTypeID = (BYTE)tlv2Input.mKey[2]; pTLV->mLength = (WORD)tlv2Input.mPayloadLen; pTLV++; const BYTE * pPayload = (const BYTE *)pTLV; memcpy( (LPVOID)pPayload, (LPCVOID)tlv2Input.mpPayload, (SIZE_T)tlv2Input.mPayloadLen ); pPayload += tlv2Input.mPayloadLen; pTLV = (sQMIRawContentHeader *)pPayload; } ULONG contentLen = szReq - szTransHdr - szMsgHdr; eQMIService st = MapQMIEntityTypeToQMIServiceType( et ); pRef = sQMIServiceBuffer::BuildBuffer( st, (WORD)tlvInput.mKey[1], IsQMIEntityResponseType( et ), IsQMIEntityIndicationType( et ), &buf[0], contentLen ); return pRef; } /*=========================================================================== METHOD: DB2PackQMIBuffer (Internal Method) DESCRIPTION: Build an allocated shared buffer for the QMI protocol PARAMETERS: db [ I ] - Database to use for packing input [ I ] - Protocol entity key and field values RETURN VALUE: sSharedBuffer * (0 upon failure) ===========================================================================*/ sSharedBuffer * DB2PackQMIBuffer( const cCoreDatabase & db, const std::vector & input ) { // Assume failure sSharedBuffer * pRef = 0; // Need something to build (but not too much) ULONG tlvs = (ULONG)input.size(); if (tlvs == 0 || tlvs > (ULONG)UCHAR_MAX) { return pRef; } // The protocol entity keys need to be consistent const sDB2PackingInput & tlvInput = input[0]; if (tlvInput.IsValid() == false || tlvInput.mKey.size() < 3) { return pRef; } eDB2EntityType et = (eDB2EntityType)tlvInput.mKey[0]; if (IsQMIEntityType( et ) == false) { return pRef; } ULONG t = 0; for (t = 0; t < tlvs; t++) { const sDB2PackingInput & tlvInput = input[t]; if (tlvInput.mDataLen > QMI_MAX_BUFFER_SIZE) { return pRef; } } for (t = 1; t < tlvs; t++) { const sDB2PackingInput & tlv2Input = input[t]; if (tlv2Input.IsValid() == false || tlv2Input.mKey.size() < 3) { return pRef; } if ( (tlvInput.mKey[0] != tlv2Input.mKey[0]) || (tlvInput.mKey[1] != tlv2Input.mKey[1]) ) { return pRef; } } BYTE buf[QMI_MAX_BUFFER_SIZE]; ULONG bufLen = 0; sQMIRawContentHeader * pTLV = 0; pTLV = (sQMIRawContentHeader *)&buf[0]; bool bOK = true; for (t = 0; t < tlvs; t++) { ULONG packedLen = 0; const BYTE * pPackedData = 0; const sDB2PackingInput & tlv2Input = input[t]; if (tlv2Input.mbString == true) { if (tlv2Input.mValues.empty() == false) { // Convert field string to input fields std::list fields = cDataPacker::LoadValues( tlv2Input.mValues ); // Now pack cDataPacker dp( db, tlv2Input.mKey, fields ); bOK = dp.Pack(); if (bOK == false) { break; } pPackedData = dp.GetBuffer( packedLen ); if (pPackedData == 0) { bOK = false; break; } } } else { packedLen = tlv2Input.mDataLen; pPackedData = tlv2Input.mpData; } // Check if we need to adjust buffer cProtocolEntityFieldEnumerator pefe( db, tlv2Input.mKey ); bool bEnum = pefe.Enumerate(); if (bEnum == true) { const std::vector & fieldIDs = pefe.GetFields(); ULONG fieldCount = (ULONG)fieldIDs.size(); if (fieldCount == 1) { const tDB2FieldMap & dbFields = db.GetProtocolFields(); tDB2FieldMap::const_iterator pField = dbFields.find( fieldIDs[0] ); if (pField != dbFields.end()) { const sDB2Field & theField = pField->second; if ( (theField.mType == eDB2_FIELD_STD) && (theField.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_ANT) ) { // For QMI we need to strip out the trailing NULL // string terminator when the TLV consists solely // of a string since the length contained in the // TLV structure itself renders the trailing NULL // redundant if (packedLen > 2) { packedLen--; } else { // This is the only way to specify an empty string in QMI // when the TLV consists solely of a string if (packedLen == 1) { packedLen--; } } } } } } bufLen += (ULONG)sizeof(sQMIRawContentHeader); bufLen += packedLen; // What we are building cannot be too large if (bufLen > QMI_MAX_BUFFER_SIZE) { bOK = false; break; } pTLV->mTypeID = (BYTE)tlv2Input.mKey[2]; pTLV->mLength = (WORD)packedLen; pTLV++; const BYTE * pPayload = (const BYTE *)pTLV; memcpy( (LPVOID)pPayload, (LPCVOID)pPackedData, (SIZE_T)packedLen ); pPayload += packedLen; pTLV = (sQMIRawContentHeader *)pPayload; } if (bOK == false) { return pRef; } eQMIService st = MapQMIEntityTypeToQMIServiceType( et ); pRef = sQMIServiceBuffer::BuildBuffer( st, (WORD)tlvInput.mKey[1], IsQMIEntityResponseType( et ), IsQMIEntityIndicationType( et ), &buf[0], bufLen ); return pRef; } /*=========================================================================== METHOD: DB2ReduceQMIBuffer (Public Free Method) DESCRIPTION: Reduce a DIAG buffer to a DB key and payload PARAMETERS: buf [ I ] - Protocol buffer being reduced RETURN VALUE: sDB2NavInput (invalid upon failure) ===========================================================================*/ std::vector DB2ReduceQMIBuffer( const sProtocolBuffer & buf ) { std::vector retInput; // We must have a valid protocol buffer if (buf.IsValid() == false) { return retInput; } eProtocolType pt = (eProtocolType)buf.GetType(); if (IsQMIProtocol( pt ) != true) { return retInput; } sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); std::map tlvs = qmiBuf.GetContents(); bool bErr = false; std::map ::const_iterator pIter; for (pIter = tlvs.begin(); pIter != tlvs.end(); pIter++) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr == 0) { bErr = true; break; } bool bIndication = qmiBuf.IsIndication(); eProtocolType pt = (eProtocolType)qmiBuf.GetType(); eDB2EntityType et = MapQMIProtocolTypeToEntityType( pt, bIndication ); sDB2NavInput tmp; tmp.mKey.push_back( (ULONG)et ); tmp.mKey.push_back( qmiBuf.GetMessageID() ); tmp.mKey.push_back( (ULONG)pHdr->mTypeID ); tmp.mPayloadLen = pHdr->mLength; pHdr++; tmp.mpPayload = (const BYTE *)pHdr; if (tmp.IsValid() == true) { retInput.push_back( tmp ); } else { // Ignore empty TLVs if (tmp.mPayloadLen != 0) { bErr = true; break; } } } if (bErr == true) { retInput.clear(); } return retInput; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DB2Utilities.h000077500000000000000000000202731455567757300226770ustar00rootroot00000000000000/*=========================================================================== FILE: DB2Utilities.h DESCRIPTION: Utility functions for packing/parsing protocol entities using the database PUBLIC ENUMERATIONS AND METHODS: sProtocolEntityKey sDB2PackingInput sDB2NavInput MapQMIEntityTypeToProtocolType MapQMIEntityTypeToQMIServiceType MapQMIProtocolTypeToEntityType DB2GetMaxBufferSize DB2BuildQMIBuffer DB2PackQMIBuffer DB2ReduceQMIBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include "SharedBuffer.h" #include "ProtocolBuffer.h" #include "QMIEnum.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Struct sProtocolEntityKey // Simple structure to initializing protocol entity keys easier /*=========================================================================*/ struct sProtocolEntityKey { public: // (Inline) Constructor - default sProtocolEntityKey() { }; // (Inline) Constructor - single value keys sProtocolEntityKey( ULONG val1 ) { mKey.push_back( val1 ); }; // (Inline) Constructor - two value keys sProtocolEntityKey( ULONG val1, ULONG val2 ) { mKey.push_back( val1 ); mKey.push_back( val2 ); }; // (Inline) Constructor - three value keys sProtocolEntityKey( ULONG val1, ULONG val2, ULONG val3 ) { mKey.push_back( val1 ); mKey.push_back( val2 ); mKey.push_back( val3 ); }; // (Inline) Constructor - psuedo-copy constructor sProtocolEntityKey( const std::vector & key ) : mKey( key ) { }; // (Inline) Constructor - copy constructor sProtocolEntityKey( const sProtocolEntityKey & key ) : mKey( key.mKey ) { }; // (Inline) Assignment operator sProtocolEntityKey & operator = ( const sProtocolEntityKey & key ) { mKey = key.mKey; return *this; }; // Cast operator to a protocol entity key operator std::vector () const { return mKey; }; /* Underlying key */ std::vector mKey; }; /*=========================================================================*/ // Struct sDB2PackingInput // Simple structure to make dealing packing easier /*=========================================================================*/ struct sDB2PackingInput { public: // (Inline) Constructor - default sDB2PackingInput() : mpData( 0 ), mDataLen( 0 ), mbString( true ) { }; // (Inline) Constructor - parameterized (string payload) sDB2PackingInput( const sProtocolEntityKey & key, LPCSTR pValue ) : mKey( key ), mpData( 0 ), mDataLen( 0 ), mbString( true ) { if (pValue != 0 && pValue[0] != 0) { mValues = pValue; } }; // (Inline) Constructor - parameterized (buffer payload) sDB2PackingInput( const sProtocolEntityKey & key, const BYTE * pData, ULONG dataLen ) : mKey( key ), mpData( pData ), mDataLen( dataLen ), mbString( false ) { // Nothing to do }; // (Inline) Is this object in a valid state? bool IsValid() const { // We need a key if (mKey.size() <= 0) { return false; } return true; }; /* Underlying key */ std::vector mKey; /* Are the values specified by a string? */ bool mbString; /* String of space delimited field values */ std::string mValues; /* Buffer containing pre-formatted fields */ const BYTE * mpData; /* Length of above buffer */ ULONG mDataLen; }; /*=========================================================================*/ // Struct sDB2NavInput // Simple structure to make dealing with key/payload easier /*=========================================================================*/ struct sDB2NavInput { public: // (Inline) Constructor - default sDB2NavInput() : mpPayload( 0 ), mPayloadLen( 0 ) { }; // (Inline) Constructor - parameterized sDB2NavInput( const std::vector & key, const BYTE * pData, ULONG dataLen ) : mKey( key ), mpPayload( pData ), mPayloadLen( dataLen ) { }; // (Inline) Is this object in a valid state? bool IsValid() const { return (mKey.size() > 0 && mpPayload != 0 && mPayloadLen > 0); }; /* Database key for payload entity */ std::vector mKey; /* Payload */ const BYTE * mpPayload; /* Size of above payload */ ULONG mPayloadLen; }; // Map a DB protocol entity type to a buffer protocol type eProtocolType MapQMIEntityTypeToProtocolType( eDB2EntityType et ); // Map a DB protocol entity type to a QMI service type eQMIService MapQMIEntityTypeToQMIServiceType( eDB2EntityType et ); // Map a buffer protocol type to a DB protocol entity type eDB2EntityType MapQMIProtocolTypeToEntityType( eProtocolType pt, bool bIndication = false ); // Return the maximum size of a payload buffer for given type of // protocol entity ULONG DB2GetMaxBufferSize( eDB2EntityType et ); // Build an allocated shared buffer for the QMI protocol sSharedBuffer * DB2BuildQMIBuffer( const std::vector & input ); // Build an allocated shared buffer for the QMI protocol sSharedBuffer * DB2PackQMIBuffer( const cCoreDatabase & db, const std::vector & input ); // Reduce a QMI buffer to DB keys and payload std::vector DB2ReduceQMIBuffer( const sProtocolBuffer & buf ); libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DataPacker.cpp000077500000000000000000000554651455567757300230010ustar00rootroot00000000000000/*=========================================================================== FILE: DataPacker.cpp DESCRIPTION: Implementation of sUnpackedField and cDataPacker PUBLIC CLASSES AND METHODS: sUnpackedField Structure to represent a single unpacked (input) field - i.e. the field value as a string and an optional field name (either fully qualified) or partial cDataPacker Class to pack bit/byte specified fields into a buffer accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DataPacker.h" #include "CoreDatabase.h" #include "DB2Utilities.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cDataPacker Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDataPacker (Public Method) DESCRIPTION: Constructor PARAMETERS: db [ I ] - Database to use key [ I ] - Key into protocol entity table fields [ I ] - Fields to pack into buffer RETURN VALUE: None ===========================================================================*/ cDataPacker::cDataPacker( const cCoreDatabase & db, const std::vector & key, const std::list & fields ) : cProtocolEntityNav( db ), mKey( key ), mbValuesOnly( true ), mProcessedFields( 0 ), mbPacked( false ) { // Initialize internal buffer memset( &mBuffer[0], 0, (SIZE_T)MAX_SHARED_BUFFER_SIZE ); // Compute bits left in buffer ULONG bits = MAX_SHARED_BUFFER_SIZE * BITS_PER_BYTE; if (mKey.size() > 0) { eDB2EntityType et = (eDB2EntityType)mKey[0]; bits = DB2GetMaxBufferSize( et ) * BITS_PER_BYTE; } // Setup the bit packer mBitsy.SetData( mBuffer, bits ); // Copy fields/set value only flag std::list ::const_iterator pIter = fields.begin(); while (pIter != fields.end()) { if (pIter->mName.size() > 0) { mbValuesOnly = false; } mFields.push_back( *pIter ); pIter++; } } /*=========================================================================== METHOD: ~cDataPacker (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDataPacker::~cDataPacker() { // Ask bit packer to release data mBitsy.ReleaseData(); } /*=========================================================================== METHOD: Pack (Public Method) DESCRIPTION: Pack the buffer RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::Pack() { // Process (pack) the protocol entity if (mbPacked == false) { mbPacked = ProcessEntity( mKey ); if (mbPacked == false) { // Failed due to no structure ID? if (mEntity.IsValid() == true && mEntity.mStructID == -1) { // Yes, for us that means instant success (no payload to pack) mbPacked = true; } } } return mbPacked; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Get packed buffer contents PARAMETERS: bufferLen [ O ] - Length of packed buffer (in bytes) RETURN VALUE: const BYTE * - Packed buffer (0 upon error) ===========================================================================*/ const BYTE * cDataPacker::GetBuffer( ULONG & bufferLen ) { if (mbPacked == false) { bufferLen = 0; return 0; } // Payload size in bytes bufferLen = mBitsy.GetTotalBitsWritten() + BITS_PER_BYTE - 1; bufferLen /= BITS_PER_BYTE; // Payload is our buffer const BYTE * pBuffer = 0; if (bufferLen > 0) { pBuffer = (const BYTE *)&mBuffer[0]; } return pBuffer; } /*=========================================================================== METHOD: LoadValues (Static Public Method) DESCRIPTION: Load values by parsing a 'summary' string of values, an example of which would be: 0 1 100 "Foo Foo Foo" 15 -1 PARAMETERS: vals [ I ] - Value string RETURN VALUE: std::list ===========================================================================*/ std::list cDataPacker::LoadValues( const std::string & vals ) { std::list retList; if (vals.size() <= 0) { return retList; } std::vector tokens; ParseCommandLine( vals, tokens ); std::string name = ""; std::string val = ""; std::vector ::const_iterator pIter = tokens.begin(); while (pIter != tokens.end()) { val = *pIter++; sUnpackedField entry( name, val ); retList.push_back( entry ); } return retList; } /*=========================================================================== METHOD: LoadValues (Static Public Method) DESCRIPTION: Load values by parsing a vector of string values, an example of which would be: [0] 0 [1] 1 [2] 100 [3] "Foo Foo Foo" [4] 15 [5] -1 PARAMETERS: vals [ I ] - Vector of values startIndex [ I ] - Where in above vector values start RETURN VALUE: std::list ===========================================================================*/ std::list cDataPacker::LoadValues( std::vector & vals, ULONG startIndex ) { std::list retList; ULONG sz = (ULONG)vals.size(); if (startIndex >= sz) { return retList; } std::string name = ""; std::string val = ""; for (ULONG v = startIndex; v < sz; v++) { val = vals[v]; sUnpackedField entry( name, val ); retList.push_back( entry ); } return retList; } /*=========================================================================== METHOD: GetLastValue (Internal Method) DESCRIPTION: Working from the back of the current value list find and return the value for the specified field ID as a LONGLONG (field type must have been able to fit in a LONGLONG for a value to be stored in value list and thus returned) PARAMETERS: fieldID [ I ] - Field ID we are looking for val [ O ] - The value RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::GetLastValue( ULONG fieldID, LONGLONG & val ) { // Assume failure bool bRC = false; std::list < std::pair >::reverse_iterator pValues; pValues = mValues.rbegin(); while (pValues != mValues.rend()) { std::pair & entry = *pValues; if (entry.first == fieldID) { val = entry.second; // Success! bRC = true; break; } pValues++; } return bRC; } /*=========================================================================== METHOD: GetValueString (Internal Method) DESCRIPTION: For the given field return the (input) value string PARAMETERS: field [ I ] - The field being processed fieldName [ I ] - Partial (or fully qualified) field name pValueString [ O ] - Value string RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::GetValueString( const sDB2Field & field, const std::string & fieldName, LPCSTR & pValueString ) { // Assume failure pValueString = 0; // Create fully qualified field name std::string fullName = GetFullFieldName( fieldName ); std::vector ::const_iterator pVals = mFields.begin(); while (pVals != mFields.end()) { const std::string & inName = pVals->mName; if (fieldName == inName || fullName == inName) { pValueString = (LPCSTR)pVals->mValueString.c_str(); break; } pVals++; } // Value provided? if (pValueString == 0) { // No, are we in value only mode? if (mbValuesOnly == true) { if (mProcessedFields < (ULONG)mFields.size()) { sUnpackedField & upf = mFields[mProcessedFields++]; // Set field name (partial) upf.mName = fieldName; // Grab field value pValueString = (LPCSTR)upf.mValueString.c_str(); } } else { return false; } } // Value provided? if (pValueString == 0) { return false; } // Meaningful value provided? if (pValueString[0] == 0) { // No value provided for field? Is it a string? if (field.mType == eDB2_FIELD_STD) { if ( (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_A) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_U) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_U8) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_ANT) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_UNT) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_U8NT) ) { // No, unable to proceed return false; } } } return true; } /*=========================================================================== METHOD: PackString (Internal Method) DESCRIPTION: Pack the string (described by the given arguments) into the buffer PARAMETERS: numChars [ I ] - Number of characters to pack (0 = NULL terminated) pStr [ I ] - String to pack RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::PackString( ULONG numChars, LPCSTR pStr ) { // Sanity check string pointer if (pStr == 0) { return false; } // Assume success bool bOK = true; // Convert native string type to desired output type const BYTE * pTmp = (const BYTE *)pStr; // Have we reached the practical end of a fixed length string? ULONG numBytes = 0; numBytes = (ULONG)strlen( (LPCSTR)pTmp ); if (numChars == 0) { // We pack the string plus the NULL character numChars = (ULONG)strlen( (LPCSTR)pTmp ) + 1; } // String size too long? if (numBytes > numChars) { return false; } // Pack the string one byte at a time for (ULONG c = 0; c < numChars; c++) { BYTE val = 0; if (c < numBytes) { val = pTmp[c]; } DWORD rc = mBitsy.Set( BITS_PER_BYTE, val ); if (rc != NO_ERROR) { bOK = false; break; } } return bOK; } /*=========================================================================== METHOD: ProcessField (Internal Method) DESCRIPTION: Process the given field (described by the given arguments) by packing the value into the buffer PARAMETERS: pField [ I ] - The field being processed fieldName [ I ] - Field name (partial) arrayIndex [ I ] - Not used RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG /* arrayIndex */ ) { // Assume failure bool bOK = false; if (pField == 0) { return bOK; } // Find given value for field LPCSTR pVal = 0; bool bVal = GetValueString( *pField, fieldName, pVal ); if (bVal == false) { return bOK; } // Grab field ID ULONG id = pField->mID; // What type is this field? switch (pField->mType) { case eDB2_FIELD_STD: { // Standard field, what kind? eDB2StdFieldType ft = (eDB2StdFieldType)pField->mTypeVal; switch (ft) { // Field is a boolean (0/1, false/true)/8-bit unsigned integer case eDB2_FIELD_STDTYPE_BOOL: case eDB2_FIELD_STDTYPE_UINT8: { // We pack as a UCHAR UCHAR val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { if (ft == eDB2_FIELD_STDTYPE_BOOL && val > 1) { val = 1; } DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 8-bit signed integer case eDB2_FIELD_STDTYPE_INT8: { // We pack as a CHAR CHAR val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 16-bit signed integer case eDB2_FIELD_STDTYPE_INT16: { // We pack as a SHORT SHORT val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 16-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT16: { // We pack as a USHORT USHORT val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 32-bit signed integer case eDB2_FIELD_STDTYPE_INT32: { // We pack as a LONG LONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 32-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT32: { // We pack as a ULONG ULONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 64-bit signed integer case eDB2_FIELD_STDTYPE_INT64: { // We pack as a LONGLONG LONGLONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 64-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT64: { // We pack as a ULONGLONG ULONGLONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! if (val <= LLONG_MAX) { std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); } bOK = true; } } } break; // ANSI/UNICODE strings case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U: case eDB2_FIELD_STDTYPE_STRING_ANT: case eDB2_FIELD_STDTYPE_STRING_UNT: { // Set the character size ULONG charSz = sizeof(CHAR); if ( (ft == eDB2_FIELD_STDTYPE_STRING_U) || (ft == eDB2_FIELD_STDTYPE_STRING_UNT) ) { charSz = sizeof(USHORT); } // Compute the number of characters? ULONG numChars = 0; if ( (ft == eDB2_FIELD_STDTYPE_STRING_A) || (ft == eDB2_FIELD_STDTYPE_STRING_U) ) { numChars = (pField->mSize / BITS_PER_BYTE) / charSz; } // Pack the string bOK = PackString( numChars, pVal ); } break; // UTF-8 strings case eDB2_FIELD_STDTYPE_STRING_U8: case eDB2_FIELD_STDTYPE_STRING_U8NT: { // Unsupported in the Linux adaptation bOK = false; } break; // Field is 32-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT32: { // We pack as a ULONG FLOAT val = (float)atof( (LPCSTR)pVal ); ULONG * pTmp = (ULONG *)&val; DWORD rc = mBitsy.Set( pField->mSize, *pTmp ); if (rc == NO_ERROR) { // Success! bOK = true; } } break; // Field is 64-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT64: { // We pack as a ULONGLONG double val = atof( (LPCSTR)pVal ); ULONGLONG * pTmp = (ULONGLONG *)&val; DWORD rc = mBitsy.Set( pField->mSize, *pTmp ); if (rc == NO_ERROR) { // Success! bOK = true; } } break; default: { bOK = false; } break; } } break; case eDB2_FIELD_ENUM_UNSIGNED: { // We pack as a ULONG ULONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; case eDB2_FIELD_ENUM_SIGNED: { // We pack as a LONG LONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; default: { bOK = false; } break; } return bOK; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DataPacker.h000077500000000000000000000161731455567757300224370ustar00rootroot00000000000000/*=========================================================================== FILE: DataPacker.h DESCRIPTION: Declaration of sUnpackedField and cDataPacker PUBLIC CLASSES AND METHODS: sUnpackedField Structure to represent a single unpacked (input) field - i.e. the field value as a string and an optional field name (either fully qualified) or partial cDataPacker Class to pack bit/byte specified fields into a buffer accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include "CoreUtilities.h" #include "BitPacker.h" #include "SharedBuffer.h" #include "ProtocolEntityNav.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Struct sUnpackedField // // Structure to represent an unpacked (input) field /*=========================================================================*/ struct sUnpackedField { public: // (Inline) Constructor - default sUnpackedField() : mName( "" ), mValueString( "" ) { }; // (Inline) Constructor - parameterized sUnpackedField( const std::string & name, const std::string & valueStr ) : mName( name ), mValueString( valueStr ) { }; /* Field value as a string */ std::string mValueString; /* Name of field */ std::string mName; }; /*=========================================================================*/ // Class cDataPacker // Class to pack bit/byte specified fields into a buffer /*=========================================================================*/ class cDataPacker : public cProtocolEntityNav { public: // Constructor cDataPacker( const cCoreDatabase & db, const std::vector & key, const std::list & fields ); // Destructor virtual ~cDataPacker(); // Pack the buffer virtual bool Pack(); // Get packed buffer contents const BYTE * GetBuffer( ULONG & bufferLen ); // Return the results of packing as an allocated shared buffer sSharedBuffer * GetDiagBuffer( bool bNVRead ); // Load values by parsing a 'summary' string of values static std::list LoadValues( const std::string & vals ); // Load values by parsing a vector of string values static std::list LoadValues( std::vector & vals, ULONG startIndex ); protected: // Working from the back of the current value list find // and return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG fieldID, LONGLONG & val ); // For the given field return the (input) value string virtual bool GetValueString( const sDB2Field & field, const std::string & fieldName, LPCSTR & pValueString ); // Pack the string (described by the given arguments) into the buffer virtual bool PackString( ULONG numChars, LPCSTR pStr ); // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG arrayIndex = -1 ); // (Inline) Get current working offset virtual ULONG GetOffset() { return mBitsy.GetNumBitsWritten(); }; // (Inline) Set current working offset virtual bool SetOffset( ULONG offset ) { mBitsy.SetOffset( offset ); return true; }; // (Inline) Get current navigation order virtual bool GetLSBMode() { return mBitsy.GetLSBMode(); }; // (Inline) Set current navigation order virtual bool SetLSBMode( bool bLSB ) { // Assume success bool bOK = true; if (bLSB != GetLSBMode()) { if ((GetOffset() % BITS_PER_BYTE) != 0) { // We need to be on a byte boundary bOK = false; } else { mBitsy.SetLSBMode( bLSB ); } } return bOK; }; /* Entity key */ std::vector mKey; /* The underlying bit packer */ cBitPacker mBitsy; /* The vector of fields */ std::vector mFields; /* Are we operating in value only mode, i.e. no field names given? */ bool mbValuesOnly; ULONG mProcessedFields; /* Raw field values associated with field ID */ std::list < std::pair > mValues; /* Internal working buffer */ BYTE mBuffer[MAX_SHARED_BUFFER_SIZE]; /* Did we successfully pack the buffer? */ bool mbPacked; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DataParser.cpp000077500000000000000000000777211455567757300230270ustar00rootroot00000000000000/*=========================================================================== FILE: DataParser.cpp DESCRIPTION: Implementation of sParsedField and cDataParser PUBLIC CLASSES AND METHODS: sParsedField Structure to represent a single parsed field (field ID, offset, size, value, name, etc.) cDataParser Class to parse a buffer into bit/byte specified fields accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DataParser.h" #include "CoreDatabase.h" #include "DB2Utilities.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sParsedField Methods /*=========================================================================*/ /*=========================================================================== METHOD: sParsedField (Public Method) DESCRIPTION: Construct a parsed field by setting the values and extracting the data according to the definition PARAMETERS: db [ I ] - Database to use field [ I ] - Field description (from database) name [ I ] - Desired field name bp [I/O] - Bit parser to use bGenStrings [ I ] - Generate field value strings? NOTE: 'bGenStrings' does not apply to fields that are string types? RETURN VALUE: None ===========================================================================*/ sParsedField::sParsedField( const cCoreDatabase & db, const sDB2Field * pField, const std::string & name, cBitParser & bp, bool bGenStrings ) : mField(), mOffset( bp.GetNumBitsParsed() ), mValueString( "" ), mName( name ), mbValid( false ) { // Clear value memset( (PVOID)&mValue, 0, (SIZE_T)sizeof( mValue ) ); // Assume failure bool bOK = false; if (pField == 0) { return; } mField = *pField; char tempValueString[128]; memset( &tempValueString[0], 0, 128 ); // What type is this field? switch (mField.mType) { case eDB2_FIELD_STD: { // Standard field, what kind? eDB2StdFieldType ft = (eDB2StdFieldType)mField.mTypeVal; switch (ft) { // Field is a boolean (0/1, false/true)/8-bit unsigned integer case eDB2_FIELD_STDTYPE_BOOL: case eDB2_FIELD_STDTYPE_UINT8: { // We store as a UCHAR UCHAR val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Constrain boolean values? if (ft == eDB2_FIELD_STDTYPE_BOOL && val > 1) { val = 1; } // Success! mValue.mU8 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%02X", (UINT)mValue.mU8 ); } else { snprintf( &tempValueString[0], 0, "%u", (UINT)mValue.mU8 ); } mValueString = &tempValueString[0]; } } } break; // Field is 8-bit signed integer case eDB2_FIELD_STDTYPE_INT8: { // We store as a CHAR CHAR val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS8 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%02X", (UINT)mValue.mU8 ); } else { snprintf( &tempValueString[0], 0, "%d", (INT)mValue.mS8 ); } mValueString = &tempValueString[0]; } } } break; // Field is 16-bit signed integer case eDB2_FIELD_STDTYPE_INT16: { // We store as a SHORT SHORT val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS16 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%04hX", mValue.mU16 ); } else { snprintf( &tempValueString[0], 0, "%hd", mValue.mS16 ); } mValueString = &tempValueString[0]; } } } break; // Field is 16-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT16: { // We store as a USHORT USHORT val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU16 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%04hX", mValue.mU16 ); } else { snprintf( &tempValueString[0], 0, "%hu", mValue.mU16 ); } mValueString = &tempValueString[0]; } } } break; // Field is 32-bit signed integer case eDB2_FIELD_STDTYPE_INT32: { // We store as a LONG LONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS32 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%08lX", mValue.mU32 ); } else { snprintf( &tempValueString[0], 0, "%ld", mValue.mS32 ); } mValueString = &tempValueString[0]; } } } break; // Field is 32-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT32: { // We store as a ULONG ULONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU32 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%08lX", mValue.mU32 ); } else { snprintf( &tempValueString[0], 0, "%lu", mValue.mU32 ); } mValueString = &tempValueString[0]; } } } break; // Field is 64-bit signed integer case eDB2_FIELD_STDTYPE_INT64: { // We store as a LONGLONG LONGLONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS64 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%016llX", mValue.mU64 ); } else { snprintf( &tempValueString[0], 0, "%lld", mValue.mS64 ); } mValueString = &tempValueString[0]; } } } break; // Field is 64-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT64: { // We store as a ULONGLONG ULONGLONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU64 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%016llX", mValue.mU64 ); } else { snprintf( &tempValueString[0], 0, "%llu", mValue.mU64 ); } mValueString = &tempValueString[0]; } } } break; // ANSI/UNICODE fixed length string case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U: { // Compute the number of characters ULONG numChars = mField.mSize / BITS_PER_BYTE; // Parse out the string bOK = ParseString( numChars, bp ); } break; // ANSI NULL terminated string case eDB2_FIELD_STDTYPE_STRING_ANT: { // Figure out the length of the string ULONG numChars = 0; // Temporarily assume success bOK = true; ULONG tmpOffset = bp.GetNumBitsParsed(); CHAR val = 1; while (val != 0) { DWORD rc = bp.Get( BITS_PER_BYTE, val ); if (rc == NO_ERROR) { numChars++; } else { val = 0; } } // Now actually parse/load the string if (bOK == true) { bp.SetOffset( tmpOffset ); bOK = ParseString( numChars, bp ); } } break; // UNICODE NULL terminated string case eDB2_FIELD_STDTYPE_STRING_UNT: { // Figure out the length of the string ULONG numChars = 0; // Temporarily assume success bOK = true; ULONG tmpOffset = bp.GetNumBitsParsed(); USHORT val = 1; while (val != 0) { DWORD rc = bp.Get( BITS_PER_BYTE, val ); if (rc == NO_ERROR) { numChars++; } else { val = 0; } } // Now actually parse/load the string if (bOK == true) { bp.SetOffset( tmpOffset ); bOK = ParseString( numChars, bp ); } } break; case eDB2_FIELD_STDTYPE_STRING_U8: case eDB2_FIELD_STDTYPE_STRING_U8NT: // Unsupported in the Linux adaptation bOK = false; break; // Field is 32-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT32: { // We store as a ULONG ULONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { FLOAT * pFloat = (FLOAT *)&val; // Success! mValue.mFP32 = *pFloat; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%04lX", mValue.mU32 ); } else { snprintf( &tempValueString[0], 0, "%f", mValue.mFP32 ); } mValueString = &tempValueString[0]; } } } break; // Field is 64-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT64: { // We store as a ULONGLONG ULONGLONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { DOUBLE * pFloat = (DOUBLE *)&val; // Success! mValue.mFP64 = *pFloat; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%08llX", mValue.mU64 ); } else { snprintf( &tempValueString[0], 0, "%f", mValue.mFP64 ); } mValueString = &tempValueString[0]; } } } break; } } break; // Unsigend enum value case eDB2_FIELD_ENUM_UNSIGNED: { // We store as a ULONG ULONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU32 = val; bOK = true; // Grab the enum ID ULONG id = pField->mTypeVal; // Map to a string? if (bGenStrings == true) { mValueString = db.MapEnumToString( id, (int)mValue.mU32, true, mField.mbHex ); } } } break; // Signed enum value case eDB2_FIELD_ENUM_SIGNED: { // We store as a LONG LONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS32 = val; bOK = true; // Grab the enum ID ULONG id = pField->mTypeVal; // Map to a string? if (bGenStrings == true) { mValueString = db.MapEnumToString( id, (int)mValue.mS32, true, mField.mbHex ); } } } break; } mbValid = bOK; } /*=========================================================================== METHOD: ParseString (Public Method) DESCRIPTION: Convert the field value to a string PARAMETERS: numChars [ I ] - Number of characters to parse/load bp [I/O] - Bit parser to use RETURN VALUE: bool ===========================================================================*/ bool sParsedField::ParseString( ULONG numChars, cBitParser & bp ) { // Validate size (including null char) if (MAX_SHARED_BUFFER_SIZE < numChars + 1) { return false; } // Assume success bool bRC = true; // Store current offset so we can update field length ULONG curOffset = bp.GetNumBitsParsed(); // Load each byte of the string individually BYTE buf[MAX_SHARED_BUFFER_SIZE]; for (ULONG c = 0; c < numChars; c++) { BYTE val = 0; DWORD rc = bp.Get( BITS_PER_BYTE, val ); if (rc == NO_ERROR) { buf[c] = val; } else { bRC = false; break; } } if (bRC == true) { // Write zeros to the rest of the buffer ULONG size = numChars; ULONG end = numChars + 1; for (ULONG current = size; current < end; current++) { buf[current] = 0; } mValueString = (LPCSTR)&buf[0]; mValue.mpAStr = (LPCSTR)mValueString.c_str(); // Update field size mField.mSize = bp.GetNumBitsParsed() - curOffset; } return bRC; } /*=========================================================================*/ // cParsedFieldNavigator Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetFieldIndex (Public Method) DESCRIPTION: Get index of the (first) field that matches the given field ID PARAMETERS: fieldID [ I ] - Field ID to look for bLoop [ I ] - Loop around end of field list? RETURN VALUE: ULONG - Index of the field (0xFFFFFFFF upon failure) ===========================================================================*/ ULONG cParsedFieldNavigator::GetFieldIndex( ULONG fieldID, bool bLoop ) const { ULONG id = ULONG_MAX; ULONG count = (ULONG)mFields.size(); // Start from last field ID? ULONG fp = 0; ULONG fi = 0; if (mLastIDIndex < count) { fi = mLastIDIndex; } else if (mLastIDIndex != ULONG_MAX && bLoop == false) { // Beyond end of fields with no looping mLastIDIndex = id; return id; } for (fp = 0; fp < count; fp++) { if (mFields[fi].mField.mID == fieldID) { id = fi; break; } fi++; if (fi == count) { if (bLoop == true) { fi = 0; } else { break; } } } // Update last ID accordingly (0xFFFFFFFF upon failure), and return mLastIDIndex = id; if (mLastIDIndex != ULONG_MAX) { mLastIDIndex++; if (mLastIDIndex == count) { mLastIDIndex = 0; } } return id; } /*=========================================================================*/ // cDataParser Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDataParser (Public Method) DESCRIPTION: Constructor (protocol buffer, entity key, and payload) PARAMETERS: db [ I ] - Database to use buffer [ I ] - The protocol buffer being parsed key [ I ] - Protocol entity key pData [ I ] - Payload from above protocol buffer dataLen [ I ] - Size of above payload RETURN VALUE: None ===========================================================================*/ cDataParser::cDataParser( const cCoreDatabase & db, const sProtocolBuffer & buffer, const std::vector & key, const BYTE * pData, ULONG dataLen ) : cProtocolEntityNav( db ), mBuffer( buffer.GetSharedBuffer() ), mbFieldStrings( true ), mbParsed( false ) { // We must have a valid protocol buffer if (mBuffer.IsValid() == false) { return; } // We need something to parse if (pData == 0 || dataLen == 0) { return; } // Key has to be proper if (key.size() < 1) { return; } // Key needs to match protocol eProtocolType pt = (eProtocolType)mBuffer.GetType(); eDB2EntityType et = (eDB2EntityType)key[0]; if (pt == ePROTOCOL_DIAG_RX || pt == ePROTOCOL_DIAG_TX) { if (IsDiagEntityType( et ) == false) { return; } } else if (IsQMIProtocol( pt ) == true) { if (IsQMIEntityType( et ) == false) { return; } } // Pass data to the bit parser mKey = key; mBitsy.SetData( pData, dataLen * BITS_PER_BYTE ); } /*=========================================================================== METHOD: ~cDataParser (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDataParser::~cDataParser() { // Ask bit parser to release data mBitsy.ReleaseData(); // Empty fields mFields.clear(); } /*=========================================================================== METHOD: Parse (Public Method) DESCRIPTION: Parse the data to a list of fields/summary text PARAMETERS: bFieldStrings [ I ] - Generate string representations of field values? bFieldNames [ I ] - Generate (partial) field names? RETURN VALUE: bool ===========================================================================*/ bool cDataParser::Parse( bool bFieldStrings, bool bFieldNames ) { // Store parsing options mbFieldStrings = bFieldStrings; mbFieldNames = bFieldNames; if (mbParsed == false) { // Allocate space for 1024 fields up front in order to increase // performance when parsing and accessing parsed fields mFields.reserve( 1024 ); // Process (parse) the protocol entity mbParsed = ProcessEntity( mKey ); } return mbParsed; } /*=========================================================================== METHOD: GetLastValue (Internal Method) DESCRIPTION: Working from the back of the current field list find and return the value for the specified field ID as a LONGLONG (field type must be able to fit in a LONGLONG for a value to be returned) PARAMETERS: fieldID [ I ] - Field ID we are looking for val [ O ] - The value RETURN VALUE: bool ===========================================================================*/ bool cDataParser::GetLastValue( ULONG fieldID, LONGLONG & val ) { // Assume failure bool bRC = false; // Use field value tracking information std::map >::iterator pTF; pTF = mTrackedFields.find( fieldID ); if (pTF != mTrackedFields.end() && pTF->second.first == true) { val = pTF->second.second; bRC = true; } return bRC; } /*=========================================================================== METHOD: ContinueNavigation (Internal Method) DESCRIPTION: Continue navigation now that entity has been set? RETURN VALUE: bool ===========================================================================*/ bool cDataParser::ContinueNavigation() { // Proceed to parse? bool bParse = true; // Is there actually something to process? if (mBitsy.GetNumBitsLeft() == 0) { bParse = false; } return bParse; } /*=========================================================================== METHOD: ProcessField (Internal Method) DESCRIPTION: Process the given field by parsing the value PARAMETERS: pField [ I ] - The field being processed fieldName [ I ] - Field name (partial) arrayIndex [ I ] - Not used RETURN VALUE: bool ===========================================================================*/ bool cDataParser::ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG /* arrayIndex */ ) { // Assume failure bool bRC = false; if (pField == 0) { return bRC; } // We must have a name sParsedField theField( mDB, pField, fieldName, mBitsy, mbFieldStrings ); // Did that result in a valid field? if (theField.IsValid() == true) { // Add field mFields.push_back( theField ); bRC = true; // Are we tracking the value of this field? std::map >::iterator pTF; pTF = mTrackedFields.find( pField->mID ); if (pTF != mTrackedFields.end()) { std::pair & entry = pTF->second; // What type is this field? switch (pField->mType) { case eDB2_FIELD_STD: { // Standard field, what kind? eDB2StdFieldType ft = (eDB2StdFieldType)pField->mTypeVal; switch (ft) { // Field is a boolean (0/1, false/true)/8-bit unsigned case eDB2_FIELD_STDTYPE_BOOL: case eDB2_FIELD_STDTYPE_UINT8: { // Treat as UCHAR entry.second = (LONGLONG)theField.mValue.mU8; entry.first = true; } break; // Field is 8-bit signed integer case eDB2_FIELD_STDTYPE_INT8: { // Treat as CHAR entry.second = (LONGLONG)theField.mValue.mS8; entry.first = true; } break; // Field is 16-bit signed integer case eDB2_FIELD_STDTYPE_INT16: { // Treat as SHORT entry.second = (LONGLONG)theField.mValue.mS16; entry.first = true; } break; // Field is 16-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT16: { // Treat as USHORT entry.second = (LONGLONG)theField.mValue.mU16; entry.first = true; } break; // Field is 32-bit signed integer case eDB2_FIELD_STDTYPE_INT32: { // Treat as LONG entry.second = (LONGLONG)theField.mValue.mS32; entry.first = true; } break; // Field is 32-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT32: { // Treat as ULONG entry.second = (LONGLONG)theField.mValue.mU32; entry.first = true; } break; // Field is 64-bit signed integer case eDB2_FIELD_STDTYPE_INT64: { // Treat as LONGLONG entry.second = (LONGLONG)theField.mValue.mS64; entry.first = true; } break; // Field is 64-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT64: { // Treat as ULONGLONG if (theField.mValue.mU64 <= LLONG_MAX) { entry.second = (LONGLONG)theField.mValue.mU64; entry.first = true; } } break; } } break; case eDB2_FIELD_ENUM_UNSIGNED: { // Treat as ULONG entry.second = (LONGLONG)theField.mValue.mU32; entry.first = true; } break; case eDB2_FIELD_ENUM_SIGNED: { // Treat as LONG entry.second = (LONGLONG)theField.mValue.mS32; entry.first = true; } break; } } } return bRC; } /*=========================================================================== METHOD: HandleSpecialCases (Internal Method) DESCRIPTION: Handle special case processing for summary text generation NOTE: This should only be added to as a last resort PARAMETERS: args [I/O] - Current argument list/updated 'special' argument list fs [I/O] - Current format specifier/updated 'special' format specifier RETURN VALUE: None ===========================================================================*/ void cDataParser::HandleSpecialCases( std::string & args, std::string & fs ) { std::vector key = mEntity.GetKey(); if (key.size() == 2 && key[0] == (ULONG)eDB2_ET_DIAG_EVENT) { ULONG id = key[1]; mBitsy.SetOffset( 0 ); ULONG lenInBits = mBitsy.GetNumBitsLeft(); switch (id) { case 276: if (lenInBits == 16) { // Old style idle handoff event, remap summary args = "idle_handoff"; fs = "idle_handoff=%u"; } break; case 277: if (lenInBits == 16) { // Old style access handoff event, remap summary args = "ms_access_handoff"; fs = "ms_access_handoff=%u"; } break; case 278: if (lenInBits == 16) { // Old style access probe handoff event, remap summary args = "ms_access_probe_handoff"; fs = "ms_access_probe_handoff=%u"; } break; case 639: if (lenInBits == 16) { // Old style access entry handoff event, remap summary args = "ms_access_handoff"; fs = "ms_access_handoff=%u"; } break; } } } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/DataParser.h000077500000000000000000000276111455567757300224650ustar00rootroot00000000000000/*=========================================================================== FILE: DataParser.h DESCRIPTION: Declaration of sParsedField and cDataParser PUBLIC CLASSES AND METHODS: sParsedField Structure to represent a single parsed field (field ID, offset, size, value, name, etc.) cDataParser Class to parse a buffer into bit/byte specified fields accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include "BitParser.h" #include "ProtocolEntityNav.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- class cColorItem; /*=========================================================================*/ // Union uFields // // Union to represent the data of a parsed field /*=========================================================================*/ union uFields { CHAR mS8; UCHAR mU8; SHORT mS16; USHORT mU16; LONG mS32; ULONG mU32; FLOAT mFP32; LONGLONG mS64; ULONGLONG mU64; double mFP64; LPCSTR mpAStr; }; /*=========================================================================*/ // Struct sParsedField // // Structure to represent a parsed field /*=========================================================================*/ struct sParsedField { // Give data parser full access friend class cDataParser; public: // (Inline) Constructor - default sParsedField() : mField(), mOffset( 0 ), mValueString( "" ), mName( "" ), mbValid( false ) { memset( (PVOID)&mValue, 0, sizeof( mValue ) ); }; // Constructor - parameterized sParsedField( const cCoreDatabase & db, const sDB2Field * pField, const std::string & name, cBitParser & bp, bool bGenStrings = true ); // (Inline) Get the raw value string (i.e. unmapped enums) std::string GetRawValueString() const { std::string retStr = ""; std::ostringstream tmp; if (IsValid() == true) { if (mField.mType == eDB2_FIELD_ENUM_UNSIGNED) { if (mField.mbHex == false) { tmp << mValue.mU32; retStr = tmp.str(); } else { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << mValue.mU32; retStr = tmp.str(); } } else if (mField.mType == eDB2_FIELD_ENUM_SIGNED) { if (mField.mbHex == false) { tmp << mValue.mS32; retStr = tmp.str(); } else { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << mValue.mU32; retStr = tmp.str(); } } else { retStr = mValueString; } } return retStr; }; // (Inline) Get field size in bits ULONG GetSize() const { ULONG sz = 0; if (mField.IsValid() == true) { sz = mField.mSize; } return sz; }; // (Inline) Is this field a string type? bool IsString() const { bool bStr = false; if (IsValid() == false) { return bStr; } if (mField.mType == eDB2_FIELD_STD) { switch ((eDB2StdFieldType)mField.mTypeVal) { case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U: case eDB2_FIELD_STDTYPE_STRING_U8: case eDB2_FIELD_STDTYPE_STRING_ANT: case eDB2_FIELD_STDTYPE_STRING_UNT: case eDB2_FIELD_STDTYPE_STRING_U8NT: bStr = true; break; } } return bStr; }; // (Inline) Is this object valid? bool IsValid() const { return mbValid; }; /* Field definition */ sDB2Field mField; /* Bit offset (from start of payload) */ ULONG mOffset; /* Field value */ uFields mValue; /* Field value as a string */ std::string mValueString; /* Partially qualified name of field */ std::string mName; protected: // Parse a string bool ParseString( ULONG numChars, cBitParser & bp ); /* Is this object valid? */ bool mbValid; }; /*=========================================================================*/ // Class cParsedFieldNavigator // // Class to navigate/search parsed fields produced by the above /*=========================================================================*/ class cParsedFieldNavigator { public: // (Inline) Constructor cParsedFieldNavigator( const std::vector & pf ) : mFields( pf ), mLastIDIndex( ULONG_MAX ) { }; // Get index of the (first) field that matches the field ID, // the search starts from the last success index returned by // a previous call to this method ULONG GetFieldIndex( ULONG fieldID, bool bLoop = false ) const; // (Inline) Get index of the (first) field that matches the // given ID, the search starts from the provided index ULONG GetFieldIndexFrom( ULONG fieldID, ULONG startIndex, bool bLoop = false ) const { mLastIDIndex = startIndex; return GetFieldIndex( fieldID, bLoop ); }; protected: /* The list of parsed fields */ const std::vector & mFields; /* Index of last field we matched */ mutable ULONG mLastIDIndex; }; /*=========================================================================*/ // Class cDataParser // Class to parse a buffer into bit/byte specified fields /*=========================================================================*/ class cDataParser : public cProtocolEntityNav { public: // Constructor (protocol buffer) cDataParser( const cCoreDatabase & db, const sProtocolBuffer & buffer ); // Constructor (protocol buffer, entity key, and payload) cDataParser( const cCoreDatabase & db, const sProtocolBuffer & buffer, const std::vector & key, const BYTE * pData, ULONG dataLen ); // Destructor virtual ~cDataParser(); // Parse the data to a list of fields/summary text virtual bool Parse( bool bFieldStrings = true, bool bFieldNames = true ); // (Inline) Get the protocol entity name std::string GetEntityName() const { std::string retName = "?"; if (mEntity.mpName != 0 && mEntity.mpName[0] != 0) { retName = mEntity.mpName; } return retName; }; // (Inline) Get the parsed fields typedef std::vector tParsedFields; const tParsedFields & GetFields() const { return mFields; }; protected: // Working from the back of the current field list find // and return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG fieldID, LONGLONG & val ); // Contiue navigation now that entity has been set? virtual bool ContinueNavigation(); // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG arrayIndex = -1 ); // (Inline) Get current working offset virtual ULONG GetOffset() { return mBitsy.GetNumBitsParsed(); }; // (Inline) Set current working offset virtual bool SetOffset( ULONG offset ) { mBitsy.SetOffset( offset ); return true; }; // (Inline) Get current navigation order virtual bool GetLSBMode() { return mBitsy.GetLSBMode(); }; // (Inline) Set current navigation order virtual bool SetLSBMode( bool bLSB ) { // Assume success bool bOK = true; if (bLSB != GetLSBMode()) { if ((GetOffset() % BITS_PER_BYTE) != 0) { // We need to be on a byte boundary bOK = false; } else { mBitsy.SetLSBMode( bLSB ); } } return bOK; }; // Handle special case processing for summary text generation virtual void HandleSpecialCases( std::string & args, std::string & fs ); /* Color item containing the data we are parsing */ sProtocolBuffer mBuffer; /* Entity key */ std::vector mKey; /* The underlying bit parser */ cBitParser mBitsy; /* The list of parsed fields */ tParsedFields mFields; /* Generate field value strings? */ bool mbFieldStrings; /* Did we successfully parse the buffer? */ bool mbParsed; /* Parsed field vector index of last instance of each field (by ID) */ std::map mFieldIndices; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/Event.cpp000077500000000000000000000254571455567757300220610ustar00rootroot00000000000000/*=========================================================================== FILE: Event.cpp DESCRIPTION: Implementation of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Event.h" /*=========================================================================== METHOD: WaitOnMultipleEvents (Free Method) DESCRIPTION: Wait for any of the events to be set and return the value Note: If multiple events are set, only the event specified by eventIndex will be read from. Run this function again to get the next event. PARAMETERS: events [ I ] - Vector of events which may be signaled timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success eventIndex [ O ] - Index of event which was signaled RETURN VALUE: Return code positive for number of events set -ETIME on timeout negative errno value on failure ===========================================================================*/ int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ) { // Check internal pipes' status for (int index = 0; index < events.size(); index++) { int error = events[index]->mError; if (error != 0) { TRACE( "cEvent %d has error %d\n", index, error ); return -error; } } // Initialize the FD set fd_set fds; FD_ZERO( &fds ); // Add each item to the FD set, keeping track of the largest, // which is used for select() int largestFD = 0; for (int index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; FD_SET( pipe, &fds ); largestFD = std::max( pipe, largestFD ); } struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipes for the specified amount of time int rc = select( largestFD + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { TRACE( "WaitOnMultipleEvents error %d\n", errno ); return -errno; } else if (rc == 0) { // No activity on the pipes return -ETIME; } int numSignaled = rc; // Only read from first pipe which was signaled int signaled = -1; for (int index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; if (FD_ISSET( pipe, &fds ) != 0) { signaled = index; break; } } if (signaled == -1) { // Odd, no one was signaled return -ENODATA; } DWORD tempVal = 0; rc = events[signaled]->Read( tempVal ); if (rc == 0) { // Success val = tempVal; eventIndex = signaled; return numSignaled; } else { // failure return rc; } } /*=========================================================================*/ // cEvent Methods /*=========================================================================*/ /*=========================================================================== METHOD: cEvent (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cEvent::cEvent() : mError( 0 ) { int rc = pipe( mPipes ); if (rc != 0) { mError = errno; TRACE( "cEvent - Error %d creating pipe, %s\n", mError, strerror( mError ) ); } } /*=========================================================================== METHOD: ~cEvent (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cEvent::~cEvent() { // Check internal pipe status if (mError == 0) { Close(); mError = EBADF; } } /*=========================================================================== METHOD: Close (Internal Method) DESCRIPTION: Close pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Close() { int retCode = 0; int rc = close( mPipes[READING] ); mPipes[READING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[READING], %s\n", retCode, strerror( retCode ) ); } rc = close( mPipes[WRITING] ); mPipes[WRITING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[WRITING], %s\n", retCode, strerror( retCode ) ); } return retCode; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Set/signal the event with the specified value PARAMETERS: val [ I ] - Value to pass through with signal RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Set( DWORD val ) { // Check internal pipe status if (mError != 0) { return mError; } PBYTE pWrite = (PBYTE)&val; int writeSize = sizeof( DWORD ); while (writeSize > 0) { int bytesWritten = write( mPipes[WRITING], pWrite, writeSize ); if (bytesWritten == -1) { // Store error from write int writeErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = writeErr; } // We cannot recover from this error Close(); return writeErr; } pWrite += bytesWritten; writeSize -= bytesWritten; } // Success return 0; } /*=========================================================================== METHOD: Wait (Free Method) DESCRIPTION: Wait for the event to be signalled and return the read in value PARAMETERS: timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success RETURN VALUE: Return code 0 on success ETIME on timeout errno value on failure ===========================================================================*/ int cEvent::Wait( DWORD timeoutMS, DWORD & val ) { // Check internal pipe status if (mError != 0) { return mError; } fd_set fds; FD_ZERO( &fds ); FD_SET( mPipes[READING], &fds ); struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipe for the specified amount of time int rc = select( mPipes[READING] + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { // Store error from select int selectErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = selectErr; } // We cannot recover from this error Close(); return selectErr; } else if (rc == 0) { // No activity on the pipe return ETIME; } return Read( val ); } /*=========================================================================== METHOD: Clear (Free Method) DESCRIPTION: Read and discard all values currently in the pipe ===========================================================================*/ void cEvent::Clear() { DWORD unusedVal; int rc = 0; while (rc == 0) { rc = Wait( (DWORD)0, unusedVal ); } } /*=========================================================================== METHOD: Read (Internal Method) DESCRIPTION: Read a DWORD from the pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Read( DWORD & val ) { DWORD tempVal; PBYTE pRead = (PBYTE)&tempVal; int readSize = sizeof( DWORD ); while (readSize > 0) { int bytesRead = read( mPipes[READING], pRead, readSize ); if (bytesRead <= 0) { // Store error from read int readErr = errno; if (readErr == 0) { // Hard error! This should NEVER happen for a pipe ASSERT( 0 ); readErr = EBADF; } // First error? if (mError == 0) { // Yes, store the error mError = readErr; } // We cannot recover from this error Close(); return readErr; } pRead += bytesRead; readSize -= bytesRead; } val = tempVal; return 0; }libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/Event.h000077500000000000000000000102031455567757300215050ustar00rootroot00000000000000/*=========================================================================== FILE: Event.h DESCRIPTION: Declaration of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include //--------------------------------------------------------------------------- // Prototype //--------------------------------------------------------------------------- class cEvent; /*=========================================================================*/ // Free methods /*=========================================================================*/ // Wait for any of the events to be set and return the value int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); /*=========================================================================*/ // Class cEvent /*=========================================================================*/ class cEvent { public: // Constructor cEvent(); // Destructor ~cEvent(); // Set/signal the event with the specified value int Set( DWORD val ); // Wait for the event to be signalled and return the read in value int Wait( DWORD timeoutMS, DWORD & val ); // Read and discard all values currently in the pipe void Clear(); protected: // Close pipe (used in errors or normal exit) int Close(); // Read from the pipe int Read( DWORD & val ); /* Internal error status */ int mError; /* Internal pipes */ int mPipes[2]; // WaitOnMultipleEvents gets full access friend int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/HDLC.cpp000077500000000000000000000201261455567757300214760ustar00rootroot00000000000000/*=========================================================================== FILE: HDLC.cpp DESCRIPTION: Encode and decode asynchronous HDLC protocol packets as described by both the QUALCOMM download & SDIC (diagnostic) protocol documents PUBLIC CLASSES AND METHODS: HDLCDecode() HDLCEncode() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "HDLC.h" #include "CRC.h" #include "SharedBuffer.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /* Async HDLC defines */ const BYTE AHDLC_FLAG = 0x7e; const BYTE AHDLC_ESCAPE = 0x7d; const BYTE AHDLC_ESC_M = 0x20; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: HDLCDecode (Free Method) DESCRIPTION: HDLC decode the given buffer returning the results in an allocated buffer PARAMETERS: pBuf [ I ] - The data buffer to decode RETURN VALUE: sSharedBuffer * : The decoded buffer (allocated), 0 on error ===========================================================================*/ sSharedBuffer * HDLCDecode( sSharedBuffer * pBuf ) { // The return buffer sSharedBuffer * pRet = 0; // The has to be something to decode if (pBuf == 0 || pBuf->IsValid() == false) { return pRet; } // Grab raw data from shared buffer const BYTE * pData = pBuf->GetBuffer(); UINT sz = pBuf->GetSize(); // Is the first character a leading flag? if (pData[0] == AHDLC_FLAG) { pData++; sz--; } // There must be at least four bytes (data, CRC, trailing flag) if (sz < 4) { return pRet; } // The last character must be the trailing flag if (pData[sz - 1] == AHDLC_FLAG) { sz--; } else { return pRet; } // Allocate the decode buffer PBYTE pDecoded = new BYTE[sz]; if (pDecoded == 0) { return pRet; } // Handle escaped characters and copy into decode buffer UINT encodeIndex = 0; UINT decodeIndex = 0; while (encodeIndex < sz) { BYTE b = pData[encodeIndex++]; if (b == AHDLC_ESCAPE && encodeIndex < sz) { b = pData[encodeIndex++]; b ^= AHDLC_ESC_M; } pDecoded[decodeIndex++] = b; } // Check CRC value if (CheckCRC( pDecoded, decodeIndex ) == false) { delete [] pDecoded; return pRet; } // Adjust decode length down for CRC decodeIndex -= 2; // ... and wrap up in a shared buffer pRet = new sSharedBuffer( decodeIndex, pDecoded, pBuf->GetType() ); return pRet; } /*=========================================================================== METHOD: HDLCEncode (Free Method) DESCRIPTION: HDLC encode the given buffer returning the results in an allocated buffer PARAMETERS: pBuf [ I ] - The data buffer to decode RETURN VALUE: sSharedBuffer * : The decoded buffer (allocated), 0 on error ===========================================================================*/ sSharedBuffer * HDLCEncode( sSharedBuffer * pBuf ) { // The return buffer sSharedBuffer * pRet = 0; // The has to be something to decode if (pBuf == 0 || pBuf->IsValid() == false) { return pRet; } // Grab raw data from shared buffer const BYTE * pData = pBuf->GetBuffer(); UINT sz = pBuf->GetSize(); // Compute CRC USHORT CRC = CalculateCRC( pData, sz * 8 ); // Allocate the encode buffer PBYTE pEncoded = new BYTE[sz * 2 + 4]; if (pEncoded == 0) { return pRet; } // Add leading flag UINT encodeIndex = 0; pEncoded[encodeIndex++] = AHDLC_FLAG; // Add data, escaping when necessary UINT decodeIndex = 0; while (decodeIndex < sz) { BYTE value = pData[decodeIndex++]; if (value == AHDLC_FLAG || value == AHDLC_ESCAPE) { value ^= AHDLC_ESC_M; pEncoded[encodeIndex++] = AHDLC_ESCAPE; } pEncoded[encodeIndex++] = value; } // Byte order CRC BYTE byteOrderedCRC[2]; byteOrderedCRC[0] = (BYTE)(CRC & 0x00ff); byteOrderedCRC[1] = (BYTE)(CRC >> 8); // Add CRC UINT c = 0; while (c < 2) { BYTE value = byteOrderedCRC[c++]; if (value == AHDLC_FLAG || value == AHDLC_ESCAPE) { value ^= AHDLC_ESC_M; pEncoded[encodeIndex++] = AHDLC_ESCAPE; } pEncoded[encodeIndex++] = value; } // Add trailing flag pEncoded[encodeIndex++] = AHDLC_FLAG; // Wrap up in a shared buffer pRet = new sSharedBuffer( encodeIndex, pEncoded, pBuf->GetType() ); return pRet; } /*=========================================================================== METHOD: HDLCUnitTest (Free Method) DESCRIPTION: Simple in = out testing of HDLCEncode/HDLCDecode RETURN VALUE: bool: true - Test succeeded false - Test failed ===========================================================================*/ #ifdef DEBUG #include bool HDLCUnitTest() { // Assume failure bool bRC = false; const UINT MAX_LEN = 2048; BYTE testBuf[MAX_LEN]; srand( GetTickCount() ); UINT len = (((UINT)rand()) % MAX_LEN) + 1; for (UINT i = 0; i < len; i++) { testBuf[i] = (BYTE)((UINT)rand() % 256); } sSharedBuffer * pOrig = new sSharedBuffer( testBuf, len, 0 ); if (pOrig != 0) { // Encode buffer sSharedBuffer * pEnc = HDLCEncode( pOrig ); if (pEnc != 0) { // Now decode buffer encoded above sSharedBuffer * pDec = HDLCDecode( pEnc ); if (pDec != 0) { if (pOrig->IsValid() == true && pDec->IsValid() == true) { // Compare decoded to original const BYTE * pOrigData = pOrig->GetBuffer(); const BYTE * pDecData = pDec->GetBuffer(); if (len == pDec->GetSize()) { int cmp = memcmp( (const void *)pOrigData, (const void *)pDecData, (size_t)len ); bRC = (cmp == 0); } } delete [] pDec; } delete [] pEnc; } delete [] pOrig; } return bRC; } #endif libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/HDLC.h000077500000000000000000000055421455567757300211500ustar00rootroot00000000000000/*=========================================================================== FILE: HDLC.h DESCRIPTION: Encode and decode asynchronous HDLC protocol packets as described by both the QUALCOMM download & SDIC (diagnostic) protocol documents PUBLIC CLASSES AND METHODS: HDLCDecode() HDLCEncode() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- extern const BYTE AHDLC_FLAG; extern const BYTE AHDLC_ESCAPE; extern const BYTE AHDLC_ESC_M; struct sSharedBuffer; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // HDLC encode the given buffer returning the results in an allocated buffer sSharedBuffer * HDLCEncode( sSharedBuffer * pBuf ); // HDLC decode the given buffer returning the results in an allocated buffer sSharedBuffer * HDLCDecode( sSharedBuffer * pBuf ); #ifdef DEBUG // Simple in = out testing of HDLCEncode/HDLCDecode bool HDLCUnitTest(); #endif libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/HDLCProtocolServer.cpp000077500000000000000000000224071455567757300244130ustar00rootroot00000000000000/*=========================================================================== FILE: HDLCProtocolServer.cpp DESCRIPTION: Generic HDLC framed protocol packet server PUBLIC CLASSES AND METHODS: cHDLCProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "HDLCProtocolServer.h" #include "HDLC.h" #include "CRC.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cHDLCProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cHDLCProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cHDLCProtocolServer::cHDLCProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( rxType, txType, bufferSzRx, logSz ), mRxType( rxType ), mpEncodedBuffer( 0 ), mpRxDecodeBuffer( 0 ), mRxDecodeOffset( 0 ), mbInEscape( false ) { // Allocate decode buffer? if (mRxBufferSize > 0) { mpRxDecodeBuffer = new BYTE[mRxBufferSize * 4]; } } /*=========================================================================== METHOD: ~cHDLCProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cHDLCProtocolServer::~cHDLCProtocolServer() { // Free encoded buffer? if (mpEncodedBuffer != 0) { delete mpEncodedBuffer; mpEncodedBuffer = 0; } // Free decode buffer? if (mpRxDecodeBuffer != 0) { delete [] mpRxDecodeBuffer; mpRxDecodeBuffer = 0; } } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization NOTE: This sends the commands to the driver which sends the IOCTL, but that isn't successful SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cHDLCProtocolServer::InitializeComm() { // Default configuration setting struct termios settings; if (mComm.GetSettings( &settings ) == false) { return false; } cfmakeraw( &settings ); settings.c_cflag |= CREAD|CLOCAL; return mComm.ConfigureSettings( &settings ); } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cHDLCProtocolServer::CleanupComm() { // Nothing to actually do here return true; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encoded data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cHDLCProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { // We encoded data bEncoded = true; // Last encoded buffer around? if (mpEncodedBuffer != 0) { // Yes free it. Note that this assumes that the last transmission has // concluded since the buffer must exist during transmission. Since we // support one and only one outstanding request this is valid delete mpEncodedBuffer; mpEncodedBuffer = 0; } mpEncodedBuffer = HDLCEncode( pBuffer ); return mpEncodedBuffer; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into packets returning the last response PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response bAbortTx [ O ] - Response aborts current transmission? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cHDLCProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; // Something to decode from/to? if (bytesReceived == 0 || mpRxDecodeBuffer == 0) { return bRC; } BYTE val; ULONG idx = 0; ULONG maxSz = mRxBufferSize * 4; while (idx < bytesReceived) { val = mpRxBuffer[idx++]; // Check for target spewing nonsense if (mRxDecodeOffset >= maxSz) { // Reset to beginning mRxDecodeOffset = 0; } // Was the previous byte an escape byte? if (mbInEscape == true) { // Yes, handle it mbInEscape = false; val ^= AHDLC_ESC_M; mpRxDecodeBuffer[mRxDecodeOffset++] = val; } else if (val == AHDLC_ESCAPE) { // No, but this one is mbInEscape = true; } else if (val == AHDLC_FLAG) { // Is this a valid frame? if ( (mRxDecodeOffset > 0) && (CheckCRC( mpRxDecodeBuffer, mRxDecodeOffset ) == true) ) { // Yes, extract it (minus CRC) to a shared buffer sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxDecodeBuffer, mRxDecodeOffset - 2, (ULONG)mRxType ); if (pTmp != 0) { sProtocolBuffer tmpPB( pTmp ); ULONG tmpIdx = mLog.AddBuffer( tmpPB ); // Abort? bool bTmpAbortTx = IsTxAbortResponse( tmpPB ); if (bTmpAbortTx == true) { bAbortTx = true; } else { // Is this the response we are looking for? bool bRsp = IsResponse( tmpPB ); if (bRsp == true) { rspIdx = tmpIdx; bRC = true; } } } } // Reset for next frame mRxDecodeOffset = 0; } else { // No, just a regular value mpRxDecodeBuffer[mRxDecodeOffset++] = val; } } return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/HDLCProtocolServer.h000077500000000000000000000102221455567757300240500ustar00rootroot00000000000000/*=========================================================================== FILE: HDLCProtocolServer.h DESCRIPTION: Generic HDLC framed protocol packet server PUBLIC CLASSES AND METHODS: cHDLCProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cHDLCProtocolServer /*=========================================================================*/ class cHDLCProtocolServer : public cProtocolServer { public: // Constructor cHDLCProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cHDLCProtocolServer(); protected: // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & /* rsp */ ) = 0; // Is the passed in data a response that aborts the current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & rsp ) = 0; /* Protocol type for incoming data*/ eProtocolType mRxType; /* Encoded data being transmitted */ sSharedBuffer * mpEncodedBuffer; /* Decode buffer for incoming data */ BYTE * mpRxDecodeBuffer; /* Current index into above buffer */ ULONG mRxDecodeOffset; /* Are we currently escaping a character? */ bool mbInEscape; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/Makefile.am000066400000000000000000000020521455567757300223070ustar00rootroot00000000000000noinst_LTLIBRARIES = libCore.la libCore_la_CXXFLAGS = -Wunused-variable libCore_la_SOURCES = \ BitPacker.cpp \ BitPacker.h \ BitParser.cpp \ BitParser.h \ Comm.cpp \ Comm.h \ CoreDatabase.cpp \ CoreDatabase.h \ CoreUtilities.cpp \ CoreUtilities.h \ CRC.cpp \ CRC.h \ DataPacker.cpp \ DataPacker.h \ DataParser.cpp \ DataParser.h \ DB2NavTree.cpp \ DB2NavTree.h \ DB2TextFile.cpp \ DB2TextFile.h \ DB2Utilities.cpp \ DB2Utilities.h \ Event.cpp \ Event.h \ HDLC.cpp \ HDLC.h \ HDLCProtocolServer.cpp \ HDLCProtocolServer.h \ MemoryMappedFile.cpp \ MemoryMappedFile.h \ ProtocolBuffer.cpp \ ProtocolBuffer.h \ ProtocolEntityNav.cpp \ ProtocolEntityNav.h \ ProtocolLog.cpp \ ProtocolLog.h \ ProtocolNotification.cpp \ ProtocolNotification.h \ ProtocolRequest.cpp \ ProtocolRequest.h \ ProtocolServer.cpp \ ProtocolServer.h \ QDLBuffers.cpp \ QDLBuffers.h \ QDLProtocolServer.cpp \ QDLProtocolServer.h \ QMIBuffers.cpp \ QMIBuffers.h \ QMIProtocolServer.cpp \ QMIProtocolServer.h \ SharedBuffer.cpp \ SharedBuffer.h libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/MemoryMappedFile.cpp000077500000000000000000000126271455567757300241720ustar00rootroot00000000000000/*=========================================================================== FILE: MemoryMappedFile.cpp DESCRIPTION: Implementation of cMemoryMappedFile class PUBLIC CLASSES AND METHODS: cMemoryMappedFile The cMemoryMappedFile class provides the ability to read in a file via Linux memory maps Note: cMemoryMappedFiles are read only Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "MemoryMappedFile.h" #include //----------------------------------------------------------------------------- // Definitions //----------------------------------------------------------------------------- // Maximum size of a file this interface will try to open (64 MB) const DWORD MAX_FILE_SZ = 1024 * 1024 * 64; /*=========================================================================*/ // cMemoryMappedFile Methods /*=========================================================================*/ /*=========================================================================== METHOD: cMemoryMappedFile (Public Method) DESCRIPTION: Construct object/load file into memory PARAMETERS pFile [ I ] - File name RETURN VALUE: None ===========================================================================*/ cMemoryMappedFile::cMemoryMappedFile( LPCSTR pFile ) : mbResourceBased( false ), mpBuffer( 0 ), mFileSize( 0 ), mStatus( ERROR_FILE_NOT_FOUND ) { if (pFile == 0 || pFile[0] == 0) { return; } // Open the file mFile = open( pFile, O_RDONLY ); if (mFile == -1) { TRACE( "Unable to Map %s to memory. Error %d: %s\n", pFile, errno, strerror( errno ) ); return; } // Grab the file size struct stat fileInfo; if (fstat( mFile, &fileInfo ) != 0) { TRACE( "Unable to get info for %s. Error %d: %s\n", pFile, errno, strerror( errno ) ); return; } DWORD fileSize = fileInfo.st_size; // Map to mpBuffer mpBuffer = mmap( 0, fileSize, PROT_READ, MAP_SHARED | MAP_POPULATE, mFile, 0 ); if (mpBuffer == 0 || mpBuffer == MAP_FAILED ) { TRACE( "Memory map failed error %d:, %s\n", errno, strerror( errno ) ); return; } // Success! mFileSize = fileSize; mStatus = NO_ERROR; } /*=========================================================================== METHOD: cMemoryMappedFile (Public Method) DESCRIPTION: Construct object/load resource based file into memory PARAMETERS pStart [ I ] - Start location of object nSize [ I ] - Size of object RETURN VALUE: None ===========================================================================*/ cMemoryMappedFile::cMemoryMappedFile( const char * pStart, const int nSize ) : mbResourceBased( true ), mpBuffer( 0 ), mFileSize( 0 ), mStatus( INVALID_HANDLE_VALUE ) { // Set size mFileSize = nSize; // Set memory pointer mpBuffer = (void * )pStart; // Success! mStatus = NO_ERROR; } /*=========================================================================== METHOD: ~cMemoryMappedFile (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cMemoryMappedFile::~cMemoryMappedFile() { if (mbResourceBased == false) { if (munmap( mpBuffer, mFileSize ) == -1) { TRACE( "Memory unmapping error %d: %s\n", errno, strerror( errno ) ); return; } } } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/MemoryMappedFile.h000077500000000000000000000072751455567757300236420ustar00rootroot00000000000000/*=========================================================================== FILE: MemoryMappedFile.h DESCRIPTION: Declaration of cMemoryMappedFile class PUBLIC CLASSES AND METHODS: cMemoryMappedFile The cMemoryMappedFile class provides the ability to read in a file via Linux memory maps Note: cMemoryMappedFiles are read only Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cMemoryMappedFile /*=========================================================================*/ class cMemoryMappedFile { public: // Constructor (loads file) cMemoryMappedFile( LPCSTR pFile ); // Constructor (loads file from resource) cMemoryMappedFile( const char * pStart, const int nSize ); // Destructor virtual ~cMemoryMappedFile(); // (Inline) Get error status DWORD GetStatus() { DWORD stat = mStatus; if (mStatus == NO_ERROR) { if (mpBuffer == 0 || mFileSize == 0) { // We failed but GetLastError() return NO_ERROR stat = ERROR_NO_MORE_ITEMS; } } return stat; }; // (Inline) Return the size of the file (contents) ULONG GetSize() { ULONG sz = 0; if (GetStatus() == NO_ERROR) { sz = mFileSize; } return sz; }; // (Inline) Return the file contents LPVOID GetContents() { LPVOID pContents = 0; if (GetStatus() == NO_ERROR) { pContents = mpBuffer; } return pContents; }; protected: /* Resource based file? */ bool mbResourceBased; /* File handle */ int mFile; /* File contents*/ LPVOID mpBuffer; /* File size */ ULONG mFileSize; /* Error status */ DWORD mStatus; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolBuffer.cpp000077500000000000000000000143601455567757300237220ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.cpp DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sProtocolBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer() : mpData( 0 ), mbValid( false ) { // Object is currently invalid mTimestamp = EMPTY_TIME; } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (parameterized) PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( sSharedBuffer * pBuffer ) : mpData( 0 ), mbValid( false ) { mTimestamp = EMPTY_TIME; time_t rawtime; time( &rawtime ); tm * timestamp = localtime( &rawtime ); if (timestamp != 0) { mTimestamp = *timestamp; } if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } mpData = pBuffer; if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; } // NOTE: Derived classes need to call their own validation method // in their constructors since the override might try to access // data that is not yet in place sProtocolBuffer::Validate(); } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Copy constructor PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( const sProtocolBuffer & copyThis ) : mpData( copyThis.mpData ), mTimestamp( copyThis.mTimestamp ), mbValid( copyThis.mbValid ) { // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } } /*=========================================================================== METHOD: operator = (Public Method) DESCRIPTION: Assignment operator PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: sProtocolBuffer & ===========================================================================*/ sProtocolBuffer & sProtocolBuffer::operator = ( const sProtocolBuffer & copyThis ) { // Do we already have data? if (mpData != 0) { // Is it different than what we are duplicating? if (mpData != copyThis.mpData) { // Yes, release our current buffer mpData->Release(); } } mpData = copyThis.mpData; mTimestamp = copyThis.mTimestamp; mbValid = copyThis.mbValid; // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } return *this; } /*=========================================================================== METHOD: ~sProtocolBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::~sProtocolBuffer() { if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } else if (mpData != 0) { ASSERT( 0 ); } mbValid = false; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolBuffer.h000077500000000000000000000116201455567757300233630ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.h DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SharedBuffer.h" #include "ProtocolEnum.h" static const tm EMPTY_TIME = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /*=========================================================================*/ // Struct sProtocolBuffer /*=========================================================================*/ struct sProtocolBuffer { public: // Constructor (default) sProtocolBuffer(); // Constructor (parameterized) sProtocolBuffer( sSharedBuffer * pBuffer ); // Copy constructor sProtocolBuffer( const sProtocolBuffer & copyThis ); // Assignment operator sProtocolBuffer & operator = ( const sProtocolBuffer & copyThis ); // Destructor virtual ~sProtocolBuffer(); // (Inline) Get buffer const BYTE * GetBuffer() const { BYTE * pRet = 0; if (IsValid() == true) { pRet = (BYTE *)mpData->GetBuffer(); } return (const BYTE *)pRet; }; // (Inline) Get buffer size ULONG GetSize() const { ULONG size = 0; if (IsValid() == true) { size = mpData->GetSize(); } return size; }; // (Inline) Return the protocol type eProtocolType GetType() const { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid() == true) { pt = (eProtocolType)mpData->GetType(); } return pt; }; // (Inline) Return the shared buffer sSharedBuffer * GetSharedBuffer() const { sSharedBuffer * pRet = 0; if (IsValid() == true) { pRet = mpData; } return pRet; }; // (Inline) Return the timestamp tm GetTimestamp() const { tm ft = EMPTY_TIME; if (IsValid() == true) { ft = mTimestamp; } return ft; }; // (Inline) Is this buffer valid? virtual bool IsValid() const { return mbValid; }; protected: // (Inline) Validate buffer virtual bool Validate() { // Do we have a shared buffer and is it valid? mbValid = (mpData != 0 && mpData->IsValid()); return mbValid; }; /* Our data buffer */ sSharedBuffer * mpData; /* Time buffer was created */ tm mTimestamp; /* Has this buffer been validated? (NOTE: *NOT* set in base) */ bool mbValid; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolEntityFieldEnumerator.h000077500000000000000000000114001455567757300264300ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityFieldEnumerator.h DESCRIPTION: Declaration of cProtocolEntityFieldEnumerator PUBLIC CLASSES AND METHODS: cProtocolEntityFieldEnumerator Class to navigate a protoocl entity, generating a vector of field IDs, i.e. every field referenced by this protocol entity in the exact order it would regularly be found NOTE: This only functions for fixed structures such as NV items Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolEntityNav.h" #include "DB2NavTree.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cProtocolEntityFieldEnumerator /*=========================================================================*/ class cProtocolEntityFieldEnumerator : public cProtocolEntityNav { public: // (Inline) Constructor cProtocolEntityFieldEnumerator( const cCoreDatabase & db, const std::vector & key ) : cProtocolEntityNav( db ), mKey( key ) { // Nothing to do }; // (Inline) Destructor virtual ~cProtocolEntityFieldEnumerator() { // Nothing to do }; // (Inline) Enumerate the fields virtual bool Enumerate() { bool bRC = ProcessEntity( mKey ); return bRC; }; // (Inline) Return fields const std::vector & GetFields() const { return mFields; }; protected: // (Inline) Evaluate the given condition virtual bool EvaluateCondition( LPCSTR /* pCondition */, bool & bResult ) { // All conditions pass bResult = true; return bResult; }; // Return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG /* fieldID */, LONGLONG & val ) { // This should only be called for figuring out array // boundaries (including strings) val = 1; return true; }; // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & /* fieldName */, LONGLONG /* arrayIndex = -1 */ ) { if (pField != 0) { mFields.push_back( pField->mID ); } return true; }; /* Protocol entity being navigated */ std::vector mKey; /* Fields (by ID) */ std::vector mFields; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolEntityNav.cpp000077500000000000000000000642121455567757300244330ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNav.cpp DESCRIPTION: Implementation of cProtocolEntityNav PUBLIC CLASSES AND METHODS: cProtocolEntityNav This calss serves as a base for all class that need to 'navigate' a protocol entity database description. It is necessary in order to seperate the structural aspects from parsing/packing details Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolEntityNav.h" #include "BitParser.h" #include "CoreUtilities.h" #include "DB2NavTree.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Field seperator string LPCSTR PE_NAV_FIELD_SEP = "."; /*=========================================================================*/ // cProtocolEntityNav Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolEntityNav (Public Method) DESCRIPTION: Constructor PARAMETERS: db [ I ] - Database to use bSummaryOnly [ I ] - Only navigate if a format specifier exists? RETURN VALUE: None ===========================================================================*/ cProtocolEntityNav::cProtocolEntityNav( const cCoreDatabase & db ) : mDB( db ), mbFieldNames( true ), mConditions( db.GetOptionalMods() ), mExpressions( db.GetExpressionMods() ), mArrays1( db.GetArray1Mods() ), mArrays2( db.GetArray2Mods() ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolEntityNav (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolEntityNav::~cProtocolEntityNav() { // Nothing to do } /*=========================================================================== METHOD: EvaluateCondition (Internal Method) DESCRIPTION: Evaluate the given condition PARAMETERS: pCondition [ I ] - Condition to evaluate bResult [ O ] - Result of evaluating the condition (true/false) RETURN VALUE: bool : true - We were able to evaluate the condition false - Unable to evaluate condition ===========================================================================*/ bool cProtocolEntityNav::EvaluateCondition( LPCSTR pCondition, bool & bResult ) { // Assume error bool bRC = false; tDB2OptionalModMap::const_iterator pIter; pIter = mConditions.find( pCondition ); if (pIter != mConditions.end()) { const sDB2SimpleCondition & con = pIter->second; // Grab the value for the given field ID LONGLONG valA = 0; bRC = GetLastValue( con.mID, valA ); // Field to field? LONGLONG valB = con.mValue; if (con.mbF2F == true) { // Yes, grab value of the second field bRC &= GetLastValue( (ULONG)con.mValue, valB ); } if (bRC == true) { bResult = sDB2Fragment::EvaluateCondition( valA, con.mOperator, valB ); } else { // We could not find the field used in the condition, this // can either be because of a bad entity (which is ruled // out prior to reaching this point) or the existence of // the field itself is based on another condition. The // former should not happen and the later is not an error bResult = false; bRC = true; } } return bRC; } /*=========================================================================== METHOD: GetArrayBounds (Internal Method) DESCRIPTION: Get the array bounds described by the fragment descriptor PARAMETERS: frag [ I ] - Fragment descriptor arraySz [ O ] - Size of array arrayAdj [ O ] - Adjust for array indices RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::GetArrayBounds( const sDB2Fragment & frag, LONGLONG & arraySz, LONGLONG & arrayAdj ) { // Assume failure bool bRC = false; // Figure out the array size/adjust arraySz = 0; arrayAdj = 0; switch (frag.mModifierType) { case eDB2_MOD_CONSTANT_ARRAY: { tDB2Array1ModMap::const_iterator pIter; pIter = mArrays1.find( frag.mpModifierValue ); if (pIter != mArrays1.end()) { arraySz = (LONGLONG)pIter->second; bRC = true; } } break; case eDB2_MOD_VARIABLE_ARRAY: { tDB2Array1ModMap::const_iterator pIter; pIter = mArrays1.find( frag.mpModifierValue ); if (pIter != mArrays1.end()) { ULONG id = pIter->second; // Now find last occurence of this field ID and grab the value bRC = GetLastValue( id, arraySz ); if (bRC == true) { // It makes no sense to have a negative sized array if (arraySz < 0) { bRC = false; } } } } break; case eDB2_MOD_VARIABLE_ARRAY2: { tDB2Array2ModMap::const_iterator pIter; pIter = mArrays2.find( frag.mpModifierValue ); if (pIter != mArrays2.end()) { ULONG sID = pIter->second.first; ULONG eID = pIter->second.second; LONGLONG s; LONGLONG e; // Now find last occurence of these field IDs and // grab the values bRC = GetLastValue( sID, s ); bRC &= GetLastValue( eID, e ); if (bRC == true) { // It makes no sense to have an negative sized array if (e < s) { bRC = false; } else { arrayAdj = s; arraySz = (e - s) + 1; } } } } break; case eDB2_MOD_VARIABLE_ARRAY3: { tDB2ExpressionModMap::const_iterator pIter; pIter = mExpressions.find( frag.mpModifierValue ); if (pIter != mExpressions.end()) { const sDB2SimpleExpression & expr = pIter->second; // Grab the value for the given field ID LONGLONG valA = 0; bRC = GetLastValue( expr.mID, valA ); // Field to field? LONGLONG valB = expr.mValue; if (expr.mbF2F == true) { // Yes, grab value of the second field bRC &= GetLastValue( (ULONG)expr.mValue, valB ); } if (bRC == true) { bRC = sDB2Fragment::EvaluateExpression( valA, expr.mOperator, valB, arraySz ); // It makes no sense to have a negative sized array if (bRC == true && arraySz < 0) { bRC = false; } } } } break; } return bRC; } /*=========================================================================== METHOD: ModifyStringLength (Internal Method) DESCRIPTION: Modify string length based on existing field value, at the end of this function the field size will be the string length in bits PARAMETERS: frag [ I ] - Fragment descriptor field [ O ] - Field to modify RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ModifyStringLength( const sDB2Fragment & frag, sDB2Field & field ) { // Assume failure bool bRC = false; if (field.mType != eDB2_FIELD_STD) { // Why are we here? ASSERT( 0 ); return false; } if ( (field.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_A) && (field.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_U) && (field.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) ) { // Why are we here? ASSERT( 0 ); return false; } if ( (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) && (field.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) ) { // We can't have the size specified in characters when the // size of the character itself is variable length ASSERT( 0 ); return false; } tDB2Array1ModMap::const_iterator pIter; pIter = mArrays1.find( frag.mpModifierValue ); if (pIter == mArrays1.end()) { // Unable to obtain string length return bRC; } ULONG id = pIter->second; // Now find last occurence of this field ID and grab the value LONGLONG strSz; bRC = GetLastValue( id, strSz ); if (bRC == false || strSz < 0) { // Unable to obtain size or invalid size bRC = false; return bRC; } // Compute character size ULONG charSz = BITS_PER_BYTE; if (field.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U) { charSz *= 2; } if (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) { strSz *= BITS_PER_BYTE; } else if (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) { strSz *= charSz; } if (strSz > ULONG_MAX) { // String length far too large bRC = false; return bRC; } if (strSz != 0) { if (strSz < charSz || (strSz % charSz) != 0) { // String length not a proper multiple of character size bRC = false; return bRC; } } field.mSize = (ULONG)strSz; return bRC; } /*=========================================================================== METHOD: ProcessEntity (Internal Method) DESCRIPTION: Process a protocol entity PARAMETERS: key [ I ] - Key into the protocol entity table RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ProcessEntity( const std::vector & key ) { // Assume failure bool bRC = false; // Look up entity definition const cDB2NavTree * pNavTree = mDB.GetEntityNavTree( key ); // Did we find it? if (pNavTree == 0) { return bRC; } // Is it valid? mEntity = pNavTree->GetEntity(); if (mEntity.IsValid() == false) { // No definition in database return bRC; } // Check if we should continue if (ContinueNavigation() == false) { // Success! bRC = true; return bRC; } // A structure to navigate? if (mEntity.mStructID == -1) { // Success! bRC = true; return bRC; } // Grab navigation fragments const std::list & frags = pNavTree->GetFragments(); // Nothing to navigate? if (frags.size() == 0) { ASSERT( 0 ); return bRC; } // No name? if (mEntity.mpName == 0 || mEntity.mpName[0] == 0) { ASSERT( 0 ); return bRC; } // Grab tracked fields mTrackedFields = pNavTree->GetTrackedFields(); std::string preamble = ""; // Process the initial structure EnterStruct( mEntity.mpName, -1 ); bRC = ProcessStruct( frags.front(), preamble, -1 ); ExitStruct( mEntity.mpName, -1 ); return bRC; } /*=========================================================================== METHOD: ProcessStruct (Internal Method) DESCRIPTION: Process a structure described by the given initial fragment PARAMETERS: pFrag [ I ] - First fragment in structure preamable [ I ] - String to prepend to any field/struct names arrayIndex [ I ] - Array index (-1 = not part of an array) RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ProcessStruct( const sDB2NavFragment * pFrag, const std::string & preamble, LONGLONG /* arrayIndex */ ) { // Assume success bool bRC = true; ULONG structSz = 0; ULONG structOffset = GetOffset(); // Grab current navigation order bool bOldLSB = GetLSBMode(); bool bNewLSB = bOldLSB; // Check for directives if (pFrag != 0) { bool bDirective = false; const sDB2Fragment & frag = *pFrag->mpFragment; if (frag.mFragmentType == eDB2_FRAGMENT_MSB_2_LSB) { bDirective = true; if (bOldLSB == true) { bNewLSB = false; bRC = SetLSBMode( bNewLSB ); } } if (frag.mFragmentType == eDB2_FRAGMENT_LSB_2_MSB) { bDirective = true; if (bOldLSB == false) { bNewLSB = true; bRC = SetLSBMode( bNewLSB ); } } if (bDirective == true) { // We process directives here so move on to the next fragment // upon success if (bRC == true) { pFrag = pFrag->mpNextFragment; } else { pFrag = 0; } } } // Process each fragment in the structure while (pFrag != 0) { bRC = ProcessFragment( pFrag, structOffset, structSz, preamble ); if (bRC == true) { pFrag = pFrag->mpNextFragment; } else { break; } } // Restore navigation order if (bRC == true && bOldLSB != bNewLSB) { bRC = SetLSBMode( bOldLSB ); } return bRC; } /*=========================================================================== METHOD: ProcessFragment (Internal Method) DESCRIPTION: Process the given fragment PARAMETERS: pFrag [ I ] - Fragment to be processed structOffset [ I ] - Offset (from start of payload) of enclosing struct structSize [ I ] - Current size of enclosing struct preamble [ I ] - String to prepend to any field/struct names RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ProcessFragment( const sDB2NavFragment * pFrag, ULONG structOffset, ULONG & structSize, const std::string & preamble ) { // Assume failure bool bRC = false; if (pFrag == 0 || pFrag->mpFragment == 0) { return bRC; } // Grab database fragment const sDB2Fragment & frag = *pFrag->mpFragment; // Is this fragment optional? if (frag.mModifierType == eDB2_MOD_OPTIONAL) { bool bParse = false; bool bOK = EvaluateCondition( frag.mpModifierValue, bParse ); if (bOK == false) { // Error evaluating the condition bRC = false; return bRC; } if (bParse == false) { // Condition not satisfied, nothing to parse bRC = true; return bRC; } } // Is this an array? LONGLONG arraySz = -1; LONGLONG arrayAdj = 0; bool bArray = ModifiedToArray( frag.mModifierType ); if (bArray == true) { bool bOK = GetArrayBounds( frag, arraySz, arrayAdj ); if (bOK == false) { // Error obtaining array dimensions bRC = false; return bRC; } else if (arraySz == 0) { // No array to process bRC = true; return bRC; } } // Set base name std::string baseName = ""; if (mbFieldNames == true) { baseName = preamble; // Add in fragment name? if (frag.mpName != EMPTY_STRING) { if (baseName.size() > 0) { baseName += PE_NAV_FIELD_SEP; } // Yes, add to the preamble baseName += frag.mpName; } } // Is this fragment offset? if (frag.mFragmentOffset != -1) { // Yes, add in offset to structure offset and save ULONG newOffset = frag.mFragmentOffset + structOffset; SetOffset( newOffset ); } // What type of fragment is this? switch (frag.mFragmentType) { case eDB2_FRAGMENT_FIELD: { const sDB2Field * pField = pFrag->mpField; if (pField != 0) { if (mbFieldNames == true) { if (baseName.size() > 0) { baseName += PE_NAV_FIELD_SEP; } // Add in field name baseName += pField->mpName; } // Variable string? sDB2Field modField; if ( (frag.mModifierType == eDB2_MOD_VARIABLE_STRING1) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) ) { modField = *pField; bRC = ModifyStringLength( frag, modField ); if (bRC == false) { // Unable to obtain string length return bRC; } if (modField.mSize == 0) { // String has no length - treat like an optional fragment bRC = true; return bRC; } pField = &modField; } // Handle an array? if (bArray == true) { EnterArray( frag, arraySz ); if (mbFieldNames == true) { ULONG baseLen = baseName.size(); std::string fieldName; fieldName.reserve( baseLen + 16 ); fieldName = baseName; CHAR arraySpec[32]; for (LONGLONG i = 0; i < arraySz; i++) { snprintf( arraySpec, 31, "[%lld]", i + arrayAdj ); fieldName += arraySpec; bRC = ProcessField( pField, fieldName, i ); if (bRC == false) { break; } // Remove the array specifier for the next pass fieldName.resize( baseLen ); } } else { for (LONGLONG i = 0; i < arraySz; i++) { bRC = ProcessField( pField, baseName, i ); if (bRC == false) { break; } } } ExitArray( frag, arraySz ); } else { bRC = ProcessField( pField, baseName ); } } } break; case eDB2_FRAGMENT_STRUCT: { if (pFrag->mpLinkFragment != 0) { // Handle an array? if (bArray == true) { EnterArray( frag, arraySz ); if (mbFieldNames == true) { ULONG baseLen = baseName.size(); std::string structName; structName.reserve( baseLen + 16 ); structName = baseName; CHAR arraySpec[32]; for (LONGLONG i = 0; i < arraySz; i++) { snprintf( arraySpec, 31, "[%lld]", i + arrayAdj ); structName += arraySpec; EnterStruct( frag.mpName, i ); bRC = ProcessStruct( pFrag->mpLinkFragment, structName, i ); ExitStruct( frag.mpName, i ); if (bRC == false) { break; } // Remove the array specifier for the next pass structName.resize( baseLen ); } } else { for (LONGLONG i = 0; i < arraySz; i++) { EnterStruct( frag.mpName, i ); bRC = ProcessStruct( pFrag->mpLinkFragment, baseName, i ); ExitStruct( frag.mpName, i ); if (bRC == false) { break; } } } ExitArray( frag, arraySz ); } else { EnterStruct( frag.mpName, -1 ); bRC = ProcessStruct( pFrag->mpLinkFragment, baseName ); ExitStruct( frag.mpName, -1 ); } } } break; case eDB2_FRAGMENT_CONSTANT_PAD: { // Is the structure is smaller than the specified // value that we are to pad out to? ULONG totalSz = frag.mFragmentValue; if (totalSz >= structSize) { ULONG newOffset = structOffset + totalSz; SetOffset( newOffset ); } // Succcess! bRC = true; } break; case eDB2_FRAGMENT_VARIABLE_PAD_BITS: case eDB2_FRAGMENT_VARIABLE_PAD_BYTES: { // Find last occurence of this field ID and grab the value LONGLONG totalSz = 0; bRC = GetLastValue( frag.mFragmentValue, totalSz ); if (bRC == true) { // Convert to bits? if (frag.mFragmentType == eDB2_FRAGMENT_VARIABLE_PAD_BYTES) { totalSz *= BITS_PER_BYTE; } // Is the structure is smaller than the specified // value that we are to pad out to? if ((ULONG)totalSz >= structSize) { ULONG newOffset = structOffset + (ULONG)totalSz; SetOffset( newOffset ); } } } break; case eDB2_FRAGMENT_FULL_BYTE_PAD: { ULONG totalSz = structSize; while ((totalSz % BITS_PER_BYTE) != 0) { totalSz++; } if (totalSz > structSize) { ULONG newOffset = structOffset + totalSz; SetOffset( newOffset ); } // Succcess! bRC = true; } break; default: bRC = false; break; } // Adjust struct size? if (bRC == true) { ULONG newOffset = GetOffset(); if (newOffset > structOffset) { ULONG newSz = newOffset - structOffset; if (newSz > structSize) { structSize = newSz; } } } return bRC; } /*=========================================================================== METHOD: GetPartialFieldName (Public Method) DESCRIPTION: Return the fully qualified field name given the partial name PARAMETERS: partialName [ I ] - Partial field name RETURN VALUE: std::string ===========================================================================*/ std::string cProtocolEntityNav::GetFullFieldName( const std::string & partialName ) const { std::string retStr = EMPTY_STRING; if (mEntity.mpName != 0 && mEntity.mpName != EMPTY_STRING) { retStr = mEntity.mpName; retStr += PE_NAV_FIELD_SEP; retStr += partialName; } return retStr; } /*=========================================================================== METHOD: GetPartialFieldName (Public Method) DESCRIPTION: Return the partial field name given the fully qualified name PARAMETERS: fieldNameFQ [ I ] - Fully qualified name RETURN VALUE: std::string ===========================================================================*/ std::string cProtocolEntityNav::GetPartialFieldName( const std::string & fieldNameFQ ) const { std::string retStr = EMPTY_STRING; if (mEntity.mpName != 0 && mEntity.mpName != EMPTY_STRING) { int idx = fieldNameFQ.find( mEntity.mpName, 0 ); if (idx == 0) { idx = fieldNameFQ.find( PE_NAV_FIELD_SEP ); if (idx != -1) { retStr = fieldNameFQ.substr( idx - 1 ); } } } return retStr; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolEntityNav.h000077500000000000000000000205321455567757300240750ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNav.h DESCRIPTION: Declaration of cProtocolEntityNav PUBLIC CLASSES AND METHODS: cProtocolEntityNav This class serves as a base for all class that need to 'navigate' a protocol entity database description. It is necessary in order to seperate the structural aspects from parsing/packing details Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- struct sSharedBuffer; struct sDB2NavFragment; // Field seperator string extern LPCSTR PE_NAV_FIELD_SEP; // Types of protocol entity field attributes enum ePENavFieldAttr { ePENAV_FIELD_BEGIN = -1, ePENAV_FIELD_NAME, // Name of field ePENAV_FIELD_NAME_FULL, // Fully qualified name of field ePENAV_FIELD_NAME_PARTIAL, // Partially qualified name of field ePENAV_FIELD_VALUE, // Translated value of field ePENAV_FIELD_VALUE_RAW, // Raw value of field ePENAV_FIELD_TYPE, // Type of field ePENAV_FIELD_SIZE, // Size of field ePENAV_FIELD_OFFSET, // Offset of field ePENAV_FIELD_INDEX, // Index of field ePENAV_FIELD_ID, // ID of field ePENAV_FIELD_END // Number of field attributes }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: Is this a valid ePENavFieldAttr? PARAMETERS: contentType [ I ] - The enum value being validated RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( ePENavFieldAttr attr ) { bool bRC = false; if (attr > ePENAV_FIELD_BEGIN && attr < ePENAV_FIELD_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Class cProtocolEntityNav // Class to navigate a protocol entity /*=========================================================================*/ class cProtocolEntityNav { public: // Constructor cProtocolEntityNav( const cCoreDatabase & db ); // Destructor virtual ~cProtocolEntityNav(); // Return the fully qualified field name given the partial name virtual std::string GetFullFieldName( const std::string & partialName ) const; // Return the partial field name given the fully qualified name virtual std::string GetPartialFieldName( const std::string & fieldNameFQ ) const; protected: // Evaluate the given condition virtual bool EvaluateCondition( LPCSTR pCondition, bool & bResult ); // Get the array bounds described by the fragment descriptor virtual bool GetArrayBounds( const sDB2Fragment & frag, LONGLONG & arraySz, LONGLONG & arrayAdj ); // Return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG fieldID, LONGLONG & val ) = 0; // Modify string length based on existing field value virtual bool ModifyStringLength( const sDB2Fragment & frag, sDB2Field & field ); // Process the protocol entity described by the given key/name virtual bool ProcessEntity( const std::vector & key ); // (Inline) Contiue navigation now that entity has been set? virtual bool ContinueNavigation() { // Override to implement return true; }; // Process a structure described by the given initial fragment virtual bool ProcessStruct( const sDB2NavFragment * pFrag, const std::string & preamble, LONGLONG arrayIndex = -1 ); // Process the given fragment virtual bool ProcessFragment( const sDB2NavFragment * pFrag, ULONG structOffset, ULONG & structSize, const std::string & preamble ); // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG arrayIndex = -1 ) = 0; // (Inline) Handle an array being entered virtual void EnterArray( const sDB2Fragment & /* frag */, LONGLONG /* arraySz */ ) { }; // (Inline) Handle an array being exited virtual void ExitArray( const sDB2Fragment & /* frag */, LONGLONG /* arraySz */ ) { }; // (Inline) Handle a structure being entered virtual void EnterStruct( LPCSTR /* pName */, LONGLONG /* arrayIndex */ ) { }; // (Inline) Handle a structure being exited virtual void ExitStruct( LPCSTR /* pName */, LONGLONG /* arrayIndex */ ) { }; // (Inline) Get current working offset virtual ULONG GetOffset() { // Override to implement return 0; }; // (Inline) Set current working offset virtual bool SetOffset( ULONG /* offset */ ) { // Override to implement return true; }; // (Inline) Get current navigation order virtual bool GetLSBMode() { // Override to implement return true; }; // (Inline) Set current navigation order virtual bool SetLSBMode( bool /* bLSB */ ) { // Override to implement return true; }; /* Generate field name strings? */ bool mbFieldNames; /* Protocol entity being navigated */ sDB2ProtocolEntity mEntity; /* Database reference */ const cCoreDatabase & mDB; /* References to DB tables we need */ const tDB2OptionalModMap & mConditions; const tDB2ExpressionModMap & mExpressions; const tDB2Array1ModMap & mArrays1; const tDB2Array2ModMap & mArrays2; /* Map of all 'tracked' fields */ std::map > mTrackedFields; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolEnum.h000077500000000000000000000163431455567757300230650ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEnum.h DESCRIPTION: Generic protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eProtocolType Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // eProtocolType Enumeration /*=========================================================================*/ enum eProtocolType { ePROTOCOL_ENUM_BEGIN = -1, ePROTOCOL_COMMAND, // 00 Protocol server command ePROTOCOL_AT, // 01 AT command protocol ePROTOCOL_NMEA, // 02 NMEA (GPS) protocol ePROTOCOL_DIAG_RX, // 03 DIAG protocol (incoming) ePROTOCOL_DIAG_TX, // 04 DIAG protocol (outgoing) ePROTOCOL_DOWNLOAD_RX, // 05 Download protocol (incoming) ePROTOCOL_DOWNLOAD_TX, // 06 Download protocol (outgoing) ePROTOCOL_SDOWNLOAD_RX, // 07 Streaming download protocol (incoming) ePROTOCOL_SDOWNLOAD_TX, // 08 Streaming download protocol (outgoing) ePROTOCOL_QDL_RX, // 09 QDL variant of streaming protocol (incoming) ePROTOCOL_QDL_TX, // 10 QDL variant of streaming protocol (outgoing) ePROTOCOL_QMI_CTL_RX, // 11 QMI CTL protocol (incoming) ePROTOCOL_QMI_CTL_TX, // 12 QMI CTL protocol (outgoing) ePROTOCOL_QMI_WDS_RX, // 13 QMI WDS protocol (incoming) ePROTOCOL_QMI_WDS_TX, // 14 QMI WDS protocol (outgoing) ePROTOCOL_QMI_DMS_RX, // 15 QMI DMS protocol (incoming) ePROTOCOL_QMI_DMS_TX, // 16 QMI DMS protocol (outgoing) ePROTOCOL_QMI_NAS_RX, // 17 QMI NAS protocol (incoming) ePROTOCOL_QMI_NAS_TX, // 18 QMI NAS protocol (outgoing) ePROTOCOL_QMI_QOS_RX, // 19 QMI QOS protocol (incoming) ePROTOCOL_QMI_QOS_TX, // 20 QMI QOS protocol (outgoing) ePROTOCOL_QMI_WMS_RX, // 21 QMI WMS protocol (incoming) ePROTOCOL_QMI_WMS_TX, // 22 QMI WMS protocol (outgoing) ePROTOCOL_QMI_PDS_RX, // 23 QMI PDS protocol (incoming) ePROTOCOL_QMI_PDS_TX, // 24 QMI PDS protocol (outgoing) ePROTOCOL_QMI_AUTH_RX, // 25 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AUTH_TX, // 26 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_CAT_RX, // 27 QMI CAT protocol (incoming) ePROTOCOL_QMI_CAT_TX, // 28 QMI CAT protocol (outgoing) ePROTOCOL_QMI_RMS_RX, // 29 QMI RMS protocol (incoming) ePROTOCOL_QMI_RMS_TX, // 30 QMI RMS protocol (outgoing) ePROTOCOL_QMI_OMA_RX, // 31 QMI OMA protocol (incoming) ePROTOCOL_QMI_OMA_TX, // 32 QMI OMA protocol (outgoing) ePROTOCOL_QMI_VOICE_RX, // 33 QMI Voice protocol (incoming) ePROTOCOL_QMI_VOICE_TX, // 34 QMI Voice protocol (outgoing) ePROTOCOL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolType validity check PARAMETERS: pt [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolType pt ) { bool retVal = false; if (pt > ePROTOCOL_ENUM_BEGIN && pt < ePROTOCOL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocol( eProtocolType pt ) { bool retVal = false; if (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_VOICE_TX) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolRX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the incoming direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolRX( eProtocolType pt ) { bool retVal = false; switch (pt) { case ePROTOCOL_QMI_CTL_RX: case ePROTOCOL_QMI_WDS_RX: case ePROTOCOL_QMI_DMS_RX: case ePROTOCOL_QMI_NAS_RX: case ePROTOCOL_QMI_QOS_RX: case ePROTOCOL_QMI_WMS_RX: case ePROTOCOL_QMI_PDS_RX: case ePROTOCOL_QMI_AUTH_RX: case ePROTOCOL_QMI_CAT_RX: case ePROTOCOL_QMI_RMS_RX: case ePROTOCOL_QMI_OMA_RX: case ePROTOCOL_QMI_VOICE_RX: retVal = true; break; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolTX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the outgoing direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolTX( eProtocolType pt ) { bool retVal = false; switch (pt) { case ePROTOCOL_QMI_CTL_TX: case ePROTOCOL_QMI_WDS_TX: case ePROTOCOL_QMI_DMS_TX: case ePROTOCOL_QMI_NAS_TX: case ePROTOCOL_QMI_QOS_TX: case ePROTOCOL_QMI_WMS_TX: case ePROTOCOL_QMI_PDS_TX: case ePROTOCOL_QMI_AUTH_TX: case ePROTOCOL_QMI_CAT_TX: case ePROTOCOL_QMI_RMS_TX: case ePROTOCOL_QMI_OMA_TX: case ePROTOCOL_QMI_VOICE_TX: retVal = true; break; } return retVal; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolLog.cpp000077500000000000000000000133241455567757300232310ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class definition PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolLog.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // The maximum number of in-memory buffers we allow const ULONG MAX_PROTOCOL_BUFFERS = 1024 * 16; /*=========================================================================*/ // cProtocolLog Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolLog (Public Method) DESCRIPTION: Constructor PARAMETERS: maxBuffers [ I ] - Maximum number of buffers to store in the log RETURN VALUE: None ===========================================================================*/ cProtocolLog::cProtocolLog( ULONG maxBuffers ) : mLog( maxBuffers > MAX_PROTOCOL_BUFFERS ? MAX_PROTOCOL_BUFFERS : maxBuffers, true ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolLog (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolLog::~cProtocolLog() { // Empty out the log Clear(); } /*=========================================================================== METHOD: AddBuffer (Public Method) DESCRIPTION: Add an protocol buffer to the end of the log PARAMETERS: buff [ I ] - Protocol buffer to add RETURN VALUE: ULONG - Index of newly added buffer (INVALID_LOG_INDEX upon failure) ===========================================================================*/ ULONG cProtocolLog::AddBuffer( sProtocolBuffer & buf ) { ULONG idx = INVALID_LOG_INDEX; if (buf.IsValid() == false) { return idx; } bool bRC = mLog.AddElement( buf, idx ); if (bRC == false) { idx = INVALID_LOG_INDEX; } return idx; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Return the protocol buffer at the given index from the log PARAMETERS: idx [ I ] - Index of protocol buffer to obtain RETURN VALUE: sProtocolBuffer - Protocol buffer ===========================================================================*/ sProtocolBuffer cProtocolLog::GetBuffer( ULONG idx ) const { sProtocolBuffer buf; mLog.GetElement( idx, buf ); return buf; } /*=========================================================================== METHOD: GetSignalEvent (Public Method) DESCRIPTION: Return the underlying signal event, which will be set when the log is updated. RETURN VALUE: cEvent - Signal event ===========================================================================*/ cEvent & cProtocolLog::GetSignalEvent() const { return mLog.GetSignalEvent(); } /*=========================================================================== METHOD: GetCount (Public Method) DESCRIPTION: Return the total number of buffers added to the log RETURN VALUE: ULONG ===========================================================================*/ ULONG cProtocolLog::GetCount() const { return mLog.GetTotalCount(); } /*=========================================================================== METHOD: Clear (Public Method) DESCRIPTION: Clear the log RETURN VALUE: None ===========================================================================*/ void cProtocolLog::Clear() { mLog.EmptyQueue(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolLog.h000077500000000000000000000070261455567757300227000ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class declaration PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "SyncQueue.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const ULONG INVALID_LOG_INDEX = ULONG_MAX; /*=========================================================================*/ // Class cProtocolLog /*=========================================================================*/ class cProtocolLog { public: // Constructor cProtocolLog( ULONG maxBuffers ); // Destructor virtual ~cProtocolLog(); // Add an protocol buffer to the end of the log virtual ULONG AddBuffer( sProtocolBuffer & buf ); // Return the protocol buffer at the given index from the log virtual sProtocolBuffer GetBuffer( ULONG idx ) const; // Return the underlying signal event virtual cEvent & GetSignalEvent() const; // Return the total number of buffers added to the log virtual ULONG GetCount() const; // Clear the log virtual void Clear(); protected: /* The underlying 'log' */ cSyncQueue mLog; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolNotification.cpp000077500000000000000000000132341455567757300251360ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.cpp DESCRIPTION: Implementation of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolNotification.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cProtocolQueueNotification Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Constructor PARAMETERS: pSQ [ I ] - Sync queue to utilize RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( cSyncQueue * pSQ ) : mpSQ( pSQ ) { // Nothing to do } /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Copy constructor PARAMETERS: notifier [ I ] - Notifier to base the new one on RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( const cProtocolQueueNotification & notifier ) : mpSQ( notifier.mpSQ ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolQueueNotification (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::~cProtocolQueueNotification() { mpSQ = 0; } /*=========================================================================== METHOD: Clone (Public Method) DESCRIPTION: Return an allocated copy of this object downcasted to our base class RETURN VALUE: cProtocolNotification * : Cloned object (0 on error) ===========================================================================*/ cProtocolNotification * cProtocolQueueNotification::Clone() const { cProtocolQueueNotification * pCopy = 0; try { pCopy = new cProtocolQueueNotification( *this ); } catch (...) { // Simply return 0 } return ((cProtocolNotification *)pCopy); } /*=========================================================================== METHOD: Notify (Public Method) DESCRIPTION: Notify view of a protocol event by adding notification structure to the underlying sync queue (which will provide the notification by signalling an event) PARAMETERS: eventType [ I ] - Protocol event type param1 [ I ] - Event type specific argument (see header description) param2 [ I ] - Event type specific argument (see header description) RETURN VALUE: None ===========================================================================*/ void cProtocolQueueNotification::Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const { sProtocolNotificationEvent evt( eventType, param1, param2 ); if (evt.IsValid() == true && mpSQ != 0 && mpSQ->IsValid() == true) { sProtocolNotificationEvent elem( eventType, param1, param2 ); mpSQ->AddElement( elem ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolNotification.h000077500000000000000000000174311455567757300246060ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.h DESCRIPTION: Declaration of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SyncQueue.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- enum eProtocolEventType { ePROTOCOL_EVT_BEGIN = -1, ePROTOCOL_EVT_REQ_ERR, // There was an error sending the request ePROTOCOL_EVT_REQ_SENT, // The request has been sent ePROTOCOL_EVT_RSP_ERR, // There was an error receiving the response ePROTOCOL_EVT_RSP_RECV, // The response has been received ePROTOCOL_EVT_AUX_TU_SENT, // Auxiliary data transmission unit sent ePROTOCOL_EVT_END }; // NOTE: The arguments for each event are currently as follows: // // ePROTOCOL_EVT_REQ_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_REQ_SENT // param1: Request ID // param2: Index of request buffer in associated protocol log // ePROTOCOL_EVT_RSP_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_RSP_RECV // param1: Request ID // param2: Index of response buffer in associated protocol log // // ePROTOCOL_EVT_AUX_TU_SENT // param1: Request ID // param2: Size of transmission unit // NOTE: To handle protoocl events using the Windows notifier add the following // prototype to your Window class header file: // // afx_msg LRESULT OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ); // // Then add an entry to the message map in your Window class source file: // // BEGIN_MESSAGE_MAP( CView, CChildView ) // ON_MESSAGE( PROTOCOL_WM_BASE + (ULONG)ePROTOCOL_EVT_XXX, OnProtocolEvent ) // END_MESSAGE_MAP() // // Finally write the handler itself: // // LRESULT CView::OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ) // { // Do something // return 0; // } /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolEventType validity check PARAMETERS: evtType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolEventType evtType ) { bool bRC = false; if (evtType > ePROTOCOL_EVT_BEGIN && evtType < ePROTOCOL_EVT_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Struct sProtocolNotificationEvent /*=========================================================================*/ struct sProtocolNotificationEvent { public: // (Inline) Default constructor (results in invalid object) sProtocolNotificationEvent() : mEventType( ePROTOCOL_EVT_BEGIN ), mParam1( 0 ), mParam2( 0 ) { // Nothing to do }; // (Inline) Parameter constructor sProtocolNotificationEvent( eProtocolEventType eventType, DWORD param1, DWORD param2 ) : mEventType( eventType ), mParam1( param1 ), mParam2( param2 ) { // Nothing to do }; // (Inline) Is this object valid? bool IsValid() { return ::IsValid( mEventType ); } /* Event type */ eProtocolEventType mEventType; /* First parameter (see above) */ DWORD mParam1; /* Second parameter (see above) */ DWORD mParam2; }; /*=========================================================================*/ // Class cProtocolNotification // // This abstract base class provides notification of protocol server // events sent from the protocol server to protocol server clients /*=========================================================================*/ class cProtocolNotification { public: // Return an allocated copy of this object virtual cProtocolNotification * Clone() const = 0; // Notify view of a protocol event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const = 0; }; /*=========================================================================*/ // Class cProtocolQueueNotification // // This class provides notification via a cSyncQueue object // populated with sProtocolNotificationEvent objects /*=========================================================================*/ class cProtocolQueueNotification : public cProtocolNotification { public: // Constructor cProtocolQueueNotification( cSyncQueue * pSQ ); // Copy constructor cProtocolQueueNotification( const cProtocolQueueNotification & notifier ); // Destructor virtual ~cProtocolQueueNotification(); // Return a copy of this object virtual cProtocolNotification * Clone() const; // Notify view of a MIS event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const; protected: /* Event notification queue */ mutable cSyncQueue * mpSQ; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolRequest.cpp000077500000000000000000000177471455567757300241550ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.cpp DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolRequest.h" #include "ProtocolNotification.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout const ULONG DEFAULT_REQ_TIMEOUT = 1000; // Minimum and maximum allowable timeout values (in milliseconds) const ULONG MIN_REQ_TIMEOUT = 100; const ULONG MAX_REQ_TIMEOUT = 300000; // Minimum number of attempts a request can be scheduled for const ULONG MIN_REQ_ATTEMPTS = 1; // Value to indicate that a request is to be sent out indefinately const ULONG INFINITE_REQS = 0xFFFFFFFF; // Minimum/default amount of time between repeated requests (in milliseconds) const ULONG MIN_REQ_FREQUENCY = 10; const ULONG DEFAULT_REQ_FREQUENCY = 100; /*=========================================================================*/ // sProtocolRequest Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) schedule [ I ] - When (from now, in milliseconds) to send the first request, this isn't a hard value as the request is only guaranteed to go out after this time elapses timeout [ I ] - Milliseconds to wait for a response to an individual request before declaring a timeout. Regardless of what is passed in the timeout value used will be between MIN/MAX_REQ_TIMEOUT requests [ I ] - Number of request attempts to make, this isn't a retry count rather this value is used to specify repeating requests. Regardless of what is passed in the requests value used will be at least MIN_REQ_ATTEMPTS frequency [ I ] - If the 'requests' value is greater than the MIN_REQ_ATTEMPTS than this represents the amount of time to wait between requests (from the completion of the last request attempt, in milliseconds), again this isn't a hard value. Regardless of what is passed in the frequency value used will be at least MIN_REQ_FREQUENCY pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule, ULONG timeout, ULONG requests, ULONG frequency, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( schedule ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( 0 ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Constrain requested timeout to allowable range if (timeout < MIN_REQ_TIMEOUT) { timeout = MIN_REQ_TIMEOUT; } if (timeout > MAX_REQ_TIMEOUT) { timeout = MAX_REQ_TIMEOUT; } mTimeout = timeout; // Constrain request attempts if (requests >= MIN_REQ_ATTEMPTS) { mRequests = requests; } // Constrain frequency if (frequency >= MIN_REQ_FREQUENCY) { mFrequency = frequency; } // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor (notification with defaults) PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( 0 ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( pNotifier ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Copy constructor PARAMETERS: req [ I ] - Request to copy RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( const sProtocolRequest & req ) : sProtocolBuffer( req ), mSchedule( req.mSchedule ), mTimeout( req.mTimeout ), mRequests( req.mRequests ), mFrequency( req.mFrequency ), mpNotifier( 0 ), mpAuxData( req.mpAuxData ), mAuxDataSize( req.mAuxDataSize ), mbTXOnly( req.mbTXOnly ) { // Clone notifier? if (req.mpNotifier != 0) { mpNotifier = req.mpNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: ~sProtocolRequest DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolRequest::~sProtocolRequest() { // Delete cloned notifier? if (mpNotifier != 0) { delete mpNotifier; mpNotifier = 0; } } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolRequest.h000077500000000000000000000146261455567757300236130ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.h DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing protocol requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolNotification; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout extern const ULONG DEFAULT_REQ_TIMEOUT; // Minimum and maximum allowable timeout values (in milliseconds) extern const ULONG MIN_REQ_TIMEOUT; extern const ULONG MAX_REQ_TIMEOUT; // Minimum number of attempts a request can be scheduled for extern const ULONG MIN_REQ_ATTEMPTS; // Value to indicate that a request is to be sent out indefinately extern const ULONG INFINITE_REQS; // Minimum/default amount of time between repeated requests (in milliseconds) extern const ULONG MIN_REQ_FREQUENCY; extern const ULONG DEFAULT_REQ_FREQUENCY; /*=========================================================================*/ // Struct sProtocolRequest // // Structure to represent a generic request packet, including all the // information needed to schedule the request, send the request, and // (optionally) reschedule the request for another TX/RX attempt // // The default parameters schedule an immediate request (indicated by // passing in '0' for the schedule parameter) to be sent once with // the default timeout value /*=========================================================================*/ struct sProtocolRequest : public sProtocolBuffer { public: // Parameterized constructor sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule = 0, ULONG timeout = DEFAULT_REQ_TIMEOUT, ULONG requests = MIN_REQ_ATTEMPTS, ULONG frequency = DEFAULT_REQ_FREQUENCY, cProtocolNotification * pNotifier = 0 ); // Parameterized constructor (notification with defaults) sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ); // Copy constructor sProtocolRequest( const sProtocolRequest & req ); // Destructor virtual ~sProtocolRequest(); // (Inline) Get schedule value (value is in milliseconds) ULONG GetSchedule() const { return mSchedule; }; // (Inline) Get timeout value ULONG GetTimeout() const { return mTimeout; }; // (Inline) Get requests value ULONG GetRequests() const { return mRequests; }; // (Inline) Get frequency value (value is in milliseconds) ULONG GetFrequency() const { return mFrequency; }; const cProtocolNotification * GetNotifier() const { return mpNotifier; }; // (Inline) Set auxiliary data void SetAuxiliaryData( const BYTE * pData, ULONG dataSz ) { mpAuxData = pData; mAuxDataSize = dataSz; }; // (Inline) Get auxiliary data const BYTE * GetAuxiliaryData( ULONG & dataSz ) const { dataSz = mAuxDataSize; return mpAuxData; }; // (Inline) Set TX only flag void SetTXOnly() { mbTXOnly = true; }; // (Inline) Get TX only flag bool IsTXOnly() const { return mbTXOnly; }; protected: /* Schedule (approximately when to send the initial request) */ ULONG mSchedule; /* Timeout value for receiving a response */ ULONG mTimeout; /* Number of requests to schedule (must be at least one) */ ULONG mRequests; /* Frequency (approximately how long to wait before next request) */ ULONG mFrequency; /* Notification object */ cProtocolNotification * mpNotifier; /* Auxiliary data */ const BYTE * mpAuxData; /* Auxilary data size */ ULONG mAuxDataSize; /* TX only (i.e. do not wait for a response) ? */ bool mbTXOnly; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolServer.cpp000077500000000000000000001325161455567757300237630ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.cpp DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolServer.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID const ULONG INVALID_REQUEST_ID = 0; // Default activity timeout value const ULONG DEFAULT_WAIT = 100; // MTU (Maximum Transmission Unit) for auxiliary data (QC USB imposed) const ULONG MAX_AUX_MTU_SIZE = 1024 * 256; // USB's MaxPacketSize const ULONG MAX_PACKET_SIZE = 512; // Maximum amount of time to wait on external access synchronization object #ifdef DEBUG // For the sake of debugging do not be so quick to assume failure const ULONG DEADLOCK_TIME = 180000; #else const ULONG DEADLOCK_TIME = 10000; #endif // Maximum amount of time to wait for the protocol server to process a command const ULONG COMMAND_TIME = DEADLOCK_TIME; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ScheduleThread (Free Method) DESCRIPTION: Watch schedule for event to process or timeout PARAMETERS: pArg [ I ] - The protocol server object RETURN VALUE: void * - thread exit value (always NULL) ===========================================================================*/ void * ScheduleThread( PVOID pArg ) { // Do we have a server? cProtocolServer * pServer = (cProtocolServer *)pArg; if (pServer == 0) { TRACE( "ScheduleThread started with empty pArg." " Unable to locate cProtocolServer\n" ); ASSERT( 0 ); return NULL; } TRACE( "Schedule thread [%lu] started\n", pthread_self() ); // Default wait event timespec toTime = TimeIn( DEFAULT_WAIT ); // Return value checking int nRet; while (pServer->mbExiting == false) { DWORD nTemp; nRet = pServer->mThreadScheduleEvent.Wait( TimeFromNow( toTime ), nTemp ); if (nRet != 0 && nRet != ETIME) { // Error condition TRACE( "ScheduleThread [%lu] ScheduleThread wait error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Time to exit? if (pServer->mbExiting == true) { break; } // Get Schedule Mutex (non-blocking) nRet = pthread_mutex_trylock( &pServer->mScheduleMutex ); if (nRet == EBUSY) { // Not an error, we're just too slow // Someone else got to the ScheduleMutex before us // We'll wait for the signal again toTime = TimeIn( DEFAULT_WAIT ); TRACE( "ScheduleThread [%lu] unable to lock ScheduleMutex\n", pthread_self() ); continue; } else if (nRet != 0) { // Error condition TRACE( "ScheduleThread [%lu] mScheduleMutex error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Verify time. In the rare event it does move backward // it would simply place all our schedule items as due now pServer->CheckSystemTime(); // Default next wait period toTime = TimeIn( DEFAULT_WAIT ); timespec curTime = TimeIn( 0 ); if (pServer->mpActiveRequest != 0) { if (pServer->mpActiveRequest->mbWaitingForResponse == true) { // Waiting on a response, this takes priority over the next // scheduled event // Has timeout expired? if (pServer->mActiveRequestTimeout <= curTime) { // Response timeout // Note: This may clear mpActiveRequest pServer->RxTimeout(); } else { // Active response timer is not yet due to expire // Default timeout again, or this response's timeout? if (pServer->mActiveRequestTimeout <= toTime) { toTime = pServer->mActiveRequestTimeout; } } } else { // This should never happen TRACE( "ScheduleThread() Sequencing error: " "Active request %lu is not waiting for response ???\n", pServer->mpActiveRequest->mID ); break; } } if (pServer->mpActiveRequest == 0 && pServer->mRequestSchedule.size() > 0) { // No response timer active, ready to start the next // scheduled item if due timespec scheduledItem = pServer->GetNextRequestTime(); // Is item due to be scheduled? if (scheduledItem <= curTime) { // Process scheduled item pServer->ProcessRequest(); } else { // Scheduled item is not yet due to be processed // Default timeout again, or this item's start time? if (scheduledItem <= toTime) { toTime = scheduledItem; } } } /*TRACE( "Updated timer at %llu waiting %lu\n", GetTickCount(), TimeFromNow( toTime ) ); */ // Unlock schedule mutex nRet = pthread_mutex_unlock( &pServer->mScheduleMutex ); if (nRet != 0) { TRACE( "ScheduleThread Unable to unlock schedule mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } TRACE( "Schedule thread [%lu] exited\n", pthread_self() ); return NULL; } /*=========================================================================== METHOD: TimeIn (Free Method) DESCRIPTION: Fill timespec with the time it will be in specified milliseconds Relative time to Absolute time PARAMETERS: millis [ I ] - Milliseconds from current time RETURN VALUE: timespec - resulting time (from epoc) NOTE: tv_sec of 0 is an error ===========================================================================*/ timespec TimeIn( ULONG millis ) { timespec outTime; int nRC = clock_gettime( CLOCK_REALTIME, &outTime ); if (nRC == 0) { // Add avoiding an overflow on (long)nsec outTime.tv_sec += millis / 1000l; outTime.tv_nsec += ( millis % 1000l ) * 1000000l; // Check if we need to carry if (outTime.tv_nsec >= 1000000000l) { outTime.tv_sec += outTime.tv_nsec / 1000000000l; outTime.tv_nsec = outTime.tv_nsec % 1000000000l; } } else { outTime.tv_sec = 0; outTime.tv_nsec = 0; } return outTime; } /*=========================================================================== METHOD: TimeFromNow (Free Method) DESCRIPTION: Find the milliseconds from current time this timespec will occur Absolute time to Relative time PARAMETERS: time [ I ] - Absolute time RETURN VALUE: Milliseconds in which absolute time will occur 0 if time has passed or error has occured ===========================================================================*/ ULONG TimeFromNow( timespec time ) { // Assume failure ULONG nOutTime = 0; timespec now; int nRC = clock_gettime( CLOCK_REALTIME, &now ); if (nRC == -1) { TRACE( "Error %d with gettime, %s\n", errno, strerror( errno ) ); return nOutTime; } if (time <= now) { return nOutTime; } nOutTime = (time.tv_sec - now.tv_sec) * 1000l; nOutTime += (time.tv_nsec - now.tv_nsec) / 1000000l; return nOutTime; } /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime = TimeIn( 0 ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================*/ // cProtocolServerRxCallback Methods /*=========================================================================*/ /*=========================================================================== METHOD: IOComplete (Free Method) DESCRIPTION: The I/O has been completed, process the results PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Bytes received during operation RETURN VALUE: None ===========================================================================*/ void cProtocolServerRxCallback::IOComplete( DWORD status, DWORD bytesReceived ) { if (mpServer != 0) { mpServer->RxComplete( status, bytesReceived ); } } /*=========================================================================*/ // cProtocolServer::sProtocolReqRsp Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Constructor PARAMETERS: requestInfo [ I ] - Underlying request object requestID [ I ] - Request ID auxDataMTU [ I ] - MTU (Maximum Transmission Unit) for auxiliary data RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ) : mRequest( requestInfo ), mID( requestID ), mAttempts( 0 ), mEncodedSize( requestInfo.GetSize() ), mRequiredAuxTxs( 0 ), mCurrentAuxTx( 0 ), mbWaitingForResponse( false ) { ULONG auxDataSz = 0; const BYTE * pAuxData = requestInfo.GetAuxiliaryData( auxDataSz ); // Compute the number of required auxiliary data transmissions? if (auxDataMTU > 0 && pAuxData != 0 && auxDataSz > 0) { mRequiredAuxTxs = 1; if (auxDataSz > auxDataMTU) { mRequiredAuxTxs = auxDataSz / auxDataMTU; if ((auxDataSz % auxDataMTU) != 0) { mRequiredAuxTxs++; } } } } /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Coop constructor PARAMETERS: reqRsp [ I ] - Object being copied RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolReqRsp & reqRsp ) : mRequest( reqRsp.mRequest ), mID( reqRsp.mID ), mAttempts( reqRsp.mAttempts ), mEncodedSize( reqRsp.mEncodedSize ), mRequiredAuxTxs( reqRsp.mRequiredAuxTxs ), mCurrentAuxTx( reqRsp.mCurrentAuxTx ), mbWaitingForResponse( reqRsp.mbWaitingForResponse ) { // Nothing to do }; /*=========================================================================*/ // cProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : mComm(), mRxCallback(), mScheduleThreadID( 0 ), mThreadScheduleEvent(), mbExiting( false ), mpServerControl( 0 ), mLastRequestID( 1 ), mpActiveRequest( 0 ), mpRxBuffer( 0 ), mRxBufferSize( bufferSzRx ), mRxType( rxType ), mTxType( txType ), mLog( logSz ) { mLastTime = TimeIn( 0 ); // Allocate receive buffer? if (mRxBufferSize > 0 && mComm.IsValid() == true) { mpRxBuffer = new BYTE[mRxBufferSize]; } // Before continuing verify receive buffer was allocated if (mpRxBuffer != 0) { // Schedule mutex int nRet = pthread_mutex_init( &mScheduleMutex, NULL ); if (nRet != 0) { TRACE( "Unable to init schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } } } /*=========================================================================== METHOD: ~cProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::~cProtocolServer() { // This should have already been called, but ... Exit(); // Schedule mutex int nRet = pthread_mutex_destroy( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to destroy schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); } // Free receive buffer if (mpRxBuffer != 0) { delete [] mpRxBuffer; mpRxBuffer = 0; } } /*=========================================================================== METHOD: HandleRemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request Note: if a request is being processed, it cannot be inturrupted PARAMETERS: reqID [ I ] - Server assigned request ID SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::HandleRemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Find and erase request from request map std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); if (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } mRequestMap.erase( pReqIter ); // Success! bRC = true; // Find and erase request from schedule bool bFound = false; int entryIndex = -1; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { entryIndex++; tSchedule entry = *pScheduleIter; if (entry.second == reqID) { bFound = true; mRequestSchedule.erase( pScheduleIter ); break; } else { pScheduleIter++; } } // Note: schedule will be updated when mutex is unlocked/signaled } else if (mpActiveRequest != 0 && mpActiveRequest->mID == reqID) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Cancel the response timer (when active) if (mpActiveRequest->mbWaitingForResponse == true) { // Schedule will be updated when mutex is unlocked // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)reqID, ECANCELED ); } } else { // This is the active request, cancel the underlying transmit // Note: Because ProcessRequest and RemoveRequest are both muxed // with ScheduleMutex, it is impossible to for the write // to actually be in progress when this code is reached. mComm.CancelTx(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, ECANCELED ); } } // Now delete the request delete mpActiveRequest; mpActiveRequest = 0; // Success! bRC = true; } else { TRACE( "cProtocolServer::RemoveRequest( %lu )," " invalid request ID\n", reqID ); } return bRC; } /*=========================================================================== METHOD: ScheduleRequest (Internal Method) DESCRIPTION: Schedule a request for transmission PARAMETERS: reqID [ I ] - ID of the request being scheduled this ID must exist in the internal request/schedule maps schedule [ I ] - Value in milliseconds that indicates the approximate time from now that the request is to be sent out, the actual time that the request is sent will be greater than or equal to this value dependant on requests scheduled before the request in question and standard server processing time SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ScheduleRequest( ULONG reqID, ULONG schedule ) { // Assume failure bool bRC = false; // Schedule adjust is in milliseconds timespec schTimer = TimeIn( schedule ); // Create the schedule entry tSchedule newEntry( schTimer, reqID ); // Fit this request into the schedule (ordered by scheduled time) mRequestSchedule.insert( newEntry ); // Note: timer will be updated when mScheduleMutex is unlocked return bRC; } /*=========================================================================== METHOD: RescheduleActiveRequest (Internal Method) DESCRIPTION: Reschedule (or cleanup) the active request SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RescheduleActiveRequest() { // Are there more attempts to be made? if (mpActiveRequest->mAttempts < mpActiveRequest->mRequest.GetRequests()) { // Yes, first reset the request mpActiveRequest->Reset(); // Now add it back to the request map mRequestMap[mpActiveRequest->mID] = mpActiveRequest; TRACE( "RescheduleActiveRequest(): req %lu rescheduled\n", mpActiveRequest->mID ); // Lastly reschedule the request ScheduleRequest( mpActiveRequest->mID, mpActiveRequest->mRequest.GetFrequency() ); } else { TRACE( "RescheduleActiveRequest(): req %lu removed\n", mpActiveRequest->mID ); // No, we are through with this request delete mpActiveRequest; } // There is no longer an active request mpActiveRequest = 0; } /*=========================================================================== METHOD: ProcessRequest (Internal Method) DESCRIPTION: Process a single outgoing protocol request, this consists of removing the request ID from the head of the schedule, looking up the internal request object in the request map, sending out the request, and setting up the response timer (if a response is required) SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: ===========================================================================*/ void cProtocolServer::ProcessRequest() { // Is there already an active request? if (mpActiveRequest != 0) { return; } // Grab request ID from the schedule std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); // Did we find the request? if (pScheduleIter == mRequestSchedule.end()) { // No return; } // Yes, grab the request ID ULONG reqID = pScheduleIter->second; // Remove from schedule mRequestSchedule.erase( pScheduleIter ); // Look up the internal request object std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); // Request not found around? if (pReqIter == mRequestMap.end() || pReqIter->second == 0) { // No return; } // Set this request as the active request mpActiveRequest = pReqIter->second; TRACE( "ProcessRequest(): req %lu started\n", mpActiveRequest->mID ); // Remove request from pending request map mRequestMap.erase( pReqIter ); // Extract the underlying request const sProtocolRequest & req = mpActiveRequest->mRequest; // Increment attempt count? if (req.GetRequests() != INFINITE_REQS) { // This request isn't an indefinite one, so keep track of each attempt mpActiveRequest->mAttempts++; } bool bTxSuccess = false; // Encode data for transmission? bool bEncoded = false; sSharedBuffer * pEncoded = 0; pEncoded = EncodeTxData( req.GetSharedBuffer(), bEncoded ); if (bEncoded == false) { // Note: no longer asynchronus // Send the request data bTxSuccess = mComm.TxData( req.GetBuffer(), req.GetSize() ); } else if (bEncoded == true) { if (pEncoded != 0 && pEncoded->IsValid() == true) { // Note: no longer asynchronus // Send the request data mpActiveRequest->mEncodedSize = pEncoded->GetSize(); bTxSuccess = mComm.TxData( pEncoded->GetBuffer(), pEncoded->GetSize() ); } } if (bTxSuccess == true) { TRACE( "ProcessRequest(): req %lu finished\n", mpActiveRequest->mID ); TxComplete(); } else { TxError(); TRACE( "ProcessRequest(): req finished with a TxError\n" ); } return; } /*=========================================================================== METHOD: CheckSystemTime (Internal Method) DESCRIPTION: Check that system time hasn't moved backwards. Since we use the system time for scheduling requests we need to periodically check that the user (or system itself) hasn't reset system time backwards, if it has then we reschedule everything to the current system time. This disrupts the schedule but avoids stranding requests Updates mLastTime SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool: System time moved backwards? ===========================================================================*/ bool cProtocolServer::CheckSystemTime() { // Assume that time is still marching forward bool bAdjust = false; timespec curTime = TimeIn( 0 ); if (curTime < mLastTime) { // Looks like the system clock has been adjusted to an earlier // value, go through the current schedule and adjust each timer // to reflect the adjustment. This isn't an exact approach but // it prevents requests from being stranded which is our goal // Note: set iterators are constant. This means we need to // create a set with the new data, we can't modify this one std::set < tSchedule, std::less > tempSchedule; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { tSchedule entry = *pScheduleIter; entry.first.tv_sec = curTime.tv_sec; entry.first.tv_nsec = curTime.tv_nsec; tempSchedule.insert( entry ); pScheduleIter++; } mRequestSchedule = tempSchedule; // Update mActiveRequestTimeout if ( (mpActiveRequest != 0) && (mpActiveRequest->mbWaitingForResponse == true) ) { // Restart active request's timeout ULONG mTimeout = mpActiveRequest->mRequest.GetTimeout(); mActiveRequestTimeout = TimeIn( mTimeout ); } TRACE( "Time has moved backwards, schedule updated\n" ); // Indicate the change bAdjust = true; } mLastTime.tv_sec = curTime.tv_sec; mLastTime.tv_nsec = curTime.tv_nsec; return bAdjust; } /*=========================================================================== METHOD: RxComplete (Internal Method) DESCRIPTION: Handle completion of receive data operation PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Number of bytes received SEQUENCING: This method is sequenced according to the schedule mutex i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxComplete( DWORD status, DWORD bytesReceived ) { if (status != NO_ERROR) { TRACE( "cProtocolServer::RxComplete() = %lu\n", status ); } // Error with the read if (status != NO_ERROR || bytesReceived == 0) { // Setup the next read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); return; } // Get Schedule Mutex if (GetScheduleMutex() == false) { TRACE( "RxComplete(), unable to get schedule Mutex\n" ); return; } TRACE( "RxComplete() - Entry at %llu\n", GetTickCount() ); // Decode data bool bAbortTx = false; ULONG rspIdx = INVALID_LOG_INDEX; bool bRsp = DecodeRxData( bytesReceived, rspIdx, bAbortTx ); // Is there an active request that needs to be aborted if (mpActiveRequest != 0 && bAbortTx == true) { // Yes, terminate the transmission and handle the error mComm.CancelTx(); TxError(); } // Is there an active request and a valid response? else if (mpActiveRequest != 0 && bRsp == true) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client that response was received if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_RECV, (DWORD)mpActiveRequest->mID, (DWORD)rspIdx ); } // Reschedule request as needed RescheduleActiveRequest(); } // Setup the next read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); TRACE( "RxComplete() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return; } return; } /*=========================================================================== METHOD: RxTimeout (Internal Method) DESCRIPTION: Handle the response timer expiring SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxTimeout() { // No active request? if (mpActiveRequest == 0) { TRACE( "RxTimeout() with no active request\n" ); ASSERT( 0 ); } TRACE( "RxTimeout() for req %lu\n", mpActiveRequest->mID ); const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)mpActiveRequest->mID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: TxComplete (Internal Method) DESCRIPTION: Handle completion of transmit data operation PARAMETERS: SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxComplete() { // No active request? if (mpActiveRequest == 0) { TRACE( "TxComplete() called with no active request\n" ); ASSERT( 0 ); } TRACE( "TxComplete() req %lu started\n", mpActiveRequest->mID ); ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client of auxiliary data being sent? if (mpActiveRequest->mRequiredAuxTxs && mpActiveRequest->mCurrentAuxTx) { pNotifier->Notify( ePROTOCOL_EVT_AUX_TU_SENT, (DWORD)reqID, (DWORD)mpActiveRequest->mEncodedSize ); } // Check for more auxiliary data to transmit if (mpActiveRequest->mCurrentAuxTx < mpActiveRequest->mRequiredAuxTxs) { ULONG auxDataSz = 0; const BYTE * pAuxData = req.GetAuxiliaryData( auxDataSz ); if (auxDataSz > 0 && pAuxData != 0) { bool bRC = false; // Adjust for current MTU pAuxData += (mpActiveRequest->mCurrentAuxTx * MAX_AUX_MTU_SIZE); mpActiveRequest->mCurrentAuxTx++; // Last MTU? if (mpActiveRequest->mCurrentAuxTx == mpActiveRequest->mRequiredAuxTxs) { // More than one MTU? if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = (auxDataSz % MAX_AUX_MTU_SIZE); if (auxDataSz == 0) { auxDataSz = MAX_AUX_MTU_SIZE; } } if (auxDataSz % MAX_PACKET_SIZE == 0) { // If last write of unframed write request is divisible // by 512, break off last byte and send seperatly. TRACE( "TxComplete() Special case, break off last byte\n" ); bRC = mComm.TxData( pAuxData, auxDataSz - 1 ); if (bRC == true) { bRC = mComm.TxData( pAuxData + auxDataSz -1, 1 ); } } else { bRC = mComm.TxData( pAuxData, auxDataSz ); } } else if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = MAX_AUX_MTU_SIZE; bRC = mComm.TxData( pAuxData, auxDataSz ); } if (bRC == true) { mpActiveRequest->mEncodedSize = auxDataSz; TxComplete(); } else { TxError(); } return; } } // Another successful transmission, add the buffer to the log ULONG reqIdx = INVALID_LOG_INDEX; sProtocolBuffer pb( req.GetSharedBuffer() ); reqIdx = mLog.AddBuffer( pb ); // Notify client? if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_SENT, (DWORD)reqID, (DWORD)reqIdx ); } // Wait for a response? if (mpActiveRequest->mRequest.IsTXOnly() == false) { // We now await the response mpActiveRequest->mbWaitingForResponse = true; mActiveRequestTimeout = TimeIn( mpActiveRequest->mRequest.GetTimeout() ); } else { // Reschedule request as needed RescheduleActiveRequest(); } } /*=========================================================================== METHOD: TxError (Internal Method) DESCRIPTION: Handle transmit data operation error be either rescheduling the request or cleaning it up SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxError() { // No active request? if (mpActiveRequest == 0) { return; } ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the protocol server by starting up the schedule thread SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Initialize() { // Assume failure bool bRC = false; mbExiting = false; // Get mScheduleMutex if (GetScheduleMutex() == true) { if (mScheduleThreadID == 0) { // Yes, start thread int nRet = pthread_create( &mScheduleThreadID, NULL, ScheduleThread, this ); if (nRet == 0) { // Success! bRC = true; } } } else { TRACE( "cProtocolServer::Initialize(), unable to aquire ScheduleMutex\n" ); return false; } // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit the protocol server by exiting the schedule thread (if necessary) SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Exit() { // Assume failure bool bRC = false; if (mScheduleThreadID != 0) { if (GetScheduleMutex() == false) { // This should never happen return false; } // Set exit event mbExiting = true; // Signal a schedule update if (mThreadScheduleEvent.Set( 1 ) != 0) { // This should never happen return false; } TRACE( "Joining ScheduleThread\n" ); // Allow process to continue until it finishes int nRet = pthread_join( mScheduleThreadID, NULL ); if (nRet == ESRCH) { TRACE( "ScheduleThread has exited already\n" ); } else if (nRet != 0) { TRACE( "Unable to join ScheduleThread. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } TRACE( "cProtocolServer::Exit(), completed thread %lu\n", (ULONG)mScheduleThreadID ); bRC = true; // Release "handle" mScheduleThreadID = 0; // Release mutex lock, don't signal ScheduleThread if (ReleaseScheduleMutex( false ) == false) { // This should never happen return false; } } else { // No ScheduleThread bRC = true; } // Free any allocated requests std::map ::iterator pReqIter; pReqIter = mRequestMap.begin(); while (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } pReqIter++; } mRequestMap.clear(); // Free log mLog.Clear(); return bRC; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the given communications port PARAMETERS: pPort [ I ] - String pointer representing the device node to connect to (IE: /dev/qcqmi0) SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Connect( LPCSTR pPort ) { // Assume failure bool bRC = false; if (pPort == 0 || pPort[0] == 0) { return bRC; } // Connect to device // Set callback mRxCallback.SetServer( this ); // Override to initialize port with protocol specific options bRC = mComm.Connect( pPort ); if (bRC == true) { bRC = InitializeComm(); if (bRC == true) { // Setup the initial read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); } } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current communications port SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Disconnect() { // Disconnect // Cancel any outstanding I/O mComm.CancelIO(); // Empty callback mRxCallback.SetServer( 0 ); // Cleanup COM port CleanupComm(); // Now disconnect return mComm.Disconnect(); } /*=========================================================================== METHOD: IsConnected (Public Method) DESCRIPTION: Are we currently connected to a port? SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::IsConnected() { return mComm.IsConnected(); } /*=========================================================================== METHOD: AddRequest (Public Method) DESCRIPTION: Add an outgoing protocol request to the protocol server request queue PARAMETERS: req [ I ] - Request being added SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: ULONG - ID of scheduled request (INVALID_REQUEST_ID upon error) ===========================================================================*/ ULONG cProtocolServer::AddRequest( const sProtocolRequest & req ) { // Assume failure ULONG reqID = INVALID_REQUEST_ID; // Server not configured for sending requests? if (IsValid( mTxType ) == false) { return reqID; } // Request type not valid for server? if (req.GetType() != mTxType) { return reqID; } // Invalide request? if (ValidateRequest( req ) == false) { return reqID; } // Get mScheduleMutex if (GetScheduleMutex() == true) { TRACE( "AddRequest() - Entry at %llu\n", GetTickCount() ); // Grab next available request ID if (++mLastRequestID == 0) { mLastRequestID++; } reqID = mLastRequestID; while (mRequestMap.find( reqID ) != mRequestMap.end()) { reqID++; } // Wrap in our internal structure sProtocolReqRsp * pReqRsp = 0; pReqRsp = new sProtocolReqRsp( req, reqID, MAX_AUX_MTU_SIZE ); if (pReqRsp != 0) { // Add to request map mRequestMap[reqID] = pReqRsp; // ... and schedule ScheduleRequest( reqID, req.GetSchedule() ); } TRACE( "AddRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return INVALID_REQUEST_ID; } } else { TRACE( "cProtocolServer::AddRequest(), unable to get schedule Mutex\n" ); } return reqID; } /*=========================================================================== METHOD: RemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes Note: If a request is being written, it cannot be inturrupted as both ProcessRequest and RemoveRequest depend on the ScheduleMutex and the write is synchronus. If the request has been written but the read has not been triggered it can be removed. PARAMETERS: reqID [ I ] - ID of request being removed RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::RemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Get Schedule Mutex if (GetScheduleMutex() == true) { TRACE( "RemoveRequest() - Entry at %llu\n", GetTickCount() ); bRC = HandleRemoveRequest( reqID ); TRACE( "RemoveRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } } else { TRACE( "cProtocolServer::RemoveRequest(), unable to get mScheduleMutex\n" ); } return bRC; } /*=========================================================================== METHOD: GetScheduleMutex (Internal Method) DESCRIPTION: Get the schedule mutex. Additionally a check is applied to verify the DEADLOCK_TIME was not exceeded SEQUENCING: This function will block until the mScheduleMutex is aquired PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::GetScheduleMutex() { ULONGLONG nStart = GetTickCount(); //TRACE( "Locking Schedule mutex\n" ); int nRet = pthread_mutex_lock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to lock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } ULONGLONG nEnd = GetTickCount(); if (nEnd - nStart > DEADLOCK_TIME) { TRACE( "Deadlock time exceeded: took %llu ms\n", nEnd - nStart ); ReleaseScheduleMutex( true ); return false; } //TRACE( "Locked ScheduleMutex\n" ); return true; } /*=========================================================================== METHOD: ReleaseScheduleMutex (Internal Method) DESCRIPTION: Release lock on the schedule mutex SEQUENCING: Calling process must have lock PARAMETERS: bSignalThread [ I ] - Signal Schedule thread as well? RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ReleaseScheduleMutex( bool bSignalThread ) { if (bSignalThread == true) { if (mThreadScheduleEvent.Set( 1 ) != 0) { return false; } } int nRet = pthread_mutex_unlock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to unlock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/ProtocolServer.h000077500000000000000000000257571455567757300234400ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.h DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Comm.h" #include "ProtocolRequest.h" #include "ProtocolLog.h" #include "Event.h" #include #include //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolServer; struct sServerControl; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID extern const ULONG INVALID_REQUEST_ID; // Fill timespec with the time it will be in specified milliseconds // Relative time to Absolute time timespec TimeIn( ULONG millis ); // Find the milliseconds from current time this timespec will occur // Absolute time to Relative time ULONG TimeFromNow( timespec time ); // Provide a number for sequencing reference, similar to the windows function ULONGLONG GetTickCount(); // timespec < comparison method inline bool operator< (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec < second.tv_nsec) ) ); } // timespec <= comparison method inline bool operator<= (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec <= second.tv_nsec) ) ); } /*=========================================================================*/ // Class cProtocolServerRxCallback /*=========================================================================*/ class cProtocolServerRxCallback { public: // (Inline) Constructor cProtocolServerRxCallback() : mpServer( 0 ) { }; // (Inline) Destructor virtual ~cProtocolServerRxCallback() { }; // (Inline) Set server object to pass results to void SetServer( cProtocolServer * pServer ) { mpServer = pServer; }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesReceived ); protected: /* Protocol server to interact with */ cProtocolServer * mpServer; }; /*=========================================================================*/ // Class cProtocolServer /*=========================================================================*/ class cProtocolServer { public: // Constructor cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cProtocolServer(); // Initialize the protocol server bool Initialize(); // Exit the protocol server bool Exit(); // Connect to the given communications port bool Connect( LPCSTR pPort ); // Disconnect from target bool Disconnect(); // Are we currently connected to a port? bool IsConnected(); // Add an outgoing protocol request to the protocol server request queue ULONG AddRequest( const sProtocolRequest & req ); // Remove a previously added protocol request bool RemoveRequest( ULONG reqID ); // (Inline) Return the protocol log const cProtocolLog & GetLog() { return mLog; }; protected: // Internal protocol server request/response structure, used to track // info related to sending out a request struct sProtocolReqRsp { public: // Constructor sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ); // Copy constructor sProtocolReqRsp( const sProtocolReqRsp & reqRsp ); // (Inline) Reset for next transmission attempt void Reset() { mEncodedSize = mRequest.GetSize(); mCurrentAuxTx = 0; mbWaitingForResponse = 0; }; /* Request ID */ ULONG mID; /* Number of times this request has been attempted */ ULONG mAttempts; /* Size of encoded data being transmitted */ ULONG mEncodedSize; /* Number of required auxiliary data transmissions */ ULONG mRequiredAuxTxs; /* Current auxiliary data transmission */ ULONG mCurrentAuxTx; /* Are we currently waiting for a response? */ bool mbWaitingForResponse; /* Underlying protocol request */ sProtocolRequest mRequest; }; // Handle the remove request bool HandleRemoveRequest( ULONG reqID ); // Schedule a request for transmission bool ScheduleRequest( ULONG reqID, ULONG schedule ); // (Inline) Get next request's time from mRequestSchedule timespec GetNextRequestTime() { timespec outTime; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); tSchedule entry = *pScheduleIter; outTime = entry.first; return outTime; } // (Inline) Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ) { return req.IsValid(); }; // Reschedule (or cleanup) the active request void RescheduleActiveRequest(); // Process a single outgoing protocol request void ProcessRequest(); // Check that system time hasn't moved backwards bool CheckSystemTime(); // Perform protocol specific communications port initialization virtual bool InitializeComm() = 0; // Perform protocol specific communications port cleanup virtual bool CleanupComm() = 0; // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) = 0; // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) = 0; // Handle completion of receive data operation void RxComplete( DWORD status, DWORD bytesReceived ); // Handle the response timer expiring void RxTimeout(); // Handle completion of transmit data operation virtual void TxComplete(); // Handle a transmission error void TxError(); /* Underlying communications object */ cComm mComm; /* Rx callback */ cProtocolServerRxCallback mRxCallback; /* ID of Schedule thread */ pthread_t mScheduleThreadID; // ScheduleThread signal event cEvent mThreadScheduleEvent; // Schedule mutex // Ensures exclusive access to mRequestSchedule pthread_mutex_t mScheduleMutex; // Is the thread in the process of exiting? // (no new commands will be accepted) bool mbExiting; /* Client/server thread control object */ sSharedBuffer * mpServerControl; /* Protocol request schedule (scheduled time/request ID) */ typedef std::pair tSchedule; std::set < tSchedule, std::less > mRequestSchedule; /* Last system time value (used to check for time changes) */ timespec mLastTime; /* Protocol request map (request ID mapped to internal req/rsp struct) */ std::map mRequestMap; /* Last assigned request ID */ ULONG mLastRequestID; /* Current request being processed */ sProtocolReqRsp * mpActiveRequest; /* Absolute timeout for mpActiveRequest based on when write was completed */ timespec mActiveRequestTimeout; /* Data buffer for incoming data */ BYTE * mpRxBuffer; /* Size of above buffer (i.e. how much data to read in at once) */ ULONG mRxBufferSize; /* Protocol type for incoming/outgoing data*/ eProtocolType mRxType; eProtocolType mTxType; /* Protocol log */ cProtocolLog mLog; // Get a lock on ScheduleMutex bool GetScheduleMutex(); // Release lock on ScheduleMutex // Signal ScheduleThread if desired bool ReleaseScheduleMutex( bool bSignalThread = true ); // Schedule Thread gets full access friend void * ScheduleThread( PVOID pArg ); // Callback objects get full access friend class cProtocolServerRxCallback; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QDLBuffers.cpp000077500000000000000000000657371455567757300227420ustar00rootroot00000000000000/*=========================================================================== FILE: QDLBuffers.cpp DESCRIPTION: QDL protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQDLRawHelloReq sQDLRawHelloRsp sQDLRawErrorRsp sQDLRawOpenUnframedReq sQDLRawOpenUnframedRsp sQDLRawWriteUnframedReq sQDLRawWriteUnframedRsp sQDLRawDoneRsp sQDLRawGetImagePrefRsp sQDLRawImageID sQDLHello sQDLError sQDLOpenUnframed sQDLWriteUnframed sQDLDone sQDLGetImagePref Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QDLBuffers.h" #include "CRC.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQDLHello Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLHello (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLHello::sQDLHello( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLHello::Validate(); } /*=========================================================================== METHOD: ~sQDLHello (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLHello::~sQDLHello() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this hello request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLHello::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof(sQDLRawHelloReq); const ULONG szRsp = (ULONG)sizeof(sQDLRawHelloRsp); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const sQDLRawHelloReq * pReq = (const sQDLRawHelloReq *)GetBuffer(); if (pReq->mCommandCode != (BYTE)eQDL_CMD_HELLO_REQ) { return bRC; } int notEqual = memcmp( (const void *)&pReq->mMagicNumber[0], (const void *)&QDL_HELLO_MAGIC_REQ[0], sizeof( QDL_HELLO_MAGIC_REQ ) ); if (notEqual != 0) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz == szRsp) { const sQDLRawHelloRsp * pRsp = (const sQDLRawHelloRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_HELLO_RSP) { return bRC; } int notEqual = memcmp( (const void *)&pRsp->mMagicNumber[0], (const void *)&QDL_HELLO_MAGIC_RSP[0], sizeof( QDL_HELLO_MAGIC_RSP ) ); if (notEqual != 0) { return bRC; } if ( (pRsp->mMaxVersion != QDL_MIN_VERSION) || (pRsp->mMinVersion != QDL_MAX_VERSION) ) { return bRC; } if ( ((pRsp->mFeatures & QDL_FEATURE_GENERIC_UNFRAMED) == 0) || ((pRsp->mFeatures & QDL_FEATURE_QDL_UNFRAMED) == 0) ) { return bRC; } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetBootVersionInfo (Internal Method) DESCRIPTION: Extract boot downloader version info from the response PARAMETERS: major [ O ] - Major version minor [ O ] - Minor version RETURN VALUE: bool ===========================================================================*/ bool sQDLHello::GetBootVersionInfo( ULONG & major, ULONG & minor ) const { // Assume failure bool bRC = false; major = 0; minor = 0; const sQDLRawHelloRsp * pRsp = GetResponse(); if (pRsp == 0) { return bRC; } major = (ULONG)pRsp->mBootMajorVersion; minor = (ULONG)pRsp->mBootMinorVersion; bRC = true; return bRC; } /*=========================================================================== METHOD: BuildHelloReq (Static Public Method) DESCRIPTION: Build a hello request PARAMETERS: bBARMode [ O ] - Request boot and recovery mode feature RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQDLHello::BuildHelloReq( bool bBARMode ) { const ULONG sz = (ULONG)sizeof(sQDLRawHelloReq); BYTE req[sz]; sQDLRawHelloReq * pReq = (sQDLRawHelloReq *)&req[0]; pReq->mCommandCode = (BYTE)eQDL_CMD_HELLO_REQ; pReq->mMaxVersion = QDL_MIN_VERSION; pReq->mMinVersion = QDL_MAX_VERSION; pReq->mFeatures = QDL_FEATURE_GENERIC_UNFRAMED | QDL_FEATURE_QDL_UNFRAMED; if (bBARMode == true) { pReq->mFeatures |= QDL_FEATURE_BAR_MODE; } memcpy( (PVOID)&pReq->mMagicNumber[0], (const VOID *)&QDL_HELLO_MAGIC_REQ[0], (SIZE_T)32 ); eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pRetBuf = new sSharedBuffer( (const BYTE *)req, sz, pt ); return pRetBuf; } /*=========================================================================*/ // sQDLError Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLError (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLError::sQDLError( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLError::Validate(); } /*=========================================================================== METHOD: ~sQDLError (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLError::~sQDLError() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this session done request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLError::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szRsp = (ULONG)sizeof( sQDLRawErrorRsp ); if (sz >= szRsp) { const sQDLRawErrorRsp * pRsp = 0; pRsp = (const sQDLRawErrorRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_ERROR) { return bRC; } // Error code needs to be valid if (::IsValid( (eQDLError)pRsp->mErrorCode ) == false) { return bRC; } // Error text needs to be NULL terminated const BYTE * pTmp = GetBuffer(); if (pTmp[sz - 1] != 0) { return bRC; } // What there is of the error text needs to be printable pTmp = &pRsp->mErrorText; while (*pTmp != 0) { int val = (int)*pTmp++; if (isprint( (int)val ) == 0) { return bRC; } } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================*/ // sQDLOpenUnframed Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLOpenUnframed (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLOpenUnframed::sQDLOpenUnframed( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLOpenUnframed::Validate(); } /*=========================================================================== METHOD: ~sQDLOpenUnframed (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLOpenUnframed::~sQDLOpenUnframed() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLOpenUnframed::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof(sQDLRawOpenUnframedReq); const ULONG szRsp = (ULONG)sizeof(sQDLRawOpenUnframedRsp); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const sQDLRawOpenUnframedReq * pReq = 0; pReq = (const sQDLRawOpenUnframedReq *)GetBuffer(); if (pReq->mCommandCode != (BYTE)eQDL_CMD_OPEN_UNFRAMED_REQ) { return bRC; } if (::IsValid( (eQDLImageType)pReq->mImageType ) == false) { return bRC; } if (pReq->mWindowSize != 1) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz == szRsp) { const sQDLRawOpenUnframedRsp * pRsp = 0; pRsp = (const sQDLRawOpenUnframedRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_OPEN_UNFRAMED_RSP) { return bRC; } if (pRsp->mWindowSize != 1) { return bRC; } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetChunkSize (Internal Method) DESCRIPTION: Extract chunk size info from the response PARAMETERS: chunkSize [ O ] - Target supported chunk size RETURN VALUE: bool ===========================================================================*/ bool sQDLOpenUnframed::GetChunkSize( ULONG & chunkSize ) const { // Assume failure bool bRC = false; chunkSize = 0; const sQDLRawOpenUnframedRsp * pRsp = GetResponse(); if (pRsp == 0) { return bRC; } chunkSize = (ULONG)pRsp->mUnframedChunkSize; bRC = true; return bRC; } /*=========================================================================== METHOD: BuildOpenUnframedReq (Static Public Method) DESCRIPTION: Build an open image for unframed write request PARAMETERS: imageType [ I ] - Type of image about to be written imageSize [ I ] - Size of image about to be written chunkSize [ I ] - Desired size of chunk for each write RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQDLOpenUnframed::BuildOpenUnframedReq( eQDLImageType imageType, ULONG imageSize, ULONG chunkSize ) { sSharedBuffer * pRetBuf = 0; if (::IsValid( imageType ) == false) { return pRetBuf; } // We can not write out chunks larger than the maximum if (chunkSize > QDL_MAX_CHUNK_SIZE) { return pRetBuf; } const ULONG sz = (ULONG)sizeof(sQDLRawOpenUnframedReq); BYTE req[sz]; memset( (LPVOID)&req[0], 0, (SIZE_T)sz ); sQDLRawOpenUnframedReq * pReq = (sQDLRawOpenUnframedReq *)&req[0]; pReq->mCommandCode = (BYTE)eQDL_CMD_OPEN_UNFRAMED_REQ; pReq->mImageType = (BYTE)imageType; pReq->mImageLength = (DWORD)imageSize; pReq->mWindowSize = 1; pReq->mUnframedChunkSize = chunkSize; eProtocolType pt = ePROTOCOL_QDL_TX; pRetBuf = new sSharedBuffer( (const BYTE *)req, sz, pt ); return pRetBuf; } /*=========================================================================*/ // sQDLWriteUnframed Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLWriteUnframed (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLWriteUnframed::sQDLWriteUnframed( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLWriteUnframed::Validate(); } /*=========================================================================== METHOD: ~sQDLWriteUnframed (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLWriteUnframed::~sQDLWriteUnframed() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this unframed write request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLWriteUnframed::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof( sQDLRawWriteUnframedReq ); const ULONG szRsp = (ULONG)sizeof( sQDLRawWriteUnframedRsp ); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const sQDLRawWriteUnframedReq * pReq = 0; pReq = (const sQDLRawWriteUnframedReq *)GetBuffer(); if (pReq->mCommandCode != (BYTE)eQDL_CMD_WRITE_UNFRAMED_REQ) { return bRC; } bRC = CheckCRC( GetBuffer(), szReq - sizeof( USHORT ) ); } else if (pt == ePROTOCOL_QDL_RX && sz == szRsp) { const sQDLRawWriteUnframedRsp * pRsp = 0; pRsp = (const sQDLRawWriteUnframedRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_WRITE_UNFRAMED_RSP) { return bRC; } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetSequenceNumber (Internal Method) DESCRIPTION: Extract sequence number from the response PARAMETERS: sequenceNumber [ O ] - Target reported sequence number RETURN VALUE: bool ===========================================================================*/ bool sQDLWriteUnframed::GetSequenceNumber( ULONG & sequenceNumber ) const { // Assume failure bool bRC = false; sequenceNumber = 0; const sQDLRawWriteUnframedRsp * pRsp = GetResponse(); if (pRsp == 0) { return bRC; } sequenceNumber = (ULONG)pRsp->mSequenceNumber; bRC = true; return bRC; } /*=========================================================================== METHOD: BuildWriteUnframedReq (Static Public Method) DESCRIPTION: Build an unframed write request PARAMETERS: sequenceNumber [ I ] - Type of image about to be written chunkSize [ I ] - Size of chunk being written RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQDLWriteUnframed::BuildWriteUnframedReq( USHORT sequenceNumber, ULONG chunkSize ) { sSharedBuffer * pRetBuf = 0; // We can not write out chunks larger than the maximum if (chunkSize == 0 || chunkSize > (ULONG)QDL_MAX_CHUNK_SIZE) { return pRetBuf; } const ULONG sz = (ULONG)sizeof(sQDLRawWriteUnframedReq); BYTE req[sz]; memset( (LPVOID)&req[0], 0, (SIZE_T)sz ); sQDLRawWriteUnframedReq * pReq = (sQDLRawWriteUnframedReq *)&req[0]; pReq->mCommandCode = (BYTE)eQDL_CMD_WRITE_UNFRAMED_REQ; pReq->mSequenceNumber = (WORD)sequenceNumber; pReq->mUnframedChunkSize = (DWORD)chunkSize; SetCRC( req, sz - sizeof( USHORT ) ); eProtocolType pt = ePROTOCOL_QDL_TX; pRetBuf = new sSharedBuffer( (const BYTE *)req, sz, pt ); return pRetBuf; } /*=========================================================================== METHOD: BuildWriteUnframedReqs (Static Public Method) DESCRIPTION: Build list of unframed write requests from the given parameters PARAMETERS: chunkSize [ I ] - Size to write in each request dataLen [ I ] - Total number of bytes to write RETURN VALUE: std::list : The requests in allocated buffers (the list is empty on error) ===========================================================================*/ std::list sQDLWriteUnframed::BuildWriteUnframedReqs( ULONG chunkSize, ULONG totalSize ) { std::list retList; // Check length (in bytes) is acceptable if (chunkSize == 0 || chunkSize > QDL_MAX_CHUNK_SIZE) { return retList; } ULONG writes = 1; ULONG rem = totalSize; // Will we need more than one write request? if (totalSize > chunkSize) { writes = totalSize / chunkSize; rem = totalSize % chunkSize; // Total size is a multiple of chunk size? if (rem == 0) { // Yes, the remainder will be the block size rem = chunkSize; } else { // No, we need an extra write for the remainder writes++; } } ULONG blockSz = chunkSize; if (writes == 1) { blockSz = rem; } // Generate first request USHORT seqNum = 0; sSharedBuffer * pReq = 0; pReq = sQDLWriteUnframed::BuildWriteUnframedReq( seqNum++, blockSz ); if (pReq != 0) { retList.push_back( pReq ); } // Generate remaining requests for (UINT b = 1; b < writes; b++) { blockSz = chunkSize; if (b == writes - 1) { blockSz = rem; } pReq = sQDLWriteUnframed::BuildWriteUnframedReq( seqNum++, blockSz ); if (pReq != 0) { retList.push_back( pReq ); } } // Errors? if (retList.size() != writes) { // Free up all our hard work std::list ::const_iterator pIter = retList.begin(); while (pIter != retList.end()) { delete [] *pIter; pIter++; } retList.clear(); } return retList; } /*=========================================================================*/ // sQDLDone Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLDone (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLDone::sQDLDone( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLDone::Validate(); } /*=========================================================================== METHOD: ~sQDLDone (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLDone::~sQDLDone() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this session done request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLDone::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof( BYTE ); const ULONG szRsp = (ULONG)sizeof( sQDLRawDoneRsp ); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const BYTE * pReq = GetBuffer(); if (*pReq != (BYTE)eQDL_CMD_SESSION_DONE_REQ) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz >= szRsp) { const sQDLRawDoneRsp * pRsp = 0; pRsp = (const sQDLRawDoneRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_SESSION_DONE_RSP) { return bRC; } // Status needs to be valid if (::IsValid( (eQDLDoneStatus)pRsp->mStatus ) == false) { return bRC; } // For success the error text should be NULL if ( (pRsp->mStatus == (WORD)eQDL_DONE_STATUS_SUCCESS) && (sz != szRsp || pRsp->mErrorText != 0) ) { return bRC; } if (pRsp->mStatus != (WORD)eQDL_DONE_STATUS_SUCCESS) { // Error text needs to be NULL terminated const BYTE * pTmp = GetBuffer(); if (pTmp[sz - 1] != 0) { return bRC; } // What there is of the error text needs to be printable pTmp = &pRsp->mErrorText; while (*pTmp != 0) { int val = (int)*pTmp++; if (isprint( (int)val ) == 0) { return bRC; } } } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================*/ // sQDLGetImagePref Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLGetImagePref (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLGetImagePref::sQDLGetImagePref( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLGetImagePref::Validate(); } /*=========================================================================== METHOD: ~sQDLGetImagePref (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLGetImagePref::~sQDLGetImagePref() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this get image preference request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLGetImagePref::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof( BYTE ); const ULONG szRsp = (ULONG)sizeof( sQDLRawGetImagePrefRsp ); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const BYTE * pReq = GetBuffer(); if (*pReq != (BYTE)eQDL_CMD_GET_IMAGE_PREF_REQ) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz >= szRsp) { const sQDLRawGetImagePrefRsp * pRsp = 0; pRsp = (const sQDLRawGetImagePrefRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_GET_IMAGE_PREF_RSP) { return bRC; } BYTE entries = pRsp->mEntries; ULONG needSz = szRsp + (ULONG)entries * (ULONG)sizeof( sQDLRawImageID ); if (sz != needSz) { return bRC; } // Skip response header pRsp++; // Validate image IDs const sQDLRawImageID * pID = (const sQDLRawImageID *)pRsp; for (BYTE e = 0; e < entries; e++) { sQDLRawImageID imagePref = *pID++; if (::IsValid( (eQDLImageType)imagePref.mImageType) == false) { return bRC; } } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetImageIDs (Public Method) DESCRIPTION: Return image IDs RETURN VALUE: std::list ===========================================================================*/ std::list sQDLGetImagePref::GetImageIDs() const { // Assume failure std::list retIDs; const sQDLRawGetImagePrefRsp * pRsp = GetResponse(); if (pRsp == 0) { return retIDs; } BYTE entries = pRsp->mEntries; if (entries == 0) { return retIDs; } // Skip response header pRsp++; const sQDLRawImageID * pID = (const sQDLRawImageID *)pRsp; for (BYTE e = 0; e < entries; e++) { retIDs.push_back( *pID++ ); } return retIDs; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QDLBuffers.h000077500000000000000000000476741455567757300224070ustar00rootroot00000000000000/*=========================================================================== FILE: QDLBuffers.h DESCRIPTION: QDL protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQDLRawHelloReq sQDLRawHelloRsp sQDLRawErrorRsp sQDLRawOpenUnframedReq sQDLRawOpenUnframedRsp sQDLRawWriteUnframedReq sQDLRawWriteUnframedRsp sQDLRawDoneRsp sQDLRawGetImagePrefRsp sQDLRawImageID sQDLHello sQDLError sQDLOpenUnframed sQDLWriteUnframed sQDLDone sQDLGetImagePref Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QDLEnum.h" #include //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQDLRawHelloReq // Struct to represent a QDL hello request (raw) /*=========================================================================*/ struct sQDLRawHelloReq { public: BYTE mCommandCode; BYTE mMagicNumber[32]; BYTE mMaxVersion; BYTE mMinVersion; BYTE mFeatures; }; /*=========================================================================*/ // Struct sQDLRawHelloRsp // Struct to represent a QDL hello response (raw) /*=========================================================================*/ struct sQDLRawHelloRsp { public: BYTE mCommandCode; BYTE mMagicNumber[24]; DWORD mReserved1; WORD mBootMajorVersion; WORD mBootMinorVersion; BYTE mMaxVersion; BYTE mMinVersion; DWORD mReserved2; DWORD mReserved3; BYTE mReserved4; WORD mReserved5; WORD mReserved6; BYTE mFeatures; }; /*=========================================================================*/ // Struct sQDLRawErrorRsp // Struct to represent a QDL error response (raw) /*=========================================================================*/ struct sQDLRawErrorRsp { public: BYTE mCommandCode; DWORD mErrorCode; BYTE mErrorText; }; /*=========================================================================*/ // Struct sQDLRawOpenUnframedReq // Struct to represent a QDL open unframed image write request (raw) /*=========================================================================*/ struct sQDLRawOpenUnframedReq { public: BYTE mCommandCode; BYTE mImageType; DWORD mImageLength; BYTE mWindowSize; DWORD mUnframedChunkSize; WORD mReserved1; }; /*=========================================================================*/ // Struct sQDLRawOpenUnframedRsp // Struct to represent a QDL open unframed image write response (raw) /*=========================================================================*/ struct sQDLRawOpenUnframedRsp { public: BYTE mCommandCode; WORD mStatus; BYTE mWindowSize; DWORD mUnframedChunkSize; }; /*=========================================================================*/ // Struct sQDLRawWriteUnframedReq // Struct to represent a QDL unframed image write request (raw) /*=========================================================================*/ struct sQDLRawWriteUnframedReq { public: BYTE mCommandCode; WORD mSequenceNumber; DWORD mReserved; DWORD mUnframedChunkSize; WORD mCRC; }; /*=========================================================================*/ // Struct sQDLRawWriteUnframedRsp // Struct to represent a QDL unframed image write response (raw) /*=========================================================================*/ struct sQDLRawWriteUnframedRsp { public: BYTE mCommandCode; WORD mSequenceNumber; DWORD mReserved; WORD mStatus; }; /*=========================================================================*/ // Struct sQDLRawDoneRsp // Struct to represent a QDL session done response (raw) /*=========================================================================*/ struct sQDLRawDoneRsp { public: BYTE mCommandCode; WORD mStatus; BYTE mImageType; BYTE mErrorText; }; /*=========================================================================*/ // Struct sQDLRawGetImagePrefRsp // Struct to represent a QDL get image preference response (raw) /*=========================================================================*/ struct sQDLRawGetImagePrefRsp { public: BYTE mCommandCode; BYTE mEntries; // Array of sQDLRawImageID follows (sized by mEntries) }; /*=========================================================================*/ // Struct sQDLRawImageID // Struct to represent a QDL image ID (raw) /*=========================================================================*/ struct sQDLRawImageID { public: BYTE mImageType; BYTE mImageID[16]; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQDLHello // Struct to represent a QDL hello request/response (shared buffer) /*=========================================================================*/ struct sQDLHello : public sProtocolBuffer { public: // Constructor sQDLHello( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLHello(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_HELLO_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_HELLO_RSP); } return bResponse; }; // (Inline) Return raw request const sQDLRawHelloReq * GetRequest() const { const sQDLRawHelloReq * pReq = 0; if (IsRequest() == true) { pReq = (const sQDLRawHelloReq *)GetBuffer(); } return pReq; }; // (Inline) Return raw response const sQDLRawHelloRsp * GetResponse() const { const sQDLRawHelloRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawHelloRsp *)GetBuffer(); } return pRsp; }; // Extract boot downloader version info from the response bool GetBootVersionInfo( ULONG & major, ULONG & minor ) const; // Build a hello request static sSharedBuffer * BuildHelloReq( bool bBARMode = false ); protected: // Is this hello request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLHello( const sProtocolBuffer & ); sQDLHello & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLError // Struct to represent a QDL error response (shared buffer) /*=========================================================================*/ struct sQDLError : public sProtocolBuffer { public: // Constructor sQDLError( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLError(); // (Inline) Return raw response const sQDLRawErrorRsp * GetResponse() const { const sQDLRawErrorRsp * pRsp = 0; if (IsValid() == true) { pRsp = (const sQDLRawErrorRsp *)GetBuffer(); } return pRsp; }; // (Inline) Return the (validated) error code eQDLError GetErrorCode() const { eQDLError err = eQDL_ERROR_ENUM_BEGIN; const sQDLRawErrorRsp * pRsp = GetResponse(); if (pRsp != 0) { err = (eQDLError)pRsp->mErrorCode; } return err; }; // (Inline) Return the error text string LPCSTR GetError() const { LPCSTR pErr = 0; const sQDLRawErrorRsp * pRsp = GetResponse(); if (pRsp != 0) { pErr = (LPCSTR)&pRsp->mErrorText; } return pErr; }; protected: // Is this session done request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLError( const sProtocolBuffer & ); sQDLError & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLOpenUnframed // Struct to represent a QDL open image for unframed write // request/response (shared buffer) /*=========================================================================*/ struct sQDLOpenUnframed : public sProtocolBuffer { public: // Constructor sQDLOpenUnframed( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLOpenUnframed(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_OPEN_UNFRAMED_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_OPEN_UNFRAMED_RSP); } return bResponse; }; // (Inline) Return raw request const sQDLRawOpenUnframedReq * GetRequest() const { const sQDLRawOpenUnframedReq * pReq = 0; if (IsRequest() == true) { pReq = (const sQDLRawOpenUnframedReq *)GetBuffer(); } return pReq; }; // (Inline) Return raw response const sQDLRawOpenUnframedRsp * GetResponse() const { const sQDLRawOpenUnframedRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawOpenUnframedRsp *)GetBuffer(); } return pRsp; }; // (Inline) Does the response indicate success? bool IsSuccess() const { bool bSuccess = false; const sQDLRawOpenUnframedRsp * pRsp = GetResponse(); if (pRsp != 0) { bSuccess = (pRsp->mStatus == eQDL_OPEN_STATUS_SUCCESS); } return bSuccess; }; // Extract supported chunk size from the response bool GetChunkSize( ULONG & chunkSize ) const; // Build an open image for unframed write request static sSharedBuffer * BuildOpenUnframedReq( eQDLImageType imageType, ULONG imageSize, ULONG chunkSize ); protected: // Is this open unframed request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLOpenUnframed( const sProtocolBuffer & ); sQDLOpenUnframed & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLWriteUnframed // Struct to represent a QDL unframed write of an image // request/response (shared buffer) /*=========================================================================*/ struct sQDLWriteUnframed : public sProtocolBuffer { public: // Constructor sQDLWriteUnframed( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLWriteUnframed(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_WRITE_UNFRAMED_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_WRITE_UNFRAMED_RSP); } return bResponse; }; // (Inline) Return raw request const sQDLRawWriteUnframedReq * GetRequest() const { const sQDLRawWriteUnframedReq * pReq = 0; if (IsRequest() == true) { pReq = (const sQDLRawWriteUnframedReq *)GetBuffer(); } return pReq; }; // (Inline) Return raw response const sQDLRawWriteUnframedRsp * GetResponse() const { const sQDLRawWriteUnframedRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawWriteUnframedRsp *)GetBuffer(); } return pRsp; }; // (Inline) Does the response indicate success? bool IsSuccess() const { bool bSuccess = false; const sQDLRawWriteUnframedRsp * pRsp = GetResponse(); if (pRsp != 0) { bSuccess = (pRsp->mStatus == eQDL_WRITE_STATUS_SUCCESS); } return bSuccess; }; // Extract sequence number from the response bool GetSequenceNumber( ULONG & sequenceNumber ) const; // Build an unframed write request static sSharedBuffer * BuildWriteUnframedReq( USHORT sequenceNumber, ULONG chunkSize ); // Build unframed write requests for the specified parameters static std::list BuildWriteUnframedReqs( ULONG chunkSize, ULONG totalSize ); protected: // Is this open unframed request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLWriteUnframed( const sProtocolBuffer & ); sQDLWriteUnframed & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLDone // Struct to represent a QDL session done request/response (shared buffer) /*=========================================================================*/ struct sQDLDone : public sProtocolBuffer { public: // Constructor sQDLDone( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLDone(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_SESSION_DONE_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_SESSION_DONE_RSP); } return bResponse; }; // (Inline) Return raw response const sQDLRawDoneRsp * GetResponse() const { const sQDLRawDoneRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawDoneRsp *)GetBuffer(); } return pRsp; }; // (Inline) Does the response indicate success? bool IsSuccess() const { bool bSuccess = false; const sQDLRawDoneRsp * pRsp = GetResponse(); if (pRsp != 0) { bSuccess = (pRsp->mStatus == eQDL_DONE_STATUS_SUCCESS); } return bSuccess; }; // (Inline) Return the error text string LPCSTR GetError() const { LPCSTR pErr = 0; const sQDLRawDoneRsp * pRsp = GetResponse(); if (pRsp != 0) { if (pRsp->mStatus != eQDL_DONE_STATUS_SUCCESS) { pErr = (LPCSTR)&pRsp->mErrorText; } } return pErr; }; protected: // Is this session done request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLDone( const sProtocolBuffer & ); sQDLDone & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLGetImagePref // Struct to represent a QDL get image preference // request/response (shared buffer) /*=========================================================================*/ struct sQDLGetImagePref : public sProtocolBuffer { public: // Constructor sQDLGetImagePref( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLGetImagePref(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_GET_IMAGE_PREF_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_GET_IMAGE_PREF_RSP); } return bResponse; }; // (Inline) Return raw response const sQDLRawGetImagePrefRsp * GetResponse() const { const sQDLRawGetImagePrefRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawGetImagePrefRsp *)GetBuffer(); } return pRsp; }; // Return image IDs std::list GetImageIDs() const; protected: // Is this get image preference request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLGetImagePref( const sProtocolBuffer & ); sQDLGetImagePref & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QDLEnum.h000077500000000000000000000277621455567757300217130ustar00rootroot00000000000000/*=========================================================================== FILE: QDLEnum.h DESCRIPTION: QDL protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQDLCommand eQDLError eQDLImageType eQDLOpenStatus eQDLWriteStatus eQDLDoneStatus Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QDL feature bits const BYTE QDL_FEATURE_GENERIC_UNFRAMED = 0x10; const BYTE QDL_FEATURE_QDL_UNFRAMED = 0x20; const BYTE QDL_FEATURE_BAR_MODE = 0x40; // QDL protocol version const BYTE QDL_MIN_VERSION = 6; const BYTE QDL_MAX_VERSION = 6; const BYTE QDL_HELLO_MAGIC_REQ[32] = { 'Q', 'C', 'O', 'M', ' ', 'h', 'i', 'g', 'h', ' ', 's', 'p', 'e', 'e', 'd', ' ', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'h', 's', 't', 0, 0, 0, 0 }; const BYTE QDL_HELLO_MAGIC_RSP[24] = { 'Q', 'C', 'O', 'M', ' ', 'h', 'i', 'g', 'h', ' ', 's', 'p', 'e', 'e', 'd', ' ', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l' }; // QDL maximum chunk size we support const ULONG QDL_MAX_CHUNK_SIZE = 1024 * 1024 * 64; /*=========================================================================*/ // eQDLCommand Enumeration // QDL Command Code Enumeration /*=========================================================================*/ enum eQDLCommand { eQDL_CMD_ENUM_BEGIN = -1, eQDL_CMD_HELLO_REQ = 1, // 001 Hello request eQDL_CMD_HELLO_RSP, // 002 Hello response eQDL_CMD_ERROR = 13, // 013 Error report eQDL_CMD_OPEN_UNFRAMED_REQ = 37, // 037 Open unframed image write request eQDL_CMD_OPEN_UNFRAMED_RSP, // 038 Open unframed image write response eQDL_CMD_WRITE_UNFRAMED_REQ, // 039 Unframed image write request eQDL_CMD_WRITE_UNFRAMED_RSP, // 040 Unframed image write response eQDL_CMD_SESSION_DONE_REQ, // 041 Unframed session done request eQDL_CMD_SESSION_DONE_RSP, // 042 Unframed session done response eQDL_CMD_DOWNLOAD_REQ, // 043 Switch to download protocol request eQDL_CMD_SESSION_CLOSE_REQ = 45, // 045 Close unframed session request eQDL_CMD_GET_IMAGE_PREF_REQ, // 046 Get image preference request eQDL_CMD_GET_IMAGE_PREF_RSP, // 047 Get image preference response eQDL_CMD_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLCommand validity check PARAMETERS: cmd [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLCommand cmd ) { bool retVal = false; switch (cmd) { case eQDL_CMD_HELLO_REQ: case eQDL_CMD_HELLO_RSP: case eQDL_CMD_ERROR: case eQDL_CMD_OPEN_UNFRAMED_REQ: case eQDL_CMD_OPEN_UNFRAMED_RSP: case eQDL_CMD_WRITE_UNFRAMED_REQ: case eQDL_CMD_WRITE_UNFRAMED_RSP: case eQDL_CMD_SESSION_DONE_REQ: case eQDL_CMD_SESSION_DONE_RSP: case eQDL_CMD_DOWNLOAD_REQ: case eQDL_CMD_SESSION_CLOSE_REQ: case eQDL_CMD_GET_IMAGE_PREF_REQ: case eQDL_CMD_GET_IMAGE_PREF_RSP: retVal = true; break; } return retVal; }; /*=========================================================================*/ // eQDLError Enumeration // QDL Error Enumeration /*=========================================================================*/ enum eQDLError { eQDL_ERROR_ENUM_BEGIN = 0, eQDL_ERROR_01, // 01 Reserved eQDL_ERROR_BAD_ADDR, // 02 Invalid destination address eQDL_ERROR_BAD_LEN, // 03 Invalid length eQDL_ERROR_BAD_PACKET, // 04 Unexpected end of packet eQDL_ERROR_BAD_CMD, // 05 Invalid command eQDL_ERROR_06, // 06 Reserved eQDL_ERROR_OP_FAILED, // 07 Operation failed eQDL_ERROR_BAD_FLASH_ID, // 08 Invalid flash intelligent ID eQDL_ERROR_BAD_VOLTAGE, // 09 Invalid programming voltage eQDL_ERROR_WRITE_FAILED, // 10 Write verify failed eQDL_ERROR_11, // 11 Reserved eQDL_ERROR_BAD_SPC, // 12 Invalid security code eQDL_ERROR_POWERDOWN, // 13 Power-down failed eQDL_ERROR_UNSUPPORTED, // 14 NAND flash programming not supported eQDL_ERROR_CMD_SEQ, // 15 Command out of sequence eQDL_ERROR_CLOSE, // 16 Close failed eQDL_ERROR_BAD_FEATURES, // 17 Invalid feature bits eQDL_ERROR_SPACE, // 18 Out of space eQDL_ERROR_BAD_SECURITY, // 19 Invalid security mode eQDL_ERROR_MULTI_UNSUPPORTED, // 20 Multi-image NAND not supported eQDL_ERROR_POWEROFF, // 21 Power-off command not supported eQDL_ERROR_CMD_UNSUPPORTED, // 22 Command not supported eQDL_ERROR_BAD_CRC, // 23 Invalid CRC eQDL_ERROR_STATE, // 24 Command received in invalid state eQDL_ERROR_TIMEOUT, // 25 Receive timeout eQDL_ERROR_IMAGE_AUTH, // 26 Image authentication error eQDL_ERROR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLError validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLError err ) { bool retVal = false; if (err > eQDL_ERROR_ENUM_BEGIN && err < eQDL_ERROR_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQDLImageType Enumeration // QDL Download Image Type Enumeration /*=========================================================================*/ enum eQDLImageType { eQDL_IMAGE_ENUM_BEGIN = -1, eQDL_IMAGE_AMSS_MODEM = 5, // 05 AMSS modem image eQDL_IMAGE_AMSS_APPLICATION, // 06 AMSS application image eQDL_IMAGE_AMSS_UQCN = 13, // 13 Provisioning information eQDL_IMAGE_DBL = 15, // 15 DBL image eQDL_IMAGE_OSBL, // 16 OSBL image eQDL_IMAGE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLImageType validity check PARAMETERS: it [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLImageType it ) { bool retVal = false; switch (it) { case eQDL_IMAGE_AMSS_MODEM: case eQDL_IMAGE_AMSS_APPLICATION: case eQDL_IMAGE_AMSS_UQCN: case eQDL_IMAGE_DBL: case eQDL_IMAGE_OSBL: retVal = true; break; } return retVal; }; /*=========================================================================*/ // eQDLOpenStatus Enumeration // QDL Unframed Open Status Enumeration /*=========================================================================*/ enum eQDLOpenStatus { eQDL_OPEN_STATUS_ENUM_BEGIN = -1, eQDL_OPEN_STATUS_SUCCESS, // 00 Success eQDL_OPEN_STATUS_SIZE, // 01 Reported image size error eQDL_OPEN_STATUS_BAD_TYPE, // 02 Invalid image type for downloader eQDL_OPEN_STATUS_HDR_SIZE, // 03 Reported image header size error eQDL_OPEN_STATUS_HDR1, // 04 Image header incorrectly present eQDL_OPEN_STATUS_HDR2, // 05 Image header required eQDL_OPEN_STATUS_PROTECTION, // 06 Memory block protection error eQDL_OPEN_STATUS_NOT_NEEDED, // 07 Image type not required eQDL_OPEN_STATUS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLOpenStatus validity check PARAMETERS: os [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLOpenStatus os ) { bool retVal = false; if (os > eQDL_OPEN_STATUS_ENUM_BEGIN && os < eQDL_OPEN_STATUS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQDLWriteStatus Enumeration // QDL Unframed Write Status Enumeration /*=========================================================================*/ enum eQDLWriteStatus { eQDL_WRITE_STATUS_ENUM_BEGIN = -1, eQDL_WRITE_STATUS_SUCCESS, // 00 Success eQDL_WRITE_STATUS_CRC, // 01 Error with CRC eQDL_WRITE_STATUS_CONTENT, // 02 Error with chunk content eQDL_WRITE_STATUS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLWriteStatus validity check PARAMETERS: ws [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLWriteStatus ws ) { bool retVal = false; if (ws > eQDL_WRITE_STATUS_ENUM_BEGIN && ws < eQDL_WRITE_STATUS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQDLDoneStatus Enumeration // QDL Done Status Enumeration /*=========================================================================*/ enum eQDLDoneStatus { eQDL_DONE_STATUS_ENUM_BEGIN = -1, eQDL_DONE_STATUS_SUCCESS, // 00 Success eQDL_DONE_STATUS_AUTH, // 01 Authentication failure eQDL_DONE_STATUS_WRITE, // 02 Write failure eQDL_DONE_STATUS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLDoneStatus validity check PARAMETERS: ds [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLDoneStatus ds ) { bool retVal = false; if (ds > eQDL_DONE_STATUS_ENUM_BEGIN && ds < eQDL_DONE_STATUS_ENUM_END) { retVal = true; } return retVal; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QDLProtocolServer.cpp000077500000000000000000000172161455567757300243230ustar00rootroot00000000000000/*=========================================================================== FILE: QDLProtocolServer.cpp DESCRIPTION: QDL protocol packet server PUBLIC CLASSES AND METHODS: cQDLProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QDLProtocolServer.h" #include "QDLEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cQDLProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQDLProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: bufferSzRx [ I ] - Size of data buffer for incoming data SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQDLProtocolServer::cQDLProtocolServer( ULONG bufferSzRx, ULONG logSz ) : cHDLCProtocolServer( ePROTOCOL_QDL_RX, ePROTOCOL_QDL_TX, bufferSzRx, logSz ) { // Nothing to do } /*=========================================================================== METHOD: ~cQDLProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cQDLProtocolServer::~cQDLProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encoded data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQDLProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { // We encoded data bEncoded = true; if (pBuffer != 0 && pBuffer->IsValid() == true) { const BYTE * pReqBuf = mpActiveRequest->mRequest.GetBuffer(); eQDLCommand reqCmd = (eQDLCommand)pReqBuf[0]; if (reqCmd == eQDL_CMD_WRITE_UNFRAMED_REQ) { // The write request is not HDLC encoded bEncoded = false; } } if (bEncoded == true) { // Base class can handle HDLC encoding return cHDLCProtocolServer::EncodeTxData( pBuffer, bEncoded ); } return 0; } /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQDLProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } const BYTE * pReqBuf = mpActiveRequest->mRequest.GetBuffer(); const BYTE * pRspBuf = rsp.GetBuffer(); eQDLCommand reqCmd = (eQDLCommand)pReqBuf[0]; eQDLCommand rspCmd = (eQDLCommand)pRspBuf[0]; switch (reqCmd) { case eQDL_CMD_HELLO_REQ: if ( (rspCmd == eQDL_CMD_HELLO_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_OPEN_UNFRAMED_REQ: if ( (rspCmd == eQDL_CMD_OPEN_UNFRAMED_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_WRITE_UNFRAMED_REQ: if ( (rspCmd == eQDL_CMD_WRITE_UNFRAMED_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_SESSION_DONE_REQ: if ( (rspCmd == eQDL_CMD_SESSION_DONE_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_DOWNLOAD_REQ: case eQDL_CMD_SESSION_CLOSE_REQ: if (rspCmd == eQDL_CMD_ERROR) { bRC = true; } break; case eQDL_CMD_GET_IMAGE_PREF_REQ: if ( (rspCmd == eQDL_CMD_GET_IMAGE_PREF_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; } return bRC; } /*=========================================================================== METHOD: IsTxAbortResponse (Internal Method) DESCRIPTION: Is the passed in data a response that aborts the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQDLProtocolServer::IsTxAbortResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == true) || (rsp.IsValid() == false) ) { return bRC; } // If we are in the middle of a transmission an we receive an error // packet then we abort const BYTE * pRspBuf = rsp.GetBuffer(); eQDLCommand rspCmd = (eQDLCommand)pRspBuf[0]; if (rspCmd == eQDL_CMD_ERROR) { bRC = true; } return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QDLProtocolServer.h000077500000000000000000000063151455567757300237660ustar00rootroot00000000000000/*=========================================================================== FILE: QDLProtocolServer.h DESCRIPTION: QDL protocol packet server PUBLIC CLASSES AND METHODS: cQDLProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "HDLCProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQDLProtocolServer /*=========================================================================*/ class cQDLProtocolServer : public cHDLCProtocolServer { public: // Constructor cQDLProtocolServer( ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQDLProtocolServer(); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // Is the passed in data a response that aborts the current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & rsp ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QMIBuffers.cpp000077500000000000000000000234461455567757300227370ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.cpp DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQMIServiceBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQMIServiceBuffer (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::sQMIServiceBuffer( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQMIServiceBuffer::Validate(); } /*=========================================================================== METHOD: ~sQMIServiceBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::~sQMIServiceBuffer() { // Nothing to do } /*=========================================================================== METHOD: GetResult (Public Method) DESCRIPTION: Return contents of mandatory result content PARAMETERS: returnCode [ I ] - The return code (should be eQMIResultCode) errorCode [ I ] - The error code (should be eQMIErrorCode) RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::GetResult( ULONG & returnCode, ULONG & errorCode ) { if (IsResponse() == false) { return false; } std::map ::const_iterator pIter; pIter = mContents.find( QMI_TLV_ID_RESULT ); if (pIter == mContents.end()) { return false; } const sQMIRawContentHeader * pContent = pIter->second; if (pContent == 0) { ASSERT( 0 ); return false; } if (pContent->mLength != 4) { return false; } const WORD * pData = (const WORD *)(++pContent); returnCode = (ULONG)*pData++; errorCode = (ULONG)*pData; return true; } /*=========================================================================== METHOD: BuildBuffer (Static Public Method) DESCRIPTION: Build a QMI request PARAMETERS: serviceType [ I ] - QMI service type msgID [ I ] - The QMI message request ID bResponse [ I ] - Build a response? bIndication [ I ] - Build an indication? pPayload [ I ] - Payload payloadLen [ I ] - Size of above payload RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQMIServiceBuffer::BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse, bool bIndication, const BYTE * pPayload, ULONG payloadLen ) { const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG totalHdrSz = szTransHdr + szMsgHdr; // Truncate payload? if (payloadLen > (QMI_MAX_BUFFER_SIZE - totalHdrSz)) { payloadLen = QMI_MAX_BUFFER_SIZE - totalHdrSz; } // Make sure length agrees with pointer if (pPayload == 0) { payloadLen = 0; } // Allocate buffer PBYTE pBuffer = new BYTE[payloadLen + totalHdrSz]; if (pBuffer == 0) { return 0; } // Format header sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)&pBuffer[0]; pHdr->mCompound = 0; pHdr->mResponse = 0; pHdr->mIndication = 0; pHdr->mReserved = 0; pHdr->mTransactionID = 1; bool bTX = true; if (bResponse == true) { pHdr->mResponse = 1; bTX = false; } else if (bIndication == true) { pHdr->mIndication = 1; bTX = false; } pHdr++; // Format message header sQMIRawMessageHeader * pMsg = 0; pMsg = (sQMIRawMessageHeader *)pHdr; pMsg->mMessageID = msgID; pMsg->mLength = (WORD)payloadLen; // Copy in payload? if (payloadLen > 0 && pPayload != 0) { memcpy( (LPVOID)&pBuffer[totalHdrSz], (LPCVOID)&pPayload[0], (SIZE_T)payloadLen ); } // Compute total size ULONG sz = payloadLen + totalHdrSz; // Build and return the shared buffer eProtocolType pt = MapQMIServiceToProtocol( serviceType, bTX ); sSharedBuffer * pBuf = new sSharedBuffer( sz, pBuffer, pt ); return pBuf; } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (IsQMIProtocol( pt ) == false) { mbValid = bRC; return bRC; } const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szContentHdr = (ULONG)sizeof(sQMIRawContentHeader); // Must be enough space for both headers ULONG sz = GetSize(); if (sz < szTransHdr + szMsgHdr) { mbValid = bRC; return bRC; } const BYTE * pBuffer = GetBuffer(); // Obtain transaction header const sQMIServiceRawTransactionHeader * pTransHdr = 0; pTransHdr = (const sQMIServiceRawTransactionHeader *)pBuffer; pBuffer += szTransHdr; // This is required to be 0 if (pTransHdr->mCompound != 0) { mbValid = bRC; return bRC; } // These are mutually exclusive if (pTransHdr->mIndication == 1 && pTransHdr->mResponse == 1) { mbValid = bRC; return bRC; } // Requests/responses required valid transaction IDs if ( (pTransHdr->mIndication == 0) && (pTransHdr->mTransactionID == (WORD)INVALID_QMI_TRANSACTION_ID) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 1 || pTransHdr->mIndication == 1) && (IsQMIProtocolRX( pt ) == false) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 0 && pTransHdr->mIndication == 0) && (IsQMIProtocolTX( pt ) == false) ) { mbValid = bRC; return bRC; } // Obtain message header const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (const sQMIRawMessageHeader *)pBuffer; pBuffer += szMsgHdr; // Validate reported length if (sz != ((ULONG)pMsgHdr->mLength + szTransHdr + szMsgHdr)) { mbValid = bRC; return bRC; } // Extract content TLV structures ULONG contentProcessed = 0; ULONG contentSz = (ULONG)pMsgHdr->mLength; while (contentProcessed < contentSz) { const sQMIRawContentHeader * pContent = 0; pContent = (const sQMIRawContentHeader *)pBuffer; ULONG tlvLen = szContentHdr + pContent->mLength; contentProcessed += tlvLen; if (contentProcessed <= contentSz) { mContents[(ULONG)pContent->mTypeID] = pContent; } else { mContents.clear(); mbValid = bRC; return bRC; } pBuffer += tlvLen; } // Validate TLV reported lengths if (contentProcessed != contentSz) { mbValid = bRC; return bRC; } // Success! bRC = true; mbValid = bRC; return mbValid; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QMIBuffers.h000077500000000000000000000266061455567757300224050ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.h DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMUXHeader sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIEnum.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QMI maximum buffer size (cannot be larger than MAX_SHARED_BUFFER_SIZE) const ULONG QMI_MAX_BUFFER_SIZE = MAX_SHARED_BUFFER_SIZE; // Content ID for mandatory result TLV const ULONG QMI_TLV_ID_RESULT = 2; /*=========================================================================== METHOD: MapQMIServiceToProtocol (Inline Method) DESCRIPTION: Map QMI service type (eQMIService) and direction to a protocol type (eProtocolType) PARAMETERS: serviceType [ I ] - Enum value being mapped bTransmission [ I ] - IS this a transmission (TX vs. RX)? RETURN VALUE: bool ===========================================================================*/ inline eProtocolType MapQMIServiceToProtocol( eQMIService serviceType, bool bTransmission = true ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; switch (serviceType) { case eQMI_SVC_WDS: pt = ePROTOCOL_QMI_WDS_RX; break; case eQMI_SVC_DMS: pt = ePROTOCOL_QMI_DMS_RX; break; case eQMI_SVC_NAS: pt = ePROTOCOL_QMI_NAS_RX; break; case eQMI_SVC_QOS: pt = ePROTOCOL_QMI_QOS_RX; break; case eQMI_SVC_WMS: pt = ePROTOCOL_QMI_WMS_RX; break; case eQMI_SVC_PDS: pt = ePROTOCOL_QMI_PDS_RX; break; case eQMI_SVC_AUTH: pt = ePROTOCOL_QMI_AUTH_RX; break; case eQMI_SVC_VOICE: pt = ePROTOCOL_QMI_VOICE_RX; break; case eQMI_SVC_CAT: pt = ePROTOCOL_QMI_CAT_RX; break; case eQMI_SVC_RMS: pt = ePROTOCOL_QMI_RMS_RX; break; case eQMI_SVC_OMA: pt = ePROTOCOL_QMI_OMA_RX; break; case eQMI_SVC_CONTROL: pt = ePROTOCOL_QMI_CTL_RX; break; } if (pt != ePROTOCOL_ENUM_BEGIN && bTransmission == true) { // This relies on the fact the the TX variant is always the next // enumerated value after the RX variant (so don't do something // to change that) pt = (eProtocolType)((ULONG)pt + 1); } return pt; }; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQMUXHeader // Struct to represent a QMUX transaction header (raw) /*=========================================================================*/ struct sQMUXHeader { public: WORD mLength; BYTE mFlags; BYTE mServiceType; BYTE mClientID; }; /*=========================================================================*/ // Struct sQMIControlRawTransactionHeader // Struct to represent a QMI control transaction header (raw) /*=========================================================================*/ struct sQMIControlRawTransactionHeader { public: BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 6; BYTE mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIServiceRawTransactionHeader // Struct to represent a QMI service transaction header (raw) /*=========================================================================*/ struct sQMIServiceRawTransactionHeader { public: BYTE mCompound : 1; // Is this a compound transaction? BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 5; WORD mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIRawMessageHeader // Struct to represent a QMI (control/service) message header (raw) /*=========================================================================*/ struct sQMIRawMessageHeader { public: WORD mMessageID; // Message ID WORD mLength; // Length of message (not including this header) }; /*=========================================================================*/ // Struct sQMIRawContentHeader // Struct to represent a QMI (control/service) content // (i.e Type/Length/Value, TLV) header (raw) /*=========================================================================*/ struct sQMIRawContentHeader { public: BYTE mTypeID; // Content type ID WORD mLength; // Content length (not including this header) }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQMIServiceBuffer // Struct to represent a QMI service channel request/response/indication // (shared buffer) /*=========================================================================*/ struct sQMIServiceBuffer : public sProtocolBuffer { public: // Constructor sQMIServiceBuffer( sSharedBuffer * pBuffer ); // Destructor virtual ~sQMIServiceBuffer(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bRequest = (pHdr->mResponse == 0 && pHdr->mIndication == 0); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bResponse = (pHdr->mResponse == 1); } return bResponse; }; // (Inline) Is this an indication? bool IsIndication() const { bool bInd = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bInd = (pHdr->mIndication == 1); } return bInd; }; // (Inline) Return raw header const sQMIServiceRawTransactionHeader * GetHeader() const { const sQMIServiceRawTransactionHeader * pHdr = 0; if (IsValid() == true) { pHdr = (const sQMIServiceRawTransactionHeader *)GetBuffer(); } return pHdr; }; // (Inline) Return the message ID ULONG GetMessageID() const { ULONG id = (ULONG)ULONG_MAX; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; id = pMsgHdr->mMessageID; } return id; }; // (Inline) Return the transaction ID WORD GetTransactionID() const { WORD id = (WORD)INVALID_QMI_TRANSACTION_ID; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { id = pHdr->mTransactionID; } return id; }; // (Inline) Return content structures std::map GetContents() const { return mContents; }; // Return contents of mandatory result content bool GetResult( ULONG & returnCode, ULONG & errorCode ); // Build a QMI request/response/indication static sSharedBuffer * BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse = false, bool bIndication = false, const BYTE * pData = 0, ULONG dataLen = 0 ); protected: // QMI protocol server has to be able to set the transaction ID friend class cQMIProtocolServer; // Set the transaction ID void SetTransactionID( WORD tid ) const { if (tid == (WORD)INVALID_QMI_TRANSACTION_ID || IsValid() == false) { return; } sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)GetHeader(); if (pHdr != 0) { pHdr->mTransactionID = tid; } }; // Is this QMI request/response/indication packet valid? virtual bool Validate(); /* Content TLV structures (indexed by type ID) */ std::map mContents; private: // Prevent 'upcopying' sQMIServiceBuffer( const sProtocolBuffer & ); sQMIServiceBuffer & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QMIEnum.h000077500000000000000000001324411455567757300217100ustar00rootroot00000000000000/*=========================================================================== FILE: QMIEnum.h DESCRIPTION: QMI protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQMIService eQMIMessageCTL eQMIMessageWDS eQMIMessageDMS eQMIMessageNAS eQMIMessageWMS eQMIMessagePDS eQMIMessageAUTH eQMIMessageCAT eQMIMessageRMS eQMIMessageOMA eQMIResultCode eQMIErrorCode eQMICallEndReason Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid QMI transaction ID const ULONG INVALID_QMI_TRANSACTION_ID = 0; // QMI DMS PRL size constants const ULONG QMI_DMS_MAX_PRL_SIZE = 16384; const ULONG QMI_DMS_MAX_PRL_BLOCK = 256; /*=========================================================================*/ // eQMIService Enumeration // QMI Service Type Enumeration /*=========================================================================*/ enum eQMIService { eQMI_SVC_ENUM_BEGIN = -1, eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_VOICE = 9, // 009 Voice service eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service eQMI_SVC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIService validity check PARAMETERS: svc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIService svc ) { bool retVal = false; if ( (svc > eQMI_SVC_ENUM_BEGIN && svc <= eQMI_SVC_AUTH) || (svc == eQMI_SVC_VOICE) || (svc >= eQMI_SVC_CAT && svc < eQMI_SVC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCTL Enumeration // QMI Control Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCTL { eQMI_CTL_ENUM_BEGIN = -1, eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode eQMI_CTL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCTL validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCTL msgID ) { bool retVal = false; if (msgID >= eQMI_CTL_SET_INSTANCE_ID && msgID < eQMI_CTL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDS Enumeration // QMI WDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDS { eQMI_WDS_ENUM_BEGIN = -1, eQMI_WDS_RESET, // 00 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 01 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 01 Connection state report indication eQMI_WDS_ABORT, // 02 Abort previously issued WDS command eQMI_WDS_START_NET = 32, // 32 Start WDS network interface eQMI_WDS_STOP_NET, // 33 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 34 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 34 Packet data connection status indication eQMI_WDS_GET_RATES, // 35 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 36 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 37 Go dormant eQMI_WDS_G0_ACTIVE, // 38 Go active eQMI_WDS_CREATE_PROFILE, // 39 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 40 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 41 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 42 Get all profiles eQMI_WDS_GET_PROFILE, // 43 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 44 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 45 Get the runtime data session settings eQMI_WDS_SET_MIP, // 46 Get the mobile IP setting eQMI_WDS_GET_MIP, // 47 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 48 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 52 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 53 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 54 Get the modem status eQMI_WDS_MODEM_IND = 54, // 54 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 55 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 56 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 56 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 60 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 61 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 62 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 63 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 64 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 65 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 66 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 67 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 68 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 69 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 70 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 71 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 72 Get maximum size of call history list eQMI_WDS_SET_IP_FAMILY = 77, // 77 Set the client IP family preference eQMI_WDS_SET_AUTOCONNECT = 81, // 81 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 82 Get the DNS setting eQMI_WDS_SET_DNS, // 83 Set the DNS setting eQMI_WDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDS msgID ) { bool retVal = false; if ( (msgID > eQMI_WDS_ENUM_BEGIN && msgID <= eQMI_WDS_ABORT) || (msgID >= eQMI_WDS_START_NET && msgID <= eQMI_WDS_GET_DORMANCY) || (msgID >= eQMI_WDS_GET_AUTOCONNECT && msgID <= eQMI_WDS_MODEM_INFO_IND) || (msgID >= eQMI_WDS_GET_ACTIVE_MIP && msgID <= eQMI_WDS_GET_CALL_LIST_MAX) || (msgID == eQMI_WDS_SET_IP_FAMILY) || (msgID >= eQMI_WDS_SET_AUTOCONNECT && msgID < eQMI_WDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageDMS Enumeration // QMI DMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageDMS { eQMI_DMS_ENUM_BEGIN = -1, eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERTAING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mod eQMI_DMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageDMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageDMS msgID ) { bool retVal = false; if ( (msgID > eQMI_DMS_ENUM_BEGIN && msgID <= eQMI_DMS_EVENT_IND) || (msgID >= eQMI_DMS_GET_CAPS && msgID < eQMI_DMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageNAS Enumeration // QMI NAS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageNAS { eQMI_NAS_ENUM_BEGIN = -1, eQMI_NAS_RESET, // 00 Reset NAS service state variables eQMI_NAS_ABORT, // 01 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 02 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 02 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 03 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 32 Get the signal strength eQMI_NAS_SCAN_NETS, // 33 Scan for visible network eQMI_NAS_REGISTER_NET, // 34 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 35 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 36 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 36 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 37 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 38 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 39 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 40 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 41 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 42 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 43 Get the technology preference eQMI_NAS_GET_ACCOLC, // 44 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 45 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 46 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 47 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 48 Set various network parameters eQMI_NAS_GET_RF_INFO, // 49 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 50 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 51 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 52 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 52 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 55 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 56 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 56 DDTM preference indication eQMI_NAS_GET_PLMN_MODE = 59, // 59 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 60 CSP PLMN mode bit indication eQMI_NAS_GET_PLMN_NAME = 68, // 68 Get operator name for specified network eQMI_NAS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageNAS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageNAS msgID ) { bool retVal = false; if ( (msgID > eQMI_NAS_ENUM_BEGIN && msgID <= eQMI_NAS_SET_REG_EVENT) || (msgID >= eQMI_NAS_GET_RSSI && msgID <= eQMI_NAS_SYS_SELECT_IND) || (msgID >= eQMI_NAS_SET_DDTM_PREF && msgID <= eQMI_NAS_DDTM_IND) || (msgID >= eQMI_NAS_GET_PLMN_MODE && msgID <= eQMI_NAS_PLMN_MODE_IND) || (msgID >= eQMI_NAS_GET_PLMN_NAME && msgID < eQMI_NAS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWMS Enumeration // QMI WMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWMS { eQMI_WMS_ENUM_BEGIN = -1, eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWMS msgID ) { bool retVal = false; if ( (msgID > eQMI_WMS_ENUM_BEGIN && msgID <= eQMI_WMS_EVENT_IND) || (msgID >= eQMI_WMS_RAW_SEND && msgID <= eQMI_WMS_DELETE) || (msgID >= eQMI_WMS_GET_MSG_PROTOCOL && msgID < eQMI_WMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDS Enumeration // QMI PDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDS { eQMI_PDS_ENUM_BEGIN = -1, eQMI_PDS_RESET, // 00 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 01 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 01 PDS report indication eQMI_PDS_GET_STATE = 32, // 32 Return PDS service state eQMI_PDS_STATE_IND = 32, // 32 PDS service state indication eQMI_PDS_SET_STATE, // 33 Set PDS service state eQMI_PDS_START_SESSION, // 34 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 35 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 36 Manual tracking session position eQMI_PDS_END_SESSION, // 37 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 38 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 39 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 40 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 41 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 42 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 43 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 44 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 45 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 46 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 47 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 48 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 49 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 50 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 51 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 52 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 53 Request single position fix eQMI_PDS_GET_VERSION, // 54 Get PDS service version eQMI_PDS_INJECT_XTRA, // 55 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 56 Inject position data eQMI_PDS_INJECT_WIFI, // 57 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 58 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 59 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 60 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 61 Inject absolute time eQMI_PDS_INJECT_EFS, // 62 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 63 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 64 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 65 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 66 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 67 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 68 Get GPS state eQMI_PDS_GET_METHODS = 80, // 80 Get GPS position methods state eQMI_PDS_SET_METHODS, // 81 Set GPS position methods state eQMI_PDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDS msgID ) { bool retVal = false; if ( (msgID > eQMI_PDS_ENUM_BEGIN && msgID <= eQMI_PDS_EVENT_IND) || (msgID >= eQMI_PDS_GET_STATE && msgID <= eQMI_PDS_GET_GPS_STATE) || (msgID >= eQMI_PDS_GET_METHODS && msgID < eQMI_PDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAUTH Enumeration // QMI Authentication Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAUTH { eQMI_AUTH_ENUM_BEGIN = -1, eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_ENUM_END }; /*=========================================================================*/ // eQMIMessageVoice Enumeration // QMI Voice Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageVoice { eQMI_VOICE_ENUM_BEGIN = -1, eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageVoice validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageVoice msgID ) { bool retVal = false; if ( (msgID == eQMI_VOICE_INDICATION_REG) || (msgID >= eQMI_VOICE_CALL_ORIGINATE && msgID <= eQMI_VOICE_CALL_ANSWER) || (msgID >= eQMI_VOICE_GET_CALL_INFO && msgID <= eQMI_VOICE_GET_ALL_STATUS) || (msgID >= eQMI_VOICE_MANAGE_CALLS && msgID < eQMI_VOICE_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAUTH validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAUTH msgID ) { bool retVal = false; if (msgID >= eQMI_AUTH_START_EAP && msgID < eQMI_AUTH_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCAT Enumeration // QMI CAT Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCAT { eQMI_CAT_ENUM_BEGIN = -1, eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCAT msgID ) { bool retVal = false; if ( (msgID > eQMI_CAT_ENUM_BEGIN && msgID <= eQMI_CAT_EVENT_IND) || (msgID >= eQMI_CAT_GET_STATE && msgID < eQMI_CAT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMS Enumeration // QMI RMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMS { eQMI_RMS_ENUM_BEGIN = -1, eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE, // 33 Set SMS wake settings eQMI_RMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMS msgID ) { bool retVal = false; if ( (msgID == eQMI_RMS_RESET) || (msgID >= eQMI_RMS_GET_SMS_WAKE && msgID < eQMI_RMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageOMA Enumeration // QMI OMA-DM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageOMA { eQMI_OMA_ENUM_BEGIN = -1, eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES, // 37 Set feature settings eQMI_OMA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageOMA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageOMA msgID ) { bool retVal = false; if ( (msgID > eQMI_OMA_ENUM_BEGIN && msgID <= eQMI_OMA_EVENT_IND) || (msgID >= eQMI_OMA_START_SESSION && msgID < eQMI_OMA_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIResultCode Enumeration // QMI Result Code Enumeration /*=========================================================================*/ enum eQMIResultCode { eQMI_RC_ENUM_BEGIN = -1, eQMI_RC_SUCCESS, // 00 Success eQMI_RC_ERROR, // 01 Error eQMI_RC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIResultCode validity check PARAMETERS: rc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIResultCode rc ) { bool retVal = false; if (rc > eQMI_RC_ENUM_BEGIN && rc < eQMI_RC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIErrorCode Enumeration // QMI Error Code Enumeration /*=========================================================================*/ enum eQMIErrorCode { eQMI_ERR_ENUM_BEGIN = -1, eQMI_ERR_NONE, // 00 eQMI_ERR_MALFORMED_MSG, // 01 eQMI_ERR_NO_MEMORY, // 02 eQMI_ERR_INTERNAL, // 03 eQMI_ERR_ABORTED, // 04 eQMI_ERR_CLIENT_IDS_EXHAUSTED, // 05 eQMI_ERR_UNABORTABLE_TRANSACTION, // 06 eQMI_ERR_INVALID_CLIENT_ID, // 07 eQMI_ERR_NO_THRESHOLDS, // 08 eQMI_ERR_INVALID_HANDLE, // 09 eQMI_ERR_INVALID_PROFILE, // 10 eQMI_ERR_INVALID_PIN_ID, // 11 eQMI_ERR_INCORRECT_PIN, // 12 eQMI_ERR_NO_NETWORK_FOUND, // 13 eQMI_ERR_CALL_FAILED, // 14 eQMI_ERR_OUT_OF_CALL, // 15 eQMI_ERR_NOT_PROVISIONED, // 16 eQMI_ERR_MISSING_ARG, // 17 eQMI_ERR_18, // 18 eQMI_ERR_ARG_TOO_LONG, // 19 eQMI_ERR_20, // 20 eQMI_ERR_21, // 21 eQMI_ERR_INVALID_TX_ID, // 22 eQMI_ERR_DEVICE_IN_USE, // 23 eQMI_ERR_OP_NETWORK_UNSUPPORTED, // 24 eQMI_ERR_OP_DEVICE_UNSUPPORTED, // 25 eQMI_ERR_NO_EFFECT, // 26 eQMI_ERR_NO_FREE_PROFILE, // 27 eQMI_ERR_INVALID_PDP_TYPE, // 28 eQMI_ERR_INVALID_TECH_PREF, // 29 eQMI_ERR_INVALID_PROFILE_TYPE, // 30 eQMI_ERR_INVALID_SERVICE_TYPE, // 31 eQMI_ERR_INVALID_REGISTER_ACTION, // 32 eQMI_ERR_INVALID_PS_ATTACH_ACTION, // 33 eQMI_ERR_AUTHENTICATION_FAILED, // 34 eQMI_ERR_PIN_BLOCKED, // 35 eQMI_ERR_PIN_ALWAYS_BLOCKED, // 36 eQMI_ERR_UIM_UNINITIALIZED, // 37 eQMI_ERR_MAX_QOS_REQUESTS_IN_USE, // 38 eQMI_ERR_INCORRECT_FLOW_FILTER, // 39 eQMI_ERR_NETWORK_QOS_UNAWARE, // 40 eQMI_ERR_INVALID_QOS_ID, // 41 eQMI_ERR_REQUESTED_NUM_UNSUPPORTED, // 42 eQMI_ERR_INTERFACE_NOT_FOUND, // 43 eQMI_ERR_FLOW_SUSPENDED, // 44 eQMI_ERR_INVALID_DATA_FORMAT, // 45 eQMI_ERR_GENERAL, // 46 eQMI_ERR_UNKNOWN, // 47 eQMI_ERR_INVALID_ARG, // 48 eQMI_ERR_INVALID_INDEX, // 49 eQMI_ERR_NO_ENTRY, // 50 eQMI_ERR_DEVICE_STORAGE_FULL, // 51 eQMI_ERR_DEVICE_NOT_READY, // 52 eQMI_ERR_NETWORK_NOT_READY, // 53 eQMI_ERR_WMS_CAUSE_CODE, // 54 eQMI_ERR_WMS_MESSAGE_NOT_SENT, // 55 eQMI_ERR_WMS_MESSAGE_DELIVERY_FAILURE, // 56 eQMI_ERR_WMS_INVALID_MESSAGE_ID, // 57 eQMI_ERR_WMS_ENCODING, // 58 eQMI_ERR_AUTHENTICATION_LOCK, // 59 eQMI_ERR_INVALID_TRANSITION, // 60 eQMI_ERR_61, // 61 eQMI_ERR_62, // 62 eQMI_ERR_63, // 63 eQMI_ERR_64, // 64 eQMI_ERR_SESSION_INACTIVE, // 65 eQMI_ERR_SESSION_INVALID, // 66 eQMI_ERR_SESSION_OWNERSHIP, // 67 eQMI_ERR_INSUFFICIENT_RESOURCES, // 68 eQMI_ERR_DISABLED, // 69 eQMI_ERR_INVALID_OPERATION, // 70 eQMI_ERR_INVALID_QMI_CMD, // 71 eQMI_ERR_WMS_TPDU_TYPE, // 72 eQMI_ERR_WMS_SMSC_ADDR, // 73 eQMI_ERR_INFO_UNAVAILABLE, // 74 eQMI_ERR_SEGMENT_TOO_LONG, // 75 eQMI_ERR_SEGMENT_ORDER, // 76 eQMI_ERR_BUNDLING_NOT_SUPPORTED, // 77 eQMI_ERR_78, // 78 eQMI_ERR_POLICY_MISMATCH, // 79 eQMI_ERR_SIM_FILE_NOT_FOUND, // 80 eQMI_ERR_EXTENDED_EXTERNAL, // 81 eQMI_ERR_ACCESS_DENIED, // 82 eQMI_ERR_HARDWARE_RESTRICTED, // 83 eQMI_ERR_ACK_NOT_SENT, // 84 eQMI_ERR_INCOMPATIBLE_STATE = 90, // 90 eQMI_ERR_FDN_RESTRICT, // 91 eQMI_ERR_SUPS_FAILURE_CAUSE, // 92 eQMI_ERR_NO_RADIO, // 93 eQMI_ERR_NOT_SUPPORTED, // 94 eQMI_ERR_CARD_CALL_CONTROL_FAILED = 96, // 96 eQMI_ERR_NETWORK_ABORTED, // 97 eQMI_ERR_CAT_EVT_REG_FAILED, // 61441 eQMI_ERR_CAT_INVALID_TR, // 61442 eQMI_ERR_CAT_INVALID_ENV_CMD, // 61443 eQMI_ERR_CAT_ENV_CMD_BUSY, // 61444 eQMI_ERR_CAT_ENV_CMD_FAIL, // 61445 eQMI_ERR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIErrorCode validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIErrorCode ec ) { bool retVal = false; if ( (ec > eQMI_ERR_ENUM_BEGIN && ec <= eQMI_ERR_ACK_NOT_SENT) || (ec >= eQMI_ERR_INCOMPATIBLE_STATE && ec <= eQMI_ERR_NOT_SUPPORTED) || (ec == eQMI_ERR_CARD_CALL_CONTROL_FAILED) || (ec == eQMI_ERR_NETWORK_ABORTED) || (ec >= eQMI_ERR_CAT_EVT_REG_FAILED && ec < eQMI_ERR_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMICallEndReason Enumeration // QMI Call End Reason Enumeration /*=========================================================================*/ enum eQMICallEndReason { eQMI_CALL_END_REASON_BEGIN = -1, // General eQMI_CALL_END_REASON_UNSPECIFIED = 1, // 1 eQMI_CALL_END_REASON_CLIENT_END, // 2 eQMI_CALL_END_REASON_NO_SRV, // 3 eQMI_CALL_END_REASON_FADE, // 4 eQMI_CALL_END_REASON_REL_NORMAL, // 5 eQMI_CALL_END_REASON_ACC_IN_PROG, // 6 eQMI_CALL_END_REASON_ACC_FAIL, // 7 eQMI_CALL_END_REASON_REDIR_OR_HANDOFF, // 8 eQMI_CALL_END_REASON_CLOSE_IN_PROGRESS, // 9 eQMI_CALL_END_REASON_AUTH_FAILED, // 10 eQMI_CALL_END_REASON_INTERNAL, // 11 // CDMA eQMI_CALL_END_REASON_CDMA_LOCK = 500, // 500 eQMI_CALL_END_REASON_INTERCEPT, // 501 eQMI_CALL_END_REASON_REORDER, // 502 eQMI_CALL_END_REASON_REL_SO_REJ, // 503 eQMI_CALL_END_REASON_INCOM_CALL, // 504 eQMI_CALL_END_REASON_ALERT_STOP, // 505 eQMI_CALL_END_REASON_ACTIVATION, // 506 eQMI_CALL_END_REASON_MAX_ACCESS_PROBE, // 507 eQMI_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS, // 508 eQMI_CALL_END_REASON_NO_RESPONSE_FROM_BS, // 509 eQMI_CALL_END_REASON_REJECTED_BY_BS, // 510 eQMI_CALL_END_REASON_INCOMPATIBLE, // 511 eQMI_CALL_END_REASON_ALREADY_IN_TC, // 512 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_GPS, // 513 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_SMS, // 514 eQMI_CALL_END_REASON_NO_CDMA_SRV, // 515 // GSM/WCDMA eQMI_CALL_END_REASON_CONF_FAILED = 1000, // 1000 eQMI_CALL_END_REASON_INCOM_REJ, // 1001 eQMI_CALL_END_REASON_NO_GW_SRV, // 1002 eQMI_CALL_END_REASON_NETWORK_END, // 1003 eQMI_CALL_END_REASON_LLC_SNDCP_FAILURE, // 1004 eQMI_CALL_END_REASON_INSUFFICIENT_RESOURCES, // 1005 eQMI_CALL_END_REASON_OPTION_TEMP_OOO, // 1006 eQMI_CALL_END_REASON_NSAPI_ALREADY_USED, // 1007 eQMI_CALL_END_REASON_REGULAR_DEACTIVATION, // 1008 eQMI_CALL_END_REASON_NETWORK_FAILURE, // 1009 eQMI_CALL_END_REASON_UMTS_REATTACH_REQ, // 1010 eQMI_CALL_END_REASON_UMTS_PROTOCOL_ERROR, // 1011 eQMI_CALL_END_REASON_OPERATOR_BARRING, // 1012 eQMI_CALL_END_REASON_UNKNOWN_APN, // 1013 eQMI_CALL_END_REASON_UNKNOWN_PDP, // 1014 eQMI_CALL_END_REASON_GGSN_REJECT, // 1015 eQMI_CALL_END_REASON_ACTIVATION_REJECT, // 1016 eQMI_CALL_END_REASON_OPTION_NOT_SUPPORTED, // 1017 eQMI_CALL_END_REASON_OPTION_UNSUBSCRIBED, // 1018 eQMI_CALL_END_REASON_QOS_NOT_ACCEPTED, // 1019 eQMI_CALL_END_REASON_TFT_SEMANTIC_ERROR, // 1020 eQMI_CALL_END_REASON_TFT_SYNTAX_ERROR, // 1021 eQMI_CALL_END_REASON_UNKNOWN_PDP_CONTEXT, // 1022 eQMI_CALL_END_REASON_FILTER_SEMANTIC_ERROR, // 1023 eQMI_CALL_END_REASON_FILTER_SYNTAX_ERROR, // 1024 eQMI_CALL_END_REASON_PDP_WITHOUT_ACTIVE_TFT, // 1025 eQMI_CALL_END_REASON_INVALID_TRANSACTION_ID, // 1026 eQMI_CALL_END_REASON_MESSAGE_SEMANTIC_ERROR, // 1027 eQMI_CALL_END_REASON_INVALID_MANDATORY_INFO, // 1028 eQMI_CALL_END_REASON_TYPE_UNSUPPORTED, // 1029 eQMI_CALL_END_REASON_MSG_TYPE_WRONG_FOR_STATE, // 1030 eQMI_CALL_END_REASON_UNKNOWN_INFO_ELEMENT, // 1031 eQMI_CALL_END_REASON_CONDITIONAL_IE_ERROR, // 1032 eQMI_CALL_END_REASON_MSG_WRONG_FOR_PROTOCOL, // 1033 eQMI_CALL_END_REASON_APN_TYPE_CONFLICT, // 1034 eQMI_CALL_END_REASON_NO_GPRS_CONTEXT, // 1035 eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED, // 1036 // CDMA 1xEV-DO (HDR) eQMI_CALL_END_REASON_CD_GEN_OR_BUSY = 1500, // 1500 eQMI_CALL_END_REASON_CD_BILL_OR_AUTH, // 1501 eQMI_CALL_END_REASON_CHG_HDR, // 1502 eQMI_CALL_END_REASON_EXIT_HDR, // 1503 eQMI_CALL_END_REASON_HDR_NO_SESSION , // 1504 eQMI_CALL_END_REASON_HDR_ORIG_DURING_GPS_FIX, // 1505 eQMI_CALL_END_REASON_HDR_CS_TIMEOUT , // 1506 eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM, // 1507 eQMI_CALL_END_REASON_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMICallEndReason validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMICallEndReason err ) { if ( (err >= eQMI_CALL_END_REASON_UNSPECIFIED) && (err <= eQMI_CALL_END_REASON_INTERNAL) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CDMA_LOCK) && (err <= eQMI_CALL_END_REASON_NO_CDMA_SRV) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CONF_FAILED) && (err <= eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CD_GEN_OR_BUSY) && (err <= eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM) ) { return true; } return false; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QMIProtocolServer.cpp000077500000000000000000000265601455567757300243330ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIProtocolServer.h" #include "QMIBuffers.h" /*=========================================================================*/ // cQMIProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQMIProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: serviceType [ I ] - QMI service type requested bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( MapQMIServiceToProtocol( serviceType, false ), MapQMIServiceToProtocol( serviceType, true ), bufferSzRx, logSz ), mLastTID( (WORD)INVALID_QMI_TRANSACTION_ID ), mService( serviceType ), mMEID( "" ) { // Nothing to do } /*=========================================================================== METHOD: ~cQMIProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::~cQMIProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the configured QMI service using the given QMI control file PARAMETERS: pControlFile [ I ] - QMI control file SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::Connect( LPCSTR pControlFile ) { // Assume failure bool bRC = false; if (IsValid( mService ) == false || mService == eQMI_SVC_CONTROL) { return bRC; } // Store the MEID mMEID = GetDeviceMEID( pControlFile ); // Pass service file to base class for actual connection bRC = cProtocolServer::Connect( pControlFile ); if (bRC == false) { TRACE( "QMI connect %d failed\n", mService ); } return bRC; } /*=========================================================================== METHOD: GetDeviceMEID (Internal Method) DESCRIPTION: Get device MEID by interfacing to the given QMI control file PARAMETERS: deviceNode [ I ] - QMI device node SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: std::string (empty upon failure) ===========================================================================*/ std::string cQMIProtocolServer::GetDeviceMEID( std::string deviceNode ) { std::string retStr = ""; int devHandle = open( deviceNode.c_str(), 0 ); if (devHandle == INVALID_HANDLE_VALUE) { return retStr; } char devMEID[15]; memset( &devMEID[0], 0, 15 ); if (ioctl( devHandle, QMI_GET_MEID_IOCTL, &devMEID[0] ) != 0) { close( devHandle ); return retStr; } // Enforce null devMEID[14] = 0; retStr = &devMEID[0]; close( devHandle ); } /*=========================================================================== METHOD: ValidateRequest (Internal Method) DESCRIPTION: Validate a request that is about to be scheduled SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::ValidateRequest( const sProtocolRequest & req ) { if (cProtocolServer::ValidateRequest( req ) == false) { return false; } sQMIServiceBuffer qmiReq( req.GetSharedBuffer() ); return qmiReq.IsValid(); } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::InitializeComm() { // Setup the QMI Service type int result = mComm.RunIOCTL( QMI_GET_SERVICE_FILE_IOCTL, (void*)(unsigned long)mService ); if (result == 0) { return true; } else { return false; } } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::CleanupComm() { // Nothing to actually do here return true; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into QMI indications/responses PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response (not used) bAbortTx [ O ] - Response aborts current transmission? (not used) SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cQMIProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; bAbortTx = false; // Something to decode from? if (bytesReceived == 0) { return bRC; } // Set protocol type (we have to be dealing with a valid QMI service) eProtocolType pt = MapQMIServiceToProtocol( mService, false ); if (pt == ePROTOCOL_ENUM_BEGIN) { return bRC; } sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxBuffer, bytesReceived, pt ); if (pTmp != 0) { sQMIServiceBuffer tmpBuf( pTmp ); if (tmpBuf.IsValid() == true) { rspIdx = mLog.AddBuffer( tmpBuf ); if (IsResponse( tmpBuf ) == true) { bRC = true; } else { rspIdx = INVALID_LOG_INDEX; } } } return bRC; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encode data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQMIProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { WORD tid = ++mLastTID; if (tid == (WORD)INVALID_QMI_TRANSACTION_ID) { tid++; } sQMIServiceBuffer tmpBuf( pBuffer ); tmpBuf.SetTransactionID( tid ); // No actual encoding required as we alter the original request bEncoded = false; return 0; }; /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } sQMIServiceBuffer qmiReq( mpActiveRequest->mRequest.GetSharedBuffer() ); sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiReq.IsValid() == false || qmiRsp.IsValid() == false) { return bRC; } if (qmiRsp.IsResponse() == false) { return bRC; } WORD reqID = qmiReq.GetTransactionID(); WORD rspID = qmiRsp.GetTransactionID(); if ( (reqID == (WORD)INVALID_QMI_TRANSACTION_ID) || (rspID == (WORD)INVALID_QMI_TRANSACTION_ID) || (reqID != rspID) ) { return bRC; } // Sadly there are documentated cases of firmware returning responses // with a matching transaction ID but a mismatching message ID. There // is no reason for this to be considered valid behavior as of yet ULONG reqMsgID = qmiReq.GetMessageID(); ULONG rspMsgID = qmiRsp.GetMessageID(); if (reqMsgID != rspMsgID) { return bRC; } bRC = true; return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/QMIProtocolServer.h000077500000000000000000000111641455567757300237720ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQMIProtocolServer /*=========================================================================*/ class cQMIProtocolServer : public cProtocolServer { public: // Constructor cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQMIProtocolServer(); // Connect to the given QMI service using the configured QMI // control file bool Connect( LPCSTR pControlFile ); // (Inline) Return the device MEID std::string GetMEID() { return mMEID; }; // (Inline) Return the QMI service type eQMIService GetServiceType() { return mService; }; // Get device MEID by interfacing to the given device node static std::string GetDeviceMEID( std::string deviceNode ); protected: // Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ); // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // (Inline) Is the passed in data a response that aborts the // current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & /* rsp */ ) { // QMI doesn't necessarily require this return false; }; /* Current transaction ID */ SHORT mLastTID; /* Type of QMI service we are serving */ eQMIService mService; /* Device MEID */ std::string mMEID; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/SharedBuffer.cpp000077500000000000000000000247631455567757300233370ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.cpp DESCRIPTION: Shareable protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes sDiagBuffer Simple struct to represent a DIAG buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for DIAG command code specific DIAG buffers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "SharedBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Synchronization object struct sSharedBufferSync { public: // Constructor sSharedBufferSync() : mbInitialized( false ) { int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to init sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } mbInitialized = true; }; // Destructor ~sSharedBufferSync() { mbInitialized = false; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); } }; // Lock sync object void Lock() { if (mbInitialized == true) { int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to lock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // Unlock sync object void Unlock() { if (mbInitialized == true) { int nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to unlock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; protected: /* DIAG buffer critical section */ pthread_mutex_t mSyncSection; /* Has this object been initialized? */ bool mbInitialized; }; // Global (across all shared buffers) reference count guard sSharedBufferSync gRefCount; /*=========================================================================*/ // sSharedBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (copy passed in buffer) PARAMETERS: pDataToCopy [ I ] - The data buffer to copy (should be non-zero) dataLen [ I ] - The length of the above buffer (should be > 1) dataType [ I ] - Type of data (not used internal to class) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, data actually exists? if (pDataToCopy != 0) { // Yes, try to allocate memory mpData = new BYTE[dataLen]; if (mpData != 0) { // Now copy into our allocation memcpy( (PVOID)mpData, (LPCVOID)pDataToCopy, (SIZE_T)dataLen ); // Now set the size, we do this last so that our double // deletion logic is only applied if we had an allocation // in the first place mSize = dataLen; } } } } /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (assume ownership of passed in buffer) PARAMETERS: dataLen [ I ] - The length of the above buffer (should be > 1) pDataToOwn [ I ] - The data buffer to assume ownership of (should be non-zero) dataType [ I ] - Type of data (not used internal to class) NOTE: The order is intentionally reversed from the previous constructor to avoid any cases of mistaken identity (copy versus assume ownership) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Data actually exists? if (pDataToOwn != 0) { // Yes, length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, assume ownership of the passed in buffer mpData = pDataToOwn; mSize = dataLen; } else { // This data buffer is not acceptable to us, but we have assumed // ownership of the memory which we will now free delete [] pDataToOwn; } } } /*=========================================================================== METHOD: ~sSharedBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sSharedBuffer::~sSharedBuffer() { ASSERT( mRefCount == 0 ); // Buffer data to free? if (mpData != 0) { // Yes, zero first byte for caution and then delete it mpData[0] = 0; delete [] mpData; // Even more caution, zero out pointer mpData = 0; } else if (mSize != 0) { ASSERT( (PVOID)("Double deletion detected in ~sSharedBuffer") == 0 ); } } /*=========================================================================== METHOD: operator == (Public Method) DESCRIPTION: Equality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator == ( const sSharedBuffer & refBuf ) const { // Assume they are not equal bool bEq = false; // The buffers must be the same if (mpData == refBuf.mpData) { if (mSize == refBuf.mSize) { if (mRefCount == refBuf.mRefCount) { if (mType == refBuf.mType) { // The shared buffers are the same bEq = true; } } else { // Very odd - the buffers are the same, but not the ref count?!? ASSERT( 0 ); } } else { // Very odd - the buffers are the same, but not the size?!? ASSERT( 0 ); } } return bEq; } /*=========================================================================== METHOD: operator != (Public Method) DESCRIPTION: Inequality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator != ( const sSharedBuffer & refBuf ) const { if (*this == refBuf) { return false; } return true; } /*=========================================================================== METHOD: AddRef (Internal Method) DESCRIPTION: Increment reference count RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::AddRef() { gRefCount.Lock(); mRefCount++; gRefCount.Unlock(); } /*=========================================================================== METHOD: Release (Internal Method) DESCRIPTION: Release reference, delete if reference count zero RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::Release() { gRefCount.Lock(); ASSERT( mRefCount != 0 ); // Decrement reference count if (mRefCount > 0) { mRefCount--; } // ... and delete if reference count now 0 if (mRefCount == 0) { delete this; } gRefCount.Unlock(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/SharedBuffer.h000077500000000000000000000127671455567757300230050ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.h DESCRIPTION: Shareable buffer structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- struct sProtocolBuffer; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum size of a shared buffer const ULONG MAX_SHARED_BUFFER_SIZE = 1024 * 16 + 256; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sSharedBuffer // // Simple struct to represent a reference counted shareable (no copy) // buffer, as the basis for all buffer related classes // // NOTE: Do *NOT* create instances of this structure on the stack, it // must be dynamically allocated in order to function correctly /*=========================================================================*/ struct sSharedBuffer { public: // Constructor (copy passed in buffer) sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ); // Constructor (assume ownership of passed in buffer) sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ); // Destructor virtual ~sSharedBuffer(); // Equality operator bool operator == ( const sSharedBuffer & ) const; // Inequality operator bool operator != ( const sSharedBuffer & ) const; // (Inline) Get buffer const BYTE * GetBuffer() const { return mpData; }; // (Inline) Get buffer size ULONG GetSize() const { return mSize; }; // (Inline) Get buffer type ULONG GetType() const { return mType; }; // (Inline) Is this buffer valid? bool IsValid() const { return (mpData != 0 && IsValidSize( mSize )); }; // (Inline) Get reference count ULONG GetRefCount() const { return mRefCount; }; // (Static Inline) Is the passed in size within the allowable range // a shared buffer? static bool IsValidSize( ULONG sz ) { return (sz > 0 && sz <= MAX_SHARED_BUFFER_SIZE); }; protected: // Add reference void AddRef(); // Release reference, delete if reference count zero void Release(); /* Data */ PBYTE mpData; /* Size of data */ ULONG mSize; /* Type of data */ ULONG mType; /* Reference count */ ULONG mRefCount; private: // Leave copy constructor and assignment operator unimplemented // to prevent unintentional and unauthorized copying of the object // (which would lead to bad reference counting) sSharedBuffer( const sSharedBuffer & ); sSharedBuffer & operator = ( const sSharedBuffer & ); friend struct sProtocolBuffer; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/StdAfx.h000077500000000000000000000130431455567757300216220ustar00rootroot00000000000000/*=========================================================================== FILE: StdAfx.h DESCRIPTION: Application Framework eXtenstions for Linux PUBLIC CLASSES AND FUNCTIONS: Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Includes //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- // Macro defination //--------------------------------------------------------------------------- #define ASSERT( x ) assert( x ) #ifdef DEBUG #define TRACE printf #else #define TRACE(...) #endif //--------------------------------------------------------------------------- // data type defination //--------------------------------------------------------------------------- #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef CONST #define CONST const #endif typedef void VOID; typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef double DOUBLE; typedef int INT; typedef unsigned int UINT; typedef unsigned int * PUINT; typedef INT HANDLE; typedef HANDLE HMODULE; typedef char CHAR; typedef short SHORT; typedef long LONG; typedef unsigned long ULONG; typedef ULONG * PULONG; typedef unsigned short USHORT; typedef USHORT * PUSHORT; typedef unsigned char UCHAR; typedef UCHAR * PUCHAR; typedef char * PSZ; typedef CONST CHAR * LPCSTR; typedef CHAR * LPSTR; typedef BYTE * PBYTE; typedef BOOL * PBOOL; typedef INT * PINT; typedef UINT * LPINT; typedef WORD * PWORD; typedef PWORD LPWORD; typedef LONG * LPLONG; typedef DWORD * PDWORD; typedef VOID * PVOID; typedef PVOID LPVOID; typedef const void * LPCVOID; typedef size_t SIZE_T; typedef double DATE; // Error code #define NO_ERROR 0L #define ERROR_SUCCESS 0L #define ERROR_NO_MORE_ITEMS 259L #define ERROR_CRC 23L #define ERROR_OUTOFMEMORY 14L #define ERROR_CAN_NOT_COMPLETE 1003L #define ERROR_REVISION_MISMATCH 1306L #define ERROR_BAD_ARGUMENTS 160L #define INVALID_SET_FILE_POINTER -1 #define VALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE -1 #define INVALID_FILE_SZ -1 #define ERROR_GEN_FAILURE 31L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_NOT_ENOUGH_MEMORY 8L #define ERROR_INVALID_PARAMETER 87L #define ERROR_BAD_FORMAT 11L // Other Constant definitions #define MAX_PATH 512 #define INFINITE 0xffffffff // SIOCIWFIRSTPRIV = 0x8BE0 // Device I/O control code for setting QMI service #define QMI_GET_SERVICE_FILE_IOCTL 0x8BE0 + 1 // Device I/O control code for obtaining device VIDPID #define QMI_GET_VIDPID_IOCTL 0x8BE0 + 2 // Device I/O control code for obtaining device MEID #define QMI_GET_MEID_IOCTL 0x8BE0 + 3 // Define the directions for pipes #define READING 0 #define WRITING 1 libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Core/SyncQueue.h000077500000000000000000000301061455567757300223510ustar00rootroot00000000000000/*=========================================================================== FILE: SyncQueue.h DESCRIPTION: Declaration/Implementation of cSyncQueue class PUBLIC CLASSES AND METHODS: cSyncQueue Synchronized shareable (across multiple threads) queue of structures with event notifications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cSyncQueue /*=========================================================================*/ template class cSyncQueue { public: // (Inline) Constructor cSyncQueue( ULONG maxElements, bool bSignalEvent = false ) : mSignature( (ULONG)eSYNC_QUEUE_SIG ), mSignalEvent(), mbSignalEvent( bSignalEvent ), mMaxElements( maxElements ), mTotalElements( 0 ) { // Create sync CS int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SyncQueue: Unable to init sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } }; // (Inline) Destructor ~cSyncQueue() { if (IsValid() == false) { ASSERT( (PVOID)"Double deletion detected in ~cSyncQueue" == 0 ); } else { EmptyQueue(); mSignature = 0; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // (Inline) Add an element to the queue bool AddElement( const tElementType & elem ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { // Yes, drop oldest element mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Add an element to the queue returning the index of // the element bool AddElement( const tElementType & elem, ULONG & idx ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); idx = mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Return given element in the queue bool GetElement( ULONG idx, tElementType & elem ) const { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Is this a current element index? ULONG expiredIndices = mTotalElements - (ULONG)mElementDeque.size(); if (idx >= expiredIndices) { // Yes, grab it from the deque idx -= expiredIndices; if (idx < (ULONG)mElementDeque.size()) { elem = mElementDeque[idx]; bRC = true; } } nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Empty element queue bool EmptyQueue() { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } mElementDeque.clear(); mTotalElements = 0; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } bRC = true; return bRC; }; // (Inline) Return the number of queued elements ULONG GetQueueCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = (ULONG)mElementDeque.size(); nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the total number of elements added to queue ULONG GetTotalCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = mTotalElements; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the signal event cEvent & GetSignalEvent() const { return mSignalEvent; }; // (Inline) Is this sync queue valid? bool IsValid() const { return (mSignature == (ULONG)eSYNC_QUEUE_SIG); }; protected: // Object signature enum eClassConstants { eSYNC_QUEUE_SIG = 0x1799A2BC }; /* Object signature */ ULONG mSignature; /* Multithreaded mutex type */ mutable pthread_mutex_t mSyncSection; /* Signal event, set everytime an element is added (if configured) */ mutable cEvent mSignalEvent; /* Use above signal event? */ bool mbSignalEvent; /* Maximum number of elements to add to the deque */ ULONG mMaxElements; /* Total number of elements added to the deque */ ULONG mTotalElements; /* Element queue */ std::deque mElementDeque; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/000077500000000000000000000000001455567757300210705ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/Makefile.am000066400000000000000000000000151455567757300231200ustar00rootroot00000000000000SUBDIRS=QMI libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/000077500000000000000000000000001455567757300215165ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/Entity.txt000077500000000000000000001730111455567757300235410ustar00rootroot0000000000000030^"32,1"^"CTL/Set Instance ID Request/Instance"^50900^-1^0 30^"34,1"^"CTL/Get Client ID Request/Type"^50905^-1^0 30^"35,1"^"CTL/Release Client ID Request/ID"^50906^-1^0 30^"38,1"^"CTL/Set Data Format Request/Format"^50907^-1^0 30^"38,16"^"CTL/Set Data Format Request/Protocol"^50908^-1^0 30^"40,1"^"CTL/Set Event Report Request/Report"^50909^-1^0 30^"41,1"^"CTL/Set Power Save Config Request/Descriptor"^50911^-1^0 30^"41,17"^"CTL/Set Power Save Config Request/Permitted Set"^50912^-1^0 30^"42,1"^"CTL/Set Power Save Mode Request/Mode"^50913^-1^0 31^"32,1"^"CTL/Set Instance ID Response/Link"^50901^-1^0 31^"32,2"^"CTL/Set Instance ID Response/Result Code"^50000^-1^0 31^"33,1"^"CTL/Get Version Info Response/List"^50902^-1^0 31^"33,2"^"CTL/Get Version Info Response/Result Code"^50000^-1^0 31^"33,16"^"CTL/Get Version Info Response/Addendum"^50904^-1^0 31^"34,1"^"CTL/Get Client ID Response/ID"^50906^-1^0 31^"34,2"^"CTL/Get Client ID Response/Result Code"^50000^-1^0 31^"35,1"^"CTL/Release Client ID Response/ID"^50906^-1^0 31^"35,2"^"CTL/Release Client ID Response/Result Code"^50000^-1^0 31^"38,2"^"CTL/Set Data Format Response/Result Code"^50000^-1^0 31^"38,16"^"CTL/Set Data Format Response/Protocol"^50908^-1^0 31^"40,2"^"CTL/Set Event Report Response/Result Code"^50000^-1^0 31^"41,2"^"CTL/Set Power Save Config Response/Result Code"^50000^-1^0 31^"42,2"^"CTL/Set Power Save Mode Response/Result Code"^50000^-1^0 31^"43,1"^"CTL/Get Power Save Mode Response/Mode"^50913^-1^0 31^"43,2"^"CTL/Get Power Save Mode Response/Result Code"^50000^-1^0 32^"36,1"^"CTL/Release Client ID Indication/ID"^50906^-1^0 32^"37,1"^"CTL/Invalid Client ID Indication/ID"^50906^-1^0 32^"40,1"^"CTL/Event Report Indication/Report"^50910^-1^0 33^"1,16"^"WDS/Set Event Report Request/Channel Rate Indicator"^50010^-1 33^"1,17"^"WDS/Set Event Report Request/Transfer Statistics Indicator"^50011^-1 33^"1,18"^"WDS/Set Event Report Request/Data Bearer Technology Indicator"^50012^-1 33^"1,19"^"WDS/Set Event Report Request/Dormancy Status Indicator"^50041^-1 33^"1,20"^"WDS/Set Event Report Request/MIP Status Indicator"^50087^-1 33^"1,21"^"WDS/Set Event Report Request/Current Data Bearer Technology Indicator"^50012^-1 33^"2,1"^"WDS/Abort Request/Transaction ID"^50001^-1 33^"32,16"^"WDS/Start Network Interface Request/Primary DNS"^50021^-1 33^"32,17"^"WDS/Start Network Interface Request/Secondary DNS"^50021^-1 33^"32,18"^"WDS/Start Network Interface Request/Primary NBNS"^50021^-1 33^"32,19"^"WDS/Start Network Interface Request/Secondary NBNS"^50021^-1 33^"32,20"^"WDS/Start Network Interface Request/Context APN Name"^50022^-1 33^"32,21"^"WDS/Start Network Interface Request/IP Address"^50021^-1 33^"32,22"^"WDS/Start Network Interface Request/Authentication"^50023^-1 33^"32,23"^"WDS/Start Network Interface Request/Username"^50024^-1 33^"32,24"^"WDS/Start Network Interface Request/Password"^50025^-1 33^"32,25"^"WDS/Start Network Interface Request/IP Family"^50097^-1 33^"32,48"^"WDS/Start Network Interface Request/Technology Preference"^50026^-1 33^"32,49"^"WDS/Start Network Interface Request/3GPP Profile Identifier"^50027^-1 33^"32,50"^"WDS/Start Network Interface Request/3GPP2 Profile Identifier"^50027^-1 33^"32,51"^"WDS/Start Network Interface Request/Autoconnect"^50045^-1 33^"32,52"^"WDS/Start Network Interface Request/Extended Technology Preference"^50095^-1 33^"32,53"^"WDS/Start Network Interface Request/Call Type"^50096^-1 33^"33,1"^"WDS/Stop Network Interface Request/Packet Data Handle"^50028^-1 33^"33,16"^"WDS/Stop Network Interface Request/Autoconnect"^50046^-1 33^"36,1"^"WDS/Get Packet Statistics Request/Packet Stats Mask"^50032^-1 33^"39,1"^"WDS/Create Profile Request/Profile Type"^50033^-1 33^"39,16"^"WDS/Create Profile Request/Profile Name"^50034^-1 33^"39,17"^"WDS/Create Profile Request/PDP Type"^50035^-1 33^"39,20"^"WDS/Create Profile Request/APN Name"^50022^-1 33^"39,21"^"WDS/Create Profile Request/Primary DNS"^50021^-1 33^"39,22"^"WDS/Create Profile Request/Secondary DNS"^50021^-1 33^"39,23"^"WDS/Create Profile Request/UMTS Requested QoS"^50036^-1 33^"39,24"^"WDS/Create Profile Request/UMTS Minimum QoS"^50036^-1 33^"39,25"^"WDS/Create Profile Request/GPRS Requested QoS"^50037^-1 33^"39,26"^"WDS/Create Profile Request/GPRS Minimum QoS"^50037^-1 33^"39,27"^"WDS/Create Profile Request/Username"^50024^-1 33^"39,28"^"WDS/Create Profile Request/Password"^50025^-1 33^"39,29"^"WDS/Create Profile Request/Authentication"^50023^-1 33^"39,30"^"WDS/Create Profile Request/IP Address"^50021^-1 33^"39,31"^"WDS/Create Profile Request/P-CSCF"^50099^-1 33^"40,1"^"WDS/Modify Profile Request/Profile Identifier"^50038^-1 33^"40,16"^"WDS/Modify Profile Request/Profile Name"^50034^-1 33^"40,17"^"WDS/Modify Profile Request/PDP Type"^50035^-1 33^"40,20"^"WDS/Modify Profile Request/APN Name"^50022^-1 33^"40,21"^"WDS/Modify Profile Request/Primary DNS"^50021^-1 33^"40,22"^"WDS/Modify Profile Request/Secondary DNS"^50021^-1 33^"40,23"^"WDS/Modify Profile Request/UMTS Requested QoS"^50036^-1 33^"40,24"^"WDS/Modify Profile Request/UMTS Minimum QoS"^50036^-1 33^"40,25"^"WDS/Modify Profile Request/GPRS Requested QoS"^50037^-1 33^"40,26"^"WDS/Modify Profile Request/GPRS Minimum QoS"^50037^-1 33^"40,27"^"WDS/Modify Profile Request/Username"^50024^-1 33^"40,28"^"WDS/Modify Profile Request/Password"^50025^-1 33^"40,29"^"WDS/Modify Profile Request/Authentication"^50023^-1 33^"40,30"^"WDS/Modify Profile Request/IP Address"^50021^-1 33^"40,31"^"WDS/Modify Profile Request/P-CSCF"^50099^-1 33^"40,32"^"WDS/Modify Profile Request/PDP Access Control Flag"^60086^-1 33^"40,33"^"WDS/Modify Profile Request/P-CSCF Address Using DHCP"^60087^-1 33^"40,34"^"WDS/Modify Profile Request/IM CN Flag"^60088^-1 33^"40,35"^"WDS/Modify Profile Request/Traffic Flow Template ID1 Parameters"^60018^-1 33^"40,36"^"WDS/Modify Profile Request/Traffic Flow Template ID2 Parameters"^60018^-1 33^"40,37"^"WDS/Modify Profile Request/PDP Context Number"^60020^-1 33^"40,38"^"WDS/Modify Profile Request/PDP Context Secondary Flag"^60021^-1 33^"40,39"^"WDS/Modify Profile Request/PDP Context Primary ID"^60022^-1 33^"40,40"^"WDS/Modify Profile Request/IPv6 Address"^60023^-1 33^"40,41"^"WDS/Modify Profile Request/Requested QoS"^60024^-1 33^"40,42"^"WDS/Modify Profile Request/Minimum QoS"^60024^-1 33^"40,43"^"WDS/Modify Profile Request/Primary IPv6"^60090^-1 33^"40,44"^"WDS/Modify Profile Request/Secondary IPv6"^60090^-1 33^"40,45"^"WDS/Modify Profile Request/Address Allocation Preference"^60028^-1 33^"40,46"^"WDS/Modify Profile Request/LTE QoS Parameters"^60029^-1 33^"40,144"^"WDS/Modify Profile Request/Negotiate DNS Server Prefrence"^60059^-1 33^"40,145"^"WDS/Modify Profile Request/PPP Session Close Timer DO"^60060^-1 33^"40,146"^"WDS/Modify Profile Request/PPP Session Close Timer 1X"^60061^-1 33^"40,147"^"WDS/Modify Profile Request/Allow Linger"^60062^-1 33^"40,148"^"WDS/Modify Profile Request/LCP ACK Timeout"^60063^-1 33^"40,149"^"WDS/Modify Profile Request/IPCP ACK Timeout"^60064^-1 33^"40,150"^"WDS/Modify Profile Request/Authentication Timeout"^60065^-1 33^"40,154"^"WDS/Modify Profile Request/Authentication Protocol"^60069^-1 33^"40,155"^"WDS/Modify Profile Request/User ID"^60070^-1 33^"40,156"^"WDS/Modify Profile Request/Authentication Password"^60071^-1 33^"40,157"^"WDS/Modify Profile Request/Data Rate"^60072^-1 33^"40,158"^"WDS/Modify Profile Request/Application Type"^60073^-1 33^"40,159"^"WDS/Modify Profile Request/Data Mode"^60074^-1 33^"40,160"^"WDS/Modify Profile Request/Application Priority"^60075^-1 33^"40,161"^"WDS/Modify Profile Request/APN String"^60076^-1 33^"40,162"^"WDS/Modify Profile Request/PDN Type"^60077^-1 33^"40,163"^"WDS/Modify Profile Request/P-CSCF Address Needed"^60078^-1 33^"40,164"^"WDS/Modify Profile Request/Primary IPv4 Address"^60079^-1 33^"40,165"^"WDS/Modify Profile Request/Secondary IPv4 Address"^60080^-1 33^"40,166"^"WDS/Modify Profile Request/Primary IPv6 Address"^60081^-1 33^"40,167"^"WDS/Modify Profile Request/Secondary IPv6 Address"^60082^-1 33^"41,1"^"WDS/Delete Profile Request/Profile Identifier"^50038^-1 33^"43,1"^"WDS/Get Profile Settings Request/Profile Identifier"^50038^-1 33^"44,1"^"WDS/Get Default Settings Request/Profile Type"^50033^-1 33^"45,16"^"WDS/Get Current Settings Request/Requested Settings"^50084^-1 33^"46,1"^"WDS/Set MIP Mode Request/Mobile IP Mode"^50044^-1 33^"56,1"^"WDS/Get Modem Info Request/Requested Status"^50051^-1 33^"56,16"^"WDS/Get Modem Info Request/Connection Status Indicator"^50052^-1 33^"56,17"^"WDS/Get Modem Info Request/Transfer Statistics Indicator"^50053^-1 33^"56,18"^"WDS/Get Modem Info Request/Dormancy Status Indicator"^50041^-1 33^"56,19"^"WDS/Get Modem Info Request/Data Bearer Technology Indicator"^50012^-1 33^"56,20"^"WDS/Get Modem Info Request/Channel Rate Indicator"^50010^-1 33^"61,1"^"WDS/Set Active MIP Profile Request/Index"^50056^-1 33^"62,1"^"WDS/Get MIP Profile Request/Index"^50027^-1 33^"63,1"^"WDS/Set MIP Profile Request/Index"^50056^-1 33^"63,16"^"WDS/Set MIP Profile Request/State"^50057^-1 33^"63,17"^"WDS/Set MIP Profile Request/Home Address"^50021^-1 33^"63,18"^"WDS/Set MIP Profile Request/Primary Home Agent Address"^50021^-1 33^"63,19"^"WDS/Set MIP Profile Request/Secondary Home Agent Address"^50021^-1 33^"63,20"^"WDS/Set MIP Profile Request/Reverse Tunneling"^50058^-1 33^"63,21"^"WDS/Set MIP Profile Request/NAI"^50059^-1 33^"63,22"^"WDS/Set MIP Profile Request/HA SPI"^50060^-1 33^"63,23"^"WDS/Set MIP Profile Requeste/AAA SPI"^50061^-1 33^"63,24"^"WDS/Set MIP Profile Request/MN-HA"^50062^-1 33^"63,25"^"WDS/Set MIP Profile Request/MN-AAA"^50063^-1 33^"65,1"^"WDS/Set MIP Parameters Request/SPC"^50070^-1 33^"65,16"^"WDS/Set MIP Parameters Request/Mobile IP Mode"^50044^-1 33^"65,17"^"WDS/Set MIP Parameters Request/Retry Attempt Limit"^50064^-1 33^"65,18"^"WDS/Set MIP Parameters Request/Retry Attempt Interval"^50065^-1 33^"65,19"^"WDS/Set MIP Parameters Request/Re-Registration Period"^50066^-1 33^"65,20"^"WDS/Set MIP Parameters Request/Re-Registration Only With Traffic"^50067^-1 33^"65,21"^"WDS/Set MIP Parameters Request/MN-HA Authenticator Calculator"^50068^-1 33^"65,22"^"WDS/Set MIP Parameters Request/MN-HA RFC 2002 BIS Authentication"^50069^-1 33^"69,16"^"WDS/Get Call List Request/List Type"^50073^-1 33^"70,1"^"WDS/Get Call Record Request/Record ID"^50077^-1 33^"81,1"^"WDS/Set Autoconnect Setting Request/Autoconnect"^50045^-1 33^"81,16"^"WDS/Set Autoconnect Setting Request/Roam"^60008^-1 33^"83,16"^"WDS/Set DNS Setting Request/Primary"^60009^-1 33^"83,17"^"WDS/Set DNS Setting Request/Secondary"^60009^-1 33^"83,18"^"WDS/Set DNS Setting Request/Primary IPv6 Address"^60084^-1 33^"83,19"^"WDS/Set DNS Setting Request/Secondary IPv6 Address"^60085^-1 34^"0,2"^"WDS/Reset Response/Result Code"^50000^-1 34^"1,2"^"WDS/Set Event Report Response/Result Code"^50000^-1 34^"2,2"^"WDS/Abort Response/Result Code"^50000^-1 34^"32,1"^"WDS/Start Network Interface Response/Packet Data Handle"^50028^-1 34^"32,2"^"WDS/Start Network Interface Response/Result Code"^50000^-1 34^"32,16"^"WDS/Start Network Interface Response/Call End Reason"^50043^-1 34^"32,17"^"WDS/Start Network Interface Response/Verbose Call End Reason"^50098^-1 34^"33,2"^"WDS/Stop Network Interface Response/Result Code"^50000^-1 34^"34,1"^"WDS/Get Packet Service Status Response/Status"^50029^-1 34^"34,2"^"WDS/Get Packet Service Status Response/Result Code"^50000^-1 34^"35,1"^"WDS/Get Channel Rates Response/Channel Rates"^50031^-1 34^"35,2"^"WDS/Get Channel Rates Response/Result Code"^50000^-1 34^"36,2"^"WDS/Get Packet Statistics Response/Result Code"^50000^-1 34^"36,16"^"WDS/Get Packet Statistics Response/TX Packet Successes"^50013^-1 34^"36,17"^"WDS/Get Packet Statistics Response/RX Packet Successes"^50014^-1 34^"36,18"^"WDS/Get Packet Statistics Response/TX Packet Errors"^50015^-1 34^"36,19"^"WDS/Get Packet Statistics Response/RX Packet Errors"^50016^-1 34^"36,20"^"WDS/Get Packet Statistics Response/TX Overflows"^50017^-1 34^"36,21"^"WDS/Get Packet Statistics Response/RX Overflows"^50018^-1 34^"36,25"^"WDS/Get Packet Statistics Response/TX Bytes"^50054^-1 34^"36,26"^"WDS/Get Packet Statistics Response/RX Bytes"^50055^-1 34^"36,27"^"WDS/Get Packet Statistics Response/Previous TX Bytes"^50079^-1 34^"36,28"^"WDS/Get Packet Statistics Response/Previous RX Bytes"^50080^-1 34^"37,2"^"WDS/Go Dormant Response/Result Code"^50000^-1 34^"38,2"^"WDS/Go Active Response/Result Code"^50000^-1 34^"39,1"^"WDS/Create Profile Response/Profile Identifier"^50038^-1 34^"39,2"^"WDS/Create Profile Response/Result Code"^50000^-1 34^"40,2"^"WDS/Modify Profile Response/Result Code"^50000^-1 34^"40,151"^"WDS/Modify Profile Request/LCP Config Retry Count"^60066^-1 34^"40,152"^"WDS/Modify Profile Request/IPCP Config Retry Count"^60067^-1 34^"40,153"^"WDS/Modify Profile Request/Authentication Retry"^60068^-1 34^"40,224"^"WDS/Modify Profile Request/Extended Error Code"^60083^-1 34^"41,2"^"WDS/Delete Profile Response/Result Code"^50000^-1 34^"42,1"^"WDS/Get Profile List Response/Profile List"^50039^-1 34^"42,2"^"WDS/Get Profile List Response/Result Code"^50000^-1 34^"43,2"^"WDS/Get Profile Settings Response/Result Code"^50000^-1 34^"43,16"^"WDS/Get Profile Settings Response/Profile Name"^50034^-1 34^"43,17"^"WDS/Get Profile Settings Response/PDP Type"^50035^-1 34^"43,20"^"WDS/Get Profile Settings Response/APN Name"^50022^-1 34^"43,21"^"WDS/Get Profile Settings Response/Primary DNS"^50021^-1 34^"43,22"^"WDS/Get Profile Settings Response/Secondary DNS"^50021^-1 34^"43,23"^"WDS/Get Profile Settings Response/UMTS Requested QoS"^50036^-1 34^"43,24"^"WDS/Get Profile Settings Response/UMTS Minimum QoS"^50036^-1 34^"43,25"^"WDS/Get Profile Settings Response/GPRS Requested QoS"^50037^-1 34^"43,26"^"WDS/Get Profile Settings Response/GPRS Minimum QoS"^50037^-1 34^"43,27"^"WDS/Get Profile Settings Response/Username"^50024^-1 34^"43,29"^"WDS/Get Profile Settings Response/Authentication"^50023^-1 34^"43,30"^"WDS/Get Profile Settings Response/IP Address"^50021^-1 34^"43,31"^"WDS/Get Profile Settings Response/P-CSCF"^50099^-1 34^"44,2"^"WDS/Get Default Settings Response/Result Code"^50000^-1 34^"44,16"^"WDS/Get Default Settings Response/Profile Name"^50034^-1 34^"44,17"^"WDS/Get Default Settings Response/PDP Type"^50035^-1 34^"44,20"^"WDS/Get Default Settings Response/APN Name"^50022^-1 34^"44,21"^"WDS/Get Default Settings Response/Primary DNS"^50021^-1 34^"44,22"^"WDS/Get Default Settings Response/Secondary DNS"^50021^-1 34^"44,23"^"WDS/Get Default Settings Response/UMTS Requested QoS"^50036^-1 34^"44,24"^"WDS/Get Default Settings Response/UMTS Minimum QoS"^50036^-1 34^"44,25"^"WDS/Get Default Settings Response/GPRS Requested QoS"^50037^-1 34^"44,26"^"WDS/Get Default Settings Response/GPRS Minimum QoS"^50037^-1 34^"44,27"^"WDS/Get Default Settings Response/Username"^50024^-1 34^"44,28"^"WDS/Get Default Settings Response/Password"^50025^-1 34^"44,29"^"WDS/Get Default Settings Response/Authentication"^50023^-1 34^"44,30"^"WDS/Get Default Settings Response/IP Address"^50021^-1 34^"44,31"^"WDS/Get Default Settings Response/P-CSCF"^50099^-1 34^"44,32"^"WDS/Get Default Settings Response/PDP Access Control Flag"^60015^-1 34^"44,33"^"WDS/Get Default Settings Response/P-CSCF Address Using DHCP"^60016^-1 34^"44,34"^"WDS/Get Default Settings Response/IM CN Flag"^60017^-1 34^"44,35"^"WDS/Get Default Settings Response/Traffic Flow Template ID1 Parameters"^60018^-1 34^"44,36"^"WDS/Get Default Settings Response/Traffic Flow Template ID2 Parameters"^60019^-1 34^"44,37"^"WDS/Get Default Settings Response/PDP Context Number"^60020^-1 34^"44,38"^"WDS/Get Default Settings Response/PDP Context Secondary Flag"^60021^-1 34^"44,39"^"WDS/Get Default Settings Response/PDP Context Primary ID"^60022^-1 34^"44,40"^"WDS/Get Default Settings Response/IPv6 Address"^60023^-1 34^"44,41"^"WDS/Get Default Settings Response/Requested QoS"^60024^-1 34^"44,42"^"WDS/Get Default Settings Response/Minimum QoS"^60025^-1 34^"44,43"^"WDS/Get Default Settings Response/Primary DNS IPv6 Address"^60026^-1 34^"44,44"^"WDS/Get Default Settings Response/Secondary DNS IPv6 Address"^60027^-1 34^"44,45"^"WDS/Get Default Settings Response/DHCP NAS Preference"^60028^-1 34^"44,46"^"WDS/Get Default Settings Response/LTE QoS Parameters"^60029^-1 34^"44,144"^"WDS/Get Default Settings Response/Negotiate DSN Server Preferences"^60030^-1 34^"44,145"^"WDS/Get Default Settings Response/PPP Session CLose Timer DO"^60031^-1 34^"44,146"^"WDS/Get Default Settings Response/PPP Session Close Timer 1X"^60032^-1 34^"44,147"^"WDS/Get Default Settings Response/Allow Lingering Interface"^60033^-1 34^"44,148"^"WDS/Get Default Settings Response/LCP ACK Timeout"^60034^-1 34^"44,149"^"WDS/Get Default Settings Response/IPCP ACK Timeout"^60035^-1 34^"44,150"^"WDS/Get Default Settings Response/Authentication Timeout"^60036^-1 34^"44,151"^"WDS/Get Default Settings Response/LCP Config Retry Count"^60037^-1 34^"44,152"^"WDS/Get Default Settings Response/IPCP Config Retry Count"^60038^-1 34^"44,153"^"WDS/Get Default Settings Response/Authentication Retry"^60039^-1 34^"44,154"^"WDS/Get Default Settings Response/Authentication Protocol"^60040^-1 34^"44,155"^"WDS/Get Default Settings Response/User ID"^60041^-1^0^-1^0^0 34^"44,156"^"WDS/Get Default Settings Response/Authentication Password"^60042^-1 34^"44,157"^"WDS/Get Default Settings Response/Data Rate"^60043^-1 34^"44,158"^"WDS/Get Default Settings Response/Application Type"^60044^-1 34^"44,159"^"WDS/Get Default Settings Response/Data Mode"^60045^-1 34^"44,160"^"WDS/Get Default Settings Response/Application Priority"^60046^-1 34^"44,161"^"WDS/Get Default Settings Response/APN String"^60047^-1 34^"44,162"^"WDS/Get Default Settings Response/PDN Type"^60048^-1 34^"44,163"^"WDS/Get Default Settings Response/P-CSCF Address Needed"^60049^-1 34^"44,164"^"WDS/Get Default Settings Response/Primary DNS Address"^60050^-1 34^"44,165"^"WDS/Get Default Settings Response/Secondary DNS Address"^60051^-1 34^"44,166"^"WDS/Get Default Settings Response/Primary IPv6 Address"^60052^-1 34^"44,167"^"WDS/Get Default Settings Response/Secondary IPv6 Address"^60053^-1 34^"44,224"^"WDS/Get Default Settings Response/Extended Error Code"^60054^-1 34^"45,2"^"WDS/Get Current Settings Response/Result Code"^50000^-1 34^"45,16"^"WDS/Get Current Settings Response/Profile Name"^50034^-1 34^"45,17"^"WDS/Get Current Settings Response/PDP Type"^50035^-1 34^"45,20"^"WDS/Get Current Settings Response/APN Name"^50022^-1 34^"45,21"^"WDS/Get Current Settings Response/Primary DNS"^50021^-1 34^"45,22"^"WDS/Get Current Settings Response/Secondary DNS"^50021^-1 34^"45,23"^"WDS/Get Current Settings Response/UMTS Granted QoS"^50036^-1 34^"45,25"^"WDS/Get Current Settings Response/GPRS Granted QoS"^50037^-1 34^"45,27"^"WDS/Get Current Settings Response/Username"^50024^-1 34^"45,29"^"WDS/Get Current Settings Response/Authentication"^50023^-1 34^"45,30"^"WDS/Get Current Settings Response/IP Address"^50021^-1 34^"45,31"^"WDS/Get Current Settings Response/Profile ID"^50038^-1 34^"45,32"^"WDS/Get Current Settings Response/Gateway Address"^50021^-1 34^"45,33"^"WDS/Get Current Settings Response/Gateway Subnet Mask"^50085^-1 34^"45,34"^"WDS/Get Current Settings Response/P-CSCF"^50099^-1 34^"45,35"^"WDS/Get Current Settings Response/P-CSCF Server Address List"^60000^-1 34^"45,36"^"WDS/Get Current Settings Response/P-CSCF Domain Name List"^60001^-1 34^"45,37"^"WDS/Get Current Settings Response/IPv6 Address"^60010^-1 34^"45,38"^"WDS/Get Current Settings Response/IPv6 Gateway Address"^60011^-1 34^"45,39"^"WDS/Get Current Settings Response/Primary IPv6 DNS"^60003^-1 34^"45,40"^"WDS/Get Current Settings Response/Secondary IPv6 DNS"^60003^-1 34^"45,41"^"WDS/Get Current Settings Response/MTU"^60004^-1 34^"45,42"^"WDS/Get Current Settings Response/Domain Name List"^60005^-1 34^"45,43"^"WDS/Get Current Settings Response/IP Family"^50097^-1 34^"45,44"^"WDS/Get Current Settings Response/IM CN Flag"^60007^-1 34^"45,45"^"WDS/Get Current Settings Response/Extended Technology"^50095^-1 34^"45,46"^"WDS/Get Current Settings Response/P-CSCF IPv6 Address List"^60057^-1 34^"46,2"^"WDS/Set MIP Mode Response/Result Code"^50000^-1 34^"47,1"^"WDS/Get MIP Mode Response/Mobile IP Mode"^50044^-1 34^"47,2"^"WDS/Get MIP Mode Response/Result Code"^50000^-1 34^"48,1"^"WDS/Get Dormancy Response/Dormancy Status"^50042^-1 34^"48,2"^"WDS/Get Dormancy Response/Result Code"^50000^-1 34^"52,1"^"WDS/Get Autoconnect Setting Response/Autoconnect"^50045^-1 34^"52,2"^"WDS/Get Autoconnect Setting Response/Result Code"^50000^-1 34^"52,16"^"WDS/Get Autoconnect Setting Response/Roam"^60008^-1 34^"53,1"^"WDS/Get Data Session Duration Response/Duration"^50047^-1 34^"53,2"^"WDS/Get Data Session Duration Response/Result Code"^50000^-1 34^"53,16"^"WDS/Get Data Session Duration Response/Previous Duration"^50081^-1 34^"53,17"^"WDS/Get Data Session Duration Response/Active Duration"^50082^-1 34^"53,18"^"WDS/Get Data Session Duration Response/Previous Active Duration"^50083^-1 34^"54,1"^"WDS/Get Modem Status Response/Status"^50048^-1 34^"54,2"^"WDS/Get Modem Status Response/Result Code"^50000^-1 34^"54,16"^"WDS/Get Modem Status Response/Call End Reason"^50049^-1 34^"55,1"^"WDS/Get Data Bearer Technology Response/Technology"^50020^-1 34^"55,2"^"WDS/Get Data Bearer Technology Response/Result Code"^50000^-1 34^"55,16"^"WDS/Get Data Bearer Technology Response/Last Call Technology"^50020^-1 34^"56,2"^"WDS/Get Modem Info Response/Result Code"^50000^-1 34^"56,16"^"WDS/Get Modem Info Response/Status"^50048^-1 34^"56,17"^"WDS/Get Modem Info Response/Call End Reason"^50049^-1 34^"56,18"^"WDS/Get Modem Info Response/TX Bytes"^50054^-1 34^"56,19"^"WDS/Get Modem Info Response/RX Bytes"^50055^-1 34^"56,20"^"WDS/Get Modem Info Response/Dormancy Status"^50042^-1 34^"56,21"^"WDS/Get Modem Info Response/Technology"^50020^-1 34^"56,22"^"WDS/Get Modem Info Response/Rates"^50031^-1 34^"56,23"^"WDS/Get Modem Info Response/Previous TX Bytes"^50079^-1 34^"56,24"^"WDS/Get Modem Info Response/Previous RX Bytes"^50080^-1 34^"56,25"^"WDS/Get Modem Info Duration Response/Active Duration"^50082^-1 34^"60,1"^"WDS/Get Active MIP Profile Response/Index"^50027^-1 34^"60,2"^"WDS/Get Active MIP Profile Response/Result Code"^50000^-1 34^"61,2"^"WDS/Set Active MIP Profile Response/Result Code"^50000^-1 34^"62,2"^"WDS/Get MIP Profile Response/Result Code"^50000^-1 34^"62,16"^"WDS/Get MIP Profile Response/State"^50057^-1 34^"62,17"^"WDS/Get MIP Profile Response/Home Address"^50021^-1 34^"62,18"^"WDS/Get MIP Profile Response/Primary Home Agent Address"^50021^-1 34^"62,19"^"WDS/Get MIP Profile Response/Secondary Home Agent Address"^50021^-1 34^"62,20"^"WDS/Get MIP Profile Response/Reverse Tunneling"^50058^-1 34^"62,21"^"WDS/Get MIP Profile Response/NAI"^50059^-1 34^"62,22"^"WDS/Get MIP Profile Response/HA SPI"^50060^-1 34^"62,23"^"WDS/Get MIP Profile Response/AAA SPI"^50061^-1 34^"62,26"^"WDS/Get MIP Profile Response/HA State"^50086^-1 34^"62,27"^"WDS/Get MIP Profile Response/AAA State"^50086^-1 34^"63,2"^"WDS/Set MIP Profile Response/Result Code"^50000^-1 34^"64,2"^"WDS/Get MIP Parameters Response/Result Code"^50000^-1 34^"64,16"^"WDS/Get MIP Parameters Response/Mobile IP Mode"^50044^-1 34^"64,17"^"WDS/Get MIP Parameters Response/Retry Attempt Limit"^50064^-1 34^"64,18"^"WDS/Get MIP Parameters Response/Retry Attempt Interval"^50065^-1 34^"64,19"^"WDS/Get MIP Parameters Response/Re-Registration Period"^50066^-1 34^"64,20"^"WDS/Get MIP Parameters Response/Re-Registration Only With Traffic"^50067^-1 34^"64,21"^"WDS/Get MIP Parameters Response/MN-HA Authenticator Calculator"^50068^-1 34^"64,22"^"WDS/Get MIP Parameters Response/MN-HA RFC 2002 BIS Authentication"^50069^-1 34^"65,2"^"WDS/Set MIP Parameters Response/Result Code"^50000^-1 34^"66,1"^"WDS/Get Last MIP Status Response/Status"^50071^-1 34^"66,2"^"WDS/Get Last MIP Status Response/Result Code"^50000^-1 34^"67,1"^"WDS/Get AN-AAA Authentication Status Response/Status"^50072^-1 34^"67,2"^"WDS/Get AN-AAA Authentication Status Response/Result Code"^50000^-1 34^"68,1"^"WDS/Get Current Data Bearer Technology Response/Technology"^50090^-1 34^"68,2"^"WDS/Get Current Data Bearer Technology Response/Result Code"^50000^-1 34^"69,2"^"WDS/Get Call List Response/Result Code"^50000^-1 34^"69,16"^"WDS/Get Call List Response/Full List"^50074^-1 34^"69,17"^"WDS/Get Call List Response/ID List"^50076^-1 34^"70,1"^"WDS/Get Call Record Response/Record"^50075^-1 34^"70,2"^"WDS/Get Call Record Response/Result Code"^50000^-1 34^"71,2"^"WDS/Clear Call List Response/Result Code"^50000^-1 34^"72,1"^"WDS/Get Call List Max Size Response/Maximum"^50078^-1 34^"72,2"^"WDS/Get Call List Max Size Response/Result Code"^50000^-1 34^"81,2"^"WDS/Set Autoconnect Setting Response/Result Code"^50000^-1 34^"82,2"^"WDS/Get DNS Setting Response/Result Code"^50000^-1 34^"82,16"^"WDS/Get DNS Setting Response/Primary"^60009^-1 34^"82,17"^"WDS/Get DNS Setting Response/Secondary"^60009^-1 34^"82,18"^"WDS/Get DNS Setting Response/Primary IPv6"^60055^-1 34^"82,19"^"WDS/Get DNS Setting Response/Secondary IPv6"^60056^-1 34^"83,2"^"WDS/Set DNS Setting Response/Result Code"^50000^-1 35^"1,16"^"WDS/Event Report/TX Packet Successes"^50013^-1 35^"1,17"^"WDS/Event Report/RX Packet Successes"^50014^-1 35^"1,18"^"WDS/Event Report/TX Packet Errors"^50015^-1 35^"1,19"^"WDS/Event Report/RX Packet Errors"^50016^-1 35^"1,20"^"WDS/Event Report/TX Overflows"^50017^-1 35^"1,21"^"WDS/Event Report/RX Overflows"^50018^-1 35^"1,22"^"WDS/Event Report/Channel Rates"^50019^-1 35^"1,23"^"WDS/Event Report/Data Bearer Technology"^50020^-1 35^"1,24"^"WDS/Event Report/Dormancy Status"^50042^-1 35^"1,25"^"WDS/Event Report/TX Bytes"^50054^-1 35^"1,26"^"WDS/Event Report/RX Bytes"^50055^-1 35^"1,27"^"WDS/Event Report/MIP Status"^50088^-1 35^"1,29"^"WDS/Event Report/Current Data Bearer Technology"^50090^-1 35^"34,1"^"WDS/Packet Service Status Report/Status"^50030^-1 35^"34,16"^"WDS/Packet Service Status Report/Call End Reason"^50043^-1 35^"34,17"^"WDS/Packet Service Status Report/Verbose Call End Reason"^50098^-1 35^"54,1"^"WDS/Modem Status Report/Status"^50050^-1 35^"54,16"^"WDS/Modem Status Report/Call End Reason"^50049^-1 35^"56,16"^"WDS/Modem Info Report/Status"^50050^-1 35^"56,17"^"WDS/Modem Info Report/Call End Reason"^50049^-1 35^"56,18"^"WDS/Modem Info Report/TX Bytes"^50054^-1 35^"56,19"^"WDS/Modem Info Report/RX Bytes"^50055^-1 35^"56,20"^"WDS/Modem Info Report/Dormancy Status"^50042^-1 35^"56,21"^"WDS/Modem Info Report/Technology"^50020^-1 35^"56,22"^"WDS/Modem Info Report/Rates"^50019^-1 36^"1,16"^"DMS/Set Event Report Request/Power State"^50100^-1 36^"1,17"^"DMS/Set Event Report Request/Battery Level"^50101^-1 36^"1,18"^"DMS/Set Event Report Request/PIN Status"^50133^-1 36^"1,19"^"DMS/Set Event Report Request/Activation State"^50111^-1 36^"1,20"^"DMS/Set Event Report Request/Operating Mode"^50144^-1 36^"1,21"^"DMS/Set Event Report Request/UIM State"^50151^-1 36^"1,22"^"DMS/Set Event Report Request/Wireless Disable State"^50166^-1 36^"39,1"^"DMS/UIM Set PIN Protection Request/Info"^50127^-1 36^"40,1"^"DMS/UIM Verify PIN Request/Info"^50129^-1 36^"41,1"^"DMS/UIM Unblock PIN Request/Info"^50130^-1 36^"42,1"^"DMS/UIM Change PIN Request/Info"^50131^-1 36^"46,1"^"DMS/Set Operating Mode Request/Operating Mode"^50115^-1 36^"50,1"^"DMS/Activate Automatic Request/Activation Code"^50118^-1 36^"51,1"^"DMS/Activate Manual Request/Activation Data"^50119^-1 36^"51,16"^"DMS/Activate Manual Request/PRL (Obsolete)"^50120^-1 36^"51,17"^"DMS/Activate Manual Request/MN-HA Key"^50121^-1 36^"51,18"^"DMS/Activate Manual Request/MN-AAA Key"^50122^-1 36^"51,19"^"DMS/Activate Manual Request/PRL"^50135^-1 36^"53,1"^"DMS/Set Lock State Request/Lock State"^50124^-1 36^"54,1"^"DMS/Set Lock Code Request/Lock Code"^50125^-1 36^"56,1"^"DMS/Write User Data Request/User Data"^50126^-1 36^"58,1"^"DMS/Reset Factory Defaults Request/SPC"^50134^-1 36^"59,1"^"DMS/Validate SPC Request/SPC"^50070^-1 36^"62,1"^"DMS/UIM Set Firmware ID Request/ID"^50141^-1 36^"64,1"^"DMS/UIM Get Control Key Status Request/Facility"^50145^-1 36^"65,1"^"DMS/UIM Set Control Key Protection Request/Facility"^50147^-1 36^"66,1"^"DMS/UIM Unblock Control Key Request/Facility"^50149^-1 36^"72,1"^"DMS/Set Firmware Preference Request/Image List"^50155^-1 36^"72,16"^"DMS/Set Firmware Preference Request/Override"^50157^-1 36^"72,17"^"DMS/Set Firmware Preference Request/Index"^50158^-1 36^"74,1"^"DMS/Delete Stored Firmware Request/Image"^50156^-1 36^"75,1"^"DMS/Set Device Time Request/Time"^50170^-1 36^"75,16"^"DMS/Set Device Time Request/Type"^50171^-1 36^"76,1"^"DMS/Get Stored Firmware Info Request/Image"^50156^-1 36^"78,1"^"DMS/Set Alternate Net Config Request/Config"^50169^-1 36^"80,1"^"DMS/Set Image Download Mode Request/Mode"^50175^-1 37^"0,2"^"DMS/Reset Response/Result Code"^50000^-1 37^"1,2"^"DMS/Set Event Report Response/Result Code"^50000^-1 37^"32,1"^"DMS/Get Device Capabilities Response/Capabilities"^50103^-1 37^"32,2"^"DMS/Get Device Capabilities Response/Result Code"^50000^-1 37^"33,1"^"DMS/Get Device Manfacturer Response/Manfacturer"^50104^-1 37^"33,2"^"DMS/Get Device Manfacturer Response/Result Code"^50000^-1 37^"34,1"^"DMS/Get Device Model Response/Model"^50105^-1 37^"34,2"^"DMS/Get Device Model Response/Result Code"^50000^-1 37^"35,1"^"DMS/Get Device Revision Response/Revision"^50106^-1 37^"35,2"^"DMS/Get Device Revision Response/Result Code"^50000^-1 37^"35,16"^"DMS/Get Device Revision Response/Boot Code Revision"^50136^-1 37^"35,17"^"DMS/Get Device Revision Response/UQCN Revision"^50136^-1 37^"36,1"^"DMS/Get Device Voice Number Response/Voice Number"^50107^-1 37^"36,2"^"DMS/Get Device Voice Number Response/Result Code"^50000^-1 37^"36,16"^"DMS/Get Device Voice Number Response/Mobile ID Number"^50113^-1 37^"36,17"^"DMS/Get Device Voice Number Response/IMSI"^50138^-1 37^"37,2"^"DMS/Get Device Serial Numbers Response/Result Code"^50000^-1 37^"37,16"^"DMS/Get Device Serial Numbers Response/ESN"^50108^-1 37^"37,17"^"DMS/Get Device Serial Numbers Response/IMEI"^50109^-1 37^"37,18"^"DMS/Get Device Serial Numbers Response/MEID"^50110^-1 37^"38,1"^"DMS/Get Power State Response/Power State"^50102^-1 37^"38,2"^"DMS/Get Power State Response/Result Code"^50000^-1 37^"39,2"^"DMS/UIM Set PIN Protection Response/Result Code"^50000^-1 37^"39,16"^"DMS/UIM Set PIN Protection Response/Retry Info"^50128^-1 37^"40,2"^"DMS/UIM Verify PIN Response/Result Code"^50000^-1 37^"40,16"^"DMS/UIM Verify PIN Response/Retry Info"^50128^-1 37^"41,2"^"DMS/UIM Unblock PIN Response/Result Code"^50000^-1 37^"41,16"^"DMS/UIM Unblock PIN Response/Retry Info"^50128^-1 37^"42,2"^"DMS/UIM Change PIN Response/Result Code"^50000^-1 37^"42,16"^"DMS/UIM Change PIN Response/Retry Info"^50128^-1 37^"43,2"^"DMS/UIM Get PIN Status Response/Result Code"^50000^-1 37^"43,17"^"DMS/UIM Get PIN Status Response/PIN1 Status"^50132^-1 37^"43,18"^"DMS/UIM Get PIN Status Response/PIN2 Status"^50132^-1 37^"44,1"^"DMS/Get Hardware Revision Response/Hardware Revision"^50114^-1 37^"44,2"^"DMS/Get Hardware Revision Response/Result Code"^50000^-1 37^"45,1"^"DMS/Get Operating Mode Response/Operating Mode"^50115^-1 37^"45,2"^"DMS/Get Operating Mode Response/Result Code"^50000^-1 37^"45,16"^"DMS/Get Operating Mode Response/Offline Reason"^50139^-1 37^"45,17"^"DMS/Get Operating Mode Response/Platform Restricted"^50143^-1 37^"46,2"^"DMS/Set Operating Mode Response/Result Code"^50000^-1 37^"47,1"^"DMS/Get Timestamp Response/Timestamp"^50116^-1 37^"47,2"^"DMS/Get Timestamp Response/Result Code"^50000^-1 37^"48,1"^"DMS/Get PRL Version Response/PRL Version"^50117^-1 37^"48,2"^"DMS/Get PRL Version Response/Result Code"^50000^-1 37^"49,1"^"DMS/Get Activation State Response/Activation State"^50112^-1 37^"49,2"^"DMS/Get Activation State Response/Result Code"^50000^-1 37^"50,2"^"DMS/Activate Automatic Response/Result Code"^50000^-1 37^"51,2"^"DMS/Activate Manual Response/Result Code"^50000^-1 37^"52,1"^"DMS/Get Lock State Response/Lock State"^50123^-1 37^"52,2"^"DMS/Get Lock State Response/Result Code"^50000^-1 37^"53,2"^"DMS/Set Lock State Response/Result Code"^50000^-1 37^"54,2"^"DMS/Set Lock Code Response/Result Code"^50000^-1 37^"55,1"^"DMS/Read User Data Response/User Data"^50126^-1 37^"55,2"^"DMS/Read User Data Response/Result Code"^50000^-1 37^"56,2"^"DMS/Write User Data Response/Result Code"^50000^-1 37^"57,1"^"DMS/Read ERI Data Response/User Data"^50126^-1 37^"57,2"^"DMS/Read ERI Data Response/Result Code"^50000^-1 37^"58,2"^"DMS/Reset Factory Defaults Response/Result Code"^50000^-1 37^"59,2"^"DMS/Validate SPC Response/Result Code"^50000^-1 37^"60,1"^"DMS/UIM Get ICCID Response/ICCID"^50140^-1 37^"60,2"^"DMS/UIM Get ICCID Response/Result Code"^50000^-1 37^"61,1"^"DMS/UIM Get Firmware ID Response/ID"^50141^-1 37^"61,2"^"DMS/UIM Get Firmware ID Response/Result Code"^50000^-1 37^"62,2"^"DMS/UIM Set Firmware ID Response/Result Code"^50000^-1 37^"63,1"^"DMS/UIM Get Host Lock ID Response/ID"^50142^-1 37^"63,2"^"DMS/UIM Get Host Lock ID Response/Result Code"^50000^-1 37^"64,1"^"DMS/UIM Get Control Key Status Response/Status"^50146^-1 37^"64,2"^"DMS/UIM Get Control Key Status Response/Result Code"^50000^-1 37^"64,16"^"DMS/UIM Get Control Key Status Response/Blocking"^50153^-1 37^"65,2"^"DMS/UIM Set Control Key Protection Response/Result Code"^50000^-1 37^"65,16"^"DMS/UIM Set Control Key Protection Response/Status"^50148^-1 37^"66,2"^"DMS/UIM Unblock Control Key Response/Result Code"^50000^-1 37^"66,16"^"DMS/UIM Unblock Control Key Response/Status"^50150^-1 37^"67,1"^"DMS/Get IMSI Response/IMSI"^50138^-1 37^"67,2"^"DMS/Get IMSI Response/Result Code"^50000^-1 37^"68,1"^"DMS/Get UIM State Response/State"^50152^-1 37^"68,2"^"DMS/Get UIM State Response/Result Code"^50000^-1 37^"69,1"^"DMS/Get Band Capabilities Response/Bands"^50165^-1 37^"69,2"^"DMS/Get Band Capabilities Response/Result Code"^50000^-1 37^"70,1"^"DMS/Get Factory Serial Number Response/ID"^50168^-1^0 37^"70,2"^"DMS/Get Factory Serial Number Response/Result Code"^50000^-1^0 37^"71,1"^"DMS/Get Firmware Preference Response/Image List"^50155^-1 37^"71,2"^"DMS/Get Firmware Preference Response/Result Code"^50000^-1 37^"72,1"^"DMS/Set Firmware Preference Response/Image List"^50159^-1 37^"72,2"^"DMS/Set Firmware Preference Response/Result Code"^50000^-1 37^"72,16"^"DMS/Set Firmware Preference Response/Maximum"^50160^-1 37^"73,1"^"DMS/List Stored Firmware Response/Image List"^50161^-1 37^"73,2"^"DMS/List Stored Firmware Response/Result Code"^50000^-1 37^"74,2"^"DMS/Delete Stored Firmware Response/Result Code"^50000^-1 37^"75,2"^"DMS/Set Device Time Response/Result Code"^50000^-1 37^"76,2"^"DMS/Get Stored Firmware Info Response/Result Code"^50000^-1 37^"76,16"^"DMS/Get Stored Firmware Info Response/Boot Version"^50172^-1 37^"76,17"^"DMS/Get Stored Firmware Info Response/PRI Version"^50173^-1 37^"76,18"^"DMS/Get Stored Firmware Info Response/OEM Lock ID"^50174^-1 37^"77,1"^"DMS/Get Alternate Net Config Response/Config"^50169^-1 37^"77,2"^"DMS/Get Alternate Net Config Response/Result Code"^50000^-1 37^"78,2"^"DMS/Set Alternate Net Config Response/Result Code"^50000^-1 37^"79,2"^"DMS/Get Image Download Mode Response/Result Code"^50000^-1 37^"79,16"^"DMS/Get Image Download Mode Response/Mode"^50175^-1 37^"80,2"^"DMS/Set Image Download Mode Response/Result Code"^50000^-1 38^"1,16"^"DMS/Event Report/Power State"^50102^-1 38^"1,17"^"DMS/Event Report/PIN1 State"^50132^-1 38^"1,18"^"DMS/Event Report/PIN2 State"^50132^-1 38^"1,19"^"DMS/Event Report/Activation State"^50112^-1 38^"1,20"^"DMS/Event Report/Operating Mode"^50115^-1 38^"1,21"^"DMS/Event Report/UIM State"^50152^-1 38^"1,22"^"DMS/Event Report/Wireless Disable State"^50167^-1 39^"1,1"^"NAS/Abort Request/Transaction ID"^50001^-1 39^"2,16"^"NAS/Set Event Report Request/Signal Indicator"^50200^-1 39^"2,17"^"NAS/Set Event Report Request/RF Indicator"^50233^-1 39^"2,18"^"NAS/Set Event Report Request/Registration Reject Indicator"^50234^-1 39^"2,19"^"NAS/Set Event Report Request/RSSI Indicator"^50240^-1 39^"2,20"^"NAS/Set Event Report Request/ECIO Indicator"^50241^-1 39^"2,21"^"NAS/Set Event Report Request/IO Indicator"^50242^-1 39^"2,22"^"NAS/Set Event Report Request/SINR Indicator"^50243^-1 39^"2,23"^"NAS/Set Event Report Request/Error Rate Indicator"^50244^-1 39^"2,24"^"NAS/Set Event Report Request/RSRQ Indicator"^50277^-1 39^"3,16"^"NAS/Set Registration Event Report Request/System Select Indicator"^50250^-1 39^"3,18"^"NAS/Set Registration Event Report Request/DDTM Indicator"^50251^-1 39^"3,19"^"NAS/Set Registration Event Report Request/Serving System Indicator"^50252^-1 39^"32,16"^"NAS/Get Signal Strength Request/Request Mask"^50253^-1 39^"34,1"^"NAS/Initiate Network Register Request/Action"^50204^-1 39^"34,16"^"NAS/Initiate Network Register Request/Manual Info"^50205^-1 39^"34,17"^"NAS/Initiate Network Register Request/Change Duration"^50276^-1 39^"35,16"^"NAS/Initiate Attach Request/Action"^50206^-1 39^"39,16"^"NAS/Set Preferred Networks Request/Networks"^50210^-1 39^"41,16"^"NAS/Set Forbidden Networks Request/Networks"^50213^-1 39^"42,1"^"NAS/Set Technology Preference Request/Preference"^50216^-1 39^"45,1"^"NAS/Set ACCOLC Request/ACCOLC"^50219^-1 39^"48,16"^"NAS/Set Network Parameters Request/SPC"^50230^-1 39^"48,20"^"NAS/Set Network Parameters Request/CDMA 1xEV-DO Revision"^50228^-1 39^"48,21"^"NAS/Set Network Parameters Request/CDMA 1xEV-DO SCP Custom"^50229^-1 39^"48,22"^"NAS/Set Network Parameters Request/Roaming"^50231^-1 39^"51,16"^"NAS/Set System Selection Pref Request/Emergency Mode"^50263^-1 39^"51,17"^"NAS/Set System Selection Pref Request/Mode"^50264^-1 39^"51,18"^"NAS/Set System Selection Pref Request/Band"^50265^-1 39^"51,19"^"NAS/Set System Selection Pref Request/PRL"^50266^-1 39^"51,20"^"NAS/Set System Selection Pref Request/Roaming"^50267^-1 39^"55,1"^"NAS/Set DDTM Preference Request/DDTM"^50268^-1 39^"68,1"^"NAS/Get PLMN Name Request/PLMN"^50214^-1 40^"0,2"^"NAS/Reset Response/Result Code"^50000^-1 40^"1,2"^"NAS/Abort Response/Result Code"^50000^-1 40^"2,2"^"NAS/Set Event Report Response/Result Code"^50000^-1 40^"3,2"^"NAS/Set Registration Event Report Response/Result Code"^50000^-1 40^"32,1"^"NAS/Get Signal Strength Response/Signal Strength"^50201^-1 40^"32,2"^"NAS/Get Signal Strength Response/Result Code"^50000^-1 40^"32,16"^"NAS/Get Signal Strength Response/Signal Strength List"^50220^-1 40^"32,17"^"NAS/Get Signal Strength Response/RSSI List"^50254^-1 40^"32,18"^"NAS/Get Signal Strength Response/ECIO List"^50255^-1 40^"32,19"^"NAS/Get Signal Strength Response/IO"^50247^-1 40^"32,20"^"NAS/Get Signal Strength Response/SINR"^50248^-1 40^"32,21"^"NAS/Get Signal Strength Response/Error Rate List"^50256^-1 40^"33,2"^"NAS/Perform Network Scan Response/Result Code"^50000^-1 40^"33,16"^"NAS/Perform Network Scan Response/Network Info"^50202^-1 40^"33,17"^"NAS/Perform Network Scan Response/Network RAT"^50270^-1 40^"34,2"^"NAS/Initiate Network Register Response/Result Code"^50000^-1 40^"35,2"^"NAS/Initiate Attach Response/Result Code"^50000^-1 40^"36,1"^"NAS/Get Serving System Response/Serving System"^50207^-1 40^"36,2"^"NAS/Get Serving System Response/Result Code"^50000^-1 40^"36,16"^"NAS/Get Serving System Response/Roaming Indicator"^50208^-1 40^"36,17"^"NAS/Get Serving System Response/Data Services"^50223^-1 40^"36,18"^"NAS/Get Serving System Response/Current PLMN"^50209^-1 40^"36,19"^"NAS/Get Serving System Response/System ID"^50215^-1 40^"36,20"^"NAS/Get Serving System Response/Base Station"^50257^-1 40^"36,21"^"NAS/Get Serving System Response/Roaming List"^50258^-1 40^"36,22"^"NAS/Get Serving System Response/Default Roaming"^50260^-1 40^"36,23"^"NAS/Get Serving System Response/Time Zone"^50261^-1 40^"36,24"^"NAS/Get Serving System Response/Protocol Revision"^50262^-1 40^"37,1"^"NAS/Get Home Network Response/Home Network"^50209^-1 40^"37,2"^"NAS/Get Home Network Response/Result Code"^50000^-1 40^"37,16"^"NAS/Get Home Network Response/Home IDs"^50215^-1 40^"37,17"^"NAS/Get Home Network Response/Extended Home Network"^50269^-1 40^"38,2"^"NAS/Get Preferred Networks Response/Result Code"^50000^-1 40^"38,16"^"NAS/Get Preferred Networks Response/Networks"^50210^-1 40^"38,17"^"NAS/Get Preferred Networks Response/Static Networks"^50210^-1 40^"39,2"^"NAS/Set Preferred Networks Response/Result Code"^50000^-1 40^"40,2"^"NAS/Get Forbidden Networks Response/Result Code"^50000^-1 40^"40,16"^"NAS/Get Forbidden Networks Response/Networks"^50213^-1 40^"41,2"^"NAS/Set Forbidden Networks Response/Result Code"^50000^-1 40^"42,2"^"NAS/Set Technology Preference Response/Result Code"^50000^-1 40^"43,1"^"NAS/Get Technology Preference Response/Active Preference"^50216^-1 40^"43,2"^"NAS/Get Technology Preference Response/Result Code"^50000^-1 40^"43,16"^"NAS/Get Technology Preference Response/Persistent Preference"^50217^-1 40^"44,1"^"NAS/Get ACCOLC Response/ACCOLC"^50218^-1 40^"44,2"^"NAS/Get ACCOLC Response/Result Code"^50000^-1 40^"45,2"^"NAS/Set ACCOLC Response/Result Code"^50000^-1 40^"46,1"^"NAS/Get System Preference/Pref"^50224^-1 40^"46,2"^"NAS/Get System Preference/Result Code"^50000^-1 40^"47,2"^"NAS/Get Network Parameters Response/Result Code"^50000^-1 40^"47,17"^"NAS/Get Network Parameters Response/SCI"^50225^-1 40^"47,18"^"NAS/Get Network Parameters Response/SCM"^50226^-1 40^"47,19"^"NAS/Get Network Parameters Response/Registration"^50227^-1 40^"47,20"^"NAS/Get Network Parameters Response/CDMA 1xEV-DO Revision"^50228^-1 40^"47,21"^"NAS/Get Network Parameters Response/CDMA 1xEV-DO SCP Custom"^50229^-1 40^"47,22"^"NAS/Get Network Parameters Response/Roaming"^50231^-1 40^"48,2"^"NAS/Set Network Parameters Response/Result Code"^50000^-1 40^"49,1"^"NAS/Get RF Info Response/RF Info"^50235^-1 40^"49,2"^"NAS/Get RF Info Response/Result Code"^50000^-1 40^"50,1"^"NAS/Get AN-AAA Authentication Status Response/Status"^50237^-1 40^"50,2"^"NAS/Get AN-AAA Authentication Status Response/Result Code"^50000^-1 40^"51,2"^"NAS/Set System Selection Pref Response/Result Code"^50000^-1 40^"52,2"^"NAS/Get System Selection Pref Response/Result Code"^50000^-1 40^"52,16"^"NAS/Get System Selection Pref Response/Emergency Mode"^50263^-1 40^"52,17"^"NAS/Get System Selection Pref Response/Mode"^50264^-1 40^"52,18"^"NAS/Get System Selection Pref Response/Band"^50265^-1 40^"52,19"^"NAS/Get System Selection Pref Response/PRL"^50266^-1 40^"52,20"^"NAS/Get System Selection Pref Response/Roaming"^50267^-1 40^"55,2"^"NAS/Set DDTM Preference Response/Result Code"^50000^-1 40^"56,1"^"NAS/Get DDTM Preference Response/DDTM"^50268^-1 40^"56,2"^"NAS/Get DDTM Preference Response/Result Code"^50000^-1 40^"59,2"^"NAS/Get CSP PLMN Mode Response/Result Code"^50000^-1 40^"59,16"^"NAS/Get CSP PLMN Mode Response/Mode"^50273^-1 40^"68,2"^"NAS/Get PLMN Name Response/Result Code"^50000^-1 40^"68,16"^"NAS/Get PLMN Name Response/Name"^50274^-1 41^"2,16"^"NAS/Event Report/Signal Strength"^50201^-1 41^"2,17"^"NAS/Event Report/RF Info"^50235^-1 41^"2,18"^"NAS/Event Report/Registration Reject"^50236^-1 41^"2,19"^"NAS/Event Report/RSSI"^50245^-1 41^"2,20"^"NAS/Event Report/ECIO"^50246^-1 41^"2,21"^"NAS/Event Report/IO"^50247^-1 41^"2,22"^"NAS/Event Report/SINR"^50248^-1 41^"2,23"^"NAS/Event Report/Error Rate"^50249^-1 41^"2,24"^"NAS/Event Report/RSRQ"^50275^-1 41^"36,1"^"NAS/Serving System Indication/Serving System"^50207^-1 41^"36,16"^"NAS/Serving System Indication/Roaming Indicator"^50208^-1 41^"36,17"^"NAS/Serving System Indication/Data Services"^50223^-1 41^"36,18"^"NAS/Serving System Indication/Current PLMN"^50209^-1 41^"36,19"^"NAS/Serving System Indication/System ID"^50215^-1 41^"36,20"^"NAS/Serving System Indication/Base Station"^50257^-1 41^"36,21"^"NAS/Serving System Indication/Roaming List"^50258^-1 41^"36,22"^"NAS/Serving System Indication/Default Roaming"^50260^-1 41^"36,23"^"NAS/Serving System Indication/Time Zone"^50261^-1 41^"36,24"^"NAS/Serving System Indication/Protocol Revision"^50262^-1 41^"36,25"^"NAS/Serving System Indication/PLMN Change"^50272^-1 41^"52,16"^"NAS/System Selection Pref Indication/Emergency Mode"^50263^-1 41^"52,17"^"NAS/System Selection Pref Indication/Mode"^50264^-1 41^"52,18"^"NAS/System Selection Pref Indication/Band"^50265^-1 41^"52,19"^"NAS/System Selection Pref Indication/PRL"^50266^-1 41^"52,20"^"NAS/System Selection Pref Indication/Roaming"^50267^-1 41^"56,1"^"NAS/DDTM Preference Indication/DDTM"^50268^-1 41^"60,16"^"NAS/CSP PLMN Mode Indication/Mode"^50273^-1 45^"1,16"^"WMS/Set Event Report Request/New MT Message Indicator"^50300^-1 45^"32,1"^"WMS/Raw Send Request/Message Data"^50302^-1 45^"32,16"^"WMS/Raw Send Request/Force On DC"^50321^-1 45^"32,17"^"WMS/Raw Send Request/Follow On DC"^50322^-1 45^"32,18"^"WMS/Raw Send Request/Link Control"^50323^-1 45^"33,1"^"WMS/Raw Write Request/Message Data"^50304^-1 45^"34,1"^"WMS/Raw Read Request/Message Index"^50301^-1 45^"34,16"^"WMS/Raw Read Request/Message Mode"^50310^-1 45^"35,1"^"WMS/Modify Tag Request/Message Tag"^50307^-1 45^"35,16"^"WMS/Modify Tag Request/Message Mode"^50310^-1 45^"36,1"^"WMS/Delete Request/Memory Storage"^50308^-1 45^"36,16"^"WMS/Delete Request/Message Index"^50305^-1 45^"36,17"^"WMS/Delete Request/Message Tag"^50309^-1 45^"36,18"^"WMS/Delete Request/Message Mode"^50310^-1 45^"49,1"^"WMS/List Messages Request/Memory Storage"^50308^-1 45^"49,16"^"WMS/List Messages Request/Message Tag"^50309^-1 45^"49,17"^"WMS/List Messages Request/Message Mode"^50310^-1 45^"50,1"^"WMS/Set Routes Request/Route List"^50313^-1 45^"50,16"^"WMS/Set Routes Request/Transfer Status Report"^50326^-1 45^"53,1"^"WMS/Set SMSC Address Request/Address"^50319^-1 45^"53,16"^"WMS/Set SMSC Address Request/Address Type"^50318^-1 45^"54,1"^"WMS/Get Storage Max Size Request/Memory Storage"^50308^-1 45^"54,16"^"WMS/Get Storage Max Size Request/Message Mode"^50310^-1 45^"55,1"^"WMS/Send ACK Request/ACK"^50329^-1 45^"55,16"^"WMS/Send ACK Request/3GPP2 Failure Info"^50330^-1 45^"55,17"^"WMS/Send ACK Request/3GPP Failure Info"^50331^-1 45^"56,1"^"WMS/Set Retry Period Request/Period"^50332^-1 45^"57,1"^"WMS/Set Retry Interval Request/Interval"^50333^-1 45^"58,1"^"WMS/Set DC Disconnect Timer Request/Timer"^50334^-1 45^"59,1"^"WMS/Set Memory Status Request/Status"^50335^-1 45^"60,1"^"WMS/Set Broadcast Activation Request/BC Info"^50336^-1 45^"61,1"^"WMS/Set Broadcast Config Request/Mode"^50310^-1 45^"61,16"^"WMS/Set Broadcast Config Request/3GPP Info"^50337^-1 45^"61,17"^"WMS/Set Broadcast Config Request/3GPP2 Info"^50339^-1 45^"62,1"^"WMS/Get Broadcast Config Request/Mode"^50310^-1 45^"65,1"^"WMS/Set Domain Preference Request/Pref"^50344^-1 45^"66,1"^"WMS/Send From Memory Store Request/Info"^50345^-1 46^"0,2"^"WMS/Reset Response/Result Code"^50000^-1 46^"1,2"^"WMS/Set Event Report Response/Result Code"^50000^-1 46^"32,2"^"WMS/Raw Send Response/Result Code"^50000^-1 46^"32,16"^"WMS/Raw Send Response/Cause Code"^50303^-1 46^"32,17"^"WMS/Raw Send Response/Error Class"^50324^-1 46^"32,18"^"WMS/Raw Send Response/Cause Info"^50325^-1 46^"33,1"^"WMS/Raw Write Response/Message Index"^50305^-1 46^"33,2"^"WMS/Raw Write Response/Result Code"^50000^-1 46^"34,1"^"WMS/Raw Read Response/Message Data"^50306^-1 46^"34,2"^"WMS/Raw Read Response/Result Code"^50000^-1 46^"35,2"^"WMS/Modify Tag Response/Result Code"^50000^-1 46^"36,2"^"WMS/Delete Response/Result Code"^50000^-1 46^"48,1"^"WMS/Get Message Protocol Response/Message Protocol"^50310^-1 46^"48,2"^"WMS/Get Message Protocol Response/Result Code"^50000^-1 46^"49,1"^"WMS/List Messages Response/Message List"^50311^-1 46^"49,2"^"WMS/List Messages Response/Result Code"^50000^-1 46^"50,2"^"WMS/Set Routes Response/Result Code"^50000^-1 46^"51,1"^"WMS/Get Routes Response/Route List"^50315^-1 46^"51,16"^"WMS/Get Routes Response/Transfer Status Report"^50326^-1 46^"51,2"^"WMS/Get Routes Response/Result Code"^50000^-1 46^"52,1"^"WMS/Get SMSC Address Response/Address"^50317^-1 46^"52,2"^"WMS/Get SMSC Address Response/Result Code"^50000^-1 46^"54,1"^"WMS/Get Storage Max Size Response/Max Size"^50327^-1 46^"54,2"^"WMS/Get Storage Max Size Response/Result Code"^50000^-1 46^"54,16"^"WMS/Get Storage Max Size Response/Available Size"^50328^-1 46^"55,2"^"WMS/Send ACK Response/Result Code"^50000^-1 46^"56,2"^"WMS/Set Retry Period Response/Result Code"^50000^-1 46^"57,2"^"WMS/Set Retry Interval Response/Result Code"^50000^-1 46^"58,2"^"WMS/Set DC Disconnect Timer Response/Result Code"^50000^-1 46^"59,2"^"WMS/Set Memory Status Response/Result Code"^50000^-1 46^"60,2"^"WMS/Set Broadcast Activation Response/Result Code"^50000^-1 46^"61,2"^"WMS/Set Broadcast Config Response/Result Code"^50000^-1 46^"62,2"^"WMS/Get Broadcast Config Response/Result Code"^50000^-1 46^"62,16"^"WMS/Get Broadcast Config Response/3GPP Info"^50341^-1 46^"62,17"^"WMS/Get Broadcast Config Response/3GPP2 Info"^50342^-1 46^"64,1"^"WMS/Get Domain Preference Response/Pref"^50344^-1 46^"64,2"^"WMS/Get Domain Preference Response/Result Code"^50000^-1 46^"65,2"^"WMS/Set Domain Preference Response/Result Code"^50000^-1 46^"66,2"^"WMS/Send From Memory Store Response/Result Code"^50000^-1 46^"66,16"^"WMS/Send From Memory Store Response/Message ID"^50346^-1 46^"66,17"^"WMS/Send From Memory Store Response/Cause Code"^50303^-1 46^"66,18"^"WMS/Send From Memory Store Response/Error Class"^50324^-1 46^"66,19"^"WMS/Send From Memory Store Response/Cause Info"^50325^-1 47^"1,16"^"WMS/Event Report/Received MT Message"^50301^-1 47^"1,17"^"WMS/Event Report/Transfer Route MT Message"^50320^-1 47^"1,18"^"WMS/Event Report/Message Mode"^50310^-1 47^"63,1"^"WMS/Memory Full Indication/Info"^50343^-1 47^"70,1"^"WMS/SMSC Address Indication/Address"^50317^-1 48^"1,16"^"PDS/Set Event Report Request/NMEA Indicator"^50400^-1 48^"1,17"^"PDS/Set Event Report Request/Mode Indicator"^50416^-1 48^"1,18"^"PDS/Set Event Report Request/Raw Indicator"^50420^-1 48^"1,19"^"PDS/Set Event Report Request/XTRA Request Indicator"^50421^-1 48^"1,20"^"PDS/Set Event Report Request/Time Injection Indicator"^50422^-1 48^"1,21"^"PDS/Set Event Report Request/Wi-Fi Indicator"^50423^-1 48^"1,22"^"PDS/Set Event Report Request/Satellite Indicator"^50424^-1 48^"1,23"^"PDS/Set Event Report Request/VX Network Indicator"^50425^-1 48^"1,24"^"PDS/Set Event Report Request/SUPL Network Indicator"^50426^-1 48^"1,25"^"PDS/Set Event Report Request/UMTS CP Network Indicator"^50427^-1 48^"1,26"^"PDS/Set Event Report Request/PDS Comm Indicator"^50428^-1 48^"33,1"^"PDS/Set Service State Request/State"^50403^-1 48^"34,1"^"PDS/Start Tracking Session Request/Session"^50404^-1 48^"39,1"^"PDS/Set NMEA Config Request/Config"^50405^-1 48^"40,1"^"PDS/Inject Time Reference Request/Time"^50406^-1 48^"42,1"^"PDS/Set Defaults Request/Defaults"^50407^-1 48^"44,16"^"PDS/Set XTRA Parameters Request/Automatic"^50408^-1 48^"44,17"^"PDS/Set XTRA Parameters Request/Medium"^50409^-1 48^"44,18"^"PDS/Set XTRA Parameters Request/Network"^50410^-1 48^"44,20"^"PDS/Set XTRA Parameters Request/Embedded"^50441^-1 48^"46,18"^"PDS/Get AGPS Config Request/Network Mode"^50471^-1 48^"47,16"^"PDS/Set AGPS Config Request/Server"^50412^-1 48^"47,17"^"PDS/Set AGPS Config Request/Server URL"^50432^-1 48^"47,18"^"PDS/Set AGPS Config Request/Network Mode"^50471^-1 48^"49,1"^"PDS/Set Service Auto-Tracking State Request/State"^50413^-1 48^"51,1"^"PDS/Set COM Port Auto-Tracking Config Request/Config"^50413^-1 48^"52,16"^"PDS/Reset PDS Data Request/GPS Data"^50414^-1 48^"52,17"^"PDS/Reset PDS Data Request/Cell Data"^50415^-1 48^"53,16"^"PDS/Single Position Fix Request/Mode"^50442^-1 48^"53,17"^"PDS/Single Position Fix Request/Timeout"^50443^-1 48^"53,18"^"PDS/Single Position Fix Request/Accuracy"^50444^-1 48^"55,1"^"PDS/Inject XTRA Data Request/Data"^50446^-1 48^"56,16"^"PDS/Inject Position Data Request/Timestamp"^50447^-1 48^"56,17"^"PDS/Inject Position Data Request/Latitude"^50448^-1 48^"56,18"^"PDS/Inject Position Data Request/Longitude"^50449^-1 48^"56,19"^"PDS/Inject Position Data Request/Altitude Ellipsoid"^50450^-1 48^"56,20"^"PDS/Inject Position Data Request/Altitude Sea Level"^50451^-1 48^"56,21"^"PDS/Inject Position Data Request/Horizontal Uncertainty"^50452^-1 48^"56,22"^"PDS/Inject Position Data Request/Vertical Uncertainty"^50453^-1 48^"56,23"^"PDS/Inject Position Data Request/Horizontal Confidence"^50454^-1 48^"56,24"^"PDS/Inject Position Data Request/Vertical Confidence"^50455^-1 48^"56,25"^"PDS/Inject Position Data Request/Source"^50456^-1 48^"57,16"^"PDS/Inject Wi-Fi Position Data Request/Time"^50457^-1 48^"57,17"^"PDS/Inject Wi-Fi Position Data Request/Position"^50458^-1 48^"57,18"^"PDS/Inject Wi-Fi Position Data Request/AP Info"^50459^-1 48^"59,16"^"PDS/Set SBAS Config Request/Config"^50462^-1 48^"60,1"^"PDS/Send Network Initiated Response Request/Action"^50463^-1 48^"60,16"^"PDS/Send Network Initiated Response Request/VX"^50437^-1 48^"60,17"^"PDS/Send Network Initiated Response Request/SUPL"^50438^-1 48^"60,18"^"PDS/Send Network Initiated Response Request/UMTS CP"^50439^-1 48^"61,1"^"PDS/Inject Absolute Time Request/Time"^50464^-1 48^"62,1"^"PDS/Inject EFS Data Request/Date File"^50465^-1 48^"64,1"^"PDS/Set DPO Config Request/Config"^50467^-1 48^"66,16"^"PDS/Set ODP Config Request/Config"^50468^-1 48^"81,16"^"PDS/Set Position Methods State Request/XTRA Time"^50470^-1 48^"81,17"^"PDS/Set Position Methods State Request/XTRA Data"^50470^-1 48^"81,18"^"PDS/Set Position Methods State Request/Wi-Fi"^50470^-1 49^"0,2"^"PDS/Reset Response/Result Code"^50000^-1 49^"1,2"^"PDS/Set Event Report Response/Result Code"^50000^-1 49^"32,1"^"PDS/Get Service State Response/State"^50402^-1 49^"32,2"^"PDS/Get Service State Response/Result Code"^50000^-1 49^"33,2"^"PDS/Set Service State Response/Result Code"^50000^-1 49^"34,2"^"PDS/Start Tracking Session Response/Result Code"^50000^-1 49^"35,1"^"PDS/Get Tracking Session Info Response/Info"^50404^-1 49^"35,2"^"PDS/Get Tracking Session Info Response/Result Code"^50000^-1 49^"36,2"^"PDS/Fix Position Response/Result Code"^50000^-1 49^"37,2"^"PDS/End Tracking Session Response/Result Code"^50000^-1 49^"38,1"^"PDS/Get NMEA Config Response/Config"^50405^-1 49^"38,2"^"PDS/Get NMEA Config Response/Result Code"^50000^-1 49^"39,2"^"PDS/Set NMEA Config Response/Result Code"^50000^-1 49^"40,2"^"PDS/Inject Time Reference Response/Result Code"^50000^-1 49^"41,1"^"PDS/Get Defaults Response/Defaults"^50407^-1 49^"41,2"^"PDS/Get Defaults Response/Result Code"^50000^-1 49^"42,2"^"PDS/Set Defaults Response/Result Code"^50000^-1 49^"43,2"^"PDS/Get XTRA Parameters Response/Result Code"^50000^-1 49^"43,16"^"PDS/Get XTRA Parameters Response/Automatic"^50408^-1 49^"43,17"^"PDS/Get XTRA Parameters Response/Medium"^50409^-1 49^"43,18"^"PDS/Get XTRA Parameters Response/Network"^50410^-1 49^"43,19"^"PDS/Get XTRA Parameters Response/Validity"^50411^-1 49^"43,20"^"PDS/Get XTRA Parameters Response/Embedded"^50441^-1 49^"44,2"^"PDS/Set XTRA Parameters Response/Result Code"^50000^-1 49^"45,2"^"PDS/Force XTRA Download Response/Result Code"^50000^-1 49^"46,2"^"PDS/Get AGPS Config Response/Result Code"^50000^-1 49^"46,16"^"PDS/Get AGPS Config Response/Server"^50412^-1 49^"46,17"^"PDS/Get AGPS Config Response/Server URL"^50432^-1 49^"47,2"^"PDS/Set AGPS Config Response/Result Code"^50000^-1 49^"48,1"^"PDS/Get Service Auto-Tracking State Response/State"^50413^-1 49^"48,2"^"PDS/Get Service Auto-Tracking State Response/Result Code"^50000^-1 49^"49,2"^"PDS/Set Service Auto-Tracking State Response/Result Code"^50000^-1 49^"50,1"^"PDS/Get COM Port Auto-Tracking Config Response/Config"^50413^-1 49^"50,2"^"PDS/Get COM Port Auto-Tracking Config Response/Result Code"^50000^-1 49^"51,2"^"PDS/Set COM Port Auto-Tracking Config Response/Result Code"^50000^-1 49^"52,2"^"PDS/Reset PDS Data Response/Result Code"^50000^-1 49^"53,2"^"PDS/Single Position Fix Response/Result Code"^50000^-1 49^"54,1"^"PDS/Get Service Version Response/Version"^50445^-1 49^"54,2"^"PDS/Get Service Version Response/Result Code"^50000^-1 49^"55,2"^"PDS/Inject XTRA Data Response/Result Code"^50000^-1 49^"56,2"^"PDS/Inject Position Data Response/Result Code"^50000^-1 49^"57,2"^"PDS/Inject Wi-Fi Position Data Response/Result Code"^50000^-1 49^"58,2"^"PDS/Get SBAS Config Response/Result Code"^50000^-1 49^"58,16"^"PDS/Get SBAS Config Response/Config"^50461^-1 49^"59,2"^"PDS/Set SBAS Config Response/Result Code"^50000^-1 49^"60,2"^"PDS/Send Network Initiated Response Response/Result Code"^50000^-1 49^"61,2"^"PDS/Inject Absolute Time Response/Result Code"^50000^-1 49^"62,2"^"PDS/Inject EFS Data Response/Result Code"^50000^-1 49^"63,2"^"PDS/Get DPO Config Response/Result Code"^50000^-1 49^"63,16"^"PDS/Get DPO Config Response/Config"^50466^-1 49^"64,2"^"PDS/Set DPO Config Response/Result Code"^50000^-1 49^"65,2"^"PDS/Get ODP Config Response/Result Code"^50000^-1 49^"65,16"^"PDS/Get ODP Config Response/Config"^50468^-1 49^"66,2"^"PDS/Set ODP Config Response/Result Code"^50000^-1 49^"67,2"^"PDS/Cancel Single Position Fix Response/Result Code"^50000^-1 49^"68,2"^"PDS/Get GPS State Response/Result Code"^50000^-1 49^"68,16"^"PDS/Get GPS State Response/State"^50469^-1 49^"80,2"^"PDS/Get Position Methods State Response/Result Code"^50000^-1 49^"80,16"^"PDS/Get Position Methods State Response/XTRA Time"^50470^-1 49^"80,17"^"PDS/Get Position Methods State Response/XTRA Data"^50470^-1 49^"80,18"^"PDS/Get Position Methods State Response/Wi-Fi"^50470^-1 49^"81,2"^"PDS/Set Position Methods State Response/Result Code"^50000^-1 50^"1,16"^"PDS/Event Report/NMEA Sentence"^50401^-1 50^"1,17"^"PDS/Event Report/NMEA Sentence Plus Mode"^50417^-1 50^"1,18"^"PDS/Event Report/Position Session Status"^50429^-1 50^"1,19"^"PDS/Event Report/Parsed Position Data"^50430^-1 50^"1,20"^"PDS/Event Report/External XTRA Request"^50431^-1 50^"1,21"^"PDS/Event Report/External Time Injection Request"^50433^-1 50^"1,22"^"PDS/Event Report/External Wi-Fi Position Request"^50434^-1 50^"1,23"^"PDS/Event Report/Satellite Info"^50435^-1 50^"1,24"^"PDS/Event Report/VX Network Initiated Prompt"^50437^-1 50^"1,25"^"PDS/Event Report/SUPL Network Initiated Prompt"^50438^-1 50^"1,26"^"PDS/Event Report/UMTS CP Network Initiated Prompt"^50439^-1 50^"1,27"^"PDS/Event Report/Comm Events"^50440^-1 50^"32,1"^"PDS/Service State Indication/State"^50402^-1 51^"32,16"^"AUTH/Start EAP Session Request/Method Mask"^50700^-1^0 51^"33,1"^"AUTH/Send EAP Packet Request/Request Packet"^50701^-1^0 52^"32,2"^"AUTH/Start EAP Session Response/Result Code"^50000^-1^0 52^"33,1"^"AUTH/Send EAP Packet Response/Response Packet"^50703^-1^0 52^"33,2"^"AUTH/Send EAP Packet Response/Result Code"^50000^-1^0 52^"35,1"^"AUTH/Get EAP Session Keys Response/Session Keys"^50705^-1^0 52^"35,2"^"AUTH/Get EAP Session Keys Response/Result Code"^50000^-1^0 52^"36,2"^"AUTH/End EAP Session Response/Result Code"^50000^-1^0 52^"34,1"^"AUTH/EAP Session Result/Result"^50704^-1^0 54^"1,16"^"CAT/Set Event Report Request/Report Mask"^50600^-1^0 54^"33,1"^"CAT/Send Terminal Response Request/Terminal Response Type"^50612^-1^0 54^"34,1"^"CAT/Envelope Command Request/Envelope Command"^50613^-1^0 55^"0,2"^"CAT/Reset Response/Result Code"^50000^-1^0 55^"1,2"^"CAT/Set Event Report Response/Result Code"^50000^-1^0 55^"1,16"^"CAT/Set Event Report Response/Reg Status Mask"^50600^-1^0 55^"32,1"^"CAT/Get Service State Response/CAT Service State"^50615^-1^0 55^"32,2"^"CAT/Get Service State Response/Result Code"^50000^-1^0 55^"33,2"^"CAT/Send Terminal Response Response/Result Code"^50000^-1^0 55^"34,2"^"CAT/Envelope Command Response/Result Code"^50000^-1^0 56^"1,16"^"CAT/Event Report/Display Text Event"^50601^-1^0 56^"1,17"^"CAT/Event Report/Get Inkey Event"^50602^-1^0 56^"1,18"^"CAT/Event Report/Get Input Event"^50603^-1^0 56^"1,19"^"CAT/Event Report/Setup Menu Event"^50604^-1^0 56^"1,20"^"CAT/Event Report/Select Item Event"^50605^-1^0 56^"1,21"^"CAT/Event Report/Alpha ID Available"^50606^-1^0 56^"1,22"^"CAT/Event Report/Setup Event List"^50607^-1^0 56^"1,23"^"CAT/Event Report/Setup Idle Mode Text Event"^50608^-1^0 56^"1,24"^"CAT/Event Report/Language Notification Event"^50609^-1^0 56^"1,25"^"CAT/Event Report/Refresh Event"^50610^-1^0 56^"1,26"^"CAT/Event Report/End Proactive Session"^50611^-1^0 57^"33,16"^"RMS/Set SMS Wake Request/State"^50500^-1^0 57^"33,17"^"RMS/Set SMS Wake Request/Mask"^50501^-1^0 58^"0,2"^"RMS/Reset Response/Result Code"^50000^-1^0 58^"32,2"^"RMS/Get SMS Wake Response/Result Code"^50000^-1^0 58^"32,16"^"RMS/Get SMS Wake Response/State"^50500^-1^0 58^"32,17"^"RMS/Get SMS Wake Request/Mask"^50501^-1^0 58^"33,2"^"RMS/Set SMS Wake Response/Result Code"^50000^-1^0 60^"1,16"^"OMA/Set Event Report Request/NIA"^50800^-1^0 60^"1,17"^"OMA/Set Event Report Request/Status"^50801^-1^0 60^"32,16"^"OMA/Start Session Request/Type"^50805^-1^0 60^"35,16"^"OMA/Send Selection Request/Type"^50808^-1^0 60^"37,16"^"OMA/Set Features Response/Provisioning"^50809^-1^0 60^"37,17"^"OMA/Set Features Response/PRL Update"^50810^-1^0 60^"37,18"^"OMA/Set Features Response/HFA Feature"^50811^-1^0 61^"0,2"^"OMA/Reset Response/Result Code"^50000^-1^0 61^"1,2"^"OMA/Set Event Report Response/Result Code"^50000^-1^0 61^"32,2"^"OMA/Start Session Response/Result Code"^50000^-1^0 61^"33,2"^"OMA/Cancel Session Response/Result Code"^50000^-1^0 61^"34,2"^"OMA/Get Session Info Response/Result Code"^50000^-1^0 61^"34,16"^"OMA/Get Session Info Response/Info"^50806^-1^0 61^"34,17"^"OMA/Get Session Info Response/Failure"^50804^-1^0 61^"34,18"^"OMA/Get Session Info Response/Retry"^50807^-1^0 61^"34,19"^"OMA/Get Session Info Response/NIA"^50802^-1^0 61^"35,2"^"OMA/Send Selection Response/Result Code"^50000^-1^0 61^"36,2"^"OMA/Get Features Response/Result Code"^50000^-1^0 61^"36,16"^"OMA/Get Features Response/Provisioning"^50809^-1^0 61^"36,17"^"OMA/Get Features Response/PRL Update"^50810^-1^0 61^"36,18"^"OMA/Get Features Response/HFA Feature"^50811^-1^0 61^"36,19"^"OMA/Get Features Response/HFA Done State"^50812^-1^0 61^"37,2"^"OMA/Set Features Response/Result Code"^50000^-1^0 62^"1,16"^"OMA/Event Report/NIA"^50802^-1^0 62^"1,17"^"OMA/Event Report/Status"^50803^-1^0 62^"1,18"^"OMA/Event Report/Failure"^50804^-1^0 63^"58,1"^"Voice/Initiate USSD Request/Info"^70000^-1^0 63^"59,1"^"Voice/Answer USSD Request/Info"^70000^-1^0 63^"67,1"^"Voice/Async Initiate USSD Request/Info"^70000^-1^0 64^"58,2"^"Voice/Initiate USSD Response/Result Code"^50000^-1^0 64^"58,16"^"Voice/Initiate USSD Response/Fail Cause"^70001^-1^0 64^"58,17"^"Voice/Initiate USSD Response/Alpha ID"^70002^-1^0 64^"58,18"^"Voice/Initiate USSD Response/Data"^70000^-1^0 64^"59,2"^"Voice/Answer USSD Response/Result Code"^50000^-1^0 64^"60,2"^"Voice/Cancel USSD Response/Result Code"^50000^-1^0 64^"67,2"^"Voice/Async Initiate USSD Response/Result Code"^50000^-1^0 65^"62,1"^"Voice/USSD Indication/Type"^70003^-1^0 65^"62,16"^"Voice/USSD Indication/Data"^70000^-1 65^"67,16"^"Voice/USSD Async Indication/Error"^70004^-1^0 65^"67,17"^"Voice/USSD Async Indication/Fail Cause"^70001^-1^0 65^"67,18"^"Voice/USSD Async Indication/Info"^70000^-1^0 65^"67,19"^"Voice/USSD Async Indication/Alpha ID"^70002^-1^0libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/Enum.txt000077500000000000000000000126571455567757300232010ustar00rootroot0000000000000050000^"QMI Results"^-1^0 50001^"QMI Errors"^-1^0 50002^"QMI Data Bearer Technologies"^-1^0 50003^"QMI Connection Status"^-1^0 50004^"QMI Profile Types"^-1^0 50005^"QMI PDP Types"^-1^0 50006^"QMI Traffic Classes"^-1^0 50007^"QMI QoS Delivery Orders"^-1^0 50008^"QMI SDU Error Ratios"^-1^0 50009^"QMI SDU Residual Bit Error Ratios"^-1^0 50010^"QMI Erroneous SDU Deliveries"^-1^0 50011^"QMI Dormancy Status"^-1^0 50012^"QMI Call End Reasons"^-1^0 50013^"QMI Mobile IP Modes"^-1^0 50014^"QMI Call History Types"^-1^0 50015^"QMI Call Types"^-1^0 50016^"QMI HA/AAA Key States"^-1^0 50017^"QMI WDS Network Types"^-1^0 50018^"QMI WDS Extended Tech Prefs"^-1^0 50019^"QMI WDS Call Types"^-1^0 50020^"QMI WDS IP Families"^-1^0 50021^"QMI WDS Mobile IP Call End Reasons"^-1^0 50022^"QMI WDS Internal Call End Reasons"^-1^0 50023^"QMI WDS Call Manager Call End Reasons"^-1^0 50024^"QMI WDS 3GPP Call End Reasons"^-1^0 50025^"QMI WDS Call End Reason Types"^-1^0 50026^"QMI WDS Autoconnect Settings"^-1^0 50027^"QMI WDS Autoconnect Roam Settings"^-1^0 50028^"QMI PDP Access Control Flag"^-1^0 50029^"QMI IP Version"^-1^0 50030^"QMI Address Allocation Preference"^-1^0 50031^"QMI QoS Class Identifier"^-1^0 50032^"QMI Authentication Protocol"^-1^0 50033^"QMI Data Rate"^-1^0 50034^"QMI Application Type"^-1^0 50035^"QMI Data Mode"^-1^0 50036^"QMI PDN Type"^-1^0 50037^"QMI Extended Error Code"^-1^0 50100^"QMI Power Sources"^-1^0 50101^"QMI Data Service Capabilities 1"^-1^0 50102^"QMI DMS Radio Interfaces"^-1^0 50103^"QMI DMS Activation States"^-1^0 50104^"QMI DMS Operating Modes"^-1^0 50105^"QMI DMS Timestamp Sources"^-1^0 50106^"QMI DMS Activation Types"^-1^0 50107^"QMI DMS Lock States"^-1^0 50108^"QMI DMS PIN Status"^-1^0 50109^"QMI DMS UIM Facility"^-1^0 50110^"QMI DMS UIM Facility States"^-1^0 50111^"QMI DMS UIM States"^-1^0 50112^"QMI DMS Image Types"^-1^0 50113^"QMI DMS Time References"^-1^0 50200^"QMI NAS Radio Interfaces"^-1^0 50201^"QMI In Use States"^-1^0 50202^"QMI Roaming States"^-1^0 50203^"QMI Forbidden States"^-1^0 50204^"QMI Preferred States"^-1^0 50205^"QMI Register Actions"^-1^0 50206^"QMI Radio Access Technologies"^-1^0 50207^"QMI PS Attach Actions"^-1^0 50208^"QMI Registration States"^-1^0 50209^"QMI CS/PS Attach States"^-1^0 50210^"QMI Registered Networks"^-1^0 50211^"QMI Roaming Indicators"^-1^0 50212^"QMI Tech Pref Durations"^-1^0 50213^"QMI Tech Prefs"^-1^0 50214^"QMI Data Service Capabilities 2"^-1^0 50215^"QMI NAS System Preferences"^-1^0 50216^"QMI NAS Roaming Preferences"^-1^0 50217^"QMI NAS Band Classes"^-1^0 50218^"QMI NAS Service Domains"^-1^0 50219^"QMI NAS AN-AAA Authentication Status"^-1^0 50220^"QMI NAS SINR Levels"^-1^0 50221^"QMI NAS PRL Preferences"^-1^0 50222^"QMI NAS Roaming Preferences 2"^-1^0 50223^"QMI NAS DDTM Preferences"^-1^0 50224^"QMI NAS Service Option Actions"^-1^0 50225^"QMI NAS Network Description Displays"^-1^0 50226^"QMI NAS Network Description Encodings"^-1^0 50227^"QMI NAS PLMN Name Encoding Schemes"^-1^0 50228^"QMI NAS PLMN Name Country Initials"^-1^0 50229^"QMI NAS PLMN Name Spare Bits"^-1^0 50230^"QMI Change Duration"^-1^0 50300^"QMI WMS Storage Types"^-1^0 50301^"QMI WMS Message Formats"^-1^0 50302^"QMI WMS Message Tags"^-1^0 50303^"QMI WMS Message Protocols"^-1^0 50304^"QMI WMS Message Types"^-1^0 50305^"QMI WMS Message Classes"^-1^0 50306^"QMI WMS Receipt Actions"^-1^0 50307^"QMI WMS Route Values"^-1^0 50308^"QMI WMS CDMA Service Options"^-1^0 50309^"QMI WMS Error Classes"^-1^0 50310^"QMI WMS Error Classes 2"^-1^0 50311^"QMI WMS GSM/WCDMA Domains"^-1^0 50400^"QMI PDS Tracking Session States"^-1^0 50401^"QMI PDS Session Control Types"^-1^0 50402^"QMI PDS Session Types"^-1^0 50403^"QMI PDS Operation Types"^-1^0 50404^"QMI PDS Server Options"^-1^0 50405^"QMI PDS Output Devices"^-1^0 50406^"QMI PDS NMEA Reporting Options"^-1^0 50407^"QMI PDS Mediums"^-1^0 50408^"QMI PDS WWAN Network Preferences"^-1^0 50409^"QMI PDS NMEA Sentence Operating Modes"^-1^0 50410^"QMI PDS Session Status"^-1^0 50411^"QMI PDS Calendar Months"^-1^0 50412^"QMI PDS Calendar Days"^-1^0 50413^"QMI PDS Wi-Fi Request Types"^-1^0 50414^"QMI PDS SV Systems"^-1^0 50415^"QMI PDS SV Health Status"^-1^0 50416^"QMI PDS SV Processing Status"^-1^0 50417^"QMI PDS SV Ephemeris Status"^-1^0 50418^"QMI PDS SV Almanac Status"^-1^0 50419^"QMI PDS Privacy Modes"^-1^0 50420^"QMI PDS VX Modes"^-1^0 50421^"QMI PDS VX Data Coding Schemes"^-1^0 50422^"QMI PDS SUPL Modes"^-1^0 50423^"QMI PDS SUPL Data Coding Schemes"^-1^0 50424^"QMI PDS SUPL ID/Name Data Coding Schemes"^-1^0 50425^"QMI PDS UMTS CP Data Coding Schemes"^-1^0 50426^"QMI PDS UMTS CP Location Types"^-1^0 50427^"QMI PDS Comm Event Types"^-1^0 50428^"QMI PDS Comm Event Protocols"^-1^0 50429^"QMI PDS Injected Position Sources"^-1^0 50430^"QMI PDS SBAS States"^-1^0 50431^"QMI PDS Time Bases"^-1^0 50432^"QMI PDS EFS File Operations"^-1^0 50433^"QMI PDS ODP States"^-1^0 50434^"QMI PDS Method States"^-1^0 50435^"QMI Network Mode"^-1^0 50600^"QMI CAT Alpha ID Command Type"^-1^0 50601^"QMI CAT Refresh Stage"^-1^0 50602^"QMI CAT Proactive Session End Type"^-1^0 50603^"QMI CAT Envelope Command Type"^-1^0 50700^"QMI AUTH EAP Result"^-1^0 50800^"QMI OMA Session Types"^-1^0 50801^"QMI OMA Session States"^-1^0 50802^"QMI OMA Session Failure Reasons"^-1^0 50803^"QMI OMA Selections"^-1^0 50804^"QMI OMA HFA Done States"^-1^0 50900^"QMI Service Types"^-1^0 50901^"QMI Driver Data Formats"^-1^0 50902^"QMI Power Save States "^-1^0 70000^"USSD Data Coding Schemes"^-1^0 70001^"USSD Alpha Coding Schemes"^-1^0 70002^"USSD Notifcation Types"^-1^0libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/EnumEntry.txt000077500000000000000000000566201455567757300242210ustar00rootroot0000000000000050000^0^"Success" 50000^1^"Failure" 50001^0^"None" 50001^1^"Malformed Message" 50001^2^"No Memory" 50001^3^"Internal" 50001^4^"Aborted" 50001^5^"Client IDs Exhausted" 50001^6^"Unabortable Transaction" 50001^7^"Invalid Client ID" 50001^8^"No Thresholds Provided" 50001^9^"Invalid Handle" 50001^10^"Invalid Profile" 50001^11^"Invalid PIN ID" 50001^12^"Incorrect PIN" 50001^13^"No Network Found" 50001^14^"Call Failed" 50001^15^"Out Of Call" 50001^16^"Not Provisioned" 50001^17^"Missing Argument" 50001^19^"Argument Too Long" 50001^22^"Invalid Transaction ID" 50001^23^"Device In Use" 50001^24^"Network Unsupported" 50001^25^"Device Unsupported" 50001^26^"No Effect" 50001^27^"No Free Profile" 50001^28^"Invalid PDP Type" 50001^29^"Invalid Technology Preference" 50001^30^"Invalid Profile Type" 50001^31^"Invalid Service Type" 50001^32^"Invalid Register Action" 50001^33^"Invalid PS Attach Action" 50001^34^"Authentication Failed" 50001^35^"PIN Blocked" 50001^36^"PIN Always Blocked" 50001^37^"UIM Uninitialized" 50001^38^"Maximum QoS Requests In Use" 50001^39^"Incorrect Flow Filter" 50001^40^"Network QoS Unaware" 50001^41^"Invalid QoS ID" 50001^42^"QoS Unavailable" 50001^43^"Flow Suspended" 50001^46^"General Error" 50001^47^"Unknown Error" 50001^48^"Invalid Argument" 50001^49^"Invalid Index" 50001^50^"No Entry" 50001^51^"Device Storage Full" 50001^52^"Device Not Ready" 50001^53^"Network Not Ready" 50001^54^"WMS Cause Code" 50001^55^"WMS Message Not Sent" 50001^56^"WMS Message Delivery Failure" 50001^57^"WMS Invalid Message ID" 50001^58^"WMS Encoding" 50001^59^"Authentication Lock" 50001^60^"Invalid Transition" 50001^65^"Session Inactive" 50001^66^"Session Invalid" 50001^67^"Session Ownership" 50001^68^"Insufficient Resources" 50001^69^"Disabled" 50001^70^"Invalid Operation" 50001^71^"Invalid QMI Command" 50001^72^"WMS TPDU Type" 50001^73^"WMS SMSC Address" 50001^74^"Information Unavailable" 50001^75^"Segment Too Long" 50001^76^"Segment Order" 50001^77^"Bundling Not Supported" 50001^80^"SIM File Not Found" 50001^82^"Access Denied" 50001^83^"Hardware Restricted" 50001^61441^"CAT Event Registration Failed" 50001^61442^"CAT Invalid Terminal Response" 50001^61443^"CAT Invalid Envelope Command" 50001^61444^"CAT Envelope Command Busy" 50001^61445^"CAT Envelope Command Failed" 50002^1^"CDMA2000 1x" 50002^2^"CDMA2000 1x Ev-DO Rev. 0" 50002^3^"GPRS" 50002^4^"WCDMA" 50002^5^"CDMA2000 1x Ev-DO Rev. A" 50002^6^"EGPRS" 50002^7^"HSDPA/WCDMA" 50002^8^"WCDMA/HSUPA" 50002^9^"HSDPA/HSUPA" 50002^10^"LTE" 50002^11^"CDMA2000 EHRPD" 50003^1^"Disconnected" 50003^2^"Connected" 50003^3^"Suspended" 50003^4^"Authenticating" 50004^0^"3GPP" 50004^1^"3GPP2" 50005^0^"PDP-IP (V4)" 50006^0^"Subscribed" 50006^1^"Conversational" 50006^2^"Streaming" 50006^3^"Interactive" 50006^4^"Background" 50007^0^"Subscribe" 50007^1^"Delivery Order On" 50007^2^"Delivery Order Off" 50008^0^"Subscribe" 50008^1^"1 x 10-2" 50008^2^"7 x 10-3" 50008^3^"1 x 10-3" 50008^4^"1 x 10-4" 50008^5^"1 x 10-5" 50008^6^"1 x 10-6" 50008^7^"1 x 10-1" 50009^0^"Subscribe" 50009^1^"5 x 10-2" 50009^2^"1 x 10-2" 50009^3^"5 x 10-3" 50009^4^"4 x 10-3" 50009^5^"1 x 10-3" 50009^6^"1 x 10-4" 50009^7^"1 x 10-5" 50009^8^"1 x 10-6" 50009^9^"6 x 10-8" 50010^0^"Subscribe" 50010^1^"No Detection" 50010^2^"Erroneous SDU Is Delivered" 50010^3^"Erroneous SDU Is Not Delivered" 50011^1^"Traffic Channel Dormant" 50011^2^"Traffic Channel Active" 50012^1^"Unspecified" 50012^2^"Client End" 50012^3^"No Service" 50012^4^"Fade" 50012^5^"Release Normal" 50012^6^"Acc In Progress" 50012^7^"Acc Failed" 50012^8^"Redirect Or Handoff" 50012^9^"Close In Progress" 50012^10^"Authentication Failed" 50012^11^"Internal Error" 50012^500^"CDMA Lock" 50012^501^"Intercept" 50012^502^"Reorder" 50012^503^"Release Service Option Rejected" 50012^504^"Incoming Call" 50012^505^"Alert Stop" 50012^506^"Activation" 50012^507^"Max Access Probe" 50012^508^"CCS Not Supported By BS" 50012^509^"No Response From BS" 50012^510^"Rejected By BS" 50012^511^"Incompatible" 50012^512^"Already In TC" 50012^513^"User Call Orig During GPS" 50012^514^"User Call Orig During SMS" 50012^515^"No CDMA Service" 50012^1000^"Conf Failed" 50012^1001^"Incoming Rejected" 50012^1002^"No GW Service" 50012^1003^"Network End" 50012^1004^"LLC Or SNDCP Failure" 50012^1005^"Insufficient Resources" 50012^1006^"Service Option Out Of order" 50012^1007^"NSAPI Already Used" 50012^1008^"Regular PDP Context Deactivation" 50012^1009^"Network Failure" 50012^1010^"Reactivation Requested" 50012^1011^"Protocol Error" 50012^1012^"Operator Determined Barring" 50012^1013^"Unknown Or Missing APN" 50012^1014^"Unknown PDP Address Or PDP Type" 50012^1015^"Activation Rejected By GGSN" 50012^1016^"Activation Rejected, Unspecified" 50012^1017^"Service Option Not Supported" 50012^1018^"Requested Service Option Not Subscribed" 50012^1019^"QoS Not Accepted" 50012^1020^"Semantic Error In The TFT Operation" 50012^1021^"Syntactical Error In The TFT Operation" 50012^1022^"Unknown PDP Context" 50012^1023^"Semantic Errors In Packet Filter(s)" 50012^1024^"Syntactical Errors In Packet Filter(s)" 50012^1025^"PDP Context Without TFT Already Activated" 50012^1026^"Invalid Transaction Identifier Value" 50012^1027^"Semantically Incorrect Message" 50012^1028^"Invalid Mandatory Information" 50012^1029^"Message Type Non-Existent" 50012^1030^"Message Not Compatible With State" 50012^1031^"Information Element Nonexistent " 50012^1032^"Conditional Information Element Error" 50012^1033^"Message Not Compatible With Protocol State" 50012^1034^"APN Restriction Value Incompatible With Active PDP Context" 50012^1035^"No GPRS Context Present" 50012^1036^"Requested Feature Not Supported" 50012^1500^"CD Gen Or Busy" 50012^1501^"CD Bill Or Auth" 50012^1502^"Change HDR" 50012^1503^"Exit HDR" 50012^1504^"HDR No Session" 50012^1505^"HDR Orig During GPS Fix" 50012^1506^"HDR CS Timeout" 50012^1507^"HDR Released By CM" 50013^0^"MIP Off (Simple IP Only)" 50013^1^"MIP Preferred" 50013^2^"MIP Only" 50014^0^"Full" 50014^1^"IDs Only" 50015^0^"NDIS" 50015^1^"DUN" 50016^0^"Unset" 50016^1^"Set, Default" 50016^2^"Set, Modified" 50017^0^"Unknown" 50017^1^"CDMA" 50017^2^"UMTS" 50018^0x8001^"CDMA" 50018^0x8004^"UMTS" 50019^0^"Laptop" 50019^1^"Embedded" 50020^4^"IPv4" 50020^6^"IPv6" 50020^8^"Unspecified" 50021^64^"FA Unspecified" 50021^65^"FA Administratively Prohibited" 50021^66^"FA Insufficient Resources" 50021^67^"FA Mobile Node Authentication Failure" 50021^68^"FA HA Authentication Failure" 50021^69^"FA Requested Lifetime Too Long" 50021^70^"FA Malformed Request" 50021^71^"FA Malformed Reply" 50021^72^"FA Encapsulation Unavailable" 50021^73^"FA VJHC Unavailable" 50021^74^"FA Reverse Tunnel Unavailable" 50021^75^"FA Reverse Tunnel Is Mandatory And T Bit Is Not Set" 50021^79^"FA Delivery Style Not Supported" 50021^97^"FA Missing NAI" 50021^98^"FA Missing HA" 50021^99^"FA Missing Home Address" 50021^104^"FA Unknown Challenge" 50021^105^"FA Missing Challenge" 50021^106^"FA Stale Challenge" 50021^128^"HA Reason Unspecified" 50021^129^"HA Administratively Prohibited" 50021^130^"HA Insufficient Resources" 50021^131^"HA Mobile Node Authentication Failure" 50021^132^"HA FA Authentication Failure" 50021^133^"HA Registration ID Mismatch" 50021^134^"HA Malformed Request" 50021^136^"HA Unknown HA Address" 50021^137^"HA Reverse Tunnel Unavailable" 50021^138^"HA Reverse Tunnel Is Mandatory And T Bit Is Not Set" 50021^139^"HA Encapsulation Unavailable" 50021^65535^"Unknown" 50022^201^"Internal" 50022^202^"Call Ended" 50022^203^"Internal Unknown Cause Code" 50022^204^"Unknown Cause Code" 50022^205^"Close In Progress" 50022^206^"NW Initiated Termination" 50022^207^"App Preempted" 50023^500^"CDMA Lock" 50023^501^"Intercept" 50023^502^"Reorder" 50023^503^"Release Service Option Reject" 50023^504^"Incoming Call" 50023^505^"Alert Stop" 50023^506^"Activation" 50023^507^"Max Access Probe" 50023^508^"CCS Not Supported By BS" 50023^509^"No Response From BS" 50023^510^"Rejected By BS" 50023^511^"Incompatible" 50023^512^"Already In TC" 50023^513^"User Call Orig During GPS" 50023^514^"User Call Orig During SMS" 50023^515^"No CDMA Service" 50023^1000^"Conf Failed" 50023^1001^"Incoming Rejected" 50023^1002^"No GW Service" 50023^1003^"No GPRS Context" 50023^1004^"Illegal MS" 50023^1005^"Illegal ME" 50023^1006^"GPRS Services And Non-GPRS Service Not Allowed" 50023^1007^"GPRS Services Not Allowed" 50023^1008^"MS Identity Cannot Be Derived By The Network" 50023^1009^"Implicitly Detached" 50023^1010^"PLMN Not Allowed" 50023^1011^"LA Not Allowed" 50023^1012^"GPRS Services Not Allowed In This PLMN" 50023^1013^"PDP Duplicate" 50023^1014^"UE RAT Change" 50023^1015^"Congestion" 50023^1016^"No PDP Context Activated" 50023^1017^"Access Class DSAC Rejection" 50023^1500^"CD Gen Or Busy" 50023^1501^"CD Bill Or Auth" 50023^1502^"Change HDR" 50023^1503^"Exit HDR" 50023^1504^"HDR No Session" 50023^1505^"HDR Orig During GPS Fix" 50023^1506^"HDR CS Timeout" 50023^1507^"HDR Released By CM" 50023^2000^"Client End" 50023^2001^"No Service" 50023^2002^"Fade" 50023^2003^"Normal Release" 50023^2004^"Access In Progress" 50023^2005^"Access Fail" 50023^2006^"Redirect Or Handoff" 50024^8^"Operator Determined Barring" 50024^25^"LLC SNDCP Failure" 50024^26^"Insufficient Resources" 50024^27^"Unknown APN" 50024^28^"Unknown PDP" 50024^29^"Authentication FAiled" 50024^30^"GGSN Reject" 50024^31^"Activation Reject" 50024^32^"Option Not Supported" 50024^33^"Option Unsubscribed" 50024^34^"Option Temporarily OOO" 50024^35^"NSAPI Already Used" 50024^36^"Regular Deactivation" 50024^37^"QoS Not Accepted" 50024^38^"Network Failure" 50024^39^"UMTS Reactivation Request" 50024^40^"Feature Not Supported" 50024^41^"TFT Semantic Error" 50024^42^"TFT Syntax Error" 50024^43^"Unknown PDP Context" 50024^44^"Filter Semantic Error" 50024^45^"Filter Syntax Error" 50024^46^"PDP Without Active TFT" 50024^81^"Invalid Transaction ID" 50024^95^"Message Incorrect Semantic" 50024^96^"Invalid Mandatory ID" 50024^97^"Message Type Unsupported" 50024^98^"Message Type Noncompatible State" 50024^99^"Unknown Info Element" 50024^100^"Conditional Info Element Error" 50024^101^"Message And Protocol State Uncompatible" 50024^111^"Protocol Error" 50024^112^"APN Type Conflict" 50025^1^"Mobile IP" 50025^2^"Internal" 50025^3^"Call Manager Defined" 50025^6^"3GPP Specification Defined" 50026^0^"Disabled" 50026^1^"Enabled" 50026^2^"Paused" 50027^0^"Always" 50027^1^"Home Only" 50028^0^"PDP Access Control None" 50028^1^"PDP Access Control Reject" 50028^2^"PDP Access Control Permission" 50029^4^"IPv4" 50029^6^"IPv6" 50030^0^"NAS signaling" 50030^1^"DHCP" 50031^0^"Network Assign QCI" 50031^1^"Guaranteed Bitrate" 50031^2^"Guaranteed Bitrate" 50031^3^"Guaranteed Bitrate" 50031^4^"Guaranteed Bitrate" 50031^5^"Non Guaranteed Bitrate" 50031^6^"Non Guaranteed Bitrate" 50031^7^"Non Guaranteed Bitrate" 50031^8^"Non Guaranteed Bitrate" 50032^1^"PAP" 50032^2^"CHAP" 50032^3^"PAP or CHAP" 50033^0^"Low (SO15 Only)" 50033^1^"Medium (SO33 + low R-SCH)" 50033^2^"High (SO33 + high R-SCH)" 50034^0^"Default Application Type" 50034^32^"LBS Application Type" 50034^64^"Tethered Application Type" 50035^0^"CDMA or HDR" 50035^1^"CDMA Only" 50035^2^"HDR Only" 50036^0^"IPv4 PDN Type" 50036^1^"IPv6 PDN Type" 50036^2^"IPv4 or IPv6 PDN Type" 50036^3^"Unspecified PDN Type" 50037^1^"Failure" 50037^2^"Invalid handle" 50037^3^"Invalid Operation" 50037^4^"Invalid Profile Type" 50037^5^"Invalid Profile Number" 50037^6^"Invalid Identifier" 50037^7^"Invalid Argument" 50037^8^"Not Initialized" 50037^9^"Invalid Length" 50037^10^"List End" 50037^11^"Invalid Subscription ID" 50037^12^"Invalid Profile Family" 50037^1001^"3GPP Invalid Profile Family" 50037^1002^"3GPP Access Error" 50037^1003^"3GPP Context Not Defined" 50037^1004^"3GPP Valid Flag Not Set" 50037^1005^"3GPP Read Only Flag Set" 50037^1006^"3GPP Error Max Profile Number" 50037^1101^"3GPP2 Error Invalid Identifier For Profile" 50100^0^"Battery" 50100^1^"External" 50101^0^"No Data Services Supported" 50101^1^"Only Circuit Switched" 50101^2^"Only Packet Switched" 50101^3^"Simultaneous Circuit/Packet Switched" 50101^4^"Nonsimultaneous Circuit/Packet Switched" 50102^1^"CDMA2000 1x" 50102^2^"CDMA2000 HRPD" 50102^4^"GSM" 50102^5^"UMTS" 50102^8^"LTE" 50103^0^"Service Not Activated" 50103^1^"Serivce Activated" 50103^2^"Activation Connecting" 50103^3^"Activation In Progress" 50103^4^"OTASP Security Authenticated" 50103^5^"OTASP NAM Downloaded" 50103^6^"OTASP MDN Downloaded" 50103^7^"OTASP IMSI Downloaded" 50103^8^"OTASP PRL Downloaded" 50103^9^"OTASP SPC Downloaded" 50103^10^"OTASP Settings Committed" 50104^0^"Online" 50104^1^"Low Power" 50104^2^"Factory Test Mode" 50104^3^"Offline" 50104^4^"Reset" 50104^5^"Shutdown" 50104^6^"Persistent Low Power" 50104^7^"Mode-Only Low Power" 50105^0^"Device" 50105^1^"CDMA Network" 50105^2^"CDMA 1xEV-DO Network" 50105^3^"GSM Network" 50105^4^"WCDMA Network" 50105^5^"GPS Network" 50105^6^"MFLO Network" 50106^0^"OTASP" 50107^0^"Lock Disabled" 50107^1^"Lock Enabled" 50108^0^"PIN Uninitialized" 50108^1^"PIN Enabled, Unverified" 50108^2^"PIN Enabled, Verified" 50108^3^"PIN Disabled" 50108^4^"PIN Blocked" 50108^5^"PIN Blocked Permanently" 50108^6^"PIN Unblocked" 50108^7^"PIN Changed" 50109^0^"PN - Network Personalization" 50109^1^"PU - Network Subset Personalization" 50109^2^"PP - Service Provider Personalization" 50109^3^"PC - Corporate Personalization" 50109^4^"PF - UIM Personalization" 50110^0^"Deactivated" 50110^1^"Activated" 50110^2^"Block" 50111^0^"Initialization Completed" 50111^1^"Initialization Failed" 50111^2^"Not Present" 50111^255^"State Unavailable" 50112^0^"Modem" 50112^1^"PRI" 50113^0^"User" 50200^0^"None (No Service)" 50200^1^"CDMA2000 1x" 50200^2^"CDMA2000 HRPD" 50200^3^"AMPS" 50200^4^"GSM" 50200^5^"UMTS" 50200^8^"LTE" 50201^0^"Unknown" 50201^1^"Current Serving" 50201^2^"Available" 50202^0^"Unknown" 50202^1^"Home" 50202^2^"Roam" 50203^0^"Unknown" 50203^1^"Forbidden" 50203^2^"Not Forbidden" 50204^0^"Unknown" 50204^1^"Preferred" 50204^2^"Not Preferred" 50205^1^"Automatic" 50205^2^"Manual" 50206^4^"GSM" 50206^5^"UMTS" 50206^8^"LTE" 50207^1^"Attach" 50207^2^"Detach" 50208^0^"NAS Not Registered" 50208^1^"NAS Registered" 50208^2^"NAS Not Registered (Searching)" 50208^3^"NAS Registration Denied" 50208^4^"Registration State Unknown" 50209^0^"Unknown/Not Applicable" 50209^1^"Attached" 50209^2^"Detached" 50210^0^"Unknown" 50210^1^"3GPP2" 50210^2^"3GPP" 50211^0^"Roaming" 50211^1^"Home" 50211^2^"Roaming (Partner)" 50212^0^"Permanent" 50212^1^"Power Cycle" 50213^0^"Automatic" 50213^1^"3GPP2" 50213^2^"3GPP" 50213^3^"Invalid" 50214^1^"GPRS" 50214^2^"EGPRS" 50214^3^"HSDPA" 50214^4^"HSUPA" 50214^5^"WCDMA" 50214^6^"CDMA" 50214^7^"CDMA 1xEV-DO Rev. 0" 50214^8^"CDMA 1xEV-DO Rev. A" 50214^9^"GSM" 50214^10^"CDMA 1xEV-DO Rev. B" 50214^11^"LTE" 50214^12^"HSDPA+" 50214^13^"DC-HSDPA+" 50215^0^"Automatic" 50215^1^"Automatic A" 50215^2^"Automatic B" 50216^0^"Automatic" 50216^1^"Home Only" 50216^2^"Roaming Only" 50216^3^"Home/Roaming" 50217^0^"CDMA Band Class 0" 50217^1^"CDMA Band Class 1" 50217^3^"CDMA Band Class 3" 50217^4^"CDMA Band Class 4" 50217^5^"CDMA Band Class 5" 50217^6^"CDMA Band Class 6" 50217^7^"CDMA Band Class 7" 50217^8^"CDMA Band Class 8" 50217^9^"CDMA Band Class 9" 50217^10^"CDMA Band Class 10" 50217^11^"CDMA Band Class 11" 50217^12^"CDMA Band Class 12" 50217^13^"CDMA Band Class 13" 50217^14^"CDMA Band Class 14" 50217^15^"CDMA Band Class 15" 50217^16^"CDMA Band Class 16" 50217^40^"GSM 450" 50217^41^"GSM 480" 50217^42^"GSM 750" 50217^43^"GSM 850" 50217^44^"GSM 900 (Extended)" 50217^45^"GSM 900 (Primary)" 50217^46^"GSM 900 (Railways)" 50217^47^"GSM 1800" 50217^48^"GSM 1900" 50217^80^"WCDMA 2100" 50217^81^"WCDMA PCS 1900" 50217^82^"WCDMA DCS 1800" 50217^83^"WCDMA 1700 (US)" 50217^84^"WCDMA 850" 50217^85^"WCDMA 800" 50217^86^"WCDMA 2600" 50217^87^"WCDMA 900" 50217^88^"WCDMA 1700 (Japan)" 50217^120^"E-UTRA Band 1" 50217^121^"E-UTRA Band 2" 50217^122^"E-UTRA Band 3" 50217^123^"E-UTRA Band 4" 50217^124^"E-UTRA Band 5" 50217^125^"E-UTRA Band 6" 50217^126^"E-UTRA Band 7" 50217^127^"E-UTRA Band 8" 50217^128^"E-UTRA Band 9" 50217^129^"E-UTRA Band 10" 50217^130^"E-UTRA Band 11" 50217^131^"E-UTRA Band 12" 50217^132^"E-UTRA Band 13" 50217^133^"E-UTRA Band 14" 50217^134^"E-UTRA Band 17" 50217^135^"E-UTRA Band 33" 50217^136^"E-UTRA Band 34" 50217^137^"E-UTRA Band 35" 50217^138^"E-UTRA Band 36" 50217^139^"E-UTRA Band 37" 50217^140^"E-UTRA Band 38" 50217^141^"E-UTRA Band 39" 50217^142^"E-UTRA Band 40" 50218^1^"Circuit Switched" 50219^0^"Authentication Failed" 50219^1^"Authentication Success" 50219^2^"No Authentication Requested" 50220^0^"-9 dB" 50220^1^"-6 dB" 50220^2^"-4.5 dB" 50220^3^"-3 dB" 50220^4^"-2 dB" 50220^5^"1 dB" 50220^6^"3 dB" 50220^7^"6 dB" 50220^8^"9 dB" 50221^1^"Acquire A Side Only" 50221^2^"Acquire B Side Only" 50221^16383^"Acquire Any" 50222^1^"Acquire When Roaming Indicator Off" 50222^2^"Acquire When Roaming Indicator Not Off" 50222^3^"Acquire When Roaming Indicator Not Flashing" 50222^255^"Acquire Any" 50223^0^"Off" 50223^1^"On" 50223^2^"No Change" 50224^0^"Add" 50224^1^"Replace" 50224^2^"Delete" 50224^3^"No Change" 50225^0^"Do Not Display" 50225^1^"Display" 50225^255^"Unknown" 50226^0^"Unspecified Octet" 50226^1^"Extended Protocol Message" 50226^2^"7-Bit ASCII" 50226^3^"IA5" 50226^4^"UNICODE" 50226^5^"Shift-JIS" 50226^6^"Korean" 50226^7^"Latin/Hebrew" 50226^8^"Latin" 50226^9^"GSM 7-Bit" 50226^10^"GSM DCS" 50227^0^"ASCII" 50227^1^"UCS2-LE" 50228^0^"Do Not Add Country Initials" 50228^1^"Add Country Initials" 50228^255^"Unspecified" 50229^0^"Unknown" 50229^1^"Bit 8" 50229^2^"Bits 7/8" 50229^3^"Bits 6 - 8" 50229^4^"Bits 5 - 8" 50229^5^"Bits 4 - 8" 50229^6^"Bits 3 - 8" 50229^7^"Bits 2 - 8" 50230^0^"Power Cycle" 50230^1^"Permanent" 50300^0^"UIM" 50300^1^"NV" 50300^2^"Unknown" 50301^0^"CDMA" 50301^1^"Analog CLI (Unsupported)" 50301^2^"Analog Voice Mail (Unsupported)" 50301^3^"Analog WMS (Unsupported)" 50301^4^"Analog AWI/WMS (Unsupported)" 50301^5^"MWI (Unsupported)" 50301^6^"GSM/WCDMA PP" 50301^7^"GSM/WCDMA BC" 50301^8^"MWI" 50302^0^"MT Read" 50302^1^"MT Not Read" 50302^2^"MO Send" 50302^3^"MO Not Sent" 50303^0^"CDMA" 50303^1^"GSM/WCDMA (Unsupported)" 50304^0^"Point-To-Point" 50304^1^"Broadcast" 50305^0^"Class 0" 50305^1^"Class 1" 50305^2^"Class 2" 50305^3^"Class 3" 50305^4^"Class None" 50305^5^"Class CDMA" 50306^0^"Discard" 50306^1^"Store And Notify" 50307^0^"Discard" 50307^1^"Store And Notify" 50307^2^"Unknown" 50308^0^"Automatic" 50308^6^"SO 6" 50308^14^"SO 14" 50309^0^"Temporary" 50309^1^"Permanent" 50310^2^"Temporary" 50310^3^"Permanent" 50311^0^"CS Preferred" 50311^1^"PS Preferred" 50311^2^"CS Only" 50311^3^"PS Only" 50400^0^"Unknown" 50400^1^"Inactive" 50400^2^"Active" 50401^0^"Manual" 50402^0^"New" 50403^0^"Standalone" 50403^1^"MS Based" 50403^2^"MS Assisted" 50404^0^"Default" 50405^0^"None (Disabled)" 50405^1^"USB" 50405^2^"UART1" 50405^3^"UART2" 50405^4^"Shared Memory" 50406^0^"1 Hz From Time Requested Until Final Position Determination" 50406^1^"Final Position Determination Only" 50407^0^"WWAN" 50408^0^"Any Available" 50408^1^"Home Only" 50408^2^"Roam Only" 50409^0^"Standalone" 50409^1^"MS Based" 50409^2^"MS Assisted" 50409^255^"Unknown" 50410^0^"Success" 50410^1^"In Progress" 50410^2^"General Failure" 50410^3^"Timeout" 50410^4^"User Ended" 50410^5^"Bad Parameter" 50410^6^"Phone Offline" 50410^7^"Engine Locked" 50410^8^"E911 Session In Progress" 50411^0^"January" 50411^1^"February" 50411^2^"March" 50411^3^"April" 50411^4^"May" 50411^5^"June" 50411^6^"July" 50411^7^"August" 50411^8^"September" 50411^9^"October" 50411^10^"November" 50411^11^"December" 50412^0^"Sunday" 50412^1^"Monday" 50412^2^"Tuesday" 50412^3^"Wednesday" 50412^4^"Thursday" 50412^5^"Friday" 50412^6^"Saturday" 50413^0^"Start Periodic Fixes - High Frequency" 50413^1^"Start Periodic Fixes - Keep Warm" 50413^2^"Stop Periodic Fixes" 50413^4^"Suspend" 50414^1^"GPS" 50414^2^"Galileo" 50414^3^"SBAS" 50414^4^"Compass" 50414^5^"Glonass" 50415^0^"Unhealthy" 50415^1^"Healthy" 50416^1^"Idle" 50416^2^"Search" 50416^3^"Search Verify" 50416^4^"Bit Edge" 50416^5^"Track" 50417^0^"Unavailable" 50417^1^"Available" 50418^0^"Unavailable" 50418^1^"Available" 50419^0^"No Notify/Verify" 50419^1^"Notify" 50419^2^"Notify/Verify - Allow No Response" 50419^3^"Notify/Verify - Require Response" 50419^4^"Privacy Override" 50420^0^"MS Assisted" 50420^1^"MS Based" 50420^2^"MS Assisted Preferred" 50420^3^"MS Based Preferred" 50421^0^"Octet" 50421^1^"EXN Protocol Message" 50421^2^"ASCII" 50421^3^"IA5" 50421^4^"Unicode" 50421^5^"Shift JIS" 50421^6^"Korean" 50421^7^"Latin Hebrew" 50421^8^"Latin" 50421^9^"GSM" 50422^0^"MS Assisted" 50422^1^"MS Based" 50422^2^"MS Assisted Preferred" 50422^3^"MS Based Preferred" 50422^4^"Standalone" 50422^5^"AFLT" 50422^6^"ECID" 50422^7^"EOTD" 50422^8^"OTDOA" 50422^9^"No Position" 50423^0^"UTF8" 50423^1^"UCS2" 50423^2^"GSM" 50423^255^"Unknown" 50424^0^"Logical Name" 50424^1^"Email Address" 50424^2^"MSISDN" 50424^3^"URL" 50424^4^"SIP URL" 50424^5^"MIN" 50424^6^"MDN" 50424^255^"Unknown" 50425^0^"German" 50425^1^"English" 50425^2^"Italian" 50425^3^"French" 50425^4^"Spanish" 50425^5^"Dutch" 50425^6^"Swedish" 50425^7^"Danish" 50425^8^"Portuguese" 50425^9^"Finnish" 50425^10^"Norwegian" 50425^11^"Greek" 50425^12^"Turkish" 50425^13^"Hungarian" 50425^14^"Polish" 50425^255^"Unknown" 50426^0^"Current" 50426^1^"Current Or Last Known" 50426^2^"Initial" 50427^0^"Begin" 50427^1^"Connected" 50427^2^"Failure" 50427^3^"Done" 50427^4^"Other Failure" 50428^0^"UMTS User Plane SUPL" 50428^1^"1X" 50428^2^"UMTS Control Plane WCDMA" 50428^3^"UMTS Control Plane GSM" 50428^4^"V1/V2" 50428^5^"KDDI" 50428^6^"XTRA Data Download" 50428^7^"SNTP Time Download" 50429^0^"Unknown" 50429^1^"GPS" 50429^2^"Cell ID" 50429^3^"Enhanced Cell ID" 50429^4^"Wi-Fi" 50429^5^"Terrestial" 50429^6^"Terrestial Hybrid" 50429^7^"Other" 50430^0^"Disabled" 50430^1^"Enabled" 50430^255^"Unknown" 50431^0^"GPS" 50431^1^"UTC" 50432^0^"Write" 50433^0^"Disables" 50433^1^"Enabled - Low Power Mode" 50433^2^"Enabled - Ready Mode" 50434^0^"Disabled" 50434^1^"Enabled" 50434^255^"Not Supported" 50435^0^"UMTS" 50435^1^"CDMA" 50600^1^"Send SMS Proactive Command"^-1 50601^1^"Refresh Start"^-1 50601^2^"Refresh Success"^-1 50601^3^"Refresh Failed"^-1 50602^1^"End Proactive Session Command Received from the card"^-1 50602^2^"End Proactive Session Internal to ME"^-1 50603^1^"Menu Selection"^-1 50603^2^"Event Download User Activity"^-1 50603^3^"Event Download Idle Screen Available"^-1 50603^4^"Event Download Language Selection"^-1 50700^0^"Success"^-1 50700^1^"Failure"^-1 50800^0^"Client Initiated Device Configure"^-1 50800^1^"Client Initiated PRL Update"^-1 50800^2^"Client Initiated Hands Free Activation"^-1 50800^3^"Device Initiated Hands Free Activation"^-1 50800^4^"Network Initiated PRL Update"^-1 50800^5^"Network Initiated Device Configure"^-1 50801^0^"Complete, Info Updated"^-1 50801^1^"Complete, Info Unavailable"^-1 50801^2^"Failed"^-1 50801^3^"Retrying"^-1 50801^4^"Connecting"^-1 50801^5^"Connected"^-1 50801^6^"Authenticated"^-1 50801^7^"MDN Downloaded"^-1 50801^8^"MSID Downloaded"^-1 50801^9^"PRL Downloaded"^-1 50801^10^"MIP Profile Downloaded"^-1 50802^0^"Unknown"^-1 50802^1^"Network Unavailable"^-1 50802^2^"Server Unavailable"^-1 50802^3^"Authentication Failed"^-1 50802^4^"Max Retry Exceeded"^-1 50802^5^"Session Cancelled"^-1 50803^0^"Reject"^-1 50803^1^"Accept"^-1 50804^0^"None"^-1 50804^1^"Succeeded"^-1 50804^2^"Failed"^-1 50900^0^"Control"^-1 50900^1^"WDS"^-1 50900^2^"DMS"^-1 50900^3^"NAS"^-1 50900^4^"QOS"^-1 50900^5^"WMS"^-1 50900^6^"PDS"^-1 50900^7^"AUTH"^-1 50900^224^"CAT"^-1 50900^225^"RMS"^-1 50900^226^"OMA"^-1 50901^0^"QoS Flow Header Absent"^-1 50901^1^"QoS Flow Header Present"^-1 50902^0^"Normal"^-1 50902^1^"Suspend"^-1 50902^2^"Powerdown"^-1 70000^1^"ASCII"^-1 70000^2^"8-Bit"^-1 70000^3^"UCS2"^-1 70001^1^"GSM"^-1 70001^2^"UCS2"^-1 70002^1^"No Action Required"^-1 70002^2^"Action Is Required"^-1libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/Field.txt000077500000000000000000001011361455567757300233070ustar00rootroot0000000000000050000^"QMI Result"^16^1^50000^0 50001^"QMI Error"^16^1^50001^0 50002^"Transaction ID"^16^0^4^0 50100^"Report Channel Rate"^8^0^0^0 50101^"Transfer Statistics Interval (Seconds)"^8^0^2^0 50102^"Report TX Packet Successes"^1^0^0^0 50103^"Report RX Packet Successes"^1^0^0^0 50104^"Report TX Packet Errors"^1^0^0^0 50105^"Report RX Packet Errors"^1^0^0^0 50106^"Report TX Overflows"^1^0^0^0 50107^"Report RX Overflows"^1^0^0^0 50108^"Report Data Bearer Technology"^8^0^0^0 50109^"TX Packet Successes"^32^0^6^0 50110^"RX Packet Successes"^32^0^6^0 50111^"TX Packet Errors"^32^0^6^0 50112^"RX Packet Errors"^32^0^6^0 50113^"TX Overflows"^32^0^6^0 50114^"RX Overflows"^32^0^6^0 50115^"Channel TX Rate (bps)"^32^0^6^0 50116^"Channel RX Rate (bps)"^32^0^6^0 50117^"Data Bearer Technology"^8^1^50002^0 50118^"IP V4 Address"^8^0^2^0 50119^"APN Name"^0^0^11^0 50120^"Enable PAP"^1^0^0^0 50121^"Enable CHAP"^1^0^0^0 50122^"Username"^0^0^11^0 50123^"Password"^0^0^11^0 50124^"Enable 3GPP"^1^0^0^0 50125^"Enable 3GPP2"^1^0^0^0 50126^"Profile Index"^8^0^2^0 50127^"Packet Data Handle"^32^0^6^1 50128^"Connection Status"^8^1^50003^0 50129^"Reconfigure Required"^8^0^0^0 50130^"Max Channel TX Rate (bps)"^32^0^6^0 50131^"Max Channel RX Rate (bps)"^32^0^6^0 50132^"Profile Type"^8^1^50004^0 50133^"Profile Name"^0^0^11^0 50134^"PDP Type"^8^1^50005^0 50135^"Traffic Class"^8^1^50006^0 50136^"Max Uplink Bitrate"^32^0^6^0 50137^"Max Downlink Bitrate"^32^0^6^0 50138^"Guaranteed Uplink Bitrate"^32^0^6^0 50139^"Guaranteed Downlink Bitrate"^32^0^6^0 50140^"QoS Delivery Order"^8^1^50007^0 50141^"Max SDU Size"^32^0^6^0 50142^"SDU Error Ratio"^8^1^50008^0 50143^"SDU Residual Bit Error Ratio"^8^1^50009^0 50144^"Erroneous SDU Delivery"^8^1^50010^0 50145^"Transfer Delay"^32^0^6^0 50146^"Traffic Handling Priority"^32^0^6^0 50147^"Precedence Class"^32^0^6^0 50148^"Delay Class"^32^0^6^0 50149^"Reliability Class"^32^0^6^0 50150^"Peak Throughput Class"^32^0^6^0 50151^"Mean Throughput Class"^32^0^6^0 50152^"Number Of Profiles"^8^0^2^0 50153^"Profile Name Length"^8^0^2^0 50154^"Profile Name"^8^0^9^0 50155^"Report Dormancy Status"^8^0^0^0 50156^"Dormancy Status"^8^1^50011^0 50157^"Call End"^16^1^50012^0 50158^"MIP Mode"^8^1^50013^0 50159^"Autoconnect Setting"^8^1^50026^0 50160^"Autoconnect Off"^8^0^0^0 50161^"Data Session Duration"^64^0^8^0 50162^"Connection Status"^1^0^0^0 50163^"Last Call End Reason"^1^0^0^0 50164^"RX/TX Byte Totals"^1^0^0^0 50165^"Dormancy Status"^1^0^0^0 50166^"Data Bearer Technology"^1^0^0^0 50167^"Channel Rates"^1^0^0^0 50168^"Report Connection Status"^8^0^0^0 50169^"TX Byte Total"^1^0^0^0 50170^"RX Byte Total"^1^0^0^0 50171^"TX Byte Total"^64^0^8^0 50172^"RX Byte Total"^64^0^8^0 50173^"SPC"^48^0^9^0 50174^"Enabled"^8^0^0^0 50175^"Reverse Tunneling"^8^0^0^0 50176^"NAI"^0^0^11^0 50177^"HA SPI"^32^0^6^0 50178^"AAA SPI"^32^0^6^0 50179^"MN-HA Key"^0^0^11^0 50180^"MN-AAA Key"^0^0^11^0 50181^"Retry Attempt Limit"^8^0^2^0 50182^"Retry Attempt Interval"^8^0^2^0 50183^"Re-Registration Period"^8^0^2^0 50184^"Re-Registration Only With Traffic"^8^0^0^0 50185^"MN-HA Authenticator Calculator"^8^0^0^0 50186^"MN-HA RFC 2002 BIS Authentication"^8^0^0^0 50187^"Last MIP Status"^8^0^2^0 50188^"AN-AAA Authenticated"^8^0^0^0 50189^"Call List Type"^8^1^50014^0 50190^"Call Records"^16^0^4^0 50191^"ID"^16^0^4^0 50192^"Type"^8^1^50015^0 50193^"Data Bearer"^8^1^50002^0 50194^"Timestamp"^64^0^8^1 50196^"Total Duration"^64^0^8^0 50197^"Active Duration"^64^0^8^0 50198^"RX Byte Total"^64^0^8^0 50199^"TX Byte Total"^64^0^8^0 50201^"Phone Number Length"^8^0^2^0 50202^"Phone Number"^8^0^9^0 50203^"Call List Max Size"^16^0^4^0 50204^"Previous Call TX Byte Total"^64^0^8^0 50205^"Previous Call RX Byte Total"^64^0^8^0 50206^"Previous Data Session Duration"^64^0^8^0 50207^"Data Session Active Duration"^64^0^8^0 50208^"Previous Data Session Active Duration"^64^0^8^0 50209^"Duration"^1^0^0^0 50210^"Profile ID"^1^0^0^0 50211^"Profile Name"^1^0^0^0 50212^"PDP Type"^1^0^0^0 50213^"APN Name"^1^0^0^0 50214^"DNS Address"^1^0^0^0 50215^"Granted QoS"^1^0^0^0 50216^"Username"^1^0^0^0 50217^"Authentication Protocol"^1^0^0^0 50218^"IP Address"^1^0^0^0 50219^"Gateway Info"^1^0^0^0 50220^"IPv4 Subnet Mask"^32^0^6^1 50221^"Key State"^8^1^50016^0 50222^"Report MIP Status"^8^0^0^0 50223^"MIP Status"^8^0^2^0 50230^"Network Type"^8^1^50017^0 50231^"CDMA 1x"^1^0^0^0 50232^"CDMA 1x Ev-DO Rev. 0"^1^0^0^0 50233^"CDMA 1x Ev-DO Rev. A"^1^0^0^0 50234^"WCDMA"^1^0^0^0 50235^"GPRS"^1^0^0^0 50236^"HSDPA"^1^0^0^0 50237^"HSUPA"^1^0^0^0 50238^"EDGE"^1^0^0^0 50239^"CDMA 1x IS95"^1^0^0^0 50240^"CDMA 1x IS2000"^1^0^0^0 50241^"CDMA 1x IS2000 Rel. A"^1^0^0^0 50242^"CDMA 1x Ev-DO Rev. A DPA"^1^0^0^0 50243^"CDMA 1x Ev-DO Rev. A MFPA"^1^0^0^0 50244^"CDMA 1x Ev-DO Rev. A EMPA"^1^0^0^0 50245^"Extended Technology Preference"^16^1^50018^0 50246^"Call Type"^8^1^50019^0 50247^"IP Family"^8^1^50020^0 50248^"Call End Reason Type"^16^1^50025^0 50249^"Call End Reason Value"^16^0^4^0 50250^"Call End Reason"^16^1^50021^0 50251^"Call End Reason"^16^1^50022^0 50252^"Call End Reason"^16^1^50023^0 50253^"Call End Reason"^16^1^50024^0 50254^"P-CSCF Address Using PCO"^8^0^0^0 50255^"P-CSCF Address"^1^0^0^0 50256^"P-CSCF Server Address List"^1^0^0^0 50257^"P-CSCF Domain Name List"^1^0^0^0 50258^"MTU"^1^0^0^0 50259^"Domain Name List"^1^0^0^0 50260^"IP Family"^1^0^0^0 50261^"IM CN Flag"^1^0^0^0 50262^"Extended Technology"^1^0^0^0 50263^"Number Of Instances"^8^0^2^0 50264^"FQDN Length"^16^0^4^0 50265^"FQDN"^8^0^9^0 50266^"MTU"^32^0^6^0 50267^"Domain Name Length"^16^0^4^0 50268^"Domain Name"^8^0^9^0 50269^"IM CN"^8^0^0^0 50270^"Autoconnect Roam Setting"^8^1^50027^0 50271^"DNS Address"^8^0^2^0 50272^"IP Prefix Length"^8^0^2^0 50273^"LTE"^1^0^0^0 50274^"CDMA 1x Ev-DO Rev. A EMPA EHRPD"^1^0^0^0 50275^"IPv6 Address"^16^0^4^1 50276^"PDP Access Control Flag"^8^1^50028^0 50277^"P-CSCF Address Using DHCP"^8^0^0^0 50278^"Filter ID"^8^0^2^0 50279^"Evaluation ID"^8^0^2^0 50280^"IP Version"^8^1^50029^0 50281^"IP Source"^8^0^2^0 50282^"Source IP Mask"^8^0^2^0 50283^"Next Header"^8^0^2^0 50284^"Destination Port Range Start"^16^0^4^0 50285^"Destination Port Range End"^16^0^4^0 50286^"Source Port Range Start"^16^0^4^0 50287^"Source Port Range End"^16^0^4^0 50288^"IPSEC Security Parameter Index"^32^0^6^0 50289^"TOS Mask"^16^0^4^0 50290^"Flow Label"^32^0^6^0 50291^"PDP Context Number"^8^0^2^0 50292^"PDP Context Secondary Flag"^8^0^0^0 50293^"PDP Primary ID"^8^0^2^0 50294^"Signaling Indication"^8^0^0^0 50295^"Address Allocation Preference"^8^1^50030^0 50296^"QoS Class Identifier"^8^1^50031^0 50297^"Negotiate DNS Server Preference"^8^0^0^0 50298^"PPP Session Close Timer DO"^32^0^6^0 50299^"PPP Session Close Timer 1X"^32^0^6^0 50300^"Allow Linger"^8^0^0^0 50301^"Timeout"^16^0^4^0 50302^"Retry Count"^8^0^2^0 50303^"Authentication Protocol"^8^1^50032^0 50304^"Data Rate"^8^1^50033^0 50305^"Application Type"^32^1^50034^0 50306^"Data Mode"^8^1^50035^0 50307^"Application Priority"^8^0^2^0 50308^"PDN Type"^8^1^50036^0 50309^"P-CSCF Address Needed"^8^0^0^0 50310^"Extended Error Code"^16^1^50037^0 50311^"Number Of Addresses"^8^0^2^0 51000^"Report Power State"^8^0^0^0 51001^"Battery Level Lower Limit (%)"^8^0^2^0 51002^"Battery Level Upper Limit (%)"^8^0^2^0 51003^"Power Source"^1^1^50100^0 51004^"Battery Connected"^1^0^0^0 51005^"Battery Charging"^1^0^0^0 51006^"Power Fault"^1^0^0^0 51007^"Battery Level (%)"^8^0^2^0 51008^"Max TX Rate (bps)"^32^0^6^0 51009^"Max RX Rate (bps)"^32^0^6^0 51010^"Data Service Capability"^8^1^50101^0 51011^"SIM Supported"^8^0^0^0 51012^"Radio Interface Count"^8^0^2^0 51013^"Radio Interface"^8^1^50102^0 51014^"Device Manfacturer"^0^0^11^0 51015^"Device Model ID"^0^0^11^0 51016^"Device Revision ID"^0^0^11^0 51017^"Device Voice Number"^0^0^11^0 51018^"ESN"^0^0^11^0 51019^"IMEI"^0^0^11^0 51020^"MEID"^0^0^11^0 51021^"Report Activation State"^8^0^0^0 51022^"Activation State"^16^1^50103^0 51023^"Device Mobile ID Number"^0^0^11^0 51024^"Device Hardware Revision"^0^0^11^0 51025^"Operating Mode"^8^1^50104^0 51026^"Timestamp"^48^0^8^1 51027^"Source"^16^1^50105^0 51028^"PRL Version"^16^0^4^0 51030^"SPC"^48^0^9^0 51031^"SID"^16^0^4^0 51032^"MDN Length"^8^0^2^0 51033^"MDN"^8^0^9^0 51034^"MIN Length"^8^0^2^0 51035^"MIN"^8^0^9^0 51036^"PRL Length"^16^0^4^0 51037^"PRL"^8^0^2^1 51038^"MN-HA Length"^8^0^2^0 51039^"MN-HA"^8^0^9^0 51040^"MN-AAA Length"^8^0^2^0 51041^"MN-AAA"^8^0^9^0 51042^"Lock State"^8^1^50107^0 51043^"Lock Code"^32^0^9^0 51044^"Current Lock Code"^32^0^9^0 51045^"New Lock Code"^32^0^9^0 51046^"Data Length"^16^0^4^0 51047^"Data"^8^0^2^1 51048^"Code Length"^8^0^2^0 51049^"Code"^8^0^9^0 51050^"PIN ID"^8^0^2^0 51051^"PIN Enabled"^8^0^2^0 51052^"PIN Length"^8^0^2^0 51053^"PIN Value"^8^0^9^0 51054^"Remaining Verify Retries"^8^0^2^0 51055^"Remaining Unblock Retries"^8^0^2^0 51056^"PUK Length"^8^0^2^0 51057^"PUK Value"^8^0^9^0 51058^"Old PIN Length"^8^0^2^0 51059^"Old PIN Value"^8^0^9^0 51060^"New PIN Length"^8^0^2^0 51061^"New PIN Value"^8^0^9^0 51062^"PIN Status"^8^1^50108^0 51063^"Report PIN Status"^8^0^0^0 51064^"PRL Total Length"^16^0^4^0 51065^"PRL Segment Length"^16^0^4^0 51066^"PRL Segment ID"^8^0^2^0 51067^"Boot Code Revision ID"^0^0^11^0 51068^"UQCN Revision ID"^0^0^11^0 51069^"IMSI"^0^0^11^0 51070^"Host Image Mismatch"^1^0^2^0 51071^"UQCN Image Mismatch"^1^0^2^0 51072^"Incompatible UQCN"^1^0^2^0 51073^"ICCID"^0^0^11^0 51074^"Firmware ID"^32^0^6^0 51075^"Host Lock Code"^32^0^6^0 51076^"Platform Restricted"^8^0^0^0 51077^"Report Operating Mode"^8^0^0^0 51078^"Facility"^8^1^50109^0 51079^"Facility State"^8^1^50110^0 51080^"Control Key Length"^8^0^2^0 51081^"Control Key"^8^0^9^0 51082^"UQCN Copy Issue"^1^0^2^0 51083^"Report UIM State"^8^0^0^0 51084^"UIM State"^8^1^50111^0 51085^"Operation Blocking"^8^0^0^0 51090^"Number Of Images"^8^0^2^0 51091^"Image Type"^8^1^50112^0 51092^"Image ID"^8^0^2^1 51093^"Build ID Length"^8^0^2^0 51094^"Build ID"^8^0^9^0 51095^"Force Download"^8^0^0^0 51096^"Storage Index"^8^0^2^0 51097^"Maximum Build ID Length"^8^0^2^0 51098^"Number Of Image Types"^8^0^2^0 51099^"Maximum Number Of Images"^8^0^2^0 51100^"Index Of Executing Image"^8^0^2^0 51101^"Failure Count"^8^0^2^0 51110^"Band Class 0 - A System"^1^0^0^0 51111^"Band Class 0 - B System"^1^0^0^0 51112^"Band Class 1"^1^0^0^0 51113^"Band Class 2"^1^0^0^0 51114^"Band Class 3 - A System"^1^0^0^0 51115^"Band Class 4"^1^0^0^0 51116^"Band Class 5"^1^0^0^0 51117^"GSM DCS"^1^0^0^0 51118^"GSM Primary"^1^0^0^0 51119^"GSM Extended"^1^0^0^0 51120^"Band Class 6"^1^0^0^0 51121^"Band Class 7"^1^0^0^0 51122^"Band Class 8"^1^0^0^0 51123^"Band Class 9"^1^0^0^0 51124^"Band Class 10"^1^0^0^0 51125^"Band Class 11"^1^0^0^0 51126^"GSM 450"^1^0^0^0 51127^"GSM 480"^1^0^0^0 51128^"GSM 750"^1^0^0^0 51129^"GSM 850"^1^0^0^0 51130^"GSM Railways"^1^0^0^0 51131^"GSM PCS"^1^0^0^0 51132^"WCDMA 2100I"^1^0^0^0 51133^"WCDMA PCS 1900"^1^0^0^0 51134^"WCDMA DCS 1800"^1^0^0^0 51135^"WCDMA 1700 (US)"^1^0^0^0 51136^"WCDMA 850"^1^0^0^0 51137^"WCDMA 800"^1^0^0^0 51138^"Band Class 12"^1^0^0^0 51139^"Band Class 14"^1^0^0^0 51140^"Band Class 15"^1^0^0^0 51141^"WCDMA 2600"^1^0^0^0 51142^"WCDMA 900"^1^0^0^0 51143^"WCDMA 1700 (Japan)"^1^0^0^0 51144^"Band Class 16"^1^0^0^0 51145^"Band Class 17"^1^0^0^0 51146^"Band Class 18"^1^0^0^0 51147^"Band Class 19"^1^0^0^0 51148^"Report Wireless Disable State"^8^0^0^0 51149^"Wireless Disable On"^8^0^0^0 51150^"Factory Serial Number"^0^0^11^0 51151^"Alternate Enabled"^8^0^0^0 51152^"Time In Milliseconds"^64^0^8^0 51153^"Time Reference"^32^1^50113^0 51154^"Boot Major Version"^16^0^4^0 51155^"Boot Minor Version"^16^0^4^0 51156^"PRI Version"^32^0^6^1 51157^"PRI Info"^256^0^9^0 51158^"OEM Lock ID"^32^0^6^1 51159^"BAR Mode"^8^0^0^0 52000^"Report Signal Strength"^8^0^0^0 52001^"Number Of Thresholds"^8^0^2^0 52002^"Signal Strength Threshold (dBm)"^8^0^1^0 52003^"Signal Strength (dBm)"^8^0^1^0 52004^"Radio Interface"^8^1^50200^0 52005^"Number Of Info Instances"^16^0^4^0 52006^"Mobile Country Code"^16^0^4^0 52007^"Mobile Network Code"^16^0^4^0 52008^"In Use Status"^2^1^50201^0 52009^"Roaming Status"^2^1^50202^0 52010^"Forbidden Status"^2^1^50203^0 52011^"Preferred Status"^2^1^50204^0 52012^"Description Length"^8^0^2^0 52013^"Description"^8^0^9^0 52014^"Register Action"^8^1^50205^0 52015^"Radio Access Technology"^8^1^50206^0 52016^"PS Attach Action"^8^1^50207^0 52017^"Registration State"^8^1^50208^0 52018^"CS Attach State"^8^1^50209^0 52019^"PS Attach State"^8^1^50209^0 52020^"Registered Network"^8^1^50210^0 52021^"Number Of Radio Interfaces In Use"^8^0^2^0 52022^"Roaming Indicator"^8^1^50211^0 52023^"Number Of Preferred Networks"^16^0^4^0 52024^"GSM Compact"^1^0^0^0 52025^"GSM"^1^0^0^0 52026^"UMTS"^1^0^0^0 52027^"Number Of Forbidden Networks"^16^0^4^0 52028^"System ID"^16^0^4^0 52029^"Network ID"^16^0^4^0 52032^"Duration"^8^1^50212^0 52033^"ACCOLC"^8^0^2^0 52034^"SPC"^48^0^9^0 52035^"Technology"^2^1^50213^0 52036^"Analog"^1^0^2^0 52037^"Digital"^1^0^2^0 52038^"EV-DO"^1^0^2^0 52039^"GSM"^1^0^2^0 52040^"WCDMA"^1^0^2^0 52041^"Number Of Data Capabilities"^8^0^2^0 52042^"Data Capability"^8^1^50214^0 52043^"System Preference"^8^1^50215^0 52044^"Slot Cycle Index"^8^0^2^0 52045^"Station Class Mark"^8^0^2^0 52046^"Register On Home System"^8^0^0^0 52047^"Register On Foreign System"^8^0^0^0 52048^"Register On Foreign Network"^8^0^0^0 52049^"Force CDMA 1xEV-DO Rev. 0"^8^0^0^0 52050^"CDMA 1xEV-DO SCP Custom Config"^8^0^0^0 52051^"Subtype 2 Physical Layer"^1^0^0^0 52052^"Enhanced CC MAC"^1^0^0^0 52053^"Enhanced AC MAC"^1^0^0^0 52054^"Enhanced FTC MAC"^1^0^0^0 52055^"Subtype 3 RTC MAC"^1^0^0^0 52056^"Subtype 1 RTC MAC"^1^0^0^0 52057^"Enhanced Idle"^1^0^0^0 52058^"Generic Multimode Capable Disc Port"^1^0^0^0 52059^"Generic Broadcast"^1^0^0^0 52060^"SN Multiflow Packet Application"^1^0^0^0 52061^"SN Enhanced Multiflow Packet Application"^1^0^0^0 52062^"Roam Preference"^8^1^50216^0 52063^"Active Band Class"^16^1^50217^0 52064^"Active Channel"^16^0^4^0 52065^"Report RF Info"^8^0^0^0 52066^"Report LU Reject"^8^0^0^0 52067^"Number Of Instances"^8^0^2^0 52068^"Service Domain"^8^1^50218^0 52069^"Reject Cause"^16^0^4^0 52070^"AN-AAA Authentication Status"^8^1^50219^0 52080^"Report RSSI"^8^0^0^0 52081^"RSSI Delta"^8^0^2^0 52082^"Report ECIO"^8^0^0^0 52083^"ECIO Delta"^8^0^2^0 52084^"Report IO"^8^0^0^0 52085^"IO Delta"^8^0^2^0 52086^"Report SINR"^8^0^0^0 52087^"SINR Delta"^8^0^2^0 52088^"Report Error Rate"^8^0^0^0 52089^"RSSI"^8^0^2^0 52090^"ECIO"^8^0^2^0 52091^"IO"^32^0^6^0 52092^"SINR"^8^1^50220^0 52093^"Error Rate"^16^0^4^0 52094^"Report System Select"^8^0^0^0 52095^"Report DDTM"^8^0^0^0 52096^"Report Serving System"^8^0^0^0 52097^"Number Of Measurements"^16^0^4^0 52098^"Base Station ID"^16^0^4^0 52099^"Latitude"^32^0^5^0 52100^"Longitude"^32^0^5^0 52101^"Leap Seconds"^8^0^2^0 52102^"Local Time Offset"^8^0^1^0 52103^"Daylight Savings In Effect"^8^0^0^0 52104^"Protocol Revision"^8^0^2^0 52105^"Emergency Mode On"^8^0^0^0 52106^"CDMA 1x"^1^0^0^0 52107^"CDMA 1xEV-DO"^1^0^0^0 52108^"GSM"^1^0^0^0 52109^"UMTS"^1^0^0^0 52110^"Band Class 0 - A System"^1^0^0^0 52111^"Band Class 0 - B System"^1^0^0^0 52112^"Band Class 1"^1^0^0^0 52113^"Band Class 2"^1^0^0^0 52114^"Band Class 3 - A System"^1^0^0^0 52115^"Band Class 4"^1^0^0^0 52116^"Band Class 5"^1^0^0^0 52117^"GSM DCS"^1^0^0^0 52118^"GSM Primary"^1^0^0^0 52119^"GSM Extended"^1^0^0^0 52120^"Band Class 6"^1^0^0^0 52121^"Band Class 7"^1^0^0^0 52122^"Band Class 8"^1^0^0^0 52123^"Band Class 9"^1^0^0^0 52124^"Band Class 10"^1^0^0^0 52125^"Band Class 11"^1^0^0^0 52126^"GSM 450"^1^0^0^0 52127^"GSM 480"^1^0^0^0 52128^"GSM 750"^1^0^0^0 52129^"GSM 850"^1^0^0^0 52130^"GSM Railways"^1^0^0^0 52131^"GSM PCS"^1^0^0^0 52132^"WCDMA 2100I"^1^0^0^0 52133^"WCDMA PCS 1900"^1^0^0^0 52134^"WCDMA DCS 1800"^1^0^0^0 52135^"WCDMA 1700 (US)"^1^0^0^0 52136^"WCDMA 850"^1^0^0^0 52137^"WCDMA 800"^1^0^0^0 52138^"Band Class 12"^1^0^0^0 52139^"Band Class 14"^1^0^0^0 52140^"Band Class 15"^1^0^0^0 52141^"WCDMA 2600"^1^0^0^0 52142^"WCDMA 900"^1^0^0^0 52143^"WCDMA 1700 (Japan)"^1^0^0^0 52144^"Band Class 16"^1^0^0^0 52145^"Band Class 17"^1^0^0^0 52146^"Band Class 18"^1^0^0^0 52147^"Band Class 19"^1^0^0^0 52148^"PRL Preference"^16^1^50221^0 52149^"Roaming Preference"^16^1^50222^0 52150^"DDTM Preference"^8^1^50223^0 52151^"Suppress L2 ACK"^1^0^0^0 52152^"Suppress 1x Registrations"^1^0^0^0 52153^"Ignore Service Option Pages"^1^0^0^0 52154^"Block Mobile Originated SMS And DBM"^1^0^0^0 52155^"Service Option Action"^8^1^50224^0 52156^"Service Option"^16^0^4^0 52157^"Query RSSI"^1^0^0^0 52158^"Query ECIO"^1^0^0^0 52159^"Query IO"^1^0^0^0 52160^"Query SINR"^1^0^0^0 52161^"Query Error Rate"^1^0^0^0 52162^"Display Network Description"^8^1^50225^0 52163^"Network Description Encoding"^8^1^50226^0 52164^"Network Description Length"^8^0^2^0 52165^"Network Description"^8^0^2^1 52166^"PLMN Changed"^8^0^0^0 52167^"Restrict Manual PLMN Selection"^8^0^0^0 52168^"SPN Encoding"^8^1^50227^0 52169^"SPN Length"^8^0^2^0 52170^"SPN"^8^0^2^1 52171^"PLMN Short Encoding"^8^1^50227^0 52172^"PLMN Short Country Initials"^8^1^50228^0 52173^"PLMN Spare Bits"^8^1^50229^0 52174^"PLMN Short Length"^8^0^2^0 52175^"PLMN Short"^8^0^2^1 52176^"PLMN Long Encoding"^8^1^50227^0 52177^"PLMN Long Country Initials"^8^1^50228^0 52178^"PLMN Long Bits"^8^1^50229^0 52179^"PLMN Long Length"^8^0^2^0 52180^"PLMN Long"^8^0^2^1 52181^"RSRQ"^8^0^1^0 52182^"Change Duration"^8^1^50230^0 52183^"Report RSRQ"^8^0^0^0 52184^"RSRQ Delta"^8^0^2^0 53000^"Report New MT Messages"^8^0^0^0 53001^"Storage Type"^8^1^50300^0 53002^"Storage Index"^32^0^6^0 53003^"Message Format"^8^1^50301^0 53004^"Raw Message Length"^16^0^4^0 53005^"Raw Message"^8^0^2^1 53006^"Cause Code"^16^0^4^0 53007^"Message Tag"^8^1^50302^0 53008^"Mode"^8^1^50303^0 53009^"Number Of Messages"^32^0^6^0 53010^"Number Of Routes"^16^0^4^0 53011^"Message Type"^8^1^50304^0 53012^"Message Class"^8^1^50305^0 53013^"Receipt Action"^8^1^50306^0 53014^"Route Value"^8^1^50307^0 53015^"SMSC Address Type"^24^0^9^0 53016^"SMSC Address Length"^8^0^2^0 53017^"SMSC Address"^8^0^9^0 53018^"SMSC Address Type"^8^0^11^0 53019^"SMSC Address"^8^0^11^0 53020^"ACK Required"^8^0^0^0 53021^"Transaction ID"^32^0^6^0 53022^"Force Send On DC"^8^0^0^0 53023^"Service Option"^8^1^50308^0 53024^"Do Not Disconnect DC"^8^0^0^0 53025^"Link Timer In Seconds"^8^0^2^0 53026^"Error Class"^8^1^50309^0 53027^"GSM/WCDMA RP Cause"^16^0^4^0 53028^"GSM/WCDMA TP Cause"^8^0^2^0 53029^"Transfer Status Reports"^8^0^0^0 53030^"Max Storage Size In Messages"^32^0^6^0 53031^"Free Storage Size In Messages"^32^0^6^0 53032^"Processed Successfully"^8^0^0^0 53033^"Error Class"^8^1^50310^0 53034^"Transport Layer Status"^8^0^2^0 53035^"GSM/WCDMA RP Cause"^8^0^2^0 53036^"Retry Period In Seconds"^32^0^6^0 53037^"Retry Interval In Seconds"^32^0^6^0 53038^"DC Disconnect Timer In Seconds"^32^0^6^0 53039^"Memory Is Available"^8^0^0^0 53040^"Activate Broadcast"^8^0^0^0 53041^"Number Of Instances"^16^0^4^0 53042^"Message ID Start"^16^0^4^0 53043^"Message ID End"^16^0^4^0 53044^"Selected"^8^0^0^0 53045^"Service Category"^16^0^4^0 53046^"Language"^16^0^4^0 53047^"Activated"^8^0^0^0 53048^"Domain Preference"^8^1^50311^0 53049^"Message ID"^16^0^4^0 54000^"Report NMEA Sentences"^8^0^0^0 54001^"NMEA Sentence"^0^0^11^0 54002^"Service Enabled"^8^0^0^0 54003^"Tracking Session State"^8^1^50400^0 54004^"Session Control"^8^1^50401^0 54005^"Session Type"^8^1^50402^0 54006^"Session Operation"^8^1^50403^0 54007^"Server Option"^8^1^50404^0 54008^"Timeout In Seconds"^8^0^2^0 54009^"Session Fix Requests"^32^0^6^0 54010^"Fix Request Interval In Seconds"^32^0^6^0 54011^"Desired Accuracy In Meters"^32^0^6^0 54012^"GGA NMEA Sentences"^1^0^0^0 54013^"RMC NMEA Sentences"^1^0^0^0 54014^"GSV NMEA Sentences"^1^0^0^0 54015^"GSA NMEA Sentences"^1^0^0^0 54016^"VTG NMEA Sentences"^1^0^0^0 54017^"Output Device"^8^1^50405^0 54018^"NMEA Reporting"^8^1^50406^0 54019^"System Time"^64^0^8^0 54020^"System Discontinuties"^16^0^4^0 54021^"Automatic Download Enabled"^8^0^0^0 54022^"Download Interval In Hours"^16^0^4^0 54023^"Medium Preferences"^8^0^2^0 54024^"Medium Preference"^8^1^50407^0 54025^"WWAN Network Preference"^8^1^50408^0 54026^"Valid Period - GPS Start Week"^16^0^4^0 54027^"Valid Period - GPS Start Week Offset In Minutes"^16^0^4^0 54028^"Valid Period - Duration In Hours"^16^0^4^0 54029^"Server Address"^8^0^2^0 54030^"Server Port"^32^0^6^0 54031^"Auto-Tracking Enabled"^8^0^0^0 54032^"Reset EPH"^1^0^0^0 54033^"Reset ALM"^1^0^0^0 54034^"Reset POS"^1^0^0^0 54035^"Reset TIME"^1^0^0^0 54036^"Reset IONO"^1^0^0^0 54037^"Reset UTC"^1^0^0^0 54038^"Reset HEALTH"^1^0^0^0 54039^"Reset SVDIR"^1^0^0^0 54040^"Reset SVSTEER"^1^0^0^0 54041^"Reset SADATA"^1^0^0^0 54042^"Reset RTI"^1^0^0^0 54043^"Reset ALM CORR"^1^0^0^0 54044^"Reset FREQ BIAS EST"^1^0^0^0 54045^"Reset POS"^1^0^0^0 54046^"Reset LATEST GPS POS"^1^0^0^0 54047^"Reset OTA POS"^1^0^0^0 54048^"Reset EXT REF POS"^1^0^0^0 54049^"Reset TIMETAG"^1^0^0^0 54050^"Reset CELLID"^1^0^0^0 54051^"Reset CACHED CELLID"^1^0^0^0 54052^"Reset LAST SRV CELL"^1^0^0^0 54053^"Reset CUR SRV CELL"^1^0^0^0 54054^"Reset NEIGHBOR INFO"^1^0^0^0 54055^"Report NMEA Sentences Plus Mode"^8^0^0^0 54056^"NMEA Sentence Operating Mode"^8^1^50409^0 54057^"NMEA Sentence Length"^16^0^4^0 54058^"NMEA Sentence"^8^0^9^0 54100^"Report Raw Position Data"^8^0^0^0 54101^"Report External XTRA Data Requests"^8^0^0^0 54102^"Report External Time Injections"^8^0^0^0 54103^"Report External Wi-Fi Requests"^8^0^0^0 54104^"Report Satellite Info"^8^0^0^0 54105^"Report VX Network Initiated Prompts"^8^0^0^0 54106^"Report SUPL Network Initiated Prompts"^8^0^0^0 54107^"Report UMTS CP Network Initiated Prompts"^8^0^0^0 54108^"Report PDS Comm Events"^8^0^0^0 54109^"Session Status"^8^1^50410^0 54110^"Timestamp Calendar Valid"^1^0^0^0 54111^"Timestamp UTC Valid"^1^0^0^0 54112^"Leap Seconds Valid"^1^0^0^0 54113^"Time Uncertainty Valid"^1^0^0^0 54114^"Latitude Valid"^1^0^0^0 54115^"Longitude Valid"^1^0^0^0 54116^"Ellipsoid Altitude Valid"^1^0^0^0 54117^"Mean Sea Level Altitude Valid"^1^0^0^0 54118^"Horizontal Speed Valid"^1^0^0^0 54119^"Vertical Speed Valid"^1^0^0^0 54120^"Heading Valid"^1^0^0^0 54121^"Horizontal Uncertainty Circular Valid"^1^0^0^0 54122^"Horizontal Uncertainty Ellipse Semi-Major Valid"^1^0^0^0 54123^"Horizontal Uncertainty Ellipse Semi-Minor Valid"^1^0^0^0 54124^"Horizontal Uncertainty Ellipse Orient Azimuth Valid"^1^0^0^0 54125^"Vertical Uncertainty Valid"^1^0^0^0 54126^"Horizontal Velocity Uncertainty Valid"^1^0^0^0 54127^"Vertical Velocity Uncertainty Valid"^1^0^0^0 54128^"Horizontal Confidence Valid"^1^0^0^0 54129^"Position DOP Valid"^1^0^0^0 54130^"Horizontal DOP Valid"^1^0^0^0 54131^"Vertical DOP Valid"^1^0^0^0 54132^"Operating Mode Used Valid"^1^0^0^0 54133^"Calendar Year"^16^0^4^0 54134^"Calendar Month"^8^1^50411^0 54135^"Calendar Day"^8^1^50412^0 54136^"Calendar Day Of Month"^8^0^2^0 54137^"Calendar Hour"^8^0^2^0 54138^"Calendar Minute"^8^0^2^0 54139^"Calendar Second"^8^0^2^0 54140^"Calendar Millisecond"^16^0^4^0 54141^"Calendar Leap Seconds"^8^0^2^0 54142^"UTC Timestamp"^64^0^8^1 54143^"UTC Timestamp Uncertainty"^32^0^6^0 54144^"Latitude"^64^0^14^0 54145^"Longitude"^64^0^14^0 54146^"Ellipsoid Altitude"^32^0^13^0 54147^"Mean Sea Level Altitude"^32^0^13^0 54148^"Horizontal Speed"^32^0^13^0 54149^"Vertical Speed"^32^0^13^0 54150^"Heading"^32^0^13^0 54151^"Horizontal Uncertainty Circular"^32^0^13^0 54152^"Horizontal Uncertainty Ellipse Semi-Major"^32^0^13^0 54153^"Horizontal Uncertainty Ellipse Semi-Minor"^32^0^13^0 54154^"Horizontal Uncertainty Ellipse Orient Azimuth"^32^0^13^0 54155^"Vertical Uncertainty"^32^0^13^0 54156^"Horizontal Velocity Uncertainty"^32^0^13^0 54157^"Vertical Velocity Uncertainty"^32^0^13^0 54158^"Horizontal Confidence"^8^0^2^0 54159^"Position DOP "^32^0^13^0 54160^"Horizontal DOP"^32^0^13^0 54161^"Vertical DOP"^32^0^13^0 54162^"Operating Mode"^8^1^50409^0 54163^"Maximum File Size"^16^0^4^0 54164^"URL Record Count"^8^0^2^0 54165^"URL Length"^8^0^2^0 54166^"URL"^8^0^9^0 54167^"Delay Threshold"^32^0^6^0 54168^"Wi-Fi Request Type"^8^1^50413^0 54169^"Wi-Fi Request Time Between Fixes"^16^0^4^0 54170^"Iono Valid"^1^0^0^0 54171^"Satellite Count Valid"^1^0^0^0 54172^"Satellite List Valid"^1^0^0^0 54173^"Ionospheric Corrections"^8^0^0^0 54174^"SV Record Count"^8^0^2^0 54175^"System Valid"^1^0^0^0 54176^"PRN Valid"^1^0^0^0 54177^"Health Status Valid"^1^0^0^0 54178^"Process Status Valid"^1^0^0^0 54179^"Ephemeris State Valid"^1^0^0^0 54180^"Almanac State Valid"^1^0^0^0 54181^"Elevation Valid"^1^0^0^0 54182^"Azimuth Valid"^1^0^0^0 54183^"CN0 Valid"^1^0^0^0 54184^"System"^8^1^50414^0 54185^"PRN"^8^0^2^0 54186^"Health Level"^8^1^50415^0 54187^"Processing Status"^8^1^50416^0 54188^"Ephemeris State"^8^1^50417^0 54189^"Almanac State"^8^1^50418^0 54190^"Azimuth"^16^0^4^0 54191^"CN0"^16^0^4^0 54192^"Privacy Valid"^1^0^0^0 54193^"QoS Valid"^1^0^0^0 54194^"Count Valid"^1^0^0^0 54195^"Interval Valid"^1^0^0^0 54196^"Mode Valid"^1^0^0^0 54197^"Requestor ID Valid"^1^0^0^0 54198^"Privacy"^8^1^50419^0 54199^"QoS"^8^0^2^0 54200^"Position Count"^32^0^6^0 54201^"Interval Between Fixes"^32^0^6^0 54202^"Mode"^8^1^50420^0 54203^"Requestor ID DCS"^8^1^50421^0 54204^"Requestor ID Length"^8^0^2^0 54205^"Requestor ID"^8^0^2^1 54206^"Privacy Valid"^1^0^0^0 54207^"INIT Hash Valid"^1^0^0^0 54208^"Mode Valid"^1^0^0^0 54209^"SLP Session ID Valid"^1^0^0^0 54210^"SLP Server IPv4 Address Valid"^1^0^0^0 54211^"SLP Server IPv6 Address Valid"^1^0^0^0 54212^"SLP Server URL Address Valid"^1^0^0^0 54213^"DCS Valid"^1^0^0^0 54214^"Requestor ID Valid"^1^0^0^0 54215^"Client Name Valid"^1^0^0^0 54216^"QoP Horizontal Accuracy Valid"^1^0^0^0 54217^"QoP Vertical Accuracy Valid"^1^0^0^0 54218^"QoP Max Location Age Valid"^1^0^0^0 54219^"QoP Delay Valid"^1^0^0^0 54220^"Privacy"^8^1^50419^0 54221^"INIT Hash"^64^0^8^1 54222^"Mode"^8^1^50422^0 54223^"SLP Session ID"^32^0^6^0 54224^"SLP Server IPv4 Port"^32^0^6^0 54225^"SLP Server IPv4 Address"^8^0^2^0 54226^"SLP Server IPv6 Address"^8^0^2^0 54227^"SLP Server URL Length"^8^0^2^0 54228^"SLP Server URL Address"^8^0^9^0 54229^"Request DCS"^8^1^50423^0 54230^"Requestor ID DCS"^8^1^50424^0 54231^"Requestor ID Length"^8^0^2^0 54232^"Requestor ID"^8^0^2^1 54233^"Client Name DCS"^8^1^50424^0 54234^"Client Name Length"^8^0^2^0 54235^"Client Name"^8^0^2^1 54236^"QoP Horizontal Accuracy"^8^0^2^0 54237^"QoP Vertical Accuracy"^8^0^2^0 54238^"QoP Max Location Age"^8^0^2^0 54239^"QoP Delay"^8^0^2^0 54250^"Privacy Valid"^1^0^0^0 54251^"Invoke ID Valid"^1^0^0^0 54252^"Notification Text Valid"^1^0^0^0 54253^"Client Address Valid"^1^0^0^0 54254^"Location Type Valid"^1^0^0^0 54255^"Requestor ID Valid"^1^0^0^0 54256^"Codeword String Valid"^1^0^0^0 54257^"Service Type ID Valid"^1^0^0^0 54258^"Privacy"^8^1^50419^0 54259^"Invoke ID"^8^0^2^0 54260^"Notification Text DCS"^8^1^50425^0 54261^"Notification Text Length"^8^0^2^0 54262^"Notification Text"^8^0^2^1 54263^"Client Address Length"^8^0^2^0 54264^"Client Address"^8^0^9^0 54265^"Location Type"^8^1^50426^0 54266^"Requestor ID DCS"^8^1^50425^0 54267^"Requestor ID Length"^8^0^2^0 54268^"Requestor ID"^8^0^2^1 54269^"Codeword DCS"^8^1^50425^0 54270^"Codeword Length"^8^0^2^0 54271^"Codeword"^8^0^2^1 54272^"Service Type ID"^8^0^2^0 54273^"Type"^8^1^50427^0 54274^"Protocol/Data Type"^8^1^50428^0 54275^"Embedded XTRA Data Client Enabled"^8^0^0^0 54276^"Embedded XTRA Time Client Enabled"^8^0^0^0 54277^"Service Major Version"^8^0^2^0 54278^"Service Minor Version"^8^0^2^0 54279^"Sequence Number"^8^0^2^0 54280^"Total Length"^16^0^4^0 54281^"Sequence Length"^16^0^4^0 54282^"Data"^8^0^2^1 54283^"Vertical Confidence"^8^0^2^0 54284^"Source"^8^1^50429^0 54285^"Wi-Fi Time Counter"^32^0^6^0 54286^"Wi-Fi Latitude"^32^0^5^0 54287^"Wi-Fi Longitude"^32^0^5^0 54288^"HEPE In Meters"^16^0^4^0 54289^"AP Count"^8^0^2^0 54290^"Error Code"^8^0^2^0 54291^"MAC Address"^8^0^2^1 54292^"RSSI"^32^0^6^0 54293^"Beacon Channel"^16^0^4^0 54294^"State"^8^1^50430^0 54295^"Enable SBAS"^8^0^0^0 54296^"Allow Request"^8^0^0^0 54297^"Timestamp"^64^0^8^0 54298^"Time Uncertainty"^32^0^6^0 54299^"Time Base"^8^1^50431^0 54300^"Force Acceptance"^8^0^0^0 54301^"Filename Length"^8^0^2^0 54302^"Filename"^8^0^9^0 54303^"File Operation"^8^1^50432^0 54304^"Data Length"^32^0^6^0 54305^"Part Number"^8^0^2^0 54306^"Total Parts"^8^0^2^0 54307^"Data"^8^0^2^1 54308^"Data Power Optimization Enabled"^8^0^0^0 54309^"Enable Data Power Optimization"^8^0^0^0 54310^"On Demand Positioning"^8^1^50433^0 54311^"Position Valid"^1^0^0^0 54312^"Altitude/Vertical Uncertainty Valid"^1^0^0^0 54313^"Time Milliseconds Valid"^1^0^0^0 54314^"Time Week Number Valid"^1^0^0^0 54315^"Time Uncertainty Valid"^1^0^0^0 54316^"Iono Valid"^1^0^0^0 54317^"GPS Ephemeris Valid"^1^0^0^0 54318^"GPS Almanac Valid"^1^0^0^0 54319^"GPS Health Valid"^1^0^0^0 54320^"GPS Visible SVs Valid"^1^0^0^0 54321^"Glonass Ephemeris Valid"^1^0^0^0 54322^"Glonass Almanac Valid"^1^0^0^0 54323^"Glonass Health Valid"^1^0^0^0 54324^"Glonass Visible SVs Valid"^1^0^0^0 54325^"SBAS Ephemeris Valid"^1^0^0^0 54326^"SBAS Almanac Valid"^1^0^0^0 54327^"SBAS Health Valid"^1^0^0^0 54328^"SBAS Visible SVs Valid"^1^0^0^0 54329^"XTRA Information Valid"^1^0^0^0 54330^"Timestamp In TOW Milliseconds"^32^0^6^0 54331^"GPS Week Number"^16^0^4^0 54332^"Iono Is Valid"^8^0^0^0 54333^"GPS Ephemeris SV Mask"^32^0^6^1 54334^"GPS Almanac SV Mask"^32^0^6^1 54335^"GPS Health SV Mask"^32^0^6^1 54336^"GPS Visible SV Mask"^32^0^6^1 54337^"Glonass Ephemeris SV Mask"^32^0^6^1 54338^"Glonass Almanac SV Mask"^32^0^6^1 54339^"Glonass Health SV Mask"^32^0^6^1 54340^"Glonass Visible SV Mask"^32^0^6^1 54341^"SBAS Ephemeris SV Mask"^32^0^6^1 54342^"SBAS Almanac SV Mask"^32^0^6^1 54343^"SBAS Health SV Mask"^32^0^6^1 54344^"SBAS Visible SV Mask"^32^0^6^1 54345^"XTRA GPS Start Week"^16^0^4^0 54346^"XTRA GPS Start Minutes"^16^0^4^0 54347^"XTRA GPS Valid Hours"^16^0^4^0 54348^"Elevation"^32^0^13^0 54349^"SLP Server IPv6 Port"^32^0^6^0 54350^"Used For Position"^1^0^0^0 54351^"Hidden SSID"^1^0^0^0 54352^"Encryption On"^1^0^0^0 54353^"Infrastructure Mode"^1^0^0^0 54354^"Engine Enabled"^8^0^0^0 54355^"Method State"^8^1^50434^0 54356^"Network Mode"^8^1^50435^0 55000^"SMS Wake Enabled"^8^0^0^0^-1^0 55001^"Mask"^32^0^6^1^-1^0 56000^"Display Text"^1^0^0^0^-1^0 56001^"Get Inkey"^1^0^0^0^-1^0 56002^"Get Input"^1^0^0^0^-1^0 56003^"Setup Menu"^1^0^0^0^-1^0 56004^"Select Item"^1^0^0^0^-1^0 56005^"Send SMS Alpha Identifier"^1^0^0^0^-1^0 56006^"Setup Event User Activity"^1^0^0^0^-1^0 56007^"Setup Event Idle Screen Notify"^1^0^0^0^-1^0 56008^"Setup Event Language Sel Notify"^1^0^0^0^-1^0 56009^"Setup Idle Mode Text"^1^0^0^0^-1^0 56010^"Language Notification"^1^0^0^0^-1^0 56011^"Refresh"^1^0^0^0^-1^0 56012^"End Proactive Session"^1^0^0^0^-1^0 56013^"Reference ID"^32^0^6^1^-1^0 56014^"Command Length"^16^0^4^0^-1^0 56015^"Display Text Command"^8^0^2^1^-1^0 56016^"Get Inkey Command"^8^0^2^1^-1^0 56017^"Get Input Command"^8^0^2^1^-1^0 56018^"Setup Menu Command"^8^0^2^1^-1^0 56019^"Select Item Command"^8^0^2^1^-1^0 56020^"Alpha ID Command Type"^8^1^50600^1^-1^0 56021^"Alpha ID Length"^16^0^4^0^-1^0 56022^"Alpha ID"^8^0^2^1^-1^0 56023^"User Activity Notify"^1^0^0^0^-1^0 56024^"Idle Screen Available"^1^0^0^0^-1^0 56025^"Language Selection Notify"^1^0^0^0^-1^0 56026^"Setup Idle Mode Text Command"^8^0^2^1^-1^0 56027^"Language Notification Command"^8^0^2^1^-1^0 56028^"Refresh Mode"^16^0^4^1^-1^0 56029^"Refresh Stage"^16^1^50601^1^-1^0 56030^"Proactive Session End Type"^8^1^50602^1^-1^0 56031^"Terminal Response Length"^16^0^4^0^-1^0 56032^"Terminal Response"^8^0^2^1^-1^0 56033^"Envelope Command Type"^16^1^50005^0^-1^0 56034^"Envelope Length"^16^0^4^0^-1^0 56035^"Envelope Data"^8^0^2^1^-1^0 56036^"Envelope Command Type"^16^1^50603^0^-1^0 57000^"EAP-SIM"^1^0^0^0^-1^0 57001^"EAP-AKA"^1^0^0^0^-1^0 57002^"EAP Request Packet"^8^0^2^1^-1^0 57003^"Response Packet"^8^0^2^1^-1^0 57005^"Session Keys"^8^0^2^1^-1^0 57006^"Result"^8^1^50700^0^-1^0 58000^"Report Network Initiated Alerts"^8^0^0^0^-1^0 58001^"Report Session Status"^8^0^0^0^-1^0 58002^"Session Type"^8^1^50800^0^-1^0 58003^"Session ID"^16^0^4^0^-1^0 58004^"Session State"^8^1^50801^0^-1^0 58005^"Session Failure"^8^1^50802^0^-1^0 58006^"Retry Count"^8^0^2^0^-1^0 58007^"Retry Pause Timer"^16^0^4^0^-1^0 58008^"Remaining Time"^16^0^4^0^-1^0 58009^"Selection"^8^1^50803^0^-1^0 58010^"Device Provisioning Service Update Enabled"^8^0^0^0^-1^0 58011^"PRL Service Update Enabled"^8^0^0^0^-1^0 58012^"HFA Feature Enabled"^8^0^0^0^-1^0 58013^"HFA Feature Done State"^8^1^50804^0^-1^0 59000^"Instance ID"^8^0^2^0^-1^0 59001^"Link ID"^16^0^4^0^-1^0 59002^"Service Count"^8^0^2^0^-1^0 59003^"Service Type"^8^1^50900^0^-1^0 59004^"Major Version"^16^0^4^0^-1^0 59005^"Minor Version"^16^0^4^0^-1^0 59006^"Addendum Label Length"^8^0^2^0^-1^0 59007^"Addendum Label"^8^0^9^0^-1^0 59008^"Client ID"^8^0^2^0^-1^0 59009^"Data Format"^8^1^50901^0^-1^0 59010^"Link Protocol - 802.3"^1^0^0^0^-1^0 59011^"Link Protocol - IP"^1^0^0^0^-1^0 59012^"Report Power State Changes"^8^0^0^0^-1^0 59013^"Current Power Save State"^32^1^50902^0^-1^0 59014^"Previous Power Save State"^32^1^50902^0^-1^0 59015^"Message ID"^16^0^4^0^-1^0 70000^"USS DCS"^8^1^70000^0^-1^0 70001^"USS Length"^8^0^2^0^-1^0 70002^"USS Data"^8^0^2^1^-1^0 70003^"Failure Cause"^16^0^4^1^-1^0 70004^"Alpha DCS"^8^1^70001^0^-1^0 70005^"Alpha Length"^8^0^2^0^-1^0 70006^"Alpha Data"^8^0^2^1^-1^0 70007^"Notification Type"^8^1^70002^0^-1^0libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/Makefile.am000066400000000000000000000004021455567757300235460ustar00rootroot00000000000000noinst_LTLIBRARIES = libQMIDB.la DBFILES = \ Entity.txt \ EnumEntry.txt \ Enum.txt \ Field.txt \ Struct.txt QMIDB.o: $(DBFILES) $(LD) -r -b binary -o QMIDB.o $(DBFILES) libQMIDB_la_SOURCES = foo.c libQMIDB_la_LIBADD = QMIDB.o CLEANFILES = QMIDB.o libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/Struct.txt000077500000000000000000001072401455567757300235520ustar00rootroot0000000000000050000^0^0^50000^""^-1^0^"" 50000^1^0^50001^""^-1^0^"" 50001^0^0^50002^""^-1^0^"" 50010^0^0^50100^""^-1^0^"" 50011^0^0^50101^""^-1^0^"" 50011^1^0^50102^""^-1^0^"" 50011^2^0^50103^""^-1^0^"" 50011^3^0^50104^""^-1^0^"" 50011^4^0^50105^""^-1^0^"" 50011^5^0^50106^""^-1^0^"" 50011^6^0^50107^""^-1^0^"" 50011^7^0^50169^""^-1^0^"" 50011^8^0^50170^""^-1^0^"" 50011^9^2^40^""^-1^0^"" 50012^0^0^50108^""^-1^0^"" 50013^0^0^50109^""^-1^0^"" 50014^0^0^50110^""^-1^0^"" 50015^0^0^50111^""^-1^0^"" 50016^0^0^50112^""^-1^0^"" 50017^0^0^50113^""^-1^0^"" 50018^0^0^50114^""^-1^0^"" 50019^0^0^50115^""^-1^0^"" 50019^1^0^50116^""^-1^0^"" 50020^0^0^50117^""^-1^0^"" 50021^0^0^50118^""^-1^1^"4" 50022^0^0^50119^""^-1^0^"" 50023^0^0^50120^""^-1^0^"" 50023^1^0^50121^""^-1^0^"" 50023^2^2^8^""^-1^0^"" 50024^0^0^50122^""^-1^0^"" 50025^0^0^50123^""^-1^0^"" 50026^0^0^50124^""^-1^0^"" 50026^1^0^50125^""^-1^0^"" 50026^2^2^8^""^-1^0^"" 50027^0^0^50126^""^-1^0^"" 50028^0^0^50127^""^-1^0^"" 50029^0^0^50128^""^-1^0^"" 50030^0^0^50128^""^-1^0^"" 50030^1^0^50129^""^-1^0^"" 50031^0^0^50115^""^-1^0^"" 50031^1^0^50116^""^-1^0^"" 50031^2^0^50130^""^-1^0^"" 50031^3^0^50131^""^-1^0^"" 50032^0^0^50102^""^-1^0^"" 50032^1^0^50103^""^-1^0^"" 50032^2^0^50104^""^-1^0^"" 50032^3^0^50105^""^-1^0^"" 50032^4^0^50106^""^-1^0^"" 50032^5^0^50107^""^-1^0^"" 50032^6^0^50169^""^-1^0^"" 50032^7^0^50170^""^-1^0^"" 50032^8^2^32^""^-1^0^"" 50033^0^0^50132^""^-1^0^"" 50034^0^0^50133^""^-1^0^"" 50035^0^0^50134^""^-1^0^"" 50036^0^0^50135^""^-1^0^"" 50036^1^0^50136^""^-1^0^"" 50036^2^0^50137^""^-1^0^"" 50036^3^0^50138^""^-1^0^"" 50036^4^0^50139^""^-1^0^"" 50036^5^0^50140^""^-1^0^"" 50036^6^0^50141^""^-1^0^"" 50036^7^0^50142^""^-1^0^"" 50036^8^0^50143^""^-1^0^"" 50036^9^0^50144^""^-1^0^"" 50036^10^0^50145^""^-1^0^"" 50036^11^0^50146^""^-1^0^"" 50037^0^0^50147^""^-1^0^"" 50037^1^0^50148^""^-1^0^"" 50037^2^0^50149^""^-1^0^"" 50037^3^0^50150^""^-1^0^"" 50037^4^0^50151^""^-1^0^"" 50038^0^0^50132^""^-1^0^"" 50038^1^0^50126^""^-1^0^"" 50039^0^0^50152^""^-1^0^"" 50039^1^1^50040^"Profile"^-1^2^"50152" 50040^0^0^50132^""^-1^0^"" 50040^1^0^50126^""^-1^0^"" 50040^2^0^50153^""^-1^0^"" 50040^3^0^50154^""^-1^10^"50153" 50041^0^0^50155^""^-1^0^"" 50042^0^0^50156^""^-1^0^"" 50043^0^0^50157^""^-1^0^"" 50044^0^0^50158^""^-1^0^"" 50045^0^0^50159^""^-1^0^"" 50046^0^0^50160^""^-1^0^"" 50047^0^0^50161^""^-1^0^"" 50048^0^0^50128^""^-1^0^"" 50048^1^0^50161^""^-1^0^"" 50049^0^0^50157^""^-1^0^"" 50050^0^0^50128^""^-1^0^"" 50051^0^0^50162^""^-1^0^"" 50051^1^0^50163^""^-1^0^"" 50051^2^0^50164^""^-1^0^"" 50051^3^0^50165^""^-1^0^"" 50051^4^0^50166^""^-1^0^"" 50051^5^0^50167^""^-1^0^"" 50051^6^0^50209^""^-1^0^"" 50051^7^2^32^""^-1^0^"" 50052^0^0^50168^""^-1^0^"" 50053^0^0^50101^""^-1^0^"" 50053^1^0^50169^""^14^0^"" 50053^2^0^50170^""^-1^0^"" 50053^7^2^40^""^-1^0^"" 50054^0^0^50171^""^-1^0^"" 50055^0^0^50172^""^-1^0^"" 50056^0^0^50173^""^-1^0^"" 50056^1^0^50126^""^-1^0^"" 50057^0^0^50174^""^-1^0^"" 50058^0^0^50175^""^-1^0^"" 50059^0^0^50176^""^-1^0^"" 50060^0^0^50177^""^-1^0^"" 50061^0^0^50178^""^-1^0^"" 50062^0^0^50179^""^-1^0^"" 50063^0^0^50180^""^-1^0^"" 50064^0^0^50181^""^-1^0^"" 50065^0^0^50182^""^-1^0^"" 50066^0^0^50183^""^-1^0^"" 50067^0^0^50184^""^-1^0^"" 50068^0^0^50185^""^-1^0^"" 50069^0^0^50186^""^-1^0^"" 50070^0^0^50173^""^-1^0^"" 50071^0^0^50187^""^-1^0^"" 50072^0^0^50188^""^-1^0^"" 50073^0^0^50189^""^-1^0^"" 50074^0^0^50190^""^-1^0^"" 50074^1^1^50075^"Record"^-1^2^"50190" 50075^0^0^50191^""^-1^0^"" 50075^1^0^50192^""^-1^0^"" 50075^2^0^50193^""^-1^0^"" 50075^3^0^50194^""^-1^0^"" 50075^4^0^50118^""^-1^1^"4" 50075^5^0^50196^""^-1^0^"" 50075^6^0^50197^""^-1^0^"" 50075^7^0^50198^""^-1^0^"" 50075^8^0^50199^""^-1^0^"" 50075^9^0^50157^""^-1^0^"" 50075^10^0^50201^""^-1^0^"" 50075^11^0^50202^""^-1^10^"50201" 50076^0^0^50190^""^-1^0^"" 50076^1^1^50077^"Record"^-1^2^"50190" 50077^0^0^50191^""^-1^0^"" 50078^0^0^50203^""^-1^0^"" 50079^0^0^50204^""^-1^0^"" 50080^0^0^50205^""^-1^0^"" 50081^0^0^50206^""^-1^0^"" 50082^0^0^50207^""^-1^0^"" 50083^0^0^50208^""^-1^0^"" 50084^0^0^50210^""^-1^0^"" 50084^1^0^50211^""^-1^0^"" 50084^2^0^50212^""^-1^0^"" 50084^3^0^50213^""^-1^0^"" 50084^4^0^50214^""^-1^0^"" 50084^5^0^50215^""^-1^0^"" 50084^6^0^50216^""^-1^0^"" 50084^7^0^50217^""^-1^0^"" 50084^8^0^50218^""^-1^0^"" 50084^9^0^50219^""^-1^0^"" 50084^10^0^50255^""^-1^0^"" 50084^11^0^50256^""^-1^0^"" 50084^12^0^50257^""^-1^0^"" 50084^13^0^50258^""^-1^0^"" 50084^14^0^50259^""^-1^0^"" 50084^15^0^50260^""^-1^0^"" 50084^16^0^50261^""^-1^0^"" 50084^17^0^50262^""^-1^0^"" 50084^18^2^32^""^-1^0^"" 50085^0^0^50220^""^-1^0^"" 50086^0^0^50221^""^-1^0^"" 50087^0^0^50222^""^-1^0^"" 50088^0^0^50223^""^-1^0^"" 50090^0^0^50230^""^-1^0^"" 50090^1^1^50091^""^-1^5^"50230 = 1" 50090^2^1^50092^""^-1^5^"50230 = 2" 50090^3^2^72^""^-1^0^"" 50091^0^0^50231^""^-1^0^"" 50091^1^0^50232^""^-1^0^"" 50091^2^0^50233^""^-1^0^"" 50091^3^2^32^""^-1^0^"" 50091^4^1^50093^""^-1^5^"50231 = 1" 50091^5^1^50094^""^-1^5^"50233 = 1" 50091^6^2^64^""^-1^0^"" 50092^0^0^50234^""^-1^0^"" 50092^1^0^50235^""^-1^0^"" 50092^2^0^50236^""^-1^0^"" 50092^3^0^50237^""^-1^0^"" 50092^4^0^50238^""^-1^0^"" 50092^5^0^50273^""^-1^0^"" 50092^6^2^32^""^-1^0^"" 50093^0^0^50239^""^-1^0^"" 50093^1^0^50240^""^-1^0^"" 50093^2^0^50241^""^-1^0^"" 50093^3^2^32^""^-1^0^"" 50094^0^0^50242^""^-1^0^"" 50094^1^0^50243^""^-1^0^"" 50094^2^0^50244^""^-1^0^"" 50094^3^0^50274^""^-1^0^"" 50094^4^2^32^""^-1^0^"" 50095^0^0^50245^""^-1^0^"" 50096^0^0^50246^""^-1^0^"" 50097^0^0^50247^""^-1^0^"" 50098^0^0^50248^""^-1^0^"" 50098^1^0^50249^""^-1^0^"" 50098^2^0^50250^""^16^5^"50248 = 1" 50098^3^0^50251^""^16^5^"50248 = 2" 50098^4^0^50252^""^16^5^"50248 = 3" 50098^5^0^50253^""^16^5^"50248 = 6" 50099^0^0^50254^""^-1^0^"" 50100^0^0^51000^""^-1^0^"" 50101^0^0^51001^""^-1^0^"" 50101^1^0^51002^""^-1^0^"" 50102^0^0^51003^""^-1^0^"" 50102^1^0^51004^""^-1^0^"" 50102^2^0^51005^""^-1^0^"" 50102^3^0^51006^""^-1^0^"" 50102^4^0^51007^""^8^0^"" 50103^0^0^51008^""^-1^0^"" 50103^1^0^51009^""^-1^0^"" 50103^2^0^51010^""^-1^0^"" 50103^3^0^51011^""^-1^0^"" 50103^4^0^51012^""^-1^0^"" 50103^5^0^51013^""^-1^2^"51012" 50104^0^0^51014^""^-1^0^"" 50105^0^0^51015^""^-1^0^"" 50106^0^0^51016^""^-1^0^"" 50107^0^0^51017^""^-1^0^"" 50108^0^0^51018^""^-1^0^"" 50109^0^0^51019^""^-1^0^"" 50110^0^0^51020^""^-1^0^"" 50111^0^0^51021^""^-1^0^"" 50112^0^0^51022^""^-1^0^"" 50113^0^0^51023^""^-1^0^"" 50114^0^0^51024^""^-1^0^"" 50115^0^0^51025^""^-1^0^"" 50116^0^0^51026^""^-1^0^"" 50116^1^0^51027^""^-1^0^"" 50117^0^0^51028^""^-1^0^"" 50118^0^0^51048^""^-1^0^"" 50118^1^0^51049^""^-1^9^"51048" 50119^0^0^51030^""^-1^0^"" 50119^1^0^51031^""^-1^0^"" 50119^2^0^51032^""^-1^0^"" 50119^3^0^51033^""^-1^9^"51032" 50119^4^0^51034^""^-1^0^"" 50119^5^0^51035^""^-1^9^"51034" 50120^0^0^51036^""^-1^0^"" 50120^1^0^51037^""^-1^2^"51036" 50121^0^0^51038^""^-1^0^"" 50121^1^0^51039^""^-1^9^"51038" 50122^0^0^51040^""^-1^0^"" 50122^1^0^51041^""^-1^9^"51040" 50123^0^0^51042^""^-1^0^"" 50124^0^0^51042^""^-1^0^"" 50124^1^0^51043^""^-1^0^"" 50125^0^0^51044^""^-1^0^"" 50125^1^0^51045^""^-1^0^"" 50126^0^0^51046^""^-1^0^"" 50126^1^0^51047^""^-1^2^"51046" 50127^0^0^51050^""^-1^0^"" 50127^1^0^51051^""^-1^0^"" 50127^2^0^51052^""^-1^0^"" 50127^3^0^51053^""^-1^9^"51052" 50128^0^0^51054^""^-1^0^"" 50128^1^0^51055^""^-1^0^"" 50129^0^0^51050^""^-1^0^"" 50129^1^0^51052^""^-1^0^"" 50129^2^0^51053^""^-1^9^"51052" 50130^0^0^51050^""^-1^0^"" 50130^1^0^51056^""^-1^0^"" 50130^2^0^51057^""^-1^9^"51056" 50130^3^0^51060^""^-1^0^"" 50130^4^0^51061^""^-1^9^"51060" 50131^0^0^51050^""^-1^0^"" 50131^1^0^51058^""^-1^0^"" 50131^2^0^51059^""^-1^9^"51058" 50131^3^0^51060^""^-1^0^"" 50131^4^0^51061^""^-1^9^"51060" 50132^0^0^51062^""^-1^0^"" 50132^1^0^51054^""^-1^0^"" 50132^2^0^51055^""^-1^0^"" 50133^0^0^51063^""^-1^0^"" 50134^0^0^51030^""^-1^0^"" 50135^0^0^51064^""^-1^0^"" 50135^1^0^51065^""^-1^0^"" 50135^2^0^51066^""^-1^0^"" 50135^3^0^51037^""^-1^2^"51065" 50136^0^0^51067^""^-1^0^"" 50137^0^0^51068^""^-1^0^"" 50138^0^0^51069^""^-1^0^"" 50139^0^0^51070^""^-1^0^"" 50139^1^0^51071^""^-1^0^"" 50139^2^0^51072^""^-1^0^"" 50139^3^0^51082^""^-1^0^"" 50140^0^0^51073^""^-1^0^"" 50141^0^0^51074^""^-1^0^"" 50142^0^0^51075^""^-1^0^"" 50143^0^0^51076^""^-1^0^"" 50144^0^0^51077^""^-1^0^"" 50145^0^0^51078^""^-1^0^"" 50146^0^0^51079^""^-1^0^"" 50146^1^0^51054^""^-1^0^"" 50146^2^0^51055^""^-1^0^"" 50147^0^0^51078^""^-1^0^"" 50147^1^0^51079^""^-1^0^"" 50147^2^0^51080^""^-1^0^"" 50147^3^0^51081^""^-1^9^"51080" 50148^0^0^51054^""^-1^0^"" 50149^0^0^51078^""^-1^0^"" 50149^1^0^51080^""^-1^0^"" 50149^2^0^51081^""^-1^9^"51080" 50150^0^0^51055^""^-1^0^"" 50151^0^0^51083^""^-1^0^"" 50152^0^0^51084^""^-1^0^"" 50153^0^0^51085^""^-1^0^"" 50155^0^0^51090^""^-1^0^"" 50155^1^1^50156^"Image"^-1^2^"51090" 50156^0^0^51091^""^-1^0^"" 50156^1^0^51092^""^-1^1^"16" 50156^2^0^51093^""^-1^0^"" 50156^3^0^51094^""^-1^10^"51093" 50157^0^0^51095^""^-1^0^"" 50158^0^0^51096^""^-1^0^"" 50159^0^0^51090^""^-1^0^"" 50159^1^0^51091^""^-1^2^"51090" 50160^0^0^51097^""^-1^0^"" 50161^0^0^51098^""^-1^0^"" 50161^1^1^50162^"Type"^-1^2^"51098" 50162^0^0^51091^""^-1^0^"" 50162^1^0^51099^""^-1^0^"" 50162^2^0^51100^""^-1^0^"" 50162^3^0^51090^""^-1^0^"" 50162^4^1^50163^"Image"^-1^2^"51090" 50163^0^0^51096^""^-1^0^"" 50163^1^0^51101^""^-1^0^"" 50163^2^0^51092^""^-1^1^"16" 50163^3^0^51093^""^-1^0^"" 50163^4^0^51094^""^-1^10^"51093" 50165^0^0^51110^""^-1^0^"" 50165^1^0^51111^""^-1^0^"" 50165^2^0^51112^""^-1^0^"" 50165^3^0^51113^""^-1^0^"" 50165^4^0^51114^""^-1^0^"" 50165^5^0^51115^""^-1^0^"" 50165^6^0^51116^""^-1^0^"" 50165^7^0^51117^""^-1^0^"" 50165^8^0^51118^""^-1^0^"" 50165^9^0^51119^""^-1^0^"" 50165^10^0^51120^""^-1^0^"" 50165^11^0^51121^""^-1^0^"" 50165^12^0^51122^""^-1^0^"" 50165^13^0^51123^""^-1^0^"" 50165^14^0^51124^""^-1^0^"" 50165^15^0^51125^""^-1^0^"" 50165^16^0^51126^""^-1^0^"" 50165^17^0^51127^""^-1^0^"" 50165^18^0^51128^""^-1^0^"" 50165^19^0^51129^""^-1^0^"" 50165^20^0^51130^""^-1^0^"" 50165^21^0^51131^""^-1^0^"" 50165^22^0^51132^""^-1^0^"" 50165^23^0^51133^""^-1^0^"" 50165^24^0^51134^""^-1^0^"" 50165^25^0^51135^""^-1^0^"" 50165^26^0^51136^""^-1^0^"" 50165^27^0^51137^""^-1^0^"" 50165^28^0^51138^""^-1^0^"" 50165^29^0^51139^""^-1^0^"" 50165^30^0^51140^""^31^0^"" 50165^31^0^51141^""^48^0^"" 50165^32^0^51142^""^-1^0^"" 50165^33^0^51143^""^-1^0^"" 50165^34^0^51144^""^56^0^"" 50165^35^0^51145^""^-1^0^"" 50165^36^0^51146^""^-1^0^"" 50165^37^0^51147^""^-1^0^"" 50165^38^2^64^""^-1^0^"" 50166^0^0^51148^""^-1^0^"" 50167^0^0^51149^""^-1^0^"" 50168^0^0^51150^""^-1^0^"" 50169^0^0^51151^""^-1^0^"" 50170^0^0^51152^""^-1^0^"" 50171^0^0^51153^""^-1^0^"" 50172^0^0^51154^""^-1^0^"" 50172^1^0^51155^""^-1^0^"" 50173^0^0^51156^""^-1^0^"" 50173^1^0^51157^""^-1^0^"" 50174^0^0^51158^""^-1^0^"" 50175^0^0^51159^""^-1^0^"" 50200^0^0^52000^""^-1^0^"" 50200^1^0^52001^""^-1^0^"" 50200^2^0^52002^""^-1^2^"52001" 50201^0^0^52003^""^-1^0^"" 50201^1^0^52004^""^-1^0^"" 50202^0^0^52005^""^-1^0^"" 50202^1^1^50203^"Network Info"^-1^2^"52005" 50203^0^0^52006^""^-1^0^"" 50203^1^0^52007^""^-1^0^"" 50203^2^0^52008^""^-1^0^"" 50203^3^0^52009^""^-1^0^"" 50203^4^0^52010^""^-1^0^"" 50203^5^0^52011^""^-1^0^"" 50203^6^0^52012^""^-1^0^"" 50203^7^0^52013^""^-1^10^"52012" 50204^0^0^52014^""^-1^0^"" 50205^0^0^52006^""^-1^0^"" 50205^1^0^52007^""^-1^0^"" 50205^2^0^52015^""^-1^0^"" 50206^0^0^52016^""^-1^0^"" 50207^0^0^52017^""^-1^0^"" 50207^1^0^52018^""^-1^0^"" 50207^2^0^52019^""^-1^0^"" 50207^3^0^52020^""^-1^0^"" 50207^4^0^52021^""^-1^0^"" 50207^5^0^52004^""^-1^2^"52021" 50208^0^0^52022^""^-1^0^"" 50209^0^0^52006^""^-1^0^"" 50209^1^0^52007^""^-1^0^"" 50209^2^0^52012^""^-1^0^"" 50209^3^0^52013^""^-1^10^"52012" 50210^0^0^52023^""^-1^0^"" 50210^1^1^50211^"Network"^-1^2^"52023" 50211^0^0^52006^""^-1^0^"" 50211^1^0^52007^""^-1^0^"" 50211^2^1^50212^""^-1^0^"" 50212^0^0^52024^""^6^0^"" 50212^1^0^52025^""^-1^0^"" 50212^2^0^52026^""^15^0^"" 50213^0^0^52027^""^-1^0^"" 50213^1^1^50214^"Network"^-1^2^"52027" 50214^0^0^52006^""^-1^0^"" 50214^1^0^52007^""^-1^0^"" 50215^0^0^52028^""^-1^0^"" 50215^1^0^52029^""^-1^0^"" 50216^0^1^50217^""^-1^0^"" 50216^1^0^52032^""^-1^0^"" 50217^0^0^52035^""^-1^0^"" 50217^1^1^50221^""^-1^5^"52035 = 1" 50217^2^1^50222^""^-1^5^"52035 = 2" 50217^3^2^16^""^-1^0^"" 50218^0^0^52033^""^-1^0^"" 50219^0^0^52034^""^-1^0^"" 50219^1^0^52033^""^-1^0^"" 50220^0^0^52005^""^-1^0^"" 50220^1^1^50201^"Info"^-1^2^"52005" 50221^0^0^52036^""^-1^0^"" 50221^1^0^52037^""^-1^0^"" 50221^2^0^52038^""^-1^0^"" 50222^0^0^52039^""^-1^0^"" 50222^1^0^52040^""^-1^0^"" 50223^0^0^52041^""^-1^0^"" 50223^1^0^52042^""^-1^2^"52041" 50224^0^0^52043^""^-1^0^"" 50225^0^0^52044^""^-1^0^"" 50226^0^0^52045^""^-1^0^"" 50227^0^0^52046^""^-1^0^"" 50227^1^0^52047^""^-1^0^"" 50227^2^0^52048^""^-1^0^"" 50228^0^0^52049^""^-1^0^"" 50229^0^0^52050^""^-1^0^"" 50229^1^0^52051^""^-1^0^"" 50229^2^0^52052^""^-1^0^"" 50229^3^0^52053^""^-1^0^"" 50229^4^0^52054^""^-1^0^"" 50229^5^0^52055^""^-1^0^"" 50229^6^0^52056^""^-1^0^"" 50229^7^0^52057^""^-1^0^"" 50229^8^0^52058^""^-1^0^"" 50229^9^0^52059^""^40^0^"" 50229^10^0^52060^""^72^0^"" 50229^11^0^52061^""^-1^0^"" 50229^12^2^104^""^-1^0^"" 50230^0^0^52034^""^-1^0^"" 50231^0^0^52062^""^-1^0^"" 50232^0^0^52004^""^-1^0^"" 50232^1^0^52063^""^-1^0^"" 50232^2^0^52064^""^-1^0^"" 50233^0^0^52065^""^-1^0^"" 50234^0^0^52066^""^-1^0^"" 50235^0^0^52067^""^-1^0^"" 50235^1^1^50232^"Instance"^-1^2^"52067" 50236^0^0^52068^""^-1^0^"" 50236^1^0^52069^""^-1^0^"" 50237^0^0^52070^""^-1^0^"" 50240^0^0^52080^""^-1^0^"" 50240^1^0^52081^""^-1^0^"" 50241^0^0^52082^""^-1^0^"" 50241^1^0^52083^""^-1^0^"" 50242^0^0^52084^""^-1^0^"" 50242^1^0^52085^""^-1^0^"" 50243^0^0^52086^""^-1^0^"" 50243^1^0^52087^""^-1^0^"" 50244^0^0^52088^""^-1^0^"" 50245^0^0^52089^""^-1^0^"" 50245^1^0^52004^""^-1^0^"" 50246^0^0^52090^""^-1^0^"" 50246^1^0^52004^""^-1^0^"" 50247^0^0^52091^""^-1^0^"" 50248^0^0^52092^""^-1^0^"" 50249^0^0^52093^""^-1^0^"" 50249^1^0^52004^""^-1^0^"" 50250^0^0^52094^""^-1^0^"" 50251^0^0^52095^""^-1^0^"" 50252^0^0^52096^""^-1^0^"" 50253^0^0^52157^""^-1^0^"" 50253^1^0^52158^""^-1^0^"" 50253^2^0^52159^""^-1^0^"" 50253^3^0^52160^""^-1^0^"" 50253^4^0^52161^""^-1^0^"" 50253^5^2^16^""^-1^0^"" 50254^0^0^52097^""^-1^0^"" 50254^1^1^50245^"Measurement"^-1^2^"52097" 50255^0^0^52097^""^-1^0^"" 50255^1^1^50246^"Measurement"^-1^2^"52097" 50256^0^0^52097^""^-1^0^"" 50256^1^1^50249^"Measurement"^-1^2^"52097" 50257^0^0^52098^""^-1^0^"" 50257^1^0^52099^""^-1^0^"" 50257^2^0^52100^""^-1^0^"" 50258^0^0^52067^""^-1^0^"" 50258^1^1^50259^"Instance"^-1^2^"52067" 50259^0^0^52004^""^-1^0^"" 50259^1^0^52022^""^-1^0^"" 50260^0^0^52022^""^-1^0^"" 50261^0^0^52101^""^-1^0^"" 50261^1^0^52102^""^-1^0^"" 50261^2^0^52103^""^-1^0^"" 50262^0^0^52104^""^-1^0^"" 50263^0^0^52105^""^-1^0^"" 50264^0^0^52106^""^-1^0^"" 50264^1^0^52107^""^-1^0^"" 50264^2^0^52108^""^-1^0^"" 50264^3^0^52109^""^-1^0^"" 50264^4^2^16^""^-1^0^"" 50265^0^0^52110^""^-1^0^"" 50265^1^0^52111^""^-1^0^"" 50265^2^0^52112^""^-1^0^"" 50265^3^0^52113^""^-1^0^"" 50265^4^0^52114^""^-1^0^"" 50265^5^0^52115^""^-1^0^"" 50265^6^0^52116^""^-1^0^"" 50265^7^0^52117^""^-1^0^"" 50265^8^0^52118^""^-1^0^"" 50265^9^0^52119^""^-1^0^"" 50265^10^0^52120^""^-1^0^"" 50265^11^0^52121^""^-1^0^"" 50265^12^0^52122^""^-1^0^"" 50265^13^0^52123^""^-1^0^"" 50265^14^0^52124^""^-1^0^"" 50265^15^0^52125^""^-1^0^"" 50265^16^0^52126^""^-1^0^"" 50265^17^0^52127^""^-1^0^"" 50265^18^0^52128^""^-1^0^"" 50265^19^0^52129^""^-1^0^"" 50265^20^0^52130^""^-1^0^"" 50265^21^0^52131^""^-1^0^"" 50265^22^0^52132^""^-1^0^"" 50265^23^0^52133^""^-1^0^"" 50265^24^0^52134^""^-1^0^"" 50265^25^0^52135^""^-1^0^"" 50265^26^0^52136^""^-1^0^"" 50265^27^0^52137^""^-1^0^"" 50265^28^0^52138^""^-1^0^"" 50265^29^0^52139^""^-1^0^"" 50265^30^0^52140^""^31^0^"" 50265^31^0^52141^""^48^0^"" 50265^32^0^52142^""^-1^0^"" 50265^33^0^52143^""^-1^0^"" 50265^34^0^52144^""^56^0^"" 50265^35^0^52145^""^-1^0^"" 50265^36^0^52146^""^-1^0^"" 50265^37^0^52147^""^-1^0^"" 50265^38^2^64^""^-1^0^"" 50266^0^0^52148^""^-1^0^"" 50267^0^0^52149^""^-1^0^"" 50268^0^0^52150^""^-1^0^"" 50268^1^0^52151^""^-1^0^"" 50268^2^0^52152^""^-1^0^"" 50268^3^0^52153^""^-1^0^"" 50268^4^0^52154^""^-1^0^"" 50268^6^0^52155^""^24^0^"" 50268^7^0^52067^""^-1^0^"" 50268^8^0^52156^""^-1^2^"52067" 50269^0^0^52006^""^-1^0^"" 50269^1^0^52007^""^-1^0^"" 50269^2^0^52162^""^-1^0^"" 50269^3^0^52163^""^-1^0^"" 50269^4^0^52164^""^-1^0^"" 50269^5^0^52165^""^-1^2^"52164" 50270^0^0^52005^""^-1^0^"" 50270^1^1^50271^"Info"^-1^2^"52005" 50271^0^0^52006^""^-1^0^"" 50271^1^0^52007^""^-1^0^"" 50271^2^0^52015^""^-1^0^"" 50272^0^0^52166^""^-1^0^"" 50273^0^0^52167^""^-1^0^"" 50274^0^0^52168^""^-1^0^"" 50274^1^0^52169^""^-1^0^"" 50274^2^0^52170^""^-1^2^"52169" 50274^3^0^52171^""^-1^0^"" 50274^4^0^52172^""^-1^0^"" 50274^5^0^52173^""^-1^0^"" 50274^6^0^52174^""^-1^0^"" 50274^7^0^52175^""^-1^2^"52174" 50274^8^0^52176^""^-1^0^"" 50274^9^0^52177^""^-1^0^"" 50274^10^0^52178^""^-1^0^"" 50274^11^0^52179^""^-1^0^"" 50274^12^0^52180^""^-1^2^"52179" 50275^0^0^52181^""^-1^0^"" 50275^1^0^52004^""^-1^0^"" 50276^0^0^52182^""^-1^0^"" 50277^0^0^52183^""^-1^0^"" 50277^1^0^52184^""^-1^0^"" 50300^0^0^53000^""^-1^0^"" 50301^0^0^53001^""^-1^0^"" 50301^1^0^53002^""^-1^0^"" 50302^0^0^53003^""^-1^0^"" 50302^1^0^53004^""^-1^0^"" 50302^2^0^53005^""^-1^2^"53004" 50303^0^0^53006^""^-1^0^"" 50304^0^0^53001^""^-1^0^"" 50304^1^0^53003^""^-1^0^"" 50304^2^0^53004^""^-1^0^"" 50304^3^0^53005^""^-1^2^"53004" 50305^0^0^53002^""^-1^0^"" 50306^0^0^53007^""^-1^0^"" 50306^1^0^53003^""^-1^0^"" 50306^2^0^53004^""^-1^0^"" 50306^3^0^53005^""^-1^2^"53004" 50307^0^0^53001^""^-1^0^"" 50307^1^0^53002^""^-1^0^"" 50307^2^0^53007^""^-1^0^"" 50308^0^0^53001^""^-1^0^"" 50309^0^0^53007^""^-1^0^"" 50310^0^0^53008^""^-1^0^"" 50311^0^0^53009^""^-1^0^"" 50311^1^1^50312^"Message"^-1^2^"53009" 50312^0^0^53002^""^-1^0^"" 50312^1^0^53007^""^-1^0^"" 50313^0^0^53010^""^-1^0^"" 50313^1^1^50314^"Route"^-1^2^"53010" 50314^0^0^53011^""^-1^0^"" 50314^1^0^53012^""^-1^0^"" 50314^2^0^53001^""^-1^0^"" 50314^3^0^53013^""^-1^0^"" 50315^0^0^53010^""^-1^0^"" 50315^1^1^50316^"Route"^-1^2^"53010" 50316^0^0^53011^""^-1^0^"" 50316^1^0^53012^""^-1^0^"" 50316^2^0^53001^""^-1^0^"" 50316^3^0^53014^""^-1^0^"" 50317^0^0^53015^""^-1^0^"" 50317^1^0^53016^""^-1^0^"" 50317^2^0^53017^""^-1^9^"53016" 50318^0^0^53018^""^-1^0^"" 50319^0^0^53019^""^-1^0^"" 50320^0^0^53020^""^-1^0^"" 50320^1^0^53021^""^-1^0^"" 50320^2^0^53003^""^-1^0^"" 50320^3^0^53004^""^-1^0^"" 50320^4^0^53005^""^-1^2^"53004" 50321^0^0^53022^""^-1^0^"" 50321^1^0^53023^""^-1^0^"" 50322^0^0^53024^""^-1^0^"" 50323^0^0^53025^""^-1^0^"" 50324^0^0^53026^""^-1^0^"" 50325^0^0^53027^""^-1^0^"" 50325^1^0^53028^""^-1^0^"" 50326^0^0^53029^""^-1^0^"" 50327^0^0^53030^""^-1^0^"" 50328^0^0^53031^""^-1^0^"" 50329^0^0^53021^""^-1^0^"" 50329^1^0^53008^""^-1^0^"" 50329^2^0^53032^""^-1^0^"" 50330^0^0^53033^""^-1^0^"" 50330^1^0^53034^""^-1^0^"" 50331^0^0^53035^""^-1^0^"" 50331^1^0^53028^""^-1^0^"" 50332^0^0^53036^""^-1^0^"" 50333^0^0^53037^""^-1^0^"" 50334^0^0^53038^""^-1^0^"" 50335^0^0^53039^""^-1^0^"" 50336^0^0^53008^""^-1^0^"" 50336^1^0^53040^""^-1^0^"" 50337^0^0^53041^""^-1^0^"" 50337^1^1^50338^"Instance"^-1^2^"53041" 50338^0^0^53042^""^-1^0^"" 50338^1^0^53043^""^-1^0^"" 50338^2^0^53044^""^-1^0^"" 50339^0^0^53041^""^-1^0^"" 50339^1^1^50340^"Instance"^-1^2^"53041" 50340^0^0^53045^""^-1^0^"" 50340^1^0^53046^""^-1^0^"" 50340^2^0^53044^""^-1^0^"" 50341^0^0^53047^""^-1^0^"" 50341^1^0^53041^""^-1^0^"" 50341^2^1^50338^"Instance"^-1^2^"53041" 50342^0^0^53047^""^-1^0^"" 50342^1^0^53041^""^-1^0^"" 50342^2^1^50340^"Instance"^-1^2^"53041" 50343^0^0^53001^""^-1^0^"" 50343^1^0^53008^""^-1^0^"" 50344^0^0^53048^""^-1^0^"" 50345^0^0^53001^""^-1^0^"" 50345^1^0^53002^""^-1^0^"" 50345^2^0^53008^""^-1^0^"" 50346^0^0^53049^""^-1^0^"" 50400^0^0^54000^""^-1^0^"" 50401^0^0^54001^""^-1^0^"" 50402^0^0^54002^""^-1^0^"" 50402^1^0^54003^""^-1^0^"" 50403^0^0^54002^""^-1^0^"" 50404^0^0^54004^""^-1^0^"" 50404^1^0^54005^""^-1^0^"" 50404^2^0^54006^""^-1^0^"" 50404^3^0^54007^""^-1^0^"" 50404^4^0^54008^""^-1^0^"" 50404^5^0^54009^""^-1^0^"" 50404^6^0^54010^""^-1^0^"" 50404^7^0^54011^""^-1^0^"" 50405^0^0^54012^""^-1^0^"" 50405^1^0^54013^""^-1^0^"" 50405^2^0^54014^""^-1^0^"" 50405^3^0^54015^""^-1^0^"" 50405^4^0^54016^""^-1^0^"" 50405^5^0^54017^""^8^0^"" 50405^6^0^54018^""^-1^0^"" 50406^0^0^54019^""^-1^0^"" 50406^1^0^54020^""^-1^0^"" 50407^0^0^54006^""^-1^0^"" 50407^1^0^54008^""^-1^0^"" 50407^2^0^54010^""^-1^0^"" 50407^3^0^54011^""^-1^0^"" 50408^0^0^54021^""^-1^0^"" 50408^1^0^54022^""^-1^0^"" 50409^0^0^54023^""^-1^0^"" 50409^1^0^54024^""^-1^2^"54023" 50410^0^0^54025^""^-1^0^"" 50411^0^0^54026^""^-1^0^"" 50411^1^0^54027^""^-1^0^"" 50411^2^0^54028^""^-1^0^"" 50412^0^0^54029^""^-1^1^"4" 50412^1^0^54030^""^-1^0^"" 50413^0^0^54031^""^-1^0^"" 50414^0^0^54032^""^-1^0^"" 50414^1^0^54033^""^-1^0^"" 50414^2^0^54034^""^-1^0^"" 50414^3^0^54035^""^-1^0^"" 50414^4^0^54036^""^-1^0^"" 50414^5^0^54037^""^-1^0^"" 50414^6^0^54038^""^-1^0^"" 50414^7^0^54039^""^-1^0^"" 50414^8^0^54040^""^-1^0^"" 50414^9^0^54041^""^-1^0^"" 50414^10^0^54042^""^-1^0^"" 50414^11^0^54043^""^-1^0^"" 50414^12^0^54044^""^-1^0^"" 50414^13^2^32^""^-1^0^"" 50415^0^0^54045^""^-1^0^"" 50415^1^0^54046^""^-1^0^"" 50415^2^0^54047^""^-1^0^"" 50415^3^0^54048^""^-1^0^"" 50415^4^0^54049^""^-1^0^"" 50415^5^0^54050^""^-1^0^"" 50415^6^0^54051^""^-1^0^"" 50415^7^0^54052^""^-1^0^"" 50415^8^0^54053^""^-1^0^"" 50415^9^0^54054^""^-1^0^"" 50415^10^2^32^""^-1^0^"" 50416^0^0^54055^""^-1^0^"" 50417^0^0^54056^""^-1^0^"" 50417^1^0^54057^""^-1^0^"" 50417^2^0^54058^""^-1^10^"54057" 50420^0^0^54100^""^-1^0^"" 50421^0^0^54101^""^-1^0^"" 50422^0^0^54102^""^-1^0^"" 50423^0^0^54103^""^-1^0^"" 50424^0^0^54104^""^-1^0^"" 50425^0^0^54105^""^-1^0^"" 50426^0^0^54106^""^-1^0^"" 50427^0^0^54107^""^-1^0^"" 50428^0^0^54108^""^-1^0^"" 50429^0^0^54109^""^-1^0^"" 50430^0^0^54110^""^-1^0^"" 50430^1^0^54111^""^-1^0^"" 50430^2^0^54112^""^-1^0^"" 50430^3^0^54113^""^-1^0^"" 50430^4^0^54114^""^-1^0^"" 50430^5^0^54115^""^-1^0^"" 50430^6^0^54116^""^-1^0^"" 50430^7^0^54117^""^-1^0^"" 50430^8^0^54118^""^-1^0^"" 50430^9^0^54119^""^-1^0^"" 50430^10^0^54120^""^-1^0^"" 50430^11^0^54121^""^-1^0^"" 50430^12^0^54122^""^-1^0^"" 50430^13^0^54123^""^-1^0^"" 50430^14^0^54124^""^-1^0^"" 50430^15^0^54125^""^-1^0^"" 50430^16^0^54126^""^-1^0^"" 50430^17^0^54127^""^-1^0^"" 50430^18^0^54128^""^-1^0^"" 50430^19^0^54129^""^-1^0^"" 50430^20^0^54130^""^-1^0^"" 50430^21^0^54131^""^-1^0^"" 50430^22^0^54132^""^-1^0^"" 50430^23^0^54132^""^-1^0^"" 50430^24^2^32^""^-1^0^"" 50430^25^0^54133^""^-1^0^"" 50430^26^0^54134^""^-1^0^"" 50430^27^0^54135^""^-1^0^"" 50430^28^0^54136^""^-1^0^"" 50430^29^0^54137^""^-1^0^"" 50430^30^0^54138^""^-1^0^"" 50430^31^0^54139^""^-1^0^"" 50430^32^0^54140^""^-1^0^"" 50430^33^0^54141^""^-1^0^"" 50430^34^0^54142^""^-1^0^"" 50430^35^0^54143^""^-1^0^"" 50430^36^0^54144^""^-1^0^"" 50430^37^0^54145^""^-1^0^"" 50430^38^0^54146^""^-1^0^"" 50430^39^0^54147^""^-1^0^"" 50430^40^0^54148^""^-1^0^"" 50430^41^0^54149^""^-1^0^"" 50430^42^0^54150^""^-1^0^"" 50430^43^0^54151^""^-1^0^"" 50430^44^0^54152^""^-1^0^"" 50430^45^0^54153^""^-1^0^"" 50430^46^0^54154^""^-1^0^"" 50430^47^0^54155^""^-1^0^"" 50430^48^0^54156^""^-1^0^"" 50430^49^0^54157^""^-1^0^"" 50430^50^0^54158^""^-1^0^"" 50430^51^0^54159^""^-1^0^"" 50430^52^0^54160^""^-1^0^"" 50430^53^0^54161^""^-1^0^"" 50430^54^0^54162^""^-1^0^"" 50431^0^0^54163^""^-1^0^"" 50431^1^0^54164^""^-1^0^"" 50431^2^1^50432^"URL"^-1^2^"54164" 50432^0^0^54165^""^-1^0^"" 50432^1^0^54166^""^-1^10^"54165" 50433^0^0^54167^""^-1^0^"" 50433^1^0^54164^""^-1^0^"" 50433^2^1^50432^"URL"^-1^2^"54164" 50434^0^0^54168^""^-1^0^"" 50434^1^0^54169^""^-1^0^"" 50435^0^0^54170^""^-1^0^"" 50435^1^0^54171^""^-1^0^"" 50435^2^0^54172^""^-1^0^"" 50435^3^2^32^""^-1^0^"" 50435^4^0^54173^""^-1^0^"" 50435^5^0^54174^""^-1^0^"" 50435^6^1^50436^"SV"^-1^2^"54174" 50436^0^0^54175^""^-1^0^"" 50436^1^0^54176^""^-1^0^"" 50436^2^0^54177^""^-1^0^"" 50436^3^0^54178^""^-1^0^"" 50436^4^0^54179^""^-1^0^"" 50436^5^0^54180^""^-1^0^"" 50436^6^0^54181^""^-1^0^"" 50436^7^0^54182^""^-1^0^"" 50436^8^0^54183^""^-1^0^"" 50436^9^2^32^""^-1^0^"" 50436^10^0^54184^""^-1^0^"" 50436^11^0^54185^""^-1^0^"" 50436^12^0^54186^""^-1^0^"" 50436^13^0^54187^""^-1^0^"" 50436^14^0^54188^""^-1^0^"" 50436^15^0^54189^""^-1^0^"" 50436^16^0^54347^""^-1^0^"" 50436^17^0^54190^""^-1^0^"" 50436^18^0^54191^""^-1^0^"" 50437^0^0^54192^""^-1^0^"" 50437^1^0^54193^""^-1^0^"" 50437^2^0^54194^""^-1^0^"" 50437^3^0^54195^""^-1^0^"" 50437^4^0^54196^""^-1^0^"" 50437^5^0^54197^""^-1^0^"" 50437^6^2^32^""^-1^0^"" 50437^7^0^54198^""^-1^0^"" 50437^8^0^54199^""^-1^0^"" 50437^9^0^54200^""^-1^0^"" 50437^10^0^54201^""^-1^0^"" 50437^11^0^54202^""^-1^0^"" 50437^12^0^54203^""^-1^0^"" 50437^13^0^54204^""^-1^0^"" 50437^14^0^54205^""^-1^2^"54204" 50438^0^0^54206^""^-1^0^"" 50438^1^0^54207^""^-1^0^"" 50438^2^0^54208^""^-1^0^"" 50438^3^0^54209^""^-1^0^"" 50438^4^0^54210^""^-1^0^"" 50438^5^0^54211^""^-1^0^"" 50438^6^0^54212^""^-1^0^"" 50438^7^0^54213^""^-1^0^"" 50438^8^0^54214^""^-1^0^"" 50438^9^0^54215^""^-1^0^"" 50438^10^0^54216^""^-1^0^"" 50438^11^0^54217^""^-1^0^"" 50438^12^0^54218^""^-1^0^"" 50438^13^0^54219^""^-1^0^"" 50438^14^2^32^""^-1^0^"" 50438^15^0^54220^""^-1^0^"" 50438^16^0^54221^""^-1^0^"" 50438^17^0^54222^""^-1^0^"" 50438^18^0^54223^""^-1^0^"" 50438^19^0^54224^""^-1^0^"" 50438^20^0^54225^""^-1^1^"4" 50438^21^0^54348^""^-1^0^"" 50438^22^0^54226^""^-1^1^"16" 50438^23^0^54227^""^-1^0^"" 50438^24^0^54228^""^-1^10^"54227" 50438^25^0^54229^""^-1^0^"" 50438^26^0^54230^""^-1^0^"" 50438^27^0^54231^""^-1^0^"" 50438^28^0^54232^""^-1^2^"54231" 50438^29^0^54233^""^-1^0^"" 50438^30^0^54234^""^-1^0^"" 50438^31^0^54235^""^-1^2^"54234" 50438^32^0^54236^""^-1^0^"" 50438^33^0^54237^""^-1^0^"" 50438^34^0^54238^""^-1^0^"" 50438^35^0^54239^""^-1^0^"" 50439^0^0^54250^""^-1^0^"" 50439^1^0^54251^""^-1^0^"" 50439^2^0^54252^""^-1^0^"" 50439^3^0^54253^""^-1^0^"" 50439^4^0^54254^""^-1^0^"" 50439^5^0^54255^""^-1^0^"" 50439^6^0^54256^""^-1^0^"" 50439^7^0^54257^""^-1^0^"" 50439^8^2^32^""^-1^0^"" 50439^9^0^54258^""^-1^0^"" 50439^10^0^54259^""^-1^0^"" 50439^11^0^54260^""^-1^0^"" 50439^12^0^54261^""^-1^0^"" 50439^13^0^54262^""^-1^2^"54261" 50439^14^0^54263^""^-1^0^"" 50439^15^0^54264^""^-1^10^"54263" 50439^16^0^54265^""^-1^0^"" 50439^17^0^54266^""^-1^0^"" 50439^18^0^54267^""^-1^0^"" 50439^19^0^54268^""^-1^2^"54267" 50439^20^0^54269^""^-1^0^"" 50439^21^0^54270^""^-1^0^"" 50439^22^0^54271^""^-1^2^"54270" 50439^23^0^54272^""^-1^0^"" 50440^0^0^54273^""^-1^0^"" 50440^1^0^54274^""^-1^0^"" 50441^0^0^54275^""^-1^0^"" 50441^1^0^54276^""^-1^0^"" 50442^0^0^54006^""^-1^0^"" 50443^0^0^54008^""^-1^0^"" 50444^0^0^54011^""^-1^0^"" 50445^0^0^54277^""^-1^0^"" 50445^1^0^54278^""^-1^0^"" 50446^0^0^54279^""^-1^0^"" 50446^1^0^54280^""^-1^0^"" 50446^2^0^54281^""^-1^0^"" 50446^3^0^54282^""^-1^2^"54281" 50447^0^0^54142^""^-1^0^"" 50448^0^0^54144^""^-1^0^"" 50449^0^0^54145^""^-1^0^"" 50450^0^0^54146^""^-1^0^"" 50451^0^0^54147^""^-1^0^"" 50452^0^0^54151^""^-1^0^"" 50453^0^0^54155^""^-1^0^"" 50454^0^0^54158^""^-1^0^"" 50455^0^0^54283^""^-1^0^"" 50456^0^0^54284^""^-1^0^"" 50457^0^0^54285^""^-1^0^"" 50458^0^0^54286^""^-1^0^"" 50458^1^0^54287^""^-1^0^"" 50458^2^0^54288^""^-1^0^"" 50458^3^0^54289^""^-1^0^"" 50458^4^0^54290^""^-1^0^"" 50459^0^0^54289^""^-1^0^"" 50459^1^1^50460^"AP"^-1^2^"54289" 50460^0^0^54291^""^-1^1^"6" 50460^1^0^54292^""^-1^0^"" 50460^2^0^54293^""^-1^0^"" 50460^3^0^54350^""^-1^0^"" 50460^4^0^54351^""^-1^0^"" 50460^5^0^54352^""^-1^0^"" 50460^6^0^54353^""^-1^0^"" 50460^7^2^8^""^-1^0^"" 50461^0^0^54294^""^-1^0^"" 50462^0^0^54295^""^-1^0^"" 50463^0^0^54296^""^-1^0^"" 50464^0^0^54297^""^-1^0^"" 50464^1^0^54298^""^-1^0^"" 50464^2^0^54299^""^-1^0^"" 50464^3^0^54300^""^-1^0^"" 50465^0^0^54301^""^-1^0^"" 50465^1^0^54302^""^-1^10^"54301" 50465^2^0^54303^""^-1^0^"" 50465^3^0^54304^""^-1^0^"" 50465^4^0^54305^""^-1^0^"" 50465^5^0^54306^""^-1^0^"" 50465^6^0^54306^""^-1^2^"54304" 50466^0^0^54308^""^-1^0^"" 50467^0^0^54309^""^-1^0^"" 50468^0^0^54310^""^-1^0^"" 50469^0^0^54354^""^-1^0^"" 50469^1^0^54311^""^-1^0^"" 50469^2^0^54312^""^-1^0^"" 50469^3^0^54313^""^-1^0^"" 50469^4^0^54314^""^-1^0^"" 50469^5^0^54315^""^-1^0^"" 50469^6^0^54316^""^-1^0^"" 50469^7^0^54317^""^-1^0^"" 50469^8^0^54318^""^-1^0^"" 50469^9^0^54319^""^-1^0^"" 50469^10^0^54320^""^-1^0^"" 50469^11^0^54321^""^-1^0^"" 50469^12^0^54322^""^-1^0^"" 50469^13^0^54323^""^-1^0^"" 50469^14^0^54324^""^-1^0^"" 50469^15^0^54325^""^-1^0^"" 50469^16^0^54326^""^-1^0^"" 50469^17^0^54327^""^-1^0^"" 50469^18^0^54328^""^-1^0^"" 50469^19^0^54329^""^-1^0^"" 50469^20^2^32^""^-1^0^"" 50469^21^0^54144^""^-1^0^"" 50469^22^0^54145^""^-1^0^"" 50469^23^0^54151^""^-1^0^"" 50469^24^0^54146^""^-1^0^"" 50469^25^0^54155^""^-1^0^"" 50469^26^0^54330^""^-1^0^"" 50469^27^0^54331^""^-1^0^"" 50469^28^0^54298^""^-1^0^"" 50469^29^0^54332^""^-1^0^"" 50469^30^0^54333^""^-1^0^"" 50469^31^0^54334^""^-1^0^"" 50469^32^0^54335^""^-1^0^"" 50469^33^0^54336^""^-1^0^"" 50469^34^0^54337^""^-1^0^"" 50469^35^0^54338^""^-1^0^"" 50469^36^0^54339^""^-1^0^"" 50469^37^0^54340^""^-1^0^"" 50469^38^0^54341^""^-1^0^"" 50469^39^0^54342^""^-1^0^"" 50469^40^0^54343^""^-1^0^"" 50469^41^0^54344^""^-1^0^"" 50469^42^0^54345^""^-1^0^"" 50469^43^0^54346^""^-1^0^"" 50469^44^0^54347^""^-1^0^"" 50470^0^0^54355^""^-1^0^"" 50471^0^0^54356^""^-1^0^"" 50500^0^0^55000^""^-1^0^"" 50501^0^0^55001^""^-1^0^"" 50600^0^0^56000^""^-1^0^"" 50600^1^0^56001^""^-1^0^"" 50600^2^0^56002^""^-1^0^"" 50600^3^0^56003^""^-1^0^"" 50600^4^0^56004^""^-1^0^"" 50600^5^0^56005^""^-1^0^"" 50600^6^0^56006^""^-1^0^"" 50600^7^0^56007^""^-1^0^"" 50600^8^0^56008^""^-1^0^"" 50600^9^0^56009^""^-1^0^"" 50600^10^0^56010^""^-1^0^"" 50600^11^0^56011^""^-1^0^"" 50600^12^0^56012^""^-1^0^"" 50600^13^2^32^""^-1^0^"" 50601^0^0^56013^""^-1^0^"" 50601^1^0^56014^""^-1^0^"" 50601^2^0^56015^""^-1^2^"56014" 50602^0^0^56013^""^-1^0^"" 50602^1^0^56014^""^-1^0^"" 50602^2^0^56016^""^-1^2^"56014" 50603^0^0^56013^""^-1^0^"" 50603^1^0^56014^""^-1^0^"" 50603^2^0^56017^""^-1^2^"56014" 50604^0^0^56013^""^-1^0^"" 50604^1^0^56014^""^-1^0^"" 50604^2^0^56018^""^-1^2^"56014" 50605^0^0^56013^""^-1^0^"" 50605^1^0^56014^""^-1^0^"" 50605^2^0^56019^""^-1^2^"56014" 50606^0^0^56020^""^-1^0^"" 50606^1^0^56021^""^-1^0^"" 50606^2^0^56022^""^-1^2^"56021" 50607^0^0^56023^""^-1^0^"" 50607^1^0^56024^""^-1^0^"" 50607^2^0^56025^""^-1^0^"" 50607^3^2^32^""^-1^0^"" 50608^0^0^56013^""^-1^0^"" 50608^1^0^56014^""^-1^0^"" 50608^2^0^56026^""^-1^2^"56014" 50609^0^0^56013^""^-1^0^"" 50609^1^0^56014^""^-1^0^"" 50609^2^0^56027^""^-1^2^"56014" 50610^0^0^56028^""^-1^0^"" 50610^1^0^56029^""^-1^0^"" 50611^0^0^56030^""^-1^0^"" 50612^0^0^56013^""^-1^0^"" 50612^1^0^56031^""^-1^0^"" 50612^2^0^56032^""^-1^2^"56031" 50613^0^0^56036^""^-1^0^"" 50613^1^0^56034^""^-1^0^"" 50613^2^0^56035^""^-1^2^"56034" 50615^0^1^50600^"Common"^-1^0^"" 50615^1^1^50600^"Control"^-1^0^"" 50700^0^0^57000^""^-1^0^"" 50700^1^0^57001^""^-1^0^"" 50700^2^2^32^""^-1^0^"" 50701^0^0^57002^""^-1^1^"4096" 50703^0^0^57003^""^-1^1^"4096" 50704^0^0^57006^""^-1^0^"" 50705^0^0^57005^""^-1^1^"4096" 50800^0^0^58000^""^-1^0^"" 50801^0^0^58001^""^-1^0^"" 50802^0^0^58002^""^-1^0^"" 50802^1^0^58003^""^-1^0^"" 50803^0^0^58004^""^-1^0^"" 50804^0^0^58005^""^-1^0^"" 50805^0^0^58002^""^-1^0^"" 50806^0^0^58004^""^-1^0^"" 50806^1^0^58002^""^-1^0^"" 50807^0^0^58006^""^-1^0^"" 50807^1^0^58007^""^-1^0^"" 50807^2^0^58008^""^-1^0^"" 50808^0^0^58009^""^-1^0^"" 50808^1^0^58003^""^-1^0^"" 50809^0^0^58010^""^-1^0^"" 50810^0^0^58011^""^-1^0^"" 50811^0^0^58012^""^-1^0^"" 50812^0^0^58013^""^-1^0^"" 50900^0^0^59000^""^-1^0^"" 50901^0^0^59001^""^-1^0^"" 50902^0^0^59002^""^-1^0^"" 50902^1^1^50903^"Services"^-1^2^"59002" 50903^0^0^59003^""^-1^0^"" 50903^1^0^59004^""^-1^0^"" 50903^2^0^59005^""^-1^0^"" 50904^0^0^59006^""^-1^0^"" 50904^1^0^59007^""^-1^9^"59006" 50904^2^0^59002^""^-1^0^"" 50904^3^1^50903^"Services"^-1^2^"59002" 50905^0^0^59003^""^-1^0^"" 50906^0^0^59003^""^-1^0^"" 50906^1^0^59008^""^-1^0^"" 50907^0^0^59009^""^-1^0^"" 50908^0^0^59010^""^-1^0^"" 50908^1^0^59011^""^-1^0^"" 50908^2^2^16^""^-1^0^"" 50909^0^0^59012^""^-1^0^"" 50910^0^0^59013^""^-1^0^"" 50910^1^0^59014^""^-1^0^"" 50911^0^0^59013^""^-1^0^"" 50911^1^0^59003^""^-1^0^"" 50912^0^0^59015^""^-1^1^"255" 50913^0^0^59013^""^-1^0^"" 60000^0^0^50263^""^-1^0^"" 60000^1^1^50021^"Instance"^-1^2^"50263" 60001^0^0^50263^""^-1^0^"" 60001^1^1^60002^"Instance"^-1^2^"50263" 60002^0^0^50264^""^-1^0^"" 60002^1^0^50265^""^-1^10^"50264" 60003^0^1^60013^""^-1^0^"" 60004^0^0^50266^""^-1^0^"" 60005^0^0^50263^""^-1^0^"" 60005^1^1^60006^"Instance"^-1^2^"50263" 60006^0^0^50267^""^-1^0^"" 60006^1^0^50268^""^-1^10^"50267" 60007^0^0^50269^""^-1^0^"" 60008^0^0^50270^""^-1^0^"" 60009^0^0^50271^""^-1^1^"4" 60010^0^1^60012^""^-1^0^"" 60011^0^1^60012^""^-1^0^"" 60012^0^1^60013^""^-1^0^"" 60012^1^1^60014^""^-1^0^"" 60013^0^6^0^""^-1^0^"" 60013^1^0^50275^""^-1^1^"8" 60014^0^0^50272^""^-1^0^"" 60015^0^0^50276^""^-1^0^"" 60016^0^0^50277^""^-1^0^"" 60017^0^0^50269^""^-1^0^"" 60018^0^0^50278^""^-1^0^"" 60018^1^0^50279^""^-1^0^"" 60018^2^0^50280^""^-1^0^"" 60018^3^0^50281^""^-1^1^"16" 60018^4^0^50282^""^-1^0^"" 60018^5^0^50283^""^-1^0^"" 60018^6^0^50284^""^-1^0^"" 60018^7^0^50285^""^-1^0^"" 60018^8^0^50286^""^-1^0^"" 60018^9^0^50287^""^-1^0^"" 60018^10^0^50288^""^-1^0^"" 60018^11^0^50289^""^-1^0^"" 60018^12^0^50290^""^-1^0^"" 60019^0^0^50278^""^-1^0^"" 60019^1^0^50279^""^-1^0^"" 60019^2^0^50280^""^-1^0^"" 60019^3^0^50281^""^-1^0^"" 60019^4^0^50282^""^-1^0^"" 60019^5^0^50283^""^-1^0^"" 60019^6^0^50284^""^-1^0^"" 60019^7^0^50285^""^-1^0^"" 60019^8^0^50286^""^-1^0^"" 60019^9^0^50287^""^-1^0^"" 60019^10^0^50288^""^-1^0^"" 60019^11^0^50289^""^-1^0^"" 60019^12^0^50290^""^-1^0^"" 60020^0^0^50291^""^-1^0^"" 60021^0^0^50292^""^-1^0^"" 60022^0^0^50293^""^-1^0^"" 60023^0^1^60058^""^-1^0^"" 60024^0^0^50135^""^-1^0^"" 60024^1^0^50136^""^-1^0^"" 60024^2^0^50137^""^-1^0^"" 60024^3^0^50138^""^-1^0^"" 60024^4^0^50139^""^-1^0^"" 60024^5^0^50140^""^-1^0^"" 60024^6^0^50141^""^-1^0^"" 60024^7^0^50142^""^-1^0^"" 60024^8^0^50143^""^-1^0^"" 60024^9^0^50144^""^-1^0^"" 60024^10^0^50145^""^-1^0^"" 60024^11^0^50146^""^-1^0^"" 60024^12^0^50294^""^-1^0^"" 60025^0^0^50135^""^-1^0^"" 60025^1^0^50136^""^-1^0^"" 60025^2^0^50137^""^-1^0^"" 60025^3^0^50138^""^-1^0^"" 60025^4^0^50139^""^-1^0^"" 60025^5^0^50140^""^-1^0^"" 60025^6^0^50141^""^-1^0^"" 60025^7^0^50142^""^-1^0^"" 60025^8^0^50143^""^-1^0^"" 60025^9^0^50144^""^-1^0^"" 60025^10^0^50145^""^-1^0^"" 60025^11^0^50146^""^-1^0^"" 60025^12^0^50294^""^-1^0^"" 60026^0^1^60058^""^-1^0^"" 60027^0^1^60058^""^-1^0^"" 60028^0^0^50295^""^-1^0^"" 60029^0^0^50296^""^-1^0^"" 60029^1^0^50139^""^-1^0^"" 60029^2^0^50137^""^-1^0^"" 60029^3^0^50138^""^-1^0^"" 60029^4^0^50136^""^-1^0^"" 60030^0^0^50297^""^-1^0^"" 60031^0^0^50298^""^-1^0^"" 60032^0^0^50299^""^-1^0^"" 60033^0^0^50300^""^-1^0^"" 60034^0^0^50301^""^-1^0^"" 60035^0^0^50301^""^-1^0^"" 60036^0^0^50301^""^-1^0^"" 60037^0^0^50302^""^-1^0^"" 60038^0^0^50302^""^-1^0^"" 60039^0^0^50302^""^-1^0^"" 60040^0^0^50303^""^-1^0^"" 60041^0^0^50122^""^-1^0^"" 60042^0^0^50123^""^-1^0^"" 60043^0^0^50304^""^-1^0^"" 60044^0^0^50305^""^-1^0^"" 60045^0^0^50306^""^-1^0^"" 60046^0^0^50307^""^-1^0^"" 60047^0^0^50119^""^-1^0^"" 60048^0^0^50308^""^-1^0^"" 60049^0^0^50309^""^-1^0^"" 60050^0^0^50271^""^-1^0^"" 60051^0^0^50271^""^-1^0^"" 60052^0^1^60058^""^-1^0^"" 60053^0^1^60058^""^-1^0^"" 60054^0^0^50310^""^-1^0^"" 60055^0^1^60058^""^-1^0^"" 60056^0^1^60058^""^-1^0^"" 60057^0^0^50311^""^-1^0^"" 60057^1^1^60058^""^-1^2^"50311" 60058^0^1^60013^""^-1^0^"" 60059^0^0^50297^""^-1^0^"" 60060^0^0^50298^""^-1^0^"" 60061^0^0^50299^""^-1^0^"" 60062^0^0^50300^""^-1^0^"" 60063^0^0^50301^""^-1^0^"" 60064^0^0^50301^""^-1^0^"" 60065^0^0^50301^""^-1^0^"" 60066^0^0^50302^""^-1^0^"" 60067^0^0^50302^""^-1^0^"" 60068^0^0^50302^""^-1^0^"" 60069^0^0^50303^""^-1^0^"" 60070^0^0^50122^""^-1^0^"" 60071^0^0^50123^""^-1^0^"" 60072^0^0^50304^""^-1^0^"" 60073^0^0^50305^""^-1^0^"" 60074^0^0^50306^""^-1^0^"" 60075^0^0^50307^""^-1^0^"" 60076^0^0^50119^""^-1^0^"" 60077^0^0^50308^""^-1^0^"" 60078^0^0^50309^""^-1^0^"" 60079^0^0^50271^""^-1^0^"" 60080^0^0^50271^""^-1^0^"" 60081^0^1^60058^""^-1^0^"" 60082^0^1^60058^""^-1^0^"" 60083^0^0^50310^""^-1^0^"" 60084^0^1^60058^""^-1^0^"" 60085^0^1^60058^""^-1^0^"" 60086^0^0^50276^""^-1^0^"" 60087^0^0^50277^""^-1^0^"" 60088^0^0^50269^""^-1^0^"" 60090^0^1^60058^""^-1^0^"" 70000^0^0^70000^""^-1^0^"" 70000^1^0^70001^""^-1^0^"" 70000^2^0^70002^""^-1^2^"70001" 70001^0^0^70003^""^-1^0^"" 70002^0^0^70004^""^-1^0^"" 70002^1^0^70005^""^-1^0^"" 70002^2^0^70006^""^-1^2^"70005" 70003^0^0^70007^""^-1^0^"" 70004^0^0^50001^""^-1^0^""libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Database/QMI/foo.c000066400000000000000000000000001455567757300224330ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiConnectionMgmt/000077500000000000000000000000001455567757300231115ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiConnectionMgmt/GobiConnectionMgmt.cpp000077500000000000000000002322711455567757300273540ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.cpp DESCRIPTION: QUALCOMM Connection Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Global object cGobiConnectionMgmtDLL gConnectionDLL; // Interval between traffic processing loop iterations (milliseconds) const ULONG TRAFFIC_INTERVAL_MS = 300000; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: TrafficProcessThread (Free Method) DESCRIPTION: QMI traffic process thread - processes all traffic in order to fire off QMI traffic related callbacks PARAMETERS: pArg [ I ] - Object to interface to RETURN VALUE: VOID * - always NULL ===========================================================================*/ VOID * TrafficProcessThread( PVOID pArg ) { // Keep running? bool bRun = false; TRACE( "GobiConnectionMgmt traffic thread [%u] started\n", (UINT)pthread_self() ); // Create a vector of the objects to wait on std::vector events; // Store the index to service type for use later std::map services; cGobiConnectionMgmt * pAPI = (cGobiConnectionMgmt *)pArg; if (pAPI != 0) { // Time to go to work bRun = true; // Add the thread exit event events.push_back( &pAPI->mExitEvent ); // For each Protocol server, grab the signal event std::set ::const_iterator pIter; pIter = pAPI->mServerConfig.begin(); while (pIter != pAPI->mServerConfig.end()) { eQMIService svc = pIter->first; cQMIProtocolServer * pServer = pAPI->GetServer( svc ); if (pServer != 0) { // Grab the log from the server const cProtocolLog & log = pServer->GetLog(); // Grab the Signal event, if it exists cEvent & sigEvent = log.GetSignalEvent(); services[events.size()] = svc; events.push_back( &sigEvent ); } pIter++; } } // Loop waiting for exit event while (bRun == true) { // Wait for activity DWORD ignoredVal, index; int nRet = WaitOnMultipleEvents( events, TRAFFIC_INTERVAL_MS, ignoredVal, index ); // Timeout if (nRet == -ETIME) { // Do nothing } // Error? else if (nRet <= 0) { TRACE( "GobiConnectionMgmt traffic thread wait error %d\n", nRet ); bRun = false; } // Exit event? else if (index == 0) { bRun = false; } else if (index < events.size()) { // Run ProcessTraffic() for this service type if (services.find( index ) != services.end()) { pAPI->ProcessTraffic( services[index] ); } } else { // Fatal error bRun = false; } } TRACE( "GobiConnectionMgmt traffic thread [%u] exited\n", (UINT)pthread_self() ); return NULL; } /*=========================================================================== METHOD: CallbackThread (Free Method) DESCRIPTION: Thread to execute a callback asynchronously PARAMETERS: pArg [ I ] - The cAsyncFunction object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * CallbackThread( PVOID pArg ) { cGobiCMCallback * pCB = (cGobiCMCallback *)pArg; if (pCB == 0) { ASSERT( 0 ); return 0; } pCB->Call(); delete pCB; pCB = 0; return 0; } /*=========================================================================*/ // cGobiConnectionMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmtDLL::cGobiConnectionMgmtDLL() : mpAPI( 0 ), mbAllocated( false ) { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~cGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmtDLL::~cGobiConnectionMgmtDLL() { // Just in case if (mpAPI != 0) { mpAPI->Cleanup(); delete mpAPI; mpAPI = 0; } pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the cGobiConnectionMgmt object RETURN VALUE: cGobiConnectionMgmt * ===========================================================================*/ cGobiConnectionMgmt * cGobiConnectionMgmtDLL::GetAPI() { pthread_mutex_lock( &mSyncSection ); bool bAlloc = mbAllocated; pthread_mutex_unlock( &mSyncSection ); if (bAlloc == true) { return mpAPI; } pthread_mutex_lock( &mSyncSection ); mpAPI = new cGobiConnectionMgmt(); if (mpAPI != 0) { mpAPI->Initialize(); } // We have tried to allocate the object mbAllocated = true; pthread_mutex_unlock( &mSyncSection ); return mpAPI; } /*=========================================================================*/ // cGobiConnectionMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::cGobiConnectionMgmt() : cGobiQMICore(), mbThreadStarted( false ), mThreadID( 0 ), mWDSItemsProcessed( 0 ), mDMSItemsProcessed( 0 ), mNASItemsProcessed( 0 ), mWMSItemsProcessed( 0 ), mPDSItemsProcessed( 0 ), mCATItemsProcessed( 0 ), mOMAItemsProcessed( 0 ), mVoiceItemsProcessed( 0 ), mpFNSessionState( 0 ), mpFNByteTotals( 0 ), mpFNDataCapabilities( 0 ), mpFNDataBearer( 0 ), mpFNDormancyStatus( 0 ), mpFNMobileIPStatus( 0 ), mpFNActivationStatus( 0 ), mpFNPower( 0 ), mpFNWirelessDisable( 0 ), mpFNRoamingIndicator( 0 ), mpFNSignalStrength( 0 ), mpFNRFInfo( 0 ), mpFNLUReject( 0 ), mpPLMNMode( 0 ), mpFNNewSMS( 0 ), mpFNNewNMEA( 0 ), mpFNPDSState( 0 ), mpFNCATEvent( 0 ), mpFNOMADMAlert( 0 ), mpFNOMADMState( 0 ), mpFNUSSDRelease( 0 ), mpFNUSSDNotification( 0 ), mpFNUSSDOrigination( 0 ) { tServerConfig wdsSvr( eQMI_SVC_WDS, true ); tServerConfig dmsSvr( eQMI_SVC_DMS, true ); tServerConfig nasSvr( eQMI_SVC_NAS, true ); tServerConfig wmsSvr( eQMI_SVC_WMS, true ); tServerConfig pdsSvr( eQMI_SVC_PDS, true ); tServerConfig catSvr( eQMI_SVC_CAT, false ); tServerConfig rmsSvr( eQMI_SVC_RMS, false ); tServerConfig omaSvr( eQMI_SVC_OMA, false ); tServerConfig voiceSvr( eQMI_SVC_VOICE, false ); mServerConfig.insert( wdsSvr ); mServerConfig.insert( dmsSvr ); mServerConfig.insert( nasSvr ); mServerConfig.insert( wmsSvr ); mServerConfig.insert( pdsSvr ); mServerConfig.insert( catSvr ); mServerConfig.insert( rmsSvr ); mServerConfig.insert( omaSvr ); mServerConfig.insert( voiceSvr ); } /*=========================================================================== METHOD: ~cGobiConnectionMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::~cGobiConnectionMgmt() { Disconnect(); } /*=========================================================================== METHOD: ProcessTraffic (Internal Method) DESCRIPTION: Process traffic in a QMI server protocol log, this is done to exercise QMI indication related callbacks PARAMETERS: svc [ I ] - QMI Service type RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessTraffic( eQMIService svc ) { ULONG count = 0; switch (svc) { case eQMI_SVC_WDS: { cQMIProtocolServer * pWDS = GetServer( eQMI_SVC_WDS ); if (pWDS != 0) { // Grab the WDS log from the server const cProtocolLog & logWDS = pWDS->GetLog(); // New WDS items to process? count = logWDS.GetCount(); if (count != INVALID_LOG_INDEX && count > mWDSItemsProcessed) { for (ULONG i = mWDSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logWDS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_WDS_RX) ) { ProcessWDSBuffer( buf ); } } mWDSItemsProcessed = count; } } break; } case eQMI_SVC_DMS: { cQMIProtocolServer * pDMS = GetServer( eQMI_SVC_DMS ); if (pDMS != 0) { // Grab the DMS log from the server const cProtocolLog & logDMS = pDMS->GetLog(); // New DMS items to process? count = logDMS.GetCount(); if (count != INVALID_LOG_INDEX && count > mDMSItemsProcessed) { for (ULONG i = mDMSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logDMS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_DMS_RX) ) { ProcessDMSBuffer( buf ); } } mDMSItemsProcessed = count; } } break; } case eQMI_SVC_NAS: { cQMIProtocolServer * pNAS = GetServer( eQMI_SVC_NAS ); if (pNAS != 0) { // Grab the NAS log from the server const cProtocolLog & logNAS = pNAS->GetLog(); // New NAS items to process? count = logNAS.GetCount(); if (count != INVALID_LOG_INDEX && count > mNASItemsProcessed) { for (ULONG i = mNASItemsProcessed; i < count; i++) { sProtocolBuffer buf = logNAS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_NAS_RX) ) { ProcessNASBuffer( buf ); } } mNASItemsProcessed = count; } } break; } case eQMI_SVC_WMS: { cQMIProtocolServer * pWMS = GetServer( eQMI_SVC_WMS ); if (pWMS != 0) { // Grab the WMS log from the server const cProtocolLog & logWMS = pWMS->GetLog(); // New WMS items to process? count = logWMS.GetCount(); if (count != INVALID_LOG_INDEX && count > mWMSItemsProcessed) { for (ULONG i = mWMSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logWMS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_WMS_RX) ) { ProcessWMSBuffer( buf ); } } mWMSItemsProcessed = count; } } break; } case eQMI_SVC_PDS: { cQMIProtocolServer * pPDS = GetServer( eQMI_SVC_PDS ); if (pPDS != 0) { // Grab the PDS log from the server const cProtocolLog & logPDS = pPDS->GetLog(); // New PDS items to process? count = logPDS.GetCount(); if (count != INVALID_LOG_INDEX && count > mPDSItemsProcessed) { for (ULONG i = mPDSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logPDS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_PDS_RX) ) { ProcessPDSBuffer( buf ); } } mPDSItemsProcessed = count; } } break; } case eQMI_SVC_CAT: { cQMIProtocolServer * pCAT = GetServer( eQMI_SVC_CAT ); if (pCAT != 0) { // Grab the CAT log from the server const cProtocolLog & logCAT = pCAT->GetLog(); // New CAT items to process? count = logCAT.GetCount(); if (count != INVALID_LOG_INDEX && count > mCATItemsProcessed) { for (ULONG i = mCATItemsProcessed; i < count; i++) { sProtocolBuffer buf = logCAT.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_CAT_RX) ) { ProcessCATBuffer( buf ); } } mCATItemsProcessed = count; } } break; } case eQMI_SVC_OMA: { cQMIProtocolServer * pOMA = GetServer( eQMI_SVC_OMA ); if (pOMA != 0) { // Grab the OMA log from the server const cProtocolLog & logOMA = pOMA->GetLog(); // New OMA items to process? count = logOMA.GetCount(); if (count != INVALID_LOG_INDEX && count > mOMAItemsProcessed) { for (ULONG i = mOMAItemsProcessed; i < count; i++) { sProtocolBuffer buf = logOMA.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_OMA_RX) ) { ProcessOMABuffer( buf ); } } mOMAItemsProcessed = count; } } break; } case eQMI_SVC_VOICE: { cQMIProtocolServer * pVoice = GetServer( eQMI_SVC_VOICE ); if (pVoice != 0) { // Grab the voice log from the server const cProtocolLog & logVoice = pVoice->GetLog(); // New voice items to process? count = logVoice.GetCount(); if (count != INVALID_LOG_INDEX && count > mVoiceItemsProcessed) { for (ULONG i = mVoiceItemsProcessed; i < count; i++) { sProtocolBuffer buf = logVoice.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_VOICE_RX) ) { ProcessVoiceBuffer( buf ); } } mVoiceItemsProcessed = count; } } break; } default: break; } } /*=========================================================================== METHOD: ProcessWDSBuffer (Internal Method) DESCRIPTION: Process a WDS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessWDSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == eQMI_WDS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out data bearer technology sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_IND, msgID, 23 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNDataBearer != 0) { cDataBearerCallback * pCB = 0; pCB = new cDataBearerCallback( mpFNDataBearer, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out dormancy status tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 24 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNDormancyStatus != 0) { cDormancyStatusCallback * pCB = 0; pCB = new cDormancyStatusCallback( mpFNDormancyStatus, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out byte totals tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 25 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { ULONGLONG tx = pf[0].mValue.mU64; ULONGLONG rx = ULLONG_MAX; tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 26 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { rx = pf[0].mValue.mU64; } if (mpFNByteTotals != 0) { cByteTotalsCallback * pCB = 0; pCB = new cByteTotalsCallback( mpFNByteTotals, tx, rx ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out mobile IP status tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 27 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNMobileIPStatus != 0) { cMobileIPStatusCallback * pCB = 0; pCB = new cMobileIPStatusCallback( mpFNMobileIPStatus, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } else if (msgID == eQMI_WDS_PKT_STATUS_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out session status sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_IND, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { ULONG ss = pf[0].mValue.mU32; ULONG cer = ULONG_MAX; // Parse out call end reason (if present) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 16 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { cer = pf[0].mValue.mU32; } if (mpFNSessionState != 0) { cSessionStateCallback * pCB = 0; pCB = new cSessionStateCallback( mpFNSessionState, ss, cer ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessDMSBuffer (Internal Method) DESCRIPTION: Process a DMS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessDMSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == eQMI_DMS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out activation status sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_IND, msgID, 19 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNActivationStatus != 0) { cActivationStatusCallback * pCB = 0; pCB = new cActivationStatusCallback( mpFNActivationStatus, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } // Parse out operating mode tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_IND, msgID, 20 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNPower != 0) { cPowerCallback * pCB = 0; pCB = new cPowerCallback( mpFNPower, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } // Parse out wireless disable state tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_IND, msgID, 22 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNWirelessDisable != 0) { cWirelessDisableCallback * pCB = 0; pCB = new cWirelessDisableCallback( mpFNWirelessDisable, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } /*=========================================================================== METHOD: ProcessNASBuffer (Internal Method) DESCRIPTION: Process a NAS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessNASBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_NAS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse signal strength sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2) { INT8 sigVal = pf[0].mValue.mS8; ULONG radioVal = pf[1].mValue.mU32; bool bValidSig = (sigVal <= -30 && sigVal > -125 && radioVal != 0); if (bValidSig == true && mpFNSignalStrength != 0) { cSignalStrengthCallback * pCB = 0; pCB = new cSignalStrengthCallback( mpFNSignalStrength, pf[0].mValue.mS8, pf[1].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out RF info sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_IND, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( mDB, buf, tlvs, tlvKey2 ); ULONG fieldCount = (ULONG)pf2.size(); if (fieldCount >= 1 && mpFNRFInfo != 0) { BYTE ifaceCount = pf2[0].mValue.mU8; if (fieldCount >= 1 + ((ULONG)ifaceCount * 3)) { for (BYTE i = 0; i < ifaceCount; i++) { ULONG offset = 3 * (ULONG)i; cRFInfoCallback * pCB = 0; pCB = new cRFInfoCallback( mpFNRFInfo, pf2[offset + 1].mValue.mU32, pf2[offset + 2].mValue.mU32, (ULONG)pf2[offset + 3].mValue.mU16 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } // Parse out LU reject sProtocolEntityKey tlvKey3( eDB2_ET_QMI_NAS_IND, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( mDB, buf, tlvs, tlvKey3 ); if (pf3.size() >= 2 && mpFNLUReject != 0) { cLURejectCallback * pCB = 0; pCB = new cLURejectCallback( mpFNLUReject, pf3[0].mValue.mU32, (ULONG)pf3[1].mValue.mU16 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } else if (msgID == (ULONG)eQMI_NAS_SS_INFO_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out roaming indicator sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_IND, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( mDB, buf, tlvs, tlvKey1 ); if (pf1.size() >= 1) { if (mpFNRoamingIndicator != 0) { cRoamingIndicatorCallback * pCB = 0; pCB = new cRoamingIndicatorCallback( mpFNRoamingIndicator, pf1[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out data capabilities sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_IND, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( mDB, buf, tlvs, tlvKey2 ); if (pf2.size() >= 1) { BYTE activeDataCaps = pf2[0].mValue.mU8; if (pf2.size() >= 1 + (ULONG)activeDataCaps) { ULONG caps[12] = { 0 }; if (activeDataCaps > 12) { activeDataCaps = 12; } for (ULONG d = 0; d < activeDataCaps; d++) { caps[d] = pf2[1 + d].mValue.mU32; } if (mpFNDataCapabilities != 0) { cDataCapabilitiesCallback * pCB = 0; pCB = new cDataCapabilitiesCallback( mpFNDataCapabilities, activeDataCaps, &caps[0] ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } else if (msgID == (ULONG)eQMI_NAS_PLMN_MODE_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse PLMN mode sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { cPLMNModeCallback * pCB = 0; pCB = new cPLMNModeCallback( mpPLMNMode, (ULONG)pf[0].mValue.mU8 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } /*=========================================================================== METHOD: ProcessWMSBuffer (Internal Method) DESCRIPTION: Process a WDS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessWMSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_WMS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2) { if (mpFNNewSMS != 0) { cNewSMSCallback * pCB = 0; pCB = new cNewSMSCallback( mpFNNewSMS, pf[0].mValue.mU32, pf[1].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessPDSBuffer (Internal Method) DESCRIPTION: Process a PDS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessPDSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_PDS_EVENT_IND) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNNewNMEA != 0) { cNewNMEACallback * pCB = 0; pCB = new cNewNMEACallback( mpFNNewNMEA, pf[0].mValueString ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } else if (msgID == (ULONG)eQMI_PDS_STATE_IND) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_IND, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2 && mpFNPDSState != 0) { cPDSStateCallback * pCB = 0; pCB = new cPDSStateCallback( mpFNPDSState, pf[0].mValue.mU32, pf[1].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } /*=========================================================================== METHOD: ProcessCATBuffer (Internal Method) DESCRIPTION: Process a CAT buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessCATBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_CAT_EVENT_IND && mpFNCATEvent != 0) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); ULONG tlvCount = (ULONG)tlvs.size(); for (ULONG t = 0; t < tlvCount; t++) { const sDB2NavInput tlv = tlvs[t]; if (tlv.mKey.size() == 3) { cCATEventCallback * pCB = 0; pCB = new cCATEventCallback( mpFNCATEvent, tlv.mKey[2], tlv.mPayloadLen, tlv.mpPayload ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessOMABuffer (Internal Method) DESCRIPTION: Process an OMA buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessOMABuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_OMA_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out NIA sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2) { if (mpFNOMADMAlert != 0) { cOMADMAlertCallback * pCB = 0; pCB = new cOMADMAlertCallback( mpFNOMADMAlert, pf[0].mValue.mU32, pf[1].mValue.mU16 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out failure reason (may not be present) ULONG failureReason = ULONG_MAX; tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_IND, msgID, 18 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { failureReason = pf[0].mValue.mU32; } // Parse out state tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_IND, msgID, 17 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNOMADMState != 0) { cOMADMStateCallback * pCB = 0; pCB = new cOMADMStateCallback( mpFNOMADMState, pf[0].mValue.mU32, failureReason ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessVoiceBuffer (Internal Method) DESCRIPTION: Process a voice buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessVoiceBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_VOICE_USSD_RELEASE_IND && mpFNUSSDRelease != 0) { cUSSDReleaseCallback * pCB = 0; pCB = new cUSSDReleaseCallback( mpFNUSSDRelease ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } else if (msgID == (ULONG)eQMI_VOICE_USSD_IND && mpFNUSSDNotification != 0) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); std::map tlvMap; tlvMap = qmiBuf.GetContents(); // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_VOICE_IND, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { const BYTE * pUSSData = 0; std::map ::const_iterator pIter; pIter = tlvMap.find( 16 ); if (pIter != tlvMap.end()) { const sQMIRawContentHeader * pHdr = pIter->second; ULONG len = (ULONG)pHdr->mLength; if (len >= (ULONG)2) { const BYTE * pData = (const BYTE *)++pHdr; if (len >= (ULONG)pData[1] + (ULONG)2) { pUSSData = pData; } } } cUSSDNotificationCallback * pCB = 0; pCB = new cUSSDNotificationCallback( mpFNUSSDNotification, pf[0].mValue.mU32, pUSSData ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } else if ( (msgID == (ULONG)eQMI_VOICE_ASYNC_USSD_IND) && (mpFNUSSDOrigination != 0) ) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); std::map tlvMap; tlvMap = qmiBuf.GetContents(); ULONG ec = ULONG_MAX; ULONG fc = ULONG_MAX; // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_VOICE_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { ec = pf[0].mValue.mU32; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_VOICE_IND, msgID, 17 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { fc = pf[0].mValue.mU32; } const BYTE * pNetworkInfo = 0; std::map ::const_iterator pIter; pIter = tlvMap.find( 18 ); if (pIter != tlvMap.end()) { const sQMIRawContentHeader * pHdr = pIter->second; ULONG len = (ULONG)pHdr->mLength; if (len >= (ULONG)2) { const BYTE * pData = (const BYTE *)++pHdr; if (len >= (ULONG)pData[1] + (ULONG)2) { pNetworkInfo = pData; } } } const BYTE * pAlpha = 0; pIter = tlvMap.find( 19 ); if (pIter != tlvMap.end()) { const sQMIRawContentHeader * pHdr = pIter->second; ULONG len = (ULONG)pHdr->mLength; if (len >= (ULONG)2) { const BYTE * pData = (const BYTE *)++pHdr; if (len >= (ULONG)pData[1] + (ULONG)2) { pAlpha = pData; } } } cUSSDOriginationCallback * pCB = 0; pCB = new cUSSDOriginationCallback( mpFNUSSDOrigination, ec, fc, pNetworkInfo, pAlpha ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified (or first detected) Gobi device PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Connect( LPCSTR pDeviceNode, LPCSTR pDeviceKey ) { // Assume failure bool bRC = cGobiQMICore::Connect( pDeviceNode, pDeviceKey ); if (bRC == true) { // Clear mExitEvent; mExitEvent.Clear(); pthread_create( &mThreadID, NULL, TrafficProcessThread, this ); mbThreadStarted = true; } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Disconnect() { // Clear all callback function pointers (no need to turn them off at // the device as we are about to tear-down each QMI service client) mpFNSessionState = 0; mpFNByteTotals = 0; mpFNDataCapabilities = 0; mpFNDataBearer = 0; mpFNDormancyStatus = 0; mpFNMobileIPStatus = 0; mpFNActivationStatus = 0; mpFNPower = 0; mpFNWirelessDisable = 0; mpFNRoamingIndicator = 0; mpFNSignalStrength = 0; mpFNRFInfo = 0; mpFNLUReject = 0; mpPLMNMode = 0; mpFNNewSMS = 0; mpFNNewNMEA = 0; mpFNPDSState = 0; mpFNCATEvent = 0; mpFNOMADMAlert = 0; mpFNOMADMState = 0; mpFNUSSDRelease = 0; mpFNUSSDNotification = 0; mpFNUSSDOrigination = 0; // Exit traffic processing thread if (mbThreadStarted == true) { // Signal thread to exit mExitEvent.Set( 0 ); // If we are not being called from the thread itself then wait for // it to exit, if not then it will have to exit automatically if (pthread_self() != mThreadID) { if (mThreadID != 0) { pthread_join( mThreadID, NULL ); } } } // Clear out thread handle/ID mbThreadStarted = false; mThreadID = 0; bool bRC = cGobiQMICore::Disconnect(); // Servers reset server logs so we need to reset our counters mWDSItemsProcessed = 0; mDMSItemsProcessed = 0; mNASItemsProcessed = 0; mWMSItemsProcessed = 0; mPDSItemsProcessed = 0; mCATItemsProcessed = 0; mOMAItemsProcessed = 0; mVoiceItemsProcessed = 0; return bRC; } /*=========================================================================== METHOD: SetSessionStateCallback (Public Method) DESCRIPTION: Enable/disable session state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetSessionStateCallback( tFNSessionState pCallback ) { // We don't have to register for anything so a simple assignment works mpFNSessionState = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetByteTotalsCallback DESCRIPTION: This function enables/disables the RX/TX byte counts callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) interval [ I ] - Interval in seconds (ignored when disabling) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNByteTotals == 0); bool bOff = (pCallback == 0 && mpFNByteTotals != 0); bool bReplace = (pCallback != 0 && mpFNByteTotals != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); if (bOn == true) { std::ostringstream tmp; tmp << (ULONG)interval << " 0 0 0 0 0 0 1 1"; sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0 0 0 0 0 0 0 0 0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNByteTotals = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNByteTotals = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetDataCapabilitiesCallback (Public Method) DESCRIPTION: Enables/disables the serving system data capabilities callback PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Corrected error code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ) { // We don't have to register for anything so a simple assignment works mpFNDataCapabilities = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetDataBearerCallback (Public Method) DESCRIPTION: Enable/disable data bearer callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return cod ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetDataBearerCallback( tFNDataBearer pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNDataBearer == 0); bool bOff = (pCallback == 0 && mpFNDataBearer != 0); bool bReplace = (pCallback != 0 && mpFNDataBearer != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNDataBearer = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNDataBearer = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetDormancyStatusCallback (Public Method) DESCRIPTION: Enable/disable dormancy status callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetDormancyStatusCallback( tFNDormancyStatus pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNDormancyStatus == 0); bool bOff = (pCallback == 0 && mpFNDormancyStatus != 0); bool bReplace = (pCallback != 0 && mpFNDormancyStatus != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNDormancyStatus = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNDormancyStatus = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetMobileIPStatusCallback (Public Method) DESCRIPTION: Enable/disable mobile IP status callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetMobileIPStatusCallback( tFNMobileIPStatus pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNMobileIPStatus == 0); bool bOff = (pCallback == 0 && mpFNMobileIPStatus != 0); bool bReplace = (pCallback != 0 && mpFNMobileIPStatus != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNMobileIPStatus = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNMobileIPStatus = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetActivationStatusCallback (Public Method) DESCRIPTION: Enable/disable activation status callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetActivationStatusCallback( tFNActivationStatus pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNActivationStatus == 0); bool bOff = (pCallback == 0 && mpFNActivationStatus != 0); bool bReplace = (pCallback != 0 && mpFNActivationStatus != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_DMS; WORD msgID = (WORD)eQMI_DMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 19 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNActivationStatus = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNActivationStatus = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetPowerCallback (Public Method) DESCRIPTION: Enable/disable power operating mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetPowerCallback( tFNPower pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNPower == 0); bool bOff = (pCallback == 0 && mpFNPower != 0); bool bReplace = (pCallback != 0 && mpFNPower != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_DMS; WORD msgID = (WORD)eQMI_DMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 20 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNPower = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNPower = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetWirelessDisableCallback (Public Method) DESCRIPTION: Enable/disable wireless disable state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetWirelessDisableCallback( tFNWirelessDisable pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNWirelessDisable == 0); bool bOff = (pCallback == 0 && mpFNWirelessDisable != 0); bool bReplace = (pCallback != 0 && mpFNWirelessDisable != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_DMS; WORD msgID = (WORD)eQMI_DMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 22 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNWirelessDisable = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNWirelessDisable = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetRoamingIndicatorCallback (Public Method) DESCRIPTION: Enable/disable roaming indicator callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Corrected error code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ) { // We don't have to register for anything so a simple assignment works mpFNRoamingIndicator = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSignalStrengthCallback (Public Method) DESCRIPTION: Enable/disable signal strength callback function PARAMETERS: pCallback [ I ] - Callback function thresholds [ I ] - Desired threholds (only valid when enabling) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetSignalStrengthCallback( tFNSignalStrength pCallback, std::list thresholds ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Grab number of thresholds ULONG thresholdCount = (ULONG)thresholds.size(); // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNSignalStrength == 0); if (bOn == true && thresholdCount == 0) { rc = eGOBI_ERR_INVALID_ARG; return rc; } bool bOff = (pCallback == 0 && mpFNSignalStrength != 0); if (bOff == true && thresholdCount != 0) { rc = eGOBI_ERR_INVALID_ARG; return rc; } bool bReplace = (pCallback != 0 && mpFNSignalStrength != 0); if (bReplace == true && thresholdCount == 0) { rc = eGOBI_ERR_INVALID_ARG; return rc; } eQMIService svc = eQMI_SVC_NAS; WORD msgID = (WORD)eQMI_NAS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); if (bOn == true || bOff == true || bReplace == true) { if (bOn == true || bReplace == true) { std::ostringstream args; args << "1 " << (UINT)thresholdCount; std::list ::const_iterator pThreshold = thresholds.begin(); while (pThreshold != thresholds.end()) { INT8 t = *pThreshold++; args << " " << (INT)t; } sDB2PackingInput pi( pek, (LPCSTR)args.str().c_str() ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0 0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true || bReplace == true) { mpFNSignalStrength = pCallback; } } else { // Turning it off redundantly if (thresholdCount != 0) { rc = eGOBI_ERR_INVALID_ARG; } else { rc = eGOBI_ERR_NONE; } } return rc; } /*=========================================================================== METHOD: SetRFInfoCallback (Public Method) DESCRIPTION: Enable/disable RF information callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetRFInfoCallback( tFNRFInfo pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNRFInfo == 0); bool bOff = (pCallback == 0 && mpFNRFInfo != 0); bool bReplace = (pCallback != 0 && mpFNRFInfo != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_NAS; WORD msgID = (WORD)eQMI_NAS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 17 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNRFInfo = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNRFInfo = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetLURejectCallback (Public Method) DESCRIPTION: Enable/disable LU reject callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetLURejectCallback( tFNLUReject pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNLUReject == 0); bool bOff = (pCallback == 0 && mpFNLUReject != 0); bool bReplace = (pCallback != 0 && mpFNLUReject != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_NAS; WORD msgID = (WORD)eQMI_NAS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 18 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNLUReject = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNLUReject = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetPLMNModeCallback (Public Method) DESCRIPTION: Enable/disable PLMN mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetPLMNModeCallback( tFNPLMNMode pCallback ) { // We don't have to register for anything so a simple assignment works mpPLMNMode = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetNewSMSCallback (Public Method) DESCRIPTION: Enable/disable new SMS callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetNewSMSCallback( tFNNewSMS pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNNewSMS == 0); bool bOff = (pCallback == 0 && mpFNNewSMS != 0); bool bReplace = (pCallback != 0 && mpFNNewSMS != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WMS; WORD msgID = (WORD)eQMI_WMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNNewSMS = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNNewSMS = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetNMEACallback (Public Method) DESCRIPTION: Enable/disable new NMEA sentence function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetNMEACallback( tFNNewNMEA pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNNewNMEA == 0); bool bOff = (pCallback == 0 && mpFNNewNMEA != 0); bool bReplace = (pCallback != 0 && mpFNNewNMEA != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_PDS; WORD msgID = (WORD)eQMI_PDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNNewNMEA = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNNewNMEA = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetPDSStateCallback (Public Method) DESCRIPTION: Enable/disable PDS service state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetPDSStateCallback( tFNPDSState pCallback ) { // We don't have to register for anything so a simple assignment works mpFNPDSState = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetCATEventCallback (Public Method) DESCRIPTION: This function enables/disables the CAT event callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) eventMask [ I ] - Bitmask of CAT events to register for pErrorMask [ O ] - Error bitmask RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ) { // Assume failure eGobiError retCode = eGOBI_ERR_GENERAL; *pErrorMask = ULONG_MAX; // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNCATEvent == 0); bool bOff = (pCallback == 0 && mpFNCATEvent != 0); bool bReplace = (pCallback != 0 && mpFNCATEvent != 0); if (bOn == true || bOff == true || bReplace == true) { const ULONG szTLVHdr = (ULONG)sizeof( sQMIRawContentHeader ); const ULONG szData = (ULONG)sizeof( ULONG ); BYTE buf[szTLVHdr + szData]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&buf[0]; pTLV->mTypeID = 16; pTLV->mLength = (WORD)szData; ULONG * pData = (ULONG *)&buf[szTLVHdr]; *pData = eventMask; if (bOff == true) { // Ignore event mask argument when disabling the callback *pData = 0; // We also always clear the callback regardless of the response mpFNCATEvent = pCallback; } sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_CAT, (WORD)eQMI_CAT_SET_EVENT, false, false, &buf[0], szTLVHdr + szData ); sProtocolBuffer rsp = Send( eQMI_SVC_CAT, pReq ); if (rsp.IsValid() == false) { retCode = GetCorrectedLastError(); return retCode; } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { retCode = eGOBI_ERR_MALFORMED_RSP; return retCode; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { retCode = eGOBI_ERR_MALFORMED_RSP; return retCode; } else if (rc != 0) { // Parse out the error mask? if (qmiRsp.GetMessageID() == (ULONG)eQMI_CAT_SET_EVENT) { std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr->mLength > 4) { pData = (ULONG *)++pHdr; *pErrorMask = *pData; } } } retCode = GetCorrectedQMIError( ec ); return retCode; } // Success! mpFNCATEvent = pCallback; retCode = eGOBI_ERR_NONE; } else { // Turning it off redundantly retCode = eGOBI_ERR_NONE; } return retCode; } /*=========================================================================== METHOD: SetOMADMAlertCallback (Public Method) DESCRIPTION: This function enables/disables the OMA-DM network initiated alert callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetOMADMAlertCallback( tFNOMADMAlert pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNOMADMAlert == 0); bool bOff = (pCallback == 0 && mpFNOMADMAlert != 0); bool bReplace = (pCallback != 0 && mpFNOMADMAlert != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_OMA; WORD msgID = (WORD)eQMI_OMA_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNOMADMAlert = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNOMADMAlert = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetOMADMStateCallback (Public Method) DESCRIPTION: This function enables/disables the OMA-DM state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetOMADMStateCallback( tFNOMADMState pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNOMADMState == 0); bool bOff = (pCallback == 0 && mpFNOMADMState != 0); bool bReplace = (pCallback != 0 && mpFNOMADMState != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_OMA; WORD msgID = (WORD)eQMI_OMA_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 17 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNOMADMState = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNOMADMState = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetUSSDReleaseCallback (Public Method) DESCRIPTION: Enable/disable USSD release callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetUSSDReleaseCallback( tFNUSSDRelease pCallback ) { // We don't have to register for anything so a simple assignment works mpFNUSSDRelease = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetUSSDNotificationCallback (Public Method) DESCRIPTION: Enable/disable USSD notification callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetUSSDNotificationCallback( tFNUSSDNotification pCallback ) { // We don't have to register for anything so a simple assignment works mpFNUSSDNotification = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetUSSDOriginationCallback (Public Method) DESCRIPTION: Enable/disable USSD origination callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ) { // We don't have to register for anything so a simple assignment works mpFNUSSDOrigination = pCallback; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiConnectionMgmt/GobiConnectionMgmt.h000077500000000000000000001135551455567757300270240ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.h DESCRIPTION: QUALCOMM Connection Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- extern "C" { // Session state callback function typedef void (* tFNSessionState)( ULONG state, ULONG sessionEndReason ); // RX/TX byte counts callback function typedef void (* tFNByteTotals)( ULONGLONG totalBytesTX, ULONGLONG totalBytesRX ); // Dormancy status callback function typedef void (* tFNDormancyStatus)( ULONG dormancyStatus ); // Mobile IP status callback function typedef void (* tFNMobileIPStatus)( ULONG mipStatus ); // Activation status callback function typedef void (* tFNActivationStatus)( ULONG activationStatus ); // Power operating mode callback function typedef void (* tFNPower)( ULONG operatingMode ); // Wireless disable callback function typedef void (* tFNWirelessDisable)( ULONG bState ); // Serving system data capabilities callback function typedef void (* tFNDataCapabilities)( BYTE dataCapsSize, BYTE * pDataCaps ); // Data bearer technology callback function typedef void (* tFNDataBearer)( ULONG dataBearer ); // Roaming indicator callback function typedef void (* tFNRoamingIndicator)( ULONG roaming ); // Signal strength callback function typedef void (* tFNSignalStrength)( INT8 signalStrength, ULONG radioInterface ); // RF information callback function typedef void (* tFNRFInfo)( ULONG radioInterface, ULONG activeBandClass, ULONG activeChannel ); // LU reject callback function typedef void (* tFNLUReject)( ULONG serviceDomain, ULONG rejectCause ); // PLMN mode callback function typedef void (* tFNPLMNMode)( ULONG mode ); // New SMS message callback function typedef void (* tFNNewSMS)( ULONG storageType, ULONG messageIndex ); // New NMEA sentence callback function typedef void (* tFNNewNMEA)( LPCSTR pNMEA ); // PDS session state callback function typedef void (* tFNPDSState)( ULONG enabledStatus, ULONG trackingStatus ); // CAT event callback function typedef void (* tFNCATEvent)( ULONG eventID, ULONG eventLen, BYTE * pEventData ); // OMA-DM network initiated alert callback function typedef void (* tFNOMADMAlert)( ULONG sessionType, USHORT sessionID ); // OMA-DM state callback function typedef void (* tFNOMADMState)( ULONG sessionState, ULONG failureReason ); // USSD release callback function typedef void (* tFNUSSDRelease)(); // USSD notification callback function typedef void (* tFNUSSDNotification)( ULONG type, BYTE * pNetworkInfo ); // USSD origination callback function typedef void (* tFNUSSDOrigination)( ULONG errorCode, ULONG failureCause, BYTE * pNetworkInfo, BYTE * pAlpha ); }; // CallbackThread prototype // Thread to execute a callback asynchronously void * CallbackThread( PVOID pArg ); /*=========================================================================*/ // Class cGobiCMCallback /*=========================================================================*/ class cGobiCMCallback { public: // (Inline) Constructor cGobiCMCallback() { }; // (Inline) Destructor virtual ~cGobiCMCallback() { }; // (Inline) Initialize the callback object by starting the thread bool Initialize() { // Start the thread pthread_t threadID; pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); int nRC = pthread_create( &threadID, &attributes, CallbackThread, this ); if (nRC == 0) { // Success! return true; } return false; }; protected: // Call the function virtual void Call() = 0; // Function thread gets full access friend void * CallbackThread( PVOID pArg ); }; /*=========================================================================*/ // Class cSessionStateCallback /*=========================================================================*/ class cSessionStateCallback : public cGobiCMCallback { public: // (Inline) Constructor cSessionStateCallback( tFNSessionState pCallback, ULONG state, ULONG sessionEndReason ) : mpCallback( pCallback ), mState( state ), mSessionEndReason( sessionEndReason ) { }; // (Inline) Destructor virtual ~cSessionStateCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mState, mSessionEndReason ); } }; /* Callback function */ tFNSessionState mpCallback; /* Callback arguments */ ULONG mState; ULONG mSessionEndReason; }; /*=========================================================================*/ // Class cByteTotalsCallback /*=========================================================================*/ class cByteTotalsCallback : public cGobiCMCallback { public: // (Inline) Constructor cByteTotalsCallback( tFNByteTotals pCallback, ULONGLONG totalBytesTX, ULONGLONG totalBytesRX ) : mpCallback( pCallback ), mTotalBytesTX( totalBytesTX ), mTotalBytesRX( totalBytesRX ) { }; // (Inline) Destructor virtual ~cByteTotalsCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mTotalBytesTX, mTotalBytesRX ); } }; /* Callback function */ tFNByteTotals mpCallback; /* Callback arguments */ ULONGLONG mTotalBytesTX; ULONGLONG mTotalBytesRX; }; /*=========================================================================*/ // Class cDormancyStatusCallback /*=========================================================================*/ class cDormancyStatusCallback : public cGobiCMCallback { public: // (Inline) Constructor cDormancyStatusCallback( tFNDormancyStatus pCallback, ULONG dormancyStatus ) : mpCallback( pCallback ), mDormancyStatus( dormancyStatus ) { }; // (Inline) Destructor virtual ~cDormancyStatusCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mDormancyStatus ); } }; /* Callback function */ tFNDormancyStatus mpCallback; /* Callback arguments */ ULONG mDormancyStatus; }; /*=========================================================================*/ // Class cMobileIPStatusCallback /*=========================================================================*/ class cMobileIPStatusCallback : public cGobiCMCallback { public: // (Inline) Constructor cMobileIPStatusCallback( tFNMobileIPStatus pCallback, ULONG mobileIPStatus ) : mpCallback( pCallback ), mMobileIPStatus( mobileIPStatus ) { }; // (Inline) Destructor virtual ~cMobileIPStatusCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mMobileIPStatus ); } }; /* Callback function */ tFNMobileIPStatus mpCallback; /* Callback arguments */ ULONG mMobileIPStatus; }; /*=========================================================================*/ // Class cActivationStatusCallback /*=========================================================================*/ class cActivationStatusCallback : public cGobiCMCallback { public: // (Inline) Constructor cActivationStatusCallback( tFNActivationStatus pCallback, ULONG activationStatus ) : mpCallback( pCallback ), mActivationStatus( activationStatus ) { }; // (Inline) Destructor virtual ~cActivationStatusCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mActivationStatus ); } }; /* Callback function */ tFNActivationStatus mpCallback; /* Callback arguments */ ULONG mActivationStatus; }; /*=========================================================================*/ // Class cPowerCallback /*=========================================================================*/ class cPowerCallback : public cGobiCMCallback { public: // (Inline) Constructor cPowerCallback( tFNPower pCallback, ULONG operatingMode ) : mpCallback( pCallback ), mOperatingMode( operatingMode ) { }; // (Inline) Destructor virtual ~cPowerCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mOperatingMode ); } }; /* Callback function */ tFNPower mpCallback; /* Callback arguments */ ULONG mOperatingMode; }; /*=========================================================================*/ // Class cWirelessDisableCallback /*=========================================================================*/ class cWirelessDisableCallback : public cGobiCMCallback { public: // (Inline) Constructor cWirelessDisableCallback( tFNWirelessDisable pCallback, ULONG bState ) : mpCallback( pCallback ), mbState( bState ) { }; // (Inline) Destructor virtual ~cWirelessDisableCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mbState ); } }; /* Callback function */ tFNWirelessDisable mpCallback; /* Callback arguments */ ULONG mbState; }; /*=========================================================================*/ // Class cDataCapabilitiesCallback /*=========================================================================*/ class cDataCapabilitiesCallback : public cGobiCMCallback { public: // (Inline) Constructor cDataCapabilitiesCallback( tFNDataCapabilities pCallback, BYTE dataCapsSize, ULONG * pDataCaps ) : mpCallback( pCallback ), mDataCapsSize( dataCapsSize ) { memset( (LPVOID)&mDataCaps[0], 0, 12 * sizeof( ULONG ) ); if (mDataCapsSize > 12) { mDataCapsSize = 12; } for (ULONG d = 0; d < mDataCapsSize; d++) { mDataCaps[d] = pDataCaps[d]; } }; // (Inline) Destructor virtual ~cDataCapabilitiesCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mDataCapsSize, (BYTE *)&mDataCaps[0] ); } }; /* Callback function */ tFNDataCapabilities mpCallback; /* Callback arguments */ BYTE mDataCapsSize; ULONG mDataCaps[12]; }; /*=========================================================================*/ // Class cDataBearerCallback /*=========================================================================*/ class cDataBearerCallback : public cGobiCMCallback { public: // (Inline) Constructor cDataBearerCallback( tFNDataBearer pCallback, ULONG dataBearer ) : mpCallback( pCallback ), mDataBearer( dataBearer ) { }; // (Inline) Destructor virtual ~cDataBearerCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mDataBearer ); } }; /* Callback function */ tFNDataBearer mpCallback; /* Callback arguments */ ULONG mDataBearer; }; /*=========================================================================*/ // Class cRoamingIndicatorCallback /*=========================================================================*/ class cRoamingIndicatorCallback : public cGobiCMCallback { public: // (Inline) Constructor cRoamingIndicatorCallback( tFNRoamingIndicator pCallback, ULONG roaming ) : mpCallback( pCallback ), mRoaming( roaming ) { }; // (Inline) Destructor virtual ~cRoamingIndicatorCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mRoaming ); } }; /* Callback function */ tFNRoamingIndicator mpCallback; /* Callback arguments */ ULONG mRoaming; }; /*=========================================================================*/ // Class cSignalStrengthCallback /*=========================================================================*/ class cSignalStrengthCallback : public cGobiCMCallback { public: // (Inline) Constructor cSignalStrengthCallback( tFNSignalStrength pCallback, INT8 signalStrength, ULONG radioInterface ) : mpCallback( pCallback ), mSignalStrength( signalStrength ), mRadioInterface( radioInterface ) { }; // (Inline) Destructor virtual ~cSignalStrengthCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mSignalStrength, mRadioInterface ); } }; /* Callback function */ tFNSignalStrength mpCallback; /* Callback arguments */ INT8 mSignalStrength; ULONG mRadioInterface; }; /*=========================================================================*/ // Class cRFInfoCallback /*=========================================================================*/ class cRFInfoCallback : public cGobiCMCallback { public: // (Inline) Constructor cRFInfoCallback( tFNRFInfo pCallback, ULONG radioInterface, ULONG activeBandClass, ULONG activeChannel ) : mpCallback( pCallback ), mRadioInterface( radioInterface ), mActiveBandClass( activeBandClass ), mActiveChannel( activeChannel ) { }; // (Inline) Destructor virtual ~cRFInfoCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mRadioInterface, mActiveBandClass, mActiveChannel ); } }; /* Callback function */ tFNRFInfo mpCallback; /* Callback arguments */ ULONG mRadioInterface; ULONG mActiveBandClass; ULONG mActiveChannel; }; /*=========================================================================*/ // Class cLURejectCallback /*=========================================================================*/ class cLURejectCallback : public cGobiCMCallback { public: // (Inline) Constructor cLURejectCallback( tFNLUReject pCallback, ULONG serviceDomain, ULONG rejectCause ) : mpCallback( pCallback ), mServiceDomain( serviceDomain ), mRejectCause( rejectCause ) { }; // (Inline) Destructor virtual ~cLURejectCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mServiceDomain, mRejectCause ); } }; /* Callback function */ tFNLUReject mpCallback; /* Callback arguments */ ULONG mServiceDomain; ULONG mRejectCause; }; /*=========================================================================*/ // Class cPLMNModeCallback /*=========================================================================*/ class cPLMNModeCallback : public cGobiCMCallback { public: // (Inline) Constructor cPLMNModeCallback( tFNPLMNMode pCallback, ULONG mode ) : mpCallback( pCallback ), mMode( mode ) { }; // (Inline) Destructor virtual ~cPLMNModeCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mMode ); } }; /* Callback function */ tFNPLMNMode mpCallback; /* Callback arguments */ ULONG mMode; }; /*=========================================================================*/ // Class cNewSMSCallback /*=========================================================================*/ class cNewSMSCallback : public cGobiCMCallback { public: // (Inline) Constructor cNewSMSCallback( tFNNewSMS pCallback, ULONG storageType, ULONG messageIndex ) : mpCallback( pCallback ), mStorageType( storageType ), mMessageIndex( messageIndex ) { }; // (Inline) Destructor virtual ~cNewSMSCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mStorageType, mMessageIndex ); } }; /* Callback function */ tFNNewSMS mpCallback; /* Callback arguments */ ULONG mStorageType; ULONG mMessageIndex; }; /*=========================================================================*/ // Class cNewNMEACallback /*=========================================================================*/ class cNewNMEACallback : public cGobiCMCallback { public: // (Inline) Constructor cNewNMEACallback( tFNNewNMEA pCallback, std::string & nmea ) : mpCallback( pCallback ) { memset( (LPVOID)&mNMEA[0], 0, 512 ); ULONG len = nmea.size(); if (len > 0 && len < 512) { memcpy( (LPVOID)&mNMEA[0], (LPCVOID)nmea.c_str(), (SIZE_T)len ); } }; // (Inline) Destructor virtual ~cNewNMEACallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0 && mNMEA[0] != 0) { mpCallback( &mNMEA[0] ); } }; /* Callback function */ tFNNewNMEA mpCallback; /* Callback arguments */ CHAR mNMEA[512]; }; /*=========================================================================*/ // Class cPDSStateCallback /*=========================================================================*/ class cPDSStateCallback : public cGobiCMCallback { public: // (Inline) Constructor cPDSStateCallback( tFNPDSState pCallback, ULONG enabledState, ULONG trackingState ) : mpCallback( pCallback ), mEnabledState( enabledState ), mTrackingState( trackingState ) { }; // (Inline) Destructor virtual ~cPDSStateCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mEnabledState, mTrackingState ); } }; /* Callback function */ tFNPDSState mpCallback; /* Callback arguments */ ULONG mTrackingState; ULONG mEnabledState; }; /*=========================================================================*/ // Class cCATEventCallback /*=========================================================================*/ class cCATEventCallback : public cGobiCMCallback { public: // (Inline) Constructor cCATEventCallback( tFNCATEvent pCallback, ULONG eventID, ULONG eventLen, const BYTE * pEventData ) : mpCallback( pCallback ), mEventID( eventID ), mEventLen( 0 ) { memset( (LPVOID)&mData[0], 0, 2048 ); if (pEventData != 0 && eventLen > 0 && eventLen < 2048) { mEventLen = eventLen; memcpy( (LPVOID)&mData[0], (LPCVOID)pEventData, (SIZE_T)eventLen ); } }; // (Inline) Destructor virtual ~cCATEventCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mEventID, mEventLen, &mData[0] ); } }; /* Callback function */ tFNCATEvent mpCallback; /* Callback arguments */ ULONG mEventID; ULONG mEventLen; BYTE mData[2048]; }; /*=========================================================================*/ // Class cOMADMAlertCallback /*=========================================================================*/ class cOMADMAlertCallback : public cGobiCMCallback { public: // (Inline) Constructor cOMADMAlertCallback( tFNOMADMAlert pCallback, ULONG sessionType, USHORT sessionID ) : mpCallback( pCallback ), mSessionType( sessionType ), mSessionID( sessionID ) { }; // (Inline) Destructor virtual ~cOMADMAlertCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mSessionType, mSessionID ); } }; /* Callback function */ tFNOMADMAlert mpCallback; /* Callback arguments */ ULONG mSessionType; USHORT mSessionID; }; /*=========================================================================*/ // Class cOMADMStateCallback /*=========================================================================*/ class cOMADMStateCallback : public cGobiCMCallback { public: // (Inline) Constructor cOMADMStateCallback( tFNOMADMState pCallback, ULONG sessionState, ULONG failureReason ) : mpCallback( pCallback ), mSessionState( sessionState ), mFailureReason( failureReason ) { }; // (Inline) Destructor virtual ~cOMADMStateCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mSessionState, mFailureReason ); } }; /* Callback function */ tFNOMADMState mpCallback; /* Callback arguments */ ULONG mSessionState; ULONG mFailureReason; }; /*=========================================================================*/ // Class cUSSDReleaseCallback /*=========================================================================*/ class cUSSDReleaseCallback : public cGobiCMCallback { public: // (Inline) Constructor cUSSDReleaseCallback( tFNUSSDRelease pCallback ) : mpCallback( pCallback ) { }; // (Inline) Destructor virtual ~cUSSDReleaseCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback(); } }; /* Callback function */ tFNUSSDRelease mpCallback; }; /*=========================================================================*/ // Class cUSSDNotificationCallback /*=========================================================================*/ class cUSSDNotificationCallback : public cGobiCMCallback { public: // (Inline) Constructor cUSSDNotificationCallback( tFNUSSDNotification pCallback, ULONG type, const BYTE * pData ) : mpCallback( pCallback ), mType( type ), mbData( false ) { memset( (LPVOID)&mData[0], 0, 512 ); // Data to copy? if (pData != 0) { ULONG len = (ULONG)pData[1] + (ULONG)2; memcpy( (LPVOID)&mData[0], (LPCVOID)pData, (SIZE_T)len ); mbData = true; } }; // (Inline) Destructor virtual ~cUSSDNotificationCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { if (mbData == true) { mpCallback( mType, &mData[0] ); } else { mpCallback( mType, 0 ); } } }; /* Callback function */ tFNUSSDNotification mpCallback; /* Callback arguments */ ULONG mType; BYTE mData[512]; /* Did we get data? */ bool mbData; }; /*=========================================================================*/ // Class cUSSDOriginationCallback /*=========================================================================*/ class cUSSDOriginationCallback : public cGobiCMCallback { public: // (Inline) Constructor cUSSDOriginationCallback( tFNUSSDOrigination pCallback, ULONG errorCode, ULONG failureCause, const BYTE * pNetworkInfo, const BYTE * pAlpha ) : mpCallback( pCallback ), mErrorCode( errorCode ), mFailureCause( failureCause ), mbNetwork( false ), mbAlpha( 0 ) { memset( &mNetworkInfo[0], 0, 512 ); memset( &mAlpha[0], 0, 512 ); // Data to copy? if (pNetworkInfo != 0) { ULONG len = (ULONG)pNetworkInfo[1] + (ULONG)2; memcpy( &mNetworkInfo[0], pNetworkInfo, len ); mbNetwork = true; } if (pAlpha != 0) { ULONG len = (ULONG)pAlpha[1] + (ULONG)2; memcpy( &mAlpha[0], pAlpha, len ); mbAlpha = true; } }; // (Inline) Destructor virtual ~cUSSDOriginationCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { BYTE * pNetworkInfo = (mbNetwork == true ? &mNetworkInfo[0] : 0); BYTE * pAlpha = (mbAlpha == true ? &mAlpha[0] : 0); mpCallback( mErrorCode, mFailureCause, pNetworkInfo, pAlpha ); } }; /* Callback function */ tFNUSSDOrigination mpCallback; /* Callback arguments */ ULONG mErrorCode; ULONG mFailureCause; BYTE mNetworkInfo[512]; BYTE mAlpha[512]; /* Did we get data? */ bool mbNetwork; bool mbAlpha; }; /*=========================================================================*/ // Class cGobiConnectionMgmt /*=========================================================================*/ class cGobiConnectionMgmt : public cGobiQMICore { public: // Constructor cGobiConnectionMgmt(); // Destructor virtual ~cGobiConnectionMgmt(); // Connect to the specified Gobi device virtual bool Connect( LPCSTR pDeviceNode = 0, LPCSTR pDeviceKey = 0 ); // Disconnect from the currently connected Gobi device virtual bool Disconnect(); // Enable/disable session state callback function eGobiError SetSessionStateCallback( tFNSessionState pCallback ); // Enables/disables the RX/TX byte counts callback function eGobiError SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ); // Enables/disables the serving system data capabilities callback eGobiError SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ); // Enable/disable data bearer callback function eGobiError SetDataBearerCallback( tFNDataBearer pCallback ); // Enable/disable dormancy status callback function eGobiError SetDormancyStatusCallback( tFNDormancyStatus pCallback ); // Enable/disable mobile IP status callback function eGobiError SetMobileIPStatusCallback( tFNDormancyStatus pCallback ); // Enable/disable activation status callback function eGobiError SetActivationStatusCallback( tFNActivationStatus pCallback ); // Enable/disable power operating mode callback function eGobiError SetPowerCallback( tFNPower pCallback ); // Enable/disable wireless disable state callback function eGobiError SetWirelessDisableCallback( tFNWirelessDisable pCallback ); // Enable/disable roaming indicator callback function eGobiError SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ); // Enable/disable signal strength callback function eGobiError SetSignalStrengthCallback( tFNSignalStrength pCallback, std::list thresholds ); // Enable/disable RF information callback function eGobiError SetRFInfoCallback( tFNRFInfo pCallback ); // Enable/disable LU reject callback function eGobiError SetLURejectCallback( tFNLUReject pCallback ); // Enable/disable PLMN mode callback function eGobiError SetPLMNModeCallback( tFNPLMNMode pCallback ); // Enable/disable new SMS callback function eGobiError SetNewSMSCallback( tFNNewSMS pCallback ); // Enable/disable NMEA sentence callback function eGobiError SetNMEACallback( tFNNewNMEA pCallback ); // Enable/disable PDS service state callback function eGobiError SetPDSStateCallback( tFNPDSState pCallback ); // Enable/disable CAT event callback function eGobiError SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ); // Enable/disable OMA-DM NIA callback function eGobiError SetOMADMAlertCallback( tFNOMADMAlert pCallback ); // Enable/disable OMA-DM state callback function eGobiError SetOMADMStateCallback( tFNOMADMState pCallback ); // Enable/disable USSD release callback function eGobiError SetUSSDReleaseCallback( tFNUSSDRelease pCallback ); // Enable/disable USSD notification callback function eGobiError SetUSSDNotificationCallback( tFNUSSDNotification pCallback ); // Enable/disable USSD origination callback function eGobiError SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ); protected: // Process new traffic void ProcessTraffic( eQMIService svc ); // Process QMI traffic void ProcessWDSBuffer( const sProtocolBuffer & buf ); void ProcessDMSBuffer( const sProtocolBuffer & buf ); void ProcessNASBuffer( const sProtocolBuffer & buf ); void ProcessWMSBuffer( const sProtocolBuffer & buf ); void ProcessPDSBuffer( const sProtocolBuffer & buf ); void ProcessCATBuffer( const sProtocolBuffer & buf ); void ProcessOMABuffer( const sProtocolBuffer & buf ); void ProcessVoiceBuffer( const sProtocolBuffer & buf ); /* Is there an active thread? */ bool mbThreadStarted; /* ID of traffic processing thread */ pthread_t mThreadID; /* Traffic processing thread exit event */ cEvent mExitEvent; /* Has the protocol server thread finished cleanup? */ bool mThreadCleanupFinished; /* Number of buffers processed by ProcessTraffic() (per server) */ ULONG mWDSItemsProcessed; ULONG mDMSItemsProcessed; ULONG mNASItemsProcessed; ULONG mWMSItemsProcessed; ULONG mPDSItemsProcessed; ULONG mCATItemsProcessed; ULONG mOMAItemsProcessed; ULONG mVoiceItemsProcessed; /* Callback functions */ tFNSessionState mpFNSessionState; tFNByteTotals mpFNByteTotals; tFNDataCapabilities mpFNDataCapabilities; tFNDataBearer mpFNDataBearer; tFNDormancyStatus mpFNDormancyStatus; tFNMobileIPStatus mpFNMobileIPStatus; tFNActivationStatus mpFNActivationStatus; tFNPower mpFNPower; tFNWirelessDisable mpFNWirelessDisable; tFNRoamingIndicator mpFNRoamingIndicator; tFNSignalStrength mpFNSignalStrength; tFNRFInfo mpFNRFInfo; tFNLUReject mpFNLUReject; tFNPLMNMode mpPLMNMode; tFNNewSMS mpFNNewSMS; tFNNewNMEA mpFNNewNMEA; tFNPDSState mpFNPDSState; tFNCATEvent mpFNCATEvent; tFNOMADMAlert mpFNOMADMAlert; tFNOMADMState mpFNOMADMState; tFNUSSDRelease mpFNUSSDRelease; tFNUSSDNotification mpFNUSSDNotification; tFNUSSDOrigination mpFNUSSDOrigination; // Traffic process thread gets full access friend VOID * TrafficProcessThread( PVOID pArg ); }; /*=========================================================================*/ // Class cGobiConnectionMgmtDLL /*=========================================================================*/ class cGobiConnectionMgmtDLL { public: // Constructor cGobiConnectionMgmtDLL(); // Destructor virtual ~cGobiConnectionMgmtDLL(); // Return the GobiConnectionMgmt object cGobiConnectionMgmt * GetAPI(); protected: /* API interface object */ cGobiConnectionMgmt * mpAPI; /* Above object allocation attempted? */ bool mbAllocated; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern cGobiConnectionMgmtDLL gConnectionDLL; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiConnectionMgmt/GobiConnectionMgmtAPI.h000077500000000000000000003323471455567757300273600ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPI.h DESCRIPTION: QUALCOMM Connection Management API for Gobi 3000 Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #endif /*=========================================================================*/ // Definitions /*=========================================================================*/ #ifdef __cplusplus extern "C" { #endif // Session state callback function typedef void (* tFNSessionState)( ULONG state, ULONG sessionEndReason ); // RX/TX byte counts callback function typedef void (* tFNByteTotals)( ULONGLONG totalBytesTX, ULONGLONG totalBytesRX ); // Dormancy status callback function typedef void (* tFNDormancyStatus)( ULONG dormancyStatus ); // Mobile IP status callback function typedef void (* tFNMobileIPStatus)( ULONG mipStatus ); // Activation status callback function typedef void (* tFNActivationStatus)( ULONG activationStatus ); // Power operating mode callback function typedef void (* tFNPower)( ULONG operatingMode ); // Wireless disable callback function typedef void (* tFNWirelessDisable)( ULONG bState ); // Serving system data capabilities callback function typedef void (* tFNDataCapabilities)( BYTE dataCapsSize, BYTE * pDataCaps ); // Data bearer technology callback function typedef void (* tFNDataBearer)( ULONG dataBearer ); // Roaming indicator callback function typedef void (* tFNRoamingIndicator)( ULONG roaming ); // Signal strength callback function typedef void (* tFNSignalStrength)( INT8 signalStrength, ULONG radioInterface ); // RF information callback function typedef void (* tFNRFInfo)( ULONG radioInterface, ULONG activeBandClass, ULONG activeChannel ); // LU reject callback function typedef void (* tFNLUReject)( ULONG serviceDomain, ULONG rejectCause ); // PLMN mode callback function typedef void (* tFNPLMNMode)( ULONG mode ); // New SMS message callback function typedef void (* tFNNewSMS)( ULONG storageType, ULONG messageIndex ); // New NMEA sentence callback function typedef void (* tFNNewNMEA)( LPCSTR pNMEA ); // PDS session state callback function typedef void (* tFNPDSState)( ULONG enabledStatus, ULONG trackingStatus ); // CAT event callback function typedef void (* tFNCATEvent)( ULONG eventID, ULONG eventLen, BYTE * pEventData ); // OMA-DM network initiated alert callback function typedef void (* tFNOMADMAlert)( ULONG sessionType, USHORT sessionID ); // OMA-DM state callback function typedef void (* tFNOMADMState)( ULONG sessionState, ULONG failureReason ); // USSD release callback function typedef void (* tFNUSSDRelease)(); // USSD notification callback function typedef void (* tFNUSSDNotification)( ULONG type, BYTE * pNetworkInfo ); // USSD origination callback function typedef void (* tFNUSSDOrigination)( ULONG errorCode, ULONG failureCause, BYTE * pNetworkInfo, BYTE * pAlpha ); /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: QCWWANEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ); /*=========================================================================== METHOD: QCWWANConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device Both device node and key are case sensitive PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANConnect( CHAR * pDeviceNode, CHAR * pDeviceKey ); /*=========================================================================== METHOD: QCWWANCancel DESCRIPTION: This function cancels the most recent outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANCancel(); /*=========================================================================== METHOD: QCWWANDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANDisconnect(); /*=========================================================================== METHOD: QCWWANGetConnectedDeviceID DESCRIPTION: This function returns the Node/key of the device the Gobi CM API library is currently connected to PARAMETERS: deviceNodeSize [ I ] - The maximum number of characters (including NULL terminator) that the device Node array can contain pDeviceNode [ O ] - Device Node (NULL terminated string) deviceKeySize [ I ] - The maximum number of characters (including NULL terminator) that the device key array can contain pDeviceKey [ O ] - Device key (NULL terminated string) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANGetConnectedDeviceID( ULONG deviceNodeSize, CHAR * pDeviceNode, ULONG deviceKeySize, CHAR * pDeviceKey ); /*=========================================================================== METHOD: GetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionState( ULONG * pState ); /*=========================================================================== METHOD: GetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionDuration( ULONGLONG * pDuration ); /*=========================================================================== METHOD: GetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDormancyState( ULONG * pState ); /*=========================================================================== METHOD: GetAutoconnect (Deprecated) DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAutoconnect( ULONG * pSetting ); /*=========================================================================== METHOD: SetAutoconnect (Deprecated) DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect disabled (0) or enabled (non-zero) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAutoconnect( ULONG setting ); /*=========================================================================== METHOD: GetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ); /*=========================================================================== METHOD: SetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ); /*=========================================================================== METHOD: SetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); /*=========================================================================== METHOD: GetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being read pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); /*=========================================================================== METHOD: StartDataSession DESCRIPTION: These functions activate a packet data session PARAMETERS: pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ); /*=========================================================================== METHOD: CancelDataSession DESCRIPTION: This function cancels an in-progress packet data session activation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelDataSession(); /*=========================================================================== METHOD: StopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StopDataSession( ULONG sessionId ); /*=========================================================================== METHOD: GetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIPAddress( ULONG * pIPAddress ); /*=========================================================================== METHOD: GetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); /*=========================================================================== METHOD: GetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); /*=========================================================================== METHOD: GetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); /*=========================================================================== METHOD: SetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIP( ULONG mode ); /*=========================================================================== METHOD: GetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIP( ULONG * pMode ); /*=========================================================================== METHOD: SetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ); /*=========================================================================== METHOD: GetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActiveMobileIPProfile( BYTE * pIndex ); /*=========================================================================== METHOD: SetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address pRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); /*=========================================================================== METHOD: GetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: index [ I ] - Mobile IP profile ID pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); /*=========================================================================== METHOD: SetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); /*=========================================================================== METHOD: GetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); /*=========================================================================== METHOD: GetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetLastMobileIPError( ULONG * pError ); /*=========================================================================== METHOD: SetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); /*=========================================================================== METHOD: GetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); /*=========================================================================== METHOD: GetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetANAAAAuthenticationStatus( ULONG * pStatus ); /*=========================================================================== METHOD: GetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); /*=========================================================================== METHOD: GetRFInfo (Public Method) DESCRIPTION: This function gets the current RF information PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ); /*=========================================================================== METHOD: PerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ); /*=========================================================================== METHOD: PerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); /*=========================================================================== METHOD: InitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ); /*=========================================================================== METHOD: InitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateDomainAttach( ULONG action ); /*=========================================================================== METHOD: GetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); /*=========================================================================== METHOD: GetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetworkCapabilities( BYTE * pDataCapsSize, BYTE * pDataCaps ); /*=========================================================================== METHOD: GetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDataBearerTechnology( ULONG * pDataBearer ); /*=========================================================================== METHOD: GetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); /*=========================================================================== METHOD: SetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNetworkPreference( ULONG technologyPref, ULONG duration ); /*=========================================================================== METHOD: GetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); /*=========================================================================== METHOD: SetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); /*=========================================================================== METHOD: GetCDMANetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); /*=========================================================================== METHOD: GetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetACCOLC( BYTE * pACCOLC ); /*=========================================================================== METHOD: SetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetACCOLC( CHAR * pSPC, BYTE accolc ); /*=========================================================================== METHOD: GetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNMode( ULONG * pMode ); /*=========================================================================== METHOD: GetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ); /*=========================================================================== METHOD: GetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: pMaxTxChannelRate [ O ] - Maximum transmission rate (bps) pMaxRxChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); /*=========================================================================== METHOD: GetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetManufacturer( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetModelID( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevision( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); /*=========================================================================== METHOD: GetFirmwareInfo DESCRIPTION: Returns image information obtained from the current device firmware PARAMETERS: pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); /*=========================================================================== METHOD: GetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); /*=========================================================================== METHOD: GetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIMSI( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); /*=========================================================================== METHOD: SetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLock( ULONG state, CHAR * pCurrentPIN ); /*=========================================================================== METHOD: QueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QueryLock( ULONG * pState ); /*=========================================================================== METHOD: ChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pCurrentPIN [ O ] - Current four digit PIN string pDesiredPIN [ O ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ); /*=========================================================================== METHOD: GetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHardwareRevision( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPRLVersion( WORD * pPRLVersion ); /*=========================================================================== METHOD: GetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetERIFile( ULONG * pFileSize, BYTE * pFile ); /*=========================================================================== METHOD: ActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateAutomatic( CHAR * pActivationCode ); /*=========================================================================== METHOD: ActivateManual DESCRIPTION: This function requests the device perform manual service activation, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code sid [ I ] - System identification number pMDN [ I ] - Mobile Directory Number string pMIN [ I ] - Mobile Identification Number string prlSize [ I ] - (Optional) Size of PRL file array pPRL [ I ] - (Optional) The PRL file contents pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ); /*=========================================================================== METHOD: ResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetToFactoryDefaults( CHAR * pSPC ); /*=========================================================================== METHOD: GetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActivationState( ULONG * pActivationState ); /*=========================================================================== METHOD: SetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPower( ULONG powerMode ); /*=========================================================================== METHOD: GetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPower( ULONG * pPowerMode ); /*=========================================================================== METHOD: GetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ); /*=========================================================================== METHOD: GetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: pTimeStamp [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ); /*=========================================================================== METHOD: ValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateSPC( CHAR * pSPC ); /*=========================================================================== METHOD: DeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); /*=========================================================================== METHOD: GetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ); /*=========================================================================== METHOD: GetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ I ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); /*=========================================================================== METHOD: ModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ); /*=========================================================================== METHOD: SaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ); /*=========================================================================== METHOD: SendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ); /*=========================================================================== METHOD: GetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); /*=========================================================================== METHOD: SetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ); /*=========================================================================== METHOD: GetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); /*=========================================================================== METHOD: SetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: This function change the PIN value PARAMETERS: id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetICCID( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: UIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the blocking status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); /*=========================================================================== METHOD: UIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ); /*=========================================================================== METHOD: UIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: GetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSState( ULONG * pEnabled, ULONG * pTracking ); /*=========================================================================== METHOD: SetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSState( ULONG enable ); /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ); /*=========================================================================== METHOD: GetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); /*=========================================================================== METHOD: SetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); /*=========================================================================== METHOD: GetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ); /*=========================================================================== METHOD: SetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ); /*=========================================================================== METHOD: GetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRANetwork( ULONG * pPreference ); /*=========================================================================== METHOD: SetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRANetwork( ULONG preference ); /*=========================================================================== METHOD: GetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); /*=========================================================================== METHOD: ForceXTRADownload DESCRIPTION: This function forces the XTRA database to be downloaded to the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ForceXTRADownload(); /*=========================================================================== METHOD: GetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRADataState( ULONG * pState ); /*=========================================================================== METHOD: SetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRADataState( ULONG state ); /*=========================================================================== METHOD: GetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRATimeState( ULONG * pState ); /*=========================================================================== METHOD: SetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRATimeState( ULONG state ); /*=========================================================================== METHOD: GetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ); /*=========================================================================== METHOD: SetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAGPSConfig( ULONG serverAddress, ULONG serverPort ); /*=========================================================================== METHOD: GetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServiceAutomaticTracking( ULONG * pbAuto ); /*=========================================================================== METHOD: SetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetServiceAutomaticTracking( ULONG bAuto ); /*=========================================================================== METHOD: GetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPortAutomaticTracking( ULONG * pbAuto ); /*=========================================================================== METHOD: SetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPortAutomaticTracking( ULONG bAuto ); /*=========================================================================== METHOD: ResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ); /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ); /*=========================================================================== METHOD: CATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ); /*=========================================================================== METHOD: GetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ); /*=========================================================================== METHOD: SetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSWake( ULONG bEnable, ULONG wakeMask ); /*=========================================================================== METHOD: OMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMStartSession( ULONG sessionType ); /*=========================================================================== METHOD: OMADMCancelSession DESCRIPTION: This function cancels an ongoing OMA-DM session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMCancelSession(); /*=========================================================================== METHOD: OMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); /*=========================================================================== METHOD: OMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ); /*=========================================================================== METHOD: OMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSendSelection( ULONG selection, USHORT sessionID ); /*=========================================================================== METHOD: OMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ); /*=========================================================================== METHOD: OMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetProvisioningFeature( ULONG bProvisioning ); /*=========================================================================== METHOD: OMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ); /*=========================================================================== METHOD: OriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OriginateUSSD( BYTE * pInfo ); /*=========================================================================== METHOD: AnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AnswerUSSD( BYTE * pInfo ); /*=========================================================================== METHOD: CancelUSSD DESCRIPTION: This function cancels an in-progress USSD operation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelUSSD(); /*=========================================================================== METHOD: UpgradeFirmware DESCRIPTION: This function performs the following set of steps: a) Verifies arguments b) Updates firmware ID on device c) Resets the device NOTE: Upon successful completion the above steps will have been completed, however the actual upgrade of the firmware will necessarily then follow. PARAMETERS: pDestinationPath [ I ] - The fully qualified path to the destination folder that the firmware download service will use RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UpgradeFirmware( CHAR * pDestinationPath ); /*=========================================================================== METHOD: GetImageInfo DESCRIPTION: Returns image information obtained from the firmware image located at the provided path PARAMETERS: pPath [ I ] - Location of the firmware image pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); /*=========================================================================== METHOD: GetImageStore DESCRIPTION: Returns the image store folder, i.e. the folder co-located with the QDL Service executable which (by default) contains one or more carrier specific image subfolders PARAMETERS: pathSize [ I ] - Maximum number of characters (including NULL terminator) that can be copied to the image store path array pImageStorePath [ O ] - The path to the image store RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageStore( WORD pathSize, CHAR * pImageStorePath ); /*=========================================================================== METHOD: SetSessionStateCallback DESCRIPTION: This function enables/disables the session state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSessionStateCallback( tFNSessionState pCallback ); /*=========================================================================== METHOD: SetByteTotalsCallback DESCRIPTION: This function enables/disables the RX/TX byte counts callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) interval [ I ] - Interval in seconds (ignored when disabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ); /*=========================================================================== METHOD: SetDataCapabilitiesCallback DESCRIPTION: This function enables/disables the serving system data capabilities callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ); /*=========================================================================== METHOD: SetDataBearerCallback DESCRIPTION: This function enables/disables the data bearer status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataBearerCallback( tFNDataBearer pCallback ); /*=========================================================================== METHOD: SetDormancyStatusCallback DESCRIPTION: This function enables/disables the dormancy status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDormancyStatusCallback( tFNDormancyStatus pCallback ); /*=========================================================================== METHOD: SetMobileIPStatusCallback DESCRIPTION: This function enables/disables the mobile IP status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPStatusCallback( tFNMobileIPStatus pCallback ); /*=========================================================================== METHOD: SetActivationStatusCallback DESCRIPTION: This function enables/disables the activation status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActivationStatusCallback( tFNActivationStatus pCallback ); /*=========================================================================== METHOD: SetPowerCallback DESCRIPTION: Enable/disable power operating mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetPowerCallback( tFNPower pCallback ); /*=========================================================================== METHOD: SetWirelessDisableCallback DESCRIPTION: Enables/disables wireless disable state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetWirelessDisableCallback( tFNWirelessDisable pCallback ); /*=========================================================================== METHOD: SetRoamingIndicatorCallback DESCRIPTION: This function enables/disables the roaming indicator callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ); /*=========================================================================== METHOD: SetSignalStrengthCallback DESCRIPTION: This function enables/disables the signal strength callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) thresholdsSize [ I ] - Number of elements the threshold array contain (a maximum of 5 thresholds is supported), must be 0 when disabling the callback pThresholds [ I ] - Signal threshold array (each entry in dBm), must be 0 when disabling the callback RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSignalStrengthCallback( tFNSignalStrength pCallback, BYTE thresholdsSize, INT8 * pThresholds ); /*=========================================================================== METHOD: SetRFInfoCallback DESCRIPTION: This function enables/disables the RF information callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRFInfoCallback( tFNRFInfo pCallback ); /*=========================================================================== METHOD: SetLURejectCallback DESCRIPTION: This function enables/disables the LU reject callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLURejectCallback( tFNLUReject pCallback ); /*=========================================================================== METHOD: SetPLMNModeCallback DESCRIPTION: This function enables/disables the PLMN mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPLMNModeCallback( tFNPLMNMode pCallback ); /*=========================================================================== METHOD: SetNewSMSCallback DESCRIPTION: This function enables/disables the new SMS callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNewSMSCallback( tFNNewSMS pCallback ); /*=========================================================================== METHOD: SetNMEACallback DESCRIPTION: This function enables/disables the NMEA sentence callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNMEACallback( tFNNewNMEA pCallback ); /*=========================================================================== METHOD: SetPDSStateCallback DESCRIPTION: This function enables/disables the PDS service state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSStateCallback( tFNPDSState pCallback ); /*=========================================================================== METHOD: SetCATEventCallback DESCRIPTION: This function enables/disables the CAT event callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) eventMask [ I ] - Bitmask of CAT events to register for pErrorMask [ O ] - Error bitmask RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ); /*=========================================================================== METHOD: SetOMADMAlertCallback DESCRIPTION: This function enables/disables the OMA-DM network initiated alert callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMAlertCallback( tFNOMADMAlert pCallback ); /*=========================================================================== METHOD: SetOMADMStateCallback DESCRIPTION: This function enables/disables the OMA-DM state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMStateCallback( tFNOMADMState pCallback ); /*=========================================================================== METHOD: SetUSSDReleaseCallback DESCRIPTION: This function enables/disables the USSD release callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDReleaseCallback( tFNUSSDRelease pCallback ); /*=========================================================================== METHOD: SetUSSDNotificationCallback DESCRIPTION: This function enables/disables the USSD notification callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDNotificationCallback( tFNUSSDNotification pCallback ); /*=========================================================================== METHOD: SetUSSDOriginationCallback DESCRIPTION: Enable/disable USSD origination callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ); #ifdef __cplusplus }; #endif libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp000077500000000000000000004547521455567757300307530ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtExports.cpp DESCRIPTION: QUALCOMM Gobi 3000 Connection Management API exports Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiConnectionMgmt.h" #include "GobiConnectionMgmtAPI.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for adapter device path const ULONG MAX_AI_DEVICE_PATH = 256; // Maximum length for adapter key const ULONG MAX_AI_KEY = 16; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sAdapterInfo // Struct to represent Gobi adapter info /*=========================================================================*/ struct sAdapterInfo { public: CHAR mPath[MAX_AI_DEVICE_PATH]; CHAR mKey[MAX_AI_KEY]; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: QCWWANEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pDevicesSize == 0 || pDevices == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pDevicesSize; *pDevicesSize = 0; // Obtain adapter info std::vector adapters; adapters = pAPI->GetAvailableDevices(); ULONG sz = (ULONG)adapters.size(); if (sz > (ULONG)maxInstances) { sz = (ULONG)maxInstances; } sAdapterInfo * pOutput = (sAdapterInfo *)pDevices; for (ULONG a = 0; a < sz; a++) { const cGobiConnectionMgmt::tDeviceID & id = adapters[a]; memset( &pOutput->mPath[0], 0, (SIZE_T)MAX_AI_DEVICE_PATH ); memset( &pOutput->mKey[0], 0, (SIZE_T)MAX_AI_KEY ); ULONG len = id.first.size(); if (len > 0) { if (len >= MAX_AI_DEVICE_PATH) { len = MAX_AI_DEVICE_PATH - 1; } memcpy( (LPVOID)&pOutput->mPath[0], (LPVOID)id.first.c_str(), (SIZE_T)len ); } len = id.second.size(); if (len > 0) { if (len >= MAX_AI_KEY) { len = MAX_AI_KEY - 1; } memcpy( (LPVOID)&pOutput->mKey[0], (LPCVOID)id.second.c_str(), (SIZE_T)len ); } pOutput++; } *pDevicesSize = (BYTE)sz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: QCWWANConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device Both device node and key are case sensitive PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANConnect( CHAR * pDeviceNode, CHAR * pDeviceKey ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pDeviceNode == 0 && pDeviceKey != 0) { // If you specify a device key then you have to specify a device ID return (ULONG)eGOBI_ERR_INVALID_ARG; } bool bConnect = pAPI->Connect( (LPCSTR)pDeviceNode, (LPCSTR)pDeviceKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: QCWWANCancel DESCRIPTION: This function cancels the most recent outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANCancel() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelSend(); } /*=========================================================================== METHOD: QCWWANDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANDisconnect() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bDisco = pAPI->Disconnect(); if (bDisco == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: QCWWANGetConnectedDeviceID DESCRIPTION: This function returns the Node/key of the device the Gobi CM API library is currently connected to PARAMETERS: deviceNodeSize [ I ] - The maximum number of characters (including NULL terminator) that the device Node array can contain pDeviceNode [ O ] - Device Node (NULL terminated string) deviceKeySize [ I ] - The maximum number of characters (including NULL terminator) that the device key array can contain pDeviceKey [ O ] - Device key (NULL terminated string) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANGetConnectedDeviceID( ULONG deviceNodeSize, CHAR * pDeviceNode, ULONG deviceKeySize, CHAR * pDeviceKey ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if ( (deviceNodeSize == 0) || (pDeviceNode == 0) || (deviceKeySize == 0) || (pDeviceKey == 0) ) { return (ULONG)eGOBI_ERR_INVALID_ARG; } *pDeviceNode = 0; *pDeviceKey = 0; std::string devNode = ""; std::string devKey = ""; bool bOK = pAPI->GetConnectedDeviceID( devNode, devKey ); if (bOK == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG lenNode = (ULONG)devNode.size(); // Space to perform the copy? if (deviceNodeSize < lenNode + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pDeviceNode, (LPVOID)devNode.c_str(), lenNode ); // Enforce null termination pDeviceNode[lenNode] = 0; ULONG lenKey = (ULONG)devKey.size(); // Space to perform the copy? if (deviceKeySize < lenKey + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pDeviceKey, (LPVOID)devKey.c_str(), lenKey ); // Enforce null termination pDeviceKey[lenKey] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSessionState( pState ); } /*=========================================================================== METHOD: GetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionDuration( ULONGLONG * pDuration ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSessionDuration( pDuration ); } /*=========================================================================== METHOD: GetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDormancyState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDormancyState( pState ); } /*=========================================================================== METHOD: GetAutoconnect (Deprecated) DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAutoconnect( ULONG * pSetting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG dummy; return (ULONG)pAPI->GetEnhancedAutoconnect( pSetting, &dummy ); } /*=========================================================================== METHOD: SetAutoconnect (Deprecated) DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect disabled (0) or enabled (non-zero) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAutoconnect( ULONG setting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetEnhancedAutoconnect( setting, 0 ); } /*=========================================================================== METHOD: GetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetEnhancedAutoconnect( pSetting, pRoamSetting ); } /*=========================================================================== METHOD: SetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetEnhancedAutoconnect( setting, pRoamSetting ); } /*=========================================================================== METHOD: SetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDefaultProfile( profileType, pPDPType, pIPAddress, pPrimaryDNS, pSecondaryDNS, pAuthentication, pName, pAPNName, pUsername, pPassword ); } /*=========================================================================== METHOD: GetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being read pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDefaultProfile( profileType, pPDPType, pIPAddress, pPrimaryDNS, pSecondaryDNS, pAuthentication, nameSize, pName, apnSize, pAPNName, userSize, pUsername ); } /*=========================================================================== METHOD: StartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->StartDataSession( pTechnology, pPrimaryDNS, pSecondaryDNS, pPrimaryNBNS, pSecondaryNBNS, pAPNName, pIPAddress, pAuthentication, pUsername, pPassword, pSessionId, pFailureReason ); } /*=========================================================================== METHOD: CancelDataSession DESCRIPTION: This function cancels an in-progress packet data session activation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelDataSession() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->CancelDataSession(); } /*=========================================================================== METHOD: StopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StopDataSession( ULONG sessionId ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->StopDataSession( sessionId ); } /*=========================================================================== METHOD: GetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIPAddress( ULONG * pIPAddress ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetIPAddress( pIPAddress ); } /*=========================================================================== METHOD: GetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetConnectionRate( pCurrentChannelTXRate, pCurrentChannelRXRate, pMaxChannelTXRate, pMaxChannelRXRate ); } /*=========================================================================== METHOD: GetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPacketStatus( pTXPacketSuccesses, pRXPacketSuccesses, pTXPacketErrors, pRXPacketErrors, pTXPacketOverflows, pRXPacketOverflows ); } /*=========================================================================== METHOD: GetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetByteTotals( pTXTotalBytes, pRXTotalBytes ); } /*=========================================================================== METHOD: SetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIP( ULONG mode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetMobileIP( mode ); } /*=========================================================================== METHOD: GetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIP( ULONG * pMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetMobileIP( pMode ); } /*=========================================================================== METHOD: SetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetActiveMobileIPProfile( pSPC, index ); } /*=========================================================================== METHOD: GetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActiveMobileIPProfile( BYTE * pIndex ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetActiveMobileIPProfile( pIndex ); } /*=========================================================================== METHOD: SetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address bRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetMobileIPProfile( pSPC, index, pEnabled, pAddress, pPrimaryHA, pSecondaryHA, pRevTunneling, pNAI, pHASPI, pAAASPI, pMNHA, pMNAAA ); } /*=========================================================================== METHOD: GetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: index [ I ] - Mobile IP profile ID pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetMobileIPProfile( index, pEnabled, pAddress, pPrimaryHA, pSecondaryHA, pRevTunneling, naiSize, pNAI, pHASPI, pAAASPI, pHAState, pAAAState ); } /*=========================================================================== METHOD: SetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetMobileIPParameters( pSPC, pMode, pRetryLimit, pRetryInterval, pReRegPeriod, pReRegTraffic, pHAAuthenticator, pHA2002bis ); } /*=========================================================================== METHOD: GetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetMobileIPParameters( pMode, pRetryLimit, pRetryInterval, pReRegPeriod, pReRegTraffic, pHAAuthenticator, pHA2002bis ); } /*=========================================================================== METHOD: GetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetLastMobileIPError( ULONG * pError ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetLastMobileIPError( pError ); } /*=========================================================================== METHOD: SetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDNSSettings( pPrimaryDNS, pSecondaryDNS ); } /*=========================================================================== METHOD: GetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDNSSettings( pPrimaryDNS, pSecondaryDNS ); } /*=========================================================================== METHOD: GetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetANAAAAuthenticationStatus( ULONG * pStatus ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetANAAAAuthenticationStatus( pStatus ); } /*=========================================================================== METHOD: GetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSignalStrengths( pArraySizes, pSignalStrengths, pRadioInterfaces ); } /*=========================================================================== METHOD: GetRFInfo DESCRIPTION: This function gets the current RF information PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetRFInfo( pInstanceSize, pInstances ); } /*=========================================================================== METHOD: PerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PerformNetworkScan( pInstanceSize, pInstances ); } /*=========================================================================== METHOD: PerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PerformNetworkRATScan( pInstanceSize, pInstances, pRATSize, pRATInstances ); } /*=========================================================================== METHOD: InitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->InitiateNetworkRegistration( regType, mcc, mnc, rat ); } /*=========================================================================== METHOD: InitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateDomainAttach( ULONG action ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->InitiateDomainAttach( action ); } /*=========================================================================== METHOD: GetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetServingNetwork( pRegistrationState, pCSDomain, pPSDomain, pRAN, pRadioIfacesSize, pRadioIfaces, pRoaming, pMCC, pMNC, nameSize, pName ); } /*=========================================================================== METHOD: GetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetworkCapabilities( BYTE * pDataCapsSize, BYTE * pDataCaps ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetServingNetworkCapabilities( pDataCapsSize, pDataCaps ); } /*=========================================================================== METHOD: GetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDataBearerTechnology( ULONG * pDataBearer ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDataBearerTechnology( pDataBearer ); } /*=========================================================================== METHOD: GetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetHomeNetwork( pMCC, pMNC, nameSize, pName, pSID, pNID ); } /*=========================================================================== METHOD: SetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNetworkPreference( ULONG technologyPref, ULONG duration ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetNetworkPreference( technologyPref, duration ); } /*=========================================================================== METHOD: GetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetNetworkPreference( pTechnologyPref, pDuration, pPersistentTechnologyPref ); } /*=========================================================================== METHOD: SetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetCDMANetworkParameters( pSPC, pForceRev0, pCustomSCP, pProtocol, pBroadcast, pApplication, pRoaming ); } /*=========================================================================== METHOD: GetEVDONetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetCDMANetworkParameters( pSCI, pSCM, pRegHomeSID, pRegForeignSID, pRegForeignNID, pForceRev0, pCustomSCP, pProtocol, pBroadcast, pApplication, pRoaming ); } /*=========================================================================== METHOD: GetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetACCOLC( BYTE * pACCOLC ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetACCOLC( pACCOLC ); } /*=========================================================================== METHOD: SetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetACCOLC( CHAR * pSPC, BYTE accolc ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetACCOLC( pSPC, accolc ); } /*=========================================================================== METHOD: GetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNMode( ULONG * pMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetPLMNMode( pMode ); } /*=========================================================================== METHOD: GetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetPLMNName( mcc, mnc, pNamesSize, pNames ); } /*=========================================================================== METHOD: GetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDeviceCapabilities( pMaxTXChannelRate, pMaxRXChannelRate, pDataServiceCapability, pSimCapability, pRadioIfacesSize, pRadioIfaces ); } /*=========================================================================== METHOD: GetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetManufacturer( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetManufacturer( stringSize, pString ); } /*=========================================================================== METHOD: GetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetModelID( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetModelID( stringSize, pString ); } /*=========================================================================== METHOD: GetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevision( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetFirmwareRevision( stringSize, pString ); } /*=========================================================================== METHOD: GetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetFirmwareRevisions( amssSize, pAMSSString, bootSize, pBootString, priSize, pPRIString ); } /*=========================================================================== METHOD: GetFirmwareInfo DESCRIPTION: Returns image information obtained from the current device firmware PARAMETERS: pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetFirmwareInfo( pFirmwareID, pTechnology, pCarrier, pRegion, pGPSCapability ); } /*=========================================================================== METHOD: GetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetVoiceNumber( voiceNumberSize, pVoiceNumber, minSize, pMIN ); } /*=========================================================================== METHOD: GetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIMSI( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetIMSI( stringSize, pString ); } /*=========================================================================== METHOD: GetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSerialNumbers( esnSize, pESNString, imeiSize, pIMEIString, meidSize, pMEIDString ); } /*=========================================================================== METHOD: SetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLock( ULONG state, CHAR * pCurrentPIN ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetLock( state, pCurrentPIN ); } /*=========================================================================== METHOD: QueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QueryLock( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->QueryLock( pState ); } /*=========================================================================== METHOD: ChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pCurrentPIN [ O ] - Current four digit PIN string pDesiredPIN [ O ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ChangeLockPIN( pCurrentPIN, pDesiredPIN ); } /*=========================================================================== METHOD: GetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHardwareRevision( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetHardwareRevision( stringSize, pString ); } /*=========================================================================== METHOD: GetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPRLVersion( WORD * pPRLVersion ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPRLVersion( pPRLVersion ); } /*=========================================================================== METHOD: GetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetERIFile( ULONG * pFileSize, BYTE * pFile ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetERIFile( pFileSize, pFile ); } /*=========================================================================== METHOD: ActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateAutomatic( CHAR * pActivationCode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ActivateAutomatic( pActivationCode ); } /*=========================================================================== METHOD: ActivateManual DESCRIPTION: This function requests the device perform manual service activation PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code sid [ I ] - System identification number pMDN [ I ] - Mobile Directory Number string pMIN [ I ] - Mobile Identification Number string prlSize [ I ] - (Optional) Size of PRL file array pPRL [ I ] - (Optional) The PRL file contents pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ActivateManual( pSPC, sid, pMDN, pMIN, prlSize, pPRL, pMNHA, pMNAAA ); } /*=========================================================================== METHOD: ResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetToFactoryDefaults( CHAR * pSPC ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ResetToFactoryDefaults( pSPC ); } /*=========================================================================== METHOD: GetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActivationState( ULONG * pActivationState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetActivationState( pActivationState ); } /*=========================================================================== METHOD: SetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPower( ULONG powerMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetPower( powerMode ); } /*=========================================================================== METHOD: GetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPower( ULONG * pPowerMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPower( pPowerMode ); } /*=========================================================================== METHOD: GetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetOfflineReason( pReasonMask, pbPlatform ); } /*=========================================================================== METHOD: GetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: pTimeStamp [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetNetworkTime( pTimeCount, pTimeSource ); } /*=========================================================================== METHOD: ValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateSPC( CHAR * pSPC ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ValidateSPC( pSPC ); } /*=========================================================================== METHOD: DeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->DeleteSMS( storageType, pMessageIndex, pMessageTag ); } /*=========================================================================== METHOD: GetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSList( storageType, pRequestedTag, pMessageListSize, pMessageList ); } /*=========================================================================== METHOD: GetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ I ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMS( storageType, messageIndex, pMessageTag, pMessageFormat, pMessageSize, pMessage ); } /*=========================================================================== METHOD: ModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ModifySMSStatus( storageType, messageIndex, messageTag ); } /*=========================================================================== METHOD: SaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SaveSMS( storageType, messageFormat, messageSize, pMessage, pMessageIndex ); } /*=========================================================================== METHOD: SendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SendSMS( messageFormat, messageSize, pMessage, pMessageFailureCode ); } /*=========================================================================== METHOD: GetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSCAddress( addressSize, pSMSCAddress, typeSize, pSMSCType ); } /*=========================================================================== METHOD: SetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSMSCAddress( pSMSCAddress, pSMSCType ); } /*=========================================================================== METHOD: GetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSRoutes( pRouteSize, pRoutes ); } /*=========================================================================== METHOD: SetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSMSRoutes( pRouteSize, pRoutes ); } /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMSetPINProtection( id, bEnable, pValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMVerifyPIN( id, pValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMUnblockPIN( id, pPUKValue, pNewValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: This function change the PIN value PARAMETERS: id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMChangePIN( id, pOldValue, pNewValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetPINStatus( id, pStatus, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetICCID( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetICCID( stringSize, pString ); } /*=========================================================================== METHOD: UIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetControlKeyBlockingStatus( id, pStatus, pVerifyRetriesLeft, pUnblockRetriesLeft, 0 ); } /*=========================================================================== METHOD: UIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the blocking status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetControlKeyBlockingStatus( id, pStatus, pVerifyRetriesLeft, pUnblockRetriesLeft, pbBlocking); } /*=========================================================================== METHOD: UIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMSetControlKeyProtection( id, status, pValue, pVerifyRetriesLeft ); } /*=========================================================================== METHOD: UIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMUnblockControlKey( id, pValue, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: GetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSState( ULONG * pEnabled, ULONG * pTracking ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPDSState( pEnabled, pTracking ); } /*=========================================================================== METHOD: SetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSState( ULONG enable ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPDSState( enable ); } /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PDSInjectTimeReference( systemTime, systemDiscontinuities ); } /*=========================================================================== METHOD: GetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPDSDefaults( pOperation, pTimeout, pInterval, pAccuracy ); } /*=========================================================================== METHOD: SetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPDSDefaults( operation, timeout, interval, accuracy ); } /*=========================================================================== METHOD: GetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRAAutomaticDownload( pbEnabled, pInterval ); } /*=========================================================================== METHOD: SetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRAAutomaticDownload( bEnabled, interval ); } /*=========================================================================== METHOD: GetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRANetwork( ULONG * pPreference ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRANetwork( pPreference ); } /*=========================================================================== METHOD: SetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRANetwork( ULONG preference ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRANetwork( preference ); } /*=========================================================================== METHOD: GetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRAValidity( pGPSWeek, pGPSWeekOffset, pDuration ); } /*=========================================================================== METHOD: ForceXTRADownload DESCRIPTION: This function forces the XTRA database to be downloaded to the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ForceXTRADownload() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ForceXTRADownload(); } /*=========================================================================== METHOD: GetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRADataState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRADataState( pState ); } /*=========================================================================== METHOD: SetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRADataState( ULONG state ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRADataState( state ); } /*=========================================================================== METHOD: GetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRATimeState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRATimeState( pState ); } /*=========================================================================== METHOD: SetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRATimeState( ULONG state ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRATimeState( state ); } /*=========================================================================== METHOD: GetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetAGPSConfig( pServerAddress, pServerPort ); } /*=========================================================================== METHOD: SetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAGPSConfig( ULONG serverAddress, ULONG serverPort ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetAGPSConfig( serverAddress, serverPort ); } /*=========================================================================== METHOD: GetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServiceAutomaticTracking( ULONG * pbAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetServiceAutomaticTracking( pbAuto ); } /*=========================================================================== METHOD: SetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetServiceAutomaticTracking( ULONG bAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetServiceAutomaticTracking( bAuto ); } /*=========================================================================== METHOD: GetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPortAutomaticTracking( ULONG * pbAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPortAutomaticTracking( pbAuto ); } /*=========================================================================== METHOD: SetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPortAutomaticTracking( ULONG bAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPortAutomaticTracking( bAuto ); } /*=========================================================================== METHOD: ResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ResetPDSData( pGPSDataMask, pCellDataMask ); } /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CATSendTerminalResponse( refID, dataLen, pData ); } /*=========================================================================== METHOD: CATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CATSendEnvelopeCommand( cmdID, dataLen, pData ); } /*=========================================================================== METHOD: GetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSWake( pbEnabled, pWakeMask ); } /*=========================================================================== METHOD: SetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSWake( ULONG bEnable, ULONG wakeMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSMSWake( bEnable, wakeMask ); } /*=========================================================================== METHOD: OMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMStartSession( ULONG sessionType ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMStartSession( sessionType ); } /*=========================================================================== METHOD: OMADMCancelSession DESCRIPTION: This function cancels an ongoing OMA-DM session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMCancelSession() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMCancelSession(); } /*=========================================================================== METHOD: OMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMGetSessionInfo( pSessionState, pSessionType, pFailureReason, pRetryCount, pSessionPause, pTimeRemaining ); } /*=========================================================================== METHOD: OMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMGetPendingNIA( pSessionType, pSessionID ); } /*=========================================================================== METHOD: OMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSendSelection( ULONG selection, USHORT sessionID ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMSendSelection( selection, sessionID ); } /*=========================================================================== METHOD: OMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMGetFeatureSettings( pbProvisioning, pbPRLUpdate ); } /*=========================================================================== METHOD: OMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetProvisioningFeature( ULONG bProvisioning ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMSetProvisioningFeature( bProvisioning ); } /*=========================================================================== METHOD: OMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMSetPRLUpdateFeature( bPRLUpdate ); } /*=========================================================================== METHOD: OriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OriginateUSSD( BYTE * pInfo ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OriginateUSSD( pInfo ); } /*=========================================================================== METHOD: AnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AnswerUSSD( BYTE * pInfo ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->AnswerUSSD( pInfo ); } /*=========================================================================== METHOD: CancelUSSD DESCRIPTION: This function cancels an in-progress USSD operation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelUSSD() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelUSSD(); } /*=========================================================================== METHOD: UpgradeFirmware DESCRIPTION: This function performs the following set of steps: a) Verifies arguments b) Updates firmware ID on device c) Resets the device NOTE: Upon successful completion the above steps will have been completed, however the actual upgrade of the firmware will necessarily then follow. PARAMETERS: pDestinationPath [ I ] - The fully qualified path to the destination folder that the firmware download service will use RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UpgradeFirmware( CHAR * pDestinationPath ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UpgradeFirmware( pDestinationPath ); } /*=========================================================================== METHOD: GetImageInfo DESCRIPTION: Returns image information obtained from the firmware image located at the provided path PARAMETERS: pPath [ I ] - Location of the firmware image pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetImageInfo( pPath, pFirmwareID, pTechnology, pCarrier, pRegion, pGPSCapability ); } /*=========================================================================== METHOD: GetImageStore DESCRIPTION: Returns the image store folder, i.e. the folder co-located with the QDL Service executable which (by default) contains one or more carrier specific image subfolders PARAMETERS: pathSize [ I ] - Maximum number of characters (including NULL terminator) that can be copied to the image store path array pImageStorePath [ O ] - The path to the image store RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageStore( WORD pathSize, CHAR * pImageStorePath ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetImageStore( pathSize, pImageStorePath ); } /*=========================================================================== METHOD: SetSessionStateCallback DESCRIPTION: This function enables/disables the session state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSessionStateCallback( tFNSessionState pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSessionStateCallback( pCallback ); } /*=========================================================================== METHOD: SetByteTotalsCallback DESCRIPTION: This function enables/disables the RX/TX byte counts callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) interval [ I ] - Interval in seconds (ignored when disabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetByteTotalsCallback( pCallback, interval ); } /*=========================================================================== METHOD: SetDataCapabilitiesCallback DESCRIPTION: This function enables/disables the serving system data capabilities callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDataCapabilitiesCallback( pCallback ); } /*=========================================================================== METHOD: SetDataBearerCallback DESCRIPTION: This function enables/disables the data bearer status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataBearerCallback( tFNDataBearer pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDataBearerCallback( pCallback ); } /*=========================================================================== METHOD: SetDormancyStatusCallback DESCRIPTION: This function enables/disables the dormancy status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDormancyStatusCallback( tFNDormancyStatus pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDormancyStatusCallback( pCallback ); } /*=========================================================================== METHOD: SetMobileIPStatusCallback DESCRIPTION: This function enables/disables the mobile IP status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPStatusCallback( tFNMobileIPStatus pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetMobileIPStatusCallback( pCallback ); } /*=========================================================================== METHOD: SetActivationStatusCallback DESCRIPTION: This function enables/disables the activation status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActivationStatusCallback( tFNActivationStatus pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetActivationStatusCallback( pCallback ); } /*=========================================================================== METHOD: SetPowerCallback DESCRIPTION: Enable/disable power operating mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPowerCallback( tFNPower pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPowerCallback( pCallback ); } /*=========================================================================== METHOD: SetWirelessDisableCallback DESCRIPTION: Enable/disable wireless disable state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetWirelessDisableCallback( tFNWirelessDisable pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetWirelessDisableCallback( pCallback ); } /*=========================================================================== METHOD: SetRoamingIndicatorCallback DESCRIPTION: This function enables/disables the roaming indicator callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetRoamingIndicatorCallback( pCallback ); } /*=========================================================================== METHOD: SetSignalStrengthCallback DESCRIPTION: This function enables/disables the signal strength callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) thresholdsSize [ I ] - Number of elements the threshold array contain (a maximum of 5 thresholds is supported), must be 0 when disabling the callback pThresholds [ I ] - Signal threshold array (each entry in dBm), must be 0 when disabling the callback RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSignalStrengthCallback( tFNSignalStrength pCallback, BYTE thresholdsSize, INT8 * pThresholds ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } if (thresholdsSize > 0 && pThresholds == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } std::list thresholdsList; for (BYTE t = 0; t < thresholdsSize; t++) { thresholdsList.push_back( pThresholds[t] ); } return (ULONG)pAPI->SetSignalStrengthCallback( pCallback, thresholdsList ); } /*=========================================================================== METHOD: SetRFInfoCallback DESCRIPTION: This function enables/disables the RF information callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRFInfoCallback( tFNRFInfo pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetRFInfoCallback( pCallback ); } /*=========================================================================== METHOD: SetLURejectCallback DESCRIPTION: This function enables/disables the LU reject callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLURejectCallback( tFNLUReject pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetLURejectCallback( pCallback ); } /*=========================================================================== METHOD: SetPLMNModeCallback DESCRIPTION: Enable/disable PLMN mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPLMNModeCallback( tFNPLMNMode pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPLMNModeCallback( pCallback ); } /*=========================================================================== METHOD: SetNewSMSCallback DESCRIPTION: This function enables/disables the new SMS callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNewSMSCallback( tFNNewSMS pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetNewSMSCallback( pCallback ); } /*=========================================================================== METHOD: SetNMEACallback DESCRIPTION: This function enables/disables the NMEA sentence callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNMEACallback( tFNNewNMEA pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetNMEACallback( pCallback ); } /*=========================================================================== METHOD: SetPDSStateCallback DESCRIPTION: This function enables/disables the PDS service state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSStateCallback( tFNPDSState pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPDSStateCallback( pCallback ); } /*=========================================================================== METHOD: SetCATEventCallback DESCRIPTION: This function enables/disables the CAT event callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) eventMask [ I ] - Bitmask of CAT events to register for pErrorMask [ O ] - Error bitmask RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetCATEventCallback( pCallback, eventMask, pErrorMask ); } /*=========================================================================== METHOD: SetOMADMAlertCallback DESCRIPTION: This function enables/disables the OMA-DM network initiated alert callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMAlertCallback( tFNOMADMAlert pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetOMADMAlertCallback( pCallback ); } /*=========================================================================== METHOD: SetOMADMStateCallback DESCRIPTION: This function enables/disables the OMA-DM state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMStateCallback( tFNOMADMState pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetOMADMStateCallback( pCallback ); } #ifdef VOICE_SUPPORT /*=========================================================================== METHOD: SetUSSDReleaseCallback DESCRIPTION: Enable/disable USSD release callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDReleaseCallback( tFNUSSDRelease pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetUSSDReleaseCallback( pCallback ); } /*=========================================================================== METHOD: SetUSSDNotificationCallback DESCRIPTION: Enable/disable USSD notification callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDNotificationCallback( tFNUSSDNotification pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetUSSDNotificationCallback( pCallback ); } /*=========================================================================== METHOD: SetUSSDOriginationCallback DESCRIPTION: Enable/disable USSD origination callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetUSSDOriginationCallback( pCallback ); } #endif libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiConnectionMgmt/Makefile.am000066400000000000000000000012261455567757300251460ustar00rootroot00000000000000INCLUDES = \ -I$(top_srcdir)/Core \ -I$(top_srcdir)/Shared lib_LTLIBRARIES = libGobiConnectionMgmt.la libGobiConnectionMgmt_la_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT libGobiConnectionMgmt_la_SOURCES = \ GobiConnectionMgmtAPI.h \ GobiConnectionMgmt.cpp \ GobiConnectionMgmt.h \ GobiConnectionMgmtExports.cpp libGobiConnectionMgmt_la_LIBADD = \ $(top_builddir)/Database/QMI/libQMIDB.la \ $(top_builddir)/Shared/libShared.la \ $(top_builddir)/Core/libCore.la libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiImageMgmt/000077500000000000000000000000001455567757300220345ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiImageMgmt/GobiImageMgmt.cpp000077500000000000000000000202531455567757300252150ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMIImageMgmt.cpp DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiImageMgmtDLL cGobiImageMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiImageMgmt.h" #include "QMIBuffers.h" #include "QDLBuffers.h" // Global object cGobiImageMgmtDLL gImageDLL; /*=========================================================================*/ // cGobiImageMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiImageMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmtDLL::cGobiImageMgmtDLL() : mpAPI( 0 ), mbAllocated( false ) { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~cGobiImageMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmtDLL::~cGobiImageMgmtDLL() { // Just in case if (mpAPI != 0) { mpAPI->Cleanup(); delete mpAPI; mpAPI = 0; } pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the cGobiImageMgmt object RETURN VALUE: cGobiImageMgmt * ===========================================================================*/ cGobiImageMgmt * cGobiImageMgmtDLL::GetAPI() { pthread_mutex_lock( &mSyncSection ); bool bAlloc = mbAllocated; pthread_mutex_unlock( &mSyncSection ); if (bAlloc == true) { return mpAPI; } pthread_mutex_lock( &mSyncSection ); mpAPI = new cGobiImageMgmt; if (mpAPI != 0) { bool bAPI = mpAPI->Initialize(); if (bAPI == false) { delete mpAPI; mpAPI = 0; } } // We have tried to allocate/initialize the object mbAllocated = true; pthread_mutex_unlock( &mSyncSection ); return mpAPI; } /*=========================================================================*/ // cGobiImageMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiImageMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmt::cGobiImageMgmt() : cGobiQMICore(), mTargetDeviceNode( "" ), mTargetDeviceKey( "" ), mQDL() { // We require a DMS server tServerConfig dmsSvr( eQMI_SVC_DMS, true ); mServerConfig.insert( dmsSvr ); } /*=========================================================================== METHOD: ~cGobiImageMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmt::~cGobiImageMgmt() { // Nothing to do } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiImageMgmt::Initialize() { bool bRC = cGobiQMICore::Initialize(); if (bRC == false) { return bRC; } bRC = mQDL.Initialize(); return bRC; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiImageMgmt::Cleanup() { mQDL.Cleanup(); return cGobiQMICore::Cleanup(); } /*=========================================================================== METHOD: GetDeviceID (Public Method) DESCRIPTION: Set the ID of the device to target PARAMETERS: deviceID [ I ] - The device ID as reported by Windows deviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: void ===========================================================================*/ void cGobiImageMgmt::GetDeviceID( std::string & deviceID, std::string & deviceKey ) { deviceID = mTargetDeviceNode; deviceKey = mTargetDeviceKey; } /*=========================================================================== METHOD: SetDeviceID (Public Method) DESCRIPTION: Set the ID of the device to target PARAMETERS: pDeviceID [ I ] - The device ID as reported by Windows pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: bool ===========================================================================*/ bool cGobiImageMgmt::SetDeviceID( LPCSTR pDeviceID, LPCSTR pDeviceKey ) { // Clear last error recorded ClearLastError(); // If you specify a device key then you have to specify a device ID if (pDeviceID == 0 && pDeviceKey != 0) { mLastError = eGOBI_ERR_INVALID_ARG; return false; } if (pDeviceID == 0 || pDeviceID[0] == 0) { mTargetDeviceNode.clear(); mTargetDeviceKey.clear(); } else { mTargetDeviceNode = pDeviceID; if (pDeviceKey == 0 || pDeviceKey[0] == 0) { mTargetDeviceKey.clear(); } else { mTargetDeviceKey = pDeviceKey; } } return true; } /*=========================================================================== METHOD: ResetDevice (Public Method) DESCRIPTION: This function resets the device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiImageMgmt::ResetDevice() { WORD msgID = (WORD)eQMI_DMS_SET_OPERATING_MODE; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, "5" ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiImageMgmt/GobiImageMgmt.h000077500000000000000000000145131455567757300246640ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageMgmt.h DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiImageMgmtDLL cGobiImageMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" #include "GobiQDLCore.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cGobiImageMgmt /*=========================================================================*/ class cGobiImageMgmt : public cGobiQMICore { public: // Constructor cGobiImageMgmt(); // Destructor virtual ~cGobiImageMgmt(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // Get the ID of the device to target void GetDeviceID( std::string & deviceID, std::string & deviceKey ); // Set the ID of the device to target bool SetDeviceID( LPCSTR pDeviceID = 0, LPCSTR pDeviceKey = 0 ); // This function resets the device eGobiError ResetDevice(); // (Inline) Return the set of available Gobi QDL ports std::vector GetAvailableQDLPorts() { return mQDL.GetAvailableQDLPorts(); }; // (Inline) Set the timeout for QDL transactions eGobiError SetQDLTimeout( ULONG to ) { return mQDL.SetQDLTimeout( to ); }; // (Inline) Open the specified QDL port of the device eGobiError OpenQDLPort( std::string & portID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ) { return mQDL.OpenQDLPort( portID, bBARMode, pMajorVersion, pMinorVersion ); }; // (Inline) Close the specified QDL port of the device eGobiError CloseQDLPort( bool bInformDevice ) { return mQDL.CloseQDLPort( bInformDevice ); }; // (Inline) Get the images preference as from the device boot downloader eGobiError GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { return mQDL.GetQDLImagesPreference( pImageListSize, pImageList ); }; // (Inline) Prepare the device boot downloader for an image write eGobiError PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ) { return mQDL.PrepareQDLImageWrite( imageType, imageSize, pBlockSize ); }; // (Inline) Write the specified image block to the device eGobiError WriteQDLImageBlock( USHORT sequenceNumber, ULONG chunkSize, BYTE * pImageBlock ) { return mQDL.WriteQDLImageBlock( sequenceNumber, chunkSize, pImageBlock ); }; // (Inline) Request the device validate the written images eGobiError ValidateQDLImages( BYTE * pImageType ) { return mQDL.ValidateQDLImages( pImageType ); }; protected: /* Device node/key of the device to target */ std::string mTargetDeviceNode; std::string mTargetDeviceKey; /* QDL protocol server */ cGobiQDLCore mQDL; }; /*=========================================================================*/ // Class cGobiImageMgmtDLL /*=========================================================================*/ class cGobiImageMgmtDLL { public: // Constructor cGobiImageMgmtDLL(); // Destructor virtual ~cGobiImageMgmtDLL(); // Return the GobiImageMgmt object cGobiImageMgmt * GetAPI(); protected: /* API interface object */ cGobiImageMgmt * mpAPI; /* Above object allocation attempted? */ bool mbAllocated; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern cGobiImageMgmtDLL gImageDLL; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiImageMgmt/GobiImageMgmtAPI.h000077500000000000000000000335651455567757300252260ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageMgmtAPI.h DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #endif /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once /*=========================================================================*/ // Definitions /*=========================================================================*/ #ifdef __cplusplus extern "C" { #endif /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: GobiEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ); /*=========================================================================== METHOD: SetDeviceID DESCRIPTION: This function sets the ID of the device to target PARAMETERS: pDeviceID [ I ] - The device ID as reported by Windows pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDeviceID( CHAR * pDeviceID, CHAR * pDeviceKey ); /*=========================================================================== METHOD: GetImagesPreference DESCRIPTION: This function gets the current images preference PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); /*=========================================================================== METHOD: SetImagesPreference DESCRIPTION: This function sets the current images preference PARAMETERS: imageListSize [ I ] - The size in BYTEs of the image list array pImageList [ I ] - The image list array bForceDownload [ I ] - Force device to download images from host? modemIndex [ I ] - Desired storage index for downloaded modem image pImageTypesSize [I/O] - Upon input the maximum number of elements that the download image types array can contain. Upon successful output the actual number of elements in the download image types array pImageTypes [ O ] - The download image types array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ); /*=========================================================================== METHOD: GetBARMode DESCRIPTION: This function returns the boot and recovery image download mode PARAMETERS: pBARMode [ O ] - Boot and recovery image download mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetBARMode( ULONG * pBARMode ); /*=========================================================================== METHOD: SetBARMode DESCRIPTION: This function requests the device enter boot and recovery image download mode after the next reset RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetBARMode(); /*=========================================================================== METHOD: GetStoredImages DESCRIPTION: This function gets the list of images stored on the device PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ); /*=========================================================================== METHOD: GetStoredImageInfo DESCRIPTION: This function returns info about the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader pVersionID [ O ] - Image version ID pInfo [ O ] - Image info string pLockID [ O ] - Image OEM lock ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ); /*=========================================================================== METHOD: DeleteStoredImage DESCRIPTION: This function deletes the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ); /*=========================================================================== METHOD: ResetDevice DESCRIPTION: This function resets the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetDevice(); /*=========================================================================== METHOD: GobiEnumerateQDLPorts DESCRIPTION: This function enumerates the Gobi QDL port IDs currently attached to the system PARAMETERS: pPortSize [I/O] - Upon input the maximum number of elements that the port ID array can contain. Upon successful output the actual number of elements in the port ID array pPorts [ O ] - Port ID array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateQDLPorts( BYTE * pPortSize, BYTE * pPorts ); /*=========================================================================== METHOD: SetQDLTimeout DESCRIPTION: This function sets the timeout for all subsequent QDL transactions PARAMETERS: to [ O ] - Timeout (in milliseconds) for subsequent transactions RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetQDLTimeout( ULONG to ); /*=========================================================================== METHOD: OpenQDLPort DESCRIPTION: This function opens the specified QDL port of the device PARAMETERS: pPortID [ I ] - ID of QDL port to connect to bBARMode [ I ] - Request boot and recovery mode feature pMajorVersion [ O ] - Major version of the device boot downloader pMinorVersion [ O ] - Minor version of the device boot downloader RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OpenQDLPort( CHAR * pPortID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ); /*=========================================================================== METHOD: CloseQDLPort DESCRIPTION: This function closes the currently open QDL port of the device PARAMETERS: bInformDevice [ I ] - Inform device that QDL port is being closed? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CloseQDLPort( ULONG bInformDevice ); /*=========================================================================== METHOD: GetQDLImagesPreference DESCRIPTION: This function gets the current images preference as reported by the device boot downloader PARAMETERS: pImageListSize [I/O] - Upon input the maximum number of elements that the image info list can contain. Upon successful output the actual number of elements in the image info list pImageList [ O ] - The image info list RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); /*=========================================================================== METHOD: PrepareQDLImageWrite DESCRIPTION: This function prepares the device boot downloader for an image write PARAMETERS: imageType [ I ] - Type of image being written imageSize [ I ] - Size of image being written pBlockSize [I/O] - Upon input the maximum size of image block supported by host, upon successful output the maximum size of image block supported by device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ); /*=========================================================================== METHOD: WriteQDLImageBlock DESCRIPTION: This function writes the specified image block to the device PARAMETERS: sequenceNumber [ I ] - Sequence number for image write blockSize [ I ] - Size of image block pImageBlock [ I ] - Image block RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WriteQDLImageBlock( USHORT sequenceNumber, ULONG blockSize, BYTE * pImageBlock ); /*=========================================================================== METHOD: ValidateQDLImages DESCRIPTION: This function requests the device validate the written images PARAMETERS: pImageType [ O ] - Upon failure this may contain the type of the image that failed validation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateQDLImages( BYTE * pImageType ); #ifdef __cplusplus }; #endif libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiImageMgmt/GobiImageMgmtExports.cpp000077500000000000000000000615351455567757300266120ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageMgmtExports.cpp DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 exports Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiImageMgmt.h" #include "GobiImageMgmtAPI.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for adapter device path const ULONG MAX_DI_DEVICE_PATH = 256; // Maximum length for adapter key const ULONG MAX_DI_KEY = 16; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sDeviceInfo // Struct to represent Gobi device info /*=========================================================================*/ struct sDeviceInfoElement { public: CHAR mPath[MAX_DI_DEVICE_PATH]; CHAR mKey[MAX_DI_KEY]; }; /*=========================================================================*/ // Struct sPortInfo // Struct to represent Gobi QDL port info /*=========================================================================*/ struct sPortInfoElement { public: CHAR mPath[MAX_DI_DEVICE_PATH]; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: GobiEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pDevicesSize == 0 || pDevices == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pDevicesSize; *pDevicesSize = 0; // Obtain adapter info std::vector adapters; adapters = pAPI->GetAvailableDevices(); ULONG sz = (ULONG)adapters.size(); if (sz > (ULONG)maxInstances) { sz = (ULONG)maxInstances; } sDeviceInfoElement * pOutput = (sDeviceInfoElement *)pDevices; for (ULONG a = 0; a < sz; a++) { const cGobiQMICore::tDeviceID & id = adapters[a]; memset( &pOutput->mPath[0], 0, (SIZE_T)MAX_DI_DEVICE_PATH ); memset( &pOutput->mKey[0], 0, (SIZE_T)MAX_DI_KEY ); ULONG len = id.first.size(); if (len > 0) { if (len >= MAX_DI_DEVICE_PATH) { len = MAX_DI_DEVICE_PATH - 1; } LPCSTR pStr = (LPCSTR)id.first.c_str(); memcpy( (LPVOID)&pOutput->mPath[0], (LPCVOID)pStr, (SIZE_T)len ); } len = id.second.size(); if (len > 0) { if (len >= MAX_DI_KEY) { len = MAX_DI_KEY - 1; } LPCSTR pStr = (LPCSTR)id.second.c_str(); memcpy( (LPVOID)&pOutput->mKey[0], (LPCVOID)pStr, (SIZE_T)len ); } pOutput++; } *pDevicesSize = (BYTE)sz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetDeviceID DESCRIPTION: This function sets the ID of the device to target PARAMETERS: pDeviceID [ I ] - The device ID as reported by Windows pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDeviceID( CHAR * pDeviceID, CHAR * pDeviceKey ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bOK = pAPI->SetDeviceID( pDeviceID, pDeviceKey ); if (bOK == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetImagesPreference DESCRIPTION: This function gets the current images preference PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetImagesPreference( pImageListSize, pImageList ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: SetImagesPreference DESCRIPTION: This function sets the current images preference PARAMETERS: imageListSize [ I ] - The size in BYTEs of the image list array pImageList [ I ] - The image list array bForceDownload [ I ] - Force device to download images from host? modemIndex [ I ] - Desired storage index for downloaded modem image pImageTypesSize [I/O] - Upon input the maximum number of elements that the download image types array can contain. Upon successful output the actual number of elements in the download image types array pImageTypes [ O ] - The download image types array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->SetImagesPreference( imageListSize, pImageList, bForceDownload, modemIndex, pImageTypesSize, pImageTypes ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GetBARMode DESCRIPTION: This function returns the boot and recovery image download mode PARAMETERS: pBARMode [ O ] - Boot and recovery image download mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetBARMode( ULONG * pBARMode ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetBARMode( pBARMode ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: SetBARMode DESCRIPTION: This function requests the device enter boot and recovery image download mode after the next reset RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetBARMode() { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->SetBARMode(); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GetStoredImages DESCRIPTION: This function gets the list of images stored on the device PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetStoredImages( pImageListSize, pImageList ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GetStoredImageInfo DESCRIPTION: This function returns info about the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader pVersionID [ O ] - Image version ID pInfo [ O ] - Image info string pLockID [ O ] - Image OEM lock ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetStoredImageInfo( imageInfoSize, pImageInfo, pMajorVersion, pMinorVersion, pVersionID, pInfo, pLockID ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: DeleteStoredImage DESCRIPTION: This function deletes the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->DeleteStoredImage( imageInfoSize, pImageInfo ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: ResetDevice DESCRIPTION: This function resets the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetDevice() { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->ResetDevice(); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GobiEnumerateQDLPorts DESCRIPTION: This function enumerates the Gobi QDL port IDs currently attached to the system PARAMETERS: pPortSize [I/O] - Upon input the maximum number of elements that the port ID array can contain. Upon successful output the actual number of elements in the port ID array pPorts [ O ] - Port ID array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateQDLPorts( BYTE * pPortSize, BYTE * pPorts ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pPortSize == 0 || *pPortSize == 0 || pPorts == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } BYTE maxPorts = *pPortSize; *pPortSize = 0; std::vector ports = pAPI->GetAvailableQDLPorts(); ULONG portCount = (ULONG)ports.size(); if (portCount > maxPorts) { portCount = (ULONG)maxPorts; } sPortInfoElement * pOutput = (sPortInfoElement *)pPorts; for (ULONG a = 0; a < portCount; a++) { memset( &pOutput->mPath[0], 0, (SIZE_T)MAX_DI_DEVICE_PATH ); ULONG len = ports[a].size(); if (len > 0) { if (len >= MAX_DI_DEVICE_PATH) { len = MAX_DI_DEVICE_PATH - 1; } LPCSTR pStr = ports[a].c_str(); memcpy( (LPVOID)&pOutput->mPath[0], (LPCVOID)pStr, (SIZE_T)len ); } pOutput++; } *pPortSize = (BYTE)portCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetQDLTimeout DESCRIPTION: This function sets the timeout for all subsequent QDL transactions PARAMETERS: to [ O ] - Timeout (in milliseconds) for subsequent transactions RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetQDLTimeout( ULONG to ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetQDLTimeout( to ); } /*=========================================================================== METHOD: OpenQDLPort DESCRIPTION: This function opens the specified QDL port of the device PARAMETERS: pPortID [ I ] - ID of QDL port to connect to bBARMode [ I ] - Request boot and recovery mode feature pMajorVersion [ O ] - Major version of the device boot downloader pMinorVersion [ O ] - Minor version of the device boot downloader RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OpenQDLPort( CHAR * pPortID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string strPortID( (const char *)pPortID ); return (ULONG)pAPI->OpenQDLPort( strPortID, bBARMode, pMajorVersion, pMinorVersion ); } /*=========================================================================== METHOD: CloseQDLPort DESCRIPTION: This function closes the currently open QDL port of the device PARAMETERS: bInformDevice [ I ] - Inform device that QDL port is being closed? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CloseQDLPort( ULONG bInformDevice ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bTmp = (bInformDevice != 0); return (ULONG)pAPI->CloseQDLPort( bTmp ); } /*=========================================================================== METHOD: GetQDLImagesPreference DESCRIPTION: This function gets the current images preference as reported by the device boot downloader PARAMETERS: pImageListSize [I/O] - Upon input the maximum number of elements that the image info list can contain. Upon successful output the actual number of elements in the image info list pImageList [ O ] - The image info list RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetQDLImagesPreference( pImageListSize, pImageList ); } /*=========================================================================== METHOD: PrepareQDLImageWrite DESCRIPTION: This function prepares the device boot downloader for an image write PARAMETERS: imageType [ I ] - Type of image being written imageSize [ I ] - Size of image being written pBlockSize [I/O] - Upon input the maximum size of image block supported by host, upon successful output the maximum size of image block supported by device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PrepareQDLImageWrite( imageType, imageSize, pBlockSize ); } /*=========================================================================== METHOD: WriteQDLImageBlock DESCRIPTION: This function writes the specified image block to the device PARAMETERS: sequenceNumber [ I ] - Sequence number for image write blockSize [ I ] - Size of image block pImageBlock [ I ] - Image block RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WriteQDLImageBlock( USHORT sequenceNumber, ULONG blockSize, BYTE * pImageBlock ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->WriteQDLImageBlock( sequenceNumber, blockSize, pImageBlock ); } /*=========================================================================== METHOD: ValidateQDLImages DESCRIPTION: This function requests the device validate the written images PARAMETERS: pImageType [ O ] - Upon failure this may contain the type of the image that failed validation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateQDLImages( BYTE * pImageType ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ValidateQDLImages( pImageType ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiImageMgmt/Makefile.am000066400000000000000000000011561455567757300240730ustar00rootroot00000000000000INCLUDES = \ -I$(top_srcdir)/Core \ -I$(top_srcdir)/Shared lib_LTLIBRARIES = libGobiImageMgmt.la libGobiImageMgmt_la_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT libGobiImageMgmt_la_SOURCES = \ GobiImageMgmtAPI.h \ GobiImageMgmt.h \ GobiImageMgmt.cpp \ GobiImageMgmtExports.cpp libGobiImageMgmt_la_LIBADD = \ $(top_builddir)/Database/QMI/libQMIDB.la \ $(top_builddir)/Shared/libShared.la \ $(top_builddir)/Core/libCore.la libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiQDLService/000077500000000000000000000000001455567757300221265ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiQDLService/99-GobiQDLService.rules000077500000000000000000000037301455567757300262110ustar00rootroot00000000000000#=========================================================================== # FILE: # 99-GobiQDLService.rules # # DESCRIPTION: # Udev rules for Qualcomm Downloader application (GobiQDLService) # # PUBLIC CLASSES AND METHODS: # Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================ ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="920c", RUN+="/opt/Qualcomm/Gobi/GobiQDLService/GobiQDLService" libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiQDLService/Main.cpp000077500000000000000000000137551455567757300235340ustar00rootroot00000000000000/*=========================================================================== FILE: Main.cpp DESCRIPTION: Firmware downloader using cGobiQDLCore class PUBLIC CLASSES AND FUNCTIONS: Run main Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQDLCore.h" #include "QDLBuffers.h" #include "MemoryMappedFile.h" #include //--------------------------------------------------------------------------- // Free Methods //--------------------------------------------------------------------------- /*=========================================================================== METHOD: Run (Public Method) DESCRIPTION: Simple QDL download RETURN VALUE: bool ===========================================================================*/ bool Run() { cGobiQDLCore qdl; bool bRC = qdl.Initialize(); if (bRC == false) { syslog( LOG_INFO, "Failed to initialize QDL core" ); return bRC; } qdl.SetQDLTimeout( 10000 ); std::vector qdlPorts = qdl.GetAvailableQDLPorts(); if (qdlPorts.size() == 0) { syslog( LOG_INFO, "No QDL devices found" ); return false; } std::string portName = qdlPorts[0]; syslog( LOG_INFO, "Download started to port %s", portName.c_str() ); // Connect to port ULONG maj = ULONG_MAX; ULONG min = ULONG_MAX; eGobiError err = qdl.OpenQDLPort( portName, 0, &maj, &min ); if (err != eGOBI_ERR_NONE) { syslog( LOG_INFO, "OpenQDLPort( %s ) = %d", portName.c_str(), err ); return false; } ULONG bufSz = 12; sQDLRawImageID buf[12]; err = qdl.GetQDLImagesPreference( &bufSz, (BYTE *)&buf[0] ); if (err != eGOBI_ERR_NONE) { syslog( LOG_INFO, "GetQDLImagesPreference() = %d", err ); qdl.CloseQDLPort( false ); return false; } if (bufSz > 12) { syslog( LOG_INFO, "GetQDLImagesPreference(), bufSz = %lu", bufSz ); qdl.CloseQDLPort( false ); return false; } bool bErr = false; for (ULONG i = 0; i < bufSz; i++) { std::string img = ::GetImageByUniqueID( &buf[i].mImageID[0] ); if (img.size() <= 0) { // Skip files we do not have access to syslog( LOG_INFO, "GetImageByUniqueID() failure" ); return false; } ULONG fileMaj = 0; ULONG fileMin = 0; err = ::GetImageBootCompatibility( img.c_str(), &fileMaj, &fileMin ); if (err != eGOBI_ERR_NONE || fileMaj != maj) { // Skip files that may not be compatible syslog( LOG_INFO, "GetImageBootCompatibility() failure [%d]", err ); return false; } cMemoryMappedFile imgFile( img.c_str() ); syslog( LOG_INFO, "Downloading %s", img.c_str() ); LPVOID pImgData = imgFile.GetContents(); ULONG imgSz = imgFile.GetSize(); if (pImgData == 0 || imgSz == 0) { syslog( LOG_INFO, "Image file failure [%s]", img.c_str() ); bErr = true; return false; } ULONG blockSz = QDL_MAX_CHUNK_SIZE; err = qdl.PrepareQDLImageWrite( buf[i].mImageType, imgSz, &blockSz ); if (err != eGOBI_ERR_NONE) { if (err == eGOBI_ERR_QDL_OPEN_SKIP) { // Device already has this file continue; } else { syslog( LOG_INFO, "PrepareQDLImageWrite() = %d", err ); bErr = true; break; } } err = qdl.WriteQDLImageBlock( 0, imgSz, (BYTE *)pImgData ); if (err != eGOBI_ERR_NONE) { syslog( LOG_INFO, "WriteQDLImageBlock() = %d", err ); bErr = true; break; } } if (bErr == false) { syslog( LOG_INFO, "Download completed" ); BYTE errImg; qdl.ValidateQDLImages( &errImg ); } qdl.CloseQDLPort( true ); } /*=========================================================================== METHOD: main (Public Method) DESCRIPTION: Application entry point RETURN VALUE: int - Process exit code ===========================================================================*/ int main() { // Add PID to log statements openlog( "GobiQDLService", LOG_PID, LOG_USER ); bool bSuccess = Run(); closelog(); return (bSuccess ? 0 : -1 ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/GobiQDLService/Makefile.am000066400000000000000000000010151455567757300241570ustar00rootroot00000000000000INCLUDES = \ -I$(top_srcdir)/Core \ -I$(top_srcdir)/Shared bin_PROGRAMS = GobiQDLService GobiQDLService_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT GobiQDLService_SOURCES = Main.cpp GobiQDLService_LDADD = \ $(top_builddir)/Database/QMI/libQMIDB.la \ $(top_builddir)/Shared/libShared.la \ $(top_builddir)/Core/libCore.la \ -lrt libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/INSTALL000066400000000000000000000363321455567757300204240ustar00rootroot00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Makefile.am000066400000000000000000000001711455567757300214170ustar00rootroot00000000000000SUBDIRS= \ Database \ Shared \ Core \ GobiConnectionMgmt \ GobiImageMgmt \ GobiQDLService ACLOCAL_AMFLAGS = -I m4 libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/NEWS000066400000000000000000000000001455567757300200510ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/README000066400000000000000000000000001455567757300202320ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/000077500000000000000000000000001455567757300205725ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiError.h000077500000000000000000000145051455567757300226450ustar00rootroot00000000000000/*=========================================================================== FILE: GobiError.h DESCRIPTION: QUALCOMM Gobi Errors Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QMIEnum.h" #include "QDLEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiError Enumeration // Gobi API Error Enumeration /*=========================================================================*/ enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrorCode) eGOBI_ERR_QMI_OFFSET = 1000, // Offset from which mapped QDL errors start from (see eQDLError) eGOBI_ERR_QDL_OFFSET = 100000 }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eGobiError validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eGobiError ec ) { bool retVal = false; if (ec > eGOBI_ERR_ENUM_BEGIN && ec < eGOBI_ERR_ENUM_END) { retVal = true; } if (ec >= eGOBI_ERR_QMI_OFFSET && ec < eGOBI_ERR_QDL_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QMI_OFFSET; retVal = ::IsValid( (eQMIErrorCode)tmp ); } if (ec >= eGOBI_ERR_QDL_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QDL_OFFSET; retVal = ::IsValid( (eQDLError)tmp ); } return retVal; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiImageDefinitions.h000077500000000000000000000152631455567757300247740ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageDefinitions.h DESCRIPTION: QUALCOMM Gobi Image related definitions PUBLIC CLASSES AND FUNCTIONS: eGobiDeviceType eGobiMBNType eGobiImageTech eGobiImageCarrier eGobiImageRegion eGobiImageGPS Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiDeviceType Enumeration // Gobi Device Interface Enumeration /*=========================================================================*/ enum eGobiDeviceType { eGOBI_DEV_ENUM_BEGIN = -1, eGOBI_DEV_NET, // 0 - Network adapter eGOBI_DEV_NMEA, // 1 - NMEA COM port eGOBI_DEV_DIAG, // 2 - DIAG port eGOBI_DEV_MODEM, // 3 - Modem eGOBI_DEV_AT, // 4 - AT port eGOBI_DEV_NET2, // 5 - Auxiliary network adapter eGOBI_DEV_QDL, // 6 - QDL port (should always be last) eGOBI_DEV_ENUM_END }; /*=========================================================================*/ // eGobiMBNType Enumeration // Gobi MBN File Type Enumeration /*=========================================================================*/ enum eGobiMBNType { eGOBI_MBN_TYPE_ENUM_BEGIN = -1, eGOBI_MBN_TYPE_MODEM, // 0 - Modem/AMSS eGOBI_MBN_TYPE_PRI, // 1 - PRI/UQCN eGOBI_MBN_TYPE_ENUM_END, }; /*=========================================================================*/ // eGobiImageTech Enumeration // Gobi Image Technology Enumeration /*=========================================================================*/ enum eGobiImageTech { eGOBI_IMG_TECH_CDMA = 0, // 0 - CDMA eGOBI_IMG_TECH_UMTS // 1 - UMTS }; /*=========================================================================*/ // eGobiImageCarrier Enumeration // Gobi Image Carrier Enumeration /*=========================================================================*/ enum eGobiImageCarrier { eGOBI_IMG_CAR_GENERIC = 1, // 001 eGOBI_IMG_CAR_FACTORY, // 002 eGOBI_IMG_CAR_NORF, // 003 eGOBI_IMG_CAR_VERIZON = 101, // 101 eGOBI_IMG_CAR_SPRINT, // 102 eGOBI_IMG_CAR_ALLTEL, // 103 eGOBI_IMG_CAR_BELL, // 104 eGOBI_IMG_CAR_TELUS, // 105 eGOBI_IMG_CAR_US, // 106 eGOBI_IMG_CAR_TELSTRA1, // 107 eGOBI_IMG_CAR_CHINA_UNICOM, // 108 eGOBI_IMG_CAR_TELCOM_NZ, // 109 eGOBI_IMG_CAR_SK_TELCOM1, // 110 eGOBI_IMG_CAR_RELIANCE1, // 111 eGOBI_IMG_CAR_TATA, // 112 eGOBI_IMG_CAR_METROPCS, // 113 eGOBI_IMG_CAR_LEAP, // 114 eGOBI_IMG_CAR_KDDI, // 115 eGOBI_IMG_CAR_IUSACELL, // 116 eGOBI_IMG_CAR_CHINA_TELECOM, // 117 eGOBI_IMG_CAR_OMH, // 118 eGOBI_IMG_CAR_ATT = 201, // 201 eGOBI_IMG_CAR_VODAFONE, // 202 eGOBI_IMG_CAR_TMOBILE, // 203 eGOBI_IMG_CAR_ORANGE, // 204 eGOBI_IMG_CAR_TELEFONICA, // 205 eGOBI_IMG_CAR_TELCOM_ITALIA, // 206 eGOBI_IMG_CAR_3, // 207 eGOBI_IMG_CAR_O2, // 208 eGOBI_IMG_CAR_SFR, // 209 eGOBI_IMG_CAR_SWISSCOM, // 210 eGOBI_IMG_CAR_CHINA_MOBILE, // 211 eGOBI_IMG_CAR_TELSTRA2, // 212 eGOBI_IMG_CAR_SINGTEL_OPTUS, // 213 eGOBI_IMG_CAR_RELIANCE2, // 214 eGOBI_IMG_CAR_BHARTI, // 215 eGOBI_IMG_CAR_NTT_DOCOMO, // 216 eGOBI_IMG_CAR_EMOBILE, // 217 eGOBI_IMG_CAR_SOFTBANK, // 218 eGOBI_IMG_CAR_KT_FREETEL, // 219 eGOBI_IMG_CAR_SK_TELCOM2, // 220 eGOBI_IMG_CAR_TELENOR, // 221 eGOBI_IMG_CAR_NETCOM, // 222 eGOBI_IMG_CAR_TELIASONERA, // 223 eGOBI_IMG_CAR_AMX_TELCEL, // 224 eGOBI_IMG_CAR_BRASIL_VIVO // 225 }; /*=========================================================================*/ // eGobiImageRegion Enumeration // Gobi Image Region Enumeration /*=========================================================================*/ enum eGobiImageRegion { eGOBI_IMG_REG_NA = 0, // 0 - North America eGOBI_IMG_REG_LA, // 1 - Latin America eGOBI_IMG_REG_EU, // 2 - Europe eGOBI_IMG_REG_ASIA, // 3 - Asia eGOBI_IMG_REG_AUS, // 4 - Australia eGOBI_IMG_REG_GLOBAL // 5 - Global }; /*=========================================================================*/ // eGobiImageGPS Enumeration // Gobi Image GPS Enumeration /*=========================================================================*/ enum eGobiImageGPS { eGOBI_IMG_GPS_NONE = 0, // 0 - None eGOBI_IMG_GPS_STAND_ALONE, // 1 - Stand-alone eGOBI_IMG_GPS_ASSISTED, // 2 - Stand-alone + AGPS + XTRA eGOBI_IMG_GPS_NO_XTRA // 3 - Stand-alone + AGPS }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiMBNMgmt.cpp000077500000000000000000000654641455567757300233620ustar00rootroot00000000000000/*=========================================================================== FILE: GobiMBNMgmt.cpp DESCRIPTION: QUALCOMM Gobi MBN management functions for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: GetImageStore GetImageInfo GetImagesInfo GetImageBootCompatibility MapVersionInfo GetImageByUniqueID Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiMBNMgmt.h" #include "GobiError.h" #include "CoreUtilities.h" #include "MemoryMappedFile.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Magic values for MBN (AMSS/UQCN) images const ULONG MBN_LOCK_MAGIC = 0x809b1d80; const ULONG MBN_BOOT_MAGIC = 0xFEDC1234; const ULONG MBN_BUILD_MAGIC = 0xFEDC1235; const ULONG UQCN_INFO_MAGIC = 0xFEDC1236; const ULONG MBN_HASH_MAGIC = 0xFEDC1237; const ULONG MBN_LOCK_AUTH_MAGIC = 0xFEDC1238; // Maximum length for an UQCN build info string (including NULL) const ULONG MBN_BUILD_ID_LEN = 32; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sMBNBootRecord // Struct to represent the MBN boot flash record /*=========================================================================*/ struct sMBNBootRecord { public: ULONG mMagic; // MBN_BOOT_MAGIC WORD mMajorID; // Boot flash major version WORD mMinorID; // Boot flash minor version }; /*=========================================================================*/ // Struct sMBNBuildRecord // Struct to represent the build ID record /*=========================================================================*/ struct sMBNBuildIDRecord { public: ULONG mMagic; // MBN_BUILD_MAGIC CHAR mBuildID[MBN_BUILD_ID_LEN]; // Build ID string }; /*=========================================================================*/ // Struct sUQCNVersionID // Struct to represent the UQCN version ID /*=========================================================================*/ struct sUQCNVersionID { public: ULONG mMinorID : 7; ULONG mXTRADisabled : 1; ULONG mGPSDisabled : 1; ULONG mReserved : 7; ULONG mMajorID : 8; ULONG mSystem : 2; ULONG mCompatibility : 6; }; /*=========================================================================*/ // Struct sUQCNInfoRecord // Struct to represent the UQCN information record /*=========================================================================*/ struct sUQCNInfoRecord { public: ULONG mMagic; // UQCN_INFO_MAGIC sUQCNVersionID mVersionID; // Version ID CHAR mInfo[MBN_BUILD_ID_LEN]; // Build info string }; /*=========================================================================*/ // Struct sMBNHashRecord // Struct to represent the signature hash record /*=========================================================================*/ struct sMBNHashRecord { public: ULONG mMagic; // MBN_HASH_MAGIC BYTE mUniqueID[MBN_UNIQUE_ID_LEN]; // Build ID string }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ReverseBinaryDataSearch (Free Method) DESCRIPTION: Search a data buffer for the first occurence of a specified sequence of data (starting from the end of the buffer) PARAMETERS: pBuffer [ I ] - Buffer being search bufferLen [ I ] - Length of above buffer pData [ I ] - Data to search for dataLen [ I ] - Length of above buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ const BYTE * ReverseBinaryDataSearch( const BYTE * pBuffer, ULONG bufferLen, const BYTE * pData, ULONG dataLen ) { // Handle empty cases if (pBuffer == 0 || bufferLen == 0 || pData ==0 || dataLen == 0) { return 0; } // Handle impossible case if (dataLen > bufferLen) { return 0; } const BYTE * pTmp = pBuffer + (bufferLen - dataLen); while (pTmp > pBuffer) { int res = ::memcmp( (const void *)pTmp, (const void *)pData, (size_t)dataLen ); if (res == 0) { return pTmp; } pTmp--; } return 0; } /*=========================================================================== METHOD: ParseUQCNVersion (Free Method) DESCRIPTION: Parse UQCN version ID to image information PARAMETERS: uqcnID [ I ] - UQCN ID pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: bool ===========================================================================*/ bool ParseUQCNVersion( ULONG uqcnID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Assume failure bool bRC = false; *pTechnology = ULONG_MAX; *pCarrier = ULONG_MAX; *pRegion = ULONG_MAX; *pGPSCapability = ULONG_MAX; sUQCNVersionID * pID = (sUQCNVersionID *)&uqcnID; if (pID->mSystem == 2) { // Successs is returned when the technology is valid *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; bRC = true; } else if (pID->mSystem == 1) { // Successs is returned when the technology is valid *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; bRC = true; } // Valid technology? if (bRC == false) { return bRC; } switch (pID->mMajorID) { case 0x00: *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x01: *pCarrier = (ULONG)eGOBI_IMG_CAR_VERIZON; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x02: *pCarrier = (ULONG)eGOBI_IMG_CAR_SPRINT; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x03: *pCarrier = (ULONG)eGOBI_IMG_CAR_ATT; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x04: *pCarrier = (ULONG)eGOBI_IMG_CAR_VODAFONE; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x05: *pCarrier = (ULONG)eGOBI_IMG_CAR_TMOBILE; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x09: *pCarrier = (ULONG)eGOBI_IMG_CAR_GENERIC; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x0B: *pCarrier = (ULONG)eGOBI_IMG_CAR_ORANGE; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x0C: *pCarrier = (ULONG)eGOBI_IMG_CAR_TELEFONICA; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x0D: *pCarrier = (ULONG)eGOBI_IMG_CAR_NTT_DOCOMO; *pRegion = (ULONG)eGOBI_IMG_REG_ASIA; break; case 0x0E: *pCarrier = (ULONG)eGOBI_IMG_CAR_TELCOM_ITALIA; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x12: *pCarrier = (ULONG)eGOBI_IMG_CAR_TELCOM_NZ; *pRegion = (ULONG)eGOBI_IMG_REG_AUS; break; case 0x13: *pCarrier = (ULONG)eGOBI_IMG_CAR_CHINA_TELECOM; *pRegion = (ULONG)eGOBI_IMG_REG_ASIA; break; case 0x14: *pCarrier = (ULONG)eGOBI_IMG_CAR_OMH; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x16: *pCarrier = (ULONG)eGOBI_IMG_CAR_AMX_TELCEL; *pRegion = (ULONG)eGOBI_IMG_REG_LA; break; case 0x17: *pCarrier = (ULONG)eGOBI_IMG_CAR_NORF; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x18: *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x19: *pCarrier = (ULONG)eGOBI_IMG_CAR_BRASIL_VIVO; *pRegion = (ULONG)eGOBI_IMG_REG_LA; break; } // Set GPS capability if (pID->mGPSDisabled == 1) { *pGPSCapability = (ULONG)eGOBI_IMG_GPS_NONE; } else if (*pCarrier == (ULONG)eGOBI_IMG_CAR_NORF) { // No RF with GPS results in stand-alone GPS support only *pGPSCapability = (ULONG)eGOBI_IMG_GPS_STAND_ALONE; } else { if (pID->mXTRADisabled == 1) { *pGPSCapability = (ULONG)eGOBI_IMG_GPS_NO_XTRA; } else { *pGPSCapability = (ULONG)eGOBI_IMG_GPS_ASSISTED; } } return bRC; } /*=========================================================================== METHOD: ParseAMSSVersion (Free Method) DESCRIPTION: Parse UQCN version ID to image information PARAMETERS: pVersion [ I ] - Version string pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: bool ===========================================================================*/ bool ParseAMSSVersion( LPCSTR pVersion, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Assume failure bool bRC = false; *pTechnology = ULONG_MAX; *pCarrier = ULONG_MAX; *pRegion = ULONG_MAX; *pGPSCapability = ULONG_MAX; // Validate arguments if (pVersion == 0 || pVersion[0] == 0) { return bRC; } std::string tmpVer = pVersion; // std::string version of MakeUpper() transform( tmpVer.begin(), tmpVer.end(), tmpVer.begin(), toupper ); if ( (tmpVer.find( "STAUFH" ) != std::string::npos) || (tmpVer.find( "STSUFH" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUVH" ) != std::string::npos) || (tmpVer.find( "STSUVH" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_VERIZON; *pRegion = (ULONG)eGOBI_IMG_REG_NA; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUSH" ) != std::string::npos) || (tmpVer.find( "STSUSH" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_SPRINT; *pRegion = (ULONG)eGOBI_IMG_REG_NA; bRC = true; return bRC; } else if (tmpVer.find( "STSUCH" ) != std::string::npos) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_CHINA_TELECOM; *pRegion = (ULONG)eGOBI_IMG_REG_ASIA; bRC = true; return bRC; } else if (tmpVer.find( "STSUOH" ) != std::string::npos) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_OMH; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUXN" ) != std::string::npos) || (tmpVer.find( "STSUXN" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; *pCarrier = (ULONG)eGOBI_IMG_CAR_NORF; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUFN" ) != std::string::npos) || (tmpVer.find( "STSUFN" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUGN" ) != std::string::npos) || (tmpVer.find( "STSUGN" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; *pCarrier = (ULONG)eGOBI_IMG_CAR_GENERIC; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } return bRC; } /*=========================================================================== METHOD: GetImageStore (Public Method) DESCRIPTION: Get the image store folder, i.e., the folder containing one or more carrier-specific image subfolders RETURN VALUE: std::string - Image Store ===========================================================================*/ std::string GetImageStore() { std::string imageStore = GetProgramPath(); imageStore += "Images/3000/Generic"; return imageStore; } /*=========================================================================== METHOD: GetImageInfo (Public Method) DESCRIPTION: Get the image information for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pImageType [ O ] - Image type pImageID [ O ] - Unique image ID pVersionID [ O ] - Version ID versionSize [ I ] - The maximum number of characters including the NULL terminator that can be copied to the version array pVersion [ O ] - NULL-terminated string representing the version RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageInfo( LPCSTR pFilePath, BYTE * pImageType, BYTE * pImageID, ULONG * pVersionID, USHORT versionSize, CHAR * pVersion ) { // Validate arguments if ( (pFilePath == 0) || (pFilePath[0] == 0) || (pImageType == 0) || (pImageID == 0) || (pVersionID == 0) || (versionSize == 0) || (pVersion == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Open up MBN file cMemoryMappedFile mbnFile( pFilePath ); const BYTE * pMBNData = (const BYTE *)mbnFile.GetContents(); ULONG dataSz = mbnFile.GetSize(); // MBN file (sort of) valid? if (pMBNData == 0) { return eGOBI_ERR_FILE_OPEN; } if (dataSz <= 256) { return eGOBI_ERR_INVALID_FILE; } // Skip to the end pMBNData += (dataSz - 256); // Search for the UQCN specific info const BYTE * pTmp = 0; pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&UQCN_INFO_MAGIC, (ULONG)sizeof( UQCN_INFO_MAGIC ) ); if (pTmp != 0) { const sUQCNInfoRecord * pRec = (const sUQCNInfoRecord *)pTmp; *pVersionID = *(ULONG *)&pRec->mVersionID; *pImageType = 1; } else { // Since we did not find UQCN info, presume this is an AMSS file pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_BOOT_MAGIC, (ULONG)sizeof( MBN_BOOT_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } const sMBNBootRecord * pRec = (const sMBNBootRecord *)pTmp; *pVersionID = pRec->mMinorID; *pImageType = 0; } // Search for the unique ID pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_HASH_MAGIC, (ULONG)sizeof( MBN_HASH_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } // Copy the unique ID const sMBNHashRecord * pHash = (const sMBNHashRecord *)pTmp; memcpy( (LPVOID)pImageID, (LPCVOID)&pHash->mUniqueID[0], (SIZE_T)MBN_UNIQUE_ID_LEN ); // Search for the build ID pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_BUILD_MAGIC, (ULONG)sizeof( MBN_BUILD_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } memset( (PVOID)&pVersion[0], 0, (SIZE_T)versionSize ); // Copy the MBN_BUILD_MAGIC ID const sMBNBuildIDRecord * pRec = (const sMBNBuildIDRecord *)pTmp; for (ULONG t = 0; t < MBN_BUILD_ID_LEN; t++) { if (t >= versionSize) { return eGOBI_ERR_BUFFER_SZ; } pVersion[t] = pRec->mBuildID[t]; if (pRec->mBuildID[t] == 0) { break; } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetImagesInfo (Public Method) DESCRIPTION: Return the info for the images located at the given path PARAMETERS: path [ I ] - Fully qualified path RETURN VALUE: std:vector - Vector of image information ===========================================================================*/ std::vector GetImagesInfo( const std::string & path ) { // Validate arguments std::vector retVec; if (path.size() <= 0) { return retVec; } // Search all MBN files in the specified folder std::string folderSearch = path; int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } std::vector files; DepthSearch( folderSearch, 0, ".mbn", files ); int fileNum = files.size(); for (int i = 0; i < fileNum; i++) { std::string mbnName = files[i]; BYTE imageType = UCHAR_MAX; BYTE imageID[16] = { 0 }; ULONG versionID = ULONG_MAX; USHORT versionSz = MAX_PATH * 2 + 1; CHAR versionStr[MAX_PATH * 2 + 1] = { 0 }; eGobiError rc = ::GetImageInfo( mbnName.c_str(), &imageType, &imageID[0], &versionID, versionSz, &versionStr[0] ); if (rc == eGOBI_ERR_NONE) { sImageInfo ii; ii.mImageType = (eGobiMBNType)imageType; ii.mVersionID = versionID; ii.mVersion = (LPCSTR)&versionStr[0]; memcpy( (LPVOID)&ii.mImageID[0], (LPCVOID)&imageID[0], 16 ); retVec.push_back( ii ); } } return retVec; } /*=========================================================================== METHOD: GetImageBootCompatibility (Public Method) DESCRIPTION: Get the image boot compatibility for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageBootCompatibility( LPCSTR pFilePath, ULONG * pMajorVersion, ULONG * pMinorVersion ) { // Validate arguments if ( (pFilePath == 0) || (pFilePath[0] == 0) || (pMajorVersion == 0) || (pMinorVersion == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Open up MBN file cMemoryMappedFile mbnFile( pFilePath ); const BYTE * pMBNData = (const BYTE *)mbnFile.GetContents(); ULONG dataSz = mbnFile.GetSize(); // MBN file (sort of) valid? if (pMBNData == 0) { return eGOBI_ERR_FILE_OPEN; } if (dataSz <= 256) { return eGOBI_ERR_INVALID_FILE; } // Skip to the end pMBNData += (dataSz - 256); const BYTE * pTmp = 0; pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_BOOT_MAGIC, (ULONG)sizeof( MBN_BOOT_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } const sMBNBootRecord * pRec = (const sMBNBootRecord *)pTmp; *pMajorVersion = pRec->mMajorID; *pMinorVersion = pRec->mMinorID; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: MapVersionInfo (Public Method) DESCRIPTION: Map the specified version string to image capabilities PARAMETERS: versionID [ I ] - Version ID imageType [ I ] - Image type pVersion [ I ] - Version string for image pTechnology [ O ] - Technology type pCarrier [ O ] - Carrier type pRegion [ O ] - Region type pGPSCapability [ O ] - GPS capability RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError MapVersionInfo( ULONG versionID, BYTE imageType, LPCSTR pVersion, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { if ((eGobiMBNType)imageType == eGOBI_MBN_TYPE_MODEM) { // AMSS (modem) bool bOK = ParseAMSSVersion( pVersion, pTechnology, pCarrier, pRegion, pGPSCapability ); if (bOK == false) { return eGOBI_ERR_INVALID_ARG; } } else if ((eGobiMBNType)imageType == eGOBI_MBN_TYPE_PRI) { // UQCN (PRI) bool bOK = ParseUQCNVersion( versionID, pTechnology, pCarrier, pRegion, pGPSCapability ); if (bOK == false) { return eGOBI_ERR_INVALID_ARG; } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetImageByUniqueID (Public Method) DESCRIPTION: Return the fully qualified path to an image specified by unique ID PARAMETERS: pImageID [ I ] - Unique image ID RETURN VALUE: std::string - Fully qualified path to matching image ===========================================================================*/ std::string GetImageByUniqueID( BYTE * pImageID ) { // Validate arguments std::string retStr = ""; if (pImageID == 0) { return retStr; } // Enumerate all folders of the image store std::vector folders; std::string imageStore = ::GetImageStore(); EnumerateFolders( imageStore, folders ); // Did we find any folders? ULONG foldersSz = (ULONG)folders.size(); if (foldersSz == 0) { return retStr; } // Go through each folder searching for a match for (ULONG f = 0; f < foldersSz; f++) { // Search all MBN files in the specified folder std::string folderSearch = folders[f]; int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } std::vector files; DepthSearch( folderSearch, 0, ".mbn", files ); int fileNum = files.size(); for (int i = 0; i < fileNum; i++) { std::string mbnName = files[i]; BYTE imageType = UCHAR_MAX; BYTE imageID[16] = { 0 }; ULONG versionID = ULONG_MAX; USHORT versionSz = MAX_PATH * 2 + 1; CHAR versionStr[MAX_PATH * 2 + 1] = { 0 }; eGobiError rc = ::GetImageInfo( mbnName.c_str(), &imageType, &imageID[0], &versionID, versionSz, &versionStr[0] ); if (rc == eGOBI_ERR_NONE) { bool bMatch = true; for (ULONG i = 0; i < 16; i++) { if (imageID[i] != pImageID[i]) { bMatch = false; break; } } if (bMatch == true) { retStr = mbnName; break; } } } if (retStr.size() > 0) { break; } } return retStr; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiMBNMgmt.h000077500000000000000000000171471455567757300230220ustar00rootroot00000000000000/*=========================================================================== FILE: GobiMBNMgmt.h DESCRIPTION: QUALCOMM Gobi MBN management functions for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: sImageInfo GetImageStore GetImageInfo GetImagesInfo GetImageBootCompatibility MapVersionInfo GetImageByUniqueID Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiImageDefinitions.h" #include "GobiError.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for unique image ID const ULONG MBN_UNIQUE_ID_LEN = 16; /*=========================================================================*/ // Struct sImageInfo // Storage structure for Image information /*=========================================================================*/ struct sImageInfo { public: // Default constructor sImageInfo() : mImageType( eGOBI_MBN_TYPE_ENUM_BEGIN ), mVersionID( ULONG_MAX ), mVersion( "" ) { memset( (LPVOID)&mImageID[0], 0, MBN_UNIQUE_ID_LEN ); }; // Is this object valid? bool IsValid() const { return ( (mImageType != eGOBI_MBN_TYPE_ENUM_BEGIN) && (mVersionID != ULONG_MAX) && (mVersion.size() > 0) ); }; /* Image type */ eGobiMBNType mImageType; /* Unique image ID */ BYTE mImageID[MBN_UNIQUE_ID_LEN]; /* Version ID */ ULONG mVersionID; /* Version string */ std::string mVersion; }; /*=========================================================================*/ // Public Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetImageStore (Public Method) DESCRIPTION: Return the image store folder, i.e., the folder containing one or more carrier-specific image subfolders RETURN VALUE: std::string - Image Store ===========================================================================*/ std::string GetImageStore(); /*=========================================================================== METHOD: GetImageInfo (Public Method) DESCRIPTION: Get the image information for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pImageType [ O ] - Image type pImageID [ O ] - Unique image ID pVersionID [ O ] - Version ID versionSize [ I ] - The maximum number of characters including the NULL terminator that can be copied to the version array pVersion [ O ] - NULL-terminated string representing the version RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageInfo( LPCSTR pFilePath, BYTE * pImageType, BYTE * pImageID, ULONG * pVersionID, USHORT versionSize, CHAR * pVersion ); /*=========================================================================== METHOD: GetImagesInfo (Public Method) DESCRIPTION: Return the info for the images located at the given path PARAMETERS: path [ I ] - Fully qualified path RETURN VALUE: std:vector - Vector of image information ===========================================================================*/ std::vector GetImagesInfo( const std::string & path ); /*=========================================================================== METHOD: GetImageBootCompatibility (Public Method) DESCRIPTION: Get the image boot compatibility for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageBootCompatibility( LPCSTR pFilePath, ULONG * pMajorVersion, ULONG * pMinorVersion ); /*=========================================================================== METHOD: MapVersionInfo (Public Method) DESCRIPTION: Map the specified version string to image capabilities PARAMETERS: versionID [ I ] - Version ID imageType [ I ] - Image type pVersion [ I ] - Version string for image pTechnology [ O ] - Technology type pCarrier [ O ] - Carrier type pRegion [ O ] - Region type pGPSCapability [ O ] - GPS capability RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError MapVersionInfo( ULONG versionID, BYTE imageType, LPCSTR pVersion, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); /*=========================================================================== METHOD: GetImageByUniqueID (Public Method) DESCRIPTION: Return the fully qualified path to an image specified by unique ID PARAMETERS: pImageID [ I ] - Unique image ID RETURN VALUE: std::string - Fully qualified path to matching image ===========================================================================*/ std::string GetImageByUniqueID( BYTE * pImageID ); libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQDLCore.cpp000077500000000000000000000602041455567757300233350ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQDLCore.cpp DESCRIPTION: QUALCOMM Gobi QDL Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQDLCore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQDLCore.h" #include "QDLBuffers.h" #include "ProtocolNotification.h" #include "CoreUtilities.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default/minimum timeout for QCWWAN QMI requests const ULONG DEFAULT_GOBI_QDL_TIMEOUT = 4000; const ULONG MINIMUM_GOBI_QDL_TIMEOUT = 2000; /*=========================================================================*/ // cGobiQDLCore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQDLCore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQDLCore::cGobiQDLCore() : mQDL( 512, 512 ), mQDLPortNode( "" ), mQDLTimeout( DEFAULT_GOBI_QDL_TIMEOUT ) { // Nothing to do } /*=========================================================================== METHOD: ~cGobiQDLCore (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiQDLCore::~cGobiQDLCore() { // Nothing to do } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQDLCore::Initialize() { // Nothing to do return true; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQDLCore::Cleanup() { // Just in case CloseQDLPort( false ); return true; } /*=========================================================================== METHOD: GetAvailableQDLPorts (Public Method) DESCRIPTION: Return the set of available Gobi QDL ports RETURN VALUE: std::vector ===========================================================================*/ std::vector cGobiQDLCore::GetAvailableQDLPorts() { std::vector devices; std::string path = "/sys/bus/usb/devices/"; std::vector files; DepthSearch( path, 2, "ttyUSB", files ); int fileNum = files.size(); for (int i = 0; i < fileNum; i++) { // Example "/sys/bus/usb/devices/8-1/8-1:1.1/ttyUSB0" std::string nodePath = files[i]; int lastSlash = nodePath.find_last_of( "/" ); // This is what we want to return if everything else matches std::string deviceNode = nodePath.substr( lastSlash + 1 ); // Move down one directory to the interface level std::string curPath = nodePath.substr( 0, lastSlash ); // Read bInterfaceNumber int handle = open( (curPath + "/bInterfaceNumber").c_str(), O_RDONLY ); if (handle == -1) { continue; } char buff[4]; memset( buff, 0, 4 ); bool bFound = false; int ret = read( handle, buff, 2 ); if (ret == 2) { // Interface 1 or 0 ret = strncmp( buff, "01", 2 ); if (ret == 0) { bFound = true; } ret = strncmp( buff, "00", 2 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } // Move down one directory to the device level curPath = curPath.substr( 0, curPath.find_last_of( "/" ) ); // Read idVendor handle = open( (curPath + "/idVendor").c_str(), O_RDONLY ); if (handle == -1) { continue; } bFound = false; ret = read( handle, buff, 4 ); if (ret == 4) { ret = strncmp( buff, "05c6", 4 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } // Read idProduct handle = open( (curPath + "/idProduct").c_str(), O_RDONLY ); if (handle == -1) { continue; } bFound = false; ret = read( handle, buff, 4 ); if (ret == 4) { ret = strncmp( buff, "920c", 4 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } // Success! devices.push_back( deviceNode ); } return devices; } /*=========================================================================== METHOD: SetQDLTimeout (Public Method) DESCRIPTION: Set the timeout for all subsequent QDL transactions PARAMETERS: to [ I ] - Timeout value (in milliseconds) RETURN VALUE: eGobiError ===========================================================================*/ eGobiError cGobiQDLCore::SetQDLTimeout( ULONG to ) { if (to < MINIMUM_GOBI_QDL_TIMEOUT) { return eGOBI_ERR_INVALID_ARG; } mQDLTimeout = to; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OpenQDLPort (Public Method) DESCRIPTION: This function opens the specified QDL port of the device PARAMETERS: portID [ I ] - ID of QDL port to connect to bBARMode [ I ] - Request boot and recovery mode feature pMajorVersion [ O ] - Major version of the device boot downloader pMinorVersion [ O ] - Minor version of the device boot downloader RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::OpenQDLPort( std::string & portID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ) { if (portID.empty() == true || pMajorVersion == 0 || pMinorVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // First disconnect from current port (if any) CloseQDLPort( false ); // Validate port ID std::string foundDevice; std::vector availPorts = GetAvailableQDLPorts(); for (int index = 0; index < availPorts.size(); index++) { if (availPorts[index] == portID) { foundDevice = availPorts[index]; break; } } if (foundDevice.empty() == true) { return eGOBI_ERR_INVALID_DEVID; } // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) mQDL.Initialize(); // Connect to the port std::string deviceStr = "/dev/" + foundDevice; bool bOK = mQDL.Connect( deviceStr.c_str() ); if (bOK == false) { return eGOBI_ERR_CONNECT; } // Store port ID (we are connected) mQDLPortNode = foundDevice; // Build the hello request bool bBARFeature = bBARMode != 0; sSharedBuffer * pHelloBuf = sQDLHello::BuildHelloReq( bBARFeature ); if (pHelloBuf == 0) { return eGOBI_ERR_MEMORY; } // Send the hello request and wait for the response sProtocolBuffer rsp; rsp = SendQDL( pHelloBuf ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Extract major and minor boot downloader versions ULONG majVer; ULONG minVer; sQDLHello helloRsp( rsp.GetSharedBuffer() ); if (helloRsp.GetBootVersionInfo( majVer, minVer ) == false) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } // NOTE: in the current firmware implimentation, this cannot happen. // No hello response will be received in case of feature mismatch. if (bBARFeature == true) { const sQDLRawHelloRsp * pTmpRsp = helloRsp.GetResponse(); if (pTmpRsp == 0) { return eGOBI_ERR_MALFORMED_RSP; } if ( (pTmpRsp->mFeatures & QDL_FEATURE_BAR_MODE) == 0) { return eGOBI_ERR_QDL_BAR_MODE; } } *pMajorVersion = majVer; *pMinorVersion = minVer; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CloseQDLPort (Public Method) DESCRIPTION: This function closes the currently open QDL port of the device PARAMETERS: bInformDevice [ I ] - Inform device that QDL port is being closed? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::CloseQDLPort( bool bInformDevice ) { // Assume success eGobiError rc = eGOBI_ERR_NONE; if (mQDLPortNode.empty() == true) { rc = eGOBI_ERR_NO_CONNECTION; } else if (bInformDevice == true) { BYTE cmd = (BYTE)eQDL_CMD_SESSION_CLOSE_REQ; eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pReq = 0; pReq = new sSharedBuffer( (const BYTE *)&cmd, 1, pt ); if (pReq == 0) { rc = eGOBI_ERR_MEMORY; } else { sProtocolBuffer rsp = SendQDL( pReq, 0, 0, false ); rc = GetLastError(); } } mQDL.Disconnect(); mQDL.Exit(); mQDLPortNode.clear(); return rc; } /*=========================================================================== METHOD: GetQDLImagesPreference (Public Method) DESCRIPTION: This function gets the current images preference as reported by the device boot downloader PARAMETERS: pImageListSize [I/O] - Upon input the maximum number of elements that the image info list can contain. Upon successful output the actual number of elements in the image info list pImageList [ O ] - The image info list RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { if (pImageListSize == 0 || *pImageListSize == 0 || pImageList == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE cmd = (BYTE)eQDL_CMD_GET_IMAGE_PREF_REQ; eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pReq = 0; pReq = new sSharedBuffer( (const BYTE *)&cmd, 1, pt ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } ULONG maxImages = (ULONG)*pImageListSize; *pImageListSize = 0; sProtocolBuffer rsp = SendQDL( pReq ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } sQDLGetImagePref prefRsp( rsp.GetSharedBuffer() ); if (prefRsp.IsValid() == false) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } std::list imageIDs = prefRsp.GetImageIDs(); ULONG imageCount = (ULONG)imageIDs.size(); if (imageCount > maxImages) { imageCount = maxImages; } sQDLRawImageID * pOutList = (sQDLRawImageID *)pImageList; std::list ::const_iterator pIter = imageIDs.begin(); for (ULONG i = 0; i < imageCount; i++) { *pOutList++ = *pIter++; } *pImageListSize = imageCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PrepareQDLImageWrite (Public Method) DESCRIPTION: This function prepares the device boot downloader for an image write PARAMETERS: imageType [ I ] - Type of image being written imageSize [ I ] - Size of image being written pBlockSize [I/O] - Upon input the maximum size of image block supported by host, upon successful output the maximum size of image block supported by device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ) { eQDLImageType it = (eQDLImageType)imageType; if (::IsValid( it ) == false) { return eGOBI_ERR_INVALID_ARG; } if (pBlockSize == 0 || *pBlockSize == 0 || *pBlockSize > QDL_MAX_CHUNK_SIZE) { return eGOBI_ERR_INVALID_ARG; } sSharedBuffer * pReq = 0; pReq = sQDLOpenUnframed::BuildOpenUnframedReq( it, imageSize, *pBlockSize ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = SendQDL( pReq ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } ULONG tmp; sQDLOpenUnframed openRsp( rsp.GetSharedBuffer() ); const sQDLRawOpenUnframedRsp * pTmp = openRsp.GetResponse(); if (pTmp == 0 || openRsp.GetChunkSize( tmp ) == false) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } if (openRsp.IsSuccess() == false) { switch ((eQDLOpenStatus)pTmp->mStatus) { case eQDL_OPEN_STATUS_SIZE: return eGOBI_ERR_QDL_OPEN_SIZE; case eQDL_OPEN_STATUS_BAD_TYPE: return eGOBI_ERR_QDL_OPEN_TYPE; case eQDL_OPEN_STATUS_PROTECTION: return eGOBI_ERR_QDL_OPEN_PROT; case eQDL_OPEN_STATUS_NOT_NEEDED: return eGOBI_ERR_QDL_OPEN_SKIP; } return eGOBI_ERR_QDL_ERR_GENERAL; } *pBlockSize = tmp; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: WriteQDLImageBlock (Public Method) DESCRIPTION: This function writes the specified image block to the device PARAMETERS: sequenceNumber [ I ] - Sequence number for image write blockSize [ I ] - Size of image block pImageBlock [ I ] - Image block RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::WriteQDLImageBlock( USHORT sequenceNumber, ULONG blockSize, BYTE * pImageBlock ) { if (blockSize > QDL_MAX_CHUNK_SIZE || pImageBlock == 0) { return eGOBI_ERR_INVALID_ARG; } sSharedBuffer * pReq = 0; pReq = sQDLWriteUnframed::BuildWriteUnframedReq( sequenceNumber, blockSize ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = SendQDL( pReq, pImageBlock, blockSize ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } sQDLWriteUnframed writeRsp( rsp.GetSharedBuffer() ); const sQDLRawWriteUnframedRsp * pTmp = writeRsp.GetResponse(); if (pTmp == 0) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } if (writeRsp.IsSuccess() == false) { switch ((eQDLWriteStatus)pTmp->mStatus) { case eQDL_WRITE_STATUS_CRC: return eGOBI_ERR_QDL_CRC; case eQDL_WRITE_STATUS_CONTENT: return eGOBI_ERR_QDL_PARSING; } return eGOBI_ERR_QDL_ERR_GENERAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ValidateQDLImages (Public Method) DESCRIPTION: This function requests the device validate the written images PARAMETERS: pImageType [ O ] - Upon failure this may contain the type of the image that failed validation RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::ValidateQDLImages( BYTE * pImageType ) { if (pImageType == 0) { return eGOBI_ERR_INVALID_ARG; } *pImageType = UCHAR_MAX; BYTE cmd = (BYTE)eQDL_CMD_SESSION_DONE_REQ; eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pReq = 0; pReq = new sSharedBuffer( (const BYTE *)&cmd, 1, pt ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = SendQDL( pReq ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } sQDLDone doneRsp( rsp.GetSharedBuffer() ); const sQDLRawDoneRsp * pTmp = doneRsp.GetResponse(); if (pTmp == 0) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } if (doneRsp.IsSuccess() == false) { *pImageType = pTmp->mImageType; switch ((eQDLDoneStatus)pTmp->mStatus) { case eQDL_DONE_STATUS_AUTH: return eGOBI_ERR_QDL_AUTH; case eQDL_DONE_STATUS_WRITE: return eGOBI_ERR_QDL_WRITE; } return eGOBI_ERR_QDL_ERR_GENERAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SendQDL (Public Method) DESCRIPTION: Send a QDL request and wait for and return response (if needed) PARAMETERS: pRequest [ I ] - Request to schedule pAuxData [ I ] - Auxiliary data for request auxDataSz [ I ] - Size of auxiliary data bWaitForResponse [ I ] - Wait for a response? RETURN VALUE: sProtocolBuffer - The response (invalid when no response was received) ===========================================================================*/ sProtocolBuffer cGobiQDLCore::SendQDL( sSharedBuffer * pRequest, const BYTE * pAuxData, ULONG auxDataSz, bool bWaitForResponse ) { // Clear last error recorded ClearLastError(); // Returned response sProtocolBuffer rsp; // Validate the arguments if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return rsp; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); // Build the request object sProtocolRequest req( pRequest, 0, mQDLTimeout, 1, 1, &pn ); req.SetAuxiliaryData( pAuxData, auxDataSz ); if (bWaitForResponse == false) { req.SetTXOnly(); } // Are we connected? if ( (mQDLPortNode.empty() == true) || (mQDL.IsConnected() == false) ) { mLastError = eGOBI_ERR_NO_CONNECTION; return rsp; } // Grab the log from the server const cProtocolLog & protocolLog = mQDL.GetLog(); // Schedule the request ULONG reqID = mQDL.AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return rsp; } bool bReq = false; bool bExit = false; DWORD idx; // Process up to the indicated timeout while (bExit == false) { int wc = sigEvt.Wait( mQDLTimeout, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { bReq = true; if (bWaitForResponse == false) { // Success! bExit = true; } } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed mQDL.RemoveRequest( reqID ); } return rsp; } /*=========================================================================== METHOD: GetConnectedPortID (Public Method) DESCRIPTION: Get the device node of the currently connected Gobi device PARAMETERS: devNode [ O ] - Device node (IE: ttyUSB0) RETURN VALUE: bool ===========================================================================*/ bool cGobiQDLCore::GetConnectedPortID( std::string & devNode ) { // Assume failure bool bFound = false; devNode.clear(); // Were we once connected? if (mQDLPortNode.size() > 0) { // Yes, but is our device still present? // NOTE: This does not garantee the device did not leave and come back std::vector devices = GetAvailableQDLPorts(); ULONG deviceCount = (ULONG)devices.size(); for (ULONG a = 0; a < deviceCount; a++) { if (devices[a] == mQDLPortNode) { devNode = devices[a]; bFound = true; break; } } if (bFound == false) { mLastError = eGOBI_ERR_NO_DEVICE; } } else { // We are not connected mLastError = eGOBI_ERR_NO_CONNECTION; } return bFound; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQDLCore.h000077500000000000000000000133141455567757300230020ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQDLCore.h DESCRIPTION: QUALCOMM Gobi QDL Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQDLCore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QDLProtocolServer.h" #include "GobiError.h" #include "GobiMBNMgmt.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cGobiQDLCore /*=========================================================================*/ class cGobiQDLCore { public: // Constructor cGobiQDLCore(); // Destructor virtual ~cGobiQDLCore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // Return the set of available Gobi QDL ports std::vector GetAvailableQDLPorts(); // Set the timeout for QDL transactions eGobiError SetQDLTimeout( ULONG to ); // Open the specified QDL port of the device eGobiError OpenQDLPort( std::string & portID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ); // Close the specified QDL port of the device eGobiError CloseQDLPort( bool bInformDevice ); // Get the images preference as from the device boot downloader eGobiError GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); // Prepare the device boot downloader for an image write eGobiError PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ); // Write the specified image block to the device eGobiError WriteQDLImageBlock( USHORT sequenceNumber, ULONG chunkSize, BYTE * pImageBlock ); // Request the device validate the written images eGobiError ValidateQDLImages( BYTE * pImageType ); // Send a QDL request and wait for and return response sProtocolBuffer SendQDL( sSharedBuffer * pRequest, const BYTE * pAuxData = 0, ULONG auxDataSz = 0, bool bWAitForResponse = true ); // Get currently connected port ID bool GetConnectedPortID( std::string & portNode ); // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QDL error eGobiError GetCorrectedQDLError( ULONG qdlError ) { ULONG ec = qdlError + (ULONG)eGOBI_ERR_QDL_OFFSET; return (eGobiError)ec; }; protected: /* QDL protocol server */ cQDLProtocolServer mQDL; /* ID of QDL port device node is connected to */ std::string mQDLPortNode; /* Timeout for QDL transactions (in milliseconds) */ ULONG mQDLTimeout; /* Last error recorded */ eGobiError mLastError; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICore.cpp000077500000000000000000000630311455567757300233440ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include "ProtocolNotification.h" #include "CoreUtilities.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default timeout for Gobi QMI requests const ULONG DEFAULT_GOBI_QMI_TIMEOUT = 2000; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: FindTLV (Free Method) DESCRIPTION: Find the given TLV PARAMETERS: tlvs [ I ] - TLV parsing input vector tlvKey [ I ] - Key of the TLV that is to be found RETURN VALUE: cDataParser::tParsedFields ===========================================================================*/ sDB2NavInput FindTLV( const std::vector & tlvs, const sProtocolEntityKey & tlvKey ) { sDB2NavInput retNI; // We need some TLVs to parse and a valid QMI DB key ULONG tlvCount = (ULONG)tlvs.size(); if (tlvCount == 0 || tlvKey.mKey.size() < 3) { return retNI; } for (ULONG t = 0; t < tlvCount; t++) { const sDB2NavInput & ni = tlvs[t]; if (tlvKey.mKey == ni.mKey) { retNI = ni; break; } } return retNI; } /*=========================================================================== METHOD: ParseTLV (Free Method) DESCRIPTION: Parse the given TLV to fields PARAMETERS: db [ I ] - Database to use qmiBuf [ I ] - Original buffer containing TLV (locks data) tlvs [ I ] - TLV parsing input vector tlvKey [ I ] - Key of the TLV that is to be parsed bFieldStrings [ I ] - Generate field value strings? RETURN VALUE: cDataParser::tParsedFields ===========================================================================*/ cDataParser::tParsedFields ParseTLV( const cCoreDatabase & db, const sProtocolBuffer & qmiBuf, const std::vector & tlvs, const sProtocolEntityKey & tlvKey, bool bFieldStrings ) { cDataParser::tParsedFields retFields; // We need some TLVs to parse and a valid QMI DB key ULONG tlvCount = (ULONG)tlvs.size(); if (tlvCount == 0 || tlvKey.mKey.size() < 3) { return retFields; } for (ULONG t = 0; t < tlvCount; t++) { const sDB2NavInput & ni = tlvs[t]; if (tlvKey.mKey == ni.mKey) { cDataParser dp( db, qmiBuf, tlvKey, ni.mpPayload, ni.mPayloadLen ); dp.Parse( bFieldStrings, false ); retFields = dp.GetFields(); break; } } return retFields; } /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQMICore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQMICore::cGobiQMICore() : mbFailOnMultipleDevices( false ), mDeviceNode( "" ), mDeviceKey( "" ), mLastError( eGOBI_ERR_NONE ), mRequests( 16 ), mLastNetStartID( (WORD)INVALID_QMI_TRANSACTION_ID ) { // Nothing to do } /*=========================================================================== METHOD: ~cGobiQMICore (Public Method) DESCRIPTION: Destructor RETURN VALUE: BOOL ===========================================================================*/ cGobiQMICore::~cGobiQMICore() { Cleanup(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Initialize() { // Initialize database mDB.Initialize(); // Allocate configured QMI servers bool bOK = true; std::set ::const_iterator pIter = mServerConfig.begin(); while (pIter != mServerConfig.end()) { cQMIProtocolServer * pSvr = 0; pSvr = new cQMIProtocolServer( pIter->first, 8192, 512 ); if (pSvr == 0) { if (pIter->second == true) { bOK = false; break; } } else { mServers[pIter->first] = pSvr; } pIter++; } if (bOK == false) { Cleanup(); } return bOK; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Cleanup() { Disconnect(); // Free allocated QMI servers std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { cQMIProtocolServer * pSvr = pIter->second; if (pSvr != 0) { delete pSvr; } pIter++; } mServers.clear(); return true; } /*=========================================================================== METHOD: GetAvailableDevices (Public Method) DESCRIPTION: Return the set of available Gobi network devices RETURN VALUE: std::vector - Vector of device ID and device key pairs ===========================================================================*/ std::vector cGobiQMICore::GetAvailableDevices() { std::vector devices; std::string path = "/sys/bus/usb/devices/"; std::vector files; DepthSearch( path, 3, "qcqmi", files ); int fileNum = files.size(); for (int i = 0; i < fileNum; i++) { // Example "/sys/bus/usb/devices/8-1/8-1:1.0/GobiQMI/qcqmi0" std::string nodePath = files[i]; int lastSlash = nodePath.find_last_of( "/" ); // This is what we want to return if everything else matches std::string deviceNode = nodePath.substr( lastSlash + 1 ); // Move down two directories to the interface level std::string curPath = nodePath.substr( 0, lastSlash ); curPath = curPath.substr( 0, curPath.find_last_of( "/" ) ); // Read bInterfaceNumber int handle = open( (curPath + "/bInterfaceNumber").c_str(), O_RDONLY ); if (handle == -1) { continue; } char buff[4]; memset( buff, 0, 4 ); bool bFound = false; int ret = read( handle, buff, 2 ); if (ret == 2) { ret = strncmp( buff, "00", 2 ); if (ret == 0) { bFound = true; } ret = strncmp( buff, "05", 2 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } // Move down one directory to the device level curPath = curPath.substr( 0, curPath.find_last_of( "/" ) ); // Read idVendor handle = open( (curPath + "/idVendor").c_str(), O_RDONLY ); if (handle == -1) { continue; } bFound = false; ret = read( handle, buff, 4 ); if (ret == 4) { ret = strncmp( buff, "05c6", 4 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } // Read idProduct handle = open( (curPath + "/idProduct").c_str(), O_RDONLY ); if (handle == -1) { continue; } bFound = false; ret = read( handle, buff, 4 ); if (ret == 4) { ret = strncmp( buff, "920d", 4 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } // Device node success! // Get MEID of device node (via ioctl) to use as key std::string deviceStr = "/dev/" + deviceNode; std::string key = cQMIProtocolServer::GetDeviceMEID( deviceStr ); tDeviceID device; device.first = deviceNode; device.second = key; devices.push_back( device ); } return devices; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified (or first detected) Gobi device Both device node and key are case sensitive PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Connect( LPCSTR pDeviceNode, LPCSTR pDeviceKey ) { // Assume failure bool bRC = false; // Clear last error recorded ClearLastError(); // If you specify a device key then you have to specify a device ID if (pDeviceNode == 0 && pDeviceKey != 0) { mLastError = eGOBI_ERR_INVALID_ARG; return bRC; } // First we terminate the current connection Disconnect(); // Query system for list of active Gobi devices std::vector devices = GetAvailableDevices(); // Did we find any devices? ULONG deviceCount = (ULONG)devices.size(); if (deviceCount == 0) { mLastError = eGOBI_ERR_NO_DEVICE; return bRC; } std::string deviceKey = ""; if (pDeviceKey != 0) { deviceKey = pDeviceKey; } // Filter that list to include only the specified device? if (pDeviceNode != 0) { std::vector ::iterator current = devices.begin(); while (current != devices.end()) { // Remove if device node doesn't match if (current->first.compare( pDeviceNode ) != 0) { // Erase current element and update ourself to point to next current = devices.erase( current ); } // Remove if invalid key is specified else if (deviceKey.size() != 0 && current->second.compare( deviceKey ) != 0) { current = devices.erase( current ); } // All necessary parameters match else { current++; } } } // Anything left after filtering? deviceCount = (ULONG)devices.size(); if (deviceCount == 0) { mLastError = eGOBI_ERR_NO_DEVICE; return bRC; } // Too many to choose from? if (deviceCount > 1 && mbFailOnMultipleDevices == true) { mLastError = eGOBI_ERR_MULTIPLE_DEVICES; return bRC; } // Store device ID/key strings mDeviceNode = devices[0].first; mDeviceKey = devices[0].second; // Initalize/connect all configured QMI servers std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { cQMIProtocolServer * pSvr = pIter->second; if (pSvr != 0) { // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) pSvr->Initialize(); std::string deviceStr = "/dev/" + mDeviceNode; bRC = pSvr->Connect( deviceStr.c_str() ); if (bRC == false) { tServerConfig tsc( pIter->first, true ); if (mServerConfig.find( tsc ) != mServerConfig.end()) { // Failure on essential server break; } else { // QMI server non-essential (ignore failure) bRC = true; } } } pIter++; } // Any server fail? if (bRC == false) { // Yes, disconnect them all Disconnect(); // ... and set the error code mLastError = eGOBI_ERR_CONNECT; } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Disconnect() { // Clear last error recorded ClearLastError(); // Assume failure bool bRC = false; if (mDeviceNode.size() > 0) { mDeviceNode.clear(); mDeviceKey.clear(); bRC = true; } else { mLastError = eGOBI_ERR_NO_CONNECTION; } // Disconnect/clean-up all configured QMI servers std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { cQMIProtocolServer * pSvr = pIter->second; if (pSvr != 0) { pSvr->Disconnect(); pSvr->Exit(); } pIter++; } return bRC; } /*=========================================================================== METHOD: GetConnectedDeviceID (Public Method) DESCRIPTION: Get the device node/key of the currently connected Gobi device PARAMETERS: devNode [ O ] - Device node (IE: qcqmi0) devKey [ O ] - Device key (may be empty) RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::GetConnectedDeviceID( std::string & devNode, std::string & devKey ) { // Clear last error recorded ClearLastError(); // Assume failure bool bFound = false; devNode.clear(); devKey.clear(); // Are all required servers connected? bool bAllConnected = true; std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { tServerConfig tsc( pIter->first, true ); cQMIProtocolServer * pSvr = pIter->second; if (mServerConfig.find( tsc ) != mServerConfig.end() && pSvr != 0) { if (pSvr->IsConnected() == false) { // Failure on essential server bAllConnected = false; break; } } pIter++; } // Were we once connected? if (mDeviceNode.size() > 0 && bAllConnected == true) { // Yes, but is our device still present? // NOTE: This does not guarantee the device did not leave and come back std::vector devices = GetAvailableDevices(); ULONG deviceCount = (ULONG)devices.size(); for (ULONG a = 0; a < deviceCount; a++) { if (devices[a].first == mDeviceNode) { // If there is a device key specified, it must match. if (mDeviceKey.size() > 0) { if (devices[a].second == mDeviceKey) { devNode = devices[a].first; devKey = devices[a].second; bFound = true; break; } } else { devNode = devices[a].first; bFound = true; break; } } } if (bFound == false) { mLastError = eGOBI_ERR_NO_DEVICE; } } else { // We are not connected mLastError = eGOBI_ERR_NO_CONNECTION; } return bFound; } /*=========================================================================== METHOD: Send (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svc [ I ] - QMI service type pRequest [ I ] - Request to schedule to [ I ] - Timeout value (in milliseconds) RETURN VALUE: sProtocolBuffer - The response (invalid when no response was received) ===========================================================================*/ sProtocolBuffer cGobiQMICore::Send( eQMIService svc, sSharedBuffer * pRequest, ULONG to ) { // Clear last error recorded ClearLastError(); // Returned response sProtocolBuffer rsp; // Validate the arguments if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return rsp; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); // Build the request object sProtocolRequest req( pRequest, 0, to, 1, 1, &pn ); if (to == 0) { mLastError = eGOBI_ERR_INTERNAL; return rsp; } // Grab the server cQMIProtocolServer * pSvr = GetServer( svc ); if (pSvr == 0) { mLastError = eGOBI_ERR_INTERNAL; return rsp; } // Are we connected? if (mDeviceNode.size() <= 0 || pSvr->IsConnected() == false) { mLastError = eGOBI_ERR_NO_CONNECTION; return rsp; } // Grab the log from the server const cProtocolLog & protocolLog = pSvr->GetLog(); // Schedule the request ULONG reqID = pSvr->AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return rsp; } // Store for external cancel tServiceRequest sr( svc, reqID ); mRequests.AddElement( sr ); bool bReq = false; bool bExit = false; DWORD idx; // Process up to the indicated timeout while (bExit == false) { int wc = sigEvt.Wait( to, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { // Are we doing WDS business? if (svc == eQMI_SVC_WDS) { // Grab the as-sent request DWORD id = evt.mParam2; sProtocolBuffer tmpReq = protocolLog.GetBuffer( id ); sSharedBuffer * pTmpRequest = tmpReq.GetSharedBuffer(); if (pTmpRequest != 0) { // Check the message ID sQMIServiceBuffer actualReq( pTmpRequest ); ULONG msgID = actualReq.GetMessageID(); if (msgID == (ULONG)eQMI_WDS_START_NET) { // Grab the transaction ID mLastNetStartID = actualReq.GetTransactionID(); } } } bReq = true; } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed pSvr->RemoveRequest( reqID ); } // Check that the device is still there? if ( (mLastError == eGOBI_ERR_REQUEST) || (mLastError == eGOBI_ERR_RESPONSE) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { eGobiError tmp = mLastError; std::string dummy; GetConnectedDeviceID( dummy, dummy ); if (mLastError == eGOBI_ERR_NONE) { mLastError = tmp; } } return rsp; } /*=========================================================================== METHOD: SendAndCheckReturn (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then validate) the response PARAMETERS: svc [ I ] - QMI service type pRequest [ I ] - Request to schedule to [ I ] - Timeout value (in milliseconds) RETURN VALUE: eGobiError - Corrected error code ===========================================================================*/ eGobiError cGobiQMICore::SendAndCheckReturn( eQMIService svc, sSharedBuffer * pRequest, ULONG to ) { sProtocolBuffer rsp = Send( svc, pRequest, to ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Success! return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SendSimple (Public Method) DESCRIPTION: Generate/send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svc [ I ] - QMI service type msgID [ I ] - QMI message ID of the request to generate to [ I ] - Timeout value (in milliseconds) NOTE: The request has to be a single byte in length, i.e. just a command code, in order for success RETURN VALUE: sProtocolBuffer - The response (invalid when no response was received) ===========================================================================*/ sProtocolBuffer cGobiQMICore::SendSimple( eQMIService svc, WORD msgID, ULONG to ) { // Clear last error recorded ClearLastError(); sProtocolBuffer rsp; sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( svc, msgID ); if (pReq == 0) { mLastError = eGOBI_ERR_MEMORY; return rsp; } rsp = Send( svc, pReq, to ); return rsp; } /*=========================================================================== METHOD: CancelSend (Public Method) DESCRIPTION: Cancel the most recent in-progress Send() based operation RETURN VALUE: eGobiError ===========================================================================*/ eGobiError cGobiQMICore::CancelSend() { ULONG reqs = mRequests.GetTotalCount(); if (reqs == 0) { return eGOBI_ERR_NO_CANCELABLE_OP; } tServiceRequest elem( eQMI_SVC_ENUM_BEGIN, INVALID_REQUEST_ID ); bool bElem = mRequests.GetElement( --reqs, elem ); if (bElem == false) { return eGOBI_ERR_INTERNAL; } cQMIProtocolServer * pSvr = GetServer( elem.first ); if (pSvr == 0) { return eGOBI_ERR_INTERNAL; } bool bRemove = pSvr->RemoveRequest( elem.second ); if (bRemove == false) { return eGOBI_ERR_CANCEL_OP; } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICore.h000077500000000000000000001141741455567757300230160ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.h DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include "ProtocolBuffer.h" #include "QMIProtocolServer.h" #include "DataParser.h" #include "DataPacker.h" #include "DB2Utilities.h" #include "SyncQueue.h" #include "GobiError.h" #include "GobiMBNMgmt.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default timeout for Gobi QMI requests extern const ULONG DEFAULT_GOBI_QMI_TIMEOUT; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // Find the given TLV sDB2NavInput FindTLV( const std::vector & tlvs, const sProtocolEntityKey & tlvKey ); // Parse the given TLV to fields cDataParser::tParsedFields ParseTLV( const cCoreDatabase & db, const sProtocolBuffer & qmiBuf, const std::vector & tlvs, const sProtocolEntityKey & tlvKey, bool bFieldStrings = false ); /*=========================================================================*/ // Class cGobiQMICore /*=========================================================================*/ class cGobiQMICore { public: // Constructor cGobiQMICore(); // Destructor virtual ~cGobiQMICore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // (Inline) Return the QMI database const cCoreDatabase & GetDatabase() { return mDB; }; // (Inline) Return the server as determined by the service type cQMIProtocolServer * GetServer( eQMIService svc ) { cQMIProtocolServer * pSvr = 0; std::map ::const_iterator pIter; pIter = mServers.find( svc ); if (pIter != mServers.end()) { pSvr = pIter->second; } return pSvr; }; // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QMI error (if this happens to indicate // that no error occurred then return the mapped eQMI_ERR_INTERNAL // value) eGobiError GetCorrectedQMIError( ULONG qmiErrorCode ) { ULONG ec = (ULONG)eQMI_ERR_INTERNAL + (ULONG)eGOBI_ERR_QMI_OFFSET; if (qmiErrorCode != (ULONG)eQMI_ERR_NONE) { ec = qmiErrorCode + (ULONG)eGOBI_ERR_QMI_OFFSET; } return (eGobiError)ec; }; // Return the set of available Gobi devices typedef std::pair tDeviceID; virtual std::vector GetAvailableDevices(); // Connect to the specified (or first detected) Gobi device virtual bool Connect( LPCSTR pDeviceNode = 0, LPCSTR pDeviceKey = 0 ); // Disconnect from the currently connected Gobi device virtual bool Disconnect(); // Get the device ID of the currently connected Gobi device virtual bool GetConnectedDeviceID( std::string & devNode, std::string & devKey ); // Send a request using the specified QMI protocol server and wait // for (and then return) the response sProtocolBuffer Send( eQMIService svc, sSharedBuffer * pRequest, ULONG to = DEFAULT_GOBI_QMI_TIMEOUT ); // Send a request using the specified QMI protocol server and wait // for (and then validate) the response eGobiError SendAndCheckReturn( eQMIService svc, sSharedBuffer * pRequest, ULONG to = DEFAULT_GOBI_QMI_TIMEOUT ); // Generate/send a request using the specified QMI protocol server // and wait for (and then return) the response sProtocolBuffer SendSimple( eQMIService svc, WORD msgID, ULONG to = DEFAULT_GOBI_QMI_TIMEOUT ); // Cancel the most recent in-progress Send() based operation eGobiError CancelSend(); #ifdef WDS_SUPPORT // Return the state of the current packet data session eGobiError GetSessionState( ULONG * pState ); // Return the duration of the current packet data session eGobiError GetSessionDuration( ULONGLONG * pDuration ); // Return the active/total durations of the current packet data session eGobiError GetSessionDurations( ULONGLONG * pActiveDuration, ULONGLONG * pTotalDuration ); // Return the dormancy state of the current packet session eGobiError GetDormancyState( ULONG * pState ); // Return the current autoconnect data session setting eGobiError GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ); // Set the autoconnect data session setting eGobiError SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ); // Write the default profile settings to the device eGobiError SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); // Read the default profile settings from the device eGobiError GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); // Activate a packet data session eGobiError StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ); // Cancel an in-progress packet data session activation eGobiError CancelDataSession(); // Stop the current data session eGobiError StopDataSession( ULONG sessionId ); // Return the current packet data session IP address eGobiError GetIPAddress( ULONG * pIPAddress ); // Return connection rate information for the packet data connection eGobiError GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); // Return the packet data transfer statistics eGobiError GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); // Returns the RX/TX byte counts eGobiError GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); // Set the current mobile IP setting eGobiError SetMobileIP( ULONG mode ); // Get the current mobile IP setting eGobiError GetMobileIP( ULONG * pMode ); // Set the active mobile IP profile index eGobiError SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ); // Get the active mobile IP profile index eGobiError GetActiveMobileIPProfile( BYTE * pIndex ); // Set the specified mobile IP profile settings eGobiError SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); // Get the specified mobile IP profile settings eGobiError GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); // Set the mobile IP parameters eGobiError SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); // Get the mobile IP parameters eGobiError GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); // Get the last mobile IP error eGobiError GetLastMobileIPError( ULONG * pError ); // Set the DNS settings for the device eGobiError SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); // Get the DNS settings for the device eGobiError GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); #endif #ifdef NAS_SUPPORT // Get the AN-AAA authentication status eGobiError GetANAAAAuthenticationStatus( ULONG * pStatus ); // Get the current available signal strengths (in dBm) eGobiError GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); // Get the current RF information eGobiError GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ); // Perform a scan for available networks eGobiError PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ); // Perform a scan for available networks (includes RAT) eGobiError PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); // Initiate a network registration eGobiError InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ); // Initiate a domain attach (or detach) eGobiError InitiateDomainAttach( ULONG action ); // Get information regarding the system that currently provides service eGobiError GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); // Get data capabilities of serving network system eGobiError GetServingNetworkCapabilities( BYTE * pDataCapssSize, BYTE * pDataCaps ); // Retrieves the current data bearer technology eGobiError GetDataBearerTechnology( ULONG * pDataBearer ); // Retrieve information about the home network of the device eGobiError GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); // Sets the network registration preference eGobiError SetNetworkPreference( ULONG technologyPref, ULONG duration ); // Return the network registration preference eGobiError GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); // Set the current CDMA network parameters eGobiError SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); // Return the current CDMA network parameters eGobiError GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); // Return the Access Overload Class (ACCOLC) of the device eGobiError GetACCOLC( BYTE * pACCOLC ); // Set the Access Overload Class (ACCOLC) of the device eGobiError SetACCOLC( CHAR * pSPC, BYTE accolc ); // Return the PLMN mode from the CSP eGobiError GetPLMNMode( ULONG * pMode ); // Return PLMN name information for the given MCC/MNC eGobiError GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ); #endif #ifdef DMS_SUPPORT // Get device capabilities eGobiError GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); // Return the device manufacturer name eGobiError GetManufacturer( BYTE stringSize, CHAR * pString ); // Return the device model ID eGobiError GetModelID( BYTE stringSize, CHAR * pString ); // Return the device firmware revision eGobiError GetFirmwareRevision( BYTE stringSize, CHAR * pString ); // Return the device firmware revisions eGobiError GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); // Return the voice number in use by the device eGobiError GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); // Return the device IMSI eGobiError GetIMSI( BYTE stringSize, CHAR * pString ); // Return all serial numbers assigned to the device eGobiError GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); // Set the user lock state maintained by the device eGobiError SetLock( ULONG state, CHAR * pCurrentPIN ); // Set the user lock state maintained by the device eGobiError QueryLock( ULONG * pState ); // Set the user lock code maintained by the device eGobiError ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ); // Return the device hardware revision eGobiError GetHardwareRevision( BYTE stringSize, CHAR * pString ); // Return the version of the active Preferred Roaming List (PRL) eGobiError GetPRLVersion( WORD * pPRLVersion ); // Return the ERI file that is stored in EFS on the device eGobiError GetERIFile( ULONG * pFileSize, BYTE * pFile ); // Request the device to perform automatic service activation eGobiError ActivateAutomatic( CHAR * pActivationCode ); // Request the device perform manual service activation eGobiError ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ); // Requests the device reset configuration to factory defaults eGobiError ResetToFactoryDefaults( CHAR * pSPC ); // Return the device activation state eGobiError GetActivationState( ULONG * pActivationState ); // Set the operating mode of the device` eGobiError SetPower( ULONG powerMode ); // Return the operating mode of the device eGobiError GetPower( ULONG * pPowerMode ); // Return operating mode info from the device eGobiError GetPowerInfo( ULONG * pPowerMode, ULONG * pReasonMask, ULONG * pbPlatform ); // Return the reason why the device is currently offline eGobiError GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ); // Return the current time of the device eGobiError GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ); // Validates the service programming code eGobiError ValidateSPC( CHAR * pSPC ); #endif #ifdef UIM_SUPPORT // Enable or disable protection of UIM contents by a given PIN eGobiError UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Verify the PIN before accessing the UIM contents eGobiError UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Unblock a blocked PIN eGobiError UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Change the PIN value eGobiError UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Return the status of the pin eGobiError UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Return the UIM ICCID eGobiError UIMGetICCID( BYTE stringSize, CHAR * pString ); // Return the blocking status of the specified facility control key eGobiError UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); // Change the specified facility control key eGobiError UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ); // Unblock the specified facility control key eGobiError UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ); #endif #ifdef WMS_SUPPORT // Delete one or more SMS messages from device memory eGobiError DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); // Return the list of SMS messages stored on the device eGobiError GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ); // Return an SMS message from device memory eGobiError GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); // Modify the status of an SMS message eGobiError ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ); // Save an SMS message to device memory eGobiError SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ); // Send an SMS message for immediate over the air transmission eGobiError SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ); // Return the SMS center address eGobiError GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); // Set the SMS center address eGobiError SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ); // Get the current incoming SMS routing information eGobiError GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); // Set the desired incoming SMS routing information eGobiError SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); #endif #ifdef PDS_SUPPORT // Return the current PDS state eGobiError GetPDSState( ULONG * pEnabled, ULONG * pTracking ); // Set the PDS state eGobiError SetPDSState( ULONG enable ); // Inject a system time into the PDS engine eGobiError PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ); // Return the default tracking session configuration eGobiError GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); // Set the default tracking session configuration eGobiError SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); // Return the XTRA automatic download configuration eGobiError GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ); // Set the XTRA automatic download configuration eGobiError SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ); // Return the XTRA WWAN network preference eGobiError GetXTRANetwork( ULONG * pPreference ); // Set the XTRA WWAN network preference eGobiError SetXTRANetwork( ULONG preference ); // Return the XTRA database validity period eGobiError GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); // Force the XTRA database to be downloaded to the device eGobiError ForceXTRADownload(); // Return the XTRA data positioning state eGobiError GetXTRADataState( ULONG * pState ); // Set the XTRA data positioning state eGobiError SetXTRADataState( ULONG state ); // Return the XTRA time positioning state eGobiError GetXTRATimeState( ULONG * pState ); // Set the XTRA time positioning state eGobiError SetXTRATimeState( ULONG state ); // Return the PDS AGPS configuration eGobiError GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ); // Set the PDS AGPS configuration eGobiError SetAGPSConfig( ULONG serverAddress, ULONG serverPort ); // Return the automatic tracking state for the service eGobiError GetServiceAutomaticTracking( ULONG * pbAuto ); // Set the automatic tracking state for the service eGobiError SetServiceAutomaticTracking( ULONG bAuto ); // Return the automatic tracking config for the NMEA COM port eGobiError GetPortAutomaticTracking( ULONG * pbAuto ); // Set the automatic tracking config for the NMEA COM port eGobiError SetPortAutomaticTracking( ULONG bAuto ); // Reset the specified PDS data eGobiError ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ); #endif #ifdef CAT_SUPPORT // Send the terminal response to the device eGobiError CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ); // Send the envelope command to the device eGobiError CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ); #endif #ifdef RMS_SUPPORT // Query the state of the SMS wake functionality eGobiError GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ); // Enable/disable the SMS wake functionality eGobiError SetSMSWake( ULONG bEnable, ULONG wakeMask ); #endif #ifdef OMA_SUPPORT // Start an OMA-DM session eGobiError OMADMStartSession( ULONG sessionType ); // Cancel an ongoing OMA-DM session eGobiError OMADMCancelSession(); // Return info related to the current (or previous) OMA-DM session eGobiError OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); // Return information about the pending network initiated alert eGobiError OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ); // Send the specified OMA-DM selection for the current network // initiated session eGobiError OMADMSendSelection( ULONG selection, USHORT sessionID ); // Return the OMA-DM feature settings eGobiError OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ); // Set the OMA-DM device provisioning service update feature setting eGobiError OMADMSetProvisioningFeature( ULONG bProvisioning ); // Set the OMA-DM PRL service update feature setting eGobiError OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ); #endif #ifdef VOICE_SUPPORT // Initiates a USSD operation eGobiError OriginateUSSD( BYTE * pInfo ); // Respond to a USSD request from the network eGobiError AnswerUSSD( BYTE * pInfo ); // Cancels an in-progress USSD operation eGobiError CancelUSSD(); #endif #ifdef IMG_SUPPORT // Get the current image preference list eGobiError GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); // Set the current image preference list eGobiError SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ); // Return the boot and recovery image download mode eGobiError GetBARMode( ULONG * pBARMode ); // Request the device enter boot and recovery image download mode eGobiError SetBARMode(); // Get the list of images stored on the device eGobiError GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ); // Return info about the specified image from the device eGobiError GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ); // Delete the specified image from the device eGobiError DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ); #endif #ifdef IMG2K_SUPPORT eGobiError GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); // Upgrade firmware eGobiError UpgradeFirmware( CHAR * pDestinationPath ); // Return image information eGobiError GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); // Return the image store folder eGobiError GetImageStore( WORD pathSize, CHAR * pImageStorePath ); #endif protected: /* Database used for packing/parsing QMI protocol entities */ cCoreDatabase mDB; /* Service type/service is required for object operation */ typedef std::pair tServerConfig; /* Servers object is configured to support */ std::set mServerConfig; /* QMI protocol servers */ std::map mServers; /* Fail connect attempts when multiple devices are present? */ bool mbFailOnMultipleDevices; /* Device node that this object is currently connected to */ std::string mDeviceNode; /* Device key string of connected device (may be empty) */ std::string mDeviceKey; /* Last error recorded */ eGobiError mLastError; /* Outstanding requests */ typedef std::pair tServiceRequest; cSyncQueue mRequests; /* Last recorded QMI_WDS_START_NET transaction ID */ WORD mLastNetStartID; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreCAT.cpp000077500000000000000000000172131455567757300236750ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreCAT.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (CAT Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sCATTerminalResponseHdr // Struct to represent a CAT terminal response header /*=========================================================================*/ struct sCATTerminalResponseHdr { public: ULONG mReferenceID; USHORT mLength; // Terminal response data of 'mLength' follows }; /*=========================================================================*/ // Struct sCATEnvelopeCommandHdr // Struct to represent a CAT envelope command header /*=========================================================================*/ struct sCATEnvelopeCommandHdr { public: USHORT mCommandID; USHORT mLength; // Envelope command data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: CATSendTerminalResponse (Public Method) DESCRIPTION: This function sends the terminal response to the device PARAMETERS: refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ) { const ULONG szTransHdr = (ULONG)sizeof( sQMIServiceRawTransactionHeader ); const ULONG szMsgHdr = (ULONG)sizeof( sQMIRawMessageHeader ); const ULONG szTLVHdr = (ULONG)sizeof( sQMIRawContentHeader ); const ULONG szCATHdr = (ULONG)sizeof( sCATTerminalResponseHdr ); // Validate arguments if (pData == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE buf[QMI_MAX_BUFFER_SIZE]; ULONG totalLen = szTransHdr + szMsgHdr+ szTLVHdr + szCATHdr + dataLen; if (QMI_MAX_BUFFER_SIZE < totalLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&buf[0]; pTLV->mTypeID = 1; pTLV->mLength = (WORD)(szCATHdr + dataLen); sCATTerminalResponseHdr * pCAT = (sCATTerminalResponseHdr *)&buf[szTLVHdr]; pCAT->mReferenceID = refID; pCAT->mLength = (USHORT)dataLen; pCAT++; if (dataLen > 0) { memcpy( (LPVOID)pCAT, (LPCVOID)pData, (SIZE_T)dataLen ); } sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_CAT, (WORD)eQMI_CAT_SEND_TERMINAL, false, false, &buf[0], szTLVHdr + szCATHdr + dataLen ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_CAT, pReq ); } /*=========================================================================== METHOD: CATSendEnvelopeCommand (Public Method) DESCRIPTION: This function sends the envelope command to the device PARAMETERS: cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ) { const ULONG szTransHdr = (ULONG)sizeof( sQMIServiceRawTransactionHeader ); const ULONG szMsgHdr = (ULONG)sizeof( sQMIRawMessageHeader ); const ULONG szTLVHdr = (ULONG)sizeof( sQMIRawContentHeader ); const ULONG szCATHdr = (ULONG)sizeof( sCATEnvelopeCommandHdr ); // Validate arguments if (pData == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE buf[QMI_MAX_BUFFER_SIZE]; ULONG totalLen = szTransHdr + szMsgHdr+ szTLVHdr + szCATHdr + dataLen; if (QMI_MAX_BUFFER_SIZE < totalLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&buf[0]; pTLV->mTypeID = 1; pTLV->mLength = (WORD)(szCATHdr + dataLen); sCATEnvelopeCommandHdr * pCAT = (sCATEnvelopeCommandHdr *)&buf[szTLVHdr]; pCAT->mCommandID = (USHORT)cmdID; pCAT->mLength = (USHORT)dataLen; pCAT++; if (dataLen > 0) { memcpy( (LPVOID)pCAT, (LPCVOID)pData, (SIZE_T)dataLen ); } sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_CAT, (WORD)eQMI_CAT_SEND_ENVELOPE, false, false, &buf[0], szTLVHdr + szCATHdr + dataLen ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_CAT, pReq ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreDMS.cpp000077500000000000000000001570711455567757300237200ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreDMS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (DMS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetDeviceCapabilities (Public Method) DESCRIPTION: This function gets device capabilities PARAMETERS: pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { // Validate arguments if ( (pMaxTXChannelRate == 0) || (pMaxRXChannelRate == 0) || (pDataServiceCapability == 0) || (pSimCapability == 0) || (pRadioIfacesSize == 0) || (*pRadioIfacesSize == 0) || (pRadioIfaces == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxRadioIfaces = (ULONG)*pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_CAPS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 5) { return eGOBI_ERR_INVALID_RSP; } // Populate the variables *pMaxTXChannelRate = pf[0].mValue.mU32; *pMaxRXChannelRate = pf[1].mValue.mU32; *pDataServiceCapability = pf[2].mValue.mU32; *pSimCapability = pf[3].mValue.mU8; ULONG activeRadioIfaces = (ULONG)pf[4].mValue.mU8; if (pf.size() < 5 + activeRadioIfaces) { return eGOBI_ERR_INVALID_RSP; } if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces++ = pf[5 + r].mValue.mU32; } *pRadioIfacesSize = activeRadioIfaces; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetManufacturer (Public Method) DESCRIPTION: This function returns the device manufacturer name PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetManufacturer( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_MANUFACTURER; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (stringSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pString[strLen] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetModelID (Public Method) DESCRIPTION: This function returns the device model ID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetModelID( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_MODEL_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (stringSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pString[strLen] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetFirmwareRevision (Public Method) DESCRIPTION: This function returns the device firmware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetFirmwareRevision( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_REV_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (PRI revision) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpPRI = pf[0].mValueString; ULONG lenPRI = (ULONG)tmpPRI.size(); // Space to perform the copy? if (stringSize < lenPRI + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)tmpPRI.c_str(), lenPRI + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetFirmwareRevisions (Public Method) DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { // Validate arguments if ( (amssSize == 0 || pAMSSString == 0) || (bootSize == 0 || pBootString == 0) || (priSize == 0 || pPRIString == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pAMSSString = 0; *pBootString = 0; *pPRIString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_REV_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (PRI revision) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpPRI = pf[0].mValueString; ULONG lenPRI = (ULONG)tmpPRI.size(); // Space to perform the copy? if (priSize < lenPRI + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pPRIString, (LPCSTR)tmpPRI.c_str(), lenPRI + 1 ); // Parse the TLV we want (boot code revision) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpBoot = pf[0].mValueString; ULONG lenBoot = (ULONG)tmpBoot.size(); // Space to perform the copy? if (bootSize < lenBoot + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pBootString, (LPCSTR)tmpBoot.c_str(), lenBoot + 1 ); // Parse the TLV we want (AMSS revision) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpAMSS = pf[0].mValueString; ULONG lenAMSS = (ULONG)tmpAMSS.size(); // Space to perform the copy? if (amssSize < lenAMSS + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pAMSSString, (LPCSTR)tmpAMSS.c_str(), lenAMSS + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetVoiceNumber (Public Method) DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { // Validate arguments if (voiceNumberSize == 0 || pVoiceNumber == 0 || minSize == 0 || pMIN == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pVoiceNumber = 0; *pMIN = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_NUMBER; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf1[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (voiceNumberSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pVoiceNumber, (LPCSTR)pf1[0].mValueString.c_str(), strLen ); pVoiceNumber[strLen] = 0; // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 1) { strLen = pf2[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (minSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pMIN, (LPCSTR)pf2[0].mValueString.c_str(), strLen ); pMIN[strLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetIMSI (Public Method) DESCRIPTION: This function returns the device IMSI PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetIMSI( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_IMSI; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (IMSI) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpIMSI = pf[0].mValueString; ULONG lenIMSI = (ULONG)tmpIMSI.size(); // Space to perform the copy? if (stringSize < lenIMSI + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)tmpIMSI.c_str(), lenIMSI + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSerialNumbers (Public Method) DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { // Validate arguments if ( (esnSize == 0) || (pESNString == 0) || (imeiSize == 0) || (pIMEIString == 0) || (meidSize == 0) || (pMEIDString == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pESNString = 0; *pIMEIString = 0; *pMEIDString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_IDS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() >= 1) { LONG strLen = pf1[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (esnSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pESNString, (LPCSTR)pf1[0].mValueString.c_str(), strLen ); pESNString[strLen] = 0; } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 1) { LONG strLen = pf2[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (imeiSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pIMEIString, (LPCSTR)pf2[0].mValueString.c_str(), strLen ); pIMEIString[strLen] = 0; } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey3( eDB2_ET_QMI_DMS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() >= 1) { LONG strLen = pf3[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (meidSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pMEIDString, (LPCSTR)pf3[0].mValueString.c_str(), strLen ); pMEIDString[strLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetLock (Public Method) DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetLock( ULONG state, CHAR * pCurrentPIN ) { // Validate arguments if (pCurrentPIN == 0 || pCurrentPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string thePIN( pCurrentPIN ); if (thePIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = thePIN.find_first_not_of( "0123456789" ); std::string digitPIN = thePIN.substr( 0, nNonDigit ); if (digitPIN.size() != thePIN.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_SET_USER_LOCK_STATE; std::vector piv; // "%u %s" std::ostringstream tmp; tmp << (UINT)state << " " << thePIN; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: QueryLock (Public Method) DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pState [ O ] - Current lock state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::QueryLock( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_USER_LOCK_STATE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the mode *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ChangeLockPIN (Public Method) DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pCurrentPIN [ O ] - Current four digit PIN string pDesiredPIN [ O ] - New four digit PIN string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { // Validate arguments if ( (pCurrentPIN == 0) || (pCurrentPIN[0] == 0) || (pDesiredPIN == 0) || (pDesiredPIN[0] == 0) ) { return eGOBI_ERR_INVALID_ARG; } std::string theCurPIN( pCurrentPIN ); if (theCurPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = theCurPIN.find_first_not_of( "0123456789" ); std::string digitCurPIN = theCurPIN.substr( 0, nNonDigit ); if (digitCurPIN.size() != theCurPIN.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theNewPIN( pDesiredPIN ); if (theNewPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } nNonDigit = theNewPIN.find_first_not_of( "0123456789" ); std::string digitNewPIN = theNewPIN.substr( 0, nNonDigit ); if (digitNewPIN.size() != theNewPIN.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_SET_USER_LOCK_CODE; std::vector piv; // "%s %s" std::ostringstream tmp; tmp << theCurPIN << " " << theNewPIN; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: GetHardwareRevision (Public Method) DESCRIPTION: This function returns the device hardware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetHardwareRevision( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_MSM_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (stringSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pString[strLen] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetPRLVersion (Public Method) DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: pPRLVersion [ O ] - The PRL version number RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPRLVersion( WORD * pPRLVersion ) { // Validate arguments if (pPRLVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_PRL_VERSION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pPRLVersion = pf[0].mValue.mU16; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetERIFile (Public Method) DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetERIFile( ULONG * pFileSize, BYTE * pFile ) { // Validate arguments if (pFileSize == 0 || *pFileSize == 0 || pFile == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure ULONG maxFileSize = *pFileSize; *pFileSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_READ_ERI_FILE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG fileSz = pf[0].mValue.mU16; if (pf.size() < 1 + fileSz) { return eGOBI_ERR_INVALID_RSP; } // Space to copy into? if (fileSz > maxFileSize) { return eGOBI_ERR_BUFFER_SZ; } for (ULONG f = 0; f < fileSz; f++) { pFile[f] = pf[1 + f].mValue.mU8; } *pFileSize = fileSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ActivateAutomatic (Public Method) DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ActivateAutomatic( CHAR * pActivationCode ) { // Validate arguments if ( (pActivationCode == 0) || (pActivationCode[0] == 0) ) { return eGOBI_ERR_INVALID_ARG; } std::string ac( pActivationCode ); if (ac.size() > 12) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_ACTIVATE_AUTOMATIC; std::vector piv; std::ostringstream tmp; tmp << (ULONG)ac.size() << " \"" << ac << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); /// Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest, 300000 ); } /*=========================================================================== METHOD: ActivateManual (Public Method) DESCRIPTION: This function requests the device perform manual service activation, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code sid [ I ] - System identification number pMDN [ I ] - Mobile Directory Number string pMIN [ I ] - Mobile Identification Number string prlSize [ I ] - (Optional) Size of PRL file array pPRL [ I ] - (Optional) The PRL file contents pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if ( (pSPC == 0) || (pSPC[0] == 0) || (pMDN == 0) || (pMDN[0] == 0) || (pMIN == 0) || (pMIN[0] == 0) || (prlSize > QMI_DMS_MAX_PRL_SIZE) ) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theMDN( pMDN ); if (theMDN.size() > 16) { return eGOBI_ERR_INVALID_ARG; } nNonDigit = theMDN.find_first_not_of( "0123456789" ); std::string digitMDN = theMDN.substr( 0, nNonDigit ); if (digitMDN.size() != theMDN.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theMIN( pMIN ); if (theMIN.size() > 16) { return eGOBI_ERR_INVALID_ARG; } nNonDigit = theMIN.find_first_not_of( "0123456789" ); std::string digitMIN = theMIN.substr( 0, nNonDigit ); if (digitMIN.size() != theMIN.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theMNHA; if (pMNHA != 0 && pMNHA[0] != 0) { theMNHA = pMNHA; if (theMNHA.size() > 16) { return eGOBI_ERR_INVALID_ARG; } } std::string theMNAAA; if (pMNAAA != 0 && pMNAAA[0] != 0) { theMNAAA = pMNAAA; if (theMNAAA.size() > 16) { return eGOBI_ERR_INVALID_ARG; } } WORD msgID = (WORD)eQMI_DMS_ACTIVATE_MANUAL; std::vector piv; // "%s %u %d %s %d %s" std::ostringstream tmp; tmp << spc << " " << (UINT)sid << " " << theMDN.size() << " " << theMDN << " " << theMIN.size() << " " << theMIN; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (theMNHA.size() > 0) { sProtocolEntityKey pek1( eDB2_ET_QMI_DMS_REQ, msgID, 17 ); std::ostringstream tmp; tmp << (int)theMNHA.size() << " \"" << theMNHA << "\""; sDB2PackingInput pi1( pek1, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi1 ); } if (theMNAAA.size() > 0) { sProtocolEntityKey pek1( eDB2_ET_QMI_DMS_REQ, msgID, 18 ); std::ostringstream tmp; tmp << (int)theMNAAA.size() << " \"" << theMNAAA << "\""; sDB2PackingInput pi1( pek1, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi1 ); } // Do we need to go through the anguish of the segmented PRL? if (prlSize > 0) { ULONG blockSz = QMI_DMS_MAX_PRL_BLOCK; // Determine number of writes ULONG writes = prlSize / blockSz; if ((prlSize % blockSz) != 0) { writes++; } ULONG offset = 0; ULONG to = DEFAULT_GOBI_QMI_TIMEOUT; // Generate and send requests eGobiError err = eGOBI_ERR_NONE; for (ULONG w = 0; w < writes; w++) { if (w == writes - 1) { to = 300000; if ((prlSize % blockSz) != 0) { blockSz = prlSize % blockSz; } } std::vector pivLocal = piv; // "%u %u %u" std::ostringstream tmp2; tmp2 << (UINT)prlSize << " " << (UINT)blockSz << " " << (UINT)w; for (ULONG p = 0; p < blockSz; p++) { tmp2 << " " << (UINT)pPRL[offset + p]; } sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 19 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); pivLocal.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, pivLocal ); // Send the QMI request, check result, and return err = SendAndCheckReturn( eQMI_SVC_DMS, pRequest, to ); if (err != eGOBI_ERR_NONE) { break; } else { offset += blockSz; } } if (err != eGOBI_ERR_NONE) { return err; } } else { // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return eGobiError rc = SendAndCheckReturn( eQMI_SVC_DMS, pRequest, 300000 ); if (rc != eGOBI_ERR_NONE) { return rc; } } // Ask device to power down eGobiError rc = SetPower( 5 ); if (rc != eGOBI_ERR_NONE) { return eGOBI_ERR_RESET; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ResetToFactoryDefaults (Public Method) DESCRIPTION: This function requests the device reset configuration to factory defaults, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ResetToFactoryDefaults( CHAR * pSPC ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_FACTORY_DEFAULTS; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request and check result eGobiError rc = SendAndCheckReturn( eQMI_SVC_DMS, pRequest, 300000 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Ask device to power down rc = SetPower( 5 ); if (rc != eGOBI_ERR_NONE) { return eGOBI_ERR_RESET; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetActivationState (Public Method) DESCRIPTION: This function returns the device activation state PARAMETERS: pActivationState [ O ] - Service activation state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetActivationState( ULONG * pActivationState ) { // Validate arguments if (pActivationState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_ACTIVATED_STATE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pActivationState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPower (Public Method) DESCRIPTION: This function sets the operating mode of the device PARAMETERS: powerMode [ I ] - Selected operating mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPower( ULONG powerMode ) { WORD msgID = (WORD)eQMI_DMS_SET_OPERATING_MODE; std::vector piv; std::ostringstream tmp; tmp << (UINT)powerMode; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: GetPower (Public Method) DESCRIPTION: This function returns the operating mode of the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPower( ULONG * pPowerMode ) { // Validate arguments if (pPowerMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = ULONG_MAX; ULONG reasonMask = 0; ULONG bPlatform = 0; eGobiError rc = GetPowerInfo( pPowerMode, &reasonMask, &bPlatform ); return rc; } /*=========================================================================== METHOD: GetPowerInfo (Public Method) DESCRIPTION: This function returns operating mode info from the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPowerInfo( ULONG * pPowerMode, ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pPowerMode == 0 || pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = ULONG_MAX; *pReasonMask = 0; *pbPlatform = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_OPERTAING_MODE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pPowerMode = pf[0].mValue.mU32; // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); // Convert back to a bitmask ULONG fieldCount = (ULONG)pf.size(); if (fieldCount > 16) { fieldCount = 16; } for (ULONG f = 0; f < fieldCount; f++) { ULONG val = (ULONG)pf[f].mValue.mU8 & 0x00000001; *pReasonMask |= (val << f); } // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pbPlatform = (ULONG)pf[0].mValue.mU8; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pReasonMask = 0; *pbPlatform = 0; ULONG powerMode = 0; eGobiError rc = GetPowerInfo( &powerMode, pReasonMask, pbPlatform ); return rc; } /*=========================================================================== METHOD: GetNetworkTime (Public Method) DESCRIPTION: This function returns the current time of the device PARAMETERS: pTimeStamp [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ) { // Validate arguments if (pTimeCount == 0 || pTimeSource == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_TIME; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pTimeCount = pf[0].mValue.mU64; *pTimeSource = pf[1].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ValidateSPC (Public Method) DESCRIPTION: This function validates the service programming code PARAMETERS: pSPC [ I ] - Six digit service programming code RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ValidateSPC( CHAR * pSPC ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_VALIDATE_SPC; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request and check result return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreImg.cpp000077500000000000000000000442151455567757300240040ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreImg.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (Image Management) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetImagesPreference (Public Method) DESCRIPTION: This function gets the current images preference PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { // Validate arguments if ( (pImageListSize == 0) || (*pImageListSize == 0) || (pImageList == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pImageListSize; *pImageListSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_FIRMWARE_PREF; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 1 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 1 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG needSz = (ULONG)pHdr->mLength; if (needSz == 0) { return eGOBI_ERR_INVALID_RSP; } *pImageListSize = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; memcpy( (LPVOID)pImageList, (LPCVOID)pData, (SIZE_T)needSz ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetImagesPreference (Public Method) DESCRIPTION: This function sets the current images preference PARAMETERS: imageListSize [ I ] - The size in BYTEs of the image list array pImageList [ I ] - The image list array bForceDownload [ I ] - Force device to download images from host? modemIndex [ I ] - Desired storage index for downloaded modem image pImageTypesSize [I/O] - Upon input the maximum number of elements that the download image types array can contain. Upon successful output the actual number of elements in the download image types array pImageTypes [ O ] - The download image types array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ) { // Validate arguments if ( (imageListSize == 0) || (pImageList == 0) || (pImageTypesSize == 0) || (*pImageTypesSize == 0) || (pImageTypes == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pImageTypesSize; *pImageTypesSize = 0; WORD msgID = (WORD)eQMI_DMS_SET_FIRMWARE_PREF; std::vector piv; sProtocolEntityKey pek1( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi1( pek1, pImageList, imageListSize ); piv.push_back( pi1 ); BYTE bOverride = 0; if (bForceDownload != 0) { bOverride = 1; sProtocolEntityKey pek2( eDB2_ET_QMI_DMS_REQ, msgID, 16 ); sDB2PackingInput pi2( pek2, &bOverride, 1 ); piv.push_back( pi2 ); } if (modemIndex != UCHAR_MAX) { sProtocolEntityKey pek3( eDB2_ET_QMI_DMS_REQ, msgID, 17 ); sDB2PackingInput pi3( pek3, &modemIndex, 1 ); piv.push_back( pi3 ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 1 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 1 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG dataLen = (ULONG)pHdr->mLength; if (dataLen == 0) { return eGOBI_ERR_INVALID_RSP; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; BYTE typeCount = *pData++; if (typeCount != 0) { if (dataLen != (ULONG)typeCount + 1) { return eGOBI_ERR_INVALID_RSP; } *pImageTypesSize = typeCount; if (typeCount > maxSz) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pImageTypes, (LPCVOID)pData, (SIZE_T)typeCount ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetBARMode (Public Method) DESCRIPTION: This function returns the boot and recovery image download mode PARAMETERS: pBARMode [ O ] - Boot and recovery image download mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetBARMode( ULONG * pBARMode ) { // Validate arguments if (pBARMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_IMG_DLOAD_MODE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pBARMode = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetBARMode (Public Method) DESCRIPTION: This function requests the device enter boot and recovery image download mode after the next reset RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetBARMode() { WORD msgID = (WORD)eQMI_DMS_SET_IMG_DLOAD_MODE; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: GetStoredImages (Public Method) DESCRIPTION: This function gets the list of images stored on the device PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ) { // Validate arguments if ( (pImageListSize == 0) || (*pImageListSize == 0) || (pImageList == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pImageListSize; // Assume failure *pImageListSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_LIST_FIRMWARE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 1 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 1 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG needSz = (ULONG)pHdr->mLength; *pImageListSize = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; memcpy( (LPVOID)pImageList, (LPCVOID)pData, (SIZE_T)needSz ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetStoredImageInfo (Public Method) DESCRIPTION: This function returns info about the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader pVersionID [ O ] - Image version ID pInfo [ O ] - Image info string pLockID [ O ] - Image OEM lock ID RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ) { // Validate arguments if ( (imageInfoSize == 0) || (pImageInfo == 0) || (pMajorVersion == 0) || (pMinorVersion == 0) || (pVersionID == 0) || (pInfo == 0) || (pLockID == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pMajorVersion = ULONG_MAX; *pMinorVersion = ULONG_MAX; *pVersionID = ULONG_MAX; *pLockID = ULONG_MAX; pInfo[0] = 0; WORD msgID = (WORD)eQMI_DMS_GET_FIRMWARE_INFO; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, pImageInfo, imageInfoSize ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Keep track of the number of TLVs we actually processed ULONG tlvCount = 0; // Parse the TLV we want (by DB key) std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { tlvCount++; *pMajorVersion = (ULONG)pf[0].mValue.mU16; *pMinorVersion = (ULONG)pf[1].mValue.mU16; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { tlvCount++; *pVersionID = pf[0].mValue.mU32; LONG strLen = pf[1].mValueString.size(); if (strLen > 0 && strLen <= 32) { memcpy( pInfo, pf[1].mValueString.c_str(), strLen ); if (strLen < 32) { pInfo[strLen] = 0; } } } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { tlvCount++; *pLockID = pf[0].mValue.mU32; } if (tlvCount == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: DeleteStoredImage (Public Method) DESCRIPTION: This function deletes the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ) { // Validate arguments if (imageInfoSize == 0 || pImageInfo == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_DELETE_FIRMWARE; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, pImageInfo, imageInfoSize ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreImg2k.cpp000077500000000000000000000416621455567757300242440ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreImg2k.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (Image Management, G2k API) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiMBNMgmt.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetGenericImage (Free Method) DESCRIPTION: Return a compatible AMSS generic image PARAMETERS: uqcnInfo [ I ] - UQCN image needing a compatible AMSS generic image RETURN VALUE: sImageInfo - Generic image information ===========================================================================*/ sImageInfo GetGenericImage( const sImageInfo & uqcnInfo ) { // Validate arguments sImageInfo amssInfo; // Obtain the technology/carrier of the UQCN ULONG uqcnTech; ULONG uqcnCarrier; ULONG dummy; eGobiError rc = ::MapVersionInfo( uqcnInfo.mVersionID, (BYTE)uqcnInfo.mImageType, uqcnInfo.mVersion.c_str(), &uqcnTech, &uqcnCarrier, &dummy, &dummy ); if (rc != eGOBI_ERR_NONE) { return amssInfo; } // Recursively enumerate all folders of the image store std::vector folders; std::string imageStore = ::GetImageStore(); EnumerateFolders( imageStore, folders ); // Did we find any folders? ULONG foldersSz = (ULONG)folders.size(); if (foldersSz == 0) { return amssInfo; } // Go through each folder searching for a compatible generic AMSS image for (ULONG f = 0; f < foldersSz; f++) { // Search all MBN files in the specified folder std::string folderSearch = folders[f]; int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } std::vector files; DepthSearch( folderSearch, 0, ".mbn", files ); int fileNum = files.size(); for (int i = 0; i < fileNum; i++) { std::string mbnName = files[i]; BYTE imageType = UCHAR_MAX; BYTE imageID[16] = { 0 }; ULONG versionID = ULONG_MAX; USHORT versionSz = MAX_PATH * 2 + 1; CHAR versionStr[MAX_PATH * 2 + 1] = { 0 }; rc = ::GetImageInfo( mbnName.c_str(), &imageType, &imageID[0], &versionID, versionSz, &versionStr[0] ); if (rc == eGOBI_ERR_NONE) { if ((eGobiMBNType)imageType == eGOBI_MBN_TYPE_MODEM) { ULONG amssTech; ULONG amssCarrier; rc = ::MapVersionInfo( versionID, imageType, (LPCSTR)&versionStr[0], &amssTech, &amssCarrier, &dummy, &dummy ); if (rc == eGOBI_ERR_NONE) { if ( (amssTech == uqcnTech) && (amssCarrier == (ULONG)eGOBI_IMG_CAR_GENERIC) ) { amssInfo.mImageType = (eGobiMBNType)imageType; amssInfo.mVersionID = versionID; amssInfo.mVersion = (LPCSTR)&versionStr[0]; memcpy( (LPVOID)&amssInfo.mImageID[0], (LPCVOID)&imageID[0], MBN_UNIQUE_ID_LEN ); break; } } } } } } // Success return amssInfo; } /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetFirmwareInfo (Public Method) DESCRIPTION: Returns image information obtained from the current device firmware PARAMETERS: pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Validate arguments if ( (pFirmwareID == 0) || (pTechnology == 0) || (pCarrier == 0) || (pRegion == 0) || (pGPSCapability == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Do we have a device node? if (mDeviceNode.empty() == true) { return eGOBI_ERR_NO_CONNECTION; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_REV_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } std::string uqcnIDString = pf[0].mValueString; LONG strLen = uqcnIDString.size(); if (strLen != 8) { return eGOBI_ERR_INVALID_RSP; } std::string idString1 = uqcnIDString.substr( 0, 2 ); std::string idString2 = uqcnIDString.substr( 2, 2 ); std::string idString3 = uqcnIDString.substr( 4, 2 ); std::string idString4 = uqcnIDString.substr( 6, 2 ); ULONG id1 = 0; ULONG id2 = 0; ULONG id3 = 0; ULONG id4 = 0; bool bID1 = StringToULONG( idString1.c_str(), 16, id1 ); bool bID2 = StringToULONG( idString2.c_str(), 16, id2 ); bool bID3 = StringToULONG( idString3.c_str(), 16, id3 ); bool bID4 = StringToULONG( idString4.c_str(), 16, id4 ); if (bID1 == false || bID2 == false || bID3 == false || bID4 == false) { return eGOBI_ERR_INVALID_RSP; } ULONG uqcnID = (id1 << 24) | (id2 << 16) | (id3 << 8) | id4; // Parse the TLV we want (AMSS revision) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } *pFirmwareID = uqcnID; eGobiError err = ::MapVersionInfo( uqcnID, (BYTE)eGOBI_MBN_TYPE_PRI, pf[0].mValueString.c_str(), pTechnology, pCarrier, pRegion, pGPSCapability ); return err; } /*=========================================================================== METHOD: UpgradeFirmware (Public Method) DESCRIPTION: This function performs the following set of steps: a) Verifies arguments b) Updates firmware ID on device c) Resets the device NOTE: Upon successful completion the above steps will have been completed, however the actual upgrade of the firmware will necessarily then follow. PARAMETERS: pDestinationPath [ I ] - The fully qualified path to the destination folder that the firmware download service will use RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UpgradeFirmware( CHAR * pDestinationPath ) { // Validate arguments if (pDestinationPath == 0 || pDestinationPath[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Do we have a device ID? if (mDeviceNode.empty() == true) { return eGOBI_ERR_NO_CONNECTION; } // Use that to validate the image store for this device std::string tmpPath( pDestinationPath ); int tmpPathlen = tmpPath.size(); if (tmpPath[tmpPathlen - 1] != '/') { tmpPath += '/'; } std::string imageStore = ::GetImageStore(); if (tmpPath.find( imageStore ) == std::string::npos) { return eGOBI_ERR_INVALID_FILE; } sImageInfo amssInfo; sImageInfo uqcnInfo; std::vector images; images = ::GetImagesInfo( tmpPath ); ULONG imageCount = (ULONG)images.size(); for (ULONG i = 0; i < imageCount; i++) { const sImageInfo & ii = images[i]; if (ii.mImageType == eGOBI_MBN_TYPE_MODEM) { amssInfo = ii; } else if (ii.mImageType == eGOBI_MBN_TYPE_PRI) { uqcnInfo = ii; } } if (uqcnInfo.IsValid() == false) { return eGOBI_ERR_INVALID_FILE; } if (amssInfo.IsValid() == false) { amssInfo = GetGenericImage( uqcnInfo ); // Still bad? if (amssInfo.IsValid() == false) { return eGOBI_ERR_INVALID_FILE; } } WORD msgID = (WORD)eQMI_DMS_SET_FIRMWARE_PREF; std::vector piv; std::ostringstream amssIDStr; std::ostringstream uqcnIDStr; for (ULONG v = 0; v < 16; v++) { amssIDStr << " " << (ULONG)amssInfo.mImageID[v]; uqcnIDStr << " " << (ULONG)uqcnInfo.mImageID[v]; } // "2 0%s %d \"%s\" 1%s %d \"%s\"" std::ostringstream tmp; tmp << "2 0" << amssIDStr.str() << " " << amssInfo.mVersion.size() << " \"" << amssInfo.mVersion << "\" 1" << uqcnIDStr.str() << " " << uqcnInfo.mVersion.size() << " \"" << uqcnInfo.mVersion << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return eGobiError rc = SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); if (rc != eGOBI_ERR_NONE) { return rc; } // Ask device to power down rc = SetPower( 5 ); if (rc != eGOBI_ERR_NONE) { return eGOBI_ERR_RESET; } return rc; } /*=========================================================================== METHOD: GetImageInfo (Public Method) DESCRIPTION: Returns image information obtained from the firmware image located at the provided path PARAMETERS: pPath [ I ] - Location of the firmware image pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Validate arguments if ( (pPath == 0) || (pPath[0] == 0) || (pFirmwareID == 0) || (pTechnology == 0) || (pCarrier == 0) || (pRegion == 0) || (pGPSCapability == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Do we have a device ID? if (mDeviceNode.empty() == true) { return eGOBI_ERR_NO_CONNECTION; } // Use that to validate the image store for this device std::string tmpPath( pPath ); int tmpPathlen = tmpPath.size(); if (tmpPath[tmpPathlen - 1] != '/') { tmpPath += '/'; } std::string imageStore = ::GetImageStore(); if (tmpPath.find( imageStore ) < 0) { return eGOBI_ERR_INVALID_FILE; } std::vector images; images = ::GetImagesInfo( tmpPath ); ULONG imageCount = (ULONG)images.size(); for (ULONG i = 0; i < imageCount; i++) { const sImageInfo & ii = images[i]; if (ii.mImageType == eGOBI_MBN_TYPE_PRI) { *pFirmwareID = ii.mVersionID; return ::MapVersionInfo( ii.mVersionID, (BYTE)ii.mImageType, ii.mVersion.c_str(), pTechnology, pCarrier, pRegion, pGPSCapability ); } } return eGOBI_ERR_INVALID_FILE; } /*=========================================================================== METHOD: GetImageStore (Public Method) DESCRIPTION: Returns the image store folder, i.e. the folder co-located with the QDL Service executable which (by default) contains one or more carrier specific image subfolders PARAMETERS: pathSize [ I ] - Maximum number of characters (including NULL terminator) that can be copied to the image store path array pImageStorePath [ O ] - The path to the image store RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetImageStore( WORD pathSize, CHAR * pImageStorePath ) { // Do we have a device ID? if (mDeviceNode.size() == true) { return eGOBI_ERR_NO_CONNECTION; } std::string imageStore = ::GetImageStore(); // Copy over image store LONG strLen = imageStore.size(); if (pathSize < (ULONG)strLen + 1) { pImageStorePath[0] = 0; return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pImageStorePath, (LPCVOID)imageStore.c_str(), (SIZE_T)strLen ); pImageStorePath[strLen] = 0; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreNAS.cpp000077500000000000000000001576601455567757300237220ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreNAS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (NAS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for a scanned network description const ULONG MAX_SNI_DESCRIPTION_LEN = 255; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sEVDOCustomSCPConfig // Struct to represent CDMA 1xEV-DO custom SCP config /*=========================================================================*/ struct sEVDOCustomSCPConfig { public: BYTE mbActive; ULONG mProtocolMask; ULONG mBroadcastMask; ULONG mApplicationMask; }; /*=========================================================================*/ // Struct sScannedNetworkInfo // Struct to represent scanned network information /*=========================================================================*/ struct sScannedNetworkInfo { public: USHORT mMCC; USHORT mMNC; ULONG mInUse; ULONG mRoaming; ULONG mForbidden; ULONG mPreferred; CHAR mDescription[MAX_SNI_DESCRIPTION_LEN]; }; /*=========================================================================*/ // Struct sScannedNetworkRATInfo // Struct to represent scanned network RAT information /*=========================================================================*/ struct sScannedNetworkRATInfo { public: USHORT mMCC; USHORT mMNC; ULONG mRAT; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetANAAAAuthenticationStatus (Public Method) DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: pStatus [ O ] - AN-AAA authentication status RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetANAAAAuthenticationStatus( ULONG * pStatus ) { // Validate arguments if (pStatus == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_AAA_AUTH_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the index *pStatus = (ULONG)pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSignalStrengths (Public Method) DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { // Validate arguments if ( (pArraySizes == 0) || (*pArraySizes == 0) || (pSignalStrengths == 0) || (pRadioInterfaces == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSignals = (ULONG)*pArraySizes; // Assume failure *pArraySizes = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_RSSI; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 2) { return eGOBI_ERR_INVALID_RSP; } // Remove any values outside the legal range std::map sigMap; INT8 sigVal = pf[0].mValue.mS8; ULONG radioVal = pf[1].mValue.mU32; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() > 2) { ULONG fi = 0; ULONG auxSigs = (ULONG)pf[fi++].mValue.mU16; if (pf.size() >= 1 + 2 * auxSigs) { for (ULONG s = 0; s < auxSigs; s++, fi += 2) { sigVal = pf[fi].mValue.mS8; radioVal = pf[fi + 1].mValue.mU32; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } } } } ULONG sigCount = 0; std::map ::const_iterator pIter; for (pIter = sigMap.begin(); pIter != sigMap.end(); pIter++, sigCount++) { if (sigCount < maxSignals) { pSignalStrengths[sigCount] = pIter->second; pRadioInterfaces[sigCount] = pIter->first; *pArraySizes = sigCount + 1; } } // No valid signals? if (sigCount == 0) { return eGOBI_ERR_NO_SIGNAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetRFInfo (Public Method) DESCRIPTION: This function gets the current RF information PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pInstanceSize; *pInstanceSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_RF_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); ULONG fieldCount = (ULONG)pf.size(); if (fieldCount < 1) { return eGOBI_ERR_INVALID_RSP; } BYTE ifaceCount = pf[0].mValue.mU8; if (fieldCount < 1 + ((ULONG)ifaceCount * 3)) { return eGOBI_ERR_INVALID_RSP; } if (ifaceCount > maxInstances) { ifaceCount = maxInstances; } ULONG * pOutput = (ULONG *)pInstances; for (BYTE i = 0; i < ifaceCount; i++) { ULONG offset = 3 * (ULONG)i; *pOutput++ = pf[offset + 1].mValue.mU32; *pOutput++ = pf[offset + 2].mValue.mU32; *pOutput++ = (ULONG)pf[offset + 3].mValue.mU16; } *pInstanceSize = ifaceCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PerformNetworkScan (Public Method) DESCRIPTION: This function performs a scan for available networks PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if ( (pInstanceSize == 0) || (*pInstanceSize == 0) || (pInstances == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; // Assume failure *pInstanceSize = 0; // This can take a really long time ULONG to = MAX_REQ_TIMEOUT; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_SCAN_NETS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID, to ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); ULONG maxIdx = (ULONG)pf.size(); if (maxIdx-- < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG idx = 0; BYTE netCount = pf[idx++].mValue.mU8; if (netCount > maxInstances) { netCount = maxInstances; } sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Validate field count if (idx + 6 > maxIdx) { return eGOBI_ERR_INVALID_RSP; } pNet->mMCC = pf[idx++].mValue.mU16; pNet->mMNC = pf[idx++].mValue.mU16; pNet->mInUse = pf[idx++].mValue.mU32; pNet->mRoaming = pf[idx++].mValue.mU32; pNet->mForbidden = pf[idx++].mValue.mU32; pNet->mPreferred = pf[idx++].mValue.mU32; memset( &pNet->mDescription[0], 0, (SIZE_T)MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pf[idx++].mValue.mU8; if (descLen > 0) { std::string netDesc( pf[idx++].mValueString ); ULONG actualLen = netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } memcpy( (LPVOID)&pNet->mDescription[0], (LPCSTR)netDesc.c_str(), (SIZE_T)actualLen ); } pNet++; } *pInstanceSize = netCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PerformNetworkRATScan (Public Method) DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { // Validate arguments if ( (pInstanceSize == 0) || (*pInstanceSize == 0) || (pInstances == 0) || (pRATSize == 0) || (*pRATSize == 0) || (pRATInstances == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; BYTE maxRATInstances = *pRATSize; // Assume failure *pInstanceSize = 0; *pRATSize = 0; // This can take a really long time ULONG to = MAX_REQ_TIMEOUT; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_SCAN_NETS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID, to ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); ULONG maxIdx = (ULONG)pf.size(); if (maxIdx-- < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG idx = 0; BYTE netCount = pf[idx++].mValue.mU8; if (netCount > maxInstances) { netCount = maxInstances; } sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Validate field count if (idx + 6 > maxIdx) { return eGOBI_ERR_INVALID_RSP; } pNet->mMCC = pf[idx++].mValue.mU16; pNet->mMNC = pf[idx++].mValue.mU16; pNet->mInUse = pf[idx++].mValue.mU32; pNet->mRoaming = pf[idx++].mValue.mU32; pNet->mForbidden = pf[idx++].mValue.mU32; pNet->mPreferred = pf[idx++].mValue.mU32; memset( &pNet->mDescription[0], 0, (SIZE_T)MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pf[idx++].mValue.mU8; if (descLen > 0) { std::string netDesc( pf[idx++].mValueString ); ULONG actualLen = netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } LPCSTR pNetDesc = netDesc.c_str(); memcpy( (LPVOID)&pNet->mDescription[0], (LPCVOID)pNetDesc, (SIZE_T)actualLen ); } pNet++; } // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); maxIdx = (ULONG)pf.size(); if (maxIdx-- < 1) { return eGOBI_ERR_INVALID_RSP; } idx = 0; BYTE ratCount = pf[idx++].mValue.mU8; if (ratCount > maxRATInstances) { ratCount = maxRATInstances; } sScannedNetworkRATInfo * pRAT = (sScannedNetworkRATInfo *)pRATInstances; for (BYTE r = 0; r < ratCount; r++) { // Validate field count if (idx + 2 > maxIdx) { return eGOBI_ERR_INVALID_RSP; } pRAT->mMCC = pf[idx++].mValue.mU16; pRAT->mMNC = pf[idx++].mValue.mU16; pRAT->mRAT = pf[idx++].mValue.mU32; pRAT++; } *pInstanceSize = netCount; *pRATSize = ratCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: InitiateNetworkRegistration (Public Method) DESCRIPTION: This function initiates a network registration PARAMETERS: regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { WORD msgID = (WORD)eQMI_NAS_REGISTER_NET; std::vector piv; std::ostringstream tmp; tmp << (UINT)regType; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (regType == 2) { // We need to add the manual registration data // "%hu %hu %u" std::ostringstream tmp2; tmp2 << (USHORT)mcc << " " << (USHORT)mnc << " " << (UINT)rat; pek = sProtocolEntityKey( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 30000 ); } /*=========================================================================== METHOD: InitiateDomainAttach (Public Method) DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: action [ I ] - PS attach action (attach or detach) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::InitiateDomainAttach( ULONG action ) { WORD msgID = (WORD)eQMI_NAS_ATTACH_DETACH; std::vector piv; std::ostringstream tmp; tmp << (UINT)action; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 30000 ); } /*=========================================================================== METHOD: GetServingNetwork (Public Method) DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { // Validate arguments if ( (pRegistrationState == 0) || (pCSDomain == 0) || (pPSDomain == 0) || (pRAN == 0) || (pRadioIfacesSize == 0) || (*pRadioIfacesSize == 0) || (pRadioIfaces == 0) || (pRoaming == 0) || (pMCC == 0) || (pMNC == 0) || (nameSize == 0) || (pName == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRadioIfaces = *pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; *pRoaming = ULONG_MAX; *pMCC = USHRT_MAX; *pMNC = USHRT_MAX; *pName = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_SS_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 5) { return eGOBI_ERR_INVALID_RSP; } // Populate the variables *pRegistrationState = pf1[0].mValue.mU32; *pCSDomain = pf1[1].mValue.mU32; *pPSDomain = pf1[2].mValue.mU32; *pRAN = pf1[3].mValue.mU32; BYTE activeRadioIfaces = pf1[4].mValue.mU8; if (pf1.size() < 5 + (ULONG)activeRadioIfaces) { return eGOBI_ERR_INVALID_RSP; } if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces++ = pf1[5 + r].mValue.mU32; } *pRadioIfacesSize = activeRadioIfaces; // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 1) { *pRoaming = pf2[0].mValue.mU32; } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey3( eDB2_ET_QMI_NAS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() >= 3) { *pMCC = pf3[0].mValue.mU16; *pMNC = pf3[1].mValue.mU16; // Network name? if (pf3[2].mValue.mU8 > 0 && pf3.size() >= 4) { LONG strLen = pf3[3].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (nameSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pName, (LPCSTR)pf3[3].mValueString.c_str(), strLen ); pName[strLen] = 0; } } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetServingNetworkCapabilities (Public Method) DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetServingNetworkCapabilities( BYTE * pDataCapsSize, BYTE * pDataCaps ) { // Validate arguments if ( (pDataCapsSize == 0) || (*pDataCapsSize == 0) || (pDataCaps == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxDataCaps = *pDataCapsSize; // Assume failure *pDataCapsSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_SS_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } BYTE activeDataCaps = pf[0].mValue.mU8; if (pf.size() < 1 + (ULONG)activeDataCaps) { return eGOBI_ERR_INVALID_RSP; } if (activeDataCaps > maxDataCaps) { activeDataCaps = maxDataCaps; } ULONG * pOutDataCaps = (ULONG *)pDataCaps; for (ULONG d = 0; d < activeDataCaps; d++) { *pOutDataCaps++ = pf[1 + d].mValue.mU32; } *pDataCapsSize = activeDataCaps; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetDataBearerTechnology (Public Method) DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: pDataCaps [ O ] - The data bearer technology RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDataBearerTechnology( ULONG * pDataBearer ) { // Validate arguments if (pDataBearer == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DATA_BEARER; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pDataBearer = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetHomeNetwork (Public Method) DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { // Validate arguments if ( (pMCC == 0) || (pMNC == 0) || (nameSize == 0) || (pName == 0) || (pSID == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pName = 0; *pSID = USHRT_MAX; *pNID = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_HOME_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 3) { return eGOBI_ERR_INVALID_RSP; } // Populate the variables *pMCC = pf1[0].mValue.mU16; *pMNC = pf1[1].mValue.mU16; // Network name? if (pf1[2].mValue.mU8 > 0 && pf1.size() >= 4) { LONG strLen = pf1[3].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (nameSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pName, (LPCSTR)pf1[3].mValueString.c_str(), strLen ); pName[strLen] = 0; } } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 2) { *pSID = pf2[0].mValue.mU16; *pNID = pf2[1].mValue.mU16; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetNetworkPreference (Public Method) DESCRIPTION: This function sets the network registration preference PARAMETERS: technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetNetworkPreference( ULONG technologyPref, ULONG duration ) { // Buffer to hold technology preference TLV (ID = 1) const ULONG TLV_HDR_SZ = (ULONG)sizeof( sQMIRawContentHeader ); BYTE req[3 + TLV_HDR_SZ]; // Fill out TLV header sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&req[0]; pTLV->mLength = 3; pTLV->mTypeID = 1; // Copy packed technology preference WORD as-is WORD * pTmp = (WORD *)&req[TLV_HDR_SZ]; *pTmp = (WORD)technologyPref; // Fill out duration req[TLV_HDR_SZ + 2] = (BYTE)duration; // Pack TLV into a QMI NAS request sSharedBuffer * pRequest = 0; pRequest = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_NAS, eQMI_NAS_SET_TECH_PREF, false, false, &req[0], 3 + TLV_HDR_SZ ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest ); } /*=========================================================================== METHOD: GetNetworkPreference (Public Method) DESCRIPTION: This function returns the network registration preference PARAMETERS: pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { // Validate arguments if ( (pTechnologyPref == 0) || (pDuration == 0) || (pPersistentTechnologyPref == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_TECH_PREF; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); sDB2NavInput ni1 = FindTLV( tlvs, tlvKey1 ); if (ni1.mPayloadLen < 3) { return eGOBI_ERR_INVALID_RSP; } const BYTE * pData = ni1.mpPayload; const WORD * pTmp = (const WORD *)pData; pData += 2; // Populate the variables *pTechnologyPref = (ULONG)*pTmp; *pDuration = (ULONG)*pData; // Until we know any better the persistent setting is the current setting *pPersistentTechnologyPref = *pTechnologyPref; // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); sDB2NavInput ni2 = FindTLV( tlvs, tlvKey2 ); if (ni2.mPayloadLen >= 2) { pTmp = (const WORD *)ni2.mpPayload; *pPersistentTechnologyPref = (ULONG)*pTmp; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetCDMANetworkParameters (Public Method) DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // If you specify one of the custom SCP config fields then you must // specify them all ULONG scpCount = 0; if (pCustomSCP != 0) { scpCount++; } if (pProtocol != 0) { scpCount++; } if (pBroadcast != 0) { scpCount++; } if (pApplication != 0) { scpCount++; } if (scpCount != 0 && scpCount != 4) { return eGOBI_ERR_INVALID_ARG; } // Rev. 0 and SCP custom config are mutually exclusive if (pForceRev0 != 0 && scpCount == 4) { if (*pForceRev0 != 0 && *pCustomSCP != 0) { return eGOBI_ERR_INVALID_ARG; } } WORD msgID = (WORD)eQMI_NAS_SET_NET_PARAMS; std::vector piv; // Need to start with SPC? if (pForceRev0 != 0 || scpCount == 4) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); } if (pForceRev0 != 0) { // "%u" std::ostringstream tmp; tmp << (UINT)(*pForceRev0 == 0 ? 0 : 1); sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 20 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (scpCount == 4) { // "%u %u %u %u %u %u %u %u %u %u %u %u" std::ostringstream tmp; tmp << (UINT)(*pCustomSCP == 0 ? 0 : 1) << (UINT)(*pProtocol & 0x00000001 ? 1 : 0) << (UINT)(*pProtocol & 0x00000002 ? 1 : 0) << (UINT)(*pProtocol & 0x00000004 ? 1 : 0) << (UINT)(*pProtocol & 0x00000008 ? 1 : 0) << (UINT)(*pProtocol & 0x00000010 ? 1 : 0) << (UINT)(*pProtocol & 0x00000020 ? 1 : 0) << (UINT)(*pProtocol & 0x00000040 ? 1 : 0) << (UINT)(*pProtocol & 0x00000080 ? 1 : 0) << (UINT)(*pBroadcast & 0x00000001 ? 1 : 0) << (UINT)(*pApplication & 0x00000001 ? 1 : 0) << (UINT)(*pApplication & 0x00000002 ? 1 : 0); sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pRoaming != 0) { // "%u" std::ostringstream tmp; tmp << (UINT)*pRoaming; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 22 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // We require something to actually configure if (piv.size() == 0) { // Much ado about nothing return eGOBI_ERR_INVALID_ARG; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 5000 ); } /*=========================================================================== METHOD: GetCDMANetworkParameters (Public Method) DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if ( (pSCI == 0) || (pSCM == 0) || (pRegHomeSID == 0) || (pRegForeignSID == 0) || (pRegForeignNID == 0) || (pForceRev0 == 0) || (pCustomSCP == 0) || (pProtocol == 0) || (pBroadcast == 0) || (pApplication == 0) || (pRoaming == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pSCI = UCHAR_MAX; *pSCM = UCHAR_MAX; *pRegHomeSID = UCHAR_MAX; *pRegForeignSID = UCHAR_MAX; *pRegForeignNID = UCHAR_MAX; *pForceRev0 = UCHAR_MAX; *pCustomSCP = UCHAR_MAX; *pProtocol = ULONG_MAX; *pBroadcast = ULONG_MAX; *pApplication = ULONG_MAX; *pRoaming = UCHAR_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_NET_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pSCI = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pSCM = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 19 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 3) { *pRegHomeSID = pf[0].mValue.mU8; *pRegForeignSID = pf[0].mValue.mU8; *pRegForeignNID = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 20 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pForceRev0 = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_NAS_RSP, msgID, 21 ); sDB2NavInput ni = FindTLV( tlvs, tlvKey ); if (ni.mPayloadLen >= (ULONG)sizeof( sEVDOCustomSCPConfig )) { const sEVDOCustomSCPConfig * pData = 0; pData = (const sEVDOCustomSCPConfig *)ni.mpPayload; *pCustomSCP = pData->mbActive; *pProtocol = pData->mProtocolMask; *pBroadcast = pData->mBroadcastMask; *pApplication = pData->mApplicationMask; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 22 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pRoaming = pf[0].mValue.mU32; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetACCOLC (Public Method) DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: pACCOLC [ O ] - The ACCOLC RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetACCOLC( BYTE * pACCOLC ) { // Validate arguments if (pACCOLC == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_ACCOLC; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the ACCOLC *pACCOLC = pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetACCOLC (Public Method) DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetACCOLC( CHAR * pSPC, BYTE accolc ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_NAS_SET_ACCOLC; std::vector piv; // "%s %u" std::ostringstream tmp; tmp << spc << " " << (UINT)accolc; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 5000 ); } /*=========================================================================== METHOD: GetPLMNMode (Public Method) DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: pMode [ O ] - PLMN mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPLMNMode( ULONG * pMode ) { // Validate arguments if (pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_PLMN_MODE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the PLMN mode *pMode = (ULONG)pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetPLMNName (Public Method) DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ) { // Validate arguments if ( (pNamesSize == 0) || (*pNamesSize == 0) || (pNames == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pNamesSize; *pNamesSize = 0; WORD msgID = (WORD)eQMI_NAS_GET_PLMN_NAME; std::vector piv; // "%hu %hu" std::ostringstream tmp; tmp << mcc << " " << mnc; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); sProtocolBuffer rsp = Send( eQMI_SVC_NAS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 16 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 16 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG needSz = (ULONG)pHdr->mLength; if (needSz == 0) { return eGOBI_ERR_INVALID_RSP; } *pNamesSize = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; memcpy( (LPVOID)pNames, (LPCVOID)pData, (SIZE_T)needSz ); return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreOMA.cpp000077500000000000000000000363661455567757300237140ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreOMA.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (OMA-DM Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: OMADMStartSession (Public Method) DESCRIPTION: This function starts an OMA-DM session PARAMETERS: sessionType [ I ] - Type of session to initiate RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMStartSession( ULONG sessionType ) { WORD msgID = (WORD)eQMI_OMA_START_SESSION; std::vector piv; std::ostringstream tmp; tmp << sessionType; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } /*=========================================================================== METHOD: OMADMCancelSession (Public Method) DESCRIPTION: This function cancels an ongoing OMA-DM session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMCancelSession() { // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_CANCEL_SESSION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMGetSessionInfo (Public Method) DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { // Validate arguments if ( (pSessionState == 0) || (pSessionType == 0) || (pFailureReason == 0) || (pRetryCount == 0) || (pSessionPause == 0) || (pTimeRemaining == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pSessionState = ULONG_MAX; *pSessionType = ULONG_MAX; *pFailureReason = ULONG_MAX; *pRetryCount = UCHAR_MAX; *pSessionPause = USHRT_MAX; *pTimeRemaining = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_GET_SESSION_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // How many parameters did we populate? ULONG params = 0; // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pSessionState = pf[0].mValue.mU32; *pSessionType = pf[1].mValue.mU32; params += 2; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pFailureReason = pf[0].mValue.mU32; params++; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 3) { *pRetryCount = pf[0].mValue.mU8; *pSessionPause = pf[1].mValue.mU16; *pTimeRemaining = pf[2].mValue.mU16; params += 3; } if (params == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMGetPendingNIA (Public Method) DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ) { // Validate arguments if (pSessionType == 0 || pSessionID == 0) { return eGOBI_ERR_INVALID_ARG; } *pSessionType = ULONG_MAX; *pSessionID = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_GET_SESSION_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // How many parameters did we populate? ULONG params = 0; // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_RSP, msgID, 19 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pSessionType = pf[0].mValue.mU32; *pSessionID = pf[1].mValue.mU16; params += 2; } if (params == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMSendSelection (Public Method) DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMSendSelection( ULONG selection, USHORT sessionID ) { WORD msgID = (WORD)eQMI_OMA_SEND_SELECTION; std::vector piv; std::ostringstream tmp; tmp << selection << " " << sessionID; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } /*=========================================================================== METHOD: OMADMGetFeatureSettings (Public Method) DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { // Validate arguments if (pbProvisioning == 0 || pbPRLUpdate == 0) { return eGOBI_ERR_INVALID_ARG; } *pbProvisioning = ULONG_MAX; *pbPRLUpdate = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_GET_FEATURES; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // How many parameters did we populate? ULONG params = 0; // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pbProvisioning = pf[0].mValue.mU32; params++; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pbPRLUpdate = pf[0].mValue.mU32; params++; } if (params == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMSetProvisioningFeature (Public Method) DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMSetProvisioningFeature( ULONG bProvisioning ) { WORD msgID = (WORD)eQMI_OMA_SET_FEATURES; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bProvisioning != 0); sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } /*=========================================================================== METHOD: OMADMSetPRLUpdateFeature (Public Method) DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ) { WORD msgID = (WORD)eQMI_OMA_SET_FEATURES; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bPRLUpdate != 0); sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICorePDS.cpp000077500000000000000000001072461455567757300237220ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICorePDS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (PDS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetPDSState (Public Method) DESCRIPTION: This function returns the current PDS state PARAMETERS: pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPDSState( ULONG * pEnabled, ULONG * pTracking ) { // Validate arguments if (pEnabled == 0 || pTracking == 0) { return eGOBI_ERR_INVALID_ARG; } *pEnabled = ULONG_MAX; *pTracking = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_STATE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 2) { return eGOBI_ERR_INVALID_RSP; } *pEnabled = pf[0].mValue.mU32; *pTracking = pf[1].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPDSState (Public Method) DESCRIPTION: This function sets the PDS state PARAMETERS: enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPDSState( ULONG enable ) { WORD msgID = (WORD)eQMI_PDS_SET_STATE; std::vector piv; LPCSTR pVal = enable != 0 ? "1" : "0"; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, pVal ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest, 5000 ); } /*=========================================================================== METHOD: PDSInjectTimeReference (Public Method) DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ) { WORD msgID = (WORD)eQMI_PDS_INJECT_TIME; std::vector piv; std::ostringstream tmp; tmp << systemTime << " " << systemDiscontinuities; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetPDSDefaults (Public Method) DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { // Validate arguments if (pOperation == 0 || pTimeout == 0 || pInterval == 0 || pAccuracy == 0) { return eGOBI_ERR_INVALID_ARG; } *pOperation = ULONG_MAX; *pTimeout = UCHAR_MAX; *pInterval = ULONG_MAX; *pAccuracy = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_DEFAULTS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 4) { return eGOBI_ERR_INVALID_RSP; } // Original QMI doc claimed milliseconds, turned out to be seconds ULONG apiInterval = pf[2].mValue.mU32 * 1000; *pOperation = pf[0].mValue.mU32; *pTimeout = pf[1].mValue.mU8; *pInterval = apiInterval; *pAccuracy = pf[3].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPDSDefaults (Public Method) DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { WORD msgID = (WORD)eQMI_PDS_SET_DEFAULTS; std::vector piv; // Original QMI doc claimed milliseconds, turned out to be seconds ULONG qmiInterval = interval / 1000; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)operation << " " << (UINT)timeout << " " << (UINT)qmiInterval << " " << (UINT)accuracy; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRAAutomaticDownload (Public Method) DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ) { // Validate arguments if (pbEnabled == 0 || pInterval == 0) { return eGOBI_ERR_INVALID_ARG; } *pbEnabled = ULONG_MAX; *pInterval = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_XTRA_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 2) { return eGOBI_ERR_INVALID_RSP; } *pbEnabled = pf[0].mValue.mU32; *pInterval = pf[1].mValue.mU16; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRAAutomaticDownload (Public Method) DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ) { WORD msgID = (WORD)eQMI_PDS_SET_XTRA_PARAMS; std::vector piv; // "%u %hu" std::ostringstream tmp; tmp << (UINT)bEnabled << " " << (USHORT)interval; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRANetwork (Public Method) DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRANetwork( ULONG * pPreference ) { // Validate arguments if (pPreference == 0) { return eGOBI_ERR_INVALID_ARG; } *pPreference = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_XTRA_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 18 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pPreference = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRANetwork (Public Method) DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: preference [ I ] - XTRA WWAN network preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRANetwork( ULONG preference ) { WORD msgID = (WORD)eQMI_PDS_SET_XTRA_PARAMS; std::vector piv; std::ostringstream tmp; tmp << (UINT)preference; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 18 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRAValidity (Public Method) DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { // Validate arguments if (pGPSWeek == 0 || pGPSWeekOffset == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } *pGPSWeek = USHRT_MAX; *pGPSWeekOffset = USHRT_MAX; *pDuration = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_XTRA_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 19 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pGPSWeek = pf[0].mValue.mU16; *pGPSWeekOffset = pf[1].mValue.mU16; *pDuration = pf[2].mValue.mU16; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ForceXTRADownload (Public Method) DESCRIPTION: This function forces the XTRA database to be downloaded to the device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ForceXTRADownload() { // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_FORCE_XTRA_DL; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetXTRADataState (Public Method) DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: pState [ O ] - XTRA data positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRADataState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } *pState = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_METHODS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRADataState (Public Method) DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: state [ I ] - XTRA data positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRADataState( ULONG state ) { WORD msgID = (WORD)eQMI_PDS_SET_METHODS; std::vector piv; std::ostringstream tmp; tmp << state; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRATimeState (Public Method) DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: pState [ O ] - XTRA time positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRATimeState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } *pState = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_METHODS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRATimeState (Public Method) DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: state [ I ] - XTRA time positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRATimeState( ULONG state ) { WORD msgID = (WORD)eQMI_PDS_SET_METHODS; std::vector piv; std::ostringstream tmp; tmp << state; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetAGPSConfig (Public Method) DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ) { // Validate arguments if (pServerAddress == 0 || pServerPort == 0) { return eGOBI_ERR_INVALID_ARG; } *pServerAddress = ULONG_MAX; *pServerPort = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_AGPS_CONFIG; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 5) { return eGOBI_ERR_INVALID_RSP; } ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pServerAddress = (ip4 | ip3 | ip2 | ip1); *pServerPort = pf[4].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetAGPSConfig (Public Method) DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetAGPSConfig( ULONG serverAddress, ULONG serverPort ) { WORD msgID = (WORD)eQMI_PDS_SET_AGPS_CONFIG; std::vector piv; ULONG ip4 = (serverAddress & 0x000000FF); ULONG ip3 = (serverAddress & 0x0000FF00) >> 8; ULONG ip2 = (serverAddress & 0x00FF0000) >> 16; ULONG ip1 = (serverAddress & 0xFF000000) >> 24; // "%u %u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1 << " " << (UINT)serverPort; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetServiceAutomaticTracking (Public Method) DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetServiceAutomaticTracking( ULONG * pbAuto ) { // Validate arguments if (pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_SVC_AUTOTRACK; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pbAuto = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetServiceAutomaticTracking (Public Method) DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetServiceAutomaticTracking( ULONG bAuto ) { WORD msgID = (WORD)eQMI_PDS_SET_SVC_AUTOTRACK; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bAuto != 0); sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetPortAutomaticTracking (Public Method) DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPortAutomaticTracking( ULONG * pbAuto ) { // Validate arguments if (pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_COM_AUTOTRACK; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pbAuto = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPortAutomaticTracking (Public Method) DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPortAutomaticTracking( ULONG bAuto ) { WORD msgID = (WORD)eQMI_PDS_SET_COM_AUTOTRACK; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bAuto != 0); sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: ResetPDSData (Public Method) DESCRIPTION: This function resets the specified PDS data PARAMETERS: pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ) { // Validate arguments (one must be present) if (pGPSDataMask == 0 && pCellDataMask == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_PDS_RESET_DATA; std::vector piv; if (pGPSDataMask != 0) { ULONG mask = *pGPSDataMask; // Note that we are being lazy here by specifying more arguments // than the DB description defines; that will not cause a problem // and we don't want to have to update this code should more bits // be defined std::ostringstream tmp; for (ULONG b = 0; b < 32; b++) { ULONG bit = mask & 0x00000001; mask = mask >> 1; tmp << bit << " "; } sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pCellDataMask != 0) { ULONG mask = *pCellDataMask; std::ostringstream tmp; for (ULONG b = 0; b < 32; b++) { ULONG bit = mask & 0x00000001; mask = mask >> 1; tmp << bit << " "; } sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreRMS.cpp000077500000000000000000000134701455567757300237300ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreRMS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (RMS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ) { // Validate arguments if (pbEnabled == 0 || pWakeMask == 0) { return eGOBI_ERR_INVALID_ARG; } *pbEnabled = ULONG_MAX; *pWakeMask = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_RMS_GET_SMS_WAKE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_RMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLVs ID 16/17 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr->mLength < (WORD)1) { return eGOBI_ERR_MALFORMED_RSP; } const BYTE * pData = (const BYTE *)++pHdr; *pbEnabled = (ULONG)*pData; } pIter = tlvs.find( 17 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr->mLength < (WORD)4) { return eGOBI_ERR_MALFORMED_RSP; } const ULONG * pData = (const ULONG *)++pHdr; *pWakeMask = *pData; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetSMSWake( ULONG bEnable, ULONG wakeMask ) { WORD msgID = (WORD)eQMI_RMS_SET_SMS_WAKE; std::vector piv; BYTE enableTmp = (BYTE)(bEnable == 0 ? 0 : 1 ); sProtocolEntityKey pek1( eDB2_ET_QMI_RMS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, &enableTmp, 1 ); piv.push_back( pi1 ); if (bEnable != 0) { sProtocolEntityKey pek2( eDB2_ET_QMI_RMS_REQ, msgID, 17 ); sDB2PackingInput pi2( pek2, (const BYTE *)&wakeMask, 4 ); piv.push_back( pi2 ); } const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_RMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreSMS.cpp000077500000000000000000000653341455567757300237370ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreSMS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (SMS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: DeleteSMS (Public Method) DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { WORD msgID = (WORD)eQMI_WMS_DELETE; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (pMessageIndex != 0) { std::ostringstream tmp2; tmp2 << (UINT)*pMessageIndex; sProtocolEntityKey pek1( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi1 ); } if (pMessageTag != 0) { std::ostringstream tmp2; tmp2 << (UINT)*pMessageTag; sProtocolEntityKey pek1( eDB2_ET_QMI_WMS_REQ, msgID, 17 ); sDB2PackingInput pi1( pek1, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi1 ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 10000 ); } /*=========================================================================== METHOD: GetSMSList (Public Method) DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ) { // Validate arguments if (pMessageListSize == 0 || *pMessageListSize == 0 || pMessageList == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageListSz = *pMessageListSize; // Assume failure *pMessageListSize = 0; WORD msgID = (WORD)eQMI_WMS_GET_MSG_LIST; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (pRequestedTag != 0) { std::ostringstream tmp2; tmp2 << (UINT)*pRequestedTag; sProtocolEntityKey pek1( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi1 ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG messageListSz = pf[0].mValue.mU32; if (messageListSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (pf.size() < (1 + (messageListSz * 2)) ) { return eGOBI_ERR_INVALID_RSP; } if (maxMessageListSz < messageListSz) { messageListSz = maxMessageListSz; } ULONG m = 0; ULONG mf = 1; ULONG * pData = (ULONG *)pMessageList; for (m = 0; m < messageListSz; m++) { *pData++ = pf[mf++].mValue.mU32; *pData++ = pf[mf++].mValue.mU32; } *pMessageListSize = messageListSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSMS (Public Method) DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ I ] - The message contents array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { // Validate arguments if ( (pMessageTag == 0) || (pMessageFormat == 0) || (pMessageSize == 0) || (*pMessageSize == 0) || (pMessage == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageSz = *pMessageSize; // Assume failure *pMessageSize = 0; WORD msgID = (WORD)eQMI_WMS_RAW_READ; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType << " " << (UINT)messageIndex; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pMessageTag = pf[0].mValue.mU32; *pMessageFormat = pf[1].mValue.mU32; ULONG messageSz = (ULONG)pf[2].mValue.mU16; if (messageSz == 0) { // There has to be message data return eGOBI_ERR_INVALID_RSP; } if (pf.size() < 3 + messageSz) { return eGOBI_ERR_INVALID_RSP; } if (maxMessageSz < messageSz) { // We have to be able to copy the whole message return eGOBI_ERR_BUFFER_SZ; } // Copy message data for (ULONG b = 0; b < messageSz; b++) { pMessage[b] = pf[3 + b].mValue.mU8; } *pMessageSize = messageSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ModifySMSStatus (Public Method) DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ) { WORD msgID = (WORD)eQMI_WMS_MODIFY_TAG; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType << " " << (UINT)messageIndex << " " << (UINT)messageTag; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 5000 ); } /*=========================================================================== METHOD: SaveSMS (Public Method) DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ) { // Validate arguments if (messageSize == 0 || pMessage == 0 || pMessageIndex == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WMS_RAW_WRITE; std::vector piv; // "%u %u %u" std::ostringstream tmp; tmp << (UINT)storageType << " " << (UINT)messageFormat << " " << (UINT)messageSize; for (ULONG b = 0; b < messageSize; b++) { tmp << " " << (UINT)pMessage[b]; } sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 10000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pMessageIndex = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SendSMS (Public Method) DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ) { // Validate arguments if (messageSize == 0 || pMessage == 0 || pMessageFailureCode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume we have no message failure cause code *pMessageFailureCode = ULONG_MAX; WORD msgID = (WORD)eQMI_WMS_RAW_SEND; std::vector piv; std::ostringstream tmp; tmp << (UINT)messageFormat << " " << (UINT)messageSize; for (ULONG b = 0; b < messageSize; b++) { tmp << " " << (UINT)pMessage[b]; } sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 300000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pMessageFailureCode = (ULONG)pf[0].mValue.mU16; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSMSCAddress (Public Method) DESCRIPTION: Return the SMS center address PARAMETERS: addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { // Validate arguments if (addressSize == 0 || pSMSCAddress == 0 || typeSize == 0 || pSMSCType == 0) { return eGOBI_ERR_INVALID_ARG; } pSMSCAddress[0] = 0; pSMSCType[0] = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WMS_GET_SMSC_ADDR; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (typeSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pSMSCType, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pSMSCType[strLen] = 0; } strLen = pf[2].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (addressSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pSMSCAddress, (LPCSTR)pf[2].mValueString.c_str(), strLen ); pSMSCAddress[strLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSMSCAddress (Public Method) DESCRIPTION: Set the SMS center address PARAMETERS: pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string (maximum of 21 characters, including NULL) pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ) { // Validate arguments if (pSMSCAddress == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WMS_SET_SMSC_ADDR; std::vector piv; std::ostringstream addr; if (pSMSCAddress[0] != 0) { addr << "\"" << pSMSCAddress << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)addr.str().c_str() ); piv.push_back( pi ); if (pSMSCType != 0) { std::ostringstream addrType; if (pSMSCType[0] != 0) { addrType << "\"" << pSMSCType << "\""; } pek = sProtocolEntityKey( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)addrType.str().c_str() ); piv.push_back( pi ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 5000 ); } /*=========================================================================== METHOD: GetSMSRoutes (Public Method) DESCRIPTION: Get the current incoming SMS routing information PARAMETERS: pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxRoutes = *pRouteSize; *pRouteSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WMS_GET_ROUTES; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WMS, msgID, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG fi = 0; ULONG routeCount = (ULONG)pf[fi++].mValue.mU16; if ((ULONG)pf.size() < 1 + 4 * routeCount) { return eGOBI_ERR_INVALID_RSP; } if (routeCount > (ULONG)maxRoutes) { routeCount = (ULONG)maxRoutes; } ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { // Message type *pRouteArray++ = pf[fi++].mValue.mU32; // Message class *pRouteArray++ = pf[fi++].mValue.mU32; // Storage type *pRouteArray++ = pf[fi++].mValue.mU32; // Receipt action *pRouteArray++ = pf[fi++].mValue.mU32; } *pRouteSize = (BYTE)routeCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSMSRoutes (Public Method) DESCRIPTION: Set the desired incoming SMS routing information PARAMETERS: pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Format up the request ULONG routeCount = (ULONG)*pRouteSize; // %u std::ostringstream tmp; tmp << routeCount; ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { // Message type, class, storage type, receipt action for (ULONG f = 0; f < 4; f++) { // tmp += " %u" tmp << " " << *pRouteArray++; } } WORD msgID = (WORD)eQMI_WMS_SET_ROUTES; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 5000 ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreUIM.cpp000077500000000000000000000715671455567757300237340ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreUIM.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (UIM Access) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: UIMSetPINProtection (Public Method) DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_SET_PIN_PROT; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); if (bEnable != 0) { bEnable = 1; } // "%u %u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)bEnable << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMVerifyPIN (Public Method) DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_PIN_VERIFY; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); // "%u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMUnblockPIN (Public Method) DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pPUKValue == 0) || (pPUKValue[0] == 0) || (pNewValue == 0) || (pNewValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_PIN_UNBLOCK; std::vector piv; std::string val1( pPUKValue ); ULONG val1Sz = val1.size(); std::string val2( pNewValue ); ULONG val2Sz = val2.size(); // "%u %u \"%s\" %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)val1Sz << " \"" << val1 << "\" " << (UINT)val2Sz << " \"" << val2 << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMChangePIN (Public Method) DESCRIPTION: This function change the PIN value PARAMETERS: id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pOldValue == 0) || (pOldValue[0] == 0) || (pNewValue == 0) || (pNewValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_PIN_CHANGE; std::vector piv; std::string val1( pOldValue ); ULONG val1Sz = val1.size(); std::string val2( pNewValue ); ULONG val2Sz = val2.size(); // "%u %u \"%s\" %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)val1Sz << " \"" << val1 << "\" " << (UINT)val2Sz << " \"" << val2 << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMGetPINStatus (Public Method) DESCRIPTION: This function returns the status of the pin PARAMETERS: id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } *pStatus = ULONG_MAX; *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_UIM_GET_PIN_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); ULONG tlvID = 16 + id; // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, tlvID ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pStatus = pf[0].mValue.mU32; *pVerifyRetriesLeft = (ULONG)pf[1].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[2].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMGetICCID (Public Method) DESCRIPTION: This function returns the UIM ICCID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMGetICCID( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_UIM_GET_ICCID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (IMSI) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpICCID = pf[0].mValueString; ULONG lenICCID = (ULONG)tmpICCID.size(); // Space to perform the copy? if (stringSize < lenICCID + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)tmpICCID.c_str(), lenICCID + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMGetControlKeyBlockingStatus (Public Method) DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { // Validate arguments if ( (pStatus == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pStatus = ULONG_MAX; *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; if (pbBlocking != 0) { *pbBlocking = 0; } WORD msgID = (WORD)eQMI_DMS_UIM_GET_CK_STATUS; std::vector piv; std::ostringstream tmp; tmp << (UINT)id; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the required TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pStatus = pf[0].mValue.mU32; *pVerifyRetriesLeft = (ULONG)pf[1].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[2].mValue.mU8; if (pbBlocking != 0) { tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() > 0) { *pbBlocking = 1; } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMSetControlKeyProtection (Public Method) DESCRIPTION: This function changes the specified facility control key PARAMETERS: id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pVerifyRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_SET_CK_PROT; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); //"%u %u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)status << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMUnblockControlKey (Public Method) DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_UNBLOCK_CK; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); // "%u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pUnblockRetriesLeft = (ULONG)pf[0].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMICoreWDS.cpp000077500000000000000000002370631455567757300237320ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreWDS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (WDS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetSessionState (Public Method) DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSessionState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_PKT_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSessionDuration (Public Method) DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: pDuration [ O ] - Duration of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSessionDuration( ULONGLONG * pDuration ) { // Validate arguments if (pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DURATION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pDuration = pf[0].mValue.mU64; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSessionDurations (Public Method) DESCRIPTION: This function returns the the active/total durations of the current packet data session PARAMETERS: pActiveDuration [ O ] - Active duration of the current packet session pTotalDuration [ O ] - Total duration of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSessionDurations( ULONGLONG * pActiveDuration, ULONGLONG * pTotalDuration ) { // Validate arguments if (pActiveDuration == 0 || pTotalDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DURATION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the total duration *pTotalDuration = pf[0].mValue.mU64; // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the active duration *pActiveDuration = pf[0].mValue.mU64; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetDormancyState (Public Method) DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: pState [ O ] - Dormancy state of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDormancyState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DORMANCY; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetEnhancedAutoconnect (Public Method) DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ) { // Validate arguments if (pSetting == 0 || pRoamSetting == 0) { return eGOBI_ERR_INVALID_ARG; } *pSetting = ULONG_MAX; *pRoamSetting = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_AUTOCONNECT; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pSetting = (ULONG)pf[0].mValue.mU32; // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() > 0) { *pRoamSetting = (ULONG)pf[0].mValue.mU32; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetEnhancedAutoconnect (Public Method) DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ) { WORD msgID = (WORD)eQMI_WDS_SET_AUTOCONNECT; std::vector piv; // "%u" std::ostringstream tmp; tmp << setting; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); if (pRoamSetting != 0) { std::ostringstream tmp2; tmp2 << *pRoamSetting; sProtocolEntityKey pek1( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, tmp2.str().c_str() ); piv.push_back( pi1 ); } ULONG to = 5000; if (setting == 1) { // Connections can take a long time to = 300000; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest, to ); } /*=========================================================================== METHOD: SetDefaultProfile (Public Method) DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { WORD msgID = (WORD)eQMI_WDS_MODIFY_PROFILE; std::vector piv; // "%u 1" std::ostringstream tmp; tmp << (UINT)profileType << " 1"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (pName != 0) { std::ostringstream tmp2; if (pName[0] != 0) { tmp2 << "\"" << pName << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pPDPType != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)*pPDPType; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pAPNName != 0) { std::ostringstream tmp2; if (pAPNName[0] != 0) { tmp2 << "\"" << pAPNName << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pPrimaryDNS != 0) { ULONG ip4 = (*pPrimaryDNS & 0x000000FF); ULONG ip3 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pSecondaryDNS != 0) { ULONG ip4 = (*pSecondaryDNS & 0x000000FF); ULONG ip3 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pUsername != 0) { std::ostringstream tmp2; if (pUsername[0] != 0) { tmp2 << "\"" << pUsername << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 27 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pPassword != 0) { std::ostringstream tmp2; if (pPassword[0] != 0) { tmp2 << "\"" << pPassword << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 28 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pAuthentication != 0) { ULONG pap = *pAuthentication & 0x00000001; ULONG chap = *pAuthentication & 0x00000002; // "%u %u" std::ostringstream tmp2; tmp2 << (UINT)pap << " " << (UINT)chap; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 29 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pIPAddress != 0) { ULONG ip4 = (*pIPAddress & 0x000000FF); ULONG ip3 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip1 = (*pIPAddress & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 30 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // We need to be doing something here (beyond profile type) if (piv.size() <= 1) { return eGOBI_ERR_INVALID_ARG; } // Pack up and send the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetDefaultProfile (Public Method) DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being read pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { // Validate arguments if ( (pPDPType == 0) || (pIPAddress == 0) || (pPrimaryDNS == 0) || (pSecondaryDNS == 0) || (pAuthentication == 0) || (nameSize == 0) || (pName == 0) || (apnSize == 0) || (pAPNName == 0) || (userSize == 0) || (pUsername == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pPDPType = ULONG_MAX; *pIPAddress = ULONG_MAX; *pPrimaryDNS = ULONG_MAX; *pSecondaryDNS = ULONG_MAX; *pAuthentication = ULONG_MAX; pName[0] = 0; pAPNName[0] = 0; pUsername[0] = 0; WORD msgID = (WORD)eQMI_WDS_GET_DEFAULTS; std::vector piv; // "%u 0" std::ostringstream tmp; tmp << (UINT)profileType << " 0"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (nameSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pName, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pName[strLen] = 0; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pPDPType = pf[0].mValue.mU32; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (apnSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pAPNName, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pAPNName[strLen] = 0; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pPrimaryDNS = (ip4 | ip3 | ip2 | ip1); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 22 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pSecondaryDNS = (ip4 | ip3 | ip2 | ip1); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 27 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (userSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pUsername, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pUsername[strLen] = 0; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 29 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { ULONG pap = (ULONG)pf[0].mValue.mU8; ULONG chap = (ULONG)pf[1].mValue.mU8 << 1; *pAuthentication = (pap | chap); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 30 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pIPAddress = (ip4 | ip3 | ip2 | ip1); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: StartDataSession (Public Method) DESCRIPTION: This function activates a packet data session PARAMETERS: pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ) { *pFailureReason = (ULONG)eQMI_CALL_END_REASON_UNSPECIFIED; // Validate arguments if (pSessionId == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_START_NET; std::vector piv; if (pTechnology != 0) { ULONG umts = *pTechnology & 0x00000001; ULONG cdma = *pTechnology & 0x00000002; // "%u %u" std::ostringstream tmp; tmp << (UINT)umts << " " << (UINT)cdma; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 48 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pPrimaryDNS != 0) { ULONG ip4 = (*pPrimaryDNS & 0x000000FF); ULONG ip3 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pSecondaryDNS != 0) { ULONG ip4 = (*pSecondaryDNS & 0x000000FF); ULONG ip3 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pPrimaryNBNS != 0) { ULONG ip4 = (*pPrimaryNBNS & 0x000000FF); ULONG ip3 = (*pPrimaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryNBNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryNBNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pSecondaryNBNS != 0) { ULONG ip4 = (*pSecondaryNBNS & 0x000000FF); ULONG ip3 = (*pSecondaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryNBNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryNBNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pAPNName != 0) { std::ostringstream tmp; if (pAPNName[0] != 0) { tmp << "\"" << pAPNName << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pIPAddress != 0) { ULONG ip4 = (*pIPAddress & 0x000000FF); ULONG ip3 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip1 = (*pIPAddress & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pAuthentication != 0) { ULONG pap = *pAuthentication & 0x00000001; ULONG chap = *pAuthentication & 0x00000002; // "%u %u" std::ostringstream tmp; tmp << (UINT)pap << " " << (UINT)chap; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pUsername != 0) { std::ostringstream tmp; if (pUsername[0] != 0) { tmp << "\"" << pUsername << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 23 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pPassword != 0) { std::ostringstream tmp; if (pPassword[0] != 0) { tmp << "\"" << pPassword << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 24 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } sProtocolBuffer rsp; if (piv.size() > 0) { // Pack up and send the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } else { rsp = Send( eQMI_SVC_WDS, pRequest, 300000 ); } } else { // Generate and send the QMI request rsp = SendSimple( eQMI_SVC_WDS, msgID, 300000 ); } if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pFailureReason = pf[0].mValue.mU32; } return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the session ID *pSessionId = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Cancel an in-progress packet data session activation RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CancelDataSession() { if (mLastNetStartID == (WORD)INVALID_QMI_TRANSACTION_ID) { return eGOBI_ERR_NO_CANCELABLE_OP; } WORD msgID = (WORD)eQMI_WDS_ABORT; std::vector piv; // %hu std::ostringstream tmp; tmp << mLastNetStartID; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return mLastNetStartID = (WORD)INVALID_QMI_TRANSACTION_ID; return SendAndCheckReturn( eQMI_SVC_WDS, pRequest, 60000 ); } /*=========================================================================== METHOD: StopDataSession (Public Method) DESCRIPTION: This function stops the current data session PARAMETERS: sessionId [ I ] - The ID of the session to terminate RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::StopDataSession( ULONG sessionId ) { WORD msgID = (WORD)eQMI_WDS_STOP_NET; std::vector piv; // "%u" std::ostringstream tmp; tmp << (UINT)sessionId; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest, 60000 ); } /*=========================================================================== METHOD: GetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pIPAddress [ I ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetIPAddress( ULONG * pIPAddress ) { // Validate arguments if (pIPAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pIPAddress = ULONG_MAX; WORD msgID = (WORD)eQMI_WDS_GET_SETTINGS; std::vector piv; std::string tmp = "0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLVs we want (IP address) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 30 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 4) { return eGOBI_ERR_INVALID_RSP; } ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pIPAddress = (ip4 | ip3 | ip2 | ip1); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetConnectionRate (Public Method) DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { // Validate arguments if ( (pCurrentChannelTXRate == 0) || (pCurrentChannelRXRate == 0) || (pMaxChannelTXRate == 0) || (pMaxChannelRXRate == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_RATES; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 4) { return eGOBI_ERR_INVALID_RSP; } // Populate the rates *pCurrentChannelTXRate = pf[0].mValue.mU32; *pCurrentChannelRXRate = pf[1].mValue.mU32; *pMaxChannelTXRate = pf[2].mValue.mU32; *pMaxChannelRXRate = pf[3].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetPacketStatus (Public Method) DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { // Validate arguments if ( (pTXPacketSuccesses == 0) || (pRXPacketSuccesses == 0) || (pTXPacketErrors == 0) || (pRXPacketErrors == 0) || (pTXPacketOverflows == 0) || (pRXPacketOverflows == 0) ) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_GET_STATISTICS; std::vector piv; std::string tmp = "1 1 1 1 1 1 0 0"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey2( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey3( eDB2_ET_QMI_WDS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey4( eDB2_ET_QMI_WDS_RSP, msgID, 19 ); cDataParser::tParsedFields pf4 = ParseTLV( db, rsp, tlvs, tlvKey4 ); if (pf4.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey5( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); cDataParser::tParsedFields pf5 = ParseTLV( db, rsp, tlvs, tlvKey5 ); if (pf5.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey6( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); cDataParser::tParsedFields pf6 = ParseTLV( db, rsp, tlvs, tlvKey5 ); if (pf6.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the statistics *pTXPacketSuccesses = pf1[0].mValue.mU32; *pRXPacketSuccesses = pf2[0].mValue.mU32; *pTXPacketErrors = pf3[0].mValue.mU32; *pRXPacketErrors = pf4[0].mValue.mU32; *pTXPacketOverflows = pf5[0].mValue.mU32; *pRXPacketOverflows = pf6[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetByteTotals (Public Method) DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { // Validate arguments if (pTXTotalBytes == 0 || pRXTotalBytes == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_GET_STATISTICS; std::vector piv; std::string tmp = "0 0 0 0 0 0 1 1"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey1( eDB2_ET_QMI_WDS_RSP, msgID, 25 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey2( eDB2_ET_QMI_WDS_RSP, msgID, 26 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the statistics *pTXTotalBytes = pf1[0].mValue.mU64; *pRXTotalBytes = pf2[0].mValue.mU64; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetMobileIP (Public Method) DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: mode [ I ] - Desired mobile IP setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetMobileIP( ULONG mode ) { WORD msgID = (WORD)eQMI_WDS_SET_MIP; std::vector piv; // "%u" std::ostringstream tmp; tmp << (UINT)mode; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetMobileIP (Public Method) DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: pMode [ I ] - Desired mobile IP setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetMobileIP( ULONG * pMode ) { // Validate arguments if (pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_MIP; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the mode *pMode = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetActiveMobileIPProfile (Public Method) DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_ACTIVE_MIP; std::vector piv; // "%s %u" std::ostringstream tmp; tmp << spc << " " << (UINT)index; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetActiveMobileIPProfile (Public Method) DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: pIndex [ O ] - Active mobile IP profile index RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetActiveMobileIPProfile( BYTE * pIndex ) { // Validate arguments if (pIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_ACTIVE_MIP; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the index *pIndex = pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetMobileIPProfile (Public Method) DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address pRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_MIP_PROFILE; std::vector piv; // "%s %u" std::ostringstream tmp; tmp << spc << " " << (UINT)index; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Enabled flag provided? if (pEnabled != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)(*pEnabled == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Home address provided? if (pAddress != 0) { ULONG ip4 = (*pAddress & 0x000000FF); ULONG ip3 = (*pAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pAddress & 0x00FF0000) >> 16; ULONG ip1 = (*pAddress & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Primary HA address provided? if (pPrimaryHA != 0) { ULONG ip4 = (*pPrimaryHA & 0x000000FF); ULONG ip3 = (*pPrimaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryHA & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryHA & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Secondary HA address provided? if (pSecondaryHA != 0) { ULONG ip4 = (*pSecondaryHA & 0x000000FF); ULONG ip3 = (*pSecondaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryHA & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryHA & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Reverse tunneling flag provided? if (pRevTunneling != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)(*pRevTunneling == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // NAI provided? if (pNAI != 0) { std::ostringstream tmp2; if (pNAI[0] != 0) { tmp2 << "\"" << pNAI << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // HA SPI provided? if (pHASPI != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)*pHASPI; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // AAA SPI provided? if (pAAASPI != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)*pAAASPI; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 23 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // MN-HA key provided? if (pMNHA != 0) { std::ostringstream tmp2; if (pMNHA[0] != 0) { tmp2 << "\"" << pMNHA << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 24 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // MN-AAA key provided? if (pMNAAA != 0) { std::ostringstream tmp2; if (pMNAAA[0] != 0) { tmp2 << "\"" << pMNAAA << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 25 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // We require at least one of the optional arguments if (piv.size() <= 1) { // Much ado about nothing return eGOBI_ERR_INVALID_ARG; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetMobileIPProfile (Public Method) DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: index [ I ] - Mobile IP profile ID pEnabled [ O ] - MIP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { // Validate arguments if ( (pEnabled == 0) || (pAddress == 0) || (pPrimaryHA == 0) || (pSecondaryHA == 0) || (pRevTunneling == 0) || (naiSize == 0) || (pNAI == 0) || (pHASPI == 0) || (pAAASPI == 0) || (pHAState == 0) || (pAAAState == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume errors *pEnabled = UCHAR_MAX; *pAddress = ULONG_MAX; *pPrimaryHA = ULONG_MAX; *pSecondaryHA = ULONG_MAX; *pRevTunneling = UCHAR_MAX; *pHASPI = ULONG_MAX; *pAAASPI = ULONG_MAX; *pHAState = ULONG_MAX; *pAAAState = ULONG_MAX; WORD msgID = (WORD)eQMI_WDS_GET_MIP_PROFILE; std::vector piv; // "%u" std::ostringstream arg; arg << (UINT)index; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)arg.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey1( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() >= 1) { *pEnabled = pf1[0].mValue.mU8; } sProtocolEntityKey tlvKey2( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 4) { ULONG ip4 = (ULONG)pf2[0].mValue.mU8; ULONG ip3 = (ULONG)pf2[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf2[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf2[3].mValue.mU8 << 24; *pAddress = (ip4 | ip3 | ip2 | ip1); } sProtocolEntityKey tlvKey3( eDB2_ET_QMI_WDS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() >= 4) { ULONG ip4 = (ULONG)pf3[0].mValue.mU8; ULONG ip3 = (ULONG)pf3[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf3[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf3[3].mValue.mU8 << 24; *pPrimaryHA = (ip4 | ip3 | ip2 | ip1); } sProtocolEntityKey tlvKey4( eDB2_ET_QMI_WDS_RSP, msgID, 19 ); cDataParser::tParsedFields pf4 = ParseTLV( db, rsp, tlvs, tlvKey4 ); if (pf4.size() >= 4) { ULONG ip4 = (ULONG)pf4[0].mValue.mU8; ULONG ip3 = (ULONG)pf4[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf4[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf4[3].mValue.mU8 << 24; *pSecondaryHA = (ip4 | ip3 | ip2 | ip1); } sProtocolEntityKey tlvKey5( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); cDataParser::tParsedFields pf5 = ParseTLV( db, rsp, tlvs, tlvKey5 ); if (pf5.size() >= 1) { *pRevTunneling = pf5[0].mValue.mU8; } sProtocolEntityKey tlvKey6( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); cDataParser::tParsedFields pf6 = ParseTLV( db, rsp, tlvs, tlvKey6 ); if (pf6.size() >= 1) { LONG strLen = pf6[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (naiSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pNAI, (LPCSTR)pf6[0].mValueString.c_str(), strLen ); pNAI[strLen] = 0; } sProtocolEntityKey tlvKey7( eDB2_ET_QMI_WDS_RSP, msgID, 22 ); cDataParser::tParsedFields pf7 = ParseTLV( db, rsp, tlvs, tlvKey7 ); if (pf7.size() >= 1) { *pHASPI = pf7[0].mValue.mU32; } sProtocolEntityKey tlvKey8( eDB2_ET_QMI_WDS_RSP, msgID, 23 ); cDataParser::tParsedFields pf8 = ParseTLV( db, rsp, tlvs, tlvKey8 ); if (pf8.size() >= 1) { *pAAASPI = pf8[0].mValue.mU32; } sProtocolEntityKey tlvKey9( eDB2_ET_QMI_WDS_RSP, msgID, 26 ); cDataParser::tParsedFields pf9 = ParseTLV( db, rsp, tlvs, tlvKey9 ); if (pf9.size() >= 1) { *pHAState = pf9[0].mValue.mU32; } sProtocolEntityKey tlvKey10( eDB2_ET_QMI_WDS_RSP, msgID, 27 ); cDataParser::tParsedFields pf10 = ParseTLV( db, rsp, tlvs, tlvKey10 ); if (pf10.size() >= 1) { *pAAAState = pf10[0].mValue.mU32; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetMobileIPParameters (Public Method) DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_MIP_PARAMS; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); // Mode provided? if (pMode != 0) { // "%u" std::ostringstream tmp; tmp << (UINT)*pMode; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Retry limit provided? if (pRetryLimit != 0) { std::ostringstream tmp; tmp << (UINT)*pRetryLimit; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Retry interval provided? if (pRetryInterval != 0) { std::ostringstream tmp; tmp << (UINT)*pRetryInterval; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Re-registration period provided? if (pReRegPeriod != 0) { std::ostringstream tmp; tmp << (UINT)*pReRegPeriod; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Re-registration on traffic flag provided? if (pReRegTraffic != 0) { std::ostringstream tmp; tmp << (UINT)(*pReRegTraffic == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // HA authenticator flag provided? if (pHAAuthenticator != 0) { std::ostringstream tmp; tmp << (UINT)(*pHAAuthenticator == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // HA RFC2002bis authentication flag provided? if (pHA2002bis != 0) { std::ostringstream tmp; tmp << (UINT)(*pHA2002bis == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // We require at least one of the optional arguments if (piv.size() <= 1) { // Much ado about nothing return eGOBI_ERR_INVALID_ARG; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetMobileIPParameters (Public Method) DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: pMode [ 0 ] - Current mobile IP setting pRetryLimit [ 0 ] - Retry attempt limit pRetryInterval [ 0 ] - Retry attempt interval pReRegPeriod [ 0 ] - Re-registration period pReRegTraffic [ 0 ] - Re-registration only with traffic? pHAAuthenticator [ 0 ] - MH-HA authenticator calculator? pHA2002bis [ 0 ] - MH-HA RFC 2002bis authentication? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if ( (pMode == 0) || (pRetryLimit == 0) || (pRetryInterval == 0) || (pReRegPeriod == 0) || (pReRegTraffic == 0) || (pHAAuthenticator == 0) || (pHA2002bis == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pMode = ULONG_MAX; *pRetryLimit = UCHAR_MAX; *pRetryInterval = UCHAR_MAX; *pReRegPeriod = UCHAR_MAX; *pReRegTraffic = UCHAR_MAX; *pHAAuthenticator = UCHAR_MAX; *pHA2002bis = UCHAR_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_MIP_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pMode = pf[0].mValue.mU32; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pRetryLimit = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pRetryInterval = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 19 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pReRegPeriod = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pReRegTraffic = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pHAAuthenticator = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 22 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pHA2002bis = pf[0].mValue.mU8; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetLastMobileIPError (Public Method) DESCRIPTION: This function gets the last mobile IP error PARAMETERS: pError [ 0 ] - Last mobile IP error RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetLastMobileIPError( ULONG * pError ) { // Validate arguments if (pError == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_LAST_MIP_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the index *pError = (ULONG)pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pPrimaryDNS == 0 && pSecondaryDNS == 0) { // At least one must be specified return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_DNS; std::vector piv; if (pPrimaryDNS != 0) { ULONG ip4 = (*pPrimaryDNS & 0x000000FF); ULONG ip3 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pSecondaryDNS != 0) { ULONG ip4 = (*pSecondaryDNS & 0x000000FF); ULONG ip3 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Pack up and send the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pPrimaryDNS == 0 || pSecondaryDNS == 0) { return eGOBI_ERR_INVALID_ARG; } *pPrimaryDNS = 0; *pSecondaryDNS = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DNS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pPrimaryDNS = (ip4 | ip3 | ip2 | ip1); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pSecondaryDNS = (ip4 | ip3 | ip2 | ip1); } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/GobiQMIVoice.cpp000077500000000000000000000144771455567757300235330ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreVoice.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (Voice Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sUSSDInfo // Struct to represent USSD/Alpha information header /*=========================================================================*/ struct sUSSDInfoHdr { public: BYTE mDCS; BYTE mLength; // Data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: OriginateUSSD (Public Method) DESCRIPTION: This function initiates a USSD operation PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OriginateUSSD( BYTE * pInfo ) { // Validate arguments if (pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const ULONG INFO_HDR_SZ = (ULONG)sizeof( sUSSDInfoHdr ); sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; ULONG infoLen = pInInfo->mLength + INFO_HDR_SZ; WORD msgID = (WORD)eQMI_VOICE_ASYNC_ORIG_USSD; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_VOICE_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (const BYTE *)pInfo, infoLen ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } return SendAndCheckReturn( eQMI_SVC_VOICE, pRequest, 300000 ); } /*=========================================================================== METHOD: AnswerUSSD (Public Method) DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::AnswerUSSD( BYTE * pInfo ) { // Validate arguments if (pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const ULONG INFO_HDR_SZ = (ULONG)sizeof( sUSSDInfoHdr ); sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; ULONG infoLen = pInInfo->mLength + INFO_HDR_SZ; WORD msgID = (WORD)eQMI_VOICE_ANSWER_USSD; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_VOICE_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (const BYTE *)pInfo, infoLen ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_VOICE, pRequest, 300000 ); } /*=========================================================================== METHOD: CancelUSSD (Public Method) DESCRIPTION: This function cancels an in-progress USSD operation RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CancelUSSD() { // Generate and send the QMI request WORD msgID = (WORD)eQMI_VOICE_CANCEL_USSD; sProtocolBuffer rsp = SendSimple( eQMI_SVC_VOICE, msgID, 30000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/Shared/Makefile.am000066400000000000000000000013611455567757300226270ustar00rootroot00000000000000noinst_LTLIBRARIES = libShared.la INCLUDES = \ -I$(top_srcdir)/Core libShared_la_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT libShared_la_SOURCES = \ GobiError.h \ GobiImageDefinitions.h \ GobiMBNMgmt.cpp \ GobiMBNMgmt.h \ GobiQDLCore.cpp \ GobiQDLCore.h \ GobiQMICoreCAT.cpp \ GobiQMICore.cpp \ GobiQMICoreDMS.cpp \ GobiQMICore.h \ GobiQMICoreImg2k.cpp \ GobiQMICoreImg.cpp \ GobiQMICoreNAS.cpp \ GobiQMICoreOMA.cpp \ GobiQMICorePDS.cpp \ GobiQMICoreRMS.cpp \ GobiQMICoreSMS.cpp \ GobiQMICoreUIM.cpp \ GobiQMICoreWDS.cpp \ GobiQMIVoice.cpp libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/autogen.sh000077500000000000000000000011071455567757300213640ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. # NOTE # This autogen.sh is only used when building libqcdm separately from ModemManager srcdir=`dirname $0` test -z "$srcdir" && srcdir=. REQUIRED_AUTOMAKE_VERSION=1.7 PKG_NAME=GobiAPI (test -f $srcdir/configure.ac \ && test -f $srcdir/Core/QDLEnum.h) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 } (cd $srcdir; mkdir m4 autoreconf --install --symlink && autoreconf && ./configure --enable-maintainer-mode $@ ) libqmi-1.35.2-dev/gobi-api/GobiAPI_1.0.40/configure.ac000066400000000000000000000010311455567757300216450ustar00rootroot00000000000000AC_PREREQ(2.52) AC_INIT(GobiAPI, 1.0.40, foo@it.com, GobiAPI) AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS(config.h) dnl Required programs AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX AC_PROG_INSTALL LT_INIT AC_CONFIG_FILES([ Makefile Core/Makefile Database/Makefile Database/QMI/Makefile Shared/Makefile GobiConnectionMgmt/Makefile GobiImageMgmt/Makefile GobiQDLService/Makefile ]) AC_OUTPUT libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/000077500000000000000000000000001455567757300202635ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/000077500000000000000000000000001455567757300211535ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/Comm.cpp000066400000000000000000000371771455567757300225710ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.cpp DESCRIPTION: Implementation of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Comm.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads PARAMETERS: pData [ I ] Asynchronous read object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxThread( void * pData ) { cComm * pComm = (cComm*)pData; if (pComm == NULL || pComm->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pComm->mCommandPipe[READING], &inputSet ); int largestFD = pComm->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pComm->mCommandPipe[READING], &outputSet ) == true) { // Read from the pipe BYTE cmd; status = read( pComm->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pComm->mPort, &inputSet ); largestFD = std::max( pComm->mPort, pComm->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; } else { // EXIT_CMD or anything else pComm->mpRxCallback = 0; break; } } else if (FD_ISSET( pComm->mPort, &outputSet ) == true) { // Stop watching for read data FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; // Perform a read status = read( pComm->mPort, pComm->mpBuffer, pComm->mBuffSz ); cIOCallback * pCallback = pComm->mpRxCallback; pComm->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } } return 0; }; /*=========================================================================*/ // cComm Methods /*=========================================================================*/ /*=========================================================================== METHOD: cComm (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cComm::cComm() : mPortName( "" ), mPort( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cComm (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cComm::~cComm() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cComm::IsValid() { // Nothing to do, dependant on extended class functionality return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - Name of port to open (IE: /dev/qcqmi0) RETURN VALUE: bool ===========================================================================*/ bool cComm::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mPort != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cComm:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxThread, this ); if (nRet != 0) { TRACE( "cComm::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Opening the com port mPort = open( pPort, O_RDWR ); if (mPort == INVALID_HANDLE_VALUE) { Disconnect(); return false; } // Save port name mPortName = pPort; // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Run an IOCTL on the open file handle PARAMETERS: ioctlReq [ I ] - ioctl request value pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - ioctl return value (0 for success) ===========================================================================*/ int cComm::SendCtl( UINT ioctlReq, void * pData ) { if (mPort == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } return ioctl( mPort, ioctlReq, pData ); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cComm::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it TRACE( "cComm::Disconnnect() joining thread %lu\n", mRxThreadID ); int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mPort != INVALID_HANDLE_VALUE) { close( mPort ); mPort = INVALID_HANDLE_VALUE; } // Double check mpRxCallback = 0; mPortName.clear(); return bRC; } /*=========================================================================== METHOD: ConfigureSettings (Public Method) DESCRIPTION: Configure the port with the passed in parameters PARAMETERS: pSettings [ I ] - Desired port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::ConfigureSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } tcflush( mPort, TCIOFLUSH ); int nRC = tcsetattr( mPort, TCSANOW, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: GetSettings (Public Method) DESCRIPTION: Return the current port settings PARAMETERS: pSettings [ I ] - Current port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::GetSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } // Get the COM port settings int nRC = tcgetattr( mPort, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelIO() { if (mPort == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelRx() { if (mPort == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); mpRxCallback = 0; return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelTx() { if (mPort == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cComm::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to stop reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cComm::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // This seems a bit pointless, but we're still going verify // the device is ready for writing, and give it up to // (1000 + num bytes) MS to be ready (in 100 MS chunks) struct timeval TimeOut; fd_set set; int nReady = 0; int nCount = 0; while ( nReady == 0 ) { if (mbCancelWrite == true) { TRACE( "cComm::TxData() write canceled before device was ready\n" ); return false; } if (nCount >= (1000 + bufSz) / 100) { // Timeout is expired break; } FD_ZERO( &set ); FD_SET( mPort, &set ); TimeOut.tv_sec = 0; TimeOut.tv_usec = 100000; nReady = select( mPort + 1, NULL, &set, NULL, &TimeOut ); nCount++; } if (nReady <= 0) { TRACE( "cComm::TxData() Unable to get device ready for" " Write, error %d: %s\n", nReady, strerror( nReady) ); return false; } int nRet = write( mPort, pBuf, bufSz ); if (nRet != bufSz) { TRACE( "cComm::TxData() write returned %d instead of %lu\n", nRet, bufSz ); return false; } #ifdef DEBUG TRACE( "Write of %lu bytes took %llu miliseconds\n", bufSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/Comm.h000066400000000000000000000104121455567757300222150ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.h DESCRIPTION: Declaration of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cComm /*=========================================================================*/ class cComm : public cConnection { public: // Constructor cComm(); // Destructor ~cComm(); // Is this object valid? bool IsValid(); // Connect to the specified port bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current port name std::string GetPortName() const { return mPortName; }; // Are we currently connected to a port? bool IsConnected() { return (mPort != INVALID_HANDLE_VALUE); }; protected: /* Name of current port */ std::string mPortName; /* Handle to COM port */ int mPort; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; // Rx thread is allowed complete access friend void * RxThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/Connection.h000066400000000000000000000106301455567757300234230ustar00rootroot00000000000000/*=========================================================================== FILE: Connection.h DESCRIPTION: Declaration of cConnection class PUBLIC CLASSES AND METHODS: cComm This class defines a prototype for low level communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cIOCallback /*=========================================================================*/ class cIOCallback { public: // (Inline) Constructor cIOCallback() { }; // (Inline) Destructor virtual ~cIOCallback() { }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesTransferred ) = 0; }; /*=========================================================================*/ // Class cConnection /*=========================================================================*/ class cConnection { public: // Constructor cConnection() : mpRxCallback( 0 ) { }; // Is this object valid? virtual bool IsValid() { return false; }; // Connect to the specified interface virtual bool Connect( LPCSTR pPort ) { return false; }; // Send a control message virtual int SendCtl( UINT type, void * pData ) { return -1; }; // Disconnect from the current port virtual bool Disconnect() { return false; }; // Cancel any in-progress I/O virtual bool CancelIO() { return false; }; // Cancel any in-progress receive operation virtual bool CancelRx() { return false; }; // Cancel any in-progress transmit operation virtual bool CancelTx() { return false; }; // Receive data virtual bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { return false; }; // Transmit data virtual bool TxData( const BYTE * pBuf, ULONG bufSz ) { return false; }; // Are we currently connected to a port? virtual bool IsConnected() { return false; }; protected: /* Read callbacks */ cIOCallback * mpRxCallback; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/Event.cpp000066400000000000000000000254671455567757300227560ustar00rootroot00000000000000/*=========================================================================== FILE: Event.cpp DESCRIPTION: Implementation of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Event.h" /*=========================================================================== METHOD: WaitOnMultipleEvents (Free Method) DESCRIPTION: Wait for any of the events to be set and return the value Note: If multiple events are set, only the event specified by eventIndex will be read from. Run this function again to get the next event. PARAMETERS: events [ I ] - Vector of events which may be signaled timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success eventIndex [ O ] - Index of event which was signaled RETURN VALUE: Return code positive for number of events set -ETIME on timeout negative errno value on failure ===========================================================================*/ int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ) { // Check internal pipes' status for (ULONG index = 0; index < events.size(); index++) { int error = events[index]->mError; if (error != 0) { TRACE( "cEvent %lu has error %d\n", index, error ); return -error; } } // Initialize the FD set fd_set fds; FD_ZERO( &fds ); // Add each item to the FD set, keeping track of the largest, // which is used for select() int largestFD = 0; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; FD_SET( pipe, &fds ); largestFD = std::max( pipe, largestFD ); } struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipes for the specified amount of time int rc = select( largestFD + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { TRACE( "WaitOnMultipleEvents error %d\n", errno ); return -errno; } else if (rc == 0) { // No activity on the pipes return -ETIME; } int numSignaled = rc; // Only read from first pipe which was signaled int signaled = -1; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; if (FD_ISSET( pipe, &fds ) != 0) { signaled = index; break; } } if (signaled == -1) { // Odd, no one was signaled return -ENODATA; } DWORD tempVal = 0; rc = events[signaled]->Read( tempVal ); if (rc == 0) { // Success val = tempVal; eventIndex = signaled; return numSignaled; } else { // failure return rc; } } /*=========================================================================*/ // cEvent Methods /*=========================================================================*/ /*=========================================================================== METHOD: cEvent (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cEvent::cEvent() : mError( 0 ) { int rc = pipe( mPipes ); if (rc != 0) { mError = errno; TRACE( "cEvent - Error %d creating pipe, %s\n", mError, strerror( mError ) ); } } /*=========================================================================== METHOD: ~cEvent (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cEvent::~cEvent() { // Check internal pipe status if (mError == 0) { Close(); mError = EBADF; } } /*=========================================================================== METHOD: Close (Internal Method) DESCRIPTION: Close pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Close() { int retCode = 0; int rc = close( mPipes[READING] ); mPipes[READING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[READING], %s\n", retCode, strerror( retCode ) ); } rc = close( mPipes[WRITING] ); mPipes[WRITING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[WRITING], %s\n", retCode, strerror( retCode ) ); } return retCode; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Set/signal the event with the specified value PARAMETERS: val [ I ] - Value to pass through with signal RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Set( DWORD val ) { // Check internal pipe status if (mError != 0) { return mError; } PBYTE pWrite = (PBYTE)&val; int writeSize = sizeof( DWORD ); while (writeSize > 0) { int bytesWritten = write( mPipes[WRITING], pWrite, writeSize ); if (bytesWritten == -1) { // Store error from write int writeErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = writeErr; } // We cannot recover from this error Close(); return writeErr; } pWrite += bytesWritten; writeSize -= bytesWritten; } // Success return 0; } /*=========================================================================== METHOD: Wait (Free Method) DESCRIPTION: Wait for the event to be signalled and return the read in value PARAMETERS: timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success RETURN VALUE: Return code 0 on success ETIME on timeout errno value on failure ===========================================================================*/ int cEvent::Wait( DWORD timeoutMS, DWORD & val ) { // Check internal pipe status if (mError != 0) { return mError; } fd_set fds; FD_ZERO( &fds ); FD_SET( mPipes[READING], &fds ); struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipe for the specified amount of time int rc = select( mPipes[READING] + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { // Store error from select int selectErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = selectErr; } // We cannot recover from this error Close(); return selectErr; } else if (rc == 0) { // No activity on the pipe return ETIME; } return Read( val ); } /*=========================================================================== METHOD: Clear (Free Method) DESCRIPTION: Read and discard all values currently in the pipe ===========================================================================*/ void cEvent::Clear() { DWORD unusedVal; int rc = 0; while (rc == 0) { rc = Wait( (DWORD)0, unusedVal ); } } /*=========================================================================== METHOD: Read (Internal Method) DESCRIPTION: Read a DWORD from the pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Read( DWORD & val ) { DWORD tempVal; PBYTE pRead = (PBYTE)&tempVal; int readSize = sizeof( DWORD ); while (readSize > 0) { int bytesRead = read( mPipes[READING], pRead, readSize ); if (bytesRead <= 0) { // Store error from read int readErr = errno; if (readErr == 0) { // Hard error! This should NEVER happen for a pipe ASSERT( 0 ); readErr = EBADF; } // First error? if (mError == 0) { // Yes, store the error mError = readErr; } // We cannot recover from this error Close(); return readErr; } pRead += bytesRead; readSize -= bytesRead; } val = tempVal; return 0; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/Event.h000066400000000000000000000102031455567757300224010ustar00rootroot00000000000000/*=========================================================================== FILE: Event.h DESCRIPTION: Declaration of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include //--------------------------------------------------------------------------- // Prototype //--------------------------------------------------------------------------- class cEvent; /*=========================================================================*/ // Free methods /*=========================================================================*/ // Wait for any of the events to be set and return the value int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); /*=========================================================================*/ // Class cEvent /*=========================================================================*/ class cEvent { public: // Constructor cEvent(); // Destructor ~cEvent(); // Set/signal the event with the specified value int Set( DWORD val ); // Wait for the event to be signalled and return the read in value int Wait( DWORD timeoutMS, DWORD & val ); // Read and discard all values currently in the pipe void Clear(); protected: // Close pipe (used in errors or normal exit) int Close(); // Read from the pipe int Read( DWORD & val ); /* Internal error status */ int mError; /* Internal pipes */ int mPipes[2]; // WaitOnMultipleEvents gets full access friend int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolBuffer.cpp000066400000000000000000000143601455567757300246160ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.cpp DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sProtocolBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer() : mpData( 0 ), mbValid( false ) { // Object is currently invalid mTimestamp = EMPTY_TIME; } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (parameterized) PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( sSharedBuffer * pBuffer ) : mpData( 0 ), mbValid( false ) { mTimestamp = EMPTY_TIME; time_t rawtime; time( &rawtime ); tm * timestamp = localtime( &rawtime ); if (timestamp != 0) { mTimestamp = *timestamp; } if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } mpData = pBuffer; if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; } // NOTE: Derived classes need to call their own validation method // in their constructors since the override might try to access // data that is not yet in place sProtocolBuffer::Validate(); } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Copy constructor PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( const sProtocolBuffer & copyThis ) : mpData( copyThis.mpData ), mTimestamp( copyThis.mTimestamp ), mbValid( copyThis.mbValid ) { // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } } /*=========================================================================== METHOD: operator = (Public Method) DESCRIPTION: Assignment operator PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: sProtocolBuffer & ===========================================================================*/ sProtocolBuffer & sProtocolBuffer::operator = ( const sProtocolBuffer & copyThis ) { // Do we already have data? if (mpData != 0) { // Is it different than what we are duplicating? if (mpData != copyThis.mpData) { // Yes, release our current buffer mpData->Release(); } } mpData = copyThis.mpData; mTimestamp = copyThis.mTimestamp; mbValid = copyThis.mbValid; // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } return *this; } /*=========================================================================== METHOD: ~sProtocolBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::~sProtocolBuffer() { if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } else if (mpData != 0) { ASSERT( 0 ); } mbValid = false; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolBuffer.h000066400000000000000000000116201455567757300242570ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.h DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SharedBuffer.h" #include "ProtocolEnum.h" static const tm EMPTY_TIME = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /*=========================================================================*/ // Struct sProtocolBuffer /*=========================================================================*/ struct sProtocolBuffer { public: // Constructor (default) sProtocolBuffer(); // Constructor (parameterized) sProtocolBuffer( sSharedBuffer * pBuffer ); // Copy constructor sProtocolBuffer( const sProtocolBuffer & copyThis ); // Assignment operator sProtocolBuffer & operator = ( const sProtocolBuffer & copyThis ); // Destructor virtual ~sProtocolBuffer(); // (Inline) Get buffer const BYTE * GetBuffer() const { BYTE * pRet = 0; if (IsValid() == true) { pRet = (BYTE *)mpData->GetBuffer(); } return (const BYTE *)pRet; }; // (Inline) Get buffer size ULONG GetSize() const { ULONG size = 0; if (IsValid() == true) { size = mpData->GetSize(); } return size; }; // (Inline) Return the protocol type eProtocolType GetType() const { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid() == true) { pt = (eProtocolType)mpData->GetType(); } return pt; }; // (Inline) Return the shared buffer sSharedBuffer * GetSharedBuffer() const { sSharedBuffer * pRet = 0; if (IsValid() == true) { pRet = mpData; } return pRet; }; // (Inline) Return the timestamp tm GetTimestamp() const { tm ft = EMPTY_TIME; if (IsValid() == true) { ft = mTimestamp; } return ft; }; // (Inline) Is this buffer valid? virtual bool IsValid() const { return mbValid; }; protected: // (Inline) Validate buffer virtual bool Validate() { // Do we have a shared buffer and is it valid? mbValid = (mpData != 0 && mpData->IsValid()); return mbValid; }; /* Our data buffer */ sSharedBuffer * mpData; /* Time buffer was created */ tm mTimestamp; /* Has this buffer been validated? (NOTE: *NOT* set in base) */ bool mbValid; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolEnum.h000066400000000000000000000242111455567757300237520ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEnum.h DESCRIPTION: Generic protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eProtocolType Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eProtocolType Enumeration // // NOTE: QMI protocol types need to be in the same order as eQMIService // with RX added first then TX /*=========================================================================*/ enum eProtocolType { ePROTOCOL_ENUM_BEGIN = -1, ePROTOCOL_COMMAND, // 000 Protocol server command ePROTOCOL_AT, // 001 AT command protocol ePROTOCOL_NMEA, // 002 NMEA (GPS) protocol ePROTOCOL_DIAG_RX, // 003 DIAG protocol (incoming) ePROTOCOL_DIAG_TX, // 004 DIAG protocol (outgoing) ePROTOCOL_DOWNLOAD_RX, // 005 Download protocol (incoming) ePROTOCOL_DOWNLOAD_TX, // 006 Download protocol (outgoing) ePROTOCOL_SDOWNLOAD_RX, // 007 Streaming download protocol (incoming) ePROTOCOL_SDOWNLOAD_TX, // 008 Streaming download protocol (outgoing) ePROTOCOL_QDL_RX, // 009 QDL streaming protocol (incoming) ePROTOCOL_QDL_TX, // 010 QDL streaming protocol (outgoing) ePROTOCOL_QMI_CTL_RX = 60, // 060 QMI CTL protocol (incoming) ePROTOCOL_QMI_CTL_TX, // 061 QMI CTL protocol (outgoing) ePROTOCOL_QMI_WDS_RX, // 062 QMI WDS protocol (incoming) ePROTOCOL_QMI_WDS_TX, // 063 QMI WDS protocol (outgoing) ePROTOCOL_QMI_DMS_RX, // 064 QMI DMS protocol (incoming) ePROTOCOL_QMI_DMS_TX, // 065 QMI DMS protocol (outgoing) ePROTOCOL_QMI_NAS_RX, // 066 QMI NAS protocol (incoming) ePROTOCOL_QMI_NAS_TX, // 067 QMI NAS protocol (outgoing) ePROTOCOL_QMI_QOS_RX, // 068 QMI QOS protocol (incoming) ePROTOCOL_QMI_QOS_TX, // 069 QMI QOS protocol (outgoing) ePROTOCOL_QMI_WMS_RX, // 070 QMI WMS protocol (incoming) ePROTOCOL_QMI_WMS_TX, // 071 QMI WMS protocol (outgoing) ePROTOCOL_QMI_PDS_RX, // 072 QMI PDS protocol (incoming) ePROTOCOL_QMI_PDS_TX, // 073 QMI PDS protocol (outgoing) ePROTOCOL_QMI_AUTH_RX, // 074 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AUTH_TX, // 075 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_AT_RX, // 076 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AT_TX, // 077 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_VOICE_RX, // 078 QMI Voice protocol (incoming) ePROTOCOL_QMI_VOICE_TX, // 079 QMI Voice protocol (outgoing) ePROTOCOL_QMI_CAT2_RX, // 080 QMI CAT (new) protocol (incoming) ePROTOCOL_QMI_CAT2_TX, // 081 QMI CAT (new) protocol (outgoing) ePROTOCOL_QMI_UIM_RX, // 082 QMI UIM protocol (incoming) ePROTOCOL_QMI_UIM_TX, // 083 QMI UIM protocol (outgoing) ePROTOCOL_QMI_PBM_RX, // 084 QMI PBM protocol (incoming) ePROTOCOL_QMI_PBM_TX, // 085 QMI PBM protocol (outgoing) ePROTOCOL_QMI_13_RX, // 086 QMI service ID 13 protocol (incoming) ePROTOCOL_QMI_13_TX, // 087 QMI service ID 13 protocol (outgoing) ePROTOCOL_QMI_RMTFS_RX, // 088 QMI RMTFS protocol (incoming) ePROTOCOL_QMI_RMTFS_TX, // 089 QMI RMTFS protocol (outgoing) ePROTOCOL_QMI_15_RX, // 090 QMI service ID 15 protocol (incoming) ePROTOCOL_QMI_15_TX, // 091 QMI service ID 15 protocol (outgoing) ePROTOCOL_QMI_LOC_RX, // 092 QMI UIM protocol (incoming) ePROTOCOL_QMI_LOC_TX, // 093 QMI UIM protocol (outgoing) ePROTOCOL_QMI_SAR_RX, // 094 QMI PBM protocol (incoming) ePROTOCOL_QMI_SAR_TX, // 095 QMI PBM protocol (outgoing) ePROTOCOL_QMI_18_RX, // 096 QMI service ID 18 protocol (incoming) ePROTOCOL_QMI_18_TX, // 097 QMI service ID 18 protocol (outgoing) ePROTOCOL_QMI_19_RX, // 098 QMI service ID 19 protocol (incoming) ePROTOCOL_QMI_19_TX, // 099 QMI service ID 19 protocol (outgoing) ePROTOCOL_QMI_CSD_RX, // 100 QMI CSD protocol (incoming) ePROTOCOL_QMI_CSD_TX, // 101 QMI CSD protocol (outgoing) ePROTOCOL_QMI_EFS_RX, // 102 QMI EFS protocol (incoming) ePROTOCOL_QMI_EFS_TX, // 103 QMI EFS protocol (outgoing) ePROTOCOL_QMI_22_RX, // 104 QMI service ID 22 protocol (incoming) ePROTOCOL_QMI_22_TX, // 105 QMI service ID 22 protocol (outgoing) ePROTOCOL_QMI_TS_RX, // 106 QMI TS protocol (incoming) ePROTOCOL_QMI_TS_TX, // 107 QMI TS protocol (outgoing) ePROTOCOL_QMI_TMD_RX, // 108 QMI TMD protocol (incoming) ePROTOCOL_QMI_TMD_TX, // 109 QMI TMD protocol (outgoing) ePROTOCOL_QMI_25_RX, // 110 QMI service ID 25 protocol (incoming) ePROTOCOL_QMI_25_TX, // 111 QMI service ID 25 protocol (outgoing) ePROTOCOL_QMI_26_RX, // 112 QMI service ID 26 protocol (incoming) ePROTOCOL_QMI_26_TX, // 113 QMI service ID 26 protocol (outgoing) ePROTOCOL_QMI_27_RX, // 114 QMI service ID 27 protocol (incoming) ePROTOCOL_QMI_27_TX, // 115 QMI service ID 27 protocol (outgoing) ePROTOCOL_QMI_28_RX, // 116 QMI service ID 28 protocol (incoming) ePROTOCOL_QMI_28_TX, // 117 QMI service ID 28 protocol (outgoing) ePROTOCOL_QMI_CAT_RX = 508, // 508 QMI CAT protocol (incoming) ePROTOCOL_QMI_CAT_TX, // 509 QMI CAT protocol (outgoing) ePROTOCOL_QMI_RMS_RX, // 510 QMI RMS protocol (incoming) ePROTOCOL_QMI_RMS_TX, // 511 QMI RMS protocol (outgoing) ePROTOCOL_QMI_OMA_RX, // 512 QMI OMA protocol (incoming) ePROTOCOL_QMI_OMA_TX, // 513 QMI OMA protocol (outgoing) ePROTOCOL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolType validity check PARAMETERS: pt [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolType pt ) { bool retVal = false; if ( (pt > ePROTOCOL_ENUM_BEGIN && pt <= ePROTOCOL_QDL_TX) || (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_28_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocol( eProtocolType pt ) { bool retVal = false; if ( (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_28_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolRX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the incoming direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolRX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are even are RX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 0) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolTX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the outgoing direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolTX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are odd are TX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 1) ) { retVal = true; } return retVal; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolLog.cpp000066400000000000000000000133241455567757300241250ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class definition PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolLog.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // The maximum number of in-memory buffers we allow const ULONG MAX_PROTOCOL_BUFFERS = 1024 * 16; /*=========================================================================*/ // cProtocolLog Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolLog (Public Method) DESCRIPTION: Constructor PARAMETERS: maxBuffers [ I ] - Maximum number of buffers to store in the log RETURN VALUE: None ===========================================================================*/ cProtocolLog::cProtocolLog( ULONG maxBuffers ) : mLog( maxBuffers > MAX_PROTOCOL_BUFFERS ? MAX_PROTOCOL_BUFFERS : maxBuffers, true ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolLog (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolLog::~cProtocolLog() { // Empty out the log Clear(); } /*=========================================================================== METHOD: AddBuffer (Public Method) DESCRIPTION: Add an protocol buffer to the end of the log PARAMETERS: buff [ I ] - Protocol buffer to add RETURN VALUE: ULONG - Index of newly added buffer (INVALID_LOG_INDEX upon failure) ===========================================================================*/ ULONG cProtocolLog::AddBuffer( sProtocolBuffer & buf ) { ULONG idx = INVALID_LOG_INDEX; if (buf.IsValid() == false) { return idx; } bool bRC = mLog.AddElement( buf, idx ); if (bRC == false) { idx = INVALID_LOG_INDEX; } return idx; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Return the protocol buffer at the given index from the log PARAMETERS: idx [ I ] - Index of protocol buffer to obtain RETURN VALUE: sProtocolBuffer - Protocol buffer ===========================================================================*/ sProtocolBuffer cProtocolLog::GetBuffer( ULONG idx ) const { sProtocolBuffer buf; mLog.GetElement( idx, buf ); return buf; } /*=========================================================================== METHOD: GetSignalEvent (Public Method) DESCRIPTION: Return the underlying signal event, which will be set when the log is updated. RETURN VALUE: cEvent - Signal event ===========================================================================*/ cEvent & cProtocolLog::GetSignalEvent() const { return mLog.GetSignalEvent(); } /*=========================================================================== METHOD: GetCount (Public Method) DESCRIPTION: Return the total number of buffers added to the log RETURN VALUE: ULONG ===========================================================================*/ ULONG cProtocolLog::GetCount() const { return mLog.GetTotalCount(); } /*=========================================================================== METHOD: Clear (Public Method) DESCRIPTION: Clear the log RETURN VALUE: None ===========================================================================*/ void cProtocolLog::Clear() { mLog.EmptyQueue(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolLog.h000066400000000000000000000070261455567757300235740ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class declaration PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "SyncQueue.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const ULONG INVALID_LOG_INDEX = ULONG_MAX; /*=========================================================================*/ // Class cProtocolLog /*=========================================================================*/ class cProtocolLog { public: // Constructor cProtocolLog( ULONG maxBuffers ); // Destructor virtual ~cProtocolLog(); // Add an protocol buffer to the end of the log virtual ULONG AddBuffer( sProtocolBuffer & buf ); // Return the protocol buffer at the given index from the log virtual sProtocolBuffer GetBuffer( ULONG idx ) const; // Return the underlying signal event virtual cEvent & GetSignalEvent() const; // Return the total number of buffers added to the log virtual ULONG GetCount() const; // Clear the log virtual void Clear(); protected: /* The underlying 'log' */ cSyncQueue mLog; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolNotification.cpp000066400000000000000000000132341455567757300260320ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.cpp DESCRIPTION: Implementation of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolNotification.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cProtocolQueueNotification Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Constructor PARAMETERS: pSQ [ I ] - Sync queue to utilize RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( cSyncQueue * pSQ ) : mpSQ( pSQ ) { // Nothing to do } /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Copy constructor PARAMETERS: notifier [ I ] - Notifier to base the new one on RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( const cProtocolQueueNotification & notifier ) : mpSQ( notifier.mpSQ ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolQueueNotification (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::~cProtocolQueueNotification() { mpSQ = 0; } /*=========================================================================== METHOD: Clone (Public Method) DESCRIPTION: Return an allocated copy of this object downcasted to our base class RETURN VALUE: cProtocolNotification * : Cloned object (0 on error) ===========================================================================*/ cProtocolNotification * cProtocolQueueNotification::Clone() const { cProtocolQueueNotification * pCopy = 0; try { pCopy = new cProtocolQueueNotification( *this ); } catch (...) { // Simply return 0 } return ((cProtocolNotification *)pCopy); } /*=========================================================================== METHOD: Notify (Public Method) DESCRIPTION: Notify view of a protocol event by adding notification structure to the underlying sync queue (which will provide the notification by signalling an event) PARAMETERS: eventType [ I ] - Protocol event type param1 [ I ] - Event type specific argument (see header description) param2 [ I ] - Event type specific argument (see header description) RETURN VALUE: None ===========================================================================*/ void cProtocolQueueNotification::Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const { sProtocolNotificationEvent evt( eventType, param1, param2 ); if (evt.IsValid() == true && mpSQ != 0 && mpSQ->IsValid() == true) { sProtocolNotificationEvent elem( eventType, param1, param2 ); mpSQ->AddElement( elem ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolNotification.h000066400000000000000000000174311455567757300255020ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.h DESCRIPTION: Declaration of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SyncQueue.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- enum eProtocolEventType { ePROTOCOL_EVT_BEGIN = -1, ePROTOCOL_EVT_REQ_ERR, // There was an error sending the request ePROTOCOL_EVT_REQ_SENT, // The request has been sent ePROTOCOL_EVT_RSP_ERR, // There was an error receiving the response ePROTOCOL_EVT_RSP_RECV, // The response has been received ePROTOCOL_EVT_AUX_TU_SENT, // Auxiliary data transmission unit sent ePROTOCOL_EVT_END }; // NOTE: The arguments for each event are currently as follows: // // ePROTOCOL_EVT_REQ_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_REQ_SENT // param1: Request ID // param2: Index of request buffer in associated protocol log // ePROTOCOL_EVT_RSP_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_RSP_RECV // param1: Request ID // param2: Index of response buffer in associated protocol log // // ePROTOCOL_EVT_AUX_TU_SENT // param1: Request ID // param2: Size of transmission unit // NOTE: To handle protoocl events using the Windows notifier add the following // prototype to your Window class header file: // // afx_msg LRESULT OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ); // // Then add an entry to the message map in your Window class source file: // // BEGIN_MESSAGE_MAP( CView, CChildView ) // ON_MESSAGE( PROTOCOL_WM_BASE + (ULONG)ePROTOCOL_EVT_XXX, OnProtocolEvent ) // END_MESSAGE_MAP() // // Finally write the handler itself: // // LRESULT CView::OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ) // { // Do something // return 0; // } /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolEventType validity check PARAMETERS: evtType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolEventType evtType ) { bool bRC = false; if (evtType > ePROTOCOL_EVT_BEGIN && evtType < ePROTOCOL_EVT_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Struct sProtocolNotificationEvent /*=========================================================================*/ struct sProtocolNotificationEvent { public: // (Inline) Default constructor (results in invalid object) sProtocolNotificationEvent() : mEventType( ePROTOCOL_EVT_BEGIN ), mParam1( 0 ), mParam2( 0 ) { // Nothing to do }; // (Inline) Parameter constructor sProtocolNotificationEvent( eProtocolEventType eventType, DWORD param1, DWORD param2 ) : mEventType( eventType ), mParam1( param1 ), mParam2( param2 ) { // Nothing to do }; // (Inline) Is this object valid? bool IsValid() { return ::IsValid( mEventType ); } /* Event type */ eProtocolEventType mEventType; /* First parameter (see above) */ DWORD mParam1; /* Second parameter (see above) */ DWORD mParam2; }; /*=========================================================================*/ // Class cProtocolNotification // // This abstract base class provides notification of protocol server // events sent from the protocol server to protocol server clients /*=========================================================================*/ class cProtocolNotification { public: // Return an allocated copy of this object virtual cProtocolNotification * Clone() const = 0; // Notify view of a protocol event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const = 0; }; /*=========================================================================*/ // Class cProtocolQueueNotification // // This class provides notification via a cSyncQueue object // populated with sProtocolNotificationEvent objects /*=========================================================================*/ class cProtocolQueueNotification : public cProtocolNotification { public: // Constructor cProtocolQueueNotification( cSyncQueue * pSQ ); // Copy constructor cProtocolQueueNotification( const cProtocolQueueNotification & notifier ); // Destructor virtual ~cProtocolQueueNotification(); // Return a copy of this object virtual cProtocolNotification * Clone() const; // Notify view of a MIS event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const; protected: /* Event notification queue */ mutable cSyncQueue * mpSQ; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolRequest.cpp000066400000000000000000000177471455567757300250510ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.cpp DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolRequest.h" #include "ProtocolNotification.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout const ULONG DEFAULT_REQ_TIMEOUT = 1000; // Minimum and maximum allowable timeout values (in milliseconds) const ULONG MIN_REQ_TIMEOUT = 100; const ULONG MAX_REQ_TIMEOUT = 300000; // Minimum number of attempts a request can be scheduled for const ULONG MIN_REQ_ATTEMPTS = 1; // Value to indicate that a request is to be sent out indefinately const ULONG INFINITE_REQS = 0xFFFFFFFF; // Minimum/default amount of time between repeated requests (in milliseconds) const ULONG MIN_REQ_FREQUENCY = 10; const ULONG DEFAULT_REQ_FREQUENCY = 100; /*=========================================================================*/ // sProtocolRequest Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) schedule [ I ] - When (from now, in milliseconds) to send the first request, this isn't a hard value as the request is only guaranteed to go out after this time elapses timeout [ I ] - Milliseconds to wait for a response to an individual request before declaring a timeout. Regardless of what is passed in the timeout value used will be between MIN/MAX_REQ_TIMEOUT requests [ I ] - Number of request attempts to make, this isn't a retry count rather this value is used to specify repeating requests. Regardless of what is passed in the requests value used will be at least MIN_REQ_ATTEMPTS frequency [ I ] - If the 'requests' value is greater than the MIN_REQ_ATTEMPTS than this represents the amount of time to wait between requests (from the completion of the last request attempt, in milliseconds), again this isn't a hard value. Regardless of what is passed in the frequency value used will be at least MIN_REQ_FREQUENCY pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule, ULONG timeout, ULONG requests, ULONG frequency, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( schedule ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( 0 ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Constrain requested timeout to allowable range if (timeout < MIN_REQ_TIMEOUT) { timeout = MIN_REQ_TIMEOUT; } if (timeout > MAX_REQ_TIMEOUT) { timeout = MAX_REQ_TIMEOUT; } mTimeout = timeout; // Constrain request attempts if (requests >= MIN_REQ_ATTEMPTS) { mRequests = requests; } // Constrain frequency if (frequency >= MIN_REQ_FREQUENCY) { mFrequency = frequency; } // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor (notification with defaults) PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( 0 ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( pNotifier ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Copy constructor PARAMETERS: req [ I ] - Request to copy RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( const sProtocolRequest & req ) : sProtocolBuffer( req ), mSchedule( req.mSchedule ), mTimeout( req.mTimeout ), mRequests( req.mRequests ), mFrequency( req.mFrequency ), mpNotifier( 0 ), mpAuxData( req.mpAuxData ), mAuxDataSize( req.mAuxDataSize ), mbTXOnly( req.mbTXOnly ) { // Clone notifier? if (req.mpNotifier != 0) { mpNotifier = req.mpNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: ~sProtocolRequest DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolRequest::~sProtocolRequest() { // Delete cloned notifier? if (mpNotifier != 0) { delete mpNotifier; mpNotifier = 0; } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolRequest.h000066400000000000000000000146261455567757300245070ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.h DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing protocol requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolNotification; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout extern const ULONG DEFAULT_REQ_TIMEOUT; // Minimum and maximum allowable timeout values (in milliseconds) extern const ULONG MIN_REQ_TIMEOUT; extern const ULONG MAX_REQ_TIMEOUT; // Minimum number of attempts a request can be scheduled for extern const ULONG MIN_REQ_ATTEMPTS; // Value to indicate that a request is to be sent out indefinately extern const ULONG INFINITE_REQS; // Minimum/default amount of time between repeated requests (in milliseconds) extern const ULONG MIN_REQ_FREQUENCY; extern const ULONG DEFAULT_REQ_FREQUENCY; /*=========================================================================*/ // Struct sProtocolRequest // // Structure to represent a generic request packet, including all the // information needed to schedule the request, send the request, and // (optionally) reschedule the request for another TX/RX attempt // // The default parameters schedule an immediate request (indicated by // passing in '0' for the schedule parameter) to be sent once with // the default timeout value /*=========================================================================*/ struct sProtocolRequest : public sProtocolBuffer { public: // Parameterized constructor sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule = 0, ULONG timeout = DEFAULT_REQ_TIMEOUT, ULONG requests = MIN_REQ_ATTEMPTS, ULONG frequency = DEFAULT_REQ_FREQUENCY, cProtocolNotification * pNotifier = 0 ); // Parameterized constructor (notification with defaults) sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ); // Copy constructor sProtocolRequest( const sProtocolRequest & req ); // Destructor virtual ~sProtocolRequest(); // (Inline) Get schedule value (value is in milliseconds) ULONG GetSchedule() const { return mSchedule; }; // (Inline) Get timeout value ULONG GetTimeout() const { return mTimeout; }; // (Inline) Get requests value ULONG GetRequests() const { return mRequests; }; // (Inline) Get frequency value (value is in milliseconds) ULONG GetFrequency() const { return mFrequency; }; const cProtocolNotification * GetNotifier() const { return mpNotifier; }; // (Inline) Set auxiliary data void SetAuxiliaryData( const BYTE * pData, ULONG dataSz ) { mpAuxData = pData; mAuxDataSize = dataSz; }; // (Inline) Get auxiliary data const BYTE * GetAuxiliaryData( ULONG & dataSz ) const { dataSz = mAuxDataSize; return mpAuxData; }; // (Inline) Set TX only flag void SetTXOnly() { mbTXOnly = true; }; // (Inline) Get TX only flag bool IsTXOnly() const { return mbTXOnly; }; protected: /* Schedule (approximately when to send the initial request) */ ULONG mSchedule; /* Timeout value for receiving a response */ ULONG mTimeout; /* Number of requests to schedule (must be at least one) */ ULONG mRequests; /* Frequency (approximately how long to wait before next request) */ ULONG mFrequency; /* Notification object */ cProtocolNotification * mpNotifier; /* Auxiliary data */ const BYTE * mpAuxData; /* Auxilary data size */ ULONG mAuxDataSize; /* TX only (i.e. do not wait for a response) ? */ bool mbTXOnly; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolServer.cpp000066400000000000000000001343501455567757300246550ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.cpp DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolServer.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID const ULONG INVALID_REQUEST_ID = 0; // Default activity timeout value const ULONG DEFAULT_WAIT = 100; // MTU (Maximum Transmission Unit) for auxiliary data (QC USB imposed) const ULONG MAX_AUX_MTU_SIZE = 1024 * 256; // USB's MaxPacketSize const ULONG MAX_PACKET_SIZE = 512; // Maximum amount of time to wait on external access synchronization object #ifdef DEBUG // For the sake of debugging do not be so quick to assume failure const ULONG DEADLOCK_TIME = 180000; #else const ULONG DEADLOCK_TIME = 10000; #endif // Maximum amount of time to wait for the protocol server to process a command const ULONG COMMAND_TIME = DEADLOCK_TIME; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ScheduleThread (Free Method) DESCRIPTION: Watch schedule for event to process or timeout PARAMETERS: pArg [ I ] - The protocol server object RETURN VALUE: void * - thread exit value (always NULL) ===========================================================================*/ void * ScheduleThread( PVOID pArg ) { // Do we have a server? cProtocolServer * pServer = (cProtocolServer *)pArg; if (pServer == 0) { TRACE( "ScheduleThread started with empty pArg." " Unable to locate cProtocolServer\n" ); ASSERT( 0 ); return NULL; } TRACE( "Schedule thread [%lu] started\n", pthread_self() ); // Default wait event timespec toTime = TimeIn( DEFAULT_WAIT ); // Return value checking int nRet; while (pServer->mbExiting == false) { DWORD nTemp; nRet = pServer->mThreadScheduleEvent.Wait( TimeFromNow( toTime ), nTemp ); if (nRet != 0 && nRet != ETIME) { // Error condition TRACE( "ScheduleThread [%lu] ScheduleThread wait error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Time to exit? if (pServer->mbExiting == true) { break; } // Get Schedule Mutex (non-blocking) nRet = pthread_mutex_trylock( &pServer->mScheduleMutex ); if (nRet == EBUSY) { // Not an error, we're just too slow // Someone else got to the ScheduleMutex before us // We'll wait for the signal again toTime = TimeIn( DEFAULT_WAIT ); TRACE( "ScheduleThread [%lu] unable to lock ScheduleMutex\n", pthread_self() ); continue; } else if (nRet != 0) { // Error condition TRACE( "ScheduleThread [%lu] mScheduleMutex error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Verify time. In the rare event it does move backward // it would simply place all our schedule items as due now pServer->CheckSystemTime(); // Default next wait period toTime = TimeIn( DEFAULT_WAIT ); timespec curTime = TimeIn( 0 ); if (pServer->mpActiveRequest != 0) { if (pServer->mpActiveRequest->mbWaitingForResponse == true) { // Waiting on a response, this takes priority over the next // scheduled event // Has timeout expired? if (pServer->mActiveRequestTimeout <= curTime) { // Response timeout // Note: This may clear mpActiveRequest pServer->RxTimeout(); } else { // Active response timer is not yet due to expire // Default timeout again, or this response's timeout? if (pServer->mActiveRequestTimeout <= toTime) { toTime = pServer->mActiveRequestTimeout; } } } else { // This should never happen TRACE( "ScheduleThread() Sequencing error: " "Active request %lu is not waiting for response ???\n", pServer->mpActiveRequest->mID ); break; } } if (pServer->mpActiveRequest == 0 && pServer->mRequestSchedule.size() > 0) { // No response timer active, ready to start the next // scheduled item if due timespec scheduledItem = pServer->GetNextRequestTime(); // Is item due to be scheduled? if (scheduledItem <= curTime) { // Process scheduled item pServer->ProcessRequest(); } else { // Scheduled item is not yet due to be processed // Default timeout again, or this item's start time? if (scheduledItem <= toTime) { toTime = scheduledItem; } } } /*TRACE( "Updated timer at %llu waiting %lu\n", GetTickCount(), TimeFromNow( toTime ) ); */ // Unlock schedule mutex nRet = pthread_mutex_unlock( &pServer->mScheduleMutex ); if (nRet != 0) { TRACE( "ScheduleThread Unable to unlock schedule mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } TRACE( "Schedule thread [%lu] exited\n", pthread_self() ); return NULL; } /*=========================================================================== METHOD: TimeIn (Free Method) DESCRIPTION: Fill timespec with the time it will be in specified milliseconds Relative time to Absolute time PARAMETERS: millis [ I ] - Milliseconds from current time RETURN VALUE: timespec - resulting time (from epoc) NOTE: tv_sec of 0 is an error ===========================================================================*/ timespec TimeIn( ULONG millis ) { timespec outTime; int nRC = clock_gettime( CLOCK_REALTIME, &outTime ); if (nRC == 0) { // Add avoiding an overflow on (long)nsec outTime.tv_sec += millis / 1000l; outTime.tv_nsec += ( millis % 1000l ) * 1000000l; // Check if we need to carry if (outTime.tv_nsec >= 1000000000l) { outTime.tv_sec += outTime.tv_nsec / 1000000000l; outTime.tv_nsec = outTime.tv_nsec % 1000000000l; } } else { outTime.tv_sec = 0; outTime.tv_nsec = 0; } return outTime; } /*=========================================================================== METHOD: TimeFromNow (Free Method) DESCRIPTION: Find the milliseconds from current time this timespec will occur Absolute time to Relative time PARAMETERS: time [ I ] - Absolute time RETURN VALUE: Milliseconds in which absolute time will occur 0 if time has passed or error has occured ===========================================================================*/ ULONG TimeFromNow( timespec time ) { // Assume failure ULONG nOutTime = 0; timespec now; int nRC = clock_gettime( CLOCK_REALTIME, &now ); if (nRC == -1) { TRACE( "Error %d with gettime, %s\n", errno, strerror( errno ) ); return nOutTime; } if (time <= now) { return nOutTime; } nOutTime = (time.tv_sec - now.tv_sec) * 1000l; nOutTime += (time.tv_nsec - now.tv_nsec) / 1000000l; return nOutTime; } /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime = TimeIn( 0 ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================*/ // cProtocolServerRxCallback Methods /*=========================================================================*/ /*=========================================================================== METHOD: IOComplete (Free Method) DESCRIPTION: The I/O has been completed, process the results PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Bytes received during operation RETURN VALUE: None ===========================================================================*/ void cProtocolServerRxCallback::IOComplete( DWORD status, DWORD bytesReceived ) { if (mpServer != 0) { mpServer->RxComplete( status, bytesReceived ); } } /*=========================================================================*/ // cProtocolServer::sProtocolReqRsp Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Constructor PARAMETERS: requestInfo [ I ] - Underlying request object requestID [ I ] - Request ID auxDataMTU [ I ] - MTU (Maximum Transmission Unit) for auxiliary data RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ) : mRequest( requestInfo ), mID( requestID ), mAttempts( 0 ), mEncodedSize( requestInfo.GetSize() ), mRequiredAuxTxs( 0 ), mCurrentAuxTx( 0 ), mbWaitingForResponse( false ) { ULONG auxDataSz = 0; const BYTE * pAuxData = requestInfo.GetAuxiliaryData( auxDataSz ); // Compute the number of required auxiliary data transmissions? if (auxDataMTU > 0 && pAuxData != 0 && auxDataSz > 0) { mRequiredAuxTxs = 1; if (auxDataSz > auxDataMTU) { mRequiredAuxTxs = auxDataSz / auxDataMTU; if ((auxDataSz % auxDataMTU) != 0) { mRequiredAuxTxs++; } } } } /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Copy constructor PARAMETERS: reqRsp [ I ] - Object being copied RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolReqRsp & reqRsp ) : mRequest( reqRsp.mRequest ), mID( reqRsp.mID ), mAttempts( reqRsp.mAttempts ), mEncodedSize( reqRsp.mEncodedSize ), mRequiredAuxTxs( reqRsp.mRequiredAuxTxs ), mCurrentAuxTx( reqRsp.mCurrentAuxTx ), mbWaitingForResponse( reqRsp.mbWaitingForResponse ) { // Nothing to do }; /*=========================================================================*/ // cProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : mpConnection( 0 ), mConnectionType( eConnectionType_Begin ), mRxCallback(), mScheduleThreadID( 0 ), mThreadScheduleEvent(), mbExiting( false ), mpServerControl( 0 ), mLastRequestID( 1 ), mpActiveRequest( 0 ), mpRxBuffer( 0 ), mRxBufferSize( bufferSzRx ), mRxType( rxType ), mTxType( txType ), mLog( logSz ) { mLastTime = TimeIn( 0 ); // Allocate receive buffer? if (mRxBufferSize > 0) { mpRxBuffer = new BYTE[mRxBufferSize]; } // Before continuing verify receive buffer was allocated if (mpRxBuffer != 0) { // Schedule mutex int nRet = pthread_mutex_init( &mScheduleMutex, NULL ); if (nRet != 0) { TRACE( "Unable to init schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } } } /*=========================================================================== METHOD: ~cProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::~cProtocolServer() { // This should have already been called, but ... Exit(); // Schedule mutex int nRet = pthread_mutex_destroy( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to destroy schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); } // Free receive buffer if (mpRxBuffer != 0) { delete [] mpRxBuffer; mpRxBuffer = 0; } } /*=========================================================================== METHOD: HandleRemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request Note: if a request is being processed, it cannot be inturrupted PARAMETERS: reqID [ I ] - Server assigned request ID SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::HandleRemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Find and erase request from request map std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); if (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } mRequestMap.erase( pReqIter ); // Success! bRC = true; // Find and erase request from schedule bool bFound = false; int entryIndex = -1; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { entryIndex++; tSchedule entry = *pScheduleIter; if (entry.second == reqID) { bFound = true; mRequestSchedule.erase( pScheduleIter ); break; } else { pScheduleIter++; } } // Note: schedule will be updated when mutex is unlocked/signaled } else if (mpActiveRequest != 0 && mpActiveRequest->mID == reqID) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Cancel the response timer (when active) if (mpActiveRequest->mbWaitingForResponse == true) { // Schedule will be updated when mutex is unlocked // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)reqID, ECANCELED ); } } else { // This is the active request, cancel the underlying transmit // Note: Because ProcessRequest and RemoveRequest are both muxed // with ScheduleMutex, it is impossible to for the write // to actually be in progress when this code is reached. if (mpConnection != 0) { mpConnection->CancelTx(); } // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, ECANCELED ); } } // Now delete the request delete mpActiveRequest; mpActiveRequest = 0; // Success! bRC = true; } else { TRACE( "cProtocolServer::RemoveRequest( %lu )," " invalid request ID\n", reqID ); } return bRC; } /*=========================================================================== METHOD: ScheduleRequest (Internal Method) DESCRIPTION: Schedule a request for transmission PARAMETERS: reqID [ I ] - ID of the request being scheduled this ID must exist in the internal request/schedule maps schedule [ I ] - Value in milliseconds that indicates the approximate time from now that the request is to be sent out, the actual time that the request is sent will be greater than or equal to this value dependant on requests scheduled before the request in question and standard server processing time SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ScheduleRequest( ULONG reqID, ULONG schedule ) { // Assume failure bool bRC = false; // Schedule adjust is in milliseconds timespec schTimer = TimeIn( schedule ); // Create the schedule entry tSchedule newEntry( schTimer, reqID ); // Fit this request into the schedule (ordered by scheduled time) mRequestSchedule.insert( newEntry ); // Note: timer will be updated when mScheduleMutex is unlocked return bRC; } /*=========================================================================== METHOD: RescheduleActiveRequest (Internal Method) DESCRIPTION: Reschedule (or cleanup) the active request SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RescheduleActiveRequest() { // Are there more attempts to be made? if (mpActiveRequest->mAttempts < mpActiveRequest->mRequest.GetRequests()) { // Yes, first reset the request mpActiveRequest->Reset(); // Now add it back to the request map mRequestMap[mpActiveRequest->mID] = mpActiveRequest; TRACE( "RescheduleActiveRequest(): req %lu rescheduled\n", mpActiveRequest->mID ); // Lastly reschedule the request ScheduleRequest( mpActiveRequest->mID, mpActiveRequest->mRequest.GetFrequency() ); } else { TRACE( "RescheduleActiveRequest(): req %lu removed\n", mpActiveRequest->mID ); // No, we are through with this request delete mpActiveRequest; } // There is no longer an active request mpActiveRequest = 0; } /*=========================================================================== METHOD: ProcessRequest (Internal Method) DESCRIPTION: Process a single outgoing protocol request, this consists of removing the request ID from the head of the schedule, looking up the internal request object in the request map, sending out the request, and setting up the response timer (if a response is required) SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: ===========================================================================*/ void cProtocolServer::ProcessRequest() { // Is there already an active request? if (mpActiveRequest != 0 || mpConnection == 0) { return; } // Grab request ID from the schedule std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); // Did we find the request? if (pScheduleIter == mRequestSchedule.end()) { // No return; } // Yes, grab the request ID ULONG reqID = pScheduleIter->second; // Remove from schedule mRequestSchedule.erase( pScheduleIter ); // Look up the internal request object std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); // Request not found around? if (pReqIter == mRequestMap.end() || pReqIter->second == 0) { // No return; } // Set this request as the active request mpActiveRequest = pReqIter->second; TRACE( "ProcessRequest(): req %lu started\n", mpActiveRequest->mID ); // Remove request from pending request map mRequestMap.erase( pReqIter ); // Extract the underlying request const sProtocolRequest & req = mpActiveRequest->mRequest; // Increment attempt count? if (req.GetRequests() != INFINITE_REQS) { // This request isn't an indefinite one, so keep track of each attempt mpActiveRequest->mAttempts++; } bool bTxSuccess = false; // Encode data for transmission? bool bEncoded = false; sSharedBuffer * pEncoded = 0; pEncoded = EncodeTxData( req.GetSharedBuffer(), bEncoded ); if (bEncoded == false) { // Note: no longer asynchronus // Send the request data bTxSuccess = mpConnection->TxData( req.GetBuffer(), req.GetSize() ); } else if (bEncoded == true) { if (pEncoded != 0 && pEncoded->IsValid() == true) { // Note: no longer asynchronus // Send the request data mpActiveRequest->mEncodedSize = pEncoded->GetSize(); bTxSuccess = mpConnection->TxData( pEncoded->GetBuffer(), pEncoded->GetSize() ); } } if (bTxSuccess == true) { TRACE( "ProcessRequest(): req %lu finished\n", mpActiveRequest->mID ); TxComplete(); } else { TxError(); TRACE( "ProcessRequest(): req finished with a TxError\n" ); } return; } /*=========================================================================== METHOD: CheckSystemTime (Internal Method) DESCRIPTION: Check that system time hasn't moved backwards. Since we use the system time for scheduling requests we need to periodically check that the user (or system itself) hasn't reset system time backwards, if it has then we reschedule everything to the current system time. This disrupts the schedule but avoids stranding requests Updates mLastTime SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool: System time moved backwards? ===========================================================================*/ bool cProtocolServer::CheckSystemTime() { // Assume that time is still marching forward bool bAdjust = false; timespec curTime = TimeIn( 0 ); if (curTime < mLastTime) { // Looks like the system clock has been adjusted to an earlier // value, go through the current schedule and adjust each timer // to reflect the adjustment. This isn't an exact approach but // it prevents requests from being stranded which is our goal // Note: set iterators are constant. This means we need to // create a set with the new data, we can't modify this one std::set < tSchedule, std::less > tempSchedule; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { tSchedule entry = *pScheduleIter; entry.first.tv_sec = curTime.tv_sec; entry.first.tv_nsec = curTime.tv_nsec; tempSchedule.insert( entry ); pScheduleIter++; } mRequestSchedule = tempSchedule; // Update mActiveRequestTimeout if ( (mpActiveRequest != 0) && (mpActiveRequest->mbWaitingForResponse == true) ) { // Restart active request's timeout ULONG mTimeout = mpActiveRequest->mRequest.GetTimeout(); mActiveRequestTimeout = TimeIn( mTimeout ); } TRACE( "Time has moved backwards, schedule updated\n" ); // Indicate the change bAdjust = true; } mLastTime.tv_sec = curTime.tv_sec; mLastTime.tv_nsec = curTime.tv_nsec; return bAdjust; } /*=========================================================================== METHOD: RxComplete (Internal Method) DESCRIPTION: Handle completion of receive data operation PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Number of bytes received SEQUENCING: This method is sequenced according to the schedule mutex i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxComplete( DWORD status, DWORD bytesReceived ) { if (status != NO_ERROR) { TRACE( "cProtocolServer::RxComplete() = %lu\n", status ); } if (mpConnection == 0) { TRACE( "cProtocolServer::RxComplete() - Not initialized\n" ); return; } // Error with the read if (status != NO_ERROR || bytesReceived == 0) { // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); return; } // Get Schedule Mutex if (GetScheduleMutex() == false) { TRACE( "RxComplete(), unable to get schedule Mutex\n" ); return; } TRACE( "RxComplete() - Entry at %llu\n", GetTickCount() ); // Decode data bool bAbortTx = false; ULONG rspIdx = INVALID_LOG_INDEX; bool bRsp = DecodeRxData( bytesReceived, rspIdx, bAbortTx ); // Is there an active request that needs to be aborted if (mpActiveRequest != 0 && bAbortTx == true) { // Yes, terminate the transmission and handle the error mpConnection->CancelTx(); TxError(); } // Is there an active request and a valid response? else if (mpActiveRequest != 0 && bRsp == true) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client that response was received if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_RECV, (DWORD)mpActiveRequest->mID, (DWORD)rspIdx ); } // Reschedule request as needed RescheduleActiveRequest(); } // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); TRACE( "RxComplete() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return; } return; } /*=========================================================================== METHOD: RxTimeout (Internal Method) DESCRIPTION: Handle the response timer expiring SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxTimeout() { // No active request? if (mpActiveRequest == 0) { TRACE( "RxTimeout() with no active request\n" ); ASSERT( 0 ); } TRACE( "RxTimeout() for req %lu\n", mpActiveRequest->mID ); const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)mpActiveRequest->mID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: TxComplete (Internal Method) DESCRIPTION: Handle completion of transmit data operation PARAMETERS: SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxComplete() { // No active request? if (mpActiveRequest == 0 || mpConnection == 0) { TRACE( "TxComplete() called with no active request\n" ); ASSERT( 0 ); } TRACE( "TxComplete() req %lu started\n", mpActiveRequest->mID ); ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client of auxiliary data being sent? if (mpActiveRequest->mRequiredAuxTxs && mpActiveRequest->mCurrentAuxTx) { pNotifier->Notify( ePROTOCOL_EVT_AUX_TU_SENT, (DWORD)reqID, (DWORD)mpActiveRequest->mEncodedSize ); } // Check for more auxiliary data to transmit if (mpActiveRequest->mCurrentAuxTx < mpActiveRequest->mRequiredAuxTxs) { ULONG auxDataSz = 0; const BYTE * pAuxData = req.GetAuxiliaryData( auxDataSz ); if (auxDataSz > 0 && pAuxData != 0) { bool bRC = false; // Adjust for current MTU pAuxData += (mpActiveRequest->mCurrentAuxTx * MAX_AUX_MTU_SIZE); mpActiveRequest->mCurrentAuxTx++; // Last MTU? if (mpActiveRequest->mCurrentAuxTx == mpActiveRequest->mRequiredAuxTxs) { // More than one MTU? if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = (auxDataSz % MAX_AUX_MTU_SIZE); if (auxDataSz == 0) { auxDataSz = MAX_AUX_MTU_SIZE; } } if (auxDataSz % MAX_PACKET_SIZE == 0) { // If last write of unframed write request is divisible // by 512, break off last byte and send seperatly. TRACE( "TxComplete() Special case, break off last byte\n" ); bRC = mpConnection->TxData( pAuxData, auxDataSz - 1 ); if (bRC == true) { bRC = mpConnection->TxData( pAuxData + auxDataSz -1, 1 ); } } else { bRC = mpConnection->TxData( pAuxData, auxDataSz ); } } else if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = MAX_AUX_MTU_SIZE; bRC = mpConnection->TxData( pAuxData, auxDataSz ); } if (bRC == true) { mpActiveRequest->mEncodedSize = auxDataSz; TxComplete(); } else { TxError(); } return; } } // Another successful transmission, add the buffer to the log ULONG reqIdx = INVALID_LOG_INDEX; sProtocolBuffer pb( req.GetSharedBuffer() ); reqIdx = mLog.AddBuffer( pb ); // Notify client? if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_SENT, (DWORD)reqID, (DWORD)reqIdx ); } // Wait for a response? if (mpActiveRequest->mRequest.IsTXOnly() == false) { // We now await the response mpActiveRequest->mbWaitingForResponse = true; mActiveRequestTimeout = TimeIn( mpActiveRequest->mRequest.GetTimeout() ); } else { // Reschedule request as needed RescheduleActiveRequest(); } } /*=========================================================================== METHOD: TxError (Internal Method) DESCRIPTION: Handle transmit data operation error be either rescheduling the request or cleaning it up SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxError() { // No active request? if (mpActiveRequest == 0) { return; } ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the protocol server by starting up the schedule thread SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Initialize() { // Assume failure bool bRC = false; mbExiting = false; // Get mScheduleMutex if (GetScheduleMutex() == true) { if (mScheduleThreadID == 0) { // Yes, start thread int nRet = pthread_create( &mScheduleThreadID, NULL, ScheduleThread, this ); if (nRet == 0) { // Success! bRC = true; } } } else { TRACE( "cProtocolServer::Initialize(), unable to aquire ScheduleMutex\n" ); return false; } // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit the protocol server by exiting the schedule thread (if necessary) SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Exit() { // Assume failure bool bRC = false; if (mScheduleThreadID != 0) { if (GetScheduleMutex() == false) { // This should never happen return false; } // Check that mScheduleTheadID is still not 0 if (mScheduleThreadID == 0) { printf( "mScheduleThreadID was zero!!!\n" ); ReleaseScheduleMutex( false ); return false; } // Set exit event mbExiting = true; // Signal a schedule update if (mThreadScheduleEvent.Set( 1 ) != 0) { // This should never happen return false; } TRACE( "Joining ScheduleThread %lu\n", mScheduleThreadID ); // Allow process to continue until it finishes int nRet = pthread_join( mScheduleThreadID, NULL ); if (nRet == ESRCH) { TRACE( "ScheduleThread has exited already\n" ); } else if (nRet != 0) { TRACE( "Unable to join ScheduleThread. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } TRACE( "cProtocolServer::Exit(), completed thread %lu\n", (ULONG)mScheduleThreadID ); bRC = true; // Release "handle" mScheduleThreadID = 0; // Release mutex lock, don't signal ScheduleThread if (ReleaseScheduleMutex( false ) == false) { // This should never happen return false; } } else { // No ScheduleThread bRC = true; } // Free any allocated requests std::map ::iterator pReqIter; pReqIter = mRequestMap.begin(); while (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } pReqIter++; } mRequestMap.clear(); // Free log mLog.Clear(); return bRC; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the given communications port PARAMETERS: pPort [ I ] - String pointer representing the device node to connect to (IE: /dev/qcqmi0) SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Connect( LPCSTR pPort ) { // Assume failure bool bRC = false; if (pPort == 0 || pPort[0] == 0 || mpConnection == 0) { return bRC; } // Connect to device // Set callback mRxCallback.SetServer( this ); // Override to initialize port with protocol specific options bRC = mpConnection->Connect( pPort ); if (bRC == true) { bRC = InitializeComm(); if (bRC == true) { // Setup the initial read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); } } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current communications port SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Disconnect() { // Disconnect if (mpConnection != 0) { // Cancel any outstanding I/O mpConnection->CancelIO(); } // Empty callback mRxCallback.SetServer( 0 ); // Cleanup COM port CleanupComm(); if (mpConnection != 0) { // Now disconnect bool bDis = mpConnection->Disconnect(); delete mpConnection; return bDis; } else { return true; } } /*=========================================================================== METHOD: IsConnected (Public Method) DESCRIPTION: Are we currently connected to a port? SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::IsConnected() { return (mpConnection != 0 && mpConnection->IsConnected()); } /*=========================================================================== METHOD: AddRequest (Public Method) DESCRIPTION: Add an outgoing protocol request to the protocol server request queue PARAMETERS: req [ I ] - Request being added SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: ULONG - ID of scheduled request (INVALID_REQUEST_ID upon error) ===========================================================================*/ ULONG cProtocolServer::AddRequest( const sProtocolRequest & req ) { // Assume failure ULONG reqID = INVALID_REQUEST_ID; // Server not configured for sending requests? if (IsValid( mTxType ) == false) { return reqID; } // Request type not valid for server? if (req.GetType() != mTxType) { return reqID; } // Invalide request? if (ValidateRequest( req ) == false) { return reqID; } // Get mScheduleMutex if (GetScheduleMutex() == true) { TRACE( "AddRequest() - Entry at %llu\n", GetTickCount() ); // Grab next available request ID if (++mLastRequestID == 0) { mLastRequestID++; } reqID = mLastRequestID; while (mRequestMap.find( reqID ) != mRequestMap.end()) { reqID++; } // Wrap in our internal structure sProtocolReqRsp * pReqRsp = 0; pReqRsp = new sProtocolReqRsp( req, reqID, MAX_AUX_MTU_SIZE ); if (pReqRsp != 0) { // Add to request map mRequestMap[reqID] = pReqRsp; // ... and schedule ScheduleRequest( reqID, req.GetSchedule() ); } TRACE( "AddRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return INVALID_REQUEST_ID; } } else { TRACE( "cProtocolServer::AddRequest(), unable to get schedule Mutex\n" ); } return reqID; } /*=========================================================================== METHOD: RemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes Note: If a request is being written, it cannot be inturrupted as both ProcessRequest and RemoveRequest depend on the ScheduleMutex and the write is synchronus. If the request has been written but the read has not been triggered it can be removed. PARAMETERS: reqID [ I ] - ID of request being removed RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::RemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Get Schedule Mutex if (GetScheduleMutex() == true) { TRACE( "RemoveRequest() - Entry at %llu\n", GetTickCount() ); bRC = HandleRemoveRequest( reqID ); TRACE( "RemoveRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } } else { TRACE( "cProtocolServer::RemoveRequest(), unable to get mScheduleMutex\n" ); } return bRC; } /*=========================================================================== METHOD: GetScheduleMutex (Internal Method) DESCRIPTION: Get the schedule mutex. Additionally a check is applied to verify the DEADLOCK_TIME was not exceeded SEQUENCING: This function will block until the mScheduleMutex is aquired PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::GetScheduleMutex() { ULONGLONG nStart = GetTickCount(); //TRACE( "Locking Schedule mutex\n" ); int nRet = pthread_mutex_lock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to lock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } ULONGLONG nEnd = GetTickCount(); if (nEnd - nStart > DEADLOCK_TIME) { TRACE( "Deadlock time exceeded: took %llu ms\n", nEnd - nStart ); ReleaseScheduleMutex( true ); return false; } //TRACE( "Locked ScheduleMutex\n" ); return true; } /*=========================================================================== METHOD: ReleaseScheduleMutex (Internal Method) DESCRIPTION: Release lock on the schedule mutex SEQUENCING: Calling process must have lock PARAMETERS: bSignalThread [ I ] - Signal Schedule thread as well? RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ReleaseScheduleMutex( bool bSignalThread ) { if (bSignalThread == true) { if (mThreadScheduleEvent.Set( 1 ) != 0) { return false; } } int nRet = pthread_mutex_unlock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to unlock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/ProtocolServer.h000066400000000000000000000263721455567757300243260ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.h DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Connection.h" #include "ProtocolRequest.h" #include "ProtocolLog.h" #include "Event.h" #include #include //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolServer; struct sServerControl; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID extern const ULONG INVALID_REQUEST_ID; // Fill timespec with the time it will be in specified milliseconds // Relative time to Absolute time timespec TimeIn( ULONG millis ); // Find the milliseconds from current time this timespec will occur // Absolute time to Relative time ULONG TimeFromNow( timespec time ); // Provide a number for sequencing reference, similar to the windows function ULONGLONG GetTickCount(); // timespec < comparison method inline bool operator< (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec < second.tv_nsec) ) ); } // timespec <= comparison method inline bool operator<= (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec <= second.tv_nsec) ) ); } /*=========================================================================*/ // Class cProtocolServerRxCallback /*=========================================================================*/ class cProtocolServerRxCallback { public: // (Inline) Constructor cProtocolServerRxCallback() : mpServer( 0 ) { }; // (Inline) Destructor virtual ~cProtocolServerRxCallback() { }; // (Inline) Set server object to pass results to void SetServer( cProtocolServer * pServer ) { mpServer = pServer; }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesReceived ); protected: /* Protocol server to interact with */ cProtocolServer * mpServer; }; /*=========================================================================*/ // Class cProtocolServer /*=========================================================================*/ class cProtocolServer { public: // Constructor cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cProtocolServer(); // Initialize the protocol server bool Initialize(); // Exit the protocol server bool Exit(); // Connect to the given communications port bool Connect( LPCSTR pPort ); // Disconnect from target bool Disconnect(); // Are we currently connected to a port? bool IsConnected(); // Add an outgoing protocol request to the protocol server request queue ULONG AddRequest( const sProtocolRequest & req ); // Remove a previously added protocol request bool RemoveRequest( ULONG reqID ); // (Inline) Return the protocol log const cProtocolLog & GetLog() { return mLog; }; protected: // Internal protocol server request/response structure, used to track // info related to sending out a request struct sProtocolReqRsp { public: // Constructor sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ); // Copy constructor sProtocolReqRsp( const sProtocolReqRsp & reqRsp ); // (Inline) Reset for next transmission attempt void Reset() { mEncodedSize = mRequest.GetSize(); mCurrentAuxTx = 0; mbWaitingForResponse = 0; }; /* Request ID */ ULONG mID; /* Number of times this request has been attempted */ ULONG mAttempts; /* Size of encoded data being transmitted */ ULONG mEncodedSize; /* Number of required auxiliary data transmissions */ ULONG mRequiredAuxTxs; /* Current auxiliary data transmission */ ULONG mCurrentAuxTx; /* Are we currently waiting for a response? */ bool mbWaitingForResponse; /* Underlying protocol request */ sProtocolRequest mRequest; }; // Handle the remove request bool HandleRemoveRequest( ULONG reqID ); // Schedule a request for transmission bool ScheduleRequest( ULONG reqID, ULONG schedule ); // (Inline) Get next request's time from mRequestSchedule timespec GetNextRequestTime() { timespec outTime; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); tSchedule entry = *pScheduleIter; outTime = entry.first; return outTime; } // (Inline) Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ) { return req.IsValid(); }; // Reschedule (or cleanup) the active request void RescheduleActiveRequest(); // Process a single outgoing protocol request void ProcessRequest(); // Check that system time hasn't moved backwards bool CheckSystemTime(); // Perform protocol specific communications port initialization virtual bool InitializeComm() = 0; // Perform protocol specific communications port cleanup virtual bool CleanupComm() = 0; // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) = 0; // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) = 0; // Handle completion of receive data operation void RxComplete( DWORD status, DWORD bytesReceived ); // Handle the response timer expiring void RxTimeout(); // Handle completion of transmit data operation virtual void TxComplete(); // Handle a transmission error void TxError(); /* Underlying communications object */ cConnection * mpConnection; /* Underlying connection type */ enum eConnectionType { eConnectionType_Begin = 0, eConnectionType_RmNet = 1, eConnectionType_SMD = 2, eConnectionType_End } mConnectionType; /* Rx callback */ cProtocolServerRxCallback mRxCallback; /* ID of Schedule thread */ pthread_t mScheduleThreadID; // ScheduleThread signal event cEvent mThreadScheduleEvent; // Schedule mutex // Ensures exclusive access to mRequestSchedule pthread_mutex_t mScheduleMutex; // Is the thread in the process of exiting? // (no new commands will be accepted) bool mbExiting; /* Client/server thread control object */ sSharedBuffer * mpServerControl; /* Protocol request schedule (scheduled time/request ID) */ typedef std::pair tSchedule; std::set < tSchedule, std::less > mRequestSchedule; /* Last system time value (used to check for time changes) */ timespec mLastTime; /* Protocol request map (request ID mapped to internal req/rsp struct) */ std::map mRequestMap; /* Last assigned request ID */ ULONG mLastRequestID; /* Current request being processed */ sProtocolReqRsp * mpActiveRequest; /* Absolute timeout for mpActiveRequest based on when write was completed */ timespec mActiveRequestTimeout; /* Data buffer for incoming data */ BYTE * mpRxBuffer; /* Size of above buffer (i.e. how much data to read in at once) */ ULONG mRxBufferSize; /* Protocol type for incoming/outgoing data*/ eProtocolType mRxType; eProtocolType mTxType; /* Protocol log */ cProtocolLog mLog; // Get a lock on ScheduleMutex bool GetScheduleMutex(); // Release lock on ScheduleMutex // Signal ScheduleThread if desired bool ReleaseScheduleMutex( bool bSignalThread = true ); // Schedule Thread gets full access friend void * ScheduleThread( PVOID pArg ); // Callback objects get full access friend class cProtocolServerRxCallback; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/QMIBuffers.cpp000066400000000000000000000234461455567757300236330ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.cpp DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQMIServiceBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQMIServiceBuffer (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::sQMIServiceBuffer( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQMIServiceBuffer::Validate(); } /*=========================================================================== METHOD: ~sQMIServiceBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::~sQMIServiceBuffer() { // Nothing to do } /*=========================================================================== METHOD: GetResult (Public Method) DESCRIPTION: Return contents of mandatory result content PARAMETERS: returnCode [ I ] - The return code (should be eQMIResultCode) errorCode [ I ] - The error code (should be eQMIErrorCode) RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::GetResult( ULONG & returnCode, ULONG & errorCode ) { if (IsResponse() == false) { return false; } std::map ::const_iterator pIter; pIter = mContents.find( QMI_TLV_ID_RESULT ); if (pIter == mContents.end()) { return false; } const sQMIRawContentHeader * pContent = pIter->second; if (pContent == 0) { ASSERT( 0 ); return false; } if (pContent->mLength != 4) { return false; } const WORD * pData = (const WORD *)(++pContent); returnCode = (ULONG)*pData++; errorCode = (ULONG)*pData; return true; } /*=========================================================================== METHOD: BuildBuffer (Static Public Method) DESCRIPTION: Build a QMI request PARAMETERS: serviceType [ I ] - QMI service type msgID [ I ] - The QMI message request ID bResponse [ I ] - Build a response? bIndication [ I ] - Build an indication? pPayload [ I ] - Payload payloadLen [ I ] - Size of above payload RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQMIServiceBuffer::BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse, bool bIndication, const BYTE * pPayload, ULONG payloadLen ) { const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG totalHdrSz = szTransHdr + szMsgHdr; // Truncate payload? if (payloadLen > (QMI_MAX_BUFFER_SIZE - totalHdrSz)) { payloadLen = QMI_MAX_BUFFER_SIZE - totalHdrSz; } // Make sure length agrees with pointer if (pPayload == 0) { payloadLen = 0; } // Allocate buffer PBYTE pBuffer = new BYTE[payloadLen + totalHdrSz]; if (pBuffer == 0) { return 0; } // Format header sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)&pBuffer[0]; pHdr->mCompound = 0; pHdr->mResponse = 0; pHdr->mIndication = 0; pHdr->mReserved = 0; pHdr->mTransactionID = 1; bool bTX = true; if (bResponse == true) { pHdr->mResponse = 1; bTX = false; } else if (bIndication == true) { pHdr->mIndication = 1; bTX = false; } pHdr++; // Format message header sQMIRawMessageHeader * pMsg = 0; pMsg = (sQMIRawMessageHeader *)pHdr; pMsg->mMessageID = msgID; pMsg->mLength = (WORD)payloadLen; // Copy in payload? if (payloadLen > 0 && pPayload != 0) { memcpy( (LPVOID)&pBuffer[totalHdrSz], (LPCVOID)&pPayload[0], (SIZE_T)payloadLen ); } // Compute total size ULONG sz = payloadLen + totalHdrSz; // Build and return the shared buffer eProtocolType pt = MapQMIServiceToProtocol( serviceType, bTX ); sSharedBuffer * pBuf = new sSharedBuffer( sz, pBuffer, pt ); return pBuf; } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (IsQMIProtocol( pt ) == false) { mbValid = bRC; return bRC; } const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szContentHdr = (ULONG)sizeof(sQMIRawContentHeader); // Must be enough space for both headers ULONG sz = GetSize(); if (sz < szTransHdr + szMsgHdr) { mbValid = bRC; return bRC; } const BYTE * pBuffer = GetBuffer(); // Obtain transaction header const sQMIServiceRawTransactionHeader * pTransHdr = 0; pTransHdr = (const sQMIServiceRawTransactionHeader *)pBuffer; pBuffer += szTransHdr; // This is required to be 0 if (pTransHdr->mCompound != 0) { mbValid = bRC; return bRC; } // These are mutually exclusive if (pTransHdr->mIndication == 1 && pTransHdr->mResponse == 1) { mbValid = bRC; return bRC; } // Requests/responses required valid transaction IDs if ( (pTransHdr->mIndication == 0) && (pTransHdr->mTransactionID == (WORD)INVALID_QMI_TRANSACTION_ID) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 1 || pTransHdr->mIndication == 1) && (IsQMIProtocolRX( pt ) == false) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 0 && pTransHdr->mIndication == 0) && (IsQMIProtocolTX( pt ) == false) ) { mbValid = bRC; return bRC; } // Obtain message header const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (const sQMIRawMessageHeader *)pBuffer; pBuffer += szMsgHdr; // Validate reported length if (sz != ((ULONG)pMsgHdr->mLength + szTransHdr + szMsgHdr)) { mbValid = bRC; return bRC; } // Extract content TLV structures ULONG contentProcessed = 0; ULONG contentSz = (ULONG)pMsgHdr->mLength; while (contentProcessed < contentSz) { const sQMIRawContentHeader * pContent = 0; pContent = (const sQMIRawContentHeader *)pBuffer; ULONG tlvLen = szContentHdr + pContent->mLength; contentProcessed += tlvLen; if (contentProcessed <= contentSz) { mContents[(ULONG)pContent->mTypeID] = pContent; } else { mContents.clear(); mbValid = bRC; return bRC; } pBuffer += tlvLen; } // Validate TLV reported lengths if (contentProcessed != contentSz) { mbValid = bRC; return bRC; } // Success! bRC = true; mbValid = bRC; return mbValid; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/QMIBuffers.h000066400000000000000000000275531455567757300233030ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.h DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMUXHeader sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIEnum.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QMI maximum buffer size (cannot be larger than MAX_SHARED_BUFFER_SIZE) const ULONG QMI_MAX_BUFFER_SIZE = MAX_SHARED_BUFFER_SIZE; // Content ID for mandatory result TLV const ULONG QMI_TLV_ID_RESULT = 2; /*=========================================================================== METHOD: MapQMIServiceToProtocol (Inline Method) DESCRIPTION: Map QMI service type (eQMIService) and direction to a protocol type (eProtocolType) PARAMETERS: serviceType [ I ] - Enum value being mapped bTransmission [ I ] - Is this a transmission (TX vs. RX)? RETURN VALUE: eProtocolType ===========================================================================*/ inline eProtocolType MapQMIServiceToProtocol( eQMIService serviceType, bool bTransmission = true ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid( serviceType ) == false) { return pt; } DWORD tmp = ((DWORD)serviceType * 2) + (DWORD)ePROTOCOL_QMI_CTL_RX; if (bTransmission == true) { tmp++; } if (IsQMIProtocol( (eProtocolType)tmp ) == true) { pt = (eProtocolType)tmp; } return pt; }; /*=========================================================================== METHOD: MapProtocolToQMIService (Inline Method) DESCRIPTION: Map protocol type (eProtocolType) to QMI service type (eQMIService) PARAMETERS: protocolType [ I ] - Enum value being mapped RETURN VALUE: bool ===========================================================================*/ inline eQMIService MapProtocolToQMIService( eProtocolType protocolType ) { eQMIService st = eQMI_SVC_ENUM_BEGIN; if (IsQMIProtocol( protocolType ) == false) { return st; } DWORD tmp = ((DWORD)protocolType - (DWORD)ePROTOCOL_QMI_CTL_RX) / 2; if (IsValid( (eQMIService)tmp ) == true) { st = (eQMIService)tmp; } return st; }; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQMUXHeader // Struct to represent a QMUX transaction header (raw) /*=========================================================================*/ struct sQMUXHeader { public: WORD mLength; BYTE mFlags; BYTE mServiceType; BYTE mClientID; }; /*=========================================================================*/ // Struct sQMIControlRawTransactionHeader // Struct to represent a QMI control transaction header (raw) /*=========================================================================*/ struct sQMIControlRawTransactionHeader { public: BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 6; BYTE mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIServiceRawTransactionHeader // Struct to represent a QMI service transaction header (raw) /*=========================================================================*/ struct sQMIServiceRawTransactionHeader { public: BYTE mCompound : 1; // Is this a compound transaction? BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 5; WORD mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIRawMessageHeader // Struct to represent a QMI (control/service) message header (raw) /*=========================================================================*/ struct sQMIRawMessageHeader { public: WORD mMessageID; // Message ID WORD mLength; // Length of message (not including this header) }; /*=========================================================================*/ // Struct sQMIRawContentHeader // Struct to represent a QMI (control/service) content // (i.e Type/Length/Value, TLV) header (raw) /*=========================================================================*/ struct sQMIRawContentHeader { public: BYTE mTypeID; // Content type ID WORD mLength; // Content length (not including this header) }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQMIServiceBuffer // Struct to represent a QMI service channel request/response/indication // (shared buffer) /*=========================================================================*/ struct sQMIServiceBuffer : public sProtocolBuffer { public: // Constructor sQMIServiceBuffer( sSharedBuffer * pBuffer ); // Destructor virtual ~sQMIServiceBuffer(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bRequest = (pHdr->mResponse == 0 && pHdr->mIndication == 0); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bResponse = (pHdr->mResponse == 1); } return bResponse; }; // (Inline) Is this an indication? bool IsIndication() const { bool bInd = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bInd = (pHdr->mIndication == 1); } return bInd; }; // (Inline) Return raw header const sQMIServiceRawTransactionHeader * GetHeader() const { const sQMIServiceRawTransactionHeader * pHdr = 0; if (IsValid() == true) { pHdr = (const sQMIServiceRawTransactionHeader *)GetBuffer(); } return pHdr; }; // (Inline) Return the message ID ULONG GetMessageID() const { ULONG id = (ULONG)0xffffffff; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; id = pMsgHdr->mMessageID; } return id; }; // (Inline) Return the transaction ID WORD GetTransactionID() const { WORD id = (WORD)INVALID_QMI_TRANSACTION_ID; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { id = pHdr->mTransactionID; } return id; }; // (Inline) Return raw content array const sQMIRawContentHeader * GetRawContents( ULONG & contentLen ) const { // Assume failure ULONG len = 0; const sQMIRawContentHeader * pRaw = 0; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; len = pMsgHdr->mLength; pMsgHdr++; if (len > 0) { pRaw = (const sQMIRawContentHeader *)pMsgHdr; } } contentLen = len; return pRaw; }; // (Inline) Return content structures std::map GetContents() const { return mContents; }; // Return contents of mandatory result content bool GetResult( ULONG & returnCode, ULONG & errorCode ); // Build a QMI request/response/indication static sSharedBuffer * BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse = false, bool bIndication = false, const BYTE * pData = 0, ULONG dataLen = 0 ); protected: // QMI protocol server has to be able to set the transaction ID friend class cQMIProtocolServer; // Set the transaction ID void SetTransactionID( WORD tid ) const { if (tid == (WORD)INVALID_QMI_TRANSACTION_ID || IsValid() == false) { return; } sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)GetHeader(); if (pHdr != 0) { pHdr->mTransactionID = tid; } }; // Is this QMI request/response/indication packet valid? virtual bool Validate(); /* Content TLV structures (indexed by type ID) */ std::map mContents; private: // Prevent 'upcopying' sQMIServiceBuffer( const sProtocolBuffer & ); sQMIServiceBuffer & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/QMIEnum.h000066400000000000000000002223161455567757300226050ustar00rootroot00000000000000/*=========================================================================== FILE: QMIEnum.h DESCRIPTION: QMI protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQMIService eQMIMessageCTL eQMIMessageWDS eQMIMessageDMS eQMIMessageNAS eQMIMessageWMS eQMIMessagePDS eQMIMessageAUTH eQMIMessageAT eQMIMessageVoice eQMIMessageUIM eQMIMessagePBM eQMIMessageSAR eQMIMessageRMTFS eQMIMessageCAT eQMIMessageRMS eQMIMessageOMA eQMIResultCode eQMIErrorCode eQMICallEndReason eIPAddressType eSMSMessageMode Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid QMI transaction ID const ULONG INVALID_QMI_TRANSACTION_ID = 0; // QMI DMS PRL size constants const ULONG QMI_DMS_MAX_PRL_SIZE = 16384; const ULONG QMI_DMS_MAX_PRL_BLOCK = 256; /*=========================================================================*/ // eQMIService Enumeration // QMI Service Type Enumeration /*=========================================================================*/ enum eQMIService { eQMI_SVC_ENUM_BEGIN = -1, eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_RESERVED_13, // 013 Reserved eQMI_SVC_RMTFS, // 014 Remote file system service eQMI_SVC_RESERVED_15, // 015 Reserved eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_RESERVED_18, // 018 Reserved eQMI_SVC_RESERVED_19, // 019 Reserved eQMI_SVC_CSD, // 020 Core sound driver service eQMI_SVC_EFS, // 021 Embedded file system service eQMI_SVC_RESERVED_22, // 022 Reserved eQMI_SVC_TS, // 023 Thermal sensors service eQMI_SVC_TMD, // 024 Thermal mitigation device service eQMI_SVC_RESERVED_25, // 025 Reserved eQMI_SVC_RESERVED_26, // 026 Reserved eQMI_SVC_RESERVED_27, // 027 Reserved eQMI_SVC_RESERVED_28, // 028 Reserved eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service eQMI_SVC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIService validity check PARAMETERS: svc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIService svc ) { bool retVal = false; if ( (svc > eQMI_SVC_ENUM_BEGIN && svc <= eQMI_SVC_RESERVED_28) || (svc >= eQMI_SVC_CAT && svc < eQMI_SVC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCTL Enumeration // QMI Control Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCTL { eQMI_CTL_ENUM_BEGIN = -1, eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode eQMI_CTL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCTL validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCTL msgID ) { bool retVal = false; if (msgID >= eQMI_CTL_SET_INSTANCE_ID && msgID < eQMI_CTL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDS Enumeration // QMI WDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDS { eQMI_WDS_ENUM_BEGIN = -1, eQMI_WDS_RESET, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_SET_INDICATION, // 003 Set indication conditions eQMI_WDS_START_NET = 32, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_AUTOCONNECT = 81, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_TMGI_ACTIVATE, // 101 Activate eMBMS TMGI eQMI_WDS_TMGI_ACT_IND = 101, // 101 eMBMS TMGI activate indication eQMI_WDS_TMGI_DEACTIVATE, // 102 Activate eMBMS TMGI eQMI_WDS_TMGI_DEACT_IND = 102, // 102 eMBMS TMGI activate indication eQMI_WDS_TMGI_LIST_QUERY, // 103 Query for eMBMS TMGI list eQMI_WDS_TMGI_LIST_IND, // 104 eMBMS TMGI list query indication eQMI_WDS_GET_PREF_DATA_SYS, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_GET_CURR_DATA_SYS, // 107 Get current data systems status eQMI_WDS_GET_PDN_THROTTLE, // 108 Get PDN throttle info eQMI_WDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDS msgID ) { bool retVal = false; if ( (msgID > eQMI_WDS_ENUM_BEGIN && msgID <= eQMI_WDS_SET_INDICATION) || (msgID >= eQMI_WDS_START_NET && msgID <= eQMI_WDS_GET_DORMANCY) || (msgID >= eQMI_WDS_GET_AUTOCONNECT && msgID <= eQMI_WDS_MODEM_INFO_IND) || (msgID >= eQMI_WDS_GET_ACTIVE_MIP && msgID <= eQMI_WDS_SET_IP_FAMILY) || (msgID >= eQMI_WDS_SET_AUTOCONNECT && msgID < eQMI_WDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageDMS Enumeration // QMI DMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageDMS { eQMI_DMS_ENUM_BEGIN = -1, eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageDMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageDMS msgID ) { bool retVal = false; if ( (msgID > eQMI_DMS_ENUM_BEGIN && msgID <= eQMI_DMS_EVENT_IND) || (msgID >= eQMI_DMS_GET_CAPS && msgID < eQMI_DMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageNAS Enumeration // QMI NAS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageNAS { eQMI_NAS_ENUM_BEGIN = -1, eQMI_NAS_RESET, // 000 Reset NAS service state variables eQMI_NAS_ABORT, // 001 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 002 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 002 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 003 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 032 Get the signal strength eQMI_NAS_SCAN_NETS, // 033 Scan for visible network eQMI_NAS_REGISTER_NET, // 034 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 035 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 036 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 036 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 037 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 038 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 039 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 040 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 041 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 042 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 043 Get the technology preference eQMI_NAS_GET_ACCOLC, // 044 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 045 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 046 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 047 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 048 Set various network parameters eQMI_NAS_GET_RF_INFO, // 049 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 050 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 051 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 052 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 052 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 055 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 056 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 056 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 057 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 058 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 059 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 060 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 061 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 062 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 063 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 064 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 065 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 066 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 067 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 068 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 069 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 070 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 071 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 072 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 073 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 075 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 076 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 077 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 078 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 079 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 080 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 081 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 082 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 083 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 084 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 085 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 086 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 087 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 088 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 089 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 090 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 091 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 092 Get dual standby preference eQMI_NAS_DETACH_LTE, // 093 Detach the current LTE system eQMI_NAS_BLOCK_LTE_PLMN, // 094 Block LTE PLMN eQMI_NAS_UNBLOCK_LTE_PLMN, // 095 Unblock LTE PLMN eQMI_NAS_RESET_LTE_PLMN_BLK, // 096 Reset LTE PLMN blocking eQMI_NAS_CUR_PLMN_NAME_IND, // 097 Current PLMN name indication eQMI_NAS_CONFIG_EMBMS, // 098 Configure eMBMS eQMI_NAS_GET_EMBMS_STATUS, // 099 Get eMBMS status eQMI_NAS_EMBMS_STATUS_IND, // 100 eMBMS status indication eQMI_NAS_GET_CDMA_POS_INFO, // 101 Get CDMA position info eQMI_NAS_RF_BAND_INFO_IND, // 102 RF band info indication eQMI_NAS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageNAS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageNAS msgID ) { bool retVal = false; if ( (msgID > eQMI_NAS_ENUM_BEGIN && msgID <= eQMI_NAS_SET_REG_EVENT) || (msgID >= eQMI_NAS_GET_RSSI && msgID <= eQMI_NAS_SYS_SELECT_IND) || (msgID >= eQMI_NAS_SET_DDTM_PREF && msgID <= eQMI_NAS_GET_MODE_PREF) || (msgID >= eQMI_NAS_SET_DSB_PREF && msgID < eQMI_NAS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWMS Enumeration // QMI WMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWMS { eQMI_WMS_ENUM_BEGIN = -1, eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWMS msgID ) { bool retVal = false; if ( (msgID > eQMI_WMS_ENUM_BEGIN && msgID <= eQMI_WMS_EVENT_IND) || (msgID >= eQMI_WMS_RAW_SEND && msgID <= eQMI_WMS_DELETE) || (msgID >= eQMI_WMS_GET_MSG_PROTOCOL && msgID < eQMI_WMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDS Enumeration // QMI PDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDS { eQMI_PDS_ENUM_BEGIN = -1, eQMI_PDS_RESET, // 00 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 01 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 01 PDS report indication eQMI_PDS_GET_STATE = 32, // 32 Return PDS service state eQMI_PDS_STATE_IND = 32, // 32 PDS service state indication eQMI_PDS_SET_STATE, // 33 Set PDS service state eQMI_PDS_START_SESSION, // 34 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 35 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 36 Manual tracking session position eQMI_PDS_END_SESSION, // 37 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 38 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 39 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 40 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 41 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 42 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 43 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 44 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 45 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 46 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 47 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 48 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 49 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 50 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 51 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 52 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 53 Request single position fix eQMI_PDS_GET_VERSION, // 54 Get PDS service version eQMI_PDS_INJECT_XTRA, // 55 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 56 Inject position data eQMI_PDS_INJECT_WIFI, // 57 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 58 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 59 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 60 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 61 Inject absolute time eQMI_PDS_INJECT_EFS, // 62 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 63 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 64 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 65 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 66 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 67 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 68 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 69 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 70 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 70 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 71 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 72 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 72 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 73 Force receiver off eQMI_PDS_GET_METHODS = 80, // 80 Get GPS position methods state eQMI_PDS_SET_METHODS, // 81 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 82 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 83 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 84 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 85 Set sensor config eQMI_PDS_GET_NAV_CFG, // 86 Get navigation config eQMI_PDS_SET_NAV_CFG, // 87 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 90 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 91 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 91 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 92 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 93 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 94 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 95 Set cell database control eQMI_PDS_READY_IND, // 96 Ready indication eQMI_PDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDS msgID ) { bool retVal = false; if ( (msgID > eQMI_PDS_ENUM_BEGIN && msgID <= eQMI_PDS_EVENT_IND) || (msgID >= eQMI_PDS_GET_STATE && msgID <= eQMI_PDS_FORCE_RECEIVER_OFF) || (msgID >= eQMI_PDS_GET_METHODS && msgID <= eQMI_PDS_SET_NAV_CFG) || (msgID >= eQMI_PDS_SET_WLAN_BLANK && msgID < eQMI_PDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAUTH Enumeration // QMI Authentication Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAUTH { eQMI_AUTH_ENUM_BEGIN = -1, eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND, // 38 AKA algorithm result indication eQMI_AUTH_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAUTH validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAUTH msgID ) { bool retVal = false; if (msgID >= eQMI_AUTH_START_EAP && msgID < eQMI_AUTH_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAT Enumeration // QMI AT Command Processor Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAT { eQMI_AT_ENUM_BEGIN = -1, eQMI_AT_RESET, // 00 Reset AT service state variables eQMI_AT_REG_COMMANDS = 32, // 32 Register AT commands to be forwarded eQMI_AT_COMMAND_IND, // 33 AT command indication eQMI_AT_SEND_RESPONSE, // 34 Send the response to an AT command eQMI_AT_ABORT_IND, // 35 AT command abort indication eQMI_AT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAT msgID ) { bool retVal = false; if ( (msgID == eQMI_AT_RESET) || (msgID >= eQMI_AT_REG_COMMANDS && msgID < eQMI_AT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageVoice Enumeration // QMI Voice Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageVoice { eQMI_VOICE_ENUM_BEGIN = -1, eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls eQMI_VOICE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageVoice validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageVoice msgID ) { bool retVal = false; if ( (msgID == eQMI_VOICE_INDICATION_REG) || (msgID >= eQMI_VOICE_CALL_ORIGINATE && msgID <= eQMI_VOICE_CALL_ANSWER) || (msgID >= eQMI_VOICE_GET_CALL_INFO && msgID <= eQMI_VOICE_GET_ALL_STATUS) || (msgID >= eQMI_VOICE_MANAGE_CALLS && msgID < eQMI_VOICE_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageUIM Enumeration // QMI UIM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageUIM { eQMI_UIM_ENUM_BEGIN = -1, eQMI_UIM_RESET, // 00 Reset eQMI_UIM_READ_TRANSPARENT = 32, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR eQMI_UIM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageUIM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageUIM msgID ) { bool retVal = false; if ( (msgID == eQMI_UIM_RESET) || (msgID >= eQMI_UIM_READ_TRANSPARENT && msgID < eQMI_UIM_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePBM Enumeration // QMI PBM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePBM { eQMI_PBM_ENUM_BEGIN = -1, eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePBM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePBM msgID ) { bool retVal = false; if (msgID >= eQMI_PBM_INDICATION_REG && msgID < eQMI_PBM_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageLOC Enumeration // QMI LOC Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageLOC { eQMI_LOC_ENUM_BEGIN = -1, eQMI_LOC_CLIENT_REVISION = 32, // 32 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 33 Register for events/indications eQMI_LOC_START, // 34 Start GPS session eQMI_LOC_STOP, // 35 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 36 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 37 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 38 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 39 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 40 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 41 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 42 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 43 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 44 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 45 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 46 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 47 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 48 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 49 Server connection req indication eQMI_LOC_GET_REV_REQ, // 50 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 50 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 51 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 51 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 52 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 52 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 53 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 53 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 54 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 54 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 55 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 55 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 56 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 56 Inject UTC time indication eQMI_LOC_INJECT_POS, // 57 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 57 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 58 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 58 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 59 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 59 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 60 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 60 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 61 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 61 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 62 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 62 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 63 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 63 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 64 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 64 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 65 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 65 Get low power mode config indication eQMI_LOC_SET_SERVER, // 66 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 66 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 67 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 67 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 68 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 68 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 69 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 69 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 70 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 70 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 71 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 71 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 72 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 72 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 73 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 73 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 74 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 74 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 75 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 75 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 76 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 76 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 77 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 77 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 78 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 78 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 79 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 79 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 80 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 80 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 81 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 81 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 82 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 82 Get external power config indication eQMI_LOC_INFORM_CONN, // 83 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 83 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 84 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 84 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 85 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 85 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 86 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 86 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 87 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 87 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 88 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 88 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 89 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 89 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 90 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 90 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 91 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 91 Get sensor performance control ind eQMI_LOC_INJ_SUPL_CERT, // 92 Inject SUPL certificate eQMI_LOC_INJ_SUPL_CERT_IND = 92, // 92 Inject SUPL certificate indication eQMI_LOC_DEL_SUPL_CERT, // 93 Delete SUPL certificate eQMI_LOC_DEL_SUPL_CERT_IND = 93, // 93 Delete SUPL certificate indication eQMI_LOC_SET_ENGINE_CFG, // 94 Set position engine config eQMI_LOC_SET_ENGINE_CFG_IND = 94,// 94 Set position engine config ind eQMI_LOC_GET_ENGINE_CFG, // 95 Get position engine config eQMI_LOC_GET_ENGINE_CFG_IND = 95,// 95 Get position engine config ind eQMI_LOC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageLOC validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageLOC msgID ) { bool retVal = false; if (msgID >= eQMI_LOC_CLIENT_REVISION && msgID < eQMI_LOC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageSAR Enumeration // QMI SAR Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageSAR { eQMI_SAR_ENUM_BEGIN = -1, eQMI_SAR_SET_RF_SAR_STATE = 1, // 01 Set the RF SAR state eQMI_SAR_GET_RF_SAR_STATE, // 02 Get the RF SAR state eQMI_SAR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageSAR validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageSAR msgID ) { bool retVal = false; if (msgID >= eQMI_SAR_SET_RF_SAR_STATE && msgID < eQMI_SAR_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMTFS Enumeration // QMI Remote Filesystem Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMTFS { eQMI_RMTFS_ENUM_BEGIN = -1, eQMI_RMTFS_OPEN = 1, // 01 Request an open eQMI_RMTFS_CLOSE, // 02 Request a close eQMI_RMTFS_IO_VECTOR, // 03 Request an I/O vector operation eQMI_RMTFS_ALLOC_BUFFER, // 04 Allocate a buffer eQMI_RMTFS_GET_DEV_ERROR, // 05 Return device error for last request eQMI_RMTFS_FORCE_SYNC_IND, // 06 Force sync indication eQMI_RMTFS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMTFS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMTFS msgID ) { bool retVal = false; if (msgID >= eQMI_RMTFS_OPEN && msgID < eQMI_RMTFS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCAT Enumeration // QMI CAT Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCAT { eQMI_CAT_ENUM_BEGIN = -1, eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCAT msgID ) { bool retVal = false; if ( (msgID > eQMI_CAT_ENUM_BEGIN && msgID <= eQMI_CAT_EVENT_IND) || (msgID >= eQMI_CAT_GET_STATE && msgID < eQMI_CAT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMS Enumeration // QMI RMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMS { eQMI_RMS_ENUM_BEGIN = -1, eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE, // 33 Set SMS wake settings eQMI_RMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMS msgID ) { bool retVal = false; if ( (msgID == eQMI_RMS_RESET) || (msgID >= eQMI_RMS_GET_SMS_WAKE && msgID < eQMI_RMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageOMA Enumeration // QMI OMA-DM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageOMA { eQMI_OMA_ENUM_BEGIN = -1, eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES, // 37 Set feature settings eQMI_OMA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageOMA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageOMA msgID ) { bool retVal = false; if ( (msgID > eQMI_OMA_ENUM_BEGIN && msgID <= eQMI_OMA_EVENT_IND) || (msgID >= eQMI_OMA_START_SESSION && msgID < eQMI_OMA_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIResultCode Enumeration // QMI Result Code Enumeration /*=========================================================================*/ enum eQMIResultCode { eQMI_RC_ENUM_BEGIN = -1, eQMI_RC_SUCCESS, // 00 Success eQMI_RC_ERROR, // 01 Error eQMI_RC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIResultCode validity check PARAMETERS: rc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIResultCode rc ) { bool retVal = false; if (rc > eQMI_RC_ENUM_BEGIN && rc < eQMI_RC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIErrorCode Enumeration // QMI Error Code Enumeration /*=========================================================================*/ enum eQMIErrorCode { eQMI_ERR_ENUM_BEGIN = -1, eQMI_ERR_NONE, // 00 eQMI_ERR_MALFORMED_MSG, // 01 eQMI_ERR_NO_MEMORY, // 02 eQMI_ERR_INTERNAL, // 03 eQMI_ERR_ABORTED, // 04 eQMI_ERR_CLIENT_IDS_EXHAUSTED, // 05 eQMI_ERR_UNABORTABLE_TRANSACTION, // 06 eQMI_ERR_INVALID_CLIENT_ID, // 07 eQMI_ERR_NO_THRESHOLDS, // 08 eQMI_ERR_INVALID_HANDLE, // 09 eQMI_ERR_INVALID_PROFILE, // 10 eQMI_ERR_INVALID_PIN_ID, // 11 eQMI_ERR_INCORRECT_PIN, // 12 eQMI_ERR_NO_NETWORK_FOUND, // 13 eQMI_ERR_CALL_FAILED, // 14 eQMI_ERR_OUT_OF_CALL, // 15 eQMI_ERR_NOT_PROVISIONED, // 16 eQMI_ERR_MISSING_ARG, // 17 eQMI_ERR_18, // 18 eQMI_ERR_ARG_TOO_LONG, // 19 eQMI_ERR_20, // 20 eQMI_ERR_21, // 21 eQMI_ERR_INVALID_TX_ID, // 22 eQMI_ERR_DEVICE_IN_USE, // 23 eQMI_ERR_OP_NETWORK_UNSUPPORTED, // 24 eQMI_ERR_OP_DEVICE_UNSUPPORTED, // 25 eQMI_ERR_NO_EFFECT, // 26 eQMI_ERR_NO_FREE_PROFILE, // 27 eQMI_ERR_INVALID_PDP_TYPE, // 28 eQMI_ERR_INVALID_TECH_PREF, // 29 eQMI_ERR_INVALID_PROFILE_TYPE, // 30 eQMI_ERR_INVALID_SERVICE_TYPE, // 31 eQMI_ERR_INVALID_REGISTER_ACTION, // 32 eQMI_ERR_INVALID_PS_ATTACH_ACTION, // 33 eQMI_ERR_AUTHENTICATION_FAILED, // 34 eQMI_ERR_PIN_BLOCKED, // 35 eQMI_ERR_PIN_ALWAYS_BLOCKED, // 36 eQMI_ERR_UIM_UNINITIALIZED, // 37 eQMI_ERR_MAX_QOS_REQUESTS_IN_USE, // 38 eQMI_ERR_INCORRECT_FLOW_FILTER, // 39 eQMI_ERR_NETWORK_QOS_UNAWARE, // 40 eQMI_ERR_INVALID_QOS_ID, // 41 eQMI_ERR_REQUESTED_NUM_UNSUPPORTED, // 42 eQMI_ERR_INTERFACE_NOT_FOUND, // 43 eQMI_ERR_FLOW_SUSPENDED, // 44 eQMI_ERR_INVALID_DATA_FORMAT, // 45 eQMI_ERR_GENERAL, // 46 eQMI_ERR_UNKNOWN, // 47 eQMI_ERR_INVALID_ARG, // 48 eQMI_ERR_INVALID_INDEX, // 49 eQMI_ERR_NO_ENTRY, // 50 eQMI_ERR_DEVICE_STORAGE_FULL, // 51 eQMI_ERR_DEVICE_NOT_READY, // 52 eQMI_ERR_NETWORK_NOT_READY, // 53 eQMI_ERR_WMS_CAUSE_CODE, // 54 eQMI_ERR_WMS_MESSAGE_NOT_SENT, // 55 eQMI_ERR_WMS_MESSAGE_DELIVERY_FAILURE, // 56 eQMI_ERR_WMS_INVALID_MESSAGE_ID, // 57 eQMI_ERR_WMS_ENCODING, // 58 eQMI_ERR_AUTHENTICATION_LOCK, // 59 eQMI_ERR_INVALID_TRANSITION, // 60 eQMI_ERR_61, // 61 eQMI_ERR_62, // 62 eQMI_ERR_63, // 63 eQMI_ERR_64, // 64 eQMI_ERR_SESSION_INACTIVE, // 65 eQMI_ERR_SESSION_INVALID, // 66 eQMI_ERR_SESSION_OWNERSHIP, // 67 eQMI_ERR_INSUFFICIENT_RESOURCES, // 68 eQMI_ERR_DISABLED, // 69 eQMI_ERR_INVALID_OPERATION, // 70 eQMI_ERR_INVALID_QMI_CMD, // 71 eQMI_ERR_WMS_TPDU_TYPE, // 72 eQMI_ERR_WMS_SMSC_ADDR, // 73 eQMI_ERR_INFO_UNAVAILABLE, // 74 eQMI_ERR_SEGMENT_TOO_LONG, // 75 eQMI_ERR_SEGMENT_ORDER, // 76 eQMI_ERR_BUNDLING_NOT_SUPPORTED, // 77 eQMI_ERR_78, // 78 eQMI_ERR_POLICY_MISMATCH, // 79 eQMI_ERR_SIM_FILE_NOT_FOUND, // 80 eQMI_ERR_EXTENDED_EXTERNAL, // 81 eQMI_ERR_ACCESS_DENIED, // 82 eQMI_ERR_HARDWARE_RESTRICTED, // 83 eQMI_ERR_ACK_NOT_SENT, // 84 eQMI_ERR_INCOMPATIBLE_STATE = 90, // 90 eQMI_ERR_FDN_RESTRICT, // 91 eQMI_ERR_SUPS_FAILURE_CAUSE, // 92 eQMI_ERR_NO_RADIO, // 93 eQMI_ERR_NOT_SUPPORTED, // 94 eQMI_ERR_CARD_CALL_CONTROL_FAILED = 96, // 96 eQMI_ERR_NETWORK_ABORTED, // 97 eQMI_ERR_CAT_EVT_REG_FAILED, // 61441 eQMI_ERR_CAT_INVALID_TR, // 61442 eQMI_ERR_CAT_INVALID_ENV_CMD, // 61443 eQMI_ERR_CAT_ENV_CMD_BUSY, // 61444 eQMI_ERR_CAT_ENV_CMD_FAIL, // 61445 eQMI_ERR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIErrorCode validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIErrorCode ec ) { bool retVal = false; if ( (ec > eQMI_ERR_ENUM_BEGIN && ec <= eQMI_ERR_ACK_NOT_SENT) || (ec >= eQMI_ERR_INCOMPATIBLE_STATE && ec <= eQMI_ERR_NOT_SUPPORTED) || (ec == eQMI_ERR_CARD_CALL_CONTROL_FAILED) || (ec == eQMI_ERR_NETWORK_ABORTED) || (ec >= eQMI_ERR_CAT_EVT_REG_FAILED && ec < eQMI_ERR_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMICallEndReason Enumeration // QMI Call End Reason Enumeration /*=========================================================================*/ enum eQMICallEndReason { eQMI_CALL_END_REASON_BEGIN = -1, // General eQMI_CALL_END_REASON_UNSPECIFIED = 1, // 1 eQMI_CALL_END_REASON_CLIENT_END, // 2 eQMI_CALL_END_REASON_NO_SRV, // 3 eQMI_CALL_END_REASON_FADE, // 4 eQMI_CALL_END_REASON_REL_NORMAL, // 5 eQMI_CALL_END_REASON_ACC_IN_PROG, // 6 eQMI_CALL_END_REASON_ACC_FAIL, // 7 eQMI_CALL_END_REASON_REDIR_OR_HANDOFF, // 8 eQMI_CALL_END_REASON_CLOSE_IN_PROGRESS, // 9 eQMI_CALL_END_REASON_AUTH_FAILED, // 10 eQMI_CALL_END_REASON_INTERNAL, // 11 // CDMA eQMI_CALL_END_REASON_CDMA_LOCK = 500, // 500 eQMI_CALL_END_REASON_INTERCEPT, // 501 eQMI_CALL_END_REASON_REORDER, // 502 eQMI_CALL_END_REASON_REL_SO_REJ, // 503 eQMI_CALL_END_REASON_INCOM_CALL, // 504 eQMI_CALL_END_REASON_ALERT_STOP, // 505 eQMI_CALL_END_REASON_ACTIVATION, // 506 eQMI_CALL_END_REASON_MAX_ACCESS_PROBE, // 507 eQMI_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS, // 508 eQMI_CALL_END_REASON_NO_RESPONSE_FROM_BS, // 509 eQMI_CALL_END_REASON_REJECTED_BY_BS, // 510 eQMI_CALL_END_REASON_INCOMPATIBLE, // 511 eQMI_CALL_END_REASON_ALREADY_IN_TC, // 512 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_GPS, // 513 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_SMS, // 514 eQMI_CALL_END_REASON_NO_CDMA_SRV, // 515 // GSM/WCDMA eQMI_CALL_END_REASON_CONF_FAILED = 1000, // 1000 eQMI_CALL_END_REASON_INCOM_REJ, // 1001 eQMI_CALL_END_REASON_NO_GW_SRV, // 1002 eQMI_CALL_END_REASON_NETWORK_END, // 1003 eQMI_CALL_END_REASON_LLC_SNDCP_FAILURE, // 1004 eQMI_CALL_END_REASON_INSUFFICIENT_RESOURCES, // 1005 eQMI_CALL_END_REASON_OPTION_TEMP_OOO, // 1006 eQMI_CALL_END_REASON_NSAPI_ALREADY_USED, // 1007 eQMI_CALL_END_REASON_REGULAR_DEACTIVATION, // 1008 eQMI_CALL_END_REASON_NETWORK_FAILURE, // 1009 eQMI_CALL_END_REASON_UMTS_REATTACH_REQ, // 1010 eQMI_CALL_END_REASON_UMTS_PROTOCOL_ERROR, // 1011 eQMI_CALL_END_REASON_OPERATOR_BARRING, // 1012 eQMI_CALL_END_REASON_UNKNOWN_APN, // 1013 eQMI_CALL_END_REASON_UNKNOWN_PDP, // 1014 eQMI_CALL_END_REASON_GGSN_REJECT, // 1015 eQMI_CALL_END_REASON_ACTIVATION_REJECT, // 1016 eQMI_CALL_END_REASON_OPTION_NOT_SUPPORTED, // 1017 eQMI_CALL_END_REASON_OPTION_UNSUBSCRIBED, // 1018 eQMI_CALL_END_REASON_QOS_NOT_ACCEPTED, // 1019 eQMI_CALL_END_REASON_TFT_SEMANTIC_ERROR, // 1020 eQMI_CALL_END_REASON_TFT_SYNTAX_ERROR, // 1021 eQMI_CALL_END_REASON_UNKNOWN_PDP_CONTEXT, // 1022 eQMI_CALL_END_REASON_FILTER_SEMANTIC_ERROR, // 1023 eQMI_CALL_END_REASON_FILTER_SYNTAX_ERROR, // 1024 eQMI_CALL_END_REASON_PDP_WITHOUT_ACTIVE_TFT, // 1025 eQMI_CALL_END_REASON_INVALID_TRANSACTION_ID, // 1026 eQMI_CALL_END_REASON_MESSAGE_SEMANTIC_ERROR, // 1027 eQMI_CALL_END_REASON_INVALID_MANDATORY_INFO, // 1028 eQMI_CALL_END_REASON_TYPE_UNSUPPORTED, // 1029 eQMI_CALL_END_REASON_MSG_TYPE_WRONG_FOR_STATE, // 1030 eQMI_CALL_END_REASON_UNKNOWN_INFO_ELEMENT, // 1031 eQMI_CALL_END_REASON_CONDITIONAL_IE_ERROR, // 1032 eQMI_CALL_END_REASON_MSG_WRONG_FOR_PROTOCOL, // 1033 eQMI_CALL_END_REASON_APN_TYPE_CONFLICT, // 1034 eQMI_CALL_END_REASON_NO_GPRS_CONTEXT, // 1035 eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED, // 1036 // CDMA 1xEV-DO (HDR) eQMI_CALL_END_REASON_CD_GEN_OR_BUSY = 1500, // 1500 eQMI_CALL_END_REASON_CD_BILL_OR_AUTH, // 1501 eQMI_CALL_END_REASON_CHG_HDR, // 1502 eQMI_CALL_END_REASON_EXIT_HDR, // 1503 eQMI_CALL_END_REASON_HDR_NO_SESSION , // 1504 eQMI_CALL_END_REASON_HDR_ORIG_DURING_GPS_FIX, // 1505 eQMI_CALL_END_REASON_HDR_CS_TIMEOUT , // 1506 eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM, // 1507 eQMI_CALL_END_REASON_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMICallEndReason validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMICallEndReason err ) { if ( (err >= eQMI_CALL_END_REASON_UNSPECIFIED) && (err <= eQMI_CALL_END_REASON_INTERNAL) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CDMA_LOCK) && (err <= eQMI_CALL_END_REASON_NO_CDMA_SRV) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CONF_FAILED) && (err <= eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CD_GEN_OR_BUSY) && (err <= eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM) ) { return true; } return false; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/QMIProtocolServer.cpp000066400000000000000000000270511455567757300252230ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.cpp DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIProtocolServer.h" #include "QMIBuffers.h" #include "Comm.h" #include "Socket.h" /*=========================================================================*/ // cQMIProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQMIProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: serviceType [ I ] - QMI service type requested bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( MapQMIServiceToProtocol( serviceType, false ), MapQMIServiceToProtocol( serviceType, true ), bufferSzRx, logSz ), mLastTID( (WORD)INVALID_QMI_TRANSACTION_ID ), mService( serviceType ) { // Nothing to do } /*=========================================================================== METHOD: ~cQMIProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::~cQMIProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the configured QMI service using the given QMI control file PARAMETERS: pControlFile [ I ] - QMI control file SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::Connect( LPCSTR pControlFile ) { // Assume failure bool bRC = false; if (IsValid( mService ) == false || mService == eQMI_SVC_CONTROL) { return bRC; } std::string name = pControlFile; if (name.find( "qcqmi" ) != std::string::npos) { mpConnection = new cComm(); mConnectionType = eConnectionType_RmNet; } else { // SMD if (name.find( "QMUXD:" ) == 0) { // Remove qualifier name = name.substr( 6 ); } mpConnection = new cSocket(); mConnectionType = eConnectionType_SMD; } // Pass service file to base class for actual connection bRC = cProtocolServer::Connect( name.c_str() ); if (bRC == false) { TRACE( "QMI connect %d failed\n", mService ); } return bRC; } /*=========================================================================== METHOD: ValidateRequest (Internal Method) DESCRIPTION: Validate a request that is about to be scheduled SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::ValidateRequest( const sProtocolRequest & req ) { if (cProtocolServer::ValidateRequest( req ) == false) { return false; } sQMIServiceBuffer qmiReq( req.GetSharedBuffer() ); return qmiReq.IsValid(); } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::InitializeComm() { bool bResult = false; if (mpConnection == 0) { return bResult; } if (mConnectionType == eConnectionType_RmNet) { // Setup the QMI Service type int result = mpConnection->SendCtl( QMI_GET_SERVICE_FILE_IOCTL, (void*)(unsigned long)mService ); bResult = (result == 0); } else if (mConnectionType == eConnectionType_SMD) { // Setup the QMI Service type int result = mpConnection->SendCtl( eQMUXD_MSG_ALLOC_QMI_CLIENT_ID, (void*)&mService ); bResult = (result == 0); } return bResult; } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::CleanupComm() { bool bResult = true; if (mpConnection != 0 && mConnectionType == eConnectionType_SMD) { // Delete the QMI client // NOTE: This is generally unnecessary, when you close the channel // it is deleted int result = mpConnection->SendCtl( eQMUXD_MSG_RELEASE_QMI_CLIENT_ID, 0 ); bResult = (result == 0); } // Nothing to actually do here return true; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into QMI indications/responses PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response (not used) bAbortTx [ O ] - Response aborts current transmission? (not used) SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cQMIProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; bAbortTx = false; // Something to decode from? if (bytesReceived == 0) { return bRC; } // Set protocol type (we have to be dealing with a valid QMI service) eProtocolType pt = MapQMIServiceToProtocol( mService, false ); if (pt == ePROTOCOL_ENUM_BEGIN) { return bRC; } sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxBuffer, bytesReceived, pt ); if (pTmp != 0) { sQMIServiceBuffer tmpBuf( pTmp ); if (tmpBuf.IsValid() == true) { rspIdx = mLog.AddBuffer( tmpBuf ); if (IsResponse( tmpBuf ) == true) { bRC = true; } else { rspIdx = INVALID_LOG_INDEX; } } } return bRC; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encode data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQMIProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { WORD tid = ++mLastTID; if (tid == (WORD)INVALID_QMI_TRANSACTION_ID) { tid++; } sQMIServiceBuffer tmpBuf( pBuffer ); tmpBuf.SetTransactionID( tid ); // No actual encoding required as we alter the original request bEncoded = false; return 0; }; /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } sQMIServiceBuffer qmiReq( mpActiveRequest->mRequest.GetSharedBuffer() ); sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiReq.IsValid() == false || qmiRsp.IsValid() == false) { return bRC; } if (qmiRsp.IsResponse() == false) { return bRC; } WORD reqID = qmiReq.GetTransactionID(); WORD rspID = qmiRsp.GetTransactionID(); if ( (reqID == (WORD)INVALID_QMI_TRANSACTION_ID) || (rspID == (WORD)INVALID_QMI_TRANSACTION_ID) || (reqID != rspID) ) { return bRC; } // Sadly there are documentated cases of firmware returning responses // with a matching transaction ID but a mismatching message ID. There // is no reason for this to be considered valid behavior as of yet ULONG reqMsgID = qmiReq.GetMessageID(); ULONG rspMsgID = qmiRsp.GetMessageID(); if (reqMsgID != rspMsgID) { return bRC; } bRC = true; return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/QMIProtocolServer.h000066400000000000000000000105201455567757300246610ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQMIProtocolServer /*=========================================================================*/ class cQMIProtocolServer : public cProtocolServer { public: // Constructor cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQMIProtocolServer(); // Connect to the given QMI service using the configured QMI // control file bool Connect( LPCSTR pControlFile ); // (Inline) Return the QMI service type eQMIService GetServiceType() { return mService; }; protected: // Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ); // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // (Inline) Is the passed in data a response that aborts the // current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & /* rsp */ ) { // QMI doesn't necessarily require this return false; }; /* Current transaction ID */ SHORT mLastTID; /* Type of QMI service we are serving */ eQMIService mService; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/SharedBuffer.cpp000066400000000000000000000242241455567757300242230ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.cpp DESCRIPTION: Shareable protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "SharedBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Synchronization object struct sSharedBufferSync { public: // Constructor sSharedBufferSync() : mbInitialized( false ) { int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to init sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } mbInitialized = true; }; // Destructor ~sSharedBufferSync() { mbInitialized = false; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); } }; // Lock sync object void Lock() { if (mbInitialized == true) { int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to lock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // Unlock sync object void Unlock() { if (mbInitialized == true) { int nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to unlock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; protected: /* DIAG buffer critical section */ pthread_mutex_t mSyncSection; /* Has this object been initialized? */ bool mbInitialized; }; // Global (across all shared buffers) reference count guard sSharedBufferSync gRefCount; /*=========================================================================*/ // sSharedBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (copy passed in buffer) PARAMETERS: pDataToCopy [ I ] - The data buffer to copy (should be non-zero) dataLen [ I ] - The length of the above buffer (should be > 1) dataType [ I ] - Type of data (not used internal to class) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, data actually exists? if (pDataToCopy != 0) { // Yes, try to allocate memory mpData = new BYTE[dataLen]; if (mpData != 0) { // Now copy into our allocation memcpy( (PVOID)mpData, (LPCVOID)pDataToCopy, (SIZE_T)dataLen ); // Now set the size, we do this last so that our double // deletion logic is only applied if we had an allocation // in the first place mSize = dataLen; } } } } /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (assume ownership of passed in buffer) PARAMETERS: dataLen [ I ] - The length of the above buffer (should be > 1) pDataToOwn [ I ] - The data buffer to assume ownership of (should be non-zero) dataType [ I ] - Type of data (not used internal to class) NOTE: The order is intentionally reversed from the previous constructor to avoid any cases of mistaken identity (copy versus assume ownership) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Data actually exists? if (pDataToOwn != 0) { // Yes, length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, assume ownership of the passed in buffer mpData = pDataToOwn; mSize = dataLen; } else { // This data buffer is not acceptable to us, but we have assumed // ownership of the memory which we will now free delete [] pDataToOwn; } } } /*=========================================================================== METHOD: ~sSharedBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sSharedBuffer::~sSharedBuffer() { ASSERT( mRefCount == 0 ); // Buffer data to free? if (mpData != 0) { // Yes, zero first byte for caution and then delete it mpData[0] = 0; delete [] mpData; // Even more caution, zero out pointer mpData = 0; } else if (mSize != 0) { ASSERT( (PVOID)("Double deletion detected in ~sSharedBuffer") == 0 ); } } /*=========================================================================== METHOD: operator == (Public Method) DESCRIPTION: Equality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator == ( const sSharedBuffer & refBuf ) const { // Assume they are not equal bool bEq = false; // The buffers must be the same if (mpData == refBuf.mpData) { if (mSize == refBuf.mSize) { if (mRefCount == refBuf.mRefCount) { if (mType == refBuf.mType) { // The shared buffers are the same bEq = true; } } else { // Very odd - the buffers are the same, but not the ref count?!? ASSERT( 0 ); } } else { // Very odd - the buffers are the same, but not the size?!? ASSERT( 0 ); } } return bEq; } /*=========================================================================== METHOD: operator != (Public Method) DESCRIPTION: Inequality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator != ( const sSharedBuffer & refBuf ) const { if (*this == refBuf) { return false; } return true; } /*=========================================================================== METHOD: AddRef (Internal Method) DESCRIPTION: Increment reference count RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::AddRef() { gRefCount.Lock(); mRefCount++; gRefCount.Unlock(); } /*=========================================================================== METHOD: Release (Internal Method) DESCRIPTION: Release reference, delete if reference count zero RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::Release() { gRefCount.Lock(); ASSERT( mRefCount != 0 ); // Decrement reference count if (mRefCount > 0) { mRefCount--; } // ... and delete if reference count now 0 if (mRefCount == 0) { delete this; } gRefCount.Unlock(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/SharedBuffer.h000066400000000000000000000127671455567757300237010ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.h DESCRIPTION: Shareable buffer structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- struct sProtocolBuffer; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum size of a shared buffer const ULONG MAX_SHARED_BUFFER_SIZE = 1024 * 16 + 256; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sSharedBuffer // // Simple struct to represent a reference counted shareable (no copy) // buffer, as the basis for all buffer related classes // // NOTE: Do *NOT* create instances of this structure on the stack, it // must be dynamically allocated in order to function correctly /*=========================================================================*/ struct sSharedBuffer { public: // Constructor (copy passed in buffer) sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ); // Constructor (assume ownership of passed in buffer) sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ); // Destructor virtual ~sSharedBuffer(); // Equality operator bool operator == ( const sSharedBuffer & ) const; // Inequality operator bool operator != ( const sSharedBuffer & ) const; // (Inline) Get buffer const BYTE * GetBuffer() const { return mpData; }; // (Inline) Get buffer size ULONG GetSize() const { return mSize; }; // (Inline) Get buffer type ULONG GetType() const { return mType; }; // (Inline) Is this buffer valid? bool IsValid() const { return (mpData != 0 && IsValidSize( mSize )); }; // (Inline) Get reference count ULONG GetRefCount() const { return mRefCount; }; // (Static Inline) Is the passed in size within the allowable range // a shared buffer? static bool IsValidSize( ULONG sz ) { return (sz > 0 && sz <= MAX_SHARED_BUFFER_SIZE); }; protected: // Add reference void AddRef(); // Release reference, delete if reference count zero void Release(); /* Data */ PBYTE mpData; /* Size of data */ ULONG mSize; /* Type of data */ ULONG mType; /* Reference count */ ULONG mRefCount; private: // Leave copy constructor and assignment operator unimplemented // to prevent unintentional and unauthorized copying of the object // (which would lead to bad reference counting) sSharedBuffer( const sSharedBuffer & ); sSharedBuffer & operator = ( const sSharedBuffer & ); friend struct sProtocolBuffer; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/Socket.cpp000066400000000000000000000507401455567757300231150ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.cpp DESCRIPTION: Implementation of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Socket.h" #include "ProtocolServer.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 // Size of the QMUXD command payload // GET_CLIENT_ID and RELEASE_CLIENT_ID must pass in a buffer of this size #define PAYLOAD_SIZE 664 /*=========================================================================*/ // struct sQMUXDHeader /*=========================================================================*/ #pragma pack( push, 1 ) struct sQMUXDHeader { /* Total size of header and following buffer */ int mTotalSize; /* QMUXD client ID */ int mQMUXDClientID; /* Message type */ eQMUXDMessageTypes mQMUXDMsgID; /* Duplicate of mQMUXDClientID */ int mQMUXDClientIDDuplicate; /* Transaction ID */ unsigned long mTxID; /* System error code */ int mSysErrCode; /* QMI error code (duplicate of TLV 0x02) */ int mQmiErrCode; /* SMD channel. 0 = SMD_DATA_5 */ int mQMUXDConectionType; /* QMI service ID */ int mQMUXServiceID; /* QMI client ID */ unsigned char mQMUXClientID; /* QMI flags */ unsigned char mRxFlags; /* In QMUXD this struct is not packed, so the compiler appends these two bytes */ unsigned short int mMissing2Bytes; }; #pragma pack( pop ) /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxSocketThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads to a socket PARAMETERS: pData [ I ] cSocket pointer RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxSocketThread( void * pData ) { cSocket * pSocket = (cSocket*)pData; if (pSocket == NULL || pSocket->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pSocket->mCommandPipe[READING], &inputSet ); int largestFD = pSocket->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait until we recieve a command or data is available status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pSocket->mCommandPipe[READING], &outputSet ) == true) { // Read command value from the pipe BYTE cmd; status = read( pSocket->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pSocket->mSocket, &inputSet ); largestFD = std::max( pSocket->mSocket, pSocket->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; } else { // EXIT_CMD or anything else pSocket->mpRxCallback = 0; break; } } else if (FD_ISSET( pSocket->mSocket, &outputSet ) == true) { // Stop watching for read data FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; // Perform a recv for the header sQMUXDHeader recvHdr; status = recv( pSocket->mSocket, &recvHdr, sizeof( recvHdr ), 0 ); if (status != sizeof( recvHdr )) { TRACE( "recv error, bad size %d\n", status ); break; } // Calculate and read the remaining data int remainder = recvHdr.mTotalSize - sizeof( recvHdr ); if (remainder > pSocket->mBuffSz) { TRACE( "read too large for buffer\n" ); break; } status = recv( pSocket->mSocket, pSocket->mpBuffer, remainder, 0 ); // Is this one of our IOCTLS or a standard message? if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_WRITE_QMI_SDU) { cIOCallback * pCallback = pSocket->mpRxCallback; pSocket->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } else { pSocket->mpRxCallback = 0; // Notify SendCtl() that control message completed if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { DWORD clientID; memcpy( &clientID, &pSocket->mpBuffer[0], 4 ); pSocket->mCtrlMsgComplete.Set( clientID ); } else { // Just set the event pSocket->mCtrlMsgComplete.Set( 0 ); } } } } return 0; }; /*=========================================================================*/ // cSocket Methods /*=========================================================================*/ /*=========================================================================== METHOD: cSocket (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cSocket::cSocket() : mSocket( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ), mCtrlMsgComplete(), mQMUXDClientID( 0 ), mQMUXClientID( 0 ), mQMUXServiceID( 0 ), mChannelID( -1 ), mQMUXDTxID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cSocket (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cSocket::~cSocket() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cSocket::IsValid() { // Nothing to do return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pChannel [ I ] - Channel number (IE: "0" = SMD_DATA_5 ) RETURN VALUE: bool ===========================================================================*/ bool cSocket::Connect( LPCSTR pChannel ) { if (IsValid() == false || pChannel == 0 || pChannel[0] == 0) { return false; } if (mSocket != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cSocket:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxSocketThread, this ); if (nRet != 0) { TRACE( "cSocket::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Create a socket mSocket = socket( AF_UNIX, SOCK_STREAM, 0 ); if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "unable to create socket %d\n", errno ); Disconnect(); return false; } struct sockaddr_un clientSockAddr; memset( &clientSockAddr, 0, sizeof( clientSockAddr ) ); clientSockAddr.sun_family = AF_UNIX; // Format the client path snprintf( &clientSockAddr.sun_path[0], sizeof( clientSockAddr.sun_path ), "/var/qmux_client_socket%7lu", (unsigned long)getpid() ); // Delete if it exists already unlink( clientSockAddr.sun_path ); // Bind to a client address nRet = bind( mSocket, (struct sockaddr *)&clientSockAddr, sizeof( sockaddr_un ) ); if (nRet == -1) { TRACE( "bad bind %d\n", errno ); Disconnect(); return false; } // Format the connection path struct sockaddr_un connectSockAddr; memset( &connectSockAddr, 0, sizeof( connectSockAddr ) ); connectSockAddr.sun_family = AF_UNIX; snprintf( &connectSockAddr.sun_path[0], sizeof( connectSockAddr.sun_path ), "/var/qmux_connect_socket" ); // Connect to server address nRet = connect( mSocket, (struct sockaddr *)&connectSockAddr, sizeof( sockaddr_un ) ); if (nRet < 0) { TRACE( "bad connect %d\n", errno ); Disconnect(); return false; } int clientID; nRet = recv( mSocket, &clientID, sizeof( clientID ), 0 ); if (nRet != sizeof( clientID )) { printf( "bad client ID %d\n", errno ); Disconnect(); return false; } // Save QMUXD Client ID mQMUXDClientID = clientID; // Save SMD channel mChannelID = strtol( pChannel, 0, 10 ); if (mChannelID == -1) { Disconnect(); return false; } // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Send a control message to the lower layer PARAMETERS: msgType [ I ] - eQMUXDMessageType pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - control message return value (0 for success) ===========================================================================*/ int cSocket::SendCtl( UINT msgType, void * pData ) { if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } BYTE msg[sizeof( sQMUXDHeader ) + PAYLOAD_SIZE]; memset( &msg[0], 0, sizeof( msg ) ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)&msg[0]; pHdr->mTotalSize = sizeof( msg ); pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = (eQMUXDMessageTypes)msgType; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; // The Payload BYTE * pPayload = &msg[sizeof( sQMUXDHeader )]; if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { memcpy( &mQMUXServiceID, pData, 4 ); memcpy( &pPayload[0], &mQMUXServiceID, 4 ); } else if (msgType == (int)eQMUXD_MSG_RELEASE_QMI_CLIENT_ID) { memcpy( &pPayload[0], &mQMUXServiceID, 4 ); memcpy( &pPayload[4], &mQMUXClientID, 4 ); } // Send the message int rc = send( mSocket, &msg[0], sizeof( msg ), 0 ); if (rc != sizeof( msg )) { TRACE( "bad write %d\n", rc ); return rc; } if (mpRxCallback == 0) { // No one is currently reading, need to trigger a read // so our data can be recieved RxData( &msg[0], sizeof( msg ), 0 ); } // Wait for the response (10s timeout) DWORD val; rc = mCtrlMsgComplete.Wait( 10000, val ); if (rc != 0) { TRACE( "bad SendCtl() wait %d\n", rc ); return rc; } if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { // Grab the client ID mQMUXClientID = val; } return 0; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cSocket::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mSocket != INVALID_HANDLE_VALUE) { close( mSocket ); mSocket = INVALID_HANDLE_VALUE; } // Double check mpRxCallback = 0; mCtrlMsgComplete.Clear(); mQMUXDClientID = 0; mQMUXClientID = 0; mQMUXServiceID = 0; mQMUXDTxID = 0; return bRC; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelIO() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelRx() { if (mSocket == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); mpRxCallback = 0; return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelTx() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cSocket::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to start reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cSocket::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // Format the header int totalSz = sizeof( sQMUXDHeader ) + bufSz; BYTE * pMsg = new BYTE[totalSz]; if (pMsg == 0) { TRACE( "unable to allocate buffer\n" ); return false; } memset( pMsg, 0, totalSz ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)pMsg; pHdr->mTotalSize = totalSz; pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = eQMUXD_MSG_WRITE_QMI_SDU; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; pHdr->mQMUXServiceID = mQMUXServiceID; pHdr->mQMUXClientID = mQMUXClientID; // The data payload memcpy( &pMsg[sizeof( sQMUXDHeader )], pBuf, bufSz ); // Send the message int nRet = send( mSocket, pMsg, totalSz, 0 ); delete [] pMsg; if (nRet != totalSz) { TRACE( "cSocket::TxData() write returned %d instead of %d\n", nRet, totalSz ); return false; } #ifdef DEBUG TRACE( "Write of %d bytes took %llu miliseconds\n", totalSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/Socket.h000066400000000000000000000116721455567757300225630ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.h DESCRIPTION: Declaration of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Enum eQMUXDMessageTypes // Types to be passed into SendCtl() for cSocket /*=========================================================================*/ enum eQMUXDMessageTypes { eQMUXD_MSG_WRITE_QMI_SDU = 0, eQMUXD_MSG_ALLOC_QMI_CLIENT_ID = 1, eQMUXD_MSG_RELEASE_QMI_CLIENT_ID = 2, }; /*=========================================================================*/ // Class cSocket /*=========================================================================*/ class cSocket : public cConnection { public: // Constructor cSocket(); // Destructor ~cSocket(); // Is this object valid? bool IsValid(); // Connect to the specified channel bool Connect( LPCSTR pChannel ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current channel ID int GetChannelID() const { return mChannelID; }; // Are we currently connected to a port? bool IsConnected() { return (mSocket != INVALID_HANDLE_VALUE); }; protected: /* Handle to socket */ int mSocket; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; /* Control message completion event */ cEvent mCtrlMsgComplete; /* QMUXD client ID */ int mQMUXDClientID; /* QMUX client and service IDs */ int mQMUXClientID; int mQMUXServiceID; /* SMD Channel ID. 0 = SMD_DATA_5 */ int mChannelID; /* The SMD transaction ID */ int mQMUXDTxID; // Rx thread is allowed complete access friend void * RxSocketThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/StdAfx.h000066400000000000000000000141751455567757300225250ustar00rootroot00000000000000/*=========================================================================== FILE: StdAfx.h DESCRIPTION: Application Framework eXtenstions for Linux PUBLIC CLASSES AND FUNCTIONS: Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Includes //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- // Macro defination //--------------------------------------------------------------------------- #define ASSERT( x ) assert( x ) #ifdef DEBUG #ifdef ANDROID #include // TRACE macro #define TRACE( format, arg... ) \ if (true) \ { \ __android_log_print( ANDROID_LOG_INFO, \ "Gobi", "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ); \ } #else #define TRACE( format, arg... ) \ printf( "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ) #endif #else #define TRACE(...) #endif //--------------------------------------------------------------------------- // data type defination //--------------------------------------------------------------------------- #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef CONST #define CONST const #endif typedef void VOID; typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef double DOUBLE; typedef int INT; typedef unsigned int UINT; typedef unsigned int * PUINT; typedef INT HANDLE; typedef HANDLE HMODULE; typedef char CHAR; typedef short SHORT; typedef long LONG; typedef unsigned long ULONG; typedef ULONG * PULONG; typedef ULONG * ULONG_PTR; typedef unsigned short USHORT; typedef USHORT * PUSHORT; typedef unsigned char UCHAR; typedef UCHAR * PUCHAR; typedef char * PSZ; typedef CONST CHAR * LPCSTR; typedef CHAR * LPSTR; typedef BYTE * PBYTE; typedef BOOL * PBOOL; typedef INT * PINT; typedef UINT * LPINT; typedef WORD * PWORD; typedef PWORD LPWORD; typedef LONG * LPLONG; typedef DWORD * PDWORD; typedef VOID * PVOID; typedef PVOID LPVOID; typedef const void * LPCVOID; typedef size_t SIZE_T; typedef double DATE; // Error code #define NO_ERROR 0L #define ERROR_SUCCESS 0L #define ERROR_NO_MORE_ITEMS 259L #define ERROR_CRC 23L #define ERROR_OUTOFMEMORY 14L #define ERROR_CAN_NOT_COMPLETE 1003L #define ERROR_REVISION_MISMATCH 1306L #define ERROR_BAD_ARGUMENTS 160L #define INVALID_SET_FILE_POINTER -1 #define VALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE -1 #define INVALID_FILE_SZ -1 #define ERROR_GEN_FAILURE 31L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_NOT_ENOUGH_MEMORY 8L #define ERROR_INVALID_PARAMETER 87L #define ERROR_BAD_FORMAT 11L // Other Constant definitions #define MAX_PATH 512 #define INFINITE 0xffffffff // SIOCIWFIRSTPRIV = 0x8BE0 // Device I/O control code for setting QMI service #define QMI_GET_SERVICE_FILE_IOCTL 0x8BE0 + 1 // Device I/O control code for obtaining device VIDPID #define QMI_GET_VIDPID_IOCTL 0x8BE0 + 2 // Device I/O control code for obtaining device MEID #define QMI_GET_MEID_IOCTL 0x8BE0 + 3 // Define the directions for pipes #define READING 0 #define WRITING 1 libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Core/SyncQueue.h000066400000000000000000000301061455567757300232450ustar00rootroot00000000000000/*=========================================================================== FILE: SyncQueue.h DESCRIPTION: Declaration/Implementation of cSyncQueue class PUBLIC CLASSES AND METHODS: cSyncQueue Synchronized shareable (across multiple threads) queue of structures with event notifications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cSyncQueue /*=========================================================================*/ template class cSyncQueue { public: // (Inline) Constructor cSyncQueue( ULONG maxElements, bool bSignalEvent = false ) : mSignature( (ULONG)eSYNC_QUEUE_SIG ), mSignalEvent(), mbSignalEvent( bSignalEvent ), mMaxElements( maxElements ), mTotalElements( 0 ) { // Create sync CS int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SyncQueue: Unable to init sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } }; // (Inline) Destructor ~cSyncQueue() { if (IsValid() == false) { ASSERT( (PVOID)"Double deletion detected in ~cSyncQueue" == 0 ); } else { EmptyQueue(); mSignature = 0; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // (Inline) Add an element to the queue bool AddElement( const tElementType & elem ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { // Yes, drop oldest element mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Add an element to the queue returning the index of // the element bool AddElement( const tElementType & elem, ULONG & idx ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); idx = mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Return given element in the queue bool GetElement( ULONG idx, tElementType & elem ) const { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Is this a current element index? ULONG expiredIndices = mTotalElements - (ULONG)mElementDeque.size(); if (idx >= expiredIndices) { // Yes, grab it from the deque idx -= expiredIndices; if (idx < (ULONG)mElementDeque.size()) { elem = mElementDeque[idx]; bRC = true; } } nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Empty element queue bool EmptyQueue() { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } mElementDeque.clear(); mTotalElements = 0; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } bRC = true; return bRC; }; // (Inline) Return the number of queued elements ULONG GetQueueCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = (ULONG)mElementDeque.size(); nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the total number of elements added to queue ULONG GetTotalCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = mTotalElements; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the signal event cEvent & GetSignalEvent() const { return mSignalEvent; }; // (Inline) Is this sync queue valid? bool IsValid() const { return (mSignature == (ULONG)eSYNC_QUEUE_SIG); }; protected: // Object signature enum eClassConstants { eSYNC_QUEUE_SIG = 0x1799A2BC }; /* Object signature */ ULONG mSignature; /* Multithreaded mutex type */ mutable pthread_mutex_t mSyncSection; /* Signal event, set everytime an element is added (if configured) */ mutable cEvent mSignalEvent; /* Use above signal event? */ bool mbSignalEvent; /* Maximum number of elements to add to the deque */ ULONG mMaxElements; /* Total number of elements added to the deque */ ULONG mTotalElements; /* Element queue */ std::deque mElementDeque; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/000077500000000000000000000000001455567757300236655ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000Translation.cpp000066400000000000000000000071151455567757300277770ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLV DESCRIPTION: Return the starting location and size of TLV buffer. NOTE: does not include the TLV header PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer type [ I ] - Type ID pOutLen [ O ] - Length of the output buffer ppOut [ O ] - Pointer to output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ) { if (pIn == 0 || pOutLen == 0 || ppOut == 0) { return eGOBI_ERR_INVALID_ARG; } for (ULONG offset = 0; offset + sizeof( sQMIRawContentHeader ) <= inLen; offset += sizeof( sQMIRawContentHeader )) { sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pIn + offset); // Is it big enough to contain this TLV? if (offset + sizeof( sQMIRawContentHeader ) + pHeader->mLength > inLen) { return eGOBI_ERR_MALFORMED_RSP; } if (pHeader->mTypeID == typeID) { *pOutLen = pHeader->mLength; *ppOut = pIn + offset + sizeof( sQMIRawContentHeader ); return eGOBI_ERR_NONE; } offset += pHeader->mLength; } // TLV not found return eGOBI_ERR_INVALID_RSP; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000Translation.h000066400000000000000000000654731455567757300274570ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.h DESCRIPTION: QUALCOMM Tanslation for Gobi 3000 Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include #include #include "GobiConnectionMgmtAPIStructs.h" //--------------------------------------------------------------------------- // Prototypes //--------------------------------------------------------------------------- // Get a TLV ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ); // WDS ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ); ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ); ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ); ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ); ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ); ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ); ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ); ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ); ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ); ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ); ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ); ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ); ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ); ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ); // NAS ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ); ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ); ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ); ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ); ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ); ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ); ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ); ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ); ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ); ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ); // DMS ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ); ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ); ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ); ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ); ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ); ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ); ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ); ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ); ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ); ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ); ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); // SMS ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ); ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ); ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ); ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ); ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ); ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ); ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ); ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ); ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ); // DMS UIM ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ); ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ); ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ); ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // PDS ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ); ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ); ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ); ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ); ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ); ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ); ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ); ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ); ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ); ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ); // CAT ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ); ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ); // RMS ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ); ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ); // OMADM ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ); ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ); ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ); ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ); ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ); ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ); // Voice ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationCAT.cpp000066400000000000000000000135341455567757300303310ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationCAT.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Card Application Toolkit Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackCATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATSendTerminalResponseRequest_TerminalResponseType * pTLVx01; pTLVx01 = (sCATSendTerminalResponseRequest_TerminalResponseType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mReferenceID = refID; pTLVx01->mTerminalResponseLength = (UINT16)dataLen; offset += sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackCATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || dataLen == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATEnvelopeCommandRequest_EnvelopeCommand * pTLVx01; pTLVx01 = (sCATEnvelopeCommandRequest_EnvelopeCommand*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mEnvelopeCommandType = (eQMICATEnvelopeCommandType)cmdID; pTLVx01->mEnvelopeLength = (UINT16)dataLen; offset += sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationDMS.cpp000066400000000000000000001200731455567757300303420ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationDMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { // Validate arguments if (pIn == 0 || pMaxTXChannelRate == 0 || pMaxRXChannelRate == 0 || pDataServiceCapability == 0 || pSimCapability == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxRadioIfaces = (ULONG)*pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; const sDMSGetDeviceCapabilitiesResponse_Capabilities * pTLVx01; ULONG structSzx01 = sizeof( sDMSGetDeviceCapabilitiesResponse_Capabilities ); ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < structSzx01) { return eGOBI_ERR_BUFFER_SZ; } // Populate the variables *pMaxTXChannelRate = pTLVx01->mMaxTXRatebps; *pMaxRXChannelRate = pTLVx01->mMaxRXRatebps; *pDataServiceCapability = pTLVx01->mDataServiceCapability; // SIM capability should be treated as a boolean, even though it's not *pSimCapability = (pTLVx01->mSIMSupported == 0 ? 0 : 1); ULONG activeRadioIfaces = pTLVx01->mRadioInterfaceCount; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMIDMSRadioInterfaces * pInRadioInterfaces; // Verify there is room for the array in the TLV if (outLenx01 < structSzx01 + sizeof( eQMIDMSRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRadioInterfaces = (const eQMIDMSRadioInterfaces *) ((const BYTE *)pTLVx01 + structSzx01); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pInRadioInterfaces; pOutRadioIfaces++; pInRadioInterfaces++; } *pRadioIfacesSize = activeRadioIfaces; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the manufacturer // sDMSGetDeviceManfacturerResponse_Manfacturer only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the model // sDMSGetDeviceModelResponse_Model only contains the model const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the PRI revision // sDMSGetDeviceRevisionResponse_UQCNRevision only contains this const CHAR * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx11, outLenx11 ); pString[outLenx11] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { // Validate arguments if (pIn == 0 || amssSize == 0 || pAMSSString == 0 || bootSize == 0 || pBootString == 0 || priSize == 0 || pPRIString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pAMSSString = 0; *pBootString = 0; *pPRIString = 0; // Find the AMSS version // sDMSGetDeviceRevisionResponse_Revision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (amssSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAMSSString, pTLVx01, outLenx01 ); pAMSSString[outLenx01] = 0; // Find the Boot version // sDMSGetDeviceRevisionResponse_BootCodeRevision only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (bootSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pBootString, pTLVx10, outLenx10 ); pBootString[outLenx10] = 0; // The PRI version is returned by ParseGetFirmwareRevision() rc = ParseGetFirmwareRevision( inLen, pIn, priSize, pPRIString ); if (rc != eGOBI_ERR_NONE) { return rc; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { // Validate arguments if (pIn == 0 || voiceNumberSize == 0 || pVoiceNumber == 0 || minSize == 0 || pMIN == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pVoiceNumber = 0; *pMIN = 0; // Find the Voice number // sDMSGetDeviceVoiceNumberResponse_VoiceNumber only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (voiceNumberSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pVoiceNumber, pTLVx01, outLenx01 ); pVoiceNumber[outLenx01] = 0; // Find the Mobile ID (optional) // sDMSGetDeviceVoiceNumberResponse_MobileIDNumber only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Space to perform the copy? if (minSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMIN, pTLVx10, outLenx10 ); pMIN[outLenx10] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the IMSI // sDMSGetDeviceVoiceNumberResponse_IMSI only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { // Validate arguments if (pIn == 0 || esnSize == 0 || pESNString == 0 || imeiSize == 0 || pIMEIString == 0 || meidSize == 0 || pMEIDString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pESNString = 0; *pIMEIString = 0; *pMEIDString = 0; // Find the ESN // sDMSGetDeviceSerialNumbersResponse_ESN only contains this const CHAR * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (esnSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pESNString, pTLVx10, outLenx10 ); pESNString[outLenx10] = 0; // Find the IMEI // sDMSGetDeviceSerialNumbersResponse_IMEI only contains this const CHAR * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (imeiSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pIMEIString, pTLVx11, outLenx11 ); pIMEIString[outLenx11] = 0; // Find the MEID // sDMSGetDeviceSerialNumbersResponse_MEID only contains this const CHAR * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (meidSize < outLenx12 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMEIDString, pTLVx12, outLenx12 ); pMEIDString[outLenx12] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string thePIN( pCurrentPIN ); if (thePIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (thePIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockStateRequest_LockState ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockStateRequest_LockState * pTLVx01; pTLVx01 = (sDMSSetLockStateRequest_LockState*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mLockState = (eQMIDMSLockStates)state; memcpy( &pTLVx01->mLockCode[0], thePIN.c_str(), thePIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseQueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetLockStateResponse_LockState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetLockStateResponse_LockState )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mLockState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pCurrentPIN [ I ] - Current four digit PIN string pDesiredPIN [ I ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0 || pDesiredPIN == 0 || pDesiredPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string theCurPIN( pCurrentPIN ); if (theCurPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theCurPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } std::string theNewPIN( pDesiredPIN ); if (theNewPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theNewPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockCodeRequest_LockCode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockCodeRequest_LockCode * pTLVx01; pTLVx01 = (sDMSSetLockCodeRequest_LockCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mCurrentLockCode[0], theCurPIN.c_str(), theCurPIN.size() ); memcpy( &pTLVx01->mNewLockCode[0], theNewPIN.c_str(), theNewPIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the hardware revision // sDMSGetHardwareRevisionResponse_HardwareRevision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ) { // Validate arguments if (pIn == 0 || pPRLVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetPRLVersionResponse_PRLVersion * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetPRLVersionResponse_PRLVersion )) { return eGOBI_ERR_MALFORMED_RSP; } *pPRLVersion = pTLVx01->mPRLVersion; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ) { // Validate arguments if (pIn == 0 || pFileSize == 0 || *pFileSize == 0 || pFile == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure ULONG maxFileSize = *pFileSize; *pFileSize = 0; // Find the state const sDMSReadERIDataResponse_UserData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG fileSz = pTLVx01->mDataLength; const BYTE * pInFile; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData ) + sizeof( BYTE ) * fileSz) { return eGOBI_ERR_MALFORMED_RSP; } // Space to copy into? if (fileSz > maxFileSize) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pInFile = (const BYTE *)pTLVx01 + sizeof( sDMSReadERIDataResponse_UserData ); // Perform the copy memcpy( pFile, pInFile, fileSz ); *pFileSize = fileSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ) { // Validate arguments if (pOut == 0 || pActivationCode == 0 || pActivationCode[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string ac( pActivationCode ); if (ac.size() > 12) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSActivateAutomaticRequest_ActivationCode ) + (WORD)ac.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSActivateAutomaticRequest_ActivationCode * pTLVx01; pTLVx01 = (sDMSActivateAutomaticRequest_ActivationCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mCodeLength = (UINT8)ac.size(); memcpy( (BYTE *)pTLVx01 + sizeof( sDMSActivateAutomaticRequest_ActivationCode ), ac.c_str(), ac.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults CHANGES: * The client must manually reset the device after this request completes using DMSSetOperatingMode() PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSResetFactoryDefaultsRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSResetFactoryDefaultsRequest_SPC * pTLVx01; pTLVx01 = (sDMSResetFactoryDefaultsRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ) { // Validate arguments if (pIn == 0 || pActivationState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetActivationStateResponse_ActivationState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetActivationStateResponse_ActivationState )) { return eGOBI_ERR_MALFORMED_RSP; } *pActivationState = pTLVx01->mActivationState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetOperatingModeRequest_OperatingMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Set the mode sDMSSetOperatingModeRequest_OperatingMode * pTLVx01; pTLVx01 = (sDMSSetOperatingModeRequest_OperatingMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mOperatingMode = (eQMIDMSOperatingModes)powerMode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ) { // Validate arguments if (pIn == 0 || pPowerMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = 0xffffffff; // Find the mode const sDMSGetOperatingModeResponse_OperatingMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetOperatingModeResponse_OperatingMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pPowerMode = pTLVx01->mOperatingMode; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pIn == 0 || pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pReasonMask = 0; *pbPlatform = 0; // Find the reason mask (optional) const sDMSGetOperatingModeResponse_OfflineReason * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sDMSGetOperatingModeResponse_OfflineReason )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the bitmask to pReasonMask *pReasonMask = *(WORD*)pTLVx10; } // Find the platform restriction (optional) const sDMSGetOperatingModeResponse_PlatformRestricted * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sDMSGetOperatingModeResponse_PlatformRestricted )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the value *pbPlatform = pTLVx11->mPlatformRestricted; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTimeCount [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ) { // Validate arguments if (pIn == 0 || pTimeCount == 0 || pTimeSource == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the reason mask const sDMSGetTimestampResponse_Timestamp * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetTimestampResponse_Timestamp )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pTimeCount = pTLVx01->mTimestamp; // mSource is of type eQMIDMSTimestampSources *pTimeSource = pTLVx01->mSource; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSValidateSPCRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSValidateSPCRequest_SPC * pTLVx01; pTLVx01 = (sDMSValidateSPCRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationNAS.cpp000066400000000000000000001621541455567757300303460ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationNAS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (NAS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" // Maximum length for a scanned network description const ULONG MAX_SNI_DESCRIPTION_LEN = 255; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sEVDOCustomSCPConfig // Struct to represent CDMA 1xEV-DO custom SCP config /*=========================================================================*/ struct sEVDOCustomSCPConfig { public: BYTE mbActive; ULONG mProtocolMask; ULONG mBroadcastMask; ULONG mApplicationMask; }; /*=========================================================================*/ // Struct sScannedNetworkInfo // Struct to represent scanned network information /*=========================================================================*/ struct sScannedNetworkInfo { public: USHORT mMCC; USHORT mMNC; ULONG mInUse; ULONG mRoaming; ULONG mForbidden; ULONG mPreferred; CHAR mDescription[MAX_SNI_DESCRIPTION_LEN]; }; /*=========================================================================*/ // Struct sScannedNetworkRATInfo // Struct to represent scanned network RAT information /*=========================================================================*/ struct sScannedNetworkRATInfo { public: USHORT mMCC; USHORT mMNC; ULONG mRAT; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: ParseGetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ) { // Validate arguments if (pIn == 0 || pStatus == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sNASGetANAAAAuthenticationStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetANAAAAuthenticationStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pStatus = pTLVx01->mANAAAAuthenticationStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSignalStrength DESCRIPTION: This function gets the current signal strength (in dBm) as measured by the device, the signal strength returned will be one of the currently available technologies with preference CDMA 1xEV-DO, CDMA, AMPS, WCDMA, GSM PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSignalStrength [ O ] - Received signal strength (dBm) pRadioInterface [ O ] - Radio interface technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ) { // Validate arguments if (pSignalStrength == 0 || pRadioInterface == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG sigSz = 12; INT8 sigs[12]; ULONG radios[12]; ULONG qcErr = ParseGetSignalStrengths( inLen, pIn, &sigSz, &sigs[0], &radios[0] ); if (qcErr != eGOBI_ERR_NONE) { return qcErr; } std::map sigMap; for (ULONG s = 0; s < sigSz; s++) { sigMap[radios[s]] = sigs[s]; } std::map ::const_iterator pIter; // HDR? pIter = sigMap.find( 2 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // CDMA? pIter = sigMap.find( 1 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // AMPS? pIter = sigMap.find( 3 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // WCDMA? pIter = sigMap.find( 5 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // GSM? pIter = sigMap.find( 4 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // Error values *pSignalStrength = -128; *pRadioInterface = 0; return eGOBI_ERR_NO_SIGNAL; } /*=========================================================================== METHOD: ParseGetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { // Validate arguments if (pIn == 0 || pArraySizes == 0 || *pArraySizes == 0 || pSignalStrengths == 0 || pRadioInterfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSignals = (ULONG)*pArraySizes; // Assume failure *pArraySizes = 0; // Find the first signal strength value const sNASGetSignalStrengthResponse_SignalStrength * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetSignalStrengthResponse_SignalStrength )) { return eGOBI_ERR_MALFORMED_RSP; } // Weed out bogus values std::map sigMap; INT8 sigVal = pTLVx01->mSignalStrengthdBm; ULONG radioVal = pTLVx01->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Handle list, if present const sNASGetSignalStrengthResponse_SignalStrengthList * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG auxSigs = pTLVx10->mNumberOfInfoInstances; if (auxSigs > maxSignals) { auxSigs = maxSignals; } const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo * pInfo; // Verify there is room for the array in the TLV if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList ) + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList::sInfo ) * auxSigs) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInfo = (const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )); for (ULONG s = 0; s < auxSigs; s++) { sigVal = pInfo->mSignalStrengthdBm; radioVal = pInfo->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Move pInfo forward one element pInfo++; } } ULONG sigCount = 0; std::map ::const_iterator pIter; for (pIter = sigMap.begin(); pIter != sigMap.end(); pIter++, sigCount++) { if (sigCount < maxSignals) { pSignalStrengths[sigCount] = pIter->second; pRadioInterfaces[sigCount] = pIter->first; *pArraySizes = sigCount + 1; } } // No valid signals? if (sigCount == 0) { return eGOBI_ERR_NO_SIGNAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetRFInfo DESCRIPTION: This function gets the current RF information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pInstanceSize; *pInstanceSize = 0; // Find the TLV const sNASGetRFInfoResponse_RFInfo * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE ifaceCount = pTLVx01->mNumberOfInstances; if (ifaceCount > maxInstances) { ifaceCount = maxInstances; } const sNASGetRFInfoResponse_RFInfo::sInstance * pInstance; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo ) + sizeof( sNASGetRFInfoResponse_RFInfo::sInstance ) * ifaceCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInstance = (const sNASGetRFInfoResponse_RFInfo::sInstance *) ((const BYTE *)pTLVx01 + sizeof( sNASGetRFInfoResponse_RFInfo )); ULONG * pOutput = (ULONG *)pInstances; for (BYTE i = 0; i < ifaceCount; i++) { *pOutput++ = pInstance->mRadioInterface; *pOutput++ = pInstance->mActiveBandClass; *pOutput++ = pInstance->mActiveChannel; // Move pInstance forward one element pInstance++; } *pInstanceSize = ifaceCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; // Assume failure *pInstanceSize = 0; // Find the TLV const sNASPerformNetworkScanResponse_NetworkInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sNASPerformNetworkScanResponse_NetworkInfo )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 netCount = pTLVx10->mNumberOfInfoInstances; if (netCount > maxInstances) { netCount = maxInstances; } const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo * pNetInfo; // Align to the first array element pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASPerformNetworkScanResponse_NetworkInfo )); ULONG offset = sizeof( sNASPerformNetworkScanResponse_NetworkInfo ); sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } pNet->mMCC = pNetInfo->mMobileCountryCode; pNet->mMNC = pNetInfo->mMobileNetworkCode; pNet->mInUse = pNetInfo->mInUseStatus; pNet->mRoaming = pNetInfo->mRoamingStatus; pNet->mForbidden = pNetInfo->mForbiddenStatus; pNet->mPreferred = pNetInfo->mPreferredStatus; memset( &pNet->mDescription[0], 0, MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pNetInfo->mDescriptionLength; if (descLen > 0) { // Move pNetInfo forward pNetInfo++; offset += sizeof( sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo ); // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } std::string netDesc( (LPCSTR)pNetInfo ); ULONG actualLen = (ULONG)netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } LPCSTR pNetDesc = netDesc.c_str(); memcpy( &pNet->mDescription[0], pNetDesc, actualLen ); // Move pNetInfo past string pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pNetInfo + descLen); offset += descLen; } pNet++; } *pInstanceSize = (BYTE)netCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0 || pRATSize == 0 || *pRATSize == 0 || pRATInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRATInstances = *pRATSize; // Assume failure *pInstanceSize = 0; *pRATSize = 0; // First, generate the instances using ParsePerformNetworkScan ULONG rc = ParsePerformNetworkScan( inLen, pIn, pInstanceSize, pInstances ); if (rc != eGOBI_ERR_NONE) { return rc; } // Now find the RAT info too // Find the TLV const sNASPerformNetworkScanResponse_NetworkRAT * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 ratCount = pTLVx11->mNumberOfInfoInstances; if (ratCount > maxRATInstances) { ratCount = maxRATInstances; } const sNASPerformNetworkScanResponse_NetworkRAT::sInfo * pRatInfo; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT ) + sizeof( sNASPerformNetworkScanResponse_NetworkRAT::sInfo ) * ratCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRatInfo = (const sNASPerformNetworkScanResponse_NetworkRAT::sInfo *) ((const BYTE *)pTLVx11 + sizeof( sNASPerformNetworkScanResponse_NetworkRAT )); sScannedNetworkRATInfo * pRAT = (sScannedNetworkRATInfo *)pRATInstances; for (BYTE r = 0; r < ratCount; r++) { pRAT->mMCC = pRatInfo->mMobileCountryCode; pRAT->mMNC = pRatInfo->mMobileNetworkCode; pRAT->mRAT = pRatInfo->mRadioAccessTechnology; pRAT++; pRatInfo++; } *pRATSize = (BYTE)ratCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the action // Check size WORD tlvx01Sz = sizeof( sNASInitiateNetworkRegisterRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_Action * pTLVx01; pTLVx01 = (sNASInitiateNetworkRegisterRequest_Action*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mRegisterAction = (eQMINASRegisterActions)regType; offset += tlvx01Sz; // Set the info // Check size WORD tlvx10Sz = sizeof( sNASInitiateNetworkRegisterRequest_ManualInfo ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_ManualInfo * pTLVx10; pTLVx10 = (sNASInitiateNetworkRegisterRequest_ManualInfo*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMobileCountryCode = mcc; pTLVx10->mMobileNetworkCode = mnc; pTLVx10->mRadioAccessTechnology = (eQMINASRadioAccessTechnologies)rat; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASInitiateAttachRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateAttachRequest_Action * pTLVx10; pTLVx10 = (sNASInitiateAttachRequest_Action*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mPSAttachAction = (eQMINASPSAttachActions)action; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { // Validate arguments if (pIn == 0 || pRegistrationState == 0 || pCSDomain == 0 || pPSDomain == 0 || pRAN == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0 || pRoaming == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRadioIfaces = *pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; *pRoaming = 0xffffffff; *pMCC = 0xffff; *pMNC = 0xffff; *pName = 0; // Parse the serving system (mandatory) // Find the TLV const sNASGetServingSystemResponse_ServingSystem * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pRegistrationState = pTLVx01->mRegistrationState; *pCSDomain = pTLVx01->mCSAttachState; *pPSDomain = pTLVx01->mPSAttachState; *pRAN = pTLVx01->mRegisteredNetwork; BYTE activeRadioIfaces = pTLVx01->mNumberOfRadioInterfacesInUse; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMINASRadioInterfaces * pRadioInfo; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem ) + sizeof( eQMINASRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRadioInfo = (const eQMINASRadioInterfaces *) ((const BYTE *)pTLVx01 + sizeof( sNASGetServingSystemResponse_ServingSystem )); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pRadioInfo; pOutRadioIfaces++; pRadioInfo++; } *pRadioIfacesSize = activeRadioIfaces; // Find the roaming indicator (optional) const sNASGetServingSystemResponse_RoamingIndicator * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetServingSystemResponse_RoamingIndicator )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pRoaming = (eQMINASRoamingIndicators)pTLVx10->mRoamingIndicator; } // Find the PLMN (optional) const sNASGetServingSystemResponse_CurrentPLMN * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN )) { return eGOBI_ERR_MALFORMED_RSP; } *pMCC = pTLVx12->mMobileCountryCode; *pMNC = pTLVx12->mMobileNetworkCode; ULONG descLen = pTLVx12->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx12 + sizeof( sNASGetServingSystemResponse_CurrentPLMN )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ) { // Validate arguments if (pIn == 0 || pDataCapsSize == 0 || *pDataCapsSize == 0 || pDataCaps == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxDataCaps = *pDataCapsSize; // Assume failure *pDataCapsSize = 0; // Find the TLV const sNASGetServingSystemResponse_DataServices * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE activeDataCaps = pTLVx11->mNumberOfDataCapabilities; if (activeDataCaps > maxDataCaps) { activeDataCaps = maxDataCaps; } const eQMINASDataServiceCapabilities2 * pInDataCaps; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices ) + sizeof( eQMINASDataServiceCapabilities2 ) * activeDataCaps) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInDataCaps = (const eQMINASDataServiceCapabilities2 *) ((const BYTE *)pTLVx11 + sizeof( sNASGetServingSystemResponse_DataServices )); ULONG * pOutDataCaps = (ULONG *)pDataCaps; for (ULONG d = 0; d < activeDataCaps; d++) { *pOutDataCaps = *pInDataCaps; pOutDataCaps++; pInDataCaps++; } *pDataCapsSize = activeDataCaps; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { // Validate arguments if (pIn == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0 || pSID == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pName = 0; *pSID = 0xffff; *pNID = 0xffff; // Find the name (mandatory) const sNASGetHomeNetworkResponse_HomeNetwork * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pMCC = pTLVx01->mMobileCountryCode; *pMNC = pTLVx01->mMobileNetworkCode; ULONG descLen = pTLVx01->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx01 + sizeof( sNASGetHomeNetworkResponse_HomeNetwork )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; // Find the SID/NID (optional) const sNASGetHomeNetworkResponse_HomeIDs * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetHomeNetworkResponse_HomeIDs )) { return eGOBI_ERR_MALFORMED_RSP; } *pSID = pTLVx10->mSystemID; *pNID = pTLVx10->mNetworkID; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetTechnologyPreferenceRequest_Preference ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetTechnologyPreferenceRequest_Preference * pTLVx01; pTLVx01 = (sNASSetTechnologyPreferenceRequest_Preference*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Copy technology preference WORD as-is memcpy( &pTLVx01->mValOfTechnology, &technologyPref, 2 ); pTLVx01->mDuration = (eQMINASTechPrefDurations)duration; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { // Validate arguments if (pIn == 0 || pTechnologyPref == 0 || pDuration == 0 || pPersistentTechnologyPref == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the preference (mandatory) const sNASGetTechnologyPreferenceResponse_ActivePreference * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetTechnologyPreferenceResponse_ActivePreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pTechnologyPref, &pTLVx01->mValOfTechnology, 2 ); *pDuration = pTLVx01->mDuration; // Until we know any better the persistent setting is the current setting *pPersistentTechnologyPref = *pTechnologyPref; // Find the persistant technology preference (optional) const sNASGetTechnologyPreferenceResponse_PersistentPreference * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetTechnologyPreferenceResponse_PersistentPreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pPersistentTechnologyPref, &pTLVx10->mValOfTechnology, 2 ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // If you specify one of the custom SCP config fields then you must // specify them all ULONG scpCount = 0; if (pCustomSCP != 0) { scpCount++; } if (pProtocol != 0) { scpCount++; } if (pBroadcast != 0) { scpCount++; } if (pApplication != 0) { scpCount++; } if (scpCount != 0 && scpCount != 4) { return eGOBI_ERR_INVALID_ARG; } // Rev. 0 and SCP custom config are mutually exclusive if (pForceRev0 != 0 && scpCount == 4) { if (*pForceRev0 != 0 && *pCustomSCP != 0) { return eGOBI_ERR_INVALID_ARG; } } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Need to start with SPC? if (pForceRev0 != 0 || scpCount == 4) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASSetNetworkParametersRequest_SPC ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_SPC * pTLVx10; pTLVx10 = (sNASSetNetworkParametersRequest_SPC*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values memcpy( &pTLVx10->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx10Sz; } // Force Rev. 0? if (pForceRev0 != 0) { // Check size WORD tlvx14Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDORevision ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDORevision * pTLVx14; pTLVx14 = (sNASSetNetworkParametersRequest_CDMA1xEVDORevision*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mForceCDMA1xEVDORev0 = (*pForceRev0 == 0 ? 0 : 1); offset += tlvx14Sz; } if (scpCount == 4) { // Check size WORD tlvx15Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom * pTLVx15; pTLVx15 = (sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the values pTLVx15->mCDMA1xEVDOSCPCustomConfig = (*pCustomSCP == 0 ? 0 : 1); // The pProtocol bitmask pTLVx15->mSubtype2PhysicalLayer = (*pProtocol & 0x00000001 ? 1 : 0); pTLVx15->mEnhancedCCMAC = (*pProtocol & 0x00000002 ? 1 : 0); pTLVx15->mEnhancedACMAC = (*pProtocol & 0x00000004 ? 1 : 0); pTLVx15->mEnhancedFTCMAC = (*pProtocol & 0x00000008 ? 1 : 0); pTLVx15->mSubtype3RTCMAC = (*pProtocol & 0x00000010 ? 1 : 0); pTLVx15->mSubtype1RTCMAC = (*pProtocol & 0x00000020 ? 1 : 0); pTLVx15->mEnhancedIdle = (*pProtocol & 0x00000040 ? 1 : 0); pTLVx15->mGenericMultimodeCapableDiscPort = (*pProtocol & 0x00000080 ? 1 : 0); pTLVx15->mGenericBroadcast = (*pBroadcast & 0x00000001 ? 1 : 0); pTLVx15->mSNMultiflowPacketApplication = (*pApplication & 0x00000001 ? 1 : 0); pTLVx15->mSNEnhancedMultiflowPacketApplication = (*pApplication & 0x00000002 ? 1 : 0); offset += tlvx15Sz; } if (pRoaming != 0) { // Check size WORD tlvx16Sz = sizeof( sNASSetNetworkParametersRequest_Roaming ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_Roaming * pTLVx16; pTLVx16 = (sNASSetNetworkParametersRequest_Roaming*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the values pTLVx16->mRoamPreference = (eQMINASRoamingPreferences)*pRoaming; offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset == 0) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetCDMANetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pIn == 0 || pSCI == 0 || pSCM == 0 || pRegHomeSID == 0 || pRegForeignSID == 0 || pRegForeignNID == 0 || pForceRev0 == 0 || pCustomSCP == 0 || pProtocol == 0 || pBroadcast == 0 || pApplication == 0 || pRoaming == 0) { return eGOBI_ERR_INVALID_ARG; } *pSCI = 0xff; *pSCM = 0xff; *pRegHomeSID = 0xff; *pRegForeignSID = 0xff; *pRegForeignNID = 0xff; *pForceRev0 = 0xff; *pCustomSCP = 0xff; *pProtocol = 0xffffffff; *pBroadcast = 0xffffffff; *pApplication = 0xffffffff; *pRoaming = 0xff; // Find the SCI const sNASGetNetworkParametersResponse_SCI * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sNASGetNetworkParametersResponse_SCI )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCI = pTLVx11->mSlotCycleIndex; } // Find the SCM const sNASGetNetworkParametersResponse_SCM * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetNetworkParametersResponse_SCM )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCM = pTLVx12->mStationClassMark; } // Find the Registration const sNASGetNetworkParametersResponse_Registration * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sNASGetNetworkParametersResponse_Registration )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx13->mRegisterOnHomeSystem; *pRegForeignSID = pTLVx13->mRegisterOnForeignSystem; *pRegForeignNID = pTLVx13->mRegisterOnForeignNetwork; } // Rev. 0? const sNASGetNetworkParametersResponse_CDMA1xEVDORevision * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sNASGetNetworkParametersResponse_CDMA1xEVDORevision )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx14->mForceCDMA1xEVDORev0; } // We're lazy, so we'll just typecast all the bitmask members from // sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom into their // respective container parameters const sEVDOCustomSCPConfig * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sEVDOCustomSCPConfig )) { return eGOBI_ERR_MALFORMED_RSP; } *pCustomSCP = pTLVx15->mbActive; *pProtocol = pTLVx15->mProtocolMask; *pBroadcast = pTLVx15->mBroadcastMask; *pApplication = pTLVx15->mApplicationMask; } // Roaming? const sNASGetNetworkParametersResponse_Roaming * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sNASGetNetworkParametersResponse_Roaming )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoaming = (eQMINASRoamingPreferences)pTLVx16->mRoamPreference; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ) { // Validate arguments if (pIn == 0 || pACCOLC == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the ACCOLC (mandatory) const sNASGetACCOLCResponse_ACCOLC * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetACCOLCResponse_ACCOLC )) { return eGOBI_ERR_MALFORMED_RSP; } *pACCOLC = pTLVx01->mACCOLC; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetACCOLCRequest_ACCOLC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetACCOLCRequest_ACCOLC * pTLVx01; pTLVx01 = (sNASSetACCOLCRequest_ACCOLC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mACCOLC = accolc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode (mandatory) const sNASGetCSPPLMNModeResponse_Mode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx10 < sizeof( sNASGetCSPPLMNModeResponse_Mode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mRestrictManualPLMNSelection; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASGetPLMNNameRequest_PLMN ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASGetPLMNNameRequest_PLMN * pTLVx01; pTLVx01 = (sNASGetPLMNNameRequest_PLMN*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMobileCountryCode = mcc; pTLVx01->mMobileNetworkCode = mnc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ) { // Validate arguments if (pIn == 0 || *pNamesSize == 0 || pNames == 0) { return eGOBI_ERR_INVALID_ARG; } const BYTE * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // The output format just happens to be the same as // sNASGetPLMNNameResponse_Name. Copy the full TLV to pNames if (outLenx10 > *pNamesSize) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNames, pTLVx10, outLenx10 ); *pNamesSize = outLenx10; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationOMA.cpp000066400000000000000000000336101455567757300303330ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationOMA.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (OMADM Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackOMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add sessionType // Check size WORD tlvx10Sz = sizeof( sOMAStartSessionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMAStartSessionRequest_Type * pTLVx10; pTLVx10 = (sOMAStartSessionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSessionType = (eQMIOMASessionTypes)sessionType; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { // Validate arguments if (pIn == 0 || pSessionState == 0 || pSessionType == 0 || pFailureReason == 0 || pRetryCount == 0 || pSessionPause == 0 || pTimeRemaining == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetSessionInfoResponse_Info * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetSessionInfoResponse_Info )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionState = pTLVx10->mSessionState; *pSessionType = pTLVx10->mSessionType; // Find the second TLV const sOMAGetSessionInfoResponse_Failure * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sOMAGetSessionInfoResponse_Failure )) { return eGOBI_ERR_MALFORMED_RSP; } *pFailureReason = pTLVx11->mSessionFailure; // Find the third TLV const sOMAGetSessionInfoResponse_Retry * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sOMAGetSessionInfoResponse_Retry )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryCount = pTLVx12->mRetryCount; *pSessionPause = pTLVx12->mRetryPauseTimer; *pTimeRemaining = pTLVx12->mRemainingTime; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ) { // Validate arguments if (pIn == 0 || pSessionType == 0 || pSessionID == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sOMAGetSessionInfoResponse_NIA * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sOMAGetSessionInfoResponse_NIA )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionID = pTLVx13->mSessionID; *pSessionType = pTLVx13->mSessionType; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add selection and session ID // Check size WORD tlvx10Sz = sizeof( sOMASendSelectionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASendSelectionRequest_Type * pTLVx10; pTLVx10 = (sOMASendSelectionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mSelection = (eQMIOMASelections)selection; pTLVx10->mSessionID = sessionID; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { // Validate arguments if (pIn == 0 || pbProvisioning == 0 || pbPRLUpdate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetFeaturesResponse_Provisioning * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_Provisioning )) { return eGOBI_ERR_MALFORMED_RSP; } *pbProvisioning = pTLVx10->mDeviceProvisioningServiceUpdateEnabled; // Find the second TLV const sOMAGetFeaturesResponse_PRLUpdate * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_PRLUpdate )) { return eGOBI_ERR_MALFORMED_RSP; } *pbPRLUpdate = pTLVx11->mPRLServiceUpdateEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bProvisioning // Check size WORD tlvx10Sz = sizeof( sOMASetFeaturesRequest_Provisioning ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_Provisioning * pTLVx10; pTLVx10 = (sOMASetFeaturesRequest_Provisioning*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mDeviceProvisioningServiceUpdateEnabled = (INT8)bProvisioning; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bPRLUpdate // Check size WORD tlvx11Sz = sizeof( sOMASetFeaturesRequest_PRLUpdate ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_PRLUpdate * pTLVx11; pTLVx11 = (sOMASetFeaturesRequest_PRLUpdate*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPRLServiceUpdateEnabled = (INT8)bPRLUpdate; offset += tlvx11Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationPDS.cpp000066400000000000000000001033451455567757300303500ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationPDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Position Determination Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ) { // Validate arguments (at least one mask must be present) if (pOut == 0 || (pGPSDataMask == 0 && pCellDataMask == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Optionally add pGPSDataMask if (pGPSDataMask != 0) { // Check size WORD tlvx10Sz = sizeof( sPDSResetPDSDataRequest_GPSData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_GPSData * pTLVx10; pTLVx10 = (sPDSResetPDSDataRequest_GPSData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx10 = *pGPSDataMask; offset += tlvx10Sz; } // Optionally add pCellDataMask if (pCellDataMask != 0) { // Check size WORD tlvx11Sz = sizeof( sPDSResetPDSDataRequest_CellData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_CellData * pTLVx11; pTLVx11 = (sPDSResetPDSDataRequest_CellData*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx11 = *pCellDataMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetCOMPortAutoTrackingConfigRequest_Config ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetCOMPortAutoTrackingConfigRequest_Config * pTLVx01; pTLVx01 = (sPDSSetCOMPortAutoTrackingConfigRequest_Config*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetCOMPortAutoTrackingConfigResponse_Config * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetCOMPortAutoTrackingConfigResponse_Config )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceAutoTrackingStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceAutoTrackingStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceAutoTrackingStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetServiceAutoTrackingStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceAutoTrackingStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetAGPSConfigRequest_Server ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetAGPSConfigRequest_Server * pTLVx10; pTLVx10 = (sPDSSetAGPSConfigRequest_Server*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (serverAddress & 0x000000FF); ULONG ip1 = (serverAddress & 0x0000FF00) >> 8; ULONG ip2 = (serverAddress & 0x00FF0000) >> 16; ULONG ip3 = (serverAddress & 0xFF000000) >> 24; // Set the values pTLVx10->mServerAddress[0] = (INT8)ip0; pTLVx10->mServerAddress[1] = (INT8)ip1; pTLVx10->mServerAddress[2] = (INT8)ip2; pTLVx10->mServerAddress[3] = (INT8)ip3; pTLVx10->mServerPort = serverPort; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ) { // Validate arguments if (pIn == 0 || pServerAddress == 0 || pServerPort == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetAGPSConfigResponse_ServerAddress * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetAGPSConfigResponse_ServerAddress )) { return eGOBI_ERR_MALFORMED_RSP; } *pServerPort = pTLVx01->mServerPort; ULONG ip0 = (ULONG)pTLVx01->mServerAddress[0]; ULONG ip1 = (ULONG)pTLVx01->mServerAddress[1] << 8; ULONG ip2 = (ULONG)pTLVx01->mServerAddress[2] << 16; ULONG ip3 = (ULONG)pTLVx01->mServerAddress[3] << 24; *pServerAddress = (ip0 | ip1 | ip2 | ip3); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRATime ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRATime * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRATime*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRATime * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRATime )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRAData ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRAData * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRAData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRAData * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRAData )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { // Validate arguments if (pIn == 0 || pGPSWeek == 0 || pGPSWeekOffset == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Validity * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sPDSGetXTRAParametersResponse_Validity )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx13->mValidPeriodDurationInHours; *pGPSWeek = pTLVx13->mValidPeriodGPSStartWeek; *pGPSWeekOffset = pTLVx13->mValidPeriodGPSStartWeekOffsetInMinutes; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add preference // Check size WORD tlvx12Sz = sizeof( sPDSSetXTRAParametersRequest_Network ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Network * pTLVx12; pTLVx12 = (sPDSSetXTRAParametersRequest_Network*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mWWANNetworkPreference = (eQMIPDSWWANNetworkPreferences)preference; offset += tlvx12Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ) { // Validate arguments if (pIn == 0 || pPreference == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pPreference const sPDSGetXTRAParametersResponse_Network * pTLVx12; ULONG outLenx12; ULONG rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sPDSGetXTRAParametersResponse_Network )) { return eGOBI_ERR_MALFORMED_RSP; } *pPreference = pTLVx12->mWWANNetworkPreference; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetXTRAParametersRequest_Automatic ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Automatic * pTLVx10; pTLVx10 = (sPDSSetXTRAParametersRequest_Automatic*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutomaticDownloadEnabled = (bEnabled == 0 ? 0 : 1); pTLVx10->mDownloadIntervalInHours = interval; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pInterval == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Automatic * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetXTRAParametersResponse_Automatic )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mAutomaticDownloadEnabled; *pInterval = pTLVx10->mDownloadIntervalInHours; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pTracking == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetServiceStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx01->mServiceEnabled; *pTracking = pTLVx01->mTrackingSessionState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add enable // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mServiceEnabled = (enable == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackPDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSInjectTimeReferenceRequest_Time ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSInjectTimeReferenceRequest_Time * pTLVx01; pTLVx01 = (sPDSInjectTimeReferenceRequest_Time*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mSystemTimeMilliseconds = systemTime; pTLVx01->mSystemDiscontinuties = systemDiscontinuities; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { // Validate arguments if (pIn == 0 || pOperation == 0 || pTimeout == 0 || pInterval == 0 || pAccuracy == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetDefaultsResponse_Defaults * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetDefaultsResponse_Defaults )) { return eGOBI_ERR_MALFORMED_RSP; } *pOperation = pTLVx01->mSessionOperation; *pTimeout = pTLVx01->mTimeoutSeconds; *pInterval = pTLVx01->mFixRequestIntervalSeconds; *pAccuracy = pTLVx01->mDesiredAccuracyMeters; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSSetDefaultsRequest_Defaults ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetDefaultsRequest_Defaults * pTLVx01; pTLVx01 = (sPDSSetDefaultsRequest_Defaults*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mDesiredAccuracyMeters = accuracy; pTLVx01->mFixRequestIntervalSeconds = interval; pTLVx01->mSessionOperation = (eQMIPDSOperationTypes)operation; pTLVx01->mTimeoutSeconds = timeout; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationRMS.cpp000066400000000000000000000134261455567757300303630ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationRMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Remote Management Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pWakeMask == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sRMSGetSMSWakeResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sRMSGetSMSWakeResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } // Find the second TLV const sRMSGetSMSWakeRequest_Mask * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sRMSGetSMSWakeRequest_Mask )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mSMSWakeEnabled; *pWakeMask = pTLVx11->mMask; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bEnable // Check size WORD tlvx10Sz = sizeof( sRMSSetSMSWakeRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_State * pTLVx10; pTLVx10 = (sRMSSetSMSWakeRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSMSWakeEnabled = (INT8)bEnable; offset += tlvx10Sz; // Add wakeMask if enabled if (bEnable != 0) { // Check size WORD tlvx11Sz = sizeof( sRMSSetSMSWakeRequest_Mask ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_Mask * pTLVx11; pTLVx11 = (sRMSSetSMSWakeRequest_Mask*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mMask = wakeMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationUIM.cpp000066400000000000000000001065171455567757300303600ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationUIM.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS_UIM Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockControlKeyResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockControlKeyResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockControlKeyRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMUnblockControlKeyRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMUnblockControlKeyRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mControlKeyLength = valSz; offset += sizeof( sDMSUIMUnblockControlKeyRequest_Facility ); memcpy( (pOut + offset), (LPCSTR)val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetControlKeyProtectionResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetControlKeyProtectionResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetControlKeyProtectionRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMSetControlKeyProtectionRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mFacilityState = (eQMIDMSUIMFacilityStates)status; pTLVx01->mControlKeyLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ); memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; // Find the last (optional) argument if (pbBlocking != 0) { const sDMSUIMGetControlKeyStatusResponse_Blocking * pTLVx10; ULONG tlvLenx10; rc = GetTLV( inLen, pIn, 0x10, &tlvLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLenx10 < sizeof( sDMSUIMGetControlKeyStatusResponse_Blocking )) { return eGOBI_ERR_MALFORMED_RSP; } *pbBlocking = pTLVx10->mOperationBlocking; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add id // Check size WORD tlvx01Sz = sizeof( sDMSUIMGetControlKeyStatusRequest_Facility ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMGetControlKeyStatusRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMGetControlKeyStatusRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyStatus DESCRIPTION: This function requests the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Request is the same as PackUIMGetControlKeyBlockingStatus return PackUIMGetControlKeyBlockingStatus( pOutLen, pOut, id ); } /*=========================================================================== METHOD: ParseUIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMGetICCIDResponse_ICCID * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetICCIDResponse_ICCID )) { return eGOBI_ERR_MALFORMED_RSP; } // The TLV only contains the string // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, (const CHAR*)pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || id < 1 || id > 2 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG tlvLen; // The typeID is either 0x11 or 0x12 if (id == 1) { const sDMSUIMGetPINStatusResponse_PIN1Status * pTLV11; ULONG rc = GetTLV( inLen, pIn, 0x11, &tlvLen, (const BYTE **)&pTLV11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN1Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV11->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV11->mRemainingUnblockRetries; *pStatus = pTLV11->mPINStatus; } else if (id == 2) { const sDMSUIMGetPINStatusResponse_PIN2Status * pTLV12; ULONG rc = GetTLV( inLen, pIn, 0x12, &tlvLen, (const BYTE **)&pTLV12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN2Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV12->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV12->mRemainingUnblockRetries; *pStatus = pTLV12->mPINStatus; } else { return eGOBI_ERR_INVALID_ARG; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMChangePINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMChangePINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pOldValue == 0 || pOldValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pOldValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMChangePINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMChangePINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMChangePINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mOldPINLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMChangePINRequest_Info1 ); // mOldPINValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMChangePINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMChangePINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMChangePINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pPUKValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pPUKValue == 0 || pPUKValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pPUKValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockPINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMUnblockPINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMUnblockPINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mPUKLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info1 ); // mPUKValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMUnblockPINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMUnblockPINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMVerifyPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMVerifyPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMVerifyPINRequest_Info ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMVerifyPINRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMVerifyPINRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINLength = valSz; offset += sizeof( sDMSUIMVerifyPINRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetPINProtectionResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetPINProtectionResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); ULONG valSz = (ULONG)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetPINProtectionRequest_Info ) + (WORD)valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetPINProtectionRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMSetPINProtectionRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINEnabled = (bEnable == 0 ? 0 : 1); pTLVx01->mPINLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetPINProtectionRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationVoice.cpp000066400000000000000000000131311455567757300307600ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationVoice.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Voice Service for USSD) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sUSSDInfo // Struct to represent USSD/Alpha information header /*=========================================================================*/ struct sUSSDInfoHdr { public: BYTE mDCS; BYTE mLength; // Data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: PackOriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } // Add pInfo sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackAnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationWDS.cpp000066400000000000000000003064571455567757300303700ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WDS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetPacketServiceStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetPacketServiceStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mConnectionStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ) { // Validate arguments if (pIn == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataSessionDurationResponse_Duration * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataSessionDurationResponse_Duration )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx01->mDataSessionDuration; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDormancyResponse_DormancyStatus * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDormancyResponse_DormancyStatus )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mDormancyStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ) { // Validate arguments if (pIn == 0 || pSetting == 0 || pRoamSetting == 0) { return eGOBI_ERR_INVALID_ARG; } *pSetting = 0xffffffff; *pRoamSetting = 0xffffffff; // Find the first TLV const sWDSGetAutoconnectSettingResponse_Autoconnect * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetAutoconnectSettingResponse_Autoconnect )) { return eGOBI_ERR_MALFORMED_RSP; } *pSetting = pTLVx01->mAutoconnectSetting; // Find the second TLV (optional) const sWDSGetAutoconnectSettingResponse_Roam * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Is the TLV large enough? if (outLenx10 < sizeof( sWDSGetAutoconnectSettingResponse_Roam )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoamSetting = pTLVx10->mAutoconnectRoamSetting; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add setting // Check size WORD tlvx01Sz = sizeof( sWDSSetAutoconnectSettingRequest_Autoconnect ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Autoconnect * pTLVx01; pTLVx01 = (sWDSSetAutoconnectSettingRequest_Autoconnect*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoconnectSetting = (eQMIWDSAutoconnectSettings)setting; offset += tlvx01Sz; // Add roam setting, if specified if (pRoamSetting != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetAutoconnectSettingRequest_Roam ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Roam * pTLVx10; pTLVx10 = (sWDSSetAutoconnectSettingRequest_Roam*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutoconnectRoamSetting = (eQMIWDSAutoconnectRoamSettings)*pRoamSetting; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSModifyProfileRequest_ProfileIdentifier ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_ProfileIdentifier * pTLVx01; pTLVx01 = (sWDSModifyProfileRequest_ProfileIdentifier*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; pTLVx01->mProfileIndex = 1; offset += tlvx01Sz; // Add name, if specified if (pName != 0) { std::string name( pName ); // Check size WORD tlvx10Sz = (WORD)name.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( pOut + offset, name.c_str(), name.size() ); offset += tlvx10Sz; } // Add PDP type, if specified if (pPDPType != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSModifyProfileRequest_PDPType ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PDPType * pTLVx11; pTLVx11 = (sWDSModifyProfileRequest_PDPType*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPDPType = (eQMIPDPTypes)*pPDPType; offset += tlvx11Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSModifyProfileRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PrimaryDNS * pTLVx15; pTLVx15 = (sWDSModifyProfileRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSModifyProfileRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_SecondaryDNS * pTLVx16; pTLVx16 = (sWDSModifyProfileRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx16->mIPV4Address[0] = (INT8)ip0; pTLVx16->mIPV4Address[1] = (INT8)ip1; pTLVx16->mIPV4Address[2] = (INT8)ip2; pTLVx16->mIPV4Address[3] = (INT8)ip3; offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx1BSz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1BSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1B; pHeader->mLength = tlvx1BSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx1BSz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx1CSz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1CSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1C; pHeader->mLength = tlvx1CSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx1CSz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx1DSz = sizeof( sWDSModifyProfileRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1DSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1D; pHeader->mLength = tlvx1DSz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_Authentication * pTLVx1D; pTLVx1D = (sWDSModifyProfileRequest_Authentication*)(pOut + offset); memset( pTLVx1D, 0, tlvx1DSz ); // Set the value pTLVx1D->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx1D->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx1DSz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx1ESz = sizeof( sWDSModifyProfileRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1ESz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1E; pHeader->mLength = tlvx1ESz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_IPAddress * pTLVx1E; pTLVx1E = (sWDSModifyProfileRequest_IPAddress*)(pOut + offset); memset( pTLVx1E, 0, tlvx1ESz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx1E->mIPV4Address[0] = (INT8)ip0; pTLVx1E->mIPV4Address[1] = (INT8)ip1; pTLVx1E->mIPV4Address[2] = (INT8)ip2; pTLVx1E->mIPV4Address[3] = (INT8)ip3; offset += tlvx1ESz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being read RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSGetDefaultSettingsRequest_ProfileType ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetDefaultSettingsRequest_ProfileType * pTLVx01; pTLVx01 = (sWDSGetDefaultSettingsRequest_ProfileType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { // Validate arguments if (pIn == 0 || pPDPType == 0 || pIPAddress == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0 || pAuthentication == 0 || nameSize == 0 || pName == 0 || apnSize == 0 || pAPNName == 0 || userSize == 0 || pUsername == 0) { return eGOBI_ERR_INVALID_ARG; } // Set defaults *pPDPType = 0xffffffff; *pIPAddress = 0xffffffff; *pPrimaryDNS = 0xffffffff; *pSecondaryDNS = 0xffffffff; *pAuthentication = 0xffffffff; pName[0] = 0; pAPNName[0] = 0; pUsername[0] = 0; // Find the name const sWDSGetDefaultSettingsResponse_ProfileName * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (nameSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pName, (const BYTE *)pTLVx10, outLenx10 ); // Null terminate pName[outLenx10] = 0; } // Find the PDP type const sWDSGetDefaultSettingsResponse_PDPType * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDefaultSettingsResponse_PDPType )) { return eGOBI_ERR_MALFORMED_RSP; } *pPDPType = pTLVx11->mPDPType; } // Find the APN name const sWDSGetDefaultSettingsResponse_APNName * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (apnSize < outLenx14 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx14, outLenx14 ); // Null terminate pAPNName[outLenx14] = 0; } // Find the Primary DNS const sWDSGetDefaultSettingsResponse_PrimaryDNS * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetDefaultSettingsResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx15->mIPV4Address[0]; ULONG ip1 = pTLVx15->mIPV4Address[1] << 8; ULONG ip2 = pTLVx15->mIPV4Address[2] << 16; ULONG ip3 = pTLVx15->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDefaultSettingsResponse_SecondaryDNS * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetDefaultSettingsResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx16->mIPV4Address[0]; ULONG ip1 = pTLVx16->mIPV4Address[1] << 8; ULONG ip2 = pTLVx16->mIPV4Address[2] << 16; ULONG ip3 = pTLVx16->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Username const sWDSGetDefaultSettingsResponse_APNName * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (userSize < outLenx1B + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx1B, outLenx1B ); // Null terminate pAPNName[outLenx1B] = 0; } // Find the Authentication const sWDSGetDefaultSettingsResponse_Authentication * pTLVx1D; ULONG outLenx1D; rc = GetTLV( inLen, pIn, 0x1D, &outLenx1D, (const BYTE **)&pTLVx1D ); if (rc == eGOBI_ERR_NONE) { if (outLenx1D < sizeof( sWDSGetDefaultSettingsResponse_Authentication )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG pap = pTLVx1D->mEnablePAP; ULONG chap = pTLVx1D->mEnableCHAP << 1; *pAuthentication = (pap | chap); } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add technology, if specified if (pTechnology != 0) { // Check size WORD tlvx30Sz = sizeof( sWDSStartNetworkInterfaceRequest_TechnologyPreference ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx30Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x30; pHeader->mLength = tlvx30Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_TechnologyPreference * pTLVx30; pTLVx30 = (sWDSStartNetworkInterfaceRequest_TechnologyPreference*)(pOut + offset); memset( pTLVx30, 0, tlvx30Sz ); // Set the value pTLVx30->mEnable3GPP = ((*pTechnology & 0x00000001) != 0); pTLVx30->mEnable3GPP2 = ((*pTechnology & 0x00000002) != 0); offset += tlvx30Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSStartNetworkInterfaceRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSStartNetworkInterfaceRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary NBNS, if specified if (pPrimaryNBNS != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryNBNS * pTLVx12; pTLVx12 = (sWDSStartNetworkInterfaceRequest_PrimaryNBNS*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryNBNS & 0x000000FF); ULONG ip1 = (*pPrimaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary NBNS, if specified if (pSecondaryNBNS != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryNBNS * pTLVx13; pTLVx13 = (sWDSStartNetworkInterfaceRequest_SecondaryNBNS*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryNBNS & 0x000000FF); ULONG ip1 = (*pSecondaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSStartNetworkInterfaceRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_IPAddress * pTLVx15; pTLVx15 = (sWDSStartNetworkInterfaceRequest_IPAddress*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pTLVx16; pTLVx16 = (sWDSStartNetworkInterfaceRequest_Authentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx16->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx17Sz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx17Sz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx18Sz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx18Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ) { // Validate arguments if (pIn == 0 || pSessionId == 0 || pFailureReason == 0) { return eGOBI_ERR_INVALID_ARG; } // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Still parse call end reason, if present const sWDSStartNetworkInterfaceResponse_CallEndReason * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 >= sizeof( sWDSStartNetworkInterfaceResponse_CallEndReason )) { *pFailureReason = pTLVx10->mCallEnd; } } return rc; } // Find the Session ID const sWDSStartNetworkInterfaceResponse_PacketDataHandle * pTLVx01; ULONG outLenx01; rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSStartNetworkInterfaceResponse_PacketDataHandle )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionId = pTLVx01->mPacketDataHandle; } // Session ID is mandatory, if it failed return that error return rc; } /*=========================================================================== METHOD: PackStopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add session ID // Check size WORD tlvx01Sz = sizeof( sWDSStopNetworkInterfaceRequest_PacketDataHandle ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSStopNetworkInterfaceRequest_PacketDataHandle * pTLVx01; pTLVx01 = (sWDSStopNetworkInterfaceRequest_PacketDataHandle*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mPacketDataHandle = sessionId; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx10Sz = sizeof( sWDSGetCurrentSettingsRequest_RequestedSettings ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetCurrentSettingsRequest_RequestedSettings * pTLVx10; pTLVx10 = (sWDSGetCurrentSettingsRequest_RequestedSettings*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mIPAddress = true; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ) { // Validate arguments if (pIn == 0 || pIPAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; ULONG rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } // If no IP address is found, fail return rc; } /*=========================================================================== METHOD: ParseGetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { // Validate arguments if (pIn == 0 || pCurrentChannelTXRate == 0 || pCurrentChannelRXRate == 0 || pMaxChannelTXRate == 0 || pMaxChannelRXRate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the rates const sWDSGetChannelRatesResponse_ChannelRates * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetChannelRatesResponse_ChannelRates )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pCurrentChannelTXRate = pTLVx01->mChannelTXRatebps; *pCurrentChannelRXRate = pTLVx01->mChannelRXRatebps; *pMaxChannelTXRate = pTLVx01->mMaxChannelTXRatebps; *pMaxChannelRXRate = pTLVx01->mMaxChannelRXRatebps; } // If no rates are found, fail return rc; } /*=========================================================================== METHOD: PackGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mReportTXPacketSuccesses = true; pTLVx01->mReportRXPacketSuccesses = true; pTLVx01->mReportTXPacketErrors = true; pTLVx01->mReportRXPacketErrors = true; pTLVx01->mReportTXOverflows = true; pTLVx01->mReportRXOverflows = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { // Validate arguments if (pIn == 0 || pTXPacketSuccesses == 0 || pRXPacketSuccesses == 0 || pTXPacketErrors == 0 || pRXPacketErrors == 0 || pTXPacketOverflows == 0 || pRXPacketOverflows == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX packet sucesses const sWDSGetPacketStatisticsResponse_TXPacketSuccesses * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet sucesses const sWDSGetPacketStatisticsResponse_RXPacketSuccesses * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet errors const sWDSGetPacketStatisticsResponse_TXPacketErrors * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet errors const sWDSGetPacketStatisticsResponse_RXPacketErrors * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet overflows const sWDSGetPacketStatisticsResponse_TXOverflows * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetPacketStatisticsResponse_TXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet overflows const sWDSGetPacketStatisticsResponse_RXOverflows * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetPacketStatisticsResponse_RXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXPacketSuccesses = pTLVx10->mTXPacketSuccesses; *pRXPacketSuccesses = pTLVx11->mRXPacketSuccesses; *pTXPacketErrors = pTLVx12->mTXPacketErrors; *pRXPacketErrors = pTLVx13->mRXPacketErrors; *pTXPacketOverflows = pTLVx14->mTXOverflows; *pRXPacketOverflows = pTLVx15->mRXOverflows; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mTXByteTotal = true; pTLVx01->mRXByteTotal = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { // Validate arguments if (pIn == 0 || pTXTotalBytes == 0 || pRXTotalBytes == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX bytes const sWDSGetPacketStatisticsResponse_TXBytes * pTLVx19; ULONG outLenx19; ULONG rc = GetTLV( inLen, pIn, 0x19, &outLenx19, (const BYTE **)&pTLVx19 ); if (rc == eGOBI_ERR_NONE) { if (outLenx19 < sizeof( sWDSGetPacketStatisticsResponse_TXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX bytes const sWDSGetPacketStatisticsResponse_RXBytes * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetPacketStatisticsResponse_RXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXTotalBytes = pTLVx19->mTXByteTotal; *pRXTotalBytes = pTLVx1A->mRXByteTotal; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the mode // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPModeRequest_MobileIPMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPModeRequest_MobileIPMode * pTLVx01; pTLVx01 = (sWDSSetMIPModeRequest_MobileIPMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMIPMode = (eQMIMobileIPModes)mode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetMIPModeResponse_MobileIPMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetMIPModeResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx01->mMIPMode; } return rc; } /*=========================================================================== METHOD: PackSetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetActiveMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetActiveMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetActiveMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ) { // Validate arguments if (pIn == 0 || pIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetActiveMIPProfileResponse_Index * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetActiveMIPProfileResponse_Index )) { return eGOBI_ERR_MALFORMED_RSP; } *pIndex = pTLVx01->mProfileIndex; } return rc; } /*=========================================================================== METHOD: PackSetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address bRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; // Add Enabled, if specified if (pEnabled != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPProfileRequest_State ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_State * pTLVx10; pTLVx10 = (sWDSSetMIPProfileRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mEnabled = (*pEnabled == 0 ? 0 : 1); offset += tlvx10Sz; } // Add Home Address, if specified if (pAddress != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPProfileRequest_HomeAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HomeAddress * pTLVx11; pTLVx11 = (sWDSSetMIPProfileRequest_HomeAddress*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pAddress & 0x000000FF); ULONG ip1 = (*pAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pAddress & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary Home Agent Address, if specified if (pPrimaryHA != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress * pTLVx12; pTLVx12 = (sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryHA & 0x000000FF); ULONG ip1 = (*pPrimaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryHA & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary Home Agent Address, if specified if (pSecondaryHA != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress * pTLVx13; pTLVx13 = (sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryHA & 0x000000FF); ULONG ip1 = (*pSecondaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryHA & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add reverse tunneling, if specified if (pRevTunneling != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPProfileRequest_ReverseTunneling ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_ReverseTunneling * pTLVx14; pTLVx14 = (sWDSSetMIPProfileRequest_ReverseTunneling*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReverseTunneling = (*pRevTunneling == 0 ? 0 : 1); offset += tlvx14Sz; } // Add NAI, if specified if (pNAI != 0) { std::string nai( pNAI ); // Check size WORD tlvx15Sz = (WORD)nai.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), nai.c_str(), nai.size() ); offset += tlvx15Sz; } // Add HA SPI, if specified if (pHASPI != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPProfileRequest_HASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HASPI * pTLVx16; pTLVx16 = (sWDSSetMIPProfileRequest_HASPI*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mHASPI = *pHASPI; offset += tlvx16Sz; } // Add AAA SPI, if specified if (pAAASPI != 0) { // Check size WORD tlvx17Sz = sizeof( sWDSSetMIPProfileRequeste_AAASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequeste_AAASPI * pTLVx17; pTLVx17 = (sWDSSetMIPProfileRequeste_AAASPI*)(pOut + offset); memset( pTLVx17, 0, tlvx17Sz ); // Set the value pTLVx17->mAAASPI = *pAAASPI; offset += tlvx17Sz; } // Add MN-HA key, if specified if (pMNHA != 0) { std::string mnha( pMNHA ); // Check size WORD tlvx18Sz = (WORD)mnha.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnha.c_str(), mnha.size() ); offset += tlvx18Sz; } // Add MN-AAA key, if specified if (pMNHA != 0) { std::string mnaaa( pMNAAA ); // Check size WORD tlvx19Sz = (WORD)mnaaa.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx19Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x19; pHeader->mLength = tlvx19Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnaaa.c_str(), mnaaa.size() ); offset += tlvx19Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer index [ I ] - Mobile IP profile ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSGetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSGetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pAddress == 0 || pPrimaryHA == 0 || pSecondaryHA == 0 || pRevTunneling == 0 || naiSize == 0 || pNAI == 0 || pHASPI == 0 || pAAASPI == 0 || pHAState == 0 || pAAAState == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume errors *pEnabled = 0xff; *pAddress = 0xffffffff; *pPrimaryHA = 0xffffffff; *pSecondaryHA = 0xffffffff; *pRevTunneling = 0xff; *pHASPI = 0xffffffff; *pAAASPI = 0xffffffff; *pHAState = 0xffffffff; *pAAAState = 0xffffffff; // Find the State const sWDSGetMIPProfileResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx10->mEnabled; } // Find the Home Address const sWDSGetMIPProfileResponse_HomeAddress * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPProfileResponse_HomeAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pAddress = (ip0 | ip1 | ip2 | ip3); } // Find the Primary Home Agent Address const sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx12->mIPV4Address[0]; ULONG ip1 = pTLVx12->mIPV4Address[1] << 8; ULONG ip2 = pTLVx12->mIPV4Address[2] << 16; ULONG ip3 = pTLVx12->mIPV4Address[3] << 24; *pPrimaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary Home Agent Address const sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx13->mIPV4Address[0]; ULONG ip1 = pTLVx13->mIPV4Address[1] << 8; ULONG ip2 = pTLVx13->mIPV4Address[2] << 16; ULONG ip3 = pTLVx13->mIPV4Address[3] << 24; *pSecondaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Reverse tunneling, if enabled const sWDSGetMIPProfileResponse_ReverseTunneling * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_ReverseTunneling )) { return eGOBI_ERR_MALFORMED_RSP; } *pRevTunneling = pTLVx14->mReverseTunneling; } // Find the NAI, if enabled const sWDSGetMIPProfileResponse_NAI * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (naiSize < outLenx15 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNAI, (const BYTE *)pTLVx15, outLenx15 ); // Null terminate pNAI[outLenx15] = 0; } // Find the HA SPI const sWDSGetMIPProfileResponse_HASPI * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPProfileResponse_HASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pHASPI = pTLVx16->mHASPI; } // Find the AAA SPI const sWDSGetMIPProfileResponse_AAASPI * pTLVx17; ULONG outLenx17; rc = GetTLV( inLen, pIn, 0x17, &outLenx17, (const BYTE **)&pTLVx17 ); if (rc == eGOBI_ERR_NONE) { if (outLenx17 < sizeof( sWDSGetMIPProfileResponse_AAASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAASPI = pTLVx17->mAAASPI; } // Find the HA state const sWDSGetMIPProfileResponse_HAState * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetMIPProfileResponse_HAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAState = pTLVx1A->mKeyState; } // Find the AAA state const sWDSGetMIPProfileResponse_AAAState * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (outLenx1B < sizeof( sWDSGetMIPProfileResponse_AAAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAAState = pTLVx1B->mKeyState; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPParametersRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_SPC * pTLVx01; pTLVx01 = (sWDSSetMIPParametersRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; // Add Mode, if specified if (pMode != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPParametersRequest_MobileIPMode ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MobileIPMode * pTLVx10; pTLVx10 = (sWDSSetMIPParametersRequest_MobileIPMode*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMIPMode = (eQMIMobileIPModes)*pMode; offset += tlvx10Sz; } // Add Retry Limit, if specified if (pRetryLimit != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptLimit ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptLimit * pTLVx11; pTLVx11 = (sWDSSetMIPParametersRequest_RetryAttemptLimit*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mRetryAttemptLimit = *pRetryLimit; offset += tlvx11Sz; } // Add Retry interval, if specified if (pRetryInterval != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptInterval ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptInterval * pTLVx12; pTLVx12 = (sWDSSetMIPParametersRequest_RetryAttemptInterval*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mRetryAttemptInterval = *pRetryInterval; offset += tlvx12Sz; } // Add Re-registration period, if specified if (pReRegPeriod != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationPeriod ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationPeriod * pTLVx13; pTLVx13 = (sWDSSetMIPParametersRequest_ReRegistrationPeriod*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); // Set the value pTLVx13->mReRegistrationPeriod = *pReRegPeriod; offset += tlvx13Sz; } // Add Re-registration on traffic flag, if specified if (pReRegTraffic != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic * pTLVx14; pTLVx14 = (sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReRegistrationOnlyWithTraffic = (*pReRegTraffic == 0 ? 0 : 1); offset += tlvx14Sz; } // Add HA authenticator flag, if specified if (pHAAuthenticator != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator * pTLVx15; pTLVx15 = (sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the value pTLVx15->mMNHAAuthenticatorCalculator = (*pHAAuthenticator == 0 ? 0 : 1); offset += tlvx15Sz; } // Add HA RFC2002bis authentication flag, if specified if (pHA2002bis != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication * pTLVx16; pTLVx16 = (sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mMNHARFC2002BISAuthentication = (*pHA2002bis == 0 ? 0 : 1); offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pIn == 0 || pMode == 0 || pRetryLimit == 0 || pRetryInterval == 0 || pReRegPeriod == 0 || pReRegTraffic == 0 || pHAAuthenticator == 0 || pHA2002bis == 0) { return eGOBI_ERR_INVALID_ARG; } *pMode = 0xffffffff; *pRetryLimit = 0xff; *pRetryInterval = 0xff; *pReRegPeriod = 0xff; *pReRegTraffic = 0xff; *pHAAuthenticator = 0xff; *pHA2002bis = 0xff; // Find the mode const sWDSGetMIPParametersResponse_MobileIPMode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPParametersResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mMIPMode; } // Find the Retry limit const sWDSGetMIPParametersResponse_RetryAttemptLimit * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptLimit )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryLimit = pTLVx11->mRetryAttemptLimit; } // Find the Retry Interval const sWDSGetMIPParametersResponse_RetryAttemptInterval * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptInterval )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryInterval = pTLVx12->mRetryAttemptInterval; } // Find the Re-registration period const sWDSGetMIPParametersResponse_ReRegistrationPeriod * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationPeriod )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegPeriod = pTLVx13->mReRegistrationPeriod; } // Find the Re-register on traffic flag const sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegTraffic = pTLVx14->mReRegistrationOnlyWithTraffic; } // Find the HA authenticator const sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAAuthenticator = pTLVx15->mMNHAAuthenticatorCalculator; } // Find the HA RFC2002bis authentication flag const sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication )) { return eGOBI_ERR_MALFORMED_RSP; } *pHA2002bis = pTLVx16->mMNHARFC2002BISAuthentication; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ) { // Validate arguments if (pIn == 0 || pError == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetLastMIPStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetLastMIPStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pError = pTLVx01->mLastMIPStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments // At least one must be specified if (pOut == 0 || (pPrimaryDNS == 0 && pSecondaryDNS == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetDNSSettingRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSSetDNSSettingRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetDNSSettingRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSSetDNSSettingRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pIn == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the Primary DNS const sWDSGetDNSSettingResponse_PrimaryDNS * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetDNSSettingResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx10->mIPV4Address[0]; ULONG ip1 = pTLVx10->mIPV4Address[1] << 8; ULONG ip2 = pTLVx10->mIPV4Address[2] << 16; ULONG ip3 = pTLVx10->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDNSSettingResponse_SecondaryDNS * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDNSSettingResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ) { // Validate arguments if (pIn == 0 || pDataBearer == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataBearerTechnologyResponse_Technology * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataBearerTechnologyResponse_Technology )) { return eGOBI_ERR_MALFORMED_RSP; } *pDataBearer = pTLVx01->mDataBearerTechnology; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Gobi3000Translation/Gobi3000TranslationWMS.cpp000066400000000000000000000776661455567757300304100ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WMS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackDeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSDeleteRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSDeleteRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message index, if specified if (pMessageIndex != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSDeleteRequest_MessageIndex ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageIndex * pTLVx10; pTLVx10 = (sWMSDeleteRequest_MessageIndex*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mStorageIndex = *pMessageIndex; offset += tlvx10Sz; } // Add the Message tag, if specified if (pMessageTag != 0) { // Check size WORD tlvx11Sz = sizeof( sWMSDeleteRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageTag * pTLVx11; pTLVx11 = (sWMSDeleteRequest_MessageTag*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the values pTLVx11->mMessageTag = (eQMIWMSMessageTags)*pMessageTag; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSListMessagesRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The storage type sWMSListMessagesRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSListMessagesRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message tag, if specified if (pRequestedTag != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSListMessagesRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSListMessagesRequest_MessageTag * pTLVx10; pTLVx10 = (sWMSListMessagesRequest_MessageTag*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mMessageTag = (eQMIWMSMessageTags)*pRequestedTag; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ) { // Validate arguments if (pIn == 0 || pMessageListSize == 0 || *pMessageListSize == 0 || pMessageList == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageListSz = *pMessageListSize; // Assume failure *pMessageListSize = 0; // Find the messages const sWMSListMessagesResponse_MessageList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG messageListSz = pTLVx01->mNumberOfMessages; if (messageListSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (maxMessageListSz < messageListSz) { messageListSz = maxMessageListSz; } const sWMSListMessagesResponse_MessageList::sMessage * pMessages; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList ) + sizeof( sWMSListMessagesResponse_MessageList::sMessage ) * messageListSz) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pMessages = (const sWMSListMessagesResponse_MessageList::sMessage *) ((const BYTE *)pTLVx01 + sizeof( sWMSListMessagesResponse_MessageList )); ULONG * pData = (ULONG *)pMessageList; for (ULONG m = 0; m < messageListSz; m++) { *pData++ = pMessages->mStorageIndex; *pData++ = pMessages->mMessageTag; pMessages++; } *pMessageListSize = messageListSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawReadRequest_MessageIndex ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawReadRequest_MessageIndex * pTLVx01; pTLVx01 = (sWMSRawReadRequest_MessageIndex*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ O ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { // Validate arguments if (pIn == 0 || pMessageTag == 0 || pMessageFormat == 0 || pMessageSize == 0 || *pMessageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageSz = *pMessageSize; // Assume failure *pMessageSize = 0; // Find the messages const sWMSRawReadResponse_MessageData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageTag = pTLVx01->mMessageTag; *pMessageFormat = pTLVx01->mMessageFormat; ULONG messageSz = pTLVx01->mRawMessageLength; if (messageSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (messageSz > maxMessageSz) { messageSz = maxMessageSz; } // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData ) + messageSz) { return eGOBI_ERR_MALFORMED_RSP; } memcpy( pMessage, pTLVx01 + sizeof( sWMSRawReadResponse_MessageData ), messageSz ); *pMessageSize = messageSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSModifyTagRequest_MessageTag ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSModifyTagRequest_MessageTag * pTLVx01; pTLVx01 = (sWMSModifyTagRequest_MessageTag*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; pTLVx01->mMessageTag = (eQMIWMSMessageTags)messageTag; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawWriteRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawWriteRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawWriteRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawWriteRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ) { // Validate arguments if (pIn == 0 || pMessageIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the messages const sWMSRawWriteResponse_MessageIndex * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawWriteResponse_MessageIndex )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageIndex = pTLVx01->mStorageIndex; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawSendRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawSendRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawSendRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawSendRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ) { // Validate arguments if (pIn == 0 || pMessageFailureCode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume we have no message failure cause code *pMessageFailureCode = 0xffffffff; // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Check for the failure code (optional) const sWMSRawSendResponse_CauseCode * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageFailureCode = pTLVx10->mCauseCode; } } return rc; } /*=========================================================================== METHOD: ParseGetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ O ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ O ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { // Validate arguments if (pIn == 0 || addressSize == 0 || pSMSCAddress == 0 || typeSize == 0 || pSMSCType == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume empty pSMSCAddress[0] = 0; pSMSCType[0] = 0; // Get the address (mandatory) const sWMSGetSMSCAddressResponse_Address * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } // Handle the type as a string (maximum 3 chars) std::string smscType( &pTLVx01->mSMSCAddressType[0], 3 ); // Is the SMSC type present? (optional) ULONG smscTypeLen = (ULONG)smscType.size(); if (smscTypeLen > 0) { // Space to perform copy? if (typeSize < smscTypeLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCType, &pTLVx01->mSMSCAddressType[0], smscTypeLen ); pSMSCType[smscTypeLen] = 0; } // Treat the address as a null terminated string std::string smscAddr( (const CHAR *)pTLVx01 + sizeof( sWMSGetSMSCAddressResponse_Address ), pTLVx01->mSMSCAddressLength ); ULONG smscAddrLen = (ULONG)smscAddr.size(); if (addressSize < smscAddrLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCAddress, smscAddr.c_str(), addressSize ); pSMSCAddress[addressSize] = 0; return rc; } /*=========================================================================== METHOD: PackSetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ) { // Validate arguments if (pOut == 0 || pSMSCAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // The TLV contains only the address std::string smscAddr( pSMSCAddress ); // Check size WORD tlvx01Sz = (WORD)smscAddr.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscAddr.c_str(), tlvx01Sz ); offset += tlvx01Sz; // smscType is optional if (pSMSCType != 0) { // The TLV contains only the type std::string smscType( pSMSCType ); if (smscType.size() != 0) { // Check size WORD tlvx10Sz = (WORD)smscType.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscType.c_str(), tlvx10Sz ); offset += tlvx10Sz; } } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pIn == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxRoutes = *pRouteSize; *pRouteSize = 0; // Get the route list const sWMSGetRoutesResponse_RouteList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG routeCount = pTLVx01->mNumberOfRoutes; if (routeCount > (ULONG)maxRoutes) { routeCount = (ULONG)maxRoutes; } const sWMSGetRoutesResponse_RouteList::sRoute * pInRoute; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList ) + sizeof( sWMSGetRoutesResponse_RouteList::sRoute ) * routeCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRoute = (const sWMSGetRoutesResponse_RouteList::sRoute *) ((const BYTE *)pTLVx01 + sizeof( sWMSGetRoutesResponse_RouteList )); ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { *pRouteArray++ = pInRoute->mMessageType; *pRouteArray++ = pInRoute->mMessageClass; *pRouteArray++ = pInRoute->mStorageType; *pRouteArray++ = pInRoute->mRouteValue; pInRoute++; } *pRouteSize = (BYTE)routeCount; return rc; } /*=========================================================================== METHOD: PackSetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pOut == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } UINT16 routeCount = (ULONG)*pRouteSize; // Check size WORD tlvx01Sz = sizeof( sWMSSetRoutesRequest_RouteList ) + sizeof( sWMSSetRoutesRequest_RouteList::sRoute ) * routeCount; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Add route count sWMSSetRoutesRequest_RouteList * pTLVx01; pTLVx01 = (sWMSSetRoutesRequest_RouteList*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mNumberOfRoutes = routeCount; offset += sizeof( sWMSSetRoutesRequest_RouteList ); sWMSSetRoutesRequest_RouteList::sRoute * pOutRoute; // Align to the first array element pOutRoute = (sWMSSetRoutesRequest_RouteList::sRoute *)(pOut + offset); // Add the routes ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { pOutRoute->mMessageType = (eQMIWMSMessageTypes)*pRouteArray++; pOutRoute->mMessageClass = (eQMIWMSMessageClasses)*pRouteArray++; pOutRoute->mStorageType = (eQMIWMSStorageTypes)*pRouteArray++; pOutRoute->mReceiptAction = (eQMIWMSReceiptActions)*pRouteArray++; pOutRoute++; offset += sizeof( sWMSSetRoutesRequest_RouteList::sRoute ); } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiConnectionMgmt/000077500000000000000000000000001455567757300240105ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiConnectionMgmt/GobiConnectionMgmt.cpp000066400000000000000000000377501455567757300302550ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.cpp DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Global object CGobiConnectionMgmtDLL gDLL; // Interval between traffic processing loop iterations (milliseconds) const ULONG TRAFFIC_INTERVAL_MS = 300000; // Maximum amount of time to wait for the traffic thread to exit const ULONG THREAD_EXIT_TIME = 2000; /*=========================================================================== METHOD: TrafficProcessThread (Free Method) DESCRIPTION: QMI traffic process thread - processes all traffic in order to fire off QMI traffic related callbacks PARAMETERS: pArg [ I ] - Object to interface to RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * TrafficProcessThread( PVOID pArg ) { // Keep running? bool bRun = false; // Create a vector of the objects to wait on std::vector events; // Store the index to service type for use later std::map services; // Grab API object cGobiConnectionMgmt * pAPI = (cGobiConnectionMgmt *)pArg; if (pAPI != 0) { // Time to go to work bRun = true; // Add the thread exit event events.push_back( &pAPI->mExitEvent ); // Grab signal events for our protocol servers std::map ::const_iterator pIter; pIter = pAPI->mServers.begin(); while (pIter != pAPI->mServers.end()) { eQMIService svc = pIter->first; cQMIProtocolServer * pServer = pAPI->GetServer( svc ); if (pServer != 0) { // Grab the log from the server const cProtocolLog & log = pServer->GetLog(); // Grab the Signal event, if it exists cEvent & sigEvent = log.GetSignalEvent(); services[events.size()] = svc; events.push_back( &sigEvent ); } pIter++; } } TRACE( "GobiConnectionMgmt traffic thread [%u] started\n", (UINT)pthread_self() ); // Loop waiting for exit event while (bRun == true) { // Wait for activity DWORD ignoredVal, index; int nRet = WaitOnMultipleEvents( events, TRAFFIC_INTERVAL_MS, ignoredVal, index ); // Timeout if (nRet == -ETIME) { // Do nothing } // Error? else if (nRet <= 0) { TRACE( "GobiConnectionMgmt traffic thread wait error %d\n", nRet ); bRun = false; } // Exit event? else if (index == 0) { bRun = false; } else if (index < events.size()) { // Run ProcessTraffic() for this service type if (services.find( index ) != services.end()) { pAPI->ProcessTraffic( services[index] ); } } else { // Fatal error bRun = false; } } TRACE( "GobiConnectionMgmt traffic thread [%u] exited\n", (UINT)pthread_self() ); if (pAPI != 0) { pAPI->mThreadCleanupFinished = true; } return 0; } /*=========================================================================== METHOD: CallbackThread (Free Method) DESCRIPTION: Thread to execute a callback asynchronously PARAMETERS: pArg [ I ] - The cGobiCMCallback object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * CallbackThread( PVOID pArg ) { cGobiCMCallback * pCB = (cGobiCMCallback *)pArg; if (pCB == 0) { ASSERT( 0 ); return 0; } pCB->Call(); delete pCB; pCB = 0; return 0; } /*=========================================================================*/ // CGobiConnectionMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::CGobiConnectionMgmtDLL() { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::~CGobiConnectionMgmtDLL() { std::map tmpAPI = mAPI; std::map ::const_iterator pIter; pIter = tmpAPI.begin(); while (pIter != tmpAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; if (pAPI != 0) { pAPI->Cleanup(); delete pAPI; } pIter++; } mAPI.clear(); pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: CreateAPI (Public Method) DESCRIPTION: Create a new API object RETURN VALUE: GOBIHANDLE - Handle to new API object (0 upon failure) ===========================================================================*/ GOBIHANDLE CGobiConnectionMgmtDLL::CreateAPI() { pthread_mutex_lock( &mSyncSection ); cGobiConnectionMgmt * pAPI = new cGobiConnectionMgmt; if (pAPI != 0) { bool bInit = pAPI->Initialize(); if (bInit == true) { mAPI[(GOBIHANDLE)pAPI] = pAPI; } } pthread_mutex_unlock( &mSyncSection ); return (GOBIHANDLE)pAPI; } /*=========================================================================== METHOD: DeleteAPI (Public Method) DESCRIPTION: Delete an existing API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: None ===========================================================================*/ void CGobiConnectionMgmtDLL::DeleteAPI( GOBIHANDLE handle ) { pthread_mutex_lock( &mSyncSection ); std::map ::iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; delete pAPI; mAPI.erase( pIter ); } pthread_mutex_unlock( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the requested API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: cGobiConnectionMgmt * ===========================================================================*/ cGobiConnectionMgmt * CGobiConnectionMgmtDLL::GetAPI( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = 0; pthread_mutex_lock( &mSyncSection ); std::map ::const_iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { pAPI = pIter->second; } pthread_mutex_unlock( &mSyncSection ); return pAPI; } /*=========================================================================*/ // cGobiConnectionMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::cGobiConnectionMgmt() : cGobiQMICore(), mbThreadStarted( false ), mThreadID( 0 ), mThreadCleanupFinished( false ) { // Nothing to do but init those variables } /*=========================================================================== METHOD: ~cGobiConnectionMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::~cGobiConnectionMgmt() { Disconnect(); } /*=========================================================================== METHOD: ProcessTraffic (Internal Method) DESCRIPTION: Process traffic in a QMI server protocol log, this is done to exercise QMI indication related callbacks PARAMETERS: svc [ I ] - QMI Service type RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessTraffic( eQMIService svc ) { ULONG count = 0; std::map ::iterator pIter; pIter = mServers.find( svc ); if (pIter == mServers.end()) { return; } sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return; } // Grab the service ID from the service eQMIService svcID = pSvr->GetServiceType(); if (svcID == eQMI_SVC_ENUM_BEGIN) { return; } // Grab the log from the server const cProtocolLog & logSvr = pSvr->GetLog(); // New items to process? count = logSvr.GetCount(); if (count != INVALID_LOG_INDEX && count > si.mLogsProcessed) { for (ULONG i = si.mLogsProcessed; i < count; i++) { sProtocolBuffer buf = logSvr.GetBuffer( i ); if (buf.IsValid() == false) { continue; } eProtocolType pt = buf.GetType(); if (IsQMIProtocolRX( pt ) == false) { continue; } sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsIndication() == false) { continue; } ULONG msgID = qmiBuf.GetMessageID(); tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); if (pIter == mCallbacks.end()) { continue; } ULONG outLen = 0; const BYTE * pOutput = (const BYTE *)qmiBuf.GetRawContents( outLen ); tCallbackValue cv = pIter->second; cGenericCallback * pCB = 0; pCB = new cGenericCallback( cv.first, svcID, msgID, cv.second, outLen, pOutput ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } si.mLogsProcessed = count; } } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - QMI control file to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiConnectionMgmt::Connect( LPCSTR pQMIFile, std::set & services ) { std::set svcs = cGobiQMICore::Connect( pQMIFile, services ); if (svcs.size() > 0) { // Start the traffic processing thread? if (mbThreadStarted == false) { // Clear mExitEvent; mExitEvent.Clear(); pthread_create( &mThreadID, NULL, TrafficProcessThread, this ); mbThreadStarted = true; } } return svcs; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Disconnect() { // Clear all callback function pointers mCallbacks.clear(); // Exit traffic processing thread if (mbThreadStarted == true) { // Signal thread to exit mExitEvent.Set( 0 ); // If we are not being called from the thread itself then wait for // it to exit, if not then it will have to exit automatically if (pthread_self() != mThreadID) { if (mThreadID != 0) { pthread_join( mThreadID, NULL ); } } } // Clear out thread handle/ID mbThreadStarted = false; mThreadID = 0; return cGobiQMICore::Disconnect(); } /*=========================================================================== METHOD: SetGenericCallback (Public Method) DESCRIPTION: Enable/disable generic callback function PARAMETERS: svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Generic callback pointer userValue [ I ] - User value to pass back to callback RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ) { // Assume success eGobiError rc = eGOBI_ERR_NONE; tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); bool bOn = (pCallback != 0 && pIter == mCallbacks.end()); bool bOff = (pCallback == 0 && pIter != mCallbacks.end()); bool bReplace = (pCallback != 0 && pIter != mCallbacks.end()); if (bOn == true || bReplace == true) { tCallbackValue cv( pCallback, userValue ); mCallbacks[ck] = cv; } else if (bOff == true) { mCallbacks.erase( pIter ); } return rc; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiConnectionMgmt/GobiConnectionMgmt.h000066400000000000000000000203171455567757300277110ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.h DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; extern "C" { // Generic callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ); }; // CallbackThread prototype // Thread to execute a callback asynchronously void * CallbackThread( PVOID pArg ); /*=========================================================================*/ // Class cGobiCMCallback /*=========================================================================*/ class cGobiCMCallback { public: // (Inline) Constructor cGobiCMCallback() { }; // (Inline) Destructor virtual ~cGobiCMCallback() { }; // (Inline) Initialize the callback object by starting the thread bool Initialize() { // Start the thread pthread_t threadID; pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); int nRC = pthread_create( &threadID, &attributes, CallbackThread, this ); if (nRC == 0) { // Success! return true; } return false; }; protected: // Call the function virtual void Call() = 0; // Function thread gets full access friend void * CallbackThread( PVOID pArg ); }; /*=========================================================================*/ // Class cGenericCallback /*=========================================================================*/ class cGenericCallback : public cGobiCMCallback { public: // (Inline) Constructor cGenericCallback( tFNGenericCallback pCallback, ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ) : mServiceID( svcID ), mMessageID( msgID ), mUserValue( userValue ), mOutputLen( 0 ), mpCallback( pCallback ) { memset( &mOutput[0], 0, QMI_MAX_BUFFER_SIZE ); if (outLen <= QMI_MAX_BUFFER_SIZE && pOut != 0) { mOutputLen = outLen; memcpy( &mOutput[0], pOut, outLen ); } }; // (Inline) Destructor virtual ~cGenericCallback() { mpCallback = 0; }; protected: /* Service ID */ ULONG mServiceID; /* Message ID */ ULONG mMessageID; /* User value */ ULONG_PTR mUserValue; /* Actual size of output content */ ULONG mOutputLen; /* Output content buffer */ BYTE mOutput[QMI_MAX_BUFFER_SIZE]; /* Callback function */ tFNGenericCallback mpCallback; // Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mServiceID, mMessageID, mUserValue, mOutputLen, (const BYTE *)&mOutput[0] ); } }; }; /*=========================================================================*/ // Class cGobiConnectionMgmt /*=========================================================================*/ class cGobiConnectionMgmt : public cGobiQMICore { public: // Constructor cGobiConnectionMgmt(); // Destructor virtual ~cGobiConnectionMgmt(); // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Enable/disable generic callback function eGobiError SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ); protected: // Process new traffic void ProcessTraffic( eQMIService svc ); /* Is there an active thread? */ bool mbThreadStarted; /* ID of traffic processing thread */ pthread_t mThreadID; /* Traffic processing thread exit event */ cEvent mExitEvent; /* Has the protocol server thread finished cleanup? */ bool mThreadCleanupFinished; /* Generic callback function key/value */ typedef std::pair tCallbackKey; typedef std::pair tCallbackValue; /* Callback functions */ std::map mCallbacks; // Traffic process thread gets full access friend VOID * TrafficProcessThread( PVOID pArg ); }; /*=========================================================================*/ // Class CGobiConnectionMgmtDLL /*=========================================================================*/ class CGobiConnectionMgmtDLL { public: // Constructor CGobiConnectionMgmtDLL(); // Destructor virtual ~CGobiConnectionMgmtDLL(); // Create a new API object GOBIHANDLE CreateAPI(); // Delete an existing API object void DeleteAPI( GOBIHANDLE handle ); // Return the requested API object cGobiConnectionMgmt * GetAPI( GOBIHANDLE handle ); protected: /* API interface object */ std::map mAPI; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern CGobiConnectionMgmtDLL gDLL; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiConnectionMgmt/GobiConnectionMgmtAPI.h000066400000000000000000017213031455567757300302470ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPI.h DESCRIPTION: QUALCOMM Connection Management API for Gobi Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif /*=========================================================================*/ // Definitions /*=========================================================================*/ // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; #ifdef __cplusplus extern "C" { #endif // Geeneric callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); #ifdef __cplusplus }; #endif /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ); /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ); /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ); /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ); /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo2 DESCRIPTION: The function sends 'NAS/Configure Signal Info 2 Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo2( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTDSCDMACellInfo DESCRIPTION: The function sends 'NAS/Get TD-SCDMA Cell Info Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSGetLineSwitchingStatus DESCRIPTION: The function sends 'Voice/ALS Get Line Switching Status Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetLineSwitchingStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSGetSelectedLine DESCRIPTION: The function sends 'Voice/ALS Get Selected Line Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetSelectedLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiConnectionMgmt/GobiConnectionMgmtAPIEnums.h000066400000000000000000011434231455567757300312600ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIEnums.h DESCRIPTION: Declaration of the Gobi API enumerations Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Gobi API error code enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrors) eGOBI_ERR_QMI_OFFSET = 1000, }; // Enum to describe possible QMI services enum eQMIService:BYTE { eQMI_SVC_CONTROL = 0, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_RESERVED_13, // 013 Reserved eQMI_SVC_RMTFS, // 014 Remote file system service eQMI_SVC_RESERVED_15, // 015 Reserved eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_RESERVED_18, // 018 Reserved eQMI_SVC_RESERVED_19, // 019 Reserved eQMI_SVC_CSD, // 020 Core sound driver service eQMI_SVC_EFS, // 021 Embedded file system service eQMI_SVC_RESERVED_22, // 022 Reserved eQMI_SVC_TS, // 023 Thermal sensors service eQMI_SVC_TMD, // 024 Thermal mitigation device service eQMI_SVC_RESERVED_25, // 025 Reserved eQMI_SVC_RESERVED_26, // 026 Reserved eQMI_SVC_RESERVED_27, // 027 Reserved eQMI_SVC_RESERVED_28, // 028 Reserved eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service }; // Enum to describe QMI CTL Message types enum eQMIMessageCTL:WORD { eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode }; // Enum to describe QMI WDS Message types enum eQMIMessageWDS:WORD { eQMI_WDS_RESET = 0, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_SET_INDICATION, // 003 Set indication conditions eQMI_WDS_START_NET = 32, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_FMC_TUNNEL, // 078 Set FMC tunnel parameters eQMI_WDS_CLEAR_FMC_TUNNEL, // 079 Clear FMC tunnel parameters eQMI_WDS_GET_FMC_TUNNEL, // 080 Get FMC tunnel parameters eQMI_WDS_SET_AUTOCONNECT, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_TMGI_ACTIVATE, // 101 Activate eMBMS TMGI eQMI_WDS_TMGI_ACT_IND = 101, // 101 eMBMS TMGI activate indication eQMI_WDS_TMGI_DEACTIVATE, // 102 Activate eMBMS TMGI eQMI_WDS_TMGI_DEACT_IND = 102, // 102 eMBMS TMGI activate indication eQMI_WDS_TMGI_LIST_QUERY, // 103 Query for eMBMS TMGI list eQMI_WDS_TMGI_LIST_IND, // 104 eMBMS TMGI list query indication eQMI_WDS_GET_PREF_DATA_SYS, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_GET_CURR_DATA_SYS, // 107 Get current data systems status eQMI_WDS_GET_PDN_THROTTLE, // 108 Get PDN throttle info eQMI_WDS_GET_LTE_ATTACH = 133, // 133 Get LTE attach parameters eQMI_WDS_RESET_PKT_STATS, // 134 Reset packet statistics eQMI_WDS_GET_FLOW_CTRL_STATUS, // 135 Get flow control status }; // Enum to describe QMI DMS Message types enum eQMIMessageDMS:WORD { eQMI_DMS_RESET = 0, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_GET_CURRENT_PRL_INFO,// 83 Get current PRL info }; // Enum to describe QMI NAS Message types enum eQMIMessageNAS:WORD { eQMI_NAS_RESET = 0, // 000 Reset NAS service state variables eQMI_NAS_ABORT, // 001 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 002 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 002 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 003 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 032 Get the signal strength eQMI_NAS_SCAN_NETS, // 033 Scan for visible network eQMI_NAS_REGISTER_NET, // 034 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 035 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 036 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 036 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 037 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 038 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 039 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 040 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 041 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 042 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 043 Get the technology preference eQMI_NAS_GET_ACCOLC, // 044 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 045 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 046 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 047 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 048 Set various network parameters eQMI_NAS_GET_RF_INFO, // 049 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 050 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 051 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 052 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 052 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 055 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 056 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 056 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 057 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 058 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 059 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 060 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 061 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 062 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 063 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 064 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 065 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 066 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 067 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 068 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 069 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 070 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 071 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 072 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 073 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 075 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 076 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 077 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 078 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 079 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 080 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 081 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 082 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 083 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 084 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 085 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 086 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 087 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 088 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 089 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 090 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 091 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 092 Get dual standby preference eQMI_NAS_DETACH_LTE, // 093 Detach the current LTE system eQMI_NAS_BLOCK_LTE_PLMN, // 094 Block LTE PLMN eQMI_NAS_UNBLOCK_LTE_PLMN, // 095 Unblock LTE PLMN eQMI_NAS_RESET_LTE_PLMN_BLK, // 096 Reset LTE PLMN blocking eQMI_NAS_CUR_PLMN_NAME_IND, // 097 Current PLMN name indication eQMI_NAS_CONFIG_EMBMS, // 098 Configure eMBMS eQMI_NAS_GET_EMBMS_STATUS, // 099 Get eMBMS status eQMI_NAS_EMBMS_STATUS_IND, // 100 eMBMS status indication eQMI_NAS_GET_CDMA_POS_INFO, // 101 Get CDMA position info eQMI_NAS_RF_BAND_INFO_IND, // 102 RF band info indication eQMI_NAS_FORCE_NET_SEARCH, // 103 Force network search eQMI_NAS_NET_REJECT_IND, // 104 Network reject indication eQMI_NAS_GET_MANAGED_ROAM, // 105 Get managed roaming configuration eQMI_NAS_RTRE_CONFIG_IND, // 106 RTRE configuration indication eQMI_NAS_GET_CENTRALIZED_EOM, // 107 Get centralized EONS support }; // Enum to describe QMI WMS Message types enum eQMIMessageWMS:WORD { eQMI_WMS_RESET = 0, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_GET_DOMAIN_PREF_CFG, // 81 Get domain pref config eQMI_WMS_SET_DOMAIN_PREF_CFG, // 82 Set domain pref config eQMI_WMS_GET_RETRY_PERIOD, // 83 Get retry period eQMI_WMS_GET_RETRY_INTERVAL, // 84 Get retry interval eQMI_WMS_GET_DC_DISCO_TIMER, // 85 Get DC auto-disconnect timer eQMI_WMS_GET_MEMORY_STATUS, // 86 Get memory storage status eQMI_WMS_GET_PRIMARY_CLIENT, // 87 Get primary cleint eQMI_WMS_GET_SUBSCR_BINDING, // 88 Get client subscription binding eQMI_WMS_ASYNC_RAW_SEND, // 89 Asynchronously send a raw message eQMI_WMS_ASYNC_RAW_SEND_IND = 89,// 89 Asynchronous send indication eQMI_WMS_ASYNC_SEND_ACK, // 90 Asynchronously send ACK eQMI_WMS_ASYNC_SEND_ACK_IND = 90,// 90 Asynchronou send ACK indication eQMI_WMS_ASYNC_MEMORY_SEND, // 91 Async send msg from memory store eQMI_WMS_ASYNC_MEM_SEND_IND = 91,// 91 Async memory store send indication eQMI_WMS_GET_SERVICE_READY, // 92 Get service ready status eQMI_WMS_SERVICE_READY_IND, // 93 Service ready status indication eQMI_WMS_BC_CONFIG_IND, // 94 Broadcast config indication }; // Enum to describe QMI PDS Message types enum eQMIMessagePDS:WORD { eQMI_PDS_RESET = 0, // 000 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 001 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 001 PDS report indication eQMI_PDS_GET_STATE = 32, // 032 Return PDS service state eQMI_PDS_STATE_IND = 32, // 032 PDS service state indication eQMI_PDS_SET_STATE, // 033 Set PDS service state eQMI_PDS_START_SESSION, // 034 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 035 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 036 Manual tracking session position eQMI_PDS_END_SESSION, // 037 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 038 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 039 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 040 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 041 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 042 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 043 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 044 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 045 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 046 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 047 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 048 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 049 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 050 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 051 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 052 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 053 Request single position fix eQMI_PDS_GET_VERSION, // 054 Get PDS service version eQMI_PDS_INJECT_XTRA, // 055 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 056 Inject position data eQMI_PDS_INJECT_WIFI, // 057 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 058 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 059 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 060 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 061 Inject absolute time eQMI_PDS_INJECT_EFS, // 062 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 063 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 064 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 065 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 066 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 067 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 068 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 069 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 070 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 070 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 071 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 072 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 072 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 073 Force receiver off eQMI_PDS_GET_METHODS = 80, // 080 Get GPS position methods state eQMI_PDS_SET_METHODS, // 081 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 082 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 083 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 084 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 085 Set sensor config eQMI_PDS_GET_NAV_CFG, // 086 Get navigation config eQMI_PDS_SET_NAV_CFG, // 087 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 090 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 091 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 091 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 092 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 093 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 094 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 095 Set cell database control eQMI_PDS_READY_IND, // 096 Ready indication eQMI_PDS_INJECT_MOTION_DATA, // 097 Inject motion data eQMI_PDS_SET_GNSS_ERR_REPORT, // 098 Set GNSS error recovery report eQMI_PDS_GNSS_ERR_IND = 98, // 098 GNSS error recovery report indication eQMI_PDS_RESET_SERVICE, // 099 Reset location service eQMI_PDS_INJECT_TEST_DATA, // 100 Inject test data eQMI_PDS_SET_GNSS_RF_CFG, // 101 Set GNSS RF config }; // Enum to describe QMI AUTH Message types enum eQMIMessageAUTH:WORD { eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND, // 38 AKA algorithm result indication }; // Enum to describe QMI VOICE Message types enum eQMIMessageVoice:WORD { eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls }; // Enum to describe QMI UIM Message types enum eQMIMessageUIM:WORD { eQMI_UIM_RESET = 0, // 00 Reset eQMI_UIM_READ_TRANSPARENT = 32, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SEND_ADPU_IND = 59, // 59 Send ADPU indication eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR }; // Enum to describe QMI PBM Message types enum eQMIMessagePBM:WORD { eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_GET_SUBSCRIPTION, // 27 Get subscription client is bound to }; // Enum to describe QMI LOC Message types enum eQMIMessageLOC:WORD { eQMI_LOC_CLIENT_REVISION = 32, // 032 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 033 Register for events/indications eQMI_LOC_START, // 034 Start GPS session eQMI_LOC_STOP, // 035 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 036 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 037 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 038 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 039 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 040 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 041 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 042 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 043 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 044 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 045 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 046 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 047 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 048 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 049 Server connection req indication eQMI_LOC_GET_REV_REQ, // 050 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 050 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 051 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 051 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 052 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 052 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 053 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 053 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 054 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 054 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 055 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 055 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 056 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 056 Inject UTC time indication eQMI_LOC_INJECT_POS, // 057 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 057 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 058 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 058 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 059 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 059 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 060 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 060 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 061 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 061 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 062 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 062 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 063 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 063 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 064 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 064 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 065 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 065 Get low power mode config indication eQMI_LOC_SET_SERVER, // 066 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 066 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 067 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 067 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 068 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 068 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 069 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 069 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 070 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 070 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 071 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 071 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 072 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 072 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 073 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 073 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 074 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 074 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 075 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 075 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 076 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 076 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 077 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 077 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 078 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 078 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 079 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 079 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 080 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 080 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 081 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 081 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 082 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 082 Get external power config indication eQMI_LOC_INFORM_CONN, // 083 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 083 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 084 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 084 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 085 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 085 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 086 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 086 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 087 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 087 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 088 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 088 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 089 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 089 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 090 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 090 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 091 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 091 Get sensor performance control ind eQMI_LOC_INJ_SUPL_CERT, // 092 Inject SUPL certificate eQMI_LOC_INJ_SUPL_CERT_IND = 92, // 092 Inject SUPL certificate indication eQMI_LOC_DEL_SUPL_CERT, // 093 Delete SUPL certificate eQMI_LOC_DEL_SUPL_CERT_IND = 93, // 093 Delete SUPL certificate indication eQMI_LOC_SET_ENGINE_CFG, // 094 Set position engine config eQMI_LOC_SET_ENGINE_CFG_IND = 94,// 094 Set position engine config ind eQMI_LOC_GET_ENGINE_CFG, // 095 Get position engine config eQMI_LOC_GET_ENGINE_CFG_IND = 95,// 095 Get position engine config ind eQMI_LOC_GEOFENCE_NOTIF_IND, // 096 Geofence notification indication eQMI_LOC_GEOFENCE_ALERT_IND, // 097 Geofence alert indication eQMI_LOC_GEOFENCE_BREACH_IND, // 098 Geofence breach indication eQMI_LOC_ADD_GEOFENCE, // 099 Add circular geofence eQMI_LOC_ADD_GEOFENCE_IND = 99, // 099 Add circular geofence indication eQMI_LOC_DEL_GEOFENCE, // 100 Delete geofence eQMI_LOC_DEL_GEOFENCE_IND = 100, // 100 Delete geofence indication eQMI_LOC_QRY_GEOFENCE, // 101 Query geofence eQMI_LOC_QRY_GEOFENCE_IND = 101, // 101 Query geofence indication eQMI_LOC_EDIT_GEOFENCE, // 102 Edit geofence eQMI_LOC_EDIT_GEOFENCE_IND = 102,// 102 Edit geofence indication eQMI_LOC_GET_BEST_POS, // 103 Get best available position eQMI_LOC_GET_BEST_POS_IND = 103, // 103 Get best available position ind }; // Enum to describe QMI CAT Message types enum eQMIMessageCAT:WORD { eQMI_CAT_RESET = 0, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_GET_TERMINAL_PROFILE, // 44 Get current modem terminal profile eQMI_CAT_SET_CONFIG, // 45 Set configuration eQMI_CAT_GET_CONFIG, // 46 Get configuration }; // Enum to describe QMI AUTH AKA Result enum eQMIAUTHAKAResult:UINT8 { eQMIAUTHAKAResult_Success = 0, eQMIAUTHAKAResult_SyncFailure = 1, eQMIAUTHAKAResult_Failure = 2, }; // Enum to describe QMI AUTH AKA Version enum eQMIAUTHAKAVersion:UINT8 { eQMIAUTHAKAVersion_Version1 = 0, eQMIAUTHAKAVersion_Version2 = 1, }; // Enum to describe QMI AUTH EAP Result enum eQMIAUTHEAPResult:UINT8 { eQMIAUTHEAPResult_Success = 0, eQMIAUTHEAPResult_Failure = 1, }; // Enum to describe QMI AUTH SIM AKA Algorithm enum eQMIAUTHSIMAKAAlgorithm:UINT32 { eQMIAUTHSIMAKAAlgorithm_None = 0, eQMIAUTHSIMAKAAlgorithm_SHA1 = 1, eQMIAUTHSIMAKAAlgorithm_MILENAGE = 2, eQMIAUTHSIMAKAAlgorithm_CAVE = 3, eQMIAUTHSIMAKAAlgorithm_GSM = 4, eQMIAUTHSIMAKAAlgorithm_USIMGSM = 5, }; // Enum to describe QMI CAT Activate Targets enum eQMICATActivateTargets:UINT8 { eQMICATActivateTargets_UICCCLFInterface = 1, }; // Enum to describe QMI CAT Address NPI enum eQMICATAddressNPI:UINT8 { eQMICATAddressNPI_Unknown = 0, eQMICATAddressNPI_ISDNTelephony = 1, eQMICATAddressNPI_DataNPI = 2, eQMICATAddressNPI_TelexNPI = 3, eQMICATAddressNPI_PrivateNPI = 4, eQMICATAddressNPI_ExtensionIsReserved = 15, }; // Enum to describe QMI CAT Address TON enum eQMICATAddressTON:UINT8 { eQMICATAddressTON_Unknown = 0, eQMICATAddressTON_InternationalNumber = 1, eQMICATAddressTON_NationalNumber = 2, eQMICATAddressTON_NetworkSpecificNumber = 3, }; // Enum to describe QMI CAT Address Type enum eQMICATAddressType:UINT8 { eQMICATAddressType_NoAddressGiven = 1, eQMICATAddressType_Dynamic = 2, eQMICATAddressType_IPv4 = 3, eQMICATAddressType_IPv6 = 4, }; // Enum to describe QMI CAT Alpha ID Command Type enum eQMICATAlphaIDCommandType:UINT8 { eQMICATAlphaIDCommandType_SendSMSProactiveCommand = 1, }; // Enum to describe QMI CAT Bearer enum eQMICATBearer:UINT8 { eQMICATBearer_SMS = 0, eQMICATBearer_CSD = 1, eQMICATBearer_USSD = 2, eQMICATBearer_GPRS = 3, eQMICATBearer_Default = 4, }; // Enum to describe QMI CAT Bearer Capability Repeat Indicator enum eQMICATBearerCapabilityRepeatIndicator:UINT8 { eQMICATBearerCapabilityRepeatIndicator_AlternateMode = 0, eQMICATBearerCapabilityRepeatIndicator_SequentialMode = 1, }; // Enum to describe QMI CAT Browser Termination Causes enum eQMICATBrowserTerminationCauses:UINT32 { eQMICATBrowserTerminationCauses_UserTerminated = 0, eQMICATBrowserTerminationCauses_ErrorTerminated = 1, }; // Enum to describe QMI CAT CSD Bearer Name enum eQMICATCSDBearerName:UINT8 { eQMICATCSDBearerName_DataCircuitAsyncUDIOr31kHzModem = 0, eQMICATCSDBearerName_DataCircuitSyncUDIOr31kHzModem = 1, eQMICATCSDBearerName_PADAccessAsyncUDI = 2, eQMICATCSDBearerName_PacketAccessSyncUDI = 3, eQMICATCSDBearerName_DataCircuitAsyncRDI = 4, eQMICATCSDBearerName_DataCircuitSyncRDI = 5, eQMICATCSDBearerName_PADAccessAsyncRDI = 6, eQMICATCSDBearerName_PacketAccessSyncRDI = 7, }; // Enum to describe QMI CAT Call Control Result enum eQMICATCallControlResult:UINT8 { eQMICATCallControlResult_AllowedWithNoModification = 0, eQMICATCallControlResult_NotAllowed = 1, eQMICATCallControlResult_AllowedWithModification = 2, }; // Enum to describe QMI CAT Call Setup Requirement enum eQMICATCallSetupRequirement:UINT8 { eQMICATCallSetupRequirement_NoOtherCalls = 0, eQMICATCallSetupRequirement_HoldActiveCalls = 1, eQMICATCallSetupRequirement_DisconnectActiveCalls = 2, }; // Enum to describe QMI CAT Channel State enum eQMICATChannelState:UINT8 { eQMICATChannelState_ClosedState = 0, eQMICATChannelState_ListenState = 1, eQMICATChannelState_EstablishedState = 2, }; // Enum to describe QMI CAT Command Format enum eQMICATCommandFormat:UINT8 { eQMICATCommandFormat_Raw = 1, eQMICATCommandFormat_Decoded = 2, }; // Enum to describe QMI CAT Command ID enum eQMICATCommandID:UINT8 { eQMICATCommandID_DisplayText = 1, eQMICATCommandID_GetInkey = 2, eQMICATCommandID_GetInput = 3, eQMICATCommandID_LaunchBrowser = 4, eQMICATCommandID_PlayTone = 5, eQMICATCommandID_SelectItem = 6, eQMICATCommandID_SendSMS = 7, eQMICATCommandID_SendSS = 8, eQMICATCommandID_SendUSSD = 9, eQMICATCommandID_SetupCallUserConfiguration = 10, eQMICATCommandID_SetupCallAlphaDisplay = 11, eQMICATCommandID_SetupMenu = 12, eQMICATCommandID_SetupIdleText = 13, eQMICATCommandID_ProvideLocalInformationLanguage = 14, eQMICATCommandID_SendDTMF = 15, eQMICATCommandID_LanguageNotification = 16, eQMICATCommandID_SetupEventUserActivity = 17, eQMICATCommandID_SetupEventIdleScreenNotify = 18, eQMICATCommandID_SetupEventLanguageSelectionNotify = 19, eQMICATCommandID_OpenChannel = 20, eQMICATCommandID_CloseChannel = 21, eQMICATCommandID_ReceiveData = 22, eQMICATCommandID_SendData = 23, eQMICATCommandID_Activate = 24, eQMICATCommandID_SetupEventHCIConnectivity = 25, }; // Enum to describe QMI CAT Config Modes enum eQMICATConfigModes:UINT8 { eQMICATConfigModes_DisabledMode = 0, eQMICATConfigModes_GobiMode = 1, eQMICATConfigModes_AndroidMode = 2, eQMICATConfigModes_DecodedMode = 3, eQMICATConfigModes_DecodedPullOnlyMode = 4, eQMICATConfigModes_CustomRawMode = 5, eQMICATConfigModes_CustomDecodedMode = 6, }; // Enum to describe QMI CAT Connection Element enum eQMICATConnectionElement:UINT8 { eQMICATConnectionElement_Transparent = 0, eQMICATConnectionElement_Nontransparent = 1, eQMICATConnectionElement_BothTransparentPreferred = 2, eQMICATConnectionElement_BothNontransparentPreferred = 3, }; // Enum to describe QMI CAT Data Coding Scheme enum eQMICATDataCodingScheme:UINT8 { eQMICATDataCodingScheme_7BitGSM = 0, eQMICATDataCodingScheme_8BitGSM = 1, eQMICATDataCodingScheme_UCS2 = 2, }; // Enum to describe QMI CAT Decoded Envelope Command enum eQMICATDecodedEnvelopeCommand:UINT16 { eQMICATDecodedEnvelopeCommand_MenuSelection = 1, eQMICATDecodedEnvelopeCommand_EventDownloadLanguageSelection = 2, eQMICATDecodedEnvelopeCommand_EventDownloadUserActivity = 3, eQMICATDecodedEnvelopeCommand_EventDownloadIdleScreenAvailable = 4, eQMICATDecodedEnvelopeCommand_SendCallControl = 5, eQMICATDecodedEnvelopeCommand_EventDownloadHCIConnectivity = 6, eQMICATDecodedEnvelopeCommand_EventBrowserTermination = 7, }; // Enum to describe QMI CAT Deliver Error SDU enum eQMICATDeliverErrorSDU:UINT8 { eQMICATDeliverErrorSDU_No = 0, eQMICATDeliverErrorSDU_Yes = 1, eQMICATDeliverErrorSDU_NoDetect = 2, eQMICATDeliverErrorSDU_SubscribedValue = 3, }; // Enum to describe QMI CAT Delivery Order enum eQMICATDeliveryOrder:UINT8 { eQMICATDeliveryOrder_No = 0, eQMICATDeliveryOrder_Yes = 1, eQMICATDeliveryOrder_SubscribedValue = 2, }; // Enum to describe QMI CAT Display Icon Only enum eQMICATDisplayIconOnly:UINT8 { eQMICATDisplayIconOnly_DoNotDisplayTheIcon = 0, eQMICATDisplayIconOnly_DisplayOnlyTheIcon = 1, }; // Enum to describe QMI CAT Envelope Command Type enum eQMICATEnvelopeCommandType:UINT16 { eQMICATEnvelopeCommandType_MenuSelection = 1, eQMICATEnvelopeCommandType_EventDownloadUserActivity = 2, eQMICATEnvelopeCommandType_EventDownloadIdleScreenAvailable = 3, eQMICATEnvelopeCommandType_EventDownloadLanguageSelection = 4, eQMICATEnvelopeCommandType_UnknownType = 5, eQMICATEnvelopeCommandType_EventDownloadBrowserTermination = 6, eQMICATEnvelopeCommandType_SendCallControl = 7, eQMICATEnvelopeCommandType_EventDownloadHCIConnectivity = 8, }; // Enum to describe QMI CAT Help Available enum eQMICATHelpAvailable:UINT8 { eQMICATHelpAvailable_NoHelpIsAvailable = 0, eQMICATHelpAvailable_HelpIsAvailable = 1, }; // Enum to describe QMI CAT Help Request enum eQMICATHelpRequest:UINT8 { eQMICATHelpRequest_NoHelpIsRequested = 0, eQMICATHelpRequest_HelpIsRequested = 1, }; // Enum to describe QMI CAT High Priority enum eQMICATHighPriority:UINT8 { eQMICATHighPriority_DoNotClearTheScreen = 0, eQMICATHighPriority_ClearAnythingThatIsOnTheScreen = 1, }; // Enum to describe QMI CAT Icon Is Displayed enum eQMICATIconIsDisplayed:UINT8 { eQMICATIconIsDisplayed_No = 0, eQMICATIconIsDisplayed_Yes = 1, }; // Enum to describe QMI CAT Icon Qualifier enum eQMICATIconQualifier:UINT8 { eQMICATIconQualifier_IconIsSelfExplanatory = 0, eQMICATIconQualifier_IconIsNotSelfExplanatory = 1, }; // Enum to describe QMI CAT Image Coding Scheme enum eQMICATImageCodingScheme:UINT8 { eQMICATImageCodingScheme_Unknown = 0, eQMICATImageCodingScheme_Basic = 1, eQMICATImageCodingScheme_Color = 2, }; // Enum to describe QMI CAT Immediate Response enum eQMICATImmediateResponse:UINT8 { eQMICATImmediateResponse_No = 0, eQMICATImmediateResponse_Yes = 1, }; // Enum to describe QMI CAT Is CDMA SMS enum eQMICATIsCDMASMS:UINT8 { eQMICATIsCDMASMS_NotCDMASMS = 0, eQMICATIsCDMASMS_CDMASMS = 1, }; // Enum to describe QMI CAT Launch Mode enum eQMICATLaunchMode:UINT8 { eQMICATLaunchMode_LaunchIfNotAlreadyLaunched = 0, eQMICATLaunchMode_UseTheExistingBrowser = 1, eQMICATLaunchMode_CloseTheExistingBroswer = 2, }; // Enum to describe QMI CAT Next Action enum eQMICATNextAction:UINT8 { eQMICATNextAction_SetupCall = 0, eQMICATNextAction_SendSS = 1, eQMICATNextAction_SendUSSD = 2, eQMICATNextAction_SendShortMessage = 3, eQMICATNextAction_LaunchBrowser = 4, eQMICATNextAction_PlayTone = 5, eQMICATNextAction_DisplayText = 6, eQMICATNextAction_GetInkey = 7, eQMICATNextAction_GetInput = 8, eQMICATNextAction_SelectItem = 9, eQMICATNextAction_SetupMenu = 10, eQMICATNextAction_SetupIdleModeText = 11, eQMICATNextAction_EndOfTheProactiveSession = 12, eQMICATNextAction_ProvideLocalInformation = 13, }; // Enum to describe QMI CAT Notification Required enum eQMICATNotificationRequired:UINT8 { eQMICATNotificationRequired_NotificationIsNotRequired = 0, eQMICATNotificationRequired_NotificationIsRequired = 1, }; // Enum to describe QMI CAT On Demand Link Establish enum eQMICATOnDemandLinkEstablish:UINT8 { eQMICATOnDemandLinkEstablish_LinkIsNotRequired = 0, eQMICATOnDemandLinkEstablish_LinkIsRequired = 1, }; // Enum to describe QMI CAT PDP Type enum eQMICATPDPType:UINT8 { eQMICATPDPType_IP = 2, }; // Enum to describe QMI CAT Packet Data Protocol enum eQMICATPacketDataProtocol:UINT8 { eQMICATPacketDataProtocol_IP = 2, }; // Enum to describe QMI CAT Packing Required enum eQMICATPackingRequired:UINT8 { eQMICATPackingRequired_PackingIsNotRequired = 0, eQMICATPackingRequired_PackingIsRequired = 1, }; // Enum to describe QMI CAT Presentation enum eQMICATPresentation:UINT8 { eQMICATPresentation_NotSpecified = 0, eQMICATPresentation_DataValuePresentation = 1, eQMICATPresentation_NavigationPresentation = 2, }; // Enum to describe QMI CAT Proactive Session End Type enum eQMICATProactiveSessionEndType:UINT8 { eQMICATProactiveSessionEndType_EndProactiveSessionCommandReceivedFromTheCard = 1, eQMICATProactiveSessionEndType_EndProactiveSessionInternalToME = 2, }; // Enum to describe QMI CAT Redial Necessary enum eQMICATRedialNecessary:UINT8 { eQMICATRedialNecessary_RedialIsNotNecessary = 0, eQMICATRedialNecessary_RedialIsNecessary = 1, }; // Enum to describe QMI CAT Refresh Stage enum eQMICATRefreshStage:UINT16 { eQMICATRefreshStage_RefreshStart = 1, eQMICATRefreshStage_RefreshSuccess = 2, eQMICATRefreshStage_RefreshFailed = 3, }; // Enum to describe QMI CAT Response Command enum eQMICATResponseCommand:UINT8 { eQMICATResponseCommand_DisplayText = 1, eQMICATResponseCommand_GetInkey = 2, eQMICATResponseCommand_GetInput = 3, eQMICATResponseCommand_LaunchBrowser = 4, eQMICATResponseCommand_PlayTone = 5, eQMICATResponseCommand_SelectItemRequest = 6, eQMICATResponseCommand_SetupMenu = 7, eQMICATResponseCommand_SetupIdleText = 8, eQMICATResponseCommand_ProvideLocalInformationLanguage = 9, eQMICATResponseCommand_SetupEventUserActivity = 10, eQMICATResponseCommand_SetupEventIdleScreenActivity = 11, eQMICATResponseCommand_SetupEventLanguageSelectNotify = 12, eQMICATResponseCommand_LanguageNotification = 13, eQMICATResponseCommand_Activate = 14, eQMICATResponseCommand_SetupEventHCIConnectivity = 15, }; // Enum to describe QMI CAT Response Format enum eQMICATResponseFormat:UINT8 { eQMICATResponseFormat_SMSDefaultAlphabet = 0, eQMICATResponseFormat_YesOrNo = 1, eQMICATResponseFormat_NumericalOnly = 2, eQMICATResponseFormat_UCS2 = 3, eQMICATResponseFormat_ImmediateDigitResponse = 4, eQMICATResponseFormat_YesOrNoOrImmediateDigitalResponse = 5, }; // Enum to describe QMI CAT Response Packing Format enum eQMICATResponsePackingFormat:UINT8 { eQMICATResponsePackingFormat_UnpacketFormat = 0, eQMICATResponsePackingFormat_PacketFormat = 1, }; // Enum to describe QMI CAT Send Data Immediately enum eQMICATSendDataImmediately:UINT8 { eQMICATSendDataImmediately_NoStoreInTXBuffer = 0, eQMICATSendDataImmediately_Yes = 1, }; // Enum to describe QMI CAT Send Data Result enum eQMICATSendDataResult:UINT8 { eQMICATSendDataResult_Failed = 0, eQMICATSendDataResult_Success = 1, }; // Enum to describe QMI CAT Show User Input enum eQMICATShowUserInput:UINT8 { eQMICATShowUserInput_DeviceCanShowAllCharacters = 0, eQMICATShowUserInput_DeviceCanShowUserInput = 1, }; // Enum to describe QMI CAT Slot enum eQMICATSlot:UINT8 { eQMICATSlot_Slot1 = 1, eQMICATSlot_Slot2 = 2, }; // Enum to describe QMI CAT Softkey Selection enum eQMICATSoftkeySelection:UINT8 { eQMICATSoftkeySelection_SoftkeyIsNotSelected = 0, eQMICATSoftkeySelection_SoftkeyIsSelected = 1, }; // Enum to describe QMI CAT Specific Language Notfication enum eQMICATSpecificLanguageNotfication:UINT8 { eQMICATSpecificLanguageNotfication_No = 0, eQMICATSpecificLanguageNotfication_Yes = 1, }; // Enum to describe QMI CAT Time Units enum eQMICATTimeUnits:UINT8 { eQMICATTimeUnits_Minutes = 0, eQMICATTimeUnits_Seconds = 1, eQMICATTimeUnits_TenthsOfSeconds = 2, eQMICATTimeUnits_DurationIsNotPresent = 255, }; // Enum to describe QMI CAT Tone enum eQMICATTone:UINT8 { eQMICATTone_DialTone = 1, eQMICATTone_CalledSubscriberBusy = 2, eQMICATTone_Congestion = 3, eQMICATTone_RadioPathAck = 4, eQMICATTone_RadioPathNotAvailableCallDrop = 5, eQMICATTone_ErrorTone = 6, eQMICATTone_CallWaitingTone = 7, eQMICATTone_RingingTone = 8, eQMICATTone_GeneralBeep = 9, eQMICATTone_PositiveAckTone = 10, eQMICATTone_NegativeAckTone = 11, eQMICATTone_RingingToneSelectedByUser = 12, eQMICATTone_SMSAlertToneSelectedByUser = 13, eQMICATTone_NotInUse = 255, }; // Enum to describe QMI CAT Traffic Class enum eQMICATTrafficClass:UINT8 { eQMICATTrafficClass_Conversational = 0, eQMICATTrafficClass_Streaming = 1, eQMICATTrafficClass_Interactive = 2, eQMICATTrafficClass_Background = 3, eQMICATTrafficClass_SubscribedValue = 4, }; // Enum to describe QMI CAT Transport Protocol enum eQMICATTransportProtocol:UINT8 { eQMICATTransportProtocol_NotPresent = 0, eQMICATTransportProtocol_UDP = 1, eQMICATTransportProtocol_TCP = 2, }; // Enum to describe QMI CAT USSD Data Coding Scheme enum eQMICATUSSDDataCodingScheme:UINT8 { eQMICATUSSDDataCodingScheme_7BitGSM = 0, eQMICATUSSDDataCodingScheme_8BitGSM = 1, eQMICATUSSDDataCodingScheme_8BitUCS2 = 2, eQMICATUSSDDataCodingScheme_7BitUCS2 = 3, }; // Enum to describe QMI CAT User Confirmed enum eQMICATUserConfirmed:UINT8 { eQMICATUserConfirmed_No = 0, eQMICATUserConfirmed_Yes = 1, }; // Enum to describe QMI CAT User Control enum eQMICATUserControl:UINT8 { eQMICATUserControl_DoNotAllowUserToClearTheScreen = 0, eQMICATUserControl_AllowUserToClearTheScreen = 1, }; // Enum to describe QMI CTL Driver Data Formats enum eQMICTLDriverDataFormats { eQMICTLDriverDataFormats_QoSFlowHeaderAbsent = 0, eQMICTLDriverDataFormats_QoSFlowHeaderPresent = 1, }; // Enum to describe QMI CTL Power Save States enum eQMICTLPowerSaveStates { eQMICTLPowerSaveStates_Normal = 0, eQMICTLPowerSaveStates_Suspend = 1, eQMICTLPowerSaveStates_Powerdown = 2, }; // Enum to describe QMI CTL Service Types enum eQMICTLServiceTypes { eQMICTLServiceTypes_Control = 0, eQMICTLServiceTypes_WDS = 1, eQMICTLServiceTypes_DMS = 2, eQMICTLServiceTypes_NAS = 3, eQMICTLServiceTypes_QOS = 4, eQMICTLServiceTypes_WMS = 5, eQMICTLServiceTypes_PDS = 6, eQMICTLServiceTypes_AUTH = 7, eQMICTLServiceTypes_CAT = 224, eQMICTLServiceTypes_RMS = 225, eQMICTLServiceTypes_OMA = 226, }; // Enum to describe QMI Call End Reasons enum eQMICallEndReasons:UINT16 { eQMICallEndReasons_Unknown = 0, eQMICallEndReasons_Unspecified = 1, eQMICallEndReasons_ClientEnd = 2, eQMICallEndReasons_NoService = 3, eQMICallEndReasons_Fade = 4, eQMICallEndReasons_ReleaseNormal = 5, eQMICallEndReasons_AccInProgress = 6, eQMICallEndReasons_AccFailed = 7, eQMICallEndReasons_RedirectOrHandoff = 8, eQMICallEndReasons_CloseInProgress = 9, eQMICallEndReasons_AuthenticationFailed = 10, eQMICallEndReasons_InternalError = 11, eQMICallEndReasons_CDMALock = 500, eQMICallEndReasons_Intercept = 501, eQMICallEndReasons_Reorder = 502, eQMICallEndReasons_ReleaseServiceOptionRejected = 503, eQMICallEndReasons_IncomingCall = 504, eQMICallEndReasons_AlertStop = 505, eQMICallEndReasons_Activation = 506, eQMICallEndReasons_MaxAccessProbe = 507, eQMICallEndReasons_CCSNotSupportedByBS = 508, eQMICallEndReasons_NoResponseFromBS = 509, eQMICallEndReasons_RejectedByBS = 510, eQMICallEndReasons_Incompatible = 511, eQMICallEndReasons_AlreadyInTC = 512, eQMICallEndReasons_UserCallOrigDuringGPS = 513, eQMICallEndReasons_UserCallOrigDuringSMS = 514, eQMICallEndReasons_NoCDMAService = 515, eQMICallEndReasons_ConfFailed = 1000, eQMICallEndReasons_IncomingRejected = 1001, eQMICallEndReasons_NoGWService = 1002, eQMICallEndReasons_NetworkEnd = 1003, eQMICallEndReasons_LLCOrSNDCPFailure = 1004, eQMICallEndReasons_InsufficientResources = 1005, eQMICallEndReasons_ServiceOptionOutOfOrder = 1006, eQMICallEndReasons_NSAPIAlreadyUsed = 1007, eQMICallEndReasons_RegularPDPContextDeactivation = 1008, eQMICallEndReasons_NetworkFailure = 1009, eQMICallEndReasons_ReactivationRequested = 1010, eQMICallEndReasons_ProtocolError = 1011, eQMICallEndReasons_OperatorDeterminedBarring = 1012, eQMICallEndReasons_UnknownOrMissingAPN = 1013, eQMICallEndReasons_UnknownPDPAddressOrPDPType = 1014, eQMICallEndReasons_ActivationRejectedByGGSN = 1015, eQMICallEndReasons_ActivationRejectedUnspecified = 1016, eQMICallEndReasons_ServiceOptionNotSupported = 1017, eQMICallEndReasons_RequestedServiceOptionNotSubscribed = 1018, eQMICallEndReasons_QoSNotAccepted = 1019, eQMICallEndReasons_SemanticErrorInTheTFTOperation = 1020, eQMICallEndReasons_SyntacticalErrorInTheTFTOperation = 1021, eQMICallEndReasons_UnknownPDPContext = 1022, eQMICallEndReasons_SemanticErrorsInPacketFilters = 1023, eQMICallEndReasons_SyntacticalErrorsInPacketFilters = 1024, eQMICallEndReasons_PDPContextWithoutTFTAlreadyActivated = 1025, eQMICallEndReasons_InvalidTransactionIdentifierValue = 1026, eQMICallEndReasons_SemanticallyIncorrectMessage = 1027, eQMICallEndReasons_InvalidMandatoryInformation = 1028, eQMICallEndReasons_MessageTypeNonExistent = 1029, eQMICallEndReasons_MessageNotCompatibleWithState = 1030, eQMICallEndReasons_InformationElementNonexistent = 1031, eQMICallEndReasons_ConditionalInformationElementError = 1032, eQMICallEndReasons_MessageNotCompatibleWithProtocolState = 1033, eQMICallEndReasons_APNRestrictionValueIncompatibleWithActivePDPContext = 1034, eQMICallEndReasons_NoGPRSContextPresent = 1035, eQMICallEndReasons_RequestedFeatureNotSupported = 1036, eQMICallEndReasons_CDGenOrBusy = 1500, eQMICallEndReasons_CDBillOrAuth = 1501, eQMICallEndReasons_ChangeHDR = 1502, eQMICallEndReasons_ExitHDR = 1503, eQMICallEndReasons_HDRNoSession = 1504, eQMICallEndReasons_HDROrigDuringGPSFix = 1505, eQMICallEndReasons_HDRCSTimeout = 1506, eQMICallEndReasons_HDRReleasedByCM = 1507, }; // Enum to describe QMI Call History Types enum eQMICallHistoryTypes:UINT8 { eQMICallHistoryTypes_Full = 0, eQMICallHistoryTypes_IDsOnly = 1, }; // Enum to describe QMI Call Types enum eQMICallTypes:UINT8 { eQMICallTypes_NDIS = 0, eQMICallTypes_DUN = 1, }; // Enum to describe QMI Connection Status enum eQMIConnectionStatus:UINT8 { eQMIConnectionStatus_Disconnected = 1, eQMIConnectionStatus_Connected = 2, eQMIConnectionStatus_Suspended = 3, eQMIConnectionStatus_Authenticating = 4, }; // Enum to describe QMI DMS Activation States enum eQMIDMSActivationStates:UINT16 { eQMIDMSActivationStates_ServiceNotActivated = 0, eQMIDMSActivationStates_SerivceActivated = 1, eQMIDMSActivationStates_ActivationConnecting = 2, eQMIDMSActivationStates_ActivationInProgress = 3, eQMIDMSActivationStates_OTASPSecurityAuthenticated = 4, eQMIDMSActivationStates_OTASPNAMDownloaded = 5, eQMIDMSActivationStates_OTASPMDNDownloaded = 6, eQMIDMSActivationStates_OTASPIMSIDownloaded = 7, eQMIDMSActivationStates_OTASPPRLDownloaded = 8, eQMIDMSActivationStates_OTASPSPCDownloaded = 9, eQMIDMSActivationStates_OTASPSettingsCommitted = 10, }; // Enum to describe QMI DMS Activation Types enum eQMIDMSActivationTypes { eQMIDMSActivationTypes_OTASP = 0, }; // Enum to describe QMI DMS Data Service Capabilities 1 enum eQMIDMSDataServiceCapabilities1:UINT8 { eQMIDMSDataServiceCapabilities1_NoDataServicesSupported = 0, eQMIDMSDataServiceCapabilities1_OnlyCircuitSwitched = 1, eQMIDMSDataServiceCapabilities1_OnlyPacketSwitched = 2, eQMIDMSDataServiceCapabilities1_SimultaneousCircuitPacketSwitched = 3, eQMIDMSDataServiceCapabilities1_NonsimultaneousCircuitPacketSwitched = 4, }; // Enum to describe QMI DMS Image Types enum eQMIDMSImageTypes { eQMIDMSImageTypes_Modem = 0, eQMIDMSImageTypes_PRI = 1, }; // Enum to describe QMI DMS Lock States enum eQMIDMSLockStates:UINT8 { eQMIDMSLockStates_LockDisabled = 0, eQMIDMSLockStates_LockEnabled = 1, }; // Enum to describe QMI DMS Operating Modes enum eQMIDMSOperatingModes:UINT8 { eQMIDMSOperatingModes_Online = 0, eQMIDMSOperatingModes_LowPower = 1, eQMIDMSOperatingModes_FactoryTestMode = 2, eQMIDMSOperatingModes_Offline = 3, eQMIDMSOperatingModes_Reset = 4, eQMIDMSOperatingModes_Shutdown = 5, eQMIDMSOperatingModes_PersistentLowPower = 6, eQMIDMSOperatingModes_ModeOnlyLowPower = 7, eQMIDMSOperatingModes_GWNetworkTest = 8, }; // Enum to describe QMI DMS PIN Status enum eQMIDMSPINStatus:UINT8 { eQMIDMSPINStatus_PINUninitialized = 0, eQMIDMSPINStatus_PINEnabledUnverified = 1, eQMIDMSPINStatus_PINEnabledVerified = 2, eQMIDMSPINStatus_PINDisabled = 3, eQMIDMSPINStatus_PINBlocked = 4, eQMIDMSPINStatus_PINBlockedPermanently = 5, eQMIDMSPINStatus_PINUnblocked = 6, eQMIDMSPINStatus_PINChanged = 7, }; // Enum to describe QMI DMS Power Sources enum eQMIDMSPowerSources:UINT8 { eQMIDMSPowerSources_Battery = 0, eQMIDMSPowerSources_External = 1, }; // Enum to describe QMI DMS Radio Interfaces enum eQMIDMSRadioInterfaces:UINT8 { eQMIDMSRadioInterfaces_CDMA20001x = 1, eQMIDMSRadioInterfaces_CDMA2000HRPD = 2, eQMIDMSRadioInterfaces_GSM = 4, eQMIDMSRadioInterfaces_UMTS = 5, eQMIDMSRadioInterfaces_LTE = 8, eQMIDMSRadioInterfaces_TDS = 9, }; // Enum to describe QMI DMS Service Capabilities enum eQMIDMSServiceCapabilities:UINT32 { eQMIDMSServiceCapabilities_DataOnly = 1, eQMIDMSServiceCapabilities_VoiceOnly = 2, eQMIDMSServiceCapabilities_SimultaneousVoiceAndData = 3, eQMIDMSServiceCapabilities_NonsimultaneousVoiceAndData = 4, }; // Enum to describe QMI DMS Time References enum eQMIDMSTimeReferences:UINT32 { eQMIDMSTimeReferences_User = 0, }; // Enum to describe QMI DMS Timestamp Sources enum eQMIDMSTimestampSources:UINT16 { eQMIDMSTimestampSources_Device = 0, eQMIDMSTimestampSources_CDMANetwork = 1, eQMIDMSTimestampSources_CDMA1xEVDONetwork = 2, eQMIDMSTimestampSources_GSMNetwork = 3, eQMIDMSTimestampSources_WCDMANetwork = 4, eQMIDMSTimestampSources_GPSNetwork = 5, eQMIDMSTimestampSources_MFLONetwork = 6, }; // Enum to describe QMI DMS UIM Facility enum eQMIDMSUIMFacility:UINT8 { eQMIDMSUIMFacility_PNNetworkPersonalization = 0, eQMIDMSUIMFacility_PUNetworkSubsetPersonalization = 1, eQMIDMSUIMFacility_PPServiceProviderPersonalization = 2, eQMIDMSUIMFacility_PCCorporatePersonalization = 3, eQMIDMSUIMFacility_PFUIMPersonalization = 4, }; // Enum to describe QMI DMS UIM Facility States enum eQMIDMSUIMFacilityStates:UINT8 { eQMIDMSUIMFacilityStates_Deactivated = 0, eQMIDMSUIMFacilityStates_Activated = 1, eQMIDMSUIMFacilityStates_Block = 2, }; // Enum to describe QMI DMS UIM States enum eQMIDMSUIMStates:UINT8 { eQMIDMSUIMStates_InitializationCompleted = 0, eQMIDMSUIMStates_InitializationFailed = 1, eQMIDMSUIMStates_NotPresent = 2, eQMIDMSUIMStates_StateUnavailable = 255, }; // Enum to describe QMI Data Bearer Technologies enum eQMIDataBearerTechnologies:UINT8 { eQMIDataBearerTechnologies_CDMA20001x = 1, eQMIDataBearerTechnologies_CDMA20001xEVDORev0 = 2, eQMIDataBearerTechnologies_GPRS = 3, eQMIDataBearerTechnologies_WCDMA = 4, eQMIDataBearerTechnologies_CDMA20001xEVDORevA = 5, eQMIDataBearerTechnologies_EGPRS = 6, eQMIDataBearerTechnologies_HSDPAWCDMA = 7, eQMIDataBearerTechnologies_WCDMAHSUPA = 8, eQMIDataBearerTechnologies_HSDPAHSUPA = 9, eQMIDataBearerTechnologies_LTE = 10, eQMIDataBearerTechnologies_CDMA2000EHRPD = 11, eQMIDataBearerTechnologies_HSDPAPlusWCDMA = 12, eQMIDataBearerTechnologies_HSDPAPlusHSUPA = 13, eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA = 14, eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA = 15, eQMIDataBearerTechnologies_HSDPAPlus64QAM = 16, eQMIDataBearerTechnologies_HSDPAPlus64QAMHSUPA = 17, eQMIDataBearerTechnologies_TDSCDMA = 18, eQMIDataBearerTechnologies_TDSCDMAHSDPA = 19, eQMIDataBearerTechnologies_Unknown = 255, }; // Enum to describe QMI Dormancy Status enum eQMIDormancyStatus:UINT8 { eQMIDormancyStatus_TrafficChannelDormant = 1, eQMIDormancyStatus_TrafficChannelActive = 2, }; // Enum to describe QMI Erroneous SDU Deliveries enum eQMIErroneousSDUDeliveries:UINT8 { eQMIErroneousSDUDeliveries_Subscribe = 0, eQMIErroneousSDUDeliveries_NoDetection = 1, eQMIErroneousSDUDeliveries_ErroneousSDUIsDelivered = 2, eQMIErroneousSDUDeliveries_ErroneousSDUIsNotDelivered = 3, }; // Enum to describe QMI Errors enum eQMIErrors:UINT16 { eQMIErrors_None = 0, eQMIErrors_MalformedMessage = 1, eQMIErrors_NoMemory = 2, eQMIErrors_Internal = 3, eQMIErrors_Aborted = 4, eQMIErrors_ClientIDsExhausted = 5, eQMIErrors_UnabortableTransaction = 6, eQMIErrors_InvalidClientID = 7, eQMIErrors_NoThresholdsProvided = 8, eQMIErrors_InvalidHandle = 9, eQMIErrors_InvalidProfile = 10, eQMIErrors_InvalidPINID = 11, eQMIErrors_IncorrectPIN = 12, eQMIErrors_NoNetworkFound = 13, eQMIErrors_CallFailed = 14, eQMIErrors_OutOfCall = 15, eQMIErrors_NotProvisioned = 16, eQMIErrors_MissingArgument = 17, eQMIErrors_ArgumentTooLong = 19, eQMIErrors_InvalidTransactionID = 22, eQMIErrors_DeviceInUse = 23, eQMIErrors_NetworkUnsupported = 24, eQMIErrors_DeviceUnsupported = 25, eQMIErrors_NoEffect = 26, eQMIErrors_NoFreeProfile = 27, eQMIErrors_InvalidPDPType = 28, eQMIErrors_InvalidTechnologyPreference = 29, eQMIErrors_InvalidProfileType = 30, eQMIErrors_InvalidServiceType = 31, eQMIErrors_InvalidRegisterAction = 32, eQMIErrors_InvalidPSAttachAction = 33, eQMIErrors_AuthenticationFailed = 34, eQMIErrors_PINBlocked = 35, eQMIErrors_PINAlwaysBlocked = 36, eQMIErrors_UIMUninitialized = 37, eQMIErrors_MaximumQoSRequestsInUse = 38, eQMIErrors_IncorrectFlowFilter = 39, eQMIErrors_NetworkQoSUnaware = 40, eQMIErrors_InvalidQoSID = 41, eQMIErrors_QoSUnavailable = 42, eQMIErrors_FlowSuspended = 43, eQMIErrors_GeneralError = 46, eQMIErrors_UnknownError = 47, eQMIErrors_InvalidArgument = 48, eQMIErrors_InvalidIndex = 49, eQMIErrors_NoEntry = 50, eQMIErrors_DeviceStorageFull = 51, eQMIErrors_DeviceNotReady = 52, eQMIErrors_NetworkNotReady = 53, eQMIErrors_WMSCauseCode = 54, eQMIErrors_WMSMessageNotSent = 55, eQMIErrors_WMSMessageDeliveryFailure = 56, eQMIErrors_WMSInvalidMessageID = 57, eQMIErrors_WMSEncoding = 58, eQMIErrors_AuthenticationLock = 59, eQMIErrors_InvalidTransition = 60, eQMIErrors_SessionInactive = 65, eQMIErrors_SessionInvalid = 66, eQMIErrors_SessionOwnership = 67, eQMIErrors_InsufficientResources = 68, eQMIErrors_Disabled = 69, eQMIErrors_InvalidOperation = 70, eQMIErrors_InvalidQMICommand = 71, eQMIErrors_WMSTPDUType = 72, eQMIErrors_WMSSMSCAddress = 73, eQMIErrors_InformationUnavailable = 74, eQMIErrors_SegmentTooLong = 75, eQMIErrors_SegmentOrder = 76, eQMIErrors_BundlingNotSupported = 77, eQMIErrors_SIMFileNotFound = 80, eQMIErrors_AccessDenied = 82, eQMIErrors_HardwareRestricted = 83, eQMIErrors_CATEventRegistrationFailed = 61441, eQMIErrors_CATInvalidTerminalResponse = 61442, eQMIErrors_CATInvalidEnvelopeCommand = 61443, eQMIErrors_CATEnvelopeCommandBusy = 61444, eQMIErrors_CATEnvelopeCommandFailed = 61445, }; // Enum to describe QMI HA/AAA Key States enum eQMIHAAAAKeyStates:UINT8 { eQMIHAAAAKeyStates_Unset = 0, eQMIHAAAAKeyStates_SetDefault = 1, eQMIHAAAAKeyStates_SetModified = 2, }; // Enum to describe QMI LOC Altitude Assumed enum eQMILOCAltitudeAssumed:UINT32 { eQMILOCAltitudeAssumed_AltitudeIsCalculated = 0, eQMILOCAltitudeAssumed_AltitudeIsAssumed = 1, }; // Enum to describe QMI LOC Altitude Source enum eQMILOCAltitudeSource:UINT32 { eQMILOCAltitudeSource_Unknown = 0, eQMILOCAltitudeSource_GPS = 1, eQMILOCAltitudeSource_CellID = 2, eQMILOCAltitudeSource_EnhancedCellID = 3, eQMILOCAltitudeSource_WiFi = 4, eQMILOCAltitudeSource_Terrestrial = 5, eQMILOCAltitudeSource_TerrestrialHybrid = 6, eQMILOCAltitudeSource_AltitudeDatabase = 7, eQMILOCAltitudeSource_BarometricAltimeter = 8, eQMILOCAltitudeSource_Other = 9, }; // Enum to describe QMI LOC Confidence enum eQMILOCConfidence:UINT32 { eQMILOCConfidence_Low = 1, eQMILOCConfidence_Medium = 2, eQMILOCConfidence_High = 3, }; // Enum to describe QMI LOC Connection Request Type enum eQMILOCConnectionRequestType { eQMILOCConnectionRequestType_Open = 1, eQMILOCConnectionRequestType_Close = 2, }; // Enum to describe QMI LOC Connection Status enum eQMILOCConnectionStatus:UINT32 { eQMILOCConnectionStatus_Success = 1, eQMILOCConnectionStatus_Failure = 2, }; // Enum to describe QMI LOC Control Mode enum eQMILOCControlMode:UINT32 { eQMILOCControlMode_Automatic = 0, eQMILOCControlMode_Forced = 1, }; // Enum to describe QMI LOC Coverage enum eQMILOCCoverage:UINT32 { eQMILOCCoverage_NotSpecified = 0, eQMILOCCoverage_Point = 1, eQMILOCCoverage_Full = 2, }; // Enum to describe QMI LOC Cradle Mount State enum eQMILOCCradleMountState:UINT32 { eQMILOCCradleMountState_NotMounted = 0, eQMILOCCradleMountState_Mounted = 1, eQMILOCCradleMountState_Unknown = 2, }; // Enum to describe QMI LOC Data Coding Scheme enum eQMILOCDataCodingScheme:UINT32 { eQMILOCDataCodingScheme_German = 12, eQMILOCDataCodingScheme_English = 13, eQMILOCDataCodingScheme_Italian = 14, eQMILOCDataCodingScheme_French = 15, eQMILOCDataCodingScheme_Spanish = 16, eQMILOCDataCodingScheme_Dutch = 17, eQMILOCDataCodingScheme_Swedish = 18, eQMILOCDataCodingScheme_Danish = 19, eQMILOCDataCodingScheme_Portuguese = 20, eQMILOCDataCodingScheme_Finnish = 21, eQMILOCDataCodingScheme_Norwegian = 22, eQMILOCDataCodingScheme_Greek = 23, eQMILOCDataCodingScheme_Turkish = 24, eQMILOCDataCodingScheme_Hungarian = 25, eQMILOCDataCodingScheme_Polish = 26, eQMILOCDataCodingScheme_Unspecified = 27, eQMILOCDataCodingScheme_UTF8 = 28, eQMILOCDataCodingScheme_UCS2 = 29, eQMILOCDataCodingScheme_GSMDefault = 30, }; // Enum to describe QMI LOC Encoding Scheme enum eQMILOCEncodingScheme:UINT32 { eQMILOCEncodingScheme_Octet = 0, eQMILOCEncodingScheme_EXNProtocolMessage = 1, eQMILOCEncodingScheme_ASCII = 2, eQMILOCEncodingScheme_IA5 = 3, eQMILOCEncodingScheme_Unicode = 4, eQMILOCEncodingScheme_ShiftJIS = 5, eQMILOCEncodingScheme_Korean = 6, eQMILOCEncodingScheme_LatinHebrew = 7, eQMILOCEncodingScheme_Latin = 8, eQMILOCEncodingScheme_GSM = 9, }; // Enum to describe QMI LOC Engine State enum eQMILOCEngineState { eQMILOCEngineState_On = 1, eQMILOCEngineState_Off = 2, }; // Enum to describe QMI LOC Fix Recurrence Type enum eQMILOCFixRecurrenceType:UINT32 { eQMILOCFixRecurrenceType_RequestPeriodicFixes = 1, eQMILOCFixRecurrenceType_RequestSingleFix = 2, }; // Enum to describe QMI LOC Format Type enum eQMILOCFormatType:UINT32 { eQMILOCFormatType_LogicalName = 0, eQMILOCFormatType_EmailAddress = 1, eQMILOCFormatType_MSISDN = 2, eQMILOCFormatType_URL = 3, eQMILOCFormatType_SIPURL = 4, eQMILOCFormatType_MIN = 5, eQMILOCFormatType_MDN = 6, eQMILOCFormatType_IMSPublicIdentity = 7, eQMILOCFormatType_OSSUnknown = 2147483647, }; // Enum to describe QMI LOC Geofence Breach Type enum eQMILOCGeofenceBreachType { eQMILOCGeofenceBreachType_Entering = 1, eQMILOCGeofenceBreachType_Leaving = 2, }; // Enum to describe QMI LOC Geofence General Alert enum eQMILOCGeofenceGeneralAlert:UINT32 { eQMILOCGeofenceGeneralAlert_GNSSUnavailable = 1, eQMILOCGeofenceGeneralAlert_GNSSAvailable = 2, eQMILOCGeofenceGeneralAlert_OOS = 3, eQMILOCGeofenceGeneralAlert_TimeInvalid = 4, }; // Enum to describe QMI LOC Geofence Operation Mode enum eQMILOCGeofenceOperationMode { eQMILOCGeofenceOperationMode_Added = 1, eQMILOCGeofenceOperationMode_Deleted = 2, eQMILOCGeofenceOperationMode_Edited = 3, }; // Enum to describe QMI LOC Geofence Origin enum eQMILOCGeofenceOrigin:UINT32 { eQMILOCGeofenceOrigin_Network = 1, eQMILOCGeofenceOrigin_Device = 2, }; // Enum to describe QMI LOC Geofence State enum eQMILOCGeofenceState:UINT32 { eQMILOCGeofenceState_Active = 1, eQMILOCGeofenceState_Suspended = 2, }; // Enum to describe QMI LOC Geofence Status enum eQMILOCGeofenceStatus:UINT32 { eQMILOCGeofenceStatus_Success = 0, eQMILOCGeofenceStatus_GeneralFailure = 1, eQMILOCGeofenceStatus_Unsupported = 2, eQMILOCGeofenceStatus_InvalidParameters = 3, eQMILOCGeofenceStatus_EngineBusy = 4, eQMILOCGeofenceStatus_PhoneOffline = 5, eQMILOCGeofenceStatus_Timeout = 6, eQMILOCGeofenceStatus_InsufficientMemory = 8, }; // Enum to describe QMI LOC Health Status enum eQMILOCHealthStatus:UINT8 { eQMILOCHealthStatus_Unhealthy = 0, eQMILOCHealthStatus_Healthy = 1, }; // Enum to describe QMI LOC Horizontal Accuracy enum eQMILOCHorizontalAccuracy:UINT32 { eQMILOCHorizontalAccuracy_Low = 1, eQMILOCHorizontalAccuracy_Medium = 2, eQMILOCHorizontalAccuracy_High = 3, }; // Enum to describe QMI LOC Intermediate Report State enum eQMILOCIntermediateReportState:UINT32 { eQMILOCIntermediateReportState_Enable = 1, eQMILOCIntermediateReportState_Disable = 2, }; // Enum to describe QMI LOC Linkage enum eQMILOCLinkage:UINT32 { eQMILOCLinkage_NotSpecified = 0, eQMILOCLinkage_FullyInterdependent = 1, eQMILOCLinkage_DependsOnLatLong = 2, eQMILOCLinkage_FullyIndependent = 3, }; // Enum to describe QMI LOC Location Server Type enum eQMILOCLocationServerType:UINT32 { eQMILOCLocationServerType_CDMAPDE = 1, eQMILOCLocationServerType_CDMAMPC = 2, eQMILOCLocationServerType_UMTSSLP = 3, eQMILOCLocationServerType_CustomPDE = 4, }; // Enum to describe QMI LOC Location Type enum eQMILOCLocationType:UINT32 { eQMILOCLocationType_CurrentLocation = 1, eQMILOCLocationType_CurrentOrLastKnownLocation = 2, eQMILOCLocationType_InitialLocation = 4, }; // Enum to describe QMI LOC Lock Type enum eQMILOCLockType:UINT32 { eQMILOCLockType_LockNone = 1, eQMILOCLockType_LockMI = 2, eQMILOCLockType_LockMT = 3, eQMILOCLockType_LockAll = 4, }; // Enum to describe QMI LOC Notification Type enum eQMILOCNotificationType:UINT32 { eQMILOCNotificationType_NoNotifyOrVerify = 1, eQMILOCNotificationType_NotifyOnly = 2, eQMILOCNotificationType_AllowNoResponse = 3, eQMILOCNotificationType_ResponseRequired = 4, eQMILOCNotificationType_PrivacyOverride = 5, }; // Enum to describe QMI LOC Operation Mode enum eQMILOCOperationMode:UINT32 { eQMILOCOperationMode_Default = 1, eQMILOCOperationMode_MSB = 2, eQMILOCOperationMode_MSA = 3, eQMILOCOperationMode_StandAlone = 4, eQMILOCOperationMode_CellID = 5, }; // Enum to describe QMI LOC Orbits Format Type enum eQMILOCOrbitsFormatType:UINT32 { eQMILOCOrbitsFormatType_PredictedOrbitsXTRA = 0, }; // Enum to describe QMI LOC PDN Type enum eQMILOCPDNType:UINT32 { eQMILOCPDNType_IPv4 = 1, eQMILOCPDNType_IPv6 = 2, eQMILOCPDNType_IPv4OrIPv6 = 3, eQMILOCPDNType_PPP = 4, }; // Enum to describe QMI LOC Position enum eQMILOCPosition:UINT32 { eQMILOCPosition_AGPSSetAssisted = 1, eQMILOCPosition_AGPSSetBased = 2, eQMILOCPosition_AGPSSetAssistedPreference = 3, eQMILOCPosition_AGPSSetBasedPreference = 4, eQMILOCPosition_AutonomousGPS = 5, eQMILOCPosition_AFLT = 6, eQMILOCPosition_ECID = 7, eQMILOCPosition_EOTD = 8, eQMILOCPosition_OTDOA = 9, eQMILOCPosition_NoPosition = 10, }; // Enum to describe QMI LOC Position From Geofence enum eQMILOCPositionFromGeofence:UINT32 { eQMILOCPositionFromGeofence_Inside = 1, eQMILOCPositionFromGeofence_Outside = 2, }; // Enum to describe QMI LOC Position Mode enum eQMILOCPositionMode:UINT32 { eQMILOCPositionMode_AssistedOnly = 1, eQMILOCPositionMode_BasedOnly = 2, eQMILOCPositionMode_AssistedPreferredBasedAllowed = 3, eQMILOCPositionMode_BasedPreferredAssistedAllowed = 4, }; // Enum to describe QMI LOC Position Source enum eQMILOCPositionSource:UINT32 { eQMILOCPositionSource_GNSS = 0, eQMILOCPositionSource_CellID = 1, eQMILOCPositionSource_EnhancedCellID = 2, eQMILOCPositionSource_WiFi = 3, eQMILOCPositionSource_Terrestrial = 4, eQMILOCPositionSource_TerrestrialHybrid = 5, eQMILOCPositionSource_Other = 6, }; // Enum to describe QMI LOC Power State enum eQMILOCPowerState:UINT32 { eQMILOCPowerState_NotConnected = 0, eQMILOCPowerState_Connected = 1, eQMILOCPowerState_Unknown = 2, }; // Enum to describe QMI LOC Reliability enum eQMILOCReliability:UINT32 { eQMILOCReliability_NotSet = 0, eQMILOCReliability_VeryLow = 1, eQMILOCReliability_Low = 2, eQMILOCReliability_Medium = 3, eQMILOCReliability_High = 4, }; // Enum to describe QMI LOC Request Type enum eQMILOCRequestType:UINT32 { eQMILOCRequestType_StartPeriodicHighFrequencyFixes = 0, eQMILOCRequestType_StartPeriodicKeepWarmFixes = 1, eQMILOCRequestType_StopPeriodicFixes = 2, }; // Enum to describe QMI LOC Responsiveness enum eQMILOCResponsiveness:UINT32 { eQMILOCResponsiveness_Low = 1, eQMILOCResponsiveness_Medium = 2, eQMILOCResponsiveness_High = 3, }; // Enum to describe QMI LOC SUPL Version enum eQMILOCSUPLVersion:UINT32 { eQMILOCSUPLVersion_10 = 1, eQMILOCSUPLVersion_20 = 2, }; // Enum to describe QMI LOC Satellite Status enum eQMILOCSatelliteStatus:UINT32 { eQMILOCSatelliteStatus_Idle = 1, eQMILOCSatelliteStatus_Searching = 2, eQMILOCSatelliteStatus_Tracking = 3, }; // Enum to describe QMI LOC Sensor Usage enum eQMILOCSensorUsage:UINT32 { eQMILOCSensorUsage_SensorUseEnabled = 0, eQMILOCSensorUsage_SensorUseDisabled = 1, }; // Enum to describe QMI LOC Service Interaction Type enum eQMILOCServiceInteractionType:UINT32 { eQMILOCServiceInteractionType_OngoingNIIncomingMO = 1, }; // Enum to describe QMI LOC Session State enum eQMILOCSessionState:UINT32 { eQMILOCSessionState_Started = 1, eQMILOCSessionState_Finished = 2, }; // Enum to describe QMI LOC Session Status enum eQMILOCSessionStatus:UINT32 { eQMILOCSessionStatus_Success = 0, eQMILOCSessionStatus_InProgress = 1, eQMILOCSessionStatus_GeneralFailure = 2, eQMILOCSessionStatus_Timeout = 3, eQMILOCSessionStatus_UserEnded = 4, eQMILOCSessionStatus_BadParameter = 5, eQMILOCSessionStatus_PhoneOffline = 6, eQMILOCSessionStatus_EngineLocked = 7, }; // Enum to describe QMI LOC Stationary Status enum eQMILOCStationaryStatus { eQMILOCStationaryStatus_DeviceIsNotStationary = 0, eQMILOCStationaryStatus_DeviceIsStationary = 1, }; // Enum to describe QMI LOC Status enum eQMILOCStatus { eQMILOCStatus_Success = 0, eQMILOCStatus_GeneralFailure = 1, eQMILOCStatus_Unsupported = 2, eQMILOCStatus_InvalidParameter = 3, eQMILOCStatus_EngineBusy = 4, eQMILOCStatus_PhoneOffline = 5, eQMILOCStatus_Timeout = 6, }; // Enum to describe QMI LOC System enum eQMILOCSystem:UINT32 { eQMILOCSystem_GlobalPositioningSystem = 1, eQMILOCSystem_Galileo = 2, eQMILOCSystem_SatelliteBasedAugmentationSystem = 3, eQMILOCSystem_COMPASS = 4, eQMILOCSystem_GLONASS = 5, }; // Enum to describe QMI LOC Time Source enum eQMILOCTimeSource:UINT32 { eQMILOCTimeSource_Invalid = 0, eQMILOCTimeSource_NetworkTimeTransfer = 1, eQMILOCTimeSource_NetworkTimeTagging = 2, eQMILOCTimeSource_ExternalInput = 3, eQMILOCTimeSource_TOWDecode = 4, eQMILOCTimeSource_TOWConfirmed = 5, eQMILOCTimeSource_TOWAndWeekConfirmed = 6, eQMILOCTimeSource_NavigationSolution = 7, eQMILOCTimeSource_SolveForTime = 8, }; // Enum to describe QMI LOC Trigger Type enum eQMILOCTriggerType { eQMILOCTriggerType_SingleShot = -1, eQMILOCTriggerType_Periodic = 0, eQMILOCTriggerType_AreaEvent = 1, }; // Enum to describe QMI LOC User Response enum eQMILOCUserResponse:UINT32 { eQMILOCUserResponse_Accept = 1, eQMILOCUserResponse_Deny = 2, eQMILOCUserResponse_NoResponse = 3, }; // Enum to describe QMI LOC VX Version enum eQMILOCVXVersion:UINT32 { eQMILOCVXVersion_V1Only = 1, eQMILOCVXVersion_V2Only = 2, }; // Enum to describe QMI LOC WWAN Type enum eQMILOCWWANType:UINT32 { eQMILOCWWANType_Internet = 0, eQMILOCWWANType_AGNSS = 1, }; // Enum to describe QMI LOC Wi-Fi Fix Error Code enum eQMILOCWiFiFixErrorCode:UINT32 { eQMILOCWiFiFixErrorCode_Success = 0, eQMILOCWiFiFixErrorCode_WiFiNotAvailable = 1, eQMILOCWiFiFixErrorCode_NoAccessPointsFound = 2, eQMILOCWiFiFixErrorCode_Unauthorized = 3, eQMILOCWiFiFixErrorCode_ServerUnavailable = 4, eQMILOCWiFiFixErrorCode_LocationCannotBeDetermined = 5, eQMILOCWiFiFixErrorCode_Unknown = 6, }; // Enum to describe QMI LOC Wi-Fi Status enum eQMILOCWiFiStatus:UINT32 { eQMILOCWiFiStatus_Available = 1, eQMILOCWiFiStatus_Unavailable = 2, }; // Enum to describe QMI Mobile IP Modes enum eQMIMobileIPModes:UINT8 { eQMIMobileIPModes_MIPOffSimpleIPOnly = 0, eQMIMobileIPModes_MIPPreferred = 1, eQMIMobileIPModes_MIPOnly = 2, }; // Enum to describe QMI NAS AN-AAA Authentication Status enum eQMINASANAAAAuthenticationStatus:UINT8 { eQMINASANAAAAuthenticationStatus_AuthenticationFailed = 0, eQMINASANAAAAuthenticationStatus_AuthenticationSuccess = 1, eQMINASANAAAAuthenticationStatus_NoAuthenticationRequested = 2, }; // Enum to describe QMI NAS Acquisition Order enum eQMINASAcquisitionOrder:UINT32 { eQMINASAcquisitionOrder_Automatic = 0, eQMINASAcquisitionOrder_GSMThenWCDMA = 1, eQMINASAcquisitionOrder_WCDMAThenGSM = 2, }; // Enum to describe QMI NAS Active Subscription enum eQMINASActiveSubscription:UINT8 { eQMINASActiveSubscription_NotActive = 0, eQMINASActiveSubscription_Active = 1, }; // Enum to describe QMI NAS Average Period enum eQMINASAveragePeriod:UINT8 { eQMINASAveragePeriod_AverageUsingDefaultConfiguration = 0, eQMINASAveragePeriod_AverageOver1Second = 1, eQMINASAveragePeriod_AverageOver2Second = 2, eQMINASAveragePeriod_AverageOver3Second = 3, eQMINASAveragePeriod_AverageOver4Second = 4, eQMINASAveragePeriod_AverageOver5Second = 5, eQMINASAveragePeriod_AverageOver6Second = 6, eQMINASAveragePeriod_AverageOver7Second = 7, eQMINASAveragePeriod_AverageOver8Second = 8, eQMINASAveragePeriod_AverageOver9Second = 9, eQMINASAveragePeriod_AverageOver10Second = 10, }; // Enum to describe QMI NAS Band Classes enum eQMINASBandClasses:UINT16 { eQMINASBandClasses_CDMABandClass0 = 0, eQMINASBandClasses_CDMABandClass1 = 1, eQMINASBandClasses_CDMABandClass3 = 3, eQMINASBandClasses_CDMABandClass4 = 4, eQMINASBandClasses_CDMABandClass5 = 5, eQMINASBandClasses_CDMABandClass6 = 6, eQMINASBandClasses_CDMABandClass7 = 7, eQMINASBandClasses_CDMABandClass8 = 8, eQMINASBandClasses_CDMABandClass9 = 9, eQMINASBandClasses_CDMABandClass10 = 10, eQMINASBandClasses_CDMABandClass11 = 11, eQMINASBandClasses_CDMABandClass12 = 12, eQMINASBandClasses_CDMABandClass13 = 13, eQMINASBandClasses_CDMABandClass14 = 14, eQMINASBandClasses_CDMABandClass15 = 15, eQMINASBandClasses_CDMABandClass16 = 16, eQMINASBandClasses_CDMABandClass17 = 17, eQMINASBandClasses_CDMABandClass18 = 18, eQMINASBandClasses_CDMABandClass19 = 19, eQMINASBandClasses_GSM450 = 40, eQMINASBandClasses_GSM480 = 41, eQMINASBandClasses_GSM750 = 42, eQMINASBandClasses_GSM850 = 43, eQMINASBandClasses_GSM900Extended = 44, eQMINASBandClasses_GSM900Primary = 45, eQMINASBandClasses_GSM900Railways = 46, eQMINASBandClasses_GSM1800 = 47, eQMINASBandClasses_GSM1900 = 48, eQMINASBandClasses_WCDMA2100 = 80, eQMINASBandClasses_WCDMAPCS1900 = 81, eQMINASBandClasses_WCDMADCS1800 = 82, eQMINASBandClasses_WCDMA1700US = 83, eQMINASBandClasses_WCDMA850 = 84, eQMINASBandClasses_WCDMA800 = 85, eQMINASBandClasses_WCDMA2600 = 86, eQMINASBandClasses_WCDMA900 = 87, eQMINASBandClasses_WCDMA1700Japan = 88, eQMINASBandClasses_WCDMA1500Japan = 90, eQMINASBandClasses_WCDMA850Japan = 91, eQMINASBandClasses_EUTRABand1 = 120, eQMINASBandClasses_EUTRABand2 = 121, eQMINASBandClasses_EUTRABand3 = 122, eQMINASBandClasses_EUTRABand4 = 123, eQMINASBandClasses_EUTRABand5 = 124, eQMINASBandClasses_EUTRABand6 = 125, eQMINASBandClasses_EUTRABand7 = 126, eQMINASBandClasses_EUTRABand8 = 127, eQMINASBandClasses_EUTRABand9 = 128, eQMINASBandClasses_EUTRABand10 = 129, eQMINASBandClasses_EUTRABand11 = 130, eQMINASBandClasses_EUTRABand12 = 131, eQMINASBandClasses_EUTRABand13 = 132, eQMINASBandClasses_EUTRABand14 = 133, eQMINASBandClasses_EUTRABand17 = 134, eQMINASBandClasses_EUTRABand33 = 135, eQMINASBandClasses_EUTRABand34 = 136, eQMINASBandClasses_EUTRABand35 = 137, eQMINASBandClasses_EUTRABand36 = 138, eQMINASBandClasses_EUTRABand37 = 139, eQMINASBandClasses_EUTRABand38 = 140, eQMINASBandClasses_EUTRABand39 = 141, eQMINASBandClasses_EUTRABand40 = 142, eQMINASBandClasses_EUTRABand18 = 143, eQMINASBandClasses_EUTRABand19 = 144, eQMINASBandClasses_EUTRABand20 = 145, eQMINASBandClasses_EUTRABand21 = 146, eQMINASBandClasses_EUTRABand24 = 147, eQMINASBandClasses_EUTRABand25 = 148, eQMINASBandClasses_EUTRABand41 = 149, eQMINASBandClasses_EUTRABand42 = 150, eQMINASBandClasses_EUTRABand43 = 151, eQMINASBandClasses_TDSCDMABandA = 200, eQMINASBandClasses_TDSCDMABandB = 201, eQMINASBandClasses_TDSCDMABandC = 202, eQMINASBandClasses_TDSCDMABandD = 203, eQMINASBandClasses_TDSCDMABandE = 204, eQMINASBandClasses_TDSCDMABandF = 205, }; // Enum to describe QMI NAS CDMA 1xEV-DO Active Protocol enum eQMINASCDMA1xEVDOActiveProtocol:UINT8 { eQMINASCDMA1xEVDOActiveProtocol_None = 0, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORel0 = 2, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelA = 3, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelB = 4, }; // Enum to describe QMI NAS CDMA 1xEV-DO Hybrid Information enum eQMINASCDMA1xEVDOHybridInformation:UINT8 { eQMINASCDMA1xEVDOHybridInformation_SystemIsNotHybrid = 0, eQMINASCDMA1xEVDOHybridInformation_SystemIsHybrid = 1, }; // Enum to describe QMI NAS CDMA 1xEV-DO Personality enum eQMINASCDMA1xEVDOPersonality:UINT8 { eQMINASCDMA1xEVDOPersonality_Unknown = 0, eQMINASCDMA1xEVDOPersonality_HRPD = 1, eQMINASCDMA1xEVDOPersonality_EHRPD = 2, }; // Enum to describe QMI NAS CDMA Pilot Types enum eQMINASCDMAPilotTypes:UINT32 { eQMINASCDMAPilotTypes_Active = 0, eQMINASCDMAPilotTypes_Neighbor = 1, }; // Enum to describe QMI NAS CS/PS Attach States enum eQMINASCSPSAttachStates:UINT8 { eQMINASCSPSAttachStates_UnknownNotApplicable = 0, eQMINASCSPSAttachStates_Attached = 1, eQMINASCSPSAttachStates_Detached = 2, }; // Enum to describe QMI NAS Call Barring Status enum eQMINASCallBarringStatus:UINT32 { eQMINASCallBarringStatus_Unknown = 4294967295u, eQMINASCallBarringStatus_NormalCallsOnly = 0, eQMINASCallBarringStatus_EmergencyCallsOnly = 1, eQMINASCallBarringStatus_NoCalls = 2, eQMINASCallBarringStatus_AllCalls = 3, }; // Enum to describe QMI NAS Cell Broadcast Caps enum eQMINASCellBroadcastCaps:UINT32 { eQMINASCellBroadcastCaps_Unknown = 0, eQMINASCellBroadcastCaps_NotSupported = 1, eQMINASCellBroadcastCaps_Supported = 2, }; // Enum to describe QMI NAS Cell Broadcast Caps 2 enum eQMINASCellBroadcastCaps2:UINT32 { eQMINASCellBroadcastCaps2_Unknown = 0, eQMINASCellBroadcastCaps2_NotSupported = 1, eQMINASCellBroadcastCaps2_Supported = 2, }; // Enum to describe QMI NAS Change Duration enum eQMINASChangeDuration:UINT8 { eQMINASChangeDuration_PowerCycle = 0, eQMINASChangeDuration_Permanent = 1, }; // Enum to describe QMI NAS Concurrent Service enum eQMINASConcurrentService:UINT8 { eQMINASConcurrentService_NotAvailable = 0, eQMINASConcurrentService_Available = 1, }; // Enum to describe QMI NAS Concurrent Service Supported enum eQMINASConcurrentServiceSupported:UINT8 { eQMINASConcurrentServiceSupported_NotSupported = 0, eQMINASConcurrentServiceSupported_Supported = 1, }; // Enum to describe QMI NAS DDTM Preferences enum eQMINASDDTMPreferences:UINT8 { eQMINASDDTMPreferences_Off = 0, eQMINASDDTMPreferences_On = 1, eQMINASDDTMPreferences_NoChange = 2, }; // Enum to describe QMI NAS DTM Support enum eQMINASDTMSupport:UINT8 { eQMINASDTMSupport_NotAvailable = 0, eQMINASDTMSupport_Available = 1, }; // Enum to describe QMI NAS Data Service Capabilities 2 enum eQMINASDataServiceCapabilities2:UINT8 { eQMINASDataServiceCapabilities2_GPRS = 1, eQMINASDataServiceCapabilities2_EGPRS = 2, eQMINASDataServiceCapabilities2_HSDPA = 3, eQMINASDataServiceCapabilities2_HSUPA = 4, eQMINASDataServiceCapabilities2_WCDMA = 5, eQMINASDataServiceCapabilities2_CDMA = 6, eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 = 7, eQMINASDataServiceCapabilities2_CDMA1xEVDORevA = 8, eQMINASDataServiceCapabilities2_GSM = 9, eQMINASDataServiceCapabilities2_CDMA1xEVDORevB = 10, eQMINASDataServiceCapabilities2_LTE = 11, eQMINASDataServiceCapabilities2_HSDPAPlus = 12, eQMINASDataServiceCapabilities2_DCHSDPAPlus = 13, }; // Enum to describe QMI NAS Day Of Week enum eQMINASDayOfWeek:UINT8 { eQMINASDayOfWeek_Monday = 0, eQMINASDayOfWeek_Tuesday = 1, eQMINASDayOfWeek_Wednesday = 2, eQMINASDayOfWeek_Thursday = 3, eQMINASDayOfWeek_Friday = 4, eQMINASDayOfWeek_Saturday = 5, eQMINASDayOfWeek_Sunday = 6, }; // Enum to describe QMI NAS Daylight Savings Adjustment enum eQMINASDaylightSavingsAdjustment:UINT8 { eQMINASDaylightSavingsAdjustment_NoAdjustment = 0, eQMINASDaylightSavingsAdjustment_1HourAdjustment = 1, eQMINASDaylightSavingsAdjustment_2HourAdjustment = 2, }; // Enum to describe QMI NAS Dual Transfer Mode enum eQMINASDualTransferMode:UINT8 { eQMINASDualTransferMode_DTMNotSupported = 0, eQMINASDualTransferMode_DTMSupported = 1, }; // Enum to describe QMI NAS E-UTRA Status enum eQMINASEUTRAStatus:UINT8 { eQMINASEUTRAStatus_EUTRACellDetected = 0, eQMINASEUTRAStatus_EUTRACellNotDetected = 1, eQMINASEUTRAStatus_EUTRADetectionUnknown = 2, eQMINASEUTRAStatus_EUTRADetectionUnsupported = 3, }; // Enum to describe QMI NAS EGPRS Support enum eQMINASEGPRSSupport:UINT8 { eQMINASEGPRSSupport_NotAvailable = 0, eQMINASEGPRSSupport_Available = 1, }; // Enum to describe QMI NAS EV-DO Session Close Reasons enum eQMINASEVDOSessionCloseReasons:UINT32 { eQMINASEVDOSessionCloseReasons_ReacquiredNewNetwork = 0, eQMINASEVDOSessionCloseReasons_UATIResponseTimeout = 1, eQMINASEVDOSessionCloseReasons_KeepAliveTimerExpired = 2, eQMINASEVDOSessionCloseReasons_InternalDeactivation = 3, eQMINASEVDOSessionCloseReasons_ReceivedSessionCloseFromAN = 4, eQMINASEVDOSessionCloseReasons_ConnectionOpenFailure = 5, eQMINASEVDOSessionCloseReasons_ConfigurationRequestFailure = 6, eQMINASEVDOSessionCloseReasons_ConfigurationResponseFailure = 7, eQMINASEVDOSessionCloseReasons_ProtocolNegotiationFailure = 8, eQMINASEVDOSessionCloseReasons_ANInitSetupTimerExpired = 9, eQMINASEVDOSessionCloseReasons_ANInitConnectionClosed = 10, eQMINASEVDOSessionCloseReasons_ConnectionDenyReceived = 11, eQMINASEVDOSessionCloseReasons_SilentDeactivation = 12, eQMINASEVDOSessionCloseReasons_NewESN = 13, eQMINASEVDOSessionCloseReasons_ANGUAP = 14, eQMINASEVDOSessionCloseReasons_InvalidPersonalityIndex = 15, eQMINASEVDOSessionCloseReasons_UATINotMaintained = 16, eQMINASEVDOSessionCloseReasons_NewNAI = 17, eQMINASEVDOSessionCloseReasons_EHRPDCredentialsChanged = 18, }; // Enum to describe QMI NAS Forbidden States enum eQMINASForbiddenStates:UINT8 { eQMINASForbiddenStates_Unknown = 0, eQMINASForbiddenStates_Forbidden = 1, eQMINASForbiddenStates_NotForbidden = 2, }; // Enum to describe QMI NAS Force CDMA 1xEV-DO SCP enum eQMINASForceCDMA1xEVDOSCP:UINT8 { eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORev0Only = 0, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPA = 1, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPAAndEMPA = 2, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithMMPA = 3, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithEHRPD = 4, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithEHRPD = 5, }; // Enum to describe QMI NAS High Speed Call Status enum eQMINASHighSpeedCallStatus:UINT8 { eQMINASHighSpeedCallStatus_HSDPAAndHSUPANotSupported = 0, eQMINASHighSpeedCallStatus_HSDPASupported = 1, eQMINASHighSpeedCallStatus_HSUPASupported = 2, eQMINASHighSpeedCallStatus_HSDPAAndHSUPASupported = 3, eQMINASHighSpeedCallStatus_HSDPAPlusSupported = 4, eQMINASHighSpeedCallStatus_HSDPAPlusAndHSUPASupported = 5, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusSupported = 6, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAndHSUPASupported = 7, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMAndHSUPASupported = 8, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMSupported = 9, }; // Enum to describe QMI NAS In Use States enum eQMINASInUseStates:UINT8 { eQMINASInUseStates_Unknown = 0, eQMINASInUseStates_CurrentServing = 1, eQMINASInUseStates_Available = 2, }; // Enum to describe QMI NAS LTE Signal Rates enum eQMINASLTESignalRates:UINT8 { eQMINASLTESignalRates_Default = 0, eQMINASLTESignalRates_EverySecond = 1, eQMINASLTESignalRates_Every2Seconds = 2, eQMINASLTESignalRates_Every3Seconds = 3, eQMINASLTESignalRates_Every4Seconds = 4, eQMINASLTESignalRates_Every5Seconds = 5, eQMINASLTESignalRates_Every6Seconds = 6, eQMINASLTESignalRates_Every7Seconds = 7, eQMINASLTESignalRates_Every8Seconds = 8, eQMINASLTESignalRates_Every9Seconds = 9, eQMINASLTESignalRates_Every10Seconds = 10, }; // Enum to describe QMI NAS LTE Voice Domains enum eQMINASLTEVoiceDomains:UINT32 { eQMINASLTEVoiceDomains_NoVoiceSupport = 0, eQMINASLTEVoiceDomains_VoiceSupportedOverIMS = 1, eQMINASLTEVoiceDomains_VoiceSupportedOver1X = 2, eQMINASLTEVoiceDomains_VoiceSupportedOver3GPP = 3, }; // Enum to describe QMI NAS Network Description Displays enum eQMINASNetworkDescriptionDisplays:UINT8 { eQMINASNetworkDescriptionDisplays_DoNotDisplay = 0, eQMINASNetworkDescriptionDisplays_Display = 1, eQMINASNetworkDescriptionDisplays_Unknown = 255, }; // Enum to describe QMI NAS Network Description Encodings enum eQMINASNetworkDescriptionEncodings:UINT8 { eQMINASNetworkDescriptionEncodings_UnspecifiedOctet = 0, eQMINASNetworkDescriptionEncodings_ExtendedProtocolMessage = 1, eQMINASNetworkDescriptionEncodings_7BitASCII = 2, eQMINASNetworkDescriptionEncodings_IA5 = 3, eQMINASNetworkDescriptionEncodings_UNICODE = 4, eQMINASNetworkDescriptionEncodings_ShiftJIS = 5, eQMINASNetworkDescriptionEncodings_Korean = 6, eQMINASNetworkDescriptionEncodings_LatinHebrew = 7, eQMINASNetworkDescriptionEncodings_Latin = 8, eQMINASNetworkDescriptionEncodings_GSM7Bit = 9, eQMINASNetworkDescriptionEncodings_GSMDCS = 10, }; // Enum to describe QMI NAS Network Scan Result enum eQMINASNetworkScanResult:UINT32 { eQMINASNetworkScanResult_Success = 0, eQMINASNetworkScanResult_Abort = 1, eQMINASNetworkScanResult_RadioLinkFailure = 2, }; // Enum to describe QMI NAS Network Selection enum eQMINASNetworkSelection:INT8 { eQMINASNetworkSelection_AutomaticRegistration = 0, eQMINASNetworkSelection_ManualRegistration = 1, }; // Enum to describe QMI NAS PLMN Name Country Initials enum eQMINASPLMNNameCountryInitials:UINT8 { eQMINASPLMNNameCountryInitials_DoNotAddCountryInitials = 0, eQMINASPLMNNameCountryInitials_AddCountryInitials = 1, eQMINASPLMNNameCountryInitials_Unspecified = 255, }; // Enum to describe QMI NAS PLMN Name Encoding Schemes enum eQMINASPLMNNameEncodingSchemes:UINT8 { eQMINASPLMNNameEncodingSchemes_ASCII = 0, eQMINASPLMNNameEncodingSchemes_UCS2LE = 1, }; // Enum to describe QMI NAS PLMN Name Spare Bits enum eQMINASPLMNNameSpareBits:UINT8 { eQMINASPLMNNameSpareBits_Unknown = 0, eQMINASPLMNNameSpareBits_Bit8 = 1, eQMINASPLMNNameSpareBits_Bits78 = 2, eQMINASPLMNNameSpareBits_Bits68 = 3, eQMINASPLMNNameSpareBits_Bits58 = 4, eQMINASPLMNNameSpareBits_Bits48 = 5, eQMINASPLMNNameSpareBits_Bits38 = 6, eQMINASPLMNNameSpareBits_Bits28 = 7, }; // Enum to describe QMI NAS PRL Indicator enum eQMINASPRLIndicator:UINT8 { eQMINASPRLIndicator_SystemNotInPRL = 0, eQMINASPRLIndicator_SystemIsInPRL = 1, }; // Enum to describe QMI NAS PRL Preferences enum eQMINASPRLPreferences:UINT16 { eQMINASPRLPreferences_AcquireASideOnly = 1, eQMINASPRLPreferences_AcquireBSideOnly = 2, eQMINASPRLPreferences_AcquireAny = 16383, }; // Enum to describe QMI NAS PS Attach Actions enum eQMINASPSAttachActions:UINT8 { eQMINASPSAttachActions_Attach = 1, eQMINASPSAttachActions_Detach = 2, }; // Enum to describe QMI NAS Preferred Data Bath enum eQMINASPreferredDataBath:UINT8 { eQMINASPreferredDataBath_NotPreferred = 0, eQMINASPreferredDataBath_Preferred = 1, }; // Enum to describe QMI NAS Preferred States enum eQMINASPreferredStates:UINT8 { eQMINASPreferredStates_Unknown = 0, eQMINASPreferredStates_Preferred = 1, eQMINASPreferredStates_NotPreferred = 2, }; // Enum to describe QMI NAS RTRE Configuration enum eQMINASRTREConfiguration:UINT8 { eQMINASRTREConfiguration_RUIMOnly = 1, eQMINASRTREConfiguration_InternalSettingsOnly = 2, eQMINASRTREConfiguration_UseRUIMIfAvailable = 3, eQMINASRTREConfiguration_GSMOn1X = 4, }; // Enum to describe QMI NAS RX Level enum eQMINASRXLevel:UINT16 { eQMINASRXLevel_LessThan110dBm = 0, eQMINASRXLevel_110dBmto109dBm = 1, eQMINASRXLevel_109dBmto108dBm = 2, eQMINASRXLevel_108dBmto107dBm = 3, eQMINASRXLevel_107dBmto106dBm = 4, eQMINASRXLevel_106dBmto105dBm = 5, eQMINASRXLevel_105dBmto104dBm = 6, eQMINASRXLevel_104dBmto103dBm = 7, eQMINASRXLevel_103dBmto102dBm = 8, eQMINASRXLevel_102dBmto101dBm = 9, eQMINASRXLevel_101dBmto100dBm = 10, eQMINASRXLevel_100dBmto99dBm = 11, eQMINASRXLevel_99dBmto98dBm = 12, eQMINASRXLevel_98dBmto97dBm = 13, eQMINASRXLevel_97dBmto96dBm = 14, eQMINASRXLevel_96dBmto95dBm = 15, eQMINASRXLevel_95dBmto94dBm = 16, eQMINASRXLevel_94dBmto93dBm = 17, eQMINASRXLevel_93dBmto92dBm = 18, eQMINASRXLevel_92dBmto91dBm = 19, eQMINASRXLevel_91dBmto90dBm = 20, eQMINASRXLevel_90dBmto89dBm = 21, eQMINASRXLevel_89dBmto88dBm = 22, eQMINASRXLevel_88dBmto87dBm = 23, eQMINASRXLevel_87dBmto86dBm = 24, eQMINASRXLevel_86dBmto85dBm = 25, eQMINASRXLevel_85dBmto84dBm = 26, eQMINASRXLevel_84dBmto83dBm = 27, eQMINASRXLevel_83dBmto82dBm = 28, eQMINASRXLevel_82dBmto81dBm = 29, eQMINASRXLevel_81dBmto80dBm = 30, eQMINASRXLevel_80dBmto79dBm = 31, eQMINASRXLevel_79dBmto78dBm = 32, eQMINASRXLevel_78dBmto77dBm = 33, eQMINASRXLevel_77dBmto76dBm = 34, eQMINASRXLevel_76dBmto75dBm = 35, eQMINASRXLevel_75dBmto74dBm = 36, eQMINASRXLevel_74dBmto73dBm = 37, eQMINASRXLevel_73dBmto72dBm = 38, eQMINASRXLevel_72dBmto71dBm = 39, eQMINASRXLevel_71dBmto70dBm = 40, eQMINASRXLevel_70dBmto69dBm = 41, eQMINASRXLevel_69dBmto68dBm = 42, eQMINASRXLevel_68dBmto67dBm = 43, eQMINASRXLevel_67dBmto66dBm = 44, eQMINASRXLevel_66dBmto65dBm = 45, eQMINASRXLevel_65dBmto64dBm = 46, eQMINASRXLevel_64dBmto63dBm = 47, eQMINASRXLevel_63dBmto62dBm = 48, eQMINASRXLevel_62dBmto61dBm = 49, eQMINASRXLevel_61dBmto60dBm = 50, eQMINASRXLevel_60dBmto59dBm = 51, eQMINASRXLevel_59dBmto58dBm = 52, eQMINASRXLevel_58dBmto57dBm = 53, eQMINASRXLevel_57dBmto56dBm = 54, eQMINASRXLevel_56dBmto55dBm = 55, eQMINASRXLevel_55dBmto54dBm = 56, eQMINASRXLevel_54dBmto53dBm = 57, eQMINASRXLevel_53dBmto52dBm = 58, eQMINASRXLevel_52dBmto51dBm = 59, eQMINASRXLevel_51dBmto50dBm = 60, eQMINASRXLevel_50dBmto49dBm = 61, eQMINASRXLevel_49dBmto48dBm = 62, eQMINASRXLevel_GreaterThan48dBm = 63, }; // Enum to describe QMI NAS Radio Access Technologies enum eQMINASRadioAccessTechnologies:UINT8 { eQMINASRadioAccessTechnologies_GSM = 4, eQMINASRadioAccessTechnologies_UMTS = 5, eQMINASRadioAccessTechnologies_LTE = 8, eQMINASRadioAccessTechnologies_TDSCDMA = 9, eQMINASRadioAccessTechnologies_NoChange = 255, }; // Enum to describe QMI NAS Radio Interfaces enum eQMINASRadioInterfaces:UINT8 { eQMINASRadioInterfaces_NoneNoService = 0, eQMINASRadioInterfaces_CDMA20001x = 1, eQMINASRadioInterfaces_CDMA2000HRPD = 2, eQMINASRadioInterfaces_AMPS = 3, eQMINASRadioInterfaces_GSM = 4, eQMINASRadioInterfaces_UMTS = 5, eQMINASRadioInterfaces_LTE = 8, eQMINASRadioInterfaces_TDSCDMA = 9, }; // Enum to describe QMI NAS Radio System Modes enum eQMINASRadioSystemModes:UINT32 { eQMINASRadioSystemModes_NoService = 0, eQMINASRadioSystemModes_Acquiring = 1, eQMINASRadioSystemModes_InService = 2, }; // Enum to describe QMI NAS Register Actions enum eQMINASRegisterActions:UINT8 { eQMINASRegisterActions_Automatic = 1, eQMINASRegisterActions_Manual = 2, }; // Enum to describe QMI NAS Registered Networks enum eQMINASRegisteredNetworks:UINT8 { eQMINASRegisteredNetworks_Unknown = 0, eQMINASRegisteredNetworks_3GPP2 = 1, eQMINASRegisteredNetworks_3GPP = 2, }; // Enum to describe QMI NAS Registration Domains enum eQMINASRegistrationDomains:UINT32 { eQMINASRegistrationDomains_NotApplicable = 0, eQMINASRegistrationDomains_CSOnly = 1, eQMINASRegistrationDomains_PSOnly = 2, eQMINASRegistrationDomains_CSAndPS = 3, eQMINASRegistrationDomains_LimitedService = 4, }; // Enum to describe QMI NAS Registration Restrictions enum eQMINASRegistrationRestrictions:UINT32 { eQMINASRegistrationRestrictions_Unrestricted = 0, eQMINASRegistrationRestrictions_CampedOnly = 1, eQMINASRegistrationRestrictions_Limited = 2, }; // Enum to describe QMI NAS Registration States enum eQMINASRegistrationStates:UINT8 { eQMINASRegistrationStates_NASNotRegistered = 0, eQMINASRegistrationStates_NASRegistered = 1, eQMINASRegistrationStates_NASNotRegisteredSearching = 2, eQMINASRegistrationStates_NASRegistrationDenied = 3, eQMINASRegistrationStates_RegistrationStateUnknown = 4, }; // Enum to describe QMI NAS Report Rate enum eQMINASReportRate:UINT8 { eQMINASReportRate_ReportUsingDefaultConfig = 0, eQMINASReportRate_ReportEvery1Second = 1, eQMINASReportRate_ReportEvery2Second = 2, eQMINASReportRate_ReportEvery3Second = 3, eQMINASReportRate_ReportEvery4Second = 4, eQMINASReportRate_ReportEvery5Second = 5, }; // Enum to describe QMI NAS Revision enum eQMINASRevision:UINT8 { eQMINASRevision_JSTD088 = 1, eQMINASRevision_IS95RevA = 3, eQMINASRevision_IS95RevB = 4, eQMINASRevision_IS2000 = 6, eQMINASRevision_IS2000RelA = 7, eQMINASRevision_IS2000RelB = 8, eQMINASRevision_IS2000RelC = 9, eQMINASRevision_IS2000RelCMI = 10, eQMINASRevision_IS2000RelD = 11, }; // Enum to describe QMI NAS Roam Status enum eQMINASRoamStatus:UINT8 { eQMINASRoamStatus_Off = 0, eQMINASRoamStatus_On = 1, eQMINASRoamStatus_Blinking = 2, eQMINASRoamStatus_OutOfNeighborhood = 3, eQMINASRoamStatus_OutOfBuilding = 4, eQMINASRoamStatus_PreferredSystem = 5, eQMINASRoamStatus_AvailableSystem = 6, eQMINASRoamStatus_AlliancePartner = 7, eQMINASRoamStatus_PremiumPartner = 8, eQMINASRoamStatus_FullService = 9, eQMINASRoamStatus_PartialService = 10, eQMINASRoamStatus_BannerIsOn = 11, eQMINASRoamStatus_BannerIsOff = 12, }; // Enum to describe QMI NAS Roaming Indicators enum eQMINASRoamingIndicators:UINT8 { eQMINASRoamingIndicators_Roaming = 0, eQMINASRoamingIndicators_Home = 1, eQMINASRoamingIndicators_RoamingPartner = 2, }; // Enum to describe QMI NAS Roaming Preferences enum eQMINASRoamingPreferences:UINT8 { eQMINASRoamingPreferences_Automatic = 0, eQMINASRoamingPreferences_HomeOnly = 1, eQMINASRoamingPreferences_RoamingOnly = 2, eQMINASRoamingPreferences_HomeRoaming = 3, }; // Enum to describe QMI NAS Roaming Preferences 2 enum eQMINASRoamingPreferences2:UINT16 { eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorOff = 1, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotOff = 2, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotFlashing = 3, eQMINASRoamingPreferences2_AcquireAny = 255, }; // Enum to describe QMI NAS Roaming States enum eQMINASRoamingStates:UINT8 { eQMINASRoamingStates_Unknown = 0, eQMINASRoamingStates_Home = 1, eQMINASRoamingStates_Roam = 2, }; // Enum to describe QMI NAS SIM Reject States enum eQMINASSIMRejectStates:UINT32 { eQMINASSIMRejectStates_NotAvailable = 0, eQMINASSIMRejectStates_Available = 1, eQMINASSIMRejectStates_CSInvalid = 2, eQMINASSIMRejectStates_PSInvalid = 3, eQMINASSIMRejectStates_CSAndPSInvalid = 4, }; // Enum to describe QMI NAS SINR Levels enum eQMINASSINRLevels:UINT8 { eQMINASSINRLevels_Negative9dB = 0, eQMINASSINRLevels_Negative6dB = 1, eQMINASSINRLevels_Negative45dB = 2, eQMINASSINRLevels_Negative3dB = 3, eQMINASSINRLevels_Negative2dB = 4, eQMINASSINRLevels_1dB = 5, eQMINASSINRLevels_3dB = 6, eQMINASSINRLevels_6dB = 7, eQMINASSINRLevels_9dB = 8, }; // Enum to describe QMI NAS Service Domain Prefs enum eQMINASServiceDomainPrefs:UINT32 { eQMINASServiceDomainPrefs_CircuitSwitched = 0, eQMINASServiceDomainPrefs_PacketSwitched = 1, eQMINASServiceDomainPrefs_CircuitPacketSwitched = 2, eQMINASServiceDomainPrefs_PacketSwitchedAttach = 3, eQMINASServiceDomainPrefs_PacketSwitchedDetach = 4, }; // Enum to describe QMI NAS Service Domains enum eQMINASServiceDomains:UINT8 { eQMINASServiceDomains_NoService = 0, eQMINASServiceDomains_CircuitSwitched = 1, }; // Enum to describe QMI NAS Service Option Actions enum eQMINASServiceOptionActions:UINT8 { eQMINASServiceOptionActions_Add = 0, eQMINASServiceOptionActions_Replace = 1, eQMINASServiceOptionActions_Delete = 2, eQMINASServiceOptionActions_NoChange = 3, }; // Enum to describe QMI NAS Service Status enum eQMINASServiceStatus:UINT8 { eQMINASServiceStatus_NoService = 0, eQMINASServiceStatus_LimitedService = 1, eQMINASServiceStatus_ServiceAvailable = 2, eQMINASServiceStatus_LimitedRegionalService = 3, eQMINASServiceStatus_PowerSaveOrDeepSleep = 4, }; // Enum to describe QMI NAS Standby Preference enum eQMINASStandbyPreference:UINT8 { eQMINASStandbyPreference_SingleStandby = 1, eQMINASStandbyPreference_DualStandbyWithTuneAway = 2, eQMINASStandbyPreference_DualStandbyWithoutTuneAway = 4, eQMINASStandbyPreference_AutomaticModeWithTuneAway = 5, eQMINASStandbyPreference_AutomaticModeWithoutTuneAway = 6, }; // Enum to describe QMI NAS Subscription Type enum eQMINASSubscriptionType:UINT8 { eQMINASSubscriptionType_PrimarySubscription = 0, eQMINASSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI NAS System Forbidden enum eQMINASSystemForbidden:UINT8 { eQMINASSystemForbidden_SystemIsNotForbidden = 0, eQMINASSystemForbidden_SystemIsForbidden = 1, }; // Enum to describe QMI NAS System Preferences enum eQMINASSystemPreferences:UINT8 { eQMINASSystemPreferences_Automatic = 0, eQMINASSystemPreferences_AutomaticA = 1, eQMINASSystemPreferences_AutomaticB = 2, }; // Enum to describe QMI NAS System Service Capabilities enum eQMINASSystemServiceCapabilities:UINT8 { eQMINASSystemServiceCapabilities_NoService = 0, eQMINASSystemServiceCapabilities_CircuitSwitchedOnly = 1, eQMINASSystemServiceCapabilities_PacketSwitchedOnly = 2, eQMINASSystemServiceCapabilities_CircuitSwitchedAndPacketSwitched = 3, eQMINASSystemServiceCapabilities_Camped = 4, }; // Enum to describe QMI NAS Tech Pref Durations enum eQMINASTechPrefDurations:UINT8 { eQMINASTechPrefDurations_Permanent = 0, eQMINASTechPrefDurations_PowerCycle = 1, }; // Enum to describe QMI NAS Tech Prefs enum eQMINASTechPrefs:UINT8 { eQMINASTechPrefs_Automatic = 0, eQMINASTechPrefs_3GPP2 = 1, eQMINASTechPrefs_3GPP = 2, eQMINASTechPrefs_Invalid = 3, }; // Enum to describe QMI OMA HFA Done States enum eQMIOMAHFADoneStates:UINT8 { eQMIOMAHFADoneStates_None = 0, eQMIOMAHFADoneStates_Succeeded = 1, eQMIOMAHFADoneStates_Failed = 2, }; // Enum to describe QMI OMA Selections enum eQMIOMASelections:UINT8 { eQMIOMASelections_Reject = 0, eQMIOMASelections_Accept = 1, }; // Enum to describe QMI OMA Session Failure Reasons enum eQMIOMASessionFailureReasons:UINT8 { eQMIOMASessionFailureReasons_Unknown = 0, eQMIOMASessionFailureReasons_NetworkUnavailable = 1, eQMIOMASessionFailureReasons_ServerUnavailable = 2, eQMIOMASessionFailureReasons_AuthenticationFailed = 3, eQMIOMASessionFailureReasons_MaxRetryExceeded = 4, eQMIOMASessionFailureReasons_SessionCancelled = 5, }; // Enum to describe QMI OMA Session States enum eQMIOMASessionStates:UINT8 { eQMIOMASessionStates_CompleteInfoUpdated = 0, eQMIOMASessionStates_CompleteInfoUnavailable = 1, eQMIOMASessionStates_Failed = 2, eQMIOMASessionStates_Retrying = 3, eQMIOMASessionStates_Connecting = 4, eQMIOMASessionStates_Connected = 5, eQMIOMASessionStates_Authenticated = 6, eQMIOMASessionStates_MDNDownloaded = 7, eQMIOMASessionStates_MSIDDownloaded = 8, eQMIOMASessionStates_PRLDownloaded = 9, eQMIOMASessionStates_MIPProfileDownloaded = 10, }; // Enum to describe QMI OMA Session Types enum eQMIOMASessionTypes:UINT8 { eQMIOMASessionTypes_ClientInitiatedDeviceConfigure = 0, eQMIOMASessionTypes_ClientInitiatedPRLUpdate = 1, eQMIOMASessionTypes_ClientInitiatedHandsFreeActivation = 2, eQMIOMASessionTypes_DeviceInitiatedHandsFreeActivation = 3, eQMIOMASessionTypes_NetworkInitiatedPRLUpdate = 4, eQMIOMASessionTypes_NetworkInitiatedDeviceConfigure = 5, }; // Enum to describe QMI PBM AAS Operations enum eQMIPBMAASOperations:UINT8 { eQMIPBMAASOperations_Add = 0, eQMIPBMAASOperations_Modify = 1, eQMIPBMAASOperations_Delete = 2, }; // Enum to describe QMI PBM Emergency Categories enum eQMIPBMEmergencyCategories { eQMIPBMEmergencyCategories_Police = 1, eQMIPBMEmergencyCategories_Ambulance = 2, eQMIPBMEmergencyCategories_FireBrigade = 4, eQMIPBMEmergencyCategories_MarineGuard = 8, eQMIPBMEmergencyCategories_MountainRescue = 16, eQMIPBMEmergencyCategories_ManualECall = 32, eQMIPBMEmergencyCategories_AutomaticECall = 64, eQMIPBMEmergencyCategories_Spare = 128, }; // Enum to describe QMI PBM Number Plans enum eQMIPBMNumberPlans:UINT8 { eQMIPBMNumberPlans_Unknown = 0, eQMIPBMNumberPlans_ISDN = 1, eQMIPBMNumberPlans_Data = 2, eQMIPBMNumberPlans_Telex = 3, eQMIPBMNumberPlans_National = 4, eQMIPBMNumberPlans_Private = 5, }; // Enum to describe QMI PBM Number Types enum eQMIPBMNumberTypes:UINT8 { eQMIPBMNumberTypes_Unknown = 0, eQMIPBMNumberTypes_International = 1, eQMIPBMNumberTypes_National = 2, eQMIPBMNumberTypes_NetworkSpecific = 3, eQMIPBMNumberTypes_DedicatedAccess = 4, }; // Enum to describe QMI PBM Operations enum eQMIPBMOperations:UINT8 { eQMIPBMOperations_Add = 1, eQMIPBMOperations_Modify = 2, eQMIPBMOperations_Delete = 3, }; // Enum to describe QMI PBM Phonebook Types enum eQMIPBMPhonebookTypes:UINT16 { eQMIPBMPhonebookTypes_AbbreviatedDialingNumber = 1, eQMIPBMPhonebookTypes_FixedDialingNumber = 2, eQMIPBMPhonebookTypes_MobileSubscriberIntegratedServicesDigitalNetwork = 4, eQMIPBMPhonebookTypes_MailBoxDialingNumber = 8, eQMIPBMPhonebookTypes_ServiceDialingNumber = 16, eQMIPBMPhonebookTypes_BarredDialingNumber = 32, eQMIPBMPhonebookTypes_LastNumberDialed = 64, eQMIPBMPhonebookTypes_MailBoxNumber = 128, }; // Enum to describe QMI PBM Protection Methods enum eQMIPBMProtectionMethods:UINT32 { eQMIPBMProtectionMethods_AlwaysAllowed = 0, eQMIPBMProtectionMethods_NeverAllowed = 1, eQMIPBMProtectionMethods_AllowedOnAllPINsVerified = 2, eQMIPBMProtectionMethods_AllowedOnAnyPINVerified = 3, eQMIPBMProtectionMethods_AllowedOnOnePINVerified = 4, }; // Enum to describe QMI PBM Refresh Status enum eQMIPBMRefreshStatus:UINT8 { eQMIPBMRefreshStatus_RefreshStart = 1, eQMIPBMRefreshStatus_RefreshEnd = 2, }; // Enum to describe QMI PBM Session Types enum eQMIPBMSessionTypes:UINT8 { eQMIPBMSessionTypes_GWPrimary = 0, eQMIPBMSessionTypes_1xPrimary = 1, eQMIPBMSessionTypes_GWSecondary = 2, eQMIPBMSessionTypes_1xSecondary = 3, eQMIPBMSessionTypes_NonProvisioningOnSlot1 = 4, eQMIPBMSessionTypes_NonProvisioningOnSlot2 = 5, eQMIPBMSessionTypes_GlobalPhonebookOnSlot1 = 6, eQMIPBMSessionTypes_GlobalPhonebookOnSlot2 = 7, }; // Enum to describe QMI PBM States enum eQMIPBMStates:UINT8 { eQMIPBMStates_Ready = 0, eQMIPBMStates_NotReady = 1, eQMIPBMStates_NotAvailable = 2, eQMIPBMStates_PINRestriction = 3, eQMIPBMStates_PUKRestriction = 4, eQMIPBMStates_Invalidated = 5, eQMIPBMStates_Sync = 6, }; // Enum to describe QMI PBM Subscription Types enum eQMIPBMSubscriptionTypes:UINT8 { eQMIPBMSubscriptionTypes_Primary = 0, eQMIPBMSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI PDP Types enum eQMIPDPTypes:UINT8 { eQMIPDPTypes_PDPIPv4 = 0, eQMIPDPTypes_PDPPPP = 1, eQMIPDPTypes_PDPIPv6 = 2, eQMIPDPTypes_PDPIPv4OrIPv6 = 3, }; // Enum to describe QMI PDS Altitude Source enum eQMIPDSAltitudeSource:UINT8 { eQMIPDSAltitudeSource_Unknown = 0, eQMIPDSAltitudeSource_GPS = 1, eQMIPDSAltitudeSource_CellID = 2, eQMIPDSAltitudeSource_EnhancedCellID = 3, eQMIPDSAltitudeSource_WiFi = 4, eQMIPDSAltitudeSource_Terrestrial = 5, eQMIPDSAltitudeSource_TerrestrialHybrid = 6, eQMIPDSAltitudeSource_AltitudeDatabase = 7, eQMIPDSAltitudeSource_BarometricAltimeter = 8, eQMIPDSAltitudeSource_Other = 9, }; // Enum to describe QMI PDS Blanking Enable enum eQMIPDSBlankingEnable:UINT8 { eQMIPDSBlankingEnable_DisableBlanking = 0, eQMIPDSBlankingEnable_EnableBlankingUnconditionally = 1, eQMIPDSBlankingEnable_EnableBlankingConditionally = 2, eQMIPDSBlankingEnable_SimulateIMDJamming = 3, }; // Enum to describe QMI PDS Calendar Days enum eQMIPDSCalendarDays:UINT8 { eQMIPDSCalendarDays_Sunday = 0, eQMIPDSCalendarDays_Monday = 1, eQMIPDSCalendarDays_Tuesday = 2, eQMIPDSCalendarDays_Wednesday = 3, eQMIPDSCalendarDays_Thursday = 4, eQMIPDSCalendarDays_Friday = 5, eQMIPDSCalendarDays_Saturday = 6, }; // Enum to describe QMI PDS Calendar Months enum eQMIPDSCalendarMonths:UINT8 { eQMIPDSCalendarMonths_January = 0, eQMIPDSCalendarMonths_February = 1, eQMIPDSCalendarMonths_March = 2, eQMIPDSCalendarMonths_April = 3, eQMIPDSCalendarMonths_May = 4, eQMIPDSCalendarMonths_June = 5, eQMIPDSCalendarMonths_July = 6, eQMIPDSCalendarMonths_August = 7, eQMIPDSCalendarMonths_September = 8, eQMIPDSCalendarMonths_October = 9, eQMIPDSCalendarMonths_November = 10, eQMIPDSCalendarMonths_December = 11, }; // Enum to describe QMI PDS Comm Event Protocols enum eQMIPDSCommEventProtocols:UINT8 { eQMIPDSCommEventProtocols_UMTSUserPlaneSUPL = 0, eQMIPDSCommEventProtocols_1X = 1, eQMIPDSCommEventProtocols_UMTSControlPlaneWCDMA = 2, eQMIPDSCommEventProtocols_UMTSControlPlaneGSM = 3, eQMIPDSCommEventProtocols_V1V2 = 4, eQMIPDSCommEventProtocols_KDDI = 5, eQMIPDSCommEventProtocols_XTRADataDownload = 6, eQMIPDSCommEventProtocols_SNTPTimeDownload = 7, eQMIPDSCommEventProtocols_1XControlPlane = 8, eQMIPDSCommEventProtocols_Unknown = 255, }; // Enum to describe QMI PDS Comm Event Types enum eQMIPDSCommEventTypes:UINT8 { eQMIPDSCommEventTypes_Begin = 0, eQMIPDSCommEventTypes_Connected = 1, eQMIPDSCommEventTypes_Failure = 2, eQMIPDSCommEventTypes_Done = 3, eQMIPDSCommEventTypes_OtherFailure = 4, }; // Enum to describe QMI PDS Config enum eQMIPDSConfig:UINT8 { eQMIPDSConfig_PersistentDisabled = 0, eQMIPDSConfig_PersistentEnabled = 1, eQMIPDSConfig_NotPersistentDisabled = 240, eQMIPDSConfig_NotPersistentEnabled = 241, }; // Enum to describe QMI PDS Cradle Mount State enum eQMIPDSCradleMountState:UINT8 { eQMIPDSCradleMountState_NotMounted = 0, eQMIPDSCradleMountState_Mounted = 1, eQMIPDSCradleMountState_Unknown = 2, }; // Enum to describe QMI PDS EFS File Operations enum eQMIPDSEFSFileOperations:UINT8 { eQMIPDSEFSFileOperations_Write = 0, eQMIPDSEFSFileOperations_Delete = 1, }; // Enum to describe QMI PDS Encryption Algorithm enum eQMIPDSEncryptionAlgorithm:UINT8 { eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmSHA1 = 0, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmMax = 1, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmNone = 255, }; // Enum to describe QMI PDS External Power State enum eQMIPDSExternalPowerState:UINT8 { eQMIPDSExternalPowerState_NotConnected = 0, eQMIPDSExternalPowerState_Connected = 1, eQMIPDSExternalPowerState_Unknown = 2, }; // Enum to describe QMI PDS Force Receiver Off enum eQMIPDSForceReceiverOff:UINT8 { eQMIPDSForceReceiverOff_Disable = 0, eQMIPDSForceReceiverOff_Enable = 1, }; // Enum to describe QMI PDS IMD Jamming Bands enum eQMIPDSIMDJammingBands:UINT32 { eQMIPDSIMDJammingBands_GPS = 0, eQMIPDSIMDJammingBands_GLONASS = 1, }; // Enum to describe QMI PDS IMD Jamming States enum eQMIPDSIMDJammingStates:UINT8 { eQMIPDSIMDJammingStates_Terminate = 0, eQMIPDSIMDJammingStates_Initiate = 1, }; // Enum to describe QMI PDS Injected Position Sources enum eQMIPDSInjectedPositionSources:UINT8 { eQMIPDSInjectedPositionSources_Unknown = 0, eQMIPDSInjectedPositionSources_GPS = 1, eQMIPDSInjectedPositionSources_CellID = 2, eQMIPDSInjectedPositionSources_EnhancedCellID = 3, eQMIPDSInjectedPositionSources_WiFi = 4, eQMIPDSInjectedPositionSources_Terrestial = 5, eQMIPDSInjectedPositionSources_TerrestialHybrid = 6, eQMIPDSInjectedPositionSources_Other = 7, }; // Enum to describe QMI PDS Mediums enum eQMIPDSMediums:UINT8 { eQMIPDSMediums_WWAN = 0, }; // Enum to describe QMI PDS Method States enum eQMIPDSMethodStates:UINT8 { eQMIPDSMethodStates_Disabled = 0, eQMIPDSMethodStates_Enabled = 1, eQMIPDSMethodStates_NotSupported = 255, }; // Enum to describe QMI PDS Motion Modes enum eQMIPDSMotionModes:UINT8 { eQMIPDSMotionModes_Unknown = 0, eQMIPDSMotionModes_Pedestrian = 1, eQMIPDSMotionModes_Vehicle = 2, }; // Enum to describe QMI PDS Motion States enum eQMIPDSMotionStates:UINT8 { eQMIPDSMotionStates_Unknown = 0, eQMIPDSMotionStates_Stationary = 1, eQMIPDSMotionStates_InMotion = 2, }; // Enum to describe QMI PDS Motion Submodes enum eQMIPDSMotionSubmodes:UINT8 { eQMIPDSMotionSubmodes_Unknown = 0, eQMIPDSMotionSubmodes_Walking = 1, eQMIPDSMotionSubmodes_Running = 2, }; // Enum to describe QMI PDS NMEA Reporting Options enum eQMIPDSNMEAReportingOptions:UINT8 { eQMIPDSNMEAReportingOptions_1HzFromTimeRequestedUntilFinalPositionDetermination = 0, eQMIPDSNMEAReportingOptions_FinalPositionDeterminationOnly = 1, }; // Enum to describe QMI PDS NMEA Sentence Operating Modes enum eQMIPDSNMEASentenceOperatingModes:UINT8 { eQMIPDSNMEASentenceOperatingModes_Standalone = 0, eQMIPDSNMEASentenceOperatingModes_MSBased = 1, eQMIPDSNMEASentenceOperatingModes_MSAssisted = 2, eQMIPDSNMEASentenceOperatingModes_Unknown = 255, }; // Enum to describe QMI PDS Network Mode enum eQMIPDSNetworkMode:UINT8 { eQMIPDSNetworkMode_UMTS = 0, eQMIPDSNetworkMode_CDMA = 1, }; // Enum to describe QMI PDS ODP States enum eQMIPDSODPStates:UINT8 { eQMIPDSODPStates_Disables = 0, eQMIPDSODPStates_EnabledLowPowerMode = 1, eQMIPDSODPStates_EnabledReadyMode = 2, }; // Enum to describe QMI PDS Operation Types enum eQMIPDSOperationTypes:UINT8 { eQMIPDSOperationTypes_Standalone = 0, eQMIPDSOperationTypes_MSBased = 1, eQMIPDSOperationTypes_MSAssisted = 2, }; // Enum to describe QMI PDS Output Devices enum eQMIPDSOutputDevices:UINT8 { eQMIPDSOutputDevices_NoneDisabled = 0, eQMIPDSOutputDevices_USB = 1, eQMIPDSOutputDevices_UART1 = 2, eQMIPDSOutputDevices_UART2 = 3, eQMIPDSOutputDevices_SharedMemory = 4, }; // Enum to describe QMI PDS Privacy Modes enum eQMIPDSPrivacyModes:UINT8 { eQMIPDSPrivacyModes_NoNotifyVerify = 0, eQMIPDSPrivacyModes_Notify = 1, eQMIPDSPrivacyModes_NotifyVerifyAllowNoResponse = 2, eQMIPDSPrivacyModes_NotifyVerifyRequireResponse = 3, eQMIPDSPrivacyModes_PrivacyOverride = 4, }; // Enum to describe QMI PDS Reliability Indicator enum eQMIPDSReliabilityIndicator:UINT8 { eQMIPDSReliabilityIndicator_NotSet = 0, eQMIPDSReliabilityIndicator_VeryLow = 1, eQMIPDSReliabilityIndicator_Low = 2, eQMIPDSReliabilityIndicator_Medium = 3, eQMIPDSReliabilityIndicator_High = 4, }; // Enum to describe QMI PDS Report Security Challenge enum eQMIPDSReportSecurityChallenge:UINT8 { eQMIPDSReportSecurityChallenge_Disable = 0, eQMIPDSReportSecurityChallenge_Enable = 1, }; // Enum to describe QMI PDS Reporting State enum eQMIPDSReportingState:UINT8 { eQMIPDSReportingState_StopReporting = 0, eQMIPDSReportingState_StartReporting = 1, }; // Enum to describe QMI PDS Reset Reasons enum eQMIPDSResetReasons:UINT32 { eQMIPDSResetReasons_PositionEngine = 0, eQMIPDSResetReasons_GNSSBackgroundSCan = 1, eQMIPDSResetReasons_InjectClockInconsistency = 2, eQMIPDSResetReasons_GPSSubframeMisalignment = 3, eQMIPDSResetReasons_DecodedTimeInconsistency = 4, eQMIPDSResetReasons_CodeConsistencyError = 5, eQMIPDSResetReasons_SoftResetFromINTMSError = 6, eQMIPDSResetReasons_SoftResetFromRFFailure = 7, }; // Enum to describe QMI PDS Reset States enum eQMIPDSResetStates:UINT32 { eQMIPDSResetStates_InProgress = 0, eQMIPDSResetStates_Completed = 1, eQMIPDSResetStates_UnableToInitialize = 2, eQMIPDSResetStates_E911CallInProgress = 3, }; // Enum to describe QMI PDS SBAS States enum eQMIPDSSBASStates:UINT8 { eQMIPDSSBASStates_Disabled = 0, eQMIPDSSBASStates_Enabled = 1, eQMIPDSSBASStates_Unknown = 255, }; // Enum to describe QMI PDS SPI State enum eQMIPDSSPIState:UINT8 { eQMIPDSSPIState_DeviceIsNonstationary = 0, eQMIPDSSPIState_DeviceIsStationary = 1, }; // Enum to describe QMI PDS SUPL Data Coding Schemes enum eQMIPDSSUPLDataCodingSchemes:UINT8 { eQMIPDSSUPLDataCodingSchemes_UTF8 = 0, eQMIPDSSUPLDataCodingSchemes_UCS2 = 1, eQMIPDSSUPLDataCodingSchemes_GSM = 2, eQMIPDSSUPLDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL ID/Name Data Coding Schemes enum eQMIPDSSUPLIDNameDataCodingSchemes:UINT8 { eQMIPDSSUPLIDNameDataCodingSchemes_LogicalName = 0, eQMIPDSSUPLIDNameDataCodingSchemes_EmailAddress = 1, eQMIPDSSUPLIDNameDataCodingSchemes_MSISDN = 2, eQMIPDSSUPLIDNameDataCodingSchemes_URL = 3, eQMIPDSSUPLIDNameDataCodingSchemes_SIPURL = 4, eQMIPDSSUPLIDNameDataCodingSchemes_MIN = 5, eQMIPDSSUPLIDNameDataCodingSchemes_MDN = 6, eQMIPDSSUPLIDNameDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL Modes enum eQMIPDSSUPLModes:UINT8 { eQMIPDSSUPLModes_MSAssisted = 0, eQMIPDSSUPLModes_MSBased = 1, eQMIPDSSUPLModes_MSAssistedPreferred = 2, eQMIPDSSUPLModes_MSBasedPreferred = 3, eQMIPDSSUPLModes_Standalone = 4, eQMIPDSSUPLModes_AFLT = 5, eQMIPDSSUPLModes_ECID = 6, eQMIPDSSUPLModes_EOTD = 7, eQMIPDSSUPLModes_OTDOA = 8, eQMIPDSSUPLModes_NoPosition = 9, }; // Enum to describe QMI PDS SV Almanac Status enum eQMIPDSSVAlmanacStatus:UINT8 { eQMIPDSSVAlmanacStatus_Unavailable = 0, eQMIPDSSVAlmanacStatus_Available = 1, }; // Enum to describe QMI PDS SV Ephemeris Status enum eQMIPDSSVEphemerisStatus:UINT8 { eQMIPDSSVEphemerisStatus_Unavailable = 0, eQMIPDSSVEphemerisStatus_Available = 1, }; // Enum to describe QMI PDS SV Health Status enum eQMIPDSSVHealthStatus:UINT8 { eQMIPDSSVHealthStatus_Unhealthy = 0, eQMIPDSSVHealthStatus_Healthy = 1, }; // Enum to describe QMI PDS SV Processing Status enum eQMIPDSSVProcessingStatus:UINT8 { eQMIPDSSVProcessingStatus_Idle = 1, eQMIPDSSVProcessingStatus_Search = 2, eQMIPDSSVProcessingStatus_SearchVerify = 3, eQMIPDSSVProcessingStatus_BitEdge = 4, eQMIPDSSVProcessingStatus_Track = 5, }; // Enum to describe QMI PDS SV Systems enum eQMIPDSSVSystems:UINT8 { eQMIPDSSVSystems_GPS = 1, eQMIPDSSVSystems_Galileo = 2, eQMIPDSSVSystems_SBAS = 3, eQMIPDSSVSystems_Compass = 4, eQMIPDSSVSystems_Glonass = 5, }; // Enum to describe QMI PDS Server Options enum eQMIPDSServerOptions:UINT8 { eQMIPDSServerOptions_Default = 0, }; // Enum to describe QMI PDS Session Control Types enum eQMIPDSSessionControlTypes:UINT8 { eQMIPDSSessionControlTypes_Automatic = 0, }; // Enum to describe QMI PDS Session Status enum eQMIPDSSessionStatus:UINT8 { eQMIPDSSessionStatus_Success = 0, eQMIPDSSessionStatus_InProgress = 1, eQMIPDSSessionStatus_GeneralFailure = 2, eQMIPDSSessionStatus_Timeout = 3, eQMIPDSSessionStatus_UserEnded = 4, eQMIPDSSessionStatus_BadParameter = 5, eQMIPDSSessionStatus_PhoneOffline = 6, eQMIPDSSessionStatus_EngineLocked = 7, eQMIPDSSessionStatus_E911SessionInProgress = 8, }; // Enum to describe QMI PDS Session Types enum eQMIPDSSessionTypes:UINT8 { eQMIPDSSessionTypes_New = 0, }; // Enum to describe QMI PDS Source Linkage enum eQMIPDSSourceLinkage:UINT8 { eQMIPDSSourceLinkage_NotSpecified = 0, eQMIPDSSourceLinkage_FullyInterDependent = 1, eQMIPDSSourceLinkage_AltitudeDependsOnLatitudeAndLongitude = 2, eQMIPDSSourceLinkage_FullyIndependent = 3, }; // Enum to describe QMI PDS Stop Reason enum eQMIPDSStopReason:UINT8 { eQMIPDSStopReason_UserTerminated = 0, eQMIPDSStopReason_Other = 1, }; // Enum to describe QMI PDS Streaming Status enum eQMIPDSStreamingStatus:UINT8 { eQMIPDSStreamingStatus_NotReadyForStreaming = 0, eQMIPDSStreamingStatus_ReadyForStreaming = 1, }; // Enum to describe QMI PDS Suspend Reason enum eQMIPDSSuspendReason:UINT8 { eQMIPDSSuspendReason_OoS = 0, eQMIPDSSuspendReason_LPM = 1, eQMIPDSSuspendReason_Other = 2, }; // Enum to describe QMI PDS Time Bases enum eQMIPDSTimeBases:UINT8 { eQMIPDSTimeBases_GPS = 0, eQMIPDSTimeBases_UTC = 1, }; // Enum to describe QMI PDS Time Source enum eQMIPDSTimeSource:UINT8 { eQMIPDSTimeSource_Invalid = 0, eQMIPDSTimeSource_NetworkTimeTransfer = 1, eQMIPDSTimeSource_NetworkTimeTagging = 2, eQMIPDSTimeSource_ExternalInput = 3, eQMIPDSTimeSource_TOWDecode = 4, eQMIPDSTimeSource_TOWConfirmed = 5, eQMIPDSTimeSource_TOWAndWeekConfirmed = 6, eQMIPDSTimeSource_TimeAlignment = 7, eQMIPDSTimeSource_NavSolution = 8, eQMIPDSTimeSource_SolveForTime = 9, }; // Enum to describe QMI PDS Time Type enum eQMIPDSTimeType:UINT8 { eQMIPDSTimeType_UTCTime = 0, eQMIPDSTimeType_GPSTime = 1, eQMIPDSTimeType_Age = 2, }; // Enum to describe QMI PDS Tracking Session States enum eQMIPDSTrackingSessionStates:UINT8 { eQMIPDSTrackingSessionStates_Unknown = 0, eQMIPDSTrackingSessionStates_Inactive = 1, eQMIPDSTrackingSessionStates_Active = 2, }; // Enum to describe QMI PDS UMTS CP Data Coding Schemes enum eQMIPDSUMTSCPDataCodingSchemes:UINT8 { eQMIPDSUMTSCPDataCodingSchemes_German = 0, eQMIPDSUMTSCPDataCodingSchemes_English = 1, eQMIPDSUMTSCPDataCodingSchemes_Italian = 2, eQMIPDSUMTSCPDataCodingSchemes_French = 3, eQMIPDSUMTSCPDataCodingSchemes_Spanish = 4, eQMIPDSUMTSCPDataCodingSchemes_Dutch = 5, eQMIPDSUMTSCPDataCodingSchemes_Swedish = 6, eQMIPDSUMTSCPDataCodingSchemes_Danish = 7, eQMIPDSUMTSCPDataCodingSchemes_Portuguese = 8, eQMIPDSUMTSCPDataCodingSchemes_Finnish = 9, eQMIPDSUMTSCPDataCodingSchemes_Norwegian = 10, eQMIPDSUMTSCPDataCodingSchemes_Greek = 11, eQMIPDSUMTSCPDataCodingSchemes_Turkish = 12, eQMIPDSUMTSCPDataCodingSchemes_Hungarian = 13, eQMIPDSUMTSCPDataCodingSchemes_Polish = 14, eQMIPDSUMTSCPDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS UMTS CP Location Types enum eQMIPDSUMTSCPLocationTypes:UINT8 { eQMIPDSUMTSCPLocationTypes_Current = 0, eQMIPDSUMTSCPLocationTypes_CurrentOrLastKnown = 1, eQMIPDSUMTSCPLocationTypes_Initial = 2, }; // Enum to describe QMI PDS Uncertainty Coverage enum eQMIPDSUncertaintyCoverage:UINT8 { eQMIPDSUncertaintyCoverage_NotSpecified = 0, eQMIPDSUncertaintyCoverage_PointUncertainty = 1, eQMIPDSUncertaintyCoverage_FullyUncertainty = 2, }; // Enum to describe QMI PDS VX Data Coding Schemes enum eQMIPDSVXDataCodingSchemes:UINT8 { eQMIPDSVXDataCodingSchemes_Octet = 0, eQMIPDSVXDataCodingSchemes_EXNProtocolMessage = 1, eQMIPDSVXDataCodingSchemes_ASCII = 2, eQMIPDSVXDataCodingSchemes_IA5 = 3, eQMIPDSVXDataCodingSchemes_Unicode = 4, eQMIPDSVXDataCodingSchemes_ShiftJIS = 5, eQMIPDSVXDataCodingSchemes_Korean = 6, eQMIPDSVXDataCodingSchemes_LatinHebrew = 7, eQMIPDSVXDataCodingSchemes_Latin = 8, eQMIPDSVXDataCodingSchemes_GSM = 9, }; // Enum to describe QMI PDS VX Modes enum eQMIPDSVXModes:UINT8 { eQMIPDSVXModes_MSAssisted = 0, eQMIPDSVXModes_MSBased = 1, eQMIPDSVXModes_MSAssistedPreferred = 2, eQMIPDSVXModes_MSBasedPreferred = 3, }; // Enum to describe QMI PDS WWAN Network Preferences enum eQMIPDSWWANNetworkPreferences:UINT8 { eQMIPDSWWANNetworkPreferences_AnyAvailable = 0, eQMIPDSWWANNetworkPreferences_HomeOnly = 1, eQMIPDSWWANNetworkPreferences_RoamOnly = 2, }; // Enum to describe QMI PDS Wi-Fi Request Types enum eQMIPDSWiFiRequestTypes:UINT8 { eQMIPDSWiFiRequestTypes_StartPeriodicFixesHighFrequency = 0, eQMIPDSWiFiRequestTypes_StartPeriodicFixesKeepWarm = 1, eQMIPDSWiFiRequestTypes_StopPeriodicFixes = 2, eQMIPDSWiFiRequestTypes_Suspend = 4, }; // Enum to describe QMI Profile Types enum eQMIProfileTypes:UINT8 { eQMIProfileTypes_3GPP = 0, eQMIProfileTypes_3GPP2 = 1, }; // Enum to describe QMI QoS Delivery Orders enum eQMIQoSDeliveryOrders:UINT8 { eQMIQoSDeliveryOrders_Subscribe = 0, eQMIQoSDeliveryOrders_DeliveryOrderOn = 1, eQMIQoSDeliveryOrders_DeliveryOrderOff = 2, }; // Enum to describe QMI Results enum eQMIResults:UINT16 { eQMIResults_Success = 0, eQMIResults_Failure = 1, }; // Enum to describe QMI SAR RF States enum eQMISARRFStates { eQMISARRFStates_DefaultState = 0, eQMISARRFStates_State1 = 1, eQMISARRFStates_State2 = 2, eQMISARRFStates_State3 = 3, eQMISARRFStates_State4 = 4, eQMISARRFStates_State5 = 5, eQMISARRFStates_State6 = 6, eQMISARRFStates_State7 = 7, eQMISARRFStates_State8 = 8, }; // Enum to describe QMI SDU Error Ratios enum eQMISDUErrorRatios:UINT8 { eQMISDUErrorRatios_Subscribe = 0, eQMISDUErrorRatios_1X102 = 1, eQMISDUErrorRatios_7X103 = 2, eQMISDUErrorRatios_1X103 = 3, eQMISDUErrorRatios_1X104 = 4, eQMISDUErrorRatios_1X105 = 5, eQMISDUErrorRatios_1X106 = 6, eQMISDUErrorRatios_1X101 = 7, }; // Enum to describe QMI SDU Residual Bit Error Ratios enum eQMISDUResidualBitErrorRatios:UINT8 { eQMISDUResidualBitErrorRatios_Subscribe = 0, eQMISDUResidualBitErrorRatios_5X102 = 1, eQMISDUResidualBitErrorRatios_1X102 = 2, eQMISDUResidualBitErrorRatios_5X103 = 3, eQMISDUResidualBitErrorRatios_4X103 = 4, eQMISDUResidualBitErrorRatios_1X103 = 5, eQMISDUResidualBitErrorRatios_1X104 = 6, eQMISDUResidualBitErrorRatios_1X105 = 7, eQMISDUResidualBitErrorRatios_1X106 = 8, eQMISDUResidualBitErrorRatios_6X108 = 9, }; // Enum to describe QMI Traffic Classes enum eQMITrafficClasses:UINT8 { eQMITrafficClasses_Subscribed = 0, eQMITrafficClasses_Conversational = 1, eQMITrafficClasses_Streaming = 2, eQMITrafficClasses_Interactive = 3, eQMITrafficClasses_Background = 4, }; // Enum to describe QMI UIM APDU Response Status enum eQMIUIMAPDUResponseStatus:UINT8 { eQMIUIMAPDUResponseStatus_ReturnIntermediateProcedureBytes = 0, eQMIUIMAPDUResponseStatus_ReturnFinalResultAndStatusWords = 1, }; // Enum to describe QMI UIM Application States enum eQMIUIMApplicationStates:UINT8 { eQMIUIMApplicationStates_Unknown = 0, eQMIUIMApplicationStates_Detected = 1, eQMIUIMApplicationStates_PIN1OrUPINIsRequired = 2, eQMIUIMApplicationStates_PUK1OrPUKForUPINIsRequired = 3, eQMIUIMApplicationStates_PersonalizationStateMustBeChecked = 4, eQMIUIMApplicationStates_PIN1IsBlocked = 5, eQMIUIMApplicationStates_Illegal = 6, eQMIUIMApplicationStates_Ready = 7, }; // Enum to describe QMI UIM Application Types enum eQMIUIMApplicationTypes:UINT8 { eQMIUIMApplicationTypes_Unknown = 0, eQMIUIMApplicationTypes_SIMCard = 1, eQMIUIMApplicationTypes_USIMApplication = 2, eQMIUIMApplicationTypes_RUIMCard = 3, eQMIUIMApplicationTypes_CSIMApplication = 4, eQMIUIMApplicationTypes_ISIMApplication = 5, }; // Enum to describe QMI UIM Authentication Contexts enum eQMIUIMAuthenticationContexts { eQMIUIMAuthenticationContexts_GSMAlgorithm = 0, eQMIUIMAuthenticationContexts_CAVEAlgorithm = 1, eQMIUIMAuthenticationContexts_GSMSecurity = 2, eQMIUIMAuthenticationContexts_3GSecurity = 3, eQMIUIMAuthenticationContexts_VGCSVBSSecurity = 4, eQMIUIMAuthenticationContexts_GBASecurityBootstrappingMode = 5, eQMIUIMAuthenticationContexts_GBASecurityNAFDerivationMode = 6, eQMIUIMAuthenticationContexts_MBMSSecurityMSKUpdateMode = 7, eQMIUIMAuthenticationContexts_MBMSSecurityMTKGenerationMode = 8, eQMIUIMAuthenticationContexts_MBMSSecurityMSKDeletionMode = 9, eQMIUIMAuthenticationContexts_MBMSSecurityMUKDeletionMode = 10, eQMIUIMAuthenticationContexts_IMSAKASecurity = 11, eQMIUIMAuthenticationContexts_HTTPDigestSecurity = 12, eQMIUIMAuthenticationContexts_ComputeIPCHAP = 13, eQMIUIMAuthenticationContexts_ComputeIPMNHA = 14, eQMIUIMAuthenticationContexts_ComputeIPMIPRRQ = 15, eQMIUIMAuthenticationContexts_ComputeIPMNAAA = 16, eQMIUIMAuthenticationContexts_ComputeIPHRPD = 17, }; // Enum to describe QMI UIM CK/Session Operations enum eQMIUIMCKSessionOperations:UINT8 { eQMIUIMCKSessionOperations_Deactivate = 0, eQMIUIMCKSessionOperations_Activate = 1, }; // Enum to describe QMI UIM Card Error Codes enum eQMIUIMCardErrorCodes:UINT8 { eQMIUIMCardErrorCodes_Unknown = 0, eQMIUIMCardErrorCodes_PowerDown = 1, eQMIUIMCardErrorCodes_PollError = 2, eQMIUIMCardErrorCodes_NoATRReceived = 3, eQMIUIMCardErrorCodes_VoltMismatch = 4, eQMIUIMCardErrorCodes_ParityError = 5, eQMIUIMCardErrorCodes_UnknownPossiblyRemoved = 6, eQMIUIMCardErrorCodes_TechnicalProblems = 7, }; // Enum to describe QMI UIM Card States enum eQMIUIMCardStates:UINT8 { eQMIUIMCardStates_Absent = 0, eQMIUIMCardStates_Present = 1, eQMIUIMCardStates_Error = 2, }; // Enum to describe QMI UIM Connect Operations enum eQMIUIMConnectOperations:UINT8 { eQMIUIMConnectOperations_Disconnect = 0, eQMIUIMConnectOperations_Connect = 1, eQMIUIMConnectOperations_CheckStatus = 2, }; // Enum to describe QMI UIM Disonnect Modes enum eQMIUIMDisonnectModes:UINT8 { eQMIUIMDisonnectModes_ImmediateDisconnect = 0, eQMIUIMDisonnectModes_GracefulShutdown = 1, }; // Enum to describe QMI UIM FDN Status Values enum eQMIUIMFDNStatusValues:UINT8 { eQMIUIMFDNStatusValues_NotAvailable = 0, eQMIUIMFDNStatusValues_AvailableButDisabled = 1, eQMIUIMFDNStatusValues_AvailableAndEnabled = 2, }; // Enum to describe QMI UIM File Control Information enum eQMIUIMFileControlInformation:UINT8 { eQMIUIMFileControlInformation_NoData = 0, eQMIUIMFileControlInformation_FCP = 1, eQMIUIMFileControlInformation_FCI = 2, eQMIUIMFileControlInformation_FCIWithInterfaces = 3, eQMIUIMFileControlInformation_FMD = 4, }; // Enum to describe QMI UIM File Types enum eQMIUIMFileTypes:UINT8 { eQMIUIMFileTypes_Transparent = 0, eQMIUIMFileTypes_Cyclic = 1, eQMIUIMFileTypes_LinearFixed = 2, eQMIUIMFileTypes_DedicatedFile = 3, eQMIUIMFileTypes_MasterFile = 4, }; // Enum to describe QMI UIM Hidden Key Status Values enum eQMIUIMHiddenKeyStatusValues:UINT8 { eQMIUIMHiddenKeyStatusValues_NotSupported = 0, eQMIUIMHiddenKeyStatusValues_EnabledAndNotVerified = 1, eQMIUIMHiddenKeyStatusValues_EnabledAndVerified = 2, eQMIUIMHiddenKeyStatusValues_Disabled = 3, }; // Enum to describe QMI UIM Hot-Swap enum eQMIUIMHotSwap:UINT8 { eQMIUIMHotSwap_HotSwapNotSupported = 0, eQMIUIMHotSwap_HotSwapIsSupportedButStatusOfSwitchNotSupported = 1, eQMIUIMHotSwap_SwitchIndicatesThatCardIsPresent = 2, eQMIUIMHotSwap_SwichIndicatesThatCardIsNotPresent = 3, }; // Enum to describe QMI UIM Key Reference ID enum eQMIUIMKeyReferenceID:UINT8 { eQMIUIMKeyReferenceID_PINApplication1 = 1, eQMIUIMKeyReferenceID_PINApplication2 = 2, eQMIUIMKeyReferenceID_PINApplication3 = 3, eQMIUIMKeyReferenceID_PINApplication4 = 4, eQMIUIMKeyReferenceID_PINApplication5 = 5, eQMIUIMKeyReferenceID_PINApplication6 = 6, eQMIUIMKeyReferenceID_PINApplication7 = 7, eQMIUIMKeyReferenceID_PINApplication8 = 8, }; // Enum to describe QMI UIM PIN IDs enum eQMIUIMPINIDs { eQMIUIMPINIDs_PIN1 = 1, eQMIUIMPINIDs_PIN2 = 2, eQMIUIMPINIDs_UniversalPIN = 3, eQMIUIMPINIDs_HiddenKey = 4, }; // Enum to describe QMI UIM PIN Operations enum eQMIUIMPINOperations { eQMIUIMPINOperations_Disable = 0, eQMIUIMPINOperations_Enable = 1, }; // Enum to describe QMI UIM PIN States enum eQMIUIMPINStates:UINT8 { eQMIUIMPINStates_Unknown = 0, eQMIUIMPINStates_EnabledAndNotVerified = 1, eQMIUIMPINStates_EnabledAndVerified = 2, eQMIUIMPINStates_Disabled = 3, eQMIUIMPINStates_Blocked = 4, eQMIUIMPINStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Personalization Features enum eQMIUIMPersonalizationFeatures:UINT8 { eQMIUIMPersonalizationFeatures_GWNetwork = 0, eQMIUIMPersonalizationFeatures_GWNetworkSubset = 1, eQMIUIMPersonalizationFeatures_GWServiceProvider = 2, eQMIUIMPersonalizationFeatures_GWCorporate = 3, eQMIUIMPersonalizationFeatures_GWUIM = 4, eQMIUIMPersonalizationFeatures_1XNetworkType1 = 5, eQMIUIMPersonalizationFeatures_1XNetworkType2 = 6, eQMIUIMPersonalizationFeatures_1XHRPD = 7, eQMIUIMPersonalizationFeatures_1XServiceProvider = 8, eQMIUIMPersonalizationFeatures_1XCorporate = 9, eQMIUIMPersonalizationFeatures_1XRUIM = 10, eQMIUIMPersonalizationFeatures_Unknown = 11, }; // Enum to describe QMI UIM Personalization States enum eQMIUIMPersonalizationStates:UINT8 { eQMIUIMPersonalizationStates_Unknown = 0, eQMIUIMPersonalizationStates_PersonalizationOperationIsInProgress = 1, eQMIUIMPersonalizationStates_Ready = 2, eQMIUIMPersonalizationStates_PersonalizationCodeIsRequired = 3, eQMIUIMPersonalizationStates_PUKForPersonalizationCodeIsRequired = 4, eQMIUIMPersonalizationStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Refresh Modes enum eQMIUIMRefreshModes:UINT8 { eQMIUIMRefreshModes_Reset = 0, eQMIUIMRefreshModes_Init = 1, eQMIUIMRefreshModes_InitAndFCN = 2, eQMIUIMRefreshModes_FCN = 3, eQMIUIMRefreshModes_InitAndFullFCN = 4, eQMIUIMRefreshModes_ApplicationReset = 5, eQMIUIMRefreshModes_3GSessionReset = 6, }; // Enum to describe QMI UIM Refresh Stages enum eQMIUIMRefreshStages:UINT8 { eQMIUIMRefreshStages_WaitingForOK = 0, eQMIUIMRefreshStages_Start = 1, eQMIUIMRefreshStages_EndWithSuccess = 2, eQMIUIMRefreshStages_EndWithFailure = 3, }; // Enum to describe QMI UIM Register Flags enum eQMIUIMRegisterFlags { eQMIUIMRegisterFlags_Deregister = 0, eQMIUIMRegisterFlags_Register = 1, }; // Enum to describe QMI UIM SAP Requests enum eQMIUIMSAPRequests:UINT8 { eQMIUIMSAPRequests_RetrieveATR = 0, eQMIUIMSAPRequests_SendAPDU = 1, eQMIUIMSAPRequests_PowerOffSIM = 2, eQMIUIMSAPRequests_PowerOnSIM = 3, eQMIUIMSAPRequests_ResetSIM = 4, eQMIUIMSAPRequests_RetrieveCardReaderStatus = 5, }; // Enum to describe QMI UIM SAP States enum eQMIUIMSAPStates:UINT8 { eQMIUIMSAPStates_NotEnabled = 0, eQMIUIMSAPStates_Connecting = 1, eQMIUIMSAPStates_ConnectedSuccessfully = 2, eQMIUIMSAPStates_ConnectionError = 3, eQMIUIMSAPStates_Disconnecting = 4, eQMIUIMSAPStates_DisconnectedSuccessfully = 5, }; // Enum to describe QMI UIM Security Attributes enum eQMIUIMSecurityAttributes:UINT8 { eQMIUIMSecurityAttributes_Always = 0, eQMIUIMSecurityAttributes_Never = 1, eQMIUIMSecurityAttributes_ANDCondition = 2, eQMIUIMSecurityAttributes_ORCondition = 3, eQMIUIMSecurityAttributes_SingleCondition = 4, }; // Enum to describe QMI UIM Session Types enum eQMIUIMSessionTypes:UINT8 { eQMIUIMSessionTypes_PrimaryGWProvisioning = 0, eQMIUIMSessionTypes_Primary1XProvisioning = 1, eQMIUIMSessionTypes_SecondaryGWProvisioning = 2, eQMIUIMSessionTypes_Secondary1XProvisioning = 3, eQMIUIMSessionTypes_NonprovisioningOnSlot1 = 4, eQMIUIMSessionTypes_NonprovisioningOnSlot2 = 5, eQMIUIMSessionTypes_CardOnSlot1 = 6, eQMIUIMSessionTypes_CardOnSlot2 = 7, eQMIUIMSessionTypes_LogicalChannelOnSlot1 = 8, eQMIUIMSessionTypes_LogicalChannelOnSlot2 = 9, }; // Enum to describe QMI UIM Slots enum eQMIUIMSlots:UINT8 { eQMIUIMSlots_Slot1 = 1, eQMIUIMSlots_Slot2 = 2, }; // Enum to describe QMI Voice ALS Line Indicators enum eQMIVoiceALSLineIndicators:UINT8 { eQMIVoiceALSLineIndicators_Line1 = 0, eQMIVoiceALSLineIndicators_Line2 = 1, }; // Enum to describe QMI Voice ALS Lines enum eQMIVoiceALSLines:UINT8 { eQMIVoiceALSLines_Line1 = 0, eQMIVoiceALSLines_Line2 = 1, }; // Enum to describe QMI Voice Alerting Patterns enum eQMIVoiceAlertingPatterns:UINT32 { eQMIVoiceAlertingPatterns_Pattern1 = 0, eQMIVoiceAlertingPatterns_Pattern2 = 1, eQMIVoiceAlertingPatterns_Pattern3 = 2, eQMIVoiceAlertingPatterns_Pattern4 = 3, eQMIVoiceAlertingPatterns_Pattern5 = 4, eQMIVoiceAlertingPatterns_Pattern6 = 5, eQMIVoiceAlertingPatterns_Pattern7 = 6, eQMIVoiceAlertingPatterns_Pattern8 = 7, eQMIVoiceAlertingPatterns_Pattern9 = 8, }; // Enum to describe QMI Voice Alerting Types enum eQMIVoiceAlertingTypes:UINT8 { eQMIVoiceAlertingTypes_Local = 0, eQMIVoiceAlertingTypes_Remote = 1, }; // Enum to describe QMI Voice CLIR Causes enum eQMIVoiceCLIRCauses:UINT8 { eQMIVoiceCLIRCauses_None = 0, eQMIVoiceCLIRCauses_RejectedByUser = 1, eQMIVoiceCLIRCauses_InteractionWithOtherServices = 2, eQMIVoiceCLIRCauses_CoinLine = 3, eQMIVoiceCLIRCauses_ServiceUnavailable = 4, eQMIVoiceCLIRCauses_Reserved = 5, }; // Enum to describe QMI Voice CLIR Types enum eQMIVoiceCLIRTypes:UINT8 { eQMIVoiceCLIRTypes_Supression = 1, eQMIVoiceCLIRTypes_Invocation = 2, }; // Enum to describe QMI Voice Call Control Result Types enum eQMIVoiceCallControlResultTypes:UINT8 { eQMIVoiceCallControlResultTypes_Voice = 0, eQMIVoiceCallControlResultTypes_SupplementaryService = 1, eQMIVoiceCallControlResultTypes_USSD = 2, }; // Enum to describe QMI Voice Call Directions enum eQMIVoiceCallDirections:UINT8 { eQMIVoiceCallDirections_MobileOriginated = 1, eQMIVoiceCallDirections_MobileTerminated = 2, }; // Enum to describe QMI Voice Call Modes enum eQMIVoiceCallModes:UINT8 { eQMIVoiceCallModes_NoService = 0, eQMIVoiceCallModes_CDMA = 1, eQMIVoiceCallModes_GSM = 2, eQMIVoiceCallModes_UMTS = 3, eQMIVoiceCallModes_LTE = 4, eQMIVoiceCallModes_TDSCDMA = 5, eQMIVoiceCallModes_Unknown = 6, }; // Enum to describe QMI Voice Call States enum eQMIVoiceCallStates:UINT8 { eQMIVoiceCallStates_Origination = 1, eQMIVoiceCallStates_Incoming = 2, eQMIVoiceCallStates_Conversation = 3, eQMIVoiceCallStates_InProgress = 4, eQMIVoiceCallStates_Alerting = 5, eQMIVoiceCallStates_Hold = 6, eQMIVoiceCallStates_Waiting = 7, eQMIVoiceCallStates_Disconnecting = 8, eQMIVoiceCallStates_End = 9, eQMIVoiceCallStates_Setup = 10, }; // Enum to describe QMI Voice Call Types enum eQMIVoiceCallTypes:UINT8 { eQMIVoiceCallTypes_VoiceAutomaticSelection = 0, eQMIVoiceCallTypes_Forced = 1, eQMIVoiceCallTypes_VoiceOverIP = 2, eQMIVoiceCallTypes_VideoOverIP = 3, eQMIVoiceCallTypes_TestCall = 5, eQMIVoiceCallTypes_OTAPA = 6, eQMIVoiceCallTypes_StandardOTASP = 7, eQMIVoiceCallTypes_NonStandardOTASP = 8, eQMIVoiceCallTypes_Emergency = 9, eQMIVoiceCallTypes_SupplementaryService = 10, }; // Enum to describe QMI Voice DTMF Events enum eQMIVoiceDTMFEvents:UINT8 { eQMIVoiceDTMFEvents_SendDTMFBurst = 0, eQMIVoiceDTMFEvents_StartSendingContinuousDTMFTone = 1, eQMIVoiceDTMFEvents_StopSendingContinuousDTMFTone = 3, eQMIVoiceDTMFEvents_ReceiveDTMFBurst = 4, eQMIVoiceDTMFEvents_StartReceivingContinuousDTMFTone = 6, eQMIVoiceDTMFEvents_StopReceivingContinuousDTMFTone = 7, }; // Enum to describe QMI Voice DTMF Privacy Levels enum eQMIVoiceDTMFPrivacyLevels:UINT8 { eQMIVoiceDTMFPrivacyLevels_Standard = 0, eQMIVoiceDTMFPrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Domains enum eQMIVoiceDomains:UINT8 { eQMIVoiceDomains_CSOnly = 0, eQMIVoiceDomains_PSOnly = 1, eQMIVoiceDomains_CSThenPS = 2, eQMIVoiceDomains_PSThenCS = 3, }; // Enum to describe QMI Voice ECT Call States enum eQMIVoiceECTCallStates:UINT8 { eQMIVoiceECTCallStates_None = 0, eQMIVoiceECTCallStates_Alerting = 1, eQMIVoiceECTCallStates_Active = 2, }; // Enum to describe QMI Voice End Reasons enum eQMIVoiceEndReasons:UINT16 { eQMIVoiceEndReasons_Offline = 0, eQMIVoiceEndReasons_CDMALocked = 20, eQMIVoiceEndReasons_NoService = 21, eQMIVoiceEndReasons_Fade = 22, eQMIVoiceEndReasons_Intercept = 23, eQMIVoiceEndReasons_Reorder = 24, eQMIVoiceEndReasons_NormalRelease = 25, eQMIVoiceEndReasons_SORejectRelease = 26, eQMIVoiceEndReasons_IncomingCall = 27, eQMIVoiceEndReasons_AlertStop = 28, eQMIVoiceEndReasons_ClientEnd = 29, eQMIVoiceEndReasons_Activation = 30, eQMIVoiceEndReasons_MCAbort = 31, eQMIVoiceEndReasons_MaxAccessProbes = 32, eQMIVoiceEndReasons_PersistentTestFailure = 33, eQMIVoiceEndReasons_RUIMNotPresent = 34, eQMIVoiceEndReasons_InProgressAccessAttempt = 35, eQMIVoiceEndReasons_AccessFailure = 36, eQMIVoiceEndReasons_RetryOrderReceived = 37, eQMIVoiceEndReasons_ConcurrentServiceNotSupported = 38, eQMIVoiceEndReasons_NoBaseStationResponse = 39, eQMIVoiceEndReasons_BaseStationReject = 40, eQMIVoiceEndReasons_IncompatibleConcurrentServices = 41, eQMIVoiceEndReasons_AccessBlocked = 42, eQMIVoiceEndReasons_AlreadyinTC = 43, eQMIVoiceEndReasons_EmergencyFlashed = 44, eQMIVoiceEndReasons_GPSCallEnding = 45, eQMIVoiceEndReasons_SMSCallEnding = 46, eQMIVoiceEndReasons_DataCallEnding = 47, eQMIVoiceEndReasons_RedirectionOrHandoff = 48, eQMIVoiceEndReasons_AllAccessBlocked = 49, eQMIVoiceEndReasons_OTASPSPCError = 50, eQMIVoiceEndReasons_MaxIS707BAccessProbes = 51, eQMIVoiceEndReasons_IncomingCallRejected = 102, eQMIVoiceEndReasons_SetupIndicationRejected = 103, eQMIVoiceEndReasons_NetworkEndedCall = 104, eQMIVoiceEndReasons_NoFunds = 105, eQMIVoiceEndReasons_NoGWSErvice = 106, eQMIVoiceEndReasons_NoCDMAService = 107, eQMIVoiceEndReasons_NoFullService = 108, eQMIVoiceEndReasons_MaxPSCalls = 109, eQMIVoiceEndReasons_SUPSUknownSubscriber = 110, eQMIVoiceEndReasons_SUPSIllegalSubscriber = 111, eQMIVoiceEndReasons_SUPSBearerServiceNotProvisioned = 112, eQMIVoiceEndReasons_SUPSTeleserviceNotProvisioned = 113, eQMIVoiceEndReasons_SUPSIllegalEquipment = 114, eQMIVoiceEndReasons_SUPSCallBarred = 115, eQMIVoiceEndReasons_SUPSIllegalSSOperation = 116, eQMIVoiceEndReasons_SUPSSSErrorStatus = 117, eQMIVoiceEndReasons_SUPSSSNotAvailable = 118, eQMIVoiceEndReasons_SUPSSSSubscriptionViolation = 119, eQMIVoiceEndReasons_SUPSSSIncompatibility = 120, eQMIVoiceEndReasons_SUPSFacilityNotSupported = 121, eQMIVoiceEndReasons_SUPSAbscentSubscriber = 122, eQMIVoiceEndReasons_SUPSShortTermDenial = 123, eQMIVoiceEndReasons_SUPSLongTermDenial = 124, eQMIVoiceEndReasons_SUPSSystemFailure = 125, eQMIVoiceEndReasons_SUPSDataMissing = 126, eQMIVoiceEndReasons_SUPSUnexpectedDataValue = 127, eQMIVoiceEndReasons_SUPSPasswordRegistrationFailure = 128, eQMIVoiceEndReasons_SUPSNegativePasswordCheck = 129, eQMIVoiceEndReasons_SUPSPasswordAttemptsViolation = 130, eQMIVoiceEndReasons_SUPSPositionMethodFailure = 131, eQMIVoiceEndReasons_SUPSUnknownAlphabet = 132, eQMIVoiceEndReasons_SUPSUSSDBusy = 133, eQMIVoiceEndReasons_SUPSRejectedByUser = 134, eQMIVoiceEndReasons_SUPSRejectedByNetwork = 135, eQMIVoiceEndReasons_SUPSDelectiontoServedSubscriber = 136, eQMIVoiceEndReasons_SUPSSpecialServiceCode = 137, eQMIVoiceEndReasons_SUPSInvalidDeflectedToNumber = 138, eQMIVoiceEndReasons_SUPSMultipartyParticipantsExceeded = 139, eQMIVoiceEndReasons_SUPSResourcesNotAvailable = 140, eQMIVoiceEndReasons_CCUnassignedNumber = 141, eQMIVoiceEndReasons_CCNoRouteToDestination = 142, eQMIVoiceEndReasons_CCChannelUnacceptable = 143, eQMIVoiceEndReasons_CCOperatorDeterminedBarring = 144, eQMIVoiceEndReasons_CCNormalCallClearing = 145, eQMIVoiceEndReasons_CCUserBusy = 146, eQMIVoiceEndReasons_CCNoUserResponding = 147, eQMIVoiceEndReasons_CCUserAlertingNoAnsewer = 148, eQMIVoiceEndReasons_CCCallRejected = 149, eQMIVoiceEndReasons_CCNumberChanged = 150, eQMIVoiceEndReasons_CCPreemption = 151, eQMIVoiceEndReasons_CCDestinationOutOfOrder = 152, eQMIVoiceEndReasons_CCInvalidNumber = 153, eQMIVoiceEndReasons_CCFacilityRejected = 154, eQMIVoiceEndReasons_CCResponseToStatusEnquiry = 155, eQMIVoiceEndReasons_CCNormalUnspecified = 156, eQMIVoiceEndReasons_CCNoCircuitOrChannelAvailable = 157, eQMIVoiceEndReasons_CCNetworkOutOfOrder = 158, eQMIVoiceEndReasons_CCTemporaryFailure = 159, eQMIVoiceEndReasons_CCSwitchingEquipmentCongestion = 160, eQMIVoiceEndReasons_CCAccessInformationDiscarded = 161, eQMIVoiceEndReasons_CCRequestedCircuitOrChannelNotAvailable = 162, eQMIVoiceEndReasons_CCResourcesUnavailable = 163, eQMIVoiceEndReasons_CCQOSUnavailable = 164, eQMIVoiceEndReasons_CCRequestedFacilityNotSubscribed = 165, eQMIVoiceEndReasons_CCIncomingCallsBarredWithinCUG = 166, eQMIVoiceEndReasons_CCBearerCapabilityNotAuthorized = 167, eQMIVoiceEndReasons_CCBearerCapabilityUnavailable = 168, eQMIVoiceEndReasons_CCServiceOptionNotAvailable = 169, eQMIVoiceEndReasons_CCACMLimitExceeded = 170, eQMIVoiceEndReasons_CCBearerServiceNotImplemented = 171, eQMIVoiceEndReasons_CCRequestedFacilityNotAvailable = 172, eQMIVoiceEndReasons_CCOnlyDigitalInformationBearerAvailable = 173, eQMIVoiceEndReasons_CCServiceOrOptionNotImplemented = 174, eQMIVoiceEndReasons_CCInvalidTransactionIdentifier = 175, eQMIVoiceEndReasons_CCUserNotMemberOfCUG = 176, eQMIVoiceEndReasons_CCIncompatibleDestination = 177, eQMIVoiceEndReasons_CCInvalidTransitNWSelection = 178, eQMIVoiceEndReasons_CCSemanticallyIncorrectMessage = 179, eQMIVoiceEndReasons_CCInvalidMandatoryInformation = 180, eQMIVoiceEndReasons_CCMessageTypeNotImplemented = 181, eQMIVoiceEndReasons_CCMessageTypeNotCompatible = 182, eQMIVoiceEndReasons_CCInformationElementNonexistent = 183, eQMIVoiceEndReasons_CCConditionalInformationElementError = 184, eQMIVoiceEndReasons_CCMessageNotCompatible = 185, eQMIVoiceEndReasons_CCRecoveryOnTimerExpired = 186, eQMIVoiceEndReasons_CCProtocolErrorUnspecified = 187, eQMIVoiceEndReasons_CCInternetworkingUnspecified = 188, eQMIVoiceEndReasons_CCOutgoingCallsBarredWithinCUG = 189, eQMIVoiceEndReasons_CCNoCUGSelection = 190, eQMIVoiceEndReasons_CCUnknownCUGIndex = 191, eQMIVoiceEndReasons_CCIncompatibleCUGIndex = 192, eQMIVoiceEndReasons_CCCUGCallFailureunspecified = 193, eQMIVoiceEndReasons_CCCLIRNotSubscribed = 194, eQMIVoiceEndReasons_CCCCBSPossible = 195, eQMIVoiceEndReasons_CCCCBSNotPossible = 196, eQMIVoiceEndReasons_MMGMMIMSIUnknwonInHLR = 197, eQMIVoiceEndReasons_MMGMMIllegalMS = 198, eQMIVoiceEndReasons_MMGMMIMSIUnknownInVLR = 199, eQMIVoiceEndReasons_MMGMMIMEINotAccepted = 200, eQMIVoiceEndReasons_MMGMMIllegalME = 201, eQMIVoiceEndReasons_MMGMMPLMNNotAllowed = 202, eQMIVoiceEndReasons_MMGMMLocationAreaNotAllowed = 203, eQMIVoiceEndReasons_MMGMMRoamingNotAllowedInThisLocationArea = 204, eQMIVoiceEndReasons_MMGMMNoSuitableCellsInLocationArea = 205, eQMIVoiceEndReasons_MMGMMNetworkFailure = 206, eQMIVoiceEndReasons_MMGMMMACFailure = 207, eQMIVoiceEndReasons_MMGMMSynchFailure = 208, eQMIVoiceEndReasons_MMGMMNetworkCongestion = 209, eQMIVoiceEndReasons_MMGMMGSMAuthenticationUnacceptable = 210, eQMIVoiceEndReasons_MMGMMServiceNotSubscribed = 211, eQMIVoiceEndReasons_MMGMMServiceTemporarilyOutOfOrder = 212, eQMIVoiceEndReasons_MMGMMCallCannotBeIdentified = 213, eQMIVoiceEndReasons_MMGMMIncorrectSemanticsInMessage = 214, eQMIVoiceEndReasons_MMGMMMadatoryInformationInvalid = 215, eQMIVoiceEndReasons_MMGMMAccessStratumFailure = 216, eQMIVoiceEndReasons_MMGMMInvalidSIM = 217, eQMIVoiceEndReasons_MMGMMWrongState = 218, eQMIVoiceEndReasons_MMGMMAcessClassBloacked = 219, eQMIVoiceEndReasons_MMGMMNoResources = 220, eQMIVoiceEndReasons_MMGMMInvalidUserData = 221, eQMIVoiceEndReasons_MMRejectTimerT3230Expired = 222, eQMIVoiceEndReasons_MMRejectNoCellAvailable = 223, eQMIVoiceEndReasons_MMRejectAbortMessageReceived = 224, eQMIVoiceEndReasons_MMRejectRadioLinkLost = 225, eQMIVoiceEndReasons_CNMRejectTimerT303Expired = 226, eQMIVoiceEndReasons_CNMRejectCNMMMReleaseIsPending = 227, eQMIVoiceEndReasons_AccessStratumRRReleaseIndication = 228, eQMIVoiceEndReasons_AccessStratumRandomAccessFailure = 229, eQMIVoiceEndReasons_AccessStratumRRCReleaseIndication = 230, eQMIVoiceEndReasons_AccessStratumCloseSessionIndication = 231, eQMIVoiceEndReasons_AccessStratumOpenSessionFailure = 232, eQMIVoiceEndReasons_AccessStratumLowLevelFailure = 233, eQMIVoiceEndReasons_AccessStratumRedialNotAllowed = 234, eQMIVoiceEndReasons_AccessStratumImmediateRetry = 235, eQMIVoiceEndReasons_AccessStratumAbortRadioUnavailable = 236, eQMIVoiceEndReasons_OTARejectSONotSupported = 237, eQMIVoiceEndReasons_IPBadRequestWaitingForInvite = 300, eQMIVoiceEndReasons_IPBadRequestWaitingForReinvite = 301, eQMIVoiceEndReasons_IPCalledPartyDoesNotExist = 302, eQMIVoiceEndReasons_IPUnsupportedMediaType = 303, eQMIVoiceEndReasons_IPTemporarilyUnavailable = 304, eQMIVoiceEndReasons_IPNoNetworkReponseTimeout = 305, eQMIVoiceEndReasons_IPUnableToPutCallOnHold = 306, eQMIVoiceEndReasons_IPMovedToEHRPD = 307, eQMIVoiceEndReasons_IPUpgradeOrDowngradeRejected = 308, eQMIVoiceEndReasons_IPCallForbidden = 309, eQMIVoiceEndReasons_IPGenericTimeout = 310, eQMIVoiceEndReasons_IPUpgradeOrDowngradeFailed = 311, eQMIVoiceEndReasons_IPUpgradeOrDowngradeCancelled = 312, eQMIVoiceEndReasons_IPSSACBarring = 313, }; // Enum to describe QMI Voice Even Odd Indicators enum eQMIVoiceEvenOddIndicators:UINT8 { eQMIVoiceEvenOddIndicators_EvenNumber = 0, eQMIVoiceEvenOddIndicators_OddNumber = 1, }; // Enum to describe QMI Voice Extended Service Class enum eQMIVoiceExtendedServiceClass { eQMIVoiceExtendedServiceClass_Voice = 1, eQMIVoiceExtendedServiceClass_Data = 2, eQMIVoiceExtendedServiceClass_Fax = 4, eQMIVoiceExtendedServiceClass_AllTeleservicesExceptSMS = 5, eQMIVoiceExtendedServiceClass_SMS = 8, eQMIVoiceExtendedServiceClass_AllTeleservicesData = 12, eQMIVoiceExtendedServiceClass_AllTeleservices = 13, eQMIVoiceExtendedServiceClass_SynchronousData = 16, eQMIVoiceExtendedServiceClass_AllPositionDeterminationServiceData = 17, eQMIVoiceExtendedServiceClass_AsynchronousData = 32, eQMIVoiceExtendedServiceClass_AllSynchronousAsynchronousData = 48, eQMIVoiceExtendedServiceClass_PacketData = 64, eQMIVoiceExtendedServiceClass_AllSynchronousData = 80, eQMIVoiceExtendedServiceClass_PacketAssemblerDisassemblerData = 128, eQMIVoiceExtendedServiceClass_AllAsynchronousData = 160, eQMIVoiceExtendedServiceClass_PLMNSpecificAllTeleservices = 53248, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices1 = 53504, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices2 = 53760, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices3 = 54016, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices4 = 54272, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices5 = 54528, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices6 = 54784, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices7 = 55040, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices8 = 55296, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices9 = 55552, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices10 = 55808, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices11 = 56064, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices12 = 56320, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices13 = 56576, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices14 = 56832, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices15 = 57088, }; // Enum to describe QMI Voice Flash Types enum eQMIVoiceFlashTypes:UINT8 { eQMIVoiceFlashTypes_Simple = 0, eQMIVoiceFlashTypes_ActivateAnswerHold = 1, eQMIVoiceFlashTypes_DeactivateAnswerHold = 2, }; // Enum to describe QMI Voice Handover States enum eQMIVoiceHandoverStates:UINT32 { eQMIVoiceHandoverStates_Start = 1, eQMIVoiceHandoverStates_Fail = 2, eQMIVoiceHandoverStates_Complete = 3, }; // Enum to describe QMI Voice Interdigit Intervals enum eQMIVoiceInterdigitIntervals:UINT8 { eQMIVoiceInterdigitIntervals_60ms = 0, eQMIVoiceInterdigitIntervals_100ms = 1, eQMIVoiceInterdigitIntervals_150ms = 2, eQMIVoiceInterdigitIntervals_200ms = 3, }; // Enum to describe QMI Voice NSS Releases enum eQMIVoiceNSSReleases:UINT8 { eQMIVoiceNSSReleases_Finished = 1, }; // Enum to describe QMI Voice Network Mode enum eQMIVoiceNetworkMode:UINT32 { eQMIVoiceNetworkMode_None = 0, eQMIVoiceNetworkMode_GSM = 1, eQMIVoiceNetworkMode_WCDMA = 2, eQMIVoiceNetworkMode_CDMA = 3, eQMIVoiceNetworkMode_LTE = 4, eQMIVoiceNetworkMode_TDSCDMA = 5, }; // Enum to describe QMI Voice Number Plans enum eQMIVoiceNumberPlans:UINT8 { eQMIVoiceNumberPlans_Unknown = 0, eQMIVoiceNumberPlans_ISDN = 1, eQMIVoiceNumberPlans_Data = 3, eQMIVoiceNumberPlans_Telex = 4, eQMIVoiceNumberPlans_National = 8, eQMIVoiceNumberPlans_Private = 9, eQMIVoiceNumberPlans_ReservedCTS = 11, eQMIVoiceNumberPlans_ReservedExtension = 15, }; // Enum to describe QMI Voice Number Types enum eQMIVoiceNumberTypes:UINT8 { eQMIVoiceNumberTypes_Unknown = 0, eQMIVoiceNumberTypes_International = 1, eQMIVoiceNumberTypes_National = 2, eQMIVoiceNumberTypes_NetworkSpecific = 3, eQMIVoiceNumberTypes_Subscriber = 4, eQMIVoiceNumberTypes_Reserved = 5, eQMIVoiceNumberTypes_Abbreviated = 6, eQMIVoiceNumberTypes_ReservedExtension = 7, }; // Enum to describe QMI Voice OTASP Stati enum eQMIVoiceOTASPStati:UINT8 { eQMIVoiceOTASPStati_Unlocked = 0, eQMIVoiceOTASPStati_RetriesExceeded = 1, eQMIVoiceOTASPStati_AKeyExchanged = 2, eQMIVoiceOTASPStati_SSDUpdated = 3, eQMIVoiceOTASPStati_NAMDownloaded = 4, eQMIVoiceOTASPStati_MDNDownloaded = 5, eQMIVoiceOTASPStati_IMSIDownloaded = 6, eQMIVoiceOTASPStati_PRLDownloaded = 7, eQMIVoiceOTASPStati_Committed = 8, eQMIVoiceOTASPStati_OTAPAStarted = 9, eQMIVoiceOTASPStati_OTAPAStopped = 10, eQMIVoiceOTASPStati_OTAPAAborted = 11, eQMIVoiceOTASPStati_OTAPACommitted = 12, }; // Enum to describe QMI Voice Presentation Indicators enum eQMIVoicePresentationIndicators:UINT8 { eQMIVoicePresentationIndicators_Allowed = 0, eQMIVoicePresentationIndicators_Restricted = 1, eQMIVoicePresentationIndicators_Unavailable = 2, eQMIVoicePresentationIndicators_NameRestricted = 3, eQMIVoicePresentationIndicators_PayPhone = 4, }; // Enum to describe QMI Voice Privacy Levels enum eQMIVoicePrivacyLevels:UINT8 { eQMIVoicePrivacyLevels_Standard = 0, eQMIVoicePrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Provisioning States enum eQMIVoiceProvisioningStates:UINT8 { eQMIVoiceProvisioningStates_NotProvisioned = 0, eQMIVoiceProvisioningStates_ProvisionedPermanent = 1, eQMIVoiceProvisioningStates_PresentationRestricted = 2, eQMIVoiceProvisioningStates_PresentationAllowed = 3, }; // Enum to describe QMI Voice Pulse Widths enum eQMIVoicePulseWidths:UINT8 { eQMIVoicePulseWidths_95ms = 0, eQMIVoicePulseWidths_150ms = 1, eQMIVoicePulseWidths_200ms = 2, eQMIVoicePulseWidths_250ms = 3, eQMIVoicePulseWidths_300ms = 4, eQMIVoicePulseWidths_350ms = 5, eQMIVoicePulseWidths_SMSTXSpecial = 6, }; // Enum to describe QMI Voice Screening Indicators enum eQMIVoiceScreeningIndicators:UINT8 { eQMIVoiceScreeningIndicators_UserNotScreened = 0, eQMIVoiceScreeningIndicators_UserPassedVerification = 1, eQMIVoiceScreeningIndicators_UserFailedVerification = 2, eQMIVoiceScreeningIndicators_ProvidedNetwork = 3, }; // Enum to describe QMI Voice Service Options enum eQMIVoiceServiceOptions:UINT16 { eQMIVoiceServiceOptions_Any = 0, eQMIVoiceServiceOptions_IS96A = 1, eQMIVoiceServiceOptions_EVRC = 3, eQMIVoiceServiceOptions_IS73313K = 17, eQMIVoiceServiceOptions_SelectableModeVocoder = 56, eQMIVoiceServiceOptions_4GVNarrowBand = 68, eQMIVoiceServiceOptions_4GVWideBand = 70, eQMIVoiceServiceOptions_13K = 32768, eQMIVoiceServiceOptions_IS96 = 32769, eQMIVoiceServiceOptions_WVRC = 32803, }; // Enum to describe QMI Voice Service Types enum eQMIVoiceServiceTypes:UINT32 { eQMIVoiceServiceTypes_Automatic = 1, eQMIVoiceServiceTypes_GSM = 2, eQMIVoiceServiceTypes_WCDMA = 3, eQMIVoiceServiceTypes_CDMAAutomatic = 4, eQMIVoiceServiceTypes_GSMOrWCDMA = 5, eQMIVoiceServiceTypes_LTE = 6, }; // Enum to describe QMI Voice Speech Codec Type enum eQMIVoiceSpeechCodecType:UINT32 { eQMIVoiceSpeechCodecType_None = 0, eQMIVoiceSpeechCodecType_QCELP13K = 1, eQMIVoiceSpeechCodecType_EVRC = 2, eQMIVoiceSpeechCodecType_EVRCB = 3, eQMIVoiceSpeechCodecType_EVRCWideband = 4, eQMIVoiceSpeechCodecType_EVRCNarrowbandWideband = 5, eQMIVoiceSpeechCodecType_AMRNarrowband = 6, eQMIVoiceSpeechCodecType_AMRWideband = 7, eQMIVoiceSpeechCodecType_GSMEnhancedFullRate = 8, eQMIVoiceSpeechCodecType_GSMFullRate = 9, eQMIVoiceSpeechCodecType_GSMHalfRate = 10, }; // Enum to describe QMI Voice Subaddress Types enum eQMIVoiceSubaddressTypes:UINT8 { eQMIVoiceSubaddressTypes_NSAP = 0, eQMIVoiceSubaddressTypes_User = 1, }; // Enum to describe QMI Voice Subscription Types enum eQMIVoiceSubscriptionTypes:UINT8 { eQMIVoiceSubscriptionTypes_Primary = 0, eQMIVoiceSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI Voice Supplementary Notification Types enum eQMIVoiceSupplementaryNotificationTypes:UINT8 { eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsForwarded = 1, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsWaiting = 2, eQMIVoiceSupplementaryNotificationTypes_OutgoingCUGCall = 3, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallsBarred = 4, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsDeflected = 5, eQMIVoiceSupplementaryNotificationTypes_IncomingCUGCall = 6, eQMIVoiceSupplementaryNotificationTypes_IncomingCallsBarred = 7, eQMIVoiceSupplementaryNotificationTypes_IncomingForwardedCall = 8, eQMIVoiceSupplementaryNotificationTypes_IncomingDeflectedCall = 9, eQMIVoiceSupplementaryNotificationTypes_IncomingCallIsForwarded = 10, eQMIVoiceSupplementaryNotificationTypes_UnconditionalCallForwardingActive = 11, eQMIVoiceSupplementaryNotificationTypes_ConditionalCallForwardingActive = 12, eQMIVoiceSupplementaryNotificationTypes_CLIRSuppressionRejected = 13, eQMIVoiceSupplementaryNotificationTypes_CallIsOnHold = 14, eQMIVoiceSupplementaryNotificationTypes_CallIsRetrieved = 15, eQMIVoiceSupplementaryNotificationTypes_CallIsInConference = 16, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsAlerting = 17, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsActive = 18, }; // Enum to describe QMI Voice Supplementary Service Call Types enum eQMIVoiceSupplementaryServiceCallTypes:UINT8 { eQMIVoiceSupplementaryServiceCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceSupplementaryServiceCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceSupplementaryServiceCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceSupplementaryServiceCallTypes_HoldAllExceptSpecifiedCall = 4, eQMIVoiceSupplementaryServiceCallTypes_MakeConferenceCall = 5, eQMIVoiceSupplementaryServiceCallTypes_ExplicitCallTransfer = 6, eQMIVoiceSupplementaryServiceCallTypes_CCBSActivation = 7, eQMIVoiceSupplementaryServiceCallTypes_EndAllCalls = 8, eQMIVoiceSupplementaryServiceCallTypes_ReleaseSpecifiedCall = 9, }; // Enum to describe QMI Voice Supplementary Service Reasons enum eQMIVoiceSupplementaryServiceReasons:UINT8 { eQMIVoiceSupplementaryServiceReasons_ForwardUnconditional = 1, eQMIVoiceSupplementaryServiceReasons_ForwardMobileBusy = 2, eQMIVoiceSupplementaryServiceReasons_ForwardNoReply = 3, eQMIVoiceSupplementaryServiceReasons_ForwardUnreachable = 4, eQMIVoiceSupplementaryServiceReasons_ForwardAllForwarding = 5, eQMIVoiceSupplementaryServiceReasons_ForwardAllConditional = 6, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoing = 7, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingInt = 8, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingIntExtToHome = 9, eQMIVoiceSupplementaryServiceReasons_BarrAllIncoming = 10, eQMIVoiceSupplementaryServiceReasons_BarrIncomingRoaming = 11, eQMIVoiceSupplementaryServiceReasons_BarrAllBarring = 12, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoingBarring = 13, eQMIVoiceSupplementaryServiceReasons_BarrAllIncomingBarring = 14, eQMIVoiceSupplementaryServiceReasons_CallWaiting = 15, eQMIVoiceSupplementaryServiceReasons_CLIR = 16, eQMIVoiceSupplementaryServiceReasons_CLIP = 17, }; // Enum to describe QMI Voice Supplementary Service Requests enum eQMIVoiceSupplementaryServiceRequests:UINT8 { eQMIVoiceSupplementaryServiceRequests_Activate = 1, eQMIVoiceSupplementaryServiceRequests_Deactivate = 2, eQMIVoiceSupplementaryServiceRequests_Register = 3, eQMIVoiceSupplementaryServiceRequests_Erase = 4, eQMIVoiceSupplementaryServiceRequests_Interrogate = 5, eQMIVoiceSupplementaryServiceRequests_RegisterPassword = 6, eQMIVoiceSupplementaryServiceRequests_USSD = 7, }; // Enum to describe QMI Voice Supplementary Service Types enum eQMIVoiceSupplementaryServiceTypes:UINT8 { eQMIVoiceSupplementaryServiceTypes_Activate = 0, eQMIVoiceSupplementaryServiceTypes_Deactivate = 1, eQMIVoiceSupplementaryServiceTypes_Register = 2, eQMIVoiceSupplementaryServiceTypes_Erase = 3, }; // Enum to describe QMI Voice Switch Value enum eQMIVoiceSwitchValue:UINT8 { eQMIVoiceSwitchValue_NotAllowed = 0, eQMIVoiceSwitchValue_Allowed = 1, }; // Enum to describe QMI Voice TTY Modes enum eQMIVoiceTTYModes:UINT8 { eQMIVoiceTTYModes_Full = 0, eQMIVoiceTTYModes_VoiceCarryOver = 1, eQMIVoiceTTYModes_HearingCarryOver = 2, eQMIVoiceTTYModes_Off = 3, }; // Enum to describe QMI Voice USSD Alpha Coding Schemes enum eQMIVoiceUSSDAlphaCodingSchemes:UINT8 { eQMIVoiceUSSDAlphaCodingSchemes_GSM = 1, eQMIVoiceUSSDAlphaCodingSchemes_UCS2 = 2, }; // Enum to describe QMI Voice USSD Data Coding Schemes enum eQMIVoiceUSSDDataCodingSchemes:UINT8 { eQMIVoiceUSSDDataCodingSchemes_ASCII = 1, eQMIVoiceUSSDDataCodingSchemes_8Bit = 2, eQMIVoiceUSSDDataCodingSchemes_UCS2 = 3, }; // Enum to describe QMI Voice USSD Notifcation Types enum eQMIVoiceUSSDNotifcationTypes:UINT8 { eQMIVoiceUSSDNotifcationTypes_NoActionRequired = 1, eQMIVoiceUSSDNotifcationTypes_ActionIsRequired = 2, }; // Enum to describe QMI Voice UUS Data Coding Schemes enum eQMIVoiceUUSDataCodingSchemes:UINT8 { eQMIVoiceUUSDataCodingSchemes_USP = 1, eQMIVoiceUUSDataCodingSchemes_OHLP = 2, eQMIVoiceUUSDataCodingSchemes_X244 = 3, eQMIVoiceUUSDataCodingSchemes_SMCF = 4, eQMIVoiceUUSDataCodingSchemes_IA5 = 5, eQMIVoiceUUSDataCodingSchemes_RV12RD = 6, eQMIVoiceUUSDataCodingSchemes_Q931UNCCM = 7, }; // Enum to describe QMI Voice UUS Types enum eQMIVoiceUUSTypes:UINT8 { eQMIVoiceUUSTypes_Data = 0, eQMIVoiceUUSTypes_Type1Implicit = 1, eQMIVoiceUUSTypes_Type1Required = 2, eQMIVoiceUUSTypes_Type1NotRequired = 3, eQMIVoiceUUSTypes_Type2Required = 4, eQMIVoiceUUSTypes_Type2NotRequired = 5, eQMIVoiceUUSTypes_Type3Required = 6, eQMIVoiceUUSTypes_Type3NotRequired = 7, }; // Enum to describe QMI Voice VoIP SUPS Call Types enum eQMIVoiceVoIPSUPSCallTypes:UINT8 { eQMIVoiceVoIPSUPSCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceVoIPSUPSCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceVoIPSUPSCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceVoIPSUPSCallTypes_MakeConferenceCall = 4, eQMIVoiceVoIPSUPSCallTypes_EndAllExistingCalls = 5, eQMIVoiceVoIPSUPSCallTypes_UpgradeDowngradeExistingVTIP = 6, eQMIVoiceVoIPSUPSCallTypes_AcceptCallUpgradeExistingIP = 7, eQMIVoiceVoIPSUPSCallTypes_RejectCallUpgradeExistingIP = 8, eQMIVoiceVoIPSUPSCallTypes_ReleasePartyFromConference = 9, }; // Enum to describe QMI WDS 3GPP Call End Reasons enum eQMIWDS3GPPCallEndReasons:UINT16 { eQMIWDS3GPPCallEndReasons_OperatorDeterminedBarring = 8, eQMIWDS3GPPCallEndReasons_LLCSNDCPFailure = 25, eQMIWDS3GPPCallEndReasons_InsufficientResources = 26, eQMIWDS3GPPCallEndReasons_UnknownAPN = 27, eQMIWDS3GPPCallEndReasons_UnknownPDP = 28, eQMIWDS3GPPCallEndReasons_AuthenticationFailed = 29, eQMIWDS3GPPCallEndReasons_GGSNReject = 30, eQMIWDS3GPPCallEndReasons_ActivationReject = 31, eQMIWDS3GPPCallEndReasons_OptionNotSupported = 32, eQMIWDS3GPPCallEndReasons_OptionUnsubscribed = 33, eQMIWDS3GPPCallEndReasons_OptionTemporarilyOOO = 34, eQMIWDS3GPPCallEndReasons_NSAPIAlreadyUsed = 35, eQMIWDS3GPPCallEndReasons_RegularDeactivation = 36, eQMIWDS3GPPCallEndReasons_QoSNotAccepted = 37, eQMIWDS3GPPCallEndReasons_NetworkFailure = 38, eQMIWDS3GPPCallEndReasons_UMTSReactivationRequest = 39, eQMIWDS3GPPCallEndReasons_FeatureNotSupported = 40, eQMIWDS3GPPCallEndReasons_TFTSemanticError = 41, eQMIWDS3GPPCallEndReasons_TFTSyntaxError = 42, eQMIWDS3GPPCallEndReasons_UnknownPDPContext = 43, eQMIWDS3GPPCallEndReasons_FilterSemanticError = 44, eQMIWDS3GPPCallEndReasons_FilterSyntaxError = 45, eQMIWDS3GPPCallEndReasons_PDPWithoutActiveTFT = 46, eQMIWDS3GPPCallEndReasons_IPv4OnlyAllowed = 50, eQMIWDS3GPPCallEndReasons_IPv6OnlyAllowed = 51, eQMIWDS3GPPCallEndReasons_SingleAddressBearerOnly = 52, eQMIWDS3GPPCallEndReasons_ESMInfoNotReceived = 53, eQMIWDS3GPPCallEndReasons_NoPDNConnection = 54, eQMIWDS3GPPCallEndReasons_MultipleConnectionsNotAllowed = 55, eQMIWDS3GPPCallEndReasons_InvalidTransactionID = 81, eQMIWDS3GPPCallEndReasons_MessageIncorrectSemantic = 95, eQMIWDS3GPPCallEndReasons_InvalidMandatoryID = 96, eQMIWDS3GPPCallEndReasons_MessageTypeUnsupported = 97, eQMIWDS3GPPCallEndReasons_MessageTypeNoncompatibleState = 98, eQMIWDS3GPPCallEndReasons_UnknownInfoElement = 99, eQMIWDS3GPPCallEndReasons_ConditionalInfoElementError = 100, eQMIWDS3GPPCallEndReasons_MessageAndProtocolStateUncompatible = 101, eQMIWDS3GPPCallEndReasons_ProtocolError = 111, eQMIWDS3GPPCallEndReasons_APNTypeConflict = 112, }; // Enum to describe QMI WDS 3GPP2 RAT Types enum eQMIWDS3GPP2RATTypes:UINT8 { eQMIWDS3GPP2RATTypes_HRPD = 1, eQMIWDS3GPP2RATTypes_EHRPD = 2, eQMIWDS3GPP2RATTypes_HRPDEHRPD = 3, }; // Enum to describe QMI WDS Address Allocation Preference enum eQMIWDSAddressAllocationPreference:UINT8 { eQMIWDSAddressAllocationPreference_NASSignaling = 0, eQMIWDSAddressAllocationPreference_DHCP = 1, }; // Enum to describe QMI WDS Application Type enum eQMIWDSApplicationType:UINT32 { eQMIWDSApplicationType_DefaultApplicationType = 0, eQMIWDSApplicationType_LBSApplicationType = 32, eQMIWDSApplicationType_TetheredApplicationType = 64, }; // Enum to describe QMI WDS Authentication Protocol enum eQMIWDSAuthenticationProtocol:UINT8 { eQMIWDSAuthenticationProtocol_PAP = 1, eQMIWDSAuthenticationProtocol_CHAP = 2, eQMIWDSAuthenticationProtocol_PAPOrCHAP = 3, }; // Enum to describe QMI WDS Autoconnect Roam Settings enum eQMIWDSAutoconnectRoamSettings:UINT8 { eQMIWDSAutoconnectRoamSettings_Always = 0, eQMIWDSAutoconnectRoamSettings_HomeOnly = 1, }; // Enum to describe QMI WDS Autoconnect Settings enum eQMIWDSAutoconnectSettings:UINT8 { eQMIWDSAutoconnectSettings_Disabled = 0, eQMIWDSAutoconnectSettings_Enabled = 1, eQMIWDSAutoconnectSettings_Paused = 2, }; // Enum to describe QMI WDS CDMA Networks enum eQMIWDSCDMANetworks:UINT8 { eQMIWDSCDMANetworks_NoService = 0, eQMIWDSCDMANetworks_CDMA = 2, eQMIWDSCDMANetworks_CDMA1xEVDO = 4, }; // Enum to describe QMI WDS CDMA Service Options enum eQMIWDSCDMAServiceOptions:UINT16 { eQMIWDSCDMAServiceOptions_IS657 = 7, eQMIWDSCDMAServiceOptions_IS657OverRateSet2 = 15, eQMIWDSCDMAServiceOptions_IS707AWithRateSet1 = 22, eQMIWDSCDMAServiceOptions_IS707AWithRateSet2 = 25, eQMIWDSCDMAServiceOptions_CDMA2000PacketService = 33, eQMIWDSCDMAServiceOptions_IS707 = 4103, eQMIWDSCDMAServiceOptions_QCProprietaryRateSet2 = 32800, eQMIWDSCDMAServiceOptions_NullServiceOption = 65535, }; // Enum to describe QMI WDS Call End Reason Types enum eQMIWDSCallEndReasonTypes:UINT16 { eQMIWDSCallEndReasonTypes_Unspecified = 0, eQMIWDSCallEndReasonTypes_MobileIP = 1, eQMIWDSCallEndReasonTypes_Internal = 2, eQMIWDSCallEndReasonTypes_CallManagerDefined = 3, eQMIWDSCallEndReasonTypes_3GPPSpecificationDefined = 6, eQMIWDSCallEndReasonTypes_PPP = 7, eQMIWDSCallEndReasonTypes_EHRPD = 8, eQMIWDSCallEndReasonTypes_IPv6 = 9, }; // Enum to describe QMI WDS Call Manager Call End Reasons enum eQMIWDSCallManagerCallEndReasons:UINT16 { eQMIWDSCallManagerCallEndReasons_CDMALock = 500, eQMIWDSCallManagerCallEndReasons_Intercept = 501, eQMIWDSCallManagerCallEndReasons_Reorder = 502, eQMIWDSCallManagerCallEndReasons_ReleaseServiceOptionReject = 503, eQMIWDSCallManagerCallEndReasons_IncomingCall = 504, eQMIWDSCallManagerCallEndReasons_AlertStop = 505, eQMIWDSCallManagerCallEndReasons_Activation = 506, eQMIWDSCallManagerCallEndReasons_MaxAccessProbe = 507, eQMIWDSCallManagerCallEndReasons_CCSNotSupportedByBS = 508, eQMIWDSCallManagerCallEndReasons_NoResponseFromBS = 509, eQMIWDSCallManagerCallEndReasons_RejectedByBS = 510, eQMIWDSCallManagerCallEndReasons_Incompatible = 511, eQMIWDSCallManagerCallEndReasons_AlreadyInTC = 512, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringGPS = 513, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringSMS = 514, eQMIWDSCallManagerCallEndReasons_NoCDMAService = 515, eQMIWDSCallManagerCallEndReasons_RetryOrder = 519, eQMIWDSCallManagerCallEndReasons_AccessBlock = 520, eQMIWDSCallManagerCallEndReasons_AccessBlockAll = 521, eQMIWDSCallManagerCallEndReasons_IS707BMaxAccess = 522, eQMIWDSCallManagerCallEndReasons_ThermalEmergency = 523, eQMIWDSCallManagerCallEndReasons_CallOriginationThrottled = 524, eQMIWDSCallManagerCallEndReasons_ConfFailed = 1000, eQMIWDSCallManagerCallEndReasons_IncomingRejected = 1001, eQMIWDSCallManagerCallEndReasons_NoGWService = 1002, eQMIWDSCallManagerCallEndReasons_NoGPRSContext = 1003, eQMIWDSCallManagerCallEndReasons_IllegalMS = 1004, eQMIWDSCallManagerCallEndReasons_IllegalME = 1005, eQMIWDSCallManagerCallEndReasons_GPRSServicesAndNonGPRSServiceNotAllowed = 1006, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowed = 1007, eQMIWDSCallManagerCallEndReasons_MSIdentityCannotBeDerivedByTheNetwork = 1008, eQMIWDSCallManagerCallEndReasons_ImplicitlyDetached = 1009, eQMIWDSCallManagerCallEndReasons_PLMNNotAllowed = 1010, eQMIWDSCallManagerCallEndReasons_LANotAllowed = 1011, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowedInThisPLMN = 1012, eQMIWDSCallManagerCallEndReasons_PDPDuplicate = 1013, eQMIWDSCallManagerCallEndReasons_UERATChange = 1014, eQMIWDSCallManagerCallEndReasons_Congestion = 1015, eQMIWDSCallManagerCallEndReasons_NoPDPContextActivated = 1016, eQMIWDSCallManagerCallEndReasons_AccessClassDSACRejection = 1017, eQMIWDSCallManagerCallEndReasons_CDGenOrBusy = 1500, eQMIWDSCallManagerCallEndReasons_CDBillOrAuth = 1501, eQMIWDSCallManagerCallEndReasons_ChangeHDR = 1502, eQMIWDSCallManagerCallEndReasons_ExitHDR = 1503, eQMIWDSCallManagerCallEndReasons_HDRNoSession = 1504, eQMIWDSCallManagerCallEndReasons_HDROrigDuringGPSFix = 1505, eQMIWDSCallManagerCallEndReasons_HDRCSTimeout = 1506, eQMIWDSCallManagerCallEndReasons_HDRReleasedByCM = 1507, eQMIWDSCallManagerCallEndReasons_NoHybridHDRService = 1510, eQMIWDSCallManagerCallEndReasons_ClientEnd = 2000, eQMIWDSCallManagerCallEndReasons_NoService = 2001, eQMIWDSCallManagerCallEndReasons_Fade = 2002, eQMIWDSCallManagerCallEndReasons_NormalRelease = 2003, eQMIWDSCallManagerCallEndReasons_AccessInProgress = 2004, eQMIWDSCallManagerCallEndReasons_AccessFail = 2005, eQMIWDSCallManagerCallEndReasons_RedirectOrHandoff = 2006, eQMIWDSCallManagerCallEndReasons_Offline = 2500, eQMIWDSCallManagerCallEndReasons_EmergencyMode = 2501, eQMIWDSCallManagerCallEndReasons_PhoneInUse = 2502, eQMIWDSCallManagerCallEndReasons_InvalidMode = 2503, eQMIWDSCallManagerCallEndReasons_InvalidSIMState = 2504, eQMIWDSCallManagerCallEndReasons_NoCollocHDR = 2505, eQMIWDSCallManagerCallEndReasons_CallControlRejected = 2506, }; // Enum to describe QMI WDS Call Types enum eQMIWDSCallTypes:UINT8 { eQMIWDSCallTypes_Laptop = 0, eQMIWDSCallTypes_Embedded = 1, }; // Enum to describe QMI WDS DUN Control Events enum eQMIWDSDUNControlEvents:UINT8 { eQMIWDSDUNControlEvents_DUNCall = 1, eQMIWDSDUNControlEvents_Entitlement = 2, eQMIWDSDUNControlEvents_SilentRedial = 3, }; // Enum to describe QMI WDS DUN Control Preferences enum eQMIWDSDUNControlPreferences:UINT8 { eQMIWDSDUNControlPreferences_RelinquishDUNControl = 0, eQMIWDSDUNControlPreferences_ExerciseDUNConrol = 1, }; // Enum to describe QMI WDS Data Call Status enum eQMIWDSDataCallStatus:UINT8 { eQMIWDSDataCallStatus_Unknown = 0, eQMIWDSDataCallStatus_Activated = 1, eQMIWDSDataCallStatus_Terminated = 2, }; // Enum to describe QMI WDS Data Call Types enum eQMIWDSDataCallTypes:UINT8 { eQMIWDSDataCallTypes_Unknown = 0, eQMIWDSDataCallTypes_Embedded = 1, eQMIWDSDataCallTypes_Tethered = 2, eQMIWDSDataCallTypes_ModemEmbedded = 3, }; // Enum to describe QMI WDS Data Mode enum eQMIWDSDataMode:UINT8 { eQMIWDSDataMode_CDMAOrHDR = 0, eQMIWDSDataMode_CDMAOnly = 1, eQMIWDSDataMode_HDROnly = 2, }; // Enum to describe QMI WDS Data Rate enum eQMIWDSDataRate:UINT8 { eQMIWDSDataRate_LowSO15Only = 0, eQMIWDSDataRate_MediumSO33PlusLowRSCH = 1, eQMIWDSDataRate_HighSO33PlusHighRSCH = 2, }; // Enum to describe QMI WDS Data System Network Types enum eQMIWDSDataSystemNetworkTypes:UINT8 { eQMIWDSDataSystemNetworkTypes_3GPP = 0, eQMIWDSDataSystemNetworkTypes_3GPP2 = 1, }; // Enum to describe QMI WDS Data Systems enum eQMIWDSDataSystems:UINT32 { eQMIWDSDataSystems_Unknown = 0, eQMIWDSDataSystems_CDMA1x = 1, eQMIWDSDataSystems_CDMA1xEVDO = 2, eQMIWDSDataSystems_GPRS = 3, eQMIWDSDataSystems_WCDMA = 4, eQMIWDSDataSystems_LTE = 5, eQMIWDSDataSystems_TDSCDMA = 6, }; // Enum to describe QMI WDS EHRPD Call End Reason enum eQMIWDSEHRPDCallEndReason:UINT16 { eQMIWDSEHRPDCallEndReason_SubsLimitedToV4 = 1, eQMIWDSEHRPDCallEndReason_SubsLimitedToV6 = 2, eQMIWDSEHRPDCallEndReason_VSNCPTimeout = 4, eQMIWDSEHRPDCallEndReason_VSNCPFailure = 5, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IGeneralError = 6, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IUnauthAPN = 7, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNLimit = 8, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2INoPDNGW = 9, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWUnreach = 10, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWRejected = 11, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IInsufficientParam = 12, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IResourceUnavailable = 13, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IAdminProhibited = 14, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNIDInUse = 15, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2ISubscriberLimitation = 16, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNExistsForAPN = 17, }; // Enum to describe QMI WDS EMBMS Error Codes enum eQMIWDSEMBMSErrorCodes:UINT16 { eQMIWDSEMBMSErrorCodes_NotSupported = 108, eQMIWDSEMBMSErrorCodes_ActivationInProgress = 111, eQMIWDSEMBMSErrorCodes_Invalid = 124, eQMIWDSEMBMSErrorCodes_DeactivationInProgress = 203, }; // Enum to describe QMI WDS EMBMS List Types enum eQMIWDSEMBMSListTypes:UINT8 { eQMIWDSEMBMSListTypes_Active = 0, eQMIWDSEMBMSListTypes_Available = 1, eQMIWDSEMBMSListTypes_OOSWarning = 2, }; // Enum to describe QMI WDS EMBMS Operation Status enum eQMIWDSEMBMSOperationStatus:UINT32 { eQMIWDSEMBMSOperationStatus_Success = 0, eQMIWDSEMBMSOperationStatus_RadioConfigFailure = 65536, eQMIWDSEMBMSOperationStatus_ChannelUnavailable = 65537, eQMIWDSEMBMSOperationStatus_EMBMBSNotEnabled = 65538, eQMIWDSEMBMSOperationStatus_OutOfCoverage = 65539, }; // Enum to describe QMI WDS Extended Error Code enum eQMIWDSExtendedErrorCode:UINT16 { eQMIWDSExtendedErrorCode_Failure = 1, eQMIWDSExtendedErrorCode_InvalidHandle = 2, eQMIWDSExtendedErrorCode_InvalidOperation = 3, eQMIWDSExtendedErrorCode_InvalidProfileType = 4, eQMIWDSExtendedErrorCode_InvalidProfileNumber = 5, eQMIWDSExtendedErrorCode_InvalidIdentifier = 6, eQMIWDSExtendedErrorCode_InvalidArgument = 7, eQMIWDSExtendedErrorCode_NotInitialized = 8, eQMIWDSExtendedErrorCode_InvalidLength = 9, eQMIWDSExtendedErrorCode_ListEnd = 10, eQMIWDSExtendedErrorCode_InvalidSubscriptionID = 11, eQMIWDSExtendedErrorCode_InvalidProfileFamily = 12, eQMIWDSExtendedErrorCode_3GPPInvalidProfileFamily = 4097, eQMIWDSExtendedErrorCode_3GPPAccessError = 4098, eQMIWDSExtendedErrorCode_3GPPContextNotDefined = 4099, eQMIWDSExtendedErrorCode_3GPPValidFlagNotSet = 4100, eQMIWDSExtendedErrorCode_3GPPReadOnlyFlagSet = 4101, eQMIWDSExtendedErrorCode_3GPPErrorMaxProfileNumber = 4102, eQMIWDSExtendedErrorCode_3GPP2ErrorInvalidIdentifierForProfile = 4353, eQMIWDSExtendedErrorCode_3GPP2ErrorProfileLimitReached = 4354, }; // Enum to describe QMI WDS Extended Tech Prefs enum eQMIWDSExtendedTechPrefs:UINT16 { eQMIWDSExtendedTechPrefs_CDMA = 32769, eQMIWDSExtendedTechPrefs_UMTS = 32772, eQMIWDSExtendedTechPrefs_EPC = 34944, eQMIWDSExtendedTechPrefs_EMBMS = 34946, eQMIWDSExtendedTechPrefs_ModemLinkLocal = 34952, }; // Enum to describe QMI WDS IP Families enum eQMIWDSIPFamilies:UINT8 { eQMIWDSIPFamilies_IPv4 = 4, eQMIWDSIPFamilies_IPv6 = 6, eQMIWDSIPFamilies_Unspecified = 8, }; // Enum to describe QMI WDS IP Version enum eQMIWDSIPVersion:UINT8 { eQMIWDSIPVersion_IPv4 = 4, eQMIWDSIPVersion_IPv6 = 6, }; // Enum to describe QMI WDS IPv6 Call End Reason enum eQMIWDSIPv6CallEndReason:UINT16 { eQMIWDSIPv6CallEndReason_PrefixUnavailable = 1, eQMIWDSIPv6CallEndReason_IPv6HRPDDisabled = 2, }; // Enum to describe QMI WDS Internal Call End Reasons enum eQMIWDSInternalCallEndReasons:UINT16 { eQMIWDSInternalCallEndReasons_Internal = 201, eQMIWDSInternalCallEndReasons_CallEnded = 202, eQMIWDSInternalCallEndReasons_InternalUnknownCauseCode = 203, eQMIWDSInternalCallEndReasons_UnknownCauseCode = 204, eQMIWDSInternalCallEndReasons_CloseInProgress = 205, eQMIWDSInternalCallEndReasons_NWInitiatedTermination = 206, eQMIWDSInternalCallEndReasons_AppPreempted = 207, eQMIWDSInternalCallEndReasons_PDNIPv4CallDisallowed = 208, eQMIWDSInternalCallEndReasons_PDNIPv4CallThrottled = 209, eQMIWDSInternalCallEndReasons_PDNIPv6CallDisallowed = 210, eQMIWDSInternalCallEndReasons_ModemRestart = 212, eQMIWDSInternalCallEndReasons_PDPPPPNotSupported = 213, eQMIWDSInternalCallEndReasons_UnpreferredRAT = 214, eQMIWDSInternalCallEndReasons_PhysicalLinkCloseInProgress = 215, eQMIWDSInternalCallEndReasons_APNPendingHandover = 216, eQMIWDSInternalCallEndReasons_ProfileBearerIncompatible = 217, eQMIWDSInternalCallEndReasons_MMGDSICardEvent = 218, eQMIWDSInternalCallEndReasons_LPMOrPowerDown = 219, eQMIWDSInternalCallEndReasons_APNDisabled = 220, eQMIWDSInternalCallEndReasons_MPITExpired = 221, eQMIWDSInternalCallEndReasons_IPv6AddressTransferFailed = 222, eQMIWDSInternalCallEndReasons_TRATSwapFailed = 223, }; // Enum to describe QMI WDS LTE IP Types enum eQMIWDSLTEIPTypes:UINT8 { eQMIWDSLTEIPTypes_IPv4 = 0, eQMIWDSLTEIPTypes_IPv6 = 1, eQMIWDSLTEIPTypes_IPv4OrIPv6 = 2, }; // Enum to describe QMI WDS Mobile IP Call End Reasons enum eQMIWDSMobileIPCallEndReasons:UINT16 { eQMIWDSMobileIPCallEndReasons_FAUnspecified = 64, eQMIWDSMobileIPCallEndReasons_FAAdministrativelyProhibited = 65, eQMIWDSMobileIPCallEndReasons_FAInsufficientResources = 66, eQMIWDSMobileIPCallEndReasons_FAMobileNodeAuthenticationFailure = 67, eQMIWDSMobileIPCallEndReasons_FAHAAuthenticationFailure = 68, eQMIWDSMobileIPCallEndReasons_FARequestedLifetimeTooLong = 69, eQMIWDSMobileIPCallEndReasons_FAMalformedRequest = 70, eQMIWDSMobileIPCallEndReasons_FAMalformedReply = 71, eQMIWDSMobileIPCallEndReasons_FAEncapsulationUnavailable = 72, eQMIWDSMobileIPCallEndReasons_FAVJHCUnavailable = 73, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelUnavailable = 74, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelIsMandatoryAndTBitIsNotSet = 75, eQMIWDSMobileIPCallEndReasons_FADeliveryStyleNotSupported = 79, eQMIWDSMobileIPCallEndReasons_FAMissingNAI = 97, eQMIWDSMobileIPCallEndReasons_FAMissingHA = 98, eQMIWDSMobileIPCallEndReasons_FAMissingHomeAddress = 99, eQMIWDSMobileIPCallEndReasons_FAUnknownChallenge = 104, eQMIWDSMobileIPCallEndReasons_FAMissingChallenge = 105, eQMIWDSMobileIPCallEndReasons_FAStaleChallenge = 106, eQMIWDSMobileIPCallEndReasons_HAReasonUnspecified = 128, eQMIWDSMobileIPCallEndReasons_HAAdministrativelyProhibited = 129, eQMIWDSMobileIPCallEndReasons_HAInsufficientResources = 130, eQMIWDSMobileIPCallEndReasons_HAMobileNodeAuthenticationFailure = 131, eQMIWDSMobileIPCallEndReasons_HAFAAuthenticationFailure = 132, eQMIWDSMobileIPCallEndReasons_HARegistrationIDMismatch = 133, eQMIWDSMobileIPCallEndReasons_HAMalformedRequest = 134, eQMIWDSMobileIPCallEndReasons_HAUnknownHAAddress = 136, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelUnavailable = 137, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelIsMandatoryAndTBitIsNotSet = 138, eQMIWDSMobileIPCallEndReasons_HAEncapsulationUnavailable = 139, eQMIWDSMobileIPCallEndReasons_Unknown = 65535, }; // Enum to describe QMI WDS Network Types enum eQMIWDSNetworkTypes:UINT8 { eQMIWDSNetworkTypes_Unknown = 0, eQMIWDSNetworkTypes_CDMA = 1, eQMIWDSNetworkTypes_UMTS = 2, }; // Enum to describe QMI WDS OOS Warning Reasons enum eQMIWDSOOSWarningReasons:UINT32 { eQMIWDSOOSWarningReasons_UnicastOOS = 0, eQMIWDSOOSWarningReasons_MulticastOOS = 1, eQMIWDSOOSWarningReasons_Cleared = 2, }; // Enum to describe QMI WDS PDN Type enum eQMIWDSPDNType:UINT8 { eQMIWDSPDNType_IPv4PDNType = 0, eQMIWDSPDNType_IPv6PDNType = 1, eQMIWDSPDNType_IPv4orIPv6PDNType = 2, eQMIWDSPDNType_UnspecifiedPDNType = 3, }; // Enum to describe QMI WDS PDP Access Control Flag enum eQMIWDSPDPAccessControlFlag:UINT8 { eQMIWDSPDPAccessControlFlag_PDPAccessControlNone = 0, eQMIWDSPDPAccessControlFlag_PDPAccessControlReject = 1, eQMIWDSPDPAccessControlFlag_PDPAccessControlPermission = 2, }; // Enum to describe QMI WDS PDP Data Compression Type enum eQMIWDSPDPDataCompressionType:UINT8 { eQMIWDSPDPDataCompressionType_Off = 0, eQMIWDSPDPDataCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPDataCompressionType_V42BIS = 2, eQMIWDSPDPDataCompressionType_V44 = 3, }; // Enum to describe QMI WDS PDP Header Compression Type enum eQMIWDSPDPHeaderCompressionType:UINT8 { eQMIWDSPDPHeaderCompressionType_Off = 0, eQMIWDSPDPHeaderCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPHeaderCompressionType_RFC1144 = 2, eQMIWDSPDPHeaderCompressionType_RFC2507 = 3, eQMIWDSPDPHeaderCompressionType_RFC3095 = 4, }; // Enum to describe QMI WDS PPP Call End Reason enum eQMIWDSPPPCallEndReason:UINT16 { eQMIWDSPPPCallEndReason_Timeout = 1, eQMIWDSPPPCallEndReason_AuthenticationFailed = 2, eQMIWDSPPPCallEndReason_OptionMismatch = 3, eQMIWDSPPPCallEndReason_PAPFailure = 31, eQMIWDSPPPCallEndReason_CHAPFailure = 32, eQMIWDSPPPCallEndReason_Unknown = 65535, }; // Enum to describe QMI WDS Profile Family enum eQMIWDSProfileFamily:UINT8 { eQMIWDSProfileFamily_Embedded = 0, eQMIWDSProfileFamily_TetheredSocketsFamily = 1, }; // Enum to describe QMI WDS Profile Param ID enum eQMIWDSProfileParamID:UINT32 { eQMIWDSProfileParamID_UMTSRequestedQoS = 23, eQMIWDSProfileParamID_UMTSMinimumQoS = 24, eQMIWDSProfileParamID_GPRSRequestedQoS = 25, eQMIWDSProfileParamID_GPRSMinimumQoS = 26, eQMIWDSProfileParamID_TFTFilterID1 = 50, eQMIWDSProfileParamID_TFTFilterID2 = 51, }; // Enum to describe QMI WDS QoS Class Identifier enum eQMIWDSQoSClassIdentifier:UINT8 { eQMIWDSQoSClassIdentifier_NetworkAssignQCI = 0, eQMIWDSQoSClassIdentifier_GuaranteedBitrate1 = 1, eQMIWDSQoSClassIdentifier_GuaranteedBitrate2 = 2, eQMIWDSQoSClassIdentifier_GuaranteedBitrate3 = 3, eQMIWDSQoSClassIdentifier_GuaranteedBitrate4 = 4, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate5 = 5, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate6 = 6, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate7 = 7, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate8 = 8, }; // Enum to describe QMI WDS SIP/MIP Call Types enum eQMIWDSSIPMIPCallTypes:UINT8 { eQMIWDSSIPMIPCallTypes_NotUp = 0, eQMIWDSSIPMIPCallTypes_SIPUp = 1, eQMIWDSSIPMIPCallTypes_MIPUp = 2, }; // Enum to describe QMI WDS Slot Cycle Set Results enum eQMIWDSSlotCycleSetResults:UINT8 { eQMIWDSSlotCycleSetResults_Succcess = 0, eQMIWDSSlotCycleSetResults_FailureRequestRejected = 1, eQMIWDSSlotCycleSetResults_FailureRequestFailedTX = 2, eQMIWDSSlotCycleSetResults_FailureNotSupported = 3, eQMIWDSSlotCycleSetResults_FailureNoNetwork = 4, }; // Enum to describe QMI WDS Tethered Call Types enum eQMIWDSTetheredCallTypes:UINT8 { eQMIWDSTetheredCallTypes_NonTethered = 0, eQMIWDSTetheredCallTypes_RmNet = 1, eQMIWDSTetheredCallTypes_DUN = 2, }; // Enum to describe QMI WMS ACK Failure Cause enum eQMIWMSACKFailureCause:UINT8 { eQMIWMSACKFailureCause_NoNetworkResponse = 0, eQMIWMSACKFailureCause_NetworkReleasedLink = 1, eQMIWMSACKFailureCause_NotSent = 2, }; // Enum to describe QMI WMS CDMA Service Options enum eQMIWMSCDMAServiceOptions:UINT8 { eQMIWMSCDMAServiceOptions_Automatic = 0, eQMIWMSCDMAServiceOptions_SO6 = 6, eQMIWMSCDMAServiceOptions_SO14 = 14, }; // Enum to describe QMI WMS Cause Codes enum eQMIWMSCauseCodes { eQMIWMSCauseCodes_AddressVacant = 0, eQMIWMSCauseCodes_AddressTranslation = 1, eQMIWMSCauseCodes_NetworkResourceShortage = 2, eQMIWMSCauseCodes_NetworkFailure = 3, eQMIWMSCauseCodes_InvalidTeleserviceID = 4, eQMIWMSCauseCodes_NetworkOther = 5, eQMIWMSCauseCodes_NoPageResponse = 32, eQMIWMSCauseCodes_DestinationBusy = 33, eQMIWMSCauseCodes_DestinationNoACK = 34, eQMIWMSCauseCodes_DestinationResourceShortage = 35, eQMIWMSCauseCodes_DeliveryPostponed = 36, eQMIWMSCauseCodes_DestinationOutOfService = 37, eQMIWMSCauseCodes_DestinationNotAtAddress = 38, eQMIWMSCauseCodes_DestinationOther = 39, eQMIWMSCauseCodes_RadioResourceShortage = 64, eQMIWMSCauseCodes_RadioIncompatibility = 65, eQMIWMSCauseCodes_RadioOther = 66, eQMIWMSCauseCodes_Encoding = 96, eQMIWMSCauseCodes_SMSOriginationDenied = 97, eQMIWMSCauseCodes_SMSDestinationDenied = 98, eQMIWMSCauseCodes_SupplementarySErviceNotSupported = 99, eQMIWMSCauseCodes_SMSNotSupported = 100, eQMIWMSCauseCodes_MissingExpectedParameter = 101, eQMIWMSCauseCodes_MissingMandatoryParameter = 102, eQMIWMSCauseCodes_UnrecognizedParameterValue = 103, eQMIWMSCauseCodes_UnexpectedParameterValue = 104, eQMIWMSCauseCodes_UserDataSizeError = 105, eQMIWMSCauseCodes_GeneralOther = 106, }; // Enum to describe QMI WMS Delivery Failures enum eQMIWMSDeliveryFailures:UINT8 { eQMIWMSDeliveryFailures_BlockedByCallControl = 0, }; // Enum to describe QMI WMS Error Classes enum eQMIWMSErrorClasses:UINT8 { eQMIWMSErrorClasses_Temporary = 0, eQMIWMSErrorClasses_Permanent = 1, }; // Enum to describe QMI WMS Error Classes 2 enum eQMIWMSErrorClasses2:UINT8 { eQMIWMSErrorClasses2_Temporary = 2, eQMIWMSErrorClasses2_Permanent = 3, }; // Enum to describe QMI WMS GSM/WCDMA Domains enum eQMIWMSGSMWCDMADomains:UINT8 { eQMIWMSGSMWCDMADomains_CSPreferred = 0, eQMIWMSGSMWCDMADomains_PSPreferred = 1, eQMIWMSGSMWCDMADomains_CSOnly = 2, eQMIWMSGSMWCDMADomains_PSOnly = 3, }; // Enum to describe QMI WMS LTE Domains enum eQMIWMSLTEDomains:UINT8 { eQMIWMSLTEDomains_None = 0, eQMIWMSLTEDomains_IMS = 1, }; // Enum to describe QMI WMS Language enum eQMIWMSLanguage:UINT16 { eQMIWMSLanguage_Unknown = 0, eQMIWMSLanguage_English = 1, eQMIWMSLanguage_French = 2, eQMIWMSLanguage_Spanish = 3, eQMIWMSLanguage_Japanese = 4, eQMIWMSLanguage_Korean = 5, eQMIWMSLanguage_Chinese = 6, eQMIWMSLanguage_Hebrew = 7, }; // Enum to describe QMI WMS Message Classes enum eQMIWMSMessageClasses:UINT8 { eQMIWMSMessageClasses_Class0 = 0, eQMIWMSMessageClasses_Class1 = 1, eQMIWMSMessageClasses_Class2 = 2, eQMIWMSMessageClasses_Class3 = 3, eQMIWMSMessageClasses_ClassNone = 4, eQMIWMSMessageClasses_ClassCDMA = 5, }; // Enum to describe QMI WMS Message Delivery Failure Type enum eQMIWMSMessageDeliveryFailureType:UINT8 { eQMIWMSMessageDeliveryFailureType_Temporary = 0, eQMIWMSMessageDeliveryFailureType_Permanent = 1, }; // Enum to describe QMI WMS Message Formats enum eQMIWMSMessageFormats:UINT8 { eQMIWMSMessageFormats_CDMA = 0, eQMIWMSMessageFormats_AnalogCLIUnsupported = 1, eQMIWMSMessageFormats_AnalogVoiceMailUnsupported = 2, eQMIWMSMessageFormats_AnalogWMSUnsupported = 3, eQMIWMSMessageFormats_AnalogAWIWMSUnsupported = 4, eQMIWMSMessageFormats_MWIUnsupported = 5, eQMIWMSMessageFormats_GSMWCDMAPP = 6, eQMIWMSMessageFormats_GSMWCDMABC = 7, eQMIWMSMessageFormats_MWI = 8, }; // Enum to describe QMI WMS Message Protocols enum eQMIWMSMessageProtocols:UINT8 { eQMIWMSMessageProtocols_CDMA = 0, eQMIWMSMessageProtocols_GSMWCDMAUnsupported = 1, }; // Enum to describe QMI WMS Message Tags enum eQMIWMSMessageTags:UINT8 { eQMIWMSMessageTags_MTRead = 0, eQMIWMSMessageTags_MTNotRead = 1, eQMIWMSMessageTags_MOSend = 2, eQMIWMSMessageTags_MONotSent = 3, }; // Enum to describe QMI WMS Message Types enum eQMIWMSMessageTypes:UINT8 { eQMIWMSMessageTypes_PointToPoint = 0, eQMIWMSMessageTypes_Broadcast = 1, }; // Enum to describe QMI WMS Network Registration Status enum eQMIWMSNetworkRegistrationStatus:UINT8 { eQMIWMSNetworkRegistrationStatus_NoService = 0, eQMIWMSNetworkRegistrationStatus_InProgress = 1, eQMIWMSNetworkRegistrationStatus_Failed = 2, eQMIWMSNetworkRegistrationStatus_LimitedService = 3, eQMIWMSNetworkRegistrationStatus_FullService = 4, }; // Enum to describe QMI WMS Notification Type enum eQMIWMSNotificationType:UINT8 { eQMIWMSNotificationType_Primary = 0, eQMIWMSNotificationType_SecondaryGSM = 1, eQMIWMSNotificationType_SecondaryUMTS = 2, }; // Enum to describe QMI WMS Protocol Identifier Data enum eQMIWMSProtocolIdentifierData:UINT8 { eQMIWMSProtocolIdentifierData_Default = 0, eQMIWMSProtocolIdentifierData_Implicit = 32, eQMIWMSProtocolIdentifierData_Telex = 33, eQMIWMSProtocolIdentifierData_G3Fax = 34, eQMIWMSProtocolIdentifierData_G4Fax = 35, eQMIWMSProtocolIdentifierData_VoicePhone = 36, eQMIWMSProtocolIdentifierData_Ermes = 37, eQMIWMSProtocolIdentifierData_NATPaging = 38, eQMIWMSProtocolIdentifierData_Videotex = 39, eQMIWMSProtocolIdentifierData_TeltexUnspecified = 40, eQMIWMSProtocolIdentifierData_TeltexPSPDN = 41, eQMIWMSProtocolIdentifierData_TeltexCSPDN = 42, eQMIWMSProtocolIdentifierData_TeltexPSTN = 43, eQMIWMSProtocolIdentifierData_TeltexISDN = 44, eQMIWMSProtocolIdentifierData_UCI = 45, eQMIWMSProtocolIdentifierData_MessageHandling = 48, eQMIWMSProtocolIdentifierData_X400 = 49, eQMIWMSProtocolIdentifierData_InternetEMail = 50, eQMIWMSProtocolIdentifierData_SCSpecific1 = 56, eQMIWMSProtocolIdentifierData_SCSpecific2 = 57, eQMIWMSProtocolIdentifierData_SCSpecific3 = 58, eQMIWMSProtocolIdentifierData_SCSpecific4 = 59, eQMIWMSProtocolIdentifierData_SCSpecific5 = 60, eQMIWMSProtocolIdentifierData_SCSpecific6 = 61, eQMIWMSProtocolIdentifierData_SCSpecific7 = 62, eQMIWMSProtocolIdentifierData_GSMUMTS = 63, eQMIWMSProtocolIdentifierData_SMType0 = 64, eQMIWMSProtocolIdentifierData_ReplaceSM1 = 65, eQMIWMSProtocolIdentifierData_ReplaceSM2 = 66, eQMIWMSProtocolIdentifierData_ReplaceSM3 = 67, eQMIWMSProtocolIdentifierData_ReplaceSM4 = 68, eQMIWMSProtocolIdentifierData_ReplaceSM5 = 69, eQMIWMSProtocolIdentifierData_ReplaceSM6 = 70, eQMIWMSProtocolIdentifierData_ReplaceSM7 = 71, eQMIWMSProtocolIdentifierData_ReturnCall = 95, eQMIWMSProtocolIdentifierData_ANSI136RData = 124, eQMIWMSProtocolIdentifierData_MEDataDownload = 125, eQMIWMSProtocolIdentifierData_MEDepersonalizationShortMessage = 126, eQMIWMSProtocolIdentifierData_SIMDataDownload = 127, }; // Enum to describe QMI WMS RP Cause Codes enum eQMIWMSRPCauseCodes { eQMIWMSRPCauseCodes_UnassignedNumber = 1, eQMIWMSRPCauseCodes_OperatorDeterminedBarring = 8, eQMIWMSRPCauseCodes_CallBarred = 10, eQMIWMSRPCauseCodes_Reserved = 11, eQMIWMSRPCauseCodes_ShortMessageTransferRejected = 21, eQMIWMSRPCauseCodes_MemoryCapacityExceeded = 22, eQMIWMSRPCauseCodes_DestinationOutOfOrder = 27, eQMIWMSRPCauseCodes_UnidentifiedSubscriber = 28, eQMIWMSRPCauseCodes_FacilityRejected = 29, eQMIWMSRPCauseCodes_UnknownSubscriber = 30, eQMIWMSRPCauseCodes_NetworkOutOfOrder = 38, eQMIWMSRPCauseCodes_TemporaryFailure = 41, eQMIWMSRPCauseCodes_Congestion = 42, eQMIWMSRPCauseCodes_UnspecifiedResourcesUnavailable = 47, eQMIWMSRPCauseCodes_RequestedFacilityNotSubscribed = 50, eQMIWMSRPCauseCodes_RequestedFacilityNotImplemented = 69, eQMIWMSRPCauseCodes_InvalidShortMessageTransferValue = 81, eQMIWMSRPCauseCodes_SemanticallyIncorrectMessage = 95, eQMIWMSRPCauseCodes_InvalidManadatoryInfo = 96, eQMIWMSRPCauseCodes_MessageTypeNotImplemented = 97, eQMIWMSRPCauseCodes_MessageNotCompatibleWithSMS = 98, eQMIWMSRPCauseCodes_InfoElementNotImplemented = 99, eQMIWMSRPCauseCodes_UnspecifiedProtocolError = 111, eQMIWMSRPCauseCodes_UnspecifiedInterworking = 127, }; // Enum to describe QMI WMS Receipt Actions enum eQMIWMSReceiptActions:UINT8 { eQMIWMSReceiptActions_Discard = 0, eQMIWMSReceiptActions_StoreAndNotify = 1, eQMIWMSReceiptActions_TransferOnly = 2, eQMIWMSReceiptActions_TransfterAndAcknowledge = 3, }; // Enum to describe QMI WMS Route Values enum eQMIWMSRouteValues:UINT8 { eQMIWMSRouteValues_Discard = 0, eQMIWMSRouteValues_StoreAndNotify = 1, eQMIWMSRouteValues_TransferOnly = 2, eQMIWMSRouteValues_TransferAndAcknowledge = 3, eQMIWMSRouteValues_Unknown = 255, }; // Enum to describe QMI WMS SMS Call Status enum eQMIWMSSMSCallStatus:UINT8 { eQMIWMSSMSCallStatus_Incoming = 0, eQMIWMSSMSCallStatus_Connected = 1, eQMIWMSSMSCallStatus_Aborted = 2, eQMIWMSSMSCallStatus_Disconnected = 3, eQMIWMSSMSCallStatus_Connecting = 4, }; // Enum to describe QMI WMS SMS Message Mode enum eQMIWMSSMSMessageMode:UINT8 { eQMIWMSSMSMessageMode_GSMWCDMA = 1, }; // Enum to describe QMI WMS Service Categories enum eQMIWMSServiceCategories { eQMIWMSServiceCategories_Unknown = 0, eQMIWMSServiceCategories_EmergencyBroadcast = 1, eQMIWMSServiceCategories_Administrative = 2, eQMIWMSServiceCategories_Maintenance = 3, eQMIWMSServiceCategories_GeneralNewsLocal = 4, eQMIWMSServiceCategories_GeneralNewsRegional = 5, eQMIWMSServiceCategories_GeneralNewsNational = 6, eQMIWMSServiceCategories_GeneralNewsInternational = 7, eQMIWMSServiceCategories_BusinessNewsLocal = 8, eQMIWMSServiceCategories_BusinessNewsRegional = 9, eQMIWMSServiceCategories_BusinessNewsNational = 10, eQMIWMSServiceCategories_BusinessNewsInternational = 11, eQMIWMSServiceCategories_SportsNewsLocal = 12, eQMIWMSServiceCategories_SportsNewsRegional = 13, eQMIWMSServiceCategories_SportsNewsNational = 14, eQMIWMSServiceCategories_SportsNewsInternational = 15, eQMIWMSServiceCategories_EntertainmentNewsLocal = 16, eQMIWMSServiceCategories_EntertainmentNewsRegional = 17, eQMIWMSServiceCategories_EntertainmentNewsNational = 18, eQMIWMSServiceCategories_EntertainmentNewsInternational = 19, eQMIWMSServiceCategories_LocalWeather = 20, eQMIWMSServiceCategories_AreaTrafficReports = 21, eQMIWMSServiceCategories_LocalAirplaneFlightSchedules = 22, eQMIWMSServiceCategories_Restaurants = 23, eQMIWMSServiceCategories_Lodgings = 24, eQMIWMSServiceCategories_RetailDirectory = 25, eQMIWMSServiceCategories_Advertisements = 26, eQMIWMSServiceCategories_StockQuotes = 27, eQMIWMSServiceCategories_EmploymentOpportunities = 28, eQMIWMSServiceCategories_MedicalHealthHospitals = 29, eQMIWMSServiceCategories_TechnologyNews = 30, eQMIWMSServiceCategories_Multicategory = 31, eQMIWMSServiceCategories_CardApplicationToolkitProtocolTeleservice = 32, eQMIWMSServiceCategories_PresidentialLevelAlert = 4096, eQMIWMSServiceCategories_ExtremeThreattoLifeandProperty = 4097, eQMIWMSServiceCategories_SevereThreattoLifeandProperty = 4098, eQMIWMSServiceCategories_AMBERChildAbductionEmergency = 4099, eQMIWMSServiceCategories_CMASTestMessage = 4100, }; // Enum to describe QMI WMS Service Ready Status enum eQMIWMSServiceReadyStatus:UINT32 { eQMIWMSServiceReadyStatus_SMSServiceNotReady = 0, eQMIWMSServiceReadyStatus_3GPPSMSServiceReady = 1, eQMIWMSServiceReadyStatus_3GPP2SMSServiceReady = 2, eQMIWMSServiceReadyStatus_3GPPAnd3GPP2SMSServicesReady = 3, }; // Enum to describe QMI WMS Storage Types enum eQMIWMSStorageTypes:UINT8 { eQMIWMSStorageTypes_UIM = 0, eQMIWMSStorageTypes_NV = 1, eQMIWMSStorageTypes_Unknown = 255, }; // Enum to describe QMI WMS Subscription Type enum eQMIWMSSubscriptionType:UINT8 { eQMIWMSSubscriptionType_PrimarySubscription = 0, eQMIWMSSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI WMS TP Cause Codes enum eQMIWMSTPCauseCodes { eQMIWMSTPCauseCodes_TelematicInterworkingNotSupported = 128, eQMIWMSTPCauseCodes_ShortMessageType0NotSupported = 129, eQMIWMSTPCauseCodes_CannotReplaceShortMessage = 130, eQMIWMSTPCauseCodes_UnspecifiedPIDError = 143, eQMIWMSTPCauseCodes_DataCodingSchemeNotSupported = 144, eQMIWMSTPCauseCodes_MessageClassNotSupported = 145, eQMIWMSTPCauseCodes_UnspecifiedDCSError = 159, eQMIWMSTPCauseCodes_CommandCannotBeActioned = 160, eQMIWMSTPCauseCodes_CommandUnsupported = 161, eQMIWMSTPCauseCodes_UnspecifiedCommandError = 175, eQMIWMSTPCauseCodes_TPDUNotSupported = 176, eQMIWMSTPCauseCodes_SCBusy = 192, eQMIWMSTPCauseCodes_NoSCSubscription = 193, eQMIWMSTPCauseCodes_SCSystemFailure = 194, eQMIWMSTPCauseCodes_InvalidSMEAddress = 195, eQMIWMSTPCauseCodes_DestinationSMEBarred = 196, eQMIWMSTPCauseCodes_SMRejectedOrDuplicate = 197, eQMIWMSTPCauseCodes_VPFNotSupported = 198, eQMIWMSTPCauseCodes_VPNotSupported = 199, eQMIWMSTPCauseCodes_SIMSMSStorageFull = 208, eQMIWMSTPCauseCodes_NoSIMSMSStorageCapability = 209, eQMIWMSTPCauseCodes_ErrorInMS = 210, eQMIWMSTPCauseCodes_MemoryCapacityExceeded = 211, eQMIWMSTPCauseCodes_SIMApplicationToolkitBusy = 212, eQMIWMSTPCauseCodes_SIMDataDownloadError = 213, eQMIWMSTPCauseCodes_UnspecifiedError = 255, }; // Enum to describe QMI WMS Transport Capability enum eQMIWMSTransportCapability:UINT8 { eQMIWMSTransportCapability_CDMA = 0, eQMIWMSTransportCapability_GW = 1, }; // Enum to describe QMI WMS Transport Type enum eQMIWMSTransportType:UINT8 { eQMIWMSTransportType_IMS = 0, }; // Enum to describe QMI WMS Waiting Message Type enum eQMIWMSWaitingMessageType:UINT8 { eQMIWMSWaitingMessageType_Voicemail = 0, eQMIWMSWaitingMessageType_Fax = 1, eQMIWMSWaitingMessageType_Email = 2, eQMIWMSWaitingMessageType_Other = 3, eQMIWMSWaitingMessageType_Videomail = 4, }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiConnectionMgmt/GobiConnectionMgmtAPIStructs.h000066400000000000000000026007431455567757300316440ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIStructs.h DESCRIPTION: Declaration of the Gobi API structures Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Include the enumerations #include "GobiConnectionMgmtAPIEnums.h" #pragma pack( push, 1 ) // Structure to represent a QMUX header struct sQMUXHeader { // mIF is always 1 BYTE mIF; // mLength is full size of QMUX message NOT including mIF WORD mLength; // Flags are always 0 for clients BYTE mFlags; eQMIService mServiceType; BYTE mClientID; }; // Structure to represent a QMI Control Raw Transaction Header struct sQMIControlRawTransactionHeader { BYTE mResponse :1; BYTE mIndication :1; BYTE mReserved :6; BYTE mTransactionID; }; // Structure to represent a QMI Service Raw Transaction Header struct sQMIServiceRawTransactionHeader { BYTE mCompound :1; BYTE mResponse :1; BYTE mIndication :1; BYTE mReserved :5; WORD mTransactionID; }; // Structure to represetn a QMI Raw Message Header struct sQMIRawMessageHeader { WORD mMessageID; WORD mLength; // This array must be the size specified by mLength // BYTE mTLV[1]; }; // Structure to represent a QMUX message struct sQMUXMessage { sQMUXHeader mQMUXHeader; // Either a sQMUXControlRawTransactionHeader or // sQMIServiceRawTransactionHeader should go here sQMIRawMessageHeader mQMIRawMessageHeader; }; // Structure to represent a QMI (control/service) content struct sQMIRawContentHeader { BYTE mTypeID; WORD mLength; // This array must be the size specified by mLength // BYTE mValue[1]; }; // Structure to describe request TLV 0x01 for QMI CTL Get Client ID struct sQMICTLGetClientID_ServiceType { eQMIService mQMIService; }; // Structure to describe response TLV 0x01 for QMI CTL Get Client ID struct sQMICTLGetClientID_AssignedClientID { eQMIService mQMIService; BYTE mClientID; }; // Structure to describe TLV 0x02, the Result Code // It is common for all Responses struct sResultCode { eQMIResults mQMIResult; eQMIErrors mQMIError; }; // Structure to describe TLV 0x01 for QMI LOC, the status // It is common for QMI LOC indications above 0x0032 struct sLOCIndication_Status { eQMILOCStatus mStatus; }; // Structure to describe request TLV 0x10 for WDSSetEventReport() struct sWDSSetEventReportRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe request TLV 0x11 for WDSSetEventReport() struct sWDSSetEventReportRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x13 for WDSSetEventReport() struct sWDSSetEventReportRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x14 for WDSSetEventReport() struct sWDSSetEventReportRequest_MIPStatusIndicator { INT8 mReportMIPStatus; }; // Structure to describe request TLV 0x15 for WDSSetEventReport() struct sWDSSetEventReportRequest_CurrentDataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x17 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataCallStatusIndicator { INT8 mReportDataCallStatus; }; // Structure to describe request TLV 0x18 for WDSSetEventReport() struct sWDSSetEventReportRequest_PreferredDataSystemIndicator { INT8 mReportPreferredDataSystem; }; // Structure to describe request TLV 0x19 for WDSSetEventReport() struct sWDSSetEventReportRequest_EVDOPMChangeIndicator { INT8 mReportEVDOPageMonitorPeriodChange; }; // Structure to describe request TLV 0x1A for WDSSetEventReport() struct sWDSSetEventReportRequest_DataSystemsIndicator { INT8 mReportDataSystems; }; // Structure to describe request TLV 0x1B for WDSSetEventReport() struct sWDSSetEventReportRequest_UplinkFlowControlIndicator { INT8 mReportUplinkFlowControl; }; // Structure to describe indication TLV 0x10 for WDS EventReport struct sWDSEventReportIndication_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe indication TLV 0x11 for WDS EventReport struct sWDSEventReportIndication_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe indication TLV 0x12 for WDS EventReport struct sWDSEventReportIndication_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe indication TLV 0x13 for WDS EventReport struct sWDSEventReportIndication_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe indication TLV 0x14 for WDS EventReport struct sWDSEventReportIndication_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe indication TLV 0x15 for WDS EventReport struct sWDSEventReportIndication_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe indication TLV 0x16 for WDS EventReport struct sWDSEventReportIndication_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe indication TLV 0x17 for WDS EventReport struct sWDSEventReportIndication_DataBearerTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x18 for WDS EventReport struct sWDSEventReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x19 for WDS EventReport struct sWDSEventReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x1A for WDS EventReport struct sWDSEventReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x1B for WDS EventReport struct sWDSEventReportIndication_MIPStatus { UINT8 mMIPStatus; }; // Structure to describe indication TLV 0x1D for WDS EventReport struct sWDSEventReportIndication_CurrentDataBearerTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe indication TLV 0x1F for WDS EventReport struct sWDSEventReportIndication_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe indication TLV 0x20 for WDS EventReport struct sWDSEventReportIndication_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe indication TLV 0x22 for WDS EventReport struct sWDSEventReportIndication_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe indication TLV 0x23 for WDS EventReport struct sWDSEventReportIndication_EVDOPageMonitorPeriodChange { UINT8 mEVDOPageMonitorPeriodChange; INT8 mEVDOForceLongSleep; }; // Structure to describe indication TLV 0x24 for WDS EventReport struct sWDSEventReportIndication_DataSystems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe indication TLV 0x25 for WDS EventReport struct sWDSEventReportIndication_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe indication TLV 0x26 for WDS EventReport struct sWDSEventReportIndication_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe indication TLV 0x27 for WDS EventReport struct sWDSEventReportIndication_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe request TLV 0x01 for WDSAbort() struct sWDSAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for WDSSetIndication() struct sWDSSetIndicationRequest_TMGIList { INT8 mReportEMBMSTMGIList; }; // Structure to describe request TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ContextAPNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x17 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x18 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x19 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x30 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_TechnologyPreference { bool mEnable3GPP:1; bool mEnable3GPP2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x31 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPPProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x32 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPP2ProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x33 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x34 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ExtendedTechnologyPreference { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe request TLV 0x35 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_CallType { eQMIWDSCallTypes mCallType; }; // Structure to describe response TLV 0x01 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe response TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe request TLV 0x10 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_Autoconnect { INT8 mAutoconnectOff; }; // Structure to describe response TLV 0x01 for WDSGetPacketServiceStatus() struct sWDSGetPacketServiceStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x01 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; INT8 mReconfigureRequired; }; // Structure to describe indication TLV 0x10 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x11 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe indication TLV 0x12 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe indication TLV 0x13 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnology; }; // Structure to describe response TLV 0x01 for WDSGetChannelRates() struct sWDSGetChannelRatesResponse_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe request TLV 0x01 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsRequest_PacketStatsMask { bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe response TLV 0x10 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe response TLV 0x11 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe response TLV 0x12 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe response TLV 0x13 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe response TLV 0x14 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe response TLV 0x15 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe response TLV 0x19 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x1A for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x1B for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x1C for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x1D for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe response TLV 0x1E for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe request TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe request TLV 0x10 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSCreateProfile() struct sWDSCreateProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSCreateProfile() struct sWDSCreateProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSCreateProfile() struct sWDSCreateProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSCreateProfile() struct sWDSCreateProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSCreateProfile() struct sWDSCreateProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSCreateProfile() struct sWDSCreateProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSCreateProfile() struct sWDSCreateProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSCreateProfile() struct sWDSCreateProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSCreateProfile() struct sWDSCreateProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSCreateProfile() struct sWDSCreateProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x8F for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfilePersistent { INT8 mProfilePersistent; }; // Structure to describe request TLV 0x90 for WDSCreateProfile() struct sWDSCreateProfileRequest_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSCreateProfile() struct sWDSCreateProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSCreateProfile() struct sWDSCreateProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSCreateProfile() struct sWDSCreateProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSCreateProfile() struct sWDSCreateProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSCreateProfile() struct sWDSCreateProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileResponse_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSCreateProfile() struct sWDSCreateProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSModifyProfile() struct sWDSModifyProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSModifyProfile() struct sWDSModifyProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSModifyProfile() struct sWDSModifyProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSModifyProfile() struct sWDSModifyProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSModifyProfile() struct sWDSModifyProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSModifyProfile() struct sWDSModifyProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSModifyProfile() struct sWDSModifyProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSModifyProfile() struct sWDSModifyProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSModifyProfile() struct sWDSModifyProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSModifyProfile() struct sWDSModifyProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x90 for WDSModifyProfile() struct sWDSModifyProfileRequest_NegotiateDNSServerPrefrence { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSModifyProfile() struct sWDSModifyProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSModifyProfile() struct sWDSModifyProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSModifyProfile() struct sWDSModifyProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSModifyProfile() struct sWDSModifyProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSModifyProfile() struct sWDSModifyProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSModifyProfile() struct sWDSModifyProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSDeleteProfile() struct sWDSDeleteProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSDeleteProfile() struct sWDSDeleteProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetProfileList() struct sWDSGetProfileListRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSGetProfileList() struct sWDSGetProfileListRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSGetProfileList() struct sWDSGetProfileListRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSGetProfileList() struct sWDSGetProfileListRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSGetProfileList() struct sWDSGetProfileListRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSGetProfileList() struct sWDSGetProfileListRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSGetProfileList() struct sWDSGetProfileListRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSGetProfileList() struct sWDSGetProfileListRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSGetProfileList() struct sWDSGetProfileListRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSGetProfileList() struct sWDSGetProfileListRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x90 for WDSGetProfileList() struct sWDSGetProfileListRequest_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSGetProfileList() struct sWDSGetProfileListRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSGetProfileList() struct sWDSGetProfileListRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSGetProfileList() struct sWDSGetProfileListRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSGetProfileList() struct sWDSGetProfileListRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetProfileList() struct sWDSGetProfileListResponse_ProfileList { UINT8 mNumberOfProfiles; struct sProfile { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; UINT8 mProfileNameLength; // This array must be the size specified by mProfileNameLength // char mProfileName[1]; }; // This array must be the size specified by mNumberOfProfiles // sProfile mProfiles[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileList() struct sWDSGetProfileListResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetProfileSettings() struct sWDSGetProfileSettingsRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IMCMFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x90 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe response TLV 0x10 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x1D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x90 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsRequest_RequestedSettings { bool mProfileID:1; bool mProfileName:1; bool mPDPType:1; bool mAPNName:1; bool mDNSAddress:1; bool mGrantedQoS:1; bool mUsername:1; bool mAuthenticationProtocol:1; bool mIPAddress:1; bool mGatewayInfo:1; bool mPCSCFAddress:1; bool mPCSCFServerAddressList:1; bool mPCSCFDomainNameList:1; bool mMTU:1; bool mDomainNameList:1; bool mIPFamily:1; bool mIMCNFlag:1; bool mExtendedTechnology:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x14 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_UMTSGrantedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GPRSGrantedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileID { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x20 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewayAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x21 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewaySubnetMask { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x22 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x23 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFServerAddressList { UINT8 mNumberOfInstances; struct sInstance { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x24 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFDomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mFQDNLength; // This array must be the size specified by mFQDNLength // char mFQDN[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x25 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x26 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6GatewayAddress { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x27 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x28 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_MTU { UINT32 mMTU; }; // Structure to describe response TLV 0x2A for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_DomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mDomainNameLength; // This array must be the size specified by mDomainNameLength // char mDomainName[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x2B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe response TLV 0x2C for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x2D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe response TLV 0x2E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFIPv6AddressList { UINT8 mNumberOfAddresses; struct sAddress { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mNumberOfAddresses // sAddress mAddresses[1]; }; // Structure to describe request TLV 0x01 for WDSSetMIPMode() struct sWDSSetMIPModeRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetMIPMode() struct sWDSGetMIPModeResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetDormancy() struct sWDSGetDormancyResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x01 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe response TLV 0x10 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x01 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_Duration { UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousDuration { UINT64 mPreviousDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x12 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousActiveDuration { UINT64 mPreviousDataSessionActiveDuration; }; // Structure to describe response TLV 0x01 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x01 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x10 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x01 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x10 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe request TLV 0x01 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_RequestedStatus { bool mConnectionStatus:1; bool mLastCallEndReason:1; bool mRXTXByteTotals:1; bool mDormancyStatus:1; bool mDataBearerTechnology:1; bool mChannelRates:1; bool mDuration:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ConnectionStatusIndicator { INT8 mReportConnectionStatus; }; // Structure to describe request TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; // Padding out 6 bits UINT8 mReserved1:6; bool mTXByteTotal:1; bool mRXByteTotal:1; // Padding out 24 bits UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe response TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x15 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x16 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe response TLV 0x17 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x18 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x19 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x20 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x10 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x11 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x12 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x13 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x14 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x15 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x16 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe response TLV 0x01 for WDSGetActiveMIPProfile() struct sWDSGetActiveMIPProfileResponse_Index { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSSetActiveMIPProfile() struct sWDSSetActiveMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSGetMIPProfile() struct sWDSGetMIPProfileRequest_Index { UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_State { INT8 mEnabled; }; // Structure to describe response TLV 0x11 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x13 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x14 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe response TLV 0x15 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe response TLV 0x16 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HASPI { UINT32 mHASPI; }; // Structure to describe response TLV 0x17 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAASPI { UINT32 mAAASPI; }; // Structure to describe response TLV 0x1A for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe response TLV 0x1B for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe request TLV 0x01 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_State { INT8 mEnabled; }; // Structure to describe request TLV 0x11 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe request TLV 0x15 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe request TLV 0x16 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HASPI { UINT32 mHASPI; }; // Structure to describe request TLV 0x17 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequeste_AAASPI { UINT32 mAAASPI; }; // Structure to describe request TLV 0x18 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNHA { // String is variable length, but must be size of the container // char mMNHAKey[1]; }; // Structure to describe request TLV 0x19 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNAAA { // String is variable length, but must be size of the container // char mMNAAAKey[1]; }; // Structure to describe response TLV 0x10 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x11 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe response TLV 0x12 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe response TLV 0x13 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe response TLV 0x14 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe response TLV 0x15 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe response TLV 0x16 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe request TLV 0x01 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x10 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe request TLV 0x11 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe request TLV 0x12 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe request TLV 0x13 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe request TLV 0x14 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe request TLV 0x15 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe request TLV 0x16 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe response TLV 0x01 for WDSGetLastMIPStatus() struct sWDSGetLastMIPStatusResponse_Status { UINT8 mLastMIPStatus; }; // Structure to describe response TLV 0x01 for WDSGetANAAAAuthenticationStatus() struct sWDSGetANAAAAuthenticationStatusResponse_Status { INT8 mANAAAAuthenticated; }; // Structure to describe response TLV 0x01 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_Technology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_LastCallTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe request TLV 0x10 for WDSGetCallList() struct sWDSGetCallListRequest_ListType { eQMICallHistoryTypes mCallListType; }; // Structure to describe response TLV 0x10 for WDSGetCallList() struct sWDSGetCallListResponse_FullList { UINT16 mCallRecords; struct sRecord { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe response TLV 0x11 for WDSGetCallList() struct sWDSGetCallListResponse_IDList { UINT16 mCallRecords; struct sRecord { UINT16 mID; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordRequest_RecordID { UINT16 mID; }; // Structure to describe response TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordResponse_Record { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // Structure to describe response TLV 0x01 for WDSGetCallListMaxSize() struct sWDSGetCallListMaxSizeResponse_Maximum { UINT16 mCallListMaxSize; }; // Structure to describe request TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberRequest_ProfileType { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; }; // Structure to describe response TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ProfileNumber { UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfile() struct sWDSResetProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSResetProfile() struct sWDSResetProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidRequest_ProfileParam { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; eQMIWDSProfileParamID mProfileParamID; }; // Structure to describe response TLV 0xE0 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetIPFamilyPreference() struct sWDSSetIPFamilyPreferenceRequest_IPFamilyPreference { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x01 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe request TLV 0x10 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x10 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe response TLV 0x11 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x01 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x10 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x10 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x11 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x13 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x10 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x13 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetCDMAPreDormancySettings() struct sWDSGetCDMAPreDormancySettingsResponse_Settings { eQMIWDSCDMAServiceOptions mServiceOption; eQMIWDSCDMANetworks mDataSessionNetwork; }; // Structure to describe request TLV 0x01 for WDSSetCAMTimer() struct sWDSSetCAMTimerRequest_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe response TLV 0x01 for WDSGetCAMTimer() struct sWDSGetCAMTimerResponse_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe request TLV 0x01 for WDSSetSCRM() struct sWDSSetSCRMRequest_SCRM { INT8 mSCRMEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSCRM() struct sWDSGetSCRMResponse_SCRM { INT8 mSCRMEnabled; }; // Structure to describe request TLV 0x01 for WDSSetRDUD() struct sWDSSetRDUDRequest_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetRDUD() struct sWDSGetRDUDResponse_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSIPMIPCallType() struct sWDSGetSIPMIPCallTypeResponse_CallType { eQMIWDSSIPMIPCallTypes mCallType; }; // Structure to describe request TLV 0x01 for WDSSetEVDOPageMonitorPeriod() struct sWDSSetEVDOPageMonitorPeriodRequest_Period { UINT8 mPageMonitorPeriod; }; // Structure to describe indication TLV 0x01 for WDS EVDOPageMonitorPeriodIndication struct sWDSEVDOPageMonitorPeriodIndication_Result { eQMIWDSSlotCycleSetResults mSlotCycleSetResult; }; // Structure to describe request TLV 0x01 for WDSSetEVDOLongSleep() struct sWDSSetEVDOLongSleepRequest_Setting { INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetEVDOPageMonitorPeriod() struct sWDSGetEVDOPageMonitorPeriodResponse_Details { UINT8 mPageMonitorPeriod; INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetCallThrottleInfo() struct sWDSGetCallThrottleInfoResponse_Details { UINT32 mEVDOThrottledDelaySeconds; UINT32 mCDMAThrottledDelaySeconds; }; // Structure to describe request TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIRequest_APN { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIResponse_NSAPI { UINT8 mNSAPICount; // This array must be the size specified by mNSAPICount // UINT8 mNSAPI[1]; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_Preference { eQMIWDSDUNControlPreferences mDUNControl; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x01 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_Status { INT8 mDUNControlEnabled; }; // Structure to describe response TLV 0x10 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x11 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_CurrentClient { INT8 mSetByCurrentClient; }; // Structure to describe response TLV 0x12 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_CallNotifications { INT8 mEnableDUNCallNotifications; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_EntitlementNotifications { INT8 mEnableEntitlementNotifications; }; // Structure to describe request TLV 0x11 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_RedialNotifications { INT8 mEnableSilentRedailNotifications; }; // Structure to describe response TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x01 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_Event { eQMIWDSDUNControlEvents mDUNControlEvent; }; // Structure to describe indication TLV 0x10 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallNotification { INT8 mDUNCallAllowed; }; // Structure to describe indication TLV 0x11 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallID { UINT8 mDUNCallID; }; // Structure to describe indication TLV 0x12 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_PreviousFailureReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSPendingDUNCallControl() struct sWDSPendingDUNCallControlRequest_Action { INT8 mDUNCallAllowed; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIActivateIndication struct sWDSEMBMSTMGIActivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIDectivateIndication struct sWDSEMBMSTMGIDectivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryRequest_Type { eQMIWDSEMBMSListTypes mTMGIListType; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe response TLV 0x11 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe indication TLV 0x11 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe response TLV 0x10 for WDSGetPreferredDataSystem() struct sWDSGetPreferredDataSystemResponse_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe response TLV 0x10 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe response TLV 0x11 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataSystems() struct sWDSGetCurrentDataSystemsResponse_Systems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoRequest_Type { eQMIWDSDataSystemNetworkTypes mTechnologyType; }; // Structure to describe response TLV 0x10 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoResponse_Info { UINT8 mThrottleInfoCount; struct sInfo { INT8 mIPv4Throttled; INT8 mIPv6Throttled; UINT32 mIPv4ThrottleTimeLeftInMilliseconds; UINT32 mIPv6ThrottleTimeLeftInMilliseconds; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // This array must be the size specified by mThrottleInfoCount // sInfo mInfos[1]; }; // Structure to describe response TLV 0x10 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x11 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_IPSupport { eQMIWDSLTEIPTypes mIPType; }; // Structure to describe response TLV 0x12 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_OTAAttach { INT8 mOTAAttachPerformed; }; // Structure to describe response TLV 0x10 for WDSGetFlowControlStatus() struct sWDSGetFlowControlStatusResponse_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe request TLV 0x10 for DMSSetEventReport() struct sDMSSetEventReportRequest_PowerState { INT8 mReportPowerState; }; // Structure to describe request TLV 0x11 for DMSSetEventReport() struct sDMSSetEventReportRequest_BatteryLevel { UINT8 mBatteryLevelLowerLimit; UINT8 mBatteryLevelUpperLimit; }; // Structure to describe request TLV 0x12 for DMSSetEventReport() struct sDMSSetEventReportRequest_PINStatus { INT8 mReportPINStatus; }; // Structure to describe request TLV 0x13 for DMSSetEventReport() struct sDMSSetEventReportRequest_ActivationState { INT8 mReportActivationState; }; // Structure to describe request TLV 0x14 for DMSSetEventReport() struct sDMSSetEventReportRequest_OperatingMode { INT8 mReportOperatingMode; }; // Structure to describe request TLV 0x15 for DMSSetEventReport() struct sDMSSetEventReportRequest_UIMState { INT8 mReportUIMState; }; // Structure to describe request TLV 0x16 for DMSSetEventReport() struct sDMSSetEventReportRequest_WirelessDisableState { INT8 mReportWirelessDisableState; }; // Structure to describe request TLV 0x17 for DMSSetEventReport() struct sDMSSetEventReportRequest_PRLInit { INT8 mReportPRLInitialization; }; // Structure to describe indication TLV 0x10 for DMS EventReport struct sDMSEventReportIndication_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe indication TLV 0x11 for DMS EventReport struct sDMSEventReportIndication_PIN1State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x12 for DMS EventReport struct sDMSEventReportIndication_PIN2State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x13 for DMS EventReport struct sDMSEventReportIndication_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe indication TLV 0x14 for DMS EventReport struct sDMSEventReportIndication_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x15 for DMS EventReport struct sDMSEventReportIndication_UIMState { eQMIDMSUIMStates mUIMState; }; // Structure to describe indication TLV 0x16 for DMS EventReport struct sDMSEventReportIndication_WirelessDisableState { INT8 mWirelessDisableOn; }; // Structure to describe indication TLV 0x17 for DMS EventReport struct sDMSEventReportIndication_PRLInit { INT8 mPRLLoaded; }; // Structure to describe response TLV 0x01 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_Capabilities { UINT32 mMaxTXRatebps; UINT32 mMaxRXRatebps; eQMIDMSDataServiceCapabilities1 mDataServiceCapability; INT8 mSIMSupported; UINT8 mRadioInterfaceCount; // This array must be the size specified by mRadioInterfaceCount // eQMIDMSRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_ServiceCapability { eQMIDMSServiceCapabilities mServiceCapability; }; // Structure to describe response TLV 0x11 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_VoiceCapability { bool mGWCSFBCapable:1; bool m1xCSFBCapable:1; bool mVoLTECapable:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceManfacturer() struct sDMSGetDeviceManfacturerResponse_Manfacturer { // String is variable length, but must be size of the container // char mDeviceManfacturer[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceModel() struct sDMSGetDeviceModelResponse_Model { // String is variable length, but must be size of the container // char mDeviceModelID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_Revision { // String is variable length, but must be size of the container // char mDeviceRevisionID[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_BootCodeRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_UQCNRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_VoiceNumber { // String is variable length, but must be size of the container // char mDeviceVoiceNumber[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_MobileIDNumber { // String is variable length, but must be size of the container // char mDeviceMobileIDNumber[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_ESN { // String is variable length, but must be size of the container // char mESN[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_IMEI { // String is variable length, but must be size of the container // char mIMEI[1]; }; // Structure to describe response TLV 0x12 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_MEID { // String is variable length, but must be size of the container // char mMEID[1]; }; // Structure to describe response TLV 0x01 for DMSGetPowerState() struct sDMSGetPowerStateResponse_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe request TLV 0x01 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionRequest_Info { UINT8 mPINID; UINT8 mPINEnabled; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINRequest_Info { UINT8 mPINID; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINRequest_Info1 { UINT8 mPINID; UINT8 mPUKLength; // This array must be the size specified by mPUKLength // char mPUKValue[1]; }; struct sDMSUIMUnblockPINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMUnblockPINRequest_Info { sDMSUIMUnblockPINRequest_Info1 mDMSUIMUnblockPINRequest_Info1; sDMSUIMUnblockPINRequest_Info2 mDMSUIMUnblockPINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMChangePIN() struct sDMSUIMChangePINRequest_Info1 { UINT8 mPINID; UINT8 mOldPINLength; // This array must be the size specified by mOldPINLength // char mOldPINValue[1]; }; struct sDMSUIMChangePINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMChangePINRequest_Info { sDMSUIMChangePINRequest_Info1 mDMSUIMChangePINRequest_Info1; sDMSUIMChangePINRequest_Info2 mDMSUIMChangePINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMChangePIN() struct sDMSUIMChangePINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN1Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x12 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN2Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetHardwareRevision() struct sDMSGetHardwareRevisionResponse_HardwareRevision { // String is variable length, but must be size of the container // char mDeviceHardwareRevision[1]; }; // Structure to describe response TLV 0x01 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x10 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OfflineReason { UINT8 mHostImageMismatch:1; UINT8 mUQCNImageMismatch:1; UINT8 mIncompatibleUQCN:1; UINT8 mUQCNCopyIssue:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_PlatformRestricted { INT8 mPlatformRestricted; }; // Structure to describe request TLV 0x01 for DMSSetOperatingMode() struct sDMSSetOperatingModeRequest_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x01 for DMSGetTimestamp() struct sDMSGetTimestampResponse_Timestamp { UINT64 mTimestamp:48; // mSource is of type eQMIDMSTimestampSources UINT64 mSource:16; }; // Structure to describe response TLV 0x01 for DMSGetPRLVersion() struct sDMSGetPRLVersionResponse_PRLVersion { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x01 for DMSGetActivationState() struct sDMSGetActivationStateResponse_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe request TLV 0x01 for DMSActivateAutomatic() struct sDMSActivateAutomaticRequest_ActivationCode { UINT8 mCodeLength; // This array must be the size specified by mCodeLength // char mCode[1]; }; // Structure to describe request TLV 0x01 for DMSActivateManual() struct sDMSActivateManualRequest_ActivationData1 { char mSPC[6]; UINT16 mSID; UINT8 mMDNLength; // This array must be the size specified by mMDNLength // char mMDN[1]; }; struct sDMSActivateManualRequest_ActivationData2 { UINT8 mMINLength; // This array must be the size specified by mMINLength // char mMIN[1]; }; struct sDMSActivateManualRequest_ActivationData { sDMSActivateManualRequest_ActivationData1 mDMSActivateManualRequest_ActivationData1; sDMSActivateManualRequest_ActivationData2 mDMSActivateManualRequest_ActivationData2; }; // Structure to describe request TLV 0x10 for DMSActivateManual() struct sDMSActivateManualRequest_PRLObsolete { UINT16 mPRLLength; // This array must be the size specified by mPRLLength // UINT8 mPRL[1]; }; // Structure to describe request TLV 0x11 for DMSActivateManual() struct sDMSActivateManualRequest_MNHAKey { UINT8 mMNHALength; // This array must be the size specified by mMNHALength // char mMNHA[1]; }; // Structure to describe request TLV 0x12 for DMSActivateManual() struct sDMSActivateManualRequest_MNAAAKey { UINT8 mMNAAALength; // This array must be the size specified by mMNAAALength // char mMNAAA[1]; }; // Structure to describe request TLV 0x13 for DMSActivateManual() struct sDMSActivateManualRequest_PRL { UINT16 mPRLTotalLength; UINT16 mPRLSegmentLength; UINT8 mPRLSegmentID; // This array must be the size specified by mPRLSegmentLength // UINT8 mPRL[1]; }; // Structure to describe response TLV 0x01 for DMSGetLockState() struct sDMSGetLockStateResponse_LockState { eQMIDMSLockStates mLockState; }; // Structure to describe request TLV 0x01 for DMSSetLockState() struct sDMSSetLockStateRequest_LockState { eQMIDMSLockStates mLockState; char mLockCode[4]; }; // Structure to describe request TLV 0x01 for DMSSetLockCode() struct sDMSSetLockCodeRequest_LockCode { char mCurrentLockCode[4]; char mNewLockCode[4]; }; // Structure to describe response TLV 0x01 for DMSReadUserData() struct sDMSReadUserDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSWriteUserData() struct sDMSWriteUserDataRequest_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x01 for DMSReadERIData() struct sDMSReadERIDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSResetFactoryDefaults() struct sDMSResetFactoryDefaultsRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x01 for DMSValidateSPC() struct sDMSValidateSPCRequest_SPC { char mSPC[6]; }; // Structure to describe response TLV 0x01 for DMSUIMGetICCID() struct sDMSUIMGetICCIDResponse_ICCID { // String is variable length, but must be size of the container // char mICCID[1]; }; // Structure to describe response TLV 0x01 for DMSUIMGetHostLockID() struct sDMSUIMGetHostLockIDResponse_ID { UINT32 mHostLockCode; }; // Structure to describe request TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusRequest_Facility { eQMIDMSUIMFacility mFacility; }; // Structure to describe response TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Status { eQMIDMSUIMFacilityStates mFacilityState; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x10 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Blocking { INT8 mOperationBlocking; }; // Structure to describe request TLV 0x01 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionRequest_Facility { eQMIDMSUIMFacility mFacility; eQMIDMSUIMFacilityStates mFacilityState; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionResponse_Status { UINT8 mRemainingVerifyRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyRequest_Facility { eQMIDMSUIMFacility mFacility; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyResponse_Status { UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetIMSI() struct sDMSGetIMSIResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x01 for DMSGetUIMState() struct sDMSGetUIMStateResponse_State { eQMIDMSUIMStates mUIMState; }; // Structure to describe response TLV 0x01 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_Bands { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x10 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_LTEBands { bool mEUTRANBand1:1; bool mEUTRANBand2:1; bool mEUTRANBand3:1; bool mEUTRANBand4:1; bool mEUTRANBand5:1; bool mEUTRANBand6:1; bool mEUTRANBand7:1; bool mEUTRANBand8:1; bool mEUTRANBand9:1; bool mEUTRANBand10:1; bool mEUTRANBand11:1; bool mEUTRANBand12:1; bool mEUTRANBand13:1; bool mEUTRANBand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRANBand17:1; bool mEUTRANBand18:1; bool mEUTRANBand19:1; bool mEUTRANBand20:1; bool mEUTRANBand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRANBand24:1; bool mEUTRANBand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRANBand33:1; bool mEUTRANBand34:1; bool mEUTRANBand35:1; bool mEUTRANBand36:1; bool mEUTRANBand37:1; bool mEUTRANBand38:1; bool mEUTRANBand39:1; bool mEUTRANBand40:1; bool mEUTRANBand41:1; // Padding out 23 bits UINT8 mReserved4:7; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x11 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_TDSBands { bool mTDSBandA:1; bool mTDSBandB:1; bool mTDSBandC:1; bool mTDSBandD:1; bool mTDSBandE:1; bool mTDSBandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetFactorySerialNumber() struct sDMSGetFactorySerialNumberResponse_ID { // String is variable length, but must be size of the container // char mFactorySerialNumber[1]; }; // Structure to describe request TLV 0x01 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Time { UINT64 mTimeInMilliseconds; }; // Structure to describe request TLV 0x10 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Type { eQMIDMSTimeReferences mTimeReference; }; // Structure to describe response TLV 0x01 for DMSGetSoftwareVersion() struct sDMSGetSoftwareVersionResponse_Version { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe request TLV 0x01 for DMSSetSPC() struct sDMSSetSPCRequest_CurrentSPC { char mCurrentSPC[6]; }; // Structure to describe response TLV 0x10 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Version { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x11 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Preference { INT8 mPRLOnlyPreferenceSet; }; // Structure to describe request TLV 0x01 for NASAbort() struct sNASAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for NASSetEventReport() struct sNASSetEventReportRequest_SignalIndicator { INT8 mReportSignalStrength; UINT8 mNumberOfThresholds; // This array must be the size specified by mNumberOfThresholds // INT8 mSignalStrengthThresholddBm[1]; }; // Structure to describe request TLV 0x11 for NASSetEventReport() struct sNASSetEventReportRequest_RFIndicator { INT8 mReportRFInfo; }; // Structure to describe request TLV 0x12 for NASSetEventReport() struct sNASSetEventReportRequest_RegistrationRejectIndicator { INT8 mReportLUReject; }; // Structure to describe request TLV 0x13 for NASSetEventReport() struct sNASSetEventReportRequest_RSSIIndicator { INT8 mReportRSSI; UINT8 mRSSIDelta; }; // Structure to describe request TLV 0x14 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOIndicator { INT8 mReportECIO; UINT8 mECIODelta; }; // Structure to describe request TLV 0x15 for NASSetEventReport() struct sNASSetEventReportRequest_IOIndicator { INT8 mReportIO; UINT8 mIODelta; }; // Structure to describe request TLV 0x16 for NASSetEventReport() struct sNASSetEventReportRequest_SINRIndicator { INT8 mReportSINR; UINT8 mSINRDelta; }; // Structure to describe request TLV 0x17 for NASSetEventReport() struct sNASSetEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x18 for NASSetEventReport() struct sNASSetEventReportRequest_RSRQIndicator { INT8 mReportRSRQ; UINT8 mRSRQDelta; }; // Structure to describe request TLV 0x19 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOThreshold { INT8 mReportECIO; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1A for NASSetEventReport() struct sNASSetEventReportRequest_SINRThreshold { INT8 mReportSINR; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x1B for NASSetEventReport() struct sNASSetEventReportRequest_LTESNRDelta { INT8 mReportLTESNR; UINT16 mLTESNRDelta; }; // Structure to describe request TLV 0x1C for NASSetEventReport() struct sNASSetEventReportRequest_LTERSPSDelta { INT8 mReportLTERSRP; UINT8 mLTERSRPDelta; }; // Structure to describe indication TLV 0x10 for NAS EventReport struct sNASEventReportIndication_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x11 for NAS EventReport struct sNASEventReportIndication_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for NAS EventReport struct sNASEventReportIndication_RegistrationReject { eQMINASServiceDomains mServiceDomain; UINT16 mRejectCause; }; // Structure to describe indication TLV 0x13 for NAS EventReport struct sNASEventReportIndication_RSSI { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x14 for NAS EventReport struct sNASEventReportIndication_ECIO { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x15 for NAS EventReport struct sNASEventReportIndication_IO { UINT32 mIO; }; // Structure to describe indication TLV 0x16 for NAS EventReport struct sNASEventReportIndication_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe indication TLV 0x17 for NAS EventReport struct sNASEventReportIndication_ErrorRate { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x18 for NAS EventReport struct sNASEventReportIndication_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x19 for NAS EventReport struct sNASEventReportIndication_LTESNR { INT16 mLTESNR; }; // Structure to describe indication TLV 0x1A for NAS EventReport struct sNASEventReportIndication_LTERSRP { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemSelectIndicator { INT8 mReportSystemSelect; }; // Structure to describe request TLV 0x12 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DDTMIndicator { INT8 mReportDDTM; }; // Structure to describe request TLV 0x13 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ServingSystemIndicator { INT8 mReportServingSystem; }; // Structure to describe request TLV 0x14 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DualStandbyIndicator { INT8 mReportDualStandby; }; // Structure to describe request TLV 0x15 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SubscriptionInformationIndicator { INT8 mReportSubscriptionInformation; }; // Structure to describe request TLV 0x17 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkTimeIndicator { INT8 mReportNetworkTime; }; // Structure to describe request TLV 0x18 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemInformationIndicator { INT8 mReportSystemInformation; }; // Structure to describe request TLV 0x19 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SignalStrengthIndicator { INT8 mReportSignalStrength; }; // Structure to describe request TLV 0x1A for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x1B for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NewEVDOUATIIndicator { INT8 mReportNewEVDOUATI; }; // Structure to describe request TLV 0x1C for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EVDOSessionIndicator { INT8 mReportEVDOSessionClose; }; // Structure to describe request TLV 0x1D for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ManagedRoamingIndicator { INT8 mReportManagedRoaming; }; // Structure to describe request TLV 0x1E for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CurrentPLMNName { INT8 mReportCurrentPLMNName; }; // Structure to describe request TLV 0x1F for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EMBMSStatus { INT8 mReportEMBMSStatus; }; // Structure to describe request TLV 0x20 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RFBandInfo { INT8 mReportRFBandInfo; }; // Structure to describe request TLV 0x21 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkReject { INT8 mNetworkRejectEnabled; INT8 mSupressSytemInfoEnabled; }; // Structure to describe request TLV 0x22 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_OperatorNameData { INT8 mOperatorNameDataEnabled; }; // Structure to describe request TLV 0x23 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CSPPLMNModeBit { INT8 mCSPPLMNModeBitEnabled; }; // Structure to describe request TLV 0x24 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RTREConfiguration { INT8 mRTREConfigurationEnabled; }; // Structure to describe request TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthRequest_RequestMask { bool mQueryRSSI:1; bool mQueryECIO:1; bool mQueryIO:1; bool mQuerySINR:1; bool mQueryErrorRate:1; bool mQueryRSRQ:1; bool mQueryLTESNR:1; bool mQueryLTERSRQ:1; // Padding out 8 bits UINT8 mReserved1; }; // Structure to describe response TLV 0x01 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrengthList { UINT16 mNumberOfInfoInstances; struct sInfo { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x11 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSSIList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x12 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ECIOList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x13 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_IO { UINT32 mIO; }; // Structure to describe response TLV 0x14 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe response TLV 0x15 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ErrorRateList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x16 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x17 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTESNR { INT16 mLTESNR; }; // Structure to describe response TLV 0x18 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTERSRQ { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanRequest_NetworkMask { bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkInfo { UINT16 mNumberOfInfoInstances; struct sNetworkInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASInUseStates mInUseStatus:2; eQMINASRoamingStates mRoamingStatus:2; eQMINASForbiddenStates mForbiddenStatus:2; eQMINASPreferredStates mPreferredStatus:2; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // This array must be the size specified by mNumberOfInfoInstances // sNetworkInfo mNetworkInfos[1]; }; // Structure to describe response TLV 0x11 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkRAT { UINT16 mNumberOfInfoInstances; struct sInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x12 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_PCSInfo { UINT16 mPCSInfoCount; struct sPCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mPCSInfoCount // sPCSInfo mPCSInfos[1]; }; // Structure to describe response TLV 0x13 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkScanResult { eQMINASNetworkScanResult mNetworkScanResult; }; // Structure to describe request TLV 0x01 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_Action { eQMINASRegisterActions mRegisterAction; }; // Structure to describe request TLV 0x10 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ManualInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x11 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x12 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASInitiateAttach() struct sNASInitiateAttachRequest_Action { eQMINASPSAttachActions mPSAttachAction; }; // Structure to describe response TLV 0x01 for NASGetServingSystem() struct sNASGetServingSystemResponse_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x11 for NASGetServingSystem() struct sNASGetServingSystemResponse_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe response TLV 0x12 for NASGetServingSystem() struct sNASGetServingSystemResponse_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x13 for NASGetServingSystem() struct sNASGetServingSystemResponse_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x14 for NASGetServingSystem() struct sNASGetServingSystemResponse_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x15 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for NASGetServingSystem() struct sNASGetServingSystemResponse_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x17 for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe response TLV 0x18 for NASGetServingSystem() struct sNASGetServingSystemResponse_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe response TLV 0x1A for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe response TLV 0x1B for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPDaylightSavingsAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe response TLV 0x1C for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe response TLV 0x1D for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPCellID { UINT32 mCellID; }; // Structure to describe response TLV 0x1E for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe response TLV 0x1F for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe response TLV 0x20 for NASGetServingSystem() struct sNASGetServingSystemResponse_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe response TLV 0x21 for NASGetServingSystem() struct sNASGetServingSystemResponse_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe response TLV 0x22 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe response TLV 0x23 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe response TLV 0x24 for NASGetServingSystem() struct sNASGetServingSystemResponse_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x25 for NASGetServingSystem() struct sNASGetServingSystemResponse_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x26 for NASGetServingSystem() struct sNASGetServingSystemResponse_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x27 for NASGetServingSystem() struct sNASGetServingSystemResponse_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x28 for NASGetServingSystem() struct sNASGetServingSystemResponse_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe indication TLV 0x01 for NAS ServingSystemIndication struct sNASServingSystemIndication_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x10 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x11 for NAS ServingSystemIndication struct sNASServingSystemIndication_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe indication TLV 0x12 for NAS ServingSystemIndication struct sNASServingSystemIndication_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe indication TLV 0x13 for NAS ServingSystemIndication struct sNASServingSystemIndication_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe indication TLV 0x14 for NAS ServingSystemIndication struct sNASServingSystemIndication_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe indication TLV 0x15 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for NAS ServingSystemIndication struct sNASServingSystemIndication_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x17 for NAS ServingSystemIndication struct sNASServingSystemIndication_TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe indication TLV 0x18 for NAS ServingSystemIndication struct sNASServingSystemIndication_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe indication TLV 0x19 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChange { INT8 mPLMNChanged; }; // Structure to describe indication TLV 0x1A for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe indication TLV 0x1B for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPDaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x1C for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPUniversalTimeAndZone { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x1D for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe indication TLV 0x1E for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPCellID { UINT32 mCellID; }; // Structure to describe indication TLV 0x1F for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe indication TLV 0x20 for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe indication TLV 0x21 for NAS ServingSystemIndication struct sNASServingSystemIndication_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe indication TLV 0x22 for NAS ServingSystemIndication struct sNASServingSystemIndication_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe indication TLV 0x23 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe indication TLV 0x24 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe indication TLV 0x25 for NAS ServingSystemIndication struct sNASServingSystemIndication_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x26 for NAS ServingSystemIndication struct sNASServingSystemIndication_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x27 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChangeStatus { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x28 for NAS ServingSystemIndication struct sNASServingSystemIndication_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x29 for NAS ServingSystemIndication struct sNASServingSystemIndication_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x2A for NAS ServingSystemIndication struct sNASServingSystemIndication_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe response TLV 0x01 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeIDs { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x11 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_ExtendedHomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASNetworkDescriptionDisplays mDisplayNetworkDescription; eQMINASNetworkDescriptionEncodings mNetworkDescriptionEncoding; UINT8 mNetworkDescriptionLength; // This array must be the size specified by mNetworkDescriptionLength // UINT8 mNetworkDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x11 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_StaticNetworks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetPreferredNetworks() struct sNASSetPreferredNetworksRequest_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x10 for NASGetForbiddenNetworks() struct sNASGetForbiddenNetworksResponse_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetForbiddenNetworks() struct sNASSetForbiddenNetworksRequest_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for NASSetTechnologyPreference() struct sNASSetTechnologyPreferenceRequest_Preference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x01 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_ActivePreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x10 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_PersistentPreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; }; // Structure to describe response TLV 0x01 for NASGetACCOLC() struct sNASGetACCOLCResponse_ACCOLC { UINT8 mACCOLC; }; // Structure to describe request TLV 0x01 for NASSetACCOLC() struct sNASSetACCOLCRequest_ACCOLC { char mSPC[6]; UINT8 mACCOLC; }; // Structure to describe indication TLV 0x01 for NAS GetSystemPreference struct sNASGetSystemPreferenceIndication_Pref { eQMINASSystemPreferences mSystemPreference; }; // Structure to describe response TLV 0x11 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCI { UINT8 mSlotCycleIndex; }; // Structure to describe response TLV 0x12 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCM { UINT8 mStationClassMark; }; // Structure to describe response TLV 0x13 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Registration { INT8 mRegisterOnHomeSystem; INT8 mRegisterOnForeignSystem; INT8 mRegisterOnForeignNetwork; }; // Structure to describe response TLV 0x14 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe response TLV 0x15 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe response TLV 0x16 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x17 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_ForceCDMA1xEVDOSCP { eQMINASForceCDMA1xEVDOSCP mForceCDMA1xEVDOSCP; }; // Structure to describe request TLV 0x10 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x14 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe request TLV 0x15 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe request TLV 0x16 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x01 for NASGetRFInfo() struct sNASGetRFInfoResponse_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x01 for NASGetANAAAAuthenticationStatus() struct sNASGetANAAAAuthenticationStatusResponse_Status { eQMINASANAAAAuthenticationStatus mANAAAAuthenticationStatus; }; // Structure to describe request TLV 0x10 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe request TLV 0x11 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x12 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe request TLV 0x13 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe request TLV 0x14 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe request TLV 0x15 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe request TLV 0x16 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x17 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x18 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ServiceDomain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x19 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_GWAcquisitionOrder { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x1A for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x1B for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x1C for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x1D for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x1E for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe request TLV 0x1F for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe response TLV 0x10 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe response TLV 0x11 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x12 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x13 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe response TLV 0x14 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe response TLV 0x15 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x16 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe response TLV 0x18 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe response TLV 0x19 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe response TLV 0x1A for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1B for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x1C for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x1D for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe indication TLV 0x10 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe indication TLV 0x11 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe indication TLV 0x12 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe indication TLV 0x13 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe indication TLV 0x14 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe indication TLV 0x15 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe indication TLV 0x16 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe indication TLV 0x18 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe indication TLV 0x19 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe indication TLV 0x1A for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x1B for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x1C for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x1D for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe request TLV 0x01 for NASSetDDTMPreference() struct sNASSetDDTMPreferenceRequest_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x01 for NASGetDDTMPreference() struct sNASGetDDTMPreferenceResponse_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe indication TLV 0x01 for NAS DDTMPreferenceIndication struct sNASDDTMPreferenceIndication_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x10 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe response TLV 0x11 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe response TLV 0x12 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe response TLV 0x13 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe response TLV 0x14 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation { sNASGetOperatorNameDataResponse_NITZInformation1 mNASGetOperatorNameDataResponse_NITZInformation1; sNASGetOperatorNameDataResponse_NITZInformation2 mNASGetOperatorNameDataResponse_NITZInformation2; }; // Structure to describe indication TLV 0x10 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x11 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe indication TLV 0x12 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe indication TLV 0x13 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe indication TLV 0x14 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASOperatorNameDataIndication_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASOperatorNameDataIndication_NITZInformation { sNASOperatorNameDataIndication_NITZInformation1 mNASOperatorNameDataIndication_NITZInformation1; sNASOperatorNameDataIndication_NITZInformation2 mNASOperatorNameDataIndication_NITZInformation2; }; // Structure to describe response TLV 0x10 for NASGetCSPPLMNMode() struct sNASGetCSPPLMNModeResponse_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe indication TLV 0x10 for NAS CSPPLMNModeIndication struct sNASCSPPLMNModeIndication_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe request TLV 0x01 for NASUpdateAKEY() struct sNASUpdateAKEYRequest_AKEY { char mAKEY[26]; }; // Structure to describe request TLV 0x01 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_InfoMask { bool mNAMName:1; bool mDirectoryNumber:1; bool mHomeID:1; bool mMINBasedIMSI:1; bool mTrueIMSI:1; bool mCDMAChannel:1; bool mMobileDirectoryNumber:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe response TLV 0x11 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe response TLV 0x12 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe response TLV 0x13 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x14 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x15 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe response TLV 0x16 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe request TLV 0x01 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe request TLV 0x11 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe request TLV 0x12 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x13 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x14 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe request TLV 0x15 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe request TLV 0x16 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe response TLV 0x10 for NASGetMobileCAIRevision() struct sNASGetMobileCAIRevisionResponse_CAIRevision { eQMINASRevision mCAIRevision; }; // Structure to describe response TLV 0x10 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_CurrentRTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x11 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_RTREConfigPreference { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe request TLV 0x01 for NASSetRTREConfig() struct sNASSetRTREConfigRequest_RTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x10 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_GERANInfo { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; UINT32 mTimingAdvance; eQMINASRXLevel mRXLevel; UINT8 mNMRCellCount; struct sNMRCell { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileCountryCode0:4; UINT8 mPLMNMobileCountryCode1:4; UINT8 mPLMNMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileNetworkCode0:4; UINT8 mPLMNMobileNetworkCode1:4; UINT8 mPLMNMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBaseStationIdentityCodeBCC:3; UINT8 mBaseStationIdentityCodeNCC:3; // Padding out 2 bits UINT8 mReserved2:2; eQMINASRXLevel mRXLevel; }; // This array must be the size specified by mNMRCellCount // sNMRCell mNMRCells[1]; }; // Structure to describe response TLV 0x11 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSInfo1 { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; UINT8 mUTRAUMTSMonitoredCellCount; struct sUMTSMonitoredCell { UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; }; // This array must be the size specified by mUTRAUMTSMonitoredCellCount // sUMTSMonitoredCell mUMTSMonitoredCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo2 { UINT8 mGERANNBRCellCount; struct sGERANNBRCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mNetworkColorCode; UINT8 mBaseStationColorCode; INT16 mRSSI; }; // This array must be the size specified by mGERANNBRCellCount // sGERANNBRCell mGERANNBRCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo { sNASGetCellLocationInfoResponse_UMTSInfo1 mNASGetCellLocationInfoResponse_UMTSInfo1; sNASGetCellLocationInfoResponse_UMTSInfo2 mNASGetCellLocationInfoResponse_UMTSInfo2; }; // Structure to describe response TLV 0x12 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_CDMAInfo { UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mReferencePN; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x13 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_IntrafrequencyLTEInfo { INT8 mUEInIdleMode; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mTrackingAreaCode; UINT32 mGlobalCellID; UINT16 mEUTRAAbsoluteRFChannelNumber; UINT16 mServingCellID; UINT8 mCellReselectionPriority; UINT8 mSNonIntraSearchThreshold; UINT8 mServingCellLowThreshold; UINT8 mSIntraSearchThreshold; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // Structure to describe response TLV 0x14 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_InterfrequencyLTEInfo { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mEUTRAAbsoluteRFChannelNumber; UINT8 mCellSelectionRXLevelLowThreshold; UINT8 mCellSelectionRXLevelHighThreshold; UINT8 mCellReselectionPriority; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x15 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringGSM { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; // Bitfield arrays are not possible in c, unrolling the array bool mNCCPermitted0:1; bool mNCCPermitted1:1; bool mNCCPermitted2:1; bool mNCCPermitted3:1; bool mNCCPermitted4:1; bool mNCCPermitted5:1; bool mNCCPermitted6:1; bool mNCCPermitted7:1; UINT8 mCellCount; struct sCell { UINT16 mAbsoluteRFChannelNumber; INT8 mBandIs1900; INT8 mCellIDValid; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x16 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringWCDMA { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; UINT8 mCellCount; struct sCell { UINT16 mPrimaryScramblingCode; INT16 mCPICHRSCP; INT16 mCPICHEcNo; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x17 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSCellID { UINT32 mCellID; }; // Structure to describe request TLV 0x01 for NASGetPLMNName() struct sNASGetPLMNNameRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameRequest_SupressSIMError { INT8 mSIMInitNotChecked; }; // Structure to describe request TLV 0x11 for NASGetPLMNName() struct sNASGetPLMNNameRequest_MNCPCSDigitIncludeStatus { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x12 for NASGetPLMNName() struct sNASGetPLMNNameRequest_AlwaysSendPLMNName { INT8 mAlwaysSendPLMNName; }; // Structure to describe request TLV 0x13 for NASGetPLMNName() struct sNASGetPLMNNameRequest_UseStaticTableOnly { INT8 mUseStaticTableOnly; }; // Structure to describe response TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameResponse_Name1 { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; struct sNASGetPLMNNameResponse_Name2 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetPLMNNameResponse_Name3 { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetPLMNNameResponse_Name { sNASGetPLMNNameResponse_Name1 mNASGetPLMNNameResponse_Name1; sNASGetPLMNNameResponse_Name2 mNASGetPLMNNameResponse_Name2; sNASGetPLMNNameResponse_Name3 mNASGetPLMNNameResponse_Name3; }; // Structure to describe request TLV 0x01 for NASBindSubscription() struct sNASBindSubscriptionRequest_SubscriptionType { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x10 for NAS ManagedRoamingIndication struct sNASManagedRoamingIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x10 for NAS DualStandbyPrefIndication struct sNASDualStandbyPrefIndication_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; eQMINASSubscriptionType mPrioritySubscription; eQMINASSubscriptionType mActiveSubscription; eQMINASSubscriptionType mDefaultDataSubscription; }; // Structure to describe indication TLV 0x10 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_PrioritySubscriptionInfo { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x11 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_ActiveSubscriptionInfo { eQMINASActiveSubscription mActiveSubscription; }; // Structure to describe indication TLV 0x12 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_DefaultDataSubscriptionInfo { INT8 mDefaultDataSubscription; }; // Structure to describe response TLV 0x10 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX0 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX1 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x10 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe request TLV 0x11 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x12 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x01 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_UniversalTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; }; // Structure to describe indication TLV 0x10 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_TimeZone { INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x11 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_DaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x12 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x11 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x12 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x13 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x14 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x15 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe response TLV 0x16 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe response TLV 0x17 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe response TLV 0x18 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x19 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x1A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe response TLV 0x1B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x20 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x21 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe response TLV 0x22 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x23 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x24 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x25 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x26 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe response TLV 0x27 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe response TLV 0x28 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe response TLV 0x29 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe response TLV 0x2A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoiceDomain { eQMINASLTEVoiceDomains mLTEVoiceDomain; }; // Structure to describe response TLV 0x2B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMARegZoneID { UINT16 mCDMARegZoneID; }; // Structure to describe response TLV 0x2C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMRAC { UINT8 mGSMRoutingAreaCode; }; // Structure to describe response TLV 0x2D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMARAC { UINT8 mWCDMARoutingAreaCode; }; // Structure to describe response TLV 0x2E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAResolvedMCC { UINT16 mCDMAMCCResolvedViaSIDLookup; }; // Structure to describe response TLV 0x2F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe response TLV 0x30 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x31 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTERegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x32 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x33 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMRegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x10 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x11 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x12 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x13 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x14 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x15 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe indication TLV 0x16 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe indication TLV 0x17 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe indication TLV 0x18 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x19 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x1A for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe indication TLV 0x1B for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1C for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1D for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1E for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1F for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x20 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x21 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe indication TLV 0x22 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x23 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x24 for NAS SystemInfoIndication struct sNASSystemInfoIndication_NoPLMNChange { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x25 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x26 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x27 for NAS SystemInfoIndication struct sNASSystemInfoIndication_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe indication TLV 0x28 for NAS SystemInfoIndication struct sNASSystemInfoIndication_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe indication TLV 0x29 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe indication TLV 0x2A for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe indication TLV 0x2B for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoiceDomain { eQMINASLTEVoiceDomains mLTEVoiceDomain; }; // Structure to describe indication TLV 0x2C for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMARegZoneID { UINT16 mCDMARegZoneID; }; // Structure to describe indication TLV 0x2D for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMRAC { UINT8 mGSMRoutingAreaCode; }; // Structure to describe indication TLV 0x2E for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMARAC { UINT8 mWCDMARoutingAreaCode; }; // Structure to describe indication TLV 0x2F for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAResolvedMCC { UINT16 mCDMAMCCResolvedViaSIDLookup; }; // Structure to describe indication TLV 0x30 for NAS SystemInfoIndication struct sNASSystemInfoIndication_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe indication TLV 0x31 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x32 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTERegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x33 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x34 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMRegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x10 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x11 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe response TLV 0x12 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe response TLV 0x13 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x14 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe response TLV 0x15 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_ECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_CDMA1xEVDOSINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTESINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_IOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT32 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTEConfig { eQMINASLTESignalRates mLTESignalCheckRate; eQMINASLTESignalRates mLTESignalAveragingRate; }; // Structure to describe request TLV 0x18 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSCPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mRSCPThreshold[1]; }; // Structure to describe indication TLV 0x10 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x11 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe indication TLV 0x12 for NAS SignalInfoIndication struct sNASSignalInfoIndication_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe indication TLV 0x13 for NAS SignalInfoIndication struct sNASSignalInfoIndication_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x14 for NAS SignalInfoIndication struct sNASSignalInfoIndication_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe indication TLV 0x15 for NAS SignalInfoIndication struct sNASSignalInfoIndication_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe response TLV 0x10 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x11 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x12 for NASGetErrorRate() struct sNASGetErrorRateResponse_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x13 for NASGetErrorRate() struct sNASGetErrorRateResponse_WCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x14 for NASGetErrorRate() struct sNASGetErrorRateResponse_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x10 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x11 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x12 for NAS ErrorRateIndication struct sNASErrorRateIndication_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x13 for NAS ErrorRateIndication struct sNASErrorRateIndication_WCDMAFrameErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x14 for NAS ErrorRateIndication struct sNASErrorRateIndication_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x01 for NAS EVDOSessionCloseIndication struct sNASEVDOSessionCloseIndication_Reason { eQMINASEVDOSessionCloseReasons mSessionCloseReason; }; // Structure to describe indication TLV 0x01 for NAS EVDOUATIUpdateIndication struct sNASEVDOUATIUpdateIndication_UATI { UINT8 mUATI[16]; }; // Structure to describe request TLV 0x01 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeRequest_Protocol { UINT32 mEVDOProtocol; }; // Structure to describe response TLV 0x10 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeResponse_Subtype { UINT16 mEVDOProtocolSubtype; }; // Structure to describe response TLV 0x10 for NASGetEVDOColorCode() struct sNASGetEVDOColorCodeResponse_Value { UINT8 mEVDOColorCode; }; // Structure to describe response TLV 0x10 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x11 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA1xEVDO { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x12 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_GSM { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x13 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_UMTS { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x14 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_LTE { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x15 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_TDSCDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe request TLV 0x01 for NASSetRXDiversity() struct sNASSetRXDiversityRequest_Diversity { eQMINASRadioInterfaces mRadioInterface; bool mEnableRXChain0:1; bool mEnableRXChain1:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX0Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x11 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX1Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x12 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_TXInfo { INT8 mInTraffic; INT32 mTXPower; }; // Structure to describe request TLV 0x01 for NASUpdateAKEYExtended() struct sNASUpdateAKEYExtendedRequest_AKEY { char mSPC[6]; char mAKEY[26]; }; // Structure to describe response TLV 0x10 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe response TLV 0x11 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x12 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_ActiveSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x13 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_AbsoluteTime { UINT32 mBlockingIntervalInMilliseconds; }; // Structure to describe request TLV 0x11 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_T3204Multiplier { UINT32 mBlockingIntervalAsT3204Multiplier; }; // Structure to describe request TLV 0x01 for NASUnblockLTEPLMN() struct sNASUnblockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x10 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x11 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_SPN { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x12 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_ShortName { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; // Structure to describe indication TLV 0x13 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_LongName { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; // Structure to describe request TLV 0x01 for NASConfigureEMBMS() struct sNASConfigureEMBMSRequest_Config { INT8 mEMBMSEnabled; }; // Structure to describe response TLV 0x10 for NASGetEMBMSStatus() struct sNASGetEMBMSStatusResponse_Status { INT8 mEMBMSEnabled; }; // Structure to describe indication TLV 0x01 for NAS EMBMSStatusIndication struct sNASEMBMSStatusIndication_Status { INT8 mEMBMSEnabled; }; // Structure to describe response TLV 0x10 for NASGetCDMAPositionInfo() struct sNASGetCDMAPositionInfoResponse_Info { INT8 mUEInIdleMode; UINT8 mBaseStationCount; struct sBaseStation { eQMINASCDMAPilotTypes mPilotType; UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mPilotPN; UINT16 mPilotStrength; INT32 mLatitude; INT32 mLongitude; UINT64 mGPSTimeInMilliseconds; }; // This array must be the size specified by mBaseStationCount // sBaseStation mBaseStations[1]; }; // Structure to describe indication TLV 0x01 for NAS RFBandInfoIndication struct sNASRFBandInfoIndication_BandInfo { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // Structure to describe indication TLV 0x01 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x03 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RejectCause { UINT8 mRejectCause; }; // Structure to describe response TLV 0x10 for NASGetManagedRoamingConfig() struct sNASGetManagedRoamingConfigResponse_Config { INT8 mManagedRoamingSupported; }; // Structure to describe indication TLV 0x10 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_CurrentConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe indication TLV 0x11 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_ConfigPreference { eQMINASRTREConfiguration mRTREPreference; }; // Structure to describe response TLV 0x10 for NASGetCentralizedEONSSupport() struct sNASGetCentralizedEONSSupportResponse_Status { INT8 mCentralizedEONSSupported; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMARSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMARSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMAECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMAECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRRSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRRSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x18 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRSINRThresholdList { UINT8 mSINRThresholdCount; // This array must be the size specified by mSINRThresholdCount // eQMINASSINRLevels mSINRThreshold[1]; }; // Structure to describe request TLV 0x19 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRSINRDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1A for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRIOThreshold { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1B for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1C for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_GSMRSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1D for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_GSMRSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1E for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMARSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1F for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMARSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x20 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMAECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x21 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMAECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x22 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x23 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x24 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESNRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x25 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESNRDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x26 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x27 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRQDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x28 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x29 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRPDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x2A for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESignalReportConfig { eQMINASReportRate mReportRate; eQMINASAveragePeriod mAveragePeriod; }; // Structure to describe request TLV 0x2B for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSCPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x2C for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSCPDelta { UINT16 mDelta; }; // Structure to describe response TLV 0x10 for NASGetTDSCDMACellInfo() struct sNASGetTDSCDMACellInfoResponse_CellInfo { // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; INT8 mMNCIncludesPCSDigit; UINT16 mLocationAreaCode; UINT16 mAbsoluteRFChannelNumber; UINT32 mCellID; UINT8 mCellParameterID; UINT8 mPathLossdB; float mTimingAdvanceSeconds; float mRSCPdBm; }; // Structure to describe response TLV 0x11 for NASGetTDSCDMACellInfo() struct sNASGetTDSCDMACellInfoResponse_NeighborCellInfo { UINT8 mNeighborCellCount; struct sNeighborCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mCellParameterID; float mRSCPdBm; }; // This array must be the size specified by mNeighborCellCount // sNeighborCell mNeighborCells[1]; }; // Structure to describe request TLV 0x10 for WMSSetEventReport() struct sWMSSetEventReportRequest_NewMTMessageIndicator { INT8 mReportNewMTMessages; }; // Structure to describe indication TLV 0x10 for WMS EventReport struct sWMSEventReportIndication_ReceivedMTMessage { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe indication TLV 0x11 for WMS EventReport struct sWMSEventReportIndication_TransferRouteMTMessage { INT8 mACKRequired; UINT32 mTransactionID; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x12 for WMS EventReport struct sWMSEventReportIndication_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x13 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSMessage { eQMIWMSNotificationType mNotificationType; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x14 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSPLMNInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe indication TLV 0x15 for WMS EventReport struct sWMSEventReportIndication_ReceivedSMSCAddress { UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe indication TLV 0x16 for WMS EventReport struct sWMSEventReportIndication_SMSOnIMS { INT8 mMessageReceivedFromIMS; }; // Structure to describe request TLV 0x01 for WMSRawSend() struct sWMSRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSRawSend() struct sWMSRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSRawSend() struct sWMSRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSRawSend() struct sWMSRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSRawSend() struct sWMSRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSRawSend() struct sWMSRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSRawSend() struct sWMSRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe response TLV 0x01 for WMSRawSend() struct sWMSRawSendResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x10 for WMSRawSend() struct sWMSRawSendResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x11 for WMSRawSend() struct sWMSRawSendResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x12 for WMSRawSend() struct sWMSRawSendResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x13 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x14 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe response TLV 0x15 for WMSRawSend() struct sWMSRawSendResponse_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe request TLV 0x01 for WMSRawWrite() struct sWMSRawWriteRequest_MessageData { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe response TLV 0x01 for WMSRawWrite() struct sWMSRawWriteResponse_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x01 for WMSRawRead() struct sWMSRawReadRequest_MessageIndex { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe request TLV 0x10 for WMSRawRead() struct sWMSRawReadRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x11 for WMSRawRead() struct sWMSRawReadRequest_SMSOnIMS { INT8 mMessageToBeReadFromIMS; }; // Structure to describe response TLV 0x01 for WMSRawRead() struct sWMSRawReadResponse_MessageData { eQMIWMSMessageTags mMessageTag; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x01 for WMSModifyTag() struct sWMSModifyTagRequest_MessageTag { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x10 for WMSModifyTag() struct sWMSModifyTagRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSDelete() struct sWMSDeleteRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSDelete() struct sWMSDeleteRequest_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x11 for WMSDelete() struct sWMSDeleteRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x12 for WMSDelete() struct sWMSDeleteRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetMessageProtocol() struct sWMSGetMessageProtocolResponse_MessageProtocol { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSListMessages() struct sWMSListMessagesRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSListMessages() struct sWMSListMessagesRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x11 for WMSListMessages() struct sWMSListMessagesRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSListMessages() struct sWMSListMessagesResponse_MessageList { UINT32 mNumberOfMessages; struct sMessage { UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // This array must be the size specified by mNumberOfMessages // sMessage mMessages[1]; }; // Structure to describe request TLV 0x01 for WMSSetRoutes() struct sWMSSetRoutesRequest_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSReceiptActions mReceiptAction; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe request TLV 0x10 for WMSSetRoutes() struct sWMSSetRoutesRequest_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetRoutes() struct sWMSGetRoutesResponse_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSRouteValues mRouteValue; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe response TLV 0x10 for WMSGetRoutes() struct sWMSGetRoutesResponse_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetSMSCAddress() struct sWMSGetSMSCAddressResponse_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x01 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_Address { // String is variable length, but must be size of the container // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_AddressType { // String is variable length, but must be size of the container // char mSMSCAddressType[1]; }; // Structure to describe request TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_MaxSize { UINT32 mMaxStorageSizeInMessages; }; // Structure to describe response TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_AvailableSize { UINT32 mFreeStorageSizeInMessages; }; // Structure to describe request TLV 0x01 for WMSSendACK() struct sWMSSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSSendACK() struct sWMSSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSSendACK() struct sWMSSendACKRequest_3GPPFailureInfo { UINT8 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSSendACK() struct sWMSSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendACK() struct sWMSSendACKResponse_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe request TLV 0x01 for WMSSetRetryPeriod() struct sWMSSetRetryPeriodRequest_Period { UINT32 mRetryPeriodInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetRetryInterval() struct sWMSSetRetryIntervalRequest_Interval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetDCDisconnectTimer() struct sWMSSetDCDisconnectTimerRequest_Timer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetMemoryStatus() struct sWMSSetMemoryStatusRequest_Status { INT8 mMemoryIsAvailable; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastActivation() struct sWMSSetBroadcastActivationRequest_BCInfo { eQMIWMSMessageProtocols mMode; INT8 mActivateBroadcast; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPPInfo { UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x11 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPP2Info { UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x10 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x01 for WMS MemoryFullIndication struct sWMSMemoryFullIndication_Info { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetDomainPreference() struct sWMSGetDomainPreferenceResponse_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSetDomainPreference() struct sWMSSetDomainPreferenceRequest_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x11 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x12 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x13 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x14 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x01 for WMSGetWaitingMessage() struct sWMSGetWaitingMessageResponse_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe indication TLV 0x01 for WMS WaitingMessageIndication struct sWMSWaitingMessageIndication_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe request TLV 0x01 for WMSSetPrimaryClient() struct sWMSSetPrimaryClientRequest_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe indication TLV 0x01 for WMS SMSCAddressIndication struct sWMSSMSCAddressIndication_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe request TLV 0x11 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe request TLV 0x12 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe request TLV 0x13 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe request TLV 0x14 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe response TLV 0x10 for WMSGetTransportInfoLayer() struct sWMSGetTransportInfoLayerResponse_TransportLayerRegistrationInfo { INT8 mRegistered; }; // Structure to describe response TLV 0x11 for WMSGetTransportLayerInfo() struct sWMSGetTransportLayerInfoResponse_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe indication TLV 0x01 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerRegInfo { INT8 mRegistered; }; // Structure to describe indication TLV 0x10 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe response TLV 0x10 for WMSGetNetworkRegistrationInfo() struct sWMSGetNetworkRegistrationInfoResponse_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe indication TLV 0x01 for WMS NetworkRegistrationInfoIndication struct sWMSNetworkRegistrationInfoIndication_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe request TLV 0x01 for WMSBindSubscription() struct sWMSBindSubscriptionRequest_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x10 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe response TLV 0x11 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe response TLV 0x12 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe response TLV 0x13 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x14 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe request TLV 0x01 for WMSGetSMSParameters() struct sWMSGetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe response TLV 0x10 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe response TLV 0x11 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe response TLV 0x12 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe response TLV 0x13 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe request TLV 0x01 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe request TLV 0x10 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe request TLV 0x11 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe request TLV 0x12 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe request TLV 0x13 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe indication TLV 0x01 for WMS CallStatusIndication struct sWMSCallStatusIndication_SMSCallStatusInfo { eQMIWMSSMSCallStatus mSMSCallStatus; }; // Structure to describe response TLV 0x10 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEOutcome { UINT16 mLTEDomainPreferenceOutcome; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWOutcome { UINT16 mGWDomainPreferenceOutcome; }; // Structure to describe response TLV 0x10 for WMSGetRetryPeriod() struct sWMSGetRetryPeriodResponse_RetryPeriod { UINT32 mRetryPeriodInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetRetryInterval() struct sWMSGetRetryIntervalResponse_RetryInterval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetDCDisconnectTimer() struct sWMSGetDCDisconnectTimerResponse_DCDisconnectTimer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetMemoryStatus() struct sWMSGetMemoryStatusResponse_MemoryStatus { INT8 mMemoryIsAvailable; }; // Structure to describe response TLV 0x10 for WMSGetPrimaryClient() struct sWMSGetPrimaryClientResponse_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe response TLV 0x10 for WMSGetSubscriptionBinding() struct sWMSGetSubscriptionBindingResponse_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe request TLV 0x16 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseCode { UINT16 mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSAysncSendACK() struct sWMSAysncSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_3GPPFailureInfo { UINT8 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe request TLV 0x13 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x11 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseCode { UINT16 mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_UserData { UINT32 mUserData; }; // Structure to describe response TLV 0x10 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x11 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS ServiceReadyStatusIndication struct sWMSServiceReadyStatusIndication_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x10 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x10 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEAIndicator { INT8 mReportNMEASentences; }; // Structure to describe request TLV 0x11 for PDSSetEventReport() struct sPDSSetEventReportRequest_ModeIndicator { INT8 mReportNMEASentencesPlusMode; }; // Structure to describe request TLV 0x12 for PDSSetEventReport() struct sPDSSetEventReportRequest_RawIndicator { INT8 mReportRawPositionData; }; // Structure to describe request TLV 0x13 for PDSSetEventReport() struct sPDSSetEventReportRequest_XTRARequestIndicator { INT8 mReportExternalXTRADataRequests; }; // Structure to describe request TLV 0x14 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeInjectionIndicator { INT8 mReportExternalTimeInjections; }; // Structure to describe request TLV 0x15 for PDSSetEventReport() struct sPDSSetEventReportRequest_WiFiIndicator { INT8 mReportExternalWiFiRequests; }; // Structure to describe request TLV 0x16 for PDSSetEventReport() struct sPDSSetEventReportRequest_SatelliteIndicator { INT8 mReportSatelliteInfo; }; // Structure to describe request TLV 0x17 for PDSSetEventReport() struct sPDSSetEventReportRequest_VXNetworkIndicator { INT8 mReportVXNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x18 for PDSSetEventReport() struct sPDSSetEventReportRequest_SUPLNetworkIndicator { INT8 mReportSUPLNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x19 for PDSSetEventReport() struct sPDSSetEventReportRequest_UMTSCPNetworkIndicator { INT8 mReportUMTSCPNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x1A for PDSSetEventReport() struct sPDSSetEventReportRequest_PDSCommIndicator { INT8 mReportPDSCommEvents; }; // Structure to describe request TLV 0x1B for PDSSetEventReport() struct sPDSSetEventReportRequest_AccelerometerDataIndicator { INT8 mReportAccelerometerDataStatus; }; // Structure to describe request TLV 0x1C for PDSSetEventReport() struct sPDSSetEventReportRequest_GyroDataIndicator { INT8 mReportGyroDataStatus; }; // Structure to describe request TLV 0x1D for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSyncIndication { INT8 mReportTimeSyncRequest; }; // Structure to describe request TLV 0x1E for PDSSetEventReport() struct sPDSSetEventReportRequest_PositionReliablilityIndicator { INT8 mReportPositionReliability; }; // Structure to describe request TLV 0x1F for PDSSetEventReport() struct sPDSSetEventReportRequest_SensorDataUsageIndicator { INT8 mReportSensorDataUsage; }; // Structure to describe request TLV 0x20 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSourceInformationIndicator { INT8 mReportTimeSourceInformation; }; // Structure to describe request TLV 0x21 for PDSSetEventReport() struct sPDSSetEventReportRequest_HeadingUncertaintyIndicator { INT8 mReportHeadingUncertaintyInformation; }; // Structure to describe request TLV 0x22 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEADebugStringIndicator { INT8 mReportNMEADebugStrings; }; // Structure to describe request TLV 0x23 for PDSSetEventReport() struct sPDSSetEventReportRequest_ExternalXTRADataIndicator { INT8 mReportExtendedXTRAData; }; // Structure to describe request TLV 0x24 for PDSSetEventReport() struct sPDSSetEventReportRequest_ServiceResetStatus { INT8 mReportServiceResetStatus; }; // Structure to describe indication TLV 0x10 for PDS EventReport struct sPDSEventReportIndication_NMEASentence { // String is variable length, but must be size of the container // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x11 for PDS EventReport struct sPDSEventReportIndication_NMEASentencePlusMode { eQMIPDSNMEASentenceOperatingModes mNMEASentenceOperatingMode; UINT16 mNMEASentenceLength; // This array must be the size specified by mNMEASentenceLength // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x12 for PDS EventReport struct sPDSEventReportIndication_PositionSessionStatus { eQMIPDSSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x13 for PDS EventReport struct sPDSEventReportIndication_ParsedPositionData { bool mTimestampCalendarValid:1; bool mTimestampUTCValid:1; bool mLeapSecondsValid:1; bool mTimeUncertaintyValid:1; bool mLatitudeValid:1; bool mLongitudeValid:1; bool mEllipsoidAltitudeValid:1; bool mMeanSeaLevelAltitudeValid:1; bool mHorizontalSpeedValid:1; bool mVerticalSpeedValid:1; bool mHeadingValid:1; bool mHorizontalUncertaintyCircularValid:1; bool mHorizontalUncertaintyEllipseSemiMajorValid:1; bool mHorizontalUncertaintyEllipseSemiMinorValid:1; bool mHorizontalUncertaintyEllipseOrientAzimuthValid:1; bool mVerticalUncertaintyValid:1; bool mHorizontalVelocityUncertaintyValid:1; bool mVerticalVelocityUncertaintyValid:1; bool mHorizontalConfidenceValid:1; bool mPositionDOPValid:1; bool mHorizontalDOPValid:1; bool mVerticalDOPValid:1; bool mOperatingModeUsedValid:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; UINT16 mCalendarYear; eQMIPDSCalendarMonths mCalendarMonth; eQMIPDSCalendarDays mCalendarDay; UINT8 mCalendarDayOfMonth; UINT8 mCalendarHour; UINT8 mCalendarMinute; UINT8 mCalendarSecond; UINT16 mCalendarMillisecond; UINT8 mCalendarLeapSeconds; UINT64 mUTCTimestamp; UINT32 mUTCTimestampUncertainty; double mLatitude; double mLongitude; float mEllipsoidAltitude; float mMeanSeaLevelAltitude; float mHorizontalSpeed; float mVerticalSpeed; float mHeading; float mHorizontalUncertaintyCircular; float mHorizontalUncertaintyEllipseSemiMajor; float mHorizontalUncertaintyEllipseSemiMinor; float mHorizontalUncertaintyEllipseOrientAzimuth; float mVerticalUncertainty; float mHorizontalVelocityUncertainty; float mVerticalVelocityUncertainty; UINT8 mHorizontalConfidence; float mPositionDOP; float mHorizontalDOP; float mVerticalDOP; eQMIPDSNMEASentenceOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x14 for PDS EventReport struct sPDSEventReportIndication_ExternalXTRARequest { UINT16 mMaximumFileSize; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x15 for PDS EventReport struct sPDSEventReportIndication_ExternalTimeInjectionRequest { UINT32 mDelayThresholdMilliseconds; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x16 for PDS EventReport struct sPDSEventReportIndication_ExternalWiFiPositionRequest { eQMIPDSWiFiRequestTypes mWiFiRequestType; UINT16 mWiFiRequestTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x17 for PDS EventReport struct sPDSEventReportIndication_SatelliteInfo { bool mIonoValid:1; bool mSatelliteCountValid:1; bool mSatelliteListValid:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; INT8 mIonosphericCorrections; UINT8 mSVRecordCount; struct sSV { bool mSystemValid:1; bool mPRNValid:1; bool mHealthStatusValid:1; bool mProcessStatusValid:1; bool mEphemerisStateValid:1; bool mAlmanacStateValid:1; bool mElevationValid:1; bool mAzimuthValid:1; bool mCN0Valid:1; // Padding out 23 bits UINT8 mReserved3:7; UINT8 mReserved4[2]; eQMIPDSSVSystems mSystem; UINT8 mPRN; eQMIPDSSVHealthStatus mHealthLevel; eQMIPDSSVProcessingStatus mProcessingStatus; eQMIPDSSVEphemerisStatus mEphemerisState; eQMIPDSSVAlmanacStatus mAlmanacState; INT32 mElevation; UINT16 mAzimuth; UINT16 mCN0; }; // This array must be the size specified by mSVRecordCount // sSV mSVs[1]; }; // Structure to describe indication TLV 0x18 for PDS EventReport struct sPDSEventReportIndication_VXNetworkInitiatedPrompt { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe indication TLV 0x19 for PDS EventReport struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt { sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt1; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt2; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt3; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt4; }; // Structure to describe indication TLV 0x1A for PDS EventReport struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 { UINT8 mServiceTypeID; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt { sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5; }; // Structure to describe indication TLV 0x1B for PDS EventReport struct sPDSEventReportIndication_CommEvents { eQMIPDSCommEventTypes mType; eQMIPDSCommEventProtocols mProtocolDataType; }; // Structure to describe indication TLV 0x1C for PDS EventReport struct sPDSEventReportIndication_PositionSource { bool mGPS:1; bool mCellID:1; bool mGlonass:1; bool mNetwork:1; bool mEPI:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x1D for PDS EventReport struct sPDSEventReportIndication_AccelerometerStreamingStatus { eQMIPDSStreamingStatus mAccelerometerStreamingStatus; }; // Structure to describe indication TLV 0x1E for PDS EventReport struct sPDSEventReportIndication_GyroStreamingStatus { eQMIPDSStreamingStatus mGyroStreamingStatus; }; // Structure to describe indication TLV 0x1F for PDS EventReport struct sPDSEventReportIndication_TimeSyncRequest { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x20 for PDS EventReport struct sPDSEventReportIndication_PositionReliabilityCounter { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe indication TLV 0x21 for PDS EventReport struct sPDSEventReportIndication_SensorDataUsage { bool mAccelerometer:1; bool mGyro:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; bool mHeadingAidedWithSensorData:1; bool mSpeedAidedWithSensorData:1; bool mPositionAidedWithSensorData:1; bool mVelocityAidedWithSensorData:1; // Padding out 12 bits UINT8 mReserved3:4; UINT8 mReserved4; }; // Structure to describe indication TLV 0x22 for PDS EventReport struct sPDSEventReportIndication_TimeSourceInformation { INT8 mTimeValid; eQMIPDSTimeSource mTimeSource; UINT32 mTimeUncertaintyMilliseconds; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT32 mReserved1; UINT32 mReserved2; UINT32 mReserved3; UINT32 mReserved4; UINT32 mReserved5; }; // Structure to describe indication TLV 0x23 for PDS EventReport struct sPDSEventReportIndication_EncryptedPositionInformation { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe indication TLV 0x24 for PDS EventReport struct sPDSEventReportIndication_HeadingUncertaintyInformation { float mHeadingUncertainty; float mGNSSHeadingUncertainty; UINT32 mReserved1; UINT32 mReserved2; }; // Structure to describe indication TLV 0x25 for PDS EventReport struct sPDSEventReportIndication_ProprietaryNMEADebugSentences { // String is variable length, but must be size of the container // char mNMEADebug[1]; }; // Structure to describe indication TLV 0x26 for PDS EventReport struct sPDSEventReportIndication_ExtendedExternalXTRADatabaseRequest { UINT32 mMaximumFileSize; UINT8 mURLCount; UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe indication TLV 0x27 for PDS EventReport struct sPDSEventReportIndication_ServiceResetStatus { eQMIPDSResetStates mServiceResetStatus; }; // Structure to describe response TLV 0x01 for PDSGetServiceState() struct sPDSGetServiceStateResponse_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe indication TLV 0x01 for PDS ServiceStateIndication struct sPDSServiceStateIndication_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe request TLV 0x01 for PDSSetServiceState() struct sPDSSetServiceStateRequest_State { INT8 mServiceEnabled; }; // Structure to describe request TLV 0x01 for PDSStartTrackingSession() struct sPDSStartTrackingSessionRequest_Session { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetTrackingSessionInfo() struct sPDSGetTrackingSessionInfoResponse_Info { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe response TLV 0x10 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe request TLV 0x10 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSInjectTimeReference() struct sPDSInjectTimeReferenceRequest_Time { UINT64 mSystemTimeMilliseconds; UINT16 mSystemDiscontinuties; }; // Structure to describe response TLV 0x01 for PDSGetDefaults() struct sPDSGetDefaultsResponse_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe request TLV 0x01 for PDSSetDefaults() struct sPDSSetDefaultsRequest_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x10 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe response TLV 0x11 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe response TLV 0x12 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe response TLV 0x13 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Validity { UINT16 mValidPeriodGPSStartWeek; UINT16 mValidPeriodGPSStartWeekOffsetInMinutes; UINT16 mValidPeriodDurationInHours; }; // Structure to describe response TLV 0x14 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x10 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe request TLV 0x11 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe request TLV 0x12 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe request TLV 0x14 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x12 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x10 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerAddress { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe response TLV 0x11 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x10 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_Server { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe request TLV 0x11 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x12 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x01 for PDSGetServiceAutoTrackingState() struct sPDSGetServiceAutoTrackingStateResponse_State { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetServiceAutoTrackingState() struct sPDSSetServiceAutoTrackingStateRequest_State { INT8 mAutoTrackingEnabled; }; // Structure to describe response TLV 0x01 for PDSGetCOMPortAutoTrackingConfig() struct sPDSGetCOMPortAutoTrackingConfigResponse_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetCOMPortAutoTrackingConfig() struct sPDSSetCOMPortAutoTrackingConfigRequest_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x10 for PDSResetPDSData() struct sPDSResetPDSDataRequest_GPSData { bool mResetEPH:1; bool mResetALM:1; bool mResetPOS:1; bool mResetTIME:1; bool mResetIONO:1; bool mResetUTC:1; bool mResetHEALTH:1; bool mResetSVDIR:1; bool mResetSVSTEER:1; bool mResetSADATA:1; bool mResetRTI:1; bool mResetALMCORR:1; bool mResetFREQBIASEST:1; // Padding out 19 bits UINT8 mReserved1:3; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x11 for PDSResetPDSData() struct sPDSResetPDSDataRequest_CellData { bool mResetPOS:1; bool mResetLATESTGPSPOS:1; bool mResetOTAPOS:1; bool mResetEXTREFPOS:1; bool mResetTIMETAG:1; bool mResetCELLID:1; bool mResetCACHEDCELLID:1; bool mResetLASTSRVCELL:1; bool mResetCURSRVCELL:1; bool mResetNEIGHBORINFO:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x10 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Mode { eQMIPDSOperationTypes mSessionOperation; }; // Structure to describe request TLV 0x11 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Timeout { UINT8 mTimeoutSeconds; }; // Structure to describe request TLV 0x12 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Accuracy { UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetServiceVersion() struct sPDSGetServiceVersionResponse_Version { UINT8 mServiceMajorVersion; UINT8 mServiceMinorVersion; }; // Structure to describe request TLV 0x01 for PDSInjectXTRAData() struct sPDSInjectXTRADataRequest_Data { UINT8 mSequenceNumber; UINT16 mTotalLength; UINT16 mSequenceLength; // This array must be the size specified by mSequenceLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Timestamp { UINT64 mUTCTimestamp; }; // Structure to describe request TLV 0x11 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Latitude { double mLatitude; }; // Structure to describe request TLV 0x12 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Longitude { double mLongitude; }; // Structure to describe request TLV 0x13 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeEllipsoid { float mEllipsoidAltitude; }; // Structure to describe request TLV 0x14 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeSeaLevel { float mMeanSeaLevelAltitude; }; // Structure to describe request TLV 0x15 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalUncertainty { float mHorizontalUncertaintyCircular; }; // Structure to describe request TLV 0x16 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalUncertainty { float mVerticalUncertainty; }; // Structure to describe request TLV 0x17 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalConfidence { UINT8 mHorizontalConfidence; }; // Structure to describe request TLV 0x18 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalConfidence { UINT8 mVerticalConfidence; }; // Structure to describe request TLV 0x19 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Source { eQMIPDSInjectedPositionSources mSource; }; // Structure to describe request TLV 0x1A for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_TimeType { eQMIPDSTimeType mTimeType; }; // Structure to describe request TLV 0x1B for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe request TLV 0x1C for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeInformation { eQMIPDSAltitudeSource mAltitudeSource; eQMIPDSSourceLinkage mSourceLinkage; eQMIPDSUncertaintyCoverage mUncertaintyCoverage; }; // Structure to describe request TLV 0x10 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Time { UINT32 mWiFiTimeCounterMilliseconds; }; // Structure to describe request TLV 0x11 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Position { INT32 mWiFiLatitude; INT32 mWiFiLongitude; UINT16 mHEPEInMeters; UINT8 mAPCount; UINT8 mErrorCode; }; // Structure to describe request TLV 0x12 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_APInfo { UINT8 mAPCount; struct sAP { UINT8 mMACAddress[6]; UINT32 mRSSI; UINT16 mBeaconChannel; bool mUsedForPosition:1; bool mHiddenSSID:1; bool mEncryptionOn:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mAPCount // sAP mAPs[1]; }; // Structure to describe request TLV 0x13 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; }; // Structure to describe response TLV 0x10 for PDSGetSBASConfig() struct sPDSGetSBASConfigResponse_Config { eQMIPDSSBASStates mState; }; // Structure to describe request TLV 0x10 for PDSSetSBASConfig() struct sPDSSetSBASConfigRequest_Config { INT8 mEnableSBAS; }; // Structure to describe request TLV 0x01 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_Action { INT8 mAllowRequest; }; // Structure to describe request TLV 0x10 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_VX { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe request TLV 0x11 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_SUPL1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL { sPDSSendNetworkInitiatedResponseRequest_SUPL1 mPDSSendNetworkInitiatedResponseRequest_SUPL1; sPDSSendNetworkInitiatedResponseRequest_SUPL2 mPDSSendNetworkInitiatedResponseRequest_SUPL2; sPDSSendNetworkInitiatedResponseRequest_SUPL3 mPDSSendNetworkInitiatedResponseRequest_SUPL3; sPDSSendNetworkInitiatedResponseRequest_SUPL4 mPDSSendNetworkInitiatedResponseRequest_SUPL4; }; // Structure to describe request TLV 0x12 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 { UINT8 mServiceTypeID; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP { sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 mPDSSendNetworkInitiatedResponseRequest_UMTSCP1; sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 mPDSSendNetworkInitiatedResponseRequest_UMTSCP2; sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 mPDSSendNetworkInitiatedResponseRequest_UMTSCP3; sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 mPDSSendNetworkInitiatedResponseRequest_UMTSCP4; sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 mPDSSendNetworkInitiatedResponseRequest_UMTSCP5; }; // Structure to describe request TLV 0x01 for PDSInjectAbsoluteTime() struct sPDSInjectAbsoluteTimeRequest_Time { UINT64 mTimestampMilliseconds; UINT32 mTimeUncertaintyMilliseconds; eQMIPDSTimeBases mTimeBase; INT8 mForceAcceptance; }; // Structure to describe request TLV 0x01 for PDSInjectEFSData() struct sPDSInjectEFSDataRequest_DateFile1 { UINT8 mFilenameLength; // This array must be the size specified by mFilenameLength // char mFilename[1]; }; struct sPDSInjectEFSDataRequest_DateFile2 { eQMIPDSEFSFileOperations mFileOperation; UINT32 mDataLength; UINT8 mPartNumber; UINT8 mTotalParts; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; struct sPDSInjectEFSDataRequest_DateFile { sPDSInjectEFSDataRequest_DateFile1 mPDSInjectEFSDataRequest_DateFile1; sPDSInjectEFSDataRequest_DateFile2 mPDSInjectEFSDataRequest_DateFile2; }; // Structure to describe response TLV 0x10 for PDSGetDPOConfig() struct sPDSGetDPOConfigResponse_Config { INT8 mDataPowerOptimizationEnabled; }; // Structure to describe request TLV 0x10 for PDSSetDPOConfig() struct sPDSSetDPOConfigRequest_Config { eQMIPDSConfig mConfiguration; }; // Structure to describe response TLV 0x10 for PDSGetODPConfig() struct sPDSGetODPConfigResponse_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe request TLV 0x10 for PDSSetODPConfig() struct sPDSSetODPConfigRequest_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe response TLV 0x10 for PDSGetGPSState() struct sPDSGetGPSStateResponse_State { INT8 mEngineEnabled; bool mPositionValid:1; bool mAltitudeVerticalUncertaintyValid:1; bool mTimeMillisecondsValid:1; bool mTimeWeekNumberValid:1; bool mTimeUncertaintyValid:1; bool mIonoValid:1; bool mGPSEphemerisValid:1; bool mGPSAlmanacValid:1; bool mGPSHealthValid:1; bool mGPSVisibleSVsValid:1; bool mGlonassEphemerisValid:1; bool mGlonassAlmanacValid:1; bool mGlonassHealthValid:1; bool mGlonassVisibleSVsValid:1; bool mSBASEphemerisValid:1; bool mSBASAlmanacValid:1; bool mSBASHealthValid:1; bool mSBASVisibleSVsValid:1; bool mXTRAInformationValid:1; // Padding out 5 bits UINT8 mReserved1:5; double mLatitude; double mLongitude; float mHorizontalUncertaintyCircular; float mEllipsoidAltitude; float mVerticalUncertainty; UINT32 mTimestampInTOWMilliseconds; UINT16 mGPSWeekNumber; UINT32 mTimeUncertaintyMilliseconds; INT8 mIonoIsValid; UINT32 mGPSEphemerisSVMask; UINT32 mGPSAlmanacSVMask; UINT32 mGPSHealthSVMask; UINT32 mGPSVisibleSVMask; UINT32 mGlonassEphemerisSVMask; UINT32 mGlonassAlmanacSVMask; UINT32 mGlonassHealthSVMask; UINT32 mGlonassVisibleSVMask; UINT32 mSBASEphemerisSVMask; UINT32 mSBASAlmanacSVMask; UINT32 mSBASHealthSVMask; UINT32 mSBASVisibleSVMask; UINT16 mXTRAGPSStartWeek; UINT16 mXTRAGPSStartMinutes; INT32 mElevation; }; // Structure to describe request TLV 0x01 for PDSSetPPMEventReport() struct sPDSSetPPMEventReportRequest_ReportPPMEvents { INT8 mReportPPMEvents; }; // Structure to describe request TLV 0x01 for PDSSetSPIStreamingReport() struct sPDSSetSPIStreamingReportRequest_ReportEvents { INT8 mReportSPIEvents; }; // Structure to describe indication TLV 0x10 for PDS SetSPIStreamingReportIndication struct sPDSSetSPIStreamingReportIndication_SPIStreamingRequest { INT8 mStreamSPIStatus; }; // Structure to describe request TLV 0x01 for PDSSetSPIStatus() struct sPDSSetSPIStatusRequest_Status { eQMIPDSSPIState mSPIState; UINT8 mSPIConfidence; }; // Structure to describe request TLV 0x01 for PDSSetPPMReportingState() struct sPDSSetPPMReportingStateRequest_PPMReportingState { eQMIPDSReportingState mReportingState; UINT16 mReportingPeriodSeconds; }; // Structure to describe indication TLV 0x10 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMPageReport { UINT32 mPageTimeMilliseconds; UINT16 mPagePNOffset; UINT8 mPageBandClass; UINT16 mPageCDMAFrequency; UINT16 mPageBaseID; UINT16 mPageSystemID; UINT16 mPageNetworkID; }; // Structure to describe indication TLV 0x11 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMMeasurementReport { UINT32 mReferenceTimeMilliseconds; UINT8 mReferenceBandClass; UINT16 mReferenceCDMAFrequency; UINT8 mReferenceTotalRXPower; UINT16 mReferencePNOffset; UINT8 mReferenceStrength; UINT8 mReferenceRMSErrorPhase; UINT8 mNumberOfPilots; struct sPilot { UINT16 mPilotPNOffset; UINT8 mPilotStrength; UINT8 mPilotRMSErrorPhase; INT16 mPilotPhase; }; // This array must be the size specified by mNumberOfPilots // sPilot mPilots[1]; }; // Structure to describe indication TLV 0x12 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMSuspendReason { eQMIPDSSuspendReason mSuspendReason; }; // Structure to describe indication TLV 0x13 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMStopReason { eQMIPDSStopReason mStopReason; }; // Structure to describe request TLV 0x01 for PDSForceReceiverOff() struct sPDSForceReceiverOffRequest_ForceReceiverOff { eQMIPDSForceReceiverOff mForceReceiverOff; }; // Structure to describe response TLV 0x10 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x11 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x12 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x11 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x12 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisAccelerometerData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe request TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisGyroData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe response TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_AccelerometerSampleSetCount { UINT8 mAccelerometerSampleSetCount; }; // Structure to describe response TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_GyroSampleSetCount { UINT8 mGyroSampleSetCount; }; // Structure to describe request TLV 0x01 for PDSInjectTimeSyncData() struct sPDSInjectTimeSyncDataRequest_TimeTag { UINT32 mReferenceCounter; UINT32 mSensorProcessorRXTimeMilliseconds; UINT32 mSensorProcessorTXTimeMilliseconds; }; // Structure to describe response TLV 0x10 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe response TLV 0x11 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_ExternalPowerSupplyState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe request TLV 0x10 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe request TLV 0x11 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_ExternalPowerState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe response TLV 0x10 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe response TLV 0x11 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe response TLV 0x12 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VirtualGyroGravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe response TLV 0x13 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe response TLV 0x14 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe response TLV 0x15 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x16 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x17 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x18 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x19 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x1A for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x1B for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe response TLV 0x1C for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe response TLV 0x1D for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe request TLV 0x10 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe request TLV 0x11 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe request TLV 0x12 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VirtualGyroCravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe request TLV 0x13 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe request TLV 0x14 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe request TLV 0x15 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x16 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x17 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x18 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x19 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x1A for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x1B for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe request TLV 0x1C for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe request TLV 0x1D for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe request TLV 0x10 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BlankingEnable { eQMIPDSBlankingEnable mBlankingEnable; }; // Structure to describe request TLV 0x11 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_ActiveChannels { bool mChannel1:1; bool mChannel2:1; bool mChannel3:1; bool mChannel4:1; bool mChannel5:1; bool mChannel6:1; bool mChannel7:1; bool mChannel8:1; bool mChannel9:1; bool mChannel10:1; bool mChannel11:1; bool mChannel12:1; bool mChannel13:1; bool mChannel14:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BluetoothJamming { INT8 mBluetoothJammingActive; }; // Structure to describe request TLV 0x13 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_IMDJamming { eQMIPDSIMDJammingStates mSimulateIMDJamming; }; // Structure to describe request TLV 0x14 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_JammingBands { eQMIPDSIMDJammingBands mBandstoJam; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallengeReport() struct sPDSSetSecurityChallengeReportRequest_EnableSecurity { eQMIPDSReportSecurityChallenge mReportSecurityChallenge; }; // Structure to describe indication TLV 0x10 for PDS SetSecurityChallengeReportIndication struct sPDSSetSecurityChallengeReportIndication_EnableSecurity { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallenge() struct sPDSSetSecurityChallengeRequest_SecureHashAlgorithm { UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe response TLV 0x10 for PDSGetSecurityEncryptionConfig() struct sPDSGetSecurityEncryptionConfigResponse_SecureClientTimestamp { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT64 mEncryptionTimestampMilliseconds; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityUpdateRate() struct sPDSSetSecurityUpdateRateRequest_EnableSecurity { UINT8 mUpdateRate; }; // Structure to describe request TLV 0x10 for PDSSetCellDatabaseControl() struct sPDSSetCellDatabaseControlRequest_Control { bool mPositionInfoStorage:1; bool mTimeInfoStorage:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PDSInjectMotionData() struct sPDSInjectMotionDataRequest_MotionData { eQMIPDSMotionStates mMotionState; eQMIPDSMotionModes mMotionMode; eQMIPDSMotionSubmodes mMotionSubmode; float mStateProbability; UINT16 mMotionDataAgeMilliseconds; UINT16 mMotionDataTimoutMilliseconds; }; // Structure to describe request TLV 0x01 for PDSSetGNSSEngineErrorRecoveryReport() struct sPDSSetGNSSEngineErrorRecoveryReportRequest_Indicator { INT8 mReportGNSSEngineErrorRecovery; }; // Structure to describe indication TLV 0x01 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_Reason { eQMIPDSResetReasons mResetReason; }; // Structure to describe indication TLV 0x10 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_CurrentSystemTime { UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x11 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ScanParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mCN0; UINT16 mSubMillisecondDifferenceMicroseconds; INT16 mDopplerDifferenceHz; }; // Structure to describe indication TLV 0x12 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ClockParameters { eQMIPDSSVSystems mSystem; eQMIPDSTimeSource mCurrentTimeSource; eQMIPDSTimeSource mInjectedTimeSource; UINT32 mTimeDifferenceMilliseconds; UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe indication TLV 0x13 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_SubframeParameters { UINT8 mPRN; INT32 mGPSDataDemodulationINProgress; UINT16 mObservedCycleSlips; UINT16 mParityErrors; UINT32 mGPSSubframeWordWithTimingError; }; // Structure to describe indication TLV 0x14 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_TimeParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT16 mGNSSNumberOfDays; UINT32 mGNSSMilliseconds; UINT32 mClockDifferenceMilliseconds; }; // Structure to describe indication TLV 0x15 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_MeasurementParameters { eQMIPDSSVSystems mSystem; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT8 mObservedMeasurementInconsistencies; UINT16 mObservationDuration; }; // Structure to describe indication TLV 0x16 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_RFParameters { UINT32 mQualitySignalStrength; UINT32 mResetSignalStrength; }; // Structure to describe request TLV 0x10 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeUncertainty { UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe request TLV 0x11 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionUncertainty { UINT32 mPositionUncertaintyCentimeters; }; // Structure to describe request TLV 0x12 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeOffset { UINT64 mTimeOffsetMicroseconds; }; // Structure to describe request TLV 0x13 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionOffset { UINT32 mPositionOffsetMeters; }; // Structure to describe request TLV 0x01 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_PeakAntennaGain { INT16 mPeakAntennaGain; }; // Structure to describe request TLV 0x10 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GPSRFLoss { UINT16 mRFLoss; }; // Structure to describe request TLV 0x11 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GlonassRFLoss { UINT16 mRFLossFrequency0; UINT16 mRFLossFrequencyMinus7; UINT16 mRFLossFrequencyPlus6; }; // Structure to describe request TLV 0x10 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MethodMask { bool mEAPSIM:1; bool mEAPAKA:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x11 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_UserID { UINT8 mUserIDLength; // This array must be the size specified by mUserIDLength // UINT8 mUserID[1]; }; // Structure to describe request TLV 0x12 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MetaIdentity { UINT8 mMetaIdentityLength; // This array must be the size specified by mMetaIdentityLength // UINT8 mMetaIdentity[1]; }; // Structure to describe request TLV 0x13 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_SIMAKAAlgorithm { eQMIAUTHSIMAKAAlgorithm mSIMAKAAlgorithm; }; // Structure to describe request TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketRequest_RequestPacket { UINT8 mEAPRequestPacket[9999]; }; // Structure to describe response TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketResponse_ResponsePacket { UINT8 mResponsePacket[9999]; }; // Structure to describe indication TLV 0x01 for AUTH EAPSessionResultIndication struct sAUTHEAPSessionResultIndication_Result { eQMIAUTHEAPResult mResult; }; // Structure to describe response TLV 0x01 for AUTHGetEAPSessionKeys() struct sAUTHGetEAPSessionKeysResponse_SessionKeys { UINT8 mSessionKeys[9999]; }; // Structure to describe request TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKARequest_Version { eQMIAUTHAKAVersion mAKAVersion; }; // Structure to describe request TLV 0x10 for AUTHRunAKA() struct sAUTHRunAKARequest_Parameters1 { UINT8 mRandomChallengeLength; // This array must be the size specified by mRandomChallengeLength // UINT8 mRandomChallenge[1]; }; struct sAUTHRunAKARequest_Parameters2 { UINT8 mAuthenticationTokenLength; // This array must be the size specified by mAuthenticationTokenLength // UINT8 mAuthenticationToken[1]; }; struct sAUTHRunAKARequest_Parameters { sAUTHRunAKARequest_Parameters1 mAUTHRunAKARequest_Parameters1; sAUTHRunAKARequest_Parameters2 mAUTHRunAKARequest_Parameters2; }; // Structure to describe response TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKAResponse_Handle { UINT32 mHandle; }; // Structure to describe indication TLV 0x01 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_Result { UINT32 mHandle; eQMIAUTHAKAResult mResult; }; // Structure to describe indication TLV 0x10 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_V1V2ResponseData1 { UINT8 mDigestLength; // This array must be the size specified by mDigestLength // UINT8 mDigest[1]; }; struct sAUTHAKAResultIndication_V1V2ResponseData2 { UINT8 mAKADataLength; // This array must be the size specified by mAKADataLength // UINT8 mAKAData[1]; }; struct sAUTHAKAResultIndication_V1V2ResponseData { sAUTHAKAResultIndication_V1V2ResponseData1 mAUTHAKAResultIndication_V1V2ResponseData1; sAUTHAKAResultIndication_V1V2ResponseData2 mAUTHAKAResultIndication_V1V2ResponseData2; }; // Structure to describe request TLV 0x10 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_DTMF { INT8 mEnableEvents; }; // Structure to describe request TLV 0x11 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_VoicePrivacy { INT8 mEnableEvents; }; // Structure to describe request TLV 0x12 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SupplementaryService { INT8 mEnableEvents; }; // Structure to describe request TLV 0x13 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_CallNotification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x14 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Handover { INT8 mEnableEvents; }; // Structure to describe request TLV 0x15 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SpeechCodec { INT8 mEnableEvents; }; // Structure to describe request TLV 0x16 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_USSDNotification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x17 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Supplementary { INT8 mEnableEvents; }; // Structure to describe request TLV 0x18 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Modification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x19 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_UUS { INT8 mEnableEvents; }; // Structure to describe request TLV 0x1A for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_AOC { INT8 mEnableEvents; }; // Structure to describe request TLV 0x01 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallingNumber { // String is variable length, but must be size of the container // char mCallingNumber[1]; }; // Structure to describe request TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CLIR { eQMIVoiceCLIRTypes mCLIRType; }; // Structure to describe request TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CUG { UINT16 mCUGIndex; INT8 mSuppressPreferentialCUG; INT8 mSuppressOASubscription; }; // Structure to describe request TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_EmergencyCategory { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualCall:1; bool mAutomaticCall:1; bool mReserved:1; }; // Structure to describe request TLV 0x15 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CalledPartySubaddress { eQMIVoiceSubaddressTypes mSubaddressType; eQMIVoiceEvenOddIndicators mAddressSignals; UINT8 mSubaddressLength; // This array must be the size specified by mSubaddressLength // UINT8 mSubaddress[1]; }; // Structure to describe request TLV 0x16 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_ServiceType { eQMIVoiceServiceTypes mServiceType; }; // Structure to describe request TLV 0x17 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_SIPURIOverflow { // String is variable length, but must be size of the container // char mSIPURIOverflow[1]; }; // Structure to describe request TLV 0x18 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x19 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_EndReason { eQMIVoiceEndReasons mEndReason; }; // Structure to describe request TLV 0x01 for VoiceCallEnd() struct sVoiceCallEndRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceCallEnd() struct sVoiceCallEndResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x12 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceGetCallInfo() struct sVoiceGetCallInfoRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_CallInfo { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; }; // Structure to describe response TLV 0x11 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyNumber { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x12 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ServiceOption { UINT16 mServiceOption; }; // Structure to describe response TLV 0x13 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x14 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x15 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyName { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // Structure to describe response TLV 0x16 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingType { eQMIVoiceAlertingTypes mAlertingType; }; // Structure to describe response TLV 0x18 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x19 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x1A for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_DiagnosticInfo { UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // Structure to describe response TLV 0x1B for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingPattern { eQMIVoiceAlertingPatterns mAlertingPattern; }; // Structure to describe response TLV 0x1C for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1D for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for Voice OTASPIndication struct sVoiceOTASPIndication_OTASPStatus { UINT8 mCallID; eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe indication TLV 0x01 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Signal { UINT8 mSignalType; UINT8 mAlertPitch; UINT8 mSignal; }; // Structure to describe indication TLV 0x11 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerID { UINT8 mPresentationIndicator; UINT8 mCallerIDLength; // This array must be the size specified by mCallerIDLength // char mCallerID[1]; }; // Structure to describe indication TLV 0x12 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Display { // String is variable length, but must be size of the container // char mDisplayBuffer[1]; }; // Structure to describe indication TLV 0x13 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplay { UINT8 mExtendedDisplayBuffer[182]; }; // Structure to describe indication TLV 0x14 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerName { // String is variable length, but must be size of the container // char mCallerName[1]; }; // Structure to describe indication TLV 0x15 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallWaiting { INT8 mNewCallWaiting; }; // Structure to describe indication TLV 0x16 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x17 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallingPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x18 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CalledPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x19 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_RedirectingNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mRedirectReason; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x1A for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CLIRCause { eQMIVoiceCLIRCauses mCLIRCause; }; // Structure to describe indication TLV 0x1B for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSAudio { UINT8 mUpLink; UINT8 mDownLink; }; // Structure to describe indication TLV 0x1C for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSRelease { eQMIVoiceNSSReleases mNSSRelease; }; // Structure to describe indication TLV 0x1D for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_LineControlInfo { INT8 mPolarityIncluded; INT8 mToggleMode; INT8 mReversePolarity; UINT8 mPowerDenialTime; }; // Structure to describe indication TLV 0x1E for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplayInfo { UINT8 mDisplayType; UINT8 mExtendedDisplayInfoLength; // This array must be the size specified by mExtendedDisplayInfoLength // UINT8 mExtendedDisplayInfo[1]; }; // Structure to describe request TLV 0x01 for VoiceSendFlash() struct sVoiceSendFlashRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashRequest_Payload { // String is variable length, but must be size of the container // char mFlashPayload[1]; }; // Structure to describe request TLV 0x11 for VoiceSendFlash() struct sVoiceSendFlashRequest_Type { eQMIVoiceFlashTypes mFlashType; }; // Structure to describe response TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Info { UINT8 mCallID; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe request TLV 0x10 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceStartContinuousDTMF() struct sVoiceStartContinuousDTMFRequest_Info { UINT8 mCallID; char mDTMFDigit; }; // Structure to describe response TLV 0x10 for VoiceStartContinuous() struct sVoiceStartContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceStopContinuousDTMF() struct sVoiceStopContinuousDTMFRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceStopContinuous() struct sVoiceStopContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x01 for Voice DTMFIndication struct sVoiceDTMFIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFEvents mDTMFEvent; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe indication TLV 0x10 for Voice DTMFIndication struct sVoiceDTMFIndication_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceSetPreferredPrivacy() struct sVoiceSetPreferredPrivacyRequest_Preference { eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice PrivacyIndication struct sVoicePrivacyIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x10 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x13 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x14 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceEndReasons mEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x15 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x17 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x18 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x19 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x1A for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x1B for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AudioAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe indication TLV 0x1C for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_VideoAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe response TLV 0x10 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x12 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x13 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x14 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_UUS { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x15 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x17 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x18 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceEndReasons mEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x19 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1A for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1B for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1C for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1D for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1E for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1F for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AudioAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe response TLV 0x20 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VideoAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe request TLV 0x01 for VoiceManageCalls() struct sVoiceManageCallsRequest_Info { eQMIVoiceSupplementaryServiceCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe indication TLV 0x01 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_Info { UINT8 mCallID; eQMIVoiceSupplementaryNotificationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_CUG { UINT16 mCUGIndex; }; // Structure to describe indication TLV 0x11 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_ECT { eQMIVoiceECTCallStates mECTCallState; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x01 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Info { eQMIVoiceSupplementaryServiceTypes mService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_CallForwarding { eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; }; // Structure to describe request TLV 0x15 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x15 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_ServiceStatus { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallWaitinge() struct sVoiceGetCallWaitingeResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe request TLV 0x01 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_Status { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_Status { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe response TLV 0x11 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_Info { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo2 { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; eQMIVoiceExtendedServiceClass mExtendedServiceClass; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for VoiceSetCallBarringPassword() struct sVoiceSetCallBarringPasswordRequest_Info { eQMIVoiceSupplementaryServiceReasons mReason; char mOldCallBarringPassword[4]; char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe response TLV 0x10 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x10 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x13 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x01 for VoiceAnswerUSSD() struct sVoiceAnswerUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x01 for Voice USSDIndication struct sVoiceUSSDIndication_Type { eQMIVoiceUSSDNotifcationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice USSDIndication struct sVoiceUSSDIndication_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x11 for Voice USSDIndication struct sVoiceUSSDIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe indication TLV 0x01 for Voice USSIndication struct sVoiceUSSIndication_Info { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigRequest_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe request TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigRequest_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe request TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigRequest_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe request TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigRequest_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe request TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe request TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe response TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigResponse_AutoAnswer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigResponse_AirTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigResponse_RoamTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigResponse_TTYMode { INT8 mWriteFailed; }; // Structure to describe response TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceSO { INT8 mWriteFailed; }; // Structure to describe response TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceDomain { INT8 mWriteFailed; }; // Structure to describe request TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigRequest_AutoAnswer { INT8 mInclude; }; // Structure to describe request TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigRequest_AirTimer { INT8 mInclude; }; // Structure to describe request TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigRequest_RoamTimer { INT8 mInclude; }; // Structure to describe request TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigRequest_TTYMode { INT8 mInclude; }; // Structure to describe request TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoiceSO { INT8 mInclude; }; // Structure to describe request TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigRequest_AMRStatus { INT8 mInclude; }; // Structure to describe request TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoicePrivacy { INT8 mInclude; }; // Structure to describe request TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigRequest_NAM { UINT8 mNAMID; }; // Structure to describe request TLV 0x18 for VoiceGetConfig() struct sVoiceGetConfigRequest_VoiceDomain { INT8 mInclude; }; // Structure to describe response TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigResponse_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe response TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigResponse_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe response TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigResponse_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe response TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigResponse_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe response TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe response TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigResponse_AMRConfig { INT8 mGSMAMR; bool mWCDMAAMRWB:1; bool mGSMHRAMR:1; bool mGSMAMRWB:1; bool mGSMAMRNB:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigResponse_Privacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe request TLV 0x01 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Info { eQMIVoiceSupplementaryServiceRequests mSupplementaryServiceRequest; INT8 mModifiedByCallControl; }; // Structure to describe request TLV 0x10 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Class { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x12 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_USSData { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe request TLV 0x15 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x16 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe request TLV 0x17 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x18 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_NewPassword { char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe request TLV 0x19 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_DataSource { INT8 mResponseData; }; // Structure to describe request TLV 0x1A for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe request TLV 0x1B for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallForwarding { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x1C for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIR { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe request TLV 0x1D for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIP { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe request TLV 0x1E for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x1F for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x20 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x21 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x22 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe request TLV 0x01 for VoiceAsyncInitiateUSSD() struct sVoiceAsyncInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x10 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x11 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x12 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x13 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe indication TLV 0x14 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x01 for VoiceBindSubscription() struct sVoiceBindSubscriptionRequest_Type { eQMIVoiceSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for VoiceALSSetLineSwitching() struct sVoiceALSSetLineSwitchingRequest_Switching { INT8 mLineSwitchingAllowed; }; // Structure to describe request TLV 0x01 for VoiceALSSelectLine() struct sVoiceALSSelectLineRequest_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe request TLV 0x01 for VoiceAOCSetACMMaximum() struct sVoiceAOCSetACMMaximumRequest_ACMMax { UINT32 mACMMaximum; }; // Structure to describe request TLV 0x01 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoRequest_Mask { bool mACM:1; bool mACMMaximum:1; bool mCCM:1; // Padding out 13 bits UINT8 mReserved1:5; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACM { UINT32 mACM; }; // Structure to describe response TLV 0x11 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACMMax { UINT32 mACMMaximum; }; // Structure to describe response TLV 0x12 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_CCM { UINT32 mCCM; }; // Structure to describe response TLV 0x10 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_Info { eQMIVoiceVoIPSUPSCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x11 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x12 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x13 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x14 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_SIPURI { // String is variable length, but must be size of the container // char mSIPURIOverflow[1]; }; // Structure to describe response TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x10 for VoiceALSGetLineSwitchingStatus() struct sVoiceALSGetLineSwitchingStatusResponse_SwitchValue { eQMIVoiceSwitchValue mSwitchValue; }; // Structure to describe response TLV 0x10 for VoiceALSGetSelectedLine() struct sVoiceALSGetSelectedLineResponse_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe indication TLV 0x01 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe indication TLV 0x11 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x12 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x01 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe indication TLV 0x11 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x12 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_NetworkMode { eQMIVoiceNetworkMode mNetworkMode; }; // Structure to describe indication TLV 0x11 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_Type { eQMIVoiceSpeechCodecType mType; }; // Structure to describe indication TLV 0x12 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_SamplingRate { UINT32 mSamplingRateHz; }; // Structure to describe indication TLV 0x01 for Voice HandoverIndication struct sVoiceHandoverIndication_State { eQMIVoiceHandoverStates mHandoverState; }; // Structure to describe request TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe request TLV 0x12 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe indication TLV 0x10 for CAT2 EventReport struct sCAT2EventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT2 EventReport struct sCAT2EventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT2 EventReport struct sCAT2EventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT2 EventReport struct sCAT2EventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT2 EventReport struct sCAT2EventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT2 EventReport struct sCAT2EventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT2 EventReport struct sCAT2EventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT2 EventReport struct sCAT2EventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT2 EventReport struct sCAT2EventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT2 EventReport struct sCAT2EventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT2 EventReport struct sCAT2EventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT2 EventReport struct sCAT2EventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT2 EventReport struct sCAT2EventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT2 EventReport struct sCAT2EventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT2 EventReport struct sCAT2EventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT2 EventReport struct sCAT2EventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT2 EventReport struct sCAT2EventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT2 EventReport struct sCAT2EventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT2 EventReport struct sCAT2EventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT2 EventReport struct sCAT2EventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT2 EventReport struct sCAT2EventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT2 EventReport struct sCAT2EventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT2 EventReport struct sCAT2EventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT2 EventReport struct sCAT2EventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT2 EventReport struct sCAT2EventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT2 EventReport struct sCAT2EventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT2 EventReport struct sCAT2EventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT2 EventReport struct sCAT2EventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT2 EventReport struct sCAT2EventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT2 EventReport struct sCAT2EventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT2 EventReport struct sCAT2EventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT2 EventReport struct sCAT2EventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT2 EventReport struct sCAT2EventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT2 EventReport struct sCAT2EventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT2 EventReport struct sCAT2EventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT2 EventReport struct sCAT2EventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT2 EventReport struct sCAT2EventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT2 EventReport struct sCAT2EventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT2 EventReport struct sCAT2EventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT2 EventReport struct sCAT2EventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT2 EventReport struct sCAT2EventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT2 EventReport struct sCAT2EventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT2 EventReport struct sCAT2EventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT2 EventReport struct sCAT2EventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT2 EventReport struct sCAT2EventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT2 EventReport struct sCAT2EventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT2 EventReport struct sCAT2EventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT2 EventReport struct sCAT2EventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT2 EventReport struct sCAT2EventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT2 EventReport struct sCAT2EventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT2 EventReport struct sCAT2EventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT2 EventReport struct sCAT2EventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT2 EventReport struct sCAT2EventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT2 EventReport struct sCAT2EventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT2 EventReport struct sCAT2EventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT2 EventReport struct sCAT2EventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT2 EventReport struct sCAT2EventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT2 EventReport struct sCAT2EventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT2 EventReport struct sCAT2EventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT2 EventReport struct sCAT2EventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT2 EventReport struct sCAT2EventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT2 EventReport struct sCAT2EventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT2 EventReport struct sCAT2EventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT2 EventReport struct sCAT2EventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT2 EventReport struct sCAT2EventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT2 EventReport struct sCAT2EventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT2 EventReport struct sCAT2EventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT2 EventReport struct sCAT2EventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT2 EventReport struct sCAT2EventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT2 EventReport struct sCAT2EventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT2 EventReport struct sCAT2EventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT2 EventReport struct sCAT2EventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT2 EventReport struct sCAT2EventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT2 EventReport struct sCAT2EventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x01 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; bool mCommonActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; bool mControlActivate:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved6:6; }; // Structure to describe request TLV 0x01 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2SendTerminal() struct sCAT2SendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2GetEventReport() struct sCAT2GetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedTerminal() struct sCAT2SendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSCloseChannelIndication struct sCAT2SCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for UIMReadTransparent() struct sUIMReadTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadTransparent() struct sUIMReadTransparentRequest_Buffer { UINT16 mOffset; UINT16 mLength; }; // Structure to describe request TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe request TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentRequest_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadTransparent() struct sUIMReadTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMReadTransparent() struct sUIMReadTransparentResponse_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x14 for UIMReadTransparent() struct sUIMReadTransparentResponse_RequestedLength { UINT16 mFileLength; }; // Structure to describe indication TLV 0x01 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_Encryption { INT8 mDataEncrypted; }; // Structure to describe indication TLV 0x13 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_RequestedLength { UINT16 mFileLength; }; // Structure to describe request TLV 0x01 for UIMReadRecord() struct sUIMReadRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadRecord() struct sUIMReadRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; }; // Structure to describe request TLV 0x10 for UIMReadRecord() struct sUIMReadRecordRequest_LastRecord { UINT16 mRecordNumber; }; // Structure to describe request TLV 0x11 for UIMReadRecord() struct sUIMReadRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMReadRecord() struct sUIMReadRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadRecord() struct sUIMReadRecordResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadRecord() struct sUIMReadRecordResponse_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe response TLV 0x13 for UIMReadRecord() struct sUIMReadRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ReadRecordIndication struct sUIMReadRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadRecordIndication struct sUIMReadRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadRecordIndication struct sUIMReadRecordIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadRecordIndication struct sUIMReadRecordIndication_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_Buffer { UINT16 mOffset; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_ResponseInIndicaiton { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMWriteRecord() struct sUIMWriteRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteRecord() struct sUIMWriteRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteRecord() struct sUIMWriteRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_Attributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_FileAttributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMVerifyPIN() struct sUIMVerifyPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINRequest_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMUnblockPIN() struct sUIMUnblockPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMUnblockPIN() struct sUIMUnblockPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMChangePIN() struct sUIMChangePINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMChangePIN() struct sUIMChangePINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMChangePIN() struct sUIMChangePINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMChangePIN() struct sUIMChangePINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMChangePIN() struct sUIMChangePINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMChangePIN() struct sUIMChangePINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ChangePINIndication struct sUIMChangePINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ChangePINIndication struct sUIMChangePINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM ChangePINIndication struct sUIMChangePINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMDepersonalization() struct sUIMDepersonalizationRequest_Info { eQMIUIMPersonalizationFeatures mFeature; eQMIUIMCKSessionOperations mOperation; UINT8 mCKLength; // This array must be the size specified by mCKLength // char mCKValue[1]; }; // Structure to describe response TLV 0x10 for UIMDepersonalization() struct sUIMDepersonalizationResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for UIMRefreshRegister() struct sUIMRefreshRegisterRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshOK() struct sUIMRefreshOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshComplete() struct sUIMRefreshCompleteRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventResponse_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent { sUIMGetLastRefreshEventResponse_RefreshEvent1 mUIMGetLastRefreshEventResponse_RefreshEvent1; sUIMGetLastRefreshEventResponse_RefreshEvent2 mUIMGetLastRefreshEventResponse_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMEventRegistration() struct sUIMEventRegistrationRequest_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMEventRegistration() struct sUIMEventRegistrationResponse_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetCardStatusResponse_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMGetCardStatusResponse_Status { sUIMGetCardStatusResponse_Status1 mUIMGetCardStatusResponse_Status1; sUIMGetCardStatusResponse_Status2 mUIMGetCardStatusResponse_Status2; }; // Structure to describe response TLV 0x11 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_HotSwapStatus { UINT8 mHotSwapLength; // This array must be the size specified by mHotSwapLength // eQMIUIMHotSwap mHotSwap[1]; }; // Structure to describe response TLV 0x12 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_ValidCardStatus { UINT8 mCardStatusValidCount; // This array must be the size specified by mCardStatusValidCount // INT8 mCardStatusValid[1]; }; // Structure to describe request TLV 0x01 for UIMPowerDown() struct sUIMPowerDownRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMPowerUp() struct sUIMPowerUpRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMPowerUp() struct sUIMPowerUpRequest_IgnoreHotSwapSwitch { INT8 mIgnoreHotSwapSwitch; }; // Structure to describe indication TLV 0x10 for UIM CardStatusIndication struct sUIMCardStatusIndication_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMCardStatusIndication_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMCardStatusIndication_Status { sUIMCardStatusIndication_Status1 mUIMCardStatusIndication_Status1; sUIMCardStatusIndication_Status2 mUIMCardStatusIndication_Status2; }; // Structure to describe indication TLV 0x10 for UIM RefreshIndication struct sUIMRefreshIndication_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMRefreshIndication_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMRefreshIndication_RefreshEvent { sUIMRefreshIndication_RefreshEvent1 mUIMRefreshIndication_RefreshEvent1; sUIMRefreshIndication_RefreshEvent2 mUIMRefreshIndication_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMAuthenticate() struct sUIMAuthenticateRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMAuthenticate() struct sUIMAuthenticateResponse_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMAuthenticate() struct sUIMAuthenticateResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x01 for UIMCloseSession() struct sUIMCloseSessionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetServiceStatus() struct sUIMGetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_FDNStatus { eQMIUIMFDNStatusValues mFDNStatus; }; // Structure to describe response TLV 0x11 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_HiddenKeyStatus { eQMIUIMHiddenKeyStatusValues mHiddenKeyStatus; }; // Structure to describe response TLV 0x12 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_Index { UINT8 mEFDIRIndex; }; // Structure to describe response TLV 0x13 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_ESNStatus { INT8 mESNChanged; }; // Structure to describe request TLV 0x01 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_FDNStatus { INT8 mEnableFDN; }; // Structure to describe request TLV 0x01 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_SessionChange { eQMIUIMSessionTypes mSessionType; eQMIUIMCKSessionOperations mOperation; }; // Structure to describe request TLV 0x10 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLabel() struct sUIMGetLabelRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLabel() struct sUIMGetLabelResponse_AppLabel { UINT8 mLabelLength; // This array must be the size specified by mLabelLength // char mLabelValue[1]; }; // Structure to describe request TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationRequest_Mask { bool mAutomaticSelection:1; bool mPersonalizationStatus:1; bool mHaltSubscription:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_AutoSelection { INT8 mAutomaticProvisioningOn; }; // Structure to describe response TLV 0x11 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Personalization { UINT8 mFeatureCount; struct sFeature { eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // This array must be the size specified by mFeatureCount // sFeature mFeatures[1]; }; // Structure to describe response TLV 0x12 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Subscription { INT8 mPublishSubscription; }; // Structure to describe request TLV 0x01 for UIMSendADPU() struct sUIMSendADPURequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSendADPU() struct sUIMSendADPURequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x11 for UIMSendADPU() struct sUIMSendADPURequest_IntermediateProcedureBytes { eQMIUIMAPDUResponseStatus mIntermediateProcedureBytes; }; // Structure to describe response TLV 0x10 for UIMSendADPU() struct sUIMSendADPUResponse_APDUResponse { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSendADPU() struct sUIMSendADPUResponse_LongAPDUResponse { UINT16 mTotalLength; UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SendADPUIndication struct sUIMSendADPUIndication_APDUResponseChunk { UINT32 mIndicationToken; UINT16 mTotalLength; UINT16 mOffset; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for UIMSAPConnection() struct sUIMSAPConnectionRequest_Slot { eQMIUIMConnectOperations mOperation; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionRequest_DisconnectMode { eQMIUIMDisonnectModes mDisconnectMode; }; // Structure to describe request TLV 0x11 for UIMSAPConnection() struct sUIMSAPConnectionRequest_IntermediateGetResponse { INT8 mReturnIntermediateGetResponse; }; // Structure to describe response TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionResponse_State { eQMIUIMSAPStates mSAPState; }; // Structure to describe request TLV 0x01 for UIMSAP() struct sUIMSAPRequestRequest_Request { eQMIUIMSAPRequests mSAPRequest; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAP() struct sUIMSAPRequestRequest_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x10 for UIMSAPRequest() struct sUIMSAPRequestResponse_ATR { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSAPRequest() struct sUIMSAPRequestResponse_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x12 for UIMSAPRequest() struct sUIMSAPRequestResponse_CardReaderStatus { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x10 for UIM SAPConnectionIndication struct sUIMSAPConnectionIndication_CardStatus { eQMIUIMSAPStates mSAPState; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe response TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe request TLV 0x01 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_EncryptedIMSI { UINT8 mEncryptedIMSILength; // This array must be the size specified by mEncryptedIMSILength // UINT8 mEncryptedIMSI[1]; }; // Structure to describe request TLV 0x01 for UIMGetATR() struct sUIMGetATRRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe response TLV 0x10 for UIMGetATR() struct sUIMGetATRResponse_ATRValue { UINT8 mATRValueLength; // This array must be the size specified by mATRValueLength // UINT8 mATRValue[1]; }; // Structure to describe request TLV 0x01 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe response TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe indication TLV 0x01 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_Slot { eQMIUIMSlots mSlot; }; // Structure to describe indication TLV 0x10 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe indication TLV 0x11 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x01 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateRequest_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateResponse_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PBMGetCapabilities() struct sPBMGetCapabilitiesRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Basic { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // Structure to describe response TLV 0x11 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Group { UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // Structure to describe response TLV 0x12 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AdditionalNumber { UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // Structure to describe response TLV 0x13 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Email { UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // Structure to describe response TLV 0x14 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_SecondName { UINT8 mMaximumSecondNameLength; }; // Structure to describe response TLV 0x15 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_HiddenRecords { INT8 mHiddenEntrySupported; }; // Structure to describe response TLV 0x16 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_GAS { UINT8 mMaximumGASStringLength; }; // Structure to describe response TLV 0x17 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AAS { UINT8 mMaximumAASStringLength; }; // Structure to describe response TLV 0x18 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Protection { eQMIPBMProtectionMethods mProtectionMethod; }; // Structure to describe response TLV 0x10 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Basic { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberOfPhonebooks; struct sPhonebook { eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // This array must be the size specified by mNumberOfPhonebooks // sPhonebook mPhonebooks[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x11 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Group { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x12 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AdditionalNumber { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Email { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x14 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_SecondName { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumSecondNameLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x15 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_HiddenRecords { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; INT8 mHiddenEntrySupported; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x16 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_GAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumGASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x17 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumAASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMReadRecords() struct sPBMReadRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mStartingRecordID; UINT16 mEndingRecordID; }; // Structure to describe response TLV 0x10 for PBMReadRecords() struct sPBMReadRecordsResponse_RecordsRead { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Basic { UINT16 mSequenceNumber; eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT8 mNumberOfRecords; struct sRecord1 { UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sRecord2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sRecord { sRecord1 mRecord1; sRecord2 mRecord2; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x10 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_SecondName { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mSecondNameLength; // This array must be the size (in BYTEs) specified by mSecondNameLength // wchar_t mSecondName[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x11 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_AdditionalNumber { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x12 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Group { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x13 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Email { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x14 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Hidden { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; INT8 mHidden; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for PBMWriteRecord() struct sPBMWriteRecordRequest_Info1 { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sPBMWriteRecordRequest_Info2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sPBMWriteRecordRequest_Info { sPBMWriteRecordRequest_Info1 mPBMWriteRecordRequest_Info1; sPBMWriteRecordRequest_Info2 mPBMWriteRecordRequest_Info2; }; // Structure to describe request TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordRequest_SecondName { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe request TLV 0x11 for PBMWriteRecord() struct sPBMWriteRecordRequest_AdditionalNumber { UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // Structure to describe request TLV 0x12 for PBMWriteRecord() struct sPBMWriteRecordRequest_Group { UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // Structure to describe request TLV 0x13 for PBMWriteRecord() struct sPBMWriteRecordRequest_Email { UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // Structure to describe request TLV 0x14 for PBMWriteRecord() struct sPBMWriteRecordRequest_Hidden { INT8 mHidden; }; // Structure to describe response TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteRecord() struct sPBMDeleteRecordRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMDeleteRecord() struct sPBMDeleteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteAllRecords() struct sPBMDeleteAllRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x01 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Number { UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x11 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Name { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsResponse_List { UINT16 mNumberOfRecordIDs; // This array must be the size specified by mNumberOfRecordIDs // UINT16 mRecordID[1]; }; // Structure to describe indication TLV 0x01 for PBM RecordUpdateIndication struct sPBMRecordUpdateIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMOperations mOperation; UINT16 mRecordID; }; // Structure to describe indication TLV 0x01 for PBM RefreshIndication struct sPBMRefreshIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMRefreshStatus mStatus; }; // Structure to describe indication TLV 0x01 for PBM ReadyIndication struct sPBMReadyIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe indication TLV 0x01 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x10 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x11 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x12 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x01 for PBM AllReadyIndication struct sPBMAllReadyIndication_Info { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; bool mAbbreviatedDialingNumber:1; bool mFixedDialingNumber:1; bool mMobileSubscriberIntegratedServicesDigitalNetwork:1; bool mMailBoxDialingNumber:1; bool mServiceDialingNumber:1; bool mBarredDialingNumber:1; bool mLastNumberDialed:1; bool mMailBoxNumber:1; // Padding out 8 bits UINT8 mReserved1; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x11 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x12 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetAllGroups() struct sPBMGetAllGroupsResponse_Groups { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mGroupCount; struct sGroup { UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // This array must be the size specified by mGroupCount // sGroup mGroups[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMSetGroupInfo() struct sPBMSetGroupInfoRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe response TLV 0x10 for PBMSetGroupInfo() struct sPBMSetGroupInfoResponse_ID { eQMIPBMSessionTypes mSessionType; UINT8 mGroupID; }; // Structure to describe request TLV 0x01 for PBMGetState() struct sPBMGetStateRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetStateInfo() struct sPBMGetStateInfoResponse_State { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMStates mState; }; // Structure to describe request TLV 0x01 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsResponse_Records { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM HiddenRecordStatusIndication struct sPBMHiddenRecordStatusIndication_Status { eQMIPBMSessionTypes mSessionType; INT8 mHiddenRecordsValid; }; // Structure to describe request TLV 0x01 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMGetNextRecordID() struct sPBMGetNextRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextRecordID() struct sPBMGetNextRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetAASList() struct sPBMGetAASListResponse_List { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mAASCount; struct sAAS { UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // This array must be the size specified by mAASCount // sAAS mAASs[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x10 for PBMSetAAS() struct sPBMSetAASRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMAASOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe response TLV 0x10 for PBMSetAAS() struct sPBMSetAASResponse_Info { eQMIPBMSessionTypes mSessionType; UINT8 mAASID; }; // Structure to describe indication TLV 0x01 for PBM AASChangeIndication struct sPBMAASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe indication TLV 0x01 for PBM GASChangeIndication struct sPBMGASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGASID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe request TLV 0x10 for PBMBindSubscription() struct sPBMBindSubscriptionRequest_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x10 for PBMGetSubscription() struct sPBMGetSubscriptionRequest_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for LOCClientRevision() struct sLOCClientRevisionRequest_Revision { UINT32 mRevision; }; // Structure to describe request TLV 0x01 for LOCRegisterEvents() struct sLOCRegisterEventsRequest_EventRegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; // Padding out 47 bits UINT8 mReserved1:7; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCStart() struct sLOCStartRequest_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for LOCStart() struct sLOCStartRequest_FixRecurrenceType { eQMILOCFixRecurrenceType mFixRecurrenceType; }; // Structure to describe request TLV 0x11 for LOCStart() struct sLOCStartRequest_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe request TLV 0x12 for LOCStart() struct sLOCStartRequest_EnableIntermediateReports { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe request TLV 0x13 for LOCStart() struct sLOCStartRequest_MinimumIntervalBetweenPositionReports { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe request TLV 0x14 for LOCStart() struct sLOCStartRequest_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCStartRequest_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCStartRequest_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCStartRequest_ApplicationID { sLOCStartRequest_ApplicationID1 mLOCStartRequest_ApplicationID1; sLOCStartRequest_ApplicationID2 mLOCStartRequest_ApplicationID2; sLOCStartRequest_ApplicationID3 mLOCStartRequest_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCStop() struct sLOCStopRequest_SessionID { UINT8 mSessionID; }; // Structure to describe indication TLV 0x01 for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionStatus { eQMILOCSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x10 for LOC PositionReportIndication struct sLOCPositionReportIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x11 for LOC PositionReportIndication struct sLOCPositionReportIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x13 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x14 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x15 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x16 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x17 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x18 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x19 for LOC PositionReportIndication struct sLOCPositionReportIndication_SpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x1A for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x1B for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x1C for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x1D for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x1E for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x1F for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC PositionReportIndication struct sLOCPositionReportIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x21 for LOC PositionReportIndication struct sLOCPositionReportIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x22 for LOC PositionReportIndication struct sLOCPositionReportIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x23 for LOC PositionReportIndication struct sLOCPositionReportIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x24 for LOC PositionReportIndication struct sLOCPositionReportIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x25 for LOC PositionReportIndication struct sLOCPositionReportIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x26 for LOC PositionReportIndication struct sLOCPositionReportIndication_LeapSeconds { UINT8 mLeapSeconds; }; // Structure to describe indication TLV 0x27 for LOC PositionReportIndication struct sLOCPositionReportIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x28 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x29 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2A for LOC PositionReportIndication struct sLOCPositionReportIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2B for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionFixCount { UINT32 mSessionFixCount; }; // Structure to describe indication TLV 0x2C for LOC PositionReportIndication struct sLOCPositionReportIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe indication TLV 0x01 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_AltitudeSource { eQMILOCAltitudeAssumed mAltitudeAssumed; }; // Structure to describe indication TLV 0x10 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_SatelliteInfo { UINT8 mSatelliteInfoCount; bool mValidSystem:1; bool mValidGNSSSatelliteID:1; bool mValidHealthStatus:1; bool mValidProcessStatus:1; bool mValidSatelliteInfoMask:1; bool mValidElevation:1; bool mValidAzimuth:1; bool mValidSignalToNoiseRatio:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMILOCSystem mSystem; UINT16 mGNSSSatelliteID; eQMILOCHealthStatus mHealthStatus; eQMILOCSatelliteStatus mSatelliteStatus; bool mHasEphemeris:1; bool mHasAlmanac:1; // Padding out 6 bits UINT8 mReserved2:6; float mElevationDegrees; float mAzimuthDegrees; float mSignalToNoiseRatiodBHz; }; // Structure to describe indication TLV 0x01 for LOC NMEAIndication struct sLOCNMEAIndication_NMEAString { // String is variable length, but must be size of the container // char mNMEAString[1]; }; // Structure to describe request TLV 0x01 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_NotificationType { eQMILOCNotificationType mNotificationType; }; // Structure to describe request TLV 0x10 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest { sLOCNetworkInitiatedRequestIndication_VxRequest1 mLOCNetworkInitiatedRequestIndication_VxRequest1; sLOCNetworkInitiatedRequestIndication_VxRequest2 mLOCNetworkInitiatedRequestIndication_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest { sLOCNetworkInitiatedRequestIndication_SUPLRequest1 mLOCNetworkInitiatedRequestIndication_SUPLRequest1; sLOCNetworkInitiatedRequestIndication_SUPLRequest2 mLOCNetworkInitiatedRequestIndication_SUPLRequest2; sLOCNetworkInitiatedRequestIndication_SUPLRequest3 mLOCNetworkInitiatedRequestIndication_SUPLRequest3; sLOCNetworkInitiatedRequestIndication_SUPLRequest4 mLOCNetworkInitiatedRequestIndication_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest { sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe indication TLV 0x10 for LOC InjectTimeIndication struct sLOCInjectTimeIndication_TimeServerInfo { UINT32 mDelayThresholdMilliseconds; UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_AllowedSize { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x03 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x04 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x01 for LOC EngineStateIndication struct sLOCEngineStateIndication_EngineState { eQMILOCEngineState mEngineState; }; // Structure to describe indication TLV 0x01 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionState { eQMILOCSessionState mSessionState; }; // Structure to describe indication TLV 0x10 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x01 for LOCWiFi() struct sLOCWiFiRequestIndication_RequestType { eQMILOCRequestType mRequestType; }; // Structure to describe request TLV 0x10 for LOCWiFi() struct sLOCWiFiRequestIndication_TimeBetweenFixes { UINT16 mTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x10 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_AccelerometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x11 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_GyrometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x01 for LOCTimeSync() struct sLOCTimeSyncRequestIndication_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x01 for LOC SetSPIStreamingReportIndication struct sLOCSetSPIStreamingReportIndication_SPIRequests { INT8 mEnableSPIRequests; }; // Structure to describe request TLV 0x01 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_WWANType { eQMILOCWWANType mWWANType; }; // Structure to describe indication TLV 0x10 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSMeasurementEngineFirmwareVersion { // String is variable length, but must be size of the container // char mFirmwareVersion[1]; }; // Structure to describe indication TLV 0x11 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSHostedSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x12 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x10 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe indication TLV 0x11 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_IntermediateFixes { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe indication TLV 0x12 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_MinimumIntervalBetweenFixes { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe indication TLV 0x13 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID { sLOCGetFixCriteriaIndication_ApplicationID1 mLOCGetFixCriteriaIndication_ApplicationID1; sLOCGetFixCriteriaIndication_ApplicationID2 mLOCGetFixCriteriaIndication_ApplicationID2; sLOCGetFixCriteriaIndication_ApplicationID3 mLOCGetFixCriteriaIndication_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UserResponse { eQMILOCUserResponse mUserResponse; }; // Structure to describe request TLV 0x10 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCProvideNIUserResponseRequest_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_VxRequest { sLOCProvideNIUserResponseRequest_VxRequest1 mLOCProvideNIUserResponseRequest_VxRequest1; sLOCProvideNIUserResponseRequest_VxRequest2 mLOCProvideNIUserResponseRequest_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest { sLOCProvideNIUserResponseRequest_SUPLRequest1 mLOCProvideNIUserResponseRequest_SUPLRequest1; sLOCProvideNIUserResponseRequest_SUPLRequest2 mLOCProvideNIUserResponseRequest_SUPLRequest2; sLOCProvideNIUserResponseRequest_SUPLRequest3 mLOCProvideNIUserResponseRequest_SUPLRequest3; sLOCProvideNIUserResponseRequest_SUPLRequest4 mLOCProvideNIUserResponseRequest_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest { sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe request TLV 0x01 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_TotalSize { UINT32 mTotalSize; }; // Structure to describe request TLV 0x03 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartNumber { UINT16 mPartNumber; }; // Structure to describe request TLV 0x04 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartData { UINT16 mPartDataLength; // This array must be the size specified by mPartDataLength // UINT8 mPartData[1]; }; // Structure to describe request TLV 0x10 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_FormatType { eQMILOCOrbitsFormatType mOrbitsFormatType; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsDataIndication struct sLOCInjectPredictedOrbitsDataIndication_PartNumber { UINT16 mPartNumber; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_AllowedSizes { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x11 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataValidityIndication struct sLOCGetPredictedOrbitsDataValidityIndication_ValidityInfo { UINT64 mStartTimeInUTC; UINT16 mDurationHours; }; // Structure to describe request TLV 0x01 for LOCInjectUTCTime() struct sLOCInjectUTCTimeRequest_UTCTime { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x10 for LOCInjectPosition() struct sLOCInjectPositionRequest_Latitude { double mLatitudeDegrees; }; // Structure to describe request TLV 0x11 for LOCInjectPosition() struct sLOCInjectPositionRequest_Longitude { double mLongitudeDegrees; }; // Structure to describe request TLV 0x12 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe request TLV 0x13 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe request TLV 0x14 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x15 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe request TLV 0x16 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe request TLV 0x17 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe request TLV 0x18 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe request TLV 0x19 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe request TLV 0x1A for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeSource { eQMILOCAltitudeSource mAltitudeSource; eQMILOCLinkage mLinkage; eQMILOCCoverage mCoverage; }; // Structure to describe request TLV 0x1B for LOCInjectPosition() struct sLOCInjectPositionRequest_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x1C for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionAge { UINT32 mAgeTimestampMilliseconds; }; // Structure to describe request TLV 0x1D for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionSource { eQMILOCPositionSource mPositionSource; }; // Structure to describe request TLV 0x01 for LOCSetEngineLock() struct sLOCSetEngineLockRequest_LockType { eQMILOCLockType mLockType; }; // Structure to describe indication TLV 0x10 for LOC GetEngineLockIndication struct sLOCGetEngineLockIndication_LockType { eQMILOCLockType mLockType; }; // Structure to describe request TLV 0x01 for LOCSetSBASConfig() struct sLOCSetSBASConfigRequest_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe response TLV 0x10 for LOCGetSBASConfig() struct sLOCGetSBASConfigResponse_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe request TLV 0x01 for LOCSetNMEATypes() struct sLOCSetNMEATypesRequest_SentenceTypes { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetNMEATypesIndication struct sLOCGetNMEATypesIndication_SentenceType { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCSetLowPowerMode() struct sLOCSetLowPowerModeRequest_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe indication TLV 0x10 for LOC GetLowPowerModeIndication struct sLOCGetLowPowerModeIndication_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe request TLV 0x01 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe request TLV 0x11 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe request TLV 0x12 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_AddressType { bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x10 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe indication TLV 0x11 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe indication TLV 0x12 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteAll { INT8 mDeleteAll; }; // Structure to describe request TLV 0x10 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteSatelliteInfo { UINT8 mSatelliteInfoCount; struct sSatelliteInfo { UINT16 mGNSSSatelliteID; eQMILOCSystem mSystem; bool mDeleteEphemeris:1; bool mDeleteAlmanac:1; // Padding out 6 bits UINT8 mReserved1:6; }; // This array must be the size specified by mSatelliteInfoCount // sSatelliteInfo mSatelliteInfos[1]; }; // Structure to describe request TLV 0x11 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteGNSData { bool mDeleteGPSSatelliteDirectory:1; bool mDeleteGPSSatelliteSteering:1; bool mDeleteGPSTime:1; bool mDeleteGPSAlmanacCorrection:1; bool mDeleteGLOSatelliteDirectory:1; bool mDeleteGLOSatelliteSteering:1; bool mDeleteGLOTime:1; bool mDeleteGLOAlmanacCorrection:1; bool mDeleteSBASSatelliteDirectory:1; bool mDeleteSBASSatelliteSteering:1; bool mDeletePosition:1; bool mDeleteTime:1; bool mDeleteIONO:1; bool mDeleteUTCTimestamp:1; bool mDeleteHealth:1; bool mDeleteSAData:1; bool mDeleteRTI:1; bool mDeleteSatelliteNoExist:1; bool mDeleteFrequencyBiasEstimate:1; // Padding out 45 bits UINT8 mReserved1:5; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x12 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteCellDatabase { bool mDeletePosition:1; bool mDeleteLatestGPSPosition:1; bool mDeleteOTAPosition:1; bool mDeleteEXTReferencePosition:1; bool mDeleteTimeTag:1; bool mDeleteCellID:1; bool mDeleteCachedCellID:1; bool mDeleteLastServerCell:1; bool mDeleteCurrentServerCell:1; bool mDeleteNeighborInfo:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x13 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteClockInfo { bool mDeleteTimeEstimate:1; bool mDeleteFrequencyEstimate:1; bool mDeleteWeekNumber:1; bool mDeleteRTCTime:1; bool mDeleteTimeTransfer:1; bool mDeleteGPSTimeEstimate:1; bool mDeleteGLOTimeEstimate:1; bool mDeleteGLODayNumber:1; bool mDeleteGLOYearNumber:1; bool mDeleteGLORFGroupDelay:1; bool mDeleteDisableTT:1; // Padding out 21 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x01 for LOCSetXTRATSessionControl() struct sLOCSetXTRATSessionControlRequest_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe indication TLV 0x10 for LOC GetXTRATSessionControlIndication struct sLOCGetXTRATSessionControlIndication_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe request TLV 0x10 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_Time { UINT32 mWiFiPositionTime; }; // Structure to describe request TLV 0x11 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_WiFiPosition { double mLatitudeDegrees; double mLongitudeDegrees; UINT16 mHEPEMeters; UINT8 mNumberOfAccessPointsUsed; eQMILOCWiFiFixErrorCode mFixErrorCode; }; // Structure to describe request TLV 0x12 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_AccessPointInformation { UINT8 mNumberOfAccessPoints; struct sAccessPointInfo { UINT8 mMACAddress[6]; INT32 mRSSIdBm; UINT16 mChannel; bool mBeingUsed:1; bool mHiddenSSID:1; bool mPrivate:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mNumberOfAccessPoints // sAccessPointInfo mAccessPointInfos[1]; }; // Structure to describe request TLV 0x13 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x01 for LOCProvideWiFiStatus() struct sLOCProvideWiFiStatusRequest_WiFiStatus { eQMILOCWiFiStatus mWiFiStatus; }; // Structure to describe indication TLV 0x10 for LOC GetRegisteredEventsIndication struct sLOCGetRegisteredEventsIndication_RegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; // Padding out 47 bits UINT8 mReserved1:7; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCSetOperationMode() struct sLOCSetOperationModeRequest_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe indication TLV 0x10 for LOC GetOperationModeIndication struct sLOCGetOperationModeIndication_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe request TLV 0x01 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_StationaryStatus { INT8 mDeviceIsStationary; }; // Structure to describe request TLV 0x10 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_Confidence { UINT8 mStationaryConfidence; }; // Structure to describe request TLV 0x10 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe request TLV 0x11 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_AccelerometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x12 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_GyrometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe indication TLV 0x10 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe indication TLV 0x11 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_AccelerometerSampleAccepted { INT8 mAccelerometerSampleAccepted; }; // Structure to describe indication TLV 0x12 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_GyrometerSamplesAccepted { INT8 mGyrometerSamplesAccepted; }; // Structure to describe request TLV 0x01 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe request TLV 0x03 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_SensorTransmitTime { UINT32 mProcessTXTimeMilliseconds; }; // Structure to describe request TLV 0x01 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe request TLV 0x10 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe indication TLV 0x10 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe indication TLV 0x11 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe request TLV 0x01 for LOCSetExternalPowerConfig() struct sLOCSetExternalPowerConfigRequest_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe indication TLV 0x10 for LOC GetExternalPowerConfigIndication struct sLOCGetExternalPowerConfigIndication_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe request TLV 0x01 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionStatus { eQMILOCConnectionStatus mConnectionStatus; }; // Structure to describe request TLV 0x10 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_APNProfile { eQMILOCPDNType mPDNType; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // Structure to describe request TLV 0x10 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe request TLV 0x11 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe request TLV 0x12 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe request TLV 0x13 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC SetProtocolConfigParametersIndication struct sLOCSetProtocolConfigParametersIndication_FailedParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for LOCGetProtocolConfigParameters() struct sLOCGetProtocolConfigParametersRequest_ConfigParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe indication TLV 0x11 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe indication TLV 0x12 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe indication TLV 0x13 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for LOCSetSensorControlConfig() struct sLOCSetSensorControlConfigRequest_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe indication TLV 0x10 for LOC GetSensorControlConfigIndication struct sLOCGetSensorControlConfigIndication_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe request TLV 0x10 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe request TLV 0x11 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x12 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x13 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x14 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPropertiesIndication struct sLOCSetSensorPropertiesIndication_Failures { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetSensorProperties() struct sLOCGetSensorPropertiesRequest_Properties { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x14 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x10 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe request TLV 0x11 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x12 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x13 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPerformanceConfigIndication struct sLOCSetSensorPerformanceConfigIndication_FailedConfiguration { bool mPerformanceMode:1; bool mAccelerometerSampling:1; bool mGyrometerSampling:1; bool mAlgorithmConfig:1; // Padding out 28 bits UINT8 mReserved1:4; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCInjectSUPLCertificate() struct sLOCInjectSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x10 for LOCDeleteSUPLCertificate() struct sLOCDeleteSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x10 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe request TLV 0x11 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe request TLV 0x12 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x10 for LOC SetPositionEngineConfigIndication struct sLOCSetPositionEngineConfigIndication_FailedParameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetPositionEngineConfig() struct sLOCGetPositionEngineConfigRequest_Parameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe indication TLV 0x11 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe indication TLV 0x12 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x01 for LOC NetworkInitiatedGeofenceIndication struct sLOCNetworkInitiatedGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceGeneralAlertIndication struct sLOCEventGeofenceGeneralAlertIndication_GeofenceGeneralAlert { eQMILOCGeofenceGeneralAlert mGeofenceGeneralAlert; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x10 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofencePosition { UINT64 mUTCTimestampMilliseconds; double mLatitudeDegrees; double mLongitudeDegrees; float mHorizontalUncertaintyEllipticalMinorMeters; float mHorizontalUncertaintyEllipticalMajorMeters; float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; INT8 mHorizontalSpeedValid; float mHorizontalSpeedMetersSecond; INT8 mAltitudeEllipsoidValid; float mAltitudeFromEllipsoidMeters; INT8 mVerticalUncertaintyValid; float mVerticalUncertaintyMeters; INT8 mVerticalSpeedValid; float mVerticalSpeedMetersSecond; INT8 mHeadingValid; float mHeadingDegrees; }; // Structure to describe request TLV 0x01 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x03 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x04 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_IncludePositionInBreachEvent { INT8 mIncludePositionInBreachEvent; }; // Structure to describe request TLV 0x10 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Responsiveness { eQMILOCResponsiveness mResponsiveness; }; // Structure to describe request TLV 0x11 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Confidence { eQMILOCConfidence mConfidence; }; // Structure to describe indication TLV 0x01 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x01 for LOCDeleteGeofence() struct sLOCDeleteGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x01 for LOCQueryGeofence() struct sLOCQueryGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Origin { eQMILOCGeofenceOrigin mGeofenceOrigin; }; // Structure to describe indication TLV 0x13 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_PositionFromGeofence { eQMILOCPositionFromGeofence mPositionFromGeofence; }; // Structure to describe indication TLV 0x14 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Parameters { double mLatitudeDegrees; double mLongitudeDegrees; UINT32 mRadiusMeters; }; // Structure to describe indication TLV 0x15 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x01 for LOCEditGeofence() struct sLOCEditGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x10 for LOCEditGeofence() struct sLOCEditGeofenceRequest_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x11 for LOCEditGeofence() struct sLOCEditGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe indication TLV 0x01 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_FailedParameters { bool mGeofenceState:1; bool mBreachMask:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetBestAvailablePosition() struct sLOCGetBestAvailablePositionRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x13 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x14 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x15 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x16 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x17 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x18 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x19 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x1A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x1B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceCircular { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceElliptical { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalReliablility { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x1E for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x1F for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x21 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x22 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x23 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x24 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x25 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x26 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x27 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x28 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x29 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x2A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x2B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe request TLV 0x10 for CATSetEventReport() struct sCATSetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CATSetEventReport() struct sCATSetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe request TLV 0x12 for CATSetEventReport() struct sCATSetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CATSetEventReport() struct sCATSetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CATSetEventReport() struct sCATSetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe indication TLV 0x10 for CAT EventReport struct sCATEventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT EventReport struct sCATEventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT EventReport struct sCATEventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT EventReport struct sCATEventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT EventReport struct sCATEventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT EventReport struct sCATEventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT EventReport struct sCATEventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT EventReport struct sCATEventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT EventReport struct sCATEventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT EventReport struct sCATEventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT EventReport struct sCATEventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT EventReport struct sCATEventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT EventReport struct sCATEventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT EventReport struct sCATEventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT EventReport struct sCATEventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT EventReport struct sCATEventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT EventReport struct sCATEventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT EventReport struct sCATEventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT EventReport struct sCATEventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT EventReport struct sCATEventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT EventReport struct sCATEventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT EventReport struct sCATEventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT EventReport struct sCATEventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT EventReport struct sCATEventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT EventReport struct sCATEventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT EventReport struct sCATEventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT EventReport struct sCATEventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT EventReport struct sCATEventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT EventReport struct sCATEventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT EventReport struct sCATEventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT EventReport struct sCATEventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT EventReport struct sCATEventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT EventReport struct sCATEventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT EventReport struct sCATEventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT EventReport struct sCATEventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT EventReport struct sCATEventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT EventReport struct sCATEventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT EventReport struct sCATEventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT EventReport struct sCATEventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT EventReport struct sCATEventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT EventReport struct sCATEventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT EventReport struct sCATEventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT EventReport struct sCATEventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT EventReport struct sCATEventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT EventReport struct sCATEventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT EventReport struct sCATEventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT EventReport struct sCATEventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT EventReport struct sCATEventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT EventReport struct sCATEventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT EventReport struct sCATEventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT EventReport struct sCATEventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT EventReport struct sCATEventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT EventReport struct sCATEventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT EventReport struct sCATEventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT EventReport struct sCATEventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT EventReport struct sCATEventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT EventReport struct sCATEventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT EventReport struct sCATEventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT EventReport struct sCATEventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT EventReport struct sCATEventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT EventReport struct sCATEventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT EventReport struct sCATEventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT EventReport struct sCATEventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT EventReport struct sCATEventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT EventReport struct sCATEventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT EventReport struct sCATEventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT EventReport struct sCATEventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT EventReport struct sCATEventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT EventReport struct sCATEventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT EventReport struct sCATEventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT EventReport struct sCATEventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT EventReport struct sCATEventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT EventReport struct sCATEventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT EventReport struct sCATEventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT EventReport struct sCATEventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT EventReport struct sCATEventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT EventReport struct sCATEventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT EventReport struct sCATEventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT EventReport struct sCATEventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT EventReport struct sCATEventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT EventReport struct sCATEventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT EventReport struct sCATEventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT EventReport struct sCATEventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT EventReport struct sCATEventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x01 for CATGetServiceState() struct sCATGetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; bool mCommonActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; bool mControlActivate:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CATGetServiceState() struct sCATGetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved6:6; }; // Structure to describe request TLV 0x01 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATSendTerminal() struct sCATSendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CATGetEventReport() struct sCATGetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CATGetEventReport() struct sCATGetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CATGetEventReport() struct sCATGetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CATGetEventReport() struct sCATGetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CATGetEventReport() struct sCATGetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CATGetEventReport() struct sCATGetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CATGetEventReport() struct sCATGetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CATGetEventReport() struct sCATGetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CATGetEventReport() struct sCATGetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CATGetEventReport() struct sCATGetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CATGetEventReport() struct sCATGetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CATGetEventReport() struct sCATGetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CATGetEventReport() struct sCATGetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CATGetEventReport() struct sCATGetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CATGetEventReport() struct sCATGetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CATGetEventReport() struct sCATGetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CATGetEventReport() struct sCATGetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CATGetEventReport() struct sCATGetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CATGetEventReport() struct sCATGetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CATGetEventReport() struct sCATGetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CATGetEventReport() struct sCATGetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CATGetEventReport() struct sCATGetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CATGetEventReport() struct sCATGetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CATGetEventReport() struct sCATGetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CATGetEventReport() struct sCATGetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CATGetEventReport() struct sCATGetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CATGetEventReport() struct sCATGetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CATGetEventReport() struct sCATGetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CATGetEventReport() struct sCATGetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CATGetEventReport() struct sCATGetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CATGetEventReport() struct sCATGetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CATGetEventReport() struct sCATGetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CATGetEventReport() struct sCATGetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CATGetEventReport() struct sCATGetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CATGetEventReport() struct sCATGetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CATGetEventReport() struct sCATGetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CATGetEventReport() struct sCATGetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CATGetEventReport() struct sCATGetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CATGetEventReport() struct sCATGetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CATGetEventReport() struct sCATGetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CATGetEventReport() struct sCATGetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CATGetEventReport() struct sCATGetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CATGetEventReport() struct sCATGetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CATGetEventReport() struct sCATGetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CATGetEventReport() struct sCATGetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CATGetEventReport() struct sCATGetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CATGetEventReport() struct sCATGetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CATGetEventReport() struct sCATGetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CATGetEventReport() struct sCATGetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CATGetEventReport() struct sCATGetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CATGetEventReport() struct sCATGetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CATGetEventReport() struct sCATGetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CATGetEventReport() struct sCATGetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CATGetEventReport() struct sCATGetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CATGetEventReport() struct sCATGetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CATGetEventReport() struct sCATGetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CATGetEventReport() struct sCATGetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CATGetEventReport() struct sCATGetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CATGetEventReport() struct sCATGetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CATGetEventReport() struct sCATGetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CATGetEventReport() struct sCATGetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CATGetEventReport() struct sCATGetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CATGetEventReport() struct sCATGetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CATGetEventReport() struct sCATGetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CATGetEventReport() struct sCATGetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CATGetEventReport() struct sCATGetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CATGetEventReport() struct sCATGetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CATGetEventReport() struct sCATGetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CATGetEventReport() struct sCATGetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CATGetEventReport() struct sCATGetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CATGetEventReport() struct sCATGetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CATGetEventReport() struct sCATGetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CATGetEventReport() struct sCATGetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe request TLV 0x01 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CATSendDecodedTerminal() struct sCATSendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe response TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CATEventConfirmation() struct sCATEventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CATEventConfirmation() struct sCATEventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CATEventConfirmation() struct sCATEventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSCloseChannelIndication struct sCATSCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSSendData() struct sCATSCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CATSCWSSendData() struct sCATSCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CATSetConfiguration() struct sCATSetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CATSetConfiguration() struct sCATSetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CATGetConfiguration() struct sCATGetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CATGetConfiguration() struct sCATGetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for RMSGetSMSWake() struct sRMSGetSMSWakeResponse_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSGetSMSWake() struct sRMSGetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for OMASetEventReport() struct sOMASetEventReportRequest_NIA { INT8 mReportNetworkInitiatedAlerts; }; // Structure to describe request TLV 0x11 for OMASetEventReport() struct sOMASetEventReportRequest_Status { INT8 mReportSessionStatus; }; // Structure to describe indication TLV 0x10 for OMA EventReport struct sOMAEventReportIndication_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe indication TLV 0x11 for OMA EventReport struct sOMAEventReportIndication_Status { eQMIOMASessionStates mSessionState; }; // Structure to describe indication TLV 0x12 for OMA EventReport struct sOMAEventReportIndication_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe request TLV 0x10 for OMAStartSession() struct sOMAStartSessionRequest_Type { eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Info { eQMIOMASessionStates mSessionState; eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x11 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe response TLV 0x12 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Retry { UINT8 mRetryCount; UINT16 mRetryPauseTimer; UINT16 mRemainingTime; }; // Structure to describe response TLV 0x13 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe request TLV 0x10 for OMASendSelection() struct sOMASendSelectionRequest_Type { eQMIOMASelections mSelection; UINT16 mSessionID; }; // Structure to describe response TLV 0x10 for OMAGetFeatures() struct sOMAGetFeaturesResponse_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe response TLV 0x11 for OMAGetFeatures() struct sOMAGetFeaturesResponse_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe response TLV 0x12 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFAFeature { INT8 mHFAFeatureEnabled; }; // Structure to describe response TLV 0x13 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFADoneState { eQMIOMAHFADoneStates mHFAFeatureDoneState; }; // Structure to describe request TLV 0x10 for OMASetFeatures() struct sOMASetFeaturesRequest_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe request TLV 0x11 for OMASetFeatures() struct sOMASetFeaturesRequest_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe request TLV 0x12 for OMASetFeatures() struct sOMASetFeaturesRequest_HFAFeature { INT8 mHFAFeatureEnabled; }; #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp000066400000000000000000022646471455567757300316530ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtExports.cpp DESCRIPTION: QUALCOMM Gobi Connection Management API exports Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ) { // Validate arguments if ( (pInterface == 0) || (pServicesCount == 0) || (*pServicesCount == 0) || (pServices == 0) || (pHandle == 0) ) { return (ULONG)eGOBI_ERR_INVALID_ARG; } GOBIHANDLE handle = gDLL.CreateAPI(); if (handle == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcCount = *pServicesCount; *pServicesCount = 0; *pHandle = 0; std::set inSvcs; std::set outSvcs; ULONG s = 0; for (s = 0; s < svcCount; s++) { inSvcs.insert( (eQMIService)pServices[s] ); } outSvcs = pAPI->Connect( pInterface, inSvcs ); ULONG outSvcsCount = (ULONG)outSvcs.size(); if (outSvcsCount > svcCount) { outSvcsCount = svcCount; } if (outSvcsCount == 0) { ULONG rc = (ULONG)pAPI->GetCorrectedLastError(); pAPI = 0; gDLL.DeleteAPI( handle ); return rc; } std::set ::const_iterator pOutSvc = outSvcs.begin(); for (s = 0; s < svcCount; s++) { pServices[s] = UCHAR_MAX; if (s < outSvcsCount) { pServices[s] = (ULONG)*pOutSvc++; } } *pHandle = handle; *pServicesCount = outSvcsCount; return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelSend( svcID, pTXID ); } /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bDisco = pAPI->Disconnect(); if (bDisco == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetGenericCallback( svcID, msgID, pCallback, handle ); } /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 106; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 133; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 134; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 135; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo2 DESCRIPTION: The function sends 'NAS/Configure Signal Info 2 Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo2( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTDSCDMACellInfo DESCRIPTION: The function sends 'NAS/Get TD-SCDMA Cell Info Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 109; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSGetLineSwitchingStatus DESCRIPTION: The function sends 'Voice/ALS Get Line Switching Status Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetLineSwitchingStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSGetSelectedLine DESCRIPTION: The function sends 'Voice/ALS Get Selected Line Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetSelectedLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 4; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 5; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 6; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 7; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 8; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 14; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 15; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 16; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 17; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 18; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 20; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 21; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 22; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 23; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 26; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 27; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/000077500000000000000000000000001455567757300225255ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/GobiCMCallback.cpp000066400000000000000000000236641455567757300257610ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.cpp DESCRIPTION: Contains the implementation of each Gobi CM callback function. Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMCallback.h" #include /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: WDSEventReportCallback (Free Method) DESCRIPTION: Function called by WDS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 1) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x17 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_DataBearerTechnology)) { pTmp++; const sWDSEventReportIndication_DataBearerTechnology * pDBT = (const sWDSEventReportIndication_DataBearerTechnology *)pTmp; gpCM->OnDataBearerCBNotification( pDBT->mDataBearerTechnology ); } } ULONGLONG txTotalBytes = ULLONG_MAX; ULONGLONG rxTotalBytes = ULLONG_MAX; pIter = tlvs.find( 0x19 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_TXBytes)) { pTmp++; const sWDSEventReportIndication_TXBytes * pTX = (const sWDSEventReportIndication_TXBytes *)pTmp; txTotalBytes = pTX->mTXByteTotal; } } pIter = tlvs.find( 0x1A ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_RXBytes)) { pTmp++; const sWDSEventReportIndication_RXBytes * pRX = (const sWDSEventReportIndication_RXBytes *)pTmp; rxTotalBytes = pRX->mRXByteTotal; } } if (txTotalBytes != ULLONG_MAX || rxTotalBytes != ULLONG_MAX) { gpCM->OnByteTotalsNotification( rxTotalBytes, txTotalBytes ); } } /*=========================================================================== METHOD: WDSSessionStateCallback (Free Method) DESCRIPTION: Function called by WDS packet service status callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 34) { return; } ULONG state = ULONG_MAX; std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x01 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSPacketServiceStatusReportIndication_Status)) { pTmp++; const sWDSPacketServiceStatusReportIndication_Status * pState = (const sWDSPacketServiceStatusReportIndication_Status *)pTmp; state = pState->mConnectionStatus; } } if (state != ULONG_MAX) { gpCM->OnSessionStateCBNotification( state ); } } /*=========================================================================== METHOD: NASEventReportCallback (Free Method) DESCRIPTION: Function called by NAS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 2) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter == tlvs.end()) { return; } const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASEventReportIndication_SignalStrength)) { pTmp++; const sNASEventReportIndication_SignalStrength * pSS = (const sNASEventReportIndication_SignalStrength *)pTmp; gpCM->OnSignalStrengthCBNotificaion( pSS->mSignalStrengthdBm, pSS->mRadioInterface ); } } /*=========================================================================== METHOD: NASServingSystemCallback (Free Method) DESCRIPTION: Function called by NAS serving system callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 36) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASServingSystemIndication_RoamingIndicator)) { pTmp++; const sNASServingSystemIndication_RoamingIndicator * pRI = (const sNASServingSystemIndication_RoamingIndicator *)pTmp; BYTE roam = pRI->mRoamingIndicator; if (roam == 0xFF) { gpCM->SetRoam( "Unknown" ); } else { std::ostringstream roamStr; roamStr << roam; gpCM->SetRoam( roamStr.str() ); } } } pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASServingSystemIndication_DataServices ); if (tlvLen < dsLen) { return; } pTmp++; const sNASServingSystemIndication_DataServices * pDS = (const sNASServingSystemIndication_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return; } pDS++; gpCM->OnDataCapsNotification( dcCount, (eQMINASDataServiceCapabilities2 *)pDS ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/GobiCMCallback.h000066400000000000000000000067311455567757300254220ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.h DESCRIPTION: Contains the declaration of each Gobi CM callback function, structures needed for these callbacks and message IDs for each callback Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // WDS event report callback void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // WDS packet service status callback void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS event report callback void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS serving system callback void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/GobiCMDLL.cpp000066400000000000000000001005221455567757300246650ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.cpp DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" #include "GobiConnectionMgmtAPIStructs.h" #include "Gobi3000Translation.h" #include /*=========================================================================*/ // cGobiCMDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetString (Internal Method) DESCRIPTION: Call a Gobi CM API function that returns a string PARAMETERS: mpFnString [ I ] - Gobi CM API function pointer tlvID [ I ] - ID of response TLV that contains the string strSz [ I ] - Max string size (including NULL terminator) pStr [ O ] - Buffer to hold the string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ) { // Assume failure if (strSz > 0 && pStr != 0) { pStr[0] = 0; } // Query for string? ULONG status = eGOBI_ERR_GENERAL; if (mpFnString == 0 || mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = mpFnString( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( tlvID ); if (pIter == tlvs.end()) { return eGOBI_ERR_GENERAL; } const sQMIRawContentHeader * pTmp = pIter->second; ULONG strLen = (ULONG)pTmp->mLength; pTmp++; if (strLen != 0 && strSz > 0 && pStr != 0) { ULONG needLen = strLen; if (needLen + 1 > strSz) { needLen = strSz - 1; } memcpy( pStr, pTmp, needLen ); pStr[needLen] = 0; } return status; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Calls GobiConnect PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Connect( LPCSTR pInterface ) { // Connect to WDS, DMS, and NAS services ULONG svc[3] = { 1, 2, 3 }; ULONG svcCount = 3; GOBIHANDLE handle = 0; ULONG status = GobiConnect( pInterface, &svcCount, &svc[0], &handle ); if (status == 0) { if (svcCount == 3) { mhGobi = handle; } else { // We require WDS, DMS, and NAS services Disconnect(); status = eGOBI_ERR_GENERAL; } } return status; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Disconnect() { if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } return GobiDisconnect( mhGobi ); } /*=========================================================================== ETHOD: StartDataSession (Public Method) DESCRIPTION: Calls WDSStartNetworkInterface PARAMETERS: pAPN [ I ] - Access point name pUser [ I ] - Username pPwd [ I ] - Password pSessionID [ O ] - Session ID pFailureCode [ O ] - Failure code (if present) RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ) { // Assume failure if (pSessionID != 0) { *pSessionID = 0xFFFFFFFF; } // Start a data session? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x16; pTLV->mLength = (UINT16)sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); pData += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pAuth = (sWDSStartNetworkInterfaceRequest_Authentication *)pData; pAuth->mEnablePAP = 1; pAuth->mEnableCHAP = 1; pData += sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (pAPN != 0 && pAPN[0] != 0) { size_t len = strnlen( pAPN, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x14; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pAPN, len ); pData += len; } if (pUser != 0 && pUser[0] != 0) { size_t len = strnlen( pUser, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x17; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pUser, len ); pData += len; } if (pPwd != 0 && pPwd[0] != 0) { size_t len = strnlen( pPwd, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x18; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pPwd, len ); pData += len; } ULONG li = (ULONG)pData - (ULONG)&req[0]; ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSStartNetworkInterface( mhGobi, 300000, li, &req[0], &lo, &rsp[0] ); // On success pSessionID is valid, on failure pFailureCode is valid ULONG status2 = ParseStartDataSession( lo, &rsp[0], pSessionID, pFailureCode ); if (status == eGOBI_ERR_NONE) { return status2; } return status; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Calls GobiCancel/WDSAbort RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::CancelDataSession() { // Cancel outstanding API request? if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } // Cancel the request with the API ULONG svcID = 1; ULONG txID = 0xFFFFFFFF; ULONG status = GobiCancel( mhGobi, svcID, &txID ); if (status != 0 || txID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } UINT8 req[256] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x01; pTLV->mLength = (UINT16)sizeof( sWDSAbortRequest_TransactionID ); pData += sizeof( sQMIRawContentHeader ); sWDSAbortRequest_TransactionID * pID = (sWDSAbortRequest_TransactionID *)pData; pID->mTransactionID = (UINT16)txID; pData += sizeof( sWDSAbortRequest_TransactionID ); // Cancel the request with the device ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSAbort( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: StopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface PARAMETERS: sessionID [ I ] - Session ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StopDataSession( ULONG sessionID ) { ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[256] = { 0 }; ULONG li = 256; status = PackStopDataSession( &li, &req[0], sessionID ); if (status != 0) { return status; } // Stop data session status = WDSStopNetworkInterface( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: GetSessionState (Public Method) DESCRIPTION: Calls WDSGetPacketServiceStatus PARAMETERS: pSessionState [ O ] - Current session state RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionState( ULONG * pSessionState ) { // Assume failure if (pSessionState != 0) { *pSessionState = 0xFFFFFFFF; } ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetPacketServiceStatus( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionState( lo, &rsp[0], pSessionState ); return status; } /*=========================================================================== METHOD: GetSessionDuration (Public Method) DESCRIPTION: Calls WDSGetDataSessionDuration PARAMETERS: pSessionDuration [ O ] - Session duration RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionDuration( ULONGLONG * pSessionDuration ) { // Assume failure if (pSessionDuration != 0) { *pSessionDuration = 0xFFFFFFFF; } // Query for session duration ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataSessionDuration( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionDuration( lo, &rsp[0], pSessionDuration ); return status; } /*=========================================================================== METHOD: GetDataBearerTechnology (Public Method) DESCRIPTION: Calls WDSGetDataBearerTechnology PARAMETERS: pDataBearerTech [ O ] - Data bearer technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetDataBearerTechnology( ULONG * pDataBearerTech ) { // Assume failure if (pDataBearerTech != 0) { *pDataBearerTech = 0xFFFFFFFF; } // Query for data bearer duration? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataBearerTechnology( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetDataBearerTechnology( lo, &rsp[0], pDataBearerTech ); return status; } /*=========================================================================== METHOD: GetConnectionRate (Public Method) DESCRIPTION: Calls WDSGetChannelRates PARAMETERS: pCurTX [ O ] - Current TX rate pCurRX [ O ] - Current RX rate pMaxTX [ O ] - Max TX rate pMaxRX [ O ] - Max RX rate RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ) { // Assume failure pCurTX != 0 ? *pCurTX = 0xFFFFFFFF : 0; pCurRX != 0 ? *pCurRX = 0xFFFFFFFF : 0; pMaxTX != 0 ? *pMaxTX = 0xFFFFFFFF : 0; pMaxRX != 0 ? *pMaxRX = 0xFFFFFFFF : 0; // Query for rates? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetChannelRates( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetConnectionRate( lo, &rsp[0], pCurTX, pCurRX, pMaxTX, pMaxRX ); return status; } /*=========================================================================== METHOD: GetFirmwareRevision (Public Method) DESCRIPTION: Calls DMSGetDeviceRevision PARAMETERS: strSz [ I ] - Maximum number of characters pStr [ O ] - Firmware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetFirmwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetManufacturer (Public Method) DESCRIPTION: Calls DMSGetDeviceManfacturer PARAMETERS: strSz [ I ] - Maximum string size pStr [ O ] - Manufacturer string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetManufacturer( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceManfacturer, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetModelID (Public Method) DESCRIPTION: Calls GetModelID PARAMETERS: strSz [ I ] - Max string size pStr [ O ] - Model ID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetModelID( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceModel, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetHardwareRevision (Public Method) DESCRIPTION: Calls DMSGetHardwareRevision PARAMETERS: strSz [ I ] - Max size of string pStr [ O ] - Hardware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHardwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetHardwareRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetVoiceNumber (Public Method) DESCRIPTION: Calls GetVoiceNumber PARAMETERS: voiceSz [ I ] - Max characters in voice string pVoiceStr [ O ] - Voice number string minSz [ I ] - Max characters in MIN string pMINStr [ O ] - MIN string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ) { // Assume failure if (voiceSz > 0 && pVoiceStr != 0) { pVoiceStr[0] = 0; } if (minSz > 0 && pMINStr != 0) { pMINStr[0] = 0; } // Query for voice numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceVoiceNumber( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetVoiceNumber( lo, &rsp[0], voiceSz, pVoiceStr, minSz, pMINStr ); return status; } /*=========================================================================== METHOD: GetSerialNumbers (Public Method) DESCRIPTION: Calls DMSGetDeviceSerialNumbers PARAMETERS: esnSz [ I ] - ESN size pESNStr [ O ] - ESN string imeiSz [ I ] - IMEI size pIMEIStr [ O ] - IMSI string meidSz [ I ] - MEID size pMEIDStr [ O ] - MEID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ) { // Assume failure if (esnSz > 0 && pESNStr != 0) { pESNStr[0] = 0; } if (imeiSz > 0 && pIMEIStr != 0) { pIMEIStr[0] = 0; } if (meidSz > 0 && pMEIDStr != 0) { pMEIDStr[0] = 0; } // Query for serial numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceSerialNumbers( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSerialNumbers( lo, &rsp[0], esnSz, pESNStr, imeiSz, pIMEIStr, meidSz, pMEIDStr ); return status; } /*=========================================================================== METHOD: GetIMSI (Public Method) DESCRIPTION: Get IMSI PARAMETERS: imsiSz [ I ] - IMSI size pIMSIStr [ O ] - IMSI string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ) { return GetString( DMSGetDeviceVoiceNumber, 0x11, imsiSz, pIMSIStr ); } /*=========================================================================== METHOD: GetSignalStrengths (Public Method) DESCRIPTION: Calls NASGetSignalStrength PARAMETERS: pSigStrengths [ O ] - Received signal strength pRadioInterfaces [ O ] - Radio interface technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ) { // Assume failure for (ULONG s = 0; s < MAX_SIGNALS; s++) { pSigStrengths[s] = 0; pRadioInterfaces[s] = 0xFFFFFFFF; } // Query for signal strengths? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = NASGetSignalStrength( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSignalStrength( lo, &rsp[0], pSigStrengths, pRadioInterfaces ); return status; } /*=========================================================================== METHOD: GetServingNetwork (Public Method) DESCRIPTION: Calls NASGetServingSystem PARAMETERS: pDataCapabilities [ O ] - Data capabilities pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - Network name max size pName [ O ] - Network name pSID [ O ] - System ID pNID [ O ] - Network ID pRoam [ O ] - Roaming indicator RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ) { // Assume failure for (ULONG d = 0; d < MAX_DATA_CAPABILITIES; d++) { pDataCapabilities[d] = 0xFFFFFFFF; } if (nameSize > 0 && pName != 0) { pName[0] = 0; } pMCC != 0 ? *pMCC = 0xFFFF : 0; pMNC != 0 ? *pMNC = 0xFFFF : 0; pRoam != 0 ? *pRoam = 0xFFFFFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for serving system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetServingSystem( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASGetServingSystemResponse_DataServices ); if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DataServices * pDS = (const sNASGetServingSystemResponse_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pDS++; eQMINASDataServiceCapabilities2 * pCap = (eQMINASDataServiceCapabilities2 *)pDS; if (dcCount > MAX_DATA_CAPABILITIES) { dcCount = MAX_DATA_CAPABILITIES; } for (ULONG i = 0; i < dcCount; i++) { pDataCapabilities[i] = (ULONG)*pCap++; } } pIter = tlvs.find( 0x12 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG plmnLen = (ULONG)sizeof( sNASGetServingSystemResponse_CurrentPLMN ); if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_CurrentPLMN * pPLMN = (const sNASGetServingSystemResponse_CurrentPLMN *)pTmp; ULONG strLen = (ULONG)pPLMN->mDescriptionLength; plmnLen += strLen; if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pMCC != 0 ? *pMCC = (ULONG)pPLMN->mMobileCountryCode : 0; pMNC != 0 ? *pMNC = (ULONG)pPLMN->mMobileNetworkCode : 0; pPLMN++; if (strLen != 0 && nameSize > 0 && pName != 0) { ULONG needLen = strLen; if (needLen + 1 > nameSize) { needLen = nameSize - 1; } memcpy( pName, pPLMN, needLen ); pName[needLen] = 0; } } pIter = tlvs.find( 0x13 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG sysLen = (ULONG)sizeof( sNASGetServingSystemResponse_SystemID ); if (tlvLen < sysLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_SystemID * pSys = (const sNASGetServingSystemResponse_SystemID *)pTmp; pSID != 0 ? *pSID = (ULONG)pSys->mSystemID : 0; pNID != 0 ? *pNID = (ULONG)pSys->mNetworkID : 0; } pIter = tlvs.find( 0x16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG roamLen = (ULONG)sizeof( sNASGetServingSystemResponse_DefaultRoaming ); if (tlvLen < roamLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DefaultRoaming * pDR = (const sNASGetServingSystemResponse_DefaultRoaming *)pTmp; pRoam != 0 ? *pRoam = (ULONG)pDR->mRoamingIndicator : 0; } return status; } /*=========================================================================== METHOD: GetHomeNetwork (Public Method) DESCRIPTION: Calls NASGetHomeNetwork PARAMETERS: pHomeMCC [ O ] - Mobile country code pHomeMNC [ O ] - Mobile network code homeNameSize [ I ] - Max name size pHomeName [ O ] - Home network name pSID [ O ] - System ID pNID [ O ] - Network ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ) { // Assume failure if (homeNameSize > 0 && pHomeName != 0) { pHomeName[0] = 0; } pHomeMCC != 0 ? *pHomeMCC = 0xFFFF : 0; pHomeMNC != 0 ? *pHomeMNC = 0xFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for home system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetHomeNetwork( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetHomeNetwork( lo, &rsp[0], pHomeMCC, pHomeMNC, homeNameSize, pHomeName, pSID, pNID ); return status; } /*=========================================================================== METHOD: SetWDSEventReportCB (Public Method) DESCRIPTION: Calls WDSSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer interval [ I ] - Interval (in seconds) for transfer statistics RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ) { // Set WDS event callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x11; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_TransferStatisticsIndicator * pTS = (sWDSSetEventReportRequest_TransferStatisticsIndicator *)pData; pTS->mTransferStatisticsIntervalSeconds = interval; pTS->mReportTXPacketSuccesses = 0; pTS->mReportRXPacketSuccesses = 0; pTS->mReportTXPacketErrors = 0; pTS->mReportRXPacketErrors = 0; pTS->mReportTXOverflows = 0; pTS->mReportRXOverflows = 0; pTS->mTXByteTotal = 1; pTS->mRXByteTotal = 1; pData += sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x12; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_DataBearerTechnologyIndicator * pTI = (sWDSSetEventReportRequest_DataBearerTechnologyIndicator *)pData; pTI->mReportDataBearerTechnology = 1; pData += sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 1, pCallback ); return status; } /*=========================================================================== METHOD: SetWDSSessionStateCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSSessionStateCB( tFNGenericCallback pCallback ) { // Set WDS packet service status callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 34, pCallback ); return status; } /*=========================================================================== METHOD: SetNASEventReportCB (Public Method) DESCRIPTION: Calls NASSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer thresholdsSize [ I ] - Threshold size pThresholds [ I ] - Array of thresholds RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ) { // Set NAS event report callback request? ULONG status = eGOBI_ERR_GENERAL; if ( (mhGobi == 0) || (thresholdsSize > 0 && pThresholds == 0) ) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x10; pTLV->mLength = (UINT16)sizeof( sNASSetEventReportRequest_SignalIndicator ); pTLV->mLength += (UINT16)thresholdsSize; pData += sizeof( sQMIRawContentHeader ); sNASSetEventReportRequest_SignalIndicator * pSI = (sNASSetEventReportRequest_SignalIndicator *)pData; pSI->mReportSignalStrength = 1; pSI->mNumberOfThresholds = thresholdsSize; pData += sizeof( sNASSetEventReportRequest_SignalIndicator ); for (UINT8 i = 0; i < thresholdsSize; i++) { INT8 * pThresh = (INT8 *)pData; *pThresh = pThresholds[i]; pData++; } ULONG li = (ULONG)pData - (ULONG)&req[0]; status = NASSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 2, pCallback ); return status; } /*=========================================================================== METHOD: SetNASServingSystemCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASServingSystemCB( tFNGenericCallback pCallback ) { // Set NAS serving system request? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 36, pCallback ); return status; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/GobiCMDLL.h000066400000000000000000000212371455567757300243370ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.h DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiConnectionMgmtAPI.h" #include "GobiConnectionMgmtAPIStructs.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; // The maximum number of signals const ULONG MAX_SIGNALS = 12; // The maximum number of data capabilities const ULONG MAX_DATA_CAPABILITIES = 12; // Gobi input/output function pointer typedef ULONG (* tFNGobiInputOutput)( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLVs (Internal Method) DESCRIPTION: Convert response buffer to a TLV map PARAMETERS: pRsp [ I ] - The response buffer rspSz [ I ] - The size of the above buffer RETURN VALUE: std::map ===========================================================================*/ inline std::map GetTLVs( const UINT8 * pRsp, ULONG rspSz ) { std::map retMap; ULONG dataProcessed = 0; const UINT8 * pData = &pRsp[0]; while (dataProcessed < rspSz) { dataProcessed += (ULONG)sizeof( sQMIRawContentHeader ); if (dataProcessed > rspSz) { break; } const sQMIRawContentHeader * pTLV = (const sQMIRawContentHeader *)pData; dataProcessed += (ULONG)pTLV->mLength; if (dataProcessed > rspSz) { break; } retMap[pTLV->mTypeID] = pTLV; pData = &pRsp[dataProcessed]; } return retMap; }; /*=========================================================================*/ // Class cGobiCMDLL /*=========================================================================*/ class cGobiCMDLL { public: // Constructor cGobiCMDLL() : mhGobi( 0 ) { } // Destructor ~cGobiCMDLL() { } // Connect ULONG Connect( LPCSTR pInterface ); // Disconnect ULONG Disconnect(); // Start data session ULONG StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ); // Cancel data session ULONG CancelDataSession(); // Stop data session ULONG StopDataSession( ULONG sessionID ); // Get session state ULONG GetSessionState( ULONG * pSessionState ); // Get session duration ULONG GetSessionDuration( ULONGLONG * pSessionDuration ); // Get data bearer technology ULONG GetDataBearerTechnology( ULONG * pDataBearerTech ); // Get connection rate ULONG GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ); // Get firmware revision ULONG GetFirmwareRevision( BYTE strSz, CHAR * pStr ); // Get manufacturer ULONG GetManufacturer( BYTE strSz, CHAR * pStr ); // Get model ID ULONG GetModelID( BYTE strSz, CHAR * pStr ); // Get hardware revision ULONG GetHardwareRevision( BYTE strSz, CHAR * pStr ); // Get voice number ULONG GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ); // Get serial numbers ULONG GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ); // Get IMSI ULONG GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ); // Get signal strengths ULONG GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ); // Get serving network ULONG GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ); // Get home network ULONG GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ); // Set WDS event report callback ULONG SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ); // Set WDS packet service status callback ULONG SetWDSSessionStateCB( tFNGenericCallback pCallback ); // Set NAS event report callback ULONG SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ); // Set NAS serving system callback ULONG SetNASServingSystemCB( tFNGenericCallback pCallback ); protected: // Call a Gobi CM API function that returns a string ULONG GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ); /* Handle to Gobi API */ GOBIHANDLE mhGobi; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/QTSampleCM.cpp000066400000000000000000000227361455567757300251510ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.cpp DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cQTSampleCM QT implementation of the Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QTSampleCM.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: AsyncConnectThread (Free Method) DESCRIPTION: Start a data session PARAMETERS: pData [ I ] - cQTSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * AsyncConnectThread( void * pData ) { cQTSampleCM * pCM = (cQTSampleCM*)pData; if (pCM == NULL) { return NULL; } // Open the dialog window, disable the info and connection stats buttons pCM->mView.rootContext()->setContextProperty( "dialogText", "Connecting, please wait..." ); pCM->mView.rootContext()->setContextProperty( "windowState", "connectingDialog" ); ULONG failureCode = 0xFFFFFFFF; ULONG rc = pCM->OnStartDataSession( &failureCode ); if (rc != eGOBI_ERR_NONE) { std::ostringstream error; error << "Failed to connect, error " << rc; TRACE( "rc %lu, failure code %lu", rc, failureCode ); // Show failure code, if present if (rc == 1014 && failureCode != 0xFFFFFFFF) { error << "\nCall failure reason " << failureCode; } pCM->mView.rootContext()->setContextProperty( "dialogText", error.str().c_str() ); pCM->SetConnectButtonText( "Connect" ); } else { pCM->mView.rootContext()->setContextProperty( "dialogText", "Success!" ); // Connect button should be updated by state change indication } // Leave the dialog up for 2s sleep( 2 ); pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return NULL; } /*=========================================================================== METHOD: OnInfosButton (Free Method) DESCRIPTION: Move to the info stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnInfosButton( cQTSampleCM * pCM ) { pCM->mView.rootContext()->setContextProperty( "windowState", "infos" ); return 0; } /*=========================================================================== METHOD: OnConnectionsButton (Free Method) DESCRIPTION: Move to the connection stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectionsButton( cQTSampleCM * pCM ) { // "" is the default state (connection stats page) pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return 0; } /*=========================================================================== METHOD: OnConnectButton (Free Method) DESCRIPTION: Start, cancel, or disconnect from a data session NOTE: The UI is not updated until this function returns, so the connection will be established asynchronously PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectButton( cQTSampleCM * pCM ) { // Double check if there a device connected if (pCM->mDeviceID.size() == 0 || pCM->mConnectButtonText.compare( "No Device" ) == 0) { TRACE( "No Device" ); return 0; } // Start a connection if (pCM->mConnectButtonText.compare( "Connect" ) == 0) { pCM->SetConnectButtonText( "Cancel" ); // Create a detached thread to start the connection asynchronously pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); pthread_create( &pCM->mAsyncConnectThreadID, &attributes, AsyncConnectThread, pCM ); } else if (pCM->mConnectButtonText.compare( "Cancel" ) == 0) { pCM->OnCancelDataSession(); pCM->SetConnectButtonText( "Connect" ); } else if (pCM->mConnectButtonText.compare( "Disconnect" ) == 0) { pCM->OnStopDataSession(); pCM->SetConnectButtonText( "Connect" ); } else { // Externally connected, etc TRACE( "Unknown connect button state %s", pCM->mConnectButtonText.c_str() ); } return 0; } /*=========================================================================*/ // cQTSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI RETURN VALUE: bool ===========================================================================*/ bool cQTSampleCM::Init() { // Use the current screen orientation mView.setOrientation( QmlApplicationViewer::ScreenOrientationAuto ); // The buttons mView.rootContext()->setContextProperty( "connectButton", &mConnectButton ); mView.rootContext()->setContextProperty( "infosButton", &mInfosButton ); mView.rootContext()->setContextProperty( "connectionsButton", &mConnectionsButton ); // The input fields mView.rootContext()->setContextProperty( "apnNameText", &mAPNText ); mView.rootContext()->setContextProperty( "usernameText", &mUsernameText ); mView.rootContext()->setContextProperty( "passwordText", &mPasswordText ); // Default button value SetConnectButtonText( "No Device" ); // Default state mView.rootContext()->setContextProperty( "windowState", "" ); mView.rootContext()->setContextProperty( "dialogText", "" ); bool bRC = cSampleCM::Init(); mView.setMainQmlFile( "qml/GobiSampleCM/main.qml" ); mView.show(); return bRC; } /*=========================================================================== METHOD: Run (Public Method) DESCRIPTION: Run the GUI (blocks until exit) RETURN VALUE: bool ===========================================================================*/ int cQTSampleCM::Run() { return mApp.exec(); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::Disconnect() { SetConnectButtonText( "No device" ); return cSampleCM::Disconnect(); } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Updates apn, username, and password input field values before starting a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::OnStartDataSession( ULONG * pFailureCode ) { // Grab the APN, username, and password mAPN = mAPNText.getText().toUtf8().constData(); mUsername = mUsernameText.getText().toUtf8().constData(); mPassword = mPasswordText.getText().toUtf8().constData(); return cSampleCM::OnStartDataSession( pFailureCode ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/QTSampleCM.h000066400000000000000000000307051455567757300246110ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.h DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cButton Generic clickable button for QT cTextInput Generic text input field for QT cQTSampleCM QT implementation of the Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "qmlapplicationviewer.h" #include #include #include "SampleCM.h" // Prototypes class cQTSampleCM; void * AsyncConnectThread( void * pData ); QVariant OnInfosButton( cQTSampleCM * pCM ); QVariant OnConnectionsButton( cQTSampleCM * pCM ); QVariant OnConnectButton( cQTSampleCM * pCM ); /*=========================================================================*/ // Class cButton // Generic clickable button for QT /*=========================================================================*/ class cButton : public QObject { Q_OBJECT public: // Constructor cButton( cQTSampleCM * pCM, QVariant (*pOnClick)( cQTSampleCM * ) ) { mpCM = pCM; mpOnClick = pOnClick; } public slots: // Function to be run on a click event QVariant Click() { if (mpOnClick != 0) { return mpOnClick( mpCM ); } return ""; } protected: /* The main object */ cQTSampleCM * mpCM; /* Function to run when clicked */ QVariant (* mpOnClick)( cQTSampleCM * ); }; /*=========================================================================*/ // cTextInput // Generic text input field for QT /*=========================================================================*/ class cTextInput : public QObject { Q_OBJECT Q_PROPERTY( QString text READ getText WRITE setText ) public slots: // Get the value QString getText() const { return mText; } // Set the value void setText( const QString & text ) { mText = text; } private: /* The text */ QString mText; }; /*=========================================================================*/ // Class cQTSampleCM /*=========================================================================*/ class cQTSampleCM : public cSampleCM { public: // Constructor cQTSampleCM( int argc, char ** argv ) : mApp( argc, argv ), mConnectButtonText( "No Device" ), mConnectButton( this, OnConnectButton ), mInfosButton( this, OnInfosButton ), mConnectionsButton( this, OnConnectionsButton ) { } // Initialize UI, begin waiting for devices bool Init(); // Run the GUI (blocks until exit) int Run(); // Disconnect ULONG Disconnect(); // Process a start data session request ULONG OnStartDataSession( ULONG * pFailureCode ); // Set mState and the connection button void SetState( const std::string & state ) { cSampleCM::SetState( state ); // Update the connection button as well switch (mSessionState) { case eQMIConnectionStatus_Disconnected: { SetConnectButtonText( "Connect" ); if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { // Clear the initial state mInitialState = eQMIConnectionStatus_Disconnected; } } break; case eQMIConnectionStatus_Connected: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "External Con" ); } else { SetConnectButtonText( "Disconnect" ); } } break; case eQMIConnectionStatus_Authenticating: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "Ext Connecting" ); } else { SetConnectButtonText( "Cancel" ); } } break; case eQMIConnectionStatus_Suspended: default: break; } // No more than 12 characters if (mState.size() > 12) { mState.resize( 12 ); } // Note: "state" is already a property, can't duplicate // using "status" instead mView.rootContext()->setContextProperty( "status", mState.c_str() ); } // Set mRSSI void SetRSSI( const std::string & rssi ) { cSampleCM::SetRSSI( rssi ); mView.rootContext()->setContextProperty( "rssi", mRSSI.c_str() ); } // Set mTech void SetTech( const std::string & tech ) { cSampleCM::SetTech( tech ); // No more than 12 characters if (mTech.size() > 12) { mTech.resize( 12 ); } mView.rootContext()->setContextProperty( "tech", mTech.c_str() ); } // Set mRx void SetRx( const std::string & rx ) { cSampleCM::SetRx( rx ); mView.rootContext()->setContextProperty( "rx", mRx.c_str() ); } // Set mTx void SetTx( const std::string & tx ) { cSampleCM::SetTx( tx ); mView.rootContext()->setContextProperty( "tx", mTx.c_str() ); } // Set mMaxRx void SetMaxRx( const std::string & maxRx ) { cSampleCM::SetMaxRx( maxRx ); mView.rootContext()->setContextProperty( "maxRx", mMaxRx.c_str() ); } // Set mMaxTx void SetMaxTx( const std::string & maxTx ) { cSampleCM::SetMaxTx( maxTx ); mView.rootContext()->setContextProperty( "maxTx", mMaxTx.c_str() ); } // Set mRoam void SetRoam( const std::string & roam ) { cSampleCM::SetRoam( roam ); mView.rootContext()->setContextProperty( "roam", mRoam.c_str() ); } // Set mDuration void SetDuration( const std::string & duration ) { cSampleCM::SetDuration( duration ); mView.rootContext()->setContextProperty( "duration", mDuration.c_str() ); } // Set mLifeDuration void SetLifeDuration( const std::string & lifeDuration ) { cSampleCM::SetLifeDuration( lifeDuration ); mView.rootContext()->setContextProperty( "lifeDuration", mLifeDuration.c_str() ); } // Set mLifeRx void SetLifeRx( const std::string & lifeRx ) { cSampleCM::SetLifeRx( lifeRx ); mView.rootContext()->setContextProperty( "lifeRx", mLifeRx.c_str() ); } // Set mLifeTx void SetLifeTx( const std::string & lifeTx ) { cSampleCM::SetLifeTx( lifeTx ); mView.rootContext()->setContextProperty( "lifeTx", mLifeTx.c_str() ); } // Set mManufact void SetManufact( const std::string & manufact ) { cSampleCM::SetManufact( manufact ); mView.rootContext()->setContextProperty( "manufact", mManufact.c_str() ); } // Set mModel void SetModel( const std::string & model ) { cSampleCM::SetModel( model ); // No more than 20 characters if (mModel.size() > 20) { mModel.resize( 20 ); } mView.rootContext()->setContextProperty( "model", mModel.c_str() ); } // Set mHardware void SetHardware( const std::string & hardware ) { cSampleCM::SetHardware( hardware ); mView.rootContext()->setContextProperty( "hardware", mHardware.c_str() ); } // Set mFirmware void SetFirmware( const std::string & firmware ) { cSampleCM::SetFirmware( firmware ); // No more than 20 characters if (mFirmware.size() > 20) { mFirmware.resize( 20 ); } mView.rootContext()->setContextProperty( "firmware", mFirmware.c_str() ); } // Set mMDN void SetMDN( const std::string & mdn ) { cSampleCM::SetMDN( mdn ); mView.rootContext()->setContextProperty( "mdn", mMDN.c_str() ); } // Set mMIN void SetMIN( const std::string & min ) { cSampleCM::SetMIN( min ); mView.rootContext()->setContextProperty( "min", mMIN.c_str() ); } // Set mESN void SetESN( const std::string & esn ) { cSampleCM::SetESN( esn ); mView.rootContext()->setContextProperty( "esn", mESN.c_str() ); } // Set mMEID void SetMEID( const std::string & meid ) { cSampleCM::SetMEID( meid ); mView.rootContext()->setContextProperty( "meid", mMEID.c_str() ); } // Set mIMEI void SetIMEI( const std::string & imei ) { cSampleCM::SetIMEI( imei ); mView.rootContext()->setContextProperty( "imei", mIMEI.c_str() ); } // Set mIMSI void SetIMSI( const std::string & imsi ) { cSampleCM::SetIMSI( imsi ); mView.rootContext()->setContextProperty( "imsi", mIMSI.c_str() ); } // Set mConnectButtonText void SetConnectButtonText( const std::string & connectButtonText ) { mConnectButtonText = connectButtonText; mView.rootContext()->setContextProperty( "connectButtonText", connectButtonText.c_str() ); } protected: /* QApplication object */ QApplication mApp; /* QmlApplicationViewer object */ QmlApplicationViewer mView; /* APN text input field */ cTextInput mAPNText; /* Username text input field */ cTextInput mUsernameText; /* Password text input field */ cTextInput mPasswordText; /* "Connect" button's text */ std::string mConnectButtonText; /* "Connect" button */ cButton mConnectButton; /* "Info Stats" button */ cButton mInfosButton; /* "Connection Stats" button */ cButton mConnectionsButton; /* Async connection thread ID */ pthread_t mAsyncConnectThreadID; // Friend functions friend void * AsyncConnectThread( void * pData ); friend QVariant OnInfosButton( cQTSampleCM * pCM ); friend QVariant OnConnectionsButton( cQTSampleCM * pCM ); friend QVariant OnConnectButton( cQTSampleCM * pCM ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/SampleCM.cpp000066400000000000000000001337271455567757300247070ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.cpp DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMDLL.h" #include "GobiCMCallback.h" #include "GobiConnectionMgmtAPIStructs.h" #include #include #include #include #include // Global pointer for callbacks to reference class cSampleCM * gpCM; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime; clock_gettime( CLOCK_REALTIME, &curtime ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================== METHOD: DeviceDetectionThread (Free Method) DESCRIPTION: Scans for and detects devices PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * DeviceDetectionThread( void * pData ) { cSampleCM * pCM = (cSampleCM *)pData; if (pCM == NULL) { return NULL; } // Get inotify handle int inotify = inotify_init(); if (inotify == -1) { TRACE( "inotify_init failed\n" ); return NULL; } // Start a watch on the /dev directory int inotifyFlags = IN_CREATE | IN_MODIFY | IN_DELETE; int watchD = inotify_add_watch( inotify, "/dev/", inotifyFlags ); if (watchD == -1) { TRACE( "inotify_add_watch failed\n" ); close( inotify ); return NULL; } // Does a device already exist? dirent ** ppDevFiles; // Yes, scandir really takes a triple pointer for its second param int numDevs = scandir( "/dev/", &ppDevFiles, NULL, NULL ); for (int i = 0; i < numDevs; i++) { std::string deviceID = "/dev/"; deviceID += ppDevFiles[i]->d_name; free( ppDevFiles[i] ); if (deviceID.find( "qcqmi" ) != std::string::npos) { pCM->Connect( deviceID.c_str() ); break; } } // Cleanup from scandir if (numDevs != -1) { free( ppDevFiles ); } else { TRACE( "Scandir failed\n" ); } // Begin async reading fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pCM->mDeviceDetectionStopPipe[READING], &inputSet ); FD_SET( inotify, &inputSet ); int largestFD = std::max( pCM->mDeviceDetectionStopPipe[READING], inotify ); while (true) { // No FD_COPY() available in android memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait for data on either the inotify or the stop pipe int status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { break; } else if (FD_ISSET( pCM->mDeviceDetectionStopPipe[READING], &outputSet ) == true) { // Time to close break; } else if (FD_ISSET( inotify, &outputSet ) == true) { // Perform a read BYTE buffer[1024] = { 0 }; int rc = read( inotify, &buffer[0], 1024 ); if (rc < (int)sizeof( inotify_event )) { continue; } // Typecast the buffer to an inotify event struct inotify_event * pIEvent = (struct inotify_event *)&buffer[0]; // Check the length of the name if (pIEvent->len < 5) { continue; } // Is this a matching device? if (strncmp( pIEvent->name, "qcqmi", 5 ) != 0) { continue; } std::string deviceID = "/dev/"; deviceID += pIEvent->name; if (pIEvent->mask & IN_CREATE || pIEvent->mask & IN_MODIFY) { pCM->Connect( deviceID.c_str() ); } if (pIEvent->mask & IN_DELETE) { // Was it the connected device which was removed? if (pCM->mDeviceID.compare( deviceID ) == 0) { pCM->Disconnect(); } } } } // Cleanup inotify_rm_watch( inotify, watchD ); close( inotify ); return NULL; } /*=========================================================================== METHOD: UpdateNetworkInfoThread (Free Method) DESCRIPTION: Updates the network stats every 1s (while device is present) PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * UpdateNetworkInfoThread( void * pData ) { cSampleCM * pCM = (cSampleCM*)pData; if (pCM == NULL) { return NULL; } // Update once pCM->CheckConnectedStats(); int rc; do { // Update rates and times every 1s pCM->UpdateRateDisplay(); pCM->UpdateTimeDisplay(); DWORD temp; rc = pCM->mUpdateNetworkInfoEvent.Wait( 1000, temp ); } while (rc == ETIME); return NULL; } /*=========================================================================== METHOD: ParseStats (Free Method) DESCRIPTION: Parse the stats file and obtain the TX/RX bytes and connection duration NOTE: The stats text file consists of one line in the following format: Total RX Bytes; Total TX Bytes; Total Duration PARAMETERS: line [ I ] - Line to parse lifeTotalRX [ O ] - Total RX bytes lifeTotalTX [ O ] - Total TX bytes lifeTotalDuration [ O ] - Total connection duration RETURN VALUE: bool ===========================================================================*/ bool ParseStats( std::istringstream & line, ULONGLONG & lifeTotalRX, ULONGLONG & lifeTotalTX, ULONGLONG & lifeTotalDuration ) { ULONGLONG temp1, temp2, temp3; char c1, c2; // Attempt to parse into temp variables, skipping whitespace line >> std::skipws >> temp1 >> c1 >> temp2 >> c2 >> temp3; // Was parsing successful? if (line.fail() == true) { TRACE( "failed to parse stats file\n" ); return false; } else { TRACE( "read %llu, %llu, %llu", temp1, temp2, temp3 ); lifeTotalRX = temp1; lifeTotalTX = temp2; lifeTotalDuration = temp3; return true; } } /*=========================================================================*/ // cSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: ~cSampleCM (Public Method) DESCRIPTION: Destructor - Stops the data session, Stops device detection thread, Writes stats to file RETURN VALUE: None ===========================================================================*/ cSampleCM::~cSampleCM() { // These functions will most likely fail. That's ok. OnCancelDataSession(); OnStopDataSession(); Disconnect(); // Close device detection thread, if open if (mDeviceDetectionStopPipe[WRITING] != -1) { if (mDeviceDetectionThreadID != 0) { BYTE byte = 1; write( mDeviceDetectionStopPipe[WRITING], &byte, 1 ); pthread_join( mDeviceDetectionThreadID, NULL ); mDeviceDetectionThreadID = 0; } close( mDeviceDetectionStopPipe[WRITING] ); close( mDeviceDetectionStopPipe[READING] ); mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; } // Write stats to file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int flags = O_CREAT | O_TRUNC | O_WRONLY; mode_t mode = S_IRUSR | S_IWUSR; int statsFile = open( config.c_str(), flags, mode ); if (statsFile < 0) { TRACE( "Unable to create stats file\n" ); } else { std::ostringstream out; out << mLifeTotalRX << "; " << mLifeTotalTX << "; " << mLifeTotalDuration; int rc = write( statsFile, out.str().c_str(), out.str().size() ); if (rc < 0) { TRACE( "Unable to write stats to file\n" ); } close( statsFile ); } } /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI, begin waiting for devices RETURN VALUE: bool ===========================================================================*/ bool cSampleCM::Init() { Disconnect(); // Read in the stats file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int statsFile = open( config.c_str(), O_RDONLY ); if (statsFile < 0) { // Non-fatal error TRACE( "Unable to open config file %s", config.c_str() ); } else { CHAR buf[100]; int len = read( statsFile, &buf[0], 100 ); if (len < 0) { // Non-fatal error TRACE( "failed to read from file\n" ); } else { std::string asString( &buf[0], len ); std::istringstream line( asString ); ULONGLONG lrx, ltx, ld; if (ParseStats( line, lrx, ltx, ld ) == true) { mLifeTotalRX = lrx; mLifeTotalTX = ltx; mLifeTotalDuration = ld; } } close( statsFile ); } // Life totals will just be zeros if the file was not present std::ostringstream tmp; tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); tmp.str( "" ); tmp << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << mLifeTotalDuration % 60; SetLifeDuration( tmp.str() ); // Set the global pointer, used by callbacks gpCM = this; // Initialize command pipe int ret = pipe( mDeviceDetectionStopPipe ); if (ret != 0) { // Should never happen, but just in case... return false; } // Begin scanning for devices ret = pthread_create( &mDeviceDetectionThreadID, 0, DeviceDetectionThread, this ); if (ret != 0) { return false; } return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Initializes the Gobi API to the current device PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Connect( LPCSTR pInterface ) { // Are we already connected to a device? if (mDeviceID.size() != 0) { return eGOBI_ERR_MULTIPLE_DEVICES; } // Connect to the device ULONG rc = mGobi.Connect( pInterface ); if (rc != eGOBI_ERR_NONE) { TRACE( "GobiConnect error %lu\n", rc ); return rc; } UpdateDeviceInfo(); UpdateConnectionInfo(); // Any connection at this point is an external connection UpdateSessionState( true, mSessionState ); // Success mDeviceID = pInterface; return rc; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Disconnect() { // Stop a data session, if present OnCancelDataSession(); OnStopDataSession(); mGobi.Disconnect(); // Reset state mSessionID = 0xFFFFFFFF; mInitialState = 0xFFFFFFFF; mDataBearerTech = 0; // Store life total mLifeTotalDuration += mTotalDuration; // Reset all totals mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; SetState( "No Device" ); SetRSSI( "Unknown" ); SetTech( "Unknown" ); SetRx( "Unknown" ); SetTx( "Unknown" ); SetMaxRx( "Unknown" ); SetMaxTx( "Unknown" ); SetRoam( "Unknown" ); SetDuration( "Unknown" ); SetLifeDuration( "Unknown" ); SetLifeRx( "Unknown" ); SetLifeTx( "Unknown" ); SetManufact( "Unknown" ); SetModel( "Unknown" ); SetHardware( "Unknown" ); SetFirmware( "Unknown" ); SetMDN( "Unknown" ); SetMIN( "Unknown" ); SetESN( "Unknown" ); SetMEID( "Unknown" ); SetIMEI( "Unknown" ); SetIMSI( "Unknown" ); return eGOBI_ERR_NONE; } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Starts a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStartDataSession( ULONG * pFailureCode ) { mbInitiatedStartDataSession = true; // Use provided values, if not empty strings LPCSTR pAPN = (mAPN.size() == 0) ? 0 : mAPN.c_str(); LPCSTR pUsername = (mUsername.size() == 0) ? 0 : mUsername.c_str(); LPCSTR pPassword = (mPassword.size() == 0) ? 0 : mPassword.c_str(); ULONG rc = mGobi.StartDataSession( pAPN, pUsername, pPassword, &mSessionID, pFailureCode ); if (rc == eGOBI_ERR_NONE) { mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = GetTickCount(); } else { mbInitiatedStartDataSession = false; } return rc; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Cancels an in progress data session request RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnCancelDataSession() { return mGobi.CancelDataSession(); } /*=========================================================================== METHOD: OnStopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStopDataSession() { if (mSessionID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } mbInitiatedStopDataSession = true; mDataBearerTech = 0; ULONG rc = mGobi.StopDataSession( mSessionID ); mSessionID = 0xFFFFFFFF; return rc; } /*=========================================================================== METHOD: OnSignalStrengthCBNotification (Internal Method) DESCRIPTION: Handle signal strength callback notification PARAMETERS: signalStr [ I ] - Signal strength radioInterface [ I ] - Radio interface ===========================================================================*/ void cSampleCM::OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ) { // Update mServiceSignals mServiceSignals[radioInterface] = signalStr; if (mSessionState == eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnSessionStateCBNotification (Internal Method) DESCRIPTION: Handle session state callback notification PARAMETERS: state [ I ] - Session state ===========================================================================*/ void cSampleCM::OnSessionStateCBNotification( ULONG state ) { // Was the state change triggered externally? bool bStateChangeExternal = false; // Save session state if (state == eQMIConnectionStatus_Connected) { // Started externally if (mbInitiatedStartDataSession == false) { bStateChangeExternal = true; mStartTime = GetTickCount(); } } else { mDataBearerTech = 0; // Stopped externally if (mbInitiatedStopDataSession == false) { // Store all life total variables mLifeTotalDuration += mTotalDuration; // Reset all totals bStateChangeExternal = true; mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; } } // Update the session state UpdateSessionState( bStateChangeExternal, state ); // Update the signal strength and technology UpdateSignalAndTech(); // Reset to false mbInitiatedStartDataSession = false; mbInitiatedStopDataSession = false; } /*=========================================================================== METHOD: OnDataBearerCBNotification (Internal Method) DESCRIPTION: Handle data bearer callback notification PARAMETERS: dataBearerTech [ I ] - Data bearer technology ===========================================================================*/ void cSampleCM::OnDataBearerCBNotification( ULONG dataBearerTech ) { if (dataBearerTech != eQMIDataBearerTechnologies_Unknown) { mDataBearerTech = dataBearerTech; UpdateSignalAndTech(); } } /*=========================================================================== METHOD: OnDataCapsNotification (Internal Method) DESCRIPTION: Handle data capabilities callback notification PARAMETERS: numDataCaps [ I ] - Number of data capabilities pDataCaps [ I ] - Data Capabilites ===========================================================================*/ void cSampleCM::OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ) { // Clear saved data capabilities in order to update mDataCapabilities.clear(); // Populate list with new capabilities for (ULONG c = 0; c < numDataCaps; c++) { ULONG dataCaps = pDataCaps[c]; if ( (dataCaps != 0xFFFFFFFF) && (dataCaps != 0) ) { mDataCapabilities.push_back( pDataCaps[c] ); } } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnByteTotalsNotification (Internal Method) DESCRIPTION: Handle byte totals callback notification PARAMETERS: rx [ I ] - received bytes tx [ I ] - transmitted bytes ===========================================================================*/ void cSampleCM::OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ) { mTotalTX = tx; mTotalRX = rx; } /*=========================================================================== METHOD: UpdateSignalAndTech (Public Method) DESCRIPTION: Update the signal strength and technology display ===========================================================================*/ void cSampleCM::UpdateSignalAndTech() { std::string radioStr = "Unknown"; std::string ssStr = "Unknown"; ULONG radioVal = eQMINASRadioInterfaces_NoneNoService; // If connected, use data bearer if (mDataBearerTech != 0) { switch (mDataBearerTech) { case eQMIDataBearerTechnologies_CDMA20001x: radioStr = "CDMA 1xRTT"; radioVal = eQMINASRadioInterfaces_CDMA20001x; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORev0: radioStr = "CDMA 1xEVDO Rev 0"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_GPRS: radioStr = "GRPS"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_WCDMA: radioStr = "WCDMA"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORevA: radioStr = "CDMA 1xEVDO Rev A"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_EGPRS: radioStr = "EDGE"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_HSDPAWCDMA: radioStr = "HSDPA DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_WCDMAHSUPA: radioStr = "WCDMA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAHSUPA: radioStr = "HSDPA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_LTE: radioStr = "LTE"; radioVal = eQMINASRadioInterfaces_LTE; break; case eQMIDataBearerTechnologies_CDMA2000EHRPD: radioStr = "CDMA 1xEVDO eHRPD"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_HSDPAPlusWCDMA: radioStr = "HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAPlusHSUPA: radioStr = "HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA: radioStr = "Dual Cell HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA: radioStr = "Dual Cell HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; } if ( (radioVal != eQMINASRadioInterfaces_NoneNoService) && (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } else { // When not connected we have to pick the most preferred data capability eQMINASDataServiceCapabilities2 mostPreferredCap = (eQMINASDataServiceCapabilities2)0xff; std::list ::const_iterator pIter; std::list ::const_iterator pDataCapsItr; pIter = mPreferredServices.begin(); bool bDone = false; while ( (pIter != mPreferredServices.end()) && (bDone != true) ) { pDataCapsItr = mDataCapabilities.begin(); while (pDataCapsItr != mDataCapabilities.end()) { if (*pIter == *pDataCapsItr) { mostPreferredCap = (eQMINASDataServiceCapabilities2)*pIter; bDone = true; break; } pDataCapsItr++; } pIter++; } // Determine the best radio interface reported eQMINASRadioInterfaces preferredRadioIf; preferredRadioIf = eQMINASRadioInterfaces_NoneNoService; if (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_LTE; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA2000HRPD; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA20001x; } else if (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_UMTS; } else if (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_GSM; } radioStr = "Unknown"; ssStr = "Unknown"; radioVal = eQMINASRadioInterfaces_NoneNoService; // Determine sig strength and radio interface to display based on // most preferred data capabilities switch (preferredRadioIf) { case eQMINASRadioInterfaces_CDMA2000HRPD: radioStr = "CDMA 1xEVDO"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevB) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORev0) ) { radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_CDMA20001x: radioStr = "CDMA 1xRTT"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA) { radioVal = eQMINASRadioInterfaces_CDMA20001x; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_UMTS: radioStr = "WCDMA"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_DCHSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSUPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_WCDMA) ) { radioVal = eQMINASRadioInterfaces_UMTS; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_GSM: radioStr = "GSM"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_GPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_EGPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_GSM) ) { radioVal = eQMINASRadioInterfaces_GSM; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_LTE: radioStr = "LTE"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_LTE) { radioVal = eQMINASRadioInterfaces_LTE; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_NoneNoService: if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] != SCHAR_MAX) ) { radioStr = "CDMA 1xEVDO"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] != SCHAR_MAX) ) { radioStr = "CDMA 1xRTT"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA20001x]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_UMTS] != SCHAR_MAX) ) { radioStr = "WCDMA"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_UMTS]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_GSM] != SCHAR_MAX) ) { radioStr = "GSM"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_GSM]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_LTE] != SCHAR_MAX) ) { radioStr = "LTE"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_LTE]; ssStr = temp.str(); } break; default: radioStr = "Unknown"; ssStr = "Unknown"; } } SetRSSI( ssStr ); SetTech( radioStr ); } /*=========================================================================== METHOD: UpdateSessionState (Public Method) DESCRIPTION: Update the session state display Start/stop UpdateNetworkInfo thread PARAMETERS: bExternal [ I ] - Was the state change triggered externally state [ I ] - State of session RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateSessionState( bool bExternal, ULONG state ) { mSessionState = state; if (bExternal == true) { mInitialState = state; } LPCSTR pState = "Unknown"; switch (state) { // Disconnected case 1: { pState = "Disconnected"; // Stop the network info thread, if running if (mUpdateNetworkInfoThreadID != 0) { mUpdateNetworkInfoEvent.Set( 0 ); pthread_join( mUpdateNetworkInfoThreadID, NULL ); mUpdateNetworkInfoThreadID = 0; mLifeTotalDuration += mTotalDuration; } // Reset all totals mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = 0; UpdateRateDisplay(); UpdateTimeDisplay(); } break; // Connected case 2: { if (bExternal == true) { pState = "External Con"; } else { pState = "Connected"; } // Start the network info thread, if not running if (mUpdateNetworkInfoThreadID == 0) { // Begin updating network info int rc = pthread_create( &mUpdateNetworkInfoThreadID, 0, UpdateNetworkInfoThread, this ); if (rc != 0) { TRACE( "error starting network info thread\n" ); } } } break; // Suspended case 3: pState = "Suspended"; break; // Connecting case 4: if (bExternal == true) { pState = "Ext Connecting"; } else { pState = "Connecting"; } break; } SetState( pState ); } /*=========================================================================== METHOD: UpdateRateDisplay (Public Method) DESCRIPTION: Calculate and update the tx, rx rates being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateRateDisplay() { // Update TX/RX Bytes ULONGLONG deltaRX = 0; ULONGLONG deltaTX = 0; // Only update rates if connected if (mSessionState == eQMIConnectionStatus_Connected) { // First time through, don't use the deltas if (mTotalRX != 0) { deltaRX = mTotalRX - mPreviousRX; } if (mTotalTX != 0) { deltaTX = mTotalTX - mPreviousTX; } // Update life total byte variables mLifeTotalRX += deltaRX; mLifeTotalTX += deltaTX; mPreviousRX = mTotalRX; mPreviousTX = mTotalTX; } std::ostringstream tmp; tmp << deltaRX; SetRx( tmp.str() ); tmp.str( "" ); tmp << deltaTX; SetTx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); } /*=========================================================================== METHOD: UpdateTimeDisplay (Public Method) DESCRIPTION: Calculate and update the connection time being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateTimeDisplay() { DWORD elapsedTime = 0; DWORD lifeTotalTime = 0; // Update session duration if ( (mSessionState == eQMIConnectionStatus_Connected) && (mStartTime != 0) ) { // Convert ms to seconds mTotalDuration = (GetTickCount() - mStartTime) / 1000; elapsedTime = (DWORD)mTotalDuration; lifeTotalTime = (DWORD)(mLifeTotalDuration + mTotalDuration); } else { elapsedTime = 0; lifeTotalTime = (DWORD)mLifeTotalDuration; } std::ostringstream timeStr; // Format both into hh:mm:ss // "%02d:%02d:%02d" timeStr << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << elapsedTime % 60; SetDuration( timeStr.str() ); timeStr.str( "" ); timeStr << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << lifeTotalTime % 60; SetLifeDuration( timeStr.str() ); } /*=========================================================================== METHOD: CheckConnectedStats (Public Method) DESCRIPTION: Check stats which are only valid during a connection ===========================================================================*/ void cSampleCM::CheckConnectedStats() { ULONG rc = mGobi.GetDataBearerTechnology( &mDataBearerTech ); if (rc != eGOBI_ERR_NONE || mDataBearerTech == ULONG_MAX) { TRACE( "GetDataBearerTechnology error %lu\n", rc ); return; } ULONGLONG duration; rc = mGobi.GetSessionDuration( &duration ); if (rc != eGOBI_ERR_NONE) { TRACE( "GetSessionDuration error %lu\n", rc ); return; } mStartTime = GetTickCount() - duration; UpdateSignalAndTech(); } /*=========================================================================== METHOD: UpdateDeviceInfo (Public Method) DESCRIPTION: Update the device info stats ===========================================================================*/ void cSampleCM::UpdateDeviceInfo() { ULONG status = 0; BYTE strSz1 = 255; BYTE strSz2 = 255; BYTE strSz3 = 255; CHAR str1[255]; CHAR str2[255]; CHAR str3[255]; str1[0] = 0; str2[0] = 0; str3[0] = 0; // Get manufacturer status = mGobi.GetManufacturer( strSz1, str1 ); if (status != 0) { TRACE( "GetManufacturer() = %lu\n", status ); return; } if (str1[0] != 0) { SetManufact( &str1[0] ); } // Get model ID str1[0] = 0; status = mGobi.GetModelID( strSz1, str1 ); if (status != 0) { TRACE( "GetModelID() = %lu\n", status ); return; } if (str1[0] != 0) { std::ostringstream tmp; if (strncmp( "88", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-1000"; } else if (strncmp( "12", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-2000"; } else { tmp << "Unknown (" << &str1[0] << ")"; } SetModel( tmp.str() ); } // Get firmware revision str1[0] = 0; status = mGobi.GetFirmwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetFirmwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetFirmware( &str1[0] ); } // Get hardware revision str1[0] = 0; status = mGobi.GetHardwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetHardwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetHardware( &str1[0] ); } // Get MDN/MIN str1[0] = 0; str2[0] = 0; status = mGobi.GetVoiceNumber( strSz1, str1, strSz2, str2 ); if (status != 0) { if (status == 1016) { // Not provisioned SetMDN( "Not provisioned" ); SetMIN( "Not provisioned" ); } else { TRACE( "GetVoiceNumber() = %lu\n", status ); return; } } if (str1[0] != 0) { SetMDN( &str1[0] ); } if (str2[0] != 0) { SetMIN( &str2[0] ); } // Get ESN/IMEI/MEID str1[0] = 0; str2[0] = 0; str3[0] = 0; status = mGobi.GetSerialNumbers( strSz1, str1, strSz2, str2, strSz3, str3 ); if (status != 0) { if (status == 1016) { // Not provisioned SetESN( "Not provisioned" ); SetIMEI( "Not provisioned" ); SetMEID( "Not provisioned" ); } else { TRACE( "GetSerialNumbers() = %lu\n", status ); return; } } if (str1[0] != 0) { SetESN( &str1[0] ); } if (str2[0] != 0) { SetIMEI( &str2[0] ); } if (str3[0] != 0) { SetMEID( &str3[0] ); } // Get IMSI str1[0] = 0; status = mGobi.GetIMSI( strSz1, str1 ); if (status != 0) { if (status == 1016) { // Not provisioned SetIMSI( "Not provisioned" ); } else { TRACE( "GetIMSI() = %lu\n", status ); return; } } if (str1[0] != 0) { SetIMSI( &str1[0] ); } } /*=========================================================================== METHOD: UpdateConnectionInfo (Public Method) DESCRIPTION: Update the connection info stats ===========================================================================*/ void cSampleCM::UpdateConnectionInfo() { // Re-usable buffer std::ostringstream tmp; // Get session state ULONG rc = mGobi.GetSessionState( &mSessionState ); if (rc != eGOBI_ERR_NONE || mSessionState == ULONG_MAX) { TRACE( "GetSessionState error %lu\n", rc ); return; } UpdateSessionState( mSessionID != 0xFFFFFFFF, mSessionState ); // If connected, refresh data bearer technology and session duration if (mSessionState == eQMIConnectionStatus_Connected) { CheckConnectedStats(); } INT8 signalStrengths[MAX_SIGNALS]; ULONG radioInterfaces[MAX_SIGNALS]; // Get the signal strengths rc = mGobi.GetSignalStrengths( &signalStrengths[0], &radioInterfaces[0] ); if (rc != eGOBI_ERR_NONE && rc != eGOBI_ERR_NO_SIGNAL) { TRACE( "GetSignalStrengths error %lu\n", rc ); return; } // Map signal strengths to RadioIf types for (ULONG s = 0; s < MAX_SIGNALS; s++) { INT8 signal = signalStrengths[s]; switch (radioInterfaces[s]) { case eQMINASRadioInterfaces_NoneNoService: mServiceSignals[eQMINASRadioInterfaces_NoneNoService] = signal; break; case eQMINASRadioInterfaces_CDMA20001x: mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] = signal; break; case eQMINASRadioInterfaces_CDMA2000HRPD: mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] = signal; break; case eQMINASRadioInterfaces_AMPS: mServiceSignals[eQMINASRadioInterfaces_AMPS] = signal; break; case eQMINASRadioInterfaces_GSM: mServiceSignals[eQMINASRadioInterfaces_GSM] = signal; break; case eQMINASRadioInterfaces_UMTS: mServiceSignals[eQMINASRadioInterfaces_UMTS] = signal; break; case eQMINASRadioInterfaces_LTE: mServiceSignals[eQMINASRadioInterfaces_LTE] = signal; break; } } ULONG curTX = 0; ULONG curRX = 0; ULONG maxTX = 0; ULONG maxRX = 0; // Get the connection rate rc = mGobi.GetConnectionRate( &curTX, &curRX, &maxTX, &maxRX ); if (rc != 0) { TRACE( "GetConnectionRate error %lu\n", rc ); return; } // Store the max data rates tmp.str( "" ); tmp << maxRX; SetMaxRx( tmp.str() ); tmp.str( "" ); tmp << maxTX; SetMaxTx( tmp.str() ); ULONG dataCapabilities[MAX_DATA_CAPABILITIES]; WORD srvMCC = 0; WORD srvMNC = 0; BYTE srvNameSize = 255; CHAR srvName[255]; srvName[0] = 0; WORD sid = 0; WORD nid = 0; ULONG roam = 0; // Get the serving network info rc = mGobi.GetServingNetwork( &dataCapabilities[0], &srvMCC, &srvMNC, srvNameSize, &srvName[0], &sid, &nid, &roam ); if (rc != 0) { TRACE( "GetServingNetwork error %lu\n", rc ); return; } // Store data capabilities for (ULONG c = 0; c < MAX_DATA_CAPABILITIES; c++) { if ( (dataCapabilities[c] != ULONG_MAX) && (dataCapabilities[c] != 0) ) { mDataCapabilities.push_back( dataCapabilities[c] ); } } if (roam == 0xFFFFFFFF) { SetRoam( "Unknown" ); } else { tmp.str( "" ); tmp << roam; SetRoam( tmp.str() ); } // Update the signal strength and technology fields if (mSessionState != eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); // Setup callbacks rc = mGobi.SetWDSEventReportCB( WDSEventReportCallback, 1 ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetWDSSessionStateCB( WDSSessionStateCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSSessionStateCB error %lu\n", rc ); return; } BYTE thresSz = 5; INT8 thres[5] = {-90, -85, -80, -75, -70}; rc = mGobi.SetNASEventReportCB( NASEventReportCallback, thresSz, &thres[0] ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetNASServingSystemCB( NASServingSystemCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASServingSystemCB error %lu\n", rc ); return; } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/SampleCM.h000066400000000000000000000270151455567757300243440ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.h DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiCMDLL.h" #include "Event.h" #include #include #include // Prototypes void * DeviceDetectionThread( void * pData ); void * UpdateNetworkInfo( void * pData ); // A global pointer to the CM, used by the callbacks extern class cSampleCM * gpCM; /*=========================================================================*/ // Class cSampleCM /*=========================================================================*/ class cSampleCM { public: // Constructor cSampleCM() : mDeviceID(), mSessionState( 0 ), mSessionID( 0xFFFFFFFF ), mInitialState( 0xFFFFFFFF ), mStartTime( 0 ), mPreviousRX( 0 ), mPreviousTX( 0 ), mTotalRX( 0 ), mTotalTX( 0 ), mLifeTotalRX( 0 ), mLifeTotalTX( 0 ), mCurrentDuration( 0 ), mTotalDuration( 0 ), mLifeTotalDuration( 0 ), mbInitiatedStartDataSession( false ), mbInitiatedStopDataSession( false ), mDataBearerTech( eQMIDataBearerTechnologies_Unknown ), mDeviceDetectionThreadID( 0 ), mUpdateNetworkInfoThreadID( 0 ) { mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; // Create an ordered list of service preferences mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevB ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_DCHSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_WCDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_EGPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GSM ); } // Destructor ~cSampleCM(); // Initialize UI, begin waiting for devices virtual bool Init(); // Connect to a device and send initial callback registrations virtual ULONG Connect( LPCSTR pInterface ); // Disconnect from a device and set members as "Unknown" virtual ULONG Disconnect(); // Process a start data session request virtual ULONG OnStartDataSession( ULONG * pFailureCode ); // Process a cancel data session request virtual ULONG OnCancelDataSession(); // Process a stop data session request virtual ULONG OnStopDataSession(); // Set mState virtual void SetState( const std::string & state ) { mState = state; } // Set mRSSI virtual void SetRSSI( const std::string & rssi ) { mRSSI = rssi; } // Set mTech virtual void SetTech( const std::string & tech ) { mTech = tech; } // Set mRx virtual void SetRx( const std::string & rx ) { mRx = rx; } // Set mTx virtual void SetTx( const std::string & tx ) { mTx = tx; } // Set mMaxRx virtual void SetMaxRx( const std::string & maxRx ) { mMaxRx = maxRx; } // Set mMaxTx virtual void SetMaxTx( const std::string & maxTx ) { mMaxTx = maxTx; } // Set mRoam virtual void SetRoam( const std::string & roam ) { mRoam = roam; } // Set mDuration virtual void SetDuration( const std::string & duration ) { mDuration = duration; } // Set mLifeDuration virtual void SetLifeDuration( const std::string & lifeDuration ) { mLifeDuration = lifeDuration; } // Set mLifeRx virtual void SetLifeRx( const std::string & lifeRx ) { mLifeRx = lifeRx; } // Set mLifeTx virtual void SetLifeTx( const std::string & lifeTx ) { mLifeTx = lifeTx; } // Set mManufact virtual void SetManufact( const std::string & manufact ) { mManufact = manufact; } // Set mModel virtual void SetModel( const std::string & model ) { mModel = model; } // Set mHardware virtual void SetHardware( const std::string & hardware ) { mHardware = hardware; } // Set mFirmware virtual void SetFirmware( const std::string & firmware ) { mFirmware = firmware; } // Set mMDN virtual void SetMDN( const std::string & mdn ) { mMDN = mdn; } // Set mMIN virtual void SetMIN( const std::string & min ) { mMIN = min; } // Set mESN virtual void SetESN( const std::string & esn ) { mESN = esn; } // Set mMEID virtual void SetMEID( const std::string & meid ) { mMEID = meid; } // Set mIMEI virtual void SetIMEI( const std::string & imei ) { mIMEI = imei; } // Set mIMSI virtual void SetIMSI( const std::string & imsi ) { mIMSI = imsi; } // Handle signal strength callback notification void OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ); // Handle session state callback notification void OnSessionStateCBNotification( ULONG state ); // Handle data bearer callback notification void OnDataBearerCBNotification( ULONG dataBearerTech ); // Handle data capabilities callback notification void OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ); // Handle byte totals callback notification void OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ); // Update the signal strength and technology void UpdateSignalAndTech(); // Update the session state void UpdateSessionState( bool bExternal, ULONG state ); // Calculate and update the connection time being displayed void UpdateTimeDisplay(); // Calculate and update the tx and rx rates being displayed void UpdateRateDisplay(); // Check data bearer and duration, which are only available while // connected void CheckConnectedStats(); // Update the device info stats void UpdateDeviceInfo(); // Update the Connection Stats void UpdateConnectionInfo(); protected: /* Class for interfacing with Gobi API */ cGobiCMDLL mGobi; /* Connected device's ID */ std::string mDeviceID; /* All the display elements */ std::string mState; std::string mRSSI; std::string mTech; std::string mRx; std::string mTx; std::string mMaxRx; std::string mMaxTx; std::string mRoam; std::string mDuration; std::string mLifeDuration; std::string mLifeRx; std::string mLifeTx; std::string mManufact; std::string mModel; std::string mHardware; std::string mFirmware; std::string mMDN; std::string mMIN; std::string mESN; std::string mMEID; std::string mIMEI; std::string mIMSI; /* All the input elements */ std::string mAPN; std::string mUsername; std::string mPassword; /* Session state */ ULONG mSessionState; /* Data session ID */ ULONG mSessionID; /* Initial state, used to determine if the connection was initiated internally or externally */ ULONG mInitialState; /* Preferred service order */ std::list mPreferredServices; /* Stores the time that connection was started */ ULONGLONG mStartTime; /* Stores the connection rates updated by callbacks */ ULONGLONG mPreviousRX; ULONGLONG mPreviousTX; ULONGLONG mTotalRX; ULONGLONG mTotalTX; ULONGLONG mLifeTotalRX; ULONGLONG mLifeTotalTX; // Current and total durations ULONGLONG mCurrentDuration; ULONGLONG mTotalDuration; ULONGLONG mLifeTotalDuration; /* Did we initiate a start data session? */ bool mbInitiatedStartDataSession; /* Did we initiate a stop data session? */ bool mbInitiatedStopDataSession; /* Current signal map */ std::map mServiceSignals; /* Current data bearer technology */ ULONG mDataBearerTech; /* Current data capabilities */ std::list mDataCapabilities; /* Handle to the device detection thread */ pthread_t mDeviceDetectionThreadID; int mDeviceDetectionStopPipe[2]; // Device detection "thread" friend void * DeviceDetectionThread( void * pData ); /* Handle to the UpdateNetworkInfo thread */ pthread_t mUpdateNetworkInfoThreadID; cEvent mUpdateNetworkInfoEvent; // Async Network info updater friend void * UpdateNetworkInfoThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/000077500000000000000000000000001455567757300241455ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/assets/000077500000000000000000000000001455567757300254475ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/assets/qml/000077500000000000000000000000001455567757300262405ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/assets/qml/GobiSampleCM/000077500000000000000000000000001455567757300305025ustar00rootroot00000000000000Connect.png000066400000000000000000000116521455567757300325270ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/assets/qml/GobiSampleCMPNG  IHDR@@% sRGB pHYs  tIME 4K$ V !"V)P7J+CR 0\SMMNkDi\*]Å֯ȼ$T޿4bZLۇ_OvE _!o1_ؼ᥍=h@I~+ -o~)j# /Y @ BB"s/)ʡ3 T7>}, BSAW]A&#P 6l+j ?{O ?2UeЃc?P&'ז t[= 05&^o'`B P1"LӸ{AݽFLxu;|pNg=>, (c0:hz@8|R_?~Ȳ Ivl!g|2%Aƃ@8`eY رv;scܲP54>/!mz`jy/|R %HхR@P^\=nI.UQSѯ0ddw{ǡNaB@%Hf/~e}B{~(H "C 33r׾ܰxz}s#xo6]xr"B;G/^hJ\O뇡PyN"AI t)@rtYYܵ⊂P~}% W4 4+0uMC^ =-w^(нa$A ':@//Wk6ہV yIJMo3~/z 39)k}c᪹BRizok[R7?>h>h` 8pIkĚXQSCdcI$l-/\P81 @ٷ_G<JT>z@0`,U3f\lKmO4\lEA_80e{-}N?Nvqe60a8A`s<=EFB!4PP=Zꇕ6ԗv2MGWiL}M4o&s(PR_}OnEM~$[c}({9G][d߇ۡ28xsX3 ?{:hK%J B*&R{sP0ljn,;l<1&3gS .{䎅gvO^@ dJ1T̃.$ҡ"6{O11u]JgPf^tXZnO 8E?wř/PP HɤtKH¥$ᲦTXӴ@lii#ts!ȓ?ʔ*xiRRT}7s )!!..qVJiN;Յ`!7*= 8;V(- 9̮#My' VͥqO&;OuccGфTtܵ_RR:닦8[Wx^Y͛R)Mp]21c b.YV+t敷3FzԳ ݓrcK]>jЋw &C)(c 044$0dLɉڙ ghA iRc^}v;v10ĶӹʓC2ED@h^|5! $pEL]zЭmւ~DnҲL5Щ*o9H;vx³y5u ,?fqceprǘQ*(rj$p1t9 X5{̪c 1ιȈ3 (*:PY rTG^_qTJi|RJ.+̈ɪ T7ץŚ뒌_ RJqs.4Mn#ǛHsʘ]O)E660 qsUa05(a!naAf!q.(S?t={woc'[yy焱X|C=g 6mڴsN4b.!)r3"+R`xN=a=ط7P(\;w=cck>[x{ۿ_KkR)9 T$u #)p{viI)?''۞}Zۉ(*W]W._{iMgmʲ񏛮~ɲe󿚫㸩TjFUjȼ}N-SG :_}#f8v"~xÜ $CsfM'nͻݳU׵4t֦Q296v֣G{ٶ͹a [w~u0` @@zGRߺaue%lDSہ#'@) .9O=dŐ뮻iڢc׶S?&Zg6B83J4#pFZT*u卯r߿DS8 lJ% _x+FkkA&Wha(8ΜYᇧ7N˖Oolpۆ.]g'Buʕknkmmm}\7zL<w'LVUUΝ3+qo|4 0PC(@qJ_1D"  0{z L޴dFa(Ұ6{Mˢw\w۶W:ض=p࠵7߼s;p$R;r()9g3JiEYg1$"i @70A=9}G#Cy .++8qi?4`{Ǝ>뮕KްzS5Mlk%)S9/B)eu C\3kts;~a+€y2hu 1ke߿nXy%\`juEic^)tk<SGK 8jHgފk̚& .lzV18Mcyo um_? B&j_I% s5ys6Μ?Rh@&n;}D,&DoLŌQBC3@ 5ĝW5K"`b)tߓ?Gs٠]mt%Ta 3rҋO@߀w~6Mϥm M)EaplвI\֋yUmq`|?/>a4R@Vjom'Z\t=;З:FQ;{}7t4Qodw@ .QPjFCH0Ѵm.S'$G}-;_v=A2 Bl.{sRݏ?rqgQ _}2[`p ^W*P20BOM+Yޜۋ<{u~gNk$iQ_H@ PSSWWR\<}Pj[q<!t׀PS殸pE+؉nZi Z{JRRl'2g3JeYRJ"d/ ЪB=\QutǫC}i(J]*F%1e.P}fQ c30{+;|Fm>yEǟG)1 yT9)S\ dRJYr?,K1P"R'STT]]`ƍW>k^CX4l CpH!8̹dMuOZkJ)!PJ V ف B<% ܿyJǮAf T8RZA1V|e%y>Ki,*Rr .+Z5mBD4F d᳿޿ڴdxwB@g躁h=}9h]蕄X56O]8}N=h h !QdQ˺O}ۮ. TVP2/`G] T]v>א>rǻoƣAufLngu17󌩤dT(B6 4VVfu4>~m/ooL̙ڜG&11Nj>y~JFUgpE* ~뙝mgvs. 1 cBt%G9К1U,30:@FQ.bM#CeJO&V_=ǃ;88wN che֪H~fИ1f ~bǞ?uڵ]r麵xmA(zh.( 4`ԆlP5$eB@(b^ػmS'?Pwsgox__2xdp< knqIviӧt*K+9YZE*ؤtȺw 4DOh$S m~{{7~˷]颞H*kÏ=H&xatlw]Z[oR)¢UZRI@©^k @˹b|% Ap( Af,wƬc<Ə صpE"ˆ{[;jΐ{577f2Yu$BH)Br}.|,|%m#Pb 䖟 .jڠV&E >* c >a۰'&z'oďz1HJ-[GkRI) ϹBx7c4۶{p .,+Ĺ ²%T>FػzYc]b˖]Ma9 U90BB͛/4ևWwux~Z1Rc\.8cyO^ A V-6<'l} 56H$g/ݗY<}VBk/Oej``!1^ZX,0`<9 `ʝXpj&E}ԙѸ`f{"Ϫ%g,ˬ7<)I$-TZYp~X}uL&3sY˖ bB\BȁARZA3|X,j׮]CO?q1|ٶ]VjCG3{e2sWN1^5f?*a)`v9 L:3ς}$!zlf3;wɎY5jHb:"N3}}}7m`*5Feߠ^jO9mXƢᔗ:e9!: !{'SRm*Pb1q..SeYV*v'ŢSRl.y^.omm[z[x"Ť2765%겙UWm?XGFkWy\^km۶8Ƕe$+ﻮ8L%RI)]=Pbێ-|>2557]݋ r4[pjqA ! LI)E@n! 1&2|W}8\11tcCM7:&o)=ϣ ʒ\kI<Տ`RJR)@Pes8bNt͹N4IA! 2ڲh>35Ȗ)%s Pq2Vϻ]ye`T:JVZ@I:TFA |@/ =_*t5k^VmֆՌ #ٜ2i:$'9Th@0NcGbi_t(a]h]ϫ*Ku .TdG|̙3O7A(|JŢ9K2)1ŧN5kNsSӛlm)Fc \Bh-Jch<8v4wv4ZFz%Qwa _{|Cr<IENDB`main.qml000066400000000000000000000413511455567757300320660ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/assets/qml/GobiSampleCM/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/res/000077500000000000000000000000001455567757300247365ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/res/drawable/000077500000000000000000000000001455567757300265175ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/res/drawable/icon.png000066400000000000000000000214411455567757300301570ustar00rootroot00000000000000PNG  IHDR``w8sRGB pHYs  tIME  +3 IDATx{WU?~{ $h2İ 1Nq͈f:&&̈XLV$&Qf08$B 侹~VwW{8Tn}MV~T|w>;zɳŮY|6NĘxs;x [i[؂aRvԿĀ+v|\c镘*N5 G$@{1VCTa{򴽀_a`>( F!*XtBi9AB~EDIt,~℀05O3޴e\hDKw_i^EZ 󕣓K'(c0SH0 u{57R$$n1KW_o;q\{q)P -X*nWYymေwWh8$D@g !P Ab B["h$"5 [^1*n;WXwˎ Bsp4H}I߉AqbK_kw,\ ("Hǹ:`!F+\%KT$2׿cY0 f!" S _ЄZ,~5~DAE!CͰ`+Qs\(L|%'8DgS #xuj4P6 $!,<^asC\ ʠp %-C FpIz}L)4# J0ܢJy]=f߷]XN%%Z8o)Ųc SŒ%`!1tbIv[;(l4K/gp6gosF8bPA!t ||܈_)bqu= [_-ox>W.6hs>0j'ڝT<;OUWx_1Tl`bW._6EZĿ1kis[w ѠًbH1P׀Z85*LSހ]G [<ڏl5W&wY"8o<-~i1yݕc n,;o0:i8!3M"⼪U'H 1fڭ7{ϯ!2,Kyj9wM<˹@ A1s]ErTRM1IF yO%*zz 5@#/9OΛzD;Q01qNj!e K8y'G.$=G!dOL&# U)S8}zt{Je0X?xs60BWz]ԧ뮓U߱,C(tL3W Nd?i%Hn_}3Ͽ`3`1d|U2ͧy}TZkRh5K!^bí=p (z'xnAVer(E<4 B,DUdDqSHI֌vI?VtEY??chi QH dn4J]3\tW^0Х*k׮=b򭻬.D4ԬpSP0!B}XXevfnKrѹ;?ssMa`U(bQC$ɵZAw?¢C5FoOknmHrJM$P s-AP|Efk |SOga3}x8s{m_myu-GTŊB@EkߞbıgԂ|v{NJgDl41 $, oU,i45cwo+ +᧟dhNȨf(.>&ޠ TRW*ڮ,13NmԆMfb<-ZB?bjp?OỘ04?5͖т[iV4%:euqd% {#Eؾ ѯA* xo8WP:9mNv8(˒((˒O|v+_hDKVFL*4"1_!*&aβaX2y-wM2|zq"2a#nތnj-wAء(}Y'oi@SC%$cDK׈~~kTC]qQ ]zͣHmA0)CP> Э--[ű^)3 3 pᜣl ;UJ2Rje?"F-WQz{S3| ?yM.tED~~_?#Km_FZ4>QX 5}`L(9'((2/k:bM?\p<^ClPKoto9:n s%<i$5s&kJ1t5BN𱾘 %Z{k"BY}G4 |A;F.Z)U j="JPЀhz<=hU {5q<\/lAHQof7z1Wtv)\sQl⨭81??OUU}fI; E_3<.RT }*WŤ+gaA~ Wp5Ϗc\v?#sƛG10fQA!6xB( D'p6W_&IaGB5dv?i5/Xk.AGcVIA+|Ww?o[_vsL?솅2ԥk!BIys" FW^PUK+6eQe%^׏&'mE:"G4|G$.ᰳ\TQ Qvw]Bn;kEH͝ ĉ7\nPgjxOu( UπmҼBe1?ZO'G~h7 taͭo{ uIGwL`@sulaqhBDM|+;ay ϼ?O*D( \ *yMc1 Q5+;&8J!% @=xb2pkqUbG?"BUUTUEQ Vգ Ƞ,.h<0K.B /XՓ=Q,Y( 8>žSYV=;^{6&͊f{^fl,{P+7ʼn7UEBr(EQpK[8< ٴa\zlwLKǿBxa"~sc_9-ݯA-a<𪳡 MY[\fYThm{)`OU n|Ռ,Zl={M|p΁x2ypV_>ťJ544 MxhFtB#(PRS;۾5FOx $?cm.6po܌Y^5kxT@ @ ϨCqX#T"Al6$iJg:ȕ|rF]r3oW*zU`vw2>;a|MQ9?ErS9 YYg}K$ti i (,׳f}Rj+^;~j/0i՘^``b݆x#/{f3/Io0gbgSg?+9@V,!n[L7#iI-m&{Z(:V X73;V5F[a˺6W]x+Gc!C8 ˲墿Ό.GIIj#$ iz+LX Fa MkGZr'R_r~9?Lϣj 5֏0.kgH[͆ ii_L[sj'IGc#YF](Ƨ !D8@JZid)ӴR`u"z짪%]V1.zJw8%N8v!%TI7 `P0ߖW.A I@6t؃p8&my,3bElP@%OW[zȆ?ͬߨcRZ"NBy{881}t yZ蟟_b:\ eG,V]%nmȇ"I>)苙P a΃'%%F;ӂsss+z^<Q?$WFVjgJBiC(|?gD<-A]X}+{_sJriC3udYqP )򸭿ضuXjU(pUx;`MnEndg0f`NȎȷoqɹ9y$q;X0h406¥o~bTeIYwk^K\C7W|?-Nvtݣ ?E[|ѿT =c;$>Z8m]l\Q"ଌI9ZkYgeoK+͏bEq=߭Yۯo5ٛah{KؼnMҦV+׿ %rQμ&%qiKC i9QĤ@ThoԂG.7|r_ϝU%+;K E}fEgf?_|- ]‹im\s]^p\Kk]{67lno9CK/>fs?(V AP•x-q.#q猕%B{Y,pޕo_ۺ7._b/&g?>rزw%C<;%_ue\vU;A;g0?* G;5s[Gj:ȑ#}/<'TUE Q+k>Oӌ 2y W@ǁB:TK*"ip-ذYܢ! غ)^:m%"i|nQAF WJY2|_UU’,j\0Z2 W`)ju 8)+qEhPsM(Zk 5Ci54D٦p D.=IE^G:\{%6[Q5ג-g~͌ɾ?uL[^!FRg56aq,ġE;'%&hb+Zk@@&((&V4l"+Z8WBQBD]u h MF^ ;OJ E[Cp>7|u0511qTjleYȞ.ktC!+|#N{0vhڨvӸhv@T1 hH;eGxurE[989Ë1S:LOOS%UUfQ3g_XXWUկ]}໶/LuAMD + kĂ5%V41WR4E )X5)\IQDD-eU5r ቿ].h+FX3Ԇy^#ߗ6sz=fffƯʙr 9OLfffze9'I/-${l91F%E`YixDH\(D Ti*3T;X UF. .>,Kg EQP6J6뷤Q&KS֫u5sPŬz6v;ϽEQHfɟ\n~>m['2VIy: A3sssZu8 !P/^Wh?}0} UTi)˹5{McNK D^Ouȩ-+: ;&KGn3Lǧv}c@#ZIAHé UtCSvRlx`ɬor-啗J9333tQ_>;.]KGE"\mKy뵛\ş~fǷf==Og_zx&HɺuMsF9y fXc|՟SJ 7^ƵëRxy\Vd ՓmƟ>(ԊW^iI}UUMtfn ]0q_.G^R[fté9޽{t - 59놯G|t:v.OeDdKbJ(a&گK+'*I:WyتK:lu_9 ?着ZO\,N#>e`ByΓbc{ٳdra0F~^ ^| !pm);xNtƢ!h9t.>/'rdzqXzwsfܷ8tkY`ƮWܪ8DVt:Bkf 6u*t:~jx:Ynbbb ,AYwF};a=i4~8.߿ `ו:gt:%9=y=;:7' <233Ás lu'd%l 7TU޽{O ?k6Gul՟/:tFs[`gcg_U;3pq}6e 3L/;NBjfqBu'dg~~ >яp޽{,KZFFߨ҆SqrafffTñ&ؿIDATs:uYwJ lƣ۷I_ܷo4l6m9zyWv:>}{|[>Sy.>mbtǯS<9===sFmh-rX^.^r>|U*ԯ|Z֒c+ad &޺#z<OF''h4d6+ izz)>>L;̩u w\~ՆXIENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/android/res/drawable/logo.png000066400000000000000000015030701455567757300301730ustar00rootroot00000000000000PNG  IHDR sRGBbKGD pHYs^tIME1.p IDATxt{SY=Ey^OęiEQTDyg̯":Z{;w^V`0h___ꪽput:...?}~~z^;m۵h~~~zn뫮Zku:Zká}}}ϻniNm6Zvu:^Nl~vv8ڃuv8l6v8Y,vuuպn~z^Ev Ztp8pukz]?>^sFVinųGfigYw}4~ߺny{s${nHWUFf[iWWW[kޮJF<<vwZgm]__>֎+ܴvssS:Nn Zkm<h4*'~ooo,ִr&Z6KL&m۵n[?}}m777phG9p8x<>93guC[׭FQ[Vm2;{ɐsgɤ&s}^׮Jw{pXK@(u~~kNmZp:Nj*~||<8onnΈZ`0h~vuu>>>ymŲv=Z]ymٴ`>??{nΎ`im۵^:N e~vm)IoٔmvsssA;;;8??omֿ~NIQ`)v[ykKisvvVF vmWWWmZ`P4vzNSvl`0(b?>>>E`PF*qvyɉv뚽^}}}w`0`R!uXCn)J~^׾t:Z<[kFr8H븿g&svqqQg38}}}#y~~^Njj~yd???p8`PYN~}}}j*\Vm<vvvV eC{}}vv]fsHSi8C(l:W]V%%٬9e4ّu]a̭{6,~~x\Z\㗗ҹ???˶m]Vth4jrfi~u[#0:;;+Y8GdtphZY:;Vnt:ǥ/8olɤKtKɹux{{kѨrٴt:m???[ogggٲ'vqqQBzR!J}WFբ^\\~6MEZ~o~}~~R}p VQ^f G]__lw7NO ~?Z/u2ƣH\\\^n[& ,fxi)GF el3"ߥLܛZ 8,ooou=ɑk_^^g1z*nͱZ<';cS)ːB[re88l﷋rD8///專@Γr\ u=e<6Y%`86Y2U gXkZl6+DD#Hm6: }~~tZH|~~lvUOizYZpNe9=___mٴdR U4n؃~_p߷^kv+<ZnK7s вQg.'):g|VvyyAugggB(>*g<M^WFRԁb,ނmEC<,Gš ~/au\]]=\__~NE@2x&C͉`_EMV^; N&ls<8L?w(v9s z^A1y|>B9:(^IEnnnjA]M_]]-^)!y9Rt·u]ץdOӺϻf9R̜CkL0"ktuuUr6һ3~EF^g4N3 dRl9ݮYUh3Y^*eAݦ&F3gswyyY?qBFҡ{Wy^};L4,.'LPXKg .PEsS.8Yq[F|`^8,k)q83A@A{yy)*uɵW,Q]VG( AGZ7w8B@o<[ @ yQ`2\ρ(wu;??g=(!iH@C%ssss$T⷇`>JGZ 456'Rxh_p8,9sݮM)3Gz5y`82%,*wEJͦ8sy"_LjC!u!2.\ѝsðB\nnn~/A<Ȟc@&3i:ЭlJQZgJ{ 6Mϟ8gBl6ы,HP.]ZhGl 3tퟟʹN&vuuv]ɤ wqqQhQh9wtw^tZ{FJ㽽lV{֛.T,?5gF}w֥cL2]sho]TAܵu!ͦGS.@))} 'g]QN/#*Ehq3X)s&+ubF㌬rNDg3Px7im^s)RC|>dGF1+ŞȦZ~RQ,0#F[eP];aqG)L'[[eɹZ0 Ð 8NZRby~4 "S']nۊ9 TosenRԺ; U2Z̙ǔFBf T5YR %͸!^S:rqqQ #~uuնm9_1VAˏSrJ3ֵ~(:#(z'ry@"CP8WM"lF$ L/ˆ ;k,$cvlFuδ3ds_eƈ$ LqѣҷD?ao8UAГ%Y^:uÙHp8l:|n66NJL[)U ȊwbSήH>K a8r" QeBJf2 ';<'7#nW"9x 09F6=/)QHrÂVdGxM 9  %WJC|^^3t aDd< 7D2\;r/^ %)Kgr$Ko C.'ldR=%,jU(.$>u,$:~ƐD| !ʳB)ʚ]r,`oVUn[m^q]D&Ok)YB'jDeVNߧA*p~8Eo$(Jf94Nd2)g#R2w &҉d1y,t, q6j) zQԌ`S9Hm0pڋpea/..$f`Ϻ$ aJ0#ɤ-2oooy"=&Z'1>??|>ortdch k2YRlY *A||gȑ,dd fMF$I"BmʙeE6(kY~09 PzC9Մ8RWzTɼF"9cO~N!fOE Z, tI'ķ,V{o{%!N 붱re:'N#Įӽ.xY/+cd|\qgNY$IrDKhH]f4%JMNEHh4:%#Y:Dȋ%ZKNIpN9 {48!,qs3^#/xa|'$P)T9,g;Y1ΚNgG?r)k '(/F9^Ra3RRϐ$2Eg^BlFiv:u$rPI:b5fyCa%$zkw`+q )0xn<;9Pq(^W?#Xl}-=b=wfN[:fk?5("˺QF3G9Ecm٬d1{qȦ$#$M榭"fVv/QȲtZAJ5 F.Hj~}~~nUƈ3\.h4:j{=2c1g_n@$S?@:^*xWWWo欐d9Vd>SIYveʬɶ)odT,̽C]٭zwv!I! Sv "v .O6!#Gp'#*2cNRwrl ʚLJu@:T"Ki1soD26N!l":t< L dF##Zɻ~)@)Ir,q|&A5eل8ٺ1 "YI)E 驘j$6A*R\sɩT8"^Ԕ<9Nq&NӦQ;$&;sb>\ɸf0mV|d,SJrPBE1Ln9r$N2h T|e597R>E4r\фq9DIn{gI#ݚM|Y$S]hX0F]+ ?n0zʹ1*ûO 'g$Q.}s:???][.sxL;?p_6ںěl&{Z$]0j M3;Y<0ceCw^I/ v1{% z)9Q*s=x C:OVʚHr)(VGf:$3Q;ٱR2$A.>v,pҖlp{{{k P]\\T(J dal믂35 #ǐ˭r}>}$k IDATp -K-kB dt ҾZONLulXyD,컝Ȅ@0%ɅH]KOOeR滭sIy7eEH9K%bӋʦ4 (=kLsD9p!#^+@"ёP;;;ʻe4|qMG$qLc k]QHil=3œ9tZDj89,!9+:Y`;5OI &3Gznۖe9Y?j(n9|z7@{HQãYFF$ϗ M\Yv)*Ir.}7kҷmիfkp6gPv$;A9[y.c*u)~}}|ޞ+ΙrPtZ)qԱ43fXgw&?m:b|Sph'& ٛL&97K=/)Mx`ߕK6sŒes\B[P<EV5zuA}Z2xƋԒc-)YOQVM=G=dË$X9>+ϙs{ϮV0Y+s2rH+Hkτ`GvK,uƉYѢ}d 0?Kg&9$$kCݗd9%:hϾĠ\D ,lreG^%4v?Ë*??yNc|~~0p=;1sI"Ԑ 0EhyS#Ȳ(FrsҎֹ`8(FS\I/]__cDa)f+OPBEΕ~aL=L6F?#,7ι`ue1'$MC`:&*#dQ&!`j𬓼y6А34Цu9-x=rNߕ|4٘unY`=FF~3PrIFA^,d M9%P錜d3,;%~Іcm<2dw]MQ.ͳt}*e=q։qϨs{\BizwF%(G+*X6+<Đ4IHf`o /̇OB$],|6h$'09.GrVeޢ$$N)$D`iQO㛆6s)X drtbHiqᝦ."P>~C9$I*ZS**JE@f>q@}!'b;3VpIQdGjC TA\tkAQ`LېuNb湧in[TS"y[Nk3$ HSH~3J\ d3xCheQv wa%'!̳yz}Tnd{HȖ":l|:IhN=Kj((mIPQݳAWE3_!L촓W6Ϝk^$nvyͦ9}s@ط~19LdȈV86ibP r'yx\ As 1$5 ƀ,CY J͆r夥D>k6%w-O\.yǥ<)Fh#qlʩ;8ρ WȮIr!$A:*~&r9});iL,___ald9 o錝cE3$x~è5 KhBv=z~~>j٨^z}r1Q)/9bȶ///GINW&$"`PeS.r4םk1])D ѳw5{yywN_ 1V2H٬ܴhtr3YNnoot:TQgmz{,bw岞't:m?NL@zdJ^K-~;'%9;tmMAghN*5̑ze:RݵjE8?YH4P)Zl6+$[٬r׆8bp6tRZe^pBX񭵪:I&r!,pFf񋙫ʩ+ !HmF5R 'C əjf[?:Z룚lo>_܀hRt aT}ɦp$YW}8"\9y{{V*Qgw?u/VIM2Y(]cr}}ݞ&i9#6sM)'w9䰣nw+Jp!dPps5 Ab 윖'}3Jedi:8 Qx<úm6^P,\.Y3~̙gXI%MaD\" 1 R-N~$yM !_Cd+FѴ}ժf~/ߖQo O3HLJ)9S:\{|@orf󨹃:y=MI)aJ7@V;Y9g8H |I0{E7xD3YЌ]9R%CԟP@D#VX㺕)YёusD5Gs'šdJJÝɿh?i6I`6Q*г1l63)f1<EKx ؁ M"Uvrr,ohƒ.;g[f~+K$E.\NP.:3Z(Β[ӵaŨ.ú>9hh Dl^0WNaxz٬jcd`8;=t嫰Cɪ[?џ+rE(l۵|~T~EF}4؏4)(0yzz*BRFg4((W ;7Y^F cD4#ue4Х#U9 ־qrxԬoߥa%ΫLfZnG%=G9>wZfX,mɎȘSdfcLE h]^د+kߜ̍#I3{r=7MG6-G!itzjbĞo\fs Ѳ (qzٶ`N<:s$G~9^4OȍT^prޓ!INYHȲ1/2;䈘D2h|t8}ʱj(VΤM&:9){o^E/"\krͲU-r [&BěQ,4T"G?Rw&rHT~,ٿ}Ȳ U/=5C< jϠE=e8Q%J8K24z`s,_6ɱ2???G >H7f%QMy9vQ' tQ̇DeN[Jlm~_r!ү S@&tZm<bQi<љ]__jE\g+I:@^SDKrY\f㏶Jg2Є94AS ) CYdDXp.bhIf,G'"27gzØdh R瀃]Ra2IhGPFH2s_K@d#o8w24x)SVc6!f"O9C+h4**!+j&Z^p8>9#c6п!d}<5ID'nXU5X[U=??Pg;ībQHtr}}]f׺M/ oAk)l-갏7s62H"@BBRG|h9P aj4 D3'}s]#hG@РZbs~eֺ⳱C/&wΚfYwE<@rQrr[rpΚ7D"e!4aqg/W]vD+VRɌCi!(B>1L2k25J@˦u8%RΤ6Q*S DD2rHvmդ9s&ړ(;~l32(]/d {~фGDsNFصDYm7D-A:D4Ѩ*`IzvJ' Iy<==aSr#Sq|W~sR)jEQ}B~-) `,#),dR3QHً;a. ^IAYiiXV$YXCSjfؐFGRIp4)W%68hEA$1$,eAS?ϩ= 9$2 \sLJ6^ 9{i"7,580m%p=rw,A -<BQm~6阖Vbr9P):`N"ERNYJ )sGdxc{0)HvtFN { uʒ|~PdYYΧ ;<$ԥlj3+uWS.dҪv>??+rurD,"j쉟 ԛL&sJP HN7+8dgLs0ӤDnx Iv}; 4Pwީ-Z(-DNFJC!LxiJ"9E#KG EJgyu[Ԫ5Ʉ΢Ŗp1vt%)<򡨛%v )As)uDꇇYD IDAT]\\T3-pYNdN7jNU%!_ qsef)0(gӧɶ"}h9KO_53 V3_՜L"o(#ʨYn4˳1aZIlQsx| USGH> ]BJ^|r {xNPmR?2TIFGXvd[ONV½p8,C%KB9 )aIdg?(g2n-E;#c<{!J8!yό?Fdr>Ά a,ȹ:S C???ZìkY^P!x7$HYgb/23&ΜhI(^=#*TA7{'NWMU/t< 8 ZUrƞL#j"ȃ2ph(}b gPg_,147&ʖDvT((JjPN3%H7d }^L%A-k[k7~s=/(B5& Ktyv١ty6);Ne 8믲!ˮOJ@HbK lWuf~1I/Il ih264kA"2X8*"CȲ 9fgIwzK ڳE(R̃S#>P>!Ѻ2 9K6gB:'32Q*DHr!GS!"9ΞkJ3{,+W(sIbe`E@7k 4P\ޅs ρr g F䩳V+XIQ 9div[^YnPa$Rp&#VpU##fc Bͱm٤!'8@y&'m}E<SY#Qx<|,%%=GQ-Dz]gYS5Z1"lR|>o~e;kZW~O68oݖ!˩#t(P{fQfN2Kሚ `=Nkfsu_=4EŘWrL8%N٬K1p\___rbX*MykC$LɱxnooTd{ X,p|&df$8;?J U'^ʇ\.˘~믶m1sM!S[;(}QvAP겶nC:&O;Aj"Ÿv_(h[Siֆl=L|^ͿbqT˝S847N0y &t~ܬ;#yڬM>RӜ#rifa;> 1"]~6>vn?rˌ9@E:!eٲ%T¼l}դZ3fvuҫ5*yLp"5 ٖIb#K'CCP9Ns">9P碠䜕g@;GwD Z2˙ eS ~g]7x>*0Dk2dGAFR߹"Di?AvA "l¯E3A&۴R#Zso6ԗSbgij[O&yc{ٔ>kC0 cKw>dQi!t p8lŢ ր3#לA/]];8BN3Yl,Gp&M@͓gL"^$s6 3> N9],=>;;peEHX򲔫aB9BR3[ u2@-ϛc QpH!=J&O"kMD@1ɦa#&hy@՝yvGT1t{^ eH09'"MhD)/]l"g9 9R~/#۶X,*btkFFU$Z@J!*.R:"% p};"B& CH)?WDPrr A wsJrBRRH1Hʙўw>W2;^f^i<Π`f=~d7Ϙy_2SgKYׅ`gD%$,)~5r@Ⱦ*+dȻnUNc9 u 9&~?:;~G䩓p=%QYGrÐN=g'~ Ad""}E:!yĺ.bCJE~FY(2/ i(V:SӢ @a>x8v"h(%2?%h[ƨRY;Гgg#X3͌~Y h,ˣXCjsvozXlʒ3duZwk}h:"SnL5Y$28r 1$F Mt b{eLrE9lsjO;"A֙d™8OTD -%޵>L( P-*ήly kg9ņAݮMrZirp&$y4c∻q{{[Fa<#9`Ey|,XPdÞzw1 lv.`9 y' jt4{rĜC&:nɸX,ʰjX Y.e$*d2Ƙi($d:lO6~u^\@,zp\$u\6=]3G%9DY,jZg>>> ֋ +!B(y@4"RUR* [{Xv'J> H) ?tMp.!~ދ>Ϟg Dp&?! I/Bv&dD)ϘJk/9eAХE &RCZr ?<<M/ m~yq5rb kJurp3Joۿ!lO&YȆd榢] yAY[밈0>eǃ]#_AQE="l -s:ru&~M0V]81C3Z?R$9ʜۛp CʐLOx*-9DtvD9:YBlqt)l9Dsrt_$=ufdC%4&!K0[艴8FFΓӊ>k(6@VbJ>d*gnoo빳32SEˍ7g'K˲g])US/K5q*iU xV5r4b!tlaRhL9AȃCy4A͆!0+efYY9_^^yAƁp]驢`PvrA$ 1vʀ8!ճ) $ 9 q&sw: p;k.]$m_&#{炃y}sPB(KY׫LDàYrO*Y G3 T9a)~9]7ԗf9CBqB@@  ,xAK?8a4&IgKe}džٳN)_)=8,UX&XT{ځ(P#=Qյ_1tDBX\/}a#'2 BY0iK}t6bTN^';Z%4GKk̡# " ЧwK&Fth4*=6kR*N9r`k2-=$EF_*ekVP\͝ 9a @`=ϙٟڀ韯J))IP?J&4"y~~.NײKى"^dP.n;fm! ,'DhA{~1;D~~2>=3$%=4N[DBdEHϿraR9NUZF *Ρu64 39M˒ \'9,KoαldfT-o*~DӠ$kԺ(98f:7C1vd9}oG\؃%9ztmVZw/I2GɃgօR5b.߇#$?n*hC *g6i9h@,EL+P0""YȌ<gМ"'A}*Re%R5l{?m:6ců_JN=̨G׿UkCӜ8~"Ngym0Og&m&8PdQ6jd9[ ~U%~*/@(݌apN=INwHcVPP J#HafĜLH7i{ĉ;*ueX g뎄jmF1E%A]VKupr]q\_W\G/H T0H;&u$&IVxȷX &Nvmݤ+k\U.-ϟս@A\]]՟2b90$"XFIMaժX8fRyx7-uzupDIp  8i`?CR0WQ"`S͡"Cd{jvcmb0+FŻUߓW#9,(#'#zU)2LUݾI'VBKtP랊_lVuo]nYd.yyy)X_Gܔd# ADNɏy^^^Qi.!?Vuvuⷷm>wTZ9EadmMνO{~~N&.2Wn১\.+B*2{wwwTlR?Yȑ@HVT9Y8-e<%v"bs򀛓Ȝ5tRmv^г7)K2_=xyJ1Rjx٠gDklE\<42R3ǀx-rF'$+'~7bPT qf'28VuPtD)&~sA+a^UE9W4H.l42۾1t=sH%@i9'~|^, ʥB rHs1z"}h8ދAǾdy(_M7:#2|{{+囵ΘR\439߬GTbi.…\ihG~t4 )\',h|9ۿN&X,?j~֓6M ezwɁoŢ8 T嵒t:2(dN+VDDRj-@!^6Ȥ&lN7l%u:뀳!w[$ll`CP0Q (zVfmHF>%an>9I9$'xNF$j$ܗ#™(=sGLF=-SO;k/Ec!aɺE($ *2U$1ȼdnS_X3V/g 9 ^>0ӳ:H<2 NقgCs(#-i,U)$1"DQT̐Y Ƨ`rZ >ȗELbQȅ)"t:eNHI:TNtx\_~U(6FΖ=m}&lmɱiCODؗt\.۟f} :gN8߂rxѣt6.XDק!oJ/IXd='8Hg\!+)=e2 b aH 씕&袌,2 $Ja銺:WtI$&F`8t8 22Q9 )5kErV HװC䴭ndM)5Xz[bvbh3)OӛX༽-!׏uV8!)J!s~W 9P09T'<5+ftA֏Bm|xxh41H$ZqNԆN^()(YgvXڀAgi# urWCEgM_S3~20IAe2U <";ϰZڟYJGvN|ZRP&?Q/Gl_>%sxOt&~ Чdž gŢׯ_!?3]"x@?hBd'0 5 HقE> P*~aUa~Nɞ\Qz,cJC <,6cB[VGp Ò%b5~7Lkld({T.])$%59?xX#%iD=AAhPڔޠP2!iydDu){0 W>Serƒ'Gn#Ȟ9*1H)ƈZgF,8Y8 @;v$sH *K>t:ˆ=BI+G?γ }e`DtQ񱜚~_g6 .Hp yƁc82&{%K~qk q.`Q-f;8Jp],/L*SʞٔǛ9koǨp={W$*뀈3:AH S򀲏tU0@lT 1 >'y8-L&"J-n;FPA ?2]>@GdnR`"UkNmc9JU8-8@ʜ7FN|9܀5H$"ڵ&jnS9fi+]ETʃv:9nĬbQ=ՇWUsC_sh4jWɈc+X"n]s'"8fR6YBϏfXŌ It*DfW@Hgz[@g6zw~~K^k9b3"Ms$`:Č+=]&5'7- %t#!1ȉeM9-kvsh:O"d 9'Z΄td r\h/Zjd@y8?z] i}ጦ+&Z@`8ZO29"H0.YGAIJܲ? \:!RNq`}ry4v^W0|)MLz۫zȇrFG$wU2ˆ:U9XK}Y}`VDP9P>grAJY?'/ (?Y/MrX 9uJT4{m4[kwyy;[UQ/oᶘٵȃ25t^s0 43b9Dl;DB`q$,aRf99<-.<‰@/'i:$(p S,+˝@c&/#94uJJӡBYp8,v+ϟ(Lȍ /@lX!;}>*5dSp{ora?8V@xޝ5X+yWo>c](~0(W-bQ)KC&s?KDEZ^e=05k6$Z%hs(!@Vwwt G2҅jRHd에A W PNjs@cW9@5;!WOO! J!9;@&3֊`}Sc6@׼M,(ߌTFhJCxiNŹ\.r}~~> 6V&3<'s}% X,hį+;Lʻ쭫/3rKʂ?JW4@LE/2E:m-l")50*Fm֦Sz2%"Z'$"߃10tN}}}n|i>W5|>o"[$9 xȒ As!x}:-ˑ'e&8iiyC^'ߟ...F8t.]zk!9Xgd-1QC,H'`Q!u-fNz$#5=XڒD^[LyC}rX:6yzގe"hr9D=ȝnhD?TI&)Keו'緼 s}( r&z{ը\2U5eS~;eB핣nEja.ҁ -n𽃞["EaU+;Y[0!#Dh7]}IowY@t4x`2AjmHDDq(KRVsP(95}i[OM Cw^ֱ֌hU-SϷx*M͛i{{{:>>..._ArLBH2Yt?-w::/η%JMe3ܣGцA+׬mUa"c1|} Z]bVP'Y\ [Io7ۀ"EٴY7ܡVd*z{*6o-d.HJ}TY=1o`BRu'uBF bRu@NJїiwwwdy(Տdjsf+(51u{RBSY YLJ3@_Έ˫EzPW@w-F2r l+Sne=ed{Ơ ːEQ@'YY*7*NXlŖb0@s!YoDf֐^scWgr9@I @71;jYM swʹAOdM-'Qp dmgåXVk$,ݩ$F>Ǐ(a9 B\{eVw{f۷A./ܥ_ ,sWN{`(/oeʨ&ڇ{z27vfZI™cF8<] uuSy %@8v".m2W.0wE99{GP p|i2XYwB꬝*n9gl4$ @B|}~/@lY:lM.Ftl+O kb /h#UIqڈd<lƅh /)"V[B^`+fMm9gacG`dm>XLT= jd`!-Sc.G'O. cdz*8;NW{S:iYC% aΪ #BqJI[^ f8\LPV2% g3V:SJYh=Q}tzz:$ [Pli)z6WwyiJkF띗ь(&xf]h:&")R vw@FIKL777b‚hfn$a[L9m%k CB'dUus]ȖeܰVg6|t3g''uT-H)LL=j[Y \Z5:볠9Vxb.*:P* >?VϪ< E"d<镉 ȩζ`Eg=@}ޝYʺ36777CιJ.4)q~K:l/..I ` x#~h#?xe777kmeK2G \c0sϋگ [HW$ƚv&Qr2okl]e;_r%^u6uZ!ybUZ+#,Ȃ g\tv9oP!*ξ}bE?Z8} z"Z<kD;xlwδm˜ߧak[%rs~,N.?j^l}Ρ3Nbtqq1W%:$?yCCy"`s#@BR+6#O K"_~1ZM)ONݦ m3ӶU>pH禶oT%P+X$?GZDnk) BEВYa@n֐Fr?=,(y.`j ;=5JmߡyôV ; ^T)SNZpJv'$36ؿ8iwwwZqC$t*,o}༷gVv\sixA=?eΗ.pljs>~x~_= Auk IDAT{Zñ9%~+3N>~9m2KHS]F1oooG1)V)Q ~:t,,dhil.19fϞ=N^#hoίL&pX&TD T j[7w(Ȧ1 F+Crn W&1~z'yuu5L>|.//qL3hQqr||<-qJt_|>VÇdwXm/2r9?iizհ{߾}NNN;r%Ts6Vմ5O/^ȃJZ,8+AaHbrE@Pr೭SYCegg C,r Xʨj XQEꕅ< }6٨q@QL&vwwG(|=zfeE"xYTz&xO`].}~EKs@u3j;Tl/';AB\Zm\@v\Fk-.ŋ( j| f@xQm9C-Kde3N`2G tBA/ҋ l)gi:2}BSyTkYNa'rXLT2mPLrwjuAtp>dl"hQ #Lˢpll6"2֥e;ټNNNɻ8Ղ.~ÆqxJ _Ma mT6Z^ uӮ*h";-aP(GEYuRJ{wm"p1lSV&&UɩWYwrE{hv9p2`FKu S9)*S4 =ynˠ8I6v $!:dU@d #y"hS6~ZӼ6@\ο4RU]ֶp>~M{ —u<'VWXWnP[Gۡ`J;(svZA2>1(2giEov8s7ٯ:kۏa5d:B VR8J a qp/=SSFxx_uM´$-I@$l6Zz&%ѹէ֟߂LJV[S5F,sgڼksrc/(H SYfryy9\֣UDCo] j"tV똃MmPjp/h;T8iߗP:bc Ȇ%0 :gy>sѐ9\m?NNNFJ𧝪Ωs6Be CO{uH| OA@t___O / -zpp0?R$qӧ}b?2DȏS+{W%A@ݠL- uJ̣*Q-a! ohXt''tlEJRm7kaA˲B-«&ogW:J!"?fx`m% &p G+ &hf$b/gge"@Ev9-M%e;$[V#l8[!e;w .dX>>ݻwb]&/$:P :M,>4 fzAnFgʜiInTY+8r4ǨC3bՋ0pNL@  &#Vn֑ϨLums*@\DH·0\\\L'''kr̰ J\b1U?-DY,}[L?->*PgQv#*}9;dȯ MdeXL>|h~9Q.>C  I'Ox~^QӴU7pkWh@e*XZX#kXΐxd˲W_(KR&ЉA'"K݆t@3#È@EjD j vf j@iZdnE4\o9IlLf-ck-4yW߹5e뫽t#ts0V_dНu&I^m@Ga:R@;|&n?9@N.2X$B J(E3G,X`c@և92ųU궒 $I2U`ЕZGl U~NRyª/^0j}NCS[AJ|VE۝ѬeWѿj;Hюh@'MP"ae xe[NXZxFׯ_ZZYS*RrESq'OF0ShT$@عx]d,5'#r$| \QE@?"EYū-%+,2&j UoppZ'VD.k9!hW0 b0)N|#F:# R-&Pu‚k-odD,jK%/)S[RG*sV ]hpf;ܺ;jUj5pS4wR!*1G_XXD+tSV9;;;FH?w|̚p¤eA oɜl 3 i|&f:#FD Č:GRyY4`YrAMɒ8l PN[b|9ݲZvT@>}4ܐR8t_-g7b1b޼y3.??*c5θYmw{'h(Oۇgj`e8Hy<<2MUG&jlE=z4 /C&;wS3g+2Eed6Z(av~BΨLmJ"7iԇAVF z|IҔcmd~2SEb;taY #tC"㵦óE$)\e#%~9Ԉs ǺO_@ ӔS d|'@8oV*P@H6g̢qq1^d!YЭ6s[#Άڱ,"8$øjP6F$x%zk)t yl4MéGGGGr=l,Ki6{iV=,g>!^]]CĞ+ECCI JrƗa:LRBg^fִ =62>75[Y6e'}Y6u ,␵rת,~6W6:e0mBa!Ѽhc*dz<p>$\fÇA215F}q1%M10c`3dWC ze5;MÙ*#sP]w1/ȇ (hH#P/QC[5$dڎ~no(VU2TX jdU9t.]Asv?>RzV!j/Kq.//zp@βd碁LO&,'ª>,|>A|У4LK}D<gF @rT[i q*":˾i;9DGP^^9ܭM}m7e>]]]Mk8g*P& &roM_vDm>|8=jAvaAꏶg;;;/J.1_EO9$ iWP=bSxE"V=+s,24>cD2 Z iC<3\lWaFDe邛33ORؙ_~w Hd\&YV렺`K$fO*US,\$>r.͎vb+qK- m3* j՗Vbϯnj% ` J(p2j=ꃐ)jZ,\$u) qq_&cVy (q\W$ᔝ%/wF 4DLo޼Yc3WF˩c2d|`H#ӋĂU=fu/ _z.5NuRTFv ?k#:H@ApN82e EUwJbj@lMu#cU*q[AVy~J U0"{K ( e#5 Sga3U5lrlzœ"̾#" !"c U[DVAUa=Aǚ̙l{uKAa$\:sn2M 8@0A 2W`fx ;{ Y(ʎDQ5+ypVdl`W6aTg^04SڅbjI =۱PNgju'ެܳgƝXVc&19J(g/gr?;-JIy=_cU$zmNpr.-8==޼y3NQP(t*(5Wjl5*f#e&lF>2_, ЇMBY֮%7 -(6lݸuMǬG%r@୥2 OM(m= :Q?"'6;hSY5qxe_ r#!UTU$"B#|ٴ,?p@>|*S#Q1҃R&:,ϯ`qJlͻCC,p0딚:-IvM3e̞Ep,WCnAdZ: IbJ?]O#qkS: sF "PL.rP6ALeZ=84&&} vYz/vZ }iMH a\[H1A&} xШjsU[E8t{]`;?%fȣ\_~L3Ab|:<œ9wT\z0i`6Mq gh ?(Cu k8XUJ]F@|>_ T8a4yNJ`0eR~_0Yt|VYa9jH8mqj= ؎t kp=+%>Y+ 0>Cg&L SXA j6jLD;k$Dh=pT}tdt9rw||<(֭SdM%VلI^G|BԡH_feݟ `Q7P%WRRS*,8b-C*|3j]ۢW1_" $Pc; NE6Xf˂wlZ.Ej.ޫ iL(B$0휳ΆV @*vdm5 LY_Kmdyii:2K^"A}v\f5*HPDHRJ{0EAH]e*m(Ul>AWȤ"2 Ufـm4}rues.|ٻKL:jkmEVUhh!3I ahZUZ!ԡ}37r!`ީ?Л7o$`EП͈d}kͬAI[/dt'?gzww72qf`s =m,m\Ibt 2@ZӧQCNj @T {+lļ@:a|."w=8: w6FPgҋ+`+X,F.^)}Fe?;+˜l*p J2"s!N߫ UFj{TKml—/_|>QϺMd&>Ep۷ijEjцvQ C22;{'hIJ#:`\6R{H!.PF#fl6Etxx8f5vm[@/YRL3܉εm=#h39Fr B~D#ֲݥ_!WWW)S^bvzܷodL#VynXwM^gt|ׯQ\,XPY#V˱6[f[hϙEX??asvSZzXr9b.=`bwU+qr6MaO:Gl5VB|3F^4QT'"RpRH/ 0j2o2qډ'HepeDԅ7ZlI,v`MdU ϴ~cg]A%*!xxo(R LRNC.de)4/|dm2kh@v(bY\dpEQ9T3k;#YС#_wWEeX27u>p '26$O7c.,a=W0%O+gLVj] 'wJ&y8uj9/;bdY ](GGG7RPf ×qFH@Ǖtyۇ:M?y:??_Ç +%k=.u:WTᱵ~xNU#B*CGڙ~?0,٭e8#H㥐_8X\"ICRWҟmą됃B A.OT@%Qf뽜iLIݕg質[R9dn#7| g IDATbB?QKM^VkY19iu;\޹va|NUddAp5ʬ%i<7S,QA@o8 z+i1)cH+evq!@ؠ;!'PZod7iMWg'fڦ:w%>uW^@j\JH"RwexW :3:qe߾};=D?~L_!Q%;%1 N5f;"-PコS@.VwK#kO1J}v{q0:6L?v/G$sŋ3LJ?$AG"h Knx)MvTZx/~{{;u (BJupW;g\ xJ# Bл `s>W4f;>18'Jж3O#+C$L;je/AH$UΩrEՐf)"SmtdE2:ɓ'kҁl#svKZb\w ^Nך/Jߙe2 F &̢Uc:qW٪ELb"@?k`-Zx,8.%dD9 fCR)6r\kSsKvtfxGL$ѣig s!)=Q?wy˞WΥY  %V>YG智Gka(}_2cˁv8JU82gLQ&h呍 d_ h|)WG]7gu}A, O.8Zr:wwwxV=qu(gQL媔>o߾զ027>O9AknooG-S v?r1Kg=|p^dFaٺVu!N' @e8nwu%b;os Ft1mpᄍH@5xS6EYpF C8S5~ӛ7ocKG`Q߿P,ִ _g"Р VxcV(AgE֕r+sTIGlm]r9Z폿~KVJl PSőPfBt9T3 zcMk_~YCld,W{p;Wlheb~S"D.S ELDֹ6Ms< n-Jd-\u~I+CEecb(KPm~hdD-zFuOHKM}q}{ +¤6^0-dGyF*u(7l@Jd~<>>:.-„k`_V(@@#hu[@Á~5`z'Lw7R9t j?ۺsǵ3]c Â<@ Z7 E MJ~U9JKT0)-kՖ]+ zM%A<܀sF,mmz{{رK*Y9#U("d;lE@PH\-a ZdHڷ_TQ+탃f]m-҆֔qI1 Ԧʲ;T8qF^P`s`(*i7RoCyn֥lA߾}^z֞C[d\zFK/9[.05PLO0(Ҁv_@J@6ہԾMUc#ߔPSW%%j b߲@% 7%p;,~eD6vYO31>vI"npL4]A`$mC@P|2fAcS8fBߔ,} c"/d-OK\uQv0ľSXۭZ h;AqM9[_PiUڑܵ}P9狋~AMa[{[5@kC<ԿcQO(土ٔ|y:99%)]O5jwww3~xx8}'''K=2/f1ZIʱsJ2ƹ}e.xR4QiH YyGY 's(fRԯl(T!c `@DV2}ŹXJ^]] PȨgkꄑh\Iև8Mi@E*U{?)?΋3E)T'bx+4ԉz^ﲽ9ΉlܴvY=np`[6~mHsʰ els[ȁƬSzA u0V7_]dM>k% !_șꔲUٶKv*` W0j5Zl6ǮJڡ!Ӓ ǵz噰j.lskZ 0GA5CMR_IwP5^p6DAL=~lӸ$Dg`(믰r"(~ο4@;)}uV-RU_^k^mnq?16U 3];PV. l$9}7M{OJ86Rɗ]Cd-{eЎdSLS+-MqV`dXX!HZƩdOu͹oJtv_w6[ԯ,X@^\9;}X+xV*~TOIJ批]ڳ̵&a+ ,d҈wU<+|3v| ֿ F W9Zv8NQU_+&,`ߺ/9:2F3I=4 ` X ƶ v׬*<v&U;88p0?{e·`cvFJ(QicGjRƞ:==1۷oGIªVjįH!-Ѐ탃3pq/K8ZkkVDxGxBDꪚeNW[L4j*YzCo?j>fpHKYy+E0wV*쿚HQ]4^eZ# SquKמz" ng,p}oZɀ";<@/Z&* p=u1W"R0ۿV ,FI, mW`WbU"(j: Z7҃1sx7.Iw5(a"Dq@djv9$bmV# ~9NYwjsfF"YSs@) q fٲOS!:IԦ+ݑ3$dsJ j;Kbwn(ÇϰHk67yWMG622!%`LX]g{}ڹ}a@IhzC*4!rfQ*hDu9AϹZF//BLл Im( E "&n!A,K rw"7364{4SھZONӟeNM0P`qT8c*3p2J†V@pbzSϩL a*KP;vBۥ<\b)2 4{\- mȈ wwwCByu|yy֢vzz:}q_2]\\_ қiٻ7JXp,[0$8HEq\;du9+g@{~^~Os %kwzֹ. Fn-tXOC;88[ IG":@͙ a@ȣv@60kq<||6 3gd7oތ(K C- Y7j L3p2'?~z b1^zwrr2OKO@ `iﭷ$A;-sHk(P>C 2j5bnoo&Uݍdsgk -p{{;-!RX]{geZ@Y8iV\ϩVݖa(p]quu5Z;XY&Sg $x,1W#2HH4piDCYQk(#{P!]l>Q5/hGI  ,(VTϑu*+@aй@}ss6,\'F6d o=}Ρ ag}D XF6(X"h Q.BOIaT.9uYD(Afqk/;::_e^~ajg;&佺l_?88t3Jֶj О; oӴfi_DYMٚC FheOe(;-9>vtY!H!0\׺w txx&*%F*)=BF0ӧv7ď?c}ElsނkNj {`9E蘲l6bO>$X>C Vm@xe[ Pwww*!j-$b`fϡE܄#8 $/c0EhxGy)?"]!r302}#11h2,.H!TكAv%*׃E2 ٪.䄑0BP⩙CB6!BP&_B6 UOS >{u87a`\ACHG0hʀkZA"pܕY9K-apЫUt/g1C [d ٍw﫦Ω(_9D*`Y!_J{9NeZbYe]#ni?" A]M`G>~8f@ W[r>P z R@-/S₾Nlf{8N^x1 fd};ϟ??%.-#έɕ́{9Q *!50H 6ȝE p< k;g g&sU6ĝ0D58 dΒ%Gu =`9" ꮵu\ *(S\yq6gZQ 2:8Q\r'C˗˗ӗ/_,mv\ˆ,ˑI de"y*~!P'Cײy'wFKׯ_i6`/(dCW$~ :@Fp'4jX `vX%AY+2㞕e} %q+E"TA.CDbKup`YxARbdDw%SJ\ԩҁ-ޏm5YKiD$ ;Gqb Eq aU,T)FP{ad?"LsVa!r u;c ,Ȯ“ L];WC9\.8]Z}goL$>njQ4Cvz?uYRݜ"Q<5ߠ7(r_Z 0˪wF~Q&P%#e_ulim AYCoLHD`u)lʎԕrK E8z?Πj%:gg= gluT \ 2 (㮀Z&ztt4Va[ZZ nh,qg&"uLU[]p>WOҸnAY,>i>9Ke'}m:99%ٸ@Ş47+ߜG9EHjY'dS,> |8n>řz rq8~ CkG{`ծ&z+MV FFυ>>no(T5vD,{VbE~9+V\.oߎ3|R“3?Xm} sY{ִX,j5s#G!FavNwN^0>82S^X [(u6mR}LN@ /rTɽlÇ jZM|m.sϏ5/^~pkxx8-T1 |p||< ]綟 TzGbryWZMLkp%tv qgȣ!V[[[c@&<% 6%E2Yvff2QɃNb|~0?1@ rW,QCґd&TΎ&իNWsd"te{|YJu,FI~aRh$<|pdژɲɎی~1=xmr⇾a-#֣=}a CQ$Gpȡdא;'*"fE2#ٻlD59P5Yo?:*aJo߾ύDuzz:jwvR Dli1%dvڊ_EBbS&Tߠ@o߾ x`9s ndˑ+mVojnӧiX *76FYmT&;UEMyJk#RcP. 'HFk5Gۇ!.ѽNSɕ03w9M.9rLUQGUѣGjW7QyfNgae&l @*6GFk]t_ʀo 8A?u#=u],ĖG[T qIpR5Jz:곝=/t laq:,tlºu #@+%ê Q7HD =WV&,=}t5{:/5Wg:|JJR@X𵿯 =eX::CkKjݲ*gDTf]F4Si8f ɺDJ2gPK B ٤ƛ#<̰:H\p-)`ĈqɈ42rp;ZEh^-t Bs@+j jp\H]l{JM;öXSM,#x}}=u樮qO΅ӻɸF#P :Cv$RWPaT.d('˄w,x9rC' A$ƫ`E1<{{;*q JDZzfwDAHmY! xM˦33bԪJ!YЂ}?9&o9G*'[ i>Or:::B1;{=߆R@=S j5 %ҨkHje9e?bE x+Dd!-$ es &~mH2ϻQt3'0*cn$)øm1h棚RMS2hEL>t{ Hy bIWRcq26ڱtC8cH@Im^ V]o{o6h`1tN V<" n9mX̙QR}],@>WrSD! J"%,4*S8`hWN)Y+l>VoњU >V0FRaFV7wB%O"؇H|=-oC]p{#X A稬 a'ȒVl3qHZiS", :B[[[l6޼y32n#C@˵JJbE"DXýؕʆ|q:===z4TZɓ1.*+B87$f9¯;ڱ&_~S]ƥ tQw{eSYc u/Y=fNB Tq * ϒ*@ a,vYQiO^{e!em;~ιȝs未f#@_vƊltJv x75;H|v*Y1ΘޗUj&BRKЫ't-eΫj9A5X˗pՒr;"d*ZFāCC zj?\$;Jt%?%_~&lGCKjtuu59d:sypÇG@(adP[npuRkN ܩH2jQwBn# tT!g:XdžݻU٬/7 _4[<*.s-ʸJ_ J݇ zve3ۘIʒկ*1]-p =l+k[smk0{LFAOg>ZuuqPyg?~{!:K2tv3j5b'T%0Ќ}.Ce1ލ_F V{JG:#էÇ&*h[Tger*Gi Xl޷a((eA pа A=rC|j5M4F 2AZKb #hwȽק\?M(N2GT`(ɺVGɓ3AI$k Wf~[-Sd@8LYYtі ׈ ՝N@$u 8~L:ɎV35p`$;? ZXPlT=8"'N.4PLEfY(s{{;3!]7E%rs,@ S2;UFz4LS-CC`̐ZȌ" uK(Yxl5bP8Ʊ0g0q`vݭcdYݻw˗/G F9u.lYdA Vꜵ/;\!ٳg#cĐ`Ir Jyl#nOi[ }oZϟ?b1NzjPXؼusg6w򗿌@jJʀ7}2QQ`UҚ=7l̳s@ZD5m' f:Tv:==#؝H[ {eֵa>g6/Rٲ*&kv'Bi쒴s98oR&iriA_SA 8݈|D6{ը8ўA5! [,۾7NDeL*}D\*Et#p)jT !1"n(VYLcȃ͑RCP[.9#1ֲcqzTGM+哲pRAjgZy9nBi?k#hx.$dB`NEdA`שUHoM(hI; l/ :X6J ;_~HF[~>`>ĩz(siWP+%0szj2?wÇY5,frieE573OW+#)tPLZ1u"s0z{{;o 蝡ˑ|믿`"f8Ju~e2Ԫ0:Ԗ5 x-N@VO[w= P.)E[_Ft-}g>IF,( GZSCD3!eh sh>OVݎu͹ƐM֬Gp68)X3dsFrHhl. ^<_󱵵5V(PUd>;7?s`>Q_ftqq1DHh*[BA%bݕN:OCl;w+PDI0 AE^:|E"|yWeǏg(FJ:)m:* &pww7~ajrj9:!0LȥE[mV;`HA9_<q͚Jٳavj!Tˁv+p"q| ?`W/+vªΏgAÇ!TZ!TAF.UUJbۻ,VWcl˦Ξ ɈweL;׶ӷV'3-_yҰ:y@Pbf_&ԃ0A#B=T0pwY6TJKٲ u#2$_s-N$JQii2 МhUEVQ {Qnw6n^`gФBP @ +w.z^ʄլ˫WF2f!zWBld)cH[AF:<<jKo߾OQ*`SrePwJ߂]Rb됲@2Ph}[!tJD} n״DKbnAPj5溻[!@#`Q~D %cvK+[wUg9Ւs57ӂPs_}iNHe-) Io?yLtW,9xA3@S˹J}Lp@.,E kp.H g]ȥ DՌQjܬuy;P;'8ֵ@7(*Cf԰˸Е4pF< :ϪVYC!N(|\SG1MY+@N,p;LT믿Nנ#k#A(*VFͺAP҇qloo b{{{8dW?~ >'E1R\__OldL٧ =.pyQ9#}L=1t!7|Y@M7R,\Tȴ&u".|MVvGڴY@> I7yC8=D&ԯ!=D$qF|>$0:CwYgpq(3KڟV-޾.e 58!@Dn iDaNPa\]ZEygR:ΫDόy %\:\uz2❧g @2W0IQPFAȜ:+G B' @UbeE_ Ր}Q*ںfIn<4dΠ֩Q) qArP{Cv2N$VIS~,2YO5\жA+qXU9DÞ  Jְtd @Z8N'+פl\,_s,ze ƞGGIN0-Sd c8LHƻ 8i>O^_}JP(~t(e$j'A4uI6w#i[o"ޖ8VGe_?=ztFQm:CLȑ ːdB_ t4*ԠTـ;!@l ue W)Fvڲ˺e༊TT1鸻;kFsc]žSL&)dYڀHAe9a{d|׋/3d֨]8}뿫${"CT>Eff'~`{ svxYϫ;=PE+j]]!Frj̲ώFTvX ǰxt`S 值HZ唝i$hQ!/Ff%XT&0oϘd}Rb1S&+AStI9Z.W,#C)E41i{A a+…D趯T ?YXݰY)'ȔoooǗ>~x0 #lèwf/ thf2\u9@!1LKg/S8D,|P;֟-s9ƄJY5+ٹ?NۚN cͬNnQё z oVXHM&ӥ ##bB:vϞ=2YA#'+-5xVrc8ֽ %` pۀ#0V2"H;> ѽ\{׿Hw`A߂B({؁8p3rzhp |,I=-|Xr֭,_ԌQ][f .w9–”d\'Oz=NC L3`wA1Ts@:)lggg:??_Nkp?dLsAv7SAǏ&-+ (TԞD"1jD/5#@>*sZ$]U+,ޗ/_^MAлdaY"" u% .U0g>l#?rԐ9&F {D["U 2DMuZa8jn.{{^I+JN[1:_{gNV%2&ar6H?8mɂ82OH"y2 C}~S dZ:O+ FrV6:XߤG7D~ezݻr΁777C˹(Iɓ'r|ׂquH,g|tET\ %1ga!| sx΋;|FZ ѡaAC jԟ>}nD\=ҡN}!E26g]$`mý@@TJgonձW[?)|U283###(s-$ؠJey,^5wd8jj`ʼn@p ;D%NED~P2gV$/Sx>9958l GCuX/oS2yeoՂ9:ҫznlc]fACnO>|0y:&&Lw|ф|VW_Vo_HS%qfNԏ^=J$Au=l{q`F)Yʖ:q AُL eV ;*@"3jP宺[UhUX֟#*YhΫB)~^|&*KMWPvԗ;>P$8E*`XDA5yAWk=nLoԣ8kΉ)l_'2:{-˔ /C3 iw(ֶsZ|>yfh<{lݝYG9 "xOƥRmk Lٰ/`PCtf$VMA1cj\o:r `uL/!%y:@2_D@p,ArȬP}b@ߦƳX,q|'`rFtt Um@*tyy9pl@?>w5|e&raw?/-g e{#C&f~ב-n9oommѭ*m[ipw.tkmu  #Ph!`pEetGGpȪjJ: PGrH]4[d@?^ȆP?),fH"A$PNmUڬˬ2K)1H .?+;ڪ+S}ULPג'c Th4'Us~nJwSܦoRPJc~4A7E. aW2itq22ih6йpR<˙ʱLb[Q μkuuVC>TLGLU1&"ݪy&:lszyy@KWWWcb@3cn \4Ҫ4[&M駟ƜKx>z/7덦82K^z"q\X{@~эqCgtyf169&mN[fL)dTqr){]Csc;_bEm$iè=U0p-63kkkUeJdb'}YHAtS"x*&@\ m߬/NOO+hNJ۹zYIA..`9(;ܕP(L\MxNQe NGGG5۪ w2!rd>0 {{$}n噤%9: d2RI ȠVn@| D<>.񚞮g$ΰZ^phxt[[[%OϚ6 tz?xẊ%)r].\:==]/xcSq^,y.ofqqCq̇lU J%1zD_$t{Sta /52mNpzo1CETI:.poK$`0Vd A㐤W(BH4P>'J6 =bR؄D$ha '}yURRy4ٍ3l]<=?&7i΢jϊ:wP}7 .J xxxJqf#tr_p{oF0INqviu(zV*$H435jr}}E''[ N@)ܓTdrmel%Tm5)6nesߣ(T%T\Y ruK>U @\}̢I'ӎ(A`EP9>w.x 73A{qI0999iSSSmwwxAO+4<. e$h0YzIaEYJu'(h}8FQCJ<4`"( UK:w CUtDA.cP~r[: #jK~5鱩TUGzhXINΕvq.v/s9m$}V egPҝE1ZYY^NU'Kg|s;X\`vY\*sй`r(AE jc[u@8M1hyQ`8>- %Qu?}4FX1xQGvaF7Uk(bZ6X q_ݻH֍\ mkku*Nb`0(#}V,%9 nߢʼ\D.cxY_U6Z+sUC Wr܅3QZGheiV>':Qͦ{ E7%u*xiX!{I@υ## 0J䌳G+`L )$I;d`UEQ#31I=fG'}vU=Z0)pU qx96'(/3V\S"rh P.Qi}Gicj?0;鿞i=`k0ԈŹւ1g'}%vuuU'(IȞEK9(D9PSz[Bҩw^t_VDEN<*ϐUՙ O!)V }:Z [n1W Th%UJQxU?#3VNSR4zfgGd'Ti*4Zt:r cKوzXΉ/ْ,CwP`v7U4'|k* Ld#rQ >C-IcMѠ#sd͒w6YwpWVVjU+KIWLJA}D1,Dъ@3`Әr/ɌmBD4ʿT=W;]ag:O⊕g8RZc /..Ƭͨ :Iڎ΃t tTX10'Vgj\L*hr T^N/^R0ַf+i޼ySC`b4G@);*Fg"4!:;s(~e2Z҄[{(:W͡TOn+іA;*[笴&"hSL'g*iAȹqEA`ʩiHѾ|U@^1d; ׯc;|k?$;8oxn]ɒ9*(znBg?0BqY" *T@T%,y I~X}oq X]M [@-}䈥{R{LN;>>.2Ul{̹6sfee %*Éb$R[{Riw^R zyOiT6jT PECp[ s٫a1g@9Dʄ(ٟ~dNڧSH6.S F|0 .Hr(^ɻYO&9\-zOQY༤wur={ ҏZ+z,2B/g=k3*3 XULiI 0Wi g1S[h.):;@wrchAH^@Kg^˗/c­͛U`[ 2Jp xNywF1"&"’獔6==J/k`T/W-jKxp51p.Lp߱ơr{&ETC߿ i"rqi!Bsz(_IO"ҵ*#Qu&GzY~rTLss|A sT9eT"I{.'XKSo0p8,zsn }*90N{^LFH:Txiuqsglt lѨ4NAxy2}{w1&Is Hnqco9ksw'ađ3ϩNC;<<k]V l ?>5VTy6yPPt}`r$.իWci$%3qߺn%2,AUssSk)TJ`$} Ђ 4zzP{ ⢾pB (%@#<*eS}۞+0 3kR* 9r*Y w۽sT=3N `(1޸K?|vuLj }OJgl+x c7cU2: /iU&.,D^zƂ| U]`؋ۦ( /^MJ޹ T62U"vk I& u4MX6x>}j/^Gi\g{r;z{(ٜc229uUc!ig@?\.bt/{Q[b(],..XP r3ZG*49STF# ,s9UJ%>WęTiyf\AbYnI46y]B&RwݱZs (ύXO3qu}/ úormfXO. vbffz=W:CL@CwwwW;766sWrY2wzIk`gmgϞ4} ÅJ dgR@QVRE]Zf^/^V) \{4Դg 1IT&=M{(8hQ.'4+&E ?w*=?2j%=S>$TnU9ON@D5a9f%/RݹJ-gs\,+i(t@=<gW%g w8(IŮ yX vˢf{ &EG=|\-R%A*#B;C*J!wɃmDdB$ l}u?ě͹V0ުKwز{M:EsSs`0h[[[eש*gV(}$*vF1+V=hP&1Z LW.] NSS"N51@I6]6y4q+YѶQ9PH;w6t Y@{բUIxܱT.kUd[` *Rp NIVzRA'^e䡯|Fs׌x@COPӞ0 _(L9}zKɝ4뽦IիKDy `gXje׳6+xvDm9|ճT]eNmEi%NCE=rfyC0sܧ&.P,ٷ J',`( Tuz-.錅~/]_?q_s͘e-(aj_{w6)0F4Nz$"ʩoٗ/_ԹO3ƨ=TZ䌻4P5bP櫫ZQ`F wŬ`~ aWWWvF?4-AU/_ևdِJq_s5 540Rl$S|"*䒒_馪 zDfRT(B )t9LjIwHΡJDp\GK&~%czӨf<cT {)7c}?Ս闢-LF̤gdsܜ1$]R} iEH\CŖ uj, ]zk@&gzzV BwGUFtC JP5Mm Y IDAT9I $l`-!w:vuuU+;pXڈD#=L}'2zUOLOe 0`@ࠝU4kaTIN9!Hc677ۯZ Uwwwu /"ȪԛHdfxm^=tkk$ m驽~z4=1QQgjUiۋFaIbju1O2C{U#F3=`CP ˗u p+?Qyd3swү֟%]p4]@ *LО5WeU+TҊO=2IeT( }(ЁKk FCJ4Vƥ*|%0*sԶ*D0!1 p "KlwiRA@8=OI14݁jc $kq*'$4斀 ֔vɕUl Q#B kR QJ*߷o S./--y:Hs '7@ QpcY3.I Tt yFZJy.e pbaa-jz^YpY`P=:\b@axίB(0WWW+y:CޓힹԞh]9/H1.H #w[Kx%z?c-T~U#F @_~z{~F~x9筭չƌsWg)΍P|AX8Z[]]7cDj~uubw bH8;;;u^NOOEzgF8}~4VRB.OKwS+ls\0)~xx?K7y▖J䷼g8,H*\TjZP:XUy[:M U #DiNNN̽s# @D} ΠY =JJϑ^]gʥIp=^pP$Ѐ T9Vơlҳ a Ahs|(.A[,9?z__8 3~V ϟ0_ǗlP":IZ*DAaZԑ鞟罦MIstsw4Μ)(8yީ^˸\P q6]$=:N V/B{g:;fԖ('- UX!>yW5 ;;;UX?2[\}?Ϸ15%1 fa#Z#S,b2zn擠s u>m evUxb1Foy@jbNX (t%1\ɗ \5g6OdRܔ4Js9DžtKj)%4 #8BW-;ɣ VȠIN!7ӧOwOeNushdE\C0Y'ikQ܃~EbFnTj``D/V .w٧AӤQɞ%FUu!տNբqUvdn]>Q*}ybL ww #w~U3i!Ɩ;ֹFE sN kLb23cb#ϟ~_W}zr~^;>>"{ӟ=B1 @HCe| P ټެ{HF6MH T.r.!B[KR !gjID4WBV9'p.P|E5 B$&)i]c3|psĀ#INj~ro(j9 `%rW;@9A`O|&}$xmnṋE.+jJCߜ)whh98S&9l@onnVpͱ9" X_$47ƌdr*;us)N}vEJ5*(L9F*G$Y2g6m766AgKX 8 ;b@-3R"Z.xMlc/~JL0nH \;;;߿W+%(ֻNV#Y}9`ia1OΓ<}]f@CU \ r ~t " = 8)猢z*L@cnwE٠=Q+u>4C?OHeD4`%(xF~̷gN#]F)p_z59ss*)soZ%f`9*g#JJfO!4[̴?Ve>Wc"\s7TO$!}OOOks՟ O)Q a-_Fwr)tJ/mE4n?~oofjju;L8Kك?:✁ְJZkY#t9>1%JG Y?Sqa Hf\޲J|D̚3ùkvrr:NiA@I"8*|.K*8@1ɓ7L;3 FݩOqֻn{Y %@r}sۦb"J_>tC^syx$\=t,J]ZȿK/n]=x5-Hd3vQϨvW_rQIfQB*p(d PU| Esq~"jFvrrRHB)S<΃dZOJ;hG3$ˍN ZT)K"3h޽{W}`AMB|TD.8 *` %'窝/_P‘(iss] ϟ?o+++UqL[CU[ڌʆ͵x̋ "Q-//w|(}z&4wf=_!\) C///Օ7jmTEfY%; XTjK!T:b(KdqsZݪQFaCB;@&@oI'pU^\$$R虫L] 1"GPxΏy?c&IW2?hrv+6ƶl)f(a>Ǟ!UlzFsɦd# N9Jܒ iSLDCY͛A_ xc 35}r@cF$8]{iٳ˙]KR7KbP{aHNB '$U ֔>m<`IPye4=cU@ kH39&[ӱyTJ'ܟA I4Tiy)S`rBQh@KיP ֆ2ks/6%[!\)PN!ZA4T[,gǗ۝=̂b:L*\`5G u#;)L+'Gхq״nTvS\bCr]^U ˙ҵ.0𞞞nǥH@E^4 _V -#(\y3ͶZ+0pɇ8U]A]2oҮryymV:SpNe_ F.& H *mC~(PCґDOVf2t}1]?~)eq}}1+zT{T1-"nYf0ysFI٬b'ONr˥V|;;2{I3Z՛1 j۟4<$w޵B깚]"b(n\SA!K^f,52@oJ`-.I^H KF$T';&I`6+JUAyLȝ A,yHP ,ZHw07DIƖiHĞtz5Yk[0rp666i܎%M `Ә" Ch*>qLCƝ!P֋E<< ; ї.||3"Y^^."Kou Z sQ ;%}ô"LTFl4y5K9240Jd0nrMIUL eQ~W'!a6Ŷ wL8Б&2%%õL?~`Lt::ɜI|ŪثGQ.ދyӪLƓ~_~;ǗBhoo3_??cHY%or e;Ϸ8 ArmǕЬ,-/5h9k%(}i4ϠSm%dhuz\,""rt~܋M;=C^ϟ?ЎDdl@"Di9;;[UǢ\ KƄ9j7:B\50!,$PTzϟ6QItӼ%wϫvǘ:LI?pFĎXw`4*<ҲԿO%b"U@ڻ,G+=.T{fInjJgϞ-P4ncHL+#KnB9 =W ֻw % 6qX"0ryr&jnUޖuS" 7Y*d"' " ̳%x}n q(` *ՙ6 666;;P>@g;m@ ^*HRr$#4iyDb&׹7,K'σ>Sޤ~ʷoƨrإsـAOTv TQ<==~s(]urTnooAm*!] ,-,,TP3ʣ@K9y/ٗ͹rBE%n[Tz/D1D}d ^|h0Qk(Sq,X~e< gMxFwonn`P 3y־ zDxש@:Th\!dWUq4U@̲=@^,1i~]^s?+WUk!m{u=i8c 0- _TA sejKaր:kB٩X]._ A?yb):gs)͉wmrޟ30???NOO 4Fo.Y]]mfJgf,_e?^4aQLtW]cEa$P4c;88K m; {,=X%,4$Jyxx(5/zz6ԩ. ?#Z9lw&B1gd}/,i<*ԩvvvV8<(1jf:휇&qT ԥN¢H>W~OH:,B*ojĚ=Ie7tuuUV\0Ci\O*hT-%___ݤls4P$oszU/Ceh4trٻ":R`gOV}`ȸTC%}IϧSЦ_ 1ܸAv9  d e=WVVJg}EJZ{zzj? R! l{U mqq z~3335L7Mނ%5Ւ%_-4-ǃ_=໻?VŜwu~TN:gKP1I䌶y`*XXrjIW WO&oookP:GX?zAS@HŭZ@...^?bt#*Pb0rV:+AFVq%MdL z-I)B˱] P>sz sl{{{dlnTCz;Ǩ ]\qj &UeyӜP9vI'Ϩ* r&Je.rs LY>^"W$TgϪ@OH澽sͲxwZe璳襳L `FD#eHzȿ~`RX Z;;;rX k X bwO-^o{gg?̄CIlnkh\]]Ո] ZMIʹaꪽy9TGLF߷0{_zVVV;hzmO⸡^4' 4_wT6h4;S- VBn9==jJEt0je4$MP씌@%Oj#Lz\3zIp$Q0YT1z<'EZ IDAT^8pbKZ~WL-<^>iή&˗$,g% *A3{";SX~gn졡}VNdLiIܝNns*ׂfP8ù VQcYT)H3)[]2br⛂5s*v@wN52G  !Y$tR)ݕ@QF>}jڑA T)vC'BXe4NSsg3$z#k@Wc<7+d=O~d,ɶ3Q`THZ|Ϥhm˻J-]= 4GТ ܢCsR!!ǤAɦQc,v ӊ1f2;m{agTy~@$)PT;1&U~Dn% ;r$Yt,^%o+Ԓ"UM@u D]Lg81ړKRCvqΈD[R-ЪLPB[)2MH&%[ 2B[d3hg{>lOCm|sTI j@uKmC)KhԶjL̞"nsb%`9Pf`%OQ+ S916'ΥnC R\pހ,-4 &;IbqhߴjG؆>sG@βo@ϡg[7у뱗C4 tmz 9{A3yqqDR2D]^. n( )eKf\ W>`%=<  jϟ?z}}-4Q>1 h1!?I -w wA=z6-4Uf.6GtUq(܋IHC $f_ӌABJu7qөB9C./o @ky:W www˕z8OCpvrvsr%7rlNN TmCXN@5v`0Er{{޼yS.YiSeN,NHwͱL \wSI*y}GQ"6׋Zsx;Oy֮5zssӺn #d0ؿU?$S!kkkXkqkt`qwtRG`󴠀hyINn˞?'- 5c[@ _UUq]:H帓˴FVǃp9NCwS F@h(-m .rrXF tqR {OuCIۃy@qUִ=Ggr$DU4/j*` r!]v \{c`XDmb|ݻw*k@I} sA|Vdgp0pfTURsonnJ?BnIS!ڪ 1^,3 V0U$A 5{zOY (]QleI_t:h*qD;#AEa279J⢘kn[ѷ(K]M!^# *ڿ`z^]9!{mq;Uk4yf𳼼NOO+?V9t3!Q<_=u}ct-R<x+Qy}X¤.= CAYZzFV{ڇ.RJHu t{M?EvysVQ/()S⪈'=*J< *Zkd3rBD9Y!RY$>>Aμ$=dY?Jf=9 * l]pN;M/ls܄M1Ptgp8,Eݣɵ{o޼ik_.Ckv޾}~˶XfBBl૭z^52@@e&^P9h[c惝5Uvө 0NOO+{vۗ/_?0&TǥA ilGTXR,UF&8ג97i.XWir0:/if}A֐^/qgD@M\b-4&QeQ!QP 9DAD+6Uׁ= ,% z޽C,IX.Esf&NR ʥL |l|~h4C_#'JQCIf5]̦p.[cz!ٟo{U*y%H3a4X4N}[ :%Su~B>4 T]؅㚽t^6u;.<>>} m A[eI鶴NNN NOO`06.F\RQ/XJS"[YY)C2w(~py/|g93=3^xbxNo׿ ê)Hgo:Njz^FzXI[`5}GԀ"[a: Mo~~O#L6$ l 2@5$Qj9&ΘӪ$f~/۷r:P7w]YY)H[.-S5zN)"zm6>#> @&G^xѶjF7FF!N=H. ixvxxX{A%bUtCYTt];88M[gp0@)U}; 'AK=0[gTJΪvUgKkr!wwVY(2q]`|'`fD.PYE4l@$YU/U+1JTqpr ?k?S uDb'*up3]]]m&DLC %L. Z*Чrz3b1Gј~$^WF$~gm(7XcQ 53fSiCJoJekS.LMMBnzn_4?Z4/᠝H9|P#{p )B%)x@Ap "$DEwDjWߣb+ TSn1}z# fww :/Q&ts<::*nN,a}7JEKS2&TLhy`~BcnVF1099y.9􁋤t|_U?3Hs}zzj{{{h,IhPѪuUvZnllԼ}IcAQ( yM% UXճ^>m߹S큆 z͜إhnoo&LT)/մ ?~U 3YYp-wvʼnK~-,, $oqF{ A;%sz^q&btrX&SpssS rg՝\9oaOⷻb0N}򥀶4^e&X;%bUPQzJ1zVHc^K4^٧XAuFv0 V5(|w){D]IM9PƥdY1ː $YS _4W( \]F .nJjT)׳*u:qppPIO@-wɪLWjYI㳿_A-/g;fGh4oT,`0C)jBm#VP34i^*QhkN'k%A=ec#0iN#xy;999iI."33w8RmdW@xggL2צ0Ӡar#50L`\rAr@{Դق|ÇGaAE;1gP:HС@vaa﷏?]__n;m{{sRZ^A w  u ,(B+-*A1PlaA~px*iI3`o.E۷o˽eFK i muu*N:w˗vppPw4kI#qDe(RRA*45Ʌi%>뵣z9Ss촓 Q|\L˹buffz~~y3 F7)V{K:Vy;!`Rr+:OlrԻd:Buݢ԰:}ˋ"$T!,kd\%1KLЃ<&y(1UP`XTN(pYvӄ$.MJ&6\:TQU ΊO>5l:sQhx {VNfgx}ǤollzTyPhݻrOOO[ө4vSgyeh4D`zݻ0lr>A`cP3% AJSψ_. !H!fgg lnn19KGr% :@Wf1J8] i%IyZj쬒LXwLbUxON brGyI:# \>vXs 5{)J0=$=\!ң"Vrsgunḓ{,#٣uֱ mooo@Du{DK]JC'JF7$8TbrYǻwED+q00<?G՛&=sgzc\u%gdҌ]tZdEϐgXhFSSSmK.36}62l! Ւp;N)Ł͛믿V|P ///[ۭ61$P%|cuuFl(mkkc՞={>|P ©b-Yb!YJ℻ mm㣧k$Mqڎ dY`ɉN[ojj,,,.=v%b zBYn4h `zB͒8% \gggE8\Q>?b'jlF#[Jf"ĠײݤIxiKyQ 2騄Tx,YG}b,$J=N`'Ɩ:  {X IDA*ԡ ...g(WM8OƵAٖ,C5z>>ʫ"*xKI[Y- m4Q5wnoo뱖J/Jx;r6}QW+ַ*I[Fc>掽z3g/-- (}GKMb!³$vr/sNdۭJoom8VOy0߿D.Z6)k;;; 5 N?n 1ɐQk? i?nEyniv9n'~='Vĉ gffn\K NNTJ%᧧] bF7~ !TUE=88;a@^V!rcGDEYFf_%d@M{qciiii <TRrS~嶼\AEê;|LO/L.VyzixvuuU+tԭO·ɷa=+nV.GY{ӌ`UU~_ :8l듌VWWz~^3֪F XZZK+pPcB,]X^^d#g}dY &w:nwZ2rwA=;Aj01r+++meeƃ6œu΢;hf&N+?}Vy%C3H'[6 * ez;;;kOsX vrrz^Uhssd{-//Nk?Zs3 h{N666Ie|ol.'#WB#|j OaLGkͼx}5*m!Q'q >}*IULYA@ODL)O/9n\vmE8:,$U+sTqyqUce\:M͵dzODi=X=Z"R?#XXdz٩^{oGHҵ#GݻM8j87J.Ntfh}B}D$y։}n=tK F*.MaE@dD:ȋ_ LNI6"Zk5pK)y-mRn [F zF1FwֽUq^I-`0hwyT6bE>C*777F`LRu€Q_.iObč-Һ],T{.CЗ$3v\NfRjVC. i7KךW47JԞz^h|LCpIOY&/2 "ܫ縕[|^ r=l=5tVg}9g~~"F6MTrr^;>>3D~\j.pA坮WzPØ4}s]g纄4URuyh,s&P1yDU `n!ժ^ӊ=#Yg69c$؄>DonFi-Ь'vʥTnFsO1m<1(" aiD-6ARm~VbC%i6 tX\^^V`0*!Nk4?13BԚDNi?(ڏ?XLq Wofnn=}%/o@ Л~K(/R26! tރBL[D) ʅ2;d?K-" E/Wxjr إ$ǶS ~sWGRM4F0,Iy(yy*e*;tT隅OM -TzK4\j^X+KqkL&gNU^J39ĕ龤Y#&.ڐj.<qɰH(g>W!A4dҨl']^^sϨF >dCY\^PRAFE; IDATrյ=S{N#zfE穒GQ)E; {͠sUmm9qkQ^ͽ^ 4cmVY@5fb-rzbugBvttT1@k}8uaa￧d( K)oVUsgy. r4 [W=C5AT 0wJ*dՖKRO1 E@EVyᲣCq p =ZI.$ʝ9߬BlooFO__OpIrҸ"jM!Ih7*U YGǦJEHޭK\\\%9ȣ,RPE.HN}gΏ3)P0pUcuYZr.I`-MUVPơ~nYV3*n=e;88(QV8UF٨(:_[[zn['W*q("]&V34ʉ C׽FJ?P߄WX'XiIb@tFt 9fPU\u1;^BLOO,ze9Mz\Nn ,r &ib$!4 K,A2P8Vj$ BGebx>T\&>$QfܜM kTmA6gŊd؊5/Ec6f bƗ iqIh|,ó)ҧ;AJfGe[G+LXɦp88vrLEї6 ccf,].T3U^tb~<~11\*" #4 _~i>|W"02QwK@(} XJy,AXVG3OLϞ=+EX)TaAJzKg;j_B)eЉa^?kj{MCzsH!"TlS2'v?>Z߃~+W 63??ܟ +Œ .YYP%I9YJTzz`ҙH!iNO2TUmB3`"{ {{{ER6z^PZ3QͫEKp^JH@KZ! I*Cp9,!Q3c;Id[f pQ.L%njwT3hM-@*]`h+r9)++'2Bp=[gzm " f lǏ݅r{*Q!"1!8Z$O깣lbU,zS-y2z9𽽽1`\Ϸ`P YvFs0IcU_˅l\@2ˇǡFrSchH` [ED26# W&h=ep&*ʵvD**\Z 0?CڀJU0Z^໾[%P ~ߑ6ڬTx}CѤ 6{mxS׳WKǗ ;SAfYUFr>3)2G;҆sNk N#NX_`%e{r̘}L܊'U0p"@.`zyysI`8C`^*J+t%Z1̒oγfcnn,(r$#WtF0n<%sGGGo[ݕ܁|~~^-:򗿔EӡcxNSkgLmVxD@ozc鍐FP9hHÜʹϟ?dV67DG$?`V̼t/)P˂#J:Ub r*]EQa<Uro,4 .Pң=t:%xP|7 5)(h=.,*@ל>TC鯪3\LNI adUTm*3LU+! ||sxG)ŹNzH2w5٪T{VVVnE`ҦԗԿFoQ0"|)UI IkYRAb$lzϟ?oJ8\rb&e ]]Z[[k~ƴߏYE^__NSO,m@`X奥믿Vuo.?l$atppP`Eonn2aMb˫nĀbإm' /-z5w|},abN,,,OQqog%B"g-%K$]@ߜ}ҞIѤB3ǟ$4-p9t_#NC}N@P:8'70 * CZ(Q2!WTf=WtI؊d9$Rch\9 P T7J"1\= hyg)Qޡ^ s4m ۢ<99^#p3Q.UK(h}{ja ;GcaTAZ7zƩtN$@\VeZvcQg<@gq2rÏW 4HYZZj>|r`@r`blzltgr-PRÀ7g^ڀjR Ɤ!5DbI9/ QܘAo@W_^^͚u~ZpkN&0?)RC^A2=^zJ9wzRe̋2===F hD#C.ŜC.U?áJټꥣ~U>$J rpn7i^'?kU99jK|ns*YN@ %Hgmx3~ A^mJ3#s!(i͕E]tI _tpDMș\ ((.Iì@D" {crjT`r~U{v-s ;6^zMLgZAq l@~,6`1`H DŽCKl r$If??c)@?777&NCW͕_8"!H*O!Uu1i ˯_1jsssm8Vv~v|ゝNmnn0a=,;u ÊtJM|]YYV Q:D{̭X& wqX&Cj26ƶ06ӀDDJG&[XX(Ig{oooV%h666jL-P+KVVjT!\`˜ϕ3L~Y}$\Ԣ$b mi>??ǪcKX\\,*9ޤy&U(r|SÏr?C`"qF[eCIg@Rulѝi/I䢡 sC : wօRsUz(>c]ƮPb,\NѬ2Ui_;ф췛]; 9ER)KZھE,a5Tgl /h9<7OG*h 87` HE-Yz'''|g}pt:ΘmjRΓgIKw vhf-V9&K;Ė15~ ' {@|:BVMh4* p_L=؎DZn`b&Q $Rd_F%pӪcNL+ @p<$gYJÒ#7_ğo-UqB31ID/IX(d~;sϥ*m->>%,rN  y-X׮]k?~,۔r8Dg<+066V4)j2ԫgRDe PUpHQ+M"H:(uL +zY)YE] Z8m'1 0> C34#0AzONNTzgd4tT{{YZ7nܨ)Ν;}E2:X%RCBJFZL=km)FJIfѲvcSQ1OAHLUIR!xSҹ NAǙ;OrUePm#2o߾`ԁ/_@JZ_6$0 V <A-tG)9" @UwwwBz}OIRdlwwBM G+qߏӧvttT T0=\ϖ#3HMlEo=je ه"hqo߾]@K9ߜ"8 壣[a' }ɒ:V9-` sbh:. /ɲL>/6 ٞ7ku ccb6_1|crmlDIq7)>΋gaӝ7###r8YtPA*"T KRԏ3x39-^39[D ֔)f 2#j̬{t̚z1߅Ȥ俩C"Q\`d@UdOM éޓ3W떟?nϞ=(>:`o߾UK ;bmn2xtœ1 NMM7o5 VN}RybOUm9OC q>mu~uhk>|(R^HJ^G#b}ߩGWuqr4jo~#A!cRuYi߿xPmedCyf`sC*,p6;[Yr~ϟ#W#)Ʃ&B!HUN`Lw2d$Ns]f2LY-9EՔ]2f 1YG(()j:YI€p4Ldtszu&^C7\ohM;^ CaCݡh}lcg,O`=ƴ,x>;ܸ& d4t4[qJ]lo:-k׮T"up\j9Iz. Q%پ!(&xdEw%'dt7m(+=;;[L{f%rV֪g moo>)Ȓ$=y$J:'?BV/MIVi^ΣwcV@*eC9(a;'"iq1d;"B?`22Fip$O>=D;>" W/ʡrMrfƒZbrFQ Z7ي`NO(D:nss(+xP<^3cA1)}\뜙TR R*1 룣v޽Yu9dtփu 1؟0 q,v^9$KA&(Cط2r|a>'řC0GV990Ռsg:JZrF7*emN}/:9nAT]NJI^2K]:$< F ґ5Tgq{{JI9/{%Z)ȂЎݭ{-2۷okژd ݽ\=d8R%Qw( 7nhsU?S P2e0AC96N` ze9BZ5>lgIJ[X%L2=!z{3Mt(g'|Ak߾}kO<5gȴ_ :S'E$bqvm \{mf1 M@ j+G{p)8PV1 (OQPq+^60s aFS')k.砰USeU$NɽF9k J@L::l\ ٮ&oKƪ{ϕ)[8"7a38uPXDx?%'Y2Ɖ2N*ɤ:?'AWK2RuڌQEIY Hv`09+ck9),/F;wqr2J4%k͉g~P|t|e&/_l+++eSAkـz(KAXOZ`M`=vIJ,W)@#E%8Ε.X:$MVR5GWy~[ZZ*WIHm| zڵ>~X(1k[4::Z*[pڸlCڷA DUr]C nUbK̃vuF G 2FWU.l]?2{(">}9IK9>>^Q4h`7 v od^9YusKmH/A[rH2Բ$v1ًG{KDopg B[8/{'YF}?weߩOU]ϩw991*5E$F8lGVBr0|Ɲ7?F5\{]fT@9k_wjqz>t*gf=wQ/]͢ڛ7o*+[[XXhKL ӳrVίlO>--w=tKAtcr/NkW:c꥞7t»W{f9A$]ZZj͛75T)d>EMJ0vݶfgg`ޮdC/Ct)黭{ CTն>;y)ooo=TS+AP6ˊ+-'2QEP)E"rf(ל/"UmRy.gcRXߥU51ɓ'Uhs:>>nO<c5j`X35Pig*8H+ЂMW^Ēn"p,#8t9Y5}pš;::*GJb>uX{B=}O`]eBd~LPHDHbQUR )# KIWKjZ@bv>WQLW~ApjYֲ`ҡsu*wS9Kų%k``WOzlIueh<{vA(9^3xW~ a CY €%+hM8&%ٖHKඈ59=Un+sN4W ~zϲ挨ҒZ8ݻW@8<H;rF}J&KpsP7]60 r%m)=YsMM\D!N6Y@ 4gyJM.la GGGqS{[Y}MxaM*fd{`nwwޜ*OB[1띲)cٔr8mlnٛb;()-8_ C8,f3fs }9T$~I7Z) Xx: EZ& cXPq`HTw-d7gϞEO}{{{T+RR[ytt?~\uPV6" <+~zm$j?uӗq/NᵉT?N@DWeMcj"%f`;NzE"GTHKtϔPx'Q!)e@\`]NBO(+t۷oiagϞ7oT z>Bj`3a)G./ۿ A'+^ U r,0ϩ`K ]x )蝩4"΂a!eĜu{.;G-`W :%1JڌVVVnhq1 ބ@WO p'wo b2;a'9I?{>X -پ2A ~Y]J)΅. {g2uJ~| =͛7zt:u(Y[P2l?KFztwUb۪Us'O7oTrkall*!)InN&ˈ;ұ:o$[nׯCfxiO $6ڐlF,ZŚ&(4zh SLў1qFw^v71 bppmllih*]aLAN .--KXP})'PXi\m7MV{ƍ^IT~vvVqmddrzu29S޽[ ,H0%a30?Wr]NAc0d0yBD&[`2$"KXBx<۷+('/dc(H\&H8>>^esg̡#E~zw^[__lŁ BN>C_s7)J4$]a I ^9<<^^;{v cl9 AE[J|}vFWKa<#X=۠hf}U-rИlOgp$µo;wvvV2X9ǥn0]^9[_#2@}jTI:Q|:{W{ŪmF/h988hOR _kȐ2r߿O&c&T˗/dĥ][[U#idbH-fF"kui 3 H1"l/*aZGܦFuV[]]I ԣ6* vd$]5s8N]T0o_::*4 VH&c`D. 6#E!!oɬeO9F5mĖe KWH 4scc=d1j<ǂ.XsJrgN=+2Y{Q}}!h%/s522PgR8(OͅoKKK* 0ُ.k `K)ǏHf3(!WA{677!tp$ccc%RNiPKer:wܗtw(%F2))S1n=pq |2M6 ӧ}67 9ŸwƝ e[8%JNldmHf]G%?<<\}މCKSr122R33Ss200P}RIgK)gUƛ:cccm||F΅yf)s )ў~Zk>Þe *fYsn+)5ʂ0_,s>\\'" Ke Q&5=x5==677)](2`jR3L---U4ψ%BV-[.~M-$3HI Ѣ{کTwV6&ۣG<@_?ŞS#rRFpA΂h2 3_i jV l'lF0v+sdgi5:ڃjFG#s~sssmss3"!4E x7Ù!St'Lq#j݂0zP3O aS/-p5h}it!Hk9H%Gj({mkkk}h'P󵃯D\v=u3]{S3Xz$s*3&$YWElGv޽>( ٳ`q OJՅd&F'Y$s f2ۿ:slf])h㴱eDŽ3CšuOk rW7YNY4" muuSς]]d؟W-.',,, λ9hLX?zzϟ?W֬Zȵ?>ʙaٗN>+NmgO  eP=77Wh&]WECwRm+jy3#=44_9.EOI*S!%'0{T-fΙ2jǥPlHOfO,#Z"T=c􂁊e"2dl9)byoz+[xYCqd !NAruuX.S,D0>XR?kRUǹ= 9cY\JmH 6.3E0S["e5"W:#}! 9(TNApr@0w T6'}q 'mv)9b73zn.l_[`3dQPmcc&hu%R+C%$DIJ-"-mpc͛%4-2Agm<@ 9!.NS=rĈCv$F\ׯ:zc_^^NӇ|t ~{2Ư2R+dBQ0& 2Dl¾9!Тl(4'Z~%cz(-'dD&;.I[^^.RX EMdNԕ/j[JOPgDHQwQmgGk=EPuJAkrz\ব?fOu2=鞛 UPs(ֵC] /r!phzudbc]ޔt2\ C'ѣ666lqZhkWjva*@< P4S}hݫ+rpFIlһ)^tCK1J]mQ}L9 5Ma5hr5IM2!_{`S<ͻqFE@t*A?22ҶsÔ.=|JQZjO< s~=5rYJ`j1}$F255vvvi*LIO=|Egfhh,3xbFTaȱ8.j*^ر[XXjͪA3E:)i IDATYm sBFbldi\$TAƃ xTr fN(A1M`Prs~*b1u!PYJBʴSFQCmE3Qpud4>zsF_$S,3J\:nu&τQ -qyymnn/;N󄙌%hY`x* r&J2!Hڮ#^mqMݖ 9Q)V;6kA9eN&DI@NNNbC5eB*D?5i b;i]+oB ɓ'eV/%DD ormCB6PS*zo߾ ݥ 766V̡ih @~]$+j\v޽"9 5'^.;%2&pf9Oы*K8>,sL-5keY`8uy;0ݻ⢜F:^ 8l|[[[~#r3d&X/2RZ$5F}\ ˚i*f`bUS E lIX2?n('LTAΣxe[X~#e(H{J*% IObH*TL'K(&g(ccR,]:16{y䭵JAxaax3}:gř䴸$qaډ$:Aԁc!nec+ 0r6^W7ā"촋I:~=AlsP&r EjX9:揅cdX.L waN^ɹwxxXEKanD@fjeq;88XL9ث ]3>Õڿ55A$C.8VƬ1ޙI%[ha,6X"SABL7,kJ}w%ER°ƷlVp l@ W 8tLLAQ~MNNL`q{,>Uߒy\̤D>{ ǩAfۖ<dža'dLtuu7tAcf\}RϖCĹ!>lic)333H-6ǡ&SP授$[v',? c ^իٕ CZӕ};N_dGGG[-4S5#EbT59י:S ׯ_ AYdB,:#e&Ur1.e6f|<ԇ\pNXfmTC N54" O-($`W~2vS> lJQliIZLiqqzU>{>Y[n"p8x 20Ft[?uve3&,}md֮1QEj9xB Cr4gb02 Lmmm:dt:Xw1ehbW㞜G]\60c9^H Wy0 SMbx43Vh (84 X dA:kjX`1 e ӄ5| bu$1X$O@wvv4e٧maammm ^Sϝ;Kv&G!8"%M>Tyq̌v @1ؒ"/P aФÙ Cfi%lc`7tsB(e"ѧO BMw9@v)[BLTcyZoޱņFグcfju1>#яjI4a$wwwNiahcܥऴ d*QF,-̋666V,'6rlbȹEӳUS9/{&Ҷ+sje g7Ꟈgq/A˽V}`}Ԛ:###>?{< 0>> 4 MwnCřnQ;<<e+n.HT>ZsﶳS thhJNUwwwpn׮]+65{JZw{~~Ook׮n[U󝜜,.#wvv .j333}Uuф~:N%SoڵkR)_Q 7Q*_uxx@:g"(\!1)'PJ}ClH'ESrQ"#AyZQH0d+ c,ׯE2K'Ĩx9VơɌ]@(K kmZhE5##,$ AO<)A{] i@qN9yd8fKȲ.;Ryk&;652SK:G9L,`:jAk~ƍb)e'b[i5p} ?8 7"ҷcv̹"ހ\907ol>lnrmw(b۩ϝC\03mBݦL")r{lQi?C1n)ZPD#! {xX_uaw ClW;#LVLudk$–! xc~W lEI`-l D_ΉњIߥf[r-= XsNtRsR:1Å)>ྜx6A SLLL{0 eS: P c|<9ͱp|taQ57OE<  s1z+kaH@ ҝLb)ɚ~P{jSC_h4KYÇ 9)!+X3{3֏G[@B/jl DH^D2F^&S=oU |ǜ}Pn֑#!cr#\7߳̓,(P|ekkku8SIB,bsqqz".!+k<Z >~F29Fќd*Is>/c`!"*P=ӲTCCsYd63,m]{H5+elϕ:8ou\$O2@й7Ks"(zdL$P sT 8lQ4"F0:KӶ7[WvXw^ب~Im0ŔCAh---U;K=Gze ^ !H_mjAk-0Ai3(k9`])RmIWJkĿ"GCʮd =Td'%5XD0[tp[]]MMM8QA'8E-.. 3qY0ctwΝۂ!G6v2:НT_B?Ւ%kT:)} Y__%O}Paɩ VjH/–9<(տkU?<<< ;k֕qƴ4鞜APٴYu鴃GUtQ|fb2_ϟ?W }>\-h(D{mL=33Ո8iM HVPѨKlͬS*1[+)F})OXk):`IkׯTo ޟ7oޔ "6F߼ySw)\fZ${׮]k333d\ժj>ONRНHE-Ujl k6^MLL ^OUj'CShnqeS`ddu:600P#!}S`E)brrMLLT{v/_V+?<>^>FG(SIX6g}ʖ]B,SmPhECq+0X^ ^Fh]]g=dQ9LeOwΓ>i*CǑ̹2cQMjezg9ّ'~|^>z E FxZaX9qL v'uc29S!Ey mvg@}ergCFnqJ1)5=x v"-e?B\|~?]aGե kPıY0??_fs<ց:18<<\2R&0D4d&je2Bٳf OʖWvCܠ.-K,U4Bje mq1eΌV)cI4 Y V%+|Q˩=Y]39l9H%3] 0$Q۳پ߷Hyyks<%#mۛ7o%⦲&cB ,eeϕKp"-kHaa[ Q S,YNd*bO_A_d`&0c{>9b7omMx P..E{D|{T\8ED5$fe5A26hB{@.SQzr 0<gtgt̺'l%1.z_,pA`tl/).1Jc A>EKN Hp@-JE,*|둑/#m eƣ-ӺVN1=&''fߐuGPE$FA@ ,Ynggo&3;gʙVk2=+x^%  8!$,(?2VCqRInFbT{Ϙϐ->]]lW۷đoÇl?C]R'=C8Vف*"곳v6440zbeg<>ђE$i[XΊh @!%W" \duU=D }gr&9C@&d~gَ IDAT@CfN0Vlt۷ -駟گZi IВкn*qmkk˭R I`@NGW^\\ͰN_~-5e82?99)w*U)xBZSܣ@ ]N_B^1X.@4 udܛCY6$!aȎ\$SU9h9@n64*NN&lǜ0XYFD`Ԫ0 9GY% "&0s6N.*$K6q(rK-KH 5H`qp eI`̝=#QSG1csRGDs~䄀( "9!g9.}`l,K:MRGme{&}ׯ_ӧO[ۭM\Nԫb$@!߿o?n޽薃 PV{yf9)aݭ}g۷Z'ڃ~N{b_}nNOOn!.a`ԳOCwR2O<&N q3??޽{WF;3sssjnG;9= Sȶ )Rf4WWWa!f:'! JjőJt?w.\^^r$}q>}*NJ_j!ɞ[uls1eE & 1beTrN]>|>|P,P+C;CAt:p$AIƯe2A ڪ[VOd=2r]F45up$ 8^]11 *A`TLy;`3"zP}gzx>5 rr9ٽI1Jս@bt9KQ)度v6ȼVuW܂йo߶޺nOuv)I͛mqqz3RyU^+.&ջw[kp1vu6??_qxѠ!, ɓv||޿_ YXXA/u{i@҉҂,Dltꎤׯ_J_CLhMhVO8DeĘ@@2aΉ^޾}ۧ rY=sssձ p?==me_8ujH޽{uNf 5ԋV///Q3Cne+7p*3v||7l=60fww߿M!WAaNrF8,ujT###訴777^d-A$PxxxXl"#DMSTXXX(訾ä&˵!h: lL+f$#GAL,M(^ rb\jZv1+9';LLLTsp]\\,~M]AHJxznPN>͒ŧOvp0udjURs 2`nGGG_~)P)zȲ)d6Y`[]]WBV2%J)C*}'''*9INҐDdZCpk_R$>(ua<Cjy)qeZ>s> euzzۿ[ QCLfiҒELg Ԃ%lwi[[[}#鴽[R?+7M2Jz0k2b55G|F)܋S,MQ}-p~!l#H511Qr35R2'n8%D4+hpsb[iE@~]LIČsSDL%C>}d1WY򯬬TMٰtsiAz(8tttyZD[V"^\\߷ 9ެBؓ ?B<22AE[k}(&=y 3K3333/$BR.RS8'j hϋ/JDbppuݶ] 6e l.h 0.GNYz%^:4!0mccS;39ٜ.Eee!͗m~~/_JeΈdAcrLn*+}󩾵מ={ֺnt)v/v:oc3"Nr8 p2YXlVΡZq5>N.2$,e25wj,C/[fNj] D a&]dPHOmKJ]t`Y%ℰSKЭˣ2ΌrE2|.OSFQ,D~R\LkvТ |D>\#OgrDVB GGGP.A$k8{Qt:KY;,C>rXֲ>d&/l}.//۷oxΝ 0+ǹIr@g Deܞ>}vvvڏ?ضk]:{uAىȐdlPf8"9=h{QD]ϟ)Ռ]<DH^֝a0Ȳe_jL z~z=G=ki]2gEŚzooo)4 ,?^R`{md,0ξe< d}}R}B/Yl?uge8S J"Έ lx0޾}u"hH;F AM+[Rgggn:U&1*y?n[gTSR6~+cqf9; uv @jg'̧ sPJIS Q[NB3>dλ^i^Qe un޼>~X[$PR!kvvP0>6011qiQǜ177f٠gkRE*'OE]jٿu:md+?c]Lycc}0 E+D Ɵ E59mgg5g0uuVk}uUGGGǏH0)=zT699Y jAX Y;>>n[[[/@خ_^5I|m}}%c~xx7~BZJ K1Eo,B{nl<(I@9mm^H2 MµkӧO1>zez3G!=kN---!k[[[5tH8>>nϞ=k5ZF7 ͛DzuYW>::dѣmmm>n7\Z,===ݞ|P?tjHz v̆awFsDz9,(,//W0w޽vvvJ :>{?H*a! ғ'!P{VV&t:˶Sޜݻz?19;ݻU6Bd*`!(dj%1thǹR~!Y-,,K0 9M}מ5Ω'SwA3b!k4?c6FR8jUSSSǏmmm"-89Zry#rǯZkMI:ɓ6<ۇr<0P \^^nwޭ LRF֭[f!.>Y> 6??J4;+$SݻOS[XX(=fz`+x駟FMA{a{, H*w0T}μ]XX(n%l\'088޽JC>Jo)" ~0:NJq, fHns]%kPXT !Ҥ}Q]Ω:7ʬR ?ŎK1EV8<}jwmsssmcc{5,ACF63frff~a̶OOmuu KNፁ>==EH.D t+Fɘ?}vwwX,(O?vuuꤾ[F۷o+OؕänfOez :2du(v;;;c=9tK]. tLT "9׮]9mooᅪK1H4mݿBj6#mc(0x]\\ׯ_W\ n۞?^z[^^n U3Edznu(뻏H[YYlmn^xQ-_+p}FFFV߿omii#`ɜ1hr iZKt)V% dӞ(BJ%ErzgV( SwOWd6 aaRQmCnks<^8hw`z?~,/7n(^W&bYψ_Z={Vr9TZC]Us4 __ԟhxPHV9t[Ĭޥy'NgggPpRۻw DzNS&/_l?.8͹I%pL&9Yimm_0|뜪aP F/_?/^[n>TbJ tL8WfwN@/_l7ol>|(.uH-dȇ3}zzZ"$/5$ˤֶ>⫃#I$G6 0Il)1<-w[[[ & 9YPJrraC]>55Gn\^^'ONVVV*3_meeζAtvxxX~fö[F(t??URLMBسɶZ_gz_ԾAijy2i$"NH6n]TZbdirnˢiY"gl"Եkf]u;33Sm,֌}g0!SӂugϞJIYݾ eñz۝;w1$ǏW7AF .g:|ÙR.C `~vs-ᕤg73TP_#;v)jsNE+i'5mcc).qڏW}sOVj7u٢ryyٞ>}?U`y,8W_~677W,m >Og @%2֍c5aﭶB˿KߤuN9;yMfY[[l+E_^`@3ː\ؑIgH3C...jRH fxpp~bVvAƸ<]t:2tJϟ?/e;f)X#[u1?^$,{X t@[ X9E,)Qg al, Ȇ'>Iv۟*)U>d΋/Ƕ˄9N R^]Tf {uziG/v>kKwee={찠JŔ/g@YyEDj%|pp'gRJF1҆_&ƫrUU,b"YUjHuER#˂` c UhF IDAT8;@9!FTuΝ'#VBHʾw)^T/EJ*633cr$믿 Q{nB\|$͹}Dxd'pVb s"kvQf>ni]&b́~TJ|p2#-Sgw޵9*gE􀌨",,,!PEv $)z1}|k9::>|Pڵkmoosjs.sҖ`R] 611QdWcph3>;88޽{קFۚI dOǁ_9J=vUf-4ӧOE>-RW>}?ՊE3Hr9Pyfrr-~yp-&gg%mӟ/Ia [beݲo߾YlԺW)vZۓ+ Iַ$_Id2FrXuaIZjIeYs=Bh{i#V3v ЁYܥ젾5 g~Tϲ96ie5D%uu^AZ˗uDd;=:@``[nKNC?[w\e $$$YBPr:]Ua}uՙݮ4O IzvlG8}ﰇ^ .k8>zj| =(ecƙ~u;*YlllDB9#gP4hŸ?^О3eT~3ٔ[^^PL-f:2݄8߷W^ M*a[wP{HxvqqQYsn1"b_+e @BUjX_S#^WAG[TJZ2yBU&DzNS ү˗r j(F\[[k[lns}m_nիWEP:ߐ޽{;Aj~ɓ'mkkGd߻w83544׿gsvvV%-úyqbԤ@QQ`Ǖ3###HVK6jMX9=~tM>9.ErŶ^*8e4Ql9~Dkd^ 5ESb(R>}Q {?NOORz#ds( "pFCƚӤZߥ 8l5sgR{Akmnn='ިnw.}Lk}|{^†^Leơ'I(RT9)[(9??o^YLgA0G/JU;ύ=f$,*gA3Ip:Ȓs*^-FqNfrޒDk Ƥh5p!Ap*\ A)5A3&ZBqΝ4TID*I.gbY~HНGܻw|ڣ$^t!^j~rjKk xP%Js7&,bd6;66VvERk_^xQB& ԩ[ng.6s>0A/hb!e)](:>HKclNV*z9DQhEasFOBF~Z_N I~A0!狔&#sSÛSP0Ul8M)](xԵnfu5j*WFIkE {Dkkkt1 1}L Gv~\rZE$9)PD81S3ǐ9W))VK2Ihhۭ5+բAD%Ɖj8@8Y}Ow)CE&&&R_GFFD"ؐ9쓬KA~pΝ )qnnpw:!Hg/gOx(G>xhaR&2233S,!jmoo.N`ΑvWIիWNRbN6VJ?~X?*0ޗ$cN~sڎ\fvyzzrA! QB:^_!:c HԢQNj>N@-%{Uj P.l=beZ\l{)d5`˲A9ԜĒ-A`3#Fqʐ)2P9̙`H`#@Y_=PS.>yg[(%D&Lҋ[ٯuSbt@+I05%}k8( n( MأQ&U)(_s||ul}Yt4XClooWνn?n}bxZ3+6#Ix/l%O$\!|@6!\k<Ϟ?!$je&gx||22}Y MQ^l}EdDzjtl'a 8*_YIlt:Nc - l E?>>^ЧC||F1A.a rdCwI#C8{VSX|}`Df0W2e`P;+X' xx@ȳ hȄ&kM|MyzzZ$nuGBp ?x,hQB޽+G܌UsXңNÇNLIPٷ>'mHr'5[p,"FOvzzAnГmssȐw;wZiWWW%&izϤb9:Nkt:; Y%{|``}}i`L{;ۭ~ȍ轧wJ]{65e>00n|:" 'S:9C\3LvÌՑ)|/Ϡ!ԛ,J`,d1d* `duD6I>II䪖BԵ,"x)ֳa\WN@yFNkUlFڟ~CF h-u9p(>!ZqtMRKt8YȖ:{ri{nޮ=h.f@87Ќ|.2XWIFS:ݻW sH. 㒙gN~r;޼y2S@3#+9C8[c z=}H .zB_ëtjҗW2bsySc^ SgC?`.3^HgӧO%i_Q2khR2e9Cu\3(6(Gr<`^pKy g!vAn,ci9mQ$չI"t?0U7rDLI~8?M64Fš3)4~m5U=3@fs4lLّZaDSLbg `Dq)E([1zTQ^d[,vz.Y(%.)͙);9ΰ2ixjgXn7w)looecg~fI6!G)&" 3L[q a}f|333}b&Ah^FM$N+d 94ܖ5Ff|}OX U{}m{{u::N PgڟUuP2Z{)S99cSSSmwwZAS/ P>`pOZko~$QrVz_WDN 1,򲝝?FJmH쀀8?3LܚfwҺn C$Z!ՙwk^>" kWʾ_,3::Z iM?/)Blܽ{7>|PJ`D 0RlGFF 2)i X/+9]d*V[KYm֌s}Fj P$D޲!ǝA̬ƽTN>JV~2Ps2ф賖+nxsjA[b%do`M-EufȌd[__o%l!VB?YբfK%J/mbBmg^ukkslf( G'*ʂ!5٧;wt:%\O uΝzWzax+:ym k_[uhamh F:a/|=p&`_Ը@1RASM9Kqz.H-mjWJ#2aڝ0y& ?)k}AD}ٺ.MdKO" `=pt՜@j[f͛7U~]:Ç2 eo,^0gK{1<*(ګ0r]so?337٧Tt3*Nl5K=Y=YYA2BEjˬ%&a33{~~^H|_I(%yA,7sB -=XN~l8GO΂L%HO/YI8d(٭D~ kSP*BN.JZ܇)pfML4m<+eʉ7(pv @dlt$%3Fa|.GGGA#I}{l ۇxvַ[ْm)VG^]dĚNsr23٤n!8gzK'<xE ,xd2d̊X wL` p4ePp4VA駟*0IC%INt)rO->e.Y 1x prωsd$k^&W0?~d1T@wԐL;20̳=Yq{2OqU/eM w 'pPoO0shL}܃jH{iY/I!#&l;l}A gEf$3x.a#D..3/, (H%rxxX{5)||||ekY`A`q7 ^ JY1$XS ɃD;ylgYvnjmY̾/0xHfDDiX3*R'l׬dd+:tvqLZHl8P% M" td5ԊmqQ1Ldl3xd?IC&! ~ A$ۦrNپqJ.VD68Pߟ/Όg >=AdIoIHcgg`>3x}:>~ئZ;~h1l!Il۷Rz9QN("'>XJ~VYNB+R5p)q,Z[[;PJkd[Prf25CΛc GݻJ='7dO?ݻ2|"$A"BoӐBhu2̾L`se.6f愞1.<#D#k#pvvVQ#4R2dGgW$k,ppS ]}d rv};z}z>[roDD޽{GR!Tri, A~v:{krrY={߿߶˗/Y F nff sNb'9&!JlR+sACF,1<;9P#Q;f\4iƄV_%bDǏmggMNNOV a6~ζ/o r4X)lw]_> "5- ڪ{uxj|޽k5 V֟5Rvmgg/Wθ9RqqqDyR aFzv^JO>moVFE2LjxoWO vԌ={Iv p.PP+f8y$m^sD]0LhZϞ90iy0؞ݻwɓ'mssfugY[ZZjSSSKY qD=!kL=ٺD(H=`f\Λ4~3AhLf>@18bFg: %3G'fpVVVtSdvkADmRGsq2k.#L`KS%@MD0pIRDSwƃGjM\!;g$Xl>nuF{A-ᝓ^g㺅BrQ}~Q%!yO"Ԃ|dk'MNN>e9H$LˀS>Zo9i7AUA;`8 Yj&7댨!#2J.;d `) ݻjAJ.;iCjzv <``&gM"Hga6?Y \sDerЄ?v||FFFP_hrj`Z'OT{X[-d)nJc898ÇBknX0 2$NW6/d }}):99)6%H1dיN`2fgg^}lL2mMMMF՞yA`j} @ejcEUI8D`  GϘX%|\N\__g@f䡒988X=iŪMΐ팎ΞO,#TA:;;C胂eYOͬF&&'p2V7IRB#4х9o߾,Q7f~F1=*l-Nة)!٣: n6Rv@) Lad"B Pѧg3shh9\}j8!Hg y쟠GkǏQ{OhTc3 ԐLI!"pqA@GϡN d:8[pAiB' *}zuS܄wשKbTSOMž[C@/T7UJt%Y%"UH:"F NI26#OW6+;dٗ3t:5S fIUdW湩H(IDKm `F/ C@ uHik ߂2u```)'f?pAjΠ9 ƒR/թ9! % R1)jMiC-..߂3Ѓ%8::Z_]VmA93wIc;<<\qfdZVoV")o[a }#duuʬOg߅g P9 <d~S9PJA"$q 77#TdRxDٛRF/ra zAS 7o*Mb~fft_ X(exwx^pN8mANQ5D,.hwZSZh^,XQ 2zD:S֡^&$a8yjN wKBSL/W3>Zh`Q̓`9|.F) 9SsА^8ܔM)~||\۷o f∈idȯ"w ԩտ T;bΥB͏Lx˶Qp8N鴱sdbδs+s23huo`P|T{UAвB8 yff`:Z^BN&lۭl +[c hU rzz:Rru}gmgg\Hbccc%cD(P8l9ѣoUKA WN +8A/&3"Bʅ.//W$tvݪq˼JRlpX`Ư@܁g7)/3P .{ ԜDu:u޽['eVofOسwgDR3H#666VΌ -)9),,,TѨw{2deζ O+[{n  8K( G @jP|jzZa@ԼFss*ӻj?nQ?qFWF{ Y"XB) F((WH{^zmgg` AAL`[YY }$*1-si%9sH/Ԥ2RJ5 *q_uXSsaajݻ ^q8sJ`s9-YJ|l 2'244T^sG)\$pwxxvr֭< 2]_o*X!Pd%NeaT*-zmk0fA]mmZN vG~o޼CDgRcqNOO+( hl@YeWYc-ǚx> 3"?v~Yhqqr|(zzzk9"1qqqў>}Z)\/؄/}8\ɓ|e9TJjr79 ]V޺uOld,~ێK $59}VVVbwF&@{72} {_@뷗]wpz|M73=;;kC} >$T(>|hN?_ljf/ă>0psfDcgn~P1"J޽{mfftc&W t7kormoo2Fh>HjWSUcA %3^C i6CzppL>kzz$P3TFTK$┶겥-,,A̶!YYYo7gd̑g"5No{{(f4&\E>; A,|(%ۥ=ɀ&[5Y8)=slttTFGGfwPh r p aWF90_~e!fvm CXۅyr8pٰ?s2O>?uRB{vvVWWk58?j!y,d5P%Tʱʼ-Цlnni`[sTT=88>|XWPشrX b*25e* 'RӲirh9<~||yM+svr0s옰ΡA'uppP댨fv1fHYh噚!ŕE?x}[YY{mq`Rv(yG2Md͙Je-Kw:v =΢IUC W|;w<0k-83CZ6pՖxrqqQj-Y!j}Ǐ?.zrm(MH9p)@ $^*0"YfVa / S81Zvww+2gW|7mgg>moo$ mccFA4j썬 SΝ;ŋEƐѫ߾}޿`Bccc503p쓓_`fu 1 j5؞"wimiiRݻd=gDuWw@9S٧Ju@Ɠ/Ap/HC;o߾mkkk}$03TK 'c_zU(>믿.Ra{in3n@Dxglmn{M%Y )"B@d^uOܽ{#{ Rmvvjha.eWr0l!ݹ׽p.%5Tt:[9mllz+s%;^˒TbRPjcc,~΋9WL ?9wSæ+:cрdLD167+D2%5I XTBjPsql,Uϩ?":NkO>_}"O>DwppPm+2NAg:s-X :W˗/ۛ7o`Oll:Eb3p,Z-SqcLáQꣵ2_Ò%*`"wttJmN7~<`DB>|ОBYB2{oeGAB(Xm`aaKu.fP,W";dErde~bBڌK0P[\\ϺskrJDs )9zzzZ49b1V ;??o;0,OvtS# SD<8H?׃t~/`@2痗L79½677lAp[^^)X Z'cw||VWWz'A.ح>8077~駶W_J1~߶݂1iZ)U?!Yj1?C8o? +"9%e5I?OH/YM\joUࠂZ2ugh?==m/ҶJȀ ps 7yyߌkRX[G2qwݙRC3L@~?~fggbRT ,٩9mccFC{nAZı0$A=M!#(I%(%<Ae{y _]_U( RKROY-([yP?GMhu:-TJ[eQB1Rc޹` aF nN_t:mggoqttTg!1eG>|^xQ1 5 as'8wimkk/H.//;whB=jTij9o뵽633S &6]'C"Ag%&.I^" D5))??c'cSK]L0o]vQ4GGGӧO=|/g3'|Ai@.a[6>Ar' }4{*2_:) '/_BO$@16A){z4ݻwﶍ8&bH C`i->}&mNxHbS`EEEV)lIV'Oby3 p~ה v (\oڛ7o@rδu2myyWʐPORս{jڌ GP.JŴS˘] uVZPvrrҾ͛}(ja->@Co/^蓶ĪMplJ'OXHFQ0 &t:>(ڻ[g#ev: AQv8.A2:Ij֒{Z+|9|ߙ?+hvU9krranmmǏ﷝eH\@=gLށ`G)l >A7>2뛁X^i1*2lRr__ʎ DQ~p_d2^WhI)E2?؈Y=d$g5=$eYr"DAס+g܄R܃rqT'Z6mWE,SSSUUhFDzxxاRcjO<8): IDAT.+1>S 5綷0Ԭ9݌]5xj-oVQi9 8$ώ_n۶&Ƹ$z(V:Ǐ Z hvlqA}Lg@155վIx3vJeKh~m{}ڏ{%;ARC*1D( Fd> ޽{mkkfg3n^ݻw|+_04F9 ; FX+ϻDܓ'Oڛ7o9bw:GBİL5Z֟"q~4J B\___zh\]t ^YY){2P~eP䀰wR655վ꫒o% d;>usSPr)4|ΝiA@sC{\'sIEV"219R⸽te2XPf<~epڠ iQ.13<<_|>|vvv F- H2p96s߾}=y&d"%b7fbqxx؆^C7.9&?2kwk###_D1Ƭ >2@a~ÇT(X@Ѐ$I0OOmyy՛,ӓ{uIF8k:dk|-//Ǐv|@G'b,k|M-"֒U,O}Wn>|X,Hf(aAD/5\"U i|YiI@\Hh_wmggjj {3A$>o.]f7_]0/el lݻw۷~ZkmgglAJ~UsC?r<2Y[,@CR~@ӧOmff?s<#\p0Z8KDQ;;;mccu::wݟ6;;۾zUԕa$`5S`] l!vzz^zպno 899)g4톐㶰PH½^+ђᗗmrrTH#]6#@+`|tzzڦ[+|-P؆dG:d`Ocоl~(& D!ŁMfݻw9.[Z׫~alI}I CnAz˗/Q='8^Ws>n/_Y7w0Gjj '(+$@kC0v^ϟW"#vDL)Cp}[eHf(RkzZ1@u9z9ikkkmttzT5Zǝb"SŜ;ϕߌLI *X̓@!"Ό^Z?wv{||VU633Smm̊xsuug}VJLdez666~ÇR`w"Z˰!oKnbbmmm͛vΝ~ XǏm}}O7g:T42ţ{?*-<Z܁n۶kf22(I?p:[l333%% Rݭ֝WK@i )>r4<;mZJ:w r[ /23PsssNMM B6J2TN2|Ҁ"VyZkᆱѣGŋUH>yosW;Ƞ'sQ} b9x"G70 4?gB;z@i19D\YY[nU$3YklNҩvuuUztt-..V+f؃О?^j̠~jҧ~( KSSSmww/#N =333m{{---Uիj2DA)O˗%+i >~l!Pjsssm{{MOOׯΫs`;Ftcc f+;%H3=f˒$@i(8䤲[x84œLYÇ"jQg2^>/#y4*+&AezfАRHP Pc fL'R"OZ>G Q0܈lD dX$=`&A%ȍ.,L"oך'gɖS33"qGfrҕ5 !j@ B`@dzu Ha ?OIK~D+9\`qEA&b-9^>P6cg/.nTl% "/$ u&''N_^"F lPlSs633Ӷu)&h~hSvvvZm?~,}lΝ;mcco_+pCܸ#/mmm[p;Kf>{EUzN$ T蟬]5!:6SE" A}/h1*$YC;KJT J@0^=22SA9a6<',A :F|?v+Z+N<?Y[ϡS2'@m;%L.L?Z`kX[skRl>bUj:ҹ!+莸i<2D[__/NIAp͉CQ#ʂh-Ίyzzo:H\.%pToݺUdD﷩"#r+_ 2|!I %%I̭[سL24a:KȀfRe0/\f %r IePIֵbbbr ՆSE-(˨g}Z1K+E9aEf4Hj%A52)mz0f*h>LmVD7[SrxQyV R|z!3r$ R ')<9.N Rwͬ6`!973afٗynmmڃz*Ÿ' >C mvv2ݬRv&) Wi` SACnF$?6??߮K_VfYqE!(9 (dG؜nӡR1ODH'8T.ɠ` $RJ1#SY]]λKTv!)@DAt988i[H;e"nއm$j[RΤSya3Okdf1 ܻwYqiju'8bRrC-qmm ,kڂ4Gg¦zMd ˞[:g@Zr=-uo8s <<،=çT]yJT|3Ri X׬f/ "p.9afRNU)3ȶLVr1%fȑ Ks2)Es|^a?x`qAZr,e0V2~N9GUKGBmeep-2 Najj4΂A ;R4찐]3{@$,ܔ ݂mw[K.r;<[3!d`O #' 9ׯpd"`^C $Luz/IFvahl+΂`M,CVPZ0LA\YL JzJ}b<Hc=FGGpjVoDY[Nh 8 Ѡ\f/1W01Ѿ& VcXZZjggge3%|F(C9΍ G12s8!La4g 4F9[b4Z˓- 2(G6!Xx ~&ٛioܹSn 0^R|qqZ&@ʱd׻XDP嚻+Sa iTmi>C _'y浧Rg΄nq{&&&*<4+nr aO6B#c !B 2UFGGI=99YCL$dzz2>Q%?_u{E{ XOj2|gg(!w3Z)TIhbb9c'2H{aZө?P`nKlZxP5Sic뜍?g`b!Y^UVZg8U0Yh1*䳰7etmzEE~p'[NNN*ڹϱ]M֞N@o5Qfԓ+;a՜@8N # [}YwN֫'LdYED}2^aN\͠9<)+ FH;=\PU*q̞+ћ+v(CSJ jg)quS8#p@$! ]Ltm/}١0~ `ֲeN@a~ƣb޽[}x gȘS"QPg]0[n;?NBۜR-p|AFLi߿_S/B  dSs{./1#B:Spo9@{ (Xgggڤ~@VjSsddT܀`"{{#J\k5 I. I$"f['ZB!rt2XX"pV:W #IN%8$xrz,bSs0|3{IY489DCbZР/[Vq٪#Kx2GADDH9XdǯO=3e8V]zm"eNgttmnn(cc\Q"22`L$Tٳ٠AwnQyWK'[1Pe`|7#j=H6ySTrrTr@Iz*%ȝl=̽l_ ,W k]pqR{877W# iF̳SVU.H~mk۷4MLL]4()yOwBICbq{]i4Ge(IqGU?eRL02!炏D6\]AFjə%Z/u,3Pj9\ڣGpKJ͈R19. drJ=k{̐1j `M6]D=[$VVVf5- +q@f$QpJnmnn*I+Cmgq_d`D>\lk-KC`oV_MT -yrAa;Ξs/xuj$1^>_ONNZө<ֲ5f-9+IYwqx>b&͛7`;{9۷8>|藱o8-D;@l 󘇆 Im;;;mllOB|B}&3(Ek}u:W-B F7FYիWWLdK:N1˙K)MYO2600P]5 4!]rv$laV IDAT%k|䜫P$!IcONqjZɢ Do6AQߠdΒa)LR}$l]0L햐#&`[ZZ#۲8GPLtr<#ɓ WONF( s@3vSFFϪ (XS@Hq"?NK>dDP =3k9{3" 0ó*1Ԟv *Xj ]sH"hMn"P(gÇ}kCr1)c#嚃)R6пw]tpY^l!H(L MX1TSA^dEr73,;$kpSMg@8hjzxРBG ytJhC )y0;D]S nH? kv""E.:Ari&^&H\͞ Z0yyi/ϒ`1FJphIbO2F9!)KHEO/Z[[+"XC-U8Ep*Ɲ%zw8vPbfě,Z 9GА=(sShoo2ÇEJ/XcH.&~@sA.uU܃x2y`=)=ҩVPcSg04bֻ,Z&rflX&u5*cjU%%&AcΡ!U]J=Ȃ0H?1&X2cjލ̳'ͤ:Z2e_3!`@d c2$'S xiEbݻmJiwoS3,Rfz޽ի9uxxX>̦*%Q52fpd 'ІdNL@qCZө@/zLfffpuR";TVf;T/ØQ.w%CW&$JeU&Lj^\nkk "vE9u1s8VD{z[B0()0ئ12lT#\wDD ;yϞ%Z;D< d#YޥOM}@#Ү2\9$ žO']CCCmii!Q ho*Bk?$Ow)r`(@l^\\^QHe XʹsMGё@K9oro E=>;;knZҜ~>[N}C:󻻻wRG+VB#6T0sҡ;;;mzzO{:Z?*,f]]}߄8)A"S@VK|Q]rWcΥ':uS}dʖ~)qӶ666j* (;r"MqiMIR24I9;׳@B}#Лler \l]9 4IiT`@[YY%[n/88粧[n-OxsF.X{"1;EgV7~ޫmVcq'tCIrX`͛ŀݟ4%5"g3=LV=pYY>'$gom/^F6Y F|Ak@c$+ߞC>y˶d˲=mhhmoo^׶600vww5md[9&Ӏ ,Oe5ɝ`muwÇ}譿v5,7Ep᩿@n/_?|&ҡR F~_fӒ8߷ǏRWSKi=()ɨ@Ao߾zCǙBN";%1è9 kÚ]J9Xwm^ GT6$!DP%9E;d$ɨy8)SʞdNi%aǪLk9Do6Xk}mmf4JRS}WB4G`+ˁ0}QuD5 lRyu{TRFA:@V:9GtmV-ɀ>ށ̉K6<<^xQGb 9P"9/˛b".?Նelj ScG]wɲKqPQAċoHrww]^^.Qv ,٥V>=D!!Zw|{Ç[AdD *~9w42G0 س+ zzC&<5Dف{=s3"rI D|iGs޽VwM}9F$+xSp=gZ,'; fͩF)@rlɤE"%'YN 8eY&Y*16gVT gPWSMG"FNW]51ӌ@"Sc*^7^^չ[ZWLbTgS6ӲEI6"ܹs"F Nd ]K(VЂhs?8Q z^7H;W3U@.d/j9sf6is1I:Y)=~NEΗB"Р- |,9#*_|Yő/}I~OkՑn߾]";dSJhDJ&[)F3}^Wґx4թi6+q#9rj5گZ/K% `; P0qI2xLc"7"t{y;77W;w(T*"UK8-P*j35E}'N4iZCle2QMH7ד=Tr;88(ͨgvڜI) vB|]RA`(8bs%hqy񯆯J#zrrW$D&ɖ'I0ugsCh8 R!@ɩ t%0*offWtvv D0꾩Ad_)@!pSicon޼Թ@s$z < 6 &]NjdP=`XqI8Lʇ>rcc#Yaj'OÇzYҿNQ >R`f|PЊh͛7uzz^lx<*zxH$-aٟ)>D;;;pK0^Nb_}D'%H|=mY؅B\~E;0$5ě1H8(z0Ԇ!KXpiNI24F^|yA:99 >າٵln! kLX ]|5ƚl̇I<[ŁCb EZjy3HE)v,h!y@qFfKQzo0-+@v;wxnA&>9Ҋ؇8!;hA$X<+D[HT<CβY81*!lRv9(&Q9== Jp.CM)>R}lr.aQ# v롞9w|& kj'9>>$ȋ P|N]]]ՃDj4 0uxxr馡B%{tJ|0!:Č'ȥךCu$Qauu&^&DvBZJ<+/@{;u".!ZCMZ^"FVi_!tCupX"8@9s2ZzIJ BNDfX4Tb؉0AS!xϢCan"itd~}wrY^ kDp@+ -MS]~=)D3Qؗ<Ds!|La> Ң@Ddps8 Lqҳ %VwFy{ ycQL#Dy`> {3u"CbxaBiJN泾,uɧ2r wMX ÌιQcx,$A=) (+xHR ɫ"|ɉB;@<'*hx֭[::: @IP 8{"zV)TGfzp|Ib}zQgI {, 'ej 3=U:N*áƁ]r([ŋ̀r( #X1N0첆NKP˗ZYY  2h{`ENЁsB:[,T: Np+G\ZpAh483% j @όL~ Y(az{ֹo$gu@ ;7o^&rnV2d>^@EgfO)!AX,fɈǙ^i~&B "[-3jP#Q8,ϨR2ruvyV#%' #s 2g‡0zﵵ5-..jccCϟ? #xWM]&F#ݾ}[O> Ϗ2B>a,tΝВeG(xo;<Oې ధ`h QA.1+4u=6 90`"2;ωQ 8#/.I88dfOٺ=$0uJOq>р79|(:8)5PRk@:ײ=;;ӽ{txx 42 \CS>٥DA0\vF`:>>VVԮpj@jjw)L !\ < kZz?jE7q/iXn 08g}o#"ObbA g~; N6EE L<n߾V]_N7|3$E)ucc#*gǻHrX޵Z-fy=JAGGGPPU 'lndfU/Yn֋{ Ȃ$">Y $G|ѱ}0\áݻ2"k/^'(r%\^^˗/ЅmXAC5p`2dfqH}DO/s*g(kϨ?2C}%ݺ{}]eݺu+( ʵAemn߾gϞϢ̘zn;wIPF"~$U.s^= guwIq&'%5 7t0Ly}}]BA[Tt`\ `@ vEP '$RT!/A ´ ]Vdjޠ=ߡhBf⣺$;xNt'xC4EtpczeВ$Ύ>}3upp$! *nAp^D8DV!gs]8)ژ^`:2/@ KwQ;|$qx\7 $/@@h=Sb/Bq3`@Za F9#0KK !z'Q1Ԫ] 燳u'ׯ4Xr6!a=#ڮH;k:#A$7C_8災B >/̳sȖ͛7CbA͓8p Qztob1>4c}!"޾sC0:D^|&&M#b#B\lɴ&VE6z/ vX Btd?8I.7;u-5P1 Y'"@n-- v *D΅]fzD]s=k/8r::1vϕBBQ(t]}ᇙD<,*j^c]Ġ톬lg4z=dـzc.',裏B{@k>$&h J#j7^u52T`cHSju5jp7A iFPj?FlD"Q90̞G ejԁ1瓙xAȼ_QP֖Fanz*3 3<_:ဠlD! DÐ"@WA,uMd |2Z vC,̨m؋Uh ^5vw~dZub2i@ JXZ-\.ۛa] $hyh}GSj4|soPXMSXbퟶXiBEN7y\} Y׃ 8OiFEH L .d<d7ofQstA|?NMhN"hէ|a b&Stl\/{pV`ۙMGE:d?bK<^|3:88\.ajBJLeF@&jd$8X 7\җ@}u>% KKK<CF-&"v晱qYl|̎a`ݸq#PryЅ֑k׮4 N  21GQ7nٳg= Ƹ񵋀`;NX#RƐcrGκS e0 N8dLB@`0DS޾|/l9P> 23~_jS{jA@\3؍1L.U]JiхjeőjVUQI3D兒:SKh8:Dbb)xmiURb4P2P5t8h fnU׃A뭝dT${8YXv;,|RJ9^D2 MK t\윚0(ߣ/MSݹsGO ;eו\EF`{py6!g?y[ψiljuYq!;4w6])JujVަ|n޸=n-U.V%Mt2۱J"fOT:[TL;TREtwGUkuxщ}7lxQt;Yڊ:ݮL}:!$8鎎s@K^S2oPJ9|Ύ>LFL=IdpO Dπp\]ދ:=`@zrE(c@&777s4UNOOy/֤\.)g8*W¡7s+F%GX?r RB?=V9(_|++D E[[[O9ukZ]W^e~yYJ'80ŹaxF,^Înu}}1p <8Xlt<[8h4yм+kAb̜Lu=fKMcdLYC^s\(87@Mzyݻ'O~+$08NAA#bN,YI՚&D9+ ]δ2gܽ{w{{G % Fg3*V(h$MDJ%(dD'3:s_QI*@fߋXsX qTT4{F(bar㓆{z>CoYJE 3&X]YSڊ&$#s:>>g Q k)fYw c9A t`:05"{ttR;G 4lo>*u^_@3 A;3zt}666ի0Ƞlff8c/5<78Bϒk#nmmIRFQx?|RwgurOKi!%Y^B2VD8>6ͣ?I9ˍ7;1="אP8_A$GKC9n x/`Y;F lj1a-`,qdc7lNz<&H"&KN׃ .qoIOVWWuG&df('J҉ڧmMtk}Qշ}-ݺ@þtTqQi:$j\h^hc9u;}=|ߋߟmi&! On2_פdDRA8*)**De⨤45^~zOz~5kmu]i2CT t?OR0&D@~{^1*0 sVv^.@e#I)x0"4-vc{{[/_ ] (MaO<6MOٿΤwM@Id_:#H. IbZa2KwDJ 5)6v2K;d2QV$0" dc:[$UCQ&X˺W(A %H'$S K֡] k~02oB2+ƕÁ8< = |Ӑнo328@usW1Ƀ5LyP81>zihQ6.5R2R =g^]ZZҍ752(\,u1^G bA$uD@}eœy:NhC[xjOTSpd\MO~icnXF㢒tq2g %M(.(V4Hg5ƩNϾ'őΐEƩH#I:TYv>ddzql0ΣOώPy{se)΄ ƍ׿tq@d$9NHr]b@BGfZ,`l"b+MSA% vwy'Ӣl6[o_z zi .X+ |HI؏WqܞWsJ٤p@d"u: q1^zE]:>P{k5=jy.!klt^ wyIj~A|Md.e)!%rsoodLL#BBȔYyШb] )y8Fdcؙ5dmT(Od}\7$8JZSVdjB&ܧP=;; :NU܁X0Hp]{gur(G MZdaWVVBĉc予y|<,gN;d<G:G ?Ώ cWWW0`DD(mah p"u:`s!yk;mJDRUKGHOϼR)i0>9dl'}S-Lfjb)Ϝk2xwktfktChϜtB'9iϦ|)JqE*V4<wo}7G+{8Z]VUInqX-!3q6q΂LM&G}0r.&I0P'3[l|||7|S/^`ggGnBϳy꯬[ǡ чFID[[[:88p0(CNOYs'9JiH:>Z?C+D]< Ϡw)Kz!<2|%D _7 CQ^E=HHk{4 sA'j9HAdDlZ6*.P[8Eqgeޣʁ9kG008k[ٳ.C\0#aEz@@ę̬8 )1dh\7=d@kYP1R}rSA/X㖊ŲɅƓ`vٚupPrxFޫ42z>89N3d39I),QWn OT*Ƌ**-h4L[o#ɂK5z3EQAi6c\{f Pc J?!313cV˨a zGP3l(+0q=dn0k h!KgO5Г\fnꪚͦl6Uh42,eN8?@z'B0q6 [ziy^h!@K b ۙZ>9m|@윴=i ^O= zO@( 0 \0lׄ.D3;ۆ8s֙8, ~YFoW&D%SLgӓ{W%a `@a0qHד'O(5ޓ (wԐb^aGaD0Ժp˓b<Vu)? !깭V+8z©[VA=|uT:^+E8IC ?g'OhZ:BIdQ2x20h8 pp 8t!PEٯfnI2k}?i~^N8f͉] vLL_´~e O?~MDJ"M&67a4\=`% ʹ~?zi FB<يt"31%d^F 5W:*DV2UN9]'(Ii(bdk׮Fyڧix Ç:88Ȑk`\3ewރNmߟ׀}|\$)G]8X* 7J!8:'tt5'f>i=5v0EǙxEa8F 2Xċ*0-_a9Cg:*06ѥy&@ќ?LM;iΝS]aj\@>(a[:ݎKHnG&XgW_/7yr$k\h<8٬o4#gq3hupQdϧZl&yD0; {pC=y\=f̳ٿ?ˎhVKN qQqZf펞T_MH7tr|U::: P/{B&n7p"$R=yܰ ̽˗\WGp.(^Q%]]] z]n ع#z8#nMp3nh!x2%Cg\<ӝuM`8::g?Y}k_ A['N#NЎVƆ \BP1 .C΅z:-VY$>uq:gggj4AggEMhL Fxhz4Ld%e&$*2ND{Ȫ9qedrkȅR#]ZZ >݃ђ *pYO`<Ìc5lqhuțߋXF#SGRpii) nbtz˱Bʙ~~J/>*:5@ƓM5٘Sshl+ vTqԟFRMgiteǜro:MhgN8}/J[W_Ҍ#Q=?zHJ480lPyyɟ3񇿯(Q~LËa(M!\KWEPꎺA/:W|ScQ!>dYFIPub  H6 ʈGfyo,A= 0tiiI{{{z!SFR)@hsm_S6̙s?F DɊr*;>m,`S}:32pF)ax( IDAT[X@XB$f͓͛:99 "DL2Vfv,2!?: `y#%Lo"{'r.]lۇE10DqD~Bq>k2WaV&yvL!ZgaZ `s4i#*aNB< T2e&{ ׿84UiX&_NYֳg2ݐyG[i&Cw4d{J*IFD}Z^O/ؿ}gu}{?Xd4IKȘ0ΐ?~0tp]haxz08I&3]M<u~~[n:d8m` i^f1dGzݻ. ggg'dEfcssS(Li XtY`ט'N\׮] hs7hGb0z@E:P$i0aRj^6vd{/]Q)Y\1 k>ҋ7  AZٝb(k ʣAM#횿.ٙxzmP;kv٪lpXZ-d2D1 U&L ?P\x떳^yo^&@A ϘڛNk=ẓ@SǩhR%X˺}-O_-hTdjvvR78|ۈ˱eU W7}=й48 GM!L8OҺʔmk:#tζԃ)k [VY[TXIh|_'G#+z+MFLِՕՌ,* g,'D 8= J2>9@/F6cST y+@W E)PvC}Nw"!l3c$}WU@:<< 1+moo-jہOI<5l7I$ـy5 sc jY)b=c Rd31n{|2[B4tHD|Ɏ!H%1^/j['j&JFbC xz8SPH,gX,fgs}u|wj >gh"dP143TyXad,\+\6(5dFX*X.\)(?@/&@iLը4G8[ǝFF@ߏP|Bjg.i6 ;Vl^cy|4~dőלC#jij{:kbVx*|RR:|/|^5?T¢$Q8M<|2]8">3 91BMHRsxנĉHTek2,dZdDA/c{^/\j{ҚD)R:,;RƆx@CAHp̀~h@j~0Mމ΅999ݻw$/k7 BNsp}Y)#-D!d \-x3+Xtr/..իW/ `9>Nhy6zzfnllyd8M;C r>`cuu5E\[[ kzFގY7aT32i"f٠@s!5@l5j&\;(?Pprzz8u1PGV5Iu?owWoC kFBv\2ZC3΋^D48psK'Rs)4ue`Bd\= 2V`<3}a(G5RF҂`'zM?9RRj{}wuzW\YLI2EmUہOd%خPS]l-ƃ}$,J%5L^ ?Ba·Pr(+3y ¨漕J%moo-F粘Vl ]4rT\8H Ṕey>z2틋<^$O>f 䊀 r#pEYR!h뽆yJonH9D#kT{ov[`qB@-5"Zم]5L}HG']Yڍ8.!FG~8^_I>1Q5B$ M^'G RsXbK~`D⽯$-Ut1hZAo_/tK TQgmEfrq L]R:F=FpTY Ite=ӒujuNҳ]p%:G UϠ( mM5@ŷ{GWtjriAu:]-/T*]{h/}7 J̗@FY)}"({wQ"Ç:< Jd% :}(?^U2$/iq""sf\.8ƙٕJ%3RdR0y YD U j ruh 2 EN"v-" (LQ|> .%!&#CysD r),p)p2}Dڢ_y$+ Źu>UzgQ%(_x6kKT ~N5'g| ҽ ;+əlKrG862N5YbC{#ϡ9lv l ӓ72Bɑt?ݺ~_BeJ+JfN͵߫ժ4`Oد=}h`0Ph4 Ƽ2^\;}.&;P";c+&5 4jY}Q E 氟f3$8ji1YVy6 @~]\\ngN {rA 2f$({GjF-j}|ύ PPG!Q LD8}Ka`aQcAKRX@jlT GEvdžN @B鄇Bv8N~I{ja#օiߥxԠ>jӟVV HgrZ-*o T*P NBVV j66A`j p4r&)(Hb8q`2/M@_ $m`lDlb0zlm}Uݶ·_t^M_q~q! [ƚzݙZZ1P[q8aEeU%N]7B\#dF3Ks9r&qLܝ2*Y \MSu'9ۂ4#mu c=xx[[:|9  Y JY^/$aa7 m !8 T*ݾ}[Ϟ= a/%8u\>y,68ebzB6v7|S|Ap YAlZZZR 13?CU,p_``۱S@ u( * AC-ur]֞ cE)oo8..$;8lx>K3?y:.!7́q fGQKkw~5,MsYhh ׮]ǏCm" e{{;L6Kpƥd^VmOԡ`q5 rJ1WL(wj$ $m<+??7<Ŭ c붡(Wrğl}PBf[6.W}gOsr[`.BRpiN*,ek™,vN <{A՗!$Mx\蓝d#/[.WJ)U*5 a쇯y24 -Φ%DQ#mˊ9Š nvNjsZ+w*Ȁ1gciž2T:O58#b]U <ӥ !{q(` dqdxO}4Ȫ 6 rsPl#^eQjɼ8\0y`dgFb %zOgsu`βvA vKl hnM(?3\ڇG novn<E}"CD܃pi &vEs4k".$h҈9=rSiݻj4ss 3dR&*J8ΔÑ:FvCƁ%b٫WȐ{&pfDd!⑴nOyee%\75:zو>]HG*2̂3Hc!q;oe,ʼnN;'֦^wU3g;%rwÌ2s2=W D0+;??~r.])T*i0bH&bܝ`3?nddv;+CŠb7uۋ"IAbL;E^[nz5,i쑙$CDM'L;l0$c g>ׂ& | )Đ;iRr)Md#51:Xg d@,TA=+D8u oܸNzZz^ {;⁗G&wk =0!_\z3<\YYhs-/W힪T)X~V?_Ts[*dWʌL,8-8a(\M՜s+}.Η\I*:;}ي@$@5|%[LcW@y6u&@^ ܋1ьu\ug:CjZ k{{;|}ݹsG^/ dă P–t)QIS>EJt"lhUq>_\BRyS;JFCD>30}3Q&iV&Tg g|b2B*N q1jD={`}$hoB~욖>,h^<8U{|0ݻ1+څ|9#'G7XڧB3JmYs*3?SqS A$\&?| C]" DQVk)&u(e%$_'3c4SaUv5cN)g¹%]r$q)ɺv }U}8|s.2 d>bQBAjh{?A=--*Up4KLﮏyAbp qd8L/iaqn}>2~8g$ l Ybf=A=N7$LYl-||D+֐@[Fl'zaa'hXC μf{w ԍB,&|25PG|%JI*L> igpXx^sz G5y IDATiJAgg(yRDl-#:h["!c!c9H#^Zn yA%zrI 2XcgK|{p0Pᅒdb)$>MU]rq`BeEL=5pn EtXu3X9y(|VlNw |\OBWg\+68A?ۚ.iPgJ C&~EkVZ i/aPb@ wI #P-cf2STU: W`9Ȯ%Āޞ?A\liGTO&<---ljkkKj5џ^ `ĭhv>H7I^f]lz~-K<+Jl*AV[z2 ԰̐q`*BD="m31",sq~@Mp\G9cz*l6<gC}貏F"Z?&@u  G%@6"8"=45.I =LO21g:??Η: 8NnΧ9[f,*Dogm<1F ڄHێNfGm ,c_:paYĂ^<` Q4̾觿5'~ך̯~s!dmϾ0忟{<'B^6G'zEſuJqWq P,VfZg\m8zxwFx7N-jT*Ӑ)q??˻ypN7o}tNfp~}D\KI|(ҍ7B_EK?A:3W{Tn78rdzЖ iO͗xi g( \_`yˍ a|.3c] HP mݽ{7A v)p\7![6  #6 EA -950Q%1gdԷOȅA!\ʀ4jMn[i4эk_ jiZ-DYqf[y;Ьg98$b8~2Qx.Z+l̐:~<(KN9wy^c3Wܺv$55| Zu)A'3SER_Zb$:i}}#`ȩa8R'[}u &]mmMqgZz#m8.d`[\5İ(iLؑdxT Ѷ_$Mq0?_ZZ !`Jv3\l N |[*J'ɔ>taKTXXXxD8Eb ZuH}, -,@D- w=3GbЄK?ӆWT{odD6.׃u_HIp~%bSZ2Np^2Orkoj$lb4U,t|~{~\|X5gB3ToPF#8 ' x: A:*58ey(I1h[[fHnHg"8[`]bOzK4%> 9hb_EJ#jhA (ryy93)'̇-,YToY挃vOhX| Y54I8oPa7035qؓ$4TPK dR)d qF峖ҝ>mAP'1^s'c:2{[V'̇á4rmY&J5qP?s?ߞTW; &)'l6("'Y{h@:=zc4ϔqYWJ]99ߚ6;䊉Gʴ*k=8WzI]+ {ׂ_4n1E6uPT?HwhqqY{j<+M#ݸq==^۷o*Vr=gӗ0*謭(TqpإL/z\LJmll^ cR쾋q$Ԍ IDӃFٙ>4 >BA_4&-MO^b@@$䅕Gyaia!fA~R`6VFan7vf/Trڣ y`fæ$䲕<(o!KA4$ a-a!KFC>3#&O@?* Z`ё%`]}=mljj%ʺn7Fa<nTRXW~Q[sV"NՂWf"e\TO*b%,+}#lk2UnsΗW 2%zrh^fi6U+XU*]wPL 8M"!WeW=Ј4*7~Vϗ-MTI2E'd6 ;FB#m.iq0ѦPI=‘`k {n_`fH@v]t @PTЈI0qhSIjZ@\OZǏ8υ{! ¹?8'k${@x.hvt'JBhħm\ d! }=IGd ,\XEĵOq0I58[>ogEfE4Ɲ'i5N[nC. *ᇦv'_T <8W.ǙSR,\ڧ hE%XPm'ӅT2fqL5dU9abՍ+X*f(5GL5Uv̫^eZ,(mt#]k_ Kie겙֣00浞Ivgp8pO.gW9HWւtޮ-J3ծJŊJe~6z }\'h$8kW\bdmBފXVttvv;wd6pL#adF#5 @A-F5a"3PN̕J%|D'hҪ:^xljggGNGoV @(ib~1(#_dOQ?duwgj(6c\~$) vN4a67a o&sRbN'5w Zd%p#PI `mݹs'lXX,ީ8%Y>)N *){K&f\uBexH^!0j2cvںu릚$-F}W8| Z̑CH夬Ԣu3M#0U~6|_ri~ e].h_9)}6MJ kAfnzR^-?SΙgӖp@ 29\QSNOڍH;iWkk5CȘ: f?LHr: C}ӟֻ ?02]\˴4Murroj@ЄMջj @F#8sdNƕP_Godf2eןv JN]̔ɾ>@!}@ |.3tEBʳN:(TXZZz@r=TlN7 Yꇀ.=!LFVt8P9p906pX`xPp|>Ăl_ Cްf??wz| `ͦCQ@|\aiU e$ #$Z:$VdЦL,jCLEpjg%ZPp;n8@VÍ&xl|U#Cq>TR.nKJbWpQ+lƄElB"tƶIuKY'@ 677߁CGBH| @im[2. iߥ2} CߚCڙ)m`EK"n>ёr沷 ;@g:w,~ά ` rAs Pb8#}E9`)`^:5K9ACZ ( #F60 43(o߾ ݝ˪]cn Aíj?|l[d0 NP$7npԳb""؁.-Fdr)Qk-?e=(f3sT+,p՞m%f6UggJRr*dg^Vz%)m֑AծWVl?eC&38X3x ̵ ZCjnpvλ{ ^u2*Lz=I.[ :~WH|b$ߛ;;;)w)A1P 5ЎpŚ44H%P;:ƆCP0́E=|P?v JctcXnjl6s o0c 5e*8moo&zktsj`6Fkv a D *!. }_C  H ס~yn aOq,mjz]Ϟ=sO Fx R)-sfqS ";ŷ V+2zES3/k(y k֭0/yz y?דoX(eDTk!R<`Nڟ^04MbSn6*qb2"5[^튕mjPfF-I&л*0CgSi۝3׋ *e]+Y3v)SP)KIB!~'Ms%u/.5=ϷiBkSn+Ȉ1dX)ODwuE"KqFȅB@ 5jխXW)ggg.%`e#]m:PnVЩ"aZ35oJ)"mooͥ)z|G IDATi2;=54!DP;6R*sXY7[&v{  8КPtA  B?[/' Xxz1u.pnf1y=Uf˼9EQ@Q@8t5H{P Q;Cl`۬qAUJٚ[r֢xmܤnaR'677힫P F'G/T _)7dfkWTN֠adUt#R{AIڔ2&?:iyEn_h~WxECZD"a2;k VPlp5i<=b+O{ â8Q`,0(FHRN;&sbC dم%룣-k.TJR6,ZfM L3РZ-wVCR9777ݙ_?8X_(x/>cJ&n_v;^DZ4) y i_k؀9'Je \(\h0 9h?=bPx)\`|?-.(2o&^tBՠ5๠0# iP1'ŎMgBƍ e-6TH`O兪ݧgǣ_UZMz˙*"fPrK25S"=Dij:ʬ>%WEY:,dUWd7#ELq)ne~N9?T/+ ܜLObTxxs.)5NY$b*r4*ka\/(y_^ZH$YX6i E2C^|Ot<~~[js19u.3]Zv=M NTTrU[48nI:Z d8Sp fCfS_P;;;:>>VzWS*^{Ma tRk 2Ţ[D$0-Dj? j쌳kWW79 H  HMFfYۙ 2/ y'::P(cxjA6ơS?G:A;Q\y\hr{l. ?DUpAYv؅/@kex Kj/.t*kwwWv횞<<ΎNOOW/B_dx#W.st[؀\,ء!b(>/K0*hPF gcQ*  #y#?N9^,tV-uw">o>s OXگ1CkKg"V>NhCeQj pt moV>?TOfCAh(^+C?{㔕*Ke1:Z736{օ(dq He 2sh_MNz=ɇ\t4{)P<|?'_|8N4F*E~h$ SG[*5 {|nXh$JƋFt*y{`wwW{tm{͍MmlnTz(,))/keVW gЫ) :3WM/,$;V:)GƲZbt(9wGU~=a+^сnY 9E뜗0iQElZ|sǏo~ӝ/٠-24FPƅ@q.vggGO>ush&l&OA5Z TA8onfsDxV+Ael<5}a0͟A W2/Hn{lGO3)v7-|_f8v;l 5j>^ 4&RQŠf ;J+ҹڢR s=GR:{؍FCݎ'3m(Ӡ-)iOdMa+i95]JYx{RE|9{v$ KcjA^/4+ճOtѹx)I|y(')PX(j:U RƣWT^<_'?Z?P]{ESIfT0hBS4'SSׯiVK/_74]rt wEzRZhLJCN!59+rڮ))]ӏ-NV,hk)MRRIZI&=(XvxmggG=J%YDeө;`XX6F͞U *`<)tv*~3moo8Ir( A-4?gu 42z3g466Q0 Tb4 8Pڮ~Л5Ң6k.,j>Çutt }l[KLA5S(+EdzUtC v)PY : \tƮzAy_oF&i}Uu/ۚz]?ҳK %'3w׉Rt hAU^ZD*3gle]VK2)u[כxd+P&*J?PWZUﲯjb|ӻRj9T\h<\.aAaξ5T3K48VWU>5%/Rr>iggK;zuMݺqSYGIGγ5=3 TQ]EW}1XŌ3>Iͥ}NqqlkJ__OsW71,JZonn KGѥP@pOR0Qy\=l JSٵ PvHecMB:駙P7>#a|gPb·aDn[[[zS8SFhd#xuC3bTzoɉdP4CybWnX)I|HyD!Eɇ +H8pnݺdHqyz cY|07vHl`^&>p%,:Y)Qv9[uZstRXS;~/}׾.;C%ӼWU 7EyQ(/ U+T)__+$V\d4URS>*c) KJDŰ4RX5fcCR, t|trbXѰ?RXp0Q/Zn*%9%Q /ΫQmi:NU<{9]v{z@>x5լmikcw> aS2MCNѹZO bGZe'ª V^Y{yu'򅼎z_~oo}WbYTع Q@'6R8= MHCdq榆á[SH ]^^Aj (ƹ.-ѲDm/h$8YA" `cs1A:;;s@ x4bȘ/&8_aj&;4Cө39a5gv TأlW\[&e98<\b|^/ %{@ @cg6JFL>.eR{XtӧOŔ"mE^y8Z6Yzgb\RV4$а6[TrPnl B6(IWo{Z dZFf>Vrͤ{R{o=Wo|MoD$WQ1ߐUj#O9xrAA_P^+,_^o(b C[DZ?ew\E‚4L5ETT>W{:?8$eiiA4ܜpÚ .YjlQkZK]l@5P%/l(B'~Bql_$:>>v1q97;4C~_YV]X;G:1}AcGiz=WAM<Ϝ,P х =hZh<; 5Y:yOs3TJܬS՚B(̸Wy֑igLFP.m&%ߓƣЯO5JR-~YT[_H4T5^4eV6rV֖Ĺaه#!_yLI0,:bXh4g*+Fj6 TƎ'žNz~WP{׶~9Ytܰړf#aɋl-u23k$*JQbgrrr6I(P|/7HL(BSovPΎ0TvVgT"T>vjk777ꫯ\.?x<֖cJtyE ) ,yf߿]+b: z>v.nf9wA6h:gJu.hnbP a fR@}c͇jF4ŚCϟ;TN@6/AsgcL/ve|s^zA)po7u=~٠_f* 弊 AM尮|8RTTEfsC|w`gGE]89I3vwkkLWPp5͛:?l(bez}ݼ~KL.8}_ou{u/.Erm6üy.z؆pQLE*FR mƪkLԡXES$:]K/`)͛z뭷uqtlITғ'OƤ G:Plgt@|48X%@rT*fN!P7(˯CerrCRmẃHԵ3p<,mgf# >2*4Mw `Aj :7+f8==uukڢH98#Ò@bCB0eRن淳F:jnzj4꺸_a[)/3z/^}5KyɆ/E;X ^Z'l|xC`%Ї>Ǯ}ݻwOGGGb. soo/%rpbt`0%Y/ШAq ;^Tu16j5Fk|3uugDݤ 9CG|e#Ftp܈x Uѝ.3^nݺT$:YiSYFڎC 7(|Jo=hNĮ J|Rd.cRp _}L/~S|LԔ*r^U|SRWfHZSrYQE . 肱 7VQZx|fW# hh#C Izz6Sϻ|hh6_FBU*$5[hkkCfEI;¢ ADd%x"3]0iMc68YNr@,+Q<]3M'굆: vqx߰Xk-t?;;SXtMrfy$AXJ,M8^>rPSS V-э7GXT*~ˡx~z=ݻw/W _Vh%n 쁭3A.{F؁ TNܪp`ۋu])nLAycL0; Ċ mgt16o*u$kYVs<T~6u~HŠ`%#-3f4O\^1۶>O5M+x:OhX#~2R}ODä%+ނ^E Ƞ]klU ]w #}˿?GuyQ(͊[*{幰lݮ5z}#Y٠xhL"M*s\2OY?c7|SF46a{ƀ {D +J'+JDihX*5Nx*9]O[X_ slġb^ẂWq2EP[teqg^i7U)4Lu祗{K/iߝD߷ AE1֖;lh35J@x$@ژ?gggl>==ukϢiA.lh0c={LQAeIc~M ȸwqqj"r`y? +E_.C.u(7QDٙS`Be 'Gͼؚ~%f 4Jv ;o$N1h%90XQ8 _kSfݣ}fajwwqP46b8:At:Nmj*ρΌ&K*.a R,L!F\N*C;'YmYkr|ӊht/ieȭ?%2~yXɴWee S eò xX"P,|p0pr &i69,Iݹs'4 gMYT0aaqz{Pֹ'i&ŽEâәHI$~APqT(=R=|[͍Z[EQ9)uikep16z1#ke)SaA}lc%(,) W^q!hq0Dz:M[:99vlkjܹPUSQs}'|>|?"ւX‚ PNQPh#;lZ8kHM(cSZnpV\q)̣] /B ) 9TEb6(Q$̾#}aK! PD|ˈ mSԐs66 uAeCB A 2rXp4t~~xׯt kAᷢ,(up<'> :R^3*[f"zC %_@sr]!2 ,NeVql$ƌ##J̀Meu{qxXToHQQjT5M)//4D"73su39[:dmXYa7ؼWf\4!h>96776NSV0Ps j(EpDNgfj6RTX(i4J{\Gh{|N[_] ҕUEh׮eUSx:Ei{~qP6C2SrMT^x4 @Bwq|NNN~VO>uk#cBޖ/ SV~_w|3TV 1dǷ*I99-n۵EܦdPqo~tyW>WLC * sչed&U[>A0 >ތ64s̬и(4OPѬq=` :XJhg~ժvwc۽} 5eOFS\~Q}Êr~^]EHQ+:=;SkFutn f K_|^\4aj;{x6~Wsz'z=M&S8ӄET00/!d2q#:#A3c )nܸvK|n޼^XF8˚@2pb|q~~ԸAgs3n\_F#V*k{{;UA6"-)ư6ǬGؗϓ]nt:sp yKAcFBUsS[C|@Pլ7QP'[\.;케 C4 xzIQ6ǑY. o9p8KьX׮]sϰ9fjJ#/v]ҊD0B?S K`kFlpbUZ:YWLӅxYcӅ2!ghU(۴p!DZoxqIb0 ⽋ za{Gcs]M&7 ƍH ce`]=߽{, C&kaV}5 BBIJ=`3` jT,͝.**:owT*Ux9%|~7{~RfƫEWIF }]gvf+Z ~@~_ Z#°`_\3=Pƒ@/h_{9G|UX3={@Kv:99qkH-VUVX4 &/ C7Ŋq5a605/6M96Hw2ݻ njkfM>y]~祮=}I v́v C}OˡvłY+b(,M3N~5 C8AŚ5Uihv m^vͽ7Q4MldVDZ ͩdU^8dXiU tJĹA3Yظc׈=~ ϟ)&fjW_}5;d|HROOO]9 -%+ZZfQs]StG93d2ѓ'O-9_iR~4x:yZ@b098I0Y(2zJO4JQnMb|8Nt8h"P&Pt,#g`_b0QtƬ!qr#@!n6KS؅`{T({ˬAoЍ*UCϫ3{Jg-+W-ת-5:Yn^Ijx_XR½wmm46T K 񞞞jggG)%Fu!œќ;(2rv11{]Bw:D!EܘЋȍSHyr4zutt 8==u by l:<,TnscAd27YB,/ 74t,7#\x0F\%?FQ[n+$ lSAd@mJ " !t݃fNLah4c7`gvǓDI)_ȩP|›)^K7szr:_$HZIHad.@@wNgCr梩np&lݼ@ش#GbZGѠ=| R)N|ءi0.hP 6E^f\n}I~ik766: {+]v2:B=vf&Xn8owZAyÍ %bM`x[Zmg1Z"0\4N)LV8hIuL6֭[jێ@5-! VwT,45NԨ75F纒$uc} H7*M]kGWz› npnYlxJ$ĒHA>6Wɡ6- &{9YyU0&EQ_cyhvmkkˡ~W_}U}ё|zz|39=؊SqN%3h={K0C/ FXE"'[x4CIS7677=}ϵaGLAx" o΃Ѝ˦ 2K` hS =[cen.۷ItfCz=@L1ݼyQ<lPJ%jww7R 6j`:yѽ2&`>nwF E_i[_{*mJ kyĺV-8AFzW+:[)EO/nCN^hڷus 彚~EbCnh8{ѩ+\ ƁΟϣVɵh{Nݮq%@sf /ngCCysf^ףU3a5u-: (9Aì7M%qB!ԍ754OMUM~^u᮹*J/Ά'$+]Qx›MbeYJk35w[Oտi4 >ڠ'-(;*m˜&D#[ۥVt:zݵo#YHJť2Qpy|^'U:EK<==ޞh6s8! Eqeo{aA+`W)4V,\rZX0'̢h:*j7ljBte΂+{+kF9E9[QWj^[x -Y_,ǝuwGti2i6tٻt:/ 'O`)wvvd)qk.u5ϓ gElsQŞ2///ʺmmmm]v׮յZ (3V}k>y݌ arOvnN| ޱ%A# E]u떻a ^˵rk-o/M@uP'''Z:2o2O*:p)$`@p\ld"  aùܹC5Qfq[_֖qH>vAι*~6{+~Vhig ^X;[eFnle7~Br8*kPTR46ZC RvOg0;Hz*l*KPbs,'2KχW 1ɚJXG%FI`#;+zz<귾'eIY¦h+a %'@æ`/zrrST\#4n h!t-n qҨ#_P>Es@" M'  *;(׬Eijl59g2w-u4 DnCzВx=zZuH|i !$SxZxKE㹾(zIy=Q4@m=ڠIjffJe?l .Vl@ ׶5a.nӧO \a|G/ Y*t-]!FJ+"nG~0oU`)l}x*FM7okڹW?0\ArS|DRP  m A[s gWΚl8rwT(*lP5$~9&P}4,]/z饗JGfA^Z*?Hi?]AJL2+Ac{WP gA]X n%f~a(EE4tŚi,8qRtժfezkJcFo 6CE˶\o}Ф]w,0ձ qooZ*0 Xy5!t>hRP/8(a7 °^Rh*%R0g./&:>:W^t&h!#lv&`j^K5 /]{a|n5Nz*&Z 'tcmZNOOݵ+84H#ǶAel N2_t3*Q_asmllFQ/?-듓mllh#:eJfsgH* RV㱂z:?!x(RPּ72 fЩ+Ljnܸ%| b8@谡$8LA.n9DŃxנ]K&' 3tk^o_\\s9 =ŚkɼBy3Z)d.b3Ɠ/DB,6HNc]$›}=?TfEK 5rE{y2G󅡡iauoQnܸV@@zv†sKA( E&Ҧx ̊ M!n:qkospބY hN#I}D4wyͦ R}c]t;`Å8|rѵZ3;N#aWHdT"Zt0+֒A֊egbi4)r[&B= 9Z;?)&{{{.j9@b^Vurr4O>]aINOON;>6֏" ^[̈ƦknM\===Urvvvbt4EM0)J܇8-M!fXm4;w\cT*msZ}?<RC@vԿVhDOgRV*J.CYJ|8޽{.C}M*jaY#]sxAAC0*źȈC?$PRdzV+FJ7BV9n ;Ye֗ ӫ3ʪ]Q~%?U.?hT{DbN(U9M`_Fj5}ᇩZ;t+{^{Mocn߿S7Ga .Hzc!! FE,UGZNOOBcҚWDfBh+:L'"Osf͎_l=JO VE:ڵkNFl ]V5ONP|Q!i4.U(`buu &NRXg}*n`46>C Ί\9Jr^BzI~aW\olP&һb>)j:vK 4[[Q5ҷ~=ʟUSU㾧jiCa~fc~ܸqCN5jZͭO=mj !ܿ_@u߱fu|74uP^4 BbȄUk$I [ռmi<=ć) /iK#0rEa!EB/0?JDVq57Ut㕢]IfxSYkTR2oN_S]jֶEÒm g "+sv˄7:\y@!86g(T"kjێ@Z{ '{|jF;~!` ,5OQyAXWϙ|~~:F nw񱤛˜Enń℺ꍡcA7LNvNv芬ٽ5'MYZI H$>A\4|C2 (o~{q|d׏+}Sb42YVzU!,kZN9Ch,*6l2wXwR)/*+TTl)| #yZf2kHqW|/t-1Vcpc ౠiAqCCY >s8:wY6M>Av-l` .:3e?4 Y56FCggg;x?Q2* 戄0ZGCC3t85M)ggj] UJ5EWS $:Ng~k͌MCr8Ntt^I}&*Bu/3B |$8CùDC-m:jb2t+Hċܝ4<  ~"l.%=lWMyIs} *F5n=y (i(x?yaE_8xs\o3c\ZNRy(>h\KZBgGۦ.щ C=x@~_NG[[[wɅC Ccȳ,|?dʬԫ]=z`?ʀ /Xgz&d& Fs35` htUIb{=\o(w>;[P @)*"n7XOT;FL\jqrGyKAE{PNf}@z[?o7JgMj68PrKF %ȧʙCXu:\ + ^0~'*Vv>1b8=Bߚ6>E oZ/.|L!sGA[,}  fYWB1TJuF_6T*IpC9PME7Kz:,, i[jt-+CrJp*{!^/(0:? S#CF#j@MT|h+hX繹7ISODV#7#=<9~}*8]y!cs#T8d@< f ֥mQ:t0&黿ml66noMڙKRz87%|CŰ{W,8 WT iCR[uv&Q;[ `V\nuO0jV.s/#7SClABsMMOLet g/%(IcP3OaDoV }9?D0-0S pJ6zri>]+t|VS z}Q";9qU~u/IQۿ_kmO7VJPJ&1SU ohTCH8$'TM"ӓ* `s0Nl}PվDZi1d#驉(4orhb``'gO+@/ߢj;G@^XAUD/KU3Nm(A z7-Pxy޼Pr8,zԄTc/ HT8 z4EU=][V~"2oZzf ک˙BBIOԣ=*!35==Qq*GaSԟKƁx([簡xM̭S~Aj tK @v0< A LrGG5FÉ#՚K$'nn%f ?lR70qض@]JmJŊas[E.KKb'fn^ⵌaw }^}ZZ~owygއ'5M}A` cAa@[1J;3ܟ$IJ\T)BT-HozA-!Ш5rz7@#5#:m92i~̈#e$ ʓ׸c*DT=XVM Wz}Sv^ooc=ET?@w zRW9j++ E**9G*](^`N1asHؠURHI[u ] 3 8e[4l6P;fKs $@ VWs2 [Yo$Ct♳w'x-Б (%yIZM:VTVZRZPfo"lQ̆ڕw3tK_x;DK-k}wL$9oi o'WRp"v:<<40F+b[{l~+$nnnTVK3R$* lޗ;o(i^"8w6-Oƭ] asW|OĘ\.Epɛ"GqǺ(ə? Ch4,QMsּ- 6%AT׃گj L,*;ޕ`x$pO^TNIOcE~Y4=rrR%Pkl-8ߚ;ˌP~Y2V߯5T-uTTCJ[BMJMciQCc籹O@p0,,9w$jOCdgGjEx3gbO_1oOzםtj{S|ag,(;#wٳg|I~4|@*MR+4Wln΀&vs*=ZiV^%rPUzhl]B|y6;)˶u^2#~)M3øg$ZLoF߈UXXwjL={?\.WWpMA$)x .Botcb'Ƥ_w|ѾNAI &BH8m6sqC* zooN0!@Hx _1,A\r$^N[^OEE3``45=}d Q?gVӻwl)R7f~mМRX  Pi*EP&h8Wj#z9㤫hӽ]Ю4 @17&x"8jPUZ?Zv8n6C8dawcf$%A[ʕd > d("cr`8{ rNc;9nWWWWá%f[bAQ SCwF=>}ÜqɼWhA!$ UEΣ\~h. xb) mtLd7w{{kG4Ɓ#(zFC @SQ 7ka*ko.jjB~SX51tCnm } *Vqƌ72V|=2@\W55J֑T(&!Vz|ެhR%0Q$1nh4-'P$5zK^8+[uԸW șFX,H Dz~~nw6 (7Z1F+ƳV|/hL0l^3 Fz li)^%Zm:=v}l/Iʭ<}슕팫OQO%^fs-jWRNU.W$(n9k"e4R}8ױPt~5L:<<7e`0P3~i8FwwwVoqcXeۈ}q#ٓ+`Iqc?XWP{dȼo-:AR~0$ O1'_ؙ仄6e{HÛCGcb0:^T urQPDQUD[z9Se 2\8zc?T2V*)>wu]QZWRJjP(Sfl\ggg2DbHq t1# XP6sLTϞ=3H&GzP+>gtUn++` OQTBE+J"Ɗ~%7*99A1@!_Z"0T&suUE.|Sz}vw<͙s.f'^3NS-j׺]hL-^ڼx<"6nvΰWz(~NNN4$n?n~Ơ4|FDUuxxh P(D@T|[sqڞɰ #k:{+Fmi)ңJSÞk?<<4;H|w1_9S{ s ȼyނ ZK>\pBM/J:::" %My  A@bQGGG֯-„`yOZc.AN`4VSRBlR#VSv 1%\W{'`3RI@ki*K2C Ra0XZvHz=S##;~Tfmat+0OnWZM6_a[E qi08 u5 ۢĴp8Yb(fsnDi^C [#HQ^.t0Lj0@TV*_ 6v(i#HUy\ж./xrL?ʗM!q{E Hpg8|RzUB:zbPK"* >jObe ݄(;REdϘ? MEUAIh{ oB"@tXrIEl#~ -lm}j8 C*A zV[/ O~b\>| "o+Y^phݝy FBK$qErT$;rrݽοm8gIWOP̹Γh7089riU4?zV2b%6DN/ϟ[იo#1D[qnל<4r/N{vzzj-3 C kc[V $Zi3~؈+HnV8/g3Mz~69@EQu:~y o/a%@߁Q[CRҋe\־ۣ'w2@E4o)HgbNG(4X,8 =y.c[6UVrsW}I qUCA6qY4˔i#zWlFO%ݏᲦRP.>rVն b. ;J*3ȓq>3Щ^[@"{Ibq#AlI&AS(}Qghg%PBң͢`P"8j%h` i4o!?;t?I&&iXn)MT(&NDU8{?tw4d2v)NTӶq2( R\џx4 &Ruی"=-EZtP F#M&bZzm/ޡgmu%' < Ottuuew36>q໻;喂4 }¤m¹S/h]oy j!b}.:'!3!X$3 AáѼ IBZNT Tղ$*KMG FHHIүڌ;zBϗ qZmL?$HQlBBo A:\|?(g֡WK\DTԭu8dM@Nbv&5UmMj5vhQHRph.@v7tRt:9av6{ :)b<2TwE'/`|ob|{LN?s 5hA|Ŗ~v17]AGҝZ|85NիB|w.鲝T{ϣvtxF9Kû=*x8Sp8% -BL(~ɊDݮؙNRw{{k}U Ÿ\d#g3٠=w{{tSܘvƻ}1^ "!Sԃ<2j/p@inEXT8 T 4 jڂY;BGtIB,A.Ћ@d/Nb!a' +̒{(wğ!7 ,450za,]77^ X,Z^ #b + N+"G_ף\^>̖JnFzjdUO<< F)-w3 <>>x87]̪ddb4Hm0he(FϘQs@ v9&9-ӃVej="R P|;!& Ãa||m{}rrbhf} QQJZz/mrL$'KH7-V'SI&Jv(^%9Wtw_El٤ 8&ڝÁnPɉ$]ٴiuݜ59x6 *[PRI>}"QKao|N@ހgG(U, Yo6h8,_񳡗0??πq >ӏ)nb̹$h^:aB)Ǘ ^LDcL95,^CӫPk׃F \BA[P 0atTw:>fٙ)Q4"PPۑAF+|jFg5^f@*1?]fS-X Kx7^traA|A_$S{<1.y1W`r)A! cAۆ`?nTr@y^($Md08 Vgg9B{Ö&ą~Qhғ3=߼yk ft{b<ſP13 `RчLTI$rI,AaDPI# cQji2gDC@@P RMZ}MAx{5svSjI/YǨض-)m2v=cSS+b?URGaRUT.U$ek ]NzTyvHjTEz?|KmBI`‘PQ6Mz=3wDŽOAax,~ 3l)GMS}z(DQ͸ IsD_Іޛđb_} fwVfKRM ˩^׌-[p IWO$]|oh7gǑC[Vdj~iLJB8~+ld90O0 q'(8Ȋk^__|= @wl3>>>)ayu=}. 9 sR{ I9e) OY14NS^⺄X9 F<'m}o '9p_H/ R$WMAĽ"0 ݨSdtbXzVTÖ]`(bRč ҍQz3x\EUշQvZTGA9 I>1h=DI L< T}~(ݛS[@]z L%d21w#JpEG@y/jU6'*UJJZT s5~SySe;GsFX3DT_F[6Ju?Z_ Zjj0ST6jH FgU޻z] ޔwogψ(7jAqLRbD[ 0a^8<>"f+}u/!8yƘ"w /y>y#_=r%(R(*HJBr֧ίy^%I7 62ituܿiR BqCFJM?AQnkǏ xC$$/t4*noo-cSݻ\!`Gonn,!2GP2 ]F;-P GD9a_iP,0OfT#(3qMT2zҠpD{#nF).>.U|AT PspF/; K`BEphg c0A J q{F=ȩx8Yho#U]gx'ذE Ө^yߥΫ'q2N'z.;5N?δQj>j(MJb yύ…dHM.l~m>'Ԧ=@}"q[Qie-sx.3IŹ*ftUD@"Qo!E+4Q#$1/#0ޢ_{ ez=k9 QlsWp$VL}FI4y(_t]z "Yx7P 5tיj*wqۀ-Kg~v,hc5nrNǜ>}wB7+I - Ϙ$(wPHq~ip7$]:vƠ0 k>7^ /  K^![9r$qf票Z ?HA{_znk "u@lF"B+0b{PPz9"͛7FAs #AIAbٙnnnWGleb&l5S{eUǪ6B׮RNw(8p+QL1g=EKqz rѻ{`P%-KCo8Cme&Hj3u&$ 96gxQ)4iE:;;{~}{U$^Fy|`F% ^~lV3F;B/ ^BwH nhn(c] ]]]Y•DyjZ*WZWڤ)B'/ uͷ?V/g$]7,l>anF8ScJEQ~E\s~liLߢ(o~aMT &b*Q JeZ2&&hQsƹ07h?I]]]YAF nk45~؇āX@^* |aΑ8!5Qm0Y.C oh\цUTmӴl65ϭM]j 3E%HB1cQAƃ;}"RD5lPִljZjT UkIHF)[uP1Q!{js&5TfF$T7U,Rq"`IqClA IHK[.!EȠQw]׺B8&/PPv|R<朰2AGwcj@A;3<+ 'A[~u HZo? r7^8Gpe*_@BARDk7SUjQfP.ɨἵ%]'(fGo~iIN%^8 4T<`VbJjcz``=KZ|?,W5yɉKz7dblL|f̽ dT݅f} x{PC`?B@}A MdLp.I;V̡AB

lfm%>'+PU6PZ㉇~k4vy UF B/{ApjyYu%swC!ر66@sѹV_ S Qo)X9Jpa 818cx*n* eo=q8ۓqUA$>wʁ7_ڋRc [xM,G@e>߰WVZQ'9=GA!P)p:ٛJU ;QBƾ {]WUtM|@:[:_Y/4S0 _PKޅ}|SIŲ];Q5qX?Cw A)Gn9 J=Oj)8qx k':CT1ЈיJT ևN@~U@zIxmZ\tP崼&快ii8T*r7V$+E ",CՇH# Dԩ~Tb9ܛ"A Ф})J/Cġ'#Uf%RYBL&lx Z\Kg/rЏp`M\<9/>3BV$*|tΪ,H(|Fk:tM}G H5_rlS3*K XCu,6?eU%JK m @9ʶq?Z3}c$ױ@D jch=󨢁!`X+E(g ͛" H%kZOi|W񒣋{ &9:{j%t={Ur16tX ܪyb}eq-Rv7NL)X=} f݅&·DT˻Y_O|]mC|5-" @eMXRk}`ke%dBZX)d}k-U[7jR?%QDv퀭ϡoEɳ?+SJ`E!d&NjhN4w}9g̝= hkk%ʂq ckq0s=z3.S_$OS" G"fS+[ZΥ\~Cɹ5[XSn Q\X:#2BU?' O^w(DI4hDkX OM [`=;6:M I%_13wNP@/͇$MQȎ!ܓ"Gjq:3= %yhh~q7o?;oo 5ƚ:5)K,: ɂ~#p/YTU]B#q[vބHkk"7 pyח^?xyÆ߶@@l "GJ9aíJğtVˉˏVŐTV26~OB M /{q;,udd)S.⿳-<{ 8KQ!鰊£*u3}.v<`Wg͉K4MYh235JR'(14M1i|td,- tKfA օ⩭˲:(12X}Fv_{|54<\]LFDZ3ʙ3w^ZnrW8JsjdYDRRTP%BU6-Z>}'G,;f^guvdLd`jr(8cZj ӡ'͠Ҵ4läu< #Î߬on=6޲c 9ok^o`;%i hZ;ܼmZp Ea!Y1)vdh{r5ɔ}X|_G9ԟ5R>hXlHO@B2ZXè g8MR://f2Jƿm'To/4!!0{d翁 g(nZ_xM_5jgs*sfmR pQm~4me/5;DnQJ\5Z!EdDjW+SM}JR;~{;~vOa zMR! fqTLC1cr*wx"DuyLcTU8| kp㐥:,ct[ؿ^¿ ^|їn6 R]ER3J fϣ{ş'QXD=IENDB`main.qml000077500000000000000000000413511455567757300321020ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/assets/qml/GobiSampleCM/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/res/000077500000000000000000000000001455567757300247475ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/res/drawable/000077500000000000000000000000001455567757300265305ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/res/drawable/icon.png000077500000000000000000000163011455567757300301720ustar00rootroot00000000000000PNG  IHDR``w8sRGBbKGD pHYs  tIME Q9iTXtCommentCreated with GIMPd.eIDATx]yյ[33*8,qD *F1`\5$<%M̢&>cix1QqKTqD@fٺ{oݪ Rtuuuu;h[uVe*?+?z_nQ|<C N'J\ fQFRA)LJfŴA7IJOX}Ѿ_N d*5W I*.З +J"0f)yӞ3TeF/cHզ-^K@4 9yo}:+ $9/h0 G1+P֎&f2 ?OpRpwn}JW|Zyt1 䅇±A %V! @gV֦/E-x{Dk;[ۃtyec ǂugY;,BPh!@2x(EmJ[9ug^kx 1KŠS9uA<h%.@W0(mGQ0rS"Ȃ5 J"'%?Kónz@<y&~orǜ 31:XZ.p h&ش%T+T`/OZ`AT pxwC\@TE('W<7AXE"E@ke<զl19ƁJܔõ[oo~B{Q*Pi c)) RR{1y%M>j2AbYw%su[ukЄ̶c֢ !~ABA`\׷>;vKo)$D   {J1\0<iF] k)|vkyNM| =n PˍXPA(D6]'bjC A Cm d NR?I̜Ss,Zwi4`X]׹ `XпO$),8ZyN4<&4^*2 :r+~i?NʔZL vP E#ٺr[ئׂ"ѐ a!ڐϾ` Z=KiE-ߖ! E0SP03L'NFj$FLwh`09| z):zmoe;]_~@2Һ8@Хx ~O#s F+ C!2Ն#@0`037#uZ<];C`ZkUOT?M:-Zod\UqƩZB97"7z2R]10!p[{BPϭ3o݁]ǮEоM\uJrWΘ܊ / .la7g$RZ_)l 9CX叕ܰ[~2  _!LOC8w T\Ri1 ,Kp['+g![ ЭTwMG_ Q;8^#TDS@Q|.yMkW|Ce7o l7`o PenR~nu) c7GwVIrR2-󔤔*ZBahy)ZhLԀMztke7=ApҜlV)}}3A骮ciY0}[TBy)%Rh[ [ 5܅e%bRB= H^DwƑRA FoHt]PyWm>! BT=^G[&%M+A8κJQ   ]df-xx5S4b|9r vȕMJT?rg3ks)1xkwen hb\[@JB|iPE=GVaiKzGF[Y| .~ni1\5K4ĨXo]@ 9?jWJ2*Bd&9hl'esU{wN At$|Sb]zc@UIkCo^;*TOj£b)(]Udq?Sԉ1(]:PU썍l 2!Csās6{)Lx);hHx3IsgCnEE ` ^,B|\[K e*Q;6PRSO ]Ϲ ͮ%. دC{Z_ *MC\wtz_|m0%CIZF\9tE  :q}zTqI:oع57 $'5:TF`P{L F{D|%DZf,N3~8x'hy# >zr+2-Cv={ɓBzWᲰ{158pGF}¦gaq8xI@LT Kfpk^A9`c/g~ԊT[?WQ)qs'x͋P+C;{K3؄6ޘt'u5U)A8 (1܏R ~ܭs8', )k0Ȇĭ@Q;>/l-x 1iCnH; ,O\FNԲn7:Kb;u6.s75T0th|@R$D^BF𝷭{;{ w ujgE!V`k~u m}RhU򀑟K`rw Żx.nhYHtcЊ-T)+fW@ 4n9D?^7m[yAu/2o:y A4wsZœY_,/ս N[o;T/'trud:h J~*~ [ߎ4=3 *IbXJ׊ vs{P2YK๛? oĖ&qG4ZG1~])"pU/!ff$ʾx3חd0ADx[9k7( f5)5k@֭,dtlPZ1ɖ~F"%W:;te8{NDB"'᭘GSq-+ok|C}5c.2ش FvN6"Tru5*SV(VŎ#C8Qvd,'Aty GBz\N/)5rso4>`Oe8}aq1,E?x`YuQJ!p[99 l\Ǐ-ok^LJ 5L tW֫և]Ygf_.X 708R$7 X͇WHxh31c3 |/:`@ ])Շ>ᢜV@v[[W>|s~ COy& 22m1Z\xŚ+2Y^܉hj~@y|\@0%H_V0М9N >:Ġx+16<M=žQn8N4+7LdRJFC5n^n81)$~ g.d[NP‚b+h@NTsfw_)m^,/cFS% ]]ɏFք2`=^A3nG7# h!)JXs:F5q_fg.3RW { *));]'asΌF&ElNc ͆}fk׍"`Є5ODkCf##-v,, Y9cƌ ů@ /c*8RLM~t++61J6W|߇R_sG]ױ) J&-IG&/}sKi(C b~+ѿZj늨j|Vv% .dZݗ~} %RRSXnu?Rf[x=2gLdzm=vXfsG9#,VG,b!Ҳ=GCO뵠lP˖и5MU8VIa_ e>Q,@p^b IǛv6]bs28%`y1Sb!NYKtX1X/F9P;6/H`k:y= QO.ζg͚DvN 9U/B4 )m8| ]ªX+,Rt)TkSI);ْ2\Z[/mPoΚ5ke)}뵩ZE%9B# ho3JX;G;vGpGPazaUo<8L/GevT  }*rO[ߕH[pZ 8U q!MjDCRfh>ۜ;s{PЧO+[ oVHZJ0l5>&RRa@|qj?R45y[_oP 31KU|xCt$i=mUˑYѾ˂qF㭿 CEb *Nu<G@aj\@7b'~Oct5#N:p$d:_P/PZ@,CŲj5kj? Rטᐫb`e}Ĕ puhTI4?ͳI7:8:a6-,RUP^e~pV:l!,?])^hwGƣ2@gfݘoc` ׳"28jW\XAZ9šՓdqI؉JV~pGݸN;}weߝe$ Ȳh0E<YǂXKJ,|%R}_^S73[FܮC%[J\ktc rvۋxj=TU{R^=2IvX127 pL(QS~}cb+ Q{m#n6wӲY:V0j|p=)%rH?\6H[6$sz{JF{aT9pڧY80Gnq.._JK"P"/9g?^ ؖ<6]|(کk Erf܀N|i:{ /7LٹS颣dUc}m_焵x^/CkP^%wiڊ-}-F׮ZCIJ壧rp4p> B4A}u߿P9V'EQ"yHuhk:(Ld-_^9WrnU?eU{Uis{}4#ZHJv6b S(W+J0ylRTU.)\}Cw/wM~?nz#IENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/res/drawable/logo.png000077500000000000000000015030701455567757300302070ustar00rootroot00000000000000PNG  IHDR sRGBbKGD pHYs^tIME1.p IDATxt{SY=Ey^OęiEQTDyg̯":Z{;w^V`0h___ꪽput:...?}~~z^;m۵h~~~zn뫮Zku:Zká}}}ϻniNm6Zvu:^Nl~vv8ڃuv8l6v8Y,vuuպn~z^Ev Ztp8pukz]?>^sFVinųGfigYw}4~ߺny{s${nHWUFf[iWWW[kޮJF<<vwZgm]__>֎+ܴvssS:Nn Zkm<h4*'~ooo,ִr&Z6KL&m۵n[?}}m777phG9p8x<>93guC[׭FQ[Vm2;{ɐsgɤ&s}^׮Jw{pXK@(u~~kNmZp:Nj*~||<8onnΈZ`0h~vuu>>>ymŲv=Z]ymٴ`>??{nΎ`im۵^:N e~vm)IoٔmvsssA;;;8??omֿ~NIQ`)v[ykKisvvVF vmWWWmZ`P4vzNSvl`0(b?>>>E`PF*qvyɉv뚽^}}}w`0`R!uXCn)J~^׾t:Z<[kFr8H븿g&svqqQg38}}}#y~~^Njj~yd???p8`PYN~}}}j*\Vm<vvvV eC{}}vv]fsHSi8C(l:W]V%%٬9e4ّu]a̭{6,~~x\Z\㗗ҹ???˶m]Vth4jrfi~u[#0:;;+Y8GdtphZY:;Vnt:ǥ/8olɤKtKɹux{{kѨrٴt:m???[ogggٲ'vqqQBzR!J}WFբ^\\~6MEZ~o~}~~R}p VQ^f G]__lw7NO ~?Z/u2ƣH\\\^n[& ,fxi)GF el3"ߥLܛZ 8,ooou=ɑk_^^g1z*nͱZ<';cS)ːB[re88l﷋rD8///專@Γr\ u=e<6Y%`86Y2U gXkZl6+DD#Hm6: }~~tZH|~~lvUOizYZpNe9=___mٴdR U4n؃~_p߷^kv+<ZnK7s вQg.'):g|VvyyAugggB(>*g<M^WFRԁb,ނmEC<,Gš ~/au\]]=\__~NE@2x&C͉`_EMV^; N&ls<8L?w(v9s z^A1y|>B9:(^IEnnnjA]M_]]-^)!y9Rt·u]ץdOӺϻf9R̜CkL0"ktuuUr6һ3~EF^g4N3 dRl9ݮYUh3Y^*eAݦ&F3gswyyY?qBFҡ{Wy^};L4,.'LPXKg .PEsS.8Yq[F|`^8,k)q83A@A{yy)*uɵW,Q]VG( AGZ7w8B@o<[ @ yQ`2\ρ(wu;??g=(!iH@C%ssss$T⷇`>JGZ 456'Rxh_p8,9sݮM)3Gz5y`82%,*wEJͦ8sy"_LjC!u!2.\ѝsðB\nnn~/A<Ȟc@&3i:ЭlJQZgJ{ 6Mϟ8gBl6ы,HP.]ZhGl 3tퟟʹN&vuuv]ɤ wqqQhQh9wtw^tZ{FJ㽽lV{֛.T,?5gF}w֥cL2]sho]TAܵu!ͦGS.@))} 'g]QN/#*Ehq3X)s&+ubF㌬rNDg3Px7im^s)RC|>dGF1+ŞȦZ~RQ,0#F[eP];aqG)L'[[eɹZ0 Ð 8NZRby~4 "S']nۊ9 TosenRԺ; U2Z̙ǔFBf T5YR %͸!^S:rqqQ #~uuնm9_1VAˏSrJ3ֵ~(:#(z'ry@"CP8WM"lF$ L/ˆ ;k,$cvlFuδ3ds_eƈ$ LqѣҷD?ao8UAГ%Y^:uÙHp8l:|n66NJL[)U ȊwbSήH>K a8r" QeBJf2 ';<'7#nW"9x 09F6=/)QHrÂVdGxM 9  %WJC|^^3t aDd< 7D2\;r/^ %)Kgr$Ko C.'ldR=%,jU(.$>u,$:~ƐD| !ʳB)ʚ]r,`oVUn[m^q]D&Ok)YB'jDeVNߧA*p~8Eo$(Jf94Nd2)g#R2w &҉d1y,t, q6j) zQԌ`S9Hm0pڋpea/..$f`Ϻ$ aJ0#ɤ-2oooy"=&Z'1>??|>ortdch k2YRlY *A||gȑ,dd fMF$I"BmʙeE6(kY~09 PzC9Մ8RWzTɼF"9cO~N!fOE Z, tI'ķ,V{o{%!N 붱re:'N#Įӽ.xY/+cd|\qgNY$IrDKhH]f4%JMNEHh4:%#Y:Dȋ%ZKNIpN9 {48!,qs3^#/xa|'$P)T9,g;Y1ΚNgG?r)k '(/F9^Ra3RRϐ$2Eg^BlFiv:u$rPI:b5fyCa%$zkw`+q )0xn<;9Pq(^W?#Xl}-=b=wfN[:fk?5("˺QF3G9Ecm٬d1{qȦ$#$M榭"fVv/QȲtZAJ5 F.Hj~}~~nUƈ3\.h4:j{=2c1g_n@$S?@:^*xWWWo欐d9Vd>SIYveʬɶ)odT,̽C]٭zwv!I! Sv "v .O6!#Gp'#*2cNRwrl ʚLJu@:T"Ki1soD26N!l":t< L dF##Zɻ~)@)Ir,q|&A5eل8ٺ1 "YI)E 驘j$6A*R\sɩT8"^Ԕ<9Nq&NӦQ;$&;sb>\ɸf0mV|d,SJrPBE1Ln9r$N2h T|e597R>E4r\фq9DIn{gI#ݚM|Y$S]hX0F]+ ?n0zʹ1*ûO 'g$Q.}s:???][.sxL;?p_6ںěl&{Z$]0j M3;Y<0ceCw^I/ v1{% z)9Q*s=x C:OVʚHr)(VGf:$3Q;ٱR2$A.>v,pҖlp{{{k P]\\T(J dal믂35 #ǐ˭r}>}$k IDATp -K-kB dt ҾZONLulXyD,컝Ȅ@0%ɅH]KOOeR滭sIy7eEH9K%bӋʦ4 (=kLsD9p!#^+@"ёP;;;ʻe4|qMG$qLc k]QHil=3œ9tZDj89,!9+:Y`;5OI &3Gznۖe9Y?j(n9|z7@{HQãYFF$ϗ M\Yv)*Ir.}7kҷmիfkp6gPv$;A9[y.c*u)~}}|ޞ+ΙrPtZ)qԱ43fXgw&?m:b|Sph'& ٛL&97K=/)Mx`ߕK6sŒes\B[P<EV5zuA}Z2xƋԒc-)YOQVM=G=dË$X9>+ϙs{ϮV0Y+s2rH+Hkτ`GvK,uƉYѢ}d 0?Kg&9$$kCݗd9%:hϾĠ\D ,lreG^%4v?Ë*??yNc|~~0p=;1sI"Ԑ 0EhyS#Ȳ(FrsҎֹ`8(FS\I/]__cDa)f+OPBEΕ~aL=L6F?#,7ι`ue1'$MC`:&*#dQ&!`j𬓼y6А34Цu9-x=rNߕ|4٘unY`=FF~3PrIFA^,d M9%P錜d3,;%~Іcm<2dw]MQ.ͳt}*e=q։qϨs{\BizwF%(G+*X6+<Đ4IHf`o /̇OB$],|6h$'09.GrVeޢ$$N)$D`iQO㛆6s)X drtbHiqᝦ."P>~C9$I*ZS**JE@f>q@}!'b;3VpIQdGjC TA\tkAQ`LېuNb湧in[TS"y[Nk3$ HSH~3J\ d3xCheQv wa%'!̳yz}Tnd{HȖ":l|:IhN=Kj((mIPQݳAWE3_!L촓W6Ϝk^$nvyͦ9}s@ط~19LdȈV86ibP r'yx\ As 1$5 ƀ,CY J͆r夥D>k6%w-O\.yǥ<)Fh#qlʩ;8ρ WȮIr!$A:*~&r9});iL,___ald9 o錝cE3$x~è5 KhBv=z~~>j٨^z}r1Q)/9bȶ///GINW&$"`PeS.r4םk1])D ѳw5{yywN_ 1V2H٬ܴhtr3YNnoot:TQgmz{,bw岞't:m?NL@zdJ^K-~;'%9;tmMAghN*5̑ze:RݵjE8?YH4P)Zl6+$[٬r׆8bp6tRZe^pBX񭵪:I&r!,pFf񋙫ʩ+ !HmF5R 'C əjf[?:Z룚lo>_܀hRt aT}ɦp$YW}8"\9y{{V*Qgw?u/VIM2Y(]cr}}ݞ&i9#6sM)'w9䰣nw+Jp!dPps5 Ab 윖'}3Jedi:8 Qx<úm6^P,\.Y3~̙gXI%MaD\" 1 R-N~$yM !_Cd+FѴ}ժf~/ߖQo O3HLJ)9S:\{|@orf󨹃:y=MI)aJ7@V;Y9g8H |I0{E7xD3YЌ]9R%CԟP@D#VX㺕)YёusD5Gs'šdJJÝɿh?i6I`6Q*г1l63)f1<EKx ؁ M"Uvrr,ohƒ.;g[f~+K$E.\NP.:3Z(Β[ӵaŨ.ú>9hh Dl^0WNaxz٬jcd`8;=t嫰Cɪ[?џ+rE(l۵|~T~EF}4؏4)(0yzz*BRFg4((W ;7Y^F cD4#ue4Х#U9 ־qrxԬoߥa%ΫLfZnG%=G9>wZfX,mɎȘSdfcLE h]^د+kߜ̍#I3{r=7MG6-G!itzjbĞo\fs Ѳ (qzٶ`N<:s$G~9^4OȍT^prޓ!INYHȲ1/2;䈘D2h|t8}ʱj(VΤM&:9){o^E/"\krͲU-r [&BěQ,4T"G?Rw&rHT~,ٿ}Ȳ U/=5C< jϠE=e8Q%J8K24z`s,_6ɱ2???G >H7f%QMy9vQ' tQ̇DeN[Jlm~_r!ү S@&tZm<bQi<љ]__jE\g+I:@^SDKrY\f㏶Jg2Є94AS ) CYdDXp.bhIf,G'"27gzØdh R瀃]Ra2IhGPFH2s_K@d#o8w24x)SVc6!f"O9C+h4**!+j&Z^p8>9#c6п!d}<5ID'nXU5X[U=??Pg;ībQHtr}}]f׺M/ oAk)l-갏7s62H"@BBRG|h9P aj4 D3'}s]#hG@РZbs~eֺ⳱C/&wΚfYwE<@rQrr[rpΚ7D"e!4aqg/W]vD+VRɌCi!(B>1L2k25J@˦u8%RΤ6Q*S DD2rHvmդ9s&ړ(;~l32(]/d {~фGDsNFصDYm7D-A:D4Ѩ*`IzvJ' Iy<==aSr#Sq|W~sR)jEQ}B~-) `,#),dR3QHً;a. ^IAYiiXV$YXCSjfؐFGRIp4)W%68hEA$1$,eAS?ϩ= 9$2 \sLJ6^ 9{i"7,580m%p=rw,A -<BQm~6阖Vbr9P):`N"ERNYJ )sGdxc{0)HvtFN { uʒ|~PdYYΧ ;<$ԥlj3+uWS.dҪv>??+rurD,"j쉟 ԛL&sJP HN7+8dgLs0ӤDnx Iv}; 4Pwީ-Z(-DNFJC!LxiJ"9E#KG EJgyu[Ԫ5Ʉ΢Ŗp1vt%)<򡨛%v )As)uDꇇYD IDAT]\\T3-pYNdN7jNU%!_ qsef)0(gӧɶ"}h9KO_53 V3_՜L"o(#ʨYn4˳1aZIlQsx| USGH> ]BJ^|r {xNPmR?2TIFGXvd[ONV½p8,C%KB9 )aIdg?(g2n-E;#c<{!J8!yό?Fdr>Ά a,ȹ:S C???ZìkY^P!x7$HYgb/23&ΜhI(^=#*TA7{'NWMU/t< 8 ZUrƞL#j"ȃ2ph(}b gPg_,147&ʖDvT((JjPN3%H7d }^L%A-k[k7~s=/(B5& Ktyv١ty6);Ne 8믲!ˮOJ@HbK lWuf~1I/Il ih264kA"2X8*"CȲ 9fgIwzK ڳE(R̃S#>P>!Ѻ2 9K6gB:'32Q*DHr!GS!"9ΞkJ3{,+W(sIbe`E@7k 4P\ޅs ρr g F䩳V+XIQ 9div[^YnPa$Rp&#VpU##fc Bͱm٤!'8@y&'m}E<SY#Qx<|,%%=GQ-Dz]gYS5Z1"lR|>o~e;kZW~O68oݖ!˩#t(P{fQfN2Kሚ `=Nkfsu_=4EŘWrL8%N٬K1p\___rbX*MykC$LɱxnooTd{ X,p|&df$8;?J U'^ʇ\.˘~믶m1sM!S[;(}QvAP겶nC:&O;Aj"Ÿv_(h[Siֆl=L|^ͿbqT˝S847N0y &t~ܬ;#yڬM>RӜ#rifa;> 1"]~6>vn?rˌ9@E:!eٲ%T¼l}դZ3fvuҫ5*yLp"5 ٖIb#K'CCP9Ns">9P碠䜕g@;GwD Z2˙ eS ~g]7x>*0Dk2dGAFR߹"Di?AvA "l¯E3A&۴R#Zso6ԗSbgij[O&yc{ٔ>kC0 cKw>dQi!t p8lŢ ր3#לA/]];8BN3Yl,Gp&M@͓gL"^$s6 3> N9],=>;;peEHX򲔫aB9BR3[ u2@-ϛc QpH!=J&O"kMD@1ɦa#&hy@՝yvGT1t{^ eH09'"MhD)/]l"g9 9R~/#۶X,*btkFFU$Z@J!*.R:"% p};"B& CH)?WDPrr A wsJrBRRH1Hʙўw>W2;^f^i<Π`f=~d7Ϙy_2SgKYׅ`gD%$,)~5r@Ⱦ*+dȻnUNc9 u 9&~?:;~G䩓p=%QYGrÐN=g'~ Ad""}E:!yĺ.bCJE~FY(2/ i(V:SӢ @a>x8v"h(%2?%h[ƨRY;Гgg#X3͌~Y h,ˣXCjsvozXlʒ3duZwk}h:"SnL5Y$28r 1$F Mt b{eLrE9lsjO;"A֙d™8OTD -%޵>L( P-*ήly kg9ņAݮMrZirp&$y4c∻q{{[Fa<#9`Ey|,XPdÞzw1 lv.`9 y' jt4{rĜC&:nɸX,ʰjX Y.e$*d2Ƙi($d:lO6~u^\@,zp\$u\6=]3G%9DY,jZg>>> ֋ +!B(y@4"RUR* [{Xv'J> H) ?tMp.!~ދ>Ϟg Dp&?! I/Bv&dD)ϘJk/9eAХE &RCZr ?<<M/ m~yq5rb kJurp3Joۿ!lO&YȆd榢] yAY[밈0>eǃ]#_AQE="l -s:ru&~M0V]81C3Z?R$9ʜۛp CʐLOx*-9DtvD9:YBlqt)l9Dsrt_$=ufdC%4&!K0[艴8FFΓӊ>k(6@VbJ>d*gnoo빳32SEˍ7g'K˲g])US/K5q*iU xV5r4b!tlaRhL9AȃCy4A͆!0+efYY9_^^yAƁp]驢`PvrA$ 1vʀ8!ճ) $ 9 q&sw: p;k.]$m_&#{炃y}sPB(KY׫LDàYrO*Y G3 T9a)~9]7ԗf9CBqB@@  ,xAK?8a4&IgKe}džٳN)_)=8,UX&XT{ځ(P#=Qյ_1tDBX\/}a#'2 BY0iK}t6bTN^';Z%4GKk̡# " ЧwK&Fth4*=6kR*N9r`k2-=$EF_*ekVP\͝ 9a @`=ϙٟڀ韯J))IP?J&4"y~~.NײKى"^dP.n;fm! ,'DhA{~1;D~~2>=3$%=4N[DBdEHϿraR9NUZF *Ρu64 39M˒ \'9,KoαldfT-o*~DӠ$kԺ(98f:7C1vd9}oG\؃%9ztmVZw/I2GɃgօR5b.߇#$?n*hC *g6i9h@,EL+P0""YȌ<gМ"'A}*Re%R5l{?m:6ců_JN=̨G׿UkCӜ8~"Ngym0Og&m&8PdQ6jd9[ ~U%~*/@(݌apN=INwHcVPP J#HafĜLH7i{ĉ;*ueX g뎄jmF1E%A]VKupr]q\_W\G/H T0H;&u$&IVxȷX &Nvmݤ+k\U.-ϟս@A\]]՟2b90$"XFIMaժX8fRyx7-uzupDIp  8i`?CR0WQ"`S͡"Cd{jvcmb0+FŻUߓW#9,(#'#zU)2LUݾI'VBKtP랊_lVuo]nYd.yyy)X_Gܔd# ADNɏy^^^Qi.!?Vuvuⷷm>wTZ9EadmMνO{~~N&.2Wn১\.+B*2{wwwTlR?Yȑ@HVT9Y8-e<%v"bs򀛓Ȝ5tRmv^г7)K2_=xyJ1Rjx٠gDklE\<42R3ǀx-rF'$+'~7bPT qf'28VuPtD)&~sA+a^UE9W4H.l42۾1t=sH%@i9'~|^, ʥB rHs1z"}h8ދAǾdy(_M7:#2|{{+囵ΘR\439߬GTbi.…\ihG~t4 )\',h|9ۿN&X,?j~֓6M ezwɁoŢ8 T嵒t:2(dN+VDDRj-@!^6Ȥ&lN7l%u:뀳!w[$ll`CP0Q (zVfmHF>%an>9I9$'xNF$j$ܗ#™(=sGLF=-SO;k/Ec!aɺE($ *2U$1ȼdnS_X3V/g 9 ^>0ӳ:H<2 NقgCs(#-i,U)$1"DQT̐Y Ƨ`rZ >ȗELbQȅ)"t:eNHI:TNtx\_~U(6FΖ=m}&lmɱiCODؗt\.۟f} :gN8߂rxѣt6.XDק!oJ/IXd='8Hg\!+)=e2 b aH 씕&袌,2 $Ja銺:WtI$&F`8t8 22Q9 )5kErV HװC䴭ndM)5Xz[bvbh3)OӛX༽-!׏uV8!)J!s~W 9P09T'<5+ftA֏Bm|xxh41H$ZqNԆN^()(YgvXڀAgi# urWCEgM_S3~20IAe2U <";ϰZڟYJGvN|ZRP&?Q/Gl_>%sxOt&~ Чdž gŢׯ_!?3]"x@?hBd'0 5 HقE> P*~aUa~Nɞ\Qz,cJC <,6cB[VGp Ò%b5~7Lkld({T.])$%59?xX#%iD=AAhPڔޠP2!iydDu){0 W>Serƒ'Gn#Ȟ9*1H)ƈZgF,8Y8 @;v$sH *K>t:ˆ=BI+G?γ }e`DtQ񱜚~_g6 .Hp yƁc82&{%K~qk q.`Q-f;8Jp],/L*SʞٔǛ9koǨp={W$*뀈3:AH S򀲏tU0@lT 1 >'y8-L&"J-n;FPA ?2]>@GdnR`"UkNmc9JU8-8@ʜ7FN|9܀5H$"ڵ&jnS9fi+]ETʃv:9nĬbQ=ՇWUsC_sh4jWɈc+X"n]s'"8fR6YBϏfXŌ It*DfW@Hgz[@g6zw~~K^k9b3"Ms$`:Č+=]&5'7- %t#!1ȉeM9-kvsh:O"d 9'Z΄td r\h/Zjd@y8?z] i}ጦ+&Z@`8ZO29"H0.YGAIJܲ? \:!RNq`}ry4v^W0|)MLz۫zȇrFG$wU2ˆ:U9XK}Y}`VDP9P>grAJY?'/ (?Y/MrX 9uJT4{m4[kwyy;[UQ/oᶘٵȃ25t^s0 43b9Dl;DB`q$,aRf99<-.<‰@/'i:$(p S,+˝@c&/#94uJJӡBYp8,v+ϟ(Lȍ /@lX!;}>*5dSp{ora?8V@xޝ5X+yWo>c](~0(W-bQ)KC&s?KDEZ^e=05k6$Z%hs(!@Vwwt G2҅jRHd에A W PNjs@cW9@5;!WOO! J!9;@&3֊`}Sc6@׼M,(ߌTFhJCxiNŹ\.r}~~> 6V&3<'s}% X,hį+;Lʻ쭫/3rKʂ?JW4@LE/2E:m-l")50*Fm֦Sz2%"Z'$"߃10tN}}}n|i>W5|>o"[$9 xȒ As!x}:-ˑ'e&8iiyC^'ߟ...F8t.]zk!9Xgd-1QC,H'`Q!u-fNz$#5=XڒD^[LyC}rX:6yzގe"hr9D=ȝnhD?TI&)Keו'緼 s}( r&z{ը\2U5eS~;eB핣nEja.ҁ -n𽃞["EaU+;Y[0!#Dh7]}IowY@t4x`2AjmHDDq(KRVsP(95}i[OM Cw^ֱ֌hU-SϷx*M͛i{{{:>>..._ArLBH2Yt?-w::/η%JMe3ܣGцA+׬mUa"c1|} Z]bVP'Y\ [Io7ۀ"EٴY7ܡVd*z{*6o-d.HJ}TY=1o`BRu'uBF bRu@NJїiwwwdy(Տdjsf+(51u{RBSY YLJ3@_Έ˫EzPW@w-F2r l+Sne=ed{Ơ ːEQ@'YY*7*NXlŖb0@s!YoDf֐^scWgr9@I @71;jYM swʹAOdM-'Qp dmgåXVk$,ݩ$F>Ǐ(a9 B\{eVw{f۷A./ܥ_ ,sWN{`(/oeʨ&ڇ{z27vfZI™cF8<] uuSy %@8v".m2W.0wE99{GP p|i2XYwB꬝*n9gl4$ @B|}~/@lY:lM.Ftl+O kb /h#UIqڈd<lƅh /)"V[B^`+fMm9gacG`dm>XLT= jd`!-Sc.G'O. cdz*8;NW{S:iYC% aΪ #BqJI[^ f8\LPV2% g3V:SJYh=Q}tzz:$ [Pli)z6WwyiJkF띗ь(&xf]h:&")R vw@FIKL777b‚hfn$a[L9m%k CB'dUus]ȖeܰVg6|t3g''uT-H)LL=j[Y \Z5:볠9Vxb.*:P* >?VϪ< E"d<镉 ȩζ`Eg=@}ޝYʺ36777CιJ.4)q~K:l/..I ` x#~h#?xe777kmeK2G \c0sϋگ [HW$ƚv&Qr2okl]e;_r%^u6uZ!ybUZ+#,Ȃ g\tv9oP!*ξ}bE?Z8} z"Z<kD;xlwδm˜ߧak[%rs~,N.?j^l}Ρ3Nbtqq1W%:$?yCCy"`s#@BR+6#O K"_~1ZM)ONݦ m3ӶU>pH禶oT%P+X$?GZDnk) BEВYa@n֐Fr?=,(y.`j ;=5JmߡyôV ; ^T)SNZpJv'$36ؿ8iwwwZqC$t*,o}༷gVv\sixA=?eΗ.pljs>~x~_= Auk IDAT{Zñ9%~+3N>~9m2KHS]F1oooG1)V)Q ~:t,,dhil.19fϞ=N^#hoίL&pX&TD T j[7w(Ȧ1 F+Crn W&1~z'yuu5L>|.//qL3hQqr||<-qJt_|>VÇdwXm/2r9?iizհ{߾}NNN;r%Ts6Vմ5O/^ȃJZ,8+AaHbrE@Pr೭SYCegg C,r Xʨj XQEꕅ< }6٨q@QL&vwwG(|=zfeE"xYTz&xO`].}~EKs@u3j;Tl/';AB\Zm\@v\Fk-.ŋ( j| f@xQm9C-Kde3N`2G tBA/ҋ l)gi:2}BSyTkYNa'rXLT2mPLrwjuAtp>dl"hQ #Lˢpll6"2֥e;ټNNNɻ8Ղ.~ÆqxJ _Ma mT6Z^ uӮ*h";-aP(GEYuRJ{wm"p1lSV&&UɩWYwrE{hv9p2`FKu S9)*S4 =ynˠ8I6v $!:dU@d #y"hS6~ZӼ6@\ο4RU]ֶp>~M{ —u<'VWXWnP[Gۡ`J;(svZA2>1(2giEov8s7ٯ:kۏa5d:B VR8J a qp/=SSFxx_uM´$-I@$l6Zz&%ѹէ֟߂LJV[S5F,sgڼksrc/(H SYfryy9\֣UDCo] j"tV똃MmPjp/h;T8iߗP:bc Ȇ%0 :gy>sѐ9\m?NNNFJ𧝪Ωs6Be CO{uH| OA@t___O / -zpp0?R$qӧ}b?2DȏS+{W%A@ݠL- uJ̣*Q-a! ohXt''tlEJRm7kaA˲B-«&ogW:J!"?fx`m% &p G+ &hf$b/gge"@Ev9-M%e;$[V#l8[!e;w .dX>>ݻwb]&/$:P :M,>4 fzAnFgʜiInTY+8r4ǨC3bՋ0pNL@  &#Vn֑ϨLums*@\DH·0\\\L'''kr̰ J\b1U?-DY,}[L?->*PgQv#*}9;dȯ MdeXL>|h~9Q.>C  I'Ox~^QӴU7pkWh@e*XZX#kXΐxd˲W_(KR&ЉA'"K݆t@3#È@EjD j vf j@iZdnE4\o9IlLf-ck-4yW߹5e뫽t#ts0V_dНu&I^m@Ga:R@;|&n?9@N.2X$B J(E3G,X`c@և92ųU궒 $I2U`ЕZGl U~NRyª/^0j}NCS[AJ|VE۝ѬeWѿj;Hюh@'MP"ae xe[NXZxFׯ_ZZYS*RrESq'OF0ShT$@عx]d,5'#r$| \QE@?"EYū-%+,2&j UoppZ'VD.k9!hW0 b0)N|#F:# R-&Pu‚k-odD,jK%/)S[RG*sV ]hpf;ܺ;jUj5pS4wR!*1G_XXD+tSV9;;;FH?w|̚p¤eA oɜl 3 i|&f:#FD Č:GRyY4`YrAMɒ8l PN[b|9ݲZvT@>}4ܐR8t_-g7b1b޼y3.??*c5θYmw{'h(Oۇgj`e8Hy<<2MUG&jlE=z4 /C&;wS3g+2Eed6Z(av~BΨLmJ"7iԇAVF z|IҔcmd~2SEb;taY #tC"㵦óE$)\e#%~9Ԉs ǺO_@ ӔS d|'@8oV*P@H6g̢qq1^d!YЭ6s[#Άڱ,"8$øjP6F$x%zk)t yl4MéGGGGr=l,Ki6{iV=,g>!^]]CĞ+ECCI JrƗa:LRBg^fִ =62>75[Y6e'}Y6u ,␵rת,~6W6:e0mBa!Ѽhc*dz<p>$\fÇA215F}q1%M10c`3dWC ze5;MÙ*#sP]w1/ȇ (hH#P/QC[5$dڎ~no(VU2TX jdU9t.]Asv?>RzV!j/Kq.//zp@βd碁LO&,'ª>,|>A|У4LK}D<gF @rT[i q*":˾i;9DGP^^9ܭM}m7e>]]]Mk8g*P& &roM_vDm>|8=jAvaAꏶg;;;/J.1_EO9$ iWP=bSxE"V=+s,24>cD2 Z iC<3\lWaFDe邛33ORؙ_~w Hd\&YV렺`K$fO*US,\$>r.͎vb+qK- m3* j՗Vbϯnj% ` J(p2j=ꃐ)jZ,\$u) qq_&cVy (q\W$ᔝ%/wF 4DLo޼Yc3WF˩c2d|`H#ӋĂU=fu/ _z.5NuRTFv ?k#:H@ApN82e EUwJbj@lMu#cU*q[AVy~J U0"{K ( e#5 Sga3U5lrlzœ"̾#" !"c U[DVAUa=Aǚ̙l{uKAa$\:sn2M 8@0A 2W`fx ;{ Y(ʎDQ5+ypVdl`W6aTg^04SڅbjI =۱PNgju'ެܳgƝXVc&19J(g/gr?;-JIy=_cU$zmNpr.-8==޼y3NQP(t*(5Wjl5*f#e&lF>2_, ЇMBY֮%7 -(6lݸuMǬG%r@୥2 OM(m= :Q?"'6;hSY5qxe_ r#!UTU$"B#|ٴ,?p@>|*S#Q1҃R&:,ϯ`qJlͻCC,p0딚:-IvM3e̞Ep,WCnAdZ: IbJ?]O#qkS: sF "PL.rP6ALeZ=84&&} vYz/vZ }iMH a\[H1A&} xШjsU[E8t{]`;?%fȣ\_~L3Ab|:<œ9wT\z0i`6Mq gh ?(Cu k8XUJ]F@|>_ T8a4yNJ`0eR~_0Yt|VYa9jH8mqj= ؎t kp=+%>Y+ 0>Cg&L SXA j6jLD;k$Dh=pT}tdt9rw||<(֭SdM%VلI^G|BԡH_feݟ `Q7P%WRRS*,8b-C*|3j]ۢW1_" $Pc; NE6Xf˂wlZ.Ej.ޫ iL(B$0휳ΆV @*vdm5 LY_Kmdyii:2K^"A}v\f5*HPDHRJ{0EAH]e*m(Ul>AWȤ"2 Ufـm4}rues.|ٻKL:jkmEVUhh!3I ahZUZ!ԡ}37r!`ީ?Л7o$`EП͈d}kͬAI[/dt'?gzww72qf`s =m,m\Ibt 2@ZӧQCNj @T {+lļ@:a|."w=8: w6FPgҋ+`+X,F.^)}Fe?;+˜l*p J2"s!N߫ UFj{TKml—/_|>QϺMd&>Ep۷ijEjцvQ C22;{'hIJ#:`\6R{H!.PF#fl6Etxx8f5vm[@/YRL3܉εm=#h39Fr B~D#ֲݥ_!WWW)S^bvzܷodL#VynXwM^gt|ׯQ\,XPY#V˱6[f[hϙEX??asvSZzXr9b.=`bwU+qr6MaO:Gl5VB|3F^4QT'"RpRH/ 0j2o2qډ'HepeDԅ7ZlI,v`MdU ϴ~cg]A%*!xxo(R LRNC.de)4/|dm2kh@v(bY\dpEQ9T3k;#YС#_wWEeX27u>p '26$O7c.,a=W0%O+gLVj] 'wJ&y8uj9/;bdY ](GGG7RPf ×qFH@Ǖtyۇ:M?y:??_Ç +%k=.u:WTᱵ~xNU#B*CGڙ~?0,٭e8#H㥐_8X\"ICRWҟmą됃B A.OT@%Qf뽜iLIݕg質[R9dn#7| g IDATbB?QKM^VkY19iu;\޹va|NUddAp5ʬ%i<7S,QA@o8 z+i1)cH+evq!@ؠ;!'PZod7iMWg'fڦ:w%>uW^@j\JH"RwexW :3:qe߾};=D?~L_!Q%;%1 N5f;"-PコS@.VwK#kO1J}v{q0:6L?v/G$sŋ3LJ?$AG"h Knx)MvTZx/~{{;u (BJupW;g\ xJ# Bл `s>W4f;>18'Jж3O#+C$L;je/AH$UΩrEՐf)"SmtdE2:ɓ'kҁl#svKZb\w ^Nך/Jߙe2 F &̢Uc:qW٪ELb"@?k`-Zx,8.%dD9 fCR)6r\kSsKvtfxGL$ѣig s!)=Q?wy˞WΥY  %V>YG智Gka(}_2cˁv8JU82gLQ&h呍 d_ h|)WG]7gu}A, O.8Zr:wwwxV=qu(gQL媔>o߾զ027>O9AknooG-S v?r1Kg=|p^dFaٺVu!N' @e8nwu%b;os Ft1mpᄍH@5xS6EYpF C8S5~ӛ7ocKG`Q߿P,ִ _g"Р VxcV(AgE֕r+sTIGlm]r9Z폿~KVJl PSőPfBt9T3 zcMk_~YCld,W{p;Wlheb~S"D.S ELDֹ6Ms< n-Jd-\u~I+CEecb(KPm~hdD-zFuOHKM}q}{ +¤6^0-dGyF*u(7l@Jd~<>>:.-„k`_V(@@#hu[@Á~5`z'Lw7R9t j?ۺsǵ3]c Â<@ Z7 E MJ~U9JKT0)-kՖ]+ zM%A<܀sF,mmz{{رK*Y9#U("d;lE@PH\-a ZdHڷ_TQ+탃f]m-҆֔qI1 Ԧʲ;T8qF^P`s`(*i7RoCyn֥lA߾}^z֞C[d\zFK/9[.05PLO0(Ҁv_@J@6ہԾMUc#ߔPSW%%j b߲@% 7%p;,~eD6vYO31>vI"npL4]A`$mC@P|2fAcS8fBߔ,} c"/d-OK\uQv0ľSXۭZ h;AqM9[_PiUڑܵ}P9狋~AMa[{[5@kC<ԿcQO(土ٔ|y:99%)]O5jwww3~xx8}'''K=2/f1ZIʱsJ2ƹ}e.xR4QiH YyGY 's(fRԯl(T!c `@DV2}ŹXJ^]] PȨgkꄑh\Iև8Mi@E*U{?)?΋3E)T'bx+4ԉz^ﲽ9ΉlܴvY=np`[6~mHsʰ els[ȁƬSzA u0V7_]dM>k% !_șꔲUٶKv*` W0j5Zl6ǮJڡ!Ӓ ǵz噰j.lskZ 0GA5CMR_IwP5^p6DAL=~lӸ$Dg`(믰r"(~ο4@;)}uV-RU_^k^mnq?16U 3];PV. l$9}7M{OJ86Rɗ]Cd-{eЎdSLS+-MqV`dXX!HZƩdOu͹oJtv_w6[ԯ,X@^\9;}X+xV*~TOIJ批]ڳ̵&a+ ,d҈wU<+|3v| ֿ F W9Zv8NQU_+&,`ߺ/9:2F3I=4 ` X ƶ v׬*<v&U;88p0?{e·`cvFJ(QicGjRƞ:==1۷oGIªVjįH!-Ѐ탃3pq/K8ZkkVDxGxBDꪚeNW[L4j*YzCo?j>fpHKYy+E0wV*쿚HQ]4^eZ# SquKמz" ng,p}oZɀ";<@/Z&* p=u1W"R0ۿV ,FI, mW`WbU"(j: Z7҃1sx7.Iw5(a"Dq@djv9$bmV# ~9NYwjsfF"YSs@) q fٲOS!:IԦ+ݑ3$dsJ j;Kbwn(ÇϰHk67yWMG622!%`LX]g{}ڹ}a@IhzC*4!rfQ*hDu9AϹZF//BLл Im( E "&n!A,K rw"7364{4SھZONӟeNM0P`qT8c*3p2J†V@pbzSϩL a*KP;vBۥ<\b)2 4{\- mȈ wwwCByu|yy֢vzz:}q_2]\\_ қiٻ7JXp,[0$8HEq\;du9+g@{~^~Os %kwzֹ. Fn-tXOC;88[ IG":@͙ a@ȣv@60kq<||6 3gd7oތ(K C- Y7j L3p2'?~z b1^zwrr2OKO@ `iﭷ$A;-sHk(P>C 2j5bnoo&Uݍdsgk -p{{;-!RX]{geZ@Y8iV\ϩVݖa(p]quu5Z;XY&Sg $x,1W#2HH4piDCYQk(#{P!]l>Q5/hGI  ,(VTϑu*+@aй@}ss6,\'F6d o=}Ρ ag}D XF6(X"h Q.BOIaT.9uYD(Afqk/;::_e^~ajg;&佺l_?88t3Jֶj О; oӴfi_DYMٚC FheOe(;-9>vtY!H!0\׺w txx&*%F*)=BF0ӧv7ď?c}ElsނkNj {`9E蘲l6bO>$X>C Vm@xe[ Pwww*!j-$b`fϡE܄#8 $/c0EhxGy)?"]!r302}#11h2,.H!TكAv%*׃E2 ٪.䄑0BP⩙CB6!BP&_B6 UOS >{u87a`\ACHG0hʀkZA"pܕY9K-apЫUt/g1C [d ٍw﫦Ω(_9D*`Y!_J{9NeZbYe]#ni?" A]M`G>~8f@ W[r>P z R@-/S₾Nlf{8N^x1 fd};ϟ??%.-#έɕ́{9Q *!50H 6ȝE p< k;g g&sU6ĝ0D58 dΒ%Gu =`9" ꮵu\ *(S\yq6gZQ 2:8Q\r'C˗˗ӗ/_,mv\ˆ,ˑI de"y*~!P'Cײy'wFKׯ_i6`/(dCW$~ :@Fp'4jX `vX%AY+2㞕e} %q+E"TA.CDbKup`YxARbdDw%SJ\ԩҁ-ޏm5YKiD$ ;Gqb Eq aU,T)FP{ad?"LsVa!r u;c ,Ȯ“ L];WC9\.8]Z}goL$>njQ4Cvz?uYRݜ"Q<5ߠ7(r_Z 0˪wF~Q&P%#e_ulim AYCoLHD`u)lʎԕrK E8z?Πj%:gg= gluT \ 2 (㮀Z&ztt4Va[ZZ nh,qg&"uLU[]p>WOҸnAY,>i>9Ke'}m:99%ٸ@Ş47+ߜG9EHjY'dS,> |8n>řz rq8~ CkG{`ծ&z+MV FFυ>>no(T5vD,{VbE~9+V\.oߎ3|R“3?Xm} sY{ִX,j5s#G!FavNwN^0>82S^X [(u6mR}LN@ /rTɽlÇ jZM|m.sϏ5/^~pkxx8-T1 |p||< ]綟 TzGbryWZMLkp%tv qgȣ!V[[[c@&<% 6%E2Yvff2QɃNb|~0?1@ rW,QCґd&TΎ&իNWsd"te{|YJu,FI~aRh$<|pdژɲɎی~1=xmr⇾a-#֣=}a CQ$Gpȡdא;'*"fE2#ٻlD59P5Yo?:*aJo߾ύDuzz:jwvR Dli1%dvڊ_EBbS&Tߠ@o߾ x`9s ndˑ+mVojnӧiX *76FYmT&;UEMyJk#RcP. 'HFk5Gۇ!.ѽNSɕ03w9M.9rLUQGUѣGjW7QyfNgae&l @*6GFk]t_ʀo 8A?u#=u],ĖG[T qIpR5Jz:곝=/t laq:,tlºu #@+%ê Q7HD =WV&,=}t5{:/5Wg:|JJR@X𵿯 =eX::CkKjݲ*gDTf]F4Si8f ɺDJ2gPK B ٤ƛ#<̰:H\p-)`ĈqɈ42rp;ZEh^-t Bs@+j jp\H]l{JM;öXSM,#x}}=u樮qO΅ӻɸF#P :Cv$RWPaT.d('˄w,x9rC' A$ƫ`E1<{{;*q JDZzfwDAHmY! xM˦33bԪJ!YЂ}?9&o9G*'[ i>Or:::B1;{=߆R@=S j5 %ҨkHje9e?bE x+Dd!-$ es &~mH2ϻQt3'0*cn$)øm1h棚RMS2hEL>t{ Hy bIWRcq26ڱtC8cH@Im^ V]o{o6h`1tN V<" n9mX̙QR}],@>WrSD! J"%,4*S8`hWN)Y+l>VoњU >V0FRaFV7wB%O"؇H|=-oC]p{#X A稬 a'ȒVl3qHZiS", :B[[[l6޼y32n#C@˵JJbE"DXýؕʆ|q:===z4TZɓ1.*+B87$f9¯;ڱ&_~S]ƥ tQw{eSYc u/Y=fNB Tq * ϒ*@ a,vYQiO^{e!em;~ιȝs未f#@_vƊltJv x75;H|v*Y1ΘޗUj&BRKЫ't-eΫj9A5X˗pՒr;"d*ZFāCC zj?\$;Jt%?%_~&lGCKjtuu59d:sypÇG@(adP[npuRkN ܩH2jQwBn# tT!g:XdžݻU٬/7 _4[<*.s-ʸJ_ J݇ zve3ۘIʒկ*1]-p =l+k[smk0{LFAOg>ZuuqPyg?~{!:K2tv3j5b'T%0Ќ}.Ce1ލ_F V{JG:#էÇ&*h[Tger*Gi Xl޷a((eA pа A=rC|j5M4F 2AZKb #hwȽק\?M(N2GT`(ɺVGɓ3AI$k Wf~[-Sd@8LYYtі ׈ ՝N@$u 8~L:ɎV35p`$;? ZXPlT=8"'N.4PLEfY(s{{;3!]7E%rs,@ S2;UFz4LS-CC`̐ZȌ" uK(Yxl5bP8Ʊ0g0q`vݭcdYݻw˗/G F9u.lYdA Vꜵ/;\!ٳg#cĐ`Ir Jyl#nOi[ }oZϟ?b1NzjPXؼusg6w򗿌@jJʀ7}2QQ`UҚ=7l̳s@ZD5m' f:Tv:==#؝H[ {eֵa>g6/Rٲ*&kv'Bi쒴s98oR&iriA_SA 8݈|D6{ը8ўA5! [,۾7NDeL*}D\*Et#p)jT !1"n(VYLcȃ͑RCP[.9#1ֲcqzTGM+哲pRAjgZy9nBi?k#hx.$dB`NEdA`שUHoM(hI; l/ :X6J ;_~HF[~>`>ĩz(siWP+%0szj2?wÇY5,frieE573OW+#)tPLZ1u"s0z{{;o 蝡ˑ|믿`"f8Ju~e2Ԫ0:Ԗ5 x-N@VO[w= P.)E[_Ft-}g>IF,( GZSCD3!eh sh>OVݎu͹ƐM֬Gp68)X3dsFrHhl. ^<_󱵵5V(PUd>;7?s`>Q_ftqq1DHh*[BA%bݕN:OCl;w+PDI0 AE^:|E"|yWeǏg(FJ:)m:* &pww7~ajrj9:!0LȥE[mV;`HA9_<q͚Jٳavj!Tˁv+p"q| ?`W/+vªΏgAÇ!TZ!TAF.UUJbۻ,VWcl˦Ξ ɈweL;׶ӷV'3-_yҰ:y@Pbf_&ԃ0A#B=T0pwY6TJKٲ u#2$_s-N$JQii2 МhUEVQ {Qnw6n^`gФBP @ +w.z^ʄլ˫WF2f!zWBld)cH[AF:<<jKo߾OQ*`SrePwJ߂]Rb됲@2Ph}[!tJD} n״DKbnAPj5溻[!@#`Q~D %cvK+[wUg9Ւs57ӂPs_}iNHe-) Io?yLtW,9xA3@S˹J}Lp@.,E kp.H g]ȥ DՌQjܬuy;P;'8ֵ@7(*Cf԰˸Е4pF< :ϪVYC!N(|\SG1MY+@N,p;LT믿Nנ#k#A(*VFͺAP҇qloo b{{{8dW?~ >'E1R\__OldL٧ =.pyQ9#}L=1t!7|Y@M7R,\Tȴ&u".|MVvGڴY@> I7yC8=D&ԯ!=D$qF|>$0:CwYgpq(3KڟV-޾.e 58!@Dn iDaNPa\]ZEygR:ΫDόy %\:\uz2❧g @2W0IQPFAȜ:+G B' @UbeE_ Ր}Q*ںfIn<4dΠ֩Q) qArP{Cv2N$VIS~,2YO5\жA+qXU9DÞ  Jְtd @Z8N'+פl\,_s,ze ƞGGIN0-Sd c8LHƻ 8i>O^_}JP(~t(e$j'A4uI6w#i[o"ޖ8VGe_?=ztFQm:CLȑ ːdB_ t4*ԠTـ;!@l ue W)Fvڲ˺e༊TT1鸻;kFsc]žSL&)dYڀHAe9a{d|׋/3d֨]8}뿫${"CT>Eff'~`{ svxYϫ;=PE+j]]!Frj̲ώFTvX ǰxt`S 值HZ唝i$hQ!/Ff%XT&0oϘd}Rb1S&+AStI9Z.W,#C)E41i{A a+…D趯T ?YXݰY)'ȔoooǗ>~x0 #lèwf/ thf2\u9@!1LKg/S8D,|P;֟-s9ƄJY5+ٹ?NۚN cͬNnQё z oVXHM&ӥ ##bB:vϞ=2YA#'+-5xVrc8ֽ %` pۀ#0V2"H;> ѽ\{׿Hw`A߂B({؁8p3rzhp |,I=-|Xr֭,_ԌQ][f .w9–”d\'Oz=NC L3`wA1Ts@:)lggg:??_Nkp?dLsAv7SAǏ&-+ (TԞD"1jD/5#@>*sZ$]U+,ޗ/_^MAлdaY"" u% .U0g>l#?rԐ9&F {D["U 2DMuZa8jn.{{^I+JN[1:_{gNV%2&ar6H?8mɂ82OH"y2 C}~S dZ:O+ FrV6:XߤG7D~ezݻr΁777C˹(Iɓ'r|ׂquH,g|tET\ %1ga!| sx΋;|FZ ѡaAC jԟ>}nD\=ҡN}!E26g]$`mý@@TJgonձW[?)|U283###(s-$ؠJey,^5wd8jj`ʼn@p ;D%NED~P2gV$/Sx>9958l GCuX/oS2yeoՂ9:ҫznlc]fACnO>|0y:&&Lw|ф|VW_Vo_HS%qfNԏ^=J$Au=l{q`F)Yʖ:q AُL eV ;*@"3jP宺[UhUX֟#*YhΫB)~^|&*KMWPvԗ;>P$8E*`XDA5yAWk=nLoԣ8kΉ)l_'2:{-˔ /C3 iw(ֶsZ|>yfh<{lݝYG9 "xOƥRmk Lٰ/`PCtf$VMA1cj\o:r `uL/!%y:@2_D@p,ArȬP}b@ߦƳX,q|'`rFtt Um@*tyy9pl@?>w5|e&raw?/-g e{#C&f~ב-n9oommѭ*m[ipw.tkmu  #Ph!`pEetGGpȪjJ: PGrH]4[d@?^ȆP?),fH"A$PNmUڬˬ2K)1H .?+;ڪ+S}ULPג'c Th4'Us~nJwSܦoRPJc~4A7E. aW2itq22ih6йpR<˙ʱLb[Q μkuuVC>TLGLU1&"ݪy&:lszyy@KWWWcb@3cn \4Ҫ4[&M駟ƜKx>z/7덦82K^z"q\X{@~эqCgtyf169&mN[fL)dTqr){]Csc;_bEm$iè=U0p-63kkkUeJdb'}YHAtS"x*&@\ m߬/NOO+hNJ۹zYIA..`9(;ܕP(L\MxNQe NGGG5۪ w2!rd>0 {{$}n噤%9: d2RI ȠVn@| D<>.񚞮g$ΰZ^phxt[[[%OϚ6 tz?xẊ%)r].\:==]/xcSq^,y.ofqqCq̇lU J%1zD_$t{Sta /52mNpzo1CETI:.poK$`0Vd A㐤W(BH4P>'J6 =bR؄D$ha '}yURRy4ٍ3l]<=?&7i΢jϊ:wP}7 .J xxxJqf#tr_p{oF0INqviu(zV*$H435jr}}E''[ N@)ܓTdrmel%Tm5)6nesߣ(T%T\Y ruK>U @\}̢I'ӎ(A`EP9>w.x 73A{qI0999iSSSmwwxAO+4<. e$h0YzIaEYJu'(h}8FQCJ<4`"( UK:w CUtDA.cP~r[: #jK~5鱩TUGzhXINΕvq.v/s9m$}V egPҝE1ZYY^NU'Kg|s;X\`vY\*sй`r(AE jc[u@8M1hyQ`8>- %Qu?}4FX1xQGvaF7Uk(bZ6X q_ݻH֍\ mkku*Nb`0(#}V,%9 nߢʼ\D.cxY_U6Z+sUC Wr܅3QZGheiV>':Qͦ{ E7%u*xiX!{I@υ## 0J䌳G+`L )$I;d`UEQ#31I=fG'}vU=Z0)pU qx96'(/3V\S"rh P.Qi}Gicj?0;鿞i=`k0ԈŹւ1g'}%vuuU'(IȞEK9(D9PSz[Bҩw^t_VDEN<*ϐUՙ O!)V }:Z [n1W Th%UJQxU?#3VNSR4zfgGd'Ti*4Zt:r cKوzXΉ/ْ,CwP`v7U4'|k* Ld#rQ >C-IcMѠ#sd͒w6YwpWVVjU+KIWLJA}D1,Dъ@3`Әr/ɌmBD4ʿT=W;]ag:O⊕g8RZc /..Ƭͨ :Iڎ΃t tTX10'Vgj\L*hr T^N/^R0ַf+i޼ySC`b4G@);*Fg"4!:;s(~e2Z҄[{(:W͡TOn+іA;*[笴&"hSL'g*iAȹqEA`ʩiHѾ|U@^1d; ׯc;|k?$;8oxn]ɒ9*(znBg?0BqY" *T@T%,y I~X}oq X]M [@-}䈥{R{LN;>>.2Ul{̹6sfee %*Éb$R[{Riw^R zyOiT6jT PECp[ s٫a1g@9Dʄ(ٟ~dNڧSH6.S F|0 .Hr(^ɻYO&9\-zOQY༤wur={ ҏZ+z,2B/g=k3*3 XULiI 0Wi g1S[h.):;@wrchAH^@Kg^˗/c­͛U`[ 2Jp xNywF1"&"’獔6==J/k`T/W-jKxp51p.Lp߱ơr{&ETC߿ i"rqi!Bsz(_IO"ҵ*#Qu&GzY~rTLss|A sT9eT"I{.'XKSo0p8,zsn }*90N{^LFH:Txiuqsglt lѨ4NAxy2}{w1&Is Hnqco9ksw'ađ3ϩNC;<<k]V l ?>5VTy6yPPt}`r$.իWci$%3qߺn%2,AUssSk)TJ`$} Ђ 4zzP{ ⢾pB (%@#<*eS}۞+0 3kR* 9r*Y w۽sT=3N `(1޸K?|vuLj }OJgl+x c7cU2: /iU&.,D^zƂ| U]`؋ۦ( /^MJ޹ T62U"vk I& u4MX6x>}j/^Gi\g{r;z{(ٜc229uUc!ig@?\.bt/{Q[b(],..XP r3ZG*49STF# ,s9UJ%>WęTiyf\AbYnI46y]B&RwݱZs (ύXO3qu}/ úormfXO. vbffz=W:CL@CwwwW;766sWrY2wzIk`gmgϞ4} ÅJ dgR@QVRE]Zf^/^V) \{4Դg 1IT&=M{(8hQ.'4+&E ?w*=?2j%=S>$TnU9ON@D5a9f%/RݹJ-gs\,+i(t@=<gW%g w8(IŮ yX vˢf{ &EG=|\-R%A*#B;C*J!wɃmDdB$ l}u?ě͹V0ުKwز{M:EsSs`0h[[[eש*gV(}$*vF1+V=hP&1Z LW.] NSS"N51@I6]6y4q+YѶQ9PH;w6t Y@{բUIxܱT.kUd[` *Rp NIVzRA'^e䡯|Fs׌x@COPӞ0 _(L9}zKɝ4뽦IիKDy `gXje׳6+xvDm9|ճT]eNmEi%NCE=rfyC0sܧ&.P,ٷ J',`( Tuz-.錅~/]_?q_s͘e-(aj_{w6)0F4Nz$"ʩoٗ/_ԹO3ƨ=TZ䌻4P5bP櫫ZQ`F wŬ`~ aWWWvF?4-AU/_ևdِJq_s5 540Rl$S|"*䒒_馪 zDfRT(B )t9LjIwHΡJDp\GK&~%czӨf<cT {)7c}?Ս闢-LF̤gdsܜ1$]R} iEH\CŖ uj, ]zk@&gzzV BwGUFtC JP5Mm Y IDAT9I $l`-!w:vuuU+;pXڈD#=L}'2zUOLOe 0`@ࠝU4kaTIN9!Hc677ۯZ Uwwwu /"ȪԛHdfxm^=tkk$ m驽~z4=1QQgjUiۋFaIbju1O2C{U#F3=`CP ˗u p+?Qyd3swү֟%]p4]@ *LО5WeU+TҊO=2IeT( }(ЁKk FCJ4Vƥ*|%0*sԶ*D0!1 p "KlwiRA@8=OI14݁jc $kq*'$4斀 ֔vɕUl Q#B kR QJ*߷o S./--y:Hs '7@ QpcY3.I Tt yFZJy.e pbaa-jz^YpY`P=:\b@axίB(0WWW+y:CޓힹԞh]9/H1.H #w[Kx%z?c-T~U#F @_~z{~F~x9筭չƌsWg)΍P|AX8Z[]]7cDj~uubw bH8;;;u^NOOEzgF8}~4VRB.OKwS+ls\0)~xx?K7y▖J䷼g8,H*\TjZP:XUy[:M U #DiNNN̽s# @D} ΠY =JJϑ^]gʥIp=^pP$Ѐ T9Vơlҳ a Ahs|(.A[,9?z__8 3~V ϟ0_ǗlP":IZ*DAaZԑ鞟罦MIstsw4Μ)(8yީ^˸\P q6]$=:N V/B{g:;fԖ('- UX!>yW5 ;;;UX?2[\}?Ϸ15%1 fa#Z#S,b2zn擠s u>m evUxb1Foy@jbNX (t%1\ɗ \5g6OdRܔ4Js9DžtKj)%4 #8BW-;ɣ VȠIN!7ӧOwOeNushdE\C0Y'ikQ܃~EbFnTj``D/V .w٧AӤQɞ%FUu!տNբqUvdn]>Q*}ybL ww #w~U3i!Ɩ;ֹFE sN kLb23cb#ϟ~_W}zr~^;>>"{ӟ=B1 @HCe| P ټެ{HF6MH T.r.!B[KR !gjID4WBV9'p.P|E5 B$&)i]c3|psĀ#INj~ro(j9 `%rW;@9A`O|&}$xmnṋE.+jJCߜ)whh98S&9l@onnVpͱ9" X_$47ƌdr*;us)N}vEJ5*(L9F*G$Y2g6m766AgKX 8 ;b@-3R"Z.xMlc/~JL0nH \;;;߿W+%(ֻNV#Y}9`ia1OΓ<}]f@CU \ r ~t " = 8)猢z*L@cnwE٠=Q+u>4C?OHeD4`%(xF~̷gN#]F)p_z59ss*)soZ%f`9*g#JJfO!4[̴?Ve>Wc"\s7TO$!}OOOks՟ O)Q a-_Fwr)tJ/mE4n?~oofjju;L8Kك?:✁ְJZkY#t9>1%JG Y?Sqa Hf\޲J|D̚3ùkvrr:NiA@I"8*|.K*8@1ɓ7L;3 FݩOqֻn{Y %@r}sۦb"J_>tC^syx$\=t,J]ZȿK/n]=x5-Hd3vQϨvW_rQIfQB*p(d PU| Esq~"jFvrrRHB)S<΃dZOJ;hG3$ˍN ZT)K"3h޽{W}`AMB|TD.8 *` %'窝/_P‘(iss] ϟ?o+++UqL[CU[ڌʆ͵x̋ "Q-//w|(}z&4wf=_!\) C///Օ7jmTEfY%; XTjK!T:b(KdqsZݪQFaCB;@&@oI'pU^\$$R虫L] 1"GPxΏy?c&IW2?hrv+6ƶl)f(a>Ǟ!UlzFsɦd# N9Jܒ iSLDCY͛A_ xc 35}r@cF$8]{iٳ˙]KR7KbP{aHNB '$U ֔>m<`IPye4=cU@ kH39&[ӱyTJ'ܟA I4Tiy)S`rBQh@KיP ֆ2ks/6%[!\)PN!ZA4T[,gǗ۝=̂b:L*\`5G u#;)L+'Gхq״nTvS\bCr]^U ˙ҵ.0𞞞nǥH@E^4 _V -#(\y3ͶZ+0pɇ8U]A]2oҮryymV:SpNe_ F.& H *mC~(PCґDOVf2t}1]?~)eq}}1+zT{T1-"nYf0ysFI٬b'ONr˥V|;;2{I3Z՛1 j۟4<$w޵B깚]"b(n\SA!K^f,52@oJ`-.I^H KF$T';&I`6+JUAyLȝ A,yHP ,ZHw07DIƖiHĞtz5Yk[0rp666i܎%M `Ә" Ch*>qLCƝ!P֋E<< ; ї.||3"Y^^."Kou Z sQ ;%}ô"LTFl4y5K9240Jd0nrMIUL eQ~W'!a6Ŷ wL8Б&2%%õL?~`Lt::ɜI|ŪثGQ.ދyӪLƓ~_~;ǗBhoo3_??cHY%or e;Ϸ8 ArmǕЬ,-/5h9k%(}i4ϠSm%dhuz\,""rt~܋M;=C^ϟ?ЎDdl@"Di9;;[UǢ\ KƄ9j7:B\50!,$PTzϟ6QItӼ%wϫvǘ:LI?pFĎXw`4*<ҲԿO%b"U@ڻ,G+=.T{fInjJgϞ-P4ncHL+#KnB9 =W ֻw % 6qX"0ryr&jnUޖuS" 7Y*d"' " ̳%x}n q(` *ՙ6 666;;P>@g;m@ ^*HRr$#4iyDb&׹7,K'σ>Sޤ~ʷoƨrإsـAOTv TQ<==~s(]urTnooAm*!] ,-,,TP3ʣ@K9y/ٗ͹rBE%n[Tz/D1D}d ^|h0Qk(Sq,X~e< gMxFwonn`P 3y־ zDxש@:Th\!dWUq4U@̲=@^,1i~]^s?+WUk!m{u=i8c 0- _TA sejKaր:kB٩X]._ A?yb):gs)͉wmrޟ30???NOO 4Fo.Y]]mfJgf,_e?^4aQLtW]cEa$P4c;88K m; {,=X%,4$Jyxx(5/zz6ԩ. ?#Z9lw&B1gd}/,i<*ԩvvvV8<(1jf:휇&qT ԥN¢H>W~OH:,B*ojĚ=Ie7tuuUV\0Ci\O*hT-%___ݤls4P$oszU/Ceh4trٻ":R`gOV}`ȸTC%}IϧSЦ_ 1ܸAv9  d e=WVVJg}EJZ{zzj? R! l{U mqq z~3335L7Mނ%5Ւ%_-4-ǃ_=໻?VŜwu~TN:gKP1I䌶y`*XXrjIW WO&oookP:GX?zAS@HŭZ@...^?bt#*Pb0rV:+AFVq%MdL z-I)B˱] P>sz sl{{{dlnTCz;Ǩ ]\qj &UeyӜP9vI'Ϩ* r&Je.rs LY>^"W$TgϪ@OH澽sͲxwZe璳襳L `FD#eHzȿ~`RX Z;;;rX k X bwO-^o{gg?̄CIlnkh\]]Ո] ZMIʹaꪽy9TGLF߷0{_zVVV;hzmO⸡^4' 4_wT6h4;S- VBn9==jJEt0je4$MP씌@%Oj#Lz\3zIp$Q0YT1z<'EZ IDAT^8pbKZ~WL-<^>iή&˗$,g% *A3{";SX~gn졡}VNdLiIܝNns*ׂfP8ù VQcYT)H3)[]2br⛂5s*v@wN52G  !Y$tR)ݕ@QF>}jڑA T)vC'BXe4NSsg3$z#k@Wc<7+d=O~d,ɶ3Q`THZ|Ϥhm˻J-]= 4GТ ܢCsR!!ǤAɦQc,v ӊ1f2;m{agTy~@$)PT;1&U~Dn% ;r$Yt,^%o+Ԓ"UM@u D]Lg81ړKRCvqΈD[R-ЪLPB[)2MH&%[ 2B[d3hg{>lOCm|sTI j@uKmC)KhԶjL̞"nsb%`9Pf`%OQ+ S916'ΥnC R\pހ,-4 &;IbqhߴjG؆>sG@βo@ϡg[7у뱗C4 tmz 9{A3yqqDR2D]^. n( )eKf\ W>`%=<  jϟ?z}}-4Q>1 h1!?I -w wA=z6-4Uf.6GtUq(܋IHC $f_ӌABJu7qөB9C./o @ky:W www˕z8OCpvrvsr%7rlNN TmCXN@5v`0Er{{޼yS.YiSeN,NHwͱL \wSI*y}GQ"6׋Zsx;Oy֮5zssӺn #d0ؿU?$S!kkkXkqkt`qwtRG`󴠀hyINn˞?'- 5c[@ _UUq]:H帓˴FVǃp9NCwS F@h(-m .rrXF tqR {OuCIۃy@qUִ=Ggr$DU4/j*` r!]v \{c`XDmb|ݻw*k@I} sA|Vdgp0pfTURsonnJ?BnIS!ڪ 1^,3 V0U$A 5{zOY (]QleI_t:h*qD;#AEa279J⢘kn[ѷ(K]M!^# *ڿ`z^]9!{mq;Uk4yf𳼼NOO+?V9t3!Q<_=u}ct-R<x+Qy}X¤.= CAYZzFV{ڇ.RJHu t{M?EvysVQ/()S⪈'=*J< *Zkd3rBD9Y!RY$>>Aμ$=dY?Jf=9 * l]pN;M/ls܄M1Ptgp8,Eݣɵ{o޼ik_.Ckv޾}~˶XfBBl૭z^52@@e&^P9h[c惝5Uvө 0NOO+{vۗ/_?0&TǥA ilGTXR,UF&8ג97i.XWir0:/if}A֐^/qgD@M\b-4&QeQ!QP 9DAD+6Uׁ= ,% z޽C,IX.Esf&NR ʥL |l|~h4C_#'JQCIf5]̦p.[cz!ٟo{U*y%H3a4X4N}[ :%Su~B>4 T]؅㚽t^6u;.<>>} m A[eI鶴NNN NOO`06.F\RQ/XJS"[YY)C2w(~py/|g93=3^xbxNo׿ ê)Hgo:Njz^FzXI[`5}GԀ"[a: Mo~~O#L6$ l 2@5$Qj9&ΘӪ$f~/۷r:P7w]YY)H[.-S5zN)"zm6>#> @&G^xѶjF7FF!N=H. ixvxxX{A%bUtCYTt];88M[gp0@)U}; 'AK=0[gTJΪvUgKkr!wwVY(2q]`|'`fD.PYE4l@$YU/U+1JTqpr ?k?S uDb'*up3]]]m&DLC %L. Z*Чrz3b1Gј~$^WF$~gm(7XcQ 53fSiCJoJekS.LMMBnzn_4?Z4/᠝H9|P#{p )B%)x@Ap "$DEwDjWߣb+ TSn1}z# fww :/Q&ts<::*nN,a}7JEKS2&TLhy`~BcnVF1099y.9􁋤t|_U?3Hs}zzj{{{h,IhPѪuUvZnllԼ}IcAQ( yM% UXճ^>m߹S큆 z͜إhnoo&LT)/մ ?~U 3YYp-wvʼnK~-,, $oqF{ A;%sz^q&btrX&SpssS rg՝\9oaOⷻb0N}򥀶4^e&X;%bUPQzJ1zVHc^K4^٧XAuFv0 V5(|w){D]IM9PƥdY1ː $YS _4W( \]F .nJjT)׳*u:qppPIO@-wɪLWjYI㳿_A-/g;fGh4oT,`0C)jBm#VP34i^*QhkN'k%A=ec#0iN#xy;999iI."33w8RmdW@xggL2צ0Ӡar#50L`\rAr@{Դق|ÇGaAE;1gP:HС@vaa﷏?]__n;m{{sRZ^A w  u ,(B+-*A1PlaA~px*iI3`o.E۷o˽eFK i muu*N:w˗vppPw4kI#qDe(RRA*45Ʌi%>뵣z9Ss촓 Q|\L˹buffz~~y3 F7)V{K:Vy;!`Rr+:OlrԻd:Buݢ԰:}ˋ"$T!,kd\%1KLЃ<&y(1UP`XTN(pYvӄ$.MJ&6\:TQU ΊO>5l:sQhx {VNfgx}ǤollzTyPhݻrOOO[ө4vSgyeh4D`zݻ0lr>A`cP3% AJSψ_. !H!fgg lnn19KGr% :@Wf1J8] i%IyZj쬒LXwLbUxON brGyI:# \>vXs 5{)J0=$=\!ң"Vrsgunḓ{,#٣uֱ mooo@Du{DK]JC'JF7$8TbrYǻwED+q00<?G՛&=sgzc\u%gdҌ]tZdEϐgXhFSSSmK.36}62l! Ւp;N)Ł͛믿V|P ///[ۭ61$P%|cuuFl(mkkc՞={>|P ©b-Yb!YJ℻ mm㣧k$Mqڎ dY`ɉN[ojj,,,.=v%b zBYn4h `zB͒8% \gggE8\Q>?b'jlF#[Jf"ĠײݤIxiKyQ 2騄Tx,YG}b,$J=N`'Ɩ:  {X IDA*ԡ ...g(WM8OƵAٖ,C5z>>ʫ"*xKI[Y- m4Q5wnoo뱖J/Jx;r6}QW+ַ*I[Fc>掽z3g/-- (}GKMb!³$vr/sNdۭJoom8VOy0߿D.Z6)k;;; 5 N?n 1ɐQk? i?nEyniv9n'~='Vĉ gffn\K NNTJ%᧧] bF7~ !TUE=88;a@^V!rcGDEYFf_%d@M{qciiii <TRrS~嶼\AEê;|LO/L.VyzixvuuU+tԭO·ɷa=+nV.GY{ӌ`UU~_ :8l듌VWWz~^3֪F XZZK+pPcB,]X^^d#g}dY &w:nwZ2rwA=;Aj01r+++meeƃ6œu΢;hf&N+?}Vy%C3H'[6 * ez;;;kOsX vrrz^Uhssd{-//Nk?Zs3 h{N666Ie|ol.'#WB#|j OaLGkͼx}5*m!Q'q >}*IULYA@ODL)O/9n\vmE8:,$U+sTqyqUce\:M͵dzODi=X=Z"R?#XXdz٩^{oGHҵ#GݻM8j87J.Ntfh}B}D$y։}n=tK F*.MaE@dD:ȋ_ LNI6"Zk5pK)y-mRn [F zF1FwֽUq^I-`0hwyT6bE>C*777F`LRu€Q_.iObč-Һ],T{.CЗ$3v\NfRjVC. i7KךW47JԞz^h|LCpIOY&/2 "ܫ縕[|^ r=l=5tVg}9g~~"F6MTrr^;>>3D~\j.pA坮WzPØ4}s]g纄4URuyh,s&P1yDU `n!ժ^ӊ=#Yg69c$؄>DonFi-Ь'vʥTnFsO1m<1(" aiD-6ARm~VbC%i6 tX\^^V`0*!Nk4?13BԚDNi?(ڏ?XLq Wofnn=}%/o@ Л~K(/R26! tރBL[D) ʅ2;d?K-" E/Wxjr إ$ǶS ~sWGRM4F0,Iy(yy*e*;tT隅OM -TzK4\j^X+KqkL&gNU^J39ĕ龤Y#&.ڐj.<qɰH(g>W!A4dҨl']^^sϨF >dCY\^PRAFE; IDATrյ=S{N#zfE穒GQ)E; {͠sUmm9qkQ^ͽ^ 4cmVY@5fb-rzbugBvttT1@k}8uaa￧d( K)oVUsgy. r4 [W=C5AT 0wJ*dՖKRO1 E@EVyᲣCq p =ZI.$ʝ9߬BlooFO__OpIrҸ"jM!Ih7*U YGǦJEHޭK\\\%9ȣ,RPE.HN}gΏ3)P0pUcuYZr.I`-MUVPơ~nYV3*n=e;88(QV8UF٨(:_[[zn['W*q("]&V34ʉ C׽FJ?P߄WX'XiIb@tFt 9fPU\u1;^BLOO,ze9Mz\Nn ,r &ib$!4 K,A2P8Vj$ BGebx>T\&>$QfܜM kTmA6gŊd؊5/Ec6f bƗ iqIh|,ó)ҧ;AJfGe[G+LXɦp88vrLEї6 ccf,].T3U^tb~<~11\*" #4 _~i>|W"02QwK@(} XJy,AXVG3OLϞ=+EX)TaAJzKg;j_B)eЉa^?kj{MCzsH!"TlS2'v?>Z߃~+W 63??ܟ +Œ .YYP%I9YJTzz`ҙH!iNO2TUmB3`"{ {{{ER6z^PZ3QͫEKp^JH@KZ! I*Cp9,!Q3c;Id[f pQ.L%njwT3hM-@*]`h+r9)++'2Bp=[gzm " f lǏ݅r{*Q!"1!8Z$O깣lbU,zS-y2z9𽽽1`\Ϸ`P YvFs0IcU_˅l\@2ˇǡFrSchH` [ED26# W&h=ep&*ʵvD**\Z 0?CڀJU0Z^໾[%P ~ߑ6ڬTx}CѤ 6{mxS׳WKǗ ;SAfYUFr>3)2G;҆sNk N#NX_`%e{r̘}L܊'U0p"@.`zyysI`8C`^*J+t%Z1̒oγfcnn,(r$#WtF0n<%sGGGo[ݕ܁|~~^-:򗿔EӡcxNSkgLmVxD@ozc鍐FP9hHÜʹϟ?dV67DG$?`V̼t/)P˂#J:Ub r*]EQa<Uro,4 .Pң=t:%xP|7 5)(h=.,*@ל>TC鯪3\LNI adUTm*3LU+! ||sxG)ŹNzH2w5٪T{VVVnE`ҦԗԿFoQ0"|)UI IkYRAb$lzϟ?oJ8\rb&e ]]Z[[k~ƴߏYE^__NSO,m@`X奥믿Vuo.?l$atppP`Eonn2aMb˫nĀbإm' /-z5w|},abN,,,OQqog%B"g-%K$]@ߜ}ҞIѤB3ǟ$4-p9t_#NC}N@P:8'70 * CZ(Q2!WTf=WtI؊d9$Rch\9 P T7J"1\= hyg)Qޡ^ s4m ۢ<99^#p3Q.UK(h}{ja ;GcaTAZ7zƩtN$@\VeZvcQg<@gq2rÏW 4HYZZj>|r`@r`blzltgr-PRÀ7g^ڀjR Ɤ!5DbI9/ QܘAo@W_^^͚u~ZpkN&0?)RC^A2=^zJ9wzRe̋2===F hD#C.ŜC.U?áJټꥣ~U>$J rpn7i^'?kU99jK|ns*YN@ %Hgmx3~ A^mJ3#s!(i͕E]tI _tpDMș\ ((.Iì@D" {crjT`r~U{v-s ;6^zMLgZAq l@~,6`1`H DŽCKl r$If??c)@?777&NCW͕_8"!H*O!Uu1i ˯_1jsssm8Vv~v|ゝNmnn0a=,;u ÊtJM|]YYV Q:D{̭X& wqX&Cj26ƶ06ӀDDJG&[XX(Ig{oooV%h666jL-P+KVVjT!\`˜ϕ3L~Y}$\Ԣ$b mi>??ǪcKX\\,*9ޤy&U(r|SÏr?C`"qF[eCIg@Rulѝi/I䢡 sC : wօRsUz(>c]ƮPb,\NѬ2Ui_;ф췛]; 9ER)KZھE,a5Tgl /h9<7OG*h 87` HE-Yz'''|g}pt:ΘmjRΓgIKw vhf-V9&K;Ė15~ ' {@|:BVMh4* p_L=؎DZn`b&Q $Rd_F%pӪcNL+ @p<$gYJÒ#7_ğo-UqB31ID/IX(d~;sϥ*m->>%,rN  y-X׮]k?~,۔r8Dg<+066V4)j2ԫgRDe PUpHQ+M"H:(uL +zY)YE] Z8m'1 0> C34#0AzONNTzgd4tT{{YZ7nܨ)Ν;}E2:X%RCBJFZL=km)FJIfѲvcSQ1OAHLUIR!xSҹ NAǙ;OrUePm#2o߾`ԁ/_@JZ_6$0 V <A-tG)9" @UwwwBz}OIRdlwwBM G+qߏӧvttT T0=\ϖ#3HMlEo=je ه"hqo߾]@K9ߜ"8 壣[a' }ɒ:V9-` sbh:. /ɲL>/6 ٞ7ku ccb6_1|crmlDIq7)>΋gaӝ7###r8YtPA*"T KRԏ3x39-^39[D ֔)f 2#j̬{t̚z1߅Ȥ俩C"Q\`d@UdOM éޓ3W떟?nϞ=(>:`o߾UK ;bmn2xtœ1 NMM7o5 VN}RybOUm9OC q>mu~uhk>|(R^HJ^G#b}ߩGWuqr4jo~#A!cRuYi߿xPmedCyf`sC*,p6;[Yr~ϟ#W#)Ʃ&B!HUN`Lw2d$Ns]f2LY-9EՔ]2f 1YG(()j:YI€p4Ldtszu&^C7\ohM;^ CaCݡh}lcg,O`=ƴ,x>;ܸ& d4t4[qJ]lo:-k׮T"up\j9Iz. Q%پ!(&xdEw%'dt7m(+=;;[L{f%rV֪g moo>)Ȓ$=y$J:'?BV/MIVi^ΣwcV@*eC9(a;'"iq1d;"B?`22Fip$O>=D;>" W/ʡrMrfƒZbrFQ Z7ي`NO(D:nss(+xP<^3cA1)}\뜙TR R*1 룣v޽Yu9dtփu 1؟0 q,v^9$KA&(Cط2r|a>'řC0GV990Ռsg:JZrF7*emN}/:9nAT]NJI^2K]:$< F ґ5Tgq{{JI9/{%Z)ȂЎݭ{-2۷okژd ݽ\=d8R%Qw( 7nhsU?S P2e0AC96N` ze9BZ5>lgIJ[X%L2=!z{3Mt(g'|Ak߾}kO<5gȴ_ :S'E$bqvm \{mf1 M@ j+G{p)8PV1 (OQPq+^60s aFS')k.砰USeU$NɽF9k J@L::l\ ٮ&oKƪ{ϕ)[8"7a38uPXDx?%'Y2Ɖ2N*ɤ:?'AWK2RuڌQEIY Hv`09+ck9),/F;wqr2J4%k͉g~P|t|e&/_l+++eSAkـz(KAXOZ`M`=vIJ,W)@#E%8Ε.X:$MVR5GWy~[ZZ*WIHm| zڵ>~X(1k[4::Z*[pڸlCڷA DUr]C nUbK̃vuF G 2FWU.l]?2{(">}9IK9>>^Q4h`7 v od^9YusKmH/A[rH2Բ$v1ًG{KDopg B[8/{'YF}?weߩOU]ϩw991*5E$F8lGVBr0|Ɲ7?F5\{]fT@9k_wjqz>t*gf=wQ/]͢ڛ7o*+[[XXhKL ӳrVίlO>--w=tKAtcr/NkW:c꥞7t»W{f9A$]ZZj͛75T)d>EMJ0vݶfgg`ޮdC/Ct)黭{ CTն>;y)ooo=TS+AP6ˊ+-'2QEP)E"rf(ל/"UmRy.gcRXߥU51ɓ'Uhs:>>nO<c5j`X35Pig*8H+ЂMW^Ēn"p,#8t9Y5}pš;::*GJb>uX{B=}O`]eBd~LPHDHbQUR )# KIWKjZ@bv>WQLW~ApjYֲ`ҡsu*wS9Kų%k``WOzlIueh<{vA(9^3xW~ a CY €%+hM8&%ٖHKඈ59=Un+sN4W ~zϲ挨ҒZ8ݻW@8<H;rF}J&KpsP7]60 r%m)=YsMM\D!N6Y@ 4gyJM.la GGGqS{[Y}MxaM*fd{`nwwޜ*OB[1띲)cٔr8mlnٛb;()-8_ C8,f3fs }9T$~I7Z) Xx: EZ& cXPq`HTw-d7gϞEO}{{{T+RR[ytt?~\uPV6" <+~zm$j?uӗq/NᵉT?N@DWeMcj"%f`;NzE"GTHKtϔPx'Q!)e@\`]NBO(+t۷oiagϞ7oT z>Bj`3a)G./ۿ A'+^ U r,0ϩ`K ]x )蝩4"΂a!eĜu{.;G-`W :%1JڌVVVnhq1 ބ@WO p'wo b2;a'9I?{>X -پ2A ~Y]J)΅. {g2uJ~| =͛7zt:u(Y[P2l?KFztwUb۪Us'O7oTrkall*!)InN&ˈ;ұ:o$[nׯCfxiO $6ڐlF,ZŚ&(4zh SLў1qFw^v71 bppmllih*]aLAN .--KXP})'PXi\m7MV{ƍ^IT~vvVqmddrzu29S޽[ ,H0%a30?Wr]NAc0d0yBD&[`2$"KXBx<۷+('/dc(H\&H8>>^esg̡#E~zw^[__lŁ BN>C_s7)J4$]a I ^9<<^^;{v cl9 AE[J|}vFWKa<#X=۠hf}U-rИlOgp$µo;wvvV2X9ǥn0]^9[_#2@}jTI:Q|:{W{ŪmF/h988hOR _kȐ2r߿O&c&T˗/dĥ][[U#idbH-fF"kui 3 H1"l/*aZGܦFuV[]]I ԣ6* vd$]5s8N]T0o_::*4 VH&c`D. 6#E!!oɬeO9F5mĖe KWH 4scc=d1j<ǂ.XsJrgN=+2Y{Q}}!h%/s522PgR8(OͅoKKK* 0ُ.k `K)ǏHf3(!WA{677!tp$ccc%RNiPKer:wܗtw(%F2))S1n=pq |2M6 ӧ}67 9ŸwƝ e[8%JNldmHf]G%?<<\}މCKSr122R33Ss200P}RIgK)gUƛ:cccm||F΅yf)s )ў~Zk>Þe *fYsn+)5ʂ0_,s>\\'" Ke Q&5=x5==677)](2`jR3L---U4ψ%BV-[.~M-$3HI Ѣ{کTwV6&ۣG<@_?ŞS#rRFpA΂h2 3_i jV l'lF0v+sdgi5:ڃjFG#s~sssmss3"!4E x7Ù!St'Lq#j݂0zP3O aS/-p5h}it!Hk9H%Gj({mkkk}h'P󵃯D\v=u3]{S3Xz$s*3&$YWElGv޽>( ٳ`q OJՅd&F'Y$s f2ۿ:slf])h㴱eDŽ3CšuOk rW7YNY4" muuSς]]d؟W-.',,, λ9hLX?zzϟ?W֬Zȵ?>ʙaٗN>+NmgO  eP=77Wh&]WECwRm+jy3#=44_9.EOI*S!%'0{T-fΙ2jǥPlHOfO,#Z"T=c􂁊e"2dl9)byoz+[xYCqd !NAruuX.S,D0>XR?kRUǹ= 9cY\JmH 6.3E0S["e5"W:#}! 9(TNApr@0w T6'}q 'mv)9b73zn.l_[`3dQPmcc&hu%R+C%$DIJ-"-mpc͛%4-2Agm<@ 9!.NS=rĈCv$F\ׯ:zc_^^NӇ|t ~{2Ư2R+dBQ0& 2Dl¾9!Тl(4'Z~%cz(-'dD&;.I[^^.RX EMdNԕ/j[JOPgDHQwQmgGk=EPuJAkrz\ব?fOu2=鞛 UPs(ֵC] /r!phzudbc]ޔt2\ C'ѣ666lqZhkWjva*@< P4S}hݫ+rpFIlһ)^tCK1J]mQ}L9 5Ma5hr5IM2!_{`S<ͻqFE@t*A?22ҶsÔ.=|JQZjO< s~=5rYJ`j1}$F255vvvi*LIO=|Egfhh,3xbFTaȱ8.j*^ر[XXjͪA3E:)i IDATYm sBFbldi\$TAƃ xTr fN(A1M`Prs~*b1u!PYJBʴSFQCmE3Qpud4>zsF_$S,3J\:nu&τQ -qyymnn/;N󄙌%hY`x* r&J2!Hڮ#^mqMݖ 9Q)V;6kA9eN&DI@NNNbC5eB*D?5i b;i]+oB ɓ'eV/%DD ormCB6PS*zo߾ ݥ 766V̡ih @~]$+j\v޽"9 5'^.;%2&pf9Oы*K8>,sL-5keY`8uy;0ݻ⢜F:^ 8l|[[[~#r3d&X/2RZ$5F}\ ˚i*f`bUS E lIX2?n('LTAΣxe[X~#e(H{J*% IObH*TL'K(&g(ccR,]:16{y䭵JAxaax3}:gř䴸$qaډ$:Aԁc!nec+ 0r6^W7ā"촋I:~=AlsP&r EjX9:揅cdX.L waN^ɹwxxXEKanD@fjeq;88XL9ث ]3>Õڿ55A$C.8VƬ1ޙI%[ha,6X"SABL7,kJ}w%ER°ƷlVp l@ W 8tLLAQ~MNNL`q{,>Uߒy\̤D>{ ǩAfۖ<dža'dLtuu7tAcf\}RϖCĹ!>lic)333H-6ǡ&SP授$[v',? c ^իٕ CZӕ};N_dGGG[-4S5#EbT59י:S ׯ_ AYdB,:#e&Ur1.e6f|<ԇ\pNXfmTC N54" O-($`W~2vS> lJQliIZLiqqzU>{>Y[n"p8x 20Ft[?uve3&,}md֮1QEj9xB Cr4gb02 Lmmm:dt:Xw1ehbW㞜G]\60c9^H Wy0 SMbx43Vh (84 X dA:kjX`1 e ӄ5| bu$1X$O@wvv4e٧maammm ^Sϝ;Kv&G!8"%M>Tyq̌v @1ؒ"/P aФÙ Cfi%lc`7tsB(e"ѧO BMw9@v)[BLTcyZoޱņFグcfju1>#яjI4a$wwwNiahcܥऴ d*QF,-̋666V,'6rlbȹEӳUS9/{&Ҷ+sje g7Ꟈgq/A˽V}`}Ԛ:###>?{< 0>> 4 MwnCřnQ;<<e+n.HT>ZsﶳS thhJNUwwwpn׮]+65{JZw{~~Ook׮n[U󝜜,.#wvv .j333}Uuф~:N%SoڵkR)_Q 7Q*_uxx@:g"(\!1)'PJ}ClH'ESrQ"#AyZQH0d+ c,ׯE2K'Ĩx9VơɌ]@(K kmZhE5##,$ AO<)A{] i@qN9yd8fKȲ.;Ryk&;652SK:G9L,`:jAk~ƍb)e'b[i5p} ?8 7"ҷcv̹"ހ\907ol>lnrmw(b۩ϝC\03mBݦL")r{lQi?C1n)ZPD#! {xX_uaw ClW;#LVLudk$–! xc~W lEI`-l D_ΉњIߥf[r-= XsNtRsR:1Å)>ྜx6A SLLL{0 eS: P c|<9ͱp|taQ57OE<  s1z+kaH@ ҝLb)ɚ~P{jSC_h4KYÇ 9)!+X3{3֏G[@B/jl DH^D2F^&S=oU |ǜ}Pn֑#!cr#\7߳̓,(P|ekkku8SIB,bsqqz".!+k<Z >~F29Fќd*Is>/c`!"*P=ӲTCCsYd63,m]{H5+elϕ:8ou\$O2@й7Ks"(zdL$P sT 8lQ4"F0:KӶ7[WvXw^ب~Im0ŔCAh---U;K=Gze ^ !H_mjAk-0Ai3(k9`])RmIWJkĿ"GCʮd =Td'%5XD0[tp[]]MMM8QA'8E-.. 3qY0ctwΝۂ!G6v2:НT_B?Ւ%kT:)} Y__%O}Paɩ VjH/–9<(տkU?<<< ;k֕qƴ4鞜APٴYu鴃GUtQ|fb2_ϟ?W }>\-h(D{mL=33Ո8iM HVPѨKlͬS*1[+)F})OXk):`IkׯTo ޟ7oޔ "6F߼ySw)\fZ${׮]k333d\ժj>ONRНHE-Ujl k6^MLL ^OUj'CShnqeS`ddu:600P#!}S`E)brrMLLT{v/_V+?<>^>FG(SIX6g}ʖ]B,SmPhECq+0X^ ^Fh]]g=dQ9LeOwΓ>i*CǑ̹2cQMjezg9ّ'~|^>z E FxZaX9qL v'uc29S!Ey mvg@}ergCFnqJ1)5=x v"-e?B\|~?]aGե kPıY0??_fs<ց:18<<\2R&0D4d&je2Bٳf OʖWvCܠ.-K,U4Bje mq1eΌV)cI4 Y V%+|Q˩=Y]39l9H%3] 0$Q۳پ߷Hyyks<%#mۛ7o%⦲&cB ,eeϕKp"-kHaa[ Q S,YNd*bO_A_d`&0c{>9b7omMx P..E{D|{T\8ED5$fe5A26hB{@.SQzr 0<gtgt̺'l%1.z_,pA`tl/).1Jc A>EKN Hp@-JE,*|둑/#m eƣ-ӺVN1=&''fߐuGPE$FA@ ,Ynggo&3;gʙVk2=+x^%  8!$,(?2VCqRInFbT{Ϙϐ->]]lW۷đoÇl?C]R'=C8Vف*"곳v6440zbeg<>ђE$i[XΊh @!%W" \duU=D }gr&9C@&d~gَ IDAT@CfN0Vlt۷ -駟گZi IВкn*qmkk˭R I`@NGW^\\ͰN_~-5e82?99)w*U)xBZSܣ@ ]N_B^1X.@4 udܛCY6$!aȎ\$SU9h9@n64*NN&lǜ0XYFD`Ԫ0 9GY% "&0s6N.*$K6q(rK-KH 5H`qp eI`̝=#QSG1csRGDs~䄀( "9!g9.}`l,K:MRGme{&}ׯ_ӧO[ۭM\Nԫb$@!߿o?n޽薃 PV{yf9)aݭ}g۷Z'ڃ~N{b_}nNOOn!.a`ԳOCwR2O<&N q3??޽{WF;3sssjnG;9= Sȶ )Rf4WWWa!f:'! JjőJt?w.\^^r$}q>}*NJ_j!ɞ[uls1eE & 1beTrN]>|>|P,P+C;CAt:p$AIƯe2A ڪ[VOd=2r]F45up$ 8^]11 *A`TLy;`3"zP}gzx>5 rr9ٽI1Jս@bt9KQ)度v6ȼVuW܂йo߶޺nOuv)I͛mqqz3RyU^+.&ջw[kp1vu6??_qxѠ!, ɓv||޿_ YXXA/u{i@҉҂,Dltꎤׯ_J_CLhMhVO8DeĘ@@2aΉ^޾}ۧ rY=sssձ p?==me_8ujH޽{uNf 5ԋV///Q3Cne+7p*3v||7l=60fww߿M!WAaNrF8,ujT###訴777^d-A$PxxxXl"#DMSTXXX(訾ä&˵!h: lL+f$#GAL,M(^ rb\jZv1+9';LLLTsp]\\,~M]AHJxznPN>͒ŧOvp0udjURs 2`nGGG_~)P)zȲ)d6Y`[]]WBV2%J)C*}'''*9INҐDdZCpk_R$>(ua<Cjy)qeZ>s> euzzۿ[ QCLfiҒELg Ԃ%lwi[[[}#鴽[R?+7M2Jz0k2b55G|F)܋S,MQ}-p~!l#H511Qr35R2'n8%D4+hpsb[iE@~]LIČsSDL%C>}d1WY򯬬TMٰtsiAz(8tttyZD[V"^\\߷ 9ެBؓ ?B<22AE[k}(&=y 3K3333/$BR.RS8'j hϋ/JDbppuݶ] 6e l.h 0.GNYz%^:4!0mccS;39ٜ.Eee!͗m~~/_JeΈdAcrLn*+}󩾵מ={ֺnt)v/v:oc3"Nr8 p2YXlVΡZq5>N.2$,e25wj,C/[fNj] D a&]dPHOmKJ]t`Y%ℰSKЭˣ2ΌrE2|.OSFQ,D~R\LkvТ |D>\#OgrDVB GGGP.A$k8{Qt:KY;,C>rXֲ>d&/l}.//۷oxΝ 0+ǹIr@g Deܞ>}vvvڏ?ضk]:{uAىȐdlPf8"9=h{QD]ϟ)Ռ]<DH^֝a0Ȳe_jL z~z=G=ki]2gEŚzooo)4 ,?^R`{md,0ξe< d}}R}B/Yl?uge8S J"Έ lx0޾}u"hH;F AM+[Rgggn:U&1*y?n[gTSR6~+cqf9; uv @jg'̧ sPJIS Q[NB3>dλ^i^Qe un޼>~X[$PR!kvvP0>6011qiQǜ177f٠gkRE*'OE]jٿu:md+?c]Lycc}0 E+D Ɵ E59mgg5g0uuVk}uUGGGǏH0)=zT699Y jAX Y;>>n[[[/@خ_^5I|m}}%c~xx7~BZJ K1Eo,B{nl<(I@9mm^H2 MµkӧO1>zez3G!=kN---!k[[[5tH8>>nϞ=k5ZF7 ͛DzuYW>::dѣmmm>n7\Z,===ݞ|P?tjHz v̆awFsDz9,(,//W0w޽vvvJ :>{?H*a! ғ'!P{VV&t:˶Sޜݻz?19;ݻU6Bd*`!(dj%1thǹR~!Y-,,K0 9M}מ5Ω'SwA3b!k4?c6FR8jUSSSǏmmm"-89Zry#rǯZkMI:ɓ6<ۇr<0P \^^nwޭ LRF֭[f!.>Y> 6??J4;+$SݻOS[XX(=fz`+x駟FMA{a{, H*w0T}μ]XX(n%l\'088޽JC>Jo)" ~0:NJq, fHns]%kPXT !Ҥ}Q]Ω:7ʬR ?ŎK1EV8<}jwmsssmcc{5,ACF63frff~a̶OOmuu KNፁ>==EH.D t+Fɘ?}vwwX,(O?vuuꤾ[F۷o+OؕänfOez :2du(v;;;c=9tK]. tLT "9׮]9mooᅪK1H4mݿBj6#mc(0x]\\ׯ_W\ n۞?^z[^^n U3Edznu(뻏H[YYlmn^xQ-_+p}FFFV߿omii#`ɜ1hr iZKt)V% dӞ(BJ%ErzgV( SwOWd6 aaRQmCnks<^8hw`z?~,/7n(^W&bYψ_Z={Vr9TZC]Us4 __ԟhxPHV9t[Ĭޥy'NgggPpRۻw DzNS&/_l?.8͹I%pL&9Yimm_0|뜪aP F/_?/^[n>TbJ tL8WfwN@/_l7ol>|(.uH-dȇ3}zzZ"$/5$ˤֶ>⫃#I$G6 0Il)1<-w[[[ & 9YPJrraC]>55Gn\^^'ONVVV*3_meeζAtvxxX~fö[F(t??URLMBسɶZ_gz_ԾAijy2i$"NH6n]TZbdirnˢiY"gl"Եkf]u;33Sm,֌}g0!SӂugϞJIYݾ eñz۝;w1$ǏW7AF .g:|ÙR.C `~vs-ᕤg73TP_#;v)jsNE+i'5mcc).qڏW}sOVj7u٢ryyٞ>}?U`y,8W_~677W,m >Og @%2֍c5aﭶB˿KߤuN9;yMfY[[l+E_^`@3ː\ؑIgH3C...jRH fxpp~bVvAƸ<]t:2tJϟ?/e;f)X#[u1?^$,{X t@[ X9E,)Qg al, Ȇ'>Iv۟*)U>d΋/Ƕ˄9N R^]Tf {uziG/v>kKwee={찠JŔ/g@YyEDj%|pp'gRJF1҆_&ƫrUU,b"YUjHuER#˂` c UhF IDAT8;@9!FTuΝ'#VBHʾw)^T/EJ*633cr$믿 Q{nB\|$͹}Dxd'pVb s"kvQf>ni]&b́~TJ|p2#-Sgw޵9*gE􀌨",,,!PEv $)z1}|k9::>|Pڵkmoosjs.sҖ`R] 611QdWcph3>;88޽{קFۚI dOǁ_9J=vUf-4ӧOE>-RW>}?ՊE3Hr9Pyfrr-~yp-&gg%mӟ/Ia [beݲo߾YlԺW)vZۓ+ Iַ$_Id2FrXuaIZjIeYs=Bh{i#V3v ЁYܥ젾5 g~Tϲ96ie5D%uu^AZ˗uDd;=:@``[nKNC?[w\e $$$YBPr:]Ua}uՙݮ4O IzvlG8}ﰇ^ .k8>zj| =(ecƙ~u;*YlllDB9#gP4hŸ?^О3eT~3ٔ[^^PL-f:2݄8߷W^ M*a[wP{HxvqqQYsn1"b_+e @BUjX_S#^WAG[TJZ2yBU&DzNS ү˗r j(F\[[k[lns}m_nիWEP:ߐ޽{;Aj~ɓ'mkkGd߻w83544׿gsvvV%-úyqbԤ@QQ`Ǖ3###HVK6jMX9=~tM>9.ErŶ^*8e4Ql9~Dkd^ 5ESb(R>}Q {?NOORz#ds( "pFCƚӤZߥ 8l5sgR{Akmnn='ިnw.}Lk}|{^†^Leơ'I(RT9)[(9??o^YLgA0G/JU;ύ=f$,*gA3Ip:Ȓs*^-FqNfrޒDk Ƥh5p!Ap*\ A)5A3&ZBqΝ4TID*I.gbY~HНGܻw|ڣ$^t!^j~rjKk xP%Js7&,bd6;66VvERk_^xQB& ԩ[ng.6s>0A/hb!e)](:>HKclNV*z9DQhEasFOBF~Z_N I~A0!狔&#sSÛSP0Ul8M)](xԵnfu5j*WFIkE {Dkkkt1 1}L Gv~\rZE$9)PD81S3ǐ9W))VK2Ihhۭ5+բAD%Ɖj8@8Y}Ow)CE&&&R_GFFD"ؐ9쓬KA~pΝ )qnnpw:!Hg/gOx(G>xhaR&2233S,!jmoo.N`ΑvWIիWNRbN6VJ?~X?*0ޗ$cN~sڎ\fvyzzrA! QB:^_!:c HԢQNj>N@-%{Uj P.l=beZ\l{)d5`˲A9ԜĒ-A`3#Fqʐ)2P9̙`H`#@Y_=PS.>yg[(%D&Lҋ[ٯuSbt@+I05%}k8( n( MأQ&U)(_s||ul}Yt4XClooWνn?n}bxZ3+6#Ix/l%O$\!|@6!\k<Ϟ?!$je&gx||22}Y MQ^l}EdDzjtl'a 8*_YIlt:Nc - l E?>>^ЧC||F1A.a rdCwI#C8{VSX|}`Df0W2e`P;+X' xx@ȳ hȄ&kM|MyzzZ$nuGBp ?x,hQB޽+G܌UsXңNÇNLIPٷ>'mHr'5[p,"FOvzzAnГmssȐw;wZiWWW%&izϤb9:Nkt:; Y%{|``}}i`L{;ۭ~ȍ轧wJ]{65e>00n|:" 'S:9C\3LvÌՑ)|/Ϡ!ԛ,J`,d1d* `duD6I>II䪖BԵ,"x)ֳa\WN@yFNkUlFڟ~CF h-u9p(>!ZqtMRKt8YȖ:{ri{nޮ=h.f@87Ќ|.2XWIFS:ݻW sH. 㒙gN~r;޼y2S@3#+9C8[c z=}H .zB_ëtjҗW2bsySc^ SgC?`.3^HgӧO%i_Q2khR2e9Cu\3(6(Gr<`^pKy g!vAn,ci9mQ$չI"t?0U7rDLI~8?M64Fš3)4~m5U=3@fs4lLّZaDSLbg `Dq)E([1zTQ^d[,vz.Y(%.)͙);9ΰ2ixjgXn7w)looecg~fI6!G)&" 3L[q a}f|333}b&Ah^FM$N+d 94ܖ5Ff|}OX U{}m{{u::N PgڟUuP2Z{)S99cSSSmwwZAS/ P>`pOZko~$QrVz_WDN 1,򲝝?FJmH쀀8?3LܚfwҺn C$Z!ՙwk^>" kWʾ_,3::Z iM?/)Blܽ{7>|PJ`D 0RlGFF 2)i X/+9]d*V[KYm֌s}Fj P$D޲!ǝA̬ƽTN>JV~2Ps2ф賖+nxsjA[b%do`M-EufȌd[__o%l!VB?YբfK%J/mbBmg^ukkslf( G'*ʂ!5٧;wt:%\O uΝzWzax+:ym k_[uhamh F:a/|=p&`_Ը@1RASM9Kqz.H-mjWJ#2aڝ0y& ?)k}AD}ٺ.MdKO" `=pt՜@j[f͛7U~]:Ç2 eo,^0gK{1<*(ګ0r]so?337٧Tt3*Nl5K=Y=YYA2BEjˬ%&a33{~~^H|_I(%yA,7sB -=XN~l8GO΂L%HO/YI8d(٭D~ kSP*BN.JZ܇)pfML4m<+eʉ7(pv @dlt$%3Fa|.GGGA#I}{l ۇxvַ[ْm)VG^]dĚNsr23٤n!8gzK'<xE ,xd2d̊X wL` p4ePp4VA駟*0IC%INt)rO->e.Y 1x prωsd$k^&W0?~d1T@wԐL;20̳=Yq{2OqU/eM w 'pPoO0shL}܃jH{iY/I!#&l;l}A gEf$3x.a#D..3/, (H%rxxX{5)||||ekY`A`q7 ^ JY1$XS ɃD;ylgYvnjmY̾/0xHfDDiX3*R'l׬dd+:tvqLZHl8P% M" td5ԊmqQ1Ldl3xd?IC&! ~ A$ۦrNپqJ.VD68Pߟ/Όg >=AdIoIHcgg`>3x}:>~ئZ;~h1l!Il۷Rz9QN("'>XJ~VYNB+R5p)q,Z[[;PJkd[Prf25CΛc GݻJ='7dO?ݻ2|"$A"BoӐBhu2̾L`se.6f愞1.<#D#k#pvvVQ#4R2dGgW$k,ppS ]}d rv};z}z>[roDD޽{GR!Tri, A~v:{krrY={߿߶˗/Y F nff sNb'9&!JlR+sACF,1<;9P#Q;f\4iƄV_%bDǏmggMNNOV a6~ζ/o r4X)lw]_> "5- ڪ{uxj|޽k5 V֟5Rvmgg/Wθ9RqqqDyR aFzv^JO>moVFE2LjxoWO vԌ={Iv p.PP+f8y$m^sD]0LhZϞ90iy0؞ݻwɓ'mssfugY[ZZjSSSKY qD=!kL=ٺD(H=`f\Λ4~3AhLf>@18bFg: %3G'fpVVVtSdvkADmRGsq2k.#L`KS%@MD0pIRDSwƃGjM\!;g$Xl>nuF{A-ᝓ^g㺅BrQ}~Q%!yO"Ԃ|dk'MNN>e9H$LˀS>Zo9i7AUA;`8 Yj&7댨!#2J.;d `) ݻjAJ.;iCjzv <``&gM"Hga6?Y \sDerЄ?v||FFFP_hrj`Z'OT{X[-d)nJc898ÇBknX0 2$NW6/d }}):99)6%H1dיN`2fgg^}lL2mMMMF՞yA`j} @ejcEUI8D`  GϘX%|\N\__g@f䡒988X=iŪMΐ팎ΞO,#TA:;;C胂eYOͬF&&'p2V7IRB#4х9o߾,Q7f~F1=*l-Nة)!٣: n6Rv@) Lad"B Pѧg3shh9\}j8!Hg y쟠GkǏQ{OhTc3 ԐLI!"pqA@GϡN d:8[pAiB' *}zuS܄wשKbTSOMž[C@/T7UJt%Y%"UH:"F NI26#OW6+;dٗ3t:5S fIUdW湩H(IDKm `F/ C@ uHik ߂2u```)'f?pAjΠ9 ƒR/թ9! % R1)jMiC-..߂3Ѓ%8::Z_]VmA93wIc;<<\qfdZVoV")o[a }#duuʬOg߅g P9 <d~S9PJA"$q 77#TdRxDٛRF/ra zAS 7o*Mb~fft_ X(exwx^pN8mANQ5D,.hwZSZh^,XQ 2zD:S֡^&$a8yjN wKBSL/W3>Zh`Q̓`9|.F) 9SsА^8ܔM)~||\۷o f∈idȯ"w ԩտ T;bΥB͏Lx˶Qp8N鴱sdbδs+s23huo`P|T{UAвB8 yff`:Z^BN&lۭl +[c hU rzz:Rru}gmgg\Hbccc%cD(P8l9ѣoUKA WN +8A/&3"Bʅ.//W$tvݪq˼JRlpX`Ư@܁g7)/3P .{ ԜDu:u޽['eVofOسwgDR3H#666VΌ -)9),,,TѨw{2deζ O+[{n  8K( G @jP|jzZa@ԼFss*ӻj?nQ?qFWF{ Y"XB) F((WH{^zmgg` AAL`[YY }$*1-si%9sH/Ԥ2RJ5 *q_uXSsaajݻ ^q8sJ`s9-YJ|l 2'244T^sG)\$pwxxvr֭< 2]_o*X!Pd%NeaT*-zmk0fA]mmZN vG~o޼CDgRcqNOO+( hl@YeWYc-ǚx> 3"?v~Yhqqr|(zzzk9"1qqqў>}Z)\/؄/}8\ɓ|e9TJjr79 ]V޺uOld,~ێK $59}VVVbwF&@{72} {_@뷗]wpz|M73=;;kC} >$T(>|hN?_ljf/ă>0psfDcgn~P1"J޽{mfftc&W t7kormoo2Fh>HjWSUcA %3^C i6CzppL>kzz$P3TFTK$┶겥-,,A̶!YYYo7gd̑g"5No{{(f4&\E>; A,|(%ۥ=ɀ&[5Y8)=slttTFGGfwPh r p aWF90_~e!fvm CXۅyr8pٰ?s2O>?uRB{vvVWWk58?j!y,d5P%Tʱʼ-Цlnni`[sTT=88>|XWPشrX b*25e* 'RӲirh9<~||yM+svr0s옰ΡA'uppP댨fv1fHYh噚!ŕE?x}[YY{mq`Rv(yG2Md͙Je-Kw:v =΢IUC W|;w<0k-83CZ6pՖxrqqQj-Y!j}Ǐ?.zrm(MH9p)@ $^*0"YfVa / S81Zvww+2gW|7mgg>moo$ mccFA4j썬 SΝ;ŋEƐѫ߾}޿`Bccc503p쓓_`fu 1 j5؞"wimiiRݻd=gDuWw@9S٧Ju@Ɠ/Ap/HC;o߾mkkk}$03TK 'c_zU(>믿.Ra{in3n@Dxglmn{M%Y )"B@d^uOܽ{#{ Rmvvjha.eWr0l!ݹ׽p.%5Tt:[9mllz+s%;^˒TbRPjcc,~΋9WL ?9wSæ+:cрdLD167+D2%5I XTBjPsql,Uϩ?":NkO>_}"O>DwppPm+2NAg:s-X :W˗/ۛ7o`Oll:Eb3p,Z-SqcLáQꣵ2_Ò%*`"wttJmN7~<`DB>|ОBYB2{oeGAB(Xm`aaKu.fP,W";dErde~bBڌK0P[\\ϺskrJDs )9zzzZ49b1V ;??o;0,OvtS# SD<8H?׃t~/`@2痗L79½677lAp[^^)X Z'cw||VWWz'A.ح>8077~駶W_J1~߶݂1iZ)U?!Yj1?C8o? +"9%e5I?OH/YM\joUࠂZ2ugh?==m/ҶJȀ ps 7yyߌkRX[G2qwݙRC3L@~?~fggbRT ,٩9mccFC{nAZı0$A=M!#(I%(%<Ae{y _]_U( RKROY-([yP?GMhu:-TJ[eQB1Rc޹` aF nN_t:mggoqttTg!1eG>|^xQ1 5 as'8wimkk/H.//;whB=jTij9o뵽633S &6]'C"Ag%&.I^" D5))??c'cSK]L0o]vQ4GGGӧO=|/g3'|Ai@.a[6>Ar' }4{*2_:) '/_BO$@16A){z4ݻwﶍ8&bH C`i->}&mNxHbS`EEEV)lIV'Oby3 p~ה v (\oڛ7o@rδu2myyWʐPORս{jڌ GP.JŴS˘] uVZPvrrҾ͛}(ja->@Co/^蓶ĪMplJ'OXHFQ0 &t:>(ڻ[g#ev: AQv8.A2:Ij֒{Z+|9|ߙ?+hvU9krranmmǏ﷝eH\@=gLށ`G)l >A7>2뛁X^i1*2lRr__ʎ DQ~p_d2^WhI)E2?؈Y=d$g5=$eYr"DAס+g܄R܃rqT'Z6mWE,SSSUUhFDzxxاRcjO<8): IDAT.+1>S 5綷0Ԭ9݌]5xj-oVQi9 8$ώ_n۶&Ƹ$z(V:Ǐ Z hvlqA}Lg@155վIx3vJeKh~m{}ڏ{%;ARC*1D( Fd> ޽{mkkfg3n^ݻw|+_04F9 ; FX+ϻDܓ'Oڛ7o9bw:GBİL5Z֟"q~4J B\___zh\]t ^YY){2P~eP䀰wR655վ꫒o% d;>usSPr)4|ΝiA@sC{\'sIEV"219R⸽te2XPf<~epڠ iQ.13<<_|>|vvv F- H2p96s߾}=y&d"%b7fbqxx؆^C7.9&?2kwk###_D1Ƭ >2@a~ÇT(X@Ѐ$I0OOmyy՛,ӓ{uIF8k:dk|-//Ǐv|@G'b,k|M-"֒U,O}Wn>|X,Hf(aAD/5\"U i|YiI@\Hh_wmggjj {3A$>o.]f7_]0/el lݻw۷~ZkmgglAJ~UsC?r<2Y[,@CR~@ӧOmff?s<#\p0Z8KDQ;;;mccu::wݟ6;;۾zUԕa$`5S`] l!vzz^zպno 899)g4톐㶰PH½^+ђᗗmrrTH#]6#@+`|tzzڦ[+|-P؆dG:d`Ocоl~(& D!ŁMfݻw9.[Z׫~alI}I CnAz˗/Q='8^Ws>n/_Y7w0Gjj '(+$@kC0v^ϟW"#vDL)Cp}[eHf(RkzZ1@u9z9ikkkmttzT5Zǝb"SŜ;ϕߌLI *X̓@!"Ό^Z?wv{||VU633Smm̊xsuug}VJLdez666~ÇR`w"Z˰!oKnbbmmm͛vΝ~ XǏm}}O7g:T42ţ{?*-<Z܁n۶kf22(I?p:[l333%% Rݭ֝WK@i )>r4<;mZJ:w r[ /23PsssNMM B6J2TN2|Ҁ"VyZkᆱѣGŋUH>yosW;Ƞ'sQ} b9x"G70 4?gB;z@i19D\YY[nU$3YklNҩvuuUztt-..V+f؃О?^j̠~jҧ~( KSSSmww/#N =333m{{---Uիj2DA)O˗%+i >~l!Pjsssm{{MOOׯΫs`;Ftcc f+;%H3=f˒$@i(8䤲[x84œLYÇ"jQg2^>/#y4*+&AezfАRHP Pc fL'R"OZ>G Q0܈lD dX$=`&A%ȍ.,L"oך'gɖS33"qGfrҕ5 !j@ B`@dzu Ha ?OIK~D+9\`qEA&b-9^>P6cg/.nTl% "/$ u&''N_^"F lPlSs633Ӷu)&h~hSvvvZm?~,}lΝ;mcco_+pCܸ#/mmm[p;Kf>{EUzN$ T蟬]5!:6SE" A}/h1*$YC;KJT J@0^=22SA9a6<',A :F|?v+Z+N<?Y[ϡS2'@m;%L.L?Z`kX[skRl>bUj:ҹ!+莸i<2D[__/NIAp͉CQ#ʂh-Ίyzzo:H\.%pToݺUdD﷩"#r+_ 2|!I %%I̭[سL24a:KȀfRe0/\f %r IePIֵbbbr ՆSE-(˨g}Z1K+E9aEf4Hj%A52)mz0f*h>LmVD7[SrxQyV R|z!3r$ R ')<9.N Rwͬ6`!973afٗynmmڃz*Ÿ' >C mvv2ݬRv&) Wi` SACnF$?6??߮K_VfYqE!(9 (dG؜nӡR1ODH'8T.ɠ` $RJ1#SY]]λKTv!)@DAt988i[H;e"nއm$j[RΤSya3Okdf1 ܻwYqiju'8bRrC-qmm ,kڂ4Gg¦zMd ˞[:g@Zr=-uo8s <<،=çT]yJT|3Ri X׬f/ "p.9afRNU)3ȶLVr1%fȑ Ks2)Es|^a?x`qAZr,e0V2~N9GUKGBmeep-2 Najj4΂A ;R4찐]3{@$,ܔ ݂mw[K.r;<[3!d`O #' 9ׯpd"`^C $Luz/IFvahl+΂`M,CVPZ0LA\YL JzJ}b<Hc=FGGpjVoDY[Nh 8 Ѡ\f/1W01Ѿ& VcXZZjggge3%|F(C9΍ G12s8!La4g 4F9[b4Z˓- 2(G6!Xx ~&ٛioܹSn 0^R|qqZ&@ʱd׻XDP嚻+Sa iTmi>C _'y浧Rg΄nq{&&&*<4+nr aO6B#c !B 2UFGGI=99YCL$dzz2>Q%?_u{E{ XOj2|gg(!w3Z)TIhbb9c'2H{aZө?P`nKlZxP5Sic뜍?g`b!Y^UVZg8U0Yh1*䳰7etmzEE~p'[NNN*ڹϱ]M֞N@o5Qfԓ+;a՜@8N # [}YwN֫'LdYED}2^aN\͠9<)+ FH;=\PU*q̞+ћ+v(CSJ jg)quS8#p@$! ]Ltm/}١0~ `ֲeN@a~ƣb޽[}x gȘS"QPg]0[n;?NBۜR-p|AFLi߿_S/B  dSs{./1#B:Spo9@{ (Xgggڤ~@VjSsddT܀`"{{#J\k5 I. I$"f['ZB!rt2XX"pV:W #IN%8$xrz,bSs0|3{IY489DCbZР/[Vq٪#Kx2GADDH9XdǯO=3e8V]zm"eNgttmnn(cc\Q"22`L$Tٳ٠AwnQyWK'[1Pe`|7#j=H6ySTrrTr@Iz*%ȝl=̽l_ ,W k]pqR{877W# iF̳SVU.H~mk۷4MLL]4()yOwBICbq{]i4Ge(IqGU?eRL02!炏D6\]AFjə%Z/u,3Pj9\ڣGpKJ͈R19. drJ=k{̐1j `M6]D=[$VVVf5- +q@f$QpJnmnn*I+Cmgq_d`D>\lk-KC`oV_MT -yrAa;Ξs/xuj$1^>_ONNZө<ֲ5f-9+IYwqx>b&͛7`;{9۷8>|藱o8-D;@l 󘇆 Im;;;mllOB|B}&3(Ek}u:W-B F7FYիWWLdK:N1˙K)MYO2600P]5 4!]rv$laV IDAT%k|䜫P$!IcONqjZɢ Do6AQߠdΒa)LR}$l]0L햐#&`[ZZ#۲8GPLtr<#ɓ WONF( s@3vSFFϪ (XS@Hq"?NK>dDP =3k9{3" 0ó*1Ԟv *Xj ]sH"hMn"P(gÇ}kCr1)c#嚃)R6пw]tpY^l!H(L MX1TSA^dEr73,;$kpSMg@8hjzxРBG ytJhC )y0;D]S nH? kv""E.:Ari&^&H\͞ Z0yyi/ϒ`1FJphIbO2F9!)KHEO/Z[[+"XC-U8Ep*Ɲ%zw8vPbfě,Z 9GА=(sShoo2ÇEJ/XcH.&~@sA.uU܃x2y`=)=ҩVPcSg04bֻ,Z&rflX&u5*cjU%%&AcΡ!U]J=Ȃ0H?1&X2cjލ̳'ͤ:Z2e_3!`@d c2$'S xiEbݻmJiwoS3,Rfz޽ի9uxxX>̦*%Q52fpd 'ІdNL@qCZө@/zLfffpuR";TVf;T/ØQ.w%CW&$JeU&Lj^\nkk "vE9u1s8VD{z[B0()0ئ12lT#\wDD ;yϞ%Z;D< d#YޥOM}@#Ү2\9$ žO']CCCmii!Q ho*Bk?$Ow)r`(@l^\\^QHe XʹsMGё@K9oro E=>;;knZҜ~>[N}C:󻻻wRG+VB#6T0sҡ;;;mzzO{:Z?*,f]]}߄8)A"S@VK|Q]rWcΥ':uS}dʖ~)qӶ666j* (;r"MqiMIR24I9;׳@B}#Лler \l]9 4IiT`@[YY%[n/88粧[n-OxsF.X{"1;EgV7~ޫmVcq'tCIrX`͛ŀݟ4%5"g3=LV=pYY>'$gom/^F6Y F|Ak@c$+ߞC>y˶d˲=mhhmoo^׶600vww5md[9&Ӏ ,Oe5ɝ`muwÇ}譿v5,7Ep᩿@n/_?|&ҡR F~_fӒ8߷ǏRWSKi=()ɨ@Ao߾zCǙBN";%1è9 kÚ]J9Xwm^ GT6$!DP%9E;d$ɨy8)SʞdNi%aǪLk9Do6Xk}mmf4JRS}WB4G`+ˁ0}QuD5 lRyu{TRFA:@V:9GtmV-ɀ>ށ̉K6<<^xQGb 9P"9/˛b".?Նelj ScG]wɲKqPQAċoHrww]^^.Qv ,٥V>=D!!Zw|{Ç[AdD *~9w42G0 س+ zzC&<5Dف{=s3"rI D|iGs޽VwM}9F$+xSp=gZ,'; fͩF)@rlɤE"%'YN 8eY&Y*16gVT gPWSMG"FNW]51ӌ@"Sc*^7^^չ[ZWLbTgS6ӲEI6"ܹs"F Nd ]K(VЂhs?8Q z^7H;W3U@.d/j9sf6is1I:Y)=~NEΗB"Р- |,9#*_|Yő/}I~OkՑn߾]";dSJhDJ&[)F3}^Wґx4թi6+q#9rj5گZ/K% `; P0qI2xLc"7"t{y;77W;w(T*"UK8-P*j35E}'N4iZCle2QMH7ד=Tr;88(ͨgvڜI) vB|]RA`(8bs%hqy񯆯J#zrrW$D&ɖ'I0ugsCh8 R!@ɩ t%0*offWtvv D0꾩Ad_)@!pSicon޼Թ@s$z < 6 &]NjdP=`XqI8Lʇ>rcc#Yaj'OÇzYҿNQ >R`f|PЊh͛7uzz^lx<*zxH$-aٟ)>D;;;pK0^Nb_}D'%H|=mY؅B\~E;0$5ě1H8(z0Ԇ!KXpiNI24F^|yA:99 >າٵln! kLX ]|5ƚl̇I<[ŁCb EZjy3HE)v,h!y@qFfKQzo0-+@v;wxnA&>9Ҋ؇8!;hA$X<+D[HT<CβY81*!lRv9(&Q9== Jp.CM)>R}lr.aQ# v롞9w|& kj'9>>$ȋ P|N]]]ՃDj4 0uxxr馡B%{tJ|0!:Č'ȥךCu$Qauu&^&DvBZJ<+/@{;u".!ZCMZ^"FVi_!tCupX"8@9s2ZzIJ BNDfX4Tb؉0AS!xϢCan"itd~}wrY^ kDp@+ -MS]~=)D3Qؗ<Ds!|La> Ң@Ddps8 Lqҳ %VwFy{ ycQL#Dy`> {3u"CbxaBiJN泾,uɧ2r wMX ÌιQcx,$A=) (+xHR ɫ"|ɉB;@<'*hx֭[::: @IP 8{"zV)TGfzp|Ib}zQgI {, 'ej 3=U:N*áƁ]r([ŋ̀r( #X1N0첆NKP˗ZYY  2h{`ENЁsB:[,T: Np+G\ZpAh483% j @όL~ Y(az{ֹo$gu@ ;7o^&rnV2d>^@EgfO)!AX,fɈǙ^i~&B "[-3jP#Q8,ϨR2ruvyV#%' #s 2g‡0zﵵ5-..jccCϟ? #xWM]&F#ݾ}[O> Ϗ2B>a,tΝВeG(xo;<Oې ధ`h QA.1+4u=6 90`"2;ωQ 8#/.I88dfOٺ=$0uJOq>р79|(:8)5PRk@:ײ=;;ӽ{txx 42 \CS>٥DA0\vF`:>>VVԮpj@jjw)L !\ < kZz?jE7q/iXn 08g}o#"ObbA g~; N6EE L<n߾V]_N7|3$E)ucc#*gǻHrX޵Z-fy=JAGGGPPU 'lndfU/Yn֋{ Ȃ$">Y $G|ѱ}0\áݻ2"k/^'(r%\^^˗/ЅmXAC5p`2dfqH}DO/s*g(kϨ?2C}%ݺ{}]eݺu+( ʵAemn߾gϞϢ̘zn;wIPF"~$U.s^= guwIq&'%5 7t0Ly}}]BA[Tt`\ `@ vEP '$RT!/A ´ ]Vdjޠ=ߡhBf⣺$;xNt'xC4EtpczeВ$Ύ>}3upp$! *nAp^D8DV!gs]8)ژ^`:2/@ KwQ;|$qx\7 $/@@h=Sb/Bq3`@Za F9#0KK !z'Q1Ԫ] 燳u'ׯ4Xr6!a=#ڮH;k:#A$7C_8災B >/̳sȖ͛7CbA͓8p Qztob1>4c}!"޾sC0:D^|&&M#b#B\lɴ&VE6z/ vX Btd?8I.7;u-5P1 Y'"@n-- v *D΅]fzD]s=k/8r::1vϕBBQ(t]}ᇙD<,*j^c]Ġ톬lg4z=dـzc.',裏B{@k>$&h J#j7^u52T`cHSju5jp7A iFPj?FlD"Q90̞G ejԁ1瓙xAȼ_QP֖Fanz*3 3<_:ဠlD! DÐ"@WA,uMd |2Z vC,̨m؋Uh ^5vw~dZub2i@ JXZ-\.ۛa] $hyh}GSj4|soPXMSXbퟶXiBEN7y\} Y׃ 8OiFEH L .d<d7ofQstA|?NMhN"hէ|a b&Stl\/{pV`ۙMGE:d?bK<^|3:88\.ajBJLeF@&jd$8X 7\җ@}u>% KKK<CF-&"v晱qYl|̎a`ݸq#PryЅ֑k׮4 N  21GQ7nٳg= Ƹ񵋀`;NX#RƐcrGκS e0 N8dLB@`0DS޾|/l9P> 23~_jS{jA@\3؍1L.U]JiхjeőjVUQI3D兒:SKh8:Dbb)xmiURb4P2P5t8h fnU׃A뭝dT${8YXv;,|RJ9^D2 MK t\윚0(ߣ/MSݹsGO ;eו\EF`{py6!g?y[ψiljuYq!;4w6])JujVަ|n޸=n-U.V%Mt2۱J"fOT:[TL;TREtwGUkuxщ}7lxQt;Yڊ:ݮL}:!$8鎎s@K^S2oPJ9|Ύ>LFL=IdpO Dπp\]ދ:=`@zrE(c@&777s4UNOOy/֤\.)g8*W¡7s+F%GX?r RB?=V9(_|++D E[[[O9ukZ]W^e~yYJ'80ŹaxF,^Înu}}1p <8Xlt<[8h4yм+kAb̜Lu=fKMcdLYC^s\(87@Mzyݻ'O~+$08NAA#bN,YI՚&D9+ ]δ2gܽ{w{{G % Fg3*V(h$MDJ%(dD'3:s_QI*@fߋXsX qTT4{F(bar㓆{z>CoYJE 3&X]YSڊ&$#s:>>g Q k)fYw c9A t`:05"{ttR;G 4lo>*u^_@3 A;3zt}666ի0Ƞlff8c/5<78Bϒk#nmmIRFQx?|RwgurOKi!%Y^B2VD8>6ͣ?I9ˍ7;1="אP8_A$GKC9n x/`Y;F lj1a-`,qdc7lNz<&H"&KN׃ .qoIOVWWuG&df('J҉ڧmMtk}Qշ}-ݺ@þtTqQi:$j\h^hc9u;}=|ߋߟmi&! On2_פdDRA8*)**De⨤45^~zOz~5kmu]i2CT t?OR0&D@~{^1*0 sVv^.@e#I)x0"4-vc{{[/_ ] (MaO<6MOٿΤwM@Id_:#H. IbZa2KwDJ 5)6v2K;d2QV$0" dc:[$UCQ&X˺W(A %H'$S K֡] k~02oB2+ƕÁ8< = |Ӑнo328@usW1Ƀ5LyP81>zihQ6.5R2R =g^]ZZҍ752(\,u1^G bA$uD@}eœy:NhC[xjOTSpd\MO~icnXF㢒tq2g %M(.(V4Hg5ƩNϾ'őΐEƩH#I:TYv>ddzql0ΣOώPy{se)΄ ƍ׿tq@d$9NHr]b@BGfZ,`l"b+MSA% vwy'Ӣl6[o_z zi .X+ |HI؏WqܞWsJ٤p@d"u: q1^zE]:>P{k5=jy.!klt^ wyIj~A|Md.e)!%rsoodLL#BBȔYyШb] )y8Fdcؙ5dmT(Od}\7$8JZSVdjB&ܧP=;; :NU܁X0Hp]{gur(G MZdaWVVBĉc予y|<,gN;d<G:G ?Ώ cWWW0`DD(mah p"u:`s!yk;mJDRUKGHOϼR)i0>9dl'}S-Lfjb)Ϝk2xwktfktChϜtB'9iϦ|)JqE*V4<wo}7G+{8Z]VUInqX-!3q6q΂LM&G}0r.&I0P'3[l|||7|S/^`ggGnBϳy꯬[ǡ чFID[[[:88p0(CNOYs'9JiH:>Z?C+D]< Ϡw)Kz!<2|%D _7 CQ^E=HHk{4 sA'j9HAdDlZ6*.P[8Eqgeޣʁ9kG008k[ٳ.C\0#aEz@@ę̬8 )1dh\7=d@kYP1R}rSA/X㖊ŲɅƓ`vٚupPrxFޫ42z>89N3d39I),QWn OT*Ƌ**-h4L[o#ɂK5z3EQAi6c\{f Pc J?!313cV˨a zGP3l(+0q=dn0k h!KgO5Г\fnꪚͦl6Uh42,eN8?@z'B0q6 [ziy^h!@K b ۙZ>9m|@윴=i ^O= zO@( 0 \0lׄ.D3;ۆ8s֙8, ~YFoW&D%SLgӓ{W%a `@a0qHד'O(5ޓ (wԐb^aGaD0Ժp˓b<Vu)? !깭V+8z©[VA=|uT:^+E8IC ?g'OhZ:BIdQ2x20h8 pp 8t!PEٯfnI2k}?i~^N8f͉] vLL_´~e O?~MDJ"M&67a4\=`% ʹ~?zi FB<يt"31%d^F 5W:*DV2UN9]'(Ii(bdk׮Fyڧix Ç:88Ȑk`\3ewރNmߟ׀}|\$)G]8X* 7J!8:'tt5'f>i=5v0EǙxEa8F 2Xċ*0-_a9Cg:*06ѥy&@ќ?LM;iΝS]aj\@>(a[:ݎKHnG&XgW_/7yr$k\h<8٬o4#gq3hupQdϧZl&yD0; {pC=y\=f̳ٿ?ˎhVKN qQqZf펞T_MH7tr|U::: P/{B&n7p"$R=yܰ ̽˗\WGp.(^Q%]]] z]n ع#z8#nMp3nh!x2%Cg\<ӝuM`8::g?Y}k_ A['N#NЎVƆ \BP1 .C΅z:-VY$>uq:gggj4AggEMhL Fxhz4Ld%e&$*2ND{Ȫ9qedrkȅR#]ZZ >݃ђ *pYO`<Ìc5lqhuțߋXF#SGRpii) nbtz˱Bʙ~~J/>*:5@ƓM5٘Sshl+ vTqԟFRMgiteǜro:MhgN8}/J[W_Ҍ#Q=?zHJ480lPyyɟ3񇿯(Q~LËa(M!\KWEPꎺA/:W|ScQ!>dYFIPub  H6 ʈGfyo,A= 0tiiI{{{z!SFR)@hsm_S6̙s?F DɊr*;>m,`S}:32pF)ax( IDAT[X@XB$f͓͛:99 "DL2Vfv,2!?: `y#%Lo"{'r.]lۇE10DqD~Bq>k2WaV&yvL!ZgaZ `s4i#*aNB< T2e&{ ׿84UiX&_NYֳg2ݐyG[i&Cw4d{J*IFD}Z^O/ؿ}gu}{?Xd4IKȘ0ΐ?~0tp]haxz08I&3]M<u~~[n:d8m` i^f1dGzݻ. ggg'dEfcssS(Li XtY`ט'N\׮] hs7hGb0z@E:P$i0aRj^6vd{/]Q)Y\1 k>ҋ7  AZٝb(k ʣAM#횿.ٙxzmP;kv٪lpXZ-d2D1 U&L ?P\x떳^yo^&@A ϘڛNk=ẓ@SǩhR%X˺}-O_-hTdjvvR78|ۈ˱eU W7}=й48 GM!L8OҺʔmk:#tζԃ)k [VY[TXIh|_'G#+z+MFLِՕՌ,* g,'D 8= J2>9@/F6cST y+@W E)PvC}Nw"!l3c$}WU@:<< 1+moo-jہOI<5l7I$ـy5 sc jY)b=c Rd31n{|2[B4tHD|Ɏ!H%1^/j['j&JFbC xz8SPH,gX,fgs}u|wj >gh"dP143TyXad,\+\6(5dFX*X.\)(?@/&@iLը4G8[ǝFF@ߏP|Bjg.i6 ;Vl^cy|4~dőלC#jij{:kbVx*|RR:|/|^5?T¢$Q8M<|2]8">3 91BMHRsxנĉHTek2,dZdDA/c{^/\j{ҚD)R:,;RƆx@CAHp̀~h@j~0Mމ΅999ݻw$/k7 BNsp}Y)#-D!d \-x3+Xtr/..իW/ `9>Nhy6zzfnllyd8M;C r>`cuu5E\[[ kzFގY7aT32i"f٠@s!5@l5j&\;(?Pprzz8u1PGV5Iu?owWoC kFBv\2ZC3΋^D48psK'Rs)4ue`Bd\= 2V`<3}a(G5RF҂`'zM?9RRj{}wuzW\YLI2EmUہOd%خPS]l-ƃ}$,J%5L^ ?Ba·Pr(+3y ¨漕J%moo-F粘Vl ]4rT\8H Ṕey>z2틋<^$O>f 䊀 r#pEYR!h뽆yJonH9D#kT{ov[`qB@-5"Zم]5L}HG']Yڍ8.!FG~8^_I>1Q5B$ M^'G RsXbK~`D⽯$-Ut1hZAo_/tK TQgmEfrq L]R:F=FpTY Ite=ӒujuNҳ]p%:G UϠ( mM5@ŷ{GWtjriAu:]-/T*]{h/}7 J̗@FY)}"({wQ"Ç:< Jd% :}(?^U2$/iq""sf\.8ƙٕJ%3RdR0y YD U j ruh 2 EN"v-" (LQ|> .%!&#CysD r),p)p2}Dڢ_y$+ Źu>UzgQ%(_x6kKT ~N5'g| ҽ ;+əlKrG862N5YbC{#ϡ9lv l ӓ72Bɑt?ݺ~_BeJ+JfN͵߫ժ4`Oد=}h`0Ph4 Ƽ2^\;}.&;P";c+&5 4jY}Q E 氟f3$8ji1YVy6 @~]\\ngN {rA 2f$({GjF-j}|ύ PPG!Q LD8}Ka`aQcAKRX@jlT GEvdžN @B鄇Bv8N~I{ja#օiߥxԠ>jӟVV HgrZ-*o T*P NBVV j66A`j p4r&)(Hb8q`2/M@_ $m`lDlb0zlm}Uݶ·_t^M_q~q! [ƚzݙZZ1P[q8aEeU%N]7B\#dF3Ks9r&qLܝ2*Y \MSu'9ۂ4#mu c=xx[[:|9  Y JY^/$aa7 m !8 T*ݾ}[Ϟ= a/%8u\>y,68ebzB6v7|S|Ap YAlZZZR 13?CU,p_``۱S@ u( * AC-ur]֞ cE)oo8..$;8lx>K3?y:.!7́q fGQKkw~5,MsYhh ׮]ǏCm" e{{;L6Kpƥd^VmOԡ`q5 rJ1WL(wj$ $m<+??7<Ŭ c붡(Wrğl}PBf[6.W}gOsr[`.BRpiN*,ek™,vN <{A՗!$Mx\蓝d#/[.WJ)U*5 a쇯y24 -Φ%DQ#mˊ9Š nvNjsZ+w*Ȁ1gciž2T:O58#b]U <ӥ !{q(` dqdxO}4Ȫ 6 rsPl#^eQjɼ8\0y`dgFb %zOgsu`βvA vKl hnM(?3\ڇG novn<E}"CD܃pi &vEs4k".$h҈9=rSiݻj4ss 3dR&*J8ΔÑ:FvCƁ%b٫WȐ{&pfDd!⑴nOyee%\75:zو>]HG*2̂3Hc!q;oe,ʼnN;'֦^wU3g;%rwÌ2s2=W D0+;??~r.])T*i0bH&bܝ`3?nddv;+CŠb7uۋ"IAbL;E^[nz5,i쑙$CDM'L;l0$c g>ׂ& | )Đ;iRr)Md#51:Xg d@,TA=+D8u oܸNzZz^ {;⁗G&wk =0!_\z3<\YYhs-/W힪T)X~V?_Ts[*dWʌL,8-8a(\M՜s+}.Η\I*:;}ي@$@5|%[LcW@y6u&@^ ܋1ьu\ug:CjZ k{{;|}ݹsG^/ dă P–t)QIS>EJt"lhUq>_\BRyS;JFCD>30}3Q&iV&Tg g|b2B*N q1jD={`}$hoB~욖>,h^<8U{|0ݻ1+څ|9#'G7XڧB3JmYs*3?SqS A$\&?| C]" DQVk)&u(e%$_'3c4SaUv5cN)g¹%]r$q)ɺv }U}8|s.2 d>bQBAjh{?A=--*Up4KLﮏyAbp qd8L/iaqn}>2~8g$ l Ybf=A=N7$LYl-||D+֐@[Fl'zaa'hXC μf{w ԍB,&|25PG|%JI*L> igpXx^sz G5y IDATiJAgg(yRDl-#:h["!c!c9H#^Zn yA%zrI 2XcgK|{p0Pᅒdb)$>MU]rq`BeEL=5pn EtXu3X9y(|VlNw |\OBWg\+68A?ۚ.iPgJ C&~EkVZ i/aPb@ wI #P-cf2STU: W`9Ȯ%Āޞ?A\liGTO&<---ljkkKj5џ^ `ĭhv>H7I^f]lz~-K<+Jl*AV[z2 ԰̐q`*BD="m31",sq~@Mp\G9cz*l6<gC}貏F"Z?&@u  G%@6"8"=45.I =LO21g:??Η: 8NnΧ9[f,*Dogm<1F ڄHێNfGm ,c_:paYĂ^<` Q4̾觿5'~ך̯~s!dmϾ0忟{<'B^6G'zEſuJqWq P,VfZg\m8zxwFx7N-jT*Ӑ)q??˻ypN7o}tNfp~}D\KI|(ҍ7B_EK?A:3W{Tn78rdzЖ iO͗xi g( \_`yˍ a|.3c] HP mݽ{7A v)p\7![6  #6 EA -950Q%1gdԷOȅA!\ʀ4jMn[i4эk_ jiZ-DYqf[y;Ьg98$b8~2Qx.Z+l̐:~<(KN9wy^c3Wܺv$55| Zu)A'3SER_Zb$:i}}#`ȩa8R'[}u &]mmMqgZz#m8.d`[\5İ(iLؑdxT Ѷ_$Mq0?_ZZ !`Jv3\l N |[*J'ɔ>taKTXXXxD8Eb ZuH}, -,@D- w=3GbЄK?ӆWT{odD6.׃u_HIp~%bSZ2Np^2Orkoj$lb4U,t|~{~\|X5gB3ToPF#8 ' x: A:*58ey(I1h[[fHnHg"8[`]bOzK4%> 9hb_EJ#jhA (ryy93)'̇-,YToY挃vOhX| Y54I8oPa7035qؓ$4TPK dR)d qF峖ҝ>mAP'1^s'c:2{[V'̇á4rmY&J5qP?s?ߞTW; &)'l6("'Y{h@:=zc4ϔqYWJ]99ߚ6;䊉Gʴ*k=8WzI]+ {ׂ_4n1E6uPT?HwhqqY{j<+M#ݸq==^۷o*Vr=gӗ0*謭(TqpإL/z\LJmll^ cR쾋q$Ԍ IDӃFٙ>4 >BA_4&-MO^b@@$䅕Gyaia!fA~R`6VFan7vf/Trڣ y`fæ$䲕<(o!KA4$ a-a!KFC>3#&O@?* Z`ё%`]}=mljj%ʺn7Fa<nTRXW~Q[sV"NՂWf"e\TO*b%,+}#lk2UnsΗW 2%zrh^fi6U+XU*]wPL 8M"!WeW=Ј4*7~Vϗ-MTI2E'd6 ;FB#m.iq0ѦPI=‘`k {n_`fH@v]t @PTЈI0qhSIjZ@\OZǏ8υ{! ¹?8'k${@x.hvt'JBhħm\ d! }=IGd ,\XEĵOq0I58[>ogEfE4Ɲ'i5N[nC. *ᇦv'_T <8W.ǙSR,\ڧ hE%XPm'ӅT2fqL5dU9abՍ+X*f(5GL5Uv̫^eZ,(mt#]k_ Kie겙֣00浞Ivgp8pO.gW9HWւtޮ-J3ծJŊJe~6z }\'h$8kW\bdmBފXVttvv;wd6pL#adF#5 @A-F5a"3PN̕J%|D'hҪ:^xljggGNGoV @(ib~1(#_dOQ?duwgj(6c\~$) vN4a67a o&sRbN'5w Zd%p#PI `mݹs'lXX,ީ8%Y>)N *){K&f\uBexH^!0j2cvںu릚$-F}W8| Z̑CH夬Ԣu3M#0U~6|_ri~ e].h_9)}6MJ kAfnzR^-?SΙgӖp@ 29\QSNOڍH;iWkk5CȘ: f?LHr: C}ӟֻ ?02]\˴4Murroj@ЄMջj @F#8sdNƕP_Godf2eןv JN]̔ɾ>@!}@ |.3tEBʳN:(TXZZz@r=TlN7 Yꇀ.=!LFVt8P9p906pX`xPp|>Ăl_ Cްf??wz| `ͦCQ@|\aiU e$ #$Z:$VdЦL,jCLEpjg%ZPp;n8@VÍ&xl|U#Cq>TR.nKJbWpQ+lƄElB"tƶIuKY'@ 677߁CGBH| @im[2. iߥ2} CߚCڙ)m`EK"n>ёr沷 ;@g:w,~ά ` rAs Pb8#}E9`)`^:5K9ACZ ( #F60 43(o߾ ݝ˪]cn Aíj?|l[d0 NP$7npԳb""؁.-Fdr)Qk-?e=(f3sT+,p՞m%f6UggJRr*dg^Vz%)m֑AծWVl?eC&38X3x ̵ ZCjnpvλ{ ^u2*Lz=I.[ :~WH|b$ߛ;;;)w)A1P 5ЎpŚ44H%P;:ƆCP0́E=|P?v JctcXnjl6s o0c 5e*8moo&zktsj`6Fkv a D *!. }_C  H ס~yn aOq,mjz]Ϟ=sO Fx R)-sfqS ";ŷ V+2zES3/k(y k֭0/yz y?דoX(eDTk!R<`Nڟ^04MbSn6*qb2"5[^튕mjPfF-I&л*0CgSi۝3׋ *e]+Y3v)SP)KIB!~'Ms%u/.5=ϷiBkSn+Ȉ1dX)ODwuE"KqFȅB@ 5jխXW)ggg.%`e#]m:PnVЩ"aZ35oJ)"mooͥ)z|G IDATi2;=54!DP;6R*sXY7[&v{  8КPtA  B?[/' Xxz1u.pnf1y=Uf˼9EQ@Q@8t5H{P Q;Cl`۬qAUJٚ[r֢xmܤnaR'677힫P F'G/T _)7dfkWTN֠adUt#R{AIڔ2&?:iyEn_h~WxECZD"a2;k VPlp5i<=b+O{ â8Q`,0(FHRN;&sbC dم%룣-k.TJR6,ZfM L3РZ-wVCR9777ݙ_?8X_(x/>cJ&n_v;^DZ4) y i_k؀9'Je \(\h0 9h?=bPx)\`|?-.(2o&^tBՠ5๠0# iP1'ŎMgBƍ e-6TH`O兪ݧgǣ_UZMz˙*"fPrK25S"=Dij:ʬ>%WEY:,dUWd7#ELq)ne~N9?T/+ ܜLObTxxs.)5NY$b*r4*ka\/(y_^ZH$YX6i E2C^|Ot<~~[js19u.3]Zv=M NTTrU[48nI:Z d8Sp fCfS_P;;;:>>VzWS*^{Ma tRk 2Ţ[D$0-Dj? j쌳kWW79 H  HMFfYۙ 2/ y'::P(cxjA6ơS?G:A;Q\y\hr{l. ?DUpAYv؅/@kex Kj/.t*kwwWv횞<<ΎNOOW/B_dx#W.st[؀\,ء!b(>/K0*hPF gcQ*  #y#?N9^,tV-uw">o>s OXگ1CkKg"V>NhCeQj pt moV>?TOfCAh(^+C?{㔕*Ke1:Z736{օ(dq He 2sh_MNz=ɇ\t4{)P<|?'_|8N4F*E~h$ SG[*5 {|nXh$JƋFt*y{`wwW{tm{͍MmlnTz(,))/keVW gЫ) :3WM/,$;V:)GƲZbt(9wGU~=a+^сnY 9E뜗0iQElZ|sǏo~ӝ/٠-24FPƅ@q.vggGO>ush&l&OA5Z TA8onfsDxV+Ael<5}a0͟A W2/Hn{lGO3)v7-|_f8v;l 5j>^ 4&RQŠf ;J+ҹڢR s=GR:{؍FCݎ'3m(Ӡ-)iOdMa+i95]JYx{RE|9{v$ KcjA^/4+ճOtѹx)I|y(')PX(j:U RƣWT^<_'?Z?P]{ESIfT0hBS4'SSׯiVK/_74]rt wEzRZhLJCN!59+rڮ))]ӏ-NV,hk)MRRIZI&=(XvxmggG=J%YDeө;`XX6F͞U *`<)tv*~3moo8Ir( A-4?gu 42z3g466Q0 Tb4 8Pڮ~Л5Ң6k.,j>Çutt }l[KLA5S(+EdzUtC v)PY : \tƮzAy_oF&i}Uu/ۚz]?ҳK %'3w׉Rt hAU^ZD*3gle]VK2)u[כxd+P&*J?PWZUﲯjb|ӻRj9T\h<\.aAaξ5T3K48VWU>5%/Rr>iggK;zuMݺqSYGIGγ5=3 TQ]EW}1XŌ3>Iͥ}NqqlkJ__OsW71,JZonn KGѥP@pOR0Qy\=l JSٵ PvHecMB:駙P7>#a|gPb·aDn[[[zS8SFhd#xuC3bTzoɉdP4CybWnX)I|HyD!Eɇ +H8pnݺdHqyz cY|07vHl`^&>p%,:Y)Qv9[uZstRXS;~/}׾.;C%ӼWU 7EyQ(/ U+T)__+$V\d4URS>*c) KJDŰ4RX5fcCR, t|trbXѰ?RXp0Q/Zn*%9%Q /ΫQmi:NU<{9]v{z@>x5լmikcw> aS2MCNѹZO bGZe'ª V^Y{yu'򅼎z_~oo}WbYTع Q@'6R8= MHCdq榆á[SH ]^^Aj (ƹ.-ѲDm/h$8YA" `cs1A:;;s@ x4bȘ/&8_aj&;4Cө39a5gv TأlW\[&e98<\b|^/ %{@ @cg6JFL>.eR{XtӧOŔ"mE^y8Z6Yzgb\RV4$а6[TrPnl B6(IWo{Z dZFf>Vrͤ{R{o=Wo|MoD$WQ1ߐUj#O9xrAA_P^+,_^o(b C[DZ?ew\E‚4L5ETT>W{:?8$eiiA4ܜpÚ .YjlQkZK]l@5P%/l(B'~Bql_$:>>v1q97;4C~_YV]X;G:1}AcGiz=WAM<Ϝ,P х =hZh<; 5Y:yOs3TJܬS՚B(̸Wy֑igLFP.m&%ߓƣЯO5JR-~YT[_H4T5^4eV6rV֖Ĺaه#!_yLI0,:bXh4g*+Fj6 TƎ'žNz~WP{׶~9Ytܰړf#aɋl-u23k$*JQbgrrr6I(P|/7HL(BSovPΎ0TvVgT"T>vjk777ꫯ\.?x<֖cJtyE ) ,yf߿]+b: z>v.nf9wA6h:gJu.hnbP a fR@}c͇jF4ŚCϟ;TN@6/AsgcL/ve|s^zA)po7u=~٠_f* 弊 AM尮|8RTTEfsC|w`gGE]89I3vwkkLWPp5͛:?l(bez}ݼ~KL.8}_ou{u/.Erm6üy.z؆pQLE*FR mƪkLԡXES$:]K/`)͛z뭷uqtlITғ'OƤ G:Plgt@|48X%@rT*fN!P7(˯CerrCRmẃHԵ3p<,mgf# >2*4Mw `Aj :7+f8==uukڢH98#Ò@bCB0eRن淳F:jnzj4꺸_a[)/3z/^}5KyɆ/E;X ^Z'l|xC`%Ї>Ǯ}ݻwOGGGb. soo/%rpbt`0%Y/ШAq ;^Tu16j5Fk|3uugDݤ 9CG|e#Ftp܈x Uѝ.3^nݺT$:YiSYFڎC 7(|Jo=hNĮ J|Rd.cRp _}L/~S|LԔ*r^U|SRWfHZSrYQE . 肱 7VQZx|fW# hh#C Izz6Sϻ|hh6_FBU*$5[hkkCfEI;¢ ADd%x"3]0iMc68YNr@,+Q<]3M'굆: vqx߰Xk-t?;;SXtMrfy$AXJ,M8^>rPSS V-э7GXT*~ˡx~z=ݻw/W _Vh%n 쁭3A.{F؁ TNܪp`ۋu])nLAycL0; Ċ mgt16o*u$kYVs<T~6u~HŠ`%#-3f4O\^1۶>O5M+x:OhX#~2R}ODä%+ނ^E Ƞ]klU ]w #}˿?GuyQ(͊[*{幰lݮ5z}#Y٠xhL"M*s\2OY?c7|SF46a{ƀ {D +J'+JDihX*5Nx*9]O[X_ slġb^ẂWq2EP[teqg^i7U)4Lu祗{K/iߝD߷ AE1֖;lh35J@x$@ژ?gggl>==ukϢiA.lh0c={LQAeIc~M ȸwqqj"r`y? +E_.C.u(7QDٙS`Be 'Gͼؚ~%f 4Jv ;o$N1h%90XQ8 _kSfݣ}fajwwqP46b8:At:Nmj*ρΌ&K*.a R,L!F\N*C;'YmYkr|ӊht/ieȭ?%2~yXɴWee S eò xX"P,|p0pr &i69,Iݹs'4 gMYT0aaqz{Pֹ'i&ŽEâәHI$~APqT(=R=|[͍Z[EQ9)uikep16z1#ke)SaA}lc%(,) W^q!hq0Dz:M[:99vlkjܹPUSQs}'|>|?"ւX‚ PNQPh#;lZ8kHM(cSZnpV\q)̣] /B ) 9TEb6(Q$̾#}aK! PD|ˈ mSԐs66 uAeCB A 2rXp4t~~xׯt kAᷢ,(up<'> :R^3*[f"zC %_@sr]!2 ,NeVql$ƌ##J̀Meu{qxXToHQQjT5M)//4D"73su39[:dmXYa7ؼWf\4!h>96776NSV0Ps j(EpDNgfj6RTX(i4J{\Gh{|N[_] ҕUEh׮eUSx:Ei{~qP6C2SrMT^x4 @Bwq|NNN~VO>uk#cBޖ/ SV~_w|3TV 1dǷ*I99-n۵EܦdPqo~tyW>WLC * sչed&U[>A0 >ތ64s̬и(4OPѬq=` :XJhg~ժvwc۽} 5eOFS\~Q}Êr~^]EHQ+:=;SkFutn f K_|^\4aj;{x6~Wsz'z=M&S8ӄET00/!d2q#:#A3c )nܸvK|n޼^XF8˚@2pb|q~~ԸAgs3n\_F#V*k{{;UA6"-)ư6ǬGؗϓ]nt:sp yKAcFBUsS[C|@Pլ7QP'[\.;케 C4 xzIQ6ǑY. o9p8KьX׮]sϰ9fjJ#/v]ҊD0B?S K`kFlpbUZ:YWLӅxYcӅ2!ghU(۴p!DZoxqIb0 ⽋ za{Gcs]M&7 ƍH ce`]=߽{, C&kaV}5 BBIJ=`3` jT,͝.**:owT*Ux9%|~7{~RfƫEWIF }]gvf+Z ~@~_ Z#°`_\3=Pƒ@/h_{9G|UX3={@Kv:99qkH-VUVX4 &/ C7Ŋq5a605/6M96Hw2ݻ njkfM>y]~祮=}I v́v C}OˡvłY+b(,M3N~5 C8AŚ5Uihv m^vͽ7Q4MldVDZ ͩdU^8dXiU tJĹA3Yظc׈=~ ϟ)&fjW_}5;d|HROOO]9 -%+ZZfQs]StG93d2ѓ'O-9_iR~4x:yZ@b098I0Y(2zJO4JQnMb|8Nt8h"P&Pt,#g`_b0QtƬ!qr#@!n6KS؅`{T({ˬAoЍ*UCϫ3{Jg-+W-ת-5:Yn^Ijx_XR½wmm46T K 񞞞jggG)%Fu!œќ;(2rv11{]Bw:D!EܘЋȍSHyr4zutt 8==u by l:<,TnscAd27YB,/ 74t,7#\x0F\%?FQ[n+$ lSAd@mJ " !t݃fNLah4c7`gvǓDI)_ȩP|›)^K7szr:_$HZIHad.@@wNgCr梩np&lݼ@ش#GbZGѠ=| R)N|ءi0.hP 6E^f\n}I~ik766: {+]v2:B=vf&Xn8owZAyÍ %bM`x[Zmg1Z"0\4N)LV8hIuL6֭[jێ@5-! VwT,45NԨ75F纒$uc} H7*M]kGWz› npnYlxJ$ĒHA>6Wɡ6- &{9YyU0&EQ_cyhvmkkˡ~W_}U}ё|zz|39=؊SqN%3h={K0C/ FXE"'[x4CIS7677=}ϵaGLAx" o΃Ѝ˦ 2K` hS =[cen.۷ItfCz=@L1ݼyQ<lPJ%jww7R 6j`:yѽ2&`>nwF E_i[_{*mJ kyĺV-8AFzW+:[)EO/nCN^hڷus 彚~EbCnh8{ѩ+\ ƁΟϣVɵh{Nݮq%@sf /ngCCysf^ףU3a5u-: (9Aì7M%qB!ԍ754OMUM~^u᮹*J/Ά'$+]Qx›MbeYJk35w[Oտi4 >ڠ'-(;*m˜&D#[ۥVt:zݵo#YHJť2Qpy|^'U:EK<==ޞh6s8! Eqeo{aA+`W)4V,\rZX0'̢h:*j7ljBte΂+{+kF9E9[QWj^[x -Y_,ǝuwGti2i6tٻt:/ 'O`)wvvd)qk.u5ϓ gElsQŞ2///ʺmmmm]v׮յZ (3V}k>y݌ arOvnN| ޱ%A# E]u떻a ^˵rk-o/M@uP'''Z:2o2O*:p)$`@p\ld"  aùܹC5Qfq[_֖qH>vAι*~6{+~Vhig ^X;[eFnle7~Br8*kPTR46ZC RvOg0;Hz*l*KPbs,'2KχW 1ɚJXG%FI`#;+zz<귾'eIY¦h+a %'@æ`/zrrST\#4n h!t-n qҨ#_P>Es@" M'  *;(׬Eijl59g2w-u4 DnCzВx=zZuH|i !$SxZxKE㹾(zIy=Q4@m=ڠIjffJe?l .Vl@ ׶5a.nӧO \a|G/ Y*t-]!FJ+"nG~0oU`)l}x*FM7okڹW?0\ArS|DRP  m A[s gWΚl8rwT(*lP5$~9&P}4,]/z饗JGfA^Z*?Hi?]AJL2+Ac{WP gA]X n%f~a(EE4tŚi,8qRtժfezkJcFo 6CE˶\o}Ф]w,0ձ qooZ*0 Xy5!t>hRP/8(a7 °^Rh*%R0g./&:>:W^t&h!#lv&`j^K5 /]{a|n5Nz*&Z 'tcmZNOOݵ+84H#ǶAel N2_t3*Q_asmllFQ/?-듓mllh#:eJfsgH* RV㱂z:?!x(RPּ72 fЩ+Ljnܸ%| b8@谡$8LA.n9DŃxנ]K&' 3tk^o_\\s9 =ŚkɼBy3Z)d.b3Ɠ/DB,6HNc]$›}=?TfEK 5rE{y2G󅡡iauoQnܸV@@zv†sKA( E&Ҧx ̊ M!n:qkospބY hN#I}D4wyͦ R}c]t;`Å8|rѵZ3;N#aWHdT"Zt0+֒A֊egbi4)r[&B= 9Z;?)&{{{.j9@b^Vurr4O>]aINOON;>6֏" ^[̈ƦknM\===Urvvvbt4EM0)J܇8-M!fXm4;w\cT*msZ}?<RC@vԿVhDOgRV*J.CYJ|8޽{.C}M*jaY#]sxAAC0*źȈC?$PRdzV+FJ7BV9n ;Ye֗ ӫ3ʪ]Q~%?U.?hT{DbN(U9M`_Fj5}ᇩZ;t+{^{Mocn߿S7Ga .Hzc!! FE,UGZNOOBcҚWDfBh+:L'"Osf͎_l=JO VE:ڵkNFl ]V5ONP|Q!i4.U(`buu &NRXg}*n`46>C Ί\9Jr^BzI~aW\olP&һb>)j:vK 4[[Q5ҷ~=ʟUSU㾧jiCa~fc~ܸqCN5jZͭO=mj !ܿ_@u߱fu|74uP^4 BbȄUk$I [ռmi<=ć) /iK#0rEa!EB/0?JDVq57Ut㕢]IfxSYkTR2oN_S]jֶEÒm g "+sv˄7:\y@!86g(T"kjێ@Z{ '{|jF;~!` ,5OQyAXWϙ|~~:F nw񱤛˜Enń℺ꍡcA7LNvNv芬ٽ5'MYZI H$>A\4|C2 (o~{q|d׏+}Sb42YVzU!,kZN9Ch,*6l2wXwR)/*+TTl)| #yZf2kHqW|/t-1Vcpc ౠiAqCCY >s8:wY6M>Av-l` .:3e?4 Y56FCggg;x?Q2* 戄0ZGCC3t85M)ggj] UJ5EWS $:Ng~k͌MCr8Ntt^I}&*Bu/3B |$8CùDC-m:jb2t+Hċܝ4<  ~"l.%=lWMyIs} *F5n=y (i(x?yaE_8xs\o3c\ZNRy(>h\KZBgGۦ.щ C=x@~_NG[[[wɅC Ccȳ,|?dʬԫ]=z`?ʀ /Xgz&d& Fs35` htUIb{=\o(w>;[P @)*"n7XOT;FL\jqrGyKAE{PNf}@z[?o7JgMj68PrKF %ȧʙCXu:\ + ^0~'*Vv>1b8=Bߚ6>E oZ/.|L!sGA[,}  fYWB1TJuF_6T*IpC9PME7Kz:,, i[jt-+CrJp*{!^/(0:? S#CF#j@MT|h+hX繹7ISODV#7#=<9~}*8]y!cs#T8d@< f ֥mQ:t0&黿ml66noMڙKRz87%|CŰ{W,8 WT iCR[uv&Q;[ `V\nuO0jV.s/#7SClABsMMOLet g/%(IcP3OaDoV }9?D0-0S pJ6zri>]+t|VS z}Q";9qU~u/IQۿ_kmO7VJPJ&1SU ohTCH8$'TM"ӓ* `s0Nl}PվDZi1d#驉(4orhb``'gO+@/ߢj;G@^XAUD/KU3Nm(A z7-Pxy޼Pr8,zԄTc/ HT8 z4EU=][V~"2oZzf ک˙BBIOԣ=*!35==Qq*GaSԟKƁx([簡xM̭S~Aj tK @v0< A LrGG5FÉ#՚K$'nn%f ?lR70qض@]JmJŊas[E.KKb'fn^ⵌaw }^}ZZ~owygއ'5M}A` cAa@[1J;3ܟ$IJ\T)BT-HozA-!Ш5rz7@#5#:m92i~̈#e$ ʓ׸c*DT=XVM Wz}Sv^ooc=ET?@w zRW9j++ E**9G*](^`N1asHؠURHI[u ] 3 8e[4l6P;fKs $@ VWs2 [Yo$Ct♳w'x-Б (%yIZM:VTVZRZPfo"lQ̆ڕw3tK_x;DK-k}wL$9oi o'WRp"v:<<40F+b[{l~+$nnnTVK3R$* lޗ;o(i^"8w6-Oƭ] asW|OĘ\.Epɛ"GqǺ(ə? Ch4,QMsּ- 6%AT׃گj L,*;ޕ`x$pO^TNIOcE~Y4=rrR%Pkl-8ߚ;ˌP~Y2V߯5T-uTTCJ[BMJMciQCc籹O@p0,,9w$jOCdgGjEx3gbO_1oOzםtj{S|ag,(;#wٳg|I~4|@*MR+4Wln΀&vs*=ZiV^%rPUzhl]B|y6;)˶u^2#~)M3øg$ZLoF߈UXXwjL={?\.WWpMA$)x .Botcb'Ƥ_w|ѾNAI &BH8m6sqC* zooN0!@Hx _1,A\r$^N[^OEE3``45=}d Q?gVӻwl)R7f~mМRX  Pi*EP&h8Wj#z9㤫hӽ]Ю4 @17&x"8jPUZ?Zv8n6C8dawcf$%A[ʕd > d("cr`8{ rNc;9nWWWWá%f[bAQ SCwF=>}ÜqɼWhA!$ UEΣ\~h. xb) mtLd7w{{kG4Ɓ#(zFC @SQ 7ka*ko.jjB~SX51tCnm } *Vqƌ72V|=2@\W55J֑T(&!Vz|ެhR%0Q$1nh4-'P$5zK^8+[uԸW șFX,H Dz~~nw6 (7Z1F+ƳV|/hL0l^3 Fz li)^%Zm:=v}l/Iʭ<}슕팫OQO%^fs-jWRNU.W$(n9k"e4R}8ױPt~5L:<<7e`0P3~i8FwwwVoqcXeۈ}q#ٓ+`Iqc?XWP{dȼo-:AR~0$ O1'_ؙ仄6e{HÛCGcb0:^T urQPDQUD[z9Se 2\8zc?T2V*)>wu]QZWRJjP(Sfl\ggg2DbHq t1# XP6sLTϞ=3H&GzP+>gtUn++` OQTBE+J"Ɗ~%7*99A1@!_Z"0T&suUE.|Sz}vw<͙s.f'^3NS-j׺]hL-^ڼx<"6nvΰWz(~NNN4$n?n~Ơ4|FDUuxxh P(D@T|[sqڞɰ #k:{+Fmi)ңJSÞk?<<4;H|w1_9S{ s ȼyނ ZK>\pBM/J:::" %My  A@bQGGG֯-„`yOZc.AN`4VSRBlR#VSv 1%\W{'`3RI@ki*K2C Ra0XZvHz=S##;~Tfmat+0OnWZM6_a[E qi08 u5 ۢĴp8Yb(fsnDi^C [#HQ^.t0Lj0@TV*_ 6v(i#HUy\ж./xrL?ʗM!q{E Hpg8|RzUB:zbPK"* >jObe ݄(;REdϘ? MEUAIh{ oB"@tXrIEl#~ -lm}j8 C*A zV[/ O~b\>| "o+Y^phݝy FBK$qErT$;rrݽοm8gIWOP̹Γh7089riU4?zV2b%6DN/ϟ[იo#1D[qnל<4r/N{vzzj-3 C kc[V $Zi3~؈+HnV8/g3Mz~69@EQu:~y o/a%@߁Q[CRҋe\־ۣ'w2@E4o)HgbNG(4X,8 =y.c[6UVrsW}I qUCA6qY4˔i#zWlFO%ݏᲦRP.>rVն b. ;J*3ȓq>3Щ^[@"{Ibq#AlI&AS(}Qghg%PBң͢`P"8j%h` i4o!?;t?I&&iXn)MT(&NDU8{?tw4d2v)NTӶq2( R\џx4 &Ruی"=-EZtP F#M&bZzm/ޡgmu%' < Ottuuew36>q໻;喂4 }¤m¹S/h]oy j!b}.:'!3!X$3 AáѼ IBZNT Tղ$*KMG FHHIүڌ;zBϗ qZmL?$HQlBBo A:\|?(g֡WK\DTԭu8dM@Nbv&5UmMj5vhQHRph.@v7tRt:9av6{ :)b<2TwE'/`|ob|{LN?s 5hA|Ŗ~v17]AGҝZ|85NիB|w.鲝T{ϣvtxF9Kû=*x8Sp8% -BL(~ɊDݮؙNRw{{k}U Ÿ\d#g3٠=w{{tSܘvƻ}1^ "!Sԃ<2j/p@inEXT8 T 4 jڂY;BGtIB,A.Ћ@d/Nb!a' +̒{(wğ!7 ,450za,]77^ X,Z^ #b + N+"G_ף\^>̖JnFzjdUO<< F)-w3 <>>x87]̪ddb4Hm0he(FϘQs@ v9&9-ӃVej="R P|;!& Ãa||m{}rrbhf} QQJZz/mrL$'KH7-V'SI&Jv(^%9Wtw_El٤ 8&ڝÁnPɉ$]ٴiuݜ59x6 *[PRI>}"QKao|N@ހgG(U, Yo6h8,_񳡗0??πq >ӏ)nb̹$h^:aB)Ǘ ^LDcL95,^CӫPk׃F \BA[P 0atTw:>fٙ)Q4"PPۑAF+|jFg5^f@*1?]fS-X Kx7^traA|A_$S{<1.y1W`r)A! cAۆ`?nTr@y^($Md08 Vgg9B{Ö&ą~Qhғ3=߼yk ft{b<ſP13 `RчLTI$rI,AaDPI# cQji2gDC@@P RMZ}MAx{5svSjI/YǨض-)m2v=cSS+b?URGaRUT.U$ek ]NzTyvHjTEz?|KmBI`‘PQ6Mz=3wDŽOAax,~ 3l)GMS}z(DQ͸ IsD_Іޛđb_} fwVfKRM ˩^׌-[p IWO$]|oh7gǑC[Vdj~iLJB8~+ld90O0 q'(8Ȋk^__|= @wl3>>>)ayu=}. 9 sR{ I9e) OY14NS^⺄X9 F<'m}o '9p_H/ R$WMAĽ"0 ݨSdtbXzVTÖ]`(bRč ҍQz3x\EUշQvZTGA9 I>1h=DI L< T}~(ݛS[@]z L%d21w#JpEG@y/jU6'*UJJZT s5~SySe;GsFX3DT_F[6Ju?Z_ Zjj0ST6jH FgU޻z] ޔwogψ(7jAqLRbD[ 0a^8<>"f+}u/!8yƘ"w /y>y#_=r%(R(*HJBr֧ίy^%I7 62ituܿiR BqCFJM?AQnkǏ xC$$/t4*noo-cSݻ\!`Gonn,!2GP2 ]F;-P GD9a_iP,0OfT#(3qMT2zҠpD{#nF).>.U|AT PspF/; K`BEphg c0A J q{F=ȩx8Yho#U]gx'ذE Ө^yߥΫ'q2N'z.;5N?δQj>j(MJb yύ…dHM.l~m>'Ԧ=@}"q[Qie-sx.3IŹ*ftUD@"Qo!E+4Q#$1/#0ޢ_{ ez=k9 QlsWp$VL}FI4y(_t]z "Yx7P 5tיj*wqۀ-Kg~v,hc5nrNǜ>}wB7+I - Ϙ$(wPHq~ip7$]:vƠ0 k>7^ /  K^![9r$qf票Z ?HA{_znk "u@lF"B+0b{PPz9"͛7FAs #AIAbٙnnnWGleb&l5S{eUǪ6B׮RNw(8p+QL1g=EKqz rѻ{`P%-KCo8Cme&Hj3u&$ 96gxQ)4iE:;;{~}{U$^Fy|`F% ^~lV3F;B/ ^BwH nhn(c] ]]]Y•DyjZ*WZWڤ)B'/ uͷ?V/g$]7,l>anF8ScJEQ~E\s~liLߢ(o~aMT &b*Q JeZ2&&hQsƹ07h?I]]]YAF nk45~؇āX@^* |aΑ8!5Qm0Y.C oh\цUTmӴl65ϭM]j 3E%HB1cQAƃ;}"RD5lPִljZjT UkIHF)[uP1Q!{js&5TfF$T7U,Rq"`IqClA IHK[.!EȠQw]׺B8&/PPv|R<朰2AGwcj@A;3<+ 'A[~u HZo? r7^8Gpe*_@BARDk7SUjQfP.ɨἵ%]'(fGo~iIN%^8 4T<`VbJjcz``=KZ|?,W5yɉKz7dblL|f̽ dT݅f} x{PC`?B@}A MdLp.I;V̡AB

TrƣϣbVSdd:j5:fIz2^6%'hcB:9zʯ "0 ,!і (`:'y~>ϊ5QXAR7776ZGUл,i0nBUlDO)ά~1taV6( 8y6?1 p}}mGs[=RUU4ّ&{[톤AY2 wzE##]{!sRnf4jոxz%%d253߽<SP,mA o #"x-d ZgN٤El6kY,dGtzzy;=Fٴ+JP\C˥dh42o0݄ %eEo«S!_D/XvF˒BP`XI~1/`) ~$v2@^拹xF*Ek5e3s%lKklئ/$_q`VTn":e<甯TQ$j?kE?(} E2Fb Ÿ}g+=ᗌ3he@2#xZ͘L `,Pټ{T-*}s@{a̷:BSh}1$ Kuww[_8,{.ϭ0+JJҍ‚ֽN.e}>ve9>Mw+REaYaX|0+Dc4X,Z1x{{wVp5CJbxzd21~ݝN1"Oh45دf3}V$___ϹǡlNOڕBGGG|>pv0(VT^Ie1Z̈';+/HVP!ށ=-&I ;ȇjWTTlxOޑ`ǗPu7!qw##P4]z 3rZ/U(JRX$K~{4VnQuٿ2K :W1Q1m+^Fj7{(nG)YFwPz s CPEۃGļ1U%t'WeBAP:(<2Q efA$w~'ƈl:.hLO{e)7Ά*$qn (3!ӧj6̔&&]*Nf:>/*>FR/ꤛ#%]e߽fT5'z$Z-Wq X,E}Ľ ;Vf3KT^Ɛ0=453C螞27o ('si'è?|`5RcAԃ.r=jS٤]HIlVp@\(rV􇠭I6p~mɫ'K"IycT>YcNʤSq?M1Z^my\l6f~@QAo'],ڤK7 Uin9`ԓS#gA\O=_Bw*,jTN z<{*K?J<==5&S}SKOQmv0v$4MsI.-. Pǥ8"*{i/¢DZRd0JTW۳nZh7E "λ; W5𳦠m@{bBMޮsˠT,FJtzwj(=+pMR&y&DNQ}P8PF:hhcx&<3hZF~o@<,I Ql٨Yi>%GAv[777pJπV X>Oy@_ E[6 pɣ0Y(]wV⼡@1 '(Jb'=!E_+b}1ϟ?en=վrYWWW&sy yZUq$Ywն_Bϙg ?Oɹ$yn]X*owoȓA:C]\\Ǐ6K @3jb1rTj^-y@mI5k˝zb:i=IyMIFWӇёѾ,VƙX,X gYA"$իW) av j5 ;`/xbVbȢYMBZ `D zbU>T*e=`/@ ֻ0,éPHI>$? ^)/.f|y$B#hzGx$ʬ$Kġ$cI6J9?7,@^spıB bK[BTUlЩ9P)G+ b} '?peMyzO+ijZj*M 2oчr'd@ ramh_( ? !PpZ?qףA`xf޼yT>B</{Ę{ڂ}Q]` :ERH^F9$gǏ6fio4$.woB8DrALAyrfPS,4/[KM I7}L1{*-wkݮ5\\DVTUlnwkIZ@F sS3 IDATO1* ݥgϞe $qĀa$ĦE\GGGvr@F$gԦJ+8aHQo~|偁Ҩ*@gq4g\q2ۄ)!ŢNNN4 5f t<1zT* W:m4=mf4D]'''FP>@zj>B#6zkPXT( 5N* jNvyP`4h r/'Lf66$qOh=-^L]n,Tϟ?*HAZ^ >= D]@|Gg;0[F&1^k2~%g#|Wzk@DyT~>{Cg7lU{ b#"Z#@B4ٚ. Zpg/˙՞IV`o׉}!wsI7Fj1O45]BW溻Yj2^k1FvT)i>]sp8W(| su $ηaeĦZQkMS CKD¦݌ ΒY@e4i:H G^n|NS:R_e8aWb v80q+*oOR"28l h 6}~'~HT\~"< FH@Os!m^< % %{LӨs3xI\)+F *:xX ?euӌ/%}:pa{б_E.!bI,f-r .NZէOrl~ N&;y&WDTo$6Hа^BD~A/WxE53~!~qPP3ΏZ6^6P*׼>Na 2RdT(T \y@o޼@[F<oH]癭mUk-G0G+k/>FJs,ALjq|+?u'ۍ.u%PvjͲz4 T)We،iq&Qݣ#i$Ad#P8z={Цp;88ޯQFc )JK]ⓓ]\\?#+>8[Pa|3\.c@!3ZbMl1%kߠPIҨ:&$MG4٩=ƥVSAV+|4 { w}dQ 2PFFi~}LJjf$Z @? 4 q$ H@+^W*ji6+@TR<0.߯Ju蝌Yru|? ti}l|߄?_k6$*Z< >IfѪ s=cr:'B*k5zNZ-6L8m=u/;|ǺKiQ>,gfOKgn'E :eիWH\XT؜I }o,(Y&130{36XpEBOk<K-qu:F' a2(Z ׯ-Cc@h|v/VZ(txfx"GQrl8^)JIRRYrxZ9/R&Z.Mֺ5YasKMc-d>j?l?+ K -EAY㩪(z޿orrD p/0 |ZvJD@7X_)ҶX, ){} 뛛;$Ab^:l6zxx8TznČ P4͏o1@aTXTT( > N] BsyC0GPx.YGg WE!HǨ0|$ȗ P,h:W[u$w-*N3y>JO=ǣM~@~7W|V/F(*X;jӝ ӹP. DP/8e ch#4fG.)N~χjFijk;+$&@ɡc8_}YBDzy \fhlo@bxE@2fxЁ9ga1Qt1Lы:Rl0WbrJgnJ\UjCXDk<\jtOs]ith$jfd+k uU  s6r~/foSQ"hЭ®+k>[ kf65¹]һ%V+,ҶqnݨkZT{V&&"0PqxblJZ-QHPzB-,Ե"UYUņsy؞E>EoFcfT\/F D͓ 'ʶR)4/KXFL9t;m@GZEQQacTS9`cL % Q%Av]S6  N.t;8`^*t)ˋVQ5 jU~}!&m իWF2}L;_@sKO50q A۳FC?.ғg9>>qqq|xlxQDDrxr~0TZ6׺4Zzh7K=Vmd'~W,iL5,\,M@C3E-SX,znnnh4tsscXNG,~ʟàuBKC~MQuw]}#1v-Ƃs0~<۞ZZ~'a @[,ېܼ׳y.7XF^~ I`H/NIR9AǏMEЃ¥M<*jG)^#pL&u@坎.J3SUn1rFdi:3m:tMAEZ}"yu1JyGeT~ovjj[,BZ-[)mFx @x\|)=*ĆH_֧OrTɽ^daRH'L8Il'Lwc$ʦhzML ՉPWX"53Ǐ9kZ\.ij.DSn\-t\gYnh$*DE=܄Z/INCh-1mvƜ Pye3 Ď[KZ0$~Ćnۙ9cA>|왱6S}00hz왮MYH S,ac{+FaxGGۈůJRh4Rp}RY{g+t+;_ * :!}\/`K~f҂Jv"w-tAo*FI NʼnjjkZ $@fI@V%ITINe{܀{$x]x^Q)Vmi:j6Yqh`fnǛsYOm(L7.hL~'g " 1"C 1@ż(3Ѐ ${=j0L߿7B`ڰX$xl,*!;ǀz(I؊8֢x/;Qb1Xq|hgpu@%uZ= Cu:&FFv{{k o£(`'M֓@ ??ڛ!, j}zPfrizy2琇[HVuUwգFK4l2 Yo ? _Z0lȀU]s"3##/8d5^Y$ϒ'yy)|HpGtvQcDz7旉#?$dJAL42C@"Oloa#  X^ MTT ZMz+Ȃ+U*?-j!#egȋ?S0' k%8\vU#*[7*#w]y`xTz;1M;'KS%J&Y$*cHv 7M$/M%Jݷu$MEm ^EMgv/pCkV3@mAge qwrt:u-H$YurȩI;ߛt . P/[(/˽n<WӁ/oA(ݮok<8s8<3AĐ{Orϛͳz=Ν;я~RW^9x^pv:wֹk3y}K| xNSW'*MgJWL&fΙ:؝Un4ncwVSPT^ h b'ˑR)[7DpzE\#Ce}_ [.>E d̳ڮt|]zum8TUkjtli1*o^Ŋ։m#||cOy0?tƩvǍ6eTV_ WYV3_T5y#J ݭ; <J$jNTv `׭q~$vaܫw*C9>yDggg`c%'IS-5$;z k TZS|܀ h5tOpeDPd|/ϒn@`{Vb] F'/+  뿾+NfUUKmEXE <ʁDu4UUq`tAX~p}}\ˈh`A r2 :,7w^eq pڨݠ9xxF@@鸫A 4`A/z!]_Y+np\VjNL$A`5ɋ /oM=_HztVEia4Mu]]__n7~ X n֡sz۵ VP^+_] 4Ix*Z'Z/c['`KҳH<&]'NWMT難MJM-~kBV˜mhԨ7ܙCLG`m#pJ sKQ#p1b-Fk#Ɓ(2EάEᬣ(r|&\)8Tg.ΝA3g1f]jw&s&1$],Cqvf/˜nj%E{z&+@&ķ;Fu Zy]0[e?x[Cv|y302 pdvW%sۨRd[3E,Jհ&1dxﻠđb2O[Tܢi7\.ȗ+SP!@x2UާڬbzFfIbXUh(NP|`g!< y>*RTRP\juB &”twPkd``n@~ۭ](REkH@Ub_r @av0n޽{Ӵc/d\ˀem^׎c$)O$"td = amOYːAv5GI#kʃ; $jA9f;POOOu}}oP:x'^nCi?+3&م#y;K$RaNB(I<4*^O%^; jcG(v:5dh]ݺݮ3vNQ${Хyáz^f%.q{r hMng>|̶0;[mŅv R m6ځSt[< ʹ$r,')(Mxߏ׮ѣ{##Q.K{}xt#R…dgz99q+U>>N KTٙS$c8mBjEIU|;b.K+CнZҽ~|Ӊ‚ϵ 7 P>t#k5MT浉޽MU*QRZs/N.a]`.'~1ND4Le';&V=8enZ~r>BFnw wKҏ?vcsf4AXcp2^uz"QFHiB.tĸh@P I5 5&o[ +²jSJ$Ys`0F\! 8݁d$. Q@+pEЁXgԵ$ R~mi4*˺PSG*}0W}DJ)/-TR:&E z4'2{>yT Pk+rc g?|rߧigϞZzx,I bYK\pIɓ'zꕎ26+Z9hUX[f|r %)DcSd3yչoV u6nmpTr=Q%mX6XJ]0#D5K)8::r͗udDG3bP Aw뼹Qs[r)]ёV@vL&0T$j5@/l|W'cwx"Ik=)`y$kcsz; Ԭ&^j;= ׅa<JN4b 58u֜g‘dItA7 SrU|$;P!Plai0Ml[.[D¯${FC˅Z!јf3}}pH&h5ʎDZN\|9glQ GT͹qqB&vm䣏>L`P֠h\޽{[kp婵fַvnжz8̘"mA/G%!@maT0ݔDUOKGN of4W: ܜ%>n>DgI捵:Z|pt$gΖ5C!GX=#0&ӭsFQ# $Fo]hwqmN&woWMv{:BQ/w+' ;H ߪ>XE#DmGL{O"-8eXk4̻ڕgVż'we e?0ɓ'> X7sb5.\.c-+ɴ5 nK ÇQt̚ӉG~}EMAϞ|CSyp)&Iz[5 ±E 2MNVs.E B 3VԊlImrkҀ0 uw xV>{vl6ӽ{\I1j#CaZ:OXlP13g _lGkp YMshx@.0T ]%ɗWF`چ#lDqI8XA H$Lt$lS,1v}=>${07]jo`+Iaj=`FahkUCŴyK%PNRguDŤ$VrjhȘV7vS h ?$YR |,?R( y(P- [v f8bI mDR^5ƢNtv7!]2w3'ϔBl`a@n B$eE~o2+sGMnc55MgCBJi~AD}fU.h>ժw4R8V5Z~10rb*-ɔ;̸&VK4%6gF$PmbP` LDMm^< j4FDa8+U+Ztvo1vU TX0F nAi[oZ\0r*R֖q h=NĘ&goGCŶnUǠV'jՊ%&ky w/,ժm傼BfsgN.Xi8: s *flΤPTZX%'jbZ6.%JubM (r7^Zxu6/Ս 1Y:gV`F(e<5ۿ]wNM Сsm6+%mr7jg*e<ҿΓ@\SBMi" Eάk3@T4>}0 v9l@ jjl((wYvInu}}^Kv3Mx]5Bh>P,@2g^+2I(`1!żP8!~ȯ3AdI-f̐[Y5.UيnAG-#J$Iy&?D;obfژE~x (U8Y+D*-8KmשZ=8Ɉg` pyv3Ƹy8v<&p vxOB'-^+0],%VEn^>"Ayph 8m8&P\ d z삔5Laee~)\(QC;>ہ$RQO~N$/pIؓuK^R|R\xto 7ͪJqA} %HXbp S9[:+IfY)dPm{,3:Է"bJ(Yz:T㚶նʥ,K)5J=^؅ 4A"`4eW7TݵY1 n.G]#0pNr8֌HҶrP"SG}G-Y7xf'&8Y@+0-BKiz{Clr I[kTYCE@µݞdZ\.:d+A@(ѻώRuܸY_QP^Dbj9[]EWǏG`Kf m Om'pϰz *  ylhQp?Q@Y3$Ob`^.Dpt֙x驮l ytTV `7,DbV'cV@T&*#yzR*4wUAQ/j:g b ŮI"4 f$ TFíTpTV?S³c&aݮP[Hv QxwK (,7Ocw(o`~tж"Xʀ"(HrY|t(]I©yKr:btjpP_(r8 \ n*ґ^F#7ʇnZZ,St]]__g&^ŠhtP6vuqq()HPYwWL3|ƽᠡ x̊_@unp%R T'] (k5g9\+DOTZH恒(m)( X_QlY%+[1JbG*4\AW])Kc(iKۍuJ^Z hG̭B3PEq8I_KΉ]n@h 0E&a4gU :Th$^l?('7s0ӧO5\B$Pei&:qp"XթuγO/kr5*Z*JuD5 尨xknjiZ;Q*?HS4#|.yXAb }:Ak|s_F#uQ񱳂?-3M<\"QZ"”N(X77:5@F!FAgFh8Zpͥ3%PUQREsD;)06,~h_xn^t Q߱fq_!@f`)F PRV>(K#7_WwHx*䋊JŊ򹂳o"`|j[ry; ,12&ֲq6B HVE00 iOOO]R{Z<ҽN Cz?8v !W4 eJ%ɁTEh$,Dm{(ܯlٰE;4f$ ;'y'}+dm[[;_$&͑mNJV5ꍌoIA.!qgy|1eYg\N3Rl[h5jr|.#qu)JWDY0@#z;*PV=Nγ 6bP@cr9yؠO{(3e$_|w_Y3t1TAt<`OZ dXF"m/Lj9d2qJEjս{eh lSg+B|xRK j5]Q{jא5 ժ[eb .; " 3{>(-:w( sד-'9- S9cx8Juuu`Zh4-$ӡHb"3so2ϪPkz^#=z~$I37^ĽNwb2Z ytttXVI4VO3sJhϭ씗sMNuJDl"E>tb7M7~;_V^k @RtJ/pDA]3ߛ k0I+t/ƚ,G@C|ƨ9s<0~<86h(װ; 0'3}sH B/@@iz 3.n PbAqzPǡhQ>wO;8U+ʋ{|_6xA$h0z. IC%y1bU@°S(.*0N$ @V@CmJm/=|s^)P&s&Va9⃪|rt)WI;#uCN(X @Fd J+ء(ƣ*Ւ|֝y?< sޤ*䪚BA^rW{HIekHBMR0X pgϞZB,TXMx]:Mg +$mi+ŠU>{wbE Wj()\-[EYTx4VWXr1Z IDAT<7]E (h%q>f|!PT3s_͜祊y늒(P\p0|l/_fLco΂ݡN7A:Da$#2t/ y}fHn[BMû=b;%:Hv$A⃠f9hb'6J[PkPT\[ڔT*5-6 $`E"g{fӧOu}}Ԕ, ZNq9W^}@Dl;J\(rǾWx !bJj1\ŬH8rYrQXjxZ'}dUQokU*VZm\8>>? $F#$9>u69ocDPF5=9Ϟ=sbJ`Obl6uqqmilzq3AaY H$8aQw2?| iЊ[AX|Aɡ&P(8膭%a4 ECEx 8@K!>E*A.-"\ x،C2%11Sգ[]TzMJd|9zmDJ]MJ6DzK66Sf\;g8DWWWn%<._Λ@67o̚Snܹsǡ;m› )l9cd*}2$@T0HP.(Xӑ{{DR[pu4& IQ;*俣rBP~//6yE'#yڏ4Z}އ~?P/_tJ$ DOw^W^ni:+\//I^xX]J=O^*_T9\ -IzD?$ݮ=Z8﹍URsKMI 'ݻw3S v-я~ v}F{@Rs玃Q`s:SD{cG?X/F+bAG 4)=8dTL7Nٱ.PQA焅 n /f5L@Eyf]wЩeɓ'Fz2)p#U<ƾaT{((I7T[K38ړJ|$%6HvXn?ojPZ *br^*],BCU:B:Sefb/ ο\^+2e_*E98[ Kb jxtzMI+UM*lj_+5\r# ?`F/4_iRg.?'/^j{J~CLt;!!q%؟Q0L>tB9P(\jLJ9;~u'cIWpCTg *)5LDv[777:99q0ύ`EHtֵȘJ(ZPI➵nS4񺬢R E}Iqӧ/j[GG(Xni|h4RqhSY/[(کONN^J[|leSQ!rA0X_ࣁ~S*UcH3  ƒKM0tNv?7<cVPqXq4;</kaƑwd}//WSk3X|Uu؀976ҵZHF p>dQV ^0 8{VkZ2Ev5@dVB<Ŝ5gp$I&4QRd6RS?Tg\FgY|KV 7sEZx$$xMPM5_5[knf?$<;wuK|_rY(v]TA A1DAevĂ=yj6}|vss`\%roN8`P==! ٙڣ#g)]$p]ZA$H hWѣGz*c-bT]F3bQ^Z Zf!:(a/l~DgyXr$w;3W_k<"48C~u7㪒jQZKQvb*/HzotuV*wIe}$I]wʿZhhus$E5]M' [NԏŹ #d pΘN\__;v݂Zۭ޽% @eȼsKVׯ#p3:a^#q%;b>:"K(˻e @hǏ@Ҩ( PCTpd )5Y^pZw|Dwn c잤MpBLTɊEei|r<|m]@clZKfR4M *)*ȧQ۳̻Ix`y}=弒6XFVDWˁF;+j*ȥZo/?n3W&k%Jt{jo$dk?yIUh/%O?ӿ`Fj 3+*ZVFGƖm@ꍺBGqVtpf+a*S%뒂r/jZk eu=q< 4U3&1ou]wVoQ$/kŘ>'t]5MܨX,9PU*(I'k4F:::rgڴnv*BGY VLs\)MD<=wz# .$3ַg3d@`)T[aөݮsnCK14⾼txpҡӷ VEqa].'݄>CJ7dw ё]¸8k=x@~_۽@X+"J0ճ$J:5)ΫhX:Qv^.5f^,]wkaJ!Ir6á+,Y.q-5l67Ĥ@E.4c6l[A,>nAnꍺRAt>R>懺YX&+%i,}2uNb%2wt!'ƊӭF3?/5KT.Wu1>"3鄬AhvU\l>Xկ6 -  Ǥ֨#~EfZPkL. vDKQV[|>;`0p]'///@"G&`JA7އ 㨛*#e q#g:}ǙC~k,r]!%'L@Ѣwbgj\H xa!g- q|, v\v* E/.d "B-T^<:Ve\H~ЍPoȁ#6{: tv4yVK{^]\Q)_ܭ%U~ B,Okⵢ,:`ϓNZh1(ڬ7T}FĔ JZ;dX`CaeG΀u:_vP*t# GKQXpF;O$D -ڀhNX3pNOO<,b05J^R5'kO˿qQ_j6 uhmMC2c2t~4Vl6Y)ot9Ts/Z,BJG#m6+e9>+ZES=xs^I[l74/UIh.W*U*VTT W.nBM&z=2ako;bx\Jrmд֎XZD B.a2~11/ҽ.ؙr^GaiIE3N&"9h6/-D"&ÑhdDPI6aBjr$I\`BbDS. >olZգG\\@$T?dI `HL7n3$pN/zZm*y72sa.wj4j9[^oV ̕[23ec%@P2Bg F-aQ`Y[K5~z&Y#fFh0!w1m]\\0gl[%;Lu40L$z]J{X%CBN=Xdb,)\Q1 lLjHVEp:??SRl4_Adeq2NrC/R~UT/બ1IRqp$KPc,@^de28Zٰ`B`j׷X,_3R_\E+kJ vveC/O;jkz9#="Q+\.N/wvU"Vp/i_t:u7 y8:\=s3(8::RpsX)+# ێ"ij\h<b} W/{VIUEU{UnwBt'J*x[ptb;h?O$JDwɟC}'+UjEUyn^j9Y;`SguS%ڪ**(8M][=b>>] O$_r(?/t6e' @777ַ֍Yx. *J:??w_d .%A~T}o w鸯g?Y1\m[-xPCGbxh)DXO3B2 )`c:BPDv`v2_ D)9VVF\rWA?to)R-Cl~Hl{Xz D4FC ]#1rkɎUkb .l./sI8DEg@[e /LB׉ҕ@Dmf@|Ү\.z{c.6Pϵ&o'bOg&3gz]pgX+B/Y WY8{_7gKMFS%q.,UP$UF*rYEfq6> hm&xG,~ Yq9@c@t4^W 9O^g?)_iT/?(Jdgt"+%O$Wlqd$ISVTv볉$$f7Q=^z=VBNr^ٵfEATW&ԍ)eDZΨ#u,B`OV,*ܪZ:A,E͍:CA,` Ifd8?爣t777nwDjʬaTTԘy`xAaz BM2d%™Dz||+4(űhx&XSs@Ϡh}Z$1; i*u+2t Uq zl6NCOݺ:ԭ\`I^ &^;bMFÑyU i[2гwJie7)r*4WZ#͖r< TN3c =3f $ ""t5@v%|/KňU6#^ÔJ~/ٽKM2PHfY(W)'~^7&NS3ϛoCm8r.qyt?Knv?Gw"[ɋ].h&˗/5#U9k,b]Ug?==&g<ӿYQDE) T5o|É># GOb=2'|"jE82<{bAOP$QUz=1#nm)z]Q}5p\Nn b:::r!ppkj4j6n$arM \NATz&R+ s–K"$m: *X,TT |*-[v&K&;i9TVYuA IDAT$m"ww`~>87]5^2u;Kpݳjh6(ߩ ee`e+9RIR'BORjFLU.GHrp,HHvT$vP|ř_VMg^g#030.HQRcǦ۔ڌ-a4BaDƑf˾_*N7K=ȶ>IHaF$b҄7uF;'· V*ʒk28x+hC U*%*wg7!?{i75D;[o^{$U5**vW\GX(h]x||nK'ڲz@K*@ >T? IdY xN5 CanY!# Fn׭aX₎ 32B;t]v[W 4UP(^`ʮ%ȜVS#ؽn`0*uT."qS+3ބ`x:aH000㨶4U^SF3?>52=$SY(>q"w( u1T?|9?=S>_PσeNZ1g)W+&z휆גV:͌"yN,v07쐢R O; g[5]Q(ںs $^%clxݣpVˍUiӠj5}?kAEoR82LjiXqa gl:j$kzjE.+* O[$+h4/B$KK?^v\BlW V:th#qVڻc8?[aVGZ NW3K+x6bQPn[ jk^jN3ۻn'aٽ͊䃙$K* ꕎƣqNp 0-8$&P~lpqqfi >r<գ`B;^|ČOAV\#cK,0^ !l_Bîer'yfARy63ŠN#KT-?vP $\`g-F\v-,]Sd(}6 CWR߃3wHto3{BIH>c‚BrQiZRϥZoV*~{;U~z>ʘt3qtPJKMjf.|*gf49;+ s.4s-V̥D@G`1(>]]]RbڇǕ IYT 1_i:X>k mzH8 G'j{Srݬo&8Uo-VS])ISu;=MLLw >}pr&?s=nUɹ2=kf72}|pk Eհj+k2jި\:܇Kz=]__s9tΝ&0f n<;`T$k+F>~Ï?s3M>ֽ{gGGG.ӼAyF#MVz=/NKݢ%ۅ 4ٞf:>>v4f9,c381xCHVl7+kC*L~P~H1/V@7&#ӡHrt :.Xgl6u}]\\7a.H)@T)ڮTK~orWALM`-`Harᣇӱ֫Hi}5;ADo[TbZZ~$LE{i<$.(9Twl{_ggzzDQLJI9-+,$2l6lE '#0@ O~ q1tI(ECνUukfoqHF=cVvǔQȕAҀH;ʸ]Kd%&@T*\ kɋ5EB O`'JG@ MeI#QvWՕ=S3ZͭAvV(NM,!|ak^-`OjfMWk::*yPd>WcqguG[$q^u~ZLBEQ+άDQdShhUi>S u$*f:D1i^w+dBw]L=h0qܤȰϕ&Fz q$)QP>3w4 Zs6 ;lՀVi+IڍcEI8h8p0V?`8d* g|.Exzv]}-/* \]k V?_[^ZMF,[ϟ+drvLtf Ttk)ZP)_S~G^wcGrT*7;5@_3jT(j2~]ǹΎ3Q%ImwttVi g޽{LfM70tpz^ÉxK޷)}m]찅 јNr nd 'lё^~4 =h`}2*Yņ~uܠE#Lw=p0e jL!ٸK*%e[ \o{~g:5nZzݨۻQSW0cMcMơ&ah)K/WILV9ْYHNF7Wz_O飗oHjɔ!𴂊Θd bw Y4h*R(rܽ{WN'OY˿0"=99֖ݮCqO ^\\<FaJVUm, CuΝLAsn|vL1瞢؟lcBCe &06;0PAOAa h4J M]̛J>˗/J!:7A7\tF84 @L&" dGn7k.X.@tk=OmZu}VK0{y+e+G+:1vXӛF"kNBV )1%/~IӜ7}U5 EG3.C5zՍqIZY*1 GEWzyB94#뼉ߣV5iq]@|x2V3{|c>:qɜ(.^(~#Cv VNώ_h2髖rX?ѳS8gB~I)KZA{z+rSE *:,l]C֪; =FD4 hy d(.Lp`z3n%G.!Z-lmmBDZsQa/^. 0 (@$adJ^ύ {e_L;3}עeKLmZ[[{B@ і%Kw UlO"%1(8x{AAHp#-gFCa҉Йц mU( ,#WѲA$iKОG$W(+ O~_?˷SlN/{'uzV7>E~|Bh:U}BC3EuAт=IsHR[&؟"\hht4t\/Pdk(C۝Ø7PnFrQI4yᄎsTtzO4i6R$݀v$NQ3K:R++F(>,(N}E8zv]}義q~ۮzi}Њue%Wڐ' U+muݹQ>_pKḣkhqb&?dmBG1r{Fek]g㞰4Y[Fq]wf2X$hVɒǚ٨/0b`uYjΎ[BD69 Ŕ 2-8д@stY ]/ oχ:N8g֦Iٙ{x.L%@# Cw3 FKXE^ * {X  MofHPX1b)W-[n̉NW$e(a[w׫gDQ8u  p HZsfôc_FM5Rt ]dH1DUZ.h;6t:jl+_+Fq8r̄dRoBp)r};,C'aQ_|EJ^AKWVPdE/s(ؓ› AU7}5*nmmI.//9nCb9oWXt̅BA_NȽs\T*M#өͦ+6u>ޞcsC/̎XۮCw )Rf+Ք`XUj2 5`80Rx1d`5>X,>1] :&ݾS$Bw;1 hȟ9"bnHᣣ# Ô↎FcB IDATe j@HN0677]g 9Óth ʿ3B}Q?kنp"ewڦ%chewRl Msy?t-`@a`0kWvwwu~~ܘh4ܠ69s0hssӡ 7RP ZTuӽQ+Ū49;Ld v 2#b7K ^^Po C^dEx6Z _7l@ʹVEv Mݠ,t$f珑 4 TQj$/ih t6JXt~~v.NI/¹\m¼ĴSkkkz~`%/// F z1$i<koo5!zw }姾g^_d.2gSu(4tJ5oL;=NFn,ϒMi7ь!XFNah4b5q8W* G*W%v~b/RG`Qdߐ*JqOـ ⥕~~RDz%| F)<@ɂ86fOz$4r6$eZn @ʶz^I/LXR 9TK:*g3bгgϴj*gsn?9Ύ;A3Fp6Bnocgi#v 'u7>F"Bf{" >RAv1ìڳ:f VU磲&B0sASNpA\8R{IC5MC{7G̲AIL0 J>88pPlN(94̧! 1NBnR0!mu{TK<%Ti4Rٱ#oSOuw/X.~VM׭P4}@whnYX).&gC >3.nL1,h,٤bscѳ@b+=6.k< 3^$yP4"3jl/Q4g?/C]FYT[5^aѰ;[ 'DkٟPYI{o(hv%tV]tzy=]U8ըmպQPT2WWWn)6d&3d !*% nmNBVd"(ZS1 0\[[[|ƄС^4Myg xwŋT dh`Clr{;@k\E`B' NRTO!CرDAv ["0Ga}ZS`r`RA`d8>>v,qxA4l ‚jgќ9h1B@Հ0*vU(G3{C[n,mW :p I#ɢbYdyy繾 ??z}KZvLp$0VDJ bW]|0?x ﰴuGc`Zεs- < RܡنáVQ c"EhkB j oF4&ϗYHLhg$VΰC|rsHR.MF~)XWs׿D-o|ZrŞ݆?k-èUTw ̃411siXQ' ;-M FnƲ빥 M4 q-mllb9.uqq$S:d5+Zgb0 ab'sV9'81v[c8LHbĢ\6,[h HaeAb` UѦ0:Ay} ABt:,^)Uk1F-60QMZjYhtq*TbYu:(6sIz(T…4r]~9tWd1zJ6(-f˓ź@S4 N&d>&]EOӄ i&0+,)H5t<Maػ=bג$]6$?u\{+t5z1#[]]H+z/*{cGt{"*zo3J^p3Ttv:w^<}%-jK= UE#_k+t6MEemf(Y,3*C㴷:\__1?ǧ,MŊ8/IϞP7tz.2H_E. r8%-T777v&xF@rY/_LY 3Ә?Կ`gg 2 x91Ô :-*vBZuo842n{Rtm-C CS|)<`>p +7z%KݮC48h|M6 ^s7f08oK\uL.{Տ^GSEw6:Ytνyj~wpΝ'YMo"]ܹP!3tH~B9vx3@6#"B)1ȋb2]-;DlphHh>T&4Fx6ޙsNo=q7߿_n~0hooO2h11ts3s6zT5w/J~StAZzumo8+-I⠶tASOS8M|V9kkkt:7%0מݻkm %ōς %EQj(#e80l~8 !.}Fmh͠]hu+B ƣj5 CyT\U{k3j\S-gz[p4vr[҄6&i͡Z,V -a[rW Se4 Pp-^eAEoC$/?)j0DŽY箝 L[D7FVѦRؔ-pM7bS1T=9tMǏsXҴJ% /]bĊ N6fhRR9 7&4-;F˙q}}4bcs~@VTRJTaج]%4114(HCB9քpѱug }NϚ0Z&c`Dn6ͮBd+ij<nfWۥrY^Oa48(&*E&hQj^0A+fK6c\#}uOY3y~`$LIi`,!)?G &n5ǁh3VYΌU(e0wfq>,;K  L&H~Ο+)' Xo=Rơ6yCq~3]2^ Kejz :JUI%Dr}Ak.Pz:6{777]#D:Rn[4~_{{{:;;S>wCL \44P\\tۖ¤9bp5%DLk;zpO׃9],tI]'ƛl-E8;#qZ X*Yws26n.IztghmBF%))H*=|7]'А%IVZFQf[ouG4MW*Ysj4w^jvƁO+Pl@Ń@fS]+!^룏>Zy㉬B˽1x7s5KݢٞL&#QmY75?jE3Yן m&4@;dM86Ŗ"Ía̡BB٠}FF[Cfl7ʐT MVx9&#MB@kAwx68}r恮r}}ȼ,F) 46K?\-j<TUptd ^6v>=ɓN_\+*24!vi$Ia*'iAn؜][?@,Xe Ȟ@ &Iiw4 #kk*Jzc}?R;<_8SF+* 1[{ͪ" MVJ%Ys.K]m 2`6:#Zʛhk2Nt~v$tQd1 Gs3N+z&@# Cu:,1O!a/8عt {n]AFߦYD6N8jijGV Pt#2g_hX?v4e^p_cE>j)DAC?%`qA 2il mƆsàNʡŦ~]ȃɮ4!ggM'۴E=zlAj L}H 7".MS.gT P4TTEv:4?/C IDAT-(21֤G~JTg4ͽ a5 3, ,e6Wuv/VrSh"9h`ONN|x8QPV!(*Lϵ^ks}>Y4T,o{[^^:/%=O5@Eg- N~{d2T~燝$,JӂujwWEO 7wDZ+\78YDIAArrYg?bn.b[61g̾vr3ݻwOng69TD0rloo*lXjZ{^x?Q4ȓlKI|:bEcY#yc`X\>2Mn d9(*p|hÈ9\:P1ɼ!vg1]#P`f2uuu.e4aumONNt}xŴ0dBsc%IG C STrYRV| pfJWˣGjjm'BJ-kXP%63;=oV`^]~_W5~N@h-P5#7,<׍A ʊFE^X M@2zD`8.m{te|)=ycO ??=ZeSw#D6<]8fʔ6UL^[ǒH[2|ҩ #SxWb^^fIlLoFKqX[[sΝ;:>>vAl4lNU "kccå \V*]\\P  ܂ zti h4E BG1q#Ԣ5`{;潢رBFA:%?Q8p0Ñ[cT]EήBGFGLfM]v"؎s6C.\@gК :D }Nqc!obs'.uZ,*c(<5qtd|!x8X)DQZl!o'7ai\i99;{oB0^FM'8xٷoB틾rA^5^D2V.r1HI;dͬsEn¥5i#Q)@ ӤQq^&a%ϑƣYt*U+uM5Tm m֤"ba[49[Zͫ"mtU[(81flF!e\˂qE:}Ea$mgV8<pU ժ HT`-y=SP3!P[Bh4+ S?k[ѫ '@ы9rvg35ܦ6 RW^]X1#@y(/ԣollŋQsz3 )g6` Pd͏Hwu6 T>y`Apaq2 ( g0f-wyNNNyc{4=gMP*XP|?o$t-Pd 7Xw 8\___aLH=kkkK)5ҡ P9V;lUBQX¿A W md=[>Wt9.h}3XT B^BNa4RPr%Y^|+w)|SHoq>+ǎTB_A^{_m]G3Ɔih:U>w&'< .n_c֖Sآq2 ErQ8#fЂlh]09歳ZVjE֖C HRYBIn_J|rEM5֋RkᖆkG۳Wow8g JK餬aw{ YXZV"TQ6Z,[򶑤EY^$,jc}W~BMgd =+d2q(\M'6 P "޽{a"fub?"PNNN4Oya&Cg05 CFj0Nq - @Ɏ Z0lH/ _*fnEK@><:UXރFA"5f3MUr2'/76ؘ,m.x)*\G9}rc{n+* %aQ~RuO[)m97޽/_bhMJ<؟$Ic€&K΋=za/`IF677Kzss] } _pfÇl6kS_\\jUV}d_z葫}C# C1:{Mvv3- OpJZq2M;J4wxx3̴ŎLapB/?"=cz@f[B;ºcV"oQ0S1m* e3y^ /}W5\< @ai$)2bhu ،+i{nR?^-xx˛g*%O]ݿhݚeÈw=纤у%هΖLJa!C/bF.\[[s w+G{ȕ'l'jTbqj=ݮ7=Ea qg*+wI[.xaOˁ6?zsL^s݋$7y0 ٙlS*jXu8X 7nU uorE+8Z95Hf 1/B0VR'skk DbQ̜2L!ܓ ؜g;3v W6HDŽF6x Y3E\4gw[?*F `D5::fkT@WdZn[Xn<ʹ|ͦ+J]*&v&}q`#<8ёNOO݌$E!tG=gw:UWOXl 8ヮx,>lg;I8`U(W+U9n2g"+J+gjtzW~z{V>1m b8{j }ӿ5Zih& n\]Mc#ElSp35kyfk똃3]; FB܃:a' r+#yšBBQW?wOfin,JyJT;[d$o_{/jym73,[w- xC(;C?sę-M^P.3sfj8Et::kNVw]B'p7fpm3t/l߰>(C7cZyN:=8bѳmD' 3i Ri4Jzrr%xA)g4 [bX[3z}9/S#9TNG鳾ip,S˷hh2t{9a0H1g_4ao~ޢ`-:34d[a# *=l>/R^G©SOY[ Rfs /l,*ki3Qz&Qʉe'sYm[iӆ42JsxXԻhkcGY: \.fi T^A\"034yV0mnnf}uyy yS@K.//{yX@m"hj̔J%lyuuvk6 8dGEvwwݽ~||>f{g&á\.~CnfDVFs {,҄fwF0v #CQx;$lAᴋy8@~_N]CYs푦Jԍf`e0χ䂢A", J0Qfu?~JL\JNq^{ $Y8hni?}_oGJi8͝ |ukAvLF$k EK0|sc î zC kWƝe8kIboWO;y/+XjlV)w2{de&1eޜd奨[XɢQHV,Q󲠼W7-k:{yU+ =M P Ѐ iϙT0l6]# I״MMYό1޽{VzC;;;E#]bA?X8]p͵e|a_}ݻwu||֑'4 ;0 Ս-i4Om#H3 ! +\7//"-~08wvvtzzr)E|>ԧ>>H.}hva3.0ƛx?0q. ! &ݘ0 *&wq5woIP#7G*MSk#%Wo2sy+mqZZLTkO g1cwMaZ/Nu6Ǐ) :TK#ŵO+0уﹸЧ>)]\\(9*Pk,bz<k4kmk ^?Vi~Airg+r\!/+ziB6+J$+/PN2@mF)[άv3Qy^o]~\ը7Uzxx/_:-;,E4{` | Hts=W^9e{{!s|BNI%RRI^z3 U(RF'IY8G{7@#=5$n gssӅ@-_\\8Ԍq҆:Èم'0fܸiR%f.mAt@tt*A[ѳ<.>ZyP$J^ɉ^1ܱXކbe6PA,=4lUտT-7N"cUvxxV s4X;M6fDQd6fa^ȯ'iHa<48GKCw:RmW6e|S~өbg6G\$B1BWڰ6΢M&wCI&>d\XUt`bh:4*,>Xg?H7~f*:D٬kyן_//?ѿS4*h2++8[n>M6nPe4[9w^y%Re9Mu/p=0hH'-6z6wʳ:q[#Jkƈё 8Ө:I9󢚍}@ao$T\1\>TӧO.^P֠f4n+CP`$;~o5|$ËĄ$<) ;-8Jit }l6 IDATr2ܙi:ѓI︣y-4)vnnpAMcǺ@r<U]ןpC;jpUJ<("(*I;#)Ι?;׍A[0Hƌ?po&^vlpچ]\̋~o %5XPq<^ ūnmTt& :#j5I9߾(A+)U zp Ͱ()e5ֶn]ɓZX3+}!PlLYsݚeAjh8ra:`V871˲&YѣG:??w.|C!4Y7 $>`6MZ-mmm sr GR@06CAuϟ19IIփ"3 xkn6kHrs9np1E*EW@EiMOA!.P`Ī;N]1%,K6,B+Cl0@P>vt 5nӊl6 tᆱVk/Zv]r1J;,4F<`FU@4@z]ATSq*צ K7oU+$y>fšCI܆~\?[TjzqCMy Fh@ehi0C92D`RRqa+4=\RYNWc ?\\MHM%Eu7ry_QOhAo[0Xh N-1QݾIJ]{<ӊsI[ƒnG]J*R;'qq): cA|"(w4z1g1fn1EXGgÇvS4 vv:Ԉ>ϩիWݼD⋁UfGv&("FD7xH_}[zu=xXsɽ#zN\QxL:z;9Ǫ.܀q@ @C.@;D wu6#&J32B:88pf/q 5ԍ2 EQ@BQt0Vy}0?Jٰ}w`K2ӷ *w% H9/?Ɍy"Uh7Y?^GJQq@g ɩVʈHHbX7.V(ޞ.//=HBI?5T*j]"9IW=ts}&[_ϔ*Ϳ;r.s/3 d>2@~bc\WrhD~NN?aUv$7*ZڐCu;=G.D:kFm" ~fօ ^3"!zRR1"CgXV9`\tj׿~3ʺ =ӲD~Ë/?Uu[(\.Sx_wy YL&~mgNA(0;mrV[`Xuֲ# DOPF}󲝣6nnnS~!AL% ̆ja5ѧ$͍'Hs6 v(CLXNZt:퉪>SYs}Qzm)*ʍU; *oj~rxEZ%x|:X#ϫ|akyWjzya8v͠=0~FeF9}/tqGe&۳kR+ZuKO+6R@ { QœsYhk&1咺[uugR+ɹbkG:o7tI`F[?;_5.VEAuRviFv"ފ`{ɉF-OcJ/x*hЉ4D*+Bԑd0kwwWfSjW#5 ?tna.k`&IC_qYg>"COM.Z3MS.D¾///Sv_&+\!~V|UBqAҟ9W5uC.;?MQs7B_w7Ojޜ)RE[jTVn_ٳg( UБ5Oɜk4yUO&moo^Ed:QPPgt.VOg&nRZ+jů?g_?:)v;hky^nNa,9L?v#Kiɇz vIvcuI^nI?#7Ω}u:]=~WL2oa~b_Rk09=8K(%0wvv|uh4P.51]2bUիW^lIw/^P3pIA+DU: IGokށ=f I`_U1 s,<c8բ`K+j(,EVD(*51Hs 77ڪcd ΅̘lN"CL&z޿$Bׅj'O?ϮY\>#cjr=)ぢL2ȥM6W@XW rQ}0$XD~*m/ >^Usg*6Vz/Պ:oN~ZsURF*nGn^ynẙ!oTjMS0/2XT~/7OOm?Iun&AbV6U[uc) vԭ|Ssx]L\$*m9?g_ \P<*(5iW6,Łnn xw* (sXW聝L&w{^yϙLr:;;O?}k\.+\w@^c^`r 0xZڠ<wKu[Wc:ZPDQ~[sb+F AD*:k2AdYMJv [8hc`i֛7o<ˉAX=;T܎@OQի _KUEz%`Nh1J~g9x*d ^ Ȉ[PϟlJTZVan :r}u:&'򿫹-NΧC1IPAbRp,˪]S!{_ߪT菿޽=ѤS[9D4b0u۾3%W/幷xR`0*U㉢Ldl6^bq0[҃Ê>=ԯOUzotw.R{xt,y/kRꀹҕaA}j4z9د:8J+Trv?kscLpw%[Nm\ A y]\\6!*CL7?ί׬RYK96Dg{ܦQ>Jg*[KK3 rHsyy!sy8BXkuZʚmllšiOYkh̡X)ApmGj<-`WHf#"XSK AIjEk dWfs0NP˗/ <a~ɶ-aWUfB 9WsfS%=nf(u"!R@FHe"Ueo[ scE.jDNt+LMFRx}kR*HbZ1MuD+O?$rFYAT<3M'E]n~lK6rs|E;8QSUidv:$Wͦq𷷷2rs?: k ZPCNqcd2|%LrVJ>ͦ_߿/I:==MTgͦռxB^{yy/^W HYwOիẀʶFJ%*ql^ODj4ecU׳LU&*oTٌ͈?k iYZ ? 2R<]G [~VIy^+%ΏL ksK0a^J-E%EAA٨lXT&,( KE5e<(Mb7Txᴭa| IDATZIKiCѩM㑦(V^Z֋rDWw'4SUk 0K𵖟M|jGJTBM.q<8j79]5hUaA+y?R}gdgҡh4|I}Z jaaZJ0^H !loou޶,2Pʗ]I,rȼlzjgOSmnn&`!vZ#GkLbH=|PǞ`LŶrLrN!mw5*g.뤕N(Bä-0j2 Ÿ0b)%nTvP-f39߻%>ve+Iis u^&2kiuUֵ{OX=^z]d2~8JY){eX@)J:vww=uڝ!b| 'Uh4Ux;A:c!tXjs"ZKݿ߯60 g<Я?`2w a}q,~A2 *; X-̌ImUR%5sV)ͰCY-WJŸdiL&`[}충N{9& $(V(`yVVhF`'-a[⾽mKr*U M; CjS)ƣrOuZ,/A5ĸsA2Y s"K >6x˪ăDSڞ ۇh/K 2T]'~gQ:FWW, ⏈V@K~BU Xw[ rҨBfMXk~?A -'ް8İgjl?HPDil.R6V:=‰7\kpqj!6. (XYIwLfb`jjEs# M^~C$i?xٌOlJ3+Uƒ tyw~,b JHX4\bHbԟȠEvޠm}pnڕ`K`CHuڱqYhMu E\h}cݷ0N>#V9 t=5 ]\\B"1g^I ZHiaivwQ U^l6!]__-,3&?VjNѣIEŲ3zoj|>}Ouf2}Lc*k(p?(#FPv]Md1Nw\4h]=R["9ѳl2æ0*G$RҐ=,&-2O\M(>me1EJb($n3T@n\t}}]B jy'`g;te7KǬDr~Wi(&|P-*X 50tj,y5o~.H[.p}ojBҪ㒤YţNz݁FÉ0P/NK3'hR؄*rFP_S&0p8vZՕJ$pgx;I #ݏ5)?K%nEa=NmhyZ'E *2uѢ - p1l6d np%稖AURgrwww}[o@j_`\\\x@JY]T?IjZv)&Hێ@_uBFKa2&B0y# c;D3tP0(`,4t`~ %oJF+H$yX?>085hynp|o-3 >]K{]8(w=QOZ5T@t;7=2IƆWF[X*؎=ŵu1c=|eB!P}eonnu4 3 oml6}𺸸н{t}}ki{{;᳏j2xyQ֯k[Y6{&`|>}j}_~ͦ O Spnnn.uG@߿hH6U| ϼ[dt4|CS#{EOF#|](ҙ KFm_fN~|"zM;[q444Y~_ a@@T677}DZW7p\8`Gca3*J \yH[X*+{U]XKUnN+1aXz^ӐpČPc*ML[nzyEcwIEu*¥`"^5>-UVeG:"rZ&t?Xl7ƫE[ !Vs;smLPJᅨrâ+5O4< }g`0r>yyIIYd;IlֻPj5r9{#Az# FNOyzݯTbûT҈7\ΩZ :keC]\\$0㗵z4M_]#`m{{{x`0^~흹NNNS@)Έv/EP`0@@U q0+wb' "KhS±aClmmyN(`q]{g_  J+@cy!Ё'~[Ryx%P&(Pp_8.n2 2 \ ({Oջq*T;|TGf|n5,H*|ݧ Ôc3{%}ښƃX=6rߢ jV xWzKAj >?+R)3h~uA4`)`%\ȨWh1o^ȧ<)Z C, ymrR0HZ}އNgO9ӒQYDx<͂* PWWWCU;;;jZzNǣ}'''}0x0kH`A0VfM#2alVgggvw}+VNǾז!39u {5{8[~b/U;DbccCz08\zϗ l ko4͍7LA\hZGZ[.\AǠHy\,ډعmOûg/0Ro+Q% . Rp*cL@PjDз"Tus/Ѹ /ns굥ݑ&y**eN`VfMY,m& ,δS(4SVuxxv텬l:uhX,^{Ț`m-%WHQS*j~uuMѢ&:>>|xYLK> BxST@pTT%^&Jb_B=]^^JFR@зQ/s.7sȐғKY;P\T*')2QVa(+h:hؓX5 j'yylVcyIw2T]O9O\vؚWF/b⯋2+ځ]*6ƗOn|PSH.>O^JN't}Q 5Mݑ5ryOaCUZ5Meaf=/ׯ}`ڣ͇wڎ$/-FӑHQ lnn=lhiBEO17"02Z_~mooD@d{{{{Nۦ`S r'OSE Ç>)sKEm+Mlo*R€BX-"-D| lUFpP2x,&ddȹ٬?qOuNbB"6SR>bJԆÑiTg$ddWddNϟ?ɉ qٶ\.@নyy4E2E?U7^BmWrMr==Fv Rf]YK&…B.Ǫ~h{ŹߩNa -iVY+z{]"@k:p.Y:ZV'] fv)rMV+9߻x?e4 ⚺7 9Vj6"QP]__$DPG6B_֖;dMcfXoZt_]]yW(7CI2\̺IUW6bg8ӧzuBwͦR1$U:??WLBco}Lfl 1+Ɍu#-i oѹ@@i = RvF5 4KP'xl\K7XEw8zPW > s|}onnC' (^TM&8ׂƾ{ʵ<h:'QfuuT4=gf)l^훎嚢 h(ԻJDˌVWM)ʀwp',;l r:l{teg5* =Ya6է+wZR6ϰ.>|JvwBMEMyMyeUU!WSV!_p0kHUuB ̔Fbϟ?W3I_/"ڡƏýj5Mdf=j$6Mmnn*pо=MJW,;}>pmllP(J;;;_|Y__Ņ𮮮(HK>pجcTt(yoZo]Ȏtzza‰M _6 cz*@E@#E~Mߗu~ᠭ#A9{A0pHbr2Ĭ%ٕq&)ʬ\.' ^ΕJEO>ٙ~gv:@+O@`Ȫp!rt:~/Iln 5Ngr,$Gp\tt Elh2VlA(px*ݶbN_zdpho"p|f?R'6rpWN$;s- aamM.~pswzn5V`}`XRE 4i:+4dsg*'p0RP^t\; [sRwyNJNycc *˵jd; :Ç #fڱlztor,?K"R*l6}% ư! IDAT rKooD/0048p7-HМP5r}詄9ﴡPLR*[Tt=`͵(`5ˆiFFn1GE"m1^g.-$ix+tn1'&Z,Iuyy>mb{ID_ZCέ-'LKm_`4,蛶C^,x@Gx V:==Uu\.lچ[m%Fc9\圊4?t^<}*l!<,US7˽%w ]2Vlݥ&FOKG 4>4VͷNq:e\]~(Y{##EQ'@Y $$vJ.}(Q:nmmė` E k*0@Drzο68hR"j%FW2֐tP`P䐤P1#%!NCeW6Ɔ_~t|AQHP^z^d2_>[ :99mPNTվd2Y (P4BЩqRH^xZRC%lGe/KlszHQ\%urQMWQK84՟0 Hg5qLf- PS!:7'>yDJEWWW-(ONN A`-̺g=iw:??V jGe gZMO<\眯Qhͦ*浵5]^^z 'րZPTaAr6izQA/[p| %Vo'8S Saq@!xI5M!K{Û 6bs+,Ab\;7:S[7 a}2ɓ'^f>ࢍ my6@O,(=WaZ6:= e #UJ5 : )*k*Oay蹨*r$VWwV {ʔ[I3lm[(gf%B RD[ *MEPEX) wNi(KÜ&P((̨X(۷=°#.<,J Lt8щ@"HF; r_zo 11`ntg;39wu^]]immMRׯgݻw>8dN2orHhJ~+Oc]__bB>Rd}8iwwǭJߌv/:[d7 [>T:L&>b!j4ڃf@qǺ磞 d#_uhx///=Cu LS՞.֓>}?\2jU;;;pNNN~ѣGc+pR2Vl I&z'Re3C%CݶoV_d<$-귥a?Vyi<+!X-%PE]mElCrwzU9 VX Msy DB\4 [2`A +8lRKN7Sշw/CFNV~~qVDB=zDnϋ( S$,LF_|NOO nVDmΎj a@0:dœpQimmͫ6e.U?,`_{ BVKϞ=驾+Oۢf`6Ej4~aE+a>%WqP\SL2@ET$6]Zu]]]&LN(\y>AB7#s (RbřQz4tXPZm!kp  FT1?>ELAӓdA5ȵA @h'ijڂ޽{©&XV@$$BG'rG5'>zHv;qͽP$lw u ]\4tÉ2QFX4VyX){2'T{~AbR0V6;Cc~lgc唜̭v Ew\z@-buiy w)ɟ5LKwsE3EU zcAFr`0*?# nu~~C$ά1 "RCQ=r9zhZ,[M07EQjxETT<}N.۷o|`3P?Z>Qcr@'zP777BTIO:?5xRpwff?=h *kv& }N` .(P sNCFb h >( ZKf>Rzg:L5f>РTk3./\D+*ջw|U\ 207 %.5έh!ɕH&(<' uo4*j\4OT*V*dQϩH {\"t綴"39-2fт$ Ϗ9}qH XL*UKMr |`\IV;09`vKw$[0t}MNѴ~;FEMG9n'gKDYs xD%΀,tX=пegwɓ'_Oa۷^7͛7^Gi>_Gk&= _C>yn#rN}xx2xFem;;;SzG CVlZh.#ZEA1dmGUT!'!>$.{4IܿǛ( omG%8G+Jf`NFň&[z9p6qJ"Q yPail4LI)vT#Y-F77Y2^j^=~<7<-9 ҒAu 7zE"s͋A4[WJLF* ' Ì-ڕfwԻM?Pz~T̡U IP r2 o ~MYEAjhiX.rvnNr.be^997:̳1Pm^a\6Q7Q/#7ɩZ\W.WsR.8<61)A ^\.c/Pd͢k@ZDРwEյDfGṟƳa"k7t֖RG_gL,o{|| ,aZGYZ/ |d4<(Ȱ6@硝Q ~y]eKyө>|m%ɬFǩV}k[k@bEeیX٬vvvtsso0~~ o0|+p2;uHH~`ɃB?.\mnM<? ڡj(mu.vj3PS":u 8/Z7yIܬKxDu `"]C YM:9r?UZH|A|0tRE,|:yxx*Ri?$ـpZ4R BcXgA8)OTM$٬{LFNGo?V%ޠ)a3k DChuDCW_מPs_Z-mooK$6Te.A1YG*@'(l-OHnxwѷ\LpqCގ 2q-0.^7MXn3rֹVxqPdp?AHF@ ı`#/ӧO׆  z j\gez 6 |@ϴ.pV d|v?~()=K}!b>QZS&S.נ7R5;@ӉSZ];R&? (aj^Cwmf`hm^%H{pY5V UP/XL#rM bґRA7)Z=~ApGpt`~VXN`'NʂH괜>P碠Q7ҁn.'EN{Ah|-K^PɻKkM-h!( Vj5}֯5S*⬙<Л7oT(`tJ )Lnp aQ/ۡ7`YUTu:DӋ/|E "_z%s.,`c< >}FRabl,5A4 oF9&|YpP-87)vFUH+ަ0g kl |BLS@υd6N@O5 yZ T$BV)~tts Ȳ@ B>HC' ΨYqcS1$T͖ŒݞS\W<BX'n.&X5+b }ZV~M m@]@ ?PѢVY-Dv&w \T\htZ*Q!/v,T/qM(JweXw|'ݟNOےPn^~^~N{[ONս( " e堽'sA`mʥ'SUҧ3 Jh%"uH5A?4TBA߿Ɔ_ù]^^zj]GGGz|,$>JE3`5nrVD ,uf!iݮOZ:Qa(~":!`X88,1ӔjpOF@@:T`Nn EdbTp #e F@> M@V?dFB#PJr@n~@ 8.^b*ه&lv8o  E9n1;?V(7G$5 ! GtݺQ6[ mj؟h:q]9S>B3(-x$j۴y>HM]BA2HLY./ Y~7tu)-Wԫ[V+,@^QA;tPT!ڐy]4UU* /ղc0K<a)ɹPP@Ab"ő0R:yLV*ւEO'K}X}J"}UT p~p[S쬲M9`cTL2\!c۪\9Y8dUlX.=E&&74.Ԩ8dBPUi>Eqssm]^^*H~1WWWxDf=F[ F;7 d?(t\AGQ8Z/IQTlnnIzdFp,2N8ΩnuzclE $zPSEӏlÇO?y[: \cړ2aQ+ TKr3cF =Uɉokҷ{~B ˂uiAÏmYV=[(ñBU+kiuǡ0(ְQtLN*V90Ho4L9dۥjccnV6"?t,%+Z&yZvzR&"U& B֦]71jǬD wjZY94e+vr*\EiS}@ [Z鉥e 8k(7= F?{u Z AkG;m PGGGޔ?.{ͦժSkkk:<<ԫWȓ@ge Sj6/(N NF1&_ }⫀"1fE 9Zo޼':TZ`qT\3b5P[Ԑ'sN IDATd2?e, JRAsdldTi)MlT@ VLjLxrggG'''  ^0tvv/"9f*rՀqĹ~63miÕKĠnOUp9}iaDiXn1p +aR VzCKX E> 5fҸhZu{=\(̨qLX5"!a#SmZv6TS@,ȼ+I 8כ7oפ}z=x a;M q>StUҵ`(,}tͦG--R$(Cv>Q8|/?)|-nEz򥇬 ?+h(ݻcDP绱۵Y9 _Ë?+ <(Xh ` 2J2!N@^)k$Fn0 `ةBl{{{"aU<|f!# 0y٬AS`#CdG5` Zn$\p?GL(΋3G޾} &\C "QC|brn,灧R{i<(+Pm_ni2wǺվ Nª1LVJ9HZINEa QUD`[ 3p!H0v??$Ȣ<Yt[lӪi`kUun}):]qz@݌&6+<@B]77]E*%4#Wl#6,?"mv@OEgGPЃtuuwy.q`QɚDagA?;;6yrj4|ia f` "e:l6pt6ϟ˗:::O @677=Sv"Rї_~:]e{ίGQLJ%1NV¡4׺vٙt&²^ȹSP6Bk bJoNnx<lʗ6&օh][(x!l` *_!ٟ%!d $vei^DT43ȷnɓ'~(p |Idţ\+#+|᙭ e `9L3w8Ԡ?V j؏5MTWfY 7 U)I[LɠuI:Hb)Lt,4!n(jPtS*rh7G~[+-#`.5EI)Ǭv[%0аtӫ9 Z n#i\Q0j؎t}1䔋*noU w:dv&Pl}o](,0BAS6ʄ!+奯yyи`Pa`/^ Qr9Ó BxJ~VDB` yyhV'$b/Mf[u" wʃFG&GEY!Ct!Zrz n_ 'Xޕj܊ؙ ,jo TFvppǰ`i$p $[T*:==|\p0RTt"{#SrUunʄ.(V-Ng|&/JTjf[K⎃ 5'Gzut,0-  iu]\}WT Զ<k8peX» iCeݺ݌]RP&,I.Z}e J '*{q3 h480ອ5n^`/?cqs˗/}p?<n(5?9di(xBK`DKST<*} 厎gCAϵGb*/, < 蝄 XUx.e$m@(áʥ FX٨(ȫk2 ˔5OUȕjK]^q$kG--LnwH(<;3thx]z Ai l,SUyiemb,őb(D`#) Bĭ2O/z@6b}:_ ଵ5n?56V;}uB*Gl5RNjh暏}9͂(N>"1 E-$ć f3πV--R/jd$GckΪ*kՕkWZjt"hvR*W@?Z/;ũTm.ڍ(ߙHχS#acoTͦ ̖ۏ~C;o)wќ >D^?6؞{wߍ/"Z&3]~Y+5H{sGS'$ P3/e[kkO[kGOQg [{sA,X{1qݝ& |"-CbRvj =4&'WAOSuF;T, GWj2*NuUiLUZlTmjetausD*FCF 7ߠdmQѿ¡oze~ߝRB@%hgY5xF#^ʒ([QVիTyrf׭v}4j(fws幫/P=b Bzi fd̋ iݻw˖$uY  E:_q bRv V24 qtt[OCnؗ `Qӯ4p,)"..iF}}8,EE-L7%oVjA[N9S& dY>x g =Xd GYQ.Hwvv#BG- @0 Bf0M{\YthUh6CY\\k+ׯ}6mɓ'Ye}&bLB:j~p$-g899r 3|>}t:IKfC&Äc& >9[.P 1Pw5Z`q p8(BIɡ拥MͺVemreՉ*V$*WRWML=zne;)-J~2Qh񛖢e~k81A `lhh);@^𵿱@tGb_Jg?6ZĪn`̵EDSٺPWeZk==|f><@];=d8=9kC|tkAi3Ă0=XX,K'¢X:p#&C^jmP*zC R{RAAHL &VU{Kb6 "=s l^4,oZ>d&'pAءIUU铧]B!F#$$ o->|P4:==˗/}b$ƨD6b2Ҡx_$^_ޚ x DCjÉ{6p0*buUW[Mƻ*W:rěH)T(W]YmFk_nZ՛NQ>H{4:*v-9z%]z2x3߫?~D9S7C$*=Mgi}Z.i՝QT/SuHYjJPQ;j)wkm֕j2Mɳ\wwzN2@V_ B!)B&of$XJ/?l \Ϟ= Cnoo a+`Žq8}O/JJeC_k/֕eY^. ڹ50H0=PHGW}=DJّvot0ʻc/~ǝ߯淭VTWUvZwjTʪ)#֨.uV'JDWWf6U(61!OfŖ@Z}~~Xk^oi@ƏV.Ύka7>~ϟ?{F3310 1؟g}'n$8P_CԢyZ髯gJ,-, ё|C=C;84GvwwDx0|ooϟ VS$,_M=-s !ς=LSEQN`)`(өV$...ttt-*onn|R"???mMmXEQ>γky7"O?9yg:%RN}KFK'3% ,~/ 4u}/!`]b#bDFᡟ4AI&l k.1_e! tЦ; $(rQz萜xWhHݻwC3¹!OCTJÁ \cG5syV{h%q ێ`!(9@ ;Gájtzzp(2ZV ʪ5nX5ʍ\uQH a"E*J:eE$J2(n\$Y'PT;;{x4VVڮQUjmݨ6lv;Y۪S+kY)2%QdLIeL$ʔHYtzzkF) d`0Ǐ?xƳgDUI(7|ї@M&2z p?&/̰ 7'޾}GHEOcKZz;tF[CmJ!s #6^]H mWgT bP>͓M2`C ۩BK$ԍȘEoջigba&<}KR.nòB8"MC`AWWWͲh1m`G, Xitppu\.edT rk r{pyUdʺUVIk%iu"4Kd"di6JM)SSFUFbۣb|Md%}Xű5s2=r66=LѴGf֚kԹu mcյhkFs]m)IRMHFqz@Ų z)%EZgΑfm1ӃP{+Qв(eo-qa2G0 's4Muyy4M}4 KDQ3`0yR$ znI~0=L F{g"A kr?>'~{9ы/T>N.7lf:88!5_g8a.{$AeF 6~Y^@g9Ak}I_|>L`$l]9 z:\ϟ?n dQ#FQgpAYrYy@Pho"BC(A+p¡{ >!ʧ@f9  z$l'"iƿ((/JcÀDJI*9 [yB,:@ʻ%lz`X pdGGG:;;ۚ<ͼtx 7s٨m; +M?~PD,]DTU*jI"ۉܻ6ÜۄrMldm*cu]:")a|f'qd|!cgFmJ][m|a-s*m4(r>rD(5R-i&Ñg5BJRwTiSV-xbxrƣPJP&\H/d9+p ˧Oz8+l(l] +h/,[...t||{P_xo:;;Tha'OROYv|&ywwoFE pwHs PP塎/Rި 8qiO䄵f5Zjx|xaG::#lW3AP jWڕBL >j44 xh5, }Qޔ`m<IoA@J~ɸPds\Ȓ_? Sx:Pq> bTldZ@شnA,$(zׯ_opQ81T{Rǭ ZoDQPKPsv?,Q*DZw6u,őr(dU6 Q*MbuQ۵T2ꚾQWc:dG.Fi@!I+USu+HMmTҨjeUQʅfiU"sj3Vj5ZͤLZ޹_KN?c6 i3MլSY_oҪlcm:EQi]PmEQD2C`-[RFKj1R]ش<{/uUS- %imUץ^y<,\{fPͺIŵB1eu_tr>} pGJ Mhc;|;1aEPEW 3p4@}(Ɉ*Prft)TY/9ɉw gEQǏFr/~*gA(/K/F2pggGǺ=_@0<6={o:<$}P!#gB%gi Go j.Hajy43P_۶:::R4ҟ'ޤ""HQ7r  w8e/G\]]s$l?<2Znc|ӟGM3Ued/^ЦNphg\ϟ?W8Sڗ988lnB[$M&N𓦉`P+~(ful]#5M2}pߔkEQӶZei4ʹ^/5EJPcGLą:YQc޼y8JN`HBj |+q$I<:ޞW$ M>SNNNӧO ' y}#􃾻=:f5FG7kUbf6FA4,U׵jFqlz:юΎGQkFq;ڶC]0*IQZOOް!ٮsdm_e6o+6ָzu }O4jFnE"'rBQdu軳ـ(akUa)pb-m)"Eq]kvMHԝw:xΗd5l"ѕRUlUj$Ĕ{$$/q6Ǿ G!2@g;*q(iz~'!}V7IcWpb466LBPį{XWΊp3 :oB plɵAIcu޲ķZ0TᜂM%28/<ՇCTXx;G4X6b͑@z5 >= y7A7tnbZ$hg %E-v8_t2/䂾_ - C=:H޿tk8PCש Pq*IIH` `K _ȼifi]m֊Q:<:TSURmUVYőQ:YYFHτTG $ PrG eG#miV"u՗/_/nL./A$ 2a1jejSd塨]@p#e6f^ONN~oO0x쇉CXaYU>|գoyYd+1ġӮ\y8h>ڶQZU\&2Ӥs'}ᮿd)¶q(NqʡֶwEpiңZy+Y$0IEȨijmԉd}?f &WuCf^N@S}Iwww* Hhӛ7oK},K_rbKO&UK},CPd=}}@fCpC%OU6AXS j/"G& д@idcVHjL8Cv,,j+ #L___.>s.a#ׂ:B^d,2O)d% a b"4hd;"AƫJYi5ud-FMza4TVh8r&ֺ:pVJDMר(2]e"bL,MԵ,ulB6"$Mz4q?Y9'I[[4Qg aKxM{z;ĉO"w}&,Pn"P[1R=Ǒ8\_tiY d2VY>hZ%i냨S鏆Cu,\,x2A@V1۳u}#dr‰zGnbЬׯ_{v1&=_|jd (06?~-04-RHb$pZ4nooX^3%2܂2%Cn`ϽZz%c0^JF8m0ą)N$3ub,ijC~(>(}+l(5>æid,YYm8&lv#)|-R5Z##>34ɑx!Jސ~BǽhdU\߰gk3}4W J:<<_(_/`Sq{KM7Bs+On-OΠ |1WԳ)ekSEF@JAѷ9Q1h<«񇽫M]z ={e*;%} fèn&2 V+m$r2cە NvmO#G=:vy'4ġg7 8Mڶ񴳟q'MkӸm[%Y̵+!U^dj[AZʲґ7\ƚ6EJS^6 jjd4unD_K3j$rza5 i 4T~F:V4C8VCŋ?b5!%W^eeY-c!n8"ti*{cw"_UUoɉƦ 5?.sܛ_'9)G_8*# Uנs|B',2,LGӁ8iL҇`c7iL)4vO{z"v^5T41 HT LC3Y؃K d,+QRAڥG Fmh4dulrWG$hcPK[V~n22LLy۷ZdHJH]*kf9^?)pFL٤ "]|iw ,cjCT|v8*7l#]q{i|Ņp %a@_R{EQ PӘ<c@;⩉s/ )>0m^~%8ƒcA1:u#65oXlY pTV!(5ʵud=#Z m#ȡ3fvjh}ƸZ/^l =_]_mOdVGjZQljk&CٮUg={vZ)}4:ety6 5MG;uzk{8-#>HyQ8y_y4Kű!,O]5re9xJEz5 IDAT#> Fq8Ha8v?A,CIK&Ɠ::Kͮp8UiQL3W1($4TUYj8Aj0(eʪtf ùڶn]YWNѨ/%$իgAGymj2+\iM=Ezm6V޽{-aLH޻1TҗDO.^ =0P49PBݮV+^?'jwm/CӢ=o: =18mpggǷp悐i,P/qK8ᡟ&atg/g1A/! CmQw $q",h/ 6hzq^Wx5f0C?fDWa$g [aO A fa AdLdaxHk }" cqzJ''' fArMhrjo޼'? W^i>2K=0u*{&cWWl^o]p4i*>PK9TTCUM,UW3heYO&Y4dͲLQ+2zoGnC1T6= ´v j:70R5MbXx-IȔfڮp8P۵ 2w]YlJosJ:@w(Е BA>g=0`C3"R`BE1P$&@sƲ i8d.r~ C]__oucPl6zVJ@ѠQ!CzH5Cnhm,g9s/yУȳ\+b`h*M1u jL7!{z Y@_ HBOY˲SWȌi :==JEhs 62GH3dPؔdn4~(@BԱ^|)v}EZoXM(SG#3Mcif)k[I;mbiYi4(.R%jܫZV`83 CmʵtsC4.dR6ƪyEZMJ TUxN]רwxDBgkձ:'Pg; \q t@dutTZ>jϠʍ,U}[ CyKMv&h4ԎDU1(H\ r*Zi(O{}Bko 2 ٔJTmi8Kٳ#]]_;?M^z5Q٣dޛFLIrлoU7oRM]e:sgQaB'$< L*¡_R ]И>HCu0(.g>5 :_@0E UZӧO}KΏ?z70zaȨ郌a\ډ$f t.uy97&݁Xu&quF7N}̄&Ѯm~@8˲Bˁ _ Lp08 x gi Z"5ghTZmO\"ⳡgBds +&T(к V@B# DZ<]RFA\K`BCP1")|VQ{\~N&{㽽=K5MbpՔ:9tgm4'F6Zkuo˅$`P(:N׶ZVja1PYVDuU TmJ]h]+cE]nJ Fi)w{a:j]nu2zd_8Zqʵ9dynjEQ,Mq gc3_?KokYٽF㱞R@(c޾}6'ch!"|-b765# ČJ-tK =AЋU&o| -P*@MF;/rYy"x55#-sUՕ&l^UC sHsUu 6&WU;Kr>T&T1&I4*rwI֪n*NvV]*ڏLr&uh#JH\w{ʮ;j]k$Y>"e]Zp_3$#2|xxk#M(j.^-f$gGGj!mS^x2d\,UW u$KdĎkgi9Oz@$N\νCY p8|)hRBa GbLЅB#~'Ρ/B3o1Ε?*$Ç[>ӔQ(=ydK'Ox1V'''QeZ*۶ӧO&!|>#otvvEsf...?3 dl6~WW@ljwch]DKMHA@Ҋ4XgggI#g<̏û4t (uŅoކr@0 FT K ~ lP mXY<öq HBK[*O>.jDQ'$0Իp*'$;5/9Ln"'LFVM*#͗sI Xyi?8VosGjVGjyiZs-W+L%ڞwOyQ'zme4Q8f3I/TjNDU]덒,ӧQ&jVM)0h4(AzS)ו$$V=;&ʪVӴ~eY*Y5uP<˴ZU 2u$SYuYi:92ظݶs0\3uU'Nώ*Jbjs~ыB;Ih]+VÑ/3-KՌ=d2fQ1MO9OM3 YD]՚L]~M,|C9IS?@%1!,\ swhf'P"jZj h%%&]+{{{_lp FŽHwwwDZ&.//}'ڔ$9[@Ǹg!*ÃdJq%߀9Ο}?yhXsߙ=Y%LE\0X!31z3~ȵZ,U ~brHPUVCWNm)O]ҵN\ Kwx%iώTvvh(2+'JTE;5vV(rV.PMU;R噫GWI,UյáЦ*5,Fsu]JLJYkXikS9[M-Y<ݼe7'XlZ5^#HWK #eIMY*MRM<͔dՕ&]UprTwwn/sfʳ\JmhgAQ_~Hi;Z_Vbgsٷp uYb)? Qeޞwozc&1}vv-hUbIqЇqWx^Z`,Z6CuNNN! A$R~Ņƨ9C齻NOҷZp cwMyHy"A+5`|Q҇QU83J:><<`Jb-_#G/maUA=#?dBy`A`Ad"4ㇳ:Al$PIP3 X4;ܲ_h<˶˕&rUe4u-BFq)(zp׹&*Gg3NS^-] ԶVetFIhMh8I5PZ=LJuk>_h2j6k4_.!twlɑZhDAr7_7Y̞dD(ZG_9B!Eduws2I5fbXߢ@{Ym;l7[83#Jů ? az֞y%yyk'0CbJ(NW3qirĵ Ƚ8_quuǕ <www_89@y\5Ξ(hx^HEV3%TKP nӌSDkyn\% L Xo;9H9y>7Ⱙ b˕w$3+%kٶ;eϵ[Q=Ѩ-a;gbIbaAc1TE8=:Ye[zst7i:ią9lsa K302Ow6 siu"9ElD2ٕqg! 5s22(" 8_V2-F(B,e~]U S2-M# 1aM*m"cd]C QBc)%iufuU1׃jrKU ]^D9 8mZgL$uHi!3a욆 ˴1N{JF3n;f߇ UU#be:pؖ `[N?^La]G\źN 8 ӴTT<+ GQq Uh)MajtG(ӄ0Q\Qրc^h^]L#u&|'r ӡ{vo޼AQO˳I`N!d!R&1| ʆa׎YˈHvmd(ͲLÐ ]y2B5Z9OD`Y2~/r(1޾}qP IDATlGMi>/*Xu4uӠmi,Ѷ=qB od(U!/9k ]/S*A4xBzDQIK|J yG#8|eUui$ɉ.Ƅz_p}}zDh"b"a"6Tjp#[Ϟ=g&6AƄy]h8 <<<~'dDY93{sVD1YЄR:耹ޕ=}$1c|eϵ3/'cB!IyLf掖lğ[eFI,Ω0F-@N◨\_~dk fdC"P}3 9'2("dt`Dkb#,*Y!͏mKdeܡ؁k$cYHL30&<UYkw59G],jJ, Vr}=@vy+bVejZ]qQ5 !UU4Lu I ]?[1U8`ٖLaE%S ZDQyu, m#da4iX^a`&t݀ۛ[Vkl! bEP <`z v(FI8##4ypZ E]|€(=ie_g٥Ve1P < Dٌjq;'9NPݒ_mRCS+POˋu ZK-+oe51/ -yiƱ^8yȝ7Ҝ"v00a%,3  w}$-^xxS s̉;^¸XB6$IlcH*N`@U0-eY]rVrğm$Fu`Z!M UiDaԓԵEg*KxHkNk`nNR]8N5sś7oq{w449H E,ϟARJݴ݀jЏaDIl0Zp]g=P$Y',0PqBS ,˅8x69"h0-die D, m {$A1ˀe p<աjz8jl[)}blZ,zAQX+JzAzLV5BpYs=i(x,!㸂6<>H!,K\\\,K-s1IH,\!-WIx$1?MFK7<9sB ai{8prr GRQ(B_eѿe}!g.C-uȄeQaB238s֖;MGf '0 q~~QjVy~Z^[BMgy 6U7udd.L#XzEQ¶gL/cy(D}O<͊䫎F׍Yҗq,_а $+ѿ?}" ۲p8E:xd ObZBe˜g04ʤ;+]9BP6"8=}UUbJT>(0eHA!MsfW U_4EQJPa(*E)\!bbPi1N00|F{DQ IGdN$Dvt߾} BGȞ|ׯM?z$ŝ_6@d?d8n(3 C1  g3>:1Z#" caɗ(s-.$ UY-9-K(q!+Gq$3*d$/=xxJ+-#sbgʋE.{l q\^^www" nYA8KV1$IG|]$Q~߾}G$IT*5hiyzŗ/RlTh}{ND Q5\F.MO CU?&`V{+& <9.v$/^]4q~~w$pnO--[Nvo߾EUUAY 5m/:bvܻ.Mԙɚ{_BK}w .pdE V'^J `Q'#si^҆(y0T1= B}a,?"4jc=a=04S䘼(ԀiC42=EYhm*Y, /Dd,ӆ1̀FE(4Ldy*VJ +)Fai /J)I>.Vq,F4w!^b~BiaFfb֧l%޿4M1B@sDJ%V|Cˉ Miz5;jݠjD'';1m(y( m¶ldyqlU3u}do߾=l֜qrȆx^YdD[Цn!@]UCqjA$cur{Ө&7˶P`{z b*. $\[Bpɂ߿ 3it`_Ez"gv*,TnO(A2̿n"y;;;F$~Ljg_BOdF(+%@5 pssr*C%ˠ"q "fEpBdfb'1] H燺p'G'3$ynILZJ$o4eYMsffb3'r Hv]?Aws. k儾 fX:s!lL`)"*@%'i.z1= ZfmFUWxj\F`0L`%j0 cGs]qISq0#0q`0mUѝ W&#'hڳmZeoZX/jV&jvz C?bu1¨VplAmZ5dTҌLW6/fVЧ() p1O@F8*ׄeJ"qJy2sE)砮puC'MvH )<" e!aHT4lj0Ӭ,A!= ii0aŸ'|lˁ{(PSۨtQvl^>UqpLbR=fFϟ[}P:C$g'(-ŠzNYl߾}SfRMZ3*c PLji9>?ʲԻn3yК(K*8ag>Á4Džו'$E$XqψQ˗^I˳3/...~"; ^x.}ٙ&kв`,;yƻwp}} irfn7>"2yaȬ~ᳳ3!|eg'LH/ud[ZX.NE{N%_-79s^z@35yy/Cz\21arg^puuEp SX+O\kTx(Bw{b'mf<!V05[yg,˗H8K(R3Fon0&N8IAyGJ.E|8!5ihʶn1M3hcWYVgZE# \U6K‘aHlSVQٖ|QXW-G)V+Nbmi&mdYVJ(b!͓S߆)9m9-zfŴD>#<_dGJV 0S\$|TȖmD( Jy:Siu= /Sׯquu4a;tG% c6(zr!#x|||n =KKj 5 K<5FFS;ݮ,/ (աR#2Ƚ_N\<$e9n-noo4XD)y-&Ffs]J2Ri`u]V'?DTs_A-![.9&qAO'`.v;X KB|/fQc+"4ĉ%{\J5䮆ٳgQf&Gй0eq\F,RL8&Dh5G3wt6W³1XJxꕎ2L^]ݼ!54EڶAwl7#V$ugFLecW KBfByvhb0NL(-Si*#p֨j0u!"2q"īyn$05;$u}aqqL}_Q$z'y^HJíZ rӀ L0M/^DS7p4#/rd `e0{]iɊ#qe)=_m֫(T/:_(#QK|~QՒTd0G@ $>rErPՕBg2-KB[n*((o߾՗+l7L-mςg0 hZi~̠܆)"p<ȉqj#"SabGCϽe} rJpY0~ׯ_54]c$DooouOjUUxr&q&<> ﳰs (eQZYwu˳t2U&{`NRl~א9YȮ &)vZqaNZp|ԶѰnS2$KN"wɜcQʛ^_([] / I?#YXOyw4L!<$62E qaP nɼ8i&е-=З_"wh=(y(+a(FU$6> ]'R !TH[|?iuz+OxyZ6U~<0 a:A4HXM>-ڶA(KI#,Ĝ,iX\ਸ਼iqLXdY" ЩH"dZL@ѧ:hN߿_Kgʍ-Z\/_['1DJPd0p]/^@QYk5 eiNAaoeYaf 6-lV(B^m9l m[\]}ǏP7B|uz?3rnkUw'zY[ˢ(F ] rؖmLdŴ\dYaP5 ڦz\YܝfLdzm +]!QRI\ZLD%\Ngp N'=yaŇ (тWs)$7_=*Wg/S>|5P*ׯ_kI+Jg'wDL/,w iq~~o Q#;;5Ry!qfQO0/_۷oYȤ_^^J.($pZ%DN%qiM0$75/&Y,iIg'mvY|I ]jכfұf׻$:Yf% ;G/7&T\䣬j&ԞYñm?cda(E٘NVhUE2P< c$옡:lw[dTw_v' nZP5y_E4(qi"N"4Y/.QNT;prr򤐳͢!HL$HO>i{fo|Kf~KE( <%㘨$%ˡ&Mh祢{cTO 4JTq<$MAr 6v,|Х)ca^و+fY[V H޽ӬJ0~o䞃{-X޼yo6H" &Qb N),5v:!!~>2D0vLc!2 Ba2'IͶmqg!>.yX ӲQt]υ,71( cx<+5 |~`۫IqM<ôl=up5J`ܶ0,5,UqlV8DBvh:!]JܥDT-Ry$qQ";xse%6Mm#jSx \LBQy~)Єkȳ ڵ^Ck[èT,( TkwuUcƌz1^ft\2Ie,SqNy9ǺҤd9lѴ yR&2Czć8=tyeZ(덐I|t5u-d7z0bݩ^a㪪tP Ex릗 'ip~~wC{Rr7Jݻwxxxx#nnnP׵J!N9N yϲ,˰J#O>鉔$'pD7D!|W*u|؎mLj84K1|ׅ8SErYAE]cTп8c ]75jUhZ<ΏǣOᓌ" VyOp-ưN\Y siv;-⒙)}GQ}ykH P.y{N 2֋&d _㾖7(/s.} n[ StLNǏz>%eLԶ-A<)>NȍS2cUƆ,I膈w>'I" {?~1=t{0,?M#:zdi_jub .O@pEYi;;1J0M;?=G%Ƕ%pbup@umek>UYc`&v$߿}׬jvw=^ FwzG"j'+Y0r6`lEzLH&uJfpC!3- `qzzL?c8]nQd6-,90`m$l q1N Bwpf{UV*78J ,z4J|װ^p{'|`?81Q\GZ%kc*اzP75׶U%~mad*\Q"Ms/wi7<qwq|;GIF&5-l6xxxM1> y&q@Oh3" ymj0 ;cOđ}%DJ%=K(g x @pjRl>NOOO;n`N^3Y_|^L708LJ"40DU<4N{rgbl[13ɱֶu+Pz ( =z D߶p=_KdGY|&iRUƌm1(qG ΣQ(`tHWWWյw3"g(Y^"uSt:݊eQbxSgY4.~D'Jd-H~tݠ ~WݢS爠/ѵ&(r}.:,LE2aK+[_!^zG}~ẻ䢺c{_,k3Pg9 ],l~X+5`F#N48!DEqX09$> ws7@jn9ɲbaFXd] .,NAӧOV&v ?\'s00? rz%^5D6lH";. C| 0h;c&8Q]|d>`OIҧOJpq8ה ]tG ,PSj##QӒ* X-qqia.䳺?R< QrOѪ"T?m`(U_UU%+L'1*4" J8b ۲uC3i-ȓuY+OU,GxL]4L8.aRI3̂Dac60C kzWk0,ɶDQ\fnī54iYQ7[d90&mxZab1\0 aA`Y_1=€|n!K3AMgg-'=>ׯ??:Ɛ? 8B'\%ᔅ>ZX*S8rw{{?O:ij,KK tR)Mg뾔>I5%1[`A ^Xd ]2:M ikinRBx)5ZL !sBojnnn4l;i(G5F8mRGrW{|U3ى1 0 ~IH/NׄYvtaw{uu;C~ق :1h庲wq\i(J ڦ˗8;`0ѕmiirf +$a mnZ~TA~2-88D0,Y^ &pMۢS:|W{bA UU#R{#)z tɽN2Ib ÏBLX(:<DfDU-P"Fm@]6]õō\\Ƕ0ŽnjMγ\W`z@ܵYiuNv\ eCخv"K3-s]cGjnnXH6;Z,4z1 ;2LdFSp MDx8]TJò[lk!ű7b̃ya /uUvv\GhϓϞɥ Iǒi6}Sq)I䈒$$ >} 0y0¸v999E}8Wq<99͍ðJ"eK$)=qeưK^ 5,$ۭfu_z,Am !?͗} sɁYZ~_p%MΒIl7ٴt>rŎ]>Ղ{2M/Q~⒞tr9-M5rgSNVB)`# ή+I ݰI`c7DXL$Ipuuh2Hb?\Q,YfJ҅INIgz2UY*]ᬮ80a;כy$NT@vilǒT#HoZ74aM+tUh[Ɩ@P M-e`Ii4U YY$eT4l[?c4ò 4n"ɛICMzbNr *̥~kCN4BgwLA'×g!溮 *M e!#UH $m~i4Ɖ>}" pwwzK4@]ReYXܖKv64&0vl4/vٸc\/Ĝ@|><(4gW/7\HfX:Znjl%giMB6m[ *5F,` VC+ rl;TM-XRqQ7 0 i0MyHd %4x<" HMI{KOtS $J`;6,NNNqw{m1"*Y#=+D/[tLT;]ۢn'b׃isE2eZR덐r<DžirE=`k;eф${rj=-饧㇇=C6/'\BM0 5 W\,K미 ӗ;~||T\/si ҮM͍6-KD*zXpqq׀PX'޿JK>~s&.Sp9#$,r9UXpt&TK2i s)ɡgwaʂɖ]ݳgt*=7OnWp?0’gC7m+='5iDƀF6 0 (#ٷkGsVe#hG=Wy4Bp*Ej︹Ans-R Bf)\Ul2*EQ!hwqR20J.*lw;i2iɅ*X4ÀJdA[w6f*SAg tm/eR4-ضi%e(aY6À0 _2yoѵB0;RQ3y1#&̸CK80LQ`lȫFWNp<<+E'jmJmmeU! Dޮ5l g檓LؗAH|=>}(t̵ %sR K"e~\YN]2 =38p]\\FgÀk]xKLh(oʕؒlqvvm1LAim_F%d9@|<۶q<Mf6IL#Ien<_4 Vu76 IQ9P2vmm׸WF1H6]H\s7 /,Գl^.//`d0 kJ~7 IDAT81rν1nq2O(en?CB?CK|e2! ]u-}+0 3<8NbNXڮEưlS dQϟKy8YiR]m q}>0pssq1N#iF]2!e$^φ SYHbQ,K9DJ8+K08q2Ma5H%rIzK*l/RXxm CJzxGϓwgQ3P<qa!_8išM*zEUVh#}"Je15zD1U"%]WEZBl8e VL~nP޼~8NRB13Oq+ d* D(=3a(`vIQcTA rZە+]'Ȇa Yqx|C~UhD,Z"oXqda[82_͛7/ƒrM#:Xbi].!gs>B^K]ך%і&u|ܾ__Ձ *ݽr߀{bzKkiA驎d"ť?,B޽{}6 K (^Zzr\: ,Oڏvk4 ,'2hvq? ԆqgټK2ryssy +bW Š$I)'Ijvk n51 P$Q4'B|.BR`dB"jR7;{.a9k 9 t%#e:Rn@Rů*] LW_`]Dqk!yFSj"+ʓ3Oz&ª5f5"dF,˄㈃8Y=G^D"pŔQ e ;=쒚*I0bm;LK9tcLK7Dԁ=݂qDlxqGi# # ݀a$kda$9:syi&ilfhRU(`q!O3Av|S[,yyV8S*)0c eHr&vA]WLc6j ,ChBd}b&l6{ Cx b?\iV;vhVJ"յ=`X%+nZ#/2x,EHO3pxԒ"!ABaFZvJ (9xHT{43x|ljiuKq KPHmҬ\rRۓtRQ;V*_Bk9ۋb]1ۇYZ @5NcZ5UR9K" 8e:Zj;Akk]Q}ȷ:JTSv*Qt8Y/Btȵ*GS!iZ/l &SEPe{||Tݲ?/ <p 2tj9%yxlj׳$l#2I'' v^R4ޱy䜠{@2A0$^GDDn]nS׳B,{u-aoZ$-F: ZNVk\82ި+Qeo*C2zq5UJYQV?V3-su:]GceI}tס$6뭚Q2|g Фj*Iqq"6F=@f+A:h(iC{Nm*B-zt҇Tf#N)[o(:.߫Zfƻ,l8ŞidPyV?|Лԇ?b|z@BF;^|nuQX?~Wnoo #i1z22N(KjtHpjǴM>>>ZY@^Z%ClZM=+z^^HCwLVe%xJA@אvNxNq(˗O~# -x4ܳ1qD3ժ^~?j,ddlȓ=¼ BӐ`{Rk㥶lDKψTw:CL FzxI&5M$em`CsIuͶVŮ0(rD4˹ʥ*TEObPZ A~WT8RVK!ߙw%IBX1 '^X˂jV5fө../f`zv6W#F!pk'gs}MSnnn4R48çmJ&=-ˠ} ~Q,!(F蓞nYC܂`1tnz%v4tRd5ͬ7֢]}kDB5;yjטؠӳv-YH׈|fpڜ&& ,ba :?.Z|PRxMljJ5@8's znu\zYDR۪i vzR9HrTRRI}>4mX 勲'ft*01 :0zQfh4  ?EЎV[Y- SjN84eC)!ȣsOge4"_mϵVpTBtu e'm\E+>Gvq 2K*JT7n}N f~LD8Rq0x:i1_D nO\x_0ڱRh٨b+F6QkP;^o`0p84y^k>ѐB#(EѾcW7pٙq{Ή%[uBNs<[O^7܋,ѲRWzED96,ļNo0DrU0b/3rv k sdv<,taq?>|4^g֡ɠ q86 c 43pH8lۈha= e^y.'I4 իJNf#BSXHȸf bVr]$OGvlTggjjIO%mT}ŵF㡺p|ˍ͆zݞR={BB:IYV f+"+yaĤv`Vq˨?IUkgJRZa=*0=sye5*Se`b$ l6M!t C V4_,ԏ5v',߼Q0h4VV\pa"8/bf^rZ h6_hu8u85$3ۭJY^O4 .subfZ0oWY"iAjbh INGFVvTx+=>j-@HggGcw}?>cgL'5Z`b& xΟqpF}Ru8 M+)WG켒ڬZBĝZxA$FU$(e|Nԝ $Q5g^mk~!^J5~<UUը\&++u0?TR5hj:JJDfֿ(YQl#5ԪwZT?3~Xo~4ګ'u`( V+Ӛw8#CNF&Z7v E)R2'2)Jԡy?x+dѠUz=aMT[$/s}3D@=IA&$N":_Q xV& ©=߫횀\F&#ȸ/Ԉ?}~>X.%yj'KR {0"8|͡aa3V":!,?<A5eZUp8ׯRYZf[Y#3 guT2l0{ˉ㑑v Ud# bX,#4Mp9E( ~ayF A'?8 :|fe>{FdX,tؓ,bZp>q R/1 Hzw}gM~楯az'gD숏C {noo 'z \,P F3QΗ,òR35t .z1\ax|$zuJ(&1z7=QRu/@uw\T:iT^6TZ*M*:IjNˈEv[E|HN “ǐ}ML#j6٬+y$77/jt:i Soϟ>r#ų&Y2O'eK ,Y%⬀ C#u<#LȢ> *JFHj)Αu\Yt/FPv[WWWajvcpmThI]'^M5-B⠴k^?m;a2PQNٓ,GT, kjQp+w=gXP^<\.\yQZ)/ry|1;O޻v;{sNqjHbAf-rlv#l'L`w]BI҂Cf VZGF#%LV=L3w]u ~ ^| CDL3VPRje5e rj N M>1x<)deτ/5t\|3HVNg  LTe110怦!(|  N d~Q'V^IKw `I0ϳ.AuP5 \X^GIRYrIi[Q%MCr4-X5Eld!D1oN:Q<%///-k0,ȫR[N&A35Ek_9 t6{ynanºۡ6ZS,aD-U%i m#QyWT^4g2oV780A+5YIcz8+DMBi^7˔8.vj%Q6YCi(لyEJݾƓzݞۍqx^~?82$IhRca>d>8fcŴ2`p8{~7ksfPizIbhI:??h42=h@@:Yx'Zv gٙt~~niб Q "zUx\X&0nz 7[4Yo44h6/u+aMvK (KeO?{q HJ)%_/ Hߍ3&X2iOPBx%1A(nRQ{id^ʳ `+d|>rn%KCނ?M3|~!́o63Rп{m_pjju/"N͘6'pyAȸv|>7T*j(nGaP- -A,AoD,̋-({ ڭVˍt:o8k#Et@"ZWAhFBi5UeE֛VHvZobzP09)[~WR+TmLJݞǓ՝BV!"RIVK$@&d@^i4V 2浑}PXVz>W^i\t:ohd GOØ1ègl0y߹߫QoڢRyPVboax:zv4[U.TQ$[WNgZ.W[ga岾yBS8',Zd/W+QݵZKIR~r^, Lؿ\F `IkubiC`ȥ.ϝg}k7l8tT+鴠˅G/$jŒn RRo޼駟,'WӖX,t~~dLj='4INBQJ9(zKV!y h!O!P7Շ'd8qzjɤ}2J9 ֋~o8>c xcDMlN75(׿U̲ޛ:F8pԓ`X8Sv#=@ρ?OCM?JyMGq 4)ʥ0S6$ DR^S#IEYZURIb`P.SVo i&CjA2wm[BZN5wj<ߨR ,JRt4aZ Riܔ6֛q(AZF ,\@*sJ[s'^Yŗ` 8;ALIr8E\`Q&YoGEI4]%DY=|NyU0pA*KZ1"/% TLWWW| \_[u;_BJ%j`WCPw\IRÃZͶju{J*QY*i:*'T2ͦsyQSo44Ol "1ɝV'āx-KD,8LFgtqqaV \7_$ItvvfN }QaIac03CfݝieӰfio3)p  L*F`&#6j8q2wjURIk0 q:hv8RV lYJj,NK"cI  dǓ! EN-W[JZU<}6U$wB}9J!Í] {G4%c; h$AE Ƒ?t(xYXOB`!F3 |nQ( N뵾^UR;ݠl?LJ'E ͰFCRb#2qoY.1D. .蟲 h}"ň" -M&@&bFlC!}~d|P`h<?!FZK }@Bd8gU&ӉZR%֟::ڝVʷN$v{M˥Q5-Ѧi펚͆kFޯ Yj5pةGզbݮPJr<˷[;//T$D7^i4jg_d|_#}o70 ^2o:jsq ٭T*7X9A,a&_r' B!$m6F#Ee~aNm6W*"AݫY/$t@ZZ,fAN;!yNU夆fvن}^֪g5}ެQZ-}ևh;6jNlѫXJJ,l69 _ggg>|nkYG˥~G>Zk,> $&ݣ|h``G2xOdb\Y?l6?øB:Dmh&@'䎢l@Tp~h"#q68Vz|+9 wmGRȌ\.-# "cqxFC/_44djjv8}.%8=D/@ xHG1'?>sfU^__k45T2$~ڰ yߩU-KfY‰ vǠ(b"35+Nw敊"0_ժyO.\jU9?<UocI!PI)Nʴne UN#_4Ԅ=jUז@"eJX\:.']\\\X& /[)|*XX@}8q -KԐsQ_^^jX<%Z:M$@ -8<4z!Z mSfia3LT %"z]?6dbh^eZ6FIᅩT*ARt6BlXEO5ʥ(mXx2V 1w)`%k[*BgegҴg.$Cgq QWju7Q۷z̐f ?ӷ.P~LdTL&zvvfgBY  hdh4r$OĈCڟE~)hQѨ9 ̠En/JRA?iM^x'jڪTkɥ9+UҪ>Z ^MCo8e7|_~EFC>|0tE nr_QJK׿U?~4??Jw&8lgdCVLVoϽT%ϫWh6+H&Z[KFc8H=(SQƿg2?ظ( k'k6#"sJ6Nc0lLثpT ,}+v^gB@O#!p*R[xx0]a?rTt8Tt:f$Du#V-radammDi6Ng(Bv٨()^osc;ٸ Ңȵn SE4 kyZԄz ȫ~ZOXhm@ (hԊC,4#Ѡ}ԅ޷zv;dY/nuyyph"4ROJX"h>3mw+JTVIR\=A9ITIȲb sG#LE7CzSVFr)-bRIR%?2,6M>V;6~D1 ӵf5jY"^<a˾:AlbJpRsDR 5ϟax6HB>BZYǀB皳G+~ %Z..., gϞY}$+,ӏ?J8>vrlprM0>cXz 6%#.l$N #ɖ=8[jnF{ B3AQ]/p8顥Lpbfdcr1d"y F5)U8p<ȿa e~QKEͷֻV*tnUVu8qe6 >wEjZR fU.TB-(Bv>+,IIXB;jۺZ- g8Vʣs #&j6[j5 xo"{d|Ge@}/ WyD ;bzwwg$ri=">T*)JN<I ?bsEjwt\q*0 0!C)!ϐFv*Xz^윅Z3I hc'$I0\ǏuuueDm岊< gq>IA4Юۓ¹9vE Hv{kÀj5UI%'Pbfk0>+hvu}Y=HӚQ:K GvIH/.uh?ň,g¹D3t }SY@)dV槖YW0܅lfF{xd\*6 ؑxgW=hݿ~Z? Xib!yBZmBFK`-'M20~_ "aI63⩁6ܜJHu[փI50O=&[f`| N &6LQ&ރ%(ͱVD`\VfeY-QG5M-Aݬl۝;ʷ"7^kZ[Fuu5d{ T}_~E9`e}&atx—W@æsVglyjtjg{~~G[ r2Iglܐ.ZH9^ {H>':!A iztJKS&SBIZ}WVCRy)?'a,=Dd &IE.#'t$IKc!YD%&e$ ͳύ@zyJ;E gqc q\HLIuz1q8`=RL rϊ#<;Wigd@vO"sY0zƹctnϟ~Zmzz>`7BM2d Z y MJ1^DF 1d/ΟvdN#dIߚE}u6Yzpjjޙ~z㇓`y~W$<#[V&rvWWWbc}pnuqqa/qwΘ;28{Pq tWћ7ouQ TSxyyCW(TUF#vZs@)Qm(^={f##2w`kx;`lJ5?C[V8$1P3Q,N!:ObpX/^Q[uX|p~-e2<(~wwgFHșV?IH-MSx²c=d*u%[&#ۡ.MH3t:5'IDH ,dԮw `$m)?z//$A`0Lf1;^ e6LY#ZLzt:O lzX,LTnnn,zyQ`N~|dϿ[ IDATf;NA(./!A';«h%O`Jz2^??a-ӝ;?l*ro) |Rdh)J k'5".N Vt<=l6-ZAb[ <+ =8mnV( e.<ƙl+2 C]__!fɺ9 w!eE cn{%5XDx7 W2*(2bp8I (ȏXpcZ'D#9C;X=N3;Pβ@]ةQ|gkDQJzwiZ_0,tssc,F[@@y[FG Z/͎ 4 5jq8B!`,6(:zTh42~_5T_в4U< TDj\j^'4 =>>j0X&Dykch]Q~7 p3[`GKɤi";gbH: <5{xA>g,k} ~` > % "@0Y_J$4=>>>ARY֏r*mLD P%lA.ghׄ=ij0Re833R~2+;4s`EggguS m0q3sdFD`g "t1ِ0K6 y CE/kԳgt{{kmh@|4u.d>|.w6 ~L%FuDC3hFK=ľsͦ]*ߧ͹T*=djW_:k&eH}Z Q Vyyi<X@g2/DE-۾5ǐSw4!Kމr+/Ksk5iYO~Ϟ9cMZ>~h:63󹮮 YbHيg?÷ \2}Pp5 ƶ'Ժ޾}ϟ??A@[JԸ56ٳg搰g8p8wZso5u\92 ӋiL|i-F 9A 3a_xx^]9IIzq lqDl6#,$T`{u!y1ʄx&޾}xDda_2'~c n[MKLGs`9h23::d"7<gh!)QbS9d`/LD?{0D8adqzD5L˓<♶~~+`Ȏ=A`^xa7|c3B1J\*y7a0nA7gcq/^ϟm1@O>~h5X{^E@{qWWWv,WI`qTըAtΛ@RAJozU*?϶jσ5McPKa81?*6Mpy[m3!Pb,)rl3B.QњuACl5y.oK1~/'kzmK69{Lu 煨La 2gC`0H#zьf+駟ir1!R'@'C'd6w?icCt$ $a,`\ Ϥ q؃I H~~QZ*B? ώHK$^RiI>9qy7bзgQזLPV>L,bG`#`)Cj4G*H  o;|)ր}gs^)I $ӞO\°8k#iy-<˺iHv;  *J6YP电9_[{CC{4?'C}5$]|GNɑdԴ!#}酫/AXgD+ꀐpD]wZǣhT*3DB97byE\ڼIX99gMdFdɌ- M`O6YT{Å 3Xdr,OV0%撃L4u,bag^(ʄ|ZX+2' J<3:Wi ?z8Cl;hg.{P2N$OV z=7)A(P]hd6gIdb =ri:do~ K4?;8phDWJ^dr%9c]޼y~͐s scZ5D+f1fJBCs厬x0#>V?gs5\@ӦAO ( Kp\%d1dR_t:zxx0"A%H=Ȭk q8cbD6lRSư{,8]893v萉⌱W B;] ?;;36ω"@!ٙsq >}D /_@>B2vPYJ@}'Xf w;1s {A {wqqa9ʅ>9Nu϶džE!`~D$Gz}b3̽ЅFOFy"F"3jCwv2 3~-XAo ^~KH!n|mGԂLZ̡sX8hH xcH-cCv8 |MO©>ޜ=)2\.4NĜ`"cz֕ h 6ԕpHA^D@>u'GJ p=Ф@VO SIY{Y+;~$emJ}`fqK8A㈍w.0'g+xw' A*i EɄ]&3$b#_x[z d \wHv]5㳑CbN P9t"33DR1~_R;M;lO|KL/ j{زeY˗bQQDUx 9P ڦgbm=vݮ>lu; e(~<ЩXFBG 'IbunOR+jJUA{Ngp;߁ya15$ Gyu2&yOy~DAo,b|`/Q>>HC#gYq~]*@a\`$05HłP6_.GNV+c>>>ܗL/ @,< 72ڜ[Zj^04@}xJ?>zN~$+@w50I|{jX]=HK(PMd8Zo7F8kr'$`M!fYf3-a 82W&`@Hā\!!B 6b?9ڗ$@At$ZuA 9, c jLji H H0~LoƕK $,s6e6 'L&_,B09,6h{:G)nJjH-<3ύ8ʹ^~o Qyxx0}vvJ_ղSNd9 Ըl6 ~O&3JdJ|Wp+'fCNi;vk538&(uC@s<#XNf4>ri# < D o7 R|wb#ļh wbΦөu+}~6{۵Vz||4TA i8x<ٳg& B b'P>K2q(*7OS|+ |vvf@bȈgapk-6_^g!I]__?aAsh% ._"pD//F 8rl͛7nFx"7 x재v L@o"Q1$0pG N2&%эcky5MV@{M2M 6 ͍"?jh &dQ8{!%{[CDyk2`w {B'b@`Gpk xE[X/L?, gY>#lۺ{ d@d_FS~ApD?<$t!fd??Iw>HmNlŇ%m0v(PU|=d~5}7!0m4d8UzqLdOZ| RdQ-up@ZvA;#QZ$y(XAVLk l\8q__vذ&s`jF0^ʋ?>}jc,^gO=p4Nx`Z`~#Fϫ>aޯx7wo6&:LO?\>|l ~8!8E&@bpgSӃ1u(;=<<_ח#bx  - @}2Jo@"ʹ eH[ 2l?^uBgU83/_;O?2~83$wᐭY'!)e!xF9jf$q^wx5aH~v I>`j$ZARK𲔾MffspCCM{rH#aѰ^d6% 9+Ǡ } 3laQVXddL+ \Y$^:1Sxvzt^Z|BN|EM(6{zzEx_B7aX}_"lT`e U@&TXW*lEHVho¨=QWc@o0 /uÀѱ  AV!kL'5p؁cyl Ƚe @]Yǫ'*r `@,q z# ;ɤ D`q. NgT|!蕟r sgFE>&Q3fw#P3dk)1dV0n5Sv%(!3hDn>G졇HHG:_xa/]@?Ϛ4c^" gto0NgE#>2%p<@>z"O6}m&Cc fm %$ [KGs?_wSw CBbZ$Y{D,8-׌DZիWZ r=d@8fۋNd_Oṹ`Q޽3#g'xPͦ...bP)f3{S!ڰU%`ؐ@(bm|+`kLC-ϝ.;5O"3aBgǓ@.gxգɜȢr qv<{l< |zC D <(P'33V~wikOpb| q!Sc>PDOGhu``Yu`)K@ F8dl6j|NI(NFG'SK#y=_=*RQ2Fe #aB9"`&է(ipn6=FGd1Ǐ8>rV4'D;nnn`t QOr}Zg(Ƒ :"0#^ B),7@+( D3kY85 xGXgel(6rw.˙ W˾ +#bq@WBWY7?>ɲ= Ẋ|g~XדZ ye&!o,ޡP,P7jW^ )ς"cN ׏?BER WuR!F גQk"z;%0g8nq?`9h^ ۷_@s>xd{4 % i C} D o8/S3CwdM 4s>iށy['(HYw46 _~U^c?l#>2eT/Xę~{1jX~ 0>hñyn0lR^JjO(=~$(Ѽ8qV /74Y{A wA!Z ;{< 3j/'ufxsA ,a0Ĥ@S9ȓ<*Y>(ygNGRؚ/d 18UϬ󓽔*!{׃1 iqPzMy>ށϥ`? 0~C :9 J)Sߧ 'cHH^\\'0^\\v߽Bl6V2_3}<CDnnnl+?`Γ>z=z. ŋ'G7r<AǙFku'·z>X?CQe=\B"@Z He $nX_X,lFN}ck@&I@#`EC@ "IOcNLrPyPT@s/QʪtBsE׎uΈR8yakrd= {]]]rarȹ3Mى!0ˁ9=$[a3Hq:###Ն Af92O\&ؔU̞C65D F SYGK kO򲍏!+<٦=11Q8#᜷`$36==]?D9FhDYKRQUEpzGu!Э3ʐOxtlgBe AΥ [N0:fzfƜgffg"A%i&GYryGs}&ghEeN?~o<>fɆCHY?D&'p`(r~KNNAf84c^HYp]+~=3瀼իӧ\{^WuS—rmqq̂ˬيmfPA@"G!Lf޽[D?GA2AZߏ-Ex>4ȝC!۹jѣcقϓ0콩]^^Ν;wJ3 Q3/ЀZM=p9bމa9IkfwɈF߾}RZ"aY'SCu8y0֦ˍΈ2tkrHY*+-//37 @x0kAZ8677W%)<;;΁9{LaMI!lgebN}ɞid<f1 ׁ~s@^AθZб$1՟MШR2I(|9|z!͠T.ϙƈXY8֖}j}r-3[1==NOOKwA ;Ki`lS8o߾J@OF亸hbtʾYwCމVCb>'R"prBj{;::*6=?H{*(! r INGF"O>v:[/c(efpQ:ZB߼yvwwPPla<Ab F-PJk05{&:r,뿠#z`5(I9]:rN"2 G{e_nUiKKKmkkhL@0@0(=^s)J# ׯmoo_B drz1ؘaY yg VJ+;TV@%a9Qd###mXYY)}cC@K˗/mff4cQ pw<d:8.{vM"ᴉV0Q4FrHK.!kV8<<\ӿ1]fv+-T2_֎!h Oȟ~,bsFe`T5R߯. tsAlWj{k536Rn :k!{nq(rV޿$t|rEB6) ޹s5 /6R_dԠ1;DZNNNvlVierrȐ5P`bb_&R62xE`w)#gI &q:ÇߊNՄ5cyIe @T:qϞ=+ҁLv\dtu5chhDο,H,2>88Qj Pcw,2i T Dz1s純:΁嶵U 9sCyn;8ϟ2 XoҷF~W<]80^Z] :E#V1؏Hw\hgqəV` t.L8lRΧ,7)`OI%3P###myyP vqqQ,Y"CD2韞o߾(J@ e`Ɲ () v?CX`7o=Â="<<|(`yJ&hu||\vCg6$Y- Z hG*b8`W=ܲV Y،κ#EF/K'X.))X+MF!aӂ( sQϑNșQMbe%kAdjڐԐ $_/Nv+i(wIX5J `S99{~xxjOhA#|9cccuPYqv$(EiEPL w^A{Y_>J [p# PL`Ɖb}×?~,.AC:tڂ2TrfA ]a%đb-J5U-'iM &+ƈ$J\ |rIʲΝs:;;k$$Y۳gQ_DF, >>>.%q.zB9(ٸqhѲBp635lv*?,Ȃh"zddf^#q)IDcAO4rNՁˉKʓɟD>HJQb`eS#99[!ghfff1bkYL4i9@VFGGt}& F ( TRT70sw [i!3z;dxfϲv=YƩ;d+Z?Y74mjj n7/\J1uELk\5B-Dրf`Ts_' p##' x7?8/H 7!ֲh(xvYwGJA 6Cav1ɫLe#A2iSJcQcULY&Pe>?HV-gbD96"+o'ڵ2E>5FF`g&):*H# H%H2TMVRgm{{{93zx-//M QNϪmAxJr2+:D=j9Hee[ODzy30@,\1qttT=ǝJu9#צ$ @OiDcSmP!45Lm^]]m[[[~ߞ 8DQ=~lBdtChg 9WIDVn~vppP$_~H$QaeK;D)pfBÆ.)Ji/^Ӿ2Cĭϟ?W锈&qsˢЭ)Y`V_Y3%$dCHɂҸɈ<cmc||'&&j]M&v.|EsA>Wpv.*AdgSN3>_~>܎rޮ9! s(9"Q=}2&̥%^liIMdzr(yq5DAm u{C$HLꝂfLx V6ϊ߼+xH8b52=-s*@P'p&<ڟ^~ [ :!-*Cv}JW+++5;B ?88k96+BrAPDMJ -lnňX+s, ٜCd>.G ``"3}K9˹PiTL[+T'u~؆J4@` L y["(0<.휯P˵鴅> WtRvWWW+P'eeC_v1^fnaZ3p}1e4}9`vc)j7$@Q5Fz~-  `$7GU$wmKKKeXMisVtf " KQy2CN^`;f19@oe.eTc.//y_{ZjSβG0!'m{{oB'(9'}x q g9) Ԯ$իRJ87y%;{Aւn"YaBy?2A`NcS5MY;KOO! Tu ymooWQp,IYhw'HB^Ƿΐ7ԏ-9>>̵/$~ Ag7D9P;fI6.\6sommUΆ#nDA>'Od>e`- 2lIAAqkCDĹ}'Ch>G9߬ P@j]f:^WĒ4ȩ3-#-;:ғ'OBƧEMD_'ttt{}| \l#PQl(%Zz1WY/_A{Ezmff˞Ǐ ޮJJ r||@랥KvNFw]]]: :H=̲Uf#BD' Ԏ!k°̡鴩JՀw"_D@іmrwi}CCCӧuh5VĥI̒%=j{dz>~dѦF.P}E,iSlv - 9/z.d͙L@ )Ϩ˧hwjO7{e`o# IDAT;w>SL-;I}`>Gz΄ϳBO>1a>^mBU2;3 bHxIJCiF-jIUj6JiӥL!>G: ZiB0%mEBF2X# 9sxvvzBNyG,E_[A@Pi:-iCFB{Y+e"Biqk^wRdn!;u) "Pz  lɎl.B"UkTo׾GВ,]MP v[,؈Cj1ӶVLoDB 97uxxmllTPwdd-"EZA8ak0B3E&K/{r<$&5q0dGxh!; D3E"Ӂ94#?cgj3Fm:GWOaR|vvi B8zuCƷ9 W&gY*hB͎'P$EM*1X׭3<pNle ܌8z x ({S geyy$٭KNi MҊ'es6T'Ct:Er7Sx|֐oĞ .5 c&E.&yY]t 7o^w2jWH=&lQBkH6v&s XF*䎡(ׂB ]y;;GrhmccTjAAi{{{}WSL5.k#M655׎499YQ*E̜޽[2ͬJj"yP@ A.2ΌU"省qygf O}TRԛH3|Qy v}sUSfIAxcw#ARh/իWÇ}'Q+5~,B ˩Xꖲ;C_vFFFfeϗH|8VW55TF^CEܴY_A}`uu"No 9TYӧOv^LÒL:lńPMaI=ߍS󾭯z"怅Մ] cR12߃,fgI%u-.k5v_~U̙sD^()[CYlA)bU^)Jp5,0ƪ77;HGU ?==-v38)&,zp-;{i;88.Rj'''maamooWgKupp`1- Qb$y={2lUuoA9;\5ܹsOV-(,;rZbYI В錓<[CdXwi?.Ùcrs `63ǯ_RVݻmoo]__7o޴O>8W?-bOf`<dk}}0mnnzr5P}(_ƅA :^3/P#ԧ 1OVB6TƌOxS$"Ё@2 qJRwK pB9ט#%X-:չmIz N0'պI"rT)L>\:hy D:I8*bÇ[#IiWBa+8ST>&vN|^jڳ8'۳C~7޲\R֘NNNʶ1&#/K*.xpWP-D&Bϓ sd KrJf)E,^N{HY,*ѷ /wE'Aˑ(5RoNןeL ҍ0={ \XTD @@t2?NT&˗^Мɕr`)uW,T"oKggg ܬpSBsYH}XD k<X?Ȇ,Ǐ}`,8Kw(FΑs{W& :t*;IVɶ$HqlDsoM$~W\{5׮V_bUJiCNC ֶgR"9??/+CsA_:U&7η6Tc(GAi)en[4H'g`4'''jB aN? +@>B3chH"8[]|~YYvB9T5|`) v}}ݦ9;=Io޽{W-\5Ay >AMI<5?PBHJw7hN3A.!0f}>ոQ8BwZ@pC'C1[L5;`r2M3^-6ϥ zu\KgTEA*uٜ̰hiWaN^)sɀNq9 ٞMq ͧLg ?19lbesϞ=kLU{dZ {/0!w߾}yM!֑҇Q-~Sֽ"o"YJOف:nLNcH%OtATvɩ`zrT̴>u?tJum]-dmΝ;[' pP Xft~Og{SZ+ K,Xg=;Ky }P筍S P4v@@ 1"d03p !H*XM)u1 WLv%kXɰMs9J799YYB𐟯U b3D[1uss3Dw0 H<|&愜,E2I" CsUDc2!ȘX'#ExŦ7ճlfOf|]YY @DKJtdmtCeRP{zzZsj`WЩ-I7^WsN~xc7j).Çe@==/xv6sp@"@𿠍9&ršy*iAT@p` ONNVk`Jڱ/i @ ׳Ij?>>677FAa|fX!Hΐ7uV|X鲏cw.E`TSP?J9sƝ)$|EJ#YF3!e*9p%B ל(CTq̖+1`'G lnSwzzVVVPP1q<ι"B$~Ϋ$/w0e9<)"q.~7URJ%u8;Ç E95!S~XF9儳۷ vqqTzeQQDi:{4sI8Z sR# Cf (pj)!p42:Y۫YO?UXpS&LĂ-f%v_ex)B_~}2Q]67AVOM$`YX:yyvwwK=F,ݏw-I:IpY3 yvQ3H$Kb$_\;?Y9^,ŮZ߿Z,[QyH*cO3N "űp]`ugθ8"lfh!3 iTu{/yG%<x`VjVbI&)_kA8fNe g3ʜ'?~;G$1FyN!$"8D-YLB_U41]7>n00'd #}uuU 9X&*[]˗r)H9^ШK(=88(չDA<16Ն]g#']}YQb8p~9HǦĐbC+_ٔa ^'[S'V‚P8 v/KYZ{]9ìlbb6<<\3{^ϛ;<2AɃN4D,^ްl$͖D>ed/gIpro2!,{NRCj ĸĹ" pȃv' I:m*zmmmU[{N+F.su^9lH V Sl.~Z6Q Θg#J͑n[ǩ0MNN4@3AQDăe|=;n;(Jn7`MID zֺa~&''e)ŞH :c$ 235V؂[N_2tm>Ӕ=MԢf|icccZ3kyd l@M#F&L(CѦ\ !EZrm{Ѭ@\/ʒYqvZ]GCRV&YFwEI#@auY/D17"0x >AZ 4nb~5ĦW KADb3az)99&3?Su | mooW3[5JR;'XQOy0,MѲ˙MOO}ζEj\:޲^&''k q}}ʀX眽ɓ*9@(e-)ruu՞?޶+ȁ.iȉQ,e-Jp=ՍGGGak1UyQnsjBP$ lS"mJaEl)9;9(l{:9 X*G {[ksR6\{QB5u\^_$csr,P1' qHDi J4aZ(5Rʌ]ܴZ90Eʍ1lpȀql_A2JYaB86DjQL–hzz`jf kxxO?mΗ+TV3-ܹTHn a61F;{e`*SY__onoFiOrR8!ЮȈ Nd $,A1v'9klSzvrr]\\ӧ%)'zd IDAT"è~-//W}{ˢKqnՈϯ_'c4aRwH'E*ik V!qLXYni\Zw;*'&&e,L=yJNU9lezC)[Od)nTJPId]]J01gk.}|v1;.} Ȇl2p b43.8ujAs0R%Ggeq摊H[kmnnP6;\Uhԃ#` g{v%Z[Շw_Qu Xrɛ2\q`&c63Xi* ԛ] Z:am_\\V/ÇED2@pM{C.Rh8mkk/qS53hZK3we}r޽?YЌ_5rlIcFÇmww"Nٕ O%UKw1FN%$Y&:G]u~joscDE6ϳ,b% <с9abp5)6Zm]EiM?p Z⁐`XxR5]uNJ aGN0 8*PowXuL8Dr &ӦƩc3~ %hAfo#`Wp |b#d;s)~?::jSSSe#hNK+3スK`,ض?2~O ⦬(ۤC}V6Rk SΔz}0B9RO>+e+Ȧ5cnU'v2;;[A8 Uuݲetv@y sudk^t[wRz5S -N)G]&?z{688޼ySr"@>O655W\XO/}6^bqfYJdHK:ރQuʇ5=nzz-%.w'\N+>#19緂x8;јCȢe"3ޕ Լф'nSԟ_^^öXnADB_~iu)A٪=f ̟MlMX޾uZ $4vM)e1 -s.kNz!h-<*8↺l#$RtI=z)1X5 ؛XxǗpdI p~1 ,b,ڬ١4 $RJyލvD2 aj|;aΛ7oZk/xY#K=DθBvdSa ?۳`2hR@IU968Z;~ZMk͏?>|P)U$0A㣣6??_@W=a)q΂r Mk2ۉVdsmuu-|xU(-..655ZkU277Wc߿ϟ?nA@ΉL͙"/ˇ@,.KJd me R"zlAu/C}<766vvv*V3^-Bq%8IIA\ϜJ)ȳ*( &sZ9s[@Fb >J5HϚ7۷omaa)a,9!H5633SIN b$guJ6o}fy)J#DDZ M B`?88X)Lc)zu7b)/{ 8^lҝ}q(e=O>m^Έ!97nhr2V7==]םwiJ@ߙtK^sxxm0mI.*HZTʰ$YH,G+jhʙ9A/)^de>KbRp,WQm䤭= ӧ۷omMMMU`3>>^ Y8lR82H>)GR3HR"rzWKbvzW% ܙٽ UD}wfs r˒U8.1i&ErԟdjJ5XlP 4C!CU"QHiD#6iS19sI ØKKK%>[__o?~}Tqkm,̄nv a sm%4hǚOb<c@fSXA$0::Z%ǥ ZpxE}{dB;I{y-Z&d&Y;88>I0VTBrV ;o dsfs"C$3{h @߹s8A,W~)dPH\F<`F+ wwr4h~}A`JK6 9"D@O:ӂ@ƑjR~WիWee_fY ɸϵ&6Fz4NIK D Md&}F:! 8{t!e `蕑g49|A 0j?"5&Rmc0%`KBѲQN)e+bvʝQvQoONNJO$d=23=99i+++EbeY9d-//?V[ZmTtseY⸜u7swxgggh3,9Yr>Q9*Gdq/ H_05/dqju.V|MTLLLTml=!k+'39PCʕ{ plUJ*"RGCv'dViO-h/SrgB0`O'-cq*.66?KG黲fL2v $B"ezD"Ib7 A`lG Sw^)2drԢ$ U/ ԁNI} ܍`%p7633GGG~h#f4tn_+g%LȾ@I@FLa);#1"D%1 pmo dܥl`looqY)SJW6566666*Ch) #0k駟F$>RoBz^9B!>% %?\fWISx#j)Т.o\+#g?YJsvpp&&&*һmw麟FnL%8NBNNNJ]:4! 99ͮctss%Y@'p#_UlwKBkdʴ&'&yH_K÷` WvHET.xYRPh1hqVROTa.u} 1LSa̜ZTD">kX@LOOPV؄29d&ğ੯&eAv5;%iHE-gI0QƳޙ`-*#Yd!PcköRgWJf=jO>`óq>/^g;:^ 8*aNʞF$͌ڝ/A}u="uvR^1gO˗/8daŋʎS:tz?xYESC@/AiX6Ų T#ű'JW S/KŶ')huzloo)jqq}l{)qǐbʂw?Bi]#{ُ}J8tjJPs5ln%777fX]850$-j*8LuṙRI!DR|av.AJ`ٜ 6DQ+vn2i73oOWjADs_=Wfޔ>F"C^̐ec^2]rE,=r7MkMMMs82{ |r\Es=wOr> G쉡vvF.d2]!pγ>_Ee ÆoW9C.IYIm2=?5ܴ/^*>D>}UI9 =<wN{>&Rq=8zZԯv/!bZg8Kusd PdŞY^K5{NR9 Nbұʼn39?>N AH# : -"ϩc {;Y;T-#,dMa}StHGY z 9pF`P):o#0 Ό2SJ&WA)%9nHYdÌcuם&o<}Tؽ`.zq1f JGPu||\poڶCI69::Z5A6-KJO*zBpۧ~.W^KfR 9^ ZnnnڀhC .j zH8ڦ᩵0jl!s:ύ_Y4@&EsxF}0;FGGHM+O<)~vtt%ê^>Xùdj8.G(ÜW=zH HT1@b (>|'*266ֺn(RW)ѣGmgglLEA+ҠǙ cFpFʬCRZ~غ[t0w!Ln ,6C O@0An֣GJ뵹>.л^d"|pEy0Y{ԓ}-WWWmM@.!j_2QRlP;88(՝k1¯4W?755UvBe'r0!:BQV/ 9nX>{mmZ EJ) Ǐ>%7n>|X5y?suuUzω[HZOk7ʶG %C4` W?.s&D:IgLQܱd̾N-gǐ-1Xق cHR{,dKc$0>' rh'nԻ6O)#csޢ$1 'c(x~YڰNOO ) t85_\\>%PDŽ~ec nWwdxrrfff* grLF$"Q @BYR.5A#ٱeBe+ p`*2/{D\Qrdع2,*8g[A588XAB / b;!&9cppח&-!hƍ@ed2@;ta%K,YIAbc_{eT>Ƚ`/S]l='z%U#.={0߯2`Ur89oVZg_'Ǜ-JusrG,C OOOcR Op)#-Pp ҐdOzBhrQqg4sG;6<q!=CNt\Bsul8<2)Cl}m58a8o~*ιd bJ*E}QL'}M뮼uq'y{{{l:5-3Eã(A |zjgff S(2f ,V;@U;yN֘qöj3@ul5 9~.{AU  s6݊-EqyvY:kJKI0Gan IDATe9 YO$RI(ZBə.NāI .]ˏڜzj1 93f" ޙq#czwZZY/vlHCj}HGpue k jJj,r߉_KinH""ߜ|||\:$!9y̨*?zfRRG%#T`qs482O2c6Ø9]F oD{9o߾Tl-c'lʧu,gJ0~+]ck` B4#aݻ*D娐haR:yݻמ?^#jK:B({n[]]m[[[UZwj?s?2`q$*+X&? +њSDɂS-52 q.f%:tir┽gamH0cccғB!uYeXدXMͩGA24?I} sQC$hooO_ SM*Lf }@^DʱZVHq|g• =Eκul;;;E*Tg¼d$u&NNN* 'Rw-9HQc.^<<<ܞ>}>~XuIG{YOMMUI(gkLi ԚesD,ޕ_ݔ@{ yM5iZ2/ljw-ɰe`ΆC-^|Y5`0-G[JQߴR5 9? 9%ɭ돕Ͼ|iTmq6tg[fr{8#7%[M v݀YDJ f󉉉嬽aʖd ezJ37#Z"{9lgD.QzF)}^@g@A3ZcTj|AeS>˙I,9ծ|4eEC(Vo?s;;;+55ί_iHP'zқݻwm~~D`gU7&Tݭ:,aV1`G)$SA^K %ҩ 1 ^T.~$8:Οte hv477WYVMHjPDa"p¢#Б$6Ii UVjA,4`hbijŲ A \$(H$w-Ur"ڢϼ~.![hT@.U X`\=kBLRF**EiEsE٢7zF[Icdd5ιߋ3YсsX}j'$ǼqgMy"ř{$CG o%'^B#/쥿t: nw3e$ yx1;;;줖d+". X9[gCxttT6$%]S>w:[X95Sd=}dHORpxbf]$79~'U:,шc ;9 x8qW#VH(T$k*;cAi9#sPdALǏwpRIO0jJ9L0:RQf$a3Y}98;޲mRթO¹Rr4 W ğ骷cc ve&ɢ]3)*2`BkN9AA!,픱"䕩I@|llw;Y~vxēHPB\ Jkj::ŋ#`muu}Tbc~駶ע!ယQl`qppЦ#Gnj1k~h;;;X4#Uۘ#] H>'Ɋr+'@%j׃IRNr=ПBe cpXwN顲)ODdr`?PCjAds ?"8K!ቸ8$) 0Ѷ>EE{˜}ΖxQ,YL&a C"8+Gk% $(9 ꜰkNMe/G{t{l4vV`6g{|~FdY2[b#,h3`H)Bq817J !!39{I>>>2cpWu9cH[dЪ(3Mg\&6g[Y qߡtBT]ճkTeV)ʖhaS.QkkАWzq4{n{Y;99i_| eñٶL\j< G˗/x6IL{&P0,G`kv677vvvj[.H<'l]T2|D)ZX+A,Sz6Oq} 9є$` Xr)KwA§`B&CD³OOOkӧO*+Nj:XdIfV9 hB!$I*B&@sAAmff2$_Ph FLp+4OA :HB59==ֺ$ܦ@fuwwlӝ,+B%#׺Wk_n[?D{]_ !ߩ\jn$rRHUGa9_NlnѣGo 'cJq| U8>ZLREH‚k3x'4eD-Pl*pf,7 MylNZ82mI˗]$rl=bLauf*6L\tE'`@X|AYMy<1'埄fS LRB lҙaaMRɺ/j*\~"gϚ|{iyRAf;mݵ~ Qi۫K)EisS)GI׫ wZoooWcEg_"LI淿_u,&-Gyrƭ)Āϕ+]gP˓:OБm}}O2n[fdz%{)'Qw^m޽d]Bd{( e mYF*=yH VȾZA .Q=66RN,c,]4W4Jb?gc{d zDP* y (uS~ÇzN677΁]IF9l{RA]޿_}{J`͌'''!猀@"[{M0K֓s2QrP!葟/@ѕ;wm!xȬNj)qfK> Vo5E@ɶdzUoMpfV˲O l Xg`5rKKK~X M pzz~J0 Jo,W%@S 4)XQ- oFd,0?WWW%H/Mx ydwI굯S-4wmniM ړ }777PǻnKKKo[-5+?Pu'BmҠ毜ŋٺצ(,{rPAN (n'&bf>_r{DTΙ" (YϿ":Z!>bev1{GaL`xxl ?88qbҡSjj(eNK"[n[Nfvvݾ}FtT.<~mmm=qggga.A{b;88y((` 98r<|uc#xFgq rR:"C*, f!eld lb}VyAiwB ` U{O؃E^]]gϞUnr8H,a?Ä0ޒ$`/Y8D=|<;37o=11~zwٳgmssO` 8jѣGm{{0f)Mx?2`4k CΩ"MÁ#$*g $Եfad aA{΄rnnqN%ڻw}3c=8bφx#:/o>|vgYpbxHi萨zf ڹʬ$a' h&Q+[²b0!D*`7CC3˗/f`2BYAGRdɉ5r j{e~GB$?<=dQkպ8d[T2春 fXJRy Gz i `,#B)lyV/ s$qٛ-ܽ{o'Ydnaf0[jϳ'POo;kUJt:rttTe,EYCe9!;ׯ_Òipp9Zdƛ] tohhhyhhu:ؿHp\+z=}(N7LV9dHH]TI}`cF%3dDю&bJiܼl&qh0Q;g#]JٰQ{VбK"[O5Ԫ]^^: ƅxT@F!(8;ZP@ xΫ^a͌W%"LCeEgD>D2dXs0BOz)H 002S\MxjSZ:;BNՌB-e)2+@eԈEe7qZ骥rȩY D4/E* IDAT5o߾O<)iS Õ]k2ҙR6bl6(`Q v y$fs9a6TNCG(qȅYvo9oZP;+΂;.okkk(P8:RzellP1?))Ҩʘ$8t$9ghttM rj2KxT$rYJIz&AEP,d<#pĩKy!W3-ڴ=0a8 e}9˱pzdҨ>?9'0 ^6$J8ș sL׬C09vI $8QRj{`Z~R9oƙ[YY3c Q` LhrK׫W]ACf %RSt_eN ?JGjogtvZ nO@\i[R2;==-Yԥ9ݻw59QSJP* $J^hQK~rrR,+sqC; j-VY{E 'fByp/x@333UFFlE^`oko߾-$:Dι }÷aaPCIqf i('uɆs@ :224$ fΎU肱V!qT$y(ui JK˪K; #_]d dê"@~݄,8{6]slYi*+?5E&iC"^*Q}O@KRx+'w"{ӧOz믿7خhfm ӻ10)Q977WsBΓ36lZ2|Yٯ"%r'eCCCEI'k>Y7#C R|߷[nqH"ɜ%kAC9> asvL=&NL=$x޽}L5m) $t!`S ޘ촻[ɰm Yo&b6޻9OWupDZkmyyO>mmm/ YPWw"J h,ӧ"f$ֆAl4MP5D J([n߾&aY?? ĉql` '&3\F R4ij6 3=ou89["Uh@/6RfmrʋEIKcD%/ a R5%Ppj>u@! #)kt> xnYL :1bHbR?55՞`5gԙDdpMɧLmvp2gUdjjy΃,ecI;E2IK(|GvD6e 2)`[Cw2'\VS [腖)bݐs%8G |{랝n[|06??߾|^|޾}*VJNJ*j3L"v$Dv>8:/PNX~ q>$.ܹIE!5c9Zr^ڄqEps|}E !юsDaq2yxsF?(^;vaa߼y vgxbS2A Y3PVSDNFs:h2h|9" R2r1z˜xIZLO@eD8ClwBpԸ>~^zU \,Z7rM1j)a dXH~j.V r(%h uyyYsmUF-u:Y wf}}L B]8f{α19PUm|nn7#꘲a\c_pҡ?Dhr0Zۭ?AK7ZBƜD3Κa|$9ONϞ)QXuuLj${n}}qF#&'˼}"-I,xv?/L(){ۆ2iDc4=r0e8y _qsbB9*.D-4$o{&! )IG);-8D^C6vmvvmO-=epbŹJ\`%2Ms:j>K%'pz ?H^fA8ܤ>1WՃi H'v0sD}p GB0!2C S0 FFF* R~ڗI[/)O})ٝYS1V4Q3੸E>}...K=T9&H90AP(f4T9Oٻ73A,~% 7;mجO lJ LpRصq/e| D*IQJs03ߑ/{oR'e ՝Do٫B7\4)BR.uOe62hgv`l6F.a ]vʁ͕q gS1* C;(z!ð6$ed #r!eX * @Ov/X73$;pZ~zu8&EY(0$jPtLe LTb&''+Sڂ''EJ P)tRCVUIo{r RSamh>{heQ߾}k^j߿/͹s^5AN<ج ~ˤ=Kj tGp+;c[1X|yy uC5 2eON>(Q?vwg\%[`<&Ӗׯ_W- M{o{X r4 #%7߿I Ps@҂$J oʱ9khllV aMf4xڟqjxC6AA!g{iEs7d^p+!9J=X5M/կ |5PGR>OdBaʺ )bcD`8jnv4GY}fffi 0]&'B1QN۩ }Cꂫ}9 L<}mm}2{{{U#4W9`"C=x9$p+HzykuF(An?@` l4==],i(+u>+QƱ %}vv7RZb<#)se[lzEo>k˜IB*!{ia///ۧOÇQ\l1`gI6o"Yvm޽?wg.)%H)+GrfYyK; g! ZȚ_`z9a%;&~4 ݾ}MFvI3eX2`1OSɠ)XKHK V `~VVVR]]6W2"jG&cccugggqV]lZRH_gp4ŋE6dEb%AC) zmʸ%IKMkwfF%aha03Hdn,YpkZ$άL K^` `=pN eߵ.o_l79g[ Y%4CC١L2-ZY3I CXgcbHAΓ:N#yhCFr>,^X]uugMf[lH tSRS"iɂhAN0{d?<5•ryJ 90)?gCS׿%Y Л$x//zlHW4@l8y01CD*c`Ej"tʩ 0˒d`7o 'OnɄ Td,BOP9Z?޽{WzUhR3^oMj (7 2pe`~H}c:jTCuCjP?}I߯+ b,x}29[r4&qL7n_Cmaa]]]eGڏ9||~~vww@0@>< `vvou9vC,r, c4'(Go#[)[|u*{ͶUE Bg8t7tYw/+aMH>Ir#$855Uw.j͎!)Mwe]\k>\l]-i&ӟTAޝH*ufA{"9/RFnMI ipM8$^A7[]&J"HWIԷ:JDsЍ7ޤC>K.hvELC9)}EPgH+7oh\Pd`͈/^0'#,0K9R7A2xuf?l?n>|(G~xm!1@ d9ѣG=B "nk,E ×/,,#H§9k-N_f.ZڻY<I#fca[۫d AN.”:3,XE[U+q&@uܷlK k 9ɠϽ&&&Jiϗ8;;kK+nþ 'wA;eTqƃleI2,X>'p ÌAZWl31ЮK)OO?;d .%J3;v\ Vz)%ي!5nۧY}~ 8td(Sk[Qf`|;j `z ψeQJ?H`彃K0\e2AٰYz0|mqq9㝵]P +]*}~֥9*^ceL~ЦHd},fqqlg]ٳgmgg>g677WA:UJpzP<ݗrorZ먱SFKR|֭V$GڇUw^A-+5<<$---EPp~~^ @ OP@ƍmvvl=RF9n{ݻwK{җiC{R[.PN[4t72Q8a4r*z:dApM5ey@nUǏɓ]S=gREc߿o+++5%>}cOE3}4bӡ `=F&z ^ma%iJ5!meG! GNNNP҂ag=_+ #ګ9J 9J0J•]z";r 6%{|j-e zCԧk:VV7,L>55U[93>ӧO՟ggg9F]lR"#;{vI Nog+js4VolJw2ON, Rg6y(kW&;LeoZ(5zgŋݻm1S=G ONNn7 ٩@MHY MęK:>>666Nj^\\_T̺7-)Ys! ٶ sN[S7ŋ*;Z IgA[m;^(E,N:QZl&&&Q{Q] WN1 p1rٖq>Aad6YWLZ3* r0mw6PSl߾} 57nhCoR9T'(rK2Z,/ZQ?d yj`ѝ NNNs2>pmQIJ+:0#,{9)a,+h&,wSSobkEJ ɱelJl`pLБbbV_j6%9)dA,)(ֆؒ7. {jYd2 J3Bʑ~pz  2ؖ'Oʀ 8듓}*=ީ׶X5@\pǘM{}}^zU` -셝lKcUAmQ5uIȟLC ƨ&[2!2&Ɓ-[BEY֭[Xۗeke\#p9g5{U1ۨO\TY@vޱ~^{moYPP߹srA&uђRB ^_MJ2;ߩ3I57|bb⍈AyPZlWS3Pa-Ö\ENF`I'4r[5e0sHxTA?{S3083{5m-2Ke`%G C*/T@r1zիWmggMbP,AHm g95+dCs28(%_t3'Sq?~Wpz+ɱ5.W8Ky>siE֐SWޙ13dڹscw,CPgf e3"!v?KBl2l߾}kkkkӧO}R={677X`yHZj Jun8իzgV2] פ+kԅ6mj}vx{mmmoo R9`eCv_]kĿjѶ۽{ԖY~vNPJ?O.廱1:vӧOK1 ϐ5q6j9:e h$7'/G;88( "FɸObdifffn@m | kill|mnnpJvn r DJ,>,t0qS*éĘ :44ԆFGGȒr &ND\@v{0B66UD\XQz̐=;`n$ h[ZZ*h9Bϳ7"\rV 0bmllH~YA爨߁e)1u+/@90>>>|PWk'pzz^z۽{ U_ g/3bK4C'#{*S 8>hkkk}S8ܔ'T3e4!L ;̉*vڶ#5z ?22ҞÞ ɲE'{9e>Sv^WFp.l{{{}{})-g)B!C/LmO" B4ZkU&J!kAB&' ifרGP?K6g+!A8Hvo!8ߥldd.ΎM ~{ttTp0C_οK x` T)ax{ZAq]BrԳ~橋ll8ӡF|&<4c!dQamookr+gr <_ړ'O*Of. vxxX,zYz^=Qq0g ;C0(ERK>>CmO"\r3jSt9ҕ,z} ڬ}ح[Jjm=rfi  d7o,9aHO%Ȝ 8ĸT:|$ݺu덌H";Jz{fBS7T#cb8$muu ł:2=з,484Yh$Ur o-c cNOO2F/ r:]@=gp|֭ÇLAI?Ťi }kZ+fcv c"ÇT1R?n=*=huubmMLL644T5>xYRo˚U[YYHX`^=HE0 C MexCRM6 - IVg|\{᥼a # fff=IM9hATL\3#7owU&ǪhK[__5sc( qi_^9@.{!qb,G H8j::8PY3d-d'˗Gq jtt2z_mnn.{nܬrQDs!|ui ^6z>|J*~3񶹹YrLl+)  VΙ^@F,2Xp3N9%[D\='&&J[lqwH=!SF(UsH e$F uvv HwQL{J}(G:wε%ϐ%ti\-x뺯)966VϽYTu^^^#B]{|(+jlF%)#"gǜ҂5񂱴?U;A-..5[''QTQ qk-s 6zjs0N6ljѪ0dz!^a( p7pٳ" ~GZn߿ Ҡ jh 2}!!!tjő YCwld1$g}1XN'gA9|׹S2vT擤(A_޿?~޾}[g}ii=I@I Y4)rB_LY#ɝvppPF`}kZkKKK|uuUi{+E=F~fC rJIrs@}'Uc-JXr\`VfthbbMd #|E`ll7c d؉rslV>~a`HA+ChJӷo* w 0.ڑC~0bsn`>kcDe?n^. $=Gf]j3 _.ۨR9FlAы.ݸ>|P g2oSGg,b%3Xmgg"tH{Qx&n!͹γ(N_<>::Z6;poNɲڔn޼CYl2>>ޞ?J!j2ԜG>$əLqm) anFp(H XMϡ1Afڽg R qA#Gud$aQ__Z[,"P-WbCk Ҡ1'Lۘ_mnx t\:zU zA!-u+W7K!Bd~~zJ%Ȕfn%T dלW>9tΝjCRtF:R̶yL!^ϥr9f¨QtN`J!xTr5YYv ݻmkkXv6$"3N(hqJٲ5H* 8Z"RNi@; ն]5/{YGsO:F:ٗ'Tc9(ƌKe6?>>nX@}9gMecCVg4 Bgr)' $6jUl 5ҏSfd{euhK7ΊTGhpЈʪ9o߾gϞU=qmm}x!6 RžeV ƾ~>~ا&R.KZDdR2U2Z0hQV-|dvrv7iMj!Ŷ5)CJ$RW5ke$G&)6Q3}=k(a|gY( WR]y,h†)ǧجW #T).١x*emRS:1rl{zsY7v8? L0'䠅]AX2yK}矫Wѵ%w^W633B$N6)H> '2\R[#^[ϔ=zڿ9STj-3]eKD" Ѹ֕an0_R+3"MS i5}hڙgw hRe{zvzzZ)r7 ZùaCԐ3WX}rټcA gzbbz/{ym}]^^}B*L)kdeJqfsf:f_-92hNoaaY5 [k+q Z<+/2`Ӵ/a4w? 3Xߟ ݥTb:- 5U ʰkrQ*$˘*T;2H/rjx𠞝= ;Aó+3J(Cᇇ}h E,4R̰:59*RLiKnn1w3ׯ_+5_2`Y)G#M&V Njksmqqj6͛ՑNi[\\@cggu: @Ґr~ Bio2{QBVzݿD"iǕnll677-yaW׿'+L Q(}>YJK ȫ `0k3Eظ6-{#e&9azz4(8$a'^;MHneAKKK訜/נ|[p !35ׯ2XT|{]eboN'a˗e1M tjj]\g9 +S$^={R 9ؑd(T'c9 @RI r%0πKq$hˆ= VV}%۷oj$#;,SܝN9211677"k,I1Ĕyelg9E}6[ Jkkkݻw62{hgggk}I4yΝ |$A8+;"K &`d!$]R ~OOOÇ(THV9{8SA/^h{{{ljۋLh*#fe렺?%`i#~vpp:NOr`N 'OhRQuZq;ٮd\}qq٭ B99B$2.9w$!A;`MЀ%CȩKq +`d!o߾͞Ak8:6C05Y0* *b*X99sT9←4fokC kT ʩPQRWVflAd)-7Xÿ}v[\\lURVI*Nǟ(8)xummzVrV1T&uOqvvV\fjg ,) ށx>q-,,TU-yet:u1d RDJN} D=H6!{yf?~hGGGm~~9K@vı%Mْ%;¦3MKrSD%]A{J]:;VCb߼,!Z*(p1/..  st~~^vA0 !J<`oy9Vlw!d8TX~[:2k4.FNJIE)/5u@K>E?ԗ=\j1Ueϟ?K( 7>Sd75X'4@3K (zi`e|lt"W*k-\/"/¿9:ң9#X~[ߏTsTLS$U9vgi:Pjc ܹӦK/XY3;Zk>KH[^^n?~Sh/ut92Y*zOEKi; JAv8Z311Q2}P|֭_0O*eNIArSdZl FFFn. :ǘ;= pl$ԕz N}aLI"[!Z"B7666ڗ/_*2'T9W^BQj:ԹC[?~lk1< >??o/_,ѷ9ѹIϵ06NOq kQ<2&xvFA&%]VgWQ$mxiל)ARR !H_V sNIa|$l94aB`޾}[NG֘@)J#=K1`f`ȃ?22R8ƍ-NKO1!3ޟ $M^ Ivw=V )ԘW^\2mďMWmѲ#~/999igggdQ>,.<(q^c/>FZ**KY3F ҔK҄G+Na~YR+`HjzǏ0e)jS0n^Fe6X&>bfc/ sdʰ(8CFY8#+L$=99+SZԶN+mxfW @e.WɓjONN!cjj8 2꓅[d\ȥ*rxx?pp].D(եζ V$TZ8WvM+V`cls$H0/:eMw-3֠Gc*s֒p#  zsvuuUoL|jC 8::$ϑp .ȚimwwNvwwq'rtNL)ce{\&kd3S^4W0ttH!rw-,,T/&aǏdj"H &c ͦpEm T-.kCӨ>"d"&TCA^M IDAT6$X1X 7"80)g@9+yff`wO3SS|O2Se2$0e]V-B`^Y5!+F^=Z@YPtɾDgܴȂfff~###5Z-,,s32C*eLԭPk=[_VvǏŜXzZ}A]@3O@O֌S isssuMDMd \FGGۓ'OǏ[l3 ҳUreN 'hYl|LY(B^u^XX(Bg3+ R&SkడsUP7p)4ćRC?ᔊr><݂gggW"1D۷o@uAQΓ,2Z@ B6)ŋg%(w7;uGN%?$Ð}G(Τ.e>)eG 9ub2FIp322*cA[nK=c?a\D=iO{ѶR>CSA [$k@7nh}=o{;2OI*$b_^^n'&6{o/9$4,5(z|.'(I2WKIBV~Ɂ= >6JS 9.];::ڨRFCRRS)+'|vNmAS98V{-a@eZHn޽{}eNS-+Ć8J.~ _ mggjtʕ 8mgXђ `Dц T 3377_&G@'3c677WHH!I8CesB A+!!M `cضD$ݻWzv{ٝ!x@BK,nCoD79 37Ml2ڢ TlO89hdA5+B&K;0^R;kٓ)rlcMh'YqV2U[d~ւ%Уg~ڞ@dzwCNdƂ9E){'r|>! F>&۔r2N,yg{MǾtM0e:x&2HȨRtɄOɎO%86<7oBѠ#mM ={ֶ+M[֟RglzzoD:TpK]nb9$h7on[-Z)OÇzNYL6(d9"$s9#Dq3}k}MɄFvےƲaѬ?1Fm2呑z(dϟUun]O3`qdd-h$T,|^&-rڡl`6#ۏt.[ .E O5Za8 k=CsEɌh/zVN!5V_%w)&/ԙRvp!#mc/l&1"C (Ge w<'UҠhA!Yfpd=8$ *\87!(:WVVj]}"7NJL=XeCF~Y )iG}u>4ꟲA>yRgXO I { OYUBc/mssQ[L;AN]7??_]1I )&i5w޽{Ν;%?V=77WdvO_mmmU&3{nvž6v sq4=A=|!&񹹹>b&ޖ3ݽ쥅)_@$@؜ I@Ս ?Ɉؓ ~]S1 7ا+ KEf*$xttYds8drrhƉnocdRAF=5DE^B#EzT9&s,G}fԚe\,[P|x~r Li:;207Ѭiﲼ\s1` :%g&¯_#Y7y_ZP{] ]B~QiK%3Y?k*:#z_3R@_$@E>k qu^WIL"}d' ތ1U  f(;/--Ij5L3h@jC訂HhrIH"!=z!T MMMIgtm BNbCD$($[d9*ٌ*9V{&B,Ȃ&/roc6'ΉTg8>VδjM oEdZ__Hd9H$]r.)Wzݒe |^hRW!)4<255URǽ7g/ә(%,I`M=s%0N2{]*8=Za8v_$*)Kt:_uHhTy !gBzz Rh+++\ToeFLӌRV0(p-G糰He QָMrɀA%sׯ_۷1Tv1N':Q;g:n[XXh^Ievv.̶x/óW.wwwd9#:' ;f Bк,&r2yS!*=AV#TvRne||8;p*Aw]S ړg *SUOY d}2 @e9.6B#RKJ$ HUl ")fw)U9228œ,] ':#QJ%*IH"K݅`:|S\4B9ԲCh8]L74@vvv*e8Jxpcc#A#aD:d2G*u) X#FLcA &޽ 6D5dϗˑJ9C 3557X@TЕdVzD#C*Vzedmyy3E[__/L}9"tG~G 5D=˙ RAf @ԾG)\ZZ*4Ս썺~ۭ) 6ܻw ^NSMմAs!=-)2{8W-A&R%^vNv:Rrxh~KPmaatl\=;Lйs3'F @)+XMy/P{g")i\cm6?&ፍa86""OIBړlYF) ɑ2lI Z1+i^a) A. ^JyǂeթmQ}ǏfҏuP~Yb+ˌWsba tfz" 9L鱶ZrZgET%c4/_^W i9h9Y g 9B&g=+e̓gݬ@Nܵ<;;qZI_iU1ȮsɆL  @ر^)Yieq = ϟmnnxI)ՏeY<(9dgK6.N p$pAHyf &@U›Z*9( ĸZD3rIQ@#a9V<==$EP48Qkݘi1[rUiӛ֐:3Bݒa&4##29Is|sjw<<<,Qq(9DϚp\%+D /#Dy鉛Peq(rSPX2g{QgTa26/Zue_8RFM{-b:gL x_v$lG=K:2Ǧ&مuwhܾZ^ϊߠh}>;gHbÇ䤫d V0[y1NYc`oG)ɹP <8HH94}C'{[k/IIv<'Ѱ!9Y g6A20IqFz.9ERgD4~Hb"=o'y$#ַv<ȍ3u#7opf MNBx22c@rTd0Pm*,Hgsyj:Ipg;zC@+<<<͌Idh겙'{, @{;w"I(sVĎLWU,yZ-RSedxv#JC566fffv>bQ/PϩX٢F1Κ3F9M{V@ 䤽zwfʣmooG{q2Yκ>A}吜NgPtƗI` s~S0/a$dO|΄ Ptw MR72< Ԗ=1`vYCE%ϛAZ RZrrstT򞜜,a&%9{+8SRgN Am*? M(5~94+(+67ɱl5\*f ɾJ*RdlDLJCH~9uVWZ9;;[8>(0ـ`&9h~VTiYPT?e=G^TtJ…/GiHvcO=2Y|3@&v$&} .x0/* ieJE1,<9uWWW j֞F=֌[m4eRi$7{Pr&i'D!@Ejسt~t:j l޸qP&;!|/ɬ R*NNN|e?9h 2e? 0g...JžȜG5A2ׯ_úoH955Ֆ*)I]oZHoKKKeo0t~lg G$j3TB#))A0AΞ:Gr {}}fggn!_#7ha{I {8f4g.^J:$U.Hze@w lYrR TZr6J6$Ŀ9T-yUH̆lɶA43VVV^{QDe֣EQ-pT\&DM5d1jYX0Ҩ9ܜqX0de npj#}LLL>(HsfR&&I+5E93#Lu:nݪ<sS'q#8Cz(KPs=<茵szPLBI}]PAv{B 'BTٜH\#]?c CX$)V;<}H-JmM;Nɜ0>>~r}$zIj;Hf0sׯ_|KUVYҠ=-(^35HMv= bJ[]>l{{ 06G R#066VvtBqN8}I,/ZQbEZ21tΝ7GI9"5?&4è剫j֘U"@!2xvV[&DVI"2#fvm+yYL;iYy^%] (i2tf^ܜ<b%8.LIJÿ(O\KN`A8C4 i;`5#$JNY666jmyW?==mm{{!k0$%$M(R^W9 9??Z 8αy2 ?gs\5Vl3geg}rGSY?wIb8 9Fy&K,ԁA5PDDC`ǧp ;%h޵ *(sN{ElY[XXOKqϟmvv]W7K*9Djb.KJ$~9w $ԫ6422&N7' a43 }.U4P(]VF0'pꔠ=pKL o}fh<SI6E"hکS1pZv{N`|L"c9㤼3.n.0v,}ӄuEj9L+!:ă,aEρ.ozqqQce(|.]ͩF^p:9*r 9߯>gY$ۄ'ǛLɓ'Usf A"(Eө,1aMhȶ8Uhh# ܀1y) ( e(`>==mUv"E7Ib{Sr=g˅ --..Vv~A56 z)攡OV9/U9+;/DYpו*A8Pv@mXGc;_yksssuȌJpW Pcccm}}촅x;Ev9 Sf!G|+< $-..,Y'- 8'''muu%_ɘb+Q,NT"uVe"[upe0u%˶_J99IP ^ )5Y+BsT8$gORK\mrrzk5)\.?O9,!J߿/-ph UđquTI$_FJE^8s>{xx=zHN٫s!!&7 n g'ܒ`( ^&8UYҡF$!P= QAtop<>YȵagIRCmbR$G)C!ȔS5(^ 3O Hj♙>T9l%ZP OyvCZ_Ѝ%yx?ahX-NQ$G1H6$KkN1r9rr"@پiA"cP eL<%mI9-,,dfx e/`Kρ0*αjȊ,ȑ$\3nT;4"g33&H=y״%jh-..֚?k"y)LG.­[Ǿ Ƞ"%e;H}Qxswgyr֭[o00Uo,,<0{KR-=]1:-Yl*&vxsƹELKɟr "?iʧ+M{(~Q{} <,&, 1/ #]2oDٛ&EDCF(dz좻`)YAôE',3Yf آ!zd`~;99E3HpyEpOꝝh?~,GtumZ \n/>'H3Aؕ ;_[\ytmxdvK{!,(*G9u16 ^KR 5=zt7ߡkSJcaBM N@_.CFΑ`L疦IrFĠnt8J#Jr ZYOtщLg(οX/NFA'~Vcf2RM@(>$ufJ` ⰤjWB'M[% dou9 g3s&RlUcSy{FhJuBH+ѱ켴f={6RSWWWC ;;;1(pK}2:b'MВJ)Q]d)>ȿ=|z8Ψ4{* )[F]_7TfŭS2Jv+B7DAu۴2 a/JBCV6HT\͇㨠G`{yy9&:X1U:06u"_;;;f#:Ӵ2n>k)9 nՙrX; `(D KIYk2Ehn e~*c5fMk++VȀUؚ( 2#ָ`>?~<]\\0y8Z+jʙ;sLS==Jp[[[Ӎ7%v<%P2Udg6m~ cySs< '礪A+N$Ƞ i8?>ؘЙ4\-19駟FW'uhÉ4P-{;Z5@qD;w"cܞ6ӃƌXg@ ؿb1}7{tw`763!Jf\[M .AsiP$Up[96e xvkM"樝gxZ.!Yki@6h%Zjƍڝ;wNZmv._\|PUg!Qsrr t{7&W!-@jDB')Hz92cE;.Ј5 ~ؒjp\SL |XNB/g\Bd\Z*\ ա@9r2W2w)mY'IPU8L tauǘcl6z(۠=gY;QdObΚ~qFZgRO> "}Ù;/af Į%y;׭kngF&=}R4\\\\h8 0^,qX6`|Zj V岁/^ ~5VP mllLv9DH{G4z,c؀~_}մ91thWRu걁7nL96 Ppؾ7oNgggbcݻ7gUs~[qΎ-s4Ȼuk; j)#s` iNm bL|mZoh EwE+{K +vrmDQ6hJ]>mD"RꝼAC~e"IPkՇ;gߓ$XBsVևSJ7o؍{97kܺh(S^[%lxF)%Θ]%QlVHtPP A 0nR,dVMmqkrjr/_%80~ "b"p$074rCp4+ };R÷|u,NH K3,6MӋ/czw@Eֿ8wخ}} ~>N(o=zD8%_ HBMqZuHn+HjZ1&Ck?,bKj6%SÊ㤡zNIge.3&ѣGD1 mP"NJ*ʒEg:5#yFy@rƢ Z=\ p$Dn 1m^r|_N=90Q!Ga_Ey}!`:>>RnG-yDZNGc#$jBz)׀A[ͼ~z*1WZ۾#o#d(89k)L`ݕR髯  c>xb89gt $fLwS>$"džLF8ѹ5DE[JLDx',fSSjxƸElz\s:Ʋ@ZHIm6#BE C*0A9k=hlP.nzNc"`Y+I{Y4SBp ϦOOAehGooV.OZ܋ {~~>]]]pnHQdb&7'*Jg<"*&vEPʈ`.zc\Rt۩}!?cPnr~~>.& v4;ؾ\5@fggg R%y@lnnNϟ?~9w}7 @H3zc}7Q paж:^qTEP8<~ H5bvU-{ታ&zш:jQ~Ȯg777s$ TGOӕnR![O3}gggPմ+ SQEbʔw6+[wԆw"s솳稪.T&=4?°8Wf R8w 8 {;%Ρyѣm$!8@ċu&/5簧i?~<(EQF, VTD-cD=r?h:.P!W9\y9Hহ6Gi:88b0WSh!Mnס<!p?sv{B1@_  q;cÇc@ϦǏOr Jp{0:" gÇ+ Z[ߡ #iG6ݙRFA9 m)j@.m#Y3UUHK@58g(}...V -9J?>"9kkS;#m,4r߿?lgwPBm ڼM9)eخvE\>иBP6gjPx.Dm'ZPˈWuUq_-jG.9]1aC#+bc\ R( T3 0iư7PKn޼9Fk\cw;S6t.o&4AkFӌ/_ʫmHnKwX.3A;0[xzn5k&ro߾tm;m"$xEbήHV#Fq1bL ;6~t~~>&3 88P>Ȕ~b^lr9L5˛cJZwsC@m{YSs!*0!ҮVwܙNOOǽrQJ ?Sa FrXQO>]g9lqZ5z7F *}F6 06}'sc@c R@QK6<0! ɣ*ju,F4b`rϏPPk\C{sw2J#劤-NFUd/C_%aV''Gۼ_4DK \Fa T*v4*K] ژ!K WLÁ֙Zl Ρ=EPu޵PnLw~;pmdC9*?s:YJmEžCLbАV8"|㗮I"/X,`o^󞟟:}azɸ7l 2$d1Σ^J:l EanbVh{{{c A!T^(dY.)cy)Q:o `ۗ yΞ6saĵ͓*Ҵ\39)OExں.1)itetӉL "JUծ>'Xf:H(f<*ҊP5pҡϩ^Z*Yw)MiO[t^!C`(Й{իHږQhpV Xb1 ٳ޿UBhXY.c-P|5%&}?N>4w FnG39 KrRhkmWK9ayE9:ztK5lS(T6 NZVA;sIgNqoݺ5lg}6zj;!ڎgc7[u6V>ɇ:c?Ӵ7XɓǣE;?dI'"\0%tݙn[Rs@D>Ln;BfbЖ۷o@ эGXlma^^R&ds+>8Fu ɸ:^~_~>}:z 3Dȋ!N-1}RaS%adW8̞֭[iF/΀!mDA(\QWǀsu"x"s\퉨Y__^|9ַR{o\&76(aݥc5o1V)Q3-p777GβE,Sl@p"@SUA$ gFtmmmm;$Q=VT'q O<%TmwZ+u0yuu;>2uMNcxTFt~P7—nN?} /..FC#sg3jE,ʶQjn[4II|iY>p`?[.'u}P.w Rw4qͿ1B F*{xx8QԖ}>[$+ٍ:m 8X.#'AjJ|srv g;꓂E=uх1Գ <"S l@F4?+b sT͔8;Ƥ÷R_IeLeڋUJQ*Ď-uY&䬯;)im&Forrm/-ʮӒαng!I8ιme pfmN/|Qݳ϶ hzsӶ2\$p;h^ʢVQNqLI`;q-Cطd;YzŊN=NGiwww<,\UH5_*lwÇBhXvo됑H 0whMQ'PvJv֭9TRUl{DBKr( hhG T ˹EҢ;4; iG]A Cɭ .i22~mCT @*}g!6;X϶o޼9H@Ǒ@_H>򶶶_q  (n^f3[^؞CCHW5زy4 g:R9yH x+m("ܮ==YG={F76>9{kF0/erK$ : kZ ;<}tԡ[˻w+lK8-q:8gϞM#iryѩ*ڦ8b̳ј()` ՎQdا6w||5FU<gYv~zʀ147{Ҟ ͡Enr"45LςD˗d8ayy- =oC[ݹsD9iJeTtg29/8Њ/8 T\`b 9ہn6K2Br܁tZ:L_}({(͏Uv28ֺb'k !7EmnnFaU4 yɓ1WNkj*:u7Is ;`u%wM)i.Z -_bLdPJM/q[Uv)HvZgB[n;{ ͨJO 6Qnv{^΂Rf2mzlo #]ז&} K~-O t\FjG_|1r@9?~ܭm?<m,?Iy\@SY.zy%'Hbmن^me@;=  m,5QQUpZDyyJ?׼ ;Dn -!lu|}S#lmhͪ)GtJ\tvvSk]֜9 wmH- x! +NA){#G vt"j4&Pv#2d́4HQ>cHZMDAsznooLj[Z~top8+4"*Zokςd3ֿ)w]0{-[Š^MCO ;5狢=t ZVuzf"e9d )ݒ3 P`:gb'-"Y3 YLNZ:r- Y*rM{1YEgj2; kPN?iY" Ual&CŴ?giYG[5sY̚8HyPpEX@wkL= ÑoүCmXВ@|0KuC FPIX%w>ơٝErRމ0 ZlA khڻ>0{ȍԁtdL=ׯ_h\Atǥg\p(Y*_[[SzPmJDPji\ +i7n pyE ^eM`%y9i2f ZW&!Wƺc,[Oݶ5hXPsGGGc.jݹh' ݮ[/^~=d vZtu$=88,ܿ(u9k̇)jįvh"?)R0̎cr`)u:\Y<` Y2#RWsFRp0C|UdN]HQ},N-ASj}ݻhe 4`a8F'OcAݝ=([O9;ъVa|WM @۷~kkk` J3N=ojIm7H➥) iNHj6|Ǐ![.pc _ @D?Ym)%HX >`Uԝ+,ͽ{T]E;e cZinctZM"PbtvvvnK؜mnvP%(Z0Sv=,$bN NmxQ®Oc|م7ʫ!wiCZh{y Pvۼ BO߾}{䏽fQbaPF8PӫW{a@ElǏ#Av+f Rpt)M։>qh^tjgv(r o:~P3zfdb9̖iGGUhNT;zNK }Es:m5 hDsΊ@e8 j^FCC%y9o=3)? Ԫh'uEM P+p޷4W{J'wO{Wv?ȩBPzt^Ž)VV9Nȁl{G]Z`yA<i^QXTs5mQ~*sK:vrkmn_@䎍VImQC;/+`E3 .e4.뼖}]B|˰X:kcTb &y!~r<֥S\>}4ꮁǀY;L~ ;4 zGZxw8Bc5nllL?2tBXd֡~:mS #΄g;T9hb>RIEXf/muUXSeZݴG;;;+iu.EҰ6_.3B_vb/Z 4k@[)( u*( @WmIcS}uA*p $r*oD2J UwrT^lB;4Yʶ5g;SAu.R:`Dgz>,DA:UmUU~,iH5Fƍ9;x;ږv }.oɖi3Αַ @}?UwM I3 _fϵskm PQaکꬷ\.G]t<3 EJ^g&]a L?`9[ҴD) (}NmJuwqR(:9|0p8'T /0=f%ԮM8cX4}zX}\g4 gǝ wyfE N(yvӧOÆR46<1H4s|荎k㍊vr$j(e-v MjQ_5^*TCΥ ]""D?{Ff#d³jP~5i3nEIX,~XDޢkݞ=ĥ*;۷a'P%?-!B!6R/Z-⽆ /Bw" ,snQhɶsfkl&LUPζӚ(8T!=/x8+Zz;u |[ǹFQ@eS/+`wySu/Cֽ=w5Ž849Ckw}If+z6#3ufmKl4p;|DShvpbD~ga6@C- .v{094 e[~vPvc*jiFQiKE8gL[zAʃ3va<%@ֻALg€|I*#zdw~m)ssA#漴=n;bxG'8#LzA4[[a(ewM׊=h)2Yj1g>:ȃxmx e\ȝruKk(؊2mjomE ܚ> i7)j,܁6E~eXYZ6Z,mQ"0*if\*}e\ f\Nsra[&HUPAFk0n/'/:c|^IV!P Oz &T8oPx0c?W(:pw[ѝhљȁAtdk *CPṋ;h)s7O;W}/R9CQV9?|4.(jܶ=d[ rH̱vc[.g1?ء9hLK>(b,K.___Wnͤ?ϫI-)a'ZRD]iS@fB"u98C&m䷋cg솳&~ڍbo'9wXs#jvz٢:@N)֛DH5oƉ['m{B/R1DK[Un%HHhMn6NMP Ppޣ Hpjラ |~~"5WM8"|SPHSe:ɞpEe0V"ղǏLժ̿Xt38lHyI@GcP9sޞܹ3]^^>/_}V^//si o5KዾDv/5~gNNY2yL;~æ,:vWcQ+&%Ul:Kr/-@6V9N'-z? \;lܹ3wy{h/jePe~Nsu(h:m/|@MU8Ê6uⴌUR[tNjI;FS8LBEUPI~ Kw4ZlWpQj#"gJa:NZ8@s֦y߃i\#4耺WGj9t1_E2UrJPҁ-yV (Ștsi ژ@w0ٳ5;3vv01mx-!}tu{Z:C>)x֮31|ӕaeWD=bKZ(:L1[[[F)ҀvDq֒B<]si3o_ab1-AK{ Qψnr*zwGTݲ2kmҽՖGv1`|bZw7oެ(]=G[]/UT#Y`W1 ͣ*"K*k9R=͗Qz*m{۸Cu2\ϡ)THekszޡ@WbET>uNyfeE ϙӂ& -ª`DfT>۟ˌ9" کn>Wt879ض6^_GYQ.zh@PekP>NͳhfۃmD[[[shƴ3_)yښ޼y"zw5̕w8z=W|4M T4[|n޼FR BFC>[tuu5 ;mjGnYgy[ZXBXZ/r ޭᔊxѨ%au[ZY z=}n#RU=Ne(-Ϩ@u 7yfOUUUrFB)նmZ6|*ӿݼys5{:=U\U1:;!r-i+O|rsTx~## Dw(=!lI=Qlj;Rhg3 uX\&c*iTt;3=gQ4sɼ1x֯ѽXKG޾}{({Ҫ*0V["\R]Q TZ·FcQ[|130.f`4sjn씗 hMb6T#30<Af 0c[X[HOev(ڨ+EM֋Q!s1n˹]__vvvFw4g;;ӥLiiuui::Tu]+:dr~B+kCNgwM ԶщlQlitekimssdtjFdnˏ tCltKS}FmMiDU>Wg3Hruu5J*D 鵷C ;XZ*j^yE l]6A*]ʸuWJfz4z=mߦ]ŒjY*û bk-z#hc {!n~wv8ukZP9AΠN*.QtDdxF~amM}k罼}j*DgNXwbTJ}kȼkV q^ + ]AfmO#6hڡcZq̕yCwY#Ė6hǖݕEEw_kwij1}/4`\=էIENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/main.cpp000077500000000000000000000036411455567757300241750ustar00rootroot00000000000000/*=========================================================================== FILE: main.cpp DESCRIPTION: Entry point to the Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ #include "QTSampleCM.h" Q_DECL_EXPORT int main( int argc, char ** argv ) { cQTSampleCM cm( argc, argv ); cm.Init(); // This function blocks until the app closes return cm.Run(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/qml/000077500000000000000000000000001455567757300233275ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/qml/GobiSampleCM/000077500000000000000000000000001455567757300255715ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/qml/GobiSampleCM/Connect.png000077500000000000000000000127151455567757300277010ustar00rootroot00000000000000PNG  IHDR@@iqsRGBbKGD pHYs  tIMEx?AMIDATxśy]U缡T2U1 I6![ ]B[A K ;NdRdHI@$@{=wz2K޺{{%"^|DTYVQ8';@л({cGqM!7a:M3:HZg/i~(77HDQ~f5,_;T_Y+ )$ ΁s`YSH}f3|ٴL z*^qnT؇FM# |PDЈ.<?pVU8oUC0Zf c's=@ "#( jn Oob䶳 ^~ q ^n cFQ}96s akԞ ݞ/?$ۯ<U#JŸ $ Cf\(k=B,5Eet Nlx? *յOJoHxFh@" ; hH`  `ѵ+"iMp)Sh{_4@!̕sX f._E£Q.h˫q9HʃI{ck~DPG}IW - NO NuXXAN^TS*qe܁h%(VڽR(-(b kqfMGw Ӯ|s]'*o*A}t 5` gr--pݥǬ& %Io_(\>xWmF|a:sHKz/eʅס @iڧy}t #aP*@c;!tˡ捠sAEm&zCj@,8GӬt^Mo sj/R oChgiZt Y5jen/Q6zd"!X 3~jbo2JTv"c2LsAt^i娦ftHÿqqGN FạbOr UDՎrߞJ1m`Uoϒ H~N N* . qCoԴ!R}Nekh㈩M2,> An׶-O5*ҁY TS;~0$cMK)hjA=)o}ly:3yQڋ NurpW O܈8bQ_ u;&ݑX IM}gaK}[˶ $TQ7]T~>a+(rEȋ!yoy3;_=Dv9}],B.ax V w zNkȯ 1 >Uf TXvL)Ҁ\Z"&@,vfwYx6;tQV#\?y0yzfgd'AX@vnP > 'uH '(T蒖Nh2f%L)d:fg-'%NS: rtںҩ͝V7e{En? S^ᜁcM! D8> $P(4$SJ{A#ǠR# Hkw_ƲԖOi4]MMS{ʆ<^VI!#/&Ƥ ۗCQM$R"+BOiu 1$}H8qr׉꼣OlvJde2p<{'ly"ܜb~ᆁA:Bk9GѪ;SʒZ] +) )>i bȠIBz7V36F252xP螁V*7iǪ2Ȅ.yϪPCIӺ)]Ӧc+NXˢoP.8qOa5e]]]tvu6q%r!ar*9Uq+NF"߹4&Bsep>n\e„.VtOVaLaBx&OBTbӫ) 6?ϜfST1X .7}A;yEuN%^bsF q58 lFq"/y  GϢ_jʾRqQ.Xqw2{m3S"5{LLu+4z21 $ǩ(C=K UQh½x̒_䷫ g}?N8x_* 0<2BkK3Xسoc}/mmm R#u㻘7oZj&RrȂChkkvd4/<ţ?3&!3B ? HT&xJHǞpUMƾvq!A~q QTV0eD `τ 4jAʬIYг`f~G9~`m/IJԧ 2mr.h2WpN!۷a,̛%88aiB0PAr~RN(ZXڇ{9#&\4nX®͸ I 8]_] q(\`z. X'9x_^V1TeZ,_*Q-Z@˚9S)7@ԥ'K?=+.lEN㬎7l6ںMzVh,?FWGC( 0A꣥2jb,9\gkeN* 0x)wTzz; &MkW5g;^ n⣨|>SIn|$MvdLD+Gb2xЍpFarh6u8kchá-w{/?Un4'0JuB Q;|VѡMt-9oވf(]ļUh]ӱC=ff"]*$BE48WP:C.Cvsld ~wvp+J2MiSY%B$Z8eu Y]Oqy_ޫ{r4@'Ad$/%\ΥF4]K-W &,8Sj{%1W n{cGqb=")2Q}w0>)NgszoW{m?|W73m\r"=;}\*,rIENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/qml/GobiSampleCM/Info.png000077500000000000000000000122641455567757300272020ustar00rootroot00000000000000PNG  IHDR@@iqsRGBbKGD pHYs  tIME 4IDATxś{]Uuks;7A$*!'ЂUTQ;J/h:DB(o@x$Mr9gfXk9&!A{=s~ߜs9a/"R?w=kT\;@:'f{H_ytev\jppmɤ}H̤}G#h@-߻77 }b0ċ}ϊҽc#)$sXpR}L>Lt뢈=R@bke q7*m)϶~Z!hD;@k '9ґ1nf2߰${׬3 ~̺@(\`ŷӶx9vp7OjI.8xA`Yg#@5^1hā:m,8C. ݳv[mJ[E d_(}Lj̺~1jQ`(+@% *s8`m@mdgw\V_"^2|i/(ު|Ͽ--ȯL!%DΩ@]GCM[t G\+I[뇀Ln:o8ٲPMGer *n"5' gUD@C8{4s׬STc3B8[un!a`ٺmi 7x|I@=cL޸*]݈ЂV J1D) P!K\ zHeTYH? tFQ#Nvxtp#We䡟3tJ,UF)f]S6j7eT! tOC/ҒEwgh\sks?@>0'$zGINUer[? NuXXiʶ{~.~ft7}LwXڟ~ @+W \na,_ :OQ9zter TT%](]v.?z_%<2Kܦ5 *@SI -EƗP|%v[

lfm%>'+PU6PZ㉇~k4vy UF B/{ApjyYu%swC!ر66@sѹV_ S Qo)X9Jpa 818cx*n* eo=q8ۓqUA$>wʁ7_ڋRc [xM,G@e>߰WVZQ'9=GA!P)p:ٛJU ;QBƾ {]WUtM|@:[:_Y/4S0 _PKޅ}|SIŲ];Q5qX?Cw A)Gn9 J=Oj)8qx k':CT1ЈיJT ևN@~U@zIxmZ\tP崼&快ii8T*r7V$+E ",CՇH# Dԩ~Tb9ܛ"A Ф})J/Cġ'#Uf%RYBL&lx Z\Kg/rЏp`M\<9/>3BV$*|tΪ,H(|Fk:tM}G H5_rlS3*K XCu,6?eU%JK m @9ʶq?Z3}c$ױ@D jch=󨢁!`X+E(g ͛" H%kZOi|W񒣋{ &9:{j%t={Ur16tX ܪyb}eq-Rv7NL)X=} f݅&·DT˻Y_O|]mC|5-" @eMXRk}`ke%dBZX)d}k-U[7jR?%QDv퀭ϡoEɳ?+SJ`E!d&NjhN4w}9g̝= hkk%ʂq ckq0s=z3.S_$OS" G"fS+[ZΥ\~Cɹ5[XSn Q\X:#2BU?' O^w(DI4hDkX OM [`=;6:M I%_13wNP@/͇$MQȎ!ܓ"Gjq:3= %yhh~q7o?;oo 5ƚ:5)K,: ɂ~#p/YTU]B#q[vބHkk"7 pyח^?xyÆ߶@@l "GJ9aíJğtVˉˏVŐTV26~OB M /{q;,udd)S.⿳-<{ 8KQ!鰊£*u3}.v<`Wg͉K4MYh235JR'(14M1i|td,- tKfA օ⩭˲:(12X}Fv_{|54<\]LFDZ3ʙ3w^ZnrW8JsjdYDRRTP%BU6-Z>}'G,;f^guvdLd`jr(8cZj ӡ'͠Ҵ4läu< #Î߬on=6޲c 9ok^o`;%i hZ;ܼmZp Ea!Y1)vdh{r5ɔ}X|_G9ԟ5R>hXlHO@B2ZXè g8MR://f2Jƿm'To/4!!0{d翁 g(nZ_xM_5jgs*sfmR pQm~4me/5;DnQJ\5Z!EdDjW+SM}JR;~{;~vOa zMR! fqTLC1cr*wx"DuyLcTU8| kp㐥:,ct[ؿ^¿ ^|їn6 R]ER3J fϣ{ş'QXD=IENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/qml/GobiSampleCM/main.qml000077500000000000000000000413511455567757300272370ustar00rootroot00000000000000/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Readme.txt000077500000000000000000000113371455567757300222420ustar00rootroot00000000000000Gobi Extensible API 2012-09-12-0719 This readme covers important information concerning the Gobi Extensible API. Table of Contents 1. What's new in this release 2. Known issues 3. Build steps ------------------------------------------------------------------------------- 1. WHAT'S NEW This Release (Gobi Extensible API 2012-09-12-0719) a. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. G (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. K (80-VB816-15) PDC ICD Rev. A (80-VB816-38) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. Y (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YC (80-VB816-5) WMS ICD Rev. K (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-08-23-0740) a. Updated reference platform to Nexus 7 tablet, kernel 3.1.10 b. Updated icons in GobiSampleCM c. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. J (80-VB816-15) PDC ICD Rev. A (80-VB816-38) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. Y (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YB (80-VB816-5) WMS ICD Rev. K (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-08-08-1042) a. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. J (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. Y (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YB (80-VB816-5) WMS ICD Rev. K (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-07-12-1036) a. Cleanup correctly during Disconnect() to fix possible race condition which could cause future connections to have read timeouts. b. Add a device access qualifier for SMD connections, for example: "QMUXD:0" for the first SMD channel. c. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. H (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. W (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YB (80-VB816-5) WMS ICD Rev. H (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-06-18-1054) a. Added support for SMD devices b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YA (80-VB816-6) PBM ICD Rev. H (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. V (80-VB816-12) Voice ICD Rev. L (80-VB816-10) WDS ICD Rev. YA (80-VB816-5) WMS ICD Rev. H (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-01-12-1106) a. Addition of Gobi Sample CM (documentation is on QDevNet - the use of this me be subject to additional license terms) b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. J (80-VB816-11) DMS ICD Rev. K (80-VB816-4) LOC ICD Rev. D (80-VB816-17) NAS ICD Rev. W (80-VB816-6) PBM ICD Rev. F (80-VB816-15) PDS 1 ICD Rev. J (80-VB816-8) PDS 2 ICD Rev. D (80-VB816-14) UIM ICD Rev. T (80-VB816-12) Voice ICD Rev. J (80-VB816-10) WDS ICD Rev. U (80-VB816-5) WMS ICD Rev. F (80-VB816-9) Prior Release (Gobi Extensible API 2011-12-15-0819) a. Initial beta code release ------------------------------------------------------------------------------- 2. KNOWN ISSUES No known issues. ------------------------------------------------------------------------------- 3. BUILD STEPS a. Start in the 'GobiConnectionMgmt' folder b. For Android, run: make Android ANDROID_PATH= For x86, run: make ------------------------------------------------------------------------------- libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Shared/000077500000000000000000000000001455567757300215025ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Shared/GobiError.h000077500000000000000000000140261455567757300235530ustar00rootroot00000000000000/*=========================================================================== FILE: GobiError.h DESCRIPTION: QUALCOMM Gobi Errors Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiError Enumeration // Gobi API Error Enumeration /*=========================================================================*/ enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrorCode) eGOBI_ERR_QMI_OFFSET = 1000, }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eGobiError validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eGobiError ec ) { bool retVal = false; if (ec > eGOBI_ERR_ENUM_BEGIN && ec < eGOBI_ERR_ENUM_END) { retVal = true; } if (ec >= eGOBI_ERR_QMI_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QMI_OFFSET; retVal = ::IsValid( (eQMIErrorCode)tmp ); } return retVal; };libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Shared/GobiQMICore.cpp000077500000000000000000000333041455567757300242540ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include "ProtocolNotification.h" /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQMICore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQMICore::cGobiQMICore() : mLastError( eGOBI_ERR_NONE ) { mInterface[0] = 0; } /*=========================================================================== METHOD: ~cGobiQMICore (Public Method) DESCRIPTION: Destructor RETURN VALUE: BOOL ===========================================================================*/ cGobiQMICore::~cGobiQMICore() { Cleanup(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Initialize() { return true; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Cleanup() { Disconnect(); return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Gobi device interface to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiQMICore::Connect( LPCSTR pInterface, std::set & services ) { // The services we successfully connected to std::set retServices; // Clear last error recorded ClearLastError(); size_t ifaceLen = strnlen( pInterface, MAX_PATH ) + 1; if (ifaceLen >= (size_t)MAX_PATH) { mLastError = eGOBI_ERR_INVALID_ARG; return retServices; } // Allocate configured QMI servers std::set ::const_iterator pIter = services.begin(); while (pIter != services.end()) { cQMIProtocolServer * pSvr = 0; pSvr = new cQMIProtocolServer( *pIter, 8192, 512 ); if (pSvr != 0) { // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) pSvr->Initialize(); bool bRC = pSvr->Connect( pInterface ); if (bRC == true) { sServerInfo si( pSvr ); std::pair entry( *pIter, si ); mServers.insert( entry ); retServices.insert( *pIter ); } } pIter++; } // All servers fail? if (retServices.size() == 0) { // Yes, disconnect them all Disconnect(); // ... and set the error code mLastError = eGOBI_ERR_CONNECT; } memcpy( mInterface, pInterface, ifaceLen ); return retServices; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Disconnect() { // Clear last error recorded ClearLastError(); // Clear device interface mInterface[0] = 0; // Assume failure bool bRC = false; if (mServers.size() == 0) { mLastError = eGOBI_ERR_NO_CONNECTION; return bRC; } // Disconnect/clean-up all configured QMI servers std::map ::iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr != 0) { pSvr->Disconnect(); pSvr->Exit(); delete pSvr; } si.mLogsProcessed = 0; pIter++; } mServers.clear(); bRC = true; return bRC; } /*=========================================================================== METHOD: Send (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svcID [ I ] - QMI service type msgID [ I ] - QMI message ID to [ I ] - Timeout value (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { // Clear last error recorded ClearLastError(); if (msgID > 0xffff) { mLastError = eGOBI_ERR_INVALID_ARG; return mLastError; } sSharedBuffer * pRequest = 0; pRequest = sQMIServiceBuffer::BuildBuffer( (eQMIService)svcID, (WORD)msgID, false, false, pIn, inLen ); if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return mLastError; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Build the request object sProtocolRequest req( pRequest, 0, to, 1, 1, &pn ); if (to == 0) { mLastError = eGOBI_ERR_INTERNAL; return mLastError; } // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0 || pSvr->IsConnected() == false) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } // Grab the log from the server const cProtocolLog & protocolLog = pSvr->GetLog(); // Schedule the request ULONG reqID = pSvr->AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return mLastError; } // Store for external cancel si.mRequestID = reqID; bool bReq = false; bool bExit = false; DWORD idx; // Returned response sProtocolBuffer rsp; // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); while (bExit == false) { int wc = sigEvt.Wait( to, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { // Grab the as-sent request DWORD id = evt.mParam2; sProtocolBuffer tmpReq = protocolLog.GetBuffer( id ); sSharedBuffer * pTmpRequest = tmpReq.GetSharedBuffer(); if (pTmpRequest != 0) { // Grab the transaction ID sQMIServiceBuffer actualReq( pTmpRequest ); si.mRequestTXID = actualReq.GetTransactionID(); } bReq = true; } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed pSvr->RemoveRequest( reqID ); } if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } // Caller might not be interested in actual output (beyond error code) ULONG maxSz = 0; if (pOutLen != 0) { maxSz = *pOutLen; } if (maxSz > 0) { // TLV 2 is always present ULONG needSz = 0; const BYTE * pData = (const BYTE *)qmiRsp.GetRawContents( needSz ); if (needSz == 0 || pData == 0) { return eGOBI_ERR_INVALID_RSP; } *pOutLen = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pOut, pData, needSz ); } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Success! return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CancelSend (Public Method) DESCRIPTION: Cancel the most recent in-progress Send() based operation PARAMETERS: svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::CancelSend( ULONG svcID, ULONG * pTXID ) { // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return eGOBI_ERR_INTERNAL; } if (si.mRequestID == 0xffffffff) { return eGOBI_ERR_NO_CANCELABLE_OP; } bool bRemove = pSvr->RemoveRequest( si.mRequestID ); if (bRemove == false) { return eGOBI_ERR_CANCEL_OP; } if (pTXID != 0) { *pTXID = si.mRequestTXID; } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Shared/GobiQMICore.h000077500000000000000000000143501455567757300237210ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.h DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIProtocolServer.h" #include "SyncQueue.h" #include "GobiError.h" /*=========================================================================*/ // Class cGobiQMICore /*=========================================================================*/ class cGobiQMICore { public: // Constructor cGobiQMICore(); // Destructor virtual ~cGobiQMICore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // (Inline) Return the server as determined by the service type cQMIProtocolServer * GetServer( eQMIService svc ) { cQMIProtocolServer * pSvr = 0; std::map ::const_iterator pIter; pIter = mServers.find( svc ); if (pIter != mServers.end()) { const sServerInfo & si = pIter->second; pSvr = si.mpServer; } return pSvr; }; // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QMI error (if this happens to indicate // that no error occurred then return the mapped eQMI_ERR_INTERNAL // value) eGobiError GetCorrectedQMIError( ULONG qmiErrorCode ) { ULONG ec = (ULONG)eQMI_ERR_INTERNAL + (ULONG)eGOBI_ERR_QMI_OFFSET; if (qmiErrorCode != (ULONG)eQMI_ERR_NONE) { ec = qmiErrorCode + (ULONG)eGOBI_ERR_QMI_OFFSET; } return (eGobiError)ec; }; // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Send a request using the specified QMI protocol server and wait // for (and then return) the response eGobiError Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); // Cancel the most recent in-progress Send() based operation eGobiError CancelSend( ULONG svcID, ULONG * pTXID ); protected: /* Device interface */ CHAR mInterface[MAX_PATH]; /* QMI protocol server/protocol server log count */ struct sServerInfo { public: // Constructor (default) sServerInfo() : mpServer( 0 ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; // Constructor (parameterized) sServerInfo( cQMIProtocolServer * pServer ) : mpServer( pServer ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; /* Protocol server */ cQMIProtocolServer * mpServer; /* Protocol server logs processed */ ULONG mLogsProcessed; /* Last scheduled request ID */ ULONG mRequestID; /* Last schedule request QMI transaction ID */ ULONG mRequestTXID; }; /* QMI protocol servers */ std::map mServers; /* Last error recorded */ eGobiError mLastError; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/000077500000000000000000000000001455567757300202725ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/000077500000000000000000000000001455567757300211625ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/Comm.cpp000066400000000000000000000372521455567757300225720ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.cpp DESCRIPTION: Implementation of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Comm.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads PARAMETERS: pData [ I ] Asynchronous read object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxThread( void * pData ) { cComm * pComm = (cComm*)pData; if (pComm == NULL || pComm->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pComm->mCommandPipe[READING], &inputSet ); int largestFD = pComm->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pComm->mCommandPipe[READING], &outputSet ) == true) { // Read from the pipe BYTE cmd; status = read( pComm->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pComm->mPort, &inputSet ); largestFD = std::max( pComm->mPort, pComm->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; } else { // EXIT_CMD or anything else pComm->mpRxCallback = 0; break; } } else if (FD_ISSET( pComm->mPort, &outputSet ) == true) { // Stop watching for read data FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; // Perform a read status = read( pComm->mPort, pComm->mpBuffer, pComm->mBuffSz ); cIOCallback * pCallback = pComm->mpRxCallback; pComm->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } } return 0; }; /*=========================================================================*/ // cComm Methods /*=========================================================================*/ /*=========================================================================== METHOD: cComm (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cComm::cComm() : mPortName( "" ), mPort( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cComm (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cComm::~cComm() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cComm::IsValid() { // Nothing to do, dependant on extended class functionality return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - Name of port to open (IE: /dev/qcqmi0) RETURN VALUE: bool ===========================================================================*/ bool cComm::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mPort != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cComm:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxThread, this ); if (nRet != 0) { TRACE( "cComm::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Opening the com port mPort = open( pPort, O_RDWR ); if (mPort == INVALID_HANDLE_VALUE) { Disconnect(); return false; } // Save port name mPortName = pPort; // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Run an IOCTL on the open file handle PARAMETERS: ioctlReq [ I ] - ioctl request value pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - ioctl return value (0 for success) ===========================================================================*/ int cComm::SendCtl( UINT ioctlReq, void * pData ) { if (mPort == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } return ioctl( mPort, ioctlReq, pData ); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cComm::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it TRACE( "cComm::Disconnnect() joining thread %lu\n", mRxThreadID ); int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mPort != INVALID_HANDLE_VALUE) { close( mPort ); mPort = INVALID_HANDLE_VALUE; } // Double check mpRxCallback = 0; mPortName.clear(); return bRC; } /*=========================================================================== METHOD: ConfigureSettings (Public Method) DESCRIPTION: Configure the port with the passed in parameters PARAMETERS: pSettings [ I ] - Desired port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::ConfigureSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } tcflush( mPort, TCIOFLUSH ); int nRC = tcsetattr( mPort, TCSANOW, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: GetSettings (Public Method) DESCRIPTION: Return the current port settings PARAMETERS: pSettings [ I ] - Current port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::GetSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } // Get the COM port settings int nRC = tcgetattr( mPort, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelIO() { if (mPort == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelRx() { if (mPort == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); mpRxCallback = 0; return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelTx() { if (mPort == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cComm::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to stop reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cComm::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // This seems a bit pointless, but we're still going verify // the device is ready for writing, and give it up to // (1000 + num bytes) MS to be ready (in 100 MS chunks) struct timeval TimeOut; fd_set set; int nReady = 0; unsigned int nCount = 0; while ( nReady == 0 ) { if (mbCancelWrite == true) { TRACE( "cComm::TxData() write canceled before device was ready\n" ); return false; } if (nCount >= (1000 + bufSz) / 100) { // Timeout is expired break; } FD_ZERO( &set ); FD_SET( mPort, &set ); TimeOut.tv_sec = 0; TimeOut.tv_usec = 100000; nReady = select( mPort + 1, NULL, &set, NULL, &TimeOut ); nCount++; } if (nReady <= 0) { TRACE( "cComm::TxData() Unable to get device ready for" " Write, error %d: %s\n", nReady, strerror( nReady) ); return false; } size_t nRet = write( mPort, pBuf, bufSz ); if (nRet == std::string::npos || nRet != bufSz) { TRACE( "cComm::TxData() write returned %d instead of %lu\n", nRet, bufSz ); return false; } #ifdef DEBUG TRACE( "Write of %lu bytes took %llu milliseconds\n", bufSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/Comm.h000066400000000000000000000104131455567757300222250ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.h DESCRIPTION: Declaration of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cComm /*=========================================================================*/ class cComm : public cConnection { public: // Constructor cComm(); // Destructor ~cComm(); // Is this object valid? bool IsValid(); // Connect to the specified port bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current port name std::string GetPortName() const { return mPortName; }; // Are we currently connected to a port? bool IsConnected() { return (mPort != INVALID_HANDLE_VALUE); }; protected: /* Name of current port */ std::string mPortName; /* Handle to COM port */ int mPort; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; // Rx thread is allowed complete access friend void * RxThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/Connection.h000066400000000000000000000107111455567757300234320ustar00rootroot00000000000000/*=========================================================================== FILE: Connection.h DESCRIPTION: Declaration of cConnection class PUBLIC CLASSES AND METHODS: cComm This class defines a prototype for low level communications Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cIOCallback /*=========================================================================*/ class cIOCallback { public: // (Inline) Constructor cIOCallback() { }; // (Inline) Destructor virtual ~cIOCallback() { }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesTransferred ) = 0; }; /*=========================================================================*/ // Class cConnection /*=========================================================================*/ class cConnection { public: // Constructor cConnection() : mpRxCallback( 0 ) { }; // Is this object valid? virtual bool IsValid() { return false; }; // Connect to the specified interface virtual bool Connect( LPCSTR /* pPort */ ) { return false; }; // Send a control message virtual int SendCtl( UINT /* type */, void * /* pData */ ) { return -1; }; // Disconnect from the current port virtual bool Disconnect() { return false; }; // Cancel any in-progress I/O virtual bool CancelIO() { return false; }; // Cancel any in-progress receive operation virtual bool CancelRx() { return false; }; // Cancel any in-progress transmit operation virtual bool CancelTx() { return false; }; // Receive data virtual bool RxData( BYTE * /* pBuf */, ULONG /* bufSz */, cIOCallback * /* pCallback */ ) { return false; }; // Transmit data virtual bool TxData( const BYTE * /* pBuf */, ULONG /* bufSz */ ) { return false; }; // Are we currently connected to a port? virtual bool IsConnected() { return false; }; protected: /* Read callbacks */ cIOCallback * mpRxCallback; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/Event.cpp000066400000000000000000000254701455567757300227570ustar00rootroot00000000000000/*=========================================================================== FILE: Event.cpp DESCRIPTION: Implementation of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Event.h" /*=========================================================================== METHOD: WaitOnMultipleEvents (Free Method) DESCRIPTION: Wait for any of the events to be set and return the value Note: If multiple events are set, only the event specified by eventIndex will be read from. Run this function again to get the next event. PARAMETERS: events [ I ] - Vector of events which may be signaled timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success eventIndex [ O ] - Index of event which was signaled RETURN VALUE: Return code positive for number of events set -ETIME on timeout negative errno value on failure ===========================================================================*/ int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ) { // Check internal pipes' status for (ULONG index = 0; index < events.size(); index++) { int error = events[index]->mError; if (error != 0) { TRACE( "cEvent %lu has error %d\n", index, error ); return -error; } } // Initialize the FD set fd_set fds; FD_ZERO( &fds ); // Add each item to the FD set, keeping track of the largest, // which is used for select() int largestFD = 0; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; FD_SET( pipe, &fds ); largestFD = std::max( pipe, largestFD ); } struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipes for the specified amount of time int rc = select( largestFD + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { TRACE( "WaitOnMultipleEvents error %d\n", errno ); return -errno; } else if (rc == 0) { // No activity on the pipes return -ETIME; } int numSignaled = rc; // Only read from first pipe which was signaled int signaled = -1; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; if (FD_ISSET( pipe, &fds ) != 0) { signaled = index; break; } } if (signaled == -1) { // Odd, no one was signaled return -ENODATA; } DWORD tempVal = 0; rc = events[signaled]->Read( tempVal ); if (rc == 0) { // Success val = tempVal; eventIndex = signaled; return numSignaled; } else { // failure return rc; } } /*=========================================================================*/ // cEvent Methods /*=========================================================================*/ /*=========================================================================== METHOD: cEvent (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cEvent::cEvent() : mError( 0 ) { int rc = pipe( mPipes ); if (rc != 0) { mError = errno; TRACE( "cEvent - Error %d creating pipe, %s\n", mError, strerror( mError ) ); } } /*=========================================================================== METHOD: ~cEvent (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cEvent::~cEvent() { // Check internal pipe status if (mError == 0) { Close(); mError = EBADF; } } /*=========================================================================== METHOD: Close (Internal Method) DESCRIPTION: Close pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Close() { int retCode = 0; int rc = close( mPipes[READING] ); mPipes[READING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[READING], %s\n", retCode, strerror( retCode ) ); } rc = close( mPipes[WRITING] ); mPipes[WRITING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[WRITING], %s\n", retCode, strerror( retCode ) ); } return retCode; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Set/signal the event with the specified value PARAMETERS: val [ I ] - Value to pass through with signal RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Set( DWORD val ) { // Check internal pipe status if (mError != 0) { return mError; } PBYTE pWrite = (PBYTE)&val; int writeSize = sizeof( DWORD ); while (writeSize > 0) { int bytesWritten = write( mPipes[WRITING], pWrite, writeSize ); if (bytesWritten == -1) { // Store error from write int writeErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = writeErr; } // We cannot recover from this error Close(); return writeErr; } pWrite += bytesWritten; writeSize -= bytesWritten; } // Success return 0; } /*=========================================================================== METHOD: Wait (Free Method) DESCRIPTION: Wait for the event to be signalled and return the read in value PARAMETERS: timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success RETURN VALUE: Return code 0 on success ETIME on timeout errno value on failure ===========================================================================*/ int cEvent::Wait( DWORD timeoutMS, DWORD & val ) { // Check internal pipe status if (mError != 0) { return mError; } fd_set fds; FD_ZERO( &fds ); FD_SET( mPipes[READING], &fds ); struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipe for the specified amount of time int rc = select( mPipes[READING] + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { // Store error from select int selectErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = selectErr; } // We cannot recover from this error Close(); return selectErr; } else if (rc == 0) { // No activity on the pipe return ETIME; } return Read( val ); } /*=========================================================================== METHOD: Clear (Free Method) DESCRIPTION: Read and discard all values currently in the pipe ===========================================================================*/ void cEvent::Clear() { DWORD unusedVal; int rc = 0; while (rc == 0) { rc = Wait( (DWORD)0, unusedVal ); } } /*=========================================================================== METHOD: Read (Internal Method) DESCRIPTION: Read a DWORD from the pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Read( DWORD & val ) { DWORD tempVal; PBYTE pRead = (PBYTE)&tempVal; int readSize = sizeof( DWORD ); while (readSize > 0) { int bytesRead = read( mPipes[READING], pRead, readSize ); if (bytesRead <= 0) { // Store error from read int readErr = errno; if (readErr == 0) { // Hard error! This should NEVER happen for a pipe ASSERT( 0 ); readErr = EBADF; } // First error? if (mError == 0) { // Yes, store the error mError = readErr; } // We cannot recover from this error Close(); return readErr; } pRead += bytesRead; readSize -= bytesRead; } val = tempVal; return 0; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/Event.h000066400000000000000000000102041455567757300224110ustar00rootroot00000000000000/*=========================================================================== FILE: Event.h DESCRIPTION: Declaration of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include //--------------------------------------------------------------------------- // Prototype //--------------------------------------------------------------------------- class cEvent; /*=========================================================================*/ // Free methods /*=========================================================================*/ // Wait for any of the events to be set and return the value int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); /*=========================================================================*/ // Class cEvent /*=========================================================================*/ class cEvent { public: // Constructor cEvent(); // Destructor ~cEvent(); // Set/signal the event with the specified value int Set( DWORD val ); // Wait for the event to be signalled and return the read in value int Wait( DWORD timeoutMS, DWORD & val ); // Read and discard all values currently in the pipe void Clear(); protected: // Close pipe (used in errors or normal exit) int Close(); // Read from the pipe int Read( DWORD & val ); /* Internal error status */ int mError; /* Internal pipes */ int mPipes[2]; // WaitOnMultipleEvents gets full access friend int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolBuffer.cpp000066400000000000000000000143611455567757300246260ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.cpp DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sProtocolBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer() : mpData( 0 ), mbValid( false ) { // Object is currently invalid mTimestamp = EMPTY_TIME; } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (parameterized) PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( sSharedBuffer * pBuffer ) : mpData( 0 ), mbValid( false ) { mTimestamp = EMPTY_TIME; time_t rawtime; time( &rawtime ); tm * timestamp = localtime( &rawtime ); if (timestamp != 0) { mTimestamp = *timestamp; } if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } mpData = pBuffer; if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; } // NOTE: Derived classes need to call their own validation method // in their constructors since the override might try to access // data that is not yet in place sProtocolBuffer::Validate(); } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Copy constructor PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( const sProtocolBuffer & copyThis ) : mpData( copyThis.mpData ), mTimestamp( copyThis.mTimestamp ), mbValid( copyThis.mbValid ) { // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } } /*=========================================================================== METHOD: operator = (Public Method) DESCRIPTION: Assignment operator PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: sProtocolBuffer & ===========================================================================*/ sProtocolBuffer & sProtocolBuffer::operator = ( const sProtocolBuffer & copyThis ) { // Do we already have data? if (mpData != 0) { // Is it different than what we are duplicating? if (mpData != copyThis.mpData) { // Yes, release our current buffer mpData->Release(); } } mpData = copyThis.mpData; mTimestamp = copyThis.mTimestamp; mbValid = copyThis.mbValid; // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } return *this; } /*=========================================================================== METHOD: ~sProtocolBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::~sProtocolBuffer() { if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } else if (mpData != 0) { ASSERT( 0 ); } mbValid = false; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolBuffer.h000066400000000000000000000116211455567757300242670ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.h DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SharedBuffer.h" #include "ProtocolEnum.h" static const tm EMPTY_TIME = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /*=========================================================================*/ // Struct sProtocolBuffer /*=========================================================================*/ struct sProtocolBuffer { public: // Constructor (default) sProtocolBuffer(); // Constructor (parameterized) sProtocolBuffer( sSharedBuffer * pBuffer ); // Copy constructor sProtocolBuffer( const sProtocolBuffer & copyThis ); // Assignment operator sProtocolBuffer & operator = ( const sProtocolBuffer & copyThis ); // Destructor virtual ~sProtocolBuffer(); // (Inline) Get buffer const BYTE * GetBuffer() const { BYTE * pRet = 0; if (IsValid() == true) { pRet = (BYTE *)mpData->GetBuffer(); } return (const BYTE *)pRet; }; // (Inline) Get buffer size ULONG GetSize() const { ULONG size = 0; if (IsValid() == true) { size = mpData->GetSize(); } return size; }; // (Inline) Return the protocol type eProtocolType GetType() const { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid() == true) { pt = (eProtocolType)mpData->GetType(); } return pt; }; // (Inline) Return the shared buffer sSharedBuffer * GetSharedBuffer() const { sSharedBuffer * pRet = 0; if (IsValid() == true) { pRet = mpData; } return pRet; }; // (Inline) Return the timestamp tm GetTimestamp() const { tm ft = EMPTY_TIME; if (IsValid() == true) { ft = mTimestamp; } return ft; }; // (Inline) Is this buffer valid? virtual bool IsValid() const { return mbValid; }; protected: // (Inline) Validate buffer virtual bool Validate() { // Do we have a shared buffer and is it valid? mbValid = (mpData != 0 && mpData->IsValid()); return mbValid; }; /* Our data buffer */ sSharedBuffer * mpData; /* Time buffer was created */ tm mTimestamp; /* Has this buffer been validated? (NOTE: *NOT* set in base) */ bool mbValid; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolEnum.h000066400000000000000000000362611455567757300237710ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEnum.h DESCRIPTION: Generic protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eProtocolType IsValid() IsQMIProtocol() IsQMIProtocolRX() IsQMIProtocolTX() IsDSEProtocol() IsDSEProtocolCmd() IsDSEProtocolRsp() IsDSEProtocolEvt() Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eProtocolType Enumeration // // NOTE: QMI protocol types need to be in the same order as eQMIService // with RX added first then TX /*=========================================================================*/ enum eProtocolType { ePROTOCOL_ENUM_BEGIN = -1, ePROTOCOL_COMMAND, // 000 Protocol server command ePROTOCOL_AT, // 001 AT command protocol ePROTOCOL_NMEA, // 002 NMEA (GPS) protocol ePROTOCOL_DIAG_RX, // 003 DIAG protocol (incoming) ePROTOCOL_DIAG_TX, // 004 DIAG protocol (outgoing) ePROTOCOL_DOWNLOAD_RX, // 005 Download protocol (incoming) ePROTOCOL_DOWNLOAD_TX, // 006 Download protocol (outgoing) ePROTOCOL_SDOWNLOAD_RX, // 007 Streaming download protocol (incoming) ePROTOCOL_SDOWNLOAD_TX, // 008 Streaming download protocol (outgoing) ePROTOCOL_QDL_RX, // 009 QDL streaming protocol (incoming) ePROTOCOL_QDL_TX, // 010 QDL streaming protocol (outgoing) ePROTOCOL_DSE_QDU_CMD = 30, // 030 Device update protocol (command, TX) ePROTOCOL_DSE_QDU_RSP, // 031 Device update protocol (response, RX) ePROTOCOL_DSE_QDU_EVT, // 032 Device update protocol (event, RX) ePROTOCOL_DSE_QMBE_CMD, // 033 MBB extensions protocol (command, TX) ePROTOCOL_DSE_QMBE_RSP, // 034 MBB extensions protocol (response, RX) ePROTOCOL_DSE_QMBE_EVT, // 035 MBB extensions protocol (event, RX) ePROTOCOL_DSE_QMUX_CMD, // 036 Tunneled QMUX protocol (command, TX) ePROTOCOL_DSE_QMUX_RSP, // 037 Tunneled QMUX protocol (response, RX) ePROTOCOL_DSE_QMUX_EVT, // 038 Tunneled QMUX protocol (event, RX) ePROTOCOL_QMI_CTL_RX = 60, // 060 QMI CTL protocol (incoming) ePROTOCOL_QMI_CTL_TX, // 061 QMI CTL protocol (outgoing) ePROTOCOL_QMI_WDS_RX, // 062 QMI WDS protocol (incoming) ePROTOCOL_QMI_WDS_TX, // 063 QMI WDS protocol (outgoing) ePROTOCOL_QMI_DMS_RX, // 064 QMI DMS protocol (incoming) ePROTOCOL_QMI_DMS_TX, // 065 QMI DMS protocol (outgoing) ePROTOCOL_QMI_NAS_RX, // 066 QMI NAS protocol (incoming) ePROTOCOL_QMI_NAS_TX, // 067 QMI NAS protocol (outgoing) ePROTOCOL_QMI_QOS_RX, // 068 QMI QOS protocol (incoming) ePROTOCOL_QMI_QOS_TX, // 069 QMI QOS protocol (outgoing) ePROTOCOL_QMI_WMS_RX, // 070 QMI WMS protocol (incoming) ePROTOCOL_QMI_WMS_TX, // 071 QMI WMS protocol (outgoing) ePROTOCOL_QMI_PDS_RX, // 072 QMI PDS protocol (incoming) ePROTOCOL_QMI_PDS_TX, // 073 QMI PDS protocol (outgoing) ePROTOCOL_QMI_AUTH_RX, // 074 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AUTH_TX, // 075 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_AT_RX, // 076 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AT_TX, // 077 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_VOICE_RX, // 078 QMI Voice protocol (incoming) ePROTOCOL_QMI_VOICE_TX, // 079 QMI Voice protocol (outgoing) ePROTOCOL_QMI_CAT2_RX, // 080 QMI CAT (new) protocol (incoming) ePROTOCOL_QMI_CAT2_TX, // 081 QMI CAT (new) protocol (outgoing) ePROTOCOL_QMI_UIM_RX, // 082 QMI UIM protocol (incoming) ePROTOCOL_QMI_UIM_TX, // 083 QMI UIM protocol (outgoing) ePROTOCOL_QMI_PBM_RX, // 084 QMI PBM protocol (incoming) ePROTOCOL_QMI_PBM_TX, // 085 QMI PBM protocol (outgoing) ePROTOCOL_QMI_QCHAT_RX, // 086 QMI QCHAT protocol (incoming) ePROTOCOL_QMI_QCHAT_TX, // 087 QMI QCHAT protocol (outgoing) ePROTOCOL_QMI_RMTFS_RX, // 088 QMI RMTFS protocol (incoming) ePROTOCOL_QMI_RMTFS_TX, // 089 QMI RMTFS protocol (outgoing) ePROTOCOL_QMI_TEST_RX, // 090 QMI Test protocol (incoming) ePROTOCOL_QMI_TEST_TX, // 091 QMI Test protocol (outgoing) ePROTOCOL_QMI_LOC_RX, // 092 QMI LOC protocol (incoming) ePROTOCOL_QMI_LOC_TX, // 093 QMI LOC protocol (outgoing) ePROTOCOL_QMI_SAR_RX, // 094 QMI PBM protocol (incoming) ePROTOCOL_QMI_SAR_TX, // 095 QMI PBM protocol (outgoing) ePROTOCOL_QMI_IMSS_RX, // 096 QMI IMSS protocol (incoming) ePROTOCOL_QMI_IMSS_TX, // 097 QMI IMSS protocol (outgoing) ePROTOCOL_QMI_ADC_RX, // 098 QMI ADC protocol (incoming) ePROTOCOL_QMI_ADC_TX, // 099 QMI ADC protocol (outgoing) ePROTOCOL_QMI_CSD_RX, // 100 QMI CSD protocol (incoming) ePROTOCOL_QMI_CSD_TX, // 101 QMI CSD protocol (outgoing) ePROTOCOL_QMI_MFS_RX, // 102 QMI MFS protocol (incoming) ePROTOCOL_QMI_MFS_TX, // 103 QMI MFS protocol (outgoing) ePROTOCOL_QMI_TIME_RX, // 104 QMI TIME protocol (incoming) ePROTOCOL_QMI_TIME_TX, // 105 QMI TIME protocol (outgoing) ePROTOCOL_QMI_TS_RX, // 106 QMI TS protocol (incoming) ePROTOCOL_QMI_TS_TX, // 107 QMI TS protocol (outgoing) ePROTOCOL_QMI_TMD_RX, // 108 QMI TMD protocol (incoming) ePROTOCOL_QMI_TMD_TX, // 109 QMI TMD protocol (outgoing) ePROTOCOL_QMI_SAP_RX, // 110 QMI SAP protocol (incoming) ePROTOCOL_QMI_SAP_TX, // 111 QMI SAP protocol (outgoing) ePROTOCOL_QMI_WDA_RX, // 112 QMI WDA protocol (incoming) ePROTOCOL_QMI_WDA_TX, // 113 QMI WDA protocol (outgoing) ePROTOCOL_QMI_TSYNC_RX, // 114 QMI TSYNC protocol (incoming) ePROTOCOL_QMI_TSYNC_TX, // 115 QMI TSYNC protocol (outgoing) ePROTOCOL_QMI_RFSA_RX, // 116 QMI RFSA protocol (incoming) ePROTOCOL_QMI_RFSA_TX, // 117 QMI RFSA protocol (outgoing) ePROTOCOL_QMI_CSVT_RX, // 118 QMI CSVT protocol (incoming) ePROTOCOL_QMI_CSVT_TX, // 119 QMI CSVT protocol (outgoing) ePROTOCOL_QMI_QCMAP_RX, // 120 QMI QCMAP protocol (incoming) ePROTOCOL_QMI_QCMAP_TX, // 121 QMI QCMAP protocol (outgoing) ePROTOCOL_QMI_IMSP_RX, // 122 QMI IMSP protocol (incoming) ePROTOCOL_QMI_IMSP_TX, // 123 QMI IMSP protocol (outgoing) ePROTOCOL_QMI_IMSVT_RX, // 124 QMI IMSVT protocol (incoming) ePROTOCOL_QMI_IMSVT_TX, // 125 QMI IMSVT protocol (outgoing) ePROTOCOL_QMI_IMSA_RX, // 126 QMI IMSA protocol (incoming) ePROTOCOL_QMI_IMSA_TX, // 127 QMI IMSA protocol (outgoing) ePROTOCOL_QMI_COEX_RX, // 128 QMI COEX protocol (incoming) ePROTOCOL_QMI_COEX_TX, // 129 QMI COEX protocol (outgoing) ePROTOCOL_QMI_35_RX, // 130 QMI service ID 35 protocol (incoming) ePROTOCOL_QMI_35_TX, // 131 QMI service ID 35 protocol (outgoing) ePROTOCOL_QMI_PDC_RX, // 132 QMI PDC protocol (incoming) ePROTOCOL_QMI_PDC_TX, // 133 QMI PDC protocol (outgoing) ePROTOCOL_QMI_37_RX, // 134 QMI service ID 37 protocol (incoming) ePROTOCOL_QMI_37_TX, // 135 QMI service ID 37 protocol (outgoing) ePROTOCOL_QMI_STX_RX, // 136 QMI STX protocol (incoming) ePROTOCOL_QMI_STX_TX, // 137 QMI STX protocol (outgoing) ePROTOCOL_QMI_BIT_RX, // 138 QMI BIT protocol (incoming) ePROTOCOL_QMI_BIT_TX, // 139 QMI BIT protocol (outgoing) ePROTOCOL_QMI_IMSRTP_RX, // 140 QMI IMSRTP protocol (incoming) ePROTOCOL_QMI_IMSRTP_TX, // 141 QMI IMSRTP protocol (outgoing) ePROTOCOL_QMI_RFRPE_RX, // 142 QMI RFRPE protocol (incoming) ePROTOCOL_QMI_RFRPE_TX, // 143 QMI RFRPE protocol (outgoing) ePROTOCOL_QMI_DSD_RX, // 144 QMI DSD protocol (incoming) ePROTOCOL_QMI_DSD_TX, // 145 QMI DSD protocol (outgoing) ePROTOCOL_QMI_SSCTL_RX, // 146 QMI SSCTL protocol (incoming) ePROTOCOL_QMI_SSCTL_TX, // 147 QMI SSCTL protocol (outgoing) ePROTOCOL_QMI_CAT_RX = 508, // 508 QMI CAT protocol (incoming) ePROTOCOL_QMI_CAT_TX, // 509 QMI CAT protocol (outgoing) ePROTOCOL_QMI_RMS_RX, // 510 QMI RMS protocol (incoming) ePROTOCOL_QMI_RMS_TX, // 511 QMI RMS protocol (outgoing) ePROTOCOL_QMI_OMA_RX, // 512 QMI OMA protocol (incoming) ePROTOCOL_QMI_OMA_TX, // 513 QMI OMA protocol (outgoing) ePROTOCOL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolType validity check PARAMETERS: pt [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolType pt ) { bool retVal = false; if ( (pt > ePROTOCOL_ENUM_BEGIN && pt <= ePROTOCOL_QDL_TX) || (pt >= ePROTOCOL_DSE_QDU_CMD && pt <= ePROTOCOL_DSE_QMUX_EVT) || (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_RFRPE_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocol( eProtocolType pt ) { bool retVal = false; if ( (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_RFRPE_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolRX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the incoming direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolRX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are even are RX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 0) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolTX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the outgoing direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolTX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are odd are TX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 1) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDSEProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a DSE protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsDSEProtocol( eProtocolType pt ) { bool retVal = false; if (pt >= ePROTOCOL_DSE_QDU_CMD && pt <= ePROTOCOL_DSE_QMUX_EVT) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDSEProtocolCmd (Inline Method) DESCRIPTION: Does the passed in value represent a DSE protocol and if so is it a command? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsDSEProtocolCmd( eProtocolType pt ) { bool retVal = false; if ( (IsDSEProtocol( pt ) == true) && ((DWORD)pt % 3 == 0) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDSEProtocolRsp (Inline Method) DESCRIPTION: Does the passed in value represent a DSE protocol and if so is it a response? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsDSEProtocolRsp( eProtocolType pt ) { bool retVal = false; if ( (IsDSEProtocol( pt ) == true) && ((DWORD)pt % 3 == 1) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDSEProtocolEvt (Inline Method) DESCRIPTION: Does the passed in value represent a DSE protocol and if so is it an event? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsDSEProtocolEvt( eProtocolType pt ) { bool retVal = false; if ( (IsDSEProtocol( pt ) == true) && ((DWORD)pt % 3 == 2) ) { retVal = true; } return retVal; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolLog.cpp000066400000000000000000000133251455567757300241350ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class definition PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolLog.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // The maximum number of in-memory buffers we allow const ULONG MAX_PROTOCOL_BUFFERS = 1024 * 16; /*=========================================================================*/ // cProtocolLog Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolLog (Public Method) DESCRIPTION: Constructor PARAMETERS: maxBuffers [ I ] - Maximum number of buffers to store in the log RETURN VALUE: None ===========================================================================*/ cProtocolLog::cProtocolLog( ULONG maxBuffers ) : mLog( maxBuffers > MAX_PROTOCOL_BUFFERS ? MAX_PROTOCOL_BUFFERS : maxBuffers, true ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolLog (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolLog::~cProtocolLog() { // Empty out the log Clear(); } /*=========================================================================== METHOD: AddBuffer (Public Method) DESCRIPTION: Add an protocol buffer to the end of the log PARAMETERS: buff [ I ] - Protocol buffer to add RETURN VALUE: ULONG - Index of newly added buffer (INVALID_LOG_INDEX upon failure) ===========================================================================*/ ULONG cProtocolLog::AddBuffer( sProtocolBuffer & buf ) { ULONG idx = INVALID_LOG_INDEX; if (buf.IsValid() == false) { return idx; } bool bRC = mLog.AddElement( buf, idx ); if (bRC == false) { idx = INVALID_LOG_INDEX; } return idx; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Return the protocol buffer at the given index from the log PARAMETERS: idx [ I ] - Index of protocol buffer to obtain RETURN VALUE: sProtocolBuffer - Protocol buffer ===========================================================================*/ sProtocolBuffer cProtocolLog::GetBuffer( ULONG idx ) const { sProtocolBuffer buf; mLog.GetElement( idx, buf ); return buf; } /*=========================================================================== METHOD: GetSignalEvent (Public Method) DESCRIPTION: Return the underlying signal event, which will be set when the log is updated. RETURN VALUE: cEvent - Signal event ===========================================================================*/ cEvent & cProtocolLog::GetSignalEvent() const { return mLog.GetSignalEvent(); } /*=========================================================================== METHOD: GetCount (Public Method) DESCRIPTION: Return the total number of buffers added to the log RETURN VALUE: ULONG ===========================================================================*/ ULONG cProtocolLog::GetCount() const { return mLog.GetTotalCount(); } /*=========================================================================== METHOD: Clear (Public Method) DESCRIPTION: Clear the log RETURN VALUE: None ===========================================================================*/ void cProtocolLog::Clear() { mLog.EmptyQueue(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolLog.h000066400000000000000000000070271455567757300236040ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class declaration PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "SyncQueue.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const ULONG INVALID_LOG_INDEX = ULONG_MAX; /*=========================================================================*/ // Class cProtocolLog /*=========================================================================*/ class cProtocolLog { public: // Constructor cProtocolLog( ULONG maxBuffers ); // Destructor virtual ~cProtocolLog(); // Add an protocol buffer to the end of the log virtual ULONG AddBuffer( sProtocolBuffer & buf ); // Return the protocol buffer at the given index from the log virtual sProtocolBuffer GetBuffer( ULONG idx ) const; // Return the underlying signal event virtual cEvent & GetSignalEvent() const; // Return the total number of buffers added to the log virtual ULONG GetCount() const; // Clear the log virtual void Clear(); protected: /* The underlying 'log' */ cSyncQueue mLog; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolNotification.cpp000066400000000000000000000132351455567757300260420ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.cpp DESCRIPTION: Implementation of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolNotification.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cProtocolQueueNotification Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Constructor PARAMETERS: pSQ [ I ] - Sync queue to utilize RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( cSyncQueue * pSQ ) : mpSQ( pSQ ) { // Nothing to do } /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Copy constructor PARAMETERS: notifier [ I ] - Notifier to base the new one on RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( const cProtocolQueueNotification & notifier ) : mpSQ( notifier.mpSQ ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolQueueNotification (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::~cProtocolQueueNotification() { mpSQ = 0; } /*=========================================================================== METHOD: Clone (Public Method) DESCRIPTION: Return an allocated copy of this object downcasted to our base class RETURN VALUE: cProtocolNotification * : Cloned object (0 on error) ===========================================================================*/ cProtocolNotification * cProtocolQueueNotification::Clone() const { cProtocolQueueNotification * pCopy = 0; try { pCopy = new cProtocolQueueNotification( *this ); } catch (...) { // Simply return 0 } return ((cProtocolNotification *)pCopy); } /*=========================================================================== METHOD: Notify (Public Method) DESCRIPTION: Notify view of a protocol event by adding notification structure to the underlying sync queue (which will provide the notification by signalling an event) PARAMETERS: eventType [ I ] - Protocol event type param1 [ I ] - Event type specific argument (see header description) param2 [ I ] - Event type specific argument (see header description) RETURN VALUE: None ===========================================================================*/ void cProtocolQueueNotification::Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const { sProtocolNotificationEvent evt( eventType, param1, param2 ); if (evt.IsValid() == true && mpSQ != 0 && mpSQ->IsValid() == true) { sProtocolNotificationEvent elem( eventType, param1, param2 ); mpSQ->AddElement( elem ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolNotification.h000066400000000000000000000174321455567757300255120ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.h DESCRIPTION: Declaration of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SyncQueue.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- enum eProtocolEventType { ePROTOCOL_EVT_BEGIN = -1, ePROTOCOL_EVT_REQ_ERR, // There was an error sending the request ePROTOCOL_EVT_REQ_SENT, // The request has been sent ePROTOCOL_EVT_RSP_ERR, // There was an error receiving the response ePROTOCOL_EVT_RSP_RECV, // The response has been received ePROTOCOL_EVT_AUX_TU_SENT, // Auxiliary data transmission unit sent ePROTOCOL_EVT_END }; // NOTE: The arguments for each event are currently as follows: // // ePROTOCOL_EVT_REQ_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_REQ_SENT // param1: Request ID // param2: Index of request buffer in associated protocol log // ePROTOCOL_EVT_RSP_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_RSP_RECV // param1: Request ID // param2: Index of response buffer in associated protocol log // // ePROTOCOL_EVT_AUX_TU_SENT // param1: Request ID // param2: Size of transmission unit // NOTE: To handle protoocl events using the Windows notifier add the following // prototype to your Window class header file: // // afx_msg LRESULT OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ); // // Then add an entry to the message map in your Window class source file: // // BEGIN_MESSAGE_MAP( CView, CChildView ) // ON_MESSAGE( PROTOCOL_WM_BASE + (ULONG)ePROTOCOL_EVT_XXX, OnProtocolEvent ) // END_MESSAGE_MAP() // // Finally write the handler itself: // // LRESULT CView::OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ) // { // Do something // return 0; // } /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolEventType validity check PARAMETERS: evtType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolEventType evtType ) { bool bRC = false; if (evtType > ePROTOCOL_EVT_BEGIN && evtType < ePROTOCOL_EVT_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Struct sProtocolNotificationEvent /*=========================================================================*/ struct sProtocolNotificationEvent { public: // (Inline) Default constructor (results in invalid object) sProtocolNotificationEvent() : mEventType( ePROTOCOL_EVT_BEGIN ), mParam1( 0 ), mParam2( 0 ) { // Nothing to do }; // (Inline) Parameter constructor sProtocolNotificationEvent( eProtocolEventType eventType, DWORD param1, DWORD param2 ) : mEventType( eventType ), mParam1( param1 ), mParam2( param2 ) { // Nothing to do }; // (Inline) Is this object valid? bool IsValid() { return ::IsValid( mEventType ); } /* Event type */ eProtocolEventType mEventType; /* First parameter (see above) */ DWORD mParam1; /* Second parameter (see above) */ DWORD mParam2; }; /*=========================================================================*/ // Class cProtocolNotification // // This abstract base class provides notification of protocol server // events sent from the protocol server to protocol server clients /*=========================================================================*/ class cProtocolNotification { public: // Return an allocated copy of this object virtual cProtocolNotification * Clone() const = 0; // Notify view of a protocol event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const = 0; }; /*=========================================================================*/ // Class cProtocolQueueNotification // // This class provides notification via a cSyncQueue object // populated with sProtocolNotificationEvent objects /*=========================================================================*/ class cProtocolQueueNotification : public cProtocolNotification { public: // Constructor cProtocolQueueNotification( cSyncQueue * pSQ ); // Copy constructor cProtocolQueueNotification( const cProtocolQueueNotification & notifier ); // Destructor virtual ~cProtocolQueueNotification(); // Return a copy of this object virtual cProtocolNotification * Clone() const; // Notify view of a MIS event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const; protected: /* Event notification queue */ mutable cSyncQueue * mpSQ; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolRequest.cpp000066400000000000000000000177501455567757300250520ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.cpp DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolRequest.h" #include "ProtocolNotification.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout const ULONG DEFAULT_REQ_TIMEOUT = 1000; // Minimum and maximum allowable timeout values (in milliseconds) const ULONG MIN_REQ_TIMEOUT = 100; const ULONG MAX_REQ_TIMEOUT = 300000; // Minimum number of attempts a request can be scheduled for const ULONG MIN_REQ_ATTEMPTS = 1; // Value to indicate that a request is to be sent out indefinately const ULONG INFINITE_REQS = 0xFFFFFFFF; // Minimum/default amount of time between repeated requests (in milliseconds) const ULONG MIN_REQ_FREQUENCY = 10; const ULONG DEFAULT_REQ_FREQUENCY = 100; /*=========================================================================*/ // sProtocolRequest Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) schedule [ I ] - When (from now, in milliseconds) to send the first request, this isn't a hard value as the request is only guaranteed to go out after this time elapses timeout [ I ] - Milliseconds to wait for a response to an individual request before declaring a timeout. Regardless of what is passed in the timeout value used will be between MIN/MAX_REQ_TIMEOUT requests [ I ] - Number of request attempts to make, this isn't a retry count rather this value is used to specify repeating requests. Regardless of what is passed in the requests value used will be at least MIN_REQ_ATTEMPTS frequency [ I ] - If the 'requests' value is greater than the MIN_REQ_ATTEMPTS than this represents the amount of time to wait between requests (from the completion of the last request attempt, in milliseconds), again this isn't a hard value. Regardless of what is passed in the frequency value used will be at least MIN_REQ_FREQUENCY pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule, ULONG timeout, ULONG requests, ULONG frequency, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( schedule ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( 0 ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Constrain requested timeout to allowable range if (timeout < MIN_REQ_TIMEOUT) { timeout = MIN_REQ_TIMEOUT; } if (timeout > MAX_REQ_TIMEOUT) { timeout = MAX_REQ_TIMEOUT; } mTimeout = timeout; // Constrain request attempts if (requests >= MIN_REQ_ATTEMPTS) { mRequests = requests; } // Constrain frequency if (frequency >= MIN_REQ_FREQUENCY) { mFrequency = frequency; } // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor (notification with defaults) PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( 0 ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( pNotifier ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Copy constructor PARAMETERS: req [ I ] - Request to copy RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( const sProtocolRequest & req ) : sProtocolBuffer( req ), mSchedule( req.mSchedule ), mTimeout( req.mTimeout ), mRequests( req.mRequests ), mFrequency( req.mFrequency ), mpNotifier( 0 ), mpAuxData( req.mpAuxData ), mAuxDataSize( req.mAuxDataSize ), mbTXOnly( req.mbTXOnly ) { // Clone notifier? if (req.mpNotifier != 0) { mpNotifier = req.mpNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: ~sProtocolRequest DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolRequest::~sProtocolRequest() { // Delete cloned notifier? if (mpNotifier != 0) { delete mpNotifier; mpNotifier = 0; } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolRequest.h000066400000000000000000000146271455567757300245170ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.h DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing protocol requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolNotification; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout extern const ULONG DEFAULT_REQ_TIMEOUT; // Minimum and maximum allowable timeout values (in milliseconds) extern const ULONG MIN_REQ_TIMEOUT; extern const ULONG MAX_REQ_TIMEOUT; // Minimum number of attempts a request can be scheduled for extern const ULONG MIN_REQ_ATTEMPTS; // Value to indicate that a request is to be sent out indefinately extern const ULONG INFINITE_REQS; // Minimum/default amount of time between repeated requests (in milliseconds) extern const ULONG MIN_REQ_FREQUENCY; extern const ULONG DEFAULT_REQ_FREQUENCY; /*=========================================================================*/ // Struct sProtocolRequest // // Structure to represent a generic request packet, including all the // information needed to schedule the request, send the request, and // (optionally) reschedule the request for another TX/RX attempt // // The default parameters schedule an immediate request (indicated by // passing in '0' for the schedule parameter) to be sent once with // the default timeout value /*=========================================================================*/ struct sProtocolRequest : public sProtocolBuffer { public: // Parameterized constructor sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule = 0, ULONG timeout = DEFAULT_REQ_TIMEOUT, ULONG requests = MIN_REQ_ATTEMPTS, ULONG frequency = DEFAULT_REQ_FREQUENCY, cProtocolNotification * pNotifier = 0 ); // Parameterized constructor (notification with defaults) sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ); // Copy constructor sProtocolRequest( const sProtocolRequest & req ); // Destructor virtual ~sProtocolRequest(); // (Inline) Get schedule value (value is in milliseconds) ULONG GetSchedule() const { return mSchedule; }; // (Inline) Get timeout value ULONG GetTimeout() const { return mTimeout; }; // (Inline) Get requests value ULONG GetRequests() const { return mRequests; }; // (Inline) Get frequency value (value is in milliseconds) ULONG GetFrequency() const { return mFrequency; }; const cProtocolNotification * GetNotifier() const { return mpNotifier; }; // (Inline) Set auxiliary data void SetAuxiliaryData( const BYTE * pData, ULONG dataSz ) { mpAuxData = pData; mAuxDataSize = dataSz; }; // (Inline) Get auxiliary data const BYTE * GetAuxiliaryData( ULONG & dataSz ) const { dataSz = mAuxDataSize; return mpAuxData; }; // (Inline) Set TX only flag void SetTXOnly() { mbTXOnly = true; }; // (Inline) Get TX only flag bool IsTXOnly() const { return mbTXOnly; }; protected: /* Schedule (approximately when to send the initial request) */ ULONG mSchedule; /* Timeout value for receiving a response */ ULONG mTimeout; /* Number of requests to schedule (must be at least one) */ ULONG mRequests; /* Frequency (approximately how long to wait before next request) */ ULONG mFrequency; /* Notification object */ cProtocolNotification * mpNotifier; /* Auxiliary data */ const BYTE * mpAuxData; /* Auxilary data size */ ULONG mAuxDataSize; /* TX only (i.e. do not wait for a response) ? */ bool mbTXOnly; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolServer.cpp000066400000000000000000001343511455567757300246650ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.cpp DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolServer.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID const ULONG INVALID_REQUEST_ID = 0; // Default activity timeout value const ULONG DEFAULT_WAIT = 100; // MTU (Maximum Transmission Unit) for auxiliary data (QC USB imposed) const ULONG MAX_AUX_MTU_SIZE = 1024 * 256; // USB's MaxPacketSize const ULONG MAX_PACKET_SIZE = 512; // Maximum amount of time to wait on external access synchronization object #ifdef DEBUG // For the sake of debugging do not be so quick to assume failure const ULONG DEADLOCK_TIME = 180000; #else const ULONG DEADLOCK_TIME = 10000; #endif // Maximum amount of time to wait for the protocol server to process a command const ULONG COMMAND_TIME = DEADLOCK_TIME; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ScheduleThread (Free Method) DESCRIPTION: Watch schedule for event to process or timeout PARAMETERS: pArg [ I ] - The protocol server object RETURN VALUE: void * - thread exit value (always NULL) ===========================================================================*/ void * ScheduleThread( PVOID pArg ) { // Do we have a server? cProtocolServer * pServer = (cProtocolServer *)pArg; if (pServer == 0) { TRACE( "ScheduleThread started with empty pArg." " Unable to locate cProtocolServer\n" ); ASSERT( 0 ); return NULL; } TRACE( "Schedule thread [%lu] started\n", pthread_self() ); // Default wait event timespec toTime = TimeIn( DEFAULT_WAIT ); // Return value checking int nRet; while (pServer->mbExiting == false) { DWORD nTemp; nRet = pServer->mThreadScheduleEvent.Wait( TimeFromNow( toTime ), nTemp ); if (nRet != 0 && nRet != ETIME) { // Error condition TRACE( "ScheduleThread [%lu] ScheduleThread wait error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Time to exit? if (pServer->mbExiting == true) { break; } // Get Schedule Mutex (non-blocking) nRet = pthread_mutex_trylock( &pServer->mScheduleMutex ); if (nRet == EBUSY) { // Not an error, we're just too slow // Someone else got to the ScheduleMutex before us // We'll wait for the signal again toTime = TimeIn( DEFAULT_WAIT ); TRACE( "ScheduleThread [%lu] unable to lock ScheduleMutex\n", pthread_self() ); continue; } else if (nRet != 0) { // Error condition TRACE( "ScheduleThread [%lu] mScheduleMutex error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Verify time. In the rare event it does move backward // it would simply place all our schedule items as due now pServer->CheckSystemTime(); // Default next wait period toTime = TimeIn( DEFAULT_WAIT ); timespec curTime = TimeIn( 0 ); if (pServer->mpActiveRequest != 0) { if (pServer->mpActiveRequest->mbWaitingForResponse == true) { // Waiting on a response, this takes priority over the next // scheduled event // Has timeout expired? if (pServer->mActiveRequestTimeout <= curTime) { // Response timeout // Note: This may clear mpActiveRequest pServer->RxTimeout(); } else { // Active response timer is not yet due to expire // Default timeout again, or this response's timeout? if (pServer->mActiveRequestTimeout <= toTime) { toTime = pServer->mActiveRequestTimeout; } } } else { // This should never happen TRACE( "ScheduleThread() Sequencing error: " "Active request %lu is not waiting for response ???\n", pServer->mpActiveRequest->mID ); break; } } if (pServer->mpActiveRequest == 0 && pServer->mRequestSchedule.size() > 0) { // No response timer active, ready to start the next // scheduled item if due timespec scheduledItem = pServer->GetNextRequestTime(); // Is item due to be scheduled? if (scheduledItem <= curTime) { // Process scheduled item pServer->ProcessRequest(); } else { // Scheduled item is not yet due to be processed // Default timeout again, or this item's start time? if (scheduledItem <= toTime) { toTime = scheduledItem; } } } /*TRACE( "Updated timer at %llu waiting %lu\n", GetTickCount(), TimeFromNow( toTime ) ); */ // Unlock schedule mutex nRet = pthread_mutex_unlock( &pServer->mScheduleMutex ); if (nRet != 0) { TRACE( "ScheduleThread Unable to unlock schedule mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } TRACE( "Schedule thread [%lu] exited\n", pthread_self() ); return NULL; } /*=========================================================================== METHOD: TimeIn (Free Method) DESCRIPTION: Fill timespec with the time it will be in specified milliseconds Relative time to Absolute time PARAMETERS: millis [ I ] - Milliseconds from current time RETURN VALUE: timespec - resulting time (from epoc) NOTE: tv_sec of 0 is an error ===========================================================================*/ timespec TimeIn( ULONG millis ) { timespec outTime; int nRC = clock_gettime( CLOCK_REALTIME, &outTime ); if (nRC == 0) { // Add avoiding an overflow on (long)nsec outTime.tv_sec += millis / 1000l; outTime.tv_nsec += ( millis % 1000l ) * 1000000l; // Check if we need to carry if (outTime.tv_nsec >= 1000000000l) { outTime.tv_sec += outTime.tv_nsec / 1000000000l; outTime.tv_nsec = outTime.tv_nsec % 1000000000l; } } else { outTime.tv_sec = 0; outTime.tv_nsec = 0; } return outTime; } /*=========================================================================== METHOD: TimeFromNow (Free Method) DESCRIPTION: Find the milliseconds from current time this timespec will occur Absolute time to Relative time PARAMETERS: time [ I ] - Absolute time RETURN VALUE: Milliseconds in which absolute time will occur 0 if time has passed or error has occured ===========================================================================*/ ULONG TimeFromNow( timespec time ) { // Assume failure ULONG nOutTime = 0; timespec now; int nRC = clock_gettime( CLOCK_REALTIME, &now ); if (nRC == -1) { TRACE( "Error %d with gettime, %s\n", errno, strerror( errno ) ); return nOutTime; } if (time <= now) { return nOutTime; } nOutTime = (time.tv_sec - now.tv_sec) * 1000l; nOutTime += (time.tv_nsec - now.tv_nsec) / 1000000l; return nOutTime; } /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime = TimeIn( 0 ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================*/ // cProtocolServerRxCallback Methods /*=========================================================================*/ /*=========================================================================== METHOD: IOComplete (Free Method) DESCRIPTION: The I/O has been completed, process the results PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Bytes received during operation RETURN VALUE: None ===========================================================================*/ void cProtocolServerRxCallback::IOComplete( DWORD status, DWORD bytesReceived ) { if (mpServer != 0) { mpServer->RxComplete( status, bytesReceived ); } } /*=========================================================================*/ // cProtocolServer::sProtocolReqRsp Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Constructor PARAMETERS: requestInfo [ I ] - Underlying request object requestID [ I ] - Request ID auxDataMTU [ I ] - MTU (Maximum Transmission Unit) for auxiliary data RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ) : mRequest( requestInfo ), mID( requestID ), mAttempts( 0 ), mEncodedSize( requestInfo.GetSize() ), mRequiredAuxTxs( 0 ), mCurrentAuxTx( 0 ), mbWaitingForResponse( false ) { ULONG auxDataSz = 0; const BYTE * pAuxData = requestInfo.GetAuxiliaryData( auxDataSz ); // Compute the number of required auxiliary data transmissions? if (auxDataMTU > 0 && pAuxData != 0 && auxDataSz > 0) { mRequiredAuxTxs = 1; if (auxDataSz > auxDataMTU) { mRequiredAuxTxs = auxDataSz / auxDataMTU; if ((auxDataSz % auxDataMTU) != 0) { mRequiredAuxTxs++; } } } } /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Copy constructor PARAMETERS: reqRsp [ I ] - Object being copied RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolReqRsp & reqRsp ) : mRequest( reqRsp.mRequest ), mID( reqRsp.mID ), mAttempts( reqRsp.mAttempts ), mEncodedSize( reqRsp.mEncodedSize ), mRequiredAuxTxs( reqRsp.mRequiredAuxTxs ), mCurrentAuxTx( reqRsp.mCurrentAuxTx ), mbWaitingForResponse( reqRsp.mbWaitingForResponse ) { // Nothing to do }; /*=========================================================================*/ // cProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : mpConnection( 0 ), mConnectionType( eConnectionType_Begin ), mRxCallback(), mScheduleThreadID( 0 ), mThreadScheduleEvent(), mbExiting( false ), mpServerControl( 0 ), mLastRequestID( 1 ), mpActiveRequest( 0 ), mpRxBuffer( 0 ), mRxBufferSize( bufferSzRx ), mRxType( rxType ), mTxType( txType ), mLog( logSz ) { mLastTime = TimeIn( 0 ); // Allocate receive buffer? if (mRxBufferSize > 0) { mpRxBuffer = new BYTE[mRxBufferSize]; } // Before continuing verify receive buffer was allocated if (mpRxBuffer != 0) { // Schedule mutex int nRet = pthread_mutex_init( &mScheduleMutex, NULL ); if (nRet != 0) { TRACE( "Unable to init schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } } } /*=========================================================================== METHOD: ~cProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::~cProtocolServer() { // This should have already been called, but ... Exit(); // Schedule mutex int nRet = pthread_mutex_destroy( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to destroy schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); } // Free receive buffer if (mpRxBuffer != 0) { delete [] mpRxBuffer; mpRxBuffer = 0; } } /*=========================================================================== METHOD: HandleRemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request Note: if a request is being processed, it cannot be inturrupted PARAMETERS: reqID [ I ] - Server assigned request ID SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::HandleRemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Find and erase request from request map std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); if (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } mRequestMap.erase( pReqIter ); // Success! bRC = true; // Find and erase request from schedule bool bFound = false; int entryIndex = -1; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { entryIndex++; tSchedule entry = *pScheduleIter; if (entry.second == reqID) { bFound = true; mRequestSchedule.erase( pScheduleIter ); break; } else { pScheduleIter++; } } // Note: schedule will be updated when mutex is unlocked/signaled } else if (mpActiveRequest != 0 && mpActiveRequest->mID == reqID) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Cancel the response timer (when active) if (mpActiveRequest->mbWaitingForResponse == true) { // Schedule will be updated when mutex is unlocked // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)reqID, ECANCELED ); } } else { // This is the active request, cancel the underlying transmit // Note: Because ProcessRequest and RemoveRequest are both muxed // with ScheduleMutex, it is impossible to for the write // to actually be in progress when this code is reached. if (mpConnection != 0) { mpConnection->CancelTx(); } // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, ECANCELED ); } } // Now delete the request delete mpActiveRequest; mpActiveRequest = 0; // Success! bRC = true; } else { TRACE( "cProtocolServer::RemoveRequest( %lu )," " invalid request ID\n", reqID ); } return bRC; } /*=========================================================================== METHOD: ScheduleRequest (Internal Method) DESCRIPTION: Schedule a request for transmission PARAMETERS: reqID [ I ] - ID of the request being scheduled this ID must exist in the internal request/schedule maps schedule [ I ] - Value in milliseconds that indicates the approximate time from now that the request is to be sent out, the actual time that the request is sent will be greater than or equal to this value dependant on requests scheduled before the request in question and standard server processing time SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ScheduleRequest( ULONG reqID, ULONG schedule ) { // Assume failure bool bRC = false; // Schedule adjust is in milliseconds timespec schTimer = TimeIn( schedule ); // Create the schedule entry tSchedule newEntry( schTimer, reqID ); // Fit this request into the schedule (ordered by scheduled time) mRequestSchedule.insert( newEntry ); // Note: timer will be updated when mScheduleMutex is unlocked return bRC; } /*=========================================================================== METHOD: RescheduleActiveRequest (Internal Method) DESCRIPTION: Reschedule (or cleanup) the active request SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RescheduleActiveRequest() { // Are there more attempts to be made? if (mpActiveRequest->mAttempts < mpActiveRequest->mRequest.GetRequests()) { // Yes, first reset the request mpActiveRequest->Reset(); // Now add it back to the request map mRequestMap[mpActiveRequest->mID] = mpActiveRequest; TRACE( "RescheduleActiveRequest(): req %lu rescheduled\n", mpActiveRequest->mID ); // Lastly reschedule the request ScheduleRequest( mpActiveRequest->mID, mpActiveRequest->mRequest.GetFrequency() ); } else { TRACE( "RescheduleActiveRequest(): req %lu removed\n", mpActiveRequest->mID ); // No, we are through with this request delete mpActiveRequest; } // There is no longer an active request mpActiveRequest = 0; } /*=========================================================================== METHOD: ProcessRequest (Internal Method) DESCRIPTION: Process a single outgoing protocol request, this consists of removing the request ID from the head of the schedule, looking up the internal request object in the request map, sending out the request, and setting up the response timer (if a response is required) SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: ===========================================================================*/ void cProtocolServer::ProcessRequest() { // Is there already an active request? if (mpActiveRequest != 0 || mpConnection == 0) { return; } // Grab request ID from the schedule std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); // Did we find the request? if (pScheduleIter == mRequestSchedule.end()) { // No return; } // Yes, grab the request ID ULONG reqID = pScheduleIter->second; // Remove from schedule mRequestSchedule.erase( pScheduleIter ); // Look up the internal request object std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); // Request not found around? if (pReqIter == mRequestMap.end() || pReqIter->second == 0) { // No return; } // Set this request as the active request mpActiveRequest = pReqIter->second; TRACE( "ProcessRequest(): req %lu started\n", mpActiveRequest->mID ); // Remove request from pending request map mRequestMap.erase( pReqIter ); // Extract the underlying request const sProtocolRequest & req = mpActiveRequest->mRequest; // Increment attempt count? if (req.GetRequests() != INFINITE_REQS) { // This request isn't an indefinite one, so keep track of each attempt mpActiveRequest->mAttempts++; } bool bTxSuccess = false; // Encode data for transmission? bool bEncoded = false; sSharedBuffer * pEncoded = 0; pEncoded = EncodeTxData( req.GetSharedBuffer(), bEncoded ); if (bEncoded == false) { // Note: no longer asynchronus // Send the request data bTxSuccess = mpConnection->TxData( req.GetBuffer(), req.GetSize() ); } else if (bEncoded == true) { if (pEncoded != 0 && pEncoded->IsValid() == true) { // Note: no longer asynchronus // Send the request data mpActiveRequest->mEncodedSize = pEncoded->GetSize(); bTxSuccess = mpConnection->TxData( pEncoded->GetBuffer(), pEncoded->GetSize() ); } } if (bTxSuccess == true) { TRACE( "ProcessRequest(): req %lu finished\n", mpActiveRequest->mID ); TxComplete(); } else { TxError(); TRACE( "ProcessRequest(): req finished with a TxError\n" ); } return; } /*=========================================================================== METHOD: CheckSystemTime (Internal Method) DESCRIPTION: Check that system time hasn't moved backwards. Since we use the system time for scheduling requests we need to periodically check that the user (or system itself) hasn't reset system time backwards, if it has then we reschedule everything to the current system time. This disrupts the schedule but avoids stranding requests Updates mLastTime SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool: System time moved backwards? ===========================================================================*/ bool cProtocolServer::CheckSystemTime() { // Assume that time is still marching forward bool bAdjust = false; timespec curTime = TimeIn( 0 ); if (curTime < mLastTime) { // Looks like the system clock has been adjusted to an earlier // value, go through the current schedule and adjust each timer // to reflect the adjustment. This isn't an exact approach but // it prevents requests from being stranded which is our goal // Note: set iterators are constant. This means we need to // create a set with the new data, we can't modify this one std::set < tSchedule, std::less > tempSchedule; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { tSchedule entry = *pScheduleIter; entry.first.tv_sec = curTime.tv_sec; entry.first.tv_nsec = curTime.tv_nsec; tempSchedule.insert( entry ); pScheduleIter++; } mRequestSchedule = tempSchedule; // Update mActiveRequestTimeout if ( (mpActiveRequest != 0) && (mpActiveRequest->mbWaitingForResponse == true) ) { // Restart active request's timeout ULONG mTimeout = mpActiveRequest->mRequest.GetTimeout(); mActiveRequestTimeout = TimeIn( mTimeout ); } TRACE( "Time has moved backwards, schedule updated\n" ); // Indicate the change bAdjust = true; } mLastTime.tv_sec = curTime.tv_sec; mLastTime.tv_nsec = curTime.tv_nsec; return bAdjust; } /*=========================================================================== METHOD: RxComplete (Internal Method) DESCRIPTION: Handle completion of receive data operation PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Number of bytes received SEQUENCING: This method is sequenced according to the schedule mutex i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxComplete( DWORD status, DWORD bytesReceived ) { if (status != NO_ERROR) { TRACE( "cProtocolServer::RxComplete() = %lu\n", status ); } if (mpConnection == 0) { TRACE( "cProtocolServer::RxComplete() - Not initialized\n" ); return; } // Error with the read if (status != NO_ERROR || bytesReceived == 0) { // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); return; } // Get Schedule Mutex if (GetScheduleMutex() == false) { TRACE( "RxComplete(), unable to get schedule Mutex\n" ); return; } TRACE( "RxComplete() - Entry at %llu\n", GetTickCount() ); // Decode data bool bAbortTx = false; ULONG rspIdx = INVALID_LOG_INDEX; bool bRsp = DecodeRxData( bytesReceived, rspIdx, bAbortTx ); // Is there an active request that needs to be aborted if (mpActiveRequest != 0 && bAbortTx == true) { // Yes, terminate the transmission and handle the error mpConnection->CancelTx(); TxError(); } // Is there an active request and a valid response? else if (mpActiveRequest != 0 && bRsp == true) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client that response was received if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_RECV, (DWORD)mpActiveRequest->mID, (DWORD)rspIdx ); } // Reschedule request as needed RescheduleActiveRequest(); } // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); TRACE( "RxComplete() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return; } return; } /*=========================================================================== METHOD: RxTimeout (Internal Method) DESCRIPTION: Handle the response timer expiring SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxTimeout() { // No active request? if (mpActiveRequest == 0) { TRACE( "RxTimeout() with no active request\n" ); ASSERT( 0 ); } TRACE( "RxTimeout() for req %lu\n", mpActiveRequest->mID ); const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)mpActiveRequest->mID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: TxComplete (Internal Method) DESCRIPTION: Handle completion of transmit data operation PARAMETERS: SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxComplete() { // No active request? if (mpActiveRequest == 0 || mpConnection == 0) { TRACE( "TxComplete() called with no active request\n" ); ASSERT( 0 ); } TRACE( "TxComplete() req %lu started\n", mpActiveRequest->mID ); ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client of auxiliary data being sent? if (mpActiveRequest->mRequiredAuxTxs && mpActiveRequest->mCurrentAuxTx) { pNotifier->Notify( ePROTOCOL_EVT_AUX_TU_SENT, (DWORD)reqID, (DWORD)mpActiveRequest->mEncodedSize ); } // Check for more auxiliary data to transmit if (mpActiveRequest->mCurrentAuxTx < mpActiveRequest->mRequiredAuxTxs) { ULONG auxDataSz = 0; const BYTE * pAuxData = req.GetAuxiliaryData( auxDataSz ); if (auxDataSz > 0 && pAuxData != 0) { bool bRC = false; // Adjust for current MTU pAuxData += (mpActiveRequest->mCurrentAuxTx * MAX_AUX_MTU_SIZE); mpActiveRequest->mCurrentAuxTx++; // Last MTU? if (mpActiveRequest->mCurrentAuxTx == mpActiveRequest->mRequiredAuxTxs) { // More than one MTU? if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = (auxDataSz % MAX_AUX_MTU_SIZE); if (auxDataSz == 0) { auxDataSz = MAX_AUX_MTU_SIZE; } } if (auxDataSz % MAX_PACKET_SIZE == 0) { // If last write of unframed write request is divisible // by 512, break off last byte and send seperatly. TRACE( "TxComplete() Special case, break off last byte\n" ); bRC = mpConnection->TxData( pAuxData, auxDataSz - 1 ); if (bRC == true) { bRC = mpConnection->TxData( pAuxData + auxDataSz -1, 1 ); } } else { bRC = mpConnection->TxData( pAuxData, auxDataSz ); } } else if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = MAX_AUX_MTU_SIZE; bRC = mpConnection->TxData( pAuxData, auxDataSz ); } if (bRC == true) { mpActiveRequest->mEncodedSize = auxDataSz; TxComplete(); } else { TxError(); } return; } } // Another successful transmission, add the buffer to the log ULONG reqIdx = INVALID_LOG_INDEX; sProtocolBuffer pb( req.GetSharedBuffer() ); reqIdx = mLog.AddBuffer( pb ); // Notify client? if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_SENT, (DWORD)reqID, (DWORD)reqIdx ); } // Wait for a response? if (mpActiveRequest->mRequest.IsTXOnly() == false) { // We now await the response mpActiveRequest->mbWaitingForResponse = true; mActiveRequestTimeout = TimeIn( mpActiveRequest->mRequest.GetTimeout() ); } else { // Reschedule request as needed RescheduleActiveRequest(); } } /*=========================================================================== METHOD: TxError (Internal Method) DESCRIPTION: Handle transmit data operation error be either rescheduling the request or cleaning it up SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxError() { // No active request? if (mpActiveRequest == 0) { return; } ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the protocol server by starting up the schedule thread SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Initialize() { // Assume failure bool bRC = false; mbExiting = false; // Get mScheduleMutex if (GetScheduleMutex() == true) { if (mScheduleThreadID == 0) { // Yes, start thread int nRet = pthread_create( &mScheduleThreadID, NULL, ScheduleThread, this ); if (nRet == 0) { // Success! bRC = true; } } } else { TRACE( "cProtocolServer::Initialize(), unable to aquire ScheduleMutex\n" ); return false; } // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit the protocol server by exiting the schedule thread (if necessary) SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Exit() { // Assume failure bool bRC = false; if (mScheduleThreadID != 0) { if (GetScheduleMutex() == false) { // This should never happen return false; } // Check that mScheduleTheadID is still not 0 if (mScheduleThreadID == 0) { printf( "mScheduleThreadID was zero!!!\n" ); ReleaseScheduleMutex( false ); return false; } // Set exit event mbExiting = true; // Signal a schedule update if (mThreadScheduleEvent.Set( 1 ) != 0) { // This should never happen return false; } TRACE( "Joining ScheduleThread %lu\n", mScheduleThreadID ); // Allow process to continue until it finishes int nRet = pthread_join( mScheduleThreadID, NULL ); if (nRet == ESRCH) { TRACE( "ScheduleThread has exited already\n" ); } else if (nRet != 0) { TRACE( "Unable to join ScheduleThread. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } TRACE( "cProtocolServer::Exit(), completed thread %lu\n", (ULONG)mScheduleThreadID ); bRC = true; // Release "handle" mScheduleThreadID = 0; // Release mutex lock, don't signal ScheduleThread if (ReleaseScheduleMutex( false ) == false) { // This should never happen return false; } } else { // No ScheduleThread bRC = true; } // Free any allocated requests std::map ::iterator pReqIter; pReqIter = mRequestMap.begin(); while (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } pReqIter++; } mRequestMap.clear(); // Free log mLog.Clear(); return bRC; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the given communications port PARAMETERS: pPort [ I ] - String pointer representing the device node to connect to (IE: /dev/qcqmi0) SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Connect( LPCSTR pPort ) { // Assume failure bool bRC = false; if (pPort == 0 || pPort[0] == 0 || mpConnection == 0) { return bRC; } // Connect to device // Set callback mRxCallback.SetServer( this ); // Override to initialize port with protocol specific options bRC = mpConnection->Connect( pPort ); if (bRC == true) { bRC = InitializeComm(); if (bRC == true) { // Setup the initial read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); } } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current communications port SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Disconnect() { // Disconnect if (mpConnection != 0) { // Cancel any outstanding I/O mpConnection->CancelIO(); } // Empty callback mRxCallback.SetServer( 0 ); // Cleanup COM port CleanupComm(); if (mpConnection != 0) { // Now disconnect bool bDis = mpConnection->Disconnect(); delete mpConnection; return bDis; } else { return true; } } /*=========================================================================== METHOD: IsConnected (Public Method) DESCRIPTION: Are we currently connected to a port? SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::IsConnected() { return (mpConnection != 0 && mpConnection->IsConnected()); } /*=========================================================================== METHOD: AddRequest (Public Method) DESCRIPTION: Add an outgoing protocol request to the protocol server request queue PARAMETERS: req [ I ] - Request being added SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: ULONG - ID of scheduled request (INVALID_REQUEST_ID upon error) ===========================================================================*/ ULONG cProtocolServer::AddRequest( const sProtocolRequest & req ) { // Assume failure ULONG reqID = INVALID_REQUEST_ID; // Server not configured for sending requests? if (IsValid( mTxType ) == false) { return reqID; } // Request type not valid for server? if (req.GetType() != mTxType) { return reqID; } // Invalide request? if (ValidateRequest( req ) == false) { return reqID; } // Get mScheduleMutex if (GetScheduleMutex() == true) { TRACE( "AddRequest() - Entry at %llu\n", GetTickCount() ); // Grab next available request ID if (++mLastRequestID == 0) { mLastRequestID++; } reqID = mLastRequestID; while (mRequestMap.find( reqID ) != mRequestMap.end()) { reqID++; } // Wrap in our internal structure sProtocolReqRsp * pReqRsp = 0; pReqRsp = new sProtocolReqRsp( req, reqID, MAX_AUX_MTU_SIZE ); if (pReqRsp != 0) { // Add to request map mRequestMap[reqID] = pReqRsp; // ... and schedule ScheduleRequest( reqID, req.GetSchedule() ); } TRACE( "AddRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return INVALID_REQUEST_ID; } } else { TRACE( "cProtocolServer::AddRequest(), unable to get schedule Mutex\n" ); } return reqID; } /*=========================================================================== METHOD: RemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes Note: If a request is being written, it cannot be inturrupted as both ProcessRequest and RemoveRequest depend on the ScheduleMutex and the write is synchronus. If the request has been written but the read has not been triggered it can be removed. PARAMETERS: reqID [ I ] - ID of request being removed RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::RemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Get Schedule Mutex if (GetScheduleMutex() == true) { TRACE( "RemoveRequest() - Entry at %llu\n", GetTickCount() ); bRC = HandleRemoveRequest( reqID ); TRACE( "RemoveRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } } else { TRACE( "cProtocolServer::RemoveRequest(), unable to get mScheduleMutex\n" ); } return bRC; } /*=========================================================================== METHOD: GetScheduleMutex (Internal Method) DESCRIPTION: Get the schedule mutex. Additionally a check is applied to verify the DEADLOCK_TIME was not exceeded SEQUENCING: This function will block until the mScheduleMutex is aquired PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::GetScheduleMutex() { ULONGLONG nStart = GetTickCount(); //TRACE( "Locking Schedule mutex\n" ); int nRet = pthread_mutex_lock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to lock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } ULONGLONG nEnd = GetTickCount(); if (nEnd - nStart > DEADLOCK_TIME) { TRACE( "Deadlock time exceeded: took %llu ms\n", nEnd - nStart ); ReleaseScheduleMutex( true ); return false; } //TRACE( "Locked ScheduleMutex\n" ); return true; } /*=========================================================================== METHOD: ReleaseScheduleMutex (Internal Method) DESCRIPTION: Release lock on the schedule mutex SEQUENCING: Calling process must have lock PARAMETERS: bSignalThread [ I ] - Signal Schedule thread as well? RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ReleaseScheduleMutex( bool bSignalThread ) { if (bSignalThread == true) { if (mThreadScheduleEvent.Set( 1 ) != 0) { return false; } } int nRet = pthread_mutex_unlock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to unlock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/ProtocolServer.h000066400000000000000000000263731455567757300243360ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.h DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Connection.h" #include "ProtocolRequest.h" #include "ProtocolLog.h" #include "Event.h" #include #include //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolServer; struct sServerControl; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID extern const ULONG INVALID_REQUEST_ID; // Fill timespec with the time it will be in specified milliseconds // Relative time to Absolute time timespec TimeIn( ULONG millis ); // Find the milliseconds from current time this timespec will occur // Absolute time to Relative time ULONG TimeFromNow( timespec time ); // Provide a number for sequencing reference, similar to the windows function ULONGLONG GetTickCount(); // timespec < comparison method inline bool operator< (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec < second.tv_nsec) ) ); } // timespec <= comparison method inline bool operator<= (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec <= second.tv_nsec) ) ); } /*=========================================================================*/ // Class cProtocolServerRxCallback /*=========================================================================*/ class cProtocolServerRxCallback { public: // (Inline) Constructor cProtocolServerRxCallback() : mpServer( 0 ) { }; // (Inline) Destructor virtual ~cProtocolServerRxCallback() { }; // (Inline) Set server object to pass results to void SetServer( cProtocolServer * pServer ) { mpServer = pServer; }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesReceived ); protected: /* Protocol server to interact with */ cProtocolServer * mpServer; }; /*=========================================================================*/ // Class cProtocolServer /*=========================================================================*/ class cProtocolServer { public: // Constructor cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cProtocolServer(); // Initialize the protocol server bool Initialize(); // Exit the protocol server bool Exit(); // Connect to the given communications port bool Connect( LPCSTR pPort ); // Disconnect from target bool Disconnect(); // Are we currently connected to a port? bool IsConnected(); // Add an outgoing protocol request to the protocol server request queue ULONG AddRequest( const sProtocolRequest & req ); // Remove a previously added protocol request bool RemoveRequest( ULONG reqID ); // (Inline) Return the protocol log const cProtocolLog & GetLog() { return mLog; }; protected: // Internal protocol server request/response structure, used to track // info related to sending out a request struct sProtocolReqRsp { public: // Constructor sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ); // Copy constructor sProtocolReqRsp( const sProtocolReqRsp & reqRsp ); // (Inline) Reset for next transmission attempt void Reset() { mEncodedSize = mRequest.GetSize(); mCurrentAuxTx = 0; mbWaitingForResponse = 0; }; /* Underlying protocol request */ sProtocolRequest mRequest; /* Request ID */ ULONG mID; /* Number of times this request has been attempted */ ULONG mAttempts; /* Size of encoded data being transmitted */ ULONG mEncodedSize; /* Number of required auxiliary data transmissions */ ULONG mRequiredAuxTxs; /* Current auxiliary data transmission */ ULONG mCurrentAuxTx; /* Are we currently waiting for a response? */ bool mbWaitingForResponse; }; // Handle the remove request bool HandleRemoveRequest( ULONG reqID ); // Schedule a request for transmission bool ScheduleRequest( ULONG reqID, ULONG schedule ); // (Inline) Get next request's time from mRequestSchedule timespec GetNextRequestTime() { timespec outTime; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); tSchedule entry = *pScheduleIter; outTime = entry.first; return outTime; } // (Inline) Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ) { return req.IsValid(); }; // Reschedule (or cleanup) the active request void RescheduleActiveRequest(); // Process a single outgoing protocol request void ProcessRequest(); // Check that system time hasn't moved backwards bool CheckSystemTime(); // Perform protocol specific communications port initialization virtual bool InitializeComm() = 0; // Perform protocol specific communications port cleanup virtual bool CleanupComm() = 0; // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) = 0; // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) = 0; // Handle completion of receive data operation void RxComplete( DWORD status, DWORD bytesReceived ); // Handle the response timer expiring void RxTimeout(); // Handle completion of transmit data operation virtual void TxComplete(); // Handle a transmission error void TxError(); /* Underlying communications object */ cConnection * mpConnection; /* Underlying connection type */ enum eConnectionType { eConnectionType_Begin = 0, eConnectionType_RmNet = 1, eConnectionType_SMD = 2, eConnectionType_End } mConnectionType; /* Rx callback */ cProtocolServerRxCallback mRxCallback; /* ID of Schedule thread */ pthread_t mScheduleThreadID; // ScheduleThread signal event cEvent mThreadScheduleEvent; // Schedule mutex // Ensures exclusive access to mRequestSchedule pthread_mutex_t mScheduleMutex; // Is the thread in the process of exiting? // (no new commands will be accepted) bool mbExiting; /* Client/server thread control object */ sSharedBuffer * mpServerControl; /* Protocol request schedule (scheduled time/request ID) */ typedef std::pair tSchedule; std::set < tSchedule, std::less > mRequestSchedule; /* Last system time value (used to check for time changes) */ timespec mLastTime; /* Protocol request map (request ID mapped to internal req/rsp struct) */ std::map mRequestMap; /* Last assigned request ID */ ULONG mLastRequestID; /* Current request being processed */ sProtocolReqRsp * mpActiveRequest; /* Absolute timeout for mpActiveRequest based on when write was completed */ timespec mActiveRequestTimeout; /* Data buffer for incoming data */ BYTE * mpRxBuffer; /* Size of above buffer (i.e. how much data to read in at once) */ ULONG mRxBufferSize; /* Protocol type for incoming/outgoing data*/ eProtocolType mRxType; eProtocolType mTxType; /* Protocol log */ cProtocolLog mLog; // Get a lock on ScheduleMutex bool GetScheduleMutex(); // Release lock on ScheduleMutex // Signal ScheduleThread if desired bool ReleaseScheduleMutex( bool bSignalThread = true ); // Schedule Thread gets full access friend void * ScheduleThread( PVOID pArg ); // Callback objects get full access friend class cProtocolServerRxCallback; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/QMIBuffers.cpp000066400000000000000000000234471455567757300236430ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.cpp DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQMIServiceBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQMIServiceBuffer (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::sQMIServiceBuffer( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQMIServiceBuffer::Validate(); } /*=========================================================================== METHOD: ~sQMIServiceBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::~sQMIServiceBuffer() { // Nothing to do } /*=========================================================================== METHOD: GetResult (Public Method) DESCRIPTION: Return contents of mandatory result content PARAMETERS: returnCode [ I ] - The return code (should be eQMIResultCode) errorCode [ I ] - The error code (should be eQMIErrorCode) RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::GetResult( ULONG & returnCode, ULONG & errorCode ) { if (IsResponse() == false) { return false; } std::map ::const_iterator pIter; pIter = mContents.find( QMI_TLV_ID_RESULT ); if (pIter == mContents.end()) { return false; } const sQMIRawContentHeader * pContent = pIter->second; if (pContent == 0) { ASSERT( 0 ); return false; } if (pContent->mLength != 4) { return false; } const WORD * pData = (const WORD *)(++pContent); returnCode = (ULONG)*pData++; errorCode = (ULONG)*pData; return true; } /*=========================================================================== METHOD: BuildBuffer (Static Public Method) DESCRIPTION: Build a QMI request PARAMETERS: serviceType [ I ] - QMI service type msgID [ I ] - The QMI message request ID bResponse [ I ] - Build a response? bIndication [ I ] - Build an indication? pPayload [ I ] - Payload payloadLen [ I ] - Size of above payload RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQMIServiceBuffer::BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse, bool bIndication, const BYTE * pPayload, ULONG payloadLen ) { const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG totalHdrSz = szTransHdr + szMsgHdr; // Truncate payload? if (payloadLen > (QMI_MAX_BUFFER_SIZE - totalHdrSz)) { payloadLen = QMI_MAX_BUFFER_SIZE - totalHdrSz; } // Make sure length agrees with pointer if (pPayload == 0) { payloadLen = 0; } // Allocate buffer PBYTE pBuffer = new BYTE[payloadLen + totalHdrSz]; if (pBuffer == 0) { return 0; } // Format header sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)&pBuffer[0]; pHdr->mCompound = 0; pHdr->mResponse = 0; pHdr->mIndication = 0; pHdr->mReserved = 0; pHdr->mTransactionID = 1; bool bTX = true; if (bResponse == true) { pHdr->mResponse = 1; bTX = false; } else if (bIndication == true) { pHdr->mIndication = 1; bTX = false; } pHdr++; // Format message header sQMIRawMessageHeader * pMsg = 0; pMsg = (sQMIRawMessageHeader *)pHdr; pMsg->mMessageID = msgID; pMsg->mLength = (WORD)payloadLen; // Copy in payload? if (payloadLen > 0 && pPayload != 0) { memcpy( (LPVOID)&pBuffer[totalHdrSz], (LPCVOID)&pPayload[0], (SIZE_T)payloadLen ); } // Compute total size ULONG sz = payloadLen + totalHdrSz; // Build and return the shared buffer eProtocolType pt = MapQMIServiceToProtocol( serviceType, bTX ); sSharedBuffer * pBuf = new sSharedBuffer( sz, pBuffer, pt ); return pBuf; } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (IsQMIProtocol( pt ) == false) { mbValid = bRC; return bRC; } const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szContentHdr = (ULONG)sizeof(sQMIRawContentHeader); // Must be enough space for both headers ULONG sz = GetSize(); if (sz < szTransHdr + szMsgHdr) { mbValid = bRC; return bRC; } const BYTE * pBuffer = GetBuffer(); // Obtain transaction header const sQMIServiceRawTransactionHeader * pTransHdr = 0; pTransHdr = (const sQMIServiceRawTransactionHeader *)pBuffer; pBuffer += szTransHdr; // This is required to be 0 if (pTransHdr->mCompound != 0) { mbValid = bRC; return bRC; } // These are mutually exclusive if (pTransHdr->mIndication == 1 && pTransHdr->mResponse == 1) { mbValid = bRC; return bRC; } // Requests/responses required valid transaction IDs if ( (pTransHdr->mIndication == 0) && (pTransHdr->mTransactionID == (WORD)INVALID_QMI_TRANSACTION_ID) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 1 || pTransHdr->mIndication == 1) && (IsQMIProtocolRX( pt ) == false) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 0 && pTransHdr->mIndication == 0) && (IsQMIProtocolTX( pt ) == false) ) { mbValid = bRC; return bRC; } // Obtain message header const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (const sQMIRawMessageHeader *)pBuffer; pBuffer += szMsgHdr; // Validate reported length if (sz != ((ULONG)pMsgHdr->mLength + szTransHdr + szMsgHdr)) { mbValid = bRC; return bRC; } // Extract content TLV structures ULONG contentProcessed = 0; ULONG contentSz = (ULONG)pMsgHdr->mLength; while (contentProcessed < contentSz) { const sQMIRawContentHeader * pContent = 0; pContent = (const sQMIRawContentHeader *)pBuffer; ULONG tlvLen = szContentHdr + pContent->mLength; contentProcessed += tlvLen; if (contentProcessed <= contentSz) { mContents[(ULONG)pContent->mTypeID] = pContent; } else { mContents.clear(); mbValid = bRC; return bRC; } pBuffer += tlvLen; } // Validate TLV reported lengths if (contentProcessed != contentSz) { mbValid = bRC; return bRC; } // Success! bRC = true; mbValid = bRC; return mbValid; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/QMIBuffers.h000066400000000000000000000275541455567757300233130ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.h DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMUXHeader sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIEnum.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QMI maximum buffer size (cannot be larger than MAX_SHARED_BUFFER_SIZE) const ULONG QMI_MAX_BUFFER_SIZE = MAX_SHARED_BUFFER_SIZE; // Content ID for mandatory result TLV const ULONG QMI_TLV_ID_RESULT = 2; /*=========================================================================== METHOD: MapQMIServiceToProtocol (Inline Method) DESCRIPTION: Map QMI service type (eQMIService) and direction to a protocol type (eProtocolType) PARAMETERS: serviceType [ I ] - Enum value being mapped bTransmission [ I ] - Is this a transmission (TX vs. RX)? RETURN VALUE: eProtocolType ===========================================================================*/ inline eProtocolType MapQMIServiceToProtocol( eQMIService serviceType, bool bTransmission = true ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid( serviceType ) == false) { return pt; } DWORD tmp = ((DWORD)serviceType * 2) + (DWORD)ePROTOCOL_QMI_CTL_RX; if (bTransmission == true) { tmp++; } if (IsQMIProtocol( (eProtocolType)tmp ) == true) { pt = (eProtocolType)tmp; } return pt; }; /*=========================================================================== METHOD: MapProtocolToQMIService (Inline Method) DESCRIPTION: Map protocol type (eProtocolType) to QMI service type (eQMIService) PARAMETERS: protocolType [ I ] - Enum value being mapped RETURN VALUE: bool ===========================================================================*/ inline eQMIService MapProtocolToQMIService( eProtocolType protocolType ) { eQMIService st = eQMI_SVC_ENUM_BEGIN; if (IsQMIProtocol( protocolType ) == false) { return st; } DWORD tmp = ((DWORD)protocolType - (DWORD)ePROTOCOL_QMI_CTL_RX) / 2; if (IsValid( (eQMIService)tmp ) == true) { st = (eQMIService)tmp; } return st; }; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQMUXHeader // Struct to represent a QMUX transaction header (raw) /*=========================================================================*/ struct sQMUXHeader { public: WORD mLength; BYTE mFlags; BYTE mServiceType; BYTE mClientID; }; /*=========================================================================*/ // Struct sQMIControlRawTransactionHeader // Struct to represent a QMI control transaction header (raw) /*=========================================================================*/ struct sQMIControlRawTransactionHeader { public: BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 6; BYTE mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIServiceRawTransactionHeader // Struct to represent a QMI service transaction header (raw) /*=========================================================================*/ struct sQMIServiceRawTransactionHeader { public: BYTE mCompound : 1; // Is this a compound transaction? BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 5; WORD mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIRawMessageHeader // Struct to represent a QMI (control/service) message header (raw) /*=========================================================================*/ struct sQMIRawMessageHeader { public: WORD mMessageID; // Message ID WORD mLength; // Length of message (not including this header) }; /*=========================================================================*/ // Struct sQMIRawContentHeader // Struct to represent a QMI (control/service) content // (i.e Type/Length/Value, TLV) header (raw) /*=========================================================================*/ struct sQMIRawContentHeader { public: BYTE mTypeID; // Content type ID WORD mLength; // Content length (not including this header) }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQMIServiceBuffer // Struct to represent a QMI service channel request/response/indication // (shared buffer) /*=========================================================================*/ struct sQMIServiceBuffer : public sProtocolBuffer { public: // Constructor sQMIServiceBuffer( sSharedBuffer * pBuffer ); // Destructor virtual ~sQMIServiceBuffer(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bRequest = (pHdr->mResponse == 0 && pHdr->mIndication == 0); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bResponse = (pHdr->mResponse == 1); } return bResponse; }; // (Inline) Is this an indication? bool IsIndication() const { bool bInd = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bInd = (pHdr->mIndication == 1); } return bInd; }; // (Inline) Return raw header const sQMIServiceRawTransactionHeader * GetHeader() const { const sQMIServiceRawTransactionHeader * pHdr = 0; if (IsValid() == true) { pHdr = (const sQMIServiceRawTransactionHeader *)GetBuffer(); } return pHdr; }; // (Inline) Return the message ID ULONG GetMessageID() const { ULONG id = (ULONG)0xffffffff; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; id = pMsgHdr->mMessageID; } return id; }; // (Inline) Return the transaction ID WORD GetTransactionID() const { WORD id = (WORD)INVALID_QMI_TRANSACTION_ID; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { id = pHdr->mTransactionID; } return id; }; // (Inline) Return raw content array const sQMIRawContentHeader * GetRawContents( ULONG & contentLen ) const { // Assume failure ULONG len = 0; const sQMIRawContentHeader * pRaw = 0; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; len = pMsgHdr->mLength; pMsgHdr++; if (len > 0) { pRaw = (const sQMIRawContentHeader *)pMsgHdr; } } contentLen = len; return pRaw; }; // (Inline) Return content structures std::map GetContents() const { return mContents; }; // Return contents of mandatory result content bool GetResult( ULONG & returnCode, ULONG & errorCode ); // Build a QMI request/response/indication static sSharedBuffer * BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse = false, bool bIndication = false, const BYTE * pData = 0, ULONG dataLen = 0 ); protected: // QMI protocol server has to be able to set the transaction ID friend class cQMIProtocolServer; // Set the transaction ID void SetTransactionID( WORD tid ) const { if (tid == (WORD)INVALID_QMI_TRANSACTION_ID || IsValid() == false) { return; } sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)GetHeader(); if (pHdr != 0) { pHdr->mTransactionID = tid; } }; // Is this QMI request/response/indication packet valid? virtual bool Validate(); /* Content TLV structures (indexed by type ID) */ std::map mContents; private: // Prevent 'upcopying' sQMIServiceBuffer( const sProtocolBuffer & ); sQMIServiceBuffer & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/QMIEnum.h000066400000000000000000003067441455567757300226240ustar00rootroot00000000000000/*=========================================================================== FILE: QMIEnum.h DESCRIPTION: QMI protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQMIService eQMIMessageCTL eQMIMessageWDS eQMIMessageDMS eQMIMessageNAS eQMIMessageWMS eQMIMessagePDS eQMIMessageAUTH eQMIMessageAT eQMIMessageVoice eQMIMessageUIM eQMIMessagePBM eQMIMessageSAR eQMIMessageRMTFS eQMIMessageWDA eQMIMessageQCMAP eQMIMessageCOEX eQMIMessagePDC eQMIMessageSTX eQMIMessageRFRPE eQMIMessageCAT eQMIMessageRMS eQMIMessageOMA eQMIResultCode eQMIErrorCode eQMICallEndReason eIPAddressType eSMSMessageMode Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid QMI transaction ID const ULONG INVALID_QMI_TRANSACTION_ID = 0; // QMI DMS PRL size constants const ULONG QMI_DMS_MAX_PRL_SIZE = 16384; const ULONG QMI_DMS_MAX_PRL_BLOCK = 256; /*=========================================================================*/ // eQMIService Enumeration // QMI Service Type Enumeration /*=========================================================================*/ enum eQMIService { eQMI_SVC_ENUM_BEGIN = -1, eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_QCHAT, // 013 QCHAT Service eQMI_SVC_RMTFS, // 014 Remote file system service eQMI_SVC_TEST, // 015 Test service eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_IMSS, // 018 IMS settings service eQMI_SVC_ADC, // 019 Analog to digital converter driver service eQMI_SVC_CSD, // 020 Core sound driver service eQMI_SVC_MFS, // 021 Modem embedded file system service eQMI_SVC_TIME, // 022 Time service eQMI_SVC_TS, // 023 Thermal sensors service eQMI_SVC_TMD, // 024 Thermal mitigation device service eQMI_SVC_SAP, // 025 Service access proxy service eQMI_SVC_WDA, // 026 Wireless data administrative service eQMI_SVC_TSYNC, // 027 TSYNC control service eQMI_SVC_RFSA, // 028 Remote file system access service eQMI_SVC_CSVT, // 029 Circuit switched videotelephony service eQMI_SVC_QCMAP, // 030 Qualcomm mobile access point service eQMI_SVC_IMSP, // 031 IMS presence service eQMI_SVC_IMSVT, // 032 IMS videotelephony service eQMI_SVC_IMSA, // 033 IMS application service eQMI_SVC_COEX, // 034 Coexistence service eQMI_SVC_RESERVED_35, // 035 Reserved eQMI_SVC_PDC, // 036 Persistent device configuration service eQMI_SVC_RESERVED_37, // 037 Reserved eQMI_SVC_STX, // 038 Simultaneous transmit service eQMI_SVC_BIT, // 039 Bearer independent transport service eQMI_SVC_IMSRTP, // 040 IMS RTP service eQMI_SVC_RFRPE, // 041 RF radiated performance enhancement service eQMI_SVC_DSD, // 042 Data system determination service eQMI_SVC_SSCTL, // 043 Subsystem control service eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service eQMI_SVC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIService validity check PARAMETERS: svc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIService svc ) { bool retVal = false; if ( (svc > eQMI_SVC_ENUM_BEGIN && svc <= eQMI_SVC_SSCTL) || (svc >= eQMI_SVC_CAT && svc < eQMI_SVC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCTL Enumeration // QMI Control Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCTL { eQMI_CTL_ENUM_BEGIN = -1, eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode eQMI_CTL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCTL validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCTL msgID ) { bool retVal = false; if (msgID >= eQMI_CTL_SET_INSTANCE_ID && msgID < eQMI_CTL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDS Enumeration // QMI WDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDS { eQMI_WDS_ENUM_BEGIN = -1, eQMI_WDS_RESET, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_SET_INDICATION, // 003 Set indication conditions eQMI_WDS_GET_MESSAGES = 30, // 030 Get supported messages eQMI_WDS_GET_FIELDS, // 031 Get supported fields eQMI_WDS_START_NET, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_FMC_TUNNEL, // 078 Set FMC tunnel parameters eQMI_WDS_CLEAR_FMC_TUNNEL, // 079 Clear FMC tunnel parameters eQMI_WDS_GET_FMC_TUNNEL, // 080 Get FMC tunnel parameters eQMI_WDS_SET_AUTOCONNECT, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_TMGI_ACTIVATE, // 101 Activate eMBMS TMGI eQMI_WDS_TMGI_ACT_IND = 101, // 101 eMBMS TMGI activate indication eQMI_WDS_TMGI_DEACTIVATE, // 102 Activate eMBMS TMGI eQMI_WDS_TMGI_DEACT_IND = 102, // 102 eMBMS TMGI activate indication eQMI_WDS_TMGI_LIST_QUERY, // 103 Query for eMBMS TMGI list eQMI_WDS_TMGI_LIST_IND, // 104 eMBMS TMGI list query indication eQMI_WDS_GET_PREF_DATA_SYS, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_GET_CURR_DATA_SYS, // 107 Get current data systems status eQMI_WDS_GET_PDN_THROTTLE, // 108 Get PDN throttle info eQMI_WDS_GET_LTE_ATTACH = 133, // 133 Get LTE attach parameters eQMI_WDS_RESET_PKT_STATS, // 134 Reset packet statistics eQMI_WDS_GET_FLOW_CTRL_STATUS, // 135 Get flow control status eQMI_WDS_TMGI_SWITCH, // 136 Activate/deactivate eMBMS TMGI eQMI_WDS_TMGI_SWITCH_IND = 136,// 136 eMBMS TMGI activate/deactivate ind eQMI_WDS_BIND_DATA_PORT, // 137 Bind data port eQMI_WDS_SET_PDN_FILTER, // 138 Set additional PDN filter eQMI_WDS_REMOVE_PDN_FILTER, // 139 Remove PDN filter eQMI_WDS_EX_IP_CFG_IND, // 140 Extend IP config indication eQMI_WDS_CFG_REV_IP_CONN_EVT, // 141 Configure reverse IP connection event eQMI_WDS_REV_IP_TRANSPORT_IND, // 142 Reverse IP transport connection ind eQMI_WDS_GET_IPSEC_SA_CFG, // 143 Get IPSec static SA config eQMI_WDS_REV_IP_TPORT_CFG_DONE,// 144 Reverse IP transport config complete eQMI_WDS_GET_EX_DATA_BEARER, // 145 Get extended data bearer eQMI_WDS_GET_LTE_MAX_ATTACH, // 146 Get LTE maximum attach PDN number eQMI_WDS_SET_LTE_ATTACH_PDNS, // 147 Set LTE attach PDN list eQMI_WDS_GET_LTE_ATTACH_PDNS, // 148 Set LTE attach PDN list eQMI_WDS_LTE_ATTACH_PDNS_IND, // 149 LTE attach PDN list indication eQMI_WDS_SET_LTE_DATA_RETRY, // 150 Set LTE data retry eQMI_WDS_GET_LTE_DATA_RETRY, // 151 Get LTE data retry eQMI_WDS_SET_LTE_ATTACH_TYPE, // 152 Set LTE attach type eQMI_WDS_GET_LTE_ATTACH_TYPE, // 153 Get LTE attach type eQMI_WDS_REV_IP_FILTER_IND, // 154 Reverse IP transport filter ind eQMI_WDS_HANDOFF_INFO_IND, // 155 Handoff info indication eQMI_WDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDS msgID ) { bool retVal = false; if ( (msgID > eQMI_WDS_ENUM_BEGIN && msgID <= eQMI_WDS_SET_INDICATION) || (msgID >= eQMI_WDS_GET_MESSAGES && msgID <= eQMI_WDS_GET_DORMANCY) || (msgID >= eQMI_WDS_GET_AUTOCONNECT && msgID <= eQMI_WDS_MODEM_INFO_IND) || (msgID >= eQMI_WDS_GET_ACTIVE_MIP && msgID <= eQMI_WDS_GET_PDN_THROTTLE) || (msgID >= eQMI_WDS_GET_LTE_ATTACH && msgID < eQMI_WDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageDMS Enumeration // QMI DMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageDMS { eQMI_DMS_ENUM_BEGIN = -1, eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_MESSAGES = 30, // 30 Get supported messages eQMI_DMS_GET_FIELDS, // 31 Get supported fields eQMI_DMS_GET_CAPS, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_GET_CURRENT_PRL_INFO,// 83 Get current PRL info eQMI_DMS_BIND_SUBSCRIPTION, // 84 Bind subscription eQMI_DMS_GET_SUBSCRIPTION, // 85 Get bound subscription eQMI_DMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageDMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageDMS msgID ) { bool retVal = false; if ( (msgID > eQMI_DMS_ENUM_BEGIN && msgID <= eQMI_DMS_EVENT_IND) || (msgID >= eQMI_DMS_GET_MESSAGES && msgID < eQMI_DMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageNAS Enumeration // QMI NAS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageNAS { eQMI_NAS_ENUM_BEGIN = -1, eQMI_NAS_RESET, // 000 Reset NAS service state variables eQMI_NAS_ABORT, // 001 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 002 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 002 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 003 Set NAS registration report conditions eQMI_NAS_GET_MESSAGES = 30, // 030 Get supported messages eQMI_NAS_GET_FIELDS, // 031 Get supported fields eQMI_NAS_GET_RSSI, // 032 Get the signal strength eQMI_NAS_SCAN_NETS, // 033 Scan for visible network eQMI_NAS_REGISTER_NET, // 034 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 035 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 036 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 036 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 037 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 038 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 039 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 040 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 041 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 042 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 043 Get the technology preference eQMI_NAS_GET_ACCOLC, // 044 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 045 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 046 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 047 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 048 Set various network parameters eQMI_NAS_GET_RF_INFO, // 049 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 050 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 051 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 052 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 052 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 055 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 056 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 056 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 057 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 058 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 059 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 060 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 061 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 062 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 063 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 064 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 065 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 066 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 067 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 068 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 069 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 070 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 071 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 072 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 073 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 075 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 076 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 077 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 078 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 079 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 080 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 081 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 082 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 083 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 084 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 085 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 086 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 087 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 088 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 089 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 090 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 091 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 092 Get dual standby preference eQMI_NAS_DETACH_LTE, // 093 Detach the current LTE system eQMI_NAS_BLOCK_LTE_PLMN, // 094 Block LTE PLMN eQMI_NAS_UNBLOCK_LTE_PLMN, // 095 Unblock LTE PLMN eQMI_NAS_RESET_LTE_PLMN_BLK, // 096 Reset LTE PLMN blocking eQMI_NAS_CUR_PLMN_NAME_IND, // 097 Current PLMN name indication eQMI_NAS_CONFIG_EMBMS, // 098 Configure eMBMS eQMI_NAS_GET_EMBMS_STATUS, // 099 Get eMBMS status eQMI_NAS_EMBMS_STATUS_IND, // 100 eMBMS status indication eQMI_NAS_GET_CDMA_POS_INFO, // 101 Get CDMA position info eQMI_NAS_RF_BAND_INFO_IND, // 102 RF band info indication eQMI_NAS_FORCE_NET_SEARCH, // 103 Force network search eQMI_NAS_NET_REJECT_IND, // 104 Network reject indication eQMI_NAS_GET_MANAGED_ROAM, // 105 Get managed roaming configuration eQMI_NAS_RTRE_CONFIG_IND, // 106 RTRE configuration indication eQMI_NAS_GET_CENTRALIZED_EOM, // 107 Get centralized EONS support eQMI_NAS_CFG_SIGNAL_INFO2, // 108 Configure signal info report (V2) eQMI_NAS_GET_TDS_CELL_INFO, // 109 Get TD-SCDMA cell/position info eQMI_NAS_SET_HPLMN_IRAT_TIMER,// 110 Set HPLMN IRAT search timer eQMI_NAS_GET_EMBMS_SIQ_QUAL, // 111 Get eMBMS signal quality eQMI_NAS_LIMIT_SYS_INFO, // 112 Limit system info indications eQMI_NAS_GET_SYS_INFO_LIMITS, // 113 Get system info indication limits eQMI_NAS_UPDATE_IMS_STATUS, // 114 Update IMS status eQMI_NAS_GET_IMS_PREFERENCE, // 115 Get IMS preference status eQMI_NAS_IMS_PREFERENCE_IND, // 116 IMS preference status indication eQMI_NAS_CFG_IND_PLMN_NAME, // 117 Configure indication for PLMN name eQMI_NAS_CDMA_AVOID_SYSTEM, // 118 CDMA avoid system eQMI_NAS_GET_AVOIDED_SYSTEMS, // 119 Get CDMA avoided system list eQMI_NAS_SET_HPLMN_SRCH_TIMER,// 120 Set HPLMN search timer eQMI_NAS_GET_HPLMN_SRCH_TIMER,// 121 Get HPLMN search timer eQMI_NAS_SET_E911_STATE, // 122 Set E911 state eQMI_NAS_E911_STATE_IND, // 123 E911 state ready indication eQMI_NAS_GET_SUBS_INFO, // 124 Get subscription info eQMI_NAS_GET_NET_TIME, // 125 Get network time eQMI_NAS_GET_LTE_SIB16_TIME, // 126 Get LTE SIB16 network time eQMI_NAS_LTE_SIB16_TIME_IND, // 127 LTE SIB16 network time indication eQMI_NAS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageNAS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageNAS msgID ) { bool retVal = false; if ( (msgID > eQMI_NAS_ENUM_BEGIN && msgID <= eQMI_NAS_SET_REG_EVENT) || (msgID >= eQMI_NAS_GET_MESSAGES && msgID <= eQMI_NAS_SYS_SELECT_IND) || (msgID >= eQMI_NAS_SET_DDTM_PREF && msgID <= eQMI_NAS_GET_MODE_PREF) || (msgID >= eQMI_NAS_SET_DSB_PREF && msgID < eQMI_NAS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWMS Enumeration // QMI WMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWMS { eQMI_WMS_ENUM_BEGIN = -1, eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_GET_MESSAGES = 30, // 030 Get supported messages eQMI_WMS_GET_FIELDS, // 031 Get supported fields eQMI_WMS_RAW_SEND, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_GET_DOMAIN_PREF_CFG, // 81 Get domain pref config eQMI_WMS_SET_DOMAIN_PREF_CFG, // 82 Set domain pref config eQMI_WMS_GET_RETRY_PERIOD, // 83 Get retry period eQMI_WMS_GET_RETRY_INTERVAL, // 84 Get retry interval eQMI_WMS_GET_DC_DISCO_TIMER, // 85 Get DC auto-disconnect timer eQMI_WMS_GET_MEMORY_STATUS, // 86 Get memory storage status eQMI_WMS_GET_PRIMARY_CLIENT, // 87 Get primary cleint eQMI_WMS_GET_SUBSCR_BINDING, // 88 Get client subscription binding eQMI_WMS_ASYNC_RAW_SEND, // 89 Asynchronously send a raw message eQMI_WMS_ASYNC_RAW_SEND_IND = 89,// 89 Asynchronous send indication eQMI_WMS_ASYNC_SEND_ACK, // 90 Asynchronously send ACK eQMI_WMS_ASYNC_SEND_ACK_IND = 90,// 90 Asynchronou send ACK indication eQMI_WMS_ASYNC_MEMORY_SEND, // 91 Async send msg from memory store eQMI_WMS_ASYNC_MEM_SEND_IND = 91,// 91 Async memory store send indication eQMI_WMS_GET_SERVICE_READY, // 92 Get service ready status eQMI_WMS_SERVICE_READY_IND, // 93 Service ready status indication eQMI_WMS_BC_CONFIG_IND, // 94 Broadcast config indication eQMI_WMS_SET_MSG_WAITING, // 95 Set message waiting info eQMI_WMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWMS msgID ) { bool retVal = false; if ( (msgID > eQMI_WMS_ENUM_BEGIN && msgID <= eQMI_WMS_EVENT_IND) || (msgID >= eQMI_WMS_GET_MESSAGES && msgID <= eQMI_WMS_DELETE) || (msgID >= eQMI_WMS_GET_MSG_PROTOCOL && msgID < eQMI_WMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDS Enumeration // QMI PDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDS { eQMI_PDS_ENUM_BEGIN = -1, eQMI_PDS_RESET, // 000 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 001 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 001 PDS report indication eQMI_PDS_GET_STATE = 32, // 032 Return PDS service state eQMI_PDS_STATE_IND = 32, // 032 PDS service state indication eQMI_PDS_SET_STATE, // 033 Set PDS service state eQMI_PDS_START_SESSION, // 034 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 035 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 036 Manual tracking session position eQMI_PDS_END_SESSION, // 037 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 038 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 039 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 040 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 041 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 042 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 043 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 044 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 045 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 046 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 047 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 048 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 049 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 050 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 051 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 052 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 053 Request single position fix eQMI_PDS_GET_VERSION, // 054 Get PDS service version eQMI_PDS_INJECT_XTRA, // 055 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 056 Inject position data eQMI_PDS_INJECT_WIFI, // 057 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 058 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 059 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 060 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 061 Inject absolute time eQMI_PDS_INJECT_EFS, // 062 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 063 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 064 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 065 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 066 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 067 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 068 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 069 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 070 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 070 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 071 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 072 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 072 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 073 Force receiver off eQMI_PDS_GET_METHODS = 80, // 080 Get GPS position methods state eQMI_PDS_SET_METHODS, // 081 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 082 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 083 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 084 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 085 Set sensor config eQMI_PDS_GET_NAV_CFG, // 086 Get navigation config eQMI_PDS_SET_NAV_CFG, // 087 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 090 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 091 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 091 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 092 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 093 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 094 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 095 Set cell database control eQMI_PDS_READY_IND, // 096 Ready indication eQMI_PDS_INJECT_MOTION_DATA, // 097 Inject motion data eQMI_PDS_SET_GNSS_ERR_REPORT, // 098 Set GNSS error recovery report eQMI_PDS_GNSS_ERR_IND = 98, // 098 GNSS error recovery report indication eQMI_PDS_RESET_SERVICE, // 099 Reset location service eQMI_PDS_INJECT_TEST_DATA, // 100 Inject test data eQMI_PDS_SET_GNSS_RF_CFG, // 101 Set GNSS RF config eQMI_PDS_INJECT_COG_DATA, // 102 Inject course over ground data eQMI_PDS_INJECT_SUPL_CERT, // 103 Inject SUPL certificate eQMI_PDS_DELETE_SUPL_CERT , // 104 Delete SUPL certificate eQMI_PDS_GET_IS801_OVER_SUPL, // 105 Get IS-801 Over SUPL indicator eQMI_PDS_SET_IS801_OVER_SUPL, // 106 Set IS-801 Over SUPL indicator eQMI_PDS_GET_SUPL_HASH_ALG, // 107 Get SUPL hash algorithm eQMI_PDS_SET_SUPL_HASH_ALG, // 108 Set SUPL hash algorithm eQMI_PDS_GET_SUPL_MAX_VERSION, // 109 Get SUPL maximum version eQMI_PDS_SET_SUPL_MAX_VERSION, // 110 Set SUPL maximum version eQMI_PDS_GET_SUPL_SECURITY, // 111 Get SUPL security eQMI_PDS_SET_SUPL_SECURITY, // 112 Set SUPL security eQMI_PDS_GET_SUPL_TLS_VERSION, // 113 Get SUPL TLS version eQMI_PDS_SET_SUPL_TLS_VERSION, // 114 Set SUPL TLS version eQMI_PDS_GET_AGNSS_POS_MODES, // 115 Get AGNSS positioning modes eQMI_PDS_SET_AGNSS_POS_MODES, // 116 Set AGNSS positioning modes eQMI_PDS_GET_EMERGENCY_PROTO, // 117 Get emergency protocol config eQMI_PDS_SET_EMERGENCY_PROTO, // 118 Set emergency protocol config eQMI_PDS_GET_APN_PROFILES, // 119 Get APN profiles eQMI_PDS_SET_APN_PROFILES, // 120 Set APN profiles eQMI_PDS_GET_HOME_SUPL_ADDR, // 121 Get home SUPL address eQMI_PDS_SET_HOME_SUPL_ADDR, // 122 Set home SUPL address eQMI_PDS_INJECT_VEHICLE_DATA, // 123 Inject vehicle sensor data eQMI_PDS_INJECT_PEDO_DATA, // 124 Inject pedometer data eQMI_PDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDS msgID ) { bool retVal = false; if ( (msgID > eQMI_PDS_ENUM_BEGIN && msgID <= eQMI_PDS_EVENT_IND) || (msgID >= eQMI_PDS_GET_STATE && msgID <= eQMI_PDS_FORCE_RECEIVER_OFF) || (msgID >= eQMI_PDS_GET_METHODS && msgID <= eQMI_PDS_SET_NAV_CFG) || (msgID >= eQMI_PDS_SET_WLAN_BLANK && msgID < eQMI_PDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAUTH Enumeration // QMI Authentication Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAUTH { eQMI_AUTH_ENUM_BEGIN = -1, eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND, // 38 AKA algorithm result indication eQMI_AUTH_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAUTH validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAUTH msgID ) { bool retVal = false; if (msgID >= eQMI_AUTH_START_EAP && msgID < eQMI_AUTH_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAT Enumeration // QMI AT Command Processor Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAT { eQMI_AT_ENUM_BEGIN = -1, eQMI_AT_RESET, // 00 Reset AT service state variables eQMI_AT_REG_COMMANDS = 32, // 32 Register AT commands to be forwarded eQMI_AT_COMMAND_IND, // 33 AT command indication eQMI_AT_SEND_RESPONSE, // 34 Send the response to an AT command eQMI_AT_ABORT_IND, // 35 AT command abort indication eQMI_AT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAT msgID ) { bool retVal = false; if ( (msgID == eQMI_AT_RESET) || (msgID >= eQMI_AT_REG_COMMANDS && msgID < eQMI_AT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageVoice Enumeration // QMI Voice Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageVoice { eQMI_VOICE_ENUM_BEGIN = -1, eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_GET_MESSAGES = 30, // 30 Get supported messages eQMI_VOICE_GET_FIELDS, // 31 Get supported fields eQMI_VOICE_CALL_ORIGINATE, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls eQMI_VOICE_ALS_GET_LINE_SW, // 79 ALS get line switching eQMI_VOICE_ALS_GET_LINE_SEL, // 80 ALS get selected line eQMI_VOICE_MODIFIED_IND, // 81 Call modified indication eQMI_VOICE_MODIFY_ACCEPT_IND, // 82 Call modify accept indication eQMI_VOICE_SPEECH_CODEC_IND, // 83 Speech codec info indication eQMI_VOICE_HANDOVER_IND, // 84 Handover indication eQMI_VOICE_CONFERENCE_INFO_IND, // 85 Conference info indication eQMI_VOICE_CONFERENCE_JOIN_IND, // 86 Conference join indication eQMI_VOICE_CONFERENCE_UPDATE_IND, // 87 Conference update indication eQMI_VOICE_EXT_BURST_TYPE_IND, // 88 Extended burst type indication eQMI_VOICE_MT_PAGE_MISS_IND, // 89 MT page miss indication eQMI_VOICE_CC_RESULT_INFO_IND, // 90 Call control result info indication eQMI_VOICE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageVoice validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageVoice msgID ) { bool retVal = false; if ( (msgID == eQMI_VOICE_INDICATION_REG) || (msgID >= eQMI_VOICE_GET_MESSAGES && msgID <= eQMI_VOICE_CALL_ANSWER) || (msgID >= eQMI_VOICE_GET_CALL_INFO && msgID <= eQMI_VOICE_GET_ALL_STATUS) || (msgID >= eQMI_VOICE_MANAGE_CALLS && msgID < eQMI_VOICE_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageUIM Enumeration // QMI UIM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageUIM { eQMI_UIM_ENUM_BEGIN = -1, eQMI_UIM_RESET, // 00 Reset eQMI_UIM_GET_MESSAGES = 30, // 30 Get supported messages eQMI_UIM_GET_FIELDS, // 31 Get supported fields eQMI_UIM_READ_TRANSPARENT, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SEND_ADPU_IND = 59, // 59 Send ADPU indication eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR eQMI_UIM_SESSION_CLOSED_IND, // 67 Session closed indication eQMI_UIM_REGISTER_REFRESH_ALL, // 68 Register for all refresh eQMI_UIM_SET_FILE_STATUS, // 69 Set file status eQMI_UIM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageUIM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageUIM msgID ) { bool retVal = false; if ( (msgID == eQMI_UIM_RESET) || (msgID >= eQMI_UIM_GET_MESSAGES && msgID < eQMI_UIM_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePBM Enumeration // QMI PBM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePBM { eQMI_PBM_ENUM_BEGIN = -1, eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_GET_SUBSCRIPTION, // 27 Get subscription client is bound to eQMI_PBM_SET_CAPS_READ_OP, // 28 ADN set capabilities read operation eQMI_PBM_SET_CAPS_READ_IND = 28, // 28 ADN set caps read op indication eQMI_PBM_EX_READ_RECORDS, // 29 Read phonebook records eQMI_PBM_EX_READ_RECORD_IND = 29,// 29 Read phonebook record indication eQMI_PBM_EX_WRITE_RECORD, // 30 Add/modify a phonebook record eQMI_PBM_EX_SEARCH_RECORDS, // 31 Search phonebook records eQMI_PBM_EX_READ_ALL_HIDDEN_RECS,// 32 Read all hidden phonebook records eQMI_PBM_SIM_INIT_DONE_IND, // 33 SIM initialization done indication eQMI_PBM_READ_UNDC_RECS, // 34 Read undecoded phonebook records eQMI_PBM_READ_UNDC_RECS_IND = 34,// 34 Read undecoded phonebook record ind eQMI_PBM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePBM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePBM msgID ) { bool retVal = false; if (msgID >= eQMI_PBM_INDICATION_REG && msgID < eQMI_PBM_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageLOC Enumeration // QMI LOC Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageLOC { eQMI_LOC_ENUM_BEGIN = -1, eQMI_LOC_GET_MESSAGES = 30, // 030 Get supported messages eQMI_LOC_GET_FIELDS, // 031 Get supported fields eQMI_LOC_CLIENT_REVISION, // 032 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 033 Register for events/indications eQMI_LOC_START, // 034 Start GPS session eQMI_LOC_STOP, // 035 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 036 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 037 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 038 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 039 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 040 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 041 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 042 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 043 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 044 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 045 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 046 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 047 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 048 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 049 Server connection req indication eQMI_LOC_GET_REV_REQ, // 050 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 050 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 051 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 051 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 052 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 052 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 053 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 053 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 054 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 054 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 055 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 055 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 056 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 056 Inject UTC time indication eQMI_LOC_INJECT_POS, // 057 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 057 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 058 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 058 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 059 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 059 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 060 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 060 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 061 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 061 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 062 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 062 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 063 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 063 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 064 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 064 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 065 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 065 Get low power mode config indication eQMI_LOC_SET_SERVER, // 066 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 066 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 067 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 067 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 068 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 068 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 069 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 069 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 070 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 070 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 071 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 071 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 072 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 072 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 073 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 073 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 074 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 074 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 075 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 075 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 076 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 076 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 077 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 077 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 078 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 078 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 079 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 079 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 080 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 080 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 081 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 081 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 082 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 082 Get external power config indication eQMI_LOC_INFORM_CONN, // 083 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 083 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 084 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 084 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 085 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 085 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 086 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 086 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 087 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 087 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 088 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 088 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 089 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 089 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 090 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 090 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 091 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 091 Get sensor performance control ind eQMI_LOC_INJ_SUPL_CERT, // 092 Inject SUPL certificate eQMI_LOC_INJ_SUPL_CERT_IND = 92, // 092 Inject SUPL certificate indication eQMI_LOC_DEL_SUPL_CERT, // 093 Delete SUPL certificate eQMI_LOC_DEL_SUPL_CERT_IND = 93, // 093 Delete SUPL certificate indication eQMI_LOC_SET_ENGINE_CFG, // 094 Set position engine config eQMI_LOC_SET_ENGINE_CFG_IND = 94,// 094 Set position engine config ind eQMI_LOC_GET_ENGINE_CFG, // 095 Get position engine config eQMI_LOC_GET_ENGINE_CFG_IND = 95,// 095 Get position engine config ind eQMI_LOC_GEOFENCE_NOTIF_IND, // 096 Geofence notification indication eQMI_LOC_GEOFENCE_ALERT_IND, // 097 Geofence alert indication eQMI_LOC_GEOFENCE_BREACH_IND, // 098 Geofence breach indication eQMI_LOC_ADD_GEOFENCE, // 099 Add circular geofence eQMI_LOC_ADD_GEOFENCE_IND = 99, // 099 Add circular geofence indication eQMI_LOC_DEL_GEOFENCE, // 100 Delete geofence eQMI_LOC_DEL_GEOFENCE_IND = 100, // 100 Delete geofence indication eQMI_LOC_QRY_GEOFENCE, // 101 Query geofence eQMI_LOC_QRY_GEOFENCE_IND = 101, // 101 Query geofence indication eQMI_LOC_EDIT_GEOFENCE, // 102 Edit geofence eQMI_LOC_EDIT_GEOFENCE_IND = 102,// 102 Edit geofence indication eQMI_LOC_GET_BEST_POS, // 103 Get best available position eQMI_LOC_GET_BEST_POS_IND = 103, // 103 Get best available position ind eQMI_LOC_INJ_MOTION, // 104 Inject motion data eQMI_LOC_INJ_MOTION_IND = 104, // 104 Inject motion data indication eQMI_LOC_GET_NI_GF_IDS, // 105 Get NI geofence ID list eQMI_LOC_GET_NI_GF_IDS_IND = 105,// 105 Get NI geofence ID list indication eQMI_LOC_INJ_GSM_CELL, // 106 Inject GSM cell info eQMI_LOC_INJ_GSM_CELL_IND = 106, // 106 Inject GSM cell info indication eQMI_LOC_INJ_NI_MSG, // 107 Inject network initiated message eQMI_LOC_INJ_NI_MSG_IND = 107, // 107 Inject NI message indication eQMI_LOC_WWAN_OOS, // 108 Notify WWAN is now OOS eQMI_LOC_WWAN_OOS_IND = 108, // 108 Notify WWAN is now OOS indication eQMI_PEDOMETER_CTRL_IND, // 109 Pedometer control indication eQMI_MOTION_DATA_CTRL_IND, // 110 Motion data control indication eQMI_LOC_INJ_PEDOMETER, // 111 Inject pedometer data eQMI_LOC_INJ_PEDOMETER_IND = 111,// 111 Inject pedometer data indication eQMI_LOC_INJ_WCDMA_CI, // 112 Inject WCDMA cell info eQMI_LOC_INJ_WCDMA_CI_IND = 112, // 112 Inject WCDMA cell info indication eQMI_LOC_INJ_TDSCDMA, // 113 Inject TD-SCDMA cell info eQMI_LOC_INJ_TDSCDMA_IND = 113, // 113 Inject TD-SCDMA cell info indication eQMI_LOC_INJ_SUBS_ID, // 114 Inject subscriber ID eQMI_LOC_INJ_SUBS_ID_IND = 114, // 114 Inject subscriber ID indication eQMI_LOC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageLOC validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageLOC msgID ) { bool retVal = false; if (msgID >= eQMI_LOC_GET_MESSAGES && msgID < eQMI_LOC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageSAR Enumeration // QMI SAR Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageSAR { eQMI_SAR_ENUM_BEGIN = -1, eQMI_SAR_SET_RF_SAR_STATE = 1, // 01 Set the RF SAR state eQMI_SAR_GET_RF_SAR_STATE, // 02 Get the RF SAR state eQMI_SAR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageSAR validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageSAR msgID ) { bool retVal = false; if (msgID >= eQMI_SAR_SET_RF_SAR_STATE && msgID < eQMI_SAR_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMTFS Enumeration // QMI Remote Filesystem Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMTFS { eQMI_RMTFS_ENUM_BEGIN = -1, eQMI_RMTFS_OPEN = 1, // 01 Request an open eQMI_RMTFS_CLOSE, // 02 Request a close eQMI_RMTFS_IO_VECTOR, // 03 Request an I/O vector operation eQMI_RMTFS_ALLOC_BUFFER, // 04 Allocate a buffer eQMI_RMTFS_GET_DEV_ERROR, // 05 Return device error for last request eQMI_RMTFS_FORCE_SYNC_IND, // 06 Force sync indication eQMI_RMTFS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMTFS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMTFS msgID ) { bool retVal = false; if (msgID >= eQMI_RMTFS_OPEN && msgID < eQMI_RMTFS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDA Enumeration // QMI Qualcomm Wireless Data Addministrative Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDA { eQMI_WDA_ENUM_BEGIN = -1, eQMI_WDA_GET_MESSAGES = 30, // 30 Get supported messages eQMI_WDA_GET_FIELDS, // 31 Get supported fields eQMI_WDA_SET_DATA_FORMAT, // 32 eQMI_WDA_GET_DATA_FORMAT, // 33 eQMI_WDA_ENABLE_PKT_FILTER, // 34 eQMI_WDA_DISABLE_PKT_FILTER, // 35 eQMI_WDA_GET_PKT_FILTER_STATE, // 36 eQMI_WDA_ADD_PKT_FILTER_RULE, // 37 eQMI_WDA_DELETE_PKT_FILTER_RULE, // 38 eQMI_WDA_GET_PKT_FILTER_RULE_HANDLES, // 39 eQMI_WDA_GET_PKT_FILTER_RULE, // 40 eQMI_WDA_SET_LOOPBACK_STATE, // 41 eQMI_WDA_GET_LOOPBACK_STATE, // 42 eQMI_WDA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDA msgID ) { bool retVal = false; if (msgID >= eQMI_WDA_GET_MESSAGES && msgID < eQMI_WDA_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageQCMAP Enumeration // QMI Qualcomm Mobile Access Point Message ID Enumeration /*=========================================================================*/ enum eQMIMessageQCMAP { eQMI_QCMAP_ENUM_BEGIN = -1, eQMI_QCMAP_ENABLE = 32, // 32 eQMI_QCMAP_DISABLE, // 33 eQMI_QCMAP_BRING_UP_WWAN, // 34 eQMI_QCMAP_BRING_UP_WWAN_IND = 34, // 34 eQMI_QCMAP_TEAR_DOWN_WWAN, // 35 eQMI_QCMAP_TEAR_DOWN_WWAN_IND = 35, // 35 eQMI_QCMAP_GET_WWAN_STATUS, // 36 eQMI_QCMAP_GET_IPSEC_VPN_PASSTHROUGH, // 37 eQMI_QCMAP_SET_IPSEC_VPN_PASSTHROUGH, // 38 eQMI_QCMAP_GET_PPTP_VPN_PASSTHROUGH, // 39 eQMI_QCMAP_SET_PPTP_VPN_PASSTHROUGH, // 40 eQMI_QCMAP_GET_L2TP_VPN_PASSTHROUGH, // 41 eQMI_QCMAP_SET_L2TP_VPN_PASSTHROUGH, // 42 eQMI_QCMAP_GET_DYNAMIC_NAT_ENTRY_TO, // 43 eQMI_QCMAP_SET_DYNAMIC_NAT_ENTRY_TO, // 44 eQMI_QCMAP_ADD_SNAT_ENTRY, // 45 eQMI_QCMAP_DELETE_SNAT_ENTRY, // 46 eQMI_QCMAP_GET_SNAT_ENTRIES, // 47 eQMI_QCMAP_SET_DMZ, // 48 eQMI_QCMAP_DELETE_DMZ, // 49 eQMI_QCMAP_GET_DMZ, // 50 eQMI_QCMAP_GET_WWAN_CONFIG, // 51 eQMI_QCMAP_ENABLE_FIREWALL_SETTING, // 52 eQMI_QCMAP_GET_FIREWALL_SETTING, // 53 eQMI_QCMAP_DISABLE_FIREWALL_SETTING, // 54 eQMI_QCMAP_ADD_FIREWALL_CONFIG, // 55 eQMI_QCMAP_GET_FIREWALL_CONFIG, // 56 eQMI_QCMAP_DELETE_FIREWALL_CONFIG, // 57 eQMI_QCMAP_WWAN_STATUS_IND_REG, // 58 eQMI_QCMAP_STATION_MODE_ENABLE, // 59 eQMI_QCMAP_STATION_MODE_DISABLE, // 60 eQMI_QCMAP_GET_STATION_MODE, // 61 eQMI_QCMAP_WWAN_STATUS_IND, // 62 eQMI_QCMAP_ADD_EXT_FIREWALL_CONFIG, // 63 eQMI_QCMAP_GET_EXT_FIREWALL_CONFIG, // 64 eQMI_QCMAP_GET_FIREWALL_HANDLES, // 65 eQMI_QCMAP_CHANGE_NAT_TYPE, // 66 eQMI_QCMAP_GET_NAT_TYPE, // 67 eQMI_QCMAP_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageQCMAP validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageQCMAP msgID ) { bool retVal = false; if (msgID >= eQMI_QCMAP_ENABLE && msgID < eQMI_QCMAP_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCOEX Enumeration // QMI COEX Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCOEX { eQMI_COEX_ENUM_BEGIN = -1, eQMI_COEX_RESET, // 00 Reset the PDC service eQMI_COEX_REG_INDICATIONS = 32, // 32 Register for indications eQMI_COEX_WWAN_STATE_IND, // 33 WWAN state indication eQMI_COEX_GET_WWAN_STATE, // 34 Get WWAN state eQMI_COEX_SET_WLAN_STATE, // 35 Set WLAN state eQMI_COEX_GET_WLAN_SCAN_STATE, // 36 Get WLAN scan state eQMI_COEX_GET_WLAN_CONN_STATE, // 37 Get WLAN connection state eQMI_COEX_SET_POLICY, // 38 Set policy eQMI_COEX_GET_POLICY, // 39 Get policy eQMI_COEX_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCOEX validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCOEX msgID ) { bool retVal = false; if ( (msgID == eQMI_COEX_RESET) || (msgID >= eQMI_COEX_REG_INDICATIONS && msgID < eQMI_COEX_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDC Enumeration // QMI PDC Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDC { eQMI_PDC_ENUM_BEGIN = -1, eQMI_PDC_RESET, // 00 Reset the PDC service eQMI_PDC_REG_INDICATIONS = 32, // 32 Register for indications eQMI_PDC_CFG_CHANGE_IND, // 33 Config change indication eQMI_PDC_GET_CFG, // 34 Get selected config eQMI_PDC_GET_CFG_IND = 34, // 34 Get selected config indication eQMI_PDC_SET_CFG, // 35 Set selected config eQMI_PDC_SET_CFG_IND = 35, // 35 Set selected config indication eQMI_PDC_LIST_CFGS, // 36 List configs eQMI_PDC_LIST_CFGS_IND = 36, // 36 List configs indication eQMI_PDC_DEL_CFG, // 37 Delete config eQMI_PDC_DEL_CFG_IND = 37, // 37 Delete config indication eQMI_PDC_LOAD_CFG, // 38 Load config eQMI_PDC_LOAD_CFG_IND = 38, // 38 Load config indication eQMI_PDC_ACTIVATE_CFG, // 39 Activate config eQMI_PDC_ACTIVATE_CFG_IND = 39, // 39 Activate config indication eQMI_PDC_GET_CFG_INFO, // 40 Get config info eQMI_PDC_GET_CFG_INFO_IND = 40, // 40 Get config info indication eQMI_PDC_GET_CFG_LIMITS, // 41 Get config limits eQMI_PDC_GET_CFG_LIMITS_IND = 41, // 41 Get config limits indication eQMI_PDC_GET_DEF_CFG_INFO, // 42 Get default config info eQMI_PDC_GET_DEF_CFG_INFO_IND = 42, // 42 Get default config info indication eQMI_PDC_DEACTIVATE_CFG, // 43 Deactivate active config eQMI_PDC_DEACTIVATE_CFG_IND = 43, // 43 Deactivate active config ind eQMI_PDC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDC validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDC msgID ) { bool retVal = false; if ( (msgID == eQMI_PDC_RESET) || (msgID >= eQMI_PDC_REG_INDICATIONS && msgID < eQMI_PDC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageSTX Enumeration // QMI STX Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageSTX { eQMI_STX_ENUM_BEGIN = -1, eQMI_STX_TECH_TX_STATUS = 32, // 32 Technology TX status eQMI_STX_UPDATE_TX_POWER_LIMIT, // 33 Update TX power limit eQMI_STX_TX_STATE_UPDATE_IND, // 34 TX state update indication eQMI_STX_TX_STATE_CLEAR_IND, // 34 TX state clear indication eQMI_STX_SET_TECH_POWER_LUT, // 36 Set technology power LUT eQMI_STX_TX_POWER_LIMIT_IND, // 37 TX power limit state eQMI_STX_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageSTX validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageSTX msgID ) { bool retVal = false; if (msgID >= eQMI_STX_TECH_TX_STATUS && msgID < eQMI_STX_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRFRPE Enumeration // QMI RFRPE Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRFRPE { eQMI_RFRPE_ENUM_BEGIN = -1, eQMI_RFRPE_SET_RFM_SCENARIO = 32, // 32 Set RFM scenario eQMI_RFRPE_GET_RFM_SCENARIO, // 33 Get RFM scenario eQMI_RFRPE_GET_TABLE_REVISION, // 34 Get provisioned table revision eQMI_RFRPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRFRPE validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRFRPE msgID ) { bool retVal = false; if (msgID >= eQMI_RFRPE_SET_RFM_SCENARIO && msgID < eQMI_RFRPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCAT Enumeration // QMI CAT Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCAT { eQMI_CAT_ENUM_BEGIN = -1, eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_MESSAGES = 30, // 30 Get supported messages eQMI_CAT_GET_FIELDS, // 31 Get supported fields eQMI_CAT_GET_STATE, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_GET_TERMINAL_PROFILE, // 44 Get current modem terminal profile eQMI_CAT_SET_CONFIG, // 45 Set configuration eQMI_CAT_GET_CONFIG, // 46 Get configuration eQMI_CAT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCAT msgID ) { bool retVal = false; if ( (msgID > eQMI_CAT_ENUM_BEGIN && msgID <= eQMI_CAT_EVENT_IND) || (msgID >= eQMI_CAT_GET_MESSAGES && msgID < eQMI_CAT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMS Enumeration // QMI RMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMS { eQMI_RMS_ENUM_BEGIN = -1, eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE, // 33 Set SMS wake settings eQMI_RMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMS msgID ) { bool retVal = false; if ( (msgID == eQMI_RMS_RESET) || (msgID >= eQMI_RMS_GET_SMS_WAKE && msgID < eQMI_RMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageOMA Enumeration // QMI OMA-DM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageOMA { eQMI_OMA_ENUM_BEGIN = -1, eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES, // 37 Set feature settings eQMI_OMA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageOMA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageOMA msgID ) { bool retVal = false; if ( (msgID > eQMI_OMA_ENUM_BEGIN && msgID <= eQMI_OMA_EVENT_IND) || (msgID >= eQMI_OMA_START_SESSION && msgID < eQMI_OMA_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIResultCode Enumeration // QMI Result Code Enumeration /*=========================================================================*/ enum eQMIResultCode { eQMI_RC_ENUM_BEGIN = -1, eQMI_RC_SUCCESS, // 00 Success eQMI_RC_ERROR, // 01 Error eQMI_RC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIResultCode validity check PARAMETERS: rc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIResultCode rc ) { bool retVal = false; if (rc > eQMI_RC_ENUM_BEGIN && rc < eQMI_RC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIErrorCode Enumeration // QMI Error Code Enumeration /*=========================================================================*/ enum eQMIErrorCode { eQMI_ERR_ENUM_BEGIN = -1, eQMI_ERR_NONE, // 00 eQMI_ERR_MALFORMED_MSG, // 01 eQMI_ERR_NO_MEMORY, // 02 eQMI_ERR_INTERNAL, // 03 eQMI_ERR_ABORTED, // 04 eQMI_ERR_CLIENT_IDS_EXHAUSTED, // 05 eQMI_ERR_UNABORTABLE_TRANSACTION, // 06 eQMI_ERR_INVALID_CLIENT_ID, // 07 eQMI_ERR_NO_THRESHOLDS, // 08 eQMI_ERR_INVALID_HANDLE, // 09 eQMI_ERR_INVALID_PROFILE, // 10 eQMI_ERR_INVALID_PIN_ID, // 11 eQMI_ERR_INCORRECT_PIN, // 12 eQMI_ERR_NO_NETWORK_FOUND, // 13 eQMI_ERR_CALL_FAILED, // 14 eQMI_ERR_OUT_OF_CALL, // 15 eQMI_ERR_NOT_PROVISIONED, // 16 eQMI_ERR_MISSING_ARG, // 17 eQMI_ERR_18, // 18 eQMI_ERR_ARG_TOO_LONG, // 19 eQMI_ERR_20, // 20 eQMI_ERR_21, // 21 eQMI_ERR_INVALID_TX_ID, // 22 eQMI_ERR_DEVICE_IN_USE, // 23 eQMI_ERR_OP_NETWORK_UNSUPPORTED, // 24 eQMI_ERR_OP_DEVICE_UNSUPPORTED, // 25 eQMI_ERR_NO_EFFECT, // 26 eQMI_ERR_NO_FREE_PROFILE, // 27 eQMI_ERR_INVALID_PDP_TYPE, // 28 eQMI_ERR_INVALID_TECH_PREF, // 29 eQMI_ERR_INVALID_PROFILE_TYPE, // 30 eQMI_ERR_INVALID_SERVICE_TYPE, // 31 eQMI_ERR_INVALID_REGISTER_ACTION, // 32 eQMI_ERR_INVALID_PS_ATTACH_ACTION, // 33 eQMI_ERR_AUTHENTICATION_FAILED, // 34 eQMI_ERR_PIN_BLOCKED, // 35 eQMI_ERR_PIN_ALWAYS_BLOCKED, // 36 eQMI_ERR_UIM_UNINITIALIZED, // 37 eQMI_ERR_MAX_QOS_REQUESTS_IN_USE, // 38 eQMI_ERR_INCORRECT_FLOW_FILTER, // 39 eQMI_ERR_NETWORK_QOS_UNAWARE, // 40 eQMI_ERR_INVALID_QOS_ID, // 41 eQMI_ERR_REQUESTED_NUM_UNSUPPORTED, // 42 eQMI_ERR_INTERFACE_NOT_FOUND, // 43 eQMI_ERR_FLOW_SUSPENDED, // 44 eQMI_ERR_INVALID_DATA_FORMAT, // 45 eQMI_ERR_GENERAL, // 46 eQMI_ERR_UNKNOWN, // 47 eQMI_ERR_INVALID_ARG, // 48 eQMI_ERR_INVALID_INDEX, // 49 eQMI_ERR_NO_ENTRY, // 50 eQMI_ERR_DEVICE_STORAGE_FULL, // 51 eQMI_ERR_DEVICE_NOT_READY, // 52 eQMI_ERR_NETWORK_NOT_READY, // 53 eQMI_ERR_WMS_CAUSE_CODE, // 54 eQMI_ERR_WMS_MESSAGE_NOT_SENT, // 55 eQMI_ERR_WMS_MESSAGE_DELIVERY_FAILURE, // 56 eQMI_ERR_WMS_INVALID_MESSAGE_ID, // 57 eQMI_ERR_WMS_ENCODING, // 58 eQMI_ERR_AUTHENTICATION_LOCK, // 59 eQMI_ERR_INVALID_TRANSITION, // 60 eQMI_ERR_61, // 61 eQMI_ERR_62, // 62 eQMI_ERR_63, // 63 eQMI_ERR_64, // 64 eQMI_ERR_SESSION_INACTIVE, // 65 eQMI_ERR_SESSION_INVALID, // 66 eQMI_ERR_SESSION_OWNERSHIP, // 67 eQMI_ERR_INSUFFICIENT_RESOURCES, // 68 eQMI_ERR_DISABLED, // 69 eQMI_ERR_INVALID_OPERATION, // 70 eQMI_ERR_INVALID_QMI_CMD, // 71 eQMI_ERR_WMS_TPDU_TYPE, // 72 eQMI_ERR_WMS_SMSC_ADDR, // 73 eQMI_ERR_INFO_UNAVAILABLE, // 74 eQMI_ERR_SEGMENT_TOO_LONG, // 75 eQMI_ERR_SEGMENT_ORDER, // 76 eQMI_ERR_BUNDLING_NOT_SUPPORTED, // 77 eQMI_ERR_78, // 78 eQMI_ERR_POLICY_MISMATCH, // 79 eQMI_ERR_SIM_FILE_NOT_FOUND, // 80 eQMI_ERR_EXTENDED_EXTERNAL, // 81 eQMI_ERR_ACCESS_DENIED, // 82 eQMI_ERR_HARDWARE_RESTRICTED, // 83 eQMI_ERR_ACK_NOT_SENT, // 84 eQMI_ERR_INCOMPATIBLE_STATE = 90, // 90 eQMI_ERR_FDN_RESTRICT, // 91 eQMI_ERR_SUPS_FAILURE_CAUSE, // 92 eQMI_ERR_NO_RADIO, // 93 eQMI_ERR_NOT_SUPPORTED, // 94 eQMI_ERR_CARD_CALL_CONTROL_FAILED = 96, // 96 eQMI_ERR_NETWORK_ABORTED, // 97 eQMI_ERR_CAT_EVT_REG_FAILED, // 61441 eQMI_ERR_CAT_INVALID_TR, // 61442 eQMI_ERR_CAT_INVALID_ENV_CMD, // 61443 eQMI_ERR_CAT_ENV_CMD_BUSY, // 61444 eQMI_ERR_CAT_ENV_CMD_FAIL, // 61445 eQMI_ERR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIErrorCode validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIErrorCode ec ) { bool retVal = false; if ( (ec > eQMI_ERR_ENUM_BEGIN && ec <= eQMI_ERR_ACK_NOT_SENT) || (ec >= eQMI_ERR_INCOMPATIBLE_STATE && ec <= eQMI_ERR_NOT_SUPPORTED) || (ec == eQMI_ERR_CARD_CALL_CONTROL_FAILED) || (ec == eQMI_ERR_NETWORK_ABORTED) || (ec >= eQMI_ERR_CAT_EVT_REG_FAILED && ec < eQMI_ERR_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMICallEndReason Enumeration // QMI Call End Reason Enumeration /*=========================================================================*/ enum eQMICallEndReason { eQMI_CALL_END_REASON_BEGIN = -1, // General eQMI_CALL_END_REASON_UNSPECIFIED = 1, // 1 eQMI_CALL_END_REASON_CLIENT_END, // 2 eQMI_CALL_END_REASON_NO_SRV, // 3 eQMI_CALL_END_REASON_FADE, // 4 eQMI_CALL_END_REASON_REL_NORMAL, // 5 eQMI_CALL_END_REASON_ACC_IN_PROG, // 6 eQMI_CALL_END_REASON_ACC_FAIL, // 7 eQMI_CALL_END_REASON_REDIR_OR_HANDOFF, // 8 eQMI_CALL_END_REASON_CLOSE_IN_PROGRESS, // 9 eQMI_CALL_END_REASON_AUTH_FAILED, // 10 eQMI_CALL_END_REASON_INTERNAL, // 11 // CDMA eQMI_CALL_END_REASON_CDMA_LOCK = 500, // 500 eQMI_CALL_END_REASON_INTERCEPT, // 501 eQMI_CALL_END_REASON_REORDER, // 502 eQMI_CALL_END_REASON_REL_SO_REJ, // 503 eQMI_CALL_END_REASON_INCOM_CALL, // 504 eQMI_CALL_END_REASON_ALERT_STOP, // 505 eQMI_CALL_END_REASON_ACTIVATION, // 506 eQMI_CALL_END_REASON_MAX_ACCESS_PROBE, // 507 eQMI_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS, // 508 eQMI_CALL_END_REASON_NO_RESPONSE_FROM_BS, // 509 eQMI_CALL_END_REASON_REJECTED_BY_BS, // 510 eQMI_CALL_END_REASON_INCOMPATIBLE, // 511 eQMI_CALL_END_REASON_ALREADY_IN_TC, // 512 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_GPS, // 513 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_SMS, // 514 eQMI_CALL_END_REASON_NO_CDMA_SRV, // 515 // GSM/WCDMA eQMI_CALL_END_REASON_CONF_FAILED = 1000, // 1000 eQMI_CALL_END_REASON_INCOM_REJ, // 1001 eQMI_CALL_END_REASON_NO_GW_SRV, // 1002 eQMI_CALL_END_REASON_NETWORK_END, // 1003 eQMI_CALL_END_REASON_LLC_SNDCP_FAILURE, // 1004 eQMI_CALL_END_REASON_INSUFFICIENT_RESOURCES, // 1005 eQMI_CALL_END_REASON_OPTION_TEMP_OOO, // 1006 eQMI_CALL_END_REASON_NSAPI_ALREADY_USED, // 1007 eQMI_CALL_END_REASON_REGULAR_DEACTIVATION, // 1008 eQMI_CALL_END_REASON_NETWORK_FAILURE, // 1009 eQMI_CALL_END_REASON_UMTS_REATTACH_REQ, // 1010 eQMI_CALL_END_REASON_UMTS_PROTOCOL_ERROR, // 1011 eQMI_CALL_END_REASON_OPERATOR_BARRING, // 1012 eQMI_CALL_END_REASON_UNKNOWN_APN, // 1013 eQMI_CALL_END_REASON_UNKNOWN_PDP, // 1014 eQMI_CALL_END_REASON_GGSN_REJECT, // 1015 eQMI_CALL_END_REASON_ACTIVATION_REJECT, // 1016 eQMI_CALL_END_REASON_OPTION_NOT_SUPPORTED, // 1017 eQMI_CALL_END_REASON_OPTION_UNSUBSCRIBED, // 1018 eQMI_CALL_END_REASON_QOS_NOT_ACCEPTED, // 1019 eQMI_CALL_END_REASON_TFT_SEMANTIC_ERROR, // 1020 eQMI_CALL_END_REASON_TFT_SYNTAX_ERROR, // 1021 eQMI_CALL_END_REASON_UNKNOWN_PDP_CONTEXT, // 1022 eQMI_CALL_END_REASON_FILTER_SEMANTIC_ERROR, // 1023 eQMI_CALL_END_REASON_FILTER_SYNTAX_ERROR, // 1024 eQMI_CALL_END_REASON_PDP_WITHOUT_ACTIVE_TFT, // 1025 eQMI_CALL_END_REASON_INVALID_TRANSACTION_ID, // 1026 eQMI_CALL_END_REASON_MESSAGE_SEMANTIC_ERROR, // 1027 eQMI_CALL_END_REASON_INVALID_MANDATORY_INFO, // 1028 eQMI_CALL_END_REASON_TYPE_UNSUPPORTED, // 1029 eQMI_CALL_END_REASON_MSG_TYPE_WRONG_FOR_STATE, // 1030 eQMI_CALL_END_REASON_UNKNOWN_INFO_ELEMENT, // 1031 eQMI_CALL_END_REASON_CONDITIONAL_IE_ERROR, // 1032 eQMI_CALL_END_REASON_MSG_WRONG_FOR_PROTOCOL, // 1033 eQMI_CALL_END_REASON_APN_TYPE_CONFLICT, // 1034 eQMI_CALL_END_REASON_NO_GPRS_CONTEXT, // 1035 eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED, // 1036 // CDMA 1xEV-DO (HDR) eQMI_CALL_END_REASON_CD_GEN_OR_BUSY = 1500, // 1500 eQMI_CALL_END_REASON_CD_BILL_OR_AUTH, // 1501 eQMI_CALL_END_REASON_CHG_HDR, // 1502 eQMI_CALL_END_REASON_EXIT_HDR, // 1503 eQMI_CALL_END_REASON_HDR_NO_SESSION , // 1504 eQMI_CALL_END_REASON_HDR_ORIG_DURING_GPS_FIX, // 1505 eQMI_CALL_END_REASON_HDR_CS_TIMEOUT , // 1506 eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM, // 1507 eQMI_CALL_END_REASON_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMICallEndReason validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMICallEndReason err ) { if ( (err >= eQMI_CALL_END_REASON_UNSPECIFIED) && (err <= eQMI_CALL_END_REASON_INTERNAL) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CDMA_LOCK) && (err <= eQMI_CALL_END_REASON_NO_CDMA_SRV) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CONF_FAILED) && (err <= eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CD_GEN_OR_BUSY) && (err <= eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM) ) { return true; } return false; }; /*=========================================================================*/ // eIPAddressType Enumeration // IPv4 or IPv6 /*=========================================================================*/ enum eIPAddressType { eIP_ADDRESS_ENUM_BEGIN = -1, eIP_ADDRESS_V4 = 4, // IPv4 eIP_ADDRESS_V6 = 6, // IPv6 eIP_ADDRESS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eIPAddressType validity check PARAMETERS: type [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eIPAddressType type ) { if (type == eIP_ADDRESS_V4 || type == eIP_ADDRESS_V6) { return true; } return false; } /*=========================================================================*/ // eSMSMessageMode Enumeration // CDMA or GW /*=========================================================================*/ enum eSMSMessageMode { eSMS_MESSAGE_MODE_BEGIN = -1, eSMS_MESSAGE_MODE_CDMA, // 0 CDMA eSMS_MESSAGE_MODE_GW, // 1 GW eSMS_MESSAGE_MODE_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eSMSMessageMode validity check PARAMETERS: mode [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eSMSMessageMode mode ) { if (mode == eSMS_MESSAGE_MODE_CDMA || mode == eSMS_MESSAGE_MODE_GW) { return true; } return false; } /*=========================================================================*/ // eNetworkMode Enumeration // UMTS or CDMA /*=========================================================================*/ enum eNetworkMode { eNETWORK_MODE_BEGIN = -1, eNETWORK_MODE_UMTS, // 0 UMTS eNETWORK_MODE_CDMA, // 1 CDMA eNETWORK_MODE_UNSET = 0xff, // 0xff unknown/unset eNETWORK_MODE_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eNetworkMode validity check PARAMETERS: mode [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eNetworkMode mode ) { if (mode == eNETWORK_MODE_UMTS || mode == eNETWORK_MODE_CDMA || mode == eNETWORK_MODE_UNSET) { return true; } return false; }libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/QMIProtocolServer.cpp000066400000000000000000000276141455567757300252370ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.cpp DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIProtocolServer.h" #include "QMIBuffers.h" #include "Comm.h" #include "Socket.h" /*=========================================================================*/ // cQMIProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQMIProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: serviceType [ I ] - QMI service type requested bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( MapQMIServiceToProtocol( serviceType, false ), MapQMIServiceToProtocol( serviceType, true ), bufferSzRx, logSz ), mLastTID( (WORD)INVALID_QMI_TRANSACTION_ID ), mService( serviceType ) { // Nothing to do } /*=========================================================================== METHOD: ~cQMIProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::~cQMIProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the configured QMI service using the given QMI control file PARAMETERS: pControlFile [ I ] - QMI control file SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::Connect( LPCSTR pControlFile ) { // Assume failure bool bRC = false; if (IsValid( mService ) == false || mService == eQMI_SVC_CONTROL) { return bRC; } std::string name = pControlFile; if (name.find( "qcqmi" ) != std::string::npos) { mpConnection = new cComm(); mConnectionType = eConnectionType_RmNet; } else { // SMD std::string defaultPath = "/var/"; // Such as "SOCKET:/dev/socket/,0" if (name.find( "SOCKET:" ) == 0) { // Remove qualifier name = name.substr( 7 ); } // Such as "QMUXD:0" else if (name.find( "QMUXD:" ) == 0) { name = name.substr( 6 ); name = defaultPath + "," + name; } // Just channel ID, IE: "0" else { name = defaultPath + "," + name; } mpConnection = new cSocket(); mConnectionType = eConnectionType_SMD; } // Pass service file to base class for actual connection bRC = cProtocolServer::Connect( name.c_str() ); if (bRC == false) { TRACE( "QMI connect %d failed\n", mService ); } return bRC; } /*=========================================================================== METHOD: ValidateRequest (Internal Method) DESCRIPTION: Validate a request that is about to be scheduled SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::ValidateRequest( const sProtocolRequest & req ) { if (cProtocolServer::ValidateRequest( req ) == false) { return false; } sQMIServiceBuffer qmiReq( req.GetSharedBuffer() ); return qmiReq.IsValid(); } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::InitializeComm() { bool bResult = false; if (mpConnection == 0) { return bResult; } if (mConnectionType == eConnectionType_RmNet) { // Setup the QMI Service type int result = mpConnection->SendCtl( QMI_GET_SERVICE_FILE_IOCTL, (void*)(unsigned long)mService ); bResult = (result == 0); } else if (mConnectionType == eConnectionType_SMD) { // Setup the QMI Service type int result = mpConnection->SendCtl( eQMUXD_MSG_ALLOC_QMI_CLIENT_ID, (void*)&mService ); bResult = (result == 0); } return bResult; } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::CleanupComm() { bool bResult = true; if (mpConnection != 0 && mConnectionType == eConnectionType_SMD) { // Delete the QMI client // NOTE: This is generally unnecessary, when you close the channel // it is deleted int result = mpConnection->SendCtl( eQMUXD_MSG_RELEASE_QMI_CLIENT_ID, 0 ); bResult = (result == 0); } // Nothing to actually do here return true; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into QMI indications/responses PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response (not used) bAbortTx [ O ] - Response aborts current transmission? (not used) SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cQMIProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; bAbortTx = false; // Something to decode from? if (bytesReceived == 0) { return bRC; } // Set protocol type (we have to be dealing with a valid QMI service) eProtocolType pt = MapQMIServiceToProtocol( mService, false ); if (pt == ePROTOCOL_ENUM_BEGIN) { return bRC; } sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxBuffer, bytesReceived, pt ); if (pTmp != 0) { sQMIServiceBuffer tmpBuf( pTmp ); if (tmpBuf.IsValid() == true) { rspIdx = mLog.AddBuffer( tmpBuf ); if (IsResponse( tmpBuf ) == true) { bRC = true; } else { rspIdx = INVALID_LOG_INDEX; } } } return bRC; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encode data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQMIProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { WORD tid = ++mLastTID; if (tid == (WORD)INVALID_QMI_TRANSACTION_ID) { tid++; } sQMIServiceBuffer tmpBuf( pBuffer ); tmpBuf.SetTransactionID( tid ); // No actual encoding required as we alter the original request bEncoded = false; return 0; }; /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } sQMIServiceBuffer qmiReq( mpActiveRequest->mRequest.GetSharedBuffer() ); sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiReq.IsValid() == false || qmiRsp.IsValid() == false) { return bRC; } if (qmiRsp.IsResponse() == false) { return bRC; } WORD reqID = qmiReq.GetTransactionID(); WORD rspID = qmiRsp.GetTransactionID(); if ( (reqID == (WORD)INVALID_QMI_TRANSACTION_ID) || (rspID == (WORD)INVALID_QMI_TRANSACTION_ID) || (reqID != rspID) ) { return bRC; } // Sadly there are documentated cases of firmware returning responses // with a matching transaction ID but a mismatching message ID. There // is no reason for this to be considered valid behavior as of yet ULONG reqMsgID = qmiReq.GetMessageID(); ULONG rspMsgID = qmiRsp.GetMessageID(); if (reqMsgID != rspMsgID) { return bRC; } bRC = true; return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/QMIProtocolServer.h000066400000000000000000000105211455567757300246710ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQMIProtocolServer /*=========================================================================*/ class cQMIProtocolServer : public cProtocolServer { public: // Constructor cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQMIProtocolServer(); // Connect to the given QMI service using the configured QMI // control file bool Connect( LPCSTR pControlFile ); // (Inline) Return the QMI service type eQMIService GetServiceType() { return mService; }; protected: // Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ); // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // (Inline) Is the passed in data a response that aborts the // current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & /* rsp */ ) { // QMI doesn't necessarily require this return false; }; /* Current transaction ID */ SHORT mLastTID; /* Type of QMI service we are serving */ eQMIService mService; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/SharedBuffer.cpp000066400000000000000000000242251455567757300242330ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.cpp DESCRIPTION: Shareable protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "SharedBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Synchronization object struct sSharedBufferSync { public: // Constructor sSharedBufferSync() : mbInitialized( false ) { int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to init sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } mbInitialized = true; }; // Destructor ~sSharedBufferSync() { mbInitialized = false; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); } }; // Lock sync object void Lock() { if (mbInitialized == true) { int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to lock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // Unlock sync object void Unlock() { if (mbInitialized == true) { int nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to unlock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; protected: /* DIAG buffer critical section */ pthread_mutex_t mSyncSection; /* Has this object been initialized? */ bool mbInitialized; }; // Global (across all shared buffers) reference count guard sSharedBufferSync gRefCount; /*=========================================================================*/ // sSharedBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (copy passed in buffer) PARAMETERS: pDataToCopy [ I ] - The data buffer to copy (should be non-zero) dataLen [ I ] - The length of the above buffer (should be > 1) dataType [ I ] - Type of data (not used internal to class) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, data actually exists? if (pDataToCopy != 0) { // Yes, try to allocate memory mpData = new BYTE[dataLen]; if (mpData != 0) { // Now copy into our allocation memcpy( (PVOID)mpData, (LPCVOID)pDataToCopy, (SIZE_T)dataLen ); // Now set the size, we do this last so that our double // deletion logic is only applied if we had an allocation // in the first place mSize = dataLen; } } } } /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (assume ownership of passed in buffer) PARAMETERS: dataLen [ I ] - The length of the above buffer (should be > 1) pDataToOwn [ I ] - The data buffer to assume ownership of (should be non-zero) dataType [ I ] - Type of data (not used internal to class) NOTE: The order is intentionally reversed from the previous constructor to avoid any cases of mistaken identity (copy versus assume ownership) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Data actually exists? if (pDataToOwn != 0) { // Yes, length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, assume ownership of the passed in buffer mpData = pDataToOwn; mSize = dataLen; } else { // This data buffer is not acceptable to us, but we have assumed // ownership of the memory which we will now free delete [] pDataToOwn; } } } /*=========================================================================== METHOD: ~sSharedBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sSharedBuffer::~sSharedBuffer() { ASSERT( mRefCount == 0 ); // Buffer data to free? if (mpData != 0) { // Yes, zero first byte for caution and then delete it mpData[0] = 0; delete [] mpData; // Even more caution, zero out pointer mpData = 0; } else if (mSize != 0) { ASSERT( (PVOID)("Double deletion detected in ~sSharedBuffer") == 0 ); } } /*=========================================================================== METHOD: operator == (Public Method) DESCRIPTION: Equality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator == ( const sSharedBuffer & refBuf ) const { // Assume they are not equal bool bEq = false; // The buffers must be the same if (mpData == refBuf.mpData) { if (mSize == refBuf.mSize) { if (mRefCount == refBuf.mRefCount) { if (mType == refBuf.mType) { // The shared buffers are the same bEq = true; } } else { // Very odd - the buffers are the same, but not the ref count?!? ASSERT( 0 ); } } else { // Very odd - the buffers are the same, but not the size?!? ASSERT( 0 ); } } return bEq; } /*=========================================================================== METHOD: operator != (Public Method) DESCRIPTION: Inequality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator != ( const sSharedBuffer & refBuf ) const { if (*this == refBuf) { return false; } return true; } /*=========================================================================== METHOD: AddRef (Internal Method) DESCRIPTION: Increment reference count RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::AddRef() { gRefCount.Lock(); mRefCount++; gRefCount.Unlock(); } /*=========================================================================== METHOD: Release (Internal Method) DESCRIPTION: Release reference, delete if reference count zero RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::Release() { gRefCount.Lock(); ASSERT( mRefCount != 0 ); // Decrement reference count if (mRefCount > 0) { mRefCount--; } // ... and delete if reference count now 0 if (mRefCount == 0) { delete this; } gRefCount.Unlock(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/SharedBuffer.h000066400000000000000000000127701455567757300237020ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.h DESCRIPTION: Shareable buffer structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- struct sProtocolBuffer; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum size of a shared buffer const ULONG MAX_SHARED_BUFFER_SIZE = 1024 * 16 + 256; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sSharedBuffer // // Simple struct to represent a reference counted shareable (no copy) // buffer, as the basis for all buffer related classes // // NOTE: Do *NOT* create instances of this structure on the stack, it // must be dynamically allocated in order to function correctly /*=========================================================================*/ struct sSharedBuffer { public: // Constructor (copy passed in buffer) sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ); // Constructor (assume ownership of passed in buffer) sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ); // Destructor virtual ~sSharedBuffer(); // Equality operator bool operator == ( const sSharedBuffer & ) const; // Inequality operator bool operator != ( const sSharedBuffer & ) const; // (Inline) Get buffer const BYTE * GetBuffer() const { return mpData; }; // (Inline) Get buffer size ULONG GetSize() const { return mSize; }; // (Inline) Get buffer type ULONG GetType() const { return mType; }; // (Inline) Is this buffer valid? bool IsValid() const { return (mpData != 0 && IsValidSize( mSize )); }; // (Inline) Get reference count ULONG GetRefCount() const { return mRefCount; }; // (Static Inline) Is the passed in size within the allowable range // a shared buffer? static bool IsValidSize( ULONG sz ) { return (sz > 0 && sz <= MAX_SHARED_BUFFER_SIZE); }; protected: // Add reference void AddRef(); // Release reference, delete if reference count zero void Release(); /* Data */ PBYTE mpData; /* Size of data */ ULONG mSize; /* Type of data */ ULONG mType; /* Reference count */ ULONG mRefCount; private: // Leave copy constructor and assignment operator unimplemented // to prevent unintentional and unauthorized copying of the object // (which would lead to bad reference counting) sSharedBuffer( const sSharedBuffer & ); sSharedBuffer & operator = ( const sSharedBuffer & ); friend struct sProtocolBuffer; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/Socket.cpp000066400000000000000000000523401455567757300231220ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.cpp DESCRIPTION: Implementation of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Socket.h" #include "ProtocolServer.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 // Size of the QMUXD command payload // GET_CLIENT_ID and RELEASE_CLIENT_ID must pass in a buffer of this size #define PAYLOAD_SIZE 808 /*=========================================================================*/ // struct sQMUXDHeader /*=========================================================================*/ #pragma pack( push, 1 ) struct sQMUXDHeader { /* Total size of header and following buffer */ int mTotalSize; /* QMUXD client ID */ int mQMUXDClientID; /* Message type */ eQMUXDMessageTypes mQMUXDMsgID; /* Duplicate of mQMUXDClientID */ int mQMUXDClientIDDuplicate; /* Transaction ID */ unsigned long mTxID; /* System error code */ int mSysErrCode; /* QMI error code (duplicate of TLV 0x02) */ int mQmiErrCode; /* SMD channel. 0 = SMD_DATA_5 */ int mQMUXDConnectionType; /* QMI service ID */ int mQMUXServiceID; /* QMI client ID */ unsigned char mQMUXClientID; /* QMI flags */ unsigned char mRxFlags; /* In QMUXD this struct is not packed, so the compiler appends these two bytes */ unsigned short int mMissing2Bytes; }; #pragma pack( pop ) /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxSocketThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads to a socket PARAMETERS: pData [ I ] cSocket pointer RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxSocketThread( void * pData ) { cSocket * pSocket = (cSocket*)pData; if (pSocket == NULL || pSocket->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pSocket->mCommandPipe[READING], &inputSet ); int largestFD = pSocket->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait until we recieve a command or data is available status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pSocket->mCommandPipe[READING], &outputSet ) == true) { // Read command value from the pipe BYTE cmd; status = read( pSocket->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pSocket->mSocket, &inputSet ); largestFD = std::max( pSocket->mSocket, pSocket->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; } else { // EXIT_CMD or anything else pSocket->mpRxCallback = 0; break; } } else if (FD_ISSET( pSocket->mSocket, &outputSet ) == true) { // Stop watching for read data FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; // Perform a recv for the header sQMUXDHeader recvHdr; status = recv( pSocket->mSocket, &recvHdr, sizeof( recvHdr ), 0 ); if (status != sizeof( recvHdr )) { TRACE( "recv error, bad size %d\n", status ); break; } // Calculate and read the remaining data if ((recvHdr.mTotalSize < 0) || ((ULONG)recvHdr.mTotalSize < sizeof( recvHdr )) || ((ULONG)recvHdr.mTotalSize > sizeof( recvHdr ) + pSocket->mBuffSz)) { TRACE( "read too large for buffer\n" ); break; } status = recv( pSocket->mSocket, pSocket->mpBuffer, recvHdr.mTotalSize - sizeof( recvHdr ), 0 ); // Is this one of our IOCTLS or a standard message? if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_WRITE_QMI_SDU) { cIOCallback * pCallback = pSocket->mpRxCallback; pSocket->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } else { pSocket->mpRxCallback = 0; // Notify SendCtl() that control message completed if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { DWORD clientID; memcpy( &clientID, &pSocket->mpBuffer[0], 4 ); pSocket->mCtrlMsgComplete.Set( clientID ); } else { // Just set the event pSocket->mCtrlMsgComplete.Set( 0 ); } } } } return 0; }; /*=========================================================================*/ // cSocket Methods /*=========================================================================*/ /*=========================================================================== METHOD: cSocket (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cSocket::cSocket() : mSocket( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ), mCtrlMsgComplete(), mQMUXDClientID( 0 ), mQMUXClientID( 0 ), mQMUXServiceID( 0 ), mChannelID( -1 ), mQMUXDTxID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cSocket (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cSocket::~cSocket() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cSocket::IsValid() { // Nothing to do return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - String that consists of "Path,Channel" Path is path to qmux_client_socket and qmux_connect_socket Channel is used for connection type (IE: "0" = SMD_DATA_5 ) RETURN VALUE: bool ===========================================================================*/ bool cSocket::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mSocket != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cSocket:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxSocketThread, this ); if (nRet != 0) { TRACE( "cSocket::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Create a socket mSocket = socket( AF_UNIX, SOCK_STREAM, 0 ); if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "unable to create socket %d\n", errno ); Disconnect(); return false; } // Get path and channel std::string port = pPort; size_t found = port.find( ',' ); if (found == std::string::npos) { TRACE( "Invalid port specified" ); Disconnect(); return false; } std::string path = port.substr( 0, found ); std::string channel = port.substr( found + 1 ); struct sockaddr_un clientSockAddr; memset( &clientSockAddr, 0, sizeof( clientSockAddr ) ); clientSockAddr.sun_family = AF_UNIX; // Format the client path snprintf( &clientSockAddr.sun_path[0], sizeof( clientSockAddr.sun_path ), "%sqmux_client_socket%7lu", path.c_str(), (unsigned long)getpid() ); // Delete if it exists already unlink( clientSockAddr.sun_path ); // Bind to a client address nRet = bind( mSocket, (struct sockaddr *)&clientSockAddr, sizeof( sockaddr_un ) ); if (nRet == -1) { TRACE( "bad bind %d\n", errno ); Disconnect(); return false; } // Format the connection path struct sockaddr_un connectSockAddr; memset( &connectSockAddr, 0, sizeof( connectSockAddr ) ); connectSockAddr.sun_family = AF_UNIX; snprintf( &connectSockAddr.sun_path[0], sizeof( connectSockAddr.sun_path ), "%sqmux_connect_socket", path.c_str() ); // Connect to server address nRet = connect( mSocket, (struct sockaddr *)&connectSockAddr, sizeof( sockaddr_un ) ); if (nRet < 0) { TRACE( "bad connect %d\n", errno ); Disconnect(); return false; } int clientID; nRet = recv( mSocket, &clientID, sizeof( clientID ), 0 ); if (nRet != sizeof( clientID )) { TRACE( "bad client ID %d\n", errno ); Disconnect(); return false; } // Save QMUXD Client ID mQMUXDClientID = clientID; // Save SMD channel mChannelID = strtol( channel.c_str(), 0, 10 ); if (mChannelID == -1) { Disconnect(); return false; } // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Send a control message to the lower layer PARAMETERS: msgType [ I ] - eQMUXDMessageType pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - control message return value (0 for success) ===========================================================================*/ int cSocket::SendCtl( UINT msgType, void * pData ) { if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } BYTE msg[sizeof( sQMUXDHeader ) + PAYLOAD_SIZE]; memset( &msg[0], 0, sizeof( msg ) ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)&msg[0]; pHdr->mTotalSize = sizeof( msg ); pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = (eQMUXDMessageTypes)msgType; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; pHdr->mQMUXDConnectionType = mChannelID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; // The Payload BYTE * pPayload = &msg[sizeof( sQMUXDHeader )]; if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { memcpy( &mQMUXServiceID, pData, 4 ); memcpy( &pPayload[0], &mQMUXServiceID, 4 ); } else if (msgType == (int)eQMUXD_MSG_RELEASE_QMI_CLIENT_ID) { memcpy( &pPayload[0], &mQMUXServiceID, 4 ); memcpy( &pPayload[4], &mQMUXClientID, 4 ); } // Send the message int rc = send( mSocket, &msg[0], sizeof( msg ), 0 ); if (rc != sizeof( msg )) { TRACE( "bad write %d\n", rc ); return rc; } if (mpRxCallback == 0) { // No one is currently reading, need to trigger a read // so our data can be recieved RxData( &msg[0], sizeof( msg ), 0 ); } // Wait for the response (10s timeout) DWORD val; rc = mCtrlMsgComplete.Wait( 10000, val ); if (rc != 0) { TRACE( "bad SendCtl() wait %d\n", rc ); return rc; } if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { // Grab the client ID mQMUXClientID = val; // Verify client ID is valid if (mQMUXClientID == 0) { return 1; } } return 0; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cSocket::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mSocket != INVALID_HANDLE_VALUE) { close( mSocket ); mSocket = INVALID_HANDLE_VALUE; } // Double check mpRxCallback = 0; mCtrlMsgComplete.Clear(); mQMUXDClientID = 0; mQMUXClientID = 0; mQMUXServiceID = 0; mQMUXDTxID = 0; return bRC; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelIO() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelRx() { if (mSocket == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); mpRxCallback = 0; return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelTx() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cSocket::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to start reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cSocket::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // Format the header int totalSz = sizeof( sQMUXDHeader ) + bufSz; BYTE * pMsg = new BYTE[totalSz]; if (pMsg == 0) { TRACE( "unable to allocate buffer\n" ); return false; } memset( pMsg, 0, totalSz ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)pMsg; pHdr->mTotalSize = totalSz; pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = eQMUXD_MSG_WRITE_QMI_SDU; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; pHdr->mQMUXServiceID = mQMUXServiceID; pHdr->mQMUXClientID = mQMUXClientID; // The data payload memcpy( &pMsg[sizeof( sQMUXDHeader )], pBuf, bufSz ); // Send the message int nRet = send( mSocket, pMsg, totalSz, 0 ); delete [] pMsg; if (nRet != totalSz) { TRACE( "cSocket::TxData() write returned %d instead of %d\n", nRet, totalSz ); return false; } #ifdef DEBUG TRACE( "Write of %d bytes took %llu milliseconds\n", totalSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/Socket.h000066400000000000000000000116651455567757300225740ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.h DESCRIPTION: Declaration of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Enum eQMUXDMessageTypes // Types to be passed into SendCtl() for cSocket /*=========================================================================*/ enum eQMUXDMessageTypes { eQMUXD_MSG_WRITE_QMI_SDU = 0, eQMUXD_MSG_ALLOC_QMI_CLIENT_ID = 1, eQMUXD_MSG_RELEASE_QMI_CLIENT_ID = 2, }; /*=========================================================================*/ // Class cSocket /*=========================================================================*/ class cSocket : public cConnection { public: // Constructor cSocket(); // Destructor ~cSocket(); // Is this object valid? bool IsValid(); // Connect to the specified port bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current channel ID int GetChannelID() const { return mChannelID; }; // Are we currently connected to a port? bool IsConnected() { return (mSocket != INVALID_HANDLE_VALUE); }; protected: /* Handle to socket */ int mSocket; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; /* Control message completion event */ cEvent mCtrlMsgComplete; /* QMUXD client ID */ int mQMUXDClientID; /* QMUX client and service IDs */ int mQMUXClientID; int mQMUXServiceID; /* SMD Channel ID. 0 = SMD_DATA_5 */ int mChannelID; /* The SMD transaction ID */ int mQMUXDTxID; // Rx thread is allowed complete access friend void * RxSocketThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/StdAfx.h000066400000000000000000000141761455567757300225350ustar00rootroot00000000000000/*=========================================================================== FILE: StdAfx.h DESCRIPTION: Application Framework eXtenstions for Linux PUBLIC CLASSES AND FUNCTIONS: Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Includes //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- // Macro defination //--------------------------------------------------------------------------- #define ASSERT( x ) assert( x ) #ifdef DEBUG #ifdef ANDROID #include // TRACE macro #define TRACE( format, arg... ) \ if (true) \ { \ __android_log_print( ANDROID_LOG_INFO, \ "Gobi", "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ); \ } #else #define TRACE( format, arg... ) \ printf( "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ) #endif #else #define TRACE(...) #endif //--------------------------------------------------------------------------- // data type defination //--------------------------------------------------------------------------- #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef CONST #define CONST const #endif typedef void VOID; typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef double DOUBLE; typedef int INT; typedef unsigned int UINT; typedef unsigned int * PUINT; typedef INT HANDLE; typedef HANDLE HMODULE; typedef char CHAR; typedef short SHORT; typedef long LONG; typedef unsigned long ULONG; typedef ULONG * PULONG; typedef ULONG * ULONG_PTR; typedef unsigned short USHORT; typedef USHORT * PUSHORT; typedef unsigned char UCHAR; typedef UCHAR * PUCHAR; typedef char * PSZ; typedef CONST CHAR * LPCSTR; typedef CHAR * LPSTR; typedef BYTE * PBYTE; typedef BOOL * PBOOL; typedef INT * PINT; typedef UINT * LPINT; typedef WORD * PWORD; typedef PWORD LPWORD; typedef LONG * LPLONG; typedef DWORD * PDWORD; typedef VOID * PVOID; typedef PVOID LPVOID; typedef const void * LPCVOID; typedef size_t SIZE_T; typedef double DATE; // Error code #define NO_ERROR 0L #define ERROR_SUCCESS 0L #define ERROR_NO_MORE_ITEMS 259L #define ERROR_CRC 23L #define ERROR_OUTOFMEMORY 14L #define ERROR_CAN_NOT_COMPLETE 1003L #define ERROR_REVISION_MISMATCH 1306L #define ERROR_BAD_ARGUMENTS 160L #define INVALID_SET_FILE_POINTER -1 #define VALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE -1 #define INVALID_FILE_SZ -1 #define ERROR_GEN_FAILURE 31L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_NOT_ENOUGH_MEMORY 8L #define ERROR_INVALID_PARAMETER 87L #define ERROR_BAD_FORMAT 11L // Other Constant definitions #define MAX_PATH 512 #define INFINITE 0xffffffff // SIOCIWFIRSTPRIV = 0x8BE0 // Device I/O control code for setting QMI service #define QMI_GET_SERVICE_FILE_IOCTL 0x8BE0 + 1 // Device I/O control code for obtaining device VIDPID #define QMI_GET_VIDPID_IOCTL 0x8BE0 + 2 // Device I/O control code for obtaining device MEID #define QMI_GET_MEID_IOCTL 0x8BE0 + 3 // Define the directions for pipes #define READING 0 #define WRITING 1 libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Core/SyncQueue.h000066400000000000000000000301071455567757300232550ustar00rootroot00000000000000/*=========================================================================== FILE: SyncQueue.h DESCRIPTION: Declaration/Implementation of cSyncQueue class PUBLIC CLASSES AND METHODS: cSyncQueue Synchronized shareable (across multiple threads) queue of structures with event notifications Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cSyncQueue /*=========================================================================*/ template class cSyncQueue { public: // (Inline) Constructor cSyncQueue( ULONG maxElements, bool bSignalEvent = false ) : mSignature( (ULONG)eSYNC_QUEUE_SIG ), mSignalEvent(), mbSignalEvent( bSignalEvent ), mMaxElements( maxElements ), mTotalElements( 0 ) { // Create sync CS int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SyncQueue: Unable to init sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } }; // (Inline) Destructor ~cSyncQueue() { if (IsValid() == false) { ASSERT( (PVOID)"Double deletion detected in ~cSyncQueue" == 0 ); } else { EmptyQueue(); mSignature = 0; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // (Inline) Add an element to the queue bool AddElement( const tElementType & elem ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { // Yes, drop oldest element mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Add an element to the queue returning the index of // the element bool AddElement( const tElementType & elem, ULONG & idx ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); idx = mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Return given element in the queue bool GetElement( ULONG idx, tElementType & elem ) const { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Is this a current element index? ULONG expiredIndices = mTotalElements - (ULONG)mElementDeque.size(); if (idx >= expiredIndices) { // Yes, grab it from the deque idx -= expiredIndices; if (idx < (ULONG)mElementDeque.size()) { elem = mElementDeque[idx]; bRC = true; } } nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Empty element queue bool EmptyQueue() { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } mElementDeque.clear(); mTotalElements = 0; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } bRC = true; return bRC; }; // (Inline) Return the number of queued elements ULONG GetQueueCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = (ULONG)mElementDeque.size(); nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the total number of elements added to queue ULONG GetTotalCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = mTotalElements; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the signal event cEvent & GetSignalEvent() const { return mSignalEvent; }; // (Inline) Is this sync queue valid? bool IsValid() const { return (mSignature == (ULONG)eSYNC_QUEUE_SIG); }; protected: // Object signature enum eClassConstants { eSYNC_QUEUE_SIG = 0x1799A2BC }; /* Object signature */ ULONG mSignature; /* Multithreaded mutex type */ mutable pthread_mutex_t mSyncSection; /* Signal event, set everytime an element is added (if configured) */ mutable cEvent mSignalEvent; /* Use above signal event? */ bool mbSignalEvent; /* Maximum number of elements to add to the deque */ ULONG mMaxElements; /* Total number of elements added to the deque */ ULONG mTotalElements; /* Element queue */ std::deque mElementDeque; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/000077500000000000000000000000001455567757300236745ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000Translation.cpp000066400000000000000000000071161455567757300300070ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLV DESCRIPTION: Return the starting location and size of TLV buffer. NOTE: does not include the TLV header PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer type [ I ] - Type ID pOutLen [ O ] - Length of the output buffer ppOut [ O ] - Pointer to output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ) { if (pIn == 0 || pOutLen == 0 || ppOut == 0) { return eGOBI_ERR_INVALID_ARG; } for (ULONG offset = 0; offset + sizeof( sQMIRawContentHeader ) <= inLen; offset += sizeof( sQMIRawContentHeader )) { sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pIn + offset); // Is it big enough to contain this TLV? if (offset + sizeof( sQMIRawContentHeader ) + pHeader->mLength > inLen) { return eGOBI_ERR_MALFORMED_RSP; } if (pHeader->mTypeID == typeID) { *pOutLen = pHeader->mLength; *ppOut = pIn + offset + sizeof( sQMIRawContentHeader ); return eGOBI_ERR_NONE; } offset += pHeader->mLength; } // TLV not found return eGOBI_ERR_INVALID_RSP; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000Translation.h000066400000000000000000000654741455567757300274670ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.h DESCRIPTION: QUALCOMM Tanslation for Gobi 3000 Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include #include #include "GobiConnectionMgmtAPIStructs.h" //--------------------------------------------------------------------------- // Prototypes //--------------------------------------------------------------------------- // Get a TLV ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ); // WDS ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ); ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ); ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ); ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ); ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ); ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ); ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ); ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ); ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ); ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ); ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ); ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ); ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ); ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ); // NAS ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ); ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ); ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ); ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ); ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ); ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ); ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ); ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ); ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ); ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ); // DMS ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ); ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ); ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ); ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ); ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ); ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ); ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ); ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ); ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ); ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ); ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); // SMS ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ); ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ); ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ); ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ); ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ); ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ); ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ); ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ); ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ); // DMS UIM ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ); ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ); ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ); ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // PDS ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ); ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ); ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ); ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ); ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ); ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ); ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ); ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ); ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ); ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ); // CAT ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ); ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ); // RMS ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ); ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ); // OMADM ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ); ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ); ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ); ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ); ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ); ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ); // Voice ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationCAT.cpp000066400000000000000000000135351455567757300303410ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationCAT.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Card Application Toolkit Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackCATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATSendTerminalResponseRequest_TerminalResponseType * pTLVx01; pTLVx01 = (sCATSendTerminalResponseRequest_TerminalResponseType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mReferenceID = refID; pTLVx01->mTerminalResponseLength = (UINT16)dataLen; offset += sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackCATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || dataLen == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATEnvelopeCommandRequest_EnvelopeCommand * pTLVx01; pTLVx01 = (sCATEnvelopeCommandRequest_EnvelopeCommand*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mEnvelopeCommandType = (eQMICATEnvelopeCommandType)cmdID; pTLVx01->mEnvelopeLength = (UINT16)dataLen; offset += sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationDMS.cpp000066400000000000000000001200741455567757300303520ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationDMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { // Validate arguments if (pIn == 0 || pMaxTXChannelRate == 0 || pMaxRXChannelRate == 0 || pDataServiceCapability == 0 || pSimCapability == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxRadioIfaces = (ULONG)*pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; const sDMSGetDeviceCapabilitiesResponse_Capabilities * pTLVx01; ULONG structSzx01 = sizeof( sDMSGetDeviceCapabilitiesResponse_Capabilities ); ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < structSzx01) { return eGOBI_ERR_BUFFER_SZ; } // Populate the variables *pMaxTXChannelRate = pTLVx01->mMaxTXRatebps; *pMaxRXChannelRate = pTLVx01->mMaxRXRatebps; *pDataServiceCapability = pTLVx01->mDataServiceCapability; // SIM capability should be treated as a boolean, even though it's not *pSimCapability = (pTLVx01->mSIMSupported == 0 ? 0 : 1); ULONG activeRadioIfaces = pTLVx01->mRadioInterfaceCount; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMIDMSRadioInterfaces * pInRadioInterfaces; // Verify there is room for the array in the TLV if (outLenx01 < structSzx01 + sizeof( eQMIDMSRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRadioInterfaces = (const eQMIDMSRadioInterfaces *) ((const BYTE *)pTLVx01 + structSzx01); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pInRadioInterfaces; pOutRadioIfaces++; pInRadioInterfaces++; } *pRadioIfacesSize = activeRadioIfaces; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the manufacturer // sDMSGetDeviceManfacturerResponse_Manfacturer only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the model // sDMSGetDeviceModelResponse_Model only contains the model const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the PRI revision // sDMSGetDeviceRevisionResponse_UQCNRevision only contains this const CHAR * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx11, outLenx11 ); pString[outLenx11] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { // Validate arguments if (pIn == 0 || amssSize == 0 || pAMSSString == 0 || bootSize == 0 || pBootString == 0 || priSize == 0 || pPRIString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pAMSSString = 0; *pBootString = 0; *pPRIString = 0; // Find the AMSS version // sDMSGetDeviceRevisionResponse_Revision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (amssSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAMSSString, pTLVx01, outLenx01 ); pAMSSString[outLenx01] = 0; // Find the Boot version // sDMSGetDeviceRevisionResponse_BootCodeRevision only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (bootSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pBootString, pTLVx10, outLenx10 ); pBootString[outLenx10] = 0; // The PRI version is returned by ParseGetFirmwareRevision() rc = ParseGetFirmwareRevision( inLen, pIn, priSize, pPRIString ); if (rc != eGOBI_ERR_NONE) { return rc; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { // Validate arguments if (pIn == 0 || voiceNumberSize == 0 || pVoiceNumber == 0 || minSize == 0 || pMIN == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pVoiceNumber = 0; *pMIN = 0; // Find the Voice number // sDMSGetDeviceVoiceNumberResponse_VoiceNumber only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (voiceNumberSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pVoiceNumber, pTLVx01, outLenx01 ); pVoiceNumber[outLenx01] = 0; // Find the Mobile ID (optional) // sDMSGetDeviceVoiceNumberResponse_MobileIDNumber only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Space to perform the copy? if (minSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMIN, pTLVx10, outLenx10 ); pMIN[outLenx10] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the IMSI // sDMSGetDeviceVoiceNumberResponse_IMSI only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { // Validate arguments if (pIn == 0 || esnSize == 0 || pESNString == 0 || imeiSize == 0 || pIMEIString == 0 || meidSize == 0 || pMEIDString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pESNString = 0; *pIMEIString = 0; *pMEIDString = 0; // Find the ESN // sDMSGetDeviceSerialNumbersResponse_ESN only contains this const CHAR * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (esnSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pESNString, pTLVx10, outLenx10 ); pESNString[outLenx10] = 0; // Find the IMEI // sDMSGetDeviceSerialNumbersResponse_IMEI only contains this const CHAR * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (imeiSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pIMEIString, pTLVx11, outLenx11 ); pIMEIString[outLenx11] = 0; // Find the MEID // sDMSGetDeviceSerialNumbersResponse_MEID only contains this const CHAR * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (meidSize < outLenx12 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMEIDString, pTLVx12, outLenx12 ); pMEIDString[outLenx12] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string thePIN( pCurrentPIN ); if (thePIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (thePIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockStateRequest_LockState ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockStateRequest_LockState * pTLVx01; pTLVx01 = (sDMSSetLockStateRequest_LockState*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mLockState = (eQMIDMSLockStates)state; memcpy( &pTLVx01->mLockCode[0], thePIN.c_str(), thePIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseQueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetLockStateResponse_LockState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetLockStateResponse_LockState )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mLockState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pCurrentPIN [ I ] - Current four digit PIN string pDesiredPIN [ I ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0 || pDesiredPIN == 0 || pDesiredPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string theCurPIN( pCurrentPIN ); if (theCurPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theCurPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } std::string theNewPIN( pDesiredPIN ); if (theNewPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theNewPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockCodeRequest_LockCode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockCodeRequest_LockCode * pTLVx01; pTLVx01 = (sDMSSetLockCodeRequest_LockCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mCurrentLockCode[0], theCurPIN.c_str(), theCurPIN.size() ); memcpy( &pTLVx01->mNewLockCode[0], theNewPIN.c_str(), theNewPIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the hardware revision // sDMSGetHardwareRevisionResponse_HardwareRevision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ) { // Validate arguments if (pIn == 0 || pPRLVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetPRLVersionResponse_PRLVersion * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetPRLVersionResponse_PRLVersion )) { return eGOBI_ERR_MALFORMED_RSP; } *pPRLVersion = pTLVx01->mPRLVersion; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ) { // Validate arguments if (pIn == 0 || pFileSize == 0 || *pFileSize == 0 || pFile == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure ULONG maxFileSize = *pFileSize; *pFileSize = 0; // Find the state const sDMSReadERIDataResponse_UserData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG fileSz = pTLVx01->mDataLength; const BYTE * pInFile; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData ) + sizeof( BYTE ) * fileSz) { return eGOBI_ERR_MALFORMED_RSP; } // Space to copy into? if (fileSz > maxFileSize) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pInFile = (const BYTE *)pTLVx01 + sizeof( sDMSReadERIDataResponse_UserData ); // Perform the copy memcpy( pFile, pInFile, fileSz ); *pFileSize = fileSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ) { // Validate arguments if (pOut == 0 || pActivationCode == 0 || pActivationCode[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string ac( pActivationCode ); if (ac.size() > 12) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSActivateAutomaticRequest_ActivationCode ) + (WORD)ac.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSActivateAutomaticRequest_ActivationCode * pTLVx01; pTLVx01 = (sDMSActivateAutomaticRequest_ActivationCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mCodeLength = (UINT8)ac.size(); memcpy( (BYTE *)pTLVx01 + sizeof( sDMSActivateAutomaticRequest_ActivationCode ), ac.c_str(), ac.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults CHANGES: * The client must manually reset the device after this request completes using DMSSetOperatingMode() PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSResetFactoryDefaultsRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSResetFactoryDefaultsRequest_SPC * pTLVx01; pTLVx01 = (sDMSResetFactoryDefaultsRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ) { // Validate arguments if (pIn == 0 || pActivationState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetActivationStateResponse_ActivationState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetActivationStateResponse_ActivationState )) { return eGOBI_ERR_MALFORMED_RSP; } *pActivationState = pTLVx01->mActivationState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetOperatingModeRequest_OperatingMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Set the mode sDMSSetOperatingModeRequest_OperatingMode * pTLVx01; pTLVx01 = (sDMSSetOperatingModeRequest_OperatingMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mOperatingMode = (eQMIDMSOperatingModes)powerMode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ) { // Validate arguments if (pIn == 0 || pPowerMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = 0xffffffff; // Find the mode const sDMSGetOperatingModeResponse_OperatingMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetOperatingModeResponse_OperatingMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pPowerMode = pTLVx01->mOperatingMode; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pIn == 0 || pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pReasonMask = 0; *pbPlatform = 0; // Find the reason mask (optional) const sDMSGetOperatingModeResponse_OfflineReason * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sDMSGetOperatingModeResponse_OfflineReason )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the bitmask to pReasonMask *pReasonMask = *(WORD*)pTLVx10; } // Find the platform restriction (optional) const sDMSGetOperatingModeResponse_PlatformRestricted * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sDMSGetOperatingModeResponse_PlatformRestricted )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the value *pbPlatform = pTLVx11->mPlatformRestricted; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTimeCount [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ) { // Validate arguments if (pIn == 0 || pTimeCount == 0 || pTimeSource == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the reason mask const sDMSGetTimestampResponse_Timestamp * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetTimestampResponse_Timestamp )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pTimeCount = pTLVx01->mTimestamp; // mSource is of type eQMIDMSTimestampSources *pTimeSource = pTLVx01->mSource; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSValidateSPCRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSValidateSPCRequest_SPC * pTLVx01; pTLVx01 = (sDMSValidateSPCRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationNAS.cpp000066400000000000000000001621551455567757300303560ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationNAS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (NAS Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" // Maximum length for a scanned network description const ULONG MAX_SNI_DESCRIPTION_LEN = 255; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sEVDOCustomSCPConfig // Struct to represent CDMA 1xEV-DO custom SCP config /*=========================================================================*/ struct sEVDOCustomSCPConfig { public: BYTE mbActive; ULONG mProtocolMask; ULONG mBroadcastMask; ULONG mApplicationMask; }; /*=========================================================================*/ // Struct sScannedNetworkInfo // Struct to represent scanned network information /*=========================================================================*/ struct sScannedNetworkInfo { public: USHORT mMCC; USHORT mMNC; ULONG mInUse; ULONG mRoaming; ULONG mForbidden; ULONG mPreferred; CHAR mDescription[MAX_SNI_DESCRIPTION_LEN]; }; /*=========================================================================*/ // Struct sScannedNetworkRATInfo // Struct to represent scanned network RAT information /*=========================================================================*/ struct sScannedNetworkRATInfo { public: USHORT mMCC; USHORT mMNC; ULONG mRAT; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: ParseGetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ) { // Validate arguments if (pIn == 0 || pStatus == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sNASGetANAAAAuthenticationStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetANAAAAuthenticationStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pStatus = pTLVx01->mANAAAAuthenticationStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSignalStrength DESCRIPTION: This function gets the current signal strength (in dBm) as measured by the device, the signal strength returned will be one of the currently available technologies with preference CDMA 1xEV-DO, CDMA, AMPS, WCDMA, GSM PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSignalStrength [ O ] - Received signal strength (dBm) pRadioInterface [ O ] - Radio interface technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ) { // Validate arguments if (pSignalStrength == 0 || pRadioInterface == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG sigSz = 12; INT8 sigs[12]; ULONG radios[12]; ULONG qcErr = ParseGetSignalStrengths( inLen, pIn, &sigSz, &sigs[0], &radios[0] ); if (qcErr != eGOBI_ERR_NONE) { return qcErr; } std::map sigMap; for (ULONG s = 0; s < sigSz; s++) { sigMap[radios[s]] = sigs[s]; } std::map ::const_iterator pIter; // HDR? pIter = sigMap.find( 2 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // CDMA? pIter = sigMap.find( 1 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // AMPS? pIter = sigMap.find( 3 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // WCDMA? pIter = sigMap.find( 5 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // GSM? pIter = sigMap.find( 4 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // Error values *pSignalStrength = -128; *pRadioInterface = 0; return eGOBI_ERR_NO_SIGNAL; } /*=========================================================================== METHOD: ParseGetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { // Validate arguments if (pIn == 0 || pArraySizes == 0 || *pArraySizes == 0 || pSignalStrengths == 0 || pRadioInterfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSignals = (ULONG)*pArraySizes; // Assume failure *pArraySizes = 0; // Find the first signal strength value const sNASGetSignalStrengthResponse_SignalStrength * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetSignalStrengthResponse_SignalStrength )) { return eGOBI_ERR_MALFORMED_RSP; } // Weed out bogus values std::map sigMap; INT8 sigVal = pTLVx01->mSignalStrengthdBm; ULONG radioVal = pTLVx01->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Handle list, if present const sNASGetSignalStrengthResponse_SignalStrengthList * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG auxSigs = pTLVx10->mNumberOfInfoInstances; if (auxSigs > maxSignals) { auxSigs = maxSignals; } const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo * pInfo; // Verify there is room for the array in the TLV if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList ) + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList::sInfo ) * auxSigs) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInfo = (const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )); for (ULONG s = 0; s < auxSigs; s++) { sigVal = pInfo->mSignalStrengthdBm; radioVal = pInfo->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Move pInfo forward one element pInfo++; } } ULONG sigCount = 0; std::map ::const_iterator pIter; for (pIter = sigMap.begin(); pIter != sigMap.end(); pIter++, sigCount++) { if (sigCount < maxSignals) { pSignalStrengths[sigCount] = pIter->second; pRadioInterfaces[sigCount] = pIter->first; *pArraySizes = sigCount + 1; } } // No valid signals? if (sigCount == 0) { return eGOBI_ERR_NO_SIGNAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetRFInfo DESCRIPTION: This function gets the current RF information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pInstanceSize; *pInstanceSize = 0; // Find the TLV const sNASGetRFInfoResponse_RFInfo * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE ifaceCount = pTLVx01->mNumberOfInstances; if (ifaceCount > maxInstances) { ifaceCount = maxInstances; } const sNASGetRFInfoResponse_RFInfo::sInstance * pInstance; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo ) + sizeof( sNASGetRFInfoResponse_RFInfo::sInstance ) * ifaceCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInstance = (const sNASGetRFInfoResponse_RFInfo::sInstance *) ((const BYTE *)pTLVx01 + sizeof( sNASGetRFInfoResponse_RFInfo )); ULONG * pOutput = (ULONG *)pInstances; for (BYTE i = 0; i < ifaceCount; i++) { *pOutput++ = pInstance->mRadioInterface; *pOutput++ = pInstance->mActiveBandClass; *pOutput++ = pInstance->mActiveChannel; // Move pInstance forward one element pInstance++; } *pInstanceSize = ifaceCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; // Assume failure *pInstanceSize = 0; // Find the TLV const sNASPerformNetworkScanResponse_NetworkInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sNASPerformNetworkScanResponse_NetworkInfo )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 netCount = pTLVx10->mNumberOfInfoInstances; if (netCount > maxInstances) { netCount = maxInstances; } const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo * pNetInfo; // Align to the first array element pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASPerformNetworkScanResponse_NetworkInfo )); ULONG offset = sizeof( sNASPerformNetworkScanResponse_NetworkInfo ); sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } pNet->mMCC = pNetInfo->mMobileCountryCode; pNet->mMNC = pNetInfo->mMobileNetworkCode; pNet->mInUse = pNetInfo->mInUseStatus; pNet->mRoaming = pNetInfo->mRoamingStatus; pNet->mForbidden = pNetInfo->mForbiddenStatus; pNet->mPreferred = pNetInfo->mPreferredStatus; memset( &pNet->mDescription[0], 0, MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pNetInfo->mDescriptionLength; if (descLen > 0) { // Move pNetInfo forward pNetInfo++; offset += sizeof( sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo ); // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } std::string netDesc( (LPCSTR)pNetInfo ); ULONG actualLen = (ULONG)netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } LPCSTR pNetDesc = netDesc.c_str(); memcpy( &pNet->mDescription[0], pNetDesc, actualLen ); // Move pNetInfo past string pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pNetInfo + descLen); offset += descLen; } pNet++; } *pInstanceSize = (BYTE)netCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0 || pRATSize == 0 || *pRATSize == 0 || pRATInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRATInstances = *pRATSize; // Assume failure *pInstanceSize = 0; *pRATSize = 0; // First, generate the instances using ParsePerformNetworkScan ULONG rc = ParsePerformNetworkScan( inLen, pIn, pInstanceSize, pInstances ); if (rc != eGOBI_ERR_NONE) { return rc; } // Now find the RAT info too // Find the TLV const sNASPerformNetworkScanResponse_NetworkRAT * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 ratCount = pTLVx11->mNumberOfInfoInstances; if (ratCount > maxRATInstances) { ratCount = maxRATInstances; } const sNASPerformNetworkScanResponse_NetworkRAT::sInfo * pRatInfo; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT ) + sizeof( sNASPerformNetworkScanResponse_NetworkRAT::sInfo ) * ratCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRatInfo = (const sNASPerformNetworkScanResponse_NetworkRAT::sInfo *) ((const BYTE *)pTLVx11 + sizeof( sNASPerformNetworkScanResponse_NetworkRAT )); sScannedNetworkRATInfo * pRAT = (sScannedNetworkRATInfo *)pRATInstances; for (BYTE r = 0; r < ratCount; r++) { pRAT->mMCC = pRatInfo->mMobileCountryCode; pRAT->mMNC = pRatInfo->mMobileNetworkCode; pRAT->mRAT = pRatInfo->mRadioAccessTechnology; pRAT++; pRatInfo++; } *pRATSize = (BYTE)ratCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the action // Check size WORD tlvx01Sz = sizeof( sNASInitiateNetworkRegisterRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_Action * pTLVx01; pTLVx01 = (sNASInitiateNetworkRegisterRequest_Action*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mRegisterAction = (eQMINASRegisterActions)regType; offset += tlvx01Sz; // Set the info // Check size WORD tlvx10Sz = sizeof( sNASInitiateNetworkRegisterRequest_ManualInfo ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_ManualInfo * pTLVx10; pTLVx10 = (sNASInitiateNetworkRegisterRequest_ManualInfo*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMobileCountryCode = mcc; pTLVx10->mMobileNetworkCode = mnc; pTLVx10->mRadioAccessTechnology = (eQMINASRadioAccessTechnologies)rat; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASInitiateAttachRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateAttachRequest_Action * pTLVx10; pTLVx10 = (sNASInitiateAttachRequest_Action*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mPSAttachAction = (eQMINASPSAttachActions)action; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { // Validate arguments if (pIn == 0 || pRegistrationState == 0 || pCSDomain == 0 || pPSDomain == 0 || pRAN == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0 || pRoaming == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRadioIfaces = *pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; *pRoaming = 0xffffffff; *pMCC = 0xffff; *pMNC = 0xffff; *pName = 0; // Parse the serving system (mandatory) // Find the TLV const sNASGetServingSystemResponse_ServingSystem * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pRegistrationState = pTLVx01->mRegistrationState; *pCSDomain = pTLVx01->mCSAttachState; *pPSDomain = pTLVx01->mPSAttachState; *pRAN = pTLVx01->mRegisteredNetwork; BYTE activeRadioIfaces = pTLVx01->mNumberOfRadioInterfacesInUse; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMINASRadioInterfaces * pRadioInfo; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem ) + sizeof( eQMINASRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRadioInfo = (const eQMINASRadioInterfaces *) ((const BYTE *)pTLVx01 + sizeof( sNASGetServingSystemResponse_ServingSystem )); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pRadioInfo; pOutRadioIfaces++; pRadioInfo++; } *pRadioIfacesSize = activeRadioIfaces; // Find the roaming indicator (optional) const sNASGetServingSystemResponse_RoamingIndicator * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetServingSystemResponse_RoamingIndicator )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pRoaming = (eQMINASRoamingIndicators)pTLVx10->mRoamingIndicator; } // Find the PLMN (optional) const sNASGetServingSystemResponse_CurrentPLMN * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN )) { return eGOBI_ERR_MALFORMED_RSP; } *pMCC = pTLVx12->mMobileCountryCode; *pMNC = pTLVx12->mMobileNetworkCode; ULONG descLen = pTLVx12->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx12 + sizeof( sNASGetServingSystemResponse_CurrentPLMN )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ) { // Validate arguments if (pIn == 0 || pDataCapsSize == 0 || *pDataCapsSize == 0 || pDataCaps == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxDataCaps = *pDataCapsSize; // Assume failure *pDataCapsSize = 0; // Find the TLV const sNASGetServingSystemResponse_DataServices * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE activeDataCaps = pTLVx11->mNumberOfDataCapabilities; if (activeDataCaps > maxDataCaps) { activeDataCaps = maxDataCaps; } const eQMINASDataServiceCapabilities2 * pInDataCaps; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices ) + sizeof( eQMINASDataServiceCapabilities2 ) * activeDataCaps) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInDataCaps = (const eQMINASDataServiceCapabilities2 *) ((const BYTE *)pTLVx11 + sizeof( sNASGetServingSystemResponse_DataServices )); ULONG * pOutDataCaps = (ULONG *)pDataCaps; for (ULONG d = 0; d < activeDataCaps; d++) { *pOutDataCaps = *pInDataCaps; pOutDataCaps++; pInDataCaps++; } *pDataCapsSize = activeDataCaps; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { // Validate arguments if (pIn == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0 || pSID == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pName = 0; *pSID = 0xffff; *pNID = 0xffff; // Find the name (mandatory) const sNASGetHomeNetworkResponse_HomeNetwork * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pMCC = pTLVx01->mMobileCountryCode; *pMNC = pTLVx01->mMobileNetworkCode; ULONG descLen = pTLVx01->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx01 + sizeof( sNASGetHomeNetworkResponse_HomeNetwork )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; // Find the SID/NID (optional) const sNASGetHomeNetworkResponse_HomeIDs * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetHomeNetworkResponse_HomeIDs )) { return eGOBI_ERR_MALFORMED_RSP; } *pSID = pTLVx10->mSystemID; *pNID = pTLVx10->mNetworkID; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetTechnologyPreferenceRequest_Preference ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetTechnologyPreferenceRequest_Preference * pTLVx01; pTLVx01 = (sNASSetTechnologyPreferenceRequest_Preference*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Copy technology preference WORD as-is memcpy( &pTLVx01->mValOfTechnology, &technologyPref, 2 ); pTLVx01->mDuration = (eQMINASTechPrefDurations)duration; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { // Validate arguments if (pIn == 0 || pTechnologyPref == 0 || pDuration == 0 || pPersistentTechnologyPref == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the preference (mandatory) const sNASGetTechnologyPreferenceResponse_ActivePreference * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetTechnologyPreferenceResponse_ActivePreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pTechnologyPref, &pTLVx01->mValOfTechnology, 2 ); *pDuration = pTLVx01->mDuration; // Until we know any better the persistent setting is the current setting *pPersistentTechnologyPref = *pTechnologyPref; // Find the persistant technology preference (optional) const sNASGetTechnologyPreferenceResponse_PersistentPreference * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetTechnologyPreferenceResponse_PersistentPreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pPersistentTechnologyPref, &pTLVx10->mValOfTechnology, 2 ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // If you specify one of the custom SCP config fields then you must // specify them all ULONG scpCount = 0; if (pCustomSCP != 0) { scpCount++; } if (pProtocol != 0) { scpCount++; } if (pBroadcast != 0) { scpCount++; } if (pApplication != 0) { scpCount++; } if (scpCount != 0 && scpCount != 4) { return eGOBI_ERR_INVALID_ARG; } // Rev. 0 and SCP custom config are mutually exclusive if (pForceRev0 != 0 && scpCount == 4) { if (*pForceRev0 != 0 && *pCustomSCP != 0) { return eGOBI_ERR_INVALID_ARG; } } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Need to start with SPC? if (pForceRev0 != 0 || scpCount == 4) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASSetNetworkParametersRequest_SPC ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_SPC * pTLVx10; pTLVx10 = (sNASSetNetworkParametersRequest_SPC*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values memcpy( &pTLVx10->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx10Sz; } // Force Rev. 0? if (pForceRev0 != 0) { // Check size WORD tlvx14Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDORevision ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDORevision * pTLVx14; pTLVx14 = (sNASSetNetworkParametersRequest_CDMA1xEVDORevision*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mForceCDMA1xEVDORev0 = (*pForceRev0 == 0 ? 0 : 1); offset += tlvx14Sz; } if (scpCount == 4) { // Check size WORD tlvx15Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom * pTLVx15; pTLVx15 = (sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the values pTLVx15->mCDMA1xEVDOSCPCustomConfig = (*pCustomSCP == 0 ? 0 : 1); // The pProtocol bitmask pTLVx15->mSubtype2PhysicalLayer = (*pProtocol & 0x00000001 ? 1 : 0); pTLVx15->mEnhancedCCMAC = (*pProtocol & 0x00000002 ? 1 : 0); pTLVx15->mEnhancedACMAC = (*pProtocol & 0x00000004 ? 1 : 0); pTLVx15->mEnhancedFTCMAC = (*pProtocol & 0x00000008 ? 1 : 0); pTLVx15->mSubtype3RTCMAC = (*pProtocol & 0x00000010 ? 1 : 0); pTLVx15->mSubtype1RTCMAC = (*pProtocol & 0x00000020 ? 1 : 0); pTLVx15->mEnhancedIdle = (*pProtocol & 0x00000040 ? 1 : 0); pTLVx15->mGenericMultimodeCapableDiscPort = (*pProtocol & 0x00000080 ? 1 : 0); pTLVx15->mGenericBroadcast = (*pBroadcast & 0x00000001 ? 1 : 0); pTLVx15->mSNMultiflowPacketApplication = (*pApplication & 0x00000001 ? 1 : 0); pTLVx15->mSNEnhancedMultiflowPacketApplication = (*pApplication & 0x00000002 ? 1 : 0); offset += tlvx15Sz; } if (pRoaming != 0) { // Check size WORD tlvx16Sz = sizeof( sNASSetNetworkParametersRequest_Roaming ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_Roaming * pTLVx16; pTLVx16 = (sNASSetNetworkParametersRequest_Roaming*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the values pTLVx16->mRoamPreference = (eQMINASRoamingPreferences)*pRoaming; offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset == 0) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetCDMANetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pIn == 0 || pSCI == 0 || pSCM == 0 || pRegHomeSID == 0 || pRegForeignSID == 0 || pRegForeignNID == 0 || pForceRev0 == 0 || pCustomSCP == 0 || pProtocol == 0 || pBroadcast == 0 || pApplication == 0 || pRoaming == 0) { return eGOBI_ERR_INVALID_ARG; } *pSCI = 0xff; *pSCM = 0xff; *pRegHomeSID = 0xff; *pRegForeignSID = 0xff; *pRegForeignNID = 0xff; *pForceRev0 = 0xff; *pCustomSCP = 0xff; *pProtocol = 0xffffffff; *pBroadcast = 0xffffffff; *pApplication = 0xffffffff; *pRoaming = 0xff; // Find the SCI const sNASGetNetworkParametersResponse_SCI * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sNASGetNetworkParametersResponse_SCI )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCI = pTLVx11->mSlotCycleIndex; } // Find the SCM const sNASGetNetworkParametersResponse_SCM * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetNetworkParametersResponse_SCM )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCM = pTLVx12->mStationClassMark; } // Find the Registration const sNASGetNetworkParametersResponse_Registration * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sNASGetNetworkParametersResponse_Registration )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx13->mRegisterOnHomeSystem; *pRegForeignSID = pTLVx13->mRegisterOnForeignSystem; *pRegForeignNID = pTLVx13->mRegisterOnForeignNetwork; } // Rev. 0? const sNASGetNetworkParametersResponse_CDMA1xEVDORevision * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sNASGetNetworkParametersResponse_CDMA1xEVDORevision )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx14->mForceCDMA1xEVDORev0; } // We're lazy, so we'll just typecast all the bitmask members from // sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom into their // respective container parameters const sEVDOCustomSCPConfig * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sEVDOCustomSCPConfig )) { return eGOBI_ERR_MALFORMED_RSP; } *pCustomSCP = pTLVx15->mbActive; *pProtocol = pTLVx15->mProtocolMask; *pBroadcast = pTLVx15->mBroadcastMask; *pApplication = pTLVx15->mApplicationMask; } // Roaming? const sNASGetNetworkParametersResponse_Roaming * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sNASGetNetworkParametersResponse_Roaming )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoaming = (eQMINASRoamingPreferences)pTLVx16->mRoamPreference; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ) { // Validate arguments if (pIn == 0 || pACCOLC == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the ACCOLC (mandatory) const sNASGetACCOLCResponse_ACCOLC * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetACCOLCResponse_ACCOLC )) { return eGOBI_ERR_MALFORMED_RSP; } *pACCOLC = pTLVx01->mACCOLC; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetACCOLCRequest_ACCOLC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetACCOLCRequest_ACCOLC * pTLVx01; pTLVx01 = (sNASSetACCOLCRequest_ACCOLC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mACCOLC = accolc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode (mandatory) const sNASGetCSPPLMNModeResponse_Mode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx10 < sizeof( sNASGetCSPPLMNModeResponse_Mode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mRestrictManualPLMNSelection; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASGetPLMNNameRequest_PLMN ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASGetPLMNNameRequest_PLMN * pTLVx01; pTLVx01 = (sNASGetPLMNNameRequest_PLMN*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMobileCountryCode = mcc; pTLVx01->mMobileNetworkCode = mnc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ) { // Validate arguments if (pIn == 0 || *pNamesSize == 0 || pNames == 0) { return eGOBI_ERR_INVALID_ARG; } const BYTE * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // The output format just happens to be the same as // sNASGetPLMNNameResponse_Name. Copy the full TLV to pNames if (outLenx10 > *pNamesSize) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNames, pTLVx10, outLenx10 ); *pNamesSize = outLenx10; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationOMA.cpp000066400000000000000000000336111455567757300303430ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationOMA.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (OMADM Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackOMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add sessionType // Check size WORD tlvx10Sz = sizeof( sOMAStartSessionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMAStartSessionRequest_Type * pTLVx10; pTLVx10 = (sOMAStartSessionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSessionType = (eQMIOMASessionTypes)sessionType; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { // Validate arguments if (pIn == 0 || pSessionState == 0 || pSessionType == 0 || pFailureReason == 0 || pRetryCount == 0 || pSessionPause == 0 || pTimeRemaining == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetSessionInfoResponse_Info * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetSessionInfoResponse_Info )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionState = pTLVx10->mSessionState; *pSessionType = pTLVx10->mSessionType; // Find the second TLV const sOMAGetSessionInfoResponse_Failure * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sOMAGetSessionInfoResponse_Failure )) { return eGOBI_ERR_MALFORMED_RSP; } *pFailureReason = pTLVx11->mSessionFailure; // Find the third TLV const sOMAGetSessionInfoResponse_Retry * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sOMAGetSessionInfoResponse_Retry )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryCount = pTLVx12->mRetryCount; *pSessionPause = pTLVx12->mRetryPauseTimer; *pTimeRemaining = pTLVx12->mRemainingTime; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ) { // Validate arguments if (pIn == 0 || pSessionType == 0 || pSessionID == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sOMAGetSessionInfoResponse_NIA * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sOMAGetSessionInfoResponse_NIA )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionID = pTLVx13->mSessionID; *pSessionType = pTLVx13->mSessionType; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add selection and session ID // Check size WORD tlvx10Sz = sizeof( sOMASendSelectionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASendSelectionRequest_Type * pTLVx10; pTLVx10 = (sOMASendSelectionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mSelection = (eQMIOMASelections)selection; pTLVx10->mSessionID = sessionID; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { // Validate arguments if (pIn == 0 || pbProvisioning == 0 || pbPRLUpdate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetFeaturesResponse_Provisioning * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_Provisioning )) { return eGOBI_ERR_MALFORMED_RSP; } *pbProvisioning = pTLVx10->mDeviceProvisioningServiceUpdateEnabled; // Find the second TLV const sOMAGetFeaturesResponse_PRLUpdate * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_PRLUpdate )) { return eGOBI_ERR_MALFORMED_RSP; } *pbPRLUpdate = pTLVx11->mPRLServiceUpdateEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bProvisioning // Check size WORD tlvx10Sz = sizeof( sOMASetFeaturesRequest_Provisioning ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_Provisioning * pTLVx10; pTLVx10 = (sOMASetFeaturesRequest_Provisioning*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mDeviceProvisioningServiceUpdateEnabled = (INT8)bProvisioning; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bPRLUpdate // Check size WORD tlvx11Sz = sizeof( sOMASetFeaturesRequest_PRLUpdate ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_PRLUpdate * pTLVx11; pTLVx11 = (sOMASetFeaturesRequest_PRLUpdate*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPRLServiceUpdateEnabled = (INT8)bPRLUpdate; offset += tlvx11Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationPDS.cpp000066400000000000000000001033461455567757300303600ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationPDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Position Determination Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ) { // Validate arguments (at least one mask must be present) if (pOut == 0 || (pGPSDataMask == 0 && pCellDataMask == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Optionally add pGPSDataMask if (pGPSDataMask != 0) { // Check size WORD tlvx10Sz = sizeof( sPDSResetPDSDataRequest_GPSData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_GPSData * pTLVx10; pTLVx10 = (sPDSResetPDSDataRequest_GPSData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx10 = *pGPSDataMask; offset += tlvx10Sz; } // Optionally add pCellDataMask if (pCellDataMask != 0) { // Check size WORD tlvx11Sz = sizeof( sPDSResetPDSDataRequest_CellData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_CellData * pTLVx11; pTLVx11 = (sPDSResetPDSDataRequest_CellData*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx11 = *pCellDataMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetCOMPortAutoTrackingConfigRequest_Config ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetCOMPortAutoTrackingConfigRequest_Config * pTLVx01; pTLVx01 = (sPDSSetCOMPortAutoTrackingConfigRequest_Config*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetCOMPortAutoTrackingConfigResponse_Config * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetCOMPortAutoTrackingConfigResponse_Config )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceAutoTrackingStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceAutoTrackingStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceAutoTrackingStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetServiceAutoTrackingStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceAutoTrackingStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetAGPSConfigRequest_Server ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetAGPSConfigRequest_Server * pTLVx10; pTLVx10 = (sPDSSetAGPSConfigRequest_Server*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (serverAddress & 0x000000FF); ULONG ip1 = (serverAddress & 0x0000FF00) >> 8; ULONG ip2 = (serverAddress & 0x00FF0000) >> 16; ULONG ip3 = (serverAddress & 0xFF000000) >> 24; // Set the values pTLVx10->mServerAddress[0] = (INT8)ip0; pTLVx10->mServerAddress[1] = (INT8)ip1; pTLVx10->mServerAddress[2] = (INT8)ip2; pTLVx10->mServerAddress[3] = (INT8)ip3; pTLVx10->mServerPort = serverPort; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ) { // Validate arguments if (pIn == 0 || pServerAddress == 0 || pServerPort == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetAGPSConfigResponse_ServerAddress * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetAGPSConfigResponse_ServerAddress )) { return eGOBI_ERR_MALFORMED_RSP; } *pServerPort = pTLVx01->mServerPort; ULONG ip0 = (ULONG)pTLVx01->mServerAddress[0]; ULONG ip1 = (ULONG)pTLVx01->mServerAddress[1] << 8; ULONG ip2 = (ULONG)pTLVx01->mServerAddress[2] << 16; ULONG ip3 = (ULONG)pTLVx01->mServerAddress[3] << 24; *pServerAddress = (ip0 | ip1 | ip2 | ip3); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRATime ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRATime * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRATime*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRATime * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRATime )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRAData ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRAData * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRAData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRAData * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRAData )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { // Validate arguments if (pIn == 0 || pGPSWeek == 0 || pGPSWeekOffset == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Validity * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sPDSGetXTRAParametersResponse_Validity )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx13->mValidPeriodDurationInHours; *pGPSWeek = pTLVx13->mValidPeriodGPSStartWeek; *pGPSWeekOffset = pTLVx13->mValidPeriodGPSStartWeekOffsetInMinutes; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add preference // Check size WORD tlvx12Sz = sizeof( sPDSSetXTRAParametersRequest_Network ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Network * pTLVx12; pTLVx12 = (sPDSSetXTRAParametersRequest_Network*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mWWANNetworkPreference = (eQMIPDSWWANNetworkPreferences)preference; offset += tlvx12Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ) { // Validate arguments if (pIn == 0 || pPreference == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pPreference const sPDSGetXTRAParametersResponse_Network * pTLVx12; ULONG outLenx12; ULONG rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sPDSGetXTRAParametersResponse_Network )) { return eGOBI_ERR_MALFORMED_RSP; } *pPreference = pTLVx12->mWWANNetworkPreference; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetXTRAParametersRequest_Automatic ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Automatic * pTLVx10; pTLVx10 = (sPDSSetXTRAParametersRequest_Automatic*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutomaticDownloadEnabled = (bEnabled == 0 ? 0 : 1); pTLVx10->mDownloadIntervalInHours = interval; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pInterval == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Automatic * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetXTRAParametersResponse_Automatic )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mAutomaticDownloadEnabled; *pInterval = pTLVx10->mDownloadIntervalInHours; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pTracking == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetServiceStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx01->mServiceEnabled; *pTracking = pTLVx01->mTrackingSessionState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add enable // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mServiceEnabled = (enable == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackPDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSInjectTimeReferenceRequest_Time ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSInjectTimeReferenceRequest_Time * pTLVx01; pTLVx01 = (sPDSInjectTimeReferenceRequest_Time*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mSystemTimeMilliseconds = systemTime; pTLVx01->mSystemDiscontinuties = systemDiscontinuities; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { // Validate arguments if (pIn == 0 || pOperation == 0 || pTimeout == 0 || pInterval == 0 || pAccuracy == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetDefaultsResponse_Defaults * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetDefaultsResponse_Defaults )) { return eGOBI_ERR_MALFORMED_RSP; } *pOperation = pTLVx01->mSessionOperation; *pTimeout = pTLVx01->mTimeoutSeconds; *pInterval = pTLVx01->mFixRequestIntervalSeconds; *pAccuracy = pTLVx01->mDesiredAccuracyMeters; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSSetDefaultsRequest_Defaults ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetDefaultsRequest_Defaults * pTLVx01; pTLVx01 = (sPDSSetDefaultsRequest_Defaults*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mDesiredAccuracyMeters = accuracy; pTLVx01->mFixRequestIntervalSeconds = interval; pTLVx01->mSessionOperation = (eQMIPDSOperationTypes)operation; pTLVx01->mTimeoutSeconds = timeout; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationRMS.cpp000066400000000000000000000134271455567757300303730ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationRMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Remote Management Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pWakeMask == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sRMSGetSMSWakeResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sRMSGetSMSWakeResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } // Find the second TLV const sRMSGetSMSWakeRequest_Mask * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sRMSGetSMSWakeRequest_Mask )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mSMSWakeEnabled; *pWakeMask = pTLVx11->mMask; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bEnable // Check size WORD tlvx10Sz = sizeof( sRMSSetSMSWakeRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_State * pTLVx10; pTLVx10 = (sRMSSetSMSWakeRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSMSWakeEnabled = (INT8)bEnable; offset += tlvx10Sz; // Add wakeMask if enabled if (bEnable != 0) { // Check size WORD tlvx11Sz = sizeof( sRMSSetSMSWakeRequest_Mask ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_Mask * pTLVx11; pTLVx11 = (sRMSSetSMSWakeRequest_Mask*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mMask = wakeMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationUIM.cpp000066400000000000000000001065201455567757300303610ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationUIM.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS_UIM Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockControlKeyResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockControlKeyResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockControlKeyRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMUnblockControlKeyRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMUnblockControlKeyRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mControlKeyLength = valSz; offset += sizeof( sDMSUIMUnblockControlKeyRequest_Facility ); memcpy( (pOut + offset), (LPCSTR)val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetControlKeyProtectionResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetControlKeyProtectionResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetControlKeyProtectionRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMSetControlKeyProtectionRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mFacilityState = (eQMIDMSUIMFacilityStates)status; pTLVx01->mControlKeyLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ); memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; // Find the last (optional) argument if (pbBlocking != 0) { const sDMSUIMGetControlKeyStatusResponse_Blocking * pTLVx10; ULONG tlvLenx10; rc = GetTLV( inLen, pIn, 0x10, &tlvLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLenx10 < sizeof( sDMSUIMGetControlKeyStatusResponse_Blocking )) { return eGOBI_ERR_MALFORMED_RSP; } *pbBlocking = pTLVx10->mOperationBlocking; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add id // Check size WORD tlvx01Sz = sizeof( sDMSUIMGetControlKeyStatusRequest_Facility ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMGetControlKeyStatusRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMGetControlKeyStatusRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyStatus DESCRIPTION: This function requests the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Request is the same as PackUIMGetControlKeyBlockingStatus return PackUIMGetControlKeyBlockingStatus( pOutLen, pOut, id ); } /*=========================================================================== METHOD: ParseUIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMGetICCIDResponse_ICCID * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetICCIDResponse_ICCID )) { return eGOBI_ERR_MALFORMED_RSP; } // The TLV only contains the string // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, (const CHAR*)pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || id < 1 || id > 2 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG tlvLen; // The typeID is either 0x11 or 0x12 if (id == 1) { const sDMSUIMGetPINStatusResponse_PIN1Status * pTLV11; ULONG rc = GetTLV( inLen, pIn, 0x11, &tlvLen, (const BYTE **)&pTLV11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN1Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV11->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV11->mRemainingUnblockRetries; *pStatus = pTLV11->mPINStatus; } else if (id == 2) { const sDMSUIMGetPINStatusResponse_PIN2Status * pTLV12; ULONG rc = GetTLV( inLen, pIn, 0x12, &tlvLen, (const BYTE **)&pTLV12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN2Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV12->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV12->mRemainingUnblockRetries; *pStatus = pTLV12->mPINStatus; } else { return eGOBI_ERR_INVALID_ARG; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMChangePINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMChangePINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pOldValue == 0 || pOldValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pOldValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMChangePINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMChangePINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMChangePINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mOldPINLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMChangePINRequest_Info1 ); // mOldPINValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMChangePINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMChangePINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMChangePINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pPUKValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pPUKValue == 0 || pPUKValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pPUKValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockPINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMUnblockPINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMUnblockPINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mPUKLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info1 ); // mPUKValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMUnblockPINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMUnblockPINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMVerifyPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMVerifyPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMVerifyPINRequest_Info ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMVerifyPINRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMVerifyPINRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINLength = valSz; offset += sizeof( sDMSUIMVerifyPINRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetPINProtectionResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetPINProtectionResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); ULONG valSz = (ULONG)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetPINProtectionRequest_Info ) + (WORD)valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetPINProtectionRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMSetPINProtectionRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINEnabled = (bEnable == 0 ? 0 : 1); pTLVx01->mPINLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetPINProtectionRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationVoice.cpp000066400000000000000000000131321455567757300307700ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationVoice.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Voice Service for USSD) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sUSSDInfo // Struct to represent USSD/Alpha information header /*=========================================================================*/ struct sUSSDInfoHdr { public: BYTE mDCS; BYTE mLength; // Data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: PackOriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } // Add pInfo sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackAnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationWDS.cpp000066400000000000000000003064601455567757300303710ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WDS Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetPacketServiceStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetPacketServiceStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mConnectionStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ) { // Validate arguments if (pIn == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataSessionDurationResponse_Duration * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataSessionDurationResponse_Duration )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx01->mDataSessionDuration; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDormancyResponse_DormancyStatus * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDormancyResponse_DormancyStatus )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mDormancyStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ) { // Validate arguments if (pIn == 0 || pSetting == 0 || pRoamSetting == 0) { return eGOBI_ERR_INVALID_ARG; } *pSetting = 0xffffffff; *pRoamSetting = 0xffffffff; // Find the first TLV const sWDSGetAutoconnectSettingResponse_Autoconnect * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetAutoconnectSettingResponse_Autoconnect )) { return eGOBI_ERR_MALFORMED_RSP; } *pSetting = pTLVx01->mAutoconnectSetting; // Find the second TLV (optional) const sWDSGetAutoconnectSettingResponse_Roam * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Is the TLV large enough? if (outLenx10 < sizeof( sWDSGetAutoconnectSettingResponse_Roam )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoamSetting = pTLVx10->mAutoconnectRoamSetting; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add setting // Check size WORD tlvx01Sz = sizeof( sWDSSetAutoconnectSettingRequest_Autoconnect ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Autoconnect * pTLVx01; pTLVx01 = (sWDSSetAutoconnectSettingRequest_Autoconnect*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoconnectSetting = (eQMIWDSAutoconnectSettings)setting; offset += tlvx01Sz; // Add roam setting, if specified if (pRoamSetting != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetAutoconnectSettingRequest_Roam ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Roam * pTLVx10; pTLVx10 = (sWDSSetAutoconnectSettingRequest_Roam*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutoconnectRoamSetting = (eQMIWDSAutoconnectRoamSettings)*pRoamSetting; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSModifyProfileRequest_ProfileIdentifier ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_ProfileIdentifier * pTLVx01; pTLVx01 = (sWDSModifyProfileRequest_ProfileIdentifier*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; pTLVx01->mProfileIndex = 1; offset += tlvx01Sz; // Add name, if specified if (pName != 0) { std::string name( pName ); // Check size WORD tlvx10Sz = (WORD)name.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( pOut + offset, name.c_str(), name.size() ); offset += tlvx10Sz; } // Add PDP type, if specified if (pPDPType != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSModifyProfileRequest_PDPType ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PDPType * pTLVx11; pTLVx11 = (sWDSModifyProfileRequest_PDPType*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPDPType = (eQMIPDPTypes)*pPDPType; offset += tlvx11Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSModifyProfileRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PrimaryDNS * pTLVx15; pTLVx15 = (sWDSModifyProfileRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSModifyProfileRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_SecondaryDNS * pTLVx16; pTLVx16 = (sWDSModifyProfileRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx16->mIPV4Address[0] = (INT8)ip0; pTLVx16->mIPV4Address[1] = (INT8)ip1; pTLVx16->mIPV4Address[2] = (INT8)ip2; pTLVx16->mIPV4Address[3] = (INT8)ip3; offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx1BSz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1BSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1B; pHeader->mLength = tlvx1BSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx1BSz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx1CSz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1CSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1C; pHeader->mLength = tlvx1CSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx1CSz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx1DSz = sizeof( sWDSModifyProfileRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1DSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1D; pHeader->mLength = tlvx1DSz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_Authentication * pTLVx1D; pTLVx1D = (sWDSModifyProfileRequest_Authentication*)(pOut + offset); memset( pTLVx1D, 0, tlvx1DSz ); // Set the value pTLVx1D->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx1D->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx1DSz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx1ESz = sizeof( sWDSModifyProfileRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1ESz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1E; pHeader->mLength = tlvx1ESz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_IPAddress * pTLVx1E; pTLVx1E = (sWDSModifyProfileRequest_IPAddress*)(pOut + offset); memset( pTLVx1E, 0, tlvx1ESz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx1E->mIPV4Address[0] = (INT8)ip0; pTLVx1E->mIPV4Address[1] = (INT8)ip1; pTLVx1E->mIPV4Address[2] = (INT8)ip2; pTLVx1E->mIPV4Address[3] = (INT8)ip3; offset += tlvx1ESz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being read RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSGetDefaultSettingsRequest_ProfileType ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetDefaultSettingsRequest_ProfileType * pTLVx01; pTLVx01 = (sWDSGetDefaultSettingsRequest_ProfileType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { // Validate arguments if (pIn == 0 || pPDPType == 0 || pIPAddress == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0 || pAuthentication == 0 || nameSize == 0 || pName == 0 || apnSize == 0 || pAPNName == 0 || userSize == 0 || pUsername == 0) { return eGOBI_ERR_INVALID_ARG; } // Set defaults *pPDPType = 0xffffffff; *pIPAddress = 0xffffffff; *pPrimaryDNS = 0xffffffff; *pSecondaryDNS = 0xffffffff; *pAuthentication = 0xffffffff; pName[0] = 0; pAPNName[0] = 0; pUsername[0] = 0; // Find the name const sWDSGetDefaultSettingsResponse_ProfileName * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (nameSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pName, (const BYTE *)pTLVx10, outLenx10 ); // Null terminate pName[outLenx10] = 0; } // Find the PDP type const sWDSGetDefaultSettingsResponse_PDPType * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDefaultSettingsResponse_PDPType )) { return eGOBI_ERR_MALFORMED_RSP; } *pPDPType = pTLVx11->mPDPType; } // Find the APN name const sWDSGetDefaultSettingsResponse_APNName * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (apnSize < outLenx14 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx14, outLenx14 ); // Null terminate pAPNName[outLenx14] = 0; } // Find the Primary DNS const sWDSGetDefaultSettingsResponse_PrimaryDNS * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetDefaultSettingsResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx15->mIPV4Address[0]; ULONG ip1 = pTLVx15->mIPV4Address[1] << 8; ULONG ip2 = pTLVx15->mIPV4Address[2] << 16; ULONG ip3 = pTLVx15->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDefaultSettingsResponse_SecondaryDNS * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetDefaultSettingsResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx16->mIPV4Address[0]; ULONG ip1 = pTLVx16->mIPV4Address[1] << 8; ULONG ip2 = pTLVx16->mIPV4Address[2] << 16; ULONG ip3 = pTLVx16->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Username const sWDSGetDefaultSettingsResponse_APNName * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (userSize < outLenx1B + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx1B, outLenx1B ); // Null terminate pAPNName[outLenx1B] = 0; } // Find the Authentication const sWDSGetDefaultSettingsResponse_Authentication * pTLVx1D; ULONG outLenx1D; rc = GetTLV( inLen, pIn, 0x1D, &outLenx1D, (const BYTE **)&pTLVx1D ); if (rc == eGOBI_ERR_NONE) { if (outLenx1D < sizeof( sWDSGetDefaultSettingsResponse_Authentication )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG pap = pTLVx1D->mEnablePAP; ULONG chap = pTLVx1D->mEnableCHAP << 1; *pAuthentication = (pap | chap); } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add technology, if specified if (pTechnology != 0) { // Check size WORD tlvx30Sz = sizeof( sWDSStartNetworkInterfaceRequest_TechnologyPreference ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx30Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x30; pHeader->mLength = tlvx30Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_TechnologyPreference * pTLVx30; pTLVx30 = (sWDSStartNetworkInterfaceRequest_TechnologyPreference*)(pOut + offset); memset( pTLVx30, 0, tlvx30Sz ); // Set the value pTLVx30->mEnable3GPP = ((*pTechnology & 0x00000001) != 0); pTLVx30->mEnable3GPP2 = ((*pTechnology & 0x00000002) != 0); offset += tlvx30Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSStartNetworkInterfaceRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSStartNetworkInterfaceRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary NBNS, if specified if (pPrimaryNBNS != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryNBNS * pTLVx12; pTLVx12 = (sWDSStartNetworkInterfaceRequest_PrimaryNBNS*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryNBNS & 0x000000FF); ULONG ip1 = (*pPrimaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary NBNS, if specified if (pSecondaryNBNS != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryNBNS * pTLVx13; pTLVx13 = (sWDSStartNetworkInterfaceRequest_SecondaryNBNS*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryNBNS & 0x000000FF); ULONG ip1 = (*pSecondaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSStartNetworkInterfaceRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_IPAddress * pTLVx15; pTLVx15 = (sWDSStartNetworkInterfaceRequest_IPAddress*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pTLVx16; pTLVx16 = (sWDSStartNetworkInterfaceRequest_Authentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx16->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx17Sz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx17Sz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx18Sz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx18Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ) { // Validate arguments if (pIn == 0 || pSessionId == 0 || pFailureReason == 0) { return eGOBI_ERR_INVALID_ARG; } // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Still parse call end reason, if present const sWDSStartNetworkInterfaceResponse_CallEndReason * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 >= sizeof( sWDSStartNetworkInterfaceResponse_CallEndReason )) { *pFailureReason = pTLVx10->mCallEnd; } } return rc; } // Find the Session ID const sWDSStartNetworkInterfaceResponse_PacketDataHandle * pTLVx01; ULONG outLenx01; rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSStartNetworkInterfaceResponse_PacketDataHandle )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionId = pTLVx01->mPacketDataHandle; } // Session ID is mandatory, if it failed return that error return rc; } /*=========================================================================== METHOD: PackStopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add session ID // Check size WORD tlvx01Sz = sizeof( sWDSStopNetworkInterfaceRequest_PacketDataHandle ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSStopNetworkInterfaceRequest_PacketDataHandle * pTLVx01; pTLVx01 = (sWDSStopNetworkInterfaceRequest_PacketDataHandle*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mPacketDataHandle = sessionId; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx10Sz = sizeof( sWDSGetCurrentSettingsRequest_RequestedSettings ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetCurrentSettingsRequest_RequestedSettings * pTLVx10; pTLVx10 = (sWDSGetCurrentSettingsRequest_RequestedSettings*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mIPAddress = true; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ) { // Validate arguments if (pIn == 0 || pIPAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; ULONG rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } // If no IP address is found, fail return rc; } /*=========================================================================== METHOD: ParseGetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { // Validate arguments if (pIn == 0 || pCurrentChannelTXRate == 0 || pCurrentChannelRXRate == 0 || pMaxChannelTXRate == 0 || pMaxChannelRXRate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the rates const sWDSGetChannelRatesResponse_ChannelRates * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetChannelRatesResponse_ChannelRates )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pCurrentChannelTXRate = pTLVx01->mChannelTXRatebps; *pCurrentChannelRXRate = pTLVx01->mChannelRXRatebps; *pMaxChannelTXRate = pTLVx01->mMaxChannelTXRatebps; *pMaxChannelRXRate = pTLVx01->mMaxChannelRXRatebps; } // If no rates are found, fail return rc; } /*=========================================================================== METHOD: PackGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mReportTXPacketSuccesses = true; pTLVx01->mReportRXPacketSuccesses = true; pTLVx01->mReportTXPacketErrors = true; pTLVx01->mReportRXPacketErrors = true; pTLVx01->mReportTXOverflows = true; pTLVx01->mReportRXOverflows = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { // Validate arguments if (pIn == 0 || pTXPacketSuccesses == 0 || pRXPacketSuccesses == 0 || pTXPacketErrors == 0 || pRXPacketErrors == 0 || pTXPacketOverflows == 0 || pRXPacketOverflows == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX packet sucesses const sWDSGetPacketStatisticsResponse_TXPacketSuccesses * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet sucesses const sWDSGetPacketStatisticsResponse_RXPacketSuccesses * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet errors const sWDSGetPacketStatisticsResponse_TXPacketErrors * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet errors const sWDSGetPacketStatisticsResponse_RXPacketErrors * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet overflows const sWDSGetPacketStatisticsResponse_TXOverflows * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetPacketStatisticsResponse_TXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet overflows const sWDSGetPacketStatisticsResponse_RXOverflows * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetPacketStatisticsResponse_RXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXPacketSuccesses = pTLVx10->mTXPacketSuccesses; *pRXPacketSuccesses = pTLVx11->mRXPacketSuccesses; *pTXPacketErrors = pTLVx12->mTXPacketErrors; *pRXPacketErrors = pTLVx13->mRXPacketErrors; *pTXPacketOverflows = pTLVx14->mTXOverflows; *pRXPacketOverflows = pTLVx15->mRXOverflows; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mTXByteTotal = true; pTLVx01->mRXByteTotal = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { // Validate arguments if (pIn == 0 || pTXTotalBytes == 0 || pRXTotalBytes == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX bytes const sWDSGetPacketStatisticsResponse_TXBytes * pTLVx19; ULONG outLenx19; ULONG rc = GetTLV( inLen, pIn, 0x19, &outLenx19, (const BYTE **)&pTLVx19 ); if (rc == eGOBI_ERR_NONE) { if (outLenx19 < sizeof( sWDSGetPacketStatisticsResponse_TXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX bytes const sWDSGetPacketStatisticsResponse_RXBytes * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetPacketStatisticsResponse_RXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXTotalBytes = pTLVx19->mTXByteTotal; *pRXTotalBytes = pTLVx1A->mRXByteTotal; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the mode // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPModeRequest_MobileIPMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPModeRequest_MobileIPMode * pTLVx01; pTLVx01 = (sWDSSetMIPModeRequest_MobileIPMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMIPMode = (eQMIMobileIPModes)mode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetMIPModeResponse_MobileIPMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetMIPModeResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx01->mMIPMode; } return rc; } /*=========================================================================== METHOD: PackSetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetActiveMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetActiveMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetActiveMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ) { // Validate arguments if (pIn == 0 || pIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetActiveMIPProfileResponse_Index * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetActiveMIPProfileResponse_Index )) { return eGOBI_ERR_MALFORMED_RSP; } *pIndex = pTLVx01->mProfileIndex; } return rc; } /*=========================================================================== METHOD: PackSetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address bRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; // Add Enabled, if specified if (pEnabled != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPProfileRequest_State ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_State * pTLVx10; pTLVx10 = (sWDSSetMIPProfileRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mEnabled = (*pEnabled == 0 ? 0 : 1); offset += tlvx10Sz; } // Add Home Address, if specified if (pAddress != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPProfileRequest_HomeAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HomeAddress * pTLVx11; pTLVx11 = (sWDSSetMIPProfileRequest_HomeAddress*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pAddress & 0x000000FF); ULONG ip1 = (*pAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pAddress & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary Home Agent Address, if specified if (pPrimaryHA != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress * pTLVx12; pTLVx12 = (sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryHA & 0x000000FF); ULONG ip1 = (*pPrimaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryHA & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary Home Agent Address, if specified if (pSecondaryHA != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress * pTLVx13; pTLVx13 = (sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryHA & 0x000000FF); ULONG ip1 = (*pSecondaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryHA & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add reverse tunneling, if specified if (pRevTunneling != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPProfileRequest_ReverseTunneling ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_ReverseTunneling * pTLVx14; pTLVx14 = (sWDSSetMIPProfileRequest_ReverseTunneling*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReverseTunneling = (*pRevTunneling == 0 ? 0 : 1); offset += tlvx14Sz; } // Add NAI, if specified if (pNAI != 0) { std::string nai( pNAI ); // Check size WORD tlvx15Sz = (WORD)nai.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), nai.c_str(), nai.size() ); offset += tlvx15Sz; } // Add HA SPI, if specified if (pHASPI != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPProfileRequest_HASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HASPI * pTLVx16; pTLVx16 = (sWDSSetMIPProfileRequest_HASPI*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mHASPI = *pHASPI; offset += tlvx16Sz; } // Add AAA SPI, if specified if (pAAASPI != 0) { // Check size WORD tlvx17Sz = sizeof( sWDSSetMIPProfileRequeste_AAASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequeste_AAASPI * pTLVx17; pTLVx17 = (sWDSSetMIPProfileRequeste_AAASPI*)(pOut + offset); memset( pTLVx17, 0, tlvx17Sz ); // Set the value pTLVx17->mAAASPI = *pAAASPI; offset += tlvx17Sz; } // Add MN-HA key, if specified if (pMNHA != 0) { std::string mnha( pMNHA ); // Check size WORD tlvx18Sz = (WORD)mnha.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnha.c_str(), mnha.size() ); offset += tlvx18Sz; } // Add MN-AAA key, if specified if (pMNHA != 0) { std::string mnaaa( pMNAAA ); // Check size WORD tlvx19Sz = (WORD)mnaaa.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx19Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x19; pHeader->mLength = tlvx19Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnaaa.c_str(), mnaaa.size() ); offset += tlvx19Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer index [ I ] - Mobile IP profile ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSGetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSGetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pAddress == 0 || pPrimaryHA == 0 || pSecondaryHA == 0 || pRevTunneling == 0 || naiSize == 0 || pNAI == 0 || pHASPI == 0 || pAAASPI == 0 || pHAState == 0 || pAAAState == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume errors *pEnabled = 0xff; *pAddress = 0xffffffff; *pPrimaryHA = 0xffffffff; *pSecondaryHA = 0xffffffff; *pRevTunneling = 0xff; *pHASPI = 0xffffffff; *pAAASPI = 0xffffffff; *pHAState = 0xffffffff; *pAAAState = 0xffffffff; // Find the State const sWDSGetMIPProfileResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx10->mEnabled; } // Find the Home Address const sWDSGetMIPProfileResponse_HomeAddress * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPProfileResponse_HomeAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pAddress = (ip0 | ip1 | ip2 | ip3); } // Find the Primary Home Agent Address const sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx12->mIPV4Address[0]; ULONG ip1 = pTLVx12->mIPV4Address[1] << 8; ULONG ip2 = pTLVx12->mIPV4Address[2] << 16; ULONG ip3 = pTLVx12->mIPV4Address[3] << 24; *pPrimaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary Home Agent Address const sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx13->mIPV4Address[0]; ULONG ip1 = pTLVx13->mIPV4Address[1] << 8; ULONG ip2 = pTLVx13->mIPV4Address[2] << 16; ULONG ip3 = pTLVx13->mIPV4Address[3] << 24; *pSecondaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Reverse tunneling, if enabled const sWDSGetMIPProfileResponse_ReverseTunneling * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_ReverseTunneling )) { return eGOBI_ERR_MALFORMED_RSP; } *pRevTunneling = pTLVx14->mReverseTunneling; } // Find the NAI, if enabled const sWDSGetMIPProfileResponse_NAI * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (naiSize < outLenx15 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNAI, (const BYTE *)pTLVx15, outLenx15 ); // Null terminate pNAI[outLenx15] = 0; } // Find the HA SPI const sWDSGetMIPProfileResponse_HASPI * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPProfileResponse_HASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pHASPI = pTLVx16->mHASPI; } // Find the AAA SPI const sWDSGetMIPProfileResponse_AAASPI * pTLVx17; ULONG outLenx17; rc = GetTLV( inLen, pIn, 0x17, &outLenx17, (const BYTE **)&pTLVx17 ); if (rc == eGOBI_ERR_NONE) { if (outLenx17 < sizeof( sWDSGetMIPProfileResponse_AAASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAASPI = pTLVx17->mAAASPI; } // Find the HA state const sWDSGetMIPProfileResponse_HAState * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetMIPProfileResponse_HAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAState = pTLVx1A->mKeyState; } // Find the AAA state const sWDSGetMIPProfileResponse_AAAState * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (outLenx1B < sizeof( sWDSGetMIPProfileResponse_AAAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAAState = pTLVx1B->mKeyState; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPParametersRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_SPC * pTLVx01; pTLVx01 = (sWDSSetMIPParametersRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; // Add Mode, if specified if (pMode != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPParametersRequest_MobileIPMode ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MobileIPMode * pTLVx10; pTLVx10 = (sWDSSetMIPParametersRequest_MobileIPMode*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMIPMode = (eQMIMobileIPModes)*pMode; offset += tlvx10Sz; } // Add Retry Limit, if specified if (pRetryLimit != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptLimit ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptLimit * pTLVx11; pTLVx11 = (sWDSSetMIPParametersRequest_RetryAttemptLimit*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mRetryAttemptLimit = *pRetryLimit; offset += tlvx11Sz; } // Add Retry interval, if specified if (pRetryInterval != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptInterval ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptInterval * pTLVx12; pTLVx12 = (sWDSSetMIPParametersRequest_RetryAttemptInterval*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mRetryAttemptInterval = *pRetryInterval; offset += tlvx12Sz; } // Add Re-registration period, if specified if (pReRegPeriod != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationPeriod ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationPeriod * pTLVx13; pTLVx13 = (sWDSSetMIPParametersRequest_ReRegistrationPeriod*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); // Set the value pTLVx13->mReRegistrationPeriod = *pReRegPeriod; offset += tlvx13Sz; } // Add Re-registration on traffic flag, if specified if (pReRegTraffic != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic * pTLVx14; pTLVx14 = (sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReRegistrationOnlyWithTraffic = (*pReRegTraffic == 0 ? 0 : 1); offset += tlvx14Sz; } // Add HA authenticator flag, if specified if (pHAAuthenticator != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator * pTLVx15; pTLVx15 = (sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the value pTLVx15->mMNHAAuthenticatorCalculator = (*pHAAuthenticator == 0 ? 0 : 1); offset += tlvx15Sz; } // Add HA RFC2002bis authentication flag, if specified if (pHA2002bis != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication * pTLVx16; pTLVx16 = (sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mMNHARFC2002BISAuthentication = (*pHA2002bis == 0 ? 0 : 1); offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pIn == 0 || pMode == 0 || pRetryLimit == 0 || pRetryInterval == 0 || pReRegPeriod == 0 || pReRegTraffic == 0 || pHAAuthenticator == 0 || pHA2002bis == 0) { return eGOBI_ERR_INVALID_ARG; } *pMode = 0xffffffff; *pRetryLimit = 0xff; *pRetryInterval = 0xff; *pReRegPeriod = 0xff; *pReRegTraffic = 0xff; *pHAAuthenticator = 0xff; *pHA2002bis = 0xff; // Find the mode const sWDSGetMIPParametersResponse_MobileIPMode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPParametersResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mMIPMode; } // Find the Retry limit const sWDSGetMIPParametersResponse_RetryAttemptLimit * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptLimit )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryLimit = pTLVx11->mRetryAttemptLimit; } // Find the Retry Interval const sWDSGetMIPParametersResponse_RetryAttemptInterval * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptInterval )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryInterval = pTLVx12->mRetryAttemptInterval; } // Find the Re-registration period const sWDSGetMIPParametersResponse_ReRegistrationPeriod * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationPeriod )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegPeriod = pTLVx13->mReRegistrationPeriod; } // Find the Re-register on traffic flag const sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegTraffic = pTLVx14->mReRegistrationOnlyWithTraffic; } // Find the HA authenticator const sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAAuthenticator = pTLVx15->mMNHAAuthenticatorCalculator; } // Find the HA RFC2002bis authentication flag const sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication )) { return eGOBI_ERR_MALFORMED_RSP; } *pHA2002bis = pTLVx16->mMNHARFC2002BISAuthentication; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ) { // Validate arguments if (pIn == 0 || pError == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetLastMIPStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetLastMIPStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pError = pTLVx01->mLastMIPStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments // At least one must be specified if (pOut == 0 || (pPrimaryDNS == 0 && pSecondaryDNS == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetDNSSettingRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSSetDNSSettingRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetDNSSettingRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSSetDNSSettingRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pIn == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the Primary DNS const sWDSGetDNSSettingResponse_PrimaryDNS * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetDNSSettingResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx10->mIPV4Address[0]; ULONG ip1 = pTLVx10->mIPV4Address[1] << 8; ULONG ip2 = pTLVx10->mIPV4Address[2] << 16; ULONG ip3 = pTLVx10->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDNSSettingResponse_SecondaryDNS * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDNSSettingResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ) { // Validate arguments if (pIn == 0 || pDataBearer == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataBearerTechnologyResponse_Technology * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataBearerTechnologyResponse_Technology )) { return eGOBI_ERR_MALFORMED_RSP; } *pDataBearer = pTLVx01->mDataBearerTechnology; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Gobi3000Translation/Gobi3000TranslationWMS.cpp000066400000000000000000000776671455567757300304200ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WMS Service) Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackDeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSDeleteRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSDeleteRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message index, if specified if (pMessageIndex != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSDeleteRequest_MessageIndex ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageIndex * pTLVx10; pTLVx10 = (sWMSDeleteRequest_MessageIndex*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mStorageIndex = *pMessageIndex; offset += tlvx10Sz; } // Add the Message tag, if specified if (pMessageTag != 0) { // Check size WORD tlvx11Sz = sizeof( sWMSDeleteRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageTag * pTLVx11; pTLVx11 = (sWMSDeleteRequest_MessageTag*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the values pTLVx11->mMessageTag = (eQMIWMSMessageTags)*pMessageTag; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSListMessagesRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The storage type sWMSListMessagesRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSListMessagesRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message tag, if specified if (pRequestedTag != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSListMessagesRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSListMessagesRequest_MessageTag * pTLVx10; pTLVx10 = (sWMSListMessagesRequest_MessageTag*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mMessageTag = (eQMIWMSMessageTags)*pRequestedTag; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ) { // Validate arguments if (pIn == 0 || pMessageListSize == 0 || *pMessageListSize == 0 || pMessageList == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageListSz = *pMessageListSize; // Assume failure *pMessageListSize = 0; // Find the messages const sWMSListMessagesResponse_MessageList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG messageListSz = pTLVx01->mNumberOfMessages; if (messageListSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (maxMessageListSz < messageListSz) { messageListSz = maxMessageListSz; } const sWMSListMessagesResponse_MessageList::sMessage * pMessages; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList ) + sizeof( sWMSListMessagesResponse_MessageList::sMessage ) * messageListSz) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pMessages = (const sWMSListMessagesResponse_MessageList::sMessage *) ((const BYTE *)pTLVx01 + sizeof( sWMSListMessagesResponse_MessageList )); ULONG * pData = (ULONG *)pMessageList; for (ULONG m = 0; m < messageListSz; m++) { *pData++ = pMessages->mStorageIndex; *pData++ = pMessages->mMessageTag; pMessages++; } *pMessageListSize = messageListSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawReadRequest_MessageIndex ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawReadRequest_MessageIndex * pTLVx01; pTLVx01 = (sWMSRawReadRequest_MessageIndex*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ O ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { // Validate arguments if (pIn == 0 || pMessageTag == 0 || pMessageFormat == 0 || pMessageSize == 0 || *pMessageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageSz = *pMessageSize; // Assume failure *pMessageSize = 0; // Find the messages const sWMSRawReadResponse_MessageData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageTag = pTLVx01->mMessageTag; *pMessageFormat = pTLVx01->mMessageFormat; ULONG messageSz = pTLVx01->mRawMessageLength; if (messageSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (messageSz > maxMessageSz) { messageSz = maxMessageSz; } // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData ) + messageSz) { return eGOBI_ERR_MALFORMED_RSP; } memcpy( pMessage, pTLVx01 + sizeof( sWMSRawReadResponse_MessageData ), messageSz ); *pMessageSize = messageSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSModifyTagRequest_MessageTag ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSModifyTagRequest_MessageTag * pTLVx01; pTLVx01 = (sWMSModifyTagRequest_MessageTag*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; pTLVx01->mMessageTag = (eQMIWMSMessageTags)messageTag; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawWriteRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawWriteRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawWriteRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawWriteRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ) { // Validate arguments if (pIn == 0 || pMessageIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the messages const sWMSRawWriteResponse_MessageIndex * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawWriteResponse_MessageIndex )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageIndex = pTLVx01->mStorageIndex; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawSendRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawSendRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawSendRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawSendRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ) { // Validate arguments if (pIn == 0 || pMessageFailureCode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume we have no message failure cause code *pMessageFailureCode = 0xffffffff; // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Check for the failure code (optional) const sWMSRawSendResponse_CauseCode * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageFailureCode = pTLVx10->mCauseCode; } } return rc; } /*=========================================================================== METHOD: ParseGetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ O ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ O ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { // Validate arguments if (pIn == 0 || addressSize == 0 || pSMSCAddress == 0 || typeSize == 0 || pSMSCType == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume empty pSMSCAddress[0] = 0; pSMSCType[0] = 0; // Get the address (mandatory) const sWMSGetSMSCAddressResponse_Address * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } // Handle the type as a string (maximum 3 chars) std::string smscType( &pTLVx01->mSMSCAddressType[0], 3 ); // Is the SMSC type present? (optional) ULONG smscTypeLen = (ULONG)smscType.size(); if (smscTypeLen > 0) { // Space to perform copy? if (typeSize < smscTypeLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCType, &pTLVx01->mSMSCAddressType[0], smscTypeLen ); pSMSCType[smscTypeLen] = 0; } // Treat the address as a null terminated string std::string smscAddr( (const CHAR *)pTLVx01 + sizeof( sWMSGetSMSCAddressResponse_Address ), pTLVx01->mSMSCAddressLength ); ULONG smscAddrLen = (ULONG)smscAddr.size(); if (addressSize < smscAddrLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCAddress, smscAddr.c_str(), addressSize ); pSMSCAddress[addressSize] = 0; return rc; } /*=========================================================================== METHOD: PackSetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ) { // Validate arguments if (pOut == 0 || pSMSCAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // The TLV contains only the address std::string smscAddr( pSMSCAddress ); // Check size WORD tlvx01Sz = (WORD)smscAddr.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscAddr.c_str(), tlvx01Sz ); offset += tlvx01Sz; // smscType is optional if (pSMSCType != 0) { // The TLV contains only the type std::string smscType( pSMSCType ); if (smscType.size() != 0) { // Check size WORD tlvx10Sz = (WORD)smscType.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscType.c_str(), tlvx10Sz ); offset += tlvx10Sz; } } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pIn == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxRoutes = *pRouteSize; *pRouteSize = 0; // Get the route list const sWMSGetRoutesResponse_RouteList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG routeCount = pTLVx01->mNumberOfRoutes; if (routeCount > (ULONG)maxRoutes) { routeCount = (ULONG)maxRoutes; } const sWMSGetRoutesResponse_RouteList::sRoute * pInRoute; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList ) + sizeof( sWMSGetRoutesResponse_RouteList::sRoute ) * routeCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRoute = (const sWMSGetRoutesResponse_RouteList::sRoute *) ((const BYTE *)pTLVx01 + sizeof( sWMSGetRoutesResponse_RouteList )); ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { *pRouteArray++ = pInRoute->mMessageType; *pRouteArray++ = pInRoute->mMessageClass; *pRouteArray++ = pInRoute->mStorageType; *pRouteArray++ = pInRoute->mRouteValue; pInRoute++; } *pRouteSize = (BYTE)routeCount; return rc; } /*=========================================================================== METHOD: PackSetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pOut == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } UINT16 routeCount = (ULONG)*pRouteSize; // Check size WORD tlvx01Sz = sizeof( sWMSSetRoutesRequest_RouteList ) + sizeof( sWMSSetRoutesRequest_RouteList::sRoute ) * routeCount; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Add route count sWMSSetRoutesRequest_RouteList * pTLVx01; pTLVx01 = (sWMSSetRoutesRequest_RouteList*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mNumberOfRoutes = routeCount; offset += sizeof( sWMSSetRoutesRequest_RouteList ); sWMSSetRoutesRequest_RouteList::sRoute * pOutRoute; // Align to the first array element pOutRoute = (sWMSSetRoutesRequest_RouteList::sRoute *)(pOut + offset); // Add the routes ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { pOutRoute->mMessageType = (eQMIWMSMessageTypes)*pRouteArray++; pOutRoute->mMessageClass = (eQMIWMSMessageClasses)*pRouteArray++; pOutRoute->mStorageType = (eQMIWMSStorageTypes)*pRouteArray++; pOutRoute->mReceiptAction = (eQMIWMSReceiptActions)*pRouteArray++; pOutRoute++; offset += sizeof( sWMSSetRoutesRequest_RouteList::sRoute ); } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiConnectionMgmt/000077500000000000000000000000001455567757300240175ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiConnectionMgmt/GobiConnectionMgmt.cpp000066400000000000000000000377511455567757300302650ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.cpp DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Global object CGobiConnectionMgmtDLL gDLL; // Interval between traffic processing loop iterations (milliseconds) const ULONG TRAFFIC_INTERVAL_MS = 300000; // Maximum amount of time to wait for the traffic thread to exit const ULONG THREAD_EXIT_TIME = 2000; /*=========================================================================== METHOD: TrafficProcessThread (Free Method) DESCRIPTION: QMI traffic process thread - processes all traffic in order to fire off QMI traffic related callbacks PARAMETERS: pArg [ I ] - Object to interface to RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * TrafficProcessThread( PVOID pArg ) { // Keep running? bool bRun = false; // Create a vector of the objects to wait on std::vector events; // Store the index to service type for use later std::map services; // Grab API object cGobiConnectionMgmt * pAPI = (cGobiConnectionMgmt *)pArg; if (pAPI != 0) { // Time to go to work bRun = true; // Add the thread exit event events.push_back( &pAPI->mExitEvent ); // Grab signal events for our protocol servers std::map ::const_iterator pIter; pIter = pAPI->mServers.begin(); while (pIter != pAPI->mServers.end()) { eQMIService svc = pIter->first; cQMIProtocolServer * pServer = pAPI->GetServer( svc ); if (pServer != 0) { // Grab the log from the server const cProtocolLog & log = pServer->GetLog(); // Grab the Signal event, if it exists cEvent & sigEvent = log.GetSignalEvent(); services[events.size()] = svc; events.push_back( &sigEvent ); } pIter++; } } TRACE( "GobiConnectionMgmt traffic thread [%u] started\n", (UINT)pthread_self() ); // Loop waiting for exit event while (bRun == true) { // Wait for activity DWORD ignoredVal, index; int nRet = WaitOnMultipleEvents( events, TRAFFIC_INTERVAL_MS, ignoredVal, index ); // Timeout if (nRet == -ETIME) { // Do nothing } // Error? else if (nRet <= 0) { TRACE( "GobiConnectionMgmt traffic thread wait error %d\n", nRet ); bRun = false; } // Exit event? else if (index == 0) { bRun = false; } else if (index < events.size()) { // Run ProcessTraffic() for this service type if (services.find( index ) != services.end()) { pAPI->ProcessTraffic( services[index] ); } } else { // Fatal error bRun = false; } } TRACE( "GobiConnectionMgmt traffic thread [%u] exited\n", (UINT)pthread_self() ); if (pAPI != 0) { pAPI->mThreadCleanupFinished = true; } return 0; } /*=========================================================================== METHOD: CallbackThread (Free Method) DESCRIPTION: Thread to execute a callback asynchronously PARAMETERS: pArg [ I ] - The cGobiCMCallback object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * CallbackThread( PVOID pArg ) { cGobiCMCallback * pCB = (cGobiCMCallback *)pArg; if (pCB == 0) { ASSERT( 0 ); return 0; } pCB->Call(); delete pCB; pCB = 0; return 0; } /*=========================================================================*/ // CGobiConnectionMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::CGobiConnectionMgmtDLL() { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::~CGobiConnectionMgmtDLL() { std::map tmpAPI = mAPI; std::map ::const_iterator pIter; pIter = tmpAPI.begin(); while (pIter != tmpAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; if (pAPI != 0) { pAPI->Cleanup(); delete pAPI; } pIter++; } mAPI.clear(); pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: CreateAPI (Public Method) DESCRIPTION: Create a new API object RETURN VALUE: GOBIHANDLE - Handle to new API object (0 upon failure) ===========================================================================*/ GOBIHANDLE CGobiConnectionMgmtDLL::CreateAPI() { pthread_mutex_lock( &mSyncSection ); cGobiConnectionMgmt * pAPI = new cGobiConnectionMgmt; if (pAPI != 0) { bool bInit = pAPI->Initialize(); if (bInit == true) { mAPI[(GOBIHANDLE)pAPI] = pAPI; } } pthread_mutex_unlock( &mSyncSection ); return (GOBIHANDLE)pAPI; } /*=========================================================================== METHOD: DeleteAPI (Public Method) DESCRIPTION: Delete an existing API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: None ===========================================================================*/ void CGobiConnectionMgmtDLL::DeleteAPI( GOBIHANDLE handle ) { pthread_mutex_lock( &mSyncSection ); std::map ::iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; delete pAPI; mAPI.erase( pIter ); } pthread_mutex_unlock( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the requested API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: cGobiConnectionMgmt * ===========================================================================*/ cGobiConnectionMgmt * CGobiConnectionMgmtDLL::GetAPI( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = 0; pthread_mutex_lock( &mSyncSection ); std::map ::const_iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { pAPI = pIter->second; } pthread_mutex_unlock( &mSyncSection ); return pAPI; } /*=========================================================================*/ // cGobiConnectionMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::cGobiConnectionMgmt() : cGobiQMICore(), mbThreadStarted( false ), mThreadID( 0 ), mThreadCleanupFinished( false ) { // Nothing to do but init those variables } /*=========================================================================== METHOD: ~cGobiConnectionMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::~cGobiConnectionMgmt() { Disconnect(); } /*=========================================================================== METHOD: ProcessTraffic (Internal Method) DESCRIPTION: Process traffic in a QMI server protocol log, this is done to exercise QMI indication related callbacks PARAMETERS: svc [ I ] - QMI Service type RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessTraffic( eQMIService svc ) { ULONG count = 0; std::map ::iterator pIter; pIter = mServers.find( svc ); if (pIter == mServers.end()) { return; } sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return; } // Grab the service ID from the service eQMIService svcID = pSvr->GetServiceType(); if (svcID == eQMI_SVC_ENUM_BEGIN) { return; } // Grab the log from the server const cProtocolLog & logSvr = pSvr->GetLog(); // New items to process? count = logSvr.GetCount(); if (count != INVALID_LOG_INDEX && count > si.mLogsProcessed) { for (ULONG i = si.mLogsProcessed; i < count; i++) { sProtocolBuffer buf = logSvr.GetBuffer( i ); if (buf.IsValid() == false) { continue; } eProtocolType pt = buf.GetType(); if (IsQMIProtocolRX( pt ) == false) { continue; } sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsIndication() == false) { continue; } ULONG msgID = qmiBuf.GetMessageID(); tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); if (pIter == mCallbacks.end()) { continue; } ULONG outLen = 0; const BYTE * pOutput = (const BYTE *)qmiBuf.GetRawContents( outLen ); tCallbackValue cv = pIter->second; cGenericCallback * pCB = 0; pCB = new cGenericCallback( cv.first, svcID, msgID, cv.second, outLen, pOutput ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } si.mLogsProcessed = count; } } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - QMI control file to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiConnectionMgmt::Connect( LPCSTR pQMIFile, std::set & services ) { std::set svcs = cGobiQMICore::Connect( pQMIFile, services ); if (svcs.size() > 0) { // Start the traffic processing thread? if (mbThreadStarted == false) { // Clear mExitEvent; mExitEvent.Clear(); pthread_create( &mThreadID, NULL, TrafficProcessThread, this ); mbThreadStarted = true; } } return svcs; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Disconnect() { // Clear all callback function pointers mCallbacks.clear(); // Exit traffic processing thread if (mbThreadStarted == true) { // Signal thread to exit mExitEvent.Set( 0 ); // If we are not being called from the thread itself then wait for // it to exit, if not then it will have to exit automatically if (pthread_self() != mThreadID) { if (mThreadID != 0) { pthread_join( mThreadID, NULL ); } } } // Clear out thread handle/ID mbThreadStarted = false; mThreadID = 0; return cGobiQMICore::Disconnect(); } /*=========================================================================== METHOD: SetGenericCallback (Public Method) DESCRIPTION: Enable/disable generic callback function PARAMETERS: svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Generic callback pointer userValue [ I ] - User value to pass back to callback RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ) { // Assume success eGobiError rc = eGOBI_ERR_NONE; tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); bool bOn = (pCallback != 0 && pIter == mCallbacks.end()); bool bOff = (pCallback == 0 && pIter != mCallbacks.end()); bool bReplace = (pCallback != 0 && pIter != mCallbacks.end()); if (bOn == true || bReplace == true) { tCallbackValue cv( pCallback, userValue ); mCallbacks[ck] = cv; } else if (bOff == true) { mCallbacks.erase( pIter ); } return rc; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiConnectionMgmt/GobiConnectionMgmt.h000066400000000000000000000203201455567757300277120ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.h DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; extern "C" { // Generic callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ); }; // CallbackThread prototype // Thread to execute a callback asynchronously void * CallbackThread( PVOID pArg ); /*=========================================================================*/ // Class cGobiCMCallback /*=========================================================================*/ class cGobiCMCallback { public: // (Inline) Constructor cGobiCMCallback() { }; // (Inline) Destructor virtual ~cGobiCMCallback() { }; // (Inline) Initialize the callback object by starting the thread bool Initialize() { // Start the thread pthread_t threadID; pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); int nRC = pthread_create( &threadID, &attributes, CallbackThread, this ); if (nRC == 0) { // Success! return true; } return false; }; protected: // Call the function virtual void Call() = 0; // Function thread gets full access friend void * CallbackThread( PVOID pArg ); }; /*=========================================================================*/ // Class cGenericCallback /*=========================================================================*/ class cGenericCallback : public cGobiCMCallback { public: // (Inline) Constructor cGenericCallback( tFNGenericCallback pCallback, ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ) : mServiceID( svcID ), mMessageID( msgID ), mUserValue( userValue ), mOutputLen( 0 ), mpCallback( pCallback ) { memset( &mOutput[0], 0, QMI_MAX_BUFFER_SIZE ); if (outLen <= QMI_MAX_BUFFER_SIZE && pOut != 0) { mOutputLen = outLen; memcpy( &mOutput[0], pOut, outLen ); } }; // (Inline) Destructor virtual ~cGenericCallback() { mpCallback = 0; }; protected: /* Service ID */ ULONG mServiceID; /* Message ID */ ULONG mMessageID; /* User value */ ULONG_PTR mUserValue; /* Actual size of output content */ ULONG mOutputLen; /* Output content buffer */ BYTE mOutput[QMI_MAX_BUFFER_SIZE]; /* Callback function */ tFNGenericCallback mpCallback; // Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mServiceID, mMessageID, mUserValue, mOutputLen, (const BYTE *)&mOutput[0] ); } }; }; /*=========================================================================*/ // Class cGobiConnectionMgmt /*=========================================================================*/ class cGobiConnectionMgmt : public cGobiQMICore { public: // Constructor cGobiConnectionMgmt(); // Destructor virtual ~cGobiConnectionMgmt(); // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Enable/disable generic callback function eGobiError SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ); protected: // Process new traffic void ProcessTraffic( eQMIService svc ); /* Is there an active thread? */ bool mbThreadStarted; /* ID of traffic processing thread */ pthread_t mThreadID; /* Traffic processing thread exit event */ cEvent mExitEvent; /* Has the protocol server thread finished cleanup? */ bool mThreadCleanupFinished; /* Generic callback function key/value */ typedef std::pair tCallbackKey; typedef std::pair tCallbackValue; /* Callback functions */ std::map mCallbacks; // Traffic process thread gets full access friend VOID * TrafficProcessThread( PVOID pArg ); }; /*=========================================================================*/ // Class CGobiConnectionMgmtDLL /*=========================================================================*/ class CGobiConnectionMgmtDLL { public: // Constructor CGobiConnectionMgmtDLL(); // Destructor virtual ~CGobiConnectionMgmtDLL(); // Create a new API object GOBIHANDLE CreateAPI(); // Delete an existing API object void DeleteAPI( GOBIHANDLE handle ); // Return the requested API object cGobiConnectionMgmt * GetAPI( GOBIHANDLE handle ); protected: /* API interface object */ std::map mAPI; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern CGobiConnectionMgmtDLL gDLL; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiConnectionMgmt/GobiConnectionMgmtAPI.h000066400000000000000000024051201455567757300302530ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPI.h DESCRIPTION: QUALCOMM Connection Management API for Gobi 5000 Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Definitions /*=========================================================================*/ #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; #ifdef __cplusplus extern "C" { #endif // Geeneric callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); #ifdef __cplusplus }; #endif /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device interface PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ); /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ); /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ); /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ); /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSupportedMessages DESCRIPTION: The function sends 'WDS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSupportedFields DESCRIPTION: The function sends 'WDS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGISwitch DESCRIPTION: The function sends 'WDS/EMBMS TMGI Switch Request' (0x0088) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGISwitch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSBindDataPort DESCRIPTION: The function sends 'WDS/Bind Data Port Request' (0x0089) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSBindDataPort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetPDNFilter DESCRIPTION: The function sends 'WDS/Set PDN Filter Request' (0x008A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetPDNFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSRemovePDNFilter DESCRIPTION: The function sends 'WDS/Remove PDN Filter Request' (0x008B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSRemovePDNFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSReverseIPTransportConnectionIndication DESCRIPTION: The function sends 'WDS/Reverse IP Transport Connection Indication Request' (0x008D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReverseIPTransportConnectionIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetIPSecStaticSAConfig DESCRIPTION: The function sends 'WDS/Get IPSec Static SA Config Request' (0x008F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetIPSecStaticSAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSReverseIPTransportConfigComplete DESCRIPTION: The function sends 'WDS/Reverse IP Transport Config Complete Request' (0x0090) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReverseIPTransportConfigComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetExtendedDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Extended Data Bearer Technology Request' (0x0091) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetExtendedDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEMaximumAttachPDNNumber DESCRIPTION: The function sends 'WDS/Get LTE Maximum Attach PDN Number Request' (0x0092) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEMaximumAttachPDNNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetLTEAttachPDNList DESCRIPTION: The function sends 'WDS/Set LTE Attach PDN List Request' (0x0093) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetLTEAttachPDNList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEAttachPDNList DESCRIPTION: The function sends 'WDS/Get LTE Attach PDN List Request' (0x0094) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachPDNList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetLTEDataRetry DESCRIPTION: The function sends 'WDS/Set LTE Data Retry Request' (0x0096) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetLTEDataRetry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEDataRetry DESCRIPTION: The function sends 'WDS/Get LTE Data Retry Request' (0x0097) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEDataRetry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetLTEAttachType DESCRIPTION: The function sends 'WDS/Set LTE Attach Type Request' (0x0098) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetLTEAttachType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEAttachType DESCRIPTION: The function sends 'WDS/Get LTE Attach Type Request' (0x0099) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSupportedMessages DESCRIPTION: The function sends 'DMS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSupportedFields DESCRIPTION: The function sends 'DMS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSBindSubscription DESCRIPTION: The function sends 'DMS/Bind Subscription Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSubscription DESCRIPTION: The function sends 'DMS/Get Subscription Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSupportedMessages DESCRIPTION: The function sends 'NAS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSupportedFields DESCRIPTION: The function sends 'NAS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo2 DESCRIPTION: The function sends 'NAS/Configure Signal Info 2 Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo2( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTDSCDMACellInfo DESCRIPTION: The function sends 'NAS/Get TD-SCDMA Cell Info Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetHPLMNIRATSearchTimer DESCRIPTION: The function sends 'NAS/Set HPLMN IRAT Search Timer Request' (0x006E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetHPLMNIRATSearchTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEMBMSSignalQuality DESCRIPTION: The function sends 'NAS/Get EMBMS Signal Quality Request' (0x006F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSSignalQuality( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASLimitSystemInfoIndications DESCRIPTION: The function sends 'NAS/Limit System Info Indications Request' (0x0070) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASLimitSystemInfoIndications( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemInfoIndicationLimits DESCRIPTION: The function sends 'NAS/Get System Info Indication Limits Request' (0x0071) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfoIndicationLimits( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateIMSStatus DESCRIPTION: The function sends 'NAS/Update IMS Status Request' (0x0072) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateIMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetIMSPreference DESCRIPTION: The function sends 'NAS/Get IMS Preference Request' (0x0073) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetIMSPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigurePLMNNameIndication DESCRIPTION: The function sends 'NAS/Configure PLMN Name Indication Request' (0x0075) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigurePLMNNameIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASCDMAAvoidSystem DESCRIPTION: The function sends 'NAS/CDMA Avoid System Request' (0x0076) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASCDMAAvoidSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCDMAAvoidSystemList DESCRIPTION: The function sends 'NAS/Get CDMA Avoid System List Request' (0x0077) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAAvoidSystemList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetHPLMNSearchTimer DESCRIPTION: The function sends 'NAS/Set HPLMN Search Timer Request' (0x0078) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetHPLMNSearchTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetHPLMNSearchTimer DESCRIPTION: The function sends 'NAS/Get HPLMN Search Timer Request' (0x0079) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHPLMNSearchTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetE911State DESCRIPTION: The function sends 'NAS/Set E911 State Request' (0x007A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetE911State( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSubscriptionInfo DESCRIPTION: The function sends 'NAS/Get Subscription Info Request' (0x007C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetNetworkTime DESCRIPTION: The function sends 'NAS/Get Network Time Request' (0x007D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetLTESIB16NetworkTime DESCRIPTION: The function sends 'NAS/Get LTE SIB16 Network Time Request' (0x007E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetLTESIB16NetworkTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSupportedMessages DESCRIPTION: The function sends 'WMS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSupportedFields DESCRIPTION: The function sends 'WMS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetWaitingMessage DESCRIPTION: The function sends 'WMS/Set Waiting Message Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectCourseOverGroundData DESCRIPTION: The function sends 'PDS/Inject Course Over Ground Data Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectCourseOverGroundData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectSUPLCertificate DESCRIPTION: The function sends 'PDS/Inject SUPL Certificate Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSDeleteSUPLCertificate DESCRIPTION: The function sends 'PDS/Delete SUPL Certificate Request' (0x0068) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetIS801OverSUPLIndicator DESCRIPTION: The function sends 'PDS/Get IS-801 Over SUPL Indicator Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetIS801OverSUPLIndicator( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetIS801OverSUPLIndicator DESCRIPTION: The function sends 'PDS/Set IS-801 Over SUPL Indicator Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetIS801OverSUPLIndicator( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSUPLHashAlgorithm DESCRIPTION: The function sends 'PDS/Get SUPL Hash Algorithm Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLHashAlgorithm( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSUPLHashAlgorithm DESCRIPTION: The function sends 'PDS/Set SUPL Hash Algorithm Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLHashAlgorithm( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSUPLMaximumVersion DESCRIPTION: The function sends 'PDS/Get SUPL Maximum Version Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLMaximumVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSUPLMaximumVersion DESCRIPTION: The function sends 'PDS/Set SUPL Maximum Version Request' (0x006E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLMaximumVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSUPLSecurity DESCRIPTION: The function sends 'PDS/Get SUPL Security Request' (0x006F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLSecurity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSUPLSecurity DESCRIPTION: The function sends 'PDS/Set SUPL Security Request' (0x0070) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLSecurity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSUPLTLSVersion DESCRIPTION: The function sends 'PDS/Get SUPL TLS Version Request' (0x0071) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLTLSVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSUPLTLSVersion DESCRIPTION: The function sends 'PDS/Set SUPL TLS Version Request' (0x0072) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLTLSVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetAGNSSPositioningModes DESCRIPTION: The function sends 'PDS/Get AGNSS Positioning Modes Request' (0x0073) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGNSSPositioningModes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetAGNSSPositioningModes DESCRIPTION: The function sends 'PDS/Set AGNSS Positioning Modes Request' (0x0074) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGNSSPositioningModes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetEmergencyProtocolConfig DESCRIPTION: The function sends 'PDS/Get Emergency Protocol Config Request' (0x0075) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetEmergencyProtocolConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetEmergencyProtocolConfig DESCRIPTION: The function sends 'PDS/Set Emergency Protocol Config Request' (0x0076) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEmergencyProtocolConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetAPNProfiles DESCRIPTION: The function sends 'PDS/Get APN Profiles Request' (0x0077) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAPNProfiles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetAPNProfiles DESCRIPTION: The function sends 'PDS/Set APN Profiles Request' (0x0078) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAPNProfiles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetHomeSUPLAddress DESCRIPTION: The function sends 'PDS/Get Home SUPL Address Request' (0x0079) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetHomeSUPLAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetHomeSUPLAddress DESCRIPTION: The function sends 'PDS/Set Home SUPL Address Request' (0x007A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetHomeSUPLAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectVehicleSensorData DESCRIPTION: The function sends 'PDS/Inject Vehicle Sensor Data Request' (0x007B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectVehicleSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectPedometerData DESCRIPTION: The function sends 'PDS/Inject Pedometer Data Request' (0x007C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPedometerData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetSupportedMessages DESCRIPTION: The function sends 'Voice/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetSupportedFields DESCRIPTION: The function sends 'Voice/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSGetLineSwitchingStatus DESCRIPTION: The function sends 'Voice/ALS Get Line Switching Status Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetLineSwitchingStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSGetSelectedLine DESCRIPTION: The function sends 'Voice/ALS Get Selected Line Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetSelectedLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetSupportedMessages DESCRIPTION: The function sends 'CAT2/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetSupportedFields DESCRIPTION: The function sends 'CAT2/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetSupportedMessages DESCRIPTION: The function sends 'UIM/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetSupportedFields DESCRIPTION: The function sends 'UIM/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshRegisterAll DESCRIPTION: The function sends 'UIM/Refresh Register All Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegisterAll( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetFileStatus DESCRIPTION: The function sends 'UIM/Set File Status Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetFileStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetCapabilitiesReadOperation DESCRIPTION: The function sends 'PBM/Set Capabilities Read Operation Request' (0x001C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetCapabilitiesReadOperation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedReadRecords DESCRIPTION: The function sends 'PBM/Extended Read Records Request' (0x001D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedWriteRecord DESCRIPTION: The function sends 'PBM/Extended Write Record Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedSearchRecords DESCRIPTION: The function sends 'PBM/Extended Search Records Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Extended Read All Hidden Records Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadUndecodedRecords DESCRIPTION: The function sends 'PBM/Read Undecoded Records Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadUndecodedRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSupportedMessages DESCRIPTION: The function sends 'LOC/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSupportedFields DESCRIPTION: The function sends 'LOC/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectMotionData DESCRIPTION: The function sends 'LOC/Inject Motion Data Request' (0x0068) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetNIGeofenceIDList DESCRIPTION: The function sends 'LOC/Get NI Geofence ID List Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNIGeofenceIDList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectGSMCellInfo DESCRIPTION: The function sends 'LOC/Inject GSM Cell Info Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectGSMCellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectNetworkInitiatedMessage DESCRIPTION: The function sends 'LOC/Inject Network Initiated Message Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectNetworkInitiatedMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCNotifyWWANOutOfService DESCRIPTION: The function sends 'LOC/Notify WWAN Out Of Service Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCNotifyWWANOutOfService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPedometerData DESCRIPTION: The function sends 'LOC/Inject Pedometer Data Request' (0x006F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPedometerData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectWCDMACellInfo DESCRIPTION: The function sends 'LOC/Inject WCDMA Cell Info Request' (0x0070) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectTDSCDMACellInfo DESCRIPTION: The function sends 'LOC/Inject TD-SCDMA Cell Info Request' (0x0071) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSubscriberID DESCRIPTION: The function sends 'LOC/Inject Subscriber ID Request' (0x0072) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSubscriberID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAGetSupportedMessages DESCRIPTION: The function sends 'WDA/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAGetSupportedFields DESCRIPTION: The function sends 'WDA/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDASetDataFormat DESCRIPTION: The function sends 'WDA/Set Data Format Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDASetDataFormat( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAGetDataFormat DESCRIPTION: The function sends 'WDA/Get Data Format Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetDataFormat( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAEnablePacketFilter DESCRIPTION: The function sends 'WDA/Enable Packet Filter Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAEnablePacketFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDADisablePacketFilter DESCRIPTION: The function sends 'WDA/Disable Packet Filter Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDADisablePacketFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAGetPacketFilterState DESCRIPTION: The function sends 'WDA/Get Packet Filter State Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetPacketFilterState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAAddPacketFilterRule DESCRIPTION: The function sends 'WDA/Add Packet Filter Rule Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAAddPacketFilterRule( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDADeletePacketFilterRule DESCRIPTION: The function sends 'WDA/Delete Packet Filter Rule Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDADeletePacketFilterRule( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAGetPacketFilterRuleHandles DESCRIPTION: The function sends 'WDA/Get Packet Filter Rule Handles Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetPacketFilterRuleHandles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAGetPacketFilterRule DESCRIPTION: The function sends 'WDA/Get Packet Filter Rule Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetPacketFilterRule( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDASetLoopbackState DESCRIPTION: The function sends 'WDA/Set Loopback State Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDASetLoopbackState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDAGetLoopbackState DESCRIPTION: The function sends 'WDA/Get Loopback State Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetLoopbackState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPEnable DESCRIPTION: The function sends 'QCMAP/Enable Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPEnable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPDisable DESCRIPTION: The function sends 'QCMAP/Disable Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDisable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPBringUpWWAN DESCRIPTION: The function sends 'QCMAP/Bring Up WWAN Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPBringUpWWAN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPTearDownWWAN DESCRIPTION: The function sends 'QCMAP/Tear Down WWAN Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPTearDownWWAN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetWWANStatus DESCRIPTION: The function sends 'QCMAP/Get WWAN Status Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetWWANStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetIPSecVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Get IPSec VPN Passthrough Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetIPSecVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPSetIPSecVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Set IPSec VPN Passthrough Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetIPSecVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetPPTPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Get PPTP VPN Passthrough Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetPPTPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPSetPPTPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Set PPTP VPN Passthrough Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetPPTPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetL2TPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Get L2TP VPN Passthrough Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetL2TPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPSetL2TPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Set L2TP VPN Passthrough Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetL2TPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetDynamicNATEntryTimeout DESCRIPTION: The function sends 'QCMAP/Get Dynamic NAT Entry Timeout Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetDynamicNATEntryTimeout( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPSetDynamicNATEntryTimeout DESCRIPTION: The function sends 'QCMAP/Set Dynamic NAT Entry Timeout Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetDynamicNATEntryTimeout( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPAddStaticNATEntry DESCRIPTION: The function sends 'QCMAP/Add Static NAT Entry Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPAddStaticNATEntry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPDeleteStaticNATEntry DESCRIPTION: The function sends 'QCMAP/Delete Static NAT Entry Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDeleteStaticNATEntry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetStaticNATEntries DESCRIPTION: The function sends 'QCMAP/Get Static NAT Entries Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetStaticNATEntries( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPSetDMZ DESCRIPTION: The function sends 'QCMAP/Set DMZ Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetDMZ( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPDeleteDMZ DESCRIPTION: The function sends 'QCMAP/Delete DMZ Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDeleteDMZ( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetDMZ DESCRIPTION: The function sends 'QCMAP/Get DMZ Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetDMZ( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetWWANConfig DESCRIPTION: The function sends 'QCMAP/Get WWAN Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetWWANConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPEnableFirewallSetting DESCRIPTION: The function sends 'QCMAP/Enable Firewall Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPEnableFirewallSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetFirewallSetting DESCRIPTION: The function sends 'QCMAP/Get Firewall Setting Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetFirewallSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPDisableFirewallSetting DESCRIPTION: The function sends 'QCMAP/Disable Firewall Setting Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDisableFirewallSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPAddFirewallConfig DESCRIPTION: The function sends 'QCMAP/Add Firewall Config Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPAddFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetFirewallConfig DESCRIPTION: The function sends 'QCMAP/Get Firewall Config Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPDeleteFirewallConfig DESCRIPTION: The function sends 'QCMAP/Delete Firewall Config Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDeleteFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPWWANStatusIndicationRegister DESCRIPTION: The function sends 'QCMAP/WWAN Status Indication Register Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPWWANStatusIndicationRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPStationModeEnable DESCRIPTION: The function sends 'QCMAP/Station Mode Enable Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPStationModeEnable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPStationModeDisable DESCRIPTION: The function sends 'QCMAP/Station Mode Disable Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPStationModeDisable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetStationMode DESCRIPTION: The function sends 'QCMAP/Get Station Mode Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetStationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPAddExtendedFirewallConfig DESCRIPTION: The function sends 'QCMAP/Add Extended Firewall Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPAddExtendedFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetExtendedFirewallConfig DESCRIPTION: The function sends 'QCMAP/Get Extended Firewall Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetExtendedFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetFirewallHandles DESCRIPTION: The function sends 'QCMAP/Get Firewall Handles Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetFirewallHandles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPChangeNATType DESCRIPTION: The function sends 'QCMAP/Change NAT Type Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPChangeNATType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: QCMAPGetNATType DESCRIPTION: The function sends 'QCMAP/Get NAT Type Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetNATType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCReset DESCRIPTION: The function sends 'PDC/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCRegisterForIndications DESCRIPTION: The function sends 'PDC/Register For Indications Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCRegisterForIndications( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCGetSelectedConfig DESCRIPTION: The function sends 'PDC/Get Selected Config Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCSetSelectedConfig DESCRIPTION: The function sends 'PDC/Set Selected Config Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCSetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCListConfigs DESCRIPTION: The function sends 'PDC/List Configs Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCListConfigs( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCDeleteConfig DESCRIPTION: The function sends 'PDC/Delete Config Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCDeleteConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCLoadConfig DESCRIPTION: The function sends 'PDC/Load Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCLoadConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCActivateConfig DESCRIPTION: The function sends 'PDC/Activate Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCActivateConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCGetConfigInfo DESCRIPTION: The function sends 'PDC/Get Config Info Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCGetConfigLimits DESCRIPTION: The function sends 'PDC/Get Config Limits Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigLimits( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCGetDefaultConfigInfo DESCRIPTION: The function sends 'PDC/Get Default Config Info Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetDefaultConfigInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCDeactivateConfig DESCRIPTION: The function sends 'PDC/Deactivate Config Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCDeactivateConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RFRPESetRFMScenario DESCRIPTION: The function sends 'RFRPE/Set RFM Scenario Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RFRPESetRFMScenario( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RFRPEGetRFMScenario DESCRIPTION: The function sends 'RFRPE/Get RFM Scenario Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RFRPEGetRFMScenario( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RFRPEGetProvisionedTableRevision DESCRIPTION: The function sends 'RFRPE/Get Provisioned Table Revision Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RFRPEGetProvisionedTableRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetSupportedMessages DESCRIPTION: The function sends 'CAT/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetSupportedFields DESCRIPTION: The function sends 'CAT/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiConnectionMgmt/GobiConnectionMgmtAPIEnums.h000066400000000000000000013516161455567757300312740ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIEnums.h DESCRIPTION: Declaration of the Gobi API enumerations Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Gobi API error code enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrors) eGOBI_ERR_QMI_OFFSET = 1000 }; // Enum to describe possible QMI services enum eQMIService:BYTE { eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_QCHAT, // 013 QCHAT Service eQMI_SVC_RMTFS, // 014 Remote file system service eQMI_SVC_TEST, // 015 Test service eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_IMSS, // 018 IMS settings service eQMI_SVC_ADC, // 019 Analog to digital converter driver service eQMI_SVC_CSD, // 020 Core sound driver service eQMI_SVC_MFS, // 021 Modem embedded file system service eQMI_SVC_TIME, // 022 Time service eQMI_SVC_TS, // 023 Thermal sensors service eQMI_SVC_TMD, // 024 Thermal mitigation device service eQMI_SVC_SAP, // 025 Service access proxy service eQMI_SVC_WDA, // 026 Wireless data administrative service eQMI_SVC_TSYNC, // 027 TSYNC control service eQMI_SVC_RFSA, // 028 Remote file system access service eQMI_SVC_CSVT, // 029 Circuit switched videotelephony service eQMI_SVC_QCMAP, // 030 Qualcomm mobile access point service eQMI_SVC_IMSP, // 031 IMS presence service eQMI_SVC_IMSVT, // 032 IMS videotelephony service eQMI_SVC_IMSA, // 033 IMS application service eQMI_SVC_COEX, // 034 Coexistence service eQMI_SVC_RESERVED_35, // 035 Reserved eQMI_SVC_PDC, // 036 Persistent device configuration service eQMI_SVC_RESERVED_37, // 037 Reserved eQMI_SVC_STX, // 038 Simultaneous transmit service eQMI_SVC_BIT, // 039 Bearer independent transport service eQMI_SVC_IMSRTP, // 040 IMS RTP service eQMI_SVC_RFRPE, // 041 RF radiated performance enhancement service eQMI_SVC_DSD, // 042 Data system determination service eQMI_SVC_SSCTL, // 043 Subsystem control service eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA // 226 Open mobile alliance dev mgmt service }; // Enum to describe QMI CTL Message types enum eQMIMessageCTL:WORD { eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE // 43 Get power save mode }; // Enum to describe QMI WDS Message types enum eQMIMessageWDS:WORD { eQMI_WDS_RESET, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_SET_INDICATION, // 003 Set indication conditions eQMI_WDS_GET_MESSAGES = 30, // 030 Get supported messages eQMI_WDS_GET_FIELDS, // 031 Get supported fields eQMI_WDS_START_NET, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_FMC_TUNNEL, // 078 Set FMC tunnel parameters eQMI_WDS_CLEAR_FMC_TUNNEL, // 079 Clear FMC tunnel parameters eQMI_WDS_GET_FMC_TUNNEL, // 080 Get FMC tunnel parameters eQMI_WDS_SET_AUTOCONNECT, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_TMGI_ACTIVATE, // 101 Activate eMBMS TMGI eQMI_WDS_TMGI_ACT_IND = 101, // 101 eMBMS TMGI activate indication eQMI_WDS_TMGI_DEACTIVATE, // 102 Activate eMBMS TMGI eQMI_WDS_TMGI_DEACT_IND = 102, // 102 eMBMS TMGI activate indication eQMI_WDS_TMGI_LIST_QUERY, // 103 Query for eMBMS TMGI list eQMI_WDS_TMGI_LIST_IND, // 104 eMBMS TMGI list query indication eQMI_WDS_GET_PREF_DATA_SYS, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_GET_CURR_DATA_SYS, // 107 Get current data systems status eQMI_WDS_GET_PDN_THROTTLE, // 108 Get PDN throttle info eQMI_WDS_GET_LTE_ATTACH = 133, // 133 Get LTE attach parameters eQMI_WDS_RESET_PKT_STATS, // 134 Reset packet statistics eQMI_WDS_GET_FLOW_CTRL_STATUS, // 135 Get flow control status eQMI_WDS_TMGI_SWITCH, // 136 Activate/deactivate eMBMS TMGI eQMI_WDS_TMGI_SWITCH_IND = 136,// 136 eMBMS TMGI activate/deactivate ind eQMI_WDS_BIND_DATA_PORT, // 137 Bind data port eQMI_WDS_SET_PDN_FILTER, // 138 Set additional PDN filter eQMI_WDS_REMOVE_PDN_FILTER, // 139 Remove PDN filter eQMI_WDS_EX_IP_CFG_IND, // 140 Extend IP config indication eQMI_WDS_CFG_REV_IP_CONN_EVT, // 141 Configure reverse IP connection event eQMI_WDS_REV_IP_TRANSPORT_IND, // 142 Reverse IP transport connection ind eQMI_WDS_GET_IPSEC_SA_CFG, // 143 Get IPSec static SA config eQMI_WDS_REV_IP_TPORT_CFG_DONE,// 144 Reverse IP transport config complete eQMI_WDS_GET_EX_DATA_BEARER, // 145 Get extended data bearer eQMI_WDS_GET_LTE_MAX_ATTACH, // 146 Get LTE maximum attach PDN number eQMI_WDS_SET_LTE_ATTACH_PDNS, // 147 Set LTE attach PDN list eQMI_WDS_GET_LTE_ATTACH_PDNS, // 148 Set LTE attach PDN list eQMI_WDS_LTE_ATTACH_PDNS_IND, // 149 LTE attach PDN list indication eQMI_WDS_SET_LTE_DATA_RETRY, // 150 Set LTE data retry eQMI_WDS_GET_LTE_DATA_RETRY, // 151 Get LTE data retry eQMI_WDS_SET_LTE_ATTACH_TYPE, // 152 Set LTE attach type eQMI_WDS_GET_LTE_ATTACH_TYPE, // 153 Get LTE attach type eQMI_WDS_REV_IP_FILTER_IND, // 154 Reverse IP transport filter ind eQMI_WDS_HANDOFF_INFO_IND // 155 Handoff info indication }; // Enum to describe QMI DMS Message types enum eQMIMessageDMS:WORD { eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_MESSAGES = 30, // 30 Get supported messages eQMI_DMS_GET_FIELDS, // 31 Get supported fields eQMI_DMS_GET_CAPS, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_GET_CURRENT_PRL_INFO,// 83 Get current PRL info eQMI_DMS_BIND_SUBSCRIPTION, // 84 Bind subscription eQMI_DMS_GET_SUBSCRIPTION // 85 Get bound subscription }; // Enum to describe QMI NAS Message types enum eQMIMessageNAS:WORD { eQMI_NAS_RESET, // 000 Reset NAS service state variables eQMI_NAS_ABORT, // 001 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 002 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 002 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 003 Set NAS registration report conditions eQMI_NAS_GET_MESSAGES = 30, // 030 Get supported messages eQMI_NAS_GET_FIELDS, // 031 Get supported fields eQMI_NAS_GET_RSSI, // 032 Get the signal strength eQMI_NAS_SCAN_NETS, // 033 Scan for visible network eQMI_NAS_REGISTER_NET, // 034 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 035 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 036 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 036 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 037 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 038 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 039 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 040 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 041 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 042 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 043 Get the technology preference eQMI_NAS_GET_ACCOLC, // 044 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 045 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 046 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 047 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 048 Set various network parameters eQMI_NAS_GET_RF_INFO, // 049 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 050 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 051 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 052 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 052 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 055 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 056 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 056 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 057 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 058 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 059 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 060 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 061 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 062 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 063 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 064 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 065 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 066 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 067 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 068 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 069 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 070 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 071 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 072 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 073 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 075 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 076 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 077 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 078 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 079 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 080 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 081 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 082 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 083 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 084 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 085 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 086 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 087 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 088 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 089 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 090 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 091 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 092 Get dual standby preference eQMI_NAS_DETACH_LTE, // 093 Detach the current LTE system eQMI_NAS_BLOCK_LTE_PLMN, // 094 Block LTE PLMN eQMI_NAS_UNBLOCK_LTE_PLMN, // 095 Unblock LTE PLMN eQMI_NAS_RESET_LTE_PLMN_BLK, // 096 Reset LTE PLMN blocking eQMI_NAS_CUR_PLMN_NAME_IND, // 097 Current PLMN name indication eQMI_NAS_CONFIG_EMBMS, // 098 Configure eMBMS eQMI_NAS_GET_EMBMS_STATUS, // 099 Get eMBMS status eQMI_NAS_EMBMS_STATUS_IND, // 100 eMBMS status indication eQMI_NAS_GET_CDMA_POS_INFO, // 101 Get CDMA position info eQMI_NAS_RF_BAND_INFO_IND, // 102 RF band info indication eQMI_NAS_FORCE_NET_SEARCH, // 103 Force network search eQMI_NAS_NET_REJECT_IND, // 104 Network reject indication eQMI_NAS_GET_MANAGED_ROAM, // 105 Get managed roaming configuration eQMI_NAS_RTRE_CONFIG_IND, // 106 RTRE configuration indication eQMI_NAS_GET_CENTRALIZED_EOM, // 107 Get centralized EONS support eQMI_NAS_CFG_SIGNAL_INFO2, // 108 Configure signal info report (V2) eQMI_NAS_GET_TDS_CELL_INFO, // 109 Get TD-SCDMA cell/position info eQMI_NAS_SET_HPLMN_IRAT_TIMER,// 110 Set HPLMN IRAT search timer eQMI_NAS_GET_EMBMS_SIQ_QUAL, // 111 Get eMBMS signal quality eQMI_NAS_LIMIT_SYS_INFO, // 112 Limit system info indications eQMI_NAS_GET_SYS_INFO_LIMITS, // 113 Get system info indication limits eQMI_NAS_UPDATE_IMS_STATUS, // 114 Update IMS status eQMI_NAS_GET_IMS_PREFERENCE, // 115 Get IMS preference status eQMI_NAS_IMS_PREFERENCE_IND, // 116 IMS preference status indication eQMI_NAS_CFG_IND_PLMN_NAME, // 117 Configure indication for PLMN name eQMI_NAS_CDMA_AVOID_SYSTEM, // 118 CDMA avoid system eQMI_NAS_GET_AVOIDED_SYSTEMS, // 119 Get CDMA avoided system list eQMI_NAS_SET_HPLMN_SRCH_TIMER,// 120 Set HPLMN search timer eQMI_NAS_GET_HPLMN_SRCH_TIMER,// 121 Get HPLMN search timer eQMI_NAS_SET_E911_STATE, // 122 Set E911 state eQMI_NAS_E911_STATE_IND, // 123 E911 state ready indication eQMI_NAS_GET_SUBS_INFO, // 124 Get subscription info eQMI_NAS_GET_NET_TIME, // 125 Get network time eQMI_NAS_GET_LTE_SIB16_TIME, // 126 Get LTE SIB16 network time eQMI_NAS_LTE_SIB16_TIME_IND // 127 LTE SIB16 network time indication }; // Enum to describe QMI WMS Message types enum eQMIMessageWMS:WORD { eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_GET_MESSAGES = 30, // 030 Get supported messages eQMI_WMS_GET_FIELDS, // 031 Get supported fields eQMI_WMS_RAW_SEND, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_GET_DOMAIN_PREF_CFG, // 81 Get domain pref config eQMI_WMS_SET_DOMAIN_PREF_CFG, // 82 Set domain pref config eQMI_WMS_GET_RETRY_PERIOD, // 83 Get retry period eQMI_WMS_GET_RETRY_INTERVAL, // 84 Get retry interval eQMI_WMS_GET_DC_DISCO_TIMER, // 85 Get DC auto-disconnect timer eQMI_WMS_GET_MEMORY_STATUS, // 86 Get memory storage status eQMI_WMS_GET_PRIMARY_CLIENT, // 87 Get primary cleint eQMI_WMS_GET_SUBSCR_BINDING, // 88 Get client subscription binding eQMI_WMS_ASYNC_RAW_SEND, // 89 Asynchronously send a raw message eQMI_WMS_ASYNC_RAW_SEND_IND = 89,// 89 Asynchronous send indication eQMI_WMS_ASYNC_SEND_ACK, // 90 Asynchronously send ACK eQMI_WMS_ASYNC_SEND_ACK_IND = 90,// 90 Asynchronou send ACK indication eQMI_WMS_ASYNC_MEMORY_SEND, // 91 Async send msg from memory store eQMI_WMS_ASYNC_MEM_SEND_IND = 91,// 91 Async memory store send indication eQMI_WMS_GET_SERVICE_READY, // 92 Get service ready status eQMI_WMS_SERVICE_READY_IND, // 93 Service ready status indication eQMI_WMS_BC_CONFIG_IND, // 94 Broadcast config indication eQMI_WMS_SET_MSG_WAITING // 95 Set message waiting info }; // Enum to describe QMI PDS Message types enum eQMIMessagePDS:WORD { eQMI_PDS_RESET, // 000 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 001 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 001 PDS report indication eQMI_PDS_GET_STATE = 32, // 032 Return PDS service state eQMI_PDS_STATE_IND = 32, // 032 PDS service state indication eQMI_PDS_SET_STATE, // 033 Set PDS service state eQMI_PDS_START_SESSION, // 034 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 035 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 036 Manual tracking session position eQMI_PDS_END_SESSION, // 037 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 038 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 039 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 040 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 041 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 042 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 043 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 044 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 045 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 046 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 047 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 048 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 049 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 050 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 051 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 052 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 053 Request single position fix eQMI_PDS_GET_VERSION, // 054 Get PDS service version eQMI_PDS_INJECT_XTRA, // 055 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 056 Inject position data eQMI_PDS_INJECT_WIFI, // 057 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 058 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 059 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 060 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 061 Inject absolute time eQMI_PDS_INJECT_EFS, // 062 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 063 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 064 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 065 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 066 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 067 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 068 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 069 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 070 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 070 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 071 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 072 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 072 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 073 Force receiver off eQMI_PDS_GET_METHODS = 80, // 080 Get GPS position methods state eQMI_PDS_SET_METHODS, // 081 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 082 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 083 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 084 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 085 Set sensor config eQMI_PDS_GET_NAV_CFG, // 086 Get navigation config eQMI_PDS_SET_NAV_CFG, // 087 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 090 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 091 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 091 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 092 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 093 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 094 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 095 Set cell database control eQMI_PDS_READY_IND, // 096 Ready indication eQMI_PDS_INJECT_MOTION_DATA, // 097 Inject motion data eQMI_PDS_SET_GNSS_ERR_REPORT, // 098 Set GNSS error recovery report eQMI_PDS_GNSS_ERR_IND = 98, // 098 GNSS error recovery report indication eQMI_PDS_RESET_SERVICE, // 099 Reset location service eQMI_PDS_INJECT_TEST_DATA, // 100 Inject test data eQMI_PDS_SET_GNSS_RF_CFG, // 101 Set GNSS RF config eQMI_PDS_INJECT_COG_DATA, // 102 Inject course over ground data eQMI_PDS_INJECT_SUPL_CERT, // 103 Inject SUPL certificate eQMI_PDS_DELETE_SUPL_CERT , // 104 Delete SUPL certificate eQMI_PDS_GET_IS801_OVER_SUPL, // 105 Get IS-801 Over SUPL indicator eQMI_PDS_SET_IS801_OVER_SUPL, // 106 Set IS-801 Over SUPL indicator eQMI_PDS_GET_SUPL_HASH_ALG, // 107 Get SUPL hash algorithm eQMI_PDS_SET_SUPL_HASH_ALG, // 108 Set SUPL hash algorithm eQMI_PDS_GET_SUPL_MAX_VERSION, // 109 Get SUPL maximum version eQMI_PDS_SET_SUPL_MAX_VERSION, // 110 Set SUPL maximum version eQMI_PDS_GET_SUPL_SECURITY, // 111 Get SUPL security eQMI_PDS_SET_SUPL_SECURITY, // 112 Set SUPL security eQMI_PDS_GET_SUPL_TLS_VERSION, // 113 Get SUPL TLS version eQMI_PDS_SET_SUPL_TLS_VERSION, // 114 Set SUPL TLS version eQMI_PDS_GET_AGNSS_POS_MODES, // 115 Get AGNSS positioning modes eQMI_PDS_SET_AGNSS_POS_MODES, // 116 Set AGNSS positioning modes eQMI_PDS_GET_EMERGENCY_PROTO, // 117 Get emergency protocol config eQMI_PDS_SET_EMERGENCY_PROTO, // 118 Set emergency protocol config eQMI_PDS_GET_APN_PROFILES, // 119 Get APN profiles eQMI_PDS_SET_APN_PROFILES, // 120 Set APN profiles eQMI_PDS_GET_HOME_SUPL_ADDR, // 121 Get home SUPL address eQMI_PDS_SET_HOME_SUPL_ADDR, // 122 Set home SUPL address eQMI_PDS_INJECT_VEHICLE_DATA, // 123 Inject vehicle sensor data }; // Enum to describe QMI AUTH Message types enum eQMIMessageAUTH:WORD { eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND // 38 AKA algorithm result indication }; // Enum to describe QMI VOICE Message types enum eQMIMessageVoice:WORD { eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_GET_MESSAGES = 30, // 30 Get supported messages eQMI_VOICE_GET_FIELDS, // 31 Get supported fields eQMI_VOICE_CALL_ORIGINATE, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls eQMI_VOICE_ALS_GET_LINE_SW, // 79 ALS get line switching eQMI_VOICE_ALS_GET_LINE_SEL, // 80 ALS get selected line eQMI_VOICE_MODIFIED_IND, // 81 Call modified indication eQMI_VOICE_MODIFY_ACCEPT_IND, // 82 Call modify accept indication eQMI_VOICE_SPEECH_CODEC_IND, // 83 Speech codec info indication eQMI_VOICE_HANDOVER_IND, // 84 Handover indication eQMI_VOICE_CONFERENCE_INFO_IND, // 85 Conference info indication eQMI_VOICE_CONFERENCE_JOIN_IND, // 86 Conference join indication eQMI_VOICE_CONFERENCE_UPDATE_IND, // 87 Conference update indication eQMI_VOICE_EXT_BURST_TYPE_IND, // 88 Extended burst type indication eQMI_VOICE_MT_PAGE_MISS_IND, // 89 MT page miss indication eQMI_VOICE_CC_RESULT_INFO_IND // 90 Call control result info indication }; // Enum to describe QMI UIM Message types enum eQMIMessageUIM:WORD { eQMI_UIM_RESET, // 00 Reset eQMI_UIM_GET_MESSAGES = 30, // 30 Get supported messages eQMI_UIM_GET_FIELDS, // 31 Get supported fields eQMI_UIM_READ_TRANSPARENT, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SEND_ADPU_IND = 59, // 59 Send ADPU indication eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR eQMI_UIM_SESSION_CLOSED_IND, // 67 Session closed indication eQMI_UIM_REGISTER_REFRESH_ALL, // 68 Register for all refresh eQMI_UIM_SET_FILE_STATUS // 69 Set file status }; // Enum to describe QMI PBM Message types enum eQMIMessagePBM:WORD { eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_GET_SUBSCRIPTION, // 27 Get subscription client is bound to eQMI_PBM_SET_CAPS_READ_OP, // 28 ADN set capabilities read operation eQMI_PBM_SET_CAPS_READ_IND = 28, // 28 ADN set caps read op indication eQMI_PBM_EX_READ_RECORDS, // 29 Read phonebook records eQMI_PBM_EX_READ_RECORD_IND = 29,// 29 Read phonebook record indication eQMI_PBM_EX_WRITE_RECORD, // 30 Add/modify a phonebook record eQMI_PBM_EX_SEARCH_RECORDS, // 31 Search phonebook records eQMI_PBM_EX_READ_ALL_HIDDEN_RECS,// 32 Read all hidden phonebook records eQMI_PBM_SIM_INIT_DONE_IND, // 33 SIM initialization done indication eQMI_PBM_READ_UNDC_RECS, // 34 Read undecoded phonebook records eQMI_PBM_READ_UNDC_RECS_IND = 34 // 34 Read undecoded phonebook record ind }; // Enum to describe QMI LOC Message types enum eQMIMessageLOC:WORD { eQMI_LOC_GET_MESSAGES = 30, // 030 Get supported messages eQMI_LOC_GET_FIELDS, // 031 Get supported fields eQMI_LOC_CLIENT_REVISION, // 032 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 033 Register for events/indications eQMI_LOC_START, // 034 Start GPS session eQMI_LOC_STOP, // 035 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 036 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 037 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 038 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 039 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 040 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 041 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 042 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 043 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 044 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 045 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 046 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 047 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 048 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 049 Server connection req indication eQMI_LOC_GET_REV_REQ, // 050 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 050 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 051 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 051 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 052 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 052 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 053 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 053 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 054 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 054 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 055 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 055 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 056 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 056 Inject UTC time indication eQMI_LOC_INJECT_POS, // 057 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 057 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 058 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 058 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 059 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 059 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 060 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 060 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 061 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 061 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 062 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 062 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 063 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 063 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 064 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 064 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 065 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 065 Get low power mode config indication eQMI_LOC_SET_SERVER, // 066 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 066 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 067 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 067 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 068 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 068 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 069 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 069 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 070 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 070 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 071 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 071 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 072 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 072 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 073 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 073 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 074 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 074 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 075 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 075 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 076 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 076 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 077 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 077 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 078 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 078 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 079 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 079 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 080 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 080 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 081 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 081 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 082 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 082 Get external power config indication eQMI_LOC_INFORM_CONN, // 083 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 083 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 084 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 084 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 085 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 085 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 086 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 086 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 087 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 087 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 088 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 088 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 089 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 089 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 090 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 090 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 091 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 091 Get sensor performance control ind eQMI_LOC_INJ_SUPL_CERT, // 092 Inject SUPL certificate eQMI_LOC_INJ_SUPL_CERT_IND = 92, // 092 Inject SUPL certificate indication eQMI_LOC_DEL_SUPL_CERT, // 093 Delete SUPL certificate eQMI_LOC_DEL_SUPL_CERT_IND = 93, // 093 Delete SUPL certificate indication eQMI_LOC_SET_ENGINE_CFG, // 094 Set position engine config eQMI_LOC_SET_ENGINE_CFG_IND = 94,// 094 Set position engine config ind eQMI_LOC_GET_ENGINE_CFG, // 095 Get position engine config eQMI_LOC_GET_ENGINE_CFG_IND = 95,// 095 Get position engine config ind eQMI_LOC_GEOFENCE_NOTIF_IND, // 096 Geofence notification indication eQMI_LOC_GEOFENCE_ALERT_IND, // 097 Geofence alert indication eQMI_LOC_GEOFENCE_BREACH_IND, // 098 Geofence breach indication eQMI_LOC_ADD_GEOFENCE, // 099 Add circular geofence eQMI_LOC_ADD_GEOFENCE_IND = 99, // 099 Add circular geofence indication eQMI_LOC_DEL_GEOFENCE, // 100 Delete geofence eQMI_LOC_DEL_GEOFENCE_IND = 100, // 100 Delete geofence indication eQMI_LOC_QRY_GEOFENCE, // 101 Query geofence eQMI_LOC_QRY_GEOFENCE_IND = 101, // 101 Query geofence indication eQMI_LOC_EDIT_GEOFENCE, // 102 Edit geofence eQMI_LOC_EDIT_GEOFENCE_IND = 102,// 102 Edit geofence indication eQMI_LOC_GET_BEST_POS, // 103 Get best available position eQMI_LOC_GET_BEST_POS_IND = 103, // 103 Get best available position ind eQMI_LOC_INJ_MOTION, // 104 Inject motion data eQMI_LOC_INJ_MOTION_IND = 104, // 104 Inject motion data indication eQMI_LOC_GET_NI_GF_IDS, // 105 Get NI geofence ID list eQMI_LOC_GET_NI_GF_IDS_IND = 105,// 105 Get NI geofence ID list indication eQMI_LOC_INJ_GSM_CELL, // 106 Inject GSM cell info eQMI_LOC_INJ_GSM_CELL_IND = 106, // 106 Inject GSM cell info indication eQMI_LOC_INJ_NI_MSG, // 107 Inject network initiated message eQMI_LOC_INJ_NI_MSG_IND = 107, // 107 Inject NI message indication eQMI_LOC_WWAN_OOS, // 108 Notify WWAN is now OOS eQMI_LOC_WWAN_OOS_IND = 108, // 108 Notify WWAN is now OOS indication eQMI_PEDOMETER_CTRL_IND, // 109 Pedometer control indication eQMI_MOTION_DATA_CTRL_IND, // 110 Motion data control indication eQMI_LOC_INJ_PEDOMETER, // 111 Inject pedometer data eQMI_LOC_INJ_PEDOMETER_IND = 111,// 111 Inject pedometer data indication eQMI_LOC_INJ_WCDMA_CI, // 112 Inject WCDMA cell info eQMI_LOC_INJ_WCDMA_CI_IND = 112, // 112 Inject WCDMA cell info indication eQMI_LOC_INJ_TDSCDMA, // 113 Inject TD-SCDMA cell info eQMI_LOC_INJ_TDSCDMA_IND = 113, // 113 Inject TD-SCDMA cell info indication eQMI_LOC_INJ_SUBS_ID, // 114 Inject subscriber ID eQMI_LOC_INJ_SUBS_ID_IND = 114 // 114 Inject subscriber ID indication }; // Enum to describe QMI WDA Message types enum eQMIMessageWDA:WORD { eQMI_WDA_GET_MESSAGES = 30, // 30 Get supported messages eQMI_WDA_GET_FIELDS, // 31 Get supported fields eQMI_WDA_SET_DATA_FORMAT, // 32 eQMI_WDA_GET_DATA_FORMAT, // 33 eQMI_WDA_ENABLE_PKT_FILTER, // 34 eQMI_WDA_DISABLE_PKT_FILTER, // 35 eQMI_WDA_GET_PKT_FILTER_STATE, // 36 eQMI_WDA_ADD_PKT_FILTER_RULE, // 37 eQMI_WDA_DELETE_PKT_FILTER_RULE, // 38 eQMI_WDA_GET_PKT_FILTER_RULE_HANDLES, // 39 eQMI_WDA_GET_PKT_FILTER_RULE, // 40 eQMI_WDA_SET_LOOPBACK_STATE, // 41 eQMI_WDA_GET_LOOPBACK_STATE, // 42 }; // Enum to describe QMI QCMAP Message types enum eQMIMessageQCMAP:WORD { eQMI_QCMAP_ENABLE = 32, // 32 eQMI_QCMAP_DISABLE, // 33 eQMI_QCMAP_BRING_UP_WWAN, // 34 eQMI_QCMAP_BRING_UP_WWAN_IND = 34, // 34 eQMI_QCMAP_TEAR_DOWN_WWAN, // 35 eQMI_QCMAP_TEAR_DOWN_WWAN_IND = 35, // 35 eQMI_QCMAP_GET_WWAN_STATUS, // 36 eQMI_QCMAP_GET_IPSEC_VPN_PASSTHROUGH, // 37 eQMI_QCMAP_SET_IPSEC_VPN_PASSTHROUGH, // 38 eQMI_QCMAP_GET_PPTP_VPN_PASSTHROUGH, // 39 eQMI_QCMAP_SET_PPTP_VPN_PASSTHROUGH, // 40 eQMI_QCMAP_GET_L2TP_VPN_PASSTHROUGH, // 41 eQMI_QCMAP_SET_L2TP_VPN_PASSTHROUGH, // 42 eQMI_QCMAP_GET_DYNAMIC_NAT_ENTRY_TO, // 43 eQMI_QCMAP_SET_DYNAMIC_NAT_ENTRY_TO, // 44 eQMI_QCMAP_ADD_SNAT_ENTRY, // 45 eQMI_QCMAP_DELETE_SNAT_ENTRY, // 46 eQMI_QCMAP_GET_SNAT_ENTRIES, // 47 eQMI_QCMAP_SET_DMZ, // 48 eQMI_QCMAP_DELETE_DMZ, // 49 eQMI_QCMAP_GET_DMZ, // 50 eQMI_QCMAP_GET_WWAN_CONFIG, // 51 eQMI_QCMAP_ENABLE_FIREWALL_SETTING, // 52 eQMI_QCMAP_GET_FIREWALL_SETTING, // 53 eQMI_QCMAP_DISABLE_FIREWALL_SETTING, // 54 eQMI_QCMAP_ADD_FIREWALL_CONFIG, // 55 eQMI_QCMAP_GET_FIREWALL_CONFIG, // 56 eQMI_QCMAP_DELETE_FIREWALL_CONFIG, // 57 eQMI_QCMAP_WWAN_STATUS_IND_REG, // 58 eQMI_QCMAP_STATION_MODE_ENABLE, // 59 eQMI_QCMAP_STATION_MODE_DISABLE, // 60 eQMI_QCMAP_GET_STATION_MODE, // 61 eQMI_QCMAP_WWAN_STATUS_IND, // 62 eQMI_QCMAP_ADD_EXT_FIREWALL_CONFIG, // 63 eQMI_QCMAP_GET_EXT_FIREWALL_CONFIG, // 64 eQMI_QCMAP_GET_FIREWALL_HANDLES, // 65 eQMI_QCMAP_CHANGE_NAT_TYPE, // 66 eQMI_QCMAP_GET_NAT_TYPE // 67 }; // Enum to describe QMI PDC Message types enum eQMIMessagePDC:WORD { eQMI_PDC_RESET = 0, // 00 Reset the PDC service eQMI_PDC_REG_INDICATIONS = 32, // 32 Register for indications eQMI_PDC_CFG_CHANGE_IND, // 33 Config change indication eQMI_PDC_GET_CFG, // 34 Get selected config eQMI_PDC_GET_CFG_IND = 34, // 34 Get selected config indication eQMI_PDC_SET_CFG, // 35 Set selected config eQMI_PDC_SET_CFG_IND = 35, // 35 Set selected config indication eQMI_PDC_LIST_CFGS, // 36 List configs eQMI_PDC_LIST_CFGS_IND = 36, // 36 List configs indication eQMI_PDC_DEL_CFG, // 37 Delete config eQMI_PDC_DEL_CFG_IND = 37, // 37 Delete config indication eQMI_PDC_LOAD_CFG, // 38 Load config eQMI_PDC_LOAD_CFG_IND = 38, // 38 Load config indication eQMI_PDC_ACTIVATE_CFG, // 39 Activate config eQMI_PDC_ACTIVATE_CFG_IND = 39, // 39 Activate config indication eQMI_PDC_GET_CFG_INFO, // 40 Get config info eQMI_PDC_GET_CFG_INFO_IND = 40, // 40 Get config info indication eQMI_PDC_GET_CFG_LIMITS, // 41 Get config limits eQMI_PDC_GET_CFG_LIMITS_IND = 41, // 41 Get config limits indication eQMI_PDC_GET_DEF_CFG_INFO, // 42 Get default config info eQMI_PDC_GET_DEF_CFG_INFO_IND = 42, // 42 Get default config info indication eQMI_PDC_DEACTIVATE_CFG, // 43 Deactivate active config eQMI_PDC_DEACTIVATE_CFG_IND = 43, // 43 Deactivate active config ind }; // Enum to describe QMI RFRPE Message types enum eQMIMessageRFRPE:WORD { eQMI_RFRPE_SET_RFM_SCENARIO = 32, // 32 Set RFM scenario eQMI_RFRPE_GET_RFM_SCENARIO, // 33 Get RFM scenario eQMI_RFRPE_GET_TABLE_REVISION, // 34 Get provisioned table revision }; // Enum to describe QMI CAT Message types enum eQMIMessageCAT:WORD { eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_MESSAGES = 30, // 30 Get supported messages eQMI_CAT_GET_FIELDS, // 31 Get supported fields eQMI_CAT_GET_STATE, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_GET_TERMINAL_PROFILE, // 44 Get current modem terminal profile eQMI_CAT_SET_CONFIG, // 45 Set configuration eQMI_CAT_GET_CONFIG // 46 Get configuration }; // Enum to describe QMI RMS Message types enum eQMIMessageRMS:WORD { eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE // 33 Set SMS wake settings }; // Enum to describe QMI OMA Message types enum eQMIMessageOMA:WORD { eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES // 37 Set feature settings }; // Enum to describe QMI AUTH AKA Result enum eQMIAUTHAKAResult:UINT8 { eQMIAUTHAKAResult_Success = 0, eQMIAUTHAKAResult_SyncFailure = 1, eQMIAUTHAKAResult_Failure = 2, }; // Enum to describe QMI AUTH AKA Version enum eQMIAUTHAKAVersion:UINT8 { eQMIAUTHAKAVersion_Version1 = 0, eQMIAUTHAKAVersion_Version2 = 1, }; // Enum to describe QMI AUTH EAP Result enum eQMIAUTHEAPResult:UINT8 { eQMIAUTHEAPResult_Success = 0, eQMIAUTHEAPResult_Failure = 1, }; // Enum to describe QMI AUTH SIM AKA Algorithm enum eQMIAUTHSIMAKAAlgorithm:UINT32 { eQMIAUTHSIMAKAAlgorithm_None = 0, eQMIAUTHSIMAKAAlgorithm_SHA1 = 1, eQMIAUTHSIMAKAAlgorithm_MILENAGE = 2, eQMIAUTHSIMAKAAlgorithm_CAVE = 3, eQMIAUTHSIMAKAAlgorithm_GSM = 4, eQMIAUTHSIMAKAAlgorithm_USIMGSM = 5, }; // Enum to describe QMI CAT Activate Targets enum eQMICATActivateTargets:UINT8 { eQMICATActivateTargets_UICCCLFInterface = 1, }; // Enum to describe QMI CAT Address NPI enum eQMICATAddressNPI:UINT8 { eQMICATAddressNPI_Unknown = 0, eQMICATAddressNPI_ISDNTelephony = 1, eQMICATAddressNPI_DataNPI = 2, eQMICATAddressNPI_TelexNPI = 3, eQMICATAddressNPI_PrivateNPI = 4, eQMICATAddressNPI_ExtensionIsReserved = 15, }; // Enum to describe QMI CAT Address TON enum eQMICATAddressTON:UINT8 { eQMICATAddressTON_Unknown = 0, eQMICATAddressTON_InternationalNumber = 1, eQMICATAddressTON_NationalNumber = 2, eQMICATAddressTON_NetworkSpecificNumber = 3, }; // Enum to describe QMI CAT Address Type enum eQMICATAddressType:UINT8 { eQMICATAddressType_NoAddressGiven = 1, eQMICATAddressType_Dynamic = 2, eQMICATAddressType_IPv4 = 3, eQMICATAddressType_IPv6 = 4, }; // Enum to describe QMI CAT Alpha ID Command Type enum eQMICATAlphaIDCommandType:UINT8 { eQMICATAlphaIDCommandType_SendSMSProactiveCommand = 1, }; // Enum to describe QMI CAT Bearer enum eQMICATBearer:UINT8 { eQMICATBearer_SMS = 0, eQMICATBearer_CSD = 1, eQMICATBearer_USSD = 2, eQMICATBearer_GPRS = 3, eQMICATBearer_Default = 4, }; // Enum to describe QMI CAT Bearer Capability Repeat Indicator enum eQMICATBearerCapabilityRepeatIndicator:UINT8 { eQMICATBearerCapabilityRepeatIndicator_AlternateMode = 0, eQMICATBearerCapabilityRepeatIndicator_SequentialMode = 1, }; // Enum to describe QMI CAT Bearer Independent Protocol Status enum eQMICATBearerIndependentProtocolStatus:UINT32 { eQMICATBearerIndependentProtocolStatus_InProgress = 0, eQMICATBearerIndependentProtocolStatus_End = 1, }; // Enum to describe QMI CAT Browser Termination Causes enum eQMICATBrowserTerminationCauses:UINT32 { eQMICATBrowserTerminationCauses_UserTerminated = 0, eQMICATBrowserTerminationCauses_ErrorTerminated = 1, }; // Enum to describe QMI CAT CSD Bearer Name enum eQMICATCSDBearerName:UINT8 { eQMICATCSDBearerName_DataCircuitAsyncUDIOr31kHzModem = 0, eQMICATCSDBearerName_DataCircuitSyncUDIOr31kHzModem = 1, eQMICATCSDBearerName_PADAccessAsyncUDI = 2, eQMICATCSDBearerName_PacketAccessSyncUDI = 3, eQMICATCSDBearerName_DataCircuitAsyncRDI = 4, eQMICATCSDBearerName_DataCircuitSyncRDI = 5, eQMICATCSDBearerName_PADAccessAsyncRDI = 6, eQMICATCSDBearerName_PacketAccessSyncRDI = 7, }; // Enum to describe QMI CAT Call Control Result enum eQMICATCallControlResult:UINT8 { eQMICATCallControlResult_AllowedWithNoModification = 0, eQMICATCallControlResult_NotAllowed = 1, eQMICATCallControlResult_AllowedWithModification = 2, }; // Enum to describe QMI CAT Call Setup Requirement enum eQMICATCallSetupRequirement:UINT8 { eQMICATCallSetupRequirement_NoOtherCalls = 0, eQMICATCallSetupRequirement_HoldActiveCalls = 1, eQMICATCallSetupRequirement_DisconnectActiveCalls = 2, }; // Enum to describe QMI CAT Call Types enum eQMICATCallTypes:UINT32 { eQMICATCallTypes_Voice = 0, eQMICATCallTypes_SS = 1, eQMICATCallTypes_USSD = 2, eQMICATCallTypes_SMS = 3, }; // Enum to describe QMI CAT Channel State enum eQMICATChannelState:UINT8 { eQMICATChannelState_ClosedState = 0, eQMICATChannelState_ListenState = 1, eQMICATChannelState_EstablishedState = 2, }; // Enum to describe QMI CAT Command Format enum eQMICATCommandFormat:UINT8 { eQMICATCommandFormat_Raw = 1, eQMICATCommandFormat_Decoded = 2, }; // Enum to describe QMI CAT Command ID enum eQMICATCommandID:UINT8 { eQMICATCommandID_DisplayText = 1, eQMICATCommandID_GetInkey = 2, eQMICATCommandID_GetInput = 3, eQMICATCommandID_LaunchBrowser = 4, eQMICATCommandID_PlayTone = 5, eQMICATCommandID_SelectItem = 6, eQMICATCommandID_SendSMS = 7, eQMICATCommandID_SendSS = 8, eQMICATCommandID_SendUSSD = 9, eQMICATCommandID_SetupCallUserConfiguration = 10, eQMICATCommandID_SetupCallAlphaDisplay = 11, eQMICATCommandID_SetupMenu = 12, eQMICATCommandID_SetupIdleText = 13, eQMICATCommandID_ProvideLocalInformationLanguage = 14, eQMICATCommandID_SendDTMF = 15, eQMICATCommandID_LanguageNotification = 16, eQMICATCommandID_SetupEventUserActivity = 17, eQMICATCommandID_SetupEventIdleScreenNotify = 18, eQMICATCommandID_SetupEventLanguageSelectionNotify = 19, eQMICATCommandID_OpenChannel = 20, eQMICATCommandID_CloseChannel = 21, eQMICATCommandID_ReceiveData = 22, eQMICATCommandID_SendData = 23, eQMICATCommandID_Activate = 24, eQMICATCommandID_SetupEventHCIConnectivity = 25, eQMICATCommandID_SetupEventBrowserTermination = 32, }; // Enum to describe QMI CAT Config Modes enum eQMICATConfigModes:UINT8 { eQMICATConfigModes_DisabledMode = 0, eQMICATConfigModes_GobiMode = 1, eQMICATConfigModes_AndroidMode = 2, eQMICATConfigModes_DecodedMode = 3, eQMICATConfigModes_DecodedPullOnlyMode = 4, eQMICATConfigModes_CustomRawMode = 5, eQMICATConfigModes_CustomDecodedMode = 6, }; // Enum to describe QMI CAT Connection Element enum eQMICATConnectionElement:UINT8 { eQMICATConnectionElement_Transparent = 0, eQMICATConnectionElement_Nontransparent = 1, eQMICATConnectionElement_BothTransparentPreferred = 2, eQMICATConnectionElement_BothNontransparentPreferred = 3, }; // Enum to describe QMI CAT Data Coding Scheme enum eQMICATDataCodingScheme:UINT8 { eQMICATDataCodingScheme_7BitGSM = 0, eQMICATDataCodingScheme_8BitGSM = 1, eQMICATDataCodingScheme_UCS2 = 2, }; // Enum to describe QMI CAT Decoded Envelope Command enum eQMICATDecodedEnvelopeCommand:UINT16 { eQMICATDecodedEnvelopeCommand_MenuSelection = 1, eQMICATDecodedEnvelopeCommand_EventDownloadLanguageSelection = 2, eQMICATDecodedEnvelopeCommand_EventDownloadUserActivity = 3, eQMICATDecodedEnvelopeCommand_EventDownloadIdleScreenAvailable = 4, eQMICATDecodedEnvelopeCommand_SendCallControl = 5, eQMICATDecodedEnvelopeCommand_EventDownloadHCIConnectivity = 6, eQMICATDecodedEnvelopeCommand_EventBrowserTermination = 7, eQMICATDecodedEnvelopeCommand_SMSPPDataDownload = 8, eQMICATDecodedEnvelopeCommand_EventDownloadMTCall = 9, eQMICATDecodedEnvelopeCommand_EventDownloadMTCallConnected = 10, eQMICATDecodedEnvelopeCommand_EventDownloadMOCallConnected = 11, eQMICATDecodedEnvelopeCommand_EventDownloadCallDisconnectedNearEnd = 12, eQMICATDecodedEnvelopeCommand_EventDownloadCallDisconnectedFarEnd = 13, }; // Enum to describe QMI CAT Deliver Error SDU enum eQMICATDeliverErrorSDU:UINT8 { eQMICATDeliverErrorSDU_No = 0, eQMICATDeliverErrorSDU_Yes = 1, eQMICATDeliverErrorSDU_NoDetect = 2, eQMICATDeliverErrorSDU_SubscribedValue = 3, }; // Enum to describe QMI CAT Delivery Order enum eQMICATDeliveryOrder:UINT8 { eQMICATDeliveryOrder_No = 0, eQMICATDeliveryOrder_Yes = 1, eQMICATDeliveryOrder_SubscribedValue = 2, }; // Enum to describe QMI CAT Display Icon Only enum eQMICATDisplayIconOnly:UINT8 { eQMICATDisplayIconOnly_DoNotDisplayTheIcon = 0, eQMICATDisplayIconOnly_DisplayOnlyTheIcon = 1, }; // Enum to describe QMI CAT Envelope Command Type enum eQMICATEnvelopeCommandType:UINT16 { eQMICATEnvelopeCommandType_MenuSelection = 1, eQMICATEnvelopeCommandType_EventDownloadUserActivity = 2, eQMICATEnvelopeCommandType_EventDownloadIdleScreenAvailable = 3, eQMICATEnvelopeCommandType_EventDownloadLanguageSelection = 4, eQMICATEnvelopeCommandType_UnknownType = 5, eQMICATEnvelopeCommandType_EventDownloadBrowserTermination = 6, eQMICATEnvelopeCommandType_SendCallControl = 7, eQMICATEnvelopeCommandType_EventDownloadHCIConnectivity = 8, eQMICATEnvelopeCommandType_SMSPPDataDownload = 9, eQMICATEnvelopeCommandType_EventDownloadMTCall = 10, eQMICATEnvelopeCommandType_EventDownloadCallConnected = 11, eQMICATEnvelopeCommandType_EventDownloadCallDisconnected = 12, }; // Enum to describe QMI CAT Help Available enum eQMICATHelpAvailable:UINT8 { eQMICATHelpAvailable_NoHelpIsAvailable = 0, eQMICATHelpAvailable_HelpIsAvailable = 1, }; // Enum to describe QMI CAT Help Request enum eQMICATHelpRequest:UINT8 { eQMICATHelpRequest_NoHelpIsRequested = 0, eQMICATHelpRequest_HelpIsRequested = 1, }; // Enum to describe QMI CAT High Priority enum eQMICATHighPriority:UINT8 { eQMICATHighPriority_DoNotClearTheScreen = 0, eQMICATHighPriority_ClearAnythingThatIsOnTheScreen = 1, }; // Enum to describe QMI CAT Icon Is Displayed enum eQMICATIconIsDisplayed:UINT8 { eQMICATIconIsDisplayed_No = 0, eQMICATIconIsDisplayed_Yes = 1, }; // Enum to describe QMI CAT Icon Qualifier enum eQMICATIconQualifier:UINT8 { eQMICATIconQualifier_IconIsSelfExplanatory = 0, eQMICATIconQualifier_IconIsNotSelfExplanatory = 1, }; // Enum to describe QMI CAT Image Coding Scheme enum eQMICATImageCodingScheme:UINT8 { eQMICATImageCodingScheme_Unknown = 0, eQMICATImageCodingScheme_Basic = 1, eQMICATImageCodingScheme_Color = 2, }; // Enum to describe QMI CAT Immediate Response enum eQMICATImmediateResponse:UINT8 { eQMICATImmediateResponse_No = 0, eQMICATImmediateResponse_Yes = 1, }; // Enum to describe QMI CAT Is CDMA SMS enum eQMICATIsCDMASMS:UINT8 { eQMICATIsCDMASMS_NotCDMASMS = 0, eQMICATIsCDMASMS_CDMASMS = 1, }; // Enum to describe QMI CAT Launch Mode enum eQMICATLaunchMode:UINT8 { eQMICATLaunchMode_LaunchIfNotAlreadyLaunched = 0, eQMICATLaunchMode_UseTheExistingBrowser = 1, eQMICATLaunchMode_CloseTheExistingBroswer = 2, }; // Enum to describe QMI CAT Next Action enum eQMICATNextAction:UINT8 { eQMICATNextAction_SetupCall = 0, eQMICATNextAction_SendSS = 1, eQMICATNextAction_SendUSSD = 2, eQMICATNextAction_SendShortMessage = 3, eQMICATNextAction_LaunchBrowser = 4, eQMICATNextAction_PlayTone = 5, eQMICATNextAction_DisplayText = 6, eQMICATNextAction_GetInkey = 7, eQMICATNextAction_GetInput = 8, eQMICATNextAction_SelectItem = 9, eQMICATNextAction_SetupMenu = 10, eQMICATNextAction_SetupIdleModeText = 11, eQMICATNextAction_EndOfTheProactiveSession = 12, eQMICATNextAction_ProvideLocalInformation = 13, }; // Enum to describe QMI CAT Notification Required enum eQMICATNotificationRequired:UINT8 { eQMICATNotificationRequired_NotificationIsNotRequired = 0, eQMICATNotificationRequired_NotificationIsRequired = 1, }; // Enum to describe QMI CAT On Demand Link Establish enum eQMICATOnDemandLinkEstablish:UINT8 { eQMICATOnDemandLinkEstablish_LinkIsNotRequired = 0, eQMICATOnDemandLinkEstablish_LinkIsRequired = 1, }; // Enum to describe QMI CAT PDP Type enum eQMICATPDPType:UINT8 { eQMICATPDPType_IP = 2, }; // Enum to describe QMI CAT Packet Data Protocol enum eQMICATPacketDataProtocol:UINT8 { eQMICATPacketDataProtocol_IP = 2, }; // Enum to describe QMI CAT Packing Required enum eQMICATPackingRequired:UINT8 { eQMICATPackingRequired_PackingIsNotRequired = 0, eQMICATPackingRequired_PackingIsRequired = 1, }; // Enum to describe QMI CAT Presentation enum eQMICATPresentation:UINT8 { eQMICATPresentation_NotSpecified = 0, eQMICATPresentation_DataValuePresentation = 1, eQMICATPresentation_NavigationPresentation = 2, }; // Enum to describe QMI CAT Proactive Session End Type enum eQMICATProactiveSessionEndType:UINT8 { eQMICATProactiveSessionEndType_EndProactiveSessionCommandReceivedFromTheCard = 1, eQMICATProactiveSessionEndType_EndProactiveSessionInternalToME = 2, }; // Enum to describe QMI CAT Radio Access Technologies enum eQMICATRadioAccessTechnologies:UINT32 { eQMICATRadioAccessTechnologies_Unknown = 0, eQMICATRadioAccessTechnologies_GSM = 1, eQMICATRadioAccessTechnologies_UTRAN = 2, eQMICATRadioAccessTechnologies_CDMA = 3, eQMICATRadioAccessTechnologies_LTE = 4, }; // Enum to describe QMI CAT Redial Necessary enum eQMICATRedialNecessary:UINT8 { eQMICATRedialNecessary_RedialIsNotNecessary = 0, eQMICATRedialNecessary_RedialIsNecessary = 1, }; // Enum to describe QMI CAT Refresh Stage enum eQMICATRefreshStage:UINT16 { eQMICATRefreshStage_RefreshStart = 1, eQMICATRefreshStage_RefreshSuccess = 2, eQMICATRefreshStage_RefreshFailed = 3, }; // Enum to describe QMI CAT Response Command enum eQMICATResponseCommand:UINT8 { eQMICATResponseCommand_DisplayText = 1, eQMICATResponseCommand_GetInkey = 2, eQMICATResponseCommand_GetInput = 3, eQMICATResponseCommand_LaunchBrowser = 4, eQMICATResponseCommand_PlayTone = 5, eQMICATResponseCommand_SelectItemRequest = 6, eQMICATResponseCommand_SetupMenu = 7, eQMICATResponseCommand_SetupIdleText = 8, eQMICATResponseCommand_ProvideLocalInformationLanguage = 9, eQMICATResponseCommand_SetupEventUserActivity = 10, eQMICATResponseCommand_SetupEventIdleScreenActivity = 11, eQMICATResponseCommand_SetupEventLanguageSelectNotify = 12, eQMICATResponseCommand_LanguageNotification = 13, eQMICATResponseCommand_Activate = 14, eQMICATResponseCommand_SetupEventHCIConnectivity = 15, eQMICATResponseCommand_SetupEventBrowserTermination = 16, eQMICATResponseCommand_SendSMS = 17, eQMICATResponseCommand_SetupCall = 18, eQMICATResponseCommand_SendDTMF = 19, eQMICATResponseCommand_SendSS = 20, eQMICATResponseCommand_SendUSSD = 21, }; // Enum to describe QMI CAT Response Format enum eQMICATResponseFormat:UINT8 { eQMICATResponseFormat_SMSDefaultAlphabet = 0, eQMICATResponseFormat_YesOrNo = 1, eQMICATResponseFormat_NumericalOnly = 2, eQMICATResponseFormat_UCS2 = 3, eQMICATResponseFormat_ImmediateDigitResponse = 4, eQMICATResponseFormat_YesOrNoOrImmediateDigitalResponse = 5, }; // Enum to describe QMI CAT Response Packing Format enum eQMICATResponsePackingFormat:UINT8 { eQMICATResponsePackingFormat_UnpacketFormat = 0, eQMICATResponsePackingFormat_PacketFormat = 1, }; // Enum to describe QMI CAT Response Types enum eQMICATResponseTypes:UINT32 { eQMICATResponseTypes_TerminalResponse = 0, eQMICATResponseTypes_EventConfirmation = 1, }; // Enum to describe QMI CAT Send Data Immediately enum eQMICATSendDataImmediately:UINT8 { eQMICATSendDataImmediately_NoStoreInTXBuffer = 0, eQMICATSendDataImmediately_Yes = 1, }; // Enum to describe QMI CAT Send Data Result enum eQMICATSendDataResult:UINT8 { eQMICATSendDataResult_Failed = 0, eQMICATSendDataResult_Success = 1, }; // Enum to describe QMI CAT Show User Input enum eQMICATShowUserInput:UINT8 { eQMICATShowUserInput_DeviceCanShowAllCharacters = 0, eQMICATShowUserInput_DeviceCanShowUserInput = 1, }; // Enum to describe QMI CAT Slot enum eQMICATSlot:UINT8 { eQMICATSlot_Slot1 = 1, eQMICATSlot_Slot2 = 2, eQMICATSlot_Slot3 = 3, eQMICATSlot_Slot4 = 4, eQMICATSlot_Slot5 = 5, }; // Enum to describe QMI CAT Softkey Selection enum eQMICATSoftkeySelection:UINT8 { eQMICATSoftkeySelection_SoftkeyIsNotSelected = 0, eQMICATSoftkeySelection_SoftkeyIsSelected = 1, }; // Enum to describe QMI CAT Specific Language Notfication enum eQMICATSpecificLanguageNotfication:UINT8 { eQMICATSpecificLanguageNotfication_No = 0, eQMICATSpecificLanguageNotfication_Yes = 1, }; // Enum to describe QMI CAT Time Units enum eQMICATTimeUnits:UINT8 { eQMICATTimeUnits_Minutes = 0, eQMICATTimeUnits_Seconds = 1, eQMICATTimeUnits_TenthsOfSeconds = 2, eQMICATTimeUnits_DurationIsNotPresent = 255, }; // Enum to describe QMI CAT Tone enum eQMICATTone:UINT8 { eQMICATTone_DialTone = 1, eQMICATTone_CalledSubscriberBusy = 2, eQMICATTone_Congestion = 3, eQMICATTone_RadioPathAck = 4, eQMICATTone_RadioPathNotAvailableCallDrop = 5, eQMICATTone_ErrorTone = 6, eQMICATTone_CallWaitingTone = 7, eQMICATTone_RingingTone = 8, eQMICATTone_GeneralBeep = 9, eQMICATTone_PositiveAckTone = 10, eQMICATTone_NegativeAckTone = 11, eQMICATTone_RingingToneSelectedByUser = 12, eQMICATTone_SMSAlertToneSelectedByUser = 13, eQMICATTone_NotInUse = 255, }; // Enum to describe QMI CAT Traffic Class enum eQMICATTrafficClass:UINT8 { eQMICATTrafficClass_Conversational = 0, eQMICATTrafficClass_Streaming = 1, eQMICATTrafficClass_Interactive = 2, eQMICATTrafficClass_Background = 3, eQMICATTrafficClass_SubscribedValue = 4, }; // Enum to describe QMI CAT Transport Protocol enum eQMICATTransportProtocol:UINT8 { eQMICATTransportProtocol_NotPresent = 0, eQMICATTransportProtocol_UDP = 1, eQMICATTransportProtocol_TCP = 2, }; // Enum to describe QMI CAT USSD Data Coding Scheme enum eQMICATUSSDDataCodingScheme:UINT8 { eQMICATUSSDDataCodingScheme_7BitGSM = 0, eQMICATUSSDDataCodingScheme_8BitGSM = 1, eQMICATUSSDDataCodingScheme_8BitUCS2 = 2, eQMICATUSSDDataCodingScheme_7BitUCS2 = 3, }; // Enum to describe QMI CAT User Confirmed enum eQMICATUserConfirmed:UINT8 { eQMICATUserConfirmed_No = 0, eQMICATUserConfirmed_Yes = 1, }; // Enum to describe QMI CAT User Control enum eQMICATUserControl:UINT8 { eQMICATUserControl_DoNotAllowUserToClearTheScreen = 0, eQMICATUserControl_AllowUserToClearTheScreen = 1, }; // Enum to describe QMI CTL Service Types enum eQMICTLServiceTypes:UINT8 { eQMICTLServiceTypes_Control = 0, eQMICTLServiceTypes_WDS = 1, eQMICTLServiceTypes_DMS = 2, eQMICTLServiceTypes_NAS = 3, eQMICTLServiceTypes_QOS = 4, eQMICTLServiceTypes_WMS = 5, eQMICTLServiceTypes_PDS = 6, eQMICTLServiceTypes_AUTH = 7, eQMICTLServiceTypes_AT = 8, eQMICTLServiceTypes_Voice = 9, eQMICTLServiceTypes_CAT2 = 10, eQMICTLServiceTypes_UIM = 11, eQMICTLServiceTypes_PBM = 12, eQMICTLServiceTypes_QCHAT = 13, eQMICTLServiceTypes_RMTFS = 14, eQMICTLServiceTypes_TEST = 15, eQMICTLServiceTypes_LOC = 16, eQMICTLServiceTypes_SAR = 17, eQMICTLServiceTypes_IMSS = 18, eQMICTLServiceTypes_ADC = 19, eQMICTLServiceTypes_CSD = 20, eQMICTLServiceTypes_MFS = 21, eQMICTLServiceTypes_TIME = 22, eQMICTLServiceTypes_TS = 23, eQMICTLServiceTypes_TMD = 24, eQMICTLServiceTypes_SAP = 25, eQMICTLServiceTypes_WDA = 26, eQMICTLServiceTypes_TSYNC = 27, eQMICTLServiceTypes_RFSA = 28, eQMICTLServiceTypes_CSVT = 29, eQMICTLServiceTypes_QCMAP = 30, eQMICTLServiceTypes_IMSP = 31, eQMICTLServiceTypes_IMSVT = 32, eQMICTLServiceTypes_IMSA = 33, eQMICTLServiceTypes_COEX = 34, eQMICTLServiceTypes_PDC = 36, eQMICTLServiceTypes_STX = 38, eQMICTLServiceTypes_BIT = 39, eQMICTLServiceTypes_IMSRTP = 40, eQMICTLServiceTypes_RFRPE = 41, eQMICTLServiceTypes_DSD = 42, eQMICTLServiceTypes_SSCTL = 43, eQMICTLServiceTypes_CAT = 224, eQMICTLServiceTypes_RMS = 225, eQMICTLServiceTypes_OMA = 226, }; // Enum to describe QMI Call End Reasons enum eQMICallEndReasons:UINT16 { eQMICallEndReasons_Unknown = 0, eQMICallEndReasons_Unspecified = 1, eQMICallEndReasons_ClientEnd = 2, eQMICallEndReasons_NoService = 3, eQMICallEndReasons_Fade = 4, eQMICallEndReasons_ReleaseNormal = 5, eQMICallEndReasons_AccInProgress = 6, eQMICallEndReasons_AccFailed = 7, eQMICallEndReasons_RedirectOrHandoff = 8, eQMICallEndReasons_CloseInProgress = 9, eQMICallEndReasons_AuthenticationFailed = 10, eQMICallEndReasons_InternalError = 11, eQMICallEndReasons_CDMALock = 500, eQMICallEndReasons_Intercept = 501, eQMICallEndReasons_Reorder = 502, eQMICallEndReasons_ReleaseServiceOptionRejected = 503, eQMICallEndReasons_IncomingCall = 504, eQMICallEndReasons_AlertStop = 505, eQMICallEndReasons_Activation = 506, eQMICallEndReasons_MaxAccessProbe = 507, eQMICallEndReasons_CCSNotSupportedByBS = 508, eQMICallEndReasons_NoResponseFromBS = 509, eQMICallEndReasons_RejectedByBS = 510, eQMICallEndReasons_Incompatible = 511, eQMICallEndReasons_AlreadyInTC = 512, eQMICallEndReasons_UserCallOrigDuringGPS = 513, eQMICallEndReasons_UserCallOrigDuringSMS = 514, eQMICallEndReasons_NoCDMAService = 515, eQMICallEndReasons_ConfFailed = 1000, eQMICallEndReasons_IncomingRejected = 1001, eQMICallEndReasons_NoGWService = 1002, eQMICallEndReasons_NetworkEnd = 1003, eQMICallEndReasons_LLCOrSNDCPFailure = 1004, eQMICallEndReasons_InsufficientResources = 1005, eQMICallEndReasons_ServiceOptionOutOfOrder = 1006, eQMICallEndReasons_NSAPIAlreadyUsed = 1007, eQMICallEndReasons_RegularPDPContextDeactivation = 1008, eQMICallEndReasons_NetworkFailure = 1009, eQMICallEndReasons_ReactivationRequested = 1010, eQMICallEndReasons_ProtocolError = 1011, eQMICallEndReasons_OperatorDeterminedBarring = 1012, eQMICallEndReasons_UnknownOrMissingAPN = 1013, eQMICallEndReasons_UnknownPDPAddressOrPDPType = 1014, eQMICallEndReasons_ActivationRejectedByGGSN = 1015, eQMICallEndReasons_ActivationRejectedUnspecified = 1016, eQMICallEndReasons_ServiceOptionNotSupported = 1017, eQMICallEndReasons_RequestedServiceOptionNotSubscribed = 1018, eQMICallEndReasons_QoSNotAccepted = 1019, eQMICallEndReasons_SemanticErrorInTheTFTOperation = 1020, eQMICallEndReasons_SyntacticalErrorInTheTFTOperation = 1021, eQMICallEndReasons_UnknownPDPContext = 1022, eQMICallEndReasons_SemanticErrorsInPacketFilters = 1023, eQMICallEndReasons_SyntacticalErrorsInPacketFilters = 1024, eQMICallEndReasons_PDPContextWithoutTFTAlreadyActivated = 1025, eQMICallEndReasons_InvalidTransactionIdentifierValue = 1026, eQMICallEndReasons_SemanticallyIncorrectMessage = 1027, eQMICallEndReasons_InvalidMandatoryInformation = 1028, eQMICallEndReasons_MessageTypeNonExistent = 1029, eQMICallEndReasons_MessageNotCompatibleWithState = 1030, eQMICallEndReasons_InformationElementNonexistent = 1031, eQMICallEndReasons_ConditionalInformationElementError = 1032, eQMICallEndReasons_MessageNotCompatibleWithProtocolState = 1033, eQMICallEndReasons_APNRestrictionValueIncompatibleWithActivePDPContext = 1034, eQMICallEndReasons_NoGPRSContextPresent = 1035, eQMICallEndReasons_RequestedFeatureNotSupported = 1036, eQMICallEndReasons_CDGenOrBusy = 1500, eQMICallEndReasons_CDBillOrAuth = 1501, eQMICallEndReasons_ChangeHDR = 1502, eQMICallEndReasons_ExitHDR = 1503, eQMICallEndReasons_HDRNoSession = 1504, eQMICallEndReasons_HDROrigDuringGPSFix = 1505, eQMICallEndReasons_HDRCSTimeout = 1506, eQMICallEndReasons_HDRReleasedByCM = 1507, }; // Enum to describe QMI Call History Types enum eQMICallHistoryTypes:UINT8 { eQMICallHistoryTypes_Full = 0, eQMICallHistoryTypes_IDsOnly = 1, }; // Enum to describe QMI Call Types enum eQMICallTypes:UINT8 { eQMICallTypes_NDIS = 0, eQMICallTypes_DUN = 1, }; // Enum to describe QMI Connection Status enum eQMIConnectionStatus:UINT8 { eQMIConnectionStatus_Disconnected = 1, eQMIConnectionStatus_Connected = 2, eQMIConnectionStatus_Suspended = 3, eQMIConnectionStatus_Authenticating = 4, }; // Enum to describe QMI DMS Activation States enum eQMIDMSActivationStates:UINT16 { eQMIDMSActivationStates_ServiceNotActivated = 0, eQMIDMSActivationStates_SerivceActivated = 1, eQMIDMSActivationStates_ActivationConnecting = 2, eQMIDMSActivationStates_ActivationInProgress = 3, eQMIDMSActivationStates_OTASPSecurityAuthenticated = 4, eQMIDMSActivationStates_OTASPNAMDownloaded = 5, eQMIDMSActivationStates_OTASPMDNDownloaded = 6, eQMIDMSActivationStates_OTASPIMSIDownloaded = 7, eQMIDMSActivationStates_OTASPPRLDownloaded = 8, eQMIDMSActivationStates_OTASPSPCDownloaded = 9, eQMIDMSActivationStates_OTASPSettingsCommitted = 10, }; // Enum to describe QMI DMS Data Service Capabilities 1 enum eQMIDMSDataServiceCapabilities1:UINT8 { eQMIDMSDataServiceCapabilities1_NoDataServicesSupported = 0, eQMIDMSDataServiceCapabilities1_OnlyCircuitSwitched = 1, eQMIDMSDataServiceCapabilities1_OnlyPacketSwitched = 2, eQMIDMSDataServiceCapabilities1_SimultaneousCircuitPacketSwitched = 3, eQMIDMSDataServiceCapabilities1_NonsimultaneousCircuitPacketSwitched = 4, }; // Enum to describe QMI DMS Lock States enum eQMIDMSLockStates:UINT8 { eQMIDMSLockStates_LockDisabled = 0, eQMIDMSLockStates_LockEnabled = 1, }; // Enum to describe QMI DMS Operating Modes enum eQMIDMSOperatingModes:UINT8 { eQMIDMSOperatingModes_Online = 0, eQMIDMSOperatingModes_LowPower = 1, eQMIDMSOperatingModes_FactoryTestMode = 2, eQMIDMSOperatingModes_Offline = 3, eQMIDMSOperatingModes_Reset = 4, eQMIDMSOperatingModes_Shutdown = 5, eQMIDMSOperatingModes_PersistentLowPower = 6, eQMIDMSOperatingModes_ModeOnlyLowPower = 7, eQMIDMSOperatingModes_GWNetworkTest = 8, }; // Enum to describe QMI DMS PIN Status enum eQMIDMSPINStatus:UINT8 { eQMIDMSPINStatus_PINUninitialized = 0, eQMIDMSPINStatus_PINEnabledUnverified = 1, eQMIDMSPINStatus_PINEnabledVerified = 2, eQMIDMSPINStatus_PINDisabled = 3, eQMIDMSPINStatus_PINBlocked = 4, eQMIDMSPINStatus_PINBlockedPermanently = 5, eQMIDMSPINStatus_PINUnblocked = 6, eQMIDMSPINStatus_PINChanged = 7, }; // Enum to describe QMI DMS Power Sources enum eQMIDMSPowerSources:UINT8 { eQMIDMSPowerSources_Battery = 0, eQMIDMSPowerSources_External = 1, }; // Enum to describe QMI DMS Radio Interfaces enum eQMIDMSRadioInterfaces:UINT8 { eQMIDMSRadioInterfaces_CDMA20001x = 1, eQMIDMSRadioInterfaces_CDMA2000HRPD = 2, eQMIDMSRadioInterfaces_GSM = 4, eQMIDMSRadioInterfaces_UMTS = 5, eQMIDMSRadioInterfaces_LTE = 8, eQMIDMSRadioInterfaces_TDS = 9, }; // Enum to describe QMI DMS Service Capabilities enum eQMIDMSServiceCapabilities:UINT32 { eQMIDMSServiceCapabilities_DataOnly = 1, eQMIDMSServiceCapabilities_VoiceOnly = 2, eQMIDMSServiceCapabilities_SimultaneousVoiceAndData = 3, eQMIDMSServiceCapabilities_NonsimultaneousVoiceAndData = 4, }; // Enum to describe QMI DMS Subscriptions enum eQMIDMSSubscriptions:UINT32 { eQMIDMSSubscriptions_Primary = 1, eQMIDMSSubscriptions_Secondary = 2, }; // Enum to describe QMI DMS Time References enum eQMIDMSTimeReferences:UINT32 { eQMIDMSTimeReferences_User = 0, }; // Enum to describe QMI DMS Timestamp Sources enum eQMIDMSTimestampSources:UINT16 { eQMIDMSTimestampSources_Device = 0, eQMIDMSTimestampSources_CDMANetwork = 1, eQMIDMSTimestampSources_CDMA1xEVDONetwork = 2, eQMIDMSTimestampSources_GSMNetwork = 3, eQMIDMSTimestampSources_WCDMANetwork = 4, eQMIDMSTimestampSources_GPSNetwork = 5, eQMIDMSTimestampSources_MFLONetwork = 6, }; // Enum to describe QMI DMS UIM Facility enum eQMIDMSUIMFacility:UINT8 { eQMIDMSUIMFacility_PNNetworkPersonalization = 0, eQMIDMSUIMFacility_PUNetworkSubsetPersonalization = 1, eQMIDMSUIMFacility_PPServiceProviderPersonalization = 2, eQMIDMSUIMFacility_PCCorporatePersonalization = 3, eQMIDMSUIMFacility_PFUIMPersonalization = 4, }; // Enum to describe QMI DMS UIM Facility States enum eQMIDMSUIMFacilityStates:UINT8 { eQMIDMSUIMFacilityStates_Deactivated = 0, eQMIDMSUIMFacilityStates_Activated = 1, eQMIDMSUIMFacilityStates_Block = 2, }; // Enum to describe QMI DMS UIM States enum eQMIDMSUIMStates:UINT8 { eQMIDMSUIMStates_InitializationCompleted = 0, eQMIDMSUIMStates_InitializationFailed = 1, eQMIDMSUIMStates_NotPresent = 2, eQMIDMSUIMStates_StateUnavailable = 255, }; // Enum to describe QMI Data Bearer Technologies enum eQMIDataBearerTechnologies:UINT8 { eQMIDataBearerTechnologies_CDMA20001x = 1, eQMIDataBearerTechnologies_CDMA20001xEVDORev0 = 2, eQMIDataBearerTechnologies_GPRS = 3, eQMIDataBearerTechnologies_WCDMA = 4, eQMIDataBearerTechnologies_CDMA20001xEVDORevA = 5, eQMIDataBearerTechnologies_EGPRS = 6, eQMIDataBearerTechnologies_HSDPAWCDMA = 7, eQMIDataBearerTechnologies_WCDMAHSUPA = 8, eQMIDataBearerTechnologies_HSDPAHSUPA = 9, eQMIDataBearerTechnologies_LTE = 10, eQMIDataBearerTechnologies_CDMA2000EHRPD = 11, eQMIDataBearerTechnologies_HSDPAPlusWCDMA = 12, eQMIDataBearerTechnologies_HSDPAPlusHSUPA = 13, eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA = 14, eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA = 15, eQMIDataBearerTechnologies_HSDPAPlus64QAM = 16, eQMIDataBearerTechnologies_HSDPAPlus64QAMHSUPA = 17, eQMIDataBearerTechnologies_TDSCDMA = 18, eQMIDataBearerTechnologies_TDSCDMAHSDPA = 19, eQMIDataBearerTechnologies_TDSCDMAHSUPA = 20, eQMIDataBearerTechnologies_Unknown = 255, }; // Enum to describe QMI Dormancy Status enum eQMIDormancyStatus:UINT8 { eQMIDormancyStatus_TrafficChannelDormant = 1, eQMIDormancyStatus_TrafficChannelActive = 2, }; // Enum to describe QMI Erroneous SDU Deliveries enum eQMIErroneousSDUDeliveries:UINT8 { eQMIErroneousSDUDeliveries_Subscribe = 0, eQMIErroneousSDUDeliveries_NoDetection = 1, eQMIErroneousSDUDeliveries_ErroneousSDUIsDelivered = 2, eQMIErroneousSDUDeliveries_ErroneousSDUIsNotDelivered = 3, }; // Enum to describe QMI Errors enum eQMIErrors:UINT16 { eQMIErrors_None = 0, eQMIErrors_MalformedMessage = 1, eQMIErrors_NoMemory = 2, eQMIErrors_Internal = 3, eQMIErrors_Aborted = 4, eQMIErrors_ClientIDsExhausted = 5, eQMIErrors_UnabortableTransaction = 6, eQMIErrors_InvalidClientID = 7, eQMIErrors_NoThresholdsProvided = 8, eQMIErrors_InvalidHandle = 9, eQMIErrors_InvalidProfile = 10, eQMIErrors_InvalidPINID = 11, eQMIErrors_IncorrectPIN = 12, eQMIErrors_NoNetworkFound = 13, eQMIErrors_CallFailed = 14, eQMIErrors_OutOfCall = 15, eQMIErrors_NotProvisioned = 16, eQMIErrors_MissingArgument = 17, eQMIErrors_ArgumentTooLong = 19, eQMIErrors_InvalidTransactionID = 22, eQMIErrors_DeviceInUse = 23, eQMIErrors_NetworkUnsupported = 24, eQMIErrors_DeviceUnsupported = 25, eQMIErrors_NoEffect = 26, eQMIErrors_NoFreeProfile = 27, eQMIErrors_InvalidPDPType = 28, eQMIErrors_InvalidTechnologyPreference = 29, eQMIErrors_InvalidProfileType = 30, eQMIErrors_InvalidServiceType = 31, eQMIErrors_InvalidRegisterAction = 32, eQMIErrors_InvalidPSAttachAction = 33, eQMIErrors_AuthenticationFailed = 34, eQMIErrors_PINBlocked = 35, eQMIErrors_PINAlwaysBlocked = 36, eQMIErrors_UIMUninitialized = 37, eQMIErrors_MaximumQoSRequestsInUse = 38, eQMIErrors_IncorrectFlowFilter = 39, eQMIErrors_NetworkQoSUnaware = 40, eQMIErrors_InvalidQoSID = 41, eQMIErrors_RequestedNumberUnsupported = 42, eQMIErrors_InterfaceNotFound = 43, eQMIErrors_FlowSuspended = 44, eQMIErrors_InvalidDataFormat = 45, eQMIErrors_GeneralError = 46, eQMIErrors_UnknownError = 47, eQMIErrors_InvalidArgument = 48, eQMIErrors_InvalidIndex = 49, eQMIErrors_NoEntry = 50, eQMIErrors_DeviceStorageFull = 51, eQMIErrors_DeviceNotReady = 52, eQMIErrors_NetworkNotReady = 53, eQMIErrors_WMSCauseCode = 54, eQMIErrors_WMSMessageNotSent = 55, eQMIErrors_WMSMessageDeliveryFailure = 56, eQMIErrors_WMSInvalidMessageID = 57, eQMIErrors_WMSEncoding = 58, eQMIErrors_AuthenticationLock = 59, eQMIErrors_InvalidTransition = 60, eQMIErrors_NotMCASTInterface = 61, eQMIErrors_MaximumMCASTRequestsInUse = 62, eQMIErrors_InvalidMCASTHandle = 63, eQMIErrors_InvalidIPFamilyPreference = 64, eQMIErrors_SessionInactive = 65, eQMIErrors_SessionInvalid = 66, eQMIErrors_SessionOwnership = 67, eQMIErrors_InsufficientResources = 68, eQMIErrors_Disabled = 69, eQMIErrors_InvalidOperation = 70, eQMIErrors_InvalidQMICommand = 71, eQMIErrors_WMSTPDUType = 72, eQMIErrors_WMSSMSCAddress = 73, eQMIErrors_InformationUnavailable = 74, eQMIErrors_SegmentTooLong = 75, eQMIErrors_SegmentOrder = 76, eQMIErrors_BundlingNotSupported = 77, eQMIErrors_OperationPartialFailure = 78, eQMIErrors_PolicyMismatch = 79, eQMIErrors_SIMFileNotFound = 80, eQMIErrors_ExtendedInternal = 81, eQMIErrors_AccessDenied = 82, eQMIErrors_HardwareRestricted = 83, eQMIErrors_AckNotSent = 84, eQMIErrors_InjectTimeout = 85, eQMIErrors_IncompatibleState = 90, eQMIErrors_FDNRestrict = 91, eQMIErrors_SUPSFailureCause = 92, eQMIErrors_NoRadio = 93, eQMIErrors_NotSupported = 94, eQMIErrors_NoSubscription = 95, eQMIErrors_CardCallControlFailed = 96, eQMIErrors_NetworkAborted = 97, eQMIErrors_MSGBlocked = 98, eQMIErrors_InvalidSessionType = 100, eQMIErrors_InvalidPBType = 101, eQMIErrors_NoSIM = 102, eQMIErrors_PBNotReady = 103, eQMIErrors_PINRestriction = 104, eQMIErrors_PIN2Restriction = 105, eQMIErrors_PUKRestriction = 106, eQMIErrors_PUK2Restriction = 107, eQMIErrors_PBAccessRestricted = 108, eQMIErrors_PBDeleteInProgress = 109, eQMIErrors_PBTextTooLong = 110, eQMIErrors_PBNumberTooLong = 111, eQMIErrors_PBHiddenKeyRestriction = 112, eQMIErrors_PBNotAvailable = 113, eQMIErrors_CATEventRegistrationFailed = 61441, eQMIErrors_CATInvalidTerminalResponse = 61442, eQMIErrors_CATInvalidEnvelopeCommand = 61443, eQMIErrors_CATEnvelopeCommandBusy = 61444, eQMIErrors_CATEnvelopeCommandFailed = 61445, }; // Enum to describe QMI HA/AAA Key States enum eQMIHAAAAKeyStates:UINT8 { eQMIHAAAAKeyStates_Unset = 0, eQMIHAAAAKeyStates_SetDefault = 1, eQMIHAAAAKeyStates_SetModified = 2, }; // Enum to describe QMI LOC Altitude Assumed enum eQMILOCAltitudeAssumed:UINT32 { eQMILOCAltitudeAssumed_AltitudeIsCalculated = 0, eQMILOCAltitudeAssumed_AltitudeIsAssumed = 1, }; // Enum to describe QMI LOC Altitude Source enum eQMILOCAltitudeSource:UINT32 { eQMILOCAltitudeSource_Unknown = 0, eQMILOCAltitudeSource_GPS = 1, eQMILOCAltitudeSource_CellID = 2, eQMILOCAltitudeSource_EnhancedCellID = 3, eQMILOCAltitudeSource_WiFi = 4, eQMILOCAltitudeSource_Terrestrial = 5, eQMILOCAltitudeSource_TerrestrialHybrid = 6, eQMILOCAltitudeSource_AltitudeDatabase = 7, eQMILOCAltitudeSource_BarometricAltimeter = 8, eQMILOCAltitudeSource_Other = 9, }; // Enum to describe QMI LOC Confidence enum eQMILOCConfidence:UINT32 { eQMILOCConfidence_Low = 1, eQMILOCConfidence_Medium = 2, eQMILOCConfidence_High = 3, }; // Enum to describe QMI LOC Connection Request Type enum eQMILOCConnectionRequestType:UINT32 { eQMILOCConnectionRequestType_Open = 1, eQMILOCConnectionRequestType_Close = 2, }; // Enum to describe QMI LOC Connection Status enum eQMILOCConnectionStatus:UINT32 { eQMILOCConnectionStatus_Success = 1, eQMILOCConnectionStatus_Failure = 2, }; // Enum to describe QMI LOC Control Mode enum eQMILOCControlMode:UINT32 { eQMILOCControlMode_Automatic = 0, eQMILOCControlMode_Forced = 1, }; // Enum to describe QMI LOC Coverage enum eQMILOCCoverage:UINT32 { eQMILOCCoverage_NotSpecified = 0, eQMILOCCoverage_Point = 1, eQMILOCCoverage_Full = 2, }; // Enum to describe QMI LOC Cradle Mount State enum eQMILOCCradleMountState:UINT32 { eQMILOCCradleMountState_NotMounted = 0, eQMILOCCradleMountState_Mounted = 1, eQMILOCCradleMountState_Unknown = 2, }; // Enum to describe QMI LOC Data Coding Scheme enum eQMILOCDataCodingScheme:UINT32 { eQMILOCDataCodingScheme_German = 12, eQMILOCDataCodingScheme_English = 13, eQMILOCDataCodingScheme_Italian = 14, eQMILOCDataCodingScheme_French = 15, eQMILOCDataCodingScheme_Spanish = 16, eQMILOCDataCodingScheme_Dutch = 17, eQMILOCDataCodingScheme_Swedish = 18, eQMILOCDataCodingScheme_Danish = 19, eQMILOCDataCodingScheme_Portuguese = 20, eQMILOCDataCodingScheme_Finnish = 21, eQMILOCDataCodingScheme_Norwegian = 22, eQMILOCDataCodingScheme_Greek = 23, eQMILOCDataCodingScheme_Turkish = 24, eQMILOCDataCodingScheme_Hungarian = 25, eQMILOCDataCodingScheme_Polish = 26, eQMILOCDataCodingScheme_Unspecified = 27, eQMILOCDataCodingScheme_UTF8 = 28, eQMILOCDataCodingScheme_UCS2 = 29, eQMILOCDataCodingScheme_GSMDefault = 30, }; // Enum to describe QMI LOC Emergency Protocols enum eQMILOCEmergencyProtocols:UINT32 { eQMILOCEmergencyProtocols_WCDMACP = 0, eQMILOCEmergencyProtocols_WCDMAUP = 1, }; // Enum to describe QMI LOC Encoding Scheme enum eQMILOCEncodingScheme:UINT32 { eQMILOCEncodingScheme_Octet = 0, eQMILOCEncodingScheme_EXNProtocolMessage = 1, eQMILOCEncodingScheme_ASCII = 2, eQMILOCEncodingScheme_IA5 = 3, eQMILOCEncodingScheme_Unicode = 4, eQMILOCEncodingScheme_ShiftJIS = 5, eQMILOCEncodingScheme_Korean = 6, eQMILOCEncodingScheme_LatinHebrew = 7, eQMILOCEncodingScheme_Latin = 8, eQMILOCEncodingScheme_GSM = 9, }; // Enum to describe QMI LOC Engine State enum eQMILOCEngineState { eQMILOCEngineState_On = 1, eQMILOCEngineState_Off = 2, }; // Enum to describe QMI LOC Fix Recurrence Type enum eQMILOCFixRecurrenceType:UINT32 { eQMILOCFixRecurrenceType_RequestPeriodicFixes = 1, eQMILOCFixRecurrenceType_RequestSingleFix = 2, }; // Enum to describe QMI LOC Format Type enum eQMILOCFormatType:UINT32 { eQMILOCFormatType_LogicalName = 0, eQMILOCFormatType_EmailAddress = 1, eQMILOCFormatType_MSISDN = 2, eQMILOCFormatType_URL = 3, eQMILOCFormatType_SIPURL = 4, eQMILOCFormatType_MIN = 5, eQMILOCFormatType_MDN = 6, eQMILOCFormatType_IMSPublicIdentity = 7, eQMILOCFormatType_OSSUnknown = 2147483647, }; // Enum to describe QMI LOC Geofence Breach Type enum eQMILOCGeofenceBreachType:UINT8 { eQMILOCGeofenceBreachType_Entering = 1, eQMILOCGeofenceBreachType_Leaving = 2, }; // Enum to describe QMI LOC Geofence General Alert enum eQMILOCGeofenceGeneralAlert:UINT32 { eQMILOCGeofenceGeneralAlert_GNSSUnavailable = 1, eQMILOCGeofenceGeneralAlert_GNSSAvailable = 2, eQMILOCGeofenceGeneralAlert_OOS = 3, eQMILOCGeofenceGeneralAlert_TimeInvalid = 4, }; // Enum to describe QMI LOC Geofence Operation Mode enum eQMILOCGeofenceOperationMode:UINT32 { eQMILOCGeofenceOperationMode_Added = 1, eQMILOCGeofenceOperationMode_Deleted = 2, eQMILOCGeofenceOperationMode_Edited = 3, }; // Enum to describe QMI LOC Geofence Origin enum eQMILOCGeofenceOrigin:UINT32 { eQMILOCGeofenceOrigin_Network = 1, eQMILOCGeofenceOrigin_Device = 2, }; // Enum to describe QMI LOC Geofence State enum eQMILOCGeofenceState:UINT32 { eQMILOCGeofenceState_Active = 1, eQMILOCGeofenceState_Suspended = 2, }; // Enum to describe QMI LOC Geofence Status enum eQMILOCGeofenceStatus:UINT32 { eQMILOCGeofenceStatus_Success = 0, eQMILOCGeofenceStatus_GeneralFailure = 1, eQMILOCGeofenceStatus_Unsupported = 2, eQMILOCGeofenceStatus_InvalidParameters = 3, eQMILOCGeofenceStatus_EngineBusy = 4, eQMILOCGeofenceStatus_PhoneOffline = 5, eQMILOCGeofenceStatus_Timeout = 6, eQMILOCGeofenceStatus_InsufficientMemory = 8, }; // Enum to describe QMI LOC Health Status enum eQMILOCHealthStatus:UINT8 { eQMILOCHealthStatus_Unhealthy = 0, eQMILOCHealthStatus_Healthy = 1, }; // Enum to describe QMI LOC Horizontal Accuracy enum eQMILOCHorizontalAccuracy:UINT32 { eQMILOCHorizontalAccuracy_Low = 1, eQMILOCHorizontalAccuracy_Medium = 2, eQMILOCHorizontalAccuracy_High = 3, }; // Enum to describe QMI LOC Intermediate Report State enum eQMILOCIntermediateReportState:UINT32 { eQMILOCIntermediateReportState_Enable = 1, eQMILOCIntermediateReportState_Disable = 2, }; // Enum to describe QMI LOC Linkage enum eQMILOCLinkage:UINT32 { eQMILOCLinkage_NotSpecified = 0, eQMILOCLinkage_FullyInterdependent = 1, eQMILOCLinkage_DependsOnLatLong = 2, eQMILOCLinkage_FullyIndependent = 3, }; // Enum to describe QMI LOC Location Server Type enum eQMILOCLocationServerType:UINT32 { eQMILOCLocationServerType_CDMAPDE = 1, eQMILOCLocationServerType_CDMAMPC = 2, eQMILOCLocationServerType_UMTSSLP = 3, eQMILOCLocationServerType_CustomPDE = 4, }; // Enum to describe QMI LOC Location Type enum eQMILOCLocationType:UINT32 { eQMILOCLocationType_CurrentLocation = 1, eQMILOCLocationType_CurrentOrLastKnownLocation = 2, eQMILOCLocationType_InitialLocation = 4, }; // Enum to describe QMI LOC Lock Type enum eQMILOCLockType:UINT32 { eQMILOCLockType_LockNone = 1, eQMILOCLockType_LockMI = 2, eQMILOCLockType_LockMT = 3, eQMILOCLockType_LockAll = 4, }; // Enum to describe QMI LOC Motion Modes enum eQMILOCMotionModes:UINT32 { eQMILOCMotionModes_Unknown = 0, eQMILOCMotionModes_Stationary = 1, eQMILOCMotionModes_PedestrianUnknown = 200, eQMILOCMotionModes_PedestrianWalking = 201, eQMILOCMotionModes_PedestrianRunning = 202, eQMILOCMotionModes_VehicleUnknown = 300, }; // Enum to describe QMI LOC Motion States enum eQMILOCMotionStates:UINT32 { eQMILOCMotionStates_Unknown = 0, eQMILOCMotionStates_Stationary = 1, eQMILOCMotionStates_InMotion = 2, }; // Enum to describe QMI LOC Network Initiated Message Types enum eQMILOCNetworkInitiatedMessageTypes:UINT32 { eQMILOCNetworkInitiatedMessageTypes_SUPL = 0, }; // Enum to describe QMI LOC Notification Type enum eQMILOCNotificationType:UINT32 { eQMILOCNotificationType_NoNotifyOrVerify = 1, eQMILOCNotificationType_NotifyOnly = 2, eQMILOCNotificationType_AllowNoResponse = 3, eQMILOCNotificationType_ResponseRequired = 4, eQMILOCNotificationType_PrivacyOverride = 5, }; // Enum to describe QMI LOC Operation Mode enum eQMILOCOperationMode:UINT32 { eQMILOCOperationMode_Default = 1, eQMILOCOperationMode_MSB = 2, eQMILOCOperationMode_MSA = 3, eQMILOCOperationMode_StandAlone = 4, eQMILOCOperationMode_CellID = 5, eQMILOCOperationMode_WWAN = 6, }; // Enum to describe QMI LOC Orbits Format Type enum eQMILOCOrbitsFormatType:UINT32 { eQMILOCOrbitsFormatType_PredictedOrbitsXTRA = 0, }; // Enum to describe QMI LOC PDN Type enum eQMILOCPDNType:UINT32 { eQMILOCPDNType_IPv4 = 1, eQMILOCPDNType_IPv6 = 2, eQMILOCPDNType_IPv4OrIPv6 = 3, eQMILOCPDNType_PPP = 4, }; // Enum to describe QMI LOC Position enum eQMILOCPosition:UINT32 { eQMILOCPosition_AGPSSetAssisted = 1, eQMILOCPosition_AGPSSetBased = 2, eQMILOCPosition_AGPSSetAssistedPreference = 3, eQMILOCPosition_AGPSSetBasedPreference = 4, eQMILOCPosition_AutonomousGPS = 5, eQMILOCPosition_AFLT = 6, eQMILOCPosition_ECID = 7, eQMILOCPosition_EOTD = 8, eQMILOCPosition_OTDOA = 9, eQMILOCPosition_NoPosition = 10, }; // Enum to describe QMI LOC Position From Geofence enum eQMILOCPositionFromGeofence:UINT32 { eQMILOCPositionFromGeofence_Inside = 1, eQMILOCPositionFromGeofence_Outside = 2, }; // Enum to describe QMI LOC Position Mode enum eQMILOCPositionMode:UINT32 { eQMILOCPositionMode_AssistedOnly = 1, eQMILOCPositionMode_BasedOnly = 2, eQMILOCPositionMode_AssistedPreferredBasedAllowed = 3, eQMILOCPositionMode_BasedPreferredAssistedAllowed = 4, }; // Enum to describe QMI LOC Position Source enum eQMILOCPositionSource:UINT32 { eQMILOCPositionSource_GNSS = 0, eQMILOCPositionSource_CellID = 1, eQMILOCPositionSource_EnhancedCellID = 2, eQMILOCPositionSource_WiFi = 3, eQMILOCPositionSource_Terrestrial = 4, eQMILOCPositionSource_TerrestrialHybrid = 5, eQMILOCPositionSource_Other = 6, }; // Enum to describe QMI LOC Power State enum eQMILOCPowerState:UINT32 { eQMILOCPowerState_NotConnected = 0, eQMILOCPowerState_Connected = 1, eQMILOCPowerState_Unknown = 2, }; // Enum to describe QMI LOC Reliability enum eQMILOCReliability:UINT32 { eQMILOCReliability_NotSet = 0, eQMILOCReliability_VeryLow = 1, eQMILOCReliability_Low = 2, eQMILOCReliability_Medium = 3, eQMILOCReliability_High = 4, }; // Enum to describe QMI LOC Request Type enum eQMILOCRequestType:UINT32 { eQMILOCRequestType_StartPeriodicHighFrequencyFixes = 0, eQMILOCRequestType_StartPeriodicKeepWarmFixes = 1, eQMILOCRequestType_StopPeriodicFixes = 2, }; // Enum to describe QMI LOC Responsiveness enum eQMILOCResponsiveness:UINT32 { eQMILOCResponsiveness_Low = 1, eQMILOCResponsiveness_Medium = 2, eQMILOCResponsiveness_High = 3, }; // Enum to describe QMI LOC SUPL Hash Algorithms enum eQMILOCSUPLHashAlgorithms:UINT32 { eQMILOCSUPLHashAlgorithms_SHA1 = 0, eQMILOCSUPLHashAlgorithms_SHA256 = 1, }; // Enum to describe QMI LOC SUPL TLS Versions enum eQMILOCSUPLTLSVersions:UINT32 { eQMILOCSUPLTLSVersions_TLSVersion10 = 0, eQMILOCSUPLTLSVersions_TLSVersion11 = 1, }; // Enum to describe QMI LOC SUPL Version enum eQMILOCSUPLVersion:UINT32 { eQMILOCSUPLVersion_10 = 1, eQMILOCSUPLVersion_20 = 2, }; // Enum to describe QMI LOC Satellite Status enum eQMILOCSatelliteStatus:UINT32 { eQMILOCSatelliteStatus_Idle = 1, eQMILOCSatelliteStatus_Searching = 2, eQMILOCSatelliteStatus_Tracking = 3, }; // Enum to describe QMI LOC Sensor Time Sources enum eQMILOCSensorTimeSources:UINT32 { eQMILOCSensorTimeSources_Unspecified = 0, eQMILOCSensorTimeSources_Common = 1, }; // Enum to describe QMI LOC Sensor Usage enum eQMILOCSensorUsage:UINT32 { eQMILOCSensorUsage_SensorUseEnabled = 0, eQMILOCSensorUsage_SensorUseDisabled = 1, }; // Enum to describe QMI LOC Service Interaction Type enum eQMILOCServiceInteractionType:UINT32 { eQMILOCServiceInteractionType_OngoingNIIncomingMO = 1, }; // Enum to describe QMI LOC Session State enum eQMILOCSessionState:UINT32 { eQMILOCSessionState_Started = 1, eQMILOCSessionState_Finished = 2, }; // Enum to describe QMI LOC Session Status enum eQMILOCSessionStatus:UINT32 { eQMILOCSessionStatus_Success = 0, eQMILOCSessionStatus_InProgress = 1, eQMILOCSessionStatus_GeneralFailure = 2, eQMILOCSessionStatus_Timeout = 3, eQMILOCSessionStatus_UserEnded = 4, eQMILOCSessionStatus_BadParameter = 5, eQMILOCSessionStatus_PhoneOffline = 6, eQMILOCSessionStatus_EngineLocked = 7, }; // Enum to describe QMI LOC Status enum eQMILOCStatus:UINT32 { eQMILOCStatus_Success = 0, eQMILOCStatus_GeneralFailure = 1, eQMILOCStatus_Unsupported = 2, eQMILOCStatus_InvalidParameter = 3, eQMILOCStatus_EngineBusy = 4, eQMILOCStatus_PhoneOffline = 5, eQMILOCStatus_Timeout = 6, }; // Enum to describe QMI LOC System enum eQMILOCSystem:UINT32 { eQMILOCSystem_GlobalPositioningSystem = 1, eQMILOCSystem_Galileo = 2, eQMILOCSystem_SatelliteBasedAugmentationSystem = 3, eQMILOCSystem_COMPASS = 4, eQMILOCSystem_GLONASS = 5, }; // Enum to describe QMI LOC Time Source enum eQMILOCTimeSource:UINT32 { eQMILOCTimeSource_Invalid = 0, eQMILOCTimeSource_NetworkTimeTransfer = 1, eQMILOCTimeSource_NetworkTimeTagging = 2, eQMILOCTimeSource_ExternalInput = 3, eQMILOCTimeSource_TOWDecode = 4, eQMILOCTimeSource_TOWConfirmed = 5, eQMILOCTimeSource_TOWAndWeekConfirmed = 6, eQMILOCTimeSource_NavigationSolution = 7, eQMILOCTimeSource_SolveForTime = 8, eQMILOCTimeSource_GLOTOWDecode = 9, eQMILOCTimeSource_Transform = 10, eQMILOCTimeSource_WCDMASleepTimeTag = 11, eQMILOCTimeSource_GSMSleepTimeTag = 12, }; // Enum to describe QMI LOC Trigger Type enum eQMILOCTriggerType:UINT32 { eQMILOCTriggerType_SingleShot = 4294967295u, eQMILOCTriggerType_Periodic = 0, eQMILOCTriggerType_AreaEvent = 1, }; // Enum to describe QMI LOC User Response enum eQMILOCUserResponse:UINT32 { eQMILOCUserResponse_Accept = 1, eQMILOCUserResponse_Deny = 2, eQMILOCUserResponse_NoResponse = 3, }; // Enum to describe QMI LOC VX Version enum eQMILOCVXVersion:UINT32 { eQMILOCVXVersion_V1Only = 1, eQMILOCVXVersion_V2Only = 2, }; // Enum to describe QMI LOC WWAN Type enum eQMILOCWWANType:UINT32 { eQMILOCWWANType_Internet = 0, eQMILOCWWANType_AGNSS = 1, eQMILOCWWANType_AGNSSEmergency = 2, }; // Enum to describe QMI LOC Wi-Fi Fix Error Code enum eQMILOCWiFiFixErrorCode:UINT32 { eQMILOCWiFiFixErrorCode_Success = 0, eQMILOCWiFiFixErrorCode_WiFiNotAvailable = 1, eQMILOCWiFiFixErrorCode_NoAccessPointsFound = 2, eQMILOCWiFiFixErrorCode_Unauthorized = 3, eQMILOCWiFiFixErrorCode_ServerUnavailable = 4, eQMILOCWiFiFixErrorCode_LocationCannotBeDetermined = 5, eQMILOCWiFiFixErrorCode_Unknown = 6, }; // Enum to describe QMI LOC Wi-Fi Status enum eQMILOCWiFiStatus:UINT32 { eQMILOCWiFiStatus_Available = 1, eQMILOCWiFiStatus_Unavailable = 2, }; // Enum to describe QMI Mobile IP Modes enum eQMIMobileIPModes:UINT8 { eQMIMobileIPModes_MIPOffSimpleIPOnly = 0, eQMIMobileIPModes_MIPPreferred = 1, eQMIMobileIPModes_MIPOnly = 2, }; // Enum to describe QMI NAS AN-AAA Authentication Status enum eQMINASANAAAAuthenticationStatus:UINT8 { eQMINASANAAAAuthenticationStatus_AuthenticationFailed = 0, eQMINASANAAAAuthenticationStatus_AuthenticationSuccess = 1, eQMINASANAAAAuthenticationStatus_NoAuthenticationRequested = 2, }; // Enum to describe QMI NAS Acquisition Order enum eQMINASAcquisitionOrder:UINT32 { eQMINASAcquisitionOrder_Automatic = 0, eQMINASAcquisitionOrder_GSMThenWCDMA = 1, eQMINASAcquisitionOrder_WCDMAThenGSM = 2, }; // Enum to describe QMI NAS Active Subscription enum eQMINASActiveSubscription:UINT8 { eQMINASActiveSubscription_NotActive = 0, eQMINASActiveSubscription_Active = 1, }; // Enum to describe QMI NAS Average Period enum eQMINASAveragePeriod:UINT8 { eQMINASAveragePeriod_AverageUsingDefaultConfiguration = 0, eQMINASAveragePeriod_AverageOver1Second = 1, eQMINASAveragePeriod_AverageOver2Second = 2, eQMINASAveragePeriod_AverageOver3Second = 3, eQMINASAveragePeriod_AverageOver4Second = 4, eQMINASAveragePeriod_AverageOver5Second = 5, eQMINASAveragePeriod_AverageOver6Second = 6, eQMINASAveragePeriod_AverageOver7Second = 7, eQMINASAveragePeriod_AverageOver8Second = 8, eQMINASAveragePeriod_AverageOver9Second = 9, eQMINASAveragePeriod_AverageOver10Second = 10, }; // Enum to describe QMI NAS Avoid System Types enum eQMINASAvoidSystemTypes:UINT32 { eQMINASAvoidSystemTypes_AvoidIdleWhenUserZoneSelected = 0, eQMINASAvoidSystemTypes_AvoidIdle = 1, eQMINASAvoidSystemTypes_ClearAllAvoidSystemLists = 2, }; // Enum to describe QMI NAS Band Classes enum eQMINASBandClasses:UINT16 { eQMINASBandClasses_CDMABandClass0 = 0, eQMINASBandClasses_CDMABandClass1 = 1, eQMINASBandClasses_CDMABandClass3 = 3, eQMINASBandClasses_CDMABandClass4 = 4, eQMINASBandClasses_CDMABandClass5 = 5, eQMINASBandClasses_CDMABandClass6 = 6, eQMINASBandClasses_CDMABandClass7 = 7, eQMINASBandClasses_CDMABandClass8 = 8, eQMINASBandClasses_CDMABandClass9 = 9, eQMINASBandClasses_CDMABandClass10 = 10, eQMINASBandClasses_CDMABandClass11 = 11, eQMINASBandClasses_CDMABandClass12 = 12, eQMINASBandClasses_CDMABandClass13 = 13, eQMINASBandClasses_CDMABandClass14 = 14, eQMINASBandClasses_CDMABandClass15 = 15, eQMINASBandClasses_CDMABandClass16 = 16, eQMINASBandClasses_CDMABandClass17 = 17, eQMINASBandClasses_CDMABandClass18 = 18, eQMINASBandClasses_CDMABandClass19 = 19, eQMINASBandClasses_GSM450 = 40, eQMINASBandClasses_GSM480 = 41, eQMINASBandClasses_GSM750 = 42, eQMINASBandClasses_GSM850 = 43, eQMINASBandClasses_GSM900Extended = 44, eQMINASBandClasses_GSM900Primary = 45, eQMINASBandClasses_GSM900Railways = 46, eQMINASBandClasses_GSM1800 = 47, eQMINASBandClasses_GSM1900 = 48, eQMINASBandClasses_WCDMA2100 = 80, eQMINASBandClasses_WCDMAPCS1900 = 81, eQMINASBandClasses_WCDMADCS1800 = 82, eQMINASBandClasses_WCDMA1700US = 83, eQMINASBandClasses_WCDMA850 = 84, eQMINASBandClasses_WCDMA800 = 85, eQMINASBandClasses_WCDMA2600 = 86, eQMINASBandClasses_WCDMA900 = 87, eQMINASBandClasses_WCDMA1700Japan = 88, eQMINASBandClasses_WCDMA1500Japan = 90, eQMINASBandClasses_WCDMA850Japan = 91, eQMINASBandClasses_EUTRABand1 = 120, eQMINASBandClasses_EUTRABand2 = 121, eQMINASBandClasses_EUTRABand3 = 122, eQMINASBandClasses_EUTRABand4 = 123, eQMINASBandClasses_EUTRABand5 = 124, eQMINASBandClasses_EUTRABand6 = 125, eQMINASBandClasses_EUTRABand7 = 126, eQMINASBandClasses_EUTRABand8 = 127, eQMINASBandClasses_EUTRABand9 = 128, eQMINASBandClasses_EUTRABand10 = 129, eQMINASBandClasses_EUTRABand11 = 130, eQMINASBandClasses_EUTRABand12 = 131, eQMINASBandClasses_EUTRABand13 = 132, eQMINASBandClasses_EUTRABand14 = 133, eQMINASBandClasses_EUTRABand17 = 134, eQMINASBandClasses_EUTRABand33 = 135, eQMINASBandClasses_EUTRABand34 = 136, eQMINASBandClasses_EUTRABand35 = 137, eQMINASBandClasses_EUTRABand36 = 138, eQMINASBandClasses_EUTRABand37 = 139, eQMINASBandClasses_EUTRABand38 = 140, eQMINASBandClasses_EUTRABand39 = 141, eQMINASBandClasses_EUTRABand40 = 142, eQMINASBandClasses_EUTRABand18 = 143, eQMINASBandClasses_EUTRABand19 = 144, eQMINASBandClasses_EUTRABand20 = 145, eQMINASBandClasses_EUTRABand21 = 146, eQMINASBandClasses_EUTRABand24 = 147, eQMINASBandClasses_EUTRABand25 = 148, eQMINASBandClasses_EUTRABand41 = 149, eQMINASBandClasses_EUTRABand42 = 150, eQMINASBandClasses_EUTRABand43 = 151, eQMINASBandClasses_TDSCDMABandA = 200, eQMINASBandClasses_TDSCDMABandB = 201, eQMINASBandClasses_TDSCDMABandC = 202, eQMINASBandClasses_TDSCDMABandD = 203, eQMINASBandClasses_TDSCDMABandE = 204, eQMINASBandClasses_TDSCDMABandF = 205, }; // Enum to describe QMI NAS CDMA 1xEV-DO Active Protocol enum eQMINASCDMA1xEVDOActiveProtocol:UINT8 { eQMINASCDMA1xEVDOActiveProtocol_None = 0, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORel0 = 2, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelA = 3, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelB = 4, }; // Enum to describe QMI NAS CDMA 1xEV-DO Hybrid Information enum eQMINASCDMA1xEVDOHybridInformation:UINT8 { eQMINASCDMA1xEVDOHybridInformation_SystemIsNotHybrid = 0, eQMINASCDMA1xEVDOHybridInformation_SystemIsHybrid = 1, }; // Enum to describe QMI NAS CDMA 1xEV-DO Personality enum eQMINASCDMA1xEVDOPersonality:UINT8 { eQMINASCDMA1xEVDOPersonality_Unknown = 0, eQMINASCDMA1xEVDOPersonality_HRPD = 1, eQMINASCDMA1xEVDOPersonality_EHRPD = 2, }; // Enum to describe QMI NAS CDMA Pilot Types enum eQMINASCDMAPilotTypes:UINT32 { eQMINASCDMAPilotTypes_Active = 0, eQMINASCDMAPilotTypes_Neighbor = 1, }; // Enum to describe QMI NAS CS/PS Attach States enum eQMINASCSPSAttachStates:UINT8 { eQMINASCSPSAttachStates_UnknownNotApplicable = 0, eQMINASCSPSAttachStates_Attached = 1, eQMINASCSPSAttachStates_Detached = 2, }; // Enum to describe QMI NAS Call Barring Status enum eQMINASCallBarringStatus:UINT32 { eQMINASCallBarringStatus_Unknown = 4294967295u, eQMINASCallBarringStatus_NormalCallsOnly = 0, eQMINASCallBarringStatus_EmergencyCallsOnly = 1, eQMINASCallBarringStatus_NoCalls = 2, eQMINASCallBarringStatus_AllCalls = 3, }; // Enum to describe QMI NAS Call Types enum eQMINASCallTypes:UINT32 { eQMINASCallTypes_Voice = 0, eQMINASCallTypes_SMS = 1, }; // Enum to describe QMI NAS Cell Broadcast Caps enum eQMINASCellBroadcastCaps:UINT32 { eQMINASCellBroadcastCaps_Unknown = 0, eQMINASCellBroadcastCaps_NotSupported = 1, eQMINASCellBroadcastCaps_Supported = 2, }; // Enum to describe QMI NAS Cell Broadcast Caps 2 enum eQMINASCellBroadcastCaps2:UINT32 { eQMINASCellBroadcastCaps2_Unknown = 0, eQMINASCellBroadcastCaps2_NotSupported = 1, eQMINASCellBroadcastCaps2_Supported = 2, }; // Enum to describe QMI NAS Change Duration enum eQMINASChangeDuration:UINT8 { eQMINASChangeDuration_PowerCycle = 0, eQMINASChangeDuration_Permanent = 1, }; // Enum to describe QMI NAS Closed Subscriber Group Categories enum eQMINASClosedSubscriberGroupCategories:UINT32 { eQMINASClosedSubscriberGroupCategories_Unknown = 0, eQMINASClosedSubscriberGroupCategories_Allowed = 1, eQMINASClosedSubscriberGroupCategories_Operator = 2, }; // Enum to describe QMI NAS Concurrent Service enum eQMINASConcurrentService:UINT8 { eQMINASConcurrentService_NotAvailable = 0, eQMINASConcurrentService_Available = 1, }; // Enum to describe QMI NAS Concurrent Service Supported enum eQMINASConcurrentServiceSupported:UINT8 { eQMINASConcurrentServiceSupported_NotSupported = 0, eQMINASConcurrentServiceSupported_Supported = 1, }; // Enum to describe QMI NAS DDTM Preferences enum eQMINASDDTMPreferences:UINT8 { eQMINASDDTMPreferences_Off = 0, eQMINASDDTMPreferences_On = 1, eQMINASDDTMPreferences_NoChange = 2, }; // Enum to describe QMI NAS DTM Support enum eQMINASDTMSupport:UINT8 { eQMINASDTMSupport_NotAvailable = 0, eQMINASDTMSupport_Available = 1, }; // Enum to describe QMI NAS Data Service Capabilities 2 enum eQMINASDataServiceCapabilities2:UINT8 { eQMINASDataServiceCapabilities2_GPRS = 1, eQMINASDataServiceCapabilities2_EGPRS = 2, eQMINASDataServiceCapabilities2_HSDPA = 3, eQMINASDataServiceCapabilities2_HSUPA = 4, eQMINASDataServiceCapabilities2_WCDMA = 5, eQMINASDataServiceCapabilities2_CDMA = 6, eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 = 7, eQMINASDataServiceCapabilities2_CDMA1xEVDORevA = 8, eQMINASDataServiceCapabilities2_GSM = 9, eQMINASDataServiceCapabilities2_CDMA1xEVDORevB = 10, eQMINASDataServiceCapabilities2_LTE = 11, eQMINASDataServiceCapabilities2_HSDPAPlus = 12, eQMINASDataServiceCapabilities2_DCHSDPAPlus = 13, }; // Enum to describe QMI NAS Day Of Week enum eQMINASDayOfWeek:UINT8 { eQMINASDayOfWeek_Monday = 0, eQMINASDayOfWeek_Tuesday = 1, eQMINASDayOfWeek_Wednesday = 2, eQMINASDayOfWeek_Thursday = 3, eQMINASDayOfWeek_Friday = 4, eQMINASDayOfWeek_Saturday = 5, eQMINASDayOfWeek_Sunday = 6, }; // Enum to describe QMI NAS Daylight Savings Adjustment enum eQMINASDaylightSavingsAdjustment:UINT8 { eQMINASDaylightSavingsAdjustment_NoAdjustment = 0, eQMINASDaylightSavingsAdjustment_1HourAdjustment = 1, eQMINASDaylightSavingsAdjustment_2HourAdjustment = 2, }; // Enum to describe QMI NAS Dual Transfer Mode enum eQMINASDualTransferMode:UINT8 { eQMINASDualTransferMode_DTMNotSupported = 0, eQMINASDualTransferMode_DTMSupported = 1, }; // Enum to describe QMI NAS E-UTRA Status enum eQMINASEUTRAStatus:UINT8 { eQMINASEUTRAStatus_EUTRACellDetected = 0, eQMINASEUTRAStatus_EUTRACellNotDetected = 1, eQMINASEUTRAStatus_EUTRADetectionUnknown = 2, eQMINASEUTRAStatus_EUTRADetectionUnsupported = 3, }; // Enum to describe QMI NAS E911 States enum eQMINASE911States:UINT32 { eQMINASE911States_Enter = 0, eQMINASE911States_ExitWithECB = 1, eQMINASE911States_Exit = 2, eQMINASE911States_EnterWithECB = 3, }; // Enum to describe QMI NAS EGPRS Support enum eQMINASEGPRSSupport:UINT8 { eQMINASEGPRSSupport_NotAvailable = 0, eQMINASEGPRSSupport_Available = 1, }; // Enum to describe QMI NAS EV-DO Session Close Reasons enum eQMINASEVDOSessionCloseReasons:UINT32 { eQMINASEVDOSessionCloseReasons_ReacquiredNewNetwork = 0, eQMINASEVDOSessionCloseReasons_UATIResponseTimeout = 1, eQMINASEVDOSessionCloseReasons_KeepAliveTimerExpired = 2, eQMINASEVDOSessionCloseReasons_InternalDeactivation = 3, eQMINASEVDOSessionCloseReasons_ReceivedSessionCloseFromAN = 4, eQMINASEVDOSessionCloseReasons_ConnectionOpenFailure = 5, eQMINASEVDOSessionCloseReasons_ConfigurationRequestFailure = 6, eQMINASEVDOSessionCloseReasons_ConfigurationResponseFailure = 7, eQMINASEVDOSessionCloseReasons_ProtocolNegotiationFailure = 8, eQMINASEVDOSessionCloseReasons_ANInitSetupTimerExpired = 9, eQMINASEVDOSessionCloseReasons_ANInitConnectionClosed = 10, eQMINASEVDOSessionCloseReasons_ConnectionDenyReceived = 11, eQMINASEVDOSessionCloseReasons_SilentDeactivation = 12, eQMINASEVDOSessionCloseReasons_NewESN = 13, eQMINASEVDOSessionCloseReasons_ANGUAP = 14, eQMINASEVDOSessionCloseReasons_InvalidPersonalityIndex = 15, eQMINASEVDOSessionCloseReasons_UATINotMaintained = 16, eQMINASEVDOSessionCloseReasons_NewNAI = 17, eQMINASEVDOSessionCloseReasons_EHRPDCredentialsChanged = 18, }; // Enum to describe QMI NAS Forbidden States enum eQMINASForbiddenStates:UINT8 { eQMINASForbiddenStates_Unknown = 0, eQMINASForbiddenStates_Forbidden = 1, eQMINASForbiddenStates_NotForbidden = 2, }; // Enum to describe QMI NAS Force CDMA 1xEV-DO SCP enum eQMINASForceCDMA1xEVDOSCP:UINT8 { eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORev0Only = 0, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPA = 1, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPAAndEMPA = 2, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithMMPA = 3, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithEHRPD = 4, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithEHRPD = 5, }; // Enum to describe QMI NAS High Speed Call Status enum eQMINASHighSpeedCallStatus:UINT8 { eQMINASHighSpeedCallStatus_HSDPAAndHSUPANotSupported = 0, eQMINASHighSpeedCallStatus_HSDPASupported = 1, eQMINASHighSpeedCallStatus_HSUPASupported = 2, eQMINASHighSpeedCallStatus_HSDPAAndHSUPASupported = 3, eQMINASHighSpeedCallStatus_HSDPAPlusSupported = 4, eQMINASHighSpeedCallStatus_HSDPAPlusAndHSUPASupported = 5, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusSupported = 6, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAndHSUPASupported = 7, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMAndHSUPASupported = 8, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMSupported = 9, }; // Enum to describe QMI NAS In Use States enum eQMINASInUseStates:UINT8 { eQMINASInUseStates_Unknown = 0, eQMINASInUseStates_CurrentServing = 1, eQMINASInUseStates_Available = 2, }; // Enum to describe QMI NAS LTE Signal Rates enum eQMINASLTESignalRates:UINT8 { eQMINASLTESignalRates_Default = 0, eQMINASLTESignalRates_EverySecond = 1, eQMINASLTESignalRates_Every2Seconds = 2, eQMINASLTESignalRates_Every3Seconds = 3, eQMINASLTESignalRates_Every4Seconds = 4, eQMINASLTESignalRates_Every5Seconds = 5, eQMINASLTESignalRates_Every6Seconds = 6, eQMINASLTESignalRates_Every7Seconds = 7, eQMINASLTESignalRates_Every8Seconds = 8, eQMINASLTESignalRates_Every9Seconds = 9, eQMINASLTESignalRates_Every10Seconds = 10, }; // Enum to describe QMI NAS Modem Usage Preferences enum eQMINASModemUsagePreferences:UINT32 { eQMINASModemUsagePreferences_VoiceCentric = 1, eQMINASModemUsagePreferences_DataCentric = 2, }; // Enum to describe QMI NAS Network Description Displays enum eQMINASNetworkDescriptionDisplays:UINT8 { eQMINASNetworkDescriptionDisplays_DoNotDisplay = 0, eQMINASNetworkDescriptionDisplays_Display = 1, eQMINASNetworkDescriptionDisplays_Unknown = 255, }; // Enum to describe QMI NAS Network Description Encodings enum eQMINASNetworkDescriptionEncodings:UINT8 { eQMINASNetworkDescriptionEncodings_UnspecifiedOctet = 0, eQMINASNetworkDescriptionEncodings_ExtendedProtocolMessage = 1, eQMINASNetworkDescriptionEncodings_7BitASCII = 2, eQMINASNetworkDescriptionEncodings_IA5 = 3, eQMINASNetworkDescriptionEncodings_UNICODE = 4, eQMINASNetworkDescriptionEncodings_ShiftJIS = 5, eQMINASNetworkDescriptionEncodings_Korean = 6, eQMINASNetworkDescriptionEncodings_LatinHebrew = 7, eQMINASNetworkDescriptionEncodings_Latin = 8, eQMINASNetworkDescriptionEncodings_GSM7Bit = 9, eQMINASNetworkDescriptionEncodings_GSMDCS = 10, }; // Enum to describe QMI NAS Network Scan Result enum eQMINASNetworkScanResult:UINT32 { eQMINASNetworkScanResult_Success = 0, eQMINASNetworkScanResult_Abort = 1, eQMINASNetworkScanResult_RadioLinkFailure = 2, }; // Enum to describe QMI NAS Network Scan Types enum eQMINASNetworkScanTypes:UINT32 { eQMINASNetworkScanTypes_PLMN = 0, eQMINASNetworkScanTypes_ClosedSubscriberGroup = 1, }; // Enum to describe QMI NAS Network Selection enum eQMINASNetworkSelection:INT8 { eQMINASNetworkSelection_AutomaticRegistration = 0, eQMINASNetworkSelection_ManualRegistration = 1, }; // Enum to describe QMI NAS PLMN Name Country Initials enum eQMINASPLMNNameCountryInitials:UINT8 { eQMINASPLMNNameCountryInitials_DoNotAddCountryInitials = 0, eQMINASPLMNNameCountryInitials_AddCountryInitials = 1, eQMINASPLMNNameCountryInitials_Unspecified = 255, }; // Enum to describe QMI NAS PLMN Name Encoding Schemes enum eQMINASPLMNNameEncodingSchemes:UINT8 { eQMINASPLMNNameEncodingSchemes_ASCII = 0, eQMINASPLMNNameEncodingSchemes_UCS2LE = 1, }; // Enum to describe QMI NAS PLMN Name Spare Bits enum eQMINASPLMNNameSpareBits:UINT8 { eQMINASPLMNNameSpareBits_Unknown = 0, eQMINASPLMNNameSpareBits_Bit8 = 1, eQMINASPLMNNameSpareBits_Bits78 = 2, eQMINASPLMNNameSpareBits_Bits68 = 3, eQMINASPLMNNameSpareBits_Bits58 = 4, eQMINASPLMNNameSpareBits_Bits48 = 5, eQMINASPLMNNameSpareBits_Bits38 = 6, eQMINASPLMNNameSpareBits_Bits28 = 7, }; // Enum to describe QMI NAS PRL Indicator enum eQMINASPRLIndicator:UINT8 { eQMINASPRLIndicator_SystemNotInPRL = 0, eQMINASPRLIndicator_SystemIsInPRL = 1, }; // Enum to describe QMI NAS PRL Preferences enum eQMINASPRLPreferences:UINT16 { eQMINASPRLPreferences_AcquireASideOnly = 1, eQMINASPRLPreferences_AcquireBSideOnly = 2, eQMINASPRLPreferences_AcquireAny = 16383, }; // Enum to describe QMI NAS PS Attach Actions enum eQMINASPSAttachActions:UINT8 { eQMINASPSAttachActions_Attach = 1, eQMINASPSAttachActions_Detach = 2, }; // Enum to describe QMI NAS Preferred Data Bath enum eQMINASPreferredDataBath:UINT8 { eQMINASPreferredDataBath_NotPreferred = 0, eQMINASPreferredDataBath_Preferred = 1, }; // Enum to describe QMI NAS Preferred States enum eQMINASPreferredStates:UINT8 { eQMINASPreferredStates_Unknown = 0, eQMINASPreferredStates_Preferred = 1, eQMINASPreferredStates_NotPreferred = 2, }; // Enum to describe QMI NAS RTRE Configuration enum eQMINASRTREConfiguration:UINT8 { eQMINASRTREConfiguration_RUIMOnly = 1, eQMINASRTREConfiguration_InternalSettingsOnly = 2, eQMINASRTREConfiguration_UseRUIMIfAvailable = 3, eQMINASRTREConfiguration_GSMOn1X = 4, }; // Enum to describe QMI NAS RX Level enum eQMINASRXLevel:UINT16 { eQMINASRXLevel_LessThan110dBm = 0, eQMINASRXLevel_110dBmto109dBm = 1, eQMINASRXLevel_109dBmto108dBm = 2, eQMINASRXLevel_108dBmto107dBm = 3, eQMINASRXLevel_107dBmto106dBm = 4, eQMINASRXLevel_106dBmto105dBm = 5, eQMINASRXLevel_105dBmto104dBm = 6, eQMINASRXLevel_104dBmto103dBm = 7, eQMINASRXLevel_103dBmto102dBm = 8, eQMINASRXLevel_102dBmto101dBm = 9, eQMINASRXLevel_101dBmto100dBm = 10, eQMINASRXLevel_100dBmto99dBm = 11, eQMINASRXLevel_99dBmto98dBm = 12, eQMINASRXLevel_98dBmto97dBm = 13, eQMINASRXLevel_97dBmto96dBm = 14, eQMINASRXLevel_96dBmto95dBm = 15, eQMINASRXLevel_95dBmto94dBm = 16, eQMINASRXLevel_94dBmto93dBm = 17, eQMINASRXLevel_93dBmto92dBm = 18, eQMINASRXLevel_92dBmto91dBm = 19, eQMINASRXLevel_91dBmto90dBm = 20, eQMINASRXLevel_90dBmto89dBm = 21, eQMINASRXLevel_89dBmto88dBm = 22, eQMINASRXLevel_88dBmto87dBm = 23, eQMINASRXLevel_87dBmto86dBm = 24, eQMINASRXLevel_86dBmto85dBm = 25, eQMINASRXLevel_85dBmto84dBm = 26, eQMINASRXLevel_84dBmto83dBm = 27, eQMINASRXLevel_83dBmto82dBm = 28, eQMINASRXLevel_82dBmto81dBm = 29, eQMINASRXLevel_81dBmto80dBm = 30, eQMINASRXLevel_80dBmto79dBm = 31, eQMINASRXLevel_79dBmto78dBm = 32, eQMINASRXLevel_78dBmto77dBm = 33, eQMINASRXLevel_77dBmto76dBm = 34, eQMINASRXLevel_76dBmto75dBm = 35, eQMINASRXLevel_75dBmto74dBm = 36, eQMINASRXLevel_74dBmto73dBm = 37, eQMINASRXLevel_73dBmto72dBm = 38, eQMINASRXLevel_72dBmto71dBm = 39, eQMINASRXLevel_71dBmto70dBm = 40, eQMINASRXLevel_70dBmto69dBm = 41, eQMINASRXLevel_69dBmto68dBm = 42, eQMINASRXLevel_68dBmto67dBm = 43, eQMINASRXLevel_67dBmto66dBm = 44, eQMINASRXLevel_66dBmto65dBm = 45, eQMINASRXLevel_65dBmto64dBm = 46, eQMINASRXLevel_64dBmto63dBm = 47, eQMINASRXLevel_63dBmto62dBm = 48, eQMINASRXLevel_62dBmto61dBm = 49, eQMINASRXLevel_61dBmto60dBm = 50, eQMINASRXLevel_60dBmto59dBm = 51, eQMINASRXLevel_59dBmto58dBm = 52, eQMINASRXLevel_58dBmto57dBm = 53, eQMINASRXLevel_57dBmto56dBm = 54, eQMINASRXLevel_56dBmto55dBm = 55, eQMINASRXLevel_55dBmto54dBm = 56, eQMINASRXLevel_54dBmto53dBm = 57, eQMINASRXLevel_53dBmto52dBm = 58, eQMINASRXLevel_52dBmto51dBm = 59, eQMINASRXLevel_51dBmto50dBm = 60, eQMINASRXLevel_50dBmto49dBm = 61, eQMINASRXLevel_49dBmto48dBm = 62, eQMINASRXLevel_GreaterThan48dBm = 63, }; // Enum to describe QMI NAS Radio Access Technologies enum eQMINASRadioAccessTechnologies:UINT8 { eQMINASRadioAccessTechnologies_GSM = 4, eQMINASRadioAccessTechnologies_UMTS = 5, eQMINASRadioAccessTechnologies_LTE = 8, eQMINASRadioAccessTechnologies_TDSCDMA = 9, eQMINASRadioAccessTechnologies_NoChange = 255, }; // Enum to describe QMI NAS Radio Interfaces enum eQMINASRadioInterfaces:UINT8 { eQMINASRadioInterfaces_NoneNoService = 0, eQMINASRadioInterfaces_CDMA20001x = 1, eQMINASRadioInterfaces_CDMA2000HRPD = 2, eQMINASRadioInterfaces_AMPS = 3, eQMINASRadioInterfaces_GSM = 4, eQMINASRadioInterfaces_UMTS = 5, eQMINASRadioInterfaces_LTE = 8, eQMINASRadioInterfaces_TDSCDMA = 9, }; // Enum to describe QMI NAS Radio System Modes enum eQMINASRadioSystemModes:UINT32 { eQMINASRadioSystemModes_NoService = 0, eQMINASRadioSystemModes_Acquiring = 1, eQMINASRadioSystemModes_InService = 2, }; // Enum to describe QMI NAS Register Actions enum eQMINASRegisterActions:UINT8 { eQMINASRegisterActions_Automatic = 1, eQMINASRegisterActions_Manual = 2, }; // Enum to describe QMI NAS Registered Networks enum eQMINASRegisteredNetworks:UINT8 { eQMINASRegisteredNetworks_Unknown = 0, eQMINASRegisteredNetworks_3GPP2 = 1, eQMINASRegisteredNetworks_3GPP = 2, }; // Enum to describe QMI NAS Registration Domains enum eQMINASRegistrationDomains:UINT32 { eQMINASRegistrationDomains_NotApplicable = 0, eQMINASRegistrationDomains_CSOnly = 1, eQMINASRegistrationDomains_PSOnly = 2, eQMINASRegistrationDomains_CSAndPS = 3, eQMINASRegistrationDomains_LimitedService = 4, }; // Enum to describe QMI NAS Registration Restrictions enum eQMINASRegistrationRestrictions:UINT32 { eQMINASRegistrationRestrictions_Unrestricted = 0, eQMINASRegistrationRestrictions_CampedOnly = 1, eQMINASRegistrationRestrictions_Limited = 2, }; // Enum to describe QMI NAS Registration States enum eQMINASRegistrationStates:UINT8 { eQMINASRegistrationStates_NASNotRegistered = 0, eQMINASRegistrationStates_NASRegistered = 1, eQMINASRegistrationStates_NASNotRegisteredSearching = 2, eQMINASRegistrationStates_NASRegistrationDenied = 3, eQMINASRegistrationStates_RegistrationStateUnknown = 4, }; // Enum to describe QMI NAS Report Rate enum eQMINASReportRate:UINT8 { eQMINASReportRate_ReportUsingDefaultConfig = 0, eQMINASReportRate_ReportEvery1Second = 1, eQMINASReportRate_ReportEvery2Second = 2, eQMINASReportRate_ReportEvery3Second = 3, eQMINASReportRate_ReportEvery4Second = 4, eQMINASReportRate_ReportEvery5Second = 5, }; // Enum to describe QMI NAS Revision enum eQMINASRevision:UINT8 { eQMINASRevision_JSTD088 = 1, eQMINASRevision_IS95RevA = 3, eQMINASRevision_IS95RevB = 4, eQMINASRevision_IS2000 = 6, eQMINASRevision_IS2000RelA = 7, eQMINASRevision_IS2000RelB = 8, eQMINASRevision_IS2000RelC = 9, eQMINASRevision_IS2000RelCMI = 10, eQMINASRevision_IS2000RelD = 11, }; // Enum to describe QMI NAS Roam Status enum eQMINASRoamStatus:UINT8 { eQMINASRoamStatus_Off = 0, eQMINASRoamStatus_On = 1, eQMINASRoamStatus_Blinking = 2, eQMINASRoamStatus_OutOfNeighborhood = 3, eQMINASRoamStatus_OutOfBuilding = 4, eQMINASRoamStatus_PreferredSystem = 5, eQMINASRoamStatus_AvailableSystem = 6, eQMINASRoamStatus_AlliancePartner = 7, eQMINASRoamStatus_PremiumPartner = 8, eQMINASRoamStatus_FullService = 9, eQMINASRoamStatus_PartialService = 10, eQMINASRoamStatus_BannerIsOn = 11, eQMINASRoamStatus_BannerIsOff = 12, }; // Enum to describe QMI NAS Roaming Indicators enum eQMINASRoamingIndicators:UINT8 { eQMINASRoamingIndicators_Roaming = 0, eQMINASRoamingIndicators_Home = 1, eQMINASRoamingIndicators_RoamingPartner = 2, }; // Enum to describe QMI NAS Roaming Preferences enum eQMINASRoamingPreferences:UINT8 { eQMINASRoamingPreferences_Automatic = 0, eQMINASRoamingPreferences_HomeOnly = 1, eQMINASRoamingPreferences_RoamingOnly = 2, eQMINASRoamingPreferences_HomeRoaming = 3, }; // Enum to describe QMI NAS Roaming Preferences 2 enum eQMINASRoamingPreferences2:UINT16 { eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorOff = 1, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotOff = 2, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotFlashing = 3, eQMINASRoamingPreferences2_AcquireAny = 255, }; // Enum to describe QMI NAS Roaming States enum eQMINASRoamingStates:UINT8 { eQMINASRoamingStates_Unknown = 0, eQMINASRoamingStates_Home = 1, eQMINASRoamingStates_Roam = 2, }; // Enum to describe QMI NAS SIM Reject States enum eQMINASSIMRejectStates:UINT32 { eQMINASSIMRejectStates_NotAvailable = 0, eQMINASSIMRejectStates_Available = 1, eQMINASSIMRejectStates_CSInvalid = 2, eQMINASSIMRejectStates_PSInvalid = 3, eQMINASSIMRejectStates_CSAndPSInvalid = 4, }; // Enum to describe QMI NAS SINR Levels enum eQMINASSINRLevels:UINT8 { eQMINASSINRLevels_Negative9dB = 0, eQMINASSINRLevels_Negative6dB = 1, eQMINASSINRLevels_Negative45dB = 2, eQMINASSINRLevels_Negative3dB = 3, eQMINASSINRLevels_Negative2dB = 4, eQMINASSINRLevels_1dB = 5, eQMINASSINRLevels_3dB = 6, eQMINASSINRLevels_6dB = 7, eQMINASSINRLevels_9dB = 8, }; // Enum to describe QMI NAS SMS Domains enum eQMINASSMSDomains:UINT32 { eQMINASSMSDomains_NoSMSSupport = 0, eQMINASSMSDomains_SMSSupportedOverIMS = 1, eQMINASSMSDomains_SMSSupportedOver1X = 2, eQMINASSMSDomains_SMSSupportedOver3GPP = 3, }; // Enum to describe QMI NAS Service Domain Prefs enum eQMINASServiceDomainPrefs:UINT32 { eQMINASServiceDomainPrefs_CircuitSwitched = 0, eQMINASServiceDomainPrefs_PacketSwitched = 1, eQMINASServiceDomainPrefs_CircuitPacketSwitched = 2, eQMINASServiceDomainPrefs_PacketSwitchedAttach = 3, eQMINASServiceDomainPrefs_PacketSwitchedDetach = 4, eQMINASServiceDomainPrefs_PacketSwitchedDetachWithNoChange = 5, }; // Enum to describe QMI NAS Service Domains enum eQMINASServiceDomains:UINT8 { eQMINASServiceDomains_NoService = 0, eQMINASServiceDomains_CircuitSwitched = 1, }; // Enum to describe QMI NAS Service Option Actions enum eQMINASServiceOptionActions:UINT8 { eQMINASServiceOptionActions_Add = 0, eQMINASServiceOptionActions_Replace = 1, eQMINASServiceOptionActions_Delete = 2, eQMINASServiceOptionActions_NoChange = 3, }; // Enum to describe QMI NAS Service Status enum eQMINASServiceStatus:UINT8 { eQMINASServiceStatus_NoService = 0, eQMINASServiceStatus_LimitedService = 1, eQMINASServiceStatus_ServiceAvailable = 2, eQMINASServiceStatus_LimitedRegionalService = 3, eQMINASServiceStatus_PowerSaveOrDeepSleep = 4, }; // Enum to describe QMI NAS Standby Preference enum eQMINASStandbyPreference:UINT8 { eQMINASStandbyPreference_SingleStandby = 1, eQMINASStandbyPreference_DualStandbyWithTuneAway = 2, eQMINASStandbyPreference_DualStandbyWithoutTuneAway = 4, eQMINASStandbyPreference_AutomaticModeWithTuneAway = 5, eQMINASStandbyPreference_AutomaticModeWithoutTuneAway = 6, eQMINASStandbyPreference_TripleStandby = 7, }; // Enum to describe QMI NAS Subscription Type enum eQMINASSubscriptionType:UINT8 { eQMINASSubscriptionType_PrimarySubscription = 0, eQMINASSubscriptionType_SecondarySubscription = 1, eQMINASSubscriptionType_TertiarySubscription = 2, }; // Enum to describe QMI NAS System Forbidden enum eQMINASSystemForbidden:UINT8 { eQMINASSystemForbidden_SystemIsNotForbidden = 0, eQMINASSystemForbidden_SystemIsForbidden = 1, }; // Enum to describe QMI NAS System Preferences enum eQMINASSystemPreferences:UINT8 { eQMINASSystemPreferences_Automatic = 0, eQMINASSystemPreferences_AutomaticA = 1, eQMINASSystemPreferences_AutomaticB = 2, }; // Enum to describe QMI NAS System Service Capabilities enum eQMINASSystemServiceCapabilities:UINT8 { eQMINASSystemServiceCapabilities_NoService = 0, eQMINASSystemServiceCapabilities_CircuitSwitchedOnly = 1, eQMINASSystemServiceCapabilities_PacketSwitchedOnly = 2, eQMINASSystemServiceCapabilities_CircuitSwitchedAndPacketSwitched = 3, eQMINASSystemServiceCapabilities_Camped = 4, }; // Enum to describe QMI NAS Tech Pref Durations enum eQMINASTechPrefDurations:UINT8 { eQMINASTechPrefDurations_Permanent = 0, eQMINASTechPrefDurations_PowerCycle = 1, }; // Enum to describe QMI NAS Tech Prefs enum eQMINASTechPrefs:UINT8 { eQMINASTechPrefs_Automatic = 0, eQMINASTechPrefs_3GPP2 = 1, eQMINASTechPrefs_3GPP = 2, eQMINASTechPrefs_Invalid = 3, }; // Enum to describe QMI NAS Tri-Status enum eQMINASTriStatus:UINT32 { eQMINASTriStatus_False = 0, eQMINASTriStatus_True = 1, eQMINASTriStatus_Unknown = 2, }; // Enum to describe QMI NAS Voice Domains enum eQMINASVoiceDomains:UINT32 { eQMINASVoiceDomains_NoVoiceSupport = 0, eQMINASVoiceDomains_VoiceSupportedOverIMS = 1, eQMINASVoiceDomains_VoiceSupportedOver1X = 2, eQMINASVoiceDomains_VoiceSupportedOver3GPP = 3, }; // Enum to describe QMI NAS WCDMA RRC States enum eQMINASWCDMARRCStates:UINT32 { eQMINASWCDMARRCStates_Disconnected = 0, eQMINASWCDMARRCStates_CellPCH = 1, eQMINASWCDMARRCStates_URAPCH = 2, eQMINASWCDMARRCStates_CellFACH = 3, eQMINASWCDMARRCStates_CellDCH = 4, }; // Enum to describe QMI OMA HFA Done States enum eQMIOMAHFADoneStates:UINT8 { eQMIOMAHFADoneStates_None = 0, eQMIOMAHFADoneStates_Succeeded = 1, eQMIOMAHFADoneStates_Failed = 2, }; // Enum to describe QMI OMA Selections enum eQMIOMASelections:UINT8 { eQMIOMASelections_Reject = 0, eQMIOMASelections_Accept = 1, }; // Enum to describe QMI OMA Session Failure Reasons enum eQMIOMASessionFailureReasons:UINT8 { eQMIOMASessionFailureReasons_Unknown = 0, eQMIOMASessionFailureReasons_NetworkUnavailable = 1, eQMIOMASessionFailureReasons_ServerUnavailable = 2, eQMIOMASessionFailureReasons_AuthenticationFailed = 3, eQMIOMASessionFailureReasons_MaxRetryExceeded = 4, eQMIOMASessionFailureReasons_SessionCancelled = 5, }; // Enum to describe QMI OMA Session States enum eQMIOMASessionStates:UINT8 { eQMIOMASessionStates_CompleteInfoUpdated = 0, eQMIOMASessionStates_CompleteInfoUnavailable = 1, eQMIOMASessionStates_Failed = 2, eQMIOMASessionStates_Retrying = 3, eQMIOMASessionStates_Connecting = 4, eQMIOMASessionStates_Connected = 5, eQMIOMASessionStates_Authenticated = 6, eQMIOMASessionStates_MDNDownloaded = 7, eQMIOMASessionStates_MSIDDownloaded = 8, eQMIOMASessionStates_PRLDownloaded = 9, eQMIOMASessionStates_MIPProfileDownloaded = 10, }; // Enum to describe QMI OMA Session Types enum eQMIOMASessionTypes:UINT8 { eQMIOMASessionTypes_ClientInitiatedDeviceConfigure = 0, eQMIOMASessionTypes_ClientInitiatedPRLUpdate = 1, eQMIOMASessionTypes_ClientInitiatedHandsFreeActivation = 2, eQMIOMASessionTypes_DeviceInitiatedHandsFreeActivation = 3, eQMIOMASessionTypes_NetworkInitiatedPRLUpdate = 4, eQMIOMASessionTypes_NetworkInitiatedDeviceConfigure = 5, }; // Enum to describe QMI PBM AAS Operations enum eQMIPBMAASOperations:UINT8 { eQMIPBMAASOperations_Add = 0, eQMIPBMAASOperations_Modify = 1, eQMIPBMAASOperations_Delete = 2, }; // Enum to describe QMI PBM Field Types enum eQMIPBMFieldTypes:UINT32 { eQMIPBMFieldTypes_Email = 0, eQMIPBMFieldTypes_AdditionalNumber = 1, eQMIPBMFieldTypes_SecondName = 2, eQMIPBMFieldTypes_Group = 3, }; // Enum to describe QMI PBM Mapping Types enum eQMIPBMMappingTypes:UINT32 { eQMIPBMMappingTypes_Linear = 0, eQMIPBMMappingTypes_Nonlinear = 1, }; // Enum to describe QMI PBM Number Plans enum eQMIPBMNumberPlans:UINT8 { eQMIPBMNumberPlans_Unknown = 0, eQMIPBMNumberPlans_ISDN = 1, eQMIPBMNumberPlans_Data = 2, eQMIPBMNumberPlans_Telex = 3, eQMIPBMNumberPlans_National = 4, eQMIPBMNumberPlans_Private = 5, }; // Enum to describe QMI PBM Number Types enum eQMIPBMNumberTypes:UINT8 { eQMIPBMNumberTypes_Unknown = 0, eQMIPBMNumberTypes_International = 1, eQMIPBMNumberTypes_National = 2, eQMIPBMNumberTypes_NetworkSpecific = 3, eQMIPBMNumberTypes_DedicatedAccess = 4, }; // Enum to describe QMI PBM Operations enum eQMIPBMOperations:UINT8 { eQMIPBMOperations_Add = 1, eQMIPBMOperations_Modify = 2, eQMIPBMOperations_Delete = 3, }; // Enum to describe QMI PBM Phonebook Types enum eQMIPBMPhonebookTypes:UINT16 { eQMIPBMPhonebookTypes_AbbreviatedDialingNumber = 1, eQMIPBMPhonebookTypes_FixedDialingNumber = 2, eQMIPBMPhonebookTypes_MobileSubscriberIntegratedServicesDigitalNetwork = 4, eQMIPBMPhonebookTypes_MailBoxDialingNumber = 8, eQMIPBMPhonebookTypes_ServiceDialingNumber = 16, eQMIPBMPhonebookTypes_BarredDialingNumber = 32, eQMIPBMPhonebookTypes_LastNumberDialed = 64, eQMIPBMPhonebookTypes_MailBoxNumber = 128, eQMIPBMPhonebookTypes_GroupingInformationAlphaString = 256, eQMIPBMPhonebookTypes_AdditionalNumberAlphaString = 512, }; // Enum to describe QMI PBM Protection Methods enum eQMIPBMProtectionMethods:UINT32 { eQMIPBMProtectionMethods_AlwaysAllowed = 0, eQMIPBMProtectionMethods_NeverAllowed = 1, eQMIPBMProtectionMethods_AllowedOnAllPINsVerified = 2, eQMIPBMProtectionMethods_AllowedOnAnyPINVerified = 3, eQMIPBMProtectionMethods_AllowedOnOnePINVerified = 4, }; // Enum to describe QMI PBM Refresh Status enum eQMIPBMRefreshStatus:UINT8 { eQMIPBMRefreshStatus_RefreshStart = 1, eQMIPBMRefreshStatus_RefreshEnd = 2, }; // Enum to describe QMI PBM Session Types enum eQMIPBMSessionTypes:UINT8 { eQMIPBMSessionTypes_GWPrimary = 0, eQMIPBMSessionTypes_1xPrimary = 1, eQMIPBMSessionTypes_GWSecondary = 2, eQMIPBMSessionTypes_1xSecondary = 3, eQMIPBMSessionTypes_NonProvisioningOnSlot1 = 4, eQMIPBMSessionTypes_NonProvisioningOnSlot2 = 5, eQMIPBMSessionTypes_GlobalPhonebookOnSlot1 = 6, eQMIPBMSessionTypes_GlobalPhonebookOnSlot2 = 7, eQMIPBMSessionTypes_GWTertiary = 8, eQMIPBMSessionTypes_1xTertiary = 9, eQMIPBMSessionTypes_GlobalPhonebookOnSlot3 = 10, }; // Enum to describe QMI PBM States enum eQMIPBMStates:UINT8 { eQMIPBMStates_Ready = 0, eQMIPBMStates_NotReady = 1, eQMIPBMStates_NotAvailable = 2, eQMIPBMStates_PINRestriction = 3, eQMIPBMStates_PUKRestriction = 4, eQMIPBMStates_Invalidated = 5, eQMIPBMStates_Sync = 6, }; // Enum to describe QMI PBM Subscription Types enum eQMIPBMSubscriptionTypes:UINT8 { eQMIPBMSubscriptionTypes_Primary = 0, eQMIPBMSubscriptionTypes_Secondary = 1, eQMIPBMSubscriptionTypes_Tertiary = 2, }; // Enum to describe QMI PDC Configurations enum eQMIPDCConfigurations:UINT32 { eQMIPDCConfigurations_Platform = 0, eQMIPDCConfigurations_Software = 1, }; // Enum to describe QMI PDP Types enum eQMIPDPTypes:UINT8 { eQMIPDPTypes_PDPIPv4 = 0, eQMIPDPTypes_PDPPPP = 1, eQMIPDPTypes_PDPIPv6 = 2, eQMIPDPTypes_PDPIPv4OrIPv6 = 3, }; // Enum to describe QMI PDS APN Types enum eQMIPDSAPNTypes:UINT32 { eQMIPDSAPNTypes_EmergencySUPL = 0, eQMIPDSAPNTypes_HomeSUPL = 1, }; // Enum to describe QMI PDS Altitude Source enum eQMIPDSAltitudeSource:UINT8 { eQMIPDSAltitudeSource_Unknown = 0, eQMIPDSAltitudeSource_GPS = 1, eQMIPDSAltitudeSource_CellID = 2, eQMIPDSAltitudeSource_EnhancedCellID = 3, eQMIPDSAltitudeSource_WiFi = 4, eQMIPDSAltitudeSource_Terrestrial = 5, eQMIPDSAltitudeSource_TerrestrialHybrid = 6, eQMIPDSAltitudeSource_AltitudeDatabase = 7, eQMIPDSAltitudeSource_BarometricAltimeter = 8, eQMIPDSAltitudeSource_Other = 9, }; // Enum to describe QMI PDS Blanking Enable enum eQMIPDSBlankingEnable:UINT8 { eQMIPDSBlankingEnable_DisableBlanking = 0, eQMIPDSBlankingEnable_EnableBlankingUnconditionally = 1, eQMIPDSBlankingEnable_EnableBlankingConditionally = 2, eQMIPDSBlankingEnable_SimulateIMDJamming = 3, }; // Enum to describe QMI PDS COG Time Types enum eQMIPDSCOGTimeTypes:UINT32 { eQMIPDSCOGTimeTypes_UTCTime = 0, eQMIPDSCOGTimeTypes_GPSTime = 1, }; // Enum to describe QMI PDS Calendar Days enum eQMIPDSCalendarDays:UINT8 { eQMIPDSCalendarDays_Sunday = 0, eQMIPDSCalendarDays_Monday = 1, eQMIPDSCalendarDays_Tuesday = 2, eQMIPDSCalendarDays_Wednesday = 3, eQMIPDSCalendarDays_Thursday = 4, eQMIPDSCalendarDays_Friday = 5, eQMIPDSCalendarDays_Saturday = 6, }; // Enum to describe QMI PDS Calendar Months enum eQMIPDSCalendarMonths:UINT8 { eQMIPDSCalendarMonths_January = 0, eQMIPDSCalendarMonths_February = 1, eQMIPDSCalendarMonths_March = 2, eQMIPDSCalendarMonths_April = 3, eQMIPDSCalendarMonths_May = 4, eQMIPDSCalendarMonths_June = 5, eQMIPDSCalendarMonths_July = 6, eQMIPDSCalendarMonths_August = 7, eQMIPDSCalendarMonths_September = 8, eQMIPDSCalendarMonths_October = 9, eQMIPDSCalendarMonths_November = 10, eQMIPDSCalendarMonths_December = 11, }; // Enum to describe QMI PDS Comm Event Protocols enum eQMIPDSCommEventProtocols:UINT8 { eQMIPDSCommEventProtocols_UMTSUserPlaneSUPL = 0, eQMIPDSCommEventProtocols_1X = 1, eQMIPDSCommEventProtocols_UMTSControlPlaneWCDMA = 2, eQMIPDSCommEventProtocols_UMTSControlPlaneGSM = 3, eQMIPDSCommEventProtocols_V1V2 = 4, eQMIPDSCommEventProtocols_KDDI = 5, eQMIPDSCommEventProtocols_XTRADataDownload = 6, eQMIPDSCommEventProtocols_SNTPTimeDownload = 7, eQMIPDSCommEventProtocols_1XControlPlane = 8, eQMIPDSCommEventProtocols_Unknown = 255, }; // Enum to describe QMI PDS Comm Event Types enum eQMIPDSCommEventTypes:UINT8 { eQMIPDSCommEventTypes_Begin = 0, eQMIPDSCommEventTypes_Connected = 1, eQMIPDSCommEventTypes_Failure = 2, eQMIPDSCommEventTypes_Done = 3, eQMIPDSCommEventTypes_OtherFailure = 4, }; // Enum to describe QMI PDS Config enum eQMIPDSConfig:UINT8 { eQMIPDSConfig_PersistentDisabled = 0, eQMIPDSConfig_PersistentEnabled = 1, eQMIPDSConfig_NotPersistentDisabled = 240, eQMIPDSConfig_NotPersistentEnabled = 241, }; // Enum to describe QMI PDS Cradle Mount State enum eQMIPDSCradleMountState:UINT8 { eQMIPDSCradleMountState_NotMounted = 0, eQMIPDSCradleMountState_Mounted = 1, eQMIPDSCradleMountState_Unknown = 2, }; // Enum to describe QMI PDS EFS File Operations enum eQMIPDSEFSFileOperations:UINT8 { eQMIPDSEFSFileOperations_Write = 0, eQMIPDSEFSFileOperations_Delete = 1, }; // Enum to describe QMI PDS Emergency Position Session Events enum eQMIPDSEmergencyPositionSessionEvents:UINT32 { eQMIPDSEmergencyPositionSessionEvents_EarlyStart = 0, eQMIPDSEmergencyPositionSessionEvents_GSMNetworkInitiatedCP = 1, eQMIPDSEmergencyPositionSessionEvents_WCDMANetworkInitiatedCP = 2, eQMIPDSEmergencyPositionSessionEvents_WCDMANetworkInitiatedSUPL = 3, }; // Enum to describe QMI PDS Emergency Protocol Configs enum eQMIPDSEmergencyProtocolConfigs:UINT32 { eQMIPDSEmergencyProtocolConfigs_UserControlPlaneProtocol = 0, eQMIPDSEmergencyProtocolConfigs_SUPL20EmergencyServices = 1, }; // Enum to describe QMI PDS Encryption Algorithm enum eQMIPDSEncryptionAlgorithm:UINT8 { eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmSHA1 = 0, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmMax = 1, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmNone = 255, }; // Enum to describe QMI PDS Extended Position Failures enum eQMIPDSExtendedPositionFailures:UINT32 { eQMIPDSExtendedPositionFailures_NoService = 0, eQMIPDSExtendedPositionFailures_NoConnection = 1, eQMIPDSExtendedPositionFailures_ConnectionFailure = 2, eQMIPDSExtendedPositionFailures_PDEReject = 3, eQMIPDSExtendedPositionFailures_StaleBaseStationInfo = 4, eQMIPDSExtendedPositionFailures_NormalSessionEnd = 5, eQMIPDSExtendedPositionFailures_LocationServiceReset = 6, eQMIPDSExtendedPositionFailures_PPMPostFixCalculationTimeout = 7, eQMIPDSExtendedPositionFailures_PPMPreFixCalculationTimeout = 8, eQMIPDSExtendedPositionFailures_IS801ServerTimeout = 9, eQMIPDSExtendedPositionFailures_IS801PayloadError = 10, eQMIPDSExtendedPositionFailures_VXLCSAgentAuthenticationFailure = 11, eQMIPDSExtendedPositionFailures_PreferredFixMethodFailure = 12, }; // Enum to describe QMI PDS External Power State enum eQMIPDSExternalPowerState:UINT8 { eQMIPDSExternalPowerState_NotConnected = 0, eQMIPDSExternalPowerState_Connected = 1, eQMIPDSExternalPowerState_Unknown = 2, }; // Enum to describe QMI PDS Force Receiver Off enum eQMIPDSForceReceiverOff:UINT8 { eQMIPDSForceReceiverOff_Disable = 0, eQMIPDSForceReceiverOff_Enable = 1, }; // Enum to describe QMI PDS IMD Jamming Bands enum eQMIPDSIMDJammingBands:UINT32 { eQMIPDSIMDJammingBands_GPS = 0, eQMIPDSIMDJammingBands_GLONASS = 1, }; // Enum to describe QMI PDS IMD Jamming States enum eQMIPDSIMDJammingStates:UINT8 { eQMIPDSIMDJammingStates_Terminate = 0, eQMIPDSIMDJammingStates_Initiate = 1, }; // Enum to describe QMI PDS IS801 CP NI Reject Reasons enum eQMIPDSIS801CPNIRejectReasons:UINT32 { eQMIPDSIS801CPNIRejectReasons_DecodeError = 0, eQMIPDSIS801CPNIRejectReasons_NoResources = 1, eQMIPDSIS801CPNIRejectReasons_EngineLocked = 2, eQMIPDSIS801CPNIRejectReasons_ResetInProgress = 3, eQMIPDSIS801CPNIRejectReasons_MOSessionInProgress = 4, eQMIPDSIS801CPNIRejectReasons_InternalError = 5, }; // Enum to describe QMI PDS Inject Time Types enum eQMIPDSInjectTimeTypes:UINT32 { eQMIPDSInjectTimeTypes_UTCTime = 0, eQMIPDSInjectTimeTypes_GPSTime = 1, }; // Enum to describe QMI PDS Injected Position Sources enum eQMIPDSInjectedPositionSources:UINT8 { eQMIPDSInjectedPositionSources_Unknown = 0, eQMIPDSInjectedPositionSources_GPS = 1, eQMIPDSInjectedPositionSources_CellID = 2, eQMIPDSInjectedPositionSources_EnhancedCellID = 3, eQMIPDSInjectedPositionSources_WiFi = 4, eQMIPDSInjectedPositionSources_Terrestial = 5, eQMIPDSInjectedPositionSources_TerrestialHybrid = 6, eQMIPDSInjectedPositionSources_Other = 7, }; // Enum to describe QMI PDS Mediums enum eQMIPDSMediums:UINT8 { eQMIPDSMediums_WWAN = 0, }; // Enum to describe QMI PDS Method States enum eQMIPDSMethodStates:UINT8 { eQMIPDSMethodStates_Disabled = 0, eQMIPDSMethodStates_Enabled = 1, eQMIPDSMethodStates_NotSupported = 255, }; // Enum to describe QMI PDS Motion Modes enum eQMIPDSMotionModes:UINT8 { eQMIPDSMotionModes_Unknown = 0, eQMIPDSMotionModes_Pedestrian = 1, eQMIPDSMotionModes_Vehicle = 2, }; // Enum to describe QMI PDS Motion States enum eQMIPDSMotionStates:UINT8 { eQMIPDSMotionStates_Unknown = 0, eQMIPDSMotionStates_Stationary = 1, eQMIPDSMotionStates_InMotion = 2, }; // Enum to describe QMI PDS Motion Submodes enum eQMIPDSMotionSubmodes:UINT8 { eQMIPDSMotionSubmodes_Unknown = 0, eQMIPDSMotionSubmodes_Walking = 1, eQMIPDSMotionSubmodes_Running = 2, }; // Enum to describe QMI PDS NMEA Reporting Options enum eQMIPDSNMEAReportingOptions:UINT8 { eQMIPDSNMEAReportingOptions_1HzFromTimeRequestedUntilFinalPositionDetermination = 0, eQMIPDSNMEAReportingOptions_FinalPositionDeterminationOnly = 1, }; // Enum to describe QMI PDS NMEA Sentence Operating Modes enum eQMIPDSNMEASentenceOperatingModes:UINT8 { eQMIPDSNMEASentenceOperatingModes_Standalone = 0, eQMIPDSNMEASentenceOperatingModes_MSBased = 1, eQMIPDSNMEASentenceOperatingModes_MSAssisted = 2, eQMIPDSNMEASentenceOperatingModes_Unknown = 255, }; // Enum to describe QMI PDS Network Mode enum eQMIPDSNetworkMode:UINT8 { eQMIPDSNetworkMode_UMTS = 0, eQMIPDSNetworkMode_CDMA = 1, }; // Enum to describe QMI PDS ODP States enum eQMIPDSODPStates:UINT8 { eQMIPDSODPStates_Disables = 0, eQMIPDSODPStates_EnabledLowPowerMode = 1, eQMIPDSODPStates_EnabledReadyMode = 2, }; // Enum to describe QMI PDS Operation Types enum eQMIPDSOperationTypes:UINT8 { eQMIPDSOperationTypes_Standalone = 0, eQMIPDSOperationTypes_MSBased = 1, eQMIPDSOperationTypes_MSAssisted = 2, }; // Enum to describe QMI PDS Output Devices enum eQMIPDSOutputDevices:UINT8 { eQMIPDSOutputDevices_NoneDisabled = 0, eQMIPDSOutputDevices_USB = 1, eQMIPDSOutputDevices_UART1 = 2, eQMIPDSOutputDevices_UART2 = 3, eQMIPDSOutputDevices_SharedMemory = 4, }; // Enum to describe QMI PDS PDN Types enum eQMIPDSPDNTypes:UINT32 { eQMIPDSPDNTypes_IPv4 = 0, eQMIPDSPDNTypes_IPv6 = 1, eQMIPDSPDNTypes_IPv4AndIPv6 = 2, }; // Enum to describe QMI PDS Privacy Modes enum eQMIPDSPrivacyModes:UINT8 { eQMIPDSPrivacyModes_NoNotifyVerify = 0, eQMIPDSPrivacyModes_Notify = 1, eQMIPDSPrivacyModes_NotifyVerifyAllowNoResponse = 2, eQMIPDSPrivacyModes_NotifyVerifyRequireResponse = 3, eQMIPDSPrivacyModes_PrivacyOverride = 4, }; // Enum to describe QMI PDS Reliability Indicator enum eQMIPDSReliabilityIndicator:UINT8 { eQMIPDSReliabilityIndicator_NotSet = 0, eQMIPDSReliabilityIndicator_VeryLow = 1, eQMIPDSReliabilityIndicator_Low = 2, eQMIPDSReliabilityIndicator_Medium = 3, eQMIPDSReliabilityIndicator_High = 4, }; // Enum to describe QMI PDS Report Security Challenge enum eQMIPDSReportSecurityChallenge:UINT8 { eQMIPDSReportSecurityChallenge_Disable = 0, eQMIPDSReportSecurityChallenge_Enable = 1, }; // Enum to describe QMI PDS Reporting State enum eQMIPDSReportingState:UINT8 { eQMIPDSReportingState_StopReporting = 0, eQMIPDSReportingState_StartReporting = 1, }; // Enum to describe QMI PDS Reset Reasons enum eQMIPDSResetReasons:UINT32 { eQMIPDSResetReasons_PositionEngine = 0, eQMIPDSResetReasons_GNSSBackgroundSCan = 1, eQMIPDSResetReasons_InjectClockInconsistency = 2, eQMIPDSResetReasons_GPSSubframeMisalignment = 3, eQMIPDSResetReasons_DecodedTimeInconsistency = 4, eQMIPDSResetReasons_CodeConsistencyError = 5, eQMIPDSResetReasons_SoftResetFromINTMSError = 6, eQMIPDSResetReasons_SoftResetFromRFFailure = 7, eQMIPDSResetReasons_ChannelControllerSoftError = 8, eQMIPDSResetReasons_ChannelControllerHardError = 9, }; // Enum to describe QMI PDS Reset States enum eQMIPDSResetStates:UINT32 { eQMIPDSResetStates_InProgress = 0, eQMIPDSResetStates_Completed = 1, eQMIPDSResetStates_UnableToInitialize = 2, eQMIPDSResetStates_E911CallInProgress = 3, }; // Enum to describe QMI PDS SBAS States enum eQMIPDSSBASStates:UINT8 { eQMIPDSSBASStates_Disabled = 0, eQMIPDSSBASStates_Enabled = 1, eQMIPDSSBASStates_Unknown = 255, }; // Enum to describe QMI PDS SPI State enum eQMIPDSSPIState:UINT8 { eQMIPDSSPIState_DeviceIsNonstationary = 0, eQMIPDSSPIState_DeviceIsStationary = 1, }; // Enum to describe QMI PDS SUPL Data Coding Schemes enum eQMIPDSSUPLDataCodingSchemes:UINT8 { eQMIPDSSUPLDataCodingSchemes_UTF8 = 0, eQMIPDSSUPLDataCodingSchemes_UCS2 = 1, eQMIPDSSUPLDataCodingSchemes_GSM = 2, eQMIPDSSUPLDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL Hash Algorithms enum eQMIPDSSUPLHashAlgorithms:UINT32 { eQMIPDSSUPLHashAlgorithms_SHA1 = 0, eQMIPDSSUPLHashAlgorithms_SHA256 = 1, }; // Enum to describe QMI PDS SUPL ID/Name Data Coding Schemes enum eQMIPDSSUPLIDNameDataCodingSchemes:UINT8 { eQMIPDSSUPLIDNameDataCodingSchemes_LogicalName = 0, eQMIPDSSUPLIDNameDataCodingSchemes_EmailAddress = 1, eQMIPDSSUPLIDNameDataCodingSchemes_MSISDN = 2, eQMIPDSSUPLIDNameDataCodingSchemes_URL = 3, eQMIPDSSUPLIDNameDataCodingSchemes_SIPURL = 4, eQMIPDSSUPLIDNameDataCodingSchemes_MIN = 5, eQMIPDSSUPLIDNameDataCodingSchemes_MDN = 6, eQMIPDSSUPLIDNameDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL INIT Sources enum eQMIPDSSUPLINITSources:UINT32 { eQMIPDSSUPLINITSources_1XSMS = 0, eQMIPDSSUPLINITSources_GSMSMS = 1, eQMIPDSSUPLINITSources_WAPPush = 2, eQMIPDSSUPLINITSources_UDP = 3, }; // Enum to describe QMI PDS SUPL Modes enum eQMIPDSSUPLModes:UINT8 { eQMIPDSSUPLModes_MSAssisted = 0, eQMIPDSSUPLModes_MSBased = 1, eQMIPDSSUPLModes_MSAssistedPreferred = 2, eQMIPDSSUPLModes_MSBasedPreferred = 3, eQMIPDSSUPLModes_Standalone = 4, eQMIPDSSUPLModes_AFLT = 5, eQMIPDSSUPLModes_ECID = 6, eQMIPDSSUPLModes_EOTD = 7, eQMIPDSSUPLModes_OTDOA = 8, eQMIPDSSUPLModes_NoPosition = 9, }; // Enum to describe QMI PDS SUPL Session End Status enum eQMIPDSSUPLSessionEndStatus:UINT32 { eQMIPDSSUPLSessionEndStatus_Success = 0, eQMIPDSSUPLSessionEndStatus_Failure = 1, }; // Enum to describe QMI PDS SUPL TLS Versions enum eQMIPDSSUPLTLSVersions:UINT32 { eQMIPDSSUPLTLSVersions_10 = 0, eQMIPDSSUPLTLSVersions_11 = 1, }; // Enum to describe QMI PDS SUPL Trigger Types enum eQMIPDSSUPLTriggerTypes:UINT32 { eQMIPDSSUPLTriggerTypes_SingleShot = 4294967295u, eQMIPDSSUPLTriggerTypes_Periodic = 0, eQMIPDSSUPLTriggerTypes_AreaEvent = 1, }; // Enum to describe QMI PDS SUPL Versions enum eQMIPDSSUPLVersions:UINT32 { eQMIPDSSUPLVersions_100 = 1, eQMIPDSSUPLVersions_200 = 2, eQMIPDSSUPLVersions_Unsupported = 3, }; // Enum to describe QMI PDS SV Almanac Status enum eQMIPDSSVAlmanacStatus:UINT8 { eQMIPDSSVAlmanacStatus_Unavailable = 0, eQMIPDSSVAlmanacStatus_Available = 1, }; // Enum to describe QMI PDS SV Ephemeris Status enum eQMIPDSSVEphemerisStatus:UINT8 { eQMIPDSSVEphemerisStatus_Unavailable = 0, eQMIPDSSVEphemerisStatus_Available = 1, }; // Enum to describe QMI PDS SV Health Status enum eQMIPDSSVHealthStatus:UINT8 { eQMIPDSSVHealthStatus_Unhealthy = 0, eQMIPDSSVHealthStatus_Healthy = 1, }; // Enum to describe QMI PDS SV Processing Status enum eQMIPDSSVProcessingStatus:UINT8 { eQMIPDSSVProcessingStatus_Idle = 1, eQMIPDSSVProcessingStatus_Search = 2, eQMIPDSSVProcessingStatus_SearchVerify = 3, eQMIPDSSVProcessingStatus_BitEdge = 4, eQMIPDSSVProcessingStatus_Track = 5, }; // Enum to describe QMI PDS SV Systems enum eQMIPDSSVSystems:UINT8 { eQMIPDSSVSystems_GPS = 1, eQMIPDSSVSystems_Galileo = 2, eQMIPDSSVSystems_SBAS = 3, eQMIPDSSVSystems_Compass = 4, eQMIPDSSVSystems_Glonass = 5, }; // Enum to describe QMI PDS Server Options enum eQMIPDSServerOptions:UINT8 { eQMIPDSServerOptions_Default = 0, }; // Enum to describe QMI PDS Session Control Types enum eQMIPDSSessionControlTypes:UINT8 { eQMIPDSSessionControlTypes_Automatic = 0, }; // Enum to describe QMI PDS Session Status enum eQMIPDSSessionStatus:UINT8 { eQMIPDSSessionStatus_Success = 0, eQMIPDSSessionStatus_InProgress = 1, eQMIPDSSessionStatus_GeneralFailure = 2, eQMIPDSSessionStatus_Timeout = 3, eQMIPDSSessionStatus_UserEnded = 4, eQMIPDSSessionStatus_BadParameter = 5, eQMIPDSSessionStatus_PhoneOffline = 6, eQMIPDSSessionStatus_EngineLocked = 7, eQMIPDSSessionStatus_E911SessionInProgress = 8, }; // Enum to describe QMI PDS Session Types enum eQMIPDSSessionTypes:UINT8 { eQMIPDSSessionTypes_New = 0, }; // Enum to describe QMI PDS Source Linkage enum eQMIPDSSourceLinkage:UINT8 { eQMIPDSSourceLinkage_NotSpecified = 0, eQMIPDSSourceLinkage_FullyInterDependent = 1, eQMIPDSSourceLinkage_AltitudeDependsOnLatitudeAndLongitude = 2, eQMIPDSSourceLinkage_FullyIndependent = 3, }; // Enum to describe QMI PDS Stop Reason enum eQMIPDSStopReason:UINT8 { eQMIPDSStopReason_UserTerminated = 0, eQMIPDSStopReason_Other = 1, }; // Enum to describe QMI PDS Streaming Status enum eQMIPDSStreamingStatus:UINT8 { eQMIPDSStreamingStatus_NotReadyForStreaming = 0, eQMIPDSStreamingStatus_ReadyForStreaming = 1, }; // Enum to describe QMI PDS Suspend Reason enum eQMIPDSSuspendReason:UINT8 { eQMIPDSSuspendReason_OoS = 0, eQMIPDSSuspendReason_LPM = 1, eQMIPDSSuspendReason_Other = 2, }; // Enum to describe QMI PDS Time Bases enum eQMIPDSTimeBases:UINT8 { eQMIPDSTimeBases_GPS = 0, eQMIPDSTimeBases_UTC = 1, }; // Enum to describe QMI PDS Time Source enum eQMIPDSTimeSource:UINT8 { eQMIPDSTimeSource_Invalid = 0, eQMIPDSTimeSource_NetworkTimeTransfer = 1, eQMIPDSTimeSource_NetworkTimeTagging = 2, eQMIPDSTimeSource_ExternalInput = 3, eQMIPDSTimeSource_TOWDecode = 4, eQMIPDSTimeSource_TOWConfirmed = 5, eQMIPDSTimeSource_TOWAndWeekConfirmed = 6, eQMIPDSTimeSource_TimeAlignment = 7, eQMIPDSTimeSource_NavSolution = 8, eQMIPDSTimeSource_SolveForTime = 9, }; // Enum to describe QMI PDS Time Type enum eQMIPDSTimeType:UINT8 { eQMIPDSTimeType_UTCTime = 0, eQMIPDSTimeType_GPSTime = 1, eQMIPDSTimeType_Age = 2, }; // Enum to describe QMI PDS Tracking Session States enum eQMIPDSTrackingSessionStates:UINT8 { eQMIPDSTrackingSessionStates_Unknown = 0, eQMIPDSTrackingSessionStates_Inactive = 1, eQMIPDSTrackingSessionStates_Active = 2, }; // Enum to describe QMI PDS UMTS CP Data Coding Schemes enum eQMIPDSUMTSCPDataCodingSchemes:UINT8 { eQMIPDSUMTSCPDataCodingSchemes_German = 0, eQMIPDSUMTSCPDataCodingSchemes_English = 1, eQMIPDSUMTSCPDataCodingSchemes_Italian = 2, eQMIPDSUMTSCPDataCodingSchemes_French = 3, eQMIPDSUMTSCPDataCodingSchemes_Spanish = 4, eQMIPDSUMTSCPDataCodingSchemes_Dutch = 5, eQMIPDSUMTSCPDataCodingSchemes_Swedish = 6, eQMIPDSUMTSCPDataCodingSchemes_Danish = 7, eQMIPDSUMTSCPDataCodingSchemes_Portuguese = 8, eQMIPDSUMTSCPDataCodingSchemes_Finnish = 9, eQMIPDSUMTSCPDataCodingSchemes_Norwegian = 10, eQMIPDSUMTSCPDataCodingSchemes_Greek = 11, eQMIPDSUMTSCPDataCodingSchemes_Turkish = 12, eQMIPDSUMTSCPDataCodingSchemes_Hungarian = 13, eQMIPDSUMTSCPDataCodingSchemes_Polish = 14, eQMIPDSUMTSCPDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS UMTS CP Location Types enum eQMIPDSUMTSCPLocationTypes:UINT8 { eQMIPDSUMTSCPLocationTypes_Current = 0, eQMIPDSUMTSCPLocationTypes_CurrentOrLastKnown = 1, eQMIPDSUMTSCPLocationTypes_Initial = 2, }; // Enum to describe QMI PDS Uncertainty Coverage enum eQMIPDSUncertaintyCoverage:UINT8 { eQMIPDSUncertaintyCoverage_NotSpecified = 0, eQMIPDSUncertaintyCoverage_PointUncertainty = 1, eQMIPDSUncertaintyCoverage_FullyUncertainty = 2, }; // Enum to describe QMI PDS VX Data Coding Schemes enum eQMIPDSVXDataCodingSchemes:UINT8 { eQMIPDSVXDataCodingSchemes_Octet = 0, eQMIPDSVXDataCodingSchemes_EXNProtocolMessage = 1, eQMIPDSVXDataCodingSchemes_ASCII = 2, eQMIPDSVXDataCodingSchemes_IA5 = 3, eQMIPDSVXDataCodingSchemes_Unicode = 4, eQMIPDSVXDataCodingSchemes_ShiftJIS = 5, eQMIPDSVXDataCodingSchemes_Korean = 6, eQMIPDSVXDataCodingSchemes_LatinHebrew = 7, eQMIPDSVXDataCodingSchemes_Latin = 8, eQMIPDSVXDataCodingSchemes_GSM = 9, }; // Enum to describe QMI PDS VX Modes enum eQMIPDSVXModes:UINT8 { eQMIPDSVXModes_MSAssisted = 0, eQMIPDSVXModes_MSBased = 1, eQMIPDSVXModes_MSAssistedPreferred = 2, eQMIPDSVXModes_MSBasedPreferred = 3, }; // Enum to describe QMI PDS WWAN Network Preferences enum eQMIPDSWWANNetworkPreferences:UINT8 { eQMIPDSWWANNetworkPreferences_AnyAvailable = 0, eQMIPDSWWANNetworkPreferences_HomeOnly = 1, eQMIPDSWWANNetworkPreferences_RoamOnly = 2, }; // Enum to describe QMI PDS Wi-Fi Request Types enum eQMIPDSWiFiRequestTypes:UINT8 { eQMIPDSWiFiRequestTypes_StartPeriodicFixesHighFrequency = 0, eQMIPDSWiFiRequestTypes_StartPeriodicFixesKeepWarm = 1, eQMIPDSWiFiRequestTypes_StopPeriodicFixes = 2, eQMIPDSWiFiRequestTypes_Suspend = 4, }; // Enum to describe QMI Profile Types enum eQMIProfileTypes:UINT8 { eQMIProfileTypes_3GPP = 0, eQMIProfileTypes_3GPP2 = 1, }; // Enum to describe QMI QCMAP Call End Reasons enum eQMIQCMAPCallEndReasons:UINT32 { eQMIQCMAPCallEndReasons_Unknown = 0, eQMIQCMAPCallEndReasons_Unspecified = 1, eQMIQCMAPCallEndReasons_ClientEnd = 2, eQMIQCMAPCallEndReasons_NoService = 3, eQMIQCMAPCallEndReasons_Fade = 4, eQMIQCMAPCallEndReasons_ReleaseNormal = 5, eQMIQCMAPCallEndReasons_AccInProgress = 6, eQMIQCMAPCallEndReasons_AccFailed = 7, eQMIQCMAPCallEndReasons_RedirectOrHandoff = 8, eQMIQCMAPCallEndReasons_CloseInProgress = 9, eQMIQCMAPCallEndReasons_AuthenticationFailed = 10, eQMIQCMAPCallEndReasons_InternalError = 11, eQMIQCMAPCallEndReasons_CDMALock = 500, eQMIQCMAPCallEndReasons_Intercept = 501, eQMIQCMAPCallEndReasons_Reorder = 502, eQMIQCMAPCallEndReasons_ReleaseServiceOptionRejected = 503, eQMIQCMAPCallEndReasons_IncomingCall = 504, eQMIQCMAPCallEndReasons_AlertStop = 505, eQMIQCMAPCallEndReasons_Activation = 506, eQMIQCMAPCallEndReasons_MaxAccessProbe = 507, eQMIQCMAPCallEndReasons_CCSNotSupportedByBS = 508, eQMIQCMAPCallEndReasons_NoResponseFromBS = 509, eQMIQCMAPCallEndReasons_RejectedByBS = 510, eQMIQCMAPCallEndReasons_Incompatible = 511, eQMIQCMAPCallEndReasons_AlreadyInTC = 512, eQMIQCMAPCallEndReasons_UserCallOrigDuringGPS = 513, eQMIQCMAPCallEndReasons_UserCallOrigDuringSMS = 514, eQMIQCMAPCallEndReasons_NoCDMAService = 515, eQMIQCMAPCallEndReasons_ConfFailed = 1000, eQMIQCMAPCallEndReasons_IncomingRejected = 1001, eQMIQCMAPCallEndReasons_NoGWService = 1002, eQMIQCMAPCallEndReasons_NetworkEnd = 1003, eQMIQCMAPCallEndReasons_LLCOrSNDCPFailure = 1004, eQMIQCMAPCallEndReasons_InsufficientResources = 1005, eQMIQCMAPCallEndReasons_ServiceOptionOutOfOrder = 1006, eQMIQCMAPCallEndReasons_NSAPIAlreadyUsed = 1007, eQMIQCMAPCallEndReasons_RegularPDPContextDeactivation = 1008, eQMIQCMAPCallEndReasons_NetworkFailure = 1009, eQMIQCMAPCallEndReasons_ReactivationRequested = 1010, eQMIQCMAPCallEndReasons_ProtocolError = 1011, eQMIQCMAPCallEndReasons_OperatorDeterminedBarring = 1012, eQMIQCMAPCallEndReasons_UnknownOrMissingAPN = 1013, eQMIQCMAPCallEndReasons_UnknownPDPAddressOrPDPType = 1014, eQMIQCMAPCallEndReasons_ActivationRejectedByGGSN = 1015, eQMIQCMAPCallEndReasons_ActivationRejectedUnspecified = 1016, eQMIQCMAPCallEndReasons_ServiceOptionNotSupported = 1017, eQMIQCMAPCallEndReasons_RequestedServiceOptionNotSubscribed = 1018, eQMIQCMAPCallEndReasons_QoSNotAccepted = 1019, eQMIQCMAPCallEndReasons_SemanticErrorInTheTFTOperation = 1020, eQMIQCMAPCallEndReasons_SyntacticalErrorInTheTFTOperation = 1021, eQMIQCMAPCallEndReasons_UnknownPDPContext = 1022, eQMIQCMAPCallEndReasons_SemanticErrorsInPacketFilters = 1023, eQMIQCMAPCallEndReasons_SyntacticalErrorsInPacketFilters = 1024, eQMIQCMAPCallEndReasons_PDPContextWithoutTFTAlreadyActivated = 1025, eQMIQCMAPCallEndReasons_InvalidTransactionIdentifierValue = 1026, eQMIQCMAPCallEndReasons_SemanticallyIncorrectMessage = 1027, eQMIQCMAPCallEndReasons_InvalidMandatoryInformation = 1028, eQMIQCMAPCallEndReasons_MessageTypeNonExistent = 1029, eQMIQCMAPCallEndReasons_MessageNotCompatibleWithState = 1030, eQMIQCMAPCallEndReasons_InformationElementNonexistent = 1031, eQMIQCMAPCallEndReasons_ConditionalInformationElementError = 1032, eQMIQCMAPCallEndReasons_MessageNotCompatibleWithProtocolState = 1033, eQMIQCMAPCallEndReasons_APNRestrictionValueIncompatibleWithActivePDPContext = 1034, eQMIQCMAPCallEndReasons_NoGPRSContextPresent = 1035, eQMIQCMAPCallEndReasons_RequestedFeatureNotSupported = 1036, eQMIQCMAPCallEndReasons_CDGenOrBusy = 1500, eQMIQCMAPCallEndReasons_CDBillOrAuth = 1501, eQMIQCMAPCallEndReasons_ChangeHDR = 1502, eQMIQCMAPCallEndReasons_ExitHDR = 1503, eQMIQCMAPCallEndReasons_HDRNoSession = 1504, eQMIQCMAPCallEndReasons_HDROrigDuringGPSFix = 1505, eQMIQCMAPCallEndReasons_HDRCSTimeout = 1506, eQMIQCMAPCallEndReasons_HDRReleasedByCM = 1507, }; // Enum to describe QMI QCMAP IP Families enum eQMIQCMAPIPFamilies:UINT32 { eQMIQCMAPIPFamilies_IPv4 = 4, eQMIQCMAPIPFamilies_IPv6 = 6, }; // Enum to describe QMI QCMAP NAT Types enum eQMIQCMAPNATTypes:UINT32 { eQMIQCMAPNATTypes_Symmetric = 0, eQMIQCMAPNATTypes_PortRestrictedCode = 1, }; // Enum to describe QMI QCMAP Next Header Protocols enum eQMIQCMAPNextHeaderProtocols:UINT32 { eQMIQCMAPNextHeaderProtocols_TCP = 1, eQMIQCMAPNextHeaderProtocols_UDP = 2, eQMIQCMAPNextHeaderProtocols_ICMPv4 = 3, eQMIQCMAPNextHeaderProtocols_ICMPv6 = 4, eQMIQCMAPNextHeaderProtocols_ESP = 5, eQMIQCMAPNextHeaderProtocols_TCPUDP = 6, }; // Enum to describe QMI QCMAP Packet Service Status enum eQMIQCMAPPacketServiceStatus:UINT32 { eQMIQCMAPPacketServiceStatus_Connecting = 1, eQMIQCMAPPacketServiceStatus_Connected = 2, eQMIQCMAPPacketServiceStatus_Disconnecting = 3, eQMIQCMAPPacketServiceStatus_Disconnected = 4, }; // Enum to describe QMI QCMAP Verbose Call End Reasons enum eQMIQCMAPVerboseCallEndReasons:UINT32 { eQMIQCMAPVerboseCallEndReasons_Unspecified = 0, eQMIQCMAPVerboseCallEndReasons_MIPFAUnspecified = 65600, eQMIQCMAPVerboseCallEndReasons_MIPFAAdministrativelyProhibited = 65601, eQMIQCMAPVerboseCallEndReasons_MIPFAInsufficientResources = 65602, eQMIQCMAPVerboseCallEndReasons_MIPFAMobileNodeAuthenticationFailure = 65603, eQMIQCMAPVerboseCallEndReasons_MIPFAHAAuthenticationFailure = 65604, eQMIQCMAPVerboseCallEndReasons_MIPFARequestedLifetimeTooLong = 65605, eQMIQCMAPVerboseCallEndReasons_MIPFAMalformedRequest = 65606, eQMIQCMAPVerboseCallEndReasons_MIPFAMalformedReply = 65607, eQMIQCMAPVerboseCallEndReasons_MIPFAEncapsulationUnavailable = 65608, eQMIQCMAPVerboseCallEndReasons_MIPFAVJHCUnavailable = 65609, eQMIQCMAPVerboseCallEndReasons_MIPFAReverseTunnelUnavailable = 65610, eQMIQCMAPVerboseCallEndReasons_MIPFAReverseTunnelIsMandatoryAndTBitIsNotSet = 65611, eQMIQCMAPVerboseCallEndReasons_MIPFADeliveryStyleNotSupported = 65615, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingNAI = 65633, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingHA = 65634, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingHomeAddress = 65635, eQMIQCMAPVerboseCallEndReasons_MIPFAUnknownChallenge = 65640, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingChallenge = 65641, eQMIQCMAPVerboseCallEndReasons_MIPFAStaleChallenge = 65642, eQMIQCMAPVerboseCallEndReasons_MIPHAReasonUnspecified = 65664, eQMIQCMAPVerboseCallEndReasons_MIPHAAdministrativelyProhibited = 65665, eQMIQCMAPVerboseCallEndReasons_MIPHAInsufficientResources = 65666, eQMIQCMAPVerboseCallEndReasons_MIPHAMobileNodeAuthenticationFailure = 65667, eQMIQCMAPVerboseCallEndReasons_MIPHAFAAuthenticationFailure = 65668, eQMIQCMAPVerboseCallEndReasons_MIPHARegistrationIDMismatch = 65669, eQMIQCMAPVerboseCallEndReasons_MIPHAMalformedRequest = 65670, eQMIQCMAPVerboseCallEndReasons_MIPHAUnknownHAAddress = 65672, eQMIQCMAPVerboseCallEndReasons_MIPHAReverseTunnelUnavailable = 65673, eQMIQCMAPVerboseCallEndReasons_MIPHAReverseTunnelIsMandatoryAndTBitIsNotSet = 65674, eQMIQCMAPVerboseCallEndReasons_MIPHAEncapsulationUnavailable = 65675, eQMIQCMAPVerboseCallEndReasons_Unknown = 131071, eQMIQCMAPVerboseCallEndReasons_Internal = 131273, eQMIQCMAPVerboseCallEndReasons_CallEnded = 131274, eQMIQCMAPVerboseCallEndReasons_InternalUnknownCauseCode = 131275, eQMIQCMAPVerboseCallEndReasons_UnknownCauseCode = 131276, eQMIQCMAPVerboseCallEndReasons_CloseInProgress = 131277, eQMIQCMAPVerboseCallEndReasons_NWInitiatedTermination = 131278, eQMIQCMAPVerboseCallEndReasons_AppPreempted = 131279, eQMIQCMAPVerboseCallEndReasons_CMCDMALock = 197108, eQMIQCMAPVerboseCallEndReasons_CMIntercept = 197109, eQMIQCMAPVerboseCallEndReasons_CMReorder = 197110, eQMIQCMAPVerboseCallEndReasons_CMReleaseServiceOptionReject = 197111, eQMIQCMAPVerboseCallEndReasons_CMIncomingCall = 197112, eQMIQCMAPVerboseCallEndReasons_CMAlertStop = 197113, eQMIQCMAPVerboseCallEndReasons_CMActivation = 197114, eQMIQCMAPVerboseCallEndReasons_CMMaxAccessProbe = 197115, eQMIQCMAPVerboseCallEndReasons_CMCCSNotSupportedByBS = 197116, eQMIQCMAPVerboseCallEndReasons_CMNoResponseFromBS = 197117, eQMIQCMAPVerboseCallEndReasons_CMRejectedByBS = 197118, eQMIQCMAPVerboseCallEndReasons_CMIncompatible = 197119, eQMIQCMAPVerboseCallEndReasons_CMAlreadyInTC = 197120, eQMIQCMAPVerboseCallEndReasons_CMUserCallOrigDuringGPS = 197121, eQMIQCMAPVerboseCallEndReasons_CMUserCallOrigDuringSMS = 197122, eQMIQCMAPVerboseCallEndReasons_CMNoCDMAService = 197123, eQMIQCMAPVerboseCallEndReasons_CMRetryOrder = 197127, eQMIQCMAPVerboseCallEndReasons_CMConfFailed = 197608, eQMIQCMAPVerboseCallEndReasons_CMIncomingRejected = 197609, eQMIQCMAPVerboseCallEndReasons_CMNoGWService = 197616, eQMIQCMAPVerboseCallEndReasons_CMNoGPRSContext = 197617, eQMIQCMAPVerboseCallEndReasons_CMIllegalMS = 197618, eQMIQCMAPVerboseCallEndReasons_CMIllegalME = 197619, eQMIQCMAPVerboseCallEndReasons_CMGPRSServicesAndNonGPRSServiceNotAllowed = 197620, eQMIQCMAPVerboseCallEndReasons_CMGPRSServicesNotAllowed = 197621, eQMIQCMAPVerboseCallEndReasons_CMMSIdentityCannotBeDerivedByTheNetwork = 197622, eQMIQCMAPVerboseCallEndReasons_CMImplicitlyDetached = 197623, eQMIQCMAPVerboseCallEndReasons_CMPLMNNotAllowed = 197624, eQMIQCMAPVerboseCallEndReasons_CMLANotAllowed = 197625, eQMIQCMAPVerboseCallEndReasons_CMGPRSServicesNotAllowedInThisPLMN = 197626, eQMIQCMAPVerboseCallEndReasons_CMPDPDuplicate = 197627, eQMIQCMAPVerboseCallEndReasons_CMUERATChange = 197628, eQMIQCMAPVerboseCallEndReasons_CMCongestion = 197629, eQMIQCMAPVerboseCallEndReasons_CMNoPDPContextActivated = 197630, eQMIQCMAPVerboseCallEndReasons_CMAccessClassDSACRejection = 197631, eQMIQCMAPVerboseCallEndReasons_CMCDGenOrBusy = 198108, eQMIQCMAPVerboseCallEndReasons_CMCDBillOrAuth = 198109, eQMIQCMAPVerboseCallEndReasons_CMChangeHDR = 198110, eQMIQCMAPVerboseCallEndReasons_CMExitHDR = 198111, eQMIQCMAPVerboseCallEndReasons_CMHDRNoSession = 198112, eQMIQCMAPVerboseCallEndReasons_CMHDROrigDuringGPSFix = 198113, eQMIQCMAPVerboseCallEndReasons_CMHDRCSTimeout = 198114, eQMIQCMAPVerboseCallEndReasons_CMHDRReleasedByCM = 198115, eQMIQCMAPVerboseCallEndReasons_CMNoHybridHDRService = 198118, eQMIQCMAPVerboseCallEndReasons_CMClientEnd = 198608, eQMIQCMAPVerboseCallEndReasons_CMNoService = 198609, eQMIQCMAPVerboseCallEndReasons_CMFade = 198610, eQMIQCMAPVerboseCallEndReasons_CMNormalRelease = 198611, eQMIQCMAPVerboseCallEndReasons_CMAccessInProgress = 198612, eQMIQCMAPVerboseCallEndReasons_CMAccessFail = 198613, eQMIQCMAPVerboseCallEndReasons_CMRedirectOrHandoff = 198614, eQMIQCMAPVerboseCallEndReasons_3GPPOperatorDeterminedBarring = 393224, eQMIQCMAPVerboseCallEndReasons_3GPPLLCSNDCPFailure = 393241, eQMIQCMAPVerboseCallEndReasons_3GPPInsufficientResources = 393242, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownAPN = 393243, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownPDP = 393244, eQMIQCMAPVerboseCallEndReasons_3GPPAuthenticationFailed = 393245, eQMIQCMAPVerboseCallEndReasons_3GPPGGSNReject = 393246, eQMIQCMAPVerboseCallEndReasons_3GPPActivationReject = 393247, eQMIQCMAPVerboseCallEndReasons_3GPPOptionNotSupported = 393248, eQMIQCMAPVerboseCallEndReasons_3GPPOptionUnsubscribed = 393249, eQMIQCMAPVerboseCallEndReasons_3GPPOptionTemporarilyOOO = 393250, eQMIQCMAPVerboseCallEndReasons_3GPPNSAPIAlreadyUsed = 393251, eQMIQCMAPVerboseCallEndReasons_3GPPRegularDeactivation = 393252, eQMIQCMAPVerboseCallEndReasons_3GPPQoSNotAccepted = 393253, eQMIQCMAPVerboseCallEndReasons_3GPPNetworkFailure = 393254, eQMIQCMAPVerboseCallEndReasons_3GPPUMTSReactivationRequest = 393255, eQMIQCMAPVerboseCallEndReasons_3GPPFeatureNotSupported = 393256, eQMIQCMAPVerboseCallEndReasons_3GPPTFTSemanticError = 393257, eQMIQCMAPVerboseCallEndReasons_3GPPTFTSyntaxError = 393258, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownPDPContext = 393259, eQMIQCMAPVerboseCallEndReasons_3GPPFilterSemanticError = 393260, eQMIQCMAPVerboseCallEndReasons_3GPPFilterSyntaxError = 393261, eQMIQCMAPVerboseCallEndReasons_3GPPPDPWithoutActiveTFT = 393262, eQMIQCMAPVerboseCallEndReasons_3GPPInvalidTransactionID = 393297, eQMIQCMAPVerboseCallEndReasons_3GPPMessageIncorrectSemantic = 393311, eQMIQCMAPVerboseCallEndReasons_3GPPInvalidMandatoryID = 393312, eQMIQCMAPVerboseCallEndReasons_3GPPMessageTypeUnsupported = 393313, eQMIQCMAPVerboseCallEndReasons_3GPPMessageTypeNoncompatibleState = 393314, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownInfoElement = 393315, eQMIQCMAPVerboseCallEndReasons_3GPPConditionalInfoElementError = 393316, eQMIQCMAPVerboseCallEndReasons_3GPPMessageAndProtocolStateUncompatible = 393317, eQMIQCMAPVerboseCallEndReasons_3GPPProtocolError = 393327, eQMIQCMAPVerboseCallEndReasons_3GPPAPNTypeConflict = 393328, eQMIQCMAPVerboseCallEndReasons_PPPTimeout = 458753, eQMIQCMAPVerboseCallEndReasons_PPPAuthenticationFailed = 458754, eQMIQCMAPVerboseCallEndReasons_PPPOptionMismatch = 458755, eQMIQCMAPVerboseCallEndReasons_PPPPAPFailure = 458783, eQMIQCMAPVerboseCallEndReasons_PPPCHAPFailure = 458784, eQMIQCMAPVerboseCallEndReasons_PPPUnknown = 524287, eQMIQCMAPVerboseCallEndReasons_EHRPDSubsLimitedToV4 = 524289, eQMIQCMAPVerboseCallEndReasons_EHRPDSubsLimitedToV6 = 524290, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCPTimeout = 524292, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCPFailure = 524293, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IGeneralError = 524294, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IUnauthAPN = 524295, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNLimit = 524296, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2INoPDNGW = 524297, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNGWUnreach = 524298, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNGWRejected = 524299, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IInsufficientParam = 524300, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IResourceUnavailable = 524301, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IAdminProhibited = 524302, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNIDInUse = 524303, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2ISubscriberLimitation = 524304, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNExistsForAPN = 524305, eQMIQCMAPVerboseCallEndReasons_PrefixUnavailable = 589825, }; // Enum to describe QMI QoS Delivery Orders enum eQMIQoSDeliveryOrders:UINT8 { eQMIQoSDeliveryOrders_Subscribe = 0, eQMIQoSDeliveryOrders_DeliveryOrderOn = 1, eQMIQoSDeliveryOrders_DeliveryOrderOff = 2, }; // Enum to describe QMI Results enum eQMIResults:UINT16 { eQMIResults_Success = 0, eQMIResults_Failure = 1, }; // Enum to describe QMI SDU Error Ratios enum eQMISDUErrorRatios:UINT8 { eQMISDUErrorRatios_Subscribe = 0, eQMISDUErrorRatios_1X102 = 1, eQMISDUErrorRatios_7X103 = 2, eQMISDUErrorRatios_1X103 = 3, eQMISDUErrorRatios_1X104 = 4, eQMISDUErrorRatios_1X105 = 5, eQMISDUErrorRatios_1X106 = 6, eQMISDUErrorRatios_1X101 = 7, }; // Enum to describe QMI SDU Residual Bit Error Ratios enum eQMISDUResidualBitErrorRatios:UINT8 { eQMISDUResidualBitErrorRatios_Subscribe = 0, eQMISDUResidualBitErrorRatios_5X102 = 1, eQMISDUResidualBitErrorRatios_1X102 = 2, eQMISDUResidualBitErrorRatios_5X103 = 3, eQMISDUResidualBitErrorRatios_4X103 = 4, eQMISDUResidualBitErrorRatios_1X103 = 5, eQMISDUResidualBitErrorRatios_1X104 = 6, eQMISDUResidualBitErrorRatios_1X105 = 7, eQMISDUResidualBitErrorRatios_1X106 = 8, eQMISDUResidualBitErrorRatios_6X108 = 9, }; // Enum to describe QMI Traffic Classes enum eQMITrafficClasses:UINT8 { eQMITrafficClasses_Subscribed = 0, eQMITrafficClasses_Conversational = 1, eQMITrafficClasses_Streaming = 2, eQMITrafficClasses_Interactive = 3, eQMITrafficClasses_Background = 4, }; // Enum to describe QMI UIM ACL Status enum eQMIUIMACLStatus:UINT8 { eQMIUIMACLStatus_ACLNotAvailable = 0, eQMIUIMACLStatus_ACLAvailableAndDisabled = 1, eQMIUIMACLStatus_ACLAvailableAndEnabled = 2, }; // Enum to describe QMI UIM APDU Response Status enum eQMIUIMAPDUResponseStatus:UINT8 { eQMIUIMAPDUResponseStatus_ReturnIntermediateProcedureBytes = 0, eQMIUIMAPDUResponseStatus_ReturnFinalResultAndStatusWords = 1, }; // Enum to describe QMI UIM Application States enum eQMIUIMApplicationStates:UINT8 { eQMIUIMApplicationStates_Unknown = 0, eQMIUIMApplicationStates_Detected = 1, eQMIUIMApplicationStates_PIN1OrUPINIsRequired = 2, eQMIUIMApplicationStates_PUK1OrPUKForUPINIsRequired = 3, eQMIUIMApplicationStates_PersonalizationStateMustBeChecked = 4, eQMIUIMApplicationStates_PIN1IsBlocked = 5, eQMIUIMApplicationStates_Illegal = 6, eQMIUIMApplicationStates_Ready = 7, }; // Enum to describe QMI UIM Application Types enum eQMIUIMApplicationTypes:UINT8 { eQMIUIMApplicationTypes_Unknown = 0, eQMIUIMApplicationTypes_SIMCard = 1, eQMIUIMApplicationTypes_USIMApplication = 2, eQMIUIMApplicationTypes_RUIMCard = 3, eQMIUIMApplicationTypes_CSIMApplication = 4, eQMIUIMApplicationTypes_ISIMApplication = 5, }; // Enum to describe QMI UIM Authentication Contexts enum eQMIUIMAuthenticationContexts:UINT8 { eQMIUIMAuthenticationContexts_GSMAlgorithm = 0, eQMIUIMAuthenticationContexts_CAVEAlgorithm = 1, eQMIUIMAuthenticationContexts_GSMSecurity = 2, eQMIUIMAuthenticationContexts_3GSecurity = 3, eQMIUIMAuthenticationContexts_VGCSVBSSecurity = 4, eQMIUIMAuthenticationContexts_GBASecurityBootstrappingMode = 5, eQMIUIMAuthenticationContexts_GBASecurityNAFDerivationMode = 6, eQMIUIMAuthenticationContexts_MBMSSecurityMSKUpdateMode = 7, eQMIUIMAuthenticationContexts_MBMSSecurityMTKGenerationMode = 8, eQMIUIMAuthenticationContexts_MBMSSecurityMSKDeletionMode = 9, eQMIUIMAuthenticationContexts_MBMSSecurityMUKDeletionMode = 10, eQMIUIMAuthenticationContexts_IMSAKASecurity = 11, eQMIUIMAuthenticationContexts_HTTPDigestSecurity = 12, eQMIUIMAuthenticationContexts_ComputeIPCHAP = 13, eQMIUIMAuthenticationContexts_ComputeIPMNHA = 14, eQMIUIMAuthenticationContexts_ComputeIPMIPRRQ = 15, eQMIUIMAuthenticationContexts_ComputeIPMNAAA = 16, eQMIUIMAuthenticationContexts_ComputeIPHRPD = 17, }; // Enum to describe QMI UIM CK/Session Operations enum eQMIUIMCKSessionOperations:UINT8 { eQMIUIMCKSessionOperations_Deactivate = 0, eQMIUIMCKSessionOperations_Activate = 1, }; // Enum to describe QMI UIM Card Error Codes enum eQMIUIMCardErrorCodes:UINT8 { eQMIUIMCardErrorCodes_Unknown = 0, eQMIUIMCardErrorCodes_PowerDown = 1, eQMIUIMCardErrorCodes_PollError = 2, eQMIUIMCardErrorCodes_NoATRReceived = 3, eQMIUIMCardErrorCodes_VoltMismatch = 4, eQMIUIMCardErrorCodes_ParityError = 5, eQMIUIMCardErrorCodes_UnknownPossiblyRemoved = 6, eQMIUIMCardErrorCodes_TechnicalProblems = 7, }; // Enum to describe QMI UIM Card States enum eQMIUIMCardStates:UINT8 { eQMIUIMCardStates_Absent = 0, eQMIUIMCardStates_Present = 1, eQMIUIMCardStates_Error = 2, eQMIUIMCardStates_Unknown = 3, }; // Enum to describe QMI UIM Connect Operations enum eQMIUIMConnectOperations:UINT8 { eQMIUIMConnectOperations_Disconnect = 0, eQMIUIMConnectOperations_Connect = 1, eQMIUIMConnectOperations_CheckStatus = 2, }; // Enum to describe QMI UIM Disonnect Modes enum eQMIUIMDisonnectModes:UINT8 { eQMIUIMDisonnectModes_ImmediateDisconnect = 0, eQMIUIMDisonnectModes_GracefulShutdown = 1, }; // Enum to describe QMI UIM FDN Status Values enum eQMIUIMFDNStatusValues:UINT8 { eQMIUIMFDNStatusValues_NotAvailable = 0, eQMIUIMFDNStatusValues_AvailableButDisabled = 1, eQMIUIMFDNStatusValues_AvailableAndEnabled = 2, }; // Enum to describe QMI UIM File Control Information enum eQMIUIMFileControlInformation:UINT8 { eQMIUIMFileControlInformation_NoData = 0, eQMIUIMFileControlInformation_FCP = 1, eQMIUIMFileControlInformation_FCI = 2, eQMIUIMFileControlInformation_FCIWithInterfaces = 3, eQMIUIMFileControlInformation_FMD = 4, }; // Enum to describe QMI UIM File Types enum eQMIUIMFileTypes:UINT8 { eQMIUIMFileTypes_Transparent = 0, eQMIUIMFileTypes_Cyclic = 1, eQMIUIMFileTypes_LinearFixed = 2, eQMIUIMFileTypes_DedicatedFile = 3, eQMIUIMFileTypes_MasterFile = 4, }; // Enum to describe QMI UIM Files Status enum eQMIUIMFilesStatus:UINT32 { eQMIUIMFilesStatus_Deactivated = 0, eQMIUIMFilesStatus_Activated = 1, }; // Enum to describe QMI UIM Hidden Key Status Values enum eQMIUIMHiddenKeyStatusValues:UINT8 { eQMIUIMHiddenKeyStatusValues_NotSupported = 0, eQMIUIMHiddenKeyStatusValues_EnabledAndNotVerified = 1, eQMIUIMHiddenKeyStatusValues_EnabledAndVerified = 2, eQMIUIMHiddenKeyStatusValues_Disabled = 3, }; // Enum to describe QMI UIM Hot-Swap enum eQMIUIMHotSwap:UINT8 { eQMIUIMHotSwap_HotSwapNotSupported = 0, eQMIUIMHotSwap_HotSwapIsSupportedButStatusOfSwitchNotSupported = 1, eQMIUIMHotSwap_SwitchIndicatesThatCardIsPresent = 2, eQMIUIMHotSwap_SwichIndicatesThatCardIsNotPresent = 3, }; // Enum to describe QMI UIM Key Reference ID enum eQMIUIMKeyReferenceID:UINT8 { eQMIUIMKeyReferenceID_PINApplication1 = 1, eQMIUIMKeyReferenceID_PINApplication2 = 2, eQMIUIMKeyReferenceID_PINApplication3 = 3, eQMIUIMKeyReferenceID_PINApplication4 = 4, eQMIUIMKeyReferenceID_PINApplication5 = 5, eQMIUIMKeyReferenceID_PINApplication6 = 6, eQMIUIMKeyReferenceID_PINApplication7 = 7, eQMIUIMKeyReferenceID_PINApplication8 = 8, }; // Enum to describe QMI UIM PIN IDs enum eQMIUIMPINIDs:UINT8 { eQMIUIMPINIDs_PIN1 = 1, eQMIUIMPINIDs_PIN2 = 2, eQMIUIMPINIDs_UniversalPIN = 3, eQMIUIMPINIDs_HiddenKey = 4, }; // Enum to describe QMI UIM PIN Operations enum eQMIUIMPINOperations:UINT8 { eQMIUIMPINOperations_Disable = 0, eQMIUIMPINOperations_Enable = 1, }; // Enum to describe QMI UIM PIN States enum eQMIUIMPINStates:UINT8 { eQMIUIMPINStates_Unknown = 0, eQMIUIMPINStates_EnabledAndNotVerified = 1, eQMIUIMPINStates_EnabledAndVerified = 2, eQMIUIMPINStates_Disabled = 3, eQMIUIMPINStates_Blocked = 4, eQMIUIMPINStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Personalization Features enum eQMIUIMPersonalizationFeatures:UINT8 { eQMIUIMPersonalizationFeatures_GWNetwork = 0, eQMIUIMPersonalizationFeatures_GWNetworkSubset = 1, eQMIUIMPersonalizationFeatures_GWServiceProvider = 2, eQMIUIMPersonalizationFeatures_GWCorporate = 3, eQMIUIMPersonalizationFeatures_GWUIM = 4, eQMIUIMPersonalizationFeatures_1XNetworkType1 = 5, eQMIUIMPersonalizationFeatures_1XNetworkType2 = 6, eQMIUIMPersonalizationFeatures_1XHRPD = 7, eQMIUIMPersonalizationFeatures_1XServiceProvider = 8, eQMIUIMPersonalizationFeatures_1XCorporate = 9, eQMIUIMPersonalizationFeatures_1XRUIM = 10, eQMIUIMPersonalizationFeatures_Unknown = 11, }; // Enum to describe QMI UIM Personalization States enum eQMIUIMPersonalizationStates:UINT8 { eQMIUIMPersonalizationStates_Unknown = 0, eQMIUIMPersonalizationStates_PersonalizationOperationIsInProgress = 1, eQMIUIMPersonalizationStates_Ready = 2, eQMIUIMPersonalizationStates_PersonalizationCodeIsRequired = 3, eQMIUIMPersonalizationStates_PUKForPersonalizationCodeIsRequired = 4, eQMIUIMPersonalizationStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Refresh Modes enum eQMIUIMRefreshModes:UINT8 { eQMIUIMRefreshModes_Reset = 0, eQMIUIMRefreshModes_Init = 1, eQMIUIMRefreshModes_InitAndFCN = 2, eQMIUIMRefreshModes_FCN = 3, eQMIUIMRefreshModes_InitAndFullFCN = 4, eQMIUIMRefreshModes_ApplicationReset = 5, eQMIUIMRefreshModes_3GSessionReset = 6, }; // Enum to describe QMI UIM Refresh Stages enum eQMIUIMRefreshStages:UINT8 { eQMIUIMRefreshStages_WaitingForOK = 0, eQMIUIMRefreshStages_Start = 1, eQMIUIMRefreshStages_EndWithSuccess = 2, eQMIUIMRefreshStages_EndWithFailure = 3, }; // Enum to describe QMI UIM Register Flags enum eQMIUIMRegisterFlags:UINT8 { eQMIUIMRegisterFlags_Deregister = 0, eQMIUIMRegisterFlags_Register = 1, }; // Enum to describe QMI UIM SAP Connection Conditions enum eQMIUIMSAPConnectionConditions:UINT8 { eQMIUIMSAPConnectionConditions_BlockOnActiveVoiceOrDataCall = 0, eQMIUIMSAPConnectionConditions_BlockOnActiveDataCall = 1, eQMIUIMSAPConnectionConditions_BlockOnActiveVoiceCall = 2, eQMIUIMSAPConnectionConditions_Allow = 3, }; // Enum to describe QMI UIM SAP Requests enum eQMIUIMSAPRequests:UINT8 { eQMIUIMSAPRequests_RetrieveATR = 0, eQMIUIMSAPRequests_SendAPDU = 1, eQMIUIMSAPRequests_PowerOffSIM = 2, eQMIUIMSAPRequests_PowerOnSIM = 3, eQMIUIMSAPRequests_ResetSIM = 4, eQMIUIMSAPRequests_RetrieveCardReaderStatus = 5, }; // Enum to describe QMI UIM SAP States enum eQMIUIMSAPStates:UINT8 { eQMIUIMSAPStates_NotEnabled = 0, eQMIUIMSAPStates_Connecting = 1, eQMIUIMSAPStates_ConnectedSuccessfully = 2, eQMIUIMSAPStates_ConnectionError = 3, eQMIUIMSAPStates_Disconnecting = 4, eQMIUIMSAPStates_DisconnectedSuccessfully = 5, }; // Enum to describe QMI UIM Security Attributes enum eQMIUIMSecurityAttributes:UINT8 { eQMIUIMSecurityAttributes_Always = 0, eQMIUIMSecurityAttributes_Never = 1, eQMIUIMSecurityAttributes_ANDCondition = 2, eQMIUIMSecurityAttributes_ORCondition = 3, eQMIUIMSecurityAttributes_SingleCondition = 4, }; // Enum to describe QMI UIM Session Types enum eQMIUIMSessionTypes:UINT8 { eQMIUIMSessionTypes_PrimaryGWProvisioning = 0, eQMIUIMSessionTypes_Primary1XProvisioning = 1, eQMIUIMSessionTypes_SecondaryGWProvisioning = 2, eQMIUIMSessionTypes_Secondary1XProvisioning = 3, eQMIUIMSessionTypes_NonprovisioningOnSlot1 = 4, eQMIUIMSessionTypes_NonprovisioningOnSlot2 = 5, eQMIUIMSessionTypes_CardOnSlot1 = 6, eQMIUIMSessionTypes_CardOnSlot2 = 7, eQMIUIMSessionTypes_LogicalChannelOnSlot1 = 8, eQMIUIMSessionTypes_LogicalChannelOnSlot2 = 9, eQMIUIMSessionTypes_TertiaryGWProvisioning = 10, eQMIUIMSessionTypes_Tertiary1XProvisioning = 11, eQMIUIMSessionTypes_QuarternaryGWProvisioning = 12, eQMIUIMSessionTypes_Quarternary1XProvisioning = 13, eQMIUIMSessionTypes_QuinaryGWProvisioning = 14, eQMIUIMSessionTypes_Quinary1XProvisioning = 15, eQMIUIMSessionTypes_NonprovisioningOnSlot3 = 16, eQMIUIMSessionTypes_NonprovisioningOnSlot4 = 17, eQMIUIMSessionTypes_NonprovisioningOnSlot5 = 18, eQMIUIMSessionTypes_CardOnSlot3 = 19, eQMIUIMSessionTypes_CardOnSlot4 = 20, eQMIUIMSessionTypes_CardOnSlot5 = 21, eQMIUIMSessionTypes_LogicalChannelOnSlot3 = 22, eQMIUIMSessionTypes_LogicalChannelOnSlot4 = 23, eQMIUIMSessionTypes_LogicalChannelOnSlot5 = 24, }; // Enum to describe QMI UIM Slots enum eQMIUIMSlots:UINT8 { eQMIUIMSlots_Slot1 = 1, eQMIUIMSlots_Slot2 = 2, eQMIUIMSlots_Slot3 = 3, eQMIUIMSlots_Slot4 = 4, eQMIUIMSlots_Slot5 = 5, }; // Enum to describe QMI Voice ALS Line Indicators enum eQMIVoiceALSLineIndicators:UINT8 { eQMIVoiceALSLineIndicators_Line1 = 0, eQMIVoiceALSLineIndicators_Line2 = 1, }; // Enum to describe QMI Voice ALS Lines enum eQMIVoiceALSLines:UINT8 { eQMIVoiceALSLines_Line1 = 0, eQMIVoiceALSLines_Line2 = 1, }; // Enum to describe QMI Voice Alerting Patterns enum eQMIVoiceAlertingPatterns:UINT32 { eQMIVoiceAlertingPatterns_Pattern1 = 0, eQMIVoiceAlertingPatterns_Pattern2 = 1, eQMIVoiceAlertingPatterns_Pattern3 = 2, eQMIVoiceAlertingPatterns_Pattern4 = 3, eQMIVoiceAlertingPatterns_Pattern5 = 4, eQMIVoiceAlertingPatterns_Pattern6 = 5, eQMIVoiceAlertingPatterns_Pattern7 = 6, eQMIVoiceAlertingPatterns_Pattern8 = 7, eQMIVoiceAlertingPatterns_Pattern9 = 8, }; // Enum to describe QMI Voice Alerting Types enum eQMIVoiceAlertingTypes:UINT8 { eQMIVoiceAlertingTypes_Local = 0, eQMIVoiceAlertingTypes_Remote = 1, }; // Enum to describe QMI Voice CLIR Causes enum eQMIVoiceCLIRCauses:UINT8 { eQMIVoiceCLIRCauses_None = 0, eQMIVoiceCLIRCauses_RejectedByUser = 1, eQMIVoiceCLIRCauses_InteractionWithOtherServices = 2, eQMIVoiceCLIRCauses_CoinLine = 3, eQMIVoiceCLIRCauses_ServiceUnavailable = 4, eQMIVoiceCLIRCauses_Reserved = 5, }; // Enum to describe QMI Voice CLIR Types enum eQMIVoiceCLIRTypes:UINT8 { eQMIVoiceCLIRTypes_Supression = 1, eQMIVoiceCLIRTypes_Invocation = 2, }; // Enum to describe QMI Voice Call Control Alpha Codes enum eQMIVoiceCallControlAlphaCodes:UINT32 { eQMIVoiceCallControlAlphaCodes_NotPresent = 0, eQMIVoiceCallControlAlphaCodes_Present = 1, eQMIVoiceCallControlAlphaCodes_ZeroLength = 2, }; // Enum to describe QMI Voice Call Control Result Types enum eQMIVoiceCallControlResultTypes:UINT8 { eQMIVoiceCallControlResultTypes_Voice = 0, eQMIVoiceCallControlResultTypes_SupplementaryService = 1, eQMIVoiceCallControlResultTypes_USSD = 2, }; // Enum to describe QMI Voice Call Control Results enum eQMIVoiceCallControlResults:UINT32 { eQMIVoiceCallControlResults_AllowedWithoutModification = 0, eQMIVoiceCallControlResults_NotAllowed = 1, eQMIVoiceCallControlResults_AllowedWithModification = 2, eQMIVoiceCallControlResults_AllowedModifiedToVoice = 3, eQMIVoiceCallControlResults_AllowedModifiedToSS = 4, eQMIVoiceCallControlResults_AllowedModifiedToUSSD = 5, }; // Enum to describe QMI Voice Call Directions enum eQMIVoiceCallDirections:UINT8 { eQMIVoiceCallDirections_MobileOriginated = 1, eQMIVoiceCallDirections_MobileTerminated = 2, }; // Enum to describe QMI Voice Call Modes enum eQMIVoiceCallModes:UINT8 { eQMIVoiceCallModes_NoService = 0, eQMIVoiceCallModes_CDMA = 1, eQMIVoiceCallModes_GSM = 2, eQMIVoiceCallModes_UMTS = 3, eQMIVoiceCallModes_LTE = 4, eQMIVoiceCallModes_TDSCDMA = 5, eQMIVoiceCallModes_Unknown = 6, eQMIVoiceCallModes_WLAN = 7, }; // Enum to describe QMI Voice Call States enum eQMIVoiceCallStates:UINT8 { eQMIVoiceCallStates_Origination = 1, eQMIVoiceCallStates_Incoming = 2, eQMIVoiceCallStates_Conversation = 3, eQMIVoiceCallStates_InProgress = 4, eQMIVoiceCallStates_Alerting = 5, eQMIVoiceCallStates_Hold = 6, eQMIVoiceCallStates_Waiting = 7, eQMIVoiceCallStates_Disconnecting = 8, eQMIVoiceCallStates_End = 9, eQMIVoiceCallStates_Setup = 10, }; // Enum to describe QMI Voice Call Types enum eQMIVoiceCallTypes:UINT8 { eQMIVoiceCallTypes_VoiceAutomaticSelection = 0, eQMIVoiceCallTypes_Forced = 1, eQMIVoiceCallTypes_VoiceOverIP = 2, eQMIVoiceCallTypes_VideoOverIP = 3, eQMIVoiceCallTypes_Videoshare = 4, eQMIVoiceCallTypes_TestCall = 5, eQMIVoiceCallTypes_OTAPA = 6, eQMIVoiceCallTypes_StandardOTASP = 7, eQMIVoiceCallTypes_NonStandardOTASP = 8, eQMIVoiceCallTypes_Emergency = 9, eQMIVoiceCallTypes_SupplementaryService = 10, eQMIVoiceCallTypes_EmergencyVoIP = 11, eQMIVoiceCallTypes_ECall = 12, }; // Enum to describe QMI Voice DTMF Events enum eQMIVoiceDTMFEvents:UINT8 { eQMIVoiceDTMFEvents_SendDTMFBurst = 0, eQMIVoiceDTMFEvents_StartSendingContinuousDTMFTone = 1, eQMIVoiceDTMFEvents_StopSendingContinuousDTMFTone = 3, eQMIVoiceDTMFEvents_ReceiveDTMFBurst = 4, eQMIVoiceDTMFEvents_StartReceivingContinuousDTMFTone = 6, eQMIVoiceDTMFEvents_StopReceivingContinuousDTMFTone = 7, }; // Enum to describe QMI Voice DTMF Privacy Levels enum eQMIVoiceDTMFPrivacyLevels:UINT8 { eQMIVoiceDTMFPrivacyLevels_Standard = 0, eQMIVoiceDTMFPrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Domains enum eQMIVoiceDomains:UINT8 { eQMIVoiceDomains_CSOnly = 0, eQMIVoiceDomains_PSOnly = 1, eQMIVoiceDomains_CSThenPS = 2, eQMIVoiceDomains_PSThenCS = 3, }; // Enum to describe QMI Voice ECT Call States enum eQMIVoiceECTCallStates:UINT8 { eQMIVoiceECTCallStates_None = 0, eQMIVoiceECTCallStates_Alerting = 1, eQMIVoiceECTCallStates_Active = 2, }; // Enum to describe QMI Voice ECall Variants enum eQMIVoiceECallVariants:UINT32 { eQMIVoiceECallVariants_Test = 1, eQMIVoiceECallVariants_Emergency = 2, eQMIVoiceECallVariants_Reconfig = 3, }; // Enum to describe QMI Voice End Reasons enum eQMIVoiceEndReasons:UINT16 { eQMIVoiceEndReasons_Offline = 0, eQMIVoiceEndReasons_CDMALocked = 20, eQMIVoiceEndReasons_NoService = 21, eQMIVoiceEndReasons_Fade = 22, eQMIVoiceEndReasons_Intercept = 23, eQMIVoiceEndReasons_Reorder = 24, eQMIVoiceEndReasons_NormalRelease = 25, eQMIVoiceEndReasons_SORejectRelease = 26, eQMIVoiceEndReasons_IncomingCall = 27, eQMIVoiceEndReasons_AlertStop = 28, eQMIVoiceEndReasons_ClientEnd = 29, eQMIVoiceEndReasons_Activation = 30, eQMIVoiceEndReasons_MCAbort = 31, eQMIVoiceEndReasons_MaxAccessProbes = 32, eQMIVoiceEndReasons_PersistentTestFailure = 33, eQMIVoiceEndReasons_RUIMNotPresent = 34, eQMIVoiceEndReasons_InProgressAccessAttempt = 35, eQMIVoiceEndReasons_AccessFailure = 36, eQMIVoiceEndReasons_RetryOrderReceived = 37, eQMIVoiceEndReasons_ConcurrentServiceNotSupported = 38, eQMIVoiceEndReasons_NoBaseStationResponse = 39, eQMIVoiceEndReasons_BaseStationReject = 40, eQMIVoiceEndReasons_IncompatibleConcurrentServices = 41, eQMIVoiceEndReasons_AccessBlocked = 42, eQMIVoiceEndReasons_AlreadyinTC = 43, eQMIVoiceEndReasons_EmergencyFlashed = 44, eQMIVoiceEndReasons_GPSCallEnding = 45, eQMIVoiceEndReasons_SMSCallEnding = 46, eQMIVoiceEndReasons_DataCallEnding = 47, eQMIVoiceEndReasons_RedirectionOrHandoff = 48, eQMIVoiceEndReasons_AllAccessBlocked = 49, eQMIVoiceEndReasons_OTASPSPCError = 50, eQMIVoiceEndReasons_MaxIS707BAccessProbes = 51, eQMIVoiceEndReasons_BaseStationRejectOrder = 52, eQMIVoiceEndReasons_BaseStationRetryOrder = 53, eQMIVoiceEndReasons_TimerT42Expired = 54, eQMIVoiceEndReasons_TimerT40Expired = 55, eQMIVoiceEndReasons_ServiceInitializationFailure = 56, eQMIVoiceEndReasons_TimerT50MExpired = 57, eQMIVoiceEndReasons_TimerT51MExpired = 58, eQMIVoiceEndReasons_ACKTimeoutDueTo12Retransmissions = 59, eQMIVoiceEndReasons_BadForwardLinkOrTimerT5MExpired = 60, eQMIVoiceEndReasons_TransceiverResourceManagerRequestFailed = 61, eQMIVoiceEndReasons_TimerT41Expired = 62, eQMIVoiceEndReasons_IncomingCallRejected = 102, eQMIVoiceEndReasons_SetupIndicationRejected = 103, eQMIVoiceEndReasons_NetworkEndedCall = 104, eQMIVoiceEndReasons_NoFunds = 105, eQMIVoiceEndReasons_NoGWSErvice = 106, eQMIVoiceEndReasons_NoCDMAService = 107, eQMIVoiceEndReasons_NoFullService = 108, eQMIVoiceEndReasons_MaxPSCalls = 109, eQMIVoiceEndReasons_SUPSUknownSubscriber = 110, eQMIVoiceEndReasons_SUPSIllegalSubscriber = 111, eQMIVoiceEndReasons_SUPSBearerServiceNotProvisioned = 112, eQMIVoiceEndReasons_SUPSTeleserviceNotProvisioned = 113, eQMIVoiceEndReasons_SUPSIllegalEquipment = 114, eQMIVoiceEndReasons_SUPSCallBarred = 115, eQMIVoiceEndReasons_SUPSIllegalSSOperation = 116, eQMIVoiceEndReasons_SUPSSSErrorStatus = 117, eQMIVoiceEndReasons_SUPSSSNotAvailable = 118, eQMIVoiceEndReasons_SUPSSSSubscriptionViolation = 119, eQMIVoiceEndReasons_SUPSSSIncompatibility = 120, eQMIVoiceEndReasons_SUPSFacilityNotSupported = 121, eQMIVoiceEndReasons_SUPSAbscentSubscriber = 122, eQMIVoiceEndReasons_SUPSShortTermDenial = 123, eQMIVoiceEndReasons_SUPSLongTermDenial = 124, eQMIVoiceEndReasons_SUPSSystemFailure = 125, eQMIVoiceEndReasons_SUPSDataMissing = 126, eQMIVoiceEndReasons_SUPSUnexpectedDataValue = 127, eQMIVoiceEndReasons_SUPSPasswordRegistrationFailure = 128, eQMIVoiceEndReasons_SUPSNegativePasswordCheck = 129, eQMIVoiceEndReasons_SUPSPasswordAttemptsViolation = 130, eQMIVoiceEndReasons_SUPSPositionMethodFailure = 131, eQMIVoiceEndReasons_SUPSUnknownAlphabet = 132, eQMIVoiceEndReasons_SUPSUSSDBusy = 133, eQMIVoiceEndReasons_SUPSRejectedByUser = 134, eQMIVoiceEndReasons_SUPSRejectedByNetwork = 135, eQMIVoiceEndReasons_SUPSDelectiontoServedSubscriber = 136, eQMIVoiceEndReasons_SUPSSpecialServiceCode = 137, eQMIVoiceEndReasons_SUPSInvalidDeflectedToNumber = 138, eQMIVoiceEndReasons_SUPSMultipartyParticipantsExceeded = 139, eQMIVoiceEndReasons_SUPSResourcesNotAvailable = 140, eQMIVoiceEndReasons_CCUnassignedNumber = 141, eQMIVoiceEndReasons_CCNoRouteToDestination = 142, eQMIVoiceEndReasons_CCChannelUnacceptable = 143, eQMIVoiceEndReasons_CCOperatorDeterminedBarring = 144, eQMIVoiceEndReasons_CCNormalCallClearing = 145, eQMIVoiceEndReasons_CCUserBusy = 146, eQMIVoiceEndReasons_CCNoUserResponding = 147, eQMIVoiceEndReasons_CCUserAlertingNoAnsewer = 148, eQMIVoiceEndReasons_CCCallRejected = 149, eQMIVoiceEndReasons_CCNumberChanged = 150, eQMIVoiceEndReasons_CCPreemption = 151, eQMIVoiceEndReasons_CCDestinationOutOfOrder = 152, eQMIVoiceEndReasons_CCInvalidNumber = 153, eQMIVoiceEndReasons_CCFacilityRejected = 154, eQMIVoiceEndReasons_CCResponseToStatusEnquiry = 155, eQMIVoiceEndReasons_CCNormalUnspecified = 156, eQMIVoiceEndReasons_CCNoCircuitOrChannelAvailable = 157, eQMIVoiceEndReasons_CCNetworkOutOfOrder = 158, eQMIVoiceEndReasons_CCTemporaryFailure = 159, eQMIVoiceEndReasons_CCSwitchingEquipmentCongestion = 160, eQMIVoiceEndReasons_CCAccessInformationDiscarded = 161, eQMIVoiceEndReasons_CCRequestedCircuitOrChannelNotAvailable = 162, eQMIVoiceEndReasons_CCResourcesUnavailable = 163, eQMIVoiceEndReasons_CCQOSUnavailable = 164, eQMIVoiceEndReasons_CCRequestedFacilityNotSubscribed = 165, eQMIVoiceEndReasons_CCIncomingCallsBarredWithinCUG = 166, eQMIVoiceEndReasons_CCBearerCapabilityNotAuthorized = 167, eQMIVoiceEndReasons_CCBearerCapabilityUnavailable = 168, eQMIVoiceEndReasons_CCServiceOptionNotAvailable = 169, eQMIVoiceEndReasons_CCACMLimitExceeded = 170, eQMIVoiceEndReasons_CCBearerServiceNotImplemented = 171, eQMIVoiceEndReasons_CCRequestedFacilityNotAvailable = 172, eQMIVoiceEndReasons_CCOnlyDigitalInformationBearerAvailable = 173, eQMIVoiceEndReasons_CCServiceOrOptionNotImplemented = 174, eQMIVoiceEndReasons_CCInvalidTransactionIdentifier = 175, eQMIVoiceEndReasons_CCUserNotMemberOfCUG = 176, eQMIVoiceEndReasons_CCIncompatibleDestination = 177, eQMIVoiceEndReasons_CCInvalidTransitNWSelection = 178, eQMIVoiceEndReasons_CCSemanticallyIncorrectMessage = 179, eQMIVoiceEndReasons_CCInvalidMandatoryInformation = 180, eQMIVoiceEndReasons_CCMessageTypeNotImplemented = 181, eQMIVoiceEndReasons_CCMessageTypeNotCompatible = 182, eQMIVoiceEndReasons_CCInformationElementNonexistent = 183, eQMIVoiceEndReasons_CCConditionalInformationElementError = 184, eQMIVoiceEndReasons_CCMessageNotCompatible = 185, eQMIVoiceEndReasons_CCRecoveryOnTimerExpired = 186, eQMIVoiceEndReasons_CCProtocolErrorUnspecified = 187, eQMIVoiceEndReasons_CCInternetworkingUnspecified = 188, eQMIVoiceEndReasons_CCOutgoingCallsBarredWithinCUG = 189, eQMIVoiceEndReasons_CCNoCUGSelection = 190, eQMIVoiceEndReasons_CCUnknownCUGIndex = 191, eQMIVoiceEndReasons_CCIncompatibleCUGIndex = 192, eQMIVoiceEndReasons_CCCUGCallFailureunspecified = 193, eQMIVoiceEndReasons_CCCLIRNotSubscribed = 194, eQMIVoiceEndReasons_CCCCBSPossible = 195, eQMIVoiceEndReasons_CCCCBSNotPossible = 196, eQMIVoiceEndReasons_MMGMMIMSIUnknwonInHLR = 197, eQMIVoiceEndReasons_MMGMMIllegalMS = 198, eQMIVoiceEndReasons_MMGMMIMSIUnknownInVLR = 199, eQMIVoiceEndReasons_MMGMMIMEINotAccepted = 200, eQMIVoiceEndReasons_MMGMMIllegalME = 201, eQMIVoiceEndReasons_MMGMMPLMNNotAllowed = 202, eQMIVoiceEndReasons_MMGMMLocationAreaNotAllowed = 203, eQMIVoiceEndReasons_MMGMMRoamingNotAllowedInThisLocationArea = 204, eQMIVoiceEndReasons_MMGMMNoSuitableCellsInLocationArea = 205, eQMIVoiceEndReasons_MMGMMNetworkFailure = 206, eQMIVoiceEndReasons_MMGMMMACFailure = 207, eQMIVoiceEndReasons_MMGMMSynchFailure = 208, eQMIVoiceEndReasons_MMGMMNetworkCongestion = 209, eQMIVoiceEndReasons_MMGMMGSMAuthenticationUnacceptable = 210, eQMIVoiceEndReasons_MMGMMServiceNotSubscribed = 211, eQMIVoiceEndReasons_MMGMMServiceTemporarilyOutOfOrder = 212, eQMIVoiceEndReasons_MMGMMCallCannotBeIdentified = 213, eQMIVoiceEndReasons_MMGMMIncorrectSemanticsInMessage = 214, eQMIVoiceEndReasons_MMGMMMadatoryInformationInvalid = 215, eQMIVoiceEndReasons_MMGMMAccessStratumFailure = 216, eQMIVoiceEndReasons_MMGMMInvalidSIM = 217, eQMIVoiceEndReasons_MMGMMWrongState = 218, eQMIVoiceEndReasons_MMGMMAcessClassBloacked = 219, eQMIVoiceEndReasons_MMGMMNoResources = 220, eQMIVoiceEndReasons_MMGMMInvalidUserData = 221, eQMIVoiceEndReasons_MMRejectTimerT3230Expired = 222, eQMIVoiceEndReasons_MMRejectNoCellAvailable = 223, eQMIVoiceEndReasons_MMRejectAbortMessageReceived = 224, eQMIVoiceEndReasons_MMRejectRadioLinkLost = 225, eQMIVoiceEndReasons_CNMRejectTimerT303Expired = 226, eQMIVoiceEndReasons_CNMRejectCNMMMReleaseIsPending = 227, eQMIVoiceEndReasons_AccessStratumRRReleaseIndication = 228, eQMIVoiceEndReasons_AccessStratumRandomAccessFailure = 229, eQMIVoiceEndReasons_AccessStratumRRCReleaseIndication = 230, eQMIVoiceEndReasons_AccessStratumCloseSessionIndication = 231, eQMIVoiceEndReasons_AccessStratumOpenSessionFailure = 232, eQMIVoiceEndReasons_AccessStratumLowLevelFailure = 233, eQMIVoiceEndReasons_AccessStratumRedialNotAllowed = 234, eQMIVoiceEndReasons_AccessStratumImmediateRetry = 235, eQMIVoiceEndReasons_AccessStratumAbortRadioUnavailable = 236, eQMIVoiceEndReasons_OTARejectSONotSupported = 237, eQMIVoiceEndReasons_IPBadRequestWaitingForInvite = 300, eQMIVoiceEndReasons_IPBadRequestWaitingForReinvite = 301, eQMIVoiceEndReasons_IPCalledPartyDoesNotExist = 302, eQMIVoiceEndReasons_IPUnsupportedMediaType = 303, eQMIVoiceEndReasons_IPTemporarilyUnavailable = 304, eQMIVoiceEndReasons_IPNoNetworkReponseTimeout = 305, eQMIVoiceEndReasons_IPUnableToPutCallOnHold = 306, eQMIVoiceEndReasons_IPMovedToEHRPD = 307, eQMIVoiceEndReasons_IPUpgradeOrDowngradeRejected = 308, eQMIVoiceEndReasons_IPCallForbidden = 309, eQMIVoiceEndReasons_IPGenericTimeout = 310, eQMIVoiceEndReasons_IPUpgradeOrDowngradeFailed = 311, eQMIVoiceEndReasons_IPUpgradeOrDowngradeCancelled = 312, eQMIVoiceEndReasons_IPSSACBarring = 313, eQMIVoiceEndReasons_IPThermalEmergency = 314, eQMIVoiceEndReasons_IP1xCSFBSoftFailure = 315, eQMIVoiceEndReasons_IP1xCSFBHardFailure = 316, }; // Enum to describe QMI Voice Even Odd Indicators enum eQMIVoiceEvenOddIndicators:UINT8 { eQMIVoiceEvenOddIndicators_EvenNumber = 0, eQMIVoiceEvenOddIndicators_OddNumber = 1, }; // Enum to describe QMI Voice Extended Service Class enum eQMIVoiceExtendedServiceClass { eQMIVoiceExtendedServiceClass_Voice = 1, eQMIVoiceExtendedServiceClass_Data = 2, eQMIVoiceExtendedServiceClass_Fax = 4, eQMIVoiceExtendedServiceClass_AllTeleservicesExceptSMS = 5, eQMIVoiceExtendedServiceClass_SMS = 8, eQMIVoiceExtendedServiceClass_AllTeleservicesData = 12, eQMIVoiceExtendedServiceClass_AllTeleservices = 13, eQMIVoiceExtendedServiceClass_SynchronousData = 16, eQMIVoiceExtendedServiceClass_AllPositionDeterminationServiceData = 17, eQMIVoiceExtendedServiceClass_AsynchronousData = 32, eQMIVoiceExtendedServiceClass_AllSynchronousAsynchronousData = 48, eQMIVoiceExtendedServiceClass_PacketData = 64, eQMIVoiceExtendedServiceClass_AllSynchronousData = 80, eQMIVoiceExtendedServiceClass_PacketAssemblerDisassemblerData = 128, eQMIVoiceExtendedServiceClass_AllAsynchronousData = 160, eQMIVoiceExtendedServiceClass_PLMNSpecificAllTeleservices = 53248, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices1 = 53504, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices2 = 53760, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices3 = 54016, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices4 = 54272, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices5 = 54528, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices6 = 54784, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices7 = 55040, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices8 = 55296, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices9 = 55552, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices10 = 55808, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices11 = 56064, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices12 = 56320, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices13 = 56576, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices14 = 56832, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices15 = 57088, }; // Enum to describe QMI Voice Flash Types enum eQMIVoiceFlashTypes:UINT8 { eQMIVoiceFlashTypes_Simple = 0, eQMIVoiceFlashTypes_ActivateAnswerHold = 1, eQMIVoiceFlashTypes_DeactivateAnswerHold = 2, }; // Enum to describe QMI Voice Handover States enum eQMIVoiceHandoverStates:UINT32 { eQMIVoiceHandoverStates_Start = 1, eQMIVoiceHandoverStates_Fail = 2, eQMIVoiceHandoverStates_Complete = 3, eQMIVoiceHandoverStates_Cancel = 4, }; // Enum to describe QMI Voice Interdigit Intervals enum eQMIVoiceInterdigitIntervals:UINT8 { eQMIVoiceInterdigitIntervals_60ms = 0, eQMIVoiceInterdigitIntervals_100ms = 1, eQMIVoiceInterdigitIntervals_150ms = 2, eQMIVoiceInterdigitIntervals_200ms = 3, }; // Enum to describe QMI Voice NSS Releases enum eQMIVoiceNSSReleases:UINT8 { eQMIVoiceNSSReleases_Finished = 1, }; // Enum to describe QMI Voice Network Mode enum eQMIVoiceNetworkMode:UINT32 { eQMIVoiceNetworkMode_None = 0, eQMIVoiceNetworkMode_GSM = 1, eQMIVoiceNetworkMode_WCDMA = 2, eQMIVoiceNetworkMode_CDMA = 3, eQMIVoiceNetworkMode_LTE = 4, eQMIVoiceNetworkMode_TDSCDMA = 5, }; // Enum to describe QMI Voice Number Plans enum eQMIVoiceNumberPlans:UINT8 { eQMIVoiceNumberPlans_Unknown = 0, eQMIVoiceNumberPlans_ISDN = 1, eQMIVoiceNumberPlans_Data = 3, eQMIVoiceNumberPlans_Telex = 4, eQMIVoiceNumberPlans_National = 8, eQMIVoiceNumberPlans_Private = 9, eQMIVoiceNumberPlans_ReservedCTS = 11, eQMIVoiceNumberPlans_ReservedExtension = 15, }; // Enum to describe QMI Voice Number Types enum eQMIVoiceNumberTypes:UINT8 { eQMIVoiceNumberTypes_Unknown = 0, eQMIVoiceNumberTypes_International = 1, eQMIVoiceNumberTypes_National = 2, eQMIVoiceNumberTypes_NetworkSpecific = 3, eQMIVoiceNumberTypes_Subscriber = 4, eQMIVoiceNumberTypes_Reserved = 5, eQMIVoiceNumberTypes_Abbreviated = 6, eQMIVoiceNumberTypes_ReservedExtension = 7, }; // Enum to describe QMI Voice OTASP Stati enum eQMIVoiceOTASPStati:UINT8 { eQMIVoiceOTASPStati_Unlocked = 0, eQMIVoiceOTASPStati_RetriesExceeded = 1, eQMIVoiceOTASPStati_AKeyExchanged = 2, eQMIVoiceOTASPStati_SSDUpdated = 3, eQMIVoiceOTASPStati_NAMDownloaded = 4, eQMIVoiceOTASPStati_MDNDownloaded = 5, eQMIVoiceOTASPStati_IMSIDownloaded = 6, eQMIVoiceOTASPStati_PRLDownloaded = 7, eQMIVoiceOTASPStati_Committed = 8, eQMIVoiceOTASPStati_OTAPAStarted = 9, eQMIVoiceOTASPStati_OTAPAStopped = 10, eQMIVoiceOTASPStati_OTAPAAborted = 11, eQMIVoiceOTASPStati_OTAPACommitted = 12, }; // Enum to describe QMI Voice Presentation Indicators enum eQMIVoicePresentationIndicators:UINT8 { eQMIVoicePresentationIndicators_Allowed = 0, eQMIVoicePresentationIndicators_Restricted = 1, eQMIVoicePresentationIndicators_Unavailable = 2, eQMIVoicePresentationIndicators_NameRestricted = 3, eQMIVoicePresentationIndicators_PayPhone = 4, }; // Enum to describe QMI Voice Presentation Indicators 32-Bit enum eQMIVoicePresentationIndicators32Bit:UINT32 { eQMIVoicePresentationIndicators32Bit_Allowed = 0, eQMIVoicePresentationIndicators32Bit_Restricted = 1, }; // Enum to describe QMI Voice Privacy Levels enum eQMIVoicePrivacyLevels:UINT8 { eQMIVoicePrivacyLevels_Standard = 0, eQMIVoicePrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Provisioning States enum eQMIVoiceProvisioningStates:UINT8 { eQMIVoiceProvisioningStates_NotProvisioned = 0, eQMIVoiceProvisioningStates_ProvisionedPermanent = 1, eQMIVoiceProvisioningStates_PresentationRestricted = 2, eQMIVoiceProvisioningStates_PresentationAllowed = 3, }; // Enum to describe QMI Voice Pulse Widths enum eQMIVoicePulseWidths:UINT8 { eQMIVoicePulseWidths_95ms = 0, eQMIVoicePulseWidths_150ms = 1, eQMIVoicePulseWidths_200ms = 2, eQMIVoicePulseWidths_250ms = 3, eQMIVoicePulseWidths_300ms = 4, eQMIVoicePulseWidths_350ms = 5, eQMIVoicePulseWidths_SMSTXSpecial = 6, }; // Enum to describe QMI Voice Screening Indicators enum eQMIVoiceScreeningIndicators:UINT8 { eQMIVoiceScreeningIndicators_UserNotScreened = 0, eQMIVoiceScreeningIndicators_UserPassedVerification = 1, eQMIVoiceScreeningIndicators_UserFailedVerification = 2, eQMIVoiceScreeningIndicators_ProvidedNetwork = 3, }; // Enum to describe QMI Voice Service Options enum eQMIVoiceServiceOptions:UINT16 { eQMIVoiceServiceOptions_Any = 0, eQMIVoiceServiceOptions_IS96A = 1, eQMIVoiceServiceOptions_EVRC = 3, eQMIVoiceServiceOptions_IS73313K = 17, eQMIVoiceServiceOptions_SelectableModeVocoder = 56, eQMIVoiceServiceOptions_4GVNarrowBand = 68, eQMIVoiceServiceOptions_4GVWideBand = 70, eQMIVoiceServiceOptions_13K = 32768, eQMIVoiceServiceOptions_IS96 = 32769, eQMIVoiceServiceOptions_WVRC = 32803, }; // Enum to describe QMI Voice Service Types enum eQMIVoiceServiceTypes:UINT32 { eQMIVoiceServiceTypes_Automatic = 1, eQMIVoiceServiceTypes_GSM = 2, eQMIVoiceServiceTypes_WCDMA = 3, eQMIVoiceServiceTypes_CDMAAutomatic = 4, eQMIVoiceServiceTypes_GSMOrWCDMA = 5, eQMIVoiceServiceTypes_LTE = 6, eQMIVoiceServiceTypes_TDSCDMA = 7, eQMIVoiceServiceTypes_GSMOrWCDMAOrTDSCDMA = 8, eQMIVoiceServiceTypes_CSOnly = 9, }; // Enum to describe QMI Voice Speech Codec Type enum eQMIVoiceSpeechCodecType:UINT32 { eQMIVoiceSpeechCodecType_None = 0, eQMIVoiceSpeechCodecType_QCELP13K = 1, eQMIVoiceSpeechCodecType_EVRC = 2, eQMIVoiceSpeechCodecType_EVRCB = 3, eQMIVoiceSpeechCodecType_EVRCWideband = 4, eQMIVoiceSpeechCodecType_EVRCNarrowbandWideband = 5, eQMIVoiceSpeechCodecType_AMRNarrowband = 6, eQMIVoiceSpeechCodecType_AMRWideband = 7, eQMIVoiceSpeechCodecType_GSMEnhancedFullRate = 8, eQMIVoiceSpeechCodecType_GSMFullRate = 9, eQMIVoiceSpeechCodecType_GSMHalfRate = 10, }; // Enum to describe QMI Voice Subaddress Types enum eQMIVoiceSubaddressTypes:UINT8 { eQMIVoiceSubaddressTypes_NSAP = 0, eQMIVoiceSubaddressTypes_User = 1, }; // Enum to describe QMI Voice Subscription Types enum eQMIVoiceSubscriptionTypes:UINT8 { eQMIVoiceSubscriptionTypes_Primary = 0, eQMIVoiceSubscriptionTypes_Secondary = 1, eQMIVoiceSubscriptionTypes_Tertiary = 2, }; // Enum to describe QMI Voice Supplementary Notification Types enum eQMIVoiceSupplementaryNotificationTypes:UINT8 { eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsForwarded = 1, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsWaiting = 2, eQMIVoiceSupplementaryNotificationTypes_OutgoingCUGCall = 3, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallsBarred = 4, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsDeflected = 5, eQMIVoiceSupplementaryNotificationTypes_IncomingCUGCall = 6, eQMIVoiceSupplementaryNotificationTypes_IncomingCallsBarred = 7, eQMIVoiceSupplementaryNotificationTypes_IncomingForwardedCall = 8, eQMIVoiceSupplementaryNotificationTypes_IncomingDeflectedCall = 9, eQMIVoiceSupplementaryNotificationTypes_IncomingCallIsForwarded = 10, eQMIVoiceSupplementaryNotificationTypes_UnconditionalCallForwardingActive = 11, eQMIVoiceSupplementaryNotificationTypes_ConditionalCallForwardingActive = 12, eQMIVoiceSupplementaryNotificationTypes_CLIRSuppressionRejected = 13, eQMIVoiceSupplementaryNotificationTypes_CallIsOnHold = 14, eQMIVoiceSupplementaryNotificationTypes_CallIsRetrieved = 15, eQMIVoiceSupplementaryNotificationTypes_CallIsInConference = 16, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsAlerting = 17, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsActive = 18, }; // Enum to describe QMI Voice Supplementary Service Call Types enum eQMIVoiceSupplementaryServiceCallTypes:UINT8 { eQMIVoiceSupplementaryServiceCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceSupplementaryServiceCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceSupplementaryServiceCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceSupplementaryServiceCallTypes_HoldAllExceptSpecifiedCall = 4, eQMIVoiceSupplementaryServiceCallTypes_MakeConferenceCall = 5, eQMIVoiceSupplementaryServiceCallTypes_ExplicitCallTransfer = 6, eQMIVoiceSupplementaryServiceCallTypes_CCBSActivation = 7, eQMIVoiceSupplementaryServiceCallTypes_EndAllCalls = 8, eQMIVoiceSupplementaryServiceCallTypes_ReleaseSpecifiedCall = 9, eQMIVoiceSupplementaryServiceCallTypes_AllActiveCallsOnLocalHold = 10, eQMIVoiceSupplementaryServiceCallTypes_RetrieveLocallyHeldCalls = 11, }; // Enum to describe QMI Voice Supplementary Service Codes enum eQMIVoiceSupplementaryServiceCodes:UINT32 { eQMIVoiceSupplementaryServiceCodes_ForwardUnconditional = 1, eQMIVoiceSupplementaryServiceCodes_ForwardMobileBusy = 2, eQMIVoiceSupplementaryServiceCodes_ForwardNoReply = 3, eQMIVoiceSupplementaryServiceCodes_ForwardUnreachable = 4, eQMIVoiceSupplementaryServiceCodes_ForwardAllForwarding = 5, eQMIVoiceSupplementaryServiceCodes_ForwardAllConditional = 6, }; // Enum to describe QMI Voice Supplementary Service Reasons enum eQMIVoiceSupplementaryServiceReasons:UINT8 { eQMIVoiceSupplementaryServiceReasons_ForwardUnconditional = 1, eQMIVoiceSupplementaryServiceReasons_ForwardMobileBusy = 2, eQMIVoiceSupplementaryServiceReasons_ForwardNoReply = 3, eQMIVoiceSupplementaryServiceReasons_ForwardUnreachable = 4, eQMIVoiceSupplementaryServiceReasons_ForwardAllForwarding = 5, eQMIVoiceSupplementaryServiceReasons_ForwardAllConditional = 6, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoing = 7, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingInt = 8, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingIntExtToHome = 9, eQMIVoiceSupplementaryServiceReasons_BarrAllIncoming = 10, eQMIVoiceSupplementaryServiceReasons_BarrIncomingRoaming = 11, eQMIVoiceSupplementaryServiceReasons_BarrAllBarring = 12, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoingBarring = 13, eQMIVoiceSupplementaryServiceReasons_BarrAllIncomingBarring = 14, eQMIVoiceSupplementaryServiceReasons_CallWaiting = 15, eQMIVoiceSupplementaryServiceReasons_CLIR = 16, eQMIVoiceSupplementaryServiceReasons_CLIP = 17, }; // Enum to describe QMI Voice Supplementary Service Requests enum eQMIVoiceSupplementaryServiceRequests:UINT8 { eQMIVoiceSupplementaryServiceRequests_Activate = 1, eQMIVoiceSupplementaryServiceRequests_Deactivate = 2, eQMIVoiceSupplementaryServiceRequests_Register = 3, eQMIVoiceSupplementaryServiceRequests_Erase = 4, eQMIVoiceSupplementaryServiceRequests_Interrogate = 5, eQMIVoiceSupplementaryServiceRequests_RegisterPassword = 6, eQMIVoiceSupplementaryServiceRequests_USSD = 7, }; // Enum to describe QMI Voice Supplementary Service Types enum eQMIVoiceSupplementaryServiceTypes:UINT8 { eQMIVoiceSupplementaryServiceTypes_Activate = 0, eQMIVoiceSupplementaryServiceTypes_Deactivate = 1, eQMIVoiceSupplementaryServiceTypes_Register = 2, eQMIVoiceSupplementaryServiceTypes_Erase = 3, }; // Enum to describe QMI Voice Switch Value enum eQMIVoiceSwitchValue:UINT8 { eQMIVoiceSwitchValue_NotAllowed = 0, eQMIVoiceSwitchValue_Allowed = 1, }; // Enum to describe QMI Voice TTY Modes enum eQMIVoiceTTYModes:UINT8 { eQMIVoiceTTYModes_Full = 0, eQMIVoiceTTYModes_VoiceCarryOver = 1, eQMIVoiceTTYModes_HearingCarryOver = 2, eQMIVoiceTTYModes_Off = 3, }; // Enum to describe QMI Voice USSD Alpha Coding Schemes enum eQMIVoiceUSSDAlphaCodingSchemes:UINT8 { eQMIVoiceUSSDAlphaCodingSchemes_GSM = 1, eQMIVoiceUSSDAlphaCodingSchemes_UCS2 = 2, }; // Enum to describe QMI Voice USSD Data Coding Schemes enum eQMIVoiceUSSDDataCodingSchemes:UINT8 { eQMIVoiceUSSDDataCodingSchemes_ASCII = 1, eQMIVoiceUSSDDataCodingSchemes_8Bit = 2, eQMIVoiceUSSDDataCodingSchemes_UCS2 = 3, }; // Enum to describe QMI Voice USSD Notifcation Types enum eQMIVoiceUSSDNotifcationTypes:UINT8 { eQMIVoiceUSSDNotifcationTypes_NoActionRequired = 1, eQMIVoiceUSSDNotifcationTypes_ActionIsRequired = 2, }; // Enum to describe QMI Voice UUS Data Coding Schemes enum eQMIVoiceUUSDataCodingSchemes:UINT8 { eQMIVoiceUUSDataCodingSchemes_USP = 1, eQMIVoiceUUSDataCodingSchemes_OHLP = 2, eQMIVoiceUUSDataCodingSchemes_X244 = 3, eQMIVoiceUUSDataCodingSchemes_SMCF = 4, eQMIVoiceUUSDataCodingSchemes_IA5 = 5, eQMIVoiceUUSDataCodingSchemes_RV12RD = 6, eQMIVoiceUUSDataCodingSchemes_Q931UNCCM = 7, }; // Enum to describe QMI Voice UUS Types enum eQMIVoiceUUSTypes:UINT8 { eQMIVoiceUUSTypes_Data = 0, eQMIVoiceUUSTypes_Type1Implicit = 1, eQMIVoiceUUSTypes_Type1Required = 2, eQMIVoiceUUSTypes_Type1NotRequired = 3, eQMIVoiceUUSTypes_Type2Required = 4, eQMIVoiceUUSTypes_Type2NotRequired = 5, eQMIVoiceUUSTypes_Type3Required = 6, eQMIVoiceUUSTypes_Type3NotRequired = 7, }; // Enum to describe QMI Voice Videoshare Variants enum eQMIVoiceVideoshareVariants:UINT32 { eQMIVoiceVideoshareVariants_RCSe = 0, eQMIVoiceVideoshareVariants_RCSv5 = 1, }; // Enum to describe QMI Voice VoIP SUPS Call Types enum eQMIVoiceVoIPSUPSCallTypes:UINT8 { eQMIVoiceVoIPSUPSCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceVoIPSUPSCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceVoIPSUPSCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceVoIPSUPSCallTypes_MakeConferenceCall = 4, eQMIVoiceVoIPSUPSCallTypes_EndAllExistingCalls = 5, eQMIVoiceVoIPSUPSCallTypes_UpgradeDowngradeExistingVTIP = 6, eQMIVoiceVoIPSUPSCallTypes_AcceptCallUpgradeExistingIP = 7, eQMIVoiceVoIPSUPSCallTypes_RejectCallUpgradeExistingIP = 8, eQMIVoiceVoIPSUPSCallTypes_ReleasePartyFromConference = 9, }; // Enum to describe QMI WDA Data Aggregation Protocols enum eQMIWDADataAggregationProtocols:UINT32 { eQMIWDADataAggregationProtocols_TLP = 1, eQMIWDADataAggregationProtocols_NCM = 2, eQMIWDADataAggregationProtocols_MBIM = 3, eQMIWDADataAggregationProtocols_RNDIS = 4, eQMIWDADataAggregationProtocols_QMAP = 5, }; // Enum to describe QMI WDA Link Protocols enum eQMIWDALinkProtocols:UINT32 { eQMIWDALinkProtocols_Ethernet = 1, eQMIWDALinkProtocols_IP = 2, }; // Enum to describe QMI WDS 3GPP Call End Reasons enum eQMIWDS3GPPCallEndReasons:UINT16 { eQMIWDS3GPPCallEndReasons_OperatorDeterminedBarring = 8, eQMIWDS3GPPCallEndReasons_LLCSNDCPFailure = 25, eQMIWDS3GPPCallEndReasons_InsufficientResources = 26, eQMIWDS3GPPCallEndReasons_UnknownAPN = 27, eQMIWDS3GPPCallEndReasons_UnknownPDP = 28, eQMIWDS3GPPCallEndReasons_AuthenticationFailed = 29, eQMIWDS3GPPCallEndReasons_GGSNReject = 30, eQMIWDS3GPPCallEndReasons_ActivationReject = 31, eQMIWDS3GPPCallEndReasons_OptionNotSupported = 32, eQMIWDS3GPPCallEndReasons_OptionUnsubscribed = 33, eQMIWDS3GPPCallEndReasons_OptionTemporarilyOOO = 34, eQMIWDS3GPPCallEndReasons_NSAPIAlreadyUsed = 35, eQMIWDS3GPPCallEndReasons_RegularDeactivation = 36, eQMIWDS3GPPCallEndReasons_QoSNotAccepted = 37, eQMIWDS3GPPCallEndReasons_NetworkFailure = 38, eQMIWDS3GPPCallEndReasons_UMTSReactivationRequest = 39, eQMIWDS3GPPCallEndReasons_FeatureNotSupported = 40, eQMIWDS3GPPCallEndReasons_TFTSemanticError = 41, eQMIWDS3GPPCallEndReasons_TFTSyntaxError = 42, eQMIWDS3GPPCallEndReasons_UnknownPDPContext = 43, eQMIWDS3GPPCallEndReasons_FilterSemanticError = 44, eQMIWDS3GPPCallEndReasons_FilterSyntaxError = 45, eQMIWDS3GPPCallEndReasons_PDPWithoutActiveTFT = 46, eQMIWDS3GPPCallEndReasons_IPv4OnlyAllowed = 50, eQMIWDS3GPPCallEndReasons_IPv6OnlyAllowed = 51, eQMIWDS3GPPCallEndReasons_SingleAddressBearerOnly = 52, eQMIWDS3GPPCallEndReasons_ESMInfoNotReceived = 53, eQMIWDS3GPPCallEndReasons_NoPDNConnection = 54, eQMIWDS3GPPCallEndReasons_MultipleConnectionsNotAllowed = 55, eQMIWDS3GPPCallEndReasons_InvalidTransactionID = 81, eQMIWDS3GPPCallEndReasons_MessageIncorrectSemantic = 95, eQMIWDS3GPPCallEndReasons_InvalidMandatoryID = 96, eQMIWDS3GPPCallEndReasons_MessageTypeUnsupported = 97, eQMIWDS3GPPCallEndReasons_MessageTypeNoncompatibleState = 98, eQMIWDS3GPPCallEndReasons_UnknownInfoElement = 99, eQMIWDS3GPPCallEndReasons_ConditionalInfoElementError = 100, eQMIWDS3GPPCallEndReasons_MessageAndProtocolStateUncompatible = 101, eQMIWDS3GPPCallEndReasons_ProtocolError = 111, eQMIWDS3GPPCallEndReasons_APNTypeConflict = 112, }; // Enum to describe QMI WDS 3GPP2 RAT Types enum eQMIWDS3GPP2RATTypes:UINT8 { eQMIWDS3GPP2RATTypes_HRPD = 1, eQMIWDS3GPP2RATTypes_EHRPD = 2, eQMIWDS3GPP2RATTypes_HRPDEHRPD = 3, }; // Enum to describe QMI WDS Address Allocation Preference enum eQMIWDSAddressAllocationPreference:UINT8 { eQMIWDSAddressAllocationPreference_NASSignaling = 0, eQMIWDSAddressAllocationPreference_DHCP = 1, }; // Enum to describe QMI WDS Address Families enum eQMIWDSAddressFamilies:UINT32 { eQMIWDSAddressFamilies_Unknown = 0, eQMIWDSAddressFamilies_IPv4 = 4, eQMIWDSAddressFamilies_IPv6 = 6, }; // Enum to describe QMI WDS Application Type enum eQMIWDSApplicationType:UINT32 { eQMIWDSApplicationType_DefaultApplicationType = 0, eQMIWDSApplicationType_LBSApplicationType = 32, eQMIWDSApplicationType_TetheredApplicationType = 64, }; // Enum to describe QMI WDS Authentication Protocol enum eQMIWDSAuthenticationProtocol:UINT8 { eQMIWDSAuthenticationProtocol_None = 0, eQMIWDSAuthenticationProtocol_PAP = 1, eQMIWDSAuthenticationProtocol_CHAP = 2, eQMIWDSAuthenticationProtocol_PAPOrCHAP = 3, }; // Enum to describe QMI WDS Autoconnect Roam Settings enum eQMIWDSAutoconnectRoamSettings:UINT8 { eQMIWDSAutoconnectRoamSettings_Always = 0, eQMIWDSAutoconnectRoamSettings_HomeOnly = 1, }; // Enum to describe QMI WDS Autoconnect Settings enum eQMIWDSAutoconnectSettings:UINT8 { eQMIWDSAutoconnectSettings_Disabled = 0, eQMIWDSAutoconnectSettings_Enabled = 1, eQMIWDSAutoconnectSettings_Paused = 2, }; // Enum to describe QMI WDS CDMA Networks enum eQMIWDSCDMANetworks:UINT8 { eQMIWDSCDMANetworks_NoService = 0, eQMIWDSCDMANetworks_CDMA = 2, eQMIWDSCDMANetworks_CDMA1xEVDO = 4, }; // Enum to describe QMI WDS CDMA Service Options enum eQMIWDSCDMAServiceOptions:UINT16 { eQMIWDSCDMAServiceOptions_IS657 = 7, eQMIWDSCDMAServiceOptions_IS657OverRateSet2 = 15, eQMIWDSCDMAServiceOptions_IS707AWithRateSet1 = 22, eQMIWDSCDMAServiceOptions_IS707AWithRateSet2 = 25, eQMIWDSCDMAServiceOptions_CDMA2000PacketService = 33, eQMIWDSCDMAServiceOptions_IS707 = 4103, eQMIWDSCDMAServiceOptions_QCProprietaryRateSet2 = 32800, eQMIWDSCDMAServiceOptions_NullServiceOption = 65535, }; // Enum to describe QMI WDS Call End Reason Types enum eQMIWDSCallEndReasonTypes:UINT16 { eQMIWDSCallEndReasonTypes_Unspecified = 0, eQMIWDSCallEndReasonTypes_MobileIP = 1, eQMIWDSCallEndReasonTypes_Internal = 2, eQMIWDSCallEndReasonTypes_CallManagerDefined = 3, eQMIWDSCallEndReasonTypes_3GPPSpecificationDefined = 6, eQMIWDSCallEndReasonTypes_PPP = 7, eQMIWDSCallEndReasonTypes_EHRPD = 8, eQMIWDSCallEndReasonTypes_IPv6 = 9, }; // Enum to describe QMI WDS Call Manager Call End Reasons enum eQMIWDSCallManagerCallEndReasons:UINT16 { eQMIWDSCallManagerCallEndReasons_CDMALock = 500, eQMIWDSCallManagerCallEndReasons_Intercept = 501, eQMIWDSCallManagerCallEndReasons_Reorder = 502, eQMIWDSCallManagerCallEndReasons_ReleaseServiceOptionReject = 503, eQMIWDSCallManagerCallEndReasons_IncomingCall = 504, eQMIWDSCallManagerCallEndReasons_AlertStop = 505, eQMIWDSCallManagerCallEndReasons_Activation = 506, eQMIWDSCallManagerCallEndReasons_MaxAccessProbe = 507, eQMIWDSCallManagerCallEndReasons_CCSNotSupportedByBS = 508, eQMIWDSCallManagerCallEndReasons_NoResponseFromBS = 509, eQMIWDSCallManagerCallEndReasons_RejectedByBS = 510, eQMIWDSCallManagerCallEndReasons_Incompatible = 511, eQMIWDSCallManagerCallEndReasons_AlreadyInTC = 512, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringGPS = 513, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringSMS = 514, eQMIWDSCallManagerCallEndReasons_NoCDMAService = 515, eQMIWDSCallManagerCallEndReasons_RetryOrder = 519, eQMIWDSCallManagerCallEndReasons_AccessBlock = 520, eQMIWDSCallManagerCallEndReasons_AccessBlockAll = 521, eQMIWDSCallManagerCallEndReasons_IS707BMaxAccess = 522, eQMIWDSCallManagerCallEndReasons_ThermalEmergency = 523, eQMIWDSCallManagerCallEndReasons_CallOriginationThrottled = 524, eQMIWDSCallManagerCallEndReasons_ConfFailed = 1000, eQMIWDSCallManagerCallEndReasons_IncomingRejected = 1001, eQMIWDSCallManagerCallEndReasons_NoGWService = 1002, eQMIWDSCallManagerCallEndReasons_NoGPRSContext = 1003, eQMIWDSCallManagerCallEndReasons_IllegalMS = 1004, eQMIWDSCallManagerCallEndReasons_IllegalME = 1005, eQMIWDSCallManagerCallEndReasons_GPRSServicesAndNonGPRSServiceNotAllowed = 1006, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowed = 1007, eQMIWDSCallManagerCallEndReasons_MSIdentityCannotBeDerivedByTheNetwork = 1008, eQMIWDSCallManagerCallEndReasons_ImplicitlyDetached = 1009, eQMIWDSCallManagerCallEndReasons_PLMNNotAllowed = 1010, eQMIWDSCallManagerCallEndReasons_LANotAllowed = 1011, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowedInThisPLMN = 1012, eQMIWDSCallManagerCallEndReasons_PDPDuplicate = 1013, eQMIWDSCallManagerCallEndReasons_UERATChange = 1014, eQMIWDSCallManagerCallEndReasons_Congestion = 1015, eQMIWDSCallManagerCallEndReasons_NoPDPContextActivated = 1016, eQMIWDSCallManagerCallEndReasons_AccessClassDSACRejection = 1017, eQMIWDSCallManagerCallEndReasons_CDGenOrBusy = 1500, eQMIWDSCallManagerCallEndReasons_CDBillOrAuth = 1501, eQMIWDSCallManagerCallEndReasons_ChangeHDR = 1502, eQMIWDSCallManagerCallEndReasons_ExitHDR = 1503, eQMIWDSCallManagerCallEndReasons_HDRNoSession = 1504, eQMIWDSCallManagerCallEndReasons_HDROrigDuringGPSFix = 1505, eQMIWDSCallManagerCallEndReasons_HDRCSTimeout = 1506, eQMIWDSCallManagerCallEndReasons_HDRReleasedByCM = 1507, eQMIWDSCallManagerCallEndReasons_NoHybridHDRService = 1510, eQMIWDSCallManagerCallEndReasons_ClientEnd = 2000, eQMIWDSCallManagerCallEndReasons_NoService = 2001, eQMIWDSCallManagerCallEndReasons_Fade = 2002, eQMIWDSCallManagerCallEndReasons_NormalRelease = 2003, eQMIWDSCallManagerCallEndReasons_AccessInProgress = 2004, eQMIWDSCallManagerCallEndReasons_AccessFail = 2005, eQMIWDSCallManagerCallEndReasons_RedirectOrHandoff = 2006, eQMIWDSCallManagerCallEndReasons_Offline = 2500, eQMIWDSCallManagerCallEndReasons_EmergencyMode = 2501, eQMIWDSCallManagerCallEndReasons_PhoneInUse = 2502, eQMIWDSCallManagerCallEndReasons_InvalidMode = 2503, eQMIWDSCallManagerCallEndReasons_InvalidSIMState = 2504, eQMIWDSCallManagerCallEndReasons_NoCollocHDR = 2505, eQMIWDSCallManagerCallEndReasons_CallControlRejected = 2506, }; // Enum to describe QMI WDS Call Types enum eQMIWDSCallTypes:UINT8 { eQMIWDSCallTypes_Laptop = 0, eQMIWDSCallTypes_Embedded = 1, }; // Enum to describe QMI WDS DUN Control Events enum eQMIWDSDUNControlEvents:UINT8 { eQMIWDSDUNControlEvents_DUNCall = 1, eQMIWDSDUNControlEvents_Entitlement = 2, eQMIWDSDUNControlEvents_SilentRedial = 3, }; // Enum to describe QMI WDS DUN Control Preferences enum eQMIWDSDUNControlPreferences:UINT8 { eQMIWDSDUNControlPreferences_RelinquishDUNControl = 0, eQMIWDSDUNControlPreferences_ExerciseDUNConrol = 1, }; // Enum to describe QMI WDS Data Bearer Technologies enum eQMIWDSDataBearerTechnologies:UINT32 { eQMIWDSDataBearerTechnologies_3GPP = 0, eQMIWDSDataBearerTechnologies_3GPP2 = 1, }; // Enum to describe QMI WDS Data Call Status enum eQMIWDSDataCallStatus:UINT8 { eQMIWDSDataCallStatus_Unknown = 0, eQMIWDSDataCallStatus_Activated = 1, eQMIWDSDataCallStatus_Terminated = 2, }; // Enum to describe QMI WDS Data Call Types enum eQMIWDSDataCallTypes:UINT8 { eQMIWDSDataCallTypes_Unknown = 0, eQMIWDSDataCallTypes_Embedded = 1, eQMIWDSDataCallTypes_Tethered = 2, eQMIWDSDataCallTypes_ModemEmbedded = 3, }; // Enum to describe QMI WDS Data Mode enum eQMIWDSDataMode:UINT8 { eQMIWDSDataMode_CDMAOrHDR = 0, eQMIWDSDataMode_CDMAOnly = 1, eQMIWDSDataMode_HDROnly = 2, }; // Enum to describe QMI WDS Data Rate enum eQMIWDSDataRate:UINT8 { eQMIWDSDataRate_LowSO15Only = 0, eQMIWDSDataRate_MediumSO33PlusLowRSCH = 1, eQMIWDSDataRate_HighSO33PlusHighRSCH = 2, }; // Enum to describe QMI WDS Data System Network Types enum eQMIWDSDataSystemNetworkTypes:UINT8 { eQMIWDSDataSystemNetworkTypes_3GPP = 0, eQMIWDSDataSystemNetworkTypes_3GPP2 = 1, }; // Enum to describe QMI WDS Data Systems enum eQMIWDSDataSystems:UINT32 { eQMIWDSDataSystems_Unknown = 0, eQMIWDSDataSystems_CDMA1x = 1, eQMIWDSDataSystems_CDMA1xEVDO = 2, eQMIWDSDataSystems_GPRS = 3, eQMIWDSDataSystems_WCDMA = 4, eQMIWDSDataSystems_LTE = 5, eQMIWDSDataSystems_TDSCDMA = 6, }; // Enum to describe QMI WDS EHRPD Call End Reason enum eQMIWDSEHRPDCallEndReason:UINT16 { eQMIWDSEHRPDCallEndReason_SubsLimitedToV4 = 1, eQMIWDSEHRPDCallEndReason_SubsLimitedToV6 = 2, eQMIWDSEHRPDCallEndReason_VSNCPTimeout = 4, eQMIWDSEHRPDCallEndReason_VSNCPFailure = 5, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IGeneralError = 6, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IUnauthAPN = 7, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNLimit = 8, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2INoPDNGW = 9, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWUnreach = 10, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWRejected = 11, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IInsufficientParam = 12, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IResourceUnavailable = 13, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IAdminProhibited = 14, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNIDInUse = 15, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2ISubscriberLimitation = 16, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNExistsForAPN = 17, }; // Enum to describe QMI WDS EMBMS Error Codes enum eQMIWDSEMBMSErrorCodes:UINT16 { eQMIWDSEMBMSErrorCodes_NotSupported = 108, eQMIWDSEMBMSErrorCodes_ActivationInProgress = 111, eQMIWDSEMBMSErrorCodes_Invalid = 124, eQMIWDSEMBMSErrorCodes_DeactivationInProgress = 203, }; // Enum to describe QMI WDS EMBMS List Types enum eQMIWDSEMBMSListTypes:UINT8 { eQMIWDSEMBMSListTypes_Active = 0, eQMIWDSEMBMSListTypes_Available = 1, eQMIWDSEMBMSListTypes_OOSWarning = 2, }; // Enum to describe QMI WDS EMBMS Operation Status enum eQMIWDSEMBMSOperationStatus:UINT32 { eQMIWDSEMBMSOperationStatus_Success = 0, eQMIWDSEMBMSOperationStatus_RadioConfigFailure = 65536, eQMIWDSEMBMSOperationStatus_ChannelUnavailable = 65537, eQMIWDSEMBMSOperationStatus_EMBMBSNotEnabled = 65538, eQMIWDSEMBMSOperationStatus_OutOfCoverage = 65539, eQMIWDSEMBMSOperationStatus_Unknown = 65540, eQMIWDSEMBMSOperationStatus_NotAllowed = 65541, eQMIWDSEMBMSOperationStatus_MissingControlInfo = 65542, eQMIWDSEMBMSOperationStatus_MissingTMGI = 65543, eQMIWDSEMBMSOperationStatus_MulticastOOS = 65544, eQMIWDSEMBMSOperationStatus_UnicastOOS = 65545, eQMIWDSEMBMSOperationStatus_CampedOnOtherFrequency = 65546, }; // Enum to describe QMI WDS Extended Error Code enum eQMIWDSExtendedErrorCode:UINT16 { eQMIWDSExtendedErrorCode_Failure = 1, eQMIWDSExtendedErrorCode_InvalidHandle = 2, eQMIWDSExtendedErrorCode_InvalidOperation = 3, eQMIWDSExtendedErrorCode_InvalidProfileType = 4, eQMIWDSExtendedErrorCode_InvalidProfileNumber = 5, eQMIWDSExtendedErrorCode_InvalidIdentifier = 6, eQMIWDSExtendedErrorCode_InvalidArgument = 7, eQMIWDSExtendedErrorCode_NotInitialized = 8, eQMIWDSExtendedErrorCode_InvalidLength = 9, eQMIWDSExtendedErrorCode_ListEnd = 10, eQMIWDSExtendedErrorCode_InvalidSubscriptionID = 11, eQMIWDSExtendedErrorCode_InvalidProfileFamily = 12, eQMIWDSExtendedErrorCode_3GPPInvalidProfileFamily = 4097, eQMIWDSExtendedErrorCode_3GPPAccessError = 4098, eQMIWDSExtendedErrorCode_3GPPContextNotDefined = 4099, eQMIWDSExtendedErrorCode_3GPPValidFlagNotSet = 4100, eQMIWDSExtendedErrorCode_3GPPReadOnlyFlagSet = 4101, eQMIWDSExtendedErrorCode_3GPPErrorMaxProfileNumber = 4102, eQMIWDSExtendedErrorCode_3GPP2ErrorInvalidIdentifierForProfile = 4353, eQMIWDSExtendedErrorCode_3GPP2ErrorProfileLimitReached = 4354, }; // Enum to describe QMI WDS Extended Tech Prefs enum eQMIWDSExtendedTechPrefs:UINT16 { eQMIWDSExtendedTechPrefs_CDMA = 32769, eQMIWDSExtendedTechPrefs_UMTS = 32772, eQMIWDSExtendedTechPrefs_EPC = 34944, eQMIWDSExtendedTechPrefs_EMBMS = 34946, eQMIWDSExtendedTechPrefs_ModemLinkLocal = 34952, }; // Enum to describe QMI WDS Handoff Info Types enum eQMIWDSHandoffInfoTypes:UINT32 { eQMIWDSHandoffInfoTypes_Initialization = 0, eQMIWDSHandoffInfoTypes_Success = 1, eQMIWDSHandoffInfoTypes_Failure = 2, }; // Enum to describe QMI WDS IP Families enum eQMIWDSIPFamilies:UINT8 { eQMIWDSIPFamilies_IPv4 = 4, eQMIWDSIPFamilies_IPv6 = 6, eQMIWDSIPFamilies_Unspecified = 8, }; // Enum to describe QMI WDS IP Support Types enum eQMIWDSIPSupportTypes:UINT8 { eQMIWDSIPSupportTypes_IPv4 = 0, eQMIWDSIPSupportTypes_IPv6 = 1, eQMIWDSIPSupportTypes_IPv4AndIPv6 = 2, }; // Enum to describe QMI WDS IP Version enum eQMIWDSIPVersion:UINT8 { eQMIWDSIPVersion_IPv4 = 4, eQMIWDSIPVersion_IPv6 = 6, }; // Enum to describe QMI WDS IPSec Crypto Algorithms enum eQMIWDSIPSecCryptoAlgorithms:UINT32 { eQMIWDSIPSecCryptoAlgorithms_NullKeyExchange = 0, eQMIWDSIPSecCryptoAlgorithms_GenericModuloExponentiation = 1, eQMIWDSIPSecCryptoAlgorithms_DiffieHellmanKeyExchange = 2, eQMIWDSIPSecCryptoAlgorithms_RSAEncryptionKeyExchange = 3, eQMIWDSIPSecCryptoAlgorithms_NullHash = 4, eQMIWDSIPSecCryptoAlgorithms_SHA1 = 5, eQMIWDSIPSecCryptoAlgorithms_SHA256 = 6, eQMIWDSIPSecCryptoAlgorithms_MD5 = 7, eQMIWDSIPSecCryptoAlgorithms_NullCipher = 8, eQMIWDSIPSecCryptoAlgorithms_DES = 9, eQMIWDSIPSecCryptoAlgorithms_3DES = 10, eQMIWDSIPSecCryptoAlgorithms_ARC4 = 11, eQMIWDSIPSecCryptoAlgorithms_AES128 = 12, eQMIWDSIPSecCryptoAlgorithms_C2 = 13, eQMIWDSIPSecCryptoAlgorithms_AES128CMAC = 14, eQMIWDSIPSecCryptoAlgorithms_UEA2SNOW3G = 15, eQMIWDSIPSecCryptoAlgorithms_UIA2SNOW3G = 16, eQMIWDSIPSecCryptoAlgorithms_UEA3ZUC = 17, eQMIWDSIPSecCryptoAlgorithms_UIA3ZUC = 18, }; // Enum to describe QMI WDS IPSec SA Encapsulation Modes enum eQMIWDSIPSecSAEncapsulationModes:UINT32 { eQMIWDSIPSecSAEncapsulationModes_Undefined = 0, eQMIWDSIPSecSAEncapsulationModes_Tunnel = 1, eQMIWDSIPSecSAEncapsulationModes_Transport = 2, }; // Enum to describe QMI WDS IPSec SA Protocols enum eQMIWDSIPSecSAProtocols:UINT32 { eQMIWDSIPSecSAProtocols_Undefined = 0, eQMIWDSIPSecSAProtocols_ISAKMP = 1, eQMIWDSIPSecSAProtocols_AuthenticationHeader = 2, eQMIWDSIPSecSAProtocols_EncapsulatingSecurityPayload = 3, }; // Enum to describe QMI WDS IPv6 Call End Reason enum eQMIWDSIPv6CallEndReason:UINT16 { eQMIWDSIPv6CallEndReason_PrefixUnavailable = 1, eQMIWDSIPv6CallEndReason_IPv6HRPDDisabled = 2, }; // Enum to describe QMI WDS Internal Call End Reasons enum eQMIWDSInternalCallEndReasons:UINT16 { eQMIWDSInternalCallEndReasons_Internal = 201, eQMIWDSInternalCallEndReasons_CallEnded = 202, eQMIWDSInternalCallEndReasons_InternalUnknownCauseCode = 203, eQMIWDSInternalCallEndReasons_UnknownCauseCode = 204, eQMIWDSInternalCallEndReasons_CloseInProgress = 205, eQMIWDSInternalCallEndReasons_NWInitiatedTermination = 206, eQMIWDSInternalCallEndReasons_AppPreempted = 207, eQMIWDSInternalCallEndReasons_PDNIPv4CallDisallowed = 208, eQMIWDSInternalCallEndReasons_PDNIPv4CallThrottled = 209, eQMIWDSInternalCallEndReasons_PDNIPv6CallDisallowed = 210, eQMIWDSInternalCallEndReasons_ModemRestart = 212, eQMIWDSInternalCallEndReasons_PDPPPPNotSupported = 213, eQMIWDSInternalCallEndReasons_UnpreferredRAT = 214, eQMIWDSInternalCallEndReasons_PhysicalLinkCloseInProgress = 215, eQMIWDSInternalCallEndReasons_APNPendingHandover = 216, eQMIWDSInternalCallEndReasons_ProfileBearerIncompatible = 217, eQMIWDSInternalCallEndReasons_MMGDSICardEvent = 218, eQMIWDSInternalCallEndReasons_LPMOrPowerDown = 219, eQMIWDSInternalCallEndReasons_APNDisabled = 220, eQMIWDSInternalCallEndReasons_MPITExpired = 221, eQMIWDSInternalCallEndReasons_IPv6AddressTransferFailed = 222, eQMIWDSInternalCallEndReasons_TRATSwapFailed = 223, }; // Enum to describe QMI WDS LTE Attach Types enum eQMIWDSLTEAttachTypes:UINT32 { eQMIWDSLTEAttachTypes_Initial = 0, eQMIWDSLTEAttachTypes_Handoff = 1, }; // Enum to describe QMI WDS LTE IP Types enum eQMIWDSLTEIPTypes:UINT8 { eQMIWDSLTEIPTypes_IPv4 = 0, eQMIWDSLTEIPTypes_IPv6 = 1, eQMIWDSLTEIPTypes_IPv4OrIPv6 = 2, }; // Enum to describe QMI WDS Mobile IP Call End Reasons enum eQMIWDSMobileIPCallEndReasons:UINT16 { eQMIWDSMobileIPCallEndReasons_FAUnspecified = 64, eQMIWDSMobileIPCallEndReasons_FAAdministrativelyProhibited = 65, eQMIWDSMobileIPCallEndReasons_FAInsufficientResources = 66, eQMIWDSMobileIPCallEndReasons_FAMobileNodeAuthenticationFailure = 67, eQMIWDSMobileIPCallEndReasons_FAHAAuthenticationFailure = 68, eQMIWDSMobileIPCallEndReasons_FARequestedLifetimeTooLong = 69, eQMIWDSMobileIPCallEndReasons_FAMalformedRequest = 70, eQMIWDSMobileIPCallEndReasons_FAMalformedReply = 71, eQMIWDSMobileIPCallEndReasons_FAEncapsulationUnavailable = 72, eQMIWDSMobileIPCallEndReasons_FAVJHCUnavailable = 73, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelUnavailable = 74, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelIsMandatoryAndTBitIsNotSet = 75, eQMIWDSMobileIPCallEndReasons_FADeliveryStyleNotSupported = 79, eQMIWDSMobileIPCallEndReasons_FAMissingNAI = 97, eQMIWDSMobileIPCallEndReasons_FAMissingHA = 98, eQMIWDSMobileIPCallEndReasons_FAMissingHomeAddress = 99, eQMIWDSMobileIPCallEndReasons_FAUnknownChallenge = 104, eQMIWDSMobileIPCallEndReasons_FAMissingChallenge = 105, eQMIWDSMobileIPCallEndReasons_FAStaleChallenge = 106, eQMIWDSMobileIPCallEndReasons_HAReasonUnspecified = 128, eQMIWDSMobileIPCallEndReasons_HAAdministrativelyProhibited = 129, eQMIWDSMobileIPCallEndReasons_HAInsufficientResources = 130, eQMIWDSMobileIPCallEndReasons_HAMobileNodeAuthenticationFailure = 131, eQMIWDSMobileIPCallEndReasons_HAFAAuthenticationFailure = 132, eQMIWDSMobileIPCallEndReasons_HARegistrationIDMismatch = 133, eQMIWDSMobileIPCallEndReasons_HAMalformedRequest = 134, eQMIWDSMobileIPCallEndReasons_HAUnknownHAAddress = 136, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelUnavailable = 137, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelIsMandatoryAndTBitIsNotSet = 138, eQMIWDSMobileIPCallEndReasons_HAEncapsulationUnavailable = 139, eQMIWDSMobileIPCallEndReasons_Unknown = 65535, }; // Enum to describe QMI WDS Network Types enum eQMIWDSNetworkTypes:UINT8 { eQMIWDSNetworkTypes_Unknown = 0, eQMIWDSNetworkTypes_CDMA = 1, eQMIWDSNetworkTypes_UMTS = 2, }; // Enum to describe QMI WDS Next Header Protocols enum eQMIWDSNextHeaderProtocols:UINT32 { eQMIWDSNextHeaderProtocols_TCP = 1, eQMIWDSNextHeaderProtocols_UDP = 2, eQMIWDSNextHeaderProtocols_TCPUDP = 3, }; // Enum to describe QMI WDS OOS Warning Reasons enum eQMIWDSOOSWarningReasons:UINT32 { eQMIWDSOOSWarningReasons_UnicastOOS = 0, eQMIWDSOOSWarningReasons_MulticastOOS = 1, eQMIWDSOOSWarningReasons_Cleared = 2, }; // Enum to describe QMI WDS PDN Type enum eQMIWDSPDNType:UINT8 { eQMIWDSPDNType_IPv4PDNType = 0, eQMIWDSPDNType_IPv6PDNType = 1, eQMIWDSPDNType_IPv4orIPv6PDNType = 2, eQMIWDSPDNType_UnspecifiedPDNType = 3, }; // Enum to describe QMI WDS PDP Access Control Flag enum eQMIWDSPDPAccessControlFlag:UINT8 { eQMIWDSPDPAccessControlFlag_PDPAccessControlNone = 0, eQMIWDSPDPAccessControlFlag_PDPAccessControlReject = 1, eQMIWDSPDPAccessControlFlag_PDPAccessControlPermission = 2, }; // Enum to describe QMI WDS PDP Data Compression Type enum eQMIWDSPDPDataCompressionType:UINT8 { eQMIWDSPDPDataCompressionType_Off = 0, eQMIWDSPDPDataCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPDataCompressionType_V42BIS = 2, eQMIWDSPDPDataCompressionType_V44 = 3, }; // Enum to describe QMI WDS PDP Header Compression Type enum eQMIWDSPDPHeaderCompressionType:UINT8 { eQMIWDSPDPHeaderCompressionType_Off = 0, eQMIWDSPDPHeaderCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPHeaderCompressionType_RFC1144 = 2, eQMIWDSPDPHeaderCompressionType_RFC2507 = 3, eQMIWDSPDPHeaderCompressionType_RFC3095 = 4, }; // Enum to describe QMI WDS PPP Call End Reason enum eQMIWDSPPPCallEndReason:UINT16 { eQMIWDSPPPCallEndReason_Timeout = 1, eQMIWDSPPPCallEndReason_AuthenticationFailed = 2, eQMIWDSPPPCallEndReason_OptionMismatch = 3, eQMIWDSPPPCallEndReason_PAPFailure = 31, eQMIWDSPPPCallEndReason_CHAPFailure = 32, eQMIWDSPPPCallEndReason_Unknown = 65535, }; // Enum to describe QMI WDS Profile Family enum eQMIWDSProfileFamily:UINT8 { eQMIWDSProfileFamily_Embedded = 0, eQMIWDSProfileFamily_TetheredSocketsFamily = 1, }; // Enum to describe QMI WDS Profile Param ID enum eQMIWDSProfileParamID:UINT32 { eQMIWDSProfileParamID_UMTSRequestedQoS = 23, eQMIWDSProfileParamID_UMTSMinimumQoS = 24, eQMIWDSProfileParamID_GPRSRequestedQoS = 25, eQMIWDSProfileParamID_GPRSMinimumQoS = 26, eQMIWDSProfileParamID_TFTFilterID1 = 50, eQMIWDSProfileParamID_TFTFilterID2 = 51, }; // Enum to describe QMI WDS QoS Class Identifier enum eQMIWDSQoSClassIdentifier:UINT8 { eQMIWDSQoSClassIdentifier_NetworkAssignQCI = 0, eQMIWDSQoSClassIdentifier_GuaranteedBitrate1 = 1, eQMIWDSQoSClassIdentifier_GuaranteedBitrate2 = 2, eQMIWDSQoSClassIdentifier_GuaranteedBitrate3 = 3, eQMIWDSQoSClassIdentifier_GuaranteedBitrate4 = 4, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate5 = 5, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate6 = 6, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate7 = 7, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate8 = 8, }; // Enum to describe QMI WDS Radio Access Technologies enum eQMIWDSRadioAccessTechnologies:UINT32 { eQMIWDSRadioAccessTechnologies_NullBearer = 0, eQMIWDSRadioAccessTechnologies_3GPPWCDMA = 1, eQMIWDSRadioAccessTechnologies_3GPPGERAN = 2, eQMIWDSRadioAccessTechnologies_3GPPLTE = 3, eQMIWDSRadioAccessTechnologies_3GPPTDSCDMA = 4, eQMIWDSRadioAccessTechnologies_3GPPWLAN = 5, eQMIWDSRadioAccessTechnologies_3GPPMaximum = 100, eQMIWDSRadioAccessTechnologies_3GPP21x = 101, eQMIWDSRadioAccessTechnologies_3GPP2HRPD = 102, eQMIWDSRadioAccessTechnologies_3GPP2EHRPD = 103, eQMIWDSRadioAccessTechnologies_3GPP2WLAN = 104, eQMIWDSRadioAccessTechnologies_3GPP2Maximum = 200, }; // Enum to describe QMI WDS Reverse IP Connection Status enum eQMIWDSReverseIPConnectionStatus:UINT32 { eQMIWDSReverseIPConnectionStatus_Disconnected = 0, eQMIWDSReverseIPConnectionStatus_Connected = 1, }; // Enum to describe QMI WDS Reverse IP Technology Names enum eQMIWDSReverseIPTechnologyNames:UINT32 { eQMIWDSReverseIPTechnologyNames_WLANLocalBreakout = 32818, eQMIWDSReverseIPTechnologyNames_IWLANS2B = 32819, }; // Enum to describe QMI WDS Reverse IP Transport Filter Types enum eQMIWDSReverseIPTransportFilterTypes:UINT32 { eQMIWDSReverseIPTransportFilterTypes_ESPSPI = 0, }; // Enum to describe QMI WDS SIP/MIP Call Types enum eQMIWDSSIPMIPCallTypes:UINT8 { eQMIWDSSIPMIPCallTypes_NotUp = 0, eQMIWDSSIPMIPCallTypes_SIPUp = 1, eQMIWDSSIPMIPCallTypes_MIPUp = 2, }; // Enum to describe QMI WDS Slot Cycle Set Results enum eQMIWDSSlotCycleSetResults:UINT8 { eQMIWDSSlotCycleSetResults_Succcess = 0, eQMIWDSSlotCycleSetResults_FailureRequestRejected = 1, eQMIWDSSlotCycleSetResults_FailureRequestFailedTX = 2, eQMIWDSSlotCycleSetResults_FailureNotSupported = 3, eQMIWDSSlotCycleSetResults_FailureNoNetwork = 4, }; // Enum to describe QMI WDS Tethered Call Types enum eQMIWDSTetheredCallTypes:UINT8 { eQMIWDSTetheredCallTypes_NonTethered = 0, eQMIWDSTetheredCallTypes_RmNet = 1, eQMIWDSTetheredCallTypes_DUN = 2, }; // Enum to describe QMI WMS ACK Failure Cause enum eQMIWMSACKFailureCause:UINT8 { eQMIWMSACKFailureCause_NoNetworkResponse = 0, eQMIWMSACKFailureCause_NetworkReleasedLink = 1, eQMIWMSACKFailureCause_NotSent = 2, }; // Enum to describe QMI WMS CDMA Service Options enum eQMIWMSCDMAServiceOptions:UINT8 { eQMIWMSCDMAServiceOptions_Automatic = 0, eQMIWMSCDMAServiceOptions_SO6 = 6, eQMIWMSCDMAServiceOptions_SO14 = 14, }; // Enum to describe QMI WMS Call Control Types enum eQMIWMSCallControlTypes:UINT32 { eQMIWMSCallControlTypes_Disallow = 0, eQMIWMSCallControlTypes_Allow = 1, eQMIWMSCallControlTypes_AllowButModified = 2, }; // Enum to describe QMI WMS Cause Codes enum eQMIWMSCauseCodes:UINT16 { eQMIWMSCauseCodes_AddressVacant = 0, eQMIWMSCauseCodes_AddressTranslation = 1, eQMIWMSCauseCodes_NetworkResourceShortage = 2, eQMIWMSCauseCodes_NetworkFailure = 3, eQMIWMSCauseCodes_InvalidTeleserviceID = 4, eQMIWMSCauseCodes_NetworkOther = 5, eQMIWMSCauseCodes_NoPageResponse = 32, eQMIWMSCauseCodes_DestinationBusy = 33, eQMIWMSCauseCodes_DestinationNoACK = 34, eQMIWMSCauseCodes_DestinationResourceShortage = 35, eQMIWMSCauseCodes_DeliveryPostponed = 36, eQMIWMSCauseCodes_DestinationOutOfService = 37, eQMIWMSCauseCodes_DestinationNotAtAddress = 38, eQMIWMSCauseCodes_DestinationOther = 39, eQMIWMSCauseCodes_RadioResourceShortage = 64, eQMIWMSCauseCodes_RadioIncompatibility = 65, eQMIWMSCauseCodes_RadioOther = 66, eQMIWMSCauseCodes_Encoding = 96, eQMIWMSCauseCodes_SMSOriginationDenied = 97, eQMIWMSCauseCodes_SMSDestinationDenied = 98, eQMIWMSCauseCodes_SupplementarySErviceNotSupported = 99, eQMIWMSCauseCodes_SMSNotSupported = 100, eQMIWMSCauseCodes_MissingExpectedParameter = 101, eQMIWMSCauseCodes_MissingMandatoryParameter = 102, eQMIWMSCauseCodes_UnrecognizedParameterValue = 103, eQMIWMSCauseCodes_UnexpectedParameterValue = 104, eQMIWMSCauseCodes_UserDataSizeError = 105, eQMIWMSCauseCodes_GeneralOther = 106, }; // Enum to describe QMI WMS Delivery Failures enum eQMIWMSDeliveryFailures:UINT8 { eQMIWMSDeliveryFailures_BlockedByCallControl = 0, }; // Enum to describe QMI WMS Error Classes enum eQMIWMSErrorClasses:UINT8 { eQMIWMSErrorClasses_Temporary = 0, eQMIWMSErrorClasses_Permanent = 1, }; // Enum to describe QMI WMS Error Classes 2 enum eQMIWMSErrorClasses2:UINT8 { eQMIWMSErrorClasses2_Temporary = 2, eQMIWMSErrorClasses2_Permanent = 3, }; // Enum to describe QMI WMS GSM/WCDMA Domains enum eQMIWMSGSMWCDMADomains:UINT8 { eQMIWMSGSMWCDMADomains_CSPreferred = 0, eQMIWMSGSMWCDMADomains_PSPreferred = 1, eQMIWMSGSMWCDMADomains_CSOnly = 2, eQMIWMSGSMWCDMADomains_PSOnly = 3, }; // Enum to describe QMI WMS LTE Domains enum eQMIWMSLTEDomains:UINT8 { eQMIWMSLTEDomains_None = 0, eQMIWMSLTEDomains_IMS = 1, }; // Enum to describe QMI WMS Language enum eQMIWMSLanguage:UINT16 { eQMIWMSLanguage_Unknown = 0, eQMIWMSLanguage_English = 1, eQMIWMSLanguage_French = 2, eQMIWMSLanguage_Spanish = 3, eQMIWMSLanguage_Japanese = 4, eQMIWMSLanguage_Korean = 5, eQMIWMSLanguage_Chinese = 6, eQMIWMSLanguage_Hebrew = 7, }; // Enum to describe QMI WMS Message Classes enum eQMIWMSMessageClasses:UINT8 { eQMIWMSMessageClasses_Class0 = 0, eQMIWMSMessageClasses_Class1 = 1, eQMIWMSMessageClasses_Class2 = 2, eQMIWMSMessageClasses_Class3 = 3, eQMIWMSMessageClasses_ClassNone = 4, eQMIWMSMessageClasses_ClassCDMA = 5, }; // Enum to describe QMI WMS Message Delivery Failure Type enum eQMIWMSMessageDeliveryFailureType:UINT8 { eQMIWMSMessageDeliveryFailureType_Temporary = 0, eQMIWMSMessageDeliveryFailureType_Permanent = 1, }; // Enum to describe QMI WMS Message Formats enum eQMIWMSMessageFormats:UINT8 { eQMIWMSMessageFormats_CDMA = 0, eQMIWMSMessageFormats_AnalogCLIUnsupported = 1, eQMIWMSMessageFormats_AnalogVoiceMailUnsupported = 2, eQMIWMSMessageFormats_AnalogWMSUnsupported = 3, eQMIWMSMessageFormats_AnalogAWIWMSUnsupported = 4, eQMIWMSMessageFormats_MWIUnsupported = 5, eQMIWMSMessageFormats_GSMWCDMAPP = 6, eQMIWMSMessageFormats_GSMWCDMABC = 7, eQMIWMSMessageFormats_MWI = 8, }; // Enum to describe QMI WMS Message Protocols enum eQMIWMSMessageProtocols:UINT8 { eQMIWMSMessageProtocols_CDMA = 0, eQMIWMSMessageProtocols_GSMWCDMAUnsupported = 1, }; // Enum to describe QMI WMS Message Tags enum eQMIWMSMessageTags:UINT8 { eQMIWMSMessageTags_MTRead = 0, eQMIWMSMessageTags_MTNotRead = 1, eQMIWMSMessageTags_MOSend = 2, eQMIWMSMessageTags_MONotSent = 3, }; // Enum to describe QMI WMS Message Types enum eQMIWMSMessageTypes:UINT8 { eQMIWMSMessageTypes_PointToPoint = 0, eQMIWMSMessageTypes_Broadcast = 1, }; // Enum to describe QMI WMS Network Registration Status enum eQMIWMSNetworkRegistrationStatus:UINT8 { eQMIWMSNetworkRegistrationStatus_NoService = 0, eQMIWMSNetworkRegistrationStatus_InProgress = 1, eQMIWMSNetworkRegistrationStatus_Failed = 2, eQMIWMSNetworkRegistrationStatus_LimitedService = 3, eQMIWMSNetworkRegistrationStatus_FullService = 4, }; // Enum to describe QMI WMS Notification Type enum eQMIWMSNotificationType:UINT8 { eQMIWMSNotificationType_Primary = 0, eQMIWMSNotificationType_SecondaryGSM = 1, eQMIWMSNotificationType_SecondaryUMTS = 2, }; // Enum to describe QMI WMS Protocol Identifier Data enum eQMIWMSProtocolIdentifierData:UINT8 { eQMIWMSProtocolIdentifierData_Default = 0, eQMIWMSProtocolIdentifierData_Implicit = 32, eQMIWMSProtocolIdentifierData_Telex = 33, eQMIWMSProtocolIdentifierData_G3Fax = 34, eQMIWMSProtocolIdentifierData_G4Fax = 35, eQMIWMSProtocolIdentifierData_VoicePhone = 36, eQMIWMSProtocolIdentifierData_Ermes = 37, eQMIWMSProtocolIdentifierData_NATPaging = 38, eQMIWMSProtocolIdentifierData_Videotex = 39, eQMIWMSProtocolIdentifierData_TeltexUnspecified = 40, eQMIWMSProtocolIdentifierData_TeltexPSPDN = 41, eQMIWMSProtocolIdentifierData_TeltexCSPDN = 42, eQMIWMSProtocolIdentifierData_TeltexPSTN = 43, eQMIWMSProtocolIdentifierData_TeltexISDN = 44, eQMIWMSProtocolIdentifierData_UCI = 45, eQMIWMSProtocolIdentifierData_MessageHandling = 48, eQMIWMSProtocolIdentifierData_X400 = 49, eQMIWMSProtocolIdentifierData_InternetEMail = 50, eQMIWMSProtocolIdentifierData_SCSpecific1 = 56, eQMIWMSProtocolIdentifierData_SCSpecific2 = 57, eQMIWMSProtocolIdentifierData_SCSpecific3 = 58, eQMIWMSProtocolIdentifierData_SCSpecific4 = 59, eQMIWMSProtocolIdentifierData_SCSpecific5 = 60, eQMIWMSProtocolIdentifierData_SCSpecific6 = 61, eQMIWMSProtocolIdentifierData_SCSpecific7 = 62, eQMIWMSProtocolIdentifierData_GSMUMTS = 63, eQMIWMSProtocolIdentifierData_SMType0 = 64, eQMIWMSProtocolIdentifierData_ReplaceSM1 = 65, eQMIWMSProtocolIdentifierData_ReplaceSM2 = 66, eQMIWMSProtocolIdentifierData_ReplaceSM3 = 67, eQMIWMSProtocolIdentifierData_ReplaceSM4 = 68, eQMIWMSProtocolIdentifierData_ReplaceSM5 = 69, eQMIWMSProtocolIdentifierData_ReplaceSM6 = 70, eQMIWMSProtocolIdentifierData_ReplaceSM7 = 71, eQMIWMSProtocolIdentifierData_ReturnCall = 95, eQMIWMSProtocolIdentifierData_ANSI136RData = 124, eQMIWMSProtocolIdentifierData_MEDataDownload = 125, eQMIWMSProtocolIdentifierData_MEDepersonalizationShortMessage = 126, eQMIWMSProtocolIdentifierData_SIMDataDownload = 127, }; // Enum to describe QMI WMS RP Cause Codes enum eQMIWMSRPCauseCodes:UINT16 { eQMIWMSRPCauseCodes_UnassignedNumber = 1, eQMIWMSRPCauseCodes_OperatorDeterminedBarring = 8, eQMIWMSRPCauseCodes_CallBarred = 10, eQMIWMSRPCauseCodes_Reserved = 11, eQMIWMSRPCauseCodes_ShortMessageTransferRejected = 21, eQMIWMSRPCauseCodes_MemoryCapacityExceeded = 22, eQMIWMSRPCauseCodes_DestinationOutOfOrder = 27, eQMIWMSRPCauseCodes_UnidentifiedSubscriber = 28, eQMIWMSRPCauseCodes_FacilityRejected = 29, eQMIWMSRPCauseCodes_UnknownSubscriber = 30, eQMIWMSRPCauseCodes_NetworkOutOfOrder = 38, eQMIWMSRPCauseCodes_TemporaryFailure = 41, eQMIWMSRPCauseCodes_Congestion = 42, eQMIWMSRPCauseCodes_UnspecifiedResourcesUnavailable = 47, eQMIWMSRPCauseCodes_RequestedFacilityNotSubscribed = 50, eQMIWMSRPCauseCodes_RequestedFacilityNotImplemented = 69, eQMIWMSRPCauseCodes_InvalidShortMessageTransferValue = 81, eQMIWMSRPCauseCodes_SemanticallyIncorrectMessage = 95, eQMIWMSRPCauseCodes_InvalidManadatoryInfo = 96, eQMIWMSRPCauseCodes_MessageTypeNotImplemented = 97, eQMIWMSRPCauseCodes_MessageNotCompatibleWithSMS = 98, eQMIWMSRPCauseCodes_InfoElementNotImplemented = 99, eQMIWMSRPCauseCodes_UnspecifiedProtocolError = 111, eQMIWMSRPCauseCodes_UnspecifiedInterworking = 127, }; // Enum to describe QMI WMS Receipt Actions enum eQMIWMSReceiptActions:UINT8 { eQMIWMSReceiptActions_Discard = 0, eQMIWMSReceiptActions_StoreAndNotify = 1, eQMIWMSReceiptActions_TransferOnly = 2, eQMIWMSReceiptActions_TransfterAndAcknowledge = 3, }; // Enum to describe QMI WMS Route Values enum eQMIWMSRouteValues:UINT8 { eQMIWMSRouteValues_Discard = 0, eQMIWMSRouteValues_StoreAndNotify = 1, eQMIWMSRouteValues_TransferOnly = 2, eQMIWMSRouteValues_TransferAndAcknowledge = 3, eQMIWMSRouteValues_Unknown = 255, }; // Enum to describe QMI WMS SMS Call Status enum eQMIWMSSMSCallStatus:UINT8 { eQMIWMSSMSCallStatus_Incoming = 0, eQMIWMSSMSCallStatus_Connected = 1, eQMIWMSSMSCallStatus_Aborted = 2, eQMIWMSSMSCallStatus_Disconnected = 3, eQMIWMSSMSCallStatus_Connecting = 4, }; // Enum to describe QMI WMS SMS Message Mode enum eQMIWMSSMSMessageMode:UINT8 { eQMIWMSSMSMessageMode_GSMWCDMA = 1, }; // Enum to describe QMI WMS Service Categories enum eQMIWMSServiceCategories:UINT16 { eQMIWMSServiceCategories_Unknown = 0, eQMIWMSServiceCategories_EmergencyBroadcast = 1, eQMIWMSServiceCategories_Administrative = 2, eQMIWMSServiceCategories_Maintenance = 3, eQMIWMSServiceCategories_GeneralNewsLocal = 4, eQMIWMSServiceCategories_GeneralNewsRegional = 5, eQMIWMSServiceCategories_GeneralNewsNational = 6, eQMIWMSServiceCategories_GeneralNewsInternational = 7, eQMIWMSServiceCategories_BusinessNewsLocal = 8, eQMIWMSServiceCategories_BusinessNewsRegional = 9, eQMIWMSServiceCategories_BusinessNewsNational = 10, eQMIWMSServiceCategories_BusinessNewsInternational = 11, eQMIWMSServiceCategories_SportsNewsLocal = 12, eQMIWMSServiceCategories_SportsNewsRegional = 13, eQMIWMSServiceCategories_SportsNewsNational = 14, eQMIWMSServiceCategories_SportsNewsInternational = 15, eQMIWMSServiceCategories_EntertainmentNewsLocal = 16, eQMIWMSServiceCategories_EntertainmentNewsRegional = 17, eQMIWMSServiceCategories_EntertainmentNewsNational = 18, eQMIWMSServiceCategories_EntertainmentNewsInternational = 19, eQMIWMSServiceCategories_LocalWeather = 20, eQMIWMSServiceCategories_AreaTrafficReports = 21, eQMIWMSServiceCategories_LocalAirplaneFlightSchedules = 22, eQMIWMSServiceCategories_Restaurants = 23, eQMIWMSServiceCategories_Lodgings = 24, eQMIWMSServiceCategories_RetailDirectory = 25, eQMIWMSServiceCategories_Advertisements = 26, eQMIWMSServiceCategories_StockQuotes = 27, eQMIWMSServiceCategories_EmploymentOpportunities = 28, eQMIWMSServiceCategories_MedicalHealthHospitals = 29, eQMIWMSServiceCategories_TechnologyNews = 30, eQMIWMSServiceCategories_Multicategory = 31, eQMIWMSServiceCategories_CardApplicationToolkitProtocolTeleservice = 32, eQMIWMSServiceCategories_PresidentialLevelAlert = 4096, eQMIWMSServiceCategories_ExtremeThreattoLifeandProperty = 4097, eQMIWMSServiceCategories_SevereThreattoLifeandProperty = 4098, eQMIWMSServiceCategories_AMBERChildAbductionEmergency = 4099, eQMIWMSServiceCategories_CMASTestMessage = 4100, }; // Enum to describe QMI WMS Service Ready Status enum eQMIWMSServiceReadyStatus:UINT32 { eQMIWMSServiceReadyStatus_SMSServiceNotReady = 0, eQMIWMSServiceReadyStatus_3GPPSMSServiceReady = 1, eQMIWMSServiceReadyStatus_3GPP2SMSServiceReady = 2, eQMIWMSServiceReadyStatus_3GPPAnd3GPP2SMSServicesReady = 3, }; // Enum to describe QMI WMS Storage Types enum eQMIWMSStorageTypes:UINT8 { eQMIWMSStorageTypes_UIM = 0, eQMIWMSStorageTypes_NV = 1, eQMIWMSStorageTypes_Unknown = 255, }; // Enum to describe QMI WMS Subscription Type enum eQMIWMSSubscriptionType:UINT8 { eQMIWMSSubscriptionType_PrimarySubscription = 0, eQMIWMSSubscriptionType_SecondarySubscription = 1, eQMIWMSSubscriptionType_TertiarySubscription = 2, }; // Enum to describe QMI WMS TP Cause Codes enum eQMIWMSTPCauseCodes:UINT8 { eQMIWMSTPCauseCodes_TelematicInterworkingNotSupported = 128, eQMIWMSTPCauseCodes_ShortMessageType0NotSupported = 129, eQMIWMSTPCauseCodes_CannotReplaceShortMessage = 130, eQMIWMSTPCauseCodes_UnspecifiedPIDError = 143, eQMIWMSTPCauseCodes_DataCodingSchemeNotSupported = 144, eQMIWMSTPCauseCodes_MessageClassNotSupported = 145, eQMIWMSTPCauseCodes_UnspecifiedDCSError = 159, eQMIWMSTPCauseCodes_CommandCannotBeActioned = 160, eQMIWMSTPCauseCodes_CommandUnsupported = 161, eQMIWMSTPCauseCodes_UnspecifiedCommandError = 175, eQMIWMSTPCauseCodes_TPDUNotSupported = 176, eQMIWMSTPCauseCodes_SCBusy = 192, eQMIWMSTPCauseCodes_NoSCSubscription = 193, eQMIWMSTPCauseCodes_SCSystemFailure = 194, eQMIWMSTPCauseCodes_InvalidSMEAddress = 195, eQMIWMSTPCauseCodes_DestinationSMEBarred = 196, eQMIWMSTPCauseCodes_SMRejectedOrDuplicate = 197, eQMIWMSTPCauseCodes_VPFNotSupported = 198, eQMIWMSTPCauseCodes_VPNotSupported = 199, eQMIWMSTPCauseCodes_SIMSMSStorageFull = 208, eQMIWMSTPCauseCodes_NoSIMSMSStorageCapability = 209, eQMIWMSTPCauseCodes_ErrorInMS = 210, eQMIWMSTPCauseCodes_MemoryCapacityExceeded = 211, eQMIWMSTPCauseCodes_SIMApplicationToolkitBusy = 212, eQMIWMSTPCauseCodes_SIMDataDownloadError = 213, eQMIWMSTPCauseCodes_UnspecifiedError = 255, }; // Enum to describe QMI WMS Transport Capability enum eQMIWMSTransportCapability:UINT8 { eQMIWMSTransportCapability_CDMA = 0, eQMIWMSTransportCapability_GW = 1, }; // Enum to describe QMI WMS Transport Type enum eQMIWMSTransportType:UINT8 { eQMIWMSTransportType_IMS = 0, }; // Enum to describe QMI WMS Waiting Message Type enum eQMIWMSWaitingMessageType:UINT8 { eQMIWMSWaitingMessageType_Voicemail = 0, eQMIWMSWaitingMessageType_Fax = 1, eQMIWMSWaitingMessageType_Email = 2, eQMIWMSWaitingMessageType_Other = 3, eQMIWMSWaitingMessageType_Videomail = 4, }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiConnectionMgmt/GobiConnectionMgmtAPIStructs.h000066400000000000000000033453561455567757300316620ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIStructs.h DESCRIPTION: Declaration of the Gobi API structures Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiConnectionMgmtAPIEnums.h" #pragma pack( push, 1 ) //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Structure to represent a QMUX header struct sQMUXHeader { // mIF is always 1 BYTE mIF; // mLength is full size of QMUX message NOT including mIF WORD mLength; // Flags are always 0 for clients BYTE mFlags; eQMIService mServiceType; BYTE mClientID; }; // Structure to represent a QMI Control Raw Transaction Header struct sQMIControlRawTransactionHeader { BYTE mResponse :1; BYTE mIndication :1; BYTE mReserved :6; BYTE mTransactionID; }; // Structure to represent a QMI Service Raw Transaction Header struct sQMIServiceRawTransactionHeader { BYTE mCompound :1; BYTE mResponse :1; BYTE mIndication :1; BYTE mReserved :5; WORD mTransactionID; }; // Structure to represetn a QMI Raw Message Header struct sQMIRawMessageHeader { WORD mMessageID; WORD mLength; // This array must be the size specified by mLength // BYTE mTLV[1]; }; // Structure to represent a QMUX message struct sQMUXMessage { sQMUXHeader mQMUXHeader; // Either a sQMUXControlRawTransactionHeader or // sQMIServiceRawTransactionHeader should go here sQMIRawMessageHeader mQMIRawMessageHeader; }; // Structure to represent a QMI (control/service) content struct sQMIRawContentHeader { BYTE mTypeID; WORD mLength; // This array must be the size specified by mLength // BYTE mValue[1]; }; // Structure to describe request TLV 0x01 for QMI CTL Get Client ID struct sQMICTLGetClientID_ServiceType { eQMIService mQMIService; }; // Structure to describe response TLV 0x01 for QMI CTL Get Client ID struct sQMICTLGetClientID_AssignedClientID { eQMIService mQMIService; BYTE mClientID; }; // Structure to describe TLV 0x02, the Result Code // It is common for all Responses struct sResultCode { eQMIResults mQMIResult; eQMIErrors mQMIError; }; // Structure to describe TLV 0x01 for 'Abort' messages (0x0001/2) shared // across QMI WDS and NAS services struct sAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe TLV 0x10 for 'Get Supported Messages Response' // message (0x001E) shared across most QMI services struct sGetSupportedMessagesResponse_Messages { UINT16 mSupportedMessagesLength; // This array must be the size specified by mSupportedMessagesLength // where each bit of each UINT8 represents a single message ID // UINT8 mSupportedMessages[1]; }; // Structure to describe TLV 0x01 for 'Get Supported Fields Request' // message (0x001F) shared across most QMI services struct sGetSupportedFieldsRequest_MessageID { UINT16 mMessageID; }; // Structure to describe TLVs 0x10/11/12 for 'Get Supported Fields Response' // message (0x001F) shared across most QMI services struct sGetSupportedFieldsResponse_Fields { UINT8 mSupportedFieldsLength; // This array must be the size specified by mSupportedFieldsLength // where each bit of each UINT8 represents a single TLV ID // UINT8 mSupportedFields[1]; }; // Structure to describe TLV 0x01 for QMI LOC, the status // It is common for QMI LOC indications above 0x0032 struct sLOCIndication_Status { eQMILOCStatus mStatus; }; // Structure to describe request TLV 0x10 for WDSSetEventReport() struct sWDSSetEventReportRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe request TLV 0x11 for WDSSetEventReport() struct sWDSSetEventReportRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x13 for WDSSetEventReport() struct sWDSSetEventReportRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x14 for WDSSetEventReport() struct sWDSSetEventReportRequest_MIPStatusIndicator { INT8 mReportMIPStatus; }; // Structure to describe request TLV 0x15 for WDSSetEventReport() struct sWDSSetEventReportRequest_CurrentDataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x17 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataCallStatusIndicator { INT8 mReportDataCallStatus; }; // Structure to describe request TLV 0x18 for WDSSetEventReport() struct sWDSSetEventReportRequest_PreferredDataSystemIndicator { INT8 mReportPreferredDataSystem; }; // Structure to describe request TLV 0x19 for WDSSetEventReport() struct sWDSSetEventReportRequest_EVDOPMChangeIndicator { INT8 mReportEVDOPageMonitorPeriodChange; }; // Structure to describe request TLV 0x1A for WDSSetEventReport() struct sWDSSetEventReportRequest_DataSystemsIndicator { INT8 mReportDataSystems; }; // Structure to describe request TLV 0x1B for WDSSetEventReport() struct sWDSSetEventReportRequest_UplinkFlowControlIndicator { INT8 mReportUplinkFlowControl; }; // Structure to describe request TLV 0x1C for WDSSetEventReport() struct sWDSSetEventReportRequest_LimitedDataSystemStatusIndicator { INT8 mReportLimitedDataSystemStatus; }; // Structure to describe request TLV 0x1D for WDSSetEventReport() struct sWDSSetEventReportRequest_PDNFilterRemovalsIndicator { INT8 mReportPDNFilterRemovals; }; // Structure to describe request TLV 0x1E for WDSSetEventReport() struct sWDSSetEventReportRequest_ExtendedDataBearerTechnologyIndicator { INT8 mReportExtendedDataBearerTechnology; }; // Structure to describe indication TLV 0x10 for WDS EventReport struct sWDSEventReportIndication_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe indication TLV 0x11 for WDS EventReport struct sWDSEventReportIndication_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe indication TLV 0x12 for WDS EventReport struct sWDSEventReportIndication_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe indication TLV 0x13 for WDS EventReport struct sWDSEventReportIndication_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe indication TLV 0x14 for WDS EventReport struct sWDSEventReportIndication_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe indication TLV 0x15 for WDS EventReport struct sWDSEventReportIndication_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe indication TLV 0x16 for WDS EventReport struct sWDSEventReportIndication_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe indication TLV 0x17 for WDS EventReport struct sWDSEventReportIndication_DataBearerTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x18 for WDS EventReport struct sWDSEventReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x19 for WDS EventReport struct sWDSEventReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x1A for WDS EventReport struct sWDSEventReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x1B for WDS EventReport struct sWDSEventReportIndication_MIPStatus { UINT8 mMIPStatus; }; // Structure to describe indication TLV 0x1D for WDS EventReport struct sWDSEventReportIndication_CurrentDataBearerTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe indication TLV 0x1F for WDS EventReport struct sWDSEventReportIndication_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe indication TLV 0x20 for WDS EventReport struct sWDSEventReportIndication_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe indication TLV 0x22 for WDS EventReport struct sWDSEventReportIndication_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe indication TLV 0x23 for WDS EventReport struct sWDSEventReportIndication_EVDOPageMonitorPeriodChange { UINT8 mEVDOPageMonitorPeriodChange; INT8 mEVDOForceLongSleep; }; // Structure to describe indication TLV 0x24 for WDS EventReport struct sWDSEventReportIndication_DataSystems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe indication TLV 0x25 for WDS EventReport struct sWDSEventReportIndication_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe indication TLV 0x26 for WDS EventReport struct sWDSEventReportIndication_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe indication TLV 0x27 for WDS EventReport struct sWDSEventReportIndication_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe indication TLV 0x28 for WDS EventReport struct sWDSEventReportIndication_DataCallAddressFamily { eQMIWDSAddressFamilies mAddressFamily; }; // Structure to describe indication TLV 0x29 for WDS EventReport struct sWDSEventReportIndication_PDNFiltersRemoved { UINT8 mPDNFilterHandleCount; // This array must be the size specified by mPDNFilterHandleCount // UINT32 mPDNFilterHandle[1]; }; // Structure to describe indication TLV 0x2A for WDS EventReport struct sWDSEventReportIndication_ExtendedDataBearerTechnology { eQMIWDSDataBearerTechnologies mDataBearerTechnology; eQMIWDSRadioAccessTechnologies mRadioAccessTechnology; bool mWCDMA:1; bool mHSDPA:1; bool mHSUPA:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mHSPA:1; bool mGPRS:1; bool mEDGE:1; bool mGSM:1; bool mS2B:1; bool mLTELimitedService:1; bool mLTEFDD:1; bool mLTETDD:1; // Padding out 11 bits UINT8 mReserved1:2; UINT8 mReserved2; UINT8 mReserved3:1; bool m1xIS95:1; bool m1xIS2000:1; bool m1xIS2000RelA:1; bool mHDRRev0DPA:1; bool mHDRRevADPA:1; bool mHDRRevBDPA:1; bool mHDRRevAMPA:1; bool mHDRRevBMPA:1; bool mHDRRevAEMPA:1; bool mHDRRevBEMPA:1; bool mHDRRevBMMPA:1; bool mHDREVDOFMC:1; // Padding out 27 bits UINT8 mReserved4:3; UINT8 mReserved5[3]; }; // Structure to describe request TLV 0x10 for WDSSetIndication() struct sWDSSetIndicationRequest_TMGIList { INT8 mReportEMBMSTMGIList; }; // Structure to describe request TLV 0x11 for WDSSetIndication() struct sWDSSetIndicationRequest_PacketService { INT8 mSuppressPacketServiceIndication; }; // Structure to describe request TLV 0x12 for WDSSetIndication() struct sWDSSetIndicationRequest_ExtendedIP { INT8 mReportExtendedIPConfigChange; }; // Structure to describe request TLV 0x13 for WDSSetIndication() struct sWDSSetIndicationRequest_LTEAttachPDNList { INT8 mReportLTEAttachPDNListChange; }; // Structure to describe request TLV 0x14 for WDSSetIndication() struct sWDSSetIndicationRequest_ReverseIPTransportFilter { INT8 mReportReverseIPTransportFilterSetup; }; // Structure to describe request TLV 0x15 for WDSSetIndication() struct sWDSSetIndicationRequest_HandoffInfo { INT8 mReportHandoffInformation; }; // Structure to describe request TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ContextAPNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x17 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x18 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x19 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x30 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_TechnologyPreference { bool mEnable3GPP:1; bool mEnable3GPP2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x31 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPPProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x32 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPP2ProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x33 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x34 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ExtendedTechnologyPreference { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe request TLV 0x35 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_CallType { eQMIWDSCallTypes mCallType; }; // Structure to describe request TLV 0x36 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_HandoffContext { UINT8 mIPV4Address[4]; UINT16 mIPv6Address[8]; eQMIWDSIPSupportTypes mBearerIPType; }; // Structure to describe request TLV 0x37 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPStreamID { UINT8 mIPStreamID; }; // Structure to describe response TLV 0x01 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe response TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe request TLV 0x10 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_Autoconnect { INT8 mAutoconnectOff; }; // Structure to describe response TLV 0x01 for WDSGetPacketServiceStatus() struct sWDSGetPacketServiceStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x01 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; INT8 mReconfigureRequired; }; // Structure to describe indication TLV 0x10 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x11 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe indication TLV 0x12 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe indication TLV 0x13 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnology; }; // Structure to describe response TLV 0x01 for WDSGetChannelRates() struct sWDSGetChannelRatesResponse_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe request TLV 0x01 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsRequest_PacketStatsMask { bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe response TLV 0x10 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe response TLV 0x11 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe response TLV 0x12 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe response TLV 0x13 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe response TLV 0x14 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe response TLV 0x15 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe response TLV 0x19 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x1A for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x1B for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x1C for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x1D for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe response TLV 0x1E for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe request TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe request TLV 0x10 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSCreateProfile() struct sWDSCreateProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSCreateProfile() struct sWDSCreateProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSCreateProfile() struct sWDSCreateProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSCreateProfile() struct sWDSCreateProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSCreateProfile() struct sWDSCreateProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSCreateProfile() struct sWDSCreateProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSCreateProfile() struct sWDSCreateProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSCreateProfile() struct sWDSCreateProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSCreateProfile() struct sWDSCreateProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSCreateProfile() struct sWDSCreateProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x36 for WDSCreateProfile() struct sWDSCreateProfileRequest_SupportEmergencyCalls { INT8 mSupportEmergencyCalls; }; // Structure to describe request TLV 0x37 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe request TLV 0x38 for WDSCreateProfile() struct sWDSCreateProfileRequest_MCC { UINT16 mMobileCountryCode; }; // Structure to describe request TLV 0x39 for WDSCreateProfile() struct sWDSCreateProfileRequest_MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x8F for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfilePersistent { INT8 mProfilePersistent; }; // Structure to describe request TLV 0x90 for WDSCreateProfile() struct sWDSCreateProfileRequest_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSCreateProfile() struct sWDSCreateProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSCreateProfile() struct sWDSCreateProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSCreateProfile() struct sWDSCreateProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSCreateProfile() struct sWDSCreateProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSCreateProfile() struct sWDSCreateProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe request TLV 0xBD for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe request TLV 0xBE for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2MCC { UINT16 mMobileCountryCode; }; // Structure to describe request TLV 0xBF for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0xC0 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNThrottlingTimer { UINT32 mFailureTimerInSeconds; }; // Structure to describe request TLV 0xC1 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNDisallowTimer { UINT32 mDisallowTimerInSeconds; }; // Structure to describe response TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileResponse_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSCreateProfile() struct sWDSCreateProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSModifyProfile() struct sWDSModifyProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSModifyProfile() struct sWDSModifyProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSModifyProfile() struct sWDSModifyProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSModifyProfile() struct sWDSModifyProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSModifyProfile() struct sWDSModifyProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSModifyProfile() struct sWDSModifyProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSModifyProfile() struct sWDSModifyProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSModifyProfile() struct sWDSModifyProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSModifyProfile() struct sWDSModifyProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSModifyProfile() struct sWDSModifyProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x36 for WDSModifyProfile() struct sWDSModifyProfileRequest_SupportEmergencyCalls { INT8 mSupportEmergencyCalls; }; // Structure to describe request TLV 0x37 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe request TLV 0x38 for WDSModifyProfile() struct sWDSModifyProfileRequest_MCC { UINT16 mMobileCountryCode; }; // Structure to describe request TLV 0x39 for WDSModifyProfile() struct sWDSModifyProfileRequest_MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x90 for WDSModifyProfile() struct sWDSModifyProfileRequest_NegotiateDNSServerPrefrence { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSModifyProfile() struct sWDSModifyProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSModifyProfile() struct sWDSModifyProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSModifyProfile() struct sWDSModifyProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSModifyProfile() struct sWDSModifyProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSModifyProfile() struct sWDSModifyProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe request TLV 0xBD for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe request TLV 0xBE for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2MCC { UINT16 mMobileCountryCode; }; // Structure to describe request TLV 0xBF for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0xC0 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNThrottlingTimer { UINT32 mFailureTimerInSeconds; }; // Structure to describe request TLV 0xC1 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNDisallowTimer { UINT32 mDisallowTimerInSeconds; }; // Structure to describe response TLV 0xE0 for WDSModifyProfile() struct sWDSModifyProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSDeleteProfile() struct sWDSDeleteProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSDeleteProfile() struct sWDSDeleteProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetProfileList() struct sWDSGetProfileListRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSGetProfileList() struct sWDSGetProfileListRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSGetProfileList() struct sWDSGetProfileListRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSGetProfileList() struct sWDSGetProfileListRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSGetProfileList() struct sWDSGetProfileListRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSGetProfileList() struct sWDSGetProfileListRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSGetProfileList() struct sWDSGetProfileListRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSGetProfileList() struct sWDSGetProfileListRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSGetProfileList() struct sWDSGetProfileListRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSGetProfileList() struct sWDSGetProfileListRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x90 for WDSGetProfileList() struct sWDSGetProfileListRequest_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSGetProfileList() struct sWDSGetProfileListRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSGetProfileList() struct sWDSGetProfileListRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSGetProfileList() struct sWDSGetProfileListRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSGetProfileList() struct sWDSGetProfileListRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetProfileList() struct sWDSGetProfileListResponse_ProfileList { UINT8 mNumberOfProfiles; struct sProfile { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; UINT8 mProfileNameLength; // This array must be the size specified by mProfileNameLength // char mProfileName[1]; }; // This array must be the size specified by mNumberOfProfiles // sProfile mProfiles[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileList() struct sWDSGetProfileListResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetProfileSettings() struct sWDSGetProfileSettingsRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IMCMFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x36 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SupportEmergencyCalls { INT8 mSupportEmergencyCalls; }; // Structure to describe response TLV 0x37 for WDSGetProfile() struct sWDSGetProfileResponse_PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe response TLV 0x38 for WDSGetProfile() struct sWDSGetProfileResponse_MCC { UINT16 mMobileCountryCode; }; // Structure to describe response TLV 0x39 for WDSGetProfile() struct sWDSGetProfileResponse_MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x90 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xBD for WDSGetProfile() struct sWDSGetProfileResponse_3GPP2PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe response TLV 0xBE for WDSGetProfile() struct sWDSGetProfileResponse_3GPP2MCC { UINT16 mMobileCountryCode; }; // Structure to describe response TLV 0xBF for WDSGetProfile() struct sWDSGetProfileResponse_3GPP2MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0xC0 for WDSGetProfile() struct sWDSGetProfileResponse_PDNThrottlingTimer { UINT32 mFailureTimerInSeconds; }; // Structure to describe response TLV 0xC1 for WDSGetProfile() struct sWDSGetProfileResponse_PDNDisallowTimer { UINT32 mDisallowTimerInSeconds; }; // Structure to describe response TLV 0xE0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe response TLV 0x10 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x1D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x36 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SupportEmergencyCalls { INT8 mSupportEmergencyCalls; }; // Structure to describe response TLV 0x37 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe response TLV 0x38 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_MCC { UINT16 mMobileCountryCode; }; // Structure to describe response TLV 0x39 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x90 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xBD for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2PCOContainerID { UINT16 mPCOContainerID; }; // Structure to describe response TLV 0xBE for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2MCC { UINT16 mMobileCountryCode; }; // Structure to describe response TLV 0xBF for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2MNC { UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0xC0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNThrottlingTimer { UINT32 mFailureTimerInSeconds; }; // Structure to describe response TLV 0xC1 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNDisallowTimer { UINT32 mDisallowTimerInSeconds; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsRequest_RequestedSettings { bool mProfileID:1; bool mProfileName:1; bool mPDPType:1; bool mAPNName:1; bool mDNSAddress:1; bool mGrantedQoS:1; bool mUsername:1; bool mAuthenticationProtocol:1; bool mIPAddress:1; bool mGatewayInfo:1; bool mPCSCFAddress:1; bool mPCSCFServerAddressList:1; bool mPCSCFDomainNameList:1; bool mMTU:1; bool mDomainNameList:1; bool mIPFamily:1; bool mIMCNFlag:1; bool mExtendedTechnology:1; bool mOperatorReservedPCO:1; // Padding out 13 bits UINT8 mReserved1:5; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x14 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_UMTSGrantedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GPRSGrantedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileID { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x20 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewayAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x21 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewaySubnetMask { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x22 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x23 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFServerAddressList { UINT8 mNumberOfInstances; struct sInstance { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x24 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFDomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mFQDNLength; // This array must be the size specified by mFQDNLength // char mFQDN[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x25 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x26 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6GatewayAddress { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x27 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x28 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_MTU { UINT32 mMTU; }; // Structure to describe response TLV 0x2A for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_DomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mDomainNameLength; // This array must be the size specified by mDomainNameLength // char mDomainName[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x2B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe response TLV 0x2C for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x2D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe response TLV 0x2E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFIPv6AddressList { UINT8 mNumberOfAddresses; struct sAddress { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mNumberOfAddresses // sAddress mAddresses[1]; }; // Structure to describe response TLV 0x2F for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_OperatorReservedProtocolInfo1 { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; UINT8 mApplicationSpecificInfoLength; // This array must be the size specified by mApplicationSpecificInfoLength // UINT8 mApplicationSpecificInfo[1]; }; struct sWDSGetCurrentSettingsResponse_OperatorReservedProtocolInfo2 { UINT16 mPCOContainerID; }; struct sWDSGetCurrentSettingsResponse_OperatorReservedProtocolInfo { sWDSGetCurrentSettingsResponse_OperatorReservedProtocolInfo1 mWDSGetCurrentSettingsResponse_OperatorReservedProtocolInfo1; sWDSGetCurrentSettingsResponse_OperatorReservedProtocolInfo2 mWDSGetCurrentSettingsResponse_OperatorReservedProtocolInfo2; }; // Structure to describe request TLV 0x01 for WDSSetMIPMode() struct sWDSSetMIPModeRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetMIPMode() struct sWDSGetMIPModeResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetDormancy() struct sWDSGetDormancyResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x01 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe response TLV 0x10 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x01 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_Duration { UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousDuration { UINT64 mPreviousDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x12 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousActiveDuration { UINT64 mPreviousDataSessionActiveDuration; }; // Structure to describe response TLV 0x01 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x01 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x10 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x01 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x10 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe request TLV 0x01 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_RequestedStatus { bool mConnectionStatus:1; bool mLastCallEndReason:1; bool mRXTXByteTotals:1; bool mDormancyStatus:1; bool mDataBearerTechnology:1; bool mChannelRates:1; bool mDuration:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ConnectionStatusIndicator { INT8 mReportConnectionStatus; }; // Structure to describe request TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; // Padding out 6 bits UINT8 mReserved1:6; bool mTXByteTotal:1; bool mRXByteTotal:1; // Padding out 24 bits UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe response TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x15 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x16 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe response TLV 0x17 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x18 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x19 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x20 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x10 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x11 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x12 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x13 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x14 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x15 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x16 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe response TLV 0x01 for WDSGetActiveMIPProfile() struct sWDSGetActiveMIPProfileResponse_Index { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSSetActiveMIPProfile() struct sWDSSetActiveMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSGetMIPProfile() struct sWDSGetMIPProfileRequest_Index { UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_State { INT8 mEnabled; }; // Structure to describe response TLV 0x11 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x13 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x14 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe response TLV 0x15 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe response TLV 0x16 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HASPI { UINT32 mHASPI; }; // Structure to describe response TLV 0x17 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAASPI { UINT32 mAAASPI; }; // Structure to describe response TLV 0x1A for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe response TLV 0x1B for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe request TLV 0x01 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_State { INT8 mEnabled; }; // Structure to describe request TLV 0x11 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe request TLV 0x15 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe request TLV 0x16 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HASPI { UINT32 mHASPI; }; // Structure to describe request TLV 0x17 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequeste_AAASPI { UINT32 mAAASPI; }; // Structure to describe request TLV 0x18 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNHA { // String is variable length, but must be size of the container // char mMNHAKey[1]; }; // Structure to describe request TLV 0x19 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNAAA { // String is variable length, but must be size of the container // char mMNAAAKey[1]; }; // Structure to describe response TLV 0x10 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x11 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe response TLV 0x12 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe response TLV 0x13 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe response TLV 0x14 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe response TLV 0x15 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe response TLV 0x16 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe request TLV 0x01 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x10 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe request TLV 0x11 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe request TLV 0x12 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe request TLV 0x13 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe request TLV 0x14 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe request TLV 0x15 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe request TLV 0x16 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe response TLV 0x01 for WDSGetLastMIPStatus() struct sWDSGetLastMIPStatusResponse_Status { UINT8 mLastMIPStatus; }; // Structure to describe response TLV 0x01 for WDSGetANAAAAuthenticationStatus() struct sWDSGetANAAAAuthenticationStatusResponse_Status { INT8 mANAAAAuthenticated; }; // Structure to describe response TLV 0x01 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_Technology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_LastCallTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe request TLV 0x10 for WDSGetCallList() struct sWDSGetCallListRequest_ListType { eQMICallHistoryTypes mCallListType; }; // Structure to describe response TLV 0x10 for WDSGetCallList() struct sWDSGetCallListResponse_FullList { UINT16 mCallRecords; struct sRecord { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe response TLV 0x11 for WDSGetCallList() struct sWDSGetCallListResponse_IDList { UINT16 mCallRecords; struct sRecord { UINT16 mID; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordRequest_RecordID { UINT16 mID; }; // Structure to describe response TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordResponse_Record { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // Structure to describe response TLV 0x01 for WDSGetCallListMaxSize() struct sWDSGetCallListMaxSizeResponse_Maximum { UINT16 mCallListMaxSize; }; // Structure to describe request TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberRequest_ProfileType { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; }; // Structure to describe response TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ProfileNumber { UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfile() struct sWDSResetProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSResetProfile() struct sWDSResetProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidRequest_ProfileParam { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; eQMIWDSProfileParamID mProfileParamID; }; // Structure to describe response TLV 0xE0 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetIPFamilyPreference() struct sWDSSetIPFamilyPreferenceRequest_IPFamilyPreference { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x01 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe request TLV 0x10 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x10 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe response TLV 0x11 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x01 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x10 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x10 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x11 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x13 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x10 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x13 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetCDMAPreDormancySettings() struct sWDSGetCDMAPreDormancySettingsResponse_Settings { eQMIWDSCDMAServiceOptions mServiceOption; eQMIWDSCDMANetworks mDataSessionNetwork; }; // Structure to describe request TLV 0x01 for WDSSetCAMTimer() struct sWDSSetCAMTimerRequest_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe response TLV 0x01 for WDSGetCAMTimer() struct sWDSGetCAMTimerResponse_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe request TLV 0x01 for WDSSetSCRM() struct sWDSSetSCRMRequest_SCRM { INT8 mSCRMEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSCRM() struct sWDSGetSCRMResponse_SCRM { INT8 mSCRMEnabled; }; // Structure to describe request TLV 0x01 for WDSSetRDUD() struct sWDSSetRDUDRequest_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetRDUD() struct sWDSGetRDUDResponse_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSIPMIPCallType() struct sWDSGetSIPMIPCallTypeResponse_CallType { eQMIWDSSIPMIPCallTypes mCallType; }; // Structure to describe request TLV 0x01 for WDSSetEVDOPageMonitorPeriod() struct sWDSSetEVDOPageMonitorPeriodRequest_Period { UINT8 mPageMonitorPeriod; }; // Structure to describe indication TLV 0x01 for WDS EVDOPageMonitorPeriodIndication struct sWDSEVDOPageMonitorPeriodIndication_Result { eQMIWDSSlotCycleSetResults mSlotCycleSetResult; }; // Structure to describe request TLV 0x01 for WDSSetEVDOLongSleep() struct sWDSSetEVDOLongSleepRequest_Setting { INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetEVDOPageMonitorPeriod() struct sWDSGetEVDOPageMonitorPeriodResponse_Details { UINT8 mPageMonitorPeriod; INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetCallThrottleInfo() struct sWDSGetCallThrottleInfoResponse_Details { UINT32 mEVDOThrottledDelaySeconds; UINT32 mCDMAThrottledDelaySeconds; }; // Structure to describe request TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIRequest_APN { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIResponse_NSAPI { UINT8 mNSAPICount; // This array must be the size specified by mNSAPICount // UINT8 mNSAPI[1]; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_Preference { eQMIWDSDUNControlPreferences mDUNControl; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x01 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_Status { INT8 mDUNControlEnabled; }; // Structure to describe response TLV 0x10 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x11 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_CurrentClient { INT8 mSetByCurrentClient; }; // Structure to describe response TLV 0x12 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_CallNotifications { INT8 mEnableDUNCallNotifications; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_EntitlementNotifications { INT8 mEnableEntitlementNotifications; }; // Structure to describe request TLV 0x11 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_RedialNotifications { INT8 mEnableSilentRedailNotifications; }; // Structure to describe response TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x01 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_Event { eQMIWDSDUNControlEvents mDUNControlEvent; }; // Structure to describe indication TLV 0x10 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallNotification { INT8 mDUNCallAllowed; }; // Structure to describe indication TLV 0x11 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallID { UINT8 mDUNCallID; }; // Structure to describe indication TLV 0x12 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_PreviousFailureReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSPendingDUNCallControl() struct sWDSPendingDUNCallControlRequest_Action { INT8 mDUNCallAllowed; }; // Structure to describe request TLV 0x02 for WDSPendingDUNCallControl() struct sWDSPendingDUNCallControlRequest_CallID { UINT8 mDUNCallID; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x11 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_PreemptPriority { UINT32 mPreemptPriority; }; // Structure to describe request TLV 0x12 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_EARFCNList { UINT8 mEARFCNCount; // This array must be the size specified by mEARFCNCount // UINT16 mEARFCN[1]; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIActivateIndication struct sWDSEMBMSTMGIActivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x02 for WDS EMBMSTMGIActivateIndication struct sWDSEMBMSTMGIActivateIndication_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIActivateIndication struct sWDSEMBMSTMGIActivateIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIDectivateIndication struct sWDSEMBMSTMGIDectivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x02 for WDS EMBMSTMGIDectivateIndication struct sWDSEMBMSTMGIDectivateIndication_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIDectivateIndication struct sWDSEMBMSTMGIDectivateIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryRequest_Type { eQMIWDSEMBMSListTypes mTMGIListType; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe response TLV 0x11 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe indication TLV 0x11 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe indication TLV 0x12 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe response TLV 0x10 for WDSGetPreferredDataSystem() struct sWDSGetPreferredDataSystemResponse_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe response TLV 0x10 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe response TLV 0x11 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe response TLV 0x12 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallAddressFamily { eQMIWDSAddressFamilies mAddressFamily; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataSystems() struct sWDSGetCurrentDataSystemsResponse_Systems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoRequest_Type { eQMIWDSDataSystemNetworkTypes mTechnologyType; }; // Structure to describe response TLV 0x10 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoResponse_Info { UINT8 mThrottleInfoCount; struct sInfo { INT8 mIPv4Throttled; INT8 mIPv6Throttled; UINT32 mIPv4ThrottleTimeLeftInMilliseconds; UINT32 mIPv6ThrottleTimeLeftInMilliseconds; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // This array must be the size specified by mThrottleInfoCount // sInfo mInfos[1]; }; // Structure to describe response TLV 0x10 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x11 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_IPSupport { eQMIWDSLTEIPTypes mIPType; }; // Structure to describe response TLV 0x12 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_OTAAttach { INT8 mOTAAttachPerformed; }; // Structure to describe response TLV 0x10 for WDSGetFlowControlStatus() struct sWDSGetFlowControlStatusResponse_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_TMGIToActivate { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe request TLV 0x02 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_TMGIToDeactivate { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x11 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_PreemptPriority { UINT32 mPreemptPriority; }; // Structure to describe request TLV 0x12 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_EARFCNList { UINT8 mEARFCNCount; // This array must be the size specified by mEARFCNCount // UINT16 mEARFCN[1]; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_ActivationStatus { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x02 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_ActivationTMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe indication TLV 0x03 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_DeactivationStatus { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x04 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_DeactivationTMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x01 for WDSBindDataPort() struct sWDSBindDataPortRequest_DataPort { UINT16 mDataPort; }; // Structure to describe request TLV 0x01 for WDSSetPDNFilter() struct sWDSSetPDNFilterRequest_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x02 for WDSSetPDNFilter() struct sWDSSetPDNFilterRequest_NetworkPolicy { bool mEnable3GPP:1; bool mEnable3GPP2:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 m3GPP2ProfileIndex; UINT8 m3GPPProfileIndex; }; // Structure to describe request TLV 0x10 for WDSSetPDNFilter() struct sWDSSetPDNFilterRequest_NextHeaderPolicy { eQMIWDSNextHeaderProtocols mNextHeaderProtocol; }; // Structure to describe request TLV 0x11 for WDSSetPDNFilter() struct sWDSSetPDNFilterRequest_ProtocolSource { UINT16 mPortRangeStart; UINT16 mPortRange; }; // Structure to describe response TLV 0x10 for WDSSetPDNFilter() struct sWDSSetPDNFilterResponse_Handle { UINT32 mPDNFilterHandle; }; // Structure to describe request TLV 0x01 for WDSRemovePDNFilter() struct sWDSRemovePDNFilterRequest_Handle { UINT32 mPDNFilterHandle; }; // Structure to describe indication TLV 0x10 for WDS ExtendedIPConfigIndication struct sWDSExtendedIPConfigIndication_ChangedIPConfig { // Padding out 10 bits UINT8 mReserved1; UINT8 mReserved2:2; bool mPCSCFAddressUsingPCO:1; // Padding out 21 bits UINT8 mReserved3:5; UINT8 mReserved4[2]; }; // Structure to describe request TLV 0x01 for WDSReverseIPTransportConnectionIndication() struct sWDSReverseIPTransportConnectionIndicationRequest_Registration { INT8 mRegisterForIndication; }; // Structure to describe indication TLV 0x01 for WDS ReverseIPTransportConnectionIndication struct sWDSReverseIPTransportConnectionIndication_Status { eQMIWDSReverseIPConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x02 for WDS ReverseIPTransportConnectionIndication struct sWDSReverseIPTransportConnectionIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x10 for WDS ReverseIPTransportConnectionIndication struct sWDSReverseIPTransportConnectionIndication_TechnologyName { eQMIWDSReverseIPTechnologyNames mTechnologyName; }; // Structure to describe indication TLV 0x11 for WDS ReverseIPTransportConnectionIndication struct sWDSReverseIPTransportConnectionIndication_Shared { INT8 mIsShared; }; // Structure to describe indication TLV 0x12 for WDS ReverseIPTransportConnectionIndication struct sWDSReverseIPTransportConnectionIndication_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe indication TLV 0x13 for WDS ReverseIPTransportConnectionIndication struct sWDSReverseIPTransportConnectionIndication_IPv4Subnet { UINT8 mIPV4Address[4]; }; // Structure to describe indication TLV 0x14 for WDS ReverseIPTransportConnectionIndication struct sWDSReverseIPTransportConnectionIndication_IPv6Address { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x10 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_SecurityParameterIndexRX { INT8 mSecurityParameterIndex; }; // Structure to describe response TLV 0x11 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_SecurityParameterIndexTX { INT8 mSecurityParameterIndex; }; // Structure to describe response TLV 0x12 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_IPSecSAProtocol { eQMIWDSIPSecSAProtocols mIPSecSAProtocol; }; // Structure to describe response TLV 0x13 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_EncapsulationMode { eQMIWDSIPSecSAEncapsulationModes mIPSecSAProtocol; }; // Structure to describe response TLV 0x14 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_DestinationAddress { eQMIWDSAddressFamilies mAddressFamily; UINT8 mIPAddressLength; // This array must be the size specified by mIPAddressLength // UINT8 mIPAddress[1]; }; // Structure to describe response TLV 0x15 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_LocalAddress { eQMIWDSAddressFamilies mAddressFamily; UINT8 mIPAddressLength; // This array must be the size specified by mIPAddressLength // UINT8 mIPAddress[1]; }; // Structure to describe response TLV 0x16 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_HashAlgorithm { eQMIWDSIPSecCryptoAlgorithms mAlgorithm; }; // Structure to describe response TLV 0x17 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_HashKeyRX { UINT8 mKeyLength; // This array must be the size specified by mKeyLength // UINT8 mKeyAddress[1]; }; // Structure to describe response TLV 0x18 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_HashKeyTX { UINT8 mKeyLength; // This array must be the size specified by mKeyLength // UINT8 mKeyAddress[1]; }; // Structure to describe response TLV 0x19 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_CryptographyAlgorithm { eQMIWDSIPSecCryptoAlgorithms mAlgorithm; }; // Structure to describe response TLV 0x1A for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_CryptographyKeyRX { UINT8 mKeyLength; // This array must be the size specified by mKeyLength // UINT8 mKeyAddress[1]; }; // Structure to describe response TLV 0x1B for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_CryptographyKeyTX { UINT8 mKeyLength; // This array must be the size specified by mKeyLength // UINT8 mKeyAddress[1]; }; // Structure to describe response TLV 0x1C for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InitializationVector { UINT8 mInitializationVectorLength; // This array must be the size specified by mInitializationVectorLength // UINT8 mInitializationVector[1]; }; // Structure to describe response TLV 0x1D for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_UDPEncapsulated { INT8 mUDPEncapsulated; }; // Structure to describe response TLV 0x1E for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_NATLocalIPAddress { eQMIWDSAddressFamilies mAddressFamily; UINT8 mIPAddressLength; // This array must be the size specified by mIPAddressLength // UINT8 mIPAddress[1]; }; // Structure to describe response TLV 0x1F for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_NATRemoteIPAddress { eQMIWDSAddressFamilies mAddressFamily; UINT8 mIPAddressLength; // This array must be the size specified by mIPAddressLength // UINT8 mIPAddress[1]; }; // Structure to describe response TLV 0x20 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv4Address { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x21 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv4Netmask { UINT8 mNetmask[4]; }; // Structure to describe response TLV 0x22 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv4DNS { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x23 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv4NBNS { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x24 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalAddressExpiry { UINT32 mExpiry; }; // Structure to describe response TLV 0x25 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv4DHCP { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x26 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_ApplicationVersion { UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; // Structure to describe response TLV 0x27 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv6Address { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x28 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv6DNS { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x29 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv6NBNS { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x2A for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv6DHCP { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x2B for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv4Subnet { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x2C for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_SupportedAttributes { UINT8 mSupportedAttributesLength; // This array must be the size specified by mSupportedAttributesLength // char mSupportedAttributes[1]; }; // Structure to describe response TLV 0x2D for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv6Subnet { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x2E for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv4PCSCF { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x2F for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_InternalIPv6PCSCF { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x30 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_3GPP2MIP4HA { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x31 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_3GPP2MIP4HOA { UINT8 mAttributeCount; struct sAttribute { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x32 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_3GPP2MIP6HA { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x33 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_3GPP2MIP6HOA { UINT8 mAttributeCount; struct sAttribute { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // This array must be the size specified by mAttributeCount // sAttribute mAttributes[1]; }; // Structure to describe response TLV 0x34 for WDSGetIPSecStaticSAConfig() struct sWDSGetIPSecStaticSAConfigResponse_TrafficSelectorList { UINT8 mTrafficSelectorListCount; struct sTrafficSelector1 { UINT8 mProtocol; UINT16 mStartPort; UINT16 mEndPort; eQMIWDSAddressFamilies mAddressFamily; UINT8 mIPAddressLength; // This array must be the size specified by mIPAddressLength // UINT8 mIPAddress[1]; }; struct sTrafficSelector2 { eQMIWDSAddressFamilies mAddressFamily; UINT8 mIPAddressLength; // This array must be the size specified by mIPAddressLength // UINT8 mIPAddress[1]; }; struct sTrafficSelector { sTrafficSelector1 mTrafficSelector1; sTrafficSelector2 mTrafficSelector2; }; // This array must be the size specified by mTrafficSelectorListCount // sTrafficSelector mTrafficSelectors[1]; }; // Structure to describe request TLV 0x01 for WDSReverseIPTransportConfigComplete() struct sWDSReverseIPTransportConfigCompleteRequest_Result { INT8 mConfigurationSuccess; }; // Structure to describe request TLV 0x02 for WDSReverseIPTransportConfigComplete() struct sWDSReverseIPTransportConfigCompleteRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe response TLV 0x10 for WDSGetExtendedDataBearerTechnology() struct sWDSGetExtendedDataBearerTechnologyResponse_CurrentBearer { eQMIWDSDataBearerTechnologies mDataBearerTechnology; eQMIWDSRadioAccessTechnologies mRadioAccessTechnology; bool mWCDMA:1; bool mHSDPA:1; bool mHSUPA:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mHSPA:1; bool mGPRS:1; bool mEDGE:1; bool mGSM:1; bool mS2B:1; bool mLTELimitedService:1; bool mLTEFDD:1; bool mLTETDD:1; // Padding out 11 bits UINT8 mReserved1:2; UINT8 mReserved2; UINT8 mReserved3:1; bool m1xIS95:1; bool m1xIS2000:1; bool m1xIS2000RelA:1; bool mHDRRev0DPA:1; bool mHDRRevADPA:1; bool mHDRRevBDPA:1; bool mHDRRevAMPA:1; bool mHDRRevBMPA:1; bool mHDRRevAEMPA:1; bool mHDRRevBEMPA:1; bool mHDRRevBMMPA:1; bool mHDREVDOFMC:1; // Padding out 27 bits UINT8 mReserved4:3; UINT8 mReserved5[3]; }; // Structure to describe response TLV 0x11 for WDSGetExtendedDataBearerTechnology() struct sWDSGetExtendedDataBearerTechnologyResponse_LastBearer { eQMIWDSDataBearerTechnologies mDataBearerTechnology; eQMIWDSRadioAccessTechnologies mRadioAccessTechnology; bool mWCDMA:1; bool mHSDPA:1; bool mHSUPA:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mHSPA:1; bool mGPRS:1; bool mEDGE:1; bool mGSM:1; bool mS2B:1; bool mLTELimitedService:1; bool mLTEFDD:1; bool mLTETDD:1; // Padding out 11 bits UINT8 mReserved1:2; UINT8 mReserved2; UINT8 mReserved3:1; bool m1xIS95:1; bool m1xIS2000:1; bool m1xIS2000RelA:1; bool mHDRRev0DPA:1; bool mHDRRevADPA:1; bool mHDRRevBDPA:1; bool mHDRRevAMPA:1; bool mHDRRevBMPA:1; bool mHDRRevAEMPA:1; bool mHDRRevBEMPA:1; bool mHDRRevBMMPA:1; bool mHDREVDOFMC:1; // Padding out 27 bits UINT8 mReserved4:3; UINT8 mReserved5[3]; }; // Structure to describe response TLV 0x10 for WDSGetLTEMaximumAttachPDNNumber() struct sWDSGetLTEMaximumAttachPDNNumberResponse_Maximum { UINT8 mMaximumAttachPDNNumber; }; // Structure to describe request TLV 0x01 for WDSSetLTEAttachPDNList() struct sWDSSetLTEAttachPDNListRequest_AttachPDNList { UINT8 mAttachPDNListCount; // This array must be the size specified by mAttachPDNListCount // UINT16 mAttachPDNProfileID[1]; }; // Structure to describe response TLV 0x10 for WDSGetLTEAttachPDNList() struct sWDSGetLTEAttachPDNListResponse_AttachPDNList { UINT8 mAttachPDNListCount; // This array must be the size specified by mAttachPDNListCount // UINT16 mAttachPDNProfileID[1]; }; // Structure to describe indication TLV 0x10 for WDS LTEAttachPDNListIndication struct sWDSLTEAttachPDNListIndication_AttachPDNList { UINT8 mAttachPDNListCount; // This array must be the size specified by mAttachPDNListCount // UINT16 mAttachPDNProfileID[1]; }; // Structure to describe request TLV 0x01 for WDSSetLTEDataRetry() struct sWDSSetLTEDataRetryRequest_LTEDataRetry { INT8 mRetryLTEDataAttach; }; // Structure to describe response TLV 0x10 for WDSGetLTEDataRetry() struct sWDSGetLTEDataRetryResponse_LTEDataRetry { INT8 mRetryLTEDataAttach; }; // Structure to describe request TLV 0x01 for WDSSetLTEAttachType() struct sWDSSetLTEAttachTypeRequest_LTEAttachType { eQMIWDSLTEAttachTypes mLTEAttachType; }; // Structure to describe response TLV 0x10 for WDSGetLTEAttachType() struct sWDSGetLTEAttachTypeResponse_LTEAttachType { eQMIWDSLTEAttachTypes mLTEAttachType; }; // Structure to describe indication TLV 0x01 for WDS ReverseIPTransportFilterIndication struct sWDSReverseIPTransportFilterIndication_FilterType { eQMIWDSReverseIPTransportFilterTypes mReverseIPTransportFilterType; }; // Structure to describe indication TLV 0x10 for WDS ReverseIPTransportFilterIndication struct sWDSReverseIPTransportFilterIndication_SPI { UINT32 mSecurityParameterIndex; }; // Structure to describe indication TLV 0x01 for WDS HandoffInformationIndication struct sWDSHandoffInformationIndication_FilterType { eQMIWDSHandoffInfoTypes mHandoffInformation; }; // Structure to describe request TLV 0x10 for DMSSetEventReport() struct sDMSSetEventReportRequest_PowerState { INT8 mReportPowerState; }; // Structure to describe request TLV 0x11 for DMSSetEventReport() struct sDMSSetEventReportRequest_BatteryLevel { UINT8 mBatteryLevelLowerLimit; UINT8 mBatteryLevelUpperLimit; }; // Structure to describe request TLV 0x12 for DMSSetEventReport() struct sDMSSetEventReportRequest_PINStatus { INT8 mReportPINStatus; }; // Structure to describe request TLV 0x13 for DMSSetEventReport() struct sDMSSetEventReportRequest_ActivationState { INT8 mReportActivationState; }; // Structure to describe request TLV 0x14 for DMSSetEventReport() struct sDMSSetEventReportRequest_OperatingMode { INT8 mReportOperatingMode; }; // Structure to describe request TLV 0x15 for DMSSetEventReport() struct sDMSSetEventReportRequest_UIMState { INT8 mReportUIMState; }; // Structure to describe request TLV 0x16 for DMSSetEventReport() struct sDMSSetEventReportRequest_WirelessDisableState { INT8 mReportWirelessDisableState; }; // Structure to describe request TLV 0x17 for DMSSetEventReport() struct sDMSSetEventReportRequest_PRLInit { INT8 mReportPRLInitialization; }; // Structure to describe indication TLV 0x10 for DMS EventReport struct sDMSEventReportIndication_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe indication TLV 0x11 for DMS EventReport struct sDMSEventReportIndication_PIN1State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x12 for DMS EventReport struct sDMSEventReportIndication_PIN2State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x13 for DMS EventReport struct sDMSEventReportIndication_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe indication TLV 0x14 for DMS EventReport struct sDMSEventReportIndication_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x15 for DMS EventReport struct sDMSEventReportIndication_UIMState { eQMIDMSUIMStates mUIMState; }; // Structure to describe indication TLV 0x16 for DMS EventReport struct sDMSEventReportIndication_WirelessDisableState { INT8 mWirelessDisableOn; }; // Structure to describe indication TLV 0x17 for DMS EventReport struct sDMSEventReportIndication_PRLInit { INT8 mPRLLoaded; }; // Structure to describe response TLV 0x01 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_Capabilities { UINT32 mMaxTXRatebps; UINT32 mMaxRXRatebps; eQMIDMSDataServiceCapabilities1 mDataServiceCapability; INT8 mSIMSupported; UINT8 mRadioInterfaceCount; // This array must be the size specified by mRadioInterfaceCount // eQMIDMSRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_ServiceCapability { eQMIDMSServiceCapabilities mServiceCapability; }; // Structure to describe response TLV 0x11 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_VoiceCapability { bool mGWCSFBCapable:1; bool m1xCSFBCapable:1; bool mVoLTECapable:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x12 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_VoiceAndDataCapability { bool mSVLTE:1; bool mSVDO:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceManfacturer() struct sDMSGetDeviceManfacturerResponse_Manfacturer { // String is variable length, but must be size of the container // char mDeviceManfacturer[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceModel() struct sDMSGetDeviceModelResponse_Model { // String is variable length, but must be size of the container // char mDeviceModelID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_Revision { // String is variable length, but must be size of the container // char mDeviceRevisionID[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_BootCodeRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_UQCNRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_VoiceNumber { // String is variable length, but must be size of the container // char mDeviceVoiceNumber[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_MobileIDNumber { // String is variable length, but must be size of the container // char mDeviceMobileIDNumber[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_ESN { // String is variable length, but must be size of the container // char mESN[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_IMEI { // String is variable length, but must be size of the container // char mIMEI[1]; }; // Structure to describe response TLV 0x12 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_MEID { // String is variable length, but must be size of the container // char mMEID[1]; }; // Structure to describe response TLV 0x01 for DMSGetPowerState() struct sDMSGetPowerStateResponse_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe request TLV 0x01 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionRequest_Info { UINT8 mPINID; UINT8 mPINEnabled; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINRequest_Info { UINT8 mPINID; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINRequest_Info1 { UINT8 mPINID; UINT8 mPUKLength; // This array must be the size specified by mPUKLength // char mPUKValue[1]; }; struct sDMSUIMUnblockPINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMUnblockPINRequest_Info { sDMSUIMUnblockPINRequest_Info1 mDMSUIMUnblockPINRequest_Info1; sDMSUIMUnblockPINRequest_Info2 mDMSUIMUnblockPINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMChangePIN() struct sDMSUIMChangePINRequest_Info1 { UINT8 mPINID; UINT8 mOldPINLength; // This array must be the size specified by mOldPINLength // char mOldPINValue[1]; }; struct sDMSUIMChangePINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMChangePINRequest_Info { sDMSUIMChangePINRequest_Info1 mDMSUIMChangePINRequest_Info1; sDMSUIMChangePINRequest_Info2 mDMSUIMChangePINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMChangePIN() struct sDMSUIMChangePINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN1Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x12 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN2Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetHardwareRevision() struct sDMSGetHardwareRevisionResponse_HardwareRevision { // String is variable length, but must be size of the container // char mDeviceHardwareRevision[1]; }; // Structure to describe response TLV 0x01 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x10 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OfflineReason { UINT8 mHostImageMismatch:1; UINT8 mUQCNImageMismatch:1; UINT8 mIncompatibleUQCN:1; UINT8 mUQCNCopyIssue:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_PlatformRestricted { INT8 mPlatformRestricted; }; // Structure to describe request TLV 0x01 for DMSSetOperatingMode() struct sDMSSetOperatingModeRequest_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x01 for DMSGetTimestamp() struct sDMSGetTimestampResponse_Timestamp { UINT64 mTimestamp:48; // mSource is of type eQMIDMSTimestampSources UINT64 mSource:16; }; // Structure to describe response TLV 0x01 for DMSGetPRLVersion() struct sDMSGetPRLVersionResponse_PRLVersion { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x01 for DMSGetActivationState() struct sDMSGetActivationStateResponse_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe request TLV 0x01 for DMSActivateAutomatic() struct sDMSActivateAutomaticRequest_ActivationCode { UINT8 mCodeLength; // This array must be the size specified by mCodeLength // char mCode[1]; }; // Structure to describe request TLV 0x01 for DMSActivateManual() struct sDMSActivateManualRequest_ActivationData1 { char mSPC[6]; UINT16 mSID; UINT8 mMDNLength; // This array must be the size specified by mMDNLength // char mMDN[1]; }; struct sDMSActivateManualRequest_ActivationData2 { UINT8 mMINLength; // This array must be the size specified by mMINLength // char mMIN[1]; }; struct sDMSActivateManualRequest_ActivationData { sDMSActivateManualRequest_ActivationData1 mDMSActivateManualRequest_ActivationData1; sDMSActivateManualRequest_ActivationData2 mDMSActivateManualRequest_ActivationData2; }; // Structure to describe request TLV 0x10 for DMSActivateManual() struct sDMSActivateManualRequest_PRLObsolete { UINT16 mPRLLength; // This array must be the size specified by mPRLLength // UINT8 mPRL[1]; }; // Structure to describe request TLV 0x11 for DMSActivateManual() struct sDMSActivateManualRequest_MNHAKey { UINT8 mMNHALength; // This array must be the size specified by mMNHALength // char mMNHA[1]; }; // Structure to describe request TLV 0x12 for DMSActivateManual() struct sDMSActivateManualRequest_MNAAAKey { UINT8 mMNAAALength; // This array must be the size specified by mMNAAALength // char mMNAAA[1]; }; // Structure to describe request TLV 0x13 for DMSActivateManual() struct sDMSActivateManualRequest_PRL { UINT16 mPRLTotalLength; UINT16 mPRLSegmentLength; UINT8 mPRLSegmentID; // This array must be the size specified by mPRLSegmentLength // UINT8 mPRL[1]; }; // Structure to describe response TLV 0x01 for DMSGetLockState() struct sDMSGetLockStateResponse_LockState { eQMIDMSLockStates mLockState; }; // Structure to describe request TLV 0x01 for DMSSetLockState() struct sDMSSetLockStateRequest_LockState { eQMIDMSLockStates mLockState; char mLockCode[4]; }; // Structure to describe request TLV 0x01 for DMSSetLockCode() struct sDMSSetLockCodeRequest_LockCode { char mCurrentLockCode[4]; char mNewLockCode[4]; }; // Structure to describe response TLV 0x01 for DMSReadUserData() struct sDMSReadUserDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSWriteUserData() struct sDMSWriteUserDataRequest_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x01 for DMSReadERIData() struct sDMSReadERIDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSResetFactoryDefaults() struct sDMSResetFactoryDefaultsRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x01 for DMSValidateSPC() struct sDMSValidateSPCRequest_SPC { char mSPC[6]; }; // Structure to describe response TLV 0x01 for DMSUIMGetICCID() struct sDMSUIMGetICCIDResponse_ICCID { // String is variable length, but must be size of the container // char mICCID[1]; }; // Structure to describe response TLV 0x01 for DMSUIMGetHostLockID() struct sDMSUIMGetHostLockIDResponse_ID { UINT32 mHostLockCode; }; // Structure to describe request TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusRequest_Facility { eQMIDMSUIMFacility mFacility; }; // Structure to describe response TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Status { eQMIDMSUIMFacilityStates mFacilityState; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x10 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Blocking { INT8 mOperationBlocking; }; // Structure to describe request TLV 0x01 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionRequest_Facility { eQMIDMSUIMFacility mFacility; eQMIDMSUIMFacilityStates mFacilityState; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionResponse_Status { UINT8 mRemainingVerifyRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyRequest_Facility { eQMIDMSUIMFacility mFacility; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyResponse_Status { UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetIMSI() struct sDMSGetIMSIResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x01 for DMSGetUIMState() struct sDMSGetUIMStateResponse_State { eQMIDMSUIMStates mUIMState; }; // Structure to describe response TLV 0x01 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_Bands { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x10 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_LTEBands { bool mEUTRANBand1:1; bool mEUTRANBand2:1; bool mEUTRANBand3:1; bool mEUTRANBand4:1; bool mEUTRANBand5:1; bool mEUTRANBand6:1; bool mEUTRANBand7:1; bool mEUTRANBand8:1; bool mEUTRANBand9:1; bool mEUTRANBand10:1; bool mEUTRANBand11:1; bool mEUTRANBand12:1; bool mEUTRANBand13:1; bool mEUTRANBand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRANBand17:1; bool mEUTRANBand18:1; bool mEUTRANBand19:1; bool mEUTRANBand20:1; bool mEUTRANBand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRANBand24:1; bool mEUTRANBand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRANBand33:1; bool mEUTRANBand34:1; bool mEUTRANBand35:1; bool mEUTRANBand36:1; bool mEUTRANBand37:1; bool mEUTRANBand38:1; bool mEUTRANBand39:1; bool mEUTRANBand40:1; bool mEUTRANBand41:1; // Padding out 23 bits UINT8 mReserved4:7; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x11 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_TDSBands { bool mTDSBandA:1; bool mTDSBandB:1; bool mTDSBandC:1; bool mTDSBandD:1; bool mTDSBandE:1; bool mTDSBandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetFactorySerialNumber() struct sDMSGetFactorySerialNumberResponse_ID { // String is variable length, but must be size of the container // char mFactorySerialNumber[1]; }; // Structure to describe request TLV 0x01 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Time { UINT64 mTimeInMilliseconds; }; // Structure to describe request TLV 0x10 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Type { eQMIDMSTimeReferences mTimeReference; }; // Structure to describe response TLV 0x01 for DMSGetSoftwareVersion() struct sDMSGetSoftwareVersionResponse_Version { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe request TLV 0x01 for DMSSetSPC() struct sDMSSetSPCRequest_CurrentSPC { char mCurrentSPC[6]; }; // Structure to describe request TLV 0x02 for DMSSetSPC() struct sDMSSetSPCRequest_NewSPC { char mNewSPC[6]; }; // Structure to describe response TLV 0x10 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Version { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x11 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Preference { INT8 mPRLOnlyPreferenceSet; }; // Structure to describe request TLV 0x01 for DMSBindSubscription() struct sDMSBindSubscriptionRequest_Subscription { eQMIDMSSubscriptions mSubscription; }; // Structure to describe response TLV 0x10 for DMSGetSubscription() struct sDMSGetSubscriptionResponse_Subscription { eQMIDMSSubscriptions mSubscription; }; // Structure to describe request TLV 0x10 for NASSetEventReport() struct sNASSetEventReportRequest_SignalIndicator { INT8 mReportSignalStrength; UINT8 mNumberOfThresholds; // This array must be the size specified by mNumberOfThresholds // INT8 mSignalStrengthThresholddBm[1]; }; // Structure to describe request TLV 0x11 for NASSetEventReport() struct sNASSetEventReportRequest_RFIndicator { INT8 mReportRFInfo; }; // Structure to describe request TLV 0x12 for NASSetEventReport() struct sNASSetEventReportRequest_RegistrationRejectIndicator { INT8 mReportLUReject; }; // Structure to describe request TLV 0x13 for NASSetEventReport() struct sNASSetEventReportRequest_RSSIIndicator { INT8 mReportRSSI; UINT8 mRSSIDelta; }; // Structure to describe request TLV 0x14 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOIndicator { INT8 mReportECIO; UINT8 mECIODelta; }; // Structure to describe request TLV 0x15 for NASSetEventReport() struct sNASSetEventReportRequest_IOIndicator { INT8 mReportIO; UINT8 mIODelta; }; // Structure to describe request TLV 0x16 for NASSetEventReport() struct sNASSetEventReportRequest_SINRIndicator { INT8 mReportSINR; UINT8 mSINRDelta; }; // Structure to describe request TLV 0x17 for NASSetEventReport() struct sNASSetEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x18 for NASSetEventReport() struct sNASSetEventReportRequest_RSRQIndicator { INT8 mReportRSRQ; UINT8 mRSRQDelta; }; // Structure to describe request TLV 0x19 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOThreshold { INT8 mReportECIO; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1A for NASSetEventReport() struct sNASSetEventReportRequest_SINRThreshold { INT8 mReportSINR; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x1B for NASSetEventReport() struct sNASSetEventReportRequest_LTESNRDelta { INT8 mReportLTESNR; UINT16 mLTESNRDelta; }; // Structure to describe request TLV 0x1C for NASSetEventReport() struct sNASSetEventReportRequest_LTERSPSDelta { INT8 mReportLTERSRP; UINT8 mLTERSRPDelta; }; // Structure to describe indication TLV 0x10 for NAS EventReport struct sNASEventReportIndication_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x11 for NAS EventReport struct sNASEventReportIndication_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for NAS EventReport struct sNASEventReportIndication_RegistrationReject { eQMINASServiceDomains mServiceDomain; UINT16 mRejectCause; }; // Structure to describe indication TLV 0x13 for NAS EventReport struct sNASEventReportIndication_RSSI { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x14 for NAS EventReport struct sNASEventReportIndication_ECIO { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x15 for NAS EventReport struct sNASEventReportIndication_IO { UINT32 mIO; }; // Structure to describe indication TLV 0x16 for NAS EventReport struct sNASEventReportIndication_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe indication TLV 0x17 for NAS EventReport struct sNASEventReportIndication_ErrorRate { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x18 for NAS EventReport struct sNASEventReportIndication_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x19 for NAS EventReport struct sNASEventReportIndication_LTESNR { INT16 mLTESNR; }; // Structure to describe indication TLV 0x1A for NAS EventReport struct sNASEventReportIndication_LTERSRP { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemSelectIndicator { INT8 mReportSystemSelect; }; // Structure to describe request TLV 0x12 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DDTMIndicator { INT8 mReportDDTM; }; // Structure to describe request TLV 0x13 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ServingSystemIndicator { INT8 mReportServingSystem; }; // Structure to describe request TLV 0x14 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DualStandbyIndicator { INT8 mReportDualStandby; }; // Structure to describe request TLV 0x15 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SubscriptionInformationIndicator { INT8 mReportSubscriptionInformation; }; // Structure to describe request TLV 0x17 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkTimeIndicator { INT8 mReportNetworkTime; }; // Structure to describe request TLV 0x18 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemInformationIndicator { INT8 mReportSystemInformation; }; // Structure to describe request TLV 0x19 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SignalStrengthIndicator { INT8 mReportSignalStrength; }; // Structure to describe request TLV 0x1A for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x1B for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NewEVDOUATIIndicator { INT8 mReportNewEVDOUATI; }; // Structure to describe request TLV 0x1C for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EVDOSessionIndicator { INT8 mReportEVDOSessionClose; }; // Structure to describe request TLV 0x1D for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ManagedRoamingIndicator { INT8 mReportManagedRoaming; }; // Structure to describe request TLV 0x1E for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CurrentPLMNName { INT8 mReportCurrentPLMNName; }; // Structure to describe request TLV 0x1F for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EMBMSStatus { INT8 mReportEMBMSStatus; }; // Structure to describe request TLV 0x20 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RFBandInfo { INT8 mReportRFBandInfo; }; // Structure to describe request TLV 0x21 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkReject { INT8 mNetworkRejectEnabled; INT8 mSupressSytemInfoEnabled; }; // Structure to describe request TLV 0x22 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_OperatorNameData { INT8 mOperatorNameDataEnabled; }; // Structure to describe request TLV 0x23 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CSPPLMNModeBit { INT8 mCSPPLMNModeBitEnabled; }; // Structure to describe request TLV 0x24 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RTREConfiguration { INT8 mRTREConfigurationEnabled; }; // Structure to describe request TLV 0x25 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_IMSPreference { INT8 mIMSPreferenceEnabled; }; // Structure to describe request TLV 0x26 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_E911State { INT8 mE911StateReadyEnabled; }; // Structure to describe request TLV 0x27 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_LTESIB16NetworkTime { INT8 mLTESIB16NetworkTimeEnabled; }; // Structure to describe request TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthRequest_RequestMask { bool mQueryRSSI:1; bool mQueryECIO:1; bool mQueryIO:1; bool mQuerySINR:1; bool mQueryErrorRate:1; bool mQueryRSRQ:1; bool mQueryLTESNR:1; bool mQueryLTERSRQ:1; // Padding out 8 bits UINT8 mReserved1; }; // Structure to describe response TLV 0x01 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrengthList { UINT16 mNumberOfInfoInstances; struct sInfo { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x11 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSSIList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x12 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ECIOList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x13 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_IO { UINT32 mIO; }; // Structure to describe response TLV 0x14 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe response TLV 0x15 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ErrorRateList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x16 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x17 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTESNR { INT16 mLTESNR; }; // Structure to describe response TLV 0x18 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTERSRQ { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanRequest_NetworkMask { bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe request TLV 0x11 for NASPerformNetworkScan() struct sNASPerformNetworkScanRequest_ScanType { eQMINASNetworkScanTypes mScanType; }; // Structure to describe response TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkInfo { UINT16 mNumberOfInfoInstances; struct sNetworkInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASInUseStates mInUseStatus:2; eQMINASRoamingStates mRoamingStatus:2; eQMINASForbiddenStates mForbiddenStatus:2; eQMINASPreferredStates mPreferredStatus:2; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // This array must be the size specified by mNumberOfInfoInstances // sNetworkInfo mNetworkInfos[1]; }; // Structure to describe response TLV 0x11 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkRAT { UINT16 mNumberOfInfoInstances; struct sInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x12 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_PCSInfo { UINT16 mPCSInfoCount; struct sPCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mPCSInfoCount // sPCSInfo mPCSInfos[1]; }; // Structure to describe response TLV 0x13 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkScanResult { eQMINASNetworkScanResult mNetworkScanResult; }; // Structure to describe response TLV 0x14 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_CSGInfo { UINT8 mCSGInfoCount; struct sInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASClosedSubscriberGroupCategories mCategory; UINT8 mNameLength; // This array must be the size specified by mNameLength // wchar_t mName[1]; }; // This array must be the size specified by mCSGInfoCount // sInfo mInfos[1]; }; // Structure to describe request TLV 0x01 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_Action { eQMINASRegisterActions mRegisterAction; }; // Structure to describe request TLV 0x10 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ManualInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x11 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x12 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASInitiateAttach() struct sNASInitiateAttachRequest_Action { eQMINASPSAttachActions mPSAttachAction; }; // Structure to describe response TLV 0x01 for NASGetServingSystem() struct sNASGetServingSystemResponse_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x11 for NASGetServingSystem() struct sNASGetServingSystemResponse_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe response TLV 0x12 for NASGetServingSystem() struct sNASGetServingSystemResponse_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x13 for NASGetServingSystem() struct sNASGetServingSystemResponse_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x14 for NASGetServingSystem() struct sNASGetServingSystemResponse_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x15 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for NASGetServingSystem() struct sNASGetServingSystemResponse_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x17 for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe response TLV 0x18 for NASGetServingSystem() struct sNASGetServingSystemResponse_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe response TLV 0x1A for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe response TLV 0x1B for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPDaylightSavingsAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe response TLV 0x1C for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe response TLV 0x1D for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPCellID { UINT32 mCellID; }; // Structure to describe response TLV 0x1E for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe response TLV 0x1F for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe response TLV 0x20 for NASGetServingSystem() struct sNASGetServingSystemResponse_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe response TLV 0x21 for NASGetServingSystem() struct sNASGetServingSystemResponse_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe response TLV 0x22 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe response TLV 0x23 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe response TLV 0x24 for NASGetServingSystem() struct sNASGetServingSystemResponse_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x25 for NASGetServingSystem() struct sNASGetServingSystemResponse_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x26 for NASGetServingSystem() struct sNASGetServingSystemResponse_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x27 for NASGetServingSystem() struct sNASGetServingSystemResponse_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x28 for NASGetServingSystem() struct sNASGetServingSystemResponse_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe indication TLV 0x01 for NAS ServingSystemIndication struct sNASServingSystemIndication_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x10 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x11 for NAS ServingSystemIndication struct sNASServingSystemIndication_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe indication TLV 0x12 for NAS ServingSystemIndication struct sNASServingSystemIndication_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe indication TLV 0x13 for NAS ServingSystemIndication struct sNASServingSystemIndication_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe indication TLV 0x14 for NAS ServingSystemIndication struct sNASServingSystemIndication_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe indication TLV 0x15 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for NAS ServingSystemIndication struct sNASServingSystemIndication_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x17 for NAS ServingSystemIndication struct sNASServingSystemIndication_TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe indication TLV 0x18 for NAS ServingSystemIndication struct sNASServingSystemIndication_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe indication TLV 0x19 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChange { INT8 mPLMNChanged; }; // Structure to describe indication TLV 0x1A for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe indication TLV 0x1B for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPDaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x1C for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPUniversalTimeAndZone { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x1D for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe indication TLV 0x1E for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPCellID { UINT32 mCellID; }; // Structure to describe indication TLV 0x1F for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe indication TLV 0x20 for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe indication TLV 0x21 for NAS ServingSystemIndication struct sNASServingSystemIndication_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe indication TLV 0x22 for NAS ServingSystemIndication struct sNASServingSystemIndication_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe indication TLV 0x23 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe indication TLV 0x24 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe indication TLV 0x25 for NAS ServingSystemIndication struct sNASServingSystemIndication_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x26 for NAS ServingSystemIndication struct sNASServingSystemIndication_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x27 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChangeStatus { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x28 for NAS ServingSystemIndication struct sNASServingSystemIndication_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x29 for NAS ServingSystemIndication struct sNASServingSystemIndication_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x2A for NAS ServingSystemIndication struct sNASServingSystemIndication_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe response TLV 0x01 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeIDs { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x11 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_ExtendedHomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASNetworkDescriptionDisplays mDisplayNetworkDescription; eQMINASNetworkDescriptionEncodings mNetworkDescriptionEncoding; UINT8 mNetworkDescriptionLength; // This array must be the size specified by mNetworkDescriptionLength // UINT8 mNetworkDescription[1]; }; // Structure to describe response TLV 0x12 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_3GPPHomeNetworkMNC { INT8 mHomeNetworkIs3GPP; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x10 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x11 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_StaticNetworks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x12 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_NetworksWithPCSDigitStatus { UINT8 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x13 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_StaticNetworksWithPCSDigitStatus { UINT8 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetPreferredNetworks() struct sNASSetPreferredNetworksRequest_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x11 for NASSetPreferredNetworks() struct sNASSetPreferredNetworksRequest_NetworksWithPCSDigitStatus { UINT8 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x12 for NASSetPreferredNetworks() struct sNASSetPreferredNetworksRequest_Clear { INT8 mClearPreferredNetworks; }; // Structure to describe response TLV 0x10 for NASGetForbiddenNetworks() struct sNASGetForbiddenNetworksResponse_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetForbiddenNetworks() struct sNASSetForbiddenNetworksRequest_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for NASSetTechnologyPreference() struct sNASSetTechnologyPreferenceRequest_Preference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x01 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_ActivePreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x10 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_PersistentPreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; }; // Structure to describe response TLV 0x01 for NASGetACCOLC() struct sNASGetACCOLCResponse_ACCOLC { UINT8 mACCOLC; }; // Structure to describe request TLV 0x01 for NASSetACCOLC() struct sNASSetACCOLCRequest_ACCOLC { char mSPC[6]; UINT8 mACCOLC; }; // Structure to describe indication TLV 0x01 for NAS GetSystemPreference struct sNASGetSystemPreferenceIndication_Pref { eQMINASSystemPreferences mSystemPreference; }; // Structure to describe response TLV 0x11 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCI { UINT8 mSlotCycleIndex; }; // Structure to describe response TLV 0x12 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCM { UINT8 mStationClassMark; }; // Structure to describe response TLV 0x13 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Registration { INT8 mRegisterOnHomeSystem; INT8 mRegisterOnForeignSystem; INT8 mRegisterOnForeignNetwork; }; // Structure to describe response TLV 0x14 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe response TLV 0x15 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe response TLV 0x16 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x17 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_ForceCDMA1xEVDOSCP { eQMINASForceCDMA1xEVDOSCP mForceCDMA1xEVDOSCP; }; // Structure to describe request TLV 0x10 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x14 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe request TLV 0x15 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe request TLV 0x16 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x01 for NASGetRFInfo() struct sNASGetRFInfoResponse_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x01 for NASGetANAAAAuthenticationStatus() struct sNASGetANAAAAuthenticationStatusResponse_Status { eQMINASANAAAAuthenticationStatus mANAAAAuthenticationStatus; }; // Structure to describe request TLV 0x10 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe request TLV 0x11 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x12 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe request TLV 0x13 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe request TLV 0x14 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe request TLV 0x15 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe request TLV 0x16 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x17 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x18 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ServiceDomain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x19 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_GWAcquisitionOrder { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x1A for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x1B for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x1C for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x1D for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x1E for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe request TLV 0x1F for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe request TLV 0x20 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_CSGID { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; UINT32 mCSGID; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x21 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ModemUsagePreference { eQMINASModemUsagePreferences mModemUsagePreference; }; // Structure to describe request TLV 0x22 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe response TLV 0x11 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x12 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x13 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe response TLV 0x14 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe response TLV 0x15 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x16 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe response TLV 0x18 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe response TLV 0x19 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe response TLV 0x1A for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1B for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x1C for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x1D for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe response TLV 0x1E for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_CSGID { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; UINT32 mCSGID; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe response TLV 0x1F for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_ModemUsagePreference { eQMINASModemUsagePreferences mModemUsagePreference; }; // Structure to describe indication TLV 0x10 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe indication TLV 0x11 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe indication TLV 0x12 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe indication TLV 0x13 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe indication TLV 0x14 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe indication TLV 0x15 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe indication TLV 0x16 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe indication TLV 0x18 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe indication TLV 0x19 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe indication TLV 0x1A for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x1B for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x1C for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x1D for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe indication TLV 0x1E for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_CSGID { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; UINT32 mCSGID; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe indication TLV 0x1F for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_ModemUsagePreference { eQMINASModemUsagePreferences mModemUsagePreference; }; // Structure to describe request TLV 0x01 for NASSetDDTMPreference() struct sNASSetDDTMPreferenceRequest_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x01 for NASGetDDTMPreference() struct sNASGetDDTMPreferenceResponse_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe indication TLV 0x01 for NAS DDTMPreferenceIndication struct sNASDDTMPreferenceIndication_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x10 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe response TLV 0x11 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe response TLV 0x12 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe response TLV 0x13 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe response TLV 0x14 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation { sNASGetOperatorNameDataResponse_NITZInformation1 mNASGetOperatorNameDataResponse_NITZInformation1; sNASGetOperatorNameDataResponse_NITZInformation2 mNASGetOperatorNameDataResponse_NITZInformation2; }; // Structure to describe indication TLV 0x10 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x11 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe indication TLV 0x12 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe indication TLV 0x13 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe indication TLV 0x14 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASOperatorNameDataIndication_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASOperatorNameDataIndication_NITZInformation { sNASOperatorNameDataIndication_NITZInformation1 mNASOperatorNameDataIndication_NITZInformation1; sNASOperatorNameDataIndication_NITZInformation2 mNASOperatorNameDataIndication_NITZInformation2; }; // Structure to describe response TLV 0x10 for NASGetCSPPLMNMode() struct sNASGetCSPPLMNModeResponse_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe indication TLV 0x10 for NAS CSPPLMNModeIndication struct sNASCSPPLMNModeIndication_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe request TLV 0x01 for NASUpdateAKEY() struct sNASUpdateAKEYRequest_AKEY { char mAKEY[26]; }; // Structure to describe request TLV 0x01 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_InfoMask { bool mNAMName:1; bool mDirectoryNumber:1; bool mHomeID:1; bool mMINBasedIMSI:1; bool mTrueIMSI:1; bool mCDMAChannel:1; bool mMobileDirectoryNumber:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe response TLV 0x11 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe response TLV 0x12 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe response TLV 0x13 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x14 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x15 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe response TLV 0x16 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe request TLV 0x01 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe request TLV 0x11 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe request TLV 0x12 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x13 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x14 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe request TLV 0x15 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe request TLV 0x16 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe request TLV 0x17 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_SPC { char mSPC[6]; }; // Structure to describe response TLV 0x10 for NASGetMobileCAIRevision() struct sNASGetMobileCAIRevisionResponse_CAIRevision { eQMINASRevision mCAIRevision; }; // Structure to describe response TLV 0x10 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_CurrentRTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x11 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_RTREConfigPreference { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe request TLV 0x01 for NASSetRTREConfig() struct sNASSetRTREConfigRequest_RTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe request TLV 0x10 for NASSetRTREConfig() struct sNASSetRTREConfigRequest_SPC { char mSPC[6]; }; // Structure to describe response TLV 0x10 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_GERANInfo { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; UINT32 mTimingAdvance; eQMINASRXLevel mRXLevel; UINT8 mNMRCellCount; struct sNMRCell { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileCountryCode0:4; UINT8 mPLMNMobileCountryCode1:4; UINT8 mPLMNMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileNetworkCode0:4; UINT8 mPLMNMobileNetworkCode1:4; UINT8 mPLMNMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBaseStationIdentityCodeBCC:3; UINT8 mBaseStationIdentityCodeNCC:3; // Padding out 2 bits UINT8 mReserved2:2; eQMINASRXLevel mRXLevel; }; // This array must be the size specified by mNMRCellCount // sNMRCell mNMRCells[1]; }; // Structure to describe response TLV 0x11 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSInfo1 { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; UINT8 mUTRAUMTSMonitoredCellCount; struct sUMTSMonitoredCell { UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; }; // This array must be the size specified by mUTRAUMTSMonitoredCellCount // sUMTSMonitoredCell mUMTSMonitoredCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo2 { UINT8 mGERANNBRCellCount; struct sGERANNBRCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mNetworkColorCode; UINT8 mBaseStationColorCode; INT16 mRSSI; }; // This array must be the size specified by mGERANNBRCellCount // sGERANNBRCell mGERANNBRCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo { sNASGetCellLocationInfoResponse_UMTSInfo1 mNASGetCellLocationInfoResponse_UMTSInfo1; sNASGetCellLocationInfoResponse_UMTSInfo2 mNASGetCellLocationInfoResponse_UMTSInfo2; }; // Structure to describe response TLV 0x12 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_CDMAInfo { UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mReferencePN; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x13 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_IntrafrequencyLTEInfo { INT8 mUEInIdleMode; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mTrackingAreaCode; UINT32 mGlobalCellID; UINT16 mEUTRAAbsoluteRFChannelNumber; UINT16 mServingCellID; UINT8 mCellReselectionPriority; UINT8 mSNonIntraSearchThreshold; UINT8 mServingCellLowThreshold; UINT8 mSIntraSearchThreshold; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // Structure to describe response TLV 0x14 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_InterfrequencyLTEInfo { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mEUTRAAbsoluteRFChannelNumber; UINT8 mCellSelectionRXLevelLowThreshold; UINT8 mCellSelectionRXLevelHighThreshold; UINT8 mCellReselectionPriority; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x15 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringGSM { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; // Bitfield arrays are not possible in c, unrolling the array bool mNCCPermitted0:1; bool mNCCPermitted1:1; bool mNCCPermitted2:1; bool mNCCPermitted3:1; bool mNCCPermitted4:1; bool mNCCPermitted5:1; bool mNCCPermitted6:1; bool mNCCPermitted7:1; UINT8 mCellCount; struct sCell { UINT16 mAbsoluteRFChannelNumber; INT8 mBandIs1900; INT8 mCellIDValid; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x16 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringWCDMA { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; UINT8 mCellCount; struct sCell { UINT16 mPrimaryScramblingCode; INT16 mCPICHRSCP; INT16 mCPICHEcNo; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x17 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSCellID { UINT32 mCellID; }; // Structure to describe response TLV 0x18 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_WCDMAInfoNeighboringLTE { eQMINASWCDMARRCStates mWCDMARRCState; UINT8 mNeighborCellCount; struct sNeighborCell { UINT16 mEUTRAAbsoluteRFChannelNumber; UINT16 mPhysicalCellID; float mRSRPdBm; float mRSRQdB; INT16 mCellSelectionRXLevel; INT8 mCellIsTDD; }; // This array must be the size specified by mNeighborCellCount // sNeighborCell mNeighborCells[1]; }; // Structure to describe response TLV 0x19 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_CDMARXInfo { float mRX0AGC; float mRX1AGC; }; // Structure to describe response TLV 0x1A for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_CDMA1xEVRXInfo { float mRX0AGC; float mRX1AGC; }; // Structure to describe response TLV 0x1B for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_GSMExtendedCellInfo { UINT16 mUERangeFromBSInSteps; UINT16 mBCCHAssignedChannel; }; // Structure to describe response TLV 0x1C for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_WCDMAExtendedCellInfo { float mRXAGC; float mTXAGC; UINT16 mDownlinkBLERPercentage; }; // Structure to describe response TLV 0x1D for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_WCDMAGSMExtendedNeighborCell { UINT8 mGSMNeighborCount; // This array must be the size specified by mGSMNeighborCount // UINT16 mGSMNeighborBCCHAssignedChannel[1]; }; // Structure to describe response TLV 0x1E for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTETimingAdvance { UINT32 mTimingAdvance; }; // Structure to describe response TLV 0x1F for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_WCDMAActiveSet { UINT8 mActiveSetEntries; struct sActiveSetEntry { UINT16 mPrimaryScramblingCode; UINT32 mCellID; INT16 mReceivedSignalCodePower; INT16 mECIO; UINT16 mUTRAAbsoluteRFChannelNumber; }; // This array must be the size specified by mActiveSetEntries // sActiveSetEntry mActiveSetEntrys[1]; }; // Structure to describe response TLV 0x20 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_WCDMAActiveSetReference { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; UINT16 mRoutingAreaCode; }; // Structure to describe request TLV 0x01 for NASGetPLMNName() struct sNASGetPLMNNameRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameRequest_SupressSIMError { INT8 mSIMInitNotChecked; }; // Structure to describe request TLV 0x11 for NASGetPLMNName() struct sNASGetPLMNNameRequest_MNCPCSDigitIncludeStatus { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x12 for NASGetPLMNName() struct sNASGetPLMNNameRequest_AlwaysSendPLMNName { INT8 mAlwaysSendPLMNName; }; // Structure to describe request TLV 0x13 for NASGetPLMNName() struct sNASGetPLMNNameRequest_UseStaticTableOnly { INT8 mUseStaticTableOnly; }; // Structure to describe request TLV 0x14 for NASGetPLMNName() struct sNASGetPLMNNameRequest_CSGID { UINT32 mCSGID; }; // Structure to describe request TLV 0x15 for NASGetPLMNName() struct sNASGetPLMNNameRequest_RAT { eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe response TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameResponse_Name1 { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; struct sNASGetPLMNNameResponse_Name2 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetPLMNNameResponse_Name3 { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetPLMNNameResponse_Name { sNASGetPLMNNameResponse_Name1 mNASGetPLMNNameResponse_Name1; sNASGetPLMNNameResponse_Name2 mNASGetPLMNNameResponse_Name2; sNASGetPLMNNameResponse_Name3 mNASGetPLMNNameResponse_Name3; }; // Structure to describe response TLV 0x11 for NASGetPLMNName() struct sNASGetPLMNNameResponse_DisplayBitInfo { eQMINASTriStatus mIsSPNSet; eQMINASTriStatus mIsPLMNSet; }; // Structure to describe response TLV 0x12 for NASGetPLMNName() struct sNASGetPLMNNameResponse_NetworkInfo { eQMINASTriStatus mIsHomeNetwork; }; // Structure to describe request TLV 0x01 for NASBindSubscription() struct sNASBindSubscriptionRequest_SubscriptionType { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x10 for NAS ManagedRoamingIndication struct sNASManagedRoamingIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x10 for NAS DualStandbyPrefIndication struct sNASDualStandbyPrefIndication_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; eQMINASSubscriptionType mPrioritySubscription; eQMINASSubscriptionType mActiveSubscription; eQMINASSubscriptionType mDefaultDataSubscription; }; // Structure to describe indication TLV 0x11 for NAS DualStandbyPrefIndication struct sNASDualStandbyPrefIndication_VoiceSubscription { eQMINASSubscriptionType mDefaultVoiceSubscription; }; // Structure to describe indication TLV 0x10 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_PrioritySubscriptionInfo { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x11 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_ActiveSubscriptionInfo { eQMINASActiveSubscription mActiveSubscription; }; // Structure to describe indication TLV 0x12 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_DefaultDataSubscriptionInfo { INT8 mDefaultDataSubscription; }; // Structure to describe indication TLV 0x13 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_VoiceSystemID { UINT32 mVoiceSystemID; }; // Structure to describe response TLV 0x10 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX0 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX1 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x12 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX2 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x10 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe request TLV 0x11 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x12 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x13 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_DefaultVoiceSubs { eQMINASSubscriptionType mDefaultVoiceSubscription; }; // Structure to describe indication TLV 0x01 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_UniversalTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; }; // Structure to describe indication TLV 0x10 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_TimeZone { INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x11 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_DaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x12 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x11 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x12 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x13 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x14 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x15 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe response TLV 0x16 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe response TLV 0x17 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe response TLV 0x18 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x19 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x1A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe response TLV 0x1B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x20 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x21 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe response TLV 0x22 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x23 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x24 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x25 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x26 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe response TLV 0x27 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe response TLV 0x28 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe response TLV 0x29 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe response TLV 0x2A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoiceDomain { eQMINASVoiceDomains mLTEVoiceDomain; }; // Structure to describe response TLV 0x2B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMARegZoneID { UINT16 mCDMARegZoneID; }; // Structure to describe response TLV 0x2C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMRAC { UINT8 mGSMRoutingAreaCode; }; // Structure to describe response TLV 0x2D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMARAC { UINT8 mWCDMARoutingAreaCode; }; // Structure to describe response TLV 0x2E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAResolvedMCC { UINT16 mCDMAMCCResolvedViaSIDLookup; }; // Structure to describe response TLV 0x2F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe response TLV 0x30 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x31 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTERegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x32 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x33 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMRegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x34 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_EMBMSTraceID { INT16 mEMBMSTraceID; }; // Structure to describe response TLV 0x35 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACSGInfo { UINT32 mCSGID; UINT8 mNameLength; // This array must be the size specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x36 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVVoiceDomain { eQMINASVoiceDomains mCDMA1xEVVoiceDomain; }; // Structure to describe response TLV 0x37 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVSMSDomain { eQMINASSMSDomains mCDMA1xEVSMSDomain; }; // Structure to describe response TLV 0x38 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTESMSDomain { eQMINASSMSDomains mLTESMSDomain; }; // Structure to describe response TLV 0x39 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEEmergencyBearer { eQMINASTriStatus mLTEEmergencyBearerSupported; }; // Structure to describe response TLV 0x3A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe response TLV 0x3B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMSMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe response TLV 0x3C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe response TLV 0x3D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMASMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe response TLV 0x3E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEEmergencyAccessBarred { eQMINASTriStatus mLTEEmergencyAccessBarred; }; // Structure to describe response TLV 0x3F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe response TLV 0x40 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMASMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe response TLV 0x41 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMAVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe response TLV 0x42 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMASMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe response TLV 0x43 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTECSGInfo { UINT32 mCSGID; UINT8 mNameLength; // This array must be the size specified by mNameLength // wchar_t mName[1]; }; // Structure to describe indication TLV 0x10 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x11 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x12 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x13 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x14 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x15 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe indication TLV 0x16 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe indication TLV 0x17 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe indication TLV 0x18 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x19 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x1A for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe indication TLV 0x1B for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1C for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1D for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1E for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1F for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x20 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x21 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe indication TLV 0x22 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x23 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x24 for NAS SystemInfoIndication struct sNASSystemInfoIndication_NoPLMNChange { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x25 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x26 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x27 for NAS SystemInfoIndication struct sNASSystemInfoIndication_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe indication TLV 0x28 for NAS SystemInfoIndication struct sNASSystemInfoIndication_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe indication TLV 0x29 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe indication TLV 0x2A for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe indication TLV 0x2B for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoiceDomain { eQMINASVoiceDomains mLTEVoiceDomain; }; // Structure to describe indication TLV 0x2C for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMARegZoneID { UINT16 mCDMARegZoneID; }; // Structure to describe indication TLV 0x2D for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMRAC { UINT8 mGSMRoutingAreaCode; }; // Structure to describe indication TLV 0x2E for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMARAC { UINT8 mWCDMARoutingAreaCode; }; // Structure to describe indication TLV 0x2F for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAResolvedMCC { UINT16 mCDMAMCCResolvedViaSIDLookup; }; // Structure to describe indication TLV 0x30 for NAS SystemInfoIndication struct sNASSystemInfoIndication_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe indication TLV 0x31 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x32 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTERegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x33 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x34 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMRegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x35 for NAS SystemInfoIndication struct sNASSystemInfoIndication_EMBMSTraceID { INT16 mEMBMSTraceID; }; // Structure to describe indication TLV 0x36 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACSGInfo { UINT32 mCSGID; UINT8 mNameLength; // This array must be the size specified by mNameLength // wchar_t mName[1]; }; // Structure to describe indication TLV 0x37 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVVoiceDomain { eQMINASVoiceDomains mCDMA1xEVVoiceDomain; }; // Structure to describe indication TLV 0x38 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVSMSDomain { eQMINASSMSDomains mCDMA1xEVSMSDomain; }; // Structure to describe indication TLV 0x39 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTESMSDomain { eQMINASSMSDomains mLTESMSDomain; }; // Structure to describe indication TLV 0x3A for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEEmergencyBearer { eQMINASTriStatus mLTEEmergencyBearerSupported; }; // Structure to describe indication TLV 0x3B for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe indication TLV 0x3C for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMSMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe indication TLV 0x3D for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe indication TLV 0x3E for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMASMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe indication TLV 0x3F for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEEmergencyAccessBarred { eQMINASTriStatus mLTEEmergencyAccessBarred; }; // Structure to describe indication TLV 0x40 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe indication TLV 0x41 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMASMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe indication TLV 0x42 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMAVoiceDomain { eQMINASVoiceDomains mVoiceDomain; }; // Structure to describe indication TLV 0x43 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMASMSDomain { eQMINASSMSDomains mSMSDomain; }; // Structure to describe indication TLV 0x44 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTECSGInfo { UINT32 mCSGID; UINT8 mNameLength; // This array must be the size specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x10 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x11 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe response TLV 0x12 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe response TLV 0x13 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x14 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe response TLV 0x15 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe response TLV 0x16 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_TDSCDMASignalInfoEx { float mRSSIdBm; float mRSCPdBm; float mECIOdB; float mSINRdB; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_ECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_CDMA1xEVDOSINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTESINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_IOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT32 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTEConfig { eQMINASLTESignalRates mLTESignalCheckRate; eQMINASLTESignalRates mLTESignalAveragingRate; }; // Structure to describe request TLV 0x18 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSCPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mRSCPThreshold[1]; }; // Structure to describe request TLV 0x19 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_TDSCDMASINRThresholdList { UINT8 mSINRThresholdCount; // This array must be the size specified by mSINRThresholdCount // float mSINRThresholddB[1]; }; // Structure to describe indication TLV 0x10 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x11 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe indication TLV 0x12 for NAS SignalInfoIndication struct sNASSignalInfoIndication_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe indication TLV 0x13 for NAS SignalInfoIndication struct sNASSignalInfoIndication_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x14 for NAS SignalInfoIndication struct sNASSignalInfoIndication_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe indication TLV 0x15 for NAS SignalInfoIndication struct sNASSignalInfoIndication_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe indication TLV 0x16 for NAS SignalInfoIndication struct sNASSignalInfoIndication_TDSCDMASignalInfoEx { float mRSSIdBm; float mRSCPdBm; float mECIOdB; float mSINRdB; }; // Structure to describe response TLV 0x10 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x11 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x12 for NASGetErrorRate() struct sNASGetErrorRateResponse_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x13 for NASGetErrorRate() struct sNASGetErrorRateResponse_WCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x14 for NASGetErrorRate() struct sNASGetErrorRateResponse_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x10 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x11 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x12 for NAS ErrorRateIndication struct sNASErrorRateIndication_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x13 for NAS ErrorRateIndication struct sNASErrorRateIndication_WCDMAFrameErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x14 for NAS ErrorRateIndication struct sNASErrorRateIndication_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x01 for NAS EVDOSessionCloseIndication struct sNASEVDOSessionCloseIndication_Reason { eQMINASEVDOSessionCloseReasons mSessionCloseReason; }; // Structure to describe indication TLV 0x01 for NAS EVDOUATIUpdateIndication struct sNASEVDOUATIUpdateIndication_UATI { UINT8 mUATI[16]; }; // Structure to describe request TLV 0x01 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeRequest_Protocol { UINT32 mEVDOProtocol; }; // Structure to describe response TLV 0x10 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeResponse_Subtype { UINT16 mEVDOProtocolSubtype; }; // Structure to describe response TLV 0x10 for NASGetEVDOColorCode() struct sNASGetEVDOColorCodeResponse_Value { UINT8 mEVDOColorCode; }; // Structure to describe response TLV 0x10 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x11 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA1xEVDO { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x12 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_GSM { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x13 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_UMTS { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x14 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_LTE { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x15 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_TDSCDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe request TLV 0x01 for NASSetRXDiversity() struct sNASSetRXDiversityRequest_Diversity { eQMINASRadioInterfaces mRadioInterface; bool mEnableRXChain0:1; bool mEnableRXChain1:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX0Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x11 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX1Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x12 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_TXInfo { INT8 mInTraffic; INT32 mTXPower; }; // Structure to describe request TLV 0x01 for NASUpdateAKEYExtended() struct sNASUpdateAKEYExtendedRequest_AKEY { char mSPC[6]; char mAKEY[26]; }; // Structure to describe response TLV 0x10 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe response TLV 0x11 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x12 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_ActiveSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x13 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x14 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_DefaultVoiceSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_AbsoluteTime { UINT32 mBlockingIntervalInMilliseconds; }; // Structure to describe request TLV 0x11 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_T3204Multiplier { UINT32 mBlockingIntervalAsT3204Multiplier; }; // Structure to describe request TLV 0x01 for NASUnblockLTEPLMN() struct sNASUnblockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x10 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x11 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_SPN { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x12 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_ShortName { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; // Structure to describe indication TLV 0x13 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_LongName { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; // Structure to describe indication TLV 0x14 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_CSGID { UINT32 mCSGID; }; // Structure to describe indication TLV 0x15 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_DisplayBitInfo { eQMINASTriStatus mIsSPNSet; eQMINASTriStatus mIsPLMNSet; }; // Structure to describe indication TLV 0x16 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_NetworkInfo { eQMINASTriStatus mIsHomeNetwork; }; // Structure to describe request TLV 0x01 for NASConfigureEMBMS() struct sNASConfigureEMBMSRequest_Config { INT8 mEMBMSEnabled; }; // Structure to describe request TLV 0x10 for NASConfigureEMBMS() struct sNASConfigureEMBMSRequest_TraceID { INT16 mEMBMSTraceID; }; // Structure to describe response TLV 0x10 for NASConfigureEMBMS() struct sNASConfigureEMBMSResponse_TraceID { INT16 mEMBMSTraceID; }; // Structure to describe response TLV 0x10 for NASGetEMBMSStatus() struct sNASGetEMBMSStatusResponse_Status { INT8 mEMBMSEnabled; }; // Structure to describe response TLV 0x11 for NASGetEMBMSStatus() struct sNASGetEMBMSStatusResponse_TraceID { INT16 mEMBMSTraceID; }; // Structure to describe indication TLV 0x01 for NAS EMBMSStatusIndication struct sNASEMBMSStatusIndication_Status { INT8 mEMBMSEnabled; }; // Structure to describe indication TLV 0x10 for NAS EMBMSStatusIndication struct sNASEMBMSStatusIndication_TraceID { INT16 mEMBMSTraceID; }; // Structure to describe response TLV 0x10 for NASGetCDMAPositionInfo() struct sNASGetCDMAPositionInfoResponse_Info { INT8 mUEInIdleMode; UINT8 mBaseStationCount; struct sBaseStation { eQMINASCDMAPilotTypes mPilotType; UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mPilotPN; UINT16 mPilotStrength; INT32 mLatitude; INT32 mLongitude; UINT64 mGPSTimeInMilliseconds; }; // This array must be the size specified by mBaseStationCount // sBaseStation mBaseStations[1]; }; // Structure to describe indication TLV 0x01 for NAS RFBandInfoIndication struct sNASRFBandInfoIndication_BandInfo { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // Structure to describe indication TLV 0x01 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x02 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_ServiceDomain { eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; }; // Structure to describe indication TLV 0x03 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RejectCause { UINT8 mRejectCause; }; // Structure to describe indication TLV 0x10 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x11 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_CSGID { UINT32 mCSGID; }; // Structure to describe response TLV 0x10 for NASGetManagedRoamingConfig() struct sNASGetManagedRoamingConfigResponse_Config { INT8 mManagedRoamingSupported; }; // Structure to describe indication TLV 0x10 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_CurrentConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe indication TLV 0x11 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_ConfigPreference { eQMINASRTREConfiguration mRTREPreference; }; // Structure to describe response TLV 0x10 for NASGetCentralizedEONSSupport() struct sNASGetCentralizedEONSSupportResponse_Status { INT8 mCentralizedEONSSupported; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMARSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMARSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMAECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMAECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRRSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRRSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x18 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRSINRThresholdList { UINT8 mSINRThresholdCount; // This array must be the size specified by mSINRThresholdCount // eQMINASSINRLevels mSINRThreshold[1]; }; // Structure to describe request TLV 0x19 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRSINRDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1A for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRIOThreshold { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1B for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1C for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_GSMRSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1D for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_GSMRSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1E for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMARSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1F for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMARSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x20 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMAECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x21 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMAECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x22 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x23 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x24 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESNRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x25 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESNRDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x26 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x27 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRQDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x28 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x29 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRPDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x2A for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESignalReportConfig { eQMINASReportRate mReportRate; eQMINASAveragePeriod mAveragePeriod; }; // Structure to describe request TLV 0x2B for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSCPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x2C for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSCPDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x2D for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // float mRSSIThresholddBm[1]; }; // Structure to describe request TLV 0x2E for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSSIDelta { float mRSSIDeltadBm; }; // Structure to describe request TLV 0x2F for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMAECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // float mECIOThresholddB[1]; }; // Structure to describe request TLV 0x30 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMAECIODelta { float mECIODeltadB; }; // Structure to describe request TLV 0x31 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMASINRThresholdList { UINT8 mSINRThresholdCount; // This array must be the size specified by mSINRThresholdCount // float mSINRThresholddB[1]; }; // Structure to describe request TLV 0x32 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMASINRDelta { float mSINRDeltadB; }; // Structure to describe response TLV 0x10 for NASGetTDSCDMACellInfo() struct sNASGetTDSCDMACellInfoResponse_CellInfo { // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; INT8 mMNCIncludesPCSDigit; UINT16 mLocationAreaCode; UINT16 mAbsoluteRFChannelNumber; UINT32 mCellID; UINT8 mCellParameterID; UINT8 mPathLossdB; float mTimingAdvanceSeconds; float mRSCPdBm; }; // Structure to describe response TLV 0x11 for NASGetTDSCDMACellInfo() struct sNASGetTDSCDMACellInfoResponse_NeighborCellInfo { UINT8 mNeighborCellCount; struct sNeighborCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mCellParameterID; float mRSCPdBm; }; // This array must be the size specified by mNeighborCellCount // sNeighborCell mNeighborCells[1]; }; // Structure to describe request TLV 0x01 for NASSetHPLMNIRATSearchTimer() struct sNASSetHPLMNIRATSearchTimerRequest_Timer { UINT16 mTDSCDMASearchTimer; }; // Structure to describe request TLV 0x10 for NASGetEMBMSSignalQuality() struct sNASGetEMBMSSignalQualityRequest_TraceID { INT16 mEMBMSTraceID; }; // Structure to describe response TLV 0x10 for NASGetEMBMSSignalQuality() struct sNASGetEMBMSSignalQualityResponse_TraceID { INT16 mEMBMSTraceID; }; // Structure to describe response TLV 0x11 for NASGetEMBMSSignalQuality() struct sNASGetEMBMSSignalQualityResponse_SignalQuality { UINT8 mSignalCount; struct sSignal { UINT8 mMBSFNAreaID; INT8 mAverageSNR; INT8 mSignalLevel; }; // This array must be the size specified by mSignalCount // sSignal mSignals[1]; }; // Structure to describe request TLV 0x01 for NASLimitSystemInfoIndications() struct sNASLimitSystemInfoIndicationsRequest_Limits { bool mLimitByServerStatus:1; bool mLimitByServerDomain:1; bool mLimitByPLMNID:1; bool mLimitBySIDAndNID:1; bool mLimitByRoamStatus:1; // Padding out 59 bits UINT8 mReserved1:3; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for NASGetSystemInfoIndicationLimits() struct sNASGetSystemInfoIndicationLimitsResponse_Limits { bool mLimitByServerStatus:1; bool mLimitByServerDomain:1; bool mLimitByPLMNID:1; bool mLimitBySIDAndNID:1; bool mLimitByRoamStatus:1; // Padding out 59 bits UINT8 mReserved1:3; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for NASUpdateIMSStatus() struct sNASUpdateIMSStatusRequest_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe request TLV 0x02 for NASUpdateIMSStatus() struct sNASUpdateIMSStatusRequest_IMSRegistrationState { UINT8 mRegistrationStates; struct sRegistrationState { eQMINASCallTypes mCallType; INT8 mIsRegistered; }; // This array must be the size specified by mRegistrationStates // sRegistrationState mRegistrationStates[1]; }; // Structure to describe response TLV 0x10 for NASGetIMSPreference() struct sNASGetIMSPreferenceResponse_IMSPreferenceInfo { eQMINASRadioInterfaces mRadioInterface; bool mVoice:1; bool mSMS:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x01 for NAS IMSPreferenceIndication struct sNASIMSPreferenceIndication_IMSPreferenceInfo { eQMINASRadioInterfaces mRadioInterface; bool mVoice:1; bool mSMS:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for NASConfigurePLMNNameIndication() struct sNASConfigurePLMNNameIndicationRequest_ReportAllNames { INT8 mReportAllAvailableNames; }; // Structure to describe request TLV 0x01 for NASCDMAAvoidSystem() struct sNASCDMAAvoidSystemRequest_AvoidSystemInfo { eQMINASAvoidSystemTypes mAvoidType; }; // Structure to describe response TLV 0x10 for NASGetCDMAAvoidSystemList() struct sNASGetCDMAAvoidSystemListResponse_AvoidedSystemList { UINT8 mAvoidedSystemCount; struct sAvoidedSystem { UINT16 mSystemID; UINT16 mNetworkID; UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mAvoidedSystemCount // sAvoidedSystem mAvoidedSystems[1]; }; // Structure to describe request TLV 0x01 for NASSetHPLMNSearchTimer() struct sNASSetHPLMNSearchTimerRequest_HPLMNSearchTimer { UINT32 mHPLMNSearchTimerInMinutes; }; // Structure to describe response TLV 0x10 for NASGetHPLMNSearchTimer() struct sNASGetHPLMNSearchTimerResponse_HPLMNSearchTimer { UINT32 mHPLMNSearchTimerInMinutes; }; // Structure to describe request TLV 0x01 for NASSetE911State() struct sNASSetE911StateRequest_E911State { eQMINASE911States mE911State; }; // Structure to describe response TLV 0x10 for NASGetSubscriptionInfo() struct sNASGetSubscriptionInfoResponse_PriorityInfo { INT8 mIsPrioritySubscription; }; // Structure to describe response TLV 0x11 for NASGetSubscriptionInfo() struct sNASGetSubscriptionInfoResponse_ActiveInfo { INT8 mIsSubscriptionActive; }; // Structure to describe response TLV 0x12 for NASGetSubscriptionInfo() struct sNASGetSubscriptionInfoResponse_DefaultDataInfo { INT8 mIsDefaultDataSubscription; }; // Structure to describe response TLV 0x13 for NASGetSubscriptionInfo() struct sNASGetSubscriptionInfoResponse_VoiceSystemID { UINT32 mVoiceSystemID; }; // Structure to describe response TLV 0x10 for NASGetNetworkTime() struct sNASGetNetworkTimeResponse_3GPP2Time { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; INT8 mTimeZoneOffset; eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x11 for NASGetNetworkTime() struct sNASGetNetworkTimeResponse_3GPPTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; INT8 mTimeZoneOffset; eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetLTESIB16NetworkTime() struct sNASGetLTESIB16NetworkTimeResponse_LTESIB16Status { eQMINASTriStatus mLTESIB16Acquired; }; // Structure to describe response TLV 0x11 for NASGetLTESIB16NetworkTime() struct sNASGetLTESIB16NetworkTimeResponse_UniversalTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; }; // Structure to describe response TLV 0x12 for NASGetLTESIB16NetworkTime() struct sNASGetLTESIB16NetworkTimeResponse_AbsoluteTime { UINT64 mAbsoluteTime; }; // Structure to describe response TLV 0x13 for NASGetLTESIB16NetworkTime() struct sNASGetLTESIB16NetworkTimeResponse_LeapSecond { INT8 mLeapSeconds; }; // Structure to describe response TLV 0x14 for NASGetLTESIB16NetworkTime() struct sNASGetLTESIB16NetworkTimeResponse_TimeZone { INT8 mTimeZoneOffset; }; // Structure to describe response TLV 0x15 for NASGetLTESIB16NetworkTime() struct sNASGetLTESIB16NetworkTimeResponse_DaylightSavings { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x10 for NAS LTESIB16NetworkTimeIndication struct sNASLTESIB16NetworkTimeIndication_LTESIB16Status { eQMINASTriStatus mLTESIB16Acquired; }; // Structure to describe indication TLV 0x11 for NAS LTESIB16NetworkTimeIndication struct sNASLTESIB16NetworkTimeIndication_UniversalTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; }; // Structure to describe indication TLV 0x12 for NAS LTESIB16NetworkTimeIndication struct sNASLTESIB16NetworkTimeIndication_AbsoluteTime { UINT64 mAbsoluteTime; }; // Structure to describe indication TLV 0x13 for NAS LTESIB16NetworkTimeIndication struct sNASLTESIB16NetworkTimeIndication_LeapSecond { INT8 mLeapSeconds; }; // Structure to describe indication TLV 0x14 for NAS LTESIB16NetworkTimeIndication struct sNASLTESIB16NetworkTimeIndication_TimeZone { INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x15 for NAS LTESIB16NetworkTimeIndication struct sNASLTESIB16NetworkTimeIndication_DaylightSavings { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe request TLV 0x10 for WMSSetEventReport() struct sWMSSetEventReportRequest_NewMTMessageIndicator { INT8 mReportNewMTMessages; }; // Structure to describe request TLV 0x11 for WMSSetEventReport() struct sWMSSetEventReportRequest_MOSMSCallControlInfo { INT8 mReportMOSMSCallControl; }; // Structure to describe request TLV 0x12 for WMSSetEventReport() struct sWMSSetEventReportRequest_MWIMessageIndicator { INT8 mReportNewMWIMessages; }; // Structure to describe indication TLV 0x10 for WMS EventReport struct sWMSEventReportIndication_ReceivedMTMessage { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe indication TLV 0x11 for WMS EventReport struct sWMSEventReportIndication_TransferRouteMTMessage { INT8 mACKRequired; UINT32 mTransactionID; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x12 for WMS EventReport struct sWMSEventReportIndication_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x13 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSMessage { eQMIWMSNotificationType mNotificationType; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x14 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSPLMNInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe indication TLV 0x15 for WMS EventReport struct sWMSEventReportIndication_ReceivedSMSCAddress { UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe indication TLV 0x16 for WMS EventReport struct sWMSEventReportIndication_SMSOnIMS { INT8 mMessageReceivedFromIMS; }; // Structure to describe indication TLV 0x17 for WMS EventReport struct sWMSEventReportIndication_CallControlInfo { eQMIWMSCallControlTypes mMOCallControlType; UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe request TLV 0x01 for WMSRawSend() struct sWMSRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSRawSend() struct sWMSRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSRawSend() struct sWMSRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSRawSend() struct sWMSRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSRawSend() struct sWMSRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSRawSend() struct sWMSRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSRawSend() struct sWMSRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe request TLV 0x16 for WMSRawSend() struct sWMSRawSendRequest_LinkControlEnabling { INT8 mAlwaysEnableLinkControl; }; // Structure to describe response TLV 0x01 for WMSRawSend() struct sWMSRawSendResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x10 for WMSRawSend() struct sWMSRawSendResponse_CauseCode { eQMIWMSCauseCodes mCauseCode; }; // Structure to describe response TLV 0x11 for WMSRawSend() struct sWMSRawSendResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x12 for WMSRawSend() struct sWMSRawSendResponse_CauseInfo { eQMIWMSRPCauseCodes mGSMWCDMARPCause; eQMIWMSTPCauseCodes mGSMWCDMATPCause; }; // Structure to describe response TLV 0x13 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x14 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe response TLV 0x15 for WMSRawSend() struct sWMSRawSendResponse_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe request TLV 0x01 for WMSRawWrite() struct sWMSRawWriteRequest_MessageData { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSRawWrite() struct sWMSRawWriteRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe response TLV 0x01 for WMSRawWrite() struct sWMSRawWriteResponse_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x01 for WMSRawRead() struct sWMSRawReadRequest_MessageIndex { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe request TLV 0x10 for WMSRawRead() struct sWMSRawReadRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x11 for WMSRawRead() struct sWMSRawReadRequest_SMSOnIMS { INT8 mMessageToBeReadFromIMS; }; // Structure to describe response TLV 0x01 for WMSRawRead() struct sWMSRawReadResponse_MessageData { eQMIWMSMessageTags mMessageTag; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x01 for WMSModifyTag() struct sWMSModifyTagRequest_MessageTag { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x10 for WMSModifyTag() struct sWMSModifyTagRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSDelete() struct sWMSDeleteRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSDelete() struct sWMSDeleteRequest_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x11 for WMSDelete() struct sWMSDeleteRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x12 for WMSDelete() struct sWMSDeleteRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetMessageProtocol() struct sWMSGetMessageProtocolResponse_MessageProtocol { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSListMessages() struct sWMSListMessagesRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSListMessages() struct sWMSListMessagesRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x11 for WMSListMessages() struct sWMSListMessagesRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSListMessages() struct sWMSListMessagesResponse_MessageList { UINT32 mNumberOfMessages; struct sMessage { UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // This array must be the size specified by mNumberOfMessages // sMessage mMessages[1]; }; // Structure to describe request TLV 0x01 for WMSSetRoutes() struct sWMSSetRoutesRequest_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSReceiptActions mReceiptAction; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe request TLV 0x10 for WMSSetRoutes() struct sWMSSetRoutesRequest_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetRoutes() struct sWMSGetRoutesResponse_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSRouteValues mRouteValue; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe response TLV 0x10 for WMSGetRoutes() struct sWMSGetRoutesResponse_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetSMSCAddress() struct sWMSGetSMSCAddressResponse_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x01 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_Address { // String is variable length, but must be size of the container // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_AddressType { // String is variable length, but must be size of the container // char mSMSCAddressType[1]; }; // Structure to describe request TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_MaxSize { UINT32 mMaxStorageSizeInMessages; }; // Structure to describe response TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_AvailableSize { UINT32 mFreeStorageSizeInMessages; }; // Structure to describe request TLV 0x01 for WMSSendACK() struct sWMSSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSSendACK() struct sWMSSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSSendACK() struct sWMSSendACKRequest_3GPPFailureInfo { // mGSMWCDMARPCause is of type eQMIWMSRPCauseCodes UINT8 mGSMWCDMARPCause; eQMIWMSTPCauseCodes mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSSendACK() struct sWMSSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendACK() struct sWMSSendACKResponse_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe request TLV 0x01 for WMSSetRetryPeriod() struct sWMSSetRetryPeriodRequest_Period { UINT32 mRetryPeriodInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetRetryInterval() struct sWMSSetRetryIntervalRequest_Interval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetDCDisconnectTimer() struct sWMSSetDCDisconnectTimerRequest_Timer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetMemoryStatus() struct sWMSSetMemoryStatusRequest_Status { INT8 mMemoryIsAvailable; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastActivation() struct sWMSSetBroadcastActivationRequest_BCInfo { eQMIWMSMessageProtocols mMode; INT8 mActivateBroadcast; }; // Structure to describe request TLV 0x10 for WMSSetBroadcastActivation() struct sWMSSetBroadcastActivationRequest_BCFiltering { INT8 mNoBroadcastMessageFiltering; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPPInfo { UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x11 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPP2Info { UINT16 mNumberOfInstances; struct sInstance { eQMIWMSServiceCategories mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x10 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { eQMIWMSServiceCategories mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x01 for WMS MemoryFullIndication struct sWMSMemoryFullIndication_Info { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetDomainPreference() struct sWMSGetDomainPreferenceResponse_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSetDomainPreference() struct sWMSSetDomainPreferenceRequest_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x11 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseCode { eQMIWMSCauseCodes mCauseCode; }; // Structure to describe response TLV 0x12 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x13 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseInfo { eQMIWMSRPCauseCodes mGSMWCDMARPCause; eQMIWMSTPCauseCodes mGSMWCDMATPCause; }; // Structure to describe response TLV 0x14 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x01 for WMSGetWaitingMessage() struct sWMSGetWaitingMessageResponse_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe indication TLV 0x01 for WMS WaitingMessageIndication struct sWMSWaitingMessageIndication_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe request TLV 0x01 for WMSSetPrimaryClient() struct sWMSSetPrimaryClientRequest_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe indication TLV 0x01 for WMS SMSCAddressIndication struct sWMSSMSCAddressIndication_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe request TLV 0x11 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe request TLV 0x12 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe request TLV 0x13 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe request TLV 0x14 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe response TLV 0x10 for WMSGetTransportInfoLayer() struct sWMSGetTransportInfoLayerResponse_TransportLayerRegistrationInfo { INT8 mRegistered; }; // Structure to describe response TLV 0x11 for WMSGetTransportLayerInfo() struct sWMSGetTransportLayerInfoResponse_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe indication TLV 0x01 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerRegInfo { INT8 mRegistered; }; // Structure to describe indication TLV 0x10 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe response TLV 0x10 for WMSGetNetworkRegistrationInfo() struct sWMSGetNetworkRegistrationInfoResponse_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe indication TLV 0x01 for WMS NetworkRegistrationInfoIndication struct sWMSNetworkRegistrationInfoIndication_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe request TLV 0x01 for WMSBindSubscription() struct sWMSBindSubscriptionRequest_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x10 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe response TLV 0x11 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe response TLV 0x12 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe response TLV 0x13 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x14 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe request TLV 0x01 for WMSGetSMSParameters() struct sWMSGetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe response TLV 0x10 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe response TLV 0x11 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe response TLV 0x12 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe response TLV 0x13 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe request TLV 0x01 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe request TLV 0x10 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe request TLV 0x11 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe request TLV 0x12 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe request TLV 0x13 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe indication TLV 0x01 for WMS CallStatusIndication struct sWMSCallStatusIndication_SMSCallStatusInfo { eQMIWMSSMSCallStatus mSMSCallStatus; }; // Structure to describe response TLV 0x10 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEOutcome { UINT16 mLTEDomainPreferenceOutcome; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWOutcome { UINT16 mGWDomainPreferenceOutcome; }; // Structure to describe response TLV 0x10 for WMSGetRetryPeriod() struct sWMSGetRetryPeriodResponse_RetryPeriod { UINT32 mRetryPeriodInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetRetryInterval() struct sWMSGetRetryIntervalResponse_RetryInterval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetDCDisconnectTimer() struct sWMSGetDCDisconnectTimerResponse_DCDisconnectTimer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetMemoryStatus() struct sWMSGetMemoryStatusResponse_MemoryStatus { INT8 mMemoryIsAvailable; }; // Structure to describe response TLV 0x10 for WMSGetPrimaryClient() struct sWMSGetPrimaryClientResponse_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe response TLV 0x10 for WMSGetSubscriptionBinding() struct sWMSGetSubscriptionBindingResponse_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe request TLV 0x16 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x17 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_LinkControlEnabling { INT8 mAlwaysEnableLinkControl; }; // Structure to describe indication TLV 0x01 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseCode { eQMIWMSCauseCodes mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseInfo { eQMIWMSRPCauseCodes mGSMWCDMARPCause; eQMIWMSTPCauseCodes mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSAysncSendACK() struct sWMSAysncSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_3GPPFailureInfo { // mGSMWCDMARPCause is of type eQMIWMSRPCauseCodes UINT8 mGSMWCDMARPCause; eQMIWMSTPCauseCodes mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe request TLV 0x13 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x11 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseCode { eQMIWMSCauseCodes mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseInfo { eQMIWMSRPCauseCodes mGSMWCDMARPCause; eQMIWMSTPCauseCodes mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_UserData { UINT32 mUserData; }; // Structure to describe response TLV 0x10 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x11 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS ServiceReadyStatusIndication struct sWMSServiceReadyStatusIndication_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x10 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { eQMIWMSServiceCategories mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for WMSSetWaitingMessage() struct sWMSSetWaitingMessageRequest_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe request TLV 0x10 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEAIndicator { INT8 mReportNMEASentences; }; // Structure to describe request TLV 0x11 for PDSSetEventReport() struct sPDSSetEventReportRequest_ModeIndicator { INT8 mReportNMEASentencesPlusMode; }; // Structure to describe request TLV 0x12 for PDSSetEventReport() struct sPDSSetEventReportRequest_RawIndicator { INT8 mReportRawPositionData; }; // Structure to describe request TLV 0x13 for PDSSetEventReport() struct sPDSSetEventReportRequest_XTRARequestIndicator { INT8 mReportExternalXTRADataRequests; }; // Structure to describe request TLV 0x14 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeInjectionIndicator { INT8 mReportExternalTimeInjections; }; // Structure to describe request TLV 0x15 for PDSSetEventReport() struct sPDSSetEventReportRequest_WiFiIndicator { INT8 mReportExternalWiFiRequests; }; // Structure to describe request TLV 0x16 for PDSSetEventReport() struct sPDSSetEventReportRequest_SatelliteIndicator { INT8 mReportSatelliteInfo; }; // Structure to describe request TLV 0x17 for PDSSetEventReport() struct sPDSSetEventReportRequest_VXNetworkIndicator { INT8 mReportVXNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x18 for PDSSetEventReport() struct sPDSSetEventReportRequest_SUPLNetworkIndicator { INT8 mReportSUPLNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x19 for PDSSetEventReport() struct sPDSSetEventReportRequest_UMTSCPNetworkIndicator { INT8 mReportUMTSCPNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x1A for PDSSetEventReport() struct sPDSSetEventReportRequest_PDSCommIndicator { INT8 mReportPDSCommEvents; }; // Structure to describe request TLV 0x1B for PDSSetEventReport() struct sPDSSetEventReportRequest_AccelerometerDataIndicator { INT8 mReportAccelerometerDataStatus; }; // Structure to describe request TLV 0x1C for PDSSetEventReport() struct sPDSSetEventReportRequest_GyroDataIndicator { INT8 mReportGyroDataStatus; }; // Structure to describe request TLV 0x1D for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSyncIndication { INT8 mReportTimeSyncRequest; }; // Structure to describe request TLV 0x1E for PDSSetEventReport() struct sPDSSetEventReportRequest_PositionReliablilityIndicator { INT8 mReportPositionReliability; }; // Structure to describe request TLV 0x1F for PDSSetEventReport() struct sPDSSetEventReportRequest_SensorDataUsageIndicator { INT8 mReportSensorDataUsage; }; // Structure to describe request TLV 0x20 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSourceInformationIndicator { INT8 mReportTimeSourceInformation; }; // Structure to describe request TLV 0x21 for PDSSetEventReport() struct sPDSSetEventReportRequest_HeadingUncertaintyIndicator { INT8 mReportHeadingUncertaintyInformation; }; // Structure to describe request TLV 0x22 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEADebugStringIndicator { INT8 mReportNMEADebugStrings; }; // Structure to describe request TLV 0x23 for PDSSetEventReport() struct sPDSSetEventReportRequest_ExternalXTRADataIndicator { INT8 mReportExtendedXTRAData; }; // Structure to describe request TLV 0x24 for PDSSetEventReport() struct sPDSSetEventReportRequest_ServiceResetStatus { INT8 mReportServiceResetStatus; }; // Structure to describe request TLV 0x25 for PDSSetEventReport() struct sPDSSetEventReportRequest_VehicleAccelerometerIndicator { INT8 mReportVehicleAccelerometerReady; }; // Structure to describe request TLV 0x26 for PDSSetEventReport() struct sPDSSetEventReportRequest_VehicleAngularRateIndicator { INT8 mReportVehicleAngularRateReady; }; // Structure to describe request TLV 0x27 for PDSSetEventReport() struct sPDSSetEventReportRequest_VehicleOdometryIndicator { INT8 mReportVehicleOdometryReady; }; // Structure to describe request TLV 0x28 for PDSSetEventReport() struct sPDSSetEventReportRequest_SensorBiasEstimateIndicator { INT8 mReportSensorBiasEstimate; }; // Structure to describe request TLV 0x29 for PDSSetEventReport() struct sPDSSetEventReportRequest_IS801CPNIRejectReasonIndicator { INT8 mReportIS801CPNIRejectReason; }; // Structure to describe request TLV 0x2A for PDSSetEventReport() struct sPDSSetEventReportRequest_SUPLSessionEndStatusIndicator { INT8 mReportSUPLSessionEndStatus; }; // Structure to describe request TLV 0x2B for PDSSetEventReport() struct sPDSSetEventReportRequest_EmergencyPositionSessionEventIndicator { INT8 mReportEmergencyPositionSessionEvent; }; // Structure to describe indication TLV 0x10 for PDS EventReport struct sPDSEventReportIndication_NMEASentence { // String is variable length, but must be size of the container // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x11 for PDS EventReport struct sPDSEventReportIndication_NMEASentencePlusMode { eQMIPDSNMEASentenceOperatingModes mNMEASentenceOperatingMode; UINT16 mNMEASentenceLength; // This array must be the size specified by mNMEASentenceLength // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x12 for PDS EventReport struct sPDSEventReportIndication_PositionSessionStatus { eQMIPDSSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x13 for PDS EventReport struct sPDSEventReportIndication_ParsedPositionData { bool mTimestampCalendarValid:1; bool mTimestampUTCValid:1; bool mLeapSecondsValid:1; bool mTimeUncertaintyValid:1; bool mLatitudeValid:1; bool mLongitudeValid:1; bool mEllipsoidAltitudeValid:1; bool mMeanSeaLevelAltitudeValid:1; bool mHorizontalSpeedValid:1; bool mVerticalSpeedValid:1; bool mHeadingValid:1; bool mHorizontalUncertaintyCircularValid:1; bool mHorizontalUncertaintyEllipseSemiMajorValid:1; bool mHorizontalUncertaintyEllipseSemiMinorValid:1; bool mHorizontalUncertaintyEllipseOrientAzimuthValid:1; bool mVerticalUncertaintyValid:1; bool mHorizontalVelocityUncertaintyValid:1; bool mVerticalVelocityUncertaintyValid:1; bool mHorizontalConfidenceValid:1; bool mPositionDOPValid:1; bool mHorizontalDOPValid:1; bool mVerticalDOPValid:1; bool mOperatingModeUsedValid:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; UINT16 mCalendarYear; eQMIPDSCalendarMonths mCalendarMonth; eQMIPDSCalendarDays mCalendarDay; UINT8 mCalendarDayOfMonth; UINT8 mCalendarHour; UINT8 mCalendarMinute; UINT8 mCalendarSecond; UINT16 mCalendarMillisecond; UINT8 mCalendarLeapSeconds; UINT64 mUTCTimestamp; UINT32 mUTCTimestampUncertainty; double mLatitude; double mLongitude; float mEllipsoidAltitude; float mMeanSeaLevelAltitude; float mHorizontalSpeed; float mVerticalSpeed; float mHeading; float mHorizontalUncertaintyCircular; float mHorizontalUncertaintyEllipseSemiMajor; float mHorizontalUncertaintyEllipseSemiMinor; float mHorizontalUncertaintyEllipseOrientAzimuth; float mVerticalUncertainty; float mHorizontalVelocityUncertainty; float mVerticalVelocityUncertainty; UINT8 mHorizontalConfidence; float mPositionDOP; float mHorizontalDOP; float mVerticalDOP; eQMIPDSNMEASentenceOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x14 for PDS EventReport struct sPDSEventReportIndication_ExternalXTRARequest { UINT16 mMaximumFileSize; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x15 for PDS EventReport struct sPDSEventReportIndication_ExternalTimeInjectionRequest { UINT32 mDelayThresholdMilliseconds; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x16 for PDS EventReport struct sPDSEventReportIndication_ExternalWiFiPositionRequest { eQMIPDSWiFiRequestTypes mWiFiRequestType; UINT16 mWiFiRequestTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x17 for PDS EventReport struct sPDSEventReportIndication_SatelliteInfo { bool mIonoValid:1; bool mSatelliteCountValid:1; bool mSatelliteListValid:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; INT8 mIonosphericCorrections; UINT8 mSVRecordCount; struct sSV { bool mSystemValid:1; bool mPRNValid:1; bool mHealthStatusValid:1; bool mProcessStatusValid:1; bool mEphemerisStateValid:1; bool mAlmanacStateValid:1; bool mElevationValid:1; bool mAzimuthValid:1; bool mCN0Valid:1; // Padding out 23 bits UINT8 mReserved3:7; UINT8 mReserved4[2]; eQMIPDSSVSystems mSystem; UINT8 mPRN; eQMIPDSSVHealthStatus mHealthLevel; eQMIPDSSVProcessingStatus mProcessingStatus; eQMIPDSSVEphemerisStatus mEphemerisState; eQMIPDSSVAlmanacStatus mAlmanacState; INT32 mElevation; UINT16 mAzimuth; UINT16 mCN0; }; // This array must be the size specified by mSVRecordCount // sSV mSVs[1]; }; // Structure to describe indication TLV 0x18 for PDS EventReport struct sPDSEventReportIndication_VXNetworkInitiatedPrompt { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe indication TLV 0x19 for PDS EventReport struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt { sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt1; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt2; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt3; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt4; }; // Structure to describe indication TLV 0x1A for PDS EventReport struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 { UINT8 mServiceTypeID; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt { sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5; }; // Structure to describe indication TLV 0x1B for PDS EventReport struct sPDSEventReportIndication_CommEvents { eQMIPDSCommEventTypes mType; eQMIPDSCommEventProtocols mProtocolDataType; }; // Structure to describe indication TLV 0x1C for PDS EventReport struct sPDSEventReportIndication_PositionSource { bool mGPS:1; bool mCellID:1; bool mGlonass:1; bool mNetwork:1; bool mEPI:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x1D for PDS EventReport struct sPDSEventReportIndication_AccelerometerStreamingStatus { eQMIPDSStreamingStatus mAccelerometerStreamingStatus; }; // Structure to describe indication TLV 0x1E for PDS EventReport struct sPDSEventReportIndication_GyroStreamingStatus { eQMIPDSStreamingStatus mGyroStreamingStatus; }; // Structure to describe indication TLV 0x1F for PDS EventReport struct sPDSEventReportIndication_TimeSyncRequest { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x20 for PDS EventReport struct sPDSEventReportIndication_PositionReliabilityCounter { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe indication TLV 0x21 for PDS EventReport struct sPDSEventReportIndication_SensorDataUsage { bool mAccelerometer:1; bool mGyro:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; bool mHeadingAidedWithSensorData:1; bool mSpeedAidedWithSensorData:1; bool mPositionAidedWithSensorData:1; bool mVelocityAidedWithSensorData:1; // Padding out 12 bits UINT8 mReserved3:4; UINT8 mReserved4; }; // Structure to describe indication TLV 0x22 for PDS EventReport struct sPDSEventReportIndication_TimeSourceInformation { INT8 mTimeValid; eQMIPDSTimeSource mTimeSource; UINT32 mTimeUncertaintyMilliseconds; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT32 mReserved1; UINT32 mReserved2; UINT32 mReserved3; UINT32 mReserved4; UINT32 mReserved5; }; // Structure to describe indication TLV 0x23 for PDS EventReport struct sPDSEventReportIndication_EncryptedPositionInformation { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe indication TLV 0x24 for PDS EventReport struct sPDSEventReportIndication_HeadingUncertaintyInformation { float mHeadingUncertainty; float mGNSSHeadingUncertainty; UINT32 mReserved1; UINT32 mReserved2; }; // Structure to describe indication TLV 0x25 for PDS EventReport struct sPDSEventReportIndication_ProprietaryNMEADebugSentences { // String is variable length, but must be size of the container // char mNMEADebug[1]; }; // Structure to describe indication TLV 0x26 for PDS EventReport struct sPDSEventReportIndication_ExtendedExternalXTRADatabaseRequest { UINT32 mMaximumFileSize; UINT8 mURLCount; UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe indication TLV 0x27 for PDS EventReport struct sPDSEventReportIndication_ServiceResetStatus { eQMIPDSResetStates mServiceResetStatus; }; // Structure to describe indication TLV 0x28 for PDS EventReport struct sPDSEventReportIndication_ExtendedPositionFailure { eQMIPDSExtendedPositionFailures mPositionSessionFailure; }; // Structure to describe indication TLV 0x29 for PDS EventReport struct sPDSEventReportIndication_SUPLTriggerType { eQMIPDSSUPLTriggerTypes mSUPLTriggerType; }; // Structure to describe indication TLV 0x2A for PDS EventReport struct sPDSEventReportIndication_ESPLURL { UINT8 mEmergencySUPLLocationPlatformURLLength; // This array must be the size specified by mEmergencySUPLLocationPlatformURLLength // char mEmergencySUPLLocationPlatformURL[1]; }; // Structure to describe indication TLV 0x2B for PDS EventReport struct sPDSEventReportIndication_SUPLINITSource { eQMIPDSSUPLINITSources mSUPLINITSource; }; // Structure to describe indication TLV 0x2C for PDS EventReport struct sPDSEventReportIndication_VehicleAccelerometerStreamingStatus { eQMIPDSStreamingStatus mVehicleAccelerometerStreamingStatus; }; // Structure to describe indication TLV 0x2D for PDS EventReport struct sPDSEventReportIndication_VehicleAngularRateStreamingStatus { eQMIPDSStreamingStatus mVehicleAngularRateStreamingStatus; }; // Structure to describe indication TLV 0x2E for PDS EventReport struct sPDSEventReportIndication_VehicleOdometryStreamingStatus { eQMIPDSStreamingStatus mVehicleOdometryStreamingStatus; }; // Structure to describe indication TLV 0x2F for PDS EventReport struct sPDSEventReportIndication_SensorBiasEstimate { UINT16 mSequenceNumber; bool mGyroscopeXAxisValid:1; bool mGyroscopeYAxisValid:1; bool mGyroscopeZAxisValid:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; float mGyroscopeXAxisValue; float mGyroscopeYAxisValue; float mGyroscopeZAxisValue; bool mAccelerometerXAxisValid:1; bool mAccelerometerYAxisValid:1; bool mAccelerometerZAxisValid:1; // Padding out 61 bits UINT8 mReserved3:5; UINT8 mReserved4[7]; float mAccelerometerXAxisValue; float mAccelerometerYAxisValue; float mAccelerometerZAxisValue; }; // Structure to describe indication TLV 0x30 for PDS EventReport struct sPDSEventReportIndication_IS801CPNIRejectReason { eQMIPDSIS801CPNIRejectReasons mIS801CPNIRejectReason; }; // Structure to describe indication TLV 0x31 for PDS EventReport struct sPDSEventReportIndication_SUPLSessionEndStatus { eQMIPDSSUPLSessionEndStatus mSUPLSessionEndStatus; }; // Structure to describe indication TLV 0x32 for PDS EventReport struct sPDSEventReportIndication_EmergencyPositionSessionEvent { eQMIPDSEmergencyPositionSessionEvents mEmergencyPositionSessionEvent; }; // Structure to describe response TLV 0x01 for PDSGetServiceState() struct sPDSGetServiceStateResponse_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe response TLV 0x10 for PDSGetServiceState() struct sPDSGetServiceStateResponse_Capabilities { bool mMobileOriginatedPositioningSessions:1; bool mMobileTerminatedPositioningSessions:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x01 for PDS ServiceStateIndication struct sPDSServiceStateIndication_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe indication TLV 0x10 for PDS ServiceStateIndication struct sPDSServiceStateIndication_Capabilities { bool mMobileOriginatedPositioningSessions:1; bool mMobileTerminatedPositioningSessions:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for PDSSetServiceState() struct sPDSSetServiceStateRequest_State { INT8 mServiceEnabled; }; // Structure to describe request TLV 0x10 for PDSSetServiceState() struct sPDSSetServiceStateRequest_CapabilitiesToEnable { bool mMobileOriginatedPositioningSessions:1; bool mMobileTerminatedPositioningSessions:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for PDSStartTrackingSession() struct sPDSStartTrackingSessionRequest_Session { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetTrackingSessionInfo() struct sPDSGetTrackingSessionInfoResponse_Info { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe response TLV 0x10 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_NonstandardConfig { INT8 mEnableNonstandardSentences; }; // Structure to describe request TLV 0x01 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe request TLV 0x10 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigResponse_NonstandardConfig { INT8 mEnableNonstandardSentences; }; // Structure to describe request TLV 0x01 for PDSInjectTimeReference() struct sPDSInjectTimeReferenceRequest_Time { UINT64 mSystemTimeMilliseconds; UINT16 mSystemDiscontinuties; }; // Structure to describe response TLV 0x01 for PDSGetDefaults() struct sPDSGetDefaultsResponse_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe request TLV 0x01 for PDSSetDefaults() struct sPDSSetDefaultsRequest_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x10 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe response TLV 0x11 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe response TLV 0x12 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe response TLV 0x13 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Validity { UINT16 mValidPeriodGPSStartWeek; UINT16 mValidPeriodGPSStartWeekOffsetInMinutes; UINT16 mValidPeriodDurationInHours; }; // Structure to describe response TLV 0x14 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x10 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe request TLV 0x11 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe request TLV 0x12 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe request TLV 0x14 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x12 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x10 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerAddress { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe response TLV 0x11 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x10 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_Server { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe request TLV 0x11 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x12 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x01 for PDSGetServiceAutoTrackingState() struct sPDSGetServiceAutoTrackingStateResponse_State { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetServiceAutoTrackingState() struct sPDSSetServiceAutoTrackingStateRequest_State { INT8 mAutoTrackingEnabled; }; // Structure to describe response TLV 0x01 for PDSGetCOMPortAutoTrackingConfig() struct sPDSGetCOMPortAutoTrackingConfigResponse_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetCOMPortAutoTrackingConfig() struct sPDSSetCOMPortAutoTrackingConfigRequest_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x10 for PDSResetPDSData() struct sPDSResetPDSDataRequest_GPSData { bool mResetEPH:1; bool mResetALM:1; bool mResetPOS:1; bool mResetTIME:1; bool mResetIONO:1; bool mResetUTC:1; bool mResetHEALTH:1; bool mResetSVDIR:1; bool mResetSVSTEER:1; bool mResetSADATA:1; bool mResetRTI:1; bool mResetALMCORR:1; bool mResetFREQBIASEST:1; // Padding out 19 bits UINT8 mReserved1:3; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x11 for PDSResetPDSData() struct sPDSResetPDSDataRequest_CellData { bool mResetPOS:1; bool mResetLATESTGPSPOS:1; bool mResetOTAPOS:1; bool mResetEXTREFPOS:1; bool mResetTIMETAG:1; bool mResetCELLID:1; bool mResetCACHEDCELLID:1; bool mResetLASTSRVCELL:1; bool mResetCURSRVCELL:1; bool mResetNEIGHBORINFO:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x10 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Mode { eQMIPDSOperationTypes mSessionOperation; }; // Structure to describe request TLV 0x11 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Timeout { UINT8 mTimeoutSeconds; }; // Structure to describe request TLV 0x12 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Accuracy { UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetServiceVersion() struct sPDSGetServiceVersionResponse_Version { UINT8 mServiceMajorVersion; UINT8 mServiceMinorVersion; }; // Structure to describe request TLV 0x01 for PDSInjectXTRAData() struct sPDSInjectXTRADataRequest_Data { UINT8 mSequenceNumber; UINT16 mTotalLength; UINT16 mSequenceLength; // This array must be the size specified by mSequenceLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Timestamp { UINT64 mUTCTimestamp; }; // Structure to describe request TLV 0x11 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Latitude { double mLatitude; }; // Structure to describe request TLV 0x12 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Longitude { double mLongitude; }; // Structure to describe request TLV 0x13 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeEllipsoid { float mEllipsoidAltitude; }; // Structure to describe request TLV 0x14 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeSeaLevel { float mMeanSeaLevelAltitude; }; // Structure to describe request TLV 0x15 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalUncertainty { float mHorizontalUncertaintyCircular; }; // Structure to describe request TLV 0x16 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalUncertainty { float mVerticalUncertainty; }; // Structure to describe request TLV 0x17 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalConfidence { UINT8 mHorizontalConfidence; }; // Structure to describe request TLV 0x18 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalConfidence { UINT8 mVerticalConfidence; }; // Structure to describe request TLV 0x19 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Source { eQMIPDSInjectedPositionSources mSource; }; // Structure to describe request TLV 0x1A for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_TimeType { eQMIPDSTimeType mTimeType; }; // Structure to describe request TLV 0x1B for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe request TLV 0x1C for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeInformation { eQMIPDSAltitudeSource mAltitudeSource; eQMIPDSSourceLinkage mSourceLinkage; eQMIPDSUncertaintyCoverage mUncertaintyCoverage; }; // Structure to describe request TLV 0x10 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Time { UINT32 mWiFiTimeCounterMilliseconds; }; // Structure to describe request TLV 0x11 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Position { INT32 mWiFiLatitude; INT32 mWiFiLongitude; UINT16 mHEPEInMeters; UINT8 mAPCount; UINT8 mErrorCode; }; // Structure to describe request TLV 0x12 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_APInfo { UINT8 mAPCount; struct sAP { UINT8 mMACAddress[6]; UINT32 mRSSI; UINT16 mBeaconChannel; bool mUsedForPosition:1; bool mHiddenSSID:1; bool mEncryptionOn:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mAPCount // sAP mAPs[1]; }; // Structure to describe request TLV 0x13 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; }; // Structure to describe response TLV 0x10 for PDSGetSBASConfig() struct sPDSGetSBASConfigResponse_Config { eQMIPDSSBASStates mState; }; // Structure to describe request TLV 0x10 for PDSSetSBASConfig() struct sPDSSetSBASConfigRequest_Config { INT8 mEnableSBAS; }; // Structure to describe request TLV 0x01 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_Action { INT8 mAllowRequest; }; // Structure to describe request TLV 0x10 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_VX { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe request TLV 0x11 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_SUPL1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL { sPDSSendNetworkInitiatedResponseRequest_SUPL1 mPDSSendNetworkInitiatedResponseRequest_SUPL1; sPDSSendNetworkInitiatedResponseRequest_SUPL2 mPDSSendNetworkInitiatedResponseRequest_SUPL2; sPDSSendNetworkInitiatedResponseRequest_SUPL3 mPDSSendNetworkInitiatedResponseRequest_SUPL3; sPDSSendNetworkInitiatedResponseRequest_SUPL4 mPDSSendNetworkInitiatedResponseRequest_SUPL4; }; // Structure to describe request TLV 0x12 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 { UINT8 mServiceTypeID; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP { sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 mPDSSendNetworkInitiatedResponseRequest_UMTSCP1; sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 mPDSSendNetworkInitiatedResponseRequest_UMTSCP2; sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 mPDSSendNetworkInitiatedResponseRequest_UMTSCP3; sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 mPDSSendNetworkInitiatedResponseRequest_UMTSCP4; sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 mPDSSendNetworkInitiatedResponseRequest_UMTSCP5; }; // Structure to describe request TLV 0x13 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_SUPLTriggerType { eQMIPDSSUPLTriggerTypes mSUPLTriggerType; }; // Structure to describe request TLV 0x14 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_ESPLURL { UINT8 mEmergencySUPLLocationPlatformURLLength; // This array must be the size specified by mEmergencySUPLLocationPlatformURLLength // char mEmergencySUPLLocationPlatformURL[1]; }; // Structure to describe request TLV 0x01 for PDSInjectAbsoluteTime() struct sPDSInjectAbsoluteTimeRequest_Time { UINT64 mTimestampMilliseconds; UINT32 mTimeUncertaintyMilliseconds; eQMIPDSTimeBases mTimeBase; INT8 mForceAcceptance; }; // Structure to describe request TLV 0x01 for PDSInjectEFSData() struct sPDSInjectEFSDataRequest_DateFile1 { UINT8 mFilenameLength; // This array must be the size specified by mFilenameLength // char mFilename[1]; }; struct sPDSInjectEFSDataRequest_DateFile2 { eQMIPDSEFSFileOperations mFileOperation; UINT32 mDataLength; UINT8 mPartNumber; UINT8 mTotalParts; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; struct sPDSInjectEFSDataRequest_DateFile { sPDSInjectEFSDataRequest_DateFile1 mPDSInjectEFSDataRequest_DateFile1; sPDSInjectEFSDataRequest_DateFile2 mPDSInjectEFSDataRequest_DateFile2; }; // Structure to describe response TLV 0x10 for PDSGetDPOConfig() struct sPDSGetDPOConfigResponse_Config { INT8 mDataPowerOptimizationEnabled; }; // Structure to describe request TLV 0x10 for PDSSetDPOConfig() struct sPDSSetDPOConfigRequest_Config { eQMIPDSConfig mConfiguration; }; // Structure to describe response TLV 0x10 for PDSGetODPConfig() struct sPDSGetODPConfigResponse_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe request TLV 0x10 for PDSSetODPConfig() struct sPDSSetODPConfigRequest_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe response TLV 0x10 for PDSGetGPSState() struct sPDSGetGPSStateResponse_State { INT8 mEngineEnabled; bool mPositionValid:1; bool mAltitudeVerticalUncertaintyValid:1; bool mTimeMillisecondsValid:1; bool mTimeWeekNumberValid:1; bool mTimeUncertaintyValid:1; bool mIonoValid:1; bool mGPSEphemerisValid:1; bool mGPSAlmanacValid:1; bool mGPSHealthValid:1; bool mGPSVisibleSVsValid:1; bool mGlonassEphemerisValid:1; bool mGlonassAlmanacValid:1; bool mGlonassHealthValid:1; bool mGlonassVisibleSVsValid:1; bool mSBASEphemerisValid:1; bool mSBASAlmanacValid:1; bool mSBASHealthValid:1; bool mSBASVisibleSVsValid:1; bool mXTRAInformationValid:1; // Padding out 5 bits UINT8 mReserved1:5; double mLatitude; double mLongitude; float mHorizontalUncertaintyCircular; float mEllipsoidAltitude; float mVerticalUncertainty; UINT32 mTimestampInTOWMilliseconds; UINT16 mGPSWeekNumber; UINT32 mTimeUncertaintyMilliseconds; INT8 mIonoIsValid; UINT32 mGPSEphemerisSVMask; UINT32 mGPSAlmanacSVMask; UINT32 mGPSHealthSVMask; UINT32 mGPSVisibleSVMask; UINT32 mGlonassEphemerisSVMask; UINT32 mGlonassAlmanacSVMask; UINT32 mGlonassHealthSVMask; UINT32 mGlonassVisibleSVMask; UINT32 mSBASEphemerisSVMask; UINT32 mSBASAlmanacSVMask; UINT32 mSBASHealthSVMask; UINT32 mSBASVisibleSVMask; UINT16 mXTRAGPSStartWeek; UINT16 mXTRAGPSStartMinutes; INT32 mElevation; }; // Structure to describe request TLV 0x01 for PDSSetPPMEventReport() struct sPDSSetPPMEventReportRequest_ReportPPMEvents { INT8 mReportPPMEvents; }; // Structure to describe request TLV 0x01 for PDSSetSPIStreamingReport() struct sPDSSetSPIStreamingReportRequest_ReportEvents { INT8 mReportSPIEvents; }; // Structure to describe indication TLV 0x10 for PDS SetSPIStreamingReportIndication struct sPDSSetSPIStreamingReportIndication_SPIStreamingRequest { INT8 mStreamSPIStatus; }; // Structure to describe request TLV 0x01 for PDSSetSPIStatus() struct sPDSSetSPIStatusRequest_Status { eQMIPDSSPIState mSPIState; UINT8 mSPIConfidence; }; // Structure to describe request TLV 0x01 for PDSSetPPMReportingState() struct sPDSSetPPMReportingStateRequest_PPMReportingState { eQMIPDSReportingState mReportingState; UINT16 mReportingPeriodSeconds; }; // Structure to describe indication TLV 0x10 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMPageReport { UINT32 mPageTimeMilliseconds; UINT16 mPagePNOffset; UINT8 mPageBandClass; UINT16 mPageCDMAFrequency; UINT16 mPageBaseID; UINT16 mPageSystemID; UINT16 mPageNetworkID; }; // Structure to describe indication TLV 0x11 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMMeasurementReport { UINT32 mReferenceTimeMilliseconds; UINT8 mReferenceBandClass; UINT16 mReferenceCDMAFrequency; UINT8 mReferenceTotalRXPower; UINT16 mReferencePNOffset; UINT8 mReferenceStrength; UINT8 mReferenceRMSErrorPhase; UINT8 mNumberOfPilots; struct sPilot { UINT16 mPilotPNOffset; UINT8 mPilotStrength; UINT8 mPilotRMSErrorPhase; INT16 mPilotPhase; }; // This array must be the size specified by mNumberOfPilots // sPilot mPilots[1]; }; // Structure to describe indication TLV 0x12 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMSuspendReason { eQMIPDSSuspendReason mSuspendReason; }; // Structure to describe indication TLV 0x13 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMStopReason { eQMIPDSStopReason mStopReason; }; // Structure to describe request TLV 0x01 for PDSForceReceiverOff() struct sPDSForceReceiverOffRequest_ForceReceiverOff { eQMIPDSForceReceiverOff mForceReceiverOff; }; // Structure to describe response TLV 0x10 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x11 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x12 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x11 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x12 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisAccelerometerData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe request TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisGyroData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe request TLV 0x12 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_AccelerometerTemperatureSamples { UINT32 mTimeOfFirstSample; UINT8 mTemperatureSamplesCount; struct sSample { UINT16 mSampleTimeOffset; float mTemperature; }; // This array must be the size specified by mTemperatureSamplesCount // sSample mSamples[1]; }; // Structure to describe request TLV 0x13 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_GyroTemperatureSamples { UINT32 mTimeOfFirstSample; UINT8 mTemperatureSamplesCount; struct sSample { UINT16 mSampleTimeOffset; float mTemperature; }; // This array must be the size specified by mTemperatureSamplesCount // sSample mSamples[1]; }; // Structure to describe response TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_AccelerometerSampleSetCount { UINT8 mAccelerometerSampleSetCount; }; // Structure to describe response TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_GyroSampleSetCount { UINT8 mGyroSampleSetCount; }; // Structure to describe response TLV 0x12 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_AccelerometerTemperatureSamples { UINT8 mProcessedTemperatureSamplesCount; }; // Structure to describe response TLV 0x13 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_GyroTemperatureSamples { UINT8 mProcessedTemperatureSamplesCount; }; // Structure to describe request TLV 0x01 for PDSInjectTimeSyncData() struct sPDSInjectTimeSyncDataRequest_TimeTag { UINT32 mReferenceCounter; UINT32 mSensorProcessorRXTimeMilliseconds; UINT32 mSensorProcessorTXTimeMilliseconds; }; // Structure to describe response TLV 0x10 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe response TLV 0x11 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_ExternalPowerSupplyState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe request TLV 0x10 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe request TLV 0x11 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_ExternalPowerState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe response TLV 0x10 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe response TLV 0x11 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe response TLV 0x12 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VirtualGyroGravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe response TLV 0x13 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe response TLV 0x14 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe response TLV 0x15 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x16 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x17 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x18 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x19 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x1A for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x1B for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe response TLV 0x1C for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe response TLV 0x1D for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe response TLV 0x1E for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VehicleDataUse { bool mUseGyroscopeXAxis:1; bool mUseGyroscopeYAxis:1; bool mUseGyroscopeZAxis:1; bool mUseAccelerometerXAxis:1; bool mUseAccelerometerYAxis:1; bool mUseAccelerometerZAxis:1; bool mUseOdometry:1; // Padding out 57 bits UINT8 mReserved1:1; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1F for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VehicleVelocityRWSD { float mVehicleVelocityRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x20 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VehicleAccelerometerRWSD { float mVehicleAccelerometerRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x21 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VehicleAngleRWSD { float mVehicleAngleRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x22 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VehicleAngularRateRWSD { float mVehicleAngularRateRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x23 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VehicleOdometryScaleRWSD { float mVehicleOdometryScaleRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x24 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VehicleOdometryVariance { float mVehicleOdometryVariance; }; // Structure to describe request TLV 0x10 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe request TLV 0x11 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe request TLV 0x12 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VirtualGyroCravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe request TLV 0x13 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe request TLV 0x14 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe request TLV 0x15 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x16 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x17 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x18 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x19 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x1A for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x1B for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe request TLV 0x1C for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe request TLV 0x1D for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe request TLV 0x1E for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VehicleDataUse { bool mUseGyroscopeXAxis:1; bool mUseGyroscopeYAxis:1; bool mUseGyroscopeZAxis:1; bool mUseAccelerometerXAxis:1; bool mUseAccelerometerYAxis:1; bool mUseAccelerometerZAxis:1; bool mUseOdometry:1; // Padding out 57 bits UINT8 mReserved1:1; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x1F for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VehicleVelocityRWSD { float mVehicleVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x20 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VehicleAccelerometerRWSD { float mVehicleAccelerometerRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x21 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VehicleAngleRWSD { float mVehicleAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x22 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VehicleAngularRateRWSD { float mVehicleAngularRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x23 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VehicleOdometryScaleRWSD { float mVehicleOdometryScaleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x24 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VehicleOdometryVariance { float mVehicleOdometryVariance; }; // Structure to describe request TLV 0x10 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BlankingEnable { eQMIPDSBlankingEnable mBlankingEnable; }; // Structure to describe request TLV 0x11 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_ActiveChannels { bool mChannel1:1; bool mChannel2:1; bool mChannel3:1; bool mChannel4:1; bool mChannel5:1; bool mChannel6:1; bool mChannel7:1; bool mChannel8:1; bool mChannel9:1; bool mChannel10:1; bool mChannel11:1; bool mChannel12:1; bool mChannel13:1; bool mChannel14:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BluetoothJamming { INT8 mBluetoothJammingActive; }; // Structure to describe request TLV 0x13 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_IMDJamming { eQMIPDSIMDJammingStates mSimulateIMDJamming; }; // Structure to describe request TLV 0x14 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_JammingBands { eQMIPDSIMDJammingBands mBandstoJam; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallengeReport() struct sPDSSetSecurityChallengeReportRequest_EnableSecurity { eQMIPDSReportSecurityChallenge mReportSecurityChallenge; }; // Structure to describe indication TLV 0x10 for PDS SetSecurityChallengeReportIndication struct sPDSSetSecurityChallengeReportIndication_EnableSecurity { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallenge() struct sPDSSetSecurityChallengeRequest_SecureHashAlgorithm { UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe response TLV 0x10 for PDSGetSecurityEncryptionConfig() struct sPDSGetSecurityEncryptionConfigResponse_SecureClientTimestamp { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT64 mEncryptionTimestampMilliseconds; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityUpdateRate() struct sPDSSetSecurityUpdateRateRequest_EnableSecurity { UINT8 mUpdateRate; }; // Structure to describe request TLV 0x10 for PDSSetCellDatabaseControl() struct sPDSSetCellDatabaseControlRequest_Control { bool mPositionInfoStorage:1; bool mTimeInfoStorage:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PDSInjectMotionData() struct sPDSInjectMotionDataRequest_MotionData { eQMIPDSMotionStates mMotionState; eQMIPDSMotionModes mMotionMode; eQMIPDSMotionSubmodes mMotionSubmode; float mStateProbability; UINT16 mMotionDataAgeMilliseconds; UINT16 mMotionDataTimoutMilliseconds; }; // Structure to describe request TLV 0x01 for PDSSetGNSSEngineErrorRecoveryReport() struct sPDSSetGNSSEngineErrorRecoveryReportRequest_Indicator { INT8 mReportGNSSEngineErrorRecovery; }; // Structure to describe indication TLV 0x01 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_Reason { eQMIPDSResetReasons mResetReason; }; // Structure to describe indication TLV 0x02 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_DeletedData { bool mClockInformation:1; bool mPositionInformation:1; bool mSVDirections:1; bool mSVSteering:1; // Padding out 28 bits UINT8 mReserved1:4; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_CurrentSystemTime { UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x11 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ScanParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mCN0; UINT16 mSubMillisecondDifferenceMicroseconds; INT16 mDopplerDifferenceHz; }; // Structure to describe indication TLV 0x12 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ClockParameters { eQMIPDSSVSystems mSystem; eQMIPDSTimeSource mCurrentTimeSource; eQMIPDSTimeSource mInjectedTimeSource; UINT32 mTimeDifferenceMilliseconds; UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe indication TLV 0x13 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_SubframeParameters { UINT8 mPRN; INT32 mGPSDataDemodulationINProgress; UINT16 mObservedCycleSlips; UINT16 mParityErrors; UINT32 mGPSSubframeWordWithTimingError; }; // Structure to describe indication TLV 0x14 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_TimeParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT16 mGNSSNumberOfDays; UINT32 mGNSSMilliseconds; UINT32 mClockDifferenceMilliseconds; }; // Structure to describe indication TLV 0x15 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_MeasurementParameters { eQMIPDSSVSystems mSystem; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT8 mObservedMeasurementInconsistencies; UINT16 mObservationDuration; }; // Structure to describe indication TLV 0x16 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_RFParameters { UINT32 mQualitySignalStrength; UINT32 mResetSignalStrength; }; // Structure to describe request TLV 0x10 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeUncertainty { UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe request TLV 0x11 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionUncertainty { UINT32 mPositionUncertaintyCentimeters; }; // Structure to describe request TLV 0x12 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeOffset { UINT64 mTimeOffsetMicroseconds; }; // Structure to describe request TLV 0x13 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionOffset { UINT32 mPositionOffsetMeters; }; // Structure to describe request TLV 0x01 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_PeakAntennaGain { INT16 mPeakAntennaGain; }; // Structure to describe request TLV 0x10 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GPSRFLoss { UINT16 mRFLoss; }; // Structure to describe request TLV 0x11 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GlonassRFLoss { UINT16 mRFLossFrequency0; UINT16 mRFLossFrequencyMinus7; UINT16 mRFLossFrequencyPlus6; }; // Structure to describe request TLV 0x01 for PDSInjectCourseOverGroundData() struct sPDSInjectCourseOverGroundDataRequest_COGData { eQMIPDSCOGTimeTypes mTimeType; UINT64 mTimestampMilliseconds; float mCourseOverGround; float mCourseOverGroundUncertainty; eQMIPDSReliabilityIndicator mCourseOverGroundReliability; }; // Structure to describe request TLV 0x01 for PDSInjectSUPLCertificate() struct sPDSInjectSUPLCertificateRequest_SUPLCertificateID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x02 for PDSInjectSUPLCertificate() struct sPDSInjectSUPLCertificateRequest_SUPLCertificateData { UINT16 mSUPLCertificateDataLength; // This array must be the size specified by mSUPLCertificateDataLength // UINT8 mSUPLCertificateData[1]; }; // Structure to describe request TLV 0x01 for PDSDeleteSUPLCertificate() struct sPDSDeleteSUPLCertificateRequest_SUPLCertificateID { UINT8 mSUPLCertificateID; }; // Structure to describe response TLV 0x10 for PDSGetIS801OverSUPLIndicator() struct sPDSGetIS801OverSUPLIndicatorResponse_Indicator { INT8 mIS801IsCarriedInsideSUPL; }; // Structure to describe request TLV 0x01 for PDSSetIS801OverSUPLIndicator() struct sPDSSetIS801OverSUPLIndicatorRequest_Indicator { INT8 mIS801IsCarriedInsideSUPL; }; // Structure to describe response TLV 0x10 for PDSGetSUPLHashAlgorithm() struct sPDSGetSUPLHashAlgorithmResponse_Algorithm { eQMIPDSSUPLHashAlgorithms mSUPLHashAlgorithm; }; // Structure to describe request TLV 0x01 for PDSSetSUPLHashAlgorithm() struct sPDSSetSUPLHashAlgorithmRequest_Algorithm { eQMIPDSSUPLHashAlgorithms mSUPLHashAlgorithm; }; // Structure to describe response TLV 0x10 for PDSGetSUPLMaximumVersion() struct sPDSGetSUPLMaximumVersionResponse_MaxVersion { eQMIPDSSUPLVersions mSUPLMaximumVersion; }; // Structure to describe request TLV 0x01 for PDSSetSUPLMaximumVersion() struct sPDSSetSUPLMaximumVersionRequest_MaxVersion { eQMIPDSSUPLVersions mSUPLMaximumVersion; }; // Structure to describe response TLV 0x10 for PDSGetSUPLSecurity() struct sPDSGetSUPLSecurityResponse_Security { INT32 mSUPLSecurityEnabled; }; // Structure to describe request TLV 0x01 for PDSSetSUPLSecurity() struct sPDSSetSUPLSecurityRequest_Security { INT32 mSUPLSecurityEnabled; }; // Structure to describe response TLV 0x10 for PDSGetSUPLTLSVersion() struct sPDSGetSUPLTLSVersionResponse_TLSVersion { eQMIPDSSUPLTLSVersions mSUPLTLSVersion; }; // Structure to describe request TLV 0x01 for PDSSetSUPLTLSVersion() struct sPDSSetSUPLTLSVersionRequest_TLSVersion { eQMIPDSSUPLTLSVersions mSUPLTLSVersion; }; // Structure to describe response TLV 0x10 for PDSGetAGNSSPositioningModes() struct sPDSGetAGNSSPositioningModesResponse_Modes { bool mUPMSBasedFor2GAnd3G:1; bool mUPMSAssistedFor2GAnd3G:1; bool mUPMSBasedFor4G:1; bool mUPMSAssistedFor4G:1; // Padding out 28 bits UINT8 mReserved1:4; UINT8 mReserved2[3]; bool mCPMSBasedFor2G:1; bool mCPMSAssistedFor2G:1; bool mCPMSBasedFor3G:1; bool mCPMSAssistedFor3G:1; bool mCPMSBasedFor4G:1; bool mCPMSAssistedFor4G:1; // Padding out 26 bits UINT8 mReserved3:2; UINT8 mReserved4[3]; bool mCommonStandalone:1; // Padding out 31 bits UINT8 mReserved5:7; UINT8 mReserved6[3]; INT8 mGSMUPNMRSupportEnabled; }; // Structure to describe request TLV 0x01 for PDSSetAGNSSPositioningModes() struct sPDSSetAGNSSPositioningModesRequest_Modes { bool mUPMSBasedFor2GAnd3G:1; bool mUPMSAssistedFor2GAnd3G:1; bool mUPMSBasedFor4G:1; bool mUPMSAssistedFor4G:1; // Padding out 28 bits UINT8 mReserved1:4; UINT8 mReserved2[3]; bool mCPMSBasedFor2G:1; bool mCPMSAssistedFor2G:1; bool mCPMSBasedFor3G:1; bool mCPMSAssistedFor3G:1; bool mCPMSBasedFor4G:1; bool mCPMSAssistedFor4G:1; // Padding out 26 bits UINT8 mReserved3:2; UINT8 mReserved4[3]; bool mCommonStandalone:1; // Padding out 31 bits UINT8 mReserved5:7; UINT8 mReserved6[3]; INT8 mGSMUPNMRSupportEnabled; }; // Structure to describe response TLV 0x10 for PDSGetEmergencyProtocolConfig() struct sPDSGetEmergencyProtocolConfigResponse_Config { eQMIPDSEmergencyProtocolConfigs mEmergencyProtocolConfig; }; // Structure to describe request TLV 0x01 for PDSSetEmergencyProtocolConfig() struct sPDSSetEmergencyProtocolConfigRequest_Config { eQMIPDSEmergencyProtocolConfigs mEmergencyProtocolConfig; }; // Structure to describe request TLV 0x01 for PDSGetAPNProfiles() struct sPDSGetAPNProfilesRequest_APNType { eQMIPDSAPNTypes mAPNType; }; // Structure to describe response TLV 0x10 for PDSGetAPNProfiles() struct sPDSGetAPNProfilesResponse_APNType { eQMIPDSAPNTypes mAPNType; }; // Structure to describe response TLV 0x11 for PDSGetAPNProfiles() struct sPDSGetAPNProfilesResponse_WCDMAAPNInfo { eQMIPDSPDNTypes mPDNType; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // Structure to describe request TLV 0x01 for PDSSetAPNProfiles() struct sPDSSetAPNProfilesRequest_APNType { eQMIPDSAPNTypes mAPNType; }; // Structure to describe request TLV 0x10 for PDSSetAPNProfiles() struct sPDSSetAPNProfilesRequest_WCDMAAPNInfo { eQMIPDSPDNTypes mPDNType; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // Structure to describe response TLV 0x10 for PDSGetHomeSUPLAddress() struct sPDSGetHomeSUPLAddressResponse_Address { UINT8 mAddressLength; // This array must be the size specified by mAddressLength // char mAddress[1]; }; // Structure to describe request TLV 0x10 for PDSSetHomeSUPLAddress() struct sPDSSetHomeSUPLAddressRequest_Address { UINT8 mAddressLength; // This array must be the size specified by mAddressLength // char mAddress[1]; }; // Structure to describe request TLV 0x10 for PDSInjectVehicleSensorData() struct sPDSInjectVehicleSensorDataRequest_AccelerometerData { UINT32 mSensorSampleTimeBaseInMilliseconds; bool mXAxisValid:1; bool mYAxisValid:1; bool mZAxisValid:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; UINT8 mSensorDataCount; struct sSensorData { UINT32 mSampleTimeOffsetInMicroseconds; UINT8 mAxisSampleCount; // This array must be the size specified by mAxisSampleCount // float mAxisSample[1]; }; // This array must be the size specified by mSensorDataCount // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x11 for PDSInjectVehicleSensorData() struct sPDSInjectVehicleSensorDataRequest_AngularRotationData { UINT32 mSensorSampleTimeBaseInMilliseconds; bool mXAxisValid:1; bool mYAxisValid:1; bool mZAxisValid:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; UINT8 mSensorDataCount; struct sSensorData { UINT32 mSampleTimeOffsetInMicroseconds; UINT8 mAxisSampleCount; // This array must be the size specified by mAxisSampleCount // float mAxisSample[1]; }; // This array must be the size specified by mSensorDataCount // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x12 for PDSInjectVehicleSensorData() struct sPDSInjectVehicleSensorDataRequest_OdometryData { UINT32 mSensorSampleTimeBaseInMilliseconds; bool mReverseMovement:1; bool mAffectedByErrors:1; bool mAbsoluteMeasurement:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; bool mLeftAndRightAverageValid:1; bool mLeftSideValid:1; bool mRightSideValid:1; // Padding out 61 bits UINT8 mReserved3:5; UINT8 mReserved4[7]; UINT32 mDistanceTraveledBaseInMeters; UINT8 mOdometryDataCount; struct sOdometryData { UINT32 mSampleTimeOffsetInMicroseconds; UINT8 mDistanceTraveledCount; // This array must be the size specified by mDistanceTraveledCount // UINT32 mDistanceTraveledInMillimeters[1]; }; // This array must be the size specified by mOdometryDataCount // sOdometryData mOdometryDatas[1]; }; // Structure to describe request TLV 0x13 for PDSInjectVehicleSensorData() struct sPDSInjectVehicleSensorDataRequest_ExternalTimeSyncInfo { UINT32 mChangeInTimeScalesInMilliseconds; }; // Structure to describe request TLV 0x01 for PDSInjectPedometerData() struct sPDSInjectPedometerDataRequest_PedometerData { eQMIPDSInjectTimeTypes mTimeType; UINT64 mTimestampMilliseconds; UINT32 mTimeIntervalInMilliseconds; float mStepConfidence; UINT32 mStepCount; float mStepCountUncertainty; float mStepRate; float mStrideLength; float mStrideLengthUncertainty; }; // Structure to describe request TLV 0x10 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MethodMask { bool mEAPSIM:1; bool mEAPAKA:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x11 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_UserID { UINT8 mUserIDLength; // This array must be the size specified by mUserIDLength // UINT8 mUserID[1]; }; // Structure to describe request TLV 0x12 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MetaIdentity { UINT8 mMetaIdentityLength; // This array must be the size specified by mMetaIdentityLength // UINT8 mMetaIdentity[1]; }; // Structure to describe request TLV 0x13 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_SIMAKAAlgorithm { eQMIAUTHSIMAKAAlgorithm mSIMAKAAlgorithm; }; // Structure to describe request TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketRequest_RequestPacket { UINT8 mEAPRequestPacket[9999]; }; // Structure to describe response TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketResponse_ResponsePacket { UINT8 mResponsePacket[9999]; }; // Structure to describe indication TLV 0x01 for AUTH EAPSessionResultIndication struct sAUTHEAPSessionResultIndication_Result { eQMIAUTHEAPResult mResult; }; // Structure to describe response TLV 0x01 for AUTHGetEAPSessionKeys() struct sAUTHGetEAPSessionKeysResponse_SessionKeys { UINT8 mSessionKeys[9999]; }; // Structure to describe request TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKARequest_Version { eQMIAUTHAKAVersion mAKAVersion; }; // Structure to describe request TLV 0x10 for AUTHRunAKA() struct sAUTHRunAKARequest_Parameters1 { UINT8 mRandomChallengeLength; // This array must be the size specified by mRandomChallengeLength // UINT8 mRandomChallenge[1]; }; struct sAUTHRunAKARequest_Parameters2 { UINT8 mAuthenticationTokenLength; // This array must be the size specified by mAuthenticationTokenLength // UINT8 mAuthenticationToken[1]; }; struct sAUTHRunAKARequest_Parameters { sAUTHRunAKARequest_Parameters1 mAUTHRunAKARequest_Parameters1; sAUTHRunAKARequest_Parameters2 mAUTHRunAKARequest_Parameters2; }; // Structure to describe response TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKAResponse_Handle { UINT32 mHandle; }; // Structure to describe indication TLV 0x01 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_Result { UINT32 mHandle; eQMIAUTHAKAResult mResult; }; // Structure to describe indication TLV 0x10 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_V1V2ResponseData1 { UINT8 mDigestLength; // This array must be the size specified by mDigestLength // UINT8 mDigest[1]; }; struct sAUTHAKAResultIndication_V1V2ResponseData2 { UINT8 mAKADataLength; // This array must be the size specified by mAKADataLength // UINT8 mAKAData[1]; }; struct sAUTHAKAResultIndication_V1V2ResponseData { sAUTHAKAResultIndication_V1V2ResponseData1 mAUTHAKAResultIndication_V1V2ResponseData1; sAUTHAKAResultIndication_V1V2ResponseData2 mAUTHAKAResultIndication_V1V2ResponseData2; }; // Structure to describe request TLV 0x10 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_DTMF { INT8 mEnableEvents; }; // Structure to describe request TLV 0x11 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_VoicePrivacy { INT8 mEnableEvents; }; // Structure to describe request TLV 0x12 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SupplementaryService { INT8 mEnableEvents; }; // Structure to describe request TLV 0x13 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_CallNotification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x14 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Handover { INT8 mEnableEvents; }; // Structure to describe request TLV 0x15 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SpeechCodec { INT8 mEnableEvents; }; // Structure to describe request TLV 0x16 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_USSDNotification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x17 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Supplementary { INT8 mEnableEvents; }; // Structure to describe request TLV 0x18 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Modification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x19 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_UUS { INT8 mEnableEvents; }; // Structure to describe request TLV 0x1A for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_AOC { INT8 mEnableEvents; }; // Structure to describe request TLV 0x1B for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Conference { INT8 mEnableEvents; }; // Structure to describe request TLV 0x1C for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Burst { INT8 mEnableEvents; }; // Structure to describe request TLV 0x1D for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_PageMiss { INT8 mEnableEvents; }; // Structure to describe request TLV 0x1E for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_CallControlResultInfo { INT8 mEnableEvents; }; // Structure to describe request TLV 0x01 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallingNumber { // String is variable length, but must be size of the container // char mCallingNumber[1]; }; // Structure to describe request TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CLIR { eQMIVoiceCLIRTypes mCLIRType; }; // Structure to describe request TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CUG { UINT16 mCUGIndex; INT8 mSuppressPreferentialCUG; INT8 mSuppressOASubscription; }; // Structure to describe request TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_EmergencyCategory { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualCall:1; bool mAutomaticCall:1; bool mReserved:1; }; // Structure to describe request TLV 0x15 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CalledPartySubaddress { eQMIVoiceSubaddressTypes mSubaddressType; eQMIVoiceEvenOddIndicators mAddressSignals; UINT8 mSubaddressLength; // This array must be the size specified by mSubaddressLength // UINT8 mSubaddress[1]; }; // Structure to describe request TLV 0x16 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_ServiceType { eQMIVoiceServiceTypes mServiceType; }; // Structure to describe request TLV 0x17 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_SIPURIOverflow { // String is variable length, but must be size of the container // char mSIPURIOverflow[1]; }; // Structure to describe request TLV 0x18 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x19 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x1A for VoiceCallOriginate() struct sVoiceCallOriginateRequest_PresentationIndicator { eQMIVoicePresentationIndicators32Bit mPresentationIndicator; }; // Structure to describe request TLV 0x1B for VoiceCallOriginate() struct sVoiceCallOriginateRequest_VideoshareCallAttributes { eQMIVoiceVideoshareVariants mVideoshareVariant; UINT16 mFileAttributesLength; // This array must be the size specified by mFileAttributesLength // char mFileAttributes[1]; }; // Structure to describe request TLV 0x1C for VoiceCallOriginate() struct sVoiceCallOriginateRequest_ECallVariant { eQMIVoiceECallVariants mECallVariant; }; // Structure to describe request TLV 0x1D for VoiceCallOriginate() struct sVoiceCallOriginateRequest_ConferenceURIList { // String is variable length, but must be size of the container // char mConferenceURIList[1]; }; // Structure to describe response TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_EndReason { eQMIVoiceEndReasons mEndReason; }; // Structure to describe request TLV 0x01 for VoiceCallEnd() struct sVoiceCallEndRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceCallEnd() struct sVoiceCallEndResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x12 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x13 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_PresentationIndicator { eQMIVoicePresentationIndicators32Bit mPresentationIndicator; }; // Structure to describe request TLV 0x14 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_VideoshareFileAttributes { // String is variable length, but must be size of the container // char mFileAttributes[1]; }; // Structure to describe request TLV 0x15 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_RejectCall { INT8 mRejectCall; }; // Structure to describe response TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceGetCallInfo() struct sVoiceGetCallInfoRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_CallInfo { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; }; // Structure to describe response TLV 0x11 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyNumber { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x12 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ServiceOption { UINT16 mServiceOption; }; // Structure to describe response TLV 0x13 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x14 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x15 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyName { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // Structure to describe response TLV 0x16 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingType { eQMIVoiceAlertingTypes mAlertingType; }; // Structure to describe response TLV 0x18 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x19 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x1A for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_DiagnosticInfo { UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // Structure to describe response TLV 0x1B for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingPattern { eQMIVoiceAlertingPatterns mAlertingPattern; }; // Structure to describe response TLV 0x1C for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1D for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1E for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VideoshareVariant { eQMIVoiceVideoshareVariants mVideoshareVariant; }; // Structure to describe response TLV 0x1F for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_SIPURI { // String is variable length, but must be size of the container // char mSIPURI[1]; }; // Structure to describe response TLV 0x20 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_SRVCCCall { INT8 mSRVCCCall; }; // Structure to describe indication TLV 0x10 for Voice OTASPIndication struct sVoiceOTASPIndication_OTASPStatus { UINT8 mCallID; eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe indication TLV 0x01 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Signal { UINT8 mSignalType; UINT8 mAlertPitch; UINT8 mSignal; }; // Structure to describe indication TLV 0x11 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerID { UINT8 mPresentationIndicator; UINT8 mCallerIDLength; // This array must be the size specified by mCallerIDLength // char mCallerID[1]; }; // Structure to describe indication TLV 0x12 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Display { // String is variable length, but must be size of the container // char mDisplayBuffer[1]; }; // Structure to describe indication TLV 0x13 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplay { UINT8 mExtendedDisplayBuffer[182]; }; // Structure to describe indication TLV 0x14 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerName { // String is variable length, but must be size of the container // char mCallerName[1]; }; // Structure to describe indication TLV 0x15 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallWaiting { INT8 mNewCallWaiting; }; // Structure to describe indication TLV 0x16 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x17 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallingPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x18 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CalledPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x19 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_RedirectingNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mRedirectReason; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x1A for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CLIRCause { eQMIVoiceCLIRCauses mCLIRCause; }; // Structure to describe indication TLV 0x1B for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSAudio { UINT8 mUpLink; UINT8 mDownLink; }; // Structure to describe indication TLV 0x1C for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSRelease { eQMIVoiceNSSReleases mNSSRelease; }; // Structure to describe indication TLV 0x1D for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_LineControlInfo { INT8 mPolarityIncluded; INT8 mToggleMode; INT8 mReversePolarity; UINT8 mPowerDenialTime; }; // Structure to describe indication TLV 0x1E for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplayInfo { UINT8 mDisplayType; UINT8 mExtendedDisplayInfoLength; // This array must be the size specified by mExtendedDisplayInfoLength // UINT8 mExtendedDisplayInfo[1]; }; // Structure to describe request TLV 0x01 for VoiceSendFlash() struct sVoiceSendFlashRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashRequest_Payload { // String is variable length, but must be size of the container // char mFlashPayload[1]; }; // Structure to describe request TLV 0x11 for VoiceSendFlash() struct sVoiceSendFlashRequest_Type { eQMIVoiceFlashTypes mFlashType; }; // Structure to describe response TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Info { UINT8 mCallID; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe request TLV 0x10 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceStartContinuousDTMF() struct sVoiceStartContinuousDTMFRequest_Info { UINT8 mCallID; char mDTMFDigit; }; // Structure to describe response TLV 0x10 for VoiceStartContinuous() struct sVoiceStartContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceStopContinuousDTMF() struct sVoiceStopContinuousDTMFRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceStopContinuous() struct sVoiceStopContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x01 for Voice DTMFIndication struct sVoiceDTMFIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFEvents mDTMFEvent; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe indication TLV 0x10 for Voice DTMFIndication struct sVoiceDTMFIndication_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceSetPreferredPrivacy() struct sVoiceSetPreferredPrivacyRequest_Preference { eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice PrivacyIndication struct sVoicePrivacyIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x10 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x13 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x14 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceEndReasons mEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x15 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x17 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x18 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x19 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x1A for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x1B for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AudioAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe indication TLV 0x1C for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_VideoAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe indication TLV 0x1D for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_VideoshareVariant { UINT8 mVideoshareVariantCount; struct sVariant { UINT8 mCallID; eQMIVoiceVideoshareVariants mVideoshareVariant; }; // This array must be the size specified by mVideoshareVariantCount // sVariant mVariants[1]; }; // Structure to describe indication TLV 0x1E for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_SIPURI { UINT8 mSIPURICount; struct sSIP { UINT8 mCallID; UINT8 mSIPURILength; // This array must be the size specified by mSIPURILength // char mSIPURI[1]; }; // This array must be the size specified by mSIPURICount // sSIP mSIPs[1]; }; // Structure to describe indication TLV 0x1F for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_SRVCC { UINT8 mSRVCCCount; struct sSRVCC { UINT8 mCallID; INT8 mSRVCCCall; }; // This array must be the size specified by mSRVCCCount // sSRVCC mSRVCCs[1]; }; // Structure to describe indication TLV 0x20 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ParentCallInfo { UINT8 mCallInstanceCount; struct sCall { UINT8 mCallID; UINT8 mParentCallID; INT8 mIsParentCallCleared; }; // This array must be the size specified by mCallInstanceCount // sCall mCalls[1]; }; // Structure to describe response TLV 0x10 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x12 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x13 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x14 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_UUS { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x15 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x17 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x18 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceEndReasons mEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x19 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1A for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1B for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1C for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1D for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1E for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1F for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AudioAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe response TLV 0x20 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VideoAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe response TLV 0x21 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VideoshareVariant { UINT8 mVideoshareVariantCount; struct sVariant { UINT8 mCallID; eQMIVoiceVideoshareVariants mVideoshareVariant; }; // This array must be the size specified by mVideoshareVariantCount // sVariant mVariants[1]; }; // Structure to describe response TLV 0x22 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_SIPURI { UINT8 mSIPURICount; struct sSIP { UINT8 mCallID; UINT8 mSIPURILength; // This array must be the size specified by mSIPURILength // char mSIPURI[1]; }; // This array must be the size specified by mSIPURICount // sSIP mSIPs[1]; }; // Structure to describe response TLV 0x23 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_SRVCC { UINT8 mSRVCCCount; struct sSRVCC { UINT8 mCallID; INT8 mSRVCCCall; }; // This array must be the size specified by mSRVCCCount // sSRVCC mSRVCCs[1]; }; // Structure to describe request TLV 0x01 for VoiceManageCalls() struct sVoiceManageCallsRequest_Info { eQMIVoiceSupplementaryServiceCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe indication TLV 0x01 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_Info { UINT8 mCallID; eQMIVoiceSupplementaryNotificationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_CUG { UINT16 mCUGIndex; }; // Structure to describe indication TLV 0x11 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_ECT { eQMIVoiceECTCallStates mECTCallState; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x12 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_SupplementaryServiceCode { eQMIVoiceSupplementaryServiceCodes mSupplementaryServiceCode; }; // Structure to describe request TLV 0x01 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Info { eQMIVoiceSupplementaryServiceTypes mService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_CallForwarding { eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; }; // Structure to describe request TLV 0x15 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x15 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_ServiceStatus { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallWaitinge() struct sVoiceGetCallWaitingeResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe request TLV 0x01 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_Status { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_Status { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe response TLV 0x11 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_Info { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo2 { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; eQMIVoiceExtendedServiceClass mExtendedServiceClass; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for VoiceSetCallBarringPassword() struct sVoiceSetCallBarringPasswordRequest_Info { eQMIVoiceSupplementaryServiceReasons mReason; char mOldCallBarringPassword[4]; char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe response TLV 0x10 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x10 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x13 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x01 for VoiceAnswerUSSD() struct sVoiceAnswerUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x01 for Voice USSDIndication struct sVoiceUSSDIndication_Type { eQMIVoiceUSSDNotifcationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice USSDIndication struct sVoiceUSSDIndication_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x11 for Voice USSDIndication struct sVoiceUSSDIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe indication TLV 0x01 for Voice USSIndication struct sVoiceUSSIndication_Info { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigRequest_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe request TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigRequest_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe request TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigRequest_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe request TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigRequest_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe request TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe request TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe response TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigResponse_AutoAnswer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigResponse_AirTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigResponse_RoamTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigResponse_TTYMode { INT8 mWriteFailed; }; // Structure to describe response TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceSO { INT8 mWriteFailed; }; // Structure to describe response TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceDomain { INT8 mWriteFailed; }; // Structure to describe request TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigRequest_AutoAnswer { INT8 mInclude; }; // Structure to describe request TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigRequest_AirTimer { INT8 mInclude; }; // Structure to describe request TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigRequest_RoamTimer { INT8 mInclude; }; // Structure to describe request TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigRequest_TTYMode { INT8 mInclude; }; // Structure to describe request TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoiceSO { INT8 mInclude; }; // Structure to describe request TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigRequest_AMRStatus { INT8 mInclude; }; // Structure to describe request TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoicePrivacy { INT8 mInclude; }; // Structure to describe request TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigRequest_NAM { UINT8 mNAMID; }; // Structure to describe request TLV 0x18 for VoiceGetConfig() struct sVoiceGetConfigRequest_VoiceDomain { INT8 mInclude; }; // Structure to describe response TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigResponse_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe response TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigResponse_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe response TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigResponse_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe response TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigResponse_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe response TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe response TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigResponse_AMRConfig { INT8 mGSMAMR; bool mWCDMAAMRWB:1; bool mGSMHRAMR:1; bool mGSMAMRWB:1; bool mGSMAMRNB:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigResponse_Privacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe request TLV 0x01 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Info { eQMIVoiceSupplementaryServiceRequests mSupplementaryServiceRequest; INT8 mModifiedByCallControl; }; // Structure to describe request TLV 0x10 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Class { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x12 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_USSData { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe request TLV 0x15 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x16 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe request TLV 0x17 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x18 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_NewPassword { char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe request TLV 0x19 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_DataSource { INT8 mResponseData; }; // Structure to describe request TLV 0x1A for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe request TLV 0x1B for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallForwarding { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x1C for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIR { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe request TLV 0x1D for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIP { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe request TLV 0x1E for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x1F for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x20 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x21 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x22 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe request TLV 0x01 for VoiceAsyncInitiateUSSD() struct sVoiceAsyncInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x10 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x11 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x12 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x13 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe indication TLV 0x14 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x01 for VoiceBindSubscription() struct sVoiceBindSubscriptionRequest_Type { eQMIVoiceSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for VoiceALSSetLineSwitching() struct sVoiceALSSetLineSwitchingRequest_Switching { INT8 mLineSwitchingAllowed; }; // Structure to describe request TLV 0x01 for VoiceALSSelectLine() struct sVoiceALSSelectLineRequest_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe request TLV 0x01 for VoiceAOCSetACMMaximum() struct sVoiceAOCSetACMMaximumRequest_ACMMax { UINT32 mACMMaximum; }; // Structure to describe request TLV 0x01 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoRequest_Mask { bool mACM:1; bool mACMMaximum:1; bool mCCM:1; // Padding out 13 bits UINT8 mReserved1:5; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACM { UINT32 mACM; }; // Structure to describe response TLV 0x11 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACMMax { UINT32 mACMMaximum; }; // Structure to describe response TLV 0x12 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_CCM { UINT32 mCCM; }; // Structure to describe response TLV 0x10 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_Info { eQMIVoiceVoIPSUPSCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x11 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x12 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x13 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x14 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_SIPURI { // String is variable length, but must be size of the container // char mSIPURIOverflow[1]; }; // Structure to describe response TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_Participants { UINT8 mNumberOfParticipants; }; // Structure to describe response TLV 0x10 for VoiceALSGetLineSwitchingStatus() struct sVoiceALSGetLineSwitchingStatusResponse_SwitchValue { eQMIVoiceSwitchValue mSwitchValue; }; // Structure to describe response TLV 0x10 for VoiceALSGetSelectedLine() struct sVoiceALSGetSelectedLineResponse_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe indication TLV 0x01 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe indication TLV 0x11 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x12 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x13 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x01 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe indication TLV 0x11 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x12 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_NetworkMode { eQMIVoiceNetworkMode mNetworkMode; }; // Structure to describe indication TLV 0x11 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_Type { eQMIVoiceSpeechCodecType mType; }; // Structure to describe indication TLV 0x12 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_SamplingRate { UINT32 mSamplingRateHz; }; // Structure to describe indication TLV 0x13 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x01 for Voice HandoverIndication struct sVoiceHandoverIndication_State { eQMIVoiceHandoverStates mHandoverState; }; // Structure to describe indication TLV 0x01 for Voice ConferenceInfoIndication struct sVoiceConferenceInfoIndication_ConferenceXML { UINT16 mConferenceXMLLength; // This array must be the size specified by mConferenceXMLLength // char mConferenceXML[1]; }; // Structure to describe indication TLV 0x02 for Voice ConferenceInfoIndication struct sVoiceConferenceInfoIndication_SequenceNumber { UINT32 mSequenceNumber; }; // Structure to describe indication TLV 0x10 for Voice ConferenceInfoIndication struct sVoiceConferenceInfoIndication_TotalLength { UINT32 mTotalLength; }; // Structure to describe indication TLV 0x01 for Voice ConferenceJoinIndication struct sVoiceConferenceJoinIndication_JoinInfo { UINT8 mCallID; }; // Structure to describe indication TLV 0x02 for Voice ConferenceJoinIndication struct sVoiceConferenceJoinIndication_ParticipantInfo1 { UINT8 mURINameLength; // This array must be the size specified by mURINameLength // wchar_t mURIName[1]; }; struct sVoiceConferenceJoinIndication_ParticipantInfo2 { UINT8 mURIDescriptionLength; // This array must be the size specified by mURIDescriptionLength // wchar_t mURIDescription[1]; }; struct sVoiceConferenceJoinIndication_ParticipantInfo { sVoiceConferenceJoinIndication_ParticipantInfo1 mVoiceConferenceJoinIndication_ParticipantInfo1; sVoiceConferenceJoinIndication_ParticipantInfo2 mVoiceConferenceJoinIndication_ParticipantInfo2; }; // Structure to describe indication TLV 0x01 for Voice ConferenceParticipantUpdateIndication struct sVoiceConferenceParticipantUpdateIndication_ParticipantInfo1 { UINT8 mURINameLength; // This array must be the size specified by mURINameLength // wchar_t mURIName[1]; }; struct sVoiceConferenceParticipantUpdateIndication_ParticipantInfo2 { UINT8 mURIDescriptionLength; // This array must be the size specified by mURIDescriptionLength // wchar_t mURIDescription[1]; }; struct sVoiceConferenceParticipantUpdateIndication_ParticipantInfo { sVoiceConferenceParticipantUpdateIndication_ParticipantInfo1 mVoiceConferenceParticipantUpdateIndication_ParticipantInfo1; sVoiceConferenceParticipantUpdateIndication_ParticipantInfo2 mVoiceConferenceParticipantUpdateIndication_ParticipantInfo2; }; // Structure to describe indication TLV 0x01 for Voice ExtendedBurstTypeIndication struct sVoiceExtendedBurstTypeIndication_Info { UINT16 mMobileCountryCode; UINT8 mDataBurstSubtype; UINT8 mChargeIndication; UINT8 mSubUnitCallTimeInDeciseconds; UINT8 mUnitCallTimeInSeconds; }; // Structure to describe indication TLV 0x01 for Voice MTPageMissIndication struct sVoiceMTPageMissIndication_Reason { eQMIVoiceEndReasons mPageMissReason; }; // Structure to describe indication TLV 0x01 for Voice CallControlResultInfoIndication struct sVoiceCallControlResultInfoIndication_Result { eQMIVoiceCallControlResults mCallControlResult; }; // Structure to describe indication TLV 0x02 for Voice CallControlResultInfoIndication struct sVoiceCallControlResultInfoIndication_AlphaPresence { eQMIVoiceCallControlAlphaCodes mAlphaPresence; }; // Structure to describe indication TLV 0x10 for Voice CallControlResultInfoIndication struct sVoiceCallControlResultInfoIndication_AlphaGSM8 { UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // char mAlphaData[1]; }; // Structure to describe indication TLV 0x11 for Voice CallControlResultInfoIndication struct sVoiceCallControlResultInfoIndication_AlphaUTF16 { UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // wchar_t mAlphaData[1]; }; // Structure to describe request TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved1:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved2:1; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; bool mBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved3:5; }; // Structure to describe request TLV 0x12 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; bool mSlot3:1; bool mSlot4:1; bool mSlot5:1; // Padding out 3 bits UINT8 mReserved1:3; }; // Structure to describe request TLV 0x13 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_FullFunctionMask { bool mSendSMS:1; bool mSetupCall:1; bool mSendDTMF:1; bool mSendSS:1; bool mSendUSSD:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved1:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved2:1; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; bool mBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved3:5; }; // Structure to describe response TLV 0x12 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_FullFunctionFailureMask { bool mSendSMS:1; bool mSetupCall:1; bool mSendDTMF:1; bool mSendSS:1; bool mSendUSSD:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for CAT2 EventReport struct sCAT2EventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT2 EventReport struct sCAT2EventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT2 EventReport struct sCAT2EventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT2 EventReport struct sCAT2EventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT2 EventReport struct sCAT2EventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT2 EventReport struct sCAT2EventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT2 EventReport struct sCAT2EventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT2 EventReport struct sCAT2EventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT2 EventReport struct sCAT2EventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT2 EventReport struct sCAT2EventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT2 EventReport struct sCAT2EventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT2 EventReport struct sCAT2EventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT2 EventReport struct sCAT2EventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT2 EventReport struct sCAT2EventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT2 EventReport struct sCAT2EventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT2 EventReport struct sCAT2EventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT2 EventReport struct sCAT2EventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT2 EventReport struct sCAT2EventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT2 EventReport struct sCAT2EventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT2 EventReport struct sCAT2EventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT2 EventReport struct sCAT2EventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT2 EventReport struct sCAT2EventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT2 EventReport struct sCAT2EventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT2 EventReport struct sCAT2EventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT2 EventReport struct sCAT2EventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT2 EventReport struct sCAT2EventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT2 EventReport struct sCAT2EventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT2 EventReport struct sCAT2EventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT2 EventReport struct sCAT2EventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT2 EventReport struct sCAT2EventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT2 EventReport struct sCAT2EventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT2 EventReport struct sCAT2EventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT2 EventReport struct sCAT2EventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT2 EventReport struct sCAT2EventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT2 EventReport struct sCAT2EventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT2 EventReport struct sCAT2EventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT2 EventReport struct sCAT2EventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT2 EventReport struct sCAT2EventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT2 EventReport struct sCAT2EventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT2 EventReport struct sCAT2EventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT2 EventReport struct sCAT2EventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT2 EventReport struct sCAT2EventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT2 EventReport struct sCAT2EventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT2 EventReport struct sCAT2EventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT2 EventReport struct sCAT2EventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT2 EventReport struct sCAT2EventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT2 EventReport struct sCAT2EventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT2 EventReport struct sCAT2EventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT2 EventReport struct sCAT2EventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT2 EventReport struct sCAT2EventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT2 EventReport struct sCAT2EventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT2 EventReport struct sCAT2EventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT2 EventReport struct sCAT2EventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT2 EventReport struct sCAT2EventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT2 EventReport struct sCAT2EventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT2 EventReport struct sCAT2EventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT2 EventReport struct sCAT2EventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT2 EventReport struct sCAT2EventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT2 EventReport struct sCAT2EventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT2 EventReport struct sCAT2EventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT2 EventReport struct sCAT2EventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT2 EventReport struct sCAT2EventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT2 EventReport struct sCAT2EventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT2 EventReport struct sCAT2EventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT2 EventReport struct sCAT2EventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT2 EventReport struct sCAT2EventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT2 EventReport struct sCAT2EventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT2 EventReport struct sCAT2EventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT2 EventReport struct sCAT2EventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT2 EventReport struct sCAT2EventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT2 EventReport struct sCAT2EventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT2 EventReport struct sCAT2EventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT2 EventReport struct sCAT2EventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT2 EventReport struct sCAT2EventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe indication TLV 0x68 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseType { eQMICATResponseTypes mResponseType; }; // Structure to describe indication TLV 0x69 for CAT2 EventReport struct sCAT2EventReportIndication_BearerIndependentProtocolStatus { UINT8 mChannelID; eQMICATBearerIndependentProtocolStatus mBearerIndependentProtocolStatus; }; // Structure to describe response TLV 0x01 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved2:1; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; bool mCommonBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved3:5; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved5:1; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; bool mControlBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved6:5; }; // Structure to describe response TLV 0x11 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_FullFunctionServiceState { bool mSendSMS:1; bool mSetupCall:1; bool mSendDTMF:1; bool mSendSS:1; bool mSendUSSD:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2SendTerminal() struct sCAT2SendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2GetEventReport() struct sCAT2GetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x68 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseType { eQMICATResponseTypes mResponseType; }; // Structure to describe response TLV 0x69 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BearerIndependentProtocolStatus { UINT8 mChannelID; eQMICATBearerIndependentProtocolStatus mBearerIndependentProtocolStatus; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedTerminal() struct sCAT2SendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe request TLV 0x1C for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe request TLV 0x1D for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe request TLV 0x1E for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_RAT { eQMICATRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x1F for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CallType { eQMICATCallTypes mCallType; }; // Structure to describe request TLV 0x20 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_TransactionID { UINT8 mCallTransactionIDLength; // This array must be the size specified by mCallTransactionIDLength // UINT8 mCallTransactionID[1]; }; // Structure to describe request TLV 0x21 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_RPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x22 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_TPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x23 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Cause { UINT8 mCauseLength; // This array must be the size specified by mCauseLength // UINT8 mCause[1]; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe response TLV 0x1A for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_SMSPPDataDownloadUICCACK { UINT8 mSMSPPDataDownloadUICCACKLength; // This array must be the size specified by mSMSPPDataDownloadUICCACKLength // UINT8 mSMSPPDataDownloadUICCACKData[1]; }; // Structure to describe response TLV 0x1B for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_RPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x1C for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_TPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x10 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x12 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x01 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSCloseChannelIndication struct sCAT2SCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x02 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_RemainingDataLength { UINT16 mDataLength; }; // Structure to describe request TLV 0x10 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for UIMReadTransparent() struct sUIMReadTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMReadTransparent() struct sUIMReadTransparentRequest_FileID { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // Structure to describe request TLV 0x03 for UIMReadTransparent() struct sUIMReadTransparentRequest_Buffer { UINT16 mOffset; UINT16 mLength; }; // Structure to describe request TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe request TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentRequest_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadTransparent() struct sUIMReadTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMReadTransparent() struct sUIMReadTransparentResponse_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x14 for UIMReadTransparent() struct sUIMReadTransparentResponse_RequestedLength { UINT16 mFileLength; }; // Structure to describe indication TLV 0x01 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_Encryption { INT8 mDataEncrypted; }; // Structure to describe indication TLV 0x13 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_RequestedLength { UINT16 mFileLength; }; // Structure to describe request TLV 0x01 for UIMReadRecord() struct sUIMReadRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMReadRecord() struct sUIMReadRecordRequest_FileID { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // Structure to describe request TLV 0x03 for UIMReadRecord() struct sUIMReadRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; }; // Structure to describe request TLV 0x10 for UIMReadRecord() struct sUIMReadRecordRequest_LastRecord { UINT16 mRecordNumber; }; // Structure to describe request TLV 0x11 for UIMReadRecord() struct sUIMReadRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMReadRecord() struct sUIMReadRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadRecord() struct sUIMReadRecordResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadRecord() struct sUIMReadRecordResponse_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe response TLV 0x13 for UIMReadRecord() struct sUIMReadRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ReadRecordIndication struct sUIMReadRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadRecordIndication struct sUIMReadRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadRecordIndication struct sUIMReadRecordIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadRecordIndication struct sUIMReadRecordIndication_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_FileID { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // Structure to describe request TLV 0x03 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_Buffer { UINT16 mOffset; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_ResponseInIndicaiton { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMWriteRecord() struct sUIMWriteRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMWriteRecord() struct sUIMWriteRecordRequest_FileID { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // Structure to describe request TLV 0x03 for UIMWriteRecord() struct sUIMWriteRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteRecord() struct sUIMWriteRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_FileID { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // Structure to describe request TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe request TLV 0x11 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_UICCSecurity { INT8 mReturnUICCSecurityAttributes; }; // Structure to describe response TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_Attributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_FileStatus { eQMIUIMFilesStatus mFileStatus; }; // Structure to describe indication TLV 0x01 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_FileAttributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_Protection { eQMIUIMPINIDs mID; eQMIUIMPINOperations mOperation; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe request TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x01 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe indication TLV 0x12 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMVerifyPIN() struct sUIMVerifyPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMVerifyPIN() struct sUIMVerifyPINRequest_Verify { eQMIUIMPINIDs mID; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe request TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINRequest_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMVerifyPIN() struct sUIMVerifyPINResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x01 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe indication TLV 0x12 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMUnblockPIN() struct sUIMUnblockPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMUnblockPIN() struct sUIMUnblockPINRequest_Unblock1 { eQMIUIMPINIDs mID; UINT8 mPUKLength; // This array must be the size specified by mPUKLength // char mPUKValue[1]; }; struct sUIMUnblockPINRequest_Unblock2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sUIMUnblockPINRequest_Unblock { sUIMUnblockPINRequest_Unblock1 mUIMUnblockPINRequest_Unblock1; sUIMUnblockPINRequest_Unblock2 mUIMUnblockPINRequest_Unblock2; }; // Structure to describe request TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMUnblockPIN() struct sUIMUnblockPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMUnblockPIN() struct sUIMUnblockPINResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x01 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe indication TLV 0x12 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMChangePIN() struct sUIMChangePINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMChangePIN() struct sUIMChangePINRequest_Change1 { eQMIUIMPINIDs mID; UINT8 mOldPINLength; // This array must be the size specified by mOldPINLength // char mOldPINValue[1]; }; struct sUIMChangePINRequest_Change2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sUIMChangePINRequest_Change { sUIMChangePINRequest_Change1 mUIMChangePINRequest_Change1; sUIMChangePINRequest_Change2 mUIMChangePINRequest_Change2; }; // Structure to describe request TLV 0x10 for UIMChangePIN() struct sUIMChangePINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMChangePIN() struct sUIMChangePINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMChangePIN() struct sUIMChangePINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMChangePIN() struct sUIMChangePINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMChangePIN() struct sUIMChangePINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMChangePIN() struct sUIMChangePINResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x01 for UIM ChangePINIndication struct sUIMChangePINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ChangePINIndication struct sUIMChangePINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM ChangePINIndication struct sUIMChangePINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe indication TLV 0x12 for UIM ChangePINIndication struct sUIMChangePINIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMDepersonalization() struct sUIMDepersonalizationRequest_Info { eQMIUIMPersonalizationFeatures mFeature; eQMIUIMCKSessionOperations mOperation; UINT8 mCKLength; // This array must be the size specified by mCKLength // char mCKValue[1]; }; // Structure to describe response TLV 0x10 for UIMDepersonalization() struct sUIMDepersonalizationResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for UIMRefreshRegister() struct sUIMRefreshRegisterRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMRefreshRegister() struct sUIMRefreshRegisterRequest_RefreshInfo { eQMIUIMRegisterFlags mRegisterFlag; INT8 mVoteForInitialization; UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshOK() struct sUIMRefreshOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMRefreshOK() struct sUIMRefreshOKRequest_RefreshOK { INT8 mOKToRefresh; }; // Structure to describe request TLV 0x01 for UIMRefreshComplete() struct sUIMRefreshCompleteRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMRefreshComplete() struct sUIMRefreshCompleteRequest_RefreshComplete { INT8 mRefreshSuccessful; }; // Structure to describe request TLV 0x01 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventResponse_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent { sUIMGetLastRefreshEventResponse_RefreshEvent1 mUIMGetLastRefreshEventResponse_RefreshEvent1; sUIMGetLastRefreshEventResponse_RefreshEvent2 mUIMGetLastRefreshEventResponse_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMEventRegistration() struct sUIMEventRegistrationRequest_Mask { bool mCardStatus:1; bool mSAPConnection:1; bool mExtendedCardStatus:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMEventRegistration() struct sUIMEventRegistrationResponse_Mask { bool mCardStatus:1; bool mSAPConnection:1; bool mExtendedCardStatus:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for UIMGetCardStatus() struct sUIMGetCardStatusRequest_Extended { INT8 mReturnExtendedCardStatus; }; // Structure to describe response TLV 0x10 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetCardStatusResponse_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMGetCardStatusResponse_Status { sUIMGetCardStatusResponse_Status1 mUIMGetCardStatusResponse_Status1; sUIMGetCardStatusResponse_Status2 mUIMGetCardStatusResponse_Status2; }; // Structure to describe response TLV 0x11 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_HotSwapStatus { UINT8 mHotSwapLength; // This array must be the size specified by mHotSwapLength // eQMIUIMHotSwap mHotSwap[1]; }; // Structure to describe response TLV 0x12 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_ValidCardStatus { UINT8 mCardStatusValidCount; // This array must be the size specified by mCardStatusValidCount // INT8 mCardStatusValid[1]; }; // Structure to describe response TLV 0x13 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_ExtendedStatus1 { UINT8 mGWProvisioningApplications; struct sGWProvisioning { UINT8 mSlot; UINT8 mApplication; }; // This array must be the size specified by mGWProvisioningApplications // sGWProvisioning mGWProvisionings[1]; }; struct sUIMGetCardStatusResponse_ExtendedStatus2 { UINT8 m1XProvisioningApplications; struct s1XProvisioning { UINT8 mSlot; UINT8 mApplication; }; // This array must be the size specified by m1XProvisioningApplications // s1XProvisioning m1XProvisionings[1]; }; struct sUIMGetCardStatusResponse_ExtendedStatus3 { UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetCardStatusResponse_ExtendedStatus4 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMGetCardStatusResponse_ExtendedStatus { sUIMGetCardStatusResponse_ExtendedStatus1 mUIMGetCardStatusResponse_ExtendedStatus1; sUIMGetCardStatusResponse_ExtendedStatus2 mUIMGetCardStatusResponse_ExtendedStatus2; sUIMGetCardStatusResponse_ExtendedStatus3 mUIMGetCardStatusResponse_ExtendedStatus3; sUIMGetCardStatusResponse_ExtendedStatus4 mUIMGetCardStatusResponse_ExtendedStatus4; }; // Structure to describe response TLV 0x14 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_ExtendedHotSwapStatus { UINT8 mHotSwapLength; // This array must be the size specified by mHotSwapLength // eQMIUIMHotSwap mHotSwap[1]; }; // Structure to describe request TLV 0x01 for UIMPowerDown() struct sUIMPowerDownRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMPowerUp() struct sUIMPowerUpRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMPowerUp() struct sUIMPowerUpRequest_IgnoreHotSwapSwitch { INT8 mIgnoreHotSwapSwitch; }; // Structure to describe indication TLV 0x10 for UIM CardStatusIndication struct sUIMCardStatusIndication_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMCardStatusIndication_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMCardStatusIndication_Status { sUIMCardStatusIndication_Status1 mUIMCardStatusIndication_Status1; sUIMCardStatusIndication_Status2 mUIMCardStatusIndication_Status2; }; // Structure to describe indication TLV 0x11 for UIM CardStatusIndication struct sUIMCardStatusIndication_ValidCardStatus { UINT8 mCardStatusValidCount; // This array must be the size specified by mCardStatusValidCount // INT8 mCardStatusValid[1]; }; // Structure to describe indication TLV 0x12 for UIM CardStatusIndication struct sUIMCardStatusIndication_ExtendedStatus1 { UINT8 mGWProvisioningApplications; struct sGWProvisioning { UINT8 mSlot; UINT8 mApplication; }; // This array must be the size specified by mGWProvisioningApplications // sGWProvisioning mGWProvisionings[1]; }; struct sUIMCardStatusIndication_ExtendedStatus2 { UINT8 m1XProvisioningApplications; struct s1XProvisioning { UINT8 mSlot; UINT8 mApplication; }; // This array must be the size specified by m1XProvisioningApplications // s1XProvisioning m1XProvisionings[1]; }; struct sUIMCardStatusIndication_ExtendedStatus3 { UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMCardStatusIndication_ExtendedStatus4 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMCardStatusIndication_ExtendedStatus { sUIMCardStatusIndication_ExtendedStatus1 mUIMCardStatusIndication_ExtendedStatus1; sUIMCardStatusIndication_ExtendedStatus2 mUIMCardStatusIndication_ExtendedStatus2; sUIMCardStatusIndication_ExtendedStatus3 mUIMCardStatusIndication_ExtendedStatus3; sUIMCardStatusIndication_ExtendedStatus4 mUIMCardStatusIndication_ExtendedStatus4; }; // Structure to describe indication TLV 0x10 for UIM RefreshIndication struct sUIMRefreshIndication_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMRefreshIndication_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMRefreshIndication_RefreshEvent { sUIMRefreshIndication_RefreshEvent1 mUIMRefreshIndication_RefreshEvent1; sUIMRefreshIndication_RefreshEvent2 mUIMRefreshIndication_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMAuthenticate() struct sUIMAuthenticateRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMAuthenticate() struct sUIMAuthenticateRequest_Data { eQMIUIMAuthenticationContexts mContext; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMAuthenticate() struct sUIMAuthenticateResponse_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMAuthenticate() struct sUIMAuthenticateResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x01 for UIMCloseSession() struct sUIMCloseSessionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetServiceStatus() struct sUIMGetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMGetServiceStatus() struct sUIMGetServiceStatusRequest_Mask { bool mFDNStatus:1; bool mHiddenKeyPINStatus:1; bool mIndexInTheEFDIR:1; bool mESNStatus:1; bool mACLStatus:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_FDNStatus { eQMIUIMFDNStatusValues mFDNStatus; }; // Structure to describe response TLV 0x11 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_HiddenKeyStatus { eQMIUIMHiddenKeyStatusValues mHiddenKeyStatus; }; // Structure to describe response TLV 0x12 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_Index { UINT8 mEFDIRIndex; }; // Structure to describe response TLV 0x13 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_ESNStatus { INT8 mESNChanged; }; // Structure to describe response TLV 0x14 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_ACLStatus { eQMIUIMACLStatus mACLStatus; }; // Structure to describe request TLV 0x01 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_FDNStatus { INT8 mEnableFDN; }; // Structure to describe request TLV 0x11 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_ACLStatus { INT8 mEnableACL; }; // Structure to describe request TLV 0x01 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_SessionChange { eQMIUIMSessionTypes mSessionType; eQMIUIMCKSessionOperations mOperation; }; // Structure to describe request TLV 0x10 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLabel() struct sUIMGetLabelRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLabel() struct sUIMGetLabelResponse_AppLabel { UINT8 mLabelLength; // This array must be the size specified by mLabelLength // char mLabelValue[1]; }; // Structure to describe request TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationRequest_Mask { bool mAutomaticSelection:1; bool mPersonalizationStatus:1; bool mHaltSubscription:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_AutoSelection { INT8 mAutomaticProvisioningOn; }; // Structure to describe response TLV 0x11 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Personalization { UINT8 mFeatureCount; struct sFeature { eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // This array must be the size specified by mFeatureCount // sFeature mFeatures[1]; }; // Structure to describe response TLV 0x12 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Subscription { INT8 mPublishSubscription; }; // Structure to describe request TLV 0x01 for UIMSendADPU() struct sUIMSendADPURequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x02 for UIMSendADPU() struct sUIMSendADPURequest_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for UIMSendADPU() struct sUIMSendADPURequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x11 for UIMSendADPU() struct sUIMSendADPURequest_IntermediateProcedureBytes { eQMIUIMAPDUResponseStatus mIntermediateProcedureBytes; }; // Structure to describe response TLV 0x10 for UIMSendADPU() struct sUIMSendADPUResponse_APDUResponse { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSendADPU() struct sUIMSendADPUResponse_LongAPDUResponse { UINT16 mTotalLength; UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SendADPUIndication struct sUIMSendADPUIndication_APDUResponseChunk { UINT32 mIndicationToken; UINT16 mTotalLength; UINT16 mOffset; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for UIMSAPConnection() struct sUIMSAPConnectionRequest_Slot { eQMIUIMConnectOperations mOperation; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionRequest_DisconnectMode { eQMIUIMDisonnectModes mDisconnectMode; }; // Structure to describe request TLV 0x11 for UIMSAPConnection() struct sUIMSAPConnectionRequest_IntermediateGetResponse { INT8 mReturnIntermediateGetResponse; }; // Structure to describe request TLV 0x12 for UIMSAPConnection() struct sUIMSAPConnectionRequest_SAPCondition { eQMIUIMSAPConnectionConditions mSAPConnectionCondition; }; // Structure to describe response TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionResponse_State { eQMIUIMSAPStates mSAPState; }; // Structure to describe request TLV 0x01 for UIMSAP() struct sUIMSAPRequestRequest_Request { eQMIUIMSAPRequests mSAPRequest; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAP() struct sUIMSAPRequestRequest_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x10 for UIMSAPRequest() struct sUIMSAPRequestResponse_ATR { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSAPRequest() struct sUIMSAPRequestResponse_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x12 for UIMSAPRequest() struct sUIMSAPRequestResponse_CardReaderStatus { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x10 for UIM SAPConnectionIndication struct sUIMSAPConnectionIndication_CardStatus { eQMIUIMSAPStates mSAPState; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe request TLV 0x13 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_TerminateApplication { INT8 mTerminateApplication; }; // Structure to describe response TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe request TLV 0x01 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_Publish { UINT8 mPathLength; }; // Structure to describe request TLV 0x10 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_EncryptedIMSI { UINT8 mEncryptedIMSILength; // This array must be the size specified by mEncryptedIMSILength // UINT8 mEncryptedIMSI[1]; }; // Structure to describe request TLV 0x01 for UIMGetATR() struct sUIMGetATRRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe response TLV 0x10 for UIMGetATR() struct sUIMGetATRResponse_ATRValue { UINT8 mATRValueLength; // This array must be the size specified by mATRValueLength // UINT8 mATRValue[1]; }; // Structure to describe request TLV 0x01 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe response TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe indication TLV 0x01 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_Slot { eQMIUIMSlots mSlot; }; // Structure to describe indication TLV 0x10 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe indication TLV 0x11 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x01 for UIMRefreshRegisterAll() struct sUIMRefreshRegisterAllRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMRefreshRegisterAll() struct sUIMRefreshRegisterAllRequest_Refresh { eQMIUIMRegisterFlags mRegisterForRefresh; }; // Structure to describe request TLV 0x10 for UIMRefreshRegisterAll() struct sUIMRefreshRegisterAllRequest_VoteForInit { INT8 mVoteForInitialization; }; // Structure to describe request TLV 0x01 for UIMSetFileStatus() struct sUIMSetFileStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x02 for UIMSetFileStatus() struct sUIMSetFileStatusRequest_FileID { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // Structure to describe request TLV 0x03 for UIMSetFileStatus() struct sUIMSetFileStatusRequest_FileStatus { eQMIUIMFilesStatus mFileStatus; }; // Structure to describe request TLV 0x01 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateRequest_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateResponse_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PBMGetCapabilities() struct sPBMGetCapabilitiesRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Basic { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // Structure to describe response TLV 0x11 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Group { UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // Structure to describe response TLV 0x12 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AdditionalNumber { UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // Structure to describe response TLV 0x13 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Email { UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // Structure to describe response TLV 0x14 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_SecondName { UINT8 mMaximumSecondNameLength; }; // Structure to describe response TLV 0x15 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_HiddenRecords { INT8 mHiddenEntrySupported; }; // Structure to describe response TLV 0x16 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_GAS { UINT8 mMaximumGASStringLength; }; // Structure to describe response TLV 0x17 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AAS { UINT8 mMaximumAASStringLength; }; // Structure to describe response TLV 0x18 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Protection { eQMIPBMProtectionMethods mProtectionMethod; }; // Structure to describe response TLV 0x19 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Sets { UINT16 mNumberOfPhonebookSets; }; // Structure to describe response TLV 0x10 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Basic { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberOfPhonebooks; struct sPhonebook { eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // This array must be the size specified by mNumberOfPhonebooks // sPhonebook mPhonebooks[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x11 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Group { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x12 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AdditionalNumber { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Email { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x14 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_SecondName { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumSecondNameLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x15 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_HiddenRecords { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; INT8 mHiddenEntrySupported; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x16 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_GAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumGASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x17 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumAASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMReadRecords() struct sPBMReadRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mStartingRecordID; UINT16 mEndingRecordID; }; // Structure to describe response TLV 0x10 for PBMReadRecords() struct sPBMReadRecordsResponse_RecordsRead { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Basic { UINT16 mSequenceNumber; eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT8 mNumberOfRecords; struct sRecord1 { UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sRecord2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sRecord { sRecord1 mRecord1; sRecord2 mRecord2; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x10 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_SecondName { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mSecondNameLength; // This array must be the size (in BYTEs) specified by mSecondNameLength // wchar_t mSecondName[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x11 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_AdditionalNumber { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x12 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Group { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x13 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Email { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x14 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Hidden { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; INT8 mHidden; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for PBMWriteRecord() struct sPBMWriteRecordRequest_Info1 { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sPBMWriteRecordRequest_Info2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sPBMWriteRecordRequest_Info { sPBMWriteRecordRequest_Info1 mPBMWriteRecordRequest_Info1; sPBMWriteRecordRequest_Info2 mPBMWriteRecordRequest_Info2; }; // Structure to describe request TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordRequest_SecondName { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe request TLV 0x11 for PBMWriteRecord() struct sPBMWriteRecordRequest_AdditionalNumber { UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // Structure to describe request TLV 0x12 for PBMWriteRecord() struct sPBMWriteRecordRequest_Group { UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // Structure to describe request TLV 0x13 for PBMWriteRecord() struct sPBMWriteRecordRequest_Email { UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // Structure to describe request TLV 0x14 for PBMWriteRecord() struct sPBMWriteRecordRequest_Hidden { INT8 mHidden; }; // Structure to describe response TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteRecord() struct sPBMDeleteRecordRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMDeleteRecord() struct sPBMDeleteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteAllRecords() struct sPBMDeleteAllRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x01 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Number { UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x11 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Name { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsResponse_List { UINT16 mNumberOfRecordIDs; // This array must be the size specified by mNumberOfRecordIDs // UINT16 mRecordID[1]; }; // Structure to describe indication TLV 0x01 for PBM RecordUpdateIndication struct sPBMRecordUpdateIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMOperations mOperation; UINT16 mRecordID; }; // Structure to describe indication TLV 0x01 for PBM RefreshIndication struct sPBMRefreshIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMRefreshStatus mStatus; }; // Structure to describe indication TLV 0x01 for PBM ReadyIndication struct sPBMReadyIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe indication TLV 0x01 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x10 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x11 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x12 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x13 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_HardCodedNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x14 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NVNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x01 for PBM AllReadyIndication struct sPBMAllReadyIndication_Info { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; bool mAbbreviatedDialingNumber:1; bool mFixedDialingNumber:1; bool mMobileSubscriberIntegratedServicesDigitalNetwork:1; bool mMailBoxDialingNumber:1; bool mServiceDialingNumber:1; bool mBarredDialingNumber:1; bool mLastNumberDialed:1; bool mMailBoxNumber:1; // Padding out 8 bits UINT8 mReserved1; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x11 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x12 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x14 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_HardCodedNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x15 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NVNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x10 for PBMGetAllGroups() struct sPBMGetAllGroupsResponse_Groups { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mGroupCount; struct sGroup { UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // This array must be the size specified by mGroupCount // sGroup mGroups[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMSetGroupInfo() struct sPBMSetGroupInfoRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe response TLV 0x10 for PBMSetGroupInfo() struct sPBMSetGroupInfoResponse_ID { eQMIPBMSessionTypes mSessionType; UINT8 mGroupID; }; // Structure to describe request TLV 0x01 for PBMGetState() struct sPBMGetStateRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetStateInfo() struct sPBMGetStateInfoResponse_State { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMStates mState; }; // Structure to describe request TLV 0x01 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsResponse_Records { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM HiddenRecordStatusIndication struct sPBMHiddenRecordStatusIndication_Status { eQMIPBMSessionTypes mSessionType; INT8 mHiddenRecordsValid; }; // Structure to describe request TLV 0x01 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMGetNextRecordID() struct sPBMGetNextRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextRecordID() struct sPBMGetNextRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetAASList() struct sPBMGetAASListResponse_List { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mAASCount; struct sAAS { UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // This array must be the size specified by mAASCount // sAAS mAASs[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x10 for PBMSetAAS() struct sPBMSetAASRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMAASOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe response TLV 0x10 for PBMSetAAS() struct sPBMSetAASResponse_Info { eQMIPBMSessionTypes mSessionType; UINT8 mAASID; }; // Structure to describe indication TLV 0x01 for PBM AASChangeIndication struct sPBMAASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe indication TLV 0x10 for PBM AASChangeIndication struct sPBMAASChangeIndication_ExtendedAAS { UINT8 mExtendedStringLength; // This array must be the size (in BYTEs) specified by mExtendedStringLength // wchar_t mExtendedString[1]; }; // Structure to describe indication TLV 0x01 for PBM GASChangeIndication struct sPBMGASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGASID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe indication TLV 0x10 for PBM GASChangeIndication struct sPBMGASChangeIndication_ExtendedGAS { UINT8 mExtendedStringLength; // This array must be the size (in BYTEs) specified by mExtendedStringLength // wchar_t mExtendedString[1]; }; // Structure to describe request TLV 0x10 for PBMBindSubscription() struct sPBMBindSubscriptionRequest_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe response TLV 0x10 for PBMGetSubscription() struct sPBMGetSubscriptionResponse_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationRequest_Session { eQMIPBMSessionTypes mSessionType; }; // Structure to describe request TLV 0x10 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationRequest_StartID { UINT16 mStartingSetID; }; // Structure to describe request TLV 0x11 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationRequest_EndID { UINT16 mEndingSetID; }; // Structure to describe response TLV 0x10 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationResponse_Sets { UINT16 mNumberOfPhonebookSets; }; // Structure to describe indication TLV 0x01 for PBM SetCapabilitiesReadOperationIndication struct sPBMSetCapabilitiesReadOperationIndication_Data { eQMIPBMSessionTypes mSessionType; UINT8 mNumberOfPhonebookSets; struct sSet { UINT16 mSetID; UINT8 mNumberOfUSIMFiles; struct sField { eQMIPBMFieldTypes mFieldID; eQMIPBMMappingTypes mMappingType; UINT16 mNumberOfRecords; UINT16 mNumberOfFreeRecords; UINT16 mRecordLength; }; // This array must be the size specified by mNumberOfUSIMFiles // sField mFields[1]; }; // This array must be the size specified by mNumberOfPhonebookSets // sSet mSets[1]; }; // Structure to describe request TLV 0x01 for PBMExtendedReadRecords() struct sPBMExtendedReadRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mStartingRecordID; UINT16 mEndingRecordID; }; // Structure to describe response TLV 0x10 for PBMExtendedReadRecords() struct sPBMExtendedReadRecordsResponse_RecordsRead { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM ExtendedReadRecordsIndication struct sPBMExtendedReadRecordsIndication_Basic { UINT16 mSequenceNumber; eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT8 mNumberOfRecords; struct sRecord1 { UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sRecord2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sRecord { sRecord1 mRecord1; sRecord2 mRecord2; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x10 for PBM ExtendedReadRecordsIndication struct sPBMExtendedReadRecordsIndication_SecondName { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mSecondNameLength; // This array must be the size (in BYTEs) specified by mSecondNameLength // wchar_t mSecondName[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x11 for PBM ExtendedReadRecordsIndication struct sPBMExtendedReadRecordsIndication_AdditionalNumber { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x12 for PBM ExtendedReadRecordsIndication struct sPBMExtendedReadRecordsIndication_Group { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x13 for PBM ExtendedReadRecordsIndication struct sPBMExtendedReadRecordsIndication_Email { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x14 for PBM ExtendedReadRecordsIndication struct sPBMExtendedReadRecordsIndication_Hidden { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; INT8 mHidden; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe request TLV 0x10 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_PrimaryNumber { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x11 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_PrimaryName { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe request TLV 0x12 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_SecondName { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe request TLV 0x13 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_AdditionalNumber { UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // Structure to describe request TLV 0x14 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_Group { UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // Structure to describe request TLV 0x15 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_Email { UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // Structure to describe request TLV 0x16 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordRequest_Hidden { INT8 mHidden; }; // Structure to describe response TLV 0x10 for PBMExtendedWriteRecord() struct sPBMExtendedWriteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMExtendedSearchRecords() struct sPBMExtendedSearchRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x10 for PBMExtendedSearchRecords() struct sPBMExtendedSearchRecordsRequest_Number { UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x11 for PBMExtendedSearchRecords() struct sPBMExtendedSearchRecordsRequest_Name { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x10 for PBMExtendedSearchRecords() struct sPBMExtendedSearchRecordsResponse_List { UINT16 mNumberOfRecordIDs; // This array must be the size specified by mNumberOfRecordIDs // UINT16 mRecordID[1]; }; // Structure to describe request TLV 0x01 for PBMExtendedReadAllHiddenRecords() struct sPBMExtendedReadAllHiddenRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for PBMExtendedReadAllHiddenRecords() struct sPBMExtendedReadAllHiddenRecordsResponse_Records { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM SIMInitializationDoneIndication struct sPBMSIMInitializationDoneIndication_Slot { UINT32 mSlotID; }; // Structure to describe request TLV 0x01 for PBMReadUndecodedRecords() struct sPBMReadUndecodedRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mStartingRecordID; UINT16 mEndingRecordID; }; // Structure to describe response TLV 0x10 for PBMReadUndecodedRecords() struct sPBMReadUndecodedRecordsResponse_RecordsRead { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM ReadUndecodedRecordsIndication struct sPBMReadUndecodedRecordsIndication_Basic { UINT16 mSequenceNumber; eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT8 mNumberOfRecords; struct sRecord1 { UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sRecord2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sRecord { sRecord1 mRecord1; sRecord2 mRecord2; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x10 for PBM ReadUndecodedRecordsIndication struct sPBMReadUndecodedRecordsIndication_SecondName { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mSecondNameLength; // This array must be the size (in BYTEs) specified by mSecondNameLength // wchar_t mSecondName[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x11 for PBM ReadUndecodedRecordsIndication struct sPBMReadUndecodedRecordsIndication_AdditionalNumber { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x12 for PBM ReadUndecodedRecordsIndication struct sPBMReadUndecodedRecordsIndication_Group { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x13 for PBM ReadUndecodedRecordsIndication struct sPBMReadUndecodedRecordsIndication_Email { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x14 for PBM ReadUndecodedRecordsIndication struct sPBMReadUndecodedRecordsIndication_Hidden { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; INT8 mHidden; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for LOCClientRevision() struct sLOCClientRevisionRequest_Revision { UINT32 mRevision; }; // Structure to describe request TLV 0x01 for LOCRegisterEvents() struct sLOCRegisterEventsRequest_EventRegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; bool mPedometerControl:1; bool mMotionDataControl:1; // Padding out 45 bits UINT8 mReserved1:5; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCStart() struct sLOCStartRequest_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for LOCStart() struct sLOCStartRequest_FixRecurrenceType { eQMILOCFixRecurrenceType mFixRecurrenceType; }; // Structure to describe request TLV 0x11 for LOCStart() struct sLOCStartRequest_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe request TLV 0x12 for LOCStart() struct sLOCStartRequest_EnableIntermediateReports { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe request TLV 0x13 for LOCStart() struct sLOCStartRequest_MinimumIntervalBetweenPositionReports { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe request TLV 0x14 for LOCStart() struct sLOCStartRequest_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCStartRequest_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCStartRequest_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCStartRequest_ApplicationID { sLOCStartRequest_ApplicationID1 mLOCStartRequest_ApplicationID1; sLOCStartRequest_ApplicationID2 mLOCStartRequest_ApplicationID2; sLOCStartRequest_ApplicationID3 mLOCStartRequest_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCStop() struct sLOCStopRequest_SessionID { UINT8 mSessionID; }; // Structure to describe indication TLV 0x01 for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionStatus { eQMILOCSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x02 for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionID { UINT8 mSessionID; }; // Structure to describe indication TLV 0x10 for LOC PositionReportIndication struct sLOCPositionReportIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x11 for LOC PositionReportIndication struct sLOCPositionReportIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x13 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x14 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x15 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x16 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x17 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x18 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x19 for LOC PositionReportIndication struct sLOCPositionReportIndication_SpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x1A for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x1B for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x1C for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x1D for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x1E for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x1F for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC PositionReportIndication struct sLOCPositionReportIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x21 for LOC PositionReportIndication struct sLOCPositionReportIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x22 for LOC PositionReportIndication struct sLOCPositionReportIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x23 for LOC PositionReportIndication struct sLOCPositionReportIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; bool mInjectedPosition:1; bool mAFLT:1; bool mHybrid:1; // Padding out 24 bits UINT8 mReserved1[3]; }; // Structure to describe indication TLV 0x24 for LOC PositionReportIndication struct sLOCPositionReportIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x25 for LOC PositionReportIndication struct sLOCPositionReportIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x26 for LOC PositionReportIndication struct sLOCPositionReportIndication_LeapSeconds { UINT8 mLeapSeconds; }; // Structure to describe indication TLV 0x27 for LOC PositionReportIndication struct sLOCPositionReportIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x28 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x29 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2A for LOC PositionReportIndication struct sLOCPositionReportIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2B for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionFixCount { UINT32 mSessionFixCount; }; // Structure to describe indication TLV 0x2C for LOC PositionReportIndication struct sLOCPositionReportIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe indication TLV 0x2D for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeAssumed { INT8 mAltitudeAssumed; }; // Structure to describe indication TLV 0x01 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_AltitudeSource { eQMILOCAltitudeAssumed mAltitudeAssumed; }; // Structure to describe indication TLV 0x10 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_SatelliteInfo { UINT8 mSatelliteInfoCount; bool mValidSystem:1; bool mValidGNSSSatelliteID:1; bool mValidHealthStatus:1; bool mValidProcessStatus:1; bool mValidSatelliteInfoMask:1; bool mValidElevation:1; bool mValidAzimuth:1; bool mValidSignalToNoiseRatio:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMILOCSystem mSystem; UINT16 mGNSSSatelliteID; eQMILOCHealthStatus mHealthStatus; eQMILOCSatelliteStatus mSatelliteStatus; bool mHasEphemeris:1; bool mHasAlmanac:1; // Padding out 6 bits UINT8 mReserved2:6; float mElevationDegrees; float mAzimuthDegrees; float mSignalToNoiseRatiodBHz; }; // Structure to describe indication TLV 0x01 for LOC NMEAIndication struct sLOCNMEAIndication_NMEAString { // String is variable length, but must be size of the container // char mNMEAString[1]; }; // Structure to describe request TLV 0x01 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_NotificationType { eQMILOCNotificationType mNotificationType; }; // Structure to describe request TLV 0x10 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest { sLOCNetworkInitiatedRequestIndication_VxRequest1 mLOCNetworkInitiatedRequestIndication_VxRequest1; sLOCNetworkInitiatedRequestIndication_VxRequest2 mLOCNetworkInitiatedRequestIndication_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest { sLOCNetworkInitiatedRequestIndication_SUPLRequest1 mLOCNetworkInitiatedRequestIndication_SUPLRequest1; sLOCNetworkInitiatedRequestIndication_SUPLRequest2 mLOCNetworkInitiatedRequestIndication_SUPLRequest2; sLOCNetworkInitiatedRequestIndication_SUPLRequest3 mLOCNetworkInitiatedRequestIndication_SUPLRequest3; sLOCNetworkInitiatedRequestIndication_SUPLRequest4 mLOCNetworkInitiatedRequestIndication_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest { sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe request TLV 0x15 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLEmergencyNotification { UINT8 mESULPURLLength; // This array must be the size specified by mESULPURLLength // char mESULPURL[1]; }; // Structure to describe indication TLV 0x10 for LOC InjectTimeIndication struct sLOCInjectTimeIndication_TimeServerInfo { UINT32 mDelayThresholdMilliseconds; UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_AllowedSize { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x02 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x03 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x04 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x01 for LOC EngineStateIndication struct sLOCEngineStateIndication_EngineState { eQMILOCEngineState mEngineState; }; // Structure to describe indication TLV 0x01 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionState { eQMILOCSessionState mSessionState; }; // Structure to describe indication TLV 0x10 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x01 for LOCWiFi() struct sLOCWiFiRequestIndication_RequestType { eQMILOCRequestType mRequestType; }; // Structure to describe request TLV 0x10 for LOCWiFi() struct sLOCWiFiRequestIndication_TimeBetweenFixes { UINT16 mTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x10 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_AccelerometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x11 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_GyrometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x12 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_AccelerometerTempReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x13 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_GyrometerTempReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x01 for LOCTimeSync() struct sLOCTimeSyncRequestIndication_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x01 for LOC SetSPIStreamingReportIndication struct sLOCSetSPIStreamingReportIndication_SPIRequests { INT8 mEnableSPIRequests; }; // Structure to describe request TLV 0x01 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x02 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_ConnectionRequestType { eQMILOCConnectionRequestType mConnectionRequestType; }; // Structure to describe request TLV 0x03 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_WWANType { eQMILOCWWANType mWWANType; }; // Structure to describe indication TLV 0x02 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_MinorRevision { UINT32 mRevision; }; // Structure to describe indication TLV 0x10 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSMeasurementEngineFirmwareVersion { // String is variable length, but must be size of the container // char mFirmwareVersion[1]; }; // Structure to describe indication TLV 0x11 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSHostedSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x12 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x10 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe indication TLV 0x11 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_IntermediateFixes { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe indication TLV 0x12 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_MinimumIntervalBetweenFixes { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe indication TLV 0x13 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID { sLOCGetFixCriteriaIndication_ApplicationID1 mLOCGetFixCriteriaIndication_ApplicationID1; sLOCGetFixCriteriaIndication_ApplicationID2 mLOCGetFixCriteriaIndication_ApplicationID2; sLOCGetFixCriteriaIndication_ApplicationID3 mLOCGetFixCriteriaIndication_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UserResponse { eQMILOCUserResponse mUserResponse; }; // Structure to describe request TLV 0x02 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_NotificationType { eQMILOCNotificationType mNotificationType; }; // Structure to describe request TLV 0x10 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCProvideNIUserResponseRequest_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_VxRequest { sLOCProvideNIUserResponseRequest_VxRequest1 mLOCProvideNIUserResponseRequest_VxRequest1; sLOCProvideNIUserResponseRequest_VxRequest2 mLOCProvideNIUserResponseRequest_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest { sLOCProvideNIUserResponseRequest_SUPLRequest1 mLOCProvideNIUserResponseRequest_SUPLRequest1; sLOCProvideNIUserResponseRequest_SUPLRequest2 mLOCProvideNIUserResponseRequest_SUPLRequest2; sLOCProvideNIUserResponseRequest_SUPLRequest3 mLOCProvideNIUserResponseRequest_SUPLRequest3; sLOCProvideNIUserResponseRequest_SUPLRequest4 mLOCProvideNIUserResponseRequest_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest { sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe request TLV 0x15 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLEmergencyNotification { UINT8 mESULPURLLength; // This array must be the size specified by mESULPURLLength // char mESULPURL[1]; }; // Structure to describe request TLV 0x01 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_TotalSize { UINT32 mTotalSize; }; // Structure to describe request TLV 0x02 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_TotalParts { UINT16 mTotalParts; }; // Structure to describe request TLV 0x03 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartNumber { UINT16 mPartNumber; }; // Structure to describe request TLV 0x04 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartData { UINT16 mPartDataLength; // This array must be the size specified by mPartDataLength // UINT8 mPartData[1]; }; // Structure to describe request TLV 0x10 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_FormatType { eQMILOCOrbitsFormatType mOrbitsFormatType; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsDataIndication struct sLOCInjectPredictedOrbitsDataIndication_PartNumber { UINT16 mPartNumber; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_AllowedSizes { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x11 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataValidityIndication struct sLOCGetPredictedOrbitsDataValidityIndication_ValidityInfo { UINT64 mStartTimeInUTC; UINT16 mDurationHours; }; // Structure to describe request TLV 0x01 for LOCInjectUTCTime() struct sLOCInjectUTCTimeRequest_UTCTime { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x02 for LOCInjectUTCTime() struct sLOCInjectUTCTimeRequest_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe request TLV 0x10 for LOCInjectPosition() struct sLOCInjectPositionRequest_Latitude { double mLatitudeDegrees; }; // Structure to describe request TLV 0x11 for LOCInjectPosition() struct sLOCInjectPositionRequest_Longitude { double mLongitudeDegrees; }; // Structure to describe request TLV 0x12 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe request TLV 0x13 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe request TLV 0x14 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x15 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe request TLV 0x16 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe request TLV 0x17 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe request TLV 0x18 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe request TLV 0x19 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe request TLV 0x1A for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeSource { eQMILOCAltitudeSource mAltitudeSource; eQMILOCLinkage mLinkage; eQMILOCCoverage mCoverage; }; // Structure to describe request TLV 0x1B for LOCInjectPosition() struct sLOCInjectPositionRequest_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x1C for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionAge { UINT32 mAgeTimestampMilliseconds; }; // Structure to describe request TLV 0x1D for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionSource { eQMILOCPositionSource mPositionSource; }; // Structure to describe request TLV 0x01 for LOCSetEngineLock() struct sLOCSetEngineLockRequest_LockType { eQMILOCLockType mLockType; }; // Structure to describe indication TLV 0x10 for LOC GetEngineLockIndication struct sLOCGetEngineLockIndication_LockType { eQMILOCLockType mLockType; }; // Structure to describe request TLV 0x01 for LOCSetSBASConfig() struct sLOCSetSBASConfigRequest_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe response TLV 0x10 for LOCGetSBASConfig() struct sLOCGetSBASConfigResponse_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe request TLV 0x01 for LOCSetNMEATypes() struct sLOCSetNMEATypesRequest_SentenceTypes { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetNMEATypesIndication struct sLOCGetNMEATypesIndication_SentenceType { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCSetLowPowerMode() struct sLOCSetLowPowerModeRequest_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe indication TLV 0x10 for LOC GetLowPowerModeIndication struct sLOCGetLowPowerModeIndication_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe request TLV 0x01 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe request TLV 0x11 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe request TLV 0x12 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_AddressType { bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x02 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe indication TLV 0x10 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe indication TLV 0x11 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe indication TLV 0x12 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteAll { INT8 mDeleteAll; }; // Structure to describe request TLV 0x10 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteSatelliteInfo { UINT8 mSatelliteInfoCount; struct sSatelliteInfo { UINT16 mGNSSSatelliteID; eQMILOCSystem mSystem; bool mDeleteEphemeris:1; bool mDeleteAlmanac:1; // Padding out 6 bits UINT8 mReserved1:6; }; // This array must be the size specified by mSatelliteInfoCount // sSatelliteInfo mSatelliteInfos[1]; }; // Structure to describe request TLV 0x11 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteGNSData { bool mDeleteGPSSatelliteDirectory:1; bool mDeleteGPSSatelliteSteering:1; bool mDeleteGPSTime:1; bool mDeleteGPSAlmanacCorrection:1; bool mDeleteGLOSatelliteDirectory:1; bool mDeleteGLOSatelliteSteering:1; bool mDeleteGLOTime:1; bool mDeleteGLOAlmanacCorrection:1; bool mDeleteSBASSatelliteDirectory:1; bool mDeleteSBASSatelliteSteering:1; bool mDeletePosition:1; bool mDeleteTime:1; bool mDeleteIONO:1; bool mDeleteUTCTimestamp:1; bool mDeleteHealth:1; bool mDeleteSAData:1; bool mDeleteRTI:1; bool mDeleteSatelliteNoExist:1; bool mDeleteFrequencyBiasEstimate:1; // Padding out 45 bits UINT8 mReserved1:5; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x12 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteCellDatabase { bool mDeletePosition:1; bool mDeleteLatestGPSPosition:1; bool mDeleteOTAPosition:1; bool mDeleteEXTReferencePosition:1; bool mDeleteTimeTag:1; bool mDeleteCellID:1; bool mDeleteCachedCellID:1; bool mDeleteLastServerCell:1; bool mDeleteCurrentServerCell:1; bool mDeleteNeighborInfo:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x13 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteClockInfo { bool mDeleteTimeEstimate:1; bool mDeleteFrequencyEstimate:1; bool mDeleteWeekNumber:1; bool mDeleteRTCTime:1; bool mDeleteTimeTransfer:1; bool mDeleteGPSTimeEstimate:1; bool mDeleteGLOTimeEstimate:1; bool mDeleteGLODayNumber:1; bool mDeleteGLOYearNumber:1; bool mDeleteGLORFGroupDelay:1; bool mDeleteDisableTT:1; // Padding out 21 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x01 for LOCSetXTRATSessionControl() struct sLOCSetXTRATSessionControlRequest_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe indication TLV 0x10 for LOC GetXTRATSessionControlIndication struct sLOCGetXTRATSessionControlIndication_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe request TLV 0x10 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_Time { UINT32 mWiFiPositionTime; }; // Structure to describe request TLV 0x11 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_WiFiPosition { double mLatitudeDegrees; double mLongitudeDegrees; UINT16 mHEPEMeters; UINT8 mNumberOfAccessPointsUsed; eQMILOCWiFiFixErrorCode mFixErrorCode; }; // Structure to describe request TLV 0x12 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_AccessPointInformation { UINT8 mNumberOfAccessPoints; struct sAccessPointInfo { UINT8 mMACAddress[6]; INT32 mRSSIdBm; UINT16 mChannel; bool mBeingUsed:1; bool mHiddenSSID:1; bool mPrivate:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mNumberOfAccessPoints // sAccessPointInfo mAccessPointInfos[1]; }; // Structure to describe request TLV 0x13 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x01 for LOCProvideWiFiStatus() struct sLOCProvideWiFiStatusRequest_WiFiStatus { eQMILOCWiFiStatus mWiFiStatus; }; // Structure to describe indication TLV 0x10 for LOC GetRegisteredEventsIndication struct sLOCGetRegisteredEventsIndication_RegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; bool mPedometerControl:1; bool mMotionDataControl:1; // Padding out 45 bits UINT8 mReserved1:5; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCSetOperationMode() struct sLOCSetOperationModeRequest_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe indication TLV 0x10 for LOC GetOperationModeIndication struct sLOCGetOperationModeIndication_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe request TLV 0x01 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_StationaryStatus { INT8 mDeviceIsStationary; }; // Structure to describe request TLV 0x10 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_Confidence { UINT8 mStationaryConfidence; }; // Structure to describe request TLV 0x10 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe request TLV 0x11 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_AccelerometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x12 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_GyrometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x13 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_AccelerometerTimeSource { eQMILOCSensorTimeSources mSensorTimeSource; }; // Structure to describe request TLV 0x14 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_GyrometerTimeSource { eQMILOCSensorTimeSources mSensorTimeSource; }; // Structure to describe request TLV 0x15 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_AccelerometerTempData { eQMILOCSensorTimeSources mSensorTimeSource; UINT32 mTimeOfFirstSampleMilliseconds; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mSensorTemperature; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x16 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_GyrometerTempData { eQMILOCSensorTimeSources mSensorTimeSource; UINT32 mTimeOfFirstSampleMilliseconds; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mSensorTemperature; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe indication TLV 0x10 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe indication TLV 0x11 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_AccelerometerSampleAccepted { INT8 mAccelerometerSampleAccepted; }; // Structure to describe indication TLV 0x12 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_GyrometerSamplesAccepted { INT8 mGyrometerSamplesAccepted; }; // Structure to describe indication TLV 0x13 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_AccelerometerTempSamplesAccepted { INT8 mSensorTemperatureSamplesAccepted; }; // Structure to describe indication TLV 0x14 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_GyrometerTempSamplesAccepted { INT8 mSensorTemperatureSamplesAccepted; }; // Structure to describe request TLV 0x01 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe request TLV 0x02 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_SensorReceiveTime { UINT32 mProcessRXTimeMilliseconds; }; // Structure to describe request TLV 0x03 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_SensorTransmitTime { UINT32 mProcessTXTimeMilliseconds; }; // Structure to describe request TLV 0x01 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe request TLV 0x10 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe indication TLV 0x10 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe indication TLV 0x11 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe request TLV 0x01 for LOCSetExternalPowerConfig() struct sLOCSetExternalPowerConfigRequest_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe indication TLV 0x10 for LOC GetExternalPowerConfigIndication struct sLOCGetExternalPowerConfigIndication_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe request TLV 0x01 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x02 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_RequestType { eQMILOCConnectionRequestType mConnectionRequestType; }; // Structure to describe request TLV 0x03 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionStatus { eQMILOCConnectionStatus mConnectionStatus; }; // Structure to describe request TLV 0x10 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_APNProfile { eQMILOCPDNType mPDNType; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // Structure to describe request TLV 0x10 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe request TLV 0x11 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe request TLV 0x12 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe request TLV 0x13 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x14 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_AssistedGLONASS { bool mRRCCP:1; bool mRRLPUP:1; bool mLPPUP:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x15 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLHashAlgorithm { eQMILOCSUPLHashAlgorithms mSUPLHashAlgorithm; }; // Structure to describe request TLV 0x16 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLTLSVersion { eQMILOCSUPLTLSVersions mSUPLTLSVersion; }; // Structure to describe request TLV 0x17 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_EmergencyProtocol { eQMILOCEmergencyProtocols mEmergencyProtocol; }; // Structure to describe indication TLV 0x10 for LOC SetProtocolConfigParametersIndication struct sLOCSetProtocolConfigParametersIndication_FailedParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; bool mLLPConfiguration:1; bool mAssistedGLONASS:1; bool mSUPLHashAlgorithm:1; bool mSUPLTLSVersion:1; bool mEmergencyProtocol:1; // Padding out 56 bits UINT8 mReserved1[7]; }; // Structure to describe request TLV 0x01 for LOCGetProtocolConfigParameters() struct sLOCGetProtocolConfigParametersRequest_ConfigParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; bool mLLPConfiguration:1; bool mAssistedGLONASS:1; bool mSUPLHashAlgorithm:1; bool mSUPLTLSVersion:1; bool mEmergencyProtocol:1; // Padding out 56 bits UINT8 mReserved1[7]; }; // Structure to describe indication TLV 0x10 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe indication TLV 0x11 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe indication TLV 0x12 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe indication TLV 0x13 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x14 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_AssistedGLONASS { bool mRRCCP:1; bool mRRLPUP:1; bool mLPPUP:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x15 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLHashAlgorithm { eQMILOCSUPLHashAlgorithms mSUPLHashAlgorithm; }; // Structure to describe indication TLV 0x16 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLTLSVersion { eQMILOCSUPLTLSVersions mSUPLTLSVersion; }; // Structure to describe indication TLV 0x17 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_EmergencyProtocol { eQMILOCEmergencyProtocols mEmergencyProtocol; }; // Structure to describe request TLV 0x10 for LOCSetSensorControlConfig() struct sLOCSetSensorControlConfigRequest_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe indication TLV 0x10 for LOC GetSensorControlConfigIndication struct sLOCGetSensorControlConfigIndication_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe request TLV 0x10 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe request TLV 0x11 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x12 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x13 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x14 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPropertiesIndication struct sLOCSetSensorPropertiesIndication_Failures { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetSensorProperties() struct sLOCGetSensorPropertiesRequest_Properties { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x14 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x10 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe request TLV 0x11 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x12 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x13 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x14 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_HDRFAccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x15 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_HDRFGyroscopeSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPerformanceConfigIndication struct sLOCSetSensorPerformanceConfigIndication_FailedConfiguration { bool mPerformanceMode:1; bool mAccelerometerSampling:1; bool mGyrometerSampling:1; bool mAlgorithmConfig:1; bool mHDRFAccelerometerSampling:1; bool mHDRFGyroscopeSampling:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x14 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_HDRFAccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x15 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_HDRFGyroscopeSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x01 for LOCInjectSUPLCertificate() struct sLOCInjectSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x02 for LOCInjectSUPLCertificate() struct sLOCInjectSUPLCertificateRequest_Data { UINT16 mSUPLCertificateLength; // This array must be the size specified by mSUPLCertificateLength // UINT8 mSUPLCertificate[1]; }; // Structure to describe request TLV 0x10 for LOCDeleteSUPLCertificate() struct sLOCDeleteSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x10 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe request TLV 0x11 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe request TLV 0x12 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x10 for LOC SetPositionEngineConfigIndication struct sLOCSetPositionEngineConfigIndication_FailedParameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; bool mEnableFasterTTFF:1; // Padding out 28 bits UINT8 mReserved1:4; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetPositionEngineConfig() struct sLOCGetPositionEngineConfigRequest_Parameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; bool mEnableFasterTTFF:1; // Padding out 28 bits UINT8 mReserved1:4; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe indication TLV 0x11 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe indication TLV 0x12 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x01 for LOC NetworkInitiatedGeofenceIndication struct sLOCNetworkInitiatedGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x02 for LOC NetworkInitiatedGeofenceIndication struct sLOCNetworkInitiatedGeofenceIndication_OperationType { eQMILOCGeofenceOperationMode mOperationType; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceGeneralAlertIndication struct sLOCEventGeofenceGeneralAlertIndication_GeofenceGeneralAlert { eQMILOCGeofenceGeneralAlert mGeofenceGeneralAlert; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x02 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofenceBreachType { eQMILOCGeofenceBreachType mGeofenceBreachType; }; // Structure to describe indication TLV 0x10 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofencePosition { UINT64 mUTCTimestampMilliseconds; double mLatitudeDegrees; double mLongitudeDegrees; float mHorizontalUncertaintyEllipticalMinorMeters; float mHorizontalUncertaintyEllipticalMajorMeters; float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; INT8 mHorizontalSpeedValid; float mHorizontalSpeedMetersSecond; INT8 mAltitudeEllipsoidValid; float mAltitudeFromEllipsoidMeters; INT8 mVerticalUncertaintyValid; float mVerticalUncertaintyMeters; INT8 mVerticalSpeedValid; float mVerticalSpeedMetersSecond; INT8 mHeadingValid; float mHeadingDegrees; }; // Structure to describe request TLV 0x01 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x02 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_CircularGeofenceArguments { double mLatitudeDegrees; double mLongitudeDegrees; UINT32 mRadiusMeters; }; // Structure to describe request TLV 0x03 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x04 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_IncludePositionInBreachEvent { INT8 mIncludePositionInBreachEvent; }; // Structure to describe request TLV 0x10 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Responsiveness { eQMILOCResponsiveness mResponsiveness; }; // Structure to describe request TLV 0x11 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Confidence { eQMILOCConfidence mConfidence; }; // Structure to describe indication TLV 0x01 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x01 for LOCDeleteGeofence() struct sLOCDeleteGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x02 for LOCDeleteGeofence() struct sLOCDeleteGeofenceRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x01 for LOCQueryGeofence() struct sLOCQueryGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x02 for LOCQueryGeofence() struct sLOCQueryGeofenceRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Origin { eQMILOCGeofenceOrigin mGeofenceOrigin; }; // Structure to describe indication TLV 0x13 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_PositionFromGeofence { eQMILOCPositionFromGeofence mPositionFromGeofence; }; // Structure to describe indication TLV 0x14 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Parameters { double mLatitudeDegrees; double mLongitudeDegrees; UINT32 mRadiusMeters; }; // Structure to describe indication TLV 0x15 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x01 for LOCEditGeofence() struct sLOCEditGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x02 for LOCEditGeofence() struct sLOCEditGeofenceRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x10 for LOCEditGeofence() struct sLOCEditGeofenceRequest_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x11 for LOCEditGeofence() struct sLOCEditGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe indication TLV 0x01 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_FailedParameters { bool mGeofenceState:1; bool mBreachMask:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetBestAvailablePosition() struct sLOCGetBestAvailablePositionRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x13 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x14 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x15 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x16 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x17 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x18 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x19 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x1A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x1B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceCircular { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceElliptical { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalReliablility { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x1E for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x1F for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x21 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x22 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x23 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x24 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x25 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x26 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x27 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x28 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; bool mInjectedPosition:1; bool mAFLT:1; bool mHybrid:1; // Padding out 24 bits UINT8 mReserved1[3]; }; // Structure to describe indication TLV 0x29 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x2A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x2B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe request TLV 0x01 for LOCInjectMotionData() struct sLOCInjectMotionDataRequest_MotionData { eQMILOCMotionStates mMotionState; eQMILOCMotionModes mMotionMode; float mProbabilityOfState; UINT16 mAgeMilliseconds; UINT16 mTimeoutMilliseconds; }; // Structure to describe indication TLV 0x01 for LOC InjectMotionDataIndication struct sLOCInjectMotionDataIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe request TLV 0x01 for LOCGetNIGeofenceIDList() struct sLOCGetNIGeofenceIDListRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC GetNIGeofenceIDListIndication struct sLOCGetNIGeofenceIDListIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC GetNIGeofenceIDListIndication struct sLOCGetNIGeofenceIDListIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC GetNIGeofenceIDListIndication struct sLOCGetNIGeofenceIDListIndication_GeofenceIDList { UINT8 mGeofenceIDCount; // This array must be the size specified by mGeofenceIDCount // UINT32 mGeofenceID[1]; }; // Structure to describe request TLV 0x01 for LOCInjectGSMCellInfo() struct sLOCInjectGSMCellInfoRequest_GSMCellID { UINT32 mMCC; UINT32 mMNC; UINT32 mLAC; UINT32 mCID; }; // Structure to describe request TLV 0x02 for LOCInjectGSMCellInfo() struct sLOCInjectGSMCellInfoRequest_Roaming { INT8 mDeviceIsRoaming; }; // Structure to describe indication TLV 0x01 for LOC InjectGSMCellInfoIndication struct sLOCInjectGSMCellInfoIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe request TLV 0x01 for LOCInjectNetworkInitiatedMessage() struct sLOCInjectNetworkInitiatedMessageRequest_Type { eQMILOCNetworkInitiatedMessageTypes mMessageType; }; // Structure to describe request TLV 0x02 for LOCInjectNetworkInitiatedMessage() struct sLOCInjectNetworkInitiatedMessageRequest_Message { UINT16 mMessageLength; // This array must be the size specified by mMessageLength // UINT8 mMessageBody[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectNetworkInitiatedMessageIndication struct sLOCInjectNetworkInitiatedMessageIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x01 for LOC NotifyWWANOutOfServiceIndication struct sLOCNotifyWWANOutOfServiceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x01 for LOC PedometerControlIndication struct sLOCPedometerControlIndication_RequestData { INT8 mRequestPedometerData; }; // Structure to describe indication TLV 0x10 for LOC PedometerControlIndication struct sLOCPedometerControlIndication_ResetStepCount { INT8 mResetStepCount; }; // Structure to describe indication TLV 0x11 for LOC PedometerControlIndication struct sLOCPedometerControlIndication_StepCountThreshold { UINT32 mStepCountThreshold; }; // Structure to describe indication TLV 0x01 for LOC MotionDataControlIndication struct sLOCMotionDataControlIndication_RequestData { INT8 mRequestMotionData; }; // Structure to describe request TLV 0x01 for LOCInjectPedometerData() struct sLOCInjectPedometerDataRequest_TimeSource { eQMILOCSensorTimeSources mSensorTimeSource; }; // Structure to describe request TLV 0x02 for LOCInjectPedometerData() struct sLOCInjectPedometerDataRequest_Timestamp { UINT32 mTimestampInMilliseconds; }; // Structure to describe request TLV 0x03 for LOCInjectPedometerData() struct sLOCInjectPedometerDataRequest_TimeInterval { UINT32 mTimeIntervalInMilliseconds; }; // Structure to describe request TLV 0x04 for LOCInjectPedometerData() struct sLOCInjectPedometerDataRequest_StepCount { UINT32 mStepCount; }; // Structure to describe request TLV 0x10 for LOCInjectPedometerData() struct sLOCInjectPedometerDataRequest_StepConfidence { UINT8 mStepConfidence; }; // Structure to describe request TLV 0x11 for LOCInjectPedometerData() struct sLOCInjectPedometerDataRequest_StepCountUncertainty { float mStepCountUncertainty; }; // Structure to describe request TLV 0x12 for LOCInjectPedometerData() struct sLOCInjectPedometerDataRequest_StepRate { float mStepRate; }; // Structure to describe indication TLV 0x01 for LOC InjectPedometerDataIndication struct sLOCInjectPedometerDataIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe request TLV 0x01 for LOCInjectWCDMACellInfo() struct sLOCInjectWCDMACellInfoRequest_CellID { UINT32 mMCC; UINT32 mMNC; UINT32 mCID; }; // Structure to describe request TLV 0x02 for LOCInjectWCDMACellInfo() struct sLOCInjectWCDMACellInfoRequest_Roaming { UINT32 mRoamingStatus; }; // Structure to describe request TLV 0x10 for LOCInjectWCDMACellInfo() struct sLOCInjectWCDMACellInfoRequest_Frequency { UINT32 mServingCellFrequency; }; // Structure to describe request TLV 0x11 for LOCInjectWCDMACellInfo() struct sLOCInjectWCDMACellInfoRequest_PSC { UINT32 mPSC; }; // Structure to describe indication TLV 0x01 for LOC InjectWCDMACellInfoIndication struct sLOCInjectWCDMACellInfoIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe request TLV 0x01 for LOCInjectTDSCDMACellInfo() struct sLOCInjectTDSCDMACellInfoRequest_CellID { UINT32 mMCC; UINT32 mMNC; UINT32 mCID; UINT32 mLAC; }; // Structure to describe request TLV 0x02 for LOCInjectTDSCDMACellInfo() struct sLOCInjectTDSCDMACellInfoRequest_Roaming { UINT32 mRoamingStatus; }; // Structure to describe request TLV 0x10 for LOCInjectTDSCDMACellInfo() struct sLOCInjectTDSCDMACellInfoRequest_Frequency { UINT32 mServingCellFrequency; }; // Structure to describe indication TLV 0x01 for LOC InjectTDSCDMACellInfoIndication struct sLOCInjectTDSCDMACellInfoIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe request TLV 0x10 for LOCInjectSubscriberID() struct sLOCInjectSubscriberIDRequest_IMSI { UINT64 mPreferredIMSI; }; // Structure to describe request TLV 0x11 for LOCInjectSubscriberID() struct sLOCInjectSubscriberIDRequest_MSISDN { UINT64 mPreferredMSISDN; }; // Structure to describe indication TLV 0x01 for LOC InjectSubscriberIDIndication struct sLOCInjectSubscriberIDIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe request TLV 0x10 for WDASetDataFormat() struct sWDASetDataFormatRequest_QoSDataFormat { INT8 mQoSFlowHeaderPresent; }; // Structure to describe request TLV 0x11 for WDASetDataFormat() struct sWDASetDataFormatRequest_LinkLayerProtocol { eQMIWDALinkProtocols mLinkProtocol; }; // Structure to describe request TLV 0x12 for WDASetDataFormat() struct sWDASetDataFormatRequest_ULDataAggregationProtocol { eQMIWDADataAggregationProtocols mDataAggregationProtocol; }; // Structure to describe request TLV 0x13 for WDASetDataFormat() struct sWDASetDataFormatRequest_DLDataAggregationProtocol { eQMIWDADataAggregationProtocols mDataAggregationProtocol; }; // Structure to describe request TLV 0x14 for WDASetDataFormat() struct sWDASetDataFormatRequest_NDPSignature { UINT32 mNDPSignature; }; // Structure to describe request TLV 0x15 for WDASetDataFormat() struct sWDASetDataFormatRequest_DLMaxAggregateDatagrams { UINT32 mMaxAggregateDatagrams; }; // Structure to describe request TLV 0x16 for WDASetDataFormat() struct sWDASetDataFormatRequest_DLMaxAggregateSize { UINT32 mMaxAggregateSizeInBytes; }; // Structure to describe response TLV 0x10 for WDASetDataFormat() struct sWDASetDataFormatResponse_QoSDataFormat { INT8 mQoSFlowHeaderPresent; }; // Structure to describe response TLV 0x11 for WDASetDataFormat() struct sWDASetDataFormatResponse_LinkLayerProtocol { eQMIWDALinkProtocols mLinkProtocol; }; // Structure to describe response TLV 0x12 for WDASetDataFormat() struct sWDASetDataFormatResponse_ULDataAggregationProtocol { eQMIWDADataAggregationProtocols mDataAggregationProtocol; }; // Structure to describe response TLV 0x13 for WDASetDataFormat() struct sWDASetDataFormatResponse_DLDataAggregationProtocol { eQMIWDADataAggregationProtocols mDataAggregationProtocol; }; // Structure to describe response TLV 0x14 for WDASetDataFormat() struct sWDASetDataFormatResponse_NDPSignature { UINT32 mNDPSignature; }; // Structure to describe response TLV 0x15 for WDASetDataFormat() struct sWDASetDataFormatResponse_DLMaxAggregateDatagrams { UINT32 mMaxAggregateDatagrams; }; // Structure to describe response TLV 0x16 for WDASetDataFormat() struct sWDASetDataFormatResponse_DLMaxAggregateSize { UINT32 mMaxAggregateSizeInBytes; }; // Structure to describe response TLV 0x10 for WDAGetDataFormat() struct sWDAGetDataFormatResponse_QoSDataFormat { INT8 mQoSFlowHeaderPresent; }; // Structure to describe response TLV 0x11 for WDAGetDataFormat() struct sWDAGetDataFormatResponse_LinkLayerProtocol { eQMIWDALinkProtocols mLinkProtocol; }; // Structure to describe response TLV 0x12 for WDAGetDataFormat() struct sWDAGetDataFormatResponse_ULDataAggregationProtocol { eQMIWDADataAggregationProtocols mDataAggregationProtocol; }; // Structure to describe response TLV 0x13 for WDAGetDataFormat() struct sWDAGetDataFormatResponse_DLDataAggregationProtocol { eQMIWDADataAggregationProtocols mDataAggregationProtocol; }; // Structure to describe response TLV 0x14 for WDAGetDataFormat() struct sWDAGetDataFormatResponse_NDPSignature { UINT32 mNDPSignature; }; // Structure to describe response TLV 0x15 for WDAGetDataFormat() struct sWDAGetDataFormatResponse_DLMaxAggregateDatagrams { UINT32 mMaxAggregateDatagrams; }; // Structure to describe response TLV 0x16 for WDAGetDataFormat() struct sWDAGetDataFormatResponse_DLMaxAggregateSize { UINT32 mMaxAggregateSizeInBytes; }; // Structure to describe request TLV 0x01 for WDAEnablePacketFilter() struct sWDAEnablePacketFilterRequest_RestrictiveFilter { INT8 mRestrictiveFilter; }; // Structure to describe response TLV 0x10 for WDAGetPacketFilterState() struct sWDAGetPacketFilterStateResponse_FilterState { INT8 mFilterEnabled; }; // Structure to describe response TLV 0x11 for WDAGetPacketFilterState() struct sWDAGetPacketFilterStateResponse_RestrictiveFilter { INT8 mRestrictiveFilter; }; // Structure to describe request TLV 0x10 for WDAAddPacketFilterRule() struct sWDAAddPacketFilterRuleRequest_FilterHandle { UINT32 mFilterHandle; }; // Structure to describe request TLV 0x11 for WDAAddPacketFilterRule() struct sWDAAddPacketFilterRuleRequest_FilterRule1 { UINT8 mPatternLength; // This array must be the size specified by mPatternLength // UINT8 mPattern[1]; }; struct sWDAAddPacketFilterRuleRequest_FilterRule2 { UINT8 mMaskLength; // This array must be the size specified by mMaskLength // UINT8 mMask[1]; }; struct sWDAAddPacketFilterRuleRequest_FilterRule { sWDAAddPacketFilterRuleRequest_FilterRule1 mWDAAddPacketFilterRuleRequest_FilterRule1; sWDAAddPacketFilterRuleRequest_FilterRule2 mWDAAddPacketFilterRuleRequest_FilterRule2; }; // Structure to describe request TLV 0x10 for WDADeletePacketFilterRule() struct sWDADeletePacketFilterRuleRequest_FilterHandle { UINT32 mFilterHandle; }; // Structure to describe response TLV 0x10 for WDADeletePacketFilterRule() struct sWDADeletePacketFilterRuleResponse_FilterHandle { UINT32 mFilterHandle; }; // Structure to describe response TLV 0x10 for WDAGetPacketFilterRuleHandles() struct sWDAGetPacketFilterRuleHandlesResponse_FilterHandles { UINT8 mHandleCount; // This array must be the size specified by mHandleCount // UINT32 mFilterHandle[1]; }; // Structure to describe request TLV 0x01 for WDAGetPacketFilterRule() struct sWDAGetPacketFilterRuleRequest_FilterHandle { UINT32 mFilterHandle; }; // Structure to describe response TLV 0x10 for WDAGetPacketFilterRule() struct sWDAGetPacketFilterRuleResponse_FilterHandle { UINT32 mFilterHandle; }; // Structure to describe response TLV 0x11 for WDAGetPacketFilterRule() struct sWDAGetPacketFilterRuleResponse_FilterRule1 { UINT8 mPatternLength; // This array must be the size specified by mPatternLength // UINT8 mPattern[1]; }; struct sWDAGetPacketFilterRuleResponse_FilterRule2 { UINT8 mMaskLength; // This array must be the size specified by mMaskLength // UINT8 mMask[1]; }; struct sWDAGetPacketFilterRuleResponse_FilterRule { sWDAGetPacketFilterRuleResponse_FilterRule1 mWDAGetPacketFilterRuleResponse_FilterRule1; sWDAGetPacketFilterRuleResponse_FilterRule2 mWDAGetPacketFilterRuleResponse_FilterRule2; }; // Structure to describe request TLV 0x01 for WDASetLoopbackState() struct sWDASetLoopbackStateRequest_LoopbackState { INT8 mLoopbackStateEnabled; }; // Structure to describe response TLV 0x10 for WDAGetLoopbackState() struct sWDAGetLoopbackStateResponse_LoopbackState { INT8 mLoopbackStateEnabled; }; // Structure to describe request TLV 0x01 for QCMAPEnable() struct sQCMAPEnableRequest_IPFamily { eQMIQCMAPIPFamilies mIPFamily; }; // Structure to describe request TLV 0x10 for QCMAPEnable() struct sQCMAPEnableRequest_IPAddress { UINT8 mSubnetMask[4]; UINT8 mNATIPAddress[4]; UINT8 mNATDNSAddress[4]; UINT8 mUSBIPAddress[4]; UINT8 mUSBGatewayAddress[4]; UINT8 mApplicationsIPAddress[4]; UINT8 mApplicationsGatewayAddress[4]; }; // Structure to describe request TLV 0x11 for QCMAPEnable() struct sQCMAPEnableRequest_NetworkPolicy { bool m3GPP:1; bool m3GPP2:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; UINT8 m3GPP2ProfileID; UINT8 m3GPPProfileID; }; // Structure to describe request TLV 0x12 for QCMAPEnable() struct sQCMAPEnableRequest_SSID2IPAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe request TLV 0x13 for QCMAPEnable() struct sQCMAPEnableRequest_NATType { eQMIQCMAPNATTypes mNATType; }; // Structure to describe response TLV 0x10 for QCMAPEnable() struct sQCMAPEnableResponse_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPDisable() struct sQCMAPDisableRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPBringUpWWAN() struct sQCMAPBringUpWWANRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x01 for QCMAP BringUpWWANIndication struct sQCMAPBringUpWWANIndication_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x02 for QCMAP BringUpWWANIndication struct sQCMAPBringUpWWANIndication_IPFamily { eQMIQCMAPIPFamilies mIPFamily; }; // Structure to describe request TLV 0x01 for QCMAPTearDownWWAN() struct sQCMAPTearDownWWANRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x01 for QCMAP TearDownWWANIndication struct sQCMAPTearDownWWANIndication_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x02 for QCMAP TearDownWWANIndication struct sQCMAPTearDownWWANIndication_IPFamily { eQMIQCMAPIPFamilies mIPFamily; }; // Structure to describe request TLV 0x01 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusResponse_CallEndReason { eQMIQCMAPCallEndReasons mCallEndReason; }; // Structure to describe response TLV 0x11 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusResponse_VerboseCallEndReason { eQMIQCMAPVerboseCallEndReasons mVerboseCallEndReason; }; // Structure to describe response TLV 0x12 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusResponse_PacketServiceStatus { eQMIQCMAPPacketServiceStatus mPacketServiceStatus; }; // Structure to describe request TLV 0x01 for QCMAPGetIPSecVPNPassthrough() struct sQCMAPGetIPSecVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetIPSecVPNPassthrough() struct sQCMAPGetIPSecVPNPassthroughResponse_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPSetIPSecVPNPassthrough() struct sQCMAPSetIPSecVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPSetIPSecVPNPassthrough() struct sQCMAPSetIPSecVPNPassthroughRequest_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPGetPPTPVPNPassthrough() struct sQCMAPGetPPTPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetPPTPVPNPassthrough() struct sQCMAPGetPPTPVPNPassthroughResponse_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPSetPPTPVPNPassthrough() struct sQCMAPSetPPTPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPSetPPTPVPNPassthrough() struct sQCMAPSetPPTPVPNPassthroughRequest_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPGetL2TPVPNPassthrough() struct sQCMAPGetL2TPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetL2TPVPNPassthrough() struct sQCMAPGetL2TPVPNPassthroughResponse_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPSetL2TPVPNPassthrough() struct sQCMAPSetL2TPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPSetL2TPVPNPassthrough() struct sQCMAPSetL2TPVPNPassthroughRequest_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPGetDynamicNATEntryTimeout() struct sQCMAPGetDynamicNATEntryTimeoutRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetDynamicNATEntryTimeout() struct sQCMAPGetDynamicNATEntryTimeoutResponse_Timeout { UINT16 mTimeout; }; // Structure to describe request TLV 0x01 for QCMAPSetDynamicNATEntryTimeout() struct sQCMAPSetDynamicNATEntryTimeoutRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPSetDynamicNATEntryTimeout() struct sQCMAPSetDynamicNATEntryTimeoutRequest_Timeout { UINT16 mTimeout; }; // Structure to describe request TLV 0x01 for QCMAPAddStaticNATEntry() struct sQCMAPAddStaticNATEntryRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPAddStaticNATEntry() struct sQCMAPAddStaticNATEntryRequest_SNATEntry { UINT8 mPrivateIPAddress[4]; UINT16 mPrivatePort; UINT16 mGlobalPort; UINT8 mProtocol; }; // Structure to describe request TLV 0x01 for QCMAPDeleteStaticNATEntry() struct sQCMAPDeleteStaticNATEntryRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPDeleteStaticNATEntry() struct sQCMAPDeleteStaticNATEntryRequest_SNATEntry { UINT8 mPrivateIPAddress[4]; UINT16 mPrivatePort; UINT16 mGlobalPort; UINT8 mProtocol; }; // Structure to describe request TLV 0x01 for QCMAPGetStaticNATEntries() struct sQCMAPGetStaticNATEntriesRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetStaticNATEntries() struct sQCMAPGetStaticNATEntriesResponse_SNATEntries { UINT8 mSNATEntriesCount; struct sSNATEntry { UINT8 mPrivateIPAddress[4]; UINT16 mPrivatePort; UINT16 mGlobalPort; UINT8 mProtocol; }; // This array must be the size specified by mSNATEntriesCount // sSNATEntry mSNATEntrys[1]; }; // Structure to describe request TLV 0x01 for QCMAPSetDMZ() struct sQCMAPSetDMZRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPSetDMZ() struct sQCMAPSetDMZRequest_DMZIPAddress { UINT8 mDMZIPAddress[4]; }; // Structure to describe request TLV 0x01 for QCMAPDeleteDMZ() struct sQCMAPDeleteDMZRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetDMZ() struct sQCMAPGetDMZRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetDMZ() struct sQCMAPGetDMZResponse_DMZIPAddress { UINT8 mDMZIPAddress[4]; }; // Structure to describe request TLV 0x01 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigRequest_AddressType { bool mIPv4Address:1; bool mIPv6Address:1; bool mIPv4DNSAddress:1; bool mIPv6DNSAddress:1; // Padding out 60 bits UINT8 mReserved1:4; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x10 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv4Address { UINT8 mIPv4Address[4]; }; // Structure to describe response TLV 0x11 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x12 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv4PrimaryDNSAddress { UINT8 mIPv4Address[4]; }; // Structure to describe response TLV 0x13 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv4SecondaryDNSAddress { UINT8 mIPv4Address[4]; }; // Structure to describe response TLV 0x14 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv6PrimaryDNSAddress { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x15 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv6SecondaryDNSAddress { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x01 for QCMAPEnableFirewallSetting() struct sQCMAPEnableFirewallSettingRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPEnableFirewallSetting() struct sQCMAPEnableFirewallSettingRequest_PacketsAllowed { INT8 mPacketsMatchingFirewallRuleAllowed; }; // Structure to describe request TLV 0x01 for QCMAPGetFirewallSetting() struct sQCMAPGetFirewallSettingRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetFirewallSetting() struct sQCMAPGetFirewallSettingResponse_FirewallEnabled { INT8 mFirewallEnabled; }; // Structure to describe response TLV 0x11 for QCMAPGetFirewallSetting() struct sQCMAPGetFirewallSettingResponse_PacketsAllowed { INT8 mPacketsMatchingFirewallRuleAllowed; }; // Structure to describe request TLV 0x01 for QCMAPDisableFirewallSetting() struct sQCMAPDisableFirewallSettingRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPAddFirewallConfig() struct sQCMAPAddFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPAddFirewallConfig() struct sQCMAPAddFirewallConfigRequest_Config { UINT16 mStartingDestinationPort; UINT16 mEndingDestinationPort; UINT8 mProtocol; }; // Structure to describe response TLV 0x10 for QCMAPAddFirewallConfig() struct sQCMAPAddFirewallConfigResponse_FirewallHandle { UINT32 mFirewallHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetFirewallConfig() struct sQCMAPGetFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetFirewallConfig() struct sQCMAPGetFirewallConfigResponse_FirewallEntries { UINT8 mFirewallEntriesCount; struct sFirewallEntry { UINT32 mFirewallHandle; UINT16 mStartingDestinationPort; UINT16 mEndingDestinationPort; UINT8 mProtocol; }; // This array must be the size specified by mFirewallEntriesCount // sFirewallEntry mFirewallEntrys[1]; }; // Structure to describe request TLV 0x01 for QCMAPDeleteFirewallConfig() struct sQCMAPDeleteFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPDeleteFirewallConfig() struct sQCMAPDeleteFirewallConfigRequest_FirewallHandle { UINT32 mFirewallHandle; }; // Structure to describe request TLV 0x01 for QCMAPWWANStatusIndicationRegister() struct sQCMAPWWANStatusIndicationRegisterRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPWWANStatusIndicationRegister() struct sQCMAPWWANStatusIndicationRegisterRequest_Registration { INT8 mRegisterForIndication; }; // Structure to describe request TLV 0x01 for QCMAPStationModeEnable() struct sQCMAPStationModeEnableRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPStationModeDisable() struct sQCMAPStationModeDisableRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetStationMode() struct sQCMAPGetStationModeRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetStationMode() struct sQCMAPGetStationModeResponse_StationMode { INT8 mStationModeEnabled; }; // Structure to describe indication TLV 0x01 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x02 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_IPFamily { eQMIQCMAPIPFamilies mIPFamily; }; // Structure to describe indication TLV 0x03 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_PacketServiceStatus { eQMIQCMAPPacketServiceStatus mPacketServiceStatus; }; // Structure to describe indication TLV 0x04 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_ReconfigRequired { INT8 mReconfigurationRequired; }; // Structure to describe indication TLV 0x10 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_CallEndReason { eQMIQCMAPCallEndReasons mCallEndReason; }; // Structure to describe indication TLV 0x11 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_VerboseCallEndReason { eQMIQCMAPVerboseCallEndReasons mVerboseCallEndReason; }; // Structure to describe request TLV 0x01 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_NextHeaderProtocol { eQMIQCMAPNextHeaderProtocols mNextHeaderProtocol; }; // Structure to describe request TLV 0x10 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_TCPUDPSource { UINT16 mPort; UINT16 mRange; }; // Structure to describe request TLV 0x11 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_TCPUDPDestination { UINT16 mPort; UINT16 mRange; }; // Structure to describe request TLV 0x12 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_ICMPType { UINT8 mICMPType; }; // Structure to describe request TLV 0x13 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_ICMPCode { UINT8 mICMPCode; }; // Structure to describe request TLV 0x14 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_ESPSPI { UINT32 mESPSPI; }; // Structure to describe request TLV 0x15 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv4SourceAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe request TLV 0x16 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv4DestinationAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe request TLV 0x17 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv4TOS { UINT8 mTOSValue; UINT8 mTOSMask; }; // Structure to describe request TLV 0x18 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv6SourceAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe request TLV 0x19 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv6DestinationAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe request TLV 0x1A for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv6TrafficClass { UINT8 mTrafficClassValue; UINT8 mTrafficClassMask; }; // Structure to describe response TLV 0x10 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigResponse_FirewallHandle { UINT32 mFirewallHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x02 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigRequest_FirewallHandle { UINT32 mFirewallHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_NextHeaderProtocol { eQMIQCMAPNextHeaderProtocols mNextHeaderProtocol; }; // Structure to describe response TLV 0x11 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_TCPUDPSource { UINT16 mPort; UINT16 mRange; }; // Structure to describe response TLV 0x12 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_TCPUDPDestination { UINT16 mPort; UINT16 mRange; }; // Structure to describe response TLV 0x13 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_ICMPType { UINT8 mICMPType; }; // Structure to describe response TLV 0x14 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_ICMPCode { UINT8 mICMPCode; }; // Structure to describe response TLV 0x15 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_ESPSPI { UINT32 mESPSPI; }; // Structure to describe response TLV 0x16 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv4SourceAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe response TLV 0x17 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv4DestinationAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe response TLV 0x18 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv4TOS { UINT8 mTOSValue; UINT8 mTOSMask; }; // Structure to describe response TLV 0x19 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv6SourceAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe response TLV 0x1A for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv6DestinationAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe response TLV 0x1B for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv6TrafficClass { UINT8 mTrafficClassValue; UINT8 mTrafficClassMask; }; // Structure to describe request TLV 0x01 for QCMAPGetFirewallHandles() struct sQCMAPGetFirewallHandlesRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetFirewallHandles() struct sQCMAPGetFirewallHandlesResponse_Handles { UINT8 mFirewallHandlesCount; // This array must be the size specified by mFirewallHandlesCount // UINT32 mFirewallHandle[1]; }; // Structure to describe request TLV 0x01 for QCMAPChangeNATType() struct sQCMAPChangeNATTypeRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x10 for QCMAPChangeNATType() struct sQCMAPChangeNATTypeRequest_NATType { eQMIQCMAPNATTypes mNATType; }; // Structure to describe request TLV 0x01 for QCMAPGetNATType() struct sQCMAPGetNATTypeRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetNATType() struct sQCMAPGetNATTypeResponse_NATType { eQMIQCMAPNATTypes mNATType; }; // Structure to describe request TLV 0x10 for PDCRegisterForIndications() struct sPDCRegisterForIndicationsRequest_Config { INT8 mEnableReporting; }; // Structure to describe indication TLV 0x01 for PDC ConfigChangeIndication struct sPDCConfigChangeIndication_Config { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x01 for PDCGetSelectedConfig() struct sPDCGetSelectedConfigRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCGetSelectedConfig() struct sPDCGetSelectedConfigRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_ActiveID { UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe indication TLV 0x12 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_PendingID { UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x01 for PDCSetSelectedConfig() struct sPDCSetSelectedConfigRequest_Config { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x10 for PDCSetSelectedConfig() struct sPDCSetSelectedConfigRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC SetSelectedConfigIndication struct sPDCSetSelectedConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC SetSelectedConfigIndication struct sPDCSetSelectedConfigIndication_Token { UINT32 mToken; }; // Structure to describe request TLV 0x10 for PDCListConfigs() struct sPDCListConfigsRequest_Token { UINT32 mToken; }; // Structure to describe request TLV 0x11 for PDCListConfigs() struct sPDCListConfigsRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe indication TLV 0x01 for PDC ListConfigsIndication struct sPDCListConfigsIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC ListConfigsIndication struct sPDCListConfigsIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC ListConfigsIndication struct sPDCListConfigsIndication_List { UINT8 mConfigListLength; struct sConfig { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // This array must be the size specified by mConfigListLength // sConfig mConfigs[1]; }; // Structure to describe request TLV 0x01 for PDCDeleteConfig() struct sPDCDeleteConfigRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCDeleteConfig() struct sPDCDeleteConfigRequest_Token { UINT32 mToken; }; // Structure to describe request TLV 0x11 for PDCDeleteConfig() struct sPDCDeleteConfigRequest_ID { UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe indication TLV 0x01 for PDC DeleteConfigIndication struct sPDCDeleteConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC DeleteConfigIndication struct sPDCDeleteConfigIndication_Token { UINT32 mToken; }; // Structure to describe request TLV 0x01 for PDCLoadConfig() struct sPDCLoadConfigRequest_Frame1 { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; struct sPDCLoadConfigRequest_Frame2 { UINT32 mTotalSize; UINT16 mFrameSize; // This array must be the size specified by mFrameSize // UINT8 mFrame[1]; }; struct sPDCLoadConfigRequest_Frame { sPDCLoadConfigRequest_Frame1 mPDCLoadConfigRequest_Frame1; sPDCLoadConfigRequest_Frame2 mPDCLoadConfigRequest_Frame2; }; // Structure to describe request TLV 0x10 for PDCLoadConfig() struct sPDCLoadConfigRequest_Token { UINT32 mToken; }; // Structure to describe response TLV 0x10 for PDCLoadConfig() struct sPDCLoadConfigResponse_Reset { INT8 mFrameReset; }; // Structure to describe indication TLV 0x01 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Received { UINT32 mReceivedSize; }; // Structure to describe indication TLV 0x12 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Remaining { UINT32 mRemainingSize; }; // Structure to describe indication TLV 0x13 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Reset { INT8 mFrameReset; }; // Structure to describe request TLV 0x01 for PDCActivateConfig() struct sPDCActivateConfigRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCActivateConfig() struct sPDCActivateConfigRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC ActivateConfigIndication struct sPDCActivateConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC ActivateConfigIndication struct sPDCActivateConfigIndication_Token { UINT32 mToken; }; // Structure to describe request TLV 0x01 for PDCGetConfigInfo() struct sPDCGetConfigInfoRequest_Config { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x10 for PDCGetConfigInfo() struct sPDCGetConfigInfoRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Size { UINT32 mTotalSize; }; // Structure to describe indication TLV 0x12 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Description { UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe indication TLV 0x13 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Version { UINT32 mVersion; }; // Structure to describe request TLV 0x01 for PDCGetConfigLimits() struct sPDCGetConfigLimitsRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCGetConfigLimits() struct sPDCGetConfigLimitsRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_MaximumSize { UINT64 mMaximumSize; }; // Structure to describe indication TLV 0x12 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_CurrentSize { UINT64 mCurrentSize; }; // Structure to describe request TLV 0x01 for PDCGetDefaultConfigInfo() struct sPDCGetDefaultConfigInfoRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCGetDefaultConfigInfo() struct sPDCGetDefaultConfigInfoRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC GetDefaultConfigInfoIndication struct sPDCGetDefaultConfigInfoIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC GetDefaultConfigInfoIndication struct sPDCGetDefaultConfigInfoIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC GetDefaultConfigInfoIndication struct sPDCGetDefaultConfigInfoIndication_Version { UINT32 mVersion; }; // Structure to describe indication TLV 0x12 for PDC GetDefaultConfigInfoIndication struct sPDCGetDefaultConfigInfoIndication_Size { UINT32 mTotalSize; }; // Structure to describe indication TLV 0x13 for PDC GetDefaultConfigInfoIndication struct sPDCGetDefaultConfigInfoIndication_Description { UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe request TLV 0x01 for PDCDeactivateConfig() struct sPDCDeactivateConfigRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCDeactivateConfig() struct sPDCDeactivateConfigRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC DeactivateConfigIndication struct sPDCDeactivateConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC DeactivateConfigIndication struct sPDCDeactivateConfigIndication_Token { UINT32 mToken; }; // Structure to describe request TLV 0x01 for RFRPESetRFMScenario() struct sRFRPESetRFMScenarioRequest_Scenarios { UINT8 mScenarioCount; // This array must be the size specified by mScenarioCount // UINT32 mScenarioNumber[1]; }; // Structure to describe response TLV 0x10 for RFRPEGetRFMScenario() struct sRFRPEGetRFMScenarioResponse_Scenarios { UINT8 mScenarioCount; // This array must be the size specified by mScenarioCount // UINT32 mScenarioNumber[1]; }; // Structure to describe response TLV 0x10 for RFRPEGetProvisionedTableRevision() struct sRFRPEGetProvisionedTableRevisionResponse_Revision { UINT32 mProvisionedTableRevision; }; // Structure to describe response TLV 0x11 for RFRPEGetProvisionedTableRevision() struct sRFRPEGetProvisionedTableRevisionResponse_Names { UINT8 mProvisionedTableOEMNameLength; // This array must be the size specified by mProvisionedTableOEMNameLength // UINT16 mProvisionedTableOEMName[1]; }; // Structure to describe request TLV 0x10 for CATSetEventReport() struct sCATSetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved1:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CATSetEventReport() struct sCATSetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved2:1; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; bool mBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved3:5; }; // Structure to describe request TLV 0x12 for CATSetEventReport() struct sCATSetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; bool mSlot3:1; bool mSlot4:1; bool mSlot5:1; // Padding out 3 bits UINT8 mReserved1:3; }; // Structure to describe request TLV 0x13 for CATSetEventReport() struct sCATSetEventReportRequest_FullFunctionMask { bool mSendSMS:1; bool mSetupCall:1; bool mSendDTMF:1; bool mSendSS:1; bool mSendUSSD:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for CATSetEventReport() struct sCATSetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved1:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CATSetEventReport() struct sCATSetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved2:1; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; bool mBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved3:5; }; // Structure to describe response TLV 0x12 for CATSetEventReport() struct sCATSetEventReportResponse_FullFunctionFailureMask { bool mSendSMS:1; bool mSetupCall:1; bool mSendDTMF:1; bool mSendSS:1; bool mSendUSSD:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for CAT EventReport struct sCATEventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT EventReport struct sCATEventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT EventReport struct sCATEventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT EventReport struct sCATEventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT EventReport struct sCATEventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT EventReport struct sCATEventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT EventReport struct sCATEventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT EventReport struct sCATEventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT EventReport struct sCATEventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT EventReport struct sCATEventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT EventReport struct sCATEventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT EventReport struct sCATEventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT EventReport struct sCATEventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT EventReport struct sCATEventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT EventReport struct sCATEventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT EventReport struct sCATEventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT EventReport struct sCATEventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT EventReport struct sCATEventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT EventReport struct sCATEventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT EventReport struct sCATEventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT EventReport struct sCATEventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT EventReport struct sCATEventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT EventReport struct sCATEventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT EventReport struct sCATEventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT EventReport struct sCATEventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT EventReport struct sCATEventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT EventReport struct sCATEventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT EventReport struct sCATEventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT EventReport struct sCATEventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT EventReport struct sCATEventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT EventReport struct sCATEventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT EventReport struct sCATEventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT EventReport struct sCATEventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT EventReport struct sCATEventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT EventReport struct sCATEventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT EventReport struct sCATEventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT EventReport struct sCATEventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT EventReport struct sCATEventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT EventReport struct sCATEventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT EventReport struct sCATEventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT EventReport struct sCATEventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT EventReport struct sCATEventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT EventReport struct sCATEventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT EventReport struct sCATEventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT EventReport struct sCATEventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT EventReport struct sCATEventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT EventReport struct sCATEventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT EventReport struct sCATEventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT EventReport struct sCATEventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT EventReport struct sCATEventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT EventReport struct sCATEventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT EventReport struct sCATEventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT EventReport struct sCATEventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT EventReport struct sCATEventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT EventReport struct sCATEventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT EventReport struct sCATEventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT EventReport struct sCATEventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT EventReport struct sCATEventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT EventReport struct sCATEventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT EventReport struct sCATEventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT EventReport struct sCATEventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT EventReport struct sCATEventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT EventReport struct sCATEventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT EventReport struct sCATEventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT EventReport struct sCATEventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT EventReport struct sCATEventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT EventReport struct sCATEventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT EventReport struct sCATEventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT EventReport struct sCATEventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT EventReport struct sCATEventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT EventReport struct sCATEventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT EventReport struct sCATEventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT EventReport struct sCATEventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT EventReport struct sCATEventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT EventReport struct sCATEventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT EventReport struct sCATEventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT EventReport struct sCATEventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT EventReport struct sCATEventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT EventReport struct sCATEventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT EventReport struct sCATEventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT EventReport struct sCATEventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT EventReport struct sCATEventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT EventReport struct sCATEventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT EventReport struct sCATEventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe indication TLV 0x68 for CAT EventReport struct sCATEventReportIndication_ResponseType { eQMICATResponseTypes mResponseType; }; // Structure to describe indication TLV 0x69 for CAT EventReport struct sCATEventReportIndication_BearerIndependentProtocolStatus { UINT8 mChannelID; eQMICATBearerIndependentProtocolStatus mBearerIndependentProtocolStatus; }; // Structure to describe response TLV 0x01 for CATGetServiceState() struct sCATGetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CATGetServiceState() struct sCATGetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved2:1; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; bool mCommonBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved3:5; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; // Padding out 1 bits UINT8 mReserved5:1; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; bool mControlBearerIndependentProtocolStatus:1; // Padding out 5 bits UINT8 mReserved6:5; }; // Structure to describe response TLV 0x11 for CATGetServiceState() struct sCATGetServiceStateResponse_FullFunctionServiceState { bool mSendSMS:1; bool mSetupCall:1; bool mSendDTMF:1; bool mSendSS:1; bool mSendUSSD:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATSendTerminal() struct sCATSendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CATGetEventReport() struct sCATGetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CATGetEventReport() struct sCATGetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CATGetEventReport() struct sCATGetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CATGetEventReport() struct sCATGetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CATGetEventReport() struct sCATGetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CATGetEventReport() struct sCATGetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CATGetEventReport() struct sCATGetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CATGetEventReport() struct sCATGetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CATGetEventReport() struct sCATGetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CATGetEventReport() struct sCATGetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CATGetEventReport() struct sCATGetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CATGetEventReport() struct sCATGetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CATGetEventReport() struct sCATGetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CATGetEventReport() struct sCATGetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CATGetEventReport() struct sCATGetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CATGetEventReport() struct sCATGetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CATGetEventReport() struct sCATGetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CATGetEventReport() struct sCATGetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CATGetEventReport() struct sCATGetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CATGetEventReport() struct sCATGetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CATGetEventReport() struct sCATGetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CATGetEventReport() struct sCATGetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CATGetEventReport() struct sCATGetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CATGetEventReport() struct sCATGetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CATGetEventReport() struct sCATGetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CATGetEventReport() struct sCATGetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CATGetEventReport() struct sCATGetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CATGetEventReport() struct sCATGetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CATGetEventReport() struct sCATGetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CATGetEventReport() struct sCATGetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CATGetEventReport() struct sCATGetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CATGetEventReport() struct sCATGetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CATGetEventReport() struct sCATGetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CATGetEventReport() struct sCATGetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CATGetEventReport() struct sCATGetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CATGetEventReport() struct sCATGetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CATGetEventReport() struct sCATGetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CATGetEventReport() struct sCATGetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CATGetEventReport() struct sCATGetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CATGetEventReport() struct sCATGetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CATGetEventReport() struct sCATGetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CATGetEventReport() struct sCATGetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CATGetEventReport() struct sCATGetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CATGetEventReport() struct sCATGetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CATGetEventReport() struct sCATGetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CATGetEventReport() struct sCATGetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CATGetEventReport() struct sCATGetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CATGetEventReport() struct sCATGetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CATGetEventReport() struct sCATGetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CATGetEventReport() struct sCATGetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CATGetEventReport() struct sCATGetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CATGetEventReport() struct sCATGetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CATGetEventReport() struct sCATGetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CATGetEventReport() struct sCATGetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CATGetEventReport() struct sCATGetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CATGetEventReport() struct sCATGetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CATGetEventReport() struct sCATGetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CATGetEventReport() struct sCATGetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CATGetEventReport() struct sCATGetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CATGetEventReport() struct sCATGetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CATGetEventReport() struct sCATGetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CATGetEventReport() struct sCATGetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CATGetEventReport() struct sCATGetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CATGetEventReport() struct sCATGetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CATGetEventReport() struct sCATGetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CATGetEventReport() struct sCATGetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CATGetEventReport() struct sCATGetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CATGetEventReport() struct sCATGetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CATGetEventReport() struct sCATGetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CATGetEventReport() struct sCATGetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CATGetEventReport() struct sCATGetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CATGetEventReport() struct sCATGetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CATGetEventReport() struct sCATGetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x68 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseType { eQMICATResponseTypes mResponseType; }; // Structure to describe response TLV 0x69 for CATGetEventReport() struct sCATGetEventReportResponse_BearerIndependentProtocolStatus { UINT8 mChannelID; eQMICATBearerIndependentProtocolStatus mBearerIndependentProtocolStatus; }; // Structure to describe request TLV 0x01 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CATSendDecodedTerminal() struct sCATSendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe request TLV 0x1C for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe request TLV 0x1D for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe request TLV 0x1E for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_RAT { eQMICATRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x1F for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CallType { eQMICATCallTypes mCallType; }; // Structure to describe request TLV 0x20 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_TransactionID { UINT8 mCallTransactionIDLength; // This array must be the size specified by mCallTransactionIDLength // UINT8 mCallTransactionID[1]; }; // Structure to describe request TLV 0x21 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_RPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x22 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_TPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x23 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Cause { UINT8 mCauseLength; // This array must be the size specified by mCauseLength // UINT8 mCause[1]; }; // Structure to describe response TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe response TLV 0x1A for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_SMSPPDataDownloadUICCACK { UINT8 mSMSPPDataDownloadUICCACKLength; // This array must be the size specified by mSMSPPDataDownloadUICCACKLength // UINT8 mSMSPPDataDownloadUICCACKData[1]; }; // Structure to describe response TLV 0x1B for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_RPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x1C for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_TPAddress { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x10 for CATEventConfirmation() struct sCATEventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CATEventConfirmation() struct sCATEventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CATEventConfirmation() struct sCATEventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x12 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x01 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSCloseChannelIndication struct sCATSCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSSendData() struct sCATSCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CATSCWSSendData() struct sCATSCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x02 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_RemainingDataLength { UINT16 mDataLength; }; // Structure to describe request TLV 0x10 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CATSetConfiguration() struct sCATSetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CATSetConfiguration() struct sCATSetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CATGetConfiguration() struct sCATGetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CATGetConfiguration() struct sCATGetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for RMSGetSMSWake() struct sRMSGetSMSWakeResponse_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSGetSMSWake() struct sRMSGetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for OMASetEventReport() struct sOMASetEventReportRequest_NIA { INT8 mReportNetworkInitiatedAlerts; }; // Structure to describe request TLV 0x11 for OMASetEventReport() struct sOMASetEventReportRequest_Status { INT8 mReportSessionStatus; }; // Structure to describe indication TLV 0x10 for OMA EventReport struct sOMAEventReportIndication_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe indication TLV 0x11 for OMA EventReport struct sOMAEventReportIndication_Status { eQMIOMASessionStates mSessionState; }; // Structure to describe indication TLV 0x12 for OMA EventReport struct sOMAEventReportIndication_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe request TLV 0x10 for OMAStartSession() struct sOMAStartSessionRequest_Type { eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Info { eQMIOMASessionStates mSessionState; eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x11 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe response TLV 0x12 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Retry { UINT8 mRetryCount; UINT16 mRetryPauseTimer; UINT16 mRemainingTime; }; // Structure to describe response TLV 0x13 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe request TLV 0x10 for OMASendSelection() struct sOMASendSelectionRequest_Type { eQMIOMASelections mSelection; UINT16 mSessionID; }; // Structure to describe response TLV 0x10 for OMAGetFeatures() struct sOMAGetFeaturesResponse_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe response TLV 0x11 for OMAGetFeatures() struct sOMAGetFeaturesResponse_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe response TLV 0x12 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFAFeature { INT8 mHFAFeatureEnabled; }; // Structure to describe response TLV 0x13 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFADoneState { eQMIOMAHFADoneStates mHFAFeatureDoneState; }; // Structure to describe request TLV 0x10 for OMASetFeatures() struct sOMASetFeaturesRequest_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe request TLV 0x11 for OMASetFeatures() struct sOMASetFeaturesRequest_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe request TLV 0x12 for OMASetFeatures() struct sOMASetFeaturesRequest_HFAFeature { INT8 mHFAFeatureEnabled; }; #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp000066400000000000000000030603771455567757300316550ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtExports.cpp DESCRIPTION: QUALCOMM Gobi 5000 Connection Management API exports Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ) { // Validate arguments if ( (pInterface == 0) || (pServicesCount == 0) || (*pServicesCount == 0) || (pServices == 0) || (pHandle == 0) ) { return (ULONG)eGOBI_ERR_INVALID_ARG; } GOBIHANDLE handle = gDLL.CreateAPI(); if (handle == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcCount = *pServicesCount; *pServicesCount = 0; *pHandle = 0; std::set inSvcs; std::set outSvcs; ULONG s = 0; for (s = 0; s < svcCount; s++) { inSvcs.insert( (eQMIService)pServices[s] ); } outSvcs = pAPI->Connect( pInterface, inSvcs ); ULONG outSvcsCount = (ULONG)outSvcs.size(); if (outSvcsCount > svcCount) { outSvcsCount = svcCount; } if (outSvcsCount == 0) { ULONG rc = (ULONG)pAPI->GetCorrectedLastError(); pAPI = 0; gDLL.DeleteAPI( handle ); return rc; } std::set ::const_iterator pOutSvc = outSvcs.begin(); for (s = 0; s < svcCount; s++) { pServices[s] = UCHAR_MAX; if (s < outSvcsCount) { pServices[s] = (ULONG)*pOutSvc++; } } *pHandle = handle; *pServicesCount = outSvcsCount; return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelSend( svcID, pTXID ); } /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bDisco = pAPI->Disconnect(); if (bDisco == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetGenericCallback( svcID, msgID, pCallback, handle ); } /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSupportedMessages DESCRIPTION: The function sends 'WDS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSupportedFields DESCRIPTION: The function sends 'WDS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 106; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 133; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 134; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 135; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGISwitch DESCRIPTION: The function sends 'WDS/EMBMS TMGI Switch Request' (0x0088) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGISwitch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 136; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSBindDataPort DESCRIPTION: The function sends 'WDS/Bind Data Port Request' (0x0089) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSBindDataPort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 137; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetPDNFilter DESCRIPTION: The function sends 'WDS/Set PDN Filter Request' (0x008A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetPDNFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 138; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSRemovePDNFilter DESCRIPTION: The function sends 'WDS/Remove PDN Filter Request' (0x008B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSRemovePDNFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 139; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSReverseIPTransportConnectionIndication DESCRIPTION: The function sends 'WDS/Reverse IP Transport Connection Indication Request' (0x008D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReverseIPTransportConnectionIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 141; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetIPSecStaticSAConfig DESCRIPTION: The function sends 'WDS/Get IPSec Static SA Config Request' (0x008F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetIPSecStaticSAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 143; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSReverseIPTransportConfigComplete DESCRIPTION: The function sends 'WDS/Reverse IP Transport Config Complete Request' (0x0090) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReverseIPTransportConfigComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 144; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetExtendedDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Extended Data Bearer Technology Request' (0x0091) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetExtendedDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 145; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEMaximumAttachPDNNumber DESCRIPTION: The function sends 'WDS/Get LTE Maximum Attach PDN Number Request' (0x0092) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEMaximumAttachPDNNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 146; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetLTEAttachPDNList DESCRIPTION: The function sends 'WDS/Set LTE Attach PDN List Request' (0x0093) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetLTEAttachPDNList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 147; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEAttachPDNList DESCRIPTION: The function sends 'WDS/Get LTE Attach PDN List Request' (0x0094) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachPDNList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 148; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetLTEDataRetry DESCRIPTION: The function sends 'WDS/Set LTE Data Retry Request' (0x0096) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetLTEDataRetry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 150; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEDataRetry DESCRIPTION: The function sends 'WDS/Get LTE Data Retry Request' (0x0097) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEDataRetry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 151; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetLTEAttachType DESCRIPTION: The function sends 'WDS/Set LTE Attach Type Request' (0x0098) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetLTEAttachType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 152; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEAttachType DESCRIPTION: The function sends 'WDS/Get LTE Attach Type Request' (0x0099) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 153; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSupportedMessages DESCRIPTION: The function sends 'DMS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSupportedFields DESCRIPTION: The function sends 'DMS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSBindSubscription DESCRIPTION: The function sends 'DMS/Bind Subscription Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSubscription DESCRIPTION: The function sends 'DMS/Get Subscription Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSupportedMessages DESCRIPTION: The function sends 'NAS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSupportedFields DESCRIPTION: The function sends 'NAS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo2 DESCRIPTION: The function sends 'NAS/Configure Signal Info 2 Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo2( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTDSCDMACellInfo DESCRIPTION: The function sends 'NAS/Get TD-SCDMA Cell Info Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 109; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetHPLMNIRATSearchTimer DESCRIPTION: The function sends 'NAS/Set HPLMN IRAT Search Timer Request' (0x006E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetHPLMNIRATSearchTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 110; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEMBMSSignalQuality DESCRIPTION: The function sends 'NAS/Get EMBMS Signal Quality Request' (0x006F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSSignalQuality( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 111; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASLimitSystemInfoIndications DESCRIPTION: The function sends 'NAS/Limit System Info Indications Request' (0x0070) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASLimitSystemInfoIndications( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 112; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemInfoIndicationLimits DESCRIPTION: The function sends 'NAS/Get System Info Indication Limits Request' (0x0071) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfoIndicationLimits( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 113; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateIMSStatus DESCRIPTION: The function sends 'NAS/Update IMS Status Request' (0x0072) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateIMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 114; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetIMSPreference DESCRIPTION: The function sends 'NAS/Get IMS Preference Request' (0x0073) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetIMSPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 115; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigurePLMNNameIndication DESCRIPTION: The function sends 'NAS/Configure PLMN Name Indication Request' (0x0075) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigurePLMNNameIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 117; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASCDMAAvoidSystem DESCRIPTION: The function sends 'NAS/CDMA Avoid System Request' (0x0076) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASCDMAAvoidSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 118; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCDMAAvoidSystemList DESCRIPTION: The function sends 'NAS/Get CDMA Avoid System List Request' (0x0077) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAAvoidSystemList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 119; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetHPLMNSearchTimer DESCRIPTION: The function sends 'NAS/Set HPLMN Search Timer Request' (0x0078) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetHPLMNSearchTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 120; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetHPLMNSearchTimer DESCRIPTION: The function sends 'NAS/Get HPLMN Search Timer Request' (0x0079) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHPLMNSearchTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 121; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetE911State DESCRIPTION: The function sends 'NAS/Set E911 State Request' (0x007A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetE911State( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 122; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSubscriptionInfo DESCRIPTION: The function sends 'NAS/Get Subscription Info Request' (0x007C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 124; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetNetworkTime DESCRIPTION: The function sends 'NAS/Get Network Time Request' (0x007D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 125; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetLTESIB16NetworkTime DESCRIPTION: The function sends 'NAS/Get LTE SIB16 Network Time Request' (0x007E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetLTESIB16NetworkTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 126; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSupportedMessages DESCRIPTION: The function sends 'WMS/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSupportedFields DESCRIPTION: The function sends 'WMS/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetWaitingMessage DESCRIPTION: The function sends 'WMS/Set Waiting Message Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectCourseOverGroundData DESCRIPTION: The function sends 'PDS/Inject Course Over Ground Data Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectCourseOverGroundData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectSUPLCertificate DESCRIPTION: The function sends 'PDS/Inject SUPL Certificate Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSDeleteSUPLCertificate DESCRIPTION: The function sends 'PDS/Delete SUPL Certificate Request' (0x0068) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 104; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetIS801OverSUPLIndicator DESCRIPTION: The function sends 'PDS/Get IS-801 Over SUPL Indicator Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetIS801OverSUPLIndicator( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetIS801OverSUPLIndicator DESCRIPTION: The function sends 'PDS/Set IS-801 Over SUPL Indicator Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetIS801OverSUPLIndicator( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 106; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSUPLHashAlgorithm DESCRIPTION: The function sends 'PDS/Get SUPL Hash Algorithm Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLHashAlgorithm( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSUPLHashAlgorithm DESCRIPTION: The function sends 'PDS/Set SUPL Hash Algorithm Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLHashAlgorithm( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSUPLMaximumVersion DESCRIPTION: The function sends 'PDS/Get SUPL Maximum Version Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLMaximumVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 109; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSUPLMaximumVersion DESCRIPTION: The function sends 'PDS/Set SUPL Maximum Version Request' (0x006E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLMaximumVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 110; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSUPLSecurity DESCRIPTION: The function sends 'PDS/Get SUPL Security Request' (0x006F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLSecurity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 111; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSUPLSecurity DESCRIPTION: The function sends 'PDS/Set SUPL Security Request' (0x0070) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLSecurity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 112; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSUPLTLSVersion DESCRIPTION: The function sends 'PDS/Get SUPL TLS Version Request' (0x0071) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSUPLTLSVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 113; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSUPLTLSVersion DESCRIPTION: The function sends 'PDS/Set SUPL TLS Version Request' (0x0072) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSUPLTLSVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 114; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetAGNSSPositioningModes DESCRIPTION: The function sends 'PDS/Get AGNSS Positioning Modes Request' (0x0073) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGNSSPositioningModes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 115; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetAGNSSPositioningModes DESCRIPTION: The function sends 'PDS/Set AGNSS Positioning Modes Request' (0x0074) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGNSSPositioningModes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 116; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetEmergencyProtocolConfig DESCRIPTION: The function sends 'PDS/Get Emergency Protocol Config Request' (0x0075) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetEmergencyProtocolConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 117; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetEmergencyProtocolConfig DESCRIPTION: The function sends 'PDS/Set Emergency Protocol Config Request' (0x0076) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEmergencyProtocolConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 118; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetAPNProfiles DESCRIPTION: The function sends 'PDS/Get APN Profiles Request' (0x0077) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAPNProfiles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 119; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetAPNProfiles DESCRIPTION: The function sends 'PDS/Set APN Profiles Request' (0x0078) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAPNProfiles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 120; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetHomeSUPLAddress DESCRIPTION: The function sends 'PDS/Get Home SUPL Address Request' (0x0079) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetHomeSUPLAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 121; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetHomeSUPLAddress DESCRIPTION: The function sends 'PDS/Set Home SUPL Address Request' (0x007A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetHomeSUPLAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 122; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectVehicleSensorData DESCRIPTION: The function sends 'PDS/Inject Vehicle Sensor Data Request' (0x007B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectVehicleSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 123; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectPedometerData DESCRIPTION: The function sends 'PDS/Inject Pedometer Data Request' (0x007C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPedometerData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 124; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetSupportedMessages DESCRIPTION: The function sends 'Voice/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetSupportedFields DESCRIPTION: The function sends 'Voice/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSGetLineSwitchingStatus DESCRIPTION: The function sends 'Voice/ALS Get Line Switching Status Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetLineSwitchingStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSGetSelectedLine DESCRIPTION: The function sends 'Voice/ALS Get Selected Line Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetSelectedLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetSupportedMessages DESCRIPTION: The function sends 'CAT2/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetSupportedFields DESCRIPTION: The function sends 'CAT2/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetSupportedMessages DESCRIPTION: The function sends 'UIM/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetSupportedFields DESCRIPTION: The function sends 'UIM/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshRegisterAll DESCRIPTION: The function sends 'UIM/Refresh Register All Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegisterAll( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetFileStatus DESCRIPTION: The function sends 'UIM/Set File Status Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetFileStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 4; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 5; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 6; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 7; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 8; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 14; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 15; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 16; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 17; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 18; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 20; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 21; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 22; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 23; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 26; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 27; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetCapabilitiesReadOperation DESCRIPTION: The function sends 'PBM/Set Capabilities Read Operation Request' (0x001C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetCapabilitiesReadOperation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 28; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedReadRecords DESCRIPTION: The function sends 'PBM/Extended Read Records Request' (0x001D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 29; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedWriteRecord DESCRIPTION: The function sends 'PBM/Extended Write Record Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedSearchRecords DESCRIPTION: The function sends 'PBM/Extended Search Records Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Extended Read All Hidden Records Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadUndecodedRecords DESCRIPTION: The function sends 'PBM/Read Undecoded Records Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadUndecodedRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSupportedMessages DESCRIPTION: The function sends 'LOC/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSupportedFields DESCRIPTION: The function sends 'LOC/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectMotionData DESCRIPTION: The function sends 'LOC/Inject Motion Data Request' (0x0068) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 104; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetNIGeofenceIDList DESCRIPTION: The function sends 'LOC/Get NI Geofence ID List Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNIGeofenceIDList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectGSMCellInfo DESCRIPTION: The function sends 'LOC/Inject GSM Cell Info Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectGSMCellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 106; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectNetworkInitiatedMessage DESCRIPTION: The function sends 'LOC/Inject Network Initiated Message Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectNetworkInitiatedMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCNotifyWWANOutOfService DESCRIPTION: The function sends 'LOC/Notify WWAN Out Of Service Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCNotifyWWANOutOfService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPedometerData DESCRIPTION: The function sends 'LOC/Inject Pedometer Data Request' (0x006F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPedometerData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 111; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectWCDMACellInfo DESCRIPTION: The function sends 'LOC/Inject WCDMA Cell Info Request' (0x0070) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 112; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectTDSCDMACellInfo DESCRIPTION: The function sends 'LOC/Inject TD-SCDMA Cell Info Request' (0x0071) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 113; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSubscriberID DESCRIPTION: The function sends 'LOC/Inject Subscriber ID Request' (0x0072) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSubscriberID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 16; ULONG msgID = 114; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAGetSupportedMessages DESCRIPTION: The function sends 'WDA/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAGetSupportedFields DESCRIPTION: The function sends 'WDA/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDASetDataFormat DESCRIPTION: The function sends 'WDA/Set Data Format Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDASetDataFormat( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAGetDataFormat DESCRIPTION: The function sends 'WDA/Get Data Format Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetDataFormat( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAEnablePacketFilter DESCRIPTION: The function sends 'WDA/Enable Packet Filter Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAEnablePacketFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDADisablePacketFilter DESCRIPTION: The function sends 'WDA/Disable Packet Filter Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDADisablePacketFilter( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAGetPacketFilterState DESCRIPTION: The function sends 'WDA/Get Packet Filter State Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetPacketFilterState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAAddPacketFilterRule DESCRIPTION: The function sends 'WDA/Add Packet Filter Rule Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAAddPacketFilterRule( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDADeletePacketFilterRule DESCRIPTION: The function sends 'WDA/Delete Packet Filter Rule Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDADeletePacketFilterRule( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAGetPacketFilterRuleHandles DESCRIPTION: The function sends 'WDA/Get Packet Filter Rule Handles Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetPacketFilterRuleHandles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAGetPacketFilterRule DESCRIPTION: The function sends 'WDA/Get Packet Filter Rule Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetPacketFilterRule( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDASetLoopbackState DESCRIPTION: The function sends 'WDA/Set Loopback State Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDASetLoopbackState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDAGetLoopbackState DESCRIPTION: The function sends 'WDA/Get Loopback State Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDAGetLoopbackState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 26; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPEnable DESCRIPTION: The function sends 'QCMAP/Enable Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPEnable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPDisable DESCRIPTION: The function sends 'QCMAP/Disable Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDisable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPBringUpWWAN DESCRIPTION: The function sends 'QCMAP/Bring Up WWAN Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPBringUpWWAN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPTearDownWWAN DESCRIPTION: The function sends 'QCMAP/Tear Down WWAN Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPTearDownWWAN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetWWANStatus DESCRIPTION: The function sends 'QCMAP/Get WWAN Status Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetWWANStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetIPSecVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Get IPSec VPN Passthrough Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetIPSecVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPSetIPSecVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Set IPSec VPN Passthrough Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetIPSecVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetPPTPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Get PPTP VPN Passthrough Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetPPTPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPSetPPTPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Set PPTP VPN Passthrough Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetPPTPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetL2TPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Get L2TP VPN Passthrough Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetL2TPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPSetL2TPVPNPassthrough DESCRIPTION: The function sends 'QCMAP/Set L2TP VPN Passthrough Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetL2TPVPNPassthrough( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetDynamicNATEntryTimeout DESCRIPTION: The function sends 'QCMAP/Get Dynamic NAT Entry Timeout Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetDynamicNATEntryTimeout( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPSetDynamicNATEntryTimeout DESCRIPTION: The function sends 'QCMAP/Set Dynamic NAT Entry Timeout Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetDynamicNATEntryTimeout( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPAddStaticNATEntry DESCRIPTION: The function sends 'QCMAP/Add Static NAT Entry Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPAddStaticNATEntry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPDeleteStaticNATEntry DESCRIPTION: The function sends 'QCMAP/Delete Static NAT Entry Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDeleteStaticNATEntry( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetStaticNATEntries DESCRIPTION: The function sends 'QCMAP/Get Static NAT Entries Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetStaticNATEntries( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPSetDMZ DESCRIPTION: The function sends 'QCMAP/Set DMZ Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPSetDMZ( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPDeleteDMZ DESCRIPTION: The function sends 'QCMAP/Delete DMZ Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDeleteDMZ( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetDMZ DESCRIPTION: The function sends 'QCMAP/Get DMZ Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetDMZ( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetWWANConfig DESCRIPTION: The function sends 'QCMAP/Get WWAN Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetWWANConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPEnableFirewallSetting DESCRIPTION: The function sends 'QCMAP/Enable Firewall Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPEnableFirewallSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetFirewallSetting DESCRIPTION: The function sends 'QCMAP/Get Firewall Setting Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetFirewallSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPDisableFirewallSetting DESCRIPTION: The function sends 'QCMAP/Disable Firewall Setting Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDisableFirewallSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPAddFirewallConfig DESCRIPTION: The function sends 'QCMAP/Add Firewall Config Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPAddFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetFirewallConfig DESCRIPTION: The function sends 'QCMAP/Get Firewall Config Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPDeleteFirewallConfig DESCRIPTION: The function sends 'QCMAP/Delete Firewall Config Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPDeleteFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPWWANStatusIndicationRegister DESCRIPTION: The function sends 'QCMAP/WWAN Status Indication Register Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPWWANStatusIndicationRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPStationModeEnable DESCRIPTION: The function sends 'QCMAP/Station Mode Enable Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPStationModeEnable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPStationModeDisable DESCRIPTION: The function sends 'QCMAP/Station Mode Disable Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPStationModeDisable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetStationMode DESCRIPTION: The function sends 'QCMAP/Get Station Mode Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetStationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPAddExtendedFirewallConfig DESCRIPTION: The function sends 'QCMAP/Add Extended Firewall Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPAddExtendedFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetExtendedFirewallConfig DESCRIPTION: The function sends 'QCMAP/Get Extended Firewall Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetExtendedFirewallConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetFirewallHandles DESCRIPTION: The function sends 'QCMAP/Get Firewall Handles Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetFirewallHandles( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPChangeNATType DESCRIPTION: The function sends 'QCMAP/Change NAT Type Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPChangeNATType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: QCMAPGetNATType DESCRIPTION: The function sends 'QCMAP/Get NAT Type Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCMAPGetNATType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 30; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCReset DESCRIPTION: The function sends 'PDC/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCRegisterForIndications DESCRIPTION: The function sends 'PDC/Register For Indications Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCRegisterForIndications( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCGetSelectedConfig DESCRIPTION: The function sends 'PDC/Get Selected Config Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCSetSelectedConfig DESCRIPTION: The function sends 'PDC/Set Selected Config Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCSetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCListConfigs DESCRIPTION: The function sends 'PDC/List Configs Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCListConfigs( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCDeleteConfig DESCRIPTION: The function sends 'PDC/Delete Config Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCDeleteConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCLoadConfig DESCRIPTION: The function sends 'PDC/Load Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCLoadConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCActivateConfig DESCRIPTION: The function sends 'PDC/Activate Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCActivateConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCGetConfigInfo DESCRIPTION: The function sends 'PDC/Get Config Info Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCGetConfigLimits DESCRIPTION: The function sends 'PDC/Get Config Limits Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigLimits( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCGetDefaultConfigInfo DESCRIPTION: The function sends 'PDC/Get Default Config Info Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetDefaultConfigInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCDeactivateConfig DESCRIPTION: The function sends 'PDC/Deactivate Config Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCDeactivateConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RFRPESetRFMScenario DESCRIPTION: The function sends 'RFRPE/Set RFM Scenario Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RFRPESetRFMScenario( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 41; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RFRPEGetRFMScenario DESCRIPTION: The function sends 'RFRPE/Get RFM Scenario Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RFRPEGetRFMScenario( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 41; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RFRPEGetProvisionedTableRevision DESCRIPTION: The function sends 'RFRPE/Get Provisioned Table Revision Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RFRPEGetProvisionedTableRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 41; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetSupportedMessages DESCRIPTION: The function sends 'CAT/Get Supported Messages Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetSupportedMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetSupportedFields DESCRIPTION: The function sends 'CAT/Get Supported Fields Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetSupportedFields( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/000077500000000000000000000000001455567757300225345ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/GobiCMCallback.cpp000066400000000000000000000236651455567757300257710ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.cpp DESCRIPTION: Contains the implementation of each Gobi CM callback function. Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMCallback.h" #include /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: WDSEventReportCallback (Free Method) DESCRIPTION: Function called by WDS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 1) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x17 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_DataBearerTechnology)) { pTmp++; const sWDSEventReportIndication_DataBearerTechnology * pDBT = (const sWDSEventReportIndication_DataBearerTechnology *)pTmp; gpCM->OnDataBearerCBNotification( pDBT->mDataBearerTechnology ); } } ULONGLONG txTotalBytes = ULLONG_MAX; ULONGLONG rxTotalBytes = ULLONG_MAX; pIter = tlvs.find( 0x19 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_TXBytes)) { pTmp++; const sWDSEventReportIndication_TXBytes * pTX = (const sWDSEventReportIndication_TXBytes *)pTmp; txTotalBytes = pTX->mTXByteTotal; } } pIter = tlvs.find( 0x1A ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_RXBytes)) { pTmp++; const sWDSEventReportIndication_RXBytes * pRX = (const sWDSEventReportIndication_RXBytes *)pTmp; rxTotalBytes = pRX->mRXByteTotal; } } if (txTotalBytes != ULLONG_MAX || rxTotalBytes != ULLONG_MAX) { gpCM->OnByteTotalsNotification( rxTotalBytes, txTotalBytes ); } } /*=========================================================================== METHOD: WDSSessionStateCallback (Free Method) DESCRIPTION: Function called by WDS packet service status callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 34) { return; } ULONG state = ULONG_MAX; std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x01 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSPacketServiceStatusReportIndication_Status)) { pTmp++; const sWDSPacketServiceStatusReportIndication_Status * pState = (const sWDSPacketServiceStatusReportIndication_Status *)pTmp; state = pState->mConnectionStatus; } } if (state != ULONG_MAX) { gpCM->OnSessionStateCBNotification( state ); } } /*=========================================================================== METHOD: NASEventReportCallback (Free Method) DESCRIPTION: Function called by NAS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 2) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter == tlvs.end()) { return; } const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASEventReportIndication_SignalStrength)) { pTmp++; const sNASEventReportIndication_SignalStrength * pSS = (const sNASEventReportIndication_SignalStrength *)pTmp; gpCM->OnSignalStrengthCBNotificaion( pSS->mSignalStrengthdBm, pSS->mRadioInterface ); } } /*=========================================================================== METHOD: NASServingSystemCallback (Free Method) DESCRIPTION: Function called by NAS serving system callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 36) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASServingSystemIndication_RoamingIndicator)) { pTmp++; const sNASServingSystemIndication_RoamingIndicator * pRI = (const sNASServingSystemIndication_RoamingIndicator *)pTmp; BYTE roam = pRI->mRoamingIndicator; if (roam == 0xFF) { gpCM->SetRoam( "Unknown" ); } else { std::ostringstream roamStr; roamStr << roam; gpCM->SetRoam( roamStr.str() ); } } } pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASServingSystemIndication_DataServices ); if (tlvLen < dsLen) { return; } pTmp++; const sNASServingSystemIndication_DataServices * pDS = (const sNASServingSystemIndication_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return; } pDS++; gpCM->OnDataCapsNotification( dcCount, (eQMINASDataServiceCapabilities2 *)pDS ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/GobiCMCallback.h000066400000000000000000000067321455567757300254320ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.h DESCRIPTION: Contains the declaration of each Gobi CM callback function, structures needed for these callbacks and message IDs for each callback Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // WDS event report callback void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // WDS packet service status callback void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS event report callback void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS serving system callback void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/GobiCMDLL.cpp000066400000000000000000001005071455567757300246770ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.cpp DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" #include "GobiConnectionMgmtAPIStructs.h" #include "Gobi3000Translation.h" #include /*=========================================================================*/ // cGobiCMDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetString (Internal Method) DESCRIPTION: Call a Gobi CM API function that returns a string PARAMETERS: mpFnString [ I ] - Gobi CM API function pointer tlvID [ I ] - ID of response TLV that contains the string strSz [ I ] - Max string size (including NULL terminator) pStr [ O ] - Buffer to hold the string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ) { // Assume failure if (strSz > 0 && pStr != 0) { pStr[0] = 0; } // Query for string? ULONG status = eGOBI_ERR_GENERAL; if (mpFnString == 0 || mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = mpFnString( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( tlvID ); if (pIter == tlvs.end()) { return eGOBI_ERR_GENERAL; } const sQMIRawContentHeader * pTmp = pIter->second; ULONG strLen = (ULONG)pTmp->mLength; pTmp++; if (strLen != 0 && strSz > 0 && pStr != 0) { ULONG needLen = strLen; if (needLen + 1 > strSz) { needLen = strSz - 1; } memcpy( pStr, pTmp, needLen ); pStr[needLen] = 0; } return status; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Calls GobiConnect PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Connect( LPCSTR pInterface ) { // Connect to WDS, DMS, and NAS services ULONG svc[3] = { 1, 2, 3 }; ULONG svcCount = 3; GOBIHANDLE handle = 0; ULONG status = GobiConnect( pInterface, &svcCount, &svc[0], &handle ); if (status == 0) { if (svcCount == 3) { mhGobi = handle; } else { // We require WDS, DMS, and NAS services Disconnect(); status = eGOBI_ERR_GENERAL; } } return status; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Disconnect() { if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } return GobiDisconnect( mhGobi ); } /*=========================================================================== ETHOD: StartDataSession (Public Method) DESCRIPTION: Calls WDSStartNetworkInterface PARAMETERS: pAPN [ I ] - Access point name pUser [ I ] - Username pPwd [ I ] - Password pSessionID [ O ] - Session ID pFailureCode [ O ] - Failure code (if present) RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ) { // Assume failure if (pSessionID != 0) { *pSessionID = 0xFFFFFFFF; } // Start a data session? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x16; pTLV->mLength = (UINT16)sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); pData += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pAuth = (sWDSStartNetworkInterfaceRequest_Authentication *)pData; pAuth->mEnablePAP = 1; pAuth->mEnableCHAP = 1; pData += sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (pAPN != 0 && pAPN[0] != 0) { size_t len = strnlen( pAPN, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x14; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pAPN, len ); pData += len; } if (pUser != 0 && pUser[0] != 0) { size_t len = strnlen( pUser, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x17; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pUser, len ); pData += len; } if (pPwd != 0 && pPwd[0] != 0) { size_t len = strnlen( pPwd, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x18; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pPwd, len ); pData += len; } ULONG li = (ULONG)pData - (ULONG)&req[0]; ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSStartNetworkInterface( mhGobi, 300000, li, &req[0], &lo, &rsp[0] ); // On success pSessionID is valid, on failure pFailureCode is valid ULONG status2 = ParseStartDataSession( lo, &rsp[0], pSessionID, pFailureCode ); if (status == eGOBI_ERR_NONE) { return status2; } return status; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Calls GobiCancel/WDSAbort RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::CancelDataSession() { // Cancel outstanding API request? if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } // Cancel the request with the API ULONG svcID = 1; ULONG txID = 0xFFFFFFFF; ULONG status = GobiCancel( mhGobi, svcID, &txID ); if (status != 0 || txID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } UINT8 req[256] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x01; pTLV->mLength = (UINT16)sizeof( sAbortRequest_TransactionID ); pData += sizeof( sQMIRawContentHeader ); sAbortRequest_TransactionID * pID = (sAbortRequest_TransactionID *)pData; pID->mTransactionID = (UINT16)txID; pData += sizeof( sAbortRequest_TransactionID ); // Cancel the request with the device ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSAbort( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: StopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface PARAMETERS: sessionID [ I ] - Session ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StopDataSession( ULONG sessionID ) { ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[256] = { 0 }; ULONG li = 256; status = PackStopDataSession( &li, &req[0], sessionID ); if (status != 0) { return status; } // Stop data session status = WDSStopNetworkInterface( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: GetSessionState (Public Method) DESCRIPTION: Calls WDSGetPacketServiceStatus PARAMETERS: pSessionState [ O ] - Current session state RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionState( ULONG * pSessionState ) { // Assume failure if (pSessionState != 0) { *pSessionState = 0xFFFFFFFF; } ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetPacketServiceStatus( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionState( lo, &rsp[0], pSessionState ); return status; } /*=========================================================================== METHOD: GetSessionDuration (Public Method) DESCRIPTION: Calls WDSGetDataSessionDuration PARAMETERS: pSessionDuration [ O ] - Session duration RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionDuration( ULONGLONG * pSessionDuration ) { // Assume failure if (pSessionDuration != 0) { *pSessionDuration = 0xFFFFFFFF; } // Query for session duration ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataSessionDuration( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionDuration( lo, &rsp[0], pSessionDuration ); return status; } /*=========================================================================== METHOD: GetDataBearerTechnology (Public Method) DESCRIPTION: Calls WDSGetDataBearerTechnology PARAMETERS: pDataBearerTech [ O ] - Data bearer technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetDataBearerTechnology( ULONG * pDataBearerTech ) { // Assume failure if (pDataBearerTech != 0) { *pDataBearerTech = 0xFFFFFFFF; } // Query for data bearer duration? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataBearerTechnology( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetDataBearerTechnology( lo, &rsp[0], pDataBearerTech ); return status; } /*=========================================================================== METHOD: GetConnectionRate (Public Method) DESCRIPTION: Calls WDSGetChannelRates PARAMETERS: pCurTX [ O ] - Current TX rate pCurRX [ O ] - Current RX rate pMaxTX [ O ] - Max TX rate pMaxRX [ O ] - Max RX rate RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ) { // Assume failure pCurTX != 0 ? *pCurTX = 0xFFFFFFFF : 0; pCurRX != 0 ? *pCurRX = 0xFFFFFFFF : 0; pMaxTX != 0 ? *pMaxTX = 0xFFFFFFFF : 0; pMaxRX != 0 ? *pMaxRX = 0xFFFFFFFF : 0; // Query for rates? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetChannelRates( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetConnectionRate( lo, &rsp[0], pCurTX, pCurRX, pMaxTX, pMaxRX ); return status; } /*=========================================================================== METHOD: GetFirmwareRevision (Public Method) DESCRIPTION: Calls DMSGetDeviceRevision PARAMETERS: strSz [ I ] - Maximum number of characters pStr [ O ] - Firmware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetFirmwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetManufacturer (Public Method) DESCRIPTION: Calls DMSGetDeviceManfacturer PARAMETERS: strSz [ I ] - Maximum string size pStr [ O ] - Manufacturer string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetManufacturer( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceManfacturer, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetModelID (Public Method) DESCRIPTION: Calls GetModelID PARAMETERS: strSz [ I ] - Max string size pStr [ O ] - Model ID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetModelID( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceModel, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetHardwareRevision (Public Method) DESCRIPTION: Calls DMSGetHardwareRevision PARAMETERS: strSz [ I ] - Max size of string pStr [ O ] - Hardware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHardwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetHardwareRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetVoiceNumber (Public Method) DESCRIPTION: Calls GetVoiceNumber PARAMETERS: voiceSz [ I ] - Max characters in voice string pVoiceStr [ O ] - Voice number string minSz [ I ] - Max characters in MIN string pMINStr [ O ] - MIN string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ) { // Assume failure if (voiceSz > 0 && pVoiceStr != 0) { pVoiceStr[0] = 0; } if (minSz > 0 && pMINStr != 0) { pMINStr[0] = 0; } // Query for voice numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceVoiceNumber( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetVoiceNumber( lo, &rsp[0], voiceSz, pVoiceStr, minSz, pMINStr ); return status; } /*=========================================================================== METHOD: GetSerialNumbers (Public Method) DESCRIPTION: Calls DMSGetDeviceSerialNumbers PARAMETERS: esnSz [ I ] - ESN size pESNStr [ O ] - ESN string imeiSz [ I ] - IMEI size pIMEIStr [ O ] - IMSI string meidSz [ I ] - MEID size pMEIDStr [ O ] - MEID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ) { // Assume failure if (esnSz > 0 && pESNStr != 0) { pESNStr[0] = 0; } if (imeiSz > 0 && pIMEIStr != 0) { pIMEIStr[0] = 0; } if (meidSz > 0 && pMEIDStr != 0) { pMEIDStr[0] = 0; } // Query for serial numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceSerialNumbers( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSerialNumbers( lo, &rsp[0], esnSz, pESNStr, imeiSz, pIMEIStr, meidSz, pMEIDStr ); return status; } /*=========================================================================== METHOD: GetIMSI (Public Method) DESCRIPTION: Get IMSI PARAMETERS: imsiSz [ I ] - IMSI size pIMSIStr [ O ] - IMSI string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ) { return GetString( DMSGetDeviceVoiceNumber, 0x11, imsiSz, pIMSIStr ); } /*=========================================================================== METHOD: GetSignalStrengths (Public Method) DESCRIPTION: Calls NASGetSignalStrength PARAMETERS: pSigStrengths [ O ] - Received signal strength pRadioInterfaces [ O ] - Radio interface technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ) { // Assume failure for (ULONG s = 0; s < MAX_SIGNALS; s++) { pSigStrengths[s] = 0; pRadioInterfaces[s] = 0xFFFFFFFF; } // Query for signal strengths? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = NASGetSignalStrength( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSignalStrength( lo, &rsp[0], pSigStrengths, pRadioInterfaces ); return status; } /*=========================================================================== METHOD: GetServingNetwork (Public Method) DESCRIPTION: Calls NASGetServingSystem PARAMETERS: pDataCapabilities [ O ] - Data capabilities pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - Network name max size pName [ O ] - Network name pSID [ O ] - System ID pNID [ O ] - Network ID pRoam [ O ] - Roaming indicator RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ) { // Assume failure for (ULONG d = 0; d < MAX_DATA_CAPABILITIES; d++) { pDataCapabilities[d] = 0xFFFFFFFF; } if (nameSize > 0 && pName != 0) { pName[0] = 0; } pMCC != 0 ? *pMCC = 0xFFFF : 0; pMNC != 0 ? *pMNC = 0xFFFF : 0; pRoam != 0 ? *pRoam = 0xFFFFFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for serving system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetServingSystem( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASGetServingSystemResponse_DataServices ); if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DataServices * pDS = (const sNASGetServingSystemResponse_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pDS++; eQMINASDataServiceCapabilities2 * pCap = (eQMINASDataServiceCapabilities2 *)pDS; if (dcCount > MAX_DATA_CAPABILITIES) { dcCount = MAX_DATA_CAPABILITIES; } for (ULONG i = 0; i < dcCount; i++) { pDataCapabilities[i] = (ULONG)*pCap++; } } pIter = tlvs.find( 0x12 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG plmnLen = (ULONG)sizeof( sNASGetServingSystemResponse_CurrentPLMN ); if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_CurrentPLMN * pPLMN = (const sNASGetServingSystemResponse_CurrentPLMN *)pTmp; ULONG strLen = (ULONG)pPLMN->mDescriptionLength; plmnLen += strLen; if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pMCC != 0 ? *pMCC = (ULONG)pPLMN->mMobileCountryCode : 0; pMNC != 0 ? *pMNC = (ULONG)pPLMN->mMobileNetworkCode : 0; pPLMN++; if (strLen != 0 && nameSize > 0 && pName != 0) { ULONG needLen = strLen; if (needLen + 1 > nameSize) { needLen = nameSize - 1; } memcpy( pName, pPLMN, needLen ); pName[needLen] = 0; } } pIter = tlvs.find( 0x13 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG sysLen = (ULONG)sizeof( sNASGetServingSystemResponse_SystemID ); if (tlvLen < sysLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_SystemID * pSys = (const sNASGetServingSystemResponse_SystemID *)pTmp; pSID != 0 ? *pSID = (ULONG)pSys->mSystemID : 0; pNID != 0 ? *pNID = (ULONG)pSys->mNetworkID : 0; } pIter = tlvs.find( 0x16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG roamLen = (ULONG)sizeof( sNASGetServingSystemResponse_DefaultRoaming ); if (tlvLen < roamLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DefaultRoaming * pDR = (const sNASGetServingSystemResponse_DefaultRoaming *)pTmp; pRoam != 0 ? *pRoam = (ULONG)pDR->mRoamingIndicator : 0; } return status; } /*=========================================================================== METHOD: GetHomeNetwork (Public Method) DESCRIPTION: Calls NASGetHomeNetwork PARAMETERS: pHomeMCC [ O ] - Mobile country code pHomeMNC [ O ] - Mobile network code homeNameSize [ I ] - Max name size pHomeName [ O ] - Home network name pSID [ O ] - System ID pNID [ O ] - Network ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ) { // Assume failure if (homeNameSize > 0 && pHomeName != 0) { pHomeName[0] = 0; } pHomeMCC != 0 ? *pHomeMCC = 0xFFFF : 0; pHomeMNC != 0 ? *pHomeMNC = 0xFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for home system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetHomeNetwork( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetHomeNetwork( lo, &rsp[0], pHomeMCC, pHomeMNC, homeNameSize, pHomeName, pSID, pNID ); return status; } /*=========================================================================== METHOD: SetWDSEventReportCB (Public Method) DESCRIPTION: Calls WDSSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer interval [ I ] - Interval (in seconds) for transfer statistics RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ) { // Set WDS event callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x11; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_TransferStatisticsIndicator * pTS = (sWDSSetEventReportRequest_TransferStatisticsIndicator *)pData; pTS->mTransferStatisticsIntervalSeconds = interval; pTS->mReportTXPacketSuccesses = 0; pTS->mReportRXPacketSuccesses = 0; pTS->mReportTXPacketErrors = 0; pTS->mReportRXPacketErrors = 0; pTS->mReportTXOverflows = 0; pTS->mReportRXOverflows = 0; pTS->mTXByteTotal = 1; pTS->mRXByteTotal = 1; pData += sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x12; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_DataBearerTechnologyIndicator * pTI = (sWDSSetEventReportRequest_DataBearerTechnologyIndicator *)pData; pTI->mReportDataBearerTechnology = 1; pData += sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 1, pCallback ); return status; } /*=========================================================================== METHOD: SetWDSSessionStateCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSSessionStateCB( tFNGenericCallback pCallback ) { // Set WDS packet service status callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 34, pCallback ); return status; } /*=========================================================================== METHOD: SetNASEventReportCB (Public Method) DESCRIPTION: Calls NASSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer thresholdsSize [ I ] - Threshold size pThresholds [ I ] - Array of thresholds RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ) { // Set NAS event report callback request? ULONG status = eGOBI_ERR_GENERAL; if ( (mhGobi == 0) || (thresholdsSize > 0 && pThresholds == 0) ) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x10; pTLV->mLength = (UINT16)sizeof( sNASSetEventReportRequest_SignalIndicator ); pTLV->mLength += (UINT16)thresholdsSize; pData += sizeof( sQMIRawContentHeader ); sNASSetEventReportRequest_SignalIndicator * pSI = (sNASSetEventReportRequest_SignalIndicator *)pData; pSI->mReportSignalStrength = 1; pSI->mNumberOfThresholds = thresholdsSize; pData += sizeof( sNASSetEventReportRequest_SignalIndicator ); for (UINT8 i = 0; i < thresholdsSize; i++) { INT8 * pThresh = (INT8 *)pData; *pThresh = pThresholds[i]; pData++; } ULONG li = (ULONG)pData - (ULONG)&req[0]; status = NASSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 2, pCallback ); return status; } /*=========================================================================== METHOD: SetNASServingSystemCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASServingSystemCB( tFNGenericCallback pCallback ) { // Set NAS serving system request? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 36, pCallback ); return status; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/GobiCMDLL.h000066400000000000000000000212401455567757300243400ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.h DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiConnectionMgmtAPI.h" #include "GobiConnectionMgmtAPIStructs.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; // The maximum number of signals const ULONG MAX_SIGNALS = 12; // The maximum number of data capabilities const ULONG MAX_DATA_CAPABILITIES = 12; // Gobi input/output function pointer typedef ULONG (* tFNGobiInputOutput)( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLVs (Internal Method) DESCRIPTION: Convert response buffer to a TLV map PARAMETERS: pRsp [ I ] - The response buffer rspSz [ I ] - The size of the above buffer RETURN VALUE: std::map ===========================================================================*/ inline std::map GetTLVs( const UINT8 * pRsp, ULONG rspSz ) { std::map retMap; ULONG dataProcessed = 0; const UINT8 * pData = &pRsp[0]; while (dataProcessed < rspSz) { dataProcessed += (ULONG)sizeof( sQMIRawContentHeader ); if (dataProcessed > rspSz) { break; } const sQMIRawContentHeader * pTLV = (const sQMIRawContentHeader *)pData; dataProcessed += (ULONG)pTLV->mLength; if (dataProcessed > rspSz) { break; } retMap[pTLV->mTypeID] = pTLV; pData = &pRsp[dataProcessed]; } return retMap; }; /*=========================================================================*/ // Class cGobiCMDLL /*=========================================================================*/ class cGobiCMDLL { public: // Constructor cGobiCMDLL() : mhGobi( 0 ) { } // Destructor ~cGobiCMDLL() { } // Connect ULONG Connect( LPCSTR pInterface ); // Disconnect ULONG Disconnect(); // Start data session ULONG StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ); // Cancel data session ULONG CancelDataSession(); // Stop data session ULONG StopDataSession( ULONG sessionID ); // Get session state ULONG GetSessionState( ULONG * pSessionState ); // Get session duration ULONG GetSessionDuration( ULONGLONG * pSessionDuration ); // Get data bearer technology ULONG GetDataBearerTechnology( ULONG * pDataBearerTech ); // Get connection rate ULONG GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ); // Get firmware revision ULONG GetFirmwareRevision( BYTE strSz, CHAR * pStr ); // Get manufacturer ULONG GetManufacturer( BYTE strSz, CHAR * pStr ); // Get model ID ULONG GetModelID( BYTE strSz, CHAR * pStr ); // Get hardware revision ULONG GetHardwareRevision( BYTE strSz, CHAR * pStr ); // Get voice number ULONG GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ); // Get serial numbers ULONG GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ); // Get IMSI ULONG GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ); // Get signal strengths ULONG GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ); // Get serving network ULONG GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ); // Get home network ULONG GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ); // Set WDS event report callback ULONG SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ); // Set WDS packet service status callback ULONG SetWDSSessionStateCB( tFNGenericCallback pCallback ); // Set NAS event report callback ULONG SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ); // Set NAS serving system callback ULONG SetNASServingSystemCB( tFNGenericCallback pCallback ); protected: // Call a Gobi CM API function that returns a string ULONG GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ); /* Handle to Gobi API */ GOBIHANDLE mhGobi; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/QTSampleCM.cpp000066400000000000000000000227371455567757300251610ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.cpp DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cQTSampleCM QT implementation of the Sample CM Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QTSampleCM.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: AsyncConnectThread (Free Method) DESCRIPTION: Start a data session PARAMETERS: pData [ I ] - cQTSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * AsyncConnectThread( void * pData ) { cQTSampleCM * pCM = (cQTSampleCM*)pData; if (pCM == NULL) { return NULL; } // Open the dialog window, disable the info and connection stats buttons pCM->mView.rootContext()->setContextProperty( "dialogText", "Connecting, please wait..." ); pCM->mView.rootContext()->setContextProperty( "windowState", "connectingDialog" ); ULONG failureCode = 0xFFFFFFFF; ULONG rc = pCM->OnStartDataSession( &failureCode ); if (rc != eGOBI_ERR_NONE) { std::ostringstream error; error << "Failed to connect, error " << rc; TRACE( "rc %lu, failure code %lu", rc, failureCode ); // Show failure code, if present if (rc == 1014 && failureCode != 0xFFFFFFFF) { error << "\nCall failure reason " << failureCode; } pCM->mView.rootContext()->setContextProperty( "dialogText", error.str().c_str() ); pCM->SetConnectButtonText( "Connect" ); } else { pCM->mView.rootContext()->setContextProperty( "dialogText", "Success!" ); // Connect button should be updated by state change indication } // Leave the dialog up for 2s sleep( 2 ); pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return NULL; } /*=========================================================================== METHOD: OnInfosButton (Free Method) DESCRIPTION: Move to the info stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnInfosButton( cQTSampleCM * pCM ) { pCM->mView.rootContext()->setContextProperty( "windowState", "infos" ); return 0; } /*=========================================================================== METHOD: OnConnectionsButton (Free Method) DESCRIPTION: Move to the connection stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectionsButton( cQTSampleCM * pCM ) { // "" is the default state (connection stats page) pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return 0; } /*=========================================================================== METHOD: OnConnectButton (Free Method) DESCRIPTION: Start, cancel, or disconnect from a data session NOTE: The UI is not updated until this function returns, so the connection will be established asynchronously PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectButton( cQTSampleCM * pCM ) { // Double check if there a device connected if (pCM->mDeviceID.size() == 0 || pCM->mConnectButtonText.compare( "No Device" ) == 0) { TRACE( "No Device" ); return 0; } // Start a connection if (pCM->mConnectButtonText.compare( "Connect" ) == 0) { pCM->SetConnectButtonText( "Cancel" ); // Create a detached thread to start the connection asynchronously pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); pthread_create( &pCM->mAsyncConnectThreadID, &attributes, AsyncConnectThread, pCM ); } else if (pCM->mConnectButtonText.compare( "Cancel" ) == 0) { pCM->OnCancelDataSession(); pCM->SetConnectButtonText( "Connect" ); } else if (pCM->mConnectButtonText.compare( "Disconnect" ) == 0) { pCM->OnStopDataSession(); pCM->SetConnectButtonText( "Connect" ); } else { // Externally connected, etc TRACE( "Unknown connect button state %s", pCM->mConnectButtonText.c_str() ); } return 0; } /*=========================================================================*/ // cQTSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI RETURN VALUE: bool ===========================================================================*/ bool cQTSampleCM::Init() { // Use the current screen orientation mView.setOrientation( QmlApplicationViewer::ScreenOrientationAuto ); // The buttons mView.rootContext()->setContextProperty( "connectButton", &mConnectButton ); mView.rootContext()->setContextProperty( "infosButton", &mInfosButton ); mView.rootContext()->setContextProperty( "connectionsButton", &mConnectionsButton ); // The input fields mView.rootContext()->setContextProperty( "apnNameText", &mAPNText ); mView.rootContext()->setContextProperty( "usernameText", &mUsernameText ); mView.rootContext()->setContextProperty( "passwordText", &mPasswordText ); // Default button value SetConnectButtonText( "No Device" ); // Default state mView.rootContext()->setContextProperty( "windowState", "" ); mView.rootContext()->setContextProperty( "dialogText", "" ); bool bRC = cSampleCM::Init(); mView.setMainQmlFile( "qml/GobiSampleCM/main.qml" ); mView.show(); return bRC; } /*=========================================================================== METHOD: Run (Public Method) DESCRIPTION: Run the GUI (blocks until exit) RETURN VALUE: bool ===========================================================================*/ int cQTSampleCM::Run() { return mApp.exec(); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::Disconnect() { SetConnectButtonText( "No device" ); return cSampleCM::Disconnect(); } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Updates apn, username, and password input field values before starting a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::OnStartDataSession( ULONG * pFailureCode ) { // Grab the APN, username, and password mAPN = mAPNText.getText().toUtf8().constData(); mUsername = mUsernameText.getText().toUtf8().constData(); mPassword = mPasswordText.getText().toUtf8().constData(); return cSampleCM::OnStartDataSession( pFailureCode ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/QTSampleCM.h000066400000000000000000000307061455567757300246210ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.h DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cButton Generic clickable button for QT cTextInput Generic text input field for QT cQTSampleCM QT implementation of the Sample CM Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "qmlapplicationviewer.h" #include #include #include "SampleCM.h" // Prototypes class cQTSampleCM; void * AsyncConnectThread( void * pData ); QVariant OnInfosButton( cQTSampleCM * pCM ); QVariant OnConnectionsButton( cQTSampleCM * pCM ); QVariant OnConnectButton( cQTSampleCM * pCM ); /*=========================================================================*/ // Class cButton // Generic clickable button for QT /*=========================================================================*/ class cButton : public QObject { Q_OBJECT public: // Constructor cButton( cQTSampleCM * pCM, QVariant (*pOnClick)( cQTSampleCM * ) ) { mpCM = pCM; mpOnClick = pOnClick; } public slots: // Function to be run on a click event QVariant Click() { if (mpOnClick != 0) { return mpOnClick( mpCM ); } return ""; } protected: /* The main object */ cQTSampleCM * mpCM; /* Function to run when clicked */ QVariant (* mpOnClick)( cQTSampleCM * ); }; /*=========================================================================*/ // cTextInput // Generic text input field for QT /*=========================================================================*/ class cTextInput : public QObject { Q_OBJECT Q_PROPERTY( QString text READ getText WRITE setText ) public slots: // Get the value QString getText() const { return mText; } // Set the value void setText( const QString & text ) { mText = text; } private: /* The text */ QString mText; }; /*=========================================================================*/ // Class cQTSampleCM /*=========================================================================*/ class cQTSampleCM : public cSampleCM { public: // Constructor cQTSampleCM( int argc, char ** argv ) : mApp( argc, argv ), mConnectButtonText( "No Device" ), mConnectButton( this, OnConnectButton ), mInfosButton( this, OnInfosButton ), mConnectionsButton( this, OnConnectionsButton ) { } // Initialize UI, begin waiting for devices bool Init(); // Run the GUI (blocks until exit) int Run(); // Disconnect ULONG Disconnect(); // Process a start data session request ULONG OnStartDataSession( ULONG * pFailureCode ); // Set mState and the connection button void SetState( const std::string & state ) { cSampleCM::SetState( state ); // Update the connection button as well switch (mSessionState) { case eQMIConnectionStatus_Disconnected: { SetConnectButtonText( "Connect" ); if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { // Clear the initial state mInitialState = eQMIConnectionStatus_Disconnected; } } break; case eQMIConnectionStatus_Connected: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "External Con" ); } else { SetConnectButtonText( "Disconnect" ); } } break; case eQMIConnectionStatus_Authenticating: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "Ext Connecting" ); } else { SetConnectButtonText( "Cancel" ); } } break; case eQMIConnectionStatus_Suspended: default: break; } // No more than 12 characters if (mState.size() > 12) { mState.resize( 12 ); } // Note: "state" is already a property, can't duplicate // using "status" instead mView.rootContext()->setContextProperty( "status", mState.c_str() ); } // Set mRSSI void SetRSSI( const std::string & rssi ) { cSampleCM::SetRSSI( rssi ); mView.rootContext()->setContextProperty( "rssi", mRSSI.c_str() ); } // Set mTech void SetTech( const std::string & tech ) { cSampleCM::SetTech( tech ); // No more than 12 characters if (mTech.size() > 12) { mTech.resize( 12 ); } mView.rootContext()->setContextProperty( "tech", mTech.c_str() ); } // Set mRx void SetRx( const std::string & rx ) { cSampleCM::SetRx( rx ); mView.rootContext()->setContextProperty( "rx", mRx.c_str() ); } // Set mTx void SetTx( const std::string & tx ) { cSampleCM::SetTx( tx ); mView.rootContext()->setContextProperty( "tx", mTx.c_str() ); } // Set mMaxRx void SetMaxRx( const std::string & maxRx ) { cSampleCM::SetMaxRx( maxRx ); mView.rootContext()->setContextProperty( "maxRx", mMaxRx.c_str() ); } // Set mMaxTx void SetMaxTx( const std::string & maxTx ) { cSampleCM::SetMaxTx( maxTx ); mView.rootContext()->setContextProperty( "maxTx", mMaxTx.c_str() ); } // Set mRoam void SetRoam( const std::string & roam ) { cSampleCM::SetRoam( roam ); mView.rootContext()->setContextProperty( "roam", mRoam.c_str() ); } // Set mDuration void SetDuration( const std::string & duration ) { cSampleCM::SetDuration( duration ); mView.rootContext()->setContextProperty( "duration", mDuration.c_str() ); } // Set mLifeDuration void SetLifeDuration( const std::string & lifeDuration ) { cSampleCM::SetLifeDuration( lifeDuration ); mView.rootContext()->setContextProperty( "lifeDuration", mLifeDuration.c_str() ); } // Set mLifeRx void SetLifeRx( const std::string & lifeRx ) { cSampleCM::SetLifeRx( lifeRx ); mView.rootContext()->setContextProperty( "lifeRx", mLifeRx.c_str() ); } // Set mLifeTx void SetLifeTx( const std::string & lifeTx ) { cSampleCM::SetLifeTx( lifeTx ); mView.rootContext()->setContextProperty( "lifeTx", mLifeTx.c_str() ); } // Set mManufact void SetManufact( const std::string & manufact ) { cSampleCM::SetManufact( manufact ); mView.rootContext()->setContextProperty( "manufact", mManufact.c_str() ); } // Set mModel void SetModel( const std::string & model ) { cSampleCM::SetModel( model ); // No more than 20 characters if (mModel.size() > 20) { mModel.resize( 20 ); } mView.rootContext()->setContextProperty( "model", mModel.c_str() ); } // Set mHardware void SetHardware( const std::string & hardware ) { cSampleCM::SetHardware( hardware ); mView.rootContext()->setContextProperty( "hardware", mHardware.c_str() ); } // Set mFirmware void SetFirmware( const std::string & firmware ) { cSampleCM::SetFirmware( firmware ); // No more than 20 characters if (mFirmware.size() > 20) { mFirmware.resize( 20 ); } mView.rootContext()->setContextProperty( "firmware", mFirmware.c_str() ); } // Set mMDN void SetMDN( const std::string & mdn ) { cSampleCM::SetMDN( mdn ); mView.rootContext()->setContextProperty( "mdn", mMDN.c_str() ); } // Set mMIN void SetMIN( const std::string & min ) { cSampleCM::SetMIN( min ); mView.rootContext()->setContextProperty( "min", mMIN.c_str() ); } // Set mESN void SetESN( const std::string & esn ) { cSampleCM::SetESN( esn ); mView.rootContext()->setContextProperty( "esn", mESN.c_str() ); } // Set mMEID void SetMEID( const std::string & meid ) { cSampleCM::SetMEID( meid ); mView.rootContext()->setContextProperty( "meid", mMEID.c_str() ); } // Set mIMEI void SetIMEI( const std::string & imei ) { cSampleCM::SetIMEI( imei ); mView.rootContext()->setContextProperty( "imei", mIMEI.c_str() ); } // Set mIMSI void SetIMSI( const std::string & imsi ) { cSampleCM::SetIMSI( imsi ); mView.rootContext()->setContextProperty( "imsi", mIMSI.c_str() ); } // Set mConnectButtonText void SetConnectButtonText( const std::string & connectButtonText ) { mConnectButtonText = connectButtonText; mView.rootContext()->setContextProperty( "connectButtonText", connectButtonText.c_str() ); } protected: /* QApplication object */ QApplication mApp; /* QmlApplicationViewer object */ QmlApplicationViewer mView; /* APN text input field */ cTextInput mAPNText; /* Username text input field */ cTextInput mUsernameText; /* Password text input field */ cTextInput mPasswordText; /* "Connect" button's text */ std::string mConnectButtonText; /* "Connect" button */ cButton mConnectButton; /* "Info Stats" button */ cButton mInfosButton; /* "Connection Stats" button */ cButton mConnectionsButton; /* Async connection thread ID */ pthread_t mAsyncConnectThreadID; // Friend functions friend void * AsyncConnectThread( void * pData ); friend QVariant OnInfosButton( cQTSampleCM * pCM ); friend QVariant OnConnectionsButton( cQTSampleCM * pCM ); friend QVariant OnConnectButton( cQTSampleCM * pCM ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/SampleCM.cpp000066400000000000000000001337301455567757300247100ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.cpp DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMDLL.h" #include "GobiCMCallback.h" #include "GobiConnectionMgmtAPIStructs.h" #include #include #include #include #include // Global pointer for callbacks to reference class cSampleCM * gpCM; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime; clock_gettime( CLOCK_REALTIME, &curtime ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================== METHOD: DeviceDetectionThread (Free Method) DESCRIPTION: Scans for and detects devices PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * DeviceDetectionThread( void * pData ) { cSampleCM * pCM = (cSampleCM *)pData; if (pCM == NULL) { return NULL; } // Get inotify handle int inotify = inotify_init(); if (inotify == -1) { TRACE( "inotify_init failed\n" ); return NULL; } // Start a watch on the /dev directory int inotifyFlags = IN_CREATE | IN_MODIFY | IN_DELETE; int watchD = inotify_add_watch( inotify, "/dev/", inotifyFlags ); if (watchD == -1) { TRACE( "inotify_add_watch failed\n" ); close( inotify ); return NULL; } // Does a device already exist? dirent ** ppDevFiles; // Yes, scandir really takes a triple pointer for its second param int numDevs = scandir( "/dev/", &ppDevFiles, NULL, NULL ); for (int i = 0; i < numDevs; i++) { std::string deviceID = "/dev/"; deviceID += ppDevFiles[i]->d_name; free( ppDevFiles[i] ); if (deviceID.find( "qcqmi" ) != std::string::npos) { pCM->Connect( deviceID.c_str() ); break; } } // Cleanup from scandir if (numDevs != -1) { free( ppDevFiles ); } else { TRACE( "Scandir failed\n" ); } // Begin async reading fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pCM->mDeviceDetectionStopPipe[READING], &inputSet ); FD_SET( inotify, &inputSet ); int largestFD = std::max( pCM->mDeviceDetectionStopPipe[READING], inotify ); while (true) { // No FD_COPY() available in android memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait for data on either the inotify or the stop pipe int status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { break; } else if (FD_ISSET( pCM->mDeviceDetectionStopPipe[READING], &outputSet ) == true) { // Time to close break; } else if (FD_ISSET( inotify, &outputSet ) == true) { // Perform a read BYTE buffer[1024] = { 0 }; int rc = read( inotify, &buffer[0], 1024 ); if (rc < (int)sizeof( inotify_event )) { continue; } // Typecast the buffer to an inotify event struct inotify_event * pIEvent = (struct inotify_event *)&buffer[0]; // Check the length of the name if (pIEvent->len < 5) { continue; } // Is this a matching device? if (strncmp( pIEvent->name, "qcqmi", 5 ) != 0) { continue; } std::string deviceID = "/dev/"; deviceID += pIEvent->name; if (pIEvent->mask & IN_CREATE || pIEvent->mask & IN_MODIFY) { pCM->Connect( deviceID.c_str() ); } if (pIEvent->mask & IN_DELETE) { // Was it the connected device which was removed? if (pCM->mDeviceID.compare( deviceID ) == 0) { pCM->Disconnect(); } } } } // Cleanup inotify_rm_watch( inotify, watchD ); close( inotify ); return NULL; } /*=========================================================================== METHOD: UpdateNetworkInfoThread (Free Method) DESCRIPTION: Updates the network stats every 1s (while device is present) PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * UpdateNetworkInfoThread( void * pData ) { cSampleCM * pCM = (cSampleCM*)pData; if (pCM == NULL) { return NULL; } // Update once pCM->CheckConnectedStats(); int rc; do { // Update rates and times every 1s pCM->UpdateRateDisplay(); pCM->UpdateTimeDisplay(); DWORD temp; rc = pCM->mUpdateNetworkInfoEvent.Wait( 1000, temp ); } while (rc == ETIME); return NULL; } /*=========================================================================== METHOD: ParseStats (Free Method) DESCRIPTION: Parse the stats file and obtain the TX/RX bytes and connection duration NOTE: The stats text file consists of one line in the following format: Total RX Bytes; Total TX Bytes; Total Duration PARAMETERS: line [ I ] - Line to parse lifeTotalRX [ O ] - Total RX bytes lifeTotalTX [ O ] - Total TX bytes lifeTotalDuration [ O ] - Total connection duration RETURN VALUE: bool ===========================================================================*/ bool ParseStats( std::istringstream & line, ULONGLONG & lifeTotalRX, ULONGLONG & lifeTotalTX, ULONGLONG & lifeTotalDuration ) { ULONGLONG temp1, temp2, temp3; char c1, c2; // Attempt to parse into temp variables, skipping whitespace line >> std::skipws >> temp1 >> c1 >> temp2 >> c2 >> temp3; // Was parsing successful? if (line.fail() == true) { TRACE( "failed to parse stats file\n" ); return false; } else { TRACE( "read %llu, %llu, %llu", temp1, temp2, temp3 ); lifeTotalRX = temp1; lifeTotalTX = temp2; lifeTotalDuration = temp3; return true; } } /*=========================================================================*/ // cSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: ~cSampleCM (Public Method) DESCRIPTION: Destructor - Stops the data session, Stops device detection thread, Writes stats to file RETURN VALUE: None ===========================================================================*/ cSampleCM::~cSampleCM() { // These functions will most likely fail. That's ok. OnCancelDataSession(); OnStopDataSession(); Disconnect(); // Close device detection thread, if open if (mDeviceDetectionStopPipe[WRITING] != -1) { if (mDeviceDetectionThreadID != 0) { BYTE byte = 1; write( mDeviceDetectionStopPipe[WRITING], &byte, 1 ); pthread_join( mDeviceDetectionThreadID, NULL ); mDeviceDetectionThreadID = 0; } close( mDeviceDetectionStopPipe[WRITING] ); close( mDeviceDetectionStopPipe[READING] ); mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; } // Write stats to file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int flags = O_CREAT | O_TRUNC | O_WRONLY; mode_t mode = S_IRUSR | S_IWUSR; int statsFile = open( config.c_str(), flags, mode ); if (statsFile < 0) { TRACE( "Unable to create stats file\n" ); } else { std::ostringstream out; out << mLifeTotalRX << "; " << mLifeTotalTX << "; " << mLifeTotalDuration; int rc = write( statsFile, out.str().c_str(), out.str().size() ); if (rc < 0) { TRACE( "Unable to write stats to file\n" ); } close( statsFile ); } } /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI, begin waiting for devices RETURN VALUE: bool ===========================================================================*/ bool cSampleCM::Init() { Disconnect(); // Read in the stats file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int statsFile = open( config.c_str(), O_RDONLY ); if (statsFile < 0) { // Non-fatal error TRACE( "Unable to open config file %s", config.c_str() ); } else { CHAR buf[100]; int len = read( statsFile, &buf[0], 100 ); if (len < 0) { // Non-fatal error TRACE( "failed to read from file\n" ); } else { std::string asString( &buf[0], len ); std::istringstream line( asString ); ULONGLONG lrx, ltx, ld; if (ParseStats( line, lrx, ltx, ld ) == true) { mLifeTotalRX = lrx; mLifeTotalTX = ltx; mLifeTotalDuration = ld; } } close( statsFile ); } // Life totals will just be zeros if the file was not present std::ostringstream tmp; tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); tmp.str( "" ); tmp << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << mLifeTotalDuration % 60; SetLifeDuration( tmp.str() ); // Set the global pointer, used by callbacks gpCM = this; // Initialize command pipe int ret = pipe( mDeviceDetectionStopPipe ); if (ret != 0) { // Should never happen, but just in case... return false; } // Begin scanning for devices ret = pthread_create( &mDeviceDetectionThreadID, 0, DeviceDetectionThread, this ); if (ret != 0) { return false; } return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Initializes the Gobi API to the current device PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Connect( LPCSTR pInterface ) { // Are we already connected to a device? if (mDeviceID.size() != 0) { return eGOBI_ERR_MULTIPLE_DEVICES; } // Connect to the device ULONG rc = mGobi.Connect( pInterface ); if (rc != eGOBI_ERR_NONE) { TRACE( "GobiConnect error %lu\n", rc ); return rc; } UpdateDeviceInfo(); UpdateConnectionInfo(); // Any connection at this point is an external connection UpdateSessionState( true, mSessionState ); // Success mDeviceID = pInterface; return rc; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Disconnect() { // Stop a data session, if present OnCancelDataSession(); OnStopDataSession(); mGobi.Disconnect(); // Reset state mSessionID = 0xFFFFFFFF; mInitialState = 0xFFFFFFFF; mDataBearerTech = 0; // Store life total mLifeTotalDuration += mTotalDuration; // Reset all totals mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; SetState( "No Device" ); SetRSSI( "Unknown" ); SetTech( "Unknown" ); SetRx( "Unknown" ); SetTx( "Unknown" ); SetMaxRx( "Unknown" ); SetMaxTx( "Unknown" ); SetRoam( "Unknown" ); SetDuration( "Unknown" ); SetLifeDuration( "Unknown" ); SetLifeRx( "Unknown" ); SetLifeTx( "Unknown" ); SetManufact( "Unknown" ); SetModel( "Unknown" ); SetHardware( "Unknown" ); SetFirmware( "Unknown" ); SetMDN( "Unknown" ); SetMIN( "Unknown" ); SetESN( "Unknown" ); SetMEID( "Unknown" ); SetIMEI( "Unknown" ); SetIMSI( "Unknown" ); return eGOBI_ERR_NONE; } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Starts a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStartDataSession( ULONG * pFailureCode ) { mbInitiatedStartDataSession = true; // Use provided values, if not empty strings LPCSTR pAPN = (mAPN.size() == 0) ? 0 : mAPN.c_str(); LPCSTR pUsername = (mUsername.size() == 0) ? 0 : mUsername.c_str(); LPCSTR pPassword = (mPassword.size() == 0) ? 0 : mPassword.c_str(); ULONG rc = mGobi.StartDataSession( pAPN, pUsername, pPassword, &mSessionID, pFailureCode ); if (rc == eGOBI_ERR_NONE) { mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = GetTickCount(); } else { mbInitiatedStartDataSession = false; } return rc; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Cancels an in progress data session request RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnCancelDataSession() { return mGobi.CancelDataSession(); } /*=========================================================================== METHOD: OnStopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStopDataSession() { if (mSessionID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } mbInitiatedStopDataSession = true; mDataBearerTech = 0; ULONG rc = mGobi.StopDataSession( mSessionID ); mSessionID = 0xFFFFFFFF; return rc; } /*=========================================================================== METHOD: OnSignalStrengthCBNotification (Internal Method) DESCRIPTION: Handle signal strength callback notification PARAMETERS: signalStr [ I ] - Signal strength radioInterface [ I ] - Radio interface ===========================================================================*/ void cSampleCM::OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ) { // Update mServiceSignals mServiceSignals[radioInterface] = signalStr; if (mSessionState == eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnSessionStateCBNotification (Internal Method) DESCRIPTION: Handle session state callback notification PARAMETERS: state [ I ] - Session state ===========================================================================*/ void cSampleCM::OnSessionStateCBNotification( ULONG state ) { // Was the state change triggered externally? bool bStateChangeExternal = false; // Save session state if (state == eQMIConnectionStatus_Connected) { // Started externally if (mbInitiatedStartDataSession == false) { bStateChangeExternal = true; mStartTime = GetTickCount(); } } else { mDataBearerTech = 0; // Stopped externally if (mbInitiatedStopDataSession == false) { // Store all life total variables mLifeTotalDuration += mTotalDuration; // Reset all totals bStateChangeExternal = true; mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; } } // Update the session state UpdateSessionState( bStateChangeExternal, state ); // Update the signal strength and technology UpdateSignalAndTech(); // Reset to false mbInitiatedStartDataSession = false; mbInitiatedStopDataSession = false; } /*=========================================================================== METHOD: OnDataBearerCBNotification (Internal Method) DESCRIPTION: Handle data bearer callback notification PARAMETERS: dataBearerTech [ I ] - Data bearer technology ===========================================================================*/ void cSampleCM::OnDataBearerCBNotification( ULONG dataBearerTech ) { if (dataBearerTech != eQMIDataBearerTechnologies_Unknown) { mDataBearerTech = dataBearerTech; UpdateSignalAndTech(); } } /*=========================================================================== METHOD: OnDataCapsNotification (Internal Method) DESCRIPTION: Handle data capabilities callback notification PARAMETERS: numDataCaps [ I ] - Number of data capabilities pDataCaps [ I ] - Data Capabilites ===========================================================================*/ void cSampleCM::OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ) { // Clear saved data capabilities in order to update mDataCapabilities.clear(); // Populate list with new capabilities for (ULONG c = 0; c < numDataCaps; c++) { ULONG dataCaps = pDataCaps[c]; if ( (dataCaps != 0xFFFFFFFF) && (dataCaps != 0) ) { mDataCapabilities.push_back( pDataCaps[c] ); } } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnByteTotalsNotification (Internal Method) DESCRIPTION: Handle byte totals callback notification PARAMETERS: rx [ I ] - received bytes tx [ I ] - transmitted bytes ===========================================================================*/ void cSampleCM::OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ) { mTotalTX = tx; mTotalRX = rx; } /*=========================================================================== METHOD: UpdateSignalAndTech (Public Method) DESCRIPTION: Update the signal strength and technology display ===========================================================================*/ void cSampleCM::UpdateSignalAndTech() { std::string radioStr = "Unknown"; std::string ssStr = "Unknown"; ULONG radioVal = eQMINASRadioInterfaces_NoneNoService; // If connected, use data bearer if (mDataBearerTech != 0) { switch (mDataBearerTech) { case eQMIDataBearerTechnologies_CDMA20001x: radioStr = "CDMA 1xRTT"; radioVal = eQMINASRadioInterfaces_CDMA20001x; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORev0: radioStr = "CDMA 1xEVDO Rev 0"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_GPRS: radioStr = "GRPS"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_WCDMA: radioStr = "WCDMA"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORevA: radioStr = "CDMA 1xEVDO Rev A"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_EGPRS: radioStr = "EDGE"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_HSDPAWCDMA: radioStr = "HSDPA DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_WCDMAHSUPA: radioStr = "WCDMA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAHSUPA: radioStr = "HSDPA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_LTE: radioStr = "LTE"; radioVal = eQMINASRadioInterfaces_LTE; break; case eQMIDataBearerTechnologies_CDMA2000EHRPD: radioStr = "CDMA 1xEVDO eHRPD"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_HSDPAPlusWCDMA: radioStr = "HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAPlusHSUPA: radioStr = "HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA: radioStr = "Dual Cell HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA: radioStr = "Dual Cell HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; } if ( (radioVal != eQMINASRadioInterfaces_NoneNoService) && (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } else { // When not connected we have to pick the most preferred data capability eQMINASDataServiceCapabilities2 mostPreferredCap = (eQMINASDataServiceCapabilities2)0xff; std::list ::const_iterator pIter; std::list ::const_iterator pDataCapsItr; pIter = mPreferredServices.begin(); bool bDone = false; while ( (pIter != mPreferredServices.end()) && (bDone != true) ) { pDataCapsItr = mDataCapabilities.begin(); while (pDataCapsItr != mDataCapabilities.end()) { if (*pIter == *pDataCapsItr) { mostPreferredCap = (eQMINASDataServiceCapabilities2)*pIter; bDone = true; break; } pDataCapsItr++; } pIter++; } // Determine the best radio interface reported eQMINASRadioInterfaces preferredRadioIf; preferredRadioIf = eQMINASRadioInterfaces_NoneNoService; if (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_LTE; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA2000HRPD; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA20001x; } else if (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_UMTS; } else if (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_GSM; } radioStr = "Unknown"; ssStr = "Unknown"; radioVal = eQMINASRadioInterfaces_NoneNoService; // Determine sig strength and radio interface to display based on // most preferred data capabilities switch (preferredRadioIf) { case eQMINASRadioInterfaces_CDMA2000HRPD: radioStr = "CDMA 1xEVDO"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevB) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORev0) ) { radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_CDMA20001x: radioStr = "CDMA 1xRTT"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA) { radioVal = eQMINASRadioInterfaces_CDMA20001x; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_UMTS: radioStr = "WCDMA"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_DCHSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSUPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_WCDMA) ) { radioVal = eQMINASRadioInterfaces_UMTS; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_GSM: radioStr = "GSM"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_GPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_EGPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_GSM) ) { radioVal = eQMINASRadioInterfaces_GSM; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_LTE: radioStr = "LTE"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_LTE) { radioVal = eQMINASRadioInterfaces_LTE; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_NoneNoService: if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] != SCHAR_MAX) ) { radioStr = "CDMA 1xEVDO"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] != SCHAR_MAX) ) { radioStr = "CDMA 1xRTT"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA20001x]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_UMTS] != SCHAR_MAX) ) { radioStr = "WCDMA"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_UMTS]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_GSM] != SCHAR_MAX) ) { radioStr = "GSM"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_GSM]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_LTE] != SCHAR_MAX) ) { radioStr = "LTE"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_LTE]; ssStr = temp.str(); } break; default: radioStr = "Unknown"; ssStr = "Unknown"; } } SetRSSI( ssStr ); SetTech( radioStr ); } /*=========================================================================== METHOD: UpdateSessionState (Public Method) DESCRIPTION: Update the session state display Start/stop UpdateNetworkInfo thread PARAMETERS: bExternal [ I ] - Was the state change triggered externally state [ I ] - State of session RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateSessionState( bool bExternal, ULONG state ) { mSessionState = state; if (bExternal == true) { mInitialState = state; } LPCSTR pState = "Unknown"; switch (state) { // Disconnected case 1: { pState = "Disconnected"; // Stop the network info thread, if running if (mUpdateNetworkInfoThreadID != 0) { mUpdateNetworkInfoEvent.Set( 0 ); pthread_join( mUpdateNetworkInfoThreadID, NULL ); mUpdateNetworkInfoThreadID = 0; mLifeTotalDuration += mTotalDuration; } // Reset all totals mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = 0; UpdateRateDisplay(); UpdateTimeDisplay(); } break; // Connected case 2: { if (bExternal == true) { pState = "External Con"; } else { pState = "Connected"; } // Start the network info thread, if not running if (mUpdateNetworkInfoThreadID == 0) { // Begin updating network info int rc = pthread_create( &mUpdateNetworkInfoThreadID, 0, UpdateNetworkInfoThread, this ); if (rc != 0) { TRACE( "error starting network info thread\n" ); } } } break; // Suspended case 3: pState = "Suspended"; break; // Connecting case 4: if (bExternal == true) { pState = "Ext Connecting"; } else { pState = "Connecting"; } break; } SetState( pState ); } /*=========================================================================== METHOD: UpdateRateDisplay (Public Method) DESCRIPTION: Calculate and update the tx, rx rates being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateRateDisplay() { // Update TX/RX Bytes ULONGLONG deltaRX = 0; ULONGLONG deltaTX = 0; // Only update rates if connected if (mSessionState == eQMIConnectionStatus_Connected) { // First time through, don't use the deltas if (mTotalRX != 0) { deltaRX = mTotalRX - mPreviousRX; } if (mTotalTX != 0) { deltaTX = mTotalTX - mPreviousTX; } // Update life total byte variables mLifeTotalRX += deltaRX; mLifeTotalTX += deltaTX; mPreviousRX = mTotalRX; mPreviousTX = mTotalTX; } std::ostringstream tmp; tmp << deltaRX; SetRx( tmp.str() ); tmp.str( "" ); tmp << deltaTX; SetTx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); } /*=========================================================================== METHOD: UpdateTimeDisplay (Public Method) DESCRIPTION: Calculate and update the connection time being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateTimeDisplay() { DWORD elapsedTime = 0; DWORD lifeTotalTime = 0; // Update session duration if ( (mSessionState == eQMIConnectionStatus_Connected) && (mStartTime != 0) ) { // Convert ms to seconds mTotalDuration = (GetTickCount() - mStartTime) / 1000; elapsedTime = (DWORD)mTotalDuration; lifeTotalTime = (DWORD)(mLifeTotalDuration + mTotalDuration); } else { elapsedTime = 0; lifeTotalTime = (DWORD)mLifeTotalDuration; } std::ostringstream timeStr; // Format both into hh:mm:ss // "%02d:%02d:%02d" timeStr << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << elapsedTime % 60; SetDuration( timeStr.str() ); timeStr.str( "" ); timeStr << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << lifeTotalTime % 60; SetLifeDuration( timeStr.str() ); } /*=========================================================================== METHOD: CheckConnectedStats (Public Method) DESCRIPTION: Check stats which are only valid during a connection ===========================================================================*/ void cSampleCM::CheckConnectedStats() { ULONG rc = mGobi.GetDataBearerTechnology( &mDataBearerTech ); if (rc != eGOBI_ERR_NONE || mDataBearerTech == ULONG_MAX) { TRACE( "GetDataBearerTechnology error %lu\n", rc ); return; } ULONGLONG duration; rc = mGobi.GetSessionDuration( &duration ); if (rc != eGOBI_ERR_NONE) { TRACE( "GetSessionDuration error %lu\n", rc ); return; } mStartTime = GetTickCount() - duration; UpdateSignalAndTech(); } /*=========================================================================== METHOD: UpdateDeviceInfo (Public Method) DESCRIPTION: Update the device info stats ===========================================================================*/ void cSampleCM::UpdateDeviceInfo() { ULONG status = 0; BYTE strSz1 = 255; BYTE strSz2 = 255; BYTE strSz3 = 255; CHAR str1[255]; CHAR str2[255]; CHAR str3[255]; str1[0] = 0; str2[0] = 0; str3[0] = 0; // Get manufacturer status = mGobi.GetManufacturer( strSz1, str1 ); if (status != 0) { TRACE( "GetManufacturer() = %lu\n", status ); return; } if (str1[0] != 0) { SetManufact( &str1[0] ); } // Get model ID str1[0] = 0; status = mGobi.GetModelID( strSz1, str1 ); if (status != 0) { TRACE( "GetModelID() = %lu\n", status ); return; } if (str1[0] != 0) { std::ostringstream tmp; if (strncmp( "88", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-1000"; } else if (strncmp( "12", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-2000"; } else { tmp << "Unknown (" << &str1[0] << ")"; } SetModel( tmp.str() ); } // Get firmware revision str1[0] = 0; status = mGobi.GetFirmwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetFirmwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetFirmware( &str1[0] ); } // Get hardware revision str1[0] = 0; status = mGobi.GetHardwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetHardwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetHardware( &str1[0] ); } // Get MDN/MIN str1[0] = 0; str2[0] = 0; status = mGobi.GetVoiceNumber( strSz1, str1, strSz2, str2 ); if (status != 0) { if (status == 1016) { // Not provisioned SetMDN( "Not provisioned" ); SetMIN( "Not provisioned" ); } else { TRACE( "GetVoiceNumber() = %lu\n", status ); return; } } if (str1[0] != 0) { SetMDN( &str1[0] ); } if (str2[0] != 0) { SetMIN( &str2[0] ); } // Get ESN/IMEI/MEID str1[0] = 0; str2[0] = 0; str3[0] = 0; status = mGobi.GetSerialNumbers( strSz1, str1, strSz2, str2, strSz3, str3 ); if (status != 0) { if (status == 1016) { // Not provisioned SetESN( "Not provisioned" ); SetIMEI( "Not provisioned" ); SetMEID( "Not provisioned" ); } else { TRACE( "GetSerialNumbers() = %lu\n", status ); return; } } if (str1[0] != 0) { SetESN( &str1[0] ); } if (str2[0] != 0) { SetIMEI( &str2[0] ); } if (str3[0] != 0) { SetMEID( &str3[0] ); } // Get IMSI str1[0] = 0; status = mGobi.GetIMSI( strSz1, str1 ); if (status != 0) { if (status == 1016) { // Not provisioned SetIMSI( "Not provisioned" ); } else { TRACE( "GetIMSI() = %lu\n", status ); return; } } if (str1[0] != 0) { SetIMSI( &str1[0] ); } } /*=========================================================================== METHOD: UpdateConnectionInfo (Public Method) DESCRIPTION: Update the connection info stats ===========================================================================*/ void cSampleCM::UpdateConnectionInfo() { // Re-usable buffer std::ostringstream tmp; // Get session state ULONG rc = mGobi.GetSessionState( &mSessionState ); if (rc != eGOBI_ERR_NONE || mSessionState == ULONG_MAX) { TRACE( "GetSessionState error %lu\n", rc ); return; } UpdateSessionState( mSessionID != 0xFFFFFFFF, mSessionState ); // If connected, refresh data bearer technology and session duration if (mSessionState == eQMIConnectionStatus_Connected) { CheckConnectedStats(); } INT8 signalStrengths[MAX_SIGNALS]; ULONG radioInterfaces[MAX_SIGNALS]; // Get the signal strengths rc = mGobi.GetSignalStrengths( &signalStrengths[0], &radioInterfaces[0] ); if (rc != eGOBI_ERR_NONE && rc != eGOBI_ERR_NO_SIGNAL) { TRACE( "GetSignalStrengths error %lu\n", rc ); return; } // Map signal strengths to RadioIf types for (ULONG s = 0; s < MAX_SIGNALS; s++) { INT8 signal = signalStrengths[s]; switch (radioInterfaces[s]) { case eQMINASRadioInterfaces_NoneNoService: mServiceSignals[eQMINASRadioInterfaces_NoneNoService] = signal; break; case eQMINASRadioInterfaces_CDMA20001x: mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] = signal; break; case eQMINASRadioInterfaces_CDMA2000HRPD: mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] = signal; break; case eQMINASRadioInterfaces_AMPS: mServiceSignals[eQMINASRadioInterfaces_AMPS] = signal; break; case eQMINASRadioInterfaces_GSM: mServiceSignals[eQMINASRadioInterfaces_GSM] = signal; break; case eQMINASRadioInterfaces_UMTS: mServiceSignals[eQMINASRadioInterfaces_UMTS] = signal; break; case eQMINASRadioInterfaces_LTE: mServiceSignals[eQMINASRadioInterfaces_LTE] = signal; break; } } ULONG curTX = 0; ULONG curRX = 0; ULONG maxTX = 0; ULONG maxRX = 0; // Get the connection rate rc = mGobi.GetConnectionRate( &curTX, &curRX, &maxTX, &maxRX ); if (rc != 0) { TRACE( "GetConnectionRate error %lu\n", rc ); return; } // Store the max data rates tmp.str( "" ); tmp << maxRX; SetMaxRx( tmp.str() ); tmp.str( "" ); tmp << maxTX; SetMaxTx( tmp.str() ); ULONG dataCapabilities[MAX_DATA_CAPABILITIES]; WORD srvMCC = 0; WORD srvMNC = 0; BYTE srvNameSize = 255; CHAR srvName[255]; srvName[0] = 0; WORD sid = 0; WORD nid = 0; ULONG roam = 0; // Get the serving network info rc = mGobi.GetServingNetwork( &dataCapabilities[0], &srvMCC, &srvMNC, srvNameSize, &srvName[0], &sid, &nid, &roam ); if (rc != 0) { TRACE( "GetServingNetwork error %lu\n", rc ); return; } // Store data capabilities for (ULONG c = 0; c < MAX_DATA_CAPABILITIES; c++) { if ( (dataCapabilities[c] != ULONG_MAX) && (dataCapabilities[c] != 0) ) { mDataCapabilities.push_back( dataCapabilities[c] ); } } if (roam == 0xFFFFFFFF) { SetRoam( "Unknown" ); } else { tmp.str( "" ); tmp << roam; SetRoam( tmp.str() ); } // Update the signal strength and technology fields if (mSessionState != eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); // Setup callbacks rc = mGobi.SetWDSEventReportCB( WDSEventReportCallback, 1 ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetWDSSessionStateCB( WDSSessionStateCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSSessionStateCB error %lu\n", rc ); return; } BYTE thresSz = 5; INT8 thres[5] = {-90, -85, -80, -75, -70}; rc = mGobi.SetNASEventReportCB( NASEventReportCallback, thresSz, &thres[0] ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetNASServingSystemCB( NASServingSystemCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASServingSystemCB error %lu\n", rc ); return; } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/SampleCM.h000066400000000000000000000270161455567757300243540ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.h DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiCMDLL.h" #include "Event.h" #include #include #include // Prototypes void * DeviceDetectionThread( void * pData ); void * UpdateNetworkInfo( void * pData ); // A global pointer to the CM, used by the callbacks extern class cSampleCM * gpCM; /*=========================================================================*/ // Class cSampleCM /*=========================================================================*/ class cSampleCM { public: // Constructor cSampleCM() : mDeviceID(), mSessionState( 0 ), mSessionID( 0xFFFFFFFF ), mInitialState( 0xFFFFFFFF ), mStartTime( 0 ), mPreviousRX( 0 ), mPreviousTX( 0 ), mTotalRX( 0 ), mTotalTX( 0 ), mLifeTotalRX( 0 ), mLifeTotalTX( 0 ), mCurrentDuration( 0 ), mTotalDuration( 0 ), mLifeTotalDuration( 0 ), mbInitiatedStartDataSession( false ), mbInitiatedStopDataSession( false ), mDataBearerTech( eQMIDataBearerTechnologies_Unknown ), mDeviceDetectionThreadID( 0 ), mUpdateNetworkInfoThreadID( 0 ) { mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; // Create an ordered list of service preferences mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevB ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_DCHSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_WCDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_EGPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GSM ); } // Destructor ~cSampleCM(); // Initialize UI, begin waiting for devices virtual bool Init(); // Connect to a device and send initial callback registrations virtual ULONG Connect( LPCSTR pInterface ); // Disconnect from a device and set members as "Unknown" virtual ULONG Disconnect(); // Process a start data session request virtual ULONG OnStartDataSession( ULONG * pFailureCode ); // Process a cancel data session request virtual ULONG OnCancelDataSession(); // Process a stop data session request virtual ULONG OnStopDataSession(); // Set mState virtual void SetState( const std::string & state ) { mState = state; } // Set mRSSI virtual void SetRSSI( const std::string & rssi ) { mRSSI = rssi; } // Set mTech virtual void SetTech( const std::string & tech ) { mTech = tech; } // Set mRx virtual void SetRx( const std::string & rx ) { mRx = rx; } // Set mTx virtual void SetTx( const std::string & tx ) { mTx = tx; } // Set mMaxRx virtual void SetMaxRx( const std::string & maxRx ) { mMaxRx = maxRx; } // Set mMaxTx virtual void SetMaxTx( const std::string & maxTx ) { mMaxTx = maxTx; } // Set mRoam virtual void SetRoam( const std::string & roam ) { mRoam = roam; } // Set mDuration virtual void SetDuration( const std::string & duration ) { mDuration = duration; } // Set mLifeDuration virtual void SetLifeDuration( const std::string & lifeDuration ) { mLifeDuration = lifeDuration; } // Set mLifeRx virtual void SetLifeRx( const std::string & lifeRx ) { mLifeRx = lifeRx; } // Set mLifeTx virtual void SetLifeTx( const std::string & lifeTx ) { mLifeTx = lifeTx; } // Set mManufact virtual void SetManufact( const std::string & manufact ) { mManufact = manufact; } // Set mModel virtual void SetModel( const std::string & model ) { mModel = model; } // Set mHardware virtual void SetHardware( const std::string & hardware ) { mHardware = hardware; } // Set mFirmware virtual void SetFirmware( const std::string & firmware ) { mFirmware = firmware; } // Set mMDN virtual void SetMDN( const std::string & mdn ) { mMDN = mdn; } // Set mMIN virtual void SetMIN( const std::string & min ) { mMIN = min; } // Set mESN virtual void SetESN( const std::string & esn ) { mESN = esn; } // Set mMEID virtual void SetMEID( const std::string & meid ) { mMEID = meid; } // Set mIMEI virtual void SetIMEI( const std::string & imei ) { mIMEI = imei; } // Set mIMSI virtual void SetIMSI( const std::string & imsi ) { mIMSI = imsi; } // Handle signal strength callback notification void OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ); // Handle session state callback notification void OnSessionStateCBNotification( ULONG state ); // Handle data bearer callback notification void OnDataBearerCBNotification( ULONG dataBearerTech ); // Handle data capabilities callback notification void OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ); // Handle byte totals callback notification void OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ); // Update the signal strength and technology void UpdateSignalAndTech(); // Update the session state void UpdateSessionState( bool bExternal, ULONG state ); // Calculate and update the connection time being displayed void UpdateTimeDisplay(); // Calculate and update the tx and rx rates being displayed void UpdateRateDisplay(); // Check data bearer and duration, which are only available while // connected void CheckConnectedStats(); // Update the device info stats void UpdateDeviceInfo(); // Update the Connection Stats void UpdateConnectionInfo(); protected: /* Class for interfacing with Gobi API */ cGobiCMDLL mGobi; /* Connected device's ID */ std::string mDeviceID; /* All the display elements */ std::string mState; std::string mRSSI; std::string mTech; std::string mRx; std::string mTx; std::string mMaxRx; std::string mMaxTx; std::string mRoam; std::string mDuration; std::string mLifeDuration; std::string mLifeRx; std::string mLifeTx; std::string mManufact; std::string mModel; std::string mHardware; std::string mFirmware; std::string mMDN; std::string mMIN; std::string mESN; std::string mMEID; std::string mIMEI; std::string mIMSI; /* All the input elements */ std::string mAPN; std::string mUsername; std::string mPassword; /* Session state */ ULONG mSessionState; /* Data session ID */ ULONG mSessionID; /* Initial state, used to determine if the connection was initiated internally or externally */ ULONG mInitialState; /* Preferred service order */ std::list mPreferredServices; /* Stores the time that connection was started */ ULONGLONG mStartTime; /* Stores the connection rates updated by callbacks */ ULONGLONG mPreviousRX; ULONGLONG mPreviousTX; ULONGLONG mTotalRX; ULONGLONG mTotalTX; ULONGLONG mLifeTotalRX; ULONGLONG mLifeTotalTX; // Current and total durations ULONGLONG mCurrentDuration; ULONGLONG mTotalDuration; ULONGLONG mLifeTotalDuration; /* Did we initiate a start data session? */ bool mbInitiatedStartDataSession; /* Did we initiate a stop data session? */ bool mbInitiatedStopDataSession; /* Current signal map */ std::map mServiceSignals; /* Current data bearer technology */ ULONG mDataBearerTech; /* Current data capabilities */ std::list mDataCapabilities; /* Handle to the device detection thread */ pthread_t mDeviceDetectionThreadID; int mDeviceDetectionStopPipe[2]; // Device detection "thread" friend void * DeviceDetectionThread( void * pData ); /* Handle to the UpdateNetworkInfo thread */ pthread_t mUpdateNetworkInfoThreadID; cEvent mUpdateNetworkInfoEvent; // Async Network info updater friend void * UpdateNetworkInfoThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/000077500000000000000000000000001455567757300241545ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/assets/000077500000000000000000000000001455567757300254565ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/assets/qml/000077500000000000000000000000001455567757300262475ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/assets/qml/GobiSampleCM/000077500000000000000000000000001455567757300305115ustar00rootroot00000000000000Connect.png000066400000000000000000000127151455567757300325370ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/assets/qml/GobiSampleCMPNG  IHDR@@iqsRGBbKGD pHYs  tIMEx?AMIDATxśy]U缡T2U1 I6![ ]B[A K ;NdRdHI@$@{=wz2K޺{{%"^|DTYVQ8';@л({cGqM!7a:M3:HZg/i~(77HDQ~f5,_;T_Y+ )$ ΁s`YSH}f3|ٴL z*^qnT؇FM# |PDЈ.<?pVU8oUC0Zf c's=@ "#( jn Oob䶳 ^~ q ^n cFQ}96s akԞ ݞ/?$ۯ<U#JŸ $ Cf\(k=B,5Eet Nlx? *յOJoHxFh@" ; hH`  `ѵ+"iMp)Sh{_4@!̕sX f._E£Q.h˫q9HʃI{ck~DPG}IW - NO NuXXAN^TS*qe܁h%(VڽR(-(b kqfMGw Ӯ|s]'*o*A}t 5` gr--pݥǬ& %Io_(\>xWmF|a:sHKz/eʅס @iڧy}t #aP*@c;!tˡ捠sAEm&zCj@,8GӬt^Mo sj/R oChgiZt Y5jen/Q6zd"!X 3~jbo2JTv"c2LsAt^i娦ftHÿqqGN FạbOr UDՎrߞJ1m`Uoϒ H~N N* . qCoԴ!R}Nekh㈩M2,> An׶-O5*ҁY TS;~0$cMK)hjA=)o}ly:3yQڋ NurpW O܈8bQ_ u;&ݑX IM}gaK}[˶ $TQ7]T~>a+(rEȋ!yoy3;_=Dv9}],B.ax V w zNkȯ 1 >Uf TXvL)Ҁ\Z"&@,vfwYx6;tQV#\?y0yzfgd'AX@vnP > 'uH '(T蒖Nh2f%L)d:fg-'%NS: rtںҩ͝V7e{En? S^ᜁcM! D8> $P(4$SJ{A#ǠR# Hkw_ƲԖOi4]MMS{ʆ<^VI!#/&Ƥ ۗCQM$R"+BOiu 1$}H8qr׉꼣OlvJde2p<{'ly"ܜb~ᆁA:Bk9GѪ;SʒZ] +) )>i bȠIBz7V36F252xP螁V*7iǪ2Ȅ.yϪPCIӺ)]Ӧc+NXˢoP.8qOa5e]]]tvu6q%r!ar*9Uq+NF"߹4&Bsep>n\e„.VtOVaLaBx&OBTbӫ) 6?ϜfST1X .7}A;yEuN%^bsF q58 lFq"/y  GϢ_jʾRqQ.Xqw2{m3S"5{LLu+4z21 $ǩ(C=K UQh½x̒_䷫ g}?N8x_* 0<2BkK3Xسoc}/mmm R#u㻘7oZj&RrȂChkkvd4/<ţ?3&!3B ? HT&xJHǞpUMƾvq!A~q QTV0eD `τ 4jAʬIYг`f~G9~`m/IJԧ 2mr.h2WpN!۷a,̛%88aiB0PAr~RN(ZXڇ{9#&\4nX®͸ I 8]_] q(\`z. X'9x_^V1TeZ,_*Q-Z@˚9S)7@ԥ'K?=+.lEN㬎7l6ںMzVh,?FWGC( 0A꣥2jb,9\gkeN* 0x)wTzz; &MkW5g;^ n⣨|>SIn|$MvdLD+Gb2xЍpFarh6u8kchá-w{/?Un4'0JuB Q;|VѡMt-9oވf(]ļUh]ӱC=ff"]*$BE48WP:C.Cvsld ~wvp+J2MiSY%B$Z8eu Y]Oqy_ޫ{r4@'Ad$/%\ΥF4]K-W &,8Sj{%1W n{cGqb=")2Q}w0>)NgszoW{m?|W73m\r"=;}\*,rIENDB`Info.png000066400000000000000000000122641455567757300320400ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/assets/qml/GobiSampleCMPNG  IHDR@@iqsRGBbKGD pHYs  tIME 4IDATxś{]Uuks;7A$*!'ЂUTQ;J/h:DB(o@x$Mr9gfXk9&!A{=s~ߜs9a/"R?w=kT\;@:'f{H_ytev\jppmɤ}H̤}G#h@-߻77 }b0ċ}ϊҽc#)$sXpR}L>Lt뢈=R@bke q7*m)϶~Z!hD;@k '9ґ1nf2߰${׬3 ~̺@(\`ŷӶx9vp7OjI.8xA`Yg#@5^1hā:m,8C. ݳv[mJ[E d_(}Lj̺~1jQ`(+@% *s8`m@mdgw\V_"^2|i/(ު|Ͽ--ȯL!%DΩ@]GCM[t G\+I[뇀Ln:o8ٲPMGer *n"5' gUD@C8{4s׬STc3B8[un!a`ٺmi 7x|I@=cL޸*]݈ЂV J1D) P!K\ zHeTYH? tFQ#Nvxtp#We䡟3tJ,UF)f]S6j7eT! tOC/ҒEwgh\sks?@>0'$zGINUer[? NuXXiʶ{~.~ft7}LwXڟ~ @+W \na,_ :OQ9zter TT%](]v.?z_%<2Kܦ5 *@SI -EƗP|%v[

lfm%>'+PU6PZ㉇~k4vy UF B/{ApjyYu%swC!ر66@sѹV_ S Qo)X9Jpa 818cx*n* eo=q8ۓqUA$>wʁ7_ڋRc [xM,G@e>߰WVZQ'9=GA!P)p:ٛJU ;QBƾ {]WUtM|@:[:_Y/4S0 _PKޅ}|SIŲ];Q5qX?Cw A)Gn9 J=Oj)8qx k':CT1ЈיJT ևN@~U@zIxmZ\tP崼&快ii8T*r7V$+E ",CՇH# Dԩ~Tb9ܛ"A Ф})J/Cġ'#Uf%RYBL&lx Z\Kg/rЏp`M\<9/>3BV$*|tΪ,H(|Fk:tM}G H5_rlS3*K XCu,6?eU%JK m @9ʶq?Z3}c$ױ@D jch=󨢁!`X+E(g ͛" H%kZOi|W񒣋{ &9:{j%t={Ur16tX ܪyb}eq-Rv7NL)X=} f݅&·DT˻Y_O|]mC|5-" @eMXRk}`ke%dBZX)d}k-U[7jR?%QDv퀭ϡoEɳ?+SJ`E!d&NjhN4w}9g̝= hkk%ʂq ckq0s=z3.S_$OS" G"fS+[ZΥ\~Cɹ5[XSn Q\X:#2BU?' O^w(DI4hDkX OM [`=;6:M I%_13wNP@/͇$MQȎ!ܓ"Gjq:3= %yhh~q7o?;oo 5ƚ:5)K,: ɂ~#p/YTU]B#q[vބHkk"7 pyח^?xyÆ߶@@l "GJ9aíJğtVˉˏVŐTV26~OB M /{q;,udd)S.⿳-<{ 8KQ!鰊£*u3}.v<`Wg͉K4MYh235JR'(14M1i|td,- tKfA օ⩭˲:(12X}Fv_{|54<\]LFDZ3ʙ3w^ZnrW8JsjdYDRRTP%BU6-Z>}'G,;f^guvdLd`jr(8cZj ӡ'͠Ҵ4läu< #Î߬on=6޲c 9ok^o`;%i hZ;ܼmZp Ea!Y1)vdh{r5ɔ}X|_G9ԟ5R>hXlHO@B2ZXè g8MR://f2Jƿm'To/4!!0{d翁 g(nZ_xM_5jgs*sfmR pQm~4me/5;DnQJ\5Z!EdDjW+SM}JR;~{;~vOa zMR! fqTLC1cr*wx"DuyLcTU8| kp㐥:,ct[ؿ^¿ ^|їn6 R]ER3J fϣ{ş'QXD=IENDB`main.qml000066400000000000000000000413521455567757300320760ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/assets/qml/GobiSampleCM/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/res/000077500000000000000000000000001455567757300247455ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/res/drawable/000077500000000000000000000000001455567757300265265ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/res/drawable/icon.png000066400000000000000000000163011455567757300301650ustar00rootroot00000000000000PNG  IHDR``w8sRGBbKGD pHYs  tIME Q9iTXtCommentCreated with GIMPd.eIDATx]yյ[33*8,qD *F1`\5$<%M̢&>cix1QqKTqD@fٺ{oݪ Rtuuuu;h[uVe*?+?z_nQ|<C N'J\ fQFRA)LJfŴA7IJOX}Ѿ_N d*5W I*.З +J"0f)yӞ3TeF/cHզ-^K@4 9yo}:+ $9/h0 G1+P֎&f2 ?OpRpwn}JW|Zyt1 䅇±A %V! @gV֦/E-x{Dk;[ۃtyec ǂugY;,BPh!@2x(EmJ[9ug^kx 1KŠS9uA<h%.@W0(mGQ0rS"Ȃ5 J"'%?Kónz@<y&~orǜ 31:XZ.p h&ش%T+T`/OZ`AT pxwC\@TE('W<7AXE"E@ke<զl19ƁJܔõ[oo~B{Q*Pi c)) RR{1y%M>j2AbYw%su[ukЄ̶c֢ !~ABA`\׷>;vKo)$D   {J1\0<iF] k)|vkyNM| =n PˍXPA(D6]'bjC A Cm d NR?I̜Ss,Zwi4`X]׹ `XпO$),8ZyN4<&4^*2 :r+~i?NʔZL vP E#ٺr[ئׂ"ѐ a!ڐϾ` Z=KiE-ߖ! E0SP03L'NFj$FLwh`09| z):zmoe;]_~@2Һ8@Хx ~O#s F+ C!2Ն#@0`037#uZ<];C`ZkUOT?M:-Zod\UqƩZB97"7z2R]10!p[{BPϭ3o݁]ǮEоM\uJrWΘ܊ / .la7g$RZ_)l 9CX叕ܰ[~2  _!LOC8w T\Ri1 ,Kp['+g![ ЭTwMG_ Q;8^#TDS@Q|.yMkW|Ce7o l7`o PenR~nu) c7GwVIrR2-󔤔*ZBahy)ZhLԀMztke7=ApҜlV)}}3A骮ciY0}[TBy)%Rh[ [ 5܅e%bRB= H^DwƑRA FoHt]PyWm>! BT=^G[&%M+A8κJQ   ]df-xx5S4b|9r vȕMJT?rg3ks)1xkwen hb\[@JB|iPE=GVaiKzGF[Y| .~ni1\5K4ĨXo]@ 9?jWJ2*Bd&9hl'esU{wN At$|Sb]zc@UIkCo^;*TOj£b)(]Udq?Sԉ1(]:PU썍l 2!Csās6{)Lx);hHx3IsgCnEE ` ^,B|\[K e*Q;6PRSO ]Ϲ ͮ%. دC{Z_ *MC\wtz_|m0%CIZF\9tE  :q}zTqI:oع57 $'5:TF`P{L F{D|%DZf,N3~8x'hy# >zr+2-Cv={ɓBzWᲰ{158pGF}¦gaq8xI@LT Kfpk^A9`c/g~ԊT[?WQ)qs'x͋P+C;{K3؄6ޘt'u5U)A8 (1܏R ~ܭs8', )k0Ȇĭ@Q;>/l-x 1iCnH; ,O\FNԲn7:Kb;u6.s75T0th|@R$D^BF𝷭{;{ w ujgE!V`k~u m}RhU򀑟K`rw Żx.nhYHtcЊ-T)+fW@ 4n9D?^7m[yAu/2o:y A4wsZœY_,/ս N[o;T/'trud:h J~*~ [ߎ4=3 *IbXJ׊ vs{P2YK๛? oĖ&qG4ZG1~])"pU/!ff$ʾx3חd0ADx[9k7( f5)5k@֭,dtlPZ1ɖ~F"%W:;te8{NDB"'᭘GSq-+ok|C}5c.2ش FvN6"Tru5*SV(VŎ#C8Qvd,'Aty GBz\N/)5rso4>`Oe8}aq1,E?x`YuQJ!p[99 l\Ǐ-ok^LJ 5L tW֫և]Ygf_.X 708R$7 X͇WHxh31c3 |/:`@ ])Շ>ᢜV@v[[W>|s~ COy& 22m1Z\xŚ+2Y^܉hj~@y|\@0%H_V0М9N >:Ġx+16<M=žQn8N4+7LdRJFC5n^n81)$~ g.d[NP‚b+h@NTsfw_)m^,/cFS% ]]ɏFք2`=^A3nG7# h!)JXs:F5q_fg.3RW { *));]'asΌF&ElNc ͆}fk׍"`Є5ODkCf##-v,, Y9cƌ ů@ /c*8RLM~t++61J6W|߇R_sG]ױ) J&-IG&/}sKi(C b~+ѿZj늨j|Vv% .dZݗ~} %RRSXnu?Rf[x=2gLdzm=vXfsG9#,VG,b!Ҳ=GCO뵠lP˖и5MU8VIa_ e>Q,@p^b IǛv6]bs28%`y1Sb!NYKtX1X/F9P;6/H`k:y= QO.ζg͚DvN 9U/B4 )m8| ]ªX+,Rt)TkSI);ْ2\Z[/mPoΚ5ke)}뵩ZE%9B# ho3JX;G;vGpGPazaUo<8L/GevT  }*rO[ߕH[pZ 8U q!MjDCRfh>ۜ;s{PЧO+[ oVHZJ0l5>&RRa@|qj?R45y[_oP 31KU|xCt$i=mUˑYѾ˂qF㭿 CEb *Nu<G@aj\@7b'~Oct5#N:p$d:_P/PZ@,CŲj5kj? Rטᐫb`e}Ĕ puhTI4?ͳI7:8:a6-,RUP^e~pV:l!,?])^hwGƣ2@gfݘoc` ׳"28jW\XAZ9šՓdqI؉JV~pGݸN;}weߝe$ Ȳh0E<YǂXKJ,|%R}_^S73[FܮC%[J\ktc rvۋxj=TU{R^=2IvX127 pL(QS~}cb+ Q{m#n6wӲY:V0j|p=)%rH?\6H[6$sz{JF{aT9pڧY80Gnq.._JK"P"/9g?^ ؖ<6]|(کk Erf܀N|i:{ /7LٹS颣dUc}m_焵x^/CkP^%wiڊ-}-F׮ZCIJ壧rp4p> B4A}u߿P9V'EQ"yHuhk:(Ld-_^9WrnU?eU{Uis{}4#ZHJv6b S(W+J0ylRTU.)\}Cw/wM~?nz#IENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/android/res/drawable/logo.png000066400000000000000000015030701455567757300302020ustar00rootroot00000000000000PNG  IHDR sRGBbKGD pHYs^tIME1.p IDATxt{SY=Ey^OęiEQTDyg̯":Z{;w^V`0h___ꪽput:...?}~~z^;m۵h~~~zn뫮Zku:Zká}}}ϻniNm6Zvu:^Nl~vv8ڃuv8l6v8Y,vuuպn~z^Ev Ztp8pukz]?>^sFVinųGfigYw}4~ߺny{s${nHWUFf[iWWW[kޮJF<<vwZgm]__>֎+ܴvssS:Nn Zkm<h4*'~ooo,ִr&Z6KL&m۵n[?}}m777phG9p8x<>93guC[׭FQ[Vm2;{ɐsgɤ&s}^׮Jw{pXK@(u~~kNmZp:Nj*~||<8onnΈZ`0h~vuu>>>ymŲv=Z]ymٴ`>??{nΎ`im۵^:N e~vm)IoٔmvsssA;;;8??omֿ~NIQ`)v[ykKisvvVF vmWWWmZ`P4vzNSvl`0(b?>>>E`PF*qvyɉv뚽^}}}w`0`R!uXCn)J~^׾t:Z<[kFr8H븿g&svqqQg38}}}#y~~^Njj~yd???p8`PYN~}}}j*\Vm<vvvV eC{}}vv]fsHSi8C(l:W]V%%٬9e4ّu]a̭{6,~~x\Z\㗗ҹ???˶m]Vth4jrfi~u[#0:;;+Y8GdtphZY:;Vnt:ǥ/8olɤKtKɹux{{kѨrٴt:m???[ogggٲ'vqqQBzR!J}WFբ^\\~6MEZ~o~}~~R}p VQ^f G]__lw7NO ~?Z/u2ƣH\\\^n[& ,fxi)GF el3"ߥLܛZ 8,ooou=ɑk_^^g1z*nͱZ<';cS)ːB[re88l﷋rD8///專@Γr\ u=e<6Y%`86Y2U gXkZl6+DD#Hm6: }~~tZH|~~lvUOizYZpNe9=___mٴdR U4n؃~_p߷^kv+<ZnK7s вQg.'):g|VvyyAugggB(>*g<M^WFRԁb,ނmEC<,Gš ~/au\]]=\__~NE@2x&C͉`_EMV^; N&ls<8L?w(v9s z^A1y|>B9:(^IEnnnjA]M_]]-^)!y9Rt·u]ץdOӺϻf9R̜CkL0"ktuuUr6һ3~EF^g4N3 dRl9ݮYUh3Y^*eAݦ&F3gswyyY?qBFҡ{Wy^};L4,.'LPXKg .PEsS.8Yq[F|`^8,k)q83A@A{yy)*uɵW,Q]VG( AGZ7w8B@o<[ @ yQ`2\ρ(wu;??g=(!iH@C%ssss$T⷇`>JGZ 456'Rxh_p8,9sݮM)3Gz5y`82%,*wEJͦ8sy"_LjC!u!2.\ѝsðB\nnn~/A<Ȟc@&3i:ЭlJQZgJ{ 6Mϟ8gBl6ы,HP.]ZhGl 3tퟟʹN&vuuv]ɤ wqqQhQh9wtw^tZ{FJ㽽lV{֛.T,?5gF}w֥cL2]sho]TAܵu!ͦGS.@))} 'g]QN/#*Ehq3X)s&+ubF㌬rNDg3Px7im^s)RC|>dGF1+ŞȦZ~RQ,0#F[eP];aqG)L'[[eɹZ0 Ð 8NZRby~4 "S']nۊ9 TosenRԺ; U2Z̙ǔFBf T5YR %͸!^S:rqqQ #~uuնm9_1VAˏSrJ3ֵ~(:#(z'ry@"CP8WM"lF$ L/ˆ ;k,$cvlFuδ3ds_eƈ$ LqѣҷD?ao8UAГ%Y^:uÙHp8l:|n66NJL[)U ȊwbSήH>K a8r" QeBJf2 ';<'7#nW"9x 09F6=/)QHrÂVdGxM 9  %WJC|^^3t aDd< 7D2\;r/^ %)Kgr$Ko C.'ldR=%,jU(.$>u,$:~ƐD| !ʳB)ʚ]r,`oVUn[m^q]D&Ok)YB'jDeVNߧA*p~8Eo$(Jf94Nd2)g#R2w &҉d1y,t, q6j) zQԌ`S9Hm0pڋpea/..$f`Ϻ$ aJ0#ɤ-2oooy"=&Z'1>??|>ortdch k2YRlY *A||gȑ,dd fMF$I"BmʙeE6(kY~09 PzC9Մ8RWzTɼF"9cO~N!fOE Z, tI'ķ,V{o{%!N 붱re:'N#Įӽ.xY/+cd|\qgNY$IrDKhH]f4%JMNEHh4:%#Y:Dȋ%ZKNIpN9 {48!,qs3^#/xa|'$P)T9,g;Y1ΚNgG?r)k '(/F9^Ra3RRϐ$2Eg^BlFiv:u$rPI:b5fyCa%$zkw`+q )0xn<;9Pq(^W?#Xl}-=b=wfN[:fk?5("˺QF3G9Ecm٬d1{qȦ$#$M榭"fVv/QȲtZAJ5 F.Hj~}~~nUƈ3\.h4:j{=2c1g_n@$S?@:^*xWWWo欐d9Vd>SIYveʬɶ)odT,̽C]٭zwv!I! Sv "v .O6!#Gp'#*2cNRwrl ʚLJu@:T"Ki1soD26N!l":t< L dF##Zɻ~)@)Ir,q|&A5eل8ٺ1 "YI)E 驘j$6A*R\sɩT8"^Ԕ<9Nq&NӦQ;$&;sb>\ɸf0mV|d,SJrPBE1Ln9r$N2h T|e597R>E4r\фq9DIn{gI#ݚM|Y$S]hX0F]+ ?n0zʹ1*ûO 'g$Q.}s:???][.sxL;?p_6ںěl&{Z$]0j M3;Y<0ceCw^I/ v1{% z)9Q*s=x C:OVʚHr)(VGf:$3Q;ٱR2$A.>v,pҖlp{{{k P]\\T(J dal믂35 #ǐ˭r}>}$k IDATp -K-kB dt ҾZONLulXyD,컝Ȅ@0%ɅH]KOOeR滭sIy7eEH9K%bӋʦ4 (=kLsD9p!#^+@"ёP;;;ʻe4|qMG$qLc k]QHil=3œ9tZDj89,!9+:Y`;5OI &3Gznۖe9Y?j(n9|z7@{HQãYFF$ϗ M\Yv)*Ir.}7kҷmիfkp6gPv$;A9[y.c*u)~}}|ޞ+ΙrPtZ)qԱ43fXgw&?m:b|Sph'& ٛL&97K=/)Mx`ߕK6sŒes\B[P<EV5zuA}Z2xƋԒc-)YOQVM=G=dË$X9>+ϙs{ϮV0Y+s2rH+Hkτ`GvK,uƉYѢ}d 0?Kg&9$$kCݗd9%:hϾĠ\D ,lreG^%4v?Ë*??yNc|~~0p=;1sI"Ԑ 0EhyS#Ȳ(FrsҎֹ`8(FS\I/]__cDa)f+OPBEΕ~aL=L6F?#,7ι`ue1'$MC`:&*#dQ&!`j𬓼y6А34Цu9-x=rNߕ|4٘unY`=FF~3PrIFA^,d M9%P錜d3,;%~Іcm<2dw]MQ.ͳt}*e=q։qϨs{\BizwF%(G+*X6+<Đ4IHf`o /̇OB$],|6h$'09.GrVeޢ$$N)$D`iQO㛆6s)X drtbHiqᝦ."P>~C9$I*ZS**JE@f>q@}!'b;3VpIQdGjC TA\tkAQ`LېuNb湧in[TS"y[Nk3$ HSH~3J\ d3xCheQv wa%'!̳yz}Tnd{HȖ":l|:IhN=Kj((mIPQݳAWE3_!L촓W6Ϝk^$nvyͦ9}s@ط~19LdȈV86ibP r'yx\ As 1$5 ƀ,CY J͆r夥D>k6%w-O\.yǥ<)Fh#qlʩ;8ρ WȮIr!$A:*~&r9});iL,___ald9 o錝cE3$x~è5 KhBv=z~~>j٨^z}r1Q)/9bȶ///GINW&$"`PeS.r4םk1])D ѳw5{yywN_ 1V2H٬ܴhtr3YNnoot:TQgmz{,bw岞't:m?NL@zdJ^K-~;'%9;tmMAghN*5̑ze:RݵjE8?YH4P)Zl6+$[٬r׆8bp6tRZe^pBX񭵪:I&r!,pFf񋙫ʩ+ !HmF5R 'C əjf[?:Z룚lo>_܀hRt aT}ɦp$YW}8"\9y{{V*Qgw?u/VIM2Y(]cr}}ݞ&i9#6sM)'w9䰣nw+Jp!dPps5 Ab 윖'}3Jedi:8 Qx<úm6^P,\.Y3~̙gXI%MaD\" 1 R-N~$yM !_Cd+FѴ}ժf~/ߖQo O3HLJ)9S:\{|@orf󨹃:y=MI)aJ7@V;Y9g8H |I0{E7xD3YЌ]9R%CԟP@D#VX㺕)YёusD5Gs'šdJJÝɿh?i6I`6Q*г1l63)f1<EKx ؁ M"Uvrr,ohƒ.;g[f~+K$E.\NP.:3Z(Β[ӵaŨ.ú>9hh Dl^0WNaxz٬jcd`8;=t嫰Cɪ[?џ+rE(l۵|~T~EF}4؏4)(0yzz*BRFg4((W ;7Y^F cD4#ue4Х#U9 ־qrxԬoߥa%ΫLfZnG%=G9>wZfX,mɎȘSdfcLE h]^د+kߜ̍#I3{r=7MG6-G!itzjbĞo\fs Ѳ (qzٶ`N<:s$G~9^4OȍT^prޓ!INYHȲ1/2;䈘D2h|t8}ʱj(VΤM&:9){o^E/"\krͲU-r [&BěQ,4T"G?Rw&rHT~,ٿ}Ȳ U/=5C< jϠE=e8Q%J8K24z`s,_6ɱ2???G >H7f%QMy9vQ' tQ̇DeN[Jlm~_r!ү S@&tZm<bQi<љ]__jE\g+I:@^SDKrY\f㏶Jg2Є94AS ) CYdDXp.bhIf,G'"27gzØdh R瀃]Ra2IhGPFH2s_K@d#o8w24x)SVc6!f"O9C+h4**!+j&Z^p8>9#c6п!d}<5ID'nXU5X[U=??Pg;ībQHtr}}]f׺M/ oAk)l-갏7s62H"@BBRG|h9P aj4 D3'}s]#hG@РZbs~eֺ⳱C/&wΚfYwE<@rQrr[rpΚ7D"e!4aqg/W]vD+VRɌCi!(B>1L2k25J@˦u8%RΤ6Q*S DD2rHvmդ9s&ړ(;~l32(]/d {~фGDsNFصDYm7D-A:D4Ѩ*`IzvJ' Iy<==aSr#Sq|W~sR)jEQ}B~-) `,#),dR3QHً;a. ^IAYiiXV$YXCSjfؐFGRIp4)W%68hEA$1$,eAS?ϩ= 9$2 \sLJ6^ 9{i"7,580m%p=rw,A -<BQm~6阖Vbr9P):`N"ERNYJ )sGdxc{0)HvtFN { uʒ|~PdYYΧ ;<$ԥlj3+uWS.dҪv>??+rurD,"j쉟 ԛL&sJP HN7+8dgLs0ӤDnx Iv}; 4Pwީ-Z(-DNFJC!LxiJ"9E#KG EJgyu[Ԫ5Ʉ΢Ŗp1vt%)<򡨛%v )As)uDꇇYD IDAT]\\T3-pYNdN7jNU%!_ qsef)0(gӧɶ"}h9KO_53 V3_՜L"o(#ʨYn4˳1aZIlQsx| USGH> ]BJ^|r {xNPmR?2TIFGXvd[ONV½p8,C%KB9 )aIdg?(g2n-E;#c<{!J8!yό?Fdr>Ά a,ȹ:S C???ZìkY^P!x7$HYgb/23&ΜhI(^=#*TA7{'NWMU/t< 8 ZUrƞL#j"ȃ2ph(}b gPg_,147&ʖDvT((JjPN3%H7d }^L%A-k[k7~s=/(B5& Ktyv١ty6);Ne 8믲!ˮOJ@HbK lWuf~1I/Il ih264kA"2X8*"CȲ 9fgIwzK ڳE(R̃S#>P>!Ѻ2 9K6gB:'32Q*DHr!GS!"9ΞkJ3{,+W(sIbe`E@7k 4P\ޅs ρr g F䩳V+XIQ 9div[^YnPa$Rp&#VpU##fc Bͱm٤!'8@y&'m}E<SY#Qx<|,%%=GQ-Dz]gYS5Z1"lR|>o~e;kZW~O68oݖ!˩#t(P{fQfN2Kሚ `=Nkfsu_=4EŘWrL8%N٬K1p\___rbX*MykC$LɱxnooTd{ X,p|&df$8;?J U'^ʇ\.˘~믶m1sM!S[;(}QvAP겶nC:&O;Aj"Ÿv_(h[Siֆl=L|^ͿbqT˝S847N0y &t~ܬ;#yڬM>RӜ#rifa;> 1"]~6>vn?rˌ9@E:!eٲ%T¼l}դZ3fvuҫ5*yLp"5 ٖIb#K'CCP9Ns">9P碠䜕g@;GwD Z2˙ eS ~g]7x>*0Dk2dGAFR߹"Di?AvA "l¯E3A&۴R#Zso6ԗSbgij[O&yc{ٔ>kC0 cKw>dQi!t p8lŢ ր3#לA/]];8BN3Yl,Gp&M@͓gL"^$s6 3> N9],=>;;peEHX򲔫aB9BR3[ u2@-ϛc QpH!=J&O"kMD@1ɦa#&hy@՝yvGT1t{^ eH09'"MhD)/]l"g9 9R~/#۶X,*btkFFU$Z@J!*.R:"% p};"B& CH)?WDPrr A wsJrBRRH1Hʙўw>W2;^f^i<Π`f=~d7Ϙy_2SgKYׅ`gD%$,)~5r@Ⱦ*+dȻnUNc9 u 9&~?:;~G䩓p=%QYGrÐN=g'~ Ad""}E:!yĺ.bCJE~FY(2/ i(V:SӢ @a>x8v"h(%2?%h[ƨRY;Гgg#X3͌~Y h,ˣXCjsvozXlʒ3duZwk}h:"SnL5Y$28r 1$F Mt b{eLrE9lsjO;"A֙d™8OTD -%޵>L( P-*ήly kg9ņAݮMrZirp&$y4c∻q{{[Fa<#9`Ey|,XPdÞzw1 lv.`9 y' jt4{rĜC&:nɸX,ʰjX Y.e$*d2Ƙi($d:lO6~u^\@,zp\$u\6=]3G%9DY,jZg>>> ֋ +!B(y@4"RUR* [{Xv'J> H) ?tMp.!~ދ>Ϟg Dp&?! I/Bv&dD)ϘJk/9eAХE &RCZr ?<<M/ m~yq5rb kJurp3Joۿ!lO&YȆd榢] yAY[밈0>eǃ]#_AQE="l -s:ru&~M0V]81C3Z?R$9ʜۛp CʐLOx*-9DtvD9:YBlqt)l9Dsrt_$=ufdC%4&!K0[艴8FFΓӊ>k(6@VbJ>d*gnoo빳32SEˍ7g'K˲g])US/K5q*iU xV5r4b!tlaRhL9AȃCy4A͆!0+efYY9_^^yAƁp]驢`PvrA$ 1vʀ8!ճ) $ 9 q&sw: p;k.]$m_&#{炃y}sPB(KY׫LDàYrO*Y G3 T9a)~9]7ԗf9CBqB@@  ,xAK?8a4&IgKe}džٳN)_)=8,UX&XT{ځ(P#=Qյ_1tDBX\/}a#'2 BY0iK}t6bTN^';Z%4GKk̡# " ЧwK&Fth4*=6kR*N9r`k2-=$EF_*ekVP\͝ 9a @`=ϙٟڀ韯J))IP?J&4"y~~.NײKى"^dP.n;fm! ,'DhA{~1;D~~2>=3$%=4N[DBdEHϿraR9NUZF *Ρu64 39M˒ \'9,KoαldfT-o*~DӠ$kԺ(98f:7C1vd9}oG\؃%9ztmVZw/I2GɃgօR5b.߇#$?n*hC *g6i9h@,EL+P0""YȌ<gМ"'A}*Re%R5l{?m:6ců_JN=̨G׿UkCӜ8~"Ngym0Og&m&8PdQ6jd9[ ~U%~*/@(݌apN=INwHcVPP J#HafĜLH7i{ĉ;*ueX g뎄jmF1E%A]VKupr]q\_W\G/H T0H;&u$&IVxȷX &Nvmݤ+k\U.-ϟս@A\]]՟2b90$"XFIMaժX8fRyx7-uzupDIp  8i`?CR0WQ"`S͡"Cd{jvcmb0+FŻUߓW#9,(#'#zU)2LUݾI'VBKtP랊_lVuo]nYd.yyy)X_Gܔd# ADNɏy^^^Qi.!?Vuvuⷷm>wTZ9EadmMνO{~~N&.2Wn১\.+B*2{wwwTlR?Yȑ@HVT9Y8-e<%v"bs򀛓Ȝ5tRmv^г7)K2_=xyJ1Rjx٠gDklE\<42R3ǀx-rF'$+'~7bPT qf'28VuPtD)&~sA+a^UE9W4H.l42۾1t=sH%@i9'~|^, ʥB rHs1z"}h8ދAǾdy(_M7:#2|{{+囵ΘR\439߬GTbi.…\ihG~t4 )\',h|9ۿN&X,?j~֓6M ezwɁoŢ8 T嵒t:2(dN+VDDRj-@!^6Ȥ&lN7l%u:뀳!w[$ll`CP0Q (zVfmHF>%an>9I9$'xNF$j$ܗ#™(=sGLF=-SO;k/Ec!aɺE($ *2U$1ȼdnS_X3V/g 9 ^>0ӳ:H<2 NقgCs(#-i,U)$1"DQT̐Y Ƨ`rZ >ȗELbQȅ)"t:eNHI:TNtx\_~U(6FΖ=m}&lmɱiCODؗt\.۟f} :gN8߂rxѣt6.XDק!oJ/IXd='8Hg\!+)=e2 b aH 씕&袌,2 $Ja銺:WtI$&F`8t8 22Q9 )5kErV HװC䴭ndM)5Xz[bvbh3)OӛX༽-!׏uV8!)J!s~W 9P09T'<5+ftA֏Bm|xxh41H$ZqNԆN^()(YgvXڀAgi# urWCEgM_S3~20IAe2U <";ϰZڟYJGvN|ZRP&?Q/Gl_>%sxOt&~ Чdž gŢׯ_!?3]"x@?hBd'0 5 HقE> P*~aUa~Nɞ\Qz,cJC <,6cB[VGp Ò%b5~7Lkld({T.])$%59?xX#%iD=AAhPڔޠP2!iydDu){0 W>Serƒ'Gn#Ȟ9*1H)ƈZgF,8Y8 @;v$sH *K>t:ˆ=BI+G?γ }e`DtQ񱜚~_g6 .Hp yƁc82&{%K~qk q.`Q-f;8Jp],/L*SʞٔǛ9koǨp={W$*뀈3:AH S򀲏tU0@lT 1 >'y8-L&"J-n;FPA ?2]>@GdnR`"UkNmc9JU8-8@ʜ7FN|9܀5H$"ڵ&jnS9fi+]ETʃv:9nĬbQ=ՇWUsC_sh4jWɈc+X"n]s'"8fR6YBϏfXŌ It*DfW@Hgz[@g6zw~~K^k9b3"Ms$`:Č+=]&5'7- %t#!1ȉeM9-kvsh:O"d 9'Z΄td r\h/Zjd@y8?z] i}ጦ+&Z@`8ZO29"H0.YGAIJܲ? \:!RNq`}ry4v^W0|)MLz۫zȇrFG$wU2ˆ:U9XK}Y}`VDP9P>grAJY?'/ (?Y/MrX 9uJT4{m4[kwyy;[UQ/oᶘٵȃ25t^s0 43b9Dl;DB`q$,aRf99<-.<‰@/'i:$(p S,+˝@c&/#94uJJӡBYp8,v+ϟ(Lȍ /@lX!;}>*5dSp{ora?8V@xޝ5X+yWo>c](~0(W-bQ)KC&s?KDEZ^e=05k6$Z%hs(!@Vwwt G2҅jRHd에A W PNjs@cW9@5;!WOO! J!9;@&3֊`}Sc6@׼M,(ߌTFhJCxiNŹ\.r}~~> 6V&3<'s}% X,hį+;Lʻ쭫/3rKʂ?JW4@LE/2E:m-l")50*Fm֦Sz2%"Z'$"߃10tN}}}n|i>W5|>o"[$9 xȒ As!x}:-ˑ'e&8iiyC^'ߟ...F8t.]zk!9Xgd-1QC,H'`Q!u-fNz$#5=XڒD^[LyC}rX:6yzގe"hr9D=ȝnhD?TI&)Keו'緼 s}( r&z{ը\2U5eS~;eB핣nEja.ҁ -n𽃞["EaU+;Y[0!#Dh7]}IowY@t4x`2AjmHDDq(KRVsP(95}i[OM Cw^ֱ֌hU-SϷx*M͛i{{{:>>..._ArLBH2Yt?-w::/η%JMe3ܣGцA+׬mUa"c1|} Z]bVP'Y\ [Io7ۀ"EٴY7ܡVd*z{*6o-d.HJ}TY=1o`BRu'uBF bRu@NJїiwwwdy(Տdjsf+(51u{RBSY YLJ3@_Έ˫EzPW@w-F2r l+Sne=ed{Ơ ːEQ@'YY*7*NXlŖb0@s!YoDf֐^scWgr9@I @71;jYM swʹAOdM-'Qp dmgåXVk$,ݩ$F>Ǐ(a9 B\{eVw{f۷A./ܥ_ ,sWN{`(/oeʨ&ڇ{z27vfZI™cF8<] uuSy %@8v".m2W.0wE99{GP p|i2XYwB꬝*n9gl4$ @B|}~/@lY:lM.Ftl+O kb /h#UIqڈd<lƅh /)"V[B^`+fMm9gacG`dm>XLT= jd`!-Sc.G'O. cdz*8;NW{S:iYC% aΪ #BqJI[^ f8\LPV2% g3V:SJYh=Q}tzz:$ [Pli)z6WwyiJkF띗ь(&xf]h:&")R vw@FIKL777b‚hfn$a[L9m%k CB'dUus]ȖeܰVg6|t3g''uT-H)LL=j[Y \Z5:볠9Vxb.*:P* >?VϪ< E"d<镉 ȩζ`Eg=@}ޝYʺ36777CιJ.4)q~K:l/..I ` x#~h#?xe777kmeK2G \c0sϋگ [HW$ƚv&Qr2okl]e;_r%^u6uZ!ybUZ+#,Ȃ g\tv9oP!*ξ}bE?Z8} z"Z<kD;xlwδm˜ߧak[%rs~,N.?j^l}Ρ3Nbtqq1W%:$?yCCy"`s#@BR+6#O K"_~1ZM)ONݦ m3ӶU>pH禶oT%P+X$?GZDnk) BEВYa@n֐Fr?=,(y.`j ;=5JmߡyôV ; ^T)SNZpJv'$36ؿ8iwwwZqC$t*,o}༷gVv\sixA=?eΗ.pljs>~x~_= Auk IDAT{Zñ9%~+3N>~9m2KHS]F1oooG1)V)Q ~:t,,dhil.19fϞ=N^#hoίL&pX&TD T j[7w(Ȧ1 F+Crn W&1~z'yuu5L>|.//qL3hQqr||<-qJt_|>VÇdwXm/2r9?iizհ{߾}NNN;r%Ts6Vմ5O/^ȃJZ,8+AaHbrE@Pr೭SYCegg C,r Xʨj XQEꕅ< }6٨q@QL&vwwG(|=zfeE"xYTz&xO`].}~EKs@u3j;Tl/';AB\Zm\@v\Fk-.ŋ( j| f@xQm9C-Kde3N`2G tBA/ҋ l)gi:2}BSyTkYNa'rXLT2mPLrwjuAtp>dl"hQ #Lˢpll6"2֥e;ټNNNɻ8Ղ.~ÆqxJ _Ma mT6Z^ uӮ*h";-aP(GEYuRJ{wm"p1lSV&&UɩWYwrE{hv9p2`FKu S9)*S4 =ynˠ8I6v $!:dU@d #y"hS6~ZӼ6@\ο4RU]ֶp>~M{ —u<'VWXWnP[Gۡ`J;(svZA2>1(2giEov8s7ٯ:kۏa5d:B VR8J a qp/=SSFxx_uM´$-I@$l6Zz&%ѹէ֟߂LJV[S5F,sgڼksrc/(H SYfryy9\֣UDCo] j"tV똃MmPjp/h;T8iߗP:bc Ȇ%0 :gy>sѐ9\m?NNNFJ𧝪Ωs6Be CO{uH| OA@t___O / -zpp0?R$qӧ}b?2DȏS+{W%A@ݠL- uJ̣*Q-a! ohXt''tlEJRm7kaA˲B-«&ogW:J!"?fx`m% &p G+ &hf$b/gge"@Ev9-M%e;$[V#l8[!e;w .dX>>ݻwb]&/$:P :M,>4 fzAnFgʜiInTY+8r4ǨC3bՋ0pNL@  &#Vn֑ϨLums*@\DH·0\\\L'''kr̰ J\b1U?-DY,}[L?->*PgQv#*}9;dȯ MdeXL>|h~9Q.>C  I'Ox~^QӴU7pkWh@e*XZX#kXΐxd˲W_(KR&ЉA'"K݆t@3#È@EjD j vf j@iZdnE4\o9IlLf-ck-4yW߹5e뫽t#ts0V_dНu&I^m@Ga:R@;|&n?9@N.2X$B J(E3G,X`c@և92ųU궒 $I2U`ЕZGl U~NRyª/^0j}NCS[AJ|VE۝ѬeWѿj;Hюh@'MP"ae xe[NXZxFׯ_ZZYS*RrESq'OF0ShT$@عx]d,5'#r$| \QE@?"EYū-%+,2&j UoppZ'VD.k9!hW0 b0)N|#F:# R-&Pu‚k-odD,jK%/)S[RG*sV ]hpf;ܺ;jUj5pS4wR!*1G_XXD+tSV9;;;FH?w|̚p¤eA oɜl 3 i|&f:#FD Č:GRyY4`YrAMɒ8l PN[b|9ݲZvT@>}4ܐR8t_-g7b1b޼y3.??*c5θYmw{'h(Oۇgj`e8Hy<<2MUG&jlE=z4 /C&;wS3g+2Eed6Z(av~BΨLmJ"7iԇAVF z|IҔcmd~2SEb;taY #tC"㵦óE$)\e#%~9Ԉs ǺO_@ ӔS d|'@8oV*P@H6g̢qq1^d!YЭ6s[#Άڱ,"8$øjP6F$x%zk)t yl4MéGGGGr=l,Ki6{iV=,g>!^]]CĞ+ECCI JrƗa:LRBg^fִ =62>75[Y6e'}Y6u ,␵rת,~6W6:e0mBa!Ѽhc*dz<p>$\fÇA215F}q1%M10c`3dWC ze5;MÙ*#sP]w1/ȇ (hH#P/QC[5$dڎ~no(VU2TX jdU9t.]Asv?>RzV!j/Kq.//zp@βd碁LO&,'ª>,|>A|У4LK}D<gF @rT[i q*":˾i;9DGP^^9ܭM}m7e>]]]Mk8g*P& &roM_vDm>|8=jAvaAꏶg;;;/J.1_EO9$ iWP=bSxE"V=+s,24>cD2 Z iC<3\lWaFDe邛33ORؙ_~w Hd\&YV렺`K$fO*US,\$>r.͎vb+qK- m3* j՗Vbϯnj% ` J(p2j=ꃐ)jZ,\$u) qq_&cVy (q\W$ᔝ%/wF 4DLo޼Yc3WF˩c2d|`H#ӋĂU=fu/ _z.5NuRTFv ?k#:H@ApN82e EUwJbj@lMu#cU*q[AVy~J U0"{K ( e#5 Sga3U5lrlzœ"̾#" !"c U[DVAUa=Aǚ̙l{uKAa$\:sn2M 8@0A 2W`fx ;{ Y(ʎDQ5+ypVdl`W6aTg^04SڅbjI =۱PNgju'ެܳgƝXVc&19J(g/gr?;-JIy=_cU$zmNpr.-8==޼y3NQP(t*(5Wjl5*f#e&lF>2_, ЇMBY֮%7 -(6lݸuMǬG%r@୥2 OM(m= :Q?"'6;hSY5qxe_ r#!UTU$"B#|ٴ,?p@>|*S#Q1҃R&:,ϯ`qJlͻCC,p0딚:-IvM3e̞Ep,WCnAdZ: IbJ?]O#qkS: sF "PL.rP6ALeZ=84&&} vYz/vZ }iMH a\[H1A&} xШjsU[E8t{]`;?%fȣ\_~L3Ab|:<œ9wT\z0i`6Mq gh ?(Cu k8XUJ]F@|>_ T8a4yNJ`0eR~_0Yt|VYa9jH8mqj= ؎t kp=+%>Y+ 0>Cg&L SXA j6jLD;k$Dh=pT}tdt9rw||<(֭SdM%VلI^G|BԡH_feݟ `Q7P%WRRS*,8b-C*|3j]ۢW1_" $Pc; NE6Xf˂wlZ.Ej.ޫ iL(B$0휳ΆV @*vdm5 LY_Kmdyii:2K^"A}v\f5*HPDHRJ{0EAH]e*m(Ul>AWȤ"2 Ufـm4}rues.|ٻKL:jkmEVUhh!3I ahZUZ!ԡ}37r!`ީ?Л7o$`EП͈d}kͬAI[/dt'?gzww72qf`s =m,m\Ibt 2@ZӧQCNj @T {+lļ@:a|."w=8: w6FPgҋ+`+X,F.^)}Fe?;+˜l*p J2"s!N߫ UFj{TKml—/_|>QϺMd&>Ep۷ijEjцvQ C22;{'hIJ#:`\6R{H!.PF#fl6Etxx8f5vm[@/YRL3܉εm=#h39Fr B~D#ֲݥ_!WWW)S^bvzܷodL#VynXwM^gt|ׯQ\,XPY#V˱6[f[hϙEX??asvSZzXr9b.=`bwU+qr6MaO:Gl5VB|3F^4QT'"RpRH/ 0j2o2qډ'HepeDԅ7ZlI,v`MdU ϴ~cg]A%*!xxo(R LRNC.de)4/|dm2kh@v(bY\dpEQ9T3k;#YС#_wWEeX27u>p '26$O7c.,a=W0%O+gLVj] 'wJ&y8uj9/;bdY ](GGG7RPf ×qFH@Ǖtyۇ:M?y:??_Ç +%k=.u:WTᱵ~xNU#B*CGڙ~?0,٭e8#H㥐_8X\"ICRWҟmą됃B A.OT@%Qf뽜iLIݕg質[R9dn#7| g IDATbB?QKM^VkY19iu;\޹va|NUddAp5ʬ%i<7S,QA@o8 z+i1)cH+evq!@ؠ;!'PZod7iMWg'fڦ:w%>uW^@j\JH"RwexW :3:qe߾};=D?~L_!Q%;%1 N5f;"-PコS@.VwK#kO1J}v{q0:6L?v/G$sŋ3LJ?$AG"h Knx)MvTZx/~{{;u (BJupW;g\ xJ# Bл `s>W4f;>18'Jж3O#+C$L;je/AH$UΩrEՐf)"SmtdE2:ɓ'kҁl#svKZb\w ^Nך/Jߙe2 F &̢Uc:qW٪ELb"@?k`-Zx,8.%dD9 fCR)6r\kSsKvtfxGL$ѣig s!)=Q?wy˞WΥY  %V>YG智Gka(}_2cˁv8JU82gLQ&h呍 d_ h|)WG]7gu}A, O.8Zr:wwwxV=qu(gQL媔>o߾զ027>O9AknooG-S v?r1Kg=|p^dFaٺVu!N' @e8nwu%b;os Ft1mpᄍH@5xS6EYpF C8S5~ӛ7ocKG`Q߿P,ִ _g"Р VxcV(AgE֕r+sTIGlm]r9Z폿~KVJl PSőPfBt9T3 zcMk_~YCld,W{p;Wlheb~S"D.S ELDֹ6Ms< n-Jd-\u~I+CEecb(KPm~hdD-zFuOHKM}q}{ +¤6^0-dGyF*u(7l@Jd~<>>:.-„k`_V(@@#hu[@Á~5`z'Lw7R9t j?ۺsǵ3]c Â<@ Z7 E MJ~U9JKT0)-kՖ]+ zM%A<܀sF,mmz{{رK*Y9#U("d;lE@PH\-a ZdHڷ_TQ+탃f]m-҆֔qI1 Ԧʲ;T8qF^P`s`(*i7RoCyn֥lA߾}^z֞C[d\zFK/9[.05PLO0(Ҁv_@J@6ہԾMUc#ߔPSW%%j b߲@% 7%p;,~eD6vYO31>vI"npL4]A`$mC@P|2fAcS8fBߔ,} c"/d-OK\uQv0ľSXۭZ h;AqM9[_PiUڑܵ}P9狋~AMa[{[5@kC<ԿcQO(土ٔ|y:99%)]O5jwww3~xx8}'''K=2/f1ZIʱsJ2ƹ}e.xR4QiH YyGY 's(fRԯl(T!c `@DV2}ŹXJ^]] PȨgkꄑh\Iև8Mi@E*U{?)?΋3E)T'bx+4ԉz^ﲽ9ΉlܴvY=np`[6~mHsʰ els[ȁƬSzA u0V7_]dM>k% !_șꔲUٶKv*` W0j5Zl6ǮJڡ!Ӓ ǵz噰j.lskZ 0GA5CMR_IwP5^p6DAL=~lӸ$Dg`(믰r"(~ο4@;)}uV-RU_^k^mnq?16U 3];PV. l$9}7M{OJ86Rɗ]Cd-{eЎdSLS+-MqV`dXX!HZƩdOu͹oJtv_w6[ԯ,X@^\9;}X+xV*~TOIJ批]ڳ̵&a+ ,d҈wU<+|3v| ֿ F W9Zv8NQU_+&,`ߺ/9:2F3I=4 ` X ƶ v׬*<v&U;88p0?{e·`cvFJ(QicGjRƞ:==1۷oGIªVjįH!-Ѐ탃3pq/K8ZkkVDxGxBDꪚeNW[L4j*YzCo?j>fpHKYy+E0wV*쿚HQ]4^eZ# SquKמz" ng,p}oZɀ";<@/Z&* p=u1W"R0ۿV ,FI, mW`WbU"(j: Z7҃1sx7.Iw5(a"Dq@djv9$bmV# ~9NYwjsfF"YSs@) q fٲOS!:IԦ+ݑ3$dsJ j;Kbwn(ÇϰHk67yWMG622!%`LX]g{}ڹ}a@IhzC*4!rfQ*hDu9AϹZF//BLл Im( E "&n!A,K rw"7364{4SھZONӟeNM0P`qT8c*3p2J†V@pbzSϩL a*KP;vBۥ<\b)2 4{\- mȈ wwwCByu|yy֢vzz:}q_2]\\_ қiٻ7JXp,[0$8HEq\;du9+g@{~^~Os %kwzֹ. Fn-tXOC;88[ IG":@͙ a@ȣv@60kq<||6 3gd7oތ(K C- Y7j L3p2'?~z b1^zwrr2OKO@ `iﭷ$A;-sHk(P>C 2j5bnoo&Uݍdsgk -p{{;-!RX]{geZ@Y8iV\ϩVݖa(p]quu5Z;XY&Sg $x,1W#2HH4piDCYQk(#{P!]l>Q5/hGI  ,(VTϑu*+@aй@}ss6,\'F6d o=}Ρ ag}D XF6(X"h Q.BOIaT.9uYD(Afqk/;::_e^~ajg;&佺l_?88t3Jֶj О; oӴfi_DYMٚC FheOe(;-9>vtY!H!0\׺w txx&*%F*)=BF0ӧv7ď?c}ElsނkNj {`9E蘲l6bO>$X>C Vm@xe[ Pwww*!j-$b`fϡE܄#8 $/c0EhxGy)?"]!r302}#11h2,.H!TكAv%*׃E2 ٪.䄑0BP⩙CB6!BP&_B6 UOS >{u87a`\ACHG0hʀkZA"pܕY9K-apЫUt/g1C [d ٍw﫦Ω(_9D*`Y!_J{9NeZbYe]#ni?" A]M`G>~8f@ W[r>P z R@-/S₾Nlf{8N^x1 fd};ϟ??%.-#έɕ́{9Q *!50H 6ȝE p< k;g g&sU6ĝ0D58 dΒ%Gu =`9" ꮵu\ *(S\yq6gZQ 2:8Q\r'C˗˗ӗ/_,mv\ˆ,ˑI de"y*~!P'Cײy'wFKׯ_i6`/(dCW$~ :@Fp'4jX `vX%AY+2㞕e} %q+E"TA.CDbKup`YxARbdDw%SJ\ԩҁ-ޏm5YKiD$ ;Gqb Eq aU,T)FP{ad?"LsVa!r u;c ,Ȯ“ L];WC9\.8]Z}goL$>njQ4Cvz?uYRݜ"Q<5ߠ7(r_Z 0˪wF~Q&P%#e_ulim AYCoLHD`u)lʎԕrK E8z?Πj%:gg= gluT \ 2 (㮀Z&ztt4Va[ZZ nh,qg&"uLU[]p>WOҸnAY,>i>9Ke'}m:99%ٸ@Ş47+ߜG9EHjY'dS,> |8n>řz rq8~ CkG{`ծ&z+MV FFυ>>no(T5vD,{VbE~9+V\.oߎ3|R“3?Xm} sY{ִX,j5s#G!FavNwN^0>82S^X [(u6mR}LN@ /rTɽlÇ jZM|m.sϏ5/^~pkxx8-T1 |p||< ]綟 TzGbryWZMLkp%tv qgȣ!V[[[c@&<% 6%E2Yvff2QɃNb|~0?1@ rW,QCґd&TΎ&իNWsd"te{|YJu,FI~aRh$<|pdژɲɎی~1=xmr⇾a-#֣=}a CQ$Gpȡdא;'*"fE2#ٻlD59P5Yo?:*aJo߾ύDuzz:jwvR Dli1%dvڊ_EBbS&Tߠ@o߾ x`9s ndˑ+mVojnӧiX *76FYmT&;UEMyJk#RcP. 'HFk5Gۇ!.ѽNSɕ03w9M.9rLUQGUѣGjW7QyfNgae&l @*6GFk]t_ʀo 8A?u#=u],ĖG[T qIpR5Jz:곝=/t laq:,tlºu #@+%ê Q7HD =WV&,=}t5{:/5Wg:|JJR@X𵿯 =eX::CkKjݲ*gDTf]F4Si8f ɺDJ2gPK B ٤ƛ#<̰:H\p-)`ĈqɈ42rp;ZEh^-t Bs@+j jp\H]l{JM;öXSM,#x}}=u樮qO΅ӻɸF#P :Cv$RWPaT.d('˄w,x9rC' A$ƫ`E1<{{;*q JDZzfwDAHmY! xM˦33bԪJ!YЂ}?9&o9G*'[ i>Or:::B1;{=߆R@=S j5 %ҨkHje9e?bE x+Dd!-$ es &~mH2ϻQt3'0*cn$)øm1h棚RMS2hEL>t{ Hy bIWRcq26ڱtC8cH@Im^ V]o{o6h`1tN V<" n9mX̙QR}],@>WrSD! J"%,4*S8`hWN)Y+l>VoњU >V0FRaFV7wB%O"؇H|=-oC]p{#X A稬 a'ȒVl3qHZiS", :B[[[l6޼y32n#C@˵JJbE"DXýؕʆ|q:===z4TZɓ1.*+B87$f9¯;ڱ&_~S]ƥ tQw{eSYc u/Y=fNB Tq * ϒ*@ a,vYQiO^{e!em;~ιȝs未f#@_vƊltJv x75;H|v*Y1ΘޗUj&BRKЫ't-eΫj9A5X˗pՒr;"d*ZFāCC zj?\$;Jt%?%_~&lGCKjtuu59d:sypÇG@(adP[npuRkN ܩH2jQwBn# tT!g:XdžݻU٬/7 _4[<*.s-ʸJ_ J݇ zve3ۘIʒկ*1]-p =l+k[smk0{LFAOg>ZuuqPyg?~{!:K2tv3j5b'T%0Ќ}.Ce1ލ_F V{JG:#էÇ&*h[Tger*Gi Xl޷a((eA pа A=rC|j5M4F 2AZKb #hwȽק\?M(N2GT`(ɺVGɓ3AI$k Wf~[-Sd@8LYYtі ׈ ՝N@$u 8~L:ɎV35p`$;? ZXPlT=8"'N.4PLEfY(s{{;3!]7E%rs,@ S2;UFz4LS-CC`̐ZȌ" uK(Yxl5bP8Ʊ0g0q`vݭcdYݻw˗/G F9u.lYdA Vꜵ/;\!ٳg#cĐ`Ir Jyl#nOi[ }oZϟ?b1NzjPXؼusg6w򗿌@jJʀ7}2QQ`UҚ=7l̳s@ZD5m' f:Tv:==#؝H[ {eֵa>g6/Rٲ*&kv'Bi쒴s98oR&iriA_SA 8݈|D6{ը8ўA5! [,۾7NDeL*}D\*Et#p)jT !1"n(VYLcȃ͑RCP[.9#1ֲcqzTGM+哲pRAjgZy9nBi?k#hx.$dB`NEdA`שUHoM(hI; l/ :X6J ;_~HF[~>`>ĩz(siWP+%0szj2?wÇY5,frieE573OW+#)tPLZ1u"s0z{{;o 蝡ˑ|믿`"f8Ju~e2Ԫ0:Ԗ5 x-N@VO[w= P.)E[_Ft-}g>IF,( GZSCD3!eh sh>OVݎu͹ƐM֬Gp68)X3dsFrHhl. ^<_󱵵5V(PUd>;7?s`>Q_ftqq1DHh*[BA%bݕN:OCl;w+PDI0 AE^:|E"|yWeǏg(FJ:)m:* &pww7~ajrj9:!0LȥE[mV;`HA9_<q͚Jٳavj!Tˁv+p"q| ?`W/+vªΏgAÇ!TZ!TAF.UUJbۻ,VWcl˦Ξ ɈweL;׶ӷV'3-_yҰ:y@Pbf_&ԃ0A#B=T0pwY6TJKٲ u#2$_s-N$JQii2 МhUEVQ {Qnw6n^`gФBP @ +w.z^ʄլ˫WF2f!zWBld)cH[AF:<<jKo߾OQ*`SrePwJ߂]Rb됲@2Ph}[!tJD} n״DKbnAPj5溻[!@#`Q~D %cvK+[wUg9Ւs57ӂPs_}iNHe-) Io?yLtW,9xA3@S˹J}Lp@.,E kp.H g]ȥ DՌQjܬuy;P;'8ֵ@7(*Cf԰˸Е4pF< :ϪVYC!N(|\SG1MY+@N,p;LT믿Nנ#k#A(*VFͺAP҇qloo b{{{8dW?~ >'E1R\__OldL٧ =.pyQ9#}L=1t!7|Y@M7R,\Tȴ&u".|MVvGڴY@> I7yC8=D&ԯ!=D$qF|>$0:CwYgpq(3KڟV-޾.e 58!@Dn iDaNPa\]ZEygR:ΫDόy %\:\uz2❧g @2W0IQPFAȜ:+G B' @UbeE_ Ր}Q*ںfIn<4dΠ֩Q) qArP{Cv2N$VIS~,2YO5\жA+qXU9DÞ  Jְtd @Z8N'+פl\,_s,ze ƞGGIN0-Sd c8LHƻ 8i>O^_}JP(~t(e$j'A4uI6w#i[o"ޖ8VGe_?=ztFQm:CLȑ ːdB_ t4*ԠTـ;!@l ue W)Fvڲ˺e༊TT1鸻;kFsc]žSL&)dYڀHAe9a{d|׋/3d֨]8}뿫${"CT>Eff'~`{ svxYϫ;=PE+j]]!Frj̲ώFTvX ǰxt`S 值HZ唝i$hQ!/Ff%XT&0oϘd}Rb1S&+AStI9Z.W,#C)E41i{A a+…D趯T ?YXݰY)'ȔoooǗ>~x0 #lèwf/ thf2\u9@!1LKg/S8D,|P;֟-s9ƄJY5+ٹ?NۚN cͬNnQё z oVXHM&ӥ ##bB:vϞ=2YA#'+-5xVrc8ֽ %` pۀ#0V2"H;> ѽ\{׿Hw`A߂B({؁8p3rzhp |,I=-|Xr֭,_ԌQ][f .w9–”d\'Oz=NC L3`wA1Ts@:)lggg:??_Nkp?dLsAv7SAǏ&-+ (TԞD"1jD/5#@>*sZ$]U+,ޗ/_^MAлdaY"" u% .U0g>l#?rԐ9&F {D["U 2DMuZa8jn.{{^I+JN[1:_{gNV%2&ar6H?8mɂ82OH"y2 C}~S dZ:O+ FrV6:XߤG7D~ezݻr΁777C˹(Iɓ'r|ׂquH,g|tET\ %1ga!| sx΋;|FZ ѡaAC jԟ>}nD\=ҡN}!E26g]$`mý@@TJgonձW[?)|U283###(s-$ؠJey,^5wd8jj`ʼn@p ;D%NED~P2gV$/Sx>9958l GCuX/oS2yeoՂ9:ҫznlc]fACnO>|0y:&&Lw|ф|VW_Vo_HS%qfNԏ^=J$Au=l{q`F)Yʖ:q AُL eV ;*@"3jP宺[UhUX֟#*YhΫB)~^|&*KMWPvԗ;>P$8E*`XDA5yAWk=nLoԣ8kΉ)l_'2:{-˔ /C3 iw(ֶsZ|>yfh<{lݝYG9 "xOƥRmk Lٰ/`PCtf$VMA1cj\o:r `uL/!%y:@2_D@p,ArȬP}b@ߦƳX,q|'`rFtt Um@*tyy9pl@?>w5|e&raw?/-g e{#C&f~ב-n9oommѭ*m[ipw.tkmu  #Ph!`pEetGGpȪjJ: PGrH]4[d@?^ȆP?),fH"A$PNmUڬˬ2K)1H .?+;ڪ+S}ULPג'c Th4'Us~nJwSܦoRPJc~4A7E. aW2itq22ih6йpR<˙ʱLb[Q μkuuVC>TLGLU1&"ݪy&:lszyy@KWWWcb@3cn \4Ҫ4[&M駟ƜKx>z/7덦82K^z"q\X{@~эqCgtyf169&mN[fL)dTqr){]Csc;_bEm$iè=U0p-63kkkUeJdb'}YHAtS"x*&@\ m߬/NOO+hNJ۹zYIA..`9(;ܕP(L\MxNQe NGGG5۪ w2!rd>0 {{$}n噤%9: d2RI ȠVn@| D<>.񚞮g$ΰZ^phxt[[[%OϚ6 tz?xẊ%)r].\:==]/xcSq^,y.ofqqCq̇lU J%1zD_$t{Sta /52mNpzo1CETI:.poK$`0Vd A㐤W(BH4P>'J6 =bR؄D$ha '}yURRy4ٍ3l]<=?&7i΢jϊ:wP}7 .J xxxJqf#tr_p{oF0INqviu(zV*$H435jr}}E''[ N@)ܓTdrmel%Tm5)6nesߣ(T%T\Y ruK>U @\}̢I'ӎ(A`EP9>w.x 73A{qI0999iSSSmwwxAO+4<. e$h0YzIaEYJu'(h}8FQCJ<4`"( UK:w CUtDA.cP~r[: #jK~5鱩TUGzhXINΕvq.v/s9m$}V egPҝE1ZYY^NU'Kg|s;X\`vY\*sй`r(AE jc[u@8M1hyQ`8>- %Qu?}4FX1xQGvaF7Uk(bZ6X q_ݻH֍\ mkku*Nb`0(#}V,%9 nߢʼ\D.cxY_U6Z+sUC Wr܅3QZGheiV>':Qͦ{ E7%u*xiX!{I@υ## 0J䌳G+`L )$I;d`UEQ#31I=fG'}vU=Z0)pU qx96'(/3V\S"rh P.Qi}Gicj?0;鿞i=`k0ԈŹւ1g'}%vuuU'(IȞEK9(D9PSz[Bҩw^t_VDEN<*ϐUՙ O!)V }:Z [n1W Th%UJQxU?#3VNSR4zfgGd'Ti*4Zt:r cKوzXΉ/ْ,CwP`v7U4'|k* Ld#rQ >C-IcMѠ#sd͒w6YwpWVVjU+KIWLJA}D1,Dъ@3`Әr/ɌmBD4ʿT=W;]ag:O⊕g8RZc /..Ƭͨ :Iڎ΃t tTX10'Vgj\L*hr T^N/^R0ַf+i޼ySC`b4G@);*Fg"4!:;s(~e2Z҄[{(:W͡TOn+іA;*[笴&"hSL'g*iAȹqEA`ʩiHѾ|U@^1d; ׯc;|k?$;8oxn]ɒ9*(znBg?0BqY" *T@T%,y I~X}oq X]M [@-}䈥{R{LN;>>.2Ul{̹6sfee %*Éb$R[{Riw^R zyOiT6jT PECp[ s٫a1g@9Dʄ(ٟ~dNڧSH6.S F|0 .Hr(^ɻYO&9\-zOQY༤wur={ ҏZ+z,2B/g=k3*3 XULiI 0Wi g1S[h.):;@wrchAH^@Kg^˗/c­͛U`[ 2Jp xNywF1"&"’獔6==J/k`T/W-jKxp51p.Lp߱ơr{&ETC߿ i"rqi!Bsz(_IO"ҵ*#Qu&GzY~rTLss|A sT9eT"I{.'XKSo0p8,zsn }*90N{^LFH:Txiuqsglt lѨ4NAxy2}{w1&Is Hnqco9ksw'ađ3ϩNC;<<k]V l ?>5VTy6yPPt}`r$.իWci$%3qߺn%2,AUssSk)TJ`$} Ђ 4zzP{ ⢾pB (%@#<*eS}۞+0 3kR* 9r*Y w۽sT=3N `(1޸K?|vuLj }OJgl+x c7cU2: /iU&.,D^zƂ| U]`؋ۦ( /^MJ޹ T62U"vk I& u4MX6x>}j/^Gi\g{r;z{(ٜc229uUc!ig@?\.bt/{Q[b(],..XP r3ZG*49STF# ,s9UJ%>WęTiyf\AbYnI46y]B&RwݱZs (ύXO3qu}/ úormfXO. vbffz=W:CL@CwwwW;766sWrY2wzIk`gmgϞ4} ÅJ dgR@QVRE]Zf^/^V) \{4Դg 1IT&=M{(8hQ.'4+&E ?w*=?2j%=S>$TnU9ON@D5a9f%/RݹJ-gs\,+i(t@=<gW%g w8(IŮ yX vˢf{ &EG=|\-R%A*#B;C*J!wɃmDdB$ l}u?ě͹V0ުKwز{M:EsSs`0h[[[eש*gV(}$*vF1+V=hP&1Z LW.] NSS"N51@I6]6y4q+YѶQ9PH;w6t Y@{բUIxܱT.kUd[` *Rp NIVzRA'^e䡯|Fs׌x@COPӞ0 _(L9}zKɝ4뽦IիKDy `gXje׳6+xvDm9|ճT]eNmEi%NCE=rfyC0sܧ&.P,ٷ J',`( Tuz-.錅~/]_?q_s͘e-(aj_{w6)0F4Nz$"ʩoٗ/_ԹO3ƨ=TZ䌻4P5bP櫫ZQ`F wŬ`~ aWWWvF?4-AU/_ևdِJq_s5 540Rl$S|"*䒒_馪 zDfRT(B )t9LjIwHΡJDp\GK&~%czӨf<cT {)7c}?Ս闢-LF̤gdsܜ1$]R} iEH\CŖ uj, ]zk@&gzzV BwGUFtC JP5Mm Y IDAT9I $l`-!w:vuuU+;pXڈD#=L}'2zUOLOe 0`@ࠝU4kaTIN9!Hc677ۯZ Uwwwu /"ȪԛHdfxm^=tkk$ m驽~z4=1QQgjUiۋFaIbju1O2C{U#F3=`CP ˗u p+?Qyd3swү֟%]p4]@ *LО5WeU+TҊO=2IeT( }(ЁKk FCJ4Vƥ*|%0*sԶ*D0!1 p "KlwiRA@8=OI14݁jc $kq*'$4斀 ֔vɕUl Q#B kR QJ*߷o S./--y:Hs '7@ QpcY3.I Tt yFZJy.e pbaa-jz^YpY`P=:\b@axίB(0WWW+y:CޓힹԞh]9/H1.H #w[Kx%z?c-T~U#F @_~z{~F~x9筭չƌsWg)΍P|AX8Z[]]7cDj~uubw bH8;;;u^NOOEzgF8}~4VRB.OKwS+ls\0)~xx?K7y▖J䷼g8,H*\TjZP:XUy[:M U #DiNNN̽s# @D} ΠY =JJϑ^]gʥIp=^pP$Ѐ T9Vơlҳ a Ahs|(.A[,9?z__8 3~V ϟ0_ǗlP":IZ*DAaZԑ鞟罦MIstsw4Μ)(8yީ^˸\P q6]$=:N V/B{g:;fԖ('- UX!>yW5 ;;;UX?2[\}?Ϸ15%1 fa#Z#S,b2zn擠s u>m evUxb1Foy@jbNX (t%1\ɗ \5g6OdRܔ4Js9DžtKj)%4 #8BW-;ɣ VȠIN!7ӧOwOeNushdE\C0Y'ikQ܃~EbFnTj``D/V .w٧AӤQɞ%FUu!տNբqUvdn]>Q*}ybL ww #w~U3i!Ɩ;ֹFE sN kLb23cb#ϟ~_W}zr~^;>>"{ӟ=B1 @HCe| P ټެ{HF6MH T.r.!B[KR !gjID4WBV9'p.P|E5 B$&)i]c3|psĀ#INj~ro(j9 `%rW;@9A`O|&}$xmnṋE.+jJCߜ)whh98S&9l@onnVpͱ9" X_$47ƌdr*;us)N}vEJ5*(L9F*G$Y2g6m766AgKX 8 ;b@-3R"Z.xMlc/~JL0nH \;;;߿W+%(ֻNV#Y}9`ia1OΓ<}]f@CU \ r ~t " = 8)猢z*L@cnwE٠=Q+u>4C?OHeD4`%(xF~̷gN#]F)p_z59ss*)soZ%f`9*g#JJfO!4[̴?Ve>Wc"\s7TO$!}OOOks՟ O)Q a-_Fwr)tJ/mE4n?~oofjju;L8Kك?:✁ְJZkY#t9>1%JG Y?Sqa Hf\޲J|D̚3ùkvrr:NiA@I"8*|.K*8@1ɓ7L;3 FݩOqֻn{Y %@r}sۦb"J_>tC^syx$\=t,J]ZȿK/n]=x5-Hd3vQϨvW_rQIfQB*p(d PU| Esq~"jFvrrRHB)S<΃dZOJ;hG3$ˍN ZT)K"3h޽{W}`AMB|TD.8 *` %'窝/_P‘(iss] ϟ?o+++UqL[CU[ڌʆ͵x̋ "Q-//w|(}z&4wf=_!\) C///Օ7jmTEfY%; XTjK!T:b(KdqsZݪQFaCB;@&@oI'pU^\$$R虫L] 1"GPxΏy?c&IW2?hrv+6ƶl)f(a>Ǟ!UlzFsɦd# N9Jܒ iSLDCY͛A_ xc 35}r@cF$8]{iٳ˙]KR7KbP{aHNB '$U ֔>m<`IPye4=cU@ kH39&[ӱyTJ'ܟA I4Tiy)S`rBQh@KיP ֆ2ks/6%[!\)PN!ZA4T[,gǗ۝=̂b:L*\`5G u#;)L+'Gхq״nTvS\bCr]^U ˙ҵ.0𞞞nǥH@E^4 _V -#(\y3ͶZ+0pɇ8U]A]2oҮryymV:SpNe_ F.& H *mC~(PCґDOVf2t}1]?~)eq}}1+zT{T1-"nYf0ysFI٬b'ONr˥V|;;2{I3Z՛1 j۟4<$w޵B깚]"b(n\SA!K^f,52@oJ`-.I^H KF$T';&I`6+JUAyLȝ A,yHP ,ZHw07DIƖiHĞtz5Yk[0rp666i܎%M `Ә" Ch*>qLCƝ!P֋E<< ; ї.||3"Y^^."Kou Z sQ ;%}ô"LTFl4y5K9240Jd0nrMIUL eQ~W'!a6Ŷ wL8Б&2%%õL?~`Lt::ɜI|ŪثGQ.ދyӪLƓ~_~;ǗBhoo3_??cHY%or e;Ϸ8 ArmǕЬ,-/5h9k%(}i4ϠSm%dhuz\,""rt~܋M;=C^ϟ?ЎDdl@"Di9;;[UǢ\ KƄ9j7:B\50!,$PTzϟ6QItӼ%wϫvǘ:LI?pFĎXw`4*<ҲԿO%b"U@ڻ,G+=.T{fInjJgϞ-P4ncHL+#KnB9 =W ֻw % 6qX"0ryr&jnUޖuS" 7Y*d"' " ̳%x}n q(` *ՙ6 666;;P>@g;m@ ^*HRr$#4iyDb&׹7,K'σ>Sޤ~ʷoƨrإsـAOTv TQ<==~s(]urTnooAm*!] ,-,,TP3ʣ@K9y/ٗ͹rBE%n[Tz/D1D}d ^|h0Qk(Sq,X~e< gMxFwonn`P 3y־ zDxש@:Th\!dWUq4U@̲=@^,1i~]^s?+WUk!m{u=i8c 0- _TA sejKaր:kB٩X]._ A?yb):gs)͉wmrޟ30???NOO 4Fo.Y]]mfJgf,_e?^4aQLtW]cEa$P4c;88K m; {,=X%,4$Jyxx(5/zz6ԩ. ?#Z9lw&B1gd}/,i<*ԩvvvV8<(1jf:휇&qT ԥN¢H>W~OH:,B*ojĚ=Ie7tuuUV\0Ci\O*hT-%___ݤls4P$oszU/Ceh4trٻ":R`gOV}`ȸTC%}IϧSЦ_ 1ܸAv9  d e=WVVJg}EJZ{zzj? R! l{U mqq z~3335L7Mނ%5Ւ%_-4-ǃ_=໻?VŜwu~TN:gKP1I䌶y`*XXrjIW WO&oookP:GX?zAS@HŭZ@...^?bt#*Pb0rV:+AFVq%MdL z-I)B˱] P>sz sl{{{dlnTCz;Ǩ ]\qj &UeyӜP9vI'Ϩ* r&Je.rs LY>^"W$TgϪ@OH澽sͲxwZe璳襳L `FD#eHzȿ~`RX Z;;;rX k X bwO-^o{gg?̄CIlnkh\]]Ո] ZMIʹaꪽy9TGLF߷0{_zVVV;hzmO⸡^4' 4_wT6h4;S- VBn9==jJEt0je4$MP씌@%Oj#Lz\3zIp$Q0YT1z<'EZ IDAT^8pbKZ~WL-<^>iή&˗$,g% *A3{";SX~gn졡}VNdLiIܝNns*ׂfP8ù VQcYT)H3)[]2br⛂5s*v@wN52G  !Y$tR)ݕ@QF>}jڑA T)vC'BXe4NSsg3$z#k@Wc<7+d=O~d,ɶ3Q`THZ|Ϥhm˻J-]= 4GТ ܢCsR!!ǤAɦQc,v ӊ1f2;m{agTy~@$)PT;1&U~Dn% ;r$Yt,^%o+Ԓ"UM@u D]Lg81ړKRCvqΈD[R-ЪLPB[)2MH&%[ 2B[d3hg{>lOCm|sTI j@uKmC)KhԶjL̞"nsb%`9Pf`%OQ+ S916'ΥnC R\pހ,-4 &;IbqhߴjG؆>sG@βo@ϡg[7у뱗C4 tmz 9{A3yqqDR2D]^. n( )eKf\ W>`%=<  jϟ?z}}-4Q>1 h1!?I -w wA=z6-4Uf.6GtUq(܋IHC $f_ӌABJu7qөB9C./o @ky:W www˕z8OCpvrvsr%7rlNN TmCXN@5v`0Er{{޼yS.YiSeN,NHwͱL \wSI*y}GQ"6׋Zsx;Oy֮5zssӺn #d0ؿU?$S!kkkXkqkt`qwtRG`󴠀hyINn˞?'- 5c[@ _UUq]:H帓˴FVǃp9NCwS F@h(-m .rrXF tqR {OuCIۃy@qUִ=Ggr$DU4/j*` r!]v \{c`XDmb|ݻw*k@I} sA|Vdgp0pfTURsonnJ?BnIS!ڪ 1^,3 V0U$A 5{zOY (]QleI_t:h*qD;#AEa279J⢘kn[ѷ(K]M!^# *ڿ`z^]9!{mq;Uk4yf𳼼NOO+?V9t3!Q<_=u}ct-R<x+Qy}X¤.= CAYZzFV{ڇ.RJHu t{M?EvysVQ/()S⪈'=*J< *Zkd3rBD9Y!RY$>>Aμ$=dY?Jf=9 * l]pN;M/ls܄M1Ptgp8,Eݣɵ{o޼ik_.Ckv޾}~˶XfBBl૭z^52@@e&^P9h[c惝5Uvө 0NOO+{vۗ/_?0&TǥA ilGTXR,UF&8ג97i.XWir0:/if}A֐^/qgD@M\b-4&QeQ!QP 9DAD+6Uׁ= ,% z޽C,IX.Esf&NR ʥL |l|~h4C_#'JQCIf5]̦p.[cz!ٟo{U*y%H3a4X4N}[ :%Su~B>4 T]؅㚽t^6u;.<>>} m A[eI鶴NNN NOO`06.F\RQ/XJS"[YY)C2w(~py/|g93=3^xbxNo׿ ê)Hgo:Njz^FzXI[`5}GԀ"[a: Mo~~O#L6$ l 2@5$Qj9&ΘӪ$f~/۷r:P7w]YY)H[.-S5zN)"zm6>#> @&G^xѶjF7FF!N=H. ixvxxX{A%bUtCYTt];88M[gp0@)U}; 'AK=0[gTJΪvUgKkr!wwVY(2q]`|'`fD.PYE4l@$YU/U+1JTqpr ?k?S uDb'*up3]]]m&DLC %L. Z*Чrz3b1Gј~$^WF$~gm(7XcQ 53fSiCJoJekS.LMMBnzn_4?Z4/᠝H9|P#{p )B%)x@Ap "$DEwDjWߣb+ TSn1}z# fww :/Q&ts<::*nN,a}7JEKS2&TLhy`~BcnVF1099y.9􁋤t|_U?3Hs}zzj{{{h,IhPѪuUvZnllԼ}IcAQ( yM% UXճ^>m߹S큆 z͜إhnoo&LT)/մ ?~U 3YYp-wvʼnK~-,, $oqF{ A;%sz^q&btrX&SpssS rg՝\9oaOⷻb0N}򥀶4^e&X;%bUPQzJ1zVHc^K4^٧XAuFv0 V5(|w){D]IM9PƥdY1ː $YS _4W( \]F .nJjT)׳*u:qppPIO@-wɪLWjYI㳿_A-/g;fGh4oT,`0C)jBm#VP34i^*QhkN'k%A=ec#0iN#xy;999iI."33w8RmdW@xggL2צ0Ӡar#50L`\rAr@{Դق|ÇGaAE;1gP:HС@vaa﷏?]__n;m{{sRZ^A w  u ,(B+-*A1PlaA~px*iI3`o.E۷o˽eFK i muu*N:w˗vppPw4kI#qDe(RRA*45Ʌi%>뵣z9Ss촓 Q|\L˹buffz~~y3 F7)V{K:Vy;!`Rr+:OlrԻd:Buݢ԰:}ˋ"$T!,kd\%1KLЃ<&y(1UP`XTN(pYvӄ$.MJ&6\:TQU ΊO>5l:sQhx {VNfgx}ǤollzTyPhݻrOOO[ө4vSgyeh4D`zݻ0lr>A`cP3% AJSψ_. !H!fgg lnn19KGr% :@Wf1J8] i%IyZj쬒LXwLbUxON brGyI:# \>vXs 5{)J0=$=\!ң"Vrsgunḓ{,#٣uֱ mooo@Du{DK]JC'JF7$8TbrYǻwED+q00<?G՛&=sgzc\u%gdҌ]tZdEϐgXhFSSSmK.36}62l! Ւp;N)Ł͛믿V|P ///[ۭ61$P%|cuuFl(mkkc՞={>|P ©b-Yb!YJ℻ mm㣧k$Mqڎ dY`ɉN[ojj,,,.=v%b zBYn4h `zB͒8% \gggE8\Q>?b'jlF#[Jf"ĠײݤIxiKyQ 2騄Tx,YG}b,$J=N`'Ɩ:  {X IDA*ԡ ...g(WM8OƵAٖ,C5z>>ʫ"*xKI[Y- m4Q5wnoo뱖J/Jx;r6}QW+ַ*I[Fc>掽z3g/-- (}GKMb!³$vr/sNdۭJoom8VOy0߿D.Z6)k;;; 5 N?n 1ɐQk? i?nEyniv9n'~='Vĉ gffn\K NNTJ%᧧] bF7~ !TUE=88;a@^V!rcGDEYFf_%d@M{qciiii <TRrS~嶼\AEê;|LO/L.VyzixvuuU+tԭO·ɷa=+nV.GY{ӌ`UU~_ :8l듌VWWz~^3֪F XZZK+pPcB,]X^^d#g}dY &w:nwZ2rwA=;Aj01r+++meeƃ6œu΢;hf&N+?}Vy%C3H'[6 * ez;;;kOsX vrrz^Uhssd{-//Nk?Zs3 h{N666Ie|ol.'#WB#|j OaLGkͼx}5*m!Q'q >}*IULYA@ODL)O/9n\vmE8:,$U+sTqyqUce\:M͵dzODi=X=Z"R?#XXdz٩^{oGHҵ#GݻM8j87J.Ntfh}B}D$y։}n=tK F*.MaE@dD:ȋ_ LNI6"Zk5pK)y-mRn [F zF1FwֽUq^I-`0hwyT6bE>C*777F`LRu€Q_.iObč-Һ],T{.CЗ$3v\NfRjVC. i7KךW47JԞz^h|LCpIOY&/2 "ܫ縕[|^ r=l=5tVg}9g~~"F6MTrr^;>>3D~\j.pA坮WzPØ4}s]g纄4URuyh,s&P1yDU `n!ժ^ӊ=#Yg69c$؄>DonFi-Ь'vʥTnFsO1m<1(" aiD-6ARm~VbC%i6 tX\^^V`0*!Nk4?13BԚDNi?(ڏ?XLq Wofnn=}%/o@ Л~K(/R26! tރBL[D) ʅ2;d?K-" E/Wxjr إ$ǶS ~sWGRM4F0,Iy(yy*e*;tT隅OM -TzK4\j^X+KqkL&gNU^J39ĕ龤Y#&.ڐj.<qɰH(g>W!A4dҨl']^^sϨF >dCY\^PRAFE; IDATrյ=S{N#zfE穒GQ)E; {͠sUmm9qkQ^ͽ^ 4cmVY@5fb-rzbugBvttT1@k}8uaa￧d( K)oVUsgy. r4 [W=C5AT 0wJ*dՖKRO1 E@EVyᲣCq p =ZI.$ʝ9߬BlooFO__OpIrҸ"jM!Ih7*U YGǦJEHޭK\\\%9ȣ,RPE.HN}gΏ3)P0pUcuYZr.I`-MUVPơ~nYV3*n=e;88(QV8UF٨(:_[[zn['W*q("]&V34ʉ C׽FJ?P߄WX'XiIb@tFt 9fPU\u1;^BLOO,ze9Mz\Nn ,r &ib$!4 K,A2P8Vj$ BGebx>T\&>$QfܜM kTmA6gŊd؊5/Ec6f bƗ iqIh|,ó)ҧ;AJfGe[G+LXɦp88vrLEї6 ccf,].T3U^tb~<~11\*" #4 _~i>|W"02QwK@(} XJy,AXVG3OLϞ=+EX)TaAJzKg;j_B)eЉa^?kj{MCzsH!"TlS2'v?>Z߃~+W 63??ܟ +Œ .YYP%I9YJTzz`ҙH!iNO2TUmB3`"{ {{{ER6z^PZ3QͫEKp^JH@KZ! I*Cp9,!Q3c;Id[f pQ.L%njwT3hM-@*]`h+r9)++'2Bp=[gzm " f lǏ݅r{*Q!"1!8Z$O깣lbU,zS-y2z9𽽽1`\Ϸ`P YvFs0IcU_˅l\@2ˇǡFrSchH` [ED26# W&h=ep&*ʵvD**\Z 0?CڀJU0Z^໾[%P ~ߑ6ڬTx}CѤ 6{mxS׳WKǗ ;SAfYUFr>3)2G;҆sNk N#NX_`%e{r̘}L܊'U0p"@.`zyysI`8C`^*J+t%Z1̒oγfcnn,(r$#WtF0n<%sGGGo[ݕ܁|~~^-:򗿔EӡcxNSkgLmVxD@ozc鍐FP9hHÜʹϟ?dV67DG$?`V̼t/)P˂#J:Ub r*]EQa<Uro,4 .Pң=t:%xP|7 5)(h=.,*@ל>TC鯪3\LNI adUTm*3LU+! ||sxG)ŹNzH2w5٪T{VVVnE`ҦԗԿFoQ0"|)UI IkYRAb$lzϟ?oJ8\rb&e ]]Z[[k~ƴߏYE^__NSO,m@`X奥믿Vuo.?l$atppP`Eonn2aMb˫nĀbإm' /-z5w|},abN,,,OQqog%B"g-%K$]@ߜ}ҞIѤB3ǟ$4-p9t_#NC}N@P:8'70 * CZ(Q2!WTf=WtI؊d9$Rch\9 P T7J"1\= hyg)Qޡ^ s4m ۢ<99^#p3Q.UK(h}{ja ;GcaTAZ7zƩtN$@\VeZvcQg<@gq2rÏW 4HYZZj>|r`@r`blzltgr-PRÀ7g^ڀjR Ɤ!5DbI9/ QܘAo@W_^^͚u~ZpkN&0?)RC^A2=^zJ9wzRe̋2===F hD#C.ŜC.U?áJټꥣ~U>$J rpn7i^'?kU99jK|ns*YN@ %Hgmx3~ A^mJ3#s!(i͕E]tI _tpDMș\ ((.Iì@D" {crjT`r~U{v-s ;6^zMLgZAq l@~,6`1`H DŽCKl r$If??c)@?777&NCW͕_8"!H*O!Uu1i ˯_1jsssm8Vv~v|ゝNmnn0a=,;u ÊtJM|]YYV Q:D{̭X& wqX&Cj26ƶ06ӀDDJG&[XX(Ig{oooV%h666jL-P+KVVjT!\`˜ϕ3L~Y}$\Ԣ$b mi>??ǪcKX\\,*9ޤy&U(r|SÏr?C`"qF[eCIg@Rulѝi/I䢡 sC : wօRsUz(>c]ƮPb,\NѬ2Ui_;ф췛]; 9ER)KZھE,a5Tgl /h9<7OG*h 87` HE-Yz'''|g}pt:ΘmjRΓgIKw vhf-V9&K;Ė15~ ' {@|:BVMh4* p_L=؎DZn`b&Q $Rd_F%pӪcNL+ @p<$gYJÒ#7_ğo-UqB31ID/IX(d~;sϥ*m->>%,rN  y-X׮]k?~,۔r8Dg<+066V4)j2ԫgRDe PUpHQ+M"H:(uL +zY)YE] Z8m'1 0> C34#0AzONNTzgd4tT{{YZ7nܨ)Ν;}E2:X%RCBJFZL=km)FJIfѲvcSQ1OAHLUIR!xSҹ NAǙ;OrUePm#2o߾`ԁ/_@JZ_6$0 V <A-tG)9" @UwwwBz}OIRdlwwBM G+qߏӧvttT T0=\ϖ#3HMlEo=je ه"hqo߾]@K9ߜ"8 壣[a' }ɒ:V9-` sbh:. /ɲL>/6 ٞ7ku ccb6_1|crmlDIq7)>΋gaӝ7###r8YtPA*"T KRԏ3x39-^39[D ֔)f 2#j̬{t̚z1߅Ȥ俩C"Q\`d@UdOM éޓ3W떟?nϞ=(>:`o߾UK ;bmn2xtœ1 NMM7o5 VN}RybOUm9OC q>mu~uhk>|(R^HJ^G#b}ߩGWuqr4jo~#A!cRuYi߿xPmedCyf`sC*,p6;[Yr~ϟ#W#)Ʃ&B!HUN`Lw2d$Ns]f2LY-9EՔ]2f 1YG(()j:YI€p4Ldtszu&^C7\ohM;^ CaCݡh}lcg,O`=ƴ,x>;ܸ& d4t4[qJ]lo:-k׮T"up\j9Iz. Q%پ!(&xdEw%'dt7m(+=;;[L{f%rV֪g moo>)Ȓ$=y$J:'?BV/MIVi^ΣwcV@*eC9(a;'"iq1d;"B?`22Fip$O>=D;>" W/ʡrMrfƒZbrFQ Z7ي`NO(D:nss(+xP<^3cA1)}\뜙TR R*1 룣v޽Yu9dtփu 1؟0 q,v^9$KA&(Cط2r|a>'řC0GV990Ռsg:JZrF7*emN}/:9nAT]NJI^2K]:$< F ґ5Tgq{{JI9/{%Z)ȂЎݭ{-2۷okژd ݽ\=d8R%Qw( 7nhsU?S P2e0AC96N` ze9BZ5>lgIJ[X%L2=!z{3Mt(g'|Ak߾}kO<5gȴ_ :S'E$bqvm \{mf1 M@ j+G{p)8PV1 (OQPq+^60s aFS')k.砰USeU$NɽF9k J@L::l\ ٮ&oKƪ{ϕ)[8"7a38uPXDx?%'Y2Ɖ2N*ɤ:?'AWK2RuڌQEIY Hv`09+ck9),/F;wqr2J4%k͉g~P|t|e&/_l+++eSAkـz(KAXOZ`M`=vIJ,W)@#E%8Ε.X:$MVR5GWy~[ZZ*WIHm| zڵ>~X(1k[4::Z*[pڸlCڷA DUr]C nUbK̃vuF G 2FWU.l]?2{(">}9IK9>>^Q4h`7 v od^9YusKmH/A[rH2Բ$v1ًG{KDopg B[8/{'YF}?weߩOU]ϩw991*5E$F8lGVBr0|Ɲ7?F5\{]fT@9k_wjqz>t*gf=wQ/]͢ڛ7o*+[[XXhKL ӳrVίlO>--w=tKAtcr/NkW:c꥞7t»W{f9A$]ZZj͛75T)d>EMJ0vݶfgg`ޮdC/Ct)黭{ CTն>;y)ooo=TS+AP6ˊ+-'2QEP)E"rf(ל/"UmRy.gcRXߥU51ɓ'Uhs:>>nO<c5j`X35Pig*8H+ЂMW^Ēn"p,#8t9Y5}pš;::*GJb>uX{B=}O`]eBd~LPHDHbQUR )# KIWKjZ@bv>WQLW~ApjYֲ`ҡsu*wS9Kų%k``WOzlIueh<{vA(9^3xW~ a CY €%+hM8&%ٖHKඈ59=Un+sN4W ~zϲ挨ҒZ8ݻW@8<H;rF}J&KpsP7]60 r%m)=YsMM\D!N6Y@ 4gyJM.la GGGqS{[Y}MxaM*fd{`nwwޜ*OB[1띲)cٔr8mlnٛb;()-8_ C8,f3fs }9T$~I7Z) Xx: EZ& cXPq`HTw-d7gϞEO}{{{T+RR[ytt?~\uPV6" <+~zm$j?uӗq/NᵉT?N@DWeMcj"%f`;NzE"GTHKtϔPx'Q!)e@\`]NBO(+t۷oiagϞ7oT z>Bj`3a)G./ۿ A'+^ U r,0ϩ`K ]x )蝩4"΂a!eĜu{.;G-`W :%1JڌVVVnhq1 ބ@WO p'wo b2;a'9I?{>X -پ2A ~Y]J)΅. {g2uJ~| =͛7zt:u(Y[P2l?KFztwUb۪Us'O7oTrkall*!)InN&ˈ;ұ:o$[nׯCfxiO $6ڐlF,ZŚ&(4zh SLў1qFw^v71 bppmllih*]aLAN .--KXP})'PXi\m7MV{ƍ^IT~vvVqmddrzu29S޽[ ,H0%a30?Wr]NAc0d0yBD&[`2$"KXBx<۷+('/dc(H\&H8>>^esg̡#E~zw^[__lŁ BN>C_s7)J4$]a I ^9<<^^;{v cl9 AE[J|}vFWKa<#X=۠hf}U-rИlOgp$µo;wvvV2X9ǥn0]^9[_#2@}jTI:Q|:{W{ŪmF/h988hOR _kȐ2r߿O&c&T˗/dĥ][[U#idbH-fF"kui 3 H1"l/*aZGܦFuV[]]I ԣ6* vd$]5s8N]T0o_::*4 VH&c`D. 6#E!!oɬeO9F5mĖe KWH 4scc=d1j<ǂ.XsJrgN=+2Y{Q}}!h%/s522PgR8(OͅoKKK* 0ُ.k `K)ǏHf3(!WA{677!tp$ccc%RNiPKer:wܗtw(%F2))S1n=pq |2M6 ӧ}67 9ŸwƝ e[8%JNldmHf]G%?<<\}މCKSr122R33Ss200P}RIgK)gUƛ:cccm||F΅yf)s )ў~Zk>Þe *fYsn+)5ʂ0_,s>\\'" Ke Q&5=x5==677)](2`jR3L---U4ψ%BV-[.~M-$3HI Ѣ{کTwV6&ۣG<@_?ŞS#rRFpA΂h2 3_i jV l'lF0v+sdgi5:ڃjFG#s~sssmss3"!4E x7Ù!St'Lq#j݂0zP3O aS/-p5h}it!Hk9H%Gj({mkkk}h'P󵃯D\v=u3]{S3Xz$s*3&$YWElGv޽>( ٳ`q OJՅd&F'Y$s f2ۿ:slf])h㴱eDŽ3CšuOk rW7YNY4" muuSς]]d؟W-.',,, λ9hLX?zzϟ?W֬Zȵ?>ʙaٗN>+NmgO  eP=77Wh&]WECwRm+jy3#=44_9.EOI*S!%'0{T-fΙ2jǥPlHOfO,#Z"T=c􂁊e"2dl9)byoz+[xYCqd !NAruuX.S,D0>XR?kRUǹ= 9cY\JmH 6.3E0S["e5"W:#}! 9(TNApr@0w T6'}q 'mv)9b73zn.l_[`3dQPmcc&hu%R+C%$DIJ-"-mpc͛%4-2Agm<@ 9!.NS=rĈCv$F\ׯ:zc_^^NӇ|t ~{2Ư2R+dBQ0& 2Dl¾9!Тl(4'Z~%cz(-'dD&;.I[^^.RX EMdNԕ/j[JOPgDHQwQmgGk=EPuJAkrz\ব?fOu2=鞛 UPs(ֵC] /r!phzudbc]ޔt2\ C'ѣ666lqZhkWjva*@< P4S}hݫ+rpFIlһ)^tCK1J]mQ}L9 5Ma5hr5IM2!_{`S<ͻqFE@t*A?22ҶsÔ.=|JQZjO< s~=5rYJ`j1}$F255vvvi*LIO=|Egfhh,3xbFTaȱ8.j*^ر[XXjͪA3E:)i IDATYm sBFbldi\$TAƃ xTr fN(A1M`Prs~*b1u!PYJBʴSFQCmE3Qpud4>zsF_$S,3J\:nu&τQ -qyymnn/;N󄙌%hY`x* r&J2!Hڮ#^mqMݖ 9Q)V;6kA9eN&DI@NNNbC5eB*D?5i b;i]+oB ɓ'eV/%DD ormCB6PS*zo߾ ݥ 766V̡ih @~]$+j\v޽"9 5'^.;%2&pf9Oы*K8>,sL-5keY`8uy;0ݻ⢜F:^ 8l|[[[~#r3d&X/2RZ$5F}\ ˚i*f`bUS E lIX2?n('LTAΣxe[X~#e(H{J*% IObH*TL'K(&g(ccR,]:16{y䭵JAxaax3}:gř䴸$qaډ$:Aԁc!nec+ 0r6^W7ā"촋I:~=AlsP&r EjX9:揅cdX.L waN^ɹwxxXEKanD@fjeq;88XL9ث ]3>Õڿ55A$C.8VƬ1ޙI%[ha,6X"SABL7,kJ}w%ER°ƷlVp l@ W 8tLLAQ~MNNL`q{,>Uߒy\̤D>{ ǩAfۖ<dža'dLtuu7tAcf\}RϖCĹ!>lic)333H-6ǡ&SP授$[v',? c ^իٕ CZӕ};N_dGGG[-4S5#EbT59י:S ׯ_ AYdB,:#e&Ur1.e6f|<ԇ\pNXfmTC N54" O-($`W~2vS> lJQliIZLiqqzU>{>Y[n"p8x 20Ft[?uve3&,}md֮1QEj9xB Cr4gb02 Lmmm:dt:Xw1ehbW㞜G]\60c9^H Wy0 SMbx43Vh (84 X dA:kjX`1 e ӄ5| bu$1X$O@wvv4e٧maammm ^Sϝ;Kv&G!8"%M>Tyq̌v @1ؒ"/P aФÙ Cfi%lc`7tsB(e"ѧO BMw9@v)[BLTcyZoޱņFグcfju1>#яjI4a$wwwNiahcܥऴ d*QF,-̋666V,'6rlbȹEӳUS9/{&Ҷ+sje g7Ꟈgq/A˽V}`}Ԛ:###>?{< 0>> 4 MwnCřnQ;<<e+n.HT>ZsﶳS thhJNUwwwpn׮]+65{JZw{~~Ook׮n[U󝜜,.#wvv .j333}Uuф~:N%SoڵkR)_Q 7Q*_uxx@:g"(\!1)'PJ}ClH'ESrQ"#AyZQH0d+ c,ׯE2K'Ĩx9VơɌ]@(K kmZhE5##,$ AO<)A{] i@qN9yd8fKȲ.;Ryk&;652SK:G9L,`:jAk~ƍb)e'b[i5p} ?8 7"ҷcv̹"ހ\907ol>lnrmw(b۩ϝC\03mBݦL")r{lQi?C1n)ZPD#! {xX_uaw ClW;#LVLudk$–! xc~W lEI`-l D_ΉњIߥf[r-= XsNtRsR:1Å)>ྜx6A SLLL{0 eS: P c|<9ͱp|taQ57OE<  s1z+kaH@ ҝLb)ɚ~P{jSC_h4KYÇ 9)!+X3{3֏G[@B/jl DH^D2F^&S=oU |ǜ}Pn֑#!cr#\7߳̓,(P|ekkku8SIB,bsqqz".!+k<Z >~F29Fќd*Is>/c`!"*P=ӲTCCsYd63,m]{H5+elϕ:8ou\$O2@й7Ks"(zdL$P sT 8lQ4"F0:KӶ7[WvXw^ب~Im0ŔCAh---U;K=Gze ^ !H_mjAk-0Ai3(k9`])RmIWJkĿ"GCʮd =Td'%5XD0[tp[]]MMM8QA'8E-.. 3qY0ctwΝۂ!G6v2:НT_B?Ւ%kT:)} Y__%O}Paɩ VjH/–9<(տkU?<<< ;k֕qƴ4鞜APٴYu鴃GUtQ|fb2_ϟ?W }>\-h(D{mL=33Ո8iM HVPѨKlͬS*1[+)F})OXk):`IkׯTo ޟ7oޔ "6F߼ySw)\fZ${׮]k333d\ժj>ONRНHE-Ujl k6^MLL ^OUj'CShnqeS`ddu:600P#!}S`E)brrMLLT{v/_V+?<>^>FG(SIX6g}ʖ]B,SmPhECq+0X^ ^Fh]]g=dQ9LeOwΓ>i*CǑ̹2cQMjezg9ّ'~|^>z E FxZaX9qL v'uc29S!Ey mvg@}ergCFnqJ1)5=x v"-e?B\|~?]aGե kPıY0??_fs<ց:18<<\2R&0D4d&je2Bٳf OʖWvCܠ.-K,U4Bje mq1eΌV)cI4 Y V%+|Q˩=Y]39l9H%3] 0$Q۳پ߷Hyyks<%#mۛ7o%⦲&cB ,eeϕKp"-kHaa[ Q S,YNd*bO_A_d`&0c{>9b7omMx P..E{D|{T\8ED5$fe5A26hB{@.SQzr 0<gtgt̺'l%1.z_,pA`tl/).1Jc A>EKN Hp@-JE,*|둑/#m eƣ-ӺVN1=&''fߐuGPE$FA@ ,Ynggo&3;gʙVk2=+x^%  8!$,(?2VCqRInFbT{Ϙϐ->]]lW۷đoÇl?C]R'=C8Vف*"곳v6440zbeg<>ђE$i[XΊh @!%W" \duU=D }gr&9C@&d~gَ IDAT@CfN0Vlt۷ -駟گZi IВкn*qmkk˭R I`@NGW^\\ͰN_~-5e82?99)w*U)xBZSܣ@ ]N_B^1X.@4 udܛCY6$!aȎ\$SU9h9@n64*NN&lǜ0XYFD`Ԫ0 9GY% "&0s6N.*$K6q(rK-KH 5H`qp eI`̝=#QSG1csRGDs~䄀( "9!g9.}`l,K:MRGme{&}ׯ_ӧO[ۭM\Nԫb$@!߿o?n޽薃 PV{yf9)aݭ}g۷Z'ڃ~N{b_}nNOOn!.a`ԳOCwR2O<&N q3??޽{WF;3sssjnG;9= Sȶ )Rf4WWWa!f:'! JjőJt?w.\^^r$}q>}*NJ_j!ɞ[uls1eE & 1beTrN]>|>|P,P+C;CAt:p$AIƯe2A ڪ[VOd=2r]F45up$ 8^]11 *A`TLy;`3"zP}gzx>5 rr9ٽI1Jս@bt9KQ)度v6ȼVuW܂йo߶޺nOuv)I͛mqqz3RyU^+.&ջw[kp1vu6??_qxѠ!, ɓv||޿_ YXXA/u{i@҉҂,Dltꎤׯ_J_CLhMhVO8DeĘ@@2aΉ^޾}ۧ rY=sssձ p?==me_8ujH޽{uNf 5ԋV///Q3Cne+7p*3v||7l=60fww߿M!WAaNrF8,ujT###訴777^d-A$PxxxXl"#DMSTXXX(訾ä&˵!h: lL+f$#GAL,M(^ rb\jZv1+9';LLLTsp]\\,~M]AHJxznPN>͒ŧOvp0udjURs 2`nGGG_~)P)zȲ)d6Y`[]]WBV2%J)C*}'''*9INҐDdZCpk_R$>(ua<Cjy)qeZ>s> euzzۿ[ QCLfiҒELg Ԃ%lwi[[[}#鴽[R?+7M2Jz0k2b55G|F)܋S,MQ}-p~!l#H511Qr35R2'n8%D4+hpsb[iE@~]LIČsSDL%C>}d1WY򯬬TMٰtsiAz(8tttyZD[V"^\\߷ 9ެBؓ ?B<22AE[k}(&=y 3K3333/$BR.RS8'j hϋ/JDbppuݶ] 6e l.h 0.GNYz%^:4!0mccS;39ٜ.Eee!͗m~~/_JeΈdAcrLn*+}󩾵מ={ֺnt)v/v:oc3"Nr8 p2YXlVΡZq5>N.2$,e25wj,C/[fNj] D a&]dPHOmKJ]t`Y%ℰSKЭˣ2ΌrE2|.OSFQ,D~R\LkvТ |D>\#OgrDVB GGGP.A$k8{Qt:KY;,C>rXֲ>d&/l}.//۷oxΝ 0+ǹIr@g Deܞ>}vvvڏ?ضk]:{uAىȐdlPf8"9=h{QD]ϟ)Ռ]<DH^֝a0Ȳe_jL z~z=G=ki]2gEŚzooo)4 ,?^R`{md,0ξe< d}}R}B/Yl?uge8S J"Έ lx0޾}u"hH;F AM+[Rgggn:U&1*y?n[gTSR6~+cqf9; uv @jg'̧ sPJIS Q[NB3>dλ^i^Qe un޼>~X[$PR!kvvP0>6011qiQǜ177f٠gkRE*'OE]jٿu:md+?c]Lycc}0 E+D Ɵ E59mgg5g0uuVk}uUGGGǏH0)=zT699Y jAX Y;>>n[[[/@خ_^5I|m}}%c~xx7~BZJ K1Eo,B{nl<(I@9mm^H2 MµkӧO1>zez3G!=kN---!k[[[5tH8>>nϞ=k5ZF7 ͛DzuYW>::dѣmmm>n7\Z,===ݞ|P?tjHz v̆awFsDz9,(,//W0w޽vvvJ :>{?H*a! ғ'!P{VV&t:˶Sޜݻz?19;ݻU6Bd*`!(dj%1thǹR~!Y-,,K0 9M}מ5Ω'SwA3b!k4?c6FR8jUSSSǏmmm"-89Zry#rǯZkMI:ɓ6<ۇr<0P \^^nwޭ LRF֭[f!.>Y> 6??J4;+$SݻOS[XX(=fz`+x駟FMA{a{, H*w0T}μ]XX(n%l\'088޽JC>Jo)" ~0:NJq, fHns]%kPXT !Ҥ}Q]Ω:7ʬR ?ŎK1EV8<}jwmsssmcc{5,ACF63frff~a̶OOmuu KNፁ>==EH.D t+Fɘ?}vwwX,(O?vuuꤾ[F۷o+OؕänfOez :2du(v;;;c=9tK]. tLT "9׮]9mooᅪK1H4mݿBj6#mc(0x]\\ׯ_W\ n۞?^z[^^n U3Edznu(뻏H[YYlmn^xQ-_+p}FFFV߿omii#`ɜ1hr iZKt)V% dӞ(BJ%ErzgV( SwOWd6 aaRQmCnks<^8hw`z?~,/7n(^W&bYψ_Z={Vr9TZC]Us4 __ԟhxPHV9t[Ĭޥy'NgggPpRۻw DzNS&/_l?.8͹I%pL&9Yimm_0|뜪aP F/_?/^[n>TbJ tL8WfwN@/_l7ol>|(.uH-dȇ3}zzZ"$/5$ˤֶ>⫃#I$G6 0Il)1<-w[[[ & 9YPJrraC]>55Gn\^^'ONVVV*3_meeζAtvxxX~fö[F(t??URLMBسɶZ_gz_ԾAijy2i$"NH6n]TZbdirnˢiY"gl"Եkf]u;33Sm,֌}g0!SӂugϞJIYݾ eñz۝;w1$ǏW7AF .g:|ÙR.C `~vs-ᕤg73TP_#;v)jsNE+i'5mcc).qڏW}sOVj7u٢ryyٞ>}?U`y,8W_~677W,m >Og @%2֍c5aﭶB˿KߤuN9;yMfY[[l+E_^`@3ː\ؑIgH3C...jRH fxpp~bVvAƸ<]t:2tJϟ?/e;f)X#[u1?^$,{X t@[ X9E,)Qg al, Ȇ'>Iv۟*)U>d΋/Ƕ˄9N R^]Tf {uziG/v>kKwee={찠JŔ/g@YyEDj%|pp'gRJF1҆_&ƫrUU,b"YUjHuER#˂` c UhF IDAT8;@9!FTuΝ'#VBHʾw)^T/EJ*633cr$믿 Q{nB\|$͹}Dxd'pVb s"kvQf>ni]&b́~TJ|p2#-Sgw޵9*gE􀌨",,,!PEv $)z1}|k9::>|Pڵkmoosjs.sҖ`R] 611QdWcph3>;88޽{קFۚI dOǁ_9J=vUf-4ӧOE>-RW>}?ՊE3Hr9Pyfrr-~yp-&gg%mӟ/Ia [beݲo߾YlԺW)vZۓ+ Iַ$_Id2FrXuaIZjIeYs=Bh{i#V3v ЁYܥ젾5 g~Tϲ96ie5D%uu^AZ˗uDd;=:@``[nKNC?[w\e $$$YBPr:]Ua}uՙݮ4O IzvlG8}ﰇ^ .k8>zj| =(ecƙ~u;*YlllDB9#gP4hŸ?^О3eT~3ٔ[^^PL-f:2݄8߷W^ M*a[wP{HxvqqQYsn1"b_+e @BUjX_S#^WAG[TJZ2yBU&DzNS ү˗r j(F\[[k[lns}m_nիWEP:ߐ޽{;Aj~ɓ'mkkGd߻w83544׿gsvvV%-úyqbԤ@QQ`Ǖ3###HVK6jMX9=~tM>9.ErŶ^*8e4Ql9~Dkd^ 5ESb(R>}Q {?NOORz#ds( "pFCƚӤZߥ 8l5sgR{Akmnn='ިnw.}Lk}|{^†^Leơ'I(RT9)[(9??o^YLgA0G/JU;ύ=f$,*gA3Ip:Ȓs*^-FqNfrޒDk Ƥh5p!Ap*\ A)5A3&ZBqΝ4TID*I.gbY~HНGܻw|ڣ$^t!^j~rjKk xP%Js7&,bd6;66VvERk_^xQB& ԩ[ng.6s>0A/hb!e)](:>HKclNV*z9DQhEasFOBF~Z_N I~A0!狔&#sSÛSP0Ul8M)](xԵnfu5j*WFIkE {Dkkkt1 1}L Gv~\rZE$9)PD81S3ǐ9W))VK2Ihhۭ5+բAD%Ɖj8@8Y}Ow)CE&&&R_GFFD"ؐ9쓬KA~pΝ )qnnpw:!Hg/gOx(G>xhaR&2233S,!jmoo.N`ΑvWIիWNRbN6VJ?~X?*0ޗ$cN~sڎ\fvyzzrA! QB:^_!:c HԢQNj>N@-%{Uj P.l=beZ\l{)d5`˲A9ԜĒ-A`3#Fqʐ)2P9̙`H`#@Y_=PS.>yg[(%D&Lҋ[ٯuSbt@+I05%}k8( n( MأQ&U)(_s||ul}Yt4XClooWνn?n}bxZ3+6#Ix/l%O$\!|@6!\k<Ϟ?!$je&gx||22}Y MQ^l}EdDzjtl'a 8*_YIlt:Nc - l E?>>^ЧC||F1A.a rdCwI#C8{VSX|}`Df0W2e`P;+X' xx@ȳ hȄ&kM|MyzzZ$nuGBp ?x,hQB޽+G܌UsXңNÇNLIPٷ>'mHr'5[p,"FOvzzAnГmssȐw;wZiWWW%&izϤb9:Nkt:; Y%{|``}}i`L{;ۭ~ȍ轧wJ]{65e>00n|:" 'S:9C\3LvÌՑ)|/Ϡ!ԛ,J`,d1d* `duD6I>II䪖BԵ,"x)ֳa\WN@yFNkUlFڟ~CF h-u9p(>!ZqtMRKt8YȖ:{ri{nޮ=h.f@87Ќ|.2XWIFS:ݻW sH. 㒙gN~r;޼y2S@3#+9C8[c z=}H .zB_ëtjҗW2bsySc^ SgC?`.3^HgӧO%i_Q2khR2e9Cu\3(6(Gr<`^pKy g!vAn,ci9mQ$չI"t?0U7rDLI~8?M64Fš3)4~m5U=3@fs4lLّZaDSLbg `Dq)E([1zTQ^d[,vz.Y(%.)͙);9ΰ2ixjgXn7w)looecg~fI6!G)&" 3L[q a}f|333}b&Ah^FM$N+d 94ܖ5Ff|}OX U{}m{{u::N PgڟUuP2Z{)S99cSSSmwwZAS/ P>`pOZko~$QrVz_WDN 1,򲝝?FJmH쀀8?3LܚfwҺn C$Z!ՙwk^>" kWʾ_,3::Z iM?/)Blܽ{7>|PJ`D 0RlGFF 2)i X/+9]d*V[KYm֌s}Fj P$D޲!ǝA̬ƽTN>JV~2Ps2ф賖+nxsjA[b%do`M-EufȌd[__o%l!VB?YբfK%J/mbBmg^ukkslf( G'*ʂ!5٧;wt:%\O uΝzWzax+:ym k_[uhamh F:a/|=p&`_Ը@1RASM9Kqz.H-mjWJ#2aڝ0y& ?)k}AD}ٺ.MdKO" `=pt՜@j[f͛7U~]:Ç2 eo,^0gK{1<*(ګ0r]so?337٧Tt3*Nl5K=Y=YYA2BEjˬ%&a33{~~^H|_I(%yA,7sB -=XN~l8GO΂L%HO/YI8d(٭D~ kSP*BN.JZ܇)pfML4m<+eʉ7(pv @dlt$%3Fa|.GGGA#I}{l ۇxvַ[ْm)VG^]dĚNsr23٤n!8gzK'<xE ,xd2d̊X wL` p4ePp4VA駟*0IC%INt)rO->e.Y 1x prωsd$k^&W0?~d1T@wԐL;20̳=Yq{2OqU/eM w 'pPoO0shL}܃jH{iY/I!#&l;l}A gEf$3x.a#D..3/, (H%rxxX{5)||||ekY`A`q7 ^ JY1$XS ɃD;ylgYvnjmY̾/0xHfDDiX3*R'l׬dd+:tvqLZHl8P% M" td5ԊmqQ1Ldl3xd?IC&! ~ A$ۦrNپqJ.VD68Pߟ/Όg >=AdIoIHcgg`>3x}:>~ئZ;~h1l!Il۷Rz9QN("'>XJ~VYNB+R5p)q,Z[[;PJkd[Prf25CΛc GݻJ='7dO?ݻ2|"$A"BoӐBhu2̾L`se.6f愞1.<#D#k#pvvVQ#4R2dGgW$k,ppS ]}d rv};z}z>[roDD޽{GR!Tri, A~v:{krrY={߿߶˗/Y F nff sNb'9&!JlR+sACF,1<;9P#Q;f\4iƄV_%bDǏmggMNNOV a6~ζ/o r4X)lw]_> "5- ڪ{uxj|޽k5 V֟5Rvmgg/Wθ9RqqqDyR aFzv^JO>moVFE2LjxoWO vԌ={Iv p.PP+f8y$m^sD]0LhZϞ90iy0؞ݻwɓ'mssfugY[ZZjSSSKY qD=!kL=ٺD(H=`f\Λ4~3AhLf>@18bFg: %3G'fpVVVtSdvkADmRGsq2k.#L`KS%@MD0pIRDSwƃGjM\!;g$Xl>nuF{A-ᝓ^g㺅BrQ}~Q%!yO"Ԃ|dk'MNN>e9H$LˀS>Zo9i7AUA;`8 Yj&7댨!#2J.;d `) ݻjAJ.;iCjzv <``&gM"Hga6?Y \sDerЄ?v||FFFP_hrj`Z'OT{X[-d)nJc898ÇBknX0 2$NW6/d }}):99)6%H1dיN`2fgg^}lL2mMMMF՞yA`j} @ejcEUI8D`  GϘX%|\N\__g@f䡒988X=iŪMΐ팎ΞO,#TA:;;C胂eYOͬF&&'p2V7IRB#4х9o߾,Q7f~F1=*l-Nة)!٣: n6Rv@) Lad"B Pѧg3shh9\}j8!Hg y쟠GkǏQ{OhTc3 ԐLI!"pqA@GϡN d:8[pAiB' *}zuS܄wשKbTSOMž[C@/T7UJt%Y%"UH:"F NI26#OW6+;dٗ3t:5S fIUdW湩H(IDKm `F/ C@ uHik ߂2u```)'f?pAjΠ9 ƒR/թ9! % R1)jMiC-..߂3Ѓ%8::Z_]VmA93wIc;<<\qfdZVoV")o[a }#duuʬOg߅g P9 <d~S9PJA"$q 77#TdRxDٛRF/ra zAS 7o*Mb~fft_ X(exwx^pN8mANQ5D,.hwZSZh^,XQ 2zD:S֡^&$a8yjN wKBSL/W3>Zh`Q̓`9|.F) 9SsА^8ܔM)~||\۷o f∈idȯ"w ԩտ T;bΥB͏Lx˶Qp8N鴱sdbδs+s23huo`P|T{UAвB8 yff`:Z^BN&lۭl +[c hU rzz:Rru}gmgg\Hbccc%cD(P8l9ѣoUKA WN +8A/&3"Bʅ.//W$tvݪq˼JRlpX`Ư@܁g7)/3P .{ ԜDu:u޽['eVofOسwgDR3H#666VΌ -)9),,,TѨw{2deζ O+[{n  8K( G @jP|jzZa@ԼFss*ӻj?nQ?qFWF{ Y"XB) F((WH{^zmgg` AAL`[YY }$*1-si%9sH/Ԥ2RJ5 *q_uXSsaajݻ ^q8sJ`s9-YJ|l 2'244T^sG)\$pwxxvr֭< 2]_o*X!Pd%NeaT*-zmk0fA]mmZN vG~o޼CDgRcqNOO+( hl@YeWYc-ǚx> 3"?v~Yhqqr|(zzzk9"1qqqў>}Z)\/؄/}8\ɓ|e9TJjr79 ]V޺uOld,~ێK $59}VVVbwF&@{72} {_@뷗]wpz|M73=;;kC} >$T(>|hN?_ljf/ă>0psfDcgn~P1"J޽{mfftc&W t7kormoo2Fh>HjWSUcA %3^C i6CzppL>kzz$P3TFTK$┶겥-,,A̶!YYYo7gd̑g"5No{{(f4&\E>; A,|(%ۥ=ɀ&[5Y8)=slttTFGGfwPh r p aWF90_~e!fvm CXۅyr8pٰ?s2O>?uRB{vvVWWk58?j!y,d5P%Tʱʼ-Цlnni`[sTT=88>|XWPشrX b*25e* 'RӲirh9<~||yM+svr0s옰ΡA'uppP댨fv1fHYh噚!ŕE?x}[YY{mq`Rv(yG2Md͙Je-Kw:v =΢IUC W|;w<0k-83CZ6pՖxrqqQj-Y!j}Ǐ?.zrm(MH9p)@ $^*0"YfVa / S81Zvww+2gW|7mgg>moo$ mccFA4j썬 SΝ;ŋEƐѫ߾}޿`Bccc503p쓓_`fu 1 j5؞"wimiiRݻd=gDuWw@9S٧Ju@Ɠ/Ap/HC;o߾mkkk}$03TK 'c_zU(>믿.Ra{in3n@Dxglmn{M%Y )"B@d^uOܽ{#{ Rmvvjha.eWr0l!ݹ׽p.%5Tt:[9mllz+s%;^˒TbRPjcc,~΋9WL ?9wSæ+:cрdLD167+D2%5I XTBjPsql,Uϩ?":NkO>_}"O>DwppPm+2NAg:s-X :W˗/ۛ7o`Oll:Eb3p,Z-SqcLáQꣵ2_Ò%*`"wttJmN7~<`DB>|ОBYB2{oeGAB(Xm`aaKu.fP,W";dErde~bBڌK0P[\\ϺskrJDs )9zzzZ49b1V ;??o;0,OvtS# SD<8H?׃t~/`@2痗L79½677lAp[^^)X Z'cw||VWWz'A.ح>8077~駶W_J1~߶݂1iZ)U?!Yj1?C8o? +"9%e5I?OH/YM\joUࠂZ2ugh?==m/ҶJȀ ps 7yyߌkRX[G2qwݙRC3L@~?~fggbRT ,٩9mccFC{nAZı0$A=M!#(I%(%<Ae{y _]_U( RKROY-([yP?GMhu:-TJ[eQB1Rc޹` aF nN_t:mggoqttTg!1eG>|^xQ1 5 as'8wimkk/H.//;whB=jTij9o뵽633S &6]'C"Ag%&.I^" D5))??c'cSK]L0o]vQ4GGGӧO=|/g3'|Ai@.a[6>Ar' }4{*2_:) '/_BO$@16A){z4ݻwﶍ8&bH C`i->}&mNxHbS`EEEV)lIV'Oby3 p~ה v (\oڛ7o@rδu2myyWʐPORս{jڌ GP.JŴS˘] uVZPvrrҾ͛}(ja->@Co/^蓶ĪMplJ'OXHFQ0 &t:>(ڻ[g#ev: AQv8.A2:Ij֒{Z+|9|ߙ?+hvU9krranmmǏ﷝eH\@=gLށ`G)l >A7>2뛁X^i1*2lRr__ʎ DQ~p_d2^WhI)E2?؈Y=d$g5=$eYr"DAס+g܄R܃rqT'Z6mWE,SSSUUhFDzxxاRcjO<8): IDAT.+1>S 5綷0Ԭ9݌]5xj-oVQi9 8$ώ_n۶&Ƹ$z(V:Ǐ Z hvlqA}Lg@155վIx3vJeKh~m{}ڏ{%;ARC*1D( Fd> ޽{mkkfg3n^ݻw|+_04F9 ; FX+ϻDܓ'Oڛ7o9bw:GBİL5Z֟"q~4J B\___zh\]t ^YY){2P~eP䀰wR655վ꫒o% d;>usSPr)4|ΝiA@sC{\'sIEV"219R⸽te2XPf<~epڠ iQ.13<<_|>|vvv F- H2p96s߾}=y&d"%b7fbqxx؆^C7.9&?2kwk###_D1Ƭ >2@a~ÇT(X@Ѐ$I0OOmyy՛,ӓ{uIF8k:dk|-//Ǐv|@G'b,k|M-"֒U,O}Wn>|X,Hf(aAD/5\"U i|YiI@\Hh_wmggjj {3A$>o.]f7_]0/el lݻw۷~ZkmgglAJ~UsC?r<2Y[,@CR~@ӧOmff?s<#\p0Z8KDQ;;;mccu::wݟ6;;۾zUԕa$`5S`] l!vzz^zպno 899)g4톐㶰PH½^+ђᗗmrrTH#]6#@+`|tzzڦ[+|-P؆dG:d`Ocоl~(& D!ŁMfݻw9.[Z׫~alI}I CnAz˗/Q='8^Ws>n/_Y7w0Gjj '(+$@kC0v^ϟW"#vDL)Cp}[eHf(RkzZ1@u9z9ikkkmttzT5Zǝb"SŜ;ϕߌLI *X̓@!"Ό^Z?wv{||VU633Smm̊xsuug}VJLdez666~ÇR`w"Z˰!oKnbbmmm͛vΝ~ XǏm}}O7g:T42ţ{?*-<Z܁n۶kf22(I?p:[l333%% Rݭ֝WK@i )>r4<;mZJ:w r[ /23PsssNMM B6J2TN2|Ҁ"VyZkᆱѣGŋUH>yosW;Ƞ'sQ} b9x"G70 4?gB;z@i19D\YY[nU$3YklNҩvuuUztt-..V+f؃О?^j̠~jҧ~( KSSSmww/#N =333m{{---Uիj2DA)O˗%+i >~l!Pjsssm{{MOOׯΫs`;Ftcc f+;%H3=f˒$@i(8䤲[x84œLYÇ"jQg2^>/#y4*+&AezfАRHP Pc fL'R"OZ>G Q0܈lD dX$=`&A%ȍ.,L"oך'gɖS33"qGfrҕ5 !j@ B`@dzu Ha ?OIK~D+9\`qEA&b-9^>P6cg/.nTl% "/$ u&''N_^"F lPlSs633Ӷu)&h~hSvvvZm?~,}lΝ;mcco_+pCܸ#/mmm[p;Kf>{EUzN$ T蟬]5!:6SE" A}/h1*$YC;KJT J@0^=22SA9a6<',A :F|?v+Z+N<?Y[ϡS2'@m;%L.L?Z`kX[skRl>bUj:ҹ!+莸i<2D[__/NIAp͉CQ#ʂh-Ίyzzo:H\.%pToݺUdD﷩"#r+_ 2|!I %%I̭[سL24a:KȀfRe0/\f %r IePIֵbbbr ՆSE-(˨g}Z1K+E9aEf4Hj%A52)mz0f*h>LmVD7[SrxQyV R|z!3r$ R ')<9.N Rwͬ6`!973afٗynmmڃz*Ÿ' >C mvv2ݬRv&) Wi` SACnF$?6??߮K_VfYqE!(9 (dG؜nӡR1ODH'8T.ɠ` $RJ1#SY]]λKTv!)@DAt988i[H;e"nއm$j[RΤSya3Okdf1 ܻwYqiju'8bRrC-qmm ,kڂ4Gg¦zMd ˞[:g@Zr=-uo8s <<،=çT]yJT|3Ri X׬f/ "p.9afRNU)3ȶLVr1%fȑ Ks2)Es|^a?x`qAZr,e0V2~N9GUKGBmeep-2 Najj4΂A ;R4찐]3{@$,ܔ ݂mw[K.r;<[3!d`O #' 9ׯpd"`^C $Luz/IFvahl+΂`M,CVPZ0LA\YL JzJ}b<Hc=FGGpjVoDY[Nh 8 Ѡ\f/1W01Ѿ& VcXZZjggge3%|F(C9΍ G12s8!La4g 4F9[b4Z˓- 2(G6!Xx ~&ٛioܹSn 0^R|qqZ&@ʱd׻XDP嚻+Sa iTmi>C _'y浧Rg΄nq{&&&*<4+nr aO6B#c !B 2UFGGI=99YCL$dzz2>Q%?_u{E{ XOj2|gg(!w3Z)TIhbb9c'2H{aZө?P`nKlZxP5Sic뜍?g`b!Y^UVZg8U0Yh1*䳰7etmzEE~p'[NNN*ڹϱ]M֞N@o5Qfԓ+;a՜@8N # [}YwN֫'LdYED}2^aN\͠9<)+ FH;=\PU*q̞+ћ+v(CSJ jg)quS8#p@$! ]Ltm/}١0~ `ֲeN@a~ƣb޽[}x gȘS"QPg]0[n;?NBۜR-p|AFLi߿_S/B  dSs{./1#B:Spo9@{ (Xgggڤ~@VjSsddT܀`"{{#J\k5 I. I$"f['ZB!rt2XX"pV:W #IN%8$xrz,bSs0|3{IY489DCbZР/[Vq٪#Kx2GADDH9XdǯO=3e8V]zm"eNgttmnn(cc\Q"22`L$Tٳ٠AwnQyWK'[1Pe`|7#j=H6ySTrrTr@Iz*%ȝl=̽l_ ,W k]pqR{877W# iF̳SVU.H~mk۷4MLL]4()yOwBICbq{]i4Ge(IqGU?eRL02!炏D6\]AFjə%Z/u,3Pj9\ڣGpKJ͈R19. drJ=k{̐1j `M6]D=[$VVVf5- +q@f$QpJnmnn*I+Cmgq_d`D>\lk-KC`oV_MT -yrAa;Ξs/xuj$1^>_ONNZө<ֲ5f-9+IYwqx>b&͛7`;{9۷8>|藱o8-D;@l 󘇆 Im;;;mllOB|B}&3(Ek}u:W-B F7FYիWWLdK:N1˙K)MYO2600P]5 4!]rv$laV IDAT%k|䜫P$!IcONqjZɢ Do6AQߠdΒa)LR}$l]0L햐#&`[ZZ#۲8GPLtr<#ɓ WONF( s@3vSFFϪ (XS@Hq"?NK>dDP =3k9{3" 0ó*1Ԟv *Xj ]sH"hMn"P(gÇ}kCr1)c#嚃)R6пw]tpY^l!H(L MX1TSA^dEr73,;$kpSMg@8hjzxРBG ytJhC )y0;D]S nH? kv""E.:Ari&^&H\͞ Z0yyi/ϒ`1FJphIbO2F9!)KHEO/Z[[+"XC-U8Ep*Ɲ%zw8vPbfě,Z 9GА=(sShoo2ÇEJ/XcH.&~@sA.uU܃x2y`=)=ҩVPcSg04bֻ,Z&rflX&u5*cjU%%&AcΡ!U]J=Ȃ0H?1&X2cjލ̳'ͤ:Z2e_3!`@d c2$'S xiEbݻmJiwoS3,Rfz޽ի9uxxX>̦*%Q52fpd 'ІdNL@qCZө@/zLfffpuR";TVf;T/ØQ.w%CW&$JeU&Lj^\nkk "vE9u1s8VD{z[B0()0ئ12lT#\wDD ;yϞ%Z;D< d#YޥOM}@#Ү2\9$ žO']CCCmii!Q ho*Bk?$Ow)r`(@l^\\^QHe XʹsMGё@K9oro E=>;;knZҜ~>[N}C:󻻻wRG+VB#6T0sҡ;;;mzzO{:Z?*,f]]}߄8)A"S@VK|Q]rWcΥ':uS}dʖ~)qӶ666j* (;r"MqiMIR24I9;׳@B}#Лler \l]9 4IiT`@[YY%[n/88粧[n-OxsF.X{"1;EgV7~ޫmVcq'tCIrX`͛ŀݟ4%5"g3=LV=pYY>'$gom/^F6Y F|Ak@c$+ߞC>y˶d˲=mhhmoo^׶600vww5md[9&Ӏ ,Oe5ɝ`muwÇ}譿v5,7Ep᩿@n/_?|&ҡR F~_fӒ8߷ǏRWSKi=()ɨ@Ao߾zCǙBN";%1è9 kÚ]J9Xwm^ GT6$!DP%9E;d$ɨy8)SʞdNi%aǪLk9Do6Xk}mmf4JRS}WB4G`+ˁ0}QuD5 lRyu{TRFA:@V:9GtmV-ɀ>ށ̉K6<<^xQGb 9P"9/˛b".?Նelj ScG]wɲKqPQAċoHrww]^^.Qv ,٥V>=D!!Zw|{Ç[AdD *~9w42G0 س+ zzC&<5Dف{=s3"rI D|iGs޽VwM}9F$+xSp=gZ,'; fͩF)@rlɤE"%'YN 8eY&Y*16gVT gPWSMG"FNW]51ӌ@"Sc*^7^^չ[ZWLbTgS6ӲEI6"ܹs"F Nd ]K(VЂhs?8Q z^7H;W3U@.d/j9sf6is1I:Y)=~NEΗB"Р- |,9#*_|Yő/}I~OkՑn߾]";dSJhDJ&[)F3}^Wґx4թi6+q#9rj5گZ/K% `; P0qI2xLc"7"t{y;77W;w(T*"UK8-P*j35E}'N4iZCle2QMH7ד=Tr;88(ͨgvڜI) vB|]RA`(8bs%hqy񯆯J#zrrW$D&ɖ'I0ugsCh8 R!@ɩ t%0*offWtvv D0꾩Ad_)@!pSicon޼Թ@s$z < 6 &]NjdP=`XqI8Lʇ>rcc#Yaj'OÇzYҿNQ >R`f|PЊh͛7uzz^lx<*zxH$-aٟ)>D;;;pK0^Nb_}D'%H|=mY؅B\~E;0$5ě1H8(z0Ԇ!KXpiNI24F^|yA:99 >າٵln! kLX ]|5ƚl̇I<[ŁCb EZjy3HE)v,h!y@qFfKQzo0-+@v;wxnA&>9Ҋ؇8!;hA$X<+D[HT<CβY81*!lRv9(&Q9== Jp.CM)>R}lr.aQ# v롞9w|& kj'9>>$ȋ P|N]]]ՃDj4 0uxxr馡B%{tJ|0!:Č'ȥךCu$Qauu&^&DvBZJ<+/@{;u".!ZCMZ^"FVi_!tCupX"8@9s2ZzIJ BNDfX4Tb؉0AS!xϢCan"itd~}wrY^ kDp@+ -MS]~=)D3Qؗ<Ds!|La> Ң@Ddps8 Lqҳ %VwFy{ ycQL#Dy`> {3u"CbxaBiJN泾,uɧ2r wMX ÌιQcx,$A=) (+xHR ɫ"|ɉB;@<'*hx֭[::: @IP 8{"zV)TGfzp|Ib}zQgI {, 'ej 3=U:N*áƁ]r([ŋ̀r( #X1N0첆NKP˗ZYY  2h{`ENЁsB:[,T: Np+G\ZpAh483% j @όL~ Y(az{ֹo$gu@ ;7o^&rnV2d>^@EgfO)!AX,fɈǙ^i~&B "[-3jP#Q8,ϨR2ruvyV#%' #s 2g‡0zﵵ5-..jccCϟ? #xWM]&F#ݾ}[O> Ϗ2B>a,tΝВeG(xo;<Oې ధ`h QA.1+4u=6 90`"2;ωQ 8#/.I88dfOٺ=$0uJOq>р79|(:8)5PRk@:ײ=;;ӽ{txx 42 \CS>٥DA0\vF`:>>VVԮpj@jjw)L !\ < kZz?jE7q/iXn 08g}o#"ObbA g~; N6EE L<n߾V]_N7|3$E)ucc#*gǻHrX޵Z-fy=JAGGGPPU 'lndfU/Yn֋{ Ȃ$">Y $G|ѱ}0\áݻ2"k/^'(r%\^^˗/ЅmXAC5p`2dfqH}DO/s*g(kϨ?2C}%ݺ{}]eݺu+( ʵAemn߾gϞϢ̘zn;wIPF"~$U.s^= guwIq&'%5 7t0Ly}}]BA[Tt`\ `@ vEP '$RT!/A ´ ]Vdjޠ=ߡhBf⣺$;xNt'xC4EtpczeВ$Ύ>}3upp$! *nAp^D8DV!gs]8)ژ^`:2/@ KwQ;|$qx\7 $/@@h=Sb/Bq3`@Za F9#0KK !z'Q1Ԫ] 燳u'ׯ4Xr6!a=#ڮH;k:#A$7C_8災B >/̳sȖ͛7CbA͓8p Qztob1>4c}!"޾sC0:D^|&&M#b#B\lɴ&VE6z/ vX Btd?8I.7;u-5P1 Y'"@n-- v *D΅]fzD]s=k/8r::1vϕBBQ(t]}ᇙD<,*j^c]Ġ톬lg4z=dـzc.',裏B{@k>$&h J#j7^u52T`cHSju5jp7A iFPj?FlD"Q90̞G ejԁ1瓙xAȼ_QP֖Fanz*3 3<_:ဠlD! DÐ"@WA,uMd |2Z vC,̨m؋Uh ^5vw~dZub2i@ JXZ-\.ۛa] $hyh}GSj4|soPXMSXbퟶXiBEN7y\} Y׃ 8OiFEH L .d<d7ofQstA|?NMhN"hէ|a b&Stl\/{pV`ۙMGE:d?bK<^|3:88\.ajBJLeF@&jd$8X 7\җ@}u>% KKK<CF-&"v晱qYl|̎a`ݸq#PryЅ֑k׮4 N  21GQ7nٳg= Ƹ񵋀`;NX#RƐcrGκS e0 N8dLB@`0DS޾|/l9P> 23~_jS{jA@\3؍1L.U]JiхjeőjVUQI3D兒:SKh8:Dbb)xmiURb4P2P5t8h fnU׃A뭝dT${8YXv;,|RJ9^D2 MK t\윚0(ߣ/MSݹsGO ;eו\EF`{py6!g?y[ψiljuYq!;4w6])JujVަ|n޸=n-U.V%Mt2۱J"fOT:[TL;TREtwGUkuxщ}7lxQt;Yڊ:ݮL}:!$8鎎s@K^S2oPJ9|Ύ>LFL=IdpO Dπp\]ދ:=`@zrE(c@&777s4UNOOy/֤\.)g8*W¡7s+F%GX?r RB?=V9(_|++D E[[[O9ukZ]W^e~yYJ'80ŹaxF,^Înu}}1p <8Xlt<[8h4yм+kAb̜Lu=fKMcdLYC^s\(87@Mzyݻ'O~+$08NAA#bN,YI՚&D9+ ]δ2gܽ{w{{G % Fg3*V(h$MDJ%(dD'3:s_QI*@fߋXsX qTT4{F(bar㓆{z>CoYJE 3&X]YSڊ&$#s:>>g Q k)fYw c9A t`:05"{ttR;G 4lo>*u^_@3 A;3zt}666ի0Ƞlff8c/5<78Bϒk#nmmIRFQx?|RwgurOKi!%Y^B2VD8>6ͣ?I9ˍ7;1="אP8_A$GKC9n x/`Y;F lj1a-`,qdc7lNz<&H"&KN׃ .qoIOVWWuG&df('J҉ڧmMtk}Qշ}-ݺ@þtTqQi:$j\h^hc9u;}=|ߋߟmi&! On2_פdDRA8*)**De⨤45^~zOz~5kmu]i2CT t?OR0&D@~{^1*0 sVv^.@e#I)x0"4-vc{{[/_ ] (MaO<6MOٿΤwM@Id_:#H. IbZa2KwDJ 5)6v2K;d2QV$0" dc:[$UCQ&X˺W(A %H'$S K֡] k~02oB2+ƕÁ8< = |Ӑнo328@usW1Ƀ5LyP81>zihQ6.5R2R =g^]ZZҍ752(\,u1^G bA$uD@}eœy:NhC[xjOTSpd\MO~icnXF㢒tq2g %M(.(V4Hg5ƩNϾ'őΐEƩH#I:TYv>ddzql0ΣOώPy{se)΄ ƍ׿tq@d$9NHr]b@BGfZ,`l"b+MSA% vwy'Ӣl6[o_z zi .X+ |HI؏WqܞWsJ٤p@d"u: q1^zE]:>P{k5=jy.!klt^ wyIj~A|Md.e)!%rsoodLL#BBȔYyШb] )y8Fdcؙ5dmT(Od}\7$8JZSVdjB&ܧP=;; :NU܁X0Hp]{gur(G MZdaWVVBĉc予y|<,gN;d<G:G ?Ώ cWWW0`DD(mah p"u:`s!yk;mJDRUKGHOϼR)i0>9dl'}S-Lfjb)Ϝk2xwktfktChϜtB'9iϦ|)JqE*V4<wo}7G+{8Z]VUInqX-!3q6q΂LM&G}0r.&I0P'3[l|||7|S/^`ggGnBϳy꯬[ǡ чFID[[[:88p0(CNOYs'9JiH:>Z?C+D]< Ϡw)Kz!<2|%D _7 CQ^E=HHk{4 sA'j9HAdDlZ6*.P[8Eqgeޣʁ9kG008k[ٳ.C\0#aEz@@ę̬8 )1dh\7=d@kYP1R}rSA/X㖊ŲɅƓ`vٚupPrxFޫ42z>89N3d39I),QWn OT*Ƌ**-h4L[o#ɂK5z3EQAi6c\{f Pc J?!313cV˨a zGP3l(+0q=dn0k h!KgO5Г\fnꪚͦl6Uh42,eN8?@z'B0q6 [ziy^h!@K b ۙZ>9m|@윴=i ^O= zO@( 0 \0lׄ.D3;ۆ8s֙8, ~YFoW&D%SLgӓ{W%a `@a0qHד'O(5ޓ (wԐb^aGaD0Ժp˓b<Vu)? !깭V+8z©[VA=|uT:^+E8IC ?g'OhZ:BIdQ2x20h8 pp 8t!PEٯfnI2k}?i~^N8f͉] vLL_´~e O?~MDJ"M&67a4\=`% ʹ~?zi FB<يt"31%d^F 5W:*DV2UN9]'(Ii(bdk׮Fyڧix Ç:88Ȑk`\3ewރNmߟ׀}|\$)G]8X* 7J!8:'tt5'f>i=5v0EǙxEa8F 2Xċ*0-_a9Cg:*06ѥy&@ќ?LM;iΝS]aj\@>(a[:ݎKHnG&XgW_/7yr$k\h<8٬o4#gq3hupQdϧZl&yD0; {pC=y\=f̳ٿ?ˎhVKN qQqZf펞T_MH7tr|U::: P/{B&n7p"$R=yܰ ̽˗\WGp.(^Q%]]] z]n ع#z8#nMp3nh!x2%Cg\<ӝuM`8::g?Y}k_ A['N#NЎVƆ \BP1 .C΅z:-VY$>uq:gggj4AggEMhL Fxhz4Ld%e&$*2ND{Ȫ9qedrkȅR#]ZZ >݃ђ *pYO`<Ìc5lqhuțߋXF#SGRpii) nbtz˱Bʙ~~J/>*:5@ƓM5٘Sshl+ vTqԟFRMgiteǜro:MhgN8}/J[W_Ҍ#Q=?zHJ480lPyyɟ3񇿯(Q~LËa(M!\KWEPꎺA/:W|ScQ!>dYFIPub  H6 ʈGfyo,A= 0tiiI{{{z!SFR)@hsm_S6̙s?F DɊr*;>m,`S}:32pF)ax( IDAT[X@XB$f͓͛:99 "DL2Vfv,2!?: `y#%Lo"{'r.]lۇE10DqD~Bq>k2WaV&yvL!ZgaZ `s4i#*aNB< T2e&{ ׿84UiX&_NYֳg2ݐyG[i&Cw4d{J*IFD}Z^O/ؿ}gu}{?Xd4IKȘ0ΐ?~0tp]haxz08I&3]M<u~~[n:d8m` i^f1dGzݻ. ggg'dEfcssS(Li XtY`ט'N\׮] hs7hGb0z@E:P$i0aRj^6vd{/]Q)Y\1 k>ҋ7  AZٝb(k ʣAM#횿.ٙxzmP;kv٪lpXZ-d2D1 U&L ?P\x떳^yo^&@A ϘڛNk=ẓ@SǩhR%X˺}-O_-hTdjvvR78|ۈ˱eU W7}=й48 GM!L8OҺʔmk:#tζԃ)k [VY[TXIh|_'G#+z+MFLِՕՌ,* g,'D 8= J2>9@/F6cST y+@W E)PvC}Nw"!l3c$}WU@:<< 1+moo-jہOI<5l7I$ـy5 sc jY)b=c Rd31n{|2[B4tHD|Ɏ!H%1^/j['j&JFbC xz8SPH,gX,fgs}u|wj >gh"dP143TyXad,\+\6(5dFX*X.\)(?@/&@iLը4G8[ǝFF@ߏP|Bjg.i6 ;Vl^cy|4~dőלC#jij{:kbVx*|RR:|/|^5?T¢$Q8M<|2]8">3 91BMHRsxנĉHTek2,dZdDA/c{^/\j{ҚD)R:,;RƆx@CAHp̀~h@j~0Mމ΅999ݻw$/k7 BNsp}Y)#-D!d \-x3+Xtr/..իW/ `9>Nhy6zzfnllyd8M;C r>`cuu5E\[[ kzFގY7aT32i"f٠@s!5@l5j&\;(?Pprzz8u1PGV5Iu?owWoC kFBv\2ZC3΋^D48psK'Rs)4ue`Bd\= 2V`<3}a(G5RF҂`'zM?9RRj{}wuzW\YLI2EmUہOd%خPS]l-ƃ}$,J%5L^ ?Ba·Pr(+3y ¨漕J%moo-F粘Vl ]4rT\8H Ṕey>z2틋<^$O>f 䊀 r#pEYR!h뽆yJonH9D#kT{ov[`qB@-5"Zم]5L}HG']Yڍ8.!FG~8^_I>1Q5B$ M^'G RsXbK~`D⽯$-Ut1hZAo_/tK TQgmEfrq L]R:F=FpTY Ite=ӒujuNҳ]p%:G UϠ( mM5@ŷ{GWtjriAu:]-/T*]{h/}7 J̗@FY)}"({wQ"Ç:< Jd% :}(?^U2$/iq""sf\.8ƙٕJ%3RdR0y YD U j ruh 2 EN"v-" (LQ|> .%!&#CysD r),p)p2}Dڢ_y$+ Źu>UzgQ%(_x6kKT ~N5'g| ҽ ;+əlKrG862N5YbC{#ϡ9lv l ӓ72Bɑt?ݺ~_BeJ+JfN͵߫ժ4`Oد=}h`0Ph4 Ƽ2^\;}.&;P";c+&5 4jY}Q E 氟f3$8ji1YVy6 @~]\\ngN {rA 2f$({GjF-j}|ύ PPG!Q LD8}Ka`aQcAKRX@jlT GEvdžN @B鄇Bv8N~I{ja#օiߥxԠ>jӟVV HgrZ-*o T*P NBVV j66A`j p4r&)(Hb8q`2/M@_ $m`lDlb0zlm}Uݶ·_t^M_q~q! [ƚzݙZZ1P[q8aEeU%N]7B\#dF3Ks9r&qLܝ2*Y \MSu'9ۂ4#mu c=xx[[:|9  Y JY^/$aa7 m !8 T*ݾ}[Ϟ= a/%8u\>y,68ebzB6v7|S|Ap YAlZZZR 13?CU,p_``۱S@ u( * AC-ur]֞ cE)oo8..$;8lx>K3?y:.!7́q fGQKkw~5,MsYhh ׮]ǏCm" e{{;L6Kpƥd^VmOԡ`q5 rJ1WL(wj$ $m<+??7<Ŭ c붡(Wrğl}PBf[6.W}gOsr[`.BRpiN*,ek™,vN <{A՗!$Mx\蓝d#/[.WJ)U*5 a쇯y24 -Φ%DQ#mˊ9Š nvNjsZ+w*Ȁ1gciž2T:O58#b]U <ӥ !{q(` dqdxO}4Ȫ 6 rsPl#^eQjɼ8\0y`dgFb %zOgsu`βvA vKl hnM(?3\ڇG novn<E}"CD܃pi &vEs4k".$h҈9=rSiݻj4ss 3dR&*J8ΔÑ:FvCƁ%b٫WȐ{&pfDd!⑴nOyee%\75:zو>]HG*2̂3Hc!q;oe,ʼnN;'֦^wU3g;%rwÌ2s2=W D0+;??~r.])T*i0bH&bܝ`3?nddv;+CŠb7uۋ"IAbL;E^[nz5,i쑙$CDM'L;l0$c g>ׂ& | )Đ;iRr)Md#51:Xg d@,TA=+D8u oܸNzZz^ {;⁗G&wk =0!_\z3<\YYhs-/W힪T)X~V?_Ts[*dWʌL,8-8a(\M՜s+}.Η\I*:;}ي@$@5|%[LcW@y6u&@^ ܋1ьu\ug:CjZ k{{;|}ݹsG^/ dă P–t)QIS>EJt"lhUq>_\BRyS;JFCD>30}3Q&iV&Tg g|b2B*N q1jD={`}$hoB~욖>,h^<8U{|0ݻ1+څ|9#'G7XڧB3JmYs*3?SqS A$\&?| C]" DQVk)&u(e%$_'3c4SaUv5cN)g¹%]r$q)ɺv }U}8|s.2 d>bQBAjh{?A=--*Up4KLﮏyAbp qd8L/iaqn}>2~8g$ l Ybf=A=N7$LYl-||D+֐@[Fl'zaa'hXC μf{w ԍB,&|25PG|%JI*L> igpXx^sz G5y IDATiJAgg(yRDl-#:h["!c!c9H#^Zn yA%zrI 2XcgK|{p0Pᅒdb)$>MU]rq`BeEL=5pn EtXu3X9y(|VlNw |\OBWg\+68A?ۚ.iPgJ C&~EkVZ i/aPb@ wI #P-cf2STU: W`9Ȯ%Āޞ?A\liGTO&<---ljkkKj5џ^ `ĭhv>H7I^f]lz~-K<+Jl*AV[z2 ԰̐q`*BD="m31",sq~@Mp\G9cz*l6<gC}貏F"Z?&@u  G%@6"8"=45.I =LO21g:??Η: 8NnΧ9[f,*Dogm<1F ڄHێNfGm ,c_:paYĂ^<` Q4̾觿5'~ך̯~s!dmϾ0忟{<'B^6G'zEſuJqWq P,VfZg\m8zxwFx7N-jT*Ӑ)q??˻ypN7o}tNfp~}D\KI|(ҍ7B_EK?A:3W{Tn78rdzЖ iO͗xi g( \_`yˍ a|.3c] HP mݽ{7A v)p\7![6  #6 EA -950Q%1gdԷOȅA!\ʀ4jMn[i4эk_ jiZ-DYqf[y;Ьg98$b8~2Qx.Z+l̐:~<(KN9wy^c3Wܺv$55| Zu)A'3SER_Zb$:i}}#`ȩa8R'[}u &]mmMqgZz#m8.d`[\5İ(iLؑdxT Ѷ_$Mq0?_ZZ !`Jv3\l N |[*J'ɔ>taKTXXXxD8Eb ZuH}, -,@D- w=3GbЄK?ӆWT{odD6.׃u_HIp~%bSZ2Np^2Orkoj$lb4U,t|~{~\|X5gB3ToPF#8 ' x: A:*58ey(I1h[[fHnHg"8[`]bOzK4%> 9hb_EJ#jhA (ryy93)'̇-,YToY挃vOhX| Y54I8oPa7035qؓ$4TPK dR)d qF峖ҝ>mAP'1^s'c:2{[V'̇á4rmY&J5qP?s?ߞTW; &)'l6("'Y{h@:=zc4ϔqYWJ]99ߚ6;䊉Gʴ*k=8WzI]+ {ׂ_4n1E6uPT?HwhqqY{j<+M#ݸq==^۷o*Vr=gӗ0*謭(TqpإL/z\LJmll^ cR쾋q$Ԍ IDӃFٙ>4 >BA_4&-MO^b@@$䅕Gyaia!fA~R`6VFan7vf/Trڣ y`fæ$䲕<(o!KA4$ a-a!KFC>3#&O@?* Z`ё%`]}=mljj%ʺn7Fa<nTRXW~Q[sV"NՂWf"e\TO*b%,+}#lk2UnsΗW 2%zrh^fi6U+XU*]wPL 8M"!WeW=Ј4*7~Vϗ-MTI2E'd6 ;FB#m.iq0ѦPI=‘`k {n_`fH@v]t @PTЈI0qhSIjZ@\OZǏ8υ{! ¹?8'k${@x.hvt'JBhħm\ d! }=IGd ,\XEĵOq0I58[>ogEfE4Ɲ'i5N[nC. *ᇦv'_T <8W.ǙSR,\ڧ hE%XPm'ӅT2fqL5dU9abՍ+X*f(5GL5Uv̫^eZ,(mt#]k_ Kie겙֣00浞Ivgp8pO.gW9HWւtޮ-J3ծJŊJe~6z }\'h$8kW\bdmBފXVttvv;wd6pL#adF#5 @A-F5a"3PN̕J%|D'hҪ:^xljggGNGoV @(ib~1(#_dOQ?duwgj(6c\~$) vN4a67a o&sRbN'5w Zd%p#PI `mݹs'lXX,ީ8%Y>)N *){K&f\uBexH^!0j2cvںu릚$-F}W8| Z̑CH夬Ԣu3M#0U~6|_ri~ e].h_9)}6MJ kAfnzR^-?SΙgӖp@ 29\QSNOڍH;iWkk5CȘ: f?LHr: C}ӟֻ ?02]\˴4Murroj@ЄMջj @F#8sdNƕP_Godf2eןv JN]̔ɾ>@!}@ |.3tEBʳN:(TXZZz@r=TlN7 Yꇀ.=!LFVt8P9p906pX`xPp|>Ăl_ Cްf??wz| `ͦCQ@|\aiU e$ #$Z:$VdЦL,jCLEpjg%ZPp;n8@VÍ&xl|U#Cq>TR.nKJbWpQ+lƄElB"tƶIuKY'@ 677߁CGBH| @im[2. iߥ2} CߚCڙ)m`EK"n>ёr沷 ;@g:w,~ά ` rAs Pb8#}E9`)`^:5K9ACZ ( #F60 43(o߾ ݝ˪]cn Aíj?|l[d0 NP$7npԳb""؁.-Fdr)Qk-?e=(f3sT+,p՞m%f6UggJRr*dg^Vz%)m֑AծWVl?eC&38X3x ̵ ZCjnpvλ{ ^u2*Lz=I.[ :~WH|b$ߛ;;;)w)A1P 5ЎpŚ44H%P;:ƆCP0́E=|P?v JctcXnjl6s o0c 5e*8moo&zktsj`6Fkv a D *!. }_C  H ס~yn aOq,mjz]Ϟ=sO Fx R)-sfqS ";ŷ V+2zES3/k(y k֭0/yz y?דoX(eDTk!R<`Nڟ^04MbSn6*qb2"5[^튕mjPfF-I&л*0CgSi۝3׋ *e]+Y3v)SP)KIB!~'Ms%u/.5=ϷiBkSn+Ȉ1dX)ODwuE"KqFȅB@ 5jխXW)ggg.%`e#]m:PnVЩ"aZ35oJ)"mooͥ)z|G IDATi2;=54!DP;6R*sXY7[&v{  8КPtA  B?[/' Xxz1u.pnf1y=Uf˼9EQ@Q@8t5H{P Q;Cl`۬qAUJٚ[r֢xmܤnaR'677힫P F'G/T _)7dfkWTN֠adUt#R{AIڔ2&?:iyEn_h~WxECZD"a2;k VPlp5i<=b+O{ â8Q`,0(FHRN;&sbC dم%룣-k.TJR6,ZfM L3РZ-wVCR9777ݙ_?8X_(x/>cJ&n_v;^DZ4) y i_k؀9'Je \(\h0 9h?=bPx)\`|?-.(2o&^tBՠ5๠0# iP1'ŎMgBƍ e-6TH`O兪ݧgǣ_UZMz˙*"fPrK25S"=Dij:ʬ>%WEY:,dUWd7#ELq)ne~N9?T/+ ܜLObTxxs.)5NY$b*r4*ka\/(y_^ZH$YX6i E2C^|Ot<~~[js19u.3]Zv=M NTTrU[48nI:Z d8Sp fCfS_P;;;:>>VzWS*^{Ma tRk 2Ţ[D$0-Dj? j쌳kWW79 H  HMFfYۙ 2/ y'::P(cxjA6ơS?G:A;Q\y\hr{l. ?DUpAYv؅/@kex Kj/.t*kwwWv횞<<ΎNOOW/B_dx#W.st[؀\,ء!b(>/K0*hPF gcQ*  #y#?N9^,tV-uw">o>s OXگ1CkKg"V>NhCeQj pt moV>?TOfCAh(^+C?{㔕*Ke1:Z736{օ(dq He 2sh_MNz=ɇ\t4{)P<|?'_|8N4F*E~h$ SG[*5 {|nXh$JƋFt*y{`wwW{tm{͍MmlnTz(,))/keVW gЫ) :3WM/,$;V:)GƲZbt(9wGU~=a+^сnY 9E뜗0iQElZ|sǏo~ӝ/٠-24FPƅ@q.vggGO>ush&l&OA5Z TA8onfsDxV+Ael<5}a0͟A W2/Hn{lGO3)v7-|_f8v;l 5j>^ 4&RQŠf ;J+ҹڢR s=GR:{؍FCݎ'3m(Ӡ-)iOdMa+i95]JYx{RE|9{v$ KcjA^/4+ճOtѹx)I|y(')PX(j:U RƣWT^<_'?Z?P]{ESIfT0hBS4'SSׯiVK/_74]rt wEzRZhLJCN!59+rڮ))]ӏ-NV,hk)MRRIZI&=(XvxmggG=J%YDeө;`XX6F͞U *`<)tv*~3moo8Ir( A-4?gu 42z3g466Q0 Tb4 8Pڮ~Л5Ң6k.,j>Çutt }l[KLA5S(+EdzUtC v)PY : \tƮzAy_oF&i}Uu/ۚz]?ҳK %'3w׉Rt hAU^ZD*3gle]VK2)u[כxd+P&*J?PWZUﲯjb|ӻRj9T\h<\.aAaξ5T3K48VWU>5%/Rr>iggK;zuMݺqSYGIGγ5=3 TQ]EW}1XŌ3>Iͥ}NqqlkJ__OsW71,JZonn KGѥP@pOR0Qy\=l JSٵ PvHecMB:駙P7>#a|gPb·aDn[[[zS8SFhd#xuC3bTzoɉdP4CybWnX)I|HyD!Eɇ +H8pnݺdHqyz cY|07vHl`^&>p%,:Y)Qv9[uZstRXS;~/}׾.;C%ӼWU 7EyQ(/ U+T)__+$V\d4URS>*c) KJDŰ4RX5fcCR, t|trbXѰ?RXp0Q/Zn*%9%Q /ΫQmi:NU<{9]v{z@>x5լmikcw> aS2MCNѹZO bGZe'ª V^Y{yu'򅼎z_~oo}WbYTع Q@'6R8= MHCdq榆á[SH ]^^Aj (ƹ.-ѲDm/h$8YA" `cs1A:;;s@ x4bȘ/&8_aj&;4Cө39a5gv TأlW\[&e98<\b|^/ %{@ @cg6JFL>.eR{XtӧOŔ"mE^y8Z6Yzgb\RV4$а6[TrPnl B6(IWo{Z dZFf>Vrͤ{R{o=Wo|MoD$WQ1ߐUj#O9xrAA_P^+,_^o(b C[DZ?ew\E‚4L5ETT>W{:?8$eiiA4ܜpÚ .YjlQkZK]l@5P%/l(B'~Bql_$:>>v1q97;4C~_YV]X;G:1}AcGiz=WAM<Ϝ,P х =hZh<; 5Y:yOs3TJܬS՚B(̸Wy֑igLFP.m&%ߓƣЯO5JR-~YT[_H4T5^4eV6rV֖Ĺaه#!_yLI0,:bXh4g*+Fj6 TƎ'žNz~WP{׶~9Ytܰړf#aɋl-u23k$*JQbgrrr6I(P|/7HL(BSovPΎ0TvVgT"T>vjk777ꫯ\.?x<֖cJtyE ) ,yf߿]+b: z>v.nf9wA6h:gJu.hnbP a fR@}c͇jF4ŚCϟ;TN@6/AsgcL/ve|s^zA)po7u=~٠_f* 弊 AM尮|8RTTEfsC|w`gGE]89I3vwkkLWPp5͛:?l(bez}ݼ~KL.8}_ou{u/.Erm6üy.z؆pQLE*FR mƪkLԡXES$:]K/`)͛z뭷uqtlITғ'OƤ G:Plgt@|48X%@rT*fN!P7(˯CerrCRmẃHԵ3p<,mgf# >2*4Mw `Aj :7+f8==uukڢH98#Ò@bCB0eRن淳F:jnzj4꺸_a[)/3z/^}5KyɆ/E;X ^Z'l|xC`%Ї>Ǯ}ݻwOGGGb. soo/%rpbt`0%Y/ШAq ;^Tu16j5Fk|3uugDݤ 9CG|e#Ftp܈x Uѝ.3^nݺT$:YiSYFڎC 7(|Jo=hNĮ J|Rd.cRp _}L/~S|LԔ*r^U|SRWfHZSrYQE . 肱 7VQZx|fW# hh#C Izz6Sϻ|hh6_FBU*$5[hkkCfEI;¢ ADd%x"3]0iMc68YNr@,+Q<]3M'굆: vqx߰Xk-t?;;SXtMrfy$AXJ,M8^>rPSS V-э7GXT*~ˡx~z=ݻw/W _Vh%n 쁭3A.{F؁ TNܪp`ۋu])nLAycL0; Ċ mgt16o*u$kYVs<T~6u~HŠ`%#-3f4O\^1۶>O5M+x:OhX#~2R}ODä%+ނ^E Ƞ]klU ]w #}˿?GuyQ(͊[*{幰lݮ5z}#Y٠xhL"M*s\2OY?c7|SF46a{ƀ {D +J'+JDihX*5Nx*9]O[X_ slġb^ẂWq2EP[teqg^i7U)4Lu祗{K/iߝD߷ AE1֖;lh35J@x$@ژ?gggl>==ukϢiA.lh0c={LQAeIc~M ȸwqqj"r`y? +E_.C.u(7QDٙS`Be 'Gͼؚ~%f 4Jv ;o$N1h%90XQ8 _kSfݣ}fajwwqP46b8:At:Nmj*ρΌ&K*.a R,L!F\N*C;'YmYkr|ӊht/ieȭ?%2~yXɴWee S eò xX"P,|p0pr &i69,Iݹs'4 gMYT0aaqz{Pֹ'i&ŽEâәHI$~APqT(=R=|[͍Z[EQ9)uikep16z1#ke)SaA}lc%(,) W^q!hq0Dz:M[:99vlkjܹPUSQs}'|>|?"ւX‚ PNQPh#;lZ8kHM(cSZnpV\q)̣] /B ) 9TEb6(Q$̾#}aK! PD|ˈ mSԐs66 uAeCB A 2rXp4t~~xׯt kAᷢ,(up<'> :R^3*[f"zC %_@sr]!2 ,NeVql$ƌ##J̀Meu{qxXToHQQjT5M)//4D"73su39[:dmXYa7ؼWf\4!h>96776NSV0Ps j(EpDNgfj6RTX(i4J{\Gh{|N[_] ҕUEh׮eUSx:Ei{~qP6C2SrMT^x4 @Bwq|NNN~VO>uk#cBޖ/ SV~_w|3TV 1dǷ*I99-n۵EܦdPqo~tyW>WLC * sչed&U[>A0 >ތ64s̬и(4OPѬq=` :XJhg~ժvwc۽} 5eOFS\~Q}Êr~^]EHQ+:=;SkFutn f K_|^\4aj;{x6~Wsz'z=M&S8ӄET00/!d2q#:#A3c )nܸvK|n޼^XF8˚@2pb|q~~ԸAgs3n\_F#V*k{{;UA6"-)ư6ǬGؗϓ]nt:sp yKAcFBUsS[C|@Pլ7QP'[\.;케 C4 xzIQ6ǑY. o9p8KьX׮]sϰ9fjJ#/v]ҊD0B?S K`kFlpbUZ:YWLӅxYcӅ2!ghU(۴p!DZoxqIb0 ⽋ za{Gcs]M&7 ƍH ce`]=߽{, C&kaV}5 BBIJ=`3` jT,͝.**:owT*Ux9%|~7{~RfƫEWIF }]gvf+Z ~@~_ Z#°`_\3=Pƒ@/h_{9G|UX3={@Kv:99qkH-VUVX4 &/ C7Ŋq5a605/6M96Hw2ݻ njkfM>y]~祮=}I v́v C}OˡvłY+b(,M3N~5 C8AŚ5Uihv m^vͽ7Q4MldVDZ ͩdU^8dXiU tJĹA3Yظc׈=~ ϟ)&fjW_}5;d|HROOO]9 -%+ZZfQs]StG93d2ѓ'O-9_iR~4x:yZ@b098I0Y(2zJO4JQnMb|8Nt8h"P&Pt,#g`_b0QtƬ!qr#@!n6KS؅`{T({ˬAoЍ*UCϫ3{Jg-+W-ת-5:Yn^Ijx_XR½wmm46T K 񞞞jggG)%Fu!œќ;(2rv11{]Bw:D!EܘЋȍSHyr4zutt 8==u by l:<,TnscAd27YB,/ 74t,7#\x0F\%?FQ[n+$ lSAd@mJ " !t݃fNLah4c7`gvǓDI)_ȩP|›)^K7szr:_$HZIHad.@@wNgCr梩np&lݼ@ش#GbZGѠ=| R)N|ءi0.hP 6E^f\n}I~ik766: {+]v2:B=vf&Xn8owZAyÍ %bM`x[Zmg1Z"0\4N)LV8hIuL6֭[jێ@5-! VwT,45NԨ75F纒$uc} H7*M]kGWz› npnYlxJ$ĒHA>6Wɡ6- &{9YyU0&EQ_cyhvmkkˡ~W_}U}ё|zz|39=؊SqN%3h={K0C/ FXE"'[x4CIS7677=}ϵaGLAx" o΃Ѝ˦ 2K` hS =[cen.۷ItfCz=@L1ݼyQ<lPJ%jww7R 6j`:yѽ2&`>nwF E_i[_{*mJ kyĺV-8AFzW+:[)EO/nCN^hڷus 彚~EbCnh8{ѩ+\ ƁΟϣVɵh{Nݮq%@sf /ngCCysf^ףU3a5u-: (9Aì7M%qB!ԍ754OMUM~^u᮹*J/Ά'$+]Qx›MbeYJk35w[Oտi4 >ڠ'-(;*m˜&D#[ۥVt:zݵo#YHJť2Qpy|^'U:EK<==ޞh6s8! Eqeo{aA+`W)4V,\rZX0'̢h:*j7ljBte΂+{+kF9E9[QWj^[x -Y_,ǝuwGti2i6tٻt:/ 'O`)wvvd)qk.u5ϓ gElsQŞ2///ʺmmmm]v׮յZ (3V}k>y݌ arOvnN| ޱ%A# E]u떻a ^˵rk-o/M@uP'''Z:2o2O*:p)$`@p\ld"  aùܹC5Qfq[_֖qH>vAι*~6{+~Vhig ^X;[eFnle7~Br8*kPTR46ZC RvOg0;Hz*l*KPbs,'2KχW 1ɚJXG%FI`#;+zz<귾'eIY¦h+a %'@æ`/zrrST\#4n h!t-n qҨ#_P>Es@" M'  *;(׬Eijl59g2w-u4 DnCzВx=zZuH|i !$SxZxKE㹾(zIy=Q4@m=ڠIjffJe?l .Vl@ ׶5a.nӧO \a|G/ Y*t-]!FJ+"nG~0oU`)l}x*FM7okڹW?0\ArS|DRP  m A[s gWΚl8rwT(*lP5$~9&P}4,]/z饗JGfA^Z*?Hi?]AJL2+Ac{WP gA]X n%f~a(EE4tŚi,8qRtժfezkJcFo 6CE˶\o}Ф]w,0ձ qooZ*0 Xy5!t>hRP/8(a7 °^Rh*%R0g./&:>:W^t&h!#lv&`j^K5 /]{a|n5Nz*&Z 'tcmZNOOݵ+84H#ǶAel N2_t3*Q_asmllFQ/?-듓mllh#:eJfsgH* RV㱂z:?!x(RPּ72 fЩ+Ljnܸ%| b8@谡$8LA.n9DŃxנ]K&' 3tk^o_\\s9 =ŚkɼBy3Z)d.b3Ɠ/DB,6HNc]$›}=?TfEK 5rE{y2G󅡡iauoQnܸV@@zv†sKA( E&Ҧx ̊ M!n:qkospބY hN#I}D4wyͦ R}c]t;`Å8|rѵZ3;N#aWHdT"Zt0+֒A֊egbi4)r[&B= 9Z;?)&{{{.j9@b^Vurr4O>]aINOON;>6֏" ^[̈ƦknM\===Urvvvbt4EM0)J܇8-M!fXm4;w\cT*msZ}?<RC@vԿVhDOgRV*J.CYJ|8޽{.C}M*jaY#]sxAAC0*źȈC?$PRdzV+FJ7BV9n ;Ye֗ ӫ3ʪ]Q~%?U.?hT{DbN(U9M`_Fj5}ᇩZ;t+{^{Mocn߿S7Ga .Hzc!! FE,UGZNOOBcҚWDfBh+:L'"Osf͎_l=JO VE:ڵkNFl ]V5ONP|Q!i4.U(`buu &NRXg}*n`46>C Ί\9Jr^BzI~aW\olP&һb>)j:vK 4[[Q5ҷ~=ʟUSU㾧jiCa~fc~ܸqCN5jZͭO=mj !ܿ_@u߱fu|74uP^4 BbȄUk$I [ռmi<=ć) /iK#0rEa!EB/0?JDVq57Ut㕢]IfxSYkTR2oN_S]jֶEÒm g "+sv˄7:\y@!86g(T"kjێ@Z{ '{|jF;~!` ,5OQyAXWϙ|~~:F nw񱤛˜Enń℺ꍡcA7LNvNv芬ٽ5'MYZI H$>A\4|C2 (o~{q|d׏+}Sb42YVzU!,kZN9Ch,*6l2wXwR)/*+TTl)| #yZf2kHqW|/t-1Vcpc ౠiAqCCY >s8:wY6M>Av-l` .:3e?4 Y56FCggg;x?Q2* 戄0ZGCC3t85M)ggj] UJ5EWS $:Ng~k͌MCr8Ntt^I}&*Bu/3B |$8CùDC-m:jb2t+Hċܝ4<  ~"l.%=lWMyIs} *F5n=y (i(x?yaE_8xs\o3c\ZNRy(>h\KZBgGۦ.щ C=x@~_NG[[[wɅC Ccȳ,|?dʬԫ]=z`?ʀ /Xgz&d& Fs35` htUIb{=\o(w>;[P @)*"n7XOT;FL\jqrGyKAE{PNf}@z[?o7JgMj68PrKF %ȧʙCXu:\ + ^0~'*Vv>1b8=Bߚ6>E oZ/.|L!sGA[,}  fYWB1TJuF_6T*IpC9PME7Kz:,, i[jt-+CrJp*{!^/(0:? S#CF#j@MT|h+hX繹7ISODV#7#=<9~}*8]y!cs#T8d@< f ֥mQ:t0&黿ml66noMڙKRz87%|CŰ{W,8 WT iCR[uv&Q;[ `V\nuO0jV.s/#7SClABsMMOLet g/%(IcP3OaDoV }9?D0-0S pJ6zri>]+t|VS z}Q";9qU~u/IQۿ_kmO7VJPJ&1SU ohTCH8$'TM"ӓ* `s0Nl}PվDZi1d#驉(4orhb``'gO+@/ߢj;G@^XAUD/KU3Nm(A z7-Pxy޼Pr8,zԄTc/ HT8 z4EU=][V~"2oZzf ک˙BBIOԣ=*!35==Qq*GaSԟKƁx([簡xM̭S~Aj tK @v0< A LrGG5FÉ#՚K$'nn%f ?lR70qض@]JmJŊas[E.KKb'fn^ⵌaw }^}ZZ~owygއ'5M}A` cAa@[1J;3ܟ$IJ\T)BT-HozA-!Ш5rz7@#5#:m92i~̈#e$ ʓ׸c*DT=XVM Wz}Sv^ooc=ET?@w zRW9j++ E**9G*](^`N1asHؠURHI[u ] 3 8e[4l6P;fKs $@ VWs2 [Yo$Ct♳w'x-Б (%yIZM:VTVZRZPfo"lQ̆ڕw3tK_x;DK-k}wL$9oi o'WRp"v:<<40F+b[{l~+$nnnTVK3R$* lޗ;o(i^"8w6-Oƭ] asW|OĘ\.Epɛ"GqǺ(ə? Ch4,QMsּ- 6%AT׃گj L,*;ޕ`x$pO^TNIOcE~Y4=rrR%Pkl-8ߚ;ˌP~Y2V߯5T-uTTCJ[BMJMciQCc籹O@p0,,9w$jOCdgGjEx3gbO_1oOzםtj{S|ag,(;#wٳg|I~4|@*MR+4Wln΀&vs*=ZiV^%rPUzhl]B|y6;)˶u^2#~)M3øg$ZLoF߈UXXwjL={?\.WWpMA$)x .Botcb'Ƥ_w|ѾNAI &BH8m6sqC* zooN0!@Hx _1,A\r$^N[^OEE3``45=}d Q?gVӻwl)R7f~mМRX  Pi*EP&h8Wj#z9㤫hӽ]Ю4 @17&x"8jPUZ?Zv8n6C8dawcf$%A[ʕd > d("cr`8{ rNc;9nWWWWá%f[bAQ SCwF=>}ÜqɼWhA!$ UEΣ\~h. xb) mtLd7w{{kG4Ɓ#(zFC @SQ 7ka*ko.jjB~SX51tCnm } *Vqƌ72V|=2@\W55J֑T(&!Vz|ެhR%0Q$1nh4-'P$5zK^8+[uԸW șFX,H Dz~~nw6 (7Z1F+ƳV|/hL0l^3 Fz li)^%Zm:=v}l/Iʭ<}슕팫OQO%^fs-jWRNU.W$(n9k"e4R}8ױPt~5L:<<7e`0P3~i8FwwwVoqcXeۈ}q#ٓ+`Iqc?XWP{dȼo-:AR~0$ O1'_ؙ仄6e{HÛCGcb0:^T urQPDQUD[z9Se 2\8zc?T2V*)>wu]QZWRJjP(Sfl\ggg2DbHq t1# XP6sLTϞ=3H&GzP+>gtUn++` OQTBE+J"Ɗ~%7*99A1@!_Z"0T&suUE.|Sz}vw<͙s.f'^3NS-j׺]hL-^ڼx<"6nvΰWz(~NNN4$n?n~Ơ4|FDUuxxh P(D@T|[sqڞɰ #k:{+Fmi)ңJSÞk?<<4;H|w1_9S{ s ȼyނ ZK>\pBM/J:::" %My  A@bQGGG֯-„`yOZc.AN`4VSRBlR#VSv 1%\W{'`3RI@ki*K2C Ra0XZvHz=S##;~Tfmat+0OnWZM6_a[E qi08 u5 ۢĴp8Yb(fsnDi^C [#HQ^.t0Lj0@TV*_ 6v(i#HUy\ж./xrL?ʗM!q{E Hpg8|RzUB:zbPK"* >jObe ݄(;REdϘ? MEUAIh{ oB"@tXrIEl#~ -lm}j8 C*A zV[/ O~b\>| "o+Y^phݝy FBK$qErT$;rrݽοm8gIWOP̹Γh7089riU4?zV2b%6DN/ϟ[იo#1D[qnל<4r/N{vzzj-3 C kc[V $Zi3~؈+HnV8/g3Mz~69@EQu:~y o/a%@߁Q[CRҋe\־ۣ'w2@E4o)HgbNG(4X,8 =y.c[6UVrsW}I qUCA6qY4˔i#zWlFO%ݏᲦRP.>rVն b. ;J*3ȓq>3Щ^[@"{Ibq#AlI&AS(}Qghg%PBң͢`P"8j%h` i4o!?;t?I&&iXn)MT(&NDU8{?tw4d2v)NTӶq2( R\џx4 &Ruی"=-EZtP F#M&bZzm/ޡgmu%' < Ottuuew36>q໻;喂4 }¤m¹S/h]oy j!b}.:'!3!X$3 AáѼ IBZNT Tղ$*KMG FHHIүڌ;zBϗ qZmL?$HQlBBo A:\|?(g֡WK\DTԭu8dM@Nbv&5UmMj5vhQHRph.@v7tRt:9av6{ :)b<2TwE'/`|ob|{LN?s 5hA|Ŗ~v17]AGҝZ|85NիB|w.鲝T{ϣvtxF9Kû=*x8Sp8% -BL(~ɊDݮؙNRw{{k}U Ÿ\d#g3٠=w{{tSܘvƻ}1^ "!Sԃ<2j/p@inEXT8 T 4 jڂY;BGtIB,A.Ћ@d/Nb!a' +̒{(wğ!7 ,450za,]77^ X,Z^ #b + N+"G_ף\^>̖JnFzjdUO<< F)-w3 <>>x87]̪ddb4Hm0he(FϘQs@ v9&9-ӃVej="R P|;!& Ãa||m{}rrbhf} QQJZz/mrL$'KH7-V'SI&Jv(^%9Wtw_El٤ 8&ڝÁnPɉ$]ٴiuݜ59x6 *[PRI>}"QKao|N@ހgG(U, Yo6h8,_񳡗0??πq >ӏ)nb̹$h^:aB)Ǘ ^LDcL95,^CӫPk׃F \BA[P 0atTw:>fٙ)Q4"PPۑAF+|jFg5^f@*1?]fS-X Kx7^traA|A_$S{<1.y1W`r)A! cAۆ`?nTr@y^($Md08 Vgg9B{Ö&ą~Qhғ3=߼yk ft{b<ſP13 `RчLTI$rI,AaDPI# cQji2gDC@@P RMZ}MAx{5svSjI/YǨض-)m2v=cSS+b?URGaRUT.U$ek ]NzTyvHjTEz?|KmBI`‘PQ6Mz=3wDŽOAax,~ 3l)GMS}z(DQ͸ IsD_Іޛđb_} fwVfKRM ˩^׌-[p IWO$]|oh7gǑC[Vdj~iLJB8~+ld90O0 q'(8Ȋk^__|= @wl3>>>)ayu=}. 9 sR{ I9e) OY14NS^⺄X9 F<'m}o '9p_H/ R$WMAĽ"0 ݨSdtbXzVTÖ]`(bRč ҍQz3x\EUշQvZTGA9 I>1h=DI L< T}~(ݛS[@]z L%d21w#JpEG@y/jU6'*UJJZT s5~SySe;GsFX3DT_F[6Ju?Z_ Zjj0ST6jH FgU޻z] ޔwogψ(7jAqLRbD[ 0a^8<>"f+}u/!8yƘ"w /y>y#_=r%(R(*HJBr֧ίy^%I7 62ituܿiR BqCFJM?AQnkǏ xC$$/t4*noo-cSݻ\!`Gonn,!2GP2 ]F;-P GD9a_iP,0OfT#(3qMT2zҠpD{#nF).>.U|AT PspF/; K`BEphg c0A J q{F=ȩx8Yho#U]gx'ذE Ө^yߥΫ'q2N'z.;5N?δQj>j(MJb yύ…dHM.l~m>'Ԧ=@}"q[Qie-sx.3IŹ*ftUD@"Qo!E+4Q#$1/#0ޢ_{ ez=k9 QlsWp$VL}FI4y(_t]z "Yx7P 5tיj*wqۀ-Kg~v,hc5nrNǜ>}wB7+I - Ϙ$(wPHq~ip7$]:vƠ0 k>7^ /  K^![9r$qf票Z ?HA{_znk "u@lF"B+0b{PPz9"͛7FAs #AIAbٙnnnWGleb&l5S{eUǪ6B׮RNw(8p+QL1g=EKqz rѻ{`P%-KCo8Cme&Hj3u&$ 96gxQ)4iE:;;{~}{U$^Fy|`F% ^~lV3F;B/ ^BwH nhn(c] ]]]Y•DyjZ*WZWڤ)B'/ uͷ?V/g$]7,l>anF8ScJEQ~E\s~liLߢ(o~aMT &b*Q JeZ2&&hQsƹ07h?I]]]YAF nk45~؇āX@^* |aΑ8!5Qm0Y.C oh\цUTmӴl65ϭM]j 3E%HB1cQAƃ;}"RD5lPִljZjT UkIHF)[uP1Q!{js&5TfF$T7U,Rq"`IqClA IHK[.!EȠQw]׺B8&/PPv|R<朰2AGwcj@A;3<+ 'A[~u HZo? r7^8Gpe*_@BARDk7SUjQfP.ɨἵ%]'(fGo~iIN%^8 4T<`VbJjcz``=KZ|?,W5yɉKz7dblL|f̽ dT݅f} x{PC`?B@}A MdLp.I;V̡AB

TrƣϣbVSdd:j5:fIz2^6%'hcB:9zʯ "0 ,!і (`:'y~>ϊ5QXAR7776ZGUл,i0nBUlDO)ά~1taV6( 8y6?1 p}}mGs[=RUU4ّ&{[톤AY2 wzE##]{!sRnf4jոxz%%d253߽<SP,mA o #"x-d ZgN٤El6kY,dGtzzy;=Fٴ+JP\C˥dh42o0݄ %eEo«S!_D/XvF˒BP`XI~1/`) ~$v2@^拹xF*Ek5e3s%lKklئ/$_q`VTn":e<甯TQ$j?kE?(} E2Fb Ÿ}g+=ᗌ3he@2#xZ͘L `,Pټ{T-*}s@{a̷:BSh}1$ Kuww[_8,{.ϭ0+JJҍ‚ֽN.e}>ve9>Mw+REaYaX|0+Dc4X,Z1x{{wVp5CJbxzd21~ݝN1"Oh45دf3}V$___ϹǡlNOڕBGGG|>pv0(VT^Ie1Z̈';+/HVP!ށ=-&I ;ȇjWTTlxOޑ`ǗPu7!qw##P4]z 3rZ/U(JRX$K~{4VnQuٿ2K :W1Q1m+^Fj7{(nG)YFwPz s CPEۃGļ1U%t'WeBAP:(<2Q efA$w~'ƈl:.hLO{e)7Ά*$qn (3!ӧj6̔&&]*Nf:>/*>FR/ꤛ#%]e߽fT5'z$Z-Wq X,E}Ľ ;Vf3KT^Ɛ0=453C螞27o ('si'è?|`5RcAԃ.r=jS٤]HIlVp@\(rV􇠭I6p~mɫ'K"IycT>YcNʤSq?M1Z^my\l6f~@QAo'],ڤK7 Uin9`ԓS#gA\O=_Bw*,jTN z<{*K?J<==5&S}SKOQmv0v$4MsI.-. Pǥ8"*{i/¢DZRd0JTW۳nZh7E "λ; W5𳦠m@{bBMޮsˠT,FJtzwj(=+pMR&y&DNQ}P8PF:hhcx&<3hZF~o@<,I Ql٨Yi>%GAv[777pJπV X>Oy@_ E[6 pɣ0Y(]wV⼡@1 '(Jb'=!E_+b}1ϟ?en=վrYWWW&sy yZUq$Ywն_Bϙg ?Oɹ$yn]X*owoȓA:C]\\Ǐ6K @3jb1rTj^-y@mI5k˝zb:i=IyMIFWӇёѾ,VƙX,X gYA"$իW) av j5 ;`/xbVbȢYMBZ `D zbU>T*e=`/@ ֻ0,éPHI>$? ^)/.f|y$B#hzGx$ʬ$Kġ$cI6J9?7,@^spıB bK[BTUlЩ9P)G+ b} '?peMyzO+ijZj*M 2oчr'd@ ramh_( ? !PpZ?qףA`xf޼yT>B</{Ę{ڂ}Q]` :ERH^F9$gǏ6fio4$.woB8DrALAyrfPS,4/[KM I7}L1{*-wkݮ5\\DVTUlnwkIZ@F sS3 IDATO1* ݥgϞe $qĀa$ĦE\GGGvr@F$gԦJ+8aHQo~|偁Ҩ*@gq4g\q2ۄ)!ŢNNN4 5f t<1zT* W:m4=mf4D]'''FP>@zj>B#6zkPXT( 5N* jNvyP`4h r/'Lf66$qOh=-^L]n,Tϟ?*HAZ^ >= D]@|Gg;0[F&1^k2~%g#|Wzk@DyT~>{Cg7lU{ b#"Z#@B4ٚ. Zpg/˙՞IV`o׉}!wsI7Fj1O45]BW溻Yj2^k1FvT)i>]sp8W(| su $ηaeĦZQkMS CKD¦݌ ΒY@e4i:H G^n|NS:R_e8aWb v80q+*oOR"28l h 6}~'~HT\~"< FH@Os!m^< % %{LӨs3xI\)+F *:xX ?euӌ/%}:pa{б_E.!bI,f-r .NZէOrl~ N&;y&WDTo$6Hа^BD~A/WxE53~!~qPP3ΏZ6^6P*׼>Na 2RdT(T \y@o޼@[F<oH]癭mUk-G0G+k/>FJs,ALjq|+?u'ۍ.u%PvjͲz4 T)We،iq&Qݣ#i$Ad#P8z={Цp;88ޯQFc )JK]ⓓ]\\?#+>8[Pa|3\.c@!3ZbMl1%kߠPIҨ:&$MG4٩=ƥVSAV+|4 { w}dQ 2PFFi~}LJjf$Z @? 4 q$ H@+^W*ji6+@TR<0.߯Ju蝌Yru|? ti}l|߄?_k6$*Z< >IfѪ s=cr:'B*k5zNZ-6L8m=u/;|ǺKiQ>,gfOKgn'E :eիWH\XT؜I }o,(Y&130{36XpEBOk<K-qu:F' a2(Z ׯ-Cc@h|v/VZ(txfx"GQrl8^)JIRRYrxZ9/R&Z.Mֺ5YasKMc-d>j?l?+ K -EAY㩪(z޿orrD p/0 |ZvJD@7X_)ҶX, ){} 뛛;$Ab^:l6zxx8TznČ P4͏o1@aTXTT( > N] BsyC0GPx.YGg WE!HǨ0|$ȗ P,h:W[u$w-*N3y>JO=ǣM~@~7W|V/F(*X;jӝ ӹP. DP/8e ch#4fG.)N~χjFijk;+$&@ɡc8_}YBDzy \fhlo@bxE@2fxЁ9ga1Qt1Lы:Rl0WbrJgnJ\UjCXDk<\jtOs]ith$jfd+k uU  s6r~/foSQ"hЭ®+k>[ kf65¹]һ%V+,ҶqnݨkZT{V&&"0PqxblJZ-QHPzB-,Ե"UYUņsy؞E>EoFcfT\/F D͓ 'ʶR)4/KXFL9t;m@GZEQQacTS9`cL % Q%Av]S6  N.t;8`^*t)ˋVQ5 jU~}!&m իWF2}L;_@sKO50q A۳FC?.ғg9>>qqq|xlxQDDrxr~0TZ6׺4Zzh7K=Vmd'~W,iL5,\,M@C3E-SX,znnnh4tsscXNG,~ʟàuBKC~MQuw]}#1v-Ƃs0~<۞ZZ~'a @[,ېܼ׳y.7XF^~ I`H/NIR9AǏMEЃ¥M<*jG)^#pL&u@坎.J3SUn1rFdi:3m:tMAEZ}"yu1JyGeT~ovjj[,BZ-[)mFx @x\|)=*ĆH_֧OrTɽ^daRH'L8Il'Lwc$ʦhzML ՉPWX"53Ǐ9kZ\.ij.DSn\-t\gYnh$*DE=܄Z/INCh-1mvƜ Pye3 Ď[KZ0$~Ćnۙ9cA>|왱6S}00hz왮MYH S,ac{+FaxGGۈůJRh4Rp}RY{g+t+;_ * :!}\/`K~f҂Jv"w-tAo*FI NʼnjjkZ $@fI@V%ITINe{܀{$x]x^Q)Vmi:j6Yqh`fnǛsYOm(L7.hL~'g " 1"C 1@ż(3Ѐ ${=j0L߿7B`ڰX$xl,*!;ǀz(I؊8֢x/;Qb1Xq|hgpu@%uZ= Cu:&FFv{{k o£(`'M֓@ ??ڛ!, j}zPfrizy2琇[HVuUwգFK4l2 Yo ? _Z0lȀU]s"3##/8d5^Y$ϒ'yy)|HpGtvQcDz7旉#?$dJAL42C@"Oloa#  X^ MTT ZMz+Ȃ+U*?-j!#egȋ?S0' k%8\vU#*[7*#w]y`xTz;1M;'KS%J&Y$*cHv 7M$/M%Jݷu$MEm ^EMgv/pCkV3@mAge qwrt:u-H$YurȩI;ߛt . P/[(/˽n<WӁ/oA(ݮok<8s8<3AĐ{Orϛͳz=Ν;я~RW^9x^pv:wֹk3y}K| xNSW'*MgJWL&fΙ:؝Un4ncwVSPT^ h b'ˑR)[7DpzE\#Ce}_ [.>E d̳ڮt|]zum8TUkjtli1*o^Ŋ։m#||cOy0?tƩvǍ6eTV_ WYV3_T5y#J ݭ; <J$jNTv `׭q~$vaܫw*C9>yDggg`c%'IS-5$;z k TZS|܀ h5tOpeDPd|/ϒn@`{Vb] F'/+  뿾+NfUUKmEXE <ʁDu4UUq`tAX~p}}\ˈh`A r2 :,7w^eq pڨݠ9xxF@@鸫A 4`A/z!]_Y+np\VjNL$A`5ɋ /oM=_HztVEia4Mu]]__n7~ X n֡sz۵ VP^+_] 4Ix*Z'Z/c['`KҳH<&]'NWMT難MJM-~kBV˜mhԨ7ܙCLG`m#pJ sKQ#p1b-Fk#Ɓ(2EάEᬣ(r|&\)8Tg.ΝA3g1f]jw&s&1$],Cqvf/˜nj%E{z&+@&ķ;Fu Zy]0[e?x[Cv|y302 pdvW%sۨRd[3E,Jհ&1dxﻠđb2O[Tܢi7\.ȗ+SP!@x2UާڬbzFfIbXUh(NP|`g!< y>*RTRP\juB &”twPkd``n@~ۭ](REkH@Ub_r @av0n޽{Ӵc/d\ˀem^׎c$)O$"td = amOYːAv5GI#kʃ; $jA9f;POOOu}}oP:x'^nCi?+3&م#y;K$RaNB(I<4*^O%^; jcG(v:5dh]ݺݮ3vNQ${Хyáz^f%.q{r hMng>|̶0;[mŅv R m6ځSt[< ʹ$r,')(Mxߏ׮ѣ{##Q.K{}xt#R…dgz99q+U>>N KTٙS$c8mBjEIU|;b.K+CнZҽ~|Ӊ‚ϵ 7 P>t#k5MT浉޽MU*QRZs/N.a]`.'~1ND4Le';&V=8enZ~r>BFnw wKҏ?vcsf4AXcp2^uz"QFHiB.tĸh@P I5 5&o[ +²jSJ$Ys`0F\! 8݁d$. Q@+pEЁXgԵ$ R~mi4*˺PSG*}0W}DJ)/-TR:&E z4'2{>yT Pk+rc g?|rߧigϞZzx,I bYK\pIɓ'zꕎ26+Z9hUX[f|r %)DcSd3yչoV u6nmpTr=Q%mX6XJ]0#D5K)8::r͗udDG3bP Aw뼹Qs[r)]ёV@vL&0T$j5@/l|W'cwx"Ik=)`y$kcsz; Ԭ&^j;= ׅa<JN4b 58u֜g‘dItA7 SrU|$;P!Plai0Ml[.[D¯${FC˅Z!јf3}}pH&h5ʎDZN\|9glQ GT͹qqB&vm䣏>L`P֠h\޽{[kp婵fַvnжz8̘"mA/G%!@maT0ݔDUOKGN of4W: ܜ%>n>DgI捵:Z|pt$gΖ5C!GX=#0&ӭsFQ# $Fo]hwqmN&woWMv{:BQ/w+' ;H ߪ>XE#DmGL{O"-8eXk4̻ڕgVż'we e?0ɓ'> X7sb5.\.c-+ɴ5 nK ÇQt̚ӉG~}EMAϞ|CSyp)&Iz[5 ±E 2MNVs.E B 3VԊlImrkҀ0 uw xV>{vl6ӽ{\I1j#CaZ:OXlP13g _lGkp YMshx@.0T ]%ɗWF`چ#lDqI8XA H$Lt$lS,1v}=>${07]jo`+Iaj=`FahkUCŴyK%PNRguDŤ$VrjhȘV7vS h ?$YR |,?R( y(P- [v f8bI mDR^5ƢNtv7!]2w3'ϔBl`a@n B$eE~o2+sGMnc55MgCBJi~AD}fU.h>ժw4R8V5Z~10rb*-ɔ;̸&VK4%6gF$PmbP` LDMm^< j4FDa8+U+Ztvo1vU TX0F nAi[oZ\0r*R֖q h=NĘ&goGCŶnUǠV'jՊ%&ky w/,ժm傼BfsgN.Xi8: s *flΤPTZX%'jbZ6.%JubM (r7^Zxu6/Ս 1Y:gV`F(e<5ۿ]wNM Сsm6+%mr7jg*e<ҿΓ@\SBMi" Eάk3@T4>}0 v9l@ jjl((wYvInu}}^Kv3Mx]5Bh>P,@2g^+2I(`1!żP8!~ȯ3AdI-f̐[Y5.UيnAG-#J$Iy&?D;obfژE~x (U8Y+D*-8KmשZ=8Ɉg` pyv3Ƹy8v<&p vxOB'-^+0],%VEn^>"Ayph 8m8&P\ d z삔5Laee~)\(QC;>ہ$RQO~N$/pIؓuK^R|R\xto 7ͪJqA} %HXbp S9[:+IfY)dPm{,3:Է"bJ(Yz:T㚶նʥ,K)5J=^؅ 4A"`4eW7TݵY1 n.G]#0pNr8֌HҶrP"SG}G-Y7xf'&8Y@+0-BKiz{Clr I[kTYCE@µݞdZ\.:d+A@(ѻώRuܸY_QP^Dbj9[]EWǏG`Kf m Om'pϰz *  ylhQp?Q@Y3$Ob`^.Dpt֙x驮l ytTV `7,DbV'cV@T&*#yzR*4wUAQ/j:g b ŮI"4 f$ TFíTpTV?S³c&aݮP[Hv QxwK (,7Ocw(o`~tж"Xʀ"(HrY|t(]I©yKr:btjpP_(r8 \ n*ґ^F#7ʇnZZ,St]]__g&^ŠhtP6vuqq()HPYwWL3|ƽᠡ x̊_@unp%R T'] (k5g9\+DOTZH恒(m)( X_QlY%+[1JbG*4\AW])Kc(iKۍuJ^Z hG̭B3PEq8I_KΉ]n@h 0E&a4gU :Th$^l?('7s0ӧO5\B$Pei&:qp"XթuγO/kr5*Z*JuD5 尨xknjiZ;Q*?HS4#|.yXAb }:Ak|s_F#uQ񱳂?-3M<\"QZ"”N(X77:5@F!FAgFh8Zpͥ3%PUQREsD;)06,~h_xn^t Q߱fq_!@f`)F PRV>(K#7_WwHx*䋊JŊ򹂳o"`|j[ry; ,12&ֲq6B HVE00 iOOO]R{Z<ҽN Cz?8v !W4 eJ%ɁTEh$,Dm{(ܯlٰE;4f$ ;'y'}+dm[[;_$&͑mNJV5ꍌoIA.!qgy|1eYg\N3Rl[h5jr|.#qu)JWDY0@#z;*PV=Nγ 6bP@cr9yؠO{(3e$_|w_Y3t1TAt<`OZ dXF"m/Lj9d2qJEjս{eh lSg+B|xRK j5]Q{jא5 ժ[eb .; " 3{>(-:w( sד-'9- S9cx8Juuu`Zh4-$ӡHb"3so2ϪPkz^#=z~$I37^ĽNwb2Z ytttXVI4VO3sJhϭ씗sMNuJDl"E>tb7M7~;_V^k @RtJ/pDA]3ߛ k0I+t/ƚ,G@C|ƨ9s<0~<86h(װ; 0'3}sH B/@@iz 3.n PbAqzPǡhQ>wO;8U+ʋ{|_6xA$h0z. IC%y1bU@°S(.*0N$ @V@CmJm/=|s^)P&s&Va9⃪|rt)WI;#uCN(X @Fd J+ء(ƣ*Ւ|֝y?< sޤ*䪚BA^rW{HIekHBMR0X pgϞZB,TXMx]:Mg +$mi+ŠU>{wbE Wj()\-[EYTx4VWXr1Z IDAT<7]E (h%q>f|!PT3s_͜祊y늒(P\p0|l/_fLco΂ݡN7A:Da$#2t/ y}fHn[BMû=b;%:Hv$A⃠f9hb'6J[PkPT\[ڔT*5-6 $`E"g{fӧOu}}Ԕ, ZNq9W^}@Dl;J\(rǾWx !bJj1\ŬH8rYrQXjxZ'}dUQokU*VZm\8>>? $F#$9>u69ocDPF5=9Ϟ=sbJ`Obl6uqqmilzq3AaY H$8aQw2?| iЊ[AX|Aɡ&P(8膭%a4 ECEx 8@K!>E*A.-"\ x،C2%11Sգ[]TzMJd|9zmDJ]MJ6DzK66Sf\;g8DWWWn%<._Λ@67o̚Snܹsǡ;m› )l9cd*}2$@T0HP.(Xӑ{{DR[pu4& IQ;*俣rBP~//6yE'#yڏ4Z}އ~?P/_tJ$ DOw^W^ni:+\//I^xX]J=O^*_T9\ -IzD?$ݮ=Z8﹍URsKMI 'ݻw3S v-я~ v}F{@Rs玃Q`s:SD{cG?X/F+bAG 4)=8dTL7Nٱ.PQA焅 n /f5L@Eyf]wЩeɓ'Fz2)p#U<ƾaT{((I7T[K38ړJ|$%6HvXn?ojPZ *br^*],BCU:B:Sefb/ ο\^+2e_*E98[ Kb jxtzMI+UM*lj_+5\r# ?`F/4_iRg.?'/^j{J~CLt;!!q%؟Q0L>tB9P(\jLJ9;~u'cIWpCTg *)5LDv[777:99q0ύ`EHtֵȘJ(ZPI➵nS4񺬢R E}Iqӧ/j[GG(Xni|h4RqhSY/[(کONN^J[|leSQ!rA0X_ࣁ~S*UcH3  ƒKM0tNv?7<cVPqXq4;</kaƑwd}//WSk3X|Uu؀976ҵZHF p>dQV ^0 8{VkZ2Ev5@dVB<Ŝ5gp$I&4QRd6RS?Tg\FgY|KV 7sEZx$$xMPM5_5[knf?$<;wuK|_rY(v]TA A1DAevĂ=yj6}|vss`\%roN8`P==! ٙڣ#g)]$p]ZA$H hWѣGz*c-bT]F3bQ^Z Zf!:(a/l~DgyXr$w;3W_k<"48C~u7㪒jQZKQvb*/HzotuV*wIe}$I]wʿZhhus$E5]M' [NԏŹ #d pΘN\__;v݂Zۭ޽% @eȼsKVׯ#p3:a^#q%;b>:"K(˻e @hǏ@Ҩ( PCTpd )5Y^pZw|Dwn c잤MpBLTɊEei|r<|m]@clZKfR4M *)*ȧQ۳̻Ix`y}=弒6XFVDWˁF;+j*ȥZo/?n3W&k%Jt{jo$dk?yIUh/%O?ӿ`Fj 3+*ZVFGƖm@ꍺBGqVtpf+a*S%뒂r/jZk eu=q< 4U3&1ou]wVoQ$/kŘ>'t]5MܨX,9PU*(I'k4F:::rgڴnv*BGY VLs\)MD<=wz# .$3ַg3d@`)T[aөݮsnCK14⾼txpҡӷ VEqa].'݄>CJ7dw ё]¸8k=x@~_۽@X+"J0ճ$J:5)ΫhX:Qv^.5f^,]wkaJ!Ir6á+,Y.q-5l67Ĥ@E.4c6l[A,>nAnꍺRAt>R>懺YX&+%i,}2uNb%2wt!'ƊӭF3?/5KT.Wu1>"3鄬AhvU\l>Xկ6 -  Ǥ֨#~EfZPkL. vDKQV[|>;`0p]'///@"G&`JA7އ 㨛*#e q#g:}ǙC~k,r]!%'L@Ѣwbgj\H xa!g- q|, v\v* E/.d "B-T^<:Ve\H~ЍPoȁ#6{: tv4yVK{^]\Q)_ܭ%U~ B,Okⵢ,:`ϓNZh1(ڬ7T}FĔ JZ;dX`CaeG΀u:_vP*t# GKQXpF;O$D -ڀhNX3pNOO<,b05J^R5'kO˿qQ_j6 uhmMC2c2t~4Vl6Y)ot9Ts/Z,BJG#m6+e9>+ZES=xs^I[l74/UIh.W*U*VTT W.nBM&z=2ako;bx\Jrmд֎XZD B.a2~11/ҽ.ؙr^GaiIE3N&"9h6/-D"&ÑhdDPI6aBjr$I\`BbDS. >olZգG\\@$T?dI `HL7n3$pN/zZm*y72sa.wj4j9[^oV ̕[23ec%@P2Bg F-aQ`Y[K5~z&Y#fFh0!w1m]\\0gl[%;Lu40L$z]J{X%CBN=Xdb,)\Q1 lLjHVEp:??SRl4_Adeq2NrC/R~UT/બ1IRqp$KPc,@^de28Zٰ`B`j׷X,_3R_\E+kJ vveC/O;jkz9#="Q+\.N/wvU"Vp/i_t:u7 y8:\=s3(8::RpsX)+# ێ"ij\h<b} W/{VIUEU{UnwBt'J*x[ptb;h?O$JDwɟC}'+UjEUyn^j9Y;`SguS%ڪ**(8M][=b>>] O$_r(?/t6e' @777ַ֍Yx. *J:??w_d .%A~T}o w鸯g?Y1\m[-xPCGbxh)DXO3B2 )`c:BPDv`v2_ D)9VVF\rWA?to)R-Cl~Hl{Xz D4FC ]#1rkɎUkb .l./sI8DEg@[e /LB׉ҕ@Dmf@|Ү\.z{c.6Pϵ&o'bOg&3gz]pgX+B/Y WY8{_7gKMFS%q.,UP$UF*rYEfq6> hm&xG,~ Yq9@c@t4^W 9O^g?)_iT/?(Jdgt"+%O$Wlqd$ISVTv볉$$f7Q=^z=VBNr^ٵfEATW&ԍ)eDZΨ#u,B`OV,*ܪZ:A,E͍:CA,` Ifd8?爣t777nwDjʬaTTԘy`xAaz BM2d%™Dz||+4(űhx&XSs@Ϡh}Z$1; i*u+2t Uq zl6NCOݺ:ԭ\`I^ &^;bMFÑyU i[2гwJie7)r*4WZ#͖r< TN3c =3f $ ""t5@v%|/KňU6#^ÔJ~/ٽKM2PHfY(W)'~^7&NS3ϛoCm8r.qyt?Knv?Gw"[ɋ].h&˗/5#U9k,b]Ug?==&g<ӿYQDE) T5o|É># GOb=2'|"jE82<{bAOP$QUz=1#nm)z]Q}5p\Nn b:::r!ppkj4j6n$arM \NATz&R+ s–K"$m: *X,TT |*-[v&K&;i9TVYuA IDAT$m"ww`~>87]5^2u;Kpݳjh6(ߩ ee`e+9RIR'BORjFLU.GHrp,HHvT$vP|ř_VMg^g#030.HQRcǦ۔ڌ-a4BaDƑf˾_*N7K=ȶ>IHaF$b҄7uF;'· V*ʒk28x+hC U*%*wg7!?{i75D;[o^{$U5**vW\GX(h]x||nK'ڲz@K*@ >T? IdY xN5 CanY!# Fn׭aX₎ 32B;t]v[W 4UP(^`ʮ%ȜVS#ؽn`0*uT."qS+3ބ`x:aH000㨶4U^SF3?>52=$SY(>q"w( u1T?|9?=S>_PσeNZ1g)W+&z휆גV:͌"yN,v07쐢R O; g[5]Q(ںs $^%clxݣpVˍUiӠj5}?kAEoR82LjiXqa gl:j$kzjE.+* O[$+h4/B$KK?^v\BlW V:th#qVڻc8?[aVGZ NW3K+x6bQPn[ jk^jN3ۻn'aٽ͊䃙$K* ꕎƣqNp 0-8$&P~lpqqfi >r<գ`B;^|ČOAV\#cK,0^ !l_Bîer'yfARy63ŠN#KT-?vP $\`g-F\v-,]Sd(}6 CWR߃3wHto3{BIH>c‚BrQiZRϥZoV*~{;U~z>ʘt3qtPJKMjf.|*gf49;+ s.4s-V̥D@G`1(>]]]RbڇǕ IYT 1_i:X>k mzH8 G'j{Srݬo&8Uo-VS])ISu;=MLLw >}pr&?s=nUɹ2=kf72}|pk Eհj+k2jި\:܇Kz=]__s9tΝ&0f n<;`T$k+F>~Ï?s3M>ֽ{gGGG.ӼAyF#MVz=/NKݢ%ۅ 4ٞf:>>v4f9,c381xCHVl7+kC*L~P~H1/V@7&#ӡHrt :.Xgl6u}]\\7a.H)@T)ڮTK~orWALM`-`Harᣇӱ֫Hi}5;ADo[TbZZ~$LE{i<$.(9Twl{_ggzzDQLJI9-+,$2l6lE '#0@ O~ q1tI(ECνUukfoqHF=cVvǔQȕAҀH;ʸ]Kd%&@T*\ kɋ5EB O`'JG@ MeI#QvWՕ=S3ZͭAvV(NM,!|ak^-`OjfMWk::*yPd>WcqguG[$q^u~ZLBEQ+άDQdShhUi>S u$*f:D1i^w+dBw]L=h0qܤȰϕ&Fz q$)QP>3w4 Zs6 ;lՀVi+IڍcEI8h8p0V?`8d* g|.Exzv]}-/* \]k V?_[^ZMF,[ϟ+drvLtf Ttk)ZP)_S~G^wcGrT*7;5@_3jT(j2~]ǹΎ3Q%ImwttVi g޽{LfM70tpz^ÉxK޷)}m]찅 јNr nd 'lё^~4 =h`}2*Yņ~uܠE#Lw=p0e jL!ٸK*%e[ \o{~g:5nZzݨۻQSW0cMcMơ&ah)K/WILV9ْYHNF7Wz_O飗oHjɔ!𴂊Θd bw Y4h*R(rܽ{WN'OY˿0"=99֖ݮCqO ^\\<FaJVUm, CuΝLAsn|vL1瞢؟lcBCe &06;0PAOAa h4J M]̛J>˗/J!:7A7\tF84 @L&" dGn7k.X.@tk=OmZu}VK0{y+e+G+:1vXӛF"kNBV )1%/~IӜ7}U5 EG3.C5zՍqIZY*1 GEWzyB94#뼉ߣV5iq]@|x2V3{|c>:qɜ(.^(~#Cv VNώ_h2髖rX?ѳS8gB~I)KZA{z+rSE *:,l]C֪; =FD4 hy d(.Lp`z3n%G.!Z-lmmBDZsQa/^. 0 (@$adJ^ύ {e_L;3}עeKLmZ[[{B@ і%Kw UlO"%1(8x{AAHp#-gFCa҉Йц mU( ,#WѲA$iKОG$W(+ O~_?˷SlN/{'uzV7>E~|Bh:U}BC3EuAт=IsHR[&؟"\hht4t\/Pdk(C۝Ø7PnFrQI4yᄎsTtzO4i6R$݀v$NQ3K:R++F(>,(N}E8zv]}義q~ۮzi}Њue%Wڐ' U+muݹQ>_pKḣkhqb&?dmBG1r{Fek]g㞰4Y[Fq]wf2X$hVɒǚ٨/0b`uYjΎ[BD69 Ŕ 2-8д@stY ]/ oχ:N8g֦Iٙ{x.L%@# Cw3 FKXE^ * {X  MofHPX1b)W-[n̉NW$e(a[w׫gDQ8u  p HZsfôc_FM5Rt ]dH1DUZ.h;6t:jl+_+Fq8r̄dRoBp)r};,C'aQ_|EJ^AKWVPdE/s(ؓ› AU7}5*nmmI.//9nCb9oWXt̅BA_NȽs\T*M#өͦ+6u>ޞcsC/̎XۮCw )Rf+Ք`XUj2 5`80Rx1d`5>X,>1] :&ݾS$Bw;1 hȟ9"bnHᣣ# Ô↎FcB IDATe j@HN0677]g 9Óth ʿ3B}Q?kنp"ewڦ%chewRl Msy?t-`@a`0kWvwwu~~ܘh4ܠ69s0hssӡ 7RP ZTuӽQ+Ū49;Ld v 2#b7K ^^Po C^dEx6Z _7l@ʹVEv Mݠ,t$f珑 4 TQj$/ih t6JXt~~v.NI/¹\m¼ĴSkkkz~`%/// F z1$i<koo5!zw }姾g^_d.2gSu(4tJ5oL;=NFn,ϒMi7ь!XFNah4b5q8W* G*W%v~b/RG`Qdߐ*JqOـ ⥕~~RDz%| F)<@ɂ86fOz$4r6$eZn @ʶz^I/LXR 9TK:*g3bгgϴj*gsn?9Ύ;A3Fp6Bnocgi#v 'u7>F"Bf{" >RAv1ìڳ:f VU磲&B0sASNpA\8R{IC5MC{7G̲AIL0 J>88pPlN(94̧! 1NBnR0!mu{TK<%Ti4Rٱ#oSOuw/X.~VM׭P4}@whnYX).&gC >3.nL1,h,٤bscѳ@b+=6.k< 3^$yP4"3jl/Q4g?/C]FYT[5^aѰ;[ 'DkٟPYI{o(hv%tV]tzy=]U8ըmպQPT2WWWn)6d&3d !*% nmNBVd"(ZS1 0\[[[|ƄС^4Myg xwŋT dh`Clr{;@k\E`B' NRTO!CرDAv ["0Ga}ZS`r`RA`d8>>v,qxA4l ‚jgќ9h1B@Հ0*vU(G3{C[n,mW :p I#ɢbYdyy繾 ??z}KZvLp$0VDJ bW]|0?x ﰴuGc`Zεs- < RܡنáVQ c"EhkB j oF4&ϗYHLhg$VΰC|rsHR.MF~)XWs׿D-o|ZrŞ݆?k-èUTw ̃411siXQ' ;-M FnƲ빥 M4 q-mllb9.uqq$S:d5+Zgb0 ab'sV9'81v[c8LHbĢ\6,[h HaeAb` UѦ0:Ay} ABt:,^)Uk1F-60QMZjYhtq*TbYu:(6sIz(T…4r]~9tWd1zJ6(-f˓ź@S4 N&d>&]EOӄ i&0+,)H5t<Maػ=bג$]6$?u\{+t5z1#[]]H+z/*{cGt{"*zo3J^p3Ttv:w^<}%-jK= UE#_k+t6MEemf(Y,3*C㴷:\__1?ǧ,MŊ8/IϞP7tz.2H_E. r8%-T777v&xF@rY/_LY 3Ә?Կ`gg 2 x91Ô :-*vBZuo842n{Rtm-C CS|)<`>p +7z%KݮC48h|M6 ^s7f08oK\uL.{Տ^GSEw6:Ytνyj~wpΝ'YMo"]ܹP!3tH~B9vx3@6#"B)1ȋb2]-;DlphHh>T&4Fx6ޙsNo=q7߿_n~0hooO2h11ts3s6zT5w/J~StAZzumo8+-I⠶tASOS8M|V9kkkt:7%0מݻkm %ōς %EQj(#e80l~8 !.}Fmh͠]hu+B ƣj5 CyT\U{k3j\S-gz[p4vr[҄6&i͡Z,V -a[rW Se4 Pp-^eAEoC$/?)j0DŽY箝 L[D7FVѦRؔ-pM7bS1T=9tMǏsXҴJ% /]bĊ N6fhRR9 7&4-;F˙q}}4bcs~@VTRJTaج]%4114(HCB9քpѱug }NϚ0Z&c`Dn6ͮBd+ij<nfWۥrY^Oa48(&*E&hQj^0A+fK6c\#}uOY3y~`$LIi`,!)?G &n5ǁh3VYΌU(e0wfq>,;K  L&H~Ο+)' Xo=Rơ6yCq~3]2^ Kejz :JUI%Dr}Ak.Pz:6{777]#D:Rn[4~_{{{:;;S>wCL \44P\\tۖ¤9bp5%DLk;zpO׃9],tI]'ƛl-E8;#qZ X*Yws26n.IztghmBF%))H*=|7]'А%IVZFQf[ouG4MW*Ysj4w^jvƁO+Pl@Ń@fS]+!^룏>Zy㉬B˽1x7s5KݢٞL&#QmY75?jE3Yן m&4@;dM86Ŗ"Ía̡BB٠}FF[Cfl7ʐT MVx9&#MB@kAwx68}r恮r}}ȼ,F) 46K?\-j<TUptd ^6v>=ɓN_\+*24!vi$Ia*'iAn؜][?@,Xe Ȟ@ &Iiw4 #kk*Jzc}?R;<_8SF+* 1[{ͪ" MVJ%Ys.K]m 2`6:#Zʛhk2Nt~v$tQd1 Gs3N+z&@# Cu:,1O!a/8عt {n]AFߦYD6N8jijGV Pt#2g_hX?v4e^p_cE>j)DAC?%`qA 2il mƆsàNʡŦ~]ȃɮ4!ggM'۴E=zlAj L}H 7".MS.gT P4TTEv:4?/C IDAT-(21֤G~JTg4ͽ a5 3, ,e6Wuv/VrSh"9h`ONN|x8QPV!(*Lϵ^ks}>Y4T,o{[^^:/%=O5@Eg- N~{d2T~燝$,JӂujwWEO 7wDZ+\78YDIAArrYg?bn.b[61g̾vr3ݻwOng69TD0rloo*lXjZ{^x?Q4ȓlKI|:bEcY#yc`X\>2Mn d9(*p|hÈ9\:P1ɼ!vg1]#P`f2uuu.e4aumONNt}xŴ0dBsc%IG C STrYRV| pfJWˣGjjm'BJ-kXP%63;=oV`^]~_W5~N@h-P5#7,<׍A ʊFE^X M@2zD`8.m{te|)=ycO ??=ZeSw#D6<]8fʔ6UL^[ǒH[2|ҩ #SxWb^^fIlLoFKqX[[sΝ;:>>vAl4lNU "kccå \V*]\\P  ܂ zti h4E BG1q#Ԣ5`{;潢رBFA:%?Q8p0Ñ[cT]EήBGFGLfM]v"؎s6C.\@gК :D }Nqc!obs'.uZ,*c(<5qtd|!x8X)DQZl!o'7ai\i99;{oB0^FM'8xٷoB틾rA^5^D2V.r1HI;dͬsEn¥5i#Q)@ ӤQq^&a%ϑƣYt*U+uM5Tm m֤"ba[49[Zͫ"mtU[(81flF!e\˂qE:}Ea$mgV8<pU ժ HT`-y=SP3!P[Bh4+ S?k[ѫ '@ы9rvg35ܦ6 RW^]X1#@y(/ԣollŋQsz3 )g6` Pd͏Hwu6 T>y`Apaq2 ( g0f-wyNNNyc{4=gMP*XP|?o$t-Pd 7Xw 8\___aLH=kkkK)5ҡ P9V;lUBQX¿A W md=[>Wt9.h}3XT B^BNa4RPr%Y^|+w)|SHoq>+ǎTB_A^{_m]G3Ɔih:U>w&'< .n_c֖Sآq2 ErQ8#fЂlh]09歳ZVjE֖C HRYBIn_J|rEM5֋RkᖆkG۳Wow8g JK餬aw{ YXZV"TQ6Z,[򶑤EY^$,jc}W~BMgd =+d2q(\M'6 P "޽{a"fub?"PNNN4Oya&Cg05 CFj0Nq - @Ɏ Z0lH/ _*fnEK@><:UXރFA"5f3MUr2'/76ؘ,m.x)*\G9}rc{n+* %aQ~RuO[)m97޽/_bhMJ<؟$Ic€&K΋=za/`IF677Kzss] } _pfÇl6kS_\\jUV}d_z葫}C# C1:{Mvv3- OpJZq2M;J4wxx3̴ŎLapB/?"=cz@f[B;ºcV"oQ0S1m* e3y^ /}W5\< @ai$)2bhu ،+i{nR?^-xx˛g*%O]ݿhݚeÈw=纤у%هΖLJa!C/bF.\[[s w+G{ȕ'l'jTbqj=ݮ7=Ea qg*+wI[.xaOˁ6?zsL^s݋$7y0 ٙlS*jXu8X 7nU uorE+8Z95Hf 1/B0VR'skk DbQ̜2L!ܓ ؜g;3v W6HDŽF6x Y3E\4gw[?*F `D5::fkT@WdZn[Xn<ʹ|ͦ+J]*&v&}q`#<8ёNOO݌$E!tG=gw:UWOXl 8ヮx,>lg;I8`U(W+U9n2g"+J+gjtzW~z{V>1m b8{j }ӿ5Zih& n\]Mc#ElSp35kyfk똃3]; FB܃:a' r+#yšBBQW?wOfin,JyJT;[d$o_{/jym73,[w- xC(;C?sę-M^P.3sfj8Et::kNVw]B'p7fpm3t/l߰>(C7cZyN:=8bѳmD' 3i Ri4Jzrr%xA)g4 [bX[3z}9/S#9TNG鳾ip,S˷hh2t{9a0H1g_4ao~ޢ`-:34d[a# *=l>/R^G©SOY[ Rfs /l,*ki3Qz&Qʉe'sYm[iӆ42JsxXԻhkcGY: \.fi T^A\"034yV0mnnf}uyy yS@K.//{yX@m"hj̔J%lyuuvk6 8dGEvwwݽ~||>f{g&á\.~CnfDVFs {,҄fwF0v #CQx;$lAᴋy8@~_N]CYs푦Jԍf`e0χ䂢A", J0Qfu?~JL\JNq^{ $Y8hni?}_oGJi8͝ |ukAvLF$k EK0|sc î zC kWƝe8kIboWO;y/+XjlV)w2{de&1eޜd奨[XɢQHV,Q󲠼W7-k:{yU+ =M P Ѐ iϙT0l6]# I״MMYό1޽{VzC;;;E#]bA?X8]p͵e|a_}ݻwu||֑'4 ;0 Ս-i4Om#H3 ! +\7//"-~08wvvtzzr)E|>ԧ>>H.}hva3.0ƛx?0q. ! &ݘ0 *&wq5woIP#7G*MSk#%Wo2sy+mqZZLTkO g1cwMaZ/Nu6Ǐ) :TK#ŵO+0уﹸЧ>)]\\(9*Pk,bz<k4kmk ^?Vi~Airg+r\!/+ziB6+J$+/PN2@mF)[άv3Qy^o]~\ը7Uzxx/_:-;,E4{` | Hts=W^9e{{!s|BNI%RRI^z3 U(RF'IY8G{7@#=5$n gssӅ@-_\\8Ԍq҆:Èم'0fܸiR%f.mAt@tt*A[ѳ<.>ZyP$J^ɉ^1ܱXކbe6PA,=4lUտT-7N"cUvxxV s4X;M6fDQd6fa^ȯ'iHa<48GKCw:RmW6e|S~өbg6G\$B1BWڰ6΢M&wCI&>d\XUt`bh:4*,>Xg?H7~f*:D٬kyן_//?ѿS4*h2++8[n>M6nPe4[9w^y%Re9Mu/p=0hH'-6z6wʳ:q[#Jkƈё 8Ө:I9󢚍}@ao$T\1\>TӧO.^P֠f4n+CP`$;~o5|$ËĄ$<) ;-8Jit }l6 IDATr2ܙi:ѓI︣y-4)vnnpAMcǺ@r<U]ןpC;jpUJ<("(*I;#)Ι?;׍A[0Hƌ?po&^vlpچ]\̋~o %5XPq<^ ūnmTt& :#j5I9߾(A+)U zp Ͱ()e5ֶn]ɓZX3+}!PlLYsݚeAjh8ra:`V871˲&YѣG:??w.|C!4Y7 $>`6MZ-mmm sr GR@06CAuϟ19IIփ"3 xkn6kHrs9np1E*EW@EiMOA!.P`Ī;N]1%,K6,B+Cl0@P>vt 5nӊl6 tᆱVk/Zv]r1J;,4F<`FU@4@z]ATSq*צ K7oU+$y>fšCI܆~\?[TjzqCMy Fh@ehi0C92D`RRqa+4=\RYNWc ?\\MHM%Eu7ry_QOhAo[0Xh N-1QݾIJ]{<ӊsI[ƒnG]J*R;'qq): cA|"(w4z1g1fn1EXGgÇvS4 vv:Ԉ>ϩիWݼD⋁UfGv&("FD7xH_}[zu=xXsɽ#zN\QxL:z;9Ǫ.܀q@ @C.@;D wu6#&J32B:88pf/q 5ԍ2 EQ@BQt0Vy}0?Jٰ}w`K2ӷ *w% H9/?Ɍy"Uh7Y?^GJQq@g ɩVʈHHbX7.V(ޞ.//=HBI?5T*j]"9IW=ts}&[_ϔ*Ϳ;r.s/3 d>2@~bc\WrhD~NN?aUv$7*ZڐCu;=G.D:kFm" ~fօ ^3"!zRR1"CgXV9`\tj׿~3ʺ =ӲD~Ë/?Uu[(\.Sx_wy YL&~mgNA(0;mrV[`Xuֲ# DOPF}󲝣6nnnS~!AL% ̆ja5ѧ$͍'Hs6 v(CLXNZt:퉪>SYs}Qzm)*ʍU; *oj~rxEZ%x|:X#ϫ|akyWjzya8v͠=0~FeF9}/tqGe&۳kR+ZuKO+6R@ { QœsYhk&1咺[uugR+ɹbkG:o7tI`F[?;_5.VEAuRviFv"ފ`{ɉF-OcJ/x*hЉ4D*+Bԑd0kwwWfSjW#5 ?tna.k`&IC_qYg>"COM.Z3MS.D¾///Sv_&+\!~V|UBqAҟ9W5uC.;?MQs7B_w7Ojޜ)RE[jTVn_ٳg( UБ5Oɜk4yUO&moo^Ed:QPPgt.VOg&nRZ+jů?g_?:)v;hky^nNa,9L?v#Kiɇz vIvcuI^nI?#7Ω}u:]=~WL2oa~b_Rk09=8K(%0wvv|uh4P.51]2bUիW^lIw/^P3pIA+DU: IGokށ=f I`_U1 s,<c8բ`K+j(,EVD(*51Hs 77ڪcd ΅̘lN"CL&z޿$Bׅj'O?ϮY\>#cjr=)ぢL2ȥM6W@XW rQ}0$XD~*m/ >^Usg*6Vz/Պ:oN~ZsURF*nGn^ynẙ!oTjMS0/2XT~/7OOm?Iun&AbV6U[uc) vԭ|Ssx]L\$*m9?g_ \P<*(5iW6,Łnn xw* (sXW聝L&w{^yϙLr:;;O?}k\.+\w@^c^`r 0xZڠ<wKu[Wc:ZPDQ~[sb+F AD*:k2AdYMJv [8hc`i֛7o<ˉAX=;T܎@OQի _KUEz%`Nh1J~g9x*d ^ Ȉ[PϟlJTZVan :r}u:&'򿫹-NΧC1IPAbRp,˪]S!{_ߪT菿޽=ѤS[9D4b0u۾3%W/幷xR`0*U㉢Ldl6^bq0[҃Ê>=ԯOUzotw.R{xt,y/kRꀹҕaA}j4z9د:8J+Trv?kscLpw%[Nm\ A y]\\6!*CL7?ί׬RYK96Dg{ܦQ>Jg*[KK3 rHsyy!sy8BXkuZʚmllšiOYkh̡X)ApmGj<-`WHf#"XSK AIjEk dWfs0NP˗/ <a~ɶ-aWUfB 9WsfS%=nf(u"!R@FHe"Ueo[ scE.jDNt+LMFRx}kR*HbZ1MuD+O?$rFYAT<3M'E]n~lK6rs|E;8QSUidv:$Wͦq𷷷2rs?: k ZPCNqcd2|%LrVJ>ͦ_߿/I:==MTgͦռxB^{yy/^W HYwOիẀʶFJ%*ql^ODj4ecU׳LU&*oTٌ͈?k iYZ ? 2R<]G [~VIy^+%ΏL ksK0a^J-E%EAA٨lXT&,( KE5e<(Mb7Txᴭa| IDATZIKiCѩM㑦(V^Z֋rDWw'4SUk 0K𵖟M|jGJTBM.q<8j79]5hUaA+y?R}gdgҡh4|I}Z jaaZJ0^H !loou޶,2Pʗ]I,rȼlzjgOSmnn&`!vZ#GkLbH=|PǞ`LŶrLrN!mw5*g.뤕N(Bä-0j2 Ÿ0b)%nTvP-f39߻%>ve+Iis u^&2kiuUֵ{OX=^z]d2~8JY){eX@)J:vww=uڝ!b| 'Uh4Ux;A:c!tXjs"ZKݿ߯60 g<Я?`2w a}q,~A2 *; X-̌ImUR%5sV)ͰCY-WJŸdiL&`[}충N{9& $(V(`yVVhF`'-a[⾽mKr*U M; CjS)ƣrOuZ,/A5ĸsA2Y s"K >6x˪ăDSڞ ۇh/K 2T]'~gQ:FWW, ⏈V@K~BU Xw[ rҨBfMXk~?A -'ް8İgjl?HPDil.R6V:=‰7\kpqj!6. (XYIwLfb`jjEs# M^~C$i?xٌOlJ3+Uƒ tyw~,b JHX4\bHbԟȠEvޠm}pnڕ`K`CHuڱqYhMu E\h}cݷ0N>#V9 t=5 ]\\B"1g^I ZHiaivwQ U^l6!]__-,3&?VjNѣIEŲ3zoj|>}Ouf2}Lc*k(p?(#FPv]Md1Nw\4h]=R["9ѳl2æ0*G$RҐ=,&-2O\M(>me1EJb($n3T@n\t}}]B jy'`g;te7KǬDr~Wi(&|P-*X 50tj,y5o~.H[.p}ojBҪ㒤YţNz݁FÉ0P/NK3'hR؄*rFP_S&0p8vZՕJ$pgx;I #ݏ5)?K%nEa=NmhyZ'E *2uѢ - p1l6d np%稖AURgrwww}[o@j_`\\\x@JY]T?IjZv)&Hێ@_uBFKa2&B0y# c;D3tP0(`,4t`~ %oJF+H$yX?>085hynp|o-3 >]K{]8(w=QOZ5T@t;7=2IƆWF[X*؎=ŵu1c=|eB!P}eonnu4 3 oml6}𺸸н{t}}ki{{;᳏j2xyQ֯k[Y6{&`|>}j}_~ͦ O Spnnn.uG@߿hH6U| ϼ[dt4|CS#{EOF#|](ҙ KFm_fN~|"zM;[q444Y~_ a@@T677}DZW7p\8`Gca3*J \yH[X*+{U]XKUnN+1aXz^ӐpČPc*ML[nzyEcwIEu*¥`"^5>-UVeG:"rZ&t?Xl7ƫE[ !Vs;smLPJᅨrâ+5O4< }g`0r>yyIIYd;IlֻPj5r9{#Az# FNOyzݯTbûT҈7\ΩZ :keC]\\$0㗵z4M_]#`m{{{x`0^~흹NNNS@)Έv/EP`0@@U q0+wb' "KhS±aClmmyN(`q]{g_  J+@cy!Ё'~[Ryx%P&(Pp_8.n2 2 \ ({Oջq*T;|TGf|n5,H*|ݧ Ôc3{%}ښƃX=6rߢ jV xWzKAj >?+R)3h~uA4`)`%\ȨWh1o^ȧ<)Z C, ymrR0HZ}އNgO9ӒQYDx<͂* PWWWCU;;;jZzNǣ}'''}0x0kH`A0VfM#2alVgggvw}+VNǾז!39u {5{8[~b/U;DbccCz08\zϗ l ko4͍7LA\hZGZ[.\AǠHy\,ډعmOûg/0Ro+Q% . Rp*cL@PjDз"Tus/Ѹ /ns굥ݑ&y**eN`VfMY,m& ,δS(4SVuxxv텬l:uhX,^{Ț`m-%WHQS*j~uuMѢ&:>>|xYLK> BxST@pTT%^&Jb_B=]^^JFR@зQ/s.7sȐғKY;P\T*')2QVa(+h:hؓX5 j'yylVcyIw2T]O9O\vؚWF/b⯋2+ځ]*6ƗOn|PSH.>O^JN't}Q 5Mݑ5ryOaCUZ5Meaf=/ׯ}`ڣ͇wڎ$/-FӑHQ lnn=lhiBEO17"02Z_~mooD@d{{{{Nۦ`S r'OSE Ç>)sKEm+Mlo*R€BX-"-D| lUFpP2x,&ddȹ٬?qOuNbB"6SR>bJԆÑiTg$ddWddNϟ?ɉ qٶ\.@নyy4E2E?U7^BmWrMr==Fv Rf]YK&…B.Ǫ~h{ŹߩNa -iVY+z{]"@k:p.Y:ZV'] fv)rMV+9߻x?e4 ⚺7 9Vj6"QP]__$DPG6B_֖;dMcfXoZt_]]yW(7CI2\̺IUW6bg8ӧzuBwͦR1$U:??WLBco}Lfl 1+Ɍu#-i oѹ@@i = RvF5 4KP'xl\K7XEw8zPW > s|}onnC' (^TM&8ׂƾ{ʵ<h:'QfuuT4=gf)l^훎嚢 h(ԻJDˌVWM)ʀwp',;l r:l{teg5* =Ya6է+wZR6ϰ.>|JvwBMEMyMyeUU!WSV!_p0kHUuB ̔Fbϟ?W3I_/"ڡƏýj5Mdf=j$6Mmnn*pо=MJW,;}>pmllP(J;;;_|Y__Ņ𮮮(HK>pجcTt(yoZo]Ȏtzza‰M _6 cz*@E@#E~Mߗu~ᠭ#A9{A0pHbr2Ĭ%ٕq&)ʬ\.' ^ΕJEO>ٙ~gv:@+O@`Ȫp!rt:~/Iln 5Ngr,$Gp\tt Elh2VlA(px*ݶbN_zdpho"p|f?R'6rpWN$;s- aamM.~pswzn5V`}`XRE 4i:+4dsg*'p0RP^t\; [sRwyNJNycc *˵jd; :Ç #fڱlztor,?K"R*l6}% ư! IDAT rKooD/0048p7-HМP5r}詄9ﴡPLR*[Tt=`͵(`5ˆiFFn1GE"m1^g.-$ix+tn1'&Z,Iuyy>mb{ID_ZCέ-'LKm_`4,蛶C^,x@Gx V:==Uu\.lچ[m%Fc9\圊4?t^<}*l!<,US7˽%w ]2Vlݥ&FOKG 4>4VͷNq:e\]~(Y{##EQ'@Y $$vJ.}(Q:nmmė` E k*0@Drzο68hR"j%FW2֐tP`P䐤P1#%!NCeW6Ɔ_~t|AQHP^z^d2_>[ :99mPNTվd2Y (P4BЩqRH^xZRC%lGe/KlszHQ\%urQMWQK84՟0 Hg5qLf- PS!:7'>yDJEWWW-(ONN A`-̺g=iw:??V jGe gZMO<\眯Qhͦ*浵5]^^z 'րZPTaAr6izQA/[p| %Vo'8S Saq@!xI5M!K{Û 6bs+,Ab\;7:S[7 a}2ɓ'^f>ࢍ my6@O,(=WaZ6:= e #UJ5 : )*k*Oay蹨*r$VWwV {ʔ[I3lm[(gf%B RD[ *MEPEX) wNi(KÜ&P((̨X(۷=°#.<,J Lt8щ@"HF; r_zo 11`ntg;39wu^]]immMRׯgݻw>8dN2orHhJ~+Oc]__bB>Rd}8iwwǭJߌv/:[d7 [>T:L&>b!j4ڃf@qǺ磞 d#_uhx///=Cu LS՞.֓>}?\2jU;;;pNNN~ѣGc+pR2Vl I&z'Re3C%CݶoV_d<$-귥a?Vyi<+!X-%PE]mElCrwzU9 VX Msy DB\4 [2`A +8lRKN7Sշw/CFNV~~qVDB=zDnϋ( S$,LF_|NOO nVDmΎj a@0:dœpQimmͫ6e.U?,`_{ BVKϞ=驾+Oۢf`6Ej4~aE+a>%WqP\SL2@ET$6]Zu]]]&LN(\y>AB7#s (RbřQz4tXPZm!kp  FT1?>ELAӓdA5ȵA @h'ijڂ޽{©&XV@$$BG'rG5'>zHv;qͽP$lw u ]\4tÉ2QFX4VyX){2'T{~AbR0V6;Cc~lgc唜̭v Ew\z@-buiy w)ɟ5LKwsE3EU zcAFr`0*?# nu~~C$ά1 "RCQ=r9zhZ,[M07EQjxETT<}N.۷o|`3P?Z>Qcr@'zP777BTIO:?5xRpwff?=h *kv& }N` .(P sNCFb h >( ZKf>Rzg:L5f>РTk3./\D+*ջw|U\ 207 %.5έh!ɕH&(<' uo4*j\4OT*V*dQϩH {\"t綴"39-2fт$ Ϗ9}qH XL*UKMr |`\IV;09`vKw$[0t}MNѴ~;FEMG9n'gKDYs xD%΀,tX=пegwɓ'_Oa۷^7͛7^Gi>_Gk&= _C>yn#rN}xx2xFem;;;SzG CVlZh.#ZEA1dmGUT!'!>$.{4IܿǛ( omG%8G+Jf`NFň&[z9p6qJ"Q yPail4LI)vT#Y-F77Y2^j^=~<7<-9 ҒAu 7zE"s͋A4[WJLF* ' Ì-ڕfwԻM?Pz~T̡U IP r2 o ~MYEAjhiX.rvnNr.be^997:̳1Pm^a\6Q7Q/#7ɩZ\W.WsR.8<61)A ^\.c/Pd͢k@ZDРwEյDfGṟƳa"k7t֖RG_gL,o{|| ,aZGYZ/ |d4<(Ȱ6@硝Q ~y]eKyө>|m%ɬFǩV}k[k@bEeیX٬vvvtsso0~~ o0|+p2;uHH~`ɃB?.\mnM<? ڡj(mu.vj3PS":u 8/Z7yIܬKxDu `"]C YM:9r?UZH|A|0tRE,|:yxx*Ri?$ـpZ4R BcXgA8)OTM$٬{LFNGo?V%ޠ)a3k DChuDCW_מPs_Z-mooK$6Te.A1YG*@'(l-OHnxwѷ\LpqCގ 2q-0.^7MXn3rֹVxqPdp?AHF@ ı`#/ӧO׆  z j\gez 6 |@ϴ.pV d|v?~()=K}!b>QZS&S.נ7R5;@ӉSZ];R&? (aj^Cwmf`hm^%H{pY5V UP/XL#rM bґRA7)Z=~ApGpt`~VXN`'NʂH괜>P碠Q7ҁn.'EN{Ah|-K^PɻKkM-h!( Vj5}֯5S*⬙<Л7oT(`tJ )Lnp aQ/ۡ7`YUTu:DӋ/|E "_z%s.,`c< >}FRabl,5A4 oF9&|YpP-87)vFUH+ަ0g kl |BLS@υd6N@O5 yZ T$BV)~tts Ȳ@ B>HC' ΨYqcS1$T͖ŒݞS\W<BX'n.&X5+b }ZV~M m@]@ ?PѢVY-Dv&w \T\htZ*Q!/v,T/qM(JweXw|'ݟNOےPn^~^~N{[ONս( " e堽'sA`mʥ'SUҧ3 Jh%"uH5A?4TBA߿Ɔ_ù]^^zj]GGGz|,$>JE3`5nrVD ,uf!iݮOZ:Qa(~":!`X88,1ӔjpOF@@:T`Nn EdbTp #e F@> M@V?dFB#PJr@n~@ 8.^b*ه&lv8o  E9n1;?V(7G$5 ! GtݺQ6[ mj؟h:q]9S>B3(-x$j۴y>HM]BA2HLY./ Y~7tu)-Wԫ[V+,@^QA;tPT!ڐy]4UU* /ղc0K<a)ɹPP@Ab"ő0R:yLV*ւEO'K}X}J"}UT p~p[S쬲M9`cTL2\!c۪\9Y8dUlX.=E&&74.Ԩ8dBPUi>Eqssm]^^*H~1WWWxDf=F[ F;7 d?(t\AGQ8Z/IQTlnnIzdFp,2N8ΩnuzclE $zPSEӏlÇO?y[: \cړ2aQ+ TKr3cF =Uɉokҷ{~B ˂uiAÏmYV=[(ñBU+kiuǡ0(ְQtLN*V90Ho4L9dۥjccnV6"?t,%+Z&yZvzR&"U& B֦]71jǬD wjZY94e+vr*\EiS}@ [Z鉥e 8k(7= F?{u Z AkG;m PGGGޔ?.{ͦժSkkk:<<ԫWȓ@ge Sj6/(N NF1&_ }⫀"1fE 9Zo޼':TZ`qT\3b5P[Ԑ'sN IDATd2?e, JRAsdldTi)MlT@ VLjLxrggG'''  ^0tvv/"9f*rՀqĹ~63miÕKĠnOUp9}iaDiXn1p +aR VzCKX E> 5fҸhZu{=\(̨qLX5"!a#SmZv6TS@,ȼ+I 8כ7oפ}z=x a;M q>StUҵ`(,}tͦG--R$(Cv>Q8|/?)|-nEz򥇬 ?+h(ݻcDP绱۵Y9 _Ë?+ <(Xh ` 2J2!N@^)k$Fn0 `ةBl{{{"aU<|f!# 0y٬AS`#CdG5` Zn$\p?GL(΋3G޾} &\C "QC|brn,灧R{i<(+Pm_ni2wǺվ Nª1LVJ9HZINEa QUD`[ 3p!H0v??$Ȣ<Yt[lӪi`kUun}):]qz@݌&6+<@B]77]E*%4#Wl#6,?"mv@OEgGPЃtuuwy.q`QɚDagA?;;6yrj4|ia f` "e:l6pt6ϟ˗:::O @677=Sv"Rї_~:]e{ίGQLJ%1NV¡4׺vٙt&²^ȹSP6Bk bJoNnx<lʗ6&օh][(x!l` *_!ٟ%!d $vei^DT43ȷnɓ'~(p |Idţ\+#+|᙭ e `9L3w8Ԡ?V j؏5MTWfY 7 U)I[LɠuI:Hb)Lt,4!n(jPtS*rh7G~[+-#`.5EI)Ǭv[%0аtӫ9 Z n#i\Q0j؎t}1䔋*noU w:dv&Pl}o](,0BAS6ʄ!+奯yyи`Pa`/^ Qr9Ó BxJ~VDB` yyhV'$b/Mf[u" wʃFG&GEY!Ct!Zrz n_ 'Xޕj܊ؙ ,jo TFvppǰ`i$p $[T*:==|\p0RTt"{#SrUunʄ.(V-Ng|&/JTjf[K⎃ 5'Gzut,0-  iu]\}WT Զ<k8peX» iCeݺ݌]RP&,I.Z}e J '*{q3 h480ອ5n^`/?cqs˗/}p?<n(5?9di(xBK`DKST<*} 厎gCAϵGb*/, < 蝄 XUx.e$m@(áʥ FX٨(ȫk2 ˔5OUȕjK]^q$kG--LnwH(<;3thx]z Ai l,SUyiemb,őb(D`#) Bĭ2O/z@6b}:_ ଵ5n?56V;}uB*Gl5RNjh暏}9͂(N>"1 E-$ć f3πV--R/jd$GckΪ*kՕkWZjt"hvR*W@?Z/;ũTm.ڍ(ߙHχS#acoTͦ ̖ۏ~C;o)wќ >D^?6؞{wߍ/"Z&3]~Y+5H{sGS'$ P3/e[kkO[kGOQg [{sA,X{1qݝ& |"-CbRvj =4&'WAOSuF;T, GWj2*NuUiLUZlTmjetausD*FCF 7ߠdmQѿ¡oze~ߝRB@%hgY5xF#^ʒ([QVիTyrf׭v}4j(fws幫/P=b Bzi fd̋ iݻw˖$uY  E:_q bRv V24 qtt[OCnؗ `Qӯ4p,)"..iF}}8,EE-L7%oVjA[N9S& dY>x g =Xd GYQ.Hwvv#BG- @0 Bf0M{\YthUh6CY\\k+ׯ}6mɓ'Ye}&bLB:j~p$-g899r 3|>}t:IKfC&Äc& >9[.P 1Pw5Z`q p8(BIɡ拥MͺVemreՉ*V$*WRWML=zne;)-J~2Qh񛖢e~k81A `lhh);@^𵿱@tGb_Jg?6ZĪn`̵EDSٺPWeZk==|f><@];=d8=9kC|tkAi3Ă0=XX,K'¢X:p#&C^jmP*zC R{RAAHL &VU{Kb6 "=s l^4,oZ>d&'pAءIUU铧]B!F#$$ o->|P4:==˗/}b$ƨD6b2Ҡx_$^_ޚ x DCjÉ{6p0*buUW[Mƻ*W:rěH)T(W]YmFk_nZ՛NQ>H{4:*v-9z%]z2x3߫?~D9S7C$*=Mgi}Z.i՝QT/SuHYjJPQ;j)wkm֕j2Mɳ\wwzN2@V_ B!)B&of$XJ/?l \Ϟ= Cnoo a+`Žq8}O/JJeC_k/֕eY^. ڹ50H0=PHGW}=DJّvot0ʻc/~ǝ߯淭VTWUvZwjTʪ)#֨.uV'JDWWf6U(61!OfŖ@Z}~~Xk^oi@ƏV.Ύka7>~ϟ?{F3310 1؟g}'n$8P_CԢyZ髯gJ,-, ё|C=C;84GvwwDx0|ooϟ VS$,_M=-s !ς=LSEQN`)`(өV$...ttt-*onn|R"???mMmXEQ>γky7"O?9yg:%RN}KFK'3% ,~/ 4u}/!`]b#bDFᡟ4AI&l k.1_e! tЦ; $(rQz萜xWhHݻwC3¹!OCTJÁ \cG5syV{h%q ێ`!(9@ ;Gájtzzp(2ZV ʪ5nX5ʍ\uQH a"E*J:eE$J2(n\$Y'PT;;{x4VVڮQUjmݨ6lv;Y۪S+kY)2%QdLIeL$ʔHYtzzkF) d`0Ǐ?xƳgDUI(7|ї@M&2z p?&/̰ 7'޾}GHEOcKZz;tF[CmJ!s #6^]H mWgT bP>͓M2`C ۩BK$ԍȘEoջigba&<}KR.nòB8"MC`AWWWͲh1m`G, Xitppu\.edT rk r{pyUdʺUVIk%iu"4Kd"di6JM)SSFUFbۣb|Md%}Xű5s2=r66=LѴGf֚kԹu mcյhkFs]m)IRMHFqz@Ų z)%EZgΑfm1ӃP{+Qв(eo-qa2G0 's4Muyy4M}4 KDQ3`0yR$ znI~0=L F{g"A kr?>'~{9ы/T>N.7lf:88!5_g8a.{$AeF 6~Y^@g9Ak}I_|>L`$l]9 z:\ϟ?n dQ#FQgpAYrYy@Pho"BC(A+p¡{ >!ʧ@f9  z$l'"iƿ((/JcÀDJI*9 [yB,:@ʻ%lz`X pdGGG:;;ۚ<ͼtx 7s٨m; +M?~PD,]DTU*jI"ۉܻ6ÜۄrMldm*cu]:")a|f'qd|!cgFmJ][m|a-s*m4(r>rD(5R-i&Ñg5BJRwTiSV-xbxrƣPJP&\H/d9+p ˧Oz8+l(l] +h/,[...t||{P_xo:;;Tha'OROYv|&ywwoFE pwHs PP塎/Rި 8qiO䄵f5Zjx|xaG::#lW3AP jWڕBL >j44 xh5, }Qޔ`m<IoA@J~ɸPds\Ȓ_? Sx:Pq> bTldZ@شnA,$(zׯ_opQ81T{Rǭ ZoDQPKPsv?,Q*DZw6u,őr(dU6 Q*MbuQ۵T2ꚾQWc:dG.Fi@!I+USu+HMmTҨjeUQʅfiU"sj3Vj5ZͤLZ޹_KN?c6 i3MլSY_oҪlcm:EQi]PmEQD2C`-[RFKj1R]ش<{/uUS- %imUץ^y<,\{fPͺIŵB1eu_tr>} pGJ Mhc;|;1aEPEW 3p4@}(Ɉ*Prft)TY/9ɉw gEQǏFr/~*gA(/K/F2pggGǺ=_@0<6={o:<$}P!#gB%gi Go j.Hajy43P_۶:::R4ҟ'ޤ""HQ7r  w8e/G\]]s$l?<2Znc|ӟGM3Ued/^ЦNphg\ϟ?W8Sڗ988lnB[$M&N𓦉`P+~(ful]#5M2}pߔkEQӶZei4ʹ^/5EJPcGLą:YQc޼y8JN`HBj |+q$I<:ޞW$ M>SNNNӧO ' y}#􃾻=:f5FG7kUbf6FA4,U׵jFqlz:юΎGQkFq;ڶC]0*IQZOOް!ٮsdm_e6o+6ָzu }O4jFnE"'rBQdu軳ـ(akUa)pb-m)"Eq]kvMHԝw:xΗd5l"ѕRUlUj$Ĕ{$$/q6Ǿ G!2@g;*q(iz~'!}V7IcWpb466LBPį{XWΊp3 :oB plɵAIcu޲ķZ0TᜂM%28/<ՇCTXx;G4X6b͑@z5 >= y7A7tnbZ$hg %E-v8_t2/䂾_ - C=:H޿tk8PCש Pq*IIH` `K _ȼifi]m֊Q:<:TSURmUVYőQ:YYFHτTG $ PrG eG#miV"u՗/_/nL./A$ 2a1jejSd塨]@p#e6f^ONN~oO0x쇉CXaYU>|գoyYd+1ġӮ\y8h>ڶQZU\&2Ӥs'}ᮿd)¶q(NqʡֶwEpiңZy+Y$0IEȨijmԉd}?f &WuCf^N@S}Iwww* Hhӛ7oK},K_rbKO&UK},CPd=}}@fCpC%OU6AXS j/"G& д@idcVHjL8Cv,,j+ #L___.>s.a#ׂ:B^d,2O)d% a b"4hd;"AƫJYi5ud-FMza4TVh8r&ֺ:pVJDMר(2]e"bL,MԵ,ulB6"$Mz4q?Y9'I[[4Qg aKxM{z;ĉO"w}&,Pn"P[1R=Ǒ8\_tiY d2VY>hZ%i냨S鏆Cu,\,x2A@V1۳u}#dr‰zGnbЬׯ_{v1&=_|jd (06?~-04-RHb$pZ4nooX^3%2܂2%Cn`ϽZz%c0^JF8m0ą)N$3ub,ijC~(>(}+l(5>æid,YYm8&lv#)|-R5Z##>34ɑx!Jސ~BǽhdU\߰gk3}4W J:<<_(_/`Sq{KM7Bs+On-OΠ |1WԳ)ekSEF@JAѷ9Q1h<«񇽫M]z ={e*;%} fèn&2 V+m$r2cە NvmO#G=:vy'4ġg7 8Mڶ񴳟q'MkӸm[%Y̵+!U^dj[AZʲґ7\ƚ6EJS^6 jjd4unD_K3j$rza5 i 4T~F:V4C8VCŋ?b5!%W^eeY-c!n8"ti*{cw"_UUoɉƦ 5?.sܛ_'9)G_8*# Uנs|B',2,LGӁ8iL҇`c7iL)4vO{z"v^5T41 HT LC3Y؃K d,+QRAڥG Fmh4dulrWG$hcPK[V~n22LLy۷ZdHJH]*kf9^?)pFL٤ "]|iw ,cjCT|v8*7l#]q{i|Ņp %a@_R{EQ PӘ<c@;⩉s/ )>0m^~%8ƒcA1:u#65oXlY pTV!(5ʵud=#Z m#ȡ3fvjh}ƸZ/^l =_]_mOdVGjZQljk&CٮUg={vZ)}4:ety6 5MG;uzk{8-#>HyQ8y_y4Kű!,O]5re9xJEz5 IDAT#> Fq8Ha8v?A,CIK&Ɠ::Kͮp8UiQL3W1($4TUYj8Aj0(eʪtf ùڶn]YWNѨ/%$իgAGymj2+\iM=Ezm6V޽{-aLH޻1TҗDO.^ =0P49PBݮV+^?'jwm/CӢ=o: =18mpggǷp悐i,P/qK8ᡟ&atg/g1A/! CmQw $q",h/ 6hzq^Wx5f0C?fDWa$g [aO A fa AdLdaxHk }" cqzJ''' fArMhrjo޼'? W^i>2K=0u*{&cWWl^o]p4i*>PK9TTCUM,UW3heYO&Y4dͲLQ+2zoGnC1T6= ´v j:70R5MbXx-IȔfڮp8P۵ 2w]YlJosJ:@w(Е BA>g=0`C3"R`BE1P$&@sƲ i8d.r~ C]__oucPl6zVJ@ѠQ!CzH5Cnhm,g9s/yУȳ\+b`h*M1u jL7!{z Y@_ HBOY˲SWȌi :==JEhs 62GH3dPؔdn4~(@BԱ^|)v}EZoXM(SG#3Mcif)k[I;mbiYi4(.R%jܫZV`83 CmʵtsC4.dR6ƪyEZMJ TUxN]רwxDBgkձ:'Pg; \q t@dutTZ>jϠʍ,U}[ CyKMv&h4ԎDU1(H\ r*Zi(O{}Bko 2 ٔJTmi8Kٳ#]]_;?M^z5Q٣dޛFLIrлoU7oRM]e:sgQaB'$< L*¡_R ]И>HCu0(.g>5 :_@0E UZӧO}KΏ?z70zaȨ郌a\ډ$f t.uy97&݁Xu&quF7N}̄&Ѯm~@8˲Bˁ _ Lp08 x gi Z"5ghTZmO\"ⳡgBds +&T(к V@B# DZ<]RFA\K`BCP1")|VQ{\~N&{㽽=K5MbpՔ:9tgm4'F6Zkuo˅$`P(:N׶ZVja1PYVDuU TmJ]h]+cE]nJ Fi)w{a:j]nu2zd_8Zqʵ9dynjEQ,Mq gc3_?KokYٽF㱞R@(c޾}6'ch!"|-b765# ČJ-tK =AЋU&o| -P*@MF;/rYy"x55#-sUՕ&l^UC sHsUu 6&WU;Kr>T&T1&I4*rwI֪n*NvV]*ڏLr&uh#JH\w{ʮ;j]k$Y>"e]Zp_3$#2|xxk#M(j.^-f$gGGj!mS^x2d\,UW u$KdĎkgi9Oz@$N\νCY p8|)hRBa GbLЅB#~'Ρ/B3o1Ε?*$Ç[>ӔQ(=ydK'Ox1V'''QeZ*۶ӧO&!|>#otvvEsf...?3 dl6~WW@ljwch]DKMHA@Ҋ4XgggI#g<̏û4t (uŅoކr@0 FT K ~ lP mXY<öq HBK[*O>.jDQ'$0Իp*'$;5/9Ln"'LFVM*#͗sI Xyi?8VosGjVGjyiZs-W+L%ڞwOyQ'zme4Q8f3I/TjNDU]덒,ӧQ&jVM)0h4(AzS)ו$$V=;&ʪVӴ~eY*Y5uP<˴ZU 2u$SYuYi:92ظݶs0\3uU'Nώ*Jbjs~ыB;Ih]+VÑ/3-KՌ=d2fQ1MO9OM3 YD]՚L]~M,|C9IS?@%1!,\ swhf'P"jZj h%%&]+{{{_lp FŽHwwwDZ&.//}'ڔ$9[@Ǹg!*ÃdJq%߀9Ο}?yhXsߙ=Y%LE\0X!31z3~ȵZ,U ~brHPUVCWNm)O]ҵN\ Kwx%iώTvvh(2+'JTE;5vV(rV.PMU;R噫GWI,UյáЦ*5,Fsu]JLJYkXikS9[M-Y<ݼe7'XlZ5^#HWK #eIMY*MRM<͔dՕ&]UprTwwn/sfʳ\JmhgAQ_~Hi;Z_Vbgsٷp uYb)? Qeޞwozc&1}vv-hUbIqЇqWx^Z`,Z6CuNNN! A$R~Ņƨ9C齻NOҷZp cwMyHy"A+5`|Q҇QU83J:><<`Jb-_#G/maUA=#?dBy`A`Ad"4ㇳ:Al$PIP3 X4;ܲ_h<˶˕&rUe4u-BFq)(zp׹&*Gg3NS^-] ԶVetFIhMh8I5PZ=LJuk>_h2j6k4_.!twlɑZhDAr7_7Y̞dD(ZG_9B!Eduws2I5fbXߢ@{Ym;l7[83#Jů ? az֞y%yyk'0CbJ(NW3qirĵ Ƚ8_quuǕ <www_89@y\5Ξ(hx^HEV3%TKP nӌSDkyn\% L Xo;9H9y>7Ⱙ b˕w$3+%kٶ;eϵ[Q=Ѩ-a;gbIbaAc1TE8=:Ye[zst7i:ią9lsa K302Ow6 siu"9ElD2ٕqg! 5s22(" 8_V2-F(B,e~]U S2-M# 1aM*m"cd]C QBc)%iufuU1׃jrKU ]^D9 8mZgL$uHi!3a욆 ˴1N{JF3n;f߇ UU#be:pؖ `[N?^La]G\źN 8 ӴTT<+ GQq Uh)MajtG(ӄ0Q\Qրc^h^]L#u&|'r ӡ{vo޼AQO˳I`N!d!R&1| ʆa׎YˈHvmd(ͲLÐ ]y2B5Z9OD`Y2~/r(1޾}qP IDATlGMi>/*Xu4uӠmi,Ѷ=qB od(U!/9k ]/S*A4xBzDQIK|J yG#8|eUui$ɉ.Ƅz_p}}zDh"b"a"6Tjp#[Ϟ=g&6AƄy]h8 <<<~'dDY93{sVD1YЄR:耹ޕ=}$1c|eϵ3/'cB!IyLf掖lğ[eFI,Ω0F-@N◨\_~dk fdC"P}3 9'2("dt`Dkb#,*Y!͏mKdeܡ؁k$cYHL30&<UYkw59G],jJ, Vr}=@vy+bVejZ]qQ5 !UU4Lu I ]?[1U8`ٖLaE%S ZDQyu, m#da4iX^a`&t݀ۛ[Vkl! bEP <`z v(FI8##4ypZ E]|€(=ie_g٥Ve1P < Dٌjq;'9NPݒ_mRCS+POˋu ZK-+oe51/ -yiƱ^8yȝ7Ҝ"v00a%,3  w}$-^xxS s̉;^¸XB6$IlcH*N`@U0-eY]rVrğm$Fu`Z!M UiDaԓԵEg*KxHkNk`nNR]8N5sś7oq{w449H E,ϟARJݴ݀jЏaDIl0Zp]g=P$Y',0PqBS ,˅8x69"h0-die D, m {$A1ˀe p<աjz8jl[)}blZ,zAQX+JzAzLV5BpYs=i(x,!㸂6<>H!,K\\\,K-s1IH,\!-WIx$1?MFK7<9sB ai{8prr GRQ(B_eѿe}!g.C-uȄeQaB238s֖;MGf '0 q~~QjVy~Z^[BMgy 6U7udd.L#XzEQ¶gL/cy(D}O<͊䫎F׍Yҗq,_а $+ѿ?}" ۲p8E:xd ObZBe˜g04ʤ;+]9BP6"8=}UUbJT>(0eHA!MsfW U_4EQJPa(*E)\!bbPi1N00|F{DQ IGdN$Dvt߾} BGȞ|ׯM?z$ŝ_6@d?d8n(3 C1  g3>:1Z#" caɗ(s-.$ UY-9-K(q!+Gq$3*d$/=xxJ+-#sbgʋE.{l q\^^www" nYA8KV1$IG|]$Q~߾}G$IT*5hiyzŗ/RlTh}{ND Q5\F.MO CU?&`V{+& <9.v$/^]4q~~w$pnO--[Nvo߾EUUAY 5m/:bvܻ.Mԙɚ{_BK}w .pdE V'^J `Q'#si^҆(y0T1= B}a,?"4jc=a=04S䘼(ԀiC42=EYhm*Y, /Dd,ӆ1̀FE(4Ldy*VJ +)Fai /J)I>.Vq,F4w!^b~BiaFfb֧l%޿4M1B@sDJ%V|Cˉ Miz5;jݠjD'';1m(y( m¶ldyqlU3u}do߾=l֜qrȆx^YdD[Цn!@]UCqjA$cur{Ө&7˶P`{z b*. $\[Bpɂ߿ 3it`_Ez"gv*,TnO(A2̿n"y;;;F$~Ljg_BOdF(+%@5 pssr*C%ˠ"q "fEpBdfb'1] H燺p'G'3$ynILZJ$o4eYMsffb3'r Hv]?Aws. k儾 fX:s!lL`)"*@%'i.z1= ZfmFUWxj\F`0L`%j0 cGs]qISq0#0q`0mUѝ W&#'hڳmZeoZX/jV&jvz C?bu1¨VplAmZ5dTҌLW6/fVЧ() p1O@F8*ׄeJ"qJy2sE)砮puC'MvH )<" e!aHT4lj0Ӭ,A!= ii0aŸ'|lˁ{(PSۨtQvl^>UqpLbR=fFϟ[}P:C$g'(-ŠzNYl߾}SfRMZ3*c PLji9>?ʲԻn3yК(K*8ag>Á4Džו'$E$XqψQ˗^I˳3/...~"; ^x.}ٙ&kв`,;yƻwp}} irfn7>"2yaȬ~ᳳ3!|eg'LH/ud[ZX.NE{N%_-79s^z@35yy/Cz\21arg^puuEp SX+O\kTx(Bw{b'mf<!V05[yg,˗H8K(R3Fon0&N8IAyGJ.E|8!5ihʶn1M3hcWYVgZE# \U6K‘aHlSVQٖ|QXW-G)V+Nbmi&mdYVJ(b!͓S߆)9m9-zfŴD>#<_dGJV 0S\$|TȖmD( Jy:Siu= /Sׯquu4a;tG% c6(zr!#x|||n =KKj 5 K<5FFS;ݮ,/ (աR#2Ƚ_N\<$e9n-noo4XD)y-&Ffs]J2Ri`u]V'?DTs_A-![.9&qAO'`.v;X KB|/fQc+"4ĉ%{\J5䮆ٳgQf&Gй0eq\F,RL8&Dh5G3wt6W³1XJxꕎ2L^]ݼ!54EڶAwl7#V$ugFLecW KBfByvhb0NL(-Si*#p֨j0u!"2q"īyn$05;$u}aqqL}_Q$z'y^HJíZ rӀ L0M/^DS7p4#/rd `e0{]iɊ#qe)=_m֫(T/:_(#QK|~QՒTd0G@ $>rErPՕBg2-KB[n*((o߾՗+l7L-mςg0 hZi~̠܆)"p<ȉqj#"SabGCϽe} rJpY0~ׯ_54]c$DooouOjUUxr&q&<> ﳰs (eQZYwu˳t2U&{`NRl~א9YȮ &)vZqaNZp|ԶѰnS2$KN"wɜcQʛ^_([] / I?#YXOyw4L!<$62E qaP nɼ8i&е-=З_"wh=(y(+a(FU$6> ]'R !TH[|?iuz+OxyZ6U~<0 a:A4HXM>-ڶA(KI#,Ĝ,iX\ਸ਼iqLXdY" ЩH"dZL@ѧ:hN߿_Kgʍ-Z\/_['1DJPd0p]/^@QYk5 eiNAaoeYaf 6-lV(B^m9l m[\]}ǏP7B|uz?3rnkUw'zY[ˢ(F ] rؖmLdŴ\dYaP5 ڦz\YܝfLdzm +]!QRI\ZLD%\Ngp N'=yaŇ (тWs)$7_=*Wg/S>|5P*ׯ_kI+Jg'wDL/,w iq~~o Q#;;5Ry!qfQO0/_۷oYȤ_^^J.($pZ%DN%qiM0$75/&Y,iIg'mvY|I ]jכfұf׻$:Yf% ;G/7&T\䣬j&ԞYñm?cda(E٘NVhUE2P< c$옡:lw[dTw_v' nZP5y_E4(qi"N"4Y/.QNT;prr򤐳͢!HL$HO>i{fo|Kf~KE( <%㘨$%ˡ&Mh祢{cTO 4JTq<$MAr 6v,|Х)ca^و+fY[V H޽ӬJ0~o䞃{-X޼yo6H" &Qb N),5v:!!~>2D0vLc!2 Ba2'IͶmqg!>.yX ӲQt]υ,71( cx<+5 |~`۫IqM<ôl=up5J`ܶ0,5,UqlV8DBvh:!]JܥDT-Ry$qQ";xse%6Mm#jSx \LBQy~)Єkȳ ڵ^Ck[èT,( TkwuUcƌz1^ft\2Ie,SqNy9ǺҤd9lѴ yR&2Czć8=tyeZ(덐I|t5u-d7z0bݩ^a㪪tP Ex릗 'ip~~wC{Rr7Jݻwxxxx#nnnP׵J!N9N yϲ,˰J#O>鉔$'pD7D!|W*u|؎mLj84K1|ׅ8SErYAE]cTп8c ]75jUhZ<ΏǣOᓌ" VyOp-ưN\Y siv;-⒙)}GQ}ykH P.y{N 2֋&d _㾖7(/s.} n[ StLNǏz>%eLԶ-A<)>NȍS2cUƆ,I膈w>'I" {?~1=t{0,?M#:zdi_jub .O@pEYi;;1J0M;?=G%Ƕ%pbup@umek>UYc`&v$߿}׬jvw=^ FwzG"j'+Y0r6`lEzLH&uJfpC!3- `qzzL?c8]nQd6-,90`m$l q1N Bwpf{UV*78J ,z4J|װ^p{'|`?81Q\GZ%kc*اzP75׶U%~mad*\Q"Ms/wi7<qwq|;GIF&5-l6xxxM1> y&q@Oh3" ymj0 ;cOđ}%DJ%=K(g x @pjRl>NOOO;n`N^3Y_|^L708LJ"40DU<4N{rgbl[13ɱֶu+Pz ( =z D߶p=_KdGY|&iRUƌm1(qG ΣQ(`tHWWWյw3"g(Y^"uSt:݊eQbxSgY4.~D'Jd-H~tݠ ~WݢS爠/ѵ&(r}.:,LE2aK+[_!^zG}~ẻ䢺c{_,k3Pg9 ],l~X+5`F#N48!DEqX09$> ws7@jn9ɲbaFXd] .,NAӧOV&v ?\'s00? rz%^5D6lH";. C| 0h;c&8Q]|d>`OIҧOJpq8ה ]tG ,PSj##QӒ* X-qqia.䳺?R< QrOѪ"T?m`(U_UU%+L'1*4" J8b ۲uC3i-ȓuY+OU,GxL]4L8.aRI3̂Dac60C kzWk0,ɶDQ\fnī54iYQ7[d90&mxZab1\0 aA`Y_1=€|n!K3AMgg-'=>ׯ??:Ɛ? 8B'\%ᔅ>ZX*S8rw{{?O:ij,KK tR)Mg뾔>I5%1[`A ^Xd ]2:M ikinRBx)5ZL !sBojnnn4l;i(G5F8mRGrW{|U3ى1 0 ~IH/NׄYvtaw{uu;C~ق :1h庲wq\i(J ڦ˗8;`0ѕmiirf +$a mnZ~TA~2-88D0,Y^ &pMۢS:|W{bA UU#R{#)z tɽN2Ib ÏBLX(:<DfDU-P"Fm@]6]õō\\Ƕ0ŽnjMγ\W`z@ܵYiuNv\ eCخv"K3-s]cGjnnXH6;Z,4z1 ;2LdFSp MDx8]TJò[lk!ű7b̃ya /uUvv\GhϓϞɥ Iǒi6}Sq)I䈒$$ >} 0y0¸v999E}8Wq<99͍ðJ"eK$)=qeưK^ 5,$ۭfu_z,Am !?͗} sɁYZ~_p%MΒIl7ٴt>rŎ]>Ղ{2M/Q~⒞tr9-M5rgSNVB)`# ή+I ݰI`c7DXL$Ipuuh2Hb?\Q,YfJ҅INIgz2UY*]ᬮ80a;כy$NT@vilǒT#HoZ74aM+tUh[Ɩ@P M-e`Ii4U YY$eT4l[?c4ò 4n"ɛICMzbNr *̥~kCN4BgwLA'×g!溮 *M e!#UH $m~i4Ɖ>}" pwwzK4@]ReYXܖKv64&0vl4/vٸc\/Ĝ@|><(4gW/7\HfX:Znjl%giMB6m[ *5F,` VC+ rl;TM-XRqQ7 0 i0MyHd %4x<" HMI{KOtS $J`;6,NNNqw{m1"*Y#=+D/[tLT;]ۢn'b׃isE2eZR덐r<DžirE=`k;eф${rj=-饧㇇=C6/'\BM0 5 W\,K미 ӗ;~||T\/si ҮM͍6-KD*zXpqq׀PX'޿JK>~s&.Sp9#$,r9UXpt&TK2i s)ɡgwaʂɖ]ݳgt*=7OnWp?0’gC7m+='5iDƀF6 0 (#ٷkGsVe#hG=Wy4Bp*Ej︹Ans-R Bf)\Ul2*EQ!hwqR20J.*lw;i2iɅ*X4ÀJdA[w6f*SAg tm/eR4-ضi%e(aY6À0 _2yoѵB0;RQ3y1#&̸CK80LQ`lȫFWNp<<+E'jmJmmeU! Dޮ5l g檓LؗAH|=>}(t̵ %sR K"e~\YN]2 =38p]\\FgÀk]xKLh(oʕؒlqvvm1LAim_F%d9@|<۶q<Mf6IL#Ien<_4 Vu76 IQ9P2vmm׸WF1H6]H\s7 /,Գl^.//`d0 kJ~7 IDAT81rν1nq2O(en?CB?CK|e2! ]u-}+0 3<8NbNXڮEưlS dQϟKy8YiR]m q}>0pssq1N#iF]2!e$^φ SYHbQ,K9DJ8+K08q2Ma5H%rIzK*l/RXxm CJzxGϓwgQ3P<qa!_8išM*zEUVh#}"Je15zD1U"%]WEZBl8e VL~nP޼~8NRB13Oq+ d* D(=3a(`vIQcTA rZە+]'Ȇa Yqx|C~UhD,Z"oXqda[82_͛7/ƒrM#:Xbi].!gs>B^K]ך%і&u|ܾ__Ձ *ݽr߀{bzKkiA驎d"ť?,B޽{}6 K (^Zzr\: ,Oڏvk4 ,'2hvq? ԆqgټK2ryssy +bW Š$I)'Ijvk n51 P$Q4'B|.BR`dB"jR7;{.a9k 9 t%#e:Rn@Rů*] LW_`]Dqk!yFSj"+ʓ3Oz&ª5f5"dF,˄㈃8Y=G^D"pŔQ e ;=쒚*I0bm;LK9tcLK7Dԁ=݂qDlxqGi# # ݀a$kda$9:syi&ilfhRU(`q!O3Av|S[,yyV8S*)0c eHr&vA]WLc6j ,ChBd}b&l6{ Cx b?\iV;vhVJ"յ=`X%+nZ#/2x,EHO3pxԒ"!ABaFZvJ (9xHT{43x|ljiuKq KPHmҬ\rRۓtRQ;V*_Bk9ۋb]1ۇYZ @5NcZ5UR9K" 8e:Zj;Akk]Q}ȷ:JTSv*Qt8Y/Btȵ*GS!iZ/l &SEPe{||Tݲ?/ <p 2tj9%yxlj׳$l#2I'' v^R4ޱy䜠{@2A0$^GDDn]nS׳B,{u-aoZ$-F: ZNVk\82ި+Qeo*C2zq5UJYQV?V3-su:]GceI}tס$6뭚Q2|g Фj*Iqq"6F=@f+A:h(iC{Nm*B-zt҇Tf#N)[o(:.߫Zfƻ,l8ŞidPyV?|Лԇ?b|z@BF;^|nuQX?~Wnoo #i1z22N(KjtHpjǴM>>>ZY@^Z%ClZM=+z^^HCwLVe%xJA@אvNxNq(˗O~# -x4ܳ1qD3ժ^~?j,ddlȓ=¼ BӐ`{Rk㥶lDKψTw:CL FzxI&5M$em`CsIuͶVŮ0(rD4˹ʥ*TEObPZ A~WT8RVK!ߙw%IBX1 '^X˂jV5fө../f`zv6W#F!pk'gs}MSnnn4R48çmJ&=-ˠ} ~Q,!(F蓞nYC܂`1tnz%v4tRd5ͬ7֢]}kDB5;yjטؠӳv-YH׈|fpڜ&& ,ba :?.Z|PRxMljJ5@8's znu\zYDR۪i vzR9HrTRRI}>4mX 勲'ft*01 :0zQfh4  ?EЎV[Y- SjN84eC)!ȣsOge4"_mϵVpTBtu e'm\E+>Gvq 2K*JT7n}N f~LD8Rq0x:i1_D nO\x_0ڱRh٨b+F6QkP;^o`0p84y^k>ѐB#(EѾcW7pٙq{Ή%[uBNs<[O^7܋,ѲRWzED96,ļNo0DrU0b/3rv k sdv<,taq?>|4^g֡ɠ q86 c 43pH8lۈha= e^y.'I4 իJNf#BSXHȸf bVr]$OGvlTggjjIO%mT}ŵF㡺p|ˍ͆zݞR={BB:IYV f+"+yaĤv`Vq˨?IUkgJRZa=*0=sye5*Se`b$ l6M!t C V4_,ԏ5v',߼Q0h4VV\pa"8/bf^rZ h6_hu8u85$3ۭJY^O4 .subfZ0oWY"iAjbh INGFVvTx+=>j-@HggGcw}?>cgL'5Z`b& xΟqpF}Ru8 M+)WG켒ڬZBĝZxA$FU$(e|Nԝ $Q5g^mk~!^J5~<UUը\&++u0?TR5hj:JJDfֿ(YQl#5ԪwZT?3~Xo~4ګ'u`( V+Ӛw8#CNF&Z7v E)R2'2)Jԡy?x+dѠUz=aMT[$/s}3D@=IA&$N":_Q xV& ©=߫횀\F&#ȸ/Ԉ?}~>X.%yj'KR {0"8|͡aa3V":!,?<A5eZUp8ׯRYZf[Y#3 guT2l0{ˉ㑑v Ud# bX,#4Mp9E( ~ayF A'?8 :|fe>{FdX,tؓ,bZp>q R/1 Hzw}gM~楯az'gD숏C {noo 'z \,P F3QΗ,òR35t .z1\ax|$zuJ(&1z7=QRu/@uw\T:iT^6TZ*M*:IjNˈEv[E|HN “ǐ}ML#j6٬+y$77/jt:i Soϟ>r#ų&Y2O'eK ,Y%⬀ C#u<#LȢ> *JFHj)Αu\Yt/FPv[WWWajvcpmThI]'^M5-B⠴k^?m;a2PQNٓ,GT, kjQp+w=gXP^<\.\yQZ)/ry|1;O޻v;{sNqjHbAf-rlv#l'L`w]BI҂Cf VZGF#%LV=L3w]u ~ ^| CDL3VPRje5e rj N M>1x<)deτ/5t\|3HVNg  LTe110怦!(|  N d~Q'V^IKw `I0ϳ.AuP5 \X^GIRYrIi[Q%MCr4-X5Eld!D1oN:Q<%///-k0,ȫR[N&A35Ek_9 t6{ynanºۡ6ZS,aD-U%i m#QyWT^4g2oV780A+5YIcz8+DMBi^7˔8.vj%Q6YCi(لyEJݾƓzݞۍqx^~?82$IhRca>d>8fcŴ2`p8{~7ksfPizIbhI:??h42=h@@:Yx'Zv gٙt~~niб Q "zUx\X&0nz 7[4Yo44h6/u+aMvK (KeO?{q HJ)%_/ Hߍ3&X2iOPBx%1A(nRQ{id^ʳ `+d|>rn%KCނ?M3|~!́o63Rп{m_pjju/"N͘6'pyAȸv|>7T*j(nGaP- -A,AoD,̋-({ ڭVˍt:o8k#Et@"ZWAhFBi5UeE֛VHvZobzP09)[~WR+TmLJݞǓ՝BV!"RIVK$@&d@^i4V 2浑}PXVz>W^i\t:ohd GOØ1ègl0y߹߫QoڢRyPVboax:zv4[U.TQ$[WNgZ.W[ga岾yBS8',Zd/W+QݵZKIR~r^, Lؿ\F `IkubiC`ȥ.ϝg}k7l8tT+鴠˅G/$jŒn RRo޼駟,'WӖX,t~~dLj='4INBQJ9(zKV!y h!O!P7Շ'd8qzjɤ}2J9 ֋~o8>c xcDMlN75(׿U̲ޛ:F8pԓ`X8Sv#=@ρ?OCM?JyMGq 4)ʥ0S6$ DR^S#IEYZURIb`P.SVo i&CjA2wm[BZN5wj<ߨR ,JRt4aZ Riܔ6֛q(AZF ,\@*sJ[s'^Yŗ` 8;ALIr8E\`Q&YoGEI4]%DY=|NyU0pA*KZ1"/% TLWWW| \_[u;_BJ%j`WCPw\IRÃZͶju{J*QY*i:*'T2ͦsyQSo44Ol "1ɝV'āx-KD,8LFgtqqaV \7_$ItvvfN }QaIac03CfݝieӰfio3)p  L*F`&#6j8q2wjURIk0 q:hv8RV lYJj,NK"cI  dǓ! EN-W[JZU<}6U$wB}9J!Í] {G4%c; h$AE Ƒ?t(xYXOB`!F3 |nQ( N뵾^UR;ݠl?LJ'E ͰFCRb#2qoY.1D. .蟲 h}"ň" -M&@&bFlC!}~d|P`h<?!FZK }@Bd8gU&ӉZR%֟::ڝVʷN$v{M˥Q5-Ѧi펚͆kFޯ Yj5pةGզbݮPJr<˷[;//T$D7^i4jg_d|_#}o70 ^2o:jsq ٭T*7X9A,a&_r' B!$m6F#Ee~aNm6W*"AݫY/$t@ZZ,fAN;!yNU夆fvن}^֪g5}ެQZ-}ևh;6jNlѫXJJ,l69 _ggg>|nkYG˥~G>Zk,> $&ݣ|h``G2xOdb\Y?l6?øB:Dmh&@'䎢l@Tp~h"#q68Vz|+9 wmGRȌ\.-# "cqxFC/_44djjv8}.%8=D/@ xHG1'?>sfU^__k45T2$~ڰ yߩU-KfY‰ vǠ(b"35+Nw敊"0_ժyO.\jU9?<UocI!PI)Nʴne UN#_4Ԅ=jUז@"eJX\:.']\\\X& /[)|*XX@}8q -KԐsQ_^^jX<%Z:M$@ -8<4z!Z mSfia3LT %"z]?6dbh^eZ6FIᅩT*ARt6BlXEO5ʥ(mXx2V 1w)`%k[*BgegҴg.$Cgq QWju7Q۷z̐f ?ӷ.P~LdTL&zvvfgBY  hdh4r$OĈCڟE~)hQѨ9 ̠En/JRA?iM^x'jڪTkɥ9+UҪ>Z ^MCo8e7|_~EFC>|0tE nr_QJK׿U?~4??Jw&8lgdCVLVoϽT%ϫWh6+H&Z[KFc8H=(SQƿg2?ظ( k'k6#"sJ6Nc0lLثpT ,}+v^gB@O#!p*R[xx0]a?rTt8Tt:f$Du#V-radammDi6Ng(Bv٨()^osc;ٸ Ңȵn SE4 kyZԄz ȫ~ZOXhm@ (hԊC,4#Ѡ}ԅ޷zv;dY/nuyyph"4ROJX"h>3mw+JTVIR\=A9ITIȲb sG#LE7CzSVFr)-bRIR%?2,6M>V;6~D1 ӵf5jY"^<a˾:AlbJpRsDR 5ϟax6HB>BZYǀB皳G+~ %Z..., gϞY}$+,ӏ?J8>vrlprM0>cXz 6%#.l$N #ɖ=8[jnF{ B3AQ]/p8顥Lpbfdcr1d"y F5)U8p<ȿa e~QKEͷֻV*tnUVu8qe6 >wEjZR fU.TB-(Bv>+,IIXB;jۺZ- g8Vʣs #&j6[j5 xo"{d|Ge@}/ WyD ;bzwwg$ri=">T*)JN<I ?bsEjwt\q*0 0!C)!ϐFv*Xz^윅Z3I hc'$I0\ǏuuueDm岊< gq>IA4Юۓ¹9vE Hv{kÀj5UI%'Pbfk0>+hvu}Y=HӚQ:K GvIH/.uh?ň,g¹D3t }SY@)dV槖YW0܅lfF{xd\*6 ؑxgW=hݿ~Z? Xib!yBZmBFK`-'M20~_ "aI63⩁6ܜJHu[փI50O=&[f`| N &6LQ&ރ%(ͱVD`\VfeY-QG5M-Aݬl۝;ʷ"7^kZ[Fuu5d{ T}_~E9`e}&atx—W@æsVglyjtjg{~~G[ r2Iglܐ.ZH9^ {H>':!A iztJKS&SBIZ}WVCRy)?'a,=Dd &IE.#'t$IKc!YD%&e$ ͳύ@zyJ;E gqc q\HLIuz1q8`=RL rϊ#<;Wigd@vO"sY0zƹctnϟ~Zmzz>`7BM2d Z y MJ1^DF 1d/ΟvdN#dIߚE}u6Yzpjjޙ~z㇓`y~W$<#[V&rvWWWbc}pnuqqa/qwΘ;28{Pq tWћ7ouQ TSxyyCW(TUF#vZs@)Qm(^={f##2w`kx;`lJ5?C[V8$1P3Q,N!:ObpX/^Q[uX|p~-e2<(~wwgFHșV?IH-MSx²c=d*u%[&#ۡ.MH3t:5'IDH ,dԮw `$m)?z//$A`0Lf1;^ e6LY#ZLzt:O lzX,LTnnn,zyQ`N~|dϿ[ IDATf;NA(./!A';«h%O`Jz2^??a-ӝ;?l*ro) |Rdh)J k'5".N Vt<=l6-ZAb[ <+ =8mnV( e.<ƙl+2 C]__!fɺ9 w!eE cn{%5XDx7 W2*(2bp8I (ȏXpcZ'D#9C;X=N3;Pβ@]ةQ|gkDQJzwiZ_0,tssc,F[@@y[FG Z/͎ 4 5jq8B!`,6(:zTh42~_5T_в4U< TDj\j^'4 =>>j0X&Dykch]Q~7 p3[`GKɤi";gbH: <5{xA>g,k} ~` > % "@0Y_J$4=>>>ARY֏r*mLD P%lA.ghׄ=ij0Re833R~2+;4s`EggguS m0q3sdFD`g "t1ِ0K6 y CE/kԳgt{{kmh@|4u.d>|.w6 ~L%FuDC3hFK=ľsͦ]*ߧ͹T*=djW_:k&eH}Z Q Vyyi<X@g2/DE-۾5ǐSw4!Kމr+/Ksk5iYO~Ϟ9cMZ>~h:63󹮮 YbHيg?÷ \2}Pp5 ƶ'Ժ޾}ϟ??A@[JԸ56ٳg搰g8p8wZso5u\92 ӋiL|i-F 9A 3a_xx^]9IIzq lqDl6#,$T`{u!y1ʄx&޾}xDda_2'~c n[MKLGs`9h23::d"7<gh!)QbS9d`/LD?{0D8adqzD5L˓<♶~~+`Ȏ=A`^xa7|c3B1J\*y7a0nA7gcq/^ϟm1@O>~h5X{^E@{qWWWv,WI`qTըAtΛ@RAJozU*?϶jσ5McPKa81?*6Mpy[m3!Pb,)rl3B.QњuACl5y.oK1~/'kzmK69{Lu 煨La 2gC`0H#zьf+駟ir1!R'@'C'd6w?icCt$ $a,`\ Ϥ q؃I H~~QZ*B? ώHK$^RiI>9qy7bзgQזLPV>L,bG`#`)Cj4G*H  o;|)ր}gs^)I $ӞO\°8k#iy-<˺iHv;  *J6YP电9_[{CC{4?'C}5$]|GNɑdԴ!#}酫/AXgD+ꀐpD]wZǣhT*3DB97byE\ڼIX99gMdFdɌ- M`O6YT{Å 3Xdr,OV0%撃L4u,bag^(ʄ|ZX+2' J<3:Wi ?z8Cl;hg.{P2N$OV z=7)A(P]hd6gIdb =ri:do~ K4?;8phDWJ^dr%9c]޼y~͐s scZ5D+f1fJBCs厬x0#>V?gs5\@ӦAO ( Kp\%d1dR_t:zxx0"A%H=Ȭk q8cbD6lRSư{,8]893v萉⌱W B;] ?;;36ω"@!ٙsq >}D /_@>B2vPYJ@}'Xf w;1s {A {wqqa9ʅ>9Nu϶džE!`~D$Gz}b3̽ЅFOFy"F"3jCwv2 3~-XAo ^~KH!n|mGԂLZ̡sX8hH xcH-cCv8 |MO©>ޜ=)2\.4NĜ`"cz֕ h 6ԕpHA^D@>u'GJ p=Ф@VO SIY{Y+;~$emJ}`fqK8A㈍w.0'g+xw' A*i EɄ]&3$b#_x[z d \wHv]5㳑CbN P9t"33DR1~_R;M;lO|KL/ j{زeY˗bQQDUx 9P ڦgbm=vݮ>lu; e(~<ЩXFBG 'IbunOR+jJUA{Ngp;߁ya15$ Gyu2&yOy~DAo,b|`/Q>>HC#gYq~]*@a\`$05HłP6_.GNV+c>>>ܗL/ @,< 72ڜ[Zj^04@}xJ?>zN~$+@w50I|{jX]=HK(PMd8Zo7F8kr'$`M!fYf3-a 82W&`@Hā\!!B 6b?9ڗ$@At$ZuA 9, c jLji H H0~LoƕK $,s6e6 'L&_,B09,6h{:G)nJjH-<3ύ8ʹ^~o Qyxx0}vvJ_ղSNd9 Ըl6 ~O&3JdJ|Wp+'fCNi;vk538&(uC@s<#XNf4>ri# < D o7 R|wb#ļh wbΦөu+}~6{۵Vz||4TA i8x<ٳg& B b'P>K2q(*7OS|+ |vvf@bȈgapk-6_^g!I]__?aAsh% ._"pD//F 8rl͛7nFx"7 x재v L@o"Q1$0pG N2&%эcky5MV@{M2M 6 ͍"?jh &dQ8{!%{[CDyk2`w {B'b@`Gpk xE[X/L?, gY>#lۺ{ d@d_FS~ApD?<$t!fd??Iw>HmNlŇ%m0v(PU|=d~5}7!0m4d8UzqLdOZ| RdQ-up@ZvA;#QZ$y(XAVLk l\8q__vذ&s`jF0^ʋ?>}jc,^gO=p4Nx`Z`~#Fϫ>aޯx7wo6&:LO?\>|l ~8!8E&@bpgSӃ1u(;=<<_ח#bx  - @}2Jo@"ʹ eH[ 2l?^uBgU83/_;O?2~83$wᐭY'!)e!xF9jf$q^wx5aH~v I>`j$ZARK𲔾MffspCCM{rH#aѰ^d6% 9+Ǡ } 3laQVXddL+ \Y$^:1Sxvzt^Z|BN|EM(6{zzEx_B7aX}_"lT`e U@&TXW*lEHVho¨=QWc@o0 /uÀѱ  AV!kL'5p؁cyl Ƚe @]Yǫ'*r `@,q z# ;ɤ D`q. NgT|!蕟r sgFE>&Q3fw#P3dk)1dV0n5Sv%(!3hDn>G졇HHG:_xa/]@?Ϛ4c^" gto0NgE#>2%p<@>z"O6}m&Cc fm %$ [KGs?_wSw CBbZ$Y{D,8-׌DZիWZ r=d@8fۋNd_Oṹ`Q޽3#g'xPͦ...bP)f3{S!ڰU%`ؐ@(bm|+`kLC-ϝ.;5O"3aBgǓ@.gxգɜȢr qv<{l< |zC D <(P'33V~wikOpb| q!Sc>PDOGhu``Yu`)K@ F8dl6j|NI(NFG'SK#y=_=*RQ2Fe #aB9"`&է(ipn6=FGd1Ǐ8>rV4'D;nnn`t QOr}Zg(Ƒ :"0#^ B),7@+( D3kY85 xGXgel(6rw.˙ W˾ +#bq@WBWY7?>ɲ= Ẋ|g~XדZ ye&!o,ޡP,P7jW^ )ς"cN ׏?BER WuR!F גQk"z;%0g8nq?`9h^ ۷_@s>xd{4 % i C} D o8/S3CwdM 4s>iށy['(HYw46 _~U^c?l#>2eT/Xę~{1jX~ 0>hñyn0lR^JjO(=~$(Ѽ8qV /74Y{A wA!Z ;{< 3j/'ufxsA ,a0Ĥ@S9ȓ<*Y>(ygNGRؚ/d 18UϬ󓽔*!{׃1 iqPzMy>ށϥ`? 0~C :9 J)Sߧ 'cHH^\\'0^\\v߽Bl6V2_3}<CDnnnl+?`Γ>z=z. ŋ'G7r<AǙFku'·z>X?CQe=\B"@Z He $nX_X,lFN}ck@&I@#`EC@ "IOcNLrPyPT@s/QʪtBsE׎uΈR8yakrd= {]]]rarȹ3Mى!0ˁ9=$[a3Hq:###Ն Af92O\&ؔU̞C65D F SYGK kO򲍏!+<٦=11Q8#᜷`$36==]?D9FhDYKRQUEpzGu!Э3ʐOxtlgBe AΥ [N0:fzfƜgffg"A%i&GYryGs}&ghEeN?~o<>fɆCHY?D&'p`(r~KNNAf84c^HYp]+~=3瀼իӧ\{^WuS—rmqq̂ˬيmfPA@"G!Lf޽[D?GA2AZߏ-Ex>4ȝC!۹jѣcقϓ0콩]^^Ν;wJ3 Q3/ЀZM=p9bމa9IkfwɈF߾}RZ"aY'SCu8y0֦ˍΈ2tkrHY*+-//37 @x0kAZ8677W%)<;;΁9{LaMI!lgebN}ɞid<f1 ׁ~s@^AθZб$1՟MШR2I(|9|z!͠T.ϙƈXY8֖}j}r-3[1==NOOKwA ;Ki`lS8o߾J@OF亸hbtʾYwCމVCb>'R"prBj{;::*6=?H{*(! r INGF"O>v:[/c(efpQ:ZB߼yvwwPPla<Ab F-PJk05{&:r,뿠#z`5(I9]:rN"2 G{e_nUiKKKmkkhL@0@0(=^s)J# ׯmoo_B drz1ؘaY yg VJ+;TV@%a9Qd###mXYY)}cC@K˗/mff4cQ pw<d:8.{vM"ᴉV0Q4FrHK.!kV8<<\ӿ1]fv+-T2_֎!h Oȟ~,bsFe`T5R߯. tsAlWj{k536Rn :k!{nq(rV޿$t|rEB6) ޹s5 /6R_dԠ1;DZNNNvlVierrȐ5P`bb_&R62xE`w)#gI &q:ÇߊNՄ5cyIe @T:qϞ=+ҁLv\dtu5chhDο,H,2>88Qj Pcw,2i T Dz1s純:΁嶵U 9sCyn;8ϟ2 XoҷF~W<]80^Z] :E#V1؏Hw\hgqəV` t.L8lRΧ,7)`OI%3P###myyP vqqQ,Y"CD2韞o߾(J@ e`Ɲ () v?CX`7o=Â="<<|(`yJ&hu||\vCg6$Y- Z hG*b8`W=ܲV Y،κ#EF/K'X.))X+MF!aӂ( sQϑNșQMbe%kAdjڐԐ $_/Nv+i(wIX5J `S99{~xxjOhA#|9cccuPYqv$(EiEPL w^A{Y_>J [p# PL`Ɖb}×?~,.AC:tڂ2TrfA ]a%đb-J5U-'iM &+ƈ$J\ |rIʲΝs:;;k$$Y۳gQ_DF, >>>.%q.zB9(ٸqhѲBp635lv*?,Ȃh"zddf^#q)IDcAO4rNՁˉKʓɟD>HJQb`eS#99[!ghfff1bkYL4i9@VFGGt}& F ( TRT70sw [i!3z;dxfϲv=YƩ;d+Z?Y74mjj n7/\J1uELk\5B-Dրf`Ts_' p##' x7?8/H 7!ֲh(xvYwGJA 6Cav1ɫLe#A2iSJcQcULY&Pe>?HV-gbD96"+o'ڵ2E>5FF`g&):*H# H%H2TMVRgm{{{93zx-//M QNϪmAxJr2+:D=j9Hee[ODzy30@,\1qttT=ǝJu9#צ$ @OiDcSmP!45Lm^]]m[[[~ߞ 8DQ=~lBdtChg 9WIDVn~vppP$_~H$QaeK;D)pfBÆ.)Ji/^Ӿ2Cĭϟ?W锈&qsˢЭ)Y`V_Y3%$dCHɂҸɈ<cmc||'&&j]M&v.|EsA>Wpv.*AdgSN3>_~>܎rޮ9! s(9"Q=}2&̥%^liIMdzr(yq5DAm u{C$HLꝂfLx V6ϊ߼+xH8b52=-s*@P'p&<ڟ^~ [ :!-*Cv}JW+++5;B ?88k96+BrAPDMJ -lnňX+s, ٜCd>.G ``"3}K9˹PiTL[+T'u~؆J4@` L y["(0<.휯P˵鴅> WtRvWWW+P'eeC_v1^fnaZ3p}1e4}9`vc)j7$@Q5Fz~-  `$7GU$wmKKKeXMisVtf " KQy2CN^`;f19@oe.eTc.//y_{ZjSβG0!'m{{oB'(9'}x q g9) Ԯ$իRJ87y%;{Aւn"YaBy?2A`NcS5MY;KOO! Tu ymooWQp,IYhw'HB^Ƿΐ7ԏ-9>>̵/$~ Ag7D9P;fI6.\6sommUΆ#nDA>'Od>e`- 2lIAAqkCDĹ}'Ch>G9߬ P@j]f:^WĒ4ȩ3-#-;:ғ'OBƧEMD_'ttt{}| \l#PQl(%Zz1WY/_A{Ezmff˞Ǐ ޮJJ r||@랥KvNFw]]]: :H=̲Uf#BD' Ԏ!k°̡鴩JՀw"_D@іmrwi}CCCӧuh5VĥI̒%=j{dz>~dѦF.P}E,iSlv - 9/z.d͙L@ )Ϩ˧hwjO7{e`o# IDAT;w>SL-;I}`>Gz΄ϳBO>1a>^mBU2;3 bHxIJCiF-jIUj6JiӥL!>G: ZiB0%mEBF2X# 9sxvvzBNyG,E_[A@Pi:-iCFB{Y+e"Biqk^wRdn!;u) "Pz  lɎl.B"UkTo׾GВ,]MP v[,؈Cj1ӶVLoDB 97uxxmllTPwdd-"EZA8ak0B3E&K/{r<$&5q0dGxh!; D3E"Ӂ94#?cgj3Fm:GWOaR|vvi B8zuCƷ9 W&gY*hB͎'P$EM*1X׭3<pNle ܌8z x ({S geyy$٭KNi MҊ'es6T'Ct:Er7Sx|֐oĞ .5 c&E.&yY]t 7o^w2jWH=&lQBkH6v&s XF*䎡(ׂB ]y;;GrhmccTjAAi{{{}WSL5.k#M655׎499YQ*E̜޽[2ͬJj"yP@ A.2ΌU"省qygf O}TRԛH3|Qy v}sUSfIAxcw#ARh/իWÇ}'Q+5~,B ˩Xꖲ;C_vFFFfeϗH|8VW55TF^CEܴY_A}`uu"No 9TYӧOv^LÒL:lńPMaI=ߍS󾭯z"怅Մ] cR12߃,fgI%u-.k5v_~U̙sD^()[CYlA)bU^)Jp5,0ƪ77;HGU ?==-v38)&,zp-;{i;88.Rj'''maamooWgKupp`1- Qb$y={2lUuoA9;\5ܹsOV-(,;rZbYI В錓<[CdXwi?.Ùcrs `63ǯ_RVݻmoo]__7o޴O>8W?-bOf`<dk}}0mnnzr5P}(_ƅA :^3/P#ԧ 1OVB6TƌOxS$"Ё@2 qJRwK pB9ט#%X-:չmIz N0'պI"rT)L>\:hy D:I8*bÇ[#IiWBa+8ST>&vN|^jڳ8'۳C~7޲\R֘NNNʶ1&#/K*.xpWP-D&Bϓ sd KrJf)E,^N{HY,*ѷ /wE'Aˑ(5RoNןeL ҍ0={ \XTD @@t2?NT&˗^Мɕr`)uW,T"oKggg ܬpSBsYH}XD k<X?Ȇ,Ǐ}`,8Kw(FΑs{W& :t*;IVɶ$HqlDsoM$~W\{5׮V_bUJiCNC ֶgR"9??/+CsA_:U&7η6Tc(GAi)en[4H'g`4'''jB aN? +@>B3chH"8[]|~YYvB9T5|`) v}}ݦ9;=Io޽{W-\5Ay >AMI<5?PBHJw7hN3A.!0f}>ոQ8BwZ@pC'C1[L5;`r2M3^-6ϥ zu\KgTEA*uٜ̰hiWaN^)sɀNq9 ٞMq ͧLg ?19lbesϞ=kLU{dZ {/0!w߾}yM!֑҇Q-~Sֽ"o"YJOف:nLNcH%OtATvɩ`zrT̴>u?tJum]-dmΝ;[' pP Xft~Og{SZ+ K,Xg=;Ky }P筍S P4v@@ 1"d03p !H*XM)u1 WLv%kXɰMs9J799YYB𐟯U b3D[1uss3Dw0 H<|&愜,E2I" CsUDc2!ȘX'#ExŦ7ճlfOf|]YY @DKJtdmtCeRP{zzZsj`WЩ-I7^WsN~xc7j).Çe@==/xv6sp@"@𿠍9&ršy*iAT@p` ONNVk`Jڱ/i @ ׳Ij?>>677FAa|fX!Hΐ7uV|X鲏cw.E`TSP?J9sƝ)$|EJ#YF3!e*9p%B ל(CTq̖+1`'G lnSwzzVVVPP1q<ι"B$~Ϋ$/w0e9<)"q.~7URJ%u8;Ç E95!S~XF9儳۷ vqqTzeQQDi:{4sI8Z sR# Cf (pj)!p42:Y۫YO?UXpS&LĂ-f%v_ex)B_~}2Q]67AVOM$`YX:yyvwwK=F,ݏw-I:IpY3 yvQ3H$Kb$_\;?Y9^,ŮZ߿Z,[QyH*cO3N "űp]`ugθ8"lfh!3 iTu{/yG%<x`VjVbI&)_kA8fNe g3ʜ'?~;G$1FyN!$"8D-YLB_U41]7>n00'd #}uuU 9X&*[]˗r)H9^ШK(=88(չDA<16Ն]g#']}YQb8p~9HǦĐbC+_ٔa ^'[S'V‚P8 v/KYZ{]9ìlbb6<<\3{^ϛ;<2AɃN4D,^ްl$͖D>ed/gIpro2!,{NRCj ĸĹ" pȃv' I:m*zmmmU[{N+F.su^9lH V Sl.~Z6Q Θg#J͑n[ǩ0MNN4@3AQDăe|=;n;(Jn7`MID zֺa~&''e)ŞH :c$ 235V؂[N_2tm>Ӕ=MԢf|icccZ3kyd l@M#F&L(CѦ\ !EZrm{Ѭ@\/ʒYqvZ]GCRV&YFwEI#@auY/D17"0x >AZ 4nb~5ĦW KADb3az)99&3?Su | mooW3[5JR;'XQOy0,MѲ˙MOO}ζEj\:޲^&''k q}}ʀX眽ɓ*9@(e-)ruu՞?޶+ȁ.iȉQ,e-Jp=ՍGGGak1UyQnsjBP$ lS"mJaEl)9;9(l{:9 X*G {[ksR6\{QB5u\^_$csr,P1' qHDi J4aZ(5Rʌ]ܴZ90Eʍ1lpȀql_A2JYaB86DjQL–hzz`jf kxxO?mΗ+TV3-ܹTHn a61F;{e`*SY__onoFiOrR8!ЮȈ Nd $,A1v'9klSzvrr]\\ӧ%)'zd IDAT"è~-//W}{ˢKqnՈϯ_'c4aRwH'E*ik V!qLXYni\Zw;*'&&e,L=yJNU9lezC)[Od)nTJPId]]J01gk.}|v1;.} Ȇl2p b43.8ujAs0R%Ggeq摊H[kmnnP6;\Uhԃ#` g{v%Z[Շw_Qu Xrɛ2\q`&c63Xi* ԛ] Z:am_\\V/ÇED2@pM{C.Rh8mkk/qS53hZK3we}r޽?YЌ_5rlIcFÇmww"Nٕ O%UKw1FN%$Y&:G]u~joscDE6ϳ,b% <с9abp5)6Zm]EiM?p Z⁐`XxR5]uNJ aGN0 8*PowXuL8Dr &ӦƩc3~ %hAfo#`Wp |b#d;s)~?::jSSSe#hNK+3スK`,ض?2~O ⦬(ۤC}V6Rk SΔz}0B9RO>+e+Ȧ5cnU'v2;;[A8 Uuݲetv@y sudk^t[wRz5S -N)G]&?z{688޼ySr"@>O655W\XO/}6^bqfYJdHK:ރQuʇ5=nzz-%.w'\N+>#19緂x8;јCȢe"3ޕ Լф'nSԟ_^^öXnADB_~iu)A٪=f ̟MlMX޾uZ $4vM)e1 -s.kNz!h-<*8↺l#$RtI=z)1X5 ؛XxǗpdI p~1 ,b,ڬ١4 $RJyލvD2 aj|;aΛ7oZk/xY#K=DθBvdSa ?۳`2hR@IU968Z;~ZMk͏?>|P)U$0A㣣6??_@W=a)q΂r Mk2ۉVdsmuu-|xU(-..655ZkU277Wc߿ϟ?nA@ΉL͙"/ˇ@,.KJd me R"zlAu/C}<766vvv*V3^-Bq%8IIA\ϜJ)ȳ*( &sZ9s[@Fb >J5HϚ7۷omaa)a,9!H5633SIN b$guJ6o}fy)J#DDZ M B`?88X)Lc)zu7b)/{ 8^lҝ}q(e=O>m^Έ!97nhr2V7==]םwiJ@ߙtK^sxxm0mI.*HZTʰ$YH,G+jhʙ9A/)^de>KbRp,WQm䤭= ӧ۷omMMMU`3>>^ Y8lR82H>)GR3HR"rzWKbvzW% ܙٽ UD}wfs r˒U8.1i&ErԟdjJ5XlP 4C!CU"QHiD#6iS19sI ØKKK%>[__o?~}Tqkm,̄nv a sm%4hǚOb<c@fSXA$0::Z%ǥ ZpxE}{dB;I{y-Z&d&Y;88>I0VTBrV ;o dsfs"C$3{h @߹s8A,W~)dPH\F<`F+ wwr4h~}A`JK6 9"D@O:ӂ@ƑjR~WիWee_fY ɸϵ&6Fz4NIK D Md&}F:! 8{t!e `蕑g49|A 0j?"5&Rmc0%`KBѲQN)e+bvʝQvQoONNJO$d=23=99i+++EbeY9d-//?V[ZmTtseY⸜u7swxgggh3,9Yr>Q9*Gdq/ H_05/dqju.V|MTLLLTml=!k+'39PCʕ{ plUJ*"RGCv'dViO-h/SrgB0`O'-cq*.66?KG黲fL2v $B"ezD"Ib7 A`lG Sw^)2drԢ$ U/ ԁNI} ܍`%p7633GGG~h#f4tn_+g%LȾ@I@FLa);#1"D%1 pmo dܥl`looqY)SJW6566666*Ch) #0k駟F$>RoBz^9B!>% %?\fWISx#j)Т.o\+#g?YJsvpp&&&*һmw麟FnL%8NBNNNJ]:4! 99ͮctss%Y@'p#_UlwKBkdʴ&'&yH_K÷` WvHET.xYRPh1hqVROTa.u} 1LSa̜ZTD">kX@LOOPV؄29d&ğ੯&eAv5;%iHE-gI0QƳޙ`-*#Yd!PcköRgWJf=jO>`óq>/^g;:^ 8*aNʞF$͌ڝ/A}u="uvR^1gO˗/8daŋʎS:tz?xYESC@/AiX6Ų T#ű'JW S/KŶ')huzloo)jqq}l{)qǐbʂw?Bi]#{ُ}J8tjJPs5ln%777fX]850$-j*8LuṙRI!DR|av.AJ`ٜ 6DQ+vn2i73oOWjADs_=Wfޔ>F"C^̐ec^2]rE,=r7MkMMMs82{ |r\Es=wOr> G쉡vvF.d2]!pγ>_Ee ÆoW9C.IYIm2=?5ܴ/^*>D>}UI9 =<wN{>&Rq=8zZԯv/!bZg8Kusd PdŞY^K5{NR9 Nbұʼn39?>N AH# : -"ϩc {;Y;T-#,dMa}StHGY z 9pF`P):o#0 Ό2SJ&WA)%9nHYdÌcuם&o<}Tؽ`.zq1f JGPu||\poڶCI69::Z5A6-KJO*zBpۧ~.W^KfR 9^ ZnnnڀhC .j zH8ڦ᩵0jl!s:ύ_Y4@&EsxF}0;FGGHM+O<)~vtt%ê^>Xùdj8.G(ÜW=zH HT1@b (>|'*266ֺn(RW)ѣGmgglLEA+ҠǙ cFpFʬCRZ~غ[t0w!Ln ,6C O@0An֣GJ뵹>.л^d"|pEy0Y{ԓ}-WWWmM@.!j_2QRlP;88(՝k1¯4W?755UvBe'r0!:BQV/ 9nX>{mmZ EJ) Ǐ>%7n>|X5y?suuUzω[HZOk7ʶG %C4` W?.s&D:IgLQܱd̾N-gǐ-1Xق cHR{,dKc$0>' rh'nԻ6O)#csޢ$1 'c(x~YڰNOO ) t85_\\>%PDŽ~ec nWwdxrrfff* grLF$"Q @BYR.5A#ٱeBe+ p`*2/{D\Qrdع2,*8g[A588XAB / b;!&9cppח&-!hƍ@ed2@;ta%K,YIAbc_{eT>Ƚ`/S]l='z%U#.={0߯2`Ur89oVZg_'Ǜ-JusrG,C OOOcR Op)#-Pp ҐdOzBhrQqg4sG;6<q!=CNt\Bsul8<2)Cl}m58a8o~*ιd bJ*E}QL'}M뮼uq'y{{{l:5-3Eã(A |zjgff S(2f ,V;@U;yN֘qöj3@ul5 9~.{AU  s6݊-EqyvY:kJKI0Gan IDATe9 YO$RI(ZBə.NāI .]ˏڜzj1 93f" ޙq#czwZZY/vlHCj}HGpue k jJj,r߉_KinH""ߜ|||\:$!9y̨*?zfRRG%#T`qs482O2c6Ø9]F oD{9o߾Tl-c'lʧu,gJ0~+]ck` B4#aݻ*D娐haR:yݻמ?^#jK:B({n[]]m[[[UZwj?s?2`q$*+X&? +њSDɂS-52 q.f%:tir┽gamH0cccғB!uYeXدXMͩGA24?I} sQC$hooO_ SM*Lf }@^DʱZVHq|g• =Eκul;;;E*Tg¼d$u&NNN* 'Rw-9HQc.^<<<ܞ>}>~XuIG{YOMMUI(gkLi ԚesD,ޕ_ݔ@{ yM5iZ2/ljw-ɰe`ΆC-^|Y5`0-G[JQߴR5 9? 9%ɭ돕Ͼ|iTmq6tg[fr{8#7%[M v݀YDJ f󉉉嬽aʖd ezJ37#Z"{9lgD.QzF)}^@g@A3ZcTj|AeS>˙I,9ծ|4eEC(Vo?s;;;+55ί_iHP'zқݻwm~~D`gU7&Tݭ:,aV1`G)$SA^K %ҩ 1 ^T.~$8:Οte hv477WYVMHjPDa"p¢#Б$6Ii UVjA,4`hbijŲ A \$(H$w-Ur"ڢϼ~.![hT@.U X`\=kBLRF**EiEsE٢7zF[Icdd5ιߋ3YсsX}j'$ǼqgMy"ř{$CG o%'^B#/쥿t: nw3e$ yx1;;;줖d+". X9[gCxttT6$%]S>w:[X95Sd=}dHORpxbf]$79~'U:,шc ;9 x8qW#VH(T$k*;cAi9#sPdALǏwpRIO0jJ9L0:RQf$a3Y}98;޲mRթO¹Rr4 W ğ骷cc ve&ɢ]3)*2`BkN9AA!,픱"䕩I@|llw;Y~vxēHPB\ Jkj::ŋ#`muu}Tbc~駶ע!ယQl`qppЦ#Gnj1k~h;;;X4#Uۘ#] H>'Ɋr+'@%j׃IRNr=ПBe cpXwN顲)ODdr`?PCjAds ?"8K!ቸ8$) 0Ѷ>EE{˜}ΖxQ,YL&a C"8+Gk% $(9 ꜰkNMe/G{t{l4vV`6g{|~FdY2[b#,h3`H)Bq817J !!39{I>>>2cpWu9cH[dЪ(3Mg\&6g[Y qߡtBT]ճkTeV)ʖhaS.QkkАWzq4{n{Y;99i_| eñٶL\j< G˗/x6IL{&P0,G`kv677vvvj[.H<'l]T2|D)ZX+A,Sz6Oq} 9є$` Xr)KwA§`B&CD³OOOkӧO*+Nj:XdIfV9 hB!$I*B&@sAAmff2$_Ph FLp+4OA :HB59==ֺ$ܦ@fuwwlӝ,+B%#׺Wk_n[?D{]_ !ߩ\jn$rRHUGa9_NlnѣGo 'cJq| U8>ZLREH‚k3x'4eD-Pl*pf,7 MylNZ82mI˗]$rl=bLauf*6L\tE'`@X|AYMy<1'埄fS LRB lҙaaMRɺ/j*\~"gϚ|{iyRAf;mݵ~ Qi۫K)EisS)GI׫ wZoooWcEg_"LI淿_u,&-Gyrƭ)Āϕ+]gP˓:OБm}}O2n[fdz%{)'Qw^m޽d]Bd{( e mYF*=yH VȾZA .Q=66RN,c,]4W4Jb?gc{d zDP* y (uS~ÇzN677΁]IF9l{RA]޿_}{J`͌'''!猀@"[{M0K֓s2QrP!葟/@ѕ;wm!xȬNj)qfK> Vo5E@ɶdzUoMpfV˲O l Xg`5rKKK~X M pzz~J0 Jo,W%@S 4)XQ- oFd,0?WWW%H/Mx ydwI굯S-4wmniM ړ }777PǻnKKKo[-5+?Pu'BmҠ毜ŋٺצ(,{rPAN (n'&bf>_r{DTΙ" (YϿ":Z!>bev1{GaL`xxl ?88qbҡSjj(eNK"[n[Nfvvݾ}FtT.<~mmm=qggga.A{b;88y((` 98r<|uc#xFgq rR:"C*, f!eld lb}VyAiwB ` U{O؃E^]]gϞUnr8H,a?Ä0ޒ$`/Y8D=|<;37o=11~zwٳgmssO` 8jѣGm{{0f)Mx?2`4k CΩ"MÁ#$*g $Եfad aA{΄rnnqN%ڻw}3c=8bφx#:/o>|vgYpbxHi萨zf ڹʬ$a' h&Q+[²b0!D*`7CC3˗/f`2BYAGRdɉ5r j{e~GB$?<=dQkպ8d[T2春 fXJRy Gz i `,#B)lyV/ s$qٛ-ܽ{o'Ydnaf0[jϳ'POo;kUJt:rttTe,EYCe9!;ׯ_Òipp9Zdƛ] tohhhyhhu:ؿHp\+z=}(N7LV9dHH]TI}`cF%3dDю&bJiܼl&qh0Q;g#]JٰQ{VбK"[O5Ԫ]^^: ƅxT@F!(8;ZP@ xΫ^a͌W%"LCeEgD>D2dXs0BOz)H 002S\MxjSZ:;BNՌB-e)2+@eԈEe7qZ骥rȩY D4/E* IDAT5o߾O<)iS Õ]k2ҙR6bl6(`Q v y$fs9a6TNCG(qȅYvo9oZP;+΂;.okkk(P8:RzellP1?))Ҩʘ$8t$9ghttM rj2KxT$rYJIz&AEP,d<#pĩKy!W3-ڴ=0a8 e}9˱pzdҨ>?9'0 ^6$J8ș sL׬C09vI $8QRj{`Z~R9oƙ[YY3c Q` LhrK׫W]ACf %RSt_eN ?JGjogtvZ nO@\i[R2;==-Yԥ9ݻw59QSJP* $J^hQK~rrR,+sqC; j-VY{E 'fByp/x@333UFFlE^`oko߾-$:Dι }÷aaPCIqf i('uɆs@ :224$ fΎU肱V!qT$y(ui JK˪K; #_]d dê"@~݄,8{6]slYi*+?5E&iC"^*Q}O@KRx+'w"{ӧOz믿7خhfm ӻ10)Q977WsBΓ36lZ2|Yٯ"%r'eCCCEI'k>Y7#C R|߷[nqH"ɜ%kAC9> asvL=&NL=$x޽}L5m) $t!`S ޘ촻[ɰm Yo&b6޻9OWupDZkmyyO>mmm/ YPWw"J h,ӧ"f$ֆAl4MP5D J([n߾&aY?? ĉql` '&3\F R4ij6 3=ou89["Uh@/6RfmrʋEIKcD%/ a R5%Ppj>u@! #)kt> xnYL :1bHbR?55՞`5gԙDdpMɧLmvp2gUdjjy΃,ecI;E2IK(|GvD6e 2)`[Cw2'\VS [腖)bݐs%8G |{랝n[|06??߾|^|޾}*VJNJ*j3L"v$Dv>8:/PNX~ q>$.ܹIE!5c9Zr^ڄqEps|}E !юsDaq2yxsF?(^;vaa߼y vgxbS2A Y3PVSDNFs:h2h|9" R2r1z˜xIZLO@eD8ClwBpԸ>~^zU \,Z7rM1j)a dXH~j.V r(%h uyyYsmUF-u:Y wf}}L B]8f{α19PUm|nn7#꘲a\c_pҡ?Dhr0Zۭ?AK7ZBƜD3Κa|$9ONϞ)QXuuLj${n}}qF#&'˼}"-I,xv?/L(){ۆ2iDc4=r0e8y _qsbB9*.D-4$o{&! )IG);-8D^C6vmvvmO-=epbŹJ\`%2Ms:j>K%'pz ?H^fA8ܤ>1WՃi H'v0sD}p GB0!2C S0 FFF* R~ڗI[/)O})ٝYS1V4Q3੸E>}...K=T9&H90AP(f4T9Oٻ73A,~% 7;mجO lJ LpRصq/e| D*IQJs03ߑ/{oR'e ՝Do٫B7\4)BR.uOe62hgv`l6F.a ]vʁ͕q gS1* C;(z!ð6$ed #r!eX * @Ov/X73$;pZ~zu8&EY(0$jPtLe LTb&''+Sڂ''EJ P)tRCVUIo{r RSamh>{heQ߾}k^j߿/͹s^5AN<ج ~ˤ=Kj tGp+;c[1X|yy uC5 2eON>(Q?vwg\%[`<&Ӗׯ_W- M{o{X r4 #%7߿I Ps@҂$J oʱ9khllV aMf4xڟqjxC6AA!g{iEs7d^p+!9J=X5M/կ |5PGR>OdBaʺ )bcD`8jnv4GY}fffi 0]&'B1QN۩ }Cꂫ}9 L<}mm}2{{{U#4W9`"C=x9$p+HzykuF(An?@` l4==],i(+u>+QƱ %}vv7RZb<#)se[lzEo>k˜IB*!{ia///ۧOÇQ\l1`gI6o"Yvm޽?wg.)%H)+GrfYyK; g! ZȚ_`z9a%;&~4 ݾ}MFvI3eX2`1OSɠ)XKHK V `~VVVR]]6W2"jG&cccugggqV]lZRH_gp4ŋE6dEb%AC) zmʸ%IKMkwfF%aha03Hdn,YpkZ$άL K^` `=pN eߵ.o_l79g[ Y%4CC١L2-ZY3I CXgcbHAΓ:N#yhCFr>,^X]uugMf[lH tSRS"iɂhAN0{d?<5•ryJ 90)?gCS׿%Y Л$x//zlHW4@l8y01CD*c`Ej"tʩ 0˒d`7o 'OnɄ Td,BOP9Z?޽{WzUhR3^oMj (7 2pe`~H}c:jTCuCjP?}I߯+ b,x}29[r4&qL7n_Cmaa]]]eGڏ9||~~vww@0@>< `vvou9vC,r, c4'(Go#[)[|u*{ͶUE Bg8t7tYw/+aMH>Ir#$855Uw.j͎!)Mwe]\k>\l]-i&ӟTAޝH*ufA{"9/RFnMI ipM8$^A7[]&J"HWIԷ:JDsЍ7ޤC>K.hvELC9)}EPgH+7oh\Pd`͈/^0'#,0K9R7A2xuf?l?n>|(G~xm!1@ d9ѣG=B "nk,E ×/,,#H§9k-N_f.ZڻY<I#fca[۫d AN.”:3,XE[U+q&@uܷlK k 9ɠϽ&&&Jiϗ8;;kK+nþ 'wA;eTqƃleI2,X>'p ÌAZWl31ЮK)OO?;d .%J3;v\ Vz)%ي!5nۧY}~ 8td(Sk[Qf`|;j `z ψeQJ?H`彃K0\e2AٰYz0|mqq9㝵]P +]*}~֥9*^ceL~ЦHd},fqqlg]ٳgmgg>g677WA:UJpzP<ݗrorZ먱SFKR|֭V$GڇUw^A-+5<<$---EPp~~^ @ OP@ƍmvvl=RF9n{ݻwK{җiC{R[.PN[4t72Q8a4r*z:dApM5ey@nUǏɓ]S=gREc߿o+++5%>}cOE3}4bӡ `=F&z ^ma%iJ5!meG! GNNNP҂ag=_+ #ګ9J 9J0J•]z";r 6%{|j-e zCԧk:VV7,L>55U[93>ӧO՟ggg9F]lR"#;{vI Nog+js4VolJw2ON, Rg6y(kW&;LeoZ(5zgŋݻm1S=G ONNn7 ٩@MHY MęK:>>666Nj^\\_T̺7-)Ys! ٶ sN[S7ŋ*;Z IgA[m;^(E,N:QZl&&&Q{Q] WN1 p1rٖq>Aad6YWLZ3* r0mw6PSl߾} 57nhCoR9T'(rK2Z,/ZQ?d yj`ѝ NNNs2>pmQIJ+:0#,{9)a,+h&,wSSobkEJ ɱelJl`pLБbbV_j6%9)dA,)(ֆؒ7. {jYd2 J3Bʑ~pz  2ؖ'Oʀ 8듓}*=ީ׶X5@\pǘM{}}^zU` -셝lKcUAmQ5uIȟLC ƨ&[2!2&Ɓ-[BEY֭[Xۗeke\#p9g5{U1ۨO\TY@vޱ~^{moYPP߹srA&uђRB ^_MJ2;ߩ3I57|bb⍈AyPZlWS3Pa-Ö\ENF`I'4r[5e0sHxTA?{S3083{5m-2Ke`%G C*/T@r1zիWmggMbP,AHm g95+dCs28(%_t3'Sq?~Wpz+ɱ5.W8Ky>siE֐SWޙ13dڹscw,CPgf e3"!v?KBl2l߾}kkkkӧO}R={677X`yHZj Jun8իzgV2] פ+kԅ6mj}vx{mmmoo R9`eCv_]kĿjѶ۽{ԖY~vNPJ?O.廱1:vӧOK1 ϐ5q6j9:e h$7'/G;88( "FɸObdifffn@m | kill|mnnpJvn r DJ,>,t0qS*éĘ :44ԆFGGȒr &ND\@v{0B66UD\XQz̐=;`n$ h[ZZ*h9Bϳ7"\rV 0bmllH~YA爨߁e)1u+/@90>>>|PWk'pzz^z۽{ U_ g/3bK4C'#{*S 8>hkkk}S8ܔ'T3e4!L ;̉*vڶ#5z ?22ҞÞ ɲE'{9e>Sv^WFp.l{{{}{})-g)B!C/LmO" B4ZkU&J!kAB&' ifרGP?K6g+!A8Hvo!8ߥldd.ΎM ~{ttTp0C_οK x` T)ax{ZAq]BrԳ~橋ll8ӡF|&<4c!dQamookr+gr <_ړ'O*Of. vxxX,zYz^=Qq0g ;C0(ERK>>CmO"\r3jSt9ҕ,z} ڬ}ح[Jjm=rfi  d7o,9aHO%Ȝ 8ĸT:|$ݺu덌H";Jz{fBS7T#cb8$muu ł:2=з,484Yh$Ur o-c cNOO2F/ r:]@=gp|֭ÇLAI?Ťi }kZ+fcv c"ÇT1R?n=*=huubmMLL644T5>xYRo˚U[YYHX`^=HE0 C MexCRM6 - IVg|\{᥼a # fff=IM9hATL\3#7owU&ǪhK[__5sc( qi_^9@.{!qb,G H8j::8PY3d-d'˗Gq jtt2z_mnn.{nܬrQDs!|ui ^6z>|J*~3񶹹YrLl+)  VΙ^@F,2Xp3N9%[D\='&&J[lqwH=!SF(UsH e$F uvv HwQL{J}(G:wε%ϐ%ti\-x뺯)966VϽYTu^^^#B]{|(+jlF%)#"gǜ҂5񂱴?U;A-..5[''QTQ qk-s 6zjs0N6ljѪ0dz!^a( p7pٳ" ~GZn߿ Ҡ jh 2}!!!tjő YCwld1$g}1XN'gA9|׹S2vT擤(A_޿?~޾}[g}ii=I@I Y4)rB_LY#ɝvppPF`}kZkKKK|uuUi{+E=F~fC rJIrs@}'Uc-JXr\`VfthbbMd #|E`ll7c d؉rslV>~a`HA+ChJӷo* w 0.ڑC~0bsn`>kcDe?n^. $=Gf]j3 _.ۨR9FlAы.ݸ>|P g2oSGg,b%3Xmgg"tH{Qx&n!͹γ(N_<>::Z6;poNɲڔn޼CYl2>>ޞ?J!j2ԜG>$əLqm) anFp(H XMϡ1Afڽg R qA#Gud$aQ__Z[,"P-WbCk Ҡ1'Lۘ_mnx t\:zU zA!-u+W7K!Bd~~zJ%Ȕfn%T dלW>9tΝjCRtF:R̶yL!^ϥr9f¨QtN`J!xTr5YYv ݻmkkXv6$"3N(hqJٲ5H* 8Z"RNi@; ն]5/{YGsO:F:ٗ'Tc9(ƌKe6?>>nX@}9gMecCVg4 Bgr)' $6jUl 5ҏSfd{euhK7ΊTGhpЈʪ9o߾gϞU=qmm}x!6 RžeV ƾ~>~ا&R.KZDdR2U2Z0hQV-|dvrv7iMj!Ŷ5)CJ$RW5ke$G&)6Q3}=k(a|gY( WR]y,h†)ǧجW #T).١x*emRS:1rl{zsY7v8? L0'䠅]AX2yK}矫Wѵ%w^W633B$N6)H> '2\R[#^[ϔ=zڿ9STj-3]eKD" Ѹ֕an0_R+3"MS i5}hڙgw hRe{zvzzZ)r7 ZùaCԐ3WX}rټcA gzbbz/{ym}]^^}B*L)kdeJqfsf:f_-92hNoaaY5 [k+q Z<+/2`Ӵ/a4w? 3Xߟ ݥTb:- 5U ʰkrQ*$˘*T;2H/rjx𠞝= ;Aó+3J(Cᇇ}h E,4R̰:59*RLiKnn1w3ׯ_+5_2`Y)G#M&V Njksmqqj6͛ՑNi[\\@cggu: @Ґr~ Bio2{QBVzݿD"iǕnll677-yaW׿'+L Q(}>YJK ȫ `0k3Eظ6-{#e&9azz4(8$a'^;MHneAKKK訜/נ|[p !35ׯ2XT|{]eboN'a˗e1M tjj]\g9 +S$^={R 9ؑd(T'c9 @RI r%0πKq$hˆ= VV}%۷oj$#;,SܝN9211677"k,I1Ĕyelg9E}6[ Jkkkݻw62{hgggk}I4yΝ |$A8+;"K &`d!$]R ~OOOÇ(THV9{8SA/^h{{{ljۋLh*#fe렺?%`i#~vpp:NOr`N 'OhRQuZq;ٮd\}qq٭ B99B$2.9w$!A;`MЀ%CȩKq +`d!o߾͞Ak8:6C05Y0* *b*X99sT9←4fokC kT ʩPQRWVflAd)-7Xÿ}v[\\lURVI*Nǟ(8)xummzVrV1T&uOqvvV\fjg ,) ށx>q-,,TU-yet:u1d RDJN} D=H6!{yf?~hGGGm~~9K@vı%Mْ%;¦3MKrSD%]A{J]:;VCb߼,!Z*(p1/..  st~~^vA0 !J<`oy9Vlw!d8TX~[:2k4.FNJIE)/5u@K>E?ԗ=\j1Ueϟ?K( 7>Sd75X'4@3K (zi`e|lt"W*k-\/"/¿9:ң9#X~[ߏTsTLS$U9vgi:Pjc ܹӦK/XY3;Zk>KH[^^n?~Sh/ut92Y*zOEKi; JAv8Z311Q2}P|֭_0O*eNIArSdZl FFFn. :ǘ;= pl$ԕz N}aLI"[!Z"B7666ڗ/_*2'T9W^BQj:ԹC[?~lk1< >??o/_,ѷ9ѹIϵ06NOq kQ<2&xvFA&%]VgWQ$mxiל)ARR !H_V sNIa|$l94aB`޾}[NG֘@)J#=K1`f`ȃ?22R8ƍ-NKO1!3ޟ $M^ Ivw=V )ԘW^\2mďMWmѲ#~/999igggdQ>,.<(q^c/>FZ**KY3F ҔK҄G+Na~YR+`HjzǏ0e)jS0n^Fe6X&>bfc/ sdʰ(8CFY8#+L$=99+SZԶN+mxfW @e.WɓjONN!cjj8 2꓅[d\ȥ*rxx?pp].D(եζ V$TZ8WvM+V`cls$H0/:eMw-3֠Gc*s֒p#  zsvuuUoL|jC 8::$ϑp .ȚimwwNvwwq'rtNL)ce{\&kd3S^4W0ttH!rw-,,T/&aǏdj"H &c ͦpEm T-.kCӨ>"d"&TCA^M IDAT6$X1X 7"80)g@9+yff`wO3SS|O2Se2$0e]V-B`^Y5!+F^=Z@YPtɾDgܴȂfff~###5Z-,,s32C*eLԭPk=[_VvǏŜXzZ}A]@3O@O֌S isssuMDMd \FGGۓ'OǏ[l3 ҳUreN 'hYl|LY(B^u^XX(Bg3+ R&SkడsUP7p)4ćRC?ᔊr><݂gggW"1D۷o@uAQΓ,2Z@ B6)ŋg%(w7;uGN%?$Ð}G(Τ.e>)eG 9ub2FIp322*cA[nK=c?a\D=iO{ѶR>CSA [$k@7nh}=o{;2OI*$b_^^n'&6{o/9$4,5(z|.'(I2WKIBV~Ɂ= >6JS 9.];::ڨRFCRRS)+'|vNmAS98V{-a@eZHn޽{}eNS-+Ć8J.~ _ mggjtʕ 8mgXђ `Dц T 3377_&G@'3c677WHH!I8CesB A+!!M `cضD$ݻWzv{ٝ!x@BK,nCoD79 37Ml2ڢ TlO89hdA5+B&K;0^R;kٓ)rlcMh'YqV2U[d~ւ%Уg~ڞ@dzwCNdƂ9E){'r|>! F>&۔r2N,yg{MǾtM0e:x&2HȨRtɄOɎO%86<7oBѠ#mM ={ֶ+M[֟RglzzoD:TpK]nb9$h7on[-Z)OÇzNYL6(d9"$s9#Dq3}k}MɄFvےƲaѬ?1Fm2呑z(dϟUun]O3`qdd-h$T,|^&-rڡl`6#ۏt.[ .E O5Za8 k=CsEɌh/zVN!5V_%w)&/ԙRvp!#mc/l&1"C (Ge w<'UҠhA!Yfpd=8$ *\87!(:WVVj]}"7NJL=XeCF~Y )iG}u>4ꟲA>yRgXO I { OYUBc/mssQ[L;AN]7??_]1I )&i5w޽{Ν;%?V=77WdvO_mmmU&3{nvž6v sq4=A=|!&񹹹>b&ޖ3ݽ쥅)_@$@؜ I@Ս ?Ɉؓ ~]S1 7ا+ KEf*$xttYds8drrhƉnocdRAF=5DE^B#EzT9&s,G}fԚe\,[P|x~r Li:;207Ѭiﲼ\s1` :%g&¯_#Y7y_ZP{] ]B~QiK%3Y?k*:#z_3R@_$@E>k qu^WIL"}d' ތ1U  f(;/--Ij5L3h@jC訂HhrIH"!=z!T MMMIgtm BNbCD$($[d9*ٌ*9V{&B,Ȃ&/roc6'ΉTg8>VδjM oEdZ__Hd9H$]r.)Wzݒe |^hRW!)4<255URǽ7g/ә(%,I`M=s%0N2{]*8=Za8v_$*)Kt:_uHhTy !gBzz Rh+++\ToeFLӌRV0(p-G糰He QָMrɀA%sׯ_۷1Tv1N':Q;g:n[XXh^Ievv.̶x/óW.wwwd9#:' ;f Bк,&r2yS!*=AV#TvRne||8;p*Aw]S ړg *SUOY d}2 @e9.6B#RKJ$ HUl ")fw)U9228œ,] ':#QJ%*IH"K݅`:|S\4B9ԲCh8]L74@vvv*e8Jxpcc#A#aD:d2G*u) X#FLcA &޽ 6D5dϗˑJ9C 3557X@TЕdVzD#C*Vzedmyy3E[__/L}9"tG~G 5D=˙ RAf @ԾG)\ZZ*4Ս썺~ۭ) 6ܻw ^NSMմAs!=-)2{8W-A&R%^vNv:Rrxh~KPmaatl\=;Lйs3'F @)+XMy/P{g")i\cm6?&ፍa86""OIBړlYF) ɑ2lI Z1+i^a) A. ^JyǂeթmQ}ǏfҏuP~Yb+ˌWsba tfz" 9L鱶ZrZgET%c4/_^W i9h9Y g 9B&g=+e̓gݬ@Nܵ<;;qZI_iU1ȮsɆL  @ر^)Yieq = ϟmnnxI)ՏeY<(9dgK6.N p$pAHyf &@U›Z*9( ĸZD3rIQ@#a9V<==$EP48Qkݘi1[rUiӛ֐:3Bݒa&4##29Is|sjw<<<,Qq(9DϚp\%+D /#Dy鉛Peq(rSPX2g{QgTa26/Zue_8RFM{-b:gL x_v$lG=K:2Ǧ&مuwhܾZ^ϊߠh}>;gHbÇ䤫d V0[y1NYc`oG)ɹP <8HH94}C'{[k/IIv<'Ѱ!9Y g6A20IqFz.9ERgD4~Hb"=o'y$#ַv<ȍ3u#7opf MNBx22c@rTd0Pm*,Hgsyj:Ipg;zC@+<<<͌Idh겙'{, @{;w"I(sVĎLWU,yZ-RSedxv#JC566fffv>bQ/PϩX٢F1Κ3F9M{V@ 䤽zwfʣmooG{q2Yκ>A}吜NgPtƗI` s~S0/a$dO|΄ Ptw MR72< Ԗ=1`vYCE%ϛAZ RZrrstT򞜜,a&%9{+8SRgN Am*? M(5~94+(+67ɱl5\*f ɾJ*RdlDLJCH~9uVWZ9;;[8>(0ـ`&9h~VTiYPT?e=G^TtJ…/GiHvcO=2Y|3@&v$&} .x0/* ieJE1,<9uWWW j֞F=֌[m4eRi$7{Pr&i'D!@Ejسt~t:j l޸qP&;!|/ɬ R*NNN|e?9h 2e? 0g...JžȜG5A2ׯ_úoH955Ֆ*)I]oZHoKKKeo0t~lg G$j3TB#))A0AΞ:Gr {}}fggn!_#7ha{I {8f4g.^J:$U.Hze@w lYrR TZr6J6$Ŀ9T-yUH̆lɶA43VVV^{QDe֣EQ-pT\&DM5d1jYX0Ҩ9ܜqX0de npj#}LLL>(HsfR&&I+5E93#Lu:nݪ<sS'q#8Cz(KPs=<茵szPLBI}]PAv{B 'BTٜH\#]?c CX$)V;<}H-JmM;Nɜ0>>~r}$zIj;Hf0sׯ_|KUVYҠ=-(^35HMv= bJ[]>l{{ 06G R#066VvtBqN8}I,/ZQbEZ21tΝ7GI9"5?&4è剫j֘U"@!2xvV[&DVI"2#fvm+yYL;iYy^%] (i2tf^ܜ<b%8.LIJÿ(O\KN`A8C4 i;`5#$JNY666jmyW?==mm{{!k0$%$M(R^W9 9??Z 8αy2 ?gs\5Vl3geg}rGSY?wIb8 9Fy&K,ԁA5PDDC`ǧp ;%h޵ *(sN{ElY[XXOKqϟmvv]W7K*9Djb.KJ$~9w $ԫ6422&N7' a43 }.U4P(]VF0'pꔠ=pKL o}fh<SI6E"hکS1pZv{N`|L"c9㤼3.n.0v,}ӄuEj9L+!:ă,aEρ.ozqqQce(|.]ͩF^p:9*r 9߯>gY$ۄ'ǛLɓ'Usf A"(Eө,1aMhȶ8Uhh# ܀1y) ( e(`>==mUv"E7Ib{Sr=g˅ --..Vv~A56 z)攡OV9/U9+;/DYpו*A8Pv@mXGc;_yksssuȌJpW Pcccm}}촅x;Ev9 Sf!G|+< $-..,Y'- 8'''muu%_ɘb+Q,NT"uVe"[upe0u%˶_J99IP ^ )5Y+BsT8$gORK\mrrzk5)\.?O9,!J߿/-ph UđquTI$_FJE^8s>{xx=zHN٫s!!&7 n g'ܒ`( ^&8UYҡF$!P= QAtop<>YȵagIRCmbR$G)C!ȔS5(^ 3O Hj♙>T9l%ZP OyvCZ_Ѝ%yx?ahX-NQ$G1H6$KkN1r9rr"@پiA"cP eL<%mI9-,,dfx e/`Kρ0*αjȊ,ȑ$\3nT;4"g33&H=y״%jh-..֚?k"y)LG.­[Ǿ Ƞ"%e;H}Qxswgyr֭[o00Uo,,<0{KR-=]1:-Yl*&vxsƹELKɟr "?iʧ+M{(~Q{} <,&, 1/ #]2oDٛ&EDCF(dz좻`)YAôE',3Yf آ!zd`~;99E3HpyEpOꝝh?~,GtumZ \n/>'H3Aؕ ;_[\ytmxdvK{!,(*G9u16 ^KR 5=zt7ߡkSJcaBM N@_.CFΑ`L疦IrFĠnt8J#Jr ZYOtщLg(οX/NFA'~Vcf2RM@(>$ufJ` ⰤjWB'M[% dou9 g3s&RlUcSy{FhJuBH+ѱ켴f={6RSWWWC ;;;1(pK}2:b'MВJ)Q]d)>ȿ=|z8Ψ4{* )[F]_7TfŭS2Jv+B7DAu۴2 a/JBCV6HT\͇㨠G`{yy9&:X1U:06u"_;;;f#:Ӵ2n>k)9 nՙrX; `(D KIYk2Ehn e~*c5fMk++VȀUؚ( 2#ָ`>?~<]\\0y8Z+jʙ;sLS==Jp[[[Ӎ7%v<%P2Udg6m~ cySs< '礪A+N$Ƞ i8?>ؘЙ4\-19駟FW'uhÉ4P-{;Z5@qD;w"cܞ6ӃƌXg@ ؿb1}7{tw`763!Jf\[M .AsiP$Up[96e xvkM"樝gxZ.!Yki@6h%Zjƍڝ;wNZmv._\|PUg!Qsrr t{7&W!-@jDB')Hz92cE;.Ј5 ~ؒjp\SL |XNB/g\Bd\Z*\ ա@9r2W2w)mY'IPU8L tauǘcl6z(۠=gY;QdObΚ~qFZgRO> "}Ù;/af Į%y;׭kngF&=}R4\\\\h8 0^,qX6`|Zj V岁/^ ~5VP mllLv9DH{G4z,c؀~_}մ91thWRu걁7nL96 Ppؾ7oNgggbcݻ7gUs~[qΎ-s4Ȼuk; j)#s` iNm bL|mZoh EwE+{K +vrmDQ6hJ]>mD"RꝼAC~e"IPkՇ;gߓ$XBsVևSJ7o؍{97kܺh(S^[%lxF)%Θ]%QlVHtPP A 0nR,dVMmqkrjr/_%80~ "b"p$074rCp4+ };R÷|u,NH K3,6MӋ/czw@Eֿ8wخ}} ~>N(o=zD8%_ HBMqZuHn+HjZ1&Ck?,bKj6%SÊ㤡zNIge.3&ѣGD1 mP"NJ*ʒEg:5#yFy@rƢ Z=\ p$Dn 1m^r|_N=90Q!Ga_Ey}!`:>>RnG-yDZNGc#$jBz)׀A[ͼ~z*1WZ۾#o#d(89k)L`ݕR髯  c>xb89gt $fLwS>$"džLF8ѹ5DE[JLDx',fSSjxƸElz\s:Ʋ@ZHIm6#BE C*0A9k=hlP.nzNc"`Y+I{Y4SBp ϦOOAehGooV.OZ܋ {~~>]]]pnHQdb&7'*Jg<"*&vEPʈ`.zc\Rt۩}!?cPnr~~>.& v4;ؾ\5@fggg R%y@lnnNϟ?~9w}7 @H3zc}7Q paж:^qTEP8<~ H5bvU-{ታ&zш:jQ~Ȯg777s$ TGOӕnR![O3}gggPմ+ SQEbʔw6+[wԆw"s솳稪.T&=4?°8Wf R8w 8 {;%Ρyѣm$!8@ċu&/5簧i?~<(EQF, VTD-cD=r?h:.P!W9\y9Hহ6Gi:88b0WSh!Mnס<!p?sv{B1@_  q;cÇc@ϦǏOr Jp{0:" gÇ+ Z[ߡ #iG6ݙRFA9 m)j@.m#Y3UUHK@58g(}...V -9J?>"9kkS;#m,4r߿?lgwPBm ڼM9)eخvE\>иBP6gjPx.Dm'ZPˈWuUq_-jG.9]1aC#+bc\ R( T3 0iư7PKn޼9Fk\cw;S6t.o&4AkFӌ/_ʫmHnKwX.3A;0[xzn5k&ro߾tm;m"$xEbήHV#Fq1bL ;6~t~~>&3 88P>Ȕ~b^lr9L5˛cJZwsC@m{YSs!*0!ҮVwܙNOOǽrQJ ?Sa FrXQO>]g9lqZ5z7F *}F6 06}'sc@c R@QK6<0! ɣ*ju,F4b`rϏPPk\C{sw2J#劤-NFUd/C_%aV''Gۼ_4DK \Fa T*v4*K] ژ!K WLÁ֙Zl Ρ=EPu޵PnLw~;pmdC9*?s:YJmEžCLbАV8"|㗮I"/X,`o^󞟟:}azɸ7l 2$d1Σ^J:l EanbVh{{{c A!T^(dY.)cy)Q:o `ۗ yΞ6saĵ͓*Ҵ\39)OExں.1)itetӉL "JUծ>'Xf:H(f<*ҊP5pҡϩ^Z*Yw)MiO[t^!C`(Й{իHږQhpV Xb1 ٳ޿UBhXY.c-P|5%&}?N>4w FnG39 KrRhkmWK9ayE9:ztK5lS(T6 NZVA;sIgNqoݺ5lg}6zj;!ڎgc7[u6V>ɇ:c?Ӵ7XɓǣE;?dI'"\0%tݙn[Rs@D>Ln;BfbЖ۷o@ эGXlma^^R&ds+>8Fu ɸ:^~_~>}:z 3Dȋ!N-1}RaS%adW8̞֭[iF/΀!mDA(\QWǀsu"x"s\퉨Y__^|9ַR{o\&76(aݥc5o1V)Q3-p777GβE,Sl@p"@SUA$ gFtmmmm;$Q=VT'q O<%TmwZ+u0yuu;>2uMNcxTFt~P7—nN?} /..FC#sg3jE,ʶQjn[4II|iY>p`?[.'u}P.w Rw4qͿ1B F*{xx8QԖ}>[$+ٍ:m 8X.#'AjJ|srv g;꓂E=uх1Գ <"S l@F4?+b sT͔8;Ƥ÷R_IeLeڋUJQ*Ď-uY&䬯;)im&Forrm/-ʮӒαng!I8ιme pfmN/|Qݳ϶ hzsӶ2\$p;h^ʢVQNqLI`;q-Cطd;YzŊN=NGiwww<,\UH5_*lwÇBhXvo됑H 0whMQ'PvJv֭9TRUl{DBKr( hhG T ˹EҢ;4; iG]A Cɭ .i22~mCT @*}g!6;X϶o޼9H@Ǒ@_H>򶶶_q  (n^f3[^؞CCHW5زy4 g:R9yH x+m("ܮ==YG={F76>9{kF0/erK$ : kZ ;<}tԡ[˻w+lK8-q:8gϞM#iryѩ*ڦ8b̳ј()` ՎQdا6w||5FU<gYv~zʀ147{Ҟ ͡Enr"45LςD˗d8ayy- =oC[ݹsD9iJeTtg29/8Њ/8 T\`b 9ہn6K2Br܁tZ:L_}({(͏Uv28ֺb'k !7EmnnFaU4 yɓ1WNkj*:u7Is ;`u%wM)i.Z -_bLdPJM/q[Uv)HvZgB[n;{ ͨJO 6Qnv{^΂Rf2mzlo #]ז&} K~-O t\FjG_|1r@9?~ܭm?<m,?Iy\@SY.zy%'Hbmن^me@;=  m,5QQUpZDyyJ?׼ ;Dn -!lu|}S#lmhͪ)GtJ\tvvSk]֜9 wmH- x! +NA){#G vt"j4&Pv#2d́4HQ>cHZMDAsznooLj[Z~top8+4"*Zokςd3ֿ)w]0{-[Š^MCO ;5狢=t ZVuzf"e9d )ݒ3 P`:gb'-"Y3 YLNZ:r- Y*rM{1YEgj2; kPN?iY" Ual&CŴ?giYG[5sY̚8HyPpEX@wkL= ÑoүCmXВ@|0KuC FPIX%w>ơٝErRމ0 ZlA khڻ>0{ȍԁtdL=ׯ_h\Atǥg\p(Y*_[[SzPmJDPji\ +i7n pyE ^eM`%y9i2f ZW&!Wƺc,[Oݶ5hXPsGGGc.jݹh' ݮ[/^~=d vZtu$=88,ܿ(u9k̇)jįvh"?)R0̎cr`)u:\Y<` Y2#RWsFRp0C|UdN]HQ},N-ASj}ݻhe 4`a8F'OcAݝ=([O9;ъVa|WM @۷~kkk` J3N=ojIm7H➥) iNHj6|Ǐ![.pc _ @D?Ym)%HX >`Uԝ+,ͽ{T]E;e cZinctZM"PbtvvvnK؜mnvP%(Z0Sv=,$bN NmxQ®Oc|م7ʫ!wiCZh{y Pvۼ BO߾}{䏽fQbaPF8PӫW{a@ElǏ#Av+f Rpt)M։>qh^tjgv(r o:~P3zfdb9̖iGGUhNT;zNK }Es:m5 hDsΊ@e8 j^FCC%y9o=3)? Ԫh'uEM P+p޷4W{J'wO{Wv?ȩBPzt^Ž)VV9Nȁl{G]Z`yA<i^QXTs5mQ~*sK:vrkmn_@䎍VImQC;/+`E3 .e4.뼖}]B|˰X:kcTb &y!~r<֥S\>}4ꮁǀY;L~ ;4 zGZxw8Bc5nllL?2tBXd֡~:mS #΄g;T9hb>RIEXf/muUXSeZݴG;;;+iu.EҰ6_.3B_vb/Z 4k@[)( u*( @WmIcS}uA*p $r*oD2J UwrT^lB;4Yʶ5g;SAu.R:`Dgz>,DA:UmUU~,iH5Fƍ9;x;ږv }.oɖi3Αַ @}?UwM I3 _fϵskm PQaکꬷ\.G]t<3 EJ^g&]a L?`9[ҴD) (}NmJuwqR(:9|0p8'T /0=f%ԮM8cX4}zX}\g4 gǝ wyfE N(yvӧOÆR46<1H4s|荎k㍊vr$j(e-v MjQ_5^*TCΥ ]""D?{Ff#d³jP~5i3nEIX,~XDޢkݞ=ĥ*;۷a'P%?-!B!6R/Z-⽆ /Bw" ,snQhɶsfkl&LUPζӚ(8T!=/x8+Zz;u |[ǹFQ@eS/+`wySu/Cֽ=w5Ž849Ckw}If+z6#3ufmKl4p;|DShvpbD~ga6@C- .v{094 e[~vPvc*jiFQiKE8gL[zAʃ3va<%@ֻALg€|I*#zdw~m)ssA#漴=n;bxG'8#LzA4[[a(ewM׊=h)2Yj1g>:ȃxmx e\ȝruKk(؊2mjomE ܚ> i7)j,܁6E~eXYZ6Z,mQ"0*if\*}e\ f\Nsra[&HUPAFk0n/'/:c|^IV!P Oz &T8oPx0c?W(:pw[ѝhљȁAtdk *CPṋ;h)s7O;W}/R9CQV9?|4.(jܶ=d[ rH̱vc[.g1?ء9hLK>(b,K.___Wnͤ?ϫI-)a'ZRD]iS@fB"u98C&m䷋cg솳&~ڍbo'9wXs#jvz٢:@N)֛DH5oƉ['m{B/R1DK[Un%HHhMn6NMP Ppޣ Hpjラ |~~"5WM8"|SPHSe:ɞpEe0V"ղǏLժ̿Xt38lHyI@GcP9sޞܹ3]^^>/_}V^//si o5KዾDv/5~gNNY2yL;~æ,:vWcQ+&%Ul:Kr/-@6V9N'-z? \;lܹ3wy{h/jePe~Nsu(h:m/|@MU8Ê6uⴌUR[tNjI;FS8LBEUPI~ Kw4ZlWpQj#"gJa:NZ8@s֦y߃i\#4耺WGj9t1_E2UrJPҁ-yV (Ștsi ژ@w0ٳ5;3vv01mx-!}tu{Z:C>)x֮31|ӕaeWD=bKZ(:L1[[[F)ҀvDq֒B<]si3o_ab1-AK{ Qψnr*zwGTݲ2kmҽՖGv1`|bZw7oެ(]=G[]/UT#Y`W1 ͣ*"K*k9R=͗Qz*m{۸Cu2\ϡ)THekszޡ@WbET>uNyfeE ϙӂ& -ª`DfT>۟ˌ9" کn>Wt879ض6^_GYQ.zh@PekP>NͳhfۃmD[[[shƴ3_)yښ޼y"zw5̕w8z=W|4M T4[|n޼FR BFC>[tuu5 ;mjGnYgy[ZXBXZ/r ޭᔊxѨ%au[ZY z=}n#RU=Ne(-Ϩ@u 7yfOUUUrFB)նmZ6|*ӿݼys5{:=U\U1:;!r-i+O|rsTx~## Dw(=!lI=Qlj;Rhg3 uX\&c*iTt;3=gQ4sɼ1x֯ѽXKG޾}{({Ҫ*0V["\R]Q TZ·FcQ[|130.f`4sjn씗 hMb6T#30<Af 0c[X[HOev(ڨ+EM֋Q!s1n˹]__vvvFw4g;;ӥLiiuui::Tu]+:dr~B+kCNgwM ԶщlQlitekimssdtjFdnˏ tCltKS}FmMiDU>Wg3Hruu5J*D 鵷C ;XZ*j^yE l]6A*]ʸuWJfz4z=mߦ]ŒjY*û bk-z#hc {!n~wv8ukZP9AΠN*.QtDdxF~amM}k罼}j*DgNXwbTJ}kȼkV q^ + ]AfmO#6hڡcZq̕yCwY#Ė6hǖݕEEw_kwij1}/4`\=էIENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/main.cpp000066400000000000000000000036421455567757300241710ustar00rootroot00000000000000/*=========================================================================== FILE: main.cpp DESCRIPTION: Entry point to the Gobi Sample CM Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ #include "QTSampleCM.h" Q_DECL_EXPORT int main( int argc, char ** argv ) { cQTSampleCM cm( argc, argv ); cm.Init(); // This function blocks until the app closes return cm.Run(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/qml/000077500000000000000000000000001455567757300233255ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/qml/GobiSampleCM/000077500000000000000000000000001455567757300255675ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/qml/GobiSampleCM/Connect.png000066400000000000000000000127151455567757300276740ustar00rootroot00000000000000PNG  IHDR@@iqsRGBbKGD pHYs  tIMEx?AMIDATxśy]U缡T2U1 I6![ ]B[A K ;NdRdHI@$@{=wz2K޺{{%"^|DTYVQ8';@л({cGqM!7a:M3:HZg/i~(77HDQ~f5,_;T_Y+ )$ ΁s`YSH}f3|ٴL z*^qnT؇FM# |PDЈ.<?pVU8oUC0Zf c's=@ "#( jn Oob䶳 ^~ q ^n cFQ}96s akԞ ݞ/?$ۯ<U#JŸ $ Cf\(k=B,5Eet Nlx? *յOJoHxFh@" ; hH`  `ѵ+"iMp)Sh{_4@!̕sX f._E£Q.h˫q9HʃI{ck~DPG}IW - NO NuXXAN^TS*qe܁h%(VڽR(-(b kqfMGw Ӯ|s]'*o*A}t 5` gr--pݥǬ& %Io_(\>xWmF|a:sHKz/eʅס @iڧy}t #aP*@c;!tˡ捠sAEm&zCj@,8GӬt^Mo sj/R oChgiZt Y5jen/Q6zd"!X 3~jbo2JTv"c2LsAt^i娦ftHÿqqGN FạbOr UDՎrߞJ1m`Uoϒ H~N N* . qCoԴ!R}Nekh㈩M2,> An׶-O5*ҁY TS;~0$cMK)hjA=)o}ly:3yQڋ NurpW O܈8bQ_ u;&ݑX IM}gaK}[˶ $TQ7]T~>a+(rEȋ!yoy3;_=Dv9}],B.ax V w zNkȯ 1 >Uf TXvL)Ҁ\Z"&@,vfwYx6;tQV#\?y0yzfgd'AX@vnP > 'uH '(T蒖Nh2f%L)d:fg-'%NS: rtںҩ͝V7e{En? S^ᜁcM! D8> $P(4$SJ{A#ǠR# Hkw_ƲԖOi4]MMS{ʆ<^VI!#/&Ƥ ۗCQM$R"+BOiu 1$}H8qr׉꼣OlvJde2p<{'ly"ܜb~ᆁA:Bk9GѪ;SʒZ] +) )>i bȠIBz7V36F252xP螁V*7iǪ2Ȅ.yϪPCIӺ)]Ӧc+NXˢoP.8qOa5e]]]tvu6q%r!ar*9Uq+NF"߹4&Bsep>n\e„.VtOVaLaBx&OBTbӫ) 6?ϜfST1X .7}A;yEuN%^bsF q58 lFq"/y  GϢ_jʾRqQ.Xqw2{m3S"5{LLu+4z21 $ǩ(C=K UQh½x̒_䷫ g}?N8x_* 0<2BkK3Xسoc}/mmm R#u㻘7oZj&RrȂChkkvd4/<ţ?3&!3B ? HT&xJHǞpUMƾvq!A~q QTV0eD `τ 4jAʬIYг`f~G9~`m/IJԧ 2mr.h2WpN!۷a,̛%88aiB0PAr~RN(ZXڇ{9#&\4nX®͸ I 8]_] q(\`z. X'9x_^V1TeZ,_*Q-Z@˚9S)7@ԥ'K?=+.lEN㬎7l6ںMzVh,?FWGC( 0A꣥2jb,9\gkeN* 0x)wTzz; &MkW5g;^ n⣨|>SIn|$MvdLD+Gb2xЍpFarh6u8kchá-w{/?Un4'0JuB Q;|VѡMt-9oވf(]ļUh]ӱC=ff"]*$BE48WP:C.Cvsld ~wvp+J2MiSY%B$Z8eu Y]Oqy_ޫ{r4@'Ad$/%\ΥF4]K-W &,8Sj{%1W n{cGqb=")2Q}w0>)NgszoW{m?|W73m\r"=;}\*,rIENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/qml/GobiSampleCM/Info.png000066400000000000000000000122641455567757300271750ustar00rootroot00000000000000PNG  IHDR@@iqsRGBbKGD pHYs  tIME 4IDATxś{]Uuks;7A$*!'ЂUTQ;J/h:DB(o@x$Mr9gfXk9&!A{=s~ߜs9a/"R?w=kT\;@:'f{H_ytev\jppmɤ}H̤}G#h@-߻77 }b0ċ}ϊҽc#)$sXpR}L>Lt뢈=R@bke q7*m)϶~Z!hD;@k '9ґ1nf2߰${׬3 ~̺@(\`ŷӶx9vp7OjI.8xA`Yg#@5^1hā:m,8C. ݳv[mJ[E d_(}Lj̺~1jQ`(+@% *s8`m@mdgw\V_"^2|i/(ު|Ͽ--ȯL!%DΩ@]GCM[t G\+I[뇀Ln:o8ٲPMGer *n"5' gUD@C8{4s׬STc3B8[un!a`ٺmi 7x|I@=cL޸*]݈ЂV J1D) P!K\ zHeTYH? tFQ#Nvxtp#We䡟3tJ,UF)f]S6j7eT! tOC/ҒEwgh\sks?@>0'$zGINUer[? NuXXiʶ{~.~ft7}LwXڟ~ @+W \na,_ :OQ9zter TT%](]v.?z_%<2Kܦ5 *@SI -EƗP|%v[

lfm%>'+PU6PZ㉇~k4vy UF B/{ApjyYu%swC!ر66@sѹV_ S Qo)X9Jpa 818cx*n* eo=q8ۓqUA$>wʁ7_ڋRc [xM,G@e>߰WVZQ'9=GA!P)p:ٛJU ;QBƾ {]WUtM|@:[:_Y/4S0 _PKޅ}|SIŲ];Q5qX?Cw A)Gn9 J=Oj)8qx k':CT1ЈיJT ևN@~U@zIxmZ\tP崼&快ii8T*r7V$+E ",CՇH# Dԩ~Tb9ܛ"A Ф})J/Cġ'#Uf%RYBL&lx Z\Kg/rЏp`M\<9/>3BV$*|tΪ,H(|Fk:tM}G H5_rlS3*K XCu,6?eU%JK m @9ʶq?Z3}c$ױ@D jch=󨢁!`X+E(g ͛" H%kZOi|W񒣋{ &9:{j%t={Ur16tX ܪyb}eq-Rv7NL)X=} f݅&·DT˻Y_O|]mC|5-" @eMXRk}`ke%dBZX)d}k-U[7jR?%QDv퀭ϡoEɳ?+SJ`E!d&NjhN4w}9g̝= hkk%ʂq ckq0s=z3.S_$OS" G"fS+[ZΥ\~Cɹ5[XSn Q\X:#2BU?' O^w(DI4hDkX OM [`=;6:M I%_13wNP@/͇$MQȎ!ܓ"Gjq:3= %yhh~q7o?;oo 5ƚ:5)K,: ɂ~#p/YTU]B#q[vބHkk"7 pyח^?xyÆ߶@@l "GJ9aíJğtVˉˏVŐTV26~OB M /{q;,udd)S.⿳-<{ 8KQ!鰊£*u3}.v<`Wg͉K4MYh235JR'(14M1i|td,- tKfA օ⩭˲:(12X}Fv_{|54<\]LFDZ3ʙ3w^ZnrW8JsjdYDRRTP%BU6-Z>}'G,;f^guvdLd`jr(8cZj ӡ'͠Ҵ4läu< #Î߬on=6޲c 9ok^o`;%i hZ;ܼmZp Ea!Y1)vdh{r5ɔ}X|_G9ԟ5R>hXlHO@B2ZXè g8MR://f2Jƿm'To/4!!0{d翁 g(nZ_xM_5jgs*sfmR pQm~4me/5;DnQJ\5Z!EdDjW+SM}JR;~{;~vOa zMR! fqTLC1cr*wx"DuyLcTU8| kp㐥:,ct[ؿ^¿ ^|їn6 R]ER3J fϣ{ş'QXD=IENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/GobiSampleCM/qml/GobiSampleCM/main.qml000066400000000000000000000413521455567757300272330ustar00rootroot00000000000000/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Readme.txt000066400000000000000000000142161455567757300222340ustar00rootroot00000000000000Gobi Extensible API 2013-07-31-1347 This readme covers important information concerning the Gobi Extensible API. Table of Contents 1. What's new in this release 2. Known issues 3. Build steps ------------------------------------------------------------------------------- 1. WHAT'S NEW This Release (Gobi Extensible API 2013-07-31-1347) a. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. P (80-VB816-11) DMS ICD Rev. R (80-VB816-4) LOC ICD Rev. K (80-VB816-17) NAS ICD Rev. YL (80-VB816-6) PBM ICD Rev. M (80-VB816-15) PDC ICD Rev. B (80-VB816-38) PDS ICD Rev. W (80-VB816-8) QCMAP ICD Rev. B (80-VB816-34) RFRPE ICD Rev. A (80-VB816-44) UIM ICD Rev. YC (80-VB816-12) Voice ICD Rev. U (80-VB816-10) WDA ICD Rev. F (80-VB816-26) WDS ICD Rev. YJ (80-VB816-5) WMS ICD Rev. N (80-VB816-9) Addendum ICD Rev. E (80-VK268-3) Prior Release (Gobi Extensible API 2013-03-16-0832) a. Fix QMI LOC support b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. P (80-VB816-11) DMS ICD Rev. R (80-VB816-4) LOC ICD Rev. H (80-VB816-17) NAS ICD Rev. YH (80-VB816-6) PBM ICD Rev. K (80-VB816-15) PDC ICD Rev. B (80-VB816-38) PDS ICD Rev. T (80-VB816-8) QCMAP ICD Rev. B (80-VB816-34) UIM ICD Rev. YB (80-VB816-12) Voice ICD Rev. T (80-VB816-10) WDA ICD Rev. F (80-VB816-26) WDS ICD Rev. YG (80-VB816-5) WMS ICD Rev. M (80-VB816-9) Addendum ICD Rev. E (80-VK268-3) Prior Release (Gobi Extensible API 2012-09-12-0719) a. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. G (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. K (80-VB816-15) PDC ICD Rev. A (80-VB816-38) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. Y (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YC (80-VB816-5) WMS ICD Rev. K (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-08-23-0740) a. Updated reference platform to Nexus 7 tablet, kernel 3.1.10 b. Updated icons in GobiSampleCM c. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. J (80-VB816-15) PDC ICD Rev. A (80-VB816-38) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. Y (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YB (80-VB816-5) WMS ICD Rev. K (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-08-08-1042) a. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. J (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. Y (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YB (80-VB816-5) WMS ICD Rev. K (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-07-12-1036) a. Cleanup correctly during Disconnect() to fix possible race condition which could cause future connections to have read timeouts. b. Add a device access qualifier for SMD connections, for example: "QMUXD:0" for the first SMD channel. c. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. H (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. W (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YB (80-VB816-5) WMS ICD Rev. H (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-06-18-1054) a. Added support for SMD devices b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YA (80-VB816-6) PBM ICD Rev. H (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. V (80-VB816-12) Voice ICD Rev. L (80-VB816-10) WDS ICD Rev. YA (80-VB816-5) WMS ICD Rev. H (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-01-12-1106) a. Addition of Gobi Sample CM (documentation is on QDevNet - the use of this me be subject to additional license terms) b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. J (80-VB816-11) DMS ICD Rev. K (80-VB816-4) LOC ICD Rev. D (80-VB816-17) NAS ICD Rev. W (80-VB816-6) PBM ICD Rev. F (80-VB816-15) PDS 1 ICD Rev. J (80-VB816-8) PDS 2 ICD Rev. D (80-VB816-14) UIM ICD Rev. T (80-VB816-12) Voice ICD Rev. J (80-VB816-10) WDS ICD Rev. U (80-VB816-5) WMS ICD Rev. F (80-VB816-9) Prior Release (Gobi Extensible API 2011-12-15-0819) a. Initial beta code release ------------------------------------------------------------------------------- 2. KNOWN ISSUES No known issues. ------------------------------------------------------------------------------- 3. BUILD STEPS a. Start in the 'GobiConnectionMgmt' folder b. For Android, run: make Android ANDROID_PATH= For x86, run: make ------------------------------------------------------------------------------- libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Shared/000077500000000000000000000000001455567757300215005ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Shared/GobiError.h000066400000000000000000000140271455567757300235470ustar00rootroot00000000000000/*=========================================================================== FILE: GobiError.h DESCRIPTION: QUALCOMM Gobi Errors Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiError Enumeration // Gobi API Error Enumeration /*=========================================================================*/ enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrorCode) eGOBI_ERR_QMI_OFFSET = 1000, }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eGobiError validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eGobiError ec ) { bool retVal = false; if (ec > eGOBI_ERR_ENUM_BEGIN && ec < eGOBI_ERR_ENUM_END) { retVal = true; } if (ec >= eGOBI_ERR_QMI_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QMI_OFFSET; retVal = ::IsValid( (eQMIErrorCode)tmp ); } return retVal; };libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Shared/GobiQMICore.cpp000066400000000000000000000333531455567757300242530ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include "ProtocolNotification.h" /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQMICore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQMICore::cGobiQMICore() : mLastError( eGOBI_ERR_NONE ) { mInterface[0] = 0; } /*=========================================================================== METHOD: ~cGobiQMICore (Public Method) DESCRIPTION: Destructor RETURN VALUE: BOOL ===========================================================================*/ cGobiQMICore::~cGobiQMICore() { Cleanup(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Initialize() { return true; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Cleanup() { Disconnect(); return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Gobi device interface to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiQMICore::Connect( LPCSTR pInterface, std::set & services ) { // The services we successfully connected to std::set retServices; // Clear last error recorded ClearLastError(); size_t ifaceLen = strnlen( pInterface, MAX_PATH ) + 1; if (ifaceLen >= (size_t)MAX_PATH) { mLastError = eGOBI_ERR_INVALID_ARG; return retServices; } // Allocate configured QMI servers std::set ::const_iterator pIter = services.begin(); while (pIter != services.end()) { cQMIProtocolServer * pSvr = 0; pSvr = new cQMIProtocolServer( *pIter, 8192, 512 ); if (pSvr != 0) { // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) pSvr->Initialize(); bool bRC = pSvr->Connect( pInterface ); if (bRC == true) { sServerInfo si( pSvr ); std::pair entry( *pIter, si ); mServers.insert( entry ); retServices.insert( *pIter ); } } pIter++; } // All servers fail? if (retServices.size() == 0) { // Yes, disconnect them all Disconnect(); // ... and set the error code mLastError = eGOBI_ERR_CONNECT; } memcpy( mInterface, pInterface, ifaceLen ); return retServices; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Disconnect() { // Clear last error recorded ClearLastError(); // Clear device interface mInterface[0] = 0; // Assume failure bool bRC = false; if (mServers.size() == 0) { mLastError = eGOBI_ERR_NO_CONNECTION; return bRC; } // Disconnect/clean-up all configured QMI servers std::map ::iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr != 0) { pSvr->Disconnect(); pSvr->Exit(); delete pSvr; } si.mLogsProcessed = 0; pIter++; } mServers.clear(); bRC = true; return bRC; } /*=========================================================================== METHOD: Send (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svcID [ I ] - QMI service type msgID [ I ] - QMI message ID to [ I ] - Timeout value (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { // Clear last error recorded ClearLastError(); if (msgID > 0xffff) { mLastError = eGOBI_ERR_INVALID_ARG; return mLastError; } sSharedBuffer * pRequest = 0; pRequest = sQMIServiceBuffer::BuildBuffer( (eQMIService)svcID, (WORD)msgID, false, false, pIn, inLen ); if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return mLastError; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Build the request object sProtocolRequest req( pRequest, 0, to, 1, 1, &pn ); if (to == 0) { mLastError = eGOBI_ERR_INTERNAL; return mLastError; } // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0 || pSvr->IsConnected() == false) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } // Grab the log from the server const cProtocolLog & protocolLog = pSvr->GetLog(); // Schedule the request ULONG reqID = pSvr->AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return mLastError; } // Store for external cancel si.mRequestID = reqID; bool bReq = false; bool bExit = false; DWORD idx; // Returned response sProtocolBuffer rsp; // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); while (bExit == false) { int wc = sigEvt.Wait( to, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { // Grab the as-sent request DWORD id = evt.mParam2; sProtocolBuffer tmpReq = protocolLog.GetBuffer( id ); sSharedBuffer * pTmpRequest = tmpReq.GetSharedBuffer(); if (pTmpRequest != 0) { // Grab the transaction ID sQMIServiceBuffer actualReq( pTmpRequest ); si.mRequestTXID = actualReq.GetTransactionID(); } bReq = true; } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; default: break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed pSvr->RemoveRequest( reqID ); } if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } // Caller might not be interested in actual output (beyond error code) ULONG maxSz = 0; if (pOutLen != 0) { maxSz = *pOutLen; } if (maxSz > 0) { // TLV 2 is always present ULONG needSz = 0; const BYTE * pData = (const BYTE *)qmiRsp.GetRawContents( needSz ); if (needSz == 0 || pData == 0) { return eGOBI_ERR_INVALID_RSP; } *pOutLen = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pOut, pData, needSz ); } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Success! return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CancelSend (Public Method) DESCRIPTION: Cancel the most recent in-progress Send() based operation PARAMETERS: svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::CancelSend( ULONG svcID, ULONG * pTXID ) { // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return eGOBI_ERR_INTERNAL; } if (si.mRequestID == 0xffffffff) { return eGOBI_ERR_NO_CANCELABLE_OP; } bool bRemove = pSvr->RemoveRequest( si.mRequestID ); if (bRemove == false) { return eGOBI_ERR_CANCEL_OP; } if (pTXID != 0) { *pTXID = si.mRequestTXID; } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2013-07-31-1347/Shared/GobiQMICore.h000066400000000000000000000143511455567757300237150ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.h DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2013, The Linux Foundation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of The Linux Foundation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIProtocolServer.h" #include "SyncQueue.h" #include "GobiError.h" /*=========================================================================*/ // Class cGobiQMICore /*=========================================================================*/ class cGobiQMICore { public: // Constructor cGobiQMICore(); // Destructor virtual ~cGobiQMICore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // (Inline) Return the server as determined by the service type cQMIProtocolServer * GetServer( eQMIService svc ) { cQMIProtocolServer * pSvr = 0; std::map ::const_iterator pIter; pIter = mServers.find( svc ); if (pIter != mServers.end()) { const sServerInfo & si = pIter->second; pSvr = si.mpServer; } return pSvr; }; // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QMI error (if this happens to indicate // that no error occurred then return the mapped eQMI_ERR_INTERNAL // value) eGobiError GetCorrectedQMIError( ULONG qmiErrorCode ) { ULONG ec = (ULONG)eQMI_ERR_INTERNAL + (ULONG)eGOBI_ERR_QMI_OFFSET; if (qmiErrorCode != (ULONG)eQMI_ERR_NONE) { ec = qmiErrorCode + (ULONG)eGOBI_ERR_QMI_OFFSET; } return (eGobiError)ec; }; // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Send a request using the specified QMI protocol server and wait // for (and then return) the response eGobiError Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); // Cancel the most recent in-progress Send() based operation eGobiError CancelSend( ULONG svcID, ULONG * pTXID ); protected: /* Device interface */ CHAR mInterface[MAX_PATH]; /* QMI protocol server/protocol server log count */ struct sServerInfo { public: // Constructor (default) sServerInfo() : mpServer( 0 ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; // Constructor (parameterized) sServerInfo( cQMIProtocolServer * pServer ) : mpServer( pServer ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; /* Protocol server */ cQMIProtocolServer * mpServer; /* Protocol server logs processed */ ULONG mLogsProcessed; /* Last scheduled request ID */ ULONG mRequestID; /* Last schedule request QMI transaction ID */ ULONG mRequestTXID; }; /* QMI protocol servers */ std::map mServers; /* Last error recorded */ eGobiError mLastError; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/000077500000000000000000000000001455567757300177345ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/000077500000000000000000000000001455567757300206245ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/Comm.cpp000077500000000000000000000402341455567757300222310ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.cpp DESCRIPTION: Implementation of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Comm.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads PARAMETERS: pData [ I ] Asynchronous read object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxThread( void * pData ) { cComm * pComm = (cComm*)pData; if (pComm == NULL || pComm->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pComm->mCommandPipe[READING], &inputSet ); int largestFD = pComm->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pComm->mCommandPipe[READING], &outputSet ) == true) { // Read from the pipe BYTE cmd; status = read( pComm->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pComm->mPort, &inputSet ); largestFD = std::max( pComm->mPort, pComm->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; } else { // EXIT_CMD or anything else break; } } else if (FD_ISSET( pComm->mPort, &outputSet ) == true) { // Stop watching for read data FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; // Perform a read status = read( pComm->mPort, pComm->mpBuffer, pComm->mBuffSz ); cIOCallback * pCallback = pComm->mpRxCallback; pComm->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } } return 0; }; /*=========================================================================*/ // cComm Methods /*=========================================================================*/ /*=========================================================================== METHOD: cComm (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cComm::cComm() : mPortName( "" ), mPort( INVALID_HANDLE_VALUE ), mpRxCallback( 0 ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cComm (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cComm::~cComm() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cComm::IsValid() { // Nothing to do, dependant on extended class functionality return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - Name of port to open (IE: /dev/qcqmi0) RETURN VALUE: bool ===========================================================================*/ bool cComm::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mPort != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cComm:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxThread, this ); if (nRet != 0) { TRACE( "cComm::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Opening the com port mPort = open( pPort, O_RDWR ); if (mPort == INVALID_HANDLE_VALUE) { Disconnect(); return false; } // Save port name mPortName = pPort; // Success! return true; } /*=========================================================================== METHOD: RunIOCTL (Public Method) DESCRIPTION: Run an IOCTL on the open file handle PARAMETERS: ioctlReq [ I ] - ioctl request value pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - ioctl return value (0 for success) ===========================================================================*/ int cComm::RunIOCTL( UINT ioctlReq, void * pData ) { if (mPort == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } return ioctl( mPort, ioctlReq, pData ); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cComm::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it TRACE( "cComm::Disconnnect() joining thread %d\n", mRxThreadID ); int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mPort != INVALID_HANDLE_VALUE) { close( mPort ); mPort = INVALID_HANDLE_VALUE; } mPortName.clear(); return bRC; } /*=========================================================================== METHOD: ConfigureSettings (Public Method) DESCRIPTION: Configure the port with the passed in parameters PARAMETERS: pSettings [ I ] - Desired port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::ConfigureSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } tcflush( mPort, TCIOFLUSH ); int nRC = tcsetattr( mPort, TCSANOW, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: GetSettings (Public Method) DESCRIPTION: Return the current port settings PARAMETERS: pSettings [ I ] - Current port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::GetSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } // Get the COM port settings int nRC = tcgetattr( mPort, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelIO() { if (mPort == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelRx() { if (mPort == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelTx() { if (mPort == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cComm::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to stop reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cComm::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // This seems a bit pointless, but we're still going verify // the device is ready for writing, and give it up to // (1000 + num bytes) MS to be ready (in 100 MS chunks) struct timeval TimeOut; fd_set set; int nReady = 0; int nCount = 0; while ( nReady == 0 ) { if (mbCancelWrite == true) { TRACE( "cComm::TxData() write canceled before device was ready\n" ); return false; } if (nCount >= (1000 + bufSz) / 100) { // Timeout is expired break; } FD_ZERO( &set ); FD_SET( mPort, &set ); TimeOut.tv_sec = 0; TimeOut.tv_usec = 100000; nReady = select( mPort + 1, NULL, &set, NULL, &TimeOut ); nCount++; } if (nReady <= 0) { TRACE( "cComm::TxData() Unable to get device ready for" " Write, error %d: %s\n", nReady, strerror( nReady) ); return false; } int nRet = write( mPort, pBuf, bufSz ); if (nRet != bufSz) { TRACE( "cComm::TxData() write returned %d instead of %lu\n", nRet, bufSz ); return false; } #ifdef DEBUG TRACE( "Write of %lu bytes took %llu miliseconds\n", bufSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/Comm.h000077500000000000000000000117451455567757300217030ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.h DESCRIPTION: Declaration of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cIOCallback /*=========================================================================*/ class cIOCallback { public: // (Inline) Constructor cIOCallback() { }; // (Inline) Destructor virtual ~cIOCallback() { }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesTransferred ) = 0; }; /*=========================================================================*/ // Class cComm /*=========================================================================*/ class cComm { public: // Constructor cComm(); // Destructor virtual ~cComm(); // Is this object valid? virtual bool IsValid(); // Connect to the specified port virtual bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int RunIOCTL( UINT ioctlReq, void * pData ); // Disconnect from the current port virtual bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data virtual bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data virtual bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current port name virtual std::string GetPortName() const { return mPortName; }; // Are we currently connected to a port? bool IsConnected() { return (mPort != INVALID_HANDLE_VALUE); }; protected: /* Name of current port */ std::string mPortName; /* Handle to COM port */ int mPort; /* Read callbacks */ cIOCallback * mpRxCallback; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; // Rx thread is allowed complete access friend void * RxThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/Event.cpp000077500000000000000000000263111455567757300224170ustar00rootroot00000000000000/*=========================================================================== FILE: Event.cpp DESCRIPTION: Implementation of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Event.h" /*=========================================================================== METHOD: WaitOnMultipleEvents (Free Method) DESCRIPTION: Wait for any of the events to be set and return the value Note: If multiple events are set, only the event specified by eventIndex will be read from. Run this function again to get the next event. PARAMETERS: events [ I ] - Vector of events which may be signaled timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success eventIndex [ O ] - Index of event which was signaled RETURN VALUE: Return code positive for number of events set -ETIME on timeout negative errno value on failure ===========================================================================*/ int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ) { // Check internal pipes' status for (int index = 0; index < events.size(); index++) { int error = events[index]->mError; if (error != 0) { TRACE( "cEvent %d has error %d\n", index, error ); return -error; } } // Initialize the FD set fd_set fds; FD_ZERO( &fds ); // Add each item to the FD set, keeping track of the largest, // which is used for select() int largestFD = 0; for (int index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; FD_SET( pipe, &fds ); largestFD = std::max( pipe, largestFD ); } struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipes for the specified amount of time int rc = select( largestFD + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { TRACE( "WaitOnMultipleEvents error %d\n", errno ); return -errno; } else if (rc == 0) { // No activity on the pipes return -ETIME; } int numSignaled = rc; // Only read from first pipe which was signaled int signaled = -1; for (int index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; if (FD_ISSET( pipe, &fds ) != 0) { signaled = index; break; } } if (signaled == -1) { // Odd, no one was signaled return -ENODATA; } DWORD tempVal = 0; rc = events[signaled]->Read( tempVal ); if (rc == 0) { // Success val = tempVal; eventIndex = signaled; return numSignaled; } else { // failure return rc; } } /*=========================================================================*/ // cEvent Methods /*=========================================================================*/ /*=========================================================================== METHOD: cEvent (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cEvent::cEvent() : mError( 0 ) { int rc = pipe( mPipes ); if (rc != 0) { mError = errno; TRACE( "cEvent - Error %d creating pipe, %s\n", mError, strerror( mError ) ); } } /*=========================================================================== METHOD: ~cEvent (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cEvent::~cEvent() { // Check internal pipe status if (mError == 0) { Close(); mError = EBADF; } } /*=========================================================================== METHOD: Close (Internal Method) DESCRIPTION: Close pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Close() { int retCode = 0; int rc = close( mPipes[READING] ); mPipes[READING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[READING], %s\n", retCode, strerror( retCode ) ); } rc = close( mPipes[WRITING] ); mPipes[WRITING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[WRITING], %s\n", retCode, strerror( retCode ) ); } return retCode; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Set/signal the event with the specified value PARAMETERS: val [ I ] - Value to pass through with signal RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Set( DWORD val ) { // Check internal pipe status if (mError != 0) { return mError; } PBYTE pWrite = (PBYTE)&val; int writeSize = sizeof( DWORD ); while (writeSize > 0) { int bytesWritten = write( mPipes[WRITING], pWrite, writeSize ); if (bytesWritten == -1) { // Store error from write int writeErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = writeErr; } // We cannot recover from this error Close(); return writeErr; } pWrite += bytesWritten; writeSize -= bytesWritten; } // Success return 0; } /*=========================================================================== METHOD: Wait (Free Method) DESCRIPTION: Wait for the event to be signalled and return the read in value PARAMETERS: timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success RETURN VALUE: Return code 0 on success ETIME on timeout errno value on failure ===========================================================================*/ int cEvent::Wait( DWORD timeoutMS, DWORD & val ) { // Check internal pipe status if (mError != 0) { return mError; } fd_set fds; FD_ZERO( &fds ); FD_SET( mPipes[READING], &fds ); struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipe for the specified amount of time int rc = select( mPipes[READING] + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { // Store error from select int selectErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = selectErr; } // We cannot recover from this error Close(); return selectErr; } else if (rc == 0) { // No activity on the pipe return ETIME; } return Read( val ); } /*=========================================================================== METHOD: Clear (Free Method) DESCRIPTION: Read and discard all values currently in the pipe ===========================================================================*/ void cEvent::Clear() { DWORD unusedVal; int rc = 0; while (rc == 0) { rc = Wait( (DWORD)0, unusedVal ); } } /*=========================================================================== METHOD: Read (Internal Method) DESCRIPTION: Read a DWORD from the pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Read( DWORD & val ) { DWORD tempVal; PBYTE pRead = (PBYTE)&tempVal; int readSize = sizeof( DWORD ); while (readSize > 0) { int bytesRead = read( mPipes[READING], pRead, readSize ); if (bytesRead <= 0) { // Store error from read int readErr = errno; if (readErr == 0) { // Hard error! This should NEVER happen for a pipe ASSERT( 0 ); readErr = EBADF; } // First error? if (mError == 0) { // Yes, store the error mError = readErr; } // We cannot recover from this error Close(); return readErr; } pRead += bytesRead; readSize -= bytesRead; } val = tempVal; return 0; }libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/Event.h000077500000000000000000000103361455567757300220640ustar00rootroot00000000000000/*=========================================================================== FILE: Event.h DESCRIPTION: Declaration of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include //--------------------------------------------------------------------------- // Prototype //--------------------------------------------------------------------------- class cEvent; /*=========================================================================*/ // Free methods /*=========================================================================*/ // Wait for any of the events to be set and return the value int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); /*=========================================================================*/ // Class cEvent /*=========================================================================*/ class cEvent { public: // Constructor cEvent(); // Destructor ~cEvent(); // Set/signal the event with the specified value int Set( DWORD val ); // Wait for the event to be signalled and return the read in value int Wait( DWORD timeoutMS, DWORD & val ); // Read and discard all values currently in the pipe void Clear(); protected: // Close pipe (used in errors or normal exit) int Close(); // Read from the pipe int Read( DWORD & val ); /* Internal error status */ int mError; /* Internal pipes */ int mPipes[2]; // WaitOnMultipleEvents gets full access friend int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolBuffer.cpp000077500000000000000000000146641455567757300243010ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.cpp DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sProtocolBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer() : mpData( 0 ), mbValid( false ) { // Object is currently invalid mTimestamp = EMPTY_TIME; } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (parameterized) PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( sSharedBuffer * pBuffer ) : mpData( 0 ), mbValid( false ) { mTimestamp = EMPTY_TIME; time_t rawtime; time( &rawtime ); tm * timestamp = localtime( &rawtime ); if (timestamp != 0) { mTimestamp = *timestamp; } if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } mpData = pBuffer; if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; } // NOTE: Derived classes need to call their own validation method // in their constructors since the override might try to access // data that is not yet in place sProtocolBuffer::Validate(); } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Copy constructor PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( const sProtocolBuffer & copyThis ) : mpData( copyThis.mpData ), mTimestamp( copyThis.mTimestamp ), mbValid( copyThis.mbValid ) { // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } } /*=========================================================================== METHOD: operator = (Public Method) DESCRIPTION: Assignment operator PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: sProtocolBuffer & ===========================================================================*/ sProtocolBuffer & sProtocolBuffer::operator = ( const sProtocolBuffer & copyThis ) { // Do we already have data? if (mpData != 0) { // Is it different than what we are duplicating? if (mpData != copyThis.mpData) { // Yes, release our current buffer mpData->Release(); } } mpData = copyThis.mpData; mTimestamp = copyThis.mTimestamp; mbValid = copyThis.mbValid; // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } return *this; } /*=========================================================================== METHOD: ~sProtocolBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::~sProtocolBuffer() { if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } else if (mpData != 0) { ASSERT( 0 ); } mbValid = false; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolBuffer.h000077500000000000000000000120301455567757300237270ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.h DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SharedBuffer.h" #include "ProtocolEnum.h" static const tm EMPTY_TIME = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /*=========================================================================*/ // Struct sProtocolBuffer /*=========================================================================*/ struct sProtocolBuffer { public: // Constructor (default) sProtocolBuffer(); // Constructor (parameterized) sProtocolBuffer( sSharedBuffer * pBuffer ); // Copy constructor sProtocolBuffer( const sProtocolBuffer & copyThis ); // Assignment operator sProtocolBuffer & operator = ( const sProtocolBuffer & copyThis ); // Destructor virtual ~sProtocolBuffer(); // (Inline) Get buffer const BYTE * GetBuffer() const { BYTE * pRet = 0; if (IsValid() == true) { pRet = (BYTE *)mpData->GetBuffer(); } return (const BYTE *)pRet; }; // (Inline) Get buffer size ULONG GetSize() const { ULONG size = 0; if (IsValid() == true) { size = mpData->GetSize(); } return size; }; // (Inline) Return the protocol type eProtocolType GetType() const { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid() == true) { pt = (eProtocolType)mpData->GetType(); } return pt; }; // (Inline) Return the shared buffer sSharedBuffer * GetSharedBuffer() const { sSharedBuffer * pRet = 0; if (IsValid() == true) { pRet = mpData; } return pRet; }; // (Inline) Return the timestamp tm GetTimestamp() const { tm ft = EMPTY_TIME; if (IsValid() == true) { ft = mTimestamp; } return ft; }; // (Inline) Is this buffer valid? virtual bool IsValid() const { return mbValid; }; protected: // (Inline) Validate buffer virtual bool Validate() { // Do we have a shared buffer and is it valid? mbValid = (mpData != 0 && mpData->IsValid()); return mbValid; }; /* Our data buffer */ sSharedBuffer * mpData; /* Time buffer was created */ tm mTimestamp; /* Has this buffer been validated? (NOTE: *NOT* set in base) */ bool mbValid; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolEnum.h000077500000000000000000000234751455567757300234410ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEnum.h DESCRIPTION: Generic protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eProtocolType Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eProtocolType Enumeration // // NOTE: QMI protocol types need to be in the same order as eQMIService // with RX added first then TX /*=========================================================================*/ enum eProtocolType { ePROTOCOL_ENUM_BEGIN = -1, ePROTOCOL_COMMAND, // 000 Protocol server command ePROTOCOL_AT, // 001 AT command protocol ePROTOCOL_NMEA, // 002 NMEA (GPS) protocol ePROTOCOL_DIAG_RX, // 003 DIAG protocol (incoming) ePROTOCOL_DIAG_TX, // 004 DIAG protocol (outgoing) ePROTOCOL_DOWNLOAD_RX, // 005 Download protocol (incoming) ePROTOCOL_DOWNLOAD_TX, // 006 Download protocol (outgoing) ePROTOCOL_SDOWNLOAD_RX, // 007 Streaming download protocol (incoming) ePROTOCOL_SDOWNLOAD_TX, // 008 Streaming download protocol (outgoing) ePROTOCOL_QDL_RX, // 009 QDL streaming protocol (incoming) ePROTOCOL_QDL_TX, // 010 QDL streaming protocol (outgoing) ePROTOCOL_QMI_CTL_RX = 60, // 060 QMI CTL protocol (incoming) ePROTOCOL_QMI_CTL_TX, // 061 QMI CTL protocol (outgoing) ePROTOCOL_QMI_WDS_RX, // 062 QMI WDS protocol (incoming) ePROTOCOL_QMI_WDS_TX, // 063 QMI WDS protocol (outgoing) ePROTOCOL_QMI_DMS_RX, // 064 QMI DMS protocol (incoming) ePROTOCOL_QMI_DMS_TX, // 065 QMI DMS protocol (outgoing) ePROTOCOL_QMI_NAS_RX, // 066 QMI NAS protocol (incoming) ePROTOCOL_QMI_NAS_TX, // 067 QMI NAS protocol (outgoing) ePROTOCOL_QMI_QOS_RX, // 068 QMI QOS protocol (incoming) ePROTOCOL_QMI_QOS_TX, // 069 QMI QOS protocol (outgoing) ePROTOCOL_QMI_WMS_RX, // 070 QMI WMS protocol (incoming) ePROTOCOL_QMI_WMS_TX, // 071 QMI WMS protocol (outgoing) ePROTOCOL_QMI_PDS_RX, // 072 QMI PDS protocol (incoming) ePROTOCOL_QMI_PDS_TX, // 073 QMI PDS protocol (outgoing) ePROTOCOL_QMI_AUTH_RX, // 074 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AUTH_TX, // 075 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_AT_RX, // 076 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AT_TX, // 077 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_VOICE_RX, // 078 QMI Voice protocol (incoming) ePROTOCOL_QMI_VOICE_TX, // 079 QMI Voice protocol (outgoing) ePROTOCOL_QMI_CAT2_RX, // 080 QMI CAT (new) protocol (incoming) ePROTOCOL_QMI_CAT2_TX, // 081 QMI CAT (new) protocol (outgoing) ePROTOCOL_QMI_UIM_RX, // 082 QMI UIM protocol (incoming) ePROTOCOL_QMI_UIM_TX, // 083 QMI UIM protocol (outgoing) ePROTOCOL_QMI_PBM_RX, // 084 QMI PBM protocol (incoming) ePROTOCOL_QMI_PBM_TX, // 085 QMI PBM protocol (outgoing) ePROTOCOL_QMI_13_RX, // 086 QMI service ID 13 protocol (incoming) ePROTOCOL_QMI_13_TX, // 087 QMI service ID 13 protocol (outgoing) ePROTOCOL_QMI_14_RX, // 088 QMI service ID 14 protocol (incoming) ePROTOCOL_QMI_14_TX, // 089 QMI service ID 14 protocol (outgoing) ePROTOCOL_QMI_15_RX, // 090 QMI service ID 15 protocol (incoming) ePROTOCOL_QMI_15_TX, // 091 QMI service ID 15 protocol (outgoing) ePROTOCOL_QMI_LOC_RX, // 092 QMI UIM protocol (incoming) ePROTOCOL_QMI_LOC_TX, // 093 QMI UIM protocol (outgoing) ePROTOCOL_QMI_SAR_RX, // 094 QMI PBM protocol (incoming) ePROTOCOL_QMI_SAR_TX, // 095 QMI PBM protocol (outgoing) ePROTOCOL_QMI_18_RX, // 096 QMI service ID 18 protocol (incoming) ePROTOCOL_QMI_18_TX, // 097 QMI service ID 18 protocol (outgoing) ePROTOCOL_QMI_19_RX, // 098 QMI service ID 19 protocol (incoming) ePROTOCOL_QMI_19_TX, // 099 QMI service ID 19 protocol (outgoing) ePROTOCOL_QMI_RMTFS_RX, // 100 QMI RMTFS protocol (incoming) ePROTOCOL_QMI_RMTFS_TX, // 101 QMI RMTFS protocol (outgoing) ePROTOCOL_QMI_21_RX, // 102 QMI service ID 21 protocol (incoming) ePROTOCOL_QMI_21_TX, // 103 QMI service ID 21 protocol (outgoing) ePROTOCOL_QMI_22_RX, // 104 QMI service ID 22 protocol (incoming) ePROTOCOL_QMI_22_TX, // 105 QMI service ID 22 protocol (outgoing) ePROTOCOL_QMI_23_RX, // 106 QMI service ID 23 protocol (incoming) ePROTOCOL_QMI_23_TX, // 107 QMI service ID 23 protocol (outgoing) ePROTOCOL_QMI_24_RX, // 108 QMI service ID 24 protocol (incoming) ePROTOCOL_QMI_24_TX, // 109 QMI service ID 24 protocol (outgoing) ePROTOCOL_QMI_CAT_RX = 508, // 508 QMI CAT protocol (incoming) ePROTOCOL_QMI_CAT_TX, // 509 QMI CAT protocol (outgoing) ePROTOCOL_QMI_RMS_RX, // 510 QMI RMS protocol (incoming) ePROTOCOL_QMI_RMS_TX, // 511 QMI RMS protocol (outgoing) ePROTOCOL_QMI_OMA_RX, // 512 QMI OMA protocol (incoming) ePROTOCOL_QMI_OMA_TX, // 513 QMI OMA protocol (outgoing) ePROTOCOL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolType validity check PARAMETERS: pt [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolType pt ) { bool retVal = false; if ( (pt > ePROTOCOL_ENUM_BEGIN && pt <= ePROTOCOL_QDL_TX) || (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_24_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocol( eProtocolType pt ) { bool retVal = false; if ( (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_24_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolRX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the incoming direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolRX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are even are RX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 0) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolTX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the outgoing direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolTX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are odd are TX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 1) ) { retVal = true; } return retVal; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolLog.cpp000077500000000000000000000135701455567757300236040ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class definition PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolLog.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // The maximum number of in-memory buffers we allow const ULONG MAX_PROTOCOL_BUFFERS = 1024 * 16; /*=========================================================================*/ // cProtocolLog Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolLog (Public Method) DESCRIPTION: Constructor PARAMETERS: maxBuffers [ I ] - Maximum number of buffers to store in the log RETURN VALUE: None ===========================================================================*/ cProtocolLog::cProtocolLog( ULONG maxBuffers ) : mLog( maxBuffers > MAX_PROTOCOL_BUFFERS ? MAX_PROTOCOL_BUFFERS : maxBuffers, true ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolLog (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolLog::~cProtocolLog() { // Empty out the log Clear(); } /*=========================================================================== METHOD: AddBuffer (Public Method) DESCRIPTION: Add an protocol buffer to the end of the log PARAMETERS: buff [ I ] - Protocol buffer to add RETURN VALUE: ULONG - Index of newly added buffer (INVALID_LOG_INDEX upon failure) ===========================================================================*/ ULONG cProtocolLog::AddBuffer( sProtocolBuffer & buf ) { ULONG idx = INVALID_LOG_INDEX; if (buf.IsValid() == false) { return idx; } bool bRC = mLog.AddElement( buf, idx ); if (bRC == false) { idx = INVALID_LOG_INDEX; } return idx; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Return the protocol buffer at the given index from the log PARAMETERS: idx [ I ] - Index of protocol buffer to obtain RETURN VALUE: sProtocolBuffer - Protocol buffer ===========================================================================*/ sProtocolBuffer cProtocolLog::GetBuffer( ULONG idx ) const { sProtocolBuffer buf; mLog.GetElement( idx, buf ); return buf; } /*=========================================================================== METHOD: GetSignalEvent (Public Method) DESCRIPTION: Return the underlying signal event, which will be set when the log is updated. RETURN VALUE: cEvent - Signal event ===========================================================================*/ cEvent & cProtocolLog::GetSignalEvent() const { return mLog.GetSignalEvent(); } /*=========================================================================== METHOD: GetCount (Public Method) DESCRIPTION: Return the total number of buffers added to the log RETURN VALUE: ULONG ===========================================================================*/ ULONG cProtocolLog::GetCount() const { return mLog.GetTotalCount(); } /*=========================================================================== METHOD: Clear (Public Method) DESCRIPTION: Clear the log RETURN VALUE: None ===========================================================================*/ void cProtocolLog::Clear() { mLog.EmptyQueue(); } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolLog.h000077500000000000000000000071271455567757300232520ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class declaration PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "SyncQueue.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const ULONG INVALID_LOG_INDEX = ULONG_MAX; /*=========================================================================*/ // Class cProtocolLog /*=========================================================================*/ class cProtocolLog { public: // Constructor cProtocolLog( ULONG maxBuffers ); // Destructor virtual ~cProtocolLog(); // Add an protocol buffer to the end of the log virtual ULONG AddBuffer( sProtocolBuffer & buf ); // Return the protocol buffer at the given index from the log virtual sProtocolBuffer GetBuffer( ULONG idx ) const; // Return the underlying signal event virtual cEvent & GetSignalEvent() const; // Return the total number of buffers added to the log virtual ULONG GetCount() const; // Clear the log virtual void Clear(); protected: /* The underlying 'log' */ cSyncQueue mLog; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolNotification.cpp000077500000000000000000000134551455567757300255130ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.cpp DESCRIPTION: Implementation of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolNotification.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cProtocolQueueNotification Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Constructor PARAMETERS: pSQ [ I ] - Sync queue to utilize RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( cSyncQueue * pSQ ) : mpSQ( pSQ ) { // Nothing to do } /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Copy constructor PARAMETERS: notifier [ I ] - Notifier to base the new one on RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( const cProtocolQueueNotification & notifier ) : mpSQ( notifier.mpSQ ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolQueueNotification (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::~cProtocolQueueNotification() { mpSQ = 0; } /*=========================================================================== METHOD: Clone (Public Method) DESCRIPTION: Return an allocated copy of this object downcasted to our base class RETURN VALUE: cProtocolNotification * : Cloned object (0 on error) ===========================================================================*/ cProtocolNotification * cProtocolQueueNotification::Clone() const { cProtocolQueueNotification * pCopy = 0; try { pCopy = new cProtocolQueueNotification( *this ); } catch (...) { // Simply return 0 } return ((cProtocolNotification *)pCopy); } /*=========================================================================== METHOD: Notify (Public Method) DESCRIPTION: Notify view of a protocol event by adding notification structure to the underlying sync queue (which will provide the notification by signalling an event) PARAMETERS: eventType [ I ] - Protocol event type param1 [ I ] - Event type specific argument (see header description) param2 [ I ] - Event type specific argument (see header description) RETURN VALUE: None ===========================================================================*/ void cProtocolQueueNotification::Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const { sProtocolNotificationEvent evt( eventType, param1, param2 ); if (evt.IsValid() == true && mpSQ != 0 && mpSQ->IsValid() == true) { sProtocolNotificationEvent elem( eventType, param1, param2 ); mpSQ->AddElement( elem ); } } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolNotification.h000077500000000000000000000177541455567757300251660ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.h DESCRIPTION: Declaration of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SyncQueue.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- enum eProtocolEventType { ePROTOCOL_EVT_BEGIN = -1, ePROTOCOL_EVT_REQ_ERR, // There was an error sending the request ePROTOCOL_EVT_REQ_SENT, // The request has been sent ePROTOCOL_EVT_RSP_ERR, // There was an error receiving the response ePROTOCOL_EVT_RSP_RECV, // The response has been received ePROTOCOL_EVT_AUX_TU_SENT, // Auxiliary data transmission unit sent ePROTOCOL_EVT_END }; // NOTE: The arguments for each event are currently as follows: // // ePROTOCOL_EVT_REQ_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_REQ_SENT // param1: Request ID // param2: Index of request buffer in associated protocol log // ePROTOCOL_EVT_RSP_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_RSP_RECV // param1: Request ID // param2: Index of response buffer in associated protocol log // // ePROTOCOL_EVT_AUX_TU_SENT // param1: Request ID // param2: Size of transmission unit // NOTE: To handle protoocl events using the Windows notifier add the following // prototype to your Window class header file: // // afx_msg LRESULT OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ); // // Then add an entry to the message map in your Window class source file: // // BEGIN_MESSAGE_MAP( CView, CChildView ) // ON_MESSAGE( PROTOCOL_WM_BASE + (ULONG)ePROTOCOL_EVT_XXX, OnProtocolEvent ) // END_MESSAGE_MAP() // // Finally write the handler itself: // // LRESULT CView::OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ) // { // Do something // return 0; // } /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolEventType validity check PARAMETERS: evtType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolEventType evtType ) { bool bRC = false; if (evtType > ePROTOCOL_EVT_BEGIN && evtType < ePROTOCOL_EVT_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Struct sProtocolNotificationEvent /*=========================================================================*/ struct sProtocolNotificationEvent { public: // (Inline) Default constructor (results in invalid object) sProtocolNotificationEvent() : mEventType( ePROTOCOL_EVT_BEGIN ), mParam1( 0 ), mParam2( 0 ) { // Nothing to do }; // (Inline) Parameter constructor sProtocolNotificationEvent( eProtocolEventType eventType, DWORD param1, DWORD param2 ) : mEventType( eventType ), mParam1( param1 ), mParam2( param2 ) { // Nothing to do }; // (Inline) Is this object valid? bool IsValid() { return ::IsValid( mEventType ); } /* Event type */ eProtocolEventType mEventType; /* First parameter (see above) */ DWORD mParam1; /* Second parameter (see above) */ DWORD mParam2; }; /*=========================================================================*/ // Class cProtocolNotification // // This abstract base class provides notification of protocol server // events sent from the protocol server to protocol server clients /*=========================================================================*/ class cProtocolNotification { public: // Return an allocated copy of this object virtual cProtocolNotification * Clone() const = 0; // Notify view of a protocol event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const = 0; }; /*=========================================================================*/ // Class cProtocolQueueNotification // // This class provides notification via a cSyncQueue object // populated with sProtocolNotificationEvent objects /*=========================================================================*/ class cProtocolQueueNotification : public cProtocolNotification { public: // Constructor cProtocolQueueNotification( cSyncQueue * pSQ ); // Copy constructor cProtocolQueueNotification( const cProtocolQueueNotification & notifier ); // Destructor virtual ~cProtocolQueueNotification(); // Return a copy of this object virtual cProtocolNotification * Clone() const; // Notify view of a MIS event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const; protected: /* Event notification queue */ mutable cSyncQueue * mpSQ; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolRequest.cpp000077500000000000000000000203131455567757300245040ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.cpp DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolRequest.h" #include "ProtocolNotification.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout const ULONG DEFAULT_REQ_TIMEOUT = 1000; // Minimum and maximum allowable timeout values (in milliseconds) const ULONG MIN_REQ_TIMEOUT = 100; const ULONG MAX_REQ_TIMEOUT = 300000; // Minimum number of attempts a request can be scheduled for const ULONG MIN_REQ_ATTEMPTS = 1; // Value to indicate that a request is to be sent out indefinately const ULONG INFINITE_REQS = 0xFFFFFFFF; // Minimum/default amount of time between repeated requests (in milliseconds) const ULONG MIN_REQ_FREQUENCY = 10; const ULONG DEFAULT_REQ_FREQUENCY = 100; /*=========================================================================*/ // sProtocolRequest Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) schedule [ I ] - When (from now, in milliseconds) to send the first request, this isn't a hard value as the request is only guaranteed to go out after this time elapses timeout [ I ] - Milliseconds to wait for a response to an individual request before declaring a timeout. Regardless of what is passed in the timeout value used will be between MIN/MAX_REQ_TIMEOUT requests [ I ] - Number of request attempts to make, this isn't a retry count rather this value is used to specify repeating requests. Regardless of what is passed in the requests value used will be at least MIN_REQ_ATTEMPTS frequency [ I ] - If the 'requests' value is greater than the MIN_REQ_ATTEMPTS than this represents the amount of time to wait between requests (from the completion of the last request attempt, in milliseconds), again this isn't a hard value. Regardless of what is passed in the frequency value used will be at least MIN_REQ_FREQUENCY pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule, ULONG timeout, ULONG requests, ULONG frequency, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( schedule ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( 0 ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Constrain requested timeout to allowable range if (timeout < MIN_REQ_TIMEOUT) { timeout = MIN_REQ_TIMEOUT; } if (timeout > MAX_REQ_TIMEOUT) { timeout = MAX_REQ_TIMEOUT; } mTimeout = timeout; // Constrain request attempts if (requests >= MIN_REQ_ATTEMPTS) { mRequests = requests; } // Constrain frequency if (frequency >= MIN_REQ_FREQUENCY) { mFrequency = frequency; } // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor (notification with defaults) PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( 0 ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( pNotifier ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Copy constructor PARAMETERS: req [ I ] - Request to copy RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( const sProtocolRequest & req ) : sProtocolBuffer( req ), mSchedule( req.mSchedule ), mTimeout( req.mTimeout ), mRequests( req.mRequests ), mFrequency( req.mFrequency ), mpNotifier( 0 ), mpAuxData( req.mpAuxData ), mAuxDataSize( req.mAuxDataSize ), mbTXOnly( req.mbTXOnly ) { // Clone notifier? if (req.mpNotifier != 0) { mpNotifier = req.mpNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: ~sProtocolRequest DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolRequest::~sProtocolRequest() { // Delete cloned notifier? if (mpNotifier != 0) { delete mpNotifier; mpNotifier = 0; } } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolRequest.h000077500000000000000000000150751455567757300241620ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.h DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing protocol requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolNotification; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout extern const ULONG DEFAULT_REQ_TIMEOUT; // Minimum and maximum allowable timeout values (in milliseconds) extern const ULONG MIN_REQ_TIMEOUT; extern const ULONG MAX_REQ_TIMEOUT; // Minimum number of attempts a request can be scheduled for extern const ULONG MIN_REQ_ATTEMPTS; // Value to indicate that a request is to be sent out indefinately extern const ULONG INFINITE_REQS; // Minimum/default amount of time between repeated requests (in milliseconds) extern const ULONG MIN_REQ_FREQUENCY; extern const ULONG DEFAULT_REQ_FREQUENCY; /*=========================================================================*/ // Struct sProtocolRequest // // Structure to represent a generic request packet, including all the // information needed to schedule the request, send the request, and // (optionally) reschedule the request for another TX/RX attempt // // The default parameters schedule an immediate request (indicated by // passing in '0' for the schedule parameter) to be sent once with // the default timeout value /*=========================================================================*/ struct sProtocolRequest : public sProtocolBuffer { public: // Parameterized constructor sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule = 0, ULONG timeout = DEFAULT_REQ_TIMEOUT, ULONG requests = MIN_REQ_ATTEMPTS, ULONG frequency = DEFAULT_REQ_FREQUENCY, cProtocolNotification * pNotifier = 0 ); // Parameterized constructor (notification with defaults) sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ); // Copy constructor sProtocolRequest( const sProtocolRequest & req ); // Destructor virtual ~sProtocolRequest(); // (Inline) Get schedule value (value is in milliseconds) ULONG GetSchedule() const { return mSchedule; }; // (Inline) Get timeout value ULONG GetTimeout() const { return mTimeout; }; // (Inline) Get requests value ULONG GetRequests() const { return mRequests; }; // (Inline) Get frequency value (value is in milliseconds) ULONG GetFrequency() const { return mFrequency; }; const cProtocolNotification * GetNotifier() const { return mpNotifier; }; // (Inline) Set auxiliary data void SetAuxiliaryData( const BYTE * pData, ULONG dataSz ) { mpAuxData = pData; mAuxDataSize = dataSz; }; // (Inline) Get auxiliary data const BYTE * GetAuxiliaryData( ULONG & dataSz ) const { dataSz = mAuxDataSize; return mpAuxData; }; // (Inline) Set TX only flag void SetTXOnly() { mbTXOnly = true; }; // (Inline) Get TX only flag bool IsTXOnly() const { return mbTXOnly; }; protected: /* Schedule (approximately when to send the initial request) */ ULONG mSchedule; /* Timeout value for receiving a response */ ULONG mTimeout; /* Number of requests to schedule (must be at least one) */ ULONG mRequests; /* Frequency (approximately how long to wait before next request) */ ULONG mFrequency; /* Notification object */ cProtocolNotification * mpNotifier; /* Auxiliary data */ const BYTE * mpAuxData; /* Auxilary data size */ ULONG mAuxDataSize; /* TX only (i.e. do not wait for a response) ? */ bool mbTXOnly; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolServer.cpp000077500000000000000000001363471455567757300243410ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.cpp DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolServer.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID const ULONG INVALID_REQUEST_ID = 0; // Default activity timeout value const ULONG DEFAULT_WAIT = 100; // MTU (Maximum Transmission Unit) for auxiliary data (QC USB imposed) const ULONG MAX_AUX_MTU_SIZE = 1024 * 256; // USB's MaxPacketSize const ULONG MAX_PACKET_SIZE = 512; // Maximum amount of time to wait on external access synchronization object #ifdef DEBUG // For the sake of debugging do not be so quick to assume failure const ULONG DEADLOCK_TIME = 180000; #else const ULONG DEADLOCK_TIME = 10000; #endif // Maximum amount of time to wait for the protocol server to process a command const ULONG COMMAND_TIME = DEADLOCK_TIME; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ScheduleThread (Free Method) DESCRIPTION: Watch schedule for event to process or timeout PARAMETERS: pArg [ I ] - The protocol server object RETURN VALUE: void * - thread exit value (always NULL) ===========================================================================*/ void * ScheduleThread( PVOID pArg ) { // Do we have a server? cProtocolServer * pServer = (cProtocolServer *)pArg; if (pServer == 0) { TRACE( "ScheduleThread started with empty pArg." " Unable to locate cProtocolServer\n" ); ASSERT( 0 ); return NULL; } TRACE( "Schedule thread [%lu] started\n", pthread_self() ); // Default wait event timespec toTime = TimeIn( DEFAULT_WAIT ); // Return value checking int nRet; while (pServer->mbExiting == false) { DWORD nTemp; nRet = pServer->mThreadScheduleEvent.Wait( TimeFromNow( toTime ), nTemp ); if (nRet != 0 && nRet != ETIME) { // Error condition TRACE( "ScheduleThread [%lu] ScheduleThread wait error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Time to exit? if (pServer->mbExiting == true) { break; } // Get Schedule Mutex (non-blocking) nRet = pthread_mutex_trylock( &pServer->mScheduleMutex ); if (nRet == EBUSY) { // Not an error, we're just too slow // Someone else got to the ScheduleMutex before us // We'll wait for the signal again toTime = TimeIn( DEFAULT_WAIT ); TRACE( "ScheduleThread [%lu] unable to lock ScheduleMutex\n", pthread_self() ); continue; } else if (nRet != 0) { // Error condition TRACE( "ScheduleThread [%lu] mScheduleMutex error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Verify time. In the rare event it does move backward // it would simply place all our schedule items as due now pServer->CheckSystemTime(); // Default next wait period toTime = TimeIn( DEFAULT_WAIT ); timespec curTime = TimeIn( 0 ); if (pServer->mpActiveRequest != 0) { if (pServer->mpActiveRequest->mbWaitingForResponse == true) { // Waiting on a response, this takes priority over the next // scheduled event // Has timeout expired? if (pServer->mActiveRequestTimeout <= curTime) { // Response timeout // Note: This may clear mpActiveRequest pServer->RxTimeout(); } else { // Active response timer is not yet due to expire // Default timeout again, or this response's timeout? if (pServer->mActiveRequestTimeout <= toTime) { toTime = pServer->mActiveRequestTimeout; } } } else { // This should never happen TRACE( "ScheduleThread() Sequencing error: " "Active request %lu is not waiting for response ???\n", pServer->mpActiveRequest->mID ); break; } } if (pServer->mpActiveRequest == 0 && pServer->mRequestSchedule.size() > 0) { // No response timer active, ready to start the next // scheduled item if due timespec scheduledItem = pServer->GetNextRequestTime(); // Is item due to be scheduled? if (scheduledItem <= curTime) { // Process scheduled item pServer->ProcessRequest(); } else { // Scheduled item is not yet due to be processed // Default timeout again, or this item's start time? if (scheduledItem <= toTime) { toTime = scheduledItem; } } } /*TRACE( "Updated timer at %llu waiting %lu\n", GetTickCount(), TimeFromNow( toTime ) ); */ // Unlock schedule mutex nRet = pthread_mutex_unlock( &pServer->mScheduleMutex ); if (nRet != 0) { TRACE( "ScheduleThread Unable to unlock schedule mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } TRACE( "Schedule thread [%lu] exited\n", pthread_self() ); return NULL; } /*=========================================================================== METHOD: TimeIn (Free Method) DESCRIPTION: Fill timespec with the time it will be in specified milliseconds Relative time to Absolute time PARAMETERS: millis [ I ] - Milliseconds from current time RETURN VALUE: timespec - resulting time (from epoc) NOTE: tv_sec of 0 is an error ===========================================================================*/ timespec TimeIn( ULONG millis ) { timespec outTime; int nRC = clock_gettime( CLOCK_REALTIME, &outTime ); if (nRC == 0) { // Add avoiding an overflow on (long)nsec outTime.tv_sec += millis / 1000l; outTime.tv_nsec += ( millis % 1000l ) * 1000000l; // Check if we need to carry if (outTime.tv_nsec >= 1000000000l) { outTime.tv_sec += outTime.tv_nsec / 1000000000l; outTime.tv_nsec = outTime.tv_nsec % 1000000000l; } } else { outTime.tv_sec = 0; outTime.tv_nsec = 0; } return outTime; } /*=========================================================================== METHOD: TimeFromNow (Free Method) DESCRIPTION: Find the milliseconds from current time this timespec will occur Absolute time to Relative time PARAMETERS: time [ I ] - Absolute time RETURN VALUE: Milliseconds in which absolute time will occur 0 if time has passed or error has occured ===========================================================================*/ ULONG TimeFromNow( timespec time ) { // Assume failure ULONG nOutTime = 0; timespec now; int nRC = clock_gettime( CLOCK_REALTIME, &now ); if (nRC == -1) { TRACE( "Error %d with gettime, %s\n", errno, strerror( errno ) ); return nOutTime; } if (time <= now) { return nOutTime; } nOutTime = (time.tv_sec - now.tv_sec) * 1000l; nOutTime += (time.tv_nsec - now.tv_nsec) / 1000000l; return nOutTime; } /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime = TimeIn( 0 ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================*/ // cProtocolServerRxCallback Methods /*=========================================================================*/ /*=========================================================================== METHOD: IOComplete (Free Method) DESCRIPTION: The I/O has been completed, process the results PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Bytes received during operation RETURN VALUE: None ===========================================================================*/ void cProtocolServerRxCallback::IOComplete( DWORD status, DWORD bytesReceived ) { if (mpServer != 0) { mpServer->RxComplete( status, bytesReceived ); } } /*=========================================================================*/ // cProtocolServer::sProtocolReqRsp Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Constructor PARAMETERS: requestInfo [ I ] - Underlying request object requestID [ I ] - Request ID auxDataMTU [ I ] - MTU (Maximum Transmission Unit) for auxiliary data RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ) : mRequest( requestInfo ), mID( requestID ), mAttempts( 0 ), mEncodedSize( requestInfo.GetSize() ), mRequiredAuxTxs( 0 ), mCurrentAuxTx( 0 ), mbWaitingForResponse( false ) { ULONG auxDataSz = 0; const BYTE * pAuxData = requestInfo.GetAuxiliaryData( auxDataSz ); // Compute the number of required auxiliary data transmissions? if (auxDataMTU > 0 && pAuxData != 0 && auxDataSz > 0) { mRequiredAuxTxs = 1; if (auxDataSz > auxDataMTU) { mRequiredAuxTxs = auxDataSz / auxDataMTU; if ((auxDataSz % auxDataMTU) != 0) { mRequiredAuxTxs++; } } } } /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Coop constructor PARAMETERS: reqRsp [ I ] - Object being copied RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolReqRsp & reqRsp ) : mRequest( reqRsp.mRequest ), mID( reqRsp.mID ), mAttempts( reqRsp.mAttempts ), mEncodedSize( reqRsp.mEncodedSize ), mRequiredAuxTxs( reqRsp.mRequiredAuxTxs ), mCurrentAuxTx( reqRsp.mCurrentAuxTx ), mbWaitingForResponse( reqRsp.mbWaitingForResponse ) { // Nothing to do }; /*=========================================================================*/ // cProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : mComm(), mRxCallback(), mScheduleThreadID( 0 ), mThreadScheduleEvent(), mbExiting( false ), mpServerControl( 0 ), mLastRequestID( 1 ), mpActiveRequest( 0 ), mpRxBuffer( 0 ), mRxBufferSize( bufferSzRx ), mRxType( rxType ), mTxType( txType ), mLog( logSz ) { mLastTime = TimeIn( 0 ); // Allocate receive buffer? if (mRxBufferSize > 0 && mComm.IsValid() == true) { mpRxBuffer = new BYTE[mRxBufferSize]; } // Before continuing verify receive buffer was allocated if (mpRxBuffer != 0) { // Schedule mutex int nRet = pthread_mutex_init( &mScheduleMutex, NULL ); if (nRet != 0) { TRACE( "Unable to init schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } } } /*=========================================================================== METHOD: ~cProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::~cProtocolServer() { // This should have already been called, but ... Exit(); // Schedule mutex int nRet = pthread_mutex_destroy( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to destroy schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); } // Free receive buffer if (mpRxBuffer != 0) { delete [] mpRxBuffer; mpRxBuffer = 0; } } /*=========================================================================== METHOD: HandleRemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request Note: if a request is being processed, it cannot be inturrupted PARAMETERS: reqID [ I ] - Server assigned request ID SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::HandleRemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Find and erase request from request map std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); if (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } mRequestMap.erase( pReqIter ); // Success! bRC = true; // Find and erase request from schedule bool bFound = false; int entryIndex = -1; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { entryIndex++; tSchedule entry = *pScheduleIter; if (entry.second == reqID) { bFound = true; mRequestSchedule.erase( pScheduleIter ); break; } else { pScheduleIter++; } } // Note: schedule will be updated when mutex is unlocked/signaled } else if (mpActiveRequest != 0 && mpActiveRequest->mID == reqID) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Cancel the response timer (when active) if (mpActiveRequest->mbWaitingForResponse == true) { // Schedule will be updated when mutex is unlocked // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)reqID, ECANCELED ); } } else { // This is the active request, cancel the underlying transmit // Note: Because ProcessRequest and RemoveRequest are both muxed // with ScheduleMutex, it is impossible to for the write // to actually be in progress when this code is reached. mComm.CancelTx(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, ECANCELED ); } } // Now delete the request delete mpActiveRequest; mpActiveRequest = 0; // Success! bRC = true; } else { TRACE( "cProtocolServer::RemoveRequest( %lu )," " invalid request ID\n", reqID ); } return bRC; } /*=========================================================================== METHOD: ScheduleRequest (Internal Method) DESCRIPTION: Schedule a request for transmission PARAMETERS: reqID [ I ] - ID of the request being scheduled this ID must exist in the internal request/schedule maps schedule [ I ] - Value in milliseconds that indicates the approximate time from now that the request is to be sent out, the actual time that the request is sent will be greater than or equal to this value dependant on requests scheduled before the request in question and standard server processing time SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ScheduleRequest( ULONG reqID, ULONG schedule ) { // Assume failure bool bRC = false; // Schedule adjust is in milliseconds timespec schTimer = TimeIn( schedule ); // Create the schedule entry tSchedule newEntry( schTimer, reqID ); // Fit this request into the schedule (ordered by scheduled time) mRequestSchedule.insert( newEntry ); // Note: timer will be updated when mScheduleMutex is unlocked return bRC; } /*=========================================================================== METHOD: RescheduleActiveRequest (Internal Method) DESCRIPTION: Reschedule (or cleanup) the active request SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RescheduleActiveRequest() { // Are there more attempts to be made? if (mpActiveRequest->mAttempts < mpActiveRequest->mRequest.GetRequests()) { // Yes, first reset the request mpActiveRequest->Reset(); // Now add it back to the request map mRequestMap[mpActiveRequest->mID] = mpActiveRequest; TRACE( "RescheduleActiveRequest(): req %lu rescheduled\n", mpActiveRequest->mID ); // Lastly reschedule the request ScheduleRequest( mpActiveRequest->mID, mpActiveRequest->mRequest.GetFrequency() ); } else { TRACE( "RescheduleActiveRequest(): req %lu removed\n", mpActiveRequest->mID ); // No, we are through with this request delete mpActiveRequest; } // There is no longer an active request mpActiveRequest = 0; } /*=========================================================================== METHOD: ProcessRequest (Internal Method) DESCRIPTION: Process a single outgoing protocol request, this consists of removing the request ID from the head of the schedule, looking up the internal request object in the request map, sending out the request, and setting up the response timer (if a response is required) SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: ===========================================================================*/ void cProtocolServer::ProcessRequest() { // Is there already an active request? if (mpActiveRequest != 0) { return; } // Grab request ID from the schedule std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); // Did we find the request? if (pScheduleIter == mRequestSchedule.end()) { // No return; } // Yes, grab the request ID ULONG reqID = pScheduleIter->second; // Remove from schedule mRequestSchedule.erase( pScheduleIter ); // Look up the internal request object std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); // Request not found around? if (pReqIter == mRequestMap.end() || pReqIter->second == 0) { // No return; } // Set this request as the active request mpActiveRequest = pReqIter->second; TRACE( "ProcessRequest(): req %lu started\n", mpActiveRequest->mID ); // Remove request from pending request map mRequestMap.erase( pReqIter ); // Extract the underlying request const sProtocolRequest & req = mpActiveRequest->mRequest; // Increment attempt count? if (req.GetRequests() != INFINITE_REQS) { // This request isn't an indefinite one, so keep track of each attempt mpActiveRequest->mAttempts++; } bool bTxSuccess = false; // Encode data for transmission? bool bEncoded = false; sSharedBuffer * pEncoded = 0; pEncoded = EncodeTxData( req.GetSharedBuffer(), bEncoded ); if (bEncoded == false) { // Note: no longer asynchronus // Send the request data bTxSuccess = mComm.TxData( req.GetBuffer(), req.GetSize() ); } else if (bEncoded == true) { if (pEncoded != 0 && pEncoded->IsValid() == true) { // Note: no longer asynchronus // Send the request data mpActiveRequest->mEncodedSize = pEncoded->GetSize(); bTxSuccess = mComm.TxData( pEncoded->GetBuffer(), pEncoded->GetSize() ); } } if (bTxSuccess == true) { TRACE( "ProcessRequest(): req %lu finished\n", mpActiveRequest->mID ); TxComplete(); } else { TxError(); TRACE( "ProcessRequest(): req finished with a TxError\n" ); } return; } /*=========================================================================== METHOD: CheckSystemTime (Internal Method) DESCRIPTION: Check that system time hasn't moved backwards. Since we use the system time for scheduling requests we need to periodically check that the user (or system itself) hasn't reset system time backwards, if it has then we reschedule everything to the current system time. This disrupts the schedule but avoids stranding requests Updates mLastTime SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool: System time moved backwards? ===========================================================================*/ bool cProtocolServer::CheckSystemTime() { // Assume that time is still marching forward bool bAdjust = false; timespec curTime = TimeIn( 0 ); if (curTime < mLastTime) { // Looks like the system clock has been adjusted to an earlier // value, go through the current schedule and adjust each timer // to reflect the adjustment. This isn't an exact approach but // it prevents requests from being stranded which is our goal // Note: set iterators are constant. This means we need to // create a set with the new data, we can't modify this one std::set < tSchedule, std::less > tempSchedule; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { tSchedule entry = *pScheduleIter; entry.first.tv_sec = curTime.tv_sec; entry.first.tv_nsec = curTime.tv_nsec; tempSchedule.insert( entry ); pScheduleIter++; } mRequestSchedule = tempSchedule; // Update mActiveRequestTimeout if ( (mpActiveRequest != 0) && (mpActiveRequest->mbWaitingForResponse == true) ) { // Restart active request's timeout ULONG mTimeout = mpActiveRequest->mRequest.GetTimeout(); mActiveRequestTimeout = TimeIn( mTimeout ); } TRACE( "Time has moved backwards, schedule updated\n" ); // Indicate the change bAdjust = true; } mLastTime.tv_sec = curTime.tv_sec; mLastTime.tv_nsec = curTime.tv_nsec; return bAdjust; } /*=========================================================================== METHOD: RxComplete (Internal Method) DESCRIPTION: Handle completion of receive data operation PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Number of bytes received SEQUENCING: This method is sequenced according to the schedule mutex i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxComplete( DWORD status, DWORD bytesReceived ) { if (status != NO_ERROR) { TRACE( "cProtocolServer::RxComplete() = %lu\n", status ); } // Error with the read if (status != NO_ERROR || bytesReceived == 0) { // Setup the next read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); return; } // Get Schedule Mutex if (GetScheduleMutex() == false) { TRACE( "RxComplete(), unable to get schedule Mutex\n" ); return; } TRACE( "RxComplete() - Entry at %llu\n", GetTickCount() ); // Decode data bool bAbortTx = false; ULONG rspIdx = INVALID_LOG_INDEX; bool bRsp = DecodeRxData( bytesReceived, rspIdx, bAbortTx ); // Is there an active request that needs to be aborted if (mpActiveRequest != 0 && bAbortTx == true) { // Yes, terminate the transmission and handle the error mComm.CancelTx(); TxError(); } // Is there an active request and a valid response? else if (mpActiveRequest != 0 && bRsp == true) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client that response was received if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_RECV, (DWORD)mpActiveRequest->mID, (DWORD)rspIdx ); } // Reschedule request as needed RescheduleActiveRequest(); } // Setup the next read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); TRACE( "RxComplete() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return; } return; } /*=========================================================================== METHOD: RxTimeout (Internal Method) DESCRIPTION: Handle the response timer expiring SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxTimeout() { // No active request? if (mpActiveRequest == 0) { TRACE( "RxTimeout() with no active request\n" ); ASSERT( 0 ); } TRACE( "RxTimeout() for req %lu\n", mpActiveRequest->mID ); const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)mpActiveRequest->mID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: TxComplete (Internal Method) DESCRIPTION: Handle completion of transmit data operation PARAMETERS: SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxComplete() { // No active request? if (mpActiveRequest == 0) { TRACE( "TxComplete() called with no active request\n" ); ASSERT( 0 ); } TRACE( "TxComplete() req %lu started\n", mpActiveRequest->mID ); ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client of auxiliary data being sent? if (mpActiveRequest->mRequiredAuxTxs && mpActiveRequest->mCurrentAuxTx) { pNotifier->Notify( ePROTOCOL_EVT_AUX_TU_SENT, (DWORD)reqID, (DWORD)mpActiveRequest->mEncodedSize ); } // Check for more auxiliary data to transmit if (mpActiveRequest->mCurrentAuxTx < mpActiveRequest->mRequiredAuxTxs) { ULONG auxDataSz = 0; const BYTE * pAuxData = req.GetAuxiliaryData( auxDataSz ); if (auxDataSz > 0 && pAuxData != 0) { bool bRC = false; // Adjust for current MTU pAuxData += (mpActiveRequest->mCurrentAuxTx * MAX_AUX_MTU_SIZE); mpActiveRequest->mCurrentAuxTx++; // Last MTU? if (mpActiveRequest->mCurrentAuxTx == mpActiveRequest->mRequiredAuxTxs) { // More than one MTU? if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = (auxDataSz % MAX_AUX_MTU_SIZE); if (auxDataSz == 0) { auxDataSz = MAX_AUX_MTU_SIZE; } } if (auxDataSz % MAX_PACKET_SIZE == 0) { // If last write of unframed write request is divisible // by 512, break off last byte and send seperatly. TRACE( "TxComplete() Special case, break off last byte\n" ); bRC = mComm.TxData( pAuxData, auxDataSz - 1 ); if (bRC == true) { bRC = mComm.TxData( pAuxData + auxDataSz -1, 1 ); } } else { bRC = mComm.TxData( pAuxData, auxDataSz ); } } else if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = MAX_AUX_MTU_SIZE; bRC = mComm.TxData( pAuxData, auxDataSz ); } if (bRC == true) { mpActiveRequest->mEncodedSize = auxDataSz; TxComplete(); } else { TxError(); } return; } } // Another successful transmission, add the buffer to the log ULONG reqIdx = INVALID_LOG_INDEX; sProtocolBuffer pb( req.GetSharedBuffer() ); reqIdx = mLog.AddBuffer( pb ); // Notify client? if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_SENT, (DWORD)reqID, (DWORD)reqIdx ); } // Wait for a response? if (mpActiveRequest->mRequest.IsTXOnly() == false) { // We now await the response mpActiveRequest->mbWaitingForResponse = true; mActiveRequestTimeout = TimeIn( mpActiveRequest->mRequest.GetTimeout() ); } else { // Reschedule request as needed RescheduleActiveRequest(); } } /*=========================================================================== METHOD: TxError (Internal Method) DESCRIPTION: Handle transmit data operation error be either rescheduling the request or cleaning it up SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxError() { // No active request? if (mpActiveRequest == 0) { return; } ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the protocol server by starting up the schedule thread SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Initialize() { // Assume failure bool bRC = false; mbExiting = false; // Get mScheduleMutex if (GetScheduleMutex() == true) { if (mScheduleThreadID == 0) { // Yes, start thread int nRet = pthread_create( &mScheduleThreadID, NULL, ScheduleThread, this ); if (nRet == 0) { // Success! bRC = true; } } } else { TRACE( "cProtocolServer::Initialize(), unable to aquire ScheduleMutex\n" ); return false; } // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit the protocol server by exiting the schedule thread (if necessary) SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Exit() { // Assume failure bool bRC = false; if (mScheduleThreadID != 0) { if (GetScheduleMutex() == false) { // This should never happen return false; } // Check that mScheduleTheadID is still not 0 if (mScheduleThreadID == 0) { printf( "mScheduleThreadID was zero!!!\n" ); ReleaseScheduleMutex( false ); return false; } // Set exit event mbExiting = true; // Signal a schedule update if (mThreadScheduleEvent.Set( 1 ) != 0) { // This should never happen return false; } TRACE( "Joining ScheduleThread %lu\n", mScheduleThreadID ); // Allow process to continue until it finishes int nRet = pthread_join( mScheduleThreadID, NULL ); if (nRet == ESRCH) { TRACE( "ScheduleThread has exited already\n" ); } else if (nRet != 0) { TRACE( "Unable to join ScheduleThread. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } TRACE( "cProtocolServer::Exit(), completed thread %lu\n", (ULONG)mScheduleThreadID ); bRC = true; // Release "handle" mScheduleThreadID = 0; // Release mutex lock, don't signal ScheduleThread if (ReleaseScheduleMutex( false ) == false) { // This should never happen return false; } } else { // No ScheduleThread bRC = true; } // Free any allocated requests std::map ::iterator pReqIter; pReqIter = mRequestMap.begin(); while (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } pReqIter++; } mRequestMap.clear(); // Free log mLog.Clear(); return bRC; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the given communications port PARAMETERS: pPort [ I ] - String pointer representing the device node to connect to (IE: /dev/qcqmi0) SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Connect( LPCSTR pPort ) { // Assume failure bool bRC = false; if (pPort == 0 || pPort[0] == 0) { return bRC; } // Connect to device // Set callback mRxCallback.SetServer( this ); // Override to initialize port with protocol specific options bRC = mComm.Connect( pPort ); if (bRC == true) { bRC = InitializeComm(); if (bRC == true) { // Setup the initial read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); } } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current communications port SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Disconnect() { // Disconnect // Cancel any outstanding I/O mComm.CancelIO(); // Empty callback mRxCallback.SetServer( 0 ); // Cleanup COM port CleanupComm(); // Now disconnect return mComm.Disconnect(); } /*=========================================================================== METHOD: IsConnected (Public Method) DESCRIPTION: Are we currently connected to a port? SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::IsConnected() { return mComm.IsConnected(); } /*=========================================================================== METHOD: AddRequest (Public Method) DESCRIPTION: Add an outgoing protocol request to the protocol server request queue PARAMETERS: req [ I ] - Request being added SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: ULONG - ID of scheduled request (INVALID_REQUEST_ID upon error) ===========================================================================*/ ULONG cProtocolServer::AddRequest( const sProtocolRequest & req ) { // Assume failure ULONG reqID = INVALID_REQUEST_ID; // Server not configured for sending requests? if (IsValid( mTxType ) == false) { return reqID; } // Request type not valid for server? if (req.GetType() != mTxType) { return reqID; } // Invalide request? if (ValidateRequest( req ) == false) { return reqID; } // Get mScheduleMutex if (GetScheduleMutex() == true) { TRACE( "AddRequest() - Entry at %llu\n", GetTickCount() ); // Grab next available request ID if (++mLastRequestID == 0) { mLastRequestID++; } reqID = mLastRequestID; while (mRequestMap.find( reqID ) != mRequestMap.end()) { reqID++; } // Wrap in our internal structure sProtocolReqRsp * pReqRsp = 0; pReqRsp = new sProtocolReqRsp( req, reqID, MAX_AUX_MTU_SIZE ); if (pReqRsp != 0) { // Add to request map mRequestMap[reqID] = pReqRsp; // ... and schedule ScheduleRequest( reqID, req.GetSchedule() ); } TRACE( "AddRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return INVALID_REQUEST_ID; } } else { TRACE( "cProtocolServer::AddRequest(), unable to get schedule Mutex\n" ); } return reqID; } /*=========================================================================== METHOD: RemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes Note: If a request is being written, it cannot be inturrupted as both ProcessRequest and RemoveRequest depend on the ScheduleMutex and the write is synchronus. If the request has been written but the read has not been triggered it can be removed. PARAMETERS: reqID [ I ] - ID of request being removed RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::RemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Get Schedule Mutex if (GetScheduleMutex() == true) { TRACE( "RemoveRequest() - Entry at %llu\n", GetTickCount() ); bRC = HandleRemoveRequest( reqID ); TRACE( "RemoveRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } } else { TRACE( "cProtocolServer::RemoveRequest(), unable to get mScheduleMutex\n" ); } return bRC; } /*=========================================================================== METHOD: GetScheduleMutex (Internal Method) DESCRIPTION: Get the schedule mutex. Additionally a check is applied to verify the DEADLOCK_TIME was not exceeded SEQUENCING: This function will block until the mScheduleMutex is aquired PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::GetScheduleMutex() { ULONGLONG nStart = GetTickCount(); //TRACE( "Locking Schedule mutex\n" ); int nRet = pthread_mutex_lock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to lock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } ULONGLONG nEnd = GetTickCount(); if (nEnd - nStart > DEADLOCK_TIME) { TRACE( "Deadlock time exceeded: took %llu ms\n", nEnd - nStart ); ReleaseScheduleMutex( true ); return false; } //TRACE( "Locked ScheduleMutex\n" ); return true; } /*=========================================================================== METHOD: ReleaseScheduleMutex (Internal Method) DESCRIPTION: Release lock on the schedule mutex SEQUENCING: Calling process must have lock PARAMETERS: bSignalThread [ I ] - Signal Schedule thread as well? RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ReleaseScheduleMutex( bool bSignalThread ) { if (bSignalThread == true) { if (mThreadScheduleEvent.Set( 1 ) != 0) { return false; } } int nRet = pthread_mutex_unlock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to unlock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return true; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/ProtocolServer.h000077500000000000000000000264641455567757300240040ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.h DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Comm.h" #include "ProtocolRequest.h" #include "ProtocolLog.h" #include "Event.h" #include #include //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolServer; struct sServerControl; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID extern const ULONG INVALID_REQUEST_ID; // Fill timespec with the time it will be in specified milliseconds // Relative time to Absolute time timespec TimeIn( ULONG millis ); // Find the milliseconds from current time this timespec will occur // Absolute time to Relative time ULONG TimeFromNow( timespec time ); // Provide a number for sequencing reference, similar to the windows function ULONGLONG GetTickCount(); // timespec < comparison method inline bool operator< (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec < second.tv_nsec) ) ); } // timespec <= comparison method inline bool operator<= (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec <= second.tv_nsec) ) ); } /*=========================================================================*/ // Class cProtocolServerRxCallback /*=========================================================================*/ class cProtocolServerRxCallback { public: // (Inline) Constructor cProtocolServerRxCallback() : mpServer( 0 ) { }; // (Inline) Destructor virtual ~cProtocolServerRxCallback() { }; // (Inline) Set server object to pass results to void SetServer( cProtocolServer * pServer ) { mpServer = pServer; }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesReceived ); protected: /* Protocol server to interact with */ cProtocolServer * mpServer; }; /*=========================================================================*/ // Class cProtocolServer /*=========================================================================*/ class cProtocolServer { public: // Constructor cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cProtocolServer(); // Initialize the protocol server bool Initialize(); // Exit the protocol server bool Exit(); // Connect to the given communications port bool Connect( LPCSTR pPort ); // Disconnect from target bool Disconnect(); // Are we currently connected to a port? bool IsConnected(); // Add an outgoing protocol request to the protocol server request queue ULONG AddRequest( const sProtocolRequest & req ); // Remove a previously added protocol request bool RemoveRequest( ULONG reqID ); // (Inline) Return the protocol log const cProtocolLog & GetLog() { return mLog; }; protected: // Internal protocol server request/response structure, used to track // info related to sending out a request struct sProtocolReqRsp { public: // Constructor sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ); // Copy constructor sProtocolReqRsp( const sProtocolReqRsp & reqRsp ); // (Inline) Reset for next transmission attempt void Reset() { mEncodedSize = mRequest.GetSize(); mCurrentAuxTx = 0; mbWaitingForResponse = 0; }; /* Request ID */ ULONG mID; /* Number of times this request has been attempted */ ULONG mAttempts; /* Size of encoded data being transmitted */ ULONG mEncodedSize; /* Number of required auxiliary data transmissions */ ULONG mRequiredAuxTxs; /* Current auxiliary data transmission */ ULONG mCurrentAuxTx; /* Are we currently waiting for a response? */ bool mbWaitingForResponse; /* Underlying protocol request */ sProtocolRequest mRequest; }; // Handle the remove request bool HandleRemoveRequest( ULONG reqID ); // Schedule a request for transmission bool ScheduleRequest( ULONG reqID, ULONG schedule ); // (Inline) Get next request's time from mRequestSchedule timespec GetNextRequestTime() { timespec outTime; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); tSchedule entry = *pScheduleIter; outTime = entry.first; return outTime; } // (Inline) Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ) { return req.IsValid(); }; // Reschedule (or cleanup) the active request void RescheduleActiveRequest(); // Process a single outgoing protocol request void ProcessRequest(); // Check that system time hasn't moved backwards bool CheckSystemTime(); // Perform protocol specific communications port initialization virtual bool InitializeComm() = 0; // Perform protocol specific communications port cleanup virtual bool CleanupComm() = 0; // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) = 0; // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) = 0; // Handle completion of receive data operation void RxComplete( DWORD status, DWORD bytesReceived ); // Handle the response timer expiring void RxTimeout(); // Handle completion of transmit data operation virtual void TxComplete(); // Handle a transmission error void TxError(); /* Underlying communications object */ cComm mComm; /* Rx callback */ cProtocolServerRxCallback mRxCallback; /* ID of Schedule thread */ pthread_t mScheduleThreadID; // ScheduleThread signal event cEvent mThreadScheduleEvent; // Schedule mutex // Ensures exclusive access to mRequestSchedule pthread_mutex_t mScheduleMutex; // Is the thread in the process of exiting? // (no new commands will be accepted) bool mbExiting; /* Client/server thread control object */ sSharedBuffer * mpServerControl; /* Protocol request schedule (scheduled time/request ID) */ typedef std::pair tSchedule; std::set < tSchedule, std::less > mRequestSchedule; /* Last system time value (used to check for time changes) */ timespec mLastTime; /* Protocol request map (request ID mapped to internal req/rsp struct) */ std::map mRequestMap; /* Last assigned request ID */ ULONG mLastRequestID; /* Current request being processed */ sProtocolReqRsp * mpActiveRequest; /* Absolute timeout for mpActiveRequest based on when write was completed */ timespec mActiveRequestTimeout; /* Data buffer for incoming data */ BYTE * mpRxBuffer; /* Size of above buffer (i.e. how much data to read in at once) */ ULONG mRxBufferSize; /* Protocol type for incoming/outgoing data*/ eProtocolType mRxType; eProtocolType mTxType; /* Protocol log */ cProtocolLog mLog; // Get a lock on ScheduleMutex bool GetScheduleMutex(); // Release lock on ScheduleMutex // Signal ScheduleThread if desired bool ReleaseScheduleMutex( bool bSignalThread = true ); // Schedule Thread gets full access friend void * ScheduleThread( PVOID pArg ); // Callback objects get full access friend class cProtocolServerRxCallback; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/QMIBuffers.cpp000077500000000000000000000241721455567757300233040ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.cpp DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQMIServiceBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQMIServiceBuffer (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::sQMIServiceBuffer( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQMIServiceBuffer::Validate(); } /*=========================================================================== METHOD: ~sQMIServiceBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::~sQMIServiceBuffer() { // Nothing to do } /*=========================================================================== METHOD: GetResult (Public Method) DESCRIPTION: Return contents of mandatory result content PARAMETERS: returnCode [ I ] - The return code (should be eQMIResultCode) errorCode [ I ] - The error code (should be eQMIErrorCode) RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::GetResult( ULONG & returnCode, ULONG & errorCode ) { if (IsResponse() == false) { return false; } std::map ::const_iterator pIter; pIter = mContents.find( QMI_TLV_ID_RESULT ); if (pIter == mContents.end()) { return false; } const sQMIRawContentHeader * pContent = pIter->second; if (pContent == 0) { ASSERT( 0 ); return false; } if (pContent->mLength != 4) { return false; } const WORD * pData = (const WORD *)(++pContent); returnCode = (ULONG)*pData++; errorCode = (ULONG)*pData; return true; } /*=========================================================================== METHOD: BuildBuffer (Static Public Method) DESCRIPTION: Build a QMI request PARAMETERS: serviceType [ I ] - QMI service type msgID [ I ] - The QMI message request ID bResponse [ I ] - Build a response? bIndication [ I ] - Build an indication? pPayload [ I ] - Payload payloadLen [ I ] - Size of above payload RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQMIServiceBuffer::BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse, bool bIndication, const BYTE * pPayload, ULONG payloadLen ) { const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG totalHdrSz = szTransHdr + szMsgHdr; // Truncate payload? if (payloadLen > (QMI_MAX_BUFFER_SIZE - totalHdrSz)) { payloadLen = QMI_MAX_BUFFER_SIZE - totalHdrSz; } // Make sure length agrees with pointer if (pPayload == 0) { payloadLen = 0; } // Allocate buffer PBYTE pBuffer = new BYTE[payloadLen + totalHdrSz]; if (pBuffer == 0) { return 0; } // Format header sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)&pBuffer[0]; pHdr->mCompound = 0; pHdr->mResponse = 0; pHdr->mIndication = 0; pHdr->mReserved = 0; pHdr->mTransactionID = 1; bool bTX = true; if (bResponse == true) { pHdr->mResponse = 1; bTX = false; } else if (bIndication == true) { pHdr->mIndication = 1; bTX = false; } pHdr++; // Format message header sQMIRawMessageHeader * pMsg = 0; pMsg = (sQMIRawMessageHeader *)pHdr; pMsg->mMessageID = msgID; pMsg->mLength = (WORD)payloadLen; // Copy in payload? if (payloadLen > 0 && pPayload != 0) { memcpy( (LPVOID)&pBuffer[totalHdrSz], (LPCVOID)&pPayload[0], (SIZE_T)payloadLen ); } // Compute total size ULONG sz = payloadLen + totalHdrSz; // Build and return the shared buffer eProtocolType pt = MapQMIServiceToProtocol( serviceType, bTX ); sSharedBuffer * pBuf = new sSharedBuffer( sz, pBuffer, pt ); return pBuf; } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (IsQMIProtocol( pt ) == false) { mbValid = bRC; return bRC; } const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szContentHdr = (ULONG)sizeof(sQMIRawContentHeader); // Must be enough space for both headers ULONG sz = GetSize(); if (sz < szTransHdr + szMsgHdr) { mbValid = bRC; return bRC; } const BYTE * pBuffer = GetBuffer(); // Obtain transaction header const sQMIServiceRawTransactionHeader * pTransHdr = 0; pTransHdr = (const sQMIServiceRawTransactionHeader *)pBuffer; pBuffer += szTransHdr; // This is required to be 0 if (pTransHdr->mCompound != 0) { mbValid = bRC; return bRC; } // These are mutually exclusive if (pTransHdr->mIndication == 1 && pTransHdr->mResponse == 1) { mbValid = bRC; return bRC; } // Requests/responses required valid transaction IDs if ( (pTransHdr->mIndication == 0) && (pTransHdr->mTransactionID == (WORD)INVALID_QMI_TRANSACTION_ID) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 1 || pTransHdr->mIndication == 1) && (IsQMIProtocolRX( pt ) == false) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 0 && pTransHdr->mIndication == 0) && (IsQMIProtocolTX( pt ) == false) ) { mbValid = bRC; return bRC; } // Obtain message header const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (const sQMIRawMessageHeader *)pBuffer; pBuffer += szMsgHdr; // Validate reported length if (sz != ((ULONG)pMsgHdr->mLength + szTransHdr + szMsgHdr)) { mbValid = bRC; return bRC; } // Extract content TLV structures ULONG contentProcessed = 0; ULONG contentSz = (ULONG)pMsgHdr->mLength; while (contentProcessed < contentSz) { const sQMIRawContentHeader * pContent = 0; pContent = (const sQMIRawContentHeader *)pBuffer; ULONG tlvLen = szContentHdr + pContent->mLength; contentProcessed += tlvLen; if (contentProcessed <= contentSz) { mContents[(ULONG)pContent->mTypeID] = pContent; } else { mContents.clear(); mbValid = bRC; return bRC; } pBuffer += tlvLen; } // Validate TLV reported lengths if (contentProcessed != contentSz) { mbValid = bRC; return bRC; } // Success! bRC = true; mbValid = bRC; return mbValid; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/QMIBuffers.h000077500000000000000000000303301455567757300227420ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.h DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMUXHeader sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIEnum.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QMI maximum buffer size (cannot be larger than MAX_SHARED_BUFFER_SIZE) const ULONG QMI_MAX_BUFFER_SIZE = MAX_SHARED_BUFFER_SIZE; // Content ID for mandatory result TLV const ULONG QMI_TLV_ID_RESULT = 2; /*=========================================================================== METHOD: MapQMIServiceToProtocol (Inline Method) DESCRIPTION: Map QMI service type (eQMIService) and direction to a protocol type (eProtocolType) PARAMETERS: serviceType [ I ] - Enum value being mapped bTransmission [ I ] - Is this a transmission (TX vs. RX)? RETURN VALUE: eProtocolType ===========================================================================*/ inline eProtocolType MapQMIServiceToProtocol( eQMIService serviceType, bool bTransmission = true ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid( serviceType ) == false) { return pt; } DWORD tmp = ((DWORD)serviceType * 2) + (DWORD)ePROTOCOL_QMI_CTL_RX; if (bTransmission == true) { tmp++; } if (IsQMIProtocol( (eProtocolType)tmp ) == true) { pt = (eProtocolType)tmp; } return pt; }; /*=========================================================================== METHOD: MapProtocolToQMIService (Inline Method) DESCRIPTION: Map protocol type (eProtocolType) to QMI service type (eQMIService) PARAMETERS: protocolType [ I ] - Enum value being mapped RETURN VALUE: bool ===========================================================================*/ inline eQMIService MapProtocolToQMIService( eProtocolType protocolType ) { eQMIService st = eQMI_SVC_ENUM_BEGIN; if (IsQMIProtocol( protocolType ) == false) { return st; } DWORD tmp = ((DWORD)protocolType - (DWORD)ePROTOCOL_QMI_CTL_RX) / 2; if (IsValid( (eQMIService)tmp ) == true) { st = (eQMIService)tmp; } return st; }; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQMUXHeader // Struct to represent a QMUX transaction header (raw) /*=========================================================================*/ struct sQMUXHeader { public: WORD mLength; BYTE mFlags; BYTE mServiceType; BYTE mClientID; }; /*=========================================================================*/ // Struct sQMIControlRawTransactionHeader // Struct to represent a QMI control transaction header (raw) /*=========================================================================*/ struct sQMIControlRawTransactionHeader { public: BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 6; BYTE mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIServiceRawTransactionHeader // Struct to represent a QMI service transaction header (raw) /*=========================================================================*/ struct sQMIServiceRawTransactionHeader { public: BYTE mCompound : 1; // Is this a compound transaction? BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 5; WORD mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIRawMessageHeader // Struct to represent a QMI (control/service) message header (raw) /*=========================================================================*/ struct sQMIRawMessageHeader { public: WORD mMessageID; // Message ID WORD mLength; // Length of message (not including this header) }; /*=========================================================================*/ // Struct sQMIRawContentHeader // Struct to represent a QMI (control/service) content // (i.e Type/Length/Value, TLV) header (raw) /*=========================================================================*/ struct sQMIRawContentHeader { public: BYTE mTypeID; // Content type ID WORD mLength; // Content length (not including this header) }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQMIServiceBuffer // Struct to represent a QMI service channel request/response/indication // (shared buffer) /*=========================================================================*/ struct sQMIServiceBuffer : public sProtocolBuffer { public: // Constructor sQMIServiceBuffer( sSharedBuffer * pBuffer ); // Destructor virtual ~sQMIServiceBuffer(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bRequest = (pHdr->mResponse == 0 && pHdr->mIndication == 0); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bResponse = (pHdr->mResponse == 1); } return bResponse; }; // (Inline) Is this an indication? bool IsIndication() const { bool bInd = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bInd = (pHdr->mIndication == 1); } return bInd; }; // (Inline) Return raw header const sQMIServiceRawTransactionHeader * GetHeader() const { const sQMIServiceRawTransactionHeader * pHdr = 0; if (IsValid() == true) { pHdr = (const sQMIServiceRawTransactionHeader *)GetBuffer(); } return pHdr; }; // (Inline) Return the message ID ULONG GetMessageID() const { ULONG id = (ULONG)0xffffffff; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; id = pMsgHdr->mMessageID; } return id; }; // (Inline) Return the transaction ID WORD GetTransactionID() const { WORD id = (WORD)INVALID_QMI_TRANSACTION_ID; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { id = pHdr->mTransactionID; } return id; }; // (Inline) Return raw content array const sQMIRawContentHeader * GetRawContents( ULONG & contentLen ) const { // Assume failure ULONG len = 0; const sQMIRawContentHeader * pRaw = 0; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; len = pMsgHdr->mLength; pMsgHdr++; if (len > 0) { pRaw = (const sQMIRawContentHeader *)pMsgHdr; } } contentLen = len; return pRaw; }; // (Inline) Return content structures std::map GetContents() const { return mContents; }; // Return contents of mandatory result content bool GetResult( ULONG & returnCode, ULONG & errorCode ); // Build a QMI request/response/indication static sSharedBuffer * BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse = false, bool bIndication = false, const BYTE * pData = 0, ULONG dataLen = 0 ); protected: // QMI protocol server has to be able to set the transaction ID friend class cQMIProtocolServer; // Set the transaction ID void SetTransactionID( WORD tid ) const { if (tid == (WORD)INVALID_QMI_TRANSACTION_ID || IsValid() == false) { return; } sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)GetHeader(); if (pHdr != 0) { pHdr->mTransactionID = tid; } }; // Is this QMI request/response/indication packet valid? virtual bool Validate(); /* Content TLV structures (indexed by type ID) */ std::map mContents; private: // Prevent 'upcopying' sQMIServiceBuffer( const sProtocolBuffer & ); sQMIServiceBuffer & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/QMIEnum.h000077500000000000000000002214721455567757300222630ustar00rootroot00000000000000/*=========================================================================== FILE: QMIEnum.h DESCRIPTION: QMI protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQMIService eQMIMessageCTL eQMIMessageWDS eQMIMessageDMS eQMIMessageNAS eQMIMessageWMS eQMIMessagePDS eQMIMessageAUTH eQMIMessageAT eQMIMessageVoice eQMIMessageUIM eQMIMessagePBM eQMIMessageSAR eQMIMessageRMTFS eQMIMessageCAT eQMIMessageRMS eQMIMessageOMA eQMIResultCode eQMIErrorCode eQMICallEndReason eIPAddressType eSMSMessageMode Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid QMI transaction ID const ULONG INVALID_QMI_TRANSACTION_ID = 0; // QMI DMS PRL size constants const ULONG QMI_DMS_MAX_PRL_SIZE = 16384; const ULONG QMI_DMS_MAX_PRL_BLOCK = 256; /*=========================================================================*/ // eQMIService Enumeration // QMI Service Type Enumeration /*=========================================================================*/ enum eQMIService { eQMI_SVC_ENUM_BEGIN = -1, eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_RESERVED_13, // 013 Reserved eQMI_SVC_RESERVED_14, // 014 Reserved eQMI_SVC_RESERVED_15, // 015 Reserved eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_RESERVED_18, // 018 Reserved eQMI_SVC_RESERVED_19, // 019 Reserved eQMI_SVC_RMTFS, // 020 Remote file system service eQMI_SVC_RESERVED_21, // 021 Reserved eQMI_SVC_RESERVED_22, // 022 Reserved eQMI_SVC_RESERVED_23, // 023 Reserved eQMI_SVC_RESERVED_24, // 024 Reserved eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service eQMI_SVC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIService validity check PARAMETERS: svc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIService svc ) { bool retVal = false; if ( (svc > eQMI_SVC_ENUM_BEGIN && svc <= eQMI_SVC_RESERVED_24) || (svc >= eQMI_SVC_CAT && svc < eQMI_SVC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCTL Enumeration // QMI Control Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCTL { eQMI_CTL_ENUM_BEGIN = -1, eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode eQMI_CTL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCTL validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCTL msgID ) { bool retVal = false; if (msgID >= eQMI_CTL_SET_INSTANCE_ID && msgID < eQMI_CTL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDS Enumeration // QMI WDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDS { eQMI_WDS_ENUM_BEGIN = -1, eQMI_WDS_RESET, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_START_NET = 32, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_AUTOCONNECT = 81, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_GET_DATA_SYS = 105, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDS msgID ) { bool retVal = false; if ( (msgID > eQMI_WDS_ENUM_BEGIN && msgID <= eQMI_WDS_ABORT) || (msgID >= eQMI_WDS_START_NET && msgID <= eQMI_WDS_GET_DORMANCY) || (msgID >= eQMI_WDS_GET_AUTOCONNECT && msgID <= eQMI_WDS_MODEM_INFO_IND) || (msgID >= eQMI_WDS_GET_ACTIVE_MIP && msgID <= eQMI_WDS_SET_IP_FAMILY) || (msgID >= eQMI_WDS_SET_AUTOCONNECT && msgID <= eQMI_WDS_PENDING_DUN_CTRL) || (msgID >= eQMI_WDS_GET_DATA_SYS && msgID < eQMI_WDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageDMS Enumeration // QMI DMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageDMS { eQMI_DMS_ENUM_BEGIN = -1, eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageDMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageDMS msgID ) { bool retVal = false; if ( (msgID > eQMI_DMS_ENUM_BEGIN && msgID <= eQMI_DMS_EVENT_IND) || (msgID >= eQMI_DMS_GET_CAPS && msgID < eQMI_DMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageNAS Enumeration // QMI NAS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageNAS { eQMI_NAS_ENUM_BEGIN = -1, eQMI_NAS_RESET, // 00 Reset NAS service state variables eQMI_NAS_ABORT, // 01 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 02 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 02 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 03 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 32 Get the signal strength eQMI_NAS_SCAN_NETS, // 33 Scan for visible network eQMI_NAS_REGISTER_NET, // 34 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 35 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 36 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 36 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 37 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 38 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 39 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 40 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 41 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 42 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 43 Get the technology preference eQMI_NAS_GET_ACCOLC, // 44 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 45 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 46 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 47 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 48 Set various network parameters eQMI_NAS_GET_RF_INFO, // 49 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 50 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 51 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 52 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 52 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 55 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 56 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 56 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 57 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 58 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 59 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 60 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 61 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 62 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 63 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 64 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 65 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 66 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 67 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 68 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 69 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 70 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 71 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 72 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 73 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 75 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 76 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 77 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 78 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 79 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 80 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 81 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 82 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 83 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 84 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 85 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 86 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 87 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 88 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 89 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 90 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 91 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 92 Get dual standby preference eQMI_NAS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageNAS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageNAS msgID ) { bool retVal = false; if ( (msgID > eQMI_NAS_ENUM_BEGIN && msgID <= eQMI_NAS_SET_REG_EVENT) || (msgID >= eQMI_NAS_GET_RSSI && msgID <= eQMI_NAS_SYS_SELECT_IND) || (msgID >= eQMI_NAS_SET_DDTM_PREF && msgID <= eQMI_NAS_GET_MODE_PREF) || (msgID >= eQMI_NAS_SET_DSB_PREF && msgID < eQMI_NAS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWMS Enumeration // QMI WMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWMS { eQMI_WMS_ENUM_BEGIN = -1, eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWMS msgID ) { bool retVal = false; if ( (msgID > eQMI_WMS_ENUM_BEGIN && msgID <= eQMI_WMS_EVENT_IND) || (msgID >= eQMI_WMS_RAW_SEND && msgID <= eQMI_WMS_DELETE) || (msgID >= eQMI_WMS_GET_MSG_PROTOCOL && msgID < eQMI_WMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDS Enumeration // QMI PDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDS { eQMI_PDS_ENUM_BEGIN = -1, eQMI_PDS_RESET, // 00 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 01 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 01 PDS report indication eQMI_PDS_GET_STATE = 32, // 32 Return PDS service state eQMI_PDS_STATE_IND = 32, // 32 PDS service state indication eQMI_PDS_SET_STATE, // 33 Set PDS service state eQMI_PDS_START_SESSION, // 34 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 35 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 36 Manual tracking session position eQMI_PDS_END_SESSION, // 37 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 38 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 39 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 40 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 41 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 42 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 43 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 44 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 45 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 46 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 47 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 48 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 49 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 50 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 51 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 52 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 53 Request single position fix eQMI_PDS_GET_VERSION, // 54 Get PDS service version eQMI_PDS_INJECT_XTRA, // 55 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 56 Inject position data eQMI_PDS_INJECT_WIFI, // 57 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 58 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 59 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 60 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 61 Inject absolute time eQMI_PDS_INJECT_EFS, // 62 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 63 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 64 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 65 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 66 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 67 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 68 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 69 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 70 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 70 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 71 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 72 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 72 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 73 Force receiver off eQMI_PDS_GET_METHODS = 80, // 80 Get GPS position methods state eQMI_PDS_SET_METHODS, // 81 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 82 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 83 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 84 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 85 Set sensor config eQMI_PDS_GET_NAV_CFG, // 86 Get navigation config eQMI_PDS_SET_NAV_CFG, // 87 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 90 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 91 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 91 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 92 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 93 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 94 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 95 Set cell database control eQMI_PDS_READY_IND, // 96 Ready indication eQMI_PDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDS msgID ) { bool retVal = false; if ( (msgID > eQMI_PDS_ENUM_BEGIN && msgID <= eQMI_PDS_EVENT_IND) || (msgID >= eQMI_PDS_GET_STATE && msgID <= eQMI_PDS_FORCE_RECEIVER_OFF) || (msgID >= eQMI_PDS_GET_METHODS && msgID <= eQMI_PDS_SET_NAV_CFG) || (msgID >= eQMI_PDS_SET_WLAN_BLANK && msgID < eQMI_PDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAUTH Enumeration // QMI Authentication Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAUTH { eQMI_AUTH_ENUM_BEGIN = -1, eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND, // 38 AKA algorithm result indication eQMI_AUTH_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAUTH validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAUTH msgID ) { bool retVal = false; if (msgID >= eQMI_AUTH_START_EAP && msgID < eQMI_AUTH_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAT Enumeration // QMI AT Command Processor Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAT { eQMI_AT_ENUM_BEGIN = -1, eQMI_AT_RESET, // 00 Reset AT service state variables eQMI_AT_REG_COMMANDS = 32, // 32 Register AT commands to be forwarded eQMI_AT_COMMAND_IND, // 33 AT command indication eQMI_AT_SEND_RESPONSE, // 34 Send the response to an AT command eQMI_AT_ABORT_IND, // 35 AT command abort indication eQMI_AT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAT msgID ) { bool retVal = false; if ( (msgID == eQMI_AT_RESET) || (msgID >= eQMI_AT_REG_COMMANDS && msgID < eQMI_AT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageVoice Enumeration // QMI Voice Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageVoice { eQMI_VOICE_ENUM_BEGIN = -1, eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls eQMI_VOICE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageVoice validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageVoice msgID ) { bool retVal = false; if ( (msgID == eQMI_VOICE_INDICATION_REG) || (msgID >= eQMI_VOICE_CALL_ORIGINATE && msgID <= eQMI_VOICE_CALL_ANSWER) || (msgID >= eQMI_VOICE_GET_CALL_INFO && msgID <= eQMI_VOICE_GET_ALL_STATUS) || (msgID >= eQMI_VOICE_MANAGE_CALLS && msgID < eQMI_VOICE_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageUIM Enumeration // QMI UIM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageUIM { eQMI_UIM_ENUM_BEGIN = -1, eQMI_UIM_RESET, // 00 Reset eQMI_UIM_READ_TRANSPARENT = 32, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR eQMI_UIM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageUIM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageUIM msgID ) { bool retVal = false; if ( (msgID == eQMI_UIM_RESET) || (msgID >= eQMI_UIM_READ_TRANSPARENT && msgID < eQMI_UIM_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePBM Enumeration // QMI PBM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePBM { eQMI_PBM_ENUM_BEGIN = -1, eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePBM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePBM msgID ) { bool retVal = false; if (msgID >= eQMI_PBM_INDICATION_REG && msgID < eQMI_PBM_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageLOC Enumeration // QMI LOC Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageLOC { eQMI_LOC_ENUM_BEGIN = -1, eQMI_LOC_CLIENT_REVISION = 32, // 32 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 33 Register for events/indications eQMI_LOC_START, // 34 Start GPS session eQMI_LOC_STOP, // 35 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 36 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 37 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 38 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 39 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 40 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 41 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 42 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 43 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 44 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 45 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 46 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 47 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 48 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 49 Server connection req indication eQMI_LOC_GET_REV_REQ, // 50 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 50 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 51 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 51 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 52 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 52 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 53 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 53 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 54 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 54 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 55 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 55 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 56 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 56 Inject UTC time indication eQMI_LOC_INJECT_POS, // 57 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 57 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 58 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 58 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 59 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 59 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 60 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 60 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 61 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 61 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 62 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 62 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 63 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 63 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 64 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 64 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 65 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 65 Get low power mode config indication eQMI_LOC_SET_SERVER, // 66 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 66 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 67 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 67 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 68 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 68 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 69 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 69 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 70 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 70 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 71 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 71 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 72 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 72 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 73 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 73 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 74 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 74 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 75 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 75 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 76 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 76 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 77 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 77 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 78 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 78 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 79 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 79 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 80 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 80 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 81 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 81 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 82 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 82 Get external power config indication eQMI_LOC_INFORM_CONN, // 83 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 83 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 84 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 84 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 85 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 85 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 86 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 86 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 87 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 87 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 88 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 88 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 89 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 89 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 90 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 90 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 91 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 91 Get sensor performance control ind eQMI_LOC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageLOC validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageLOC msgID ) { bool retVal = false; if (msgID >= eQMI_LOC_CLIENT_REVISION && msgID < eQMI_LOC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageSAR Enumeration // QMI SAR Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageSAR { eQMI_SAR_ENUM_BEGIN = -1, eQMI_SAR_SET_RF_SAR_STATE = 1, // 01 Set the RF SAR state eQMI_SAR_GET_RF_SAR_STATE, // 02 Get the RF SAR state eQMI_SAR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageSAR validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageSAR msgID ) { bool retVal = false; if (msgID >= eQMI_SAR_SET_RF_SAR_STATE && msgID < eQMI_SAR_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMTFS Enumeration // QMI Remote Filesystem Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMTFS { eQMI_RMTFS_ENUM_BEGIN = -1, eQMI_RMTFS_OPEN = 1, // 01 Request an open eQMI_RMTFS_CLOSE, // 02 Request a close eQMI_RMTFS_IO_VECTOR, // 03 Request an I/O vector operation eQMI_RMTFS_ALLOC_BUFFER, // 04 Allocate a buffer eQMI_RMTFS_GET_DEV_ERROR, // 05 Return device error for last request eQMI_RMTFS_FORCE_SYNC_IND, // 06 Force sync indication eQMI_RMTFS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMTFS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMTFS msgID ) { bool retVal = false; if (msgID >= eQMI_RMTFS_OPEN && msgID < eQMI_RMTFS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCAT Enumeration // QMI CAT Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCAT { eQMI_CAT_ENUM_BEGIN = -1, eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCAT msgID ) { bool retVal = false; if ( (msgID > eQMI_CAT_ENUM_BEGIN && msgID <= eQMI_CAT_EVENT_IND) || (msgID >= eQMI_CAT_GET_STATE && msgID < eQMI_CAT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMS Enumeration // QMI RMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMS { eQMI_RMS_ENUM_BEGIN = -1, eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE, // 33 Set SMS wake settings eQMI_RMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMS msgID ) { bool retVal = false; if ( (msgID == eQMI_RMS_RESET) || (msgID >= eQMI_RMS_GET_SMS_WAKE && msgID < eQMI_RMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageOMA Enumeration // QMI OMA-DM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageOMA { eQMI_OMA_ENUM_BEGIN = -1, eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES, // 37 Set feature settings eQMI_OMA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageOMA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageOMA msgID ) { bool retVal = false; if ( (msgID > eQMI_OMA_ENUM_BEGIN && msgID <= eQMI_OMA_EVENT_IND) || (msgID >= eQMI_OMA_START_SESSION && msgID < eQMI_OMA_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIResultCode Enumeration // QMI Result Code Enumeration /*=========================================================================*/ enum eQMIResultCode { eQMI_RC_ENUM_BEGIN = -1, eQMI_RC_SUCCESS, // 00 Success eQMI_RC_ERROR, // 01 Error eQMI_RC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIResultCode validity check PARAMETERS: rc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIResultCode rc ) { bool retVal = false; if (rc > eQMI_RC_ENUM_BEGIN && rc < eQMI_RC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIErrorCode Enumeration // QMI Error Code Enumeration /*=========================================================================*/ enum eQMIErrorCode { eQMI_ERR_ENUM_BEGIN = -1, eQMI_ERR_NONE, // 00 eQMI_ERR_MALFORMED_MSG, // 01 eQMI_ERR_NO_MEMORY, // 02 eQMI_ERR_INTERNAL, // 03 eQMI_ERR_ABORTED, // 04 eQMI_ERR_CLIENT_IDS_EXHAUSTED, // 05 eQMI_ERR_UNABORTABLE_TRANSACTION, // 06 eQMI_ERR_INVALID_CLIENT_ID, // 07 eQMI_ERR_NO_THRESHOLDS, // 08 eQMI_ERR_INVALID_HANDLE, // 09 eQMI_ERR_INVALID_PROFILE, // 10 eQMI_ERR_INVALID_PIN_ID, // 11 eQMI_ERR_INCORRECT_PIN, // 12 eQMI_ERR_NO_NETWORK_FOUND, // 13 eQMI_ERR_CALL_FAILED, // 14 eQMI_ERR_OUT_OF_CALL, // 15 eQMI_ERR_NOT_PROVISIONED, // 16 eQMI_ERR_MISSING_ARG, // 17 eQMI_ERR_18, // 18 eQMI_ERR_ARG_TOO_LONG, // 19 eQMI_ERR_20, // 20 eQMI_ERR_21, // 21 eQMI_ERR_INVALID_TX_ID, // 22 eQMI_ERR_DEVICE_IN_USE, // 23 eQMI_ERR_OP_NETWORK_UNSUPPORTED, // 24 eQMI_ERR_OP_DEVICE_UNSUPPORTED, // 25 eQMI_ERR_NO_EFFECT, // 26 eQMI_ERR_NO_FREE_PROFILE, // 27 eQMI_ERR_INVALID_PDP_TYPE, // 28 eQMI_ERR_INVALID_TECH_PREF, // 29 eQMI_ERR_INVALID_PROFILE_TYPE, // 30 eQMI_ERR_INVALID_SERVICE_TYPE, // 31 eQMI_ERR_INVALID_REGISTER_ACTION, // 32 eQMI_ERR_INVALID_PS_ATTACH_ACTION, // 33 eQMI_ERR_AUTHENTICATION_FAILED, // 34 eQMI_ERR_PIN_BLOCKED, // 35 eQMI_ERR_PIN_ALWAYS_BLOCKED, // 36 eQMI_ERR_UIM_UNINITIALIZED, // 37 eQMI_ERR_MAX_QOS_REQUESTS_IN_USE, // 38 eQMI_ERR_INCORRECT_FLOW_FILTER, // 39 eQMI_ERR_NETWORK_QOS_UNAWARE, // 40 eQMI_ERR_INVALID_QOS_ID, // 41 eQMI_ERR_REQUESTED_NUM_UNSUPPORTED, // 42 eQMI_ERR_INTERFACE_NOT_FOUND, // 43 eQMI_ERR_FLOW_SUSPENDED, // 44 eQMI_ERR_INVALID_DATA_FORMAT, // 45 eQMI_ERR_GENERAL, // 46 eQMI_ERR_UNKNOWN, // 47 eQMI_ERR_INVALID_ARG, // 48 eQMI_ERR_INVALID_INDEX, // 49 eQMI_ERR_NO_ENTRY, // 50 eQMI_ERR_DEVICE_STORAGE_FULL, // 51 eQMI_ERR_DEVICE_NOT_READY, // 52 eQMI_ERR_NETWORK_NOT_READY, // 53 eQMI_ERR_WMS_CAUSE_CODE, // 54 eQMI_ERR_WMS_MESSAGE_NOT_SENT, // 55 eQMI_ERR_WMS_MESSAGE_DELIVERY_FAILURE, // 56 eQMI_ERR_WMS_INVALID_MESSAGE_ID, // 57 eQMI_ERR_WMS_ENCODING, // 58 eQMI_ERR_AUTHENTICATION_LOCK, // 59 eQMI_ERR_INVALID_TRANSITION, // 60 eQMI_ERR_61, // 61 eQMI_ERR_62, // 62 eQMI_ERR_63, // 63 eQMI_ERR_64, // 64 eQMI_ERR_SESSION_INACTIVE, // 65 eQMI_ERR_SESSION_INVALID, // 66 eQMI_ERR_SESSION_OWNERSHIP, // 67 eQMI_ERR_INSUFFICIENT_RESOURCES, // 68 eQMI_ERR_DISABLED, // 69 eQMI_ERR_INVALID_OPERATION, // 70 eQMI_ERR_INVALID_QMI_CMD, // 71 eQMI_ERR_WMS_TPDU_TYPE, // 72 eQMI_ERR_WMS_SMSC_ADDR, // 73 eQMI_ERR_INFO_UNAVAILABLE, // 74 eQMI_ERR_SEGMENT_TOO_LONG, // 75 eQMI_ERR_SEGMENT_ORDER, // 76 eQMI_ERR_BUNDLING_NOT_SUPPORTED, // 77 eQMI_ERR_78, // 78 eQMI_ERR_POLICY_MISMATCH, // 79 eQMI_ERR_SIM_FILE_NOT_FOUND, // 80 eQMI_ERR_EXTENDED_EXTERNAL, // 81 eQMI_ERR_ACCESS_DENIED, // 82 eQMI_ERR_HARDWARE_RESTRICTED, // 83 eQMI_ERR_ACK_NOT_SENT, // 84 eQMI_ERR_INCOMPATIBLE_STATE = 90, // 90 eQMI_ERR_FDN_RESTRICT, // 91 eQMI_ERR_SUPS_FAILURE_CAUSE, // 92 eQMI_ERR_NO_RADIO, // 93 eQMI_ERR_NOT_SUPPORTED, // 94 eQMI_ERR_CARD_CALL_CONTROL_FAILED = 96, // 96 eQMI_ERR_NETWORK_ABORTED, // 97 eQMI_ERR_CAT_EVT_REG_FAILED, // 61441 eQMI_ERR_CAT_INVALID_TR, // 61442 eQMI_ERR_CAT_INVALID_ENV_CMD, // 61443 eQMI_ERR_CAT_ENV_CMD_BUSY, // 61444 eQMI_ERR_CAT_ENV_CMD_FAIL, // 61445 eQMI_ERR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIErrorCode validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIErrorCode ec ) { bool retVal = false; if ( (ec > eQMI_ERR_ENUM_BEGIN && ec <= eQMI_ERR_ACK_NOT_SENT) || (ec >= eQMI_ERR_INCOMPATIBLE_STATE && ec <= eQMI_ERR_NOT_SUPPORTED) || (ec == eQMI_ERR_CARD_CALL_CONTROL_FAILED) || (ec == eQMI_ERR_NETWORK_ABORTED) || (ec >= eQMI_ERR_CAT_EVT_REG_FAILED && ec < eQMI_ERR_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMICallEndReason Enumeration // QMI Call End Reason Enumeration /*=========================================================================*/ enum eQMICallEndReason { eQMI_CALL_END_REASON_BEGIN = -1, // General eQMI_CALL_END_REASON_UNSPECIFIED = 1, // 1 eQMI_CALL_END_REASON_CLIENT_END, // 2 eQMI_CALL_END_REASON_NO_SRV, // 3 eQMI_CALL_END_REASON_FADE, // 4 eQMI_CALL_END_REASON_REL_NORMAL, // 5 eQMI_CALL_END_REASON_ACC_IN_PROG, // 6 eQMI_CALL_END_REASON_ACC_FAIL, // 7 eQMI_CALL_END_REASON_REDIR_OR_HANDOFF, // 8 eQMI_CALL_END_REASON_CLOSE_IN_PROGRESS, // 9 eQMI_CALL_END_REASON_AUTH_FAILED, // 10 eQMI_CALL_END_REASON_INTERNAL, // 11 // CDMA eQMI_CALL_END_REASON_CDMA_LOCK = 500, // 500 eQMI_CALL_END_REASON_INTERCEPT, // 501 eQMI_CALL_END_REASON_REORDER, // 502 eQMI_CALL_END_REASON_REL_SO_REJ, // 503 eQMI_CALL_END_REASON_INCOM_CALL, // 504 eQMI_CALL_END_REASON_ALERT_STOP, // 505 eQMI_CALL_END_REASON_ACTIVATION, // 506 eQMI_CALL_END_REASON_MAX_ACCESS_PROBE, // 507 eQMI_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS, // 508 eQMI_CALL_END_REASON_NO_RESPONSE_FROM_BS, // 509 eQMI_CALL_END_REASON_REJECTED_BY_BS, // 510 eQMI_CALL_END_REASON_INCOMPATIBLE, // 511 eQMI_CALL_END_REASON_ALREADY_IN_TC, // 512 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_GPS, // 513 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_SMS, // 514 eQMI_CALL_END_REASON_NO_CDMA_SRV, // 515 // GSM/WCDMA eQMI_CALL_END_REASON_CONF_FAILED = 1000, // 1000 eQMI_CALL_END_REASON_INCOM_REJ, // 1001 eQMI_CALL_END_REASON_NO_GW_SRV, // 1002 eQMI_CALL_END_REASON_NETWORK_END, // 1003 eQMI_CALL_END_REASON_LLC_SNDCP_FAILURE, // 1004 eQMI_CALL_END_REASON_INSUFFICIENT_RESOURCES, // 1005 eQMI_CALL_END_REASON_OPTION_TEMP_OOO, // 1006 eQMI_CALL_END_REASON_NSAPI_ALREADY_USED, // 1007 eQMI_CALL_END_REASON_REGULAR_DEACTIVATION, // 1008 eQMI_CALL_END_REASON_NETWORK_FAILURE, // 1009 eQMI_CALL_END_REASON_UMTS_REATTACH_REQ, // 1010 eQMI_CALL_END_REASON_UMTS_PROTOCOL_ERROR, // 1011 eQMI_CALL_END_REASON_OPERATOR_BARRING, // 1012 eQMI_CALL_END_REASON_UNKNOWN_APN, // 1013 eQMI_CALL_END_REASON_UNKNOWN_PDP, // 1014 eQMI_CALL_END_REASON_GGSN_REJECT, // 1015 eQMI_CALL_END_REASON_ACTIVATION_REJECT, // 1016 eQMI_CALL_END_REASON_OPTION_NOT_SUPPORTED, // 1017 eQMI_CALL_END_REASON_OPTION_UNSUBSCRIBED, // 1018 eQMI_CALL_END_REASON_QOS_NOT_ACCEPTED, // 1019 eQMI_CALL_END_REASON_TFT_SEMANTIC_ERROR, // 1020 eQMI_CALL_END_REASON_TFT_SYNTAX_ERROR, // 1021 eQMI_CALL_END_REASON_UNKNOWN_PDP_CONTEXT, // 1022 eQMI_CALL_END_REASON_FILTER_SEMANTIC_ERROR, // 1023 eQMI_CALL_END_REASON_FILTER_SYNTAX_ERROR, // 1024 eQMI_CALL_END_REASON_PDP_WITHOUT_ACTIVE_TFT, // 1025 eQMI_CALL_END_REASON_INVALID_TRANSACTION_ID, // 1026 eQMI_CALL_END_REASON_MESSAGE_SEMANTIC_ERROR, // 1027 eQMI_CALL_END_REASON_INVALID_MANDATORY_INFO, // 1028 eQMI_CALL_END_REASON_TYPE_UNSUPPORTED, // 1029 eQMI_CALL_END_REASON_MSG_TYPE_WRONG_FOR_STATE, // 1030 eQMI_CALL_END_REASON_UNKNOWN_INFO_ELEMENT, // 1031 eQMI_CALL_END_REASON_CONDITIONAL_IE_ERROR, // 1032 eQMI_CALL_END_REASON_MSG_WRONG_FOR_PROTOCOL, // 1033 eQMI_CALL_END_REASON_APN_TYPE_CONFLICT, // 1034 eQMI_CALL_END_REASON_NO_GPRS_CONTEXT, // 1035 eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED, // 1036 // CDMA 1xEV-DO (HDR) eQMI_CALL_END_REASON_CD_GEN_OR_BUSY = 1500, // 1500 eQMI_CALL_END_REASON_CD_BILL_OR_AUTH, // 1501 eQMI_CALL_END_REASON_CHG_HDR, // 1502 eQMI_CALL_END_REASON_EXIT_HDR, // 1503 eQMI_CALL_END_REASON_HDR_NO_SESSION , // 1504 eQMI_CALL_END_REASON_HDR_ORIG_DURING_GPS_FIX, // 1505 eQMI_CALL_END_REASON_HDR_CS_TIMEOUT , // 1506 eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM, // 1507 eQMI_CALL_END_REASON_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMICallEndReason validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMICallEndReason err ) { if ( (err >= eQMI_CALL_END_REASON_UNSPECIFIED) && (err <= eQMI_CALL_END_REASON_INTERNAL) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CDMA_LOCK) && (err <= eQMI_CALL_END_REASON_NO_CDMA_SRV) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CONF_FAILED) && (err <= eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CD_GEN_OR_BUSY) && (err <= eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM) ) { return true; } return false; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/QMIProtocolServer.cpp000077500000000000000000000253421455567757300247000ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIProtocolServer.h" #include "QMIBuffers.h" /*=========================================================================*/ // cQMIProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQMIProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: serviceType [ I ] - QMI service type requested bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( MapQMIServiceToProtocol( serviceType, false ), MapQMIServiceToProtocol( serviceType, true ), bufferSzRx, logSz ), mLastTID( (WORD)INVALID_QMI_TRANSACTION_ID ), mService( serviceType ) { // Nothing to do } /*=========================================================================== METHOD: ~cQMIProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::~cQMIProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the configured QMI service using the given QMI control file PARAMETERS: pControlFile [ I ] - QMI control file SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::Connect( LPCSTR pControlFile ) { // Assume failure bool bRC = false; if (IsValid( mService ) == false || mService == eQMI_SVC_CONTROL) { return bRC; } // Pass service file to base class for actual connection bRC = cProtocolServer::Connect( pControlFile ); if (bRC == false) { TRACE( "QMI connect %d failed\n", mService ); } return bRC; } /*=========================================================================== METHOD: ValidateRequest (Internal Method) DESCRIPTION: Validate a request that is about to be scheduled SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::ValidateRequest( const sProtocolRequest & req ) { if (cProtocolServer::ValidateRequest( req ) == false) { return false; } sQMIServiceBuffer qmiReq( req.GetSharedBuffer() ); return qmiReq.IsValid(); } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::InitializeComm() { // Setup the QMI Service type int result = mComm.RunIOCTL( QMI_GET_SERVICE_FILE_IOCTL, (void*)(unsigned long)mService ); TRACE( "ioctl status %d\n", result ); if (result == 0) { return true; } else { return false; } } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::CleanupComm() { // Nothing to actually do here return true; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into QMI indications/responses PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response (not used) bAbortTx [ O ] - Response aborts current transmission? (not used) SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cQMIProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; bAbortTx = false; // Something to decode from? if (bytesReceived == 0) { return bRC; } // Set protocol type (we have to be dealing with a valid QMI service) eProtocolType pt = MapQMIServiceToProtocol( mService, false ); if (pt == ePROTOCOL_ENUM_BEGIN) { return bRC; } sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxBuffer, bytesReceived, pt ); if (pTmp != 0) { sQMIServiceBuffer tmpBuf( pTmp ); if (tmpBuf.IsValid() == true) { rspIdx = mLog.AddBuffer( tmpBuf ); if (IsResponse( tmpBuf ) == true) { bRC = true; } else { rspIdx = INVALID_LOG_INDEX; } } } return bRC; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encode data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQMIProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { WORD tid = ++mLastTID; if (tid == (WORD)INVALID_QMI_TRANSACTION_ID) { tid++; } sQMIServiceBuffer tmpBuf( pBuffer ); tmpBuf.SetTransactionID( tid ); // No actual encoding required as we alter the original request bEncoded = false; return 0; }; /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } sQMIServiceBuffer qmiReq( mpActiveRequest->mRequest.GetSharedBuffer() ); sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiReq.IsValid() == false || qmiRsp.IsValid() == false) { return bRC; } if (qmiRsp.IsResponse() == false) { return bRC; } WORD reqID = qmiReq.GetTransactionID(); WORD rspID = qmiRsp.GetTransactionID(); if ( (reqID == (WORD)INVALID_QMI_TRANSACTION_ID) || (rspID == (WORD)INVALID_QMI_TRANSACTION_ID) || (reqID != rspID) ) { return bRC; } // Sadly there are documentated cases of firmware returning responses // with a matching transaction ID but a mismatching message ID. There // is no reason for this to be considered valid behavior as of yet ULONG reqMsgID = qmiReq.GetMessageID(); ULONG rspMsgID = qmiRsp.GetMessageID(); if (reqMsgID != rspMsgID) { return bRC; } bRC = true; return bRC; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/QMIProtocolServer.h000077500000000000000000000106521455567757300243430ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQMIProtocolServer /*=========================================================================*/ class cQMIProtocolServer : public cProtocolServer { public: // Constructor cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQMIProtocolServer(); // Connect to the given QMI service using the configured QMI // control file bool Connect( LPCSTR pControlFile ); // (Inline) Return the QMI service type eQMIService GetServiceType() { return mService; }; protected: // Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ); // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // (Inline) Is the passed in data a response that aborts the // current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & /* rsp */ ) { // QMI doesn't necessarily require this return false; }; /* Current transaction ID */ SHORT mLastTID; /* Type of QMI service we are serving */ eQMIService mService; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/SharedBuffer.cpp000077500000000000000000000247611455567757300237050ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.cpp DESCRIPTION: Shareable protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "SharedBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Synchronization object struct sSharedBufferSync { public: // Constructor sSharedBufferSync() : mbInitialized( false ) { int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to init sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } mbInitialized = true; }; // Destructor ~sSharedBufferSync() { mbInitialized = false; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); } }; // Lock sync object void Lock() { if (mbInitialized == true) { int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to lock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // Unlock sync object void Unlock() { if (mbInitialized == true) { int nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to unlock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; protected: /* DIAG buffer critical section */ pthread_mutex_t mSyncSection; /* Has this object been initialized? */ bool mbInitialized; }; // Global (across all shared buffers) reference count guard sSharedBufferSync gRefCount; /*=========================================================================*/ // sSharedBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (copy passed in buffer) PARAMETERS: pDataToCopy [ I ] - The data buffer to copy (should be non-zero) dataLen [ I ] - The length of the above buffer (should be > 1) dataType [ I ] - Type of data (not used internal to class) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, data actually exists? if (pDataToCopy != 0) { // Yes, try to allocate memory mpData = new BYTE[dataLen]; if (mpData != 0) { // Now copy into our allocation memcpy( (PVOID)mpData, (LPCVOID)pDataToCopy, (SIZE_T)dataLen ); // Now set the size, we do this last so that our double // deletion logic is only applied if we had an allocation // in the first place mSize = dataLen; } } } } /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (assume ownership of passed in buffer) PARAMETERS: dataLen [ I ] - The length of the above buffer (should be > 1) pDataToOwn [ I ] - The data buffer to assume ownership of (should be non-zero) dataType [ I ] - Type of data (not used internal to class) NOTE: The order is intentionally reversed from the previous constructor to avoid any cases of mistaken identity (copy versus assume ownership) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Data actually exists? if (pDataToOwn != 0) { // Yes, length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, assume ownership of the passed in buffer mpData = pDataToOwn; mSize = dataLen; } else { // This data buffer is not acceptable to us, but we have assumed // ownership of the memory which we will now free delete [] pDataToOwn; } } } /*=========================================================================== METHOD: ~sSharedBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sSharedBuffer::~sSharedBuffer() { ASSERT( mRefCount == 0 ); // Buffer data to free? if (mpData != 0) { // Yes, zero first byte for caution and then delete it mpData[0] = 0; delete [] mpData; // Even more caution, zero out pointer mpData = 0; } else if (mSize != 0) { ASSERT( (PVOID)("Double deletion detected in ~sSharedBuffer") == 0 ); } } /*=========================================================================== METHOD: operator == (Public Method) DESCRIPTION: Equality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator == ( const sSharedBuffer & refBuf ) const { // Assume they are not equal bool bEq = false; // The buffers must be the same if (mpData == refBuf.mpData) { if (mSize == refBuf.mSize) { if (mRefCount == refBuf.mRefCount) { if (mType == refBuf.mType) { // The shared buffers are the same bEq = true; } } else { // Very odd - the buffers are the same, but not the ref count?!? ASSERT( 0 ); } } else { // Very odd - the buffers are the same, but not the size?!? ASSERT( 0 ); } } return bEq; } /*=========================================================================== METHOD: operator != (Public Method) DESCRIPTION: Inequality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator != ( const sSharedBuffer & refBuf ) const { if (*this == refBuf) { return false; } return true; } /*=========================================================================== METHOD: AddRef (Internal Method) DESCRIPTION: Increment reference count RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::AddRef() { gRefCount.Lock(); mRefCount++; gRefCount.Unlock(); } /*=========================================================================== METHOD: Release (Internal Method) DESCRIPTION: Release reference, delete if reference count zero RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::Release() { gRefCount.Lock(); ASSERT( mRefCount != 0 ); // Decrement reference count if (mRefCount > 0) { mRefCount--; } // ... and delete if reference count now 0 if (mRefCount == 0) { delete this; } gRefCount.Unlock(); } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/SharedBuffer.h000077500000000000000000000132031455567757300233370ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.h DESCRIPTION: Shareable buffer structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- struct sProtocolBuffer; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum size of a shared buffer const ULONG MAX_SHARED_BUFFER_SIZE = 1024 * 16 + 256; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sSharedBuffer // // Simple struct to represent a reference counted shareable (no copy) // buffer, as the basis for all buffer related classes // // NOTE: Do *NOT* create instances of this structure on the stack, it // must be dynamically allocated in order to function correctly /*=========================================================================*/ struct sSharedBuffer { public: // Constructor (copy passed in buffer) sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ); // Constructor (assume ownership of passed in buffer) sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ); // Destructor virtual ~sSharedBuffer(); // Equality operator bool operator == ( const sSharedBuffer & ) const; // Inequality operator bool operator != ( const sSharedBuffer & ) const; // (Inline) Get buffer const BYTE * GetBuffer() const { return mpData; }; // (Inline) Get buffer size ULONG GetSize() const { return mSize; }; // (Inline) Get buffer type ULONG GetType() const { return mType; }; // (Inline) Is this buffer valid? bool IsValid() const { return (mpData != 0 && IsValidSize( mSize )); }; // (Inline) Get reference count ULONG GetRefCount() const { return mRefCount; }; // (Static Inline) Is the passed in size within the allowable range // a shared buffer? static bool IsValidSize( ULONG sz ) { return (sz > 0 && sz <= MAX_SHARED_BUFFER_SIZE); }; protected: // Add reference void AddRef(); // Release reference, delete if reference count zero void Release(); /* Data */ PBYTE mpData; /* Size of data */ ULONG mSize; /* Type of data */ ULONG mType; /* Reference count */ ULONG mRefCount; private: // Leave copy constructor and assignment operator unimplemented // to prevent unintentional and unauthorized copying of the object // (which would lead to bad reference counting) sSharedBuffer( const sSharedBuffer & ); sSharedBuffer & operator = ( const sSharedBuffer & ); friend struct sProtocolBuffer; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/StdAfx.h000077500000000000000000000133371455567757300222000ustar00rootroot00000000000000/*=========================================================================== FILE: StdAfx.h DESCRIPTION: Application Framework eXtenstions for Linux PUBLIC CLASSES AND FUNCTIONS: Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Includes //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- // Macro defination //--------------------------------------------------------------------------- #define ASSERT( x ) assert( x ) #ifdef DEBUG #define TRACE printf #else #define TRACE(...) #endif //--------------------------------------------------------------------------- // data type defination //--------------------------------------------------------------------------- #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef CONST #define CONST const #endif typedef void VOID; typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef double DOUBLE; typedef int INT; typedef unsigned int UINT; typedef unsigned int * PUINT; typedef INT HANDLE; typedef HANDLE HMODULE; typedef char CHAR; typedef short SHORT; typedef long LONG; typedef unsigned long ULONG; typedef ULONG * PULONG; typedef ULONG * ULONG_PTR; typedef unsigned short USHORT; typedef USHORT * PUSHORT; typedef unsigned char UCHAR; typedef UCHAR * PUCHAR; typedef char * PSZ; typedef CONST CHAR * LPCSTR; typedef CHAR * LPSTR; typedef BYTE * PBYTE; typedef BOOL * PBOOL; typedef INT * PINT; typedef UINT * LPINT; typedef WORD * PWORD; typedef PWORD LPWORD; typedef LONG * LPLONG; typedef DWORD * PDWORD; typedef VOID * PVOID; typedef PVOID LPVOID; typedef const void * LPCVOID; typedef size_t SIZE_T; typedef double DATE; // Error code #define NO_ERROR 0L #define ERROR_SUCCESS 0L #define ERROR_NO_MORE_ITEMS 259L #define ERROR_CRC 23L #define ERROR_OUTOFMEMORY 14L #define ERROR_CAN_NOT_COMPLETE 1003L #define ERROR_REVISION_MISMATCH 1306L #define ERROR_BAD_ARGUMENTS 160L #define INVALID_SET_FILE_POINTER -1 #define VALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE -1 #define INVALID_FILE_SZ -1 #define ERROR_GEN_FAILURE 31L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_NOT_ENOUGH_MEMORY 8L #define ERROR_INVALID_PARAMETER 87L #define ERROR_BAD_FORMAT 11L // Other Constant definitions #define MAX_PATH 512 #define INFINITE 0xffffffff // SIOCIWFIRSTPRIV = 0x8BE0 // Device I/O control code for setting QMI service #define QMI_GET_SERVICE_FILE_IOCTL 0x8BE0 + 1 // Device I/O control code for obtaining device VIDPID #define QMI_GET_VIDPID_IOCTL 0x8BE0 + 2 // Device I/O control code for obtaining device MEID #define QMI_GET_MEID_IOCTL 0x8BE0 + 3 // Define the directions for pipes #define READING 0 #define WRITING 1 libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Core/SyncQueue.h000077500000000000000000000307171455567757300227310ustar00rootroot00000000000000/*=========================================================================== FILE: SyncQueue.h DESCRIPTION: Declaration/Implementation of cSyncQueue class PUBLIC CLASSES AND METHODS: cSyncQueue Synchronized shareable (across multiple threads) queue of structures with event notifications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cSyncQueue /*=========================================================================*/ template class cSyncQueue { public: // (Inline) Constructor cSyncQueue( ULONG maxElements, bool bSignalEvent = false ) : mSignature( (ULONG)eSYNC_QUEUE_SIG ), mSignalEvent(), mbSignalEvent( bSignalEvent ), mMaxElements( maxElements ), mTotalElements( 0 ) { // Create sync CS int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SyncQueue: Unable to init sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } }; // (Inline) Destructor ~cSyncQueue() { if (IsValid() == false) { ASSERT( (PVOID)"Double deletion detected in ~cSyncQueue" == 0 ); } else { EmptyQueue(); mSignature = 0; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // (Inline) Add an element to the queue bool AddElement( const tElementType & elem ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { // Yes, drop oldest element mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Add an element to the queue returning the index of // the element bool AddElement( const tElementType & elem, ULONG & idx ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); idx = mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Return given element in the queue bool GetElement( ULONG idx, tElementType & elem ) const { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Is this a current element index? ULONG expiredIndices = mTotalElements - (ULONG)mElementDeque.size(); if (idx >= expiredIndices) { // Yes, grab it from the deque idx -= expiredIndices; if (idx < (ULONG)mElementDeque.size()) { elem = mElementDeque[idx]; bRC = true; } } nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Empty element queue bool EmptyQueue() { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } mElementDeque.clear(); mTotalElements = 0; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } bRC = true; return bRC; }; // (Inline) Return the number of queued elements ULONG GetQueueCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = (ULONG)mElementDeque.size(); nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the total number of elements added to queue ULONG GetTotalCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = mTotalElements; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the signal event cEvent & GetSignalEvent() const { return mSignalEvent; }; // (Inline) Is this sync queue valid? bool IsValid() const { return (mSignature == (ULONG)eSYNC_QUEUE_SIG); }; protected: // Object signature enum eClassConstants { eSYNC_QUEUE_SIG = 0x1799A2BC }; /* Object signature */ ULONG mSignature; /* Multithreaded mutex type */ mutable pthread_mutex_t mSyncSection; /* Signal event, set everytime an element is added (if configured) */ mutable cEvent mSignalEvent; /* Use above signal event? */ bool mbSignalEvent; /* Maximum number of elements to add to the deque */ ULONG mMaxElements; /* Total number of elements added to the deque */ ULONG mTotalElements; /* Element queue */ std::deque mElementDeque; }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/000077500000000000000000000000001455567757300233365ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000Translation.cpp000077500000000000000000000072301455567757300274510ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLV DESCRIPTION: Return the starting location and size of TLV buffer. NOTE: does not include the TLV header PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer type [ I ] - Type ID pOutLen [ O ] - Length of the output buffer ppOut [ O ] - Pointer to output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ) { if (pIn == 0 || pOutLen == 0 || ppOut == 0) { return eGOBI_ERR_INVALID_ARG; } for (ULONG offset = 0; offset + sizeof( sQMIRawContentHeader ) <= inLen; offset += sizeof( sQMIRawContentHeader )) { sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pIn + offset); // Is it big enough to contain this TLV? if (offset + sizeof( sQMIRawContentHeader ) + pHeader->mLength > inLen) { return eGOBI_ERR_MALFORMED_RSP; } if (pHeader->mTypeID == typeID) { *pOutLen = pHeader->mLength; *ppOut = pIn + offset + sizeof( sQMIRawContentHeader ); return eGOBI_ERR_NONE; } offset += pHeader->mLength; } // TLV not found return eGOBI_ERR_INVALID_RSP; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000Translation.h000077500000000000000000000674451455567757300271340ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.h DESCRIPTION: QUALCOMM Tanslation for Gobi 3000 Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include #include #include "GobiConnectionMgmtAPIStructs.h" //--------------------------------------------------------------------------- // Prototypes //--------------------------------------------------------------------------- // Get a TLV ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ); // WDS ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ); ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ); ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ); ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ); ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ); ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ); ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ); ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ); ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ); ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ); ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ); ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ); ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ); ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ); // NAS ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ); ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ); ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ); ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ); ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ); ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ); ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ); ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ); ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ); ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ); // DMS ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ); ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ); ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ); ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ); ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ); ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ); ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ); ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ); ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ); ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ); ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); // SMS ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ); ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ); ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ); ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ); ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ); ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ); ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ); ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ); ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ); // DMS UIM ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ); ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ); ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ); ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // PDS ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ); ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ); ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ); ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ); ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ); ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ); ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ); ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ); ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ); ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ); // CAT ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ); ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ); // RMS ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ); ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ); // OMADM ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ); ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ); ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ); ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ); ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ); ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ); // Voice ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationCAT.cpp000077500000000000000000000137631455567757300300110ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationCAT.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Card Application Toolkit Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackCATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATSendTerminalResponseRequest_TerminalResponseType * pTLVx01; pTLVx01 = (sCATSendTerminalResponseRequest_TerminalResponseType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mReferenceID = refID; pTLVx01->mTerminalResponseLength = (UINT16)dataLen; offset += sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackCATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || dataLen == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATEnvelopeCommandRequest_EnvelopeCommand * pTLVx01; pTLVx01 = (sCATEnvelopeCommandRequest_EnvelopeCommand*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mEnvelopeCommandType = (eQMICATEnvelopeCommandType)cmdID; pTLVx01->mEnvelopeLength = (UINT16)dataLen; offset += sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationDMS.cpp000077500000000000000000001227541455567757300300260ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationDMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { // Validate arguments if (pIn == 0 || pMaxTXChannelRate == 0 || pMaxRXChannelRate == 0 || pDataServiceCapability == 0 || pSimCapability == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxRadioIfaces = (ULONG)*pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; const sDMSGetDeviceCapabilitiesResponse_Capabilities * pTLVx01; ULONG structSzx01 = sizeof( sDMSGetDeviceCapabilitiesResponse_Capabilities ); ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < structSzx01) { return eGOBI_ERR_BUFFER_SZ; } // Populate the variables *pMaxTXChannelRate = pTLVx01->mMaxTXRatebps; *pMaxRXChannelRate = pTLVx01->mMaxRXRatebps; *pDataServiceCapability = pTLVx01->mDataServiceCapability; // SIM capability should be treated as a boolean, even though it's not *pSimCapability = (pTLVx01->mSIMSupported == 0 ? 0 : 1); ULONG activeRadioIfaces = pTLVx01->mRadioInterfaceCount; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMIDMSRadioInterfaces * pInRadioInterfaces; // Verify there is room for the array in the TLV if (outLenx01 < structSzx01 + sizeof( eQMIDMSRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRadioInterfaces = (const eQMIDMSRadioInterfaces *) ((const BYTE *)pTLVx01 + structSzx01); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pInRadioInterfaces; pOutRadioIfaces++; pInRadioInterfaces++; } *pRadioIfacesSize = activeRadioIfaces; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the manufacturer // sDMSGetDeviceManfacturerResponse_Manfacturer only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the model // sDMSGetDeviceModelResponse_Model only contains the model const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the PRI revision // sDMSGetDeviceRevisionResponse_UQCNRevision only contains this const CHAR * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx11, outLenx11 ); pString[outLenx11] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { // Validate arguments if (pIn == 0 || amssSize == 0 || pAMSSString == 0 || bootSize == 0 || pBootString == 0 || priSize == 0 || pPRIString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pAMSSString = 0; *pBootString = 0; *pPRIString = 0; // Find the AMSS version // sDMSGetDeviceRevisionResponse_Revision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (amssSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAMSSString, pTLVx01, outLenx01 ); pAMSSString[outLenx01] = 0; // Find the Boot version // sDMSGetDeviceRevisionResponse_BootCodeRevision only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (bootSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pBootString, pTLVx10, outLenx10 ); pBootString[outLenx10] = 0; // The PRI version is returned by ParseGetFirmwareRevision() rc = ParseGetFirmwareRevision( inLen, pIn, priSize, pPRIString ); if (rc != eGOBI_ERR_NONE) { return rc; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { // Validate arguments if (pIn == 0 || voiceNumberSize == 0 || pVoiceNumber == 0 || minSize == 0 || pMIN == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pVoiceNumber = 0; *pMIN = 0; // Find the Voice number // sDMSGetDeviceVoiceNumberResponse_VoiceNumber only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (voiceNumberSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pVoiceNumber, pTLVx01, outLenx01 ); pVoiceNumber[outLenx01] = 0; // Find the Mobile ID (optional) // sDMSGetDeviceVoiceNumberResponse_MobileIDNumber only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Space to perform the copy? if (minSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMIN, pTLVx10, outLenx10 ); pMIN[outLenx10] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the IMSI // sDMSGetDeviceVoiceNumberResponse_IMSI only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { // Validate arguments if (pIn == 0 || esnSize == 0 || pESNString == 0 || imeiSize == 0 || pIMEIString == 0 || meidSize == 0 || pMEIDString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pESNString = 0; *pIMEIString = 0; *pMEIDString = 0; // Find the ESN // sDMSGetDeviceSerialNumbersResponse_ESN only contains this const CHAR * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (esnSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pESNString, pTLVx10, outLenx10 ); pESNString[outLenx10] = 0; // Find the IMEI // sDMSGetDeviceSerialNumbersResponse_IMEI only contains this const CHAR * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (imeiSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pIMEIString, pTLVx11, outLenx11 ); pIMEIString[outLenx11] = 0; // Find the MEID // sDMSGetDeviceSerialNumbersResponse_MEID only contains this const CHAR * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (meidSize < outLenx12 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMEIDString, pTLVx12, outLenx12 ); pMEIDString[outLenx12] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string thePIN( pCurrentPIN ); if (thePIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (thePIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockStateRequest_LockState ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockStateRequest_LockState * pTLVx01; pTLVx01 = (sDMSSetLockStateRequest_LockState*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mLockState = (eQMIDMSLockStates)state; memcpy( &pTLVx01->mLockCode[0], thePIN.c_str(), thePIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseQueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetLockStateResponse_LockState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetLockStateResponse_LockState )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mLockState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pCurrentPIN [ I ] - Current four digit PIN string pDesiredPIN [ I ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0 || pDesiredPIN == 0 || pDesiredPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string theCurPIN( pCurrentPIN ); if (theCurPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theCurPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } std::string theNewPIN( pDesiredPIN ); if (theNewPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theNewPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockCodeRequest_LockCode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockCodeRequest_LockCode * pTLVx01; pTLVx01 = (sDMSSetLockCodeRequest_LockCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mCurrentLockCode[0], theCurPIN.c_str(), theCurPIN.size() ); memcpy( &pTLVx01->mNewLockCode[0], theNewPIN.c_str(), theNewPIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the hardware revision // sDMSGetHardwareRevisionResponse_HardwareRevision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ) { // Validate arguments if (pIn == 0 || pPRLVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetPRLVersionResponse_PRLVersion * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetPRLVersionResponse_PRLVersion )) { return eGOBI_ERR_MALFORMED_RSP; } *pPRLVersion = pTLVx01->mPRLVersion; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ) { // Validate arguments if (pIn == 0 || pFileSize == 0 || *pFileSize == 0 || pFile == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure ULONG maxFileSize = *pFileSize; *pFileSize = 0; // Find the state const sDMSReadERIDataResponse_UserData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG fileSz = pTLVx01->mDataLength; const BYTE * pInFile; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData ) + sizeof( BYTE ) * fileSz) { return eGOBI_ERR_MALFORMED_RSP; } // Space to copy into? if (fileSz > maxFileSize) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pInFile = (const BYTE *)pTLVx01 + sizeof( sDMSReadERIDataResponse_UserData ); // Perform the copy memcpy( pFile, pInFile, fileSz ); *pFileSize = fileSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ) { // Validate arguments if (pOut == 0 || pActivationCode == 0 || pActivationCode[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string ac( pActivationCode ); if (ac.size() > 12) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSActivateAutomaticRequest_ActivationCode ) + (WORD)ac.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSActivateAutomaticRequest_ActivationCode * pTLVx01; pTLVx01 = (sDMSActivateAutomaticRequest_ActivationCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mCodeLength = (UINT8)ac.size(); memcpy( (BYTE *)pTLVx01 + sizeof( sDMSActivateAutomaticRequest_ActivationCode ), ac.c_str(), ac.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults CHANGES: * The client must manually reset the device after this request completes using DMSSetOperatingMode() PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSResetFactoryDefaultsRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSResetFactoryDefaultsRequest_SPC * pTLVx01; pTLVx01 = (sDMSResetFactoryDefaultsRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ) { // Validate arguments if (pIn == 0 || pActivationState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetActivationStateResponse_ActivationState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetActivationStateResponse_ActivationState )) { return eGOBI_ERR_MALFORMED_RSP; } *pActivationState = pTLVx01->mActivationState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetOperatingModeRequest_OperatingMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Set the mode sDMSSetOperatingModeRequest_OperatingMode * pTLVx01; pTLVx01 = (sDMSSetOperatingModeRequest_OperatingMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mOperatingMode = (eQMIDMSOperatingModes)powerMode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ) { // Validate arguments if (pIn == 0 || pPowerMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = 0xffffffff; // Find the mode const sDMSGetOperatingModeResponse_OperatingMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetOperatingModeResponse_OperatingMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pPowerMode = pTLVx01->mOperatingMode; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pIn == 0 || pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pReasonMask = 0; *pbPlatform = 0; // Find the reason mask (optional) const sDMSGetOperatingModeResponse_OfflineReason * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sDMSGetOperatingModeResponse_OfflineReason )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the bitmask to pReasonMask *pReasonMask = *(WORD*)pTLVx10; } // Find the platform restriction (optional) const sDMSGetOperatingModeResponse_PlatformRestricted * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sDMSGetOperatingModeResponse_PlatformRestricted )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the value *pbPlatform = pTLVx11->mPlatformRestricted; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTimeCount [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ) { // Validate arguments if (pIn == 0 || pTimeCount == 0 || pTimeSource == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the reason mask const sDMSGetTimestampResponse_Timestamp * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetTimestampResponse_Timestamp )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pTimeCount = pTLVx01->mTimestamp; // mSource is of type eQMIDMSTimestampSources *pTimeSource = pTLVx01->mSource; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSValidateSPCRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSValidateSPCRequest_SPC * pTLVx01; pTLVx01 = (sDMSValidateSPCRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationNAS.cpp000077500000000000000000001660701455567757300300230ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationNAS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (NAS Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" // Maximum length for a scanned network description const ULONG MAX_SNI_DESCRIPTION_LEN = 255; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sEVDOCustomSCPConfig // Struct to represent CDMA 1xEV-DO custom SCP config /*=========================================================================*/ struct sEVDOCustomSCPConfig { public: BYTE mbActive; ULONG mProtocolMask; ULONG mBroadcastMask; ULONG mApplicationMask; }; /*=========================================================================*/ // Struct sScannedNetworkInfo // Struct to represent scanned network information /*=========================================================================*/ struct sScannedNetworkInfo { public: USHORT mMCC; USHORT mMNC; ULONG mInUse; ULONG mRoaming; ULONG mForbidden; ULONG mPreferred; CHAR mDescription[MAX_SNI_DESCRIPTION_LEN]; }; /*=========================================================================*/ // Struct sScannedNetworkRATInfo // Struct to represent scanned network RAT information /*=========================================================================*/ struct sScannedNetworkRATInfo { public: USHORT mMCC; USHORT mMNC; ULONG mRAT; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: ParseGetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ) { // Validate arguments if (pIn == 0 || pStatus == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sNASGetANAAAAuthenticationStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetANAAAAuthenticationStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pStatus = pTLVx01->mANAAAAuthenticationStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSignalStrength DESCRIPTION: This function gets the current signal strength (in dBm) as measured by the device, the signal strength returned will be one of the currently available technologies with preference CDMA 1xEV-DO, CDMA, AMPS, WCDMA, GSM PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSignalStrength [ O ] - Received signal strength (dBm) pRadioInterface [ O ] - Radio interface technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ) { // Validate arguments if (pSignalStrength == 0 || pRadioInterface == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG sigSz = 12; INT8 sigs[12]; ULONG radios[12]; ULONG qcErr = ParseGetSignalStrengths( inLen, pIn, &sigSz, &sigs[0], &radios[0] ); if (qcErr != eGOBI_ERR_NONE) { return qcErr; } std::map sigMap; for (ULONG s = 0; s < sigSz; s++) { sigMap[radios[s]] = sigs[s]; } std::map ::const_iterator pIter; // HDR? pIter = sigMap.find( 2 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // CDMA? pIter = sigMap.find( 1 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // AMPS? pIter = sigMap.find( 3 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // WCDMA? pIter = sigMap.find( 5 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // GSM? pIter = sigMap.find( 4 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // Error values *pSignalStrength = -128; *pRadioInterface = 0; return eGOBI_ERR_NO_SIGNAL; } /*=========================================================================== METHOD: ParseGetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { // Validate arguments if (pIn == 0 || pArraySizes == 0 || *pArraySizes == 0 || pSignalStrengths == 0 || pRadioInterfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSignals = (ULONG)*pArraySizes; // Assume failure *pArraySizes = 0; // Find the first signal strength value const sNASGetSignalStrengthResponse_SignalStrength * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetSignalStrengthResponse_SignalStrength )) { return eGOBI_ERR_MALFORMED_RSP; } // Weed out bogus values std::map sigMap; INT8 sigVal = pTLVx01->mSignalStrengthdBm; ULONG radioVal = pTLVx01->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Handle list, if present const sNASGetSignalStrengthResponse_SignalStrengthList * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG auxSigs = pTLVx10->mNumberOfInfoInstances; if (auxSigs > maxSignals) { auxSigs = maxSignals; } const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo * pInfo; // Verify there is room for the array in the TLV if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList ) + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList::sInfo ) * auxSigs) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInfo = (const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )); for (ULONG s = 0; s < auxSigs; s++) { sigVal = pInfo->mSignalStrengthdBm; radioVal = pInfo->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Move pInfo forward one element pInfo++; } } ULONG sigCount = 0; std::map ::const_iterator pIter; for (pIter = sigMap.begin(); pIter != sigMap.end(); pIter++, sigCount++) { if (sigCount < maxSignals) { pSignalStrengths[sigCount] = pIter->second; pRadioInterfaces[sigCount] = pIter->first; *pArraySizes = sigCount + 1; } } // No valid signals? if (sigCount == 0) { return eGOBI_ERR_NO_SIGNAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetRFInfo DESCRIPTION: This function gets the current RF information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pInstanceSize; *pInstanceSize = 0; // Find the TLV const sNASGetRFInfoResponse_RFInfo * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE ifaceCount = pTLVx01->mNumberOfInstances; if (ifaceCount > maxInstances) { ifaceCount = maxInstances; } const sNASGetRFInfoResponse_RFInfo::sInstance * pInstance; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo ) + sizeof( sNASGetRFInfoResponse_RFInfo::sInstance ) * ifaceCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInstance = (const sNASGetRFInfoResponse_RFInfo::sInstance *) ((const BYTE *)pTLVx01 + sizeof( sNASGetRFInfoResponse_RFInfo )); ULONG * pOutput = (ULONG *)pInstances; for (BYTE i = 0; i < ifaceCount; i++) { *pOutput++ = pInstance->mRadioInterface; *pOutput++ = pInstance->mActiveBandClass; *pOutput++ = pInstance->mActiveChannel; // Move pInstance forward one element pInstance++; } *pInstanceSize = ifaceCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; // Assume failure *pInstanceSize = 0; // Find the TLV const sNASPerformNetworkScanResponse_NetworkInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sNASPerformNetworkScanResponse_NetworkInfo )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 netCount = pTLVx10->mNumberOfInfoInstances; if (netCount > maxInstances) { netCount = maxInstances; } const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo * pNetInfo; // Align to the first array element pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASPerformNetworkScanResponse_NetworkInfo )); ULONG offset = sizeof( sNASPerformNetworkScanResponse_NetworkInfo ); sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } pNet->mMCC = pNetInfo->mMobileCountryCode; pNet->mMNC = pNetInfo->mMobileNetworkCode; pNet->mInUse = pNetInfo->mInUseStatus; pNet->mRoaming = pNetInfo->mRoamingStatus; pNet->mForbidden = pNetInfo->mForbiddenStatus; pNet->mPreferred = pNetInfo->mPreferredStatus; memset( &pNet->mDescription[0], 0, MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pNetInfo->mDescriptionLength; if (descLen > 0) { // Move pNetInfo forward pNetInfo++; offset += sizeof( sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo ); // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } std::string netDesc( (LPCSTR)pNetInfo ); ULONG actualLen = (ULONG)netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } LPCSTR pNetDesc = netDesc.c_str(); memcpy( &pNet->mDescription[0], pNetDesc, actualLen ); // Move pNetInfo past string pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pNetInfo + descLen); offset += descLen; } pNet++; } *pInstanceSize = (BYTE)netCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0 || pRATSize == 0 || *pRATSize == 0 || pRATInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRATInstances = *pRATSize; // Assume failure *pInstanceSize = 0; *pRATSize = 0; // First, generate the instances using ParsePerformNetworkScan ULONG rc = ParsePerformNetworkScan( inLen, pIn, pInstanceSize, pInstances ); if (rc != eGOBI_ERR_NONE) { return rc; } // Now find the RAT info too // Find the TLV const sNASPerformNetworkScanResponse_NetworkRAT * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 ratCount = pTLVx11->mNumberOfInfoInstances; if (ratCount > maxRATInstances) { ratCount = maxRATInstances; } const sNASPerformNetworkScanResponse_NetworkRAT::sInfo * pRatInfo; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT ) + sizeof( sNASPerformNetworkScanResponse_NetworkRAT::sInfo ) * ratCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRatInfo = (const sNASPerformNetworkScanResponse_NetworkRAT::sInfo *) ((const BYTE *)pTLVx11 + sizeof( sNASPerformNetworkScanResponse_NetworkRAT )); sScannedNetworkRATInfo * pRAT = (sScannedNetworkRATInfo *)pRATInstances; for (BYTE r = 0; r < ratCount; r++) { pRAT->mMCC = pRatInfo->mMobileCountryCode; pRAT->mMNC = pRatInfo->mMobileNetworkCode; pRAT->mRAT = pRatInfo->mRadioAccessTechnology; pRAT++; pRatInfo++; } *pRATSize = (BYTE)ratCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the action // Check size WORD tlvx01Sz = sizeof( sNASInitiateNetworkRegisterRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_Action * pTLVx01; pTLVx01 = (sNASInitiateNetworkRegisterRequest_Action*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mRegisterAction = (eQMINASRegisterActions)regType; offset += tlvx01Sz; // Set the info // Check size WORD tlvx10Sz = sizeof( sNASInitiateNetworkRegisterRequest_ManualInfo ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_ManualInfo * pTLVx10; pTLVx10 = (sNASInitiateNetworkRegisterRequest_ManualInfo*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMobileCountryCode = mcc; pTLVx10->mMobileNetworkCode = mnc; pTLVx10->mRadioAccessTechnology = (eQMINASRadioAccessTechnologies)rat; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASInitiateAttachRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateAttachRequest_Action * pTLVx10; pTLVx10 = (sNASInitiateAttachRequest_Action*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mPSAttachAction = (eQMINASPSAttachActions)action; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { // Validate arguments if (pIn == 0 || pRegistrationState == 0 || pCSDomain == 0 || pPSDomain == 0 || pRAN == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0 || pRoaming == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRadioIfaces = *pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; *pRoaming = 0xffffffff; *pMCC = 0xffff; *pMNC = 0xffff; *pName = 0; // Parse the serving system (mandatory) // Find the TLV const sNASGetServingSystemResponse_ServingSystem * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pRegistrationState = pTLVx01->mRegistrationState; *pCSDomain = pTLVx01->mCSAttachState; *pPSDomain = pTLVx01->mPSAttachState; *pRAN = pTLVx01->mRegisteredNetwork; BYTE activeRadioIfaces = pTLVx01->mNumberOfRadioInterfacesInUse; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMINASRadioInterfaces * pRadioInfo; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem ) + sizeof( eQMINASRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRadioInfo = (const eQMINASRadioInterfaces *) ((const BYTE *)pTLVx01 + sizeof( sNASGetServingSystemResponse_ServingSystem )); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pRadioInfo; pOutRadioIfaces++; pRadioInfo++; } *pRadioIfacesSize = activeRadioIfaces; // Find the roaming indicator (optional) const sNASGetServingSystemResponse_RoamingIndicator * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetServingSystemResponse_RoamingIndicator )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pRoaming = (eQMINASRoamingIndicators)pTLVx10->mRoamingIndicator; } // Find the PLMN (optional) const sNASGetServingSystemResponse_CurrentPLMN * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN )) { return eGOBI_ERR_MALFORMED_RSP; } *pMCC = pTLVx12->mMobileCountryCode; *pMNC = pTLVx12->mMobileNetworkCode; ULONG descLen = pTLVx12->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx12 + sizeof( sNASGetServingSystemResponse_CurrentPLMN )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ) { // Validate arguments if (pIn == 0 || pDataCapsSize == 0 || *pDataCapsSize == 0 || pDataCaps == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxDataCaps = *pDataCapsSize; // Assume failure *pDataCapsSize = 0; // Find the TLV const sNASGetServingSystemResponse_DataServices * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE activeDataCaps = pTLVx11->mNumberOfDataCapabilities; if (activeDataCaps > maxDataCaps) { activeDataCaps = maxDataCaps; } const eQMINASDataServiceCapabilities2 * pInDataCaps; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices ) + sizeof( eQMINASDataServiceCapabilities2 ) * activeDataCaps) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInDataCaps = (const eQMINASDataServiceCapabilities2 *) ((const BYTE *)pTLVx11 + sizeof( sNASGetServingSystemResponse_DataServices )); ULONG * pOutDataCaps = (ULONG *)pDataCaps; for (ULONG d = 0; d < activeDataCaps; d++) { *pOutDataCaps = *pInDataCaps; pOutDataCaps++; pInDataCaps++; } *pDataCapsSize = activeDataCaps; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { // Validate arguments if (pIn == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0 || pSID == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pName = 0; *pSID = 0xffff; *pNID = 0xffff; // Find the name (mandatory) const sNASGetHomeNetworkResponse_HomeNetwork * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pMCC = pTLVx01->mMobileCountryCode; *pMNC = pTLVx01->mMobileNetworkCode; ULONG descLen = pTLVx01->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx01 + sizeof( sNASGetHomeNetworkResponse_HomeNetwork )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; // Find the SID/NID (optional) const sNASGetHomeNetworkResponse_HomeIDs * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetHomeNetworkResponse_HomeIDs )) { return eGOBI_ERR_MALFORMED_RSP; } *pSID = pTLVx10->mSystemID; *pNID = pTLVx10->mNetworkID; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetTechnologyPreferenceRequest_Preference ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetTechnologyPreferenceRequest_Preference * pTLVx01; pTLVx01 = (sNASSetTechnologyPreferenceRequest_Preference*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Copy technology preference WORD as-is memcpy( &pTLVx01->mValOfTechnology, &technologyPref, 2 ); pTLVx01->mDuration = (eQMINASTechPrefDurations)duration; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { // Validate arguments if (pIn == 0 || pTechnologyPref == 0 || pDuration == 0 || pPersistentTechnologyPref == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the preference (mandatory) const sNASGetTechnologyPreferenceResponse_ActivePreference * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetTechnologyPreferenceResponse_ActivePreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pTechnologyPref, &pTLVx01->mValOfTechnology, 2 ); *pDuration = pTLVx01->mDuration; // Until we know any better the persistent setting is the current setting *pPersistentTechnologyPref = *pTechnologyPref; // Find the persistant technology preference (optional) const sNASGetTechnologyPreferenceResponse_PersistentPreference * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetTechnologyPreferenceResponse_PersistentPreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pPersistentTechnologyPref, &pTLVx10->mValOfTechnology, 2 ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // If you specify one of the custom SCP config fields then you must // specify them all ULONG scpCount = 0; if (pCustomSCP != 0) { scpCount++; } if (pProtocol != 0) { scpCount++; } if (pBroadcast != 0) { scpCount++; } if (pApplication != 0) { scpCount++; } if (scpCount != 0 && scpCount != 4) { return eGOBI_ERR_INVALID_ARG; } // Rev. 0 and SCP custom config are mutually exclusive if (pForceRev0 != 0 && scpCount == 4) { if (*pForceRev0 != 0 && *pCustomSCP != 0) { return eGOBI_ERR_INVALID_ARG; } } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Need to start with SPC? if (pForceRev0 != 0 || scpCount == 4) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASSetNetworkParametersRequest_SPC ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_SPC * pTLVx10; pTLVx10 = (sNASSetNetworkParametersRequest_SPC*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values memcpy( &pTLVx10->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx10Sz; } // Force Rev. 0? if (pForceRev0 != 0) { // Check size WORD tlvx14Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDORevision ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDORevision * pTLVx14; pTLVx14 = (sNASSetNetworkParametersRequest_CDMA1xEVDORevision*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mForceCDMA1xEVDORev0 = (*pForceRev0 == 0 ? 0 : 1); offset += tlvx14Sz; } if (scpCount == 4) { // Check size WORD tlvx15Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom * pTLVx15; pTLVx15 = (sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the values pTLVx15->mCDMA1xEVDOSCPCustomConfig = (*pCustomSCP == 0 ? 0 : 1); // The pProtocol bitmask pTLVx15->mSubtype2PhysicalLayer = (*pProtocol & 0x00000001 ? 1 : 0); pTLVx15->mEnhancedCCMAC = (*pProtocol & 0x00000002 ? 1 : 0); pTLVx15->mEnhancedACMAC = (*pProtocol & 0x00000004 ? 1 : 0); pTLVx15->mEnhancedFTCMAC = (*pProtocol & 0x00000008 ? 1 : 0); pTLVx15->mSubtype3RTCMAC = (*pProtocol & 0x00000010 ? 1 : 0); pTLVx15->mSubtype1RTCMAC = (*pProtocol & 0x00000020 ? 1 : 0); pTLVx15->mEnhancedIdle = (*pProtocol & 0x00000040 ? 1 : 0); pTLVx15->mGenericMultimodeCapableDiscPort = (*pProtocol & 0x00000080 ? 1 : 0); pTLVx15->mGenericBroadcast = (*pBroadcast & 0x00000001 ? 1 : 0); pTLVx15->mSNMultiflowPacketApplication = (*pApplication & 0x00000001 ? 1 : 0); pTLVx15->mSNEnhancedMultiflowPacketApplication = (*pApplication & 0x00000002 ? 1 : 0); offset += tlvx15Sz; } if (pRoaming != 0) { // Check size WORD tlvx16Sz = sizeof( sNASSetNetworkParametersRequest_Roaming ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_Roaming * pTLVx16; pTLVx16 = (sNASSetNetworkParametersRequest_Roaming*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the values pTLVx16->mRoamPreference = (eQMINASRoamingPreferences)*pRoaming; offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset == 0) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetCDMANetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pIn == 0 || pSCI == 0 || pSCM == 0 || pRegHomeSID == 0 || pRegForeignSID == 0 || pRegForeignNID == 0 || pForceRev0 == 0 || pCustomSCP == 0 || pProtocol == 0 || pBroadcast == 0 || pApplication == 0 || pRoaming == 0) { return eGOBI_ERR_INVALID_ARG; } *pSCI = 0xff; *pSCM = 0xff; *pRegHomeSID = 0xff; *pRegForeignSID = 0xff; *pRegForeignNID = 0xff; *pForceRev0 = 0xff; *pCustomSCP = 0xff; *pProtocol = 0xffffffff; *pBroadcast = 0xffffffff; *pApplication = 0xffffffff; *pRoaming = 0xff; // Find the SCI const sNASGetNetworkParametersResponse_SCI * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sNASGetNetworkParametersResponse_SCI )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCI = pTLVx11->mSlotCycleIndex; } // Find the SCM const sNASGetNetworkParametersResponse_SCM * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetNetworkParametersResponse_SCM )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCM = pTLVx12->mStationClassMark; } // Find the Registration const sNASGetNetworkParametersResponse_Registration * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sNASGetNetworkParametersResponse_Registration )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx13->mRegisterOnHomeSystem; *pRegForeignSID = pTLVx13->mRegisterOnForeignSystem; *pRegForeignNID = pTLVx13->mRegisterOnForeignNetwork; } // Rev. 0? const sNASGetNetworkParametersResponse_CDMA1xEVDORevision * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sNASGetNetworkParametersResponse_CDMA1xEVDORevision )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx14->mForceCDMA1xEVDORev0; } // We're lazy, so we'll just typecast all the bitmask members from // sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom into their // respective container parameters const sEVDOCustomSCPConfig * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sEVDOCustomSCPConfig )) { return eGOBI_ERR_MALFORMED_RSP; } *pCustomSCP = pTLVx15->mbActive; *pProtocol = pTLVx15->mProtocolMask; *pBroadcast = pTLVx15->mBroadcastMask; *pApplication = pTLVx15->mApplicationMask; } // Roaming? const sNASGetNetworkParametersResponse_Roaming * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sNASGetNetworkParametersResponse_Roaming )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoaming = (eQMINASRoamingPreferences)pTLVx16->mRoamPreference; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ) { // Validate arguments if (pIn == 0 || pACCOLC == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the ACCOLC (mandatory) const sNASGetACCOLCResponse_ACCOLC * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetACCOLCResponse_ACCOLC )) { return eGOBI_ERR_MALFORMED_RSP; } *pACCOLC = pTLVx01->mACCOLC; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetACCOLCRequest_ACCOLC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetACCOLCRequest_ACCOLC * pTLVx01; pTLVx01 = (sNASSetACCOLCRequest_ACCOLC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mACCOLC = accolc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode (mandatory) const sNASGetCSPPLMNModeResponse_Mode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx10 < sizeof( sNASGetCSPPLMNModeResponse_Mode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mRestrictManualPLMNSelection; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASGetPLMNNameRequest_PLMN ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASGetPLMNNameRequest_PLMN * pTLVx01; pTLVx01 = (sNASGetPLMNNameRequest_PLMN*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMobileCountryCode = mcc; pTLVx01->mMobileNetworkCode = mnc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ) { // Validate arguments if (pIn == 0 || *pNamesSize == 0 || pNames == 0) { return eGOBI_ERR_INVALID_ARG; } const BYTE * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // The output format just happens to be the same as // sNASGetPLMNNameResponse_Name. Copy the full TLV to pNames if (outLenx10 > *pNamesSize) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNames, pTLVx10, outLenx10 ); *pNamesSize = outLenx10; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationOMA.cpp000077500000000000000000000345171455567757300300160ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationOMA.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (OMADM Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackOMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add sessionType // Check size WORD tlvx10Sz = sizeof( sOMAStartSessionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMAStartSessionRequest_Type * pTLVx10; pTLVx10 = (sOMAStartSessionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSessionType = (eQMIOMASessionTypes)sessionType; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { // Validate arguments if (pIn == 0 || pSessionState == 0 || pSessionType == 0 || pFailureReason == 0 || pRetryCount == 0 || pSessionPause == 0 || pTimeRemaining == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetSessionInfoResponse_Info * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetSessionInfoResponse_Info )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionState = pTLVx10->mSessionState; *pSessionType = pTLVx10->mSessionType; // Find the second TLV const sOMAGetSessionInfoResponse_Failure * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sOMAGetSessionInfoResponse_Failure )) { return eGOBI_ERR_MALFORMED_RSP; } *pFailureReason = pTLVx11->mSessionFailure; // Find the third TLV const sOMAGetSessionInfoResponse_Retry * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sOMAGetSessionInfoResponse_Retry )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryCount = pTLVx12->mRetryCount; *pSessionPause = pTLVx12->mRetryPauseTimer; *pTimeRemaining = pTLVx12->mRemainingTime; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ) { // Validate arguments if (pIn == 0 || pSessionType == 0 || pSessionID == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sOMAGetSessionInfoResponse_NIA * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sOMAGetSessionInfoResponse_NIA )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionID = pTLVx13->mSessionID; *pSessionType = pTLVx13->mSessionType; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add selection and session ID // Check size WORD tlvx10Sz = sizeof( sOMASendSelectionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASendSelectionRequest_Type * pTLVx10; pTLVx10 = (sOMASendSelectionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mSelection = (eQMIOMASelections)selection; pTLVx10->mSessionID = sessionID; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { // Validate arguments if (pIn == 0 || pbProvisioning == 0 || pbPRLUpdate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetFeaturesResponse_Provisioning * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_Provisioning )) { return eGOBI_ERR_MALFORMED_RSP; } *pbProvisioning = pTLVx10->mDeviceProvisioningServiceUpdateEnabled; // Find the second TLV const sOMAGetFeaturesResponse_PRLUpdate * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_PRLUpdate )) { return eGOBI_ERR_MALFORMED_RSP; } *pbPRLUpdate = pTLVx11->mPRLServiceUpdateEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bProvisioning // Check size WORD tlvx10Sz = sizeof( sOMASetFeaturesRequest_Provisioning ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_Provisioning * pTLVx10; pTLVx10 = (sOMASetFeaturesRequest_Provisioning*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mDeviceProvisioningServiceUpdateEnabled = (INT8)bProvisioning; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bPRLUpdate // Check size WORD tlvx11Sz = sizeof( sOMASetFeaturesRequest_PRLUpdate ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_PRLUpdate * pTLVx11; pTLVx11 = (sOMASetFeaturesRequest_PRLUpdate*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPRLServiceUpdateEnabled = (INT8)bPRLUpdate; offset += tlvx11Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationPDS.cpp000077500000000000000000001056021455567757300300220ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationPDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Position Determination Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ) { // Validate arguments (at least one mask must be present) if (pOut == 0 || (pGPSDataMask == 0 && pCellDataMask == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Optionally add pGPSDataMask if (pGPSDataMask != 0) { // Check size WORD tlvx10Sz = sizeof( sPDSResetPDSDataRequest_GPSData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_GPSData * pTLVx10; pTLVx10 = (sPDSResetPDSDataRequest_GPSData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx10 = *pGPSDataMask; offset += tlvx10Sz; } // Optionally add pCellDataMask if (pCellDataMask != 0) { // Check size WORD tlvx11Sz = sizeof( sPDSResetPDSDataRequest_CellData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_CellData * pTLVx11; pTLVx11 = (sPDSResetPDSDataRequest_CellData*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx11 = *pCellDataMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetCOMPortAutoTrackingConfigRequest_Config ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetCOMPortAutoTrackingConfigRequest_Config * pTLVx01; pTLVx01 = (sPDSSetCOMPortAutoTrackingConfigRequest_Config*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetCOMPortAutoTrackingConfigResponse_Config * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetCOMPortAutoTrackingConfigResponse_Config )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceAutoTrackingStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceAutoTrackingStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceAutoTrackingStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetServiceAutoTrackingStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceAutoTrackingStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetAGPSConfigRequest_Server ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetAGPSConfigRequest_Server * pTLVx10; pTLVx10 = (sPDSSetAGPSConfigRequest_Server*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (serverAddress & 0x000000FF); ULONG ip1 = (serverAddress & 0x0000FF00) >> 8; ULONG ip2 = (serverAddress & 0x00FF0000) >> 16; ULONG ip3 = (serverAddress & 0xFF000000) >> 24; // Set the values pTLVx10->mServerAddress[0] = (INT8)ip0; pTLVx10->mServerAddress[1] = (INT8)ip1; pTLVx10->mServerAddress[2] = (INT8)ip2; pTLVx10->mServerAddress[3] = (INT8)ip3; pTLVx10->mServerPort = serverPort; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ) { // Validate arguments if (pIn == 0 || pServerAddress == 0 || pServerPort == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetAGPSConfigResponse_ServerAddress * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetAGPSConfigResponse_ServerAddress )) { return eGOBI_ERR_MALFORMED_RSP; } *pServerPort = pTLVx01->mServerPort; ULONG ip0 = (ULONG)pTLVx01->mServerAddress[0]; ULONG ip1 = (ULONG)pTLVx01->mServerAddress[1] << 8; ULONG ip2 = (ULONG)pTLVx01->mServerAddress[2] << 16; ULONG ip3 = (ULONG)pTLVx01->mServerAddress[3] << 24; *pServerAddress = (ip0 | ip1 | ip2 | ip3); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRATime ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRATime * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRATime*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRATime * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRATime )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRAData ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRAData * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRAData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRAData * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRAData )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { // Validate arguments if (pIn == 0 || pGPSWeek == 0 || pGPSWeekOffset == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Validity * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sPDSGetXTRAParametersResponse_Validity )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx13->mValidPeriodDurationInHours; *pGPSWeek = pTLVx13->mValidPeriodGPSStartWeek; *pGPSWeekOffset = pTLVx13->mValidPeriodGPSStartWeekOffsetInMinutes; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add preference // Check size WORD tlvx12Sz = sizeof( sPDSSetXTRAParametersRequest_Network ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Network * pTLVx12; pTLVx12 = (sPDSSetXTRAParametersRequest_Network*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mWWANNetworkPreference = (eQMIPDSWWANNetworkPreferences)preference; offset += tlvx12Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ) { // Validate arguments if (pIn == 0 || pPreference == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pPreference const sPDSGetXTRAParametersResponse_Network * pTLVx12; ULONG outLenx12; ULONG rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sPDSGetXTRAParametersResponse_Network )) { return eGOBI_ERR_MALFORMED_RSP; } *pPreference = pTLVx12->mWWANNetworkPreference; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetXTRAParametersRequest_Automatic ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Automatic * pTLVx10; pTLVx10 = (sPDSSetXTRAParametersRequest_Automatic*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutomaticDownloadEnabled = (bEnabled == 0 ? 0 : 1); pTLVx10->mDownloadIntervalInHours = interval; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pInterval == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Automatic * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetXTRAParametersResponse_Automatic )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mAutomaticDownloadEnabled; *pInterval = pTLVx10->mDownloadIntervalInHours; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pTracking == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetServiceStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx01->mServiceEnabled; *pTracking = pTLVx01->mTrackingSessionState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add enable // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mServiceEnabled = (enable == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackPDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSInjectTimeReferenceRequest_Time ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSInjectTimeReferenceRequest_Time * pTLVx01; pTLVx01 = (sPDSInjectTimeReferenceRequest_Time*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mSystemTimeMilliseconds = systemTime; pTLVx01->mSystemDiscontinuties = systemDiscontinuities; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { // Validate arguments if (pIn == 0 || pOperation == 0 || pTimeout == 0 || pInterval == 0 || pAccuracy == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetDefaultsResponse_Defaults * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetDefaultsResponse_Defaults )) { return eGOBI_ERR_MALFORMED_RSP; } *pOperation = pTLVx01->mSessionOperation; *pTimeout = pTLVx01->mTimeoutSeconds; *pInterval = pTLVx01->mFixRequestIntervalSeconds; *pAccuracy = pTLVx01->mDesiredAccuracyMeters; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSSetDefaultsRequest_Defaults ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetDefaultsRequest_Defaults * pTLVx01; pTLVx01 = (sPDSSetDefaultsRequest_Defaults*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mDesiredAccuracyMeters = accuracy; pTLVx01->mFixRequestIntervalSeconds = interval; pTLVx01->mSessionOperation = (eQMIPDSOperationTypes)operation; pTLVx01->mTimeoutSeconds = timeout; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationRMS.cpp000077500000000000000000000136701455567757300300400ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationRMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Remote Management Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pWakeMask == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sRMSGetSMSWakeResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sRMSGetSMSWakeResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } // Find the second TLV const sRMSGetSMSWakeRequest_Mask * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sRMSGetSMSWakeRequest_Mask )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mSMSWakeEnabled; *pWakeMask = pTLVx11->mMask; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bEnable // Check size WORD tlvx10Sz = sizeof( sRMSSetSMSWakeRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_State * pTLVx10; pTLVx10 = (sRMSSetSMSWakeRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSMSWakeEnabled = (INT8)bEnable; offset += tlvx10Sz; // Add wakeMask if enabled if (bEnable != 0) { // Check size WORD tlvx11Sz = sizeof( sRMSSetSMSWakeRequest_Mask ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_Mask * pTLVx11; pTLVx11 = (sRMSSetSMSWakeRequest_Mask*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mMask = wakeMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationUIM.cpp000077500000000000000000001107071455567757300300300ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationUIM.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS_UIM Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockControlKeyResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockControlKeyResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockControlKeyRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMUnblockControlKeyRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMUnblockControlKeyRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mControlKeyLength = valSz; offset += sizeof( sDMSUIMUnblockControlKeyRequest_Facility ); memcpy( (pOut + offset), (LPCSTR)val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetControlKeyProtectionResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetControlKeyProtectionResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetControlKeyProtectionRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMSetControlKeyProtectionRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mFacilityState = (eQMIDMSUIMFacilityStates)status; pTLVx01->mControlKeyLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ); memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; // Find the last (optional) argument if (pbBlocking != 0) { const sDMSUIMGetControlKeyStatusResponse_Blocking * pTLVx10; ULONG tlvLenx10; rc = GetTLV( inLen, pIn, 0x10, &tlvLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLenx10 < sizeof( sDMSUIMGetControlKeyStatusResponse_Blocking )) { return eGOBI_ERR_MALFORMED_RSP; } *pbBlocking = pTLVx10->mOperationBlocking; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add id // Check size WORD tlvx01Sz = sizeof( sDMSUIMGetControlKeyStatusRequest_Facility ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMGetControlKeyStatusRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMGetControlKeyStatusRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyStatus DESCRIPTION: This function requests the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Request is the same as PackUIMGetControlKeyBlockingStatus return PackUIMGetControlKeyBlockingStatus( pOutLen, pOut, id ); } /*=========================================================================== METHOD: ParseUIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMGetICCIDResponse_ICCID * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetICCIDResponse_ICCID )) { return eGOBI_ERR_MALFORMED_RSP; } // The TLV only contains the string // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, (const CHAR*)pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || id < 1 || id > 2 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG tlvLen; // The typeID is either 0x11 or 0x12 if (id == 1) { const sDMSUIMGetPINStatusResponse_PIN1Status * pTLV11; ULONG rc = GetTLV( inLen, pIn, 0x11, &tlvLen, (const BYTE **)&pTLV11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN1Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV11->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV11->mRemainingUnblockRetries; *pStatus = pTLV11->mPINStatus; } else if (id == 2) { const sDMSUIMGetPINStatusResponse_PIN2Status * pTLV12; ULONG rc = GetTLV( inLen, pIn, 0x12, &tlvLen, (const BYTE **)&pTLV12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN2Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV12->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV12->mRemainingUnblockRetries; *pStatus = pTLV12->mPINStatus; } else { return eGOBI_ERR_INVALID_ARG; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMChangePINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMChangePINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pOldValue == 0 || pOldValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pOldValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMChangePINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMChangePINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMChangePINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mOldPINLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMChangePINRequest_Info1 ); // mOldPINValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMChangePINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMChangePINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMChangePINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pPUKValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pPUKValue == 0 || pPUKValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pPUKValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockPINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMUnblockPINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMUnblockPINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mPUKLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info1 ); // mPUKValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMUnblockPINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMUnblockPINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMVerifyPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMVerifyPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMVerifyPINRequest_Info ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMVerifyPINRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMVerifyPINRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINLength = valSz; offset += sizeof( sDMSUIMVerifyPINRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetPINProtectionResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetPINProtectionResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); ULONG valSz = (ULONG)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetPINProtectionRequest_Info ) + (WORD)valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetPINProtectionRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMSetPINProtectionRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINEnabled = (bEnable == 0 ? 0 : 1); pTLVx01->mPINLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetPINProtectionRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationVoice.cpp000077500000000000000000000133551455567757300304440ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationVoice.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Voice Service for USSD) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sUSSDInfo // Struct to represent USSD/Alpha information header /*=========================================================================*/ struct sUSSDInfoHdr { public: BYTE mDCS; BYTE mLength; // Data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: PackOriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } // Add pInfo sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackAnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationWDS.cpp000077500000000000000000003152631455567757300300370ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WDS Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetPacketServiceStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetPacketServiceStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mConnectionStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ) { // Validate arguments if (pIn == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataSessionDurationResponse_Duration * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataSessionDurationResponse_Duration )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx01->mDataSessionDuration; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDormancyResponse_DormancyStatus * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDormancyResponse_DormancyStatus )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mDormancyStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ) { // Validate arguments if (pIn == 0 || pSetting == 0 || pRoamSetting == 0) { return eGOBI_ERR_INVALID_ARG; } *pSetting = 0xffffffff; *pRoamSetting = 0xffffffff; // Find the first TLV const sWDSGetAutoconnectSettingResponse_Autoconnect * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetAutoconnectSettingResponse_Autoconnect )) { return eGOBI_ERR_MALFORMED_RSP; } *pSetting = pTLVx01->mAutoconnectSetting; // Find the second TLV (optional) const sWDSGetAutoconnectSettingResponse_Roam * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Is the TLV large enough? if (outLenx10 < sizeof( sWDSGetAutoconnectSettingResponse_Roam )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoamSetting = pTLVx10->mAutoconnectRoamSetting; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add setting // Check size WORD tlvx01Sz = sizeof( sWDSSetAutoconnectSettingRequest_Autoconnect ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Autoconnect * pTLVx01; pTLVx01 = (sWDSSetAutoconnectSettingRequest_Autoconnect*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoconnectSetting = (eQMIWDSAutoconnectSettings)setting; offset += tlvx01Sz; // Add roam setting, if specified if (pRoamSetting != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetAutoconnectSettingRequest_Roam ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Roam * pTLVx10; pTLVx10 = (sWDSSetAutoconnectSettingRequest_Roam*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutoconnectRoamSetting = (eQMIWDSAutoconnectRoamSettings)*pRoamSetting; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSModifyProfileRequest_ProfileIdentifier ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_ProfileIdentifier * pTLVx01; pTLVx01 = (sWDSModifyProfileRequest_ProfileIdentifier*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; pTLVx01->mProfileIndex = 1; offset += tlvx01Sz; // Add name, if specified if (pName != 0) { std::string name( pName ); // Check size WORD tlvx10Sz = (WORD)name.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( pOut + offset, name.c_str(), name.size() ); offset += tlvx10Sz; } // Add PDP type, if specified if (pPDPType != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSModifyProfileRequest_PDPType ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PDPType * pTLVx11; pTLVx11 = (sWDSModifyProfileRequest_PDPType*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPDPType = (eQMIPDPTypes)*pPDPType; offset += tlvx11Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSModifyProfileRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PrimaryDNS * pTLVx15; pTLVx15 = (sWDSModifyProfileRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSModifyProfileRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_SecondaryDNS * pTLVx16; pTLVx16 = (sWDSModifyProfileRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx16->mIPV4Address[0] = (INT8)ip0; pTLVx16->mIPV4Address[1] = (INT8)ip1; pTLVx16->mIPV4Address[2] = (INT8)ip2; pTLVx16->mIPV4Address[3] = (INT8)ip3; offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx1BSz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1BSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1B; pHeader->mLength = tlvx1BSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx1BSz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx1CSz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1CSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1C; pHeader->mLength = tlvx1CSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx1CSz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx1DSz = sizeof( sWDSModifyProfileRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1DSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1D; pHeader->mLength = tlvx1DSz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_Authentication * pTLVx1D; pTLVx1D = (sWDSModifyProfileRequest_Authentication*)(pOut + offset); memset( pTLVx1D, 0, tlvx1DSz ); // Set the value pTLVx1D->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx1D->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx1DSz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx1ESz = sizeof( sWDSModifyProfileRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1ESz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1E; pHeader->mLength = tlvx1ESz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_IPAddress * pTLVx1E; pTLVx1E = (sWDSModifyProfileRequest_IPAddress*)(pOut + offset); memset( pTLVx1E, 0, tlvx1ESz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx1E->mIPV4Address[0] = (INT8)ip0; pTLVx1E->mIPV4Address[1] = (INT8)ip1; pTLVx1E->mIPV4Address[2] = (INT8)ip2; pTLVx1E->mIPV4Address[3] = (INT8)ip3; offset += tlvx1ESz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being read RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSGetDefaultSettingsRequest_ProfileType ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetDefaultSettingsRequest_ProfileType * pTLVx01; pTLVx01 = (sWDSGetDefaultSettingsRequest_ProfileType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { // Validate arguments if (pIn == 0 || pPDPType == 0 || pIPAddress == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0 || pAuthentication == 0 || nameSize == 0 || pName == 0 || apnSize == 0 || pAPNName == 0 || userSize == 0 || pUsername == 0) { return eGOBI_ERR_INVALID_ARG; } // Set defaults *pPDPType = 0xffffffff; *pIPAddress = 0xffffffff; *pPrimaryDNS = 0xffffffff; *pSecondaryDNS = 0xffffffff; *pAuthentication = 0xffffffff; pName[0] = 0; pAPNName[0] = 0; pUsername[0] = 0; // Find the name const sWDSGetDefaultSettingsResponse_ProfileName * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (nameSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pName, (const BYTE *)pTLVx10, outLenx10 ); // Null terminate pName[outLenx10] = 0; } // Find the PDP type const sWDSGetDefaultSettingsResponse_PDPType * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDefaultSettingsResponse_PDPType )) { return eGOBI_ERR_MALFORMED_RSP; } *pPDPType = pTLVx11->mPDPType; } // Find the APN name const sWDSGetDefaultSettingsResponse_APNName * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (apnSize < outLenx14 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx14, outLenx14 ); // Null terminate pAPNName[outLenx14] = 0; } // Find the Primary DNS const sWDSGetDefaultSettingsResponse_PrimaryDNS * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetDefaultSettingsResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx15->mIPV4Address[0]; ULONG ip1 = pTLVx15->mIPV4Address[1] << 8; ULONG ip2 = pTLVx15->mIPV4Address[2] << 16; ULONG ip3 = pTLVx15->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDefaultSettingsResponse_SecondaryDNS * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetDefaultSettingsResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx16->mIPV4Address[0]; ULONG ip1 = pTLVx16->mIPV4Address[1] << 8; ULONG ip2 = pTLVx16->mIPV4Address[2] << 16; ULONG ip3 = pTLVx16->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Username const sWDSGetDefaultSettingsResponse_APNName * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (userSize < outLenx1B + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx1B, outLenx1B ); // Null terminate pAPNName[outLenx1B] = 0; } // Find the Authentication const sWDSGetDefaultSettingsResponse_Authentication * pTLVx1D; ULONG outLenx1D; rc = GetTLV( inLen, pIn, 0x1D, &outLenx1D, (const BYTE **)&pTLVx1D ); if (rc == eGOBI_ERR_NONE) { if (outLenx1D < sizeof( sWDSGetDefaultSettingsResponse_Authentication )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG pap = pTLVx1D->mEnablePAP; ULONG chap = pTLVx1D->mEnableCHAP << 1; *pAuthentication = (pap | chap); } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add technology, if specified if (pTechnology != 0) { // Check size WORD tlvx30Sz = sizeof( sWDSStartNetworkInterfaceRequest_TechnologyPreference ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx30Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x30; pHeader->mLength = tlvx30Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_TechnologyPreference * pTLVx30; pTLVx30 = (sWDSStartNetworkInterfaceRequest_TechnologyPreference*)(pOut + offset); memset( pTLVx30, 0, tlvx30Sz ); // Set the value pTLVx30->mEnable3GPP = ((*pTechnology & 0x00000001) != 0); pTLVx30->mEnable3GPP2 = ((*pTechnology & 0x00000002) != 0); offset += tlvx30Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSStartNetworkInterfaceRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSStartNetworkInterfaceRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary NBNS, if specified if (pPrimaryNBNS != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryNBNS * pTLVx12; pTLVx12 = (sWDSStartNetworkInterfaceRequest_PrimaryNBNS*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryNBNS & 0x000000FF); ULONG ip1 = (*pPrimaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary NBNS, if specified if (pSecondaryNBNS != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryNBNS * pTLVx13; pTLVx13 = (sWDSStartNetworkInterfaceRequest_SecondaryNBNS*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryNBNS & 0x000000FF); ULONG ip1 = (*pSecondaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSStartNetworkInterfaceRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_IPAddress * pTLVx15; pTLVx15 = (sWDSStartNetworkInterfaceRequest_IPAddress*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pTLVx16; pTLVx16 = (sWDSStartNetworkInterfaceRequest_Authentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx16->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx17Sz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx17Sz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx18Sz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx18Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ) { // Validate arguments if (pIn == 0 || pSessionId == 0 || pFailureReason == 0) { return eGOBI_ERR_INVALID_ARG; } // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Still parse call end reason, if present const sWDSStartNetworkInterfaceResponse_CallEndReason * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 >= sizeof( sWDSStartNetworkInterfaceResponse_CallEndReason )) { *pFailureReason = pTLVx10->mCallEnd; } } return rc; } // Find the Session ID const sWDSStartNetworkInterfaceResponse_PacketDataHandle * pTLVx01; ULONG outLenx01; rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSStartNetworkInterfaceResponse_PacketDataHandle )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionId = pTLVx01->mPacketDataHandle; } // Session ID is mandatory, if it failed return that error return rc; } /*=========================================================================== METHOD: PackStopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add session ID // Check size WORD tlvx01Sz = sizeof( sWDSStopNetworkInterfaceRequest_PacketDataHandle ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSStopNetworkInterfaceRequest_PacketDataHandle * pTLVx01; pTLVx01 = (sWDSStopNetworkInterfaceRequest_PacketDataHandle*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mPacketDataHandle = sessionId; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx10Sz = sizeof( sWDSGetCurrentSettingsRequest_RequestedSettings ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetCurrentSettingsRequest_RequestedSettings * pTLVx10; pTLVx10 = (sWDSGetCurrentSettingsRequest_RequestedSettings*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mIPAddress = true; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ) { // Validate arguments if (pIn == 0 || pIPAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; ULONG rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } // If no IP address is found, fail return rc; } /*=========================================================================== METHOD: ParseGetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { // Validate arguments if (pIn == 0 || pCurrentChannelTXRate == 0 || pCurrentChannelRXRate == 0 || pMaxChannelTXRate == 0 || pMaxChannelRXRate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the rates const sWDSGetChannelRatesResponse_ChannelRates * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetChannelRatesResponse_ChannelRates )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pCurrentChannelTXRate = pTLVx01->mChannelTXRatebps; *pCurrentChannelRXRate = pTLVx01->mChannelRXRatebps; *pMaxChannelTXRate = pTLVx01->mMaxChannelTXRatebps; *pMaxChannelRXRate = pTLVx01->mMaxChannelRXRatebps; } // If no rates are found, fail return rc; } /*=========================================================================== METHOD: PackGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mReportTXPacketSuccesses = true; pTLVx01->mReportRXPacketSuccesses = true; pTLVx01->mReportTXPacketErrors = true; pTLVx01->mReportRXPacketErrors = true; pTLVx01->mReportTXOverflows = true; pTLVx01->mReportRXOverflows = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { // Validate arguments if (pIn == 0 || pTXPacketSuccesses == 0 || pRXPacketSuccesses == 0 || pTXPacketErrors == 0 || pRXPacketErrors == 0 || pTXPacketOverflows == 0 || pRXPacketOverflows == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX packet sucesses const sWDSGetPacketStatisticsResponse_TXPacketSuccesses * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet sucesses const sWDSGetPacketStatisticsResponse_RXPacketSuccesses * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet errors const sWDSGetPacketStatisticsResponse_TXPacketErrors * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet errors const sWDSGetPacketStatisticsResponse_RXPacketErrors * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet overflows const sWDSGetPacketStatisticsResponse_TXOverflows * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetPacketStatisticsResponse_TXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet overflows const sWDSGetPacketStatisticsResponse_RXOverflows * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetPacketStatisticsResponse_RXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXPacketSuccesses = pTLVx10->mTXPacketSuccesses; *pRXPacketSuccesses = pTLVx11->mRXPacketSuccesses; *pTXPacketErrors = pTLVx12->mTXPacketErrors; *pRXPacketErrors = pTLVx13->mRXPacketErrors; *pTXPacketOverflows = pTLVx14->mTXOverflows; *pRXPacketOverflows = pTLVx15->mRXOverflows; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mTXByteTotal = true; pTLVx01->mRXByteTotal = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { // Validate arguments if (pIn == 0 || pTXTotalBytes == 0 || pRXTotalBytes == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX bytes const sWDSGetPacketStatisticsResponse_TXBytes * pTLVx19; ULONG outLenx19; ULONG rc = GetTLV( inLen, pIn, 0x19, &outLenx19, (const BYTE **)&pTLVx19 ); if (rc == eGOBI_ERR_NONE) { if (outLenx19 < sizeof( sWDSGetPacketStatisticsResponse_TXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX bytes const sWDSGetPacketStatisticsResponse_RXBytes * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetPacketStatisticsResponse_RXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXTotalBytes = pTLVx19->mTXByteTotal; *pRXTotalBytes = pTLVx1A->mRXByteTotal; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the mode // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPModeRequest_MobileIPMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPModeRequest_MobileIPMode * pTLVx01; pTLVx01 = (sWDSSetMIPModeRequest_MobileIPMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMIPMode = (eQMIMobileIPModes)mode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetMIPModeResponse_MobileIPMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetMIPModeResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx01->mMIPMode; } return rc; } /*=========================================================================== METHOD: PackSetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetActiveMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetActiveMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetActiveMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ) { // Validate arguments if (pIn == 0 || pIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetActiveMIPProfileResponse_Index * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetActiveMIPProfileResponse_Index )) { return eGOBI_ERR_MALFORMED_RSP; } *pIndex = pTLVx01->mProfileIndex; } return rc; } /*=========================================================================== METHOD: PackSetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address bRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; // Add Enabled, if specified if (pEnabled != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPProfileRequest_State ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_State * pTLVx10; pTLVx10 = (sWDSSetMIPProfileRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mEnabled = (*pEnabled == 0 ? 0 : 1); offset += tlvx10Sz; } // Add Home Address, if specified if (pAddress != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPProfileRequest_HomeAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HomeAddress * pTLVx11; pTLVx11 = (sWDSSetMIPProfileRequest_HomeAddress*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pAddress & 0x000000FF); ULONG ip1 = (*pAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pAddress & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary Home Agent Address, if specified if (pPrimaryHA != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress * pTLVx12; pTLVx12 = (sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryHA & 0x000000FF); ULONG ip1 = (*pPrimaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryHA & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary Home Agent Address, if specified if (pSecondaryHA != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress * pTLVx13; pTLVx13 = (sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryHA & 0x000000FF); ULONG ip1 = (*pSecondaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryHA & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add reverse tunneling, if specified if (pRevTunneling != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPProfileRequest_ReverseTunneling ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_ReverseTunneling * pTLVx14; pTLVx14 = (sWDSSetMIPProfileRequest_ReverseTunneling*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReverseTunneling = (*pRevTunneling == 0 ? 0 : 1); offset += tlvx14Sz; } // Add NAI, if specified if (pNAI != 0) { std::string nai( pNAI ); // Check size WORD tlvx15Sz = (WORD)nai.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), nai.c_str(), nai.size() ); offset += tlvx15Sz; } // Add HA SPI, if specified if (pHASPI != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPProfileRequest_HASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HASPI * pTLVx16; pTLVx16 = (sWDSSetMIPProfileRequest_HASPI*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mHASPI = *pHASPI; offset += tlvx16Sz; } // Add AAA SPI, if specified if (pAAASPI != 0) { // Check size WORD tlvx17Sz = sizeof( sWDSSetMIPProfileRequeste_AAASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequeste_AAASPI * pTLVx17; pTLVx17 = (sWDSSetMIPProfileRequeste_AAASPI*)(pOut + offset); memset( pTLVx17, 0, tlvx17Sz ); // Set the value pTLVx17->mAAASPI = *pAAASPI; offset += tlvx17Sz; } // Add MN-HA key, if specified if (pMNHA != 0) { std::string mnha( pMNHA ); // Check size WORD tlvx18Sz = (WORD)mnha.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnha.c_str(), mnha.size() ); offset += tlvx18Sz; } // Add MN-AAA key, if specified if (pMNHA != 0) { std::string mnaaa( pMNAAA ); // Check size WORD tlvx19Sz = (WORD)mnaaa.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx19Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x19; pHeader->mLength = tlvx19Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnaaa.c_str(), mnaaa.size() ); offset += tlvx19Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer index [ I ] - Mobile IP profile ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSGetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSGetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pAddress == 0 || pPrimaryHA == 0 || pSecondaryHA == 0 || pRevTunneling == 0 || naiSize == 0 || pNAI == 0 || pHASPI == 0 || pAAASPI == 0 || pHAState == 0 || pAAAState == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume errors *pEnabled = 0xff; *pAddress = 0xffffffff; *pPrimaryHA = 0xffffffff; *pSecondaryHA = 0xffffffff; *pRevTunneling = 0xff; *pHASPI = 0xffffffff; *pAAASPI = 0xffffffff; *pHAState = 0xffffffff; *pAAAState = 0xffffffff; // Find the State const sWDSGetMIPProfileResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx10->mEnabled; } // Find the Home Address const sWDSGetMIPProfileResponse_HomeAddress * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPProfileResponse_HomeAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pAddress = (ip0 | ip1 | ip2 | ip3); } // Find the Primary Home Agent Address const sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx12->mIPV4Address[0]; ULONG ip1 = pTLVx12->mIPV4Address[1] << 8; ULONG ip2 = pTLVx12->mIPV4Address[2] << 16; ULONG ip3 = pTLVx12->mIPV4Address[3] << 24; *pPrimaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary Home Agent Address const sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx13->mIPV4Address[0]; ULONG ip1 = pTLVx13->mIPV4Address[1] << 8; ULONG ip2 = pTLVx13->mIPV4Address[2] << 16; ULONG ip3 = pTLVx13->mIPV4Address[3] << 24; *pSecondaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Reverse tunneling, if enabled const sWDSGetMIPProfileResponse_ReverseTunneling * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_ReverseTunneling )) { return eGOBI_ERR_MALFORMED_RSP; } *pRevTunneling = pTLVx14->mReverseTunneling; } // Find the NAI, if enabled const sWDSGetMIPProfileResponse_NAI * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (naiSize < outLenx15 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNAI, (const BYTE *)pTLVx15, outLenx15 ); // Null terminate pNAI[outLenx15] = 0; } // Find the HA SPI const sWDSGetMIPProfileResponse_HASPI * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPProfileResponse_HASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pHASPI = pTLVx16->mHASPI; } // Find the AAA SPI const sWDSGetMIPProfileResponse_AAASPI * pTLVx17; ULONG outLenx17; rc = GetTLV( inLen, pIn, 0x17, &outLenx17, (const BYTE **)&pTLVx17 ); if (rc == eGOBI_ERR_NONE) { if (outLenx17 < sizeof( sWDSGetMIPProfileResponse_AAASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAASPI = pTLVx17->mAAASPI; } // Find the HA state const sWDSGetMIPProfileResponse_HAState * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetMIPProfileResponse_HAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAState = pTLVx1A->mKeyState; } // Find the AAA state const sWDSGetMIPProfileResponse_AAAState * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (outLenx1B < sizeof( sWDSGetMIPProfileResponse_AAAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAAState = pTLVx1B->mKeyState; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPParametersRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_SPC * pTLVx01; pTLVx01 = (sWDSSetMIPParametersRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; // Add Mode, if specified if (pMode != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPParametersRequest_MobileIPMode ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MobileIPMode * pTLVx10; pTLVx10 = (sWDSSetMIPParametersRequest_MobileIPMode*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMIPMode = (eQMIMobileIPModes)*pMode; offset += tlvx10Sz; } // Add Retry Limit, if specified if (pRetryLimit != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptLimit ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptLimit * pTLVx11; pTLVx11 = (sWDSSetMIPParametersRequest_RetryAttemptLimit*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mRetryAttemptLimit = *pRetryLimit; offset += tlvx11Sz; } // Add Retry interval, if specified if (pRetryInterval != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptInterval ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptInterval * pTLVx12; pTLVx12 = (sWDSSetMIPParametersRequest_RetryAttemptInterval*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mRetryAttemptInterval = *pRetryInterval; offset += tlvx12Sz; } // Add Re-registration period, if specified if (pReRegPeriod != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationPeriod ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationPeriod * pTLVx13; pTLVx13 = (sWDSSetMIPParametersRequest_ReRegistrationPeriod*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); // Set the value pTLVx13->mReRegistrationPeriod = *pReRegPeriod; offset += tlvx13Sz; } // Add Re-registration on traffic flag, if specified if (pReRegTraffic != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic * pTLVx14; pTLVx14 = (sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReRegistrationOnlyWithTraffic = (*pReRegTraffic == 0 ? 0 : 1); offset += tlvx14Sz; } // Add HA authenticator flag, if specified if (pHAAuthenticator != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator * pTLVx15; pTLVx15 = (sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the value pTLVx15->mMNHAAuthenticatorCalculator = (*pHAAuthenticator == 0 ? 0 : 1); offset += tlvx15Sz; } // Add HA RFC2002bis authentication flag, if specified if (pHA2002bis != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication * pTLVx16; pTLVx16 = (sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mMNHARFC2002BISAuthentication = (*pHA2002bis == 0 ? 0 : 1); offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pIn == 0 || pMode == 0 || pRetryLimit == 0 || pRetryInterval == 0 || pReRegPeriod == 0 || pReRegTraffic == 0 || pHAAuthenticator == 0 || pHA2002bis == 0) { return eGOBI_ERR_INVALID_ARG; } *pMode = 0xffffffff; *pRetryLimit = 0xff; *pRetryInterval = 0xff; *pReRegPeriod = 0xff; *pReRegTraffic = 0xff; *pHAAuthenticator = 0xff; *pHA2002bis = 0xff; // Find the mode const sWDSGetMIPParametersResponse_MobileIPMode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPParametersResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mMIPMode; } // Find the Retry limit const sWDSGetMIPParametersResponse_RetryAttemptLimit * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptLimit )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryLimit = pTLVx11->mRetryAttemptLimit; } // Find the Retry Interval const sWDSGetMIPParametersResponse_RetryAttemptInterval * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptInterval )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryInterval = pTLVx12->mRetryAttemptInterval; } // Find the Re-registration period const sWDSGetMIPParametersResponse_ReRegistrationPeriod * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationPeriod )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegPeriod = pTLVx13->mReRegistrationPeriod; } // Find the Re-register on traffic flag const sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegTraffic = pTLVx14->mReRegistrationOnlyWithTraffic; } // Find the HA authenticator const sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAAuthenticator = pTLVx15->mMNHAAuthenticatorCalculator; } // Find the HA RFC2002bis authentication flag const sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication )) { return eGOBI_ERR_MALFORMED_RSP; } *pHA2002bis = pTLVx16->mMNHARFC2002BISAuthentication; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ) { // Validate arguments if (pIn == 0 || pError == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetLastMIPStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetLastMIPStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pError = pTLVx01->mLastMIPStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments // At least one must be specified if (pOut == 0 || (pPrimaryDNS == 0 && pSecondaryDNS == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetDNSSettingRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSSetDNSSettingRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetDNSSettingRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSSetDNSSettingRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pIn == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the Primary DNS const sWDSGetDNSSettingResponse_PrimaryDNS * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetDNSSettingResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx10->mIPV4Address[0]; ULONG ip1 = pTLVx10->mIPV4Address[1] << 8; ULONG ip2 = pTLVx10->mIPV4Address[2] << 16; ULONG ip3 = pTLVx10->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDNSSettingResponse_SecondaryDNS * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDNSSettingResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ) { // Validate arguments if (pIn == 0 || pDataBearer == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataBearerTechnologyResponse_Technology * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataBearerTechnologyResponse_Technology )) { return eGOBI_ERR_MALFORMED_RSP; } *pDataBearer = pTLVx01->mDataBearerTechnology; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Gobi3000Translation/Gobi3000TranslationWMS.cpp000077500000000000000000001017751455567757300300510ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WMS Service) Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackDeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSDeleteRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSDeleteRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message index, if specified if (pMessageIndex != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSDeleteRequest_MessageIndex ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageIndex * pTLVx10; pTLVx10 = (sWMSDeleteRequest_MessageIndex*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mStorageIndex = *pMessageIndex; offset += tlvx10Sz; } // Add the Message tag, if specified if (pMessageTag != 0) { // Check size WORD tlvx11Sz = sizeof( sWMSDeleteRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageTag * pTLVx11; pTLVx11 = (sWMSDeleteRequest_MessageTag*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the values pTLVx11->mMessageTag = (eQMIWMSMessageTags)*pMessageTag; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSListMessagesRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The storage type sWMSListMessagesRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSListMessagesRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message tag, if specified if (pRequestedTag != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSListMessagesRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSListMessagesRequest_MessageTag * pTLVx10; pTLVx10 = (sWMSListMessagesRequest_MessageTag*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mMessageTag = (eQMIWMSMessageTags)*pRequestedTag; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ) { // Validate arguments if (pIn == 0 || pMessageListSize == 0 || *pMessageListSize == 0 || pMessageList == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageListSz = *pMessageListSize; // Assume failure *pMessageListSize = 0; // Find the messages const sWMSListMessagesResponse_MessageList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG messageListSz = pTLVx01->mNumberOfMessages; if (messageListSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (maxMessageListSz < messageListSz) { messageListSz = maxMessageListSz; } const sWMSListMessagesResponse_MessageList::sMessage * pMessages; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList ) + sizeof( sWMSListMessagesResponse_MessageList::sMessage ) * messageListSz) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pMessages = (const sWMSListMessagesResponse_MessageList::sMessage *) ((const BYTE *)pTLVx01 + sizeof( sWMSListMessagesResponse_MessageList )); ULONG * pData = (ULONG *)pMessageList; for (ULONG m = 0; m < messageListSz; m++) { *pData++ = pMessages->mStorageIndex; *pData++ = pMessages->mMessageTag; pMessages++; } *pMessageListSize = messageListSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawReadRequest_MessageIndex ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawReadRequest_MessageIndex * pTLVx01; pTLVx01 = (sWMSRawReadRequest_MessageIndex*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ O ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { // Validate arguments if (pIn == 0 || pMessageTag == 0 || pMessageFormat == 0 || pMessageSize == 0 || *pMessageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageSz = *pMessageSize; // Assume failure *pMessageSize = 0; // Find the messages const sWMSRawReadResponse_MessageData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageTag = pTLVx01->mMessageTag; *pMessageFormat = pTLVx01->mMessageFormat; ULONG messageSz = pTLVx01->mRawMessageLength; if (messageSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (messageSz > maxMessageSz) { messageSz = maxMessageSz; } // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData ) + messageSz) { return eGOBI_ERR_MALFORMED_RSP; } memcpy( pMessage, pTLVx01 + sizeof( sWMSRawReadResponse_MessageData ), messageSz ); *pMessageSize = messageSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSModifyTagRequest_MessageTag ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSModifyTagRequest_MessageTag * pTLVx01; pTLVx01 = (sWMSModifyTagRequest_MessageTag*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; pTLVx01->mMessageTag = (eQMIWMSMessageTags)messageTag; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawWriteRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawWriteRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawWriteRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawWriteRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ) { // Validate arguments if (pIn == 0 || pMessageIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the messages const sWMSRawWriteResponse_MessageIndex * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawWriteResponse_MessageIndex )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageIndex = pTLVx01->mStorageIndex; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawSendRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawSendRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawSendRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawSendRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ) { // Validate arguments if (pIn == 0 || pMessageFailureCode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume we have no message failure cause code *pMessageFailureCode = 0xffffffff; // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Check for the failure code (optional) const sWMSRawSendResponse_CauseCode * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageFailureCode = pTLVx10->mCauseCode; } } return rc; } /*=========================================================================== METHOD: ParseGetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ O ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ O ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { // Validate arguments if (pIn == 0 || addressSize == 0 || pSMSCAddress == 0 || typeSize == 0 || pSMSCType == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume empty pSMSCAddress[0] = 0; pSMSCType[0] = 0; // Get the address (mandatory) const sWMSGetSMSCAddressResponse_Address * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } // Handle the type as a string (maximum 3 chars) std::string smscType( &pTLVx01->mSMSCAddressType[0], 3 ); // Is the SMSC type present? (optional) ULONG smscTypeLen = (ULONG)smscType.size(); if (smscTypeLen > 0) { // Space to perform copy? if (typeSize < smscTypeLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCType, &pTLVx01->mSMSCAddressType[0], smscTypeLen ); pSMSCType[smscTypeLen] = 0; } // Treat the address as a null terminated string std::string smscAddr( (const CHAR *)pTLVx01 + sizeof( sWMSGetSMSCAddressResponse_Address ), pTLVx01->mSMSCAddressLength ); ULONG smscAddrLen = (ULONG)smscAddr.size(); if (addressSize < smscAddrLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCAddress, smscAddr.c_str(), addressSize ); pSMSCAddress[addressSize] = 0; return rc; } /*=========================================================================== METHOD: PackSetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ) { // Validate arguments if (pOut == 0 || pSMSCAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // The TLV contains only the address std::string smscAddr( pSMSCAddress ); // Check size WORD tlvx01Sz = (WORD)smscAddr.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscAddr.c_str(), tlvx01Sz ); offset += tlvx01Sz; // smscType is optional if (pSMSCType != 0) { // The TLV contains only the type std::string smscType( pSMSCType ); if (smscType.size() != 0) { // Check size WORD tlvx10Sz = (WORD)smscType.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscType.c_str(), tlvx10Sz ); offset += tlvx10Sz; } } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pIn == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxRoutes = *pRouteSize; *pRouteSize = 0; // Get the route list const sWMSGetRoutesResponse_RouteList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG routeCount = pTLVx01->mNumberOfRoutes; if (routeCount > (ULONG)maxRoutes) { routeCount = (ULONG)maxRoutes; } const sWMSGetRoutesResponse_RouteList::sRoute * pInRoute; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList ) + sizeof( sWMSGetRoutesResponse_RouteList::sRoute ) * routeCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRoute = (const sWMSGetRoutesResponse_RouteList::sRoute *) ((const BYTE *)pTLVx01 + sizeof( sWMSGetRoutesResponse_RouteList )); ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { *pRouteArray++ = pInRoute->mMessageType; *pRouteArray++ = pInRoute->mMessageClass; *pRouteArray++ = pInRoute->mStorageType; *pRouteArray++ = pInRoute->mRouteValue; pInRoute++; } *pRouteSize = (BYTE)routeCount; return rc; } /*=========================================================================== METHOD: PackSetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pOut == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } UINT16 routeCount = (ULONG)*pRouteSize; // Check size WORD tlvx01Sz = sizeof( sWMSSetRoutesRequest_RouteList ) + sizeof( sWMSSetRoutesRequest_RouteList::sRoute ) * routeCount; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Add route count sWMSSetRoutesRequest_RouteList * pTLVx01; pTLVx01 = (sWMSSetRoutesRequest_RouteList*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mNumberOfRoutes = routeCount; offset += sizeof( sWMSSetRoutesRequest_RouteList ); sWMSSetRoutesRequest_RouteList::sRoute * pOutRoute; // Align to the first array element pOutRoute = (sWMSSetRoutesRequest_RouteList::sRoute *)(pOut + offset); // Add the routes ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { pOutRoute->mMessageType = (eQMIWMSMessageTypes)*pRouteArray++; pOutRoute->mMessageClass = (eQMIWMSMessageClasses)*pRouteArray++; pOutRoute->mStorageType = (eQMIWMSStorageTypes)*pRouteArray++; pOutRoute->mReceiptAction = (eQMIWMSReceiptActions)*pRouteArray++; pOutRoute++; offset += sizeof( sWMSSetRoutesRequest_RouteList::sRoute ); } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/GobiConnectionMgmt/000077500000000000000000000000001455567757300234615ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/GobiConnectionMgmt/GobiConnectionMgmt.cpp000077500000000000000000000410541455567757300277210ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.cpp DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Stdafx.h" #include "GobiConnectionMgmt.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Global object CGobiConnectionMgmtDLL gDLL; // Interval between traffic processing loop iterations (milliseconds) const ULONG TRAFFIC_INTERVAL_MS = 300000; // Maximum amount of time to wait for the traffic thread to exit const ULONG THREAD_EXIT_TIME = 2000; /*=========================================================================== METHOD: TrafficProcessThread (Free Method) DESCRIPTION: QMI traffic process thread - processes all traffic in order to fire off QMI traffic related callbacks PARAMETERS: pArg [ I ] - Object to interface to RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * TrafficProcessThread( PVOID pArg ) { // Keep running? bool bRun = false; // Create a vector of the objects to wait on std::vector events; // Store the index to service type for use later std::map services; // Grab API object cGobiConnectionMgmt * pAPI = (cGobiConnectionMgmt *)pArg; if (pAPI != 0) { // Time to go to work bRun = true; // Add the thread exit event events.push_back( &pAPI->mExitEvent ); // Grab signal events for our protocol servers std::map ::const_iterator pIter; pIter = pAPI->mServers.begin(); while (pIter != pAPI->mServers.end()) { eQMIService svc = pIter->first; cQMIProtocolServer * pServer = pAPI->GetServer( svc ); if (pServer != 0) { // Grab the log from the server const cProtocolLog & log = pServer->GetLog(); // Grab the Signal event, if it exists cEvent & sigEvent = log.GetSignalEvent(); services[events.size()] = svc; events.push_back( &sigEvent ); } pIter++; } } TRACE( "GobiConnectionMgmt traffic thread [%u] started\n", (UINT)pthread_self() ); // Loop waiting for exit event while (bRun == true) { // Wait for activity DWORD ignoredVal, index; int nRet = WaitOnMultipleEvents( events, TRAFFIC_INTERVAL_MS, ignoredVal, index ); // Timeout if (nRet == -ETIME) { // Do nothing } // Error? else if (nRet <= 0) { TRACE( "GobiConnectionMgmt traffic thread wait error %d\n", nRet ); bRun = false; } // Exit event? else if (index == 0) { bRun = false; } else if (index < events.size()) { // Run ProcessTraffic() for this service type if (services.find( index ) != services.end()) { pAPI->ProcessTraffic( services[index] ); } } else { // Fatal error bRun = false; } } TRACE( "GobiConnectionMgmt traffic thread [%u] exited\n", (UINT)pthread_self() ); if (pAPI != 0) { pAPI->mThreadCleanupFinished = true; } return 0; } /*=========================================================================== METHOD: CallbackThread (Free Method) DESCRIPTION: Thread to execute a callback asynchronously PARAMETERS: pArg [ I ] - The cGobiCMCallback object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * CallbackThread( PVOID pArg ) { cGobiCMCallback * pCB = (cGobiCMCallback *)pArg; if (pCB == 0) { ASSERT( 0 ); return 0; } pCB->Call(); delete pCB; pCB = 0; return 0; } /*=========================================================================*/ // CGobiConnectionMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::CGobiConnectionMgmtDLL() { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::~CGobiConnectionMgmtDLL() { std::map tmpAPI = mAPI; std::map ::const_iterator pIter; pIter = tmpAPI.begin(); while (pIter != tmpAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; if (pAPI != 0) { pAPI->Cleanup(); delete pAPI; } pIter++; } mAPI.clear(); pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: CreateAPI (Public Method) DESCRIPTION: Create a new API object RETURN VALUE: GOBIHANDLE - Handle to new API object (0 upon failure) ===========================================================================*/ GOBIHANDLE CGobiConnectionMgmtDLL::CreateAPI() { pthread_mutex_lock( &mSyncSection ); cGobiConnectionMgmt * pAPI = new cGobiConnectionMgmt; if (pAPI != 0) { bool bInit = pAPI->Initialize(); if (bInit == true) { mAPI[(GOBIHANDLE)pAPI] = pAPI; } } pthread_mutex_unlock( &mSyncSection ); return (GOBIHANDLE)pAPI; } /*=========================================================================== METHOD: DeleteAPI (Public Method) DESCRIPTION: Delete an existing API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: None ===========================================================================*/ void CGobiConnectionMgmtDLL::DeleteAPI( GOBIHANDLE handle ) { pthread_mutex_lock( &mSyncSection ); std::map ::iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; delete pAPI; mAPI.erase( pIter ); } pthread_mutex_unlock( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the requested API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: cGobiConnectionMgmt * ===========================================================================*/ cGobiConnectionMgmt * CGobiConnectionMgmtDLL::GetAPI( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = 0; pthread_mutex_lock( &mSyncSection ); std::map ::const_iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { pAPI = pIter->second; } pthread_mutex_unlock( &mSyncSection ); return pAPI; } /*=========================================================================*/ // cGobiConnectionMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::cGobiConnectionMgmt() : cGobiQMICore(), mbThreadStarted( false ), mThreadID( 0 ), mThreadCleanupFinished( false ) { // Nothing to do but init those variables } /*=========================================================================== METHOD: ~cGobiConnectionMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::~cGobiConnectionMgmt() { Disconnect(); } /*=========================================================================== METHOD: ProcessTraffic (Internal Method) DESCRIPTION: Process traffic in a QMI server protocol log, this is done to exercise QMI indication related callbacks PARAMETERS: svc [ I ] - QMI Service type RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessTraffic( eQMIService svc ) { ULONG count = 0; std::map ::iterator pIter; pIter = mServers.find( svc ); if (pIter == mServers.end()) { return; } sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return; } // Grab the service ID from the service eQMIService svcID = pSvr->GetServiceType(); if (svcID == eQMI_SVC_ENUM_BEGIN) { return; } // Grab the log from the server const cProtocolLog & logSvr = pSvr->GetLog(); // New items to process? count = logSvr.GetCount(); if (count != INVALID_LOG_INDEX && count > si.mLogsProcessed) { for (ULONG i = si.mLogsProcessed; i < count; i++) { sProtocolBuffer buf = logSvr.GetBuffer( i ); if (buf.IsValid() == false) { continue; } eProtocolType pt = buf.GetType(); if (IsQMIProtocolRX( pt ) == false) { continue; } sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsIndication() == false) { continue; } ULONG msgID = qmiBuf.GetMessageID(); tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); if (pIter == mCallbacks.end()) { continue; } ULONG outLen = 0; const BYTE * pOutput = (const BYTE *)qmiBuf.GetRawContents( outLen ); tCallbackValue cv = pIter->second; cGenericCallback * pCB = 0; pCB = new cGenericCallback( cv.first, svcID, msgID, cv.second, outLen, pOutput ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } si.mLogsProcessed = count; } } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - QMI control file to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiConnectionMgmt::Connect( LPCSTR pQMIFile, std::set & services ) { std::set svcs = cGobiQMICore::Connect( pQMIFile, services ); if (svcs.size() > 0) { // Start the traffic processing thread? if (mbThreadStarted == false) { // Clear mExitEvent; mExitEvent.Clear(); pthread_create( &mThreadID, NULL, TrafficProcessThread, this ); mbThreadStarted = true; } } return svcs; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Disconnect() { // Clear all callback function pointers mCallbacks.clear(); // Exit traffic processing thread if (mbThreadStarted == true) { // Signal thread to exit mExitEvent.Set( 0 ); // If we are not being called from the thread itself then wait for // it to exit, if not then it will have to exit automatically if (pthread_self() != mThreadID) { if (mThreadID != 0) { pthread_join( mThreadID, NULL ); } } } // Clear out thread handle/ID mbThreadStarted = false; mThreadID = 0; return cGobiQMICore::Disconnect(); } /*=========================================================================== METHOD: SetGenericCallback (Public Method) DESCRIPTION: Enable/disable generic callback function PARAMETERS: svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Generic callback pointer userValue [ I ] - User value to pass back to callback RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ) { // Assume success eGobiError rc = eGOBI_ERR_NONE; tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); bool bOn = (pCallback != 0 && pIter == mCallbacks.end()); bool bOff = (pCallback == 0 && pIter != mCallbacks.end()); bool bReplace = (pCallback != 0 && pIter != mCallbacks.end()); if (bOn == true || bReplace == true) { tCallbackValue cv( pCallback, userValue ); mCallbacks[ck] = cv; } else if (bOff == true) { mCallbacks.erase( pIter ); } return rc; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/GobiConnectionMgmt/GobiConnectionMgmt.h000077500000000000000000000207031455567757300273640ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.h DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; extern "C" { // Generic callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ); }; // CallbackThread prototype // Thread to execute a callback asynchronously void * CallbackThread( PVOID pArg ); /*=========================================================================*/ // Class cGobiCMCallback /*=========================================================================*/ class cGobiCMCallback { public: // (Inline) Constructor cGobiCMCallback() { }; // (Inline) Destructor virtual ~cGobiCMCallback() { }; // (Inline) Initialize the callback object by starting the thread bool Initialize() { // Start the thread pthread_t threadID; pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); int nRC = pthread_create( &threadID, &attributes, CallbackThread, this ); if (nRC == 0) { // Success! return true; } return false; }; protected: // Call the function virtual void Call() = 0; // Function thread gets full access friend void * CallbackThread( PVOID pArg ); }; /*=========================================================================*/ // Class cGenericCallback /*=========================================================================*/ class cGenericCallback : public cGobiCMCallback { public: // (Inline) Constructor cGenericCallback( tFNGenericCallback pCallback, ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ) : mServiceID( svcID ), mMessageID( msgID ), mUserValue( userValue ), mOutputLen( 0 ), mpCallback( pCallback ) { memset( &mOutput[0], 0, QMI_MAX_BUFFER_SIZE ); if (outLen <= QMI_MAX_BUFFER_SIZE && pOut != 0) { mOutputLen = outLen; memcpy( &mOutput[0], pOut, outLen ); } }; // (Inline) Destructor virtual ~cGenericCallback() { mpCallback = 0; }; protected: /* Service ID */ ULONG mServiceID; /* Message ID */ ULONG mMessageID; /* User value */ ULONG_PTR mUserValue; /* Actual size of output content */ ULONG mOutputLen; /* Output content buffer */ BYTE mOutput[QMI_MAX_BUFFER_SIZE]; /* Callback function */ tFNGenericCallback mpCallback; // Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mServiceID, mMessageID, mUserValue, mOutputLen, (const BYTE *)&mOutput[0] ); } }; }; /*=========================================================================*/ // Class cGobiConnectionMgmt /*=========================================================================*/ class cGobiConnectionMgmt : public cGobiQMICore { public: // Constructor cGobiConnectionMgmt(); // Destructor virtual ~cGobiConnectionMgmt(); // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Enable/disable generic callback function eGobiError SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ); protected: // Process new traffic void ProcessTraffic( eQMIService svc ); /* Is there an active thread? */ bool mbThreadStarted; /* ID of traffic processing thread */ pthread_t mThreadID; /* Traffic processing thread exit event */ cEvent mExitEvent; /* Has the protocol server thread finished cleanup? */ bool mThreadCleanupFinished; /* Generic callback function key/value */ typedef std::pair tCallbackKey; typedef std::pair tCallbackValue; /* Callback functions */ std::map mCallbacks; // Traffic process thread gets full access friend VOID * TrafficProcessThread( PVOID pArg ); }; /*=========================================================================*/ // Class CGobiConnectionMgmtDLL /*=========================================================================*/ class CGobiConnectionMgmtDLL { public: // Constructor CGobiConnectionMgmtDLL(); // Destructor virtual ~CGobiConnectionMgmtDLL(); // Create a new API object GOBIHANDLE CreateAPI(); // Delete an existing API object void DeleteAPI( GOBIHANDLE handle ); // Return the requested API object cGobiConnectionMgmt * GetAPI( GOBIHANDLE handle ); protected: /* API interface object */ std::map mAPI; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern CGobiConnectionMgmtDLL gDLL; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/GobiConnectionMgmt/GobiConnectionMgmtAPI.h000077500000000000000000015572531455567757300277360ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPI.h DESCRIPTION: QUALCOMM Connection Management API for Gobi Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif /*=========================================================================*/ // Definitions /*=========================================================================*/ // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; #ifdef __cplusplus extern "C" { #endif // Geeneric callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); #ifdef __cplusplus }; #endif /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ); /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ); /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ); /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ); /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/GobiConnectionMgmt/GobiConnectionMgmtAPIEnums.h000077500000000000000000006470001455567757300307330ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIEnums.h DESCRIPTION: Declaration of the Gobi API enumerations Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Gobi API error code enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrors) eGOBI_ERR_QMI_OFFSET = 1000, }; // Enum to describe QMI AUTH AKA Result enum eQMIAUTHAKAResult:UINT8 { eQMIAUTHAKAResult_Success = 0, eQMIAUTHAKAResult_SyncFailure = 1, eQMIAUTHAKAResult_Failure = 2, }; // Enum to describe QMI AUTH AKA Version enum eQMIAUTHAKAVersion:UINT8 { eQMIAUTHAKAVersion_Version1 = 0, eQMIAUTHAKAVersion_Version2 = 1, }; // Enum to describe QMI AUTH EAP Result enum eQMIAUTHEAPResult:UINT8 { eQMIAUTHEAPResult_Success = 0, eQMIAUTHEAPResult_Failure = 1, }; // Enum to describe QMI CAT Address NPI enum eQMICATAddressNPI:UINT8 { eQMICATAddressNPI_Unknown = 0, eQMICATAddressNPI_ISDNTelephony = 1, eQMICATAddressNPI_DataNPI = 2, eQMICATAddressNPI_TelexNPI = 3, eQMICATAddressNPI_PrivateNPI = 4, eQMICATAddressNPI_ExtensionIsReserved = 15, }; // Enum to describe QMI CAT Address TON enum eQMICATAddressTON:UINT8 { eQMICATAddressTON_Unknown = 0, eQMICATAddressTON_InternationalNumber = 1, eQMICATAddressTON_NationalNumber = 2, eQMICATAddressTON_NetworkSpecificNumber = 3, }; // Enum to describe QMI CAT Address Type enum eQMICATAddressType:UINT8 { eQMICATAddressType_NoAddressGiven = 1, eQMICATAddressType_Dynamic = 2, eQMICATAddressType_IPv4 = 3, eQMICATAddressType_IPv6 = 4, }; // Enum to describe QMI CAT Alpha ID Command Type enum eQMICATAlphaIDCommandType:UINT8 { eQMICATAlphaIDCommandType_SendSMSProactiveCommand = 1, }; // Enum to describe QMI CAT Bearer enum eQMICATBearer:UINT8 { eQMICATBearer_SMS = 0, eQMICATBearer_CSD = 1, eQMICATBearer_USSD = 2, eQMICATBearer_GPRS = 3, eQMICATBearer_Default = 4, }; // Enum to describe QMI CAT Bearer Capability Repeat Indicator enum eQMICATBearerCapabilityRepeatIndicator:UINT8 { eQMICATBearerCapabilityRepeatIndicator_AlternateMode = 0, eQMICATBearerCapabilityRepeatIndicator_SequentialMode = 1, }; // Enum to describe QMI CAT CSD Bearer Name enum eQMICATCSDBearerName:UINT8 { eQMICATCSDBearerName_DataCircuitAsyncUDIOr31kHzModem = 0, eQMICATCSDBearerName_DataCircuitSyncUDIOr31kHzModem = 1, eQMICATCSDBearerName_PADAccessAsyncUDI = 2, eQMICATCSDBearerName_PacketAccessSyncUDI = 3, eQMICATCSDBearerName_DataCircuitAsyncRDI = 4, eQMICATCSDBearerName_DataCircuitSyncRDI = 5, eQMICATCSDBearerName_PADAccessAsyncRDI = 6, eQMICATCSDBearerName_PacketAccessSyncRDI = 7, }; // Enum to describe QMI CAT Call Control Result enum eQMICATCallControlResult:UINT8 { eQMICATCallControlResult_AllowedWithNoModification = 0, eQMICATCallControlResult_NotAllowed = 1, eQMICATCallControlResult_AllowedWithModification = 2, }; // Enum to describe QMI CAT Call Setup Requirement enum eQMICATCallSetupRequirement:UINT8 { eQMICATCallSetupRequirement_NoOtherCalls = 0, eQMICATCallSetupRequirement_HoldActiveCalls = 1, eQMICATCallSetupRequirement_DisconnectActiveCalls = 2, }; // Enum to describe QMI CAT Channel State enum eQMICATChannelState:UINT8 { eQMICATChannelState_ClosedState = 0, eQMICATChannelState_ListenState = 1, eQMICATChannelState_EstablishedState = 2, }; // Enum to describe QMI CAT Command Format enum eQMICATCommandFormat:UINT8 { eQMICATCommandFormat_Raw = 1, eQMICATCommandFormat_Decoded = 2, }; // Enum to describe QMI CAT Command ID enum eQMICATCommandID:UINT8 { eQMICATCommandID_DisplayText = 1, eQMICATCommandID_GetInkey = 2, eQMICATCommandID_GetInput = 3, eQMICATCommandID_LaunchBrowser = 4, eQMICATCommandID_PlayTone = 5, eQMICATCommandID_SelectItem = 6, eQMICATCommandID_SendSMS = 7, eQMICATCommandID_SendSS = 8, eQMICATCommandID_SendUSSD = 9, eQMICATCommandID_SetupCallUserConfiguration = 10, eQMICATCommandID_SetupCallAlphaDisplay = 11, eQMICATCommandID_SetupMenu = 12, eQMICATCommandID_SetupIdleText = 13, eQMICATCommandID_ProvideLocalInformationLanguage = 14, eQMICATCommandID_SendDTMF = 15, eQMICATCommandID_LanguageNotification = 16, eQMICATCommandID_SetupEventUserActivity = 17, eQMICATCommandID_SetupEventIdleScreenNotify = 18, eQMICATCommandID_SetupEventLanguageSelectionNotify = 19, eQMICATCommandID_OpenChannel = 20, eQMICATCommandID_CloseChannel = 21, eQMICATCommandID_ReceiveData = 22, eQMICATCommandID_SendData = 23, }; // Enum to describe QMI CAT Connection Element enum eQMICATConnectionElement:UINT8 { eQMICATConnectionElement_Transparent = 0, eQMICATConnectionElement_Nontransparent = 1, eQMICATConnectionElement_BothTransparentPreferred = 2, eQMICATConnectionElement_BothNontransparentPreferred = 3, }; // Enum to describe QMI CAT Data Coding Scheme enum eQMICATDataCodingScheme:UINT8 { eQMICATDataCodingScheme_7BitGSM = 0, eQMICATDataCodingScheme_8BitGSM = 1, eQMICATDataCodingScheme_UCS2 = 2, }; // Enum to describe QMI CAT Decoded Envelope Command enum eQMICATDecodedEnvelopeCommand:UINT16 { eQMICATDecodedEnvelopeCommand_MenuSelection = 1, eQMICATDecodedEnvelopeCommand_EventDownloadLanguageSelection = 2, eQMICATDecodedEnvelopeCommand_EventDownloadUserActivity = 3, eQMICATDecodedEnvelopeCommand_EventDownloadIdleScreenAvailable = 4, eQMICATDecodedEnvelopeCommand_SendCallControl = 5, }; // Enum to describe QMI CAT Deliver Error SDU enum eQMICATDeliverErrorSDU:UINT8 { eQMICATDeliverErrorSDU_No = 0, eQMICATDeliverErrorSDU_Yes = 1, eQMICATDeliverErrorSDU_NoDetect = 2, eQMICATDeliverErrorSDU_SubscribedValue = 3, }; // Enum to describe QMI CAT Delivery Order enum eQMICATDeliveryOrder:UINT8 { eQMICATDeliveryOrder_No = 0, eQMICATDeliveryOrder_Yes = 1, eQMICATDeliveryOrder_SubscribedValue = 2, }; // Enum to describe QMI CAT Display Icon Only enum eQMICATDisplayIconOnly:UINT8 { eQMICATDisplayIconOnly_DoNotDisplayTheIcon = 0, eQMICATDisplayIconOnly_DisplayOnlyTheIcon = 1, }; // Enum to describe QMI CAT Envelope Command Type enum eQMICATEnvelopeCommandType:UINT16 { eQMICATEnvelopeCommandType_MenuSelection = 1, eQMICATEnvelopeCommandType_EventDownloadUserActivity = 2, eQMICATEnvelopeCommandType_EventDownloadIdleScreenAvailable = 3, eQMICATEnvelopeCommandType_EventDownloadLanguageSelection = 4, eQMICATEnvelopeCommandType_UnknownType = 5, eQMICATEnvelopeCommandType_EventDownloadBrowserTermination = 6, }; // Enum to describe QMI CAT Help Available enum eQMICATHelpAvailable:UINT8 { eQMICATHelpAvailable_NoHelpIsAvailable = 0, eQMICATHelpAvailable_HelpIsAvailable = 1, }; // Enum to describe QMI CAT Help Request enum eQMICATHelpRequest:UINT8 { eQMICATHelpRequest_NoHelpIsRequested = 0, eQMICATHelpRequest_HelpIsRequested = 1, }; // Enum to describe QMI CAT High Priority enum eQMICATHighPriority:UINT8 { eQMICATHighPriority_DoNotClearTheScreen = 0, eQMICATHighPriority_ClearAnythingThatIsOnTheScreen = 1, }; // Enum to describe QMI CAT Icon Is Displayed enum eQMICATIconIsDisplayed:UINT8 { eQMICATIconIsDisplayed_No = 0, eQMICATIconIsDisplayed_Yes = 1, }; // Enum to describe QMI CAT Icon Qualifier enum eQMICATIconQualifier:UINT8 { eQMICATIconQualifier_IconIsSelfExplanatory = 0, eQMICATIconQualifier_IconIsNotSelfExplanatory = 1, }; // Enum to describe QMI CAT Image Coding Scheme enum eQMICATImageCodingScheme:UINT8 { eQMICATImageCodingScheme_Unknown = 0, eQMICATImageCodingScheme_Basic = 1, eQMICATImageCodingScheme_Color = 2, }; // Enum to describe QMI CAT Immediate Response enum eQMICATImmediateResponse:UINT8 { eQMICATImmediateResponse_No = 0, eQMICATImmediateResponse_Yes = 1, }; // Enum to describe QMI CAT Is CDMA SMS enum eQMICATIsCDMASMS:UINT8 { eQMICATIsCDMASMS_NotCDMASMS = 0, eQMICATIsCDMASMS_CDMASMS = 1, }; // Enum to describe QMI CAT Launch Mode enum eQMICATLaunchMode:UINT8 { eQMICATLaunchMode_LaunchIfNotAlreadyLaunched = 0, eQMICATLaunchMode_UseTheExistingBrowser = 1, eQMICATLaunchMode_CloseTheExistingBroswer = 2, }; // Enum to describe QMI CAT Next Action enum eQMICATNextAction:UINT8 { eQMICATNextAction_SetupCall = 0, eQMICATNextAction_SendSS = 1, eQMICATNextAction_SendUSSD = 2, eQMICATNextAction_SendShortMessage = 3, eQMICATNextAction_LaunchBrowser = 4, eQMICATNextAction_PlayTone = 5, eQMICATNextAction_DisplayText = 6, eQMICATNextAction_GetInkey = 7, eQMICATNextAction_GetInput = 8, eQMICATNextAction_SelectItem = 9, eQMICATNextAction_SetupMenu = 10, eQMICATNextAction_SetupIdleModeText = 11, eQMICATNextAction_EndOfTheProactiveSession = 12, eQMICATNextAction_ProvideLocalInformation = 13, }; // Enum to describe QMI CAT Notification Required enum eQMICATNotificationRequired:UINT8 { eQMICATNotificationRequired_NotificationIsNotRequired = 0, eQMICATNotificationRequired_NotificationIsRequired = 1, }; // Enum to describe QMI CAT On Demand Link Establish enum eQMICATOnDemandLinkEstablish:UINT8 { eQMICATOnDemandLinkEstablish_LinkIsNotRequired = 0, eQMICATOnDemandLinkEstablish_LinkIsRequired = 1, }; // Enum to describe QMI CAT PDP Type enum eQMICATPDPType:UINT8 { eQMICATPDPType_IP = 2, }; // Enum to describe QMI CAT Packet Data Protocol enum eQMICATPacketDataProtocol:UINT8 { eQMICATPacketDataProtocol_IP = 2, }; // Enum to describe QMI CAT Packing Required enum eQMICATPackingRequired:UINT8 { eQMICATPackingRequired_PackingIsNotRequired = 0, eQMICATPackingRequired_PackingIsRequired = 1, }; // Enum to describe QMI CAT Presentation enum eQMICATPresentation:UINT8 { eQMICATPresentation_NotSpecified = 0, eQMICATPresentation_DataValuePresentation = 1, eQMICATPresentation_NavigationPresentation = 2, }; // Enum to describe QMI CAT Proactive Session End Type enum eQMICATProactiveSessionEndType:UINT8 { eQMICATProactiveSessionEndType_EndProactiveSessionCommandReceivedFromTheCard = 1, eQMICATProactiveSessionEndType_EndProactiveSessionInternalToME = 2, }; // Enum to describe QMI CAT Redial Necessary enum eQMICATRedialNecessary:UINT8 { eQMICATRedialNecessary_RedialIsNotNecessary = 0, eQMICATRedialNecessary_RedialIsNecessary = 1, }; // Enum to describe QMI CAT Refresh Stage enum eQMICATRefreshStage:UINT16 { eQMICATRefreshStage_RefreshStart = 1, eQMICATRefreshStage_RefreshSuccess = 2, eQMICATRefreshStage_RefreshFailed = 3, }; // Enum to describe QMI CAT Response Command enum eQMICATResponseCommand:UINT8 { eQMICATResponseCommand_DisplayText = 1, eQMICATResponseCommand_GetInkey = 2, eQMICATResponseCommand_GetInput = 3, eQMICATResponseCommand_LaunchBrowser = 4, eQMICATResponseCommand_PlayTone = 5, eQMICATResponseCommand_SelectItemRequest = 6, eQMICATResponseCommand_SetupMenu = 7, eQMICATResponseCommand_SetupIdleText = 8, eQMICATResponseCommand_ProvideLocalInformationLanguage = 9, eQMICATResponseCommand_SetupEventUserActivity = 10, eQMICATResponseCommand_SetupEventIdleScreenActivity = 11, eQMICATResponseCommand_SetupEventLanguageSelectNotify = 12, eQMICATResponseCommand_LanguageNotification = 13, }; // Enum to describe QMI CAT Response Format enum eQMICATResponseFormat:UINT8 { eQMICATResponseFormat_SMSDefaultAlphabet = 0, eQMICATResponseFormat_YesOrNo = 1, eQMICATResponseFormat_NumericalOnly = 2, eQMICATResponseFormat_UCS2 = 3, eQMICATResponseFormat_ImmediateDigitResponse = 4, eQMICATResponseFormat_YesOrNoOrImmediateDigitalResponse = 5, }; // Enum to describe QMI CAT Response Packing Format enum eQMICATResponsePackingFormat:UINT8 { eQMICATResponsePackingFormat_UnpacketFormat = 0, eQMICATResponsePackingFormat_PacketFormat = 1, }; // Enum to describe QMI CAT Send Data Immediately enum eQMICATSendDataImmediately:UINT8 { eQMICATSendDataImmediately_NoStoreInTXBuffer = 0, eQMICATSendDataImmediately_Yes = 1, }; // Enum to describe QMI CAT Send Data Result enum eQMICATSendDataResult:UINT8 { eQMICATSendDataResult_Failed = 0, eQMICATSendDataResult_Success = 1, }; // Enum to describe QMI CAT Show User Input enum eQMICATShowUserInput:UINT8 { eQMICATShowUserInput_DeviceCanShowAllCharacters = 0, eQMICATShowUserInput_DeviceCanShowUserInput = 1, }; // Enum to describe QMI CAT Slot enum eQMICATSlot:UINT8 { eQMICATSlot_Slot1 = 1, eQMICATSlot_Slot2 = 2, }; // Enum to describe QMI CAT Softkey Selection enum eQMICATSoftkeySelection:UINT8 { eQMICATSoftkeySelection_SoftkeyIsNotSelected = 0, eQMICATSoftkeySelection_SoftkeyIsSelected = 1, }; // Enum to describe QMI CAT Specific Language Notfication enum eQMICATSpecificLanguageNotfication:UINT8 { eQMICATSpecificLanguageNotfication_No = 0, eQMICATSpecificLanguageNotfication_Yes = 1, }; // Enum to describe QMI CAT Time Units enum eQMICATTimeUnits:UINT8 { eQMICATTimeUnits_Minutes = 0, eQMICATTimeUnits_Seconds = 1, eQMICATTimeUnits_TenthsOfSeconds = 2, }; // Enum to describe QMI CAT Tone enum eQMICATTone:UINT8 { eQMICATTone_DialTone = 1, eQMICATTone_CalledSubscriberBusy = 2, eQMICATTone_Congestion = 3, eQMICATTone_RadioPathAck = 4, eQMICATTone_RadioPathNotAvailableCallDrop = 5, eQMICATTone_ErrorTone = 6, eQMICATTone_CallWaitingTone = 7, eQMICATTone_RingingTone = 8, eQMICATTone_GeneralBeep = 9, eQMICATTone_PositiveAckTone = 10, eQMICATTone_NegativeAckTone = 11, eQMICATTone_RingingToneSelectedByUser = 12, eQMICATTone_SMSAlertToneSelectedByUser = 13, }; // Enum to describe QMI CAT Traffic Class enum eQMICATTrafficClass:UINT8 { eQMICATTrafficClass_Conversational = 0, eQMICATTrafficClass_Streaming = 1, eQMICATTrafficClass_Interactive = 2, eQMICATTrafficClass_Background = 3, eQMICATTrafficClass_SubscribedValue = 4, }; // Enum to describe QMI CAT Transport Protocol enum eQMICATTransportProtocol:UINT8 { eQMICATTransportProtocol_NotPresent = 0, eQMICATTransportProtocol_UDP = 1, eQMICATTransportProtocol_TCP = 2, }; // Enum to describe QMI CAT USSD Data Coding Scheme enum eQMICATUSSDDataCodingScheme:UINT8 { eQMICATUSSDDataCodingScheme_7BitGSM = 0, eQMICATUSSDDataCodingScheme_8BitGSM = 1, eQMICATUSSDDataCodingScheme_8BitUCS2 = 2, eQMICATUSSDDataCodingScheme_7BitUCS2 = 3, }; // Enum to describe QMI CAT User Confirmed enum eQMICATUserConfirmed:UINT8 { eQMICATUserConfirmed_No = 0, eQMICATUserConfirmed_Yes = 1, }; // Enum to describe QMI CAT User Control enum eQMICATUserControl:UINT8 { eQMICATUserControl_DoNotAllowUserToClearTheScreen = 0, eQMICATUserControl_AllowUserToClearTheScreen = 1, }; // Enum to describe QMI CTL Driver Data Formats enum eQMICTLDriverDataFormats { eQMICTLDriverDataFormats_QoSFlowHeaderAbsent = 0, eQMICTLDriverDataFormats_QoSFlowHeaderPresent = 1, }; // Enum to describe QMI CTL Power Save States enum eQMICTLPowerSaveStates { eQMICTLPowerSaveStates_Normal = 0, eQMICTLPowerSaveStates_Suspend = 1, eQMICTLPowerSaveStates_Powerdown = 2, }; // Enum to describe QMI CTL Service Types enum eQMICTLServiceTypes { eQMICTLServiceTypes_Control = 0, eQMICTLServiceTypes_WDS = 1, eQMICTLServiceTypes_DMS = 2, eQMICTLServiceTypes_NAS = 3, eQMICTLServiceTypes_QOS = 4, eQMICTLServiceTypes_WMS = 5, eQMICTLServiceTypes_PDS = 6, eQMICTLServiceTypes_AUTH = 7, eQMICTLServiceTypes_CAT = 224, eQMICTLServiceTypes_RMS = 225, eQMICTLServiceTypes_OMA = 226, }; // Enum to describe QMI Call End Reasons enum eQMICallEndReasons:UINT16 { eQMICallEndReasons_Unknown = 0, eQMICallEndReasons_Unspecified = 1, eQMICallEndReasons_ClientEnd = 2, eQMICallEndReasons_NoService = 3, eQMICallEndReasons_Fade = 4, eQMICallEndReasons_ReleaseNormal = 5, eQMICallEndReasons_AccInProgress = 6, eQMICallEndReasons_AccFailed = 7, eQMICallEndReasons_RedirectOrHandoff = 8, eQMICallEndReasons_CloseInProgress = 9, eQMICallEndReasons_AuthenticationFailed = 10, eQMICallEndReasons_InternalError = 11, eQMICallEndReasons_CDMALock = 500, eQMICallEndReasons_Intercept = 501, eQMICallEndReasons_Reorder = 502, eQMICallEndReasons_ReleaseServiceOptionRejected = 503, eQMICallEndReasons_IncomingCall = 504, eQMICallEndReasons_AlertStop = 505, eQMICallEndReasons_Activation = 506, eQMICallEndReasons_MaxAccessProbe = 507, eQMICallEndReasons_CCSNotSupportedByBS = 508, eQMICallEndReasons_NoResponseFromBS = 509, eQMICallEndReasons_RejectedByBS = 510, eQMICallEndReasons_Incompatible = 511, eQMICallEndReasons_AlreadyInTC = 512, eQMICallEndReasons_UserCallOrigDuringGPS = 513, eQMICallEndReasons_UserCallOrigDuringSMS = 514, eQMICallEndReasons_NoCDMAService = 515, eQMICallEndReasons_ConfFailed = 1000, eQMICallEndReasons_IncomingRejected = 1001, eQMICallEndReasons_NoGWService = 1002, eQMICallEndReasons_NetworkEnd = 1003, eQMICallEndReasons_LLCOrSNDCPFailure = 1004, eQMICallEndReasons_InsufficientResources = 1005, eQMICallEndReasons_ServiceOptionOutOfOrder = 1006, eQMICallEndReasons_NSAPIAlreadyUsed = 1007, eQMICallEndReasons_RegularPDPContextDeactivation = 1008, eQMICallEndReasons_NetworkFailure = 1009, eQMICallEndReasons_ReactivationRequested = 1010, eQMICallEndReasons_ProtocolError = 1011, eQMICallEndReasons_OperatorDeterminedBarring = 1012, eQMICallEndReasons_UnknownOrMissingAPN = 1013, eQMICallEndReasons_UnknownPDPAddressOrPDPType = 1014, eQMICallEndReasons_ActivationRejectedByGGSN = 1015, eQMICallEndReasons_ActivationRejectedUnspecified = 1016, eQMICallEndReasons_ServiceOptionNotSupported = 1017, eQMICallEndReasons_RequestedServiceOptionNotSubscribed = 1018, eQMICallEndReasons_QoSNotAccepted = 1019, eQMICallEndReasons_SemanticErrorInTheTFTOperation = 1020, eQMICallEndReasons_SyntacticalErrorInTheTFTOperation = 1021, eQMICallEndReasons_UnknownPDPContext = 1022, eQMICallEndReasons_SemanticErrorsInPacketFilters = 1023, eQMICallEndReasons_SyntacticalErrorsInPacketFilters = 1024, eQMICallEndReasons_PDPContextWithoutTFTAlreadyActivated = 1025, eQMICallEndReasons_InvalidTransactionIdentifierValue = 1026, eQMICallEndReasons_SemanticallyIncorrectMessage = 1027, eQMICallEndReasons_InvalidMandatoryInformation = 1028, eQMICallEndReasons_MessageTypeNonExistent = 1029, eQMICallEndReasons_MessageNotCompatibleWithState = 1030, eQMICallEndReasons_InformationElementNonexistent = 1031, eQMICallEndReasons_ConditionalInformationElementError = 1032, eQMICallEndReasons_MessageNotCompatibleWithProtocolState = 1033, eQMICallEndReasons_APNRestrictionValueIncompatibleWithActivePDPContext = 1034, eQMICallEndReasons_NoGPRSContextPresent = 1035, eQMICallEndReasons_RequestedFeatureNotSupported = 1036, eQMICallEndReasons_CDGenOrBusy = 1500, eQMICallEndReasons_CDBillOrAuth = 1501, eQMICallEndReasons_ChangeHDR = 1502, eQMICallEndReasons_ExitHDR = 1503, eQMICallEndReasons_HDRNoSession = 1504, eQMICallEndReasons_HDROrigDuringGPSFix = 1505, eQMICallEndReasons_HDRCSTimeout = 1506, eQMICallEndReasons_HDRReleasedByCM = 1507, }; // Enum to describe QMI Call History Types enum eQMICallHistoryTypes:UINT8 { eQMICallHistoryTypes_Full = 0, eQMICallHistoryTypes_IDsOnly = 1, }; // Enum to describe QMI Call Types enum eQMICallTypes:UINT8 { eQMICallTypes_NDIS = 0, eQMICallTypes_DUN = 1, }; // Enum to describe QMI Connection Status enum eQMIConnectionStatus:UINT8 { eQMIConnectionStatus_Disconnected = 1, eQMIConnectionStatus_Connected = 2, eQMIConnectionStatus_Suspended = 3, eQMIConnectionStatus_Authenticating = 4, }; // Enum to describe QMI DMS Activation States enum eQMIDMSActivationStates:UINT16 { eQMIDMSActivationStates_ServiceNotActivated = 0, eQMIDMSActivationStates_SerivceActivated = 1, eQMIDMSActivationStates_ActivationConnecting = 2, eQMIDMSActivationStates_ActivationInProgress = 3, eQMIDMSActivationStates_OTASPSecurityAuthenticated = 4, eQMIDMSActivationStates_OTASPNAMDownloaded = 5, eQMIDMSActivationStates_OTASPMDNDownloaded = 6, eQMIDMSActivationStates_OTASPIMSIDownloaded = 7, eQMIDMSActivationStates_OTASPPRLDownloaded = 8, eQMIDMSActivationStates_OTASPSPCDownloaded = 9, eQMIDMSActivationStates_OTASPSettingsCommitted = 10, }; // Enum to describe QMI DMS Activation Types enum eQMIDMSActivationTypes { eQMIDMSActivationTypes_OTASP = 0, }; // Enum to describe QMI DMS Data Service Capabilities 1 enum eQMIDMSDataServiceCapabilities1:UINT8 { eQMIDMSDataServiceCapabilities1_NoDataServicesSupported = 0, eQMIDMSDataServiceCapabilities1_OnlyCircuitSwitched = 1, eQMIDMSDataServiceCapabilities1_OnlyPacketSwitched = 2, eQMIDMSDataServiceCapabilities1_SimultaneousCircuitPacketSwitched = 3, eQMIDMSDataServiceCapabilities1_NonsimultaneousCircuitPacketSwitched = 4, }; // Enum to describe QMI DMS Image Types enum eQMIDMSImageTypes { eQMIDMSImageTypes_Modem = 0, eQMIDMSImageTypes_PRI = 1, }; // Enum to describe QMI DMS Lock States enum eQMIDMSLockStates:UINT8 { eQMIDMSLockStates_LockDisabled = 0, eQMIDMSLockStates_LockEnabled = 1, }; // Enum to describe QMI DMS Operating Modes enum eQMIDMSOperatingModes:UINT8 { eQMIDMSOperatingModes_Online = 0, eQMIDMSOperatingModes_LowPower = 1, eQMIDMSOperatingModes_FactoryTestMode = 2, eQMIDMSOperatingModes_Offline = 3, eQMIDMSOperatingModes_Reset = 4, eQMIDMSOperatingModes_Shutdown = 5, eQMIDMSOperatingModes_PersistentLowPower = 6, eQMIDMSOperatingModes_ModeOnlyLowPower = 7, }; // Enum to describe QMI DMS PIN Status enum eQMIDMSPINStatus:UINT8 { eQMIDMSPINStatus_PINUninitialized = 0, eQMIDMSPINStatus_PINEnabledUnverified = 1, eQMIDMSPINStatus_PINEnabledVerified = 2, eQMIDMSPINStatus_PINDisabled = 3, eQMIDMSPINStatus_PINBlocked = 4, eQMIDMSPINStatus_PINBlockedPermanently = 5, eQMIDMSPINStatus_PINUnblocked = 6, eQMIDMSPINStatus_PINChanged = 7, }; // Enum to describe QMI DMS Power Sources enum eQMIDMSPowerSources:UINT8 { eQMIDMSPowerSources_Battery = 0, eQMIDMSPowerSources_External = 1, }; // Enum to describe QMI DMS Radio Interfaces enum eQMIDMSRadioInterfaces:UINT8 { eQMIDMSRadioInterfaces_CDMA20001x = 1, eQMIDMSRadioInterfaces_CDMA2000HRPD = 2, eQMIDMSRadioInterfaces_GSM = 4, eQMIDMSRadioInterfaces_UMTS = 5, eQMIDMSRadioInterfaces_LTE = 8, }; // Enum to describe QMI DMS Time References enum eQMIDMSTimeReferences:UINT32 { eQMIDMSTimeReferences_User = 0, }; // Enum to describe QMI DMS Timestamp Sources enum eQMIDMSTimestampSources:UINT16 { eQMIDMSTimestampSources_Device = 0, eQMIDMSTimestampSources_CDMANetwork = 1, eQMIDMSTimestampSources_CDMA1xEVDONetwork = 2, eQMIDMSTimestampSources_GSMNetwork = 3, eQMIDMSTimestampSources_WCDMANetwork = 4, eQMIDMSTimestampSources_GPSNetwork = 5, eQMIDMSTimestampSources_MFLONetwork = 6, }; // Enum to describe QMI DMS UIM Facility enum eQMIDMSUIMFacility:UINT8 { eQMIDMSUIMFacility_PNNetworkPersonalization = 0, eQMIDMSUIMFacility_PUNetworkSubsetPersonalization = 1, eQMIDMSUIMFacility_PPServiceProviderPersonalization = 2, eQMIDMSUIMFacility_PCCorporatePersonalization = 3, eQMIDMSUIMFacility_PFUIMPersonalization = 4, }; // Enum to describe QMI DMS UIM Facility States enum eQMIDMSUIMFacilityStates:UINT8 { eQMIDMSUIMFacilityStates_Deactivated = 0, eQMIDMSUIMFacilityStates_Activated = 1, eQMIDMSUIMFacilityStates_Block = 2, }; // Enum to describe QMI DMS UIM States enum eQMIDMSUIMStates:UINT8 { eQMIDMSUIMStates_InitializationCompleted = 0, eQMIDMSUIMStates_InitializationFailed = 1, eQMIDMSUIMStates_NotPresent = 2, eQMIDMSUIMStates_StateUnavailable = 255, }; // Enum to describe QMI Data Bearer Technologies enum eQMIDataBearerTechnologies:UINT8 { eQMIDataBearerTechnologies_CDMA20001x = 1, eQMIDataBearerTechnologies_CDMA20001xEVDORev0 = 2, eQMIDataBearerTechnologies_GPRS = 3, eQMIDataBearerTechnologies_WCDMA = 4, eQMIDataBearerTechnologies_CDMA20001xEVDORevA = 5, eQMIDataBearerTechnologies_EGPRS = 6, eQMIDataBearerTechnologies_HSDPAWCDMA = 7, eQMIDataBearerTechnologies_WCDMAHSUPA = 8, eQMIDataBearerTechnologies_HSDPAHSUPA = 9, eQMIDataBearerTechnologies_LTE = 10, eQMIDataBearerTechnologies_CDMA2000EHRPD = 11, eQMIDataBearerTechnologies_HSDPAPlusWCDMA = 12, eQMIDataBearerTechnologies_HSDPAPlusHSUPA = 13, eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA = 14, eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA = 15, eQMIDataBearerTechnologies_Unknown = 255, }; // Enum to describe QMI Dormancy Status enum eQMIDormancyStatus:UINT8 { eQMIDormancyStatus_TrafficChannelDormant = 1, eQMIDormancyStatus_TrafficChannelActive = 2, }; // Enum to describe QMI Erroneous SDU Deliveries enum eQMIErroneousSDUDeliveries:UINT8 { eQMIErroneousSDUDeliveries_Subscribe = 0, eQMIErroneousSDUDeliveries_NoDetection = 1, eQMIErroneousSDUDeliveries_ErroneousSDUIsDelivered = 2, eQMIErroneousSDUDeliveries_ErroneousSDUIsNotDelivered = 3, }; // Enum to describe QMI Errors enum eQMIErrors:UINT16 { eQMIErrors_None = 0, eQMIErrors_MalformedMessage = 1, eQMIErrors_NoMemory = 2, eQMIErrors_Internal = 3, eQMIErrors_Aborted = 4, eQMIErrors_ClientIDsExhausted = 5, eQMIErrors_UnabortableTransaction = 6, eQMIErrors_InvalidClientID = 7, eQMIErrors_NoThresholdsProvided = 8, eQMIErrors_InvalidHandle = 9, eQMIErrors_InvalidProfile = 10, eQMIErrors_InvalidPINID = 11, eQMIErrors_IncorrectPIN = 12, eQMIErrors_NoNetworkFound = 13, eQMIErrors_CallFailed = 14, eQMIErrors_OutOfCall = 15, eQMIErrors_NotProvisioned = 16, eQMIErrors_MissingArgument = 17, eQMIErrors_ArgumentTooLong = 19, eQMIErrors_InvalidTransactionID = 22, eQMIErrors_DeviceInUse = 23, eQMIErrors_NetworkUnsupported = 24, eQMIErrors_DeviceUnsupported = 25, eQMIErrors_NoEffect = 26, eQMIErrors_NoFreeProfile = 27, eQMIErrors_InvalidPDPType = 28, eQMIErrors_InvalidTechnologyPreference = 29, eQMIErrors_InvalidProfileType = 30, eQMIErrors_InvalidServiceType = 31, eQMIErrors_InvalidRegisterAction = 32, eQMIErrors_InvalidPSAttachAction = 33, eQMIErrors_AuthenticationFailed = 34, eQMIErrors_PINBlocked = 35, eQMIErrors_PINAlwaysBlocked = 36, eQMIErrors_UIMUninitialized = 37, eQMIErrors_MaximumQoSRequestsInUse = 38, eQMIErrors_IncorrectFlowFilter = 39, eQMIErrors_NetworkQoSUnaware = 40, eQMIErrors_InvalidQoSID = 41, eQMIErrors_QoSUnavailable = 42, eQMIErrors_FlowSuspended = 43, eQMIErrors_GeneralError = 46, eQMIErrors_UnknownError = 47, eQMIErrors_InvalidArgument = 48, eQMIErrors_InvalidIndex = 49, eQMIErrors_NoEntry = 50, eQMIErrors_DeviceStorageFull = 51, eQMIErrors_DeviceNotReady = 52, eQMIErrors_NetworkNotReady = 53, eQMIErrors_WMSCauseCode = 54, eQMIErrors_WMSMessageNotSent = 55, eQMIErrors_WMSMessageDeliveryFailure = 56, eQMIErrors_WMSInvalidMessageID = 57, eQMIErrors_WMSEncoding = 58, eQMIErrors_AuthenticationLock = 59, eQMIErrors_InvalidTransition = 60, eQMIErrors_SessionInactive = 65, eQMIErrors_SessionInvalid = 66, eQMIErrors_SessionOwnership = 67, eQMIErrors_InsufficientResources = 68, eQMIErrors_Disabled = 69, eQMIErrors_InvalidOperation = 70, eQMIErrors_InvalidQMICommand = 71, eQMIErrors_WMSTPDUType = 72, eQMIErrors_WMSSMSCAddress = 73, eQMIErrors_InformationUnavailable = 74, eQMIErrors_SegmentTooLong = 75, eQMIErrors_SegmentOrder = 76, eQMIErrors_BundlingNotSupported = 77, eQMIErrors_SIMFileNotFound = 80, eQMIErrors_AccessDenied = 82, eQMIErrors_HardwareRestricted = 83, eQMIErrors_CATEventRegistrationFailed = 61441, eQMIErrors_CATInvalidTerminalResponse = 61442, eQMIErrors_CATInvalidEnvelopeCommand = 61443, eQMIErrors_CATEnvelopeCommandBusy = 61444, eQMIErrors_CATEnvelopeCommandFailed = 61445, }; // Enum to describe QMI HA/AAA Key States enum eQMIHAAAAKeyStates:UINT8 { eQMIHAAAAKeyStates_Unset = 0, eQMIHAAAAKeyStates_SetDefault = 1, eQMIHAAAAKeyStates_SetModified = 2, }; // Enum to describe QMI LOC Altitude Assumed enum eQMILOCAltitudeAssumed:UINT32 { eQMILOCAltitudeAssumed_AltitudeIsCalculated = 0, eQMILOCAltitudeAssumed_AltitudeIsAssumed = 1, }; // Enum to describe QMI LOC Altitude Source enum eQMILOCAltitudeSource:UINT32 { eQMILOCAltitudeSource_Unknown = 0, eQMILOCAltitudeSource_GPS = 1, eQMILOCAltitudeSource_CellID = 2, eQMILOCAltitudeSource_EnhancedCellID = 3, eQMILOCAltitudeSource_WiFi = 4, eQMILOCAltitudeSource_Terrestrial = 5, eQMILOCAltitudeSource_TirrestrialHybrid = 6, eQMILOCAltitudeSource_AltitudeDatabase = 7, eQMILOCAltitudeSource_BarometricAltimeter = 8, eQMILOCAltitudeSource_Other = 9, }; // Enum to describe QMI LOC Connection Request Type enum eQMILOCConnectionRequestType { eQMILOCConnectionRequestType_Open = 1, eQMILOCConnectionRequestType_Close = 2, }; // Enum to describe QMI LOC Connection Status enum eQMILOCConnectionStatus:UINT32 { eQMILOCConnectionStatus_Success = 1, eQMILOCConnectionStatus_Failure = 2, }; // Enum to describe QMI LOC Control Mode enum eQMILOCControlMode:UINT32 { eQMILOCControlMode_Automatic = 0, eQMILOCControlMode_Forced = 1, }; // Enum to describe QMI LOC Coverage enum eQMILOCCoverage:UINT32 { eQMILOCCoverage_NotSpecified = 0, eQMILOCCoverage_Point = 1, eQMILOCCoverage_Full = 2, }; // Enum to describe QMI LOC Cradle Mount State enum eQMILOCCradleMountState:UINT32 { eQMILOCCradleMountState_NotMounted = 0, eQMILOCCradleMountState_Mounted = 1, eQMILOCCradleMountState_Unknown = 2, }; // Enum to describe QMI LOC Data Coding Scheme enum eQMILOCDataCodingScheme:UINT32 { eQMILOCDataCodingScheme_German = 12, eQMILOCDataCodingScheme_English = 13, eQMILOCDataCodingScheme_Italian = 14, eQMILOCDataCodingScheme_French = 15, eQMILOCDataCodingScheme_Spanish = 16, eQMILOCDataCodingScheme_Dutch = 17, eQMILOCDataCodingScheme_Swedish = 18, eQMILOCDataCodingScheme_Danish = 19, eQMILOCDataCodingScheme_Portuguese = 20, eQMILOCDataCodingScheme_Finnish = 21, eQMILOCDataCodingScheme_Norwegian = 22, eQMILOCDataCodingScheme_Greek = 23, eQMILOCDataCodingScheme_Turkish = 24, eQMILOCDataCodingScheme_Hungarian = 25, eQMILOCDataCodingScheme_Polish = 26, eQMILOCDataCodingScheme_Unspecified = 27, eQMILOCDataCodingScheme_UTF8 = 28, eQMILOCDataCodingScheme_UCS2 = 29, eQMILOCDataCodingScheme_GSMDefault = 30, }; // Enum to describe QMI LOC Encoding Scheme enum eQMILOCEncodingScheme:UINT32 { eQMILOCEncodingScheme_Octet = 0, eQMILOCEncodingScheme_EXNProtocolMessage = 1, eQMILOCEncodingScheme_ASCII = 2, eQMILOCEncodingScheme_IA5 = 3, eQMILOCEncodingScheme_Unicode = 4, eQMILOCEncodingScheme_ShiftJIS = 5, eQMILOCEncodingScheme_Korean = 6, eQMILOCEncodingScheme_LatinHebrew = 7, eQMILOCEncodingScheme_Latin = 8, eQMILOCEncodingScheme_GSM = 9, }; // Enum to describe QMI LOC Engine State enum eQMILOCEngineState { eQMILOCEngineState_On = 1, eQMILOCEngineState_Off = 2, }; // Enum to describe QMI LOC Fix Recurrence Type enum eQMILOCFixRecurrenceType:UINT32 { eQMILOCFixRecurrenceType_RequestPeriodicFixes = 1, eQMILOCFixRecurrenceType_RequestSingleFix = 2, }; // Enum to describe QMI LOC Format Type enum eQMILOCFormatType:UINT32 { eQMILOCFormatType_LogicalName = 0, eQMILOCFormatType_EmailAddress = 1, eQMILOCFormatType_MSISDN = 2, eQMILOCFormatType_URL = 3, eQMILOCFormatType_SIPURL = 4, eQMILOCFormatType_MIN = 5, eQMILOCFormatType_MDN = 6, eQMILOCFormatType_IMSPublicIdentity = 7, eQMILOCFormatType_OSSUnknown = 2147483647, }; // Enum to describe QMI LOC Health Status enum eQMILOCHealthStatus:UINT8 { eQMILOCHealthStatus_Unhealthy = 0, eQMILOCHealthStatus_Healthy = 1, }; // Enum to describe QMI LOC Horizontal Accuracy enum eQMILOCHorizontalAccuracy:UINT32 { eQMILOCHorizontalAccuracy_Low = 1, eQMILOCHorizontalAccuracy_Medium = 2, eQMILOCHorizontalAccuracy_High = 3, }; // Enum to describe QMI LOC Intermediate Report State enum eQMILOCIntermediateReportState:UINT32 { eQMILOCIntermediateReportState_Enable = 1, eQMILOCIntermediateReportState_Disable = 2, }; // Enum to describe QMI LOC Linkage enum eQMILOCLinkage:UINT32 { eQMILOCLinkage_NotSpecified = 0, eQMILOCLinkage_FullyInterdependent = 1, eQMILOCLinkage_DependsOnLatLong = 2, eQMILOCLinkage_FullyIndependent = 3, }; // Enum to describe QMI LOC Location Server Type enum eQMILOCLocationServerType:UINT32 { eQMILOCLocationServerType_CDMAPDE = 1, eQMILOCLocationServerType_CDMAMPC = 2, eQMILOCLocationServerType_UMTSSLP = 3, eQMILOCLocationServerType_CustomPDE = 4, }; // Enum to describe QMI LOC Location Type enum eQMILOCLocationType:UINT32 { eQMILOCLocationType_CurrentLocation = 1, eQMILOCLocationType_CurrentOrLastKnownLocation = 2, eQMILOCLocationType_InitialLocation = 4, }; // Enum to describe QMI LOC Lock Type enum eQMILOCLockType:UINT32 { eQMILOCLockType_LockNone = 1, eQMILOCLockType_LockMI = 2, eQMILOCLockType_LockMT = 3, eQMILOCLockType_LockAll = 4, }; // Enum to describe QMI LOC Notification Type enum eQMILOCNotificationType:UINT32 { eQMILOCNotificationType_NoNotifyOrVerify = 1, eQMILOCNotificationType_NotifyOnly = 2, eQMILOCNotificationType_AllowNoResponse = 3, eQMILOCNotificationType_ResponseRequired = 4, eQMILOCNotificationType_PrivacyOverride = 5, }; // Enum to describe QMI LOC Operation Mode enum eQMILOCOperationMode:UINT32 { eQMILOCOperationMode_Default = 1, eQMILOCOperationMode_MSB = 2, eQMILOCOperationMode_MSA = 3, eQMILOCOperationMode_StandAlone = 4, eQMILOCOperationMode_CellID = 5, }; // Enum to describe QMI LOC Orbits Format Type enum eQMILOCOrbitsFormatType:UINT32 { eQMILOCOrbitsFormatType_PredictedOrbitsXTRA = 0, }; // Enum to describe QMI LOC PDN Type enum eQMILOCPDNType:UINT32 { eQMILOCPDNType_IPv4 = 1, eQMILOCPDNType_IPv6 = 2, eQMILOCPDNType_IPv4OrIPv6 = 3, eQMILOCPDNType_PPP = 4, }; // Enum to describe QMI LOC Position enum eQMILOCPosition:UINT32 { eQMILOCPosition_AGPSSetAssisted = 1, eQMILOCPosition_AGPSSetBased = 2, eQMILOCPosition_AGPSSetAssistedPreference = 3, eQMILOCPosition_AGPSSetBasedPreference = 4, eQMILOCPosition_AutonomousGPS = 5, eQMILOCPosition_AFLT = 6, eQMILOCPosition_ECID = 7, eQMILOCPosition_EOTD = 8, eQMILOCPosition_OTDOA = 9, eQMILOCPosition_NoPosition = 10, }; // Enum to describe QMI LOC Position Mode enum eQMILOCPositionMode:UINT32 { eQMILOCPositionMode_AssistedOnly = 1, eQMILOCPositionMode_BasedOnly = 2, eQMILOCPositionMode_AssistedPreferredBasedAllowed = 3, eQMILOCPositionMode_BasedPreferredAssistedAllowed = 4, }; // Enum to describe QMI LOC Power State enum eQMILOCPowerState:UINT32 { eQMILOCPowerState_NotConnected = 0, eQMILOCPowerState_Connected = 1, eQMILOCPowerState_Unknown = 2, }; // Enum to describe QMI LOC Reliability enum eQMILOCReliability:UINT32 { eQMILOCReliability_NotSet = 0, eQMILOCReliability_VeryLow = 1, eQMILOCReliability_Low = 2, eQMILOCReliability_Medium = 3, eQMILOCReliability_High = 4, }; // Enum to describe QMI LOC Request Type enum eQMILOCRequestType:UINT32 { eQMILOCRequestType_StartPeriodicHighFrequencyFixes = 0, eQMILOCRequestType_StartPeriodicKeepWarmFixes = 1, eQMILOCRequestType_StopPeriodicFixes = 2, }; // Enum to describe QMI LOC SUPL Version enum eQMILOCSUPLVersion:UINT32 { eQMILOCSUPLVersion_10 = 1, eQMILOCSUPLVersion_20 = 2, }; // Enum to describe QMI LOC Satellite Status enum eQMILOCSatelliteStatus:UINT32 { eQMILOCSatelliteStatus_Idle = 1, eQMILOCSatelliteStatus_Searching = 2, eQMILOCSatelliteStatus_Tracking = 3, }; // Enum to describe QMI LOC Sensor Usage enum eQMILOCSensorUsage:UINT32 { eQMILOCSensorUsage_SensorUseEnabled = 0, eQMILOCSensorUsage_SensorUseDisabled = 1, }; // Enum to describe QMI LOC Service Interaction Type enum eQMILOCServiceInteractionType:UINT32 { eQMILOCServiceInteractionType_OngoingNIIncomingMO = 1, }; // Enum to describe QMI LOC Session State enum eQMILOCSessionState:UINT32 { eQMILOCSessionState_Started = 1, eQMILOCSessionState_Finished = 2, }; // Enum to describe QMI LOC Session Status enum eQMILOCSessionStatus:UINT32 { eQMILOCSessionStatus_Success = 0, eQMILOCSessionStatus_InProgress = 1, eQMILOCSessionStatus_GeneralFailure = 2, eQMILOCSessionStatus_Timeout = 3, eQMILOCSessionStatus_UserEnded = 4, eQMILOCSessionStatus_BadParameter = 5, eQMILOCSessionStatus_PhoneOffline = 6, eQMILOCSessionStatus_EngineLocked = 7, }; // Enum to describe QMI LOC Stationary Status enum eQMILOCStationaryStatus { eQMILOCStationaryStatus_DeviceIsNotStationary = 0, eQMILOCStationaryStatus_DeviceIsStationary = 1, }; // Enum to describe QMI LOC Status enum eQMILOCStatus { eQMILOCStatus_Success = 0, eQMILOCStatus_GeneralFailure = 1, eQMILOCStatus_Unsupported = 2, eQMILOCStatus_InvalidParameter = 3, eQMILOCStatus_EngineBusy = 4, eQMILOCStatus_PhoneOffline = 5, eQMILOCStatus_Timeout = 6, }; // Enum to describe QMI LOC System enum eQMILOCSystem:UINT32 { eQMILOCSystem_GlobalPositioningSystem = 1, eQMILOCSystem_Galileo = 2, eQMILOCSystem_SatelliteBasedAugmentationSystem = 3, eQMILOCSystem_COMPASS = 4, eQMILOCSystem_GLONASS = 5, }; // Enum to describe QMI LOC Time Source enum eQMILOCTimeSource:UINT32 { eQMILOCTimeSource_Invalid = 0, eQMILOCTimeSource_NetworkTimeTransfer = 1, eQMILOCTimeSource_NetworkTimeTagging = 2, eQMILOCTimeSource_ExternalInput = 3, eQMILOCTimeSource_TOWDecode = 4, eQMILOCTimeSource_TOWConfirmed = 5, eQMILOCTimeSource_TOWAndWeekConfirmed = 6, eQMILOCTimeSource_NavigationSolution = 7, eQMILOCTimeSource_SolveForTime = 8, }; // Enum to describe QMI LOC User Response enum eQMILOCUserResponse:UINT32 { eQMILOCUserResponse_Accept = 1, eQMILOCUserResponse_Deny = 2, eQMILOCUserResponse_NoResponse = 3, }; // Enum to describe QMI LOC VX Version enum eQMILOCVXVersion:UINT32 { eQMILOCVXVersion_V1Only = 1, eQMILOCVXVersion_V2Only = 2, }; // Enum to describe QMI LOC WWAN Type enum eQMILOCWWANType:UINT32 { eQMILOCWWANType_Internet = 0, eQMILOCWWANType_AGNSS = 1, }; // Enum to describe QMI LOC Wi-Fi Fix Error Code enum eQMILOCWiFiFixErrorCode:UINT32 { eQMILOCWiFiFixErrorCode_Success = 0, eQMILOCWiFiFixErrorCode_WiFiNotAvailable = 1, eQMILOCWiFiFixErrorCode_NoAccessPointsFound = 2, eQMILOCWiFiFixErrorCode_Unauthorized = 3, eQMILOCWiFiFixErrorCode_ServerUnavailable = 4, eQMILOCWiFiFixErrorCode_LocationCannotBeDetermined = 5, eQMILOCWiFiFixErrorCode_Unknown = 6, }; // Enum to describe QMI LOC Wi-Fi Status enum eQMILOCWiFiStatus:UINT32 { eQMILOCWiFiStatus_Available = 1, eQMILOCWiFiStatus_Unavailable = 2, }; // Enum to describe QMI Mobile IP Modes enum eQMIMobileIPModes:UINT8 { eQMIMobileIPModes_MIPOffSimpleIPOnly = 0, eQMIMobileIPModes_MIPPreferred = 1, eQMIMobileIPModes_MIPOnly = 2, }; // Enum to describe QMI NAS AN-AAA Authentication Status enum eQMINASANAAAAuthenticationStatus:UINT8 { eQMINASANAAAAuthenticationStatus_AuthenticationFailed = 0, eQMINASANAAAAuthenticationStatus_AuthenticationSuccess = 1, eQMINASANAAAAuthenticationStatus_NoAuthenticationRequested = 2, }; // Enum to describe QMI NAS Acquisition Order enum eQMINASAcquisitionOrder:UINT32 { eQMINASAcquisitionOrder_Automatic = 0, eQMINASAcquisitionOrder_GSMThenWCDMA = 1, eQMINASAcquisitionOrder_WCDMAThenGSM = 2, }; // Enum to describe QMI NAS Active Subscription enum eQMINASActiveSubscription:UINT8 { eQMINASActiveSubscription_NotActive = 0, eQMINASActiveSubscription_Active = 1, }; // Enum to describe QMI NAS Band Classes enum eQMINASBandClasses:UINT16 { eQMINASBandClasses_CDMABandClass0 = 0, eQMINASBandClasses_CDMABandClass1 = 1, eQMINASBandClasses_CDMABandClass3 = 3, eQMINASBandClasses_CDMABandClass4 = 4, eQMINASBandClasses_CDMABandClass5 = 5, eQMINASBandClasses_CDMABandClass6 = 6, eQMINASBandClasses_CDMABandClass7 = 7, eQMINASBandClasses_CDMABandClass8 = 8, eQMINASBandClasses_CDMABandClass9 = 9, eQMINASBandClasses_CDMABandClass10 = 10, eQMINASBandClasses_CDMABandClass11 = 11, eQMINASBandClasses_CDMABandClass12 = 12, eQMINASBandClasses_CDMABandClass13 = 13, eQMINASBandClasses_CDMABandClass14 = 14, eQMINASBandClasses_CDMABandClass15 = 15, eQMINASBandClasses_CDMABandClass16 = 16, eQMINASBandClasses_CDMABandClass17 = 17, eQMINASBandClasses_CDMABandClass18 = 18, eQMINASBandClasses_CDMABandClass19 = 19, eQMINASBandClasses_GSM450 = 40, eQMINASBandClasses_GSM480 = 41, eQMINASBandClasses_GSM750 = 42, eQMINASBandClasses_GSM850 = 43, eQMINASBandClasses_GSM900Extended = 44, eQMINASBandClasses_GSM900Primary = 45, eQMINASBandClasses_GSM900Railways = 46, eQMINASBandClasses_GSM1800 = 47, eQMINASBandClasses_GSM1900 = 48, eQMINASBandClasses_WCDMA2100 = 80, eQMINASBandClasses_WCDMAPCS1900 = 81, eQMINASBandClasses_WCDMADCS1800 = 82, eQMINASBandClasses_WCDMA1700US = 83, eQMINASBandClasses_WCDMA850 = 84, eQMINASBandClasses_WCDMA800 = 85, eQMINASBandClasses_WCDMA2600 = 86, eQMINASBandClasses_WCDMA900 = 87, eQMINASBandClasses_WCDMA1700Japan = 88, eQMINASBandClasses_WCDMA1500Japan = 90, eQMINASBandClasses_WCDMA850Japan = 91, eQMINASBandClasses_EUTRABand1 = 120, eQMINASBandClasses_EUTRABand2 = 121, eQMINASBandClasses_EUTRABand3 = 122, eQMINASBandClasses_EUTRABand4 = 123, eQMINASBandClasses_EUTRABand5 = 124, eQMINASBandClasses_EUTRABand6 = 125, eQMINASBandClasses_EUTRABand7 = 126, eQMINASBandClasses_EUTRABand8 = 127, eQMINASBandClasses_EUTRABand9 = 128, eQMINASBandClasses_EUTRABand10 = 129, eQMINASBandClasses_EUTRABand11 = 130, eQMINASBandClasses_EUTRABand12 = 131, eQMINASBandClasses_EUTRABand13 = 132, eQMINASBandClasses_EUTRABand14 = 133, eQMINASBandClasses_EUTRABand17 = 134, eQMINASBandClasses_EUTRABand33 = 135, eQMINASBandClasses_EUTRABand34 = 136, eQMINASBandClasses_EUTRABand35 = 137, eQMINASBandClasses_EUTRABand36 = 138, eQMINASBandClasses_EUTRABand37 = 139, eQMINASBandClasses_EUTRABand38 = 140, eQMINASBandClasses_EUTRABand39 = 141, eQMINASBandClasses_EUTRABand40 = 142, eQMINASBandClasses_EUTRABand18 = 143, eQMINASBandClasses_EUTRABand19 = 144, eQMINASBandClasses_EUTRABand20 = 145, eQMINASBandClasses_EUTRABand21 = 146, }; // Enum to describe QMI NAS CDMA 1xEV-DO Active Protocol enum eQMINASCDMA1xEVDOActiveProtocol:UINT8 { eQMINASCDMA1xEVDOActiveProtocol_None = 0, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORel0 = 2, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelA = 3, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelB = 4, }; // Enum to describe QMI NAS CDMA 1xEV-DO Hybrid Information enum eQMINASCDMA1xEVDOHybridInformation:UINT8 { eQMINASCDMA1xEVDOHybridInformation_SystemIsNotHybrid = 0, eQMINASCDMA1xEVDOHybridInformation_SystemIsHybrid = 1, }; // Enum to describe QMI NAS CDMA 1xEV-DO Personality enum eQMINASCDMA1xEVDOPersonality:UINT8 { eQMINASCDMA1xEVDOPersonality_Unknown = 0, eQMINASCDMA1xEVDOPersonality_HRPD = 1, eQMINASCDMA1xEVDOPersonality_EHRPD = 2, }; // Enum to describe QMI NAS CS/PS Attach States enum eQMINASCSPSAttachStates:UINT8 { eQMINASCSPSAttachStates_UnknownNotApplicable = 0, eQMINASCSPSAttachStates_Attached = 1, eQMINASCSPSAttachStates_Detached = 2, }; // Enum to describe QMI NAS Call Barring Status enum eQMINASCallBarringStatus:UINT32 { eQMINASCallBarringStatus_Unknown = 4294967295u, eQMINASCallBarringStatus_NormalCallsOnly = 0, eQMINASCallBarringStatus_EmergencyCallsOnly = 1, eQMINASCallBarringStatus_NoCalls = 2, eQMINASCallBarringStatus_AllCalls = 3, }; // Enum to describe QMI NAS Cell Broadcast Caps enum eQMINASCellBroadcastCaps:UINT32 { eQMINASCellBroadcastCaps_Unknown = 0, eQMINASCellBroadcastCaps_NotSupported = 1, eQMINASCellBroadcastCaps_Supported = 2, }; // Enum to describe QMI NAS Change Duration enum eQMINASChangeDuration:UINT8 { eQMINASChangeDuration_PowerCycle = 0, eQMINASChangeDuration_Permanent = 1, }; // Enum to describe QMI NAS Concurrent Service enum eQMINASConcurrentService:UINT8 { eQMINASConcurrentService_NotAvailable = 0, eQMINASConcurrentService_Available = 1, }; // Enum to describe QMI NAS Concurrent Service Supported enum eQMINASConcurrentServiceSupported:UINT8 { eQMINASConcurrentServiceSupported_NotSupported = 0, eQMINASConcurrentServiceSupported_Supported = 1, }; // Enum to describe QMI NAS DDTM Preferences enum eQMINASDDTMPreferences:UINT8 { eQMINASDDTMPreferences_Off = 0, eQMINASDDTMPreferences_On = 1, eQMINASDDTMPreferences_NoChange = 2, }; // Enum to describe QMI NAS DTM Support enum eQMINASDTMSupport:UINT8 { eQMINASDTMSupport_NotAvailable = 0, eQMINASDTMSupport_Available = 1, }; // Enum to describe QMI NAS Data Service Capabilities 2 enum eQMINASDataServiceCapabilities2:UINT8 { eQMINASDataServiceCapabilities2_GPRS = 1, eQMINASDataServiceCapabilities2_EGPRS = 2, eQMINASDataServiceCapabilities2_HSDPA = 3, eQMINASDataServiceCapabilities2_HSUPA = 4, eQMINASDataServiceCapabilities2_WCDMA = 5, eQMINASDataServiceCapabilities2_CDMA = 6, eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 = 7, eQMINASDataServiceCapabilities2_CDMA1xEVDORevA = 8, eQMINASDataServiceCapabilities2_GSM = 9, eQMINASDataServiceCapabilities2_CDMA1xEVDORevB = 10, eQMINASDataServiceCapabilities2_LTE = 11, eQMINASDataServiceCapabilities2_HSDPAPlus = 12, eQMINASDataServiceCapabilities2_DCHSDPAPlus = 13, }; // Enum to describe QMI NAS Day Of Week enum eQMINASDayOfWeek:UINT8 { eQMINASDayOfWeek_Monday = 0, eQMINASDayOfWeek_Tuesday = 1, eQMINASDayOfWeek_Wednesday = 2, eQMINASDayOfWeek_Thursday = 3, eQMINASDayOfWeek_Friday = 4, eQMINASDayOfWeek_Saturday = 5, eQMINASDayOfWeek_Sunday = 6, }; // Enum to describe QMI NAS Daylight Savings Adjustment enum eQMINASDaylightSavingsAdjustment:UINT8 { eQMINASDaylightSavingsAdjustment_NoAdjustment = 0, eQMINASDaylightSavingsAdjustment_1HourAdjustment = 1, eQMINASDaylightSavingsAdjustment_2HourAdjustment = 2, }; // Enum to describe QMI NAS Dual Transfer Mode enum eQMINASDualTransferMode:UINT8 { eQMINASDualTransferMode_DTMNotSupported = 0, eQMINASDualTransferMode_DTMSupported = 1, }; // Enum to describe QMI NAS EGPRS Support enum eQMINASEGPRSSupport:UINT8 { eQMINASEGPRSSupport_NotAvailable = 0, eQMINASEGPRSSupport_Available = 1, }; // Enum to describe QMI NAS EV-DO Session Close Reasons enum eQMINASEVDOSessionCloseReasons:UINT32 { eQMINASEVDOSessionCloseReasons_ReacquiredNewNetwork = 0, eQMINASEVDOSessionCloseReasons_UATIResponseTimeout = 1, eQMINASEVDOSessionCloseReasons_KeepAliveTimerExpired = 2, eQMINASEVDOSessionCloseReasons_InternalDeactivation = 3, eQMINASEVDOSessionCloseReasons_ReceivedSessionCloseFromAN = 4, eQMINASEVDOSessionCloseReasons_ConnectionOpenFailure = 5, eQMINASEVDOSessionCloseReasons_ConfigurationRequestFailure = 6, eQMINASEVDOSessionCloseReasons_ConfigurationResponseFailure = 7, eQMINASEVDOSessionCloseReasons_ProtocolNegotiationFailure = 8, eQMINASEVDOSessionCloseReasons_ANInitSetupTimerExpired = 9, eQMINASEVDOSessionCloseReasons_ANInitConnectionClosed = 10, eQMINASEVDOSessionCloseReasons_ConnectionDenyReceived = 11, eQMINASEVDOSessionCloseReasons_SilentDeactivation = 12, eQMINASEVDOSessionCloseReasons_NewESN = 13, eQMINASEVDOSessionCloseReasons_ANGUAP = 14, eQMINASEVDOSessionCloseReasons_InvalidPersonalityIndex = 15, eQMINASEVDOSessionCloseReasons_UATINotMaintained = 16, eQMINASEVDOSessionCloseReasons_NewNAI = 17, eQMINASEVDOSessionCloseReasons_EHRPDCredentialsChanged = 18, }; // Enum to describe QMI NAS Forbidden States enum eQMINASForbiddenStates:UINT8 { eQMINASForbiddenStates_Unknown = 0, eQMINASForbiddenStates_Forbidden = 1, eQMINASForbiddenStates_NotForbidden = 2, }; // Enum to describe QMI NAS Force CDMA 1xEV-DO SCP enum eQMINASForceCDMA1xEVDOSCP:UINT8 { eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORev0Only = 0, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPA = 1, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPAAndEMPA = 2, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithMMPA = 3, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithEHRPD = 4, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithEHRPD = 5, }; // Enum to describe QMI NAS High Speed Call Status enum eQMINASHighSpeedCallStatus:UINT8 { eQMINASHighSpeedCallStatus_HSDPAAndHSUPANotSupported = 0, eQMINASHighSpeedCallStatus_HSDPASupported = 1, eQMINASHighSpeedCallStatus_HSUPASupported = 2, eQMINASHighSpeedCallStatus_HSDPAAndHSUPASupported = 3, eQMINASHighSpeedCallStatus_HSDPAPlusSupported = 4, eQMINASHighSpeedCallStatus_HSDPAPlusAndHSUPASupported = 5, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusSupported = 6, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAndHSUPASupported = 7, }; // Enum to describe QMI NAS In Use States enum eQMINASInUseStates:UINT8 { eQMINASInUseStates_Unknown = 0, eQMINASInUseStates_CurrentServing = 1, eQMINASInUseStates_Available = 2, }; // Enum to describe QMI NAS LTE Signal Rates enum eQMINASLTESignalRates:UINT8 { eQMINASLTESignalRates_Default = 0, eQMINASLTESignalRates_EverySecond = 1, eQMINASLTESignalRates_Every2Seconds = 2, eQMINASLTESignalRates_Every3Seconds = 3, eQMINASLTESignalRates_Every4Seconds = 4, eQMINASLTESignalRates_Every5Seconds = 5, }; // Enum to describe QMI NAS Network Description Displays enum eQMINASNetworkDescriptionDisplays:UINT8 { eQMINASNetworkDescriptionDisplays_DoNotDisplay = 0, eQMINASNetworkDescriptionDisplays_Display = 1, eQMINASNetworkDescriptionDisplays_Unknown = 255, }; // Enum to describe QMI NAS Network Description Encodings enum eQMINASNetworkDescriptionEncodings:UINT8 { eQMINASNetworkDescriptionEncodings_UnspecifiedOctet = 0, eQMINASNetworkDescriptionEncodings_ExtendedProtocolMessage = 1, eQMINASNetworkDescriptionEncodings_7BitASCII = 2, eQMINASNetworkDescriptionEncodings_IA5 = 3, eQMINASNetworkDescriptionEncodings_UNICODE = 4, eQMINASNetworkDescriptionEncodings_ShiftJIS = 5, eQMINASNetworkDescriptionEncodings_Korean = 6, eQMINASNetworkDescriptionEncodings_LatinHebrew = 7, eQMINASNetworkDescriptionEncodings_Latin = 8, eQMINASNetworkDescriptionEncodings_GSM7Bit = 9, eQMINASNetworkDescriptionEncodings_GSMDCS = 10, }; // Enum to describe QMI NAS Network Selection enum eQMINASNetworkSelection:INT8 { eQMINASNetworkSelection_AutomaticRegistration = 0, eQMINASNetworkSelection_ManualRegistration = 1, }; // Enum to describe QMI NAS PLMN Name Country Initials enum eQMINASPLMNNameCountryInitials:UINT8 { eQMINASPLMNNameCountryInitials_DoNotAddCountryInitials = 0, eQMINASPLMNNameCountryInitials_AddCountryInitials = 1, eQMINASPLMNNameCountryInitials_Unspecified = 255, }; // Enum to describe QMI NAS PLMN Name Encoding Schemes enum eQMINASPLMNNameEncodingSchemes:UINT8 { eQMINASPLMNNameEncodingSchemes_ASCII = 0, eQMINASPLMNNameEncodingSchemes_UCS2LE = 1, }; // Enum to describe QMI NAS PLMN Name Spare Bits enum eQMINASPLMNNameSpareBits:UINT8 { eQMINASPLMNNameSpareBits_Unknown = 0, eQMINASPLMNNameSpareBits_Bit8 = 1, eQMINASPLMNNameSpareBits_Bits78 = 2, eQMINASPLMNNameSpareBits_Bits68 = 3, eQMINASPLMNNameSpareBits_Bits58 = 4, eQMINASPLMNNameSpareBits_Bits48 = 5, eQMINASPLMNNameSpareBits_Bits38 = 6, eQMINASPLMNNameSpareBits_Bits28 = 7, }; // Enum to describe QMI NAS PRL Indicator enum eQMINASPRLIndicator:UINT8 { eQMINASPRLIndicator_SystemNotInPRL = 0, eQMINASPRLIndicator_SystemIsInPRL = 1, }; // Enum to describe QMI NAS PRL Preferences enum eQMINASPRLPreferences:UINT16 { eQMINASPRLPreferences_AcquireASideOnly = 1, eQMINASPRLPreferences_AcquireBSideOnly = 2, eQMINASPRLPreferences_AcquireAny = 16383, }; // Enum to describe QMI NAS PS Attach Actions enum eQMINASPSAttachActions:UINT8 { eQMINASPSAttachActions_Attach = 1, eQMINASPSAttachActions_Detach = 2, }; // Enum to describe QMI NAS Preferred Data Bath enum eQMINASPreferredDataBath:UINT8 { eQMINASPreferredDataBath_NotPreferred = 0, eQMINASPreferredDataBath_Preferred = 1, }; // Enum to describe QMI NAS Preferred States enum eQMINASPreferredStates:UINT8 { eQMINASPreferredStates_Unknown = 0, eQMINASPreferredStates_Preferred = 1, eQMINASPreferredStates_NotPreferred = 2, }; // Enum to describe QMI NAS RTRE Configuration enum eQMINASRTREConfiguration:UINT8 { eQMINASRTREConfiguration_RUIMOnly = 1, eQMINASRTREConfiguration_InternalSettingsOnly = 2, eQMINASRTREConfiguration_UseRUIMIfAvailable = 3, eQMINASRTREConfiguration_GSMOn1X = 4, }; // Enum to describe QMI NAS RX Level enum eQMINASRXLevel:UINT16 { eQMINASRXLevel_LessThan110dBm = 0, eQMINASRXLevel_110dBmto109dBm = 1, eQMINASRXLevel_109dBmto108dBm = 2, eQMINASRXLevel_108dBmto107dBm = 3, eQMINASRXLevel_107dBmto106dBm = 4, eQMINASRXLevel_106dBmto105dBm = 5, eQMINASRXLevel_105dBmto104dBm = 6, eQMINASRXLevel_104dBmto103dBm = 7, eQMINASRXLevel_103dBmto102dBm = 8, eQMINASRXLevel_102dBmto101dBm = 9, eQMINASRXLevel_101dBmto100dBm = 10, eQMINASRXLevel_100dBmto99dBm = 11, eQMINASRXLevel_99dBmto98dBm = 12, eQMINASRXLevel_98dBmto97dBm = 13, eQMINASRXLevel_97dBmto96dBm = 14, eQMINASRXLevel_96dBmto95dBm = 15, eQMINASRXLevel_95dBmto94dBm = 16, eQMINASRXLevel_94dBmto93dBm = 17, eQMINASRXLevel_93dBmto92dBm = 18, eQMINASRXLevel_92dBmto91dBm = 19, eQMINASRXLevel_91dBmto90dBm = 20, eQMINASRXLevel_90dBmto89dBm = 21, eQMINASRXLevel_89dBmto88dBm = 22, eQMINASRXLevel_88dBmto87dBm = 23, eQMINASRXLevel_87dBmto86dBm = 24, eQMINASRXLevel_86dBmto85dBm = 25, eQMINASRXLevel_85dBmto84dBm = 26, eQMINASRXLevel_84dBmto83dBm = 27, eQMINASRXLevel_83dBmto82dBm = 28, eQMINASRXLevel_82dBmto81dBm = 29, eQMINASRXLevel_81dBmto80dBm = 30, eQMINASRXLevel_80dBmto79dBm = 31, eQMINASRXLevel_79dBmto78dBm = 32, eQMINASRXLevel_78dBmto77dBm = 33, eQMINASRXLevel_77dBmto76dBm = 34, eQMINASRXLevel_76dBmto75dBm = 35, eQMINASRXLevel_75dBmto74dBm = 36, eQMINASRXLevel_74dBmto73dBm = 37, eQMINASRXLevel_73dBmto72dBm = 38, eQMINASRXLevel_72dBmto71dBm = 39, eQMINASRXLevel_71dBmto70dBm = 40, eQMINASRXLevel_70dBmto69dBm = 41, eQMINASRXLevel_69dBmto68dBm = 42, eQMINASRXLevel_68dBmto67dBm = 43, eQMINASRXLevel_67dBmto66dBm = 44, eQMINASRXLevel_66dBmto65dBm = 45, eQMINASRXLevel_65dBmto64dBm = 46, eQMINASRXLevel_64dBmto63dBm = 47, eQMINASRXLevel_63dBmto62dBm = 48, eQMINASRXLevel_62dBmto61dBm = 49, eQMINASRXLevel_61dBmto60dBm = 50, eQMINASRXLevel_60dBmto59dBm = 51, eQMINASRXLevel_59dBmto58dBm = 52, eQMINASRXLevel_58dBmto57dBm = 53, eQMINASRXLevel_57dBmto56dBm = 54, eQMINASRXLevel_56dBmto55dBm = 55, eQMINASRXLevel_55dBmto54dBm = 56, eQMINASRXLevel_54dBmto53dBm = 57, eQMINASRXLevel_53dBmto52dBm = 58, eQMINASRXLevel_52dBmto51dBm = 59, eQMINASRXLevel_51dBmto50dBm = 60, eQMINASRXLevel_50dBmto49dBm = 61, eQMINASRXLevel_49dBmto48dBm = 62, eQMINASRXLevel_GreaterThan48dBm = 63, }; // Enum to describe QMI NAS Radio Access Technologies enum eQMINASRadioAccessTechnologies:UINT8 { eQMINASRadioAccessTechnologies_GSM = 4, eQMINASRadioAccessTechnologies_UMTS = 5, eQMINASRadioAccessTechnologies_LTE = 8, }; // Enum to describe QMI NAS Radio Interfaces enum eQMINASRadioInterfaces:UINT8 { eQMINASRadioInterfaces_NoneNoService = 0, eQMINASRadioInterfaces_CDMA20001x = 1, eQMINASRadioInterfaces_CDMA2000HRPD = 2, eQMINASRadioInterfaces_AMPS = 3, eQMINASRadioInterfaces_GSM = 4, eQMINASRadioInterfaces_UMTS = 5, eQMINASRadioInterfaces_LTE = 8, }; // Enum to describe QMI NAS Radio System Modes enum eQMINASRadioSystemModes:UINT32 { eQMINASRadioSystemModes_NoService = 0, eQMINASRadioSystemModes_Acquiring = 1, eQMINASRadioSystemModes_InService = 2, }; // Enum to describe QMI NAS Register Actions enum eQMINASRegisterActions:UINT8 { eQMINASRegisterActions_Automatic = 1, eQMINASRegisterActions_Manual = 2, }; // Enum to describe QMI NAS Registered Networks enum eQMINASRegisteredNetworks:UINT8 { eQMINASRegisteredNetworks_Unknown = 0, eQMINASRegisteredNetworks_3GPP2 = 1, eQMINASRegisteredNetworks_3GPP = 2, }; // Enum to describe QMI NAS Registration States enum eQMINASRegistrationStates:UINT8 { eQMINASRegistrationStates_NASNotRegistered = 0, eQMINASRegistrationStates_NASRegistered = 1, eQMINASRegistrationStates_NASNotRegisteredSearching = 2, eQMINASRegistrationStates_NASRegistrationDenied = 3, eQMINASRegistrationStates_RegistrationStateUnknown = 4, }; // Enum to describe QMI NAS Revision enum eQMINASRevision:UINT8 { eQMINASRevision_JSTD088 = 1, eQMINASRevision_IS95RevA = 3, eQMINASRevision_IS95RevB = 4, eQMINASRevision_IS2000 = 6, eQMINASRevision_IS2000RelA = 7, eQMINASRevision_IS2000RelB = 8, eQMINASRevision_IS2000RelC = 9, eQMINASRevision_IS2000RelCMI = 10, eQMINASRevision_IS2000RelD = 11, }; // Enum to describe QMI NAS Roam Status enum eQMINASRoamStatus:UINT8 { eQMINASRoamStatus_Off = 0, eQMINASRoamStatus_On = 1, eQMINASRoamStatus_Blinking = 2, eQMINASRoamStatus_OutOfNeighborhood = 3, eQMINASRoamStatus_OutOfBuilding = 4, eQMINASRoamStatus_PreferredSystem = 5, eQMINASRoamStatus_AvailableSystem = 6, eQMINASRoamStatus_AlliancePartner = 7, eQMINASRoamStatus_PremiumPartner = 8, eQMINASRoamStatus_FullService = 9, eQMINASRoamStatus_PartialService = 10, eQMINASRoamStatus_BannerIsOn = 11, eQMINASRoamStatus_BannerIsOff = 12, }; // Enum to describe QMI NAS Roaming Indicators enum eQMINASRoamingIndicators:UINT8 { eQMINASRoamingIndicators_Roaming = 0, eQMINASRoamingIndicators_Home = 1, eQMINASRoamingIndicators_RoamingPartner = 2, }; // Enum to describe QMI NAS Roaming Preferences enum eQMINASRoamingPreferences:UINT8 { eQMINASRoamingPreferences_Automatic = 0, eQMINASRoamingPreferences_HomeOnly = 1, eQMINASRoamingPreferences_RoamingOnly = 2, eQMINASRoamingPreferences_HomeRoaming = 3, }; // Enum to describe QMI NAS Roaming Preferences 2 enum eQMINASRoamingPreferences2:UINT16 { eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorOff = 1, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotOff = 2, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotFlashing = 3, eQMINASRoamingPreferences2_AcquireAny = 255, }; // Enum to describe QMI NAS Roaming States enum eQMINASRoamingStates:UINT8 { eQMINASRoamingStates_Unknown = 0, eQMINASRoamingStates_Home = 1, eQMINASRoamingStates_Roam = 2, }; // Enum to describe QMI NAS SINR Levels enum eQMINASSINRLevels:UINT8 { eQMINASSINRLevels_Negative9dB = 0, eQMINASSINRLevels_Negative6dB = 1, eQMINASSINRLevels_Negative45dB = 2, eQMINASSINRLevels_Negative3dB = 3, eQMINASSINRLevels_Negative2dB = 4, eQMINASSINRLevels_1dB = 5, eQMINASSINRLevels_3dB = 6, eQMINASSINRLevels_6dB = 7, eQMINASSINRLevels_9dB = 8, }; // Enum to describe QMI NAS Service Domain Prefs enum eQMINASServiceDomainPrefs:UINT32 { eQMINASServiceDomainPrefs_CircuitSwitched = 0, eQMINASServiceDomainPrefs_PacketSwitched = 1, eQMINASServiceDomainPrefs_CircuitPacketSwitched = 2, eQMINASServiceDomainPrefs_PacketSwitchedAttach = 3, eQMINASServiceDomainPrefs_PacketSwitchedDetach = 4, }; // Enum to describe QMI NAS Service Domains enum eQMINASServiceDomains:UINT8 { eQMINASServiceDomains_NoService = 0, eQMINASServiceDomains_CircuitSwitched = 1, }; // Enum to describe QMI NAS Service Option Actions enum eQMINASServiceOptionActions:UINT8 { eQMINASServiceOptionActions_Add = 0, eQMINASServiceOptionActions_Replace = 1, eQMINASServiceOptionActions_Delete = 2, eQMINASServiceOptionActions_NoChange = 3, }; // Enum to describe QMI NAS Service Status enum eQMINASServiceStatus:UINT8 { eQMINASServiceStatus_NoService = 0, eQMINASServiceStatus_LimitedService = 1, eQMINASServiceStatus_ServiceAvailable = 2, eQMINASServiceStatus_LimitedRegionalService = 3, eQMINASServiceStatus_PowerSaveOrDeepSleep = 4, }; // Enum to describe QMI NAS Standby Preference enum eQMINASStandbyPreference:UINT8 { eQMINASStandbyPreference_SingleStandby = 1, eQMINASStandbyPreference_DualStandbyWithTuneAway = 2, eQMINASStandbyPreference_DualStandbyWithoutTuneAway = 4, eQMINASStandbyPreference_AutomaticModeWithTuneAway = 5, eQMINASStandbyPreference_AutomaticModeWithoutTuneAway = 6, }; // Enum to describe QMI NAS Subscription Type enum eQMINASSubscriptionType:UINT8 { eQMINASSubscriptionType_PrimarySubscription = 0, eQMINASSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI NAS System Forbidden enum eQMINASSystemForbidden:UINT8 { eQMINASSystemForbidden_SystemIsNotForbidden = 0, eQMINASSystemForbidden_SystemIsForbidden = 1, }; // Enum to describe QMI NAS System Preferences enum eQMINASSystemPreferences:UINT8 { eQMINASSystemPreferences_Automatic = 0, eQMINASSystemPreferences_AutomaticA = 1, eQMINASSystemPreferences_AutomaticB = 2, }; // Enum to describe QMI NAS System Service Capabilities enum eQMINASSystemServiceCapabilities:UINT8 { eQMINASSystemServiceCapabilities_NoService = 0, eQMINASSystemServiceCapabilities_CircuitSwitchedOnly = 1, eQMINASSystemServiceCapabilities_PacketSwitchedOnly = 2, eQMINASSystemServiceCapabilities_CircuitSwitchedAndPacketSwitched = 3, eQMINASSystemServiceCapabilities_ServiceFoundButNotRegisteredOrAttached = 4, }; // Enum to describe QMI NAS Tech Pref Durations enum eQMINASTechPrefDurations:UINT8 { eQMINASTechPrefDurations_Permanent = 0, eQMINASTechPrefDurations_PowerCycle = 1, }; // Enum to describe QMI NAS Tech Prefs enum eQMINASTechPrefs:UINT8 { eQMINASTechPrefs_Automatic = 0, eQMINASTechPrefs_3GPP2 = 1, eQMINASTechPrefs_3GPP = 2, eQMINASTechPrefs_Invalid = 3, }; // Enum to describe QMI OMA HFA Done States enum eQMIOMAHFADoneStates:UINT8 { eQMIOMAHFADoneStates_None = 0, eQMIOMAHFADoneStates_Succeeded = 1, eQMIOMAHFADoneStates_Failed = 2, }; // Enum to describe QMI OMA Selections enum eQMIOMASelections:UINT8 { eQMIOMASelections_Reject = 0, eQMIOMASelections_Accept = 1, }; // Enum to describe QMI OMA Session Failure Reasons enum eQMIOMASessionFailureReasons:UINT8 { eQMIOMASessionFailureReasons_Unknown = 0, eQMIOMASessionFailureReasons_NetworkUnavailable = 1, eQMIOMASessionFailureReasons_ServerUnavailable = 2, eQMIOMASessionFailureReasons_AuthenticationFailed = 3, eQMIOMASessionFailureReasons_MaxRetryExceeded = 4, eQMIOMASessionFailureReasons_SessionCancelled = 5, }; // Enum to describe QMI OMA Session States enum eQMIOMASessionStates:UINT8 { eQMIOMASessionStates_CompleteInfoUpdated = 0, eQMIOMASessionStates_CompleteInfoUnavailable = 1, eQMIOMASessionStates_Failed = 2, eQMIOMASessionStates_Retrying = 3, eQMIOMASessionStates_Connecting = 4, eQMIOMASessionStates_Connected = 5, eQMIOMASessionStates_Authenticated = 6, eQMIOMASessionStates_MDNDownloaded = 7, eQMIOMASessionStates_MSIDDownloaded = 8, eQMIOMASessionStates_PRLDownloaded = 9, eQMIOMASessionStates_MIPProfileDownloaded = 10, }; // Enum to describe QMI OMA Session Types enum eQMIOMASessionTypes:UINT8 { eQMIOMASessionTypes_ClientInitiatedDeviceConfigure = 0, eQMIOMASessionTypes_ClientInitiatedPRLUpdate = 1, eQMIOMASessionTypes_ClientInitiatedHandsFreeActivation = 2, eQMIOMASessionTypes_DeviceInitiatedHandsFreeActivation = 3, eQMIOMASessionTypes_NetworkInitiatedPRLUpdate = 4, eQMIOMASessionTypes_NetworkInitiatedDeviceConfigure = 5, }; // Enum to describe QMI PBM AAS Operations enum eQMIPBMAASOperations:UINT8 { eQMIPBMAASOperations_Add = 0, eQMIPBMAASOperations_Modify = 1, eQMIPBMAASOperations_Delete = 2, }; // Enum to describe QMI PBM Emergency Categories enum eQMIPBMEmergencyCategories { eQMIPBMEmergencyCategories_Police = 1, eQMIPBMEmergencyCategories_Ambulance = 2, eQMIPBMEmergencyCategories_FireBrigade = 4, eQMIPBMEmergencyCategories_MarineGuard = 8, eQMIPBMEmergencyCategories_MountainRescue = 16, eQMIPBMEmergencyCategories_ManualECall = 32, eQMIPBMEmergencyCategories_AutomaticECall = 64, eQMIPBMEmergencyCategories_Spare = 128, }; // Enum to describe QMI PBM Number Plans enum eQMIPBMNumberPlans:UINT8 { eQMIPBMNumberPlans_Unknown = 0, eQMIPBMNumberPlans_ISDN = 1, eQMIPBMNumberPlans_Data = 2, eQMIPBMNumberPlans_Telex = 3, eQMIPBMNumberPlans_National = 4, eQMIPBMNumberPlans_Private = 5, }; // Enum to describe QMI PBM Number Types enum eQMIPBMNumberTypes:UINT8 { eQMIPBMNumberTypes_Unknown = 0, eQMIPBMNumberTypes_International = 1, eQMIPBMNumberTypes_National = 2, eQMIPBMNumberTypes_NetworkSpecific = 3, eQMIPBMNumberTypes_DedicatedAccess = 4, }; // Enum to describe QMI PBM Operations enum eQMIPBMOperations:UINT8 { eQMIPBMOperations_Add = 1, eQMIPBMOperations_Modify = 2, eQMIPBMOperations_Delete = 3, }; // Enum to describe QMI PBM Phonebook Types enum eQMIPBMPhonebookTypes:UINT16 { eQMIPBMPhonebookTypes_AbbreviatedDialingNumber = 1, eQMIPBMPhonebookTypes_FixedDialingNumber = 2, eQMIPBMPhonebookTypes_MobileSubscriberIntegratedServicesDigitalNetwork = 4, eQMIPBMPhonebookTypes_MailBoxDialingNumber = 8, eQMIPBMPhonebookTypes_ServiceDialingNumber = 16, eQMIPBMPhonebookTypes_BarredDialingNumber = 32, eQMIPBMPhonebookTypes_LastNumberDialed = 64, eQMIPBMPhonebookTypes_MailBoxNumber = 128, }; // Enum to describe QMI PBM Refresh Status enum eQMIPBMRefreshStatus:UINT8 { eQMIPBMRefreshStatus_RefreshStart = 1, eQMIPBMRefreshStatus_RefreshEnd = 2, }; // Enum to describe QMI PBM Session Types enum eQMIPBMSessionTypes:UINT8 { eQMIPBMSessionTypes_GWPrimary = 0, eQMIPBMSessionTypes_1xPrimary = 1, eQMIPBMSessionTypes_GWSecondary = 2, eQMIPBMSessionTypes_1xSecondary = 3, eQMIPBMSessionTypes_NonProvisioningOnSlot1 = 4, eQMIPBMSessionTypes_NonProvisioningOnSlot2 = 5, eQMIPBMSessionTypes_GlobalPhonebookOnSlot1 = 6, eQMIPBMSessionTypes_GlobalPhonebookOnSlot2 = 7, }; // Enum to describe QMI PBM States enum eQMIPBMStates:UINT8 { eQMIPBMStates_Ready = 0, eQMIPBMStates_NotReady = 1, eQMIPBMStates_NotAvailable = 2, eQMIPBMStates_PINRestriction = 3, eQMIPBMStates_PUKRestriction = 4, eQMIPBMStates_Invalidated = 5, eQMIPBMStates_Sync = 6, }; // Enum to describe QMI PBM Subscription Types enum eQMIPBMSubscriptionTypes:UINT8 { eQMIPBMSubscriptionTypes_Primary = 0, eQMIPBMSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI PDP Types enum eQMIPDPTypes:UINT8 { eQMIPDPTypes_PDPIPv4 = 0, eQMIPDPTypes_PDPPPP = 1, eQMIPDPTypes_PDPIPv6 = 2, eQMIPDPTypes_PDPIPv4OrIPv6 = 3, }; // Enum to describe QMI PDS Altitude Source enum eQMIPDSAltitudeSource:UINT8 { eQMIPDSAltitudeSource_Unknown = 0, eQMIPDSAltitudeSource_GPS = 1, eQMIPDSAltitudeSource_CellID = 2, eQMIPDSAltitudeSource_EnhancedCellID = 3, eQMIPDSAltitudeSource_WiFi = 4, eQMIPDSAltitudeSource_Terrestrial = 5, eQMIPDSAltitudeSource_TerrestrialHybrid = 6, eQMIPDSAltitudeSource_AltitudeDatabase = 7, eQMIPDSAltitudeSource_BarometricAltimeter = 8, eQMIPDSAltitudeSource_Other = 9, }; // Enum to describe QMI PDS Blanking Enable enum eQMIPDSBlankingEnable:UINT8 { eQMIPDSBlankingEnable_DisableBlanking = 0, eQMIPDSBlankingEnable_EnableBlankingUnconditionally = 1, eQMIPDSBlankingEnable_EnableBlankingConditionally = 2, }; // Enum to describe QMI PDS Calendar Days enum eQMIPDSCalendarDays:UINT8 { eQMIPDSCalendarDays_Sunday = 0, eQMIPDSCalendarDays_Monday = 1, eQMIPDSCalendarDays_Tuesday = 2, eQMIPDSCalendarDays_Wednesday = 3, eQMIPDSCalendarDays_Thursday = 4, eQMIPDSCalendarDays_Friday = 5, eQMIPDSCalendarDays_Saturday = 6, }; // Enum to describe QMI PDS Calendar Months enum eQMIPDSCalendarMonths:UINT8 { eQMIPDSCalendarMonths_January = 0, eQMIPDSCalendarMonths_February = 1, eQMIPDSCalendarMonths_March = 2, eQMIPDSCalendarMonths_April = 3, eQMIPDSCalendarMonths_May = 4, eQMIPDSCalendarMonths_June = 5, eQMIPDSCalendarMonths_July = 6, eQMIPDSCalendarMonths_August = 7, eQMIPDSCalendarMonths_September = 8, eQMIPDSCalendarMonths_October = 9, eQMIPDSCalendarMonths_November = 10, eQMIPDSCalendarMonths_December = 11, }; // Enum to describe QMI PDS Comm Event Protocols enum eQMIPDSCommEventProtocols:UINT8 { eQMIPDSCommEventProtocols_UMTSUserPlaneSUPL = 0, eQMIPDSCommEventProtocols_1X = 1, eQMIPDSCommEventProtocols_UMTSControlPlaneWCDMA = 2, eQMIPDSCommEventProtocols_UMTSControlPlaneGSM = 3, eQMIPDSCommEventProtocols_V1V2 = 4, eQMIPDSCommEventProtocols_KDDI = 5, eQMIPDSCommEventProtocols_XTRADataDownload = 6, eQMIPDSCommEventProtocols_SNTPTimeDownload = 7, eQMIPDSCommEventProtocols_1XControlPlane = 8, eQMIPDSCommEventProtocols_Unknown = 255, }; // Enum to describe QMI PDS Comm Event Types enum eQMIPDSCommEventTypes:UINT8 { eQMIPDSCommEventTypes_Begin = 0, eQMIPDSCommEventTypes_Connected = 1, eQMIPDSCommEventTypes_Failure = 2, eQMIPDSCommEventTypes_Done = 3, eQMIPDSCommEventTypes_OtherFailure = 4, }; // Enum to describe QMI PDS Config enum eQMIPDSConfig:UINT8 { eQMIPDSConfig_PersistentDisabled = 0, eQMIPDSConfig_PersistentEnabled = 1, eQMIPDSConfig_NotPersistentDisabled = 240, eQMIPDSConfig_NotPersistentEnabled = 241, }; // Enum to describe QMI PDS Cradle Mount State enum eQMIPDSCradleMountState:UINT8 { eQMIPDSCradleMountState_NotMounted = 0, eQMIPDSCradleMountState_Mounted = 1, eQMIPDSCradleMountState_Unknown = 2, }; // Enum to describe QMI PDS EFS File Operations enum eQMIPDSEFSFileOperations:UINT8 { eQMIPDSEFSFileOperations_Write = 0, eQMIPDSEFSFileOperations_Delete = 1, }; // Enum to describe QMI PDS Encryption Algorithm enum eQMIPDSEncryptionAlgorithm:UINT8 { eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmSHA1 = 0, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmMax = 1, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmNone = 255, }; // Enum to describe QMI PDS External Power State enum eQMIPDSExternalPowerState:UINT8 { eQMIPDSExternalPowerState_NotConnected = 0, eQMIPDSExternalPowerState_Connected = 1, eQMIPDSExternalPowerState_Unknown = 2, }; // Enum to describe QMI PDS Force Receiver Off enum eQMIPDSForceReceiverOff:UINT8 { eQMIPDSForceReceiverOff_Disable = 0, eQMIPDSForceReceiverOff_Enable = 1, }; // Enum to describe QMI PDS Injected Position Sources enum eQMIPDSInjectedPositionSources:UINT8 { eQMIPDSInjectedPositionSources_Unknown = 0, eQMIPDSInjectedPositionSources_GPS = 1, eQMIPDSInjectedPositionSources_CellID = 2, eQMIPDSInjectedPositionSources_EnhancedCellID = 3, eQMIPDSInjectedPositionSources_WiFi = 4, eQMIPDSInjectedPositionSources_Terrestial = 5, eQMIPDSInjectedPositionSources_TerrestialHybrid = 6, eQMIPDSInjectedPositionSources_Other = 7, }; // Enum to describe QMI PDS Mediums enum eQMIPDSMediums:UINT8 { eQMIPDSMediums_WWAN = 0, }; // Enum to describe QMI PDS Method States enum eQMIPDSMethodStates:UINT8 { eQMIPDSMethodStates_Disabled = 0, eQMIPDSMethodStates_Enabled = 1, eQMIPDSMethodStates_NotSupported = 255, }; // Enum to describe QMI PDS NMEA Reporting Options enum eQMIPDSNMEAReportingOptions:UINT8 { eQMIPDSNMEAReportingOptions_1HzFromTimeRequestedUntilFinalPositionDetermination = 0, eQMIPDSNMEAReportingOptions_FinalPositionDeterminationOnly = 1, }; // Enum to describe QMI PDS NMEA Sentence Operating Modes enum eQMIPDSNMEASentenceOperatingModes:UINT8 { eQMIPDSNMEASentenceOperatingModes_Standalone = 0, eQMIPDSNMEASentenceOperatingModes_MSBased = 1, eQMIPDSNMEASentenceOperatingModes_MSAssisted = 2, eQMIPDSNMEASentenceOperatingModes_Unknown = 255, }; // Enum to describe QMI PDS Network Mode enum eQMIPDSNetworkMode:UINT8 { eQMIPDSNetworkMode_UMTS = 0, eQMIPDSNetworkMode_CDMA = 1, }; // Enum to describe QMI PDS ODP States enum eQMIPDSODPStates:UINT8 { eQMIPDSODPStates_Disables = 0, eQMIPDSODPStates_EnabledLowPowerMode = 1, eQMIPDSODPStates_EnabledReadyMode = 2, }; // Enum to describe QMI PDS Operation Types enum eQMIPDSOperationTypes:UINT8 { eQMIPDSOperationTypes_Standalone = 0, eQMIPDSOperationTypes_MSBased = 1, eQMIPDSOperationTypes_MSAssisted = 2, }; // Enum to describe QMI PDS Output Devices enum eQMIPDSOutputDevices:UINT8 { eQMIPDSOutputDevices_NoneDisabled = 0, eQMIPDSOutputDevices_USB = 1, eQMIPDSOutputDevices_UART1 = 2, eQMIPDSOutputDevices_UART2 = 3, eQMIPDSOutputDevices_SharedMemory = 4, }; // Enum to describe QMI PDS Privacy Modes enum eQMIPDSPrivacyModes:UINT8 { eQMIPDSPrivacyModes_NoNotifyVerify = 0, eQMIPDSPrivacyModes_Notify = 1, eQMIPDSPrivacyModes_NotifyVerifyAllowNoResponse = 2, eQMIPDSPrivacyModes_NotifyVerifyRequireResponse = 3, eQMIPDSPrivacyModes_PrivacyOverride = 4, }; // Enum to describe QMI PDS Reliability Indicator enum eQMIPDSReliabilityIndicator:UINT8 { eQMIPDSReliabilityIndicator_NotSet = 0, eQMIPDSReliabilityIndicator_VeryLow = 1, eQMIPDSReliabilityIndicator_Low = 2, eQMIPDSReliabilityIndicator_Medium = 3, eQMIPDSReliabilityIndicator_High = 4, }; // Enum to describe QMI PDS Report Security Challenge enum eQMIPDSReportSecurityChallenge:UINT8 { eQMIPDSReportSecurityChallenge_Disable = 0, eQMIPDSReportSecurityChallenge_Enable = 1, }; // Enum to describe QMI PDS Reporting State enum eQMIPDSReportingState:UINT8 { eQMIPDSReportingState_StopReporting = 0, eQMIPDSReportingState_StartReporting = 1, }; // Enum to describe QMI PDS SBAS States enum eQMIPDSSBASStates:UINT8 { eQMIPDSSBASStates_Disabled = 0, eQMIPDSSBASStates_Enabled = 1, eQMIPDSSBASStates_Unknown = 255, }; // Enum to describe QMI PDS SPI State enum eQMIPDSSPIState:UINT8 { eQMIPDSSPIState_DeviceIsNonstationary = 0, eQMIPDSSPIState_DeviceIsStationary = 1, }; // Enum to describe QMI PDS SUPL Data Coding Schemes enum eQMIPDSSUPLDataCodingSchemes:UINT8 { eQMIPDSSUPLDataCodingSchemes_UTF8 = 0, eQMIPDSSUPLDataCodingSchemes_UCS2 = 1, eQMIPDSSUPLDataCodingSchemes_GSM = 2, eQMIPDSSUPLDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL ID/Name Data Coding Schemes enum eQMIPDSSUPLIDNameDataCodingSchemes:UINT8 { eQMIPDSSUPLIDNameDataCodingSchemes_LogicalName = 0, eQMIPDSSUPLIDNameDataCodingSchemes_EmailAddress = 1, eQMIPDSSUPLIDNameDataCodingSchemes_MSISDN = 2, eQMIPDSSUPLIDNameDataCodingSchemes_URL = 3, eQMIPDSSUPLIDNameDataCodingSchemes_SIPURL = 4, eQMIPDSSUPLIDNameDataCodingSchemes_MIN = 5, eQMIPDSSUPLIDNameDataCodingSchemes_MDN = 6, eQMIPDSSUPLIDNameDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL Modes enum eQMIPDSSUPLModes:UINT8 { eQMIPDSSUPLModes_MSAssisted = 0, eQMIPDSSUPLModes_MSBased = 1, eQMIPDSSUPLModes_MSAssistedPreferred = 2, eQMIPDSSUPLModes_MSBasedPreferred = 3, eQMIPDSSUPLModes_Standalone = 4, eQMIPDSSUPLModes_AFLT = 5, eQMIPDSSUPLModes_ECID = 6, eQMIPDSSUPLModes_EOTD = 7, eQMIPDSSUPLModes_OTDOA = 8, eQMIPDSSUPLModes_NoPosition = 9, }; // Enum to describe QMI PDS SV Almanac Status enum eQMIPDSSVAlmanacStatus:UINT8 { eQMIPDSSVAlmanacStatus_Unavailable = 0, eQMIPDSSVAlmanacStatus_Available = 1, }; // Enum to describe QMI PDS SV Ephemeris Status enum eQMIPDSSVEphemerisStatus:UINT8 { eQMIPDSSVEphemerisStatus_Unavailable = 0, eQMIPDSSVEphemerisStatus_Available = 1, }; // Enum to describe QMI PDS SV Health Status enum eQMIPDSSVHealthStatus:UINT8 { eQMIPDSSVHealthStatus_Unhealthy = 0, eQMIPDSSVHealthStatus_Healthy = 1, }; // Enum to describe QMI PDS SV Processing Status enum eQMIPDSSVProcessingStatus:UINT8 { eQMIPDSSVProcessingStatus_Idle = 1, eQMIPDSSVProcessingStatus_Search = 2, eQMIPDSSVProcessingStatus_SearchVerify = 3, eQMIPDSSVProcessingStatus_BitEdge = 4, eQMIPDSSVProcessingStatus_Track = 5, }; // Enum to describe QMI PDS SV Systems enum eQMIPDSSVSystems:UINT8 { eQMIPDSSVSystems_GPS = 1, eQMIPDSSVSystems_Galileo = 2, eQMIPDSSVSystems_SBAS = 3, eQMIPDSSVSystems_Compass = 4, eQMIPDSSVSystems_Glonass = 5, }; // Enum to describe QMI PDS Server Options enum eQMIPDSServerOptions:UINT8 { eQMIPDSServerOptions_Default = 0, }; // Enum to describe QMI PDS Session Control Types enum eQMIPDSSessionControlTypes:UINT8 { eQMIPDSSessionControlTypes_Automatic = 0, }; // Enum to describe QMI PDS Session Status enum eQMIPDSSessionStatus:UINT8 { eQMIPDSSessionStatus_Success = 0, eQMIPDSSessionStatus_InProgress = 1, eQMIPDSSessionStatus_GeneralFailure = 2, eQMIPDSSessionStatus_Timeout = 3, eQMIPDSSessionStatus_UserEnded = 4, eQMIPDSSessionStatus_BadParameter = 5, eQMIPDSSessionStatus_PhoneOffline = 6, eQMIPDSSessionStatus_EngineLocked = 7, eQMIPDSSessionStatus_E911SessionInProgress = 8, }; // Enum to describe QMI PDS Session Types enum eQMIPDSSessionTypes:UINT8 { eQMIPDSSessionTypes_New = 0, }; // Enum to describe QMI PDS Source Linkage enum eQMIPDSSourceLinkage:UINT8 { eQMIPDSSourceLinkage_NotSpecified = 0, eQMIPDSSourceLinkage_FullyInterDependent = 1, eQMIPDSSourceLinkage_AltitudeDependsOnLatitudeAndLongitude = 2, eQMIPDSSourceLinkage_FullyIndependent = 3, }; // Enum to describe QMI PDS Stop Reason enum eQMIPDSStopReason:UINT8 { eQMIPDSStopReason_UserTerminated = 0, eQMIPDSStopReason_Other = 1, }; // Enum to describe QMI PDS Streaming Status enum eQMIPDSStreamingStatus:UINT8 { eQMIPDSStreamingStatus_NotReadyForStreaming = 0, eQMIPDSStreamingStatus_ReadyForStreaming = 1, }; // Enum to describe QMI PDS Suspend Reason enum eQMIPDSSuspendReason:UINT8 { eQMIPDSSuspendReason_OoS = 0, eQMIPDSSuspendReason_LPM = 1, eQMIPDSSuspendReason_Other = 2, }; // Enum to describe QMI PDS Time Bases enum eQMIPDSTimeBases:UINT8 { eQMIPDSTimeBases_GPS = 0, eQMIPDSTimeBases_UTC = 1, }; // Enum to describe QMI PDS Time Source enum eQMIPDSTimeSource:UINT8 { eQMIPDSTimeSource_Invalid = 0, eQMIPDSTimeSource_NetworkTimeTransfer = 1, eQMIPDSTimeSource_NetworkTimeTagging = 2, eQMIPDSTimeSource_ExternalInput = 3, eQMIPDSTimeSource_TOWDecode = 4, eQMIPDSTimeSource_TOWConfirmed = 5, eQMIPDSTimeSource_TOWAndWeekConfirmed = 6, eQMIPDSTimeSource_TimeAlignment = 7, eQMIPDSTimeSource_NavSolution = 8, eQMIPDSTimeSource_SolveForTime = 9, }; // Enum to describe QMI PDS Time Type enum eQMIPDSTimeType:UINT8 { eQMIPDSTimeType_UTCTime = 0, eQMIPDSTimeType_GPSTime = 1, eQMIPDSTimeType_Age = 2, }; // Enum to describe QMI PDS Tracking Session States enum eQMIPDSTrackingSessionStates:UINT8 { eQMIPDSTrackingSessionStates_Unknown = 0, eQMIPDSTrackingSessionStates_Inactive = 1, eQMIPDSTrackingSessionStates_Active = 2, }; // Enum to describe QMI PDS UMTS CP Data Coding Schemes enum eQMIPDSUMTSCPDataCodingSchemes:UINT8 { eQMIPDSUMTSCPDataCodingSchemes_German = 0, eQMIPDSUMTSCPDataCodingSchemes_English = 1, eQMIPDSUMTSCPDataCodingSchemes_Italian = 2, eQMIPDSUMTSCPDataCodingSchemes_French = 3, eQMIPDSUMTSCPDataCodingSchemes_Spanish = 4, eQMIPDSUMTSCPDataCodingSchemes_Dutch = 5, eQMIPDSUMTSCPDataCodingSchemes_Swedish = 6, eQMIPDSUMTSCPDataCodingSchemes_Danish = 7, eQMIPDSUMTSCPDataCodingSchemes_Portuguese = 8, eQMIPDSUMTSCPDataCodingSchemes_Finnish = 9, eQMIPDSUMTSCPDataCodingSchemes_Norwegian = 10, eQMIPDSUMTSCPDataCodingSchemes_Greek = 11, eQMIPDSUMTSCPDataCodingSchemes_Turkish = 12, eQMIPDSUMTSCPDataCodingSchemes_Hungarian = 13, eQMIPDSUMTSCPDataCodingSchemes_Polish = 14, eQMIPDSUMTSCPDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS UMTS CP Location Types enum eQMIPDSUMTSCPLocationTypes:UINT8 { eQMIPDSUMTSCPLocationTypes_Current = 0, eQMIPDSUMTSCPLocationTypes_CurrentOrLastKnown = 1, eQMIPDSUMTSCPLocationTypes_Initial = 2, }; // Enum to describe QMI PDS Uncertainty Coverage enum eQMIPDSUncertaintyCoverage:UINT8 { eQMIPDSUncertaintyCoverage_NotSpecified = 0, eQMIPDSUncertaintyCoverage_PointUncertainty = 1, eQMIPDSUncertaintyCoverage_FullyUncertainty = 2, }; // Enum to describe QMI PDS VX Data Coding Schemes enum eQMIPDSVXDataCodingSchemes:UINT8 { eQMIPDSVXDataCodingSchemes_Octet = 0, eQMIPDSVXDataCodingSchemes_EXNProtocolMessage = 1, eQMIPDSVXDataCodingSchemes_ASCII = 2, eQMIPDSVXDataCodingSchemes_IA5 = 3, eQMIPDSVXDataCodingSchemes_Unicode = 4, eQMIPDSVXDataCodingSchemes_ShiftJIS = 5, eQMIPDSVXDataCodingSchemes_Korean = 6, eQMIPDSVXDataCodingSchemes_LatinHebrew = 7, eQMIPDSVXDataCodingSchemes_Latin = 8, eQMIPDSVXDataCodingSchemes_GSM = 9, }; // Enum to describe QMI PDS VX Modes enum eQMIPDSVXModes:UINT8 { eQMIPDSVXModes_MSAssisted = 0, eQMIPDSVXModes_MSBased = 1, eQMIPDSVXModes_MSAssistedPreferred = 2, eQMIPDSVXModes_MSBasedPreferred = 3, }; // Enum to describe QMI PDS WWAN Network Preferences enum eQMIPDSWWANNetworkPreferences:UINT8 { eQMIPDSWWANNetworkPreferences_AnyAvailable = 0, eQMIPDSWWANNetworkPreferences_HomeOnly = 1, eQMIPDSWWANNetworkPreferences_RoamOnly = 2, }; // Enum to describe QMI PDS Wi-Fi Request Types enum eQMIPDSWiFiRequestTypes:UINT8 { eQMIPDSWiFiRequestTypes_StartPeriodicFixesHighFrequency = 0, eQMIPDSWiFiRequestTypes_StartPeriodicFixesKeepWarm = 1, eQMIPDSWiFiRequestTypes_StopPeriodicFixes = 2, eQMIPDSWiFiRequestTypes_Suspend = 4, }; // Enum to describe QMI Profile Types enum eQMIProfileTypes:UINT8 { eQMIProfileTypes_3GPP = 0, eQMIProfileTypes_3GPP2 = 1, }; // Enum to describe QMI QoS Delivery Orders enum eQMIQoSDeliveryOrders:UINT8 { eQMIQoSDeliveryOrders_Subscribe = 0, eQMIQoSDeliveryOrders_DeliveryOrderOn = 1, eQMIQoSDeliveryOrders_DeliveryOrderOff = 2, }; // Enum to describe QMI Results enum eQMIResults:UINT16 { eQMIResults_Success = 0, eQMIResults_Failure = 1, }; // Enum to describe QMI SAR RF States enum eQMISARRFStates { eQMISARRFStates_DefaultState = 0, eQMISARRFStates_State1 = 1, eQMISARRFStates_State2 = 2, eQMISARRFStates_State3 = 3, eQMISARRFStates_State4 = 4, eQMISARRFStates_State5 = 5, eQMISARRFStates_State6 = 6, eQMISARRFStates_State7 = 7, eQMISARRFStates_State8 = 8, }; // Enum to describe QMI SDU Error Ratios enum eQMISDUErrorRatios:UINT8 { eQMISDUErrorRatios_Subscribe = 0, eQMISDUErrorRatios_1X102 = 1, eQMISDUErrorRatios_7X103 = 2, eQMISDUErrorRatios_1X103 = 3, eQMISDUErrorRatios_1X104 = 4, eQMISDUErrorRatios_1X105 = 5, eQMISDUErrorRatios_1X106 = 6, eQMISDUErrorRatios_1X101 = 7, }; // Enum to describe QMI SDU Residual Bit Error Ratios enum eQMISDUResidualBitErrorRatios:UINT8 { eQMISDUResidualBitErrorRatios_Subscribe = 0, eQMISDUResidualBitErrorRatios_5X102 = 1, eQMISDUResidualBitErrorRatios_1X102 = 2, eQMISDUResidualBitErrorRatios_5X103 = 3, eQMISDUResidualBitErrorRatios_4X103 = 4, eQMISDUResidualBitErrorRatios_1X103 = 5, eQMISDUResidualBitErrorRatios_1X104 = 6, eQMISDUResidualBitErrorRatios_1X105 = 7, eQMISDUResidualBitErrorRatios_1X106 = 8, eQMISDUResidualBitErrorRatios_6X108 = 9, }; // Enum to describe QMI Traffic Classes enum eQMITrafficClasses:UINT8 { eQMITrafficClasses_Subscribed = 0, eQMITrafficClasses_Conversational = 1, eQMITrafficClasses_Streaming = 2, eQMITrafficClasses_Interactive = 3, eQMITrafficClasses_Background = 4, }; // Enum to describe QMI UIM Application States enum eQMIUIMApplicationStates:UINT8 { eQMIUIMApplicationStates_Unknown = 0, eQMIUIMApplicationStates_Detected = 1, eQMIUIMApplicationStates_PIN1OrUPINIsRequired = 2, eQMIUIMApplicationStates_PUK1OrPUKForUPINIsRequired = 3, eQMIUIMApplicationStates_PersonalizationStateMustBeChecked = 4, eQMIUIMApplicationStates_PIN1IsBlocked = 5, eQMIUIMApplicationStates_Illegal = 6, eQMIUIMApplicationStates_Ready = 7, }; // Enum to describe QMI UIM Application Types enum eQMIUIMApplicationTypes:UINT8 { eQMIUIMApplicationTypes_Unknown = 0, eQMIUIMApplicationTypes_SIMCard = 1, eQMIUIMApplicationTypes_USIMApplication = 2, eQMIUIMApplicationTypes_RUIMCard = 3, eQMIUIMApplicationTypes_CSIMApplication = 4, eQMIUIMApplicationTypes_ISIMApplication = 5, }; // Enum to describe QMI UIM Authentication Contexts enum eQMIUIMAuthenticationContexts { eQMIUIMAuthenticationContexts_GSMAlgorithm = 0, eQMIUIMAuthenticationContexts_CAVEAlgorithm = 1, eQMIUIMAuthenticationContexts_GSMSecurity = 2, eQMIUIMAuthenticationContexts_3GSecurity = 3, eQMIUIMAuthenticationContexts_VGCSVBSSecurity = 4, eQMIUIMAuthenticationContexts_GBASecurityBootstrappingMode = 5, eQMIUIMAuthenticationContexts_GBASecurityNAFDerivationMode = 6, eQMIUIMAuthenticationContexts_MBMSSecurityMSKUpdateMode = 7, eQMIUIMAuthenticationContexts_MBMSSecurityMTKGenerationMode = 8, eQMIUIMAuthenticationContexts_MBMSSecurityMSKDeletionMode = 9, eQMIUIMAuthenticationContexts_MBMSSecurityMUKDeletionMode = 10, eQMIUIMAuthenticationContexts_IMSAKASecurity = 11, eQMIUIMAuthenticationContexts_HTTPDigestSecurity = 12, eQMIUIMAuthenticationContexts_ComputeIPCHAP = 13, eQMIUIMAuthenticationContexts_ComputeIPMNHA = 14, eQMIUIMAuthenticationContexts_ComputeIPMIPRRQ = 15, eQMIUIMAuthenticationContexts_ComputeIPMNAAA = 16, eQMIUIMAuthenticationContexts_ComputeIPHRPD = 17, }; // Enum to describe QMI UIM CK/Session Operations enum eQMIUIMCKSessionOperations:UINT8 { eQMIUIMCKSessionOperations_Deactivate = 0, eQMIUIMCKSessionOperations_Activate = 1, }; // Enum to describe QMI UIM Card Error Codes enum eQMIUIMCardErrorCodes:UINT8 { eQMIUIMCardErrorCodes_Unknown = 0, eQMIUIMCardErrorCodes_PowerDown = 1, eQMIUIMCardErrorCodes_PollError = 2, eQMIUIMCardErrorCodes_NoATRReceived = 3, eQMIUIMCardErrorCodes_VoltMismatch = 4, eQMIUIMCardErrorCodes_ParityError = 5, eQMIUIMCardErrorCodes_UnknownPossiblyRemoved = 6, }; // Enum to describe QMI UIM Card States enum eQMIUIMCardStates:UINT8 { eQMIUIMCardStates_Absent = 0, eQMIUIMCardStates_Present = 1, eQMIUIMCardStates_Error = 2, }; // Enum to describe QMI UIM Connect Operations enum eQMIUIMConnectOperations:UINT8 { eQMIUIMConnectOperations_Disconnect = 0, eQMIUIMConnectOperations_Connect = 1, eQMIUIMConnectOperations_CheckStatus = 2, }; // Enum to describe QMI UIM Disonnect Modes enum eQMIUIMDisonnectModes:UINT8 { eQMIUIMDisonnectModes_ImmediateDisconnect = 0, eQMIUIMDisonnectModes_GracefulShutdown = 1, }; // Enum to describe QMI UIM FDN Status Values enum eQMIUIMFDNStatusValues:UINT8 { eQMIUIMFDNStatusValues_NotAvailable = 0, eQMIUIMFDNStatusValues_AvailableButDisabled = 1, eQMIUIMFDNStatusValues_AvailableAndEnabled = 2, }; // Enum to describe QMI UIM File Control Information enum eQMIUIMFileControlInformation:UINT8 { eQMIUIMFileControlInformation_NoData = 0, eQMIUIMFileControlInformation_FCP = 1, eQMIUIMFileControlInformation_FCI = 2, eQMIUIMFileControlInformation_FCIWithInterfaces = 3, eQMIUIMFileControlInformation_FMD = 4, }; // Enum to describe QMI UIM File Types enum eQMIUIMFileTypes:UINT8 { eQMIUIMFileTypes_Transparent = 0, eQMIUIMFileTypes_Cyclic = 1, eQMIUIMFileTypes_LinearFixed = 2, eQMIUIMFileTypes_DedicatedFile = 3, eQMIUIMFileTypes_MasterFile = 4, }; // Enum to describe QMI UIM Hidden Key Status Values enum eQMIUIMHiddenKeyStatusValues:UINT8 { eQMIUIMHiddenKeyStatusValues_NotSupported = 0, eQMIUIMHiddenKeyStatusValues_EnabledAndNotVerified = 1, eQMIUIMHiddenKeyStatusValues_EnabledAndVerified = 2, eQMIUIMHiddenKeyStatusValues_Disabled = 3, }; // Enum to describe QMI UIM Hot-Swap enum eQMIUIMHotSwap:UINT8 { eQMIUIMHotSwap_HotSwapNotSupported = 0, eQMIUIMHotSwap_HotSwapIsSupportedButStatusOfSwitchNotSupported = 1, eQMIUIMHotSwap_SwitchIndicatesThatCardIsPresent = 2, eQMIUIMHotSwap_SwichIndicatesThatCardIsNotPresent = 3, }; // Enum to describe QMI UIM Key Reference ID enum eQMIUIMKeyReferenceID:UINT8 { eQMIUIMKeyReferenceID_PINApplication1 = 1, eQMIUIMKeyReferenceID_PINApplication2 = 2, eQMIUIMKeyReferenceID_PINApplication3 = 3, eQMIUIMKeyReferenceID_PINApplication4 = 4, eQMIUIMKeyReferenceID_PINApplication5 = 5, eQMIUIMKeyReferenceID_PINApplication6 = 6, eQMIUIMKeyReferenceID_PINApplication7 = 7, eQMIUIMKeyReferenceID_PINApplication8 = 8, }; // Enum to describe QMI UIM PIN IDs enum eQMIUIMPINIDs { eQMIUIMPINIDs_PIN1 = 1, eQMIUIMPINIDs_PIN2 = 2, eQMIUIMPINIDs_UniversalPIN = 3, eQMIUIMPINIDs_HiddenKey = 4, }; // Enum to describe QMI UIM PIN Operations enum eQMIUIMPINOperations { eQMIUIMPINOperations_Disable = 0, eQMIUIMPINOperations_Enable = 1, }; // Enum to describe QMI UIM PIN States enum eQMIUIMPINStates:UINT8 { eQMIUIMPINStates_Unknown = 0, eQMIUIMPINStates_EnabledAndNotVerified = 1, eQMIUIMPINStates_EnabledAndVerified = 2, eQMIUIMPINStates_Disabled = 3, eQMIUIMPINStates_Blocked = 4, eQMIUIMPINStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Personalization Features enum eQMIUIMPersonalizationFeatures:UINT8 { eQMIUIMPersonalizationFeatures_GWNetwork = 0, eQMIUIMPersonalizationFeatures_GWNetworkSubset = 1, eQMIUIMPersonalizationFeatures_GWServiceProvider = 2, eQMIUIMPersonalizationFeatures_GWCorporate = 3, eQMIUIMPersonalizationFeatures_GWUIM = 4, eQMIUIMPersonalizationFeatures_1XNetworkType1 = 5, eQMIUIMPersonalizationFeatures_1XNetworkType2 = 6, eQMIUIMPersonalizationFeatures_1XHRPD = 7, eQMIUIMPersonalizationFeatures_1XServiceProvider = 8, eQMIUIMPersonalizationFeatures_1XCorporate = 9, eQMIUIMPersonalizationFeatures_1XRUIM = 10, eQMIUIMPersonalizationFeatures_Unknown = 11, }; // Enum to describe QMI UIM Personalization States enum eQMIUIMPersonalizationStates:UINT8 { eQMIUIMPersonalizationStates_Unknown = 0, eQMIUIMPersonalizationStates_PersonalizationOperationIsInProgress = 1, eQMIUIMPersonalizationStates_Ready = 2, eQMIUIMPersonalizationStates_PersonalizationCodeIsRequired = 3, eQMIUIMPersonalizationStates_PUKForPersonalizationCodeIsRequired = 4, eQMIUIMPersonalizationStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Refresh Modes enum eQMIUIMRefreshModes:UINT8 { eQMIUIMRefreshModes_Reset = 0, eQMIUIMRefreshModes_Init = 1, eQMIUIMRefreshModes_InitAndFCN = 2, eQMIUIMRefreshModes_FCN = 3, eQMIUIMRefreshModes_InitAndFullFCN = 4, eQMIUIMRefreshModes_ApplicationReset = 5, eQMIUIMRefreshModes_3GSessionReset = 6, }; // Enum to describe QMI UIM Refresh Stages enum eQMIUIMRefreshStages:UINT8 { eQMIUIMRefreshStages_WaitingForOK = 0, eQMIUIMRefreshStages_Start = 1, eQMIUIMRefreshStages_EndWithSuccess = 2, eQMIUIMRefreshStages_EndWithFailure = 3, }; // Enum to describe QMI UIM Register Flags enum eQMIUIMRegisterFlags { eQMIUIMRegisterFlags_Deregister = 0, eQMIUIMRegisterFlags_Register = 1, }; // Enum to describe QMI UIM SAP Requests enum eQMIUIMSAPRequests:UINT8 { eQMIUIMSAPRequests_RetrieveATR = 0, eQMIUIMSAPRequests_SendAPDU = 1, eQMIUIMSAPRequests_PowerOffSIM = 2, eQMIUIMSAPRequests_PowerOnSIM = 3, eQMIUIMSAPRequests_ResetSIM = 4, eQMIUIMSAPRequests_RetrieveCardReaderStatus = 5, }; // Enum to describe QMI UIM SAP States enum eQMIUIMSAPStates:UINT8 { eQMIUIMSAPStates_NotEnabled = 0, eQMIUIMSAPStates_Connecting = 1, eQMIUIMSAPStates_ConnectedSuccessfully = 2, eQMIUIMSAPStates_ConnectionError = 3, eQMIUIMSAPStates_Disconnecting = 4, eQMIUIMSAPStates_DisconnectedSuccessfully = 5, }; // Enum to describe QMI UIM Security Attributes enum eQMIUIMSecurityAttributes:UINT8 { eQMIUIMSecurityAttributes_Always = 0, eQMIUIMSecurityAttributes_Never = 1, eQMIUIMSecurityAttributes_ANDCondition = 2, eQMIUIMSecurityAttributes_ORCondition = 3, eQMIUIMSecurityAttributes_SingleCondition = 4, }; // Enum to describe QMI UIM Session Types enum eQMIUIMSessionTypes:UINT8 { eQMIUIMSessionTypes_PrimaryGWProvisioning = 0, eQMIUIMSessionTypes_Primary1XProvisioning = 1, eQMIUIMSessionTypes_SecondaryGWProvisioning = 2, eQMIUIMSessionTypes_Secondary1XProvisioning = 3, eQMIUIMSessionTypes_NonprovisioningOnSlot1 = 4, eQMIUIMSessionTypes_NonprovisioningOnSlot2 = 5, eQMIUIMSessionTypes_CardOnSlot1 = 6, eQMIUIMSessionTypes_CardOnSlot2 = 7, eQMIUIMSessionTypes_LogicalChannelOnSlot1 = 8, eQMIUIMSessionTypes_LogicalChannelOnSlot2 = 9, }; // Enum to describe QMI UIM Slots enum eQMIUIMSlots:UINT8 { eQMIUIMSlots_Slot1 = 1, eQMIUIMSlots_Slot2 = 2, }; // Enum to describe QMI Voice ALS Line Indicators enum eQMIVoiceALSLineIndicators:UINT8 { eQMIVoiceALSLineIndicators_Line1 = 0, eQMIVoiceALSLineIndicators_Line2 = 1, }; // Enum to describe QMI Voice ALS Lines enum eQMIVoiceALSLines:UINT8 { eQMIVoiceALSLines_Line1 = 0, eQMIVoiceALSLines_Line2 = 1, }; // Enum to describe QMI Voice Alerting Types enum eQMIVoiceAlertingTypes:UINT8 { eQMIVoiceAlertingTypes_Local = 0, eQMIVoiceAlertingTypes_Remote = 1, }; // Enum to describe QMI Voice CLIR Causes enum eQMIVoiceCLIRCauses:UINT8 { eQMIVoiceCLIRCauses_None = 0, eQMIVoiceCLIRCauses_RejectedByUser = 1, eQMIVoiceCLIRCauses_InteractionWithOtherServices = 2, eQMIVoiceCLIRCauses_CoinLine = 3, eQMIVoiceCLIRCauses_ServiceUnavailable = 4, eQMIVoiceCLIRCauses_Reserved = 5, }; // Enum to describe QMI Voice CLIR Types enum eQMIVoiceCLIRTypes:UINT8 { eQMIVoiceCLIRTypes_Supression = 1, eQMIVoiceCLIRTypes_Invocation = 2, }; // Enum to describe QMI Voice Call Control Result Types enum eQMIVoiceCallControlResultTypes:UINT8 { eQMIVoiceCallControlResultTypes_Voice = 0, eQMIVoiceCallControlResultTypes_SupplementaryService = 1, eQMIVoiceCallControlResultTypes_USSD = 2, }; // Enum to describe QMI Voice Call Directions enum eQMIVoiceCallDirections:UINT8 { eQMIVoiceCallDirections_MobileOriginated = 1, eQMIVoiceCallDirections_MobileTerminated = 2, }; // Enum to describe QMI Voice Call Modes enum eQMIVoiceCallModes:UINT8 { eQMIVoiceCallModes_CDMA = 1, eQMIVoiceCallModes_GSM = 2, eQMIVoiceCallModes_UMTS = 3, eQMIVoiceCallModes_LTE = 4, }; // Enum to describe QMI Voice Call States enum eQMIVoiceCallStates:UINT8 { eQMIVoiceCallStates_Origination = 1, eQMIVoiceCallStates_Incoming = 2, eQMIVoiceCallStates_Conversation = 3, eQMIVoiceCallStates_InProgress = 4, eQMIVoiceCallStates_Alerting = 5, eQMIVoiceCallStates_Hold = 6, eQMIVoiceCallStates_Waiting = 7, eQMIVoiceCallStates_Disconnecting = 8, eQMIVoiceCallStates_End = 9, eQMIVoiceCallStates_Setup = 10, }; // Enum to describe QMI Voice Call Types enum eQMIVoiceCallTypes:UINT8 { eQMIVoiceCallTypes_VoiceAutomaticSelection = 0, eQMIVoiceCallTypes_Forced = 1, eQMIVoiceCallTypes_VoiceOverIP = 2, eQMIVoiceCallTypes_OTAPA = 6, eQMIVoiceCallTypes_StandardOTASP = 7, eQMIVoiceCallTypes_NonStandardOTASP = 8, eQMIVoiceCallTypes_Emergency = 9, eQMIVoiceCallTypes_SupplementaryService = 10, }; // Enum to describe QMI Voice DTMF Events enum eQMIVoiceDTMFEvents:UINT8 { eQMIVoiceDTMFEvents_SendDTMFBurst = 0, eQMIVoiceDTMFEvents_StartSendingContinuousDTMFTone = 1, eQMIVoiceDTMFEvents_StopSendingContinuousDTMFTone = 3, eQMIVoiceDTMFEvents_ReceiveDTMFBurst = 4, eQMIVoiceDTMFEvents_StartReceivingContinuousDTMFTone = 6, eQMIVoiceDTMFEvents_StopReceivingContinuousDTMFTone = 7, }; // Enum to describe QMI Voice DTMF Privacy Levels enum eQMIVoiceDTMFPrivacyLevels:UINT8 { eQMIVoiceDTMFPrivacyLevels_Standard = 0, eQMIVoiceDTMFPrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Domains enum eQMIVoiceDomains:UINT8 { eQMIVoiceDomains_CSOnly = 0, eQMIVoiceDomains_PSOnly = 1, eQMIVoiceDomains_CSThenPS = 2, eQMIVoiceDomains_PSThenCS = 3, }; // Enum to describe QMI Voice ECT Call States enum eQMIVoiceECTCallStates:UINT8 { eQMIVoiceECTCallStates_None = 0, eQMIVoiceECTCallStates_Alerting = 1, eQMIVoiceECTCallStates_Active = 2, }; // Enum to describe QMI Voice Flash Types enum eQMIVoiceFlashTypes:UINT8 { eQMIVoiceFlashTypes_Simple = 0, eQMIVoiceFlashTypes_ActivateAnswerHold = 1, eQMIVoiceFlashTypes_DeactivateAnswerHold = 2, }; // Enum to describe QMI Voice Interdigit Intervals enum eQMIVoiceInterdigitIntervals:UINT8 { eQMIVoiceInterdigitIntervals_60ms = 0, eQMIVoiceInterdigitIntervals_100ms = 1, eQMIVoiceInterdigitIntervals_150ms = 2, eQMIVoiceInterdigitIntervals_200ms = 3, }; // Enum to describe QMI Voice NSS Releases enum eQMIVoiceNSSReleases:UINT8 { eQMIVoiceNSSReleases_Finished = 1, }; // Enum to describe QMI Voice Number Plans enum eQMIVoiceNumberPlans:UINT8 { eQMIVoiceNumberPlans_Unknown = 0, eQMIVoiceNumberPlans_ISDN = 1, eQMIVoiceNumberPlans_Data = 3, eQMIVoiceNumberPlans_Telex = 4, eQMIVoiceNumberPlans_National = 8, eQMIVoiceNumberPlans_Private = 9, eQMIVoiceNumberPlans_ReservedCTS = 11, eQMIVoiceNumberPlans_ReservedExtension = 15, }; // Enum to describe QMI Voice Number Types enum eQMIVoiceNumberTypes:UINT8 { eQMIVoiceNumberTypes_Unknown = 0, eQMIVoiceNumberTypes_International = 1, eQMIVoiceNumberTypes_National = 2, eQMIVoiceNumberTypes_NetworkSpecific = 3, eQMIVoiceNumberTypes_Subscriber = 4, eQMIVoiceNumberTypes_Reserved = 5, eQMIVoiceNumberTypes_Abbreviated = 6, eQMIVoiceNumberTypes_ReservedExtension = 7, }; // Enum to describe QMI Voice OTASP Stati enum eQMIVoiceOTASPStati:UINT8 { eQMIVoiceOTASPStati_Unlocked = 0, eQMIVoiceOTASPStati_RetriesExceeded = 1, eQMIVoiceOTASPStati_AKeyExchanged = 2, eQMIVoiceOTASPStati_SSDUpdated = 3, eQMIVoiceOTASPStati_NAMDownloaded = 4, eQMIVoiceOTASPStati_MDNDownloaded = 5, eQMIVoiceOTASPStati_IMSIDownloaded = 6, eQMIVoiceOTASPStati_PRLDownloaded = 7, eQMIVoiceOTASPStati_Committed = 8, eQMIVoiceOTASPStati_OTAPAStarted = 9, eQMIVoiceOTASPStati_OTAPAStopped = 10, eQMIVoiceOTASPStati_OTAPAAborted = 11, eQMIVoiceOTASPStati_OTAPACommitted = 12, }; // Enum to describe QMI Voice Presentation Indicators enum eQMIVoicePresentationIndicators:UINT8 { eQMIVoicePresentationIndicators_Allowed = 0, eQMIVoicePresentationIndicators_Restricted = 1, eQMIVoicePresentationIndicators_Unavailable = 2, eQMIVoicePresentationIndicators_NameRestricted = 3, eQMIVoicePresentationIndicators_PayPhone = 4, }; // Enum to describe QMI Voice Privacy Levels enum eQMIVoicePrivacyLevels:UINT8 { eQMIVoicePrivacyLevels_Standard = 0, eQMIVoicePrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Provisioning States enum eQMIVoiceProvisioningStates:UINT8 { eQMIVoiceProvisioningStates_NotProvisioned = 0, eQMIVoiceProvisioningStates_ProvisionedPermanent = 1, eQMIVoiceProvisioningStates_PresentationRestricted = 2, eQMIVoiceProvisioningStates_PresentationAllowed = 3, }; // Enum to describe QMI Voice Pulse Widths enum eQMIVoicePulseWidths:UINT8 { eQMIVoicePulseWidths_95ms = 0, eQMIVoicePulseWidths_150ms = 1, eQMIVoicePulseWidths_200ms = 2, eQMIVoicePulseWidths_250ms = 3, eQMIVoicePulseWidths_300ms = 4, eQMIVoicePulseWidths_350ms = 5, eQMIVoicePulseWidths_SMSTXSpecial = 6, }; // Enum to describe QMI Voice Screening Indicators enum eQMIVoiceScreeningIndicators:UINT8 { eQMIVoiceScreeningIndicators_UserNotScreened = 0, eQMIVoiceScreeningIndicators_UserPassedVerification = 1, eQMIVoiceScreeningIndicators_UserFailedVerification = 2, eQMIVoiceScreeningIndicators_ProvidedNetwork = 3, }; // Enum to describe QMI Voice Service Options enum eQMIVoiceServiceOptions:UINT16 { eQMIVoiceServiceOptions_Any = 0, eQMIVoiceServiceOptions_IS96A = 1, eQMIVoiceServiceOptions_EVRC = 3, eQMIVoiceServiceOptions_IS73313K = 17, eQMIVoiceServiceOptions_SelectableModeVocoder = 56, eQMIVoiceServiceOptions_4GVNarrowBand = 68, eQMIVoiceServiceOptions_4GVWideBand = 70, eQMIVoiceServiceOptions_13K = 32768, eQMIVoiceServiceOptions_IS96 = 32769, eQMIVoiceServiceOptions_WVRC = 32803, }; // Enum to describe QMI Voice Subscription Types enum eQMIVoiceSubscriptionTypes:UINT8 { eQMIVoiceSubscriptionTypes_Primary = 0, eQMIVoiceSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI Voice Supplementary Notification Types enum eQMIVoiceSupplementaryNotificationTypes:UINT8 { eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsForwarded = 1, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsWaiting = 2, eQMIVoiceSupplementaryNotificationTypes_OutgoingCUGCall = 3, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallsBarred = 4, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsDeflected = 5, eQMIVoiceSupplementaryNotificationTypes_IncomingCUGCall = 6, eQMIVoiceSupplementaryNotificationTypes_IncomingCallsBarred = 7, eQMIVoiceSupplementaryNotificationTypes_IncomingForwardedCall = 8, eQMIVoiceSupplementaryNotificationTypes_IncomingDeflectedCall = 9, eQMIVoiceSupplementaryNotificationTypes_IncomingCallIsForwarded = 10, eQMIVoiceSupplementaryNotificationTypes_UnconditionalCallForwardingActive = 11, eQMIVoiceSupplementaryNotificationTypes_ConditionalCallForwardingActive = 12, eQMIVoiceSupplementaryNotificationTypes_CLIRSuppressionRejected = 13, eQMIVoiceSupplementaryNotificationTypes_CallIsOnHold = 14, eQMIVoiceSupplementaryNotificationTypes_CallIsRetrieved = 15, eQMIVoiceSupplementaryNotificationTypes_CallIsInConference = 16, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsAlerting = 17, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsActive = 18, }; // Enum to describe QMI Voice Supplementary Service Call Types enum eQMIVoiceSupplementaryServiceCallTypes:UINT8 { eQMIVoiceSupplementaryServiceCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceSupplementaryServiceCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceSupplementaryServiceCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceSupplementaryServiceCallTypes_HoldAllExceptSpecifiedCall = 4, eQMIVoiceSupplementaryServiceCallTypes_MakeConferenceCall = 5, eQMIVoiceSupplementaryServiceCallTypes_ExplicitCallTransfer = 6, eQMIVoiceSupplementaryServiceCallTypes_CCBSActivation = 7, eQMIVoiceSupplementaryServiceCallTypes_EndAllCalls = 8, eQMIVoiceSupplementaryServiceCallTypes_ReleaseSpecifiedCall = 9, }; // Enum to describe QMI Voice Supplementary Service Reasons enum eQMIVoiceSupplementaryServiceReasons:UINT8 { eQMIVoiceSupplementaryServiceReasons_ForwardUnconditional = 1, eQMIVoiceSupplementaryServiceReasons_ForwardMobileBusy = 2, eQMIVoiceSupplementaryServiceReasons_ForwardNoReply = 3, eQMIVoiceSupplementaryServiceReasons_ForwardUnreachable = 4, eQMIVoiceSupplementaryServiceReasons_ForwardAllForwarding = 5, eQMIVoiceSupplementaryServiceReasons_ForwardAllConditional = 6, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoing = 7, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingInt = 8, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingIntExtToHome = 9, eQMIVoiceSupplementaryServiceReasons_BarrAllIncoming = 10, eQMIVoiceSupplementaryServiceReasons_BarrIncomingRoaming = 11, eQMIVoiceSupplementaryServiceReasons_BarrAllBarring = 12, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoingBarring = 13, eQMIVoiceSupplementaryServiceReasons_BarrAllIncomingBarring = 14, eQMIVoiceSupplementaryServiceReasons_CallWaiting = 15, eQMIVoiceSupplementaryServiceReasons_CLIR = 16, eQMIVoiceSupplementaryServiceReasons_CLIP = 17, }; // Enum to describe QMI Voice Supplementary Service Requests enum eQMIVoiceSupplementaryServiceRequests:UINT8 { eQMIVoiceSupplementaryServiceRequests_Activate = 1, eQMIVoiceSupplementaryServiceRequests_Deactivate = 2, eQMIVoiceSupplementaryServiceRequests_Register = 3, eQMIVoiceSupplementaryServiceRequests_Erase = 4, eQMIVoiceSupplementaryServiceRequests_Interrogate = 5, eQMIVoiceSupplementaryServiceRequests_RegisterPassword = 6, eQMIVoiceSupplementaryServiceRequests_USSD = 7, }; // Enum to describe QMI Voice Supplementary Service Types enum eQMIVoiceSupplementaryServiceTypes:UINT8 { eQMIVoiceSupplementaryServiceTypes_Activate = 0, eQMIVoiceSupplementaryServiceTypes_Deactivate = 1, eQMIVoiceSupplementaryServiceTypes_Register = 2, eQMIVoiceSupplementaryServiceTypes_Erase = 3, }; // Enum to describe QMI Voice TTY Modes enum eQMIVoiceTTYModes:UINT8 { eQMIVoiceTTYModes_Full = 0, eQMIVoiceTTYModes_VoiceCarryOver = 1, eQMIVoiceTTYModes_HearingCarryOver = 2, eQMIVoiceTTYModes_Off = 3, }; // Enum to describe QMI Voice USSD Alpha Coding Schemes enum eQMIVoiceUSSDAlphaCodingSchemes:UINT8 { eQMIVoiceUSSDAlphaCodingSchemes_GSM = 1, eQMIVoiceUSSDAlphaCodingSchemes_UCS2 = 2, }; // Enum to describe QMI Voice USSD Data Coding Schemes enum eQMIVoiceUSSDDataCodingSchemes:UINT8 { eQMIVoiceUSSDDataCodingSchemes_ASCII = 1, eQMIVoiceUSSDDataCodingSchemes_8Bit = 2, eQMIVoiceUSSDDataCodingSchemes_UCS2 = 3, }; // Enum to describe QMI Voice USSD Notifcation Types enum eQMIVoiceUSSDNotifcationTypes:UINT8 { eQMIVoiceUSSDNotifcationTypes_NoActionRequired = 1, eQMIVoiceUSSDNotifcationTypes_ActionIsRequired = 2, }; // Enum to describe QMI Voice UUS Data Coding Schemes enum eQMIVoiceUUSDataCodingSchemes:UINT8 { eQMIVoiceUUSDataCodingSchemes_USP = 1, eQMIVoiceUUSDataCodingSchemes_OHLP = 2, eQMIVoiceUUSDataCodingSchemes_X244 = 3, eQMIVoiceUUSDataCodingSchemes_SMCF = 4, eQMIVoiceUUSDataCodingSchemes_IA5 = 5, eQMIVoiceUUSDataCodingSchemes_RV12RD = 6, eQMIVoiceUUSDataCodingSchemes_Q931UNCCM = 7, }; // Enum to describe QMI Voice UUS Types enum eQMIVoiceUUSTypes:UINT8 { eQMIVoiceUUSTypes_Data = 0, eQMIVoiceUUSTypes_Type1Implicit = 1, eQMIVoiceUUSTypes_Type1Required = 2, eQMIVoiceUUSTypes_Type1NotRequired = 3, eQMIVoiceUUSTypes_Type2Required = 4, eQMIVoiceUUSTypes_Type2NotRequired = 5, eQMIVoiceUUSTypes_Type3Required = 6, eQMIVoiceUUSTypes_Type3NotRequired = 7, }; // Enum to describe QMI Voice VoIP SUPS Call Types enum eQMIVoiceVoIPSUPSCallTypes:UINT8 { eQMIVoiceVoIPSUPSCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceVoIPSUPSCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceVoIPSUPSCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceVoIPSUPSCallTypes_MakeConferenceCall = 4, eQMIVoiceVoIPSUPSCallTypes_EndAllExistingCalls = 5, }; // Enum to describe QMI WDS 3GPP Call End Reasons enum eQMIWDS3GPPCallEndReasons:UINT16 { eQMIWDS3GPPCallEndReasons_OperatorDeterminedBarring = 8, eQMIWDS3GPPCallEndReasons_LLCSNDCPFailure = 25, eQMIWDS3GPPCallEndReasons_InsufficientResources = 26, eQMIWDS3GPPCallEndReasons_UnknownAPN = 27, eQMIWDS3GPPCallEndReasons_UnknownPDP = 28, eQMIWDS3GPPCallEndReasons_AuthenticationFailed = 29, eQMIWDS3GPPCallEndReasons_GGSNReject = 30, eQMIWDS3GPPCallEndReasons_ActivationReject = 31, eQMIWDS3GPPCallEndReasons_OptionNotSupported = 32, eQMIWDS3GPPCallEndReasons_OptionUnsubscribed = 33, eQMIWDS3GPPCallEndReasons_OptionTemporarilyOOO = 34, eQMIWDS3GPPCallEndReasons_NSAPIAlreadyUsed = 35, eQMIWDS3GPPCallEndReasons_RegularDeactivation = 36, eQMIWDS3GPPCallEndReasons_QoSNotAccepted = 37, eQMIWDS3GPPCallEndReasons_NetworkFailure = 38, eQMIWDS3GPPCallEndReasons_UMTSReactivationRequest = 39, eQMIWDS3GPPCallEndReasons_FeatureNotSupported = 40, eQMIWDS3GPPCallEndReasons_TFTSemanticError = 41, eQMIWDS3GPPCallEndReasons_TFTSyntaxError = 42, eQMIWDS3GPPCallEndReasons_UnknownPDPContext = 43, eQMIWDS3GPPCallEndReasons_FilterSemanticError = 44, eQMIWDS3GPPCallEndReasons_FilterSyntaxError = 45, eQMIWDS3GPPCallEndReasons_PDPWithoutActiveTFT = 46, eQMIWDS3GPPCallEndReasons_IPv4OnlyAllowed = 50, eQMIWDS3GPPCallEndReasons_IPv6OnlyAllowed = 51, eQMIWDS3GPPCallEndReasons_SingleAddressBearerOnly = 52, eQMIWDS3GPPCallEndReasons_ESMInfoNotReceived = 53, eQMIWDS3GPPCallEndReasons_NoPDNConnection = 54, eQMIWDS3GPPCallEndReasons_MultipleConnectionsNotAllowed = 55, eQMIWDS3GPPCallEndReasons_InvalidTransactionID = 81, eQMIWDS3GPPCallEndReasons_MessageIncorrectSemantic = 95, eQMIWDS3GPPCallEndReasons_InvalidMandatoryID = 96, eQMIWDS3GPPCallEndReasons_MessageTypeUnsupported = 97, eQMIWDS3GPPCallEndReasons_MessageTypeNoncompatibleState = 98, eQMIWDS3GPPCallEndReasons_UnknownInfoElement = 99, eQMIWDS3GPPCallEndReasons_ConditionalInfoElementError = 100, eQMIWDS3GPPCallEndReasons_MessageAndProtocolStateUncompatible = 101, eQMIWDS3GPPCallEndReasons_ProtocolError = 111, eQMIWDS3GPPCallEndReasons_APNTypeConflict = 112, }; // Enum to describe QMI WDS 3GPP2 RAT Types enum eQMIWDS3GPP2RATTypes:UINT8 { eQMIWDS3GPP2RATTypes_HRPD = 1, eQMIWDS3GPP2RATTypes_EHRPD = 2, eQMIWDS3GPP2RATTypes_HRPDEHRPD = 3, }; // Enum to describe QMI WDS Address Allocation Preference enum eQMIWDSAddressAllocationPreference:UINT8 { eQMIWDSAddressAllocationPreference_NASSignaling = 0, eQMIWDSAddressAllocationPreference_DHCP = 1, }; // Enum to describe QMI WDS Application Type enum eQMIWDSApplicationType:UINT32 { eQMIWDSApplicationType_DefaultApplicationType = 0, eQMIWDSApplicationType_LBSApplicationType = 32, eQMIWDSApplicationType_TetheredApplicationType = 64, }; // Enum to describe QMI WDS Authentication Protocol enum eQMIWDSAuthenticationProtocol:UINT8 { eQMIWDSAuthenticationProtocol_PAP = 1, eQMIWDSAuthenticationProtocol_CHAP = 2, eQMIWDSAuthenticationProtocol_PAPOrCHAP = 3, }; // Enum to describe QMI WDS Autoconnect Roam Settings enum eQMIWDSAutoconnectRoamSettings:UINT8 { eQMIWDSAutoconnectRoamSettings_Always = 0, eQMIWDSAutoconnectRoamSettings_HomeOnly = 1, }; // Enum to describe QMI WDS Autoconnect Settings enum eQMIWDSAutoconnectSettings:UINT8 { eQMIWDSAutoconnectSettings_Disabled = 0, eQMIWDSAutoconnectSettings_Enabled = 1, eQMIWDSAutoconnectSettings_Paused = 2, }; // Enum to describe QMI WDS CDMA Networks enum eQMIWDSCDMANetworks:UINT8 { eQMIWDSCDMANetworks_NoService = 0, eQMIWDSCDMANetworks_CDMA = 2, eQMIWDSCDMANetworks_CDMA1xEVDO = 4, }; // Enum to describe QMI WDS CDMA Service Options enum eQMIWDSCDMAServiceOptions:UINT16 { eQMIWDSCDMAServiceOptions_IS657 = 7, eQMIWDSCDMAServiceOptions_IS657OverRateSet2 = 15, eQMIWDSCDMAServiceOptions_IS707AWithRateSet1 = 22, eQMIWDSCDMAServiceOptions_IS707AWithRateSet2 = 25, eQMIWDSCDMAServiceOptions_CDMA2000PacketService = 33, eQMIWDSCDMAServiceOptions_IS707 = 4103, eQMIWDSCDMAServiceOptions_QCProprietaryRateSet2 = 32800, eQMIWDSCDMAServiceOptions_NullServiceOption = 65535, }; // Enum to describe QMI WDS Call End Reason Types enum eQMIWDSCallEndReasonTypes:UINT16 { eQMIWDSCallEndReasonTypes_Unspecified = 0, eQMIWDSCallEndReasonTypes_MobileIP = 1, eQMIWDSCallEndReasonTypes_Internal = 2, eQMIWDSCallEndReasonTypes_CallManagerDefined = 3, eQMIWDSCallEndReasonTypes_3GPPSpecificationDefined = 6, eQMIWDSCallEndReasonTypes_PPP = 7, eQMIWDSCallEndReasonTypes_EHRPD = 8, eQMIWDSCallEndReasonTypes_IPv6 = 9, }; // Enum to describe QMI WDS Call Manager Call End Reasons enum eQMIWDSCallManagerCallEndReasons:UINT16 { eQMIWDSCallManagerCallEndReasons_CDMALock = 500, eQMIWDSCallManagerCallEndReasons_Intercept = 501, eQMIWDSCallManagerCallEndReasons_Reorder = 502, eQMIWDSCallManagerCallEndReasons_ReleaseServiceOptionReject = 503, eQMIWDSCallManagerCallEndReasons_IncomingCall = 504, eQMIWDSCallManagerCallEndReasons_AlertStop = 505, eQMIWDSCallManagerCallEndReasons_Activation = 506, eQMIWDSCallManagerCallEndReasons_MaxAccessProbe = 507, eQMIWDSCallManagerCallEndReasons_CCSNotSupportedByBS = 508, eQMIWDSCallManagerCallEndReasons_NoResponseFromBS = 509, eQMIWDSCallManagerCallEndReasons_RejectedByBS = 510, eQMIWDSCallManagerCallEndReasons_Incompatible = 511, eQMIWDSCallManagerCallEndReasons_AlreadyInTC = 512, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringGPS = 513, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringSMS = 514, eQMIWDSCallManagerCallEndReasons_NoCDMAService = 515, eQMIWDSCallManagerCallEndReasons_RetryOrder = 519, eQMIWDSCallManagerCallEndReasons_ConfFailed = 1000, eQMIWDSCallManagerCallEndReasons_IncomingRejected = 1001, eQMIWDSCallManagerCallEndReasons_NoGWService = 1002, eQMIWDSCallManagerCallEndReasons_NoGPRSContext = 1003, eQMIWDSCallManagerCallEndReasons_IllegalMS = 1004, eQMIWDSCallManagerCallEndReasons_IllegalME = 1005, eQMIWDSCallManagerCallEndReasons_GPRSServicesAndNonGPRSServiceNotAllowed = 1006, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowed = 1007, eQMIWDSCallManagerCallEndReasons_MSIdentityCannotBeDerivedByTheNetwork = 1008, eQMIWDSCallManagerCallEndReasons_ImplicitlyDetached = 1009, eQMIWDSCallManagerCallEndReasons_PLMNNotAllowed = 1010, eQMIWDSCallManagerCallEndReasons_LANotAllowed = 1011, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowedInThisPLMN = 1012, eQMIWDSCallManagerCallEndReasons_PDPDuplicate = 1013, eQMIWDSCallManagerCallEndReasons_UERATChange = 1014, eQMIWDSCallManagerCallEndReasons_Congestion = 1015, eQMIWDSCallManagerCallEndReasons_NoPDPContextActivated = 1016, eQMIWDSCallManagerCallEndReasons_AccessClassDSACRejection = 1017, eQMIWDSCallManagerCallEndReasons_CDGenOrBusy = 1500, eQMIWDSCallManagerCallEndReasons_CDBillOrAuth = 1501, eQMIWDSCallManagerCallEndReasons_ChangeHDR = 1502, eQMIWDSCallManagerCallEndReasons_ExitHDR = 1503, eQMIWDSCallManagerCallEndReasons_HDRNoSession = 1504, eQMIWDSCallManagerCallEndReasons_HDROrigDuringGPSFix = 1505, eQMIWDSCallManagerCallEndReasons_HDRCSTimeout = 1506, eQMIWDSCallManagerCallEndReasons_HDRReleasedByCM = 1507, eQMIWDSCallManagerCallEndReasons_NoHybridHDRService = 1510, eQMIWDSCallManagerCallEndReasons_ClientEnd = 2000, eQMIWDSCallManagerCallEndReasons_NoService = 2001, eQMIWDSCallManagerCallEndReasons_Fade = 2002, eQMIWDSCallManagerCallEndReasons_NormalRelease = 2003, eQMIWDSCallManagerCallEndReasons_AccessInProgress = 2004, eQMIWDSCallManagerCallEndReasons_AccessFail = 2005, eQMIWDSCallManagerCallEndReasons_RedirectOrHandoff = 2006, }; // Enum to describe QMI WDS Call Types enum eQMIWDSCallTypes:UINT8 { eQMIWDSCallTypes_Laptop = 0, eQMIWDSCallTypes_Embedded = 1, }; // Enum to describe QMI WDS DUN Control Events enum eQMIWDSDUNControlEvents:UINT8 { eQMIWDSDUNControlEvents_DUNCall = 1, eQMIWDSDUNControlEvents_Entitlement = 2, eQMIWDSDUNControlEvents_SilentRedial = 3, }; // Enum to describe QMI WDS DUN Control Preferences enum eQMIWDSDUNControlPreferences:UINT8 { eQMIWDSDUNControlPreferences_RelinquishDUNControl = 0, eQMIWDSDUNControlPreferences_ExerciseDUNConrol = 1, }; // Enum to describe QMI WDS Data Call Status enum eQMIWDSDataCallStatus:UINT8 { eQMIWDSDataCallStatus_Unknown = 0, eQMIWDSDataCallStatus_Activated = 1, eQMIWDSDataCallStatus_Terminated = 2, }; // Enum to describe QMI WDS Data Call Types enum eQMIWDSDataCallTypes:UINT8 { eQMIWDSDataCallTypes_Unknown = 0, eQMIWDSDataCallTypes_Embedded = 1, eQMIWDSDataCallTypes_Tethered = 2, }; // Enum to describe QMI WDS Data Mode enum eQMIWDSDataMode:UINT8 { eQMIWDSDataMode_CDMAOrHDR = 0, eQMIWDSDataMode_CDMAOnly = 1, eQMIWDSDataMode_HDROnly = 2, }; // Enum to describe QMI WDS Data Rate enum eQMIWDSDataRate:UINT8 { eQMIWDSDataRate_LowSO15Only = 0, eQMIWDSDataRate_MediumSO33PlusLowRSCH = 1, eQMIWDSDataRate_HighSO33PlusHighRSCH = 2, }; // Enum to describe QMI WDS Data Systems enum eQMIWDSDataSystems:UINT32 { eQMIWDSDataSystems_Unknown = 0, eQMIWDSDataSystems_CDMA1x = 1, eQMIWDSDataSystems_CDMA1xEVDO = 2, eQMIWDSDataSystems_GPRS = 3, eQMIWDSDataSystems_WCDMA = 4, eQMIWDSDataSystems_LTE = 5, }; // Enum to describe QMI WDS EHRPD Call End Reason enum eQMIWDSEHRPDCallEndReason:UINT16 { eQMIWDSEHRPDCallEndReason_SubsLimitedToV4 = 1, eQMIWDSEHRPDCallEndReason_SubsLimitedToV6 = 2, eQMIWDSEHRPDCallEndReason_VSNCPTimeout = 4, eQMIWDSEHRPDCallEndReason_VSNCPFailure = 5, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IGeneralError = 6, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IUnauthAPN = 7, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNLimit = 8, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2INoPDNGW = 9, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWUnreach = 10, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWRejected = 11, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IInsufficientParam = 12, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IResourceUnavailable = 13, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IAdminProhibited = 14, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNIDInUse = 15, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2ISubscriberLimitation = 16, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNExistsForAPN = 17, }; // Enum to describe QMI WDS Extended Error Code enum eQMIWDSExtendedErrorCode:UINT16 { eQMIWDSExtendedErrorCode_Failure = 1, eQMIWDSExtendedErrorCode_InvalidHandle = 2, eQMIWDSExtendedErrorCode_InvalidOperation = 3, eQMIWDSExtendedErrorCode_InvalidProfileType = 4, eQMIWDSExtendedErrorCode_InvalidProfileNumber = 5, eQMIWDSExtendedErrorCode_InvalidIdentifier = 6, eQMIWDSExtendedErrorCode_InvalidArgument = 7, eQMIWDSExtendedErrorCode_NotInitialized = 8, eQMIWDSExtendedErrorCode_InvalidLength = 9, eQMIWDSExtendedErrorCode_ListEnd = 10, eQMIWDSExtendedErrorCode_InvalidSubscriptionID = 11, eQMIWDSExtendedErrorCode_InvalidProfileFamily = 12, eQMIWDSExtendedErrorCode_3GPPInvalidProfileFamily = 1001, eQMIWDSExtendedErrorCode_3GPPAccessError = 1002, eQMIWDSExtendedErrorCode_3GPPContextNotDefined = 1003, eQMIWDSExtendedErrorCode_3GPPValidFlagNotSet = 1004, eQMIWDSExtendedErrorCode_3GPPReadOnlyFlagSet = 1005, eQMIWDSExtendedErrorCode_3GPPErrorMaxProfileNumber = 1006, eQMIWDSExtendedErrorCode_3GPP2ErrorInvalidIdentifierForProfile = 1101, }; // Enum to describe QMI WDS Extended Tech Prefs enum eQMIWDSExtendedTechPrefs:UINT16 { eQMIWDSExtendedTechPrefs_CDMA = 32769, eQMIWDSExtendedTechPrefs_UMTS = 32772, }; // Enum to describe QMI WDS IP Families enum eQMIWDSIPFamilies:UINT8 { eQMIWDSIPFamilies_IPv4 = 4, eQMIWDSIPFamilies_IPv6 = 6, eQMIWDSIPFamilies_Unspecified = 8, }; // Enum to describe QMI WDS IP Version enum eQMIWDSIPVersion:UINT8 { eQMIWDSIPVersion_IPv4 = 4, eQMIWDSIPVersion_IPv6 = 6, }; // Enum to describe QMI WDS IPv6 Call End Reason enum eQMIWDSIPv6CallEndReason:UINT16 { eQMIWDSIPv6CallEndReason_PrefixUnavailable = 1, }; // Enum to describe QMI WDS Internal Call End Reasons enum eQMIWDSInternalCallEndReasons:UINT16 { eQMIWDSInternalCallEndReasons_Internal = 201, eQMIWDSInternalCallEndReasons_CallEnded = 202, eQMIWDSInternalCallEndReasons_InternalUnknownCauseCode = 203, eQMIWDSInternalCallEndReasons_UnknownCauseCode = 204, eQMIWDSInternalCallEndReasons_CloseInProgress = 205, eQMIWDSInternalCallEndReasons_NWInitiatedTermination = 206, eQMIWDSInternalCallEndReasons_AppPreempted = 207, }; // Enum to describe QMI WDS Mobile IP Call End Reasons enum eQMIWDSMobileIPCallEndReasons:UINT16 { eQMIWDSMobileIPCallEndReasons_FAUnspecified = 64, eQMIWDSMobileIPCallEndReasons_FAAdministrativelyProhibited = 65, eQMIWDSMobileIPCallEndReasons_FAInsufficientResources = 66, eQMIWDSMobileIPCallEndReasons_FAMobileNodeAuthenticationFailure = 67, eQMIWDSMobileIPCallEndReasons_FAHAAuthenticationFailure = 68, eQMIWDSMobileIPCallEndReasons_FARequestedLifetimeTooLong = 69, eQMIWDSMobileIPCallEndReasons_FAMalformedRequest = 70, eQMIWDSMobileIPCallEndReasons_FAMalformedReply = 71, eQMIWDSMobileIPCallEndReasons_FAEncapsulationUnavailable = 72, eQMIWDSMobileIPCallEndReasons_FAVJHCUnavailable = 73, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelUnavailable = 74, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelIsMandatoryAndTBitIsNotSet = 75, eQMIWDSMobileIPCallEndReasons_FADeliveryStyleNotSupported = 79, eQMIWDSMobileIPCallEndReasons_FAMissingNAI = 97, eQMIWDSMobileIPCallEndReasons_FAMissingHA = 98, eQMIWDSMobileIPCallEndReasons_FAMissingHomeAddress = 99, eQMIWDSMobileIPCallEndReasons_FAUnknownChallenge = 104, eQMIWDSMobileIPCallEndReasons_FAMissingChallenge = 105, eQMIWDSMobileIPCallEndReasons_FAStaleChallenge = 106, eQMIWDSMobileIPCallEndReasons_HAReasonUnspecified = 128, eQMIWDSMobileIPCallEndReasons_HAAdministrativelyProhibited = 129, eQMIWDSMobileIPCallEndReasons_HAInsufficientResources = 130, eQMIWDSMobileIPCallEndReasons_HAMobileNodeAuthenticationFailure = 131, eQMIWDSMobileIPCallEndReasons_HAFAAuthenticationFailure = 132, eQMIWDSMobileIPCallEndReasons_HARegistrationIDMismatch = 133, eQMIWDSMobileIPCallEndReasons_HAMalformedRequest = 134, eQMIWDSMobileIPCallEndReasons_HAUnknownHAAddress = 136, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelUnavailable = 137, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelIsMandatoryAndTBitIsNotSet = 138, eQMIWDSMobileIPCallEndReasons_HAEncapsulationUnavailable = 139, eQMIWDSMobileIPCallEndReasons_Unknown = 65535, }; // Enum to describe QMI WDS Network Types enum eQMIWDSNetworkTypes:UINT8 { eQMIWDSNetworkTypes_Unknown = 0, eQMIWDSNetworkTypes_CDMA = 1, eQMIWDSNetworkTypes_UMTS = 2, }; // Enum to describe QMI WDS PDN Type enum eQMIWDSPDNType:UINT8 { eQMIWDSPDNType_IPv4PDNType = 0, eQMIWDSPDNType_IPv6PDNType = 1, eQMIWDSPDNType_IPv4orIPv6PDNType = 2, eQMIWDSPDNType_UnspecifiedPDNType = 3, }; // Enum to describe QMI WDS PDP Access Control Flag enum eQMIWDSPDPAccessControlFlag:UINT8 { eQMIWDSPDPAccessControlFlag_PDPAccessControlNone = 0, eQMIWDSPDPAccessControlFlag_PDPAccessControlReject = 1, eQMIWDSPDPAccessControlFlag_PDPAccessControlPermission = 2, }; // Enum to describe QMI WDS PDP Data Compression Type enum eQMIWDSPDPDataCompressionType:UINT8 { eQMIWDSPDPDataCompressionType_Off = 0, eQMIWDSPDPDataCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPDataCompressionType_V42BIS = 2, eQMIWDSPDPDataCompressionType_V44 = 3, }; // Enum to describe QMI WDS PDP Header Compression Type enum eQMIWDSPDPHeaderCompressionType:UINT8 { eQMIWDSPDPHeaderCompressionType_Off = 0, eQMIWDSPDPHeaderCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPHeaderCompressionType_RFC1144 = 2, eQMIWDSPDPHeaderCompressionType_RFC2507 = 3, eQMIWDSPDPHeaderCompressionType_RFC3095 = 4, }; // Enum to describe QMI WDS PPP Call End Reason enum eQMIWDSPPPCallEndReason:UINT16 { eQMIWDSPPPCallEndReason_Timeout = 1, eQMIWDSPPPCallEndReason_AuthenticationFailed = 2, eQMIWDSPPPCallEndReason_OptionMismatch = 3, eQMIWDSPPPCallEndReason_PAPFailure = 31, eQMIWDSPPPCallEndReason_CHAPFailure = 32, eQMIWDSPPPCallEndReason_Unknown = 65535, }; // Enum to describe QMI WDS Profile Family enum eQMIWDSProfileFamily:UINT8 { eQMIWDSProfileFamily_SocketsFamily = 1, }; // Enum to describe QMI WDS Profile Param ID enum eQMIWDSProfileParamID:UINT32 { eQMIWDSProfileParamID_UMTSRequestedQoS = 23, eQMIWDSProfileParamID_UMTSMinimumQoS = 24, eQMIWDSProfileParamID_GPRSRequestedQoS = 25, eQMIWDSProfileParamID_GPRSMinimumQoS = 26, eQMIWDSProfileParamID_TFTFilterID1 = 50, eQMIWDSProfileParamID_TFTFilterID2 = 51, }; // Enum to describe QMI WDS QoS Class Identifier enum eQMIWDSQoSClassIdentifier:UINT8 { eQMIWDSQoSClassIdentifier_NetworkAssignQCI = 0, eQMIWDSQoSClassIdentifier_GuaranteedBitrate1 = 1, eQMIWDSQoSClassIdentifier_GuaranteedBitrate2 = 2, eQMIWDSQoSClassIdentifier_GuaranteedBitrate3 = 3, eQMIWDSQoSClassIdentifier_GuaranteedBitrate4 = 4, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate5 = 5, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate6 = 6, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate7 = 7, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate8 = 8, }; // Enum to describe QMI WDS SIP/MIP Call Types enum eQMIWDSSIPMIPCallTypes:UINT8 { eQMIWDSSIPMIPCallTypes_NotUp = 0, eQMIWDSSIPMIPCallTypes_SIPUp = 1, eQMIWDSSIPMIPCallTypes_MIPUp = 2, }; // Enum to describe QMI WDS Slot Cycle Set Results enum eQMIWDSSlotCycleSetResults:UINT8 { eQMIWDSSlotCycleSetResults_Succcess = 0, eQMIWDSSlotCycleSetResults_FailureRequestRejected = 1, eQMIWDSSlotCycleSetResults_FailureRequestFailedTX = 2, eQMIWDSSlotCycleSetResults_FailureNotSupported = 3, eQMIWDSSlotCycleSetResults_FailureNoNetwork = 4, }; // Enum to describe QMI WDS Tethered Call Types enum eQMIWDSTetheredCallTypes:UINT8 { eQMIWDSTetheredCallTypes_NonTethered = 0, eQMIWDSTetheredCallTypes_RmNet = 1, eQMIWDSTetheredCallTypes_DUN = 2, }; // Enum to describe QMI WMS ACK Failure Cause enum eQMIWMSACKFailureCause:UINT8 { eQMIWMSACKFailureCause_NoNetworkResponse = 0, eQMIWMSACKFailureCause_NetworkReleasedLink = 1, eQMIWMSACKFailureCause_NotSent = 2, }; // Enum to describe QMI WMS CDMA Service Options enum eQMIWMSCDMAServiceOptions:UINT8 { eQMIWMSCDMAServiceOptions_Automatic = 0, eQMIWMSCDMAServiceOptions_SO6 = 6, eQMIWMSCDMAServiceOptions_SO14 = 14, }; // Enum to describe QMI WMS Error Classes enum eQMIWMSErrorClasses:UINT8 { eQMIWMSErrorClasses_Temporary = 0, eQMIWMSErrorClasses_Permanent = 1, }; // Enum to describe QMI WMS Error Classes 2 enum eQMIWMSErrorClasses2:UINT8 { eQMIWMSErrorClasses2_Temporary = 2, eQMIWMSErrorClasses2_Permanent = 3, }; // Enum to describe QMI WMS GSM/WCDMA Domains enum eQMIWMSGSMWCDMADomains:UINT8 { eQMIWMSGSMWCDMADomains_CSPreferred = 0, eQMIWMSGSMWCDMADomains_PSPreferred = 1, eQMIWMSGSMWCDMADomains_CSOnly = 2, eQMIWMSGSMWCDMADomains_PSOnly = 3, }; // Enum to describe QMI WMS Language enum eQMIWMSLanguage:UINT16 { eQMIWMSLanguage_Unknown = 0, eQMIWMSLanguage_English = 1, eQMIWMSLanguage_French = 2, eQMIWMSLanguage_Spanish = 3, eQMIWMSLanguage_Japanese = 4, eQMIWMSLanguage_Korean = 5, eQMIWMSLanguage_Chinese = 6, eQMIWMSLanguage_Hebrew = 7, }; // Enum to describe QMI WMS Message Classes enum eQMIWMSMessageClasses:UINT8 { eQMIWMSMessageClasses_Class0 = 0, eQMIWMSMessageClasses_Class1 = 1, eQMIWMSMessageClasses_Class2 = 2, eQMIWMSMessageClasses_Class3 = 3, eQMIWMSMessageClasses_ClassNone = 4, eQMIWMSMessageClasses_ClassCDMA = 5, }; // Enum to describe QMI WMS Message Delivery Failure Type enum eQMIWMSMessageDeliveryFailureType:UINT8 { eQMIWMSMessageDeliveryFailureType_Temporary = 0, eQMIWMSMessageDeliveryFailureType_Permanent = 1, }; // Enum to describe QMI WMS Message Formats enum eQMIWMSMessageFormats:UINT8 { eQMIWMSMessageFormats_CDMA = 0, eQMIWMSMessageFormats_AnalogCLIUnsupported = 1, eQMIWMSMessageFormats_AnalogVoiceMailUnsupported = 2, eQMIWMSMessageFormats_AnalogWMSUnsupported = 3, eQMIWMSMessageFormats_AnalogAWIWMSUnsupported = 4, eQMIWMSMessageFormats_MWIUnsupported = 5, eQMIWMSMessageFormats_GSMWCDMAPP = 6, eQMIWMSMessageFormats_GSMWCDMABC = 7, eQMIWMSMessageFormats_MWI = 8, }; // Enum to describe QMI WMS Message Protocols enum eQMIWMSMessageProtocols:UINT8 { eQMIWMSMessageProtocols_CDMA = 0, eQMIWMSMessageProtocols_GSMWCDMAUnsupported = 1, }; // Enum to describe QMI WMS Message Tags enum eQMIWMSMessageTags:UINT8 { eQMIWMSMessageTags_MTRead = 0, eQMIWMSMessageTags_MTNotRead = 1, eQMIWMSMessageTags_MOSend = 2, eQMIWMSMessageTags_MONotSent = 3, }; // Enum to describe QMI WMS Message Types enum eQMIWMSMessageTypes:UINT8 { eQMIWMSMessageTypes_PointToPoint = 0, eQMIWMSMessageTypes_Broadcast = 1, }; // Enum to describe QMI WMS Network Registration Status enum eQMIWMSNetworkRegistrationStatus:UINT8 { eQMIWMSNetworkRegistrationStatus_NoService = 0, eQMIWMSNetworkRegistrationStatus_InProgress = 1, eQMIWMSNetworkRegistrationStatus_Failed = 2, eQMIWMSNetworkRegistrationStatus_LimitedService = 3, eQMIWMSNetworkRegistrationStatus_FullService = 4, }; // Enum to describe QMI WMS Notification Type enum eQMIWMSNotificationType:UINT8 { eQMIWMSNotificationType_Primary = 0, eQMIWMSNotificationType_SecondaryGSM = 1, eQMIWMSNotificationType_SecondaryUMTS = 2, }; // Enum to describe QMI WMS Protocol Identifier Data enum eQMIWMSProtocolIdentifierData:UINT8 { eQMIWMSProtocolIdentifierData_Default = 0, eQMIWMSProtocolIdentifierData_Implicit = 32, eQMIWMSProtocolIdentifierData_Telex = 33, eQMIWMSProtocolIdentifierData_G3Fax = 34, eQMIWMSProtocolIdentifierData_G4Fax = 35, eQMIWMSProtocolIdentifierData_VoicePhone = 36, eQMIWMSProtocolIdentifierData_Ermes = 37, eQMIWMSProtocolIdentifierData_NATPaging = 38, eQMIWMSProtocolIdentifierData_Videotex = 39, eQMIWMSProtocolIdentifierData_TeltexUnspecified = 40, eQMIWMSProtocolIdentifierData_TeltexPSPDN = 41, eQMIWMSProtocolIdentifierData_TeltexCSPDN = 42, eQMIWMSProtocolIdentifierData_TeltexPSTN = 43, eQMIWMSProtocolIdentifierData_TeltexISDN = 44, eQMIWMSProtocolIdentifierData_UCI = 45, eQMIWMSProtocolIdentifierData_MessageHandling = 48, eQMIWMSProtocolIdentifierData_X400 = 49, eQMIWMSProtocolIdentifierData_InternetEMail = 50, eQMIWMSProtocolIdentifierData_SCSpecific1 = 56, eQMIWMSProtocolIdentifierData_SCSpecific2 = 57, eQMIWMSProtocolIdentifierData_SCSpecific3 = 58, eQMIWMSProtocolIdentifierData_SCSpecific4 = 59, eQMIWMSProtocolIdentifierData_SCSpecific5 = 60, eQMIWMSProtocolIdentifierData_SCSpecific6 = 61, eQMIWMSProtocolIdentifierData_SCSpecific7 = 62, eQMIWMSProtocolIdentifierData_GSMUMTS = 63, eQMIWMSProtocolIdentifierData_SMType0 = 64, eQMIWMSProtocolIdentifierData_ReplaceSM1 = 65, eQMIWMSProtocolIdentifierData_ReplaceSM2 = 66, eQMIWMSProtocolIdentifierData_ReplaceSM3 = 67, eQMIWMSProtocolIdentifierData_ReplaceSM4 = 68, eQMIWMSProtocolIdentifierData_ReplaceSM5 = 69, eQMIWMSProtocolIdentifierData_ReplaceSM6 = 70, eQMIWMSProtocolIdentifierData_ReplaceSM7 = 71, eQMIWMSProtocolIdentifierData_ReturnCall = 95, eQMIWMSProtocolIdentifierData_ANSI136RData = 124, eQMIWMSProtocolIdentifierData_MEDataDownload = 125, eQMIWMSProtocolIdentifierData_MEDepersonalizationShortMessage = 126, eQMIWMSProtocolIdentifierData_SIMDataDownload = 127, }; // Enum to describe QMI WMS Receipt Actions enum eQMIWMSReceiptActions:UINT8 { eQMIWMSReceiptActions_Discard = 0, eQMIWMSReceiptActions_StoreAndNotify = 1, eQMIWMSReceiptActions_TransferOnly = 2, eQMIWMSReceiptActions_TransfterAndAcknowledge = 3, }; // Enum to describe QMI WMS Route Values enum eQMIWMSRouteValues:UINT8 { eQMIWMSRouteValues_Discard = 0, eQMIWMSRouteValues_StoreAndNotify = 1, eQMIWMSRouteValues_TransferOnly = 2, eQMIWMSRouteValues_TransferAndAcknowledge = 3, eQMIWMSRouteValues_Unknown = 255, }; // Enum to describe QMI WMS SMS Call Status enum eQMIWMSSMSCallStatus:UINT8 { eQMIWMSSMSCallStatus_Incoming = 0, eQMIWMSSMSCallStatus_Connected = 1, eQMIWMSSMSCallStatus_Aborted = 2, eQMIWMSSMSCallStatus_Disconnected = 3, eQMIWMSSMSCallStatus_Connecting = 4, }; // Enum to describe QMI WMS SMS Message Mode enum eQMIWMSSMSMessageMode:UINT8 { eQMIWMSSMSMessageMode_GSMWCDMA = 1, }; // Enum to describe QMI WMS Storage Types enum eQMIWMSStorageTypes:UINT8 { eQMIWMSStorageTypes_UIM = 0, eQMIWMSStorageTypes_NV = 1, eQMIWMSStorageTypes_Unknown = 2, }; // Enum to describe QMI WMS Subscription Type enum eQMIWMSSubscriptionType:UINT8 { eQMIWMSSubscriptionType_PrimarySubscription = 0, eQMIWMSSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI WMS Transport Capability enum eQMIWMSTransportCapability:UINT8 { eQMIWMSTransportCapability_CDMA = 0, eQMIWMSTransportCapability_GW = 1, }; // Enum to describe QMI WMS Transport Type enum eQMIWMSTransportType:UINT8 { eQMIWMSTransportType_IMS = 0, }; // Enum to describe QMI WMS Waiting Message Type enum eQMIWMSWaitingMessageType:UINT8 { eQMIWMSWaitingMessageType_Voicemail = 0, eQMIWMSWaitingMessageType_Fax = 1, eQMIWMSWaitingMessageType_Email = 2, eQMIWMSWaitingMessageType_Other = 3, eQMIWMSWaitingMessageType_Videomail = 4, }; libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/GobiConnectionMgmt/GobiConnectionMgmtAPIStructs.h000077500000000000000000022647431455567757300313260ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIStructs.h DESCRIPTION: Declaration of the Gobi API structures Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Include the enumerations #include "GobiConnectionMgmtAPIEnums.h" #pragma pack( push, 1 ) // Struct to represent a QMI (control/service) content struct sQMIRawContentHeader { BYTE mTypeID; WORD mLength; // This array must be the size specified by mLength // BYTE mValue[1]; }; // Structure to describe TLV 0x02, the Result Code // It is common for all Responses struct sResultCode { eQMIResults mQMIResult; eQMIErrors mQMIError; }; // Structure to describe TLV 0x01 for QMI LOC, the status // It is common for QMI LOC indications above 0x0032 struct sLOCIndication_Status { eQMILOCStatus mStatus; }; // Structure to describe request TLV 0x10 for WDSSetEventReport() struct sWDSSetEventReportRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe request TLV 0x11 for WDSSetEventReport() struct sWDSSetEventReportRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; // Padding out 24 bits UINT8 mReserved1[3]; }; // Structure to describe request TLV 0x12 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x13 for WDSSetEventReport() struct sWDSSetEventReportRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x14 for WDSSetEventReport() struct sWDSSetEventReportRequest_MIPStatusIndicator { INT8 mReportMIPStatus; }; // Structure to describe request TLV 0x15 for WDSSetEventReport() struct sWDSSetEventReportRequest_CurrentDataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x17 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataCallStatusIndicator { INT8 mReportDataCallStatus; }; // Structure to describe request TLV 0x18 for WDSSetEventReport() struct sWDSSetEventReportRequest_PreferredDataSystemIndicator { INT8 mReportPreferredDataSystem; }; // Structure to describe request TLV 0x19 for WDSSetEventReport() struct sWDSSetEventReportRequest_EVDOPMChangeIndicator { INT8 mReportEVDOPageMonitorPeriodChange; }; // Structure to describe indication TLV 0x10 for WDS EventReport struct sWDSEventReportIndication_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe indication TLV 0x11 for WDS EventReport struct sWDSEventReportIndication_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe indication TLV 0x12 for WDS EventReport struct sWDSEventReportIndication_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe indication TLV 0x13 for WDS EventReport struct sWDSEventReportIndication_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe indication TLV 0x14 for WDS EventReport struct sWDSEventReportIndication_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe indication TLV 0x15 for WDS EventReport struct sWDSEventReportIndication_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe indication TLV 0x16 for WDS EventReport struct sWDSEventReportIndication_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe indication TLV 0x17 for WDS EventReport struct sWDSEventReportIndication_DataBearerTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x18 for WDS EventReport struct sWDSEventReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x19 for WDS EventReport struct sWDSEventReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x1A for WDS EventReport struct sWDSEventReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x1B for WDS EventReport struct sWDSEventReportIndication_MIPStatus { UINT8 mMIPStatus; }; // Structure to describe indication TLV 0x1D for WDS EventReport struct sWDSEventReportIndication_CurrentDataBearerTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; // Padding out 28 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORevA union uValOfCDMA1x_or_CDMA1xEvDORevA { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved6:4; UINT8 mReserved7[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // Padding out 32 bits UINT8 mReserved8[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevA mValOfCDMA1x_or_CDMA1xEvDORevA; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; // Padding out 23 bits UINT8 mReserved9[2]; UINT8 mReserved10:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved11[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe indication TLV 0x1F for WDS EventReport struct sWDSEventReportIndication_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe indication TLV 0x20 for WDS EventReport struct sWDSEventReportIndication_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe indication TLV 0x22 for WDS EventReport struct sWDSEventReportIndication_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe indication TLV 0x23 for WDS EventReport struct sWDSEventReportIndication_EVDOPageMonitorPeriodChange { UINT8 mEVDOPageMonitorPeriodChange; INT8 mEVDOForceLongSleep; }; // Structure to describe request TLV 0x01 for WDSAbort() struct sWDSAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ContextAPNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x17 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x18 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x19 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x30 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_TechnologyPreference { bool mEnable3GPP:1; bool mEnable3GPP2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x31 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPPProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x32 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPP2ProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x33 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x34 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ExtendedTechnologyPreference { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe request TLV 0x35 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_CallType { eQMIWDSCallTypes mCallType; }; // Structure to describe response TLV 0x01 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe response TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe request TLV 0x10 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_Autoconnect { INT8 mAutoconnectOff; }; // Structure to describe response TLV 0x01 for WDSGetPacketServiceStatus() struct sWDSGetPacketServiceStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x01 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; INT8 mReconfigureRequired; }; // Structure to describe indication TLV 0x10 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x11 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe indication TLV 0x12 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe response TLV 0x01 for WDSGetChannelRates() struct sWDSGetChannelRatesResponse_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe request TLV 0x01 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsRequest_PacketStatsMask { bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; // Padding out 24 bits UINT8 mReserved1[3]; }; // Structure to describe response TLV 0x10 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe response TLV 0x11 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe response TLV 0x12 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe response TLV 0x13 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe response TLV 0x14 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe response TLV 0x15 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe response TLV 0x19 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x1A for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x1B for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x1C for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe request TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe request TLV 0x10 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSCreateProfile() struct sWDSCreateProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSCreateProfile() struct sWDSCreateProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSCreateProfile() struct sWDSCreateProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSCreateProfile() struct sWDSCreateProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSCreateProfile() struct sWDSCreateProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSCreateProfile() struct sWDSCreateProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSCreateProfile() struct sWDSCreateProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSCreateProfile() struct sWDSCreateProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSCreateProfile() struct sWDSCreateProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSCreateProfile() struct sWDSCreateProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x8F for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfilePersistent { INT8 mProfilePersistent; }; // Structure to describe request TLV 0x90 for WDSCreateProfile() struct sWDSCreateProfileRequest_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSCreateProfile() struct sWDSCreateProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSCreateProfile() struct sWDSCreateProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSCreateProfile() struct sWDSCreateProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSCreateProfile() struct sWDSCreateProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSCreateProfile() struct sWDSCreateProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileResponse_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSCreateProfile() struct sWDSCreateProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSModifyProfile() struct sWDSModifyProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSModifyProfile() struct sWDSModifyProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSModifyProfile() struct sWDSModifyProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSModifyProfile() struct sWDSModifyProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSModifyProfile() struct sWDSModifyProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSModifyProfile() struct sWDSModifyProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSModifyProfile() struct sWDSModifyProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSModifyProfile() struct sWDSModifyProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSModifyProfile() struct sWDSModifyProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSModifyProfile() struct sWDSModifyProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x90 for WDSModifyProfile() struct sWDSModifyProfileRequest_NegotiateDNSServerPrefrence { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSModifyProfile() struct sWDSModifyProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSModifyProfile() struct sWDSModifyProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSModifyProfile() struct sWDSModifyProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSModifyProfile() struct sWDSModifyProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSModifyProfile() struct sWDSModifyProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xE0 for WDSModifyProfile() struct sWDSModifyProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSDeleteProfile() struct sWDSDeleteProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSDeleteProfile() struct sWDSDeleteProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetProfileList() struct sWDSGetProfileListRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSGetProfileList() struct sWDSGetProfileListRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSGetProfileList() struct sWDSGetProfileListRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSGetProfileList() struct sWDSGetProfileListRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSGetProfileList() struct sWDSGetProfileListRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSGetProfileList() struct sWDSGetProfileListRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSGetProfileList() struct sWDSGetProfileListRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSGetProfileList() struct sWDSGetProfileListRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSGetProfileList() struct sWDSGetProfileListRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSGetProfileList() struct sWDSGetProfileListRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x90 for WDSGetProfileList() struct sWDSGetProfileListRequest_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSGetProfileList() struct sWDSGetProfileListRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSGetProfileList() struct sWDSGetProfileListRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSGetProfileList() struct sWDSGetProfileListRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSGetProfileList() struct sWDSGetProfileListRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetProfileList() struct sWDSGetProfileListResponse_ProfileList { UINT8 mNumberOfProfiles; struct sProfile { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; UINT8 mProfileNameLength; // This array must be the size specified by mProfileNameLength // char mProfileName[1]; }; // This array must be the size specified by mNumberOfProfiles // sProfile mProfiles[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileList() struct sWDSGetProfileListResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetProfileSettings() struct sWDSGetProfileSettingsRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IMCMFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x90 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xE0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe response TLV 0x10 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x1D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x90 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsRequest_RequestedSettings { bool mProfileID:1; bool mProfileName:1; bool mPDPType:1; bool mAPNName:1; bool mDNSAddress:1; bool mGrantedQoS:1; bool mUsername:1; bool mAuthenticationProtocol:1; bool mIPAddress:1; bool mGatewayInfo:1; bool mPCSCFAddress:1; bool mPCSCFServerAddressList:1; bool mPCSCFDomainNameList:1; bool mMTU:1; bool mDomainNameList:1; bool mIPFamily:1; bool mIMCNFlag:1; bool mExtendedTechnology:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x14 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_UMTSGrantedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GPRSGrantedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileID { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x20 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewayAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x21 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewaySubnetMask { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x22 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x23 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFServerAddressList { UINT8 mNumberOfInstances; struct sInstance { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x24 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFDomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mFQDNLength; // This array must be the size specified by mFQDNLength // char mFQDN[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x25 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x26 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6GatewayAddress { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x27 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x28 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_MTU { UINT32 mMTU; }; // Structure to describe response TLV 0x2A for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_DomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mDomainNameLength; // This array must be the size specified by mDomainNameLength // char mDomainName[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x2B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe response TLV 0x2C for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x2D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe response TLV 0x2E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFIPv6AddressList { UINT8 mNumberOfAddresses; struct sAddress { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mNumberOfAddresses // sAddress mAddresses[1]; }; // Structure to describe request TLV 0x01 for WDSSetMIPMode() struct sWDSSetMIPModeRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetMIPMode() struct sWDSGetMIPModeResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetDormancy() struct sWDSGetDormancyResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x01 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe response TLV 0x10 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x01 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_Duration { UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousDuration { UINT64 mPreviousDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x12 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousActiveDuration { UINT64 mPreviousDataSessionActiveDuration; }; // Structure to describe response TLV 0x01 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x01 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x10 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x01 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x10 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe request TLV 0x01 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_RequestedStatus { bool mConnectionStatus:1; bool mLastCallEndReason:1; bool mRXTXByteTotals:1; bool mDormancyStatus:1; bool mDataBearerTechnology:1; bool mChannelRates:1; bool mDuration:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ConnectionStatusIndicator { INT8 mReportConnectionStatus; }; // Structure to describe request TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; // Padding out 6 bits UINT8 mReserved1:6; bool mTXByteTotal:1; bool mRXByteTotal:1; // Padding out 24 bits UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe response TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x15 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x16 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe response TLV 0x17 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x18 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x19 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x20 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x10 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x11 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x12 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x13 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x14 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x15 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x16 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe response TLV 0x01 for WDSGetActiveMIPProfile() struct sWDSGetActiveMIPProfileResponse_Index { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSSetActiveMIPProfile() struct sWDSSetActiveMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSGetMIPProfile() struct sWDSGetMIPProfileRequest_Index { UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_State { INT8 mEnabled; }; // Structure to describe response TLV 0x11 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x13 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x14 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe response TLV 0x15 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe response TLV 0x16 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HASPI { UINT32 mHASPI; }; // Structure to describe response TLV 0x17 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAASPI { UINT32 mAAASPI; }; // Structure to describe response TLV 0x1A for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe response TLV 0x1B for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe request TLV 0x01 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_State { INT8 mEnabled; }; // Structure to describe request TLV 0x11 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe request TLV 0x15 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe request TLV 0x16 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HASPI { UINT32 mHASPI; }; // Structure to describe request TLV 0x17 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequeste_AAASPI { UINT32 mAAASPI; }; // Structure to describe request TLV 0x18 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNHA { // String is variable length, but must be size of the container // char mMNHAKey[1]; }; // Structure to describe request TLV 0x19 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNAAA { // String is variable length, but must be size of the container // char mMNAAAKey[1]; }; // Structure to describe response TLV 0x10 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x11 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe response TLV 0x12 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe response TLV 0x13 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe response TLV 0x14 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe response TLV 0x15 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe response TLV 0x16 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe request TLV 0x01 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x10 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe request TLV 0x11 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe request TLV 0x12 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe request TLV 0x13 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe request TLV 0x14 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe request TLV 0x15 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe request TLV 0x16 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe response TLV 0x01 for WDSGetLastMIPStatus() struct sWDSGetLastMIPStatusResponse_Status { UINT8 mLastMIPStatus; }; // Structure to describe response TLV 0x01 for WDSGetANAAAAuthenticationStatus() struct sWDSGetANAAAAuthenticationStatusResponse_Status { INT8 mANAAAAuthenticated; }; // Structure to describe response TLV 0x01 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_Technology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; // Padding out 28 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORevA union uValOfCDMA1x_or_CDMA1xEvDORevA { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved6:4; UINT8 mReserved7[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // Padding out 32 bits UINT8 mReserved8[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevA mValOfCDMA1x_or_CDMA1xEvDORevA; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; // Padding out 23 bits UINT8 mReserved9[2]; UINT8 mReserved10:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved11[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_LastCallTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; // Padding out 28 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORevA union uValOfCDMA1x_or_CDMA1xEvDORevA { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved6:4; UINT8 mReserved7[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // Padding out 32 bits UINT8 mReserved8[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevA mValOfCDMA1x_or_CDMA1xEvDORevA; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; // Padding out 23 bits UINT8 mReserved9[2]; UINT8 mReserved10:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved11[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe request TLV 0x10 for WDSGetCallList() struct sWDSGetCallListRequest_ListType { eQMICallHistoryTypes mCallListType; }; // Structure to describe response TLV 0x10 for WDSGetCallList() struct sWDSGetCallListResponse_FullList { UINT16 mCallRecords; struct sRecord { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe response TLV 0x11 for WDSGetCallList() struct sWDSGetCallListResponse_IDList { UINT16 mCallRecords; struct sRecord { UINT16 mID; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordRequest_RecordID { UINT16 mID; }; // Structure to describe response TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordResponse_Record { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // Structure to describe response TLV 0x01 for WDSGetCallListMaxSize() struct sWDSGetCallListMaxSizeResponse_Maximum { UINT16 mCallListMaxSize; }; // Structure to describe request TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberRequest_ProfileType { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; }; // Structure to describe response TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ProfileNumber { UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfile() struct sWDSResetProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSResetProfile() struct sWDSResetProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidRequest_ProfileParam { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; eQMIWDSProfileParamID mProfileParamID; }; // Structure to describe response TLV 0xE0 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetIPFamilyPreference() struct sWDSSetIPFamilyPreferenceRequest_IPFamilyPreference { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x01 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x10 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x10 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x11 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x13 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x10 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x13 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetCDMAPreDormancySettings() struct sWDSGetCDMAPreDormancySettingsResponse_Settings { eQMIWDSCDMAServiceOptions mServiceOption; eQMIWDSCDMANetworks mDataSessionNetwork; }; // Structure to describe request TLV 0x01 for WDSSetCAMTimer() struct sWDSSetCAMTimerRequest_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe response TLV 0x01 for WDSGetCAMTimer() struct sWDSGetCAMTimerResponse_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe request TLV 0x01 for WDSSetSCRM() struct sWDSSetSCRMRequest_SCRM { INT8 mSCRMEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSCRM() struct sWDSGetSCRMResponse_SCRM { INT8 mSCRMEnabled; }; // Structure to describe request TLV 0x01 for WDSSetRDUD() struct sWDSSetRDUDRequest_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetRDUD() struct sWDSGetRDUDResponse_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSIPMIPCallType() struct sWDSGetSIPMIPCallTypeResponse_CallType { eQMIWDSSIPMIPCallTypes mCallType; }; // Structure to describe request TLV 0x01 for WDSSetEVDOPageMonitorPeriod() struct sWDSSetEVDOPageMonitorPeriodRequest_Period { UINT8 mPageMonitorPeriod; }; // Structure to describe indication TLV 0x01 for WDS EVDOPageMonitorPeriodIndication struct sWDSEVDOPageMonitorPeriodIndication_Result { eQMIWDSSlotCycleSetResults mSlotCycleSetResult; }; // Structure to describe request TLV 0x01 for WDSSetEVDOLongSleep() struct sWDSSetEVDOLongSleepRequest_Setting { INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetEVDOPageMonitorPeriod() struct sWDSGetEVDOPageMonitorPeriodResponse_Details { UINT8 mPageMonitorPeriod; INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetCallThrottleInfo() struct sWDSGetCallThrottleInfoResponse_Details { UINT32 mEVDOThrottledDelaySeconds; UINT32 mCDMAThrottledDelaySeconds; }; // Structure to describe request TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIRequest_APN { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIResponse_NSAPI { UINT8 mNSAPICount; // This array must be the size specified by mNSAPICount // UINT8 mNSAPI[1]; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_Preference { eQMIWDSDUNControlPreferences mDUNControl; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x01 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_Status { INT8 mDUNControlEnabled; }; // Structure to describe response TLV 0x10 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x11 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_CurrentClient { INT8 mSetByCurrentClient; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_CallNotifications { INT8 mEnableDUNCallNotifications; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_EntitlementNotifications { INT8 mEnableEntitlementNotifications; }; // Structure to describe request TLV 0x11 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_RedialNotifications { INT8 mEnableSilentRedailNotifications; }; // Structure to describe response TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x01 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_Event { eQMIWDSDUNControlEvents mDUNControlEvent; }; // Structure to describe indication TLV 0x10 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallNotification { INT8 mDUNCallAllowed; }; // Structure to describe indication TLV 0x11 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallID { UINT8 mDUNCallID; }; // Structure to describe indication TLV 0x12 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_PreviousFailureReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSPendingDUNCallControl() struct sWDSPendingDUNCallControlRequest_Action { INT8 mDUNCallAllowed; }; // Structure to describe response TLV 0x10 for WDSGetPreferredDataSystem() struct sWDSGetPreferredDataSystemResponse_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe response TLV 0x10 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe response TLV 0x11 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe request TLV 0x10 for DMSSetEventReport() struct sDMSSetEventReportRequest_PowerState { INT8 mReportPowerState; }; // Structure to describe request TLV 0x11 for DMSSetEventReport() struct sDMSSetEventReportRequest_BatteryLevel { UINT8 mBatteryLevelLowerLimit; UINT8 mBatteryLevelUpperLimit; }; // Structure to describe request TLV 0x12 for DMSSetEventReport() struct sDMSSetEventReportRequest_PINStatus { INT8 mReportPINStatus; }; // Structure to describe request TLV 0x13 for DMSSetEventReport() struct sDMSSetEventReportRequest_ActivationState { INT8 mReportActivationState; }; // Structure to describe request TLV 0x14 for DMSSetEventReport() struct sDMSSetEventReportRequest_OperatingMode { INT8 mReportOperatingMode; }; // Structure to describe request TLV 0x15 for DMSSetEventReport() struct sDMSSetEventReportRequest_UIMState { INT8 mReportUIMState; }; // Structure to describe request TLV 0x16 for DMSSetEventReport() struct sDMSSetEventReportRequest_WirelessDisableState { INT8 mReportWirelessDisableState; }; // Structure to describe request TLV 0x17 for DMSSetEventReport() struct sDMSSetEventReportRequest_PRLInit { INT8 mReportPRLInitialization; }; // Structure to describe indication TLV 0x10 for DMS EventReport struct sDMSEventReportIndication_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe indication TLV 0x11 for DMS EventReport struct sDMSEventReportIndication_PIN1State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x12 for DMS EventReport struct sDMSEventReportIndication_PIN2State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x13 for DMS EventReport struct sDMSEventReportIndication_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe indication TLV 0x14 for DMS EventReport struct sDMSEventReportIndication_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x15 for DMS EventReport struct sDMSEventReportIndication_UIMState { eQMIDMSUIMStates mUIMState; }; // Structure to describe indication TLV 0x16 for DMS EventReport struct sDMSEventReportIndication_WirelessDisableState { INT8 mWirelessDisableOn; }; // Structure to describe indication TLV 0x17 for DMS EventReport struct sDMSEventReportIndication_PRLInit { INT8 mPRLLoaded; }; // Structure to describe response TLV 0x01 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_Capabilities { UINT32 mMaxTXRatebps; UINT32 mMaxRXRatebps; eQMIDMSDataServiceCapabilities1 mDataServiceCapability; INT8 mSIMSupported; UINT8 mRadioInterfaceCount; // This array must be the size specified by mRadioInterfaceCount // eQMIDMSRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceManfacturer() struct sDMSGetDeviceManfacturerResponse_Manfacturer { // String is variable length, but must be size of the container // char mDeviceManfacturer[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceModel() struct sDMSGetDeviceModelResponse_Model { // String is variable length, but must be size of the container // char mDeviceModelID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_Revision { // String is variable length, but must be size of the container // char mDeviceRevisionID[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_BootCodeRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_UQCNRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_VoiceNumber { // String is variable length, but must be size of the container // char mDeviceVoiceNumber[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_MobileIDNumber { // String is variable length, but must be size of the container // char mDeviceMobileIDNumber[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_ESN { // String is variable length, but must be size of the container // char mESN[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_IMEI { // String is variable length, but must be size of the container // char mIMEI[1]; }; // Structure to describe response TLV 0x12 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_MEID { // String is variable length, but must be size of the container // char mMEID[1]; }; // Structure to describe response TLV 0x01 for DMSGetPowerState() struct sDMSGetPowerStateResponse_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe request TLV 0x01 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionRequest_Info { UINT8 mPINID; UINT8 mPINEnabled; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINRequest_Info { UINT8 mPINID; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINRequest_Info1 { UINT8 mPINID; UINT8 mPUKLength; // This array must be the size specified by mPUKLength // char mPUKValue[1]; }; struct sDMSUIMUnblockPINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMUnblockPINRequest_Info { sDMSUIMUnblockPINRequest_Info1 mDMSUIMUnblockPINRequest_Info1; sDMSUIMUnblockPINRequest_Info2 mDMSUIMUnblockPINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMChangePIN() struct sDMSUIMChangePINRequest_Info1 { UINT8 mPINID; UINT8 mOldPINLength; // This array must be the size specified by mOldPINLength // char mOldPINValue[1]; }; struct sDMSUIMChangePINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMChangePINRequest_Info { sDMSUIMChangePINRequest_Info1 mDMSUIMChangePINRequest_Info1; sDMSUIMChangePINRequest_Info2 mDMSUIMChangePINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMChangePIN() struct sDMSUIMChangePINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN1Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x12 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN2Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetHardwareRevision() struct sDMSGetHardwareRevisionResponse_HardwareRevision { // String is variable length, but must be size of the container // char mDeviceHardwareRevision[1]; }; // Structure to describe response TLV 0x01 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x10 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OfflineReason { UINT8 mHostImageMismatch:1; UINT8 mUQCNImageMismatch:1; UINT8 mIncompatibleUQCN:1; UINT8 mUQCNCopyIssue:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_PlatformRestricted { INT8 mPlatformRestricted; }; // Structure to describe request TLV 0x01 for DMSSetOperatingMode() struct sDMSSetOperatingModeRequest_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x01 for DMSGetTimestamp() struct sDMSGetTimestampResponse_Timestamp { UINT64 mTimestamp:48; // mSource is of type eQMIDMSTimestampSources UINT64 mSource:16; }; // Structure to describe response TLV 0x01 for DMSGetPRLVersion() struct sDMSGetPRLVersionResponse_PRLVersion { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x01 for DMSGetActivationState() struct sDMSGetActivationStateResponse_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe request TLV 0x01 for DMSActivateAutomatic() struct sDMSActivateAutomaticRequest_ActivationCode { UINT8 mCodeLength; // This array must be the size specified by mCodeLength // char mCode[1]; }; // Structure to describe request TLV 0x01 for DMSActivateManual() struct sDMSActivateManualRequest_ActivationData1 { char mSPC[6]; UINT16 mSID; UINT8 mMDNLength; // This array must be the size specified by mMDNLength // char mMDN[1]; }; struct sDMSActivateManualRequest_ActivationData2 { UINT8 mMINLength; // This array must be the size specified by mMINLength // char mMIN[1]; }; struct sDMSActivateManualRequest_ActivationData { sDMSActivateManualRequest_ActivationData1 mDMSActivateManualRequest_ActivationData1; sDMSActivateManualRequest_ActivationData2 mDMSActivateManualRequest_ActivationData2; }; // Structure to describe request TLV 0x10 for DMSActivateManual() struct sDMSActivateManualRequest_PRLObsolete { UINT16 mPRLLength; // This array must be the size specified by mPRLLength // UINT8 mPRL[1]; }; // Structure to describe request TLV 0x11 for DMSActivateManual() struct sDMSActivateManualRequest_MNHAKey { UINT8 mMNHALength; // This array must be the size specified by mMNHALength // char mMNHA[1]; }; // Structure to describe request TLV 0x12 for DMSActivateManual() struct sDMSActivateManualRequest_MNAAAKey { UINT8 mMNAAALength; // This array must be the size specified by mMNAAALength // char mMNAAA[1]; }; // Structure to describe request TLV 0x13 for DMSActivateManual() struct sDMSActivateManualRequest_PRL { UINT16 mPRLTotalLength; UINT16 mPRLSegmentLength; UINT8 mPRLSegmentID; // This array must be the size specified by mPRLSegmentLength // UINT8 mPRL[1]; }; // Structure to describe response TLV 0x01 for DMSGetLockState() struct sDMSGetLockStateResponse_LockState { eQMIDMSLockStates mLockState; }; // Structure to describe request TLV 0x01 for DMSSetLockState() struct sDMSSetLockStateRequest_LockState { eQMIDMSLockStates mLockState; char mLockCode[4]; }; // Structure to describe request TLV 0x01 for DMSSetLockCode() struct sDMSSetLockCodeRequest_LockCode { char mCurrentLockCode[4]; char mNewLockCode[4]; }; // Structure to describe response TLV 0x01 for DMSReadUserData() struct sDMSReadUserDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSWriteUserData() struct sDMSWriteUserDataRequest_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x01 for DMSReadERIData() struct sDMSReadERIDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSResetFactoryDefaults() struct sDMSResetFactoryDefaultsRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x01 for DMSValidateSPC() struct sDMSValidateSPCRequest_SPC { char mSPC[6]; }; // Structure to describe response TLV 0x01 for DMSUIMGetICCID() struct sDMSUIMGetICCIDResponse_ICCID { // String is variable length, but must be size of the container // char mICCID[1]; }; // Structure to describe response TLV 0x01 for DMSUIMGetHostLockID() struct sDMSUIMGetHostLockIDResponse_ID { UINT32 mHostLockCode; }; // Structure to describe request TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusRequest_Facility { eQMIDMSUIMFacility mFacility; }; // Structure to describe response TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Status { eQMIDMSUIMFacilityStates mFacilityState; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x10 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Blocking { INT8 mOperationBlocking; }; // Structure to describe request TLV 0x01 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionRequest_Facility { eQMIDMSUIMFacility mFacility; eQMIDMSUIMFacilityStates mFacilityState; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionResponse_Status { UINT8 mRemainingVerifyRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyRequest_Facility { eQMIDMSUIMFacility mFacility; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyResponse_Status { UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetIMSI() struct sDMSGetIMSIResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x01 for DMSGetUIMState() struct sDMSGetUIMStateResponse_State { eQMIDMSUIMStates mUIMState; }; // Structure to describe response TLV 0x01 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_Bands { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x10 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_LTEBands { bool mEUTRANBand1:1; bool mEUTRANBand2:1; bool mEUTRANBand3:1; bool mEUTRANBand4:1; bool mEUTRANBand5:1; bool mEUTRANBand6:1; bool mEUTRANBand7:1; bool mEUTRANBand8:1; bool mEUTRANBand9:1; bool mEUTRANBand10:1; bool mEUTRANBand11:1; bool mEUTRANBand12:1; bool mEUTRANBand13:1; bool mEUTRANBand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRANBand17:1; bool mEUTRANBand18:1; bool mEUTRANBand19:1; bool mEUTRANBand20:1; bool mEUTRANBand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRANBand24:1; bool mEUTRANBand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRANBand33:1; bool mEUTRANBand34:1; bool mEUTRANBand35:1; bool mEUTRANBand36:1; bool mEUTRANBand37:1; bool mEUTRANBand38:1; bool mEUTRANBand39:1; bool mEUTRANBand40:1; bool mEUTRANBand41:1; // Padding out 23 bits UINT8 mReserved4:7; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x01 for DMSGetFactorySerialNumber() struct sDMSGetFactorySerialNumberResponse_ID { // String is variable length, but must be size of the container // char mFactorySerialNumber[1]; }; // Structure to describe request TLV 0x01 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Time { UINT64 mTimeInMilliseconds; }; // Structure to describe request TLV 0x10 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Type { eQMIDMSTimeReferences mTimeReference; }; // Structure to describe response TLV 0x01 for DMSGetSoftwareVersion() struct sDMSGetSoftwareVersionResponse_Version { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe request TLV 0x01 for DMSSetSPC() struct sDMSSetSPCRequest_CurrentSPC { char mCurrentSPC[6]; }; // Structure to describe request TLV 0x01 for NASAbort() struct sNASAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for NASSetEventReport() struct sNASSetEventReportRequest_SignalIndicator { INT8 mReportSignalStrength; UINT8 mNumberOfThresholds; // This array must be the size specified by mNumberOfThresholds // INT8 mSignalStrengthThresholddBm[1]; }; // Structure to describe request TLV 0x11 for NASSetEventReport() struct sNASSetEventReportRequest_RFIndicator { INT8 mReportRFInfo; }; // Structure to describe request TLV 0x12 for NASSetEventReport() struct sNASSetEventReportRequest_RegistrationRejectIndicator { INT8 mReportLUReject; }; // Structure to describe request TLV 0x13 for NASSetEventReport() struct sNASSetEventReportRequest_RSSIIndicator { INT8 mReportRSSI; UINT8 mRSSIDelta; }; // Structure to describe request TLV 0x14 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOIndicator { INT8 mReportECIO; UINT8 mECIODelta; }; // Structure to describe request TLV 0x15 for NASSetEventReport() struct sNASSetEventReportRequest_IOIndicator { INT8 mReportIO; UINT8 mIODelta; }; // Structure to describe request TLV 0x16 for NASSetEventReport() struct sNASSetEventReportRequest_SINRIndicator { INT8 mReportSINR; UINT8 mSINRDelta; }; // Structure to describe request TLV 0x17 for NASSetEventReport() struct sNASSetEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x18 for NASSetEventReport() struct sNASSetEventReportRequest_RSRQIndicator { INT8 mReportRSRQ; UINT8 mRSRQDelta; }; // Structure to describe request TLV 0x19 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOThreshold { INT8 mReportECIO; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1A for NASSetEventReport() struct sNASSetEventReportRequest_SINRThreshold { INT8 mReportSINR; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe indication TLV 0x10 for NAS EventReport struct sNASEventReportIndication_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x11 for NAS EventReport struct sNASEventReportIndication_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for NAS EventReport struct sNASEventReportIndication_RegistrationReject { eQMINASServiceDomains mServiceDomain; UINT16 mRejectCause; }; // Structure to describe indication TLV 0x13 for NAS EventReport struct sNASEventReportIndication_RSSI { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x14 for NAS EventReport struct sNASEventReportIndication_ECIO { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x15 for NAS EventReport struct sNASEventReportIndication_IO { UINT32 mIO; }; // Structure to describe indication TLV 0x16 for NAS EventReport struct sNASEventReportIndication_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe indication TLV 0x17 for NAS EventReport struct sNASEventReportIndication_ErrorRate { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x18 for NAS EventReport struct sNASEventReportIndication_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe request TLV 0x10 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemSelectIndicator { INT8 mReportSystemSelect; }; // Structure to describe request TLV 0x12 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DDTMIndicator { INT8 mReportDDTM; }; // Structure to describe request TLV 0x13 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ServingSystemIndicator { INT8 mReportServingSystem; }; // Structure to describe request TLV 0x14 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DualStandbyIndicator { INT8 mReportDualStandby; }; // Structure to describe request TLV 0x15 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SubscriptionInformationIndicator { INT8 mReportSubscriptionInformation; }; // Structure to describe request TLV 0x17 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkTimeIndicator { INT8 mReportNetworkTime; }; // Structure to describe request TLV 0x18 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemInformationIndicator { INT8 mReportSystemInformation; }; // Structure to describe request TLV 0x19 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SignalStrengthIndicator { INT8 mReportSignalStrength; }; // Structure to describe request TLV 0x1A for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x1B for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NewEVDOUATIIndicator { INT8 mReportNewEVDOUATI; }; // Structure to describe request TLV 0x1C for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EVDOSessionIndicator { INT8 mReportEVDOSessionClose; }; // Structure to describe request TLV 0x1D for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ManagedRoamingIndicator { INT8 mReportManagedRoaming; }; // Structure to describe request TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthRequest_RequestMask { bool mQueryRSSI:1; bool mQueryECIO:1; bool mQueryIO:1; bool mQuerySINR:1; bool mQueryErrorRate:1; // Padding out 11 bits UINT8 mReserved1:3; UINT8 mReserved2; }; // Structure to describe response TLV 0x01 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrengthList { UINT16 mNumberOfInfoInstances; struct sInfo { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x11 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSSIList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x12 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ECIOList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x13 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_IO { UINT32 mIO; }; // Structure to describe response TLV 0x14 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe response TLV 0x15 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ErrorRateList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x16 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe request TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanRequest_NetworkMask { bool mGSM:1; bool mUMTS:1; bool mLTE:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe response TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkInfo { UINT16 mNumberOfInfoInstances; struct sNetworkInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASInUseStates mInUseStatus:2; eQMINASRoamingStates mRoamingStatus:2; eQMINASForbiddenStates mForbiddenStatus:2; eQMINASPreferredStates mPreferredStatus:2; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // This array must be the size specified by mNumberOfInfoInstances // sNetworkInfo mNetworkInfos[1]; }; // Structure to describe response TLV 0x11 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkRAT { UINT16 mNumberOfInfoInstances; struct sInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x12 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_PCSInfo { UINT16 mPCSInfoCount; struct sPCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mPCSInfoCount // sPCSInfo mPCSInfos[1]; }; // Structure to describe request TLV 0x01 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_Action { eQMINASRegisterActions mRegisterAction; }; // Structure to describe request TLV 0x10 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ManualInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x11 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x12 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASInitiateAttach() struct sNASInitiateAttachRequest_Action { eQMINASPSAttachActions mPSAttachAction; }; // Structure to describe response TLV 0x01 for NASGetServingSystem() struct sNASGetServingSystemResponse_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x11 for NASGetServingSystem() struct sNASGetServingSystemResponse_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe response TLV 0x12 for NASGetServingSystem() struct sNASGetServingSystemResponse_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x13 for NASGetServingSystem() struct sNASGetServingSystemResponse_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x14 for NASGetServingSystem() struct sNASGetServingSystemResponse_BaseStation { UINT16 mBaseStationID; UINT32 mLatitude; UINT32 mLongitude; }; // Structure to describe response TLV 0x15 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for NASGetServingSystem() struct sNASGetServingSystemResponse_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x17 for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe response TLV 0x18 for NASGetServingSystem() struct sNASGetServingSystemResponse_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe response TLV 0x1A for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe response TLV 0x1B for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPDaylightSavingsAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe response TLV 0x1C for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe response TLV 0x1D for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPCellID { UINT32 mCellID; }; // Structure to describe response TLV 0x1E for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe response TLV 0x1F for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe response TLV 0x20 for NASGetServingSystem() struct sNASGetServingSystemResponse_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe response TLV 0x21 for NASGetServingSystem() struct sNASGetServingSystemResponse_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe response TLV 0x22 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe response TLV 0x23 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe response TLV 0x24 for NASGetServingSystem() struct sNASGetServingSystemResponse_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x25 for NASGetServingSystem() struct sNASGetServingSystemResponse_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x01 for NAS ServingSystemIndication struct sNASServingSystemIndication_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x10 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x11 for NAS ServingSystemIndication struct sNASServingSystemIndication_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe indication TLV 0x12 for NAS ServingSystemIndication struct sNASServingSystemIndication_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe indication TLV 0x13 for NAS ServingSystemIndication struct sNASServingSystemIndication_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe indication TLV 0x14 for NAS ServingSystemIndication struct sNASServingSystemIndication_BaseStation { UINT16 mBaseStationID; UINT32 mLatitude; UINT32 mLongitude; }; // Structure to describe indication TLV 0x15 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for NAS ServingSystemIndication struct sNASServingSystemIndication_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x17 for NAS ServingSystemIndication struct sNASServingSystemIndication_TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe indication TLV 0x18 for NAS ServingSystemIndication struct sNASServingSystemIndication_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe indication TLV 0x19 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChange { INT8 mPLMNChanged; }; // Structure to describe indication TLV 0x1A for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe indication TLV 0x1B for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPDaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x1C for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPUniversalTimeAndZone { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x1D for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe indication TLV 0x1E for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPCellID { UINT32 mCellID; }; // Structure to describe indication TLV 0x1F for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe indication TLV 0x20 for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe indication TLV 0x21 for NAS ServingSystemIndication struct sNASServingSystemIndication_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe indication TLV 0x22 for NAS ServingSystemIndication struct sNASServingSystemIndication_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe indication TLV 0x23 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe indication TLV 0x24 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe indication TLV 0x25 for NAS ServingSystemIndication struct sNASServingSystemIndication_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x26 for NAS ServingSystemIndication struct sNASServingSystemIndication_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x01 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeIDs { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x11 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_ExtendedHomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASNetworkDescriptionDisplays mDisplayNetworkDescription; eQMINASNetworkDescriptionEncodings mNetworkDescriptionEncoding; UINT8 mNetworkDescriptionLength; // This array must be the size specified by mNetworkDescriptionLength // UINT8 mNetworkDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x11 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_StaticNetworks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetPreferredNetworks() struct sNASSetPreferredNetworksRequest_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x10 for NASGetForbiddenNetworks() struct sNASGetForbiddenNetworksResponse_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetForbiddenNetworks() struct sNASSetForbiddenNetworksRequest_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for NASSetTechnologyPreference() struct sNASSetTechnologyPreferenceRequest_Preference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x01 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_ActivePreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x10 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_PersistentPreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; }; // Structure to describe response TLV 0x01 for NASGetACCOLC() struct sNASGetACCOLCResponse_ACCOLC { UINT8 mACCOLC; }; // Structure to describe request TLV 0x01 for NASSetACCOLC() struct sNASSetACCOLCRequest_ACCOLC { char mSPC[6]; UINT8 mACCOLC; }; // Structure to describe indication TLV 0x01 for NAS GetSystemPreference struct sNASGetSystemPreferenceIndication_Pref { eQMINASSystemPreferences mSystemPreference; }; // Structure to describe response TLV 0x11 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCI { UINT8 mSlotCycleIndex; }; // Structure to describe response TLV 0x12 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCM { UINT8 mStationClassMark; }; // Structure to describe response TLV 0x13 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Registration { INT8 mRegisterOnHomeSystem; INT8 mRegisterOnForeignSystem; INT8 mRegisterOnForeignNetwork; }; // Structure to describe response TLV 0x14 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe response TLV 0x15 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe response TLV 0x16 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x17 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_ForceCDMA1xEVDOSCP { eQMINASForceCDMA1xEVDOSCP mForceCDMA1xEVDOSCP; }; // Structure to describe request TLV 0x10 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x14 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe request TLV 0x15 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe request TLV 0x16 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x01 for NASGetRFInfo() struct sNASGetRFInfoResponse_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x01 for NASGetANAAAAuthenticationStatus() struct sNASGetANAAAAuthenticationStatusResponse_Status { eQMINASANAAAAuthenticationStatus mANAAAAuthenticationStatus; }; // Structure to describe request TLV 0x10 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe request TLV 0x11 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; // Padding out 11 bits UINT8 mReserved1:3; UINT8 mReserved2; }; // Structure to describe request TLV 0x12 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe request TLV 0x13 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe request TLV 0x14 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe request TLV 0x15 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 11 bits UINT8 mReserved2:3; UINT8 mReserved3; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; }; // Structure to describe request TLV 0x16 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x17 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x1A for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x1B for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x1C for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe response TLV 0x10 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe response TLV 0x11 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; // Padding out 11 bits UINT8 mReserved1:3; UINT8 mReserved2; }; // Structure to describe response TLV 0x12 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x13 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe response TLV 0x14 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe response TLV 0x15 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 11 bits UINT8 mReserved2:3; UINT8 mReserved3; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; }; // Structure to describe response TLV 0x16 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe response TLV 0x18 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe response TLV 0x19 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe indication TLV 0x10 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe indication TLV 0x11 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; // Padding out 11 bits UINT8 mReserved1:3; UINT8 mReserved2; }; // Structure to describe indication TLV 0x12 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe indication TLV 0x13 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe indication TLV 0x14 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe indication TLV 0x15 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 11 bits UINT8 mReserved2:3; UINT8 mReserved3; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; }; // Structure to describe indication TLV 0x16 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe indication TLV 0x18 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe indication TLV 0x19 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x01 for NASSetDDTMPreference() struct sNASSetDDTMPreferenceRequest_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x01 for NASGetDDTMPreference() struct sNASGetDDTMPreferenceResponse_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe indication TLV 0x01 for NAS DDTMPreferenceIndication struct sNASDDTMPreferenceIndication_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x10 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe response TLV 0x11 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe response TLV 0x12 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe response TLV 0x13 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe response TLV 0x14 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation { sNASGetOperatorNameDataResponse_NITZInformation1 mNASGetOperatorNameDataResponse_NITZInformation1; sNASGetOperatorNameDataResponse_NITZInformation2 mNASGetOperatorNameDataResponse_NITZInformation2; }; // Structure to describe indication TLV 0x10 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x11 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe indication TLV 0x12 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe indication TLV 0x13 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe indication TLV 0x14 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASOperatorNameDataIndication_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASOperatorNameDataIndication_NITZInformation { sNASOperatorNameDataIndication_NITZInformation1 mNASOperatorNameDataIndication_NITZInformation1; sNASOperatorNameDataIndication_NITZInformation2 mNASOperatorNameDataIndication_NITZInformation2; }; // Structure to describe response TLV 0x10 for NASGetCSPPLMNMode() struct sNASGetCSPPLMNModeResponse_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe indication TLV 0x10 for NAS CSPPLMNModeIndication struct sNASCSPPLMNModeIndication_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe request TLV 0x01 for NASUpdateAKEY() struct sNASUpdateAKEYRequest_AKEY { char mAKEY[26]; }; // Structure to describe request TLV 0x01 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe response TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe response TLV 0x11 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe response TLV 0x12 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe response TLV 0x13 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x14 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x15 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe request TLV 0x01 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe request TLV 0x11 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe request TLV 0x12 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x13 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x14 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe request TLV 0x15 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe response TLV 0x10 for NASGetMobileCAIRevision() struct sNASGetMobileCAIRevisionResponse_CAIRevision { eQMINASRevision mCAIRevision; }; // Structure to describe response TLV 0x10 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_CurrentRTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x11 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_RTREConfigPreference { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe request TLV 0x01 for NASSetRTREConfig() struct sNASSetRTREConfigRequest_RTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x10 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_GERANInfo { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; UINT32 mTimingAdvance; eQMINASRXLevel mRXLevel; UINT8 mNMRCellCount; struct sNMRCell { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileCountryCode0:4; UINT8 mPLMNMobileCountryCode1:4; UINT8 mPLMNMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileNetworkCode0:4; UINT8 mPLMNMobileNetworkCode1:4; UINT8 mPLMNMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBaseStationIdentityCodeBCC:3; UINT8 mBaseStationIdentityCodeNCC:3; // Padding out 2 bits UINT8 mReserved2:2; eQMINASRXLevel mRXLevel; }; // This array must be the size specified by mNMRCellCount // sNMRCell mNMRCells[1]; }; // Structure to describe response TLV 0x11 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSInfo1 { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; INT16 mECIO; UINT8 mUTRAUMTSMonitoredCellCount; struct sUMTSMonitoredCell { UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; INT16 mECIO; }; // This array must be the size specified by mUTRAUMTSMonitoredCellCount // sUMTSMonitoredCell mUMTSMonitoredCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo2 { UINT8 mGERANNBRCellCount; struct sGERANNBRCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mNetworkColorCode; UINT8 mBaseStationColorCode; INT16 mRSSI; }; // This array must be the size specified by mGERANNBRCellCount // sGERANNBRCell mGERANNBRCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo { sNASGetCellLocationInfoResponse_UMTSInfo1 mNASGetCellLocationInfoResponse_UMTSInfo1; sNASGetCellLocationInfoResponse_UMTSInfo2 mNASGetCellLocationInfoResponse_UMTSInfo2; }; // Structure to describe response TLV 0x12 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_CDMAInfo { UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mReferencePN; UINT32 mLatitude; UINT32 mLongitude; }; // Structure to describe response TLV 0x13 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_IntrafrequencyLTEInfo { INT8 mUEInIdleMode; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mTrackingAreaCode; UINT32 mGlobalCellID; UINT16 mEUTRAAbsoluteRFChannelNumber; UINT16 mServingCellID; UINT8 mCellReselectionPriority; UINT8 mSNonIntraSearchThreshold; UINT8 mServingCellLowThreshold; UINT8 mSIntraSearchThreshold; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // Structure to describe response TLV 0x14 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_InterfrequencyLTEInfo { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mEUTRAAbsoluteRFChannelNumber; UINT8 mCellSelectionRXLevelLowThreshold; UINT8 mCellSelectionRXLevelHighThreshold; UINT8 mCellReselectionPriority; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x15 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringGSM { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; // Bitfield arrays are not possible in c, unrolling the array bool mNCCPermitted0:1; bool mNCCPermitted1:1; bool mNCCPermitted2:1; bool mNCCPermitted3:1; bool mNCCPermitted4:1; bool mNCCPermitted5:1; bool mNCCPermitted6:1; bool mNCCPermitted7:1; UINT8 mCellCount; struct sCell { UINT16 mAbsoluteRFChannelNumber; INT8 mBandIs1900; INT8 mCellIDValid; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x16 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringWCDMA { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; UINT8 mCellCount; struct sCell { UINT16 mPrimaryScramblingCode; INT16 mCPICHRSCP; INT16 mCPICHEcNo; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe request TLV 0x01 for NASGetPLMNName() struct sNASGetPLMNNameRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe response TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameResponse_Name1 { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; struct sNASGetPLMNNameResponse_Name2 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetPLMNNameResponse_Name3 { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetPLMNNameResponse_Name { sNASGetPLMNNameResponse_Name1 mNASGetPLMNNameResponse_Name1; sNASGetPLMNNameResponse_Name2 mNASGetPLMNNameResponse_Name2; sNASGetPLMNNameResponse_Name3 mNASGetPLMNNameResponse_Name3; }; // Structure to describe request TLV 0x01 for NASBindSubscription() struct sNASBindSubscriptionRequest_SubscriptionType { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x10 for NAS DualStandbyPrefIndication struct sNASDualStandbyPrefIndication_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; eQMINASSubscriptionType mPrioritySubscription; eQMINASSubscriptionType mActiveSubscription; eQMINASSubscriptionType mDefaultDataSubscription; }; // Structure to describe indication TLV 0x10 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_PrioritySubscriptionInfo { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x11 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_ActiveSubscriptionInfo { eQMINASActiveSubscription mActiveSubscription; }; // Structure to describe indication TLV 0x12 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_DefaultDataSubscriptionInfo { INT8 mDefaultDataSubscription; }; // Structure to describe response TLV 0x10 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX0 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; // Padding out 11 bits UINT8 mReserved1:3; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX1 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; // Padding out 11 bits UINT8 mReserved1:3; UINT8 mReserved2; }; // Structure to describe request TLV 0x10 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe request TLV 0x11 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x12 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x01 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_UniversalTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; }; // Structure to describe indication TLV 0x10 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_TimeZone { INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x11 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_DaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe response TLV 0x10 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x11 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x12 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x13 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x14 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x15 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; UINT32 mLatitude; UINT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe response TLV 0x16 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe response TLV 0x17 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe response TLV 0x18 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x19 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x1A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe response TLV 0x1B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x20 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x21 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe response TLV 0x22 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x23 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x10 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x11 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x12 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x13 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x14 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x15 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; UINT32 mLatitude; UINT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe indication TLV 0x16 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe indication TLV 0x17 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe indication TLV 0x18 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x19 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x1A for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe indication TLV 0x1B for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1C for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1D for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1E for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1F for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x20 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x21 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe indication TLV 0x22 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x23 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x24 for NAS SystemInfoIndication struct sNASSystemInfoIndication_NoPLMNChange { INT8 mNoPLMNChange; }; // Structure to describe response TLV 0x10 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMASignalInfo { INT8 mRSSI; INT16 mECIO; }; // Structure to describe response TLV 0x11 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMA1xEVDOSignalInfo { INT8 mRSSI; INT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe response TLV 0x12 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe response TLV 0x13 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_WCDMASignalInfo { INT8 mRSSI; INT16 mECIO; }; // Structure to describe response TLV 0x14 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_ECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_CDMA1xEVDOSINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTESINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_IOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT32 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTEConfig { eQMINASLTESignalRates mLTESignalCheckRate; eQMINASLTESignalRates mLTESignalAveragingRate; }; // Structure to describe indication TLV 0x10 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMASignalInfo { INT8 mRSSI; INT16 mECIO; }; // Structure to describe indication TLV 0x11 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMA1xEVDOSignalInfo { INT8 mRSSI; INT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe indication TLV 0x12 for NAS SignalInfoIndication struct sNASSignalInfoIndication_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe indication TLV 0x13 for NAS SignalInfoIndication struct sNASSignalInfoIndication_WCDMASignalInfo { INT8 mRSSI; INT16 mECIO; }; // Structure to describe indication TLV 0x14 for NAS SignalInfoIndication struct sNASSignalInfoIndication_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe response TLV 0x10 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x11 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x12 for NASGetErrorRate() struct sNASGetErrorRateResponse_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x13 for NASGetErrorRate() struct sNASGetErrorRateResponse_WCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x10 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x11 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x12 for NAS ErrorRateIndication struct sNASErrorRateIndication_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x13 for NAS ErrorRateIndication struct sNASErrorRateIndication_WCDMAFrameErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x01 for NAS EVDOSessionCloseIndication struct sNASEVDOSessionCloseIndication_Reason { eQMINASEVDOSessionCloseReasons mSessionCloseReason; }; // Structure to describe indication TLV 0x01 for NAS EVDOUATIUpdateIndication struct sNASEVDOUATIUpdateIndication_UATI { UINT8 mUATI[16]; }; // Structure to describe request TLV 0x01 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeRequest_Protocol { UINT32 mEVDOProtocol; }; // Structure to describe response TLV 0x10 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeResponse_Subtype { UINT16 mEVDOProtocolSubtype; }; // Structure to describe response TLV 0x10 for NASGetEVDOColorCode() struct sNASGetEVDOColorCodeResponse_Value { UINT8 mEVDOColorCode; }; // Structure to describe response TLV 0x10 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x11 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA1xEVDO { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x12 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_GSM { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x13 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_UMTS { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x14 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_LTE { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe request TLV 0x01 for NASSetRXDiversity() struct sNASSetRXDiversityRequest_Diversity { eQMINASRadioInterfaces mRadioInterface; bool mEnableRXChain0:1; bool mEnableRXChain1:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX0Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x11 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX1Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x12 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_TXInfo { INT8 mInTraffic; INT32 mTXPower; }; // Structure to describe request TLV 0x01 for NASUpdateAKEYExtended() struct sNASUpdateAKEYExtendedRequest_AKEY { char mSPC[6]; char mAKEY[26]; }; // Structure to describe response TLV 0x10 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe response TLV 0x11 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x12 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_ActiveSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x13 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x10 for WMSSetEventReport() struct sWMSSetEventReportRequest_NewMTMessageIndicator { INT8 mReportNewMTMessages; }; // Structure to describe indication TLV 0x10 for WMS EventReport struct sWMSEventReportIndication_ReceivedMTMessage { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe indication TLV 0x11 for WMS EventReport struct sWMSEventReportIndication_TransferRouteMTMessage { INT8 mACKRequired; UINT32 mTransactionID; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x12 for WMS EventReport struct sWMSEventReportIndication_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x13 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSMessage { eQMIWMSNotificationType mNotificationType; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x14 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSPLMNInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe indication TLV 0x15 for WMS EventReport struct sWMSEventReportIndication_ReceivedSMSCAddress { UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe indication TLV 0x16 for WMS EventReport struct sWMSEventReportIndication_SMSOnIMS { INT8 mMessageReceivedFromIMS; }; // Structure to describe request TLV 0x01 for WMSRawSend() struct sWMSRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSRawSend() struct sWMSRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSRawSend() struct sWMSRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSRawSend() struct sWMSRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSRawSend() struct sWMSRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe response TLV 0x01 for WMSRawSend() struct sWMSRawSendResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x10 for WMSRawSend() struct sWMSRawSendResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x11 for WMSRawSend() struct sWMSRawSendResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x12 for WMSRawSend() struct sWMSRawSendResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x13 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe request TLV 0x01 for WMSRawWrite() struct sWMSRawWriteRequest_MessageData { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe response TLV 0x01 for WMSRawWrite() struct sWMSRawWriteResponse_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x01 for WMSRawRead() struct sWMSRawReadRequest_MessageIndex { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe request TLV 0x10 for WMSRawRead() struct sWMSRawReadRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x11 for WMSRawRead() struct sWMSRawReadRequest_SMSOnIMS { INT8 mMessageToBeReadFromIMS; }; // Structure to describe response TLV 0x01 for WMSRawRead() struct sWMSRawReadResponse_MessageData { eQMIWMSMessageTags mMessageTag; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x01 for WMSModifyTag() struct sWMSModifyTagRequest_MessageTag { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x10 for WMSModifyTag() struct sWMSModifyTagRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSDelete() struct sWMSDeleteRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSDelete() struct sWMSDeleteRequest_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x11 for WMSDelete() struct sWMSDeleteRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x12 for WMSDelete() struct sWMSDeleteRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetMessageProtocol() struct sWMSGetMessageProtocolResponse_MessageProtocol { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSListMessages() struct sWMSListMessagesRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSListMessages() struct sWMSListMessagesRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x11 for WMSListMessages() struct sWMSListMessagesRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSListMessages() struct sWMSListMessagesResponse_MessageList { UINT32 mNumberOfMessages; struct sMessage { UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // This array must be the size specified by mNumberOfMessages // sMessage mMessages[1]; }; // Structure to describe request TLV 0x01 for WMSSetRoutes() struct sWMSSetRoutesRequest_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSReceiptActions mReceiptAction; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe request TLV 0x10 for WMSSetRoutes() struct sWMSSetRoutesRequest_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetRoutes() struct sWMSGetRoutesResponse_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSRouteValues mRouteValue; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe response TLV 0x10 for WMSGetRoutes() struct sWMSGetRoutesResponse_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetSMSCAddress() struct sWMSGetSMSCAddressResponse_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x01 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_Address { // String is variable length, but must be size of the container // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_AddressType { // String is variable length, but must be size of the container // char mSMSCAddressType[1]; }; // Structure to describe request TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_MaxSize { UINT32 mMaxStorageSizeInMessages; }; // Structure to describe response TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_AvailableSize { UINT32 mFreeStorageSizeInMessages; }; // Structure to describe request TLV 0x01 for WMSSendACK() struct sWMSSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSSendACK() struct sWMSSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSSendACK() struct sWMSSendACKRequest_3GPPFailureInfo { UINT8 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSSendACK() struct sWMSSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendACK() struct sWMSSendACKResponse_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe request TLV 0x01 for WMSSetRetryPeriod() struct sWMSSetRetryPeriodRequest_Period { UINT32 mRetryPeriodInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetRetryInterval() struct sWMSSetRetryIntervalRequest_Interval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetDCDisconnectTimer() struct sWMSSetDCDisconnectTimerRequest_Timer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetMemoryStatus() struct sWMSSetMemoryStatusRequest_Status { INT8 mMemoryIsAvailable; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastActivation() struct sWMSSetBroadcastActivationRequest_BCInfo { eQMIWMSMessageProtocols mMode; INT8 mActivateBroadcast; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPPInfo { UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x11 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPP2Info { UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x10 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x01 for WMS MemoryFullIndication struct sWMSMemoryFullIndication_Info { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetDomainPreference() struct sWMSGetDomainPreferenceResponse_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSetDomainPreference() struct sWMSSetDomainPreferenceRequest_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x11 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x12 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x13 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x14 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x01 for WMSGetWaitingMessage() struct sWMSGetWaitingMessageResponse_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe indication TLV 0x01 for WMS WaitingMessageIndication struct sWMSWaitingMessageIndication_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe request TLV 0x01 for WMSSetPrimaryClient() struct sWMSSetPrimaryClientRequest_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe indication TLV 0x01 for WMS SMSCAddressIndication struct sWMSSMSCAddressIndication_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe request TLV 0x11 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe request TLV 0x12 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe response TLV 0x10 for WMSGetTransportInfoLayer() struct sWMSGetTransportInfoLayerResponse_TransportLayerRegistrationInfo { INT8 mRegistered; }; // Structure to describe response TLV 0x11 for WMSGetTransportLayerInfo() struct sWMSGetTransportLayerInfoResponse_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe indication TLV 0x01 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerRegInfo { INT8 mRegistered; }; // Structure to describe indication TLV 0x10 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe response TLV 0x10 for WMSGetNetworkRegistrationInfo() struct sWMSGetNetworkRegistrationInfoResponse_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe indication TLV 0x01 for WMS NetworkRegistrationInfoIndication struct sWMSNetworkRegistrationInfoIndication_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe request TLV 0x01 for WMSBindSubscription() struct sWMSBindSubscriptionRequest_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x10 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe response TLV 0x11 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe response TLV 0x12 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe request TLV 0x01 for WMSGetSMSParameters() struct sWMSGetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe response TLV 0x10 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe response TLV 0x11 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe response TLV 0x12 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe response TLV 0x13 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe request TLV 0x01 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe request TLV 0x10 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe request TLV 0x11 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe request TLV 0x12 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe request TLV 0x13 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe indication TLV 0x01 for WMS CallStatusIndication struct sWMSCallStatusIndication_SMSCallStatusInfo { eQMIWMSSMSCallStatus mSMSCallStatus; }; // Structure to describe request TLV 0x10 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEAIndicator { INT8 mReportNMEASentences; }; // Structure to describe request TLV 0x11 for PDSSetEventReport() struct sPDSSetEventReportRequest_ModeIndicator { INT8 mReportNMEASentencesPlusMode; }; // Structure to describe request TLV 0x12 for PDSSetEventReport() struct sPDSSetEventReportRequest_RawIndicator { INT8 mReportRawPositionData; }; // Structure to describe request TLV 0x13 for PDSSetEventReport() struct sPDSSetEventReportRequest_XTRARequestIndicator { INT8 mReportExternalXTRADataRequests; }; // Structure to describe request TLV 0x14 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeInjectionIndicator { INT8 mReportExternalTimeInjections; }; // Structure to describe request TLV 0x15 for PDSSetEventReport() struct sPDSSetEventReportRequest_WiFiIndicator { INT8 mReportExternalWiFiRequests; }; // Structure to describe request TLV 0x16 for PDSSetEventReport() struct sPDSSetEventReportRequest_SatelliteIndicator { INT8 mReportSatelliteInfo; }; // Structure to describe request TLV 0x17 for PDSSetEventReport() struct sPDSSetEventReportRequest_VXNetworkIndicator { INT8 mReportVXNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x18 for PDSSetEventReport() struct sPDSSetEventReportRequest_SUPLNetworkIndicator { INT8 mReportSUPLNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x19 for PDSSetEventReport() struct sPDSSetEventReportRequest_UMTSCPNetworkIndicator { INT8 mReportUMTSCPNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x1A for PDSSetEventReport() struct sPDSSetEventReportRequest_PDSCommIndicator { INT8 mReportPDSCommEvents; }; // Structure to describe request TLV 0x1B for PDSSetEventReport() struct sPDSSetEventReportRequest_AccelerometerDataIndicator { INT8 mReportAccelerometerDataStatus; }; // Structure to describe request TLV 0x1C for PDSSetEventReport() struct sPDSSetEventReportRequest_GyroDataIndicator { INT8 mReportGyroDataStatus; }; // Structure to describe request TLV 0x1D for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSyncIndication { INT8 mReportTimeSyncRequest; }; // Structure to describe request TLV 0x1E for PDSSetEventReport() struct sPDSSetEventReportRequest_PositionReliablilityIndicator { INT8 mReportPositionReliability; }; // Structure to describe request TLV 0x1F for PDSSetEventReport() struct sPDSSetEventReportRequest_SensorDataUsageIndicator { INT8 mReportSensorDataUsage; }; // Structure to describe request TLV 0x20 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSourceInformationIndicator { INT8 mReportTimeSourceInformation; }; // Structure to describe request TLV 0x21 for PDSSetEventReport() struct sPDSSetEventReportRequest_HeadingUncertaintyIndicator { INT8 mReportHeadingUncertaintyInformation; }; // Structure to describe request TLV 0x22 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEADebugStringIndicator { INT8 mReportNMEADebugStrings; }; // Structure to describe request TLV 0x23 for PDSSetEventReport() struct sPDSSetEventReportRequest_ExternalXTRADataIndicator { INT8 mReportExtendedXTRAData; }; // Structure to describe indication TLV 0x10 for PDS EventReport struct sPDSEventReportIndication_NMEASentence { // String is variable length, but must be size of the container // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x11 for PDS EventReport struct sPDSEventReportIndication_NMEASentencePlusMode { eQMIPDSNMEASentenceOperatingModes mNMEASentenceOperatingMode; UINT16 mNMEASentenceLength; // This array must be the size specified by mNMEASentenceLength // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x12 for PDS EventReport struct sPDSEventReportIndication_PositionSessionStatus { eQMIPDSSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x13 for PDS EventReport struct sPDSEventReportIndication_ParsedPositionData { bool mTimestampCalendarValid:1; bool mTimestampUTCValid:1; bool mLeapSecondsValid:1; bool mTimeUncertaintyValid:1; bool mLatitudeValid:1; bool mLongitudeValid:1; bool mEllipsoidAltitudeValid:1; bool mMeanSeaLevelAltitudeValid:1; bool mHorizontalSpeedValid:1; bool mVerticalSpeedValid:1; bool mHeadingValid:1; bool mHorizontalUncertaintyCircularValid:1; bool mHorizontalUncertaintyEllipseSemiMajorValid:1; bool mHorizontalUncertaintyEllipseSemiMinorValid:1; bool mHorizontalUncertaintyEllipseOrientAzimuthValid:1; bool mVerticalUncertaintyValid:1; bool mHorizontalVelocityUncertaintyValid:1; bool mVerticalVelocityUncertaintyValid:1; bool mHorizontalConfidenceValid:1; bool mPositionDOPValid:1; bool mHorizontalDOPValid:1; bool mVerticalDOPValid:1; bool mOperatingModeUsedValid:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; UINT16 mCalendarYear; eQMIPDSCalendarMonths mCalendarMonth; eQMIPDSCalendarDays mCalendarDay; UINT8 mCalendarDayOfMonth; UINT8 mCalendarHour; UINT8 mCalendarMinute; UINT8 mCalendarSecond; UINT16 mCalendarMillisecond; UINT8 mCalendarLeapSeconds; UINT64 mUTCTimestamp; UINT32 mUTCTimestampUncertainty; double mLatitude; double mLongitude; float mEllipsoidAltitude; float mMeanSeaLevelAltitude; float mHorizontalSpeed; float mVerticalSpeed; float mHeading; float mHorizontalUncertaintyCircular; float mHorizontalUncertaintyEllipseSemiMajor; float mHorizontalUncertaintyEllipseSemiMinor; float mHorizontalUncertaintyEllipseOrientAzimuth; float mVerticalUncertainty; float mHorizontalVelocityUncertainty; float mVerticalVelocityUncertainty; UINT8 mHorizontalConfidence; float mPositionDOP; float mHorizontalDOP; float mVerticalDOP; eQMIPDSNMEASentenceOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x14 for PDS EventReport struct sPDSEventReportIndication_ExternalXTRARequest { UINT16 mMaximumFileSize; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x15 for PDS EventReport struct sPDSEventReportIndication_ExternalTimeInjectionRequest { UINT32 mDelayThresholdMilliseconds; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x16 for PDS EventReport struct sPDSEventReportIndication_ExternalWiFiPositionRequest { eQMIPDSWiFiRequestTypes mWiFiRequestType; UINT16 mWiFiRequestTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x17 for PDS EventReport struct sPDSEventReportIndication_SatelliteInfo { bool mIonoValid:1; bool mSatelliteCountValid:1; bool mSatelliteListValid:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; INT8 mIonosphericCorrections; UINT8 mSVRecordCount; struct sSV { bool mSystemValid:1; bool mPRNValid:1; bool mHealthStatusValid:1; bool mProcessStatusValid:1; bool mEphemerisStateValid:1; bool mAlmanacStateValid:1; bool mElevationValid:1; bool mAzimuthValid:1; bool mCN0Valid:1; // Padding out 23 bits UINT8 mReserved3:7; UINT8 mReserved4[2]; eQMIPDSSVSystems mSystem; UINT8 mPRN; eQMIPDSSVHealthStatus mHealthLevel; eQMIPDSSVProcessingStatus mProcessingStatus; eQMIPDSSVEphemerisStatus mEphemerisState; eQMIPDSSVAlmanacStatus mAlmanacState; INT32 mElevation; UINT16 mAzimuth; UINT16 mCN0; }; // This array must be the size specified by mSVRecordCount // sSV mSVs[1]; }; // Structure to describe indication TLV 0x18 for PDS EventReport struct sPDSEventReportIndication_VXNetworkInitiatedPrompt { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe indication TLV 0x19 for PDS EventReport struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt { sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt1; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt2; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt3; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt4; }; // Structure to describe indication TLV 0x1A for PDS EventReport struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 { UINT8 mServiceTypeID; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt { sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5; }; // Structure to describe indication TLV 0x1B for PDS EventReport struct sPDSEventReportIndication_CommEvents { eQMIPDSCommEventTypes mType; eQMIPDSCommEventProtocols mProtocolDataType; }; // Structure to describe indication TLV 0x1C for PDS EventReport struct sPDSEventReportIndication_PositionSource { bool mGPS:1; bool mCellID:1; bool mGlonass:1; bool mNetwork:1; bool mEPI:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x1D for PDS EventReport struct sPDSEventReportIndication_AccelerometerStreamingStatus { eQMIPDSStreamingStatus mAccelerometerStreamingStatus; }; // Structure to describe indication TLV 0x1E for PDS EventReport struct sPDSEventReportIndication_GyroStreamingStatus { eQMIPDSStreamingStatus mGyroStreamingStatus; }; // Structure to describe indication TLV 0x1F for PDS EventReport struct sPDSEventReportIndication_TimeSyncRequest { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x20 for PDS EventReport struct sPDSEventReportIndication_PositionReliabilityCounter { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe indication TLV 0x21 for PDS EventReport struct sPDSEventReportIndication_SensorDataUsage { bool mAccelerometer:1; bool mGyro:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; bool mHeadingAidedWithSensorData:1; bool mSpeedAidedWithSensorData:1; bool mPositionAidedWithSensorData:1; bool mVelocityAidedWithSensorData:1; // Padding out 12 bits UINT8 mReserved3:4; UINT8 mReserved4; }; // Structure to describe indication TLV 0x22 for PDS EventReport struct sPDSEventReportIndication_TimeSourceInformation { INT8 mTimeValid; eQMIPDSTimeSource mTimeSource; UINT32 mTimeUncertaintyMilliseconds; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT32 mReserved1; UINT32 mReserved2; UINT32 mReserved3; UINT32 mReserved4; UINT32 mReserved5; }; // Structure to describe indication TLV 0x23 for PDS EventReport struct sPDSEventReportIndication_EncryptedPositionInformation { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe indication TLV 0x24 for PDS EventReport struct sPDSEventReportIndication_HeadingUncertaintyInformation { float mHeadingUncertainty; float mGNSSHeadingUncertainty; UINT32 mReserved1; UINT32 mReserved2; }; // Structure to describe indication TLV 0x25 for PDS EventReport struct sPDSEventReportIndication_ProprietaryNMEADebugSentences { // String is variable length, but must be size of the container // char mNMEADebug[1]; }; // Structure to describe indication TLV 0x26 for PDS EventReport struct sPDSEventReportIndication_ExtendedExternalXTRADatabaseRequest { UINT32 mMaximumFileSize; UINT8 mURLCount; UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe response TLV 0x01 for PDSGetServiceState() struct sPDSGetServiceStateResponse_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe indication TLV 0x01 for PDS ServiceStateIndication struct sPDSServiceStateIndication_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe request TLV 0x01 for PDSSetServiceState() struct sPDSSetServiceStateRequest_State { INT8 mServiceEnabled; }; // Structure to describe request TLV 0x01 for PDSStartTrackingSession() struct sPDSStartTrackingSessionRequest_Session { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetTrackingSessionInfo() struct sPDSGetTrackingSessionInfoResponse_Info { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe response TLV 0x10 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe request TLV 0x10 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSInjectTimeReference() struct sPDSInjectTimeReferenceRequest_Time { UINT64 mSystemTimeMilliseconds; UINT16 mSystemDiscontinuties; }; // Structure to describe response TLV 0x01 for PDSGetDefaults() struct sPDSGetDefaultsResponse_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe request TLV 0x01 for PDSSetDefaults() struct sPDSSetDefaultsRequest_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x10 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe response TLV 0x11 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe response TLV 0x12 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe response TLV 0x13 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Validity { UINT16 mValidPeriodGPSStartWeek; UINT16 mValidPeriodGPSStartWeekOffsetInMinutes; UINT16 mValidPeriodDurationInHours; }; // Structure to describe response TLV 0x14 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x10 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe request TLV 0x11 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe request TLV 0x12 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe request TLV 0x14 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x12 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x10 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerAddress { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe response TLV 0x11 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x10 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_Server { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe request TLV 0x11 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x12 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x01 for PDSGetServiceAutoTrackingState() struct sPDSGetServiceAutoTrackingStateResponse_State { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetServiceAutoTrackingState() struct sPDSSetServiceAutoTrackingStateRequest_State { INT8 mAutoTrackingEnabled; }; // Structure to describe response TLV 0x01 for PDSGetCOMPortAutoTrackingConfig() struct sPDSGetCOMPortAutoTrackingConfigResponse_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetCOMPortAutoTrackingConfig() struct sPDSSetCOMPortAutoTrackingConfigRequest_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x10 for PDSResetPDSData() struct sPDSResetPDSDataRequest_GPSData { bool mResetEPH:1; bool mResetALM:1; bool mResetPOS:1; bool mResetTIME:1; bool mResetIONO:1; bool mResetUTC:1; bool mResetHEALTH:1; bool mResetSVDIR:1; bool mResetSVSTEER:1; bool mResetSADATA:1; bool mResetRTI:1; bool mResetALMCORR:1; bool mResetFREQBIASEST:1; // Padding out 19 bits UINT8 mReserved1:3; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x11 for PDSResetPDSData() struct sPDSResetPDSDataRequest_CellData { bool mResetPOS:1; bool mResetLATESTGPSPOS:1; bool mResetOTAPOS:1; bool mResetEXTREFPOS:1; bool mResetTIMETAG:1; bool mResetCELLID:1; bool mResetCACHEDCELLID:1; bool mResetLASTSRVCELL:1; bool mResetCURSRVCELL:1; bool mResetNEIGHBORINFO:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x10 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Mode { eQMIPDSOperationTypes mSessionOperation; }; // Structure to describe request TLV 0x11 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Timeout { UINT8 mTimeoutSeconds; }; // Structure to describe request TLV 0x12 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Accuracy { UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetServiceVersion() struct sPDSGetServiceVersionResponse_Version { UINT8 mServiceMajorVersion; UINT8 mServiceMinorVersion; }; // Structure to describe request TLV 0x01 for PDSInjectXTRAData() struct sPDSInjectXTRADataRequest_Data { UINT8 mSequenceNumber; UINT16 mTotalLength; UINT16 mSequenceLength; // This array must be the size specified by mSequenceLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Timestamp { UINT64 mUTCTimestamp; }; // Structure to describe request TLV 0x11 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Latitude { double mLatitude; }; // Structure to describe request TLV 0x12 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Longitude { double mLongitude; }; // Structure to describe request TLV 0x13 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeEllipsoid { float mEllipsoidAltitude; }; // Structure to describe request TLV 0x14 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeSeaLevel { float mMeanSeaLevelAltitude; }; // Structure to describe request TLV 0x15 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalUncertainty { float mHorizontalUncertaintyCircular; }; // Structure to describe request TLV 0x16 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalUncertainty { float mVerticalUncertainty; }; // Structure to describe request TLV 0x17 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalConfidence { UINT8 mHorizontalConfidence; }; // Structure to describe request TLV 0x18 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalConfidence { UINT8 mVerticalConfidence; }; // Structure to describe request TLV 0x19 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Source { eQMIPDSInjectedPositionSources mSource; }; // Structure to describe request TLV 0x1A for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_TimeType { eQMIPDSTimeType mTimeType; }; // Structure to describe request TLV 0x1B for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe request TLV 0x1C for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeInformation { eQMIPDSAltitudeSource mAltitudeSource; eQMIPDSSourceLinkage mSourceLinkage; eQMIPDSUncertaintyCoverage mUncertaintyCoverage; }; // Structure to describe request TLV 0x10 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Time { UINT32 mWiFiTimeCounterMilliseconds; }; // Structure to describe request TLV 0x11 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Position { INT32 mWiFiLatitude; INT32 mWiFiLongitude; UINT16 mHEPEInMeters; UINT8 mAPCount; UINT8 mErrorCode; }; // Structure to describe request TLV 0x12 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_APInfo { UINT8 mAPCount; struct sAP { UINT8 mMACAddress[6]; UINT32 mRSSI; UINT16 mBeaconChannel; bool mUsedForPosition:1; bool mHiddenSSID:1; bool mEncryptionOn:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mAPCount // sAP mAPs[1]; }; // Structure to describe request TLV 0x13 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; }; // Structure to describe response TLV 0x10 for PDSGetSBASConfig() struct sPDSGetSBASConfigResponse_Config { eQMIPDSSBASStates mState; }; // Structure to describe request TLV 0x10 for PDSSetSBASConfig() struct sPDSSetSBASConfigRequest_Config { INT8 mEnableSBAS; }; // Structure to describe request TLV 0x01 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_Action { INT8 mAllowRequest; }; // Structure to describe request TLV 0x10 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_VX { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe request TLV 0x11 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_SUPL1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL { sPDSSendNetworkInitiatedResponseRequest_SUPL1 mPDSSendNetworkInitiatedResponseRequest_SUPL1; sPDSSendNetworkInitiatedResponseRequest_SUPL2 mPDSSendNetworkInitiatedResponseRequest_SUPL2; sPDSSendNetworkInitiatedResponseRequest_SUPL3 mPDSSendNetworkInitiatedResponseRequest_SUPL3; sPDSSendNetworkInitiatedResponseRequest_SUPL4 mPDSSendNetworkInitiatedResponseRequest_SUPL4; }; // Structure to describe request TLV 0x12 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 { UINT8 mServiceTypeID; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP { sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 mPDSSendNetworkInitiatedResponseRequest_UMTSCP1; sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 mPDSSendNetworkInitiatedResponseRequest_UMTSCP2; sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 mPDSSendNetworkInitiatedResponseRequest_UMTSCP3; sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 mPDSSendNetworkInitiatedResponseRequest_UMTSCP4; sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 mPDSSendNetworkInitiatedResponseRequest_UMTSCP5; }; // Structure to describe request TLV 0x01 for PDSInjectAbsoluteTime() struct sPDSInjectAbsoluteTimeRequest_Time { UINT64 mTimestampMilliseconds; UINT32 mTimeUncertaintyMilliseconds; eQMIPDSTimeBases mTimeBase; INT8 mForceAcceptance; }; // Structure to describe request TLV 0x01 for PDSInjectEFSData() struct sPDSInjectEFSDataRequest_DateFile1 { UINT8 mFilenameLength; // This array must be the size specified by mFilenameLength // char mFilename[1]; }; struct sPDSInjectEFSDataRequest_DateFile2 { eQMIPDSEFSFileOperations mFileOperation; UINT32 mDataLength; UINT8 mPartNumber; UINT8 mTotalParts; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; struct sPDSInjectEFSDataRequest_DateFile { sPDSInjectEFSDataRequest_DateFile1 mPDSInjectEFSDataRequest_DateFile1; sPDSInjectEFSDataRequest_DateFile2 mPDSInjectEFSDataRequest_DateFile2; }; // Structure to describe response TLV 0x10 for PDSGetDPOConfig() struct sPDSGetDPOConfigResponse_Config { INT8 mDataPowerOptimizationEnabled; }; // Structure to describe request TLV 0x10 for PDSSetDPOConfig() struct sPDSSetDPOConfigRequest_Config { eQMIPDSConfig mConfiguration; }; // Structure to describe response TLV 0x10 for PDSGetODPConfig() struct sPDSGetODPConfigResponse_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe request TLV 0x10 for PDSSetODPConfig() struct sPDSSetODPConfigRequest_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe response TLV 0x10 for PDSGetGPSState() struct sPDSGetGPSStateResponse_State { INT8 mEngineEnabled; bool mPositionValid:1; bool mAltitudeVerticalUncertaintyValid:1; bool mTimeMillisecondsValid:1; bool mTimeWeekNumberValid:1; bool mTimeUncertaintyValid:1; bool mIonoValid:1; bool mGPSEphemerisValid:1; bool mGPSAlmanacValid:1; bool mGPSHealthValid:1; bool mGPSVisibleSVsValid:1; bool mGlonassEphemerisValid:1; bool mGlonassAlmanacValid:1; bool mGlonassHealthValid:1; bool mGlonassVisibleSVsValid:1; bool mSBASEphemerisValid:1; bool mSBASAlmanacValid:1; bool mSBASHealthValid:1; bool mSBASVisibleSVsValid:1; bool mXTRAInformationValid:1; // Padding out 5 bits UINT8 mReserved1:5; double mLatitude; double mLongitude; float mHorizontalUncertaintyCircular; float mEllipsoidAltitude; float mVerticalUncertainty; UINT32 mTimestampInTOWMilliseconds; UINT16 mGPSWeekNumber; UINT32 mTimeUncertaintyMilliseconds; INT8 mIonoIsValid; UINT32 mGPSEphemerisSVMask; UINT32 mGPSAlmanacSVMask; UINT32 mGPSHealthSVMask; UINT32 mGPSVisibleSVMask; UINT32 mGlonassEphemerisSVMask; UINT32 mGlonassAlmanacSVMask; UINT32 mGlonassHealthSVMask; UINT32 mGlonassVisibleSVMask; UINT32 mSBASEphemerisSVMask; UINT32 mSBASAlmanacSVMask; UINT32 mSBASHealthSVMask; UINT32 mSBASVisibleSVMask; UINT16 mXTRAGPSStartWeek; UINT16 mXTRAGPSStartMinutes; INT32 mElevation; }; // Structure to describe request TLV 0x01 for PDSSetPPMEventReport() struct sPDSSetPPMEventReportRequest_ReportPPMEvents { INT8 mReportPPMEvents; }; // Structure to describe request TLV 0x01 for PDSSetSPIStreamingReport() struct sPDSSetSPIStreamingReportRequest_ReportEvents { INT8 mReportSPIEvents; }; // Structure to describe indication TLV 0x10 for PDS SetSPIStreamingReportIndication struct sPDSSetSPIStreamingReportIndication_SPIStreamingRequest { INT8 mStreamSPIStatus; }; // Structure to describe request TLV 0x01 for PDSSetSPIStatus() struct sPDSSetSPIStatusRequest_Status { eQMIPDSSPIState mSPIState; UINT8 mSPIConfidence; }; // Structure to describe request TLV 0x01 for PDSSetPPMReportingState() struct sPDSSetPPMReportingStateRequest_PPMReportingState { eQMIPDSReportingState mReportingState; UINT16 mReportingPeriodSeconds; }; // Structure to describe indication TLV 0x10 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMPageReport { UINT32 mPageTimeMilliseconds; UINT16 mPagePNOffset; UINT8 mPageBandClass; UINT16 mPageCDMAFrequency; UINT16 mPageBaseID; UINT16 mPageSystemID; UINT16 mPageNetworkID; }; // Structure to describe indication TLV 0x11 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMMeasurementReport { UINT32 mReferenceTimeMilliseconds; UINT8 mReferenceBandClass; UINT16 mReferenceCDMAFrequency; UINT8 mReferenceTotalRXPower; UINT16 mReferencePNOffset; UINT8 mReferenceStrength; UINT8 mReferenceRMSErrorPhase; UINT8 mNumberOfPilots; struct sPilot { UINT16 mPilotPNOffset; UINT8 mPilotStrength; UINT8 mPilotRMSErrorPhase; INT16 mPilotPhase; }; // This array must be the size specified by mNumberOfPilots // sPilot mPilots[1]; }; // Structure to describe indication TLV 0x12 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMSuspendReason { eQMIPDSSuspendReason mSuspendReason; }; // Structure to describe indication TLV 0x13 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMStopReason { eQMIPDSStopReason mStopReason; }; // Structure to describe request TLV 0x01 for PDSForceReceiverOff() struct sPDSForceReceiverOffRequest_ForceReceiverOff { eQMIPDSForceReceiverOff mForceReceiverOff; }; // Structure to describe response TLV 0x10 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x11 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x12 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x11 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x12 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisAccelerometerData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe request TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisGyroData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe response TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_AccelerometerSampleSetCount { UINT8 mAccelerometerSampleSetCount; }; // Structure to describe response TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_GyroSampleSetCount { UINT8 mGyroSampleSetCount; }; // Structure to describe request TLV 0x01 for PDSInjectTimeSyncData() struct sPDSInjectTimeSyncDataRequest_TimeTag { UINT32 mReferenceCounter; UINT32 mSensorProcessorRXTimeMilliseconds; UINT32 mSensorProcessorTXTimeMilliseconds; }; // Structure to describe response TLV 0x10 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe response TLV 0x11 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_ExternalPowerSupplyState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe request TLV 0x10 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe request TLV 0x11 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_ExternalPowerState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe response TLV 0x10 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe response TLV 0x11 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe response TLV 0x12 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VirtualGyroGravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe response TLV 0x13 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe response TLV 0x14 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe response TLV 0x15 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe request TLV 0x11 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe request TLV 0x12 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VirtualGyroCravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe request TLV 0x13 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe request TLV 0x14 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe request TLV 0x15 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BlankingEnable { eQMIPDSBlankingEnable mBlankingEnable; }; // Structure to describe request TLV 0x11 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_ActiveChannels { bool mChannel1:1; bool mChannel2:1; bool mChannel3:1; bool mChannel4:1; bool mChannel5:1; bool mChannel6:1; bool mChannel7:1; bool mChannel8:1; bool mChannel9:1; bool mChannel10:1; bool mChannel11:1; bool mChannel12:1; bool mChannel13:1; bool mChannel14:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallengeReport() struct sPDSSetSecurityChallengeReportRequest_EnableSecurity { eQMIPDSReportSecurityChallenge mReportSecurityChallenge; }; // Structure to describe indication TLV 0x10 for PDS SetSecurityChallengeReportIndication struct sPDSSetSecurityChallengeReportIndication_EnableSecurity { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallenge() struct sPDSSetSecurityChallengeRequest_SecureHashAlgorithm { UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe response TLV 0x10 for PDSGetSecurityEncryptionConfig() struct sPDSGetSecurityEncryptionConfigResponse_SecureClientTimestamp { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT64 mEncryptionTimestampMilliseconds; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityUpdateRate() struct sPDSSetSecurityUpdateRateRequest_EnableSecurity { UINT8 mUpdateRate; }; // Structure to describe request TLV 0x10 for PDSSetCellDatabaseControl() struct sPDSSetCellDatabaseControlRequest_Control { bool mPositionInfoStorage:1; bool mTimeInfoStorage:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MethodMask { bool mEAPSIM:1; bool mEAPAKA:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketRequest_RequestPacket { UINT8 mEAPRequestPacket[9999]; }; // Structure to describe response TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketResponse_ResponsePacket { UINT8 mResponsePacket[9999]; }; // Structure to describe indication TLV 0x01 for AUTH EAPSessionResultIndication struct sAUTHEAPSessionResultIndication_Result { eQMIAUTHEAPResult mResult; }; // Structure to describe response TLV 0x01 for AUTHGetEAPSessionKeys() struct sAUTHGetEAPSessionKeysResponse_SessionKeys { UINT8 mSessionKeys[9999]; }; // Structure to describe request TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKARequest_Version { eQMIAUTHAKAVersion mAKAVersion; }; // Structure to describe request TLV 0x10 for AUTHRunAKA() struct sAUTHRunAKARequest_Parameters1 { UINT8 mRandomChallengeLength; // This array must be the size specified by mRandomChallengeLength // UINT8 mRandomChallenge[1]; }; struct sAUTHRunAKARequest_Parameters2 { UINT8 mAuthenticationTokenLength; // This array must be the size specified by mAuthenticationTokenLength // UINT8 mAuthenticationToken[1]; }; struct sAUTHRunAKARequest_Parameters { sAUTHRunAKARequest_Parameters1 mAUTHRunAKARequest_Parameters1; sAUTHRunAKARequest_Parameters2 mAUTHRunAKARequest_Parameters2; }; // Structure to describe response TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKAResponse_Handle { UINT32 mHandle; }; // Structure to describe indication TLV 0x01 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_Result { UINT32 mHandle; eQMIAUTHAKAResult mResult; }; // Structure to describe request TLV 0x10 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_DTMF { INT8 mEnableEvents; }; // Structure to describe request TLV 0x11 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_VoicePrivacy { INT8 mEnableEvents; }; // Structure to describe request TLV 0x12 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SupplementaryService { INT8 mEnableEvents; }; // Structure to describe request TLV 0x01 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallingNumber { // String is variable length, but must be size of the container // char mCallingNumber[1]; }; // Structure to describe request TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CLIR { eQMIVoiceCLIRTypes mCLIRType; }; // Structure to describe request TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CUG { UINT16 mCUGIndex; INT8 mSuppressPreferentialCUG; INT8 mSuppressOASubscription; }; // Structure to describe request TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_EmergencyCategory { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualCall:1; bool mAutomaticCall:1; bool mReserved:1; }; // Structure to describe response TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceCallEnd() struct sVoiceCallEndRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceCallEnd() struct sVoiceCallEndResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceGetCallInfo() struct sVoiceGetCallInfoRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_CallInfo { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; }; // Structure to describe response TLV 0x11 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyNumber { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x12 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ServiceOption { UINT16 mServiceOption; }; // Structure to describe response TLV 0x13 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x14 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x15 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyName { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // Structure to describe response TLV 0x16 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingType { eQMIVoiceAlertingTypes mAlertingType; }; // Structure to describe response TLV 0x18 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x19 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x1A for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_DiagnosticInfo { UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // Structure to describe indication TLV 0x10 for Voice OTASPIndication struct sVoiceOTASPIndication_OTASPStatus { UINT8 mCallID; eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe indication TLV 0x01 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Signal { UINT8 mSignalType; UINT8 mAlertPitch; UINT8 mSignal; }; // Structure to describe indication TLV 0x11 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerID { UINT8 mPresentationIndicator; UINT8 mCallerIDLength; // This array must be the size specified by mCallerIDLength // char mCallerID[1]; }; // Structure to describe indication TLV 0x12 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Display { // String is variable length, but must be size of the container // char mDisplayBuffer[1]; }; // Structure to describe indication TLV 0x13 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplay { UINT8 mExtendedDisplayBuffer[182]; }; // Structure to describe indication TLV 0x14 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerName { // String is variable length, but must be size of the container // char mCallerName[1]; }; // Structure to describe indication TLV 0x15 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallWaiting { INT8 mNewCallWaiting; }; // Structure to describe indication TLV 0x16 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x17 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallingPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x18 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CalledPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x19 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_RedirectingNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mRedirectReason; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x1A for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CLIRCause { eQMIVoiceCLIRCauses mCLIRCause; }; // Structure to describe indication TLV 0x1B for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSAudio { UINT8 mUpLink; UINT8 mDownLink; }; // Structure to describe indication TLV 0x1C for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSRelease { eQMIVoiceNSSReleases mNSSRelease; }; // Structure to describe indication TLV 0x1D for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_LineControlInfo { INT8 mPolarityIncluded; INT8 mToggleMode; INT8 mReversePolarity; UINT8 mPowerDenialTime; }; // Structure to describe request TLV 0x01 for VoiceSendFlash() struct sVoiceSendFlashRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashRequest_Payload { // String is variable length, but must be size of the container // char mFlashPayload[1]; }; // Structure to describe request TLV 0x11 for VoiceSendFlash() struct sVoiceSendFlashRequest_Type { eQMIVoiceFlashTypes mFlashType; }; // Structure to describe response TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Info { UINT8 mCallID; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe request TLV 0x10 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceStartContinuousDTMF() struct sVoiceStartContinuousDTMFRequest_Info { UINT8 mCallID; char mDTMFDigit; }; // Structure to describe response TLV 0x10 for VoiceStartContinuous() struct sVoiceStartContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceStopContinuousDTMF() struct sVoiceStopContinuousDTMFRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceStopContinuous() struct sVoiceStopContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x01 for Voice DTMFIndication struct sVoiceDTMFIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFEvents mDTMFEvent; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe indication TLV 0x10 for Voice DTMFIndication struct sVoiceDTMFIndication_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceSetPreferredPrivacy() struct sVoiceSetPreferredPrivacyRequest_Preference { eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice PrivacyIndication struct sVoicePrivacyIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x10 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x13 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x14 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mCallEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x15 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x17 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x18 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x19 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x10 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x12 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x13 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x14 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_UUS { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x15 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x17 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x18 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mCallEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x19 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1A for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1B for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1C for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1D for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for VoiceManageCalls() struct sVoiceManageCallsRequest_Info { eQMIVoiceSupplementaryServiceCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x01 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_Info { UINT8 mCallID; eQMIVoiceSupplementaryNotificationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_CUG { UINT16 mCUGIndex; }; // Structure to describe indication TLV 0x11 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_ECT { eQMIVoiceECTCallStates mECTCallState; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x01 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Info { eQMIVoiceSupplementaryServiceTypes mService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_CallForwarding { eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; }; // Structure to describe response TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallWaitinge() struct sVoiceGetCallWaitingeResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_Status { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_Status { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe response TLV 0x11 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_Info { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for VoiceSetCallBarringPassword() struct sVoiceSetCallBarringPasswordRequest_Info { eQMIVoiceSupplementaryServiceReasons mReason; char mOldCallBarringPassword[4]; char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe response TLV 0x10 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x10 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x13 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceAnswerUSSD() struct sVoiceAnswerUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x01 for Voice USSDIndication struct sVoiceUSSDIndication_Type { eQMIVoiceUSSDNotifcationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice USSDIndication struct sVoiceUSSDIndication_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x01 for Voice USSIndication struct sVoiceUSSIndication_Info { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigRequest_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe request TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigRequest_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe request TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigRequest_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe request TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigRequest_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe request TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe request TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe response TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigResponse_AutoAnswer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigResponse_AirTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigResponse_RoamTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigResponse_TTYMode { INT8 mWriteFailed; }; // Structure to describe response TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceSO { INT8 mWriteFailed; }; // Structure to describe response TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceDomain { INT8 mWriteFailed; }; // Structure to describe request TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigRequest_AutoAnswer { INT8 mInclude; }; // Structure to describe request TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigRequest_AirTimer { INT8 mInclude; }; // Structure to describe request TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigRequest_RoamTimer { INT8 mInclude; }; // Structure to describe request TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigRequest_TTYMode { INT8 mInclude; }; // Structure to describe request TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoiceSO { INT8 mInclude; }; // Structure to describe request TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigRequest_AMRStatus { INT8 mInclude; }; // Structure to describe request TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoicePrivacy { INT8 mInclude; }; // Structure to describe request TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigRequest_NAM { UINT8 mNAMID; }; // Structure to describe request TLV 0x18 for VoiceGetConfig() struct sVoiceGetConfigRequest_VoiceDomain { INT8 mInclude; }; // Structure to describe response TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigResponse_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe response TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigResponse_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe response TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigResponse_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe response TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigResponse_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe response TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe response TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigResponse_AMRConfig { INT8 mGSMAMR; bool mWCDMAAMRWB:1; bool mGSMHRAMR:1; bool mGSMAMRWB:1; bool mGSMAMRNB:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigResponse_Privacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe request TLV 0x01 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Info { eQMIVoiceSupplementaryServiceRequests mSupplementaryServiceRequest; INT8 mModifiedByCallControl; }; // Structure to describe request TLV 0x10 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Class { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x12 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_USSData { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe request TLV 0x15 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x16 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe request TLV 0x17 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x18 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_NewPassword { char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe request TLV 0x19 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_DataSource { INT8 mResponseData; }; // Structure to describe request TLV 0x1A for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe request TLV 0x1B for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallForwarding { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x1C for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIR { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe request TLV 0x1D for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIP { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe request TLV 0x1E for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x1F for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x20 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x01 for VoiceAsyncInitiateUSSD() struct sVoiceAsyncInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x10 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x11 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x12 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x13 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe request TLV 0x01 for VoiceBindSubscription() struct sVoiceBindSubscriptionRequest_Type { eQMIVoiceSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for VoiceALSSetLineSwitching() struct sVoiceALSSetLineSwitchingRequest_Switching { INT8 mLineSwitchingAllowed; }; // Structure to describe request TLV 0x01 for VoiceALSSelectLine() struct sVoiceALSSelectLineRequest_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe request TLV 0x01 for VoiceAOCSetACMMaximum() struct sVoiceAOCSetACMMaximumRequest_ACMMax { UINT32 mACMMaximum; }; // Structure to describe request TLV 0x01 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoRequest_Mask { bool mACM:1; bool mACMMaximum:1; bool mCCM:1; // Padding out 13 bits UINT8 mReserved1:5; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACM { UINT32 mACM; }; // Structure to describe response TLV 0x11 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACMMax { UINT32 mACMMaximum; }; // Structure to describe response TLV 0x12 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_CCM { UINT32 mCCM; }; // Structure to describe response TLV 0x10 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_Info { eQMIVoiceVoIPSUPSCallTypes mSupplementaryServiceType; }; // Structure to describe response TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; }; // Structure to describe request TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; // Padding out 8 bits UINT8 mReserved3; }; // Structure to describe request TLV 0x12 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; // Padding out 8 bits UINT8 mReserved3; }; // Structure to describe indication TLV 0x10 for CAT2 EventReport struct sCAT2EventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT2 EventReport struct sCAT2EventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT2 EventReport struct sCAT2EventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT2 EventReport struct sCAT2EventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT2 EventReport struct sCAT2EventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT2 EventReport struct sCAT2EventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT2 EventReport struct sCAT2EventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT2 EventReport struct sCAT2EventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT2 EventReport struct sCAT2EventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT2 EventReport struct sCAT2EventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT2 EventReport struct sCAT2EventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT2 EventReport struct sCAT2EventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT2 EventReport struct sCAT2EventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT2 EventReport struct sCAT2EventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT2 EventReport struct sCAT2EventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT2 EventReport struct sCAT2EventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT2 EventReport struct sCAT2EventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT2 EventReport struct sCAT2EventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT2 EventReport struct sCAT2EventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT2 EventReport struct sCAT2EventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT2 EventReport struct sCAT2EventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT2 EventReport struct sCAT2EventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT2 EventReport struct sCAT2EventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT2 EventReport struct sCAT2EventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT2 EventReport struct sCAT2EventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT2 EventReport struct sCAT2EventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT2 EventReport struct sCAT2EventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT2 EventReport struct sCAT2EventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT2 EventReport struct sCAT2EventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT2 EventReport struct sCAT2EventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT2 EventReport struct sCAT2EventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT2 EventReport struct sCAT2EventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT2 EventReport struct sCAT2EventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT2 EventReport struct sCAT2EventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT2 EventReport struct sCAT2EventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT2 EventReport struct sCAT2EventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT2 EventReport struct sCAT2EventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT2 EventReport struct sCAT2EventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT2 EventReport struct sCAT2EventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT2 EventReport struct sCAT2EventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT2 EventReport struct sCAT2EventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT2 EventReport struct sCAT2EventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT2 EventReport struct sCAT2EventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT2 EventReport struct sCAT2EventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT2 EventReport struct sCAT2EventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT2 EventReport struct sCAT2EventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT2 EventReport struct sCAT2EventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT2 EventReport struct sCAT2EventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT2 EventReport struct sCAT2EventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT2 EventReport struct sCAT2EventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT2 EventReport struct sCAT2EventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT2 EventReport struct sCAT2EventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT2 EventReport struct sCAT2EventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT2 EventReport struct sCAT2EventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT2 EventReport struct sCAT2EventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT2 EventReport struct sCAT2EventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT2 EventReport struct sCAT2EventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT2 EventReport struct sCAT2EventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT2 EventReport struct sCAT2EventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT2 EventReport struct sCAT2EventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT2 EventReport struct sCAT2EventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT2 EventReport struct sCAT2EventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT2 EventReport struct sCAT2EventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT2 EventReport struct sCAT2EventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT2 EventReport struct sCAT2EventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT2 EventReport struct sCAT2EventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT2 EventReport struct sCAT2EventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT2 EventReport struct sCAT2EventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT2 EventReport struct sCAT2EventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT2 EventReport struct sCAT2EventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT2 EventReport struct sCAT2EventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x01 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved3:1; UINT8 mReserved4; }; // Structure to describe response TLV 0x10 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; // Padding out 8 bits UINT8 mReserved3; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; // Padding out 8 bits UINT8 mReserved6; }; // Structure to describe request TLV 0x01 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2GetEventReport() struct sCAT2GetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSCloseChannelIndication struct sCAT2SCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for UIMReadTransparent() struct sUIMReadTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadTransparent() struct sUIMReadTransparentRequest_Buffer { UINT16 mOffset; UINT16 mLength; }; // Structure to describe request TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadTransparent() struct sUIMReadTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x01 for UIMReadRecord() struct sUIMReadRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadRecord() struct sUIMReadRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; }; // Structure to describe request TLV 0x10 for UIMReadRecord() struct sUIMReadRecordRequest_LastRecord { UINT16 mRecordNumber; }; // Structure to describe request TLV 0x11 for UIMReadRecord() struct sUIMReadRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMReadRecord() struct sUIMReadRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadRecord() struct sUIMReadRecordResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadRecord() struct sUIMReadRecordResponse_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe response TLV 0x13 for UIMReadRecord() struct sUIMReadRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ReadRecordIndication struct sUIMReadRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadRecordIndication struct sUIMReadRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadRecordIndication struct sUIMReadRecordIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadRecordIndication struct sUIMReadRecordIndication_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_Buffer { UINT16 mOffset; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_ResponseInIndicaiton { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMWriteRecord() struct sUIMWriteRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteRecord() struct sUIMWriteRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteRecord() struct sUIMWriteRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_Attributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_FileAttributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMVerifyPIN() struct sUIMVerifyPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINRequest_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMUnblockPIN() struct sUIMUnblockPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMUnblockPIN() struct sUIMUnblockPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMChangePIN() struct sUIMChangePINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMChangePIN() struct sUIMChangePINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMChangePIN() struct sUIMChangePINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMChangePIN() struct sUIMChangePINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMChangePIN() struct sUIMChangePINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMChangePIN() struct sUIMChangePINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ChangePINIndication struct sUIMChangePINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ChangePINIndication struct sUIMChangePINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM ChangePINIndication struct sUIMChangePINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMDepersonalization() struct sUIMDepersonalizationRequest_Info { eQMIUIMPersonalizationFeatures mFeature; eQMIUIMCKSessionOperations mOperation; UINT8 mCKLength; // This array must be the size specified by mCKLength // char mCKValue[1]; }; // Structure to describe response TLV 0x10 for UIMDepersonalization() struct sUIMDepersonalizationResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for UIMRefreshRegister() struct sUIMRefreshRegisterRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshOK() struct sUIMRefreshOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshComplete() struct sUIMRefreshCompleteRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventResponse_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent { sUIMGetLastRefreshEventResponse_RefreshEvent1 mUIMGetLastRefreshEventResponse_RefreshEvent1; sUIMGetLastRefreshEventResponse_RefreshEvent2 mUIMGetLastRefreshEventResponse_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMEventRegistration() struct sUIMEventRegistrationRequest_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMEventRegistration() struct sUIMEventRegistrationResponse_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetCardStatusResponse_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMGetCardStatusResponse_Status { sUIMGetCardStatusResponse_Status1 mUIMGetCardStatusResponse_Status1; sUIMGetCardStatusResponse_Status2 mUIMGetCardStatusResponse_Status2; }; // Structure to describe response TLV 0x11 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_HotSwapStatus { UINT8 mHotSwapLength; // This array must be the size specified by mHotSwapLength // eQMIUIMHotSwap mHotSwap[1]; }; // Structure to describe request TLV 0x01 for UIMPowerDown() struct sUIMPowerDownRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMPowerUp() struct sUIMPowerUpRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMPowerUp() struct sUIMPowerUpRequest_IgnoreHotSwapSwitch { INT8 mIgnoreHotSwapSwitch; }; // Structure to describe indication TLV 0x10 for UIM CardStatusIndication struct sUIMCardStatusIndication_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMCardStatusIndication_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMCardStatusIndication_Status { sUIMCardStatusIndication_Status1 mUIMCardStatusIndication_Status1; sUIMCardStatusIndication_Status2 mUIMCardStatusIndication_Status2; }; // Structure to describe indication TLV 0x10 for UIM RefreshIndication struct sUIMRefreshIndication_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMRefreshIndication_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMRefreshIndication_RefreshEvent { sUIMRefreshIndication_RefreshEvent1 mUIMRefreshIndication_RefreshEvent1; sUIMRefreshIndication_RefreshEvent2 mUIMRefreshIndication_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMAuthenticate() struct sUIMAuthenticateRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMAuthenticate() struct sUIMAuthenticateResponse_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMAuthenticate() struct sUIMAuthenticateResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x01 for UIMCloseSession() struct sUIMCloseSessionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetServiceStatus() struct sUIMGetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_FDNStatus { eQMIUIMFDNStatusValues mFDNStatus; }; // Structure to describe response TLV 0x11 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_HiddenKeyStatus { eQMIUIMHiddenKeyStatusValues mHiddenKeyStatus; }; // Structure to describe response TLV 0x12 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_Index { UINT8 mEFDIRIndex; }; // Structure to describe request TLV 0x01 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_FDNStatus { INT8 mEnableFDN; }; // Structure to describe request TLV 0x01 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_SessionChange { eQMIUIMSessionTypes mSessionType; eQMIUIMCKSessionOperations mOperation; }; // Structure to describe request TLV 0x10 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLabel() struct sUIMGetLabelRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLabel() struct sUIMGetLabelResponse_AppLabel { UINT8 mLabelLength; // This array must be the size specified by mLabelLength // char mLabelValue[1]; }; // Structure to describe request TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationRequest_Mask { bool mAutomaticSelection:1; bool mPersonalizationStatus:1; bool mHaltSubscription:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_AutoSelection { INT8 mAutomaticProvisioningOn; }; // Structure to describe response TLV 0x11 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Personalization { UINT8 mFeatureCount; struct sFeature { eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // This array must be the size specified by mFeatureCount // sFeature mFeatures[1]; }; // Structure to describe response TLV 0x12 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Subscription { INT8 mPublishSubscription; }; // Structure to describe request TLV 0x01 for UIMSendADPU() struct sUIMSendADPURequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSendADPU() struct sUIMSendADPURequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x10 for UIMSendADPU() struct sUIMSendADPUResponse_APDUResponse { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for UIMSAPConnection() struct sUIMSAPConnectionRequest_Slot { eQMIUIMConnectOperations mOperation; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionRequest_DisconnectMode { eQMIUIMDisonnectModes mDisconnectMode; }; // Structure to describe request TLV 0x11 for UIMSAPConnection() struct sUIMSAPConnectionRequest_IntermediateGetResponse { INT8 mReturnIntermediateGetResponse; }; // Structure to describe response TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionResponse_State { eQMIUIMSAPStates mSAPState; }; // Structure to describe request TLV 0x01 for UIMSAP() struct sUIMSAPRequestRequest_Request { eQMIUIMSAPRequests mSAPRequest; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAP() struct sUIMSAPRequestRequest_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x10 for UIMSAPRequest() struct sUIMSAPRequestResponse_ATR { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSAPRequest() struct sUIMSAPRequestResponse_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x12 for UIMSAPRequest() struct sUIMSAPRequestResponse_CardReaderStatus { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x10 for UIM SAPConnectionIndication struct sUIMSAPConnectionIndication_CardStatus { eQMIUIMSAPStates mSAPState; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe response TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe request TLV 0x01 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetATR() struct sUIMGetATRRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe response TLV 0x10 for UIMGetATR() struct sUIMGetATRResponse_ATRValue { UINT8 mATRValueLength; // This array must be the size specified by mATRValueLength // UINT8 mATRValue[1]; }; // Structure to describe request TLV 0x01 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateRequest_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateResponse_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PBMGetCapabilities() struct sPBMGetCapabilitiesRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Basic { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // Structure to describe response TLV 0x11 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Group { UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // Structure to describe response TLV 0x12 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AdditionalNumber { UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // Structure to describe response TLV 0x13 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Email { UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // Structure to describe response TLV 0x14 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_SecondName { UINT8 mMaximumSecondNameLength; }; // Structure to describe response TLV 0x15 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_HiddenRecords { INT8 mHiddenEntrySupported; }; // Structure to describe response TLV 0x16 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_GAS { UINT8 mMaximumGASStringLength; }; // Structure to describe response TLV 0x17 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AAS { UINT8 mMaximumAASStringLength; }; // Structure to describe response TLV 0x10 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Basic { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberOfPhonebooks; struct sPhonebook { eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // This array must be the size specified by mNumberOfPhonebooks // sPhonebook mPhonebooks[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x11 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Group { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x12 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AdditionalNumber { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Email { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x14 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_SecondName { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumSecondNameLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x15 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_HiddenRecords { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; INT8 mHiddenEntrySupported; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x16 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_GAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumGASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x17 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumAASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMReadRecords() struct sPBMReadRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mStartingRecordID; UINT16 mEndingRecordID; }; // Structure to describe response TLV 0x10 for PBMReadRecords() struct sPBMReadRecordsResponse_RecordsRead { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Basic { UINT16 mSequenceNumber; eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT8 mNumberOfRecords; struct sRecord1 { UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sRecord2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sRecord { sRecord1 mRecord1; sRecord2 mRecord2; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x10 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_SecondName { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mSecondNameLength; // This array must be the size (in BYTEs) specified by mSecondNameLength // wchar_t mSecondName[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x11 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_AdditionalNumber { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x12 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Group { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x13 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Email { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x14 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Hidden { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; INT8 mHidden; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for PBMWriteRecord() struct sPBMWriteRecordRequest_Info1 { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sPBMWriteRecordRequest_Info2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sPBMWriteRecordRequest_Info { sPBMWriteRecordRequest_Info1 mPBMWriteRecordRequest_Info1; sPBMWriteRecordRequest_Info2 mPBMWriteRecordRequest_Info2; }; // Structure to describe request TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordRequest_SecondName { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe request TLV 0x11 for PBMWriteRecord() struct sPBMWriteRecordRequest_AdditionalNumber { UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // Structure to describe request TLV 0x12 for PBMWriteRecord() struct sPBMWriteRecordRequest_Group { UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // Structure to describe request TLV 0x13 for PBMWriteRecord() struct sPBMWriteRecordRequest_Email { UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // Structure to describe request TLV 0x14 for PBMWriteRecord() struct sPBMWriteRecordRequest_Hidden { INT8 mHidden; }; // Structure to describe response TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteRecord() struct sPBMDeleteRecordRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMDeleteRecord() struct sPBMDeleteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteAllRecords() struct sPBMDeleteAllRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x01 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Number { UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x11 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Name { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsResponse_List { UINT16 mNumberOfRecordIDs; // This array must be the size specified by mNumberOfRecordIDs // UINT16 mRecordID[1]; }; // Structure to describe indication TLV 0x01 for PBM RecordUpdateIndication struct sPBMRecordUpdateIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMOperations mOperation; UINT16 mRecordID; }; // Structure to describe indication TLV 0x01 for PBM RefreshIndication struct sPBMRefreshIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMRefreshStatus mStatus; }; // Structure to describe indication TLV 0x01 for PBM ReadyIndication struct sPBMReadyIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe indication TLV 0x01 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x10 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x11 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x12 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x01 for PBM AllReadyIndication struct sPBMAllReadyIndication_Info { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; bool mAbbreviatedDialingNumber:1; bool mFixedDialingNumber:1; bool mMobileSubscriberIntegratedServicesDigitalNetwork:1; bool mMailBoxDialingNumber:1; bool mServiceDialingNumber:1; bool mBarredDialingNumber:1; bool mLastNumberDialed:1; bool mMailBoxNumber:1; // Padding out 8 bits UINT8 mReserved1; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x11 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x12 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetAllGroups() struct sPBMGetAllGroupsResponse_Groups { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mGroupCount; struct sGroup { UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // This array must be the size specified by mGroupCount // sGroup mGroups[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMSetGroupInfo() struct sPBMSetGroupInfoRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe response TLV 0x10 for PBMSetGroupInfo() struct sPBMSetGroupInfoResponse_ID { eQMIPBMSessionTypes mSessionType; UINT8 mGroupID; }; // Structure to describe request TLV 0x01 for PBMGetState() struct sPBMGetStateRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetStateInfo() struct sPBMGetStateInfoResponse_State { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMStates mState; }; // Structure to describe request TLV 0x01 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsResponse_Records { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM HiddenRecordStatusIndication struct sPBMHiddenRecordStatusIndication_Status { eQMIPBMSessionTypes mSessionType; INT8 mHiddenRecordsValid; }; // Structure to describe request TLV 0x01 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMGetNextRecordID() struct sPBMGetNextRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextRecordID() struct sPBMGetNextRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetAASList() struct sPBMGetAASListResponse_List { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mAASCount; struct sAAS { UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // This array must be the size specified by mAASCount // sAAS mAASs[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x10 for PBMSetAAS() struct sPBMSetAASRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMAASOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe response TLV 0x10 for PBMSetAAS() struct sPBMSetAASResponse_Info { eQMIPBMSessionTypes mSessionType; UINT8 mAASID; }; // Structure to describe indication TLV 0x01 for PBM AASChangeIndication struct sPBMAASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe indication TLV 0x01 for PBM GASChangeIndication struct sPBMGASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGASID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe request TLV 0x10 for PBMBindSubscription() struct sPBMBindSubscriptionRequest_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe response TLV 0x10 for PBMBindSubscription() struct sPBMBindSubscriptionResponse_ResultCode { eQMIResults mQMIResult; eQMIErrors mQMIError; }; // Structure to describe request TLV 0x01 for LOCClientRevision() struct sLOCClientRevisionRequest_Revision { UINT32 mRevision; }; // Structure to describe request TLV 0x01 for LOCRegisterEvents() struct sLOCRegisterEventsRequest_EventRegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; // Padding out 50 bits UINT8 mReserved1:2; UINT8 mReserved2[6]; }; // Structure to describe request TLV 0x01 for LOCStart() struct sLOCStartRequest_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for LOCStart() struct sLOCStartRequest_FixRecurrenceType { eQMILOCFixRecurrenceType mFixRecurrenceType; }; // Structure to describe request TLV 0x11 for LOCStart() struct sLOCStartRequest_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe request TLV 0x12 for LOCStart() struct sLOCStartRequest_EnableIntermediateReports { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe request TLV 0x13 for LOCStart() struct sLOCStartRequest_MinimumIntervalBetweenPositionReports { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe request TLV 0x01 for LOCStop() struct sLOCStopRequest_SessionID { UINT8 mSessionID; }; // Structure to describe indication TLV 0x01 for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionStatus { eQMILOCSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x10 for LOC PositionReportIndication struct sLOCPositionReportIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x11 for LOC PositionReportIndication struct sLOCPositionReportIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x13 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x14 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x15 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x16 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x17 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x18 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x19 for LOC PositionReportIndication struct sLOCPositionReportIndication_SpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x1A for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x1B for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x1C for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x1D for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x1E for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x1F for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC PositionReportIndication struct sLOCPositionReportIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x21 for LOC PositionReportIndication struct sLOCPositionReportIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x22 for LOC PositionReportIndication struct sLOCPositionReportIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x23 for LOC PositionReportIndication struct sLOCPositionReportIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x24 for LOC PositionReportIndication struct sLOCPositionReportIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x25 for LOC PositionReportIndication struct sLOCPositionReportIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x26 for LOC PositionReportIndication struct sLOCPositionReportIndication_LeapSeconds { UINT8 mLeapSeconds; }; // Structure to describe indication TLV 0x27 for LOC PositionReportIndication struct sLOCPositionReportIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x28 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x29 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2A for LOC PositionReportIndication struct sLOCPositionReportIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2B for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionFixCount { UINT32 mSessionFixCount; }; // Structure to describe indication TLV 0x01 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_AltitudeSource { eQMILOCAltitudeAssumed mAltitudeAssumed; }; // Structure to describe indication TLV 0x10 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_SatelliteInfo { UINT8 mSatelliteInfoCount; bool mValidSystem:1; bool mValidGNSSSatelliteID:1; bool mValidHealthStatus:1; bool mValidProcessStatus:1; bool mValidSatelliteInfoMask:1; bool mValidElevation:1; bool mValidAzimuth:1; bool mValidSignalToNoiseRatio:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMILOCSystem mSystem; UINT16 mGNSSSatelliteID; eQMILOCHealthStatus mHealthStatus; eQMILOCSatelliteStatus mSatelliteStatus; bool mHasEphemeris:1; bool mHasAlmanac:1; // Padding out 6 bits UINT8 mReserved2:6; float mElevationDegrees; float mAzimuthDegrees; float mSignalToNoiseRatiodBHz; }; // Structure to describe indication TLV 0x01 for LOC NMEAIndication struct sLOCNMEAIndication_NMEAString { // String is variable length, but must be size of the container // char mNMEAString[1]; }; // Structure to describe request TLV 0x01 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_NotificationType { eQMILOCNotificationType mNotificationType; }; // Structure to describe request TLV 0x10 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest { sLOCNetworkInitiatedRequestIndication_VxRequest1 mLOCNetworkInitiatedRequestIndication_VxRequest1; sLOCNetworkInitiatedRequestIndication_VxRequest2 mLOCNetworkInitiatedRequestIndication_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest { sLOCNetworkInitiatedRequestIndication_SUPLRequest1 mLOCNetworkInitiatedRequestIndication_SUPLRequest1; sLOCNetworkInitiatedRequestIndication_SUPLRequest2 mLOCNetworkInitiatedRequestIndication_SUPLRequest2; sLOCNetworkInitiatedRequestIndication_SUPLRequest3 mLOCNetworkInitiatedRequestIndication_SUPLRequest3; sLOCNetworkInitiatedRequestIndication_SUPLRequest4 mLOCNetworkInitiatedRequestIndication_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest { sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe indication TLV 0x10 for LOC InjectTimeIndication struct sLOCInjectTimeIndication_TimeServerInfo { UINT32 mDelayThresholdMilliseconds; UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_AllowedSize { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x03 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x04 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x01 for LOC EngineStateIndication struct sLOCEngineStateIndication_EngineState { eQMILOCEngineState mEngineState; }; // Structure to describe indication TLV 0x01 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionState { eQMILOCSessionState mSessionState; }; // Structure to describe indication TLV 0x10 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x01 for LOCWiFi() struct sLOCWiFiRequestIndication_RequestType { eQMILOCRequestType mRequestType; }; // Structure to describe request TLV 0x10 for LOCWiFi() struct sLOCWiFiRequestIndication_TimeBetweenFixes { UINT16 mTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x10 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_AccelerometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x11 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_GyrometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x01 for LOCTimeSync() struct sLOCTimeSyncRequestIndication_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x01 for LOC SetSPIStreamingReportIndication struct sLOCSetSPIStreamingReportIndication_SPIRequests { INT8 mEnableSPIRequests; }; // Structure to describe request TLV 0x01 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_WWANType { eQMILOCWWANType mWWANType; }; // Structure to describe indication TLV 0x10 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe indication TLV 0x11 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_IntermediateFixes { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe indication TLV 0x12 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_MinimumIntervalBetweenFixes { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe request TLV 0x01 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UserResponse { eQMILOCUserResponse mUserResponse; }; // Structure to describe request TLV 0x10 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCProvideNIUserResponseRequest_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_VxRequest { sLOCProvideNIUserResponseRequest_VxRequest1 mLOCProvideNIUserResponseRequest_VxRequest1; sLOCProvideNIUserResponseRequest_VxRequest2 mLOCProvideNIUserResponseRequest_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest { sLOCProvideNIUserResponseRequest_SUPLRequest1 mLOCProvideNIUserResponseRequest_SUPLRequest1; sLOCProvideNIUserResponseRequest_SUPLRequest2 mLOCProvideNIUserResponseRequest_SUPLRequest2; sLOCProvideNIUserResponseRequest_SUPLRequest3 mLOCProvideNIUserResponseRequest_SUPLRequest3; sLOCProvideNIUserResponseRequest_SUPLRequest4 mLOCProvideNIUserResponseRequest_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest { sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x01 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_TotalSize { UINT32 mTotalSize; }; // Structure to describe request TLV 0x03 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartNumber { UINT16 mPartNumber; }; // Structure to describe request TLV 0x04 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartData { UINT16 mPartDataLength; // This array must be the size specified by mPartDataLength // UINT8 mPartData[1]; }; // Structure to describe request TLV 0x10 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_FormatType { eQMILOCOrbitsFormatType mOrbitsFormatType; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsDataIndication struct sLOCInjectPredictedOrbitsDataIndication_PartNumber { UINT16 mPartNumber; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_AllowedSizes { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x11 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataValidityIndication struct sLOCGetPredictedOrbitsDataValidityIndication_ValidityInfo { UINT64 mStartTimeInUTC; UINT16 mDurationHours; }; // Structure to describe request TLV 0x01 for LOCInjectUTCTime() struct sLOCInjectUTCTimeRequest_UTCTime { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x10 for LOCInjectPosition() struct sLOCInjectPositionRequest_Latitude { double mLatitudeDegrees; }; // Structure to describe request TLV 0x11 for LOCInjectPosition() struct sLOCInjectPositionRequest_Longitude { double mLongitudeDegrees; }; // Structure to describe request TLV 0x12 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe request TLV 0x13 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe request TLV 0x14 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x15 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe request TLV 0x16 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe request TLV 0x17 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe request TLV 0x18 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe request TLV 0x19 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe request TLV 0x1A for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeSource { eQMILOCAltitudeSource mAltitudeSource; eQMILOCLinkage mLinkage; eQMILOCCoverage mCoverage; }; // Structure to describe request TLV 0x1B for LOCInjectPosition() struct sLOCInjectPositionRequest_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x1C for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionAge { UINT32 mAgeTimestampMilliseconds; }; // Structure to describe request TLV 0x01 for LOCSetEngineLock() struct sLOCSetEngineLockRequest_LockType { eQMILOCLockType mLockType; }; // Structure to describe indication TLV 0x10 for LOC GetEngineLockIndication struct sLOCGetEngineLockIndication_LockType { eQMILOCLockType mLockType; }; // Structure to describe request TLV 0x01 for LOCSetSBASConfig() struct sLOCSetSBASConfigRequest_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe response TLV 0x10 for LOCGetSBASConfig() struct sLOCGetSBASConfigResponse_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe request TLV 0x01 for LOCSetNMEATypes() struct sLOCSetNMEATypesRequest_SentenceTypes { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetNMEATypesIndication struct sLOCGetNMEATypesIndication_SentenceType { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCSetLowPowerMode() struct sLOCSetLowPowerModeRequest_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe indication TLV 0x10 for LOC GetLowPowerModeIndication struct sLOCGetLowPowerModeIndication_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe request TLV 0x01 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe request TLV 0x11 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe request TLV 0x12 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_AddressType { bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x10 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe indication TLV 0x11 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe indication TLV 0x12 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteAll { INT8 mDeleteAll; }; // Structure to describe request TLV 0x10 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteSatelliteInfo { UINT8 mSatelliteInfoCount; struct sSatelliteInfo { UINT16 mGNSSSatelliteID; eQMILOCSystem mSystem; bool mDeleteEphemeris:1; bool mDeleteAlmanac:1; // Padding out 6 bits UINT8 mReserved1:6; }; // This array must be the size specified by mSatelliteInfoCount // sSatelliteInfo mSatelliteInfos[1]; }; // Structure to describe request TLV 0x11 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteGNSData { bool mDeleteGPSSatelliteDirectory:1; bool mDeleteGPSSatelliteSteering:1; bool mDeleteGPSTime:1; bool mDeleteGPSAlmanacCorrection:1; bool mDeleteGLOSatelliteDirectory:1; bool mDeleteGLOSatelliteSteering:1; bool mDeleteGLOTime:1; bool mDeleteGLOAlmanacCorrection:1; bool mDeleteSBASSatelliteDirectory:1; bool mDeleteSBASSatelliteSteering:1; bool mDeletePosition:1; bool mDeleteTime:1; bool mDeleteIONO:1; bool mDeleteUTCTimestamp:1; bool mDeleteHealth:1; bool mDeleteSAData:1; bool mDeleteRTI:1; bool mDeleteSatelliteNoExist:1; bool mDeleteFrequencyBiasEstimate:1; // Padding out 45 bits UINT8 mReserved1:5; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x12 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteCellDatabase { bool mDeletePosition:1; bool mDeleteLatestGPSPosition:1; bool mDeleteOTAPosition:1; bool mDeleteEXTReferencePosition:1; bool mDeleteTimeTag:1; bool mDeleteCellID:1; bool mDeleteCachedCellID:1; bool mDeleteLastServerCell:1; bool mDeleteCurrentServerCell:1; bool mDeleteNeighborInfo:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x13 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteClockInfo { bool mDeleteTimeEstimate:1; bool mDeleteFrequencyEstimate:1; bool mDeleteWeekNumber:1; bool mDeleteRTCTime:1; bool mDeleteTimeTransfer:1; bool mDeleteGPSTimeEstimate:1; bool mDeleteGLOTimeEstimate:1; bool mDeleteGLODayNumber:1; bool mDeleteGLOYearNumber:1; bool mDeleteGLORFGroupDelay:1; bool mDeleteDisableTT:1; // Padding out 21 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x01 for LOCSetXTRATSessionControl() struct sLOCSetXTRATSessionControlRequest_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe indication TLV 0x10 for LOC GetXTRATSessionControlIndication struct sLOCGetXTRATSessionControlIndication_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe request TLV 0x10 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_Time { UINT32 mWiFiPositionTime; }; // Structure to describe request TLV 0x11 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_WiFiPosition { double mLatitudeDegrees; double mLongitudeDegrees; UINT16 mHEPEMeters; UINT8 mNumberOfAccessPointsUsed; eQMILOCWiFiFixErrorCode mFixErrorCode; }; // Structure to describe request TLV 0x12 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_AccessPointInformation { UINT8 mNumberOfAccessPoints; struct sAccessPointInfo { UINT8 mMACAddress[6]; INT32 mRSSIdBm; UINT16 mChannel; bool mBeingUsed:1; bool mHiddenSSID:1; bool mPrivate:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mNumberOfAccessPoints // sAccessPointInfo mAccessPointInfos[1]; }; // Structure to describe request TLV 0x13 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x01 for LOCProvideWiFiStatus() struct sLOCProvideWiFiStatusRequest_WiFiStatus { eQMILOCWiFiStatus mWiFiStatus; }; // Structure to describe indication TLV 0x10 for LOC GetRegisteredEventsIndication struct sLOCGetRegisteredEventsIndication_RegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; // Padding out 50 bits UINT8 mReserved1:2; UINT8 mReserved2[6]; }; // Structure to describe request TLV 0x01 for LOCSetOperationMode() struct sLOCSetOperationModeRequest_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe indication TLV 0x10 for LOC GetOperationModeIndication struct sLOCGetOperationModeIndication_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe request TLV 0x01 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_StationaryStatus { INT8 mDeviceIsStationary; }; // Structure to describe request TLV 0x10 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_Confidence { UINT8 mStationaryConfidence; }; // Structure to describe request TLV 0x10 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe request TLV 0x11 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_AccelerometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x12 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_GyrometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe indication TLV 0x10 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe indication TLV 0x11 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_AccelerometerSampleAccepted { INT8 mAccelerometerSampleAccepted; }; // Structure to describe indication TLV 0x12 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_GyrometerSamplesAccepted { INT8 mGyrometerSamplesAccepted; }; // Structure to describe request TLV 0x01 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe request TLV 0x03 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_SensorTransmitTime { UINT32 mProcessTXTimeMilliseconds; }; // Structure to describe request TLV 0x01 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe request TLV 0x10 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe indication TLV 0x10 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe indication TLV 0x11 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe request TLV 0x01 for LOCSetExternalPowerConfig() struct sLOCSetExternalPowerConfigRequest_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe indication TLV 0x10 for LOC GetExternalPowerConfigIndication struct sLOCGetExternalPowerConfigIndication_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe request TLV 0x01 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionStatus { eQMILOCConnectionStatus mConnectionStatus; }; // Structure to describe request TLV 0x10 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_APNProfile { eQMILOCPDNType mPDNType; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // Structure to describe request TLV 0x10 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe request TLV 0x11 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe request TLV 0x12 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe indication TLV 0x10 for LOC SetProtocolConfigParametersIndication struct sLOCSetProtocolConfigParametersIndication_FailedParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for LOCGetProtocolConfigParameters() struct sLOCGetProtocolConfigParametersRequest_ConfigParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe indication TLV 0x11 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe indication TLV 0x12 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe request TLV 0x10 for LOCSetSensorControlConfig() struct sLOCSetSensorControlConfigRequest_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe indication TLV 0x10 for LOC GetSensorControlConfigIndication struct sLOCGetSensorControlConfigIndication_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe request TLV 0x10 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe request TLV 0x10 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe request TLV 0x11 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x12 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPerformanceConfigIndication struct sLOCSetSensorPerformanceConfigIndication_FailedConfiguration { bool mPerformanceMode:1; bool mAccelerometerSampling:1; bool mGyrometerSampling:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x10 for CATSetEventReport() struct sCATSetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; }; // Structure to describe request TLV 0x11 for CATSetEventReport() struct sCATSetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; // Padding out 8 bits UINT8 mReserved3; }; // Structure to describe request TLV 0x12 for CATSetEventReport() struct sCATSetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CATSetEventReport() struct sCATSetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for CATSetEventReport() struct sCATSetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; // Padding out 8 bits UINT8 mReserved3; }; // Structure to describe indication TLV 0x10 for CAT EventReport struct sCATEventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT EventReport struct sCATEventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT EventReport struct sCATEventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT EventReport struct sCATEventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT EventReport struct sCATEventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT EventReport struct sCATEventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT EventReport struct sCATEventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT EventReport struct sCATEventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT EventReport struct sCATEventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT EventReport struct sCATEventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT EventReport struct sCATEventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT EventReport struct sCATEventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT EventReport struct sCATEventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT EventReport struct sCATEventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT EventReport struct sCATEventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT EventReport struct sCATEventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT EventReport struct sCATEventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT EventReport struct sCATEventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT EventReport struct sCATEventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT EventReport struct sCATEventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT EventReport struct sCATEventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT EventReport struct sCATEventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT EventReport struct sCATEventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT EventReport struct sCATEventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT EventReport struct sCATEventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT EventReport struct sCATEventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT EventReport struct sCATEventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT EventReport struct sCATEventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT EventReport struct sCATEventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT EventReport struct sCATEventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT EventReport struct sCATEventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT EventReport struct sCATEventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT EventReport struct sCATEventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT EventReport struct sCATEventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT EventReport struct sCATEventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT EventReport struct sCATEventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT EventReport struct sCATEventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT EventReport struct sCATEventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT EventReport struct sCATEventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT EventReport struct sCATEventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT EventReport struct sCATEventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT EventReport struct sCATEventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT EventReport struct sCATEventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT EventReport struct sCATEventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT EventReport struct sCATEventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT EventReport struct sCATEventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT EventReport struct sCATEventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT EventReport struct sCATEventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT EventReport struct sCATEventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT EventReport struct sCATEventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT EventReport struct sCATEventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT EventReport struct sCATEventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT EventReport struct sCATEventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT EventReport struct sCATEventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT EventReport struct sCATEventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT EventReport struct sCATEventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT EventReport struct sCATEventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT EventReport struct sCATEventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT EventReport struct sCATEventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT EventReport struct sCATEventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT EventReport struct sCATEventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT EventReport struct sCATEventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT EventReport struct sCATEventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT EventReport struct sCATEventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT EventReport struct sCATEventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT EventReport struct sCATEventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT EventReport struct sCATEventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT EventReport struct sCATEventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT EventReport struct sCATEventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT EventReport struct sCATEventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT EventReport struct sCATEventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT EventReport struct sCATEventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT EventReport struct sCATEventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT EventReport struct sCATEventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT EventReport struct sCATEventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT EventReport struct sCATEventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT EventReport struct sCATEventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT EventReport struct sCATEventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT EventReport struct sCATEventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT EventReport struct sCATEventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT EventReport struct sCATEventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x01 for CATGetServiceState() struct sCATGetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; // Padding out 9 bits UINT8 mReserved3:1; UINT8 mReserved4; }; // Structure to describe response TLV 0x10 for CATGetServiceState() struct sCATGetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; // Padding out 8 bits UINT8 mReserved3; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; // Padding out 8 bits UINT8 mReserved6; }; // Structure to describe request TLV 0x01 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATGetEventReport() struct sCATGetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CATGetEventReport() struct sCATGetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CATGetEventReport() struct sCATGetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CATGetEventReport() struct sCATGetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CATGetEventReport() struct sCATGetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CATGetEventReport() struct sCATGetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CATGetEventReport() struct sCATGetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CATGetEventReport() struct sCATGetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CATGetEventReport() struct sCATGetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CATGetEventReport() struct sCATGetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CATGetEventReport() struct sCATGetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CATGetEventReport() struct sCATGetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CATGetEventReport() struct sCATGetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CATGetEventReport() struct sCATGetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CATGetEventReport() struct sCATGetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CATGetEventReport() struct sCATGetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CATGetEventReport() struct sCATGetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CATGetEventReport() struct sCATGetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CATGetEventReport() struct sCATGetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CATGetEventReport() struct sCATGetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CATGetEventReport() struct sCATGetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CATGetEventReport() struct sCATGetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CATGetEventReport() struct sCATGetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CATGetEventReport() struct sCATGetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CATGetEventReport() struct sCATGetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CATGetEventReport() struct sCATGetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CATGetEventReport() struct sCATGetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CATGetEventReport() struct sCATGetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CATGetEventReport() struct sCATGetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CATGetEventReport() struct sCATGetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CATGetEventReport() struct sCATGetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CATGetEventReport() struct sCATGetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CATGetEventReport() struct sCATGetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CATGetEventReport() struct sCATGetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CATGetEventReport() struct sCATGetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CATGetEventReport() struct sCATGetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CATGetEventReport() struct sCATGetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CATGetEventReport() struct sCATGetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CATGetEventReport() struct sCATGetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CATGetEventReport() struct sCATGetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CATGetEventReport() struct sCATGetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CATGetEventReport() struct sCATGetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CATGetEventReport() struct sCATGetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CATGetEventReport() struct sCATGetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CATGetEventReport() struct sCATGetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CATGetEventReport() struct sCATGetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CATGetEventReport() struct sCATGetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CATGetEventReport() struct sCATGetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CATGetEventReport() struct sCATGetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CATGetEventReport() struct sCATGetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CATGetEventReport() struct sCATGetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CATGetEventReport() struct sCATGetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CATGetEventReport() struct sCATGetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CATGetEventReport() struct sCATGetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CATGetEventReport() struct sCATGetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CATGetEventReport() struct sCATGetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CATGetEventReport() struct sCATGetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CATGetEventReport() struct sCATGetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CATGetEventReport() struct sCATGetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CATGetEventReport() struct sCATGetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CATGetEventReport() struct sCATGetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CATGetEventReport() struct sCATGetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CATGetEventReport() struct sCATGetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CATGetEventReport() struct sCATGetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CATGetEventReport() struct sCATGetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CATGetEventReport() struct sCATGetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CATGetEventReport() struct sCATGetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CATGetEventReport() struct sCATGetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CATGetEventReport() struct sCATGetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CATGetEventReport() struct sCATGetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe request TLV 0x01 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CATEventConfirmation() struct sCATEventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CATEventConfirmation() struct sCATEventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CATEventConfirmation() struct sCATEventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSCloseChannelIndication struct sCATSCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSSendData() struct sCATSCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CATSCWSSendData() struct sCATSCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for RMSGetSMSWake() struct sRMSGetSMSWakeResponse_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSGetSMSWake() struct sRMSGetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for OMASetEventReport() struct sOMASetEventReportRequest_NIA { INT8 mReportNetworkInitiatedAlerts; }; // Structure to describe request TLV 0x11 for OMASetEventReport() struct sOMASetEventReportRequest_Status { INT8 mReportSessionStatus; }; // Structure to describe indication TLV 0x10 for OMA EventReport struct sOMAEventReportIndication_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe indication TLV 0x11 for OMA EventReport struct sOMAEventReportIndication_Status { eQMIOMASessionStates mSessionState; }; // Structure to describe indication TLV 0x12 for OMA EventReport struct sOMAEventReportIndication_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe request TLV 0x10 for OMAStartSession() struct sOMAStartSessionRequest_Type { eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Info { eQMIOMASessionStates mSessionState; eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x11 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe response TLV 0x12 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Retry { UINT8 mRetryCount; UINT16 mRetryPauseTimer; UINT16 mRemainingTime; }; // Structure to describe response TLV 0x13 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe request TLV 0x10 for OMASendSelection() struct sOMASendSelectionRequest_Type { eQMIOMASelections mSelection; UINT16 mSessionID; }; // Structure to describe response TLV 0x10 for OMAGetFeatures() struct sOMAGetFeaturesResponse_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe response TLV 0x11 for OMAGetFeatures() struct sOMAGetFeaturesResponse_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe response TLV 0x12 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFAFeature { INT8 mHFAFeatureEnabled; }; // Structure to describe response TLV 0x13 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFADoneState { eQMIOMAHFADoneStates mHFAFeatureDoneState; }; // Structure to describe request TLV 0x10 for OMASetFeatures() struct sOMASetFeaturesRequest_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe request TLV 0x11 for OMASetFeatures() struct sOMASetFeaturesRequest_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe request TLV 0x12 for OMASetFeatures() struct sOMASetFeaturesRequest_HFAFeature { INT8 mHFAFeatureEnabled; }; #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp000077500000000000000000020775521455567757300313240ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtExports.cpp DESCRIPTION: QUALCOMM Gobi Connection Management API exports Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Stdafx.h" #include "GobiConnectionMgmt.h" /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ) { // Validate arguments if ( (pInterface == 0) || (pServicesCount == 0) || (*pServicesCount == 0) || (pServices == 0) || (pHandle == 0) ) { return (ULONG)eGOBI_ERR_INVALID_ARG; } GOBIHANDLE handle = gDLL.CreateAPI(); if (handle == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcCount = *pServicesCount; *pServicesCount = 0; *pHandle = 0; std::set inSvcs; std::set outSvcs; ULONG s = 0; for (s = 0; s < svcCount; s++) { inSvcs.insert( (eQMIService)pServices[s] ); } outSvcs = pAPI->Connect( pInterface, inSvcs ); ULONG outSvcsCount = (ULONG)outSvcs.size(); if (outSvcsCount > svcCount) { outSvcsCount = svcCount; } if (outSvcsCount == 0) { ULONG rc = (ULONG)pAPI->GetCorrectedLastError(); pAPI = 0; gDLL.DeleteAPI( handle ); return rc; } std::set ::const_iterator pOutSvc = outSvcs.begin(); for (s = 0; s < svcCount; s++) { pServices[s] = UCHAR_MAX; if (s < outSvcsCount) { pServices[s] = (ULONG)*pOutSvc++; } } *pHandle = handle; *pServicesCount = outSvcsCount; return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelSend( svcID, pTXID ); } /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bDisco = pAPI->Disconnect(); if (bDisco == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetGenericCallback( svcID, msgID, pCallback, handle ); } /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 106; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 4; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 5; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 6; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 7; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 8; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 14; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 15; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 16; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 17; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 18; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 20; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 21; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 22; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 23; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 26; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Readme.txt000077500000000000000000000015521455567757300217000ustar00rootroot00000000000000Gobi Extensible API 2011-11-28-1533 This readme covers important information concerning the Gobi Extensible API. Table of Contents 1. What's new in this release 2. Known issues 3. Build steps ------------------------------------------------------------------------------- 1. WHAT'S NEW Initial Release (Gobi Extensible API 2011-11-28-1533) a. Initial beta code release ------------------------------------------------------------------------------- 2. KNOWN ISSUES No known issues. ------------------------------------------------------------------------------- 3. BUILD STEPS a. Start in the 'GobiConnectionMgmt' folder b. For Android, run: make Android ANDROID_PATH= For x86, run: make ------------------------------------------------------------------------------- libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Shared/000077500000000000000000000000001455567757300211425ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Shared/GobiError.h000077500000000000000000000142041455567757300232110ustar00rootroot00000000000000/*=========================================================================== FILE: GobiError.h DESCRIPTION: QUALCOMM Gobi Errors Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiError Enumeration // Gobi API Error Enumeration /*=========================================================================*/ enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrorCode) eGOBI_ERR_QMI_OFFSET = 1000, }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eGobiError validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eGobiError ec ) { bool retVal = false; if (ec > eGOBI_ERR_ENUM_BEGIN && ec < eGOBI_ERR_ENUM_END) { retVal = true; } if (ec >= eGOBI_ERR_QMI_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QMI_OFFSET; retVal = ::IsValid( (eQMIErrorCode)tmp ); } return retVal; };libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Shared/GobiQMICore.cpp000077500000000000000000000342751455567757300237240ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Stdafx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include "ProtocolNotification.h" /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQMICore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQMICore::cGobiQMICore() : mLastError( eGOBI_ERR_NONE ) { mInterface[0] = 0; } /*=========================================================================== METHOD: ~cGobiQMICore (Public Method) DESCRIPTION: Destructor RETURN VALUE: BOOL ===========================================================================*/ cGobiQMICore::~cGobiQMICore() { Cleanup(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Initialize() { return true; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Cleanup() { Disconnect(); return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Gobi device interface to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiQMICore::Connect( LPCSTR pInterface, std::set & services ) { // The services we successfully connected to std::set retServices; // Clear last error recorded ClearLastError(); size_t ifaceLen = strnlen( pInterface, MAX_PATH ) + 1; if (ifaceLen >= (size_t)MAX_PATH) { mLastError = eGOBI_ERR_INVALID_ARG; return retServices; } // Allocate configured QMI servers std::set ::const_iterator pIter = services.begin(); while (pIter != services.end()) { cQMIProtocolServer * pSvr = 0; pSvr = new cQMIProtocolServer( *pIter, 8192, 512 ); if (pSvr != 0) { // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) pSvr->Initialize(); bool bRC = pSvr->Connect( pInterface ); if (bRC == true) { sServerInfo si( pSvr ); std::pair entry( *pIter, si ); mServers.insert( entry ); retServices.insert( *pIter ); } } pIter++; } // All servers fail? if (retServices.size() == 0) { // Yes, disconnect them all Disconnect(); // ... and set the error code mLastError = eGOBI_ERR_CONNECT; } memcpy( mInterface, pInterface, ifaceLen ); return retServices; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Disconnect() { // Clear last error recorded ClearLastError(); // Clear device interface mInterface[0] = 0; // Assume failure bool bRC = false; if (mServers.size() == 0) { mLastError = eGOBI_ERR_NO_CONNECTION; return bRC; } // Disconnect/clean-up all configured QMI servers std::map ::iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr != 0) { pSvr->Disconnect(); pSvr->Exit(); delete pSvr; } si.mLogsProcessed = 0; pIter++; } mServers.clear(); bRC = true; return bRC; } /*=========================================================================== METHOD: Send (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svcID [ I ] - QMI service type msgID [ I ] - QMI message ID to [ I ] - Timeout value (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { // Clear last error recorded ClearLastError(); if (msgID > 0xffff) { mLastError = eGOBI_ERR_INVALID_ARG; return mLastError; } sSharedBuffer * pRequest = 0; pRequest = sQMIServiceBuffer::BuildBuffer( (eQMIService)svcID, (WORD)msgID, false, false, pIn, inLen ); if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return mLastError; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Build the request object sProtocolRequest req( pRequest, 0, to, 1, 1, &pn ); if (to == 0) { mLastError = eGOBI_ERR_INTERNAL; return mLastError; } // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0 || pSvr->IsConnected() == false) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } // Grab the log from the server const cProtocolLog & protocolLog = pSvr->GetLog(); // Schedule the request ULONG reqID = pSvr->AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return mLastError; } // Store for external cancel si.mRequestID = reqID; bool bReq = false; bool bExit = false; DWORD idx; // Returned response sProtocolBuffer rsp; // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); while (bExit == false) { int wc = sigEvt.Wait( to, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { // Grab the as-sent request DWORD id = evt.mParam2; sProtocolBuffer tmpReq = protocolLog.GetBuffer( id ); sSharedBuffer * pTmpRequest = tmpReq.GetSharedBuffer(); if (pTmpRequest != 0) { // Grab the transaction ID sQMIServiceBuffer actualReq( pTmpRequest ); si.mRequestTXID = actualReq.GetTransactionID(); } bReq = true; } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed pSvr->RemoveRequest( reqID ); } if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } // Caller might not be interested in actual output (beyond error code) ULONG maxSz = 0; if (pOutLen != 0) { maxSz = *pOutLen; } if (maxSz > 0) { // TLV 2 is always present ULONG needSz = 0; const BYTE * pData = (const BYTE *)qmiRsp.GetRawContents( needSz ); if (needSz == 0 || pData == 0) { return eGOBI_ERR_INVALID_RSP; } *pOutLen = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pOut, pData, needSz ); } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Success! return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CancelSend (Public Method) DESCRIPTION: Cancel the most recent in-progress Send() based operation PARAMETERS: svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::CancelSend( ULONG svcID, ULONG * pTXID ) { // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return eGOBI_ERR_INTERNAL; } if (si.mRequestID == 0xffffffff) { return eGOBI_ERR_NO_CANCELABLE_OP; } bool bRemove = pSvr->RemoveRequest( si.mRequestID ); if (bRemove == false) { return eGOBI_ERR_CANCEL_OP; } if (pTXID != 0) { *pTXID = si.mRequestTXID; } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2011-11-28-1533/Shared/GobiQMICore.h000077500000000000000000000146161455567757300233660ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.h DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIProtocolServer.h" #include "SyncQueue.h" #include "GobiError.h" /*=========================================================================*/ // Class cGobiQMICore /*=========================================================================*/ class cGobiQMICore { public: // Constructor cGobiQMICore(); // Destructor virtual ~cGobiQMICore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // (Inline) Return the server as determined by the service type cQMIProtocolServer * GetServer( eQMIService svc ) { cQMIProtocolServer * pSvr = 0; std::map ::const_iterator pIter; pIter = mServers.find( svc ); if (pIter != mServers.end()) { const sServerInfo & si = pIter->second; pSvr = si.mpServer; } return pSvr; }; // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QMI error (if this happens to indicate // that no error occurred then return the mapped eQMI_ERR_INTERNAL // value) eGobiError GetCorrectedQMIError( ULONG qmiErrorCode ) { ULONG ec = (ULONG)eQMI_ERR_INTERNAL + (ULONG)eGOBI_ERR_QMI_OFFSET; if (qmiErrorCode != (ULONG)eQMI_ERR_NONE) { ec = qmiErrorCode + (ULONG)eGOBI_ERR_QMI_OFFSET; } return (eGobiError)ec; }; // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Send a request using the specified QMI protocol server and wait // for (and then return) the response eGobiError Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); // Cancel the most recent in-progress Send() based operation eGobiError CancelSend( ULONG svcID, ULONG * pTXID ); protected: /* Device interface */ CHAR mInterface[MAX_PATH]; /* QMI protocol server/protocol server log count */ struct sServerInfo { public: // Constructor (default) sServerInfo() : mpServer( 0 ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; // Constructor (parameterized) sServerInfo( cQMIProtocolServer * pServer ) : mpServer( pServer ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; /* Protocol server */ cQMIProtocolServer * mpServer; /* Protocol server logs processed */ ULONG mLogsProcessed; /* Last scheduled request ID */ ULONG mRequestID; /* Last schedule request QMI transaction ID */ ULONG mRequestTXID; }; /* QMI protocol servers */ std::map mServers; /* Last error recorded */ eGobiError mLastError; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/000077500000000000000000000000001455567757300177365ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/000077500000000000000000000000001455567757300206265ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/Comm.cpp000077500000000000000000000370311455567757300222340ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.cpp DESCRIPTION: Implementation of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Comm.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads PARAMETERS: pData [ I ] Asynchronous read object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxThread( void * pData ) { cComm * pComm = (cComm*)pData; if (pComm == NULL || pComm->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pComm->mCommandPipe[READING], &inputSet ); int largestFD = pComm->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pComm->mCommandPipe[READING], &outputSet ) == true) { // Read from the pipe BYTE cmd; status = read( pComm->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pComm->mPort, &inputSet ); largestFD = std::max( pComm->mPort, pComm->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; } else { // EXIT_CMD or anything else break; } } else if (FD_ISSET( pComm->mPort, &outputSet ) == true) { // Stop watching for read data FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; // Perform a read status = read( pComm->mPort, pComm->mpBuffer, pComm->mBuffSz ); cIOCallback * pCallback = pComm->mpRxCallback; pComm->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } } return 0; }; /*=========================================================================*/ // cComm Methods /*=========================================================================*/ /*=========================================================================== METHOD: cComm (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cComm::cComm() : mPortName( "" ), mPort( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cComm (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cComm::~cComm() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cComm::IsValid() { // Nothing to do, dependant on extended class functionality return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - Name of port to open (IE: /dev/qcqmi0) RETURN VALUE: bool ===========================================================================*/ bool cComm::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mPort != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cComm:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxThread, this ); if (nRet != 0) { TRACE( "cComm::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Opening the com port mPort = open( pPort, O_RDWR ); if (mPort == INVALID_HANDLE_VALUE) { Disconnect(); return false; } // Save port name mPortName = pPort; // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Run an IOCTL on the open file handle PARAMETERS: ioctlReq [ I ] - ioctl request value pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - ioctl return value (0 for success) ===========================================================================*/ int cComm::SendCtl( UINT ioctlReq, void * pData ) { if (mPort == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } return ioctl( mPort, ioctlReq, pData ); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cComm::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it TRACE( "cComm::Disconnnect() joining thread %lu\n", mRxThreadID ); int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mPort != INVALID_HANDLE_VALUE) { close( mPort ); mPort = INVALID_HANDLE_VALUE; } mPortName.clear(); return bRC; } /*=========================================================================== METHOD: ConfigureSettings (Public Method) DESCRIPTION: Configure the port with the passed in parameters PARAMETERS: pSettings [ I ] - Desired port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::ConfigureSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } tcflush( mPort, TCIOFLUSH ); int nRC = tcsetattr( mPort, TCSANOW, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: GetSettings (Public Method) DESCRIPTION: Return the current port settings PARAMETERS: pSettings [ I ] - Current port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::GetSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } // Get the COM port settings int nRC = tcgetattr( mPort, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelIO() { if (mPort == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelRx() { if (mPort == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelTx() { if (mPort == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cComm::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to stop reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cComm::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // This seems a bit pointless, but we're still going verify // the device is ready for writing, and give it up to // (1000 + num bytes) MS to be ready (in 100 MS chunks) struct timeval TimeOut; fd_set set; int nReady = 0; int nCount = 0; while ( nReady == 0 ) { if (mbCancelWrite == true) { TRACE( "cComm::TxData() write canceled before device was ready\n" ); return false; } if (nCount >= (1000 + bufSz) / 100) { // Timeout is expired break; } FD_ZERO( &set ); FD_SET( mPort, &set ); TimeOut.tv_sec = 0; TimeOut.tv_usec = 100000; nReady = select( mPort + 1, NULL, &set, NULL, &TimeOut ); nCount++; } if (nReady <= 0) { TRACE( "cComm::TxData() Unable to get device ready for" " Write, error %d: %s\n", nReady, strerror( nReady) ); return false; } int nRet = write( mPort, pBuf, bufSz ); if (nRet != bufSz) { TRACE( "cComm::TxData() write returned %d instead of %lu\n", nRet, bufSz ); return false; } #ifdef DEBUG TRACE( "Write of %lu bytes took %llu miliseconds\n", bufSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/Comm.h000077500000000000000000000104121455567757300216730ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.h DESCRIPTION: Declaration of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cComm /*=========================================================================*/ class cComm : public cConnection { public: // Constructor cComm(); // Destructor ~cComm(); // Is this object valid? bool IsValid(); // Connect to the specified port bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current port name std::string GetPortName() const { return mPortName; }; // Are we currently connected to a port? bool IsConnected() { return (mPort != INVALID_HANDLE_VALUE); }; protected: /* Name of current port */ std::string mPortName; /* Handle to COM port */ int mPort; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; // Rx thread is allowed complete access friend void * RxThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/Connection.h000077500000000000000000000106301455567757300231010ustar00rootroot00000000000000/*=========================================================================== FILE: Connection.h DESCRIPTION: Declaration of cConnection class PUBLIC CLASSES AND METHODS: cComm This class defines a prototype for low level communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cIOCallback /*=========================================================================*/ class cIOCallback { public: // (Inline) Constructor cIOCallback() { }; // (Inline) Destructor virtual ~cIOCallback() { }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesTransferred ) = 0; }; /*=========================================================================*/ // Class cConnection /*=========================================================================*/ class cConnection { public: // Constructor cConnection() : mpRxCallback( 0 ) { }; // Is this object valid? virtual bool IsValid() { return false; }; // Connect to the specified interface virtual bool Connect( LPCSTR pPort ) { return false; }; // Send a control message virtual int SendCtl( UINT type, void * pData ) { return -1; }; // Disconnect from the current port virtual bool Disconnect() { return false; }; // Cancel any in-progress I/O virtual bool CancelIO() { return false; }; // Cancel any in-progress receive operation virtual bool CancelRx() { return false; }; // Cancel any in-progress transmit operation virtual bool CancelTx() { return false; }; // Receive data virtual bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { return false; }; // Transmit data virtual bool TxData( const BYTE * pBuf, ULONG bufSz ) { return false; }; // Are we currently connected to a port? virtual bool IsConnected() { return false; }; protected: /* Read callbacks */ cIOCallback * mpRxCallback; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/Event.cpp000077500000000000000000000254671455567757300224340ustar00rootroot00000000000000/*=========================================================================== FILE: Event.cpp DESCRIPTION: Implementation of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Event.h" /*=========================================================================== METHOD: WaitOnMultipleEvents (Free Method) DESCRIPTION: Wait for any of the events to be set and return the value Note: If multiple events are set, only the event specified by eventIndex will be read from. Run this function again to get the next event. PARAMETERS: events [ I ] - Vector of events which may be signaled timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success eventIndex [ O ] - Index of event which was signaled RETURN VALUE: Return code positive for number of events set -ETIME on timeout negative errno value on failure ===========================================================================*/ int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ) { // Check internal pipes' status for (ULONG index = 0; index < events.size(); index++) { int error = events[index]->mError; if (error != 0) { TRACE( "cEvent %lu has error %d\n", index, error ); return -error; } } // Initialize the FD set fd_set fds; FD_ZERO( &fds ); // Add each item to the FD set, keeping track of the largest, // which is used for select() int largestFD = 0; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; FD_SET( pipe, &fds ); largestFD = std::max( pipe, largestFD ); } struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipes for the specified amount of time int rc = select( largestFD + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { TRACE( "WaitOnMultipleEvents error %d\n", errno ); return -errno; } else if (rc == 0) { // No activity on the pipes return -ETIME; } int numSignaled = rc; // Only read from first pipe which was signaled int signaled = -1; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; if (FD_ISSET( pipe, &fds ) != 0) { signaled = index; break; } } if (signaled == -1) { // Odd, no one was signaled return -ENODATA; } DWORD tempVal = 0; rc = events[signaled]->Read( tempVal ); if (rc == 0) { // Success val = tempVal; eventIndex = signaled; return numSignaled; } else { // failure return rc; } } /*=========================================================================*/ // cEvent Methods /*=========================================================================*/ /*=========================================================================== METHOD: cEvent (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cEvent::cEvent() : mError( 0 ) { int rc = pipe( mPipes ); if (rc != 0) { mError = errno; TRACE( "cEvent - Error %d creating pipe, %s\n", mError, strerror( mError ) ); } } /*=========================================================================== METHOD: ~cEvent (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cEvent::~cEvent() { // Check internal pipe status if (mError == 0) { Close(); mError = EBADF; } } /*=========================================================================== METHOD: Close (Internal Method) DESCRIPTION: Close pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Close() { int retCode = 0; int rc = close( mPipes[READING] ); mPipes[READING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[READING], %s\n", retCode, strerror( retCode ) ); } rc = close( mPipes[WRITING] ); mPipes[WRITING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[WRITING], %s\n", retCode, strerror( retCode ) ); } return retCode; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Set/signal the event with the specified value PARAMETERS: val [ I ] - Value to pass through with signal RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Set( DWORD val ) { // Check internal pipe status if (mError != 0) { return mError; } PBYTE pWrite = (PBYTE)&val; int writeSize = sizeof( DWORD ); while (writeSize > 0) { int bytesWritten = write( mPipes[WRITING], pWrite, writeSize ); if (bytesWritten == -1) { // Store error from write int writeErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = writeErr; } // We cannot recover from this error Close(); return writeErr; } pWrite += bytesWritten; writeSize -= bytesWritten; } // Success return 0; } /*=========================================================================== METHOD: Wait (Free Method) DESCRIPTION: Wait for the event to be signalled and return the read in value PARAMETERS: timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success RETURN VALUE: Return code 0 on success ETIME on timeout errno value on failure ===========================================================================*/ int cEvent::Wait( DWORD timeoutMS, DWORD & val ) { // Check internal pipe status if (mError != 0) { return mError; } fd_set fds; FD_ZERO( &fds ); FD_SET( mPipes[READING], &fds ); struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipe for the specified amount of time int rc = select( mPipes[READING] + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { // Store error from select int selectErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = selectErr; } // We cannot recover from this error Close(); return selectErr; } else if (rc == 0) { // No activity on the pipe return ETIME; } return Read( val ); } /*=========================================================================== METHOD: Clear (Free Method) DESCRIPTION: Read and discard all values currently in the pipe ===========================================================================*/ void cEvent::Clear() { DWORD unusedVal; int rc = 0; while (rc == 0) { rc = Wait( (DWORD)0, unusedVal ); } } /*=========================================================================== METHOD: Read (Internal Method) DESCRIPTION: Read a DWORD from the pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Read( DWORD & val ) { DWORD tempVal; PBYTE pRead = (PBYTE)&tempVal; int readSize = sizeof( DWORD ); while (readSize > 0) { int bytesRead = read( mPipes[READING], pRead, readSize ); if (bytesRead <= 0) { // Store error from read int readErr = errno; if (readErr == 0) { // Hard error! This should NEVER happen for a pipe ASSERT( 0 ); readErr = EBADF; } // First error? if (mError == 0) { // Yes, store the error mError = readErr; } // We cannot recover from this error Close(); return readErr; } pRead += bytesRead; readSize -= bytesRead; } val = tempVal; return 0; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/Event.h000077500000000000000000000102031455567757300220570ustar00rootroot00000000000000/*=========================================================================== FILE: Event.h DESCRIPTION: Declaration of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include //--------------------------------------------------------------------------- // Prototype //--------------------------------------------------------------------------- class cEvent; /*=========================================================================*/ // Free methods /*=========================================================================*/ // Wait for any of the events to be set and return the value int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); /*=========================================================================*/ // Class cEvent /*=========================================================================*/ class cEvent { public: // Constructor cEvent(); // Destructor ~cEvent(); // Set/signal the event with the specified value int Set( DWORD val ); // Wait for the event to be signalled and return the read in value int Wait( DWORD timeoutMS, DWORD & val ); // Read and discard all values currently in the pipe void Clear(); protected: // Close pipe (used in errors or normal exit) int Close(); // Read from the pipe int Read( DWORD & val ); /* Internal error status */ int mError; /* Internal pipes */ int mPipes[2]; // WaitOnMultipleEvents gets full access friend int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolBuffer.cpp000077500000000000000000000143601455567757300242740ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.cpp DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sProtocolBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer() : mpData( 0 ), mbValid( false ) { // Object is currently invalid mTimestamp = EMPTY_TIME; } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (parameterized) PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( sSharedBuffer * pBuffer ) : mpData( 0 ), mbValid( false ) { mTimestamp = EMPTY_TIME; time_t rawtime; time( &rawtime ); tm * timestamp = localtime( &rawtime ); if (timestamp != 0) { mTimestamp = *timestamp; } if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } mpData = pBuffer; if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; } // NOTE: Derived classes need to call their own validation method // in their constructors since the override might try to access // data that is not yet in place sProtocolBuffer::Validate(); } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Copy constructor PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( const sProtocolBuffer & copyThis ) : mpData( copyThis.mpData ), mTimestamp( copyThis.mTimestamp ), mbValid( copyThis.mbValid ) { // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } } /*=========================================================================== METHOD: operator = (Public Method) DESCRIPTION: Assignment operator PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: sProtocolBuffer & ===========================================================================*/ sProtocolBuffer & sProtocolBuffer::operator = ( const sProtocolBuffer & copyThis ) { // Do we already have data? if (mpData != 0) { // Is it different than what we are duplicating? if (mpData != copyThis.mpData) { // Yes, release our current buffer mpData->Release(); } } mpData = copyThis.mpData; mTimestamp = copyThis.mTimestamp; mbValid = copyThis.mbValid; // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } return *this; } /*=========================================================================== METHOD: ~sProtocolBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::~sProtocolBuffer() { if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } else if (mpData != 0) { ASSERT( 0 ); } mbValid = false; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolBuffer.h000077500000000000000000000116201455567757300237350ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.h DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SharedBuffer.h" #include "ProtocolEnum.h" static const tm EMPTY_TIME = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /*=========================================================================*/ // Struct sProtocolBuffer /*=========================================================================*/ struct sProtocolBuffer { public: // Constructor (default) sProtocolBuffer(); // Constructor (parameterized) sProtocolBuffer( sSharedBuffer * pBuffer ); // Copy constructor sProtocolBuffer( const sProtocolBuffer & copyThis ); // Assignment operator sProtocolBuffer & operator = ( const sProtocolBuffer & copyThis ); // Destructor virtual ~sProtocolBuffer(); // (Inline) Get buffer const BYTE * GetBuffer() const { BYTE * pRet = 0; if (IsValid() == true) { pRet = (BYTE *)mpData->GetBuffer(); } return (const BYTE *)pRet; }; // (Inline) Get buffer size ULONG GetSize() const { ULONG size = 0; if (IsValid() == true) { size = mpData->GetSize(); } return size; }; // (Inline) Return the protocol type eProtocolType GetType() const { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid() == true) { pt = (eProtocolType)mpData->GetType(); } return pt; }; // (Inline) Return the shared buffer sSharedBuffer * GetSharedBuffer() const { sSharedBuffer * pRet = 0; if (IsValid() == true) { pRet = mpData; } return pRet; }; // (Inline) Return the timestamp tm GetTimestamp() const { tm ft = EMPTY_TIME; if (IsValid() == true) { ft = mTimestamp; } return ft; }; // (Inline) Is this buffer valid? virtual bool IsValid() const { return mbValid; }; protected: // (Inline) Validate buffer virtual bool Validate() { // Do we have a shared buffer and is it valid? mbValid = (mpData != 0 && mpData->IsValid()); return mbValid; }; /* Our data buffer */ sSharedBuffer * mpData; /* Time buffer was created */ tm mTimestamp; /* Has this buffer been validated? (NOTE: *NOT* set in base) */ bool mbValid; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolEnum.h000077500000000000000000000242111455567757300234300ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEnum.h DESCRIPTION: Generic protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eProtocolType Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eProtocolType Enumeration // // NOTE: QMI protocol types need to be in the same order as eQMIService // with RX added first then TX /*=========================================================================*/ enum eProtocolType { ePROTOCOL_ENUM_BEGIN = -1, ePROTOCOL_COMMAND, // 000 Protocol server command ePROTOCOL_AT, // 001 AT command protocol ePROTOCOL_NMEA, // 002 NMEA (GPS) protocol ePROTOCOL_DIAG_RX, // 003 DIAG protocol (incoming) ePROTOCOL_DIAG_TX, // 004 DIAG protocol (outgoing) ePROTOCOL_DOWNLOAD_RX, // 005 Download protocol (incoming) ePROTOCOL_DOWNLOAD_TX, // 006 Download protocol (outgoing) ePROTOCOL_SDOWNLOAD_RX, // 007 Streaming download protocol (incoming) ePROTOCOL_SDOWNLOAD_TX, // 008 Streaming download protocol (outgoing) ePROTOCOL_QDL_RX, // 009 QDL streaming protocol (incoming) ePROTOCOL_QDL_TX, // 010 QDL streaming protocol (outgoing) ePROTOCOL_QMI_CTL_RX = 60, // 060 QMI CTL protocol (incoming) ePROTOCOL_QMI_CTL_TX, // 061 QMI CTL protocol (outgoing) ePROTOCOL_QMI_WDS_RX, // 062 QMI WDS protocol (incoming) ePROTOCOL_QMI_WDS_TX, // 063 QMI WDS protocol (outgoing) ePROTOCOL_QMI_DMS_RX, // 064 QMI DMS protocol (incoming) ePROTOCOL_QMI_DMS_TX, // 065 QMI DMS protocol (outgoing) ePROTOCOL_QMI_NAS_RX, // 066 QMI NAS protocol (incoming) ePROTOCOL_QMI_NAS_TX, // 067 QMI NAS protocol (outgoing) ePROTOCOL_QMI_QOS_RX, // 068 QMI QOS protocol (incoming) ePROTOCOL_QMI_QOS_TX, // 069 QMI QOS protocol (outgoing) ePROTOCOL_QMI_WMS_RX, // 070 QMI WMS protocol (incoming) ePROTOCOL_QMI_WMS_TX, // 071 QMI WMS protocol (outgoing) ePROTOCOL_QMI_PDS_RX, // 072 QMI PDS protocol (incoming) ePROTOCOL_QMI_PDS_TX, // 073 QMI PDS protocol (outgoing) ePROTOCOL_QMI_AUTH_RX, // 074 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AUTH_TX, // 075 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_AT_RX, // 076 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AT_TX, // 077 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_VOICE_RX, // 078 QMI Voice protocol (incoming) ePROTOCOL_QMI_VOICE_TX, // 079 QMI Voice protocol (outgoing) ePROTOCOL_QMI_CAT2_RX, // 080 QMI CAT (new) protocol (incoming) ePROTOCOL_QMI_CAT2_TX, // 081 QMI CAT (new) protocol (outgoing) ePROTOCOL_QMI_UIM_RX, // 082 QMI UIM protocol (incoming) ePROTOCOL_QMI_UIM_TX, // 083 QMI UIM protocol (outgoing) ePROTOCOL_QMI_PBM_RX, // 084 QMI PBM protocol (incoming) ePROTOCOL_QMI_PBM_TX, // 085 QMI PBM protocol (outgoing) ePROTOCOL_QMI_13_RX, // 086 QMI service ID 13 protocol (incoming) ePROTOCOL_QMI_13_TX, // 087 QMI service ID 13 protocol (outgoing) ePROTOCOL_QMI_RMTFS_RX, // 088 QMI RMTFS protocol (incoming) ePROTOCOL_QMI_RMTFS_TX, // 089 QMI RMTFS protocol (outgoing) ePROTOCOL_QMI_15_RX, // 090 QMI service ID 15 protocol (incoming) ePROTOCOL_QMI_15_TX, // 091 QMI service ID 15 protocol (outgoing) ePROTOCOL_QMI_LOC_RX, // 092 QMI UIM protocol (incoming) ePROTOCOL_QMI_LOC_TX, // 093 QMI UIM protocol (outgoing) ePROTOCOL_QMI_SAR_RX, // 094 QMI PBM protocol (incoming) ePROTOCOL_QMI_SAR_TX, // 095 QMI PBM protocol (outgoing) ePROTOCOL_QMI_18_RX, // 096 QMI service ID 18 protocol (incoming) ePROTOCOL_QMI_18_TX, // 097 QMI service ID 18 protocol (outgoing) ePROTOCOL_QMI_19_RX, // 098 QMI service ID 19 protocol (incoming) ePROTOCOL_QMI_19_TX, // 099 QMI service ID 19 protocol (outgoing) ePROTOCOL_QMI_CSD_RX, // 100 QMI CSD protocol (incoming) ePROTOCOL_QMI_CSD_TX, // 101 QMI CSD protocol (outgoing) ePROTOCOL_QMI_EFS_RX, // 102 QMI EFS protocol (incoming) ePROTOCOL_QMI_EFS_TX, // 103 QMI EFS protocol (outgoing) ePROTOCOL_QMI_22_RX, // 104 QMI service ID 22 protocol (incoming) ePROTOCOL_QMI_22_TX, // 105 QMI service ID 22 protocol (outgoing) ePROTOCOL_QMI_TS_RX, // 106 QMI TS protocol (incoming) ePROTOCOL_QMI_TS_TX, // 107 QMI TS protocol (outgoing) ePROTOCOL_QMI_TMD_RX, // 108 QMI TMD protocol (incoming) ePROTOCOL_QMI_TMD_TX, // 109 QMI TMD protocol (outgoing) ePROTOCOL_QMI_25_RX, // 110 QMI service ID 25 protocol (incoming) ePROTOCOL_QMI_25_TX, // 111 QMI service ID 25 protocol (outgoing) ePROTOCOL_QMI_26_RX, // 112 QMI service ID 26 protocol (incoming) ePROTOCOL_QMI_26_TX, // 113 QMI service ID 26 protocol (outgoing) ePROTOCOL_QMI_27_RX, // 114 QMI service ID 27 protocol (incoming) ePROTOCOL_QMI_27_TX, // 115 QMI service ID 27 protocol (outgoing) ePROTOCOL_QMI_28_RX, // 116 QMI service ID 28 protocol (incoming) ePROTOCOL_QMI_28_TX, // 117 QMI service ID 28 protocol (outgoing) ePROTOCOL_QMI_CAT_RX = 508, // 508 QMI CAT protocol (incoming) ePROTOCOL_QMI_CAT_TX, // 509 QMI CAT protocol (outgoing) ePROTOCOL_QMI_RMS_RX, // 510 QMI RMS protocol (incoming) ePROTOCOL_QMI_RMS_TX, // 511 QMI RMS protocol (outgoing) ePROTOCOL_QMI_OMA_RX, // 512 QMI OMA protocol (incoming) ePROTOCOL_QMI_OMA_TX, // 513 QMI OMA protocol (outgoing) ePROTOCOL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolType validity check PARAMETERS: pt [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolType pt ) { bool retVal = false; if ( (pt > ePROTOCOL_ENUM_BEGIN && pt <= ePROTOCOL_QDL_TX) || (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_28_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocol( eProtocolType pt ) { bool retVal = false; if ( (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_28_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolRX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the incoming direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolRX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are even are RX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 0) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolTX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the outgoing direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolTX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are odd are TX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 1) ) { retVal = true; } return retVal; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolLog.cpp000077500000000000000000000133241455567757300236030ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class definition PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolLog.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // The maximum number of in-memory buffers we allow const ULONG MAX_PROTOCOL_BUFFERS = 1024 * 16; /*=========================================================================*/ // cProtocolLog Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolLog (Public Method) DESCRIPTION: Constructor PARAMETERS: maxBuffers [ I ] - Maximum number of buffers to store in the log RETURN VALUE: None ===========================================================================*/ cProtocolLog::cProtocolLog( ULONG maxBuffers ) : mLog( maxBuffers > MAX_PROTOCOL_BUFFERS ? MAX_PROTOCOL_BUFFERS : maxBuffers, true ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolLog (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolLog::~cProtocolLog() { // Empty out the log Clear(); } /*=========================================================================== METHOD: AddBuffer (Public Method) DESCRIPTION: Add an protocol buffer to the end of the log PARAMETERS: buff [ I ] - Protocol buffer to add RETURN VALUE: ULONG - Index of newly added buffer (INVALID_LOG_INDEX upon failure) ===========================================================================*/ ULONG cProtocolLog::AddBuffer( sProtocolBuffer & buf ) { ULONG idx = INVALID_LOG_INDEX; if (buf.IsValid() == false) { return idx; } bool bRC = mLog.AddElement( buf, idx ); if (bRC == false) { idx = INVALID_LOG_INDEX; } return idx; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Return the protocol buffer at the given index from the log PARAMETERS: idx [ I ] - Index of protocol buffer to obtain RETURN VALUE: sProtocolBuffer - Protocol buffer ===========================================================================*/ sProtocolBuffer cProtocolLog::GetBuffer( ULONG idx ) const { sProtocolBuffer buf; mLog.GetElement( idx, buf ); return buf; } /*=========================================================================== METHOD: GetSignalEvent (Public Method) DESCRIPTION: Return the underlying signal event, which will be set when the log is updated. RETURN VALUE: cEvent - Signal event ===========================================================================*/ cEvent & cProtocolLog::GetSignalEvent() const { return mLog.GetSignalEvent(); } /*=========================================================================== METHOD: GetCount (Public Method) DESCRIPTION: Return the total number of buffers added to the log RETURN VALUE: ULONG ===========================================================================*/ ULONG cProtocolLog::GetCount() const { return mLog.GetTotalCount(); } /*=========================================================================== METHOD: Clear (Public Method) DESCRIPTION: Clear the log RETURN VALUE: None ===========================================================================*/ void cProtocolLog::Clear() { mLog.EmptyQueue(); } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolLog.h000077500000000000000000000070261455567757300232520ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class declaration PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "SyncQueue.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const ULONG INVALID_LOG_INDEX = ULONG_MAX; /*=========================================================================*/ // Class cProtocolLog /*=========================================================================*/ class cProtocolLog { public: // Constructor cProtocolLog( ULONG maxBuffers ); // Destructor virtual ~cProtocolLog(); // Add an protocol buffer to the end of the log virtual ULONG AddBuffer( sProtocolBuffer & buf ); // Return the protocol buffer at the given index from the log virtual sProtocolBuffer GetBuffer( ULONG idx ) const; // Return the underlying signal event virtual cEvent & GetSignalEvent() const; // Return the total number of buffers added to the log virtual ULONG GetCount() const; // Clear the log virtual void Clear(); protected: /* The underlying 'log' */ cSyncQueue mLog; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolNotification.cpp000077500000000000000000000132341455567757300255100ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.cpp DESCRIPTION: Implementation of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolNotification.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cProtocolQueueNotification Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Constructor PARAMETERS: pSQ [ I ] - Sync queue to utilize RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( cSyncQueue * pSQ ) : mpSQ( pSQ ) { // Nothing to do } /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Copy constructor PARAMETERS: notifier [ I ] - Notifier to base the new one on RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( const cProtocolQueueNotification & notifier ) : mpSQ( notifier.mpSQ ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolQueueNotification (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::~cProtocolQueueNotification() { mpSQ = 0; } /*=========================================================================== METHOD: Clone (Public Method) DESCRIPTION: Return an allocated copy of this object downcasted to our base class RETURN VALUE: cProtocolNotification * : Cloned object (0 on error) ===========================================================================*/ cProtocolNotification * cProtocolQueueNotification::Clone() const { cProtocolQueueNotification * pCopy = 0; try { pCopy = new cProtocolQueueNotification( *this ); } catch (...) { // Simply return 0 } return ((cProtocolNotification *)pCopy); } /*=========================================================================== METHOD: Notify (Public Method) DESCRIPTION: Notify view of a protocol event by adding notification structure to the underlying sync queue (which will provide the notification by signalling an event) PARAMETERS: eventType [ I ] - Protocol event type param1 [ I ] - Event type specific argument (see header description) param2 [ I ] - Event type specific argument (see header description) RETURN VALUE: None ===========================================================================*/ void cProtocolQueueNotification::Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const { sProtocolNotificationEvent evt( eventType, param1, param2 ); if (evt.IsValid() == true && mpSQ != 0 && mpSQ->IsValid() == true) { sProtocolNotificationEvent elem( eventType, param1, param2 ); mpSQ->AddElement( elem ); } } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolNotification.h000077500000000000000000000174311455567757300251600ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.h DESCRIPTION: Declaration of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SyncQueue.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- enum eProtocolEventType { ePROTOCOL_EVT_BEGIN = -1, ePROTOCOL_EVT_REQ_ERR, // There was an error sending the request ePROTOCOL_EVT_REQ_SENT, // The request has been sent ePROTOCOL_EVT_RSP_ERR, // There was an error receiving the response ePROTOCOL_EVT_RSP_RECV, // The response has been received ePROTOCOL_EVT_AUX_TU_SENT, // Auxiliary data transmission unit sent ePROTOCOL_EVT_END }; // NOTE: The arguments for each event are currently as follows: // // ePROTOCOL_EVT_REQ_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_REQ_SENT // param1: Request ID // param2: Index of request buffer in associated protocol log // ePROTOCOL_EVT_RSP_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_RSP_RECV // param1: Request ID // param2: Index of response buffer in associated protocol log // // ePROTOCOL_EVT_AUX_TU_SENT // param1: Request ID // param2: Size of transmission unit // NOTE: To handle protoocl events using the Windows notifier add the following // prototype to your Window class header file: // // afx_msg LRESULT OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ); // // Then add an entry to the message map in your Window class source file: // // BEGIN_MESSAGE_MAP( CView, CChildView ) // ON_MESSAGE( PROTOCOL_WM_BASE + (ULONG)ePROTOCOL_EVT_XXX, OnProtocolEvent ) // END_MESSAGE_MAP() // // Finally write the handler itself: // // LRESULT CView::OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ) // { // Do something // return 0; // } /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolEventType validity check PARAMETERS: evtType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolEventType evtType ) { bool bRC = false; if (evtType > ePROTOCOL_EVT_BEGIN && evtType < ePROTOCOL_EVT_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Struct sProtocolNotificationEvent /*=========================================================================*/ struct sProtocolNotificationEvent { public: // (Inline) Default constructor (results in invalid object) sProtocolNotificationEvent() : mEventType( ePROTOCOL_EVT_BEGIN ), mParam1( 0 ), mParam2( 0 ) { // Nothing to do }; // (Inline) Parameter constructor sProtocolNotificationEvent( eProtocolEventType eventType, DWORD param1, DWORD param2 ) : mEventType( eventType ), mParam1( param1 ), mParam2( param2 ) { // Nothing to do }; // (Inline) Is this object valid? bool IsValid() { return ::IsValid( mEventType ); } /* Event type */ eProtocolEventType mEventType; /* First parameter (see above) */ DWORD mParam1; /* Second parameter (see above) */ DWORD mParam2; }; /*=========================================================================*/ // Class cProtocolNotification // // This abstract base class provides notification of protocol server // events sent from the protocol server to protocol server clients /*=========================================================================*/ class cProtocolNotification { public: // Return an allocated copy of this object virtual cProtocolNotification * Clone() const = 0; // Notify view of a protocol event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const = 0; }; /*=========================================================================*/ // Class cProtocolQueueNotification // // This class provides notification via a cSyncQueue object // populated with sProtocolNotificationEvent objects /*=========================================================================*/ class cProtocolQueueNotification : public cProtocolNotification { public: // Constructor cProtocolQueueNotification( cSyncQueue * pSQ ); // Copy constructor cProtocolQueueNotification( const cProtocolQueueNotification & notifier ); // Destructor virtual ~cProtocolQueueNotification(); // Return a copy of this object virtual cProtocolNotification * Clone() const; // Notify view of a MIS event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const; protected: /* Event notification queue */ mutable cSyncQueue * mpSQ; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolRequest.cpp000077500000000000000000000177471455567757300245270ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.cpp DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolRequest.h" #include "ProtocolNotification.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout const ULONG DEFAULT_REQ_TIMEOUT = 1000; // Minimum and maximum allowable timeout values (in milliseconds) const ULONG MIN_REQ_TIMEOUT = 100; const ULONG MAX_REQ_TIMEOUT = 300000; // Minimum number of attempts a request can be scheduled for const ULONG MIN_REQ_ATTEMPTS = 1; // Value to indicate that a request is to be sent out indefinately const ULONG INFINITE_REQS = 0xFFFFFFFF; // Minimum/default amount of time between repeated requests (in milliseconds) const ULONG MIN_REQ_FREQUENCY = 10; const ULONG DEFAULT_REQ_FREQUENCY = 100; /*=========================================================================*/ // sProtocolRequest Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) schedule [ I ] - When (from now, in milliseconds) to send the first request, this isn't a hard value as the request is only guaranteed to go out after this time elapses timeout [ I ] - Milliseconds to wait for a response to an individual request before declaring a timeout. Regardless of what is passed in the timeout value used will be between MIN/MAX_REQ_TIMEOUT requests [ I ] - Number of request attempts to make, this isn't a retry count rather this value is used to specify repeating requests. Regardless of what is passed in the requests value used will be at least MIN_REQ_ATTEMPTS frequency [ I ] - If the 'requests' value is greater than the MIN_REQ_ATTEMPTS than this represents the amount of time to wait between requests (from the completion of the last request attempt, in milliseconds), again this isn't a hard value. Regardless of what is passed in the frequency value used will be at least MIN_REQ_FREQUENCY pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule, ULONG timeout, ULONG requests, ULONG frequency, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( schedule ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( 0 ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Constrain requested timeout to allowable range if (timeout < MIN_REQ_TIMEOUT) { timeout = MIN_REQ_TIMEOUT; } if (timeout > MAX_REQ_TIMEOUT) { timeout = MAX_REQ_TIMEOUT; } mTimeout = timeout; // Constrain request attempts if (requests >= MIN_REQ_ATTEMPTS) { mRequests = requests; } // Constrain frequency if (frequency >= MIN_REQ_FREQUENCY) { mFrequency = frequency; } // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor (notification with defaults) PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( 0 ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( pNotifier ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Copy constructor PARAMETERS: req [ I ] - Request to copy RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( const sProtocolRequest & req ) : sProtocolBuffer( req ), mSchedule( req.mSchedule ), mTimeout( req.mTimeout ), mRequests( req.mRequests ), mFrequency( req.mFrequency ), mpNotifier( 0 ), mpAuxData( req.mpAuxData ), mAuxDataSize( req.mAuxDataSize ), mbTXOnly( req.mbTXOnly ) { // Clone notifier? if (req.mpNotifier != 0) { mpNotifier = req.mpNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: ~sProtocolRequest DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolRequest::~sProtocolRequest() { // Delete cloned notifier? if (mpNotifier != 0) { delete mpNotifier; mpNotifier = 0; } } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolRequest.h000077500000000000000000000146261455567757300241650ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.h DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing protocol requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolNotification; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout extern const ULONG DEFAULT_REQ_TIMEOUT; // Minimum and maximum allowable timeout values (in milliseconds) extern const ULONG MIN_REQ_TIMEOUT; extern const ULONG MAX_REQ_TIMEOUT; // Minimum number of attempts a request can be scheduled for extern const ULONG MIN_REQ_ATTEMPTS; // Value to indicate that a request is to be sent out indefinately extern const ULONG INFINITE_REQS; // Minimum/default amount of time between repeated requests (in milliseconds) extern const ULONG MIN_REQ_FREQUENCY; extern const ULONG DEFAULT_REQ_FREQUENCY; /*=========================================================================*/ // Struct sProtocolRequest // // Structure to represent a generic request packet, including all the // information needed to schedule the request, send the request, and // (optionally) reschedule the request for another TX/RX attempt // // The default parameters schedule an immediate request (indicated by // passing in '0' for the schedule parameter) to be sent once with // the default timeout value /*=========================================================================*/ struct sProtocolRequest : public sProtocolBuffer { public: // Parameterized constructor sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule = 0, ULONG timeout = DEFAULT_REQ_TIMEOUT, ULONG requests = MIN_REQ_ATTEMPTS, ULONG frequency = DEFAULT_REQ_FREQUENCY, cProtocolNotification * pNotifier = 0 ); // Parameterized constructor (notification with defaults) sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ); // Copy constructor sProtocolRequest( const sProtocolRequest & req ); // Destructor virtual ~sProtocolRequest(); // (Inline) Get schedule value (value is in milliseconds) ULONG GetSchedule() const { return mSchedule; }; // (Inline) Get timeout value ULONG GetTimeout() const { return mTimeout; }; // (Inline) Get requests value ULONG GetRequests() const { return mRequests; }; // (Inline) Get frequency value (value is in milliseconds) ULONG GetFrequency() const { return mFrequency; }; const cProtocolNotification * GetNotifier() const { return mpNotifier; }; // (Inline) Set auxiliary data void SetAuxiliaryData( const BYTE * pData, ULONG dataSz ) { mpAuxData = pData; mAuxDataSize = dataSz; }; // (Inline) Get auxiliary data const BYTE * GetAuxiliaryData( ULONG & dataSz ) const { dataSz = mAuxDataSize; return mpAuxData; }; // (Inline) Set TX only flag void SetTXOnly() { mbTXOnly = true; }; // (Inline) Get TX only flag bool IsTXOnly() const { return mbTXOnly; }; protected: /* Schedule (approximately when to send the initial request) */ ULONG mSchedule; /* Timeout value for receiving a response */ ULONG mTimeout; /* Number of requests to schedule (must be at least one) */ ULONG mRequests; /* Frequency (approximately how long to wait before next request) */ ULONG mFrequency; /* Notification object */ cProtocolNotification * mpNotifier; /* Auxiliary data */ const BYTE * mpAuxData; /* Auxilary data size */ ULONG mAuxDataSize; /* TX only (i.e. do not wait for a response) ? */ bool mbTXOnly; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolServer.cpp000077500000000000000000001343501455567757300243330ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.cpp DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolServer.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID const ULONG INVALID_REQUEST_ID = 0; // Default activity timeout value const ULONG DEFAULT_WAIT = 100; // MTU (Maximum Transmission Unit) for auxiliary data (QC USB imposed) const ULONG MAX_AUX_MTU_SIZE = 1024 * 256; // USB's MaxPacketSize const ULONG MAX_PACKET_SIZE = 512; // Maximum amount of time to wait on external access synchronization object #ifdef DEBUG // For the sake of debugging do not be so quick to assume failure const ULONG DEADLOCK_TIME = 180000; #else const ULONG DEADLOCK_TIME = 10000; #endif // Maximum amount of time to wait for the protocol server to process a command const ULONG COMMAND_TIME = DEADLOCK_TIME; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ScheduleThread (Free Method) DESCRIPTION: Watch schedule for event to process or timeout PARAMETERS: pArg [ I ] - The protocol server object RETURN VALUE: void * - thread exit value (always NULL) ===========================================================================*/ void * ScheduleThread( PVOID pArg ) { // Do we have a server? cProtocolServer * pServer = (cProtocolServer *)pArg; if (pServer == 0) { TRACE( "ScheduleThread started with empty pArg." " Unable to locate cProtocolServer\n" ); ASSERT( 0 ); return NULL; } TRACE( "Schedule thread [%lu] started\n", pthread_self() ); // Default wait event timespec toTime = TimeIn( DEFAULT_WAIT ); // Return value checking int nRet; while (pServer->mbExiting == false) { DWORD nTemp; nRet = pServer->mThreadScheduleEvent.Wait( TimeFromNow( toTime ), nTemp ); if (nRet != 0 && nRet != ETIME) { // Error condition TRACE( "ScheduleThread [%lu] ScheduleThread wait error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Time to exit? if (pServer->mbExiting == true) { break; } // Get Schedule Mutex (non-blocking) nRet = pthread_mutex_trylock( &pServer->mScheduleMutex ); if (nRet == EBUSY) { // Not an error, we're just too slow // Someone else got to the ScheduleMutex before us // We'll wait for the signal again toTime = TimeIn( DEFAULT_WAIT ); TRACE( "ScheduleThread [%lu] unable to lock ScheduleMutex\n", pthread_self() ); continue; } else if (nRet != 0) { // Error condition TRACE( "ScheduleThread [%lu] mScheduleMutex error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Verify time. In the rare event it does move backward // it would simply place all our schedule items as due now pServer->CheckSystemTime(); // Default next wait period toTime = TimeIn( DEFAULT_WAIT ); timespec curTime = TimeIn( 0 ); if (pServer->mpActiveRequest != 0) { if (pServer->mpActiveRequest->mbWaitingForResponse == true) { // Waiting on a response, this takes priority over the next // scheduled event // Has timeout expired? if (pServer->mActiveRequestTimeout <= curTime) { // Response timeout // Note: This may clear mpActiveRequest pServer->RxTimeout(); } else { // Active response timer is not yet due to expire // Default timeout again, or this response's timeout? if (pServer->mActiveRequestTimeout <= toTime) { toTime = pServer->mActiveRequestTimeout; } } } else { // This should never happen TRACE( "ScheduleThread() Sequencing error: " "Active request %lu is not waiting for response ???\n", pServer->mpActiveRequest->mID ); break; } } if (pServer->mpActiveRequest == 0 && pServer->mRequestSchedule.size() > 0) { // No response timer active, ready to start the next // scheduled item if due timespec scheduledItem = pServer->GetNextRequestTime(); // Is item due to be scheduled? if (scheduledItem <= curTime) { // Process scheduled item pServer->ProcessRequest(); } else { // Scheduled item is not yet due to be processed // Default timeout again, or this item's start time? if (scheduledItem <= toTime) { toTime = scheduledItem; } } } /*TRACE( "Updated timer at %llu waiting %lu\n", GetTickCount(), TimeFromNow( toTime ) ); */ // Unlock schedule mutex nRet = pthread_mutex_unlock( &pServer->mScheduleMutex ); if (nRet != 0) { TRACE( "ScheduleThread Unable to unlock schedule mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } TRACE( "Schedule thread [%lu] exited\n", pthread_self() ); return NULL; } /*=========================================================================== METHOD: TimeIn (Free Method) DESCRIPTION: Fill timespec with the time it will be in specified milliseconds Relative time to Absolute time PARAMETERS: millis [ I ] - Milliseconds from current time RETURN VALUE: timespec - resulting time (from epoc) NOTE: tv_sec of 0 is an error ===========================================================================*/ timespec TimeIn( ULONG millis ) { timespec outTime; int nRC = clock_gettime( CLOCK_REALTIME, &outTime ); if (nRC == 0) { // Add avoiding an overflow on (long)nsec outTime.tv_sec += millis / 1000l; outTime.tv_nsec += ( millis % 1000l ) * 1000000l; // Check if we need to carry if (outTime.tv_nsec >= 1000000000l) { outTime.tv_sec += outTime.tv_nsec / 1000000000l; outTime.tv_nsec = outTime.tv_nsec % 1000000000l; } } else { outTime.tv_sec = 0; outTime.tv_nsec = 0; } return outTime; } /*=========================================================================== METHOD: TimeFromNow (Free Method) DESCRIPTION: Find the milliseconds from current time this timespec will occur Absolute time to Relative time PARAMETERS: time [ I ] - Absolute time RETURN VALUE: Milliseconds in which absolute time will occur 0 if time has passed or error has occured ===========================================================================*/ ULONG TimeFromNow( timespec time ) { // Assume failure ULONG nOutTime = 0; timespec now; int nRC = clock_gettime( CLOCK_REALTIME, &now ); if (nRC == -1) { TRACE( "Error %d with gettime, %s\n", errno, strerror( errno ) ); return nOutTime; } if (time <= now) { return nOutTime; } nOutTime = (time.tv_sec - now.tv_sec) * 1000l; nOutTime += (time.tv_nsec - now.tv_nsec) / 1000000l; return nOutTime; } /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime = TimeIn( 0 ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================*/ // cProtocolServerRxCallback Methods /*=========================================================================*/ /*=========================================================================== METHOD: IOComplete (Free Method) DESCRIPTION: The I/O has been completed, process the results PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Bytes received during operation RETURN VALUE: None ===========================================================================*/ void cProtocolServerRxCallback::IOComplete( DWORD status, DWORD bytesReceived ) { if (mpServer != 0) { mpServer->RxComplete( status, bytesReceived ); } } /*=========================================================================*/ // cProtocolServer::sProtocolReqRsp Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Constructor PARAMETERS: requestInfo [ I ] - Underlying request object requestID [ I ] - Request ID auxDataMTU [ I ] - MTU (Maximum Transmission Unit) for auxiliary data RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ) : mRequest( requestInfo ), mID( requestID ), mAttempts( 0 ), mEncodedSize( requestInfo.GetSize() ), mRequiredAuxTxs( 0 ), mCurrentAuxTx( 0 ), mbWaitingForResponse( false ) { ULONG auxDataSz = 0; const BYTE * pAuxData = requestInfo.GetAuxiliaryData( auxDataSz ); // Compute the number of required auxiliary data transmissions? if (auxDataMTU > 0 && pAuxData != 0 && auxDataSz > 0) { mRequiredAuxTxs = 1; if (auxDataSz > auxDataMTU) { mRequiredAuxTxs = auxDataSz / auxDataMTU; if ((auxDataSz % auxDataMTU) != 0) { mRequiredAuxTxs++; } } } } /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Copy constructor PARAMETERS: reqRsp [ I ] - Object being copied RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolReqRsp & reqRsp ) : mRequest( reqRsp.mRequest ), mID( reqRsp.mID ), mAttempts( reqRsp.mAttempts ), mEncodedSize( reqRsp.mEncodedSize ), mRequiredAuxTxs( reqRsp.mRequiredAuxTxs ), mCurrentAuxTx( reqRsp.mCurrentAuxTx ), mbWaitingForResponse( reqRsp.mbWaitingForResponse ) { // Nothing to do }; /*=========================================================================*/ // cProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : mpConnection( 0 ), mConnectionType( eConnectionType_Begin ), mRxCallback(), mScheduleThreadID( 0 ), mThreadScheduleEvent(), mbExiting( false ), mpServerControl( 0 ), mLastRequestID( 1 ), mpActiveRequest( 0 ), mpRxBuffer( 0 ), mRxBufferSize( bufferSzRx ), mRxType( rxType ), mTxType( txType ), mLog( logSz ) { mLastTime = TimeIn( 0 ); // Allocate receive buffer? if (mRxBufferSize > 0) { mpRxBuffer = new BYTE[mRxBufferSize]; } // Before continuing verify receive buffer was allocated if (mpRxBuffer != 0) { // Schedule mutex int nRet = pthread_mutex_init( &mScheduleMutex, NULL ); if (nRet != 0) { TRACE( "Unable to init schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } } } /*=========================================================================== METHOD: ~cProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::~cProtocolServer() { // This should have already been called, but ... Exit(); // Schedule mutex int nRet = pthread_mutex_destroy( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to destroy schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); } // Free receive buffer if (mpRxBuffer != 0) { delete [] mpRxBuffer; mpRxBuffer = 0; } } /*=========================================================================== METHOD: HandleRemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request Note: if a request is being processed, it cannot be inturrupted PARAMETERS: reqID [ I ] - Server assigned request ID SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::HandleRemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Find and erase request from request map std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); if (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } mRequestMap.erase( pReqIter ); // Success! bRC = true; // Find and erase request from schedule bool bFound = false; int entryIndex = -1; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { entryIndex++; tSchedule entry = *pScheduleIter; if (entry.second == reqID) { bFound = true; mRequestSchedule.erase( pScheduleIter ); break; } else { pScheduleIter++; } } // Note: schedule will be updated when mutex is unlocked/signaled } else if (mpActiveRequest != 0 && mpActiveRequest->mID == reqID) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Cancel the response timer (when active) if (mpActiveRequest->mbWaitingForResponse == true) { // Schedule will be updated when mutex is unlocked // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)reqID, ECANCELED ); } } else { // This is the active request, cancel the underlying transmit // Note: Because ProcessRequest and RemoveRequest are both muxed // with ScheduleMutex, it is impossible to for the write // to actually be in progress when this code is reached. if (mpConnection != 0) { mpConnection->CancelTx(); } // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, ECANCELED ); } } // Now delete the request delete mpActiveRequest; mpActiveRequest = 0; // Success! bRC = true; } else { TRACE( "cProtocolServer::RemoveRequest( %lu )," " invalid request ID\n", reqID ); } return bRC; } /*=========================================================================== METHOD: ScheduleRequest (Internal Method) DESCRIPTION: Schedule a request for transmission PARAMETERS: reqID [ I ] - ID of the request being scheduled this ID must exist in the internal request/schedule maps schedule [ I ] - Value in milliseconds that indicates the approximate time from now that the request is to be sent out, the actual time that the request is sent will be greater than or equal to this value dependant on requests scheduled before the request in question and standard server processing time SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ScheduleRequest( ULONG reqID, ULONG schedule ) { // Assume failure bool bRC = false; // Schedule adjust is in milliseconds timespec schTimer = TimeIn( schedule ); // Create the schedule entry tSchedule newEntry( schTimer, reqID ); // Fit this request into the schedule (ordered by scheduled time) mRequestSchedule.insert( newEntry ); // Note: timer will be updated when mScheduleMutex is unlocked return bRC; } /*=========================================================================== METHOD: RescheduleActiveRequest (Internal Method) DESCRIPTION: Reschedule (or cleanup) the active request SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RescheduleActiveRequest() { // Are there more attempts to be made? if (mpActiveRequest->mAttempts < mpActiveRequest->mRequest.GetRequests()) { // Yes, first reset the request mpActiveRequest->Reset(); // Now add it back to the request map mRequestMap[mpActiveRequest->mID] = mpActiveRequest; TRACE( "RescheduleActiveRequest(): req %lu rescheduled\n", mpActiveRequest->mID ); // Lastly reschedule the request ScheduleRequest( mpActiveRequest->mID, mpActiveRequest->mRequest.GetFrequency() ); } else { TRACE( "RescheduleActiveRequest(): req %lu removed\n", mpActiveRequest->mID ); // No, we are through with this request delete mpActiveRequest; } // There is no longer an active request mpActiveRequest = 0; } /*=========================================================================== METHOD: ProcessRequest (Internal Method) DESCRIPTION: Process a single outgoing protocol request, this consists of removing the request ID from the head of the schedule, looking up the internal request object in the request map, sending out the request, and setting up the response timer (if a response is required) SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: ===========================================================================*/ void cProtocolServer::ProcessRequest() { // Is there already an active request? if (mpActiveRequest != 0 || mpConnection == 0) { return; } // Grab request ID from the schedule std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); // Did we find the request? if (pScheduleIter == mRequestSchedule.end()) { // No return; } // Yes, grab the request ID ULONG reqID = pScheduleIter->second; // Remove from schedule mRequestSchedule.erase( pScheduleIter ); // Look up the internal request object std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); // Request not found around? if (pReqIter == mRequestMap.end() || pReqIter->second == 0) { // No return; } // Set this request as the active request mpActiveRequest = pReqIter->second; TRACE( "ProcessRequest(): req %lu started\n", mpActiveRequest->mID ); // Remove request from pending request map mRequestMap.erase( pReqIter ); // Extract the underlying request const sProtocolRequest & req = mpActiveRequest->mRequest; // Increment attempt count? if (req.GetRequests() != INFINITE_REQS) { // This request isn't an indefinite one, so keep track of each attempt mpActiveRequest->mAttempts++; } bool bTxSuccess = false; // Encode data for transmission? bool bEncoded = false; sSharedBuffer * pEncoded = 0; pEncoded = EncodeTxData( req.GetSharedBuffer(), bEncoded ); if (bEncoded == false) { // Note: no longer asynchronus // Send the request data bTxSuccess = mpConnection->TxData( req.GetBuffer(), req.GetSize() ); } else if (bEncoded == true) { if (pEncoded != 0 && pEncoded->IsValid() == true) { // Note: no longer asynchronus // Send the request data mpActiveRequest->mEncodedSize = pEncoded->GetSize(); bTxSuccess = mpConnection->TxData( pEncoded->GetBuffer(), pEncoded->GetSize() ); } } if (bTxSuccess == true) { TRACE( "ProcessRequest(): req %lu finished\n", mpActiveRequest->mID ); TxComplete(); } else { TxError(); TRACE( "ProcessRequest(): req finished with a TxError\n" ); } return; } /*=========================================================================== METHOD: CheckSystemTime (Internal Method) DESCRIPTION: Check that system time hasn't moved backwards. Since we use the system time for scheduling requests we need to periodically check that the user (or system itself) hasn't reset system time backwards, if it has then we reschedule everything to the current system time. This disrupts the schedule but avoids stranding requests Updates mLastTime SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool: System time moved backwards? ===========================================================================*/ bool cProtocolServer::CheckSystemTime() { // Assume that time is still marching forward bool bAdjust = false; timespec curTime = TimeIn( 0 ); if (curTime < mLastTime) { // Looks like the system clock has been adjusted to an earlier // value, go through the current schedule and adjust each timer // to reflect the adjustment. This isn't an exact approach but // it prevents requests from being stranded which is our goal // Note: set iterators are constant. This means we need to // create a set with the new data, we can't modify this one std::set < tSchedule, std::less > tempSchedule; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { tSchedule entry = *pScheduleIter; entry.first.tv_sec = curTime.tv_sec; entry.first.tv_nsec = curTime.tv_nsec; tempSchedule.insert( entry ); pScheduleIter++; } mRequestSchedule = tempSchedule; // Update mActiveRequestTimeout if ( (mpActiveRequest != 0) && (mpActiveRequest->mbWaitingForResponse == true) ) { // Restart active request's timeout ULONG mTimeout = mpActiveRequest->mRequest.GetTimeout(); mActiveRequestTimeout = TimeIn( mTimeout ); } TRACE( "Time has moved backwards, schedule updated\n" ); // Indicate the change bAdjust = true; } mLastTime.tv_sec = curTime.tv_sec; mLastTime.tv_nsec = curTime.tv_nsec; return bAdjust; } /*=========================================================================== METHOD: RxComplete (Internal Method) DESCRIPTION: Handle completion of receive data operation PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Number of bytes received SEQUENCING: This method is sequenced according to the schedule mutex i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxComplete( DWORD status, DWORD bytesReceived ) { if (status != NO_ERROR) { TRACE( "cProtocolServer::RxComplete() = %lu\n", status ); } if (mpConnection == 0) { TRACE( "cProtocolServer::RxComplete() - Not initialized\n" ); return; } // Error with the read if (status != NO_ERROR || bytesReceived == 0) { // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); return; } // Get Schedule Mutex if (GetScheduleMutex() == false) { TRACE( "RxComplete(), unable to get schedule Mutex\n" ); return; } TRACE( "RxComplete() - Entry at %llu\n", GetTickCount() ); // Decode data bool bAbortTx = false; ULONG rspIdx = INVALID_LOG_INDEX; bool bRsp = DecodeRxData( bytesReceived, rspIdx, bAbortTx ); // Is there an active request that needs to be aborted if (mpActiveRequest != 0 && bAbortTx == true) { // Yes, terminate the transmission and handle the error mpConnection->CancelTx(); TxError(); } // Is there an active request and a valid response? else if (mpActiveRequest != 0 && bRsp == true) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client that response was received if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_RECV, (DWORD)mpActiveRequest->mID, (DWORD)rspIdx ); } // Reschedule request as needed RescheduleActiveRequest(); } // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); TRACE( "RxComplete() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return; } return; } /*=========================================================================== METHOD: RxTimeout (Internal Method) DESCRIPTION: Handle the response timer expiring SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxTimeout() { // No active request? if (mpActiveRequest == 0) { TRACE( "RxTimeout() with no active request\n" ); ASSERT( 0 ); } TRACE( "RxTimeout() for req %lu\n", mpActiveRequest->mID ); const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)mpActiveRequest->mID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: TxComplete (Internal Method) DESCRIPTION: Handle completion of transmit data operation PARAMETERS: SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxComplete() { // No active request? if (mpActiveRequest == 0 || mpConnection == 0) { TRACE( "TxComplete() called with no active request\n" ); ASSERT( 0 ); } TRACE( "TxComplete() req %lu started\n", mpActiveRequest->mID ); ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client of auxiliary data being sent? if (mpActiveRequest->mRequiredAuxTxs && mpActiveRequest->mCurrentAuxTx) { pNotifier->Notify( ePROTOCOL_EVT_AUX_TU_SENT, (DWORD)reqID, (DWORD)mpActiveRequest->mEncodedSize ); } // Check for more auxiliary data to transmit if (mpActiveRequest->mCurrentAuxTx < mpActiveRequest->mRequiredAuxTxs) { ULONG auxDataSz = 0; const BYTE * pAuxData = req.GetAuxiliaryData( auxDataSz ); if (auxDataSz > 0 && pAuxData != 0) { bool bRC = false; // Adjust for current MTU pAuxData += (mpActiveRequest->mCurrentAuxTx * MAX_AUX_MTU_SIZE); mpActiveRequest->mCurrentAuxTx++; // Last MTU? if (mpActiveRequest->mCurrentAuxTx == mpActiveRequest->mRequiredAuxTxs) { // More than one MTU? if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = (auxDataSz % MAX_AUX_MTU_SIZE); if (auxDataSz == 0) { auxDataSz = MAX_AUX_MTU_SIZE; } } if (auxDataSz % MAX_PACKET_SIZE == 0) { // If last write of unframed write request is divisible // by 512, break off last byte and send seperatly. TRACE( "TxComplete() Special case, break off last byte\n" ); bRC = mpConnection->TxData( pAuxData, auxDataSz - 1 ); if (bRC == true) { bRC = mpConnection->TxData( pAuxData + auxDataSz -1, 1 ); } } else { bRC = mpConnection->TxData( pAuxData, auxDataSz ); } } else if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = MAX_AUX_MTU_SIZE; bRC = mpConnection->TxData( pAuxData, auxDataSz ); } if (bRC == true) { mpActiveRequest->mEncodedSize = auxDataSz; TxComplete(); } else { TxError(); } return; } } // Another successful transmission, add the buffer to the log ULONG reqIdx = INVALID_LOG_INDEX; sProtocolBuffer pb( req.GetSharedBuffer() ); reqIdx = mLog.AddBuffer( pb ); // Notify client? if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_SENT, (DWORD)reqID, (DWORD)reqIdx ); } // Wait for a response? if (mpActiveRequest->mRequest.IsTXOnly() == false) { // We now await the response mpActiveRequest->mbWaitingForResponse = true; mActiveRequestTimeout = TimeIn( mpActiveRequest->mRequest.GetTimeout() ); } else { // Reschedule request as needed RescheduleActiveRequest(); } } /*=========================================================================== METHOD: TxError (Internal Method) DESCRIPTION: Handle transmit data operation error be either rescheduling the request or cleaning it up SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxError() { // No active request? if (mpActiveRequest == 0) { return; } ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the protocol server by starting up the schedule thread SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Initialize() { // Assume failure bool bRC = false; mbExiting = false; // Get mScheduleMutex if (GetScheduleMutex() == true) { if (mScheduleThreadID == 0) { // Yes, start thread int nRet = pthread_create( &mScheduleThreadID, NULL, ScheduleThread, this ); if (nRet == 0) { // Success! bRC = true; } } } else { TRACE( "cProtocolServer::Initialize(), unable to aquire ScheduleMutex\n" ); return false; } // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit the protocol server by exiting the schedule thread (if necessary) SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Exit() { // Assume failure bool bRC = false; if (mScheduleThreadID != 0) { if (GetScheduleMutex() == false) { // This should never happen return false; } // Check that mScheduleTheadID is still not 0 if (mScheduleThreadID == 0) { printf( "mScheduleThreadID was zero!!!\n" ); ReleaseScheduleMutex( false ); return false; } // Set exit event mbExiting = true; // Signal a schedule update if (mThreadScheduleEvent.Set( 1 ) != 0) { // This should never happen return false; } TRACE( "Joining ScheduleThread %lu\n", mScheduleThreadID ); // Allow process to continue until it finishes int nRet = pthread_join( mScheduleThreadID, NULL ); if (nRet == ESRCH) { TRACE( "ScheduleThread has exited already\n" ); } else if (nRet != 0) { TRACE( "Unable to join ScheduleThread. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } TRACE( "cProtocolServer::Exit(), completed thread %lu\n", (ULONG)mScheduleThreadID ); bRC = true; // Release "handle" mScheduleThreadID = 0; // Release mutex lock, don't signal ScheduleThread if (ReleaseScheduleMutex( false ) == false) { // This should never happen return false; } } else { // No ScheduleThread bRC = true; } // Free any allocated requests std::map ::iterator pReqIter; pReqIter = mRequestMap.begin(); while (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } pReqIter++; } mRequestMap.clear(); // Free log mLog.Clear(); return bRC; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the given communications port PARAMETERS: pPort [ I ] - String pointer representing the device node to connect to (IE: /dev/qcqmi0) SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Connect( LPCSTR pPort ) { // Assume failure bool bRC = false; if (pPort == 0 || pPort[0] == 0 || mpConnection == 0) { return bRC; } // Connect to device // Set callback mRxCallback.SetServer( this ); // Override to initialize port with protocol specific options bRC = mpConnection->Connect( pPort ); if (bRC == true) { bRC = InitializeComm(); if (bRC == true) { // Setup the initial read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); } } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current communications port SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Disconnect() { // Disconnect if (mpConnection != 0) { // Cancel any outstanding I/O mpConnection->CancelIO(); } // Empty callback mRxCallback.SetServer( 0 ); // Cleanup COM port CleanupComm(); if (mpConnection != 0) { // Now disconnect bool bDis = mpConnection->Disconnect(); delete mpConnection; return bDis; } else { return true; } } /*=========================================================================== METHOD: IsConnected (Public Method) DESCRIPTION: Are we currently connected to a port? SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::IsConnected() { return (mpConnection != 0 && mpConnection->IsConnected()); } /*=========================================================================== METHOD: AddRequest (Public Method) DESCRIPTION: Add an outgoing protocol request to the protocol server request queue PARAMETERS: req [ I ] - Request being added SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: ULONG - ID of scheduled request (INVALID_REQUEST_ID upon error) ===========================================================================*/ ULONG cProtocolServer::AddRequest( const sProtocolRequest & req ) { // Assume failure ULONG reqID = INVALID_REQUEST_ID; // Server not configured for sending requests? if (IsValid( mTxType ) == false) { return reqID; } // Request type not valid for server? if (req.GetType() != mTxType) { return reqID; } // Invalide request? if (ValidateRequest( req ) == false) { return reqID; } // Get mScheduleMutex if (GetScheduleMutex() == true) { TRACE( "AddRequest() - Entry at %llu\n", GetTickCount() ); // Grab next available request ID if (++mLastRequestID == 0) { mLastRequestID++; } reqID = mLastRequestID; while (mRequestMap.find( reqID ) != mRequestMap.end()) { reqID++; } // Wrap in our internal structure sProtocolReqRsp * pReqRsp = 0; pReqRsp = new sProtocolReqRsp( req, reqID, MAX_AUX_MTU_SIZE ); if (pReqRsp != 0) { // Add to request map mRequestMap[reqID] = pReqRsp; // ... and schedule ScheduleRequest( reqID, req.GetSchedule() ); } TRACE( "AddRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return INVALID_REQUEST_ID; } } else { TRACE( "cProtocolServer::AddRequest(), unable to get schedule Mutex\n" ); } return reqID; } /*=========================================================================== METHOD: RemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes Note: If a request is being written, it cannot be inturrupted as both ProcessRequest and RemoveRequest depend on the ScheduleMutex and the write is synchronus. If the request has been written but the read has not been triggered it can be removed. PARAMETERS: reqID [ I ] - ID of request being removed RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::RemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Get Schedule Mutex if (GetScheduleMutex() == true) { TRACE( "RemoveRequest() - Entry at %llu\n", GetTickCount() ); bRC = HandleRemoveRequest( reqID ); TRACE( "RemoveRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } } else { TRACE( "cProtocolServer::RemoveRequest(), unable to get mScheduleMutex\n" ); } return bRC; } /*=========================================================================== METHOD: GetScheduleMutex (Internal Method) DESCRIPTION: Get the schedule mutex. Additionally a check is applied to verify the DEADLOCK_TIME was not exceeded SEQUENCING: This function will block until the mScheduleMutex is aquired PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::GetScheduleMutex() { ULONGLONG nStart = GetTickCount(); //TRACE( "Locking Schedule mutex\n" ); int nRet = pthread_mutex_lock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to lock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } ULONGLONG nEnd = GetTickCount(); if (nEnd - nStart > DEADLOCK_TIME) { TRACE( "Deadlock time exceeded: took %llu ms\n", nEnd - nStart ); ReleaseScheduleMutex( true ); return false; } //TRACE( "Locked ScheduleMutex\n" ); return true; } /*=========================================================================== METHOD: ReleaseScheduleMutex (Internal Method) DESCRIPTION: Release lock on the schedule mutex SEQUENCING: Calling process must have lock PARAMETERS: bSignalThread [ I ] - Signal Schedule thread as well? RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ReleaseScheduleMutex( bool bSignalThread ) { if (bSignalThread == true) { if (mThreadScheduleEvent.Set( 1 ) != 0) { return false; } } int nRet = pthread_mutex_unlock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to unlock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return true; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/ProtocolServer.h000077500000000000000000000263721455567757300240040ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.h DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Connection.h" #include "ProtocolRequest.h" #include "ProtocolLog.h" #include "Event.h" #include #include //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolServer; struct sServerControl; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID extern const ULONG INVALID_REQUEST_ID; // Fill timespec with the time it will be in specified milliseconds // Relative time to Absolute time timespec TimeIn( ULONG millis ); // Find the milliseconds from current time this timespec will occur // Absolute time to Relative time ULONG TimeFromNow( timespec time ); // Provide a number for sequencing reference, similar to the windows function ULONGLONG GetTickCount(); // timespec < comparison method inline bool operator< (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec < second.tv_nsec) ) ); } // timespec <= comparison method inline bool operator<= (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec <= second.tv_nsec) ) ); } /*=========================================================================*/ // Class cProtocolServerRxCallback /*=========================================================================*/ class cProtocolServerRxCallback { public: // (Inline) Constructor cProtocolServerRxCallback() : mpServer( 0 ) { }; // (Inline) Destructor virtual ~cProtocolServerRxCallback() { }; // (Inline) Set server object to pass results to void SetServer( cProtocolServer * pServer ) { mpServer = pServer; }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesReceived ); protected: /* Protocol server to interact with */ cProtocolServer * mpServer; }; /*=========================================================================*/ // Class cProtocolServer /*=========================================================================*/ class cProtocolServer { public: // Constructor cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cProtocolServer(); // Initialize the protocol server bool Initialize(); // Exit the protocol server bool Exit(); // Connect to the given communications port bool Connect( LPCSTR pPort ); // Disconnect from target bool Disconnect(); // Are we currently connected to a port? bool IsConnected(); // Add an outgoing protocol request to the protocol server request queue ULONG AddRequest( const sProtocolRequest & req ); // Remove a previously added protocol request bool RemoveRequest( ULONG reqID ); // (Inline) Return the protocol log const cProtocolLog & GetLog() { return mLog; }; protected: // Internal protocol server request/response structure, used to track // info related to sending out a request struct sProtocolReqRsp { public: // Constructor sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ); // Copy constructor sProtocolReqRsp( const sProtocolReqRsp & reqRsp ); // (Inline) Reset for next transmission attempt void Reset() { mEncodedSize = mRequest.GetSize(); mCurrentAuxTx = 0; mbWaitingForResponse = 0; }; /* Request ID */ ULONG mID; /* Number of times this request has been attempted */ ULONG mAttempts; /* Size of encoded data being transmitted */ ULONG mEncodedSize; /* Number of required auxiliary data transmissions */ ULONG mRequiredAuxTxs; /* Current auxiliary data transmission */ ULONG mCurrentAuxTx; /* Are we currently waiting for a response? */ bool mbWaitingForResponse; /* Underlying protocol request */ sProtocolRequest mRequest; }; // Handle the remove request bool HandleRemoveRequest( ULONG reqID ); // Schedule a request for transmission bool ScheduleRequest( ULONG reqID, ULONG schedule ); // (Inline) Get next request's time from mRequestSchedule timespec GetNextRequestTime() { timespec outTime; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); tSchedule entry = *pScheduleIter; outTime = entry.first; return outTime; } // (Inline) Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ) { return req.IsValid(); }; // Reschedule (or cleanup) the active request void RescheduleActiveRequest(); // Process a single outgoing protocol request void ProcessRequest(); // Check that system time hasn't moved backwards bool CheckSystemTime(); // Perform protocol specific communications port initialization virtual bool InitializeComm() = 0; // Perform protocol specific communications port cleanup virtual bool CleanupComm() = 0; // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) = 0; // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) = 0; // Handle completion of receive data operation void RxComplete( DWORD status, DWORD bytesReceived ); // Handle the response timer expiring void RxTimeout(); // Handle completion of transmit data operation virtual void TxComplete(); // Handle a transmission error void TxError(); /* Underlying communications object */ cConnection * mpConnection; /* Underlying connection type */ enum eConnectionType { eConnectionType_Begin = 0, eConnectionType_RmNet = 1, eConnectionType_SMD = 2, eConnectionType_End } mConnectionType; /* Rx callback */ cProtocolServerRxCallback mRxCallback; /* ID of Schedule thread */ pthread_t mScheduleThreadID; // ScheduleThread signal event cEvent mThreadScheduleEvent; // Schedule mutex // Ensures exclusive access to mRequestSchedule pthread_mutex_t mScheduleMutex; // Is the thread in the process of exiting? // (no new commands will be accepted) bool mbExiting; /* Client/server thread control object */ sSharedBuffer * mpServerControl; /* Protocol request schedule (scheduled time/request ID) */ typedef std::pair tSchedule; std::set < tSchedule, std::less > mRequestSchedule; /* Last system time value (used to check for time changes) */ timespec mLastTime; /* Protocol request map (request ID mapped to internal req/rsp struct) */ std::map mRequestMap; /* Last assigned request ID */ ULONG mLastRequestID; /* Current request being processed */ sProtocolReqRsp * mpActiveRequest; /* Absolute timeout for mpActiveRequest based on when write was completed */ timespec mActiveRequestTimeout; /* Data buffer for incoming data */ BYTE * mpRxBuffer; /* Size of above buffer (i.e. how much data to read in at once) */ ULONG mRxBufferSize; /* Protocol type for incoming/outgoing data*/ eProtocolType mRxType; eProtocolType mTxType; /* Protocol log */ cProtocolLog mLog; // Get a lock on ScheduleMutex bool GetScheduleMutex(); // Release lock on ScheduleMutex // Signal ScheduleThread if desired bool ReleaseScheduleMutex( bool bSignalThread = true ); // Schedule Thread gets full access friend void * ScheduleThread( PVOID pArg ); // Callback objects get full access friend class cProtocolServerRxCallback; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/QMIBuffers.cpp000077500000000000000000000234461455567757300233110ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.cpp DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQMIServiceBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQMIServiceBuffer (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::sQMIServiceBuffer( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQMIServiceBuffer::Validate(); } /*=========================================================================== METHOD: ~sQMIServiceBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::~sQMIServiceBuffer() { // Nothing to do } /*=========================================================================== METHOD: GetResult (Public Method) DESCRIPTION: Return contents of mandatory result content PARAMETERS: returnCode [ I ] - The return code (should be eQMIResultCode) errorCode [ I ] - The error code (should be eQMIErrorCode) RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::GetResult( ULONG & returnCode, ULONG & errorCode ) { if (IsResponse() == false) { return false; } std::map ::const_iterator pIter; pIter = mContents.find( QMI_TLV_ID_RESULT ); if (pIter == mContents.end()) { return false; } const sQMIRawContentHeader * pContent = pIter->second; if (pContent == 0) { ASSERT( 0 ); return false; } if (pContent->mLength != 4) { return false; } const WORD * pData = (const WORD *)(++pContent); returnCode = (ULONG)*pData++; errorCode = (ULONG)*pData; return true; } /*=========================================================================== METHOD: BuildBuffer (Static Public Method) DESCRIPTION: Build a QMI request PARAMETERS: serviceType [ I ] - QMI service type msgID [ I ] - The QMI message request ID bResponse [ I ] - Build a response? bIndication [ I ] - Build an indication? pPayload [ I ] - Payload payloadLen [ I ] - Size of above payload RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQMIServiceBuffer::BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse, bool bIndication, const BYTE * pPayload, ULONG payloadLen ) { const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG totalHdrSz = szTransHdr + szMsgHdr; // Truncate payload? if (payloadLen > (QMI_MAX_BUFFER_SIZE - totalHdrSz)) { payloadLen = QMI_MAX_BUFFER_SIZE - totalHdrSz; } // Make sure length agrees with pointer if (pPayload == 0) { payloadLen = 0; } // Allocate buffer PBYTE pBuffer = new BYTE[payloadLen + totalHdrSz]; if (pBuffer == 0) { return 0; } // Format header sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)&pBuffer[0]; pHdr->mCompound = 0; pHdr->mResponse = 0; pHdr->mIndication = 0; pHdr->mReserved = 0; pHdr->mTransactionID = 1; bool bTX = true; if (bResponse == true) { pHdr->mResponse = 1; bTX = false; } else if (bIndication == true) { pHdr->mIndication = 1; bTX = false; } pHdr++; // Format message header sQMIRawMessageHeader * pMsg = 0; pMsg = (sQMIRawMessageHeader *)pHdr; pMsg->mMessageID = msgID; pMsg->mLength = (WORD)payloadLen; // Copy in payload? if (payloadLen > 0 && pPayload != 0) { memcpy( (LPVOID)&pBuffer[totalHdrSz], (LPCVOID)&pPayload[0], (SIZE_T)payloadLen ); } // Compute total size ULONG sz = payloadLen + totalHdrSz; // Build and return the shared buffer eProtocolType pt = MapQMIServiceToProtocol( serviceType, bTX ); sSharedBuffer * pBuf = new sSharedBuffer( sz, pBuffer, pt ); return pBuf; } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (IsQMIProtocol( pt ) == false) { mbValid = bRC; return bRC; } const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szContentHdr = (ULONG)sizeof(sQMIRawContentHeader); // Must be enough space for both headers ULONG sz = GetSize(); if (sz < szTransHdr + szMsgHdr) { mbValid = bRC; return bRC; } const BYTE * pBuffer = GetBuffer(); // Obtain transaction header const sQMIServiceRawTransactionHeader * pTransHdr = 0; pTransHdr = (const sQMIServiceRawTransactionHeader *)pBuffer; pBuffer += szTransHdr; // This is required to be 0 if (pTransHdr->mCompound != 0) { mbValid = bRC; return bRC; } // These are mutually exclusive if (pTransHdr->mIndication == 1 && pTransHdr->mResponse == 1) { mbValid = bRC; return bRC; } // Requests/responses required valid transaction IDs if ( (pTransHdr->mIndication == 0) && (pTransHdr->mTransactionID == (WORD)INVALID_QMI_TRANSACTION_ID) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 1 || pTransHdr->mIndication == 1) && (IsQMIProtocolRX( pt ) == false) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 0 && pTransHdr->mIndication == 0) && (IsQMIProtocolTX( pt ) == false) ) { mbValid = bRC; return bRC; } // Obtain message header const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (const sQMIRawMessageHeader *)pBuffer; pBuffer += szMsgHdr; // Validate reported length if (sz != ((ULONG)pMsgHdr->mLength + szTransHdr + szMsgHdr)) { mbValid = bRC; return bRC; } // Extract content TLV structures ULONG contentProcessed = 0; ULONG contentSz = (ULONG)pMsgHdr->mLength; while (contentProcessed < contentSz) { const sQMIRawContentHeader * pContent = 0; pContent = (const sQMIRawContentHeader *)pBuffer; ULONG tlvLen = szContentHdr + pContent->mLength; contentProcessed += tlvLen; if (contentProcessed <= contentSz) { mContents[(ULONG)pContent->mTypeID] = pContent; } else { mContents.clear(); mbValid = bRC; return bRC; } pBuffer += tlvLen; } // Validate TLV reported lengths if (contentProcessed != contentSz) { mbValid = bRC; return bRC; } // Success! bRC = true; mbValid = bRC; return mbValid; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/QMIBuffers.h000077500000000000000000000275531455567757300227610ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.h DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMUXHeader sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIEnum.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QMI maximum buffer size (cannot be larger than MAX_SHARED_BUFFER_SIZE) const ULONG QMI_MAX_BUFFER_SIZE = MAX_SHARED_BUFFER_SIZE; // Content ID for mandatory result TLV const ULONG QMI_TLV_ID_RESULT = 2; /*=========================================================================== METHOD: MapQMIServiceToProtocol (Inline Method) DESCRIPTION: Map QMI service type (eQMIService) and direction to a protocol type (eProtocolType) PARAMETERS: serviceType [ I ] - Enum value being mapped bTransmission [ I ] - Is this a transmission (TX vs. RX)? RETURN VALUE: eProtocolType ===========================================================================*/ inline eProtocolType MapQMIServiceToProtocol( eQMIService serviceType, bool bTransmission = true ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid( serviceType ) == false) { return pt; } DWORD tmp = ((DWORD)serviceType * 2) + (DWORD)ePROTOCOL_QMI_CTL_RX; if (bTransmission == true) { tmp++; } if (IsQMIProtocol( (eProtocolType)tmp ) == true) { pt = (eProtocolType)tmp; } return pt; }; /*=========================================================================== METHOD: MapProtocolToQMIService (Inline Method) DESCRIPTION: Map protocol type (eProtocolType) to QMI service type (eQMIService) PARAMETERS: protocolType [ I ] - Enum value being mapped RETURN VALUE: bool ===========================================================================*/ inline eQMIService MapProtocolToQMIService( eProtocolType protocolType ) { eQMIService st = eQMI_SVC_ENUM_BEGIN; if (IsQMIProtocol( protocolType ) == false) { return st; } DWORD tmp = ((DWORD)protocolType - (DWORD)ePROTOCOL_QMI_CTL_RX) / 2; if (IsValid( (eQMIService)tmp ) == true) { st = (eQMIService)tmp; } return st; }; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQMUXHeader // Struct to represent a QMUX transaction header (raw) /*=========================================================================*/ struct sQMUXHeader { public: WORD mLength; BYTE mFlags; BYTE mServiceType; BYTE mClientID; }; /*=========================================================================*/ // Struct sQMIControlRawTransactionHeader // Struct to represent a QMI control transaction header (raw) /*=========================================================================*/ struct sQMIControlRawTransactionHeader { public: BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 6; BYTE mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIServiceRawTransactionHeader // Struct to represent a QMI service transaction header (raw) /*=========================================================================*/ struct sQMIServiceRawTransactionHeader { public: BYTE mCompound : 1; // Is this a compound transaction? BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 5; WORD mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIRawMessageHeader // Struct to represent a QMI (control/service) message header (raw) /*=========================================================================*/ struct sQMIRawMessageHeader { public: WORD mMessageID; // Message ID WORD mLength; // Length of message (not including this header) }; /*=========================================================================*/ // Struct sQMIRawContentHeader // Struct to represent a QMI (control/service) content // (i.e Type/Length/Value, TLV) header (raw) /*=========================================================================*/ struct sQMIRawContentHeader { public: BYTE mTypeID; // Content type ID WORD mLength; // Content length (not including this header) }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQMIServiceBuffer // Struct to represent a QMI service channel request/response/indication // (shared buffer) /*=========================================================================*/ struct sQMIServiceBuffer : public sProtocolBuffer { public: // Constructor sQMIServiceBuffer( sSharedBuffer * pBuffer ); // Destructor virtual ~sQMIServiceBuffer(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bRequest = (pHdr->mResponse == 0 && pHdr->mIndication == 0); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bResponse = (pHdr->mResponse == 1); } return bResponse; }; // (Inline) Is this an indication? bool IsIndication() const { bool bInd = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bInd = (pHdr->mIndication == 1); } return bInd; }; // (Inline) Return raw header const sQMIServiceRawTransactionHeader * GetHeader() const { const sQMIServiceRawTransactionHeader * pHdr = 0; if (IsValid() == true) { pHdr = (const sQMIServiceRawTransactionHeader *)GetBuffer(); } return pHdr; }; // (Inline) Return the message ID ULONG GetMessageID() const { ULONG id = (ULONG)0xffffffff; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; id = pMsgHdr->mMessageID; } return id; }; // (Inline) Return the transaction ID WORD GetTransactionID() const { WORD id = (WORD)INVALID_QMI_TRANSACTION_ID; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { id = pHdr->mTransactionID; } return id; }; // (Inline) Return raw content array const sQMIRawContentHeader * GetRawContents( ULONG & contentLen ) const { // Assume failure ULONG len = 0; const sQMIRawContentHeader * pRaw = 0; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; len = pMsgHdr->mLength; pMsgHdr++; if (len > 0) { pRaw = (const sQMIRawContentHeader *)pMsgHdr; } } contentLen = len; return pRaw; }; // (Inline) Return content structures std::map GetContents() const { return mContents; }; // Return contents of mandatory result content bool GetResult( ULONG & returnCode, ULONG & errorCode ); // Build a QMI request/response/indication static sSharedBuffer * BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse = false, bool bIndication = false, const BYTE * pData = 0, ULONG dataLen = 0 ); protected: // QMI protocol server has to be able to set the transaction ID friend class cQMIProtocolServer; // Set the transaction ID void SetTransactionID( WORD tid ) const { if (tid == (WORD)INVALID_QMI_TRANSACTION_ID || IsValid() == false) { return; } sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)GetHeader(); if (pHdr != 0) { pHdr->mTransactionID = tid; } }; // Is this QMI request/response/indication packet valid? virtual bool Validate(); /* Content TLV structures (indexed by type ID) */ std::map mContents; private: // Prevent 'upcopying' sQMIServiceBuffer( const sProtocolBuffer & ); sQMIServiceBuffer & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/QMIEnum.h000077500000000000000000002223161455567757300222630ustar00rootroot00000000000000/*=========================================================================== FILE: QMIEnum.h DESCRIPTION: QMI protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQMIService eQMIMessageCTL eQMIMessageWDS eQMIMessageDMS eQMIMessageNAS eQMIMessageWMS eQMIMessagePDS eQMIMessageAUTH eQMIMessageAT eQMIMessageVoice eQMIMessageUIM eQMIMessagePBM eQMIMessageSAR eQMIMessageRMTFS eQMIMessageCAT eQMIMessageRMS eQMIMessageOMA eQMIResultCode eQMIErrorCode eQMICallEndReason eIPAddressType eSMSMessageMode Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid QMI transaction ID const ULONG INVALID_QMI_TRANSACTION_ID = 0; // QMI DMS PRL size constants const ULONG QMI_DMS_MAX_PRL_SIZE = 16384; const ULONG QMI_DMS_MAX_PRL_BLOCK = 256; /*=========================================================================*/ // eQMIService Enumeration // QMI Service Type Enumeration /*=========================================================================*/ enum eQMIService { eQMI_SVC_ENUM_BEGIN = -1, eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_RESERVED_13, // 013 Reserved eQMI_SVC_RMTFS, // 014 Remote file system service eQMI_SVC_RESERVED_15, // 015 Reserved eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_RESERVED_18, // 018 Reserved eQMI_SVC_RESERVED_19, // 019 Reserved eQMI_SVC_CSD, // 020 Core sound driver service eQMI_SVC_EFS, // 021 Embedded file system service eQMI_SVC_RESERVED_22, // 022 Reserved eQMI_SVC_TS, // 023 Thermal sensors service eQMI_SVC_TMD, // 024 Thermal mitigation device service eQMI_SVC_RESERVED_25, // 025 Reserved eQMI_SVC_RESERVED_26, // 026 Reserved eQMI_SVC_RESERVED_27, // 027 Reserved eQMI_SVC_RESERVED_28, // 028 Reserved eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service eQMI_SVC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIService validity check PARAMETERS: svc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIService svc ) { bool retVal = false; if ( (svc > eQMI_SVC_ENUM_BEGIN && svc <= eQMI_SVC_RESERVED_28) || (svc >= eQMI_SVC_CAT && svc < eQMI_SVC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCTL Enumeration // QMI Control Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCTL { eQMI_CTL_ENUM_BEGIN = -1, eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode eQMI_CTL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCTL validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCTL msgID ) { bool retVal = false; if (msgID >= eQMI_CTL_SET_INSTANCE_ID && msgID < eQMI_CTL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDS Enumeration // QMI WDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDS { eQMI_WDS_ENUM_BEGIN = -1, eQMI_WDS_RESET, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_SET_INDICATION, // 003 Set indication conditions eQMI_WDS_START_NET = 32, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_AUTOCONNECT = 81, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_TMGI_ACTIVATE, // 101 Activate eMBMS TMGI eQMI_WDS_TMGI_ACT_IND = 101, // 101 eMBMS TMGI activate indication eQMI_WDS_TMGI_DEACTIVATE, // 102 Activate eMBMS TMGI eQMI_WDS_TMGI_DEACT_IND = 102, // 102 eMBMS TMGI activate indication eQMI_WDS_TMGI_LIST_QUERY, // 103 Query for eMBMS TMGI list eQMI_WDS_TMGI_LIST_IND, // 104 eMBMS TMGI list query indication eQMI_WDS_GET_PREF_DATA_SYS, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_GET_CURR_DATA_SYS, // 107 Get current data systems status eQMI_WDS_GET_PDN_THROTTLE, // 108 Get PDN throttle info eQMI_WDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDS msgID ) { bool retVal = false; if ( (msgID > eQMI_WDS_ENUM_BEGIN && msgID <= eQMI_WDS_SET_INDICATION) || (msgID >= eQMI_WDS_START_NET && msgID <= eQMI_WDS_GET_DORMANCY) || (msgID >= eQMI_WDS_GET_AUTOCONNECT && msgID <= eQMI_WDS_MODEM_INFO_IND) || (msgID >= eQMI_WDS_GET_ACTIVE_MIP && msgID <= eQMI_WDS_SET_IP_FAMILY) || (msgID >= eQMI_WDS_SET_AUTOCONNECT && msgID < eQMI_WDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageDMS Enumeration // QMI DMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageDMS { eQMI_DMS_ENUM_BEGIN = -1, eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageDMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageDMS msgID ) { bool retVal = false; if ( (msgID > eQMI_DMS_ENUM_BEGIN && msgID <= eQMI_DMS_EVENT_IND) || (msgID >= eQMI_DMS_GET_CAPS && msgID < eQMI_DMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageNAS Enumeration // QMI NAS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageNAS { eQMI_NAS_ENUM_BEGIN = -1, eQMI_NAS_RESET, // 000 Reset NAS service state variables eQMI_NAS_ABORT, // 001 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 002 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 002 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 003 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 032 Get the signal strength eQMI_NAS_SCAN_NETS, // 033 Scan for visible network eQMI_NAS_REGISTER_NET, // 034 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 035 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 036 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 036 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 037 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 038 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 039 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 040 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 041 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 042 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 043 Get the technology preference eQMI_NAS_GET_ACCOLC, // 044 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 045 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 046 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 047 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 048 Set various network parameters eQMI_NAS_GET_RF_INFO, // 049 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 050 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 051 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 052 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 052 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 055 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 056 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 056 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 057 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 058 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 059 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 060 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 061 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 062 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 063 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 064 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 065 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 066 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 067 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 068 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 069 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 070 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 071 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 072 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 073 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 075 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 076 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 077 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 078 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 079 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 080 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 081 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 082 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 083 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 084 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 085 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 086 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 087 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 088 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 089 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 090 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 091 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 092 Get dual standby preference eQMI_NAS_DETACH_LTE, // 093 Detach the current LTE system eQMI_NAS_BLOCK_LTE_PLMN, // 094 Block LTE PLMN eQMI_NAS_UNBLOCK_LTE_PLMN, // 095 Unblock LTE PLMN eQMI_NAS_RESET_LTE_PLMN_BLK, // 096 Reset LTE PLMN blocking eQMI_NAS_CUR_PLMN_NAME_IND, // 097 Current PLMN name indication eQMI_NAS_CONFIG_EMBMS, // 098 Configure eMBMS eQMI_NAS_GET_EMBMS_STATUS, // 099 Get eMBMS status eQMI_NAS_EMBMS_STATUS_IND, // 100 eMBMS status indication eQMI_NAS_GET_CDMA_POS_INFO, // 101 Get CDMA position info eQMI_NAS_RF_BAND_INFO_IND, // 102 RF band info indication eQMI_NAS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageNAS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageNAS msgID ) { bool retVal = false; if ( (msgID > eQMI_NAS_ENUM_BEGIN && msgID <= eQMI_NAS_SET_REG_EVENT) || (msgID >= eQMI_NAS_GET_RSSI && msgID <= eQMI_NAS_SYS_SELECT_IND) || (msgID >= eQMI_NAS_SET_DDTM_PREF && msgID <= eQMI_NAS_GET_MODE_PREF) || (msgID >= eQMI_NAS_SET_DSB_PREF && msgID < eQMI_NAS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWMS Enumeration // QMI WMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWMS { eQMI_WMS_ENUM_BEGIN = -1, eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWMS msgID ) { bool retVal = false; if ( (msgID > eQMI_WMS_ENUM_BEGIN && msgID <= eQMI_WMS_EVENT_IND) || (msgID >= eQMI_WMS_RAW_SEND && msgID <= eQMI_WMS_DELETE) || (msgID >= eQMI_WMS_GET_MSG_PROTOCOL && msgID < eQMI_WMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDS Enumeration // QMI PDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDS { eQMI_PDS_ENUM_BEGIN = -1, eQMI_PDS_RESET, // 00 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 01 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 01 PDS report indication eQMI_PDS_GET_STATE = 32, // 32 Return PDS service state eQMI_PDS_STATE_IND = 32, // 32 PDS service state indication eQMI_PDS_SET_STATE, // 33 Set PDS service state eQMI_PDS_START_SESSION, // 34 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 35 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 36 Manual tracking session position eQMI_PDS_END_SESSION, // 37 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 38 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 39 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 40 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 41 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 42 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 43 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 44 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 45 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 46 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 47 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 48 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 49 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 50 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 51 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 52 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 53 Request single position fix eQMI_PDS_GET_VERSION, // 54 Get PDS service version eQMI_PDS_INJECT_XTRA, // 55 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 56 Inject position data eQMI_PDS_INJECT_WIFI, // 57 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 58 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 59 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 60 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 61 Inject absolute time eQMI_PDS_INJECT_EFS, // 62 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 63 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 64 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 65 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 66 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 67 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 68 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 69 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 70 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 70 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 71 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 72 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 72 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 73 Force receiver off eQMI_PDS_GET_METHODS = 80, // 80 Get GPS position methods state eQMI_PDS_SET_METHODS, // 81 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 82 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 83 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 84 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 85 Set sensor config eQMI_PDS_GET_NAV_CFG, // 86 Get navigation config eQMI_PDS_SET_NAV_CFG, // 87 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 90 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 91 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 91 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 92 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 93 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 94 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 95 Set cell database control eQMI_PDS_READY_IND, // 96 Ready indication eQMI_PDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDS msgID ) { bool retVal = false; if ( (msgID > eQMI_PDS_ENUM_BEGIN && msgID <= eQMI_PDS_EVENT_IND) || (msgID >= eQMI_PDS_GET_STATE && msgID <= eQMI_PDS_FORCE_RECEIVER_OFF) || (msgID >= eQMI_PDS_GET_METHODS && msgID <= eQMI_PDS_SET_NAV_CFG) || (msgID >= eQMI_PDS_SET_WLAN_BLANK && msgID < eQMI_PDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAUTH Enumeration // QMI Authentication Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAUTH { eQMI_AUTH_ENUM_BEGIN = -1, eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND, // 38 AKA algorithm result indication eQMI_AUTH_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAUTH validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAUTH msgID ) { bool retVal = false; if (msgID >= eQMI_AUTH_START_EAP && msgID < eQMI_AUTH_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAT Enumeration // QMI AT Command Processor Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAT { eQMI_AT_ENUM_BEGIN = -1, eQMI_AT_RESET, // 00 Reset AT service state variables eQMI_AT_REG_COMMANDS = 32, // 32 Register AT commands to be forwarded eQMI_AT_COMMAND_IND, // 33 AT command indication eQMI_AT_SEND_RESPONSE, // 34 Send the response to an AT command eQMI_AT_ABORT_IND, // 35 AT command abort indication eQMI_AT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAT msgID ) { bool retVal = false; if ( (msgID == eQMI_AT_RESET) || (msgID >= eQMI_AT_REG_COMMANDS && msgID < eQMI_AT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageVoice Enumeration // QMI Voice Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageVoice { eQMI_VOICE_ENUM_BEGIN = -1, eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls eQMI_VOICE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageVoice validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageVoice msgID ) { bool retVal = false; if ( (msgID == eQMI_VOICE_INDICATION_REG) || (msgID >= eQMI_VOICE_CALL_ORIGINATE && msgID <= eQMI_VOICE_CALL_ANSWER) || (msgID >= eQMI_VOICE_GET_CALL_INFO && msgID <= eQMI_VOICE_GET_ALL_STATUS) || (msgID >= eQMI_VOICE_MANAGE_CALLS && msgID < eQMI_VOICE_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageUIM Enumeration // QMI UIM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageUIM { eQMI_UIM_ENUM_BEGIN = -1, eQMI_UIM_RESET, // 00 Reset eQMI_UIM_READ_TRANSPARENT = 32, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR eQMI_UIM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageUIM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageUIM msgID ) { bool retVal = false; if ( (msgID == eQMI_UIM_RESET) || (msgID >= eQMI_UIM_READ_TRANSPARENT && msgID < eQMI_UIM_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePBM Enumeration // QMI PBM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePBM { eQMI_PBM_ENUM_BEGIN = -1, eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePBM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePBM msgID ) { bool retVal = false; if (msgID >= eQMI_PBM_INDICATION_REG && msgID < eQMI_PBM_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageLOC Enumeration // QMI LOC Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageLOC { eQMI_LOC_ENUM_BEGIN = -1, eQMI_LOC_CLIENT_REVISION = 32, // 32 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 33 Register for events/indications eQMI_LOC_START, // 34 Start GPS session eQMI_LOC_STOP, // 35 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 36 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 37 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 38 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 39 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 40 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 41 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 42 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 43 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 44 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 45 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 46 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 47 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 48 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 49 Server connection req indication eQMI_LOC_GET_REV_REQ, // 50 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 50 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 51 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 51 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 52 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 52 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 53 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 53 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 54 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 54 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 55 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 55 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 56 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 56 Inject UTC time indication eQMI_LOC_INJECT_POS, // 57 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 57 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 58 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 58 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 59 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 59 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 60 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 60 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 61 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 61 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 62 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 62 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 63 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 63 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 64 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 64 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 65 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 65 Get low power mode config indication eQMI_LOC_SET_SERVER, // 66 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 66 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 67 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 67 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 68 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 68 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 69 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 69 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 70 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 70 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 71 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 71 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 72 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 72 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 73 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 73 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 74 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 74 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 75 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 75 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 76 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 76 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 77 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 77 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 78 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 78 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 79 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 79 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 80 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 80 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 81 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 81 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 82 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 82 Get external power config indication eQMI_LOC_INFORM_CONN, // 83 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 83 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 84 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 84 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 85 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 85 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 86 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 86 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 87 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 87 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 88 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 88 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 89 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 89 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 90 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 90 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 91 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 91 Get sensor performance control ind eQMI_LOC_INJ_SUPL_CERT, // 92 Inject SUPL certificate eQMI_LOC_INJ_SUPL_CERT_IND = 92, // 92 Inject SUPL certificate indication eQMI_LOC_DEL_SUPL_CERT, // 93 Delete SUPL certificate eQMI_LOC_DEL_SUPL_CERT_IND = 93, // 93 Delete SUPL certificate indication eQMI_LOC_SET_ENGINE_CFG, // 94 Set position engine config eQMI_LOC_SET_ENGINE_CFG_IND = 94,// 94 Set position engine config ind eQMI_LOC_GET_ENGINE_CFG, // 95 Get position engine config eQMI_LOC_GET_ENGINE_CFG_IND = 95,// 95 Get position engine config ind eQMI_LOC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageLOC validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageLOC msgID ) { bool retVal = false; if (msgID >= eQMI_LOC_CLIENT_REVISION && msgID < eQMI_LOC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageSAR Enumeration // QMI SAR Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageSAR { eQMI_SAR_ENUM_BEGIN = -1, eQMI_SAR_SET_RF_SAR_STATE = 1, // 01 Set the RF SAR state eQMI_SAR_GET_RF_SAR_STATE, // 02 Get the RF SAR state eQMI_SAR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageSAR validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageSAR msgID ) { bool retVal = false; if (msgID >= eQMI_SAR_SET_RF_SAR_STATE && msgID < eQMI_SAR_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMTFS Enumeration // QMI Remote Filesystem Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMTFS { eQMI_RMTFS_ENUM_BEGIN = -1, eQMI_RMTFS_OPEN = 1, // 01 Request an open eQMI_RMTFS_CLOSE, // 02 Request a close eQMI_RMTFS_IO_VECTOR, // 03 Request an I/O vector operation eQMI_RMTFS_ALLOC_BUFFER, // 04 Allocate a buffer eQMI_RMTFS_GET_DEV_ERROR, // 05 Return device error for last request eQMI_RMTFS_FORCE_SYNC_IND, // 06 Force sync indication eQMI_RMTFS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMTFS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMTFS msgID ) { bool retVal = false; if (msgID >= eQMI_RMTFS_OPEN && msgID < eQMI_RMTFS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCAT Enumeration // QMI CAT Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCAT { eQMI_CAT_ENUM_BEGIN = -1, eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCAT msgID ) { bool retVal = false; if ( (msgID > eQMI_CAT_ENUM_BEGIN && msgID <= eQMI_CAT_EVENT_IND) || (msgID >= eQMI_CAT_GET_STATE && msgID < eQMI_CAT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMS Enumeration // QMI RMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMS { eQMI_RMS_ENUM_BEGIN = -1, eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE, // 33 Set SMS wake settings eQMI_RMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMS msgID ) { bool retVal = false; if ( (msgID == eQMI_RMS_RESET) || (msgID >= eQMI_RMS_GET_SMS_WAKE && msgID < eQMI_RMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageOMA Enumeration // QMI OMA-DM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageOMA { eQMI_OMA_ENUM_BEGIN = -1, eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES, // 37 Set feature settings eQMI_OMA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageOMA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageOMA msgID ) { bool retVal = false; if ( (msgID > eQMI_OMA_ENUM_BEGIN && msgID <= eQMI_OMA_EVENT_IND) || (msgID >= eQMI_OMA_START_SESSION && msgID < eQMI_OMA_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIResultCode Enumeration // QMI Result Code Enumeration /*=========================================================================*/ enum eQMIResultCode { eQMI_RC_ENUM_BEGIN = -1, eQMI_RC_SUCCESS, // 00 Success eQMI_RC_ERROR, // 01 Error eQMI_RC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIResultCode validity check PARAMETERS: rc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIResultCode rc ) { bool retVal = false; if (rc > eQMI_RC_ENUM_BEGIN && rc < eQMI_RC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIErrorCode Enumeration // QMI Error Code Enumeration /*=========================================================================*/ enum eQMIErrorCode { eQMI_ERR_ENUM_BEGIN = -1, eQMI_ERR_NONE, // 00 eQMI_ERR_MALFORMED_MSG, // 01 eQMI_ERR_NO_MEMORY, // 02 eQMI_ERR_INTERNAL, // 03 eQMI_ERR_ABORTED, // 04 eQMI_ERR_CLIENT_IDS_EXHAUSTED, // 05 eQMI_ERR_UNABORTABLE_TRANSACTION, // 06 eQMI_ERR_INVALID_CLIENT_ID, // 07 eQMI_ERR_NO_THRESHOLDS, // 08 eQMI_ERR_INVALID_HANDLE, // 09 eQMI_ERR_INVALID_PROFILE, // 10 eQMI_ERR_INVALID_PIN_ID, // 11 eQMI_ERR_INCORRECT_PIN, // 12 eQMI_ERR_NO_NETWORK_FOUND, // 13 eQMI_ERR_CALL_FAILED, // 14 eQMI_ERR_OUT_OF_CALL, // 15 eQMI_ERR_NOT_PROVISIONED, // 16 eQMI_ERR_MISSING_ARG, // 17 eQMI_ERR_18, // 18 eQMI_ERR_ARG_TOO_LONG, // 19 eQMI_ERR_20, // 20 eQMI_ERR_21, // 21 eQMI_ERR_INVALID_TX_ID, // 22 eQMI_ERR_DEVICE_IN_USE, // 23 eQMI_ERR_OP_NETWORK_UNSUPPORTED, // 24 eQMI_ERR_OP_DEVICE_UNSUPPORTED, // 25 eQMI_ERR_NO_EFFECT, // 26 eQMI_ERR_NO_FREE_PROFILE, // 27 eQMI_ERR_INVALID_PDP_TYPE, // 28 eQMI_ERR_INVALID_TECH_PREF, // 29 eQMI_ERR_INVALID_PROFILE_TYPE, // 30 eQMI_ERR_INVALID_SERVICE_TYPE, // 31 eQMI_ERR_INVALID_REGISTER_ACTION, // 32 eQMI_ERR_INVALID_PS_ATTACH_ACTION, // 33 eQMI_ERR_AUTHENTICATION_FAILED, // 34 eQMI_ERR_PIN_BLOCKED, // 35 eQMI_ERR_PIN_ALWAYS_BLOCKED, // 36 eQMI_ERR_UIM_UNINITIALIZED, // 37 eQMI_ERR_MAX_QOS_REQUESTS_IN_USE, // 38 eQMI_ERR_INCORRECT_FLOW_FILTER, // 39 eQMI_ERR_NETWORK_QOS_UNAWARE, // 40 eQMI_ERR_INVALID_QOS_ID, // 41 eQMI_ERR_REQUESTED_NUM_UNSUPPORTED, // 42 eQMI_ERR_INTERFACE_NOT_FOUND, // 43 eQMI_ERR_FLOW_SUSPENDED, // 44 eQMI_ERR_INVALID_DATA_FORMAT, // 45 eQMI_ERR_GENERAL, // 46 eQMI_ERR_UNKNOWN, // 47 eQMI_ERR_INVALID_ARG, // 48 eQMI_ERR_INVALID_INDEX, // 49 eQMI_ERR_NO_ENTRY, // 50 eQMI_ERR_DEVICE_STORAGE_FULL, // 51 eQMI_ERR_DEVICE_NOT_READY, // 52 eQMI_ERR_NETWORK_NOT_READY, // 53 eQMI_ERR_WMS_CAUSE_CODE, // 54 eQMI_ERR_WMS_MESSAGE_NOT_SENT, // 55 eQMI_ERR_WMS_MESSAGE_DELIVERY_FAILURE, // 56 eQMI_ERR_WMS_INVALID_MESSAGE_ID, // 57 eQMI_ERR_WMS_ENCODING, // 58 eQMI_ERR_AUTHENTICATION_LOCK, // 59 eQMI_ERR_INVALID_TRANSITION, // 60 eQMI_ERR_61, // 61 eQMI_ERR_62, // 62 eQMI_ERR_63, // 63 eQMI_ERR_64, // 64 eQMI_ERR_SESSION_INACTIVE, // 65 eQMI_ERR_SESSION_INVALID, // 66 eQMI_ERR_SESSION_OWNERSHIP, // 67 eQMI_ERR_INSUFFICIENT_RESOURCES, // 68 eQMI_ERR_DISABLED, // 69 eQMI_ERR_INVALID_OPERATION, // 70 eQMI_ERR_INVALID_QMI_CMD, // 71 eQMI_ERR_WMS_TPDU_TYPE, // 72 eQMI_ERR_WMS_SMSC_ADDR, // 73 eQMI_ERR_INFO_UNAVAILABLE, // 74 eQMI_ERR_SEGMENT_TOO_LONG, // 75 eQMI_ERR_SEGMENT_ORDER, // 76 eQMI_ERR_BUNDLING_NOT_SUPPORTED, // 77 eQMI_ERR_78, // 78 eQMI_ERR_POLICY_MISMATCH, // 79 eQMI_ERR_SIM_FILE_NOT_FOUND, // 80 eQMI_ERR_EXTENDED_EXTERNAL, // 81 eQMI_ERR_ACCESS_DENIED, // 82 eQMI_ERR_HARDWARE_RESTRICTED, // 83 eQMI_ERR_ACK_NOT_SENT, // 84 eQMI_ERR_INCOMPATIBLE_STATE = 90, // 90 eQMI_ERR_FDN_RESTRICT, // 91 eQMI_ERR_SUPS_FAILURE_CAUSE, // 92 eQMI_ERR_NO_RADIO, // 93 eQMI_ERR_NOT_SUPPORTED, // 94 eQMI_ERR_CARD_CALL_CONTROL_FAILED = 96, // 96 eQMI_ERR_NETWORK_ABORTED, // 97 eQMI_ERR_CAT_EVT_REG_FAILED, // 61441 eQMI_ERR_CAT_INVALID_TR, // 61442 eQMI_ERR_CAT_INVALID_ENV_CMD, // 61443 eQMI_ERR_CAT_ENV_CMD_BUSY, // 61444 eQMI_ERR_CAT_ENV_CMD_FAIL, // 61445 eQMI_ERR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIErrorCode validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIErrorCode ec ) { bool retVal = false; if ( (ec > eQMI_ERR_ENUM_BEGIN && ec <= eQMI_ERR_ACK_NOT_SENT) || (ec >= eQMI_ERR_INCOMPATIBLE_STATE && ec <= eQMI_ERR_NOT_SUPPORTED) || (ec == eQMI_ERR_CARD_CALL_CONTROL_FAILED) || (ec == eQMI_ERR_NETWORK_ABORTED) || (ec >= eQMI_ERR_CAT_EVT_REG_FAILED && ec < eQMI_ERR_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMICallEndReason Enumeration // QMI Call End Reason Enumeration /*=========================================================================*/ enum eQMICallEndReason { eQMI_CALL_END_REASON_BEGIN = -1, // General eQMI_CALL_END_REASON_UNSPECIFIED = 1, // 1 eQMI_CALL_END_REASON_CLIENT_END, // 2 eQMI_CALL_END_REASON_NO_SRV, // 3 eQMI_CALL_END_REASON_FADE, // 4 eQMI_CALL_END_REASON_REL_NORMAL, // 5 eQMI_CALL_END_REASON_ACC_IN_PROG, // 6 eQMI_CALL_END_REASON_ACC_FAIL, // 7 eQMI_CALL_END_REASON_REDIR_OR_HANDOFF, // 8 eQMI_CALL_END_REASON_CLOSE_IN_PROGRESS, // 9 eQMI_CALL_END_REASON_AUTH_FAILED, // 10 eQMI_CALL_END_REASON_INTERNAL, // 11 // CDMA eQMI_CALL_END_REASON_CDMA_LOCK = 500, // 500 eQMI_CALL_END_REASON_INTERCEPT, // 501 eQMI_CALL_END_REASON_REORDER, // 502 eQMI_CALL_END_REASON_REL_SO_REJ, // 503 eQMI_CALL_END_REASON_INCOM_CALL, // 504 eQMI_CALL_END_REASON_ALERT_STOP, // 505 eQMI_CALL_END_REASON_ACTIVATION, // 506 eQMI_CALL_END_REASON_MAX_ACCESS_PROBE, // 507 eQMI_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS, // 508 eQMI_CALL_END_REASON_NO_RESPONSE_FROM_BS, // 509 eQMI_CALL_END_REASON_REJECTED_BY_BS, // 510 eQMI_CALL_END_REASON_INCOMPATIBLE, // 511 eQMI_CALL_END_REASON_ALREADY_IN_TC, // 512 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_GPS, // 513 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_SMS, // 514 eQMI_CALL_END_REASON_NO_CDMA_SRV, // 515 // GSM/WCDMA eQMI_CALL_END_REASON_CONF_FAILED = 1000, // 1000 eQMI_CALL_END_REASON_INCOM_REJ, // 1001 eQMI_CALL_END_REASON_NO_GW_SRV, // 1002 eQMI_CALL_END_REASON_NETWORK_END, // 1003 eQMI_CALL_END_REASON_LLC_SNDCP_FAILURE, // 1004 eQMI_CALL_END_REASON_INSUFFICIENT_RESOURCES, // 1005 eQMI_CALL_END_REASON_OPTION_TEMP_OOO, // 1006 eQMI_CALL_END_REASON_NSAPI_ALREADY_USED, // 1007 eQMI_CALL_END_REASON_REGULAR_DEACTIVATION, // 1008 eQMI_CALL_END_REASON_NETWORK_FAILURE, // 1009 eQMI_CALL_END_REASON_UMTS_REATTACH_REQ, // 1010 eQMI_CALL_END_REASON_UMTS_PROTOCOL_ERROR, // 1011 eQMI_CALL_END_REASON_OPERATOR_BARRING, // 1012 eQMI_CALL_END_REASON_UNKNOWN_APN, // 1013 eQMI_CALL_END_REASON_UNKNOWN_PDP, // 1014 eQMI_CALL_END_REASON_GGSN_REJECT, // 1015 eQMI_CALL_END_REASON_ACTIVATION_REJECT, // 1016 eQMI_CALL_END_REASON_OPTION_NOT_SUPPORTED, // 1017 eQMI_CALL_END_REASON_OPTION_UNSUBSCRIBED, // 1018 eQMI_CALL_END_REASON_QOS_NOT_ACCEPTED, // 1019 eQMI_CALL_END_REASON_TFT_SEMANTIC_ERROR, // 1020 eQMI_CALL_END_REASON_TFT_SYNTAX_ERROR, // 1021 eQMI_CALL_END_REASON_UNKNOWN_PDP_CONTEXT, // 1022 eQMI_CALL_END_REASON_FILTER_SEMANTIC_ERROR, // 1023 eQMI_CALL_END_REASON_FILTER_SYNTAX_ERROR, // 1024 eQMI_CALL_END_REASON_PDP_WITHOUT_ACTIVE_TFT, // 1025 eQMI_CALL_END_REASON_INVALID_TRANSACTION_ID, // 1026 eQMI_CALL_END_REASON_MESSAGE_SEMANTIC_ERROR, // 1027 eQMI_CALL_END_REASON_INVALID_MANDATORY_INFO, // 1028 eQMI_CALL_END_REASON_TYPE_UNSUPPORTED, // 1029 eQMI_CALL_END_REASON_MSG_TYPE_WRONG_FOR_STATE, // 1030 eQMI_CALL_END_REASON_UNKNOWN_INFO_ELEMENT, // 1031 eQMI_CALL_END_REASON_CONDITIONAL_IE_ERROR, // 1032 eQMI_CALL_END_REASON_MSG_WRONG_FOR_PROTOCOL, // 1033 eQMI_CALL_END_REASON_APN_TYPE_CONFLICT, // 1034 eQMI_CALL_END_REASON_NO_GPRS_CONTEXT, // 1035 eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED, // 1036 // CDMA 1xEV-DO (HDR) eQMI_CALL_END_REASON_CD_GEN_OR_BUSY = 1500, // 1500 eQMI_CALL_END_REASON_CD_BILL_OR_AUTH, // 1501 eQMI_CALL_END_REASON_CHG_HDR, // 1502 eQMI_CALL_END_REASON_EXIT_HDR, // 1503 eQMI_CALL_END_REASON_HDR_NO_SESSION , // 1504 eQMI_CALL_END_REASON_HDR_ORIG_DURING_GPS_FIX, // 1505 eQMI_CALL_END_REASON_HDR_CS_TIMEOUT , // 1506 eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM, // 1507 eQMI_CALL_END_REASON_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMICallEndReason validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMICallEndReason err ) { if ( (err >= eQMI_CALL_END_REASON_UNSPECIFIED) && (err <= eQMI_CALL_END_REASON_INTERNAL) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CDMA_LOCK) && (err <= eQMI_CALL_END_REASON_NO_CDMA_SRV) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CONF_FAILED) && (err <= eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CD_GEN_OR_BUSY) && (err <= eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM) ) { return true; } return false; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/QMIProtocolServer.cpp000077500000000000000000000266601455567757300247060ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIProtocolServer.h" #include "QMIBuffers.h" #include "Comm.h" #include "Socket.h" /*=========================================================================*/ // cQMIProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQMIProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: serviceType [ I ] - QMI service type requested bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( MapQMIServiceToProtocol( serviceType, false ), MapQMIServiceToProtocol( serviceType, true ), bufferSzRx, logSz ), mLastTID( (WORD)INVALID_QMI_TRANSACTION_ID ), mService( serviceType ) { // Nothing to do } /*=========================================================================== METHOD: ~cQMIProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::~cQMIProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the configured QMI service using the given QMI control file PARAMETERS: pControlFile [ I ] - QMI control file SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::Connect( LPCSTR pControlFile ) { // Assume failure bool bRC = false; if (IsValid( mService ) == false || mService == eQMI_SVC_CONTROL) { return bRC; } std::string name = pControlFile; if (name.find( "qcqmi" ) != std::string::npos) { mpConnection = new cComm(); mConnectionType = eConnectionType_RmNet; } else { // SMD mpConnection = new cSocket(); mConnectionType = eConnectionType_SMD; } // Pass service file to base class for actual connection bRC = cProtocolServer::Connect( pControlFile ); if (bRC == false) { TRACE( "QMI connect %d failed\n", mService ); } return bRC; } /*=========================================================================== METHOD: ValidateRequest (Internal Method) DESCRIPTION: Validate a request that is about to be scheduled SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::ValidateRequest( const sProtocolRequest & req ) { if (cProtocolServer::ValidateRequest( req ) == false) { return false; } sQMIServiceBuffer qmiReq( req.GetSharedBuffer() ); return qmiReq.IsValid(); } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::InitializeComm() { bool bResult = false; if (mpConnection == 0) { return bResult; } if (mConnectionType == eConnectionType_RmNet) { // Setup the QMI Service type int result = mpConnection->SendCtl( QMI_GET_SERVICE_FILE_IOCTL, (void*)(unsigned long)mService ); bResult = (result == 0); } else if (mConnectionType == eConnectionType_SMD) { // Setup the QMI Service type int result = mpConnection->SendCtl( eQMUXD_MSG_ALLOC_QMI_CLIENT_ID, (void*)&mService ); bResult = (result == 0); } return bResult; } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::CleanupComm() { bool bResult = true; if (mpConnection != 0 && mConnectionType == eConnectionType_SMD) { // Delete the QMI client // NOTE: This is generally unnecessary, when you close the channel // it is deleted int result = mpConnection->SendCtl( eQMUXD_MSG_RELEASE_QMI_CLIENT_ID, 0 ); bResult = (result == 0); } // Nothing to actually do here return true; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into QMI indications/responses PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response (not used) bAbortTx [ O ] - Response aborts current transmission? (not used) SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cQMIProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; bAbortTx = false; // Something to decode from? if (bytesReceived == 0) { return bRC; } // Set protocol type (we have to be dealing with a valid QMI service) eProtocolType pt = MapQMIServiceToProtocol( mService, false ); if (pt == ePROTOCOL_ENUM_BEGIN) { return bRC; } sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxBuffer, bytesReceived, pt ); if (pTmp != 0) { sQMIServiceBuffer tmpBuf( pTmp ); if (tmpBuf.IsValid() == true) { rspIdx = mLog.AddBuffer( tmpBuf ); if (IsResponse( tmpBuf ) == true) { bRC = true; } else { rspIdx = INVALID_LOG_INDEX; } } } return bRC; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encode data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQMIProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { WORD tid = ++mLastTID; if (tid == (WORD)INVALID_QMI_TRANSACTION_ID) { tid++; } sQMIServiceBuffer tmpBuf( pBuffer ); tmpBuf.SetTransactionID( tid ); // No actual encoding required as we alter the original request bEncoded = false; return 0; }; /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } sQMIServiceBuffer qmiReq( mpActiveRequest->mRequest.GetSharedBuffer() ); sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiReq.IsValid() == false || qmiRsp.IsValid() == false) { return bRC; } if (qmiRsp.IsResponse() == false) { return bRC; } WORD reqID = qmiReq.GetTransactionID(); WORD rspID = qmiRsp.GetTransactionID(); if ( (reqID == (WORD)INVALID_QMI_TRANSACTION_ID) || (rspID == (WORD)INVALID_QMI_TRANSACTION_ID) || (reqID != rspID) ) { return bRC; } // Sadly there are documentated cases of firmware returning responses // with a matching transaction ID but a mismatching message ID. There // is no reason for this to be considered valid behavior as of yet ULONG reqMsgID = qmiReq.GetMessageID(); ULONG rspMsgID = qmiRsp.GetMessageID(); if (reqMsgID != rspMsgID) { return bRC; } bRC = true; return bRC; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/QMIProtocolServer.h000077500000000000000000000105201455567757300243370ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQMIProtocolServer /*=========================================================================*/ class cQMIProtocolServer : public cProtocolServer { public: // Constructor cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQMIProtocolServer(); // Connect to the given QMI service using the configured QMI // control file bool Connect( LPCSTR pControlFile ); // (Inline) Return the QMI service type eQMIService GetServiceType() { return mService; }; protected: // Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ); // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // (Inline) Is the passed in data a response that aborts the // current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & /* rsp */ ) { // QMI doesn't necessarily require this return false; }; /* Current transaction ID */ SHORT mLastTID; /* Type of QMI service we are serving */ eQMIService mService; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/SharedBuffer.cpp000077500000000000000000000242241455567757300237010ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.cpp DESCRIPTION: Shareable protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "SharedBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Synchronization object struct sSharedBufferSync { public: // Constructor sSharedBufferSync() : mbInitialized( false ) { int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to init sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } mbInitialized = true; }; // Destructor ~sSharedBufferSync() { mbInitialized = false; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); } }; // Lock sync object void Lock() { if (mbInitialized == true) { int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to lock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // Unlock sync object void Unlock() { if (mbInitialized == true) { int nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to unlock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; protected: /* DIAG buffer critical section */ pthread_mutex_t mSyncSection; /* Has this object been initialized? */ bool mbInitialized; }; // Global (across all shared buffers) reference count guard sSharedBufferSync gRefCount; /*=========================================================================*/ // sSharedBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (copy passed in buffer) PARAMETERS: pDataToCopy [ I ] - The data buffer to copy (should be non-zero) dataLen [ I ] - The length of the above buffer (should be > 1) dataType [ I ] - Type of data (not used internal to class) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, data actually exists? if (pDataToCopy != 0) { // Yes, try to allocate memory mpData = new BYTE[dataLen]; if (mpData != 0) { // Now copy into our allocation memcpy( (PVOID)mpData, (LPCVOID)pDataToCopy, (SIZE_T)dataLen ); // Now set the size, we do this last so that our double // deletion logic is only applied if we had an allocation // in the first place mSize = dataLen; } } } } /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (assume ownership of passed in buffer) PARAMETERS: dataLen [ I ] - The length of the above buffer (should be > 1) pDataToOwn [ I ] - The data buffer to assume ownership of (should be non-zero) dataType [ I ] - Type of data (not used internal to class) NOTE: The order is intentionally reversed from the previous constructor to avoid any cases of mistaken identity (copy versus assume ownership) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Data actually exists? if (pDataToOwn != 0) { // Yes, length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, assume ownership of the passed in buffer mpData = pDataToOwn; mSize = dataLen; } else { // This data buffer is not acceptable to us, but we have assumed // ownership of the memory which we will now free delete [] pDataToOwn; } } } /*=========================================================================== METHOD: ~sSharedBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sSharedBuffer::~sSharedBuffer() { ASSERT( mRefCount == 0 ); // Buffer data to free? if (mpData != 0) { // Yes, zero first byte for caution and then delete it mpData[0] = 0; delete [] mpData; // Even more caution, zero out pointer mpData = 0; } else if (mSize != 0) { ASSERT( (PVOID)("Double deletion detected in ~sSharedBuffer") == 0 ); } } /*=========================================================================== METHOD: operator == (Public Method) DESCRIPTION: Equality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator == ( const sSharedBuffer & refBuf ) const { // Assume they are not equal bool bEq = false; // The buffers must be the same if (mpData == refBuf.mpData) { if (mSize == refBuf.mSize) { if (mRefCount == refBuf.mRefCount) { if (mType == refBuf.mType) { // The shared buffers are the same bEq = true; } } else { // Very odd - the buffers are the same, but not the ref count?!? ASSERT( 0 ); } } else { // Very odd - the buffers are the same, but not the size?!? ASSERT( 0 ); } } return bEq; } /*=========================================================================== METHOD: operator != (Public Method) DESCRIPTION: Inequality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator != ( const sSharedBuffer & refBuf ) const { if (*this == refBuf) { return false; } return true; } /*=========================================================================== METHOD: AddRef (Internal Method) DESCRIPTION: Increment reference count RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::AddRef() { gRefCount.Lock(); mRefCount++; gRefCount.Unlock(); } /*=========================================================================== METHOD: Release (Internal Method) DESCRIPTION: Release reference, delete if reference count zero RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::Release() { gRefCount.Lock(); ASSERT( mRefCount != 0 ); // Decrement reference count if (mRefCount > 0) { mRefCount--; } // ... and delete if reference count now 0 if (mRefCount == 0) { delete this; } gRefCount.Unlock(); } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/SharedBuffer.h000077500000000000000000000127671455567757300233570ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.h DESCRIPTION: Shareable buffer structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- struct sProtocolBuffer; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum size of a shared buffer const ULONG MAX_SHARED_BUFFER_SIZE = 1024 * 16 + 256; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sSharedBuffer // // Simple struct to represent a reference counted shareable (no copy) // buffer, as the basis for all buffer related classes // // NOTE: Do *NOT* create instances of this structure on the stack, it // must be dynamically allocated in order to function correctly /*=========================================================================*/ struct sSharedBuffer { public: // Constructor (copy passed in buffer) sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ); // Constructor (assume ownership of passed in buffer) sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ); // Destructor virtual ~sSharedBuffer(); // Equality operator bool operator == ( const sSharedBuffer & ) const; // Inequality operator bool operator != ( const sSharedBuffer & ) const; // (Inline) Get buffer const BYTE * GetBuffer() const { return mpData; }; // (Inline) Get buffer size ULONG GetSize() const { return mSize; }; // (Inline) Get buffer type ULONG GetType() const { return mType; }; // (Inline) Is this buffer valid? bool IsValid() const { return (mpData != 0 && IsValidSize( mSize )); }; // (Inline) Get reference count ULONG GetRefCount() const { return mRefCount; }; // (Static Inline) Is the passed in size within the allowable range // a shared buffer? static bool IsValidSize( ULONG sz ) { return (sz > 0 && sz <= MAX_SHARED_BUFFER_SIZE); }; protected: // Add reference void AddRef(); // Release reference, delete if reference count zero void Release(); /* Data */ PBYTE mpData; /* Size of data */ ULONG mSize; /* Type of data */ ULONG mType; /* Reference count */ ULONG mRefCount; private: // Leave copy constructor and assignment operator unimplemented // to prevent unintentional and unauthorized copying of the object // (which would lead to bad reference counting) sSharedBuffer( const sSharedBuffer & ); sSharedBuffer & operator = ( const sSharedBuffer & ); friend struct sProtocolBuffer; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/Socket.cpp000077500000000000000000000505701455567757300225740ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.cpp DESCRIPTION: Implementation of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Socket.h" #include "ProtocolServer.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 // Size of the QMUXD command payload // GET_CLIENT_ID and RELEASE_CLIENT_ID must pass in a buffer of this size #define PAYLOAD_SIZE 664 /*=========================================================================*/ // struct sQMUXDHeader /*=========================================================================*/ #pragma pack( push, 1 ) struct sQMUXDHeader { /* Total size of header and following buffer */ int mTotalSize; /* QMUXD client ID */ int mQMUXDClientID; /* Message type */ eQMUXDMessageTypes mQMUXDMsgID; /* Duplicate of mQMUXDClientID */ int mQMUXDClientIDDuplicate; /* Transaction ID */ unsigned long mTxID; /* System error code */ int mSysErrCode; /* QMI error code (duplicate of TLV 0x02) */ int mQmiErrCode; /* SMD channel. 0 = SMD_DATA_5 */ int mQMUXDConectionType; /* QMI service ID */ int mQMUXServiceID; /* QMI client ID */ unsigned char mQMUXClientID; /* QMI flags */ unsigned char mRxFlags; /* In QMUXD this struct is not packed, so the compiler appends these two bytes */ unsigned short int mMissing2Bytes; }; #pragma pack( pop ) /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxSocketThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads to a socket PARAMETERS: pData [ I ] cSocket pointer RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxSocketThread( void * pData ) { cSocket * pSocket = (cSocket*)pData; if (pSocket == NULL || pSocket->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pSocket->mCommandPipe[READING], &inputSet ); int largestFD = pSocket->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait until we recieve a command or data is available status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pSocket->mCommandPipe[READING], &outputSet ) == true) { // Read command value from the pipe BYTE cmd; status = read( pSocket->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pSocket->mSocket, &inputSet ); largestFD = std::max( pSocket->mSocket, pSocket->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; } else { // EXIT_CMD or anything else break; } } else if (FD_ISSET( pSocket->mSocket, &outputSet ) == true) { // Stop watching for read data FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; // Perform a recv for the header sQMUXDHeader recvHdr; status = recv( pSocket->mSocket, &recvHdr, sizeof( recvHdr ), 0 ); if (status != sizeof( recvHdr )) { TRACE( "recv error, bad size %d\n", status ); break; } // Calculate and read the remaining data int remainder = recvHdr.mTotalSize - sizeof( recvHdr ); if (remainder > pSocket->mBuffSz) { TRACE( "read too large for buffer\n" ); break; } status = recv( pSocket->mSocket, pSocket->mpBuffer, remainder, 0 ); // Is this one of our IOCTLS or a standard message? if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_WRITE_QMI_SDU) { cIOCallback * pCallback = pSocket->mpRxCallback; pSocket->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } else { pSocket->mpRxCallback = 0; // Notify SendCtl() that control message completed if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { DWORD clientID; memcpy( &clientID, &pSocket->mpBuffer[0], 4 ); pSocket->mCtrlMsgComplete.Set( clientID ); } else { // Just set the event pSocket->mCtrlMsgComplete.Set( 0 ); } } } } return 0; }; /*=========================================================================*/ // cSocket Methods /*=========================================================================*/ /*=========================================================================== METHOD: cSocket (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cSocket::cSocket() : mSocket( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ), mCtrlMsgComplete(), mQMUXDClientID( 0 ), mQMUXClientID( 0 ), mQMUXServiceID( 0 ), mChannelID( -1 ), mQMUXDTxID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cSocket (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cSocket::~cSocket() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cSocket::IsValid() { // Nothing to do return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pChannel [ I ] - Channel number (IE: "0" = SMD_DATA_5 ) RETURN VALUE: bool ===========================================================================*/ bool cSocket::Connect( LPCSTR pChannel ) { if (IsValid() == false || pChannel == 0 || pChannel[0] == 0) { return false; } if (mSocket != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cSocket:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxSocketThread, this ); if (nRet != 0) { TRACE( "cSocket::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Create a socket mSocket = socket( AF_UNIX, SOCK_STREAM, 0 ); if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "unable to create socket %d\n", errno ); Disconnect(); return false; } struct sockaddr_un clientSockAddr; memset( &clientSockAddr, 0, sizeof( clientSockAddr ) ); clientSockAddr.sun_family = AF_UNIX; // Format the client path snprintf( &clientSockAddr.sun_path[0], sizeof( clientSockAddr.sun_path ), "/var/qmux_client_socket%7lu", (unsigned long)getpid() ); // Delete if it exists already unlink( clientSockAddr.sun_path ); // Bind to a client address nRet = bind( mSocket, (struct sockaddr *)&clientSockAddr, sizeof( sockaddr_un ) ); if (nRet == -1) { TRACE( "bad bind %d\n", errno ); Disconnect(); return false; } // Format the connection path struct sockaddr_un connectSockAddr; memset( &connectSockAddr, 0, sizeof( connectSockAddr ) ); connectSockAddr.sun_family = AF_UNIX; snprintf( &connectSockAddr.sun_path[0], sizeof( connectSockAddr.sun_path ), "/var/qmux_connect_socket" ); // Connect to server address nRet = connect( mSocket, (struct sockaddr *)&connectSockAddr, sizeof( sockaddr_un ) ); if (nRet < 0) { TRACE( "bad connect %d\n", errno ); Disconnect(); return false; } int clientID; nRet = recv( mSocket, &clientID, sizeof( clientID ), 0 ); if (nRet != sizeof( clientID )) { printf( "bad client ID %d\n", errno ); Disconnect(); return false; } // Save QMUXD Client ID mQMUXDClientID = clientID; // Save SMD channel mChannelID = strtol( pChannel, 0, 10 ); if (mChannelID == -1) { Disconnect(); return false; } // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Send a control message to the lower layer PARAMETERS: msgType [ I ] - eQMUXDMessageType pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - control message return value (0 for success) ===========================================================================*/ int cSocket::SendCtl( UINT msgType, void * pData ) { if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } BYTE msg[sizeof( sQMUXDHeader ) + PAYLOAD_SIZE]; memset( &msg[0], 0, sizeof( msg ) ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)&msg[0]; pHdr->mTotalSize = sizeof( msg ); pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = (eQMUXDMessageTypes)msgType; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; // The Payload BYTE * pPayload = &msg[sizeof( sQMUXDHeader )]; if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { memcpy( &mQMUXServiceID, pData, 4 ); memcpy( &pPayload[0], &mQMUXServiceID, 4 ); } else if (msgType == (int)eQMUXD_MSG_RELEASE_QMI_CLIENT_ID) { memcpy( &pPayload[0], &mQMUXServiceID, 4 ); memcpy( &pPayload[4], &mQMUXClientID, 4 ); } // Send the message int rc = send( mSocket, &msg[0], sizeof( msg ), 0 ); if (rc != sizeof( msg )) { TRACE( "bad write %d\n", rc ); return rc; } if (mpRxCallback == 0) { // No one is currently reading, need to trigger a read // so our data can be recieved RxData( &msg[0], sizeof( msg ), 0 ); } // Wait for the response (10s timeout) DWORD val; rc = mCtrlMsgComplete.Wait( 10000, val ); if (rc != 0) { TRACE( "bad SendCtl() wait %d\n", rc ); return rc; } if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { // Grab the client ID mQMUXClientID = val; } return 0; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cSocket::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mSocket != INVALID_HANDLE_VALUE) { close( mSocket ); mSocket = INVALID_HANDLE_VALUE; } mCtrlMsgComplete.Clear(); mQMUXDClientID = 0; mQMUXClientID = 0; mQMUXServiceID = 0; mQMUXDTxID = 0; return bRC; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelIO() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelRx() { if (mSocket == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelTx() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cSocket::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to start reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cSocket::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // Format the header int totalSz = sizeof( sQMUXDHeader ) + bufSz; BYTE * pMsg = new BYTE[totalSz]; if (pMsg == 0) { TRACE( "unable to allocate buffer\n" ); return false; } memset( pMsg, 0, totalSz ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)pMsg; pHdr->mTotalSize = totalSz; pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = eQMUXD_MSG_WRITE_QMI_SDU; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; pHdr->mQMUXServiceID = mQMUXServiceID; pHdr->mQMUXClientID = mQMUXClientID; // The data payload memcpy( &pMsg[sizeof( sQMUXDHeader )], pBuf, bufSz ); // Send the message int nRet = send( mSocket, pMsg, totalSz, 0 ); delete [] pMsg; if (nRet != totalSz) { TRACE( "cSocket::TxData() write returned %d instead of %d\n", nRet, totalSz ); return false; } #ifdef DEBUG TRACE( "Write of %d bytes took %llu miliseconds\n", totalSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/Socket.h000077500000000000000000000116721455567757300222410ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.h DESCRIPTION: Declaration of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Enum eQMUXDMessageTypes // Types to be passed into SendCtl() for cSocket /*=========================================================================*/ enum eQMUXDMessageTypes { eQMUXD_MSG_WRITE_QMI_SDU = 0, eQMUXD_MSG_ALLOC_QMI_CLIENT_ID = 1, eQMUXD_MSG_RELEASE_QMI_CLIENT_ID = 2, }; /*=========================================================================*/ // Class cSocket /*=========================================================================*/ class cSocket : public cConnection { public: // Constructor cSocket(); // Destructor ~cSocket(); // Is this object valid? bool IsValid(); // Connect to the specified channel bool Connect( LPCSTR pChannel ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current channel ID int GetChannelID() const { return mChannelID; }; // Are we currently connected to a port? bool IsConnected() { return (mSocket != INVALID_HANDLE_VALUE); }; protected: /* Handle to socket */ int mSocket; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; /* Control message completion event */ cEvent mCtrlMsgComplete; /* QMUXD client ID */ int mQMUXDClientID; /* QMUX client and service IDs */ int mQMUXClientID; int mQMUXServiceID; /* SMD Channel ID. 0 = SMD_DATA_5 */ int mChannelID; /* The SMD transaction ID */ int mQMUXDTxID; // Rx thread is allowed complete access friend void * RxSocketThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/StdAfx.h000077500000000000000000000141751455567757300222030ustar00rootroot00000000000000/*=========================================================================== FILE: StdAfx.h DESCRIPTION: Application Framework eXtenstions for Linux PUBLIC CLASSES AND FUNCTIONS: Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Includes //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- // Macro defination //--------------------------------------------------------------------------- #define ASSERT( x ) assert( x ) #ifdef DEBUG #ifdef ANDROID #include // TRACE macro #define TRACE( format, arg... ) \ if (true) \ { \ __android_log_print( ANDROID_LOG_INFO, \ "Gobi", "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ); \ } #else #define TRACE( format, arg... ) \ printf( "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ) #endif #else #define TRACE(...) #endif //--------------------------------------------------------------------------- // data type defination //--------------------------------------------------------------------------- #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef CONST #define CONST const #endif typedef void VOID; typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef double DOUBLE; typedef int INT; typedef unsigned int UINT; typedef unsigned int * PUINT; typedef INT HANDLE; typedef HANDLE HMODULE; typedef char CHAR; typedef short SHORT; typedef long LONG; typedef unsigned long ULONG; typedef ULONG * PULONG; typedef ULONG * ULONG_PTR; typedef unsigned short USHORT; typedef USHORT * PUSHORT; typedef unsigned char UCHAR; typedef UCHAR * PUCHAR; typedef char * PSZ; typedef CONST CHAR * LPCSTR; typedef CHAR * LPSTR; typedef BYTE * PBYTE; typedef BOOL * PBOOL; typedef INT * PINT; typedef UINT * LPINT; typedef WORD * PWORD; typedef PWORD LPWORD; typedef LONG * LPLONG; typedef DWORD * PDWORD; typedef VOID * PVOID; typedef PVOID LPVOID; typedef const void * LPCVOID; typedef size_t SIZE_T; typedef double DATE; // Error code #define NO_ERROR 0L #define ERROR_SUCCESS 0L #define ERROR_NO_MORE_ITEMS 259L #define ERROR_CRC 23L #define ERROR_OUTOFMEMORY 14L #define ERROR_CAN_NOT_COMPLETE 1003L #define ERROR_REVISION_MISMATCH 1306L #define ERROR_BAD_ARGUMENTS 160L #define INVALID_SET_FILE_POINTER -1 #define VALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE -1 #define INVALID_FILE_SZ -1 #define ERROR_GEN_FAILURE 31L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_NOT_ENOUGH_MEMORY 8L #define ERROR_INVALID_PARAMETER 87L #define ERROR_BAD_FORMAT 11L // Other Constant definitions #define MAX_PATH 512 #define INFINITE 0xffffffff // SIOCIWFIRSTPRIV = 0x8BE0 // Device I/O control code for setting QMI service #define QMI_GET_SERVICE_FILE_IOCTL 0x8BE0 + 1 // Device I/O control code for obtaining device VIDPID #define QMI_GET_VIDPID_IOCTL 0x8BE0 + 2 // Device I/O control code for obtaining device MEID #define QMI_GET_MEID_IOCTL 0x8BE0 + 3 // Define the directions for pipes #define READING 0 #define WRITING 1 libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Core/SyncQueue.h000077500000000000000000000301061455567757300227230ustar00rootroot00000000000000/*=========================================================================== FILE: SyncQueue.h DESCRIPTION: Declaration/Implementation of cSyncQueue class PUBLIC CLASSES AND METHODS: cSyncQueue Synchronized shareable (across multiple threads) queue of structures with event notifications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cSyncQueue /*=========================================================================*/ template class cSyncQueue { public: // (Inline) Constructor cSyncQueue( ULONG maxElements, bool bSignalEvent = false ) : mSignature( (ULONG)eSYNC_QUEUE_SIG ), mSignalEvent(), mbSignalEvent( bSignalEvent ), mMaxElements( maxElements ), mTotalElements( 0 ) { // Create sync CS int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SyncQueue: Unable to init sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } }; // (Inline) Destructor ~cSyncQueue() { if (IsValid() == false) { ASSERT( (PVOID)"Double deletion detected in ~cSyncQueue" == 0 ); } else { EmptyQueue(); mSignature = 0; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // (Inline) Add an element to the queue bool AddElement( const tElementType & elem ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { // Yes, drop oldest element mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Add an element to the queue returning the index of // the element bool AddElement( const tElementType & elem, ULONG & idx ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); idx = mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Return given element in the queue bool GetElement( ULONG idx, tElementType & elem ) const { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Is this a current element index? ULONG expiredIndices = mTotalElements - (ULONG)mElementDeque.size(); if (idx >= expiredIndices) { // Yes, grab it from the deque idx -= expiredIndices; if (idx < (ULONG)mElementDeque.size()) { elem = mElementDeque[idx]; bRC = true; } } nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Empty element queue bool EmptyQueue() { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } mElementDeque.clear(); mTotalElements = 0; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } bRC = true; return bRC; }; // (Inline) Return the number of queued elements ULONG GetQueueCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = (ULONG)mElementDeque.size(); nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the total number of elements added to queue ULONG GetTotalCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = mTotalElements; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the signal event cEvent & GetSignalEvent() const { return mSignalEvent; }; // (Inline) Is this sync queue valid? bool IsValid() const { return (mSignature == (ULONG)eSYNC_QUEUE_SIG); }; protected: // Object signature enum eClassConstants { eSYNC_QUEUE_SIG = 0x1799A2BC }; /* Object signature */ ULONG mSignature; /* Multithreaded mutex type */ mutable pthread_mutex_t mSyncSection; /* Signal event, set everytime an element is added (if configured) */ mutable cEvent mSignalEvent; /* Use above signal event? */ bool mbSignalEvent; /* Maximum number of elements to add to the deque */ ULONG mMaxElements; /* Total number of elements added to the deque */ ULONG mTotalElements; /* Element queue */ std::deque mElementDeque; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/000077500000000000000000000000001455567757300233405ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000Translation.cpp000077500000000000000000000071151455567757300274550ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLV DESCRIPTION: Return the starting location and size of TLV buffer. NOTE: does not include the TLV header PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer type [ I ] - Type ID pOutLen [ O ] - Length of the output buffer ppOut [ O ] - Pointer to output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ) { if (pIn == 0 || pOutLen == 0 || ppOut == 0) { return eGOBI_ERR_INVALID_ARG; } for (ULONG offset = 0; offset + sizeof( sQMIRawContentHeader ) <= inLen; offset += sizeof( sQMIRawContentHeader )) { sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pIn + offset); // Is it big enough to contain this TLV? if (offset + sizeof( sQMIRawContentHeader ) + pHeader->mLength > inLen) { return eGOBI_ERR_MALFORMED_RSP; } if (pHeader->mTypeID == typeID) { *pOutLen = pHeader->mLength; *ppOut = pIn + offset + sizeof( sQMIRawContentHeader ); return eGOBI_ERR_NONE; } offset += pHeader->mLength; } // TLV not found return eGOBI_ERR_INVALID_RSP; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000Translation.h000077500000000000000000000654731455567757300271350ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.h DESCRIPTION: QUALCOMM Tanslation for Gobi 3000 Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include #include #include "GobiConnectionMgmtAPIStructs.h" //--------------------------------------------------------------------------- // Prototypes //--------------------------------------------------------------------------- // Get a TLV ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ); // WDS ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ); ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ); ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ); ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ); ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ); ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ); ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ); ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ); ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ); ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ); ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ); ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ); ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ); ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ); // NAS ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ); ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ); ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ); ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ); ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ); ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ); ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ); ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ); ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ); ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ); // DMS ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ); ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ); ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ); ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ); ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ); ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ); ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ); ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ); ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ); ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ); ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); // SMS ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ); ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ); ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ); ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ); ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ); ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ); ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ); ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ); ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ); // DMS UIM ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ); ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ); ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ); ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // PDS ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ); ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ); ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ); ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ); ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ); ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ); ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ); ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ); ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ); ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ); // CAT ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ); ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ); // RMS ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ); ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ); // OMADM ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ); ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ); ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ); ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ); ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ); ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ); // Voice ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationCAT.cpp000077500000000000000000000135341455567757300300070ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationCAT.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Card Application Toolkit Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackCATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATSendTerminalResponseRequest_TerminalResponseType * pTLVx01; pTLVx01 = (sCATSendTerminalResponseRequest_TerminalResponseType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mReferenceID = refID; pTLVx01->mTerminalResponseLength = (UINT16)dataLen; offset += sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackCATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || dataLen == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATEnvelopeCommandRequest_EnvelopeCommand * pTLVx01; pTLVx01 = (sCATEnvelopeCommandRequest_EnvelopeCommand*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mEnvelopeCommandType = (eQMICATEnvelopeCommandType)cmdID; pTLVx01->mEnvelopeLength = (UINT16)dataLen; offset += sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationDMS.cpp000077500000000000000000001200731455567757300300200ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationDMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { // Validate arguments if (pIn == 0 || pMaxTXChannelRate == 0 || pMaxRXChannelRate == 0 || pDataServiceCapability == 0 || pSimCapability == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxRadioIfaces = (ULONG)*pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; const sDMSGetDeviceCapabilitiesResponse_Capabilities * pTLVx01; ULONG structSzx01 = sizeof( sDMSGetDeviceCapabilitiesResponse_Capabilities ); ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < structSzx01) { return eGOBI_ERR_BUFFER_SZ; } // Populate the variables *pMaxTXChannelRate = pTLVx01->mMaxTXRatebps; *pMaxRXChannelRate = pTLVx01->mMaxRXRatebps; *pDataServiceCapability = pTLVx01->mDataServiceCapability; // SIM capability should be treated as a boolean, even though it's not *pSimCapability = (pTLVx01->mSIMSupported == 0 ? 0 : 1); ULONG activeRadioIfaces = pTLVx01->mRadioInterfaceCount; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMIDMSRadioInterfaces * pInRadioInterfaces; // Verify there is room for the array in the TLV if (outLenx01 < structSzx01 + sizeof( eQMIDMSRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRadioInterfaces = (const eQMIDMSRadioInterfaces *) ((const BYTE *)pTLVx01 + structSzx01); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pInRadioInterfaces; pOutRadioIfaces++; pInRadioInterfaces++; } *pRadioIfacesSize = activeRadioIfaces; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the manufacturer // sDMSGetDeviceManfacturerResponse_Manfacturer only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the model // sDMSGetDeviceModelResponse_Model only contains the model const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the PRI revision // sDMSGetDeviceRevisionResponse_UQCNRevision only contains this const CHAR * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx11, outLenx11 ); pString[outLenx11] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { // Validate arguments if (pIn == 0 || amssSize == 0 || pAMSSString == 0 || bootSize == 0 || pBootString == 0 || priSize == 0 || pPRIString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pAMSSString = 0; *pBootString = 0; *pPRIString = 0; // Find the AMSS version // sDMSGetDeviceRevisionResponse_Revision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (amssSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAMSSString, pTLVx01, outLenx01 ); pAMSSString[outLenx01] = 0; // Find the Boot version // sDMSGetDeviceRevisionResponse_BootCodeRevision only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (bootSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pBootString, pTLVx10, outLenx10 ); pBootString[outLenx10] = 0; // The PRI version is returned by ParseGetFirmwareRevision() rc = ParseGetFirmwareRevision( inLen, pIn, priSize, pPRIString ); if (rc != eGOBI_ERR_NONE) { return rc; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { // Validate arguments if (pIn == 0 || voiceNumberSize == 0 || pVoiceNumber == 0 || minSize == 0 || pMIN == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pVoiceNumber = 0; *pMIN = 0; // Find the Voice number // sDMSGetDeviceVoiceNumberResponse_VoiceNumber only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (voiceNumberSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pVoiceNumber, pTLVx01, outLenx01 ); pVoiceNumber[outLenx01] = 0; // Find the Mobile ID (optional) // sDMSGetDeviceVoiceNumberResponse_MobileIDNumber only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Space to perform the copy? if (minSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMIN, pTLVx10, outLenx10 ); pMIN[outLenx10] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the IMSI // sDMSGetDeviceVoiceNumberResponse_IMSI only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { // Validate arguments if (pIn == 0 || esnSize == 0 || pESNString == 0 || imeiSize == 0 || pIMEIString == 0 || meidSize == 0 || pMEIDString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pESNString = 0; *pIMEIString = 0; *pMEIDString = 0; // Find the ESN // sDMSGetDeviceSerialNumbersResponse_ESN only contains this const CHAR * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (esnSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pESNString, pTLVx10, outLenx10 ); pESNString[outLenx10] = 0; // Find the IMEI // sDMSGetDeviceSerialNumbersResponse_IMEI only contains this const CHAR * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (imeiSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pIMEIString, pTLVx11, outLenx11 ); pIMEIString[outLenx11] = 0; // Find the MEID // sDMSGetDeviceSerialNumbersResponse_MEID only contains this const CHAR * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (meidSize < outLenx12 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMEIDString, pTLVx12, outLenx12 ); pMEIDString[outLenx12] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string thePIN( pCurrentPIN ); if (thePIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (thePIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockStateRequest_LockState ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockStateRequest_LockState * pTLVx01; pTLVx01 = (sDMSSetLockStateRequest_LockState*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mLockState = (eQMIDMSLockStates)state; memcpy( &pTLVx01->mLockCode[0], thePIN.c_str(), thePIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseQueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetLockStateResponse_LockState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetLockStateResponse_LockState )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mLockState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pCurrentPIN [ I ] - Current four digit PIN string pDesiredPIN [ I ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0 || pDesiredPIN == 0 || pDesiredPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string theCurPIN( pCurrentPIN ); if (theCurPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theCurPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } std::string theNewPIN( pDesiredPIN ); if (theNewPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theNewPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockCodeRequest_LockCode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockCodeRequest_LockCode * pTLVx01; pTLVx01 = (sDMSSetLockCodeRequest_LockCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mCurrentLockCode[0], theCurPIN.c_str(), theCurPIN.size() ); memcpy( &pTLVx01->mNewLockCode[0], theNewPIN.c_str(), theNewPIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the hardware revision // sDMSGetHardwareRevisionResponse_HardwareRevision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ) { // Validate arguments if (pIn == 0 || pPRLVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetPRLVersionResponse_PRLVersion * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetPRLVersionResponse_PRLVersion )) { return eGOBI_ERR_MALFORMED_RSP; } *pPRLVersion = pTLVx01->mPRLVersion; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ) { // Validate arguments if (pIn == 0 || pFileSize == 0 || *pFileSize == 0 || pFile == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure ULONG maxFileSize = *pFileSize; *pFileSize = 0; // Find the state const sDMSReadERIDataResponse_UserData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG fileSz = pTLVx01->mDataLength; const BYTE * pInFile; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData ) + sizeof( BYTE ) * fileSz) { return eGOBI_ERR_MALFORMED_RSP; } // Space to copy into? if (fileSz > maxFileSize) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pInFile = (const BYTE *)pTLVx01 + sizeof( sDMSReadERIDataResponse_UserData ); // Perform the copy memcpy( pFile, pInFile, fileSz ); *pFileSize = fileSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ) { // Validate arguments if (pOut == 0 || pActivationCode == 0 || pActivationCode[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string ac( pActivationCode ); if (ac.size() > 12) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSActivateAutomaticRequest_ActivationCode ) + (WORD)ac.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSActivateAutomaticRequest_ActivationCode * pTLVx01; pTLVx01 = (sDMSActivateAutomaticRequest_ActivationCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mCodeLength = (UINT8)ac.size(); memcpy( (BYTE *)pTLVx01 + sizeof( sDMSActivateAutomaticRequest_ActivationCode ), ac.c_str(), ac.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults CHANGES: * The client must manually reset the device after this request completes using DMSSetOperatingMode() PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSResetFactoryDefaultsRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSResetFactoryDefaultsRequest_SPC * pTLVx01; pTLVx01 = (sDMSResetFactoryDefaultsRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ) { // Validate arguments if (pIn == 0 || pActivationState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetActivationStateResponse_ActivationState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetActivationStateResponse_ActivationState )) { return eGOBI_ERR_MALFORMED_RSP; } *pActivationState = pTLVx01->mActivationState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetOperatingModeRequest_OperatingMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Set the mode sDMSSetOperatingModeRequest_OperatingMode * pTLVx01; pTLVx01 = (sDMSSetOperatingModeRequest_OperatingMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mOperatingMode = (eQMIDMSOperatingModes)powerMode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ) { // Validate arguments if (pIn == 0 || pPowerMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = 0xffffffff; // Find the mode const sDMSGetOperatingModeResponse_OperatingMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetOperatingModeResponse_OperatingMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pPowerMode = pTLVx01->mOperatingMode; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pIn == 0 || pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pReasonMask = 0; *pbPlatform = 0; // Find the reason mask (optional) const sDMSGetOperatingModeResponse_OfflineReason * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sDMSGetOperatingModeResponse_OfflineReason )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the bitmask to pReasonMask *pReasonMask = *(WORD*)pTLVx10; } // Find the platform restriction (optional) const sDMSGetOperatingModeResponse_PlatformRestricted * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sDMSGetOperatingModeResponse_PlatformRestricted )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the value *pbPlatform = pTLVx11->mPlatformRestricted; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTimeCount [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ) { // Validate arguments if (pIn == 0 || pTimeCount == 0 || pTimeSource == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the reason mask const sDMSGetTimestampResponse_Timestamp * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetTimestampResponse_Timestamp )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pTimeCount = pTLVx01->mTimestamp; // mSource is of type eQMIDMSTimestampSources *pTimeSource = pTLVx01->mSource; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSValidateSPCRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSValidateSPCRequest_SPC * pTLVx01; pTLVx01 = (sDMSValidateSPCRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationNAS.cpp000077500000000000000000001621541455567757300300240ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationNAS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (NAS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" // Maximum length for a scanned network description const ULONG MAX_SNI_DESCRIPTION_LEN = 255; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sEVDOCustomSCPConfig // Struct to represent CDMA 1xEV-DO custom SCP config /*=========================================================================*/ struct sEVDOCustomSCPConfig { public: BYTE mbActive; ULONG mProtocolMask; ULONG mBroadcastMask; ULONG mApplicationMask; }; /*=========================================================================*/ // Struct sScannedNetworkInfo // Struct to represent scanned network information /*=========================================================================*/ struct sScannedNetworkInfo { public: USHORT mMCC; USHORT mMNC; ULONG mInUse; ULONG mRoaming; ULONG mForbidden; ULONG mPreferred; CHAR mDescription[MAX_SNI_DESCRIPTION_LEN]; }; /*=========================================================================*/ // Struct sScannedNetworkRATInfo // Struct to represent scanned network RAT information /*=========================================================================*/ struct sScannedNetworkRATInfo { public: USHORT mMCC; USHORT mMNC; ULONG mRAT; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: ParseGetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ) { // Validate arguments if (pIn == 0 || pStatus == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sNASGetANAAAAuthenticationStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetANAAAAuthenticationStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pStatus = pTLVx01->mANAAAAuthenticationStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSignalStrength DESCRIPTION: This function gets the current signal strength (in dBm) as measured by the device, the signal strength returned will be one of the currently available technologies with preference CDMA 1xEV-DO, CDMA, AMPS, WCDMA, GSM PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSignalStrength [ O ] - Received signal strength (dBm) pRadioInterface [ O ] - Radio interface technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ) { // Validate arguments if (pSignalStrength == 0 || pRadioInterface == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG sigSz = 12; INT8 sigs[12]; ULONG radios[12]; ULONG qcErr = ParseGetSignalStrengths( inLen, pIn, &sigSz, &sigs[0], &radios[0] ); if (qcErr != eGOBI_ERR_NONE) { return qcErr; } std::map sigMap; for (ULONG s = 0; s < sigSz; s++) { sigMap[radios[s]] = sigs[s]; } std::map ::const_iterator pIter; // HDR? pIter = sigMap.find( 2 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // CDMA? pIter = sigMap.find( 1 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // AMPS? pIter = sigMap.find( 3 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // WCDMA? pIter = sigMap.find( 5 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // GSM? pIter = sigMap.find( 4 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // Error values *pSignalStrength = -128; *pRadioInterface = 0; return eGOBI_ERR_NO_SIGNAL; } /*=========================================================================== METHOD: ParseGetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { // Validate arguments if (pIn == 0 || pArraySizes == 0 || *pArraySizes == 0 || pSignalStrengths == 0 || pRadioInterfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSignals = (ULONG)*pArraySizes; // Assume failure *pArraySizes = 0; // Find the first signal strength value const sNASGetSignalStrengthResponse_SignalStrength * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetSignalStrengthResponse_SignalStrength )) { return eGOBI_ERR_MALFORMED_RSP; } // Weed out bogus values std::map sigMap; INT8 sigVal = pTLVx01->mSignalStrengthdBm; ULONG radioVal = pTLVx01->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Handle list, if present const sNASGetSignalStrengthResponse_SignalStrengthList * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG auxSigs = pTLVx10->mNumberOfInfoInstances; if (auxSigs > maxSignals) { auxSigs = maxSignals; } const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo * pInfo; // Verify there is room for the array in the TLV if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList ) + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList::sInfo ) * auxSigs) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInfo = (const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )); for (ULONG s = 0; s < auxSigs; s++) { sigVal = pInfo->mSignalStrengthdBm; radioVal = pInfo->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Move pInfo forward one element pInfo++; } } ULONG sigCount = 0; std::map ::const_iterator pIter; for (pIter = sigMap.begin(); pIter != sigMap.end(); pIter++, sigCount++) { if (sigCount < maxSignals) { pSignalStrengths[sigCount] = pIter->second; pRadioInterfaces[sigCount] = pIter->first; *pArraySizes = sigCount + 1; } } // No valid signals? if (sigCount == 0) { return eGOBI_ERR_NO_SIGNAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetRFInfo DESCRIPTION: This function gets the current RF information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pInstanceSize; *pInstanceSize = 0; // Find the TLV const sNASGetRFInfoResponse_RFInfo * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE ifaceCount = pTLVx01->mNumberOfInstances; if (ifaceCount > maxInstances) { ifaceCount = maxInstances; } const sNASGetRFInfoResponse_RFInfo::sInstance * pInstance; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo ) + sizeof( sNASGetRFInfoResponse_RFInfo::sInstance ) * ifaceCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInstance = (const sNASGetRFInfoResponse_RFInfo::sInstance *) ((const BYTE *)pTLVx01 + sizeof( sNASGetRFInfoResponse_RFInfo )); ULONG * pOutput = (ULONG *)pInstances; for (BYTE i = 0; i < ifaceCount; i++) { *pOutput++ = pInstance->mRadioInterface; *pOutput++ = pInstance->mActiveBandClass; *pOutput++ = pInstance->mActiveChannel; // Move pInstance forward one element pInstance++; } *pInstanceSize = ifaceCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; // Assume failure *pInstanceSize = 0; // Find the TLV const sNASPerformNetworkScanResponse_NetworkInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sNASPerformNetworkScanResponse_NetworkInfo )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 netCount = pTLVx10->mNumberOfInfoInstances; if (netCount > maxInstances) { netCount = maxInstances; } const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo * pNetInfo; // Align to the first array element pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASPerformNetworkScanResponse_NetworkInfo )); ULONG offset = sizeof( sNASPerformNetworkScanResponse_NetworkInfo ); sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } pNet->mMCC = pNetInfo->mMobileCountryCode; pNet->mMNC = pNetInfo->mMobileNetworkCode; pNet->mInUse = pNetInfo->mInUseStatus; pNet->mRoaming = pNetInfo->mRoamingStatus; pNet->mForbidden = pNetInfo->mForbiddenStatus; pNet->mPreferred = pNetInfo->mPreferredStatus; memset( &pNet->mDescription[0], 0, MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pNetInfo->mDescriptionLength; if (descLen > 0) { // Move pNetInfo forward pNetInfo++; offset += sizeof( sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo ); // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } std::string netDesc( (LPCSTR)pNetInfo ); ULONG actualLen = (ULONG)netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } LPCSTR pNetDesc = netDesc.c_str(); memcpy( &pNet->mDescription[0], pNetDesc, actualLen ); // Move pNetInfo past string pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pNetInfo + descLen); offset += descLen; } pNet++; } *pInstanceSize = (BYTE)netCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0 || pRATSize == 0 || *pRATSize == 0 || pRATInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRATInstances = *pRATSize; // Assume failure *pInstanceSize = 0; *pRATSize = 0; // First, generate the instances using ParsePerformNetworkScan ULONG rc = ParsePerformNetworkScan( inLen, pIn, pInstanceSize, pInstances ); if (rc != eGOBI_ERR_NONE) { return rc; } // Now find the RAT info too // Find the TLV const sNASPerformNetworkScanResponse_NetworkRAT * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 ratCount = pTLVx11->mNumberOfInfoInstances; if (ratCount > maxRATInstances) { ratCount = maxRATInstances; } const sNASPerformNetworkScanResponse_NetworkRAT::sInfo * pRatInfo; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT ) + sizeof( sNASPerformNetworkScanResponse_NetworkRAT::sInfo ) * ratCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRatInfo = (const sNASPerformNetworkScanResponse_NetworkRAT::sInfo *) ((const BYTE *)pTLVx11 + sizeof( sNASPerformNetworkScanResponse_NetworkRAT )); sScannedNetworkRATInfo * pRAT = (sScannedNetworkRATInfo *)pRATInstances; for (BYTE r = 0; r < ratCount; r++) { pRAT->mMCC = pRatInfo->mMobileCountryCode; pRAT->mMNC = pRatInfo->mMobileNetworkCode; pRAT->mRAT = pRatInfo->mRadioAccessTechnology; pRAT++; pRatInfo++; } *pRATSize = (BYTE)ratCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the action // Check size WORD tlvx01Sz = sizeof( sNASInitiateNetworkRegisterRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_Action * pTLVx01; pTLVx01 = (sNASInitiateNetworkRegisterRequest_Action*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mRegisterAction = (eQMINASRegisterActions)regType; offset += tlvx01Sz; // Set the info // Check size WORD tlvx10Sz = sizeof( sNASInitiateNetworkRegisterRequest_ManualInfo ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_ManualInfo * pTLVx10; pTLVx10 = (sNASInitiateNetworkRegisterRequest_ManualInfo*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMobileCountryCode = mcc; pTLVx10->mMobileNetworkCode = mnc; pTLVx10->mRadioAccessTechnology = (eQMINASRadioAccessTechnologies)rat; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASInitiateAttachRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateAttachRequest_Action * pTLVx10; pTLVx10 = (sNASInitiateAttachRequest_Action*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mPSAttachAction = (eQMINASPSAttachActions)action; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { // Validate arguments if (pIn == 0 || pRegistrationState == 0 || pCSDomain == 0 || pPSDomain == 0 || pRAN == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0 || pRoaming == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRadioIfaces = *pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; *pRoaming = 0xffffffff; *pMCC = 0xffff; *pMNC = 0xffff; *pName = 0; // Parse the serving system (mandatory) // Find the TLV const sNASGetServingSystemResponse_ServingSystem * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pRegistrationState = pTLVx01->mRegistrationState; *pCSDomain = pTLVx01->mCSAttachState; *pPSDomain = pTLVx01->mPSAttachState; *pRAN = pTLVx01->mRegisteredNetwork; BYTE activeRadioIfaces = pTLVx01->mNumberOfRadioInterfacesInUse; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMINASRadioInterfaces * pRadioInfo; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem ) + sizeof( eQMINASRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRadioInfo = (const eQMINASRadioInterfaces *) ((const BYTE *)pTLVx01 + sizeof( sNASGetServingSystemResponse_ServingSystem )); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pRadioInfo; pOutRadioIfaces++; pRadioInfo++; } *pRadioIfacesSize = activeRadioIfaces; // Find the roaming indicator (optional) const sNASGetServingSystemResponse_RoamingIndicator * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetServingSystemResponse_RoamingIndicator )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pRoaming = (eQMINASRoamingIndicators)pTLVx10->mRoamingIndicator; } // Find the PLMN (optional) const sNASGetServingSystemResponse_CurrentPLMN * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN )) { return eGOBI_ERR_MALFORMED_RSP; } *pMCC = pTLVx12->mMobileCountryCode; *pMNC = pTLVx12->mMobileNetworkCode; ULONG descLen = pTLVx12->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx12 + sizeof( sNASGetServingSystemResponse_CurrentPLMN )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ) { // Validate arguments if (pIn == 0 || pDataCapsSize == 0 || *pDataCapsSize == 0 || pDataCaps == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxDataCaps = *pDataCapsSize; // Assume failure *pDataCapsSize = 0; // Find the TLV const sNASGetServingSystemResponse_DataServices * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE activeDataCaps = pTLVx11->mNumberOfDataCapabilities; if (activeDataCaps > maxDataCaps) { activeDataCaps = maxDataCaps; } const eQMINASDataServiceCapabilities2 * pInDataCaps; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices ) + sizeof( eQMINASDataServiceCapabilities2 ) * activeDataCaps) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInDataCaps = (const eQMINASDataServiceCapabilities2 *) ((const BYTE *)pTLVx11 + sizeof( sNASGetServingSystemResponse_DataServices )); ULONG * pOutDataCaps = (ULONG *)pDataCaps; for (ULONG d = 0; d < activeDataCaps; d++) { *pOutDataCaps = *pInDataCaps; pOutDataCaps++; pInDataCaps++; } *pDataCapsSize = activeDataCaps; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { // Validate arguments if (pIn == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0 || pSID == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pName = 0; *pSID = 0xffff; *pNID = 0xffff; // Find the name (mandatory) const sNASGetHomeNetworkResponse_HomeNetwork * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pMCC = pTLVx01->mMobileCountryCode; *pMNC = pTLVx01->mMobileNetworkCode; ULONG descLen = pTLVx01->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx01 + sizeof( sNASGetHomeNetworkResponse_HomeNetwork )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; // Find the SID/NID (optional) const sNASGetHomeNetworkResponse_HomeIDs * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetHomeNetworkResponse_HomeIDs )) { return eGOBI_ERR_MALFORMED_RSP; } *pSID = pTLVx10->mSystemID; *pNID = pTLVx10->mNetworkID; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetTechnologyPreferenceRequest_Preference ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetTechnologyPreferenceRequest_Preference * pTLVx01; pTLVx01 = (sNASSetTechnologyPreferenceRequest_Preference*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Copy technology preference WORD as-is memcpy( &pTLVx01->mValOfTechnology, &technologyPref, 2 ); pTLVx01->mDuration = (eQMINASTechPrefDurations)duration; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { // Validate arguments if (pIn == 0 || pTechnologyPref == 0 || pDuration == 0 || pPersistentTechnologyPref == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the preference (mandatory) const sNASGetTechnologyPreferenceResponse_ActivePreference * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetTechnologyPreferenceResponse_ActivePreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pTechnologyPref, &pTLVx01->mValOfTechnology, 2 ); *pDuration = pTLVx01->mDuration; // Until we know any better the persistent setting is the current setting *pPersistentTechnologyPref = *pTechnologyPref; // Find the persistant technology preference (optional) const sNASGetTechnologyPreferenceResponse_PersistentPreference * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetTechnologyPreferenceResponse_PersistentPreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pPersistentTechnologyPref, &pTLVx10->mValOfTechnology, 2 ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // If you specify one of the custom SCP config fields then you must // specify them all ULONG scpCount = 0; if (pCustomSCP != 0) { scpCount++; } if (pProtocol != 0) { scpCount++; } if (pBroadcast != 0) { scpCount++; } if (pApplication != 0) { scpCount++; } if (scpCount != 0 && scpCount != 4) { return eGOBI_ERR_INVALID_ARG; } // Rev. 0 and SCP custom config are mutually exclusive if (pForceRev0 != 0 && scpCount == 4) { if (*pForceRev0 != 0 && *pCustomSCP != 0) { return eGOBI_ERR_INVALID_ARG; } } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Need to start with SPC? if (pForceRev0 != 0 || scpCount == 4) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASSetNetworkParametersRequest_SPC ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_SPC * pTLVx10; pTLVx10 = (sNASSetNetworkParametersRequest_SPC*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values memcpy( &pTLVx10->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx10Sz; } // Force Rev. 0? if (pForceRev0 != 0) { // Check size WORD tlvx14Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDORevision ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDORevision * pTLVx14; pTLVx14 = (sNASSetNetworkParametersRequest_CDMA1xEVDORevision*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mForceCDMA1xEVDORev0 = (*pForceRev0 == 0 ? 0 : 1); offset += tlvx14Sz; } if (scpCount == 4) { // Check size WORD tlvx15Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom * pTLVx15; pTLVx15 = (sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the values pTLVx15->mCDMA1xEVDOSCPCustomConfig = (*pCustomSCP == 0 ? 0 : 1); // The pProtocol bitmask pTLVx15->mSubtype2PhysicalLayer = (*pProtocol & 0x00000001 ? 1 : 0); pTLVx15->mEnhancedCCMAC = (*pProtocol & 0x00000002 ? 1 : 0); pTLVx15->mEnhancedACMAC = (*pProtocol & 0x00000004 ? 1 : 0); pTLVx15->mEnhancedFTCMAC = (*pProtocol & 0x00000008 ? 1 : 0); pTLVx15->mSubtype3RTCMAC = (*pProtocol & 0x00000010 ? 1 : 0); pTLVx15->mSubtype1RTCMAC = (*pProtocol & 0x00000020 ? 1 : 0); pTLVx15->mEnhancedIdle = (*pProtocol & 0x00000040 ? 1 : 0); pTLVx15->mGenericMultimodeCapableDiscPort = (*pProtocol & 0x00000080 ? 1 : 0); pTLVx15->mGenericBroadcast = (*pBroadcast & 0x00000001 ? 1 : 0); pTLVx15->mSNMultiflowPacketApplication = (*pApplication & 0x00000001 ? 1 : 0); pTLVx15->mSNEnhancedMultiflowPacketApplication = (*pApplication & 0x00000002 ? 1 : 0); offset += tlvx15Sz; } if (pRoaming != 0) { // Check size WORD tlvx16Sz = sizeof( sNASSetNetworkParametersRequest_Roaming ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_Roaming * pTLVx16; pTLVx16 = (sNASSetNetworkParametersRequest_Roaming*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the values pTLVx16->mRoamPreference = (eQMINASRoamingPreferences)*pRoaming; offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset == 0) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetCDMANetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pIn == 0 || pSCI == 0 || pSCM == 0 || pRegHomeSID == 0 || pRegForeignSID == 0 || pRegForeignNID == 0 || pForceRev0 == 0 || pCustomSCP == 0 || pProtocol == 0 || pBroadcast == 0 || pApplication == 0 || pRoaming == 0) { return eGOBI_ERR_INVALID_ARG; } *pSCI = 0xff; *pSCM = 0xff; *pRegHomeSID = 0xff; *pRegForeignSID = 0xff; *pRegForeignNID = 0xff; *pForceRev0 = 0xff; *pCustomSCP = 0xff; *pProtocol = 0xffffffff; *pBroadcast = 0xffffffff; *pApplication = 0xffffffff; *pRoaming = 0xff; // Find the SCI const sNASGetNetworkParametersResponse_SCI * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sNASGetNetworkParametersResponse_SCI )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCI = pTLVx11->mSlotCycleIndex; } // Find the SCM const sNASGetNetworkParametersResponse_SCM * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetNetworkParametersResponse_SCM )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCM = pTLVx12->mStationClassMark; } // Find the Registration const sNASGetNetworkParametersResponse_Registration * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sNASGetNetworkParametersResponse_Registration )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx13->mRegisterOnHomeSystem; *pRegForeignSID = pTLVx13->mRegisterOnForeignSystem; *pRegForeignNID = pTLVx13->mRegisterOnForeignNetwork; } // Rev. 0? const sNASGetNetworkParametersResponse_CDMA1xEVDORevision * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sNASGetNetworkParametersResponse_CDMA1xEVDORevision )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx14->mForceCDMA1xEVDORev0; } // We're lazy, so we'll just typecast all the bitmask members from // sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom into their // respective container parameters const sEVDOCustomSCPConfig * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sEVDOCustomSCPConfig )) { return eGOBI_ERR_MALFORMED_RSP; } *pCustomSCP = pTLVx15->mbActive; *pProtocol = pTLVx15->mProtocolMask; *pBroadcast = pTLVx15->mBroadcastMask; *pApplication = pTLVx15->mApplicationMask; } // Roaming? const sNASGetNetworkParametersResponse_Roaming * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sNASGetNetworkParametersResponse_Roaming )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoaming = (eQMINASRoamingPreferences)pTLVx16->mRoamPreference; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ) { // Validate arguments if (pIn == 0 || pACCOLC == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the ACCOLC (mandatory) const sNASGetACCOLCResponse_ACCOLC * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetACCOLCResponse_ACCOLC )) { return eGOBI_ERR_MALFORMED_RSP; } *pACCOLC = pTLVx01->mACCOLC; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetACCOLCRequest_ACCOLC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetACCOLCRequest_ACCOLC * pTLVx01; pTLVx01 = (sNASSetACCOLCRequest_ACCOLC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mACCOLC = accolc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode (mandatory) const sNASGetCSPPLMNModeResponse_Mode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx10 < sizeof( sNASGetCSPPLMNModeResponse_Mode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mRestrictManualPLMNSelection; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASGetPLMNNameRequest_PLMN ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASGetPLMNNameRequest_PLMN * pTLVx01; pTLVx01 = (sNASGetPLMNNameRequest_PLMN*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMobileCountryCode = mcc; pTLVx01->mMobileNetworkCode = mnc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ) { // Validate arguments if (pIn == 0 || *pNamesSize == 0 || pNames == 0) { return eGOBI_ERR_INVALID_ARG; } const BYTE * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // The output format just happens to be the same as // sNASGetPLMNNameResponse_Name. Copy the full TLV to pNames if (outLenx10 > *pNamesSize) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNames, pTLVx10, outLenx10 ); *pNamesSize = outLenx10; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationOMA.cpp000077500000000000000000000336101455567757300300110ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationOMA.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (OMADM Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackOMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add sessionType // Check size WORD tlvx10Sz = sizeof( sOMAStartSessionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMAStartSessionRequest_Type * pTLVx10; pTLVx10 = (sOMAStartSessionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSessionType = (eQMIOMASessionTypes)sessionType; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { // Validate arguments if (pIn == 0 || pSessionState == 0 || pSessionType == 0 || pFailureReason == 0 || pRetryCount == 0 || pSessionPause == 0 || pTimeRemaining == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetSessionInfoResponse_Info * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetSessionInfoResponse_Info )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionState = pTLVx10->mSessionState; *pSessionType = pTLVx10->mSessionType; // Find the second TLV const sOMAGetSessionInfoResponse_Failure * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sOMAGetSessionInfoResponse_Failure )) { return eGOBI_ERR_MALFORMED_RSP; } *pFailureReason = pTLVx11->mSessionFailure; // Find the third TLV const sOMAGetSessionInfoResponse_Retry * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sOMAGetSessionInfoResponse_Retry )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryCount = pTLVx12->mRetryCount; *pSessionPause = pTLVx12->mRetryPauseTimer; *pTimeRemaining = pTLVx12->mRemainingTime; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ) { // Validate arguments if (pIn == 0 || pSessionType == 0 || pSessionID == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sOMAGetSessionInfoResponse_NIA * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sOMAGetSessionInfoResponse_NIA )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionID = pTLVx13->mSessionID; *pSessionType = pTLVx13->mSessionType; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add selection and session ID // Check size WORD tlvx10Sz = sizeof( sOMASendSelectionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASendSelectionRequest_Type * pTLVx10; pTLVx10 = (sOMASendSelectionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mSelection = (eQMIOMASelections)selection; pTLVx10->mSessionID = sessionID; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { // Validate arguments if (pIn == 0 || pbProvisioning == 0 || pbPRLUpdate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetFeaturesResponse_Provisioning * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_Provisioning )) { return eGOBI_ERR_MALFORMED_RSP; } *pbProvisioning = pTLVx10->mDeviceProvisioningServiceUpdateEnabled; // Find the second TLV const sOMAGetFeaturesResponse_PRLUpdate * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_PRLUpdate )) { return eGOBI_ERR_MALFORMED_RSP; } *pbPRLUpdate = pTLVx11->mPRLServiceUpdateEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bProvisioning // Check size WORD tlvx10Sz = sizeof( sOMASetFeaturesRequest_Provisioning ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_Provisioning * pTLVx10; pTLVx10 = (sOMASetFeaturesRequest_Provisioning*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mDeviceProvisioningServiceUpdateEnabled = (INT8)bProvisioning; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bPRLUpdate // Check size WORD tlvx11Sz = sizeof( sOMASetFeaturesRequest_PRLUpdate ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_PRLUpdate * pTLVx11; pTLVx11 = (sOMASetFeaturesRequest_PRLUpdate*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPRLServiceUpdateEnabled = (INT8)bPRLUpdate; offset += tlvx11Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationPDS.cpp000077500000000000000000001033451455567757300300260ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationPDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Position Determination Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ) { // Validate arguments (at least one mask must be present) if (pOut == 0 || (pGPSDataMask == 0 && pCellDataMask == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Optionally add pGPSDataMask if (pGPSDataMask != 0) { // Check size WORD tlvx10Sz = sizeof( sPDSResetPDSDataRequest_GPSData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_GPSData * pTLVx10; pTLVx10 = (sPDSResetPDSDataRequest_GPSData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx10 = *pGPSDataMask; offset += tlvx10Sz; } // Optionally add pCellDataMask if (pCellDataMask != 0) { // Check size WORD tlvx11Sz = sizeof( sPDSResetPDSDataRequest_CellData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_CellData * pTLVx11; pTLVx11 = (sPDSResetPDSDataRequest_CellData*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx11 = *pCellDataMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetCOMPortAutoTrackingConfigRequest_Config ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetCOMPortAutoTrackingConfigRequest_Config * pTLVx01; pTLVx01 = (sPDSSetCOMPortAutoTrackingConfigRequest_Config*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetCOMPortAutoTrackingConfigResponse_Config * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetCOMPortAutoTrackingConfigResponse_Config )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceAutoTrackingStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceAutoTrackingStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceAutoTrackingStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetServiceAutoTrackingStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceAutoTrackingStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetAGPSConfigRequest_Server ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetAGPSConfigRequest_Server * pTLVx10; pTLVx10 = (sPDSSetAGPSConfigRequest_Server*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (serverAddress & 0x000000FF); ULONG ip1 = (serverAddress & 0x0000FF00) >> 8; ULONG ip2 = (serverAddress & 0x00FF0000) >> 16; ULONG ip3 = (serverAddress & 0xFF000000) >> 24; // Set the values pTLVx10->mServerAddress[0] = (INT8)ip0; pTLVx10->mServerAddress[1] = (INT8)ip1; pTLVx10->mServerAddress[2] = (INT8)ip2; pTLVx10->mServerAddress[3] = (INT8)ip3; pTLVx10->mServerPort = serverPort; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ) { // Validate arguments if (pIn == 0 || pServerAddress == 0 || pServerPort == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetAGPSConfigResponse_ServerAddress * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetAGPSConfigResponse_ServerAddress )) { return eGOBI_ERR_MALFORMED_RSP; } *pServerPort = pTLVx01->mServerPort; ULONG ip0 = (ULONG)pTLVx01->mServerAddress[0]; ULONG ip1 = (ULONG)pTLVx01->mServerAddress[1] << 8; ULONG ip2 = (ULONG)pTLVx01->mServerAddress[2] << 16; ULONG ip3 = (ULONG)pTLVx01->mServerAddress[3] << 24; *pServerAddress = (ip0 | ip1 | ip2 | ip3); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRATime ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRATime * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRATime*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRATime * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRATime )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRAData ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRAData * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRAData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRAData * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRAData )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { // Validate arguments if (pIn == 0 || pGPSWeek == 0 || pGPSWeekOffset == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Validity * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sPDSGetXTRAParametersResponse_Validity )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx13->mValidPeriodDurationInHours; *pGPSWeek = pTLVx13->mValidPeriodGPSStartWeek; *pGPSWeekOffset = pTLVx13->mValidPeriodGPSStartWeekOffsetInMinutes; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add preference // Check size WORD tlvx12Sz = sizeof( sPDSSetXTRAParametersRequest_Network ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Network * pTLVx12; pTLVx12 = (sPDSSetXTRAParametersRequest_Network*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mWWANNetworkPreference = (eQMIPDSWWANNetworkPreferences)preference; offset += tlvx12Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ) { // Validate arguments if (pIn == 0 || pPreference == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pPreference const sPDSGetXTRAParametersResponse_Network * pTLVx12; ULONG outLenx12; ULONG rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sPDSGetXTRAParametersResponse_Network )) { return eGOBI_ERR_MALFORMED_RSP; } *pPreference = pTLVx12->mWWANNetworkPreference; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetXTRAParametersRequest_Automatic ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Automatic * pTLVx10; pTLVx10 = (sPDSSetXTRAParametersRequest_Automatic*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutomaticDownloadEnabled = (bEnabled == 0 ? 0 : 1); pTLVx10->mDownloadIntervalInHours = interval; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pInterval == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Automatic * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetXTRAParametersResponse_Automatic )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mAutomaticDownloadEnabled; *pInterval = pTLVx10->mDownloadIntervalInHours; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pTracking == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetServiceStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx01->mServiceEnabled; *pTracking = pTLVx01->mTrackingSessionState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add enable // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mServiceEnabled = (enable == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackPDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSInjectTimeReferenceRequest_Time ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSInjectTimeReferenceRequest_Time * pTLVx01; pTLVx01 = (sPDSInjectTimeReferenceRequest_Time*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mSystemTimeMilliseconds = systemTime; pTLVx01->mSystemDiscontinuties = systemDiscontinuities; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { // Validate arguments if (pIn == 0 || pOperation == 0 || pTimeout == 0 || pInterval == 0 || pAccuracy == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetDefaultsResponse_Defaults * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetDefaultsResponse_Defaults )) { return eGOBI_ERR_MALFORMED_RSP; } *pOperation = pTLVx01->mSessionOperation; *pTimeout = pTLVx01->mTimeoutSeconds; *pInterval = pTLVx01->mFixRequestIntervalSeconds; *pAccuracy = pTLVx01->mDesiredAccuracyMeters; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSSetDefaultsRequest_Defaults ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetDefaultsRequest_Defaults * pTLVx01; pTLVx01 = (sPDSSetDefaultsRequest_Defaults*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mDesiredAccuracyMeters = accuracy; pTLVx01->mFixRequestIntervalSeconds = interval; pTLVx01->mSessionOperation = (eQMIPDSOperationTypes)operation; pTLVx01->mTimeoutSeconds = timeout; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationRMS.cpp000077500000000000000000000134261455567757300300410ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationRMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Remote Management Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pWakeMask == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sRMSGetSMSWakeResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sRMSGetSMSWakeResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } // Find the second TLV const sRMSGetSMSWakeRequest_Mask * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sRMSGetSMSWakeRequest_Mask )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mSMSWakeEnabled; *pWakeMask = pTLVx11->mMask; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bEnable // Check size WORD tlvx10Sz = sizeof( sRMSSetSMSWakeRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_State * pTLVx10; pTLVx10 = (sRMSSetSMSWakeRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSMSWakeEnabled = (INT8)bEnable; offset += tlvx10Sz; // Add wakeMask if enabled if (bEnable != 0) { // Check size WORD tlvx11Sz = sizeof( sRMSSetSMSWakeRequest_Mask ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_Mask * pTLVx11; pTLVx11 = (sRMSSetSMSWakeRequest_Mask*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mMask = wakeMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationUIM.cpp000077500000000000000000001065171455567757300300360ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationUIM.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS_UIM Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockControlKeyResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockControlKeyResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockControlKeyRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMUnblockControlKeyRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMUnblockControlKeyRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mControlKeyLength = valSz; offset += sizeof( sDMSUIMUnblockControlKeyRequest_Facility ); memcpy( (pOut + offset), (LPCSTR)val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetControlKeyProtectionResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetControlKeyProtectionResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetControlKeyProtectionRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMSetControlKeyProtectionRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mFacilityState = (eQMIDMSUIMFacilityStates)status; pTLVx01->mControlKeyLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ); memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; // Find the last (optional) argument if (pbBlocking != 0) { const sDMSUIMGetControlKeyStatusResponse_Blocking * pTLVx10; ULONG tlvLenx10; rc = GetTLV( inLen, pIn, 0x10, &tlvLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLenx10 < sizeof( sDMSUIMGetControlKeyStatusResponse_Blocking )) { return eGOBI_ERR_MALFORMED_RSP; } *pbBlocking = pTLVx10->mOperationBlocking; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add id // Check size WORD tlvx01Sz = sizeof( sDMSUIMGetControlKeyStatusRequest_Facility ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMGetControlKeyStatusRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMGetControlKeyStatusRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyStatus DESCRIPTION: This function requests the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Request is the same as PackUIMGetControlKeyBlockingStatus return PackUIMGetControlKeyBlockingStatus( pOutLen, pOut, id ); } /*=========================================================================== METHOD: ParseUIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMGetICCIDResponse_ICCID * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetICCIDResponse_ICCID )) { return eGOBI_ERR_MALFORMED_RSP; } // The TLV only contains the string // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, (const CHAR*)pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || id < 1 || id > 2 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG tlvLen; // The typeID is either 0x11 or 0x12 if (id == 1) { const sDMSUIMGetPINStatusResponse_PIN1Status * pTLV11; ULONG rc = GetTLV( inLen, pIn, 0x11, &tlvLen, (const BYTE **)&pTLV11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN1Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV11->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV11->mRemainingUnblockRetries; *pStatus = pTLV11->mPINStatus; } else if (id == 2) { const sDMSUIMGetPINStatusResponse_PIN2Status * pTLV12; ULONG rc = GetTLV( inLen, pIn, 0x12, &tlvLen, (const BYTE **)&pTLV12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN2Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV12->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV12->mRemainingUnblockRetries; *pStatus = pTLV12->mPINStatus; } else { return eGOBI_ERR_INVALID_ARG; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMChangePINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMChangePINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pOldValue == 0 || pOldValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pOldValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMChangePINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMChangePINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMChangePINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mOldPINLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMChangePINRequest_Info1 ); // mOldPINValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMChangePINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMChangePINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMChangePINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pPUKValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pPUKValue == 0 || pPUKValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pPUKValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockPINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMUnblockPINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMUnblockPINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mPUKLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info1 ); // mPUKValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMUnblockPINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMUnblockPINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMVerifyPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMVerifyPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMVerifyPINRequest_Info ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMVerifyPINRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMVerifyPINRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINLength = valSz; offset += sizeof( sDMSUIMVerifyPINRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetPINProtectionResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetPINProtectionResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); ULONG valSz = (ULONG)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetPINProtectionRequest_Info ) + (WORD)valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetPINProtectionRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMSetPINProtectionRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINEnabled = (bEnable == 0 ? 0 : 1); pTLVx01->mPINLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetPINProtectionRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationVoice.cpp000077500000000000000000000131311455567757300304360ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationVoice.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Voice Service for USSD) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sUSSDInfo // Struct to represent USSD/Alpha information header /*=========================================================================*/ struct sUSSDInfoHdr { public: BYTE mDCS; BYTE mLength; // Data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: PackOriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } // Add pInfo sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackAnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationWDS.cpp000077500000000000000000003064571455567757300300460ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WDS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetPacketServiceStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetPacketServiceStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mConnectionStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ) { // Validate arguments if (pIn == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataSessionDurationResponse_Duration * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataSessionDurationResponse_Duration )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx01->mDataSessionDuration; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDormancyResponse_DormancyStatus * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDormancyResponse_DormancyStatus )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mDormancyStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ) { // Validate arguments if (pIn == 0 || pSetting == 0 || pRoamSetting == 0) { return eGOBI_ERR_INVALID_ARG; } *pSetting = 0xffffffff; *pRoamSetting = 0xffffffff; // Find the first TLV const sWDSGetAutoconnectSettingResponse_Autoconnect * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetAutoconnectSettingResponse_Autoconnect )) { return eGOBI_ERR_MALFORMED_RSP; } *pSetting = pTLVx01->mAutoconnectSetting; // Find the second TLV (optional) const sWDSGetAutoconnectSettingResponse_Roam * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Is the TLV large enough? if (outLenx10 < sizeof( sWDSGetAutoconnectSettingResponse_Roam )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoamSetting = pTLVx10->mAutoconnectRoamSetting; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add setting // Check size WORD tlvx01Sz = sizeof( sWDSSetAutoconnectSettingRequest_Autoconnect ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Autoconnect * pTLVx01; pTLVx01 = (sWDSSetAutoconnectSettingRequest_Autoconnect*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoconnectSetting = (eQMIWDSAutoconnectSettings)setting; offset += tlvx01Sz; // Add roam setting, if specified if (pRoamSetting != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetAutoconnectSettingRequest_Roam ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Roam * pTLVx10; pTLVx10 = (sWDSSetAutoconnectSettingRequest_Roam*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutoconnectRoamSetting = (eQMIWDSAutoconnectRoamSettings)*pRoamSetting; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSModifyProfileRequest_ProfileIdentifier ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_ProfileIdentifier * pTLVx01; pTLVx01 = (sWDSModifyProfileRequest_ProfileIdentifier*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; pTLVx01->mProfileIndex = 1; offset += tlvx01Sz; // Add name, if specified if (pName != 0) { std::string name( pName ); // Check size WORD tlvx10Sz = (WORD)name.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( pOut + offset, name.c_str(), name.size() ); offset += tlvx10Sz; } // Add PDP type, if specified if (pPDPType != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSModifyProfileRequest_PDPType ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PDPType * pTLVx11; pTLVx11 = (sWDSModifyProfileRequest_PDPType*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPDPType = (eQMIPDPTypes)*pPDPType; offset += tlvx11Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSModifyProfileRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PrimaryDNS * pTLVx15; pTLVx15 = (sWDSModifyProfileRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSModifyProfileRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_SecondaryDNS * pTLVx16; pTLVx16 = (sWDSModifyProfileRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx16->mIPV4Address[0] = (INT8)ip0; pTLVx16->mIPV4Address[1] = (INT8)ip1; pTLVx16->mIPV4Address[2] = (INT8)ip2; pTLVx16->mIPV4Address[3] = (INT8)ip3; offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx1BSz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1BSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1B; pHeader->mLength = tlvx1BSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx1BSz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx1CSz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1CSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1C; pHeader->mLength = tlvx1CSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx1CSz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx1DSz = sizeof( sWDSModifyProfileRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1DSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1D; pHeader->mLength = tlvx1DSz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_Authentication * pTLVx1D; pTLVx1D = (sWDSModifyProfileRequest_Authentication*)(pOut + offset); memset( pTLVx1D, 0, tlvx1DSz ); // Set the value pTLVx1D->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx1D->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx1DSz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx1ESz = sizeof( sWDSModifyProfileRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1ESz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1E; pHeader->mLength = tlvx1ESz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_IPAddress * pTLVx1E; pTLVx1E = (sWDSModifyProfileRequest_IPAddress*)(pOut + offset); memset( pTLVx1E, 0, tlvx1ESz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx1E->mIPV4Address[0] = (INT8)ip0; pTLVx1E->mIPV4Address[1] = (INT8)ip1; pTLVx1E->mIPV4Address[2] = (INT8)ip2; pTLVx1E->mIPV4Address[3] = (INT8)ip3; offset += tlvx1ESz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being read RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSGetDefaultSettingsRequest_ProfileType ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetDefaultSettingsRequest_ProfileType * pTLVx01; pTLVx01 = (sWDSGetDefaultSettingsRequest_ProfileType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { // Validate arguments if (pIn == 0 || pPDPType == 0 || pIPAddress == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0 || pAuthentication == 0 || nameSize == 0 || pName == 0 || apnSize == 0 || pAPNName == 0 || userSize == 0 || pUsername == 0) { return eGOBI_ERR_INVALID_ARG; } // Set defaults *pPDPType = 0xffffffff; *pIPAddress = 0xffffffff; *pPrimaryDNS = 0xffffffff; *pSecondaryDNS = 0xffffffff; *pAuthentication = 0xffffffff; pName[0] = 0; pAPNName[0] = 0; pUsername[0] = 0; // Find the name const sWDSGetDefaultSettingsResponse_ProfileName * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (nameSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pName, (const BYTE *)pTLVx10, outLenx10 ); // Null terminate pName[outLenx10] = 0; } // Find the PDP type const sWDSGetDefaultSettingsResponse_PDPType * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDefaultSettingsResponse_PDPType )) { return eGOBI_ERR_MALFORMED_RSP; } *pPDPType = pTLVx11->mPDPType; } // Find the APN name const sWDSGetDefaultSettingsResponse_APNName * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (apnSize < outLenx14 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx14, outLenx14 ); // Null terminate pAPNName[outLenx14] = 0; } // Find the Primary DNS const sWDSGetDefaultSettingsResponse_PrimaryDNS * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetDefaultSettingsResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx15->mIPV4Address[0]; ULONG ip1 = pTLVx15->mIPV4Address[1] << 8; ULONG ip2 = pTLVx15->mIPV4Address[2] << 16; ULONG ip3 = pTLVx15->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDefaultSettingsResponse_SecondaryDNS * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetDefaultSettingsResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx16->mIPV4Address[0]; ULONG ip1 = pTLVx16->mIPV4Address[1] << 8; ULONG ip2 = pTLVx16->mIPV4Address[2] << 16; ULONG ip3 = pTLVx16->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Username const sWDSGetDefaultSettingsResponse_APNName * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (userSize < outLenx1B + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx1B, outLenx1B ); // Null terminate pAPNName[outLenx1B] = 0; } // Find the Authentication const sWDSGetDefaultSettingsResponse_Authentication * pTLVx1D; ULONG outLenx1D; rc = GetTLV( inLen, pIn, 0x1D, &outLenx1D, (const BYTE **)&pTLVx1D ); if (rc == eGOBI_ERR_NONE) { if (outLenx1D < sizeof( sWDSGetDefaultSettingsResponse_Authentication )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG pap = pTLVx1D->mEnablePAP; ULONG chap = pTLVx1D->mEnableCHAP << 1; *pAuthentication = (pap | chap); } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add technology, if specified if (pTechnology != 0) { // Check size WORD tlvx30Sz = sizeof( sWDSStartNetworkInterfaceRequest_TechnologyPreference ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx30Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x30; pHeader->mLength = tlvx30Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_TechnologyPreference * pTLVx30; pTLVx30 = (sWDSStartNetworkInterfaceRequest_TechnologyPreference*)(pOut + offset); memset( pTLVx30, 0, tlvx30Sz ); // Set the value pTLVx30->mEnable3GPP = ((*pTechnology & 0x00000001) != 0); pTLVx30->mEnable3GPP2 = ((*pTechnology & 0x00000002) != 0); offset += tlvx30Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSStartNetworkInterfaceRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSStartNetworkInterfaceRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary NBNS, if specified if (pPrimaryNBNS != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryNBNS * pTLVx12; pTLVx12 = (sWDSStartNetworkInterfaceRequest_PrimaryNBNS*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryNBNS & 0x000000FF); ULONG ip1 = (*pPrimaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary NBNS, if specified if (pSecondaryNBNS != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryNBNS * pTLVx13; pTLVx13 = (sWDSStartNetworkInterfaceRequest_SecondaryNBNS*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryNBNS & 0x000000FF); ULONG ip1 = (*pSecondaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSStartNetworkInterfaceRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_IPAddress * pTLVx15; pTLVx15 = (sWDSStartNetworkInterfaceRequest_IPAddress*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pTLVx16; pTLVx16 = (sWDSStartNetworkInterfaceRequest_Authentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx16->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx17Sz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx17Sz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx18Sz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx18Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ) { // Validate arguments if (pIn == 0 || pSessionId == 0 || pFailureReason == 0) { return eGOBI_ERR_INVALID_ARG; } // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Still parse call end reason, if present const sWDSStartNetworkInterfaceResponse_CallEndReason * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 >= sizeof( sWDSStartNetworkInterfaceResponse_CallEndReason )) { *pFailureReason = pTLVx10->mCallEnd; } } return rc; } // Find the Session ID const sWDSStartNetworkInterfaceResponse_PacketDataHandle * pTLVx01; ULONG outLenx01; rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSStartNetworkInterfaceResponse_PacketDataHandle )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionId = pTLVx01->mPacketDataHandle; } // Session ID is mandatory, if it failed return that error return rc; } /*=========================================================================== METHOD: PackStopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add session ID // Check size WORD tlvx01Sz = sizeof( sWDSStopNetworkInterfaceRequest_PacketDataHandle ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSStopNetworkInterfaceRequest_PacketDataHandle * pTLVx01; pTLVx01 = (sWDSStopNetworkInterfaceRequest_PacketDataHandle*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mPacketDataHandle = sessionId; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx10Sz = sizeof( sWDSGetCurrentSettingsRequest_RequestedSettings ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetCurrentSettingsRequest_RequestedSettings * pTLVx10; pTLVx10 = (sWDSGetCurrentSettingsRequest_RequestedSettings*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mIPAddress = true; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ) { // Validate arguments if (pIn == 0 || pIPAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; ULONG rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } // If no IP address is found, fail return rc; } /*=========================================================================== METHOD: ParseGetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { // Validate arguments if (pIn == 0 || pCurrentChannelTXRate == 0 || pCurrentChannelRXRate == 0 || pMaxChannelTXRate == 0 || pMaxChannelRXRate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the rates const sWDSGetChannelRatesResponse_ChannelRates * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetChannelRatesResponse_ChannelRates )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pCurrentChannelTXRate = pTLVx01->mChannelTXRatebps; *pCurrentChannelRXRate = pTLVx01->mChannelRXRatebps; *pMaxChannelTXRate = pTLVx01->mMaxChannelTXRatebps; *pMaxChannelRXRate = pTLVx01->mMaxChannelRXRatebps; } // If no rates are found, fail return rc; } /*=========================================================================== METHOD: PackGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mReportTXPacketSuccesses = true; pTLVx01->mReportRXPacketSuccesses = true; pTLVx01->mReportTXPacketErrors = true; pTLVx01->mReportRXPacketErrors = true; pTLVx01->mReportTXOverflows = true; pTLVx01->mReportRXOverflows = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { // Validate arguments if (pIn == 0 || pTXPacketSuccesses == 0 || pRXPacketSuccesses == 0 || pTXPacketErrors == 0 || pRXPacketErrors == 0 || pTXPacketOverflows == 0 || pRXPacketOverflows == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX packet sucesses const sWDSGetPacketStatisticsResponse_TXPacketSuccesses * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet sucesses const sWDSGetPacketStatisticsResponse_RXPacketSuccesses * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet errors const sWDSGetPacketStatisticsResponse_TXPacketErrors * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet errors const sWDSGetPacketStatisticsResponse_RXPacketErrors * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet overflows const sWDSGetPacketStatisticsResponse_TXOverflows * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetPacketStatisticsResponse_TXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet overflows const sWDSGetPacketStatisticsResponse_RXOverflows * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetPacketStatisticsResponse_RXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXPacketSuccesses = pTLVx10->mTXPacketSuccesses; *pRXPacketSuccesses = pTLVx11->mRXPacketSuccesses; *pTXPacketErrors = pTLVx12->mTXPacketErrors; *pRXPacketErrors = pTLVx13->mRXPacketErrors; *pTXPacketOverflows = pTLVx14->mTXOverflows; *pRXPacketOverflows = pTLVx15->mRXOverflows; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mTXByteTotal = true; pTLVx01->mRXByteTotal = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { // Validate arguments if (pIn == 0 || pTXTotalBytes == 0 || pRXTotalBytes == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX bytes const sWDSGetPacketStatisticsResponse_TXBytes * pTLVx19; ULONG outLenx19; ULONG rc = GetTLV( inLen, pIn, 0x19, &outLenx19, (const BYTE **)&pTLVx19 ); if (rc == eGOBI_ERR_NONE) { if (outLenx19 < sizeof( sWDSGetPacketStatisticsResponse_TXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX bytes const sWDSGetPacketStatisticsResponse_RXBytes * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetPacketStatisticsResponse_RXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXTotalBytes = pTLVx19->mTXByteTotal; *pRXTotalBytes = pTLVx1A->mRXByteTotal; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the mode // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPModeRequest_MobileIPMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPModeRequest_MobileIPMode * pTLVx01; pTLVx01 = (sWDSSetMIPModeRequest_MobileIPMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMIPMode = (eQMIMobileIPModes)mode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetMIPModeResponse_MobileIPMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetMIPModeResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx01->mMIPMode; } return rc; } /*=========================================================================== METHOD: PackSetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetActiveMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetActiveMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetActiveMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ) { // Validate arguments if (pIn == 0 || pIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetActiveMIPProfileResponse_Index * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetActiveMIPProfileResponse_Index )) { return eGOBI_ERR_MALFORMED_RSP; } *pIndex = pTLVx01->mProfileIndex; } return rc; } /*=========================================================================== METHOD: PackSetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address bRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; // Add Enabled, if specified if (pEnabled != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPProfileRequest_State ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_State * pTLVx10; pTLVx10 = (sWDSSetMIPProfileRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mEnabled = (*pEnabled == 0 ? 0 : 1); offset += tlvx10Sz; } // Add Home Address, if specified if (pAddress != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPProfileRequest_HomeAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HomeAddress * pTLVx11; pTLVx11 = (sWDSSetMIPProfileRequest_HomeAddress*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pAddress & 0x000000FF); ULONG ip1 = (*pAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pAddress & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary Home Agent Address, if specified if (pPrimaryHA != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress * pTLVx12; pTLVx12 = (sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryHA & 0x000000FF); ULONG ip1 = (*pPrimaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryHA & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary Home Agent Address, if specified if (pSecondaryHA != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress * pTLVx13; pTLVx13 = (sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryHA & 0x000000FF); ULONG ip1 = (*pSecondaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryHA & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add reverse tunneling, if specified if (pRevTunneling != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPProfileRequest_ReverseTunneling ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_ReverseTunneling * pTLVx14; pTLVx14 = (sWDSSetMIPProfileRequest_ReverseTunneling*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReverseTunneling = (*pRevTunneling == 0 ? 0 : 1); offset += tlvx14Sz; } // Add NAI, if specified if (pNAI != 0) { std::string nai( pNAI ); // Check size WORD tlvx15Sz = (WORD)nai.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), nai.c_str(), nai.size() ); offset += tlvx15Sz; } // Add HA SPI, if specified if (pHASPI != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPProfileRequest_HASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HASPI * pTLVx16; pTLVx16 = (sWDSSetMIPProfileRequest_HASPI*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mHASPI = *pHASPI; offset += tlvx16Sz; } // Add AAA SPI, if specified if (pAAASPI != 0) { // Check size WORD tlvx17Sz = sizeof( sWDSSetMIPProfileRequeste_AAASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequeste_AAASPI * pTLVx17; pTLVx17 = (sWDSSetMIPProfileRequeste_AAASPI*)(pOut + offset); memset( pTLVx17, 0, tlvx17Sz ); // Set the value pTLVx17->mAAASPI = *pAAASPI; offset += tlvx17Sz; } // Add MN-HA key, if specified if (pMNHA != 0) { std::string mnha( pMNHA ); // Check size WORD tlvx18Sz = (WORD)mnha.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnha.c_str(), mnha.size() ); offset += tlvx18Sz; } // Add MN-AAA key, if specified if (pMNHA != 0) { std::string mnaaa( pMNAAA ); // Check size WORD tlvx19Sz = (WORD)mnaaa.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx19Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x19; pHeader->mLength = tlvx19Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnaaa.c_str(), mnaaa.size() ); offset += tlvx19Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer index [ I ] - Mobile IP profile ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSGetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSGetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pAddress == 0 || pPrimaryHA == 0 || pSecondaryHA == 0 || pRevTunneling == 0 || naiSize == 0 || pNAI == 0 || pHASPI == 0 || pAAASPI == 0 || pHAState == 0 || pAAAState == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume errors *pEnabled = 0xff; *pAddress = 0xffffffff; *pPrimaryHA = 0xffffffff; *pSecondaryHA = 0xffffffff; *pRevTunneling = 0xff; *pHASPI = 0xffffffff; *pAAASPI = 0xffffffff; *pHAState = 0xffffffff; *pAAAState = 0xffffffff; // Find the State const sWDSGetMIPProfileResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx10->mEnabled; } // Find the Home Address const sWDSGetMIPProfileResponse_HomeAddress * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPProfileResponse_HomeAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pAddress = (ip0 | ip1 | ip2 | ip3); } // Find the Primary Home Agent Address const sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx12->mIPV4Address[0]; ULONG ip1 = pTLVx12->mIPV4Address[1] << 8; ULONG ip2 = pTLVx12->mIPV4Address[2] << 16; ULONG ip3 = pTLVx12->mIPV4Address[3] << 24; *pPrimaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary Home Agent Address const sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx13->mIPV4Address[0]; ULONG ip1 = pTLVx13->mIPV4Address[1] << 8; ULONG ip2 = pTLVx13->mIPV4Address[2] << 16; ULONG ip3 = pTLVx13->mIPV4Address[3] << 24; *pSecondaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Reverse tunneling, if enabled const sWDSGetMIPProfileResponse_ReverseTunneling * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_ReverseTunneling )) { return eGOBI_ERR_MALFORMED_RSP; } *pRevTunneling = pTLVx14->mReverseTunneling; } // Find the NAI, if enabled const sWDSGetMIPProfileResponse_NAI * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (naiSize < outLenx15 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNAI, (const BYTE *)pTLVx15, outLenx15 ); // Null terminate pNAI[outLenx15] = 0; } // Find the HA SPI const sWDSGetMIPProfileResponse_HASPI * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPProfileResponse_HASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pHASPI = pTLVx16->mHASPI; } // Find the AAA SPI const sWDSGetMIPProfileResponse_AAASPI * pTLVx17; ULONG outLenx17; rc = GetTLV( inLen, pIn, 0x17, &outLenx17, (const BYTE **)&pTLVx17 ); if (rc == eGOBI_ERR_NONE) { if (outLenx17 < sizeof( sWDSGetMIPProfileResponse_AAASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAASPI = pTLVx17->mAAASPI; } // Find the HA state const sWDSGetMIPProfileResponse_HAState * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetMIPProfileResponse_HAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAState = pTLVx1A->mKeyState; } // Find the AAA state const sWDSGetMIPProfileResponse_AAAState * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (outLenx1B < sizeof( sWDSGetMIPProfileResponse_AAAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAAState = pTLVx1B->mKeyState; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPParametersRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_SPC * pTLVx01; pTLVx01 = (sWDSSetMIPParametersRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; // Add Mode, if specified if (pMode != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPParametersRequest_MobileIPMode ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MobileIPMode * pTLVx10; pTLVx10 = (sWDSSetMIPParametersRequest_MobileIPMode*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMIPMode = (eQMIMobileIPModes)*pMode; offset += tlvx10Sz; } // Add Retry Limit, if specified if (pRetryLimit != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptLimit ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptLimit * pTLVx11; pTLVx11 = (sWDSSetMIPParametersRequest_RetryAttemptLimit*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mRetryAttemptLimit = *pRetryLimit; offset += tlvx11Sz; } // Add Retry interval, if specified if (pRetryInterval != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptInterval ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptInterval * pTLVx12; pTLVx12 = (sWDSSetMIPParametersRequest_RetryAttemptInterval*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mRetryAttemptInterval = *pRetryInterval; offset += tlvx12Sz; } // Add Re-registration period, if specified if (pReRegPeriod != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationPeriod ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationPeriod * pTLVx13; pTLVx13 = (sWDSSetMIPParametersRequest_ReRegistrationPeriod*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); // Set the value pTLVx13->mReRegistrationPeriod = *pReRegPeriod; offset += tlvx13Sz; } // Add Re-registration on traffic flag, if specified if (pReRegTraffic != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic * pTLVx14; pTLVx14 = (sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReRegistrationOnlyWithTraffic = (*pReRegTraffic == 0 ? 0 : 1); offset += tlvx14Sz; } // Add HA authenticator flag, if specified if (pHAAuthenticator != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator * pTLVx15; pTLVx15 = (sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the value pTLVx15->mMNHAAuthenticatorCalculator = (*pHAAuthenticator == 0 ? 0 : 1); offset += tlvx15Sz; } // Add HA RFC2002bis authentication flag, if specified if (pHA2002bis != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication * pTLVx16; pTLVx16 = (sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mMNHARFC2002BISAuthentication = (*pHA2002bis == 0 ? 0 : 1); offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pIn == 0 || pMode == 0 || pRetryLimit == 0 || pRetryInterval == 0 || pReRegPeriod == 0 || pReRegTraffic == 0 || pHAAuthenticator == 0 || pHA2002bis == 0) { return eGOBI_ERR_INVALID_ARG; } *pMode = 0xffffffff; *pRetryLimit = 0xff; *pRetryInterval = 0xff; *pReRegPeriod = 0xff; *pReRegTraffic = 0xff; *pHAAuthenticator = 0xff; *pHA2002bis = 0xff; // Find the mode const sWDSGetMIPParametersResponse_MobileIPMode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPParametersResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mMIPMode; } // Find the Retry limit const sWDSGetMIPParametersResponse_RetryAttemptLimit * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptLimit )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryLimit = pTLVx11->mRetryAttemptLimit; } // Find the Retry Interval const sWDSGetMIPParametersResponse_RetryAttemptInterval * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptInterval )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryInterval = pTLVx12->mRetryAttemptInterval; } // Find the Re-registration period const sWDSGetMIPParametersResponse_ReRegistrationPeriod * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationPeriod )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegPeriod = pTLVx13->mReRegistrationPeriod; } // Find the Re-register on traffic flag const sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegTraffic = pTLVx14->mReRegistrationOnlyWithTraffic; } // Find the HA authenticator const sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAAuthenticator = pTLVx15->mMNHAAuthenticatorCalculator; } // Find the HA RFC2002bis authentication flag const sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication )) { return eGOBI_ERR_MALFORMED_RSP; } *pHA2002bis = pTLVx16->mMNHARFC2002BISAuthentication; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ) { // Validate arguments if (pIn == 0 || pError == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetLastMIPStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetLastMIPStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pError = pTLVx01->mLastMIPStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments // At least one must be specified if (pOut == 0 || (pPrimaryDNS == 0 && pSecondaryDNS == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetDNSSettingRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSSetDNSSettingRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetDNSSettingRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSSetDNSSettingRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pIn == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the Primary DNS const sWDSGetDNSSettingResponse_PrimaryDNS * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetDNSSettingResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx10->mIPV4Address[0]; ULONG ip1 = pTLVx10->mIPV4Address[1] << 8; ULONG ip2 = pTLVx10->mIPV4Address[2] << 16; ULONG ip3 = pTLVx10->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDNSSettingResponse_SecondaryDNS * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDNSSettingResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ) { // Validate arguments if (pIn == 0 || pDataBearer == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataBearerTechnologyResponse_Technology * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataBearerTechnologyResponse_Technology )) { return eGOBI_ERR_MALFORMED_RSP; } *pDataBearer = pTLVx01->mDataBearerTechnology; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Gobi3000Translation/Gobi3000TranslationWMS.cpp000077500000000000000000000776661455567757300300660ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WMS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackDeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSDeleteRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSDeleteRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message index, if specified if (pMessageIndex != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSDeleteRequest_MessageIndex ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageIndex * pTLVx10; pTLVx10 = (sWMSDeleteRequest_MessageIndex*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mStorageIndex = *pMessageIndex; offset += tlvx10Sz; } // Add the Message tag, if specified if (pMessageTag != 0) { // Check size WORD tlvx11Sz = sizeof( sWMSDeleteRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageTag * pTLVx11; pTLVx11 = (sWMSDeleteRequest_MessageTag*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the values pTLVx11->mMessageTag = (eQMIWMSMessageTags)*pMessageTag; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSListMessagesRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The storage type sWMSListMessagesRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSListMessagesRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message tag, if specified if (pRequestedTag != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSListMessagesRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSListMessagesRequest_MessageTag * pTLVx10; pTLVx10 = (sWMSListMessagesRequest_MessageTag*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mMessageTag = (eQMIWMSMessageTags)*pRequestedTag; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ) { // Validate arguments if (pIn == 0 || pMessageListSize == 0 || *pMessageListSize == 0 || pMessageList == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageListSz = *pMessageListSize; // Assume failure *pMessageListSize = 0; // Find the messages const sWMSListMessagesResponse_MessageList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG messageListSz = pTLVx01->mNumberOfMessages; if (messageListSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (maxMessageListSz < messageListSz) { messageListSz = maxMessageListSz; } const sWMSListMessagesResponse_MessageList::sMessage * pMessages; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList ) + sizeof( sWMSListMessagesResponse_MessageList::sMessage ) * messageListSz) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pMessages = (const sWMSListMessagesResponse_MessageList::sMessage *) ((const BYTE *)pTLVx01 + sizeof( sWMSListMessagesResponse_MessageList )); ULONG * pData = (ULONG *)pMessageList; for (ULONG m = 0; m < messageListSz; m++) { *pData++ = pMessages->mStorageIndex; *pData++ = pMessages->mMessageTag; pMessages++; } *pMessageListSize = messageListSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawReadRequest_MessageIndex ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawReadRequest_MessageIndex * pTLVx01; pTLVx01 = (sWMSRawReadRequest_MessageIndex*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ O ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { // Validate arguments if (pIn == 0 || pMessageTag == 0 || pMessageFormat == 0 || pMessageSize == 0 || *pMessageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageSz = *pMessageSize; // Assume failure *pMessageSize = 0; // Find the messages const sWMSRawReadResponse_MessageData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageTag = pTLVx01->mMessageTag; *pMessageFormat = pTLVx01->mMessageFormat; ULONG messageSz = pTLVx01->mRawMessageLength; if (messageSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (messageSz > maxMessageSz) { messageSz = maxMessageSz; } // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData ) + messageSz) { return eGOBI_ERR_MALFORMED_RSP; } memcpy( pMessage, pTLVx01 + sizeof( sWMSRawReadResponse_MessageData ), messageSz ); *pMessageSize = messageSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSModifyTagRequest_MessageTag ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSModifyTagRequest_MessageTag * pTLVx01; pTLVx01 = (sWMSModifyTagRequest_MessageTag*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; pTLVx01->mMessageTag = (eQMIWMSMessageTags)messageTag; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawWriteRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawWriteRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawWriteRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawWriteRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ) { // Validate arguments if (pIn == 0 || pMessageIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the messages const sWMSRawWriteResponse_MessageIndex * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawWriteResponse_MessageIndex )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageIndex = pTLVx01->mStorageIndex; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawSendRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawSendRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawSendRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawSendRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ) { // Validate arguments if (pIn == 0 || pMessageFailureCode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume we have no message failure cause code *pMessageFailureCode = 0xffffffff; // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Check for the failure code (optional) const sWMSRawSendResponse_CauseCode * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageFailureCode = pTLVx10->mCauseCode; } } return rc; } /*=========================================================================== METHOD: ParseGetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ O ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ O ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { // Validate arguments if (pIn == 0 || addressSize == 0 || pSMSCAddress == 0 || typeSize == 0 || pSMSCType == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume empty pSMSCAddress[0] = 0; pSMSCType[0] = 0; // Get the address (mandatory) const sWMSGetSMSCAddressResponse_Address * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } // Handle the type as a string (maximum 3 chars) std::string smscType( &pTLVx01->mSMSCAddressType[0], 3 ); // Is the SMSC type present? (optional) ULONG smscTypeLen = (ULONG)smscType.size(); if (smscTypeLen > 0) { // Space to perform copy? if (typeSize < smscTypeLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCType, &pTLVx01->mSMSCAddressType[0], smscTypeLen ); pSMSCType[smscTypeLen] = 0; } // Treat the address as a null terminated string std::string smscAddr( (const CHAR *)pTLVx01 + sizeof( sWMSGetSMSCAddressResponse_Address ), pTLVx01->mSMSCAddressLength ); ULONG smscAddrLen = (ULONG)smscAddr.size(); if (addressSize < smscAddrLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCAddress, smscAddr.c_str(), addressSize ); pSMSCAddress[addressSize] = 0; return rc; } /*=========================================================================== METHOD: PackSetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ) { // Validate arguments if (pOut == 0 || pSMSCAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // The TLV contains only the address std::string smscAddr( pSMSCAddress ); // Check size WORD tlvx01Sz = (WORD)smscAddr.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscAddr.c_str(), tlvx01Sz ); offset += tlvx01Sz; // smscType is optional if (pSMSCType != 0) { // The TLV contains only the type std::string smscType( pSMSCType ); if (smscType.size() != 0) { // Check size WORD tlvx10Sz = (WORD)smscType.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscType.c_str(), tlvx10Sz ); offset += tlvx10Sz; } } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pIn == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxRoutes = *pRouteSize; *pRouteSize = 0; // Get the route list const sWMSGetRoutesResponse_RouteList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG routeCount = pTLVx01->mNumberOfRoutes; if (routeCount > (ULONG)maxRoutes) { routeCount = (ULONG)maxRoutes; } const sWMSGetRoutesResponse_RouteList::sRoute * pInRoute; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList ) + sizeof( sWMSGetRoutesResponse_RouteList::sRoute ) * routeCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRoute = (const sWMSGetRoutesResponse_RouteList::sRoute *) ((const BYTE *)pTLVx01 + sizeof( sWMSGetRoutesResponse_RouteList )); ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { *pRouteArray++ = pInRoute->mMessageType; *pRouteArray++ = pInRoute->mMessageClass; *pRouteArray++ = pInRoute->mStorageType; *pRouteArray++ = pInRoute->mRouteValue; pInRoute++; } *pRouteSize = (BYTE)routeCount; return rc; } /*=========================================================================== METHOD: PackSetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pOut == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } UINT16 routeCount = (ULONG)*pRouteSize; // Check size WORD tlvx01Sz = sizeof( sWMSSetRoutesRequest_RouteList ) + sizeof( sWMSSetRoutesRequest_RouteList::sRoute ) * routeCount; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Add route count sWMSSetRoutesRequest_RouteList * pTLVx01; pTLVx01 = (sWMSSetRoutesRequest_RouteList*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mNumberOfRoutes = routeCount; offset += sizeof( sWMSSetRoutesRequest_RouteList ); sWMSSetRoutesRequest_RouteList::sRoute * pOutRoute; // Align to the first array element pOutRoute = (sWMSSetRoutesRequest_RouteList::sRoute *)(pOut + offset); // Add the routes ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { pOutRoute->mMessageType = (eQMIWMSMessageTypes)*pRouteArray++; pOutRoute->mMessageClass = (eQMIWMSMessageClasses)*pRouteArray++; pOutRoute->mStorageType = (eQMIWMSStorageTypes)*pRouteArray++; pOutRoute->mReceiptAction = (eQMIWMSReceiptActions)*pRouteArray++; pOutRoute++; offset += sizeof( sWMSSetRoutesRequest_RouteList::sRoute ); } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiConnectionMgmt/000077500000000000000000000000001455567757300234635ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiConnectionMgmt/GobiConnectionMgmt.cpp000077500000000000000000000377501455567757300277330ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.cpp DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Global object CGobiConnectionMgmtDLL gDLL; // Interval between traffic processing loop iterations (milliseconds) const ULONG TRAFFIC_INTERVAL_MS = 300000; // Maximum amount of time to wait for the traffic thread to exit const ULONG THREAD_EXIT_TIME = 2000; /*=========================================================================== METHOD: TrafficProcessThread (Free Method) DESCRIPTION: QMI traffic process thread - processes all traffic in order to fire off QMI traffic related callbacks PARAMETERS: pArg [ I ] - Object to interface to RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * TrafficProcessThread( PVOID pArg ) { // Keep running? bool bRun = false; // Create a vector of the objects to wait on std::vector events; // Store the index to service type for use later std::map services; // Grab API object cGobiConnectionMgmt * pAPI = (cGobiConnectionMgmt *)pArg; if (pAPI != 0) { // Time to go to work bRun = true; // Add the thread exit event events.push_back( &pAPI->mExitEvent ); // Grab signal events for our protocol servers std::map ::const_iterator pIter; pIter = pAPI->mServers.begin(); while (pIter != pAPI->mServers.end()) { eQMIService svc = pIter->first; cQMIProtocolServer * pServer = pAPI->GetServer( svc ); if (pServer != 0) { // Grab the log from the server const cProtocolLog & log = pServer->GetLog(); // Grab the Signal event, if it exists cEvent & sigEvent = log.GetSignalEvent(); services[events.size()] = svc; events.push_back( &sigEvent ); } pIter++; } } TRACE( "GobiConnectionMgmt traffic thread [%u] started\n", (UINT)pthread_self() ); // Loop waiting for exit event while (bRun == true) { // Wait for activity DWORD ignoredVal, index; int nRet = WaitOnMultipleEvents( events, TRAFFIC_INTERVAL_MS, ignoredVal, index ); // Timeout if (nRet == -ETIME) { // Do nothing } // Error? else if (nRet <= 0) { TRACE( "GobiConnectionMgmt traffic thread wait error %d\n", nRet ); bRun = false; } // Exit event? else if (index == 0) { bRun = false; } else if (index < events.size()) { // Run ProcessTraffic() for this service type if (services.find( index ) != services.end()) { pAPI->ProcessTraffic( services[index] ); } } else { // Fatal error bRun = false; } } TRACE( "GobiConnectionMgmt traffic thread [%u] exited\n", (UINT)pthread_self() ); if (pAPI != 0) { pAPI->mThreadCleanupFinished = true; } return 0; } /*=========================================================================== METHOD: CallbackThread (Free Method) DESCRIPTION: Thread to execute a callback asynchronously PARAMETERS: pArg [ I ] - The cGobiCMCallback object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * CallbackThread( PVOID pArg ) { cGobiCMCallback * pCB = (cGobiCMCallback *)pArg; if (pCB == 0) { ASSERT( 0 ); return 0; } pCB->Call(); delete pCB; pCB = 0; return 0; } /*=========================================================================*/ // CGobiConnectionMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::CGobiConnectionMgmtDLL() { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::~CGobiConnectionMgmtDLL() { std::map tmpAPI = mAPI; std::map ::const_iterator pIter; pIter = tmpAPI.begin(); while (pIter != tmpAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; if (pAPI != 0) { pAPI->Cleanup(); delete pAPI; } pIter++; } mAPI.clear(); pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: CreateAPI (Public Method) DESCRIPTION: Create a new API object RETURN VALUE: GOBIHANDLE - Handle to new API object (0 upon failure) ===========================================================================*/ GOBIHANDLE CGobiConnectionMgmtDLL::CreateAPI() { pthread_mutex_lock( &mSyncSection ); cGobiConnectionMgmt * pAPI = new cGobiConnectionMgmt; if (pAPI != 0) { bool bInit = pAPI->Initialize(); if (bInit == true) { mAPI[(GOBIHANDLE)pAPI] = pAPI; } } pthread_mutex_unlock( &mSyncSection ); return (GOBIHANDLE)pAPI; } /*=========================================================================== METHOD: DeleteAPI (Public Method) DESCRIPTION: Delete an existing API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: None ===========================================================================*/ void CGobiConnectionMgmtDLL::DeleteAPI( GOBIHANDLE handle ) { pthread_mutex_lock( &mSyncSection ); std::map ::iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; delete pAPI; mAPI.erase( pIter ); } pthread_mutex_unlock( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the requested API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: cGobiConnectionMgmt * ===========================================================================*/ cGobiConnectionMgmt * CGobiConnectionMgmtDLL::GetAPI( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = 0; pthread_mutex_lock( &mSyncSection ); std::map ::const_iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { pAPI = pIter->second; } pthread_mutex_unlock( &mSyncSection ); return pAPI; } /*=========================================================================*/ // cGobiConnectionMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::cGobiConnectionMgmt() : cGobiQMICore(), mbThreadStarted( false ), mThreadID( 0 ), mThreadCleanupFinished( false ) { // Nothing to do but init those variables } /*=========================================================================== METHOD: ~cGobiConnectionMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::~cGobiConnectionMgmt() { Disconnect(); } /*=========================================================================== METHOD: ProcessTraffic (Internal Method) DESCRIPTION: Process traffic in a QMI server protocol log, this is done to exercise QMI indication related callbacks PARAMETERS: svc [ I ] - QMI Service type RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessTraffic( eQMIService svc ) { ULONG count = 0; std::map ::iterator pIter; pIter = mServers.find( svc ); if (pIter == mServers.end()) { return; } sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return; } // Grab the service ID from the service eQMIService svcID = pSvr->GetServiceType(); if (svcID == eQMI_SVC_ENUM_BEGIN) { return; } // Grab the log from the server const cProtocolLog & logSvr = pSvr->GetLog(); // New items to process? count = logSvr.GetCount(); if (count != INVALID_LOG_INDEX && count > si.mLogsProcessed) { for (ULONG i = si.mLogsProcessed; i < count; i++) { sProtocolBuffer buf = logSvr.GetBuffer( i ); if (buf.IsValid() == false) { continue; } eProtocolType pt = buf.GetType(); if (IsQMIProtocolRX( pt ) == false) { continue; } sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsIndication() == false) { continue; } ULONG msgID = qmiBuf.GetMessageID(); tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); if (pIter == mCallbacks.end()) { continue; } ULONG outLen = 0; const BYTE * pOutput = (const BYTE *)qmiBuf.GetRawContents( outLen ); tCallbackValue cv = pIter->second; cGenericCallback * pCB = 0; pCB = new cGenericCallback( cv.first, svcID, msgID, cv.second, outLen, pOutput ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } si.mLogsProcessed = count; } } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - QMI control file to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiConnectionMgmt::Connect( LPCSTR pQMIFile, std::set & services ) { std::set svcs = cGobiQMICore::Connect( pQMIFile, services ); if (svcs.size() > 0) { // Start the traffic processing thread? if (mbThreadStarted == false) { // Clear mExitEvent; mExitEvent.Clear(); pthread_create( &mThreadID, NULL, TrafficProcessThread, this ); mbThreadStarted = true; } } return svcs; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Disconnect() { // Clear all callback function pointers mCallbacks.clear(); // Exit traffic processing thread if (mbThreadStarted == true) { // Signal thread to exit mExitEvent.Set( 0 ); // If we are not being called from the thread itself then wait for // it to exit, if not then it will have to exit automatically if (pthread_self() != mThreadID) { if (mThreadID != 0) { pthread_join( mThreadID, NULL ); } } } // Clear out thread handle/ID mbThreadStarted = false; mThreadID = 0; return cGobiQMICore::Disconnect(); } /*=========================================================================== METHOD: SetGenericCallback (Public Method) DESCRIPTION: Enable/disable generic callback function PARAMETERS: svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Generic callback pointer userValue [ I ] - User value to pass back to callback RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ) { // Assume success eGobiError rc = eGOBI_ERR_NONE; tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); bool bOn = (pCallback != 0 && pIter == mCallbacks.end()); bool bOff = (pCallback == 0 && pIter != mCallbacks.end()); bool bReplace = (pCallback != 0 && pIter != mCallbacks.end()); if (bOn == true || bReplace == true) { tCallbackValue cv( pCallback, userValue ); mCallbacks[ck] = cv; } else if (bOff == true) { mCallbacks.erase( pIter ); } return rc; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiConnectionMgmt/GobiConnectionMgmt.h000077500000000000000000000203171455567757300273670ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.h DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; extern "C" { // Generic callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ); }; // CallbackThread prototype // Thread to execute a callback asynchronously void * CallbackThread( PVOID pArg ); /*=========================================================================*/ // Class cGobiCMCallback /*=========================================================================*/ class cGobiCMCallback { public: // (Inline) Constructor cGobiCMCallback() { }; // (Inline) Destructor virtual ~cGobiCMCallback() { }; // (Inline) Initialize the callback object by starting the thread bool Initialize() { // Start the thread pthread_t threadID; pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); int nRC = pthread_create( &threadID, &attributes, CallbackThread, this ); if (nRC == 0) { // Success! return true; } return false; }; protected: // Call the function virtual void Call() = 0; // Function thread gets full access friend void * CallbackThread( PVOID pArg ); }; /*=========================================================================*/ // Class cGenericCallback /*=========================================================================*/ class cGenericCallback : public cGobiCMCallback { public: // (Inline) Constructor cGenericCallback( tFNGenericCallback pCallback, ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ) : mServiceID( svcID ), mMessageID( msgID ), mUserValue( userValue ), mOutputLen( 0 ), mpCallback( pCallback ) { memset( &mOutput[0], 0, QMI_MAX_BUFFER_SIZE ); if (outLen <= QMI_MAX_BUFFER_SIZE && pOut != 0) { mOutputLen = outLen; memcpy( &mOutput[0], pOut, outLen ); } }; // (Inline) Destructor virtual ~cGenericCallback() { mpCallback = 0; }; protected: /* Service ID */ ULONG mServiceID; /* Message ID */ ULONG mMessageID; /* User value */ ULONG_PTR mUserValue; /* Actual size of output content */ ULONG mOutputLen; /* Output content buffer */ BYTE mOutput[QMI_MAX_BUFFER_SIZE]; /* Callback function */ tFNGenericCallback mpCallback; // Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mServiceID, mMessageID, mUserValue, mOutputLen, (const BYTE *)&mOutput[0] ); } }; }; /*=========================================================================*/ // Class cGobiConnectionMgmt /*=========================================================================*/ class cGobiConnectionMgmt : public cGobiQMICore { public: // Constructor cGobiConnectionMgmt(); // Destructor virtual ~cGobiConnectionMgmt(); // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Enable/disable generic callback function eGobiError SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ); protected: // Process new traffic void ProcessTraffic( eQMIService svc ); /* Is there an active thread? */ bool mbThreadStarted; /* ID of traffic processing thread */ pthread_t mThreadID; /* Traffic processing thread exit event */ cEvent mExitEvent; /* Has the protocol server thread finished cleanup? */ bool mThreadCleanupFinished; /* Generic callback function key/value */ typedef std::pair tCallbackKey; typedef std::pair tCallbackValue; /* Callback functions */ std::map mCallbacks; // Traffic process thread gets full access friend VOID * TrafficProcessThread( PVOID pArg ); }; /*=========================================================================*/ // Class CGobiConnectionMgmtDLL /*=========================================================================*/ class CGobiConnectionMgmtDLL { public: // Constructor CGobiConnectionMgmtDLL(); // Destructor virtual ~CGobiConnectionMgmtDLL(); // Create a new API object GOBIHANDLE CreateAPI(); // Delete an existing API object void DeleteAPI( GOBIHANDLE handle ); // Return the requested API object cGobiConnectionMgmt * GetAPI( GOBIHANDLE handle ); protected: /* API interface object */ std::map mAPI; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern CGobiConnectionMgmtDLL gDLL; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiConnectionMgmt/GobiConnectionMgmtAPI.h000077500000000000000000017111501455567757300277240ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPI.h DESCRIPTION: QUALCOMM Connection Management API for Gobi Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif /*=========================================================================*/ // Definitions /*=========================================================================*/ // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; #ifdef __cplusplus extern "C" { #endif // Geeneric callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); #ifdef __cplusplus }; #endif /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ); /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ); /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ); /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ); /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiConnectionMgmt/GobiConnectionMgmtAPIEnums.h000077500000000000000000007333301455567757300307370ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIEnums.h DESCRIPTION: Declaration of the Gobi API enumerations Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Gobi API error code enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrors) eGOBI_ERR_QMI_OFFSET = 1000, }; // Enum to describe QMI AUTH AKA Result enum eQMIAUTHAKAResult:UINT8 { eQMIAUTHAKAResult_Success = 0, eQMIAUTHAKAResult_SyncFailure = 1, eQMIAUTHAKAResult_Failure = 2, }; // Enum to describe QMI AUTH AKA Version enum eQMIAUTHAKAVersion:UINT8 { eQMIAUTHAKAVersion_Version1 = 0, eQMIAUTHAKAVersion_Version2 = 1, }; // Enum to describe QMI AUTH EAP Result enum eQMIAUTHEAPResult:UINT8 { eQMIAUTHEAPResult_Success = 0, eQMIAUTHEAPResult_Failure = 1, }; // Enum to describe QMI CAT Activate Targets enum eQMICATActivateTargets:UINT8 { eQMICATActivateTargets_UICCCLFInterface = 1, }; // Enum to describe QMI CAT Address NPI enum eQMICATAddressNPI:UINT8 { eQMICATAddressNPI_Unknown = 0, eQMICATAddressNPI_ISDNTelephony = 1, eQMICATAddressNPI_DataNPI = 2, eQMICATAddressNPI_TelexNPI = 3, eQMICATAddressNPI_PrivateNPI = 4, eQMICATAddressNPI_ExtensionIsReserved = 15, }; // Enum to describe QMI CAT Address TON enum eQMICATAddressTON:UINT8 { eQMICATAddressTON_Unknown = 0, eQMICATAddressTON_InternationalNumber = 1, eQMICATAddressTON_NationalNumber = 2, eQMICATAddressTON_NetworkSpecificNumber = 3, }; // Enum to describe QMI CAT Address Type enum eQMICATAddressType:UINT8 { eQMICATAddressType_NoAddressGiven = 1, eQMICATAddressType_Dynamic = 2, eQMICATAddressType_IPv4 = 3, eQMICATAddressType_IPv6 = 4, }; // Enum to describe QMI CAT Alpha ID Command Type enum eQMICATAlphaIDCommandType:UINT8 { eQMICATAlphaIDCommandType_SendSMSProactiveCommand = 1, }; // Enum to describe QMI CAT Bearer enum eQMICATBearer:UINT8 { eQMICATBearer_SMS = 0, eQMICATBearer_CSD = 1, eQMICATBearer_USSD = 2, eQMICATBearer_GPRS = 3, eQMICATBearer_Default = 4, }; // Enum to describe QMI CAT Bearer Capability Repeat Indicator enum eQMICATBearerCapabilityRepeatIndicator:UINT8 { eQMICATBearerCapabilityRepeatIndicator_AlternateMode = 0, eQMICATBearerCapabilityRepeatIndicator_SequentialMode = 1, }; // Enum to describe QMI CAT Browser Termination Causes enum eQMICATBrowserTerminationCauses:UINT32 { eQMICATBrowserTerminationCauses_UserTerminated = 0, eQMICATBrowserTerminationCauses_ErrorTerminated = 1, }; // Enum to describe QMI CAT CSD Bearer Name enum eQMICATCSDBearerName:UINT8 { eQMICATCSDBearerName_DataCircuitAsyncUDIOr31kHzModem = 0, eQMICATCSDBearerName_DataCircuitSyncUDIOr31kHzModem = 1, eQMICATCSDBearerName_PADAccessAsyncUDI = 2, eQMICATCSDBearerName_PacketAccessSyncUDI = 3, eQMICATCSDBearerName_DataCircuitAsyncRDI = 4, eQMICATCSDBearerName_DataCircuitSyncRDI = 5, eQMICATCSDBearerName_PADAccessAsyncRDI = 6, eQMICATCSDBearerName_PacketAccessSyncRDI = 7, }; // Enum to describe QMI CAT Call Control Result enum eQMICATCallControlResult:UINT8 { eQMICATCallControlResult_AllowedWithNoModification = 0, eQMICATCallControlResult_NotAllowed = 1, eQMICATCallControlResult_AllowedWithModification = 2, }; // Enum to describe QMI CAT Call Setup Requirement enum eQMICATCallSetupRequirement:UINT8 { eQMICATCallSetupRequirement_NoOtherCalls = 0, eQMICATCallSetupRequirement_HoldActiveCalls = 1, eQMICATCallSetupRequirement_DisconnectActiveCalls = 2, }; // Enum to describe QMI CAT Channel State enum eQMICATChannelState:UINT8 { eQMICATChannelState_ClosedState = 0, eQMICATChannelState_ListenState = 1, eQMICATChannelState_EstablishedState = 2, }; // Enum to describe QMI CAT Command Format enum eQMICATCommandFormat:UINT8 { eQMICATCommandFormat_Raw = 1, eQMICATCommandFormat_Decoded = 2, }; // Enum to describe QMI CAT Command ID enum eQMICATCommandID:UINT8 { eQMICATCommandID_DisplayText = 1, eQMICATCommandID_GetInkey = 2, eQMICATCommandID_GetInput = 3, eQMICATCommandID_LaunchBrowser = 4, eQMICATCommandID_PlayTone = 5, eQMICATCommandID_SelectItem = 6, eQMICATCommandID_SendSMS = 7, eQMICATCommandID_SendSS = 8, eQMICATCommandID_SendUSSD = 9, eQMICATCommandID_SetupCallUserConfiguration = 10, eQMICATCommandID_SetupCallAlphaDisplay = 11, eQMICATCommandID_SetupMenu = 12, eQMICATCommandID_SetupIdleText = 13, eQMICATCommandID_ProvideLocalInformationLanguage = 14, eQMICATCommandID_SendDTMF = 15, eQMICATCommandID_LanguageNotification = 16, eQMICATCommandID_SetupEventUserActivity = 17, eQMICATCommandID_SetupEventIdleScreenNotify = 18, eQMICATCommandID_SetupEventLanguageSelectionNotify = 19, eQMICATCommandID_OpenChannel = 20, eQMICATCommandID_CloseChannel = 21, eQMICATCommandID_ReceiveData = 22, eQMICATCommandID_SendData = 23, eQMICATCommandID_Activate = 24, eQMICATCommandID_SetupEventHCIConnectivity = 25, }; // Enum to describe QMI CAT Config Modes enum eQMICATConfigModes:UINT8 { eQMICATConfigModes_DisabledMode = 0, eQMICATConfigModes_GobiMode = 1, eQMICATConfigModes_AndroidMode = 2, eQMICATConfigModes_DecodedMode = 3, eQMICATConfigModes_DecodedPullOnlyMode = 4, eQMICATConfigModes_CustomRawMode = 5, eQMICATConfigModes_CustomDecodedMode = 6, }; // Enum to describe QMI CAT Connection Element enum eQMICATConnectionElement:UINT8 { eQMICATConnectionElement_Transparent = 0, eQMICATConnectionElement_Nontransparent = 1, eQMICATConnectionElement_BothTransparentPreferred = 2, eQMICATConnectionElement_BothNontransparentPreferred = 3, }; // Enum to describe QMI CAT Data Coding Scheme enum eQMICATDataCodingScheme:UINT8 { eQMICATDataCodingScheme_7BitGSM = 0, eQMICATDataCodingScheme_8BitGSM = 1, eQMICATDataCodingScheme_UCS2 = 2, }; // Enum to describe QMI CAT Decoded Envelope Command enum eQMICATDecodedEnvelopeCommand:UINT16 { eQMICATDecodedEnvelopeCommand_MenuSelection = 1, eQMICATDecodedEnvelopeCommand_EventDownloadLanguageSelection = 2, eQMICATDecodedEnvelopeCommand_EventDownloadUserActivity = 3, eQMICATDecodedEnvelopeCommand_EventDownloadIdleScreenAvailable = 4, eQMICATDecodedEnvelopeCommand_SendCallControl = 5, eQMICATDecodedEnvelopeCommand_EventDownloadHCIConnectivity = 6, eQMICATDecodedEnvelopeCommand_EventBrowserTermination = 7, }; // Enum to describe QMI CAT Deliver Error SDU enum eQMICATDeliverErrorSDU:UINT8 { eQMICATDeliverErrorSDU_No = 0, eQMICATDeliverErrorSDU_Yes = 1, eQMICATDeliverErrorSDU_NoDetect = 2, eQMICATDeliverErrorSDU_SubscribedValue = 3, }; // Enum to describe QMI CAT Delivery Order enum eQMICATDeliveryOrder:UINT8 { eQMICATDeliveryOrder_No = 0, eQMICATDeliveryOrder_Yes = 1, eQMICATDeliveryOrder_SubscribedValue = 2, }; // Enum to describe QMI CAT Display Icon Only enum eQMICATDisplayIconOnly:UINT8 { eQMICATDisplayIconOnly_DoNotDisplayTheIcon = 0, eQMICATDisplayIconOnly_DisplayOnlyTheIcon = 1, }; // Enum to describe QMI CAT Envelope Command Type enum eQMICATEnvelopeCommandType:UINT16 { eQMICATEnvelopeCommandType_MenuSelection = 1, eQMICATEnvelopeCommandType_EventDownloadUserActivity = 2, eQMICATEnvelopeCommandType_EventDownloadIdleScreenAvailable = 3, eQMICATEnvelopeCommandType_EventDownloadLanguageSelection = 4, eQMICATEnvelopeCommandType_UnknownType = 5, eQMICATEnvelopeCommandType_EventDownloadBrowserTermination = 6, eQMICATEnvelopeCommandType_SendCallControl = 7, eQMICATEnvelopeCommandType_EventDownloadHCIConnectivity = 8, }; // Enum to describe QMI CAT Help Available enum eQMICATHelpAvailable:UINT8 { eQMICATHelpAvailable_NoHelpIsAvailable = 0, eQMICATHelpAvailable_HelpIsAvailable = 1, }; // Enum to describe QMI CAT Help Request enum eQMICATHelpRequest:UINT8 { eQMICATHelpRequest_NoHelpIsRequested = 0, eQMICATHelpRequest_HelpIsRequested = 1, }; // Enum to describe QMI CAT High Priority enum eQMICATHighPriority:UINT8 { eQMICATHighPriority_DoNotClearTheScreen = 0, eQMICATHighPriority_ClearAnythingThatIsOnTheScreen = 1, }; // Enum to describe QMI CAT Icon Is Displayed enum eQMICATIconIsDisplayed:UINT8 { eQMICATIconIsDisplayed_No = 0, eQMICATIconIsDisplayed_Yes = 1, }; // Enum to describe QMI CAT Icon Qualifier enum eQMICATIconQualifier:UINT8 { eQMICATIconQualifier_IconIsSelfExplanatory = 0, eQMICATIconQualifier_IconIsNotSelfExplanatory = 1, }; // Enum to describe QMI CAT Image Coding Scheme enum eQMICATImageCodingScheme:UINT8 { eQMICATImageCodingScheme_Unknown = 0, eQMICATImageCodingScheme_Basic = 1, eQMICATImageCodingScheme_Color = 2, }; // Enum to describe QMI CAT Immediate Response enum eQMICATImmediateResponse:UINT8 { eQMICATImmediateResponse_No = 0, eQMICATImmediateResponse_Yes = 1, }; // Enum to describe QMI CAT Is CDMA SMS enum eQMICATIsCDMASMS:UINT8 { eQMICATIsCDMASMS_NotCDMASMS = 0, eQMICATIsCDMASMS_CDMASMS = 1, }; // Enum to describe QMI CAT Launch Mode enum eQMICATLaunchMode:UINT8 { eQMICATLaunchMode_LaunchIfNotAlreadyLaunched = 0, eQMICATLaunchMode_UseTheExistingBrowser = 1, eQMICATLaunchMode_CloseTheExistingBroswer = 2, }; // Enum to describe QMI CAT Next Action enum eQMICATNextAction:UINT8 { eQMICATNextAction_SetupCall = 0, eQMICATNextAction_SendSS = 1, eQMICATNextAction_SendUSSD = 2, eQMICATNextAction_SendShortMessage = 3, eQMICATNextAction_LaunchBrowser = 4, eQMICATNextAction_PlayTone = 5, eQMICATNextAction_DisplayText = 6, eQMICATNextAction_GetInkey = 7, eQMICATNextAction_GetInput = 8, eQMICATNextAction_SelectItem = 9, eQMICATNextAction_SetupMenu = 10, eQMICATNextAction_SetupIdleModeText = 11, eQMICATNextAction_EndOfTheProactiveSession = 12, eQMICATNextAction_ProvideLocalInformation = 13, }; // Enum to describe QMI CAT Notification Required enum eQMICATNotificationRequired:UINT8 { eQMICATNotificationRequired_NotificationIsNotRequired = 0, eQMICATNotificationRequired_NotificationIsRequired = 1, }; // Enum to describe QMI CAT On Demand Link Establish enum eQMICATOnDemandLinkEstablish:UINT8 { eQMICATOnDemandLinkEstablish_LinkIsNotRequired = 0, eQMICATOnDemandLinkEstablish_LinkIsRequired = 1, }; // Enum to describe QMI CAT PDP Type enum eQMICATPDPType:UINT8 { eQMICATPDPType_IP = 2, }; // Enum to describe QMI CAT Packet Data Protocol enum eQMICATPacketDataProtocol:UINT8 { eQMICATPacketDataProtocol_IP = 2, }; // Enum to describe QMI CAT Packing Required enum eQMICATPackingRequired:UINT8 { eQMICATPackingRequired_PackingIsNotRequired = 0, eQMICATPackingRequired_PackingIsRequired = 1, }; // Enum to describe QMI CAT Presentation enum eQMICATPresentation:UINT8 { eQMICATPresentation_NotSpecified = 0, eQMICATPresentation_DataValuePresentation = 1, eQMICATPresentation_NavigationPresentation = 2, }; // Enum to describe QMI CAT Proactive Session End Type enum eQMICATProactiveSessionEndType:UINT8 { eQMICATProactiveSessionEndType_EndProactiveSessionCommandReceivedFromTheCard = 1, eQMICATProactiveSessionEndType_EndProactiveSessionInternalToME = 2, }; // Enum to describe QMI CAT Redial Necessary enum eQMICATRedialNecessary:UINT8 { eQMICATRedialNecessary_RedialIsNotNecessary = 0, eQMICATRedialNecessary_RedialIsNecessary = 1, }; // Enum to describe QMI CAT Refresh Stage enum eQMICATRefreshStage:UINT16 { eQMICATRefreshStage_RefreshStart = 1, eQMICATRefreshStage_RefreshSuccess = 2, eQMICATRefreshStage_RefreshFailed = 3, }; // Enum to describe QMI CAT Response Command enum eQMICATResponseCommand:UINT8 { eQMICATResponseCommand_DisplayText = 1, eQMICATResponseCommand_GetInkey = 2, eQMICATResponseCommand_GetInput = 3, eQMICATResponseCommand_LaunchBrowser = 4, eQMICATResponseCommand_PlayTone = 5, eQMICATResponseCommand_SelectItemRequest = 6, eQMICATResponseCommand_SetupMenu = 7, eQMICATResponseCommand_SetupIdleText = 8, eQMICATResponseCommand_ProvideLocalInformationLanguage = 9, eQMICATResponseCommand_SetupEventUserActivity = 10, eQMICATResponseCommand_SetupEventIdleScreenActivity = 11, eQMICATResponseCommand_SetupEventLanguageSelectNotify = 12, eQMICATResponseCommand_LanguageNotification = 13, eQMICATResponseCommand_Activate = 14, eQMICATResponseCommand_SetupEventHCIConnectivity = 15, }; // Enum to describe QMI CAT Response Format enum eQMICATResponseFormat:UINT8 { eQMICATResponseFormat_SMSDefaultAlphabet = 0, eQMICATResponseFormat_YesOrNo = 1, eQMICATResponseFormat_NumericalOnly = 2, eQMICATResponseFormat_UCS2 = 3, eQMICATResponseFormat_ImmediateDigitResponse = 4, eQMICATResponseFormat_YesOrNoOrImmediateDigitalResponse = 5, }; // Enum to describe QMI CAT Response Packing Format enum eQMICATResponsePackingFormat:UINT8 { eQMICATResponsePackingFormat_UnpacketFormat = 0, eQMICATResponsePackingFormat_PacketFormat = 1, }; // Enum to describe QMI CAT Send Data Immediately enum eQMICATSendDataImmediately:UINT8 { eQMICATSendDataImmediately_NoStoreInTXBuffer = 0, eQMICATSendDataImmediately_Yes = 1, }; // Enum to describe QMI CAT Send Data Result enum eQMICATSendDataResult:UINT8 { eQMICATSendDataResult_Failed = 0, eQMICATSendDataResult_Success = 1, }; // Enum to describe QMI CAT Show User Input enum eQMICATShowUserInput:UINT8 { eQMICATShowUserInput_DeviceCanShowAllCharacters = 0, eQMICATShowUserInput_DeviceCanShowUserInput = 1, }; // Enum to describe QMI CAT Slot enum eQMICATSlot:UINT8 { eQMICATSlot_Slot1 = 1, eQMICATSlot_Slot2 = 2, }; // Enum to describe QMI CAT Softkey Selection enum eQMICATSoftkeySelection:UINT8 { eQMICATSoftkeySelection_SoftkeyIsNotSelected = 0, eQMICATSoftkeySelection_SoftkeyIsSelected = 1, }; // Enum to describe QMI CAT Specific Language Notfication enum eQMICATSpecificLanguageNotfication:UINT8 { eQMICATSpecificLanguageNotfication_No = 0, eQMICATSpecificLanguageNotfication_Yes = 1, }; // Enum to describe QMI CAT Time Units enum eQMICATTimeUnits:UINT8 { eQMICATTimeUnits_Minutes = 0, eQMICATTimeUnits_Seconds = 1, eQMICATTimeUnits_TenthsOfSeconds = 2, eQMICATTimeUnits_DurationIsNotPresent = 255, }; // Enum to describe QMI CAT Tone enum eQMICATTone:UINT8 { eQMICATTone_DialTone = 1, eQMICATTone_CalledSubscriberBusy = 2, eQMICATTone_Congestion = 3, eQMICATTone_RadioPathAck = 4, eQMICATTone_RadioPathNotAvailableCallDrop = 5, eQMICATTone_ErrorTone = 6, eQMICATTone_CallWaitingTone = 7, eQMICATTone_RingingTone = 8, eQMICATTone_GeneralBeep = 9, eQMICATTone_PositiveAckTone = 10, eQMICATTone_NegativeAckTone = 11, eQMICATTone_RingingToneSelectedByUser = 12, eQMICATTone_SMSAlertToneSelectedByUser = 13, eQMICATTone_NotInUse = 255, }; // Enum to describe QMI CAT Traffic Class enum eQMICATTrafficClass:UINT8 { eQMICATTrafficClass_Conversational = 0, eQMICATTrafficClass_Streaming = 1, eQMICATTrafficClass_Interactive = 2, eQMICATTrafficClass_Background = 3, eQMICATTrafficClass_SubscribedValue = 4, }; // Enum to describe QMI CAT Transport Protocol enum eQMICATTransportProtocol:UINT8 { eQMICATTransportProtocol_NotPresent = 0, eQMICATTransportProtocol_UDP = 1, eQMICATTransportProtocol_TCP = 2, }; // Enum to describe QMI CAT USSD Data Coding Scheme enum eQMICATUSSDDataCodingScheme:UINT8 { eQMICATUSSDDataCodingScheme_7BitGSM = 0, eQMICATUSSDDataCodingScheme_8BitGSM = 1, eQMICATUSSDDataCodingScheme_8BitUCS2 = 2, eQMICATUSSDDataCodingScheme_7BitUCS2 = 3, }; // Enum to describe QMI CAT User Confirmed enum eQMICATUserConfirmed:UINT8 { eQMICATUserConfirmed_No = 0, eQMICATUserConfirmed_Yes = 1, }; // Enum to describe QMI CAT User Control enum eQMICATUserControl:UINT8 { eQMICATUserControl_DoNotAllowUserToClearTheScreen = 0, eQMICATUserControl_AllowUserToClearTheScreen = 1, }; // Enum to describe QMI CTL Driver Data Formats enum eQMICTLDriverDataFormats { eQMICTLDriverDataFormats_QoSFlowHeaderAbsent = 0, eQMICTLDriverDataFormats_QoSFlowHeaderPresent = 1, }; // Enum to describe QMI CTL Power Save States enum eQMICTLPowerSaveStates { eQMICTLPowerSaveStates_Normal = 0, eQMICTLPowerSaveStates_Suspend = 1, eQMICTLPowerSaveStates_Powerdown = 2, }; // Enum to describe QMI CTL Service Types enum eQMICTLServiceTypes { eQMICTLServiceTypes_Control = 0, eQMICTLServiceTypes_WDS = 1, eQMICTLServiceTypes_DMS = 2, eQMICTLServiceTypes_NAS = 3, eQMICTLServiceTypes_QOS = 4, eQMICTLServiceTypes_WMS = 5, eQMICTLServiceTypes_PDS = 6, eQMICTLServiceTypes_AUTH = 7, eQMICTLServiceTypes_CAT = 224, eQMICTLServiceTypes_RMS = 225, eQMICTLServiceTypes_OMA = 226, }; // Enum to describe QMI Call End Reasons enum eQMICallEndReasons:UINT16 { eQMICallEndReasons_Unknown = 0, eQMICallEndReasons_Unspecified = 1, eQMICallEndReasons_ClientEnd = 2, eQMICallEndReasons_NoService = 3, eQMICallEndReasons_Fade = 4, eQMICallEndReasons_ReleaseNormal = 5, eQMICallEndReasons_AccInProgress = 6, eQMICallEndReasons_AccFailed = 7, eQMICallEndReasons_RedirectOrHandoff = 8, eQMICallEndReasons_CloseInProgress = 9, eQMICallEndReasons_AuthenticationFailed = 10, eQMICallEndReasons_InternalError = 11, eQMICallEndReasons_CDMALock = 500, eQMICallEndReasons_Intercept = 501, eQMICallEndReasons_Reorder = 502, eQMICallEndReasons_ReleaseServiceOptionRejected = 503, eQMICallEndReasons_IncomingCall = 504, eQMICallEndReasons_AlertStop = 505, eQMICallEndReasons_Activation = 506, eQMICallEndReasons_MaxAccessProbe = 507, eQMICallEndReasons_CCSNotSupportedByBS = 508, eQMICallEndReasons_NoResponseFromBS = 509, eQMICallEndReasons_RejectedByBS = 510, eQMICallEndReasons_Incompatible = 511, eQMICallEndReasons_AlreadyInTC = 512, eQMICallEndReasons_UserCallOrigDuringGPS = 513, eQMICallEndReasons_UserCallOrigDuringSMS = 514, eQMICallEndReasons_NoCDMAService = 515, eQMICallEndReasons_ConfFailed = 1000, eQMICallEndReasons_IncomingRejected = 1001, eQMICallEndReasons_NoGWService = 1002, eQMICallEndReasons_NetworkEnd = 1003, eQMICallEndReasons_LLCOrSNDCPFailure = 1004, eQMICallEndReasons_InsufficientResources = 1005, eQMICallEndReasons_ServiceOptionOutOfOrder = 1006, eQMICallEndReasons_NSAPIAlreadyUsed = 1007, eQMICallEndReasons_RegularPDPContextDeactivation = 1008, eQMICallEndReasons_NetworkFailure = 1009, eQMICallEndReasons_ReactivationRequested = 1010, eQMICallEndReasons_ProtocolError = 1011, eQMICallEndReasons_OperatorDeterminedBarring = 1012, eQMICallEndReasons_UnknownOrMissingAPN = 1013, eQMICallEndReasons_UnknownPDPAddressOrPDPType = 1014, eQMICallEndReasons_ActivationRejectedByGGSN = 1015, eQMICallEndReasons_ActivationRejectedUnspecified = 1016, eQMICallEndReasons_ServiceOptionNotSupported = 1017, eQMICallEndReasons_RequestedServiceOptionNotSubscribed = 1018, eQMICallEndReasons_QoSNotAccepted = 1019, eQMICallEndReasons_SemanticErrorInTheTFTOperation = 1020, eQMICallEndReasons_SyntacticalErrorInTheTFTOperation = 1021, eQMICallEndReasons_UnknownPDPContext = 1022, eQMICallEndReasons_SemanticErrorsInPacketFilters = 1023, eQMICallEndReasons_SyntacticalErrorsInPacketFilters = 1024, eQMICallEndReasons_PDPContextWithoutTFTAlreadyActivated = 1025, eQMICallEndReasons_InvalidTransactionIdentifierValue = 1026, eQMICallEndReasons_SemanticallyIncorrectMessage = 1027, eQMICallEndReasons_InvalidMandatoryInformation = 1028, eQMICallEndReasons_MessageTypeNonExistent = 1029, eQMICallEndReasons_MessageNotCompatibleWithState = 1030, eQMICallEndReasons_InformationElementNonexistent = 1031, eQMICallEndReasons_ConditionalInformationElementError = 1032, eQMICallEndReasons_MessageNotCompatibleWithProtocolState = 1033, eQMICallEndReasons_APNRestrictionValueIncompatibleWithActivePDPContext = 1034, eQMICallEndReasons_NoGPRSContextPresent = 1035, eQMICallEndReasons_RequestedFeatureNotSupported = 1036, eQMICallEndReasons_CDGenOrBusy = 1500, eQMICallEndReasons_CDBillOrAuth = 1501, eQMICallEndReasons_ChangeHDR = 1502, eQMICallEndReasons_ExitHDR = 1503, eQMICallEndReasons_HDRNoSession = 1504, eQMICallEndReasons_HDROrigDuringGPSFix = 1505, eQMICallEndReasons_HDRCSTimeout = 1506, eQMICallEndReasons_HDRReleasedByCM = 1507, }; // Enum to describe QMI Call History Types enum eQMICallHistoryTypes:UINT8 { eQMICallHistoryTypes_Full = 0, eQMICallHistoryTypes_IDsOnly = 1, }; // Enum to describe QMI Call Types enum eQMICallTypes:UINT8 { eQMICallTypes_NDIS = 0, eQMICallTypes_DUN = 1, }; // Enum to describe QMI Connection Status enum eQMIConnectionStatus:UINT8 { eQMIConnectionStatus_Disconnected = 1, eQMIConnectionStatus_Connected = 2, eQMIConnectionStatus_Suspended = 3, eQMIConnectionStatus_Authenticating = 4, }; // Enum to describe QMI DMS Activation States enum eQMIDMSActivationStates:UINT16 { eQMIDMSActivationStates_ServiceNotActivated = 0, eQMIDMSActivationStates_SerivceActivated = 1, eQMIDMSActivationStates_ActivationConnecting = 2, eQMIDMSActivationStates_ActivationInProgress = 3, eQMIDMSActivationStates_OTASPSecurityAuthenticated = 4, eQMIDMSActivationStates_OTASPNAMDownloaded = 5, eQMIDMSActivationStates_OTASPMDNDownloaded = 6, eQMIDMSActivationStates_OTASPIMSIDownloaded = 7, eQMIDMSActivationStates_OTASPPRLDownloaded = 8, eQMIDMSActivationStates_OTASPSPCDownloaded = 9, eQMIDMSActivationStates_OTASPSettingsCommitted = 10, }; // Enum to describe QMI DMS Activation Types enum eQMIDMSActivationTypes { eQMIDMSActivationTypes_OTASP = 0, }; // Enum to describe QMI DMS Data Service Capabilities 1 enum eQMIDMSDataServiceCapabilities1:UINT8 { eQMIDMSDataServiceCapabilities1_NoDataServicesSupported = 0, eQMIDMSDataServiceCapabilities1_OnlyCircuitSwitched = 1, eQMIDMSDataServiceCapabilities1_OnlyPacketSwitched = 2, eQMIDMSDataServiceCapabilities1_SimultaneousCircuitPacketSwitched = 3, eQMIDMSDataServiceCapabilities1_NonsimultaneousCircuitPacketSwitched = 4, }; // Enum to describe QMI DMS Image Types enum eQMIDMSImageTypes { eQMIDMSImageTypes_Modem = 0, eQMIDMSImageTypes_PRI = 1, }; // Enum to describe QMI DMS Lock States enum eQMIDMSLockStates:UINT8 { eQMIDMSLockStates_LockDisabled = 0, eQMIDMSLockStates_LockEnabled = 1, }; // Enum to describe QMI DMS Operating Modes enum eQMIDMSOperatingModes:UINT8 { eQMIDMSOperatingModes_Online = 0, eQMIDMSOperatingModes_LowPower = 1, eQMIDMSOperatingModes_FactoryTestMode = 2, eQMIDMSOperatingModes_Offline = 3, eQMIDMSOperatingModes_Reset = 4, eQMIDMSOperatingModes_Shutdown = 5, eQMIDMSOperatingModes_PersistentLowPower = 6, eQMIDMSOperatingModes_ModeOnlyLowPower = 7, eQMIDMSOperatingModes_GWNetworkTest = 8, }; // Enum to describe QMI DMS PIN Status enum eQMIDMSPINStatus:UINT8 { eQMIDMSPINStatus_PINUninitialized = 0, eQMIDMSPINStatus_PINEnabledUnverified = 1, eQMIDMSPINStatus_PINEnabledVerified = 2, eQMIDMSPINStatus_PINDisabled = 3, eQMIDMSPINStatus_PINBlocked = 4, eQMIDMSPINStatus_PINBlockedPermanently = 5, eQMIDMSPINStatus_PINUnblocked = 6, eQMIDMSPINStatus_PINChanged = 7, }; // Enum to describe QMI DMS Power Sources enum eQMIDMSPowerSources:UINT8 { eQMIDMSPowerSources_Battery = 0, eQMIDMSPowerSources_External = 1, }; // Enum to describe QMI DMS Radio Interfaces enum eQMIDMSRadioInterfaces:UINT8 { eQMIDMSRadioInterfaces_CDMA20001x = 1, eQMIDMSRadioInterfaces_CDMA2000HRPD = 2, eQMIDMSRadioInterfaces_GSM = 4, eQMIDMSRadioInterfaces_UMTS = 5, eQMIDMSRadioInterfaces_LTE = 8, eQMIDMSRadioInterfaces_TDS = 9, }; // Enum to describe QMI DMS Service Capabilities enum eQMIDMSServiceCapabilities:UINT32 { eQMIDMSServiceCapabilities_DataOnly = 1, eQMIDMSServiceCapabilities_VoiceOnly = 2, eQMIDMSServiceCapabilities_SimultaneousVoiceAndData = 3, eQMIDMSServiceCapabilities_NonsimultaneousVoiceAndData = 4, }; // Enum to describe QMI DMS Time References enum eQMIDMSTimeReferences:UINT32 { eQMIDMSTimeReferences_User = 0, }; // Enum to describe QMI DMS Timestamp Sources enum eQMIDMSTimestampSources:UINT16 { eQMIDMSTimestampSources_Device = 0, eQMIDMSTimestampSources_CDMANetwork = 1, eQMIDMSTimestampSources_CDMA1xEVDONetwork = 2, eQMIDMSTimestampSources_GSMNetwork = 3, eQMIDMSTimestampSources_WCDMANetwork = 4, eQMIDMSTimestampSources_GPSNetwork = 5, eQMIDMSTimestampSources_MFLONetwork = 6, }; // Enum to describe QMI DMS UIM Facility enum eQMIDMSUIMFacility:UINT8 { eQMIDMSUIMFacility_PNNetworkPersonalization = 0, eQMIDMSUIMFacility_PUNetworkSubsetPersonalization = 1, eQMIDMSUIMFacility_PPServiceProviderPersonalization = 2, eQMIDMSUIMFacility_PCCorporatePersonalization = 3, eQMIDMSUIMFacility_PFUIMPersonalization = 4, }; // Enum to describe QMI DMS UIM Facility States enum eQMIDMSUIMFacilityStates:UINT8 { eQMIDMSUIMFacilityStates_Deactivated = 0, eQMIDMSUIMFacilityStates_Activated = 1, eQMIDMSUIMFacilityStates_Block = 2, }; // Enum to describe QMI DMS UIM States enum eQMIDMSUIMStates:UINT8 { eQMIDMSUIMStates_InitializationCompleted = 0, eQMIDMSUIMStates_InitializationFailed = 1, eQMIDMSUIMStates_NotPresent = 2, eQMIDMSUIMStates_StateUnavailable = 255, }; // Enum to describe QMI Data Bearer Technologies enum eQMIDataBearerTechnologies:UINT8 { eQMIDataBearerTechnologies_CDMA20001x = 1, eQMIDataBearerTechnologies_CDMA20001xEVDORev0 = 2, eQMIDataBearerTechnologies_GPRS = 3, eQMIDataBearerTechnologies_WCDMA = 4, eQMIDataBearerTechnologies_CDMA20001xEVDORevA = 5, eQMIDataBearerTechnologies_EGPRS = 6, eQMIDataBearerTechnologies_HSDPAWCDMA = 7, eQMIDataBearerTechnologies_WCDMAHSUPA = 8, eQMIDataBearerTechnologies_HSDPAHSUPA = 9, eQMIDataBearerTechnologies_LTE = 10, eQMIDataBearerTechnologies_CDMA2000EHRPD = 11, eQMIDataBearerTechnologies_HSDPAPlusWCDMA = 12, eQMIDataBearerTechnologies_HSDPAPlusHSUPA = 13, eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA = 14, eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA = 15, eQMIDataBearerTechnologies_HSDPAPlus64QAM = 16, eQMIDataBearerTechnologies_HSDPAPlus64QAMHSUPA = 17, eQMIDataBearerTechnologies_TDSCDMA = 18, eQMIDataBearerTechnologies_TDSCDMAHSDPA = 19, eQMIDataBearerTechnologies_Unknown = 255, }; // Enum to describe QMI Dormancy Status enum eQMIDormancyStatus:UINT8 { eQMIDormancyStatus_TrafficChannelDormant = 1, eQMIDormancyStatus_TrafficChannelActive = 2, }; // Enum to describe QMI Erroneous SDU Deliveries enum eQMIErroneousSDUDeliveries:UINT8 { eQMIErroneousSDUDeliveries_Subscribe = 0, eQMIErroneousSDUDeliveries_NoDetection = 1, eQMIErroneousSDUDeliveries_ErroneousSDUIsDelivered = 2, eQMIErroneousSDUDeliveries_ErroneousSDUIsNotDelivered = 3, }; // Enum to describe QMI Errors enum eQMIErrors:UINT16 { eQMIErrors_None = 0, eQMIErrors_MalformedMessage = 1, eQMIErrors_NoMemory = 2, eQMIErrors_Internal = 3, eQMIErrors_Aborted = 4, eQMIErrors_ClientIDsExhausted = 5, eQMIErrors_UnabortableTransaction = 6, eQMIErrors_InvalidClientID = 7, eQMIErrors_NoThresholdsProvided = 8, eQMIErrors_InvalidHandle = 9, eQMIErrors_InvalidProfile = 10, eQMIErrors_InvalidPINID = 11, eQMIErrors_IncorrectPIN = 12, eQMIErrors_NoNetworkFound = 13, eQMIErrors_CallFailed = 14, eQMIErrors_OutOfCall = 15, eQMIErrors_NotProvisioned = 16, eQMIErrors_MissingArgument = 17, eQMIErrors_ArgumentTooLong = 19, eQMIErrors_InvalidTransactionID = 22, eQMIErrors_DeviceInUse = 23, eQMIErrors_NetworkUnsupported = 24, eQMIErrors_DeviceUnsupported = 25, eQMIErrors_NoEffect = 26, eQMIErrors_NoFreeProfile = 27, eQMIErrors_InvalidPDPType = 28, eQMIErrors_InvalidTechnologyPreference = 29, eQMIErrors_InvalidProfileType = 30, eQMIErrors_InvalidServiceType = 31, eQMIErrors_InvalidRegisterAction = 32, eQMIErrors_InvalidPSAttachAction = 33, eQMIErrors_AuthenticationFailed = 34, eQMIErrors_PINBlocked = 35, eQMIErrors_PINAlwaysBlocked = 36, eQMIErrors_UIMUninitialized = 37, eQMIErrors_MaximumQoSRequestsInUse = 38, eQMIErrors_IncorrectFlowFilter = 39, eQMIErrors_NetworkQoSUnaware = 40, eQMIErrors_InvalidQoSID = 41, eQMIErrors_QoSUnavailable = 42, eQMIErrors_FlowSuspended = 43, eQMIErrors_GeneralError = 46, eQMIErrors_UnknownError = 47, eQMIErrors_InvalidArgument = 48, eQMIErrors_InvalidIndex = 49, eQMIErrors_NoEntry = 50, eQMIErrors_DeviceStorageFull = 51, eQMIErrors_DeviceNotReady = 52, eQMIErrors_NetworkNotReady = 53, eQMIErrors_WMSCauseCode = 54, eQMIErrors_WMSMessageNotSent = 55, eQMIErrors_WMSMessageDeliveryFailure = 56, eQMIErrors_WMSInvalidMessageID = 57, eQMIErrors_WMSEncoding = 58, eQMIErrors_AuthenticationLock = 59, eQMIErrors_InvalidTransition = 60, eQMIErrors_SessionInactive = 65, eQMIErrors_SessionInvalid = 66, eQMIErrors_SessionOwnership = 67, eQMIErrors_InsufficientResources = 68, eQMIErrors_Disabled = 69, eQMIErrors_InvalidOperation = 70, eQMIErrors_InvalidQMICommand = 71, eQMIErrors_WMSTPDUType = 72, eQMIErrors_WMSSMSCAddress = 73, eQMIErrors_InformationUnavailable = 74, eQMIErrors_SegmentTooLong = 75, eQMIErrors_SegmentOrder = 76, eQMIErrors_BundlingNotSupported = 77, eQMIErrors_SIMFileNotFound = 80, eQMIErrors_AccessDenied = 82, eQMIErrors_HardwareRestricted = 83, eQMIErrors_CATEventRegistrationFailed = 61441, eQMIErrors_CATInvalidTerminalResponse = 61442, eQMIErrors_CATInvalidEnvelopeCommand = 61443, eQMIErrors_CATEnvelopeCommandBusy = 61444, eQMIErrors_CATEnvelopeCommandFailed = 61445, }; // Enum to describe QMI HA/AAA Key States enum eQMIHAAAAKeyStates:UINT8 { eQMIHAAAAKeyStates_Unset = 0, eQMIHAAAAKeyStates_SetDefault = 1, eQMIHAAAAKeyStates_SetModified = 2, }; // Enum to describe QMI LOC Altitude Assumed enum eQMILOCAltitudeAssumed:UINT32 { eQMILOCAltitudeAssumed_AltitudeIsCalculated = 0, eQMILOCAltitudeAssumed_AltitudeIsAssumed = 1, }; // Enum to describe QMI LOC Altitude Source enum eQMILOCAltitudeSource:UINT32 { eQMILOCAltitudeSource_Unknown = 0, eQMILOCAltitudeSource_GPS = 1, eQMILOCAltitudeSource_CellID = 2, eQMILOCAltitudeSource_EnhancedCellID = 3, eQMILOCAltitudeSource_WiFi = 4, eQMILOCAltitudeSource_Terrestrial = 5, eQMILOCAltitudeSource_TerrestrialHybrid = 6, eQMILOCAltitudeSource_AltitudeDatabase = 7, eQMILOCAltitudeSource_BarometricAltimeter = 8, eQMILOCAltitudeSource_Other = 9, }; // Enum to describe QMI LOC Confidence enum eQMILOCConfidence:UINT32 { eQMILOCConfidence_Low = 1, eQMILOCConfidence_Medium = 2, eQMILOCConfidence_High = 3, }; // Enum to describe QMI LOC Connection Request Type enum eQMILOCConnectionRequestType { eQMILOCConnectionRequestType_Open = 1, eQMILOCConnectionRequestType_Close = 2, }; // Enum to describe QMI LOC Connection Status enum eQMILOCConnectionStatus:UINT32 { eQMILOCConnectionStatus_Success = 1, eQMILOCConnectionStatus_Failure = 2, }; // Enum to describe QMI LOC Control Mode enum eQMILOCControlMode:UINT32 { eQMILOCControlMode_Automatic = 0, eQMILOCControlMode_Forced = 1, }; // Enum to describe QMI LOC Coverage enum eQMILOCCoverage:UINT32 { eQMILOCCoverage_NotSpecified = 0, eQMILOCCoverage_Point = 1, eQMILOCCoverage_Full = 2, }; // Enum to describe QMI LOC Cradle Mount State enum eQMILOCCradleMountState:UINT32 { eQMILOCCradleMountState_NotMounted = 0, eQMILOCCradleMountState_Mounted = 1, eQMILOCCradleMountState_Unknown = 2, }; // Enum to describe QMI LOC Data Coding Scheme enum eQMILOCDataCodingScheme:UINT32 { eQMILOCDataCodingScheme_German = 12, eQMILOCDataCodingScheme_English = 13, eQMILOCDataCodingScheme_Italian = 14, eQMILOCDataCodingScheme_French = 15, eQMILOCDataCodingScheme_Spanish = 16, eQMILOCDataCodingScheme_Dutch = 17, eQMILOCDataCodingScheme_Swedish = 18, eQMILOCDataCodingScheme_Danish = 19, eQMILOCDataCodingScheme_Portuguese = 20, eQMILOCDataCodingScheme_Finnish = 21, eQMILOCDataCodingScheme_Norwegian = 22, eQMILOCDataCodingScheme_Greek = 23, eQMILOCDataCodingScheme_Turkish = 24, eQMILOCDataCodingScheme_Hungarian = 25, eQMILOCDataCodingScheme_Polish = 26, eQMILOCDataCodingScheme_Unspecified = 27, eQMILOCDataCodingScheme_UTF8 = 28, eQMILOCDataCodingScheme_UCS2 = 29, eQMILOCDataCodingScheme_GSMDefault = 30, }; // Enum to describe QMI LOC Encoding Scheme enum eQMILOCEncodingScheme:UINT32 { eQMILOCEncodingScheme_Octet = 0, eQMILOCEncodingScheme_EXNProtocolMessage = 1, eQMILOCEncodingScheme_ASCII = 2, eQMILOCEncodingScheme_IA5 = 3, eQMILOCEncodingScheme_Unicode = 4, eQMILOCEncodingScheme_ShiftJIS = 5, eQMILOCEncodingScheme_Korean = 6, eQMILOCEncodingScheme_LatinHebrew = 7, eQMILOCEncodingScheme_Latin = 8, eQMILOCEncodingScheme_GSM = 9, }; // Enum to describe QMI LOC Engine State enum eQMILOCEngineState { eQMILOCEngineState_On = 1, eQMILOCEngineState_Off = 2, }; // Enum to describe QMI LOC Fix Recurrence Type enum eQMILOCFixRecurrenceType:UINT32 { eQMILOCFixRecurrenceType_RequestPeriodicFixes = 1, eQMILOCFixRecurrenceType_RequestSingleFix = 2, }; // Enum to describe QMI LOC Format Type enum eQMILOCFormatType:UINT32 { eQMILOCFormatType_LogicalName = 0, eQMILOCFormatType_EmailAddress = 1, eQMILOCFormatType_MSISDN = 2, eQMILOCFormatType_URL = 3, eQMILOCFormatType_SIPURL = 4, eQMILOCFormatType_MIN = 5, eQMILOCFormatType_MDN = 6, eQMILOCFormatType_IMSPublicIdentity = 7, eQMILOCFormatType_OSSUnknown = 2147483647, }; // Enum to describe QMI LOC Geofence Breach Type enum eQMILOCGeofenceBreachType { eQMILOCGeofenceBreachType_Entering = 1, eQMILOCGeofenceBreachType_Leaving = 2, }; // Enum to describe QMI LOC Geofence General Alert enum eQMILOCGeofenceGeneralAlert:UINT32 { eQMILOCGeofenceGeneralAlert_GNSSUnavailable = 1, eQMILOCGeofenceGeneralAlert_GNSSAvailable = 2, eQMILOCGeofenceGeneralAlert_OOS = 3, eQMILOCGeofenceGeneralAlert_TimeInvalid = 4, }; // Enum to describe QMI LOC Geofence Operation Mode enum eQMILOCGeofenceOperationMode { eQMILOCGeofenceOperationMode_Added = 1, eQMILOCGeofenceOperationMode_Deleted = 2, eQMILOCGeofenceOperationMode_Edited = 3, }; // Enum to describe QMI LOC Geofence Origin enum eQMILOCGeofenceOrigin:UINT32 { eQMILOCGeofenceOrigin_Network = 1, eQMILOCGeofenceOrigin_Device = 2, }; // Enum to describe QMI LOC Geofence State enum eQMILOCGeofenceState:UINT32 { eQMILOCGeofenceState_Active = 1, eQMILOCGeofenceState_Suspended = 2, }; // Enum to describe QMI LOC Geofence Status enum eQMILOCGeofenceStatus:UINT32 { eQMILOCGeofenceStatus_Success = 0, eQMILOCGeofenceStatus_GeneralFailure = 1, eQMILOCGeofenceStatus_Unsupported = 2, eQMILOCGeofenceStatus_InvalidParameters = 3, eQMILOCGeofenceStatus_EngineBusy = 4, eQMILOCGeofenceStatus_PhoneOffline = 5, eQMILOCGeofenceStatus_Timeout = 6, eQMILOCGeofenceStatus_InsufficientMemory = 8, }; // Enum to describe QMI LOC Health Status enum eQMILOCHealthStatus:UINT8 { eQMILOCHealthStatus_Unhealthy = 0, eQMILOCHealthStatus_Healthy = 1, }; // Enum to describe QMI LOC Horizontal Accuracy enum eQMILOCHorizontalAccuracy:UINT32 { eQMILOCHorizontalAccuracy_Low = 1, eQMILOCHorizontalAccuracy_Medium = 2, eQMILOCHorizontalAccuracy_High = 3, }; // Enum to describe QMI LOC Intermediate Report State enum eQMILOCIntermediateReportState:UINT32 { eQMILOCIntermediateReportState_Enable = 1, eQMILOCIntermediateReportState_Disable = 2, }; // Enum to describe QMI LOC Linkage enum eQMILOCLinkage:UINT32 { eQMILOCLinkage_NotSpecified = 0, eQMILOCLinkage_FullyInterdependent = 1, eQMILOCLinkage_DependsOnLatLong = 2, eQMILOCLinkage_FullyIndependent = 3, }; // Enum to describe QMI LOC Location Server Type enum eQMILOCLocationServerType:UINT32 { eQMILOCLocationServerType_CDMAPDE = 1, eQMILOCLocationServerType_CDMAMPC = 2, eQMILOCLocationServerType_UMTSSLP = 3, eQMILOCLocationServerType_CustomPDE = 4, }; // Enum to describe QMI LOC Location Type enum eQMILOCLocationType:UINT32 { eQMILOCLocationType_CurrentLocation = 1, eQMILOCLocationType_CurrentOrLastKnownLocation = 2, eQMILOCLocationType_InitialLocation = 4, }; // Enum to describe QMI LOC Lock Type enum eQMILOCLockType:UINT32 { eQMILOCLockType_LockNone = 1, eQMILOCLockType_LockMI = 2, eQMILOCLockType_LockMT = 3, eQMILOCLockType_LockAll = 4, }; // Enum to describe QMI LOC Notification Type enum eQMILOCNotificationType:UINT32 { eQMILOCNotificationType_NoNotifyOrVerify = 1, eQMILOCNotificationType_NotifyOnly = 2, eQMILOCNotificationType_AllowNoResponse = 3, eQMILOCNotificationType_ResponseRequired = 4, eQMILOCNotificationType_PrivacyOverride = 5, }; // Enum to describe QMI LOC Operation Mode enum eQMILOCOperationMode:UINT32 { eQMILOCOperationMode_Default = 1, eQMILOCOperationMode_MSB = 2, eQMILOCOperationMode_MSA = 3, eQMILOCOperationMode_StandAlone = 4, eQMILOCOperationMode_CellID = 5, }; // Enum to describe QMI LOC Orbits Format Type enum eQMILOCOrbitsFormatType:UINT32 { eQMILOCOrbitsFormatType_PredictedOrbitsXTRA = 0, }; // Enum to describe QMI LOC PDN Type enum eQMILOCPDNType:UINT32 { eQMILOCPDNType_IPv4 = 1, eQMILOCPDNType_IPv6 = 2, eQMILOCPDNType_IPv4OrIPv6 = 3, eQMILOCPDNType_PPP = 4, }; // Enum to describe QMI LOC Position enum eQMILOCPosition:UINT32 { eQMILOCPosition_AGPSSetAssisted = 1, eQMILOCPosition_AGPSSetBased = 2, eQMILOCPosition_AGPSSetAssistedPreference = 3, eQMILOCPosition_AGPSSetBasedPreference = 4, eQMILOCPosition_AutonomousGPS = 5, eQMILOCPosition_AFLT = 6, eQMILOCPosition_ECID = 7, eQMILOCPosition_EOTD = 8, eQMILOCPosition_OTDOA = 9, eQMILOCPosition_NoPosition = 10, }; // Enum to describe QMI LOC Position From Geofence enum eQMILOCPositionFromGeofence:UINT32 { eQMILOCPositionFromGeofence_Inside = 1, eQMILOCPositionFromGeofence_Outside = 2, }; // Enum to describe QMI LOC Position Mode enum eQMILOCPositionMode:UINT32 { eQMILOCPositionMode_AssistedOnly = 1, eQMILOCPositionMode_BasedOnly = 2, eQMILOCPositionMode_AssistedPreferredBasedAllowed = 3, eQMILOCPositionMode_BasedPreferredAssistedAllowed = 4, }; // Enum to describe QMI LOC Position Source enum eQMILOCPositionSource:UINT32 { eQMILOCPositionSource_GNSS = 0, eQMILOCPositionSource_CellID = 1, eQMILOCPositionSource_EnhancedCellID = 2, eQMILOCPositionSource_WiFi = 3, eQMILOCPositionSource_Terrestrial = 4, eQMILOCPositionSource_TerrestrialHybrid = 5, eQMILOCPositionSource_Other = 6, }; // Enum to describe QMI LOC Power State enum eQMILOCPowerState:UINT32 { eQMILOCPowerState_NotConnected = 0, eQMILOCPowerState_Connected = 1, eQMILOCPowerState_Unknown = 2, }; // Enum to describe QMI LOC Reliability enum eQMILOCReliability:UINT32 { eQMILOCReliability_NotSet = 0, eQMILOCReliability_VeryLow = 1, eQMILOCReliability_Low = 2, eQMILOCReliability_Medium = 3, eQMILOCReliability_High = 4, }; // Enum to describe QMI LOC Request Type enum eQMILOCRequestType:UINT32 { eQMILOCRequestType_StartPeriodicHighFrequencyFixes = 0, eQMILOCRequestType_StartPeriodicKeepWarmFixes = 1, eQMILOCRequestType_StopPeriodicFixes = 2, }; // Enum to describe QMI LOC Responsiveness enum eQMILOCResponsiveness:UINT32 { eQMILOCResponsiveness_Low = 1, eQMILOCResponsiveness_Medium = 2, eQMILOCResponsiveness_High = 3, }; // Enum to describe QMI LOC SUPL Version enum eQMILOCSUPLVersion:UINT32 { eQMILOCSUPLVersion_10 = 1, eQMILOCSUPLVersion_20 = 2, }; // Enum to describe QMI LOC Satellite Status enum eQMILOCSatelliteStatus:UINT32 { eQMILOCSatelliteStatus_Idle = 1, eQMILOCSatelliteStatus_Searching = 2, eQMILOCSatelliteStatus_Tracking = 3, }; // Enum to describe QMI LOC Sensor Usage enum eQMILOCSensorUsage:UINT32 { eQMILOCSensorUsage_SensorUseEnabled = 0, eQMILOCSensorUsage_SensorUseDisabled = 1, }; // Enum to describe QMI LOC Service Interaction Type enum eQMILOCServiceInteractionType:UINT32 { eQMILOCServiceInteractionType_OngoingNIIncomingMO = 1, }; // Enum to describe QMI LOC Session State enum eQMILOCSessionState:UINT32 { eQMILOCSessionState_Started = 1, eQMILOCSessionState_Finished = 2, }; // Enum to describe QMI LOC Session Status enum eQMILOCSessionStatus:UINT32 { eQMILOCSessionStatus_Success = 0, eQMILOCSessionStatus_InProgress = 1, eQMILOCSessionStatus_GeneralFailure = 2, eQMILOCSessionStatus_Timeout = 3, eQMILOCSessionStatus_UserEnded = 4, eQMILOCSessionStatus_BadParameter = 5, eQMILOCSessionStatus_PhoneOffline = 6, eQMILOCSessionStatus_EngineLocked = 7, }; // Enum to describe QMI LOC Stationary Status enum eQMILOCStationaryStatus { eQMILOCStationaryStatus_DeviceIsNotStationary = 0, eQMILOCStationaryStatus_DeviceIsStationary = 1, }; // Enum to describe QMI LOC Status enum eQMILOCStatus { eQMILOCStatus_Success = 0, eQMILOCStatus_GeneralFailure = 1, eQMILOCStatus_Unsupported = 2, eQMILOCStatus_InvalidParameter = 3, eQMILOCStatus_EngineBusy = 4, eQMILOCStatus_PhoneOffline = 5, eQMILOCStatus_Timeout = 6, }; // Enum to describe QMI LOC System enum eQMILOCSystem:UINT32 { eQMILOCSystem_GlobalPositioningSystem = 1, eQMILOCSystem_Galileo = 2, eQMILOCSystem_SatelliteBasedAugmentationSystem = 3, eQMILOCSystem_COMPASS = 4, eQMILOCSystem_GLONASS = 5, }; // Enum to describe QMI LOC Time Source enum eQMILOCTimeSource:UINT32 { eQMILOCTimeSource_Invalid = 0, eQMILOCTimeSource_NetworkTimeTransfer = 1, eQMILOCTimeSource_NetworkTimeTagging = 2, eQMILOCTimeSource_ExternalInput = 3, eQMILOCTimeSource_TOWDecode = 4, eQMILOCTimeSource_TOWConfirmed = 5, eQMILOCTimeSource_TOWAndWeekConfirmed = 6, eQMILOCTimeSource_NavigationSolution = 7, eQMILOCTimeSource_SolveForTime = 8, }; // Enum to describe QMI LOC Trigger Type enum eQMILOCTriggerType { eQMILOCTriggerType_SingleShot = -1, eQMILOCTriggerType_Periodic = 0, eQMILOCTriggerType_AreaEvent = 1, }; // Enum to describe QMI LOC User Response enum eQMILOCUserResponse:UINT32 { eQMILOCUserResponse_Accept = 1, eQMILOCUserResponse_Deny = 2, eQMILOCUserResponse_NoResponse = 3, }; // Enum to describe QMI LOC VX Version enum eQMILOCVXVersion:UINT32 { eQMILOCVXVersion_V1Only = 1, eQMILOCVXVersion_V2Only = 2, }; // Enum to describe QMI LOC WWAN Type enum eQMILOCWWANType:UINT32 { eQMILOCWWANType_Internet = 0, eQMILOCWWANType_AGNSS = 1, }; // Enum to describe QMI LOC Wi-Fi Fix Error Code enum eQMILOCWiFiFixErrorCode:UINT32 { eQMILOCWiFiFixErrorCode_Success = 0, eQMILOCWiFiFixErrorCode_WiFiNotAvailable = 1, eQMILOCWiFiFixErrorCode_NoAccessPointsFound = 2, eQMILOCWiFiFixErrorCode_Unauthorized = 3, eQMILOCWiFiFixErrorCode_ServerUnavailable = 4, eQMILOCWiFiFixErrorCode_LocationCannotBeDetermined = 5, eQMILOCWiFiFixErrorCode_Unknown = 6, }; // Enum to describe QMI LOC Wi-Fi Status enum eQMILOCWiFiStatus:UINT32 { eQMILOCWiFiStatus_Available = 1, eQMILOCWiFiStatus_Unavailable = 2, }; // Enum to describe QMI Mobile IP Modes enum eQMIMobileIPModes:UINT8 { eQMIMobileIPModes_MIPOffSimpleIPOnly = 0, eQMIMobileIPModes_MIPPreferred = 1, eQMIMobileIPModes_MIPOnly = 2, }; // Enum to describe QMI NAS AN-AAA Authentication Status enum eQMINASANAAAAuthenticationStatus:UINT8 { eQMINASANAAAAuthenticationStatus_AuthenticationFailed = 0, eQMINASANAAAAuthenticationStatus_AuthenticationSuccess = 1, eQMINASANAAAAuthenticationStatus_NoAuthenticationRequested = 2, }; // Enum to describe QMI NAS Acquisition Order enum eQMINASAcquisitionOrder:UINT32 { eQMINASAcquisitionOrder_Automatic = 0, eQMINASAcquisitionOrder_GSMThenWCDMA = 1, eQMINASAcquisitionOrder_WCDMAThenGSM = 2, }; // Enum to describe QMI NAS Active Subscription enum eQMINASActiveSubscription:UINT8 { eQMINASActiveSubscription_NotActive = 0, eQMINASActiveSubscription_Active = 1, }; // Enum to describe QMI NAS Band Classes enum eQMINASBandClasses:UINT16 { eQMINASBandClasses_CDMABandClass0 = 0, eQMINASBandClasses_CDMABandClass1 = 1, eQMINASBandClasses_CDMABandClass3 = 3, eQMINASBandClasses_CDMABandClass4 = 4, eQMINASBandClasses_CDMABandClass5 = 5, eQMINASBandClasses_CDMABandClass6 = 6, eQMINASBandClasses_CDMABandClass7 = 7, eQMINASBandClasses_CDMABandClass8 = 8, eQMINASBandClasses_CDMABandClass9 = 9, eQMINASBandClasses_CDMABandClass10 = 10, eQMINASBandClasses_CDMABandClass11 = 11, eQMINASBandClasses_CDMABandClass12 = 12, eQMINASBandClasses_CDMABandClass13 = 13, eQMINASBandClasses_CDMABandClass14 = 14, eQMINASBandClasses_CDMABandClass15 = 15, eQMINASBandClasses_CDMABandClass16 = 16, eQMINASBandClasses_CDMABandClass17 = 17, eQMINASBandClasses_CDMABandClass18 = 18, eQMINASBandClasses_CDMABandClass19 = 19, eQMINASBandClasses_GSM450 = 40, eQMINASBandClasses_GSM480 = 41, eQMINASBandClasses_GSM750 = 42, eQMINASBandClasses_GSM850 = 43, eQMINASBandClasses_GSM900Extended = 44, eQMINASBandClasses_GSM900Primary = 45, eQMINASBandClasses_GSM900Railways = 46, eQMINASBandClasses_GSM1800 = 47, eQMINASBandClasses_GSM1900 = 48, eQMINASBandClasses_WCDMA2100 = 80, eQMINASBandClasses_WCDMAPCS1900 = 81, eQMINASBandClasses_WCDMADCS1800 = 82, eQMINASBandClasses_WCDMA1700US = 83, eQMINASBandClasses_WCDMA850 = 84, eQMINASBandClasses_WCDMA800 = 85, eQMINASBandClasses_WCDMA2600 = 86, eQMINASBandClasses_WCDMA900 = 87, eQMINASBandClasses_WCDMA1700Japan = 88, eQMINASBandClasses_WCDMA1500Japan = 90, eQMINASBandClasses_WCDMA850Japan = 91, eQMINASBandClasses_EUTRABand1 = 120, eQMINASBandClasses_EUTRABand2 = 121, eQMINASBandClasses_EUTRABand3 = 122, eQMINASBandClasses_EUTRABand4 = 123, eQMINASBandClasses_EUTRABand5 = 124, eQMINASBandClasses_EUTRABand6 = 125, eQMINASBandClasses_EUTRABand7 = 126, eQMINASBandClasses_EUTRABand8 = 127, eQMINASBandClasses_EUTRABand9 = 128, eQMINASBandClasses_EUTRABand10 = 129, eQMINASBandClasses_EUTRABand11 = 130, eQMINASBandClasses_EUTRABand12 = 131, eQMINASBandClasses_EUTRABand13 = 132, eQMINASBandClasses_EUTRABand14 = 133, eQMINASBandClasses_EUTRABand17 = 134, eQMINASBandClasses_EUTRABand33 = 135, eQMINASBandClasses_EUTRABand34 = 136, eQMINASBandClasses_EUTRABand35 = 137, eQMINASBandClasses_EUTRABand36 = 138, eQMINASBandClasses_EUTRABand37 = 139, eQMINASBandClasses_EUTRABand38 = 140, eQMINASBandClasses_EUTRABand39 = 141, eQMINASBandClasses_EUTRABand40 = 142, eQMINASBandClasses_EUTRABand18 = 143, eQMINASBandClasses_EUTRABand19 = 144, eQMINASBandClasses_EUTRABand20 = 145, eQMINASBandClasses_EUTRABand21 = 146, eQMINASBandClasses_EUTRABand24 = 147, eQMINASBandClasses_EUTRABand25 = 148, eQMINASBandClasses_EUTRABand41 = 149, eQMINASBandClasses_EUTRABand42 = 150, eQMINASBandClasses_EUTRABand43 = 151, eQMINASBandClasses_TDSCDMABandA = 200, eQMINASBandClasses_TDSCDMABandB = 201, eQMINASBandClasses_TDSCDMABandC = 202, eQMINASBandClasses_TDSCDMABandD = 203, eQMINASBandClasses_TDSCDMABandE = 204, eQMINASBandClasses_TDSCDMABandF = 205, }; // Enum to describe QMI NAS CDMA 1xEV-DO Active Protocol enum eQMINASCDMA1xEVDOActiveProtocol:UINT8 { eQMINASCDMA1xEVDOActiveProtocol_None = 0, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORel0 = 2, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelA = 3, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelB = 4, }; // Enum to describe QMI NAS CDMA 1xEV-DO Hybrid Information enum eQMINASCDMA1xEVDOHybridInformation:UINT8 { eQMINASCDMA1xEVDOHybridInformation_SystemIsNotHybrid = 0, eQMINASCDMA1xEVDOHybridInformation_SystemIsHybrid = 1, }; // Enum to describe QMI NAS CDMA 1xEV-DO Personality enum eQMINASCDMA1xEVDOPersonality:UINT8 { eQMINASCDMA1xEVDOPersonality_Unknown = 0, eQMINASCDMA1xEVDOPersonality_HRPD = 1, eQMINASCDMA1xEVDOPersonality_EHRPD = 2, }; // Enum to describe QMI NAS CDMA Pilot Types enum eQMINASCDMAPilotTypes:UINT32 { eQMINASCDMAPilotTypes_Active = 0, eQMINASCDMAPilotTypes_Neighbor = 1, }; // Enum to describe QMI NAS CS/PS Attach States enum eQMINASCSPSAttachStates:UINT8 { eQMINASCSPSAttachStates_UnknownNotApplicable = 0, eQMINASCSPSAttachStates_Attached = 1, eQMINASCSPSAttachStates_Detached = 2, }; // Enum to describe QMI NAS Call Barring Status enum eQMINASCallBarringStatus:UINT32 { eQMINASCallBarringStatus_Unknown = 4294967295u, eQMINASCallBarringStatus_NormalCallsOnly = 0, eQMINASCallBarringStatus_EmergencyCallsOnly = 1, eQMINASCallBarringStatus_NoCalls = 2, eQMINASCallBarringStatus_AllCalls = 3, }; // Enum to describe QMI NAS Cell Broadcast Caps enum eQMINASCellBroadcastCaps:UINT32 { eQMINASCellBroadcastCaps_Unknown = 0, eQMINASCellBroadcastCaps_NotSupported = 1, eQMINASCellBroadcastCaps_Supported = 2, }; // Enum to describe QMI NAS Cell Broadcast Caps 2 enum eQMINASCellBroadcastCaps2:UINT32 { eQMINASCellBroadcastCaps2_Unknown = 0, eQMINASCellBroadcastCaps2_NotSupported = 1, eQMINASCellBroadcastCaps2_Supported = 2, }; // Enum to describe QMI NAS Change Duration enum eQMINASChangeDuration:UINT8 { eQMINASChangeDuration_PowerCycle = 0, eQMINASChangeDuration_Permanent = 1, }; // Enum to describe QMI NAS Concurrent Service enum eQMINASConcurrentService:UINT8 { eQMINASConcurrentService_NotAvailable = 0, eQMINASConcurrentService_Available = 1, }; // Enum to describe QMI NAS Concurrent Service Supported enum eQMINASConcurrentServiceSupported:UINT8 { eQMINASConcurrentServiceSupported_NotSupported = 0, eQMINASConcurrentServiceSupported_Supported = 1, }; // Enum to describe QMI NAS DDTM Preferences enum eQMINASDDTMPreferences:UINT8 { eQMINASDDTMPreferences_Off = 0, eQMINASDDTMPreferences_On = 1, eQMINASDDTMPreferences_NoChange = 2, }; // Enum to describe QMI NAS DTM Support enum eQMINASDTMSupport:UINT8 { eQMINASDTMSupport_NotAvailable = 0, eQMINASDTMSupport_Available = 1, }; // Enum to describe QMI NAS Data Service Capabilities 2 enum eQMINASDataServiceCapabilities2:UINT8 { eQMINASDataServiceCapabilities2_GPRS = 1, eQMINASDataServiceCapabilities2_EGPRS = 2, eQMINASDataServiceCapabilities2_HSDPA = 3, eQMINASDataServiceCapabilities2_HSUPA = 4, eQMINASDataServiceCapabilities2_WCDMA = 5, eQMINASDataServiceCapabilities2_CDMA = 6, eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 = 7, eQMINASDataServiceCapabilities2_CDMA1xEVDORevA = 8, eQMINASDataServiceCapabilities2_GSM = 9, eQMINASDataServiceCapabilities2_CDMA1xEVDORevB = 10, eQMINASDataServiceCapabilities2_LTE = 11, eQMINASDataServiceCapabilities2_HSDPAPlus = 12, eQMINASDataServiceCapabilities2_DCHSDPAPlus = 13, }; // Enum to describe QMI NAS Day Of Week enum eQMINASDayOfWeek:UINT8 { eQMINASDayOfWeek_Monday = 0, eQMINASDayOfWeek_Tuesday = 1, eQMINASDayOfWeek_Wednesday = 2, eQMINASDayOfWeek_Thursday = 3, eQMINASDayOfWeek_Friday = 4, eQMINASDayOfWeek_Saturday = 5, eQMINASDayOfWeek_Sunday = 6, }; // Enum to describe QMI NAS Daylight Savings Adjustment enum eQMINASDaylightSavingsAdjustment:UINT8 { eQMINASDaylightSavingsAdjustment_NoAdjustment = 0, eQMINASDaylightSavingsAdjustment_1HourAdjustment = 1, eQMINASDaylightSavingsAdjustment_2HourAdjustment = 2, }; // Enum to describe QMI NAS Dual Transfer Mode enum eQMINASDualTransferMode:UINT8 { eQMINASDualTransferMode_DTMNotSupported = 0, eQMINASDualTransferMode_DTMSupported = 1, }; // Enum to describe QMI NAS E-UTRA Status enum eQMINASEUTRAStatus:UINT8 { eQMINASEUTRAStatus_EUTRACellDetected = 0, eQMINASEUTRAStatus_EUTRACellNotDetected = 1, eQMINASEUTRAStatus_EUTRADetectionUnknown = 2, eQMINASEUTRAStatus_EUTRADetectionUnsupported = 3, }; // Enum to describe QMI NAS EGPRS Support enum eQMINASEGPRSSupport:UINT8 { eQMINASEGPRSSupport_NotAvailable = 0, eQMINASEGPRSSupport_Available = 1, }; // Enum to describe QMI NAS EV-DO Session Close Reasons enum eQMINASEVDOSessionCloseReasons:UINT32 { eQMINASEVDOSessionCloseReasons_ReacquiredNewNetwork = 0, eQMINASEVDOSessionCloseReasons_UATIResponseTimeout = 1, eQMINASEVDOSessionCloseReasons_KeepAliveTimerExpired = 2, eQMINASEVDOSessionCloseReasons_InternalDeactivation = 3, eQMINASEVDOSessionCloseReasons_ReceivedSessionCloseFromAN = 4, eQMINASEVDOSessionCloseReasons_ConnectionOpenFailure = 5, eQMINASEVDOSessionCloseReasons_ConfigurationRequestFailure = 6, eQMINASEVDOSessionCloseReasons_ConfigurationResponseFailure = 7, eQMINASEVDOSessionCloseReasons_ProtocolNegotiationFailure = 8, eQMINASEVDOSessionCloseReasons_ANInitSetupTimerExpired = 9, eQMINASEVDOSessionCloseReasons_ANInitConnectionClosed = 10, eQMINASEVDOSessionCloseReasons_ConnectionDenyReceived = 11, eQMINASEVDOSessionCloseReasons_SilentDeactivation = 12, eQMINASEVDOSessionCloseReasons_NewESN = 13, eQMINASEVDOSessionCloseReasons_ANGUAP = 14, eQMINASEVDOSessionCloseReasons_InvalidPersonalityIndex = 15, eQMINASEVDOSessionCloseReasons_UATINotMaintained = 16, eQMINASEVDOSessionCloseReasons_NewNAI = 17, eQMINASEVDOSessionCloseReasons_EHRPDCredentialsChanged = 18, }; // Enum to describe QMI NAS Forbidden States enum eQMINASForbiddenStates:UINT8 { eQMINASForbiddenStates_Unknown = 0, eQMINASForbiddenStates_Forbidden = 1, eQMINASForbiddenStates_NotForbidden = 2, }; // Enum to describe QMI NAS Force CDMA 1xEV-DO SCP enum eQMINASForceCDMA1xEVDOSCP:UINT8 { eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORev0Only = 0, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPA = 1, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPAAndEMPA = 2, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithMMPA = 3, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithEHRPD = 4, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithEHRPD = 5, }; // Enum to describe QMI NAS High Speed Call Status enum eQMINASHighSpeedCallStatus:UINT8 { eQMINASHighSpeedCallStatus_HSDPAAndHSUPANotSupported = 0, eQMINASHighSpeedCallStatus_HSDPASupported = 1, eQMINASHighSpeedCallStatus_HSUPASupported = 2, eQMINASHighSpeedCallStatus_HSDPAAndHSUPASupported = 3, eQMINASHighSpeedCallStatus_HSDPAPlusSupported = 4, eQMINASHighSpeedCallStatus_HSDPAPlusAndHSUPASupported = 5, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusSupported = 6, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAndHSUPASupported = 7, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMAndHSUPASupported = 8, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMSupported = 9, }; // Enum to describe QMI NAS In Use States enum eQMINASInUseStates:UINT8 { eQMINASInUseStates_Unknown = 0, eQMINASInUseStates_CurrentServing = 1, eQMINASInUseStates_Available = 2, }; // Enum to describe QMI NAS LTE Signal Rates enum eQMINASLTESignalRates:UINT8 { eQMINASLTESignalRates_Default = 0, eQMINASLTESignalRates_EverySecond = 1, eQMINASLTESignalRates_Every2Seconds = 2, eQMINASLTESignalRates_Every3Seconds = 3, eQMINASLTESignalRates_Every4Seconds = 4, eQMINASLTESignalRates_Every5Seconds = 5, eQMINASLTESignalRates_Every6Seconds = 6, eQMINASLTESignalRates_Every7Seconds = 7, eQMINASLTESignalRates_Every8Seconds = 8, eQMINASLTESignalRates_Every9Seconds = 9, eQMINASLTESignalRates_Every10Seconds = 10, }; // Enum to describe QMI NAS LTE Voice Domains enum eQMINASLTEVoiceDomains:UINT32 { eQMINASLTEVoiceDomains_NoVoiceSupport = 0, eQMINASLTEVoiceDomains_VoiceSupportedOverIMS = 1, eQMINASLTEVoiceDomains_VoiceSupportedOver1X = 2, eQMINASLTEVoiceDomains_VoiceSupportedOver3GPP = 3, }; // Enum to describe QMI NAS Network Description Displays enum eQMINASNetworkDescriptionDisplays:UINT8 { eQMINASNetworkDescriptionDisplays_DoNotDisplay = 0, eQMINASNetworkDescriptionDisplays_Display = 1, eQMINASNetworkDescriptionDisplays_Unknown = 255, }; // Enum to describe QMI NAS Network Description Encodings enum eQMINASNetworkDescriptionEncodings:UINT8 { eQMINASNetworkDescriptionEncodings_UnspecifiedOctet = 0, eQMINASNetworkDescriptionEncodings_ExtendedProtocolMessage = 1, eQMINASNetworkDescriptionEncodings_7BitASCII = 2, eQMINASNetworkDescriptionEncodings_IA5 = 3, eQMINASNetworkDescriptionEncodings_UNICODE = 4, eQMINASNetworkDescriptionEncodings_ShiftJIS = 5, eQMINASNetworkDescriptionEncodings_Korean = 6, eQMINASNetworkDescriptionEncodings_LatinHebrew = 7, eQMINASNetworkDescriptionEncodings_Latin = 8, eQMINASNetworkDescriptionEncodings_GSM7Bit = 9, eQMINASNetworkDescriptionEncodings_GSMDCS = 10, }; // Enum to describe QMI NAS Network Selection enum eQMINASNetworkSelection:INT8 { eQMINASNetworkSelection_AutomaticRegistration = 0, eQMINASNetworkSelection_ManualRegistration = 1, }; // Enum to describe QMI NAS PLMN Name Country Initials enum eQMINASPLMNNameCountryInitials:UINT8 { eQMINASPLMNNameCountryInitials_DoNotAddCountryInitials = 0, eQMINASPLMNNameCountryInitials_AddCountryInitials = 1, eQMINASPLMNNameCountryInitials_Unspecified = 255, }; // Enum to describe QMI NAS PLMN Name Encoding Schemes enum eQMINASPLMNNameEncodingSchemes:UINT8 { eQMINASPLMNNameEncodingSchemes_ASCII = 0, eQMINASPLMNNameEncodingSchemes_UCS2LE = 1, }; // Enum to describe QMI NAS PLMN Name Spare Bits enum eQMINASPLMNNameSpareBits:UINT8 { eQMINASPLMNNameSpareBits_Unknown = 0, eQMINASPLMNNameSpareBits_Bit8 = 1, eQMINASPLMNNameSpareBits_Bits78 = 2, eQMINASPLMNNameSpareBits_Bits68 = 3, eQMINASPLMNNameSpareBits_Bits58 = 4, eQMINASPLMNNameSpareBits_Bits48 = 5, eQMINASPLMNNameSpareBits_Bits38 = 6, eQMINASPLMNNameSpareBits_Bits28 = 7, }; // Enum to describe QMI NAS PRL Indicator enum eQMINASPRLIndicator:UINT8 { eQMINASPRLIndicator_SystemNotInPRL = 0, eQMINASPRLIndicator_SystemIsInPRL = 1, }; // Enum to describe QMI NAS PRL Preferences enum eQMINASPRLPreferences:UINT16 { eQMINASPRLPreferences_AcquireASideOnly = 1, eQMINASPRLPreferences_AcquireBSideOnly = 2, eQMINASPRLPreferences_AcquireAny = 16383, }; // Enum to describe QMI NAS PS Attach Actions enum eQMINASPSAttachActions:UINT8 { eQMINASPSAttachActions_Attach = 1, eQMINASPSAttachActions_Detach = 2, }; // Enum to describe QMI NAS Preferred Data Bath enum eQMINASPreferredDataBath:UINT8 { eQMINASPreferredDataBath_NotPreferred = 0, eQMINASPreferredDataBath_Preferred = 1, }; // Enum to describe QMI NAS Preferred States enum eQMINASPreferredStates:UINT8 { eQMINASPreferredStates_Unknown = 0, eQMINASPreferredStates_Preferred = 1, eQMINASPreferredStates_NotPreferred = 2, }; // Enum to describe QMI NAS RTRE Configuration enum eQMINASRTREConfiguration:UINT8 { eQMINASRTREConfiguration_RUIMOnly = 1, eQMINASRTREConfiguration_InternalSettingsOnly = 2, eQMINASRTREConfiguration_UseRUIMIfAvailable = 3, eQMINASRTREConfiguration_GSMOn1X = 4, }; // Enum to describe QMI NAS RX Level enum eQMINASRXLevel:UINT16 { eQMINASRXLevel_LessThan110dBm = 0, eQMINASRXLevel_110dBmto109dBm = 1, eQMINASRXLevel_109dBmto108dBm = 2, eQMINASRXLevel_108dBmto107dBm = 3, eQMINASRXLevel_107dBmto106dBm = 4, eQMINASRXLevel_106dBmto105dBm = 5, eQMINASRXLevel_105dBmto104dBm = 6, eQMINASRXLevel_104dBmto103dBm = 7, eQMINASRXLevel_103dBmto102dBm = 8, eQMINASRXLevel_102dBmto101dBm = 9, eQMINASRXLevel_101dBmto100dBm = 10, eQMINASRXLevel_100dBmto99dBm = 11, eQMINASRXLevel_99dBmto98dBm = 12, eQMINASRXLevel_98dBmto97dBm = 13, eQMINASRXLevel_97dBmto96dBm = 14, eQMINASRXLevel_96dBmto95dBm = 15, eQMINASRXLevel_95dBmto94dBm = 16, eQMINASRXLevel_94dBmto93dBm = 17, eQMINASRXLevel_93dBmto92dBm = 18, eQMINASRXLevel_92dBmto91dBm = 19, eQMINASRXLevel_91dBmto90dBm = 20, eQMINASRXLevel_90dBmto89dBm = 21, eQMINASRXLevel_89dBmto88dBm = 22, eQMINASRXLevel_88dBmto87dBm = 23, eQMINASRXLevel_87dBmto86dBm = 24, eQMINASRXLevel_86dBmto85dBm = 25, eQMINASRXLevel_85dBmto84dBm = 26, eQMINASRXLevel_84dBmto83dBm = 27, eQMINASRXLevel_83dBmto82dBm = 28, eQMINASRXLevel_82dBmto81dBm = 29, eQMINASRXLevel_81dBmto80dBm = 30, eQMINASRXLevel_80dBmto79dBm = 31, eQMINASRXLevel_79dBmto78dBm = 32, eQMINASRXLevel_78dBmto77dBm = 33, eQMINASRXLevel_77dBmto76dBm = 34, eQMINASRXLevel_76dBmto75dBm = 35, eQMINASRXLevel_75dBmto74dBm = 36, eQMINASRXLevel_74dBmto73dBm = 37, eQMINASRXLevel_73dBmto72dBm = 38, eQMINASRXLevel_72dBmto71dBm = 39, eQMINASRXLevel_71dBmto70dBm = 40, eQMINASRXLevel_70dBmto69dBm = 41, eQMINASRXLevel_69dBmto68dBm = 42, eQMINASRXLevel_68dBmto67dBm = 43, eQMINASRXLevel_67dBmto66dBm = 44, eQMINASRXLevel_66dBmto65dBm = 45, eQMINASRXLevel_65dBmto64dBm = 46, eQMINASRXLevel_64dBmto63dBm = 47, eQMINASRXLevel_63dBmto62dBm = 48, eQMINASRXLevel_62dBmto61dBm = 49, eQMINASRXLevel_61dBmto60dBm = 50, eQMINASRXLevel_60dBmto59dBm = 51, eQMINASRXLevel_59dBmto58dBm = 52, eQMINASRXLevel_58dBmto57dBm = 53, eQMINASRXLevel_57dBmto56dBm = 54, eQMINASRXLevel_56dBmto55dBm = 55, eQMINASRXLevel_55dBmto54dBm = 56, eQMINASRXLevel_54dBmto53dBm = 57, eQMINASRXLevel_53dBmto52dBm = 58, eQMINASRXLevel_52dBmto51dBm = 59, eQMINASRXLevel_51dBmto50dBm = 60, eQMINASRXLevel_50dBmto49dBm = 61, eQMINASRXLevel_49dBmto48dBm = 62, eQMINASRXLevel_GreaterThan48dBm = 63, }; // Enum to describe QMI NAS Radio Access Technologies enum eQMINASRadioAccessTechnologies:UINT8 { eQMINASRadioAccessTechnologies_GSM = 4, eQMINASRadioAccessTechnologies_UMTS = 5, eQMINASRadioAccessTechnologies_LTE = 8, eQMINASRadioAccessTechnologies_TDSCDMA = 9, eQMINASRadioAccessTechnologies_NoChange = 255, }; // Enum to describe QMI NAS Radio Interfaces enum eQMINASRadioInterfaces:UINT8 { eQMINASRadioInterfaces_NoneNoService = 0, eQMINASRadioInterfaces_CDMA20001x = 1, eQMINASRadioInterfaces_CDMA2000HRPD = 2, eQMINASRadioInterfaces_AMPS = 3, eQMINASRadioInterfaces_GSM = 4, eQMINASRadioInterfaces_UMTS = 5, eQMINASRadioInterfaces_LTE = 8, eQMINASRadioInterfaces_TDSCDMA = 9, }; // Enum to describe QMI NAS Radio System Modes enum eQMINASRadioSystemModes:UINT32 { eQMINASRadioSystemModes_NoService = 0, eQMINASRadioSystemModes_Acquiring = 1, eQMINASRadioSystemModes_InService = 2, }; // Enum to describe QMI NAS Register Actions enum eQMINASRegisterActions:UINT8 { eQMINASRegisterActions_Automatic = 1, eQMINASRegisterActions_Manual = 2, }; // Enum to describe QMI NAS Registered Networks enum eQMINASRegisteredNetworks:UINT8 { eQMINASRegisteredNetworks_Unknown = 0, eQMINASRegisteredNetworks_3GPP2 = 1, eQMINASRegisteredNetworks_3GPP = 2, }; // Enum to describe QMI NAS Registration States enum eQMINASRegistrationStates:UINT8 { eQMINASRegistrationStates_NASNotRegistered = 0, eQMINASRegistrationStates_NASRegistered = 1, eQMINASRegistrationStates_NASNotRegisteredSearching = 2, eQMINASRegistrationStates_NASRegistrationDenied = 3, eQMINASRegistrationStates_RegistrationStateUnknown = 4, }; // Enum to describe QMI NAS Revision enum eQMINASRevision:UINT8 { eQMINASRevision_JSTD088 = 1, eQMINASRevision_IS95RevA = 3, eQMINASRevision_IS95RevB = 4, eQMINASRevision_IS2000 = 6, eQMINASRevision_IS2000RelA = 7, eQMINASRevision_IS2000RelB = 8, eQMINASRevision_IS2000RelC = 9, eQMINASRevision_IS2000RelCMI = 10, eQMINASRevision_IS2000RelD = 11, }; // Enum to describe QMI NAS Roam Status enum eQMINASRoamStatus:UINT8 { eQMINASRoamStatus_Off = 0, eQMINASRoamStatus_On = 1, eQMINASRoamStatus_Blinking = 2, eQMINASRoamStatus_OutOfNeighborhood = 3, eQMINASRoamStatus_OutOfBuilding = 4, eQMINASRoamStatus_PreferredSystem = 5, eQMINASRoamStatus_AvailableSystem = 6, eQMINASRoamStatus_AlliancePartner = 7, eQMINASRoamStatus_PremiumPartner = 8, eQMINASRoamStatus_FullService = 9, eQMINASRoamStatus_PartialService = 10, eQMINASRoamStatus_BannerIsOn = 11, eQMINASRoamStatus_BannerIsOff = 12, }; // Enum to describe QMI NAS Roaming Indicators enum eQMINASRoamingIndicators:UINT8 { eQMINASRoamingIndicators_Roaming = 0, eQMINASRoamingIndicators_Home = 1, eQMINASRoamingIndicators_RoamingPartner = 2, }; // Enum to describe QMI NAS Roaming Preferences enum eQMINASRoamingPreferences:UINT8 { eQMINASRoamingPreferences_Automatic = 0, eQMINASRoamingPreferences_HomeOnly = 1, eQMINASRoamingPreferences_RoamingOnly = 2, eQMINASRoamingPreferences_HomeRoaming = 3, }; // Enum to describe QMI NAS Roaming Preferences 2 enum eQMINASRoamingPreferences2:UINT16 { eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorOff = 1, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotOff = 2, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotFlashing = 3, eQMINASRoamingPreferences2_AcquireAny = 255, }; // Enum to describe QMI NAS Roaming States enum eQMINASRoamingStates:UINT8 { eQMINASRoamingStates_Unknown = 0, eQMINASRoamingStates_Home = 1, eQMINASRoamingStates_Roam = 2, }; // Enum to describe QMI NAS SIM Reject States enum eQMINASSIMRejectStates:UINT32 { eQMINASSIMRejectStates_NotAvailable = 0, eQMINASSIMRejectStates_Available = 1, eQMINASSIMRejectStates_CSInvalid = 2, eQMINASSIMRejectStates_PSInvalid = 3, eQMINASSIMRejectStates_CSAndPSInvalid = 4, }; // Enum to describe QMI NAS SINR Levels enum eQMINASSINRLevels:UINT8 { eQMINASSINRLevels_Negative9dB = 0, eQMINASSINRLevels_Negative6dB = 1, eQMINASSINRLevels_Negative45dB = 2, eQMINASSINRLevels_Negative3dB = 3, eQMINASSINRLevels_Negative2dB = 4, eQMINASSINRLevels_1dB = 5, eQMINASSINRLevels_3dB = 6, eQMINASSINRLevels_6dB = 7, eQMINASSINRLevels_9dB = 8, }; // Enum to describe QMI NAS Service Domain Prefs enum eQMINASServiceDomainPrefs:UINT32 { eQMINASServiceDomainPrefs_CircuitSwitched = 0, eQMINASServiceDomainPrefs_PacketSwitched = 1, eQMINASServiceDomainPrefs_CircuitPacketSwitched = 2, eQMINASServiceDomainPrefs_PacketSwitchedAttach = 3, eQMINASServiceDomainPrefs_PacketSwitchedDetach = 4, }; // Enum to describe QMI NAS Service Domains enum eQMINASServiceDomains:UINT8 { eQMINASServiceDomains_NoService = 0, eQMINASServiceDomains_CircuitSwitched = 1, }; // Enum to describe QMI NAS Service Option Actions enum eQMINASServiceOptionActions:UINT8 { eQMINASServiceOptionActions_Add = 0, eQMINASServiceOptionActions_Replace = 1, eQMINASServiceOptionActions_Delete = 2, eQMINASServiceOptionActions_NoChange = 3, }; // Enum to describe QMI NAS Service Status enum eQMINASServiceStatus:UINT8 { eQMINASServiceStatus_NoService = 0, eQMINASServiceStatus_LimitedService = 1, eQMINASServiceStatus_ServiceAvailable = 2, eQMINASServiceStatus_LimitedRegionalService = 3, eQMINASServiceStatus_PowerSaveOrDeepSleep = 4, }; // Enum to describe QMI NAS Standby Preference enum eQMINASStandbyPreference:UINT8 { eQMINASStandbyPreference_SingleStandby = 1, eQMINASStandbyPreference_DualStandbyWithTuneAway = 2, eQMINASStandbyPreference_DualStandbyWithoutTuneAway = 4, eQMINASStandbyPreference_AutomaticModeWithTuneAway = 5, eQMINASStandbyPreference_AutomaticModeWithoutTuneAway = 6, }; // Enum to describe QMI NAS Subscription Type enum eQMINASSubscriptionType:UINT8 { eQMINASSubscriptionType_PrimarySubscription = 0, eQMINASSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI NAS System Forbidden enum eQMINASSystemForbidden:UINT8 { eQMINASSystemForbidden_SystemIsNotForbidden = 0, eQMINASSystemForbidden_SystemIsForbidden = 1, }; // Enum to describe QMI NAS System Preferences enum eQMINASSystemPreferences:UINT8 { eQMINASSystemPreferences_Automatic = 0, eQMINASSystemPreferences_AutomaticA = 1, eQMINASSystemPreferences_AutomaticB = 2, }; // Enum to describe QMI NAS System Service Capabilities enum eQMINASSystemServiceCapabilities:UINT8 { eQMINASSystemServiceCapabilities_NoService = 0, eQMINASSystemServiceCapabilities_CircuitSwitchedOnly = 1, eQMINASSystemServiceCapabilities_PacketSwitchedOnly = 2, eQMINASSystemServiceCapabilities_CircuitSwitchedAndPacketSwitched = 3, eQMINASSystemServiceCapabilities_Camped = 4, }; // Enum to describe QMI NAS Tech Pref Durations enum eQMINASTechPrefDurations:UINT8 { eQMINASTechPrefDurations_Permanent = 0, eQMINASTechPrefDurations_PowerCycle = 1, }; // Enum to describe QMI NAS Tech Prefs enum eQMINASTechPrefs:UINT8 { eQMINASTechPrefs_Automatic = 0, eQMINASTechPrefs_3GPP2 = 1, eQMINASTechPrefs_3GPP = 2, eQMINASTechPrefs_Invalid = 3, }; // Enum to describe QMI OMA HFA Done States enum eQMIOMAHFADoneStates:UINT8 { eQMIOMAHFADoneStates_None = 0, eQMIOMAHFADoneStates_Succeeded = 1, eQMIOMAHFADoneStates_Failed = 2, }; // Enum to describe QMI OMA Selections enum eQMIOMASelections:UINT8 { eQMIOMASelections_Reject = 0, eQMIOMASelections_Accept = 1, }; // Enum to describe QMI OMA Session Failure Reasons enum eQMIOMASessionFailureReasons:UINT8 { eQMIOMASessionFailureReasons_Unknown = 0, eQMIOMASessionFailureReasons_NetworkUnavailable = 1, eQMIOMASessionFailureReasons_ServerUnavailable = 2, eQMIOMASessionFailureReasons_AuthenticationFailed = 3, eQMIOMASessionFailureReasons_MaxRetryExceeded = 4, eQMIOMASessionFailureReasons_SessionCancelled = 5, }; // Enum to describe QMI OMA Session States enum eQMIOMASessionStates:UINT8 { eQMIOMASessionStates_CompleteInfoUpdated = 0, eQMIOMASessionStates_CompleteInfoUnavailable = 1, eQMIOMASessionStates_Failed = 2, eQMIOMASessionStates_Retrying = 3, eQMIOMASessionStates_Connecting = 4, eQMIOMASessionStates_Connected = 5, eQMIOMASessionStates_Authenticated = 6, eQMIOMASessionStates_MDNDownloaded = 7, eQMIOMASessionStates_MSIDDownloaded = 8, eQMIOMASessionStates_PRLDownloaded = 9, eQMIOMASessionStates_MIPProfileDownloaded = 10, }; // Enum to describe QMI OMA Session Types enum eQMIOMASessionTypes:UINT8 { eQMIOMASessionTypes_ClientInitiatedDeviceConfigure = 0, eQMIOMASessionTypes_ClientInitiatedPRLUpdate = 1, eQMIOMASessionTypes_ClientInitiatedHandsFreeActivation = 2, eQMIOMASessionTypes_DeviceInitiatedHandsFreeActivation = 3, eQMIOMASessionTypes_NetworkInitiatedPRLUpdate = 4, eQMIOMASessionTypes_NetworkInitiatedDeviceConfigure = 5, }; // Enum to describe QMI PBM AAS Operations enum eQMIPBMAASOperations:UINT8 { eQMIPBMAASOperations_Add = 0, eQMIPBMAASOperations_Modify = 1, eQMIPBMAASOperations_Delete = 2, }; // Enum to describe QMI PBM Emergency Categories enum eQMIPBMEmergencyCategories { eQMIPBMEmergencyCategories_Police = 1, eQMIPBMEmergencyCategories_Ambulance = 2, eQMIPBMEmergencyCategories_FireBrigade = 4, eQMIPBMEmergencyCategories_MarineGuard = 8, eQMIPBMEmergencyCategories_MountainRescue = 16, eQMIPBMEmergencyCategories_ManualECall = 32, eQMIPBMEmergencyCategories_AutomaticECall = 64, eQMIPBMEmergencyCategories_Spare = 128, }; // Enum to describe QMI PBM Number Plans enum eQMIPBMNumberPlans:UINT8 { eQMIPBMNumberPlans_Unknown = 0, eQMIPBMNumberPlans_ISDN = 1, eQMIPBMNumberPlans_Data = 2, eQMIPBMNumberPlans_Telex = 3, eQMIPBMNumberPlans_National = 4, eQMIPBMNumberPlans_Private = 5, }; // Enum to describe QMI PBM Number Types enum eQMIPBMNumberTypes:UINT8 { eQMIPBMNumberTypes_Unknown = 0, eQMIPBMNumberTypes_International = 1, eQMIPBMNumberTypes_National = 2, eQMIPBMNumberTypes_NetworkSpecific = 3, eQMIPBMNumberTypes_DedicatedAccess = 4, }; // Enum to describe QMI PBM Operations enum eQMIPBMOperations:UINT8 { eQMIPBMOperations_Add = 1, eQMIPBMOperations_Modify = 2, eQMIPBMOperations_Delete = 3, }; // Enum to describe QMI PBM Phonebook Types enum eQMIPBMPhonebookTypes:UINT16 { eQMIPBMPhonebookTypes_AbbreviatedDialingNumber = 1, eQMIPBMPhonebookTypes_FixedDialingNumber = 2, eQMIPBMPhonebookTypes_MobileSubscriberIntegratedServicesDigitalNetwork = 4, eQMIPBMPhonebookTypes_MailBoxDialingNumber = 8, eQMIPBMPhonebookTypes_ServiceDialingNumber = 16, eQMIPBMPhonebookTypes_BarredDialingNumber = 32, eQMIPBMPhonebookTypes_LastNumberDialed = 64, eQMIPBMPhonebookTypes_MailBoxNumber = 128, }; // Enum to describe QMI PBM Protection Methods enum eQMIPBMProtectionMethods:UINT32 { eQMIPBMProtectionMethods_AlwaysAllowed = 0, eQMIPBMProtectionMethods_NeverAllowed = 1, eQMIPBMProtectionMethods_AllowedOnAllPINsVerified = 2, eQMIPBMProtectionMethods_AllowedOnAnyPINVerified = 3, eQMIPBMProtectionMethods_AllowedOnOnePINVerified = 4, }; // Enum to describe QMI PBM Refresh Status enum eQMIPBMRefreshStatus:UINT8 { eQMIPBMRefreshStatus_RefreshStart = 1, eQMIPBMRefreshStatus_RefreshEnd = 2, }; // Enum to describe QMI PBM Session Types enum eQMIPBMSessionTypes:UINT8 { eQMIPBMSessionTypes_GWPrimary = 0, eQMIPBMSessionTypes_1xPrimary = 1, eQMIPBMSessionTypes_GWSecondary = 2, eQMIPBMSessionTypes_1xSecondary = 3, eQMIPBMSessionTypes_NonProvisioningOnSlot1 = 4, eQMIPBMSessionTypes_NonProvisioningOnSlot2 = 5, eQMIPBMSessionTypes_GlobalPhonebookOnSlot1 = 6, eQMIPBMSessionTypes_GlobalPhonebookOnSlot2 = 7, }; // Enum to describe QMI PBM States enum eQMIPBMStates:UINT8 { eQMIPBMStates_Ready = 0, eQMIPBMStates_NotReady = 1, eQMIPBMStates_NotAvailable = 2, eQMIPBMStates_PINRestriction = 3, eQMIPBMStates_PUKRestriction = 4, eQMIPBMStates_Invalidated = 5, eQMIPBMStates_Sync = 6, }; // Enum to describe QMI PBM Subscription Types enum eQMIPBMSubscriptionTypes:UINT8 { eQMIPBMSubscriptionTypes_Primary = 0, eQMIPBMSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI PDP Types enum eQMIPDPTypes:UINT8 { eQMIPDPTypes_PDPIPv4 = 0, eQMIPDPTypes_PDPPPP = 1, eQMIPDPTypes_PDPIPv6 = 2, eQMIPDPTypes_PDPIPv4OrIPv6 = 3, }; // Enum to describe QMI PDS Altitude Source enum eQMIPDSAltitudeSource:UINT8 { eQMIPDSAltitudeSource_Unknown = 0, eQMIPDSAltitudeSource_GPS = 1, eQMIPDSAltitudeSource_CellID = 2, eQMIPDSAltitudeSource_EnhancedCellID = 3, eQMIPDSAltitudeSource_WiFi = 4, eQMIPDSAltitudeSource_Terrestrial = 5, eQMIPDSAltitudeSource_TerrestrialHybrid = 6, eQMIPDSAltitudeSource_AltitudeDatabase = 7, eQMIPDSAltitudeSource_BarometricAltimeter = 8, eQMIPDSAltitudeSource_Other = 9, }; // Enum to describe QMI PDS Blanking Enable enum eQMIPDSBlankingEnable:UINT8 { eQMIPDSBlankingEnable_DisableBlanking = 0, eQMIPDSBlankingEnable_EnableBlankingUnconditionally = 1, eQMIPDSBlankingEnable_EnableBlankingConditionally = 2, eQMIPDSBlankingEnable_SimulateIMDJamming = 3, }; // Enum to describe QMI PDS Calendar Days enum eQMIPDSCalendarDays:UINT8 { eQMIPDSCalendarDays_Sunday = 0, eQMIPDSCalendarDays_Monday = 1, eQMIPDSCalendarDays_Tuesday = 2, eQMIPDSCalendarDays_Wednesday = 3, eQMIPDSCalendarDays_Thursday = 4, eQMIPDSCalendarDays_Friday = 5, eQMIPDSCalendarDays_Saturday = 6, }; // Enum to describe QMI PDS Calendar Months enum eQMIPDSCalendarMonths:UINT8 { eQMIPDSCalendarMonths_January = 0, eQMIPDSCalendarMonths_February = 1, eQMIPDSCalendarMonths_March = 2, eQMIPDSCalendarMonths_April = 3, eQMIPDSCalendarMonths_May = 4, eQMIPDSCalendarMonths_June = 5, eQMIPDSCalendarMonths_July = 6, eQMIPDSCalendarMonths_August = 7, eQMIPDSCalendarMonths_September = 8, eQMIPDSCalendarMonths_October = 9, eQMIPDSCalendarMonths_November = 10, eQMIPDSCalendarMonths_December = 11, }; // Enum to describe QMI PDS Comm Event Protocols enum eQMIPDSCommEventProtocols:UINT8 { eQMIPDSCommEventProtocols_UMTSUserPlaneSUPL = 0, eQMIPDSCommEventProtocols_1X = 1, eQMIPDSCommEventProtocols_UMTSControlPlaneWCDMA = 2, eQMIPDSCommEventProtocols_UMTSControlPlaneGSM = 3, eQMIPDSCommEventProtocols_V1V2 = 4, eQMIPDSCommEventProtocols_KDDI = 5, eQMIPDSCommEventProtocols_XTRADataDownload = 6, eQMIPDSCommEventProtocols_SNTPTimeDownload = 7, eQMIPDSCommEventProtocols_1XControlPlane = 8, eQMIPDSCommEventProtocols_Unknown = 255, }; // Enum to describe QMI PDS Comm Event Types enum eQMIPDSCommEventTypes:UINT8 { eQMIPDSCommEventTypes_Begin = 0, eQMIPDSCommEventTypes_Connected = 1, eQMIPDSCommEventTypes_Failure = 2, eQMIPDSCommEventTypes_Done = 3, eQMIPDSCommEventTypes_OtherFailure = 4, }; // Enum to describe QMI PDS Config enum eQMIPDSConfig:UINT8 { eQMIPDSConfig_PersistentDisabled = 0, eQMIPDSConfig_PersistentEnabled = 1, eQMIPDSConfig_NotPersistentDisabled = 240, eQMIPDSConfig_NotPersistentEnabled = 241, }; // Enum to describe QMI PDS Cradle Mount State enum eQMIPDSCradleMountState:UINT8 { eQMIPDSCradleMountState_NotMounted = 0, eQMIPDSCradleMountState_Mounted = 1, eQMIPDSCradleMountState_Unknown = 2, }; // Enum to describe QMI PDS EFS File Operations enum eQMIPDSEFSFileOperations:UINT8 { eQMIPDSEFSFileOperations_Write = 0, eQMIPDSEFSFileOperations_Delete = 1, }; // Enum to describe QMI PDS Encryption Algorithm enum eQMIPDSEncryptionAlgorithm:UINT8 { eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmSHA1 = 0, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmMax = 1, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmNone = 255, }; // Enum to describe QMI PDS External Power State enum eQMIPDSExternalPowerState:UINT8 { eQMIPDSExternalPowerState_NotConnected = 0, eQMIPDSExternalPowerState_Connected = 1, eQMIPDSExternalPowerState_Unknown = 2, }; // Enum to describe QMI PDS Force Receiver Off enum eQMIPDSForceReceiverOff:UINT8 { eQMIPDSForceReceiverOff_Disable = 0, eQMIPDSForceReceiverOff_Enable = 1, }; // Enum to describe QMI PDS IMD Jamming Bands enum eQMIPDSIMDJammingBands:UINT32 { eQMIPDSIMDJammingBands_GPS = 0, eQMIPDSIMDJammingBands_GLONASS = 1, }; // Enum to describe QMI PDS IMD Jamming States enum eQMIPDSIMDJammingStates:UINT8 { eQMIPDSIMDJammingStates_Terminate = 0, eQMIPDSIMDJammingStates_Initiate = 1, }; // Enum to describe QMI PDS Injected Position Sources enum eQMIPDSInjectedPositionSources:UINT8 { eQMIPDSInjectedPositionSources_Unknown = 0, eQMIPDSInjectedPositionSources_GPS = 1, eQMIPDSInjectedPositionSources_CellID = 2, eQMIPDSInjectedPositionSources_EnhancedCellID = 3, eQMIPDSInjectedPositionSources_WiFi = 4, eQMIPDSInjectedPositionSources_Terrestial = 5, eQMIPDSInjectedPositionSources_TerrestialHybrid = 6, eQMIPDSInjectedPositionSources_Other = 7, }; // Enum to describe QMI PDS Mediums enum eQMIPDSMediums:UINT8 { eQMIPDSMediums_WWAN = 0, }; // Enum to describe QMI PDS Method States enum eQMIPDSMethodStates:UINT8 { eQMIPDSMethodStates_Disabled = 0, eQMIPDSMethodStates_Enabled = 1, eQMIPDSMethodStates_NotSupported = 255, }; // Enum to describe QMI PDS Motion Modes enum eQMIPDSMotionModes:UINT8 { eQMIPDSMotionModes_Unknown = 0, eQMIPDSMotionModes_Pedestrian = 1, eQMIPDSMotionModes_Vehicle = 2, }; // Enum to describe QMI PDS Motion States enum eQMIPDSMotionStates:UINT8 { eQMIPDSMotionStates_Unknown = 0, eQMIPDSMotionStates_Stationary = 1, eQMIPDSMotionStates_InMotion = 2, }; // Enum to describe QMI PDS Motion Submodes enum eQMIPDSMotionSubmodes:UINT8 { eQMIPDSMotionSubmodes_Unknown = 0, eQMIPDSMotionSubmodes_Walking = 1, eQMIPDSMotionSubmodes_Running = 2, }; // Enum to describe QMI PDS NMEA Reporting Options enum eQMIPDSNMEAReportingOptions:UINT8 { eQMIPDSNMEAReportingOptions_1HzFromTimeRequestedUntilFinalPositionDetermination = 0, eQMIPDSNMEAReportingOptions_FinalPositionDeterminationOnly = 1, }; // Enum to describe QMI PDS NMEA Sentence Operating Modes enum eQMIPDSNMEASentenceOperatingModes:UINT8 { eQMIPDSNMEASentenceOperatingModes_Standalone = 0, eQMIPDSNMEASentenceOperatingModes_MSBased = 1, eQMIPDSNMEASentenceOperatingModes_MSAssisted = 2, eQMIPDSNMEASentenceOperatingModes_Unknown = 255, }; // Enum to describe QMI PDS Network Mode enum eQMIPDSNetworkMode:UINT8 { eQMIPDSNetworkMode_UMTS = 0, eQMIPDSNetworkMode_CDMA = 1, }; // Enum to describe QMI PDS ODP States enum eQMIPDSODPStates:UINT8 { eQMIPDSODPStates_Disables = 0, eQMIPDSODPStates_EnabledLowPowerMode = 1, eQMIPDSODPStates_EnabledReadyMode = 2, }; // Enum to describe QMI PDS Operation Types enum eQMIPDSOperationTypes:UINT8 { eQMIPDSOperationTypes_Standalone = 0, eQMIPDSOperationTypes_MSBased = 1, eQMIPDSOperationTypes_MSAssisted = 2, }; // Enum to describe QMI PDS Output Devices enum eQMIPDSOutputDevices:UINT8 { eQMIPDSOutputDevices_NoneDisabled = 0, eQMIPDSOutputDevices_USB = 1, eQMIPDSOutputDevices_UART1 = 2, eQMIPDSOutputDevices_UART2 = 3, eQMIPDSOutputDevices_SharedMemory = 4, }; // Enum to describe QMI PDS Privacy Modes enum eQMIPDSPrivacyModes:UINT8 { eQMIPDSPrivacyModes_NoNotifyVerify = 0, eQMIPDSPrivacyModes_Notify = 1, eQMIPDSPrivacyModes_NotifyVerifyAllowNoResponse = 2, eQMIPDSPrivacyModes_NotifyVerifyRequireResponse = 3, eQMIPDSPrivacyModes_PrivacyOverride = 4, }; // Enum to describe QMI PDS Reliability Indicator enum eQMIPDSReliabilityIndicator:UINT8 { eQMIPDSReliabilityIndicator_NotSet = 0, eQMIPDSReliabilityIndicator_VeryLow = 1, eQMIPDSReliabilityIndicator_Low = 2, eQMIPDSReliabilityIndicator_Medium = 3, eQMIPDSReliabilityIndicator_High = 4, }; // Enum to describe QMI PDS Report Security Challenge enum eQMIPDSReportSecurityChallenge:UINT8 { eQMIPDSReportSecurityChallenge_Disable = 0, eQMIPDSReportSecurityChallenge_Enable = 1, }; // Enum to describe QMI PDS Reporting State enum eQMIPDSReportingState:UINT8 { eQMIPDSReportingState_StopReporting = 0, eQMIPDSReportingState_StartReporting = 1, }; // Enum to describe QMI PDS Reset Reasons enum eQMIPDSResetReasons:UINT32 { eQMIPDSResetReasons_PositionEngine = 0, eQMIPDSResetReasons_GNSSBackgroundSCan = 1, eQMIPDSResetReasons_InjectClockInconsistency = 2, eQMIPDSResetReasons_GPSSubframeMisalignment = 3, eQMIPDSResetReasons_DecodedTimeInconsistency = 4, eQMIPDSResetReasons_CodeConsistencyError = 5, eQMIPDSResetReasons_SoftResetFromINTMSError = 6, eQMIPDSResetReasons_SoftResetFromRFFailure = 7, }; // Enum to describe QMI PDS Reset States enum eQMIPDSResetStates:UINT32 { eQMIPDSResetStates_InProgress = 0, eQMIPDSResetStates_Completed = 1, eQMIPDSResetStates_UnableToInitialize = 2, eQMIPDSResetStates_E911CallInProgress = 3, }; // Enum to describe QMI PDS SBAS States enum eQMIPDSSBASStates:UINT8 { eQMIPDSSBASStates_Disabled = 0, eQMIPDSSBASStates_Enabled = 1, eQMIPDSSBASStates_Unknown = 255, }; // Enum to describe QMI PDS SPI State enum eQMIPDSSPIState:UINT8 { eQMIPDSSPIState_DeviceIsNonstationary = 0, eQMIPDSSPIState_DeviceIsStationary = 1, }; // Enum to describe QMI PDS SUPL Data Coding Schemes enum eQMIPDSSUPLDataCodingSchemes:UINT8 { eQMIPDSSUPLDataCodingSchemes_UTF8 = 0, eQMIPDSSUPLDataCodingSchemes_UCS2 = 1, eQMIPDSSUPLDataCodingSchemes_GSM = 2, eQMIPDSSUPLDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL ID/Name Data Coding Schemes enum eQMIPDSSUPLIDNameDataCodingSchemes:UINT8 { eQMIPDSSUPLIDNameDataCodingSchemes_LogicalName = 0, eQMIPDSSUPLIDNameDataCodingSchemes_EmailAddress = 1, eQMIPDSSUPLIDNameDataCodingSchemes_MSISDN = 2, eQMIPDSSUPLIDNameDataCodingSchemes_URL = 3, eQMIPDSSUPLIDNameDataCodingSchemes_SIPURL = 4, eQMIPDSSUPLIDNameDataCodingSchemes_MIN = 5, eQMIPDSSUPLIDNameDataCodingSchemes_MDN = 6, eQMIPDSSUPLIDNameDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL Modes enum eQMIPDSSUPLModes:UINT8 { eQMIPDSSUPLModes_MSAssisted = 0, eQMIPDSSUPLModes_MSBased = 1, eQMIPDSSUPLModes_MSAssistedPreferred = 2, eQMIPDSSUPLModes_MSBasedPreferred = 3, eQMIPDSSUPLModes_Standalone = 4, eQMIPDSSUPLModes_AFLT = 5, eQMIPDSSUPLModes_ECID = 6, eQMIPDSSUPLModes_EOTD = 7, eQMIPDSSUPLModes_OTDOA = 8, eQMIPDSSUPLModes_NoPosition = 9, }; // Enum to describe QMI PDS SV Almanac Status enum eQMIPDSSVAlmanacStatus:UINT8 { eQMIPDSSVAlmanacStatus_Unavailable = 0, eQMIPDSSVAlmanacStatus_Available = 1, }; // Enum to describe QMI PDS SV Ephemeris Status enum eQMIPDSSVEphemerisStatus:UINT8 { eQMIPDSSVEphemerisStatus_Unavailable = 0, eQMIPDSSVEphemerisStatus_Available = 1, }; // Enum to describe QMI PDS SV Health Status enum eQMIPDSSVHealthStatus:UINT8 { eQMIPDSSVHealthStatus_Unhealthy = 0, eQMIPDSSVHealthStatus_Healthy = 1, }; // Enum to describe QMI PDS SV Processing Status enum eQMIPDSSVProcessingStatus:UINT8 { eQMIPDSSVProcessingStatus_Idle = 1, eQMIPDSSVProcessingStatus_Search = 2, eQMIPDSSVProcessingStatus_SearchVerify = 3, eQMIPDSSVProcessingStatus_BitEdge = 4, eQMIPDSSVProcessingStatus_Track = 5, }; // Enum to describe QMI PDS SV Systems enum eQMIPDSSVSystems:UINT8 { eQMIPDSSVSystems_GPS = 1, eQMIPDSSVSystems_Galileo = 2, eQMIPDSSVSystems_SBAS = 3, eQMIPDSSVSystems_Compass = 4, eQMIPDSSVSystems_Glonass = 5, }; // Enum to describe QMI PDS Server Options enum eQMIPDSServerOptions:UINT8 { eQMIPDSServerOptions_Default = 0, }; // Enum to describe QMI PDS Session Control Types enum eQMIPDSSessionControlTypes:UINT8 { eQMIPDSSessionControlTypes_Automatic = 0, }; // Enum to describe QMI PDS Session Status enum eQMIPDSSessionStatus:UINT8 { eQMIPDSSessionStatus_Success = 0, eQMIPDSSessionStatus_InProgress = 1, eQMIPDSSessionStatus_GeneralFailure = 2, eQMIPDSSessionStatus_Timeout = 3, eQMIPDSSessionStatus_UserEnded = 4, eQMIPDSSessionStatus_BadParameter = 5, eQMIPDSSessionStatus_PhoneOffline = 6, eQMIPDSSessionStatus_EngineLocked = 7, eQMIPDSSessionStatus_E911SessionInProgress = 8, }; // Enum to describe QMI PDS Session Types enum eQMIPDSSessionTypes:UINT8 { eQMIPDSSessionTypes_New = 0, }; // Enum to describe QMI PDS Source Linkage enum eQMIPDSSourceLinkage:UINT8 { eQMIPDSSourceLinkage_NotSpecified = 0, eQMIPDSSourceLinkage_FullyInterDependent = 1, eQMIPDSSourceLinkage_AltitudeDependsOnLatitudeAndLongitude = 2, eQMIPDSSourceLinkage_FullyIndependent = 3, }; // Enum to describe QMI PDS Stop Reason enum eQMIPDSStopReason:UINT8 { eQMIPDSStopReason_UserTerminated = 0, eQMIPDSStopReason_Other = 1, }; // Enum to describe QMI PDS Streaming Status enum eQMIPDSStreamingStatus:UINT8 { eQMIPDSStreamingStatus_NotReadyForStreaming = 0, eQMIPDSStreamingStatus_ReadyForStreaming = 1, }; // Enum to describe QMI PDS Suspend Reason enum eQMIPDSSuspendReason:UINT8 { eQMIPDSSuspendReason_OoS = 0, eQMIPDSSuspendReason_LPM = 1, eQMIPDSSuspendReason_Other = 2, }; // Enum to describe QMI PDS Time Bases enum eQMIPDSTimeBases:UINT8 { eQMIPDSTimeBases_GPS = 0, eQMIPDSTimeBases_UTC = 1, }; // Enum to describe QMI PDS Time Source enum eQMIPDSTimeSource:UINT8 { eQMIPDSTimeSource_Invalid = 0, eQMIPDSTimeSource_NetworkTimeTransfer = 1, eQMIPDSTimeSource_NetworkTimeTagging = 2, eQMIPDSTimeSource_ExternalInput = 3, eQMIPDSTimeSource_TOWDecode = 4, eQMIPDSTimeSource_TOWConfirmed = 5, eQMIPDSTimeSource_TOWAndWeekConfirmed = 6, eQMIPDSTimeSource_TimeAlignment = 7, eQMIPDSTimeSource_NavSolution = 8, eQMIPDSTimeSource_SolveForTime = 9, }; // Enum to describe QMI PDS Time Type enum eQMIPDSTimeType:UINT8 { eQMIPDSTimeType_UTCTime = 0, eQMIPDSTimeType_GPSTime = 1, eQMIPDSTimeType_Age = 2, }; // Enum to describe QMI PDS Tracking Session States enum eQMIPDSTrackingSessionStates:UINT8 { eQMIPDSTrackingSessionStates_Unknown = 0, eQMIPDSTrackingSessionStates_Inactive = 1, eQMIPDSTrackingSessionStates_Active = 2, }; // Enum to describe QMI PDS UMTS CP Data Coding Schemes enum eQMIPDSUMTSCPDataCodingSchemes:UINT8 { eQMIPDSUMTSCPDataCodingSchemes_German = 0, eQMIPDSUMTSCPDataCodingSchemes_English = 1, eQMIPDSUMTSCPDataCodingSchemes_Italian = 2, eQMIPDSUMTSCPDataCodingSchemes_French = 3, eQMIPDSUMTSCPDataCodingSchemes_Spanish = 4, eQMIPDSUMTSCPDataCodingSchemes_Dutch = 5, eQMIPDSUMTSCPDataCodingSchemes_Swedish = 6, eQMIPDSUMTSCPDataCodingSchemes_Danish = 7, eQMIPDSUMTSCPDataCodingSchemes_Portuguese = 8, eQMIPDSUMTSCPDataCodingSchemes_Finnish = 9, eQMIPDSUMTSCPDataCodingSchemes_Norwegian = 10, eQMIPDSUMTSCPDataCodingSchemes_Greek = 11, eQMIPDSUMTSCPDataCodingSchemes_Turkish = 12, eQMIPDSUMTSCPDataCodingSchemes_Hungarian = 13, eQMIPDSUMTSCPDataCodingSchemes_Polish = 14, eQMIPDSUMTSCPDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS UMTS CP Location Types enum eQMIPDSUMTSCPLocationTypes:UINT8 { eQMIPDSUMTSCPLocationTypes_Current = 0, eQMIPDSUMTSCPLocationTypes_CurrentOrLastKnown = 1, eQMIPDSUMTSCPLocationTypes_Initial = 2, }; // Enum to describe QMI PDS Uncertainty Coverage enum eQMIPDSUncertaintyCoverage:UINT8 { eQMIPDSUncertaintyCoverage_NotSpecified = 0, eQMIPDSUncertaintyCoverage_PointUncertainty = 1, eQMIPDSUncertaintyCoverage_FullyUncertainty = 2, }; // Enum to describe QMI PDS VX Data Coding Schemes enum eQMIPDSVXDataCodingSchemes:UINT8 { eQMIPDSVXDataCodingSchemes_Octet = 0, eQMIPDSVXDataCodingSchemes_EXNProtocolMessage = 1, eQMIPDSVXDataCodingSchemes_ASCII = 2, eQMIPDSVXDataCodingSchemes_IA5 = 3, eQMIPDSVXDataCodingSchemes_Unicode = 4, eQMIPDSVXDataCodingSchemes_ShiftJIS = 5, eQMIPDSVXDataCodingSchemes_Korean = 6, eQMIPDSVXDataCodingSchemes_LatinHebrew = 7, eQMIPDSVXDataCodingSchemes_Latin = 8, eQMIPDSVXDataCodingSchemes_GSM = 9, }; // Enum to describe QMI PDS VX Modes enum eQMIPDSVXModes:UINT8 { eQMIPDSVXModes_MSAssisted = 0, eQMIPDSVXModes_MSBased = 1, eQMIPDSVXModes_MSAssistedPreferred = 2, eQMIPDSVXModes_MSBasedPreferred = 3, }; // Enum to describe QMI PDS WWAN Network Preferences enum eQMIPDSWWANNetworkPreferences:UINT8 { eQMIPDSWWANNetworkPreferences_AnyAvailable = 0, eQMIPDSWWANNetworkPreferences_HomeOnly = 1, eQMIPDSWWANNetworkPreferences_RoamOnly = 2, }; // Enum to describe QMI PDS Wi-Fi Request Types enum eQMIPDSWiFiRequestTypes:UINT8 { eQMIPDSWiFiRequestTypes_StartPeriodicFixesHighFrequency = 0, eQMIPDSWiFiRequestTypes_StartPeriodicFixesKeepWarm = 1, eQMIPDSWiFiRequestTypes_StopPeriodicFixes = 2, eQMIPDSWiFiRequestTypes_Suspend = 4, }; // Enum to describe QMI Profile Types enum eQMIProfileTypes:UINT8 { eQMIProfileTypes_3GPP = 0, eQMIProfileTypes_3GPP2 = 1, }; // Enum to describe QMI QoS Delivery Orders enum eQMIQoSDeliveryOrders:UINT8 { eQMIQoSDeliveryOrders_Subscribe = 0, eQMIQoSDeliveryOrders_DeliveryOrderOn = 1, eQMIQoSDeliveryOrders_DeliveryOrderOff = 2, }; // Enum to describe QMI Results enum eQMIResults:UINT16 { eQMIResults_Success = 0, eQMIResults_Failure = 1, }; // Enum to describe QMI SAR RF States enum eQMISARRFStates { eQMISARRFStates_DefaultState = 0, eQMISARRFStates_State1 = 1, eQMISARRFStates_State2 = 2, eQMISARRFStates_State3 = 3, eQMISARRFStates_State4 = 4, eQMISARRFStates_State5 = 5, eQMISARRFStates_State6 = 6, eQMISARRFStates_State7 = 7, eQMISARRFStates_State8 = 8, }; // Enum to describe QMI SDU Error Ratios enum eQMISDUErrorRatios:UINT8 { eQMISDUErrorRatios_Subscribe = 0, eQMISDUErrorRatios_1X102 = 1, eQMISDUErrorRatios_7X103 = 2, eQMISDUErrorRatios_1X103 = 3, eQMISDUErrorRatios_1X104 = 4, eQMISDUErrorRatios_1X105 = 5, eQMISDUErrorRatios_1X106 = 6, eQMISDUErrorRatios_1X101 = 7, }; // Enum to describe QMI SDU Residual Bit Error Ratios enum eQMISDUResidualBitErrorRatios:UINT8 { eQMISDUResidualBitErrorRatios_Subscribe = 0, eQMISDUResidualBitErrorRatios_5X102 = 1, eQMISDUResidualBitErrorRatios_1X102 = 2, eQMISDUResidualBitErrorRatios_5X103 = 3, eQMISDUResidualBitErrorRatios_4X103 = 4, eQMISDUResidualBitErrorRatios_1X103 = 5, eQMISDUResidualBitErrorRatios_1X104 = 6, eQMISDUResidualBitErrorRatios_1X105 = 7, eQMISDUResidualBitErrorRatios_1X106 = 8, eQMISDUResidualBitErrorRatios_6X108 = 9, }; // Enum to describe QMI Traffic Classes enum eQMITrafficClasses:UINT8 { eQMITrafficClasses_Subscribed = 0, eQMITrafficClasses_Conversational = 1, eQMITrafficClasses_Streaming = 2, eQMITrafficClasses_Interactive = 3, eQMITrafficClasses_Background = 4, }; // Enum to describe QMI UIM APDU Response Status enum eQMIUIMAPDUResponseStatus:UINT8 { eQMIUIMAPDUResponseStatus_ReturnIntermediateProcedureBytes = 0, eQMIUIMAPDUResponseStatus_ReturnFinalResultAndStatusWords = 1, }; // Enum to describe QMI UIM Application States enum eQMIUIMApplicationStates:UINT8 { eQMIUIMApplicationStates_Unknown = 0, eQMIUIMApplicationStates_Detected = 1, eQMIUIMApplicationStates_PIN1OrUPINIsRequired = 2, eQMIUIMApplicationStates_PUK1OrPUKForUPINIsRequired = 3, eQMIUIMApplicationStates_PersonalizationStateMustBeChecked = 4, eQMIUIMApplicationStates_PIN1IsBlocked = 5, eQMIUIMApplicationStates_Illegal = 6, eQMIUIMApplicationStates_Ready = 7, }; // Enum to describe QMI UIM Application Types enum eQMIUIMApplicationTypes:UINT8 { eQMIUIMApplicationTypes_Unknown = 0, eQMIUIMApplicationTypes_SIMCard = 1, eQMIUIMApplicationTypes_USIMApplication = 2, eQMIUIMApplicationTypes_RUIMCard = 3, eQMIUIMApplicationTypes_CSIMApplication = 4, eQMIUIMApplicationTypes_ISIMApplication = 5, }; // Enum to describe QMI UIM Authentication Contexts enum eQMIUIMAuthenticationContexts { eQMIUIMAuthenticationContexts_GSMAlgorithm = 0, eQMIUIMAuthenticationContexts_CAVEAlgorithm = 1, eQMIUIMAuthenticationContexts_GSMSecurity = 2, eQMIUIMAuthenticationContexts_3GSecurity = 3, eQMIUIMAuthenticationContexts_VGCSVBSSecurity = 4, eQMIUIMAuthenticationContexts_GBASecurityBootstrappingMode = 5, eQMIUIMAuthenticationContexts_GBASecurityNAFDerivationMode = 6, eQMIUIMAuthenticationContexts_MBMSSecurityMSKUpdateMode = 7, eQMIUIMAuthenticationContexts_MBMSSecurityMTKGenerationMode = 8, eQMIUIMAuthenticationContexts_MBMSSecurityMSKDeletionMode = 9, eQMIUIMAuthenticationContexts_MBMSSecurityMUKDeletionMode = 10, eQMIUIMAuthenticationContexts_IMSAKASecurity = 11, eQMIUIMAuthenticationContexts_HTTPDigestSecurity = 12, eQMIUIMAuthenticationContexts_ComputeIPCHAP = 13, eQMIUIMAuthenticationContexts_ComputeIPMNHA = 14, eQMIUIMAuthenticationContexts_ComputeIPMIPRRQ = 15, eQMIUIMAuthenticationContexts_ComputeIPMNAAA = 16, eQMIUIMAuthenticationContexts_ComputeIPHRPD = 17, }; // Enum to describe QMI UIM CK/Session Operations enum eQMIUIMCKSessionOperations:UINT8 { eQMIUIMCKSessionOperations_Deactivate = 0, eQMIUIMCKSessionOperations_Activate = 1, }; // Enum to describe QMI UIM Card Error Codes enum eQMIUIMCardErrorCodes:UINT8 { eQMIUIMCardErrorCodes_Unknown = 0, eQMIUIMCardErrorCodes_PowerDown = 1, eQMIUIMCardErrorCodes_PollError = 2, eQMIUIMCardErrorCodes_NoATRReceived = 3, eQMIUIMCardErrorCodes_VoltMismatch = 4, eQMIUIMCardErrorCodes_ParityError = 5, eQMIUIMCardErrorCodes_UnknownPossiblyRemoved = 6, eQMIUIMCardErrorCodes_TechnicalProblems = 7, }; // Enum to describe QMI UIM Card States enum eQMIUIMCardStates:UINT8 { eQMIUIMCardStates_Absent = 0, eQMIUIMCardStates_Present = 1, eQMIUIMCardStates_Error = 2, }; // Enum to describe QMI UIM Connect Operations enum eQMIUIMConnectOperations:UINT8 { eQMIUIMConnectOperations_Disconnect = 0, eQMIUIMConnectOperations_Connect = 1, eQMIUIMConnectOperations_CheckStatus = 2, }; // Enum to describe QMI UIM Disonnect Modes enum eQMIUIMDisonnectModes:UINT8 { eQMIUIMDisonnectModes_ImmediateDisconnect = 0, eQMIUIMDisonnectModes_GracefulShutdown = 1, }; // Enum to describe QMI UIM FDN Status Values enum eQMIUIMFDNStatusValues:UINT8 { eQMIUIMFDNStatusValues_NotAvailable = 0, eQMIUIMFDNStatusValues_AvailableButDisabled = 1, eQMIUIMFDNStatusValues_AvailableAndEnabled = 2, }; // Enum to describe QMI UIM File Control Information enum eQMIUIMFileControlInformation:UINT8 { eQMIUIMFileControlInformation_NoData = 0, eQMIUIMFileControlInformation_FCP = 1, eQMIUIMFileControlInformation_FCI = 2, eQMIUIMFileControlInformation_FCIWithInterfaces = 3, eQMIUIMFileControlInformation_FMD = 4, }; // Enum to describe QMI UIM File Types enum eQMIUIMFileTypes:UINT8 { eQMIUIMFileTypes_Transparent = 0, eQMIUIMFileTypes_Cyclic = 1, eQMIUIMFileTypes_LinearFixed = 2, eQMIUIMFileTypes_DedicatedFile = 3, eQMIUIMFileTypes_MasterFile = 4, }; // Enum to describe QMI UIM Hidden Key Status Values enum eQMIUIMHiddenKeyStatusValues:UINT8 { eQMIUIMHiddenKeyStatusValues_NotSupported = 0, eQMIUIMHiddenKeyStatusValues_EnabledAndNotVerified = 1, eQMIUIMHiddenKeyStatusValues_EnabledAndVerified = 2, eQMIUIMHiddenKeyStatusValues_Disabled = 3, }; // Enum to describe QMI UIM Hot-Swap enum eQMIUIMHotSwap:UINT8 { eQMIUIMHotSwap_HotSwapNotSupported = 0, eQMIUIMHotSwap_HotSwapIsSupportedButStatusOfSwitchNotSupported = 1, eQMIUIMHotSwap_SwitchIndicatesThatCardIsPresent = 2, eQMIUIMHotSwap_SwichIndicatesThatCardIsNotPresent = 3, }; // Enum to describe QMI UIM Key Reference ID enum eQMIUIMKeyReferenceID:UINT8 { eQMIUIMKeyReferenceID_PINApplication1 = 1, eQMIUIMKeyReferenceID_PINApplication2 = 2, eQMIUIMKeyReferenceID_PINApplication3 = 3, eQMIUIMKeyReferenceID_PINApplication4 = 4, eQMIUIMKeyReferenceID_PINApplication5 = 5, eQMIUIMKeyReferenceID_PINApplication6 = 6, eQMIUIMKeyReferenceID_PINApplication7 = 7, eQMIUIMKeyReferenceID_PINApplication8 = 8, }; // Enum to describe QMI UIM PIN IDs enum eQMIUIMPINIDs { eQMIUIMPINIDs_PIN1 = 1, eQMIUIMPINIDs_PIN2 = 2, eQMIUIMPINIDs_UniversalPIN = 3, eQMIUIMPINIDs_HiddenKey = 4, }; // Enum to describe QMI UIM PIN Operations enum eQMIUIMPINOperations { eQMIUIMPINOperations_Disable = 0, eQMIUIMPINOperations_Enable = 1, }; // Enum to describe QMI UIM PIN States enum eQMIUIMPINStates:UINT8 { eQMIUIMPINStates_Unknown = 0, eQMIUIMPINStates_EnabledAndNotVerified = 1, eQMIUIMPINStates_EnabledAndVerified = 2, eQMIUIMPINStates_Disabled = 3, eQMIUIMPINStates_Blocked = 4, eQMIUIMPINStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Personalization Features enum eQMIUIMPersonalizationFeatures:UINT8 { eQMIUIMPersonalizationFeatures_GWNetwork = 0, eQMIUIMPersonalizationFeatures_GWNetworkSubset = 1, eQMIUIMPersonalizationFeatures_GWServiceProvider = 2, eQMIUIMPersonalizationFeatures_GWCorporate = 3, eQMIUIMPersonalizationFeatures_GWUIM = 4, eQMIUIMPersonalizationFeatures_1XNetworkType1 = 5, eQMIUIMPersonalizationFeatures_1XNetworkType2 = 6, eQMIUIMPersonalizationFeatures_1XHRPD = 7, eQMIUIMPersonalizationFeatures_1XServiceProvider = 8, eQMIUIMPersonalizationFeatures_1XCorporate = 9, eQMIUIMPersonalizationFeatures_1XRUIM = 10, eQMIUIMPersonalizationFeatures_Unknown = 11, }; // Enum to describe QMI UIM Personalization States enum eQMIUIMPersonalizationStates:UINT8 { eQMIUIMPersonalizationStates_Unknown = 0, eQMIUIMPersonalizationStates_PersonalizationOperationIsInProgress = 1, eQMIUIMPersonalizationStates_Ready = 2, eQMIUIMPersonalizationStates_PersonalizationCodeIsRequired = 3, eQMIUIMPersonalizationStates_PUKForPersonalizationCodeIsRequired = 4, eQMIUIMPersonalizationStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Refresh Modes enum eQMIUIMRefreshModes:UINT8 { eQMIUIMRefreshModes_Reset = 0, eQMIUIMRefreshModes_Init = 1, eQMIUIMRefreshModes_InitAndFCN = 2, eQMIUIMRefreshModes_FCN = 3, eQMIUIMRefreshModes_InitAndFullFCN = 4, eQMIUIMRefreshModes_ApplicationReset = 5, eQMIUIMRefreshModes_3GSessionReset = 6, }; // Enum to describe QMI UIM Refresh Stages enum eQMIUIMRefreshStages:UINT8 { eQMIUIMRefreshStages_WaitingForOK = 0, eQMIUIMRefreshStages_Start = 1, eQMIUIMRefreshStages_EndWithSuccess = 2, eQMIUIMRefreshStages_EndWithFailure = 3, }; // Enum to describe QMI UIM Register Flags enum eQMIUIMRegisterFlags { eQMIUIMRegisterFlags_Deregister = 0, eQMIUIMRegisterFlags_Register = 1, }; // Enum to describe QMI UIM SAP Requests enum eQMIUIMSAPRequests:UINT8 { eQMIUIMSAPRequests_RetrieveATR = 0, eQMIUIMSAPRequests_SendAPDU = 1, eQMIUIMSAPRequests_PowerOffSIM = 2, eQMIUIMSAPRequests_PowerOnSIM = 3, eQMIUIMSAPRequests_ResetSIM = 4, eQMIUIMSAPRequests_RetrieveCardReaderStatus = 5, }; // Enum to describe QMI UIM SAP States enum eQMIUIMSAPStates:UINT8 { eQMIUIMSAPStates_NotEnabled = 0, eQMIUIMSAPStates_Connecting = 1, eQMIUIMSAPStates_ConnectedSuccessfully = 2, eQMIUIMSAPStates_ConnectionError = 3, eQMIUIMSAPStates_Disconnecting = 4, eQMIUIMSAPStates_DisconnectedSuccessfully = 5, }; // Enum to describe QMI UIM Security Attributes enum eQMIUIMSecurityAttributes:UINT8 { eQMIUIMSecurityAttributes_Always = 0, eQMIUIMSecurityAttributes_Never = 1, eQMIUIMSecurityAttributes_ANDCondition = 2, eQMIUIMSecurityAttributes_ORCondition = 3, eQMIUIMSecurityAttributes_SingleCondition = 4, }; // Enum to describe QMI UIM Session Types enum eQMIUIMSessionTypes:UINT8 { eQMIUIMSessionTypes_PrimaryGWProvisioning = 0, eQMIUIMSessionTypes_Primary1XProvisioning = 1, eQMIUIMSessionTypes_SecondaryGWProvisioning = 2, eQMIUIMSessionTypes_Secondary1XProvisioning = 3, eQMIUIMSessionTypes_NonprovisioningOnSlot1 = 4, eQMIUIMSessionTypes_NonprovisioningOnSlot2 = 5, eQMIUIMSessionTypes_CardOnSlot1 = 6, eQMIUIMSessionTypes_CardOnSlot2 = 7, eQMIUIMSessionTypes_LogicalChannelOnSlot1 = 8, eQMIUIMSessionTypes_LogicalChannelOnSlot2 = 9, }; // Enum to describe QMI UIM Slots enum eQMIUIMSlots:UINT8 { eQMIUIMSlots_Slot1 = 1, eQMIUIMSlots_Slot2 = 2, }; // Enum to describe QMI Voice ALS Line Indicators enum eQMIVoiceALSLineIndicators:UINT8 { eQMIVoiceALSLineIndicators_Line1 = 0, eQMIVoiceALSLineIndicators_Line2 = 1, }; // Enum to describe QMI Voice ALS Lines enum eQMIVoiceALSLines:UINT8 { eQMIVoiceALSLines_Line1 = 0, eQMIVoiceALSLines_Line2 = 1, }; // Enum to describe QMI Voice Alerting Patterns enum eQMIVoiceAlertingPatterns:UINT32 { eQMIVoiceAlertingPatterns_Pattern1 = 0, eQMIVoiceAlertingPatterns_Pattern2 = 1, eQMIVoiceAlertingPatterns_Pattern3 = 2, eQMIVoiceAlertingPatterns_Pattern4 = 3, eQMIVoiceAlertingPatterns_Pattern5 = 4, eQMIVoiceAlertingPatterns_Pattern6 = 5, eQMIVoiceAlertingPatterns_Pattern7 = 6, eQMIVoiceAlertingPatterns_Pattern8 = 7, eQMIVoiceAlertingPatterns_Pattern9 = 8, }; // Enum to describe QMI Voice Alerting Types enum eQMIVoiceAlertingTypes:UINT8 { eQMIVoiceAlertingTypes_Local = 0, eQMIVoiceAlertingTypes_Remote = 1, }; // Enum to describe QMI Voice CLIR Causes enum eQMIVoiceCLIRCauses:UINT8 { eQMIVoiceCLIRCauses_None = 0, eQMIVoiceCLIRCauses_RejectedByUser = 1, eQMIVoiceCLIRCauses_InteractionWithOtherServices = 2, eQMIVoiceCLIRCauses_CoinLine = 3, eQMIVoiceCLIRCauses_ServiceUnavailable = 4, eQMIVoiceCLIRCauses_Reserved = 5, }; // Enum to describe QMI Voice CLIR Types enum eQMIVoiceCLIRTypes:UINT8 { eQMIVoiceCLIRTypes_Supression = 1, eQMIVoiceCLIRTypes_Invocation = 2, }; // Enum to describe QMI Voice Call Control Result Types enum eQMIVoiceCallControlResultTypes:UINT8 { eQMIVoiceCallControlResultTypes_Voice = 0, eQMIVoiceCallControlResultTypes_SupplementaryService = 1, eQMIVoiceCallControlResultTypes_USSD = 2, }; // Enum to describe QMI Voice Call Directions enum eQMIVoiceCallDirections:UINT8 { eQMIVoiceCallDirections_MobileOriginated = 1, eQMIVoiceCallDirections_MobileTerminated = 2, }; // Enum to describe QMI Voice Call Modes enum eQMIVoiceCallModes:UINT8 { eQMIVoiceCallModes_CDMA = 1, eQMIVoiceCallModes_GSM = 2, eQMIVoiceCallModes_UMTS = 3, eQMIVoiceCallModes_LTE = 4, eQMIVoiceCallModes_TDSCDMA = 5, }; // Enum to describe QMI Voice Call States enum eQMIVoiceCallStates:UINT8 { eQMIVoiceCallStates_Origination = 1, eQMIVoiceCallStates_Incoming = 2, eQMIVoiceCallStates_Conversation = 3, eQMIVoiceCallStates_InProgress = 4, eQMIVoiceCallStates_Alerting = 5, eQMIVoiceCallStates_Hold = 6, eQMIVoiceCallStates_Waiting = 7, eQMIVoiceCallStates_Disconnecting = 8, eQMIVoiceCallStates_End = 9, eQMIVoiceCallStates_Setup = 10, }; // Enum to describe QMI Voice Call Types enum eQMIVoiceCallTypes:UINT8 { eQMIVoiceCallTypes_VoiceAutomaticSelection = 0, eQMIVoiceCallTypes_Forced = 1, eQMIVoiceCallTypes_VoiceOverIP = 2, eQMIVoiceCallTypes_OTAPA = 6, eQMIVoiceCallTypes_StandardOTASP = 7, eQMIVoiceCallTypes_NonStandardOTASP = 8, eQMIVoiceCallTypes_Emergency = 9, eQMIVoiceCallTypes_SupplementaryService = 10, }; // Enum to describe QMI Voice DTMF Events enum eQMIVoiceDTMFEvents:UINT8 { eQMIVoiceDTMFEvents_SendDTMFBurst = 0, eQMIVoiceDTMFEvents_StartSendingContinuousDTMFTone = 1, eQMIVoiceDTMFEvents_StopSendingContinuousDTMFTone = 3, eQMIVoiceDTMFEvents_ReceiveDTMFBurst = 4, eQMIVoiceDTMFEvents_StartReceivingContinuousDTMFTone = 6, eQMIVoiceDTMFEvents_StopReceivingContinuousDTMFTone = 7, }; // Enum to describe QMI Voice DTMF Privacy Levels enum eQMIVoiceDTMFPrivacyLevels:UINT8 { eQMIVoiceDTMFPrivacyLevels_Standard = 0, eQMIVoiceDTMFPrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Domains enum eQMIVoiceDomains:UINT8 { eQMIVoiceDomains_CSOnly = 0, eQMIVoiceDomains_PSOnly = 1, eQMIVoiceDomains_CSThenPS = 2, eQMIVoiceDomains_PSThenCS = 3, }; // Enum to describe QMI Voice ECT Call States enum eQMIVoiceECTCallStates:UINT8 { eQMIVoiceECTCallStates_None = 0, eQMIVoiceECTCallStates_Alerting = 1, eQMIVoiceECTCallStates_Active = 2, }; // Enum to describe QMI Voice Even Odd Indicators enum eQMIVoiceEvenOddIndicators:UINT8 { eQMIVoiceEvenOddIndicators_EvenNumber = 0, eQMIVoiceEvenOddIndicators_OddNumber = 1, }; // Enum to describe QMI Voice Flash Types enum eQMIVoiceFlashTypes:UINT8 { eQMIVoiceFlashTypes_Simple = 0, eQMIVoiceFlashTypes_ActivateAnswerHold = 1, eQMIVoiceFlashTypes_DeactivateAnswerHold = 2, }; // Enum to describe QMI Voice Interdigit Intervals enum eQMIVoiceInterdigitIntervals:UINT8 { eQMIVoiceInterdigitIntervals_60ms = 0, eQMIVoiceInterdigitIntervals_100ms = 1, eQMIVoiceInterdigitIntervals_150ms = 2, eQMIVoiceInterdigitIntervals_200ms = 3, }; // Enum to describe QMI Voice NSS Releases enum eQMIVoiceNSSReleases:UINT8 { eQMIVoiceNSSReleases_Finished = 1, }; // Enum to describe QMI Voice Number Plans enum eQMIVoiceNumberPlans:UINT8 { eQMIVoiceNumberPlans_Unknown = 0, eQMIVoiceNumberPlans_ISDN = 1, eQMIVoiceNumberPlans_Data = 3, eQMIVoiceNumberPlans_Telex = 4, eQMIVoiceNumberPlans_National = 8, eQMIVoiceNumberPlans_Private = 9, eQMIVoiceNumberPlans_ReservedCTS = 11, eQMIVoiceNumberPlans_ReservedExtension = 15, }; // Enum to describe QMI Voice Number Types enum eQMIVoiceNumberTypes:UINT8 { eQMIVoiceNumberTypes_Unknown = 0, eQMIVoiceNumberTypes_International = 1, eQMIVoiceNumberTypes_National = 2, eQMIVoiceNumberTypes_NetworkSpecific = 3, eQMIVoiceNumberTypes_Subscriber = 4, eQMIVoiceNumberTypes_Reserved = 5, eQMIVoiceNumberTypes_Abbreviated = 6, eQMIVoiceNumberTypes_ReservedExtension = 7, }; // Enum to describe QMI Voice OTASP Stati enum eQMIVoiceOTASPStati:UINT8 { eQMIVoiceOTASPStati_Unlocked = 0, eQMIVoiceOTASPStati_RetriesExceeded = 1, eQMIVoiceOTASPStati_AKeyExchanged = 2, eQMIVoiceOTASPStati_SSDUpdated = 3, eQMIVoiceOTASPStati_NAMDownloaded = 4, eQMIVoiceOTASPStati_MDNDownloaded = 5, eQMIVoiceOTASPStati_IMSIDownloaded = 6, eQMIVoiceOTASPStati_PRLDownloaded = 7, eQMIVoiceOTASPStati_Committed = 8, eQMIVoiceOTASPStati_OTAPAStarted = 9, eQMIVoiceOTASPStati_OTAPAStopped = 10, eQMIVoiceOTASPStati_OTAPAAborted = 11, eQMIVoiceOTASPStati_OTAPACommitted = 12, }; // Enum to describe QMI Voice Presentation Indicators enum eQMIVoicePresentationIndicators:UINT8 { eQMIVoicePresentationIndicators_Allowed = 0, eQMIVoicePresentationIndicators_Restricted = 1, eQMIVoicePresentationIndicators_Unavailable = 2, eQMIVoicePresentationIndicators_NameRestricted = 3, eQMIVoicePresentationIndicators_PayPhone = 4, }; // Enum to describe QMI Voice Privacy Levels enum eQMIVoicePrivacyLevels:UINT8 { eQMIVoicePrivacyLevels_Standard = 0, eQMIVoicePrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Provisioning States enum eQMIVoiceProvisioningStates:UINT8 { eQMIVoiceProvisioningStates_NotProvisioned = 0, eQMIVoiceProvisioningStates_ProvisionedPermanent = 1, eQMIVoiceProvisioningStates_PresentationRestricted = 2, eQMIVoiceProvisioningStates_PresentationAllowed = 3, }; // Enum to describe QMI Voice Pulse Widths enum eQMIVoicePulseWidths:UINT8 { eQMIVoicePulseWidths_95ms = 0, eQMIVoicePulseWidths_150ms = 1, eQMIVoicePulseWidths_200ms = 2, eQMIVoicePulseWidths_250ms = 3, eQMIVoicePulseWidths_300ms = 4, eQMIVoicePulseWidths_350ms = 5, eQMIVoicePulseWidths_SMSTXSpecial = 6, }; // Enum to describe QMI Voice Screening Indicators enum eQMIVoiceScreeningIndicators:UINT8 { eQMIVoiceScreeningIndicators_UserNotScreened = 0, eQMIVoiceScreeningIndicators_UserPassedVerification = 1, eQMIVoiceScreeningIndicators_UserFailedVerification = 2, eQMIVoiceScreeningIndicators_ProvidedNetwork = 3, }; // Enum to describe QMI Voice Service Options enum eQMIVoiceServiceOptions:UINT16 { eQMIVoiceServiceOptions_Any = 0, eQMIVoiceServiceOptions_IS96A = 1, eQMIVoiceServiceOptions_EVRC = 3, eQMIVoiceServiceOptions_IS73313K = 17, eQMIVoiceServiceOptions_SelectableModeVocoder = 56, eQMIVoiceServiceOptions_4GVNarrowBand = 68, eQMIVoiceServiceOptions_4GVWideBand = 70, eQMIVoiceServiceOptions_13K = 32768, eQMIVoiceServiceOptions_IS96 = 32769, eQMIVoiceServiceOptions_WVRC = 32803, }; // Enum to describe QMI Voice Service Types enum eQMIVoiceServiceTypes:UINT32 { eQMIVoiceServiceTypes_Automatic = 1, eQMIVoiceServiceTypes_GSM = 2, eQMIVoiceServiceTypes_WCDMA = 3, eQMIVoiceServiceTypes_CDMAAutomatic = 4, eQMIVoiceServiceTypes_GSMOrWCDMA = 5, eQMIVoiceServiceTypes_LTE = 6, }; // Enum to describe QMI Voice Subaddress Types enum eQMIVoiceSubaddressTypes:UINT8 { eQMIVoiceSubaddressTypes_NSAP = 0, eQMIVoiceSubaddressTypes_User = 1, }; // Enum to describe QMI Voice Subscription Types enum eQMIVoiceSubscriptionTypes:UINT8 { eQMIVoiceSubscriptionTypes_Primary = 0, eQMIVoiceSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI Voice Supplementary Notification Types enum eQMIVoiceSupplementaryNotificationTypes:UINT8 { eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsForwarded = 1, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsWaiting = 2, eQMIVoiceSupplementaryNotificationTypes_OutgoingCUGCall = 3, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallsBarred = 4, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsDeflected = 5, eQMIVoiceSupplementaryNotificationTypes_IncomingCUGCall = 6, eQMIVoiceSupplementaryNotificationTypes_IncomingCallsBarred = 7, eQMIVoiceSupplementaryNotificationTypes_IncomingForwardedCall = 8, eQMIVoiceSupplementaryNotificationTypes_IncomingDeflectedCall = 9, eQMIVoiceSupplementaryNotificationTypes_IncomingCallIsForwarded = 10, eQMIVoiceSupplementaryNotificationTypes_UnconditionalCallForwardingActive = 11, eQMIVoiceSupplementaryNotificationTypes_ConditionalCallForwardingActive = 12, eQMIVoiceSupplementaryNotificationTypes_CLIRSuppressionRejected = 13, eQMIVoiceSupplementaryNotificationTypes_CallIsOnHold = 14, eQMIVoiceSupplementaryNotificationTypes_CallIsRetrieved = 15, eQMIVoiceSupplementaryNotificationTypes_CallIsInConference = 16, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsAlerting = 17, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsActive = 18, }; // Enum to describe QMI Voice Supplementary Service Call Types enum eQMIVoiceSupplementaryServiceCallTypes:UINT8 { eQMIVoiceSupplementaryServiceCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceSupplementaryServiceCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceSupplementaryServiceCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceSupplementaryServiceCallTypes_HoldAllExceptSpecifiedCall = 4, eQMIVoiceSupplementaryServiceCallTypes_MakeConferenceCall = 5, eQMIVoiceSupplementaryServiceCallTypes_ExplicitCallTransfer = 6, eQMIVoiceSupplementaryServiceCallTypes_CCBSActivation = 7, eQMIVoiceSupplementaryServiceCallTypes_EndAllCalls = 8, eQMIVoiceSupplementaryServiceCallTypes_ReleaseSpecifiedCall = 9, }; // Enum to describe QMI Voice Supplementary Service Reasons enum eQMIVoiceSupplementaryServiceReasons:UINT8 { eQMIVoiceSupplementaryServiceReasons_ForwardUnconditional = 1, eQMIVoiceSupplementaryServiceReasons_ForwardMobileBusy = 2, eQMIVoiceSupplementaryServiceReasons_ForwardNoReply = 3, eQMIVoiceSupplementaryServiceReasons_ForwardUnreachable = 4, eQMIVoiceSupplementaryServiceReasons_ForwardAllForwarding = 5, eQMIVoiceSupplementaryServiceReasons_ForwardAllConditional = 6, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoing = 7, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingInt = 8, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingIntExtToHome = 9, eQMIVoiceSupplementaryServiceReasons_BarrAllIncoming = 10, eQMIVoiceSupplementaryServiceReasons_BarrIncomingRoaming = 11, eQMIVoiceSupplementaryServiceReasons_BarrAllBarring = 12, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoingBarring = 13, eQMIVoiceSupplementaryServiceReasons_BarrAllIncomingBarring = 14, eQMIVoiceSupplementaryServiceReasons_CallWaiting = 15, eQMIVoiceSupplementaryServiceReasons_CLIR = 16, eQMIVoiceSupplementaryServiceReasons_CLIP = 17, }; // Enum to describe QMI Voice Supplementary Service Requests enum eQMIVoiceSupplementaryServiceRequests:UINT8 { eQMIVoiceSupplementaryServiceRequests_Activate = 1, eQMIVoiceSupplementaryServiceRequests_Deactivate = 2, eQMIVoiceSupplementaryServiceRequests_Register = 3, eQMIVoiceSupplementaryServiceRequests_Erase = 4, eQMIVoiceSupplementaryServiceRequests_Interrogate = 5, eQMIVoiceSupplementaryServiceRequests_RegisterPassword = 6, eQMIVoiceSupplementaryServiceRequests_USSD = 7, }; // Enum to describe QMI Voice Supplementary Service Types enum eQMIVoiceSupplementaryServiceTypes:UINT8 { eQMIVoiceSupplementaryServiceTypes_Activate = 0, eQMIVoiceSupplementaryServiceTypes_Deactivate = 1, eQMIVoiceSupplementaryServiceTypes_Register = 2, eQMIVoiceSupplementaryServiceTypes_Erase = 3, }; // Enum to describe QMI Voice TTY Modes enum eQMIVoiceTTYModes:UINT8 { eQMIVoiceTTYModes_Full = 0, eQMIVoiceTTYModes_VoiceCarryOver = 1, eQMIVoiceTTYModes_HearingCarryOver = 2, eQMIVoiceTTYModes_Off = 3, }; // Enum to describe QMI Voice USSD Alpha Coding Schemes enum eQMIVoiceUSSDAlphaCodingSchemes:UINT8 { eQMIVoiceUSSDAlphaCodingSchemes_GSM = 1, eQMIVoiceUSSDAlphaCodingSchemes_UCS2 = 2, }; // Enum to describe QMI Voice USSD Data Coding Schemes enum eQMIVoiceUSSDDataCodingSchemes:UINT8 { eQMIVoiceUSSDDataCodingSchemes_ASCII = 1, eQMIVoiceUSSDDataCodingSchemes_8Bit = 2, eQMIVoiceUSSDDataCodingSchemes_UCS2 = 3, }; // Enum to describe QMI Voice USSD Notifcation Types enum eQMIVoiceUSSDNotifcationTypes:UINT8 { eQMIVoiceUSSDNotifcationTypes_NoActionRequired = 1, eQMIVoiceUSSDNotifcationTypes_ActionIsRequired = 2, }; // Enum to describe QMI Voice UUS Data Coding Schemes enum eQMIVoiceUUSDataCodingSchemes:UINT8 { eQMIVoiceUUSDataCodingSchemes_USP = 1, eQMIVoiceUUSDataCodingSchemes_OHLP = 2, eQMIVoiceUUSDataCodingSchemes_X244 = 3, eQMIVoiceUUSDataCodingSchemes_SMCF = 4, eQMIVoiceUUSDataCodingSchemes_IA5 = 5, eQMIVoiceUUSDataCodingSchemes_RV12RD = 6, eQMIVoiceUUSDataCodingSchemes_Q931UNCCM = 7, }; // Enum to describe QMI Voice UUS Types enum eQMIVoiceUUSTypes:UINT8 { eQMIVoiceUUSTypes_Data = 0, eQMIVoiceUUSTypes_Type1Implicit = 1, eQMIVoiceUUSTypes_Type1Required = 2, eQMIVoiceUUSTypes_Type1NotRequired = 3, eQMIVoiceUUSTypes_Type2Required = 4, eQMIVoiceUUSTypes_Type2NotRequired = 5, eQMIVoiceUUSTypes_Type3Required = 6, eQMIVoiceUUSTypes_Type3NotRequired = 7, }; // Enum to describe QMI Voice VoIP SUPS Call Types enum eQMIVoiceVoIPSUPSCallTypes:UINT8 { eQMIVoiceVoIPSUPSCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceVoIPSUPSCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceVoIPSUPSCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceVoIPSUPSCallTypes_MakeConferenceCall = 4, eQMIVoiceVoIPSUPSCallTypes_EndAllExistingCalls = 5, }; // Enum to describe QMI WDS 3GPP Call End Reasons enum eQMIWDS3GPPCallEndReasons:UINT16 { eQMIWDS3GPPCallEndReasons_OperatorDeterminedBarring = 8, eQMIWDS3GPPCallEndReasons_LLCSNDCPFailure = 25, eQMIWDS3GPPCallEndReasons_InsufficientResources = 26, eQMIWDS3GPPCallEndReasons_UnknownAPN = 27, eQMIWDS3GPPCallEndReasons_UnknownPDP = 28, eQMIWDS3GPPCallEndReasons_AuthenticationFailed = 29, eQMIWDS3GPPCallEndReasons_GGSNReject = 30, eQMIWDS3GPPCallEndReasons_ActivationReject = 31, eQMIWDS3GPPCallEndReasons_OptionNotSupported = 32, eQMIWDS3GPPCallEndReasons_OptionUnsubscribed = 33, eQMIWDS3GPPCallEndReasons_OptionTemporarilyOOO = 34, eQMIWDS3GPPCallEndReasons_NSAPIAlreadyUsed = 35, eQMIWDS3GPPCallEndReasons_RegularDeactivation = 36, eQMIWDS3GPPCallEndReasons_QoSNotAccepted = 37, eQMIWDS3GPPCallEndReasons_NetworkFailure = 38, eQMIWDS3GPPCallEndReasons_UMTSReactivationRequest = 39, eQMIWDS3GPPCallEndReasons_FeatureNotSupported = 40, eQMIWDS3GPPCallEndReasons_TFTSemanticError = 41, eQMIWDS3GPPCallEndReasons_TFTSyntaxError = 42, eQMIWDS3GPPCallEndReasons_UnknownPDPContext = 43, eQMIWDS3GPPCallEndReasons_FilterSemanticError = 44, eQMIWDS3GPPCallEndReasons_FilterSyntaxError = 45, eQMIWDS3GPPCallEndReasons_PDPWithoutActiveTFT = 46, eQMIWDS3GPPCallEndReasons_IPv4OnlyAllowed = 50, eQMIWDS3GPPCallEndReasons_IPv6OnlyAllowed = 51, eQMIWDS3GPPCallEndReasons_SingleAddressBearerOnly = 52, eQMIWDS3GPPCallEndReasons_ESMInfoNotReceived = 53, eQMIWDS3GPPCallEndReasons_NoPDNConnection = 54, eQMIWDS3GPPCallEndReasons_MultipleConnectionsNotAllowed = 55, eQMIWDS3GPPCallEndReasons_InvalidTransactionID = 81, eQMIWDS3GPPCallEndReasons_MessageIncorrectSemantic = 95, eQMIWDS3GPPCallEndReasons_InvalidMandatoryID = 96, eQMIWDS3GPPCallEndReasons_MessageTypeUnsupported = 97, eQMIWDS3GPPCallEndReasons_MessageTypeNoncompatibleState = 98, eQMIWDS3GPPCallEndReasons_UnknownInfoElement = 99, eQMIWDS3GPPCallEndReasons_ConditionalInfoElementError = 100, eQMIWDS3GPPCallEndReasons_MessageAndProtocolStateUncompatible = 101, eQMIWDS3GPPCallEndReasons_ProtocolError = 111, eQMIWDS3GPPCallEndReasons_APNTypeConflict = 112, }; // Enum to describe QMI WDS 3GPP2 RAT Types enum eQMIWDS3GPP2RATTypes:UINT8 { eQMIWDS3GPP2RATTypes_HRPD = 1, eQMIWDS3GPP2RATTypes_EHRPD = 2, eQMIWDS3GPP2RATTypes_HRPDEHRPD = 3, }; // Enum to describe QMI WDS Address Allocation Preference enum eQMIWDSAddressAllocationPreference:UINT8 { eQMIWDSAddressAllocationPreference_NASSignaling = 0, eQMIWDSAddressAllocationPreference_DHCP = 1, }; // Enum to describe QMI WDS Application Type enum eQMIWDSApplicationType:UINT32 { eQMIWDSApplicationType_DefaultApplicationType = 0, eQMIWDSApplicationType_LBSApplicationType = 32, eQMIWDSApplicationType_TetheredApplicationType = 64, }; // Enum to describe QMI WDS Authentication Protocol enum eQMIWDSAuthenticationProtocol:UINT8 { eQMIWDSAuthenticationProtocol_PAP = 1, eQMIWDSAuthenticationProtocol_CHAP = 2, eQMIWDSAuthenticationProtocol_PAPOrCHAP = 3, }; // Enum to describe QMI WDS Autoconnect Roam Settings enum eQMIWDSAutoconnectRoamSettings:UINT8 { eQMIWDSAutoconnectRoamSettings_Always = 0, eQMIWDSAutoconnectRoamSettings_HomeOnly = 1, }; // Enum to describe QMI WDS Autoconnect Settings enum eQMIWDSAutoconnectSettings:UINT8 { eQMIWDSAutoconnectSettings_Disabled = 0, eQMIWDSAutoconnectSettings_Enabled = 1, eQMIWDSAutoconnectSettings_Paused = 2, }; // Enum to describe QMI WDS CDMA Networks enum eQMIWDSCDMANetworks:UINT8 { eQMIWDSCDMANetworks_NoService = 0, eQMIWDSCDMANetworks_CDMA = 2, eQMIWDSCDMANetworks_CDMA1xEVDO = 4, }; // Enum to describe QMI WDS CDMA Service Options enum eQMIWDSCDMAServiceOptions:UINT16 { eQMIWDSCDMAServiceOptions_IS657 = 7, eQMIWDSCDMAServiceOptions_IS657OverRateSet2 = 15, eQMIWDSCDMAServiceOptions_IS707AWithRateSet1 = 22, eQMIWDSCDMAServiceOptions_IS707AWithRateSet2 = 25, eQMIWDSCDMAServiceOptions_CDMA2000PacketService = 33, eQMIWDSCDMAServiceOptions_IS707 = 4103, eQMIWDSCDMAServiceOptions_QCProprietaryRateSet2 = 32800, eQMIWDSCDMAServiceOptions_NullServiceOption = 65535, }; // Enum to describe QMI WDS Call End Reason Types enum eQMIWDSCallEndReasonTypes:UINT16 { eQMIWDSCallEndReasonTypes_Unspecified = 0, eQMIWDSCallEndReasonTypes_MobileIP = 1, eQMIWDSCallEndReasonTypes_Internal = 2, eQMIWDSCallEndReasonTypes_CallManagerDefined = 3, eQMIWDSCallEndReasonTypes_3GPPSpecificationDefined = 6, eQMIWDSCallEndReasonTypes_PPP = 7, eQMIWDSCallEndReasonTypes_EHRPD = 8, eQMIWDSCallEndReasonTypes_IPv6 = 9, }; // Enum to describe QMI WDS Call Manager Call End Reasons enum eQMIWDSCallManagerCallEndReasons:UINT16 { eQMIWDSCallManagerCallEndReasons_CDMALock = 500, eQMIWDSCallManagerCallEndReasons_Intercept = 501, eQMIWDSCallManagerCallEndReasons_Reorder = 502, eQMIWDSCallManagerCallEndReasons_ReleaseServiceOptionReject = 503, eQMIWDSCallManagerCallEndReasons_IncomingCall = 504, eQMIWDSCallManagerCallEndReasons_AlertStop = 505, eQMIWDSCallManagerCallEndReasons_Activation = 506, eQMIWDSCallManagerCallEndReasons_MaxAccessProbe = 507, eQMIWDSCallManagerCallEndReasons_CCSNotSupportedByBS = 508, eQMIWDSCallManagerCallEndReasons_NoResponseFromBS = 509, eQMIWDSCallManagerCallEndReasons_RejectedByBS = 510, eQMIWDSCallManagerCallEndReasons_Incompatible = 511, eQMIWDSCallManagerCallEndReasons_AlreadyInTC = 512, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringGPS = 513, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringSMS = 514, eQMIWDSCallManagerCallEndReasons_NoCDMAService = 515, eQMIWDSCallManagerCallEndReasons_RetryOrder = 519, eQMIWDSCallManagerCallEndReasons_AccessBlock = 520, eQMIWDSCallManagerCallEndReasons_AccessBlockAll = 521, eQMIWDSCallManagerCallEndReasons_IS707BMaxAccess = 522, eQMIWDSCallManagerCallEndReasons_ThermalEmergency = 523, eQMIWDSCallManagerCallEndReasons_CallOriginationThrottled = 524, eQMIWDSCallManagerCallEndReasons_ConfFailed = 1000, eQMIWDSCallManagerCallEndReasons_IncomingRejected = 1001, eQMIWDSCallManagerCallEndReasons_NoGWService = 1002, eQMIWDSCallManagerCallEndReasons_NoGPRSContext = 1003, eQMIWDSCallManagerCallEndReasons_IllegalMS = 1004, eQMIWDSCallManagerCallEndReasons_IllegalME = 1005, eQMIWDSCallManagerCallEndReasons_GPRSServicesAndNonGPRSServiceNotAllowed = 1006, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowed = 1007, eQMIWDSCallManagerCallEndReasons_MSIdentityCannotBeDerivedByTheNetwork = 1008, eQMIWDSCallManagerCallEndReasons_ImplicitlyDetached = 1009, eQMIWDSCallManagerCallEndReasons_PLMNNotAllowed = 1010, eQMIWDSCallManagerCallEndReasons_LANotAllowed = 1011, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowedInThisPLMN = 1012, eQMIWDSCallManagerCallEndReasons_PDPDuplicate = 1013, eQMIWDSCallManagerCallEndReasons_UERATChange = 1014, eQMIWDSCallManagerCallEndReasons_Congestion = 1015, eQMIWDSCallManagerCallEndReasons_NoPDPContextActivated = 1016, eQMIWDSCallManagerCallEndReasons_AccessClassDSACRejection = 1017, eQMIWDSCallManagerCallEndReasons_CDGenOrBusy = 1500, eQMIWDSCallManagerCallEndReasons_CDBillOrAuth = 1501, eQMIWDSCallManagerCallEndReasons_ChangeHDR = 1502, eQMIWDSCallManagerCallEndReasons_ExitHDR = 1503, eQMIWDSCallManagerCallEndReasons_HDRNoSession = 1504, eQMIWDSCallManagerCallEndReasons_HDROrigDuringGPSFix = 1505, eQMIWDSCallManagerCallEndReasons_HDRCSTimeout = 1506, eQMIWDSCallManagerCallEndReasons_HDRReleasedByCM = 1507, eQMIWDSCallManagerCallEndReasons_NoHybridHDRService = 1510, eQMIWDSCallManagerCallEndReasons_ClientEnd = 2000, eQMIWDSCallManagerCallEndReasons_NoService = 2001, eQMIWDSCallManagerCallEndReasons_Fade = 2002, eQMIWDSCallManagerCallEndReasons_NormalRelease = 2003, eQMIWDSCallManagerCallEndReasons_AccessInProgress = 2004, eQMIWDSCallManagerCallEndReasons_AccessFail = 2005, eQMIWDSCallManagerCallEndReasons_RedirectOrHandoff = 2006, eQMIWDSCallManagerCallEndReasons_Offline = 2500, eQMIWDSCallManagerCallEndReasons_EmergencyMode = 2501, eQMIWDSCallManagerCallEndReasons_PhoneInUse = 2502, eQMIWDSCallManagerCallEndReasons_InvalidMode = 2503, eQMIWDSCallManagerCallEndReasons_InvalidSIMState = 2504, eQMIWDSCallManagerCallEndReasons_NoCollocHDR = 2505, eQMIWDSCallManagerCallEndReasons_CallControlRejected = 2506, }; // Enum to describe QMI WDS Call Types enum eQMIWDSCallTypes:UINT8 { eQMIWDSCallTypes_Laptop = 0, eQMIWDSCallTypes_Embedded = 1, }; // Enum to describe QMI WDS DUN Control Events enum eQMIWDSDUNControlEvents:UINT8 { eQMIWDSDUNControlEvents_DUNCall = 1, eQMIWDSDUNControlEvents_Entitlement = 2, eQMIWDSDUNControlEvents_SilentRedial = 3, }; // Enum to describe QMI WDS DUN Control Preferences enum eQMIWDSDUNControlPreferences:UINT8 { eQMIWDSDUNControlPreferences_RelinquishDUNControl = 0, eQMIWDSDUNControlPreferences_ExerciseDUNConrol = 1, }; // Enum to describe QMI WDS Data Call Status enum eQMIWDSDataCallStatus:UINT8 { eQMIWDSDataCallStatus_Unknown = 0, eQMIWDSDataCallStatus_Activated = 1, eQMIWDSDataCallStatus_Terminated = 2, }; // Enum to describe QMI WDS Data Call Types enum eQMIWDSDataCallTypes:UINT8 { eQMIWDSDataCallTypes_Unknown = 0, eQMIWDSDataCallTypes_Embedded = 1, eQMIWDSDataCallTypes_Tethered = 2, eQMIWDSDataCallTypes_ModemEmbedded = 3, }; // Enum to describe QMI WDS Data Mode enum eQMIWDSDataMode:UINT8 { eQMIWDSDataMode_CDMAOrHDR = 0, eQMIWDSDataMode_CDMAOnly = 1, eQMIWDSDataMode_HDROnly = 2, }; // Enum to describe QMI WDS Data Rate enum eQMIWDSDataRate:UINT8 { eQMIWDSDataRate_LowSO15Only = 0, eQMIWDSDataRate_MediumSO33PlusLowRSCH = 1, eQMIWDSDataRate_HighSO33PlusHighRSCH = 2, }; // Enum to describe QMI WDS Data System Network Types enum eQMIWDSDataSystemNetworkTypes:UINT8 { eQMIWDSDataSystemNetworkTypes_3GPP = 0, eQMIWDSDataSystemNetworkTypes_3GPP2 = 1, }; // Enum to describe QMI WDS Data Systems enum eQMIWDSDataSystems:UINT32 { eQMIWDSDataSystems_Unknown = 0, eQMIWDSDataSystems_CDMA1x = 1, eQMIWDSDataSystems_CDMA1xEVDO = 2, eQMIWDSDataSystems_GPRS = 3, eQMIWDSDataSystems_WCDMA = 4, eQMIWDSDataSystems_LTE = 5, eQMIWDSDataSystems_TDSCDMA = 6, }; // Enum to describe QMI WDS EHRPD Call End Reason enum eQMIWDSEHRPDCallEndReason:UINT16 { eQMIWDSEHRPDCallEndReason_SubsLimitedToV4 = 1, eQMIWDSEHRPDCallEndReason_SubsLimitedToV6 = 2, eQMIWDSEHRPDCallEndReason_VSNCPTimeout = 4, eQMIWDSEHRPDCallEndReason_VSNCPFailure = 5, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IGeneralError = 6, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IUnauthAPN = 7, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNLimit = 8, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2INoPDNGW = 9, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWUnreach = 10, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWRejected = 11, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IInsufficientParam = 12, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IResourceUnavailable = 13, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IAdminProhibited = 14, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNIDInUse = 15, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2ISubscriberLimitation = 16, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNExistsForAPN = 17, }; // Enum to describe QMI WDS EMBMS Error Codes enum eQMIWDSEMBMSErrorCodes:UINT16 { eQMIWDSEMBMSErrorCodes_NotSupported = 108, eQMIWDSEMBMSErrorCodes_ActivationInProgress = 111, eQMIWDSEMBMSErrorCodes_Invalid = 124, eQMIWDSEMBMSErrorCodes_DeactivationInProgress = 203, }; // Enum to describe QMI WDS EMBMS List Types enum eQMIWDSEMBMSListTypes:UINT8 { eQMIWDSEMBMSListTypes_Active = 0, eQMIWDSEMBMSListTypes_Available = 1, eQMIWDSEMBMSListTypes_OOSWarning = 2, }; // Enum to describe QMI WDS EMBMS Operation Status enum eQMIWDSEMBMSOperationStatus:UINT32 { eQMIWDSEMBMSOperationStatus_Success = 0, eQMIWDSEMBMSOperationStatus_RadioConfigFailure = 65536, eQMIWDSEMBMSOperationStatus_ChannelUnavailable = 65537, eQMIWDSEMBMSOperationStatus_EMBMBSNotEnabled = 65538, eQMIWDSEMBMSOperationStatus_OutOfCoverage = 65539, }; // Enum to describe QMI WDS Extended Error Code enum eQMIWDSExtendedErrorCode:UINT16 { eQMIWDSExtendedErrorCode_Failure = 1, eQMIWDSExtendedErrorCode_InvalidHandle = 2, eQMIWDSExtendedErrorCode_InvalidOperation = 3, eQMIWDSExtendedErrorCode_InvalidProfileType = 4, eQMIWDSExtendedErrorCode_InvalidProfileNumber = 5, eQMIWDSExtendedErrorCode_InvalidIdentifier = 6, eQMIWDSExtendedErrorCode_InvalidArgument = 7, eQMIWDSExtendedErrorCode_NotInitialized = 8, eQMIWDSExtendedErrorCode_InvalidLength = 9, eQMIWDSExtendedErrorCode_ListEnd = 10, eQMIWDSExtendedErrorCode_InvalidSubscriptionID = 11, eQMIWDSExtendedErrorCode_InvalidProfileFamily = 12, eQMIWDSExtendedErrorCode_3GPPInvalidProfileFamily = 4097, eQMIWDSExtendedErrorCode_3GPPAccessError = 4098, eQMIWDSExtendedErrorCode_3GPPContextNotDefined = 4099, eQMIWDSExtendedErrorCode_3GPPValidFlagNotSet = 4100, eQMIWDSExtendedErrorCode_3GPPReadOnlyFlagSet = 4101, eQMIWDSExtendedErrorCode_3GPPErrorMaxProfileNumber = 4102, eQMIWDSExtendedErrorCode_3GPP2ErrorInvalidIdentifierForProfile = 4353, eQMIWDSExtendedErrorCode_3GPP2ErrorProfileLimitReached = 4354, }; // Enum to describe QMI WDS Extended Tech Prefs enum eQMIWDSExtendedTechPrefs:UINT16 { eQMIWDSExtendedTechPrefs_CDMA = 32769, eQMIWDSExtendedTechPrefs_UMTS = 32772, eQMIWDSExtendedTechPrefs_EPC = 34944, eQMIWDSExtendedTechPrefs_EMBMS = 34946, eQMIWDSExtendedTechPrefs_ModemLinkLocal = 34952, }; // Enum to describe QMI WDS IP Families enum eQMIWDSIPFamilies:UINT8 { eQMIWDSIPFamilies_IPv4 = 4, eQMIWDSIPFamilies_IPv6 = 6, eQMIWDSIPFamilies_Unspecified = 8, }; // Enum to describe QMI WDS IP Version enum eQMIWDSIPVersion:UINT8 { eQMIWDSIPVersion_IPv4 = 4, eQMIWDSIPVersion_IPv6 = 6, }; // Enum to describe QMI WDS IPv6 Call End Reason enum eQMIWDSIPv6CallEndReason:UINT16 { eQMIWDSIPv6CallEndReason_PrefixUnavailable = 1, eQMIWDSIPv6CallEndReason_IPv6HRPDDisabled = 2, }; // Enum to describe QMI WDS Internal Call End Reasons enum eQMIWDSInternalCallEndReasons:UINT16 { eQMIWDSInternalCallEndReasons_Internal = 201, eQMIWDSInternalCallEndReasons_CallEnded = 202, eQMIWDSInternalCallEndReasons_InternalUnknownCauseCode = 203, eQMIWDSInternalCallEndReasons_UnknownCauseCode = 204, eQMIWDSInternalCallEndReasons_CloseInProgress = 205, eQMIWDSInternalCallEndReasons_NWInitiatedTermination = 206, eQMIWDSInternalCallEndReasons_AppPreempted = 207, eQMIWDSInternalCallEndReasons_PDNIPv4CallDisallowed = 208, eQMIWDSInternalCallEndReasons_PDNIPv4CallThrottled = 209, eQMIWDSInternalCallEndReasons_PDNIPv6CallDisallowed = 210, eQMIWDSInternalCallEndReasons_ModemRestart = 212, eQMIWDSInternalCallEndReasons_PDPPPPNotSupported = 213, eQMIWDSInternalCallEndReasons_UnpreferredRAT = 214, eQMIWDSInternalCallEndReasons_PhysicalLinkCloseInProgress = 215, eQMIWDSInternalCallEndReasons_APNPendingHandover = 216, eQMIWDSInternalCallEndReasons_ProfileBearerIncompatible = 217, eQMIWDSInternalCallEndReasons_MMGDSICardEvent = 218, eQMIWDSInternalCallEndReasons_LPMOrPowerDown = 219, eQMIWDSInternalCallEndReasons_APNDisabled = 220, eQMIWDSInternalCallEndReasons_MPITExpired = 221, eQMIWDSInternalCallEndReasons_IPv6AddressTransferFailed = 222, eQMIWDSInternalCallEndReasons_TRATSwapFailed = 223, }; // Enum to describe QMI WDS LTE IP Types enum eQMIWDSLTEIPTypes:UINT8 { eQMIWDSLTEIPTypes_IPv4 = 0, eQMIWDSLTEIPTypes_IPv6 = 1, eQMIWDSLTEIPTypes_IPv4OrIPv6 = 2, }; // Enum to describe QMI WDS Mobile IP Call End Reasons enum eQMIWDSMobileIPCallEndReasons:UINT16 { eQMIWDSMobileIPCallEndReasons_FAUnspecified = 64, eQMIWDSMobileIPCallEndReasons_FAAdministrativelyProhibited = 65, eQMIWDSMobileIPCallEndReasons_FAInsufficientResources = 66, eQMIWDSMobileIPCallEndReasons_FAMobileNodeAuthenticationFailure = 67, eQMIWDSMobileIPCallEndReasons_FAHAAuthenticationFailure = 68, eQMIWDSMobileIPCallEndReasons_FARequestedLifetimeTooLong = 69, eQMIWDSMobileIPCallEndReasons_FAMalformedRequest = 70, eQMIWDSMobileIPCallEndReasons_FAMalformedReply = 71, eQMIWDSMobileIPCallEndReasons_FAEncapsulationUnavailable = 72, eQMIWDSMobileIPCallEndReasons_FAVJHCUnavailable = 73, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelUnavailable = 74, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelIsMandatoryAndTBitIsNotSet = 75, eQMIWDSMobileIPCallEndReasons_FADeliveryStyleNotSupported = 79, eQMIWDSMobileIPCallEndReasons_FAMissingNAI = 97, eQMIWDSMobileIPCallEndReasons_FAMissingHA = 98, eQMIWDSMobileIPCallEndReasons_FAMissingHomeAddress = 99, eQMIWDSMobileIPCallEndReasons_FAUnknownChallenge = 104, eQMIWDSMobileIPCallEndReasons_FAMissingChallenge = 105, eQMIWDSMobileIPCallEndReasons_FAStaleChallenge = 106, eQMIWDSMobileIPCallEndReasons_HAReasonUnspecified = 128, eQMIWDSMobileIPCallEndReasons_HAAdministrativelyProhibited = 129, eQMIWDSMobileIPCallEndReasons_HAInsufficientResources = 130, eQMIWDSMobileIPCallEndReasons_HAMobileNodeAuthenticationFailure = 131, eQMIWDSMobileIPCallEndReasons_HAFAAuthenticationFailure = 132, eQMIWDSMobileIPCallEndReasons_HARegistrationIDMismatch = 133, eQMIWDSMobileIPCallEndReasons_HAMalformedRequest = 134, eQMIWDSMobileIPCallEndReasons_HAUnknownHAAddress = 136, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelUnavailable = 137, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelIsMandatoryAndTBitIsNotSet = 138, eQMIWDSMobileIPCallEndReasons_HAEncapsulationUnavailable = 139, eQMIWDSMobileIPCallEndReasons_Unknown = 65535, }; // Enum to describe QMI WDS Network Types enum eQMIWDSNetworkTypes:UINT8 { eQMIWDSNetworkTypes_Unknown = 0, eQMIWDSNetworkTypes_CDMA = 1, eQMIWDSNetworkTypes_UMTS = 2, }; // Enum to describe QMI WDS OOS Warning Reasons enum eQMIWDSOOSWarningReasons:UINT32 { eQMIWDSOOSWarningReasons_UnicastOOS = 0, eQMIWDSOOSWarningReasons_MulticastOOS = 1, eQMIWDSOOSWarningReasons_Cleared = 2, }; // Enum to describe QMI WDS PDN Type enum eQMIWDSPDNType:UINT8 { eQMIWDSPDNType_IPv4PDNType = 0, eQMIWDSPDNType_IPv6PDNType = 1, eQMIWDSPDNType_IPv4orIPv6PDNType = 2, eQMIWDSPDNType_UnspecifiedPDNType = 3, }; // Enum to describe QMI WDS PDP Access Control Flag enum eQMIWDSPDPAccessControlFlag:UINT8 { eQMIWDSPDPAccessControlFlag_PDPAccessControlNone = 0, eQMIWDSPDPAccessControlFlag_PDPAccessControlReject = 1, eQMIWDSPDPAccessControlFlag_PDPAccessControlPermission = 2, }; // Enum to describe QMI WDS PDP Data Compression Type enum eQMIWDSPDPDataCompressionType:UINT8 { eQMIWDSPDPDataCompressionType_Off = 0, eQMIWDSPDPDataCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPDataCompressionType_V42BIS = 2, eQMIWDSPDPDataCompressionType_V44 = 3, }; // Enum to describe QMI WDS PDP Header Compression Type enum eQMIWDSPDPHeaderCompressionType:UINT8 { eQMIWDSPDPHeaderCompressionType_Off = 0, eQMIWDSPDPHeaderCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPHeaderCompressionType_RFC1144 = 2, eQMIWDSPDPHeaderCompressionType_RFC2507 = 3, eQMIWDSPDPHeaderCompressionType_RFC3095 = 4, }; // Enum to describe QMI WDS PPP Call End Reason enum eQMIWDSPPPCallEndReason:UINT16 { eQMIWDSPPPCallEndReason_Timeout = 1, eQMIWDSPPPCallEndReason_AuthenticationFailed = 2, eQMIWDSPPPCallEndReason_OptionMismatch = 3, eQMIWDSPPPCallEndReason_PAPFailure = 31, eQMIWDSPPPCallEndReason_CHAPFailure = 32, eQMIWDSPPPCallEndReason_Unknown = 65535, }; // Enum to describe QMI WDS Profile Family enum eQMIWDSProfileFamily:UINT8 { eQMIWDSProfileFamily_Embedded = 0, eQMIWDSProfileFamily_TetheredSocketsFamily = 1, }; // Enum to describe QMI WDS Profile Param ID enum eQMIWDSProfileParamID:UINT32 { eQMIWDSProfileParamID_UMTSRequestedQoS = 23, eQMIWDSProfileParamID_UMTSMinimumQoS = 24, eQMIWDSProfileParamID_GPRSRequestedQoS = 25, eQMIWDSProfileParamID_GPRSMinimumQoS = 26, eQMIWDSProfileParamID_TFTFilterID1 = 50, eQMIWDSProfileParamID_TFTFilterID2 = 51, }; // Enum to describe QMI WDS QoS Class Identifier enum eQMIWDSQoSClassIdentifier:UINT8 { eQMIWDSQoSClassIdentifier_NetworkAssignQCI = 0, eQMIWDSQoSClassIdentifier_GuaranteedBitrate1 = 1, eQMIWDSQoSClassIdentifier_GuaranteedBitrate2 = 2, eQMIWDSQoSClassIdentifier_GuaranteedBitrate3 = 3, eQMIWDSQoSClassIdentifier_GuaranteedBitrate4 = 4, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate5 = 5, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate6 = 6, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate7 = 7, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate8 = 8, }; // Enum to describe QMI WDS SIP/MIP Call Types enum eQMIWDSSIPMIPCallTypes:UINT8 { eQMIWDSSIPMIPCallTypes_NotUp = 0, eQMIWDSSIPMIPCallTypes_SIPUp = 1, eQMIWDSSIPMIPCallTypes_MIPUp = 2, }; // Enum to describe QMI WDS Slot Cycle Set Results enum eQMIWDSSlotCycleSetResults:UINT8 { eQMIWDSSlotCycleSetResults_Succcess = 0, eQMIWDSSlotCycleSetResults_FailureRequestRejected = 1, eQMIWDSSlotCycleSetResults_FailureRequestFailedTX = 2, eQMIWDSSlotCycleSetResults_FailureNotSupported = 3, eQMIWDSSlotCycleSetResults_FailureNoNetwork = 4, }; // Enum to describe QMI WDS Tethered Call Types enum eQMIWDSTetheredCallTypes:UINT8 { eQMIWDSTetheredCallTypes_NonTethered = 0, eQMIWDSTetheredCallTypes_RmNet = 1, eQMIWDSTetheredCallTypes_DUN = 2, }; // Enum to describe QMI WMS ACK Failure Cause enum eQMIWMSACKFailureCause:UINT8 { eQMIWMSACKFailureCause_NoNetworkResponse = 0, eQMIWMSACKFailureCause_NetworkReleasedLink = 1, eQMIWMSACKFailureCause_NotSent = 2, }; // Enum to describe QMI WMS CDMA Service Options enum eQMIWMSCDMAServiceOptions:UINT8 { eQMIWMSCDMAServiceOptions_Automatic = 0, eQMIWMSCDMAServiceOptions_SO6 = 6, eQMIWMSCDMAServiceOptions_SO14 = 14, }; // Enum to describe QMI WMS Cause Codes enum eQMIWMSCauseCodes { eQMIWMSCauseCodes_AddressVacant = 0, eQMIWMSCauseCodes_AddressTranslation = 1, eQMIWMSCauseCodes_NetworkResourceShortage = 2, eQMIWMSCauseCodes_NetworkFailure = 3, eQMIWMSCauseCodes_InvalidTeleserviceID = 4, eQMIWMSCauseCodes_NetworkOther = 5, eQMIWMSCauseCodes_NoPageResponse = 32, eQMIWMSCauseCodes_DestinationBusy = 33, eQMIWMSCauseCodes_DestinationNoACK = 34, eQMIWMSCauseCodes_DestinationResourceShortage = 35, eQMIWMSCauseCodes_DeliveryPostponed = 36, eQMIWMSCauseCodes_DestinationOutOfService = 37, eQMIWMSCauseCodes_DestinationNotAtAddress = 38, eQMIWMSCauseCodes_DestinationOther = 39, eQMIWMSCauseCodes_RadioResourceShortage = 64, eQMIWMSCauseCodes_RadioIncompatibility = 65, eQMIWMSCauseCodes_RadioOther = 66, eQMIWMSCauseCodes_Encoding = 96, eQMIWMSCauseCodes_SMSOriginationDenied = 97, eQMIWMSCauseCodes_SMSDestinationDenied = 98, eQMIWMSCauseCodes_SupplementarySErviceNotSupported = 99, eQMIWMSCauseCodes_SMSNotSupported = 100, eQMIWMSCauseCodes_MissingExpectedParameter = 101, eQMIWMSCauseCodes_MissingMandatoryParameter = 102, eQMIWMSCauseCodes_UnrecognizedParameterValue = 103, eQMIWMSCauseCodes_UnexpectedParameterValue = 104, eQMIWMSCauseCodes_UserDataSizeError = 105, eQMIWMSCauseCodes_GeneralOther = 106, }; // Enum to describe QMI WMS Delivery Failures enum eQMIWMSDeliveryFailures:UINT8 { eQMIWMSDeliveryFailures_BlockedByCallControl = 0, }; // Enum to describe QMI WMS Error Classes enum eQMIWMSErrorClasses:UINT8 { eQMIWMSErrorClasses_Temporary = 0, eQMIWMSErrorClasses_Permanent = 1, }; // Enum to describe QMI WMS Error Classes 2 enum eQMIWMSErrorClasses2:UINT8 { eQMIWMSErrorClasses2_Temporary = 2, eQMIWMSErrorClasses2_Permanent = 3, }; // Enum to describe QMI WMS GSM/WCDMA Domains enum eQMIWMSGSMWCDMADomains:UINT8 { eQMIWMSGSMWCDMADomains_CSPreferred = 0, eQMIWMSGSMWCDMADomains_PSPreferred = 1, eQMIWMSGSMWCDMADomains_CSOnly = 2, eQMIWMSGSMWCDMADomains_PSOnly = 3, }; // Enum to describe QMI WMS LTE Domains enum eQMIWMSLTEDomains:UINT8 { eQMIWMSLTEDomains_None = 0, eQMIWMSLTEDomains_IMS = 1, }; // Enum to describe QMI WMS Language enum eQMIWMSLanguage:UINT16 { eQMIWMSLanguage_Unknown = 0, eQMIWMSLanguage_English = 1, eQMIWMSLanguage_French = 2, eQMIWMSLanguage_Spanish = 3, eQMIWMSLanguage_Japanese = 4, eQMIWMSLanguage_Korean = 5, eQMIWMSLanguage_Chinese = 6, eQMIWMSLanguage_Hebrew = 7, }; // Enum to describe QMI WMS Message Classes enum eQMIWMSMessageClasses:UINT8 { eQMIWMSMessageClasses_Class0 = 0, eQMIWMSMessageClasses_Class1 = 1, eQMIWMSMessageClasses_Class2 = 2, eQMIWMSMessageClasses_Class3 = 3, eQMIWMSMessageClasses_ClassNone = 4, eQMIWMSMessageClasses_ClassCDMA = 5, }; // Enum to describe QMI WMS Message Delivery Failure Type enum eQMIWMSMessageDeliveryFailureType:UINT8 { eQMIWMSMessageDeliveryFailureType_Temporary = 0, eQMIWMSMessageDeliveryFailureType_Permanent = 1, }; // Enum to describe QMI WMS Message Formats enum eQMIWMSMessageFormats:UINT8 { eQMIWMSMessageFormats_CDMA = 0, eQMIWMSMessageFormats_AnalogCLIUnsupported = 1, eQMIWMSMessageFormats_AnalogVoiceMailUnsupported = 2, eQMIWMSMessageFormats_AnalogWMSUnsupported = 3, eQMIWMSMessageFormats_AnalogAWIWMSUnsupported = 4, eQMIWMSMessageFormats_MWIUnsupported = 5, eQMIWMSMessageFormats_GSMWCDMAPP = 6, eQMIWMSMessageFormats_GSMWCDMABC = 7, eQMIWMSMessageFormats_MWI = 8, }; // Enum to describe QMI WMS Message Protocols enum eQMIWMSMessageProtocols:UINT8 { eQMIWMSMessageProtocols_CDMA = 0, eQMIWMSMessageProtocols_GSMWCDMAUnsupported = 1, }; // Enum to describe QMI WMS Message Tags enum eQMIWMSMessageTags:UINT8 { eQMIWMSMessageTags_MTRead = 0, eQMIWMSMessageTags_MTNotRead = 1, eQMIWMSMessageTags_MOSend = 2, eQMIWMSMessageTags_MONotSent = 3, }; // Enum to describe QMI WMS Message Types enum eQMIWMSMessageTypes:UINT8 { eQMIWMSMessageTypes_PointToPoint = 0, eQMIWMSMessageTypes_Broadcast = 1, }; // Enum to describe QMI WMS Network Registration Status enum eQMIWMSNetworkRegistrationStatus:UINT8 { eQMIWMSNetworkRegistrationStatus_NoService = 0, eQMIWMSNetworkRegistrationStatus_InProgress = 1, eQMIWMSNetworkRegistrationStatus_Failed = 2, eQMIWMSNetworkRegistrationStatus_LimitedService = 3, eQMIWMSNetworkRegistrationStatus_FullService = 4, }; // Enum to describe QMI WMS Notification Type enum eQMIWMSNotificationType:UINT8 { eQMIWMSNotificationType_Primary = 0, eQMIWMSNotificationType_SecondaryGSM = 1, eQMIWMSNotificationType_SecondaryUMTS = 2, }; // Enum to describe QMI WMS Protocol Identifier Data enum eQMIWMSProtocolIdentifierData:UINT8 { eQMIWMSProtocolIdentifierData_Default = 0, eQMIWMSProtocolIdentifierData_Implicit = 32, eQMIWMSProtocolIdentifierData_Telex = 33, eQMIWMSProtocolIdentifierData_G3Fax = 34, eQMIWMSProtocolIdentifierData_G4Fax = 35, eQMIWMSProtocolIdentifierData_VoicePhone = 36, eQMIWMSProtocolIdentifierData_Ermes = 37, eQMIWMSProtocolIdentifierData_NATPaging = 38, eQMIWMSProtocolIdentifierData_Videotex = 39, eQMIWMSProtocolIdentifierData_TeltexUnspecified = 40, eQMIWMSProtocolIdentifierData_TeltexPSPDN = 41, eQMIWMSProtocolIdentifierData_TeltexCSPDN = 42, eQMIWMSProtocolIdentifierData_TeltexPSTN = 43, eQMIWMSProtocolIdentifierData_TeltexISDN = 44, eQMIWMSProtocolIdentifierData_UCI = 45, eQMIWMSProtocolIdentifierData_MessageHandling = 48, eQMIWMSProtocolIdentifierData_X400 = 49, eQMIWMSProtocolIdentifierData_InternetEMail = 50, eQMIWMSProtocolIdentifierData_SCSpecific1 = 56, eQMIWMSProtocolIdentifierData_SCSpecific2 = 57, eQMIWMSProtocolIdentifierData_SCSpecific3 = 58, eQMIWMSProtocolIdentifierData_SCSpecific4 = 59, eQMIWMSProtocolIdentifierData_SCSpecific5 = 60, eQMIWMSProtocolIdentifierData_SCSpecific6 = 61, eQMIWMSProtocolIdentifierData_SCSpecific7 = 62, eQMIWMSProtocolIdentifierData_GSMUMTS = 63, eQMIWMSProtocolIdentifierData_SMType0 = 64, eQMIWMSProtocolIdentifierData_ReplaceSM1 = 65, eQMIWMSProtocolIdentifierData_ReplaceSM2 = 66, eQMIWMSProtocolIdentifierData_ReplaceSM3 = 67, eQMIWMSProtocolIdentifierData_ReplaceSM4 = 68, eQMIWMSProtocolIdentifierData_ReplaceSM5 = 69, eQMIWMSProtocolIdentifierData_ReplaceSM6 = 70, eQMIWMSProtocolIdentifierData_ReplaceSM7 = 71, eQMIWMSProtocolIdentifierData_ReturnCall = 95, eQMIWMSProtocolIdentifierData_ANSI136RData = 124, eQMIWMSProtocolIdentifierData_MEDataDownload = 125, eQMIWMSProtocolIdentifierData_MEDepersonalizationShortMessage = 126, eQMIWMSProtocolIdentifierData_SIMDataDownload = 127, }; // Enum to describe QMI WMS RP Cause Codes enum eQMIWMSRPCauseCodes { eQMIWMSRPCauseCodes_UnassignedNumber = 1, eQMIWMSRPCauseCodes_OperatorDeterminedBarring = 8, eQMIWMSRPCauseCodes_CallBarred = 10, eQMIWMSRPCauseCodes_Reserved = 11, eQMIWMSRPCauseCodes_ShortMessageTransferRejected = 21, eQMIWMSRPCauseCodes_MemoryCapacityExceeded = 22, eQMIWMSRPCauseCodes_DestinationOutOfOrder = 27, eQMIWMSRPCauseCodes_UnidentifiedSubscriber = 28, eQMIWMSRPCauseCodes_FacilityRejected = 29, eQMIWMSRPCauseCodes_UnknownSubscriber = 30, eQMIWMSRPCauseCodes_NetworkOutOfOrder = 38, eQMIWMSRPCauseCodes_TemporaryFailure = 41, eQMIWMSRPCauseCodes_Congestion = 42, eQMIWMSRPCauseCodes_UnspecifiedResourcesUnavailable = 47, eQMIWMSRPCauseCodes_RequestedFacilityNotSubscribed = 50, eQMIWMSRPCauseCodes_RequestedFacilityNotImplemented = 69, eQMIWMSRPCauseCodes_InvalidShortMessageTransferValue = 81, eQMIWMSRPCauseCodes_SemanticallyIncorrectMessage = 95, eQMIWMSRPCauseCodes_InvalidManadatoryInfo = 96, eQMIWMSRPCauseCodes_MessageTypeNotImplemented = 97, eQMIWMSRPCauseCodes_MessageNotCompatibleWithSMS = 98, eQMIWMSRPCauseCodes_InfoElementNotImplemented = 99, eQMIWMSRPCauseCodes_UnspecifiedProtocolError = 111, eQMIWMSRPCauseCodes_UnspecifiedInterworking = 127, }; // Enum to describe QMI WMS Receipt Actions enum eQMIWMSReceiptActions:UINT8 { eQMIWMSReceiptActions_Discard = 0, eQMIWMSReceiptActions_StoreAndNotify = 1, eQMIWMSReceiptActions_TransferOnly = 2, eQMIWMSReceiptActions_TransfterAndAcknowledge = 3, }; // Enum to describe QMI WMS Route Values enum eQMIWMSRouteValues:UINT8 { eQMIWMSRouteValues_Discard = 0, eQMIWMSRouteValues_StoreAndNotify = 1, eQMIWMSRouteValues_TransferOnly = 2, eQMIWMSRouteValues_TransferAndAcknowledge = 3, eQMIWMSRouteValues_Unknown = 255, }; // Enum to describe QMI WMS SMS Call Status enum eQMIWMSSMSCallStatus:UINT8 { eQMIWMSSMSCallStatus_Incoming = 0, eQMIWMSSMSCallStatus_Connected = 1, eQMIWMSSMSCallStatus_Aborted = 2, eQMIWMSSMSCallStatus_Disconnected = 3, eQMIWMSSMSCallStatus_Connecting = 4, }; // Enum to describe QMI WMS SMS Message Mode enum eQMIWMSSMSMessageMode:UINT8 { eQMIWMSSMSMessageMode_GSMWCDMA = 1, }; // Enum to describe QMI WMS Service Categories enum eQMIWMSServiceCategories { eQMIWMSServiceCategories_Unknown = 0, eQMIWMSServiceCategories_EmergencyBroadcast = 1, eQMIWMSServiceCategories_Administrative = 2, eQMIWMSServiceCategories_Maintenance = 3, eQMIWMSServiceCategories_GeneralNewsLocal = 4, eQMIWMSServiceCategories_GeneralNewsRegional = 5, eQMIWMSServiceCategories_GeneralNewsNational = 6, eQMIWMSServiceCategories_GeneralNewsInternational = 7, eQMIWMSServiceCategories_BusinessNewsLocal = 8, eQMIWMSServiceCategories_BusinessNewsRegional = 9, eQMIWMSServiceCategories_BusinessNewsNational = 10, eQMIWMSServiceCategories_BusinessNewsInternational = 11, eQMIWMSServiceCategories_SportsNewsLocal = 12, eQMIWMSServiceCategories_SportsNewsRegional = 13, eQMIWMSServiceCategories_SportsNewsNational = 14, eQMIWMSServiceCategories_SportsNewsInternational = 15, eQMIWMSServiceCategories_EntertainmentNewsLocal = 16, eQMIWMSServiceCategories_EntertainmentNewsRegional = 17, eQMIWMSServiceCategories_EntertainmentNewsNational = 18, eQMIWMSServiceCategories_EntertainmentNewsInternational = 19, eQMIWMSServiceCategories_LocalWeather = 20, eQMIWMSServiceCategories_AreaTrafficReports = 21, eQMIWMSServiceCategories_LocalAirplaneFlightSchedules = 22, eQMIWMSServiceCategories_Restaurants = 23, eQMIWMSServiceCategories_Lodgings = 24, eQMIWMSServiceCategories_RetailDirectory = 25, eQMIWMSServiceCategories_Advertisements = 26, eQMIWMSServiceCategories_StockQuotes = 27, eQMIWMSServiceCategories_EmploymentOpportunities = 28, eQMIWMSServiceCategories_MedicalHealthHospitals = 29, eQMIWMSServiceCategories_TechnologyNews = 30, eQMIWMSServiceCategories_Multicategory = 31, eQMIWMSServiceCategories_CardApplicationToolkitProtocolTeleservice = 32, eQMIWMSServiceCategories_PresidentialLevelAlert = 4096, eQMIWMSServiceCategories_ExtremeThreattoLifeandProperty = 4097, eQMIWMSServiceCategories_SevereThreattoLifeandProperty = 4098, eQMIWMSServiceCategories_AMBERChildAbductionEmergency = 4099, eQMIWMSServiceCategories_CMASTestMessage = 4100, }; // Enum to describe QMI WMS Service Ready Status enum eQMIWMSServiceReadyStatus:UINT32 { eQMIWMSServiceReadyStatus_SMSServiceNotReady = 0, eQMIWMSServiceReadyStatus_3GPPSMSServiceReady = 1, eQMIWMSServiceReadyStatus_3GPP2SMSServiceReady = 2, eQMIWMSServiceReadyStatus_3GPPAnd3GPP2SMSServicesReady = 3, }; // Enum to describe QMI WMS Storage Types enum eQMIWMSStorageTypes:UINT8 { eQMIWMSStorageTypes_UIM = 0, eQMIWMSStorageTypes_NV = 1, eQMIWMSStorageTypes_Unknown = 255, }; // Enum to describe QMI WMS Subscription Type enum eQMIWMSSubscriptionType:UINT8 { eQMIWMSSubscriptionType_PrimarySubscription = 0, eQMIWMSSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI WMS TP Cause Codes enum eQMIWMSTPCauseCodes { eQMIWMSTPCauseCodes_TelematicInterworkingNotSupported = 128, eQMIWMSTPCauseCodes_ShortMessageType0NotSupported = 129, eQMIWMSTPCauseCodes_CannotReplaceShortMessage = 130, eQMIWMSTPCauseCodes_UnspecifiedPIDError = 143, eQMIWMSTPCauseCodes_DataCodingSchemeNotSupported = 144, eQMIWMSTPCauseCodes_MessageClassNotSupported = 145, eQMIWMSTPCauseCodes_UnspecifiedDCSError = 159, eQMIWMSTPCauseCodes_CommandCannotBeActioned = 160, eQMIWMSTPCauseCodes_CommandUnsupported = 161, eQMIWMSTPCauseCodes_UnspecifiedCommandError = 175, eQMIWMSTPCauseCodes_TPDUNotSupported = 176, eQMIWMSTPCauseCodes_SCBusy = 192, eQMIWMSTPCauseCodes_NoSCSubscription = 193, eQMIWMSTPCauseCodes_SCSystemFailure = 194, eQMIWMSTPCauseCodes_InvalidSMEAddress = 195, eQMIWMSTPCauseCodes_DestinationSMEBarred = 196, eQMIWMSTPCauseCodes_SMRejectedOrDuplicate = 197, eQMIWMSTPCauseCodes_VPFNotSupported = 198, eQMIWMSTPCauseCodes_VPNotSupported = 199, eQMIWMSTPCauseCodes_SIMSMSStorageFull = 208, eQMIWMSTPCauseCodes_NoSIMSMSStorageCapability = 209, eQMIWMSTPCauseCodes_ErrorInMS = 210, eQMIWMSTPCauseCodes_MemoryCapacityExceeded = 211, eQMIWMSTPCauseCodes_SIMApplicationToolkitBusy = 212, eQMIWMSTPCauseCodes_SIMDataDownloadError = 213, eQMIWMSTPCauseCodes_UnspecifiedError = 255, }; // Enum to describe QMI WMS Transport Capability enum eQMIWMSTransportCapability:UINT8 { eQMIWMSTransportCapability_CDMA = 0, eQMIWMSTransportCapability_GW = 1, }; // Enum to describe QMI WMS Transport Type enum eQMIWMSTransportType:UINT8 { eQMIWMSTransportType_IMS = 0, }; // Enum to describe QMI WMS Waiting Message Type enum eQMIWMSWaitingMessageType:UINT8 { eQMIWMSWaitingMessageType_Voicemail = 0, eQMIWMSWaitingMessageType_Fax = 1, eQMIWMSWaitingMessageType_Email = 2, eQMIWMSWaitingMessageType_Other = 3, eQMIWMSWaitingMessageType_Videomail = 4, }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiConnectionMgmt/GobiConnectionMgmtAPIStructs.h000077500000000000000000025124741455567757300313250ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIStructs.h DESCRIPTION: Declaration of the Gobi API structures Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Include the enumerations #include "GobiConnectionMgmtAPIEnums.h" #pragma pack( push, 1 ) // Structure to represent a QMI (control/service) content struct sQMIRawContentHeader { BYTE mTypeID; WORD mLength; // This array must be the size specified by mLength // BYTE mValue[1]; }; // Structure to describe TLV 0x02, the Result Code // It is common for all Responses struct sResultCode { eQMIResults mQMIResult; eQMIErrors mQMIError; }; // Structure to describe TLV 0x01 for QMI LOC, the status // It is common for QMI LOC indications above 0x0032 struct sLOCIndication_Status { eQMILOCStatus mStatus; }; // Structure to describe request TLV 0x10 for WDSSetEventReport() struct sWDSSetEventReportRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe request TLV 0x11 for WDSSetEventReport() struct sWDSSetEventReportRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x13 for WDSSetEventReport() struct sWDSSetEventReportRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x14 for WDSSetEventReport() struct sWDSSetEventReportRequest_MIPStatusIndicator { INT8 mReportMIPStatus; }; // Structure to describe request TLV 0x15 for WDSSetEventReport() struct sWDSSetEventReportRequest_CurrentDataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x17 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataCallStatusIndicator { INT8 mReportDataCallStatus; }; // Structure to describe request TLV 0x18 for WDSSetEventReport() struct sWDSSetEventReportRequest_PreferredDataSystemIndicator { INT8 mReportPreferredDataSystem; }; // Structure to describe request TLV 0x19 for WDSSetEventReport() struct sWDSSetEventReportRequest_EVDOPMChangeIndicator { INT8 mReportEVDOPageMonitorPeriodChange; }; // Structure to describe request TLV 0x1A for WDSSetEventReport() struct sWDSSetEventReportRequest_DataSystemsIndicator { INT8 mReportDataSystems; }; // Structure to describe request TLV 0x1B for WDSSetEventReport() struct sWDSSetEventReportRequest_UplinkFlowControlIndicator { INT8 mReportUplinkFlowControl; }; // Structure to describe indication TLV 0x10 for WDS EventReport struct sWDSEventReportIndication_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe indication TLV 0x11 for WDS EventReport struct sWDSEventReportIndication_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe indication TLV 0x12 for WDS EventReport struct sWDSEventReportIndication_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe indication TLV 0x13 for WDS EventReport struct sWDSEventReportIndication_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe indication TLV 0x14 for WDS EventReport struct sWDSEventReportIndication_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe indication TLV 0x15 for WDS EventReport struct sWDSEventReportIndication_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe indication TLV 0x16 for WDS EventReport struct sWDSEventReportIndication_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe indication TLV 0x17 for WDS EventReport struct sWDSEventReportIndication_DataBearerTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x18 for WDS EventReport struct sWDSEventReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x19 for WDS EventReport struct sWDSEventReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x1A for WDS EventReport struct sWDSEventReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x1B for WDS EventReport struct sWDSEventReportIndication_MIPStatus { UINT8 mMIPStatus; }; // Structure to describe indication TLV 0x1D for WDS EventReport struct sWDSEventReportIndication_CurrentDataBearerTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe indication TLV 0x1F for WDS EventReport struct sWDSEventReportIndication_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe indication TLV 0x20 for WDS EventReport struct sWDSEventReportIndication_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe indication TLV 0x22 for WDS EventReport struct sWDSEventReportIndication_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe indication TLV 0x23 for WDS EventReport struct sWDSEventReportIndication_EVDOPageMonitorPeriodChange { UINT8 mEVDOPageMonitorPeriodChange; INT8 mEVDOForceLongSleep; }; // Structure to describe indication TLV 0x24 for WDS EventReport struct sWDSEventReportIndication_DataSystems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe indication TLV 0x25 for WDS EventReport struct sWDSEventReportIndication_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe indication TLV 0x26 for WDS EventReport struct sWDSEventReportIndication_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe indication TLV 0x27 for WDS EventReport struct sWDSEventReportIndication_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe request TLV 0x01 for WDSAbort() struct sWDSAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for WDSSetIndication() struct sWDSSetIndicationRequest_TMGIList { INT8 mReportEMBMSTMGIList; }; // Structure to describe request TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ContextAPNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x17 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x18 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x19 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x30 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_TechnologyPreference { bool mEnable3GPP:1; bool mEnable3GPP2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x31 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPPProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x32 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPP2ProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x33 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x34 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ExtendedTechnologyPreference { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe request TLV 0x35 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_CallType { eQMIWDSCallTypes mCallType; }; // Structure to describe response TLV 0x01 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe response TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe request TLV 0x10 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_Autoconnect { INT8 mAutoconnectOff; }; // Structure to describe response TLV 0x01 for WDSGetPacketServiceStatus() struct sWDSGetPacketServiceStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x01 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; INT8 mReconfigureRequired; }; // Structure to describe indication TLV 0x10 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x11 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe indication TLV 0x12 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe indication TLV 0x13 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnology; }; // Structure to describe response TLV 0x01 for WDSGetChannelRates() struct sWDSGetChannelRatesResponse_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe request TLV 0x01 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsRequest_PacketStatsMask { bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe response TLV 0x10 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe response TLV 0x11 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe response TLV 0x12 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe response TLV 0x13 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe response TLV 0x14 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe response TLV 0x15 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe response TLV 0x19 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x1A for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x1B for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x1C for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x1D for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe response TLV 0x1E for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe request TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe request TLV 0x10 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSCreateProfile() struct sWDSCreateProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSCreateProfile() struct sWDSCreateProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSCreateProfile() struct sWDSCreateProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSCreateProfile() struct sWDSCreateProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSCreateProfile() struct sWDSCreateProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSCreateProfile() struct sWDSCreateProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSCreateProfile() struct sWDSCreateProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSCreateProfile() struct sWDSCreateProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSCreateProfile() struct sWDSCreateProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSCreateProfile() struct sWDSCreateProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x8F for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfilePersistent { INT8 mProfilePersistent; }; // Structure to describe request TLV 0x90 for WDSCreateProfile() struct sWDSCreateProfileRequest_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSCreateProfile() struct sWDSCreateProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSCreateProfile() struct sWDSCreateProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSCreateProfile() struct sWDSCreateProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSCreateProfile() struct sWDSCreateProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSCreateProfile() struct sWDSCreateProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileResponse_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSCreateProfile() struct sWDSCreateProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSModifyProfile() struct sWDSModifyProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSModifyProfile() struct sWDSModifyProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSModifyProfile() struct sWDSModifyProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSModifyProfile() struct sWDSModifyProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSModifyProfile() struct sWDSModifyProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSModifyProfile() struct sWDSModifyProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSModifyProfile() struct sWDSModifyProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSModifyProfile() struct sWDSModifyProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSModifyProfile() struct sWDSModifyProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSModifyProfile() struct sWDSModifyProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x90 for WDSModifyProfile() struct sWDSModifyProfileRequest_NegotiateDNSServerPrefrence { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSModifyProfile() struct sWDSModifyProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSModifyProfile() struct sWDSModifyProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSModifyProfile() struct sWDSModifyProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSModifyProfile() struct sWDSModifyProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSModifyProfile() struct sWDSModifyProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSModifyProfile() struct sWDSModifyProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSDeleteProfile() struct sWDSDeleteProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSDeleteProfile() struct sWDSDeleteProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetProfileList() struct sWDSGetProfileListRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSGetProfileList() struct sWDSGetProfileListRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSGetProfileList() struct sWDSGetProfileListRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSGetProfileList() struct sWDSGetProfileListRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSGetProfileList() struct sWDSGetProfileListRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSGetProfileList() struct sWDSGetProfileListRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSGetProfileList() struct sWDSGetProfileListRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSGetProfileList() struct sWDSGetProfileListRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSGetProfileList() struct sWDSGetProfileListRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSGetProfileList() struct sWDSGetProfileListRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x90 for WDSGetProfileList() struct sWDSGetProfileListRequest_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSGetProfileList() struct sWDSGetProfileListRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSGetProfileList() struct sWDSGetProfileListRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSGetProfileList() struct sWDSGetProfileListRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSGetProfileList() struct sWDSGetProfileListRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetProfileList() struct sWDSGetProfileListResponse_ProfileList { UINT8 mNumberOfProfiles; struct sProfile { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; UINT8 mProfileNameLength; // This array must be the size specified by mProfileNameLength // char mProfileName[1]; }; // This array must be the size specified by mNumberOfProfiles // sProfile mProfiles[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileList() struct sWDSGetProfileListResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetProfileSettings() struct sWDSGetProfileSettingsRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IMCMFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x90 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe response TLV 0x10 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x1D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x90 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsRequest_RequestedSettings { bool mProfileID:1; bool mProfileName:1; bool mPDPType:1; bool mAPNName:1; bool mDNSAddress:1; bool mGrantedQoS:1; bool mUsername:1; bool mAuthenticationProtocol:1; bool mIPAddress:1; bool mGatewayInfo:1; bool mPCSCFAddress:1; bool mPCSCFServerAddressList:1; bool mPCSCFDomainNameList:1; bool mMTU:1; bool mDomainNameList:1; bool mIPFamily:1; bool mIMCNFlag:1; bool mExtendedTechnology:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x14 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_UMTSGrantedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GPRSGrantedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileID { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x20 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewayAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x21 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewaySubnetMask { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x22 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x23 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFServerAddressList { UINT8 mNumberOfInstances; struct sInstance { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x24 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFDomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mFQDNLength; // This array must be the size specified by mFQDNLength // char mFQDN[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x25 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x26 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6GatewayAddress { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x27 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x28 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_MTU { UINT32 mMTU; }; // Structure to describe response TLV 0x2A for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_DomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mDomainNameLength; // This array must be the size specified by mDomainNameLength // char mDomainName[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x2B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe response TLV 0x2C for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x2D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe response TLV 0x2E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFIPv6AddressList { UINT8 mNumberOfAddresses; struct sAddress { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mNumberOfAddresses // sAddress mAddresses[1]; }; // Structure to describe request TLV 0x01 for WDSSetMIPMode() struct sWDSSetMIPModeRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetMIPMode() struct sWDSGetMIPModeResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetDormancy() struct sWDSGetDormancyResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x01 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe response TLV 0x10 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x01 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_Duration { UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousDuration { UINT64 mPreviousDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x12 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousActiveDuration { UINT64 mPreviousDataSessionActiveDuration; }; // Structure to describe response TLV 0x01 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x01 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x10 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x01 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x10 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe request TLV 0x01 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_RequestedStatus { bool mConnectionStatus:1; bool mLastCallEndReason:1; bool mRXTXByteTotals:1; bool mDormancyStatus:1; bool mDataBearerTechnology:1; bool mChannelRates:1; bool mDuration:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ConnectionStatusIndicator { INT8 mReportConnectionStatus; }; // Structure to describe request TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; // Padding out 6 bits UINT8 mReserved1:6; bool mTXByteTotal:1; bool mRXByteTotal:1; // Padding out 24 bits UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe response TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x15 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x16 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe response TLV 0x17 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x18 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x19 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x20 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x10 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x11 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x12 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x13 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x14 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x15 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x16 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe response TLV 0x01 for WDSGetActiveMIPProfile() struct sWDSGetActiveMIPProfileResponse_Index { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSSetActiveMIPProfile() struct sWDSSetActiveMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSGetMIPProfile() struct sWDSGetMIPProfileRequest_Index { UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_State { INT8 mEnabled; }; // Structure to describe response TLV 0x11 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x13 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x14 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe response TLV 0x15 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe response TLV 0x16 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HASPI { UINT32 mHASPI; }; // Structure to describe response TLV 0x17 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAASPI { UINT32 mAAASPI; }; // Structure to describe response TLV 0x1A for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe response TLV 0x1B for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe request TLV 0x01 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_State { INT8 mEnabled; }; // Structure to describe request TLV 0x11 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe request TLV 0x15 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe request TLV 0x16 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HASPI { UINT32 mHASPI; }; // Structure to describe request TLV 0x17 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequeste_AAASPI { UINT32 mAAASPI; }; // Structure to describe request TLV 0x18 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNHA { // String is variable length, but must be size of the container // char mMNHAKey[1]; }; // Structure to describe request TLV 0x19 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNAAA { // String is variable length, but must be size of the container // char mMNAAAKey[1]; }; // Structure to describe response TLV 0x10 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x11 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe response TLV 0x12 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe response TLV 0x13 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe response TLV 0x14 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe response TLV 0x15 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe response TLV 0x16 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe request TLV 0x01 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x10 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe request TLV 0x11 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe request TLV 0x12 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe request TLV 0x13 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe request TLV 0x14 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe request TLV 0x15 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe request TLV 0x16 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe response TLV 0x01 for WDSGetLastMIPStatus() struct sWDSGetLastMIPStatusResponse_Status { UINT8 mLastMIPStatus; }; // Structure to describe response TLV 0x01 for WDSGetANAAAAuthenticationStatus() struct sWDSGetANAAAAuthenticationStatusResponse_Status { INT8 mANAAAAuthenticated; }; // Structure to describe response TLV 0x01 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_Technology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_LastCallTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe request TLV 0x10 for WDSGetCallList() struct sWDSGetCallListRequest_ListType { eQMICallHistoryTypes mCallListType; }; // Structure to describe response TLV 0x10 for WDSGetCallList() struct sWDSGetCallListResponse_FullList { UINT16 mCallRecords; struct sRecord { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe response TLV 0x11 for WDSGetCallList() struct sWDSGetCallListResponse_IDList { UINT16 mCallRecords; struct sRecord { UINT16 mID; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordRequest_RecordID { UINT16 mID; }; // Structure to describe response TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordResponse_Record { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // Structure to describe response TLV 0x01 for WDSGetCallListMaxSize() struct sWDSGetCallListMaxSizeResponse_Maximum { UINT16 mCallListMaxSize; }; // Structure to describe request TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberRequest_ProfileType { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; }; // Structure to describe response TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ProfileNumber { UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfile() struct sWDSResetProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSResetProfile() struct sWDSResetProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidRequest_ProfileParam { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; eQMIWDSProfileParamID mProfileParamID; }; // Structure to describe response TLV 0xE0 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetIPFamilyPreference() struct sWDSSetIPFamilyPreferenceRequest_IPFamilyPreference { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x01 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe request TLV 0x10 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x10 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe response TLV 0x11 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x01 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x10 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x10 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x11 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x13 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x10 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x13 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetCDMAPreDormancySettings() struct sWDSGetCDMAPreDormancySettingsResponse_Settings { eQMIWDSCDMAServiceOptions mServiceOption; eQMIWDSCDMANetworks mDataSessionNetwork; }; // Structure to describe request TLV 0x01 for WDSSetCAMTimer() struct sWDSSetCAMTimerRequest_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe response TLV 0x01 for WDSGetCAMTimer() struct sWDSGetCAMTimerResponse_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe request TLV 0x01 for WDSSetSCRM() struct sWDSSetSCRMRequest_SCRM { INT8 mSCRMEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSCRM() struct sWDSGetSCRMResponse_SCRM { INT8 mSCRMEnabled; }; // Structure to describe request TLV 0x01 for WDSSetRDUD() struct sWDSSetRDUDRequest_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetRDUD() struct sWDSGetRDUDResponse_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSIPMIPCallType() struct sWDSGetSIPMIPCallTypeResponse_CallType { eQMIWDSSIPMIPCallTypes mCallType; }; // Structure to describe request TLV 0x01 for WDSSetEVDOPageMonitorPeriod() struct sWDSSetEVDOPageMonitorPeriodRequest_Period { UINT8 mPageMonitorPeriod; }; // Structure to describe indication TLV 0x01 for WDS EVDOPageMonitorPeriodIndication struct sWDSEVDOPageMonitorPeriodIndication_Result { eQMIWDSSlotCycleSetResults mSlotCycleSetResult; }; // Structure to describe request TLV 0x01 for WDSSetEVDOLongSleep() struct sWDSSetEVDOLongSleepRequest_Setting { INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetEVDOPageMonitorPeriod() struct sWDSGetEVDOPageMonitorPeriodResponse_Details { UINT8 mPageMonitorPeriod; INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetCallThrottleInfo() struct sWDSGetCallThrottleInfoResponse_Details { UINT32 mEVDOThrottledDelaySeconds; UINT32 mCDMAThrottledDelaySeconds; }; // Structure to describe request TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIRequest_APN { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIResponse_NSAPI { UINT8 mNSAPICount; // This array must be the size specified by mNSAPICount // UINT8 mNSAPI[1]; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_Preference { eQMIWDSDUNControlPreferences mDUNControl; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x01 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_Status { INT8 mDUNControlEnabled; }; // Structure to describe response TLV 0x10 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x11 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_CurrentClient { INT8 mSetByCurrentClient; }; // Structure to describe response TLV 0x12 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_CallNotifications { INT8 mEnableDUNCallNotifications; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_EntitlementNotifications { INT8 mEnableEntitlementNotifications; }; // Structure to describe request TLV 0x11 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_RedialNotifications { INT8 mEnableSilentRedailNotifications; }; // Structure to describe response TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x01 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_Event { eQMIWDSDUNControlEvents mDUNControlEvent; }; // Structure to describe indication TLV 0x10 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallNotification { INT8 mDUNCallAllowed; }; // Structure to describe indication TLV 0x11 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallID { UINT8 mDUNCallID; }; // Structure to describe indication TLV 0x12 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_PreviousFailureReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSPendingDUNCallControl() struct sWDSPendingDUNCallControlRequest_Action { INT8 mDUNCallAllowed; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIActivateIndication struct sWDSEMBMSTMGIActivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIDectivateIndication struct sWDSEMBMSTMGIDectivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryRequest_Type { eQMIWDSEMBMSListTypes mTMGIListType; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe response TLV 0x11 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe indication TLV 0x11 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe response TLV 0x10 for WDSGetPreferredDataSystem() struct sWDSGetPreferredDataSystemResponse_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe response TLV 0x10 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe response TLV 0x11 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataSystems() struct sWDSGetCurrentDataSystemsResponse_Systems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoRequest_Type { eQMIWDSDataSystemNetworkTypes mTechnologyType; }; // Structure to describe response TLV 0x10 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoResponse_Info { UINT8 mThrottleInfoCount; struct sInfo { INT8 mIPv4Throttled; INT8 mIPv6Throttled; UINT32 mIPv4ThrottleTimeLeftInMilliseconds; UINT32 mIPv6ThrottleTimeLeftInMilliseconds; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // This array must be the size specified by mThrottleInfoCount // sInfo mInfos[1]; }; // Structure to describe response TLV 0x10 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x11 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_IPSupport { eQMIWDSLTEIPTypes mIPType; }; // Structure to describe response TLV 0x10 for WDSGetFlowControlStatus() struct sWDSGetFlowControlStatusResponse_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe request TLV 0x10 for DMSSetEventReport() struct sDMSSetEventReportRequest_PowerState { INT8 mReportPowerState; }; // Structure to describe request TLV 0x11 for DMSSetEventReport() struct sDMSSetEventReportRequest_BatteryLevel { UINT8 mBatteryLevelLowerLimit; UINT8 mBatteryLevelUpperLimit; }; // Structure to describe request TLV 0x12 for DMSSetEventReport() struct sDMSSetEventReportRequest_PINStatus { INT8 mReportPINStatus; }; // Structure to describe request TLV 0x13 for DMSSetEventReport() struct sDMSSetEventReportRequest_ActivationState { INT8 mReportActivationState; }; // Structure to describe request TLV 0x14 for DMSSetEventReport() struct sDMSSetEventReportRequest_OperatingMode { INT8 mReportOperatingMode; }; // Structure to describe request TLV 0x15 for DMSSetEventReport() struct sDMSSetEventReportRequest_UIMState { INT8 mReportUIMState; }; // Structure to describe request TLV 0x16 for DMSSetEventReport() struct sDMSSetEventReportRequest_WirelessDisableState { INT8 mReportWirelessDisableState; }; // Structure to describe request TLV 0x17 for DMSSetEventReport() struct sDMSSetEventReportRequest_PRLInit { INT8 mReportPRLInitialization; }; // Structure to describe indication TLV 0x10 for DMS EventReport struct sDMSEventReportIndication_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe indication TLV 0x11 for DMS EventReport struct sDMSEventReportIndication_PIN1State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x12 for DMS EventReport struct sDMSEventReportIndication_PIN2State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x13 for DMS EventReport struct sDMSEventReportIndication_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe indication TLV 0x14 for DMS EventReport struct sDMSEventReportIndication_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x15 for DMS EventReport struct sDMSEventReportIndication_UIMState { eQMIDMSUIMStates mUIMState; }; // Structure to describe indication TLV 0x16 for DMS EventReport struct sDMSEventReportIndication_WirelessDisableState { INT8 mWirelessDisableOn; }; // Structure to describe indication TLV 0x17 for DMS EventReport struct sDMSEventReportIndication_PRLInit { INT8 mPRLLoaded; }; // Structure to describe response TLV 0x01 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_Capabilities { UINT32 mMaxTXRatebps; UINT32 mMaxRXRatebps; eQMIDMSDataServiceCapabilities1 mDataServiceCapability; INT8 mSIMSupported; UINT8 mRadioInterfaceCount; // This array must be the size specified by mRadioInterfaceCount // eQMIDMSRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_ServiceCapability { eQMIDMSServiceCapabilities mServiceCapability; }; // Structure to describe response TLV 0x11 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_VoiceCapability { bool mGWCSFBCapable:1; bool m1xCSFBCapable:1; bool mVoLTECapable:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceManfacturer() struct sDMSGetDeviceManfacturerResponse_Manfacturer { // String is variable length, but must be size of the container // char mDeviceManfacturer[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceModel() struct sDMSGetDeviceModelResponse_Model { // String is variable length, but must be size of the container // char mDeviceModelID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_Revision { // String is variable length, but must be size of the container // char mDeviceRevisionID[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_BootCodeRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_UQCNRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_VoiceNumber { // String is variable length, but must be size of the container // char mDeviceVoiceNumber[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_MobileIDNumber { // String is variable length, but must be size of the container // char mDeviceMobileIDNumber[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_ESN { // String is variable length, but must be size of the container // char mESN[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_IMEI { // String is variable length, but must be size of the container // char mIMEI[1]; }; // Structure to describe response TLV 0x12 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_MEID { // String is variable length, but must be size of the container // char mMEID[1]; }; // Structure to describe response TLV 0x01 for DMSGetPowerState() struct sDMSGetPowerStateResponse_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe request TLV 0x01 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionRequest_Info { UINT8 mPINID; UINT8 mPINEnabled; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINRequest_Info { UINT8 mPINID; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINRequest_Info1 { UINT8 mPINID; UINT8 mPUKLength; // This array must be the size specified by mPUKLength // char mPUKValue[1]; }; struct sDMSUIMUnblockPINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMUnblockPINRequest_Info { sDMSUIMUnblockPINRequest_Info1 mDMSUIMUnblockPINRequest_Info1; sDMSUIMUnblockPINRequest_Info2 mDMSUIMUnblockPINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMChangePIN() struct sDMSUIMChangePINRequest_Info1 { UINT8 mPINID; UINT8 mOldPINLength; // This array must be the size specified by mOldPINLength // char mOldPINValue[1]; }; struct sDMSUIMChangePINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMChangePINRequest_Info { sDMSUIMChangePINRequest_Info1 mDMSUIMChangePINRequest_Info1; sDMSUIMChangePINRequest_Info2 mDMSUIMChangePINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMChangePIN() struct sDMSUIMChangePINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN1Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x12 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN2Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetHardwareRevision() struct sDMSGetHardwareRevisionResponse_HardwareRevision { // String is variable length, but must be size of the container // char mDeviceHardwareRevision[1]; }; // Structure to describe response TLV 0x01 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x10 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OfflineReason { UINT8 mHostImageMismatch:1; UINT8 mUQCNImageMismatch:1; UINT8 mIncompatibleUQCN:1; UINT8 mUQCNCopyIssue:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_PlatformRestricted { INT8 mPlatformRestricted; }; // Structure to describe request TLV 0x01 for DMSSetOperatingMode() struct sDMSSetOperatingModeRequest_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x01 for DMSGetTimestamp() struct sDMSGetTimestampResponse_Timestamp { UINT64 mTimestamp:48; // mSource is of type eQMIDMSTimestampSources UINT64 mSource:16; }; // Structure to describe response TLV 0x01 for DMSGetPRLVersion() struct sDMSGetPRLVersionResponse_PRLVersion { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x01 for DMSGetActivationState() struct sDMSGetActivationStateResponse_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe request TLV 0x01 for DMSActivateAutomatic() struct sDMSActivateAutomaticRequest_ActivationCode { UINT8 mCodeLength; // This array must be the size specified by mCodeLength // char mCode[1]; }; // Structure to describe request TLV 0x01 for DMSActivateManual() struct sDMSActivateManualRequest_ActivationData1 { char mSPC[6]; UINT16 mSID; UINT8 mMDNLength; // This array must be the size specified by mMDNLength // char mMDN[1]; }; struct sDMSActivateManualRequest_ActivationData2 { UINT8 mMINLength; // This array must be the size specified by mMINLength // char mMIN[1]; }; struct sDMSActivateManualRequest_ActivationData { sDMSActivateManualRequest_ActivationData1 mDMSActivateManualRequest_ActivationData1; sDMSActivateManualRequest_ActivationData2 mDMSActivateManualRequest_ActivationData2; }; // Structure to describe request TLV 0x10 for DMSActivateManual() struct sDMSActivateManualRequest_PRLObsolete { UINT16 mPRLLength; // This array must be the size specified by mPRLLength // UINT8 mPRL[1]; }; // Structure to describe request TLV 0x11 for DMSActivateManual() struct sDMSActivateManualRequest_MNHAKey { UINT8 mMNHALength; // This array must be the size specified by mMNHALength // char mMNHA[1]; }; // Structure to describe request TLV 0x12 for DMSActivateManual() struct sDMSActivateManualRequest_MNAAAKey { UINT8 mMNAAALength; // This array must be the size specified by mMNAAALength // char mMNAAA[1]; }; // Structure to describe request TLV 0x13 for DMSActivateManual() struct sDMSActivateManualRequest_PRL { UINT16 mPRLTotalLength; UINT16 mPRLSegmentLength; UINT8 mPRLSegmentID; // This array must be the size specified by mPRLSegmentLength // UINT8 mPRL[1]; }; // Structure to describe response TLV 0x01 for DMSGetLockState() struct sDMSGetLockStateResponse_LockState { eQMIDMSLockStates mLockState; }; // Structure to describe request TLV 0x01 for DMSSetLockState() struct sDMSSetLockStateRequest_LockState { eQMIDMSLockStates mLockState; char mLockCode[4]; }; // Structure to describe request TLV 0x01 for DMSSetLockCode() struct sDMSSetLockCodeRequest_LockCode { char mCurrentLockCode[4]; char mNewLockCode[4]; }; // Structure to describe response TLV 0x01 for DMSReadUserData() struct sDMSReadUserDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSWriteUserData() struct sDMSWriteUserDataRequest_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x01 for DMSReadERIData() struct sDMSReadERIDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSResetFactoryDefaults() struct sDMSResetFactoryDefaultsRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x01 for DMSValidateSPC() struct sDMSValidateSPCRequest_SPC { char mSPC[6]; }; // Structure to describe response TLV 0x01 for DMSUIMGetICCID() struct sDMSUIMGetICCIDResponse_ICCID { // String is variable length, but must be size of the container // char mICCID[1]; }; // Structure to describe response TLV 0x01 for DMSUIMGetHostLockID() struct sDMSUIMGetHostLockIDResponse_ID { UINT32 mHostLockCode; }; // Structure to describe request TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusRequest_Facility { eQMIDMSUIMFacility mFacility; }; // Structure to describe response TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Status { eQMIDMSUIMFacilityStates mFacilityState; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x10 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Blocking { INT8 mOperationBlocking; }; // Structure to describe request TLV 0x01 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionRequest_Facility { eQMIDMSUIMFacility mFacility; eQMIDMSUIMFacilityStates mFacilityState; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionResponse_Status { UINT8 mRemainingVerifyRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyRequest_Facility { eQMIDMSUIMFacility mFacility; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyResponse_Status { UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetIMSI() struct sDMSGetIMSIResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x01 for DMSGetUIMState() struct sDMSGetUIMStateResponse_State { eQMIDMSUIMStates mUIMState; }; // Structure to describe response TLV 0x01 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_Bands { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x10 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_LTEBands { bool mEUTRANBand1:1; bool mEUTRANBand2:1; bool mEUTRANBand3:1; bool mEUTRANBand4:1; bool mEUTRANBand5:1; bool mEUTRANBand6:1; bool mEUTRANBand7:1; bool mEUTRANBand8:1; bool mEUTRANBand9:1; bool mEUTRANBand10:1; bool mEUTRANBand11:1; bool mEUTRANBand12:1; bool mEUTRANBand13:1; bool mEUTRANBand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRANBand17:1; bool mEUTRANBand18:1; bool mEUTRANBand19:1; bool mEUTRANBand20:1; bool mEUTRANBand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRANBand24:1; bool mEUTRANBand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRANBand33:1; bool mEUTRANBand34:1; bool mEUTRANBand35:1; bool mEUTRANBand36:1; bool mEUTRANBand37:1; bool mEUTRANBand38:1; bool mEUTRANBand39:1; bool mEUTRANBand40:1; bool mEUTRANBand41:1; // Padding out 23 bits UINT8 mReserved4:7; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x11 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_TDSBands { bool mTDSBandA:1; bool mTDSBandB:1; bool mTDSBandC:1; bool mTDSBandD:1; bool mTDSBandE:1; bool mTDSBandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetFactorySerialNumber() struct sDMSGetFactorySerialNumberResponse_ID { // String is variable length, but must be size of the container // char mFactorySerialNumber[1]; }; // Structure to describe request TLV 0x01 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Time { UINT64 mTimeInMilliseconds; }; // Structure to describe request TLV 0x10 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Type { eQMIDMSTimeReferences mTimeReference; }; // Structure to describe response TLV 0x01 for DMSGetSoftwareVersion() struct sDMSGetSoftwareVersionResponse_Version { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe request TLV 0x01 for DMSSetSPC() struct sDMSSetSPCRequest_CurrentSPC { char mCurrentSPC[6]; }; // Structure to describe response TLV 0x10 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Version { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x11 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Preference { INT8 mPRLOnlyPreferenceSet; }; // Structure to describe request TLV 0x01 for NASAbort() struct sNASAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for NASSetEventReport() struct sNASSetEventReportRequest_SignalIndicator { INT8 mReportSignalStrength; UINT8 mNumberOfThresholds; // This array must be the size specified by mNumberOfThresholds // INT8 mSignalStrengthThresholddBm[1]; }; // Structure to describe request TLV 0x11 for NASSetEventReport() struct sNASSetEventReportRequest_RFIndicator { INT8 mReportRFInfo; }; // Structure to describe request TLV 0x12 for NASSetEventReport() struct sNASSetEventReportRequest_RegistrationRejectIndicator { INT8 mReportLUReject; }; // Structure to describe request TLV 0x13 for NASSetEventReport() struct sNASSetEventReportRequest_RSSIIndicator { INT8 mReportRSSI; UINT8 mRSSIDelta; }; // Structure to describe request TLV 0x14 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOIndicator { INT8 mReportECIO; UINT8 mECIODelta; }; // Structure to describe request TLV 0x15 for NASSetEventReport() struct sNASSetEventReportRequest_IOIndicator { INT8 mReportIO; UINT8 mIODelta; }; // Structure to describe request TLV 0x16 for NASSetEventReport() struct sNASSetEventReportRequest_SINRIndicator { INT8 mReportSINR; UINT8 mSINRDelta; }; // Structure to describe request TLV 0x17 for NASSetEventReport() struct sNASSetEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x18 for NASSetEventReport() struct sNASSetEventReportRequest_RSRQIndicator { INT8 mReportRSRQ; UINT8 mRSRQDelta; }; // Structure to describe request TLV 0x19 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOThreshold { INT8 mReportECIO; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1A for NASSetEventReport() struct sNASSetEventReportRequest_SINRThreshold { INT8 mReportSINR; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x1B for NASSetEventReport() struct sNASSetEventReportRequest_LTESNRDelta { INT8 mReportLTESNR; UINT16 mLTESNRDelta; }; // Structure to describe request TLV 0x1C for NASSetEventReport() struct sNASSetEventReportRequest_LTERSPSDelta { INT8 mReportLTERSRP; UINT8 mLTERSRPDelta; }; // Structure to describe indication TLV 0x10 for NAS EventReport struct sNASEventReportIndication_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x11 for NAS EventReport struct sNASEventReportIndication_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for NAS EventReport struct sNASEventReportIndication_RegistrationReject { eQMINASServiceDomains mServiceDomain; UINT16 mRejectCause; }; // Structure to describe indication TLV 0x13 for NAS EventReport struct sNASEventReportIndication_RSSI { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x14 for NAS EventReport struct sNASEventReportIndication_ECIO { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x15 for NAS EventReport struct sNASEventReportIndication_IO { UINT32 mIO; }; // Structure to describe indication TLV 0x16 for NAS EventReport struct sNASEventReportIndication_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe indication TLV 0x17 for NAS EventReport struct sNASEventReportIndication_ErrorRate { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x18 for NAS EventReport struct sNASEventReportIndication_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x19 for NAS EventReport struct sNASEventReportIndication_LTESNR { INT16 mLTESNR; }; // Structure to describe indication TLV 0x1A for NAS EventReport struct sNASEventReportIndication_LTERSRP { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemSelectIndicator { INT8 mReportSystemSelect; }; // Structure to describe request TLV 0x12 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DDTMIndicator { INT8 mReportDDTM; }; // Structure to describe request TLV 0x13 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ServingSystemIndicator { INT8 mReportServingSystem; }; // Structure to describe request TLV 0x14 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DualStandbyIndicator { INT8 mReportDualStandby; }; // Structure to describe request TLV 0x15 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SubscriptionInformationIndicator { INT8 mReportSubscriptionInformation; }; // Structure to describe request TLV 0x17 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkTimeIndicator { INT8 mReportNetworkTime; }; // Structure to describe request TLV 0x18 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemInformationIndicator { INT8 mReportSystemInformation; }; // Structure to describe request TLV 0x19 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SignalStrengthIndicator { INT8 mReportSignalStrength; }; // Structure to describe request TLV 0x1A for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x1B for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NewEVDOUATIIndicator { INT8 mReportNewEVDOUATI; }; // Structure to describe request TLV 0x1C for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EVDOSessionIndicator { INT8 mReportEVDOSessionClose; }; // Structure to describe request TLV 0x1D for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ManagedRoamingIndicator { INT8 mReportManagedRoaming; }; // Structure to describe request TLV 0x1E for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CurrentPLMNName { INT8 mReportCurrentPLMNName; }; // Structure to describe request TLV 0x1F for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EMBMSStatus { INT8 mReportEMBMSStatus; }; // Structure to describe request TLV 0x20 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RFBandInfo { INT8 mReportRFBandInfo; }; // Structure to describe request TLV 0x21 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkReject { INT8 mNetworkRejectEnabled; INT8 mSupressSytemInfoEnabled; }; // Structure to describe request TLV 0x22 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_OperatorNameData { INT8 mOperatorNameDataEnabled; }; // Structure to describe request TLV 0x23 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CSPPLMNModeBit { INT8 mCSPPLMNModeBitEnabled; }; // Structure to describe request TLV 0x24 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RTREConfiguration { INT8 mRTREConfigurationEnabled; }; // Structure to describe request TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthRequest_RequestMask { bool mQueryRSSI:1; bool mQueryECIO:1; bool mQueryIO:1; bool mQuerySINR:1; bool mQueryErrorRate:1; bool mQueryRSRQ:1; bool mQueryLTESNR:1; bool mQueryLTERSRQ:1; // Padding out 8 bits UINT8 mReserved1; }; // Structure to describe response TLV 0x01 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrengthList { UINT16 mNumberOfInfoInstances; struct sInfo { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x11 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSSIList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x12 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ECIOList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x13 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_IO { UINT32 mIO; }; // Structure to describe response TLV 0x14 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe response TLV 0x15 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ErrorRateList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x16 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x17 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTESNR { INT16 mLTESNR; }; // Structure to describe response TLV 0x18 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTERSRQ { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanRequest_NetworkMask { bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkInfo { UINT16 mNumberOfInfoInstances; struct sNetworkInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASInUseStates mInUseStatus:2; eQMINASRoamingStates mRoamingStatus:2; eQMINASForbiddenStates mForbiddenStatus:2; eQMINASPreferredStates mPreferredStatus:2; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // This array must be the size specified by mNumberOfInfoInstances // sNetworkInfo mNetworkInfos[1]; }; // Structure to describe response TLV 0x11 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkRAT { UINT16 mNumberOfInfoInstances; struct sInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x12 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_PCSInfo { UINT16 mPCSInfoCount; struct sPCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mPCSInfoCount // sPCSInfo mPCSInfos[1]; }; // Structure to describe request TLV 0x01 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_Action { eQMINASRegisterActions mRegisterAction; }; // Structure to describe request TLV 0x10 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ManualInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x11 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x12 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASInitiateAttach() struct sNASInitiateAttachRequest_Action { eQMINASPSAttachActions mPSAttachAction; }; // Structure to describe response TLV 0x01 for NASGetServingSystem() struct sNASGetServingSystemResponse_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x11 for NASGetServingSystem() struct sNASGetServingSystemResponse_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe response TLV 0x12 for NASGetServingSystem() struct sNASGetServingSystemResponse_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x13 for NASGetServingSystem() struct sNASGetServingSystemResponse_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x14 for NASGetServingSystem() struct sNASGetServingSystemResponse_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x15 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for NASGetServingSystem() struct sNASGetServingSystemResponse_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x17 for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe response TLV 0x18 for NASGetServingSystem() struct sNASGetServingSystemResponse_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe response TLV 0x1A for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe response TLV 0x1B for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPDaylightSavingsAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe response TLV 0x1C for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe response TLV 0x1D for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPCellID { UINT32 mCellID; }; // Structure to describe response TLV 0x1E for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe response TLV 0x1F for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe response TLV 0x20 for NASGetServingSystem() struct sNASGetServingSystemResponse_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe response TLV 0x21 for NASGetServingSystem() struct sNASGetServingSystemResponse_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe response TLV 0x22 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe response TLV 0x23 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe response TLV 0x24 for NASGetServingSystem() struct sNASGetServingSystemResponse_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x25 for NASGetServingSystem() struct sNASGetServingSystemResponse_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x26 for NASGetServingSystem() struct sNASGetServingSystemResponse_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x27 for NASGetServingSystem() struct sNASGetServingSystemResponse_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x28 for NASGetServingSystem() struct sNASGetServingSystemResponse_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe indication TLV 0x01 for NAS ServingSystemIndication struct sNASServingSystemIndication_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x10 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x11 for NAS ServingSystemIndication struct sNASServingSystemIndication_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe indication TLV 0x12 for NAS ServingSystemIndication struct sNASServingSystemIndication_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe indication TLV 0x13 for NAS ServingSystemIndication struct sNASServingSystemIndication_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe indication TLV 0x14 for NAS ServingSystemIndication struct sNASServingSystemIndication_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe indication TLV 0x15 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for NAS ServingSystemIndication struct sNASServingSystemIndication_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x17 for NAS ServingSystemIndication struct sNASServingSystemIndication_TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe indication TLV 0x18 for NAS ServingSystemIndication struct sNASServingSystemIndication_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe indication TLV 0x19 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChange { INT8 mPLMNChanged; }; // Structure to describe indication TLV 0x1A for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe indication TLV 0x1B for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPDaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x1C for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPUniversalTimeAndZone { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x1D for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe indication TLV 0x1E for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPCellID { UINT32 mCellID; }; // Structure to describe indication TLV 0x1F for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe indication TLV 0x20 for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe indication TLV 0x21 for NAS ServingSystemIndication struct sNASServingSystemIndication_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe indication TLV 0x22 for NAS ServingSystemIndication struct sNASServingSystemIndication_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe indication TLV 0x23 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe indication TLV 0x24 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe indication TLV 0x25 for NAS ServingSystemIndication struct sNASServingSystemIndication_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x26 for NAS ServingSystemIndication struct sNASServingSystemIndication_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x27 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChangeStatus { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x28 for NAS ServingSystemIndication struct sNASServingSystemIndication_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x29 for NAS ServingSystemIndication struct sNASServingSystemIndication_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x2A for NAS ServingSystemIndication struct sNASServingSystemIndication_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe response TLV 0x01 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeIDs { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x11 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_ExtendedHomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASNetworkDescriptionDisplays mDisplayNetworkDescription; eQMINASNetworkDescriptionEncodings mNetworkDescriptionEncoding; UINT8 mNetworkDescriptionLength; // This array must be the size specified by mNetworkDescriptionLength // UINT8 mNetworkDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x11 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_StaticNetworks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetPreferredNetworks() struct sNASSetPreferredNetworksRequest_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x10 for NASGetForbiddenNetworks() struct sNASGetForbiddenNetworksResponse_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetForbiddenNetworks() struct sNASSetForbiddenNetworksRequest_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for NASSetTechnologyPreference() struct sNASSetTechnologyPreferenceRequest_Preference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x01 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_ActivePreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x10 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_PersistentPreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; }; // Structure to describe response TLV 0x01 for NASGetACCOLC() struct sNASGetACCOLCResponse_ACCOLC { UINT8 mACCOLC; }; // Structure to describe request TLV 0x01 for NASSetACCOLC() struct sNASSetACCOLCRequest_ACCOLC { char mSPC[6]; UINT8 mACCOLC; }; // Structure to describe indication TLV 0x01 for NAS GetSystemPreference struct sNASGetSystemPreferenceIndication_Pref { eQMINASSystemPreferences mSystemPreference; }; // Structure to describe response TLV 0x11 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCI { UINT8 mSlotCycleIndex; }; // Structure to describe response TLV 0x12 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCM { UINT8 mStationClassMark; }; // Structure to describe response TLV 0x13 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Registration { INT8 mRegisterOnHomeSystem; INT8 mRegisterOnForeignSystem; INT8 mRegisterOnForeignNetwork; }; // Structure to describe response TLV 0x14 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe response TLV 0x15 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe response TLV 0x16 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x17 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_ForceCDMA1xEVDOSCP { eQMINASForceCDMA1xEVDOSCP mForceCDMA1xEVDOSCP; }; // Structure to describe request TLV 0x10 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x14 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe request TLV 0x15 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe request TLV 0x16 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x01 for NASGetRFInfo() struct sNASGetRFInfoResponse_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x01 for NASGetANAAAAuthenticationStatus() struct sNASGetANAAAAuthenticationStatusResponse_Status { eQMINASANAAAAuthenticationStatus mANAAAAuthenticationStatus; }; // Structure to describe request TLV 0x10 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe request TLV 0x11 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x12 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe request TLV 0x13 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe request TLV 0x14 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe request TLV 0x15 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe request TLV 0x16 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x17 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x1A for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x1B for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x1C for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x1D for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x1E for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe response TLV 0x11 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x12 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x13 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe response TLV 0x14 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe response TLV 0x15 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x16 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe response TLV 0x18 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe response TLV 0x19 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe response TLV 0x1A for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1B for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x1C for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x10 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe indication TLV 0x11 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe indication TLV 0x12 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe indication TLV 0x13 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe indication TLV 0x14 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe indication TLV 0x15 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe indication TLV 0x16 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe indication TLV 0x18 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe indication TLV 0x19 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe indication TLV 0x1A for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x1B for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x1C for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe request TLV 0x01 for NASSetDDTMPreference() struct sNASSetDDTMPreferenceRequest_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x01 for NASGetDDTMPreference() struct sNASGetDDTMPreferenceResponse_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe indication TLV 0x01 for NAS DDTMPreferenceIndication struct sNASDDTMPreferenceIndication_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x10 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe response TLV 0x11 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe response TLV 0x12 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe response TLV 0x13 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe response TLV 0x14 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation { sNASGetOperatorNameDataResponse_NITZInformation1 mNASGetOperatorNameDataResponse_NITZInformation1; sNASGetOperatorNameDataResponse_NITZInformation2 mNASGetOperatorNameDataResponse_NITZInformation2; }; // Structure to describe indication TLV 0x10 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x11 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe indication TLV 0x12 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe indication TLV 0x13 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe indication TLV 0x14 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASOperatorNameDataIndication_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASOperatorNameDataIndication_NITZInformation { sNASOperatorNameDataIndication_NITZInformation1 mNASOperatorNameDataIndication_NITZInformation1; sNASOperatorNameDataIndication_NITZInformation2 mNASOperatorNameDataIndication_NITZInformation2; }; // Structure to describe response TLV 0x10 for NASGetCSPPLMNMode() struct sNASGetCSPPLMNModeResponse_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe indication TLV 0x10 for NAS CSPPLMNModeIndication struct sNASCSPPLMNModeIndication_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe request TLV 0x01 for NASUpdateAKEY() struct sNASUpdateAKEYRequest_AKEY { char mAKEY[26]; }; // Structure to describe request TLV 0x01 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_InfoMask { bool mNAMName:1; bool mDirectoryNumber:1; bool mHomeID:1; bool mMINBasedIMSI:1; bool mTrueIMSI:1; bool mCDMAChannel:1; bool mMobileDirectoryNumber:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe response TLV 0x11 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe response TLV 0x12 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe response TLV 0x13 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x14 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x15 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe response TLV 0x16 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe request TLV 0x01 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe request TLV 0x11 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe request TLV 0x12 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x13 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x14 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe request TLV 0x15 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe request TLV 0x16 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe response TLV 0x10 for NASGetMobileCAIRevision() struct sNASGetMobileCAIRevisionResponse_CAIRevision { eQMINASRevision mCAIRevision; }; // Structure to describe response TLV 0x10 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_CurrentRTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x11 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_RTREConfigPreference { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe request TLV 0x01 for NASSetRTREConfig() struct sNASSetRTREConfigRequest_RTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x10 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_GERANInfo { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; UINT32 mTimingAdvance; eQMINASRXLevel mRXLevel; UINT8 mNMRCellCount; struct sNMRCell { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileCountryCode0:4; UINT8 mPLMNMobileCountryCode1:4; UINT8 mPLMNMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileNetworkCode0:4; UINT8 mPLMNMobileNetworkCode1:4; UINT8 mPLMNMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBaseStationIdentityCodeBCC:3; UINT8 mBaseStationIdentityCodeNCC:3; // Padding out 2 bits UINT8 mReserved2:2; eQMINASRXLevel mRXLevel; }; // This array must be the size specified by mNMRCellCount // sNMRCell mNMRCells[1]; }; // Structure to describe response TLV 0x11 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSInfo1 { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; UINT8 mUTRAUMTSMonitoredCellCount; struct sUMTSMonitoredCell { UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; }; // This array must be the size specified by mUTRAUMTSMonitoredCellCount // sUMTSMonitoredCell mUMTSMonitoredCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo2 { UINT8 mGERANNBRCellCount; struct sGERANNBRCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mNetworkColorCode; UINT8 mBaseStationColorCode; INT16 mRSSI; }; // This array must be the size specified by mGERANNBRCellCount // sGERANNBRCell mGERANNBRCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo { sNASGetCellLocationInfoResponse_UMTSInfo1 mNASGetCellLocationInfoResponse_UMTSInfo1; sNASGetCellLocationInfoResponse_UMTSInfo2 mNASGetCellLocationInfoResponse_UMTSInfo2; }; // Structure to describe response TLV 0x12 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_CDMAInfo { UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mReferencePN; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x13 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_IntrafrequencyLTEInfo { INT8 mUEInIdleMode; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mTrackingAreaCode; UINT32 mGlobalCellID; UINT16 mEUTRAAbsoluteRFChannelNumber; UINT16 mServingCellID; UINT8 mCellReselectionPriority; UINT8 mSNonIntraSearchThreshold; UINT8 mServingCellLowThreshold; UINT8 mSIntraSearchThreshold; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // Structure to describe response TLV 0x14 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_InterfrequencyLTEInfo { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mEUTRAAbsoluteRFChannelNumber; UINT8 mCellSelectionRXLevelLowThreshold; UINT8 mCellSelectionRXLevelHighThreshold; UINT8 mCellReselectionPriority; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x15 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringGSM { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; // Bitfield arrays are not possible in c, unrolling the array bool mNCCPermitted0:1; bool mNCCPermitted1:1; bool mNCCPermitted2:1; bool mNCCPermitted3:1; bool mNCCPermitted4:1; bool mNCCPermitted5:1; bool mNCCPermitted6:1; bool mNCCPermitted7:1; UINT8 mCellCount; struct sCell { UINT16 mAbsoluteRFChannelNumber; INT8 mBandIs1900; INT8 mCellIDValid; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x16 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringWCDMA { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; UINT8 mCellCount; struct sCell { UINT16 mPrimaryScramblingCode; INT16 mCPICHRSCP; INT16 mCPICHEcNo; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x17 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSCellID { UINT32 mCellID; }; // Structure to describe request TLV 0x01 for NASGetPLMNName() struct sNASGetPLMNNameRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameRequest_SupressSIMError { INT8 mSIMInitNotChecked; }; // Structure to describe response TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameResponse_Name1 { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; struct sNASGetPLMNNameResponse_Name2 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetPLMNNameResponse_Name3 { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetPLMNNameResponse_Name { sNASGetPLMNNameResponse_Name1 mNASGetPLMNNameResponse_Name1; sNASGetPLMNNameResponse_Name2 mNASGetPLMNNameResponse_Name2; sNASGetPLMNNameResponse_Name3 mNASGetPLMNNameResponse_Name3; }; // Structure to describe request TLV 0x01 for NASBindSubscription() struct sNASBindSubscriptionRequest_SubscriptionType { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x10 for NAS ManagedRoamingIndication struct sNASManagedRoamingIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x10 for NAS DualStandbyPrefIndication struct sNASDualStandbyPrefIndication_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; eQMINASSubscriptionType mPrioritySubscription; eQMINASSubscriptionType mActiveSubscription; eQMINASSubscriptionType mDefaultDataSubscription; }; // Structure to describe indication TLV 0x10 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_PrioritySubscriptionInfo { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x11 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_ActiveSubscriptionInfo { eQMINASActiveSubscription mActiveSubscription; }; // Structure to describe indication TLV 0x12 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_DefaultDataSubscriptionInfo { INT8 mDefaultDataSubscription; }; // Structure to describe response TLV 0x10 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX0 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX1 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x10 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe request TLV 0x11 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x12 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x01 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_UniversalTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; }; // Structure to describe indication TLV 0x10 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_TimeZone { INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x11 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_DaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x12 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x11 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x12 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x13 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x14 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x15 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe response TLV 0x16 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe response TLV 0x17 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe response TLV 0x18 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x19 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x1A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe response TLV 0x1B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x20 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x21 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe response TLV 0x22 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x23 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x24 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x25 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x26 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe response TLV 0x27 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe response TLV 0x28 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe response TLV 0x29 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe response TLV 0x2A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoiceDomain { eQMINASLTEVoiceDomains mLTEVoiceDomain; }; // Structure to describe indication TLV 0x10 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x11 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x12 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x13 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x14 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x15 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe indication TLV 0x16 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe indication TLV 0x17 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe indication TLV 0x18 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x19 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x1A for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe indication TLV 0x1B for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1C for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1D for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1E for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1F for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x20 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x21 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe indication TLV 0x22 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x23 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x24 for NAS SystemInfoIndication struct sNASSystemInfoIndication_NoPLMNChange { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x25 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x26 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x27 for NAS SystemInfoIndication struct sNASSystemInfoIndication_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe indication TLV 0x28 for NAS SystemInfoIndication struct sNASSystemInfoIndication_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe indication TLV 0x29 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe indication TLV 0x2A for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe indication TLV 0x2B for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoiceDomain { eQMINASLTEVoiceDomains mLTEVoiceDomain; }; // Structure to describe response TLV 0x10 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x11 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe response TLV 0x12 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe response TLV 0x13 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x14 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe response TLV 0x15 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_ECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_CDMA1xEVDOSINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTESINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_IOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT32 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTEConfig { eQMINASLTESignalRates mLTESignalCheckRate; eQMINASLTESignalRates mLTESignalAveragingRate; }; // Structure to describe request TLV 0x18 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSCPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mRSCPThreshold[1]; }; // Structure to describe indication TLV 0x10 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x11 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe indication TLV 0x12 for NAS SignalInfoIndication struct sNASSignalInfoIndication_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe indication TLV 0x13 for NAS SignalInfoIndication struct sNASSignalInfoIndication_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x14 for NAS SignalInfoIndication struct sNASSignalInfoIndication_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe indication TLV 0x15 for NAS SignalInfoIndication struct sNASSignalInfoIndication_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe response TLV 0x10 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x11 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x12 for NASGetErrorRate() struct sNASGetErrorRateResponse_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x13 for NASGetErrorRate() struct sNASGetErrorRateResponse_WCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x14 for NASGetErrorRate() struct sNASGetErrorRateResponse_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x10 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x11 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x12 for NAS ErrorRateIndication struct sNASErrorRateIndication_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x13 for NAS ErrorRateIndication struct sNASErrorRateIndication_WCDMAFrameErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x14 for NAS ErrorRateIndication struct sNASErrorRateIndication_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x01 for NAS EVDOSessionCloseIndication struct sNASEVDOSessionCloseIndication_Reason { eQMINASEVDOSessionCloseReasons mSessionCloseReason; }; // Structure to describe indication TLV 0x01 for NAS EVDOUATIUpdateIndication struct sNASEVDOUATIUpdateIndication_UATI { UINT8 mUATI[16]; }; // Structure to describe request TLV 0x01 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeRequest_Protocol { UINT32 mEVDOProtocol; }; // Structure to describe response TLV 0x10 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeResponse_Subtype { UINT16 mEVDOProtocolSubtype; }; // Structure to describe response TLV 0x10 for NASGetEVDOColorCode() struct sNASGetEVDOColorCodeResponse_Value { UINT8 mEVDOColorCode; }; // Structure to describe response TLV 0x10 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x11 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA1xEVDO { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x12 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_GSM { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x13 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_UMTS { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x14 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_LTE { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x15 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_TDSCDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe request TLV 0x01 for NASSetRXDiversity() struct sNASSetRXDiversityRequest_Diversity { eQMINASRadioInterfaces mRadioInterface; bool mEnableRXChain0:1; bool mEnableRXChain1:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX0Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x11 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX1Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x12 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_TXInfo { INT8 mInTraffic; INT32 mTXPower; }; // Structure to describe request TLV 0x01 for NASUpdateAKEYExtended() struct sNASUpdateAKEYExtendedRequest_AKEY { char mSPC[6]; char mAKEY[26]; }; // Structure to describe response TLV 0x10 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe response TLV 0x11 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x12 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_ActiveSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x13 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_AbsoluteTime { UINT32 mBlockingIntervalInMilliseconds; }; // Structure to describe request TLV 0x11 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_T3204Multiplier { UINT32 mBlockingIntervalAsT3204Multiplier; }; // Structure to describe request TLV 0x01 for NASUnblockLTEPLMN() struct sNASUnblockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x10 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x11 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_SPN { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x12 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_ShortName { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; // Structure to describe indication TLV 0x13 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_LongName { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; // Structure to describe request TLV 0x01 for NASConfigureEMBMS() struct sNASConfigureEMBMSRequest_Config { INT8 mEMBMSEnabled; }; // Structure to describe response TLV 0x10 for NASGetEMBMSStatus() struct sNASGetEMBMSStatusResponse_Status { INT8 mEMBMSEnabled; }; // Structure to describe indication TLV 0x01 for NAS EMBMSStatusIndication struct sNASEMBMSStatusIndication_Status { INT8 mEMBMSEnabled; }; // Structure to describe response TLV 0x10 for NASGetCDMAPositionInfo() struct sNASGetCDMAPositionInfoResponse_Info { INT8 mUEInIdleMode; UINT8 mBaseStationCount; struct sBaseStation { eQMINASCDMAPilotTypes mPilotType; UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mPilotPN; UINT16 mPilotStrength; INT32 mLatitude; INT32 mLongitude; UINT64 mGPSTimeInMilliseconds; }; // This array must be the size specified by mBaseStationCount // sBaseStation mBaseStations[1]; }; // Structure to describe indication TLV 0x01 for NAS RFBandInfoIndication struct sNASRFBandInfoIndication_BandInfo { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // Structure to describe indication TLV 0x01 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x03 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RejectCause { UINT8 mRejectCause; }; // Structure to describe response TLV 0x10 for NASGetManagedRoamingConfig() struct sNASGetManagedRoamingConfigResponse_Config { INT8 mManagedRoamingSupported; }; // Structure to describe indication TLV 0x10 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_CurrentConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe indication TLV 0x11 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_ConfigPreference { eQMINASRTREConfiguration mRTREPreference; }; // Structure to describe response TLV 0x10 for NASGetCentralizedEONSSupport() struct sNASGetCentralizedEONSSupportResponse_Status { INT8 mCentralizedEONSSupported; }; // Structure to describe request TLV 0x10 for WMSSetEventReport() struct sWMSSetEventReportRequest_NewMTMessageIndicator { INT8 mReportNewMTMessages; }; // Structure to describe indication TLV 0x10 for WMS EventReport struct sWMSEventReportIndication_ReceivedMTMessage { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe indication TLV 0x11 for WMS EventReport struct sWMSEventReportIndication_TransferRouteMTMessage { INT8 mACKRequired; UINT32 mTransactionID; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x12 for WMS EventReport struct sWMSEventReportIndication_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x13 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSMessage { eQMIWMSNotificationType mNotificationType; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x14 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSPLMNInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe indication TLV 0x15 for WMS EventReport struct sWMSEventReportIndication_ReceivedSMSCAddress { UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe indication TLV 0x16 for WMS EventReport struct sWMSEventReportIndication_SMSOnIMS { INT8 mMessageReceivedFromIMS; }; // Structure to describe request TLV 0x01 for WMSRawSend() struct sWMSRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSRawSend() struct sWMSRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSRawSend() struct sWMSRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSRawSend() struct sWMSRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSRawSend() struct sWMSRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSRawSend() struct sWMSRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSRawSend() struct sWMSRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe response TLV 0x01 for WMSRawSend() struct sWMSRawSendResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x10 for WMSRawSend() struct sWMSRawSendResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x11 for WMSRawSend() struct sWMSRawSendResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x12 for WMSRawSend() struct sWMSRawSendResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x13 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x14 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe response TLV 0x15 for WMSRawSend() struct sWMSRawSendResponse_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe request TLV 0x01 for WMSRawWrite() struct sWMSRawWriteRequest_MessageData { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe response TLV 0x01 for WMSRawWrite() struct sWMSRawWriteResponse_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x01 for WMSRawRead() struct sWMSRawReadRequest_MessageIndex { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe request TLV 0x10 for WMSRawRead() struct sWMSRawReadRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x11 for WMSRawRead() struct sWMSRawReadRequest_SMSOnIMS { INT8 mMessageToBeReadFromIMS; }; // Structure to describe response TLV 0x01 for WMSRawRead() struct sWMSRawReadResponse_MessageData { eQMIWMSMessageTags mMessageTag; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x01 for WMSModifyTag() struct sWMSModifyTagRequest_MessageTag { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x10 for WMSModifyTag() struct sWMSModifyTagRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSDelete() struct sWMSDeleteRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSDelete() struct sWMSDeleteRequest_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x11 for WMSDelete() struct sWMSDeleteRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x12 for WMSDelete() struct sWMSDeleteRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetMessageProtocol() struct sWMSGetMessageProtocolResponse_MessageProtocol { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSListMessages() struct sWMSListMessagesRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSListMessages() struct sWMSListMessagesRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x11 for WMSListMessages() struct sWMSListMessagesRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSListMessages() struct sWMSListMessagesResponse_MessageList { UINT32 mNumberOfMessages; struct sMessage { UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // This array must be the size specified by mNumberOfMessages // sMessage mMessages[1]; }; // Structure to describe request TLV 0x01 for WMSSetRoutes() struct sWMSSetRoutesRequest_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSReceiptActions mReceiptAction; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe request TLV 0x10 for WMSSetRoutes() struct sWMSSetRoutesRequest_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetRoutes() struct sWMSGetRoutesResponse_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSRouteValues mRouteValue; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe response TLV 0x10 for WMSGetRoutes() struct sWMSGetRoutesResponse_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetSMSCAddress() struct sWMSGetSMSCAddressResponse_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x01 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_Address { // String is variable length, but must be size of the container // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_AddressType { // String is variable length, but must be size of the container // char mSMSCAddressType[1]; }; // Structure to describe request TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_MaxSize { UINT32 mMaxStorageSizeInMessages; }; // Structure to describe response TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_AvailableSize { UINT32 mFreeStorageSizeInMessages; }; // Structure to describe request TLV 0x01 for WMSSendACK() struct sWMSSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSSendACK() struct sWMSSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSSendACK() struct sWMSSendACKRequest_3GPPFailureInfo { UINT8 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSSendACK() struct sWMSSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendACK() struct sWMSSendACKResponse_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe request TLV 0x01 for WMSSetRetryPeriod() struct sWMSSetRetryPeriodRequest_Period { UINT32 mRetryPeriodInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetRetryInterval() struct sWMSSetRetryIntervalRequest_Interval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetDCDisconnectTimer() struct sWMSSetDCDisconnectTimerRequest_Timer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetMemoryStatus() struct sWMSSetMemoryStatusRequest_Status { INT8 mMemoryIsAvailable; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastActivation() struct sWMSSetBroadcastActivationRequest_BCInfo { eQMIWMSMessageProtocols mMode; INT8 mActivateBroadcast; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPPInfo { UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x11 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPP2Info { UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x10 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x01 for WMS MemoryFullIndication struct sWMSMemoryFullIndication_Info { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetDomainPreference() struct sWMSGetDomainPreferenceResponse_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSetDomainPreference() struct sWMSSetDomainPreferenceRequest_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x11 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x12 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x13 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x14 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x01 for WMSGetWaitingMessage() struct sWMSGetWaitingMessageResponse_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe indication TLV 0x01 for WMS WaitingMessageIndication struct sWMSWaitingMessageIndication_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe request TLV 0x01 for WMSSetPrimaryClient() struct sWMSSetPrimaryClientRequest_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe indication TLV 0x01 for WMS SMSCAddressIndication struct sWMSSMSCAddressIndication_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe request TLV 0x11 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe request TLV 0x12 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe request TLV 0x13 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe request TLV 0x14 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe response TLV 0x10 for WMSGetTransportInfoLayer() struct sWMSGetTransportInfoLayerResponse_TransportLayerRegistrationInfo { INT8 mRegistered; }; // Structure to describe response TLV 0x11 for WMSGetTransportLayerInfo() struct sWMSGetTransportLayerInfoResponse_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe indication TLV 0x01 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerRegInfo { INT8 mRegistered; }; // Structure to describe indication TLV 0x10 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe response TLV 0x10 for WMSGetNetworkRegistrationInfo() struct sWMSGetNetworkRegistrationInfoResponse_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe indication TLV 0x01 for WMS NetworkRegistrationInfoIndication struct sWMSNetworkRegistrationInfoIndication_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe request TLV 0x01 for WMSBindSubscription() struct sWMSBindSubscriptionRequest_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x10 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe response TLV 0x11 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe response TLV 0x12 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe response TLV 0x13 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x14 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe request TLV 0x01 for WMSGetSMSParameters() struct sWMSGetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe response TLV 0x10 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe response TLV 0x11 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe response TLV 0x12 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe response TLV 0x13 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe request TLV 0x01 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe request TLV 0x10 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe request TLV 0x11 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe request TLV 0x12 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe request TLV 0x13 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe indication TLV 0x01 for WMS CallStatusIndication struct sWMSCallStatusIndication_SMSCallStatusInfo { eQMIWMSSMSCallStatus mSMSCallStatus; }; // Structure to describe response TLV 0x10 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEOutcome { UINT16 mLTEDomainPreferenceOutcome; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWOutcome { UINT16 mGWDomainPreferenceOutcome; }; // Structure to describe response TLV 0x10 for WMSGetRetryPeriod() struct sWMSGetRetryPeriodResponse_RetryPeriod { UINT32 mRetryPeriodInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetRetryInterval() struct sWMSGetRetryIntervalResponse_RetryInterval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetDCDisconnectTimer() struct sWMSGetDCDisconnectTimerResponse_DCDisconnectTimer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetMemoryStatus() struct sWMSGetMemoryStatusResponse_MemoryStatus { INT8 mMemoryIsAvailable; }; // Structure to describe response TLV 0x10 for WMSGetPrimaryClient() struct sWMSGetPrimaryClientResponse_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe response TLV 0x10 for WMSGetSubscriptionBinding() struct sWMSGetSubscriptionBindingResponse_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe request TLV 0x16 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseCode { UINT16 mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSAysncSendACK() struct sWMSAysncSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_3GPPFailureInfo { UINT8 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe request TLV 0x13 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x11 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseCode { UINT16 mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_UserData { UINT32 mUserData; }; // Structure to describe response TLV 0x10 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x11 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS ServiceReadyStatusIndication struct sWMSServiceReadyStatusIndication_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x10 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x10 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEAIndicator { INT8 mReportNMEASentences; }; // Structure to describe request TLV 0x11 for PDSSetEventReport() struct sPDSSetEventReportRequest_ModeIndicator { INT8 mReportNMEASentencesPlusMode; }; // Structure to describe request TLV 0x12 for PDSSetEventReport() struct sPDSSetEventReportRequest_RawIndicator { INT8 mReportRawPositionData; }; // Structure to describe request TLV 0x13 for PDSSetEventReport() struct sPDSSetEventReportRequest_XTRARequestIndicator { INT8 mReportExternalXTRADataRequests; }; // Structure to describe request TLV 0x14 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeInjectionIndicator { INT8 mReportExternalTimeInjections; }; // Structure to describe request TLV 0x15 for PDSSetEventReport() struct sPDSSetEventReportRequest_WiFiIndicator { INT8 mReportExternalWiFiRequests; }; // Structure to describe request TLV 0x16 for PDSSetEventReport() struct sPDSSetEventReportRequest_SatelliteIndicator { INT8 mReportSatelliteInfo; }; // Structure to describe request TLV 0x17 for PDSSetEventReport() struct sPDSSetEventReportRequest_VXNetworkIndicator { INT8 mReportVXNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x18 for PDSSetEventReport() struct sPDSSetEventReportRequest_SUPLNetworkIndicator { INT8 mReportSUPLNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x19 for PDSSetEventReport() struct sPDSSetEventReportRequest_UMTSCPNetworkIndicator { INT8 mReportUMTSCPNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x1A for PDSSetEventReport() struct sPDSSetEventReportRequest_PDSCommIndicator { INT8 mReportPDSCommEvents; }; // Structure to describe request TLV 0x1B for PDSSetEventReport() struct sPDSSetEventReportRequest_AccelerometerDataIndicator { INT8 mReportAccelerometerDataStatus; }; // Structure to describe request TLV 0x1C for PDSSetEventReport() struct sPDSSetEventReportRequest_GyroDataIndicator { INT8 mReportGyroDataStatus; }; // Structure to describe request TLV 0x1D for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSyncIndication { INT8 mReportTimeSyncRequest; }; // Structure to describe request TLV 0x1E for PDSSetEventReport() struct sPDSSetEventReportRequest_PositionReliablilityIndicator { INT8 mReportPositionReliability; }; // Structure to describe request TLV 0x1F for PDSSetEventReport() struct sPDSSetEventReportRequest_SensorDataUsageIndicator { INT8 mReportSensorDataUsage; }; // Structure to describe request TLV 0x20 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSourceInformationIndicator { INT8 mReportTimeSourceInformation; }; // Structure to describe request TLV 0x21 for PDSSetEventReport() struct sPDSSetEventReportRequest_HeadingUncertaintyIndicator { INT8 mReportHeadingUncertaintyInformation; }; // Structure to describe request TLV 0x22 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEADebugStringIndicator { INT8 mReportNMEADebugStrings; }; // Structure to describe request TLV 0x23 for PDSSetEventReport() struct sPDSSetEventReportRequest_ExternalXTRADataIndicator { INT8 mReportExtendedXTRAData; }; // Structure to describe request TLV 0x24 for PDSSetEventReport() struct sPDSSetEventReportRequest_ServiceResetStatus { INT8 mReportServiceResetStatus; }; // Structure to describe indication TLV 0x10 for PDS EventReport struct sPDSEventReportIndication_NMEASentence { // String is variable length, but must be size of the container // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x11 for PDS EventReport struct sPDSEventReportIndication_NMEASentencePlusMode { eQMIPDSNMEASentenceOperatingModes mNMEASentenceOperatingMode; UINT16 mNMEASentenceLength; // This array must be the size specified by mNMEASentenceLength // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x12 for PDS EventReport struct sPDSEventReportIndication_PositionSessionStatus { eQMIPDSSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x13 for PDS EventReport struct sPDSEventReportIndication_ParsedPositionData { bool mTimestampCalendarValid:1; bool mTimestampUTCValid:1; bool mLeapSecondsValid:1; bool mTimeUncertaintyValid:1; bool mLatitudeValid:1; bool mLongitudeValid:1; bool mEllipsoidAltitudeValid:1; bool mMeanSeaLevelAltitudeValid:1; bool mHorizontalSpeedValid:1; bool mVerticalSpeedValid:1; bool mHeadingValid:1; bool mHorizontalUncertaintyCircularValid:1; bool mHorizontalUncertaintyEllipseSemiMajorValid:1; bool mHorizontalUncertaintyEllipseSemiMinorValid:1; bool mHorizontalUncertaintyEllipseOrientAzimuthValid:1; bool mVerticalUncertaintyValid:1; bool mHorizontalVelocityUncertaintyValid:1; bool mVerticalVelocityUncertaintyValid:1; bool mHorizontalConfidenceValid:1; bool mPositionDOPValid:1; bool mHorizontalDOPValid:1; bool mVerticalDOPValid:1; bool mOperatingModeUsedValid:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; UINT16 mCalendarYear; eQMIPDSCalendarMonths mCalendarMonth; eQMIPDSCalendarDays mCalendarDay; UINT8 mCalendarDayOfMonth; UINT8 mCalendarHour; UINT8 mCalendarMinute; UINT8 mCalendarSecond; UINT16 mCalendarMillisecond; UINT8 mCalendarLeapSeconds; UINT64 mUTCTimestamp; UINT32 mUTCTimestampUncertainty; double mLatitude; double mLongitude; float mEllipsoidAltitude; float mMeanSeaLevelAltitude; float mHorizontalSpeed; float mVerticalSpeed; float mHeading; float mHorizontalUncertaintyCircular; float mHorizontalUncertaintyEllipseSemiMajor; float mHorizontalUncertaintyEllipseSemiMinor; float mHorizontalUncertaintyEllipseOrientAzimuth; float mVerticalUncertainty; float mHorizontalVelocityUncertainty; float mVerticalVelocityUncertainty; UINT8 mHorizontalConfidence; float mPositionDOP; float mHorizontalDOP; float mVerticalDOP; eQMIPDSNMEASentenceOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x14 for PDS EventReport struct sPDSEventReportIndication_ExternalXTRARequest { UINT16 mMaximumFileSize; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x15 for PDS EventReport struct sPDSEventReportIndication_ExternalTimeInjectionRequest { UINT32 mDelayThresholdMilliseconds; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x16 for PDS EventReport struct sPDSEventReportIndication_ExternalWiFiPositionRequest { eQMIPDSWiFiRequestTypes mWiFiRequestType; UINT16 mWiFiRequestTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x17 for PDS EventReport struct sPDSEventReportIndication_SatelliteInfo { bool mIonoValid:1; bool mSatelliteCountValid:1; bool mSatelliteListValid:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; INT8 mIonosphericCorrections; UINT8 mSVRecordCount; struct sSV { bool mSystemValid:1; bool mPRNValid:1; bool mHealthStatusValid:1; bool mProcessStatusValid:1; bool mEphemerisStateValid:1; bool mAlmanacStateValid:1; bool mElevationValid:1; bool mAzimuthValid:1; bool mCN0Valid:1; // Padding out 23 bits UINT8 mReserved3:7; UINT8 mReserved4[2]; eQMIPDSSVSystems mSystem; UINT8 mPRN; eQMIPDSSVHealthStatus mHealthLevel; eQMIPDSSVProcessingStatus mProcessingStatus; eQMIPDSSVEphemerisStatus mEphemerisState; eQMIPDSSVAlmanacStatus mAlmanacState; INT32 mElevation; UINT16 mAzimuth; UINT16 mCN0; }; // This array must be the size specified by mSVRecordCount // sSV mSVs[1]; }; // Structure to describe indication TLV 0x18 for PDS EventReport struct sPDSEventReportIndication_VXNetworkInitiatedPrompt { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe indication TLV 0x19 for PDS EventReport struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt { sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt1; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt2; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt3; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt4; }; // Structure to describe indication TLV 0x1A for PDS EventReport struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 { UINT8 mServiceTypeID; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt { sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5; }; // Structure to describe indication TLV 0x1B for PDS EventReport struct sPDSEventReportIndication_CommEvents { eQMIPDSCommEventTypes mType; eQMIPDSCommEventProtocols mProtocolDataType; }; // Structure to describe indication TLV 0x1C for PDS EventReport struct sPDSEventReportIndication_PositionSource { bool mGPS:1; bool mCellID:1; bool mGlonass:1; bool mNetwork:1; bool mEPI:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x1D for PDS EventReport struct sPDSEventReportIndication_AccelerometerStreamingStatus { eQMIPDSStreamingStatus mAccelerometerStreamingStatus; }; // Structure to describe indication TLV 0x1E for PDS EventReport struct sPDSEventReportIndication_GyroStreamingStatus { eQMIPDSStreamingStatus mGyroStreamingStatus; }; // Structure to describe indication TLV 0x1F for PDS EventReport struct sPDSEventReportIndication_TimeSyncRequest { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x20 for PDS EventReport struct sPDSEventReportIndication_PositionReliabilityCounter { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe indication TLV 0x21 for PDS EventReport struct sPDSEventReportIndication_SensorDataUsage { bool mAccelerometer:1; bool mGyro:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; bool mHeadingAidedWithSensorData:1; bool mSpeedAidedWithSensorData:1; bool mPositionAidedWithSensorData:1; bool mVelocityAidedWithSensorData:1; // Padding out 12 bits UINT8 mReserved3:4; UINT8 mReserved4; }; // Structure to describe indication TLV 0x22 for PDS EventReport struct sPDSEventReportIndication_TimeSourceInformation { INT8 mTimeValid; eQMIPDSTimeSource mTimeSource; UINT32 mTimeUncertaintyMilliseconds; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT32 mReserved1; UINT32 mReserved2; UINT32 mReserved3; UINT32 mReserved4; UINT32 mReserved5; }; // Structure to describe indication TLV 0x23 for PDS EventReport struct sPDSEventReportIndication_EncryptedPositionInformation { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe indication TLV 0x24 for PDS EventReport struct sPDSEventReportIndication_HeadingUncertaintyInformation { float mHeadingUncertainty; float mGNSSHeadingUncertainty; UINT32 mReserved1; UINT32 mReserved2; }; // Structure to describe indication TLV 0x25 for PDS EventReport struct sPDSEventReportIndication_ProprietaryNMEADebugSentences { // String is variable length, but must be size of the container // char mNMEADebug[1]; }; // Structure to describe indication TLV 0x26 for PDS EventReport struct sPDSEventReportIndication_ExtendedExternalXTRADatabaseRequest { UINT32 mMaximumFileSize; UINT8 mURLCount; UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe indication TLV 0x27 for PDS EventReport struct sPDSEventReportIndication_ServiceResetStatus { eQMIPDSResetStates mServiceResetStatus; }; // Structure to describe response TLV 0x01 for PDSGetServiceState() struct sPDSGetServiceStateResponse_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe indication TLV 0x01 for PDS ServiceStateIndication struct sPDSServiceStateIndication_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe request TLV 0x01 for PDSSetServiceState() struct sPDSSetServiceStateRequest_State { INT8 mServiceEnabled; }; // Structure to describe request TLV 0x01 for PDSStartTrackingSession() struct sPDSStartTrackingSessionRequest_Session { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetTrackingSessionInfo() struct sPDSGetTrackingSessionInfoResponse_Info { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe response TLV 0x10 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe request TLV 0x10 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSInjectTimeReference() struct sPDSInjectTimeReferenceRequest_Time { UINT64 mSystemTimeMilliseconds; UINT16 mSystemDiscontinuties; }; // Structure to describe response TLV 0x01 for PDSGetDefaults() struct sPDSGetDefaultsResponse_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe request TLV 0x01 for PDSSetDefaults() struct sPDSSetDefaultsRequest_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x10 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe response TLV 0x11 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe response TLV 0x12 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe response TLV 0x13 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Validity { UINT16 mValidPeriodGPSStartWeek; UINT16 mValidPeriodGPSStartWeekOffsetInMinutes; UINT16 mValidPeriodDurationInHours; }; // Structure to describe response TLV 0x14 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x10 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe request TLV 0x11 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe request TLV 0x12 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe request TLV 0x14 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x12 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x10 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerAddress { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe response TLV 0x11 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x10 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_Server { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe request TLV 0x11 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x12 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x01 for PDSGetServiceAutoTrackingState() struct sPDSGetServiceAutoTrackingStateResponse_State { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetServiceAutoTrackingState() struct sPDSSetServiceAutoTrackingStateRequest_State { INT8 mAutoTrackingEnabled; }; // Structure to describe response TLV 0x01 for PDSGetCOMPortAutoTrackingConfig() struct sPDSGetCOMPortAutoTrackingConfigResponse_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetCOMPortAutoTrackingConfig() struct sPDSSetCOMPortAutoTrackingConfigRequest_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x10 for PDSResetPDSData() struct sPDSResetPDSDataRequest_GPSData { bool mResetEPH:1; bool mResetALM:1; bool mResetPOS:1; bool mResetTIME:1; bool mResetIONO:1; bool mResetUTC:1; bool mResetHEALTH:1; bool mResetSVDIR:1; bool mResetSVSTEER:1; bool mResetSADATA:1; bool mResetRTI:1; bool mResetALMCORR:1; bool mResetFREQBIASEST:1; // Padding out 19 bits UINT8 mReserved1:3; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x11 for PDSResetPDSData() struct sPDSResetPDSDataRequest_CellData { bool mResetPOS:1; bool mResetLATESTGPSPOS:1; bool mResetOTAPOS:1; bool mResetEXTREFPOS:1; bool mResetTIMETAG:1; bool mResetCELLID:1; bool mResetCACHEDCELLID:1; bool mResetLASTSRVCELL:1; bool mResetCURSRVCELL:1; bool mResetNEIGHBORINFO:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x10 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Mode { eQMIPDSOperationTypes mSessionOperation; }; // Structure to describe request TLV 0x11 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Timeout { UINT8 mTimeoutSeconds; }; // Structure to describe request TLV 0x12 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Accuracy { UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetServiceVersion() struct sPDSGetServiceVersionResponse_Version { UINT8 mServiceMajorVersion; UINT8 mServiceMinorVersion; }; // Structure to describe request TLV 0x01 for PDSInjectXTRAData() struct sPDSInjectXTRADataRequest_Data { UINT8 mSequenceNumber; UINT16 mTotalLength; UINT16 mSequenceLength; // This array must be the size specified by mSequenceLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Timestamp { UINT64 mUTCTimestamp; }; // Structure to describe request TLV 0x11 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Latitude { double mLatitude; }; // Structure to describe request TLV 0x12 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Longitude { double mLongitude; }; // Structure to describe request TLV 0x13 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeEllipsoid { float mEllipsoidAltitude; }; // Structure to describe request TLV 0x14 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeSeaLevel { float mMeanSeaLevelAltitude; }; // Structure to describe request TLV 0x15 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalUncertainty { float mHorizontalUncertaintyCircular; }; // Structure to describe request TLV 0x16 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalUncertainty { float mVerticalUncertainty; }; // Structure to describe request TLV 0x17 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalConfidence { UINT8 mHorizontalConfidence; }; // Structure to describe request TLV 0x18 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalConfidence { UINT8 mVerticalConfidence; }; // Structure to describe request TLV 0x19 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Source { eQMIPDSInjectedPositionSources mSource; }; // Structure to describe request TLV 0x1A for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_TimeType { eQMIPDSTimeType mTimeType; }; // Structure to describe request TLV 0x1B for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe request TLV 0x1C for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeInformation { eQMIPDSAltitudeSource mAltitudeSource; eQMIPDSSourceLinkage mSourceLinkage; eQMIPDSUncertaintyCoverage mUncertaintyCoverage; }; // Structure to describe request TLV 0x10 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Time { UINT32 mWiFiTimeCounterMilliseconds; }; // Structure to describe request TLV 0x11 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Position { INT32 mWiFiLatitude; INT32 mWiFiLongitude; UINT16 mHEPEInMeters; UINT8 mAPCount; UINT8 mErrorCode; }; // Structure to describe request TLV 0x12 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_APInfo { UINT8 mAPCount; struct sAP { UINT8 mMACAddress[6]; UINT32 mRSSI; UINT16 mBeaconChannel; bool mUsedForPosition:1; bool mHiddenSSID:1; bool mEncryptionOn:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mAPCount // sAP mAPs[1]; }; // Structure to describe request TLV 0x13 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; }; // Structure to describe response TLV 0x10 for PDSGetSBASConfig() struct sPDSGetSBASConfigResponse_Config { eQMIPDSSBASStates mState; }; // Structure to describe request TLV 0x10 for PDSSetSBASConfig() struct sPDSSetSBASConfigRequest_Config { INT8 mEnableSBAS; }; // Structure to describe request TLV 0x01 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_Action { INT8 mAllowRequest; }; // Structure to describe request TLV 0x10 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_VX { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe request TLV 0x11 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_SUPL1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL { sPDSSendNetworkInitiatedResponseRequest_SUPL1 mPDSSendNetworkInitiatedResponseRequest_SUPL1; sPDSSendNetworkInitiatedResponseRequest_SUPL2 mPDSSendNetworkInitiatedResponseRequest_SUPL2; sPDSSendNetworkInitiatedResponseRequest_SUPL3 mPDSSendNetworkInitiatedResponseRequest_SUPL3; sPDSSendNetworkInitiatedResponseRequest_SUPL4 mPDSSendNetworkInitiatedResponseRequest_SUPL4; }; // Structure to describe request TLV 0x12 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 { UINT8 mServiceTypeID; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP { sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 mPDSSendNetworkInitiatedResponseRequest_UMTSCP1; sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 mPDSSendNetworkInitiatedResponseRequest_UMTSCP2; sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 mPDSSendNetworkInitiatedResponseRequest_UMTSCP3; sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 mPDSSendNetworkInitiatedResponseRequest_UMTSCP4; sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 mPDSSendNetworkInitiatedResponseRequest_UMTSCP5; }; // Structure to describe request TLV 0x01 for PDSInjectAbsoluteTime() struct sPDSInjectAbsoluteTimeRequest_Time { UINT64 mTimestampMilliseconds; UINT32 mTimeUncertaintyMilliseconds; eQMIPDSTimeBases mTimeBase; INT8 mForceAcceptance; }; // Structure to describe request TLV 0x01 for PDSInjectEFSData() struct sPDSInjectEFSDataRequest_DateFile1 { UINT8 mFilenameLength; // This array must be the size specified by mFilenameLength // char mFilename[1]; }; struct sPDSInjectEFSDataRequest_DateFile2 { eQMIPDSEFSFileOperations mFileOperation; UINT32 mDataLength; UINT8 mPartNumber; UINT8 mTotalParts; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; struct sPDSInjectEFSDataRequest_DateFile { sPDSInjectEFSDataRequest_DateFile1 mPDSInjectEFSDataRequest_DateFile1; sPDSInjectEFSDataRequest_DateFile2 mPDSInjectEFSDataRequest_DateFile2; }; // Structure to describe response TLV 0x10 for PDSGetDPOConfig() struct sPDSGetDPOConfigResponse_Config { INT8 mDataPowerOptimizationEnabled; }; // Structure to describe request TLV 0x10 for PDSSetDPOConfig() struct sPDSSetDPOConfigRequest_Config { eQMIPDSConfig mConfiguration; }; // Structure to describe response TLV 0x10 for PDSGetODPConfig() struct sPDSGetODPConfigResponse_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe request TLV 0x10 for PDSSetODPConfig() struct sPDSSetODPConfigRequest_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe response TLV 0x10 for PDSGetGPSState() struct sPDSGetGPSStateResponse_State { INT8 mEngineEnabled; bool mPositionValid:1; bool mAltitudeVerticalUncertaintyValid:1; bool mTimeMillisecondsValid:1; bool mTimeWeekNumberValid:1; bool mTimeUncertaintyValid:1; bool mIonoValid:1; bool mGPSEphemerisValid:1; bool mGPSAlmanacValid:1; bool mGPSHealthValid:1; bool mGPSVisibleSVsValid:1; bool mGlonassEphemerisValid:1; bool mGlonassAlmanacValid:1; bool mGlonassHealthValid:1; bool mGlonassVisibleSVsValid:1; bool mSBASEphemerisValid:1; bool mSBASAlmanacValid:1; bool mSBASHealthValid:1; bool mSBASVisibleSVsValid:1; bool mXTRAInformationValid:1; // Padding out 5 bits UINT8 mReserved1:5; double mLatitude; double mLongitude; float mHorizontalUncertaintyCircular; float mEllipsoidAltitude; float mVerticalUncertainty; UINT32 mTimestampInTOWMilliseconds; UINT16 mGPSWeekNumber; UINT32 mTimeUncertaintyMilliseconds; INT8 mIonoIsValid; UINT32 mGPSEphemerisSVMask; UINT32 mGPSAlmanacSVMask; UINT32 mGPSHealthSVMask; UINT32 mGPSVisibleSVMask; UINT32 mGlonassEphemerisSVMask; UINT32 mGlonassAlmanacSVMask; UINT32 mGlonassHealthSVMask; UINT32 mGlonassVisibleSVMask; UINT32 mSBASEphemerisSVMask; UINT32 mSBASAlmanacSVMask; UINT32 mSBASHealthSVMask; UINT32 mSBASVisibleSVMask; UINT16 mXTRAGPSStartWeek; UINT16 mXTRAGPSStartMinutes; INT32 mElevation; }; // Structure to describe request TLV 0x01 for PDSSetPPMEventReport() struct sPDSSetPPMEventReportRequest_ReportPPMEvents { INT8 mReportPPMEvents; }; // Structure to describe request TLV 0x01 for PDSSetSPIStreamingReport() struct sPDSSetSPIStreamingReportRequest_ReportEvents { INT8 mReportSPIEvents; }; // Structure to describe indication TLV 0x10 for PDS SetSPIStreamingReportIndication struct sPDSSetSPIStreamingReportIndication_SPIStreamingRequest { INT8 mStreamSPIStatus; }; // Structure to describe request TLV 0x01 for PDSSetSPIStatus() struct sPDSSetSPIStatusRequest_Status { eQMIPDSSPIState mSPIState; UINT8 mSPIConfidence; }; // Structure to describe request TLV 0x01 for PDSSetPPMReportingState() struct sPDSSetPPMReportingStateRequest_PPMReportingState { eQMIPDSReportingState mReportingState; UINT16 mReportingPeriodSeconds; }; // Structure to describe indication TLV 0x10 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMPageReport { UINT32 mPageTimeMilliseconds; UINT16 mPagePNOffset; UINT8 mPageBandClass; UINT16 mPageCDMAFrequency; UINT16 mPageBaseID; UINT16 mPageSystemID; UINT16 mPageNetworkID; }; // Structure to describe indication TLV 0x11 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMMeasurementReport { UINT32 mReferenceTimeMilliseconds; UINT8 mReferenceBandClass; UINT16 mReferenceCDMAFrequency; UINT8 mReferenceTotalRXPower; UINT16 mReferencePNOffset; UINT8 mReferenceStrength; UINT8 mReferenceRMSErrorPhase; UINT8 mNumberOfPilots; struct sPilot { UINT16 mPilotPNOffset; UINT8 mPilotStrength; UINT8 mPilotRMSErrorPhase; INT16 mPilotPhase; }; // This array must be the size specified by mNumberOfPilots // sPilot mPilots[1]; }; // Structure to describe indication TLV 0x12 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMSuspendReason { eQMIPDSSuspendReason mSuspendReason; }; // Structure to describe indication TLV 0x13 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMStopReason { eQMIPDSStopReason mStopReason; }; // Structure to describe request TLV 0x01 for PDSForceReceiverOff() struct sPDSForceReceiverOffRequest_ForceReceiverOff { eQMIPDSForceReceiverOff mForceReceiverOff; }; // Structure to describe response TLV 0x10 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x11 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x12 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x11 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x12 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisAccelerometerData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe request TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisGyroData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe response TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_AccelerometerSampleSetCount { UINT8 mAccelerometerSampleSetCount; }; // Structure to describe response TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_GyroSampleSetCount { UINT8 mGyroSampleSetCount; }; // Structure to describe request TLV 0x01 for PDSInjectTimeSyncData() struct sPDSInjectTimeSyncDataRequest_TimeTag { UINT32 mReferenceCounter; UINT32 mSensorProcessorRXTimeMilliseconds; UINT32 mSensorProcessorTXTimeMilliseconds; }; // Structure to describe response TLV 0x10 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe response TLV 0x11 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_ExternalPowerSupplyState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe request TLV 0x10 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe request TLV 0x11 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_ExternalPowerState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe response TLV 0x10 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe response TLV 0x11 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe response TLV 0x12 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VirtualGyroGravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe response TLV 0x13 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe response TLV 0x14 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe response TLV 0x15 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x16 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x17 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x18 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x19 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x1A for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x1B for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe response TLV 0x1C for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe response TLV 0x1D for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe request TLV 0x10 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe request TLV 0x11 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe request TLV 0x12 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VirtualGyroCravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe request TLV 0x13 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe request TLV 0x14 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe request TLV 0x15 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x16 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x17 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x18 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x19 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x1A for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x1B for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe request TLV 0x1C for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe request TLV 0x1D for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe request TLV 0x10 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BlankingEnable { eQMIPDSBlankingEnable mBlankingEnable; }; // Structure to describe request TLV 0x11 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_ActiveChannels { bool mChannel1:1; bool mChannel2:1; bool mChannel3:1; bool mChannel4:1; bool mChannel5:1; bool mChannel6:1; bool mChannel7:1; bool mChannel8:1; bool mChannel9:1; bool mChannel10:1; bool mChannel11:1; bool mChannel12:1; bool mChannel13:1; bool mChannel14:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BluetoothJamming { INT8 mBluetoothJammingActive; }; // Structure to describe request TLV 0x13 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_IMDJamming { eQMIPDSIMDJammingStates mSimulateIMDJamming; }; // Structure to describe request TLV 0x14 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_JammingBands { eQMIPDSIMDJammingBands mBandstoJam; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallengeReport() struct sPDSSetSecurityChallengeReportRequest_EnableSecurity { eQMIPDSReportSecurityChallenge mReportSecurityChallenge; }; // Structure to describe indication TLV 0x10 for PDS SetSecurityChallengeReportIndication struct sPDSSetSecurityChallengeReportIndication_EnableSecurity { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallenge() struct sPDSSetSecurityChallengeRequest_SecureHashAlgorithm { UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe response TLV 0x10 for PDSGetSecurityEncryptionConfig() struct sPDSGetSecurityEncryptionConfigResponse_SecureClientTimestamp { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT64 mEncryptionTimestampMilliseconds; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityUpdateRate() struct sPDSSetSecurityUpdateRateRequest_EnableSecurity { UINT8 mUpdateRate; }; // Structure to describe request TLV 0x10 for PDSSetCellDatabaseControl() struct sPDSSetCellDatabaseControlRequest_Control { bool mPositionInfoStorage:1; bool mTimeInfoStorage:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PDSInjectMotionData() struct sPDSInjectMotionDataRequest_MotionData { eQMIPDSMotionStates mMotionState; eQMIPDSMotionModes mMotionMode; eQMIPDSMotionSubmodes mMotionSubmode; float mStateProbability; UINT16 mMotionDataAgeMilliseconds; UINT16 mMotionDataTimoutMilliseconds; }; // Structure to describe request TLV 0x01 for PDSSetGNSSEngineErrorRecoveryReport() struct sPDSSetGNSSEngineErrorRecoveryReportRequest_Indicator { INT8 mReportGNSSEngineErrorRecovery; }; // Structure to describe indication TLV 0x01 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_Reason { eQMIPDSResetReasons mResetReason; }; // Structure to describe indication TLV 0x10 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_CurrentSystemTime { UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x11 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ScanParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mCN0; UINT16 mSubMillisecondDifferenceMicroseconds; INT16 mDopplerDifferenceHz; }; // Structure to describe indication TLV 0x12 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ClockParameters { eQMIPDSSVSystems mSystem; eQMIPDSTimeSource mCurrentTimeSource; eQMIPDSTimeSource mInjectedTimeSource; UINT32 mTimeDifferenceMilliseconds; UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe indication TLV 0x13 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_SubframeParameters { UINT8 mPRN; INT32 mGPSDataDemodulationINProgress; UINT16 mObservedCycleSlips; UINT16 mParityErrors; UINT32 mGPSSubframeWordWithTimingError; }; // Structure to describe indication TLV 0x14 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_TimeParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT16 mGNSSNumberOfDays; UINT32 mGNSSMilliseconds; UINT32 mClockDifferenceMilliseconds; }; // Structure to describe indication TLV 0x15 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_MeasurementParameters { eQMIPDSSVSystems mSystem; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT8 mObservedMeasurementInconsistencies; UINT16 mObservationDuration; }; // Structure to describe indication TLV 0x16 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_RFParameters { UINT32 mQualitySignalStrength; UINT32 mResetSignalStrength; }; // Structure to describe request TLV 0x10 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeUncertainty { UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe request TLV 0x11 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionUncertainty { UINT32 mPositionUncertaintyCentimeters; }; // Structure to describe request TLV 0x12 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeOffset { UINT64 mTimeOffsetMicroseconds; }; // Structure to describe request TLV 0x13 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionOffset { UINT32 mPositionOffsetMeters; }; // Structure to describe request TLV 0x01 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_PeakAntennaGain { INT16 mPeakAntennaGain; }; // Structure to describe request TLV 0x10 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GPSRFLoss { UINT16 mRFLoss; }; // Structure to describe request TLV 0x11 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GlonassRFLoss { UINT16 mRFLossFrequency0; UINT16 mRFLossFrequencyMinus7; UINT16 mRFLossFrequencyPlus6; }; // Structure to describe request TLV 0x10 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MethodMask { bool mEAPSIM:1; bool mEAPAKA:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketRequest_RequestPacket { UINT8 mEAPRequestPacket[9999]; }; // Structure to describe response TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketResponse_ResponsePacket { UINT8 mResponsePacket[9999]; }; // Structure to describe indication TLV 0x01 for AUTH EAPSessionResultIndication struct sAUTHEAPSessionResultIndication_Result { eQMIAUTHEAPResult mResult; }; // Structure to describe response TLV 0x01 for AUTHGetEAPSessionKeys() struct sAUTHGetEAPSessionKeysResponse_SessionKeys { UINT8 mSessionKeys[9999]; }; // Structure to describe request TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKARequest_Version { eQMIAUTHAKAVersion mAKAVersion; }; // Structure to describe request TLV 0x10 for AUTHRunAKA() struct sAUTHRunAKARequest_Parameters1 { UINT8 mRandomChallengeLength; // This array must be the size specified by mRandomChallengeLength // UINT8 mRandomChallenge[1]; }; struct sAUTHRunAKARequest_Parameters2 { UINT8 mAuthenticationTokenLength; // This array must be the size specified by mAuthenticationTokenLength // UINT8 mAuthenticationToken[1]; }; struct sAUTHRunAKARequest_Parameters { sAUTHRunAKARequest_Parameters1 mAUTHRunAKARequest_Parameters1; sAUTHRunAKARequest_Parameters2 mAUTHRunAKARequest_Parameters2; }; // Structure to describe response TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKAResponse_Handle { UINT32 mHandle; }; // Structure to describe indication TLV 0x01 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_Result { UINT32 mHandle; eQMIAUTHAKAResult mResult; }; // Structure to describe request TLV 0x10 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_DTMF { INT8 mEnableEvents; }; // Structure to describe request TLV 0x11 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_VoicePrivacy { INT8 mEnableEvents; }; // Structure to describe request TLV 0x12 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SupplementaryService { INT8 mEnableEvents; }; // Structure to describe request TLV 0x01 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallingNumber { // String is variable length, but must be size of the container // char mCallingNumber[1]; }; // Structure to describe request TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CLIR { eQMIVoiceCLIRTypes mCLIRType; }; // Structure to describe request TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CUG { UINT16 mCUGIndex; INT8 mSuppressPreferentialCUG; INT8 mSuppressOASubscription; }; // Structure to describe request TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_EmergencyCategory { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualCall:1; bool mAutomaticCall:1; bool mReserved:1; }; // Structure to describe request TLV 0x15 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CalledPartySubaddress { eQMIVoiceSubaddressTypes mSubaddressType; eQMIVoiceEvenOddIndicators mAddressSignals; UINT8 mSubaddressLength; // This array must be the size specified by mSubaddressLength // UINT8 mSubaddress[1]; }; // Structure to describe request TLV 0x16 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_ServiceType { eQMIVoiceServiceTypes mServiceType; }; // Structure to describe response TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceCallEnd() struct sVoiceCallEndRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceCallEnd() struct sVoiceCallEndResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceGetCallInfo() struct sVoiceGetCallInfoRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_CallInfo { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; }; // Structure to describe response TLV 0x11 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyNumber { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x12 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ServiceOption { UINT16 mServiceOption; }; // Structure to describe response TLV 0x13 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x14 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x15 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyName { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // Structure to describe response TLV 0x16 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingType { eQMIVoiceAlertingTypes mAlertingType; }; // Structure to describe response TLV 0x18 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x19 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x1A for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_DiagnosticInfo { UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // Structure to describe response TLV 0x1B for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingPattern { eQMIVoiceAlertingPatterns mAlertingPattern; }; // Structure to describe indication TLV 0x10 for Voice OTASPIndication struct sVoiceOTASPIndication_OTASPStatus { UINT8 mCallID; eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe indication TLV 0x01 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Signal { UINT8 mSignalType; UINT8 mAlertPitch; UINT8 mSignal; }; // Structure to describe indication TLV 0x11 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerID { UINT8 mPresentationIndicator; UINT8 mCallerIDLength; // This array must be the size specified by mCallerIDLength // char mCallerID[1]; }; // Structure to describe indication TLV 0x12 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Display { // String is variable length, but must be size of the container // char mDisplayBuffer[1]; }; // Structure to describe indication TLV 0x13 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplay { UINT8 mExtendedDisplayBuffer[182]; }; // Structure to describe indication TLV 0x14 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerName { // String is variable length, but must be size of the container // char mCallerName[1]; }; // Structure to describe indication TLV 0x15 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallWaiting { INT8 mNewCallWaiting; }; // Structure to describe indication TLV 0x16 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x17 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallingPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x18 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CalledPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x19 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_RedirectingNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mRedirectReason; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x1A for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CLIRCause { eQMIVoiceCLIRCauses mCLIRCause; }; // Structure to describe indication TLV 0x1B for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSAudio { UINT8 mUpLink; UINT8 mDownLink; }; // Structure to describe indication TLV 0x1C for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSRelease { eQMIVoiceNSSReleases mNSSRelease; }; // Structure to describe indication TLV 0x1D for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_LineControlInfo { INT8 mPolarityIncluded; INT8 mToggleMode; INT8 mReversePolarity; UINT8 mPowerDenialTime; }; // Structure to describe indication TLV 0x1E for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplayInfo { UINT8 mDisplayType; UINT8 mExtendedDisplayInfoLength; // This array must be the size specified by mExtendedDisplayInfoLength // UINT8 mExtendedDisplayInfo[1]; }; // Structure to describe request TLV 0x01 for VoiceSendFlash() struct sVoiceSendFlashRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashRequest_Payload { // String is variable length, but must be size of the container // char mFlashPayload[1]; }; // Structure to describe request TLV 0x11 for VoiceSendFlash() struct sVoiceSendFlashRequest_Type { eQMIVoiceFlashTypes mFlashType; }; // Structure to describe response TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Info { UINT8 mCallID; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe request TLV 0x10 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceStartContinuousDTMF() struct sVoiceStartContinuousDTMFRequest_Info { UINT8 mCallID; char mDTMFDigit; }; // Structure to describe response TLV 0x10 for VoiceStartContinuous() struct sVoiceStartContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceStopContinuousDTMF() struct sVoiceStopContinuousDTMFRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceStopContinuous() struct sVoiceStopContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x01 for Voice DTMFIndication struct sVoiceDTMFIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFEvents mDTMFEvent; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe indication TLV 0x10 for Voice DTMFIndication struct sVoiceDTMFIndication_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceSetPreferredPrivacy() struct sVoiceSetPreferredPrivacyRequest_Preference { eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice PrivacyIndication struct sVoicePrivacyIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x10 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x13 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x14 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mCallEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x15 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x17 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x18 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x19 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x1A for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x10 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x12 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x13 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x14 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_UUS { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x15 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x17 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x18 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mCallEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x19 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1A for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1B for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1C for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1D for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1E for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for VoiceManageCalls() struct sVoiceManageCallsRequest_Info { eQMIVoiceSupplementaryServiceCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x01 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_Info { UINT8 mCallID; eQMIVoiceSupplementaryNotificationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_CUG { UINT16 mCUGIndex; }; // Structure to describe indication TLV 0x11 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_ECT { eQMIVoiceECTCallStates mECTCallState; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x01 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Info { eQMIVoiceSupplementaryServiceTypes mService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_CallForwarding { eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; }; // Structure to describe response TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallWaitinge() struct sVoiceGetCallWaitingeResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_Status { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_Status { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe response TLV 0x11 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_Info { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for VoiceSetCallBarringPassword() struct sVoiceSetCallBarringPasswordRequest_Info { eQMIVoiceSupplementaryServiceReasons mReason; char mOldCallBarringPassword[4]; char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe response TLV 0x10 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_FailureCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x10 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x13 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceAnswerUSSD() struct sVoiceAnswerUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x01 for Voice USSDIndication struct sVoiceUSSDIndication_Type { eQMIVoiceUSSDNotifcationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice USSDIndication struct sVoiceUSSDIndication_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x01 for Voice USSIndication struct sVoiceUSSIndication_Info { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigRequest_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe request TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigRequest_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe request TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigRequest_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe request TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigRequest_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe request TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe request TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe response TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigResponse_AutoAnswer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigResponse_AirTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigResponse_RoamTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigResponse_TTYMode { INT8 mWriteFailed; }; // Structure to describe response TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceSO { INT8 mWriteFailed; }; // Structure to describe response TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceDomain { INT8 mWriteFailed; }; // Structure to describe request TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigRequest_AutoAnswer { INT8 mInclude; }; // Structure to describe request TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigRequest_AirTimer { INT8 mInclude; }; // Structure to describe request TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigRequest_RoamTimer { INT8 mInclude; }; // Structure to describe request TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigRequest_TTYMode { INT8 mInclude; }; // Structure to describe request TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoiceSO { INT8 mInclude; }; // Structure to describe request TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigRequest_AMRStatus { INT8 mInclude; }; // Structure to describe request TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoicePrivacy { INT8 mInclude; }; // Structure to describe request TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigRequest_NAM { UINT8 mNAMID; }; // Structure to describe request TLV 0x18 for VoiceGetConfig() struct sVoiceGetConfigRequest_VoiceDomain { INT8 mInclude; }; // Structure to describe response TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigResponse_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe response TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigResponse_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe response TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigResponse_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe response TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigResponse_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe response TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe response TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigResponse_AMRConfig { INT8 mGSMAMR; bool mWCDMAAMRWB:1; bool mGSMHRAMR:1; bool mGSMAMRWB:1; bool mGSMAMRNB:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigResponse_Privacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe request TLV 0x01 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Info { eQMIVoiceSupplementaryServiceRequests mSupplementaryServiceRequest; INT8 mModifiedByCallControl; }; // Structure to describe request TLV 0x10 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Class { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x12 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_USSData { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe request TLV 0x15 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x16 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe request TLV 0x17 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x18 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_NewPassword { char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe request TLV 0x19 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_DataSource { INT8 mResponseData; }; // Structure to describe request TLV 0x1A for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe request TLV 0x1B for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallForwarding { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x1C for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIR { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe request TLV 0x1D for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIP { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe request TLV 0x1E for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x1F for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x20 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x01 for VoiceAsyncInitiateUSSD() struct sVoiceAsyncInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x10 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x11 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x12 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x13 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe request TLV 0x01 for VoiceBindSubscription() struct sVoiceBindSubscriptionRequest_Type { eQMIVoiceSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for VoiceALSSetLineSwitching() struct sVoiceALSSetLineSwitchingRequest_Switching { INT8 mLineSwitchingAllowed; }; // Structure to describe request TLV 0x01 for VoiceALSSelectLine() struct sVoiceALSSelectLineRequest_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe request TLV 0x01 for VoiceAOCSetACMMaximum() struct sVoiceAOCSetACMMaximumRequest_ACMMax { UINT32 mACMMaximum; }; // Structure to describe request TLV 0x01 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoRequest_Mask { bool mACM:1; bool mACMMaximum:1; bool mCCM:1; // Padding out 13 bits UINT8 mReserved1:5; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACM { UINT32 mACM; }; // Structure to describe response TLV 0x11 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACMMax { UINT32 mACMMaximum; }; // Structure to describe response TLV 0x12 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_CCM { UINT32 mCCM; }; // Structure to describe response TLV 0x10 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_Info { eQMIVoiceVoIPSUPSCallTypes mSupplementaryServiceType; }; // Structure to describe response TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe request TLV 0x12 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe indication TLV 0x10 for CAT2 EventReport struct sCAT2EventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT2 EventReport struct sCAT2EventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT2 EventReport struct sCAT2EventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT2 EventReport struct sCAT2EventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT2 EventReport struct sCAT2EventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT2 EventReport struct sCAT2EventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT2 EventReport struct sCAT2EventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT2 EventReport struct sCAT2EventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT2 EventReport struct sCAT2EventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT2 EventReport struct sCAT2EventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT2 EventReport struct sCAT2EventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT2 EventReport struct sCAT2EventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT2 EventReport struct sCAT2EventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT2 EventReport struct sCAT2EventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT2 EventReport struct sCAT2EventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT2 EventReport struct sCAT2EventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT2 EventReport struct sCAT2EventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT2 EventReport struct sCAT2EventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT2 EventReport struct sCAT2EventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT2 EventReport struct sCAT2EventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT2 EventReport struct sCAT2EventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT2 EventReport struct sCAT2EventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT2 EventReport struct sCAT2EventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT2 EventReport struct sCAT2EventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT2 EventReport struct sCAT2EventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT2 EventReport struct sCAT2EventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT2 EventReport struct sCAT2EventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT2 EventReport struct sCAT2EventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT2 EventReport struct sCAT2EventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT2 EventReport struct sCAT2EventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT2 EventReport struct sCAT2EventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT2 EventReport struct sCAT2EventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT2 EventReport struct sCAT2EventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT2 EventReport struct sCAT2EventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT2 EventReport struct sCAT2EventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT2 EventReport struct sCAT2EventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT2 EventReport struct sCAT2EventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT2 EventReport struct sCAT2EventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT2 EventReport struct sCAT2EventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT2 EventReport struct sCAT2EventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT2 EventReport struct sCAT2EventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT2 EventReport struct sCAT2EventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT2 EventReport struct sCAT2EventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT2 EventReport struct sCAT2EventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT2 EventReport struct sCAT2EventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT2 EventReport struct sCAT2EventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT2 EventReport struct sCAT2EventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT2 EventReport struct sCAT2EventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT2 EventReport struct sCAT2EventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT2 EventReport struct sCAT2EventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT2 EventReport struct sCAT2EventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT2 EventReport struct sCAT2EventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT2 EventReport struct sCAT2EventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT2 EventReport struct sCAT2EventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT2 EventReport struct sCAT2EventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT2 EventReport struct sCAT2EventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT2 EventReport struct sCAT2EventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT2 EventReport struct sCAT2EventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT2 EventReport struct sCAT2EventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT2 EventReport struct sCAT2EventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT2 EventReport struct sCAT2EventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT2 EventReport struct sCAT2EventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT2 EventReport struct sCAT2EventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT2 EventReport struct sCAT2EventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT2 EventReport struct sCAT2EventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT2 EventReport struct sCAT2EventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT2 EventReport struct sCAT2EventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT2 EventReport struct sCAT2EventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT2 EventReport struct sCAT2EventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT2 EventReport struct sCAT2EventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT2 EventReport struct sCAT2EventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT2 EventReport struct sCAT2EventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT2 EventReport struct sCAT2EventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT2 EventReport struct sCAT2EventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x01 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; bool mCommonActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; bool mControlActivate:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved6:6; }; // Structure to describe request TLV 0x01 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2SendTerminal() struct sCAT2SendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2GetEventReport() struct sCAT2GetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedTerminal() struct sCAT2SendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSCloseChannelIndication struct sCAT2SCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for UIMReadTransparent() struct sUIMReadTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadTransparent() struct sUIMReadTransparentRequest_Buffer { UINT16 mOffset; UINT16 mLength; }; // Structure to describe request TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe request TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentRequest_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadTransparent() struct sUIMReadTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMReadTransparent() struct sUIMReadTransparentResponse_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x14 for UIMReadTransparent() struct sUIMReadTransparentResponse_RequestedLength { UINT16 mFileLength; }; // Structure to describe indication TLV 0x01 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_Encryption { INT8 mDataEncrypted; }; // Structure to describe indication TLV 0x13 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_RequestedLength { UINT16 mFileLength; }; // Structure to describe request TLV 0x01 for UIMReadRecord() struct sUIMReadRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadRecord() struct sUIMReadRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; }; // Structure to describe request TLV 0x10 for UIMReadRecord() struct sUIMReadRecordRequest_LastRecord { UINT16 mRecordNumber; }; // Structure to describe request TLV 0x11 for UIMReadRecord() struct sUIMReadRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMReadRecord() struct sUIMReadRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadRecord() struct sUIMReadRecordResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadRecord() struct sUIMReadRecordResponse_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe response TLV 0x13 for UIMReadRecord() struct sUIMReadRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ReadRecordIndication struct sUIMReadRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadRecordIndication struct sUIMReadRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadRecordIndication struct sUIMReadRecordIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadRecordIndication struct sUIMReadRecordIndication_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_Buffer { UINT16 mOffset; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_ResponseInIndicaiton { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMWriteRecord() struct sUIMWriteRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteRecord() struct sUIMWriteRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteRecord() struct sUIMWriteRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_Attributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_FileAttributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMVerifyPIN() struct sUIMVerifyPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINRequest_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMUnblockPIN() struct sUIMUnblockPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMUnblockPIN() struct sUIMUnblockPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMChangePIN() struct sUIMChangePINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMChangePIN() struct sUIMChangePINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMChangePIN() struct sUIMChangePINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMChangePIN() struct sUIMChangePINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMChangePIN() struct sUIMChangePINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMChangePIN() struct sUIMChangePINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ChangePINIndication struct sUIMChangePINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ChangePINIndication struct sUIMChangePINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM ChangePINIndication struct sUIMChangePINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMDepersonalization() struct sUIMDepersonalizationRequest_Info { eQMIUIMPersonalizationFeatures mFeature; eQMIUIMCKSessionOperations mOperation; UINT8 mCKLength; // This array must be the size specified by mCKLength // char mCKValue[1]; }; // Structure to describe response TLV 0x10 for UIMDepersonalization() struct sUIMDepersonalizationResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for UIMRefreshRegister() struct sUIMRefreshRegisterRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshOK() struct sUIMRefreshOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshComplete() struct sUIMRefreshCompleteRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventResponse_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent { sUIMGetLastRefreshEventResponse_RefreshEvent1 mUIMGetLastRefreshEventResponse_RefreshEvent1; sUIMGetLastRefreshEventResponse_RefreshEvent2 mUIMGetLastRefreshEventResponse_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMEventRegistration() struct sUIMEventRegistrationRequest_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMEventRegistration() struct sUIMEventRegistrationResponse_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetCardStatusResponse_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMGetCardStatusResponse_Status { sUIMGetCardStatusResponse_Status1 mUIMGetCardStatusResponse_Status1; sUIMGetCardStatusResponse_Status2 mUIMGetCardStatusResponse_Status2; }; // Structure to describe response TLV 0x11 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_HotSwapStatus { UINT8 mHotSwapLength; // This array must be the size specified by mHotSwapLength // eQMIUIMHotSwap mHotSwap[1]; }; // Structure to describe request TLV 0x01 for UIMPowerDown() struct sUIMPowerDownRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMPowerUp() struct sUIMPowerUpRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMPowerUp() struct sUIMPowerUpRequest_IgnoreHotSwapSwitch { INT8 mIgnoreHotSwapSwitch; }; // Structure to describe indication TLV 0x10 for UIM CardStatusIndication struct sUIMCardStatusIndication_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMCardStatusIndication_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMCardStatusIndication_Status { sUIMCardStatusIndication_Status1 mUIMCardStatusIndication_Status1; sUIMCardStatusIndication_Status2 mUIMCardStatusIndication_Status2; }; // Structure to describe indication TLV 0x10 for UIM RefreshIndication struct sUIMRefreshIndication_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMRefreshIndication_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMRefreshIndication_RefreshEvent { sUIMRefreshIndication_RefreshEvent1 mUIMRefreshIndication_RefreshEvent1; sUIMRefreshIndication_RefreshEvent2 mUIMRefreshIndication_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMAuthenticate() struct sUIMAuthenticateRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMAuthenticate() struct sUIMAuthenticateResponse_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMAuthenticate() struct sUIMAuthenticateResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x01 for UIMCloseSession() struct sUIMCloseSessionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetServiceStatus() struct sUIMGetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_FDNStatus { eQMIUIMFDNStatusValues mFDNStatus; }; // Structure to describe response TLV 0x11 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_HiddenKeyStatus { eQMIUIMHiddenKeyStatusValues mHiddenKeyStatus; }; // Structure to describe response TLV 0x12 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_Index { UINT8 mEFDIRIndex; }; // Structure to describe response TLV 0x13 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_ESNStatus { INT8 mESNChanged; }; // Structure to describe request TLV 0x01 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_FDNStatus { INT8 mEnableFDN; }; // Structure to describe request TLV 0x01 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_SessionChange { eQMIUIMSessionTypes mSessionType; eQMIUIMCKSessionOperations mOperation; }; // Structure to describe request TLV 0x10 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLabel() struct sUIMGetLabelRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLabel() struct sUIMGetLabelResponse_AppLabel { UINT8 mLabelLength; // This array must be the size specified by mLabelLength // char mLabelValue[1]; }; // Structure to describe request TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationRequest_Mask { bool mAutomaticSelection:1; bool mPersonalizationStatus:1; bool mHaltSubscription:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_AutoSelection { INT8 mAutomaticProvisioningOn; }; // Structure to describe response TLV 0x11 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Personalization { UINT8 mFeatureCount; struct sFeature { eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // This array must be the size specified by mFeatureCount // sFeature mFeatures[1]; }; // Structure to describe response TLV 0x12 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Subscription { INT8 mPublishSubscription; }; // Structure to describe request TLV 0x01 for UIMSendADPU() struct sUIMSendADPURequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSendADPU() struct sUIMSendADPURequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x11 for UIMSendADPU() struct sUIMSendADPURequest_IntermediateProcedureBytes { eQMIUIMAPDUResponseStatus mIntermediateProcedureBytes; }; // Structure to describe response TLV 0x10 for UIMSendADPU() struct sUIMSendADPUResponse_APDUResponse { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSendADPU() struct sUIMSendADPUResponse_LongAPDUResponse { UINT16 mTotalLength; UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SendADPUIndication struct sUIMSendADPUIndication_APDUResponseChunk { UINT32 mIndicationToken; UINT16 mTotalLength; UINT16 mOffset; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for UIMSAPConnection() struct sUIMSAPConnectionRequest_Slot { eQMIUIMConnectOperations mOperation; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionRequest_DisconnectMode { eQMIUIMDisonnectModes mDisconnectMode; }; // Structure to describe request TLV 0x11 for UIMSAPConnection() struct sUIMSAPConnectionRequest_IntermediateGetResponse { INT8 mReturnIntermediateGetResponse; }; // Structure to describe response TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionResponse_State { eQMIUIMSAPStates mSAPState; }; // Structure to describe request TLV 0x01 for UIMSAP() struct sUIMSAPRequestRequest_Request { eQMIUIMSAPRequests mSAPRequest; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAP() struct sUIMSAPRequestRequest_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x10 for UIMSAPRequest() struct sUIMSAPRequestResponse_ATR { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSAPRequest() struct sUIMSAPRequestResponse_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x12 for UIMSAPRequest() struct sUIMSAPRequestResponse_CardReaderStatus { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x10 for UIM SAPConnectionIndication struct sUIMSAPConnectionIndication_CardStatus { eQMIUIMSAPStates mSAPState; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe response TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe request TLV 0x01 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_EncryptedIMSI { UINT8 mEncryptedIMSILength; // This array must be the size specified by mEncryptedIMSILength // UINT8 mEncryptedIMSI[1]; }; // Structure to describe request TLV 0x01 for UIMGetATR() struct sUIMGetATRRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe response TLV 0x10 for UIMGetATR() struct sUIMGetATRResponse_ATRValue { UINT8 mATRValueLength; // This array must be the size specified by mATRValueLength // UINT8 mATRValue[1]; }; // Structure to describe request TLV 0x01 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe response TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe request TLV 0x01 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateRequest_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateResponse_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PBMGetCapabilities() struct sPBMGetCapabilitiesRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Basic { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // Structure to describe response TLV 0x11 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Group { UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // Structure to describe response TLV 0x12 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AdditionalNumber { UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // Structure to describe response TLV 0x13 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Email { UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // Structure to describe response TLV 0x14 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_SecondName { UINT8 mMaximumSecondNameLength; }; // Structure to describe response TLV 0x15 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_HiddenRecords { INT8 mHiddenEntrySupported; }; // Structure to describe response TLV 0x16 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_GAS { UINT8 mMaximumGASStringLength; }; // Structure to describe response TLV 0x17 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AAS { UINT8 mMaximumAASStringLength; }; // Structure to describe response TLV 0x18 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Protection { eQMIPBMProtectionMethods mProtectionMethod; }; // Structure to describe response TLV 0x10 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Basic { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberOfPhonebooks; struct sPhonebook { eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // This array must be the size specified by mNumberOfPhonebooks // sPhonebook mPhonebooks[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x11 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Group { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x12 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AdditionalNumber { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Email { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x14 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_SecondName { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumSecondNameLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x15 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_HiddenRecords { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; INT8 mHiddenEntrySupported; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x16 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_GAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumGASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x17 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumAASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMReadRecords() struct sPBMReadRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mStartingRecordID; UINT16 mEndingRecordID; }; // Structure to describe response TLV 0x10 for PBMReadRecords() struct sPBMReadRecordsResponse_RecordsRead { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Basic { UINT16 mSequenceNumber; eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT8 mNumberOfRecords; struct sRecord1 { UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sRecord2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sRecord { sRecord1 mRecord1; sRecord2 mRecord2; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x10 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_SecondName { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mSecondNameLength; // This array must be the size (in BYTEs) specified by mSecondNameLength // wchar_t mSecondName[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x11 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_AdditionalNumber { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x12 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Group { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x13 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Email { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x14 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Hidden { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; INT8 mHidden; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for PBMWriteRecord() struct sPBMWriteRecordRequest_Info1 { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sPBMWriteRecordRequest_Info2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sPBMWriteRecordRequest_Info { sPBMWriteRecordRequest_Info1 mPBMWriteRecordRequest_Info1; sPBMWriteRecordRequest_Info2 mPBMWriteRecordRequest_Info2; }; // Structure to describe request TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordRequest_SecondName { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe request TLV 0x11 for PBMWriteRecord() struct sPBMWriteRecordRequest_AdditionalNumber { UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // Structure to describe request TLV 0x12 for PBMWriteRecord() struct sPBMWriteRecordRequest_Group { UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // Structure to describe request TLV 0x13 for PBMWriteRecord() struct sPBMWriteRecordRequest_Email { UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // Structure to describe request TLV 0x14 for PBMWriteRecord() struct sPBMWriteRecordRequest_Hidden { INT8 mHidden; }; // Structure to describe response TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteRecord() struct sPBMDeleteRecordRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMDeleteRecord() struct sPBMDeleteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteAllRecords() struct sPBMDeleteAllRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x01 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Number { UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x11 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Name { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsResponse_List { UINT16 mNumberOfRecordIDs; // This array must be the size specified by mNumberOfRecordIDs // UINT16 mRecordID[1]; }; // Structure to describe indication TLV 0x01 for PBM RecordUpdateIndication struct sPBMRecordUpdateIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMOperations mOperation; UINT16 mRecordID; }; // Structure to describe indication TLV 0x01 for PBM RefreshIndication struct sPBMRefreshIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMRefreshStatus mStatus; }; // Structure to describe indication TLV 0x01 for PBM ReadyIndication struct sPBMReadyIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe indication TLV 0x01 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x10 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x11 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x12 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x01 for PBM AllReadyIndication struct sPBMAllReadyIndication_Info { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; bool mAbbreviatedDialingNumber:1; bool mFixedDialingNumber:1; bool mMobileSubscriberIntegratedServicesDigitalNetwork:1; bool mMailBoxDialingNumber:1; bool mServiceDialingNumber:1; bool mBarredDialingNumber:1; bool mLastNumberDialed:1; bool mMailBoxNumber:1; // Padding out 8 bits UINT8 mReserved1; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x11 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x12 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetAllGroups() struct sPBMGetAllGroupsResponse_Groups { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mGroupCount; struct sGroup { UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // This array must be the size specified by mGroupCount // sGroup mGroups[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMSetGroupInfo() struct sPBMSetGroupInfoRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe response TLV 0x10 for PBMSetGroupInfo() struct sPBMSetGroupInfoResponse_ID { eQMIPBMSessionTypes mSessionType; UINT8 mGroupID; }; // Structure to describe request TLV 0x01 for PBMGetState() struct sPBMGetStateRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetStateInfo() struct sPBMGetStateInfoResponse_State { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMStates mState; }; // Structure to describe request TLV 0x01 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsResponse_Records { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM HiddenRecordStatusIndication struct sPBMHiddenRecordStatusIndication_Status { eQMIPBMSessionTypes mSessionType; INT8 mHiddenRecordsValid; }; // Structure to describe request TLV 0x01 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMGetNextRecordID() struct sPBMGetNextRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextRecordID() struct sPBMGetNextRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetAASList() struct sPBMGetAASListResponse_List { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mAASCount; struct sAAS { UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // This array must be the size specified by mAASCount // sAAS mAASs[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x10 for PBMSetAAS() struct sPBMSetAASRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMAASOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe response TLV 0x10 for PBMSetAAS() struct sPBMSetAASResponse_Info { eQMIPBMSessionTypes mSessionType; UINT8 mAASID; }; // Structure to describe indication TLV 0x01 for PBM AASChangeIndication struct sPBMAASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe indication TLV 0x01 for PBM GASChangeIndication struct sPBMGASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGASID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe request TLV 0x10 for PBMBindSubscription() struct sPBMBindSubscriptionRequest_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x10 for PBMGetSubscription() struct sPBMGetSubscriptionRequest_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for LOCClientRevision() struct sLOCClientRevisionRequest_Revision { UINT32 mRevision; }; // Structure to describe request TLV 0x01 for LOCRegisterEvents() struct sLOCRegisterEventsRequest_EventRegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; // Padding out 47 bits UINT8 mReserved1:7; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCStart() struct sLOCStartRequest_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for LOCStart() struct sLOCStartRequest_FixRecurrenceType { eQMILOCFixRecurrenceType mFixRecurrenceType; }; // Structure to describe request TLV 0x11 for LOCStart() struct sLOCStartRequest_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe request TLV 0x12 for LOCStart() struct sLOCStartRequest_EnableIntermediateReports { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe request TLV 0x13 for LOCStart() struct sLOCStartRequest_MinimumIntervalBetweenPositionReports { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe request TLV 0x14 for LOCStart() struct sLOCStartRequest_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCStartRequest_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCStartRequest_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCStartRequest_ApplicationID { sLOCStartRequest_ApplicationID1 mLOCStartRequest_ApplicationID1; sLOCStartRequest_ApplicationID2 mLOCStartRequest_ApplicationID2; sLOCStartRequest_ApplicationID3 mLOCStartRequest_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCStop() struct sLOCStopRequest_SessionID { UINT8 mSessionID; }; // Structure to describe indication TLV 0x01 for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionStatus { eQMILOCSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x10 for LOC PositionReportIndication struct sLOCPositionReportIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x11 for LOC PositionReportIndication struct sLOCPositionReportIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x13 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x14 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x15 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x16 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x17 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x18 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x19 for LOC PositionReportIndication struct sLOCPositionReportIndication_SpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x1A for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x1B for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x1C for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x1D for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x1E for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x1F for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC PositionReportIndication struct sLOCPositionReportIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x21 for LOC PositionReportIndication struct sLOCPositionReportIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x22 for LOC PositionReportIndication struct sLOCPositionReportIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x23 for LOC PositionReportIndication struct sLOCPositionReportIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x24 for LOC PositionReportIndication struct sLOCPositionReportIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x25 for LOC PositionReportIndication struct sLOCPositionReportIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x26 for LOC PositionReportIndication struct sLOCPositionReportIndication_LeapSeconds { UINT8 mLeapSeconds; }; // Structure to describe indication TLV 0x27 for LOC PositionReportIndication struct sLOCPositionReportIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x28 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x29 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2A for LOC PositionReportIndication struct sLOCPositionReportIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2B for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionFixCount { UINT32 mSessionFixCount; }; // Structure to describe indication TLV 0x2C for LOC PositionReportIndication struct sLOCPositionReportIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe indication TLV 0x01 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_AltitudeSource { eQMILOCAltitudeAssumed mAltitudeAssumed; }; // Structure to describe indication TLV 0x10 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_SatelliteInfo { UINT8 mSatelliteInfoCount; bool mValidSystem:1; bool mValidGNSSSatelliteID:1; bool mValidHealthStatus:1; bool mValidProcessStatus:1; bool mValidSatelliteInfoMask:1; bool mValidElevation:1; bool mValidAzimuth:1; bool mValidSignalToNoiseRatio:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMILOCSystem mSystem; UINT16 mGNSSSatelliteID; eQMILOCHealthStatus mHealthStatus; eQMILOCSatelliteStatus mSatelliteStatus; bool mHasEphemeris:1; bool mHasAlmanac:1; // Padding out 6 bits UINT8 mReserved2:6; float mElevationDegrees; float mAzimuthDegrees; float mSignalToNoiseRatiodBHz; }; // Structure to describe indication TLV 0x01 for LOC NMEAIndication struct sLOCNMEAIndication_NMEAString { // String is variable length, but must be size of the container // char mNMEAString[1]; }; // Structure to describe request TLV 0x01 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_NotificationType { eQMILOCNotificationType mNotificationType; }; // Structure to describe request TLV 0x10 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest { sLOCNetworkInitiatedRequestIndication_VxRequest1 mLOCNetworkInitiatedRequestIndication_VxRequest1; sLOCNetworkInitiatedRequestIndication_VxRequest2 mLOCNetworkInitiatedRequestIndication_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest { sLOCNetworkInitiatedRequestIndication_SUPLRequest1 mLOCNetworkInitiatedRequestIndication_SUPLRequest1; sLOCNetworkInitiatedRequestIndication_SUPLRequest2 mLOCNetworkInitiatedRequestIndication_SUPLRequest2; sLOCNetworkInitiatedRequestIndication_SUPLRequest3 mLOCNetworkInitiatedRequestIndication_SUPLRequest3; sLOCNetworkInitiatedRequestIndication_SUPLRequest4 mLOCNetworkInitiatedRequestIndication_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest { sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe indication TLV 0x10 for LOC InjectTimeIndication struct sLOCInjectTimeIndication_TimeServerInfo { UINT32 mDelayThresholdMilliseconds; UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_AllowedSize { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x03 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x04 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x01 for LOC EngineStateIndication struct sLOCEngineStateIndication_EngineState { eQMILOCEngineState mEngineState; }; // Structure to describe indication TLV 0x01 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionState { eQMILOCSessionState mSessionState; }; // Structure to describe indication TLV 0x10 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x01 for LOCWiFi() struct sLOCWiFiRequestIndication_RequestType { eQMILOCRequestType mRequestType; }; // Structure to describe request TLV 0x10 for LOCWiFi() struct sLOCWiFiRequestIndication_TimeBetweenFixes { UINT16 mTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x10 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_AccelerometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x11 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_GyrometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x01 for LOCTimeSync() struct sLOCTimeSyncRequestIndication_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x01 for LOC SetSPIStreamingReportIndication struct sLOCSetSPIStreamingReportIndication_SPIRequests { INT8 mEnableSPIRequests; }; // Structure to describe request TLV 0x01 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_WWANType { eQMILOCWWANType mWWANType; }; // Structure to describe indication TLV 0x10 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSMeasurementEngineFirmwareVersion { // String is variable length, but must be size of the container // char mFirmwareVersion[1]; }; // Structure to describe indication TLV 0x11 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSHostedSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x12 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x10 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe indication TLV 0x11 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_IntermediateFixes { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe indication TLV 0x12 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_MinimumIntervalBetweenFixes { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe indication TLV 0x13 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID { sLOCGetFixCriteriaIndication_ApplicationID1 mLOCGetFixCriteriaIndication_ApplicationID1; sLOCGetFixCriteriaIndication_ApplicationID2 mLOCGetFixCriteriaIndication_ApplicationID2; sLOCGetFixCriteriaIndication_ApplicationID3 mLOCGetFixCriteriaIndication_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UserResponse { eQMILOCUserResponse mUserResponse; }; // Structure to describe request TLV 0x10 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCProvideNIUserResponseRequest_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_VxRequest { sLOCProvideNIUserResponseRequest_VxRequest1 mLOCProvideNIUserResponseRequest_VxRequest1; sLOCProvideNIUserResponseRequest_VxRequest2 mLOCProvideNIUserResponseRequest_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest { sLOCProvideNIUserResponseRequest_SUPLRequest1 mLOCProvideNIUserResponseRequest_SUPLRequest1; sLOCProvideNIUserResponseRequest_SUPLRequest2 mLOCProvideNIUserResponseRequest_SUPLRequest2; sLOCProvideNIUserResponseRequest_SUPLRequest3 mLOCProvideNIUserResponseRequest_SUPLRequest3; sLOCProvideNIUserResponseRequest_SUPLRequest4 mLOCProvideNIUserResponseRequest_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest { sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe request TLV 0x01 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_TotalSize { UINT32 mTotalSize; }; // Structure to describe request TLV 0x03 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartNumber { UINT16 mPartNumber; }; // Structure to describe request TLV 0x04 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartData { UINT16 mPartDataLength; // This array must be the size specified by mPartDataLength // UINT8 mPartData[1]; }; // Structure to describe request TLV 0x10 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_FormatType { eQMILOCOrbitsFormatType mOrbitsFormatType; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsDataIndication struct sLOCInjectPredictedOrbitsDataIndication_PartNumber { UINT16 mPartNumber; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_AllowedSizes { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x11 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataValidityIndication struct sLOCGetPredictedOrbitsDataValidityIndication_ValidityInfo { UINT64 mStartTimeInUTC; UINT16 mDurationHours; }; // Structure to describe request TLV 0x01 for LOCInjectUTCTime() struct sLOCInjectUTCTimeRequest_UTCTime { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x10 for LOCInjectPosition() struct sLOCInjectPositionRequest_Latitude { double mLatitudeDegrees; }; // Structure to describe request TLV 0x11 for LOCInjectPosition() struct sLOCInjectPositionRequest_Longitude { double mLongitudeDegrees; }; // Structure to describe request TLV 0x12 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe request TLV 0x13 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe request TLV 0x14 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x15 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe request TLV 0x16 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe request TLV 0x17 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe request TLV 0x18 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe request TLV 0x19 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe request TLV 0x1A for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeSource { eQMILOCAltitudeSource mAltitudeSource; eQMILOCLinkage mLinkage; eQMILOCCoverage mCoverage; }; // Structure to describe request TLV 0x1B for LOCInjectPosition() struct sLOCInjectPositionRequest_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x1C for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionAge { UINT32 mAgeTimestampMilliseconds; }; // Structure to describe request TLV 0x1D for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionSource { eQMILOCPositionSource mPositionSource; }; // Structure to describe request TLV 0x01 for LOCSetEngineLock() struct sLOCSetEngineLockRequest_LockType { eQMILOCLockType mLockType; }; // Structure to describe indication TLV 0x10 for LOC GetEngineLockIndication struct sLOCGetEngineLockIndication_LockType { eQMILOCLockType mLockType; }; // Structure to describe request TLV 0x01 for LOCSetSBASConfig() struct sLOCSetSBASConfigRequest_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe response TLV 0x10 for LOCGetSBASConfig() struct sLOCGetSBASConfigResponse_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe request TLV 0x01 for LOCSetNMEATypes() struct sLOCSetNMEATypesRequest_SentenceTypes { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetNMEATypesIndication struct sLOCGetNMEATypesIndication_SentenceType { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCSetLowPowerMode() struct sLOCSetLowPowerModeRequest_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe indication TLV 0x10 for LOC GetLowPowerModeIndication struct sLOCGetLowPowerModeIndication_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe request TLV 0x01 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe request TLV 0x11 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe request TLV 0x12 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_AddressType { bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x10 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe indication TLV 0x11 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe indication TLV 0x12 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteAll { INT8 mDeleteAll; }; // Structure to describe request TLV 0x10 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteSatelliteInfo { UINT8 mSatelliteInfoCount; struct sSatelliteInfo { UINT16 mGNSSSatelliteID; eQMILOCSystem mSystem; bool mDeleteEphemeris:1; bool mDeleteAlmanac:1; // Padding out 6 bits UINT8 mReserved1:6; }; // This array must be the size specified by mSatelliteInfoCount // sSatelliteInfo mSatelliteInfos[1]; }; // Structure to describe request TLV 0x11 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteGNSData { bool mDeleteGPSSatelliteDirectory:1; bool mDeleteGPSSatelliteSteering:1; bool mDeleteGPSTime:1; bool mDeleteGPSAlmanacCorrection:1; bool mDeleteGLOSatelliteDirectory:1; bool mDeleteGLOSatelliteSteering:1; bool mDeleteGLOTime:1; bool mDeleteGLOAlmanacCorrection:1; bool mDeleteSBASSatelliteDirectory:1; bool mDeleteSBASSatelliteSteering:1; bool mDeletePosition:1; bool mDeleteTime:1; bool mDeleteIONO:1; bool mDeleteUTCTimestamp:1; bool mDeleteHealth:1; bool mDeleteSAData:1; bool mDeleteRTI:1; bool mDeleteSatelliteNoExist:1; bool mDeleteFrequencyBiasEstimate:1; // Padding out 45 bits UINT8 mReserved1:5; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x12 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteCellDatabase { bool mDeletePosition:1; bool mDeleteLatestGPSPosition:1; bool mDeleteOTAPosition:1; bool mDeleteEXTReferencePosition:1; bool mDeleteTimeTag:1; bool mDeleteCellID:1; bool mDeleteCachedCellID:1; bool mDeleteLastServerCell:1; bool mDeleteCurrentServerCell:1; bool mDeleteNeighborInfo:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x13 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteClockInfo { bool mDeleteTimeEstimate:1; bool mDeleteFrequencyEstimate:1; bool mDeleteWeekNumber:1; bool mDeleteRTCTime:1; bool mDeleteTimeTransfer:1; bool mDeleteGPSTimeEstimate:1; bool mDeleteGLOTimeEstimate:1; bool mDeleteGLODayNumber:1; bool mDeleteGLOYearNumber:1; bool mDeleteGLORFGroupDelay:1; bool mDeleteDisableTT:1; // Padding out 21 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x01 for LOCSetXTRATSessionControl() struct sLOCSetXTRATSessionControlRequest_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe indication TLV 0x10 for LOC GetXTRATSessionControlIndication struct sLOCGetXTRATSessionControlIndication_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe request TLV 0x10 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_Time { UINT32 mWiFiPositionTime; }; // Structure to describe request TLV 0x11 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_WiFiPosition { double mLatitudeDegrees; double mLongitudeDegrees; UINT16 mHEPEMeters; UINT8 mNumberOfAccessPointsUsed; eQMILOCWiFiFixErrorCode mFixErrorCode; }; // Structure to describe request TLV 0x12 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_AccessPointInformation { UINT8 mNumberOfAccessPoints; struct sAccessPointInfo { UINT8 mMACAddress[6]; INT32 mRSSIdBm; UINT16 mChannel; bool mBeingUsed:1; bool mHiddenSSID:1; bool mPrivate:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mNumberOfAccessPoints // sAccessPointInfo mAccessPointInfos[1]; }; // Structure to describe request TLV 0x13 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x01 for LOCProvideWiFiStatus() struct sLOCProvideWiFiStatusRequest_WiFiStatus { eQMILOCWiFiStatus mWiFiStatus; }; // Structure to describe indication TLV 0x10 for LOC GetRegisteredEventsIndication struct sLOCGetRegisteredEventsIndication_RegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; // Padding out 47 bits UINT8 mReserved1:7; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCSetOperationMode() struct sLOCSetOperationModeRequest_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe indication TLV 0x10 for LOC GetOperationModeIndication struct sLOCGetOperationModeIndication_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe request TLV 0x01 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_StationaryStatus { INT8 mDeviceIsStationary; }; // Structure to describe request TLV 0x10 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_Confidence { UINT8 mStationaryConfidence; }; // Structure to describe request TLV 0x10 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe request TLV 0x11 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_AccelerometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x12 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_GyrometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe indication TLV 0x10 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe indication TLV 0x11 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_AccelerometerSampleAccepted { INT8 mAccelerometerSampleAccepted; }; // Structure to describe indication TLV 0x12 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_GyrometerSamplesAccepted { INT8 mGyrometerSamplesAccepted; }; // Structure to describe request TLV 0x01 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe request TLV 0x03 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_SensorTransmitTime { UINT32 mProcessTXTimeMilliseconds; }; // Structure to describe request TLV 0x01 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe request TLV 0x10 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe indication TLV 0x10 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe indication TLV 0x11 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe request TLV 0x01 for LOCSetExternalPowerConfig() struct sLOCSetExternalPowerConfigRequest_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe indication TLV 0x10 for LOC GetExternalPowerConfigIndication struct sLOCGetExternalPowerConfigIndication_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe request TLV 0x01 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionStatus { eQMILOCConnectionStatus mConnectionStatus; }; // Structure to describe request TLV 0x10 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_APNProfile { eQMILOCPDNType mPDNType; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // Structure to describe request TLV 0x10 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe request TLV 0x11 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe request TLV 0x12 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe request TLV 0x13 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC SetProtocolConfigParametersIndication struct sLOCSetProtocolConfigParametersIndication_FailedParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for LOCGetProtocolConfigParameters() struct sLOCGetProtocolConfigParametersRequest_ConfigParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe indication TLV 0x11 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe indication TLV 0x12 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe indication TLV 0x13 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for LOCSetSensorControlConfig() struct sLOCSetSensorControlConfigRequest_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe indication TLV 0x10 for LOC GetSensorControlConfigIndication struct sLOCGetSensorControlConfigIndication_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe request TLV 0x10 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe request TLV 0x11 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x12 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x13 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x14 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPropertiesIndication struct sLOCSetSensorPropertiesIndication_Failures { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetSensorProperties() struct sLOCGetSensorPropertiesRequest_Properties { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x14 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x10 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe request TLV 0x11 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x12 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x13 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPerformanceConfigIndication struct sLOCSetSensorPerformanceConfigIndication_FailedConfiguration { bool mPerformanceMode:1; bool mAccelerometerSampling:1; bool mGyrometerSampling:1; bool mAlgorithmConfig:1; // Padding out 28 bits UINT8 mReserved1:4; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCInjectSUPLCertificate() struct sLOCInjectSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x10 for LOCDeleteSUPLCertificate() struct sLOCDeleteSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x10 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe request TLV 0x11 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe request TLV 0x12 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x10 for LOC SetPositionEngineConfigIndication struct sLOCSetPositionEngineConfigIndication_FailedParameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetPositionEngineConfig() struct sLOCGetPositionEngineConfigRequest_Parameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe indication TLV 0x11 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe indication TLV 0x12 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x01 for LOC NetworkInitiatedGeofenceIndication struct sLOCNetworkInitiatedGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceGeneralAlertIndication struct sLOCEventGeofenceGeneralAlertIndication_GeofenceGeneralAlert { eQMILOCGeofenceGeneralAlert mGeofenceGeneralAlert; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x10 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofencePosition { UINT64 mUTCTimestampMilliseconds; double mLatitudeDegrees; double mLongitudeDegrees; float mHorizontalUncertaintyEllipticalMinorMeters; float mHorizontalUncertaintyEllipticalMajorMeters; float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; INT8 mHorizontalSpeedValid; float mHorizontalSpeedMetersSecond; INT8 mAltitudeEllipsoidValid; float mAltitudeFromEllipsoidMeters; INT8 mVerticalUncertaintyValid; float mVerticalUncertaintyMeters; INT8 mVerticalSpeedValid; float mVerticalSpeedMetersSecond; INT8 mHeadingValid; float mHeadingDegrees; }; // Structure to describe request TLV 0x01 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x03 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x04 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_IncludePositionInBreachEvent { INT8 mIncludePositionInBreachEvent; }; // Structure to describe request TLV 0x10 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Responsiveness { eQMILOCResponsiveness mResponsiveness; }; // Structure to describe request TLV 0x11 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Confidence { eQMILOCConfidence mConfidence; }; // Structure to describe indication TLV 0x01 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x01 for LOCDeleteGeofence() struct sLOCDeleteGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x01 for LOCQueryGeofence() struct sLOCQueryGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Origin { eQMILOCGeofenceOrigin mGeofenceOrigin; }; // Structure to describe indication TLV 0x13 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_PositionFromGeofence { eQMILOCPositionFromGeofence mPositionFromGeofence; }; // Structure to describe indication TLV 0x14 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Parameters { double mLatitudeDegrees; double mLongitudeDegrees; UINT32 mRadiusMeters; }; // Structure to describe indication TLV 0x15 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x01 for LOCEditGeofence() struct sLOCEditGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x10 for LOCEditGeofence() struct sLOCEditGeofenceRequest_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x11 for LOCEditGeofence() struct sLOCEditGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe indication TLV 0x01 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_FailedParameters { bool mGeofenceState:1; bool mBreachMask:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetBestAvailablePosition() struct sLOCGetBestAvailablePositionRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x13 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x14 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x15 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x16 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x17 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x18 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x19 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x1A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x1B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceCircular { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceElliptical { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalReliablility { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x1E for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x1F for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x21 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x22 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x23 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x24 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x25 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x26 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x27 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x28 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x29 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x2A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x2B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe request TLV 0x10 for CATSetEventReport() struct sCATSetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CATSetEventReport() struct sCATSetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe request TLV 0x12 for CATSetEventReport() struct sCATSetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CATSetEventReport() struct sCATSetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CATSetEventReport() struct sCATSetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe indication TLV 0x10 for CAT EventReport struct sCATEventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT EventReport struct sCATEventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT EventReport struct sCATEventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT EventReport struct sCATEventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT EventReport struct sCATEventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT EventReport struct sCATEventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT EventReport struct sCATEventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT EventReport struct sCATEventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT EventReport struct sCATEventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT EventReport struct sCATEventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT EventReport struct sCATEventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT EventReport struct sCATEventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT EventReport struct sCATEventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT EventReport struct sCATEventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT EventReport struct sCATEventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT EventReport struct sCATEventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT EventReport struct sCATEventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT EventReport struct sCATEventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT EventReport struct sCATEventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT EventReport struct sCATEventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT EventReport struct sCATEventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT EventReport struct sCATEventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT EventReport struct sCATEventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT EventReport struct sCATEventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT EventReport struct sCATEventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT EventReport struct sCATEventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT EventReport struct sCATEventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT EventReport struct sCATEventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT EventReport struct sCATEventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT EventReport struct sCATEventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT EventReport struct sCATEventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT EventReport struct sCATEventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT EventReport struct sCATEventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT EventReport struct sCATEventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT EventReport struct sCATEventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT EventReport struct sCATEventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT EventReport struct sCATEventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT EventReport struct sCATEventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT EventReport struct sCATEventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT EventReport struct sCATEventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT EventReport struct sCATEventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT EventReport struct sCATEventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT EventReport struct sCATEventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT EventReport struct sCATEventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT EventReport struct sCATEventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT EventReport struct sCATEventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT EventReport struct sCATEventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT EventReport struct sCATEventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT EventReport struct sCATEventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT EventReport struct sCATEventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT EventReport struct sCATEventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT EventReport struct sCATEventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT EventReport struct sCATEventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT EventReport struct sCATEventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT EventReport struct sCATEventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT EventReport struct sCATEventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT EventReport struct sCATEventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT EventReport struct sCATEventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT EventReport struct sCATEventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT EventReport struct sCATEventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT EventReport struct sCATEventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT EventReport struct sCATEventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT EventReport struct sCATEventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT EventReport struct sCATEventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT EventReport struct sCATEventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT EventReport struct sCATEventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT EventReport struct sCATEventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT EventReport struct sCATEventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT EventReport struct sCATEventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT EventReport struct sCATEventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT EventReport struct sCATEventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT EventReport struct sCATEventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT EventReport struct sCATEventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT EventReport struct sCATEventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT EventReport struct sCATEventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT EventReport struct sCATEventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT EventReport struct sCATEventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT EventReport struct sCATEventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT EventReport struct sCATEventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT EventReport struct sCATEventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT EventReport struct sCATEventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT EventReport struct sCATEventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT EventReport struct sCATEventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT EventReport struct sCATEventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x01 for CATGetServiceState() struct sCATGetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; bool mCommonActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; bool mControlActivate:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CATGetServiceState() struct sCATGetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved6:6; }; // Structure to describe request TLV 0x01 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATSendTerminal() struct sCATSendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CATGetEventReport() struct sCATGetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CATGetEventReport() struct sCATGetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CATGetEventReport() struct sCATGetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CATGetEventReport() struct sCATGetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CATGetEventReport() struct sCATGetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CATGetEventReport() struct sCATGetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CATGetEventReport() struct sCATGetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CATGetEventReport() struct sCATGetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CATGetEventReport() struct sCATGetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CATGetEventReport() struct sCATGetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CATGetEventReport() struct sCATGetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CATGetEventReport() struct sCATGetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CATGetEventReport() struct sCATGetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CATGetEventReport() struct sCATGetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CATGetEventReport() struct sCATGetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CATGetEventReport() struct sCATGetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CATGetEventReport() struct sCATGetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CATGetEventReport() struct sCATGetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CATGetEventReport() struct sCATGetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CATGetEventReport() struct sCATGetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CATGetEventReport() struct sCATGetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CATGetEventReport() struct sCATGetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CATGetEventReport() struct sCATGetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CATGetEventReport() struct sCATGetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CATGetEventReport() struct sCATGetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CATGetEventReport() struct sCATGetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CATGetEventReport() struct sCATGetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CATGetEventReport() struct sCATGetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CATGetEventReport() struct sCATGetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CATGetEventReport() struct sCATGetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CATGetEventReport() struct sCATGetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CATGetEventReport() struct sCATGetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CATGetEventReport() struct sCATGetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CATGetEventReport() struct sCATGetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CATGetEventReport() struct sCATGetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CATGetEventReport() struct sCATGetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CATGetEventReport() struct sCATGetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CATGetEventReport() struct sCATGetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CATGetEventReport() struct sCATGetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CATGetEventReport() struct sCATGetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CATGetEventReport() struct sCATGetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CATGetEventReport() struct sCATGetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CATGetEventReport() struct sCATGetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CATGetEventReport() struct sCATGetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CATGetEventReport() struct sCATGetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CATGetEventReport() struct sCATGetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CATGetEventReport() struct sCATGetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CATGetEventReport() struct sCATGetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CATGetEventReport() struct sCATGetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CATGetEventReport() struct sCATGetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CATGetEventReport() struct sCATGetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CATGetEventReport() struct sCATGetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CATGetEventReport() struct sCATGetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CATGetEventReport() struct sCATGetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CATGetEventReport() struct sCATGetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CATGetEventReport() struct sCATGetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CATGetEventReport() struct sCATGetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CATGetEventReport() struct sCATGetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CATGetEventReport() struct sCATGetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CATGetEventReport() struct sCATGetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CATGetEventReport() struct sCATGetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CATGetEventReport() struct sCATGetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CATGetEventReport() struct sCATGetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CATGetEventReport() struct sCATGetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CATGetEventReport() struct sCATGetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CATGetEventReport() struct sCATGetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CATGetEventReport() struct sCATGetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CATGetEventReport() struct sCATGetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CATGetEventReport() struct sCATGetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CATGetEventReport() struct sCATGetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CATGetEventReport() struct sCATGetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CATGetEventReport() struct sCATGetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CATGetEventReport() struct sCATGetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe request TLV 0x01 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CATSendDecodedTerminal() struct sCATSendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe response TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CATEventConfirmation() struct sCATEventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CATEventConfirmation() struct sCATEventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CATEventConfirmation() struct sCATEventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSCloseChannelIndication struct sCATSCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSSendData() struct sCATSCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CATSCWSSendData() struct sCATSCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CATSetConfiguration() struct sCATSetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CATSetConfiguration() struct sCATSetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CATGetConfiguration() struct sCATGetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CATGetConfiguration() struct sCATGetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for RMSGetSMSWake() struct sRMSGetSMSWakeResponse_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSGetSMSWake() struct sRMSGetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for OMASetEventReport() struct sOMASetEventReportRequest_NIA { INT8 mReportNetworkInitiatedAlerts; }; // Structure to describe request TLV 0x11 for OMASetEventReport() struct sOMASetEventReportRequest_Status { INT8 mReportSessionStatus; }; // Structure to describe indication TLV 0x10 for OMA EventReport struct sOMAEventReportIndication_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe indication TLV 0x11 for OMA EventReport struct sOMAEventReportIndication_Status { eQMIOMASessionStates mSessionState; }; // Structure to describe indication TLV 0x12 for OMA EventReport struct sOMAEventReportIndication_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe request TLV 0x10 for OMAStartSession() struct sOMAStartSessionRequest_Type { eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Info { eQMIOMASessionStates mSessionState; eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x11 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe response TLV 0x12 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Retry { UINT8 mRetryCount; UINT16 mRetryPauseTimer; UINT16 mRemainingTime; }; // Structure to describe response TLV 0x13 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe request TLV 0x10 for OMASendSelection() struct sOMASendSelectionRequest_Type { eQMIOMASelections mSelection; UINT16 mSessionID; }; // Structure to describe response TLV 0x10 for OMAGetFeatures() struct sOMAGetFeaturesResponse_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe response TLV 0x11 for OMAGetFeatures() struct sOMAGetFeaturesResponse_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe response TLV 0x12 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFAFeature { INT8 mHFAFeatureEnabled; }; // Structure to describe response TLV 0x13 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFADoneState { eQMIOMAHFADoneStates mHFAFeatureDoneState; }; // Structure to describe request TLV 0x10 for OMASetFeatures() struct sOMASetFeaturesRequest_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe request TLV 0x11 for OMASetFeatures() struct sOMASetFeaturesRequest_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe request TLV 0x12 for OMASetFeatures() struct sOMASetFeaturesRequest_HFAFeature { INT8 mHFAFeatureEnabled; }; #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp000077500000000000000000022526261455567757300313230ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtExports.cpp DESCRIPTION: QUALCOMM Gobi Connection Management API exports Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ) { // Validate arguments if ( (pInterface == 0) || (pServicesCount == 0) || (*pServicesCount == 0) || (pServices == 0) || (pHandle == 0) ) { return (ULONG)eGOBI_ERR_INVALID_ARG; } GOBIHANDLE handle = gDLL.CreateAPI(); if (handle == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcCount = *pServicesCount; *pServicesCount = 0; *pHandle = 0; std::set inSvcs; std::set outSvcs; ULONG s = 0; for (s = 0; s < svcCount; s++) { inSvcs.insert( (eQMIService)pServices[s] ); } outSvcs = pAPI->Connect( pInterface, inSvcs ); ULONG outSvcsCount = (ULONG)outSvcs.size(); if (outSvcsCount > svcCount) { outSvcsCount = svcCount; } if (outSvcsCount == 0) { ULONG rc = (ULONG)pAPI->GetCorrectedLastError(); pAPI = 0; gDLL.DeleteAPI( handle ); return rc; } std::set ::const_iterator pOutSvc = outSvcs.begin(); for (s = 0; s < svcCount; s++) { pServices[s] = UCHAR_MAX; if (s < outSvcsCount) { pServices[s] = (ULONG)*pOutSvc++; } } *pHandle = handle; *pServicesCount = outSvcsCount; return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelSend( svcID, pTXID ); } /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bDisco = pAPI->Disconnect(); if (bDisco == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetGenericCallback( svcID, msgID, pCallback, handle ); } /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 106; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 133; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 134; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 135; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 4; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 5; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 6; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 7; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 8; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 14; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 15; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 16; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 17; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 18; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 20; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 21; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 22; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 23; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 26; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 27; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/000077500000000000000000000000001455567757300222005ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/GobiCMCallback.cpp000077500000000000000000000236641455567757300254370ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.cpp DESCRIPTION: Contains the implementation of each Gobi CM callback function. Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMCallback.h" #include /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: WDSEventReportCallback (Free Method) DESCRIPTION: Function called by WDS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 1) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x17 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_DataBearerTechnology)) { pTmp++; const sWDSEventReportIndication_DataBearerTechnology * pDBT = (const sWDSEventReportIndication_DataBearerTechnology *)pTmp; gpCM->OnDataBearerCBNotification( pDBT->mDataBearerTechnology ); } } ULONGLONG txTotalBytes = ULLONG_MAX; ULONGLONG rxTotalBytes = ULLONG_MAX; pIter = tlvs.find( 0x19 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_TXBytes)) { pTmp++; const sWDSEventReportIndication_TXBytes * pTX = (const sWDSEventReportIndication_TXBytes *)pTmp; txTotalBytes = pTX->mTXByteTotal; } } pIter = tlvs.find( 0x1A ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_RXBytes)) { pTmp++; const sWDSEventReportIndication_RXBytes * pRX = (const sWDSEventReportIndication_RXBytes *)pTmp; rxTotalBytes = pRX->mRXByteTotal; } } if (txTotalBytes != ULLONG_MAX || rxTotalBytes != ULLONG_MAX) { gpCM->OnByteTotalsNotification( rxTotalBytes, txTotalBytes ); } } /*=========================================================================== METHOD: WDSSessionStateCallback (Free Method) DESCRIPTION: Function called by WDS packet service status callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 34) { return; } ULONG state = ULONG_MAX; std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x01 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSPacketServiceStatusReportIndication_Status)) { pTmp++; const sWDSPacketServiceStatusReportIndication_Status * pState = (const sWDSPacketServiceStatusReportIndication_Status *)pTmp; state = pState->mConnectionStatus; } } if (state != ULONG_MAX) { gpCM->OnSessionStateCBNotification( state ); } } /*=========================================================================== METHOD: NASEventReportCallback (Free Method) DESCRIPTION: Function called by NAS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 2) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter == tlvs.end()) { return; } const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASEventReportIndication_SignalStrength)) { pTmp++; const sNASEventReportIndication_SignalStrength * pSS = (const sNASEventReportIndication_SignalStrength *)pTmp; gpCM->OnSignalStrengthCBNotificaion( pSS->mSignalStrengthdBm, pSS->mRadioInterface ); } } /*=========================================================================== METHOD: NASServingSystemCallback (Free Method) DESCRIPTION: Function called by NAS serving system callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 36) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASServingSystemIndication_RoamingIndicator)) { pTmp++; const sNASServingSystemIndication_RoamingIndicator * pRI = (const sNASServingSystemIndication_RoamingIndicator *)pTmp; BYTE roam = pRI->mRoamingIndicator; if (roam == 0xFF) { gpCM->SetRoam( "Unknown" ); } else { std::ostringstream roamStr; roamStr << roam; gpCM->SetRoam( roamStr.str() ); } } } pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASServingSystemIndication_DataServices ); if (tlvLen < dsLen) { return; } pTmp++; const sNASServingSystemIndication_DataServices * pDS = (const sNASServingSystemIndication_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return; } pDS++; gpCM->OnDataCapsNotification( dcCount, (eQMINASDataServiceCapabilities2 *)pDS ); } } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/GobiCMCallback.h000077500000000000000000000067311455567757300251000ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.h DESCRIPTION: Contains the declaration of each Gobi CM callback function, structures needed for these callbacks and message IDs for each callback Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // WDS event report callback void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // WDS packet service status callback void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS event report callback void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS serving system callback void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/GobiCMDLL.cpp000077500000000000000000001005221455567757300243430ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.cpp DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" #include "GobiConnectionMgmtAPIStructs.h" #include "Gobi3000Translation.h" #include /*=========================================================================*/ // cGobiCMDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetString (Internal Method) DESCRIPTION: Call a Gobi CM API function that returns a string PARAMETERS: mpFnString [ I ] - Gobi CM API function pointer tlvID [ I ] - ID of response TLV that contains the string strSz [ I ] - Max string size (including NULL terminator) pStr [ O ] - Buffer to hold the string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ) { // Assume failure if (strSz > 0 && pStr != 0) { pStr[0] = 0; } // Query for string? ULONG status = eGOBI_ERR_GENERAL; if (mpFnString == 0 || mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = mpFnString( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( tlvID ); if (pIter == tlvs.end()) { return eGOBI_ERR_GENERAL; } const sQMIRawContentHeader * pTmp = pIter->second; ULONG strLen = (ULONG)pTmp->mLength; pTmp++; if (strLen != 0 && strSz > 0 && pStr != 0) { ULONG needLen = strLen; if (needLen + 1 > strSz) { needLen = strSz - 1; } memcpy( pStr, pTmp, needLen ); pStr[needLen] = 0; } return status; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Calls GobiConnect PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Connect( LPCSTR pInterface ) { // Connect to WDS, DMS, and NAS services ULONG svc[3] = { 1, 2, 3 }; ULONG svcCount = 3; GOBIHANDLE handle = 0; ULONG status = GobiConnect( pInterface, &svcCount, &svc[0], &handle ); if (status == 0) { if (svcCount == 3) { mhGobi = handle; } else { // We require WDS, DMS, and NAS services Disconnect(); status = eGOBI_ERR_GENERAL; } } return status; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Disconnect() { if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } return GobiDisconnect( mhGobi ); } /*=========================================================================== ETHOD: StartDataSession (Public Method) DESCRIPTION: Calls WDSStartNetworkInterface PARAMETERS: pAPN [ I ] - Access point name pUser [ I ] - Username pPwd [ I ] - Password pSessionID [ O ] - Session ID pFailureCode [ O ] - Failure code (if present) RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ) { // Assume failure if (pSessionID != 0) { *pSessionID = 0xFFFFFFFF; } // Start a data session? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x16; pTLV->mLength = (UINT16)sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); pData += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pAuth = (sWDSStartNetworkInterfaceRequest_Authentication *)pData; pAuth->mEnablePAP = 1; pAuth->mEnableCHAP = 1; pData += sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (pAPN != 0 && pAPN[0] != 0) { size_t len = strnlen( pAPN, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x14; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pAPN, len ); pData += len; } if (pUser != 0 && pUser[0] != 0) { size_t len = strnlen( pUser, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x17; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pUser, len ); pData += len; } if (pPwd != 0 && pPwd[0] != 0) { size_t len = strnlen( pPwd, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x18; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pPwd, len ); pData += len; } ULONG li = (ULONG)pData - (ULONG)&req[0]; ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSStartNetworkInterface( mhGobi, 300000, li, &req[0], &lo, &rsp[0] ); // On success pSessionID is valid, on failure pFailureCode is valid ULONG status2 = ParseStartDataSession( lo, &rsp[0], pSessionID, pFailureCode ); if (status == eGOBI_ERR_NONE) { return status2; } return status; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Calls GobiCancel/WDSAbort RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::CancelDataSession() { // Cancel outstanding API request? if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } // Cancel the request with the API ULONG svcID = 1; ULONG txID = 0xFFFFFFFF; ULONG status = GobiCancel( mhGobi, svcID, &txID ); if (status != 0 || txID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } UINT8 req[256] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x01; pTLV->mLength = (UINT16)sizeof( sWDSAbortRequest_TransactionID ); pData += sizeof( sQMIRawContentHeader ); sWDSAbortRequest_TransactionID * pID = (sWDSAbortRequest_TransactionID *)pData; pID->mTransactionID = (UINT16)txID; pData += sizeof( sWDSAbortRequest_TransactionID ); // Cancel the request with the device ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSAbort( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: StopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface PARAMETERS: sessionID [ I ] - Session ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StopDataSession( ULONG sessionID ) { ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[256] = { 0 }; ULONG li = 256; status = PackStopDataSession( &li, &req[0], sessionID ); if (status != 0) { return status; } // Stop data session status = WDSStopNetworkInterface( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: GetSessionState (Public Method) DESCRIPTION: Calls WDSGetPacketServiceStatus PARAMETERS: pSessionState [ O ] - Current session state RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionState( ULONG * pSessionState ) { // Assume failure if (pSessionState != 0) { *pSessionState = 0xFFFFFFFF; } ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetPacketServiceStatus( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionState( lo, &rsp[0], pSessionState ); return status; } /*=========================================================================== METHOD: GetSessionDuration (Public Method) DESCRIPTION: Calls WDSGetDataSessionDuration PARAMETERS: pSessionDuration [ O ] - Session duration RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionDuration( ULONGLONG * pSessionDuration ) { // Assume failure if (pSessionDuration != 0) { *pSessionDuration = 0xFFFFFFFF; } // Query for session duration ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataSessionDuration( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionDuration( lo, &rsp[0], pSessionDuration ); return status; } /*=========================================================================== METHOD: GetDataBearerTechnology (Public Method) DESCRIPTION: Calls WDSGetDataBearerTechnology PARAMETERS: pDataBearerTech [ O ] - Data bearer technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetDataBearerTechnology( ULONG * pDataBearerTech ) { // Assume failure if (pDataBearerTech != 0) { *pDataBearerTech = 0xFFFFFFFF; } // Query for data bearer duration? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataBearerTechnology( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetDataBearerTechnology( lo, &rsp[0], pDataBearerTech ); return status; } /*=========================================================================== METHOD: GetConnectionRate (Public Method) DESCRIPTION: Calls WDSGetChannelRates PARAMETERS: pCurTX [ O ] - Current TX rate pCurRX [ O ] - Current RX rate pMaxTX [ O ] - Max TX rate pMaxRX [ O ] - Max RX rate RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ) { // Assume failure pCurTX != 0 ? *pCurTX = 0xFFFFFFFF : 0; pCurRX != 0 ? *pCurRX = 0xFFFFFFFF : 0; pMaxTX != 0 ? *pMaxTX = 0xFFFFFFFF : 0; pMaxRX != 0 ? *pMaxRX = 0xFFFFFFFF : 0; // Query for rates? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetChannelRates( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetConnectionRate( lo, &rsp[0], pCurTX, pCurRX, pMaxTX, pMaxRX ); return status; } /*=========================================================================== METHOD: GetFirmwareRevision (Public Method) DESCRIPTION: Calls DMSGetDeviceRevision PARAMETERS: strSz [ I ] - Maximum number of characters pStr [ O ] - Firmware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetFirmwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetManufacturer (Public Method) DESCRIPTION: Calls DMSGetDeviceManfacturer PARAMETERS: strSz [ I ] - Maximum string size pStr [ O ] - Manufacturer string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetManufacturer( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceManfacturer, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetModelID (Public Method) DESCRIPTION: Calls GetModelID PARAMETERS: strSz [ I ] - Max string size pStr [ O ] - Model ID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetModelID( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceModel, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetHardwareRevision (Public Method) DESCRIPTION: Calls DMSGetHardwareRevision PARAMETERS: strSz [ I ] - Max size of string pStr [ O ] - Hardware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHardwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetHardwareRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetVoiceNumber (Public Method) DESCRIPTION: Calls GetVoiceNumber PARAMETERS: voiceSz [ I ] - Max characters in voice string pVoiceStr [ O ] - Voice number string minSz [ I ] - Max characters in MIN string pMINStr [ O ] - MIN string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ) { // Assume failure if (voiceSz > 0 && pVoiceStr != 0) { pVoiceStr[0] = 0; } if (minSz > 0 && pMINStr != 0) { pMINStr[0] = 0; } // Query for voice numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceVoiceNumber( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetVoiceNumber( lo, &rsp[0], voiceSz, pVoiceStr, minSz, pMINStr ); return status; } /*=========================================================================== METHOD: GetSerialNumbers (Public Method) DESCRIPTION: Calls DMSGetDeviceSerialNumbers PARAMETERS: esnSz [ I ] - ESN size pESNStr [ O ] - ESN string imeiSz [ I ] - IMEI size pIMEIStr [ O ] - IMSI string meidSz [ I ] - MEID size pMEIDStr [ O ] - MEID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ) { // Assume failure if (esnSz > 0 && pESNStr != 0) { pESNStr[0] = 0; } if (imeiSz > 0 && pIMEIStr != 0) { pIMEIStr[0] = 0; } if (meidSz > 0 && pMEIDStr != 0) { pMEIDStr[0] = 0; } // Query for serial numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceSerialNumbers( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSerialNumbers( lo, &rsp[0], esnSz, pESNStr, imeiSz, pIMEIStr, meidSz, pMEIDStr ); return status; } /*=========================================================================== METHOD: GetIMSI (Public Method) DESCRIPTION: Get IMSI PARAMETERS: imsiSz [ I ] - IMSI size pIMSIStr [ O ] - IMSI string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ) { return GetString( DMSGetDeviceVoiceNumber, 0x11, imsiSz, pIMSIStr ); } /*=========================================================================== METHOD: GetSignalStrengths (Public Method) DESCRIPTION: Calls NASGetSignalStrength PARAMETERS: pSigStrengths [ O ] - Received signal strength pRadioInterfaces [ O ] - Radio interface technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ) { // Assume failure for (ULONG s = 0; s < MAX_SIGNALS; s++) { pSigStrengths[s] = 0; pRadioInterfaces[s] = 0xFFFFFFFF; } // Query for signal strengths? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = NASGetSignalStrength( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSignalStrength( lo, &rsp[0], pSigStrengths, pRadioInterfaces ); return status; } /*=========================================================================== METHOD: GetServingNetwork (Public Method) DESCRIPTION: Calls NASGetServingSystem PARAMETERS: pDataCapabilities [ O ] - Data capabilities pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - Network name max size pName [ O ] - Network name pSID [ O ] - System ID pNID [ O ] - Network ID pRoam [ O ] - Roaming indicator RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ) { // Assume failure for (ULONG d = 0; d < MAX_DATA_CAPABILITIES; d++) { pDataCapabilities[d] = 0xFFFFFFFF; } if (nameSize > 0 && pName != 0) { pName[0] = 0; } pMCC != 0 ? *pMCC = 0xFFFF : 0; pMNC != 0 ? *pMNC = 0xFFFF : 0; pRoam != 0 ? *pRoam = 0xFFFFFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for serving system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetServingSystem( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASGetServingSystemResponse_DataServices ); if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DataServices * pDS = (const sNASGetServingSystemResponse_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pDS++; eQMINASDataServiceCapabilities2 * pCap = (eQMINASDataServiceCapabilities2 *)pDS; if (dcCount > MAX_DATA_CAPABILITIES) { dcCount = MAX_DATA_CAPABILITIES; } for (ULONG i = 0; i < dcCount; i++) { pDataCapabilities[i] = (ULONG)*pCap++; } } pIter = tlvs.find( 0x12 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG plmnLen = (ULONG)sizeof( sNASGetServingSystemResponse_CurrentPLMN ); if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_CurrentPLMN * pPLMN = (const sNASGetServingSystemResponse_CurrentPLMN *)pTmp; ULONG strLen = (ULONG)pPLMN->mDescriptionLength; plmnLen += strLen; if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pMCC != 0 ? *pMCC = (ULONG)pPLMN->mMobileCountryCode : 0; pMNC != 0 ? *pMNC = (ULONG)pPLMN->mMobileNetworkCode : 0; pPLMN++; if (strLen != 0 && nameSize > 0 && pName != 0) { ULONG needLen = strLen; if (needLen + 1 > nameSize) { needLen = nameSize - 1; } memcpy( pName, pPLMN, needLen ); pName[needLen] = 0; } } pIter = tlvs.find( 0x13 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG sysLen = (ULONG)sizeof( sNASGetServingSystemResponse_SystemID ); if (tlvLen < sysLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_SystemID * pSys = (const sNASGetServingSystemResponse_SystemID *)pTmp; pSID != 0 ? *pSID = (ULONG)pSys->mSystemID : 0; pNID != 0 ? *pNID = (ULONG)pSys->mNetworkID : 0; } pIter = tlvs.find( 0x16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG roamLen = (ULONG)sizeof( sNASGetServingSystemResponse_DefaultRoaming ); if (tlvLen < roamLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DefaultRoaming * pDR = (const sNASGetServingSystemResponse_DefaultRoaming *)pTmp; pRoam != 0 ? *pRoam = (ULONG)pDR->mRoamingIndicator : 0; } return status; } /*=========================================================================== METHOD: GetHomeNetwork (Public Method) DESCRIPTION: Calls NASGetHomeNetwork PARAMETERS: pHomeMCC [ O ] - Mobile country code pHomeMNC [ O ] - Mobile network code homeNameSize [ I ] - Max name size pHomeName [ O ] - Home network name pSID [ O ] - System ID pNID [ O ] - Network ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ) { // Assume failure if (homeNameSize > 0 && pHomeName != 0) { pHomeName[0] = 0; } pHomeMCC != 0 ? *pHomeMCC = 0xFFFF : 0; pHomeMNC != 0 ? *pHomeMNC = 0xFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for home system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetHomeNetwork( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetHomeNetwork( lo, &rsp[0], pHomeMCC, pHomeMNC, homeNameSize, pHomeName, pSID, pNID ); return status; } /*=========================================================================== METHOD: SetWDSEventReportCB (Public Method) DESCRIPTION: Calls WDSSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer interval [ I ] - Interval (in seconds) for transfer statistics RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ) { // Set WDS event callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x11; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_TransferStatisticsIndicator * pTS = (sWDSSetEventReportRequest_TransferStatisticsIndicator *)pData; pTS->mTransferStatisticsIntervalSeconds = interval; pTS->mReportTXPacketSuccesses = 0; pTS->mReportRXPacketSuccesses = 0; pTS->mReportTXPacketErrors = 0; pTS->mReportRXPacketErrors = 0; pTS->mReportTXOverflows = 0; pTS->mReportRXOverflows = 0; pTS->mTXByteTotal = 1; pTS->mRXByteTotal = 1; pData += sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x12; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_DataBearerTechnologyIndicator * pTI = (sWDSSetEventReportRequest_DataBearerTechnologyIndicator *)pData; pTI->mReportDataBearerTechnology = 1; pData += sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 1, pCallback ); return status; } /*=========================================================================== METHOD: SetWDSSessionStateCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSSessionStateCB( tFNGenericCallback pCallback ) { // Set WDS packet service status callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 34, pCallback ); return status; } /*=========================================================================== METHOD: SetNASEventReportCB (Public Method) DESCRIPTION: Calls NASSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer thresholdsSize [ I ] - Threshold size pThresholds [ I ] - Array of thresholds RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ) { // Set NAS event report callback request? ULONG status = eGOBI_ERR_GENERAL; if ( (mhGobi == 0) || (thresholdsSize > 0 && pThresholds == 0) ) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x10; pTLV->mLength = (UINT16)sizeof( sNASSetEventReportRequest_SignalIndicator ); pTLV->mLength += (UINT16)thresholdsSize; pData += sizeof( sQMIRawContentHeader ); sNASSetEventReportRequest_SignalIndicator * pSI = (sNASSetEventReportRequest_SignalIndicator *)pData; pSI->mReportSignalStrength = 1; pSI->mNumberOfThresholds = thresholdsSize; pData += sizeof( sNASSetEventReportRequest_SignalIndicator ); for (UINT8 i = 0; i < thresholdsSize; i++) { INT8 * pThresh = (INT8 *)pData; *pThresh = pThresholds[i]; pData++; } ULONG li = (ULONG)pData - (ULONG)&req[0]; status = NASSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 2, pCallback ); return status; } /*=========================================================================== METHOD: SetNASServingSystemCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASServingSystemCB( tFNGenericCallback pCallback ) { // Set NAS serving system request? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 36, pCallback ); return status; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/GobiCMDLL.h000077500000000000000000000212371455567757300240150ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.h DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiConnectionMgmtAPI.h" #include "GobiConnectionMgmtAPIStructs.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; // The maximum number of signals const ULONG MAX_SIGNALS = 12; // The maximum number of data capabilities const ULONG MAX_DATA_CAPABILITIES = 12; // Gobi input/output function pointer typedef ULONG (* tFNGobiInputOutput)( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLVs (Internal Method) DESCRIPTION: Convert response buffer to a TLV map PARAMETERS: pRsp [ I ] - The response buffer rspSz [ I ] - The size of the above buffer RETURN VALUE: std::map ===========================================================================*/ inline std::map GetTLVs( const UINT8 * pRsp, ULONG rspSz ) { std::map retMap; ULONG dataProcessed = 0; const UINT8 * pData = &pRsp[0]; while (dataProcessed < rspSz) { dataProcessed += (ULONG)sizeof( sQMIRawContentHeader ); if (dataProcessed > rspSz) { break; } const sQMIRawContentHeader * pTLV = (const sQMIRawContentHeader *)pData; dataProcessed += (ULONG)pTLV->mLength; if (dataProcessed > rspSz) { break; } retMap[pTLV->mTypeID] = pTLV; pData = &pRsp[dataProcessed]; } return retMap; }; /*=========================================================================*/ // Class cGobiCMDLL /*=========================================================================*/ class cGobiCMDLL { public: // Constructor cGobiCMDLL() : mhGobi( 0 ) { } // Destructor ~cGobiCMDLL() { } // Connect ULONG Connect( LPCSTR pInterface ); // Disconnect ULONG Disconnect(); // Start data session ULONG StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ); // Cancel data session ULONG CancelDataSession(); // Stop data session ULONG StopDataSession( ULONG sessionID ); // Get session state ULONG GetSessionState( ULONG * pSessionState ); // Get session duration ULONG GetSessionDuration( ULONGLONG * pSessionDuration ); // Get data bearer technology ULONG GetDataBearerTechnology( ULONG * pDataBearerTech ); // Get connection rate ULONG GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ); // Get firmware revision ULONG GetFirmwareRevision( BYTE strSz, CHAR * pStr ); // Get manufacturer ULONG GetManufacturer( BYTE strSz, CHAR * pStr ); // Get model ID ULONG GetModelID( BYTE strSz, CHAR * pStr ); // Get hardware revision ULONG GetHardwareRevision( BYTE strSz, CHAR * pStr ); // Get voice number ULONG GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ); // Get serial numbers ULONG GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ); // Get IMSI ULONG GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ); // Get signal strengths ULONG GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ); // Get serving network ULONG GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ); // Get home network ULONG GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ); // Set WDS event report callback ULONG SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ); // Set WDS packet service status callback ULONG SetWDSSessionStateCB( tFNGenericCallback pCallback ); // Set NAS event report callback ULONG SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ); // Set NAS serving system callback ULONG SetNASServingSystemCB( tFNGenericCallback pCallback ); protected: // Call a Gobi CM API function that returns a string ULONG GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ); /* Handle to Gobi API */ GOBIHANDLE mhGobi; }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/QTSampleCM.cpp000077500000000000000000000227361455567757300246270ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.cpp DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cQTSampleCM QT implementation of the Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QTSampleCM.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: AsyncConnectThread (Free Method) DESCRIPTION: Start a data session PARAMETERS: pData [ I ] - cQTSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * AsyncConnectThread( void * pData ) { cQTSampleCM * pCM = (cQTSampleCM*)pData; if (pCM == NULL) { return NULL; } // Open the dialog window, disable the info and connection stats buttons pCM->mView.rootContext()->setContextProperty( "dialogText", "Connecting, please wait..." ); pCM->mView.rootContext()->setContextProperty( "windowState", "connectingDialog" ); ULONG failureCode = 0xFFFFFFFF; ULONG rc = pCM->OnStartDataSession( &failureCode ); if (rc != eGOBI_ERR_NONE) { std::ostringstream error; error << "Failed to connect, error " << rc; TRACE( "rc %lu, failure code %lu", rc, failureCode ); // Show failure code, if present if (rc == 1014 && failureCode != 0xFFFFFFFF) { error << "\nCall failure reason " << failureCode; } pCM->mView.rootContext()->setContextProperty( "dialogText", error.str().c_str() ); pCM->SetConnectButtonText( "Connect" ); } else { pCM->mView.rootContext()->setContextProperty( "dialogText", "Success!" ); // Connect button should be updated by state change indication } // Leave the dialog up for 2s sleep( 2 ); pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return NULL; } /*=========================================================================== METHOD: OnInfosButton (Free Method) DESCRIPTION: Move to the info stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnInfosButton( cQTSampleCM * pCM ) { pCM->mView.rootContext()->setContextProperty( "windowState", "infos" ); return 0; } /*=========================================================================== METHOD: OnConnectionsButton (Free Method) DESCRIPTION: Move to the connection stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectionsButton( cQTSampleCM * pCM ) { // "" is the default state (connection stats page) pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return 0; } /*=========================================================================== METHOD: OnConnectButton (Free Method) DESCRIPTION: Start, cancel, or disconnect from a data session NOTE: The UI is not updated until this function returns, so the connection will be established asynchronously PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectButton( cQTSampleCM * pCM ) { // Double check if there a device connected if (pCM->mDeviceID.size() == 0 || pCM->mConnectButtonText.compare( "No Device" ) == 0) { TRACE( "No Device" ); return 0; } // Start a connection if (pCM->mConnectButtonText.compare( "Connect" ) == 0) { pCM->SetConnectButtonText( "Cancel" ); // Create a detached thread to start the connection asynchronously pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); pthread_create( &pCM->mAsyncConnectThreadID, &attributes, AsyncConnectThread, pCM ); } else if (pCM->mConnectButtonText.compare( "Cancel" ) == 0) { pCM->OnCancelDataSession(); pCM->SetConnectButtonText( "Connect" ); } else if (pCM->mConnectButtonText.compare( "Disconnect" ) == 0) { pCM->OnStopDataSession(); pCM->SetConnectButtonText( "Connect" ); } else { // Externally connected, etc TRACE( "Unknown connect button state %s", pCM->mConnectButtonText.c_str() ); } return 0; } /*=========================================================================*/ // cQTSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI RETURN VALUE: bool ===========================================================================*/ bool cQTSampleCM::Init() { // Use the current screen orientation mView.setOrientation( QmlApplicationViewer::ScreenOrientationAuto ); // The buttons mView.rootContext()->setContextProperty( "connectButton", &mConnectButton ); mView.rootContext()->setContextProperty( "infosButton", &mInfosButton ); mView.rootContext()->setContextProperty( "connectionsButton", &mConnectionsButton ); // The input fields mView.rootContext()->setContextProperty( "apnNameText", &mAPNText ); mView.rootContext()->setContextProperty( "usernameText", &mUsernameText ); mView.rootContext()->setContextProperty( "passwordText", &mPasswordText ); // Default button value SetConnectButtonText( "No Device" ); // Default state mView.rootContext()->setContextProperty( "windowState", "" ); mView.rootContext()->setContextProperty( "dialogText", "" ); bool bRC = cSampleCM::Init(); mView.setMainQmlFile( "qml/GobiSampleCM/main.qml" ); mView.show(); return bRC; } /*=========================================================================== METHOD: Run (Public Method) DESCRIPTION: Run the GUI (blocks until exit) RETURN VALUE: bool ===========================================================================*/ int cQTSampleCM::Run() { return mApp.exec(); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::Disconnect() { SetConnectButtonText( "No device" ); return cSampleCM::Disconnect(); } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Updates apn, username, and password input field values before starting a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::OnStartDataSession( ULONG * pFailureCode ) { // Grab the APN, username, and password mAPN = mAPNText.getText().toUtf8().constData(); mUsername = mUsernameText.getText().toUtf8().constData(); mPassword = mPasswordText.getText().toUtf8().constData(); return cSampleCM::OnStartDataSession( pFailureCode ); } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/QTSampleCM.h000077500000000000000000000307051455567757300242670ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.h DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cButton Generic clickable button for QT cTextInput Generic text input field for QT cQTSampleCM QT implementation of the Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "qmlapplicationviewer.h" #include #include #include "SampleCM.h" // Prototypes class cQTSampleCM; void * AsyncConnectThread( void * pData ); QVariant OnInfosButton( cQTSampleCM * pCM ); QVariant OnConnectionsButton( cQTSampleCM * pCM ); QVariant OnConnectButton( cQTSampleCM * pCM ); /*=========================================================================*/ // Class cButton // Generic clickable button for QT /*=========================================================================*/ class cButton : public QObject { Q_OBJECT public: // Constructor cButton( cQTSampleCM * pCM, QVariant (*pOnClick)( cQTSampleCM * ) ) { mpCM = pCM; mpOnClick = pOnClick; } public slots: // Function to be run on a click event QVariant Click() { if (mpOnClick != 0) { return mpOnClick( mpCM ); } return ""; } protected: /* The main object */ cQTSampleCM * mpCM; /* Function to run when clicked */ QVariant (* mpOnClick)( cQTSampleCM * ); }; /*=========================================================================*/ // cTextInput // Generic text input field for QT /*=========================================================================*/ class cTextInput : public QObject { Q_OBJECT Q_PROPERTY( QString text READ getText WRITE setText ) public slots: // Get the value QString getText() const { return mText; } // Set the value void setText( const QString & text ) { mText = text; } private: /* The text */ QString mText; }; /*=========================================================================*/ // Class cQTSampleCM /*=========================================================================*/ class cQTSampleCM : public cSampleCM { public: // Constructor cQTSampleCM( int argc, char ** argv ) : mApp( argc, argv ), mConnectButtonText( "No Device" ), mConnectButton( this, OnConnectButton ), mInfosButton( this, OnInfosButton ), mConnectionsButton( this, OnConnectionsButton ) { } // Initialize UI, begin waiting for devices bool Init(); // Run the GUI (blocks until exit) int Run(); // Disconnect ULONG Disconnect(); // Process a start data session request ULONG OnStartDataSession( ULONG * pFailureCode ); // Set mState and the connection button void SetState( const std::string & state ) { cSampleCM::SetState( state ); // Update the connection button as well switch (mSessionState) { case eQMIConnectionStatus_Disconnected: { SetConnectButtonText( "Connect" ); if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { // Clear the initial state mInitialState = eQMIConnectionStatus_Disconnected; } } break; case eQMIConnectionStatus_Connected: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "External Con" ); } else { SetConnectButtonText( "Disconnect" ); } } break; case eQMIConnectionStatus_Authenticating: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "Ext Connecting" ); } else { SetConnectButtonText( "Cancel" ); } } break; case eQMIConnectionStatus_Suspended: default: break; } // No more than 12 characters if (mState.size() > 12) { mState.resize( 12 ); } // Note: "state" is already a property, can't duplicate // using "status" instead mView.rootContext()->setContextProperty( "status", mState.c_str() ); } // Set mRSSI void SetRSSI( const std::string & rssi ) { cSampleCM::SetRSSI( rssi ); mView.rootContext()->setContextProperty( "rssi", mRSSI.c_str() ); } // Set mTech void SetTech( const std::string & tech ) { cSampleCM::SetTech( tech ); // No more than 12 characters if (mTech.size() > 12) { mTech.resize( 12 ); } mView.rootContext()->setContextProperty( "tech", mTech.c_str() ); } // Set mRx void SetRx( const std::string & rx ) { cSampleCM::SetRx( rx ); mView.rootContext()->setContextProperty( "rx", mRx.c_str() ); } // Set mTx void SetTx( const std::string & tx ) { cSampleCM::SetTx( tx ); mView.rootContext()->setContextProperty( "tx", mTx.c_str() ); } // Set mMaxRx void SetMaxRx( const std::string & maxRx ) { cSampleCM::SetMaxRx( maxRx ); mView.rootContext()->setContextProperty( "maxRx", mMaxRx.c_str() ); } // Set mMaxTx void SetMaxTx( const std::string & maxTx ) { cSampleCM::SetMaxTx( maxTx ); mView.rootContext()->setContextProperty( "maxTx", mMaxTx.c_str() ); } // Set mRoam void SetRoam( const std::string & roam ) { cSampleCM::SetRoam( roam ); mView.rootContext()->setContextProperty( "roam", mRoam.c_str() ); } // Set mDuration void SetDuration( const std::string & duration ) { cSampleCM::SetDuration( duration ); mView.rootContext()->setContextProperty( "duration", mDuration.c_str() ); } // Set mLifeDuration void SetLifeDuration( const std::string & lifeDuration ) { cSampleCM::SetLifeDuration( lifeDuration ); mView.rootContext()->setContextProperty( "lifeDuration", mLifeDuration.c_str() ); } // Set mLifeRx void SetLifeRx( const std::string & lifeRx ) { cSampleCM::SetLifeRx( lifeRx ); mView.rootContext()->setContextProperty( "lifeRx", mLifeRx.c_str() ); } // Set mLifeTx void SetLifeTx( const std::string & lifeTx ) { cSampleCM::SetLifeTx( lifeTx ); mView.rootContext()->setContextProperty( "lifeTx", mLifeTx.c_str() ); } // Set mManufact void SetManufact( const std::string & manufact ) { cSampleCM::SetManufact( manufact ); mView.rootContext()->setContextProperty( "manufact", mManufact.c_str() ); } // Set mModel void SetModel( const std::string & model ) { cSampleCM::SetModel( model ); // No more than 20 characters if (mModel.size() > 20) { mModel.resize( 20 ); } mView.rootContext()->setContextProperty( "model", mModel.c_str() ); } // Set mHardware void SetHardware( const std::string & hardware ) { cSampleCM::SetHardware( hardware ); mView.rootContext()->setContextProperty( "hardware", mHardware.c_str() ); } // Set mFirmware void SetFirmware( const std::string & firmware ) { cSampleCM::SetFirmware( firmware ); // No more than 20 characters if (mFirmware.size() > 20) { mFirmware.resize( 20 ); } mView.rootContext()->setContextProperty( "firmware", mFirmware.c_str() ); } // Set mMDN void SetMDN( const std::string & mdn ) { cSampleCM::SetMDN( mdn ); mView.rootContext()->setContextProperty( "mdn", mMDN.c_str() ); } // Set mMIN void SetMIN( const std::string & min ) { cSampleCM::SetMIN( min ); mView.rootContext()->setContextProperty( "min", mMIN.c_str() ); } // Set mESN void SetESN( const std::string & esn ) { cSampleCM::SetESN( esn ); mView.rootContext()->setContextProperty( "esn", mESN.c_str() ); } // Set mMEID void SetMEID( const std::string & meid ) { cSampleCM::SetMEID( meid ); mView.rootContext()->setContextProperty( "meid", mMEID.c_str() ); } // Set mIMEI void SetIMEI( const std::string & imei ) { cSampleCM::SetIMEI( imei ); mView.rootContext()->setContextProperty( "imei", mIMEI.c_str() ); } // Set mIMSI void SetIMSI( const std::string & imsi ) { cSampleCM::SetIMSI( imsi ); mView.rootContext()->setContextProperty( "imsi", mIMSI.c_str() ); } // Set mConnectButtonText void SetConnectButtonText( const std::string & connectButtonText ) { mConnectButtonText = connectButtonText; mView.rootContext()->setContextProperty( "connectButtonText", connectButtonText.c_str() ); } protected: /* QApplication object */ QApplication mApp; /* QmlApplicationViewer object */ QmlApplicationViewer mView; /* APN text input field */ cTextInput mAPNText; /* Username text input field */ cTextInput mUsernameText; /* Password text input field */ cTextInput mPasswordText; /* "Connect" button's text */ std::string mConnectButtonText; /* "Connect" button */ cButton mConnectButton; /* "Info Stats" button */ cButton mInfosButton; /* "Connection Stats" button */ cButton mConnectionsButton; /* Async connection thread ID */ pthread_t mAsyncConnectThreadID; // Friend functions friend void * AsyncConnectThread( void * pData ); friend QVariant OnInfosButton( cQTSampleCM * pCM ); friend QVariant OnConnectionsButton( cQTSampleCM * pCM ); friend QVariant OnConnectButton( cQTSampleCM * pCM ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/SampleCM.cpp000077500000000000000000001337271455567757300243650ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.cpp DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMDLL.h" #include "GobiCMCallback.h" #include "GobiConnectionMgmtAPIStructs.h" #include #include #include #include #include // Global pointer for callbacks to reference class cSampleCM * gpCM; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime; clock_gettime( CLOCK_REALTIME, &curtime ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================== METHOD: DeviceDetectionThread (Free Method) DESCRIPTION: Scans for and detects devices PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * DeviceDetectionThread( void * pData ) { cSampleCM * pCM = (cSampleCM *)pData; if (pCM == NULL) { return NULL; } // Get inotify handle int inotify = inotify_init(); if (inotify == -1) { TRACE( "inotify_init failed\n" ); return NULL; } // Start a watch on the /dev directory int inotifyFlags = IN_CREATE | IN_MODIFY | IN_DELETE; int watchD = inotify_add_watch( inotify, "/dev/", inotifyFlags ); if (watchD == -1) { TRACE( "inotify_add_watch failed\n" ); close( inotify ); return NULL; } // Does a device already exist? dirent ** ppDevFiles; // Yes, scandir really takes a triple pointer for its second param int numDevs = scandir( "/dev/", &ppDevFiles, NULL, NULL ); for (int i = 0; i < numDevs; i++) { std::string deviceID = "/dev/"; deviceID += ppDevFiles[i]->d_name; free( ppDevFiles[i] ); if (deviceID.find( "qcqmi" ) != std::string::npos) { pCM->Connect( deviceID.c_str() ); break; } } // Cleanup from scandir if (numDevs != -1) { free( ppDevFiles ); } else { TRACE( "Scandir failed\n" ); } // Begin async reading fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pCM->mDeviceDetectionStopPipe[READING], &inputSet ); FD_SET( inotify, &inputSet ); int largestFD = std::max( pCM->mDeviceDetectionStopPipe[READING], inotify ); while (true) { // No FD_COPY() available in android memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait for data on either the inotify or the stop pipe int status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { break; } else if (FD_ISSET( pCM->mDeviceDetectionStopPipe[READING], &outputSet ) == true) { // Time to close break; } else if (FD_ISSET( inotify, &outputSet ) == true) { // Perform a read BYTE buffer[1024] = { 0 }; int rc = read( inotify, &buffer[0], 1024 ); if (rc < (int)sizeof( inotify_event )) { continue; } // Typecast the buffer to an inotify event struct inotify_event * pIEvent = (struct inotify_event *)&buffer[0]; // Check the length of the name if (pIEvent->len < 5) { continue; } // Is this a matching device? if (strncmp( pIEvent->name, "qcqmi", 5 ) != 0) { continue; } std::string deviceID = "/dev/"; deviceID += pIEvent->name; if (pIEvent->mask & IN_CREATE || pIEvent->mask & IN_MODIFY) { pCM->Connect( deviceID.c_str() ); } if (pIEvent->mask & IN_DELETE) { // Was it the connected device which was removed? if (pCM->mDeviceID.compare( deviceID ) == 0) { pCM->Disconnect(); } } } } // Cleanup inotify_rm_watch( inotify, watchD ); close( inotify ); return NULL; } /*=========================================================================== METHOD: UpdateNetworkInfoThread (Free Method) DESCRIPTION: Updates the network stats every 1s (while device is present) PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * UpdateNetworkInfoThread( void * pData ) { cSampleCM * pCM = (cSampleCM*)pData; if (pCM == NULL) { return NULL; } // Update once pCM->CheckConnectedStats(); int rc; do { // Update rates and times every 1s pCM->UpdateRateDisplay(); pCM->UpdateTimeDisplay(); DWORD temp; rc = pCM->mUpdateNetworkInfoEvent.Wait( 1000, temp ); } while (rc == ETIME); return NULL; } /*=========================================================================== METHOD: ParseStats (Free Method) DESCRIPTION: Parse the stats file and obtain the TX/RX bytes and connection duration NOTE: The stats text file consists of one line in the following format: Total RX Bytes; Total TX Bytes; Total Duration PARAMETERS: line [ I ] - Line to parse lifeTotalRX [ O ] - Total RX bytes lifeTotalTX [ O ] - Total TX bytes lifeTotalDuration [ O ] - Total connection duration RETURN VALUE: bool ===========================================================================*/ bool ParseStats( std::istringstream & line, ULONGLONG & lifeTotalRX, ULONGLONG & lifeTotalTX, ULONGLONG & lifeTotalDuration ) { ULONGLONG temp1, temp2, temp3; char c1, c2; // Attempt to parse into temp variables, skipping whitespace line >> std::skipws >> temp1 >> c1 >> temp2 >> c2 >> temp3; // Was parsing successful? if (line.fail() == true) { TRACE( "failed to parse stats file\n" ); return false; } else { TRACE( "read %llu, %llu, %llu", temp1, temp2, temp3 ); lifeTotalRX = temp1; lifeTotalTX = temp2; lifeTotalDuration = temp3; return true; } } /*=========================================================================*/ // cSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: ~cSampleCM (Public Method) DESCRIPTION: Destructor - Stops the data session, Stops device detection thread, Writes stats to file RETURN VALUE: None ===========================================================================*/ cSampleCM::~cSampleCM() { // These functions will most likely fail. That's ok. OnCancelDataSession(); OnStopDataSession(); Disconnect(); // Close device detection thread, if open if (mDeviceDetectionStopPipe[WRITING] != -1) { if (mDeviceDetectionThreadID != 0) { BYTE byte = 1; write( mDeviceDetectionStopPipe[WRITING], &byte, 1 ); pthread_join( mDeviceDetectionThreadID, NULL ); mDeviceDetectionThreadID = 0; } close( mDeviceDetectionStopPipe[WRITING] ); close( mDeviceDetectionStopPipe[READING] ); mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; } // Write stats to file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int flags = O_CREAT | O_TRUNC | O_WRONLY; mode_t mode = S_IRUSR | S_IWUSR; int statsFile = open( config.c_str(), flags, mode ); if (statsFile < 0) { TRACE( "Unable to create stats file\n" ); } else { std::ostringstream out; out << mLifeTotalRX << "; " << mLifeTotalTX << "; " << mLifeTotalDuration; int rc = write( statsFile, out.str().c_str(), out.str().size() ); if (rc < 0) { TRACE( "Unable to write stats to file\n" ); } close( statsFile ); } } /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI, begin waiting for devices RETURN VALUE: bool ===========================================================================*/ bool cSampleCM::Init() { Disconnect(); // Read in the stats file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int statsFile = open( config.c_str(), O_RDONLY ); if (statsFile < 0) { // Non-fatal error TRACE( "Unable to open config file %s", config.c_str() ); } else { CHAR buf[100]; int len = read( statsFile, &buf[0], 100 ); if (len < 0) { // Non-fatal error TRACE( "failed to read from file\n" ); } else { std::string asString( &buf[0], len ); std::istringstream line( asString ); ULONGLONG lrx, ltx, ld; if (ParseStats( line, lrx, ltx, ld ) == true) { mLifeTotalRX = lrx; mLifeTotalTX = ltx; mLifeTotalDuration = ld; } } close( statsFile ); } // Life totals will just be zeros if the file was not present std::ostringstream tmp; tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); tmp.str( "" ); tmp << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << mLifeTotalDuration % 60; SetLifeDuration( tmp.str() ); // Set the global pointer, used by callbacks gpCM = this; // Initialize command pipe int ret = pipe( mDeviceDetectionStopPipe ); if (ret != 0) { // Should never happen, but just in case... return false; } // Begin scanning for devices ret = pthread_create( &mDeviceDetectionThreadID, 0, DeviceDetectionThread, this ); if (ret != 0) { return false; } return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Initializes the Gobi API to the current device PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Connect( LPCSTR pInterface ) { // Are we already connected to a device? if (mDeviceID.size() != 0) { return eGOBI_ERR_MULTIPLE_DEVICES; } // Connect to the device ULONG rc = mGobi.Connect( pInterface ); if (rc != eGOBI_ERR_NONE) { TRACE( "GobiConnect error %lu\n", rc ); return rc; } UpdateDeviceInfo(); UpdateConnectionInfo(); // Any connection at this point is an external connection UpdateSessionState( true, mSessionState ); // Success mDeviceID = pInterface; return rc; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Disconnect() { // Stop a data session, if present OnCancelDataSession(); OnStopDataSession(); mGobi.Disconnect(); // Reset state mSessionID = 0xFFFFFFFF; mInitialState = 0xFFFFFFFF; mDataBearerTech = 0; // Store life total mLifeTotalDuration += mTotalDuration; // Reset all totals mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; SetState( "No Device" ); SetRSSI( "Unknown" ); SetTech( "Unknown" ); SetRx( "Unknown" ); SetTx( "Unknown" ); SetMaxRx( "Unknown" ); SetMaxTx( "Unknown" ); SetRoam( "Unknown" ); SetDuration( "Unknown" ); SetLifeDuration( "Unknown" ); SetLifeRx( "Unknown" ); SetLifeTx( "Unknown" ); SetManufact( "Unknown" ); SetModel( "Unknown" ); SetHardware( "Unknown" ); SetFirmware( "Unknown" ); SetMDN( "Unknown" ); SetMIN( "Unknown" ); SetESN( "Unknown" ); SetMEID( "Unknown" ); SetIMEI( "Unknown" ); SetIMSI( "Unknown" ); return eGOBI_ERR_NONE; } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Starts a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStartDataSession( ULONG * pFailureCode ) { mbInitiatedStartDataSession = true; // Use provided values, if not empty strings LPCSTR pAPN = (mAPN.size() == 0) ? 0 : mAPN.c_str(); LPCSTR pUsername = (mUsername.size() == 0) ? 0 : mUsername.c_str(); LPCSTR pPassword = (mPassword.size() == 0) ? 0 : mPassword.c_str(); ULONG rc = mGobi.StartDataSession( pAPN, pUsername, pPassword, &mSessionID, pFailureCode ); if (rc == eGOBI_ERR_NONE) { mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = GetTickCount(); } else { mbInitiatedStartDataSession = false; } return rc; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Cancels an in progress data session request RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnCancelDataSession() { return mGobi.CancelDataSession(); } /*=========================================================================== METHOD: OnStopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStopDataSession() { if (mSessionID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } mbInitiatedStopDataSession = true; mDataBearerTech = 0; ULONG rc = mGobi.StopDataSession( mSessionID ); mSessionID = 0xFFFFFFFF; return rc; } /*=========================================================================== METHOD: OnSignalStrengthCBNotification (Internal Method) DESCRIPTION: Handle signal strength callback notification PARAMETERS: signalStr [ I ] - Signal strength radioInterface [ I ] - Radio interface ===========================================================================*/ void cSampleCM::OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ) { // Update mServiceSignals mServiceSignals[radioInterface] = signalStr; if (mSessionState == eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnSessionStateCBNotification (Internal Method) DESCRIPTION: Handle session state callback notification PARAMETERS: state [ I ] - Session state ===========================================================================*/ void cSampleCM::OnSessionStateCBNotification( ULONG state ) { // Was the state change triggered externally? bool bStateChangeExternal = false; // Save session state if (state == eQMIConnectionStatus_Connected) { // Started externally if (mbInitiatedStartDataSession == false) { bStateChangeExternal = true; mStartTime = GetTickCount(); } } else { mDataBearerTech = 0; // Stopped externally if (mbInitiatedStopDataSession == false) { // Store all life total variables mLifeTotalDuration += mTotalDuration; // Reset all totals bStateChangeExternal = true; mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; } } // Update the session state UpdateSessionState( bStateChangeExternal, state ); // Update the signal strength and technology UpdateSignalAndTech(); // Reset to false mbInitiatedStartDataSession = false; mbInitiatedStopDataSession = false; } /*=========================================================================== METHOD: OnDataBearerCBNotification (Internal Method) DESCRIPTION: Handle data bearer callback notification PARAMETERS: dataBearerTech [ I ] - Data bearer technology ===========================================================================*/ void cSampleCM::OnDataBearerCBNotification( ULONG dataBearerTech ) { if (dataBearerTech != eQMIDataBearerTechnologies_Unknown) { mDataBearerTech = dataBearerTech; UpdateSignalAndTech(); } } /*=========================================================================== METHOD: OnDataCapsNotification (Internal Method) DESCRIPTION: Handle data capabilities callback notification PARAMETERS: numDataCaps [ I ] - Number of data capabilities pDataCaps [ I ] - Data Capabilites ===========================================================================*/ void cSampleCM::OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ) { // Clear saved data capabilities in order to update mDataCapabilities.clear(); // Populate list with new capabilities for (ULONG c = 0; c < numDataCaps; c++) { ULONG dataCaps = pDataCaps[c]; if ( (dataCaps != 0xFFFFFFFF) && (dataCaps != 0) ) { mDataCapabilities.push_back( pDataCaps[c] ); } } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnByteTotalsNotification (Internal Method) DESCRIPTION: Handle byte totals callback notification PARAMETERS: rx [ I ] - received bytes tx [ I ] - transmitted bytes ===========================================================================*/ void cSampleCM::OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ) { mTotalTX = tx; mTotalRX = rx; } /*=========================================================================== METHOD: UpdateSignalAndTech (Public Method) DESCRIPTION: Update the signal strength and technology display ===========================================================================*/ void cSampleCM::UpdateSignalAndTech() { std::string radioStr = "Unknown"; std::string ssStr = "Unknown"; ULONG radioVal = eQMINASRadioInterfaces_NoneNoService; // If connected, use data bearer if (mDataBearerTech != 0) { switch (mDataBearerTech) { case eQMIDataBearerTechnologies_CDMA20001x: radioStr = "CDMA 1xRTT"; radioVal = eQMINASRadioInterfaces_CDMA20001x; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORev0: radioStr = "CDMA 1xEVDO Rev 0"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_GPRS: radioStr = "GRPS"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_WCDMA: radioStr = "WCDMA"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORevA: radioStr = "CDMA 1xEVDO Rev A"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_EGPRS: radioStr = "EDGE"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_HSDPAWCDMA: radioStr = "HSDPA DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_WCDMAHSUPA: radioStr = "WCDMA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAHSUPA: radioStr = "HSDPA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_LTE: radioStr = "LTE"; radioVal = eQMINASRadioInterfaces_LTE; break; case eQMIDataBearerTechnologies_CDMA2000EHRPD: radioStr = "CDMA 1xEVDO eHRPD"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_HSDPAPlusWCDMA: radioStr = "HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAPlusHSUPA: radioStr = "HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA: radioStr = "Dual Cell HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA: radioStr = "Dual Cell HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; } if ( (radioVal != eQMINASRadioInterfaces_NoneNoService) && (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } else { // When not connected we have to pick the most preferred data capability eQMINASDataServiceCapabilities2 mostPreferredCap = (eQMINASDataServiceCapabilities2)0xff; std::list ::const_iterator pIter; std::list ::const_iterator pDataCapsItr; pIter = mPreferredServices.begin(); bool bDone = false; while ( (pIter != mPreferredServices.end()) && (bDone != true) ) { pDataCapsItr = mDataCapabilities.begin(); while (pDataCapsItr != mDataCapabilities.end()) { if (*pIter == *pDataCapsItr) { mostPreferredCap = (eQMINASDataServiceCapabilities2)*pIter; bDone = true; break; } pDataCapsItr++; } pIter++; } // Determine the best radio interface reported eQMINASRadioInterfaces preferredRadioIf; preferredRadioIf = eQMINASRadioInterfaces_NoneNoService; if (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_LTE; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA2000HRPD; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA20001x; } else if (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_UMTS; } else if (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_GSM; } radioStr = "Unknown"; ssStr = "Unknown"; radioVal = eQMINASRadioInterfaces_NoneNoService; // Determine sig strength and radio interface to display based on // most preferred data capabilities switch (preferredRadioIf) { case eQMINASRadioInterfaces_CDMA2000HRPD: radioStr = "CDMA 1xEVDO"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevB) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORev0) ) { radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_CDMA20001x: radioStr = "CDMA 1xRTT"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA) { radioVal = eQMINASRadioInterfaces_CDMA20001x; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_UMTS: radioStr = "WCDMA"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_DCHSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSUPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_WCDMA) ) { radioVal = eQMINASRadioInterfaces_UMTS; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_GSM: radioStr = "GSM"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_GPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_EGPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_GSM) ) { radioVal = eQMINASRadioInterfaces_GSM; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_LTE: radioStr = "LTE"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_LTE) { radioVal = eQMINASRadioInterfaces_LTE; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_NoneNoService: if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] != SCHAR_MAX) ) { radioStr = "CDMA 1xEVDO"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] != SCHAR_MAX) ) { radioStr = "CDMA 1xRTT"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA20001x]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_UMTS] != SCHAR_MAX) ) { radioStr = "WCDMA"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_UMTS]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_GSM] != SCHAR_MAX) ) { radioStr = "GSM"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_GSM]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_LTE] != SCHAR_MAX) ) { radioStr = "LTE"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_LTE]; ssStr = temp.str(); } break; default: radioStr = "Unknown"; ssStr = "Unknown"; } } SetRSSI( ssStr ); SetTech( radioStr ); } /*=========================================================================== METHOD: UpdateSessionState (Public Method) DESCRIPTION: Update the session state display Start/stop UpdateNetworkInfo thread PARAMETERS: bExternal [ I ] - Was the state change triggered externally state [ I ] - State of session RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateSessionState( bool bExternal, ULONG state ) { mSessionState = state; if (bExternal == true) { mInitialState = state; } LPCSTR pState = "Unknown"; switch (state) { // Disconnected case 1: { pState = "Disconnected"; // Stop the network info thread, if running if (mUpdateNetworkInfoThreadID != 0) { mUpdateNetworkInfoEvent.Set( 0 ); pthread_join( mUpdateNetworkInfoThreadID, NULL ); mUpdateNetworkInfoThreadID = 0; mLifeTotalDuration += mTotalDuration; } // Reset all totals mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = 0; UpdateRateDisplay(); UpdateTimeDisplay(); } break; // Connected case 2: { if (bExternal == true) { pState = "External Con"; } else { pState = "Connected"; } // Start the network info thread, if not running if (mUpdateNetworkInfoThreadID == 0) { // Begin updating network info int rc = pthread_create( &mUpdateNetworkInfoThreadID, 0, UpdateNetworkInfoThread, this ); if (rc != 0) { TRACE( "error starting network info thread\n" ); } } } break; // Suspended case 3: pState = "Suspended"; break; // Connecting case 4: if (bExternal == true) { pState = "Ext Connecting"; } else { pState = "Connecting"; } break; } SetState( pState ); } /*=========================================================================== METHOD: UpdateRateDisplay (Public Method) DESCRIPTION: Calculate and update the tx, rx rates being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateRateDisplay() { // Update TX/RX Bytes ULONGLONG deltaRX = 0; ULONGLONG deltaTX = 0; // Only update rates if connected if (mSessionState == eQMIConnectionStatus_Connected) { // First time through, don't use the deltas if (mTotalRX != 0) { deltaRX = mTotalRX - mPreviousRX; } if (mTotalTX != 0) { deltaTX = mTotalTX - mPreviousTX; } // Update life total byte variables mLifeTotalRX += deltaRX; mLifeTotalTX += deltaTX; mPreviousRX = mTotalRX; mPreviousTX = mTotalTX; } std::ostringstream tmp; tmp << deltaRX; SetRx( tmp.str() ); tmp.str( "" ); tmp << deltaTX; SetTx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); } /*=========================================================================== METHOD: UpdateTimeDisplay (Public Method) DESCRIPTION: Calculate and update the connection time being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateTimeDisplay() { DWORD elapsedTime = 0; DWORD lifeTotalTime = 0; // Update session duration if ( (mSessionState == eQMIConnectionStatus_Connected) && (mStartTime != 0) ) { // Convert ms to seconds mTotalDuration = (GetTickCount() - mStartTime) / 1000; elapsedTime = (DWORD)mTotalDuration; lifeTotalTime = (DWORD)(mLifeTotalDuration + mTotalDuration); } else { elapsedTime = 0; lifeTotalTime = (DWORD)mLifeTotalDuration; } std::ostringstream timeStr; // Format both into hh:mm:ss // "%02d:%02d:%02d" timeStr << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << elapsedTime % 60; SetDuration( timeStr.str() ); timeStr.str( "" ); timeStr << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << lifeTotalTime % 60; SetLifeDuration( timeStr.str() ); } /*=========================================================================== METHOD: CheckConnectedStats (Public Method) DESCRIPTION: Check stats which are only valid during a connection ===========================================================================*/ void cSampleCM::CheckConnectedStats() { ULONG rc = mGobi.GetDataBearerTechnology( &mDataBearerTech ); if (rc != eGOBI_ERR_NONE || mDataBearerTech == ULONG_MAX) { TRACE( "GetDataBearerTechnology error %lu\n", rc ); return; } ULONGLONG duration; rc = mGobi.GetSessionDuration( &duration ); if (rc != eGOBI_ERR_NONE) { TRACE( "GetSessionDuration error %lu\n", rc ); return; } mStartTime = GetTickCount() - duration; UpdateSignalAndTech(); } /*=========================================================================== METHOD: UpdateDeviceInfo (Public Method) DESCRIPTION: Update the device info stats ===========================================================================*/ void cSampleCM::UpdateDeviceInfo() { ULONG status = 0; BYTE strSz1 = 255; BYTE strSz2 = 255; BYTE strSz3 = 255; CHAR str1[255]; CHAR str2[255]; CHAR str3[255]; str1[0] = 0; str2[0] = 0; str3[0] = 0; // Get manufacturer status = mGobi.GetManufacturer( strSz1, str1 ); if (status != 0) { TRACE( "GetManufacturer() = %lu\n", status ); return; } if (str1[0] != 0) { SetManufact( &str1[0] ); } // Get model ID str1[0] = 0; status = mGobi.GetModelID( strSz1, str1 ); if (status != 0) { TRACE( "GetModelID() = %lu\n", status ); return; } if (str1[0] != 0) { std::ostringstream tmp; if (strncmp( "88", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-1000"; } else if (strncmp( "12", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-2000"; } else { tmp << "Unknown (" << &str1[0] << ")"; } SetModel( tmp.str() ); } // Get firmware revision str1[0] = 0; status = mGobi.GetFirmwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetFirmwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetFirmware( &str1[0] ); } // Get hardware revision str1[0] = 0; status = mGobi.GetHardwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetHardwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetHardware( &str1[0] ); } // Get MDN/MIN str1[0] = 0; str2[0] = 0; status = mGobi.GetVoiceNumber( strSz1, str1, strSz2, str2 ); if (status != 0) { if (status == 1016) { // Not provisioned SetMDN( "Not provisioned" ); SetMIN( "Not provisioned" ); } else { TRACE( "GetVoiceNumber() = %lu\n", status ); return; } } if (str1[0] != 0) { SetMDN( &str1[0] ); } if (str2[0] != 0) { SetMIN( &str2[0] ); } // Get ESN/IMEI/MEID str1[0] = 0; str2[0] = 0; str3[0] = 0; status = mGobi.GetSerialNumbers( strSz1, str1, strSz2, str2, strSz3, str3 ); if (status != 0) { if (status == 1016) { // Not provisioned SetESN( "Not provisioned" ); SetIMEI( "Not provisioned" ); SetMEID( "Not provisioned" ); } else { TRACE( "GetSerialNumbers() = %lu\n", status ); return; } } if (str1[0] != 0) { SetESN( &str1[0] ); } if (str2[0] != 0) { SetIMEI( &str2[0] ); } if (str3[0] != 0) { SetMEID( &str3[0] ); } // Get IMSI str1[0] = 0; status = mGobi.GetIMSI( strSz1, str1 ); if (status != 0) { if (status == 1016) { // Not provisioned SetIMSI( "Not provisioned" ); } else { TRACE( "GetIMSI() = %lu\n", status ); return; } } if (str1[0] != 0) { SetIMSI( &str1[0] ); } } /*=========================================================================== METHOD: UpdateConnectionInfo (Public Method) DESCRIPTION: Update the connection info stats ===========================================================================*/ void cSampleCM::UpdateConnectionInfo() { // Re-usable buffer std::ostringstream tmp; // Get session state ULONG rc = mGobi.GetSessionState( &mSessionState ); if (rc != eGOBI_ERR_NONE || mSessionState == ULONG_MAX) { TRACE( "GetSessionState error %lu\n", rc ); return; } UpdateSessionState( mSessionID != 0xFFFFFFFF, mSessionState ); // If connected, refresh data bearer technology and session duration if (mSessionState == eQMIConnectionStatus_Connected) { CheckConnectedStats(); } INT8 signalStrengths[MAX_SIGNALS]; ULONG radioInterfaces[MAX_SIGNALS]; // Get the signal strengths rc = mGobi.GetSignalStrengths( &signalStrengths[0], &radioInterfaces[0] ); if (rc != eGOBI_ERR_NONE && rc != eGOBI_ERR_NO_SIGNAL) { TRACE( "GetSignalStrengths error %lu\n", rc ); return; } // Map signal strengths to RadioIf types for (ULONG s = 0; s < MAX_SIGNALS; s++) { INT8 signal = signalStrengths[s]; switch (radioInterfaces[s]) { case eQMINASRadioInterfaces_NoneNoService: mServiceSignals[eQMINASRadioInterfaces_NoneNoService] = signal; break; case eQMINASRadioInterfaces_CDMA20001x: mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] = signal; break; case eQMINASRadioInterfaces_CDMA2000HRPD: mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] = signal; break; case eQMINASRadioInterfaces_AMPS: mServiceSignals[eQMINASRadioInterfaces_AMPS] = signal; break; case eQMINASRadioInterfaces_GSM: mServiceSignals[eQMINASRadioInterfaces_GSM] = signal; break; case eQMINASRadioInterfaces_UMTS: mServiceSignals[eQMINASRadioInterfaces_UMTS] = signal; break; case eQMINASRadioInterfaces_LTE: mServiceSignals[eQMINASRadioInterfaces_LTE] = signal; break; } } ULONG curTX = 0; ULONG curRX = 0; ULONG maxTX = 0; ULONG maxRX = 0; // Get the connection rate rc = mGobi.GetConnectionRate( &curTX, &curRX, &maxTX, &maxRX ); if (rc != 0) { TRACE( "GetConnectionRate error %lu\n", rc ); return; } // Store the max data rates tmp.str( "" ); tmp << maxRX; SetMaxRx( tmp.str() ); tmp.str( "" ); tmp << maxTX; SetMaxTx( tmp.str() ); ULONG dataCapabilities[MAX_DATA_CAPABILITIES]; WORD srvMCC = 0; WORD srvMNC = 0; BYTE srvNameSize = 255; CHAR srvName[255]; srvName[0] = 0; WORD sid = 0; WORD nid = 0; ULONG roam = 0; // Get the serving network info rc = mGobi.GetServingNetwork( &dataCapabilities[0], &srvMCC, &srvMNC, srvNameSize, &srvName[0], &sid, &nid, &roam ); if (rc != 0) { TRACE( "GetServingNetwork error %lu\n", rc ); return; } // Store data capabilities for (ULONG c = 0; c < MAX_DATA_CAPABILITIES; c++) { if ( (dataCapabilities[c] != ULONG_MAX) && (dataCapabilities[c] != 0) ) { mDataCapabilities.push_back( dataCapabilities[c] ); } } if (roam == 0xFFFFFFFF) { SetRoam( "Unknown" ); } else { tmp.str( "" ); tmp << roam; SetRoam( tmp.str() ); } // Update the signal strength and technology fields if (mSessionState != eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); // Setup callbacks rc = mGobi.SetWDSEventReportCB( WDSEventReportCallback, 1 ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetWDSSessionStateCB( WDSSessionStateCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSSessionStateCB error %lu\n", rc ); return; } BYTE thresSz = 5; INT8 thres[5] = {-90, -85, -80, -75, -70}; rc = mGobi.SetNASEventReportCB( NASEventReportCallback, thresSz, &thres[0] ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetNASServingSystemCB( NASServingSystemCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASServingSystemCB error %lu\n", rc ); return; } } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/SampleCM.h000077500000000000000000000270151455567757300240220ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.h DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiCMDLL.h" #include "Event.h" #include #include #include // Prototypes void * DeviceDetectionThread( void * pData ); void * UpdateNetworkInfo( void * pData ); // A global pointer to the CM, used by the callbacks extern class cSampleCM * gpCM; /*=========================================================================*/ // Class cSampleCM /*=========================================================================*/ class cSampleCM { public: // Constructor cSampleCM() : mDeviceID(), mSessionState( 0 ), mSessionID( 0xFFFFFFFF ), mInitialState( 0xFFFFFFFF ), mStartTime( 0 ), mPreviousRX( 0 ), mPreviousTX( 0 ), mTotalRX( 0 ), mTotalTX( 0 ), mLifeTotalRX( 0 ), mLifeTotalTX( 0 ), mCurrentDuration( 0 ), mTotalDuration( 0 ), mLifeTotalDuration( 0 ), mbInitiatedStartDataSession( false ), mbInitiatedStopDataSession( false ), mDataBearerTech( eQMIDataBearerTechnologies_Unknown ), mDeviceDetectionThreadID( 0 ), mUpdateNetworkInfoThreadID( 0 ) { mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; // Create an ordered list of service preferences mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevB ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_DCHSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_WCDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_EGPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GSM ); } // Destructor ~cSampleCM(); // Initialize UI, begin waiting for devices virtual bool Init(); // Connect to a device and send initial callback registrations virtual ULONG Connect( LPCSTR pInterface ); // Disconnect from a device and set members as "Unknown" virtual ULONG Disconnect(); // Process a start data session request virtual ULONG OnStartDataSession( ULONG * pFailureCode ); // Process a cancel data session request virtual ULONG OnCancelDataSession(); // Process a stop data session request virtual ULONG OnStopDataSession(); // Set mState virtual void SetState( const std::string & state ) { mState = state; } // Set mRSSI virtual void SetRSSI( const std::string & rssi ) { mRSSI = rssi; } // Set mTech virtual void SetTech( const std::string & tech ) { mTech = tech; } // Set mRx virtual void SetRx( const std::string & rx ) { mRx = rx; } // Set mTx virtual void SetTx( const std::string & tx ) { mTx = tx; } // Set mMaxRx virtual void SetMaxRx( const std::string & maxRx ) { mMaxRx = maxRx; } // Set mMaxTx virtual void SetMaxTx( const std::string & maxTx ) { mMaxTx = maxTx; } // Set mRoam virtual void SetRoam( const std::string & roam ) { mRoam = roam; } // Set mDuration virtual void SetDuration( const std::string & duration ) { mDuration = duration; } // Set mLifeDuration virtual void SetLifeDuration( const std::string & lifeDuration ) { mLifeDuration = lifeDuration; } // Set mLifeRx virtual void SetLifeRx( const std::string & lifeRx ) { mLifeRx = lifeRx; } // Set mLifeTx virtual void SetLifeTx( const std::string & lifeTx ) { mLifeTx = lifeTx; } // Set mManufact virtual void SetManufact( const std::string & manufact ) { mManufact = manufact; } // Set mModel virtual void SetModel( const std::string & model ) { mModel = model; } // Set mHardware virtual void SetHardware( const std::string & hardware ) { mHardware = hardware; } // Set mFirmware virtual void SetFirmware( const std::string & firmware ) { mFirmware = firmware; } // Set mMDN virtual void SetMDN( const std::string & mdn ) { mMDN = mdn; } // Set mMIN virtual void SetMIN( const std::string & min ) { mMIN = min; } // Set mESN virtual void SetESN( const std::string & esn ) { mESN = esn; } // Set mMEID virtual void SetMEID( const std::string & meid ) { mMEID = meid; } // Set mIMEI virtual void SetIMEI( const std::string & imei ) { mIMEI = imei; } // Set mIMSI virtual void SetIMSI( const std::string & imsi ) { mIMSI = imsi; } // Handle signal strength callback notification void OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ); // Handle session state callback notification void OnSessionStateCBNotification( ULONG state ); // Handle data bearer callback notification void OnDataBearerCBNotification( ULONG dataBearerTech ); // Handle data capabilities callback notification void OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ); // Handle byte totals callback notification void OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ); // Update the signal strength and technology void UpdateSignalAndTech(); // Update the session state void UpdateSessionState( bool bExternal, ULONG state ); // Calculate and update the connection time being displayed void UpdateTimeDisplay(); // Calculate and update the tx and rx rates being displayed void UpdateRateDisplay(); // Check data bearer and duration, which are only available while // connected void CheckConnectedStats(); // Update the device info stats void UpdateDeviceInfo(); // Update the Connection Stats void UpdateConnectionInfo(); protected: /* Class for interfacing with Gobi API */ cGobiCMDLL mGobi; /* Connected device's ID */ std::string mDeviceID; /* All the display elements */ std::string mState; std::string mRSSI; std::string mTech; std::string mRx; std::string mTx; std::string mMaxRx; std::string mMaxTx; std::string mRoam; std::string mDuration; std::string mLifeDuration; std::string mLifeRx; std::string mLifeTx; std::string mManufact; std::string mModel; std::string mHardware; std::string mFirmware; std::string mMDN; std::string mMIN; std::string mESN; std::string mMEID; std::string mIMEI; std::string mIMSI; /* All the input elements */ std::string mAPN; std::string mUsername; std::string mPassword; /* Session state */ ULONG mSessionState; /* Data session ID */ ULONG mSessionID; /* Initial state, used to determine if the connection was initiated internally or externally */ ULONG mInitialState; /* Preferred service order */ std::list mPreferredServices; /* Stores the time that connection was started */ ULONGLONG mStartTime; /* Stores the connection rates updated by callbacks */ ULONGLONG mPreviousRX; ULONGLONG mPreviousTX; ULONGLONG mTotalRX; ULONGLONG mTotalTX; ULONGLONG mLifeTotalRX; ULONGLONG mLifeTotalTX; // Current and total durations ULONGLONG mCurrentDuration; ULONGLONG mTotalDuration; ULONGLONG mLifeTotalDuration; /* Did we initiate a start data session? */ bool mbInitiatedStartDataSession; /* Did we initiate a stop data session? */ bool mbInitiatedStopDataSession; /* Current signal map */ std::map mServiceSignals; /* Current data bearer technology */ ULONG mDataBearerTech; /* Current data capabilities */ std::list mDataCapabilities; /* Handle to the device detection thread */ pthread_t mDeviceDetectionThreadID; int mDeviceDetectionStopPipe[2]; // Device detection "thread" friend void * DeviceDetectionThread( void * pData ); /* Handle to the UpdateNetworkInfo thread */ pthread_t mUpdateNetworkInfoThreadID; cEvent mUpdateNetworkInfoEvent; // Async Network info updater friend void * UpdateNetworkInfoThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/000077500000000000000000000000001455567757300236205ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/assets/000077500000000000000000000000001455567757300251225ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/assets/qml/000077500000000000000000000000001455567757300257135ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/assets/qml/GobiSampleCM/000077500000000000000000000000001455567757300301555ustar00rootroot00000000000000Connect.png000077500000000000000000000116521455567757300322050ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/assets/qml/GobiSampleCMPNG  IHDR@@% sRGB pHYs  tIME 4K$ V !"V)P7J+CR 0\SMMNkDi\*]Å֯ȼ$T޿4bZLۇ_OvE _!o1_ؼ᥍=h@I~+ -o~)j# /Y @ BB"s/)ʡ3 T7>}, BSAW]A&#P 6l+j ?{O ?2UeЃc?P&'ז t[= 05&^o'`B P1"LӸ{AݽFLxu;|pNg=>, (c0:hz@8|R_?~Ȳ Ivl!g|2%Aƃ@8`eY رv;scܲP54>/!mz`jy/|R %HхR@P^\=nI.UQSѯ0ddw{ǡNaB@%Hf/~e}B{~(H "C 33r׾ܰxz}s#xo6]xr"B;G/^hJ\O뇡PyN"AI t)@rtYYܵ⊂P~}% W4 4+0uMC^ =-w^(нa$A ':@//Wk6ہV yIJMo3~/z 39)k}c᪹BRizok[R7?>h>h` 8pIkĚXQSCdcI$l-/\P81 @ٷ_G<JT>z@0`,U3f\lKmO4\lEA_80e{-}N?Nvqe60a8A`s<=EFB!4PP=Zꇕ6ԗv2MGWiL}M4o&s(PR_}OnEM~$[c}({9G][d߇ۡ28xsX3 ?{:hK%J B*&R{sP0ljn,;l<1&3gS .{䎅gvO^@ dJ1T̃.$ҡ"6{O11u]JgPf^tXZnO 8E?wř/PP HɤtKH¥$ᲦTXӴ@lii#ts!ȓ?ʔ*xiRRT}7s )!!..qVJiN;Յ`!7*= 8;V(- 9̮#My' VͥqO&;OuccGфTtܵ_RR:닦8[Wx^Y͛R)Mp]21c b.YV+t敷3FzԳ ݓrcK]>jЋw &C)(c 044$0dLɉڙ ghA iRc^}v;v10ĶӹʓC2ED@h^|5! $pEL]zЭmւ~DnҲL5Щ*o9H;vx³y5u ,?fqceprǘQ*(rj$p1t9 X5{̪c 1ιȈ3 (*:PY rTG^_qTJi|RJ.+̈ɪ T7ץŚ뒌_ RJqs.4Mn#ǛHsʘ]O)E660 qsUa05(a!naAf!q.(S?t={woc'[yy焱X|C=g 6mڴsN4b.!)r3"+R`xN=a=ط7P(\;w=cck>[x{ۿ_KkR)9 T$u #)p{viI)?''۞}Zۉ(*W]W._{iMgmʲ񏛮~ɲe󿚫㸩TjFUjȼ}N-SG :_}#f8v"~xÜ $CsfM'nͻݳU׵4t֦Q296v֣G{ٶ͹a [w~u0` @@zGRߺaue%lDSہ#'@) .9O=dŐ뮻iڢc׶S?&Zg6B83J4#pFZT*u卯r߿DS8 lJ% _x+FkkA&Wha(8ΜYᇧ7N˖Oolpۆ.]g'Buʕknkmmm}\7zL<w'LVUUΝ3+qo|4 0PC(@qJ_1D"  0{z L޴dFa(Ұ6{Mˢw\w۶W:ض=p࠵7߼s;p$R;r()9g3JiEYg1$"i @70A=9}G#Cy .++8qi?4`{Ǝ>뮕KްzS5Mlk%)S9/B)eu C\3kts;~a+€y2hu 1ke߿nXy%\`juEic^)tk<SGK 8jHgފk̚& .lzV18Mcyo um_? B&j_I% s5ys6Μ?Rh@&n;}D,&DoLŌQBC3@ 5ĝW5K"`b)tߓ?Gs٠]mt%Ta 3rҋO@߀w~6Mϥm M)EaplвI\֋yUmq`|?/>a4R@Vjom'Z\t=;З:FQ;{}7t4Qodw@ .QPjFCH0Ѵm.S'$G}-;_v=A2 Bl.{sRݏ?rqgQ _}2[`p ^W*P20BOM+Yޜۋ<{u~gNk$iQ_H@ PSSWWR\<}Pj[q<!t׀PS殸pE+؉nZi Z{JRRl'2g3JeYRJ"d/ ЪB=\QutǫC}i(J]*F%1e.P}fQ c30{+;|Fm>yEǟG)1 yT9)S\ dRJYr?,K1P"R'STT]]`ƍW>k^CX4l CpH!8̹dMuOZkJ)!PJ V ف B<% ܿyJǮAf T8RZA1V|e%y>Ki,*Rr .+Z5mBD4F d᳿޿ڴdxwB@g躁h=}9h]蕄X56O]8}N=h h !QdQ˺O}ۮ. TVP2/`G] T]v>א>rǻoƣAufLngu17󌩤dT(B6 4VVfu4>~m/ooL̙ڜG&11Nj>y~JFUgpE* ~뙝mgvs. 1 cBt%G9К1U,30:@FQ.bM#CeJO&V_=ǃ;88wN che֪H~fИ1f ~bǞ?uڵ]r麵xmA(zh.( 4`ԆlP5$eB@(b^ػmS'?Pwsgox__2xdp< knqIviӧt*K+9YZE*ؤtȺw 4DOh$S m~{{7~˷]颞H*kÏ=H&xatlw]Z[oR)¢UZRI@©^k @˹b|% Ap( Af,wƬc<Ə صpE"ˆ{[;jΐ{577f2Yu$BH)Br}.|,|%m#Pb 䖟 .jڠV&E >* c >a۰'&z'oďz1HJ-[GkRI) ϹBx7c4۶{p .,+Ĺ ²%T>FػzYc]b˖]Ma9 U90BB͛/4ևWwux~Z1Rc\.8cyO^ A V-6<'l} 56H$g/ݗY<}VBk/Oej``!1^ZX,0`<9 `ʝXpj&E}ԙѸ`f{"Ϫ%g,ˬ7<)I$-TZYp~X}uL&3sY˖ bB\BȁARZA3|X,j׮]CO?q1|ٶ]VjCG3{e2sWN1^5f?*a)`v9 L:3ς}$!zlf3;wɎY5jHb:"N3}}}7m`*5Feߠ^jO9mXƢᔗ:e9!: !{'SRm*Pb1q..SeYV*v'ŢSRl.y^.omm[z[x"Ť2765%겙UWm?XGFkWy\^km۶8Ƕe$+ﻮ8L%RI)]=Pbێ-|>2557]݋ r4[pjqA ! LI)E@n! 1&2|W}8\11tcCM7:&o)=ϣ ʒ\kI<Տ`RJR)@Pes8bNt͹N4IA! 2ڲh>35Ȗ)%s Pq2Vϻ]ye`T:JVZ@I:TFA |@/ =_*t5k^VmֆՌ #ٜ2i:$'9Th@0NcGbi_t(a]h]ϫ*Ku .TdG|̙3O7A(|JŢ9K2)1ŧN5kNsSӛlm)Fc \Bh-Jch<8v4wv4ZFz%Qwa _{|Cr<IENDB`main.qml000077500000000000000000000413511455567757300315440ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/assets/qml/GobiSampleCM/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/res/000077500000000000000000000000001455567757300244115ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/res/drawable/000077500000000000000000000000001455567757300261725ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/res/drawable/icon.png000077500000000000000000000214411455567757300276350ustar00rootroot00000000000000PNG  IHDR``w8sRGB pHYs  tIME  +3 IDATx{WU?~{ $h2İ 1Nq͈f:&&̈XLV$&Qf08$B 侹~VwW{8Tn}MV~T|w>;zɳŮY|6NĘxs;x [i[؂aRvԿĀ+v|\c镘*N5 G$@{1VCTa{򴽀_a`>( F!*XtBi9AB~EDIt,~℀05O3޴e\hDKw_i^EZ 󕣓K'(c0SH0 u{57R$$n1KW_o;q\{q)P -X*nWYymေwWh8$D@g !P Ab B["h$"5 [^1*n;WXwˎ Bsp4H}I߉AqbK_kw,\ ("Hǹ:`!F+\%KT$2׿cY0 f!" S _ЄZ,~5~DAE!CͰ`+Qs\(L|%'8DgS #xuj4P6 $!,<^asC\ ʠp %-C FpIz}L)4# J0ܢJy]=f߷]XN%%Z8o)Ųc SŒ%`!1tbIv[;(l4K/gp6gosF8bPA!t ||܈_)bqu= [_-ox>W.6hs>0j'ڝT<;OUWx_1Tl`bW._6EZĿ1kis[w ѠًbH1P׀Z85*LSހ]G [<ڏl5W&wY"8o<-~i1yݕc n,;o0:i8!3M"⼪U'H 1fڭ7{ϯ!2,Kyj9wM<˹@ A1s]ErTRM1IF yO%*zz 5@#/9OΛzD;Q01qNj!e K8y'G.$=G!dOL&# U)S8}zt{Je0X?xs60BWz]ԧ뮓U߱,C(tL3W Nd?i%Hn_}3Ͽ`3`1d|U2ͧy}TZkRh5K!^bí=p (z'xnAVer(E<4 B,DUdDqSHI֌vI?VtEY??chi QH dn4J]3\tW^0Х*k׮=b򭻬.D4ԬpSP0!B}XXevfnKrѹ;?ssMa`U(bQC$ɵZAw?¢C5FoOknmHrJM$P s-AP|Efk |SOga3}x8s{m_myu-GTŊB@EkߞbıgԂ|v{NJgDl41 $, oU,i45cwo+ +᧟dhNȨf(.>&ޠ TRW*ڮ,13NmԆMfb<-ZB?bjp?OỘ04?5͖т[iV4%:euqd% {#Eؾ ѯA* xo8WP:9mNv8(˒((˒O|v+_hDKVFL*4"1_!*&aβaX2y-wM2|zq"2a#nތnj-wAء(}Y'oi@SC%$cDK׈~~kTC]qQ ]zͣHmA0)CP> Э--[ű^)3 3 pᜣl ;UJ2Rje?"F-WQz{S3| ?yM.tED~~_?#Km_FZ4>QX 5}`L(9'((2/k:bM?\p<^ClPKoto9:n s%<i$5s&kJ1t5BN𱾘 %Z{k"BY}G4 |A;F.Z)U j="JPЀhz<=hU {5q<\/lAHQof7z1Wtv)\sQl⨭81??OUU}fI; E_3<.RT }*WŤ+gaA~ Wp5Ϗc\v?#sƛG10fQA!6xB( D'p6W_&IaGB5dv?i5/Xk.AGcVIA+|Ww?o[_vsL?솅2ԥk!BIys" FW^PUK+6eQe%^׏&'mE:"G4|G$.ᰳ\TQ Qvw]Bn;kEH͝ ĉ7\nPgjxOu( UπmҼBe1?ZO'G~h7 taͭo{ uIGwL`@sulaqhBDM|+;ay ϼ?O*D( \ *yMc1 Q5+;&8J!% @=xb2pkqUbG?"BUUTUEQ Vգ Ƞ,.h<0K.B /XՓ=Q,Y( 8>žSYV=;^{6&͊f{^fl,{P+7ʼn7UEBr(EQpK[8< ٴa\zlwLKǿBxa"~sc_9-ݯA-a<𪳡 MY[\fYThm{)`OU n|Ռ,Zl={M|p΁x2ypV_>ťJ544 MxhFtB#(PRS;۾5FOx $?cm.6po܌Y^5kxT@ @ ϨCqX#T"Al6$iJg:ȕ|rF]r3oW*zU`vw2>;a|MQ9?ErS9 YYg}K$ti i (,׳f}Rj+^;~j/0i՘^``b݆x#/{f3/Io0gbgSg?+9@V,!n[L7#iI-m&{Z(:V X73;V5F[a˺6W]x+Gc!C8 ˲墿Ό.GIIj#$ iz+LX Fa MkGZr'R_r~9?Lϣj 5֏0.kgH[͆ ii_L[sj'IGc#YF](Ƨ !D8@JZid)ӴR`u"z짪%]V1.zJw8%N8v!%TI7 `P0ߖW.A I@6t؃p8&my,3bElP@%OW[zȆ?ͬߨcRZ"NBy{881}t yZ蟟_b:\ eG,V]%nmȇ"I>)苙P a΃'%%F;ӂsss+z^<Q?$WFVjgJBiC(|?gD<-A]X}+{_sJriC3udYqP )򸭿ضuXjU(pUx;`MnEndg0f`NȎȷoqɹ9y$q;X0h406¥o~bTeIYwk^K\C7W|?-Nvtݣ ?E[|ѿT =c;$>Z8m]l\Q"ଌI9ZkYgeoK+͏bEq=߭Yۯo5ٛah{KؼnMҦV+׿ %rQμ&%qiKC i9QĤ@ThoԂG.7|r_ϝU%+;K E}fEgf?_|- ]‹im\s]^p\Kk]{67lno9CK/>fs?(V AP•x-q.#q猕%B{Y,pޕo_ۺ7._b/&g?>rزw%C<;%_ue\vU;A;g0?* G;5s[Gj:ȑ#}/<'TUE Q+k>Oӌ 2y W@ǁB:TK*"ip-ذYܢ! غ)^:m%"i|nQAF WJY2|_UU’,j\0Z2 W`)ju 8)+qEhPsM(Zk 5Ci54D٦p D.=IE^G:\{%6[Q5ג-g~͌ɾ?uL[^!FRg56aq,ġE;'%&hb+Zk@@&((&V4l"+Z8WBQBD]u h MF^ ;OJ E[Cp>7|u0511qTjleYȞ.ktC!+|#N{0vhڨvӸhv@T1 hH;eGxurE[989Ë1S:LOOS%UUfQ3g_XXWUկ]}໶/LuAMD + kĂ5%V41WR4E )X5)\IQDD-eU5r ቿ].h+FX3Ԇy^#ߗ6sz=fffƯʙr 9OLfffze9'I/-${l91F%E`YixDH\(D Ti*3T;X UF. .>,Kg EQP6J6뷤Q&KS֫u5sPŬz6v;ϽEQHfɟ\n~>m['2VIy: A3sssZu8 !P/^Wh?}0} UTi)˹5{McNK D^Ouȩ-+: ;&KGn3Lǧv}c@#ZIAHé UtCSvRlx`ɬor-啗J9333tQ_>;.]KGE"\mKy뵛\ş~fǷf==Og_zx&HɺuMsF9y fXc|՟SJ 7^ƵëRxy\Vd ՓmƟ>(ԊW^iI}UUMtfn ]0q_.G^R[fté9޽{t - 59놯G|t:v.OeDdKbJ(a&گK+'*I:WyتK:lu_9 ?着ZO\,N#>e`ByΓbc{ٳdra0F~^ ^| !pm);xNtƢ!h9t.>/'rdzqXzwsfܷ8tkY`ƮWܪ8DVt:Bkf 6u*t:~jx:Ynbbb ,AYwF};a=i4~8.߿ `ו:gt:%9=y=;:7' <233Ás lu'd%l 7TU޽{O ?k6Gul՟/:tFs[`gcg_U;3pq}6e 3L/;NBjfqBu'dg~~ >яp޽{,KZFFߨ҆SqrafffTñ&ؿIDATs:uYwJ lƣ۷I_ܷo4l6m9zyWv:>}{|[>Sy.>mbtǯS<9===sFmh-rX^.^r>|U*ԯ|Z֒c+ad &޺#z<OF''h4d6+ izz)>>L;̩u w\~ՆXIENDB`libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/android/res/drawable/logo.png000077500000000000000000015030701455567757300276510ustar00rootroot00000000000000PNG  IHDR sRGBbKGD pHYs^tIME1.p IDATxt{SY=Ey^OęiEQTDyg̯":Z{;w^V`0h___ꪽput:...?}~~z^;m۵h~~~zn뫮Zku:Zká}}}ϻniNm6Zvu:^Nl~vv8ڃuv8l6v8Y,vuuպn~z^Ev Ztp8pukz]?>^sFVinųGfigYw}4~ߺny{s${nHWUFf[iWWW[kޮJF<<vwZgm]__>֎+ܴvssS:Nn Zkm<h4*'~ooo,ִr&Z6KL&m۵n[?}}m777phG9p8x<>93guC[׭FQ[Vm2;{ɐsgɤ&s}^׮Jw{pXK@(u~~kNmZp:Nj*~||<8onnΈZ`0h~vuu>>>ymŲv=Z]ymٴ`>??{nΎ`im۵^:N e~vm)IoٔmvsssA;;;8??omֿ~NIQ`)v[ykKisvvVF vmWWWmZ`P4vzNSvl`0(b?>>>E`PF*qvyɉv뚽^}}}w`0`R!uXCn)J~^׾t:Z<[kFr8H븿g&svqqQg38}}}#y~~^Njj~yd???p8`PYN~}}}j*\Vm<vvvV eC{}}vv]fsHSi8C(l:W]V%%٬9e4ّu]a̭{6,~~x\Z\㗗ҹ???˶m]Vth4jrfi~u[#0:;;+Y8GdtphZY:;Vnt:ǥ/8olɤKtKɹux{{kѨrٴt:m???[ogggٲ'vqqQBzR!J}WFբ^\\~6MEZ~o~}~~R}p VQ^f G]__lw7NO ~?Z/u2ƣH\\\^n[& ,fxi)GF el3"ߥLܛZ 8,ooou=ɑk_^^g1z*nͱZ<';cS)ːB[re88l﷋rD8///專@Γr\ u=e<6Y%`86Y2U gXkZl6+DD#Hm6: }~~tZH|~~lvUOizYZpNe9=___mٴdR U4n؃~_p߷^kv+<ZnK7s вQg.'):g|VvyyAugggB(>*g<M^WFRԁb,ނmEC<,Gš ~/au\]]=\__~NE@2x&C͉`_EMV^; N&ls<8L?w(v9s z^A1y|>B9:(^IEnnnjA]M_]]-^)!y9Rt·u]ץdOӺϻf9R̜CkL0"ktuuUr6һ3~EF^g4N3 dRl9ݮYUh3Y^*eAݦ&F3gswyyY?qBFҡ{Wy^};L4,.'LPXKg .PEsS.8Yq[F|`^8,k)q83A@A{yy)*uɵW,Q]VG( AGZ7w8B@o<[ @ yQ`2\ρ(wu;??g=(!iH@C%ssss$T⷇`>JGZ 456'Rxh_p8,9sݮM)3Gz5y`82%,*wEJͦ8sy"_LjC!u!2.\ѝsðB\nnn~/A<Ȟc@&3i:ЭlJQZgJ{ 6Mϟ8gBl6ы,HP.]ZhGl 3tퟟʹN&vuuv]ɤ wqqQhQh9wtw^tZ{FJ㽽lV{֛.T,?5gF}w֥cL2]sho]TAܵu!ͦGS.@))} 'g]QN/#*Ehq3X)s&+ubF㌬rNDg3Px7im^s)RC|>dGF1+ŞȦZ~RQ,0#F[eP];aqG)L'[[eɹZ0 Ð 8NZRby~4 "S']nۊ9 TosenRԺ; U2Z̙ǔFBf T5YR %͸!^S:rqqQ #~uuնm9_1VAˏSrJ3ֵ~(:#(z'ry@"CP8WM"lF$ L/ˆ ;k,$cvlFuδ3ds_eƈ$ LqѣҷD?ao8UAГ%Y^:uÙHp8l:|n66NJL[)U ȊwbSήH>K a8r" QeBJf2 ';<'7#nW"9x 09F6=/)QHrÂVdGxM 9  %WJC|^^3t aDd< 7D2\;r/^ %)Kgr$Ko C.'ldR=%,jU(.$>u,$:~ƐD| !ʳB)ʚ]r,`oVUn[m^q]D&Ok)YB'jDeVNߧA*p~8Eo$(Jf94Nd2)g#R2w &҉d1y,t, q6j) zQԌ`S9Hm0pڋpea/..$f`Ϻ$ aJ0#ɤ-2oooy"=&Z'1>??|>ortdch k2YRlY *A||gȑ,dd fMF$I"BmʙeE6(kY~09 PzC9Մ8RWzTɼF"9cO~N!fOE Z, tI'ķ,V{o{%!N 붱re:'N#Įӽ.xY/+cd|\qgNY$IrDKhH]f4%JMNEHh4:%#Y:Dȋ%ZKNIpN9 {48!,qs3^#/xa|'$P)T9,g;Y1ΚNgG?r)k '(/F9^Ra3RRϐ$2Eg^BlFiv:u$rPI:b5fyCa%$zkw`+q )0xn<;9Pq(^W?#Xl}-=b=wfN[:fk?5("˺QF3G9Ecm٬d1{qȦ$#$M榭"fVv/QȲtZAJ5 F.Hj~}~~nUƈ3\.h4:j{=2c1g_n@$S?@:^*xWWWo欐d9Vd>SIYveʬɶ)odT,̽C]٭zwv!I! Sv "v .O6!#Gp'#*2cNRwrl ʚLJu@:T"Ki1soD26N!l":t< L dF##Zɻ~)@)Ir,q|&A5eل8ٺ1 "YI)E 驘j$6A*R\sɩT8"^Ԕ<9Nq&NӦQ;$&;sb>\ɸf0mV|d,SJrPBE1Ln9r$N2h T|e597R>E4r\фq9DIn{gI#ݚM|Y$S]hX0F]+ ?n0zʹ1*ûO 'g$Q.}s:???][.sxL;?p_6ںěl&{Z$]0j M3;Y<0ceCw^I/ v1{% z)9Q*s=x C:OVʚHr)(VGf:$3Q;ٱR2$A.>v,pҖlp{{{k P]\\T(J dal믂35 #ǐ˭r}>}$k IDATp -K-kB dt ҾZONLulXyD,컝Ȅ@0%ɅH]KOOeR滭sIy7eEH9K%bӋʦ4 (=kLsD9p!#^+@"ёP;;;ʻe4|qMG$qLc k]QHil=3œ9tZDj89,!9+:Y`;5OI &3Gznۖe9Y?j(n9|z7@{HQãYFF$ϗ M\Yv)*Ir.}7kҷmիfkp6gPv$;A9[y.c*u)~}}|ޞ+ΙrPtZ)qԱ43fXgw&?m:b|Sph'& ٛL&97K=/)Mx`ߕK6sŒes\B[P<EV5zuA}Z2xƋԒc-)YOQVM=G=dË$X9>+ϙs{ϮV0Y+s2rH+Hkτ`GvK,uƉYѢ}d 0?Kg&9$$kCݗd9%:hϾĠ\D ,lreG^%4v?Ë*??yNc|~~0p=;1sI"Ԑ 0EhyS#Ȳ(FrsҎֹ`8(FS\I/]__cDa)f+OPBEΕ~aL=L6F?#,7ι`ue1'$MC`:&*#dQ&!`j𬓼y6А34Цu9-x=rNߕ|4٘unY`=FF~3PrIFA^,d M9%P錜d3,;%~Іcm<2dw]MQ.ͳt}*e=q։qϨs{\BizwF%(G+*X6+<Đ4IHf`o /̇OB$],|6h$'09.GrVeޢ$$N)$D`iQO㛆6s)X drtbHiqᝦ."P>~C9$I*ZS**JE@f>q@}!'b;3VpIQdGjC TA\tkAQ`LېuNb湧in[TS"y[Nk3$ HSH~3J\ d3xCheQv wa%'!̳yz}Tnd{HȖ":l|:IhN=Kj((mIPQݳAWE3_!L촓W6Ϝk^$nvyͦ9}s@ط~19LdȈV86ibP r'yx\ As 1$5 ƀ,CY J͆r夥D>k6%w-O\.yǥ<)Fh#qlʩ;8ρ WȮIr!$A:*~&r9});iL,___ald9 o錝cE3$x~è5 KhBv=z~~>j٨^z}r1Q)/9bȶ///GINW&$"`PeS.r4םk1])D ѳw5{yywN_ 1V2H٬ܴhtr3YNnoot:TQgmz{,bw岞't:m?NL@zdJ^K-~;'%9;tmMAghN*5̑ze:RݵjE8?YH4P)Zl6+$[٬r׆8bp6tRZe^pBX񭵪:I&r!,pFf񋙫ʩ+ !HmF5R 'C əjf[?:Z룚lo>_܀hRt aT}ɦp$YW}8"\9y{{V*Qgw?u/VIM2Y(]cr}}ݞ&i9#6sM)'w9䰣nw+Jp!dPps5 Ab 윖'}3Jedi:8 Qx<úm6^P,\.Y3~̙gXI%MaD\" 1 R-N~$yM !_Cd+FѴ}ժf~/ߖQo O3HLJ)9S:\{|@orf󨹃:y=MI)aJ7@V;Y9g8H |I0{E7xD3YЌ]9R%CԟP@D#VX㺕)YёusD5Gs'šdJJÝɿh?i6I`6Q*г1l63)f1<EKx ؁ M"Uvrr,ohƒ.;g[f~+K$E.\NP.:3Z(Β[ӵaŨ.ú>9hh Dl^0WNaxz٬jcd`8;=t嫰Cɪ[?џ+rE(l۵|~T~EF}4؏4)(0yzz*BRFg4((W ;7Y^F cD4#ue4Х#U9 ־qrxԬoߥa%ΫLfZnG%=G9>wZfX,mɎȘSdfcLE h]^د+kߜ̍#I3{r=7MG6-G!itzjbĞo\fs Ѳ (qzٶ`N<:s$G~9^4OȍT^prޓ!INYHȲ1/2;䈘D2h|t8}ʱj(VΤM&:9){o^E/"\krͲU-r [&BěQ,4T"G?Rw&rHT~,ٿ}Ȳ U/=5C< jϠE=e8Q%J8K24z`s,_6ɱ2???G >H7f%QMy9vQ' tQ̇DeN[Jlm~_r!ү S@&tZm<bQi<љ]__jE\g+I:@^SDKrY\f㏶Jg2Є94AS ) CYdDXp.bhIf,G'"27gzØdh R瀃]Ra2IhGPFH2s_K@d#o8w24x)SVc6!f"O9C+h4**!+j&Z^p8>9#c6п!d}<5ID'nXU5X[U=??Pg;ībQHtr}}]f׺M/ oAk)l-갏7s62H"@BBRG|h9P aj4 D3'}s]#hG@РZbs~eֺ⳱C/&wΚfYwE<@rQrr[rpΚ7D"e!4aqg/W]vD+VRɌCi!(B>1L2k25J@˦u8%RΤ6Q*S DD2rHvmդ9s&ړ(;~l32(]/d {~фGDsNFصDYm7D-A:D4Ѩ*`IzvJ' Iy<==aSr#Sq|W~sR)jEQ}B~-) `,#),dR3QHً;a. ^IAYiiXV$YXCSjfؐFGRIp4)W%68hEA$1$,eAS?ϩ= 9$2 \sLJ6^ 9{i"7,580m%p=rw,A -<BQm~6阖Vbr9P):`N"ERNYJ )sGdxc{0)HvtFN { uʒ|~PdYYΧ ;<$ԥlj3+uWS.dҪv>??+rurD,"j쉟 ԛL&sJP HN7+8dgLs0ӤDnx Iv}; 4Pwީ-Z(-DNFJC!LxiJ"9E#KG EJgyu[Ԫ5Ʉ΢Ŗp1vt%)<򡨛%v )As)uDꇇYD IDAT]\\T3-pYNdN7jNU%!_ qsef)0(gӧɶ"}h9KO_53 V3_՜L"o(#ʨYn4˳1aZIlQsx| USGH> ]BJ^|r {xNPmR?2TIFGXvd[ONV½p8,C%KB9 )aIdg?(g2n-E;#c<{!J8!yό?Fdr>Ά a,ȹ:S C???ZìkY^P!x7$HYgb/23&ΜhI(^=#*TA7{'NWMU/t< 8 ZUrƞL#j"ȃ2ph(}b gPg_,147&ʖDvT((JjPN3%H7d }^L%A-k[k7~s=/(B5& Ktyv١ty6);Ne 8믲!ˮOJ@HbK lWuf~1I/Il ih264kA"2X8*"CȲ 9fgIwzK ڳE(R̃S#>P>!Ѻ2 9K6gB:'32Q*DHr!GS!"9ΞkJ3{,+W(sIbe`E@7k 4P\ޅs ρr g F䩳V+XIQ 9div[^YnPa$Rp&#VpU##fc Bͱm٤!'8@y&'m}E<SY#Qx<|,%%=GQ-Dz]gYS5Z1"lR|>o~e;kZW~O68oݖ!˩#t(P{fQfN2Kሚ `=Nkfsu_=4EŘWrL8%N٬K1p\___rbX*MykC$LɱxnooTd{ X,p|&df$8;?J U'^ʇ\.˘~믶m1sM!S[;(}QvAP겶nC:&O;Aj"Ÿv_(h[Siֆl=L|^ͿbqT˝S847N0y &t~ܬ;#yڬM>RӜ#rifa;> 1"]~6>vn?rˌ9@E:!eٲ%T¼l}դZ3fvuҫ5*yLp"5 ٖIb#K'CCP9Ns">9P碠䜕g@;GwD Z2˙ eS ~g]7x>*0Dk2dGAFR߹"Di?AvA "l¯E3A&۴R#Zso6ԗSbgij[O&yc{ٔ>kC0 cKw>dQi!t p8lŢ ր3#לA/]];8BN3Yl,Gp&M@͓gL"^$s6 3> N9],=>;;peEHX򲔫aB9BR3[ u2@-ϛc QpH!=J&O"kMD@1ɦa#&hy@՝yvGT1t{^ eH09'"MhD)/]l"g9 9R~/#۶X,*btkFFU$Z@J!*.R:"% p};"B& CH)?WDPrr A wsJrBRRH1Hʙўw>W2;^f^i<Π`f=~d7Ϙy_2SgKYׅ`gD%$,)~5r@Ⱦ*+dȻnUNc9 u 9&~?:;~G䩓p=%QYGrÐN=g'~ Ad""}E:!yĺ.bCJE~FY(2/ i(V:SӢ @a>x8v"h(%2?%h[ƨRY;Гgg#X3͌~Y h,ˣXCjsvozXlʒ3duZwk}h:"SnL5Y$28r 1$F Mt b{eLrE9lsjO;"A֙d™8OTD -%޵>L( P-*ήly kg9ņAݮMrZirp&$y4c∻q{{[Fa<#9`Ey|,XPdÞzw1 lv.`9 y' jt4{rĜC&:nɸX,ʰjX Y.e$*d2Ƙi($d:lO6~u^\@,zp\$u\6=]3G%9DY,jZg>>> ֋ +!B(y@4"RUR* [{Xv'J> H) ?tMp.!~ދ>Ϟg Dp&?! I/Bv&dD)ϘJk/9eAХE &RCZr ?<<M/ m~yq5rb kJurp3Joۿ!lO&YȆd榢] yAY[밈0>eǃ]#_AQE="l -s:ru&~M0V]81C3Z?R$9ʜۛp CʐLOx*-9DtvD9:YBlqt)l9Dsrt_$=ufdC%4&!K0[艴8FFΓӊ>k(6@VbJ>d*gnoo빳32SEˍ7g'K˲g])US/K5q*iU xV5r4b!tlaRhL9AȃCy4A͆!0+efYY9_^^yAƁp]驢`PvrA$ 1vʀ8!ճ) $ 9 q&sw: p;k.]$m_&#{炃y}sPB(KY׫LDàYrO*Y G3 T9a)~9]7ԗf9CBqB@@  ,xAK?8a4&IgKe}džٳN)_)=8,UX&XT{ځ(P#=Qյ_1tDBX\/}a#'2 BY0iK}t6bTN^';Z%4GKk̡# " ЧwK&Fth4*=6kR*N9r`k2-=$EF_*ekVP\͝ 9a @`=ϙٟڀ韯J))IP?J&4"y~~.NײKى"^dP.n;fm! ,'DhA{~1;D~~2>=3$%=4N[DBdEHϿraR9NUZF *Ρu64 39M˒ \'9,KoαldfT-o*~DӠ$kԺ(98f:7C1vd9}oG\؃%9ztmVZw/I2GɃgօR5b.߇#$?n*hC *g6i9h@,EL+P0""YȌ<gМ"'A}*Re%R5l{?m:6ců_JN=̨G׿UkCӜ8~"Ngym0Og&m&8PdQ6jd9[ ~U%~*/@(݌apN=INwHcVPP J#HafĜLH7i{ĉ;*ueX g뎄jmF1E%A]VKupr]q\_W\G/H T0H;&u$&IVxȷX &Nvmݤ+k\U.-ϟս@A\]]՟2b90$"XFIMaժX8fRyx7-uzupDIp  8i`?CR0WQ"`S͡"Cd{jvcmb0+FŻUߓW#9,(#'#zU)2LUݾI'VBKtP랊_lVuo]nYd.yyy)X_Gܔd# ADNɏy^^^Qi.!?Vuvuⷷm>wTZ9EadmMνO{~~N&.2Wn১\.+B*2{wwwTlR?Yȑ@HVT9Y8-e<%v"bs򀛓Ȝ5tRmv^г7)K2_=xyJ1Rjx٠gDklE\<42R3ǀx-rF'$+'~7bPT qf'28VuPtD)&~sA+a^UE9W4H.l42۾1t=sH%@i9'~|^, ʥB rHs1z"}h8ދAǾdy(_M7:#2|{{+囵ΘR\439߬GTbi.…\ihG~t4 )\',h|9ۿN&X,?j~֓6M ezwɁoŢ8 T嵒t:2(dN+VDDRj-@!^6Ȥ&lN7l%u:뀳!w[$ll`CP0Q (zVfmHF>%an>9I9$'xNF$j$ܗ#™(=sGLF=-SO;k/Ec!aɺE($ *2U$1ȼdnS_X3V/g 9 ^>0ӳ:H<2 NقgCs(#-i,U)$1"DQT̐Y Ƨ`rZ >ȗELbQȅ)"t:eNHI:TNtx\_~U(6FΖ=m}&lmɱiCODؗt\.۟f} :gN8߂rxѣt6.XDק!oJ/IXd='8Hg\!+)=e2 b aH 씕&袌,2 $Ja銺:WtI$&F`8t8 22Q9 )5kErV HװC䴭ndM)5Xz[bvbh3)OӛX༽-!׏uV8!)J!s~W 9P09T'<5+ftA֏Bm|xxh41H$ZqNԆN^()(YgvXڀAgi# urWCEgM_S3~20IAe2U <";ϰZڟYJGvN|ZRP&?Q/Gl_>%sxOt&~ Чdž gŢׯ_!?3]"x@?hBd'0 5 HقE> P*~aUa~Nɞ\Qz,cJC <,6cB[VGp Ò%b5~7Lkld({T.])$%59?xX#%iD=AAhPڔޠP2!iydDu){0 W>Serƒ'Gn#Ȟ9*1H)ƈZgF,8Y8 @;v$sH *K>t:ˆ=BI+G?γ }e`DtQ񱜚~_g6 .Hp yƁc82&{%K~qk q.`Q-f;8Jp],/L*SʞٔǛ9koǨp={W$*뀈3:AH S򀲏tU0@lT 1 >'y8-L&"J-n;FPA ?2]>@GdnR`"UkNmc9JU8-8@ʜ7FN|9܀5H$"ڵ&jnS9fi+]ETʃv:9nĬbQ=ՇWUsC_sh4jWɈc+X"n]s'"8fR6YBϏfXŌ It*DfW@Hgz[@g6zw~~K^k9b3"Ms$`:Č+=]&5'7- %t#!1ȉeM9-kvsh:O"d 9'Z΄td r\h/Zjd@y8?z] i}ጦ+&Z@`8ZO29"H0.YGAIJܲ? \:!RNq`}ry4v^W0|)MLz۫zȇrFG$wU2ˆ:U9XK}Y}`VDP9P>grAJY?'/ (?Y/MrX 9uJT4{m4[kwyy;[UQ/oᶘٵȃ25t^s0 43b9Dl;DB`q$,aRf99<-.<‰@/'i:$(p S,+˝@c&/#94uJJӡBYp8,v+ϟ(Lȍ /@lX!;}>*5dSp{ora?8V@xޝ5X+yWo>c](~0(W-bQ)KC&s?KDEZ^e=05k6$Z%hs(!@Vwwt G2҅jRHd에A W PNjs@cW9@5;!WOO! J!9;@&3֊`}Sc6@׼M,(ߌTFhJCxiNŹ\.r}~~> 6V&3<'s}% X,hį+;Lʻ쭫/3rKʂ?JW4@LE/2E:m-l")50*Fm֦Sz2%"Z'$"߃10tN}}}n|i>W5|>o"[$9 xȒ As!x}:-ˑ'e&8iiyC^'ߟ...F8t.]zk!9Xgd-1QC,H'`Q!u-fNz$#5=XڒD^[LyC}rX:6yzގe"hr9D=ȝnhD?TI&)Keו'緼 s}( r&z{ը\2U5eS~;eB핣nEja.ҁ -n𽃞["EaU+;Y[0!#Dh7]}IowY@t4x`2AjmHDDq(KRVsP(95}i[OM Cw^ֱ֌hU-SϷx*M͛i{{{:>>..._ArLBH2Yt?-w::/η%JMe3ܣGцA+׬mUa"c1|} Z]bVP'Y\ [Io7ۀ"EٴY7ܡVd*z{*6o-d.HJ}TY=1o`BRu'uBF bRu@NJїiwwwdy(Տdjsf+(51u{RBSY YLJ3@_Έ˫EzPW@w-F2r l+Sne=ed{Ơ ːEQ@'YY*7*NXlŖb0@s!YoDf֐^scWgr9@I @71;jYM swʹAOdM-'Qp dmgåXVk$,ݩ$F>Ǐ(a9 B\{eVw{f۷A./ܥ_ ,sWN{`(/oeʨ&ڇ{z27vfZI™cF8<] uuSy %@8v".m2W.0wE99{GP p|i2XYwB꬝*n9gl4$ @B|}~/@lY:lM.Ftl+O kb /h#UIqڈd<lƅh /)"V[B^`+fMm9gacG`dm>XLT= jd`!-Sc.G'O. cdz*8;NW{S:iYC% aΪ #BqJI[^ f8\LPV2% g3V:SJYh=Q}tzz:$ [Pli)z6WwyiJkF띗ь(&xf]h:&")R vw@FIKL777b‚hfn$a[L9m%k CB'dUus]ȖeܰVg6|t3g''uT-H)LL=j[Y \Z5:볠9Vxb.*:P* >?VϪ< E"d<镉 ȩζ`Eg=@}ޝYʺ36777CιJ.4)q~K:l/..I ` x#~h#?xe777kmeK2G \c0sϋگ [HW$ƚv&Qr2okl]e;_r%^u6uZ!ybUZ+#,Ȃ g\tv9oP!*ξ}bE?Z8} z"Z<kD;xlwδm˜ߧak[%rs~,N.?j^l}Ρ3Nbtqq1W%:$?yCCy"`s#@BR+6#O K"_~1ZM)ONݦ m3ӶU>pH禶oT%P+X$?GZDnk) BEВYa@n֐Fr?=,(y.`j ;=5JmߡyôV ; ^T)SNZpJv'$36ؿ8iwwwZqC$t*,o}༷gVv\sixA=?eΗ.pljs>~x~_= Auk IDAT{Zñ9%~+3N>~9m2KHS]F1oooG1)V)Q ~:t,,dhil.19fϞ=N^#hoίL&pX&TD T j[7w(Ȧ1 F+Crn W&1~z'yuu5L>|.//qL3hQqr||<-qJt_|>VÇdwXm/2r9?iizհ{߾}NNN;r%Ts6Vմ5O/^ȃJZ,8+AaHbrE@Pr೭SYCegg C,r Xʨj XQEꕅ< }6٨q@QL&vwwG(|=zfeE"xYTz&xO`].}~EKs@u3j;Tl/';AB\Zm\@v\Fk-.ŋ( j| f@xQm9C-Kde3N`2G tBA/ҋ l)gi:2}BSyTkYNa'rXLT2mPLrwjuAtp>dl"hQ #Lˢpll6"2֥e;ټNNNɻ8Ղ.~ÆqxJ _Ma mT6Z^ uӮ*h";-aP(GEYuRJ{wm"p1lSV&&UɩWYwrE{hv9p2`FKu S9)*S4 =ynˠ8I6v $!:dU@d #y"hS6~ZӼ6@\ο4RU]ֶp>~M{ —u<'VWXWnP[Gۡ`J;(svZA2>1(2giEov8s7ٯ:kۏa5d:B VR8J a qp/=SSFxx_uM´$-I@$l6Zz&%ѹէ֟߂LJV[S5F,sgڼksrc/(H SYfryy9\֣UDCo] j"tV똃MmPjp/h;T8iߗP:bc Ȇ%0 :gy>sѐ9\m?NNNFJ𧝪Ωs6Be CO{uH| OA@t___O / -zpp0?R$qӧ}b?2DȏS+{W%A@ݠL- uJ̣*Q-a! ohXt''tlEJRm7kaA˲B-«&ogW:J!"?fx`m% &p G+ &hf$b/gge"@Ev9-M%e;$[V#l8[!e;w .dX>>ݻwb]&/$:P :M,>4 fzAnFgʜiInTY+8r4ǨC3bՋ0pNL@  &#Vn֑ϨLums*@\DH·0\\\L'''kr̰ J\b1U?-DY,}[L?->*PgQv#*}9;dȯ MdeXL>|h~9Q.>C  I'Ox~^QӴU7pkWh@e*XZX#kXΐxd˲W_(KR&ЉA'"K݆t@3#È@EjD j vf j@iZdnE4\o9IlLf-ck-4yW߹5e뫽t#ts0V_dНu&I^m@Ga:R@;|&n?9@N.2X$B J(E3G,X`c@և92ųU궒 $I2U`ЕZGl U~NRyª/^0j}NCS[AJ|VE۝ѬeWѿj;Hюh@'MP"ae xe[NXZxFׯ_ZZYS*RrESq'OF0ShT$@عx]d,5'#r$| \QE@?"EYū-%+,2&j UoppZ'VD.k9!hW0 b0)N|#F:# R-&Pu‚k-odD,jK%/)S[RG*sV ]hpf;ܺ;jUj5pS4wR!*1G_XXD+tSV9;;;FH?w|̚p¤eA oɜl 3 i|&f:#FD Č:GRyY4`YrAMɒ8l PN[b|9ݲZvT@>}4ܐR8t_-g7b1b޼y3.??*c5θYmw{'h(Oۇgj`e8Hy<<2MUG&jlE=z4 /C&;wS3g+2Eed6Z(av~BΨLmJ"7iԇAVF z|IҔcmd~2SEb;taY #tC"㵦óE$)\e#%~9Ԉs ǺO_@ ӔS d|'@8oV*P@H6g̢qq1^d!YЭ6s[#Άڱ,"8$øjP6F$x%zk)t yl4MéGGGGr=l,Ki6{iV=,g>!^]]CĞ+ECCI JrƗa:LRBg^fִ =62>75[Y6e'}Y6u ,␵rת,~6W6:e0mBa!Ѽhc*dz<p>$\fÇA215F}q1%M10c`3dWC ze5;MÙ*#sP]w1/ȇ (hH#P/QC[5$dڎ~no(VU2TX jdU9t.]Asv?>RzV!j/Kq.//zp@βd碁LO&,'ª>,|>A|У4LK}D<gF @rT[i q*":˾i;9DGP^^9ܭM}m7e>]]]Mk8g*P& &roM_vDm>|8=jAvaAꏶg;;;/J.1_EO9$ iWP=bSxE"V=+s,24>cD2 Z iC<3\lWaFDe邛33ORؙ_~w Hd\&YV렺`K$fO*US,\$>r.͎vb+qK- m3* j՗Vbϯnj% ` J(p2j=ꃐ)jZ,\$u) qq_&cVy (q\W$ᔝ%/wF 4DLo޼Yc3WF˩c2d|`H#ӋĂU=fu/ _z.5NuRTFv ?k#:H@ApN82e EUwJbj@lMu#cU*q[AVy~J U0"{K ( e#5 Sga3U5lrlzœ"̾#" !"c U[DVAUa=Aǚ̙l{uKAa$\:sn2M 8@0A 2W`fx ;{ Y(ʎDQ5+ypVdl`W6aTg^04SڅbjI =۱PNgju'ެܳgƝXVc&19J(g/gr?;-JIy=_cU$zmNpr.-8==޼y3NQP(t*(5Wjl5*f#e&lF>2_, ЇMBY֮%7 -(6lݸuMǬG%r@୥2 OM(m= :Q?"'6;hSY5qxe_ r#!UTU$"B#|ٴ,?p@>|*S#Q1҃R&:,ϯ`qJlͻCC,p0딚:-IvM3e̞Ep,WCnAdZ: IbJ?]O#qkS: sF "PL.rP6ALeZ=84&&} vYz/vZ }iMH a\[H1A&} xШjsU[E8t{]`;?%fȣ\_~L3Ab|:<œ9wT\z0i`6Mq gh ?(Cu k8XUJ]F@|>_ T8a4yNJ`0eR~_0Yt|VYa9jH8mqj= ؎t kp=+%>Y+ 0>Cg&L SXA j6jLD;k$Dh=pT}tdt9rw||<(֭SdM%VلI^G|BԡH_feݟ `Q7P%WRRS*,8b-C*|3j]ۢW1_" $Pc; NE6Xf˂wlZ.Ej.ޫ iL(B$0휳ΆV @*vdm5 LY_Kmdyii:2K^"A}v\f5*HPDHRJ{0EAH]e*m(Ul>AWȤ"2 Ufـm4}rues.|ٻKL:jkmEVUhh!3I ahZUZ!ԡ}37r!`ީ?Л7o$`EП͈d}kͬAI[/dt'?gzww72qf`s =m,m\Ibt 2@ZӧQCNj @T {+lļ@:a|."w=8: w6FPgҋ+`+X,F.^)}Fe?;+˜l*p J2"s!N߫ UFj{TKml—/_|>QϺMd&>Ep۷ijEjцvQ C22;{'hIJ#:`\6R{H!.PF#fl6Etxx8f5vm[@/YRL3܉εm=#h39Fr B~D#ֲݥ_!WWW)S^bvzܷodL#VynXwM^gt|ׯQ\,XPY#V˱6[f[hϙEX??asvSZzXr9b.=`bwU+qr6MaO:Gl5VB|3F^4QT'"RpRH/ 0j2o2qډ'HepeDԅ7ZlI,v`MdU ϴ~cg]A%*!xxo(R LRNC.de)4/|dm2kh@v(bY\dpEQ9T3k;#YС#_wWEeX27u>p '26$O7c.,a=W0%O+gLVj] 'wJ&y8uj9/;bdY ](GGG7RPf ×qFH@Ǖtyۇ:M?y:??_Ç +%k=.u:WTᱵ~xNU#B*CGڙ~?0,٭e8#H㥐_8X\"ICRWҟmą됃B A.OT@%Qf뽜iLIݕg質[R9dn#7| g IDATbB?QKM^VkY19iu;\޹va|NUddAp5ʬ%i<7S,QA@o8 z+i1)cH+evq!@ؠ;!'PZod7iMWg'fڦ:w%>uW^@j\JH"RwexW :3:qe߾};=D?~L_!Q%;%1 N5f;"-PコS@.VwK#kO1J}v{q0:6L?v/G$sŋ3LJ?$AG"h Knx)MvTZx/~{{;u (BJupW;g\ xJ# Bл `s>W4f;>18'Jж3O#+C$L;je/AH$UΩrEՐf)"SmtdE2:ɓ'kҁl#svKZb\w ^Nך/Jߙe2 F &̢Uc:qW٪ELb"@?k`-Zx,8.%dD9 fCR)6r\kSsKvtfxGL$ѣig s!)=Q?wy˞WΥY  %V>YG智Gka(}_2cˁv8JU82gLQ&h呍 d_ h|)WG]7gu}A, O.8Zr:wwwxV=qu(gQL媔>o߾զ027>O9AknooG-S v?r1Kg=|p^dFaٺVu!N' @e8nwu%b;os Ft1mpᄍH@5xS6EYpF C8S5~ӛ7ocKG`Q߿P,ִ _g"Р VxcV(AgE֕r+sTIGlm]r9Z폿~KVJl PSőPfBt9T3 zcMk_~YCld,W{p;Wlheb~S"D.S ELDֹ6Ms< n-Jd-\u~I+CEecb(KPm~hdD-zFuOHKM}q}{ +¤6^0-dGyF*u(7l@Jd~<>>:.-„k`_V(@@#hu[@Á~5`z'Lw7R9t j?ۺsǵ3]c Â<@ Z7 E MJ~U9JKT0)-kՖ]+ zM%A<܀sF,mmz{{رK*Y9#U("d;lE@PH\-a ZdHڷ_TQ+탃f]m-҆֔qI1 Ԧʲ;T8qF^P`s`(*i7RoCyn֥lA߾}^z֞C[d\zFK/9[.05PLO0(Ҁv_@J@6ہԾMUc#ߔPSW%%j b߲@% 7%p;,~eD6vYO31>vI"npL4]A`$mC@P|2fAcS8fBߔ,} c"/d-OK\uQv0ľSXۭZ h;AqM9[_PiUڑܵ}P9狋~AMa[{[5@kC<ԿcQO(土ٔ|y:99%)]O5jwww3~xx8}'''K=2/f1ZIʱsJ2ƹ}e.xR4QiH YyGY 's(fRԯl(T!c `@DV2}ŹXJ^]] PȨgkꄑh\Iև8Mi@E*U{?)?΋3E)T'bx+4ԉz^ﲽ9ΉlܴvY=np`[6~mHsʰ els[ȁƬSzA u0V7_]dM>k% !_șꔲUٶKv*` W0j5Zl6ǮJڡ!Ӓ ǵz噰j.lskZ 0GA5CMR_IwP5^p6DAL=~lӸ$Dg`(믰r"(~ο4@;)}uV-RU_^k^mnq?16U 3];PV. l$9}7M{OJ86Rɗ]Cd-{eЎdSLS+-MqV`dXX!HZƩdOu͹oJtv_w6[ԯ,X@^\9;}X+xV*~TOIJ批]ڳ̵&a+ ,d҈wU<+|3v| ֿ F W9Zv8NQU_+&,`ߺ/9:2F3I=4 ` X ƶ v׬*<v&U;88p0?{e·`cvFJ(QicGjRƞ:==1۷oGIªVjįH!-Ѐ탃3pq/K8ZkkVDxGxBDꪚeNW[L4j*YzCo?j>fpHKYy+E0wV*쿚HQ]4^eZ# SquKמz" ng,p}oZɀ";<@/Z&* p=u1W"R0ۿV ,FI, mW`WbU"(j: Z7҃1sx7.Iw5(a"Dq@djv9$bmV# ~9NYwjsfF"YSs@) q fٲOS!:IԦ+ݑ3$dsJ j;Kbwn(ÇϰHk67yWMG622!%`LX]g{}ڹ}a@IhzC*4!rfQ*hDu9AϹZF//BLл Im( E "&n!A,K rw"7364{4SھZONӟeNM0P`qT8c*3p2J†V@pbzSϩL a*KP;vBۥ<\b)2 4{\- mȈ wwwCByu|yy֢vzz:}q_2]\\_ қiٻ7JXp,[0$8HEq\;du9+g@{~^~Os %kwzֹ. Fn-tXOC;88[ IG":@͙ a@ȣv@60kq<||6 3gd7oތ(K C- Y7j L3p2'?~z b1^zwrr2OKO@ `iﭷ$A;-sHk(P>C 2j5bnoo&Uݍdsgk -p{{;-!RX]{geZ@Y8iV\ϩVݖa(p]quu5Z;XY&Sg $x,1W#2HH4piDCYQk(#{P!]l>Q5/hGI  ,(VTϑu*+@aй@}ss6,\'F6d o=}Ρ ag}D XF6(X"h Q.BOIaT.9uYD(Afqk/;::_e^~ajg;&佺l_?88t3Jֶj О; oӴfi_DYMٚC FheOe(;-9>vtY!H!0\׺w txx&*%F*)=BF0ӧv7ď?c}ElsނkNj {`9E蘲l6bO>$X>C Vm@xe[ Pwww*!j-$b`fϡE܄#8 $/c0EhxGy)?"]!r302}#11h2,.H!TكAv%*׃E2 ٪.䄑0BP⩙CB6!BP&_B6 UOS >{u87a`\ACHG0hʀkZA"pܕY9K-apЫUt/g1C [d ٍw﫦Ω(_9D*`Y!_J{9NeZbYe]#ni?" A]M`G>~8f@ W[r>P z R@-/S₾Nlf{8N^x1 fd};ϟ??%.-#έɕ́{9Q *!50H 6ȝE p< k;g g&sU6ĝ0D58 dΒ%Gu =`9" ꮵu\ *(S\yq6gZQ 2:8Q\r'C˗˗ӗ/_,mv\ˆ,ˑI de"y*~!P'Cײy'wFKׯ_i6`/(dCW$~ :@Fp'4jX `vX%AY+2㞕e} %q+E"TA.CDbKup`YxARbdDw%SJ\ԩҁ-ޏm5YKiD$ ;Gqb Eq aU,T)FP{ad?"LsVa!r u;c ,Ȯ“ L];WC9\.8]Z}goL$>njQ4Cvz?uYRݜ"Q<5ߠ7(r_Z 0˪wF~Q&P%#e_ulim AYCoLHD`u)lʎԕrK E8z?Πj%:gg= gluT \ 2 (㮀Z&ztt4Va[ZZ nh,qg&"uLU[]p>WOҸnAY,>i>9Ke'}m:99%ٸ@Ş47+ߜG9EHjY'dS,> |8n>řz rq8~ CkG{`ծ&z+MV FFυ>>no(T5vD,{VbE~9+V\.oߎ3|R“3?Xm} sY{ִX,j5s#G!FavNwN^0>82S^X [(u6mR}LN@ /rTɽlÇ jZM|m.sϏ5/^~pkxx8-T1 |p||< ]綟 TzGbryWZMLkp%tv qgȣ!V[[[c@&<% 6%E2Yvff2QɃNb|~0?1@ rW,QCґd&TΎ&իNWsd"te{|YJu,FI~aRh$<|pdژɲɎی~1=xmr⇾a-#֣=}a CQ$Gpȡdא;'*"fE2#ٻlD59P5Yo?:*aJo߾ύDuzz:jwvR Dli1%dvڊ_EBbS&Tߠ@o߾ x`9s ndˑ+mVojnӧiX *76FYmT&;UEMyJk#RcP. 'HFk5Gۇ!.ѽNSɕ03w9M.9rLUQGUѣGjW7QyfNgae&l @*6GFk]t_ʀo 8A?u#=u],ĖG[T qIpR5Jz:곝=/t laq:,tlºu #@+%ê Q7HD =WV&,=}t5{:/5Wg:|JJR@X𵿯 =eX::CkKjݲ*gDTf]F4Si8f ɺDJ2gPK B ٤ƛ#<̰:H\p-)`ĈqɈ42rp;ZEh^-t Bs@+j jp\H]l{JM;öXSM,#x}}=u樮qO΅ӻɸF#P :Cv$RWPaT.d('˄w,x9rC' A$ƫ`E1<{{;*q JDZzfwDAHmY! xM˦33bԪJ!YЂ}?9&o9G*'[ i>Or:::B1;{=߆R@=S j5 %ҨkHje9e?bE x+Dd!-$ es &~mH2ϻQt3'0*cn$)øm1h棚RMS2hEL>t{ Hy bIWRcq26ڱtC8cH@Im^ V]o{o6h`1tN V<" n9mX̙QR}],@>WrSD! J"%,4*S8`hWN)Y+l>VoњU >V0FRaFV7wB%O"؇H|=-oC]p{#X A稬 a'ȒVl3qHZiS", :B[[[l6޼y32n#C@˵JJbE"DXýؕʆ|q:===z4TZɓ1.*+B87$f9¯;ڱ&_~S]ƥ tQw{eSYc u/Y=fNB Tq * ϒ*@ a,vYQiO^{e!em;~ιȝs未f#@_vƊltJv x75;H|v*Y1ΘޗUj&BRKЫ't-eΫj9A5X˗pՒr;"d*ZFāCC zj?\$;Jt%?%_~&lGCKjtuu59d:sypÇG@(adP[npuRkN ܩH2jQwBn# tT!g:XdžݻU٬/7 _4[<*.s-ʸJ_ J݇ zve3ۘIʒկ*1]-p =l+k[smk0{LFAOg>ZuuqPyg?~{!:K2tv3j5b'T%0Ќ}.Ce1ލ_F V{JG:#էÇ&*h[Tger*Gi Xl޷a((eA pа A=rC|j5M4F 2AZKb #hwȽק\?M(N2GT`(ɺVGɓ3AI$k Wf~[-Sd@8LYYtі ׈ ՝N@$u 8~L:ɎV35p`$;? ZXPlT=8"'N.4PLEfY(s{{;3!]7E%rs,@ S2;UFz4LS-CC`̐ZȌ" uK(Yxl5bP8Ʊ0g0q`vݭcdYݻw˗/G F9u.lYdA Vꜵ/;\!ٳg#cĐ`Ir Jyl#nOi[ }oZϟ?b1NzjPXؼusg6w򗿌@jJʀ7}2QQ`UҚ=7l̳s@ZD5m' f:Tv:==#؝H[ {eֵa>g6/Rٲ*&kv'Bi쒴s98oR&iriA_SA 8݈|D6{ը8ўA5! [,۾7NDeL*}D\*Et#p)jT !1"n(VYLcȃ͑RCP[.9#1ֲcqzTGM+哲pRAjgZy9nBi?k#hx.$dB`NEdA`שUHoM(hI; l/ :X6J ;_~HF[~>`>ĩz(siWP+%0szj2?wÇY5,frieE573OW+#)tPLZ1u"s0z{{;o 蝡ˑ|믿`"f8Ju~e2Ԫ0:Ԗ5 x-N@VO[w= P.)E[_Ft-}g>IF,( GZSCD3!eh sh>OVݎu͹ƐM֬Gp68)X3dsFrHhl. ^<_󱵵5V(PUd>;7?s`>Q_ftqq1DHh*[BA%bݕN:OCl;w+PDI0 AE^:|E"|yWeǏg(FJ:)m:* &pww7~ajrj9:!0LȥE[mV;`HA9_<q͚Jٳavj!Tˁv+p"q| ?`W/+vªΏgAÇ!TZ!TAF.UUJbۻ,VWcl˦Ξ ɈweL;׶ӷV'3-_yҰ:y@Pbf_&ԃ0A#B=T0pwY6TJKٲ u#2$_s-N$JQii2 МhUEVQ {Qnw6n^`gФBP @ +w.z^ʄլ˫WF2f!zWBld)cH[AF:<<jKo߾OQ*`SrePwJ߂]Rb됲@2Ph}[!tJD} n״DKbnAPj5溻[!@#`Q~D %cvK+[wUg9Ւs57ӂPs_}iNHe-) Io?yLtW,9xA3@S˹J}Lp@.,E kp.H g]ȥ DՌQjܬuy;P;'8ֵ@7(*Cf԰˸Е4pF< :ϪVYC!N(|\SG1MY+@N,p;LT믿Nנ#k#A(*VFͺAP҇qloo b{{{8dW?~ >'E1R\__OldL٧ =.pyQ9#}L=1t!7|Y@M7R,\Tȴ&u".|MVvGڴY@> I7yC8=D&ԯ!=D$qF|>$0:CwYgpq(3KڟV-޾.e 58!@Dn iDaNPa\]ZEygR:ΫDόy %\:\uz2❧g @2W0IQPFAȜ:+G B' @UbeE_ Ր}Q*ںfIn<4dΠ֩Q) qArP{Cv2N$VIS~,2YO5\жA+qXU9DÞ  Jְtd @Z8N'+פl\,_s,ze ƞGGIN0-Sd c8LHƻ 8i>O^_}JP(~t(e$j'A4uI6w#i[o"ޖ8VGe_?=ztFQm:CLȑ ːdB_ t4*ԠTـ;!@l ue W)Fvڲ˺e༊TT1鸻;kFsc]žSL&)dYڀHAe9a{d|׋/3d֨]8}뿫${"CT>Eff'~`{ svxYϫ;=PE+j]]!Frj̲ώFTvX ǰxt`S 值HZ唝i$hQ!/Ff%XT&0oϘd}Rb1S&+AStI9Z.W,#C)E41i{A a+…D趯T ?YXݰY)'ȔoooǗ>~x0 #lèwf/ thf2\u9@!1LKg/S8D,|P;֟-s9ƄJY5+ٹ?NۚN cͬNnQё z oVXHM&ӥ ##bB:vϞ=2YA#'+-5xVrc8ֽ %` pۀ#0V2"H;> ѽ\{׿Hw`A߂B({؁8p3rzhp |,I=-|Xr֭,_ԌQ][f .w9–”d\'Oz=NC L3`wA1Ts@:)lggg:??_Nkp?dLsAv7SAǏ&-+ (TԞD"1jD/5#@>*sZ$]U+,ޗ/_^MAлdaY"" u% .U0g>l#?rԐ9&F {D["U 2DMuZa8jn.{{^I+JN[1:_{gNV%2&ar6H?8mɂ82OH"y2 C}~S dZ:O+ FrV6:XߤG7D~ezݻr΁777C˹(Iɓ'r|ׂquH,g|tET\ %1ga!| sx΋;|FZ ѡaAC jԟ>}nD\=ҡN}!E26g]$`mý@@TJgonձW[?)|U283###(s-$ؠJey,^5wd8jj`ʼn@p ;D%NED~P2gV$/Sx>9958l GCuX/oS2yeoՂ9:ҫznlc]fACnO>|0y:&&Lw|ф|VW_Vo_HS%qfNԏ^=J$Au=l{q`F)Yʖ:q AُL eV ;*@"3jP宺[UhUX֟#*YhΫB)~^|&*KMWPvԗ;>P$8E*`XDA5yAWk=nLoԣ8kΉ)l_'2:{-˔ /C3 iw(ֶsZ|>yfh<{lݝYG9 "xOƥRmk Lٰ/`PCtf$VMA1cj\o:r `uL/!%y:@2_D@p,ArȬP}b@ߦƳX,q|'`rFtt Um@*tyy9pl@?>w5|e&raw?/-g e{#C&f~ב-n9oommѭ*m[ipw.tkmu  #Ph!`pEetGGpȪjJ: PGrH]4[d@?^ȆP?),fH"A$PNmUڬˬ2K)1H .?+;ڪ+S}ULPג'c Th4'Us~nJwSܦoRPJc~4A7E. aW2itq22ih6йpR<˙ʱLb[Q μkuuVC>TLGLU1&"ݪy&:lszyy@KWWWcb@3cn \4Ҫ4[&M駟ƜKx>z/7덦82K^z"q\X{@~эqCgtyf169&mN[fL)dTqr){]Csc;_bEm$iè=U0p-63kkkUeJdb'}YHAtS"x*&@\ m߬/NOO+hNJ۹zYIA..`9(;ܕP(L\MxNQe NGGG5۪ w2!rd>0 {{$}n噤%9: d2RI ȠVn@| D<>.񚞮g$ΰZ^phxt[[[%OϚ6 tz?xẊ%)r].\:==]/xcSq^,y.ofqqCq̇lU J%1zD_$t{Sta /52mNpzo1CETI:.poK$`0Vd A㐤W(BH4P>'J6 =bR؄D$ha '}yURRy4ٍ3l]<=?&7i΢jϊ:wP}7 .J xxxJqf#tr_p{oF0INqviu(zV*$H435jr}}E''[ N@)ܓTdrmel%Tm5)6nesߣ(T%T\Y ruK>U @\}̢I'ӎ(A`EP9>w.x 73A{qI0999iSSSmwwxAO+4<. e$h0YzIaEYJu'(h}8FQCJ<4`"( UK:w CUtDA.cP~r[: #jK~5鱩TUGzhXINΕvq.v/s9m$}V egPҝE1ZYY^NU'Kg|s;X\`vY\*sй`r(AE jc[u@8M1hyQ`8>- %Qu?}4FX1xQGvaF7Uk(bZ6X q_ݻH֍\ mkku*Nb`0(#}V,%9 nߢʼ\D.cxY_U6Z+sUC Wr܅3QZGheiV>':Qͦ{ E7%u*xiX!{I@υ## 0J䌳G+`L )$I;d`UEQ#31I=fG'}vU=Z0)pU qx96'(/3V\S"rh P.Qi}Gicj?0;鿞i=`k0ԈŹւ1g'}%vuuU'(IȞEK9(D9PSz[Bҩw^t_VDEN<*ϐUՙ O!)V }:Z [n1W Th%UJQxU?#3VNSR4zfgGd'Ti*4Zt:r cKوzXΉ/ْ,CwP`v7U4'|k* Ld#rQ >C-IcMѠ#sd͒w6YwpWVVjU+KIWLJA}D1,Dъ@3`Әr/ɌmBD4ʿT=W;]ag:O⊕g8RZc /..Ƭͨ :Iڎ΃t tTX10'Vgj\L*hr T^N/^R0ַf+i޼ySC`b4G@);*Fg"4!:;s(~e2Z҄[{(:W͡TOn+іA;*[笴&"hSL'g*iAȹqEA`ʩiHѾ|U@^1d; ׯc;|k?$;8oxn]ɒ9*(znBg?0BqY" *T@T%,y I~X}oq X]M [@-}䈥{R{LN;>>.2Ul{̹6sfee %*Éb$R[{Riw^R zyOiT6jT PECp[ s٫a1g@9Dʄ(ٟ~dNڧSH6.S F|0 .Hr(^ɻYO&9\-zOQY༤wur={ ҏZ+z,2B/g=k3*3 XULiI 0Wi g1S[h.):;@wrchAH^@Kg^˗/c­͛U`[ 2Jp xNywF1"&"’獔6==J/k`T/W-jKxp51p.Lp߱ơr{&ETC߿ i"rqi!Bsz(_IO"ҵ*#Qu&GzY~rTLss|A sT9eT"I{.'XKSo0p8,zsn }*90N{^LFH:Txiuqsglt lѨ4NAxy2}{w1&Is Hnqco9ksw'ađ3ϩNC;<<k]V l ?>5VTy6yPPt}`r$.իWci$%3qߺn%2,AUssSk)TJ`$} Ђ 4zzP{ ⢾pB (%@#<*eS}۞+0 3kR* 9r*Y w۽sT=3N `(1޸K?|vuLj }OJgl+x c7cU2: /iU&.,D^zƂ| U]`؋ۦ( /^MJ޹ T62U"vk I& u4MX6x>}j/^Gi\g{r;z{(ٜc229uUc!ig@?\.bt/{Q[b(],..XP r3ZG*49STF# ,s9UJ%>WęTiyf\AbYnI46y]B&RwݱZs (ύXO3qu}/ úormfXO. vbffz=W:CL@CwwwW;766sWrY2wzIk`gmgϞ4} ÅJ dgR@QVRE]Zf^/^V) \{4Դg 1IT&=M{(8hQ.'4+&E ?w*=?2j%=S>$TnU9ON@D5a9f%/RݹJ-gs\,+i(t@=<gW%g w8(IŮ yX vˢf{ &EG=|\-R%A*#B;C*J!wɃmDdB$ l}u?ě͹V0ުKwز{M:EsSs`0h[[[eש*gV(}$*vF1+V=hP&1Z LW.] NSS"N51@I6]6y4q+YѶQ9PH;w6t Y@{բUIxܱT.kUd[` *Rp NIVzRA'^e䡯|Fs׌x@COPӞ0 _(L9}zKɝ4뽦IիKDy `gXje׳6+xvDm9|ճT]eNmEi%NCE=rfyC0sܧ&.P,ٷ J',`( Tuz-.錅~/]_?q_s͘e-(aj_{w6)0F4Nz$"ʩoٗ/_ԹO3ƨ=TZ䌻4P5bP櫫ZQ`F wŬ`~ aWWWvF?4-AU/_ևdِJq_s5 540Rl$S|"*䒒_馪 zDfRT(B )t9LjIwHΡJDp\GK&~%czӨf<cT {)7c}?Ս闢-LF̤gdsܜ1$]R} iEH\CŖ uj, ]zk@&gzzV BwGUFtC JP5Mm Y IDAT9I $l`-!w:vuuU+;pXڈD#=L}'2zUOLOe 0`@ࠝU4kaTIN9!Hc677ۯZ Uwwwu /"ȪԛHdfxm^=tkk$ m驽~z4=1QQgjUiۋFaIbju1O2C{U#F3=`CP ˗u p+?Qyd3swү֟%]p4]@ *LО5WeU+TҊO=2IeT( }(ЁKk FCJ4Vƥ*|%0*sԶ*D0!1 p "KlwiRA@8=OI14݁jc $kq*'$4斀 ֔vɕUl Q#B kR QJ*߷o S./--y:Hs '7@ QpcY3.I Tt yFZJy.e pbaa-jz^YpY`P=:\b@axίB(0WWW+y:CޓힹԞh]9/H1.H #w[Kx%z?c-T~U#F @_~z{~F~x9筭չƌsWg)΍P|AX8Z[]]7cDj~uubw bH8;;;u^NOOEzgF8}~4VRB.OKwS+ls\0)~xx?K7y▖J䷼g8,H*\TjZP:XUy[:M U #DiNNN̽s# @D} ΠY =JJϑ^]gʥIp=^pP$Ѐ T9Vơlҳ a Ahs|(.A[,9?z__8 3~V ϟ0_ǗlP":IZ*DAaZԑ鞟罦MIstsw4Μ)(8yީ^˸\P q6]$=:N V/B{g:;fԖ('- UX!>yW5 ;;;UX?2[\}?Ϸ15%1 fa#Z#S,b2zn擠s u>m evUxb1Foy@jbNX (t%1\ɗ \5g6OdRܔ4Js9DžtKj)%4 #8BW-;ɣ VȠIN!7ӧOwOeNushdE\C0Y'ikQ܃~EbFnTj``D/V .w٧AӤQɞ%FUu!տNբqUvdn]>Q*}ybL ww #w~U3i!Ɩ;ֹFE sN kLb23cb#ϟ~_W}zr~^;>>"{ӟ=B1 @HCe| P ټެ{HF6MH T.r.!B[KR !gjID4WBV9'p.P|E5 B$&)i]c3|psĀ#INj~ro(j9 `%rW;@9A`O|&}$xmnṋE.+jJCߜ)whh98S&9l@onnVpͱ9" X_$47ƌdr*;us)N}vEJ5*(L9F*G$Y2g6m766AgKX 8 ;b@-3R"Z.xMlc/~JL0nH \;;;߿W+%(ֻNV#Y}9`ia1OΓ<}]f@CU \ r ~t " = 8)猢z*L@cnwE٠=Q+u>4C?OHeD4`%(xF~̷gN#]F)p_z59ss*)soZ%f`9*g#JJfO!4[̴?Ve>Wc"\s7TO$!}OOOks՟ O)Q a-_Fwr)tJ/mE4n?~oofjju;L8Kك?:✁ְJZkY#t9>1%JG Y?Sqa Hf\޲J|D̚3ùkvrr:NiA@I"8*|.K*8@1ɓ7L;3 FݩOqֻn{Y %@r}sۦb"J_>tC^syx$\=t,J]ZȿK/n]=x5-Hd3vQϨvW_rQIfQB*p(d PU| Esq~"jFvrrRHB)S<΃dZOJ;hG3$ˍN ZT)K"3h޽{W}`AMB|TD.8 *` %'窝/_P‘(iss] ϟ?o+++UqL[CU[ڌʆ͵x̋ "Q-//w|(}z&4wf=_!\) C///Օ7jmTEfY%; XTjK!T:b(KdqsZݪQFaCB;@&@oI'pU^\$$R虫L] 1"GPxΏy?c&IW2?hrv+6ƶl)f(a>Ǟ!UlzFsɦd# N9Jܒ iSLDCY͛A_ xc 35}r@cF$8]{iٳ˙]KR7KbP{aHNB '$U ֔>m<`IPye4=cU@ kH39&[ӱyTJ'ܟA I4Tiy)S`rBQh@KיP ֆ2ks/6%[!\)PN!ZA4T[,gǗ۝=̂b:L*\`5G u#;)L+'Gхq״nTvS\bCr]^U ˙ҵ.0𞞞nǥH@E^4 _V -#(\y3ͶZ+0pɇ8U]A]2oҮryymV:SpNe_ F.& H *mC~(PCґDOVf2t}1]?~)eq}}1+zT{T1-"nYf0ysFI٬b'ONr˥V|;;2{I3Z՛1 j۟4<$w޵B깚]"b(n\SA!K^f,52@oJ`-.I^H KF$T';&I`6+JUAyLȝ A,yHP ,ZHw07DIƖiHĞtz5Yk[0rp666i܎%M `Ә" Ch*>qLCƝ!P֋E<< ; ї.||3"Y^^."Kou Z sQ ;%}ô"LTFl4y5K9240Jd0nrMIUL eQ~W'!a6Ŷ wL8Б&2%%õL?~`Lt::ɜI|ŪثGQ.ދyӪLƓ~_~;ǗBhoo3_??cHY%or e;Ϸ8 ArmǕЬ,-/5h9k%(}i4ϠSm%dhuz\,""rt~܋M;=C^ϟ?ЎDdl@"Di9;;[UǢ\ KƄ9j7:B\50!,$PTzϟ6QItӼ%wϫvǘ:LI?pFĎXw`4*<ҲԿO%b"U@ڻ,G+=.T{fInjJgϞ-P4ncHL+#KnB9 =W ֻw % 6qX"0ryr&jnUޖuS" 7Y*d"' " ̳%x}n q(` *ՙ6 666;;P>@g;m@ ^*HRr$#4iyDb&׹7,K'σ>Sޤ~ʷoƨrإsـAOTv TQ<==~s(]urTnooAm*!] ,-,,TP3ʣ@K9y/ٗ͹rBE%n[Tz/D1D}d ^|h0Qk(Sq,X~e< gMxFwonn`P 3y־ zDxש@:Th\!dWUq4U@̲=@^,1i~]^s?+WUk!m{u=i8c 0- _TA sejKaր:kB٩X]._ A?yb):gs)͉wmrޟ30???NOO 4Fo.Y]]mfJgf,_e?^4aQLtW]cEa$P4c;88K m; {,=X%,4$Jyxx(5/zz6ԩ. ?#Z9lw&B1gd}/,i<*ԩvvvV8<(1jf:휇&qT ԥN¢H>W~OH:,B*ojĚ=Ie7tuuUV\0Ci\O*hT-%___ݤls4P$oszU/Ceh4trٻ":R`gOV}`ȸTC%}IϧSЦ_ 1ܸAv9  d e=WVVJg}EJZ{zzj? R! l{U mqq z~3335L7Mނ%5Ւ%_-4-ǃ_=໻?VŜwu~TN:gKP1I䌶y`*XXrjIW WO&oookP:GX?zAS@HŭZ@...^?bt#*Pb0rV:+AFVq%MdL z-I)B˱] P>sz sl{{{dlnTCz;Ǩ ]\qj &UeyӜP9vI'Ϩ* r&Je.rs LY>^"W$TgϪ@OH澽sͲxwZe璳襳L `FD#eHzȿ~`RX Z;;;rX k X bwO-^o{gg?̄CIlnkh\]]Ո] ZMIʹaꪽy9TGLF߷0{_zVVV;hzmO⸡^4' 4_wT6h4;S- VBn9==jJEt0je4$MP씌@%Oj#Lz\3zIp$Q0YT1z<'EZ IDAT^8pbKZ~WL-<^>iή&˗$,g% *A3{";SX~gn졡}VNdLiIܝNns*ׂfP8ù VQcYT)H3)[]2br⛂5s*v@wN52G  !Y$tR)ݕ@QF>}jڑA T)vC'BXe4NSsg3$z#k@Wc<7+d=O~d,ɶ3Q`THZ|Ϥhm˻J-]= 4GТ ܢCsR!!ǤAɦQc,v ӊ1f2;m{agTy~@$)PT;1&U~Dn% ;r$Yt,^%o+Ԓ"UM@u D]Lg81ړKRCvqΈD[R-ЪLPB[)2MH&%[ 2B[d3hg{>lOCm|sTI j@uKmC)KhԶjL̞"nsb%`9Pf`%OQ+ S916'ΥnC R\pހ,-4 &;IbqhߴjG؆>sG@βo@ϡg[7у뱗C4 tmz 9{A3yqqDR2D]^. n( )eKf\ W>`%=<  jϟ?z}}-4Q>1 h1!?I -w wA=z6-4Uf.6GtUq(܋IHC $f_ӌABJu7qөB9C./o @ky:W www˕z8OCpvrvsr%7rlNN TmCXN@5v`0Er{{޼yS.YiSeN,NHwͱL \wSI*y}GQ"6׋Zsx;Oy֮5zssӺn #d0ؿU?$S!kkkXkqkt`qwtRG`󴠀hyINn˞?'- 5c[@ _UUq]:H帓˴FVǃp9NCwS F@h(-m .rrXF tqR {OuCIۃy@qUִ=Ggr$DU4/j*` r!]v \{c`XDmb|ݻw*k@I} sA|Vdgp0pfTURsonnJ?BnIS!ڪ 1^,3 V0U$A 5{zOY (]QleI_t:h*qD;#AEa279J⢘kn[ѷ(K]M!^# *ڿ`z^]9!{mq;Uk4yf𳼼NOO+?V9t3!Q<_=u}ct-R<x+Qy}X¤.= CAYZzFV{ڇ.RJHu t{M?EvysVQ/()S⪈'=*J< *Zkd3rBD9Y!RY$>>Aμ$=dY?Jf=9 * l]pN;M/ls܄M1Ptgp8,Eݣɵ{o޼ik_.Ckv޾}~˶XfBBl૭z^52@@e&^P9h[c惝5Uvө 0NOO+{vۗ/_?0&TǥA ilGTXR,UF&8ג97i.XWir0:/if}A֐^/qgD@M\b-4&QeQ!QP 9DAD+6Uׁ= ,% z޽C,IX.Esf&NR ʥL |l|~h4C_#'JQCIf5]̦p.[cz!ٟo{U*y%H3a4X4N}[ :%Su~B>4 T]؅㚽t^6u;.<>>} m A[eI鶴NNN NOO`06.F\RQ/XJS"[YY)C2w(~py/|g93=3^xbxNo׿ ê)Hgo:Njz^FzXI[`5}GԀ"[a: Mo~~O#L6$ l 2@5$Qj9&ΘӪ$f~/۷r:P7w]YY)H[.-S5zN)"zm6>#> @&G^xѶjF7FF!N=H. ixvxxX{A%bUtCYTt];88M[gp0@)U}; 'AK=0[gTJΪvUgKkr!wwVY(2q]`|'`fD.PYE4l@$YU/U+1JTqpr ?k?S uDb'*up3]]]m&DLC %L. Z*Чrz3b1Gј~$^WF$~gm(7XcQ 53fSiCJoJekS.LMMBnzn_4?Z4/᠝H9|P#{p )B%)x@Ap "$DEwDjWߣb+ TSn1}z# fww :/Q&ts<::*nN,a}7JEKS2&TLhy`~BcnVF1099y.9􁋤t|_U?3Hs}zzj{{{h,IhPѪuUvZnllԼ}IcAQ( yM% UXճ^>m߹S큆 z͜إhnoo&LT)/մ ?~U 3YYp-wvʼnK~-,, $oqF{ A;%sz^q&btrX&SpssS rg՝\9oaOⷻb0N}򥀶4^e&X;%bUPQzJ1zVHc^K4^٧XAuFv0 V5(|w){D]IM9PƥdY1ː $YS _4W( \]F .nJjT)׳*u:qppPIO@-wɪLWjYI㳿_A-/g;fGh4oT,`0C)jBm#VP34i^*QhkN'k%A=ec#0iN#xy;999iI."33w8RmdW@xggL2צ0Ӡar#50L`\rAr@{Դق|ÇGaAE;1gP:HС@vaa﷏?]__n;m{{sRZ^A w  u ,(B+-*A1PlaA~px*iI3`o.E۷o˽eFK i muu*N:w˗vppPw4kI#qDe(RRA*45Ʌi%>뵣z9Ss촓 Q|\L˹buffz~~y3 F7)V{K:Vy;!`Rr+:OlrԻd:Buݢ԰:}ˋ"$T!,kd\%1KLЃ<&y(1UP`XTN(pYvӄ$.MJ&6\:TQU ΊO>5l:sQhx {VNfgx}ǤollzTyPhݻrOOO[ө4vSgyeh4D`zݻ0lr>A`cP3% AJSψ_. !H!fgg lnn19KGr% :@Wf1J8] i%IyZj쬒LXwLbUxON brGyI:# \>vXs 5{)J0=$=\!ң"Vrsgunḓ{,#٣uֱ mooo@Du{DK]JC'JF7$8TbrYǻwED+q00<?G՛&=sgzc\u%gdҌ]tZdEϐgXhFSSSmK.36}62l! Ւp;N)Ł͛믿V|P ///[ۭ61$P%|cuuFl(mkkc՞={>|P ©b-Yb!YJ℻ mm㣧k$Mqڎ dY`ɉN[ojj,,,.=v%b zBYn4h `zB͒8% \gggE8\Q>?b'jlF#[Jf"ĠײݤIxiKyQ 2騄Tx,YG}b,$J=N`'Ɩ:  {X IDA*ԡ ...g(WM8OƵAٖ,C5z>>ʫ"*xKI[Y- m4Q5wnoo뱖J/Jx;r6}QW+ַ*I[Fc>掽z3g/-- (}GKMb!³$vr/sNdۭJoom8VOy0߿D.Z6)k;;; 5 N?n 1ɐQk? i?nEyniv9n'~='Vĉ gffn\K NNTJ%᧧] bF7~ !TUE=88;a@^V!rcGDEYFf_%d@M{qciiii <TRrS~嶼\AEê;|LO/L.VyzixvuuU+tԭO·ɷa=+nV.GY{ӌ`UU~_ :8l듌VWWz~^3֪F XZZK+pPcB,]X^^d#g}dY &w:nwZ2rwA=;Aj01r+++meeƃ6œu΢;hf&N+?}Vy%C3H'[6 * ez;;;kOsX vrrz^Uhssd{-//Nk?Zs3 h{N666Ie|ol.'#WB#|j OaLGkͼx}5*m!Q'q >}*IULYA@ODL)O/9n\vmE8:,$U+sTqyqUce\:M͵dzODi=X=Z"R?#XXdz٩^{oGHҵ#GݻM8j87J.Ntfh}B}D$y։}n=tK F*.MaE@dD:ȋ_ LNI6"Zk5pK)y-mRn [F zF1FwֽUq^I-`0hwyT6bE>C*777F`LRu€Q_.iObč-Һ],T{.CЗ$3v\NfRjVC. i7KךW47JԞz^h|LCpIOY&/2 "ܫ縕[|^ r=l=5tVg}9g~~"F6MTrr^;>>3D~\j.pA坮WzPØ4}s]g纄4URuyh,s&P1yDU `n!ժ^ӊ=#Yg69c$؄>DonFi-Ь'vʥTnFsO1m<1(" aiD-6ARm~VbC%i6 tX\^^V`0*!Nk4?13BԚDNi?(ڏ?XLq Wofnn=}%/o@ Л~K(/R26! tރBL[D) ʅ2;d?K-" E/Wxjr إ$ǶS ~sWGRM4F0,Iy(yy*e*;tT隅OM -TzK4\j^X+KqkL&gNU^J39ĕ龤Y#&.ڐj.<qɰH(g>W!A4dҨl']^^sϨF >dCY\^PRAFE; IDATrյ=S{N#zfE穒GQ)E; {͠sUmm9qkQ^ͽ^ 4cmVY@5fb-rzbugBvttT1@k}8uaa￧d( K)oVUsgy. r4 [W=C5AT 0wJ*dՖKRO1 E@EVyᲣCq p =ZI.$ʝ9߬BlooFO__OpIrҸ"jM!Ih7*U YGǦJEHޭK\\\%9ȣ,RPE.HN}gΏ3)P0pUcuYZr.I`-MUVPơ~nYV3*n=e;88(QV8UF٨(:_[[zn['W*q("]&V34ʉ C׽FJ?P߄WX'XiIb@tFt 9fPU\u1;^BLOO,ze9Mz\Nn ,r &ib$!4 K,A2P8Vj$ BGebx>T\&>$QfܜM kTmA6gŊd؊5/Ec6f bƗ iqIh|,ó)ҧ;AJfGe[G+LXɦp88vrLEї6 ccf,].T3U^tb~<~11\*" #4 _~i>|W"02QwK@(} XJy,AXVG3OLϞ=+EX)TaAJzKg;j_B)eЉa^?kj{MCzsH!"TlS2'v?>Z߃~+W 63??ܟ +Œ .YYP%I9YJTzz`ҙH!iNO2TUmB3`"{ {{{ER6z^PZ3QͫEKp^JH@KZ! I*Cp9,!Q3c;Id[f pQ.L%njwT3hM-@*]`h+r9)++'2Bp=[gzm " f lǏ݅r{*Q!"1!8Z$O깣lbU,zS-y2z9𽽽1`\Ϸ`P YvFs0IcU_˅l\@2ˇǡFrSchH` [ED26# W&h=ep&*ʵvD**\Z 0?CڀJU0Z^໾[%P ~ߑ6ڬTx}CѤ 6{mxS׳WKǗ ;SAfYUFr>3)2G;҆sNk N#NX_`%e{r̘}L܊'U0p"@.`zyysI`8C`^*J+t%Z1̒oγfcnn,(r$#WtF0n<%sGGGo[ݕ܁|~~^-:򗿔EӡcxNSkgLmVxD@ozc鍐FP9hHÜʹϟ?dV67DG$?`V̼t/)P˂#J:Ub r*]EQa<Uro,4 .Pң=t:%xP|7 5)(h=.,*@ל>TC鯪3\LNI adUTm*3LU+! ||sxG)ŹNzH2w5٪T{VVVnE`ҦԗԿFoQ0"|)UI IkYRAb$lzϟ?oJ8\rb&e ]]Z[[k~ƴߏYE^__NSO,m@`X奥믿Vuo.?l$atppP`Eonn2aMb˫nĀbإm' /-z5w|},abN,,,OQqog%B"g-%K$]@ߜ}ҞIѤB3ǟ$4-p9t_#NC}N@P:8'70 * CZ(Q2!WTf=WtI؊d9$Rch\9 P T7J"1\= hyg)Qޡ^ s4m ۢ<99^#p3Q.UK(h}{ja ;GcaTAZ7zƩtN$@\VeZvcQg<@gq2rÏW 4HYZZj>|r`@r`blzltgr-PRÀ7g^ڀjR Ɤ!5DbI9/ QܘAo@W_^^͚u~ZpkN&0?)RC^A2=^zJ9wzRe̋2===F hD#C.ŜC.U?áJټꥣ~U>$J rpn7i^'?kU99jK|ns*YN@ %Hgmx3~ A^mJ3#s!(i͕E]tI _tpDMș\ ((.Iì@D" {crjT`r~U{v-s ;6^zMLgZAq l@~,6`1`H DŽCKl r$If??c)@?777&NCW͕_8"!H*O!Uu1i ˯_1jsssm8Vv~v|ゝNmnn0a=,;u ÊtJM|]YYV Q:D{̭X& wqX&Cj26ƶ06ӀDDJG&[XX(Ig{oooV%h666jL-P+KVVjT!\`˜ϕ3L~Y}$\Ԣ$b mi>??ǪcKX\\,*9ޤy&U(r|SÏr?C`"qF[eCIg@Rulѝi/I䢡 sC : wօRsUz(>c]ƮPb,\NѬ2Ui_;ф췛]; 9ER)KZھE,a5Tgl /h9<7OG*h 87` HE-Yz'''|g}pt:ΘmjRΓgIKw vhf-V9&K;Ė15~ ' {@|:BVMh4* p_L=؎DZn`b&Q $Rd_F%pӪcNL+ @p<$gYJÒ#7_ğo-UqB31ID/IX(d~;sϥ*m->>%,rN  y-X׮]k?~,۔r8Dg<+066V4)j2ԫgRDe PUpHQ+M"H:(uL +zY)YE] Z8m'1 0> C34#0AzONNTzgd4tT{{YZ7nܨ)Ν;}E2:X%RCBJFZL=km)FJIfѲvcSQ1OAHLUIR!xSҹ NAǙ;OrUePm#2o߾`ԁ/_@JZ_6$0 V <A-tG)9" @UwwwBz}OIRdlwwBM G+qߏӧvttT T0=\ϖ#3HMlEo=je ه"hqo߾]@K9ߜ"8 壣[a' }ɒ:V9-` sbh:. /ɲL>/6 ٞ7ku ccb6_1|crmlDIq7)>΋gaӝ7###r8YtPA*"T KRԏ3x39-^39[D ֔)f 2#j̬{t̚z1߅Ȥ俩C"Q\`d@UdOM éޓ3W떟?nϞ=(>:`o߾UK ;bmn2xtœ1 NMM7o5 VN}RybOUm9OC q>mu~uhk>|(R^HJ^G#b}ߩGWuqr4jo~#A!cRuYi߿xPmedCyf`sC*,p6;[Yr~ϟ#W#)Ʃ&B!HUN`Lw2d$Ns]f2LY-9EՔ]2f 1YG(()j:YI€p4Ldtszu&^C7\ohM;^ CaCݡh}lcg,O`=ƴ,x>;ܸ& d4t4[qJ]lo:-k׮T"up\j9Iz. Q%پ!(&xdEw%'dt7m(+=;;[L{f%rV֪g moo>)Ȓ$=y$J:'?BV/MIVi^ΣwcV@*eC9(a;'"iq1d;"B?`22Fip$O>=D;>" W/ʡrMrfƒZbrFQ Z7ي`NO(D:nss(+xP<^3cA1)}\뜙TR R*1 룣v޽Yu9dtփu 1؟0 q,v^9$KA&(Cط2r|a>'řC0GV990Ռsg:JZrF7*emN}/:9nAT]NJI^2K]:$< F ґ5Tgq{{JI9/{%Z)ȂЎݭ{-2۷okژd ݽ\=d8R%Qw( 7nhsU?S P2e0AC96N` ze9BZ5>lgIJ[X%L2=!z{3Mt(g'|Ak߾}kO<5gȴ_ :S'E$bqvm \{mf1 M@ j+G{p)8PV1 (OQPq+^60s aFS')k.砰USeU$NɽF9k J@L::l\ ٮ&oKƪ{ϕ)[8"7a38uPXDx?%'Y2Ɖ2N*ɤ:?'AWK2RuڌQEIY Hv`09+ck9),/F;wqr2J4%k͉g~P|t|e&/_l+++eSAkـz(KAXOZ`M`=vIJ,W)@#E%8Ε.X:$MVR5GWy~[ZZ*WIHm| zڵ>~X(1k[4::Z*[pڸlCڷA DUr]C nUbK̃vuF G 2FWU.l]?2{(">}9IK9>>^Q4h`7 v od^9YusKmH/A[rH2Բ$v1ًG{KDopg B[8/{'YF}?weߩOU]ϩw991*5E$F8lGVBr0|Ɲ7?F5\{]fT@9k_wjqz>t*gf=wQ/]͢ڛ7o*+[[XXhKL ӳrVίlO>--w=tKAtcr/NkW:c꥞7t»W{f9A$]ZZj͛75T)d>EMJ0vݶfgg`ޮdC/Ct)黭{ CTն>;y)ooo=TS+AP6ˊ+-'2QEP)E"rf(ל/"UmRy.gcRXߥU51ɓ'Uhs:>>nO<c5j`X35Pig*8H+ЂMW^Ēn"p,#8t9Y5}pš;::*GJb>uX{B=}O`]eBd~LPHDHbQUR )# KIWKjZ@bv>WQLW~ApjYֲ`ҡsu*wS9Kų%k``WOzlIueh<{vA(9^3xW~ a CY €%+hM8&%ٖHKඈ59=Un+sN4W ~zϲ挨ҒZ8ݻW@8<H;rF}J&KpsP7]60 r%m)=YsMM\D!N6Y@ 4gyJM.la GGGqS{[Y}MxaM*fd{`nwwޜ*OB[1띲)cٔr8mlnٛb;()-8_ C8,f3fs }9T$~I7Z) Xx: EZ& cXPq`HTw-d7gϞEO}{{{T+RR[ytt?~\uPV6" <+~zm$j?uӗq/NᵉT?N@DWeMcj"%f`;NzE"GTHKtϔPx'Q!)e@\`]NBO(+t۷oiagϞ7oT z>Bj`3a)G./ۿ A'+^ U r,0ϩ`K ]x )蝩4"΂a!eĜu{.;G-`W :%1JڌVVVnhq1 ބ@WO p'wo b2;a'9I?{>X -پ2A ~Y]J)΅. {g2uJ~| =͛7zt:u(Y[P2l?KFztwUb۪Us'O7oTrkall*!)InN&ˈ;ұ:o$[nׯCfxiO $6ڐlF,ZŚ&(4zh SLў1qFw^v71 bppmllih*]aLAN .--KXP})'PXi\m7MV{ƍ^IT~vvVqmddrzu29S޽[ ,H0%a30?Wr]NAc0d0yBD&[`2$"KXBx<۷+('/dc(H\&H8>>^esg̡#E~zw^[__lŁ BN>C_s7)J4$]a I ^9<<^^;{v cl9 AE[J|}vFWKa<#X=۠hf}U-rИlOgp$µo;wvvV2X9ǥn0]^9[_#2@}jTI:Q|:{W{ŪmF/h988hOR _kȐ2r߿O&c&T˗/dĥ][[U#idbH-fF"kui 3 H1"l/*aZGܦFuV[]]I ԣ6* vd$]5s8N]T0o_::*4 VH&c`D. 6#E!!oɬeO9F5mĖe KWH 4scc=d1j<ǂ.XsJrgN=+2Y{Q}}!h%/s522PgR8(OͅoKKK* 0ُ.k `K)ǏHf3(!WA{677!tp$ccc%RNiPKer:wܗtw(%F2))S1n=pq |2M6 ӧ}67 9ŸwƝ e[8%JNldmHf]G%?<<\}މCKSr122R33Ss200P}RIgK)gUƛ:cccm||F΅yf)s )ў~Zk>Þe *fYsn+)5ʂ0_,s>\\'" Ke Q&5=x5==677)](2`jR3L---U4ψ%BV-[.~M-$3HI Ѣ{کTwV6&ۣG<@_?ŞS#rRFpA΂h2 3_i jV l'lF0v+sdgi5:ڃjFG#s~sssmss3"!4E x7Ù!St'Lq#j݂0zP3O aS/-p5h}it!Hk9H%Gj({mkkk}h'P󵃯D\v=u3]{S3Xz$s*3&$YWElGv޽>( ٳ`q OJՅd&F'Y$s f2ۿ:slf])h㴱eDŽ3CšuOk rW7YNY4" muuSς]]d؟W-.',,, λ9hLX?zzϟ?W֬Zȵ?>ʙaٗN>+NmgO  eP=77Wh&]WECwRm+jy3#=44_9.EOI*S!%'0{T-fΙ2jǥPlHOfO,#Z"T=c􂁊e"2dl9)byoz+[xYCqd !NAruuX.S,D0>XR?kRUǹ= 9cY\JmH 6.3E0S["e5"W:#}! 9(TNApr@0w T6'}q 'mv)9b73zn.l_[`3dQPmcc&hu%R+C%$DIJ-"-mpc͛%4-2Agm<@ 9!.NS=rĈCv$F\ׯ:zc_^^NӇ|t ~{2Ư2R+dBQ0& 2Dl¾9!Тl(4'Z~%cz(-'dD&;.I[^^.RX EMdNԕ/j[JOPgDHQwQmgGk=EPuJAkrz\ব?fOu2=鞛 UPs(ֵC] /r!phzudbc]ޔt2\ C'ѣ666lqZhkWjva*@< P4S}hݫ+rpFIlһ)^tCK1J]mQ}L9 5Ma5hr5IM2!_{`S<ͻqFE@t*A?22ҶsÔ.=|JQZjO< s~=5rYJ`j1}$F255vvvi*LIO=|Egfhh,3xbFTaȱ8.j*^ر[XXjͪA3E:)i IDATYm sBFbldi\$TAƃ xTr fN(A1M`Prs~*b1u!PYJBʴSFQCmE3Qpud4>zsF_$S,3J\:nu&τQ -qyymnn/;N󄙌%hY`x* r&J2!Hڮ#^mqMݖ 9Q)V;6kA9eN&DI@NNNbC5eB*D?5i b;i]+oB ɓ'eV/%DD ormCB6PS*zo߾ ݥ 766V̡ih @~]$+j\v޽"9 5'^.;%2&pf9Oы*K8>,sL-5keY`8uy;0ݻ⢜F:^ 8l|[[[~#r3d&X/2RZ$5F}\ ˚i*f`bUS E lIX2?n('LTAΣxe[X~#e(H{J*% IObH*TL'K(&g(ccR,]:16{y䭵JAxaax3}:gř䴸$qaډ$:Aԁc!nec+ 0r6^W7ā"촋I:~=AlsP&r EjX9:揅cdX.L waN^ɹwxxXEKanD@fjeq;88XL9ث ]3>Õڿ55A$C.8VƬ1ޙI%[ha,6X"SABL7,kJ}w%ER°ƷlVp l@ W 8tLLAQ~MNNL`q{,>Uߒy\̤D>{ ǩAfۖ<dža'dLtuu7tAcf\}RϖCĹ!>lic)333H-6ǡ&SP授$[v',? c ^իٕ CZӕ};N_dGGG[-4S5#EbT59י:S ׯ_ AYdB,:#e&Ur1.e6f|<ԇ\pNXfmTC N54" O-($`W~2vS> lJQliIZLiqqzU>{>Y[n"p8x 20Ft[?uve3&,}md֮1QEj9xB Cr4gb02 Lmmm:dt:Xw1ehbW㞜G]\60c9^H Wy0 SMbx43Vh (84 X dA:kjX`1 e ӄ5| bu$1X$O@wvv4e٧maammm ^Sϝ;Kv&G!8"%M>Tyq̌v @1ؒ"/P aФÙ Cfi%lc`7tsB(e"ѧO BMw9@v)[BLTcyZoޱņFグcfju1>#яjI4a$wwwNiahcܥऴ d*QF,-̋666V,'6rlbȹEӳUS9/{&Ҷ+sje g7Ꟈgq/A˽V}`}Ԛ:###>?{< 0>> 4 MwnCřnQ;<<e+n.HT>ZsﶳS thhJNUwwwpn׮]+65{JZw{~~Ook׮n[U󝜜,.#wvv .j333}Uuф~:N%SoڵkR)_Q 7Q*_uxx@:g"(\!1)'PJ}ClH'ESrQ"#AyZQH0d+ c,ׯE2K'Ĩx9VơɌ]@(K kmZhE5##,$ AO<)A{] i@qN9yd8fKȲ.;Ryk&;652SK:G9L,`:jAk~ƍb)e'b[i5p} ?8 7"ҷcv̹"ހ\907ol>lnrmw(b۩ϝC\03mBݦL")r{lQi?C1n)ZPD#! {xX_uaw ClW;#LVLudk$–! xc~W lEI`-l D_ΉњIߥf[r-= XsNtRsR:1Å)>ྜx6A SLLL{0 eS: P c|<9ͱp|taQ57OE<  s1z+kaH@ ҝLb)ɚ~P{jSC_h4KYÇ 9)!+X3{3֏G[@B/jl DH^D2F^&S=oU |ǜ}Pn֑#!cr#\7߳̓,(P|ekkku8SIB,bsqqz".!+k<Z >~F29Fќd*Is>/c`!"*P=ӲTCCsYd63,m]{H5+elϕ:8ou\$O2@й7Ks"(zdL$P sT 8lQ4"F0:KӶ7[WvXw^ب~Im0ŔCAh---U;K=Gze ^ !H_mjAk-0Ai3(k9`])RmIWJkĿ"GCʮd =Td'%5XD0[tp[]]MMM8QA'8E-.. 3qY0ctwΝۂ!G6v2:НT_B?Ւ%kT:)} Y__%O}Paɩ VjH/–9<(տkU?<<< ;k֕qƴ4鞜APٴYu鴃GUtQ|fb2_ϟ?W }>\-h(D{mL=33Ո8iM HVPѨKlͬS*1[+)F})OXk):`IkׯTo ޟ7oޔ "6F߼ySw)\fZ${׮]k333d\ժj>ONRНHE-Ujl k6^MLL ^OUj'CShnqeS`ddu:600P#!}S`E)brrMLLT{v/_V+?<>^>FG(SIX6g}ʖ]B,SmPhECq+0X^ ^Fh]]g=dQ9LeOwΓ>i*CǑ̹2cQMjezg9ّ'~|^>z E FxZaX9qL v'uc29S!Ey mvg@}ergCFnqJ1)5=x v"-e?B\|~?]aGե kPıY0??_fs<ց:18<<\2R&0D4d&je2Bٳf OʖWvCܠ.-K,U4Bje mq1eΌV)cI4 Y V%+|Q˩=Y]39l9H%3] 0$Q۳پ߷Hyyks<%#mۛ7o%⦲&cB ,eeϕKp"-kHaa[ Q S,YNd*bO_A_d`&0c{>9b7omMx P..E{D|{T\8ED5$fe5A26hB{@.SQzr 0<gtgt̺'l%1.z_,pA`tl/).1Jc A>EKN Hp@-JE,*|둑/#m eƣ-ӺVN1=&''fߐuGPE$FA@ ,Ynggo&3;gʙVk2=+x^%  8!$,(?2VCqRInFbT{Ϙϐ->]]lW۷đoÇl?C]R'=C8Vف*"곳v6440zbeg<>ђE$i[XΊh @!%W" \duU=D }gr&9C@&d~gَ IDAT@CfN0Vlt۷ -駟گZi IВкn*qmkk˭R I`@NGW^\\ͰN_~-5e82?99)w*U)xBZSܣ@ ]N_B^1X.@4 udܛCY6$!aȎ\$SU9h9@n64*NN&lǜ0XYFD`Ԫ0 9GY% "&0s6N.*$K6q(rK-KH 5H`qp eI`̝=#QSG1csRGDs~䄀( "9!g9.}`l,K:MRGme{&}ׯ_ӧO[ۭM\Nԫb$@!߿o?n޽薃 PV{yf9)aݭ}g۷Z'ڃ~N{b_}nNOOn!.a`ԳOCwR2O<&N q3??޽{WF;3sssjnG;9= Sȶ )Rf4WWWa!f:'! JjőJt?w.\^^r$}q>}*NJ_j!ɞ[uls1eE & 1beTrN]>|>|P,P+C;CAt:p$AIƯe2A ڪ[VOd=2r]F45up$ 8^]11 *A`TLy;`3"zP}gzx>5 rr9ٽI1Jս@bt9KQ)度v6ȼVuW܂йo߶޺nOuv)I͛mqqz3RyU^+.&ջw[kp1vu6??_qxѠ!, ɓv||޿_ YXXA/u{i@҉҂,Dltꎤׯ_J_CLhMhVO8DeĘ@@2aΉ^޾}ۧ rY=sssձ p?==me_8ujH޽{uNf 5ԋV///Q3Cne+7p*3v||7l=60fww߿M!WAaNrF8,ujT###訴777^d-A$PxxxXl"#DMSTXXX(訾ä&˵!h: lL+f$#GAL,M(^ rb\jZv1+9';LLLTsp]\\,~M]AHJxznPN>͒ŧOvp0udjURs 2`nGGG_~)P)zȲ)d6Y`[]]WBV2%J)C*}'''*9INҐDdZCpk_R$>(ua<Cjy)qeZ>s> euzzۿ[ QCLfiҒELg Ԃ%lwi[[[}#鴽[R?+7M2Jz0k2b55G|F)܋S,MQ}-p~!l#H511Qr35R2'n8%D4+hpsb[iE@~]LIČsSDL%C>}d1WY򯬬TMٰtsiAz(8tttyZD[V"^\\߷ 9ެBؓ ?B<22AE[k}(&=y 3K3333/$BR.RS8'j hϋ/JDbppuݶ] 6e l.h 0.GNYz%^:4!0mccS;39ٜ.Eee!͗m~~/_JeΈdAcrLn*+}󩾵מ={ֺnt)v/v:oc3"Nr8 p2YXlVΡZq5>N.2$,e25wj,C/[fNj] D a&]dPHOmKJ]t`Y%ℰSKЭˣ2ΌrE2|.OSFQ,D~R\LkvТ |D>\#OgrDVB GGGP.A$k8{Qt:KY;,C>rXֲ>d&/l}.//۷oxΝ 0+ǹIr@g Deܞ>}vvvڏ?ضk]:{uAىȐdlPf8"9=h{QD]ϟ)Ռ]<DH^֝a0Ȳe_jL z~z=G=ki]2gEŚzooo)4 ,?^R`{md,0ξe< d}}R}B/Yl?uge8S J"Έ lx0޾}u"hH;F AM+[Rgggn:U&1*y?n[gTSR6~+cqf9; uv @jg'̧ sPJIS Q[NB3>dλ^i^Qe un޼>~X[$PR!kvvP0>6011qiQǜ177f٠gkRE*'OE]jٿu:md+?c]Lycc}0 E+D Ɵ E59mgg5g0uuVk}uUGGGǏH0)=zT699Y jAX Y;>>n[[[/@خ_^5I|m}}%c~xx7~BZJ K1Eo,B{nl<(I@9mm^H2 MµkӧO1>zez3G!=kN---!k[[[5tH8>>nϞ=k5ZF7 ͛DzuYW>::dѣmmm>n7\Z,===ݞ|P?tjHz v̆awFsDz9,(,//W0w޽vvvJ :>{?H*a! ғ'!P{VV&t:˶Sޜݻz?19;ݻU6Bd*`!(dj%1thǹR~!Y-,,K0 9M}מ5Ω'SwA3b!k4?c6FR8jUSSSǏmmm"-89Zry#rǯZkMI:ɓ6<ۇr<0P \^^nwޭ LRF֭[f!.>Y> 6??J4;+$SݻOS[XX(=fz`+x駟FMA{a{, H*w0T}μ]XX(n%l\'088޽JC>Jo)" ~0:NJq, fHns]%kPXT !Ҥ}Q]Ω:7ʬR ?ŎK1EV8<}jwmsssmcc{5,ACF63frff~a̶OOmuu KNፁ>==EH.D t+Fɘ?}vwwX,(O?vuuꤾ[F۷o+OؕänfOez :2du(v;;;c=9tK]. tLT "9׮]9mooᅪK1H4mݿBj6#mc(0x]\\ׯ_W\ n۞?^z[^^n U3Edznu(뻏H[YYlmn^xQ-_+p}FFFV߿omii#`ɜ1hr iZKt)V% dӞ(BJ%ErzgV( SwOWd6 aaRQmCnks<^8hw`z?~,/7n(^W&bYψ_Z={Vr9TZC]Us4 __ԟhxPHV9t[Ĭޥy'NgggPpRۻw DzNS&/_l?.8͹I%pL&9Yimm_0|뜪aP F/_?/^[n>TbJ tL8WfwN@/_l7ol>|(.uH-dȇ3}zzZ"$/5$ˤֶ>⫃#I$G6 0Il)1<-w[[[ & 9YPJrraC]>55Gn\^^'ONVVV*3_meeζAtvxxX~fö[F(t??URLMBسɶZ_gz_ԾAijy2i$"NH6n]TZbdirnˢiY"gl"Եkf]u;33Sm,֌}g0!SӂugϞJIYݾ eñz۝;w1$ǏW7AF .g:|ÙR.C `~vs-ᕤg73TP_#;v)jsNE+i'5mcc).qڏW}sOVj7u٢ryyٞ>}?U`y,8W_~677W,m >Og @%2֍c5aﭶB˿KߤuN9;yMfY[[l+E_^`@3ː\ؑIgH3C...jRH fxpp~bVvAƸ<]t:2tJϟ?/e;f)X#[u1?^$,{X t@[ X9E,)Qg al, Ȇ'>Iv۟*)U>d΋/Ƕ˄9N R^]Tf {uziG/v>kKwee={찠JŔ/g@YyEDj%|pp'gRJF1҆_&ƫrUU,b"YUjHuER#˂` c UhF IDAT8;@9!FTuΝ'#VBHʾw)^T/EJ*633cr$믿 Q{nB\|$͹}Dxd'pVb s"kvQf>ni]&b́~TJ|p2#-Sgw޵9*gE􀌨",,,!PEv $)z1}|k9::>|Pڵkmoosjs.sҖ`R] 611QdWcph3>;88޽{קFۚI dOǁ_9J=vUf-4ӧOE>-RW>}?ՊE3Hr9Pyfrr-~yp-&gg%mӟ/Ia [beݲo߾YlԺW)vZۓ+ Iַ$_Id2FrXuaIZjIeYs=Bh{i#V3v ЁYܥ젾5 g~Tϲ96ie5D%uu^AZ˗uDd;=:@``[nKNC?[w\e $$$YBPr:]Ua}uՙݮ4O IzvlG8}ﰇ^ .k8>zj| =(ecƙ~u;*YlllDB9#gP4hŸ?^О3eT~3ٔ[^^PL-f:2݄8߷W^ M*a[wP{HxvqqQYsn1"b_+e @BUjX_S#^WAG[TJZ2yBU&DzNS ү˗r j(F\[[k[lns}m_nիWEP:ߐ޽{;Aj~ɓ'mkkGd߻w83544׿gsvvV%-úyqbԤ@QQ`Ǖ3###HVK6jMX9=~tM>9.ErŶ^*8e4Ql9~Dkd^ 5ESb(R>}Q {?NOORz#ds( "pFCƚӤZߥ 8l5sgR{Akmnn='ިnw.}Lk}|{^†^Leơ'I(RT9)[(9??o^YLgA0G/JU;ύ=f$,*gA3Ip:Ȓs*^-FqNfrޒDk Ƥh5p!Ap*\ A)5A3&ZBqΝ4TID*I.gbY~HНGܻw|ڣ$^t!^j~rjKk xP%Js7&,bd6;66VvERk_^xQB& ԩ[ng.6s>0A/hb!e)](:>HKclNV*z9DQhEasFOBF~Z_N I~A0!狔&#sSÛSP0Ul8M)](xԵnfu5j*WFIkE {Dkkkt1 1}L Gv~\rZE$9)PD81S3ǐ9W))VK2Ihhۭ5+բAD%Ɖj8@8Y}Ow)CE&&&R_GFFD"ؐ9쓬KA~pΝ )qnnpw:!Hg/gOx(G>xhaR&2233S,!jmoo.N`ΑvWIիWNRbN6VJ?~X?*0ޗ$cN~sڎ\fvyzzrA! QB:^_!:c HԢQNj>N@-%{Uj P.l=beZ\l{)d5`˲A9ԜĒ-A`3#Fqʐ)2P9̙`H`#@Y_=PS.>yg[(%D&Lҋ[ٯuSbt@+I05%}k8( n( MأQ&U)(_s||ul}Yt4XClooWνn?n}bxZ3+6#Ix/l%O$\!|@6!\k<Ϟ?!$je&gx||22}Y MQ^l}EdDzjtl'a 8*_YIlt:Nc - l E?>>^ЧC||F1A.a rdCwI#C8{VSX|}`Df0W2e`P;+X' xx@ȳ hȄ&kM|MyzzZ$nuGBp ?x,hQB޽+G܌UsXңNÇNLIPٷ>'mHr'5[p,"FOvzzAnГmssȐw;wZiWWW%&izϤb9:Nkt:; Y%{|``}}i`L{;ۭ~ȍ轧wJ]{65e>00n|:" 'S:9C\3LvÌՑ)|/Ϡ!ԛ,J`,d1d* `duD6I>II䪖BԵ,"x)ֳa\WN@yFNkUlFڟ~CF h-u9p(>!ZqtMRKt8YȖ:{ri{nޮ=h.f@87Ќ|.2XWIFS:ݻW sH. 㒙gN~r;޼y2S@3#+9C8[c z=}H .zB_ëtjҗW2bsySc^ SgC?`.3^HgӧO%i_Q2khR2e9Cu\3(6(Gr<`^pKy g!vAn,ci9mQ$չI"t?0U7rDLI~8?M64Fš3)4~m5U=3@fs4lLّZaDSLbg `Dq)E([1zTQ^d[,vz.Y(%.)͙);9ΰ2ixjgXn7w)looecg~fI6!G)&" 3L[q a}f|333}b&Ah^FM$N+d 94ܖ5Ff|}OX U{}m{{u::N PgڟUuP2Z{)S99cSSSmwwZAS/ P>`pOZko~$QrVz_WDN 1,򲝝?FJmH쀀8?3LܚfwҺn C$Z!ՙwk^>" kWʾ_,3::Z iM?/)Blܽ{7>|PJ`D 0RlGFF 2)i X/+9]d*V[KYm֌s}Fj P$D޲!ǝA̬ƽTN>JV~2Ps2ф賖+nxsjA[b%do`M-EufȌd[__o%l!VB?YբfK%J/mbBmg^ukkslf( G'*ʂ!5٧;wt:%\O uΝzWzax+:ym k_[uhamh F:a/|=p&`_Ը@1RASM9Kqz.H-mjWJ#2aڝ0y& ?)k}AD}ٺ.MdKO" `=pt՜@j[f͛7U~]:Ç2 eo,^0gK{1<*(ګ0r]so?337٧Tt3*Nl5K=Y=YYA2BEjˬ%&a33{~~^H|_I(%yA,7sB -=XN~l8GO΂L%HO/YI8d(٭D~ kSP*BN.JZ܇)pfML4m<+eʉ7(pv @dlt$%3Fa|.GGGA#I}{l ۇxvַ[ْm)VG^]dĚNsr23٤n!8gzK'<xE ,xd2d̊X wL` p4ePp4VA駟*0IC%INt)rO->e.Y 1x prωsd$k^&W0?~d1T@wԐL;20̳=Yq{2OqU/eM w 'pPoO0shL}܃jH{iY/I!#&l;l}A gEf$3x.a#D..3/, (H%rxxX{5)||||ekY`A`q7 ^ JY1$XS ɃD;ylgYvnjmY̾/0xHfDDiX3*R'l׬dd+:tvqLZHl8P% M" td5ԊmqQ1Ldl3xd?IC&! ~ A$ۦrNپqJ.VD68Pߟ/Όg >=AdIoIHcgg`>3x}:>~ئZ;~h1l!Il۷Rz9QN("'>XJ~VYNB+R5p)q,Z[[;PJkd[Prf25CΛc GݻJ='7dO?ݻ2|"$A"BoӐBhu2̾L`se.6f愞1.<#D#k#pvvVQ#4R2dGgW$k,ppS ]}d rv};z}z>[roDD޽{GR!Tri, A~v:{krrY={߿߶˗/Y F nff sNb'9&!JlR+sACF,1<;9P#Q;f\4iƄV_%bDǏmggMNNOV a6~ζ/o r4X)lw]_> "5- ڪ{uxj|޽k5 V֟5Rvmgg/Wθ9RqqqDyR aFzv^JO>moVFE2LjxoWO vԌ={Iv p.PP+f8y$m^sD]0LhZϞ90iy0؞ݻwɓ'mssfugY[ZZjSSSKY qD=!kL=ٺD(H=`f\Λ4~3AhLf>@18bFg: %3G'fpVVVtSdvkADmRGsq2k.#L`KS%@MD0pIRDSwƃGjM\!;g$Xl>nuF{A-ᝓ^g㺅BrQ}~Q%!yO"Ԃ|dk'MNN>e9H$LˀS>Zo9i7AUA;`8 Yj&7댨!#2J.;d `) ݻjAJ.;iCjzv <``&gM"Hga6?Y \sDerЄ?v||FFFP_hrj`Z'OT{X[-d)nJc898ÇBknX0 2$NW6/d }}):99)6%H1dיN`2fgg^}lL2mMMMF՞yA`j} @ejcEUI8D`  GϘX%|\N\__g@f䡒988X=iŪMΐ팎ΞO,#TA:;;C胂eYOͬF&&'p2V7IRB#4х9o߾,Q7f~F1=*l-Nة)!٣: n6Rv@) Lad"B Pѧg3shh9\}j8!Hg y쟠GkǏQ{OhTc3 ԐLI!"pqA@GϡN d:8[pAiB' *}zuS܄wשKbTSOMž[C@/T7UJt%Y%"UH:"F NI26#OW6+;dٗ3t:5S fIUdW湩H(IDKm `F/ C@ uHik ߂2u```)'f?pAjΠ9 ƒR/թ9! % R1)jMiC-..߂3Ѓ%8::Z_]VmA93wIc;<<\qfdZVoV")o[a }#duuʬOg߅g P9 <d~S9PJA"$q 77#TdRxDٛRF/ra zAS 7o*Mb~fft_ X(exwx^pN8mANQ5D,.hwZSZh^,XQ 2zD:S֡^&$a8yjN wKBSL/W3>Zh`Q̓`9|.F) 9SsА^8ܔM)~||\۷o f∈idȯ"w ԩտ T;bΥB͏Lx˶Qp8N鴱sdbδs+s23huo`P|T{UAвB8 yff`:Z^BN&lۭl +[c hU rzz:Rru}gmgg\Hbccc%cD(P8l9ѣoUKA WN +8A/&3"Bʅ.//W$tvݪq˼JRlpX`Ư@܁g7)/3P .{ ԜDu:u޽['eVofOسwgDR3H#666VΌ -)9),,,TѨw{2deζ O+[{n  8K( G @jP|jzZa@ԼFss*ӻj?nQ?qFWF{ Y"XB) F((WH{^zmgg` AAL`[YY }$*1-si%9sH/Ԥ2RJ5 *q_uXSsaajݻ ^q8sJ`s9-YJ|l 2'244T^sG)\$pwxxvr֭< 2]_o*X!Pd%NeaT*-zmk0fA]mmZN vG~o޼CDgRcqNOO+( hl@YeWYc-ǚx> 3"?v~Yhqqr|(zzzk9"1qqqў>}Z)\/؄/}8\ɓ|e9TJjr79 ]V޺uOld,~ێK $59}VVVbwF&@{72} {_@뷗]wpz|M73=;;kC} >$T(>|hN?_ljf/ă>0psfDcgn~P1"J޽{mfftc&W t7kormoo2Fh>HjWSUcA %3^C i6CzppL>kzz$P3TFTK$┶겥-,,A̶!YYYo7gd̑g"5No{{(f4&\E>; A,|(%ۥ=ɀ&[5Y8)=slttTFGGfwPh r p aWF90_~e!fvm CXۅyr8pٰ?s2O>?uRB{vvVWWk58?j!y,d5P%Tʱʼ-Цlnni`[sTT=88>|XWPشrX b*25e* 'RӲirh9<~||yM+svr0s옰ΡA'uppP댨fv1fHYh噚!ŕE?x}[YY{mq`Rv(yG2Md͙Je-Kw:v =΢IUC W|;w<0k-83CZ6pՖxrqqQj-Y!j}Ǐ?.zrm(MH9p)@ $^*0"YfVa / S81Zvww+2gW|7mgg>moo$ mccFA4j썬 SΝ;ŋEƐѫ߾}޿`Bccc503p쓓_`fu 1 j5؞"wimiiRݻd=gDuWw@9S٧Ju@Ɠ/Ap/HC;o߾mkkk}$03TK 'c_zU(>믿.Ra{in3n@Dxglmn{M%Y )"B@d^uOܽ{#{ Rmvvjha.eWr0l!ݹ׽p.%5Tt:[9mllz+s%;^˒TbRPjcc,~΋9WL ?9wSæ+:cрdLD167+D2%5I XTBjPsql,Uϩ?":NkO>_}"O>DwppPm+2NAg:s-X :W˗/ۛ7o`Oll:Eb3p,Z-SqcLáQꣵ2_Ò%*`"wttJmN7~<`DB>|ОBYB2{oeGAB(Xm`aaKu.fP,W";dErde~bBڌK0P[\\ϺskrJDs )9zzzZ49b1V ;??o;0,OvtS# SD<8H?׃t~/`@2痗L79½677lAp[^^)X Z'cw||VWWz'A.ح>8077~駶W_J1~߶݂1iZ)U?!Yj1?C8o? +"9%e5I?OH/YM\joUࠂZ2ugh?==m/ҶJȀ ps 7yyߌkRX[G2qwݙRC3L@~?~fggbRT ,٩9mccFC{nAZı0$A=M!#(I%(%<Ae{y _]_U( RKROY-([yP?GMhu:-TJ[eQB1Rc޹` aF nN_t:mggoqttTg!1eG>|^xQ1 5 as'8wimkk/H.//;whB=jTij9o뵽633S &6]'C"Ag%&.I^" D5))??c'cSK]L0o]vQ4GGGӧO=|/g3'|Ai@.a[6>Ar' }4{*2_:) '/_BO$@16A){z4ݻwﶍ8&bH C`i->}&mNxHbS`EEEV)lIV'Oby3 p~ה v (\oڛ7o@rδu2myyWʐPORս{jڌ GP.JŴS˘] uVZPvrrҾ͛}(ja->@Co/^蓶ĪMplJ'OXHFQ0 &t:>(ڻ[g#ev: AQv8.A2:Ij֒{Z+|9|ߙ?+hvU9krranmmǏ﷝eH\@=gLށ`G)l >A7>2뛁X^i1*2lRr__ʎ DQ~p_d2^WhI)E2?؈Y=d$g5=$eYr"DAס+g܄R܃rqT'Z6mWE,SSSUUhFDzxxاRcjO<8): IDAT.+1>S 5綷0Ԭ9݌]5xj-oVQi9 8$ώ_n۶&Ƹ$z(V:Ǐ Z hvlqA}Lg@155վIx3vJeKh~m{}ڏ{%;ARC*1D( Fd> ޽{mkkfg3n^ݻw|+_04F9 ; FX+ϻDܓ'Oڛ7o9bw:GBİL5Z֟"q~4J B\___zh\]t ^YY){2P~eP䀰wR655վ꫒o% d;>usSPr)4|ΝiA@sC{\'sIEV"219R⸽te2XPf<~epڠ iQ.13<<_|>|vvv F- H2p96s߾}=y&d"%b7fbqxx؆^C7.9&?2kwk###_D1Ƭ >2@a~ÇT(X@Ѐ$I0OOmyy՛,ӓ{uIF8k:dk|-//Ǐv|@G'b,k|M-"֒U,O}Wn>|X,Hf(aAD/5\"U i|YiI@\Hh_wmggjj {3A$>o.]f7_]0/el lݻw۷~ZkmgglAJ~UsC?r<2Y[,@CR~@ӧOmff?s<#\p0Z8KDQ;;;mccu::wݟ6;;۾zUԕa$`5S`] l!vzz^zպno 899)g4톐㶰PH½^+ђᗗmrrTH#]6#@+`|tzzڦ[+|-P؆dG:d`Ocоl~(& D!ŁMfݻw9.[Z׫~alI}I CnAz˗/Q='8^Ws>n/_Y7w0Gjj '(+$@kC0v^ϟW"#vDL)Cp}[eHf(RkzZ1@u9z9ikkkmttzT5Zǝb"SŜ;ϕߌLI *X̓@!"Ό^Z?wv{||VU633Smm̊xsuug}VJLdez666~ÇR`w"Z˰!oKnbbmmm͛vΝ~ XǏm}}O7g:T42ţ{?*-<Z܁n۶kf22(I?p:[l333%% Rݭ֝WK@i )>r4<;mZJ:w r[ /23PsssNMM B6J2TN2|Ҁ"VyZkᆱѣGŋUH>yosW;Ƞ'sQ} b9x"G70 4?gB;z@i19D\YY[nU$3YklNҩvuuUztt-..V+f؃О?^j̠~jҧ~( KSSSmww/#N =333m{{---Uիj2DA)O˗%+i >~l!Pjsssm{{MOOׯΫs`;Ftcc f+;%H3=f˒$@i(8䤲[x84œLYÇ"jQg2^>/#y4*+&AezfАRHP Pc fL'R"OZ>G Q0܈lD dX$=`&A%ȍ.,L"oך'gɖS33"qGfrҕ5 !j@ B`@dzu Ha ?OIK~D+9\`qEA&b-9^>P6cg/.nTl% "/$ u&''N_^"F lPlSs633Ӷu)&h~hSvvvZm?~,}lΝ;mcco_+pCܸ#/mmm[p;Kf>{EUzN$ T蟬]5!:6SE" A}/h1*$YC;KJT J@0^=22SA9a6<',A :F|?v+Z+N<?Y[ϡS2'@m;%L.L?Z`kX[skRl>bUj:ҹ!+莸i<2D[__/NIAp͉CQ#ʂh-Ίyzzo:H\.%pToݺUdD﷩"#r+_ 2|!I %%I̭[سL24a:KȀfRe0/\f %r IePIֵbbbr ՆSE-(˨g}Z1K+E9aEf4Hj%A52)mz0f*h>LmVD7[SrxQyV R|z!3r$ R ')<9.N Rwͬ6`!973afٗynmmڃz*Ÿ' >C mvv2ݬRv&) Wi` SACnF$?6??߮K_VfYqE!(9 (dG؜nӡR1ODH'8T.ɠ` $RJ1#SY]]λKTv!)@DAt988i[H;e"nއm$j[RΤSya3Okdf1 ܻwYqiju'8bRrC-qmm ,kڂ4Gg¦zMd ˞[:g@Zr=-uo8s <<،=çT]yJT|3Ri X׬f/ "p.9afRNU)3ȶLVr1%fȑ Ks2)Es|^a?x`qAZr,e0V2~N9GUKGBmeep-2 Najj4΂A ;R4찐]3{@$,ܔ ݂mw[K.r;<[3!d`O #' 9ׯpd"`^C $Luz/IFvahl+΂`M,CVPZ0LA\YL JzJ}b<Hc=FGGpjVoDY[Nh 8 Ѡ\f/1W01Ѿ& VcXZZjggge3%|F(C9΍ G12s8!La4g 4F9[b4Z˓- 2(G6!Xx ~&ٛioܹSn 0^R|qqZ&@ʱd׻XDP嚻+Sa iTmi>C _'y浧Rg΄nq{&&&*<4+nr aO6B#c !B 2UFGGI=99YCL$dzz2>Q%?_u{E{ XOj2|gg(!w3Z)TIhbb9c'2H{aZө?P`nKlZxP5Sic뜍?g`b!Y^UVZg8U0Yh1*䳰7etmzEE~p'[NNN*ڹϱ]M֞N@o5Qfԓ+;a՜@8N # [}YwN֫'LdYED}2^aN\͠9<)+ FH;=\PU*q̞+ћ+v(CSJ jg)quS8#p@$! ]Ltm/}١0~ `ֲeN@a~ƣb޽[}x gȘS"QPg]0[n;?NBۜR-p|AFLi߿_S/B  dSs{./1#B:Spo9@{ (Xgggڤ~@VjSsddT܀`"{{#J\k5 I. I$"f['ZB!rt2XX"pV:W #IN%8$xrz,bSs0|3{IY489DCbZР/[Vq٪#Kx2GADDH9XdǯO=3e8V]zm"eNgttmnn(cc\Q"22`L$Tٳ٠AwnQyWK'[1Pe`|7#j=H6ySTrrTr@Iz*%ȝl=̽l_ ,W k]pqR{877W# iF̳SVU.H~mk۷4MLL]4()yOwBICbq{]i4Ge(IqGU?eRL02!炏D6\]AFjə%Z/u,3Pj9\ڣGpKJ͈R19. drJ=k{̐1j `M6]D=[$VVVf5- +q@f$QpJnmnn*I+Cmgq_d`D>\lk-KC`oV_MT -yrAa;Ξs/xuj$1^>_ONNZө<ֲ5f-9+IYwqx>b&͛7`;{9۷8>|藱o8-D;@l 󘇆 Im;;;mllOB|B}&3(Ek}u:W-B F7FYիWWLdK:N1˙K)MYO2600P]5 4!]rv$laV IDAT%k|䜫P$!IcONqjZɢ Do6AQߠdΒa)LR}$l]0L햐#&`[ZZ#۲8GPLtr<#ɓ WONF( s@3vSFFϪ (XS@Hq"?NK>dDP =3k9{3" 0ó*1Ԟv *Xj ]sH"hMn"P(gÇ}kCr1)c#嚃)R6пw]tpY^l!H(L MX1TSA^dEr73,;$kpSMg@8hjzxРBG ytJhC )y0;D]S nH? kv""E.:Ari&^&H\͞ Z0yyi/ϒ`1FJphIbO2F9!)KHEO/Z[[+"XC-U8Ep*Ɲ%zw8vPbfě,Z 9GА=(sShoo2ÇEJ/XcH.&~@sA.uU܃x2y`=)=ҩVPcSg04bֻ,Z&rflX&u5*cjU%%&AcΡ!U]J=Ȃ0H?1&X2cjލ̳'ͤ:Z2e_3!`@d c2$'S xiEbݻmJiwoS3,Rfz޽ի9uxxX>̦*%Q52fpd 'ІdNL@qCZө@/zLfffpuR";TVf;T/ØQ.w%CW&$JeU&Lj^\nkk "vE9u1s8VD{z[B0()0ئ12lT#\wDD ;yϞ%Z;D< d#YޥOM}@#Ү2\9$ žO']CCCmii!Q ho*Bk?$Ow)r`(@l^\\^QHe XʹsMGё@K9oro E=>;;knZҜ~>[N}C:󻻻wRG+VB#6T0sҡ;;;mzzO{:Z?*,f]]}߄8)A"S@VK|Q]rWcΥ':uS}dʖ~)qӶ666j* (;r"MqiMIR24I9;׳@B}#Лler \l]9 4IiT`@[YY%[n/88粧[n-OxsF.X{"1;EgV7~ޫmVcq'tCIrX`͛ŀݟ4%5"g3=LV=pYY>'$gom/^F6Y F|Ak@c$+ߞC>y˶d˲=mhhmoo^׶600vww5md[9&Ӏ ,Oe5ɝ`muwÇ}譿v5,7Ep᩿@n/_?|&ҡR F~_fӒ8߷ǏRWSKi=()ɨ@Ao߾zCǙBN";%1è9 kÚ]J9Xwm^ GT6$!DP%9E;d$ɨy8)SʞdNi%aǪLk9Do6Xk}mmf4JRS}WB4G`+ˁ0}QuD5 lRyu{TRFA:@V:9GtmV-ɀ>ށ̉K6<<^xQGb 9P"9/˛b".?Նelj ScG]wɲKqPQAċoHrww]^^.Qv ,٥V>=D!!Zw|{Ç[AdD *~9w42G0 س+ zzC&<5Dف{=s3"rI D|iGs޽VwM}9F$+xSp=gZ,'; fͩF)@rlɤE"%'YN 8eY&Y*16gVT gPWSMG"FNW]51ӌ@"Sc*^7^^չ[ZWLbTgS6ӲEI6"ܹs"F Nd ]K(VЂhs?8Q z^7H;W3U@.d/j9sf6is1I:Y)=~NEΗB"Р- |,9#*_|Yő/}I~OkՑn߾]";dSJhDJ&[)F3}^Wґx4թi6+q#9rj5گZ/K% `; P0qI2xLc"7"t{y;77W;w(T*"UK8-P*j35E}'N4iZCle2QMH7ד=Tr;88(ͨgvڜI) vB|]RA`(8bs%hqy񯆯J#zrrW$D&ɖ'I0ugsCh8 R!@ɩ t%0*offWtvv D0꾩Ad_)@!pSicon޼Թ@s$z < 6 &]NjdP=`XqI8Lʇ>rcc#Yaj'OÇzYҿNQ >R`f|PЊh͛7uzz^lx<*zxH$-aٟ)>D;;;pK0^Nb_}D'%H|=mY؅B\~E;0$5ě1H8(z0Ԇ!KXpiNI24F^|yA:99 >າٵln! kLX ]|5ƚl̇I<[ŁCb EZjy3HE)v,h!y@qFfKQzo0-+@v;wxnA&>9Ҋ؇8!;hA$X<+D[HT<CβY81*!lRv9(&Q9== Jp.CM)>R}lr.aQ# v롞9w|& kj'9>>$ȋ P|N]]]ՃDj4 0uxxr馡B%{tJ|0!:Č'ȥךCu$Qauu&^&DvBZJ<+/@{;u".!ZCMZ^"FVi_!tCupX"8@9s2ZzIJ BNDfX4Tb؉0AS!xϢCan"itd~}wrY^ kDp@+ -MS]~=)D3Qؗ<Ds!|La> Ң@Ddps8 Lqҳ %VwFy{ ycQL#Dy`> {3u"CbxaBiJN泾,uɧ2r wMX ÌιQcx,$A=) (+xHR ɫ"|ɉB;@<'*hx֭[::: @IP 8{"zV)TGfzp|Ib}zQgI {, 'ej 3=U:N*áƁ]r([ŋ̀r( #X1N0첆NKP˗ZYY  2h{`ENЁsB:[,T: Np+G\ZpAh483% j @όL~ Y(az{ֹo$gu@ ;7o^&rnV2d>^@EgfO)!AX,fɈǙ^i~&B "[-3jP#Q8,ϨR2ruvyV#%' #s 2g‡0zﵵ5-..jccCϟ? #xWM]&F#ݾ}[O> Ϗ2B>a,tΝВeG(xo;<Oې ధ`h QA.1+4u=6 90`"2;ωQ 8#/.I88dfOٺ=$0uJOq>р79|(:8)5PRk@:ײ=;;ӽ{txx 42 \CS>٥DA0\vF`:>>VVԮpj@jjw)L !\ < kZz?jE7q/iXn 08g}o#"ObbA g~; N6EE L<n߾V]_N7|3$E)ucc#*gǻHrX޵Z-fy=JAGGGPPU 'lndfU/Yn֋{ Ȃ$">Y $G|ѱ}0\áݻ2"k/^'(r%\^^˗/ЅmXAC5p`2dfqH}DO/s*g(kϨ?2C}%ݺ{}]eݺu+( ʵAemn߾gϞϢ̘zn;wIPF"~$U.s^= guwIq&'%5 7t0Ly}}]BA[Tt`\ `@ vEP '$RT!/A ´ ]Vdjޠ=ߡhBf⣺$;xNt'xC4EtpczeВ$Ύ>}3upp$! *nAp^D8DV!gs]8)ژ^`:2/@ KwQ;|$qx\7 $/@@h=Sb/Bq3`@Za F9#0KK !z'Q1Ԫ] 燳u'ׯ4Xr6!a=#ڮH;k:#A$7C_8災B >/̳sȖ͛7CbA͓8p Qztob1>4c}!"޾sC0:D^|&&M#b#B\lɴ&VE6z/ vX Btd?8I.7;u-5P1 Y'"@n-- v *D΅]fzD]s=k/8r::1vϕBBQ(t]}ᇙD<,*j^c]Ġ톬lg4z=dـzc.',裏B{@k>$&h J#j7^u52T`cHSju5jp7A iFPj?FlD"Q90̞G ejԁ1瓙xAȼ_QP֖Fanz*3 3<_:ဠlD! DÐ"@WA,uMd |2Z vC,̨m؋Uh ^5vw~dZub2i@ JXZ-\.ۛa] $hyh}GSj4|soPXMSXbퟶXiBEN7y\} Y׃ 8OiFEH L .d<d7ofQstA|?NMhN"hէ|a b&Stl\/{pV`ۙMGE:d?bK<^|3:88\.ajBJLeF@&jd$8X 7\җ@}u>% KKK<CF-&"v晱qYl|̎a`ݸq#PryЅ֑k׮4 N  21GQ7nٳg= Ƹ񵋀`;NX#RƐcrGκS e0 N8dLB@`0DS޾|/l9P> 23~_jS{jA@\3؍1L.U]JiхjeőjVUQI3D兒:SKh8:Dbb)xmiURb4P2P5t8h fnU׃A뭝dT${8YXv;,|RJ9^D2 MK t\윚0(ߣ/MSݹsGO ;eו\EF`{py6!g?y[ψiljuYq!;4w6])JujVަ|n޸=n-U.V%Mt2۱J"fOT:[TL;TREtwGUkuxщ}7lxQt;Yڊ:ݮL}:!$8鎎s@K^S2oPJ9|Ύ>LFL=IdpO Dπp\]ދ:=`@zrE(c@&777s4UNOOy/֤\.)g8*W¡7s+F%GX?r RB?=V9(_|++D E[[[O9ukZ]W^e~yYJ'80ŹaxF,^Înu}}1p <8Xlt<[8h4yм+kAb̜Lu=fKMcdLYC^s\(87@Mzyݻ'O~+$08NAA#bN,YI՚&D9+ ]δ2gܽ{w{{G % Fg3*V(h$MDJ%(dD'3:s_QI*@fߋXsX qTT4{F(bar㓆{z>CoYJE 3&X]YSڊ&$#s:>>g Q k)fYw c9A t`:05"{ttR;G 4lo>*u^_@3 A;3zt}666ի0Ƞlff8c/5<78Bϒk#nmmIRFQx?|RwgurOKi!%Y^B2VD8>6ͣ?I9ˍ7;1="אP8_A$GKC9n x/`Y;F lj1a-`,qdc7lNz<&H"&KN׃ .qoIOVWWuG&df('J҉ڧmMtk}Qշ}-ݺ@þtTqQi:$j\h^hc9u;}=|ߋߟmi&! On2_פdDRA8*)**De⨤45^~zOz~5kmu]i2CT t?OR0&D@~{^1*0 sVv^.@e#I)x0"4-vc{{[/_ ] (MaO<6MOٿΤwM@Id_:#H. IbZa2KwDJ 5)6v2K;d2QV$0" dc:[$UCQ&X˺W(A %H'$S K֡] k~02oB2+ƕÁ8< = |Ӑнo328@usW1Ƀ5LyP81>zihQ6.5R2R =g^]ZZҍ752(\,u1^G bA$uD@}eœy:NhC[xjOTSpd\MO~icnXF㢒tq2g %M(.(V4Hg5ƩNϾ'őΐEƩH#I:TYv>ddzql0ΣOώPy{se)΄ ƍ׿tq@d$9NHr]b@BGfZ,`l"b+MSA% vwy'Ӣl6[o_z zi .X+ |HI؏WqܞWsJ٤p@d"u: q1^zE]:>P{k5=jy.!klt^ wyIj~A|Md.e)!%rsoodLL#BBȔYyШb] )y8Fdcؙ5dmT(Od}\7$8JZSVdjB&ܧP=;; :NU܁X0Hp]{gur(G MZdaWVVBĉc予y|<,gN;d<G:G ?Ώ cWWW0`DD(mah p"u:`s!yk;mJDRUKGHOϼR)i0>9dl'}S-Lfjb)Ϝk2xwktfktChϜtB'9iϦ|)JqE*V4<wo}7G+{8Z]VUInqX-!3q6q΂LM&G}0r.&I0P'3[l|||7|S/^`ggGnBϳy꯬[ǡ чFID[[[:88p0(CNOYs'9JiH:>Z?C+D]< Ϡw)Kz!<2|%D _7 CQ^E=HHk{4 sA'j9HAdDlZ6*.P[8Eqgeޣʁ9kG008k[ٳ.C\0#aEz@@ę̬8 )1dh\7=d@kYP1R}rSA/X㖊ŲɅƓ`vٚupPrxFޫ42z>89N3d39I),QWn OT*Ƌ**-h4L[o#ɂK5z3EQAi6c\{f Pc J?!313cV˨a zGP3l(+0q=dn0k h!KgO5Г\fnꪚͦl6Uh42,eN8?@z'B0q6 [ziy^h!@K b ۙZ>9m|@윴=i ^O= zO@( 0 \0lׄ.D3;ۆ8s֙8, ~YFoW&D%SLgӓ{W%a `@a0qHד'O(5ޓ (wԐb^aGaD0Ժp˓b<Vu)? !깭V+8z©[VA=|uT:^+E8IC ?g'OhZ:BIdQ2x20h8 pp 8t!PEٯfnI2k}?i~^N8f͉] vLL_´~e O?~MDJ"M&67a4\=`% ʹ~?zi FB<يt"31%d^F 5W:*DV2UN9]'(Ii(bdk׮Fyڧix Ç:88Ȑk`\3ewރNmߟ׀}|\$)G]8X* 7J!8:'tt5'f>i=5v0EǙxEa8F 2Xċ*0-_a9Cg:*06ѥy&@ќ?LM;iΝS]aj\@>(a[:ݎKHnG&XgW_/7yr$k\h<8٬o4#gq3hupQdϧZl&yD0; {pC=y\=f̳ٿ?ˎhVKN qQqZf펞T_MH7tr|U::: P/{B&n7p"$R=yܰ ̽˗\WGp.(^Q%]]] z]n ع#z8#nMp3nh!x2%Cg\<ӝuM`8::g?Y}k_ A['N#NЎVƆ \BP1 .C΅z:-VY$>uq:gggj4AggEMhL Fxhz4Ld%e&$*2ND{Ȫ9qedrkȅR#]ZZ >݃ђ *pYO`<Ìc5lqhuțߋXF#SGRpii) nbtz˱Bʙ~~J/>*:5@ƓM5٘Sshl+ vTqԟFRMgiteǜro:MhgN8}/J[W_Ҍ#Q=?zHJ480lPyyɟ3񇿯(Q~LËa(M!\KWEPꎺA/:W|ScQ!>dYFIPub  H6 ʈGfyo,A= 0tiiI{{{z!SFR)@hsm_S6̙s?F DɊr*;>m,`S}:32pF)ax( IDAT[X@XB$f͓͛:99 "DL2Vfv,2!?: `y#%Lo"{'r.]lۇE10DqD~Bq>k2WaV&yvL!ZgaZ `s4i#*aNB< T2e&{ ׿84UiX&_NYֳg2ݐyG[i&Cw4d{J*IFD}Z^O/ؿ}gu}{?Xd4IKȘ0ΐ?~0tp]haxz08I&3]M<u~~[n:d8m` i^f1dGzݻ. ggg'dEfcssS(Li XtY`ט'N\׮] hs7hGb0z@E:P$i0aRj^6vd{/]Q)Y\1 k>ҋ7  AZٝb(k ʣAM#횿.ٙxzmP;kv٪lpXZ-d2D1 U&L ?P\x떳^yo^&@A ϘڛNk=ẓ@SǩhR%X˺}-O_-hTdjvvR78|ۈ˱eU W7}=й48 GM!L8OҺʔmk:#tζԃ)k [VY[TXIh|_'G#+z+MFLِՕՌ,* g,'D 8= J2>9@/F6cST y+@W E)PvC}Nw"!l3c$}WU@:<< 1+moo-jہOI<5l7I$ـy5 sc jY)b=c Rd31n{|2[B4tHD|Ɏ!H%1^/j['j&JFbC xz8SPH,gX,fgs}u|wj >gh"dP143TyXad,\+\6(5dFX*X.\)(?@/&@iLը4G8[ǝFF@ߏP|Bjg.i6 ;Vl^cy|4~dőלC#jij{:kbVx*|RR:|/|^5?T¢$Q8M<|2]8">3 91BMHRsxנĉHTek2,dZdDA/c{^/\j{ҚD)R:,;RƆx@CAHp̀~h@j~0Mމ΅999ݻw$/k7 BNsp}Y)#-D!d \-x3+Xtr/..իW/ `9>Nhy6zzfnllyd8M;C r>`cuu5E\[[ kzFގY7aT32i"f٠@s!5@l5j&\;(?Pprzz8u1PGV5Iu?owWoC kFBv\2ZC3΋^D48psK'Rs)4ue`Bd\= 2V`<3}a(G5RF҂`'zM?9RRj{}wuzW\YLI2EmUہOd%خPS]l-ƃ}$,J%5L^ ?Ba·Pr(+3y ¨漕J%moo-F粘Vl ]4rT\8H Ṕey>z2틋<^$O>f 䊀 r#pEYR!h뽆yJonH9D#kT{ov[`qB@-5"Zم]5L}HG']Yڍ8.!FG~8^_I>1Q5B$ M^'G RsXbK~`D⽯$-Ut1hZAo_/tK TQgmEfrq L]R:F=FpTY Ite=ӒujuNҳ]p%:G UϠ( mM5@ŷ{GWtjriAu:]-/T*]{h/}7 J̗@FY)}"({wQ"Ç:< Jd% :}(?^U2$/iq""sf\.8ƙٕJ%3RdR0y YD U j ruh 2 EN"v-" (LQ|> .%!&#CysD r),p)p2}Dڢ_y$+ Źu>UzgQ%(_x6kKT ~N5'g| ҽ ;+əlKrG862N5YbC{#ϡ9lv l ӓ72Bɑt?ݺ~_BeJ+JfN͵߫ժ4`Oد=}h`0Ph4 Ƽ2^\;}.&;P";c+&5 4jY}Q E 氟f3$8ji1YVy6 @~]\\ngN {rA 2f$({GjF-j}|ύ PPG!Q LD8}Ka`aQcAKRX@jlT GEvdžN @B鄇Bv8N~I{ja#օiߥxԠ>jӟVV HgrZ-*o T*P NBVV j66A`j p4r&)(Hb8q`2/M@_ $m`lDlb0zlm}Uݶ·_t^M_q~q! [ƚzݙZZ1P[q8aEeU%N]7B\#dF3Ks9r&qLܝ2*Y \MSu'9ۂ4#mu c=xx[[:|9  Y JY^/$aa7 m !8 T*ݾ}[Ϟ= a/%8u\>y,68ebzB6v7|S|Ap YAlZZZR 13?CU,p_``۱S@ u( * AC-ur]֞ cE)oo8..$;8lx>K3?y:.!7́q fGQKkw~5,MsYhh ׮]ǏCm" e{{;L6Kpƥd^VmOԡ`q5 rJ1WL(wj$ $m<+??7<Ŭ c붡(Wrğl}PBf[6.W}gOsr[`.BRpiN*,ek™,vN <{A՗!$Mx\蓝d#/[.WJ)U*5 a쇯y24 -Φ%DQ#mˊ9Š nvNjsZ+w*Ȁ1gciž2T:O58#b]U <ӥ !{q(` dqdxO}4Ȫ 6 rsPl#^eQjɼ8\0y`dgFb %zOgsu`βvA vKl hnM(?3\ڇG novn<E}"CD܃pi &vEs4k".$h҈9=rSiݻj4ss 3dR&*J8ΔÑ:FvCƁ%b٫WȐ{&pfDd!⑴nOyee%\75:zو>]HG*2̂3Hc!q;oe,ʼnN;'֦^wU3g;%rwÌ2s2=W D0+;??~r.])T*i0bH&bܝ`3?nddv;+CŠb7uۋ"IAbL;E^[nz5,i쑙$CDM'L;l0$c g>ׂ& | )Đ;iRr)Md#51:Xg d@,TA=+D8u oܸNzZz^ {;⁗G&wk =0!_\z3<\YYhs-/W힪T)X~V?_Ts[*dWʌL,8-8a(\M՜s+}.Η\I*:;}ي@$@5|%[LcW@y6u&@^ ܋1ьu\ug:CjZ k{{;|}ݹsG^/ dă P–t)QIS>EJt"lhUq>_\BRyS;JFCD>30}3Q&iV&Tg g|b2B*N q1jD={`}$hoB~욖>,h^<8U{|0ݻ1+څ|9#'G7XڧB3JmYs*3?SqS A$\&?| C]" DQVk)&u(e%$_'3c4SaUv5cN)g¹%]r$q)ɺv }U}8|s.2 d>bQBAjh{?A=--*Up4KLﮏyAbp qd8L/iaqn}>2~8g$ l Ybf=A=N7$LYl-||D+֐@[Fl'zaa'hXC μf{w ԍB,&|25PG|%JI*L> igpXx^sz G5y IDATiJAgg(yRDl-#:h["!c!c9H#^Zn yA%zrI 2XcgK|{p0Pᅒdb)$>MU]rq`BeEL=5pn EtXu3X9y(|VlNw |\OBWg\+68A?ۚ.iPgJ C&~EkVZ i/aPb@ wI #P-cf2STU: W`9Ȯ%Āޞ?A\liGTO&<---ljkkKj5џ^ `ĭhv>H7I^f]lz~-K<+Jl*AV[z2 ԰̐q`*BD="m31",sq~@Mp\G9cz*l6<gC}貏F"Z?&@u  G%@6"8"=45.I =LO21g:??Η: 8NnΧ9[f,*Dogm<1F ڄHێNfGm ,c_:paYĂ^<` Q4̾觿5'~ך̯~s!dmϾ0忟{<'B^6G'zEſuJqWq P,VfZg\m8zxwFx7N-jT*Ӑ)q??˻ypN7o}tNfp~}D\KI|(ҍ7B_EK?A:3W{Tn78rdzЖ iO͗xi g( \_`yˍ a|.3c] HP mݽ{7A v)p\7![6  #6 EA -950Q%1gdԷOȅA!\ʀ4jMn[i4эk_ jiZ-DYqf[y;Ьg98$b8~2Qx.Z+l̐:~<(KN9wy^c3Wܺv$55| Zu)A'3SER_Zb$:i}}#`ȩa8R'[}u &]mmMqgZz#m8.d`[\5İ(iLؑdxT Ѷ_$Mq0?_ZZ !`Jv3\l N |[*J'ɔ>taKTXXXxD8Eb ZuH}, -,@D- w=3GbЄK?ӆWT{odD6.׃u_HIp~%bSZ2Np^2Orkoj$lb4U,t|~{~\|X5gB3ToPF#8 ' x: A:*58ey(I1h[[fHnHg"8[`]bOzK4%> 9hb_EJ#jhA (ryy93)'̇-,YToY挃vOhX| Y54I8oPa7035qؓ$4TPK dR)d qF峖ҝ>mAP'1^s'c:2{[V'̇á4rmY&J5qP?s?ߞTW; &)'l6("'Y{h@:=zc4ϔqYWJ]99ߚ6;䊉Gʴ*k=8WzI]+ {ׂ_4n1E6uPT?HwhqqY{j<+M#ݸq==^۷o*Vr=gӗ0*謭(TqpإL/z\LJmll^ cR쾋q$Ԍ IDӃFٙ>4 >BA_4&-MO^b@@$䅕Gyaia!fA~R`6VFan7vf/Trڣ y`fæ$䲕<(o!KA4$ a-a!KFC>3#&O@?* Z`ё%`]}=mljj%ʺn7Fa<nTRXW~Q[sV"NՂWf"e\TO*b%,+}#lk2UnsΗW 2%zrh^fi6U+XU*]wPL 8M"!WeW=Ј4*7~Vϗ-MTI2E'd6 ;FB#m.iq0ѦPI=‘`k {n_`fH@v]t @PTЈI0qhSIjZ@\OZǏ8υ{! ¹?8'k${@x.hvt'JBhħm\ d! }=IGd ,\XEĵOq0I58[>ogEfE4Ɲ'i5N[nC. *ᇦv'_T <8W.ǙSR,\ڧ hE%XPm'ӅT2fqL5dU9abՍ+X*f(5GL5Uv̫^eZ,(mt#]k_ Kie겙֣00浞Ivgp8pO.gW9HWւtޮ-J3ծJŊJe~6z }\'h$8kW\bdmBފXVttvv;wd6pL#adF#5 @A-F5a"3PN̕J%|D'hҪ:^xljggGNGoV @(ib~1(#_dOQ?duwgj(6c\~$) vN4a67a o&sRbN'5w Zd%p#PI `mݹs'lXX,ީ8%Y>)N *){K&f\uBexH^!0j2cvںu릚$-F}W8| Z̑CH夬Ԣu3M#0U~6|_ri~ e].h_9)}6MJ kAfnzR^-?SΙgӖp@ 29\QSNOڍH;iWkk5CȘ: f?LHr: C}ӟֻ ?02]\˴4Murroj@ЄMջj @F#8sdNƕP_Godf2eןv JN]̔ɾ>@!}@ |.3tEBʳN:(TXZZz@r=TlN7 Yꇀ.=!LFVt8P9p906pX`xPp|>Ăl_ Cްf??wz| `ͦCQ@|\aiU e$ #$Z:$VdЦL,jCLEpjg%ZPp;n8@VÍ&xl|U#Cq>TR.nKJbWpQ+lƄElB"tƶIuKY'@ 677߁CGBH| @im[2. iߥ2} CߚCڙ)m`EK"n>ёr沷 ;@g:w,~ά ` rAs Pb8#}E9`)`^:5K9ACZ ( #F60 43(o߾ ݝ˪]cn Aíj?|l[d0 NP$7npԳb""؁.-Fdr)Qk-?e=(f3sT+,p՞m%f6UggJRr*dg^Vz%)m֑AծWVl?eC&38X3x ̵ ZCjnpvλ{ ^u2*Lz=I.[ :~WH|b$ߛ;;;)w)A1P 5ЎpŚ44H%P;:ƆCP0́E=|P?v JctcXnjl6s o0c 5e*8moo&zktsj`6Fkv a D *!. }_C  H ס~yn aOq,mjz]Ϟ=sO Fx R)-sfqS ";ŷ V+2zES3/k(y k֭0/yz y?דoX(eDTk!R<`Nڟ^04MbSn6*qb2"5[^튕mjPfF-I&л*0CgSi۝3׋ *e]+Y3v)SP)KIB!~'Ms%u/.5=ϷiBkSn+Ȉ1dX)ODwuE"KqFȅB@ 5jխXW)ggg.%`e#]m:PnVЩ"aZ35oJ)"mooͥ)z|G IDATi2;=54!DP;6R*sXY7[&v{  8КPtA  B?[/' Xxz1u.pnf1y=Uf˼9EQ@Q@8t5H{P Q;Cl`۬qAUJٚ[r֢xmܤnaR'677힫P F'G/T _)7dfkWTN֠adUt#R{AIڔ2&?:iyEn_h~WxECZD"a2;k VPlp5i<=b+O{ â8Q`,0(FHRN;&sbC dم%룣-k.TJR6,ZfM L3РZ-wVCR9777ݙ_?8X_(x/>cJ&n_v;^DZ4) y i_k؀9'Je \(\h0 9h?=bPx)\`|?-.(2o&^tBՠ5๠0# iP1'ŎMgBƍ e-6TH`O兪ݧgǣ_UZMz˙*"fPrK25S"=Dij:ʬ>%WEY:,dUWd7#ELq)ne~N9?T/+ ܜLObTxxs.)5NY$b*r4*ka\/(y_^ZH$YX6i E2C^|Ot<~~[js19u.3]Zv=M NTTrU[48nI:Z d8Sp fCfS_P;;;:>>VzWS*^{Ma tRk 2Ţ[D$0-Dj? j쌳kWW79 H  HMFfYۙ 2/ y'::P(cxjA6ơS?G:A;Q\y\hr{l. ?DUpAYv؅/@kex Kj/.t*kwwWv횞<<ΎNOOW/B_dx#W.st[؀\,ء!b(>/K0*hPF gcQ*  #y#?N9^,tV-uw">o>s OXگ1CkKg"V>NhCeQj pt moV>?TOfCAh(^+C?{㔕*Ke1:Z736{օ(dq He 2sh_MNz=ɇ\t4{)P<|?'_|8N4F*E~h$ SG[*5 {|nXh$JƋFt*y{`wwW{tm{͍MmlnTz(,))/keVW gЫ) :3WM/,$;V:)GƲZbt(9wGU~=a+^сnY 9E뜗0iQElZ|sǏo~ӝ/٠-24FPƅ@q.vggGO>ush&l&OA5Z TA8onfsDxV+Ael<5}a0͟A W2/Hn{lGO3)v7-|_f8v;l 5j>^ 4&RQŠf ;J+ҹڢR s=GR:{؍FCݎ'3m(Ӡ-)iOdMa+i95]JYx{RE|9{v$ KcjA^/4+ճOtѹx)I|y(')PX(j:U RƣWT^<_'?Z?P]{ESIfT0hBS4'SSׯiVK/_74]rt wEzRZhLJCN!59+rڮ))]ӏ-NV,hk)MRRIZI&=(XvxmggG=J%YDeө;`XX6F͞U *`<)tv*~3moo8Ir( A-4?gu 42z3g466Q0 Tb4 8Pڮ~Л5Ң6k.,j>Çutt }l[KLA5S(+EdzUtC v)PY : \tƮzAy_oF&i}Uu/ۚz]?ҳK %'3w׉Rt hAU^ZD*3gle]VK2)u[כxd+P&*J?PWZUﲯjb|ӻRj9T\h<\.aAaξ5T3K48VWU>5%/Rr>iggK;zuMݺqSYGIGγ5=3 TQ]EW}1XŌ3>Iͥ}NqqlkJ__OsW71,JZonn KGѥP@pOR0Qy\=l JSٵ PvHecMB:駙P7>#a|gPb·aDn[[[zS8SFhd#xuC3bTzoɉdP4CybWnX)I|HyD!Eɇ +H8pnݺdHqyz cY|07vHl`^&>p%,:Y)Qv9[uZstRXS;~/}׾.;C%ӼWU 7EyQ(/ U+T)__+$V\d4URS>*c) KJDŰ4RX5fcCR, t|trbXѰ?RXp0Q/Zn*%9%Q /ΫQmi:NU<{9]v{z@>x5լmikcw> aS2MCNѹZO bGZe'ª V^Y{yu'򅼎z_~oo}WbYTع Q@'6R8= MHCdq榆á[SH ]^^Aj (ƹ.-ѲDm/h$8YA" `cs1A:;;s@ x4bȘ/&8_aj&;4Cө39a5gv TأlW\[&e98<\b|^/ %{@ @cg6JFL>.eR{XtӧOŔ"mE^y8Z6Yzgb\RV4$а6[TrPnl B6(IWo{Z dZFf>Vrͤ{R{o=Wo|MoD$WQ1ߐUj#O9xrAA_P^+,_^o(b C[DZ?ew\E‚4L5ETT>W{:?8$eiiA4ܜpÚ .YjlQkZK]l@5P%/l(B'~Bql_$:>>v1q97;4C~_YV]X;G:1}AcGiz=WAM<Ϝ,P х =hZh<; 5Y:yOs3TJܬS՚B(̸Wy֑igLFP.m&%ߓƣЯO5JR-~YT[_H4T5^4eV6rV֖Ĺaه#!_yLI0,:bXh4g*+Fj6 TƎ'žNz~WP{׶~9Ytܰړf#aɋl-u23k$*JQbgrrr6I(P|/7HL(BSovPΎ0TvVgT"T>vjk777ꫯ\.?x<֖cJtyE ) ,yf߿]+b: z>v.nf9wA6h:gJu.hnbP a fR@}c͇jF4ŚCϟ;TN@6/AsgcL/ve|s^zA)po7u=~٠_f* 弊 AM尮|8RTTEfsC|w`gGE]89I3vwkkLWPp5͛:?l(bez}ݼ~KL.8}_ou{u/.Erm6üy.z؆pQLE*FR mƪkLԡXES$:]K/`)͛z뭷uqtlITғ'OƤ G:Plgt@|48X%@rT*fN!P7(˯CerrCRmẃHԵ3p<,mgf# >2*4Mw `Aj :7+f8==uukڢH98#Ò@bCB0eRن淳F:jnzj4꺸_a[)/3z/^}5KyɆ/E;X ^Z'l|xC`%Ї>Ǯ}ݻwOGGGb. soo/%rpbt`0%Y/ШAq ;^Tu16j5Fk|3uugDݤ 9CG|e#Ftp܈x Uѝ.3^nݺT$:YiSYFڎC 7(|Jo=hNĮ J|Rd.cRp _}L/~S|LԔ*r^U|SRWfHZSrYQE . 肱 7VQZx|fW# hh#C Izz6Sϻ|hh6_FBU*$5[hkkCfEI;¢ ADd%x"3]0iMc68YNr@,+Q<]3M'굆: vqx߰Xk-t?;;SXtMrfy$AXJ,M8^>rPSS V-э7GXT*~ˡx~z=ݻw/W _Vh%n 쁭3A.{F؁ TNܪp`ۋu])nLAycL0; Ċ mgt16o*u$kYVs<T~6u~HŠ`%#-3f4O\^1۶>O5M+x:OhX#~2R}ODä%+ނ^E Ƞ]klU ]w #}˿?GuyQ(͊[*{幰lݮ5z}#Y٠xhL"M*s\2OY?c7|SF46a{ƀ {D +J'+JDihX*5Nx*9]O[X_ slġb^ẂWq2EP[teqg^i7U)4Lu祗{K/iߝD߷ AE1֖;lh35J@x$@ژ?gggl>==ukϢiA.lh0c={LQAeIc~M ȸwqqj"r`y? +E_.C.u(7QDٙS`Be 'Gͼؚ~%f 4Jv ;o$N1h%90XQ8 _kSfݣ}fajwwqP46b8:At:Nmj*ρΌ&K*.a R,L!F\N*C;'YmYkr|ӊht/ieȭ?%2~yXɴWee S eò xX"P,|p0pr &i69,Iݹs'4 gMYT0aaqz{Pֹ'i&ŽEâәHI$~APqT(=R=|[͍Z[EQ9)uikep16z1#ke)SaA}lc%(,) W^q!hq0Dz:M[:99vlkjܹPUSQs}'|>|?"ւX‚ PNQPh#;lZ8kHM(cSZnpV\q)̣] /B ) 9TEb6(Q$̾#}aK! PD|ˈ mSԐs66 uAeCB A 2rXp4t~~xׯt kAᷢ,(up<'> :R^3*[f"zC %_@sr]!2 ,NeVql$ƌ##J̀Meu{qxXToHQQjT5M)//4D"73su39[:dmXYa7ؼWf\4!h>96776NSV0Ps j(EpDNgfj6RTX(i4J{\Gh{|N[_] ҕUEh׮eUSx:Ei{~qP6C2SrMT^x4 @Bwq|NNN~VO>uk#cBޖ/ SV~_w|3TV 1dǷ*I99-n۵EܦdPqo~tyW>WLC * sչed&U[>A0 >ތ64s̬и(4OPѬq=` :XJhg~ժvwc۽} 5eOFS\~Q}Êr~^]EHQ+:=;SkFutn f K_|^\4aj;{x6~Wsz'z=M&S8ӄET00/!d2q#:#A3c )nܸvK|n޼^XF8˚@2pb|q~~ԸAgs3n\_F#V*k{{;UA6"-)ư6ǬGؗϓ]nt:sp yKAcFBUsS[C|@Pլ7QP'[\.;케 C4 xzIQ6ǑY. o9p8KьX׮]sϰ9fjJ#/v]ҊD0B?S K`kFlpbUZ:YWLӅxYcӅ2!ghU(۴p!DZoxqIb0 ⽋ za{Gcs]M&7 ƍH ce`]=߽{, C&kaV}5 BBIJ=`3` jT,͝.**:owT*Ux9%|~7{~RfƫEWIF }]gvf+Z ~@~_ Z#°`_\3=Pƒ@/h_{9G|UX3={@Kv:99qkH-VUVX4 &/ C7Ŋq5a605/6M96Hw2ݻ njkfM>y]~祮=}I v́v C}OˡvłY+b(,M3N~5 C8AŚ5Uihv m^vͽ7Q4MldVDZ ͩdU^8dXiU tJĹA3Yظc׈=~ ϟ)&fjW_}5;d|HROOO]9 -%+ZZfQs]StG93d2ѓ'O-9_iR~4x:yZ@b098I0Y(2zJO4JQnMb|8Nt8h"P&Pt,#g`_b0QtƬ!qr#@!n6KS؅`{T({ˬAoЍ*UCϫ3{Jg-+W-ת-5:Yn^Ijx_XR½wmm46T K 񞞞jggG)%Fu!œќ;(2rv11{]Bw:D!EܘЋȍSHyr4zutt 8==u by l:<,TnscAd27YB,/ 74t,7#\x0F\%?FQ[n+$ lSAd@mJ " !t݃fNLah4c7`gvǓDI)_ȩP|›)^K7szr:_$HZIHad.@@wNgCr梩np&lݼ@ش#GbZGѠ=| R)N|ءi0.hP 6E^f\n}I~ik766: {+]v2:B=vf&Xn8owZAyÍ %bM`x[Zmg1Z"0\4N)LV8hIuL6֭[jێ@5-! VwT,45NԨ75F纒$uc} H7*M]kGWz› npnYlxJ$ĒHA>6Wɡ6- &{9YyU0&EQ_cyhvmkkˡ~W_}U}ё|zz|39=؊SqN%3h={K0C/ FXE"'[x4CIS7677=}ϵaGLAx" o΃Ѝ˦ 2K` hS =[cen.۷ItfCz=@L1ݼyQ<lPJ%jww7R 6j`:yѽ2&`>nwF E_i[_{*mJ kyĺV-8AFzW+:[)EO/nCN^hڷus 彚~EbCnh8{ѩ+\ ƁΟϣVɵh{Nݮq%@sf /ngCCysf^ףU3a5u-: (9Aì7M%qB!ԍ754OMUM~^u᮹*J/Ά'$+]Qx›MbeYJk35w[Oտi4 >ڠ'-(;*m˜&D#[ۥVt:zݵo#YHJť2Qpy|^'U:EK<==ޞh6s8! Eqeo{aA+`W)4V,\rZX0'̢h:*j7ljBte΂+{+kF9E9[QWj^[x -Y_,ǝuwGti2i6tٻt:/ 'O`)wvvd)qk.u5ϓ gElsQŞ2///ʺmmmm]v׮յZ (3V}k>y݌ arOvnN| ޱ%A# E]u떻a ^˵rk-o/M@uP'''Z:2o2O*:p)$`@p\ld"  aùܹC5Qfq[_֖qH>vAι*~6{+~Vhig ^X;[eFnle7~Br8*kPTR46ZC RvOg0;Hz*l*KPbs,'2KχW 1ɚJXG%FI`#;+zz<귾'eIY¦h+a %'@æ`/zrrST\#4n h!t-n qҨ#_P>Es@" M'  *;(׬Eijl59g2w-u4 DnCzВx=zZuH|i !$SxZxKE㹾(zIy=Q4@m=ڠIjffJe?l .Vl@ ׶5a.nӧO \a|G/ Y*t-]!FJ+"nG~0oU`)l}x*FM7okڹW?0\ArS|DRP  m A[s gWΚl8rwT(*lP5$~9&P}4,]/z饗JGfA^Z*?Hi?]AJL2+Ac{WP gA]X n%f~a(EE4tŚi,8qRtժfezkJcFo 6CE˶\o}Ф]w,0ձ qooZ*0 Xy5!t>hRP/8(a7 °^Rh*%R0g./&:>:W^t&h!#lv&`j^K5 /]{a|n5Nz*&Z 'tcmZNOOݵ+84H#ǶAel N2_t3*Q_asmllFQ/?-듓mllh#:eJfsgH* RV㱂z:?!x(RPּ72 fЩ+Ljnܸ%| b8@谡$8LA.n9DŃxנ]K&' 3tk^o_\\s9 =ŚkɼBy3Z)d.b3Ɠ/DB,6HNc]$›}=?TfEK 5rE{y2G󅡡iauoQnܸV@@zv†sKA( E&Ҧx ̊ M!n:qkospބY hN#I}D4wyͦ R}c]t;`Å8|rѵZ3;N#aWHdT"Zt0+֒A֊egbi4)r[&B= 9Z;?)&{{{.j9@b^Vurr4O>]aINOON;>6֏" ^[̈ƦknM\===Urvvvbt4EM0)J܇8-M!fXm4;w\cT*msZ}?<RC@vԿVhDOgRV*J.CYJ|8޽{.C}M*jaY#]sxAAC0*źȈC?$PRdzV+FJ7BV9n ;Ye֗ ӫ3ʪ]Q~%?U.?hT{DbN(U9M`_Fj5}ᇩZ;t+{^{Mocn߿S7Ga .Hzc!! FE,UGZNOOBcҚWDfBh+:L'"Osf͎_l=JO VE:ڵkNFl ]V5ONP|Q!i4.U(`buu &NRXg}*n`46>C Ί\9Jr^BzI~aW\olP&һb>)j:vK 4[[Q5ҷ~=ʟUSU㾧jiCa~fc~ܸqCN5jZͭO=mj !ܿ_@u߱fu|74uP^4 BbȄUk$I [ռmi<=ć) /iK#0rEa!EB/0?JDVq57Ut㕢]IfxSYkTR2oN_S]jֶEÒm g "+sv˄7:\y@!86g(T"kjێ@Z{ '{|jF;~!` ,5OQyAXWϙ|~~:F nw񱤛˜Enń℺ꍡcA7LNvNv芬ٽ5'MYZI H$>A\4|C2 (o~{q|d׏+}Sb42YVzU!,kZN9Ch,*6l2wXwR)/*+TTl)| #yZf2kHqW|/t-1Vcpc ౠiAqCCY >s8:wY6M>Av-l` .:3e?4 Y56FCggg;x?Q2* 戄0ZGCC3t85M)ggj] UJ5EWS $:Ng~k͌MCr8Ntt^I}&*Bu/3B |$8CùDC-m:jb2t+Hċܝ4<  ~"l.%=lWMyIs} *F5n=y (i(x?yaE_8xs\o3c\ZNRy(>h\KZBgGۦ.щ C=x@~_NG[[[wɅC Ccȳ,|?dʬԫ]=z`?ʀ /Xgz&d& Fs35` htUIb{=\o(w>;[P @)*"n7XOT;FL\jqrGyKAE{PNf}@z[?o7JgMj68PrKF %ȧʙCXu:\ + ^0~'*Vv>1b8=Bߚ6>E oZ/.|L!sGA[,}  fYWB1TJuF_6T*IpC9PME7Kz:,, i[jt-+CrJp*{!^/(0:? S#CF#j@MT|h+hX繹7ISODV#7#=<9~}*8]y!cs#T8d@< f ֥mQ:t0&黿ml66noMڙKRz87%|CŰ{W,8 WT iCR[uv&Q;[ `V\nuO0jV.s/#7SClABsMMOLet g/%(IcP3OaDoV }9?D0-0S pJ6zri>]+t|VS z}Q";9qU~u/IQۿ_kmO7VJPJ&1SU ohTCH8$'TM"ӓ* `s0Nl}PվDZi1d#驉(4orhb``'gO+@/ߢj;G@^XAUD/KU3Nm(A z7-Pxy޼Pr8,zԄTc/ HT8 z4EU=][V~"2oZzf ک˙BBIOԣ=*!35==Qq*GaSԟKƁx([簡xM̭S~Aj tK @v0< A LrGG5FÉ#՚K$'nn%f ?lR70qض@]JmJŊas[E.KKb'fn^ⵌaw }^}ZZ~owygއ'5M}A` cAa@[1J;3ܟ$IJ\T)BT-HozA-!Ш5rz7@#5#:m92i~̈#e$ ʓ׸c*DT=XVM Wz}Sv^ooc=ET?@w zRW9j++ E**9G*](^`N1asHؠURHI[u ] 3 8e[4l6P;fKs $@ VWs2 [Yo$Ct♳w'x-Б (%yIZM:VTVZRZPfo"lQ̆ڕw3tK_x;DK-k}wL$9oi o'WRp"v:<<40F+b[{l~+$nnnTVK3R$* lޗ;o(i^"8w6-Oƭ] asW|OĘ\.Epɛ"GqǺ(ə? Ch4,QMsּ- 6%AT׃گj L,*;ޕ`x$pO^TNIOcE~Y4=rrR%Pkl-8ߚ;ˌP~Y2V߯5T-uTTCJ[BMJMciQCc籹O@p0,,9w$jOCdgGjEx3gbO_1oOzםtj{S|ag,(;#wٳg|I~4|@*MR+4Wln΀&vs*=ZiV^%rPUzhl]B|y6;)˶u^2#~)M3øg$ZLoF߈UXXwjL={?\.WWpMA$)x .Botcb'Ƥ_w|ѾNAI &BH8m6sqC* zooN0!@Hx _1,A\r$^N[^OEE3``45=}d Q?gVӻwl)R7f~mМRX  Pi*EP&h8Wj#z9㤫hӽ]Ю4 @17&x"8jPUZ?Zv8n6C8dawcf$%A[ʕd > d("cr`8{ rNc;9nWWWWá%f[bAQ SCwF=>}ÜqɼWhA!$ UEΣ\~h. xb) mtLd7w{{kG4Ɓ#(zFC @SQ 7ka*ko.jjB~SX51tCnm } *Vqƌ72V|=2@\W55J֑T(&!Vz|ެhR%0Q$1nh4-'P$5zK^8+[uԸW șFX,H Dz~~nw6 (7Z1F+ƳV|/hL0l^3 Fz li)^%Zm:=v}l/Iʭ<}슕팫OQO%^fs-jWRNU.W$(n9k"e4R}8ױPt~5L:<<7e`0P3~i8FwwwVoqcXeۈ}q#ٓ+`Iqc?XWP{dȼo-:AR~0$ O1'_ؙ仄6e{HÛCGcb0:^T urQPDQUD[z9Se 2\8zc?T2V*)>wu]QZWRJjP(Sfl\ggg2DbHq t1# XP6sLTϞ=3H&GzP+>gtUn++` OQTBE+J"Ɗ~%7*99A1@!_Z"0T&suUE.|Sz}vw<͙s.f'^3NS-j׺]hL-^ڼx<"6nvΰWz(~NNN4$n?n~Ơ4|FDUuxxh P(D@T|[sqڞɰ #k:{+Fmi)ңJSÞk?<<4;H|w1_9S{ s ȼyނ ZK>\pBM/J:::" %My  A@bQGGG֯-„`yOZc.AN`4VSRBlR#VSv 1%\W{'`3RI@ki*K2C Ra0XZvHz=S##;~Tfmat+0OnWZM6_a[E qi08 u5 ۢĴp8Yb(fsnDi^C [#HQ^.t0Lj0@TV*_ 6v(i#HUy\ж./xrL?ʗM!q{E Hpg8|RzUB:zbPK"* >jObe ݄(;REdϘ? MEUAIh{ oB"@tXrIEl#~ -lm}j8 C*A zV[/ O~b\>| "o+Y^phݝy FBK$qErT$;rrݽοm8gIWOP̹Γh7089riU4?zV2b%6DN/ϟ[იo#1D[qnל<4r/N{vzzj-3 C kc[V $Zi3~؈+HnV8/g3Mz~69@EQu:~y o/a%@߁Q[CRҋe\־ۣ'w2@E4o)HgbNG(4X,8 =y.c[6UVrsW}I qUCA6qY4˔i#zWlFO%ݏᲦRP.>rVն b. ;J*3ȓq>3Щ^[@"{Ibq#AlI&AS(}Qghg%PBң͢`P"8j%h` i4o!?;t?I&&iXn)MT(&NDU8{?tw4d2v)NTӶq2( R\џx4 &Ruی"=-EZtP F#M&bZzm/ޡgmu%' < Ottuuew36>q໻;喂4 }¤m¹S/h]oy j!b}.:'!3!X$3 AáѼ IBZNT Tղ$*KMG FHHIүڌ;zBϗ qZmL?$HQlBBo A:\|?(g֡WK\DTԭu8dM@Nbv&5UmMj5vhQHRph.@v7tRt:9av6{ :)b<2TwE'/`|ob|{LN?s 5hA|Ŗ~v17]AGҝZ|85NիB|w.鲝T{ϣvtxF9Kû=*x8Sp8% -BL(~ɊDݮؙNRw{{k}U Ÿ\d#g3٠=w{{tSܘvƻ}1^ "!Sԃ<2j/p@inEXT8 T 4 jڂY;BGtIB,A.Ћ@d/Nb!a' +̒{(wğ!7 ,450za,]77^ X,Z^ #b + N+"G_ף\^>̖JnFzjdUO<< F)-w3 <>>x87]̪ddb4Hm0he(FϘQs@ v9&9-ӃVej="R P|;!& Ãa||m{}rrbhf} QQJZz/mrL$'KH7-V'SI&Jv(^%9Wtw_El٤ 8&ڝÁnPɉ$]ٴiuݜ59x6 *[PRI>}"QKao|N@ހgG(U, Yo6h8,_񳡗0??πq >ӏ)nb̹$h^:aB)Ǘ ^LDcL95,^CӫPk׃F \BA[P 0atTw:>fٙ)Q4"PPۑAF+|jFg5^f@*1?]fS-X Kx7^traA|A_$S{<1.y1W`r)A! cAۆ`?nTr@y^($Md08 Vgg9B{Ö&ą~Qhғ3=߼yk ft{b<ſP13 `RчLTI$rI,AaDPI# cQji2gDC@@P RMZ}MAx{5svSjI/YǨض-)m2v=cSS+b?URGaRUT.U$ek ]NzTyvHjTEz?|KmBI`‘PQ6Mz=3wDŽOAax,~ 3l)GMS}z(DQ͸ IsD_Іޛđb_} fwVfKRM ˩^׌-[p IWO$]|oh7gǑC[Vdj~iLJB8~+ld90O0 q'(8Ȋk^__|= @wl3>>>)ayu=}. 9 sR{ I9e) OY14NS^⺄X9 F<'m}o '9p_H/ R$WMAĽ"0 ݨSdtbXzVTÖ]`(bRč ҍQz3x\EUշQvZTGA9 I>1h=DI L< T}~(ݛS[@]z L%d21w#JpEG@y/jU6'*UJJZT s5~SySe;GsFX3DT_F[6Ju?Z_ Zjj0ST6jH FgU޻z] ޔwogψ(7jAqLRbD[ 0a^8<>"f+}u/!8yƘ"w /y>y#_=r%(R(*HJBr֧ίy^%I7 62ituܿiR BqCFJM?AQnkǏ xC$$/t4*noo-cSݻ\!`Gonn,!2GP2 ]F;-P GD9a_iP,0OfT#(3qMT2zҠpD{#nF).>.U|AT PspF/; K`BEphg c0A J q{F=ȩx8Yho#U]gx'ذE Ө^yߥΫ'q2N'z.;5N?δQj>j(MJb yύ…dHM.l~m>'Ԧ=@}"q[Qie-sx.3IŹ*ftUD@"Qo!E+4Q#$1/#0ޢ_{ ez=k9 QlsWp$VL}FI4y(_t]z "Yx7P 5tיj*wqۀ-Kg~v,hc5nrNǜ>}wB7+I - Ϙ$(wPHq~ip7$]:vƠ0 k>7^ /  K^![9r$qf票Z ?HA{_znk "u@lF"B+0b{PPz9"͛7FAs #AIAbٙnnnWGleb&l5S{eUǪ6B׮RNw(8p+QL1g=EKqz rѻ{`P%-KCo8Cme&Hj3u&$ 96gxQ)4iE:;;{~}{U$^Fy|`F% ^~lV3F;B/ ^BwH nhn(c] ]]]Y•DyjZ*WZWڤ)B'/ uͷ?V/g$]7,l>anF8ScJEQ~E\s~liLߢ(o~aMT &b*Q JeZ2&&hQsƹ07h?I]]]YAF nk45~؇āX@^* |aΑ8!5Qm0Y.C oh\цUTmӴl65ϭM]j 3E%HB1cQAƃ;}"RD5lPִljZjT UkIHF)[uP1Q!{js&5TfF$T7U,Rq"`IqClA IHK[.!EȠQw]׺B8&/PPv|R<朰2AGwcj@A;3<+ 'A[~u HZo? r7^8Gpe*_@BARDk7SUjQfP.ɨἵ%]'(fGo~iIN%^8 4T<`VbJjcz``=KZ|?,W5yɉKz7dblL|f̽ dT݅f} x{PC`?B@}A MdLp.I;V̡AB

TrƣϣbVSdd:j5:fIz2^6%'hcB:9zʯ "0 ,!і (`:'y~>ϊ5QXAR7776ZGUл,i0nBUlDO)ά~1taV6( 8y6?1 p}}mGs[=RUU4ّ&{[톤AY2 wzE##]{!sRnf4jոxz%%d253߽<SP,mA o #"x-d ZgN٤El6kY,dGtzzy;=Fٴ+JP\C˥dh42o0݄ %eEo«S!_D/XvF˒BP`XI~1/`) ~$v2@^拹xF*Ek5e3s%lKklئ/$_q`VTn":e<甯TQ$j?kE?(} E2Fb Ÿ}g+=ᗌ3he@2#xZ͘L `,Pټ{T-*}s@{a̷:BSh}1$ Kuww[_8,{.ϭ0+JJҍ‚ֽN.e}>ve9>Mw+REaYaX|0+Dc4X,Z1x{{wVp5CJbxzd21~ݝN1"Oh45دf3}V$___ϹǡlNOڕBGGG|>pv0(VT^Ie1Z̈';+/HVP!ށ=-&I ;ȇjWTTlxOޑ`ǗPu7!qw##P4]z 3rZ/U(JRX$K~{4VnQuٿ2K :W1Q1m+^Fj7{(nG)YFwPz s CPEۃGļ1U%t'WeBAP:(<2Q efA$w~'ƈl:.hLO{e)7Ά*$qn (3!ӧj6̔&&]*Nf:>/*>FR/ꤛ#%]e߽fT5'z$Z-Wq X,E}Ľ ;Vf3KT^Ɛ0=453C螞27o ('si'è?|`5RcAԃ.r=jS٤]HIlVp@\(rV􇠭I6p~mɫ'K"IycT>YcNʤSq?M1Z^my\l6f~@QAo'],ڤK7 Uin9`ԓS#gA\O=_Bw*,jTN z<{*K?J<==5&S}SKOQmv0v$4MsI.-. Pǥ8"*{i/¢DZRd0JTW۳nZh7E "λ; W5𳦠m@{bBMޮsˠT,FJtzwj(=+pMR&y&DNQ}P8PF:hhcx&<3hZF~o@<,I Ql٨Yi>%GAv[777pJπV X>Oy@_ E[6 pɣ0Y(]wV⼡@1 '(Jb'=!E_+b}1ϟ?en=վrYWWW&sy yZUq$Ywն_Bϙg ?Oɹ$yn]X*owoȓA:C]\\Ǐ6K @3jb1rTj^-y@mI5k˝zb:i=IyMIFWӇёѾ,VƙX,X gYA"$իW) av j5 ;`/xbVbȢYMBZ `D zbU>T*e=`/@ ֻ0,éPHI>$? ^)/.f|y$B#hzGx$ʬ$Kġ$cI6J9?7,@^spıB bK[BTUlЩ9P)G+ b} '?peMyzO+ijZj*M 2oчr'd@ ramh_( ? !PpZ?qףA`xf޼yT>B</{Ę{ڂ}Q]` :ERH^F9$gǏ6fio4$.woB8DrALAyrfPS,4/[KM I7}L1{*-wkݮ5\\DVTUlnwkIZ@F sS3 IDATO1* ݥgϞe $qĀa$ĦE\GGGvr@F$gԦJ+8aHQo~|偁Ҩ*@gq4g\q2ۄ)!ŢNNN4 5f t<1zT* W:m4=mf4D]'''FP>@zj>B#6zkPXT( 5N* jNvyP`4h r/'Lf66$qOh=-^L]n,Tϟ?*HAZ^ >= D]@|Gg;0[F&1^k2~%g#|Wzk@DyT~>{Cg7lU{ b#"Z#@B4ٚ. Zpg/˙՞IV`o׉}!wsI7Fj1O45]BW溻Yj2^k1FvT)i>]sp8W(| su $ηaeĦZQkMS CKD¦݌ ΒY@e4i:H G^n|NS:R_e8aWb v80q+*oOR"28l h 6}~'~HT\~"< FH@Os!m^< % %{LӨs3xI\)+F *:xX ?euӌ/%}:pa{б_E.!bI,f-r .NZէOrl~ N&;y&WDTo$6Hа^BD~A/WxE53~!~qPP3ΏZ6^6P*׼>Na 2RdT(T \y@o޼@[F<oH]癭mUk-G0G+k/>FJs,ALjq|+?u'ۍ.u%PvjͲz4 T)We،iq&Qݣ#i$Ad#P8z={Цp;88ޯQFc )JK]ⓓ]\\?#+>8[Pa|3\.c@!3ZbMl1%kߠPIҨ:&$MG4٩=ƥVSAV+|4 { w}dQ 2PFFi~}LJjf$Z @? 4 q$ H@+^W*ji6+@TR<0.߯Ju蝌Yru|? ti}l|߄?_k6$*Z< >IfѪ s=cr:'B*k5zNZ-6L8m=u/;|ǺKiQ>,gfOKgn'E :eիWH\XT؜I }o,(Y&130{36XpEBOk<K-qu:F' a2(Z ׯ-Cc@h|v/VZ(txfx"GQrl8^)JIRRYrxZ9/R&Z.Mֺ5YasKMc-d>j?l?+ K -EAY㩪(z޿orrD p/0 |ZvJD@7X_)ҶX, ){} 뛛;$Ab^:l6zxx8TznČ P4͏o1@aTXTT( > N] BsyC0GPx.YGg WE!HǨ0|$ȗ P,h:W[u$w-*N3y>JO=ǣM~@~7W|V/F(*X;jӝ ӹP. DP/8e ch#4fG.)N~χjFijk;+$&@ɡc8_}YBDzy \fhlo@bxE@2fxЁ9ga1Qt1Lы:Rl0WbrJgnJ\UjCXDk<\jtOs]ith$jfd+k uU  s6r~/foSQ"hЭ®+k>[ kf65¹]һ%V+,ҶqnݨkZT{V&&"0PqxblJZ-QHPzB-,Ե"UYUņsy؞E>EoFcfT\/F D͓ 'ʶR)4/KXFL9t;m@GZEQQacTS9`cL % Q%Av]S6  N.t;8`^*t)ˋVQ5 jU~}!&m իWF2}L;_@sKO50q A۳FC?.ғg9>>qqq|xlxQDDrxr~0TZ6׺4Zzh7K=Vmd'~W,iL5,\,M@C3E-SX,znnnh4tsscXNG,~ʟàuBKC~MQuw]}#1v-Ƃs0~<۞ZZ~'a @[,ېܼ׳y.7XF^~ I`H/NIR9AǏMEЃ¥M<*jG)^#pL&u@坎.J3SUn1rFdi:3m:tMAEZ}"yu1JyGeT~ovjj[,BZ-[)mFx @x\|)=*ĆH_֧OrTɽ^daRH'L8Il'Lwc$ʦhzML ՉPWX"53Ǐ9kZ\.ij.DSn\-t\gYnh$*DE=܄Z/INCh-1mvƜ Pye3 Ď[KZ0$~Ćnۙ9cA>|왱6S}00hz왮MYH S,ac{+FaxGGۈůJRh4Rp}RY{g+t+;_ * :!}\/`K~f҂Jv"w-tAo*FI NʼnjjkZ $@fI@V%ITINe{܀{$x]x^Q)Vmi:j6Yqh`fnǛsYOm(L7.hL~'g " 1"C 1@ż(3Ѐ ${=j0L߿7B`ڰX$xl,*!;ǀz(I؊8֢x/;Qb1Xq|hgpu@%uZ= Cu:&FFv{{k o£(`'M֓@ ??ڛ!, j}zPfrizy2琇[HVuUwգFK4l2 Yo ? _Z0lȀU]s"3##/8d5^Y$ϒ'yy)|HpGtvQcDz7旉#?$dJAL42C@"Oloa#  X^ MTT ZMz+Ȃ+U*?-j!#egȋ?S0' k%8\vU#*[7*#w]y`xTz;1M;'KS%J&Y$*cHv 7M$/M%Jݷu$MEm ^EMgv/pCkV3@mAge qwrt:u-H$YurȩI;ߛt . P/[(/˽n<WӁ/oA(ݮok<8s8<3AĐ{Orϛͳz=Ν;я~RW^9x^pv:wֹk3y}K| xNSW'*MgJWL&fΙ:؝Un4ncwVSPT^ h b'ˑR)[7DpzE\#Ce}_ [.>E d̳ڮt|]zum8TUkjtli1*o^Ŋ։m#||cOy0?tƩvǍ6eTV_ WYV3_T5y#J ݭ; <J$jNTv `׭q~$vaܫw*C9>yDggg`c%'IS-5$;z k TZS|܀ h5tOpeDPd|/ϒn@`{Vb] F'/+  뿾+NfUUKmEXE <ʁDu4UUq`tAX~p}}\ˈh`A r2 :,7w^eq pڨݠ9xxF@@鸫A 4`A/z!]_Y+np\VjNL$A`5ɋ /oM=_HztVEia4Mu]]__n7~ X n֡sz۵ VP^+_] 4Ix*Z'Z/c['`KҳH<&]'NWMT難MJM-~kBV˜mhԨ7ܙCLG`m#pJ sKQ#p1b-Fk#Ɓ(2EάEᬣ(r|&\)8Tg.ΝA3g1f]jw&s&1$],Cqvf/˜nj%E{z&+@&ķ;Fu Zy]0[e?x[Cv|y302 pdvW%sۨRd[3E,Jհ&1dxﻠđb2O[Tܢi7\.ȗ+SP!@x2UާڬbzFfIbXUh(NP|`g!< y>*RTRP\juB &”twPkd``n@~ۭ](REkH@Ub_r @av0n޽{Ӵc/d\ˀem^׎c$)O$"td = amOYːAv5GI#kʃ; $jA9f;POOOu}}oP:x'^nCi?+3&م#y;K$RaNB(I<4*^O%^; jcG(v:5dh]ݺݮ3vNQ${Хyáz^f%.q{r hMng>|̶0;[mŅv R m6ځSt[< ʹ$r,')(Mxߏ׮ѣ{##Q.K{}xt#R…dgz99q+U>>N KTٙS$c8mBjEIU|;b.K+CнZҽ~|Ӊ‚ϵ 7 P>t#k5MT浉޽MU*QRZs/N.a]`.'~1ND4Le';&V=8enZ~r>BFnw wKҏ?vcsf4AXcp2^uz"QFHiB.tĸh@P I5 5&o[ +²jSJ$Ys`0F\! 8݁d$. Q@+pEЁXgԵ$ R~mi4*˺PSG*}0W}DJ)/-TR:&E z4'2{>yT Pk+rc g?|rߧigϞZzx,I bYK\pIɓ'zꕎ26+Z9hUX[f|r %)DcSd3yչoV u6nmpTr=Q%mX6XJ]0#D5K)8::r͗udDG3bP Aw뼹Qs[r)]ёV@vL&0T$j5@/l|W'cwx"Ik=)`y$kcsz; Ԭ&^j;= ׅa<JN4b 58u֜g‘dItA7 SrU|$;P!Plai0Ml[.[D¯${FC˅Z!јf3}}pH&h5ʎDZN\|9glQ GT͹qqB&vm䣏>L`P֠h\޽{[kp婵fַvnжz8̘"mA/G%!@maT0ݔDUOKGN of4W: ܜ%>n>DgI捵:Z|pt$gΖ5C!GX=#0&ӭsFQ# $Fo]hwqmN&woWMv{:BQ/w+' ;H ߪ>XE#DmGL{O"-8eXk4̻ڕgVż'we e?0ɓ'> X7sb5.\.c-+ɴ5 nK ÇQt̚ӉG~}EMAϞ|CSyp)&Iz[5 ±E 2MNVs.E B 3VԊlImrkҀ0 uw xV>{vl6ӽ{\I1j#CaZ:OXlP13g _lGkp YMshx@.0T ]%ɗWF`چ#lDqI8XA H$Lt$lS,1v}=>${07]jo`+Iaj=`FahkUCŴyK%PNRguDŤ$VrjhȘV7vS h ?$YR |,?R( y(P- [v f8bI mDR^5ƢNtv7!]2w3'ϔBl`a@n B$eE~o2+sGMnc55MgCBJi~AD}fU.h>ժw4R8V5Z~10rb*-ɔ;̸&VK4%6gF$PmbP` LDMm^< j4FDa8+U+Ztvo1vU TX0F nAi[oZ\0r*R֖q h=NĘ&goGCŶnUǠV'jՊ%&ky w/,ժm傼BfsgN.Xi8: s *flΤPTZX%'jbZ6.%JubM (r7^Zxu6/Ս 1Y:gV`F(e<5ۿ]wNM Сsm6+%mr7jg*e<ҿΓ@\SBMi" Eάk3@T4>}0 v9l@ jjl((wYvInu}}^Kv3Mx]5Bh>P,@2g^+2I(`1!żP8!~ȯ3AdI-f̐[Y5.UيnAG-#J$Iy&?D;obfژE~x (U8Y+D*-8KmשZ=8Ɉg` pyv3Ƹy8v<&p vxOB'-^+0],%VEn^>"Ayph 8m8&P\ d z삔5Laee~)\(QC;>ہ$RQO~N$/pIؓuK^R|R\xto 7ͪJqA} %HXbp S9[:+IfY)dPm{,3:Է"bJ(Yz:T㚶նʥ,K)5J=^؅ 4A"`4eW7TݵY1 n.G]#0pNr8֌HҶrP"SG}G-Y7xf'&8Y@+0-BKiz{Clr I[kTYCE@µݞdZ\.:d+A@(ѻώRuܸY_QP^Dbj9[]EWǏG`Kf m Om'pϰz *  ylhQp?Q@Y3$Ob`^.Dpt֙x驮l ytTV `7,DbV'cV@T&*#yzR*4wUAQ/j:g b ŮI"4 f$ TFíTpTV?S³c&aݮP[Hv QxwK (,7Ocw(o`~tж"Xʀ"(HrY|t(]I©yKr:btjpP_(r8 \ n*ґ^F#7ʇnZZ,St]]__g&^ŠhtP6vuqq()HPYwWL3|ƽᠡ x̊_@unp%R T'] (k5g9\+DOTZH恒(m)( X_QlY%+[1JbG*4\AW])Kc(iKۍuJ^Z hG̭B3PEq8I_KΉ]n@h 0E&a4gU :Th$^l?('7s0ӧO5\B$Pei&:qp"XթuγO/kr5*Z*JuD5 尨xknjiZ;Q*?HS4#|.yXAb }:Ak|s_F#uQ񱳂?-3M<\"QZ"”N(X77:5@F!FAgFh8Zpͥ3%PUQREsD;)06,~h_xn^t Q߱fq_!@f`)F PRV>(K#7_WwHx*䋊JŊ򹂳o"`|j[ry; ,12&ֲq6B HVE00 iOOO]R{Z<ҽN Cz?8v !W4 eJ%ɁTEh$,Dm{(ܯlٰE;4f$ ;'y'}+dm[[;_$&͑mNJV5ꍌoIA.!qgy|1eYg\N3Rl[h5jr|.#qu)JWDY0@#z;*PV=Nγ 6bP@cr9yؠO{(3e$_|w_Y3t1TAt<`OZ dXF"m/Lj9d2qJEjս{eh lSg+B|xRK j5]Q{jא5 ժ[eb .; " 3{>(-:w( sד-'9- S9cx8Juuu`Zh4-$ӡHb"3so2ϪPkz^#=z~$I37^ĽNwb2Z ytttXVI4VO3sJhϭ씗sMNuJDl"E>tb7M7~;_V^k @RtJ/pDA]3ߛ k0I+t/ƚ,G@C|ƨ9s<0~<86h(װ; 0'3}sH B/@@iz 3.n PbAqzPǡhQ>wO;8U+ʋ{|_6xA$h0z. IC%y1bU@°S(.*0N$ @V@CmJm/=|s^)P&s&Va9⃪|rt)WI;#uCN(X @Fd J+ء(ƣ*Ւ|֝y?< sޤ*䪚BA^rW{HIekHBMR0X pgϞZB,TXMx]:Mg +$mi+ŠU>{wbE Wj()\-[EYTx4VWXr1Z IDAT<7]E (h%q>f|!PT3s_͜祊y늒(P\p0|l/_fLco΂ݡN7A:Da$#2t/ y}fHn[BMû=b;%:Hv$A⃠f9hb'6J[PkPT\[ڔT*5-6 $`E"g{fӧOu}}Ԕ, ZNq9W^}@Dl;J\(rǾWx !bJj1\ŬH8rYrQXjxZ'}dUQokU*VZm\8>>? $F#$9>u69ocDPF5=9Ϟ=sbJ`Obl6uqqmilzq3AaY H$8aQw2?| iЊ[AX|Aɡ&P(8膭%a4 ECEx 8@K!>E*A.-"\ x،C2%11Sգ[]TzMJd|9zmDJ]MJ6DzK66Sf\;g8DWWWn%<._Λ@67o̚Snܹsǡ;m› )l9cd*}2$@T0HP.(Xӑ{{DR[pu4& IQ;*俣rBP~//6yE'#yڏ4Z}އ~?P/_tJ$ DOw^W^ni:+\//I^xX]J=O^*_T9\ -IzD?$ݮ=Z8﹍URsKMI 'ݻw3S v-я~ v}F{@Rs玃Q`s:SD{cG?X/F+bAG 4)=8dTL7Nٱ.PQA焅 n /f5L@Eyf]wЩeɓ'Fz2)p#U<ƾaT{((I7T[K38ړJ|$%6HvXn?ojPZ *br^*],BCU:B:Sefb/ ο\^+2e_*E98[ Kb jxtzMI+UM*lj_+5\r# ?`F/4_iRg.?'/^j{J~CLt;!!q%؟Q0L>tB9P(\jLJ9;~u'cIWpCTg *)5LDv[777:99q0ύ`EHtֵȘJ(ZPI➵nS4񺬢R E}Iqӧ/j[GG(Xni|h4RqhSY/[(کONN^J[|leSQ!rA0X_ࣁ~S*UcH3  ƒKM0tNv?7<cVPqXq4;</kaƑwd}//WSk3X|Uu؀976ҵZHF p>dQV ^0 8{VkZ2Ev5@dVB<Ŝ5gp$I&4QRd6RS?Tg\FgY|KV 7sEZx$$xMPM5_5[knf?$<;wuK|_rY(v]TA A1DAevĂ=yj6}|vss`\%roN8`P==! ٙڣ#g)]$p]ZA$H hWѣGz*c-bT]F3bQ^Z Zf!:(a/l~DgyXr$w;3W_k<"48C~u7㪒jQZKQvb*/HzotuV*wIe}$I]wʿZhhus$E5]M' [NԏŹ #d pΘN\__;v݂Zۭ޽% @eȼsKVׯ#p3:a^#q%;b>:"K(˻e @hǏ@Ҩ( PCTpd )5Y^pZw|Dwn c잤MpBLTɊEei|r<|m]@clZKfR4M *)*ȧQ۳̻Ix`y}=弒6XFVDWˁF;+j*ȥZo/?n3W&k%Jt{jo$dk?yIUh/%O?ӿ`Fj 3+*ZVFGƖm@ꍺBGqVtpf+a*S%뒂r/jZk eu=q< 4U3&1ou]wVoQ$/kŘ>'t]5MܨX,9PU*(I'k4F:::rgڴnv*BGY VLs\)MD<=wz# .$3ַg3d@`)T[aөݮsnCK14⾼txpҡӷ VEqa].'݄>CJ7dw ё]¸8k=x@~_۽@X+"J0ճ$J:5)ΫhX:Qv^.5f^,]wkaJ!Ir6á+,Y.q-5l67Ĥ@E.4c6l[A,>nAnꍺRAt>R>懺YX&+%i,}2uNb%2wt!'ƊӭF3?/5KT.Wu1>"3鄬AhvU\l>Xկ6 -  Ǥ֨#~EfZPkL. vDKQV[|>;`0p]'///@"G&`JA7އ 㨛*#e q#g:}ǙC~k,r]!%'L@Ѣwbgj\H xa!g- q|, v\v* E/.d "B-T^<:Ve\H~ЍPoȁ#6{: tv4yVK{^]\Q)_ܭ%U~ B,Okⵢ,:`ϓNZh1(ڬ7T}FĔ JZ;dX`CaeG΀u:_vP*t# GKQXpF;O$D -ڀhNX3pNOO<,b05J^R5'kO˿qQ_j6 uhmMC2c2t~4Vl6Y)ot9Ts/Z,BJG#m6+e9>+ZES=xs^I[l74/UIh.W*U*VTT W.nBM&z=2ako;bx\Jrmд֎XZD B.a2~11/ҽ.ؙr^GaiIE3N&"9h6/-D"&ÑhdDPI6aBjr$I\`BbDS. >olZգG\\@$T?dI `HL7n3$pN/zZm*y72sa.wj4j9[^oV ̕[23ec%@P2Bg F-aQ`Y[K5~z&Y#fFh0!w1m]\\0gl[%;Lu40L$z]J{X%CBN=Xdb,)\Q1 lLjHVEp:??SRl4_Adeq2NrC/R~UT/બ1IRqp$KPc,@^de28Zٰ`B`j׷X,_3R_\E+kJ vveC/O;jkz9#="Q+\.N/wvU"Vp/i_t:u7 y8:\=s3(8::RpsX)+# ێ"ij\h<b} W/{VIUEU{UnwBt'J*x[ptb;h?O$JDwɟC}'+UjEUyn^j9Y;`SguS%ڪ**(8M][=b>>] O$_r(?/t6e' @777ַ֍Yx. *J:??w_d .%A~T}o w鸯g?Y1\m[-xPCGbxh)DXO3B2 )`c:BPDv`v2_ D)9VVF\rWA?to)R-Cl~Hl{Xz D4FC ]#1rkɎUkb .l./sI8DEg@[e /LB׉ҕ@Dmf@|Ү\.z{c.6Pϵ&o'bOg&3gz]pgX+B/Y WY8{_7gKMFS%q.,UP$UF*rYEfq6> hm&xG,~ Yq9@c@t4^W 9O^g?)_iT/?(Jdgt"+%O$Wlqd$ISVTv볉$$f7Q=^z=VBNr^ٵfEATW&ԍ)eDZΨ#u,B`OV,*ܪZ:A,E͍:CA,` Ifd8?爣t777nwDjʬaTTԘy`xAaz BM2d%™Dz||+4(űhx&XSs@Ϡh}Z$1; i*u+2t Uq zl6NCOݺ:ԭ\`I^ &^;bMFÑyU i[2гwJie7)r*4WZ#͖r< TN3c =3f $ ""t5@v%|/KňU6#^ÔJ~/ٽKM2PHfY(W)'~^7&NS3ϛoCm8r.qyt?Knv?Gw"[ɋ].h&˗/5#U9k,b]Ug?==&g<ӿYQDE) T5o|É># GOb=2'|"jE82<{bAOP$QUz=1#nm)z]Q}5p\Nn b:::r!ppkj4j6n$arM \NATz&R+ s–K"$m: *X,TT |*-[v&K&;i9TVYuA IDAT$m"ww`~>87]5^2u;Kpݳjh6(ߩ ee`e+9RIR'BORjFLU.GHrp,HHvT$vP|ř_VMg^g#030.HQRcǦ۔ڌ-a4BaDƑf˾_*N7K=ȶ>IHaF$b҄7uF;'· V*ʒk28x+hC U*%*wg7!?{i75D;[o^{$U5**vW\GX(h]x||nK'ڲz@K*@ >T? IdY xN5 CanY!# Fn׭aX₎ 32B;t]v[W 4UP(^`ʮ%ȜVS#ؽn`0*uT."qS+3ބ`x:aH000㨶4U^SF3?>52=$SY(>q"w( u1T?|9?=S>_PσeNZ1g)W+&z휆גV:͌"yN,v07쐢R O; g[5]Q(ںs $^%clxݣpVˍUiӠj5}?kAEoR82LjiXqa gl:j$kzjE.+* O[$+h4/B$KK?^v\BlW V:th#qVڻc8?[aVGZ NW3K+x6bQPn[ jk^jN3ۻn'aٽ͊䃙$K* ꕎƣqNp 0-8$&P~lpqqfi >r<գ`B;^|ČOAV\#cK,0^ !l_Bîer'yfARy63ŠN#KT-?vP $\`g-F\v-,]Sd(}6 CWR߃3wHto3{BIH>c‚BrQiZRϥZoV*~{;U~z>ʘt3qtPJKMjf.|*gf49;+ s.4s-V̥D@G`1(>]]]RbڇǕ IYT 1_i:X>k mzH8 G'j{Srݬo&8Uo-VS])ISu;=MLLw >}pr&?s=nUɹ2=kf72}|pk Eհj+k2jި\:܇Kz=]__s9tΝ&0f n<;`T$k+F>~Ï?s3M>ֽ{gGGG.ӼAyF#MVz=/NKݢ%ۅ 4ٞf:>>v4f9,c381xCHVl7+kC*L~P~H1/V@7&#ӡHrt :.Xgl6u}]\\7a.H)@T)ڮTK~orWALM`-`Harᣇӱ֫Hi}5;ADo[TbZZ~$LE{i<$.(9Twl{_ggzzDQLJI9-+,$2l6lE '#0@ O~ q1tI(ECνUukfoqHF=cVvǔQȕAҀH;ʸ]Kd%&@T*\ kɋ5EB O`'JG@ MeI#QvWՕ=S3ZͭAvV(NM,!|ak^-`OjfMWk::*yPd>WcqguG[$q^u~ZLBEQ+άDQdShhUi>S u$*f:D1i^w+dBw]L=h0qܤȰϕ&Fz q$)QP>3w4 Zs6 ;lՀVi+IڍcEI8h8p0V?`8d* g|.Exzv]}-/* \]k V?_[^ZMF,[ϟ+drvLtf Ttk)ZP)_S~G^wcGrT*7;5@_3jT(j2~]ǹΎ3Q%ImwttVi g޽{LfM70tpz^ÉxK޷)}m]찅 јNr nd 'lё^~4 =h`}2*Yņ~uܠE#Lw=p0e jL!ٸK*%e[ \o{~g:5nZzݨۻQSW0cMcMơ&ah)K/WILV9ْYHNF7Wz_O飗oHjɔ!𴂊Θd bw Y4h*R(rܽ{WN'OY˿0"=99֖ݮCqO ^\\<FaJVUm, CuΝLAsn|vL1瞢؟lcBCe &06;0PAOAa h4J M]̛J>˗/J!:7A7\tF84 @L&" dGn7k.X.@tk=OmZu}VK0{y+e+G+:1vXӛF"kNBV )1%/~IӜ7}U5 EG3.C5zՍqIZY*1 GEWzyB94#뼉ߣV5iq]@|x2V3{|c>:qɜ(.^(~#Cv VNώ_h2髖rX?ѳS8gB~I)KZA{z+rSE *:,l]C֪; =FD4 hy d(.Lp`z3n%G.!Z-lmmBDZsQa/^. 0 (@$adJ^ύ {e_L;3}עeKLmZ[[{B@ і%Kw UlO"%1(8x{AAHp#-gFCa҉Йц mU( ,#WѲA$iKОG$W(+ O~_?˷SlN/{'uzV7>E~|Bh:U}BC3EuAт=IsHR[&؟"\hht4t\/Pdk(C۝Ø7PnFrQI4yᄎsTtzO4i6R$݀v$NQ3K:R++F(>,(N}E8zv]}義q~ۮzi}Њue%Wڐ' U+muݹQ>_pKḣkhqb&?dmBG1r{Fek]g㞰4Y[Fq]wf2X$hVɒǚ٨/0b`uYjΎ[BD69 Ŕ 2-8д@stY ]/ oχ:N8g֦Iٙ{x.L%@# Cw3 FKXE^ * {X  MofHPX1b)W-[n̉NW$e(a[w׫gDQ8u  p HZsfôc_FM5Rt ]dH1DUZ.h;6t:jl+_+Fq8r̄dRoBp)r};,C'aQ_|EJ^AKWVPdE/s(ؓ› AU7}5*nmmI.//9nCb9oWXt̅BA_NȽs\T*M#өͦ+6u>ޞcsC/̎XۮCw )Rf+Ք`XUj2 5`80Rx1d`5>X,>1] :&ݾS$Bw;1 hȟ9"bnHᣣ# Ô↎FcB IDATe j@HN0677]g 9Óth ʿ3B}Q?kنp"ewڦ%chewRl Msy?t-`@a`0kWvwwu~~ܘh4ܠ69s0hssӡ 7RP ZTuӽQ+Ū49;Ld v 2#b7K ^^Po C^dEx6Z _7l@ʹVEv Mݠ,t$f珑 4 TQj$/ih t6JXt~~v.NI/¹\m¼ĴSkkkz~`%/// F z1$i<koo5!zw }姾g^_d.2gSu(4tJ5oL;=NFn,ϒMi7ь!XFNah4b5q8W* G*W%v~b/RG`Qdߐ*JqOـ ⥕~~RDz%| F)<@ɂ86fOz$4r6$eZn @ʶz^I/LXR 9TK:*g3bгgϴj*gsn?9Ύ;A3Fp6Bnocgi#v 'u7>F"Bf{" >RAv1ìڳ:f VU磲&B0sASNpA\8R{IC5MC{7G̲AIL0 J>88pPlN(94̧! 1NBnR0!mu{TK<%Ti4Rٱ#oSOuw/X.~VM׭P4}@whnYX).&gC >3.nL1,h,٤bscѳ@b+=6.k< 3^$yP4"3jl/Q4g?/C]FYT[5^aѰ;[ 'DkٟPYI{o(hv%tV]tzy=]U8ըmպQPT2WWWn)6d&3d !*% nmNBVd"(ZS1 0\[[[|ƄС^4Myg xwŋT dh`Clr{;@k\E`B' NRTO!CرDAv ["0Ga}ZS`r`RA`d8>>v,qxA4l ‚jgќ9h1B@Հ0*vU(G3{C[n,mW :p I#ɢbYdyy繾 ??z}KZvLp$0VDJ bW]|0?x ﰴuGc`Zεs- < RܡنáVQ c"EhkB j oF4&ϗYHLhg$VΰC|rsHR.MF~)XWs׿D-o|ZrŞ݆?k-èUTw ̃411siXQ' ;-M FnƲ빥 M4 q-mllb9.uqq$S:d5+Zgb0 ab'sV9'81v[c8LHbĢ\6,[h HaeAb` UѦ0:Ay} ABt:,^)Uk1F-60QMZjYhtq*TbYu:(6sIz(T…4r]~9tWd1zJ6(-f˓ź@S4 N&d>&]EOӄ i&0+,)H5t<Maػ=bג$]6$?u\{+t5z1#[]]H+z/*{cGt{"*zo3J^p3Ttv:w^<}%-jK= UE#_k+t6MEemf(Y,3*C㴷:\__1?ǧ,MŊ8/IϞP7tz.2H_E. r8%-T777v&xF@rY/_LY 3Ә?Կ`gg 2 x91Ô :-*vBZuo842n{Rtm-C CS|)<`>p +7z%KݮC48h|M6 ^s7f08oK\uL.{Տ^GSEw6:Ytνyj~wpΝ'YMo"]ܹP!3tH~B9vx3@6#"B)1ȋb2]-;DlphHh>T&4Fx6ޙsNo=q7߿_n~0hooO2h11ts3s6zT5w/J~StAZzumo8+-I⠶tASOS8M|V9kkkt:7%0מݻkm %ōς %EQj(#e80l~8 !.}Fmh͠]hu+B ƣj5 CyT\U{k3j\S-gz[p4vr[҄6&i͡Z,V -a[rW Se4 Pp-^eAEoC$/?)j0DŽY箝 L[D7FVѦRؔ-pM7bS1T=9tMǏsXҴJ% /]bĊ N6fhRR9 7&4-;F˙q}}4bcs~@VTRJTaج]%4114(HCB9քpѱug }NϚ0Z&c`Dn6ͮBd+ij<nfWۥrY^Oa48(&*E&hQj^0A+fK6c\#}uOY3y~`$LIi`,!)?G &n5ǁh3VYΌU(e0wfq>,;K  L&H~Ο+)' Xo=Rơ6yCq~3]2^ Kejz :JUI%Dr}Ak.Pz:6{777]#D:Rn[4~_{{{:;;S>wCL \44P\\tۖ¤9bp5%DLk;zpO׃9],tI]'ƛl-E8;#qZ X*Yws26n.IztghmBF%))H*=|7]'А%IVZFQf[ouG4MW*Ysj4w^jvƁO+Pl@Ń@fS]+!^룏>Zy㉬B˽1x7s5KݢٞL&#QmY75?jE3Yן m&4@;dM86Ŗ"Ía̡BB٠}FF[Cfl7ʐT MVx9&#MB@kAwx68}r恮r}}ȼ,F) 46K?\-j<TUptd ^6v>=ɓN_\+*24!vi$Ia*'iAn؜][?@,Xe Ȟ@ &Iiw4 #kk*Jzc}?R;<_8SF+* 1[{ͪ" MVJ%Ys.K]m 2`6:#Zʛhk2Nt~v$tQd1 Gs3N+z&@# Cu:,1O!a/8عt {n]AFߦYD6N8jijGV Pt#2g_hX?v4e^p_cE>j)DAC?%`qA 2il mƆsàNʡŦ~]ȃɮ4!ggM'۴E=zlAj L}H 7".MS.gT P4TTEv:4?/C IDAT-(21֤G~JTg4ͽ a5 3, ,e6Wuv/VrSh"9h`ONN|x8QPV!(*Lϵ^ks}>Y4T,o{[^^:/%=O5@Eg- N~{d2T~燝$,JӂujwWEO 7wDZ+\78YDIAArrYg?bn.b[61g̾vr3ݻwOng69TD0rloo*lXjZ{^x?Q4ȓlKI|:bEcY#yc`X\>2Mn d9(*p|hÈ9\:P1ɼ!vg1]#P`f2uuu.e4aumONNt}xŴ0dBsc%IG C STrYRV| pfJWˣGjjm'BJ-kXP%63;=oV`^]~_W5~N@h-P5#7,<׍A ʊFE^X M@2zD`8.m{te|)=ycO ??=ZeSw#D6<]8fʔ6UL^[ǒH[2|ҩ #SxWb^^fIlLoFKqX[[sΝ;:>>vAl4lNU "kccå \V*]\\P  ܂ zti h4E BG1q#Ԣ5`{;潢رBFA:%?Q8p0Ñ[cT]EήBGFGLfM]v"؎s6C.\@gК :D }Nqc!obs'.uZ,*c(<5qtd|!x8X)DQZl!o'7ai\i99;{oB0^FM'8xٷoB틾rA^5^D2V.r1HI;dͬsEn¥5i#Q)@ ӤQq^&a%ϑƣYt*U+uM5Tm m֤"ba[49[Zͫ"mtU[(81flF!e\˂qE:}Ea$mgV8<pU ժ HT`-y=SP3!P[Bh4+ S?k[ѫ '@ы9rvg35ܦ6 RW^]X1#@y(/ԣollŋQsz3 )g6` Pd͏Hwu6 T>y`Apaq2 ( g0f-wyNNNyc{4=gMP*XP|?o$t-Pd 7Xw 8\___aLH=kkkK)5ҡ P9V;lUBQX¿A W md=[>Wt9.h}3XT B^BNa4RPr%Y^|+w)|SHoq>+ǎTB_A^{_m]G3Ɔih:U>w&'< .n_c֖Sآq2 ErQ8#fЂlh]09歳ZVjE֖C HRYBIn_J|rEM5֋RkᖆkG۳Wow8g JK餬aw{ YXZV"TQ6Z,[򶑤EY^$,jc}W~BMgd =+d2q(\M'6 P "޽{a"fub?"PNNN4Oya&Cg05 CFj0Nq - @Ɏ Z0lH/ _*fnEK@><:UXރFA"5f3MUr2'/76ؘ,m.x)*\G9}rc{n+* %aQ~RuO[)m97޽/_bhMJ<؟$Ic€&K΋=za/`IF677Kzss] } _pfÇl6kS_\\jUV}d_z葫}C# C1:{Mvv3- OpJZq2M;J4wxx3̴ŎLapB/?"=cz@f[B;ºcV"oQ0S1m* e3y^ /}W5\< @ai$)2bhu ،+i{nR?^-xx˛g*%O]ݿhݚeÈw=纤у%هΖLJa!C/bF.\[[s w+G{ȕ'l'jTbqj=ݮ7=Ea qg*+wI[.xaOˁ6?zsL^s݋$7y0 ٙlS*jXu8X 7nU uorE+8Z95Hf 1/B0VR'skk DbQ̜2L!ܓ ؜g;3v W6HDŽF6x Y3E\4gw[?*F `D5::fkT@WdZn[Xn<ʹ|ͦ+J]*&v&}q`#<8ёNOO݌$E!tG=gw:UWOXl 8ヮx,>lg;I8`U(W+U9n2g"+J+gjtzW~z{V>1m b8{j }ӿ5Zih& n\]Mc#ElSp35kyfk똃3]; FB܃:a' r+#yšBBQW?wOfin,JyJT;[d$o_{/jym73,[w- xC(;C?sę-M^P.3sfj8Et::kNVw]B'p7fpm3t/l߰>(C7cZyN:=8bѳmD' 3i Ri4Jzrr%xA)g4 [bX[3z}9/S#9TNG鳾ip,S˷hh2t{9a0H1g_4ao~ޢ`-:34d[a# *=l>/R^G©SOY[ Rfs /l,*ki3Qz&Qʉe'sYm[iӆ42JsxXԻhkcGY: \.fi T^A\"034yV0mnnf}uyy yS@K.//{yX@m"hj̔J%lyuuvk6 8dGEvwwݽ~||>f{g&á\.~CnfDVFs {,҄fwF0v #CQx;$lAᴋy8@~_N]CYs푦Jԍf`e0χ䂢A", J0Qfu?~JL\JNq^{ $Y8hni?}_oGJi8͝ |ukAvLF$k EK0|sc î zC kWƝe8kIboWO;y/+XjlV)w2{de&1eޜd奨[XɢQHV,Q󲠼W7-k:{yU+ =M P Ѐ iϙT0l6]# I״MMYό1޽{VzC;;;E#]bA?X8]p͵e|a_}ݻwu||֑'4 ;0 Ս-i4Om#H3 ! +\7//"-~08wvvtzzr)E|>ԧ>>H.}hva3.0ƛx?0q. ! &ݘ0 *&wq5woIP#7G*MSk#%Wo2sy+mqZZLTkO g1cwMaZ/Nu6Ǐ) :TK#ŵO+0уﹸЧ>)]\\(9*Pk,bz<k4kmk ^?Vi~Airg+r\!/+ziB6+J$+/PN2@mF)[άv3Qy^o]~\ը7Uzxx/_:-;,E4{` | Hts=W^9e{{!s|BNI%RRI^z3 U(RF'IY8G{7@#=5$n gssӅ@-_\\8Ԍq҆:Èم'0fܸiR%f.mAt@tt*A[ѳ<.>ZyP$J^ɉ^1ܱXކbe6PA,=4lUտT-7N"cUvxxV s4X;M6fDQd6fa^ȯ'iHa<48GKCw:RmW6e|S~өbg6G\$B1BWڰ6΢M&wCI&>d\XUt`bh:4*,>Xg?H7~f*:D٬kyן_//?ѿS4*h2++8[n>M6nPe4[9w^y%Re9Mu/p=0hH'-6z6wʳ:q[#Jkƈё 8Ө:I9󢚍}@ao$T\1\>TӧO.^P֠f4n+CP`$;~o5|$ËĄ$<) ;-8Jit }l6 IDATr2ܙi:ѓI︣y-4)vnnpAMcǺ@r<U]ןpC;jpUJ<("(*I;#)Ι?;׍A[0Hƌ?po&^vlpچ]\̋~o %5XPq<^ ūnmTt& :#j5I9߾(A+)U zp Ͱ()e5ֶn]ɓZX3+}!PlLYsݚeAjh8ra:`V871˲&YѣG:??w.|C!4Y7 $>`6MZ-mmm sr GR@06CAuϟ19IIփ"3 xkn6kHrs9np1E*EW@EiMOA!.P`Ī;N]1%,K6,B+Cl0@P>vt 5nӊl6 tᆱVk/Zv]r1J;,4F<`FU@4@z]ATSq*צ K7oU+$y>fšCI܆~\?[TjzqCMy Fh@ehi0C92D`RRqa+4=\RYNWc ?\\MHM%Eu7ry_QOhAo[0Xh N-1QݾIJ]{<ӊsI[ƒnG]J*R;'qq): cA|"(w4z1g1fn1EXGgÇvS4 vv:Ԉ>ϩիWݼD⋁UfGv&("FD7xH_}[zu=xXsɽ#zN\QxL:z;9Ǫ.܀q@ @C.@;D wu6#&J32B:88pf/q 5ԍ2 EQ@BQt0Vy}0?Jٰ}w`K2ӷ *w% H9/?Ɍy"Uh7Y?^GJQq@g ɩVʈHHbX7.V(ޞ.//=HBI?5T*j]"9IW=ts}&[_ϔ*Ϳ;r.s/3 d>2@~bc\WrhD~NN?aUv$7*ZڐCu;=G.D:kFm" ~fօ ^3"!zRR1"CgXV9`\tj׿~3ʺ =ӲD~Ë/?Uu[(\.Sx_wy YL&~mgNA(0;mrV[`Xuֲ# DOPF}󲝣6nnnS~!AL% ̆ja5ѧ$͍'Hs6 v(CLXNZt:퉪>SYs}Qzm)*ʍU; *oj~rxEZ%x|:X#ϫ|akyWjzya8v͠=0~FeF9}/tqGe&۳kR+ZuKO+6R@ { QœsYhk&1咺[uugR+ɹbkG:o7tI`F[?;_5.VEAuRviFv"ފ`{ɉF-OcJ/x*hЉ4D*+Bԑd0kwwWfSjW#5 ?tna.k`&IC_qYg>"COM.Z3MS.D¾///Sv_&+\!~V|UBqAҟ9W5uC.;?MQs7B_w7Ojޜ)RE[jTVn_ٳg( UБ5Oɜk4yUO&moo^Ed:QPPgt.VOg&nRZ+jů?g_?:)v;hky^nNa,9L?v#Kiɇz vIvcuI^nI?#7Ω}u:]=~WL2oa~b_Rk09=8K(%0wvv|uh4P.51]2bUիW^lIw/^P3pIA+DU: IGokށ=f I`_U1 s,<c8բ`K+j(,EVD(*51Hs 77ڪcd ΅̘lN"CL&z޿$Bׅj'O?ϮY\>#cjr=)ぢL2ȥM6W@XW rQ}0$XD~*m/ >^Usg*6Vz/Պ:oN~ZsURF*nGn^ynẙ!oTjMS0/2XT~/7OOm?Iun&AbV6U[uc) vԭ|Ssx]L\$*m9?g_ \P<*(5iW6,Łnn xw* (sXW聝L&w{^yϙLr:;;O?}k\.+\w@^c^`r 0xZڠ<wKu[Wc:ZPDQ~[sb+F AD*:k2AdYMJv [8hc`i֛7o<ˉAX=;T܎@OQի _KUEz%`Nh1J~g9x*d ^ Ȉ[PϟlJTZVan :r}u:&'򿫹-NΧC1IPAbRp,˪]S!{_ߪT菿޽=ѤS[9D4b0u۾3%W/幷xR`0*U㉢Ldl6^bq0[҃Ê>=ԯOUzotw.R{xt,y/kRꀹҕaA}j4z9د:8J+Trv?kscLpw%[Nm\ A y]\\6!*CL7?ί׬RYK96Dg{ܦQ>Jg*[KK3 rHsyy!sy8BXkuZʚmllšiOYkh̡X)ApmGj<-`WHf#"XSK AIjEk dWfs0NP˗/ <a~ɶ-aWUfB 9WsfS%=nf(u"!R@FHe"Ueo[ scE.jDNt+LMFRx}kR*HbZ1MuD+O?$rFYAT<3M'E]n~lK6rs|E;8QSUidv:$Wͦq𷷷2rs?: k ZPCNqcd2|%LrVJ>ͦ_߿/I:==MTgͦռxB^{yy/^W HYwOիẀʶFJ%*ql^ODj4ecU׳LU&*oTٌ͈?k iYZ ? 2R<]G [~VIy^+%ΏL ksK0a^J-E%EAA٨lXT&,( KE5e<(Mb7Txᴭa| IDATZIKiCѩM㑦(V^Z֋rDWw'4SUk 0K𵖟M|jGJTBM.q<8j79]5hUaA+y?R}gdgҡh4|I}Z jaaZJ0^H !loou޶,2Pʗ]I,rȼlzjgOSmnn&`!vZ#GkLbH=|PǞ`LŶrLrN!mw5*g.뤕N(Bä-0j2 Ÿ0b)%nTvP-f39߻%>ve+Iis u^&2kiuUֵ{OX=^z]d2~8JY){eX@)J:vww=uڝ!b| 'Uh4Ux;A:c!tXjs"ZKݿ߯60 g<Я?`2w a}q,~A2 *; X-̌ImUR%5sV)ͰCY-WJŸdiL&`[}충N{9& $(V(`yVVhF`'-a[⾽mKr*U M; CjS)ƣrOuZ,/A5ĸsA2Y s"K >6x˪ăDSڞ ۇh/K 2T]'~gQ:FWW, ⏈V@K~BU Xw[ rҨBfMXk~?A -'ް8İgjl?HPDil.R6V:=‰7\kpqj!6. (XYIwLfb`jjEs# M^~C$i?xٌOlJ3+Uƒ tyw~,b JHX4\bHbԟȠEvޠm}pnڕ`K`CHuڱqYhMu E\h}cݷ0N>#V9 t=5 ]\\B"1g^I ZHiaivwQ U^l6!]__-,3&?VjNѣIEŲ3zoj|>}Ouf2}Lc*k(p?(#FPv]Md1Nw\4h]=R["9ѳl2æ0*G$RҐ=,&-2O\M(>me1EJb($n3T@n\t}}]B jy'`g;te7KǬDr~Wi(&|P-*X 50tj,y5o~.H[.p}ojBҪ㒤YţNz݁FÉ0P/NK3'hR؄*rFP_S&0p8vZՕJ$pgx;I #ݏ5)?K%nEa=NmhyZ'E *2uѢ - p1l6d np%稖AURgrwww}[o@j_`\\\x@JY]T?IjZv)&Hێ@_uBFKa2&B0y# c;D3tP0(`,4t`~ %oJF+H$yX?>085hynp|o-3 >]K{]8(w=QOZ5T@t;7=2IƆWF[X*؎=ŵu1c=|eB!P}eonnu4 3 oml6}𺸸н{t}}ki{{;᳏j2xyQ֯k[Y6{&`|>}j}_~ͦ O Spnnn.uG@߿hH6U| ϼ[dt4|CS#{EOF#|](ҙ KFm_fN~|"zM;[q444Y~_ a@@T677}DZW7p\8`Gca3*J \yH[X*+{U]XKUnN+1aXz^ӐpČPc*ML[nzyEcwIEu*¥`"^5>-UVeG:"rZ&t?Xl7ƫE[ !Vs;smLPJᅨrâ+5O4< }g`0r>yyIIYd;IlֻPj5r9{#Az# FNOyzݯTbûT҈7\ΩZ :keC]\\$0㗵z4M_]#`m{{{x`0^~흹NNNS@)Έv/EP`0@@U q0+wb' "KhS±aClmmyN(`q]{g_  J+@cy!Ё'~[Ryx%P&(Pp_8.n2 2 \ ({Oջq*T;|TGf|n5,H*|ݧ Ôc3{%}ښƃX=6rߢ jV xWzKAj >?+R)3h~uA4`)`%\ȨWh1o^ȧ<)Z C, ymrR0HZ}އNgO9ӒQYDx<͂* PWWWCU;;;jZzNǣ}'''}0x0kH`A0VfM#2alVgggvw}+VNǾז!39u {5{8[~b/U;DbccCz08\zϗ l ko4͍7LA\hZGZ[.\AǠHy\,ډعmOûg/0Ro+Q% . Rp*cL@PjDз"Tus/Ѹ /ns굥ݑ&y**eN`VfMY,m& ,δS(4SVuxxv텬l:uhX,^{Ț`m-%WHQS*j~uuMѢ&:>>|xYLK> BxST@pTT%^&Jb_B=]^^JFR@зQ/s.7sȐғKY;P\T*')2QVa(+h:hؓX5 j'yylVcyIw2T]O9O\vؚWF/b⯋2+ځ]*6ƗOn|PSH.>O^JN't}Q 5Mݑ5ryOaCUZ5Meaf=/ׯ}`ڣ͇wڎ$/-FӑHQ lnn=lhiBEO17"02Z_~mooD@d{{{{Nۦ`S r'OSE Ç>)sKEm+Mlo*R€BX-"-D| lUFpP2x,&ddȹ٬?qOuNbB"6SR>bJԆÑiTg$ddWddNϟ?ɉ qٶ\.@নyy4E2E?U7^BmWrMr==Fv Rf]YK&…B.Ǫ~h{ŹߩNa -iVY+z{]"@k:p.Y:ZV'] fv)rMV+9߻x?e4 ⚺7 9Vj6"QP]__$DPG6B_֖;dMcfXoZt_]]yW(7CI2\̺IUW6bg8ӧzuBwͦR1$U:??WLBco}Lfl 1+Ɍu#-i oѹ@@i = RvF5 4KP'xl\K7XEw8zPW > s|}onnC' (^TM&8ׂƾ{ʵ<h:'QfuuT4=gf)l^훎嚢 h(ԻJDˌVWM)ʀwp',;l r:l{teg5* =Ya6է+wZR6ϰ.>|JvwBMEMyMyeUU!WSV!_p0kHUuB ̔Fbϟ?W3I_/"ڡƏýj5Mdf=j$6Mmnn*pо=MJW,;}>pmllP(J;;;_|Y__Ņ𮮮(HK>pجcTt(yoZo]Ȏtzza‰M _6 cz*@E@#E~Mߗu~ᠭ#A9{A0pHbr2Ĭ%ٕq&)ʬ\.' ^ΕJEO>ٙ~gv:@+O@`Ȫp!rt:~/Iln 5Ngr,$Gp\tt Elh2VlA(px*ݶbN_zdpho"p|f?R'6rpWN$;s- aamM.~pswzn5V`}`XRE 4i:+4dsg*'p0RP^t\; [sRwyNJNycc *˵jd; :Ç #fڱlztor,?K"R*l6}% ư! IDAT rKooD/0048p7-HМP5r}詄9ﴡPLR*[Tt=`͵(`5ˆiFFn1GE"m1^g.-$ix+tn1'&Z,Iuyy>mb{ID_ZCέ-'LKm_`4,蛶C^,x@Gx V:==Uu\.lچ[m%Fc9\圊4?t^<}*l!<,US7˽%w ]2Vlݥ&FOKG 4>4VͷNq:e\]~(Y{##EQ'@Y $$vJ.}(Q:nmmė` E k*0@Drzο68hR"j%FW2֐tP`P䐤P1#%!NCeW6Ɔ_~t|AQHP^z^d2_>[ :99mPNTվd2Y (P4BЩqRH^xZRC%lGe/KlszHQ\%urQMWQK84՟0 Hg5qLf- PS!:7'>yDJEWWW-(ONN A`-̺g=iw:??V jGe gZMO<\眯Qhͦ*浵5]^^z 'րZPTaAr6izQA/[p| %Vo'8S Saq@!xI5M!K{Û 6bs+,Ab\;7:S[7 a}2ɓ'^f>ࢍ my6@O,(=WaZ6:= e #UJ5 : )*k*Oay蹨*r$VWwV {ʔ[I3lm[(gf%B RD[ *MEPEX) wNi(KÜ&P((̨X(۷=°#.<,J Lt8щ@"HF; r_zo 11`ntg;39wu^]]immMRׯgݻw>8dN2orHhJ~+Oc]__bB>Rd}8iwwǭJߌv/:[d7 [>T:L&>b!j4ڃf@qǺ磞 d#_uhx///=Cu LS՞.֓>}?\2jU;;;pNNN~ѣGc+pR2Vl I&z'Re3C%CݶoV_d<$-귥a?Vyi<+!X-%PE]mElCrwzU9 VX Msy DB\4 [2`A +8lRKN7Sշw/CFNV~~qVDB=zDnϋ( S$,LF_|NOO nVDmΎj a@0:dœpQimmͫ6e.U?,`_{ BVKϞ=驾+Oۢf`6Ej4~aE+a>%WqP\SL2@ET$6]Zu]]]&LN(\y>AB7#s (RbřQz4tXPZm!kp  FT1?>ELAӓdA5ȵA @h'ijڂ޽{©&XV@$$BG'rG5'>zHv;qͽP$lw u ]\4tÉ2QFX4VyX){2'T{~AbR0V6;Cc~lgc唜̭v Ew\z@-buiy w)ɟ5LKwsE3EU zcAFr`0*?# nu~~C$ά1 "RCQ=r9zhZ,[M07EQjxETT<}N.۷o|`3P?Z>Qcr@'zP777BTIO:?5xRpwff?=h *kv& }N` .(P sNCFb h >( ZKf>Rzg:L5f>РTk3./\D+*ջw|U\ 207 %.5έh!ɕH&(<' uo4*j\4OT*V*dQϩH {\"t綴"39-2fт$ Ϗ9}qH XL*UKMr |`\IV;09`vKw$[0t}MNѴ~;FEMG9n'gKDYs xD%΀,tX=пegwɓ'_Oa۷^7͛7^Gi>_Gk&= _C>yn#rN}xx2xFem;;;SzG CVlZh.#ZEA1dmGUT!'!>$.{4IܿǛ( omG%8G+Jf`NFň&[z9p6qJ"Q yPail4LI)vT#Y-F77Y2^j^=~<7<-9 ҒAu 7zE"s͋A4[WJLF* ' Ì-ڕfwԻM?Pz~T̡U IP r2 o ~MYEAjhiX.rvnNr.be^997:̳1Pm^a\6Q7Q/#7ɩZ\W.WsR.8<61)A ^\.c/Pd͢k@ZDРwEյDfGṟƳa"k7t֖RG_gL,o{|| ,aZGYZ/ |d4<(Ȱ6@硝Q ~y]eKyө>|m%ɬFǩV}k[k@bEeیX٬vvvtsso0~~ o0|+p2;uHH~`ɃB?.\mnM<? ڡj(mu.vj3PS":u 8/Z7yIܬKxDu `"]C YM:9r?UZH|A|0tRE,|:yxx*Ri?$ـpZ4R BcXgA8)OTM$٬{LFNGo?V%ޠ)a3k DChuDCW_מPs_Z-mooK$6Te.A1YG*@'(l-OHnxwѷ\LpqCގ 2q-0.^7MXn3rֹVxqPdp?AHF@ ı`#/ӧO׆  z j\gez 6 |@ϴ.pV d|v?~()=K}!b>QZS&S.נ7R5;@ӉSZ];R&? (aj^Cwmf`hm^%H{pY5V UP/XL#rM bґRA7)Z=~ApGpt`~VXN`'NʂH괜>P碠Q7ҁn.'EN{Ah|-K^PɻKkM-h!( Vj5}֯5S*⬙<Л7oT(`tJ )Lnp aQ/ۡ7`YUTu:DӋ/|E "_z%s.,`c< >}FRabl,5A4 oF9&|YpP-87)vFUH+ަ0g kl |BLS@υd6N@O5 yZ T$BV)~tts Ȳ@ B>HC' ΨYqcS1$T͖ŒݞS\W<BX'n.&X5+b }ZV~M m@]@ ?PѢVY-Dv&w \T\htZ*Q!/v,T/qM(JweXw|'ݟNOےPn^~^~N{[ONս( " e堽'sA`mʥ'SUҧ3 Jh%"uH5A?4TBA߿Ɔ_ù]^^zj]GGGz|,$>JE3`5nrVD ,uf!iݮOZ:Qa(~":!`X88,1ӔjpOF@@:T`Nn EdbTp #e F@> M@V?dFB#PJr@n~@ 8.^b*ه&lv8o  E9n1;?V(7G$5 ! GtݺQ6[ mj؟h:q]9S>B3(-x$j۴y>HM]BA2HLY./ Y~7tu)-Wԫ[V+,@^QA;tPT!ڐy]4UU* /ղc0K<a)ɹPP@Ab"ő0R:yLV*ւEO'K}X}J"}UT p~p[S쬲M9`cTL2\!c۪\9Y8dUlX.=E&&74.Ԩ8dBPUi>Eqssm]^^*H~1WWWxDf=F[ F;7 d?(t\AGQ8Z/IQTlnnIzdFp,2N8ΩnuzclE $zPSEӏlÇO?y[: \cړ2aQ+ TKr3cF =Uɉokҷ{~B ˂uiAÏmYV=[(ñBU+kiuǡ0(ְQtLN*V90Ho4L9dۥjccnV6"?t,%+Z&yZvzR&"U& B֦]71jǬD wjZY94e+vr*\EiS}@ [Z鉥e 8k(7= F?{u Z AkG;m PGGGޔ?.{ͦժSkkk:<<ԫWȓ@ge Sj6/(N NF1&_ }⫀"1fE 9Zo޼':TZ`qT\3b5P[Ԑ'sN IDATd2?e, JRAsdldTi)MlT@ VLjLxrggG'''  ^0tvv/"9f*rՀqĹ~63miÕKĠnOUp9}iaDiXn1p +aR VzCKX E> 5fҸhZu{=\(̨qLX5"!a#SmZv6TS@,ȼ+I 8כ7oפ}z=x a;M q>StUҵ`(,}tͦG--R$(Cv>Q8|/?)|-nEz򥇬 ?+h(ݻcDP绱۵Y9 _Ë?+ <(Xh ` 2J2!N@^)k$Fn0 `ةBl{{{"aU<|f!# 0y٬AS`#CdG5` Zn$\p?GL(΋3G޾} &\C "QC|brn,灧R{i<(+Pm_ni2wǺվ Nª1LVJ9HZINEa QUD`[ 3p!H0v??$Ȣ<Yt[lӪi`kUun}):]qz@݌&6+<@B]77]E*%4#Wl#6,?"mv@OEgGPЃtuuwy.q`QɚDagA?;;6yrj4|ia f` "e:l6pt6ϟ˗:::O @677=Sv"Rї_~:]e{ίGQLJ%1NV¡4׺vٙt&²^ȹSP6Bk bJoNnx<lʗ6&օh][(x!l` *_!ٟ%!d $vei^DT43ȷnɓ'~(p |Idţ\+#+|᙭ e `9L3w8Ԡ?V j؏5MTWfY 7 U)I[LɠuI:Hb)Lt,4!n(jPtS*rh7G~[+-#`.5EI)Ǭv[%0аtӫ9 Z n#i\Q0j؎t}1䔋*noU w:dv&Pl}o](,0BAS6ʄ!+奯yyи`Pa`/^ Qr9Ó BxJ~VDB` yyhV'$b/Mf[u" wʃFG&GEY!Ct!Zrz n_ 'Xޕj܊ؙ ,jo TFvppǰ`i$p $[T*:==|\p0RTt"{#SrUunʄ.(V-Ng|&/JTjf[K⎃ 5'Gzut,0-  iu]\}WT Զ<k8peX» iCeݺ݌]RP&,I.Z}e J '*{q3 h480ອ5n^`/?cqs˗/}p?<n(5?9di(xBK`DKST<*} 厎gCAϵGb*/, < 蝄 XUx.e$m@(áʥ FX٨(ȫk2 ˔5OUȕjK]^q$kG--LnwH(<;3thx]z Ai l,SUyiemb,őb(D`#) Bĭ2O/z@6b}:_ ଵ5n?56V;}uB*Gl5RNjh暏}9͂(N>"1 E-$ć f3πV--R/jd$GckΪ*kՕkWZjt"hvR*W@?Z/;ũTm.ڍ(ߙHχS#acoTͦ ̖ۏ~C;o)wќ >D^?6؞{wߍ/"Z&3]~Y+5H{sGS'$ P3/e[kkO[kGOQg [{sA,X{1qݝ& |"-CbRvj =4&'WAOSuF;T, GWj2*NuUiLUZlTmjetausD*FCF 7ߠdmQѿ¡oze~ߝRB@%hgY5xF#^ʒ([QVիTyrf׭v}4j(fws幫/P=b Bzi fd̋ iݻw˖$uY  E:_q bRv V24 qtt[OCnؗ `Qӯ4p,)"..iF}}8,EE-L7%oVjA[N9S& dY>x g =Xd GYQ.Hwvv#BG- @0 Bf0M{\YthUh6CY\\k+ׯ}6mɓ'Ye}&bLB:j~p$-g899r 3|>}t:IKfC&Äc& >9[.P 1Pw5Z`q p8(BIɡ拥MͺVemreՉ*V$*WRWML=zne;)-J~2Qh񛖢e~k81A `lhh);@^𵿱@tGb_Jg?6ZĪn`̵EDSٺPWeZk==|f><@];=d8=9kC|tkAi3Ă0=XX,K'¢X:p#&C^jmP*zC R{RAAHL &VU{Kb6 "=s l^4,oZ>d&'pAءIUU铧]B!F#$$ o->|P4:==˗/}b$ƨD6b2Ҡx_$^_ޚ x DCjÉ{6p0*buUW[Mƻ*W:rěH)T(W]YmFk_nZ՛NQ>H{4:*v-9z%]z2x3߫?~D9S7C$*=Mgi}Z.i՝QT/SuHYjJPQ;j)wkm֕j2Mɳ\wwzN2@V_ B!)B&of$XJ/?l \Ϟ= Cnoo a+`Žq8}O/JJeC_k/֕eY^. ڹ50H0=PHGW}=DJّvot0ʻc/~ǝ߯淭VTWUvZwjTʪ)#֨.uV'JDWWf6U(61!OfŖ@Z}~~Xk^oi@ƏV.Ύka7>~ϟ?{F3310 1؟g}'n$8P_CԢyZ髯gJ,-, ё|C=C;84GvwwDx0|ooϟ VS$,_M=-s !ς=LSEQN`)`(өV$...ttt-*onn|R"???mMmXEQ>γky7"O?9yg:%RN}KFK'3% ,~/ 4u}/!`]b#bDFᡟ4AI&l k.1_e! tЦ; $(rQz萜xWhHݻwC3¹!OCTJÁ \cG5syV{h%q ێ`!(9@ ;Gájtzzp(2ZV ʪ5nX5ʍ\uQH a"E*J:eE$J2(n\$Y'PT;;{x4VVڮQUjmݨ6lv;Y۪S+kY)2%QdLIeL$ʔHYtzzkF) d`0Ǐ?xƳgDUI(7|ї@M&2z p?&/̰ 7'޾}GHEOcKZz;tF[CmJ!s #6^]H mWgT bP>͓M2`C ۩BK$ԍȘEoջigba&<}KR.nòB8"MC`AWWWͲh1m`G, Xitppu\.edT rk r{pyUdʺUVIk%iu"4Kd"di6JM)SSFUFbۣb|Md%}Xű5s2=r66=LѴGf֚kԹu mcյhkFs]m)IRMHFqz@Ų z)%EZgΑfm1ӃP{+Qв(eo-qa2G0 's4Muyy4M}4 KDQ3`0yR$ znI~0=L F{g"A kr?>'~{9ы/T>N.7lf:88!5_g8a.{$AeF 6~Y^@g9Ak}I_|>L`$l]9 z:\ϟ?n dQ#FQgpAYrYy@Pho"BC(A+p¡{ >!ʧ@f9  z$l'"iƿ((/JcÀDJI*9 [yB,:@ʻ%lz`X pdGGG:;;ۚ<ͼtx 7s٨m; +M?~PD,]DTU*jI"ۉܻ6ÜۄrMldm*cu]:")a|f'qd|!cgFmJ][m|a-s*m4(r>rD(5R-i&Ñg5BJRwTiSV-xbxrƣPJP&\H/d9+p ˧Oz8+l(l] +h/,[...t||{P_xo:;;Tha'OROYv|&ywwoFE pwHs PP塎/Rި 8qiO䄵f5Zjx|xaG::#lW3AP jWڕBL >j44 xh5, }Qޔ`m<IoA@J~ɸPds\Ȓ_? Sx:Pq> bTldZ@شnA,$(zׯ_opQ81T{Rǭ ZoDQPKPsv?,Q*DZw6u,őr(dU6 Q*MbuQ۵T2ꚾQWc:dG.Fi@!I+USu+HMmTҨjeUQʅfiU"sj3Vj5ZͤLZ޹_KN?c6 i3MլSY_oҪlcm:EQi]PmEQD2C`-[RFKj1R]ش<{/uUS- %imUץ^y<,\{fPͺIŵB1eu_tr>} pGJ Mhc;|;1aEPEW 3p4@}(Ɉ*Prft)TY/9ɉw gEQǏFr/~*gA(/K/F2pggGǺ=_@0<6={o:<$}P!#gB%gi Go j.Hajy43P_۶:::R4ҟ'ޤ""HQ7r  w8e/G\]]s$l?<2Znc|ӟGM3Ued/^ЦNphg\ϟ?W8Sڗ988lnB[$M&N𓦉`P+~(ful]#5M2}pߔkEQӶZei4ʹ^/5EJPcGLą:YQc޼y8JN`HBj |+q$I<:ޞW$ M>SNNNӧO ' y}#􃾻=:f5FG7kUbf6FA4,U׵jFqlz:юΎGQkFq;ڶC]0*IQZOOް!ٮsdm_e6o+6ָzu }O4jFnE"'rBQdu軳ـ(akUa)pb-m)"Eq]kvMHԝw:xΗd5l"ѕRUlUj$Ĕ{$$/q6Ǿ G!2@g;*q(iz~'!}V7IcWpb466LBPį{XWΊp3 :oB plɵAIcu޲ķZ0TᜂM%28/<ՇCTXx;G4X6b͑@z5 >= y7A7tnbZ$hg %E-v8_t2/䂾_ - C=:H޿tk8PCש Pq*IIH` `K _ȼifi]m֊Q:<:TSURmUVYőQ:YYFHτTG $ PrG eG#miV"u՗/_/nL./A$ 2a1jejSd塨]@p#e6f^ONN~oO0x쇉CXaYU>|գoyYd+1ġӮ\y8h>ڶQZU\&2Ӥs'}ᮿd)¶q(NqʡֶwEpiңZy+Y$0IEȨijmԉd}?f &WuCf^N@S}Iwww* Hhӛ7oK},K_rbKO&UK},CPd=}}@fCpC%OU6AXS j/"G& д@idcVHjL8Cv,,j+ #L___.>s.a#ׂ:B^d,2O)d% a b"4hd;"AƫJYi5ud-FMza4TVh8r&ֺ:pVJDMר(2]e"bL,MԵ,ulB6"$Mz4q?Y9'I[[4Qg aKxM{z;ĉO"w}&,Pn"P[1R=Ǒ8\_tiY d2VY>hZ%i냨S鏆Cu,\,x2A@V1۳u}#dr‰zGnbЬׯ_{v1&=_|jd (06?~-04-RHb$pZ4nooX^3%2܂2%Cn`ϽZz%c0^JF8m0ą)N$3ub,ijC~(>(}+l(5>æid,YYm8&lv#)|-R5Z##>34ɑx!Jސ~BǽhdU\߰gk3}4W J:<<_(_/`Sq{KM7Bs+On-OΠ |1WԳ)ekSEF@JAѷ9Q1h<«񇽫M]z ={e*;%} fèn&2 V+m$r2cە NvmO#G=:vy'4ġg7 8Mڶ񴳟q'MkӸm[%Y̵+!U^dj[AZʲґ7\ƚ6EJS^6 jjd4unD_K3j$rza5 i 4T~F:V4C8VCŋ?b5!%W^eeY-c!n8"ti*{cw"_UUoɉƦ 5?.sܛ_'9)G_8*# Uנs|B',2,LGӁ8iL҇`c7iL)4vO{z"v^5T41 HT LC3Y؃K d,+QRAڥG Fmh4dulrWG$hcPK[V~n22LLy۷ZdHJH]*kf9^?)pFL٤ "]|iw ,cjCT|v8*7l#]q{i|Ņp %a@_R{EQ PӘ<c@;⩉s/ )>0m^~%8ƒcA1:u#65oXlY pTV!(5ʵud=#Z m#ȡ3fvjh}ƸZ/^l =_]_mOdVGjZQljk&CٮUg={vZ)}4:ety6 5MG;uzk{8-#>HyQ8y_y4Kű!,O]5re9xJEz5 IDAT#> Fq8Ha8v?A,CIK&Ɠ::Kͮp8UiQL3W1($4TUYj8Aj0(eʪtf ùڶn]YWNѨ/%$իgAGymj2+\iM=Ezm6V޽{-aLH޻1TҗDO.^ =0P49PBݮV+^?'jwm/CӢ=o: =18mpggǷp悐i,P/qK8ᡟ&atg/g1A/! CmQw $q",h/ 6hzq^Wx5f0C?fDWa$g [aO A fa AdLdaxHk }" cqzJ''' fArMhrjo޼'? W^i>2K=0u*{&cWWl^o]p4i*>PK9TTCUM,UW3heYO&Y4dͲLQ+2zoGnC1T6= ´v j:70R5MbXx-IȔfڮp8P۵ 2w]YlJosJ:@w(Е BA>g=0`C3"R`BE1P$&@sƲ i8d.r~ C]__oucPl6zVJ@ѠQ!CzH5Cnhm,g9s/yУȳ\+b`h*M1u jL7!{z Y@_ HBOY˲SWȌi :==JEhs 62GH3dPؔdn4~(@BԱ^|)v}EZoXM(SG#3Mcif)k[I;mbiYi4(.R%jܫZV`83 CmʵtsC4.dR6ƪyEZMJ TUxN]רwxDBgkձ:'Pg; \q t@dutTZ>jϠʍ,U}[ CyKMv&h4ԎDU1(H\ r*Zi(O{}Bko 2 ٔJTmi8Kٳ#]]_;?M^z5Q٣dޛFLIrлoU7oRM]e:sgQaB'$< L*¡_R ]И>HCu0(.g>5 :_@0E UZӧO}KΏ?z70zaȨ郌a\ډ$f t.uy97&݁Xu&quF7N}̄&Ѯm~@8˲Bˁ _ Lp08 x gi Z"5ghTZmO\"ⳡgBds +&T(к V@B# DZ<]RFA\K`BCP1")|VQ{\~N&{㽽=K5MbpՔ:9tgm4'F6Zkuo˅$`P(:N׶ZVja1PYVDuU TmJ]h]+cE]nJ Fi)w{a:j]nu2zd_8Zqʵ9dynjEQ,Mq gc3_?KokYٽF㱞R@(c޾}6'ch!"|-b765# ČJ-tK =AЋU&o| -P*@MF;/rYy"x55#-sUՕ&l^UC sHsUu 6&WU;Kr>T&T1&I4*rwI֪n*NvV]*ڏLr&uh#JH\w{ʮ;j]k$Y>"e]Zp_3$#2|xxk#M(j.^-f$gGGj!mS^x2d\,UW u$KdĎkgi9Oz@$N\νCY p8|)hRBa GbLЅB#~'Ρ/B3o1Ε?*$Ç[>ӔQ(=ydK'Ox1V'''QeZ*۶ӧO&!|>#otvvEsf...?3 dl6~WW@ljwch]DKMHA@Ҋ4XgggI#g<̏û4t (uŅoކr@0 FT K ~ lP mXY<öq HBK[*O>.jDQ'$0Իp*'$;5/9Ln"'LFVM*#͗sI Xyi?8VosGjVGjyiZs-W+L%ڞwOyQ'zme4Q8f3I/TjNDU]덒,ӧQ&jVM)0h4(AzS)ו$$V=;&ʪVӴ~eY*Y5uP<˴ZU 2u$SYuYi:92ظݶs0\3uU'Nώ*Jbjs~ыB;Ih]+VÑ/3-KՌ=d2fQ1MO9OM3 YD]՚L]~M,|C9IS?@%1!,\ swhf'P"jZj h%%&]+{{{_lp FŽHwwwDZ&.//}'ڔ$9[@Ǹg!*ÃdJq%߀9Ο}?yhXsߙ=Y%LE\0X!31z3~ȵZ,U ~brHPUVCWNm)O]ҵN\ Kwx%iώTvvh(2+'JTE;5vV(rV.PMU;R噫GWI,UյáЦ*5,Fsu]JLJYkXikS9[M-Y<ݼe7'XlZ5^#HWK #eIMY*MRM<͔dՕ&]UprTwwn/sfʳ\JmhgAQ_~Hi;Z_Vbgsٷp uYb)? Qeޞwozc&1}vv-hUbIqЇqWx^Z`,Z6CuNNN! A$R~Ņƨ9C齻NOҷZp cwMyHy"A+5`|Q҇QU83J:><<`Jb-_#G/maUA=#?dBy`A`Ad"4ㇳ:Al$PIP3 X4;ܲ_h<˶˕&rUe4u-BFq)(zp׹&*Gg3NS^-] ԶVetFIhMh8I5PZ=LJuk>_h2j6k4_.!twlɑZhDAr7_7Y̞dD(ZG_9B!Eduws2I5fbXߢ@{Ym;l7[83#Jů ? az֞y%yyk'0CbJ(NW3qirĵ Ƚ8_quuǕ <www_89@y\5Ξ(hx^HEV3%TKP nӌSDkyn\% L Xo;9H9y>7Ⱙ b˕w$3+%kٶ;eϵ[Q=Ѩ-a;gbIbaAc1TE8=:Ye[zst7i:ią9lsa K302Ow6 siu"9ElD2ٕqg! 5s22(" 8_V2-F(B,e~]U S2-M# 1aM*m"cd]C QBc)%iufuU1׃jrKU ]^D9 8mZgL$uHi!3a욆 ˴1N{JF3n;f߇ UU#be:pؖ `[N?^La]G\źN 8 ӴTT<+ GQq Uh)MajtG(ӄ0Q\Qրc^h^]L#u&|'r ӡ{vo޼AQO˳I`N!d!R&1| ʆa׎YˈHvmd(ͲLÐ ]y2B5Z9OD`Y2~/r(1޾}qP IDATlGMi>/*Xu4uӠmi,Ѷ=qB od(U!/9k ]/S*A4xBzDQIK|J yG#8|eUui$ɉ.Ƅz_p}}zDh"b"a"6Tjp#[Ϟ=g&6AƄy]h8 <<<~'dDY93{sVD1YЄR:耹ޕ=}$1c|eϵ3/'cB!IyLf掖lğ[eFI,Ω0F-@N◨\_~dk fdC"P}3 9'2("dt`Dkb#,*Y!͏mKdeܡ؁k$cYHL30&<UYkw59G],jJ, Vr}=@vy+bVejZ]qQ5 !UU4Lu I ]?[1U8`ٖLaE%S ZDQyu, m#da4iX^a`&t݀ۛ[Vkl! bEP <`z v(FI8##4ypZ E]|€(=ie_g٥Ve1P < Dٌjq;'9NPݒ_mRCS+POˋu ZK-+oe51/ -yiƱ^8yȝ7Ҝ"v00a%,3  w}$-^xxS s̉;^¸XB6$IlcH*N`@U0-eY]rVrğm$Fu`Z!M UiDaԓԵEg*KxHkNk`nNR]8N5sś7oq{w449H E,ϟARJݴ݀jЏaDIl0Zp]g=P$Y',0PqBS ,˅8x69"h0-die D, m {$A1ˀe p<աjz8jl[)}blZ,zAQX+JzAzLV5BpYs=i(x,!㸂6<>H!,K\\\,K-s1IH,\!-WIx$1?MFK7<9sB ai{8prr GRQ(B_eѿe}!g.C-uȄeQaB238s֖;MGf '0 q~~QjVy~Z^[BMgy 6U7udd.L#XzEQ¶gL/cy(D}O<͊䫎F׍Yҗq,_а $+ѿ?}" ۲p8E:xd ObZBe˜g04ʤ;+]9BP6"8=}UUbJT>(0eHA!MsfW U_4EQJPa(*E)\!bbPi1N00|F{DQ IGdN$Dvt߾} BGȞ|ׯM?z$ŝ_6@d?d8n(3 C1  g3>:1Z#" caɗ(s-.$ UY-9-K(q!+Gq$3*d$/=xxJ+-#sbgʋE.{l q\^^www" nYA8KV1$IG|]$Q~߾}G$IT*5hiyzŗ/RlTh}{ND Q5\F.MO CU?&`V{+& <9.v$/^]4q~~w$pnO--[Nvo߾EUUAY 5m/:bvܻ.Mԙɚ{_BK}w .pdE V'^J `Q'#si^҆(y0T1= B}a,?"4jc=a=04S䘼(ԀiC42=EYhm*Y, /Dd,ӆ1̀FE(4Ldy*VJ +)Fai /J)I>.Vq,F4w!^b~BiaFfb֧l%޿4M1B@sDJ%V|Cˉ Miz5;jݠjD'';1m(y( m¶ldyqlU3u}do߾=l֜qrȆx^YdD[Цn!@]UCqjA$cur{Ө&7˶P`{z b*. $\[Bpɂ߿ 3it`_Ez"gv*,TnO(A2̿n"y;;;F$~Ljg_BOdF(+%@5 pssr*C%ˠ"q "fEpBdfb'1] H燺p'G'3$ynILZJ$o4eYMsffb3'r Hv]?Aws. k儾 fX:s!lL`)"*@%'i.z1= ZfmFUWxj\F`0L`%j0 cGs]qISq0#0q`0mUѝ W&#'hڳmZeoZX/jV&jvz C?bu1¨VplAmZ5dTҌLW6/fVЧ() p1O@F8*ׄeJ"qJy2sE)砮puC'MvH )<" e!aHT4lj0Ӭ,A!= ii0aŸ'|lˁ{(PSۨtQvl^>UqpLbR=fFϟ[}P:C$g'(-ŠzNYl߾}SfRMZ3*c PLji9>?ʲԻn3yК(K*8ag>Á4Džו'$E$XqψQ˗^I˳3/...~"; ^x.}ٙ&kв`,;yƻwp}} irfn7>"2yaȬ~ᳳ3!|eg'LH/ud[ZX.NE{N%_-79s^z@35yy/Cz\21arg^puuEp SX+O\kTx(Bw{b'mf<!V05[yg,˗H8K(R3Fon0&N8IAyGJ.E|8!5ihʶn1M3hcWYVgZE# \U6K‘aHlSVQٖ|QXW-G)V+Nbmi&mdYVJ(b!͓S߆)9m9-zfŴD>#<_dGJV 0S\$|TȖmD( Jy:Siu= /Sׯquu4a;tG% c6(zr!#x|||n =KKj 5 K<5FFS;ݮ,/ (աR#2Ƚ_N\<$e9n-noo4XD)y-&Ffs]J2Ri`u]V'?DTs_A-![.9&qAO'`.v;X KB|/fQc+"4ĉ%{\J5䮆ٳgQf&Gй0eq\F,RL8&Dh5G3wt6W³1XJxꕎ2L^]ݼ!54EڶAwl7#V$ugFLecW KBfByvhb0NL(-Si*#p֨j0u!"2q"īyn$05;$u}aqqL}_Q$z'y^HJíZ rӀ L0M/^DS7p4#/rd `e0{]iɊ#qe)=_m֫(T/:_(#QK|~QՒTd0G@ $>rErPՕBg2-KB[n*((o߾՗+l7L-mςg0 hZi~̠܆)"p<ȉqj#"SabGCϽe} rJpY0~ׯ_54]c$DooouOjUUxr&q&<> ﳰs (eQZYwu˳t2U&{`NRl~א9YȮ &)vZqaNZp|ԶѰnS2$KN"wɜcQʛ^_([] / I?#YXOyw4L!<$62E qaP nɼ8i&е-=З_"wh=(y(+a(FU$6> ]'R !TH[|?iuz+OxyZ6U~<0 a:A4HXM>-ڶA(KI#,Ĝ,iX\ਸ਼iqLXdY" ЩH"dZL@ѧ:hN߿_Kgʍ-Z\/_['1DJPd0p]/^@QYk5 eiNAaoeYaf 6-lV(B^m9l m[\]}ǏP7B|uz?3rnkUw'zY[ˢ(F ] rؖmLdŴ\dYaP5 ڦz\YܝfLdzm +]!QRI\ZLD%\Ngp N'=yaŇ (тWs)$7_=*Wg/S>|5P*ׯ_kI+Jg'wDL/,w iq~~o Q#;;5Ry!qfQO0/_۷oYȤ_^^J.($pZ%DN%qiM0$75/&Y,iIg'mvY|I ]jכfұf׻$:Yf% ;G/7&T\䣬j&ԞYñm?cda(E٘NVhUE2P< c$옡:lw[dTw_v' nZP5y_E4(qi"N"4Y/.QNT;prr򤐳͢!HL$HO>i{fo|Kf~KE( <%㘨$%ˡ&Mh祢{cTO 4JTq<$MAr 6v,|Х)ca^و+fY[V H޽ӬJ0~o䞃{-X޼yo6H" &Qb N),5v:!!~>2D0vLc!2 Ba2'IͶmqg!>.yX ӲQt]υ,71( cx<+5 |~`۫IqM<ôl=up5J`ܶ0,5,UqlV8DBvh:!]JܥDT-Ry$qQ";xse%6Mm#jSx \LBQy~)Єkȳ ڵ^Ck[èT,( TkwuUcƌz1^ft\2Ie,SqNy9ǺҤd9lѴ yR&2Czć8=tyeZ(덐I|t5u-d7z0bݩ^a㪪tP Ex릗 'ip~~wC{Rr7Jݻwxxxx#nnnP׵J!N9N yϲ,˰J#O>鉔$'pD7D!|W*u|؎mLj84K1|ׅ8SErYAE]cTп8c ]75jUhZ<ΏǣOᓌ" VyOp-ưN\Y siv;-⒙)}GQ}ykH P.y{N 2֋&d _㾖7(/s.} n[ StLNǏz>%eLԶ-A<)>NȍS2cUƆ,I膈w>'I" {?~1=t{0,?M#:zdi_jub .O@pEYi;;1J0M;?=G%Ƕ%pbup@umek>UYc`&v$߿}׬jvw=^ FwzG"j'+Y0r6`lEzLH&uJfpC!3- `qzzL?c8]nQd6-,90`m$l q1N Bwpf{UV*78J ,z4J|װ^p{'|`?81Q\GZ%kc*اzP75׶U%~mad*\Q"Ms/wi7<qwq|;GIF&5-l6xxxM1> y&q@Oh3" ymj0 ;cOđ}%DJ%=K(g x @pjRl>NOOO;n`N^3Y_|^L708LJ"40DU<4N{rgbl[13ɱֶu+Pz ( =z D߶p=_KdGY|&iRUƌm1(qG ΣQ(`tHWWWյw3"g(Y^"uSt:݊eQbxSgY4.~D'Jd-H~tݠ ~WݢS爠/ѵ&(r}.:,LE2aK+[_!^zG}~ẻ䢺c{_,k3Pg9 ],l~X+5`F#N48!DEqX09$> ws7@jn9ɲbaFXd] .,NAӧOV&v ?\'s00? rz%^5D6lH";. C| 0h;c&8Q]|d>`OIҧOJpq8ה ]tG ,PSj##QӒ* X-qqia.䳺?R< QrOѪ"T?m`(U_UU%+L'1*4" J8b ۲uC3i-ȓuY+OU,GxL]4L8.aRI3̂Dac60C kzWk0,ɶDQ\fnī54iYQ7[d90&mxZab1\0 aA`Y_1=€|n!K3AMgg-'=>ׯ??:Ɛ? 8B'\%ᔅ>ZX*S8rw{{?O:ij,KK tR)Mg뾔>I5%1[`A ^Xd ]2:M ikinRBx)5ZL !sBojnnn4l;i(G5F8mRGrW{|U3ى1 0 ~IH/NׄYvtaw{uu;C~ق :1h庲wq\i(J ڦ˗8;`0ѕmiirf +$a mnZ~TA~2-88D0,Y^ &pMۢS:|W{bA UU#R{#)z tɽN2Ib ÏBLX(:<DfDU-P"Fm@]6]õō\\Ƕ0ŽnjMγ\W`z@ܵYiuNv\ eCخv"K3-s]cGjnnXH6;Z,4z1 ;2LdFSp MDx8]TJò[lk!ű7b̃ya /uUvv\GhϓϞɥ Iǒi6}Sq)I䈒$$ >} 0y0¸v999E}8Wq<99͍ðJ"eK$)=qeưK^ 5,$ۭfu_z,Am !?͗} sɁYZ~_p%MΒIl7ٴt>rŎ]>Ղ{2M/Q~⒞tr9-M5rgSNVB)`# ή+I ݰI`c7DXL$Ipuuh2Hb?\Q,YfJ҅INIgz2UY*]ᬮ80a;כy$NT@vilǒT#HoZ74aM+tUh[Ɩ@P M-e`Ii4U YY$eT4l[?c4ò 4n"ɛICMzbNr *̥~kCN4BgwLA'×g!溮 *M e!#UH $m~i4Ɖ>}" pwwzK4@]ReYXܖKv64&0vl4/vٸc\/Ĝ@|><(4gW/7\HfX:Znjl%giMB6m[ *5F,` VC+ rl;TM-XRqQ7 0 i0MyHd %4x<" HMI{KOtS $J`;6,NNNqw{m1"*Y#=+D/[tLT;]ۢn'b׃isE2eZR덐r<DžirE=`k;eф${rj=-饧㇇=C6/'\BM0 5 W\,K미 ӗ;~||T\/si ҮM͍6-KD*zXpqq׀PX'޿JK>~s&.Sp9#$,r9UXpt&TK2i s)ɡgwaʂɖ]ݳgt*=7OnWp?0’gC7m+='5iDƀF6 0 (#ٷkGsVe#hG=Wy4Bp*Ej︹Ans-R Bf)\Ul2*EQ!hwqR20J.*lw;i2iɅ*X4ÀJdA[w6f*SAg tm/eR4-ضi%e(aY6À0 _2yoѵB0;RQ3y1#&̸CK80LQ`lȫFWNp<<+E'jmJmmeU! Dޮ5l g檓LؗAH|=>}(t̵ %sR K"e~\YN]2 =38p]\\FgÀk]xKLh(oʕؒlqvvm1LAim_F%d9@|<۶q<Mf6IL#Ien<_4 Vu76 IQ9P2vmm׸WF1H6]H\s7 /,Գl^.//`d0 kJ~7 IDAT81rν1nq2O(en?CB?CK|e2! ]u-}+0 3<8NbNXڮEưlS dQϟKy8YiR]m q}>0pssq1N#iF]2!e$^φ SYHbQ,K9DJ8+K08q2Ma5H%rIzK*l/RXxm CJzxGϓwgQ3P<qa!_8išM*zEUVh#}"Je15zD1U"%]WEZBl8e VL~nP޼~8NRB13Oq+ d* D(=3a(`vIQcTA rZە+]'Ȇa Yqx|C~UhD,Z"oXqda[82_͛7/ƒrM#:Xbi].!gs>B^K]ך%і&u|ܾ__Ձ *ݽr߀{bzKkiA驎d"ť?,B޽{}6 K (^Zzr\: ,Oڏvk4 ,'2hvq? ԆqgټK2ryssy +bW Š$I)'Ijvk n51 P$Q4'B|.BR`dB"jR7;{.a9k 9 t%#e:Rn@Rů*] LW_`]Dqk!yFSj"+ʓ3Oz&ª5f5"dF,˄㈃8Y=G^D"pŔQ e ;=쒚*I0bm;LK9tcLK7Dԁ=݂qDlxqGi# # ݀a$kda$9:syi&ilfhRU(`q!O3Av|S[,yyV8S*)0c eHr&vA]WLc6j ,ChBd}b&l6{ Cx b?\iV;vhVJ"յ=`X%+nZ#/2x,EHO3pxԒ"!ABaFZvJ (9xHT{43x|ljiuKq KPHmҬ\rRۓtRQ;V*_Bk9ۋb]1ۇYZ @5NcZ5UR9K" 8e:Zj;Akk]Q}ȷ:JTSv*Qt8Y/Btȵ*GS!iZ/l &SEPe{||Tݲ?/ <p 2tj9%yxlj׳$l#2I'' v^R4ޱy䜠{@2A0$^GDDn]nS׳B,{u-aoZ$-F: ZNVk\82ި+Qeo*C2zq5UJYQV?V3-su:]GceI}tס$6뭚Q2|g Фj*Iqq"6F=@f+A:h(iC{Nm*B-zt҇Tf#N)[o(:.߫Zfƻ,l8ŞidPyV?|Лԇ?b|z@BF;^|nuQX?~Wnoo #i1z22N(KjtHpjǴM>>>ZY@^Z%ClZM=+z^^HCwLVe%xJA@אvNxNq(˗O~# -x4ܳ1qD3ժ^~?j,ddlȓ=¼ BӐ`{Rk㥶lDKψTw:CL FzxI&5M$em`CsIuͶVŮ0(rD4˹ʥ*TEObPZ A~WT8RVK!ߙw%IBX1 '^X˂jV5fө../f`zv6W#F!pk'gs}MSnnn4R48çmJ&=-ˠ} ~Q,!(F蓞nYC܂`1tnz%v4tRd5ͬ7֢]}kDB5;yjטؠӳv-YH׈|fpڜ&& ,ba :?.Z|PRxMljJ5@8's znu\zYDR۪i vzR9HrTRRI}>4mX 勲'ft*01 :0zQfh4  ?EЎV[Y- SjN84eC)!ȣsOge4"_mϵVpTBtu e'm\E+>Gvq 2K*JT7n}N f~LD8Rq0x:i1_D nO\x_0ڱRh٨b+F6QkP;^o`0p84y^k>ѐB#(EѾcW7pٙq{Ή%[uBNs<[O^7܋,ѲRWzED96,ļNo0DrU0b/3rv k sdv<,taq?>|4^g֡ɠ q86 c 43pH8lۈha= e^y.'I4 իJNf#BSXHȸf bVr]$OGvlTggjjIO%mT}ŵF㡺p|ˍ͆zݞR={BB:IYV f+"+yaĤv`Vq˨?IUkgJRZa=*0=sye5*Se`b$ l6M!t C V4_,ԏ5v',߼Q0h4VV\pa"8/bf^rZ h6_hu8u85$3ۭJY^O4 .subfZ0oWY"iAjbh INGFVvTx+=>j-@HggGcw}?>cgL'5Z`b& xΟqpF}Ru8 M+)WG켒ڬZBĝZxA$FU$(e|Nԝ $Q5g^mk~!^J5~<UUը\&++u0?TR5hj:JJDfֿ(YQl#5ԪwZT?3~Xo~4ګ'u`( V+Ӛw8#CNF&Z7v E)R2'2)Jԡy?x+dѠUz=aMT[$/s}3D@=IA&$N":_Q xV& ©=߫횀\F&#ȸ/Ԉ?}~>X.%yj'KR {0"8|͡aa3V":!,?<A5eZUp8ׯRYZf[Y#3 guT2l0{ˉ㑑v Ud# bX,#4Mp9E( ~ayF A'?8 :|fe>{FdX,tؓ,bZp>q R/1 Hzw}gM~楯az'gD숏C {noo 'z \,P F3QΗ,òR35t .z1\ax|$zuJ(&1z7=QRu/@uw\T:iT^6TZ*M*:IjNˈEv[E|HN “ǐ}ML#j6٬+y$77/jt:i Soϟ>r#ų&Y2O'eK ,Y%⬀ C#u<#LȢ> *JFHj)Αu\Yt/FPv[WWWajvcpmThI]'^M5-B⠴k^?m;a2PQNٓ,GT, kjQp+w=gXP^<\.\yQZ)/ry|1;O޻v;{sNqjHbAf-rlv#l'L`w]BI҂Cf VZGF#%LV=L3w]u ~ ^| CDL3VPRje5e rj N M>1x<)deτ/5t\|3HVNg  LTe110怦!(|  N d~Q'V^IKw `I0ϳ.AuP5 \X^GIRYrIi[Q%MCr4-X5Eld!D1oN:Q<%///-k0,ȫR[N&A35Ek_9 t6{ynanºۡ6ZS,aD-U%i m#QyWT^4g2oV780A+5YIcz8+DMBi^7˔8.vj%Q6YCi(لyEJݾƓzݞۍqx^~?82$IhRca>d>8fcŴ2`p8{~7ksfPizIbhI:??h42=h@@:Yx'Zv gٙt~~niб Q "zUx\X&0nz 7[4Yo44h6/u+aMvK (KeO?{q HJ)%_/ Hߍ3&X2iOPBx%1A(nRQ{id^ʳ `+d|>rn%KCނ?M3|~!́o63Rп{m_pjju/"N͘6'pyAȸv|>7T*j(nGaP- -A,AoD,̋-({ ڭVˍt:o8k#Et@"ZWAhFBi5UeE֛VHvZobzP09)[~WR+TmLJݞǓ՝BV!"RIVK$@&d@^i4V 2浑}PXVz>W^i\t:ohd GOØ1ègl0y߹߫QoڢRyPVboax:zv4[U.TQ$[WNgZ.W[ga岾yBS8',Zd/W+QݵZKIR~r^, Lؿ\F `IkubiC`ȥ.ϝg}k7l8tT+鴠˅G/$jŒn RRo޼駟,'WӖX,t~~dLj='4INBQJ9(zKV!y h!O!P7Շ'd8qzjɤ}2J9 ֋~o8>c xcDMlN75(׿U̲ޛ:F8pԓ`X8Sv#=@ρ?OCM?JyMGq 4)ʥ0S6$ DR^S#IEYZURIb`P.SVo i&CjA2wm[BZN5wj<ߨR ,JRt4aZ Riܔ6֛q(AZF ,\@*sJ[s'^Yŗ` 8;ALIr8E\`Q&YoGEI4]%DY=|NyU0pA*KZ1"/% TLWWW| \_[u;_BJ%j`WCPw\IRÃZͶju{J*QY*i:*'T2ͦsyQSo44Ol "1ɝV'āx-KD,8LFgtqqaV \7_$ItvvfN }QaIac03CfݝieӰfio3)p  L*F`&#6j8q2wjURIk0 q:hv8RV lYJj,NK"cI  dǓ! EN-W[JZU<}6U$wB}9J!Í] {G4%c; h$AE Ƒ?t(xYXOB`!F3 |nQ( N뵾^UR;ݠl?LJ'E ͰFCRb#2qoY.1D. .蟲 h}"ň" -M&@&bFlC!}~d|P`h<?!FZK }@Bd8gU&ӉZR%֟::ڝVʷN$v{M˥Q5-Ѧi펚͆kFޯ Yj5pةGզbݮPJr<˷[;//T$D7^i4jg_d|_#}o70 ^2o:jsq ٭T*7X9A,a&_r' B!$m6F#Ee~aNm6W*"AݫY/$t@ZZ,fAN;!yNU夆fvن}^֪g5}ެQZ-}ևh;6jNlѫXJJ,l69 _ggg>|nkYG˥~G>Zk,> $&ݣ|h``G2xOdb\Y?l6?øB:Dmh&@'䎢l@Tp~h"#q68Vz|+9 wmGRȌ\.-# "cqxFC/_44djjv8}.%8=D/@ xHG1'?>sfU^__k45T2$~ڰ yߩU-KfY‰ vǠ(b"35+Nw敊"0_ժyO.\jU9?<UocI!PI)Nʴne UN#_4Ԅ=jUז@"eJX\:.']\\\X& /[)|*XX@}8q -KԐsQ_^^jX<%Z:M$@ -8<4z!Z mSfia3LT %"z]?6dbh^eZ6FIᅩT*ARt6BlXEO5ʥ(mXx2V 1w)`%k[*BgegҴg.$Cgq QWju7Q۷z̐f ?ӷ.P~LdTL&zvvfgBY  hdh4r$OĈCڟE~)hQѨ9 ̠En/JRA?iM^x'jڪTkɥ9+UҪ>Z ^MCo8e7|_~EFC>|0tE nr_QJK׿U?~4??Jw&8lgdCVLVoϽT%ϫWh6+H&Z[KFc8H=(SQƿg2?ظ( k'k6#"sJ6Nc0lLثpT ,}+v^gB@O#!p*R[xx0]a?rTt8Tt:f$Du#V-radammDi6Ng(Bv٨()^osc;ٸ Ңȵn SE4 kyZԄz ȫ~ZOXhm@ (hԊC,4#Ѡ}ԅ޷zv;dY/nuyyph"4ROJX"h>3mw+JTVIR\=A9ITIȲb sG#LE7CzSVFr)-bRIR%?2,6M>V;6~D1 ӵf5jY"^<a˾:AlbJpRsDR 5ϟax6HB>BZYǀB皳G+~ %Z..., gϞY}$+,ӏ?J8>vrlprM0>cXz 6%#.l$N #ɖ=8[jnF{ B3AQ]/p8顥Lpbfdcr1d"y F5)U8p<ȿa e~QKEͷֻV*tnUVu8qe6 >wEjZR fU.TB-(Bv>+,IIXB;jۺZ- g8Vʣs #&j6[j5 xo"{d|Ge@}/ WyD ;bzwwg$ri=">T*)JN<I ?bsEjwt\q*0 0!C)!ϐFv*Xz^윅Z3I hc'$I0\ǏuuueDm岊< gq>IA4Юۓ¹9vE Hv{kÀj5UI%'Pbfk0>+hvu}Y=HӚQ:K GvIH/.uh?ň,g¹D3t }SY@)dV槖YW0܅lfF{xd\*6 ؑxgW=hݿ~Z? Xib!yBZmBFK`-'M20~_ "aI63⩁6ܜJHu[փI50O=&[f`| N &6LQ&ރ%(ͱVD`\VfeY-QG5M-Aݬl۝;ʷ"7^kZ[Fuu5d{ T}_~E9`e}&atx—W@æsVglyjtjg{~~G[ r2Iglܐ.ZH9^ {H>':!A iztJKS&SBIZ}WVCRy)?'a,=Dd &IE.#'t$IKc!YD%&e$ ͳύ@zyJ;E gqc q\HLIuz1q8`=RL rϊ#<;Wigd@vO"sY0zƹctnϟ~Zmzz>`7BM2d Z y MJ1^DF 1d/ΟvdN#dIߚE}u6Yzpjjޙ~z㇓`y~W$<#[V&rvWWWbc}pnuqqa/qwΘ;28{Pq tWћ7ouQ TSxyyCW(TUF#vZs@)Qm(^={f##2w`kx;`lJ5?C[V8$1P3Q,N!:ObpX/^Q[uX|p~-e2<(~wwgFHșV?IH-MSx²c=d*u%[&#ۡ.MH3t:5'IDH ,dԮw `$m)?z//$A`0Lf1;^ e6LY#ZLzt:O lzX,LTnnn,zyQ`N~|dϿ[ IDATf;NA(./!A';«h%O`Jz2^??a-ӝ;?l*ro) |Rdh)J k'5".N Vt<=l6-ZAb[ <+ =8mnV( e.<ƙl+2 C]__!fɺ9 w!eE cn{%5XDx7 W2*(2bp8I (ȏXpcZ'D#9C;X=N3;Pβ@]ةQ|gkDQJzwiZ_0,tssc,F[@@y[FG Z/͎ 4 5jq8B!`,6(:zTh42~_5T_в4U< TDj\j^'4 =>>j0X&Dykch]Q~7 p3[`GKɤi";gbH: <5{xA>g,k} ~` > % "@0Y_J$4=>>>ARY֏r*mLD P%lA.ghׄ=ij0Re833R~2+;4s`EggguS m0q3sdFD`g "t1ِ0K6 y CE/kԳgt{{kmh@|4u.d>|.w6 ~L%FuDC3hFK=ľsͦ]*ߧ͹T*=djW_:k&eH}Z Q Vyyi<X@g2/DE-۾5ǐSw4!Kމr+/Ksk5iYO~Ϟ9cMZ>~h:63󹮮 YbHيg?÷ \2}Pp5 ƶ'Ժ޾}ϟ??A@[JԸ56ٳg搰g8p8wZso5u\92 ӋiL|i-F 9A 3a_xx^]9IIzq lqDl6#,$T`{u!y1ʄx&޾}xDda_2'~c n[MKLGs`9h23::d"7<gh!)QbS9d`/LD?{0D8adqzD5L˓<♶~~+`Ȏ=A`^xa7|c3B1J\*y7a0nA7gcq/^ϟm1@O>~h5X{^E@{qWWWv,WI`qTըAtΛ@RAJozU*?϶jσ5McPKa81?*6Mpy[m3!Pb,)rl3B.QњuACl5y.oK1~/'kzmK69{Lu 煨La 2gC`0H#zьf+駟ir1!R'@'C'd6w?icCt$ $a,`\ Ϥ q؃I H~~QZ*B? ώHK$^RiI>9qy7bзgQזLPV>L,bG`#`)Cj4G*H  o;|)ր}gs^)I $ӞO\°8k#iy-<˺iHv;  *J6YP电9_[{CC{4?'C}5$]|GNɑdԴ!#}酫/AXgD+ꀐpD]wZǣhT*3DB97byE\ڼIX99gMdFdɌ- M`O6YT{Å 3Xdr,OV0%撃L4u,bag^(ʄ|ZX+2' J<3:Wi ?z8Cl;hg.{P2N$OV z=7)A(P]hd6gIdb =ri:do~ K4?;8phDWJ^dr%9c]޼y~͐s scZ5D+f1fJBCs厬x0#>V?gs5\@ӦAO ( Kp\%d1dR_t:zxx0"A%H=Ȭk q8cbD6lRSư{,8]893v萉⌱W B;] ?;;36ω"@!ٙsq >}D /_@>B2vPYJ@}'Xf w;1s {A {wqqa9ʅ>9Nu϶džE!`~D$Gz}b3̽ЅFOFy"F"3jCwv2 3~-XAo ^~KH!n|mGԂLZ̡sX8hH xcH-cCv8 |MO©>ޜ=)2\.4NĜ`"cz֕ h 6ԕpHA^D@>u'GJ p=Ф@VO SIY{Y+;~$emJ}`fqK8A㈍w.0'g+xw' A*i EɄ]&3$b#_x[z d \wHv]5㳑CbN P9t"33DR1~_R;M;lO|KL/ j{زeY˗bQQDUx 9P ڦgbm=vݮ>lu; e(~<ЩXFBG 'IbunOR+jJUA{Ngp;߁ya15$ Gyu2&yOy~DAo,b|`/Q>>HC#gYq~]*@a\`$05HłP6_.GNV+c>>>ܗL/ @,< 72ڜ[Zj^04@}xJ?>zN~$+@w50I|{jX]=HK(PMd8Zo7F8kr'$`M!fYf3-a 82W&`@Hā\!!B 6b?9ڗ$@At$ZuA 9, c jLji H H0~LoƕK $,s6e6 'L&_,B09,6h{:G)nJjH-<3ύ8ʹ^~o Qyxx0}vvJ_ղSNd9 Ըl6 ~O&3JdJ|Wp+'fCNi;vk538&(uC@s<#XNf4>ri# < D o7 R|wb#ļh wbΦөu+}~6{۵Vz||4TA i8x<ٳg& B b'P>K2q(*7OS|+ |vvf@bȈgapk-6_^g!I]__?aAsh% ._"pD//F 8rl͛7nFx"7 x재v L@o"Q1$0pG N2&%эcky5MV@{M2M 6 ͍"?jh &dQ8{!%{[CDyk2`w {B'b@`Gpk xE[X/L?, gY>#lۺ{ d@d_FS~ApD?<$t!fd??Iw>HmNlŇ%m0v(PU|=d~5}7!0m4d8UzqLdOZ| RdQ-up@ZvA;#QZ$y(XAVLk l\8q__vذ&s`jF0^ʋ?>}jc,^gO=p4Nx`Z`~#Fϫ>aޯx7wo6&:LO?\>|l ~8!8E&@bpgSӃ1u(;=<<_ח#bx  - @}2Jo@"ʹ eH[ 2l?^uBgU83/_;O?2~83$wᐭY'!)e!xF9jf$q^wx5aH~v I>`j$ZARK𲔾MffspCCM{rH#aѰ^d6% 9+Ǡ } 3laQVXddL+ \Y$^:1Sxvzt^Z|BN|EM(6{zzEx_B7aX}_"lT`e U@&TXW*lEHVho¨=QWc@o0 /uÀѱ  AV!kL'5p؁cyl Ƚe @]Yǫ'*r `@,q z# ;ɤ D`q. NgT|!蕟r sgFE>&Q3fw#P3dk)1dV0n5Sv%(!3hDn>G졇HHG:_xa/]@?Ϛ4c^" gto0NgE#>2%p<@>z"O6}m&Cc fm %$ [KGs?_wSw CBbZ$Y{D,8-׌DZիWZ r=d@8fۋNd_Oṹ`Q޽3#g'xPͦ...bP)f3{S!ڰU%`ؐ@(bm|+`kLC-ϝ.;5O"3aBgǓ@.gxգɜȢr qv<{l< |zC D <(P'33V~wikOpb| q!Sc>PDOGhu``Yu`)K@ F8dl6j|NI(NFG'SK#y=_=*RQ2Fe #aB9"`&է(ipn6=FGd1Ǐ8>rV4'D;nnn`t QOr}Zg(Ƒ :"0#^ B),7@+( D3kY85 xGXgel(6rw.˙ W˾ +#bq@WBWY7?>ɲ= Ẋ|g~XדZ ye&!o,ޡP,P7jW^ )ς"cN ׏?BER WuR!F גQk"z;%0g8nq?`9h^ ۷_@s>xd{4 % i C} D o8/S3CwdM 4s>iށy['(HYw46 _~U^c?l#>2eT/Xę~{1jX~ 0>hñyn0lR^JjO(=~$(Ѽ8qV /74Y{A wA!Z ;{< 3j/'ufxsA ,a0Ĥ@S9ȓ<*Y>(ygNGRؚ/d 18UϬ󓽔*!{׃1 iqPzMy>ށϥ`? 0~C :9 J)Sߧ 'cHH^\\'0^\\v߽Bl6V2_3}<CDnnnl+?`Γ>z=z. ŋ'G7r<AǙFku'·z>X?CQe=\B"@Z He $nX_X,lFN}ck@&I@#`EC@ "IOcNLrPyPT@s/QʪtBsE׎uΈR8yakrd= {]]]rarȹ3Mى!0ˁ9=$[a3Hq:###Ն Af92O\&ؔU̞C65D F SYGK kO򲍏!+<٦=11Q8#᜷`$36==]?D9FhDYKRQUEpzGu!Э3ʐOxtlgBe AΥ [N0:fzfƜgffg"A%i&GYryGs}&ghEeN?~o<>fɆCHY?D&'p`(r~KNNAf84c^HYp]+~=3瀼իӧ\{^WuS—rmqq̂ˬيmfPA@"G!Lf޽[D?GA2AZߏ-Ex>4ȝC!۹jѣcقϓ0콩]^^Ν;wJ3 Q3/ЀZM=p9bމa9IkfwɈF߾}RZ"aY'SCu8y0֦ˍΈ2tkrHY*+-//37 @x0kAZ8677W%)<;;΁9{LaMI!lgebN}ɞid<f1 ׁ~s@^AθZб$1՟MШR2I(|9|z!͠T.ϙƈXY8֖}j}r-3[1==NOOKwA ;Ki`lS8o߾J@OF亸hbtʾYwCމVCb>'R"prBj{;::*6=?H{*(! r INGF"O>v:[/c(efpQ:ZB߼yvwwPPla<Ab F-PJk05{&:r,뿠#z`5(I9]:rN"2 G{e_nUiKKKmkkhL@0@0(=^s)J# ׯmoo_B drz1ؘaY yg VJ+;TV@%a9Qd###mXYY)}cC@K˗/mff4cQ pw<d:8.{vM"ᴉV0Q4FrHK.!kV8<<\ӿ1]fv+-T2_֎!h Oȟ~,bsFe`T5R߯. tsAlWj{k536Rn :k!{nq(rV޿$t|rEB6) ޹s5 /6R_dԠ1;DZNNNvlVierrȐ5P`bb_&R62xE`w)#gI &q:ÇߊNՄ5cyIe @T:qϞ=+ҁLv\dtu5chhDο,H,2>88Qj Pcw,2i T Dz1s純:΁嶵U 9sCyn;8ϟ2 XoҷF~W<]80^Z] :E#V1؏Hw\hgqəV` t.L8lRΧ,7)`OI%3P###myyP vqqQ,Y"CD2韞o߾(J@ e`Ɲ () v?CX`7o=Â="<<|(`yJ&hu||\vCg6$Y- Z hG*b8`W=ܲV Y،κ#EF/K'X.))X+MF!aӂ( sQϑNșQMbe%kAdjڐԐ $_/Nv+i(wIX5J `S99{~xxjOhA#|9cccuPYqv$(EiEPL w^A{Y_>J [p# PL`Ɖb}×?~,.AC:tڂ2TrfA ]a%đb-J5U-'iM &+ƈ$J\ |rIʲΝs:;;k$$Y۳gQ_DF, >>>.%q.zB9(ٸqhѲBp635lv*?,Ȃh"zddf^#q)IDcAO4rNՁˉKʓɟD>HJQb`eS#99[!ghfff1bkYL4i9@VFGGt}& F ( TRT70sw [i!3z;dxfϲv=YƩ;d+Z?Y74mjj n7/\J1uELk\5B-Dրf`Ts_' p##' x7?8/H 7!ֲh(xvYwGJA 6Cav1ɫLe#A2iSJcQcULY&Pe>?HV-gbD96"+o'ڵ2E>5FF`g&):*H# H%H2TMVRgm{{{93zx-//M QNϪmAxJr2+:D=j9Hee[ODzy30@,\1qttT=ǝJu9#צ$ @OiDcSmP!45Lm^]]m[[[~ߞ 8DQ=~lBdtChg 9WIDVn~vppP$_~H$QaeK;D)pfBÆ.)Ji/^Ӿ2Cĭϟ?W锈&qsˢЭ)Y`V_Y3%$dCHɂҸɈ<cmc||'&&j]M&v.|EsA>Wpv.*AdgSN3>_~>܎rޮ9! s(9"Q=}2&̥%^liIMdzr(yq5DAm u{C$HLꝂfLx V6ϊ߼+xH8b52=-s*@P'p&<ڟ^~ [ :!-*Cv}JW+++5;B ?88k96+BrAPDMJ -lnňX+s, ٜCd>.G ``"3}K9˹PiTL[+T'u~؆J4@` L y["(0<.휯P˵鴅> WtRvWWW+P'eeC_v1^fnaZ3p}1e4}9`vc)j7$@Q5Fz~-  `$7GU$wmKKKeXMisVtf " KQy2CN^`;f19@oe.eTc.//y_{ZjSβG0!'m{{oB'(9'}x q g9) Ԯ$իRJ87y%;{Aւn"YaBy?2A`NcS5MY;KOO! Tu ymooWQp,IYhw'HB^Ƿΐ7ԏ-9>>̵/$~ Ag7D9P;fI6.\6sommUΆ#nDA>'Od>e`- 2lIAAqkCDĹ}'Ch>G9߬ P@j]f:^WĒ4ȩ3-#-;:ғ'OBƧEMD_'ttt{}| \l#PQl(%Zz1WY/_A{Ezmff˞Ǐ ޮJJ r||@랥KvNFw]]]: :H=̲Uf#BD' Ԏ!k°̡鴩JՀw"_D@іmrwi}CCCӧuh5VĥI̒%=j{dz>~dѦF.P}E,iSlv - 9/z.d͙L@ )Ϩ˧hwjO7{e`o# IDAT;w>SL-;I}`>Gz΄ϳBO>1a>^mBU2;3 bHxIJCiF-jIUj6JiӥL!>G: ZiB0%mEBF2X# 9sxvvzBNyG,E_[A@Pi:-iCFB{Y+e"Biqk^wRdn!;u) "Pz  lɎl.B"UkTo׾GВ,]MP v[,؈Cj1ӶVLoDB 97uxxmllTPwdd-"EZA8ak0B3E&K/{r<$&5q0dGxh!; D3E"Ӂ94#?cgj3Fm:GWOaR|vvi B8zuCƷ9 W&gY*hB͎'P$EM*1X׭3<pNle ܌8z x ({S geyy$٭KNi MҊ'es6T'Ct:Er7Sx|֐oĞ .5 c&E.&yY]t 7o^w2jWH=&lQBkH6v&s XF*䎡(ׂB ]y;;GrhmccTjAAi{{{}WSL5.k#M655׎499YQ*E̜޽[2ͬJj"yP@ A.2ΌU"省qygf O}TRԛH3|Qy v}sUSfIAxcw#ARh/իWÇ}'Q+5~,B ˩Xꖲ;C_vFFFfeϗH|8VW55TF^CEܴY_A}`uu"No 9TYӧOv^LÒL:lńPMaI=ߍS󾭯z"怅Մ] cR12߃,fgI%u-.k5v_~U̙sD^()[CYlA)bU^)Jp5,0ƪ77;HGU ?==-v38)&,zp-;{i;88.Rj'''maamooWgKupp`1- Qb$y={2lUuoA9;\5ܹsOV-(,;rZbYI В錓<[CdXwi?.Ùcrs `63ǯ_RVݻmoo]__7o޴O>8W?-bOf`<dk}}0mnnzr5P}(_ƅA :^3/P#ԧ 1OVB6TƌOxS$"Ё@2 qJRwK pB9ט#%X-:չmIz N0'պI"rT)L>\:hy D:I8*bÇ[#IiWBa+8ST>&vN|^jڳ8'۳C~7޲\R֘NNNʶ1&#/K*.xpWP-D&Bϓ sd KrJf)E,^N{HY,*ѷ /wE'Aˑ(5RoNןeL ҍ0={ \XTD @@t2?NT&˗^Мɕr`)uW,T"oKggg ܬpSBsYH}XD k<X?Ȇ,Ǐ}`,8Kw(FΑs{W& :t*;IVɶ$HqlDsoM$~W\{5׮V_bUJiCNC ֶgR"9??/+CsA_:U&7η6Tc(GAi)en[4H'g`4'''jB aN? +@>B3chH"8[]|~YYvB9T5|`) v}}ݦ9;=Io޽{W-\5Ay >AMI<5?PBHJw7hN3A.!0f}>ոQ8BwZ@pC'C1[L5;`r2M3^-6ϥ zu\KgTEA*uٜ̰hiWaN^)sɀNq9 ٞMq ͧLg ?19lbesϞ=kLU{dZ {/0!w߾}yM!֑҇Q-~Sֽ"o"YJOف:nLNcH%OtATvɩ`zrT̴>u?tJum]-dmΝ;[' pP Xft~Og{SZ+ K,Xg=;Ky }P筍S P4v@@ 1"d03p !H*XM)u1 WLv%kXɰMs9J799YYB𐟯U b3D[1uss3Dw0 H<|&愜,E2I" CsUDc2!ȘX'#ExŦ7ճlfOf|]YY @DKJtdmtCeRP{zzZsj`WЩ-I7^WsN~xc7j).Çe@==/xv6sp@"@𿠍9&ršy*iAT@p` ONNVk`Jڱ/i @ ׳Ij?>>677FAa|fX!Hΐ7uV|X鲏cw.E`TSP?J9sƝ)$|EJ#YF3!e*9p%B ל(CTq̖+1`'G lnSwzzVVVPP1q<ι"B$~Ϋ$/w0e9<)"q.~7URJ%u8;Ç E95!S~XF9儳۷ vqqTzeQQDi:{4sI8Z sR# Cf (pj)!p42:Y۫YO?UXpS&LĂ-f%v_ex)B_~}2Q]67AVOM$`YX:yyvwwK=F,ݏw-I:IpY3 yvQ3H$Kb$_\;?Y9^,ŮZ߿Z,[QyH*cO3N "űp]`ugθ8"lfh!3 iTu{/yG%<x`VjVbI&)_kA8fNe g3ʜ'?~;G$1FyN!$"8D-YLB_U41]7>n00'd #}uuU 9X&*[]˗r)H9^ШK(=88(չDA<16Ն]g#']}YQb8p~9HǦĐbC+_ٔa ^'[S'V‚P8 v/KYZ{]9ìlbb6<<\3{^ϛ;<2AɃN4D,^ްl$͖D>ed/gIpro2!,{NRCj ĸĹ" pȃv' I:m*zmmmU[{N+F.su^9lH V Sl.~Z6Q Θg#J͑n[ǩ0MNN4@3AQDăe|=;n;(Jn7`MID zֺa~&''e)ŞH :c$ 235V؂[N_2tm>Ӕ=MԢf|icccZ3kyd l@M#F&L(CѦ\ !EZrm{Ѭ@\/ʒYqvZ]GCRV&YFwEI#@auY/D17"0x >AZ 4nb~5ĦW KADb3az)99&3?Su | mooW3[5JR;'XQOy0,MѲ˙MOO}ζEj\:޲^&''k q}}ʀX眽ɓ*9@(e-)ruu՞?޶+ȁ.iȉQ,e-Jp=ՍGGGak1UyQnsjBP$ lS"mJaEl)9;9(l{:9 X*G {[ksR6\{QB5u\^_$csr,P1' qHDi J4aZ(5Rʌ]ܴZ90Eʍ1lpȀql_A2JYaB86DjQL–hzz`jf kxxO?mΗ+TV3-ܹTHn a61F;{e`*SY__onoFiOrR8!ЮȈ Nd $,A1v'9klSzvrr]\\ӧ%)'zd IDAT"è~-//W}{ˢKqnՈϯ_'c4aRwH'E*ik V!qLXYni\Zw;*'&&e,L=yJNU9lezC)[Od)nTJPId]]J01gk.}|v1;.} Ȇl2p b43.8ujAs0R%Ggeq摊H[kmnnP6;\Uhԃ#` g{v%Z[Շw_Qu Xrɛ2\q`&c63Xi* ԛ] Z:am_\\V/ÇED2@pM{C.Rh8mkk/qS53hZK3we}r޽?YЌ_5rlIcFÇmww"Nٕ O%UKw1FN%$Y&:G]u~joscDE6ϳ,b% <с9abp5)6Zm]EiM?p Z⁐`XxR5]uNJ aGN0 8*PowXuL8Dr &ӦƩc3~ %hAfo#`Wp |b#d;s)~?::jSSSe#hNK+3スK`,ض?2~O ⦬(ۤC}V6Rk SΔz}0B9RO>+e+Ȧ5cnU'v2;;[A8 Uuݲetv@y sudk^t[wRz5S -N)G]&?z{688޼ySr"@>O655W\XO/}6^bqfYJdHK:ރQuʇ5=nzz-%.w'\N+>#19緂x8;јCȢe"3ޕ Լф'nSԟ_^^öXnADB_~iu)A٪=f ̟MlMX޾uZ $4vM)e1 -s.kNz!h-<*8↺l#$RtI=z)1X5 ؛XxǗpdI p~1 ,b,ڬ١4 $RJyލvD2 aj|;aΛ7oZk/xY#K=DθBvdSa ?۳`2hR@IU968Z;~ZMk͏?>|P)U$0A㣣6??_@W=a)q΂r Mk2ۉVdsmuu-|xU(-..655ZkU277Wc߿ϟ?nA@ΉL͙"/ˇ@,.KJd me R"zlAu/C}<766vvv*V3^-Bq%8IIA\ϜJ)ȳ*( &sZ9s[@Fb >J5HϚ7۷omaa)a,9!H5633SIN b$guJ6o}fy)J#DDZ M B`?88X)Lc)zu7b)/{ 8^lҝ}q(e=O>m^Έ!97nhr2V7==]םwiJ@ߙtK^sxxm0mI.*HZTʰ$YH,G+jhʙ9A/)^de>KbRp,WQm䤭= ӧ۷omMMMU`3>>^ Y8lR82H>)GR3HR"rzWKbvzW% ܙٽ UD}wfs r˒U8.1i&ErԟdjJ5XlP 4C!CU"QHiD#6iS19sI ØKKK%>[__o?~}Tqkm,̄nv a sm%4hǚOb<c@fSXA$0::Z%ǥ ZpxE}{dB;I{y-Z&d&Y;88>I0VTBrV ;o dsfs"C$3{h @߹s8A,W~)dPH\F<`F+ wwr4h~}A`JK6 9"D@O:ӂ@ƑjR~WիWee_fY ɸϵ&6Fz4NIK D Md&}F:! 8{t!e `蕑g49|A 0j?"5&Rmc0%`KBѲQN)e+bvʝQvQoONNJO$d=23=99i+++EbeY9d-//?V[ZmTtseY⸜u7swxgggh3,9Yr>Q9*Gdq/ H_05/dqju.V|MTLLLTml=!k+'39PCʕ{ plUJ*"RGCv'dViO-h/SrgB0`O'-cq*.66?KG黲fL2v $B"ezD"Ib7 A`lG Sw^)2drԢ$ U/ ԁNI} ܍`%p7633GGG~h#f4tn_+g%LȾ@I@FLa);#1"D%1 pmo dܥl`looqY)SJW6566666*Ch) #0k駟F$>RoBz^9B!>% %?\fWISx#j)Т.o\+#g?YJsvpp&&&*һmw麟FnL%8NBNNNJ]:4! 99ͮctss%Y@'p#_UlwKBkdʴ&'&yH_K÷` WvHET.xYRPh1hqVROTa.u} 1LSa̜ZTD">kX@LOOPV؄29d&ğ੯&eAv5;%iHE-gI0QƳޙ`-*#Yd!PcköRgWJf=jO>`óq>/^g;:^ 8*aNʞF$͌ڝ/A}u="uvR^1gO˗/8daŋʎS:tz?xYESC@/AiX6Ų T#ű'JW S/KŶ')huzloo)jqq}l{)qǐbʂw?Bi]#{ُ}J8tjJPs5ln%777fX]850$-j*8LuṙRI!DR|av.AJ`ٜ 6DQ+vn2i73oOWjADs_=Wfޔ>F"C^̐ec^2]rE,=r7MkMMMs82{ |r\Es=wOr> G쉡vvF.d2]!pγ>_Ee ÆoW9C.IYIm2=?5ܴ/^*>D>}UI9 =<wN{>&Rq=8zZԯv/!bZg8Kusd PdŞY^K5{NR9 Nbұʼn39?>N AH# : -"ϩc {;Y;T-#,dMa}StHGY z 9pF`P):o#0 Ό2SJ&WA)%9nHYdÌcuם&o<}Tؽ`.zq1f JGPu||\poڶCI69::Z5A6-KJO*zBpۧ~.W^KfR 9^ ZnnnڀhC .j zH8ڦ᩵0jl!s:ύ_Y4@&EsxF}0;FGGHM+O<)~vtt%ê^>Xùdj8.G(ÜW=zH HT1@b (>|'*266ֺn(RW)ѣGmgglLEA+ҠǙ cFpFʬCRZ~غ[t0w!Ln ,6C O@0An֣GJ뵹>.л^d"|pEy0Y{ԓ}-WWWmM@.!j_2QRlP;88(՝k1¯4W?755UvBe'r0!:BQV/ 9nX>{mmZ EJ) Ǐ>%7n>|X5y?suuUzω[HZOk7ʶG %C4` W?.s&D:IgLQܱd̾N-gǐ-1Xق cHR{,dKc$0>' rh'nԻ6O)#csޢ$1 'c(x~YڰNOO ) t85_\\>%PDŽ~ec nWwdxrrfff* grLF$"Q @BYR.5A#ٱeBe+ p`*2/{D\Qrdع2,*8g[A588XAB / b;!&9cppח&-!hƍ@ed2@;ta%K,YIAbc_{eT>Ƚ`/S]l='z%U#.={0߯2`Ur89oVZg_'Ǜ-JusrG,C OOOcR Op)#-Pp ҐdOzBhrQqg4sG;6<q!=CNt\Bsul8<2)Cl}m58a8o~*ιd bJ*E}QL'}M뮼uq'y{{{l:5-3Eã(A |zjgff S(2f ,V;@U;yN֘qöj3@ul5 9~.{AU  s6݊-EqyvY:kJKI0Gan IDATe9 YO$RI(ZBə.NāI .]ˏڜzj1 93f" ޙq#czwZZY/vlHCj}HGpue k jJj,r߉_KinH""ߜ|||\:$!9y̨*?zfRRG%#T`qs482O2c6Ø9]F oD{9o߾Tl-c'lʧu,gJ0~+]ck` B4#aݻ*D娐haR:yݻמ?^#jK:B({n[]]m[[[UZwj?s?2`q$*+X&? +њSDɂS-52 q.f%:tir┽gamH0cccғB!uYeXدXMͩGA24?I} sQC$hooO_ SM*Lf }@^DʱZVHq|g• =Eκul;;;E*Tg¼d$u&NNN* 'Rw-9HQc.^<<<ܞ>}>~XuIG{YOMMUI(gkLi ԚesD,ޕ_ݔ@{ yM5iZ2/ljw-ɰe`ΆC-^|Y5`0-G[JQߴR5 9? 9%ɭ돕Ͼ|iTmq6tg[fr{8#7%[M v݀YDJ f󉉉嬽aʖd ezJ37#Z"{9lgD.QzF)}^@g@A3ZcTj|AeS>˙I,9ծ|4eEC(Vo?s;;;+55ί_iHP'zқݻwm~~D`gU7&Tݭ:,aV1`G)$SA^K %ҩ 1 ^T.~$8:Οte hv477WYVMHjPDa"p¢#Б$6Ii UVjA,4`hbijŲ A \$(H$w-Ur"ڢϼ~.![hT@.U X`\=kBLRF**EiEsE٢7zF[Icdd5ιߋ3YсsX}j'$ǼqgMy"ř{$CG o%'^B#/쥿t: nw3e$ yx1;;;줖d+". X9[gCxttT6$%]S>w:[X95Sd=}dHORpxbf]$79~'U:,шc ;9 x8qW#VH(T$k*;cAi9#sPdALǏwpRIO0jJ9L0:RQf$a3Y}98;޲mRթO¹Rr4 W ğ骷cc ve&ɢ]3)*2`BkN9AA!,픱"䕩I@|llw;Y~vxēHPB\ Jkj::ŋ#`muu}Tbc~駶ע!ယQl`qppЦ#Gnj1k~h;;;X4#Uۘ#] H>'Ɋr+'@%j׃IRNr=ПBe cpXwN顲)ODdr`?PCjAds ?"8K!ቸ8$) 0Ѷ>EE{˜}ΖxQ,YL&a C"8+Gk% $(9 ꜰkNMe/G{t{l4vV`6g{|~FdY2[b#,h3`H)Bq817J !!39{I>>>2cpWu9cH[dЪ(3Mg\&6g[Y qߡtBT]ճkTeV)ʖhaS.QkkАWzq4{n{Y;99i_| eñٶL\j< G˗/x6IL{&P0,G`kv677vvvj[.H<'l]T2|D)ZX+A,Sz6Oq} 9є$` Xr)KwA§`B&CD³OOOkӧO*+Nj:XdIfV9 hB!$I*B&@sAAmff2$_Ph FLp+4OA :HB59==ֺ$ܦ@fuwwlӝ,+B%#׺Wk_n[?D{]_ !ߩ\jn$rRHUGa9_NlnѣGo 'cJq| U8>ZLREH‚k3x'4eD-Pl*pf,7 MylNZ82mI˗]$rl=bLauf*6L\tE'`@X|AYMy<1'埄fS LRB lҙaaMRɺ/j*\~"gϚ|{iyRAf;mݵ~ Qi۫K)EisS)GI׫ wZoooWcEg_"LI淿_u,&-Gyrƭ)Āϕ+]gP˓:OБm}}O2n[fdz%{)'Qw^m޽d]Bd{( e mYF*=yH VȾZA .Q=66RN,c,]4W4Jb?gc{d zDP* y (uS~ÇzN677΁]IF9l{RA]޿_}{J`͌'''!猀@"[{M0K֓s2QrP!葟/@ѕ;wm!xȬNj)qfK> Vo5E@ɶdzUoMpfV˲O l Xg`5rKKK~X M pzz~J0 Jo,W%@S 4)XQ- oFd,0?WWW%H/Mx ydwI굯S-4wmniM ړ }777PǻnKKKo[-5+?Pu'BmҠ毜ŋٺצ(,{rPAN (n'&bf>_r{DTΙ" (YϿ":Z!>bev1{GaL`xxl ?88qbҡSjj(eNK"[n[Nfvvݾ}FtT.<~mmm=qggga.A{b;88y((` 98r<|uc#xFgq rR:"C*, f!eld lb}VyAiwB ` U{O؃E^]]gϞUnr8H,a?Ä0ޒ$`/Y8D=|<;37o=11~zwٳgmssO` 8jѣGm{{0f)Mx?2`4k CΩ"MÁ#$*g $Եfad aA{΄rnnqN%ڻw}3c=8bφx#:/o>|vgYpbxHi萨zf ڹʬ$a' h&Q+[²b0!D*`7CC3˗/f`2BYAGRdɉ5r j{e~GB$?<=dQkպ8d[T2春 fXJRy Gz i `,#B)lyV/ s$qٛ-ܽ{o'Ydnaf0[jϳ'POo;kUJt:rttTe,EYCe9!;ׯ_Òipp9Zdƛ] tohhhyhhu:ؿHp\+z=}(N7LV9dHH]TI}`cF%3dDю&bJiܼl&qh0Q;g#]JٰQ{VбK"[O5Ԫ]^^: ƅxT@F!(8;ZP@ xΫ^a͌W%"LCeEgD>D2dXs0BOz)H 002S\MxjSZ:;BNՌB-e)2+@eԈEe7qZ骥rȩY D4/E* IDAT5o߾O<)iS Õ]k2ҙR6bl6(`Q v y$fs9a6TNCG(qȅYvo9oZP;+΂;.okkk(P8:RzellP1?))Ҩʘ$8t$9ghttM rj2KxT$rYJIz&AEP,d<#pĩKy!W3-ڴ=0a8 e}9˱pzdҨ>?9'0 ^6$J8ș sL׬C09vI $8QRj{`Z~R9oƙ[YY3c Q` LhrK׫W]ACf %RSt_eN ?JGjogtvZ nO@\i[R2;==-Yԥ9ݻw59QSJP* $J^hQK~rrR,+sqC; j-VY{E 'fByp/x@333UFFlE^`oko߾-$:Dι }÷aaPCIqf i('uɆs@ :224$ fΎU肱V!qT$y(ui JK˪K; #_]d dê"@~݄,8{6]slYi*+?5E&iC"^*Q}O@KRx+'w"{ӧOz믿7خhfm ӻ10)Q977WsBΓ36lZ2|Yٯ"%r'eCCCEI'k>Y7#C R|߷[nqH"ɜ%kAC9> asvL=&NL=$x޽}L5m) $t!`S ޘ촻[ɰm Yo&b6޻9OWupDZkmyyO>mmm/ YPWw"J h,ӧ"f$ֆAl4MP5D J([n߾&aY?? ĉql` '&3\F R4ij6 3=ou89["Uh@/6RfmrʋEIKcD%/ a R5%Ppj>u@! #)kt> xnYL :1bHbR?55՞`5gԙDdpMɧLmvp2gUdjjy΃,ecI;E2IK(|GvD6e 2)`[Cw2'\VS [腖)bݐs%8G |{랝n[|06??߾|^|޾}*VJNJ*j3L"v$Dv>8:/PNX~ q>$.ܹIE!5c9Zr^ڄqEps|}E !юsDaq2yxsF?(^;vaa߼y vgxbS2A Y3PVSDNFs:h2h|9" R2r1z˜xIZLO@eD8ClwBpԸ>~^zU \,Z7rM1j)a dXH~j.V r(%h uyyYsmUF-u:Y wf}}L B]8f{α19PUm|nn7#꘲a\c_pҡ?Dhr0Zۭ?AK7ZBƜD3Κa|$9ONϞ)QXuuLj${n}}qF#&'˼}"-I,xv?/L(){ۆ2iDc4=r0e8y _qsbB9*.D-4$o{&! )IG);-8D^C6vmvvmO-=epbŹJ\`%2Ms:j>K%'pz ?H^fA8ܤ>1WՃi H'v0sD}p GB0!2C S0 FFF* R~ڗI[/)O})ٝYS1V4Q3੸E>}...K=T9&H90AP(f4T9Oٻ73A,~% 7;mجO lJ LpRصq/e| D*IQJs03ߑ/{oR'e ՝Do٫B7\4)BR.uOe62hgv`l6F.a ]vʁ͕q gS1* C;(z!ð6$ed #r!eX * @Ov/X73$;pZ~zu8&EY(0$jPtLe LTb&''+Sڂ''EJ P)tRCVUIo{r RSamh>{heQ߾}k^j߿/͹s^5AN<ج ~ˤ=Kj tGp+;c[1X|yy uC5 2eON>(Q?vwg\%[`<&Ӗׯ_W- M{o{X r4 #%7߿I Ps@҂$J oʱ9khllV aMf4xڟqjxC6AA!g{iEs7d^p+!9J=X5M/կ |5PGR>OdBaʺ )bcD`8jnv4GY}fffi 0]&'B1QN۩ }Cꂫ}9 L<}mm}2{{{U#4W9`"C=x9$p+HzykuF(An?@` l4==],i(+u>+QƱ %}vv7RZb<#)se[lzEo>k˜IB*!{ia///ۧOÇQ\l1`gI6o"Yvm޽?wg.)%H)+GrfYyK; g! ZȚ_`z9a%;&~4 ݾ}MFvI3eX2`1OSɠ)XKHK V `~VVVR]]6W2"jG&cccugggqV]lZRH_gp4ŋE6dEb%AC) zmʸ%IKMkwfF%aha03Hdn,YpkZ$άL K^` `=pN eߵ.o_l79g[ Y%4CC١L2-ZY3I CXgcbHAΓ:N#yhCFr>,^X]uugMf[lH tSRS"iɂhAN0{d?<5•ryJ 90)?gCS׿%Y Л$x//zlHW4@l8y01CD*c`Ej"tʩ 0˒d`7o 'OnɄ Td,BOP9Z?޽{WzUhR3^oMj (7 2pe`~H}c:jTCuCjP?}I߯+ b,x}29[r4&qL7n_Cmaa]]]eGڏ9||~~vww@0@>< `vvou9vC,r, c4'(Go#[)[|u*{ͶUE Bg8t7tYw/+aMH>Ir#$855Uw.j͎!)Mwe]\k>\l]-i&ӟTAޝH*ufA{"9/RFnMI ipM8$^A7[]&J"HWIԷ:JDsЍ7ޤC>K.hvELC9)}EPgH+7oh\Pd`͈/^0'#,0K9R7A2xuf?l?n>|(G~xm!1@ d9ѣG=B "nk,E ×/,,#H§9k-N_f.ZڻY<I#fca[۫d AN.”:3,XE[U+q&@uܷlK k 9ɠϽ&&&Jiϗ8;;kK+nþ 'wA;eTqƃleI2,X>'p ÌAZWl31ЮK)OO?;d .%J3;v\ Vz)%ي!5nۧY}~ 8td(Sk[Qf`|;j `z ψeQJ?H`彃K0\e2AٰYz0|mqq9㝵]P +]*}~֥9*^ceL~ЦHd},fqqlg]ٳgmgg>g677WA:UJpzP<ݗrorZ먱SFKR|֭V$GڇUw^A-+5<<$---EPp~~^ @ OP@ƍmvvl=RF9n{ݻwK{җiC{R[.PN[4t72Q8a4r*z:dApM5ey@nUǏɓ]S=gREc߿o+++5%>}cOE3}4bӡ `=F&z ^ma%iJ5!meG! GNNNP҂ag=_+ #ګ9J 9J0J•]z";r 6%{|j-e zCԧk:VV7,L>55U[93>ӧO՟ggg9F]lR"#;{vI Nog+js4VolJw2ON, Rg6y(kW&;LeoZ(5zgŋݻm1S=G ONNn7 ٩@MHY MęK:>>666Nj^\\_T̺7-)Ys! ٶ sN[S7ŋ*;Z IgA[m;^(E,N:QZl&&&Q{Q] WN1 p1rٖq>Aad6YWLZ3* r0mw6PSl߾} 57nhCoR9T'(rK2Z,/ZQ?d yj`ѝ NNNs2>pmQIJ+:0#,{9)a,+h&,wSSobkEJ ɱelJl`pLБbbV_j6%9)dA,)(ֆؒ7. {jYd2 J3Bʑ~pz  2ؖ'Oʀ 8듓}*=ީ׶X5@\pǘM{}}^zU` -셝lKcUAmQ5uIȟLC ƨ&[2!2&Ɓ-[BEY֭[Xۗeke\#p9g5{U1ۨO\TY@vޱ~^{moYPP߹srA&uђRB ^_MJ2;ߩ3I57|bb⍈AyPZlWS3Pa-Ö\ENF`I'4r[5e0sHxTA?{S3083{5m-2Ke`%G C*/T@r1zիWmggMbP,AHm g95+dCs28(%_t3'Sq?~Wpz+ɱ5.W8Ky>siE֐SWޙ13dڹscw,CPgf e3"!v?KBl2l߾}kkkkӧO}R={677X`yHZj Jun8իzgV2] פ+kԅ6mj}vx{mmmoo R9`eCv_]kĿjѶ۽{ԖY~vNPJ?O.廱1:vӧOK1 ϐ5q6j9:e h$7'/G;88( "FɸObdifffn@m | kill|mnnpJvn r DJ,>,t0qS*éĘ :44ԆFGGȒr &ND\@v{0B66UD\XQz̐=;`n$ h[ZZ*h9Bϳ7"\rV 0bmllH~YA爨߁e)1u+/@90>>>|PWk'pzz^z۽{ U_ g/3bK4C'#{*S 8>hkkk}S8ܔ'T3e4!L ;̉*vڶ#5z ?22ҞÞ ɲE'{9e>Sv^WFp.l{{{}{})-g)B!C/LmO" B4ZkU&J!kAB&' ifרGP?K6g+!A8Hvo!8ߥldd.ΎM ~{ttTp0C_οK x` T)ax{ZAq]BrԳ~橋ll8ӡF|&<4c!dQamookr+gr <_ړ'O*Of. vxxX,zYz^=Qq0g ;C0(ERK>>CmO"\r3jSt9ҕ,z} ڬ}ح[Jjm=rfi  d7o,9aHO%Ȝ 8ĸT:|$ݺu덌H";Jz{fBS7T#cb8$muu ł:2=з,484Yh$Ur o-c cNOO2F/ r:]@=gp|֭ÇLAI?Ťi }kZ+fcv c"ÇT1R?n=*=huubmMLL644T5>xYRo˚U[YYHX`^=HE0 C MexCRM6 - IVg|\{᥼a # fff=IM9hATL\3#7owU&ǪhK[__5sc( qi_^9@.{!qb,G H8j::8PY3d-d'˗Gq jtt2z_mnn.{nܬrQDs!|ui ^6z>|J*~3񶹹YrLl+)  VΙ^@F,2Xp3N9%[D\='&&J[lqwH=!SF(UsH e$F uvv HwQL{J}(G:wε%ϐ%ti\-x뺯)966VϽYTu^^^#B]{|(+jlF%)#"gǜ҂5񂱴?U;A-..5[''QTQ qk-s 6zjs0N6ljѪ0dz!^a( p7pٳ" ~GZn߿ Ҡ jh 2}!!!tjő YCwld1$g}1XN'gA9|׹S2vT擤(A_޿?~޾}[g}ii=I@I Y4)rB_LY#ɝvppPF`}kZkKKK|uuUi{+E=F~fC rJIrs@}'Uc-JXr\`VfthbbMd #|E`ll7c d؉rslV>~a`HA+ChJӷo* w 0.ڑC~0bsn`>kcDe?n^. $=Gf]j3 _.ۨR9FlAы.ݸ>|P g2oSGg,b%3Xmgg"tH{Qx&n!͹γ(N_<>::Z6;poNɲڔn޼CYl2>>ޞ?J!j2ԜG>$əLqm) anFp(H XMϡ1Afڽg R qA#Gud$aQ__Z[,"P-WbCk Ҡ1'Lۘ_mnx t\:zU zA!-u+W7K!Bd~~zJ%Ȕfn%T dלW>9tΝjCRtF:R̶yL!^ϥr9f¨QtN`J!xTr5YYv ݻmkkXv6$"3N(hqJٲ5H* 8Z"RNi@; ն]5/{YGsO:F:ٗ'Tc9(ƌKe6?>>nX@}9gMecCVg4 Bgr)' $6jUl 5ҏSfd{euhK7ΊTGhpЈʪ9o߾gϞU=qmm}x!6 RžeV ƾ~>~ا&R.KZDdR2U2Z0hQV-|dvrv7iMj!Ŷ5)CJ$RW5ke$G&)6Q3}=k(a|gY( WR]y,h†)ǧجW #T).١x*emRS:1rl{zsY7v8? L0'䠅]AX2yK}矫Wѵ%w^W633B$N6)H> '2\R[#^[ϔ=zڿ9STj-3]eKD" Ѹ֕an0_R+3"MS i5}hڙgw hRe{zvzzZ)r7 ZùaCԐ3WX}rټcA gzbbz/{ym}]^^}B*L)kdeJqfsf:f_-92hNoaaY5 [k+q Z<+/2`Ӵ/a4w? 3Xߟ ݥTb:- 5U ʰkrQ*$˘*T;2H/rjx𠞝= ;Aó+3J(Cᇇ}h E,4R̰:59*RLiKnn1w3ׯ_+5_2`Y)G#M&V Njksmqqj6͛ՑNi[\\@cggu: @Ґr~ Bio2{QBVzݿD"iǕnll677-yaW׿'+L Q(}>YJK ȫ `0k3Eظ6-{#e&9azz4(8$a'^;MHneAKKK訜/נ|[p !35ׯ2XT|{]eboN'a˗e1M tjj]\g9 +S$^={R 9ؑd(T'c9 @RI r%0πKq$hˆ= VV}%۷oj$#;,SܝN9211677"k,I1Ĕyelg9E}6[ Jkkkݻw62{hgggk}I4yΝ |$A8+;"K &`d!$]R ~OOOÇ(THV9{8SA/^h{{{ljۋLh*#fe렺?%`i#~vpp:NOr`N 'OhRQuZq;ٮd\}qq٭ B99B$2.9w$!A;`MЀ%CȩKq +`d!o߾͞Ak8:6C05Y0* *b*X99sT9←4fokC kT ʩPQRWVflAd)-7Xÿ}v[\\lURVI*Nǟ(8)xummzVrV1T&uOqvvV\fjg ,) ށx>q-,,TU-yet:u1d RDJN} D=H6!{yf?~hGGGm~~9K@vı%Mْ%;¦3MKrSD%]A{J]:;VCb߼,!Z*(p1/..  st~~^vA0 !J<`oy9Vlw!d8TX~[:2k4.FNJIE)/5u@K>E?ԗ=\j1Ueϟ?K( 7>Sd75X'4@3K (zi`e|lt"W*k-\/"/¿9:ң9#X~[ߏTsTLS$U9vgi:Pjc ܹӦK/XY3;Zk>KH[^^n?~Sh/ut92Y*zOEKi; JAv8Z311Q2}P|֭_0O*eNIArSdZl FFFn. :ǘ;= pl$ԕz N}aLI"[!Z"B7666ڗ/_*2'T9W^BQj:ԹC[?~lk1< >??o/_,ѷ9ѹIϵ06NOq kQ<2&xvFA&%]VgWQ$mxiל)ARR !H_V sNIa|$l94aB`޾}[NG֘@)J#=K1`f`ȃ?22R8ƍ-NKO1!3ޟ $M^ Ivw=V )ԘW^\2mďMWmѲ#~/999igggdQ>,.<(q^c/>FZ**KY3F ҔK҄G+Na~YR+`HjzǏ0e)jS0n^Fe6X&>bfc/ sdʰ(8CFY8#+L$=99+SZԶN+mxfW @e.WɓjONN!cjj8 2꓅[d\ȥ*rxx?pp].D(եζ V$TZ8WvM+V`cls$H0/:eMw-3֠Gc*s֒p#  zsvuuUoL|jC 8::$ϑp .ȚimwwNvwwq'rtNL)ce{\&kd3S^4W0ttH!rw-,,T/&aǏdj"H &c ͦpEm T-.kCӨ>"d"&TCA^M IDAT6$X1X 7"80)g@9+yff`wO3SS|O2Se2$0e]V-B`^Y5!+F^=Z@YPtɾDgܴȂfff~###5Z-,,s32C*eLԭPk=[_VvǏŜXzZ}A]@3O@O֌S isssuMDMd \FGGۓ'OǏ[l3 ҳUreN 'hYl|LY(B^u^XX(Bg3+ R&SkడsUP7p)4ćRC?ᔊr><݂gggW"1D۷o@uAQΓ,2Z@ B6)ŋg%(w7;uGN%?$Ð}G(Τ.e>)eG 9ub2FIp322*cA[nK=c?a\D=iO{ѶR>CSA [$k@7nh}=o{;2OI*$b_^^n'&6{o/9$4,5(z|.'(I2WKIBV~Ɂ= >6JS 9.];::ڨRFCRRS)+'|vNmAS98V{-a@eZHn޽{}eNS-+Ć8J.~ _ mggjtʕ 8mgXђ `Dц T 3377_&G@'3c677WHH!I8CesB A+!!M `cضD$ݻWzv{ٝ!x@BK,nCoD79 37Ml2ڢ TlO89hdA5+B&K;0^R;kٓ)rlcMh'YqV2U[d~ւ%Уg~ڞ@dzwCNdƂ9E){'r|>! F>&۔r2N,yg{MǾtM0e:x&2HȨRtɄOɎO%86<7oBѠ#mM ={ֶ+M[֟RglzzoD:TpK]nb9$h7on[-Z)OÇzNYL6(d9"$s9#Dq3}k}MɄFvےƲaѬ?1Fm2呑z(dϟUun]O3`qdd-h$T,|^&-rڡl`6#ۏt.[ .E O5Za8 k=CsEɌh/zVN!5V_%w)&/ԙRvp!#mc/l&1"C (Ge w<'UҠhA!Yfpd=8$ *\87!(:WVVj]}"7NJL=XeCF~Y )iG}u>4ꟲA>yRgXO I { OYUBc/mssQ[L;AN]7??_]1I )&i5w޽{Ν;%?V=77WdvO_mmmU&3{nvž6v sq4=A=|!&񹹹>b&ޖ3ݽ쥅)_@$@؜ I@Ս ?Ɉؓ ~]S1 7ا+ KEf*$xttYds8drrhƉnocdRAF=5DE^B#EzT9&s,G}fԚe\,[P|x~r Li:;207Ѭiﲼ\s1` :%g&¯_#Y7y_ZP{] ]B~QiK%3Y?k*:#z_3R@_$@E>k qu^WIL"}d' ތ1U  f(;/--Ij5L3h@jC訂HhrIH"!=z!T MMMIgtm BNbCD$($[d9*ٌ*9V{&B,Ȃ&/roc6'ΉTg8>VδjM oEdZ__Hd9H$]r.)Wzݒe |^hRW!)4<255URǽ7g/ә(%,I`M=s%0N2{]*8=Za8v_$*)Kt:_uHhTy !gBzz Rh+++\ToeFLӌRV0(p-G糰He QָMrɀA%sׯ_۷1Tv1N':Q;g:n[XXh^Ievv.̶x/óW.wwwd9#:' ;f Bк,&r2yS!*=AV#TvRne||8;p*Aw]S ړg *SUOY d}2 @e9.6B#RKJ$ HUl ")fw)U9228œ,] ':#QJ%*IH"K݅`:|S\4B9ԲCh8]L74@vvv*e8Jxpcc#A#aD:d2G*u) X#FLcA &޽ 6D5dϗˑJ9C 3557X@TЕdVzD#C*Vzedmyy3E[__/L}9"tG~G 5D=˙ RAf @ԾG)\ZZ*4Ս썺~ۭ) 6ܻw ^NSMմAs!=-)2{8W-A&R%^vNv:Rrxh~KPmaatl\=;Lйs3'F @)+XMy/P{g")i\cm6?&ፍa86""OIBړlYF) ɑ2lI Z1+i^a) A. ^JyǂeթmQ}ǏfҏuP~Yb+ˌWsba tfz" 9L鱶ZrZgET%c4/_^W i9h9Y g 9B&g=+e̓gݬ@Nܵ<;;qZI_iU1ȮsɆL  @ر^)Yieq = ϟmnnxI)ՏeY<(9dgK6.N p$pAHyf &@U›Z*9( ĸZD3rIQ@#a9V<==$EP48Qkݘi1[rUiӛ֐:3Bݒa&4##29Is|sjw<<<,Qq(9DϚp\%+D /#Dy鉛Peq(rSPX2g{QgTa26/Zue_8RFM{-b:gL x_v$lG=K:2Ǧ&مuwhܾZ^ϊߠh}>;gHbÇ䤫d V0[y1NYc`oG)ɹP <8HH94}C'{[k/IIv<'Ѱ!9Y g6A20IqFz.9ERgD4~Hb"=o'y$#ַv<ȍ3u#7opf MNBx22c@rTd0Pm*,Hgsyj:Ipg;zC@+<<<͌Idh겙'{, @{;w"I(sVĎLWU,yZ-RSedxv#JC566fffv>bQ/PϩX٢F1Κ3F9M{V@ 䤽zwfʣmooG{q2Yκ>A}吜NgPtƗI` s~S0/a$dO|΄ Ptw MR72< Ԗ=1`vYCE%ϛAZ RZrrstT򞜜,a&%9{+8SRgN Am*? M(5~94+(+67ɱl5\*f ɾJ*RdlDLJCH~9uVWZ9;;[8>(0ـ`&9h~VTiYPT?e=G^TtJ…/GiHvcO=2Y|3@&v$&} .x0/* ieJE1,<9uWWW j֞F=֌[m4eRi$7{Pr&i'D!@Ejسt~t:j l޸qP&;!|/ɬ R*NNN|e?9h 2e? 0g...JžȜG5A2ׯ_úoH955Ֆ*)I]oZHoKKKeo0t~lg G$j3TB#))A0AΞ:Gr {}}fggn!_#7ha{I {8f4g.^J:$U.Hze@w lYrR TZr6J6$Ŀ9T-yUH̆lɶA43VVV^{QDe֣EQ-pT\&DM5d1jYX0Ҩ9ܜqX0de npj#}LLL>(HsfR&&I+5E93#Lu:nݪ<sS'q#8Cz(KPs=<茵szPLBI}]PAv{B 'BTٜH\#]?c CX$)V;<}H-JmM;Nɜ0>>~r}$zIj;Hf0sׯ_|KUVYҠ=-(^35HMv= bJ[]>l{{ 06G R#066VvtBqN8}I,/ZQbEZ21tΝ7GI9"5?&4è剫j֘U"@!2xvV[&DVI"2#fvm+yYL;iYy^%] (i2tf^ܜ<b%8.LIJÿ(O\KN`A8C4 i;`5#$JNY666jmyW?==mm{{!k0$%$M(R^W9 9??Z 8αy2 ?gs\5Vl3geg}rGSY?wIb8 9Fy&K,ԁA5PDDC`ǧp ;%h޵ *(sN{ElY[XXOKqϟmvv]W7K*9Djb.KJ$~9w $ԫ6422&N7' a43 }.U4P(]VF0'pꔠ=pKL o}fh<SI6E"hکS1pZv{N`|L"c9㤼3.n.0v,}ӄuEj9L+!:ă,aEρ.ozqqQce(|.]ͩF^p:9*r 9߯>gY$ۄ'ǛLɓ'Usf A"(Eө,1aMhȶ8Uhh# ܀1y) ( e(`>==mUv"E7Ib{Sr=g˅ --..Vv~A56 z)攡OV9/U9+;/DYpו*A8Pv@mXGc;_yksssuȌJpW Pcccm}}촅x;Ev9 Sf!G|+< $-..,Y'- 8'''muu%_ɘb+Q,NT"uVe"[upe0u%˶_J99IP ^ )5Y+BsT8$gORK\mrrzk5)\.?O9,!J߿/-ph UđquTI$_FJE^8s>{xx=zHN٫s!!&7 n g'ܒ`( ^&8UYҡF$!P= QAtop<>YȵagIRCmbR$G)C!ȔS5(^ 3O Hj♙>T9l%ZP OyvCZ_Ѝ%yx?ahX-NQ$G1H6$KkN1r9rr"@پiA"cP eL<%mI9-,,dfx e/`Kρ0*αjȊ,ȑ$\3nT;4"g33&H=y״%jh-..֚?k"y)LG.­[Ǿ Ƞ"%e;H}Qxswgyr֭[o00Uo,,<0{KR-=]1:-Yl*&vxsƹELKɟr "?iʧ+M{(~Q{} <,&, 1/ #]2oDٛ&EDCF(dz좻`)YAôE',3Yf آ!zd`~;99E3HpyEpOꝝh?~,GtumZ \n/>'H3Aؕ ;_[\ytmxdvK{!,(*G9u16 ^KR 5=zt7ߡkSJcaBM N@_.CFΑ`L疦IrFĠnt8J#Jr ZYOtщLg(οX/NFA'~Vcf2RM@(>$ufJ` ⰤjWB'M[% dou9 g3s&RlUcSy{FhJuBH+ѱ켴f={6RSWWWC ;;;1(pK}2:b'MВJ)Q]d)>ȿ=|z8Ψ4{* )[F]_7TfŭS2Jv+B7DAu۴2 a/JBCV6HT\͇㨠G`{yy9&:X1U:06u"_;;;f#:Ӵ2n>k)9 nՙrX; `(D KIYk2Ehn e~*c5fMk++VȀUؚ( 2#ָ`>?~<]\\0y8Z+jʙ;sLS==Jp[[[Ӎ7%v<%P2Udg6m~ cySs< '礪A+N$Ƞ i8?>ؘЙ4\-19駟FW'uhÉ4P-{;Z5@qD;w"cܞ6ӃƌXg@ ؿb1}7{tw`763!Jf\[M .AsiP$Up[96e xvkM"樝gxZ.!Yki@6h%Zjƍڝ;wNZmv._\|PUg!Qsrr t{7&W!-@jDB')Hz92cE;.Ј5 ~ؒjp\SL |XNB/g\Bd\Z*\ ա@9r2W2w)mY'IPU8L tauǘcl6z(۠=gY;QdObΚ~qFZgRO> "}Ù;/af Į%y;׭kngF&=}R4\\\\h8 0^,qX6`|Zj V岁/^ ~5VP mllLv9DH{G4z,c؀~_}մ91thWRu걁7nL96 Ppؾ7oNgggbcݻ7gUs~[qΎ-s4Ȼuk; j)#s` iNm bL|mZoh EwE+{K +vrmDQ6hJ]>mD"RꝼAC~e"IPkՇ;gߓ$XBsVևSJ7o؍{97kܺh(S^[%lxF)%Θ]%QlVHtPP A 0nR,dVMmqkrjr/_%80~ "b"p$074rCp4+ };R÷|u,NH K3,6MӋ/czw@Eֿ8wخ}} ~>N(o=zD8%_ HBMqZuHn+HjZ1&Ck?,bKj6%SÊ㤡zNIge.3&ѣGD1 mP"NJ*ʒEg:5#yFy@rƢ Z=\ p$Dn 1m^r|_N=90Q!Ga_Ey}!`:>>RnG-yDZNGc#$jBz)׀A[ͼ~z*1WZ۾#o#d(89k)L`ݕR髯  c>xb89gt $fLwS>$"džLF8ѹ5DE[JLDx',fSSjxƸElz\s:Ʋ@ZHIm6#BE C*0A9k=hlP.nzNc"`Y+I{Y4SBp ϦOOAehGooV.OZ܋ {~~>]]]pnHQdb&7'*Jg<"*&vEPʈ`.zc\Rt۩}!?cPnr~~>.& v4;ؾ\5@fggg R%y@lnnNϟ?~9w}7 @H3zc}7Q paж:^qTEP8<~ H5bvU-{ታ&zш:jQ~Ȯg777s$ TGOӕnR![O3}gggPմ+ SQEbʔw6+[wԆw"s솳稪.T&=4?°8Wf R8w 8 {;%Ρyѣm$!8@ċu&/5簧i?~<(EQF, VTD-cD=r?h:.P!W9\y9Hহ6Gi:88b0WSh!Mnס<!p?sv{B1@_  q;cÇc@ϦǏOr Jp{0:" gÇ+ Z[ߡ #iG6ݙRFA9 m)j@.m#Y3UUHK@58g(}...V -9J?>"9kkS;#m,4r߿?lgwPBm ڼM9)eخvE\>иBP6gjPx.Dm'ZPˈWuUq_-jG.9]1aC#+bc\ R( T3 0iư7PKn޼9Fk\cw;S6t.o&4AkFӌ/_ʫmHnKwX.3A;0[xzn5k&ro߾tm;m"$xEbήHV#Fq1bL ;6~t~~>&3 88P>Ȕ~b^lr9L5˛cJZwsC@m{YSs!*0!ҮVwܙNOOǽrQJ ?Sa FrXQO>]g9lqZ5z7F *}F6 06}'sc@c R@QK6<0! ɣ*ju,F4b`rϏPPk\C{sw2J#劤-NFUd/C_%aV''Gۼ_4DK \Fa T*v4*K] ژ!K WLÁ֙Zl Ρ=EPu޵PnLw~;pmdC9*?s:YJmEžCLbАV8"|㗮I"/X,`o^󞟟:}azɸ7l 2$d1Σ^J:l EanbVh{{{c A!T^(dY.)cy)Q:o `ۗ yΞ6saĵ͓*Ҵ\39)OExں.1)itetӉL "JUծ>'Xf:H(f<*ҊP5pҡϩ^Z*Yw)MiO[t^!C`(Й{իHږQhpV Xb1 ٳ޿UBhXY.c-P|5%&}?N>4w FnG39 KrRhkmWK9ayE9:ztK5lS(T6 NZVA;sIgNqoݺ5lg}6zj;!ڎgc7[u6V>ɇ:c?Ӵ7XɓǣE;?dI'"\0%tݙn[Rs@D>Ln;BfbЖ۷o@ эGXlma^^R&ds+>8Fu ɸ:^~_~>}:z 3Dȋ!N-1}RaS%adW8̞֭[iF/΀!mDA(\QWǀsu"x"s\퉨Y__^|9ַR{o\&76(aݥc5o1V)Q3-p777GβE,Sl@p"@SUA$ gFtmmmm;$Q=VT'q O<%TmwZ+u0yuu;>2uMNcxTFt~P7—nN?} /..FC#sg3jE,ʶQjn[4II|iY>p`?[.'u}P.w Rw4qͿ1B F*{xx8QԖ}>[$+ٍ:m 8X.#'AjJ|srv g;꓂E=uх1Գ <"S l@F4?+b sT͔8;Ƥ÷R_IeLeڋUJQ*Ď-uY&䬯;)im&Forrm/-ʮӒαng!I8ιme pfmN/|Qݳ϶ hzsӶ2\$p;h^ʢVQNqLI`;q-Cطd;YzŊN=NGiwww<,\UH5_*lwÇBhXvo됑H 0whMQ'PvJv֭9TRUl{DBKr( hhG T ˹EҢ;4; iG]A Cɭ .i22~mCT @*}g!6;X϶o޼9H@Ǒ@_H>򶶶_q  (n^f3[^؞CCHW5زy4 g:R9yH x+m("ܮ==YG={F76>9{kF0/erK$ : kZ ;<}tԡ[˻w+lK8-q:8gϞM#iryѩ*ڦ8b̳ј()` ՎQdا6w||5FU<gYv~zʀ147{Ҟ ͡Enr"45LςD˗d8ayy- =oC[ݹsD9iJeTtg29/8Њ/8 T\`b 9ہn6K2Br܁tZ:L_}({(͏Uv28ֺb'k !7EmnnFaU4 yɓ1WNkj*:u7Is ;`u%wM)i.Z -_bLdPJM/q[Uv)HvZgB[n;{ ͨJO 6Qnv{^΂Rf2mzlo #]ז&} K~-O t\FjG_|1r@9?~ܭm?<m,?Iy\@SY.zy%'Hbmن^me@;=  m,5QQUpZDyyJ?׼ ;Dn -!lu|}S#lmhͪ)GtJ\tvvSk]֜9 wmH- x! +NA){#G vt"j4&Pv#2d́4HQ>cHZMDAsznooLj[Z~top8+4"*Zokςd3ֿ)w]0{-[Š^MCO ;5狢=t ZVuzf"e9d )ݒ3 P`:gb'-"Y3 YLNZ:r- Y*rM{1YEgj2; kPN?iY" Ual&CŴ?giYG[5sY̚8HyPpEX@wkL= ÑoүCmXВ@|0KuC FPIX%w>ơٝErRމ0 ZlA khڻ>0{ȍԁtdL=ׯ_h\Atǥg\p(Y*_[[SzPmJDPji\ +i7n pyE ^eM`%y9i2f ZW&!Wƺc,[Oݶ5hXPsGGGc.jݹh' ݮ[/^~=d vZtu$=88,ܿ(u9k̇)jįvh"?)R0̎cr`)u:\Y<` Y2#RWsFRp0C|UdN]HQ},N-ASj}ݻhe 4`a8F'OcAݝ=([O9;ъVa|WM @۷~kkk` J3N=ojIm7H➥) iNHj6|Ǐ![.pc _ @D?Ym)%HX >`Uԝ+,ͽ{T]E;e cZinctZM"PbtvvvnK؜mnvP%(Z0Sv=,$bN NmxQ®Oc|م7ʫ!wiCZh{y Pvۼ BO߾}{䏽fQbaPF8PӫW{a@ElǏ#Av+f Rpt)M։>qh^tjgv(r o:~P3zfdb9̖iGGUhNT;zNK }Es:m5 hDsΊ@e8 j^FCC%y9o=3)? Ԫh'uEM P+p޷4W{J'wO{Wv?ȩBPzt^Ž)VV9Nȁl{G]Z`yA<i^QXTs5mQ~*sK:vrkmn_@䎍VImQC;/+`E3 .e4.뼖}]B|˰X:kcTb &y!~r<֥S\>}4ꮁǀY;L~ ;4 zGZxw8Bc5nllL?2tBXd֡~:mS #΄g;T9hb>RIEXf/muUXSeZݴG;;;+iu.EҰ6_.3B_vb/Z 4k@[)( u*( @WmIcS}uA*p $r*oD2J UwrT^lB;4Yʶ5g;SAu.R:`Dgz>,DA:UmUU~,iH5Fƍ9;x;ږv }.oɖi3Αַ @}?UwM I3 _fϵskm PQaکꬷ\.G]t<3 EJ^g&]a L?`9[ҴD) (}NmJuwqR(:9|0p8'T /0=f%ԮM8cX4}zX}\g4 gǝ wyfE N(yvӧOÆR46<1H4s|荎k㍊vr$j(e-v MjQ_5^*TCΥ ]""D?{Ff#d³jP~5i3nEIX,~XDޢkݞ=ĥ*;۷a'P%?-!B!6R/Z-⽆ /Bw" ,snQhɶsfkl&LUPζӚ(8T!=/x8+Zz;u |[ǹFQ@eS/+`wySu/Cֽ=w5Ž849Ckw}If+z6#3ufmKl4p;|DShvpbD~ga6@C- .v{094 e[~vPvc*jiFQiKE8gL[zAʃ3va<%@ֻALg€|I*#zdw~m)ssA#漴=n;bxG'8#LzA4[[a(ewM׊=h)2Yj1g>:ȃxmx e\ȝruKk(؊2mjomE ܚ> i7)j,܁6E~eXYZ6Z,mQ"0*if\*}e\ f\Nsra[&HUPAFk0n/'/:c|^IV!P Oz &T8oPx0c?W(:pw[ѝhљȁAtdk *CPṋ;h)s7O;W}/R9CQV9?|4.(jܶ=d[ rH̱vc[.g1?ء9hLK>(b,K.___Wnͤ?ϫI-)a'ZRD]iS@fB"u98C&m䷋cg솳&~ڍbo'9wXs#jvz٢:@N)֛DH5oƉ['m{B/R1DK[Un%HHhMn6NMP Ppޣ Hpjラ |~~"5WM8"|SPHSe:ɞpEe0V"ղǏLժ̿Xt38lHyI@GcP9sޞܹ3]^^>/_}V^//si o5KዾDv/5~gNNY2yL;~æ,:vWcQ+&%Ul:Kr/-@6V9N'-z? \;lܹ3wy{h/jePe~Nsu(h:m/|@MU8Ê6uⴌUR[tNjI;FS8LBEUPI~ Kw4ZlWpQj#"gJa:NZ8@s֦y߃i\#4耺WGj9t1_E2UrJPҁ-yV (Ștsi ژ@w0ٳ5;3vv01mx-!}tu{Z:C>)x֮31|ӕaeWD=bKZ(:L1[[[F)ҀvDq֒B<]si3o_ab1-AK{ Qψnr*zwGTݲ2kmҽՖGv1`|bZw7oެ(]=G[]/UT#Y`W1 ͣ*"K*k9R=͗Qz*m{۸Cu2\ϡ)THekszޡ@WbET>uNyfeE ϙӂ& -ª`DfT>۟ˌ9" کn>Wt879ض6^_GYQ.zh@PekP>NͳhfۃmD[[[shƴ3_)yښ޼y"zw5̕w8z=W|4M T4[|n޼FR BFC>[tuu5 ;mjGnYgy[ZXBXZ/r ޭᔊxѨ%au[ZY z=}n#RU=Ne(-Ϩ@u 7yfOUUUrFB)նmZ6|*ӿݼys5{:=U\U1:;!r-i+O|rsTx~## Dw(=!lI=Qlj;Rhg3 uX\&c*iTt;3=gQ4sɼ1x֯ѽXKG޾}{({Ҫ*0V["\R]Q TZ·FcQ[|130.f`4sjn씗 hMb6T#30<Af 0c[X[HOev(ڨ+EM֋Q!s1n˹]__vvvFw4g;;ӥLiiuui::Tu]+:dr~B+kCNgwM ԶщlQlitekimssdtjFdnˏ tCltKS}FmMiDU>Wg3Hruu5J*D 鵷C ;XZ*j^yE l]6A*]ʸuWJfz4z=mߦ]ŒjY*û bk-z#hc {!n~wv8ukZP9AΠN*.QtDdxF~amM}k罼}j*DgNXwbTJ}kȼkV q^ + ]AfmO#6hڡcZq̕yCwY#Ė6hǖݕEEw_kwij1}/4`\=էIENDB`libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/main.cpp000077500000000000000000000036411455567757300236370ustar00rootroot00000000000000/*=========================================================================== FILE: main.cpp DESCRIPTION: Entry point to the Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ #include "QTSampleCM.h" Q_DECL_EXPORT int main( int argc, char ** argv ) { cQTSampleCM cm( argc, argv ); cm.Init(); // This function blocks until the app closes return cm.Run(); } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/qml/000077500000000000000000000000001455567757300227715ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/qml/GobiSampleCM/000077500000000000000000000000001455567757300252335ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/qml/GobiSampleCM/Connect.png000077500000000000000000000116521455567757300273420ustar00rootroot00000000000000PNG  IHDR@@% sRGB pHYs  tIME 4K$ V !"V)P7J+CR 0\SMMNkDi\*]Å֯ȼ$T޿4bZLۇ_OvE _!o1_ؼ᥍=h@I~+ -o~)j# /Y @ BB"s/)ʡ3 T7>}, BSAW]A&#P 6l+j ?{O ?2UeЃc?P&'ז t[= 05&^o'`B P1"LӸ{AݽFLxu;|pNg=>, (c0:hz@8|R_?~Ȳ Ivl!g|2%Aƃ@8`eY رv;scܲP54>/!mz`jy/|R %HхR@P^\=nI.UQSѯ0ddw{ǡNaB@%Hf/~e}B{~(H "C 33r׾ܰxz}s#xo6]xr"B;G/^hJ\O뇡PyN"AI t)@rtYYܵ⊂P~}% W4 4+0uMC^ =-w^(нa$A ':@//Wk6ہV yIJMo3~/z 39)k}c᪹BRizok[R7?>h>h` 8pIkĚXQSCdcI$l-/\P81 @ٷ_G<JT>z@0`,U3f\lKmO4\lEA_80e{-}N?Nvqe60a8A`s<=EFB!4PP=Zꇕ6ԗv2MGWiL}M4o&s(PR_}OnEM~$[c}({9G][d߇ۡ28xsX3 ?{:hK%J B*&R{sP0ljn,;l<1&3gS .{䎅gvO^@ dJ1T̃.$ҡ"6{O11u]JgPf^tXZnO 8E?wř/PP HɤtKH¥$ᲦTXӴ@lii#ts!ȓ?ʔ*xiRRT}7s )!!..qVJiN;Յ`!7*= 8;V(- 9̮#My' VͥqO&;OuccGфTtܵ_RR:닦8[Wx^Y͛R)Mp]21c b.YV+t敷3FzԳ ݓrcK]>jЋw &C)(c 044$0dLɉڙ ghA iRc^}v;v10ĶӹʓC2ED@h^|5! $pEL]zЭmւ~DnҲL5Щ*o9H;vx³y5u ,?fqceprǘQ*(rj$p1t9 X5{̪c 1ιȈ3 (*:PY rTG^_qTJi|RJ.+̈ɪ T7ץŚ뒌_ RJqs.4Mn#ǛHsʘ]O)E660 qsUa05(a!naAf!q.(S?t={woc'[yy焱X|C=g 6mڴsN4b.!)r3"+R`xN=a=ط7P(\;w=cck>[x{ۿ_KkR)9 T$u #)p{viI)?''۞}Zۉ(*W]W._{iMgmʲ񏛮~ɲe󿚫㸩TjFUjȼ}N-SG :_}#f8v"~xÜ $CsfM'nͻݳU׵4t֦Q296v֣G{ٶ͹a [w~u0` @@zGRߺaue%lDSہ#'@) .9O=dŐ뮻iڢc׶S?&Zg6B83J4#pFZT*u卯r߿DS8 lJ% _x+FkkA&Wha(8ΜYᇧ7N˖Oolpۆ.]g'Buʕknkmmm}\7zL<w'LVUUΝ3+qo|4 0PC(@qJ_1D"  0{z L޴dFa(Ұ6{Mˢw\w۶W:ض=p࠵7߼s;p$R;r()9g3JiEYg1$"i @70A=9}G#Cy .++8qi?4`{Ǝ>뮕KްzS5Mlk%)S9/B)eu C\3kts;~a+€y2hu 1ke߿nXy%\`juEic^)tk<SGK 8jHgފk̚& .lzV18Mcyo um_? B&j_I% s5ys6Μ?Rh@&n;}D,&DoLŌQBC3@ 5ĝW5K"`b)tߓ?Gs٠]mt%Ta 3rҋO@߀w~6Mϥm M)EaplвI\֋yUmq`|?/>a4R@Vjom'Z\t=;З:FQ;{}7t4Qodw@ .QPjFCH0Ѵm.S'$G}-;_v=A2 Bl.{sRݏ?rqgQ _}2[`p ^W*P20BOM+Yޜۋ<{u~gNk$iQ_H@ PSSWWR\<}Pj[q<!t׀PS殸pE+؉nZi Z{JRRl'2g3JeYRJ"d/ ЪB=\QutǫC}i(J]*F%1e.P}fQ c30{+;|Fm>yEǟG)1 yT9)S\ dRJYr?,K1P"R'STT]]`ƍW>k^CX4l CpH!8̹dMuOZkJ)!PJ V ف B<% ܿyJǮAf T8RZA1V|e%y>Ki,*Rr .+Z5mBD4F d᳿޿ڴdxwB@g躁h=}9h]蕄X56O]8}N=h h !QdQ˺O}ۮ. TVP2/`G] T]v>א>rǻoƣAufLngu17󌩤dT(B6 4VVfu4>~m/ooL̙ڜG&11Nj>y~JFUgpE* ~뙝mgvs. 1 cBt%G9К1U,30:@FQ.bM#CeJO&V_=ǃ;88wN che֪H~fИ1f ~bǞ?uڵ]r麵xmA(zh.( 4`ԆlP5$eB@(b^ػmS'?Pwsgox__2xdp< knqIviӧt*K+9YZE*ؤtȺw 4DOh$S m~{{7~˷]颞H*kÏ=H&xatlw]Z[oR)¢UZRI@©^k @˹b|% Ap( Af,wƬc<Ə صpE"ˆ{[;jΐ{577f2Yu$BH)Br}.|,|%m#Pb 䖟 .jڠV&E >* c >a۰'&z'oďz1HJ-[GkRI) ϹBx7c4۶{p .,+Ĺ ²%T>FػzYc]b˖]Ma9 U90BB͛/4ևWwux~Z1Rc\.8cyO^ A V-6<'l} 56H$g/ݗY<}VBk/Oej``!1^ZX,0`<9 `ʝXpj&E}ԙѸ`f{"Ϫ%g,ˬ7<)I$-TZYp~X}uL&3sY˖ bB\BȁARZA3|X,j׮]CO?q1|ٶ]VjCG3{e2sWN1^5f?*a)`v9 L:3ς}$!zlf3;wɎY5jHb:"N3}}}7m`*5Feߠ^jO9mXƢᔗ:e9!: !{'SRm*Pb1q..SeYV*v'ŢSRl.y^.omm[z[x"Ť2765%겙UWm?XGFkWy\^km۶8Ƕe$+ﻮ8L%RI)]=Pbێ-|>2557]݋ r4[pjqA ! LI)E@n! 1&2|W}8\11tcCM7:&o)=ϣ ʒ\kI<Տ`RJR)@Pes8bNt͹N4IA! 2ڲh>35Ȗ)%s Pq2Vϻ]ye`T:JVZ@I:TFA |@/ =_*t5k^VmֆՌ #ٜ2i:$'9Th@0NcGbi_t(a]h]ϫ*Ku .TdG|̙3O7A(|JŢ9K2)1ŧN5kNsSӛlm)Fc \Bh-Jch<8v4wv4ZFz%Qwa _{|Cr<IENDB`libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/GobiSampleCM/qml/GobiSampleCM/main.qml000077500000000000000000000413511455567757300267010ustar00rootroot00000000000000/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Readme.txt000077500000000000000000000040711455567757300217010ustar00rootroot00000000000000Gobi Extensible API 2012-06-18-1054 This readme covers important information concerning the Gobi Extensible API. Table of Contents 1. What's new in this release 2. Known issues 3. Build steps ------------------------------------------------------------------------------- 1. WHAT'S NEW This Release (Gobi Extensible API 2012-06-18-1054) a. Added support for SMD devices b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YA (80-VB816-6) PBM ICD Rev. H (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. V (80-VB816-12) Voice ICD Rev. L (80-VB816-10) WDS ICD Rev. YA (80-VB816-5) WMS ICD Rev. H (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-01-12-1106) a. Addition of Gobi Sample CM (documentation is on QDevNet - the use of this me be subject to additional license terms) b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. J (80-VB816-11) DMS ICD Rev. K (80-VB816-4) LOC ICD Rev. D (80-VB816-17) NAS ICD Rev. W (80-VB816-6) PBM ICD Rev. F (80-VB816-15) PDS 1 ICD Rev. J (80-VB816-8) PDS 2 ICD Rev. D (80-VB816-14) UIM ICD Rev. T (80-VB816-12) Voice ICD Rev. J (80-VB816-10) WDS ICD Rev. U (80-VB816-5) WMS ICD Rev. F (80-VB816-9) Prior Release (Gobi Extensible API 2011-12-15-0819) a. Initial beta code release ------------------------------------------------------------------------------- 2. KNOWN ISSUES No known issues. ------------------------------------------------------------------------------- 3. BUILD STEPS a. Start in the 'GobiConnectionMgmt' folder b. For Android, run: make Android ANDROID_PATH= For x86, run: make ------------------------------------------------------------------------------- libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Shared/000077500000000000000000000000001455567757300211445ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Shared/GobiError.h000077500000000000000000000140261455567757300232150ustar00rootroot00000000000000/*=========================================================================== FILE: GobiError.h DESCRIPTION: QUALCOMM Gobi Errors Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiError Enumeration // Gobi API Error Enumeration /*=========================================================================*/ enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrorCode) eGOBI_ERR_QMI_OFFSET = 1000, }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eGobiError validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eGobiError ec ) { bool retVal = false; if (ec > eGOBI_ERR_ENUM_BEGIN && ec < eGOBI_ERR_ENUM_END) { retVal = true; } if (ec >= eGOBI_ERR_QMI_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QMI_OFFSET; retVal = ::IsValid( (eQMIErrorCode)tmp ); } return retVal; };libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Shared/GobiQMICore.cpp000077500000000000000000000333041455567757300237160ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include "ProtocolNotification.h" /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQMICore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQMICore::cGobiQMICore() : mLastError( eGOBI_ERR_NONE ) { mInterface[0] = 0; } /*=========================================================================== METHOD: ~cGobiQMICore (Public Method) DESCRIPTION: Destructor RETURN VALUE: BOOL ===========================================================================*/ cGobiQMICore::~cGobiQMICore() { Cleanup(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Initialize() { return true; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Cleanup() { Disconnect(); return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Gobi device interface to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiQMICore::Connect( LPCSTR pInterface, std::set & services ) { // The services we successfully connected to std::set retServices; // Clear last error recorded ClearLastError(); size_t ifaceLen = strnlen( pInterface, MAX_PATH ) + 1; if (ifaceLen >= (size_t)MAX_PATH) { mLastError = eGOBI_ERR_INVALID_ARG; return retServices; } // Allocate configured QMI servers std::set ::const_iterator pIter = services.begin(); while (pIter != services.end()) { cQMIProtocolServer * pSvr = 0; pSvr = new cQMIProtocolServer( *pIter, 8192, 512 ); if (pSvr != 0) { // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) pSvr->Initialize(); bool bRC = pSvr->Connect( pInterface ); if (bRC == true) { sServerInfo si( pSvr ); std::pair entry( *pIter, si ); mServers.insert( entry ); retServices.insert( *pIter ); } } pIter++; } // All servers fail? if (retServices.size() == 0) { // Yes, disconnect them all Disconnect(); // ... and set the error code mLastError = eGOBI_ERR_CONNECT; } memcpy( mInterface, pInterface, ifaceLen ); return retServices; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Disconnect() { // Clear last error recorded ClearLastError(); // Clear device interface mInterface[0] = 0; // Assume failure bool bRC = false; if (mServers.size() == 0) { mLastError = eGOBI_ERR_NO_CONNECTION; return bRC; } // Disconnect/clean-up all configured QMI servers std::map ::iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr != 0) { pSvr->Disconnect(); pSvr->Exit(); delete pSvr; } si.mLogsProcessed = 0; pIter++; } mServers.clear(); bRC = true; return bRC; } /*=========================================================================== METHOD: Send (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svcID [ I ] - QMI service type msgID [ I ] - QMI message ID to [ I ] - Timeout value (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { // Clear last error recorded ClearLastError(); if (msgID > 0xffff) { mLastError = eGOBI_ERR_INVALID_ARG; return mLastError; } sSharedBuffer * pRequest = 0; pRequest = sQMIServiceBuffer::BuildBuffer( (eQMIService)svcID, (WORD)msgID, false, false, pIn, inLen ); if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return mLastError; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Build the request object sProtocolRequest req( pRequest, 0, to, 1, 1, &pn ); if (to == 0) { mLastError = eGOBI_ERR_INTERNAL; return mLastError; } // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0 || pSvr->IsConnected() == false) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } // Grab the log from the server const cProtocolLog & protocolLog = pSvr->GetLog(); // Schedule the request ULONG reqID = pSvr->AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return mLastError; } // Store for external cancel si.mRequestID = reqID; bool bReq = false; bool bExit = false; DWORD idx; // Returned response sProtocolBuffer rsp; // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); while (bExit == false) { int wc = sigEvt.Wait( to, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { // Grab the as-sent request DWORD id = evt.mParam2; sProtocolBuffer tmpReq = protocolLog.GetBuffer( id ); sSharedBuffer * pTmpRequest = tmpReq.GetSharedBuffer(); if (pTmpRequest != 0) { // Grab the transaction ID sQMIServiceBuffer actualReq( pTmpRequest ); si.mRequestTXID = actualReq.GetTransactionID(); } bReq = true; } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed pSvr->RemoveRequest( reqID ); } if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } // Caller might not be interested in actual output (beyond error code) ULONG maxSz = 0; if (pOutLen != 0) { maxSz = *pOutLen; } if (maxSz > 0) { // TLV 2 is always present ULONG needSz = 0; const BYTE * pData = (const BYTE *)qmiRsp.GetRawContents( needSz ); if (needSz == 0 || pData == 0) { return eGOBI_ERR_INVALID_RSP; } *pOutLen = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pOut, pData, needSz ); } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Success! return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CancelSend (Public Method) DESCRIPTION: Cancel the most recent in-progress Send() based operation PARAMETERS: svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::CancelSend( ULONG svcID, ULONG * pTXID ) { // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return eGOBI_ERR_INTERNAL; } if (si.mRequestID == 0xffffffff) { return eGOBI_ERR_NO_CANCELABLE_OP; } bool bRemove = pSvr->RemoveRequest( si.mRequestID ); if (bRemove == false) { return eGOBI_ERR_CANCEL_OP; } if (pTXID != 0) { *pTXID = si.mRequestTXID; } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/Gobi_2012-06-18-1054/Shared/GobiQMICore.h000077500000000000000000000143501455567757300233630ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.h DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIProtocolServer.h" #include "SyncQueue.h" #include "GobiError.h" /*=========================================================================*/ // Class cGobiQMICore /*=========================================================================*/ class cGobiQMICore { public: // Constructor cGobiQMICore(); // Destructor virtual ~cGobiQMICore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // (Inline) Return the server as determined by the service type cQMIProtocolServer * GetServer( eQMIService svc ) { cQMIProtocolServer * pSvr = 0; std::map ::const_iterator pIter; pIter = mServers.find( svc ); if (pIter != mServers.end()) { const sServerInfo & si = pIter->second; pSvr = si.mpServer; } return pSvr; }; // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QMI error (if this happens to indicate // that no error occurred then return the mapped eQMI_ERR_INTERNAL // value) eGobiError GetCorrectedQMIError( ULONG qmiErrorCode ) { ULONG ec = (ULONG)eQMI_ERR_INTERNAL + (ULONG)eGOBI_ERR_QMI_OFFSET; if (qmiErrorCode != (ULONG)eQMI_ERR_NONE) { ec = qmiErrorCode + (ULONG)eGOBI_ERR_QMI_OFFSET; } return (eGobiError)ec; }; // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Send a request using the specified QMI protocol server and wait // for (and then return) the response eGobiError Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); // Cancel the most recent in-progress Send() based operation eGobiError CancelSend( ULONG svcID, ULONG * pTXID ); protected: /* Device interface */ CHAR mInterface[MAX_PATH]; /* QMI protocol server/protocol server log count */ struct sServerInfo { public: // Constructor (default) sServerInfo() : mpServer( 0 ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; // Constructor (parameterized) sServerInfo( cQMIProtocolServer * pServer ) : mpServer( pServer ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; /* Protocol server */ cQMIProtocolServer * mpServer; /* Protocol server logs processed */ ULONG mLogsProcessed; /* Last scheduled request ID */ ULONG mRequestID; /* Last schedule request QMI transaction ID */ ULONG mRequestTXID; }; /* QMI protocol servers */ std::map mServers; /* Last error recorded */ eGobiError mLastError; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/000077500000000000000000000000001455567757300203775ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/COPYING000066400000000000000000000027711455567757300214410ustar00rootroot00000000000000Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/000077500000000000000000000000001455567757300212675ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/BitPacker.cpp000077500000000000000000000346711455567757300236550ustar00rootroot00000000000000/*=========================================================================== FILE: BitPacker.cpp DESCRIPTION: Implementation of cBitPacker class PUBLIC CLASSES AND METHODS: cBitPacker This class packs bits into a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "BitPacker.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: SetUnsignedVal (Public Method) DESCRIPTION: Set an unsigned value in the bit source (writing least significant bits first) PARAMETERS: pData [ O ] - Data buffer to write to currentOffset [I/O] - Current bit offset into above buffer maxOffset [ I ] - Maximum bit offset into above buffer numBits [ I ] - Number of bits to write dataIn [ I ] - Input value to write bLSB [ I ] - Pack LSB -> MSB? RETURN VALUE: DWORD ===========================================================================*/ template DWORD SetUnsignedVal( BYTE * pData, ULONG & currentOffset, ULONG maxOffset, ULONG numBits, T dataIn, bool bLSB = true ) { ASSERT( pData != 0 ); // Number of bits in the passed in type const ULONG TYPE_BIT_COUNT = (ULONG)(sizeof( T ) * BITS_PER_BYTE); ASSERT( numBits > 0 && numBits <= TYPE_BIT_COUNT); // Requesting too much? if (currentOffset < maxOffset) { ULONG bitsToGo = maxOffset - currentOffset; if (bitsToGo < numBits) { return ERROR_NOT_ENOUGH_MEMORY; } } else if (currentOffset == maxOffset) { // Silly rabbit, don't bother to call us if you don't want any bits! return ERROR_INVALID_PARAMETER; } else { return ERROR_NOT_ENOUGH_MEMORY; } // Advance to first valid byte pData += (currentOffset / BITS_PER_BYTE); // Since we don't really care about performance for bit packing // (we do not anticipate this being called as frequently as bit // parsing) we always use the generic approach // Reduce input to a bit array BYTE bits[MAX_TYPE_BITS]; ULONG bitsExtracted = 0; while (bitsExtracted < numBits) { if (bLSB == true) { BYTE bit = (BYTE)(dataIn & (T)1); bits[bitsExtracted++] = bit; } else { BYTE bit = (BYTE)(dataIn & (T)1); bits[numBits - ++bitsExtracted] = bit; } dataIn >>= 1; } // Store current offset ULONG offset = currentOffset; // Add in each bit - one at a time bitsExtracted = 0; while (bitsExtracted != numBits) { // How many bits are left in the current byte? ULONG bitsLeft = BITS_PER_BYTE - (offset % BITS_PER_BYTE); // Shift input bit over to desired destination BYTE tmp = bits[bitsExtracted++]; if (bLSB == true) { tmp <<= (BITS_PER_BYTE - bitsLeft); } else { tmp <<= bitsLeft - 1; } *pData |= tmp; // Advance to next byte in buffer? offset++; if (offset % BITS_PER_BYTE == 0) { pData++; } } currentOffset += numBits; return NO_ERROR; } /*=========================================================================*/ // cBitPacker Methods /*=========================================================================*/ /*=========================================================================== METHOD: cBitPacker (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ cBitPacker::cBitPacker() : mpData( 0 ), mOffset( 0 ), mMaxAttainedOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { // Nothing to do } /*=========================================================================== METHOD: cBitPacker (Public Method) DESCRIPTION: Constructor (from a buffer) PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ cBitPacker::cBitPacker( BYTE * pData, ULONG dataBitSize ) : mpData( 0 ), mOffset( 0 ), mMaxAttainedOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { SetData( pData, dataBitSize ); } /*=========================================================================== METHOD: ~cBitPacker (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cBitPacker::~cBitPacker() { // Nothing to do } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a CHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, CHAR dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a SHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, SHORT dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a LONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, LONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a LONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, LONGLONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a UCHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, UCHAR dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a USHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, USHORT dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a ULONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, ULONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Write 'numBits' from a ULONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to write dataIn [ I ] - Value to write RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitPacker::Set( ULONG numBits, ULONGLONG dataIn ) { DWORD rc = SetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataIn, mbLSB ); if (rc == NO_ERROR && mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } return rc; } /*=========================================================================== METHOD: ReleaseData (Public Method) DESCRIPTION: Release the data being parsed RETURN VALUE: None ===========================================================================*/ void cBitPacker::ReleaseData() { // Clear out current buffer mpData = 0; mOffset = 0; mMaxAttainedOffset = 0; mMaxOffset = 0; }; /*=========================================================================== METHOD: SetData (Public Method) DESCRIPTION: Set the data being parsed PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ void cBitPacker::SetData( BYTE * pData, ULONG dataBitSize ) { // Release current buffer ReleaseData(); // Anything to parse? if (pData != 0) { // Yes mpData = pData; mMaxOffset = dataBitSize; } else { // No ASSERT( mpData != 0 ); } } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/BitPacker.h000077500000000000000000000134571455567757300233210ustar00rootroot00000000000000/*=========================================================================== FILE: BitPacker.h DESCRIPTION: Declaration of cBitPacker class PUBLIC CLASSES AND METHODS: cBitPacker This class packs bits into a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- #include "BitParser.h" /*=========================================================================*/ // Class cBitPacker // // Class to assist in parsing a buffer into bit/byte specified fields /*=========================================================================*/ class cBitPacker { public: // Constructor (default) cBitPacker(); // Constructor (from a buffer) cBitPacker( BYTE * pData, ULONG dataBitSize ); // Destructor ~cBitPacker(); // (Inline) Returns the number of bits left in the buffer (from the // current working bit offset) ULONG GetNumBitsLeft() const { return (mMaxOffset - mOffset); }; // (Inline) Returns the number of bits in the buffer that have been // written (essentially the current working bit offset) ULONG GetNumBitsWritten() const { return (mOffset); }; // (Inline) Returns the number of bits in the buffer that have been // written (essentially the maximum value the working bit offset // attained up to now) ULONG GetTotalBitsWritten() const { return mMaxAttainedOffset; }; // (Inline) Set current working bit offset void SetOffset( ULONG offset ) { mOffset = offset; if (mOffset > mMaxOffset) { mOffset = mMaxOffset; } if (mOffset > mMaxAttainedOffset) { mMaxAttainedOffset = mOffset; } }; // (Inline) Are we parsing LSB -> MSB (the default)? bool GetLSBMode() { return mbLSB; }; // (Inline) Parse LSB -> MSB (if true) or MSB -> LSB void SetLSBMode( bool bLSB ) { mbLSB = bLSB; }; // Write 'numBits' from a CHAR (advances offset) DWORD Set( ULONG numBits, CHAR dataIn ); // Write 'numBits' from a SHORT (advances offset) DWORD Set( ULONG numBits, SHORT dataIn ); // Write 'numBits' from a LONG (advances offset) DWORD Set( ULONG numBits, LONG dataIn ); // Write 'numBits' from a LONGLONG (advances offset) DWORD Set( ULONG numBits, LONGLONG dataIn ); // Write 'numBits' from a UCHAR (advances offset) DWORD Set( ULONG numBits, UCHAR dataIn ); // Write 'numBits' from a USHORT (advances offset) DWORD Set( ULONG numBits, USHORT dataIn ); // Write 'numBits' from a ULONG (advances offset) DWORD Set( ULONG numBits, ULONG dataIn ); // Write 'numBits' from a ULONGLONG (advances offset) DWORD Set( ULONG numBits, ULONGLONG dataIn ); // Release the data being parsed void ReleaseData(); // Set the data being parsed void SetData( BYTE * pData, ULONG dataBitSize ); protected: /* Data buffer */ BYTE * mpData; /* Current bit-specified offset */ ULONG mOffset; /* Maximum value the above bit offset attained */ ULONG mMaxAttainedOffset; /* Maximum bit-specified offset */ ULONG mMaxOffset; /* Are we parsing LSB -> MSB (the default)? */ bool mbLSB; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/BitParser.cpp000077500000000000000000000362531455567757300237020ustar00rootroot00000000000000/*=========================================================================== FILE: BitParser.cpp DESCRIPTION: Implementation of cBitParser class PUBLIC CLASSES AND METHODS: cBitParser This class extracts bits from a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "BitParser.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- static BYTE MASK[BITS_PER_BYTE + 1] = { 0x00, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF }; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetUnsignedVal (Public Method) DESCRIPTION: Get an unsigned value from the bit source (reading least significant bits first) PARAMETERS: pData [ I ] - Data buffer currentOffset [I/O] - Current bit offset into above buffer maxOffset [ I ] - Maximum bit offset into above buffer numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value bLSB [ I ] - Parse LSB -> MSB? RETURN VALUE: DWORD ===========================================================================*/ template DWORD GetUnsignedVal( const BYTE * pData, ULONG & currentOffset, ULONG maxOffset, ULONG numBits, T & dataOut, bool bLSB = true ) { ASSERT( pData != 0 ); // Number of bits in the passed in type const ULONG TYPE_BIT_COUNT = (ULONG)(sizeof( T ) * BITS_PER_BYTE); // Bad parameters? if (numBits == 0 || numBits > TYPE_BIT_COUNT || numBits > MAX_TYPE_BITS) { return ERROR_INVALID_PARAMETER; } // Requesting too much? if (currentOffset < maxOffset) { ULONG bitsToGo = maxOffset - currentOffset; if (bitsToGo < numBits) { return ERROR_NOT_ENOUGH_MEMORY; } } else { // No bits left! return ERROR_NOT_ENOUGH_MEMORY; } // Advance to first valid bit pData += (currentOffset / BITS_PER_BYTE); // Number of bits left in current byte ULONG bitsLeft = BITS_PER_BYTE - (currentOffset % BITS_PER_BYTE); if (bLSB == true) { // Extracting native types on byte boundaries? if (numBits == TYPE_BIT_COUNT && bitsLeft == BITS_PER_BYTE) { // Yes, a simple cast will suffice dataOut = *((T *)pData); currentOffset += numBits; return NO_ERROR; } // Extracting some small number of bits? if (numBits <= bitsLeft) { // Yes, simply shift back to origin and AND with correct mask BYTE tmp = *pData; tmp >>= (BITS_PER_BYTE - bitsLeft); tmp &= MASK[numBits]; dataOut = (T)tmp; currentOffset += numBits; return NO_ERROR; } } // Not either of the simple cases - extract the relevant bits // and then build the output // Extract bits BYTE bits[MAX_TYPE_BITS]; ULONG bitsExtracted = 0; while (bitsExtracted < numBits) { BYTE bit = *pData; if (bLSB == true) { bit <<= (bitsLeft - 1); bit >>= (BITS_PER_BYTE - 1); bits[bitsExtracted++] = bit; } else { bit >>= (bitsLeft - 1); bit &= 0x01; bits[numBits - ++bitsExtracted] = bit; } bitsLeft--; if (bitsLeft == 0) { pData++; bitsLeft = BITS_PER_BYTE; } } // Reassemble to form output value dataOut = 0; T tmp = 0; for (ULONG b = 0; b < numBits; b++) { tmp = bits[b]; tmp <<= b; dataOut |= tmp; } currentOffset += numBits; return NO_ERROR; } /*=========================================================================== METHOD: GetSignedVal (Public Method) DESCRIPTION: Get an signed value from the bit source (reading least significant bits first), just gets the equivalent unsigned representation and then sign-extends as necessary PARAMETERS: pData [ I ] - Data buffer currentOffset [I/O] - Current bit offset into above buffer maxOffset [ I ] - Maximum bit offset into above buffer numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value bLSB [ I ] - Parse LSB -> MSB? RETURN VALUE: DWORD ===========================================================================*/ template DWORD GetSignedVal( const BYTE * pData, ULONG & currentOffset, ULONG maxOffset, ULONG numBits, T & dataOut, bool bLSB = true ) { DWORD rc = GetUnsignedVal( pData, currentOffset, maxOffset, numBits, dataOut, bLSB ); if (rc == NO_ERROR) { // If the highest-order bit is one, we must sign-extend bool bSignExtend = (numBits < (sizeof( T ) * BITS_PER_BYTE)) && ((dataOut >> (numBits - 1)) & 1) == 1; if (bSignExtend == true) { T mask = (T)((~0) << numBits); dataOut |= mask; } } return rc; } /*=========================================================================*/ // cBitParser Methods /*=========================================================================*/ /*=========================================================================== METHOD: cBitParser (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ cBitParser::cBitParser() : mpData( 0 ), mOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { // Nothing to do } /*=========================================================================== METHOD: cBitParser (Public Method) DESCRIPTION: Constructor (from a buffer) PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ cBitParser::cBitParser( const BYTE * pData, ULONG dataBitSize ) : mpData( 0 ), mOffset( 0 ), mMaxOffset( 0 ), mbLSB( true ) { SetData( pData, dataBitSize ); } /*=========================================================================== METHOD: cBitParser (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cBitParser::~cBitParser() { // Nothing to do } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a CHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, CHAR & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a SHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, SHORT & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a LONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, LONG & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a LONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, LONGLONG & dataOut ) { return GetSignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a UCHAR (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, UCHAR & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a USHORT (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, USHORT & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a ULONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, ULONG & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: Get (Public Method) DESCRIPTION: Return 'numBits' as a ULONGLONG (advances offset) PARAMETERS: numBits [ I ] - Number of bits to process dataOut [ O ] - Processed value RETURN VALUE: DWORD ===========================================================================*/ DWORD cBitParser::Get( ULONG numBits, ULONGLONG & dataOut ) { return GetUnsignedVal( mpData, mOffset, mMaxOffset, numBits, dataOut, mbLSB ); } /*=========================================================================== METHOD: ReleaseData (Public Method) DESCRIPTION: Release the data being parsed RETURN VALUE: None ===========================================================================*/ void cBitParser::ReleaseData() { // Clear out current buffer mpData = 0; mOffset = 0; mMaxOffset = 0; }; /*=========================================================================== METHOD: SetData (Public Method) DESCRIPTION: Set the data being parsed PARAMETERS: pData [ I ] - Data buffer dataBitSize [ I ] - Size of above data buffer (in bits) RETURN VALUE: None ===========================================================================*/ void cBitParser::SetData( const BYTE * pData, ULONG dataBitSize ) { // Release current buffer ReleaseData(); // Anything to parse? if (pData != 0) { // Yes mpData = pData; mMaxOffset = dataBitSize; } else { // No ASSERT( mpData != 0 ); } } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/BitParser.h000077500000000000000000000142131455567757300233370ustar00rootroot00000000000000/*=========================================================================== FILE: BitParser.h DESCRIPTION: Declaration of cBitParser class PUBLIC CLASSES AND METHODS: cBitParser This class extracts bits from a buffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Number of bits in a byte const ULONG BITS_PER_BYTE = 8; // Maximum number of bits we will parse for any supported type const ULONG MAX_TYPE_BITS = (ULONG)sizeof(ULONGLONG) * BITS_PER_BYTE; /*=========================================================================== METHOD: ByteSwap (Inline Public Method) DESCRIPTION: Changes little-endian values to big-endian, and vice versa PARAMETERS: data [ I ] - Data being byte-swapped RETURN VALUE: None ===========================================================================*/ template void ByteSwap( T & data ) { // Just reverse the order of the bytes PBYTE pL; PBYTE pR; for (pL = (PBYTE)&data, pR = pL + sizeof( T ) - 1; pL < pR; ++pL, --pR) { *pL = *pL ^ *pR; *pR = *pL ^ *pR; *pL = *pL ^ *pR; } }; /*=========================================================================*/ // Class cBitParser // // Class to assist in parsing a buffer into bit/byte specified fields /*=========================================================================*/ class cBitParser { public: // Constructor (default) cBitParser(); // Constructor (from a buffer) cBitParser( const BYTE * pData, ULONG dataBitSize ); // Destructor ~cBitParser(); // (Inline) Returns the number of bits left in the buffer (from the // current working bit offset) ULONG GetNumBitsLeft() const { return (mMaxOffset - mOffset); }; // (Inline) Returns the number of bits in the buffer that have been // processed (essentially the current working bit offset) ULONG GetNumBitsParsed() const { return (mOffset); }; // (Inline) Set current working bit offset void SetOffset( ULONG offset ) { mOffset = offset; if (mOffset > mMaxOffset) { mOffset = mMaxOffset; } }; // (Inline) Are we parsing LSB -> MSB (the default)? bool GetLSBMode() { return mbLSB; }; // (Inline) Parse LSB -> MSB (if true) or MSB -> LSB void SetLSBMode( bool bLSB ) { mbLSB = bLSB; }; // Return 'numBits' as a CHAR (advances offset) DWORD Get( ULONG numBits, CHAR & dataOut ); // Return 'numBits' as a SHORT (advances offset) DWORD Get( ULONG numBits, SHORT & dataOut ); // Return 'numBits' as a LONG (advances offset) DWORD Get( ULONG numBits, LONG & dataOut ); // Return 'numBits' as a LONGLONG (advances offset) DWORD Get( ULONG numBits, LONGLONG & dataOut ); // Return 'numBits' as a UCHAR (advances offset) DWORD Get( ULONG numBits, UCHAR & dataOut ); // Return 'numBits' as a USHORT (advances offset) DWORD Get( ULONG numBits, USHORT & dataOut ); // Return 'numBits' as a ULONG (advances offset) DWORD Get( ULONG numBits, ULONG & dataOut ); // Return 'numBits' as a ULONGLONG (advances offset) DWORD Get( ULONG numBits, ULONGLONG & dataOut ); // Release the data being parsed void ReleaseData(); // Set the data being parsed void SetData( const BYTE * pData, ULONG dataBitSize ); protected: /* Data buffer */ const BYTE * mpData; /* Current bit-specified offset */ ULONG mOffset; /* Maximum bit-specified offset */ ULONG mMaxOffset; /* Are we parsing LSB -> MSB (the default)? */ bool mbLSB; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/CRC.cpp000077500000000000000000000152451455567757300224140ustar00rootroot00000000000000/*=========================================================================== FILE: CRC.cpp DESCRIPTION: 16-bit LSB CRC computation/verification PUBLIC CLASSES AND METHODS: SetCRC() CheckCRC() CalculateCRC() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "CRC.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // CRC intermediates static USHORT CRCTable[CRC_TABLE_SIZE] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 }; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: SetCRC (Free Method) DESCRIPTION: Calculate and append a 16-bit CRC to given data PARAMETERS: pData [ I ] - The data buffer dataLen [ I ] - The length of the above buffer RETURN VALUE: None ===========================================================================*/ void SetCRC( PBYTE pData, ULONG dataLen ) { // Calculate CRC USHORT CRC = CalculateCRC( pData, dataLen * 8 ); // Add CRC to data pData[dataLen] = (BYTE)(CRC & 0x00ff); pData[dataLen + 1] = (BYTE)(CRC >> 8); } /*=========================================================================== METHOD: CheckCRC (Free Method) DESCRIPTION: Check the CRC validity of the given data PARAMETERS: pData [ I ] - The data buffer dataLen [ I ] - The length of the above buffer RETURN VALUE: bool: true - CRC checks out OK false - CRC doesn't cut the mustard ===========================================================================*/ bool CheckCRC( const BYTE * pData, ULONG dataLen ) { // There must be data ASSERT( pData != 0 ); ASSERT( dataLen > 0 ); // Calculate CRC USHORT CRC = CalculateCRC( pData, dataLen * 8 ); return (CRC == CRC_16_L_OK ? true : false); } /*=========================================================================== METHOD: CalculateCRC (Free Method) DESCRIPTION: Calculate a 16-bit CRC value PARAMETERS: pBuf [ I ] - The data buffer bitLen [ I ] - The length of the above buffer (in bits) RETURN VALUE: USHORT: The 16-bit calculated CRC ===========================================================================*/ USHORT CalculateCRC( const BYTE * pBuf, ULONG bitLen ) { // Remainders are not allowed ASSERT( bitLen % 8 == 0 ); // There must be a buffer ASSERT( pBuf != 0 ); USHORT CRC; for (CRC = CRC_16_L_SEED; bitLen >= 8; bitLen -= 8, pBuf++) { CRC = CRCTable[(CRC ^ *pBuf) & 0x00ff] ^ (CRC >> 8); } return ~CRC; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/CRC.h000077500000000000000000000060711455567757300220560ustar00rootroot00000000000000/*=========================================================================== FILE: CRC.h DESCRIPTION: 16-bit LSB CRC computation/verification PUBLIC CLASSES AND METHODS: SetCRC() CheckCRC() CalculateCRC() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const USHORT CRC_16_L_POLYNOMIAL = 0x8408; const USHORT CRC_16_L_SEED = 0xFFFF; const USHORT CRC_16_L_OK = 0x0F47; const USHORT CRC_TABLE_SIZE = 256; const USHORT CRC_SIZE = 2; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // Calculate and append a 16-bit CRC to given data, the calculated CRC // value stored at pData[dataLen] & pData[dataLen + 1] void SetCRC( PBYTE pData, ULONG dataLen ); // Check a CRC value for the given data, dataLen includes the 2 byte CRC // value at the end of the buffer bool CheckCRC( const BYTE * pData, ULONG dataLen ); // Calculate a CRC value for the given data USHORT CalculateCRC( const BYTE * pBuf, ULONG bitLen ); libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/Comm.cpp000077500000000000000000000322761455567757300227030ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.cpp DESCRIPTION: Implementation of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Comm.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxCompletionRoutine (Free Method) DESCRIPTION: Completion routine for receive operation, exercises current receive callback object PARAMETERS: returnSignal [ I/O ] Asynchronus signal event (contains pointer to cCOMM object) RETURN VALUE: None ===========================================================================*/ VOID RxCompletionRoutine( sigval returnSignal ) { cComm * pComm = (cComm *)returnSignal.sival_ptr; if (pComm == NULL || pComm->IsValid() == false) { return; } cIOCallback * pCallback = pComm->mpRxCallback; if (pCallback == 0) { // aio_cancel is broken if file pointer is bad // Notify cComm::CancelIO() manually TRACE( "%s manual notification %d\n", __func__, pComm->mPort ); pComm->mReadCanceled.Set( 1 ); return; } pComm->mpRxCallback = 0; if (pCallback != (cIOCallback *)1) { int nEC = aio_error( &pComm->mReadIO ); int nBytesTransfered = aio_return( &pComm->mReadIO ); pCallback->IOComplete( nEC, nBytesTransfered ); } } /*=========================================================================*/ // cComm Methods /*=========================================================================*/ /*=========================================================================== METHOD: cComm (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cComm::cComm() : mPortName( "" ), mPort( INVALID_HANDLE_VALUE ), mpRxCallback( 0 ), mbCancelWrite( false ), mReadCanceled() { memset( &mReadIO, 0, sizeof( aiocb) ); mReadIO.aio_sigevent.sigev_value.sival_ptr = this; } /*=========================================================================== METHOD: ~cComm (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cComm::~cComm() { // Disconnect from current port Disconnect(); mReadIO.aio_sigevent.sigev_value.sival_ptr = NULL; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cComm::IsValid() { return (mReadIO.aio_sigevent.sigev_value.sival_ptr == this); } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - Name of port to open (IE: /dev/qcqmi0) RETURN VALUE: bool ===========================================================================*/ bool cComm::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mPort != INVALID_HANDLE_VALUE) { Disconnect(); } // Opening the com port mPort = open( pPort, O_RDWR ); if (mPort == INVALID_HANDLE_VALUE) { return false; } // Clear any contents tcdrain( mPort ); mReadCanceled.Clear(); // Save port name mPortName = pPort; // Success! return true; } /*=========================================================================== METHOD: RunIOCTL (Public Method) DESCRIPTION: Run an IOCTL on the open file handle PARAMETERS: ioctlReq [ I ] - ioctl request value pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - ioctl return value (0 for success) ===========================================================================*/ int cComm::RunIOCTL( UINT ioctlReq, void * pData ) { if (mPort == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } return ioctl( mPort, ioctlReq, pData ); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cComm::Disconnect() { // Assume success bool bRC = true; if (mPort != INVALID_HANDLE_VALUE) { int nClose = close( mPort ); if (nClose == -1) { bRC = false; } mPort = INVALID_HANDLE_VALUE; } mPortName.clear(); return bRC; } /*=========================================================================== METHOD: ConfigureSettings (Public Method) DESCRIPTION: Configure the port with the passed in parameters PARAMETERS: pSettings [ I ] - Desired port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::ConfigureSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } tcflush( mPort, TCIOFLUSH ); int nRC = tcsetattr( mPort, TCSANOW, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: GetSettings (Public Method) DESCRIPTION: Return the current port settings PARAMETERS: pSettings [ I ] - Current port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::GetSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } // Get the COM port settings int nRC = tcgetattr( mPort, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelIO() { if (mPort == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelRx() { if (mPort == INVALID_HANDLE_VALUE || mpRxCallback == 0) { return false; } int nReadRC = aio_cancel( mPort, &mReadIO ); mpRxCallback = 0; if (nReadRC == -1 && errno == EBADF) { // aio_cancel is broken if file pointer is bad // wait for completion TRACE( "cComm::CancelRx manual wait %d\n", mPort ); DWORD nTemp; if (mReadCanceled.Wait( INFINITE, nTemp ) == 0) { return true; } // Timeout or some other failure return false; } return (nReadRC == AIO_CANCELED); } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelTx() { if (mPort == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cComm::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mReadIO.aio_fildes = mPort; mReadIO.aio_buf = pBuf; mReadIO.aio_nbytes = bufSz; mReadIO.aio_sigevent.sigev_notify = SIGEV_THREAD; mReadIO.aio_sigevent.sigev_notify_function = RxCompletionRoutine; mReadIO.aio_sigevent.sigev_value.sival_ptr = this; mReadIO.aio_offset = 0; int nRet = aio_read( &mReadIO ); if (nRet != 0) { TRACE( "cComm::RxData() = %d, %s\n", nRet, strerror( errno ) ); errno = 0; return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cComm::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // This seems a bit pointless, but we're still going verify // the device is ready for writing, and give it up to // (1000 + num bytes) MS to be ready (in 100 MS chunks) struct timeval TimeOut; fd_set set; int nReady = 0; int nCount = 0; while ( nReady == 0 ) { if (mbCancelWrite == true) { TRACE( "cComm::TxData() write canceled before device was ready\n" ); return false; } if (nCount >= (1000 + bufSz) / 100) { // Timeout is expired break; } FD_ZERO( &set ); FD_SET( mPort, &set ); TimeOut.tv_sec = 0; TimeOut.tv_usec = 100000; nReady = select( mPort + 1, NULL, &set, NULL, &TimeOut ); nCount++; } if (nReady <= 0) { TRACE( "cComm::TxData() Unable to get device ready for" " Write, error %d: %s\n", nReady, strerror( nReady) ); return false; } int nRet = write( mPort, pBuf, bufSz ); if (nRet != bufSz) { TRACE( "cComm::TxData() write returned %d instead of %lu\n", nRet, bufSz ); return false; } #ifdef DEBUG TRACE( "Write of %lu bytes took %llu miliseconds\n", bufSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/Comm.h000077500000000000000000000114241455567757300223400ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.h DESCRIPTION: Declaration of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cIOCallback /*=========================================================================*/ class cIOCallback { public: // (Inline) Constructor cIOCallback() { }; // (Inline) Destructor virtual ~cIOCallback() { }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesTransferred ) = 0; }; /*=========================================================================*/ // Class cComm /*=========================================================================*/ class cComm { public: // Constructor cComm(); // Destructor virtual ~cComm(); // Is this object valid? virtual bool IsValid(); // Connect to the specified port virtual bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int RunIOCTL( UINT ioctlReq, void * pData ); // Disconnect from the current port virtual bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data virtual bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data virtual bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current port name virtual std::string GetPortName() const { return mPortName; }; // Are we currently connected to a port? bool IsConnected() { return (mPort != INVALID_HANDLE_VALUE); }; protected: /* Name of current port */ std::string mPortName; /* Handle to COM port */ int mPort; // Read IO settings aiocb mReadIO; /* Read callbacks */ cIOCallback * mpRxCallback; // Cancel the write request? bool mbCancelWrite; // Read callback cancelation notification cEvent mReadCanceled; // Rx completion routine is allowed complete access friend VOID RxCompletionRoutine( sigval returnSignal ); }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/CoreDatabase.cpp000077500000000000000000002423321455567757300243210ustar00rootroot00000000000000/*=========================================================================== FILE: CoreDatabase.cpp DESCRIPTION: Implementation of cCoreDatabase class PUBLIC CLASSES AND METHODS: cCoreDatabase This class represents the run-time (read only) version of the core library database Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "CoreDatabase.h" #include "DB2NavTree.h" #include "CoreUtilities.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Uncomment out to enable database load/save timing through cCoreDatabase // #define TIME_DB 1 // Database table file names LPCSTR DB2_FILE_PROTOCOL_FIELD = "Field.txt"; LPCSTR DB2_FILE_PROTOCOL_STRUCT = "Struct.txt"; LPCSTR DB2_FILE_PROTOCOL_ENTITY = "Entity.txt"; LPCSTR DB2_FILE_ENUM_MAIN = "Enum.txt"; LPCSTR DB2_FILE_ENUM_ENTRY = "EnumEntry.txt"; // Database table file names LPCSTR DB2_TABLE_PROTOCOL_FIELD = "Field"; LPCSTR DB2_TABLE_PROTOCOL_STRUCT = "Struct"; LPCSTR DB2_TABLE_PROTOCOL_ENTITY = "Entity"; LPCSTR DB2_TABLE_ENUM_MAIN = "Enum"; LPCSTR DB2_TABLE_ENUM_ENTRY = "Enum Entry"; // An empty (but not NULL) string LPCSTR EMPTY_STRING = ""; // Value seperator for database text LPCSTR DB2_VALUE_SEP = "^"; // Sub-value (i.e. within a particular value) seperator for database text LPCSTR DB2_SUBVAL_SEP = ","; // Maximum amount of recursion allowed in protocol entity structure processing const ULONG MAX_NESTING_LEVEL = 32; // The default logger (for backwards compatibility) cDB2TraceLog gDB2DefaultLog; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: CopyQuotedString (Public Method) DESCRIPTION: Convert a string (in quotes) to a string (minus) quotes and copy into an allocated buffer PARAMETERS: pString [ I ] - The string being de-quoted/copied RETURN VALUE: LPSTR: The copy (returns 0 upon error) ===========================================================================*/ LPCSTR CopyQuotedString( LPSTR pString ) { // Get string length ULONG len = (ULONG)strlen( pString ); // Adjust to remove trailing spaces while (len > 0 && pString[len - 1] == ' ') { pString[len - 1] = 0; len--; } // Long enough (and quoted?) if ( (len >= 2) && (pString[0] == '\"') && (pString[len - 1] == '\"') ) { if (len == 2) { return EMPTY_STRING; } else { // Attempt to allocate a copy LPSTR pRet = new char[len - 1]; if (pRet != 0) { ULONG bytes = (len - 2) * sizeof( char ); memcpy( (PVOID)pRet, (LPCVOID)&pString[1], (SIZE_T)bytes ); pRet[len - 2] = 0; return pRet; } } } return 0; } /*=========================================================================*/ // sDB2ProtocolEntity Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2ProtocolEntity::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: Type // 1: "Key" // 2: "Name" // 3: Struct ID // 4: Format specifier ID (optional) // 5: Internal only flag (optional) // 6: Extended format specifier ID (optional) const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[2] ); if (pCopy != 0) { mpName = pCopy; mType = (eDB2EntityType)strtol( tokens[0], 0, 10 ); // Convert key/populate ID mID.push_back( (ULONG)mType ); CSVStringToContainer( DB2_SUBVAL_SEP, tokens[1], mID, false ); mStructID = strtol( tokens[3], 0, 10 ); // Format specifier? if (toks > NUM_REQ_VALS) { mFormatID = strtol( tokens[NUM_REQ_VALS], 0, 10 ); } // Internal only flag? if (toks > NUM_REQ_VALS + 1) { mbInternal = (strtoul( tokens[NUM_REQ_VALS + 1], 0, 10 ) != 0); } // Extended format specifier ID? if (toks > NUM_REQ_VALS + 2) { mFormatExID = strtol( tokens[NUM_REQ_VALS + 2], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2ProtocolEntity::IsValid() const { // The type has to be valid if (::IsValid( mType ) == false) { return false; } // The ID must consists of at least two entries if (mID.size() < 2) { return false; } // The first entry in the ID has to be the type if (mID[0] != (ULONG)mType) { return false; } // The structure ID has to be >= -1) if (mStructID < -1) { return false; } // The format specifier has to be >= -1) if (mFormatID < -1) { return false; } // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } return true; } /*=========================================================================*/ // sDB2Fragment Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: Order // 2: Type // 3: Val // 4: "Name" // 5: Offset // 6: Mod Type // 7: "Mod Value" const ULONG NUM_REQ_VALS = 8; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from modifier value and copy LPCSTR pVal = CopyQuotedString( tokens[7] ); if (pVal != 0) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[4] ); if (pCopy != 0) { mStructID = strtoul( tokens[0], 0, 10 ); mFragmentOrder = strtoul( tokens[1], 0, 10 ); mFragmentValue = strtoul( tokens[3], 0, 10 ); mFragmentOffset = strtol( tokens[5], 0, 10 ); mFragmentType = (eDB2FragmentType)strtol( tokens[2], 0, 10 ); mModifierType = (eDB2ModifierType)strtol( tokens[6], 0, 10 );; mpModifierValue = pVal; mpName = pCopy; bRC = IsValid(); } } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::IsValid() const { // The fragment type has to be valid if (::IsValid( mFragmentType ) == false) { return false; } // The modifier type has to be valid if (::IsValid( mModifierType ) == false) { return false; } // There has to be a name (possibly empty) if (mpName == 0) { return false; } // There has to be a modifier value (possibly empty) if (mpModifierValue == 0) { return false; } // Directives can only be given for the first fragment if ( (mFragmentType == eDB2_FRAGMENT_MSB_2_LSB) || (mFragmentType == eDB2_FRAGMENT_LSB_2_MSB) ) { if (mFragmentOrder > 0) { return false; } } // Validate modifier switch (mModifierType) { case eDB2_MOD_NONE: if (mpModifierValue != 0 && mpModifierValue[0] != 0) { // Modifier string needs to be empty return false; } break; case eDB2_MOD_CONSTANT_ARRAY: case eDB2_MOD_VARIABLE_ARRAY: case eDB2_MOD_OPTIONAL: case eDB2_MOD_VARIABLE_ARRAY2: case eDB2_MOD_VARIABLE_ARRAY3: if (mpModifierValue == 0 || mpModifierValue[0] == 0) { // Needs to be a modifier string return false; } break; case eDB2_MOD_VARIABLE_STRING1: case eDB2_MOD_VARIABLE_STRING2: case eDB2_MOD_VARIABLE_STRING3: if (mpModifierValue == 0 || mpModifierValue[0] == 0) { // Needs to be a modifier string return false; } if (mFragmentType != eDB2_FRAGMENT_FIELD) { // Only valid when modifying fields (strings) return false; } break; } if (mFragmentType == eDB2_FRAGMENT_CONSTANT_PAD && mFragmentValue == 0) { return false; } return true; } /*=========================================================================== METHOD: BuildCondition (Static Public Method) DESCRIPTION: Build a simple condition string PARAMETERS: id [ I ] - Field ID op [ I ] - Operator val [ I ] - Value (or field ID) bF2F [ I ] - Field to field expression? RETURN VALUE: std::string ===========================================================================*/ std::string sDB2Fragment::BuildCondition( ULONG id, eDB2Operator op, LONGLONG val, bool bF2F ) { std::ostringstream tmp; if (::IsValid( op ) == true) { if (bF2F == false) { switch (op) { case eDB2_OP_LT: tmp << (UINT)id << " " << "<" << val; break; case eDB2_OP_LTE: tmp << (UINT)id << " " << "<=" << val; break; case eDB2_OP_EQ: tmp << (UINT)id << " " << "=" << val; break; case eDB2_OP_NEQ: tmp << (UINT)id << " " << "!=" << val; break; case eDB2_OP_GTE: tmp << (UINT)id << " " << ">=" << val; break; case eDB2_OP_GT: tmp << (UINT)id << " " << ">" << val; break; case eDB2_OP_DIV: tmp << (UINT)id << " " << "%" << val; break; case eDB2_OP_NDIV: tmp << (UINT)id << " " << "!%" << val; break; } } else { switch (op) { case eDB2_OP_LT: tmp << (UINT)id << " " << "f<" << val; break; case eDB2_OP_LTE: tmp << (UINT)id << " " << "f<=" << val; break; case eDB2_OP_EQ: tmp << (UINT)id << " " << "f=" << val; break; case eDB2_OP_NEQ: tmp << (UINT)id << " " << "f!=" << val; break; case eDB2_OP_GTE: tmp << (UINT)id << " " << "f>=" << val; break; case eDB2_OP_GT: tmp << (UINT)id << " " << "f>" << val; break; case eDB2_OP_DIV: tmp << (UINT)id << " " << "f%" << val; break; case eDB2_OP_NDIV: tmp << (UINT)id << " " << "f!%" << val; break; } } } std::string retStr = tmp.str(); return retStr; } /*=========================================================================== METHOD: EvaluateCondition (Static Public Method) DESCRIPTION: Evaluate a simple condition PARAMETERS: valA [ I ] - Left value op [ I ] - Operator valB [ I ] - Right value RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::EvaluateCondition( LONGLONG valA, eDB2Operator op, LONGLONG valB ) { bool bOK = false; if (::IsValid( op ) == true) { switch (op) { case eDB2_OP_LT: bOK = (valA < valB); break; case eDB2_OP_LTE: bOK = (valA <= valB); break; case eDB2_OP_EQ: bOK = (valA == valB); break; case eDB2_OP_NEQ: bOK = (valA != valB); break; case eDB2_OP_GTE: bOK = (valA >= valB); break; case eDB2_OP_GT: bOK = (valA > valB); break; case eDB2_OP_DIV: bOK = ((valA % valB) == 0); break; case eDB2_OP_NDIV: bOK = ((valA % valB) != 0); break; } } return bOK; } /*=========================================================================== METHOD: ParseCondition (Static Public Method) DESCRIPTION: Parse a simple condition PARAMETERS: pCondition [ I ] - Condition string id [ O ] - Field ID op [ O ] - Operator val [ O ] - Value (or field ID) bF2F [ O ] - Field to field expression? RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::ParseCondition( LPCSTR pCondition, ULONG & id, eDB2Operator & op, LONGLONG & val, bool & bF2F ) { // Assume error bool bOK = false; // Even a condition to start with? if (pCondition == 0 || pCondition == EMPTY_STRING) { return bOK; } // Parse condition to tokens (field ID operator value) int nSize = strlen( pCondition ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, pCondition, nSize ); std::vector tokens; ParseTokens( " ", pCopy, tokens ); if (tokens.size() == 3) { // Covert first token to field ID ULONG fieldID = strtoul( tokens[0], 0, 10 ); // Grab the value for the given field ID LONGLONG fieldVal = 0; bOK = StringToLONGLONG( tokens[2], 0, fieldVal ); if (bOK == true) { std::string opStr = tokens[1]; // std::string version of Trim() int nFirst = opStr.find_first_not_of( ' ' ); int nLast = opStr.find_last_not_of( ' ' ); if (nFirst == -1 || nLast == -1) { // Something went horribly wrong, empty string or all spaces delete [] pCopy; return false; } opStr = opStr.substr( nFirst, nLast - nFirst + 1 ); // std::string version of MakeLower() transform( opStr.begin(), opStr.end(), opStr.begin(), tolower ); bF2F = false; if (opStr == "<") { op = eDB2_OP_LT; } else if (opStr == "<=") { op = eDB2_OP_LTE; } else if (opStr == "=") { op = eDB2_OP_EQ; } else if (opStr == "!=") { op = eDB2_OP_NEQ; } else if (opStr == ">=") { op = eDB2_OP_GTE; } else if (opStr == ">") { op = eDB2_OP_GT; } else if (opStr == "%") { op = eDB2_OP_DIV; } else if (opStr == "!%") { op = eDB2_OP_NDIV; } else if (opStr == "f<") { bF2F = true; op = eDB2_OP_LT; } else if (opStr == "f<=") { bF2F = true; op = eDB2_OP_LTE; } else if (opStr == "f=") { bF2F = true; op = eDB2_OP_EQ; } else if (opStr == "f!=") { bF2F = true; op = eDB2_OP_NEQ; } else if (opStr == "f>=") { bF2F = true; op = eDB2_OP_GTE; } else if (opStr == "f>") { bF2F = true; op = eDB2_OP_GT; } else if (opStr == "f%") { bF2F = true; op = eDB2_OP_DIV; } else if (opStr == "f!%") { bF2F = true; op = eDB2_OP_NDIV; } else { bOK = false; } if (bOK == true) { id = fieldID; val = fieldVal; } } } delete [] pCopy; return bOK; } /*=========================================================================== METHOD: BuildExpression (Static Public Method) DESCRIPTION: Build a simple expression string PARAMETERS: id [ I ] - Field ID op [ I ] - Operator val [ I ] - Value (or field ID) bF2F [ I ] - Field to field expression? RETURN VALUE: std::string ===========================================================================*/ std::string sDB2Fragment::BuildExpression( ULONG id, eDB2ExpOperator op, LONGLONG val, bool bF2F ) { std::ostringstream tmp; if (::IsValid( op ) == true) { if (bF2F == false) { switch (op) { case eDB2_EXPOP_ADD: tmp << (UINT)id << " " << "+" << val; break; case eDB2_EXPOP_SUB: tmp << (UINT)id << " " << "-" << val; break; case eDB2_EXPOP_MUL: tmp << (UINT)id << " " << "*" << val; break; case eDB2_EXPOP_DIV: tmp << (UINT)id << " " << "/" << val; break; case eDB2_EXPOP_REM: tmp << (UINT)id << " " << "%" << val; break; case eDB2_EXPOP_MIN: tmp << (UINT)id << " " << "min" << val; break; case eDB2_EXPOP_MAX: tmp << (UINT)id << " " << "max" << val; break; } } else { switch (op) { case eDB2_EXPOP_ADD: tmp << (UINT)id << " " << "f+" << val; break; case eDB2_EXPOP_SUB: tmp << (UINT)id << " " << "f-" << val; break; case eDB2_EXPOP_MUL: tmp << (UINT)id << " " << "f*" << val; break; case eDB2_EXPOP_DIV: tmp << (UINT)id << " " << "f/" << val; break; case eDB2_EXPOP_REM: tmp << (UINT)id << " " << "f%" << val; break; case eDB2_EXPOP_MIN: tmp << (UINT)id << " " << "fmin" << val; break; case eDB2_EXPOP_MAX: tmp << (UINT)id << " " << "fmax" << val; break; } } } std::string retStr = tmp.str(); return retStr; } /*=========================================================================== METHOD: EvaluateExpression (Static Public Method) DESCRIPTION: Evaluate a simple expression PARAMETERS: valA [ I ] - Left value op [ I ] - Operator valB [ I ] - Right value res [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::EvaluateExpression( LONGLONG valA, eDB2ExpOperator op, LONGLONG valB, LONGLONG & res ) { bool bOK = false; if (::IsValid( op ) == true) { bOK = true; switch (op) { case eDB2_EXPOP_ADD: res = valA + valB; break; case eDB2_EXPOP_SUB: res = valA - valB; break; case eDB2_EXPOP_MUL: res = valA * valB; break; case eDB2_EXPOP_DIV: res = valA / valB; break; case eDB2_EXPOP_REM: res = valA % valB; break; case eDB2_EXPOP_MIN: res = valA; if (valA > valB) { res = valB; } break; case eDB2_EXPOP_MAX: res = valA; if (valA < valB) { res = valB; } break; default: bOK = false; break; } } return bOK; } /*=========================================================================== METHOD: ParseExpression (Static Public Method) DESCRIPTION: Parse a simple expression PARAMETERS: pExpr [ I ] - Expression string id [ O ] - Field ID op [ O ] - Operator val [ O ] - Value (or Field ID) bF2F [ O ] - Field to field expression? RETURN VALUE: bool ===========================================================================*/ bool sDB2Fragment::ParseExpression( LPCSTR pExpr, ULONG & id, eDB2ExpOperator & op, LONGLONG & val, bool & bF2F ) { // Assume error bool bOK = false; // Even a condition to start with? if (pExpr == 0 || pExpr == EMPTY_STRING) { return bOK; } // Parse condition to tokens (field ID operator value) int nSize = strlen( pExpr ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, pExpr, nSize ); std::vector tokens; ParseTokens( " ", pCopy, tokens ); if (tokens.size() == 3) { // Covert first token to field ID ULONG fieldID = strtoul( tokens[0], 0, 10 ); // Grab the value for the given field ID LONGLONG fieldVal = 0; bOK = StringToLONGLONG( tokens[2], 0, fieldVal ); if (bOK == true) { std::string opStr = tokens[1]; // std::string version of Trim() int nFirst = opStr.find_first_not_of( ' ' ); int nLast = opStr.find_last_not_of( ' ' ); if (nFirst == -1 || nLast == -1) { // Something went horribly wrong, empty string or all spaces delete [] pCopy; return false; } opStr = opStr.substr( nFirst, nLast - nFirst + 1 ); // std::string version of MakeLower() transform( opStr.begin(), opStr.end(), opStr.begin(), tolower ); bF2F = false; if (opStr == "+") { op = eDB2_EXPOP_ADD; } else if (opStr == "-") { op = eDB2_EXPOP_SUB; } else if (opStr == "*") { op = eDB2_EXPOP_MUL; } else if (opStr == "/") { op = eDB2_EXPOP_DIV; } else if (opStr == "%") { op = eDB2_EXPOP_REM; } else if (opStr == "min") { op = eDB2_EXPOP_MIN; } else if (opStr == "max") { op = eDB2_EXPOP_MAX; } else if (opStr == "f+") { bF2F = true; op = eDB2_EXPOP_ADD; } else if (opStr == "f-") { bF2F = true; op = eDB2_EXPOP_SUB; } else if (opStr == "f*") { bF2F = true; op = eDB2_EXPOP_MUL; } else if (opStr == "f/") { bF2F = true; op = eDB2_EXPOP_DIV; } else if (opStr == "f%") { bF2F = true; op = eDB2_EXPOP_REM; } else if (opStr == "fmin") { bF2F = true; op = eDB2_EXPOP_MIN; } else if (opStr == "fmax") { bF2F = true; op = eDB2_EXPOP_MAX; } else { bOK = false; } if (bOK == true) { id = fieldID; val = fieldVal; } } } delete [] pCopy; return bOK; } /*=========================================================================*/ // sDB2Field Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Field::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: "Name" // 2: Size // 3: Field type // 4: Field type value // 5: Hexadecimal // 6: Description ID (optional) // 7: Internal only flag (optional) const ULONG NUM_REQ_VALS = 6; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mSize = strtoul( tokens[2], 0, 10 ); mpName = pCopy; mType = (eDB2FieldType)strtol( tokens[3], 0, 10 ); mTypeVal = strtoul( tokens[4], 0, 10 ); mbHex = (strtoul( tokens[5], 0, 10 ) != 0); // Description ID? if (toks > NUM_REQ_VALS) { mDescriptionID = strtol( tokens[NUM_REQ_VALS], 0, 10 ); } // Internal only flag? if (toks > NUM_REQ_VALS + 1) { mbInternal = (strtoul( tokens[NUM_REQ_VALS + 1], 0, 10 ) != 0); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Field::IsValid() const { // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } // The field type must be valid if (::IsValid( mType ) == false) { return false; } // For validating size ULONG minSz = 1; ULONG maxSz = 8; ULONG modVal = 0; // What type of field is this? if (mType == eDB2_FIELD_STD) { eDB2StdFieldType ft = (eDB2StdFieldType)mTypeVal; if (::IsValid( ft ) == false) { return false; } switch (ft) { case eDB2_FIELD_STDTYPE_BOOL: maxSz = 64; break; case eDB2_FIELD_STDTYPE_INT16: case eDB2_FIELD_STDTYPE_UINT16: maxSz = 16; break; case eDB2_FIELD_STDTYPE_INT32: case eDB2_FIELD_STDTYPE_UINT32: case eDB2_FIELD_STDTYPE_FLOAT32: maxSz = 32; break; case eDB2_FIELD_STDTYPE_INT64: case eDB2_FIELD_STDTYPE_UINT64: case eDB2_FIELD_STDTYPE_FLOAT64: maxSz = 64; break; case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U8: // One character, no maximum minSz = 8; maxSz = 0; modVal = 8; break; case eDB2_FIELD_STDTYPE_STRING_U: // One UNICODE character, no maximum minSz = 16; maxSz = 0; modVal = 16; break; case eDB2_FIELD_STDTYPE_STRING_ANT: case eDB2_FIELD_STDTYPE_STRING_UNT: case eDB2_FIELD_STDTYPE_STRING_U8NT: // Size needs to be specified as 0 minSz = maxSz = 0; break; } } else { // Enum must be between 1 - 32 bits in size maxSz = 32; } if (mSize < minSz) { return false; } if (maxSz != 0 && mSize > maxSz) { return false; } if (modVal != 0 && (mSize % modVal) != 0) { return false; } if (mDescriptionID < -1) { return false; } // The name must be valid std::string name = mpName; if (name.find( DB2_VALUE_SEP ) != -1 || name.find( DB2_SUBVAL_SEP ) != -1) { return false; } return true; } /*=========================================================================*/ // sDB2Category Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Category::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: "Name" // 2: Description ID // 3: Parent ID const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mParentID = strtol( tokens[3], 0, 10 ); mpName = pCopy; // Old format used to be a description string, so // first check for quotes if (tokens[2][0] != '\"') { mDescriptionID = strtol( tokens[2], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Category::IsValid() const { // The parent ID has to be greater than or equal to -1 if (mParentID < -1) { return false; } // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // sDB2NVItem Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2NVItem::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: NV Item number // 1: "Name" // 2: "Categories" // 3: Description ID const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { CSVStringToContainer( DB2_SUBVAL_SEP, tokens[2], mCategoryIDs ); mItem = strtoul( tokens[0], 0, 10 ); mpName = pCopy; // Old format used to be a description string, so // first check for quotes if (tokens[3][0] != '\"') { mDescriptionID = strtol( tokens[3], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2NVItem::IsValid() const { // There has to be at least one category ID ULONG cats = (ULONG)mCategoryIDs.size(); if (cats < 1) { return false; } // The category IDs have to be greater than or equal to -1 std::set ::const_iterator pIter = mCategoryIDs.begin(); while (pIter != mCategoryIDs.end()) { if (*pIter++ < -1) { return false; } } // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // sDB2Enum Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2Enum::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: "Name" // 2: Description ID // 3: Internal? const ULONG NUM_REQ_VALS = 4; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[1] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mbInternal = (strtoul( tokens[3], 0, 10 ) != 0); mpName = pCopy; // Old format used to be a description string, so // first check for quotes if (tokens[2][0] != '\"') { mDescriptionID = strtol( tokens[2], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2Enum::IsValid() const { // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // sDB2EnumEntry Methods /*=========================================================================*/ /*=========================================================================== METHOD: FromString (Public Method) DESCRIPTION: Populate this object from a string PARAMETERS: pStr [ I ] - String to populate object from RETURN VALUE: bool ===========================================================================*/ bool sDB2EnumEntry::FromString( LPSTR pStr ) { bool bRC = false; // Should be // 0: ID // 1: Value // 2: "Name" // 3: Description ID (optional) const ULONG NUM_REQ_VALS = 3; std::vector tokens; ParseTokens( DB2_VALUE_SEP, pStr, tokens ); ULONG toks = (ULONG)tokens.size(); if (toks >= NUM_REQ_VALS) { // Remove quotes from name string and copy LPCSTR pCopy = CopyQuotedString( tokens[2] ); if (pCopy != 0) { mID = strtoul( tokens[0], 0, 10 ); mpName = pCopy; // Enum entries are signed by definition, but can be entered // in hexadecimal as they may be unsigned in practice LONG val = -1; StringToLONG( tokens[1], 0, val ); mValue = (INT)val; // Determine hexadecimal flag by performing case-insensitve comparison // of the value string's first two characters with "0x" mbHex = (strncmp( tokens[1], "0x", 2 ) == 0); // Description ID? if (toks > NUM_REQ_VALS) { mDescriptionID = strtol( tokens[NUM_REQ_VALS], 0, 10 ); } bRC = IsValid(); } } return bRC; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: bool ===========================================================================*/ bool sDB2EnumEntry::IsValid() const { // There has to be a non-empty name if (mpName == 0 || mpName[0] == 0) { return false; } if (mDescriptionID < -1) { return false; } return true; } /*=========================================================================*/ // cCoreDatabase Methods /*=========================================================================*/ /*=========================================================================== METHOD: cCoreDatabase (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cCoreDatabase::cCoreDatabase() : mpLog( &gDB2DefaultLog ) { // Nothing to do - database empty, call Initialize() } /*=========================================================================== METHOD: ~cCoreDatabase (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cCoreDatabase::~cCoreDatabase() { Exit(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Version to Load from file Initialize the database - this must be done once (and only once) prior to the database being accessed PARAMETERS pBasePath [ I ] - Base path to database files RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::Initialize( LPCSTR pBasePath ) { bool bRC = true; // Cleanup the last database (if necessary) Exit(); bRC &= LoadEnumTables( pBasePath ); bRC &= LoadStructureTables( pBasePath ); // Build the modifier tables bRC &= BuildModifierTables(); return bRC; } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Version to Load from internal pointers Initialize the database - this must be done once (and only once) prior to the database being accessed PARAMETERS RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::Initialize() { bool bRC = true; // Cleanup the last database (if necessary) Exit(); bRC &= LoadEnumTables(); bRC &= LoadStructureTables(); // Build the modifier tables bRC &= BuildModifierTables(); return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit (cleanup) the database RETURN VALUE: None ===========================================================================*/ void cCoreDatabase::Exit() { FreeDB2Table( mEntityFields ); FreeDB2Table( mEntityStructs ); FreeDB2Table( mProtocolEntities ); FreeDB2Table( mEnumNameMap ); FreeDB2Table( mEnumEntryMap ); tDB2EntityNavMap::iterator pIter = mEntityNavMap.begin(); while (pIter != mEntityNavMap.end()) { cDB2NavTree * pNav = pIter->second; if (pNav != 0) { delete pNav; } pIter++; } mEntityNavMap.clear(); } /*=========================================================================== METHOD: GetEntityNavTree (Public Method) DESCRIPTION: Get the entity navigation tree for the given protocol entity, if none exists one will be built and returned PARAMETERS key [ I ] - Protocol entity key RETURN VALUE: const cDB2NavTree * (0 upon error) ===========================================================================*/ const cDB2NavTree * cCoreDatabase::GetEntityNavTree( const std::vector & key ) const { // Look up entity definition (to find DB string address) sDB2ProtocolEntity tmpEntity; bool bFound = FindEntity( key, tmpEntity ); // Did we find it? if (bFound == false) { // No matching definition in database return 0; } // Obtain the canonical key and use it to look up the nav tree tDB2EntityNavMap::const_iterator pIter = mEntityNavMap.find( key ); if (pIter != mEntityNavMap.end()) { return pIter->second; } // None found, go ahead and build one cDB2NavTree * pNavTree = new cDB2NavTree( *this ); if (pNavTree != 0) { bool bOK = pNavTree->BuildTree( key ); if (bOK == true) { // Store it and return it to the user std::pair , cDB2NavTree *> e( key, pNavTree ); mEntityNavMap.insert( e ); } else { delete pNavTree; pNavTree = 0; } } return pNavTree; } /*=========================================================================== METHOD: FindEntity (Public Method) DESCRIPTION: Find the protocol entity with the specified extended ID PARAMETERS key [ I ] - Protocol entity key to find entity [ O ] - Protocol entity (if found) RETURN VALUE: bool - Success? ===========================================================================*/ bool cCoreDatabase::FindEntity( const std::vector & key, sDB2ProtocolEntity & entity ) const { // Assume failure bool bFound = false; tDB2EntityMap::const_iterator pEntity = mProtocolEntities.find( key ); if (pEntity != mProtocolEntities.end()) { entity = pEntity->second; bFound = true; } return bFound; } /*=========================================================================== METHOD: FindEntity (Public Method) DESCRIPTION: Find the protocol entity with the specified name PARAMETERS pEntityName [ I ] - Protocol entity name to find entity [ O ] - Protocol entity (if found) RETURN VALUE: bool - Success? ===========================================================================*/ bool cCoreDatabase::FindEntity( LPCSTR pEntityName, sDB2ProtocolEntity & entity ) const { // Assume failure bool bFound = false; if (pEntityName != 0 && pEntityName[0] != 0) { tDB2EntityNameMap::const_iterator pIter = mEntityNames.find( pEntityName ); if (pIter != mEntityNames.end()) { const std::vector & key = pIter->second; bFound = FindEntity( key, entity ); } } return bFound; } /*=========================================================================== METHOD: MapEntityNameToID (Public Method) DESCRIPTION: Map a protocol entity name to an ID PARAMETERS pName [ I ] - Protocol entity name key [ O ] - Upon success, the ID corresponding to protocol entity RETURN VALUE: bool - Success? ===========================================================================*/ bool cCoreDatabase::MapEntityNameToID( LPCSTR pName, std::vector & key ) const { // Assume failure bool bOK = false; if (pName != 0 && pName[0] != 0) { std::string tmp = pName; // std::string version of Trim() int nFirst = tmp.find_first_not_of( ' ' ); int nLast = tmp.find_last_not_of( ' ' ); if (nFirst == -1 || nLast == -1) { // Something went wrong, empty string or all spaces return false; } tmp = tmp.substr( nFirst, nLast - nFirst + 1 ); tDB2EntityNameMap::const_iterator pIter = mEntityNames.find( tmp.c_str() ); if (pIter != mEntityNames.end()) { key = pIter->second; bOK = true; } } return bOK; } /*=========================================================================== METHOD: MapEnumToString (Public Method) DESCRIPTION: Map the given enum value (specified by enum ID, and enum value) to the enum value name string PARAMETERS enumID [ I ] - ID of the enumeration enumVal [ I ] - Enum value to map bSimpleErrFmt [ I ] - If the eunum value cannot be mapped to a string what should this method return? If 'true' then just the value as a string If 'false' then the enum ID, value, and 'Unknown' bHex [ I ] - Hexadecimal output on mapping error? RETURN VALUE: std::string - The enum name (or error string if enum value is not found) ===========================================================================*/ std::string cCoreDatabase::MapEnumToString( ULONG enumID, int enumVal, bool bSimpleErrFmt, bool bHex ) const { std::string retStr = ""; // Form the lookup key std::pair key( enumID, enumVal ); // Look up the enum value descriptor tDB2EnumEntryMap::const_iterator pVals = mEnumEntryMap.find( key ); if (pVals != mEnumEntryMap.end()) { const sDB2EnumEntry & entry = pVals->second; retStr = entry.mpName; } // No string? if (retStr.size() <= 0) { std::ostringstream tmp; if (bSimpleErrFmt == false) { tmp << "Unknown [" << (UINT)enumID << "/"; } if (bHex == true) { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << enumVal; } else { tmp << enumVal; } retStr = tmp.str(); } return retStr; } /*=========================================================================== METHOD: MapEnumToString (Public Method) DESCRIPTION: Map the given enum value (specified by enum name, and enum value) to the enum value name string PARAMETERS pEnumName [ I ] - Name of the enumeration enumVal [ I ] - Enum value to map bSimpleErrFmt [ I ] - If the eunum value cannot be mapped to a string what should this method return? If 'true' then just the value as a string If 'false' then the enum ID, value, and 'Unknown' bHex [ I ] - Hexadecimal output on mapping error? RETURN VALUE: std::string - The enum name (or error string if enum value is not found) ===========================================================================*/ std::string cCoreDatabase::MapEnumToString( LPCSTR pEnumName, int enumVal, bool bSimpleErrFmt, bool bHex ) const { std::string retStr = ""; tDB2EnumMap::const_iterator pEnumMapIter = mEnumMap.find( pEnumName ); if (pEnumMapIter != mEnumMap.end()) { const std::map & entries = pEnumMapIter->second.second; std::map ::const_iterator pEntry; pEntry = entries.find( enumVal ); if (pEntry != entries.end()) { retStr = pEntry->second; } } // No string? if (retStr.size() <= 0) { std::ostringstream tmp; if (bSimpleErrFmt == false) { if (pEnumName == 0) { pEnumName = "?"; } tmp << "Unknown [" << pEnumName << "/"; } if (bHex == true) { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << enumVal; } else { tmp << enumVal; } retStr = tmp.str(); } return retStr; } /*=========================================================================== METHOD: AssembleEnumMap (Internal Method) DESCRIPTION: Assemble the internal enum map from the enum and enum entry tables RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::AssembleEnumMap() { bool bOK = true; // Empty it out first mEnumMap.clear(); tDB2EnumEntryMap::const_iterator pEntry = mEnumEntryMap.begin(); if (pEntry == mEnumEntryMap.end()) { return bOK; } // Set initial enum ID ULONG currentID = pEntry->second.mID; std::map entries; while (pEntry != mEnumEntryMap.end()) { const sDB2EnumEntry & entry = pEntry->second; pEntry++; if (entry.IsValid() == false) { continue; } if (currentID != entry.mID) { if (entries.size() > 0) { // Look up the enum name tDB2EnumNameMap::const_iterator pEnum; pEnum = mEnumNameMap.find( currentID ); if (pEnum != mEnumNameMap.end()) { const sDB2Enum & dbEnum = pEnum->second; if (mEnumMap.find( dbEnum.mpName ) == mEnumMap.end()) { tDB2EnumMapPair tmp( dbEnum.mID, entries ); mEnumMap[dbEnum.mpName] = tmp; } else { // Hmm, duplicate enum names discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Duplicate enum (by name) detected \'" << dbEnum.mpName << "\'"; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } else { // Hmm, missing enum ID discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Missing enum ID detected " << currentID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } // Clear out enum entries for next pass and add this entry entries.clear(); entries[entry.mValue] = entry.mpName; // Adjust current enum ID currentID = entry.mID; } } else { if (entries.find( entry.mValue ) == entries.end()) { entries[entry.mValue] = entry.mpName; } else { // Hmm, duplicate enum entry values discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_ENTRY << "] Duplicate enum entries detected \'" << entry.mpName << "\', " << entry.mValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } } // Add in the last enum if (mEnumEntryMap.size() > 0 && entries.size() > 0) { // Look up the enum name tDB2EnumNameMap::const_iterator pEnum; pEnum = mEnumNameMap.find( currentID ); if (pEnum != mEnumNameMap.end()) { const sDB2Enum & dbEnum = pEnum->second; if (mEnumMap.find( dbEnum.mpName ) == mEnumMap.end()) { tDB2EnumMapPair tmp( dbEnum.mID, entries ); mEnumMap[dbEnum.mpName] = tmp; } else { // Hmm, duplicate enum names discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Duplicate enum (by name) detected \'" << dbEnum.mpName << "\'"; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } else { // Hmm, missing enum ID discovered std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_ENUM_MAIN << "] Missing enum ID detected " << currentID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } return bOK; } /*=========================================================================== METHOD: AssembleEntityNameMap (Internal Method) DESCRIPTION: Assemble the internal protocol entity name map RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::AssembleEntityNameMap() { // Assume success bool bOK = true; // Empty it out first mEntityNames.clear(); // Go through and build the event name table tDB2EntityMap::const_iterator pIter = mProtocolEntities.begin(); while (pIter != mProtocolEntities.end()) { const sDB2ProtocolEntity & obj = pIter->second; pIter++; if (obj.IsValid() == false) { continue; } tDB2EntityNameMap::const_iterator pNames; pNames = mEntityNames.find( obj.mpName ); if (pNames == mEntityNames.end()) { mEntityNames[obj.mpName] = obj.GetKey(); } else { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_ENTITY << "] Duplicate protocol entity (by name) detected \'" << obj.mpName << "\'"; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bOK = false; } } return bOK; } /*=========================================================================== METHOD: BuildModifierTables (Internal Method) DESCRIPTION: Build the parsed fragment modifier maps, i.e. convert the modifier text string to something more useful by database clients RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::BuildModifierTables() { // Assume success bool bOK = true; // Parse all fragment modifiers tDB2FragmentMap::const_iterator pFragIter = mEntityStructs.begin(); while (pFragIter != mEntityStructs.end()) { // Grab new fragment const sDB2Fragment & frag = pFragIter->second; pFragIter++; // Skip invalid/unmodified fragments if ( (frag.IsValid() == false) || (frag.mpModifierValue == 0) || (frag.mpModifierValue == EMPTY_STRING) ) { continue; } switch (frag.mModifierType) { case eDB2_MOD_CONSTANT_ARRAY: case eDB2_MOD_VARIABLE_ARRAY: case eDB2_MOD_VARIABLE_STRING1: case eDB2_MOD_VARIABLE_STRING2: case eDB2_MOD_VARIABLE_STRING3: { ULONG val = strtoul( frag.mpModifierValue, 0, 0 ); mArray1ModMap[frag.mpModifierValue] = val; } break; case eDB2_MOD_VARIABLE_ARRAY2: { // Parse modifier to tokens (start stop) int nSize = strlen( frag.mpModifierValue ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, frag.mpModifierValue, nSize ); std::vector indices; CSVStringToContainer( " ", pCopy, indices ); delete [] pCopy; if (indices.size() == 2) { std::pair val; val.first = indices[0]; val.second = indices[1]; mArray2ModMap[frag.mpModifierValue] = val; } } break; case eDB2_MOD_OPTIONAL: { sDB2SimpleCondition con; // Parse condition to tokens (field ID operator value) bool bRC = sDB2Fragment::ParseCondition( frag.mpModifierValue, con.mID, con.mOperator, con.mValue, con.mbF2F ); if (bRC == true) { mOptionalModMap[frag.mpModifierValue] = con; } } break; case eDB2_MOD_VARIABLE_ARRAY3: { sDB2SimpleExpression exp; // Parse condition to tokens (field ID operator value) bool bRC = sDB2Fragment::ParseExpression( frag.mpModifierValue, exp.mID, exp.mOperator, exp.mValue, exp.mbF2F ); if (bRC == true) { mExpressionModMap[frag.mpModifierValue] = exp; } } break; } } return bOK; } /*=========================================================================== METHOD: CheckAndSetBasePath (Internal Method) DESCRIPTION: Check and set the passed in path to something that is useful PARAMETERS pBasePath [ I ] - Base path RETURN VALUE: std::string - The enum name (or error string if enum value is not found) ===========================================================================*/ std::string cCoreDatabase::CheckAndSetBasePath( LPCSTR pBasePath ) const { std::string basePath = "."; if (pBasePath != 0 && pBasePath[0] != 0) { struct stat fileInfo; if (stat( pBasePath, &fileInfo ) == 0) { if (S_ISDIR( fileInfo.st_mode ) == true) { // It's a directory basePath = pBasePath; } } } return basePath; } /*=========================================================================== METHOD: LoadStructureTables (Internal Method) DESCRIPTION: Load all tables related to structure (entity, struct, field, format spec) PARAMETERS pBasePath [ I ] - Base path to database files RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadStructureTables( LPCSTR pBasePath ) { bool bRC = true; std::string basePath = CheckAndSetBasePath( pBasePath ); basePath += "/"; std::string fn = basePath; fn += DB2_FILE_PROTOCOL_FIELD; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEntityFields, false, DB2_TABLE_PROTOCOL_FIELD, *mpLog ); fn = basePath; fn += DB2_FILE_PROTOCOL_STRUCT; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEntityStructs, false, DB2_TABLE_PROTOCOL_STRUCT, *mpLog ); fn = basePath; fn += DB2_FILE_PROTOCOL_ENTITY; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mProtocolEntities, false, DB2_TABLE_PROTOCOL_ENTITY, *mpLog ); // Validate protocol entities bRC &= ValidateStructures(); // Build internal protocol entity name map bRC &= AssembleEntityNameMap(); return bRC; } /*=========================================================================== METHOD: LoadStructureTables (Internal Method) DESCRIPTION: Load all tables related to structure (entity, struct, field) PARAMETERS RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadStructureTables() { bool bRC = true; // Calculate sizes int nFieldSize = (const char*)&_binary_QMI_Field_txt_end - (const char*)&_binary_QMI_Field_txt_start; int nStructSize = (const char*)&_binary_QMI_Struct_txt_end - (const char*)&_binary_QMI_Struct_txt_start; int nEntitySize = (const char*)&_binary_QMI_Entity_txt_end - (const char*)&_binary_QMI_Entity_txt_start; bRC &= LoadDB2Table( (const char*)&_binary_QMI_Field_txt_start, nFieldSize, mEntityFields, false, DB2_TABLE_PROTOCOL_FIELD, *mpLog ); bRC &= LoadDB2Table( (const char*)&_binary_QMI_Struct_txt_start, nStructSize, mEntityStructs, false, DB2_TABLE_PROTOCOL_STRUCT, *mpLog ); bRC &= LoadDB2Table( (const char*)&_binary_QMI_Entity_txt_start, nEntitySize, mProtocolEntities, false, DB2_TABLE_PROTOCOL_ENTITY, *mpLog ); // Validate protocol entities bRC &= ValidateStructures(); // Build internal protocol entity name map bRC &= AssembleEntityNameMap(); return bRC; } /*=========================================================================== METHOD: LoadEnumTables (Internal Method) DESCRIPTION: Load all enumeration tables PARAMETERS pBasePath [ I ] - Base path to database files RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadEnumTables( LPCSTR pBasePath ) { bool bRC = true; std::string basePath = CheckAndSetBasePath( pBasePath ); basePath += "/"; std::string fn = basePath; fn += DB2_FILE_ENUM_MAIN; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEnumNameMap, false, DB2_TABLE_ENUM_MAIN, *mpLog ); fn = basePath; fn += DB2_FILE_ENUM_ENTRY; bRC &= LoadDB2Table( (LPCSTR)fn.c_str(), mEnumEntryMap, false, DB2_TABLE_ENUM_ENTRY, *mpLog ); // Build the enum map bRC &= AssembleEnumMap(); return bRC; } /*=========================================================================== METHOD: LoadEnumTables (Internal Method) DESCRIPTION: Load all enumeration tables PARAMETERS RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::LoadEnumTables() { bool bRC = true; // Calculate sizes int nEnumSize = (const char*)&_binary_QMI_Enum_txt_end - (const char*)&_binary_QMI_Enum_txt_start; int nEnumEntrySize = (const char*)&_binary_QMI_EnumEntry_txt_end - (const char*)&_binary_QMI_EnumEntry_txt_start; bRC &= LoadDB2Table( (const char*)&_binary_QMI_Enum_txt_start, nEnumSize, mEnumNameMap, false, DB2_TABLE_ENUM_MAIN, *mpLog ); bRC &= LoadDB2Table( (const char*)&_binary_QMI_EnumEntry_txt_start, nEnumEntrySize, mEnumEntryMap, false, DB2_TABLE_ENUM_ENTRY, *mpLog ); // Build the enum map bRC &= AssembleEnumMap(); return bRC; } /*=========================================================================== METHOD: ValidateStructures (Internal Method) DESCRIPTION: Validate (and attempt repair of) structure related tables RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateStructures() { // Assume success bool bRC = true; tDB2EntityMap::iterator pEntity = mProtocolEntities.begin(); while (pEntity != mProtocolEntities.end()) { sDB2ProtocolEntity & entity = pEntity->second; // Structure ID given? if (entity.mStructID != -1) { // Yes, validate individual structure std::set fields; bool bValid = ValidateStructure( (ULONG)entity.mStructID, fields, 0 ); // Not valid? if (bValid == false) { // Invalid structure, reset to none std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid struct, ID " << entity.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); entity.mStructID = -1; // We found at least one bad structure bRC = false; } } pEntity++; } return bRC; } /*=========================================================================== METHOD: ValidateStructure (Internal Method) DESCRIPTION: Validate a single structure PARAMETERS: structID [ I ] - ID of structure being evaluated fields [I/O] - List of 'known' field IDs depth [I/O] - Recursion depth RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateStructure( ULONG structID, std::set & fields, ULONG depth ) { // Assume success bool bRC = true; // Reached our limit? if (depth++ >= MAX_NESTING_LEVEL) { // Invalid structure std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Max depth exceeded, possible loop, struct ID " << structID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } // Grab first fragment of structure std::pair id( structID, 0 ); tDB2FragmentMap::const_iterator pFrag = mEntityStructs.find( id ); // Did we find the first fragment? if (pFrag == mEntityStructs.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing initial fragment, struct ID " << structID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } // Iterate over each fragment in the structure while (pFrag != mEntityStructs.end() && pFrag->second.mStructID == structID) { // Grab fragment const sDB2Fragment & frag = pFrag->second; // Variable array or optional fragment? if ( (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY) || (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY2) ) { bRC = ValidateArraySpecifier( frag, fields ); } else if (frag.mModifierType == eDB2_MOD_OPTIONAL) { bRC = ValidateOptionalSpecifier( frag, fields ); } else if (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY3) { bRC = ValidateExpressionSpecifier( frag, fields ); } else if ( (frag.mModifierType == eDB2_MOD_VARIABLE_STRING1) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) ) { bRC = ValidateArraySpecifier( frag, fields ); if (bRC == true) { // The field being modified has to be a fixed length string ULONG fieldID = frag.mFragmentValue; tDB2FieldMap::const_iterator pIter = mEntityFields.find( fieldID ); if (pIter != mEntityFields.end()) { bool bString = false; const sDB2Field & ft = pIter->second; if (ft.mType == eDB2_FIELD_STD) { if ( (ft.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_A) || (ft.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U) || (ft.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) ) { if ( (ft.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) || (frag.mModifierType != eDB2_MOD_VARIABLE_STRING3) ) { // Not the invalid combination of character length and // varaible length characters bString = true; } } } if (bString == false) { // Not a string so why the string modifier? std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid string modifier, struct ID " << structID << ", ID " << fieldID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } } if (bRC == true) { // What type of fragment is this? switch (frag.mFragmentType) { case eDB2_FRAGMENT_FIELD: { ULONG fieldID = frag.mFragmentValue; bRC = ValidateField( structID, fieldID, fields ); } break; case eDB2_FRAGMENT_VARIABLE_PAD_BITS: case eDB2_FRAGMENT_VARIABLE_PAD_BYTES: { // Does this field exist in the entity? ULONG fieldID = frag.mFragmentValue; if (fields.find( fieldID ) == fields.end()) { // No std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid pad, struct ID " << structID << ", ID " << fieldID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } break; case eDB2_FRAGMENT_STRUCT: { // Grab structure ID and recurse ULONG structID = frag.mFragmentValue; bRC = ValidateStructure( structID, fields, depth ); } break; default: break; } } // Did an error occur? if (bRC == false) { break; } pFrag++; } return bRC; } /*=========================================================================== METHOD: ValidateField (Internal Method) DESCRIPTION: Validate a single field PARAMETERS: structID [ I ] - ID of referencing structure fieldID [ I ] - ID of field being evaluated fields [I/O] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateField( ULONG structID, ULONG fieldID, std::set & fields ) { // Assume success bool bRC = true; tDB2FieldMap::const_iterator pIter = mEntityFields.find( fieldID ); if (pIter == mEntityFields.end()) { // No std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid field, struct ID " << structID << ", ID " << fieldID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } else { // Mark field as part of this structure fields.insert( fieldID ); // Is this field an enumeration? const sDB2Field & theField = pIter->second; if ( (theField.mType == eDB2_FIELD_ENUM_UNSIGNED) || (theField.mType == eDB2_FIELD_ENUM_SIGNED) ) { // Yes, check that the enum exists if (mEnumNameMap.find( theField.mTypeVal ) == mEnumNameMap.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_FIELD << "] Invalid enumeration ID, field ID " << fieldID << ", enum ID " << theField.mTypeVal; mpLog->Log( tmp.str(), eDB2_STATUS_WARNING ); } } } return bRC; } /*=========================================================================== METHOD: ValidateArraySpecifier (Internal Method) DESCRIPTION: Validate an array specifier PARAMETERS: frag [ I ] - Fragment containing array specifier fields [ I ] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateArraySpecifier( const sDB2Fragment & frag, const std::set & fields ) { // Assume success bool bRC = true; // Even an array specifier to start with? if (frag.mpModifierValue == 0 || frag.mpModifierValue == EMPTY_STRING) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing array specifier, struct ID " << frag.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } else if ( (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING1) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) ) { ULONG id = strtoul( frag.mpModifierValue, 0, 0 ); if (fields.find( id ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid modifier specifier, struct ID " << frag.mStructID << ", ID " << id; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } else if (frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY2) { // Parse condition to tokens (start stop) int nSize = strlen( frag.mpModifierValue ) + 1; char * pCopy = new char[ nSize ]; if (pCopy == NULL) { return false; } memcpy( pCopy, frag.mpModifierValue, nSize ); std::vector indices; CSVStringToContainer( " ", pCopy, indices ); delete [] pCopy; if (indices.size() != 2) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid array specifier, struct ID " << frag.mStructID << ", " << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } else { ULONG sID = indices[0]; ULONG eID = indices[1]; if ( (fields.find( sID ) == fields.end()) || (fields.find( eID ) == fields.end()) ) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid array specifier, struct ID " << frag.mStructID << ", IDs " << sID << " " << eID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } else { ASSERT( 0 ); } return bRC; } /*=========================================================================== METHOD: ValidateOptionalSpecifier (Internal Method) DESCRIPTION: Validate a simple optional fragment specifier PARAMETERS: frag [ I ] - Fragment containing optional fragment specifier fields [ I ] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateOptionalSpecifier( const sDB2Fragment & frag, const std::set & fields ) { // Assume success bool bRC = true; ASSERT( frag.mModifierType == eDB2_MOD_OPTIONAL ); // Even an optional specifier to start with? if (frag.mpModifierValue == 0 || frag.mpModifierValue == EMPTY_STRING) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing optional specifier, struct ID " << frag.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } ULONG conID; eDB2Operator conOp; LONGLONG conVal; bool bF2F; // Parse condition LPCSTR pCon = frag.mpModifierValue; bRC = sDB2Fragment::ParseCondition( pCon, conID, conOp, conVal, bF2F ); if (bRC == true) { // Does the given field ID exist as part of this entity? if (fields.find( conID ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << conID << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } if (bF2F == true) { // Does the given field ID exist as part of this entity? if (fields.find( (ULONG)conVal ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << (ULONG)conVal << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } else { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", " << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); } return bRC; } /*=========================================================================== METHOD: ValidateExpressionSpecifier (Internal Method) DESCRIPTION: Validate a simple expression fragment specifier PARAMETERS: frag [ I ] - Fragment containing expression fragment specifier fields [ I ] - List of 'known' field IDs RETURN VALUE: bool ===========================================================================*/ bool cCoreDatabase::ValidateExpressionSpecifier( const sDB2Fragment & frag, const std::set & fields ) { // Assume success bool bRC = true; ASSERT( frag.mModifierType == eDB2_MOD_VARIABLE_ARRAY3 ); // Even an expression specifier to start with? if (frag.mpModifierValue == 0 || frag.mpModifierValue == EMPTY_STRING) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Missing array specifier, struct ID " << frag.mStructID; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } ULONG exprID; eDB2ExpOperator exprOp; LONGLONG exprVal; bool bF2F; // Parse expression LPCSTR pExpr = frag.mpModifierValue; bRC = sDB2Fragment::ParseExpression( pExpr, exprID, exprOp, exprVal, bF2F ); if (bRC == true) { // Does the given field ID exist as part of this entity? if (fields.find( exprID ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << exprID << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } if (bF2F == true) { // Does the given field ID exist as part of this entity? if (fields.find( (ULONG)exprVal ) == fields.end()) { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", unknown field ID " << (ULONG)exprID << "/" << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); bRC = false; } } } else { std::ostringstream tmp; tmp << "DB [" << DB2_TABLE_PROTOCOL_STRUCT << "] Invalid optional specifier, struct ID " << frag.mStructID << ", " << frag.mpModifierValue; mpLog->Log( tmp.str(), eDB2_STATUS_ERROR ); } return bRC; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/CoreDatabase.h000077500000000000000000001676701455567757300240010ustar00rootroot00000000000000/*=========================================================================== FILE: CoreDatabase.h DESCRIPTION: Declaration of cCoreDatabase class PUBLIC CLASSES AND METHODS: cCoreDatabase This class represents the run-time (read only) version of the core library database Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include #include #include #include "DB2TextFile.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cDB2NavTree; //--------------------------------------------------------------------------- // Prototypes //--------------------------------------------------------------------------- // Convert a string (in quotes) to a string (minus) quotes and copy into // an allocated buffer LPCSTR CopyQuotedString( LPSTR pString ); //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // An empty (but not NULL) string extern LPCSTR EMPTY_STRING; // Value seperator for database text extern LPCSTR DB2_VALUE_SEP; // Sub-value (i.e. within a particular value) seperator for database text extern LPCSTR DB2_SUBVAL_SEP; // Database table file names extern LPCSTR DB2_FILE_PROTOCOL_FIELD; extern LPCSTR DB2_FILE_PROTOCOL_STRUCT; extern LPCSTR DB2_FILE_PROTOCOL_ENTITY; extern LPCSTR DB2_FILE_ENUM_MAIN; extern LPCSTR DB2_FILE_ENUM_ENTRY; // Database start pointers extern const int _binary_QMI_Field_txt_start; extern const int _binary_QMI_Struct_txt_start; extern const int _binary_QMI_Entity_txt_start; extern const int _binary_QMI_Enum_txt_start; extern const int _binary_QMI_EnumEntry_txt_start; // Database end pointers extern const int _binary_QMI_Field_txt_end; extern const int _binary_QMI_Struct_txt_end; extern const int _binary_QMI_Entity_txt_end; extern const int _binary_QMI_Enum_txt_end; extern const int _binary_QMI_EnumEntry_txt_end; // Status levels for DB2 logging enum eDB2StatusLevel { eDB2_STATUS_BEGIN = -1, eDB2_STATUS_INFO, // Informational string eDB2_STATUS_WARNING, // Warning string eDB2_STATUS_ERROR, // Error string eDB2_STATUS_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2StatusLevel validity check PARAMETERS: lvl [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2StatusLevel lvl ) { bool retVal = false; if (lvl > eDB2_STATUS_BEGIN && lvl < eDB2_STATUS_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // Class cDB2StatusLog // // Class that defines status logging interface for DB2 initialization // and exit related information /*=========================================================================*/ class cDB2StatusLog { public: // Log an error string virtual void Log( LPCSTR pLog, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) = 0; // Log an error string virtual void Log( const std::string & log, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) = 0; }; /*=========================================================================*/ // Class cDB2TraceLog // Default error logging interface for DB2 initialization and exit // related information - sends output to TRACE /*=========================================================================*/ class cDB2TraceLog : public cDB2StatusLog { public: // (Inline) Constructor cDB2TraceLog() { }; // (Inline) Destructor ~cDB2TraceLog() { }; // (Inline) Log an error string virtual void Log( LPCSTR pLog, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) { if (pLog != 0 && pLog[0] != 0) { std::string formatString = "[0x%02X] "; formatString += pLog; formatString += '\n'; //Note: TRACE is just an alias for printf if DEBUG is used TRACE( formatString.c_str(), lvl ); } }; // (Inline) Log an error string virtual void Log( const std::string & log, eDB2StatusLevel lvl = eDB2_STATUS_ERROR ) { if (log.size() > 0) { Log( log.c_str(), lvl ); } }; }; // The default logger (for backwards compatibility) extern cDB2TraceLog gDB2DefaultLog; /*=========================================================================== METHOD: LoadDB2Table (Free Public Method) DESCRIPTION: Load a database table PARAMETERS: pFile [ I ] - The file to load the table from cont [I/0] - The current/resulting database table bDuplicatesOK [ I ] - Duplicate keys acceptable? pName [ I ] - Name (for error reporting) log [I/O] - Where to log errors RETURN VALUE: bool ===========================================================================*/ template bool LoadDB2Table( LPCSTR pFile, Container & cont, bool bDuplicatesOK = false, LPCSTR pName = 0, cDB2StatusLog & log = gDB2DefaultLog ) { // Assume success bool bRC = true; // Sanity check error reporting name if (pName == 0 || pName[0] == 0) { pName = "?"; } // Sanity check file name if (pFile == 0 || pFile[0] == 0) { // Bad file std::ostringstream tmp; tmp << "DB [" << pName << "] Invalid file name"; log.Log( tmp.str(), eDB2_STATUS_ERROR ); return false; } ULONG lineNum = 0; // Attempt to open the file cDB2TextFile inFile( pFile ); if (inFile.IsValid() == true) { std::string line; while (inFile.ReadLine( line ) == true) { std::string lineCopy = line; int nLineSize = lineCopy.size(); LPSTR pLine = new CHAR[ nLineSize + 1 ]; if (pLine == NULL) { return false; } memcpy( pLine, line.c_str(), nLineSize ); // Enforce null terminator pLine[ nLineSize ] = 0; typename Container::mapped_type theType; bool bOK = theType.FromString( pLine ); if (bOK == true) { // Grab key typename Container::key_type theKey = theType.GetKey(); // Key already exists? typename Container::iterator pIter; pIter = cont.find( theKey ); if (pIter != cont.end() && bDuplicatesOK == false) { // The key already exists which indicates a (recoverable) error std::ostringstream tmp; tmp << "DB [" << pName << "] Duplicate key, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); // Free the current object pIter->second.FreeAllocatedStrings(); // ... and then replace it pIter->second = theType; } else { typename Container::value_type entry( theKey, theType ); cont.insert( entry ); } } else if (lineCopy.size() > 0) { // Error parsing line std::ostringstream tmp; tmp << "DB [" << pName << "] Parsing error, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_ERROR ); theType.FreeAllocatedStrings(); bRC = false; } delete [] pLine; lineNum++; } } else { #ifdef DEBUG // Could not open the file std::ostringstream tmp; tmp << "DB [" << pName << "] Error opening file"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); #endif bRC = false; } return bRC; }; /*=========================================================================== METHOD: LoadDB2Table (Free Public Method) DESCRIPTION: Load a database table PARAMETERS: pStart [ I ] - Start location of database nSize [ I ] - Size of database cont [I/0] - The current/resulting database table bDuplicatesOK [ I ] - Duplicate keys acceptable? pName [ I ] - Name (for error reporting) log [I/O] - Where to log errors RETURN VALUE: bool ===========================================================================*/ template bool LoadDB2Table( const char * pStart, const int nSize, Container & cont, bool bDuplicatesOK = false, LPCSTR pName = 0, cDB2StatusLog & log = gDB2DefaultLog ) { // Assume success bool bRC = true; // Sanity check error reporting name if (pName == 0 || pName[0] == 0) { pName = "?"; } ULONG lineNum = 0; // Attempt to open the file cDB2TextFile inFile( pStart, nSize ); if (inFile.IsValid() == true) { std::string line; while (inFile.ReadLine( line ) == true) { std::string lineCopy = line; int nLineSize = lineCopy.size(); LPSTR pLine = new CHAR[ nLineSize + 1 ]; if (pLine == NULL) { return false; } memcpy( pLine, lineCopy.c_str(), nLineSize ); // Enforce null terminator pLine[ nLineSize ] = 0; typename Container::mapped_type theType; bool bOK = theType.FromString( pLine ); if (bOK == true) { // Grab key typename Container::key_type theKey = theType.GetKey(); // Key already exists? typename Container::iterator pIter; pIter = cont.find( theKey ); if (pIter != cont.end() && bDuplicatesOK == false) { // The key already exists which indicates a (recoverable) error std::ostringstream tmp; tmp << "DB [" << pName << "] Duplicate key, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); // Free the current object pIter->second.FreeAllocatedStrings(); // ... and then replace it pIter->second = theType; } else { typename Container::value_type entry( theKey, theType ); cont.insert( entry ); } } else if (lineCopy.size() > 0) { // Error parsing line std::ostringstream tmp; tmp << "DB [" << pName << "] Parsing error, line " << lineNum << " (" << line.c_str() << ")"; log.Log( tmp.str(), eDB2_STATUS_ERROR ); theType.FreeAllocatedStrings(); bRC = false; } delete [] pLine; lineNum++; } } else { #ifdef DEBUG // Could not open the file std::ostringstream tmp; tmp << "DB [" << pName << "] Error opening file"; log.Log( tmp.str(), eDB2_STATUS_WARNING ); #endif bRC = false; } return bRC; }; /*=========================================================================== METHOD: FreeDB2Table (Free Public Method) DESCRIPTION: Free up the string allocations in a database table, emptying the table in the process PARAMETERS: cont [ I ] - The database table RETURN VALUE: None ===========================================================================*/ template void FreeDB2Table( Container & cont ) { typename Container::iterator pIter = cont.begin(); while (pIter != cont.end()) { typename Container::mapped_type & theType = pIter->second; theType.FreeAllocatedStrings(); pIter++; } cont.clear(); }; /*=========================================================================*/ // eDB2EntityType Enumeration // // Database protocol entity header/payload type enumeration /*=========================================================================*/ enum eDB2EntityType { eDB2_ET_ENUM_BEGIN = -1, eDB2_ET_DIAG_REQ, // 0 Synchronous request eDB2_ET_DIAG_RSP, // 1 Synchronous response eDB2_ET_DIAG_SUBSYS_REQ, // 2 Synchronous subsystem dispatch request eDB2_ET_DIAG_SUBSYS_RSP, // 3 Synchronous subsystem dispatch response eDB2_ET_DIAG_EVENT, // 4 Asynchronous event eDB2_ET_DIAG_LOG, // 5 Asynchronous log eDB2_ET_DIAG_NV_ITEM, // 6 NVRAM item read/write eDB2_ET_RESERVED7, // 7 Reserved eDB2_ET_RESERVED8, // 8 Reserved eDB2_ET_DIAG_SUBSYS2_REQ, // 9 Sync subsystem V2 dispatch request eDB2_ET_DIAG_SUBSYS2_RSP, // 10 Sync subsystem V2 dispatch response eDB2_ET_DIAG_SUBSYS2_ASYNC, // 11 Async subsystem V2 dispatch response eDB2_ET_QMI_BEGIN = 29, // 29 Start of QMI section eDB2_ET_QMI_CTL_REQ, // 30 QMI CTL request eDB2_ET_QMI_CTL_RSP, // 31 QMI CTL response eDB2_ET_QMI_CTL_IND, // 32 QMI CTL indication eDB2_ET_QMI_WDS_REQ, // 33 QMI WDS request eDB2_ET_QMI_WDS_RSP, // 34 QMI WDS response eDB2_ET_QMI_WDS_IND, // 35 QMI WDS indication eDB2_ET_QMI_DMS_REQ, // 36 QMI DMS request eDB2_ET_QMI_DMS_RSP, // 37 QMI DMS response eDB2_ET_QMI_DMS_IND, // 38 QMI DMS indication eDB2_ET_QMI_NAS_REQ, // 39 QMI NAS request eDB2_ET_QMI_NAS_RSP, // 40 QMI NAS response eDB2_ET_QMI_NAS_IND, // 41 QMI NAS indication eDB2_ET_QMI_QOS_REQ, // 42 QMI QOS request eDB2_ET_QMI_QOS_RSP, // 43 QMI QOS response eDB2_ET_QMI_QOS_IND, // 44 QMI QOS indication eDB2_ET_QMI_WMS_REQ, // 45 QMI WMS request eDB2_ET_QMI_WMS_RSP, // 46 QMI WMS response eDB2_ET_QMI_WMS_IND, // 47 QMI WMS indication eDB2_ET_QMI_PDS_REQ, // 48 QMI PDS request eDB2_ET_QMI_PDS_RSP, // 49 QMI PDS response eDB2_ET_QMI_PDS_IND, // 50 QMI PDS indication eDB2_ET_QMI_AUTH_REQ, // 51 QMI AUTH request eDB2_ET_QMI_AUTH_RSP, // 52 QMI AUTH response eDB2_ET_QMI_AUTH_IND, // 53 QMI AUTH indication eDB2_ET_QMI_CAT_REQ, // 54 QMI CAT request eDB2_ET_QMI_CAT_RSP, // 55 QMI CAT response eDB2_ET_QMI_CAT_IND, // 56 QMI CAT indication eDB2_ET_QMI_RMS_REQ, // 57 QMI RMS request eDB2_ET_QMI_RMS_RSP, // 58 QMI RMS response eDB2_ET_QMI_RMS_IND, // 59 QMI RMS indication eDB2_ET_QMI_OMA_REQ, // 60 QMI OMA request eDB2_ET_QMI_OMA_RSP, // 61 QMI OMA response eDB2_ET_QMI_OMA_IND, // 62 QMI OMA indication eDB2_ET_QMI_VOICE_REQ, // 63 QMI voice request eDB2_ET_QMI_VOICE_RSP, // 64 QMI voice response eDB2_ET_QMI_VOICE_IND, // 65 QMI voice indication eDB2_ET_QMI_END, // 63 End of QMI section eDB2_ET_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2EntityType validity check PARAMETERS: et [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2EntityType et ) { bool retVal = false; if ( (et > eDB2_ET_ENUM_BEGIN && et <= eDB2_ET_DIAG_SUBSYS2_ASYNC) || (et > eDB2_ET_QMI_BEGIN && et < eDB2_ET_QMI_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_REQ || entityType == eDB2_ET_DIAG_RSP || entityType == eDB2_ET_DIAG_SUBSYS_REQ || entityType == eDB2_ET_DIAG_SUBSYS_RSP || entityType == eDB2_ET_DIAG_EVENT || entityType == eDB2_ET_DIAG_LOG || entityType == eDB2_ET_DIAG_NV_ITEM || entityType == eDB2_ET_DIAG_SUBSYS2_REQ || entityType == eDB2_ET_DIAG_SUBSYS2_RSP || entityType == eDB2_ET_DIAG_SUBSYS2_ASYNC) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityRequestType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol and if so does it represent a request? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityRequestType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_REQ || entityType == eDB2_ET_DIAG_SUBSYS_REQ || entityType == eDB2_ET_DIAG_SUBSYS2_REQ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityResponseType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol and if so does it represent a response? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityResponseType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_RSP || entityType == eDB2_ET_DIAG_SUBSYS_RSP || entityType == eDB2_ET_DIAG_SUBSYS2_RSP) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsDiagEntityAsyncType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the DIAG protocol and if so does it represent asynchronous incoming data? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsDiagEntityAsyncType( eDB2EntityType entityType ) { bool retVal = false; if (entityType == eDB2_ET_DIAG_EVENT || entityType == eDB2_ET_DIAG_LOG || entityType == eDB2_ET_DIAG_SUBSYS2_ASYNC) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol? PARAMETERS: et [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityType( eDB2EntityType et ) { bool retVal = false; if (et > eDB2_ET_QMI_BEGIN && et < eDB2_ET_QMI_END) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityRequestType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol and if so does it represent a request? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityRequestType( eDB2EntityType entityType ) { bool retVal = false; // One QMI service is always a triplet of REQ/RSP/IND DWORD baseVal = (DWORD)eDB2_ET_QMI_BEGIN + 1; if ((DWORD)entityType % baseVal == 0) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityResponseType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol and if so does it represent a response? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityResponseType( eDB2EntityType entityType ) { bool retVal = false; // One QMI service is always a triplet of REQ/RSP/IND DWORD baseVal = (DWORD)eDB2_ET_QMI_BEGIN + 1; if ((DWORD)entityType % baseVal == 1) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIEntityIndicationType (Inline Method) DESCRIPTION: Does the eDB2EntityType value represent the QMI protocol and if so does it represent an indication? PARAMETERS: entityType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIEntityIndicationType( eDB2EntityType entityType ) { bool retVal = false; // One QMI service is always a triplet of REQ/RSP/IND DWORD baseVal = (DWORD)eDB2_ET_QMI_BEGIN + 1; if ((DWORD)entityType % baseVal == 2) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2FragmentType Enumeration // // Database fragment type enumeration - determines in what table // (or manner) the fragment is described /*=========================================================================*/ enum eDB2FragmentType { eDB2_FRAGMENT_TYPE_ENUM_BEGIN = -1, eDB2_FRAGMENT_FIELD, // 0 Simple field fragment eDB2_FRAGMENT_STRUCT, // 1 Structure fragment eDB2_FRAGMENT_CONSTANT_PAD, // 2 Pad fragment, fixed length (bits) eDB2_FRAGMENT_VARIABLE_PAD_BITS, // 3 Pad fragment, variable (bits) eDB2_FRAGMENT_VARIABLE_PAD_BYTES, // 4 Pad fragment, variable (bytes) eDB2_FRAGMENT_FULL_BYTE_PAD, // 5 Pad fragment, pad to a full byte eDB2_FRAGMENT_MSB_2_LSB, // 6 Switch to MSB -> LSB order eDB2_FRAGMENT_LSB_2_MSB, // 7 Switch to LSB -> MSB order eDB2_FRAGMENT_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2FragmentType validity check PARAMETERS: fragType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2FragmentType fragType ) { bool retVal = false; if (fragType > eDB2_FRAGMENT_TYPE_ENUM_BEGIN && fragType < eDB2_FRAGMENT_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2ModifierType Enumeration // // Database fragment modifier type enumeration - determines how a // fragment is modified/used /*=========================================================================*/ enum eDB2ModifierType { eDB2_MOD_TYPE_ENUM_BEGIN = -1, eDB2_MOD_NONE, // 0 Modifier is not used eDB2_MOD_CONSTANT_ARRAY, // 1 Constant (elements) array eDB2_MOD_VARIABLE_ARRAY, // 2 Variable (elements) array eDB2_MOD_OBSOLETE_3, // 3 Constant (bits) array [OBS] eDB2_MOD_OBSOLETE_4, // 4 Variable (bits) array [OBS] eDB2_MOD_OPTIONAL, // 5 Fragment is optional eDB2_MOD_VARIABLE_ARRAY2, // 6 Variable (elements) array, start/stop given eDB2_MOD_VARIABLE_ARRAY3, // 7 Variable (elements) array, simple expression eDB2_MOD_VARIABLE_STRING1, // 8 Variable length string (bit length) eDB2_MOD_VARIABLE_STRING2, // 9 Variable length string (byte length) eDB2_MOD_VARIABLE_STRING3, // 10 Variable length string (character length) eDB2_MOD_TYPE_ENUM_END }; /*=========================================================================== METHOD: ModifiedToArray (Inline Method) DESCRIPTION: Does this modifier indicate an array? PARAMETERS: modType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool ModifiedToArray( eDB2ModifierType modType ) { bool bRC = false; if ( (modType == eDB2_MOD_CONSTANT_ARRAY) || (modType == eDB2_MOD_VARIABLE_ARRAY) || (modType == eDB2_MOD_VARIABLE_ARRAY2) || (modType == eDB2_MOD_VARIABLE_ARRAY3) ) { bRC = true; } return bRC; }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2ModifierType validity check PARAMETERS: modType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2ModifierType modType ) { bool retVal = false; if (modType > eDB2_MOD_TYPE_ENUM_BEGIN && modType < eDB2_MOD_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2FieldType Enumeration // // Database field type enumeration - determines whether the field in // question is a standard type or an enumeration /*=========================================================================*/ enum eDB2FieldType { eDB2_FIELD_TYPE_ENUM_BEGIN = -1, eDB2_FIELD_STD, // 0 Field is a standard type (see below) eDB2_FIELD_ENUM_UNSIGNED, // 1 Field is an unsigned enumerated type eDB2_FIELD_ENUM_SIGNED, // 2 Field is a signed enumerated type eDB2_FIELD_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2FieldType validity check PARAMETERS: fieldType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2FieldType fieldType ) { bool retVal = false; if (fieldType > eDB2_FIELD_TYPE_ENUM_BEGIN && fieldType < eDB2_FIELD_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2StdFieldType Enumeration // // Database standard field type enumeration /*=========================================================================*/ enum eDB2StdFieldType { eDB2_FIELD_STDTYPE_ENUM_BEGIN = -1, eDB2_FIELD_STDTYPE_BOOL, // 0 Field is a boolean (0/1, false/true) eDB2_FIELD_STDTYPE_INT8, // 1 Field is 8-bit signed integer eDB2_FIELD_STDTYPE_UINT8, // 2 Field is 8-bit unsigned integer eDB2_FIELD_STDTYPE_INT16, // 3 Field is 16-bit signed integer eDB2_FIELD_STDTYPE_UINT16, // 4 Field is 16-bit unsigned integer eDB2_FIELD_STDTYPE_INT32, // 5 Field is 32-bit signed integer eDB2_FIELD_STDTYPE_UINT32, // 6 Field is 32-bit unsigned integer eDB2_FIELD_STDTYPE_INT64, // 7 Field is 64-bit signed integer eDB2_FIELD_STDTYPE_UINT64, // 8 Field is 64-bit unsigned integer eDB2_FIELD_STDTYPE_STRING_A, // 9 ANSI fixed length string eDB2_FIELD_STDTYPE_STRING_U, // 10 UNICODE fixed length string eDB2_FIELD_STDTYPE_STRING_ANT, // 11 ANSI NULL terminated string eDB2_FIELD_STDTYPE_STRING_UNT, // 12 UNICODE NULL terminated string eDB2_FIELD_STDTYPE_FLOAT32, // 13 Field is 32-bit floating point value eDB2_FIELD_STDTYPE_FLOAT64, // 14 Field is 64-bit floating point value eDB2_FIELD_STDTYPE_STRING_U8, // 15 UTF-8 encoded fixed length string eDB2_FIELD_STDTYPE_STRING_U8NT, // 16 UTF-8 encoded NULL terminated string eDB2_FIELD_STDTYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2StdFieldType validity check PARAMETERS: fieldType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2StdFieldType fieldType ) { bool retVal = false; if (fieldType > eDB2_FIELD_STDTYPE_ENUM_BEGIN && fieldType < eDB2_FIELD_STDTYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2Operator Enumeration // // Database conditional fragment operator type enumeration /*=========================================================================*/ enum eDB2Operator { eDB2_OP_TYPE_ENUM_BEGIN = -1, eDB2_OP_LT, eDB2_OP_LTE, eDB2_OP_EQ, eDB2_OP_NEQ, eDB2_OP_GTE, eDB2_OP_GT, eDB2_OP_DIV, eDB2_OP_NDIV, eDB2_OP_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2Operator validity check PARAMETERS: op [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2Operator op ) { bool retVal = false; if (op > eDB2_OP_TYPE_ENUM_BEGIN && op < eDB2_OP_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eDB2ExpOperator Enumeration // // Database simple expression operator type enumeration /*=========================================================================*/ enum eDB2ExpOperator { eDB2_EXPOP_TYPE_ENUM_BEGIN = -1, eDB2_EXPOP_ADD, eDB2_EXPOP_SUB, eDB2_EXPOP_MUL, eDB2_EXPOP_DIV, eDB2_EXPOP_REM, eDB2_EXPOP_MIN, eDB2_EXPOP_MAX, eDB2_EXPOP_TYPE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eDB2ExpOperator validity check PARAMETERS: op [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eDB2ExpOperator op ) { bool retVal = false; if (op > eDB2_EXPOP_TYPE_ENUM_BEGIN && op < eDB2_EXPOP_TYPE_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // Struct sDB2ProtocolEntity // // Structure that defines the schema for the protocol entity table /*=========================================================================*/ struct sDB2ProtocolEntity { public: // (Inline) Default constructor sDB2ProtocolEntity() : mType( eDB2_ET_ENUM_BEGIN ), mStructID( -1 ), mFormatID( -1 ), mbInternal( false ), mFormatExID( -1 ), mpName( EMPTY_STRING ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key std::vector GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Type of protocol entity 'header/payload' */ eDB2EntityType mType; /* Multi-value ID (includes above type) */ std::vector mID; /* Associated structure ID (-1 = no structure) */ int mStructID; /* Associated format specifier (-1 = none) */ int mFormatID; /* Is this protocol entity internal only? */ bool mbInternal; /* Associated extended format specifier (-1 = none) */ int mFormatExID; /* Name of protocol entity */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2Fragment // // Structure that defines the schema for the protocol structure table /*=========================================================================*/ struct sDB2Fragment { public: // (Inline) Default constructor sDB2Fragment() : mStructID( 0 ), mFragmentOrder( 0 ), mFragmentOffset( 0 ), mFragmentType( eDB2_FRAGMENT_TYPE_ENUM_BEGIN ), mFragmentValue( 0 ), mModifierType( eDB2_MOD_TYPE_ENUM_BEGIN ), mpModifierValue( EMPTY_STRING ), mpName( EMPTY_STRING ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } if (mpModifierValue != 0 && mpModifierValue != EMPTY_STRING) { delete [] mpModifierValue; mpModifierValue = 0; } }; // (Inline) Return object key std::pair GetKey() const { std::pair key( mStructID, mFragmentOrder ); return key; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; // Build a simple condition string static std::string BuildCondition( ULONG id, eDB2Operator op, LONGLONG val, bool bF2F ); // Evaluate a simple condition static bool EvaluateCondition( LONGLONG valA, eDB2Operator op, LONGLONG valB ); // Parse a simple condition static bool ParseCondition( LPCSTR pCondition, ULONG & id, eDB2Operator & op, LONGLONG & val, bool & bF2F ); // Build a simple expression string static std::string BuildExpression( ULONG id, eDB2ExpOperator op, LONGLONG val, bool bF2F ); // Evaluate a simple expression static bool EvaluateExpression( LONGLONG valA, eDB2ExpOperator op, LONGLONG valB, LONGLONG & res ); // Parse a simple expression static bool ParseExpression( LPCSTR pExpr, ULONG & id, eDB2ExpOperator & op, LONGLONG & val, bool & bF2F ); /* Enclosing structure ID */ ULONG mStructID; /* Order of fragment within structure */ ULONG mFragmentOrder; /* Offset (in bits) of fragment from beginning of enclosing structure */ int mFragmentOffset; /* Fragment type, how to interpret the following fragment value */ eDB2FragmentType mFragmentType; /* Fragment Value */ ULONG mFragmentValue; /* Modifier type, how to interpret the following modifier value */ eDB2ModifierType mModifierType; /* Modifier value */ LPCSTR mpModifierValue; /* Fragment Name */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2Field // // Structure that defines the schema for the protocol field table /*=========================================================================*/ struct sDB2Field { public: // (Inline) Default constructor sDB2Field() : mID( 0 ), mSize( 0 ), mType( eDB2_FIELD_TYPE_ENUM_BEGIN ), mTypeVal( 0 ), mbHex( false ), mbInternal( false ), mDescriptionID( -1 ), mpName( EMPTY_STRING ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if ( (mpName != 0) && (mpName != EMPTY_STRING) ) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Field ID */ ULONG mID; /* Size of field (in bits, maximum is 64 bits for integral types) */ ULONG mSize; /* Field type */ eDB2FieldType mType; /* Actual field type (eDB2StdFieldType or enum ID) */ ULONG mTypeVal; /* Display integral fields as hexadecimal? */ bool mbHex; /* Is this field internal only? */ bool mbInternal; /* Description of field */ int mDescriptionID; /* Field name */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2Category // // Structure that defines the generic category table schema, gives // category ID, category name, category description, and parent // category relationship (specified as a category ID into the very // same table) /*=========================================================================*/ struct sDB2Category { public: // (Inline) Default constructor sDB2Category() : mID( 0 ), mParentID( -1 ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Category ID */ ULONG mID; /* Category ID of parent, -1 implies no parent/category is at root */ int mParentID; /* Category display name */ LPCSTR mpName; /* Description of category */ int mDescriptionID; }; /*=========================================================================== METHOD: ValidateDB2Categories (Public Method) DESCRIPTION: Validate the relationship between a pair of DB category/reference tables NOTE: Discovered problems will be repaired, i.e. bogus/problematic category IDs are reset to -1 PARAMETERS: catMap [ I ] - The category table refMap [ I ] - The reference table pName [ I ] - Table name (for error reporting) log [ I ] - Error log RETURN VALUE: bool ===========================================================================*/ template bool ValidateDB2Categories( std::map & catMap, std::map & refMap, LPCSTR pName, cDB2StatusLog & log = gDB2DefaultLog ) { // Assume success bool bRC = true; std::string err; // Sanity check table name if (pName == 0 || pName[0] == 0) { pName = "?"; } // First validate/repair category map; stage 1: bad parent IDs std::map ::iterator pCats = catMap.begin(); while (pCats != catMap.end()) { sDB2Category & cat = pCats->second; pCats++; if (cat.IsValid() == false) { continue; } // The parent ID must be -1 or exist in the category map if (cat.mParentID != -1) { if (catMap.find( cat.mParentID ) == catMap.end()) { // Unable to locate parent category std::ostringstream tmp; tmp << "DB [" << pName << "] Missing ID, parent ID " << cat.mParentID; log.Log( tmp.str(), eDB2_STATUS_ERROR ); cat.mParentID = -1; bRC = false; } } } // Validate/repair category map; stage 2: loop detection pCats = catMap.begin(); while (pCats != catMap.end()) { std::set catsVisited; sDB2Category & cat = pCats->second; // Itererate up through parents int parentID = cat.mParentID; while (parentID != -1) { // Have we already been here? if (catsVisited.find( parentID ) == catsVisited.end()) { // Nope, add ID and go on to the next one catsVisited.insert( parentID ); std::map ::iterator pParent; pParent = catMap.find( parentID ); parentID = pParent->second.mParentID; } else { // Yes, we are caught in a loop std::ostringstream tmp; tmp << "DB [" << pName << "] Loop in category, parent ID " << cat.mParentID; log.Log( tmp.str(), eDB2_STATUS_ERROR ); cat.mParentID = -1; bRC = false; break; } } pCats++; } // Validate that each reference references valid category IDs typename std::map ::iterator pTypes = refMap.begin(); while (pTypes != refMap.end()) { NamedType & theType = pTypes->second; std::set cats = theType.mCategoryIDs; std::set ::iterator pRefCats = cats.begin(); while (pRefCats != cats.end()) { if (*pRefCats != -1) { pCats = catMap.find( *pRefCats ); if (pCats == catMap.end()) { // Unable to locate category std::ostringstream tmp; tmp << "DB [" << pName << "] Missing ID, category ID " << *pRefCats << ", reference " << theType.mpName; log.Log( tmp.str(), eDB2_STATUS_ERROR ); *pRefCats = -1; bRC = false; } } pRefCats++; } pTypes++; } return bRC; }; /*=========================================================================*/ // Struct sDB2NVItem // // NVRAM item structure for database schema /*=========================================================================*/ struct sDB2NVItem { public: // (Inline) Default constructor sDB2NVItem() : mItem( 0 ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mItem; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Category IDs (indices into NV items category table) */ std::set mCategoryIDs; /* Item number */ ULONG mItem; /* NV item display name */ LPCSTR mpName; /* Description of NV item */ int mDescriptionID; }; /*=========================================================================*/ // Struct sDB2Enum // // Structure that defines the schema for the enum table /*=========================================================================*/ struct sDB2Enum { public: // (Inline) Default constructor sDB2Enum() : mID( 0 ), mbInternal( false ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key ULONG GetKey() const { return mID; }; // Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Enum ID */ ULONG mID; /* Is this enum used internally? */ bool mbInternal; /* Description of enum */ int mDescriptionID; /* Name of enum */ LPCSTR mpName; }; /*=========================================================================*/ // Struct sDB2EnumEntry // // Structure that defines the schema for the enum entry table /*=========================================================================*/ struct sDB2EnumEntry { public: // (Inline) Default constructor sDB2EnumEntry() : mID( 0 ), mValue( -1 ), mbHex( false ), mpName( EMPTY_STRING ), mDescriptionID( -1 ) { }; // (Inline) Free up our allocated strings void FreeAllocatedStrings() { if (mpName != 0 && mpName != EMPTY_STRING) { delete [] mpName; mpName = 0; } }; // (Inline) Return object key std::pair GetKey() const { std::pair key( mID, mValue ); return key; }; // (Inline) Populate this object from a string bool FromString( LPSTR pStr ); // Is this object valid? bool IsValid() const; /* Enum ID */ ULONG mID; /* Enum entry value */ int mValue; /* Hexadecimal flag */ bool mbHex; /* Enum value name */ LPCSTR mpName; /* Description of enum value */ int mDescriptionID; }; /*=========================================================================*/ // Struct sDB2SimpleCondition // // Structure that defines a (parsed) simple condition modifier /*=========================================================================*/ struct sDB2SimpleCondition { public: // (Inline) Default constructor sDB2SimpleCondition() : mID( 0 ), mOperator( eDB2_OP_TYPE_ENUM_BEGIN ), mValue( 0 ), mbF2F( false ) { }; // (Inline) Is this object valid? bool IsValid() const { return ::IsValid( mOperator ); }; /* ID of field whose value is to be used */ ULONG mID; /* Operator to be used */ eDB2Operator mOperator; /* Value (or field ID) to compare against */ LONGLONG mValue; /* Field to field expression? */ bool mbF2F; }; /*=========================================================================*/ // Struct sDB2SimpleExpression // // Structure that defines a (parsed) simple expression /*=========================================================================*/ struct sDB2SimpleExpression { public: // (Inline) Default constructor sDB2SimpleExpression() : mID( 0 ), mOperator( eDB2_EXPOP_TYPE_ENUM_BEGIN ), mValue( 0 ), mbF2F( false ) { }; // (Inline) Is this object valid? bool IsValid() const { return (::IsValid( mOperator ) && mValue != 0); }; /* ID of field whose value is to be used */ ULONG mID; /* Operator to be used */ eDB2ExpOperator mOperator; /* Value (or field ID) to compare against */ LONGLONG mValue; /* Field to field expression? */ bool mbF2F; }; /*=========================================================================*/ // Struct sLPCSTRCmp // // Structure that defines the '<' operator for string comparison /*=========================================================================*/ struct sLPCSTRCmp { public: // (Inline) Is A < B? bool operator () ( LPCSTR pStrA, LPCSTR pStrB ) const { bool bLess = false; if (pStrA != 0 && pStrB != 0) { bLess = (strcmp( pStrA, pStrB ) < 0); } return bLess; }; }; /*=========================================================================*/ // Case insensitive compare function /*=========================================================================*/ inline bool InsensitiveCompare( CHAR first, CHAR second ) { return tolower( first ) < tolower( second ); } /*=========================================================================*/ // Struct sLPCSTRCmpI // // Structure that defines the '<' operator for string comparison // (case insensitive version) /*=========================================================================*/ struct sLPCSTRCmpI { public: // (Inline) Is A < B? bool operator () ( LPCSTR pStrA, LPCSTR pStrB ) const { bool bLess = false; if (pStrA != 0 && pStrB != 0) { // Is there a simpler stl function for this? bLess = std::lexicographical_compare( pStrA, pStrA + strlen( pStrA ), pStrB, pStrB + strlen( pStrB ), InsensitiveCompare ); } return bLess; }; }; //--------------------------------------------------------------------------- // Typedefs //--------------------------------------------------------------------------- // The protocol entity table expressed as a type typedef std::multimap , sDB2ProtocolEntity> tDB2EntityMap; // Protocol entity entity name to ID (reverse) table typedef std::map , sLPCSTRCmpI> tDB2EntityNameMap; // The struct table expressed as a type typedef std::map , sDB2Fragment> tDB2FragmentMap; // The field table expressed as a type typedef std::map tDB2FieldMap; // A generic category table expressed as a type typedef std::map tDB2CategoryMap; // NV item table expressed as a map type typedef std::map tDB2NVMap; // Enum table expressed as a map type typedef std::map tDB2EnumNameMap; // Enum entry table expressed as a map type typedef std::map , sDB2EnumEntry> tDB2EnumEntryMap; // The built enumeration map typedef std::pair < ULONG, std::map > tDB2EnumMapPair; typedef std::map tDB2EnumMap; // Parsed fragment modifier map - optional fragment typedef std::map tDB2OptionalModMap; // Parsed fragment modifier map - simple expression based sizes typedef std::map tDB2ExpressionModMap; // Parsed fragment modifier map - element count specified arrays typedef std::map tDB2Array1ModMap; // Parsed fragment modifier map - start/stop index specified arrays typedef std::map > tDB2Array2ModMap; // A protocol entity navigation map expressed as a type typedef std::map , cDB2NavTree *> tDB2EntityNavMap; /*=========================================================================*/ // Class cCoreDatabase /*=========================================================================*/ class cCoreDatabase { public: // Constructor cCoreDatabase(); // Destructor virtual ~cCoreDatabase(); // Initialize the database - must be done once (and only once) prior // to any database object access virtual bool Initialize( LPCSTR pBasePath ); virtual bool Initialize(); // Exit (cleanup) the database virtual void Exit(); // Get the entity navigation tree for the given protocol entity, if // none exists one will be built and returned const cDB2NavTree * GetEntityNavTree( const std::vector & key ) const; // Find the protocol entity with the specified key bool FindEntity( const std::vector & key, sDB2ProtocolEntity & entity ) const; // Find the protocol entity with the specified name bool FindEntity( LPCSTR pEntityName, sDB2ProtocolEntity & entity ) const; // Map a protocol entity name to an ID bool MapEntityNameToID( LPCSTR pName, std::vector & key ) const; // Map the given enum value (specified by enum ID, and enum value) // to the enum value name string std::string MapEnumToString( ULONG enumID, int enumVal, bool bSimpleErrFmt = false, bool bHex = false ) const; // Map the given enum value (specified by enum name, and enum value) // to the enum value name string std::string MapEnumToString( LPCSTR pEnumName, int enumVal, bool bSimpleErrFmt = false, bool bHex = false ) const; // (Inline) Set status log (object must exist for the duration of // the DB or at least until being reset) void SetLog( cDB2StatusLog * pLog ) { if (pLog != 0) { mpLog = pLog; } }; // (Inline) Return protocol entities const tDB2EntityMap & GetProtocolEntities() const { return mProtocolEntities; }; // (Inline) Return protocol entity names const tDB2EntityNameMap & GetProtocolEntityNames() const { return mEntityNames; }; // (Inline) Return protocol structures const tDB2FragmentMap & GetProtocolStructs() const { return mEntityStructs; }; // (Inline) Return protocol fields const tDB2FieldMap & GetProtocolFields() const { return mEntityFields; }; // (Inline) Return assembled enumeration map const tDB2EnumMap & GetEnums() const { return mEnumMap; }; // (Inline) Return raw enumeration map const tDB2EnumNameMap & GetRawEnums() const { return mEnumNameMap; }; // (Inline) Return raw enumeration entry map const tDB2EnumEntryMap & GetRawEnumEntries() const { return mEnumEntryMap; }; // (Inline) Return parsed fragment modifier map - optional const tDB2OptionalModMap & GetOptionalMods() const { return mOptionalModMap; }; // (Inline) Return parsed fragment modifier map - expressions const tDB2ExpressionModMap & GetExpressionMods() const { return mExpressionModMap; }; // (Inline) Return parsed fragment modifier map - element // count specified arrays const tDB2Array1ModMap & GetArray1Mods() const { return mArray1ModMap; }; // (Inline) Return parsed fragment modifier map - start/stop // index specified arrays const tDB2Array2ModMap & GetArray2Mods() const { return mArray2ModMap; }; protected: // Assemble the internal enum map bool AssembleEnumMap(); // Assemble the internal protocol entity name map bool AssembleEntityNameMap(); // Build the modifier tables bool BuildModifierTables(); // Check and set the passed in path to something that is useful std::string CheckAndSetBasePath( LPCSTR pBasePath ) const; // Load all tables related to structure (entity, struct, field) bool LoadStructureTables( LPCSTR pBasePath ); bool LoadStructureTables(); // Load all enumeration related tables bool LoadEnumTables( LPCSTR pBasePath ); bool LoadEnumTables(); // Validate (and attempt repair of) structure related tables bool ValidateStructures(); // Validate a single structure bool ValidateStructure( ULONG structID, std::set & fields, ULONG depth ); // Validate a single field bool ValidateField( ULONG structID, ULONG fieldID, std::set & fields ); // Validate an array specifier bool ValidateArraySpecifier( const sDB2Fragment & frag, const std::set & fields ); // Validate a simple optional fragment specifier bool ValidateOptionalSpecifier( const sDB2Fragment & frag, const std::set & fields ); // Validate a simple expression fragment specifier bool ValidateExpressionSpecifier( const sDB2Fragment & frag, const std::set & fields ); /* Status log */ cDB2StatusLog * mpLog; /* Protocol entity table, referenced by multi-value key */ tDB2EntityMap mProtocolEntities; /* Protocol entity keys, referenced by indexed by entity name */ tDB2EntityNameMap mEntityNames; /* The on-demand Protocol entity navigation map */ mutable tDB2EntityNavMap mEntityNavMap; /* Protocol entity struct table, indexed by struct ID & fragment order */ tDB2FragmentMap mEntityStructs; /* Protocol entity field table, indexed by field ID */ tDB2FieldMap mEntityFields; /* Enum map, indexed by enum ID */ tDB2EnumNameMap mEnumNameMap; /* Enum entry map, indexed by enum ID/value pair */ tDB2EnumEntryMap mEnumEntryMap; /* The assembled enum map */ tDB2EnumMap mEnumMap; /* Parsed fragment modifier map - optional fragments */ tDB2OptionalModMap mOptionalModMap; /* Parsed fragment modifier map - expression fragments */ tDB2ExpressionModMap mExpressionModMap; /* Parsed fragment modifier map - element count specified arrays */ tDB2Array1ModMap mArray1ModMap; /* Parsed fragment modifier map - start/stop index specified arrays */ tDB2Array2ModMap mArray2ModMap; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/CoreUtilities.cpp000077500000000000000000001166321455567757300245730ustar00rootroot00000000000000/*=========================================================================== FILE: CoreUtilities.cpp DESCRIPTION: Collection of various utility methods PUBLIC CLASSES AND METHODS: StringToLONG StringToULONG StringToLONGLONG StringToULONGLONG ParseTokens() ParseCommandLine() ParseFormatSpecifier() FromString( CHAR ) FromString( UCHAR ) FromString( SHORT ) FromString( USHORT ) FromString( int ) FromString( UINT ) FromString( LONG ) FromString( ULONG ) FromString( LONGLONG ) FromString( ULONGLONG ) ToString( CHAR ) ToString( UCHAR ) ToString( SHORT ) ToString( USHORT ) ToString( int ) ToString( UINT ) ToString( LONG ) ToString( ULONG ) ToString( LONGLONG ) ToString( ULONGLONG ) ContainerToCSVString() CSVStringToContainer() CSVStringToValidatedContainer() SetDiff() SetIntersection() SetUnion() GetProgramPath() EnumerateFolders() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "CoreUtilities.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Format specifier states enum eFormatState { eFMT_STATE_NORMAL, // [0] Normal state; outputting literal characters eFMT_STATE_PERCENT, // [1] Just read '%' eFMT_STATE_FLAG, // [2] Just read flag character eFMT_STATE_WIDTH, // [3] Just read width specifier eFMT_STATE_DOT, // [4] Just read '.' eFMT_STATE_PRECIS, // [5] Just read precision specifier eFMT_STATE_SIZE, // [6] Just read size specifier eFMT_STATE_TYPE, // [7] Just read type specifier eFMT_STATE_INVALID, // [8] Invalid format eFMT_STATES // [9] Number of format states }; // Format specifier character classes enum eFormatCharClass { eFMT_CH_CLASS_OTHER, // [0] Character with no special meaning eFMT_CH_CLASS_PERCENT, // [1] '%' eFMT_CH_CLASS_DOT, // [2] '.' eFMT_CH_CLASS_STAR, // [3] '*' eFMT_CH_CLASS_ZERO, // [4] '0' eFMT_CH_CLASS_DIGIT, // [5] '1'..'9' eFMT_CH_CLASS_FLAG, // [6] ' ', '+', '-', '#' eFMT_CH_CLASS_SIZE, // [7] 'h', 'l', 'L', 'N', 'F', 'w' eFMT_CH_CLASS_TYPE // [8] Type specifying character }; // Lookup table for determining class of a character (lower nibble) // and next format specifier state (upper nibble) const UCHAR gLookupTable[] = { 0x06, // ' ', FLAG 0x80, // '!', OTHER 0x80, // '"', OTHER 0x86, // '#', FLAG 0x80, // '$', OTHER 0x81, // '%', PERCENT 0x80, // '&', OTHER 0x00, // ''', OTHER 0x00, // '(', OTHER 0x10, // ')', OTHER 0x03, // '*', STAR 0x86, // '+', FLAG 0x80, // ',', OTHER 0x86, // '-', FLAG 0x82, // '.', DOT 0x80, // '/', OTHER 0x14, // '0', ZERO 0x05, // '1', DIGIT 0x05, // '2', DIGIT 0x45, // '3', DIGIT 0x45, // '4', DIGIT 0x45, // '5', DIGIT 0x85, // '6', DIGIT 0x85, // '7', DIGIT 0x85, // '8', DIGIT 0x05, // '9', DIGIT 0x00, // :!', OTHER 0x00, // ';', OTHER 0x30, // '<', OTHER 0x30, // '=', OTHER 0x80, // '>', OTHER 0x50, // '?', OTHER 0x80, // '@', OTHER 0x80, // 'A', OTHER 0x00, // 'B', OTHER 0x08, // 'C', TYPE 0x00, // 'D', OTHER 0x28, // 'E', TYPE 0x27, // 'F', SIZE 0x38, // 'G', TYPE 0x50, // 'H', OTHER 0x57, // 'I', SIZE 0x80, // 'J', OTHER 0x00, // 'K', OTHER 0x07, // 'L', SIZE 0x00, // 'M', OTHER 0x37, // 'N', SIZE 0x30, // 'O', OTHER 0x30, // 'P', OTHER 0x50, // 'Q', OTHER 0x50, // 'R', OTHER 0x88, // 'S', TYPE 0x00, // 'T', OTHER 0x00, // 'U', OTHER 0x00, // 'V', OTHER 0x20, // 'W', OTHER 0x28, // 'X', TYPE 0x80, // 'Y', OTHER 0x88, // 'Z', TYPE 0x80, // '[', OTHER 0x80, // '\', OTHER 0x00, // ']', OTHER 0x00, // '^', OTHER 0x00, // '-', OTHER 0x60, // '`', OTHER 0x60, // 'a', OTHER 0x60, // 'b', OTHER 0x68, // 'c', TYPE 0x68, // 'd', TYPE 0x68, // 'e', TYPE 0x08, // 'f', TYPE 0x08, // 'g', TYPE 0x07, // 'h', SIZE 0x78, // 'i', TYPE 0x70, // 'j', OTHER 0x70, // 'k', OTHER 0x77, // 'l', SIZE 0x70, // 'm', OTHER 0x70, // 'n', OTHER 0x08, // 'o', TYPE 0x08, // 'p', TYPE 0x00, // 'q', OTHER 0x00, // 'r', OTHER 0x08, // 's', TYPE 0x00, // 't', OTHER 0x08, // 'u', TYPE 0x00, // 'v', OTHER 0x07, // 'w', SIZE 0x08 // 'x', TYPE }; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: IsWhitespace (Private Free Method) DESCRIPTION: Is this whitespace? PARAMETERS: pStr [ I ] - The string RETURN VALUE: bool ===========================================================================*/ static bool IsWhitespace( LPCSTR pStr ) { bool bWS = false; int c = (int)*pStr; if (isspace( c )) { bWS = true; } return bWS; } /*=========================================================================== METHOD: IsHexadecimalString (Private Free Method) DESCRIPTION: Is this a hexadecimal digits string? PARAMETERS: pStr [ I ] - The string RETURN VALUE: bool ===========================================================================*/ static bool IsHexadecimalString( LPCSTR pStr ) { // Assume not bool bHex = false; // Skip whitespace LPCSTR pTmp = pStr; while (IsWhitespace( pTmp ) == true) { pTmp++; } // Skip leading +/- CHAR ch = *pTmp; if (ch == '+' || ch == '-') { pTmp++; } if (*pTmp == '0') { pTmp++; if (*pTmp == 'x' || *pTmp == 'X') { bHex = true; } } return bHex; } /*=========================================================================== METHOD: IsNegativeString (Private Free Method) DESCRIPTION: Is this a string starting with a negative sign? PARAMETERS: pStr [ I ] - The string RETURN VALUE: bool ===========================================================================*/ static bool IsNegativeString( LPCSTR pStr ) { // Assume not bool bNeg = false; // Skip whitespace LPCSTR pTmp = pStr; while (IsWhitespace( pTmp ) == true) { pTmp++; } CHAR ch = *pTmp; if (ch == '-') { bNeg = true; } return bNeg; } /*=========================================================================== METHOD: StringToLONG (Free Method) DESCRIPTION: Replacement/front end for strtol NOTE: strtol does not correctly handle a negative integer when specified in hexadecimal, so we have to check for that first PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToLONG( LPCSTR pStr, int base, LONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } // Hexadecimal? if (base == 16 || (base == 0 && IsHexadecimalString( pStr ) == true)) { // No negative hexadecimal strings allowed if (IsNegativeString( pStr ) == false) { // Reset error errno = 0; // Use the unsigned version, then cast LPSTR pEnd = (LPSTR)pStr; ULONG tmpVal = strtoul( pStr, &pEnd, base ); if (tmpVal != ULONG_MAX || errno != ERANGE) { // Where did we end? if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = (LONG)tmpVal; bOK = true; } } } } else { // Proceed as normal LPSTR pEnd = (LPSTR)pStr; LONG tmpVal = strtol( pStr, &pEnd, base ); if ((tmpVal != LONG_MAX && tmpVal != LONG_MIN) || errno != ERANGE) { // Where did we end? if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: StringToULONG (Free Method) DESCRIPTION: Replacement/front end for strtoul PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToULONG( LPCSTR pStr, int base, ULONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } // No negative strings allowed if (IsNegativeString( pStr ) == true) { return bOK; } // Reset error errno = 0; LPSTR pEnd = (LPSTR)pStr; ULONG tmpVal = strtoul( pStr, &pEnd, base ); if (tmpVal != ULONG_MAX || errno != ERANGE) { if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } return bOK; } /*=========================================================================== METHOD: StringToLONGLONG (Free Method) DESCRIPTION: Replacement/front end for strtoll NOTE: strtoll does not correctly handle a negative integer when specified in hexadecimal, so we have to check for that first PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToLONGLONG( LPCSTR pStr, int base, LONGLONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } if (base == 16 || (base == 0 && IsHexadecimalString( pStr ) == true)) { // No negative hexadecimal strings allowed if (IsNegativeString( pStr ) == false) { // Reset error errno = 0; // Use the unsigned version, then cast LPSTR pEnd = (LPSTR)pStr; ULONGLONG tmpVal = strtoull( pStr, &pEnd, base ); if (tmpVal != ULLONG_MAX || errno != ERANGE) { // Where did we end? if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = (LONGLONG)tmpVal; bOK = true; } } } } else { // Proceed as normal LPSTR pEnd = (LPSTR)pStr; LONGLONG tmpVal = strtoll( pStr, &pEnd, base ); if ((tmpVal != LLONG_MAX && tmpVal != LLONG_MIN) || errno != ERANGE) { if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: StringToULONGLONG (Free Method) DESCRIPTION: Replacement/front end for strtouill PARAMETERS: pStr [ I ] - The string base [ I ] - Base for conversion val [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool StringToULONGLONG( LPCSTR pStr, int base, ULONGLONG & val ) { // Assume failure bool bOK = false; if (pStr == 0 || *pStr == 0) { return bOK; } // No negative strings allowed if (IsNegativeString( pStr ) == true) { return bOK; } // Reset error errno = 0; LPSTR pEnd = (LPSTR)pStr; ULONGLONG tmpVal = strtoull( pStr, &pEnd, base ); if (tmpVal != ULLONG_MAX || errno != ERANGE) { if (pEnd != pStr && (*pEnd == 0 || IsWhitespace( pEnd ) == true)) { // Success! val = tmpVal; bOK = true; } } return bOK; } /*=========================================================================== METHOD: ParseCommandLine (Free Method) DESCRIPTION: Parse a command line to tokens (a command line is a string of space delimited values where a value that contains space is enclosed in text) PARAMETERS: commandLine [ I ] - The characters separating tokens tokens [ O ] - The resultant vector of tokens RETURN VALUE: None ===========================================================================*/ void ParseCommandLine( std::string commandLine, std::vector & tokens ) { ULONG count = (ULONG)commandLine.size(); for (ULONG nEndToken = 0; nEndToken < count;) { // Skip leading spaces int nStartToken = commandLine.find_first_not_of( " ", nEndToken ); if (nStartToken == -1) { // All that is left is spaces return; } int stringLength = 0; // In Quotes? If so ignore spaces until next quote if (commandLine[ nStartToken ] == '\"') { nStartToken++; nEndToken = commandLine.find( '\"', nStartToken ); if (nEndToken == -1) { // Unable to find trailing quote, fail return; } stringLength = nEndToken - nStartToken; nEndToken++; } else { nEndToken = commandLine.find( ' ', nStartToken ); if (nEndToken == -1) { // Unable to find trailing space, use end nEndToken = commandLine.size(); } stringLength = nEndToken - nStartToken; } std::string newToken = commandLine.substr( nStartToken, stringLength ); tokens.push_back( newToken ); } } /*=========================================================================== METHOD: ParseTokens (Free Method) DESCRIPTION: Parse a line into individual tokens NOTE: No attempt is made to handle accidental separators, i.e. searching for ',' on 'foo, bar, "foo, bar"' will return four tokens, not three so pick something like '^' instead of ','! PARAMETERS: pSeparator [ I ] - The characters separating tokens pLine [ I ] - The string being parsed tokens [ O ] - The resultant vector of tokens RETURN VALUE: None ===========================================================================*/ void ParseTokens( LPCSTR pSeparator, LPSTR pLine, std::vector & tokens ) { if (pSeparator != 0 && pSeparator[0] != 0 && pLine != 0 && pLine[0] != 0) { LPSTR pToken = strtok( pLine, pSeparator ); while (pToken != 0) { // Store token tokens.push_back( pToken ); // Get next token: pToken = strtok( 0, pSeparator ); } } } /*=========================================================================== METHOD: ParseFormatSpecifier (Free Method) DESCRIPTION: Parse a format specifier into individual format type tokens PARAMETERS: pFmt [ I ] - The format specifier (must be NULL terminated) fmtLen [ I ] - Length of above format specifier fmtTypes [ O ] - The individual format type tokens ('d', 'u', 'us' etc.) RETURN VALUE: bool - Valid format specifier? ===========================================================================*/ bool ParseFormatSpecifier( LPCSTR pFmt, ULONG fmtLen, std::vector & fmtTypes ) { // Assume failure bool bOK = false; // Make sure string is NULL terminated CHAR ch; ULONG chars = 0; while (chars < fmtLen) { if (pFmt[chars] == '\0') { break; } else { chars++; } } if (pFmt[chars] != '\0') { return bOK; } // Extract individual format type tokens eFormatState state = eFMT_STATE_NORMAL; eFormatCharClass cc = eFMT_CH_CLASS_OTHER; while ((ch = *pFmt++) != '\0' && state != eFMT_STATE_INVALID) { // Find character class cc = eFMT_CH_CLASS_OTHER; if (ch >= ' ' && ch <= 'x') { cc = (eFormatCharClass)(gLookupTable[ch - ' '] & 0xF); } // Find next state state = (eFormatState)(gLookupTable[cc * eFMT_STATES + (state)] >> 4); switch (state) { case eFMT_STATE_NORMAL: NORMAL_STATE: break; case eFMT_STATE_PERCENT: case eFMT_STATE_FLAG: case eFMT_STATE_DOT: break; case eFMT_STATE_WIDTH: case eFMT_STATE_PRECIS: if (ch == '*') { fmtTypes.push_back( ch ); } break; case eFMT_STATE_SIZE: switch (ch) { case 'l': if (*pFmt == 'l') { ++pFmt; } break; case 'I': if ( (*pFmt == '6') && (*(pFmt + 1) == '4') ) { pFmt += 2; } else if ( (*pFmt == '3') && (*(pFmt + 1) == '2') ) { pFmt += 2; } else if ( (*pFmt == 'd') || (*pFmt == 'i') || (*pFmt == 'o') || (*pFmt == 'u') || (*pFmt == 'x') || (*pFmt == 'X') ) { // Nothing further needed } else { state = eFMT_STATE_NORMAL; goto NORMAL_STATE; } break; case 'h': case 'w': break; } break; case eFMT_STATE_TYPE: fmtTypes.push_back( ch ); break; } } bOK = (state == eFMT_STATE_NORMAL || state == eFMT_STATE_TYPE); return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, CHAR & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true) { // Reset status bOK = false; // Was this provided as a hexadecimal string? if (IsHexadecimalString( pStr ) == true) { // Yes, the return value is a LONG, so check against // the maximum range for a UCHAR, before casting to // a CHAR (to pick sign back up) if (val <= UCHAR_MAX) { // Success! theType = (CHAR)val; bOK = true; } } else if (val >= SCHAR_MIN && val <= SCHAR_MAX) { // Success! theType = (CHAR)val; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, UCHAR & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true && val <= UCHAR_MAX) { // Success! theType = (UCHAR)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, SHORT & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true) { // Reset status bOK = false; // Was this provided as a hexadecimal string? if (IsHexadecimalString( pStr ) == true) { // Yes, the return value is a LONG, so check against // the maximum range for a USHORT, before casting to // a SHORT (to pick sign back up) if (val <= USHRT_MAX) { // Success! theType = (SHORT)val; bOK = true; } } else if (val >= SHRT_MIN && val <= SHRT_MAX) { // Success! theType = (SHORT)val; bOK = true; } } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, USHORT & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true && val <= USHRT_MAX) { // Success! theType = (USHORT)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, int & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true && (val >= INT_MIN && val <= INT_MAX)) { // Success! theType = (int)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, UINT & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true && val <= UINT_MAX) { // Success! theType = (UINT)val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, LONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONG val = LONG_MAX; bOK = StringToLONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, ULONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONG val = ULONG_MAX; bOK = StringToULONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, LONGLONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { LONGLONG val = LLONG_MAX; bOK = StringToLONGLONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: FromString (Free Method) DESCRIPTION: Convert a string to a value PARAMETERS: pStr [ I ] - The string theType [ O ] - Resulting value RETURN VALUE: bool ===========================================================================*/ bool FromString( LPCSTR pStr, ULONGLONG & theType ) { // Assume failure bool bOK = false; if (pStr != 0) { ULONGLONG val = ULLONG_MAX; bOK = StringToULONGLONG( pStr, 0, val ); if (bOK == true) { // Success! theType = val; } else { bOK = false; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( CHAR val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int tmp = (int)val; int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%d", tmp ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( UCHAR val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%u", (UINT)val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( SHORT val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int tmp = (int)val; int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%d", tmp ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( USHORT val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%u", (UINT)val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( int val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%d", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( UINT val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%u", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( LONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%ld", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( ULONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%lu", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( LONGLONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%lld", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: ToString (Free Method) DESCRIPTION: Convert a value to a string PARAMETERS: val [ I ] - The value to convert pStr [ O ] - The resulting string RETURN VALUE: bool ===========================================================================*/ bool ToString( ULONGLONG val, LPSTR pStr ) { // Assume failure bool bOK = false; if (pStr != 0) { int rc = snprintf( pStr, (size_t)(SUGGESTED_BUFFER_LEN - 1), "%llu", val ); if (rc < 0) { pStr[0] = 0; } else { // Success! bOK = true; } } return bOK; } /*=========================================================================== METHOD: GetProgramPath (Public Method) DESCRIPTION: Return the special folder used for storing program files RETURN VALUE: std::string (Static value of "/opt/Qualcomm/Gobi/") ===========================================================================*/ std::string GetProgramPath() { // If running programs's path is desired we could // use readlink with /proc/getpid()/exe // Just using static path, as we don't want them to move it std::string path = "/opt/Qualcomm/Gobi/"; return path; } /*=========================================================================== METHOD: IsFolder (Free Method) DESCRIPTION: Helper function for EnumerateFolders, tells if a dirent is a folder. This reduces the memory usage by scandir, as compared to checking after scandir returns. PARAMETERS: pFile [ I ] - dirent structure describing file RETURN VALUE: int: zero - Ignore this file nonzero - Process this file ===========================================================================*/ int IsFolder( const struct dirent * pFile ) { // Ignore anything beginning with a '.' if (pFile->d_name[0] == '.') { return 0; } return (pFile->d_type == DT_DIR ? 1 : 0); } /*=========================================================================== METHOD: EnumerateFolders (Public Method) DESCRIPTION: Enumerate the subfolders of the given folder (recursive) PARAMETERS: baseFolder [ I ] - Folder to search in foundFolders [ O ] - Fully qualified paths of found folders RETURN VALUE: None ===========================================================================*/ void EnumerateFolders( const std::string & baseFolder, std::vector & foundFolders ) { if (baseFolder.size() == 0) { return; } std::string folderSearch = baseFolder; // Add trailing / if not present int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } dirent ** ppDevFiles; // Yes, scandir really takes a triple pointer for its second param int nNumDevFiles = scandir( folderSearch.c_str(), &ppDevFiles, IsFolder, alphasort ); for (int nFile = 0; nFile < nNumDevFiles; nFile++) { std::string newFolder = folderSearch + ppDevFiles[nFile]->d_name; free( ppDevFiles[nFile] ); foundFolders.push_back( newFolder ); EnumerateFolders( newFolder, foundFolders ); } if (nNumDevFiles != -1) { free( ppDevFiles ); } } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/CoreUtilities.h000077500000000000000000000422521455567757300242340ustar00rootroot00000000000000/*=========================================================================== FILE: CoreUtilities.h DESCRIPTION: Collection of various utility methods PUBLIC CLASSES AND METHODS: StringToLONG StringToULONG StringToLONGLONG StringToULONGLONG ParseCommandLine() ParseTokens() ParseFormatSpecifier() FromString( CHAR ) FromString( UCHAR ) FromString( SHORT ) FromString( USHORT ) FromString( int ) FromString( UINT ) FromString( LONG ) FromString( ULONG ) FromString( LONGLONG ) FromString( ULONGLONG ) ToString( CHAR ) ToString( UCHAR ) ToString( SHORT ) ToString( USHORT ) ToString( int ) ToString( UINT ) ToString( LONG ) ToString( ULONG ) ToString( LONGLONG ) ToString( ULONGLONG ) GetProgramPath() EnumerateFolders() ContainerToCSVString() CSVStringToContainer() CSVStringToValidatedContainer() SetDiff() SetIntersection() SetUnion() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Suggested size of an argument buffer to ToString() for any key, each // ToString() should not write more than this size to the passed in buffer const ULONG SUGGESTED_BUFFER_LEN = 64; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // Replacement/front end for _tcstol bool StringToLONG( LPCSTR pStr, int base, LONG & val ); // Replacement/front end for _tcstoul bool StringToULONG( LPCSTR pStr, int base, ULONG & val ); // Replacement/front end for _tcstoi64 bool StringToLONGLONG( LPCSTR pStr, int base, LONGLONG & val ); // Replacement/front end for _tcstoui64 bool StringToULONGLONG( LPCSTR pStr, int base, ULONGLONG & val ); // Parse a command line to tokens (a command line is a string of // space delimited values where a value that contains space is // enclosed in text) void ParseCommandLine( std::string commandLine, std::vector & tokens ); // Parse a line into individual tokens void ParseTokens( LPCSTR pSeparator, LPSTR pLine, std::vector & tokens ); // Parse a format specifier into individual format type tokens bool ParseFormatSpecifier( LPCSTR pFmt, ULONG fmtLen, std::vector & fmtTypes ); // Convert a string to a value bool FromString( LPCSTR pStr, CHAR & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, UCHAR & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, SHORT & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, USHORT & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, int & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, UINT & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, LONG & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, ULONG & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, LONGLONG & theType ); // Convert a string to a value bool FromString( LPCSTR pStr, ULONGLONG & theType ); // Convert a value to a string bool ToString( CHAR val, LPSTR pStr ); // Convert a value to a string bool ToString( UCHAR val, LPSTR pStr ); // Convert a value to a string bool ToString( SHORT val, LPSTR pStr ); // Convert a value to a string bool ToString( USHORT val, LPSTR pStr ); // Convert a value to a string bool ToString( int val, LPSTR pStr ); // Convert a value to a string bool ToString( UINT val, LPSTR pStr ); // Convert a value to a string bool ToString( LONG val, LPSTR pStr ); // Convert a value to a string bool ToString( ULONG val, LPSTR pStr ); // Convert a value to a string bool ToString( LONGLONG val, LPSTR pStr ); // Convert a value to a string bool ToString( ULONGLONG val, LPSTR pStr ); // Return the special folder used for storing program files std::string GetProgramPath(); // Enumerate the subfolders of the given folder (recursive) void EnumerateFolders( const std::string & baseFolder, std::vector & foundFolders ); /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ContainerToCSVString (Free Method) DESCRIPTION: Convert the contents of a container to a CSV string NOTE: ToString() must be defined for the container value type PARAMETERS: cont [ I ] - The container sep [ I ] - The character separating tokens csv [ O ] - The resulting comma separated string RETURN VALUE: None ===========================================================================*/ template void ContainerToCSVString( const Container & cont, CHAR sep, std::string & csv ) { csv = ""; if ((ULONG)cont.size() > (ULONG)0) { CHAR keyBuf[SUGGESTED_BUFFER_LEN]; typename Container::const_iterator pIter = cont.begin(); while (pIter != cont.end()) { const typename Container::value_type & theKey = *pIter; bool bOK = ToString( theKey, &keyBuf[0] ); if (bOK == true && keyBuf[0] != 0) { if (pIter != cont.begin()) { csv += sep; } csv += (LPCSTR)&keyBuf[0]; } pIter++; } } } /*=========================================================================== METHOD: CSVStringToContainer (Free Method) DESCRIPTION: Populate a container from a parsed CSV string NOTE: FromString() must be defined for the container value type NOTE: The container is emptied before this operation is attempted PARAMETERS: pSeparator [ I ] - The characters separating tokens pCSV [ I ] - The comma separated string (will be modified) cont [ O ] - The resulting container bClear [ I ] - Clear the container first? NOTE: if the container is not cleared first then insertions may fail for duplicate keys RETURN VALUE: None ===========================================================================*/ template void CSVStringToContainer( LPCSTR pSeparator, LPSTR pCSV, Container & cont, bool bClear = true ) { if (pCSV != 0 && *pCSV != 0) { // Remove a leading quote? if (*pCSV == '\"') { pCSV++; } // Remove a trailing quote? ULONG len = (ULONG)strlen( pCSV ); if (len > 0) { if (pCSV[len - 1] == '\"') { pCSV[len - 1] = 0; } } // Clear the container first? if (bClear == true) { cont.clear(); } std::vector tokens; ParseTokens( pSeparator, pCSV, tokens ); std::vector ::const_iterator pIter = tokens.begin(); while (pIter != tokens.end()) { LPCSTR pTok = *pIter; typename Container::value_type theKey; bool bOK = ::FromString( pTok, theKey ); if (bOK == true) { std::insert_iterator is( cont, cont.end() ); *is = theKey; } pIter++; } } } /*=========================================================================== METHOD: CSVStringToValidatedContainer (Free Method) DESCRIPTION: Populate a container from a parsed CSV string NOTE: FromString() and IsValid() must be defined for the container value type (the later need not do anything but return true) NOTE: The container is emptied before this operation is attempted PARAMETERS: pSeparator [ I ] - The characters separating tokens pCSV [ I ] - The comma separated string (will be modified) cont [ O ] - The resulting container RETURN VALUE: None ===========================================================================*/ template void CSVStringToValidatedContainer( LPCSTR pSeparator, LPSTR pCSV, Container & cont ) { cont.clear(); if (pCSV != 0 && *pCSV != 0) { // Remove a leading quote? if (*pCSV == '\"') { pCSV++; } // Remove a trailing quote? ULONG len = (ULONG)strlen( pCSV ); if (len > 0) { if (pCSV[len - 1] == '\"') { pCSV[len - 1] = 0; } } cont.clear(); std::vector tokens; ParseTokens( pSeparator, pCSV, tokens ); std::vector ::const_iterator pIter = tokens.begin(); while (pIter != tokens.end()) { LPCSTR pTok = *pIter; typename Container::value_type theKey; bool bOK = ::FromString( pTok, theKey ); if (bOK == true) { bool bValid = IsValid( theKey ); if (bValid == true) { std::insert_iterator is( cont, cont.end() ); *is = theKey; } } pIter++; } } } /*=========================================================================== METHOD: SetDiff (Free Method) DESCRIPTION: Given two sets return a third that contains everything in the first set but not the second set PARAMETERS: setA [ I ] - The first set setB [ I ] - The second set RETURN VALUE: std::set - the difference ===========================================================================*/ template std::set SetDiff( const std::set & setA, const std::set & setB ) { std::set retSet; if (setB.size() == 0) { // Everything that is in the first set but not the second // (empty) set is ... the first set! retSet = setA; } else if (setA.size() == 0) { // The first set is empty, hence the return set is empty } else { // Both sets have elements, therefore the iterators will // be valid and we can use the standard approach typename std::set ::const_iterator pIterA = setA.begin(); typename std::set ::const_iterator pIterB = setB.begin(); for ( ; pIterA != setA.end() && pIterB != setB.end(); ) { if (*pIterA < *pIterB) { retSet.insert( *pIterA ); pIterA++; } else if (*pIterB < *pIterA) { pIterB++; } else { pIterA++; pIterB++; } } while (pIterA != setA.end()) { retSet.insert( *pIterA ); pIterA++; } } return retSet; } /*=========================================================================== METHOD: SetIntersection (Free Method) DESCRIPTION: Given two sets return a third that contains everything that is in both sets PARAMETERS: setA [ I ] - The first set setB [ I ] - The second set RETURN VALUE: std::set - the union ===========================================================================*/ template std::set SetIntersection( const std::set & setA, const std::set & setB ) { std::set retSet; // Neither set can be empty if (setA.size() != 0 && setA.size() != 0) { // Both sets have elements, therefore the iterators will // be valid and we can use the standard approach typename std::set ::const_iterator pIterA = setA.begin(); typename std::set ::const_iterator pIterB = setB.begin(); for ( ; pIterA != setA.end() && pIterB != setB.end(); ) { if (*pIterA < *pIterB) { pIterA++; } else if (*pIterB < *pIterA) { pIterB++; } else { retSet.insert( *pIterA ); pIterA++; pIterB++; } } } return retSet; } /*=========================================================================== METHOD: SetUnion (Free Method) DESCRIPTION: Given two sets return a third that contains everything that is either in the first set or in the second set PARAMETERS: setA [ I ] - The first set setB [ I ] - The second set RETURN VALUE: std::set - the union ===========================================================================*/ template std::set SetUnion( const std::set & setA, const std::set & setB ) { std::set retSet; if (setB.size() == 0) { // Everything that is in the first (possibly empty) set or in // the second (empty) set is ... the first set! retSet = setA; } else if (setA.size() == 0) { // Everything that is in the first (empty) set or in the // second (possibly empty) set is ... the second set! retSet = setB; } else { // Both sets have elements, therefore the iterators will // be valid and we can use the standard approach typename std::set ::const_iterator pIterA = setA.begin(); typename std::set ::const_iterator pIterB = setB.begin(); for ( ; pIterA != setA.end() && pIterB != setB.end(); ) { if (*pIterA < *pIterB) { retSet.insert( *pIterA ); pIterA++; } else if (*pIterB < *pIterA) { retSet.insert( *pIterB ); pIterB++; } else { retSet.insert( *pIterA ); pIterA++; pIterB++; } } while (pIterA != setA.end()) { retSet.insert( *pIterA ); pIterA++; } while (pIterB != setB.end()) { retSet.insert( *pIterB ); pIterB++; } } return retSet; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DB2NavTree.cpp000077500000000000000000000301311455567757300236300ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNavTree.cpp DESCRIPTION: Implementation of cDB2NavTree PUBLIC CLASSES AND METHODS: sDB2NavFragment cDB2NavTree This class distills the database description of a protocol entity into a simple tree structure more suited to efficient navigation for parsing/packing Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DB2NavTree.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sDB2NavFragment Methods /*=========================================================================*/ /*=========================================================================== METHOD: sDB2NavFragment (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ sDB2NavFragment::sDB2NavFragment() : mpField( 0 ), mpFragment( 0 ), mpNextFragment( 0 ), mpLinkFragment( 0 ) { // Nothing to do } /*=========================================================================*/ // cDB2NavTree Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDB2NavTree (Public Method) DESCRIPTION: Constructor PARAMETERS: db [ I ] - Database to use RETURN VALUE: None ===========================================================================*/ cDB2NavTree::cDB2NavTree( const cCoreDatabase & db ) : mDB( db ) { // Nothing to do } /*=========================================================================== METHOD: ~cDB2NavTree (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDB2NavTree::~cDB2NavTree() { // Clean-up our fragment allocations std::list ::iterator pIter; for (pIter = mFragments.begin(); pIter != mFragments.end(); pIter++) { sDB2NavFragment * pFrag = *pIter; if (pFrag != 0) { delete pFrag; } } } /*=========================================================================== METHOD: BuildTree (Internal Method) DESCRIPTION: Build nav tree for the entity described by the given key/name PARAMETERS: key [ I ] - Key into the protocol entity table RETURN VALUE: bool ===========================================================================*/ bool cDB2NavTree::BuildTree( const std::vector & key ) { // Assume failure bool bRC = false; // Look up entity definition bool bFound = mDB.FindEntity( key, mEntity ); // Did we find it? if (bFound == false) { // No definition in database return bRC; } // A structure to navigate? if (mEntity.mStructID == -1) { bRC = true; return bRC; } const tDB2FragmentMap & structTable = mDB.GetProtocolStructs(); // Grab first fragment of structure std::pair id( mEntity.mStructID, 0 ); tDB2FragmentMap::const_iterator pFrag = structTable.find( id ); // Nothing to navigate? if (pFrag == structTable.end()) { ASSERT( 0 ); return bRC; } // No name? if (mEntity.mpName == 0 || mEntity.mpName[0] == 0) { ASSERT( 0 ); return bRC; } // Process the initial structure bRC = ProcessStruct( &pFrag->second, 0 ); return bRC; } /*=========================================================================== METHOD: ProcessStruct (Internal Method) DESCRIPTION: Process a structure described by the given initial fragment PARAMETERS: frag [ I ] - Entry point for structure pOwner [ I ] - Owning fragment RETURN VALUE: bool ===========================================================================*/ bool cDB2NavTree::ProcessStruct( const sDB2Fragment * pFrag, sDB2NavFragment * pOwner ) { // Assume success bool bRC = true; // Grab struct ID/fragment ID from fragment std::pair key = pFrag->GetKey(); ULONG structID = key.first; const tDB2FragmentMap & structTable = mDB.GetProtocolStructs(); const tDB2FieldMap & fieldTable = mDB.GetProtocolFields(); // Sync iterator to fragment tDB2FragmentMap::const_iterator pFragIter = structTable.find( key ); if (pFragIter == structTable.end()) { // This should not happen ASSERT( 0 ); bRC = false; return bRC; } // Fragments we allocate along the way sDB2NavFragment * pOld = 0; sDB2NavFragment * pNew = 0; // Process each fragment in the structure while ( (pFragIter != structTable.end()) && (pFragIter->second.mStructID == structID) ) { pFrag = &pFragIter->second; // Allocate our new fragment pNew = new sDB2NavFragment; if (pNew == 0) { bRC = false; break; } // Store DB fragemnt pNew->mpFragment = pFrag; mFragments.push_back( pNew ); // Hook previous up to us if (pOld != 0 && pOld->mpNextFragment == 0) { pOld->mpNextFragment = pNew; } // Hook owner up to us if (pOwner != 0 && pOwner->mpLinkFragment == 0) { pOwner->mpLinkFragment = pNew; } // Modified? switch (pFrag->mModifierType) { case eDB2_MOD_VARIABLE_ARRAY: case eDB2_MOD_VARIABLE_STRING1: case eDB2_MOD_VARIABLE_STRING2: case eDB2_MOD_VARIABLE_STRING3: { const tDB2Array1ModMap & arrays1 = mDB.GetArray1Mods(); tDB2Array1ModMap::const_iterator pTmp; pTmp = arrays1.find( pFrag->mpModifierValue ); if (pTmp != arrays1.end()) { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[pTmp->second] = entry; } else { bRC = false; } } break; case eDB2_MOD_VARIABLE_ARRAY2: { const tDB2Array2ModMap & arrays2 = mDB.GetArray2Mods(); tDB2Array2ModMap::const_iterator pTmp; pTmp = arrays2.find( pFrag->mpModifierValue ); if (pTmp != arrays2.end()) { // We need to track the value of the given fields std::pair entry( false, 0 ); mTrackedFields[pTmp->second.first] = entry; mTrackedFields[pTmp->second.second] = entry; } else { bRC = false; } } break; case eDB2_MOD_OPTIONAL: { const tDB2OptionalModMap & conditions = mDB.GetOptionalMods(); tDB2OptionalModMap::const_iterator pTmp; pTmp = conditions.find( pFrag->mpModifierValue ); if (pTmp != conditions.end()) { const sDB2SimpleCondition & con = pTmp->second; // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[con.mID] = entry; if (con.mbF2F == true) { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[(ULONG)con.mValue] = entry; } } else { bRC = false; } } break; case eDB2_MOD_VARIABLE_ARRAY3: { const tDB2ExpressionModMap & exprs = mDB.GetExpressionMods(); tDB2ExpressionModMap::const_iterator pTmp; pTmp = exprs.find( pFrag->mpModifierValue ); if (pTmp != exprs.end()) { const sDB2SimpleExpression & expr = pTmp->second; // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[expr.mID] = entry; if (expr.mbF2F == true) { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[(ULONG)expr.mValue] = entry; } } else { bRC = false; } } break; }; // What type of fragment is this? switch (pFrag->mFragmentType) { case eDB2_FRAGMENT_FIELD: { // Grab field ID ULONG fieldID = pFrag->mFragmentValue; // Find field representation in database tDB2FieldMap::const_iterator pField = fieldTable.find( fieldID ); if (pField != fieldTable.end()) { pNew->mpField = &pField->second; } else { bRC = false; } } break; case eDB2_FRAGMENT_STRUCT: { // Grab structure ID ULONG structID = pFrag->mFragmentValue; // Grab first fragment of structure std::pair id( structID, 0 ); tDB2FragmentMap::const_iterator pFragIterTmp; pFragIterTmp = structTable.find( id ); if (pFragIterTmp != structTable.end()) { pFrag = &pFragIterTmp->second; bRC = ProcessStruct( pFrag, pNew ); } else { bRC = false; } } break; case eDB2_FRAGMENT_VARIABLE_PAD_BITS: case eDB2_FRAGMENT_VARIABLE_PAD_BYTES: { // We need to track the value of the given field std::pair entry( false, 0 ); mTrackedFields[pFrag->mFragmentValue] = entry; bRC = true; } break; default: bRC = true; break; } if (bRC == true) { pFragIter++; pOld = pNew; pNew = 0; } else { break; } } return bRC; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DB2NavTree.h000077500000000000000000000113131455567757300232760ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNavTree.h DESCRIPTION: Declaration of cProtocolEntityNavTree PUBLIC CLASSES AND METHODS: sDB2NavFragment cDB2NavTree This class distills the database description of a protocol entity into a simple tree structure more suited to efficient navigation for parsing/packing Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Struct sDB2NavFragment // Protocol entity navigation fragment /*=========================================================================*/ struct sDB2NavFragment { public: // Constructor sDB2NavFragment(); /* Associated DB fragment (never empty) */ const sDB2Fragment * mpFragment; /* Associated DB field (may be empty) */ const sDB2Field * mpField; /* Next fragment in this structure */ const sDB2NavFragment * mpNextFragment; /* Fragment linked to this structure */ const sDB2NavFragment * mpLinkFragment; }; /*=========================================================================*/ // Class cDB2NavTree // Class to describe a protocol entity suited to efficient navigation /*=========================================================================*/ class cDB2NavTree { public: // Constructor cDB2NavTree( const cCoreDatabase & db ); // Destructor virtual ~cDB2NavTree(); // Build nav tree for the protocol entity described by the given key bool BuildTree( const std::vector & key ); // (Inline) Return protocol entity const sDB2ProtocolEntity & GetEntity() const { return mEntity; }; // (Inline) Return fragments const std::list & GetFragments() const { return mFragments; }; // Return a map of all tracked fields std::map > GetTrackedFields() const { return mTrackedFields; }; protected: // Process a structure described by the given initial fragment bool ProcessStruct( const sDB2Fragment * pFrag, sDB2NavFragment * pOwner ); /* Protocol entity being navigated */ sDB2ProtocolEntity mEntity; /* Database reference */ const cCoreDatabase & mDB; /* List of all allocated fragments */ std::list mFragments; /* Map of all 'tracked' fields */ std::map > mTrackedFields; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DB2TextFile.cpp000077500000000000000000000152021455567757300240120ustar00rootroot00000000000000/*=========================================================================== FILE: DB2TextFile.h DESCRIPTION: Implementation of cDB2TextFile class PUBLIC CLASSES AND METHODS: cDB2TextFile The cDB2TextFile class provides the simple ability to read in an ANSI/UNICODE file and copy it to a dynamically allocated buffer The sole difference between this and CStdioFile is that the issues stemming from supporting both ANSI and UNICODE files are handled in a simpler fashion at the expense of a bit of performance Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "DB2TextFile.h" //----------------------------------------------------------------------------- // Definitions //----------------------------------------------------------------------------- // Maximum size of a file this interface will try to open (8 MB) const DWORD MAX_FILE_SZ = 1024 * 1024 * 8; // Maximum number of characters to run UNICODE check over const INT MAX_UNICODE_CHECK_LEN = 128; /*=========================================================================*/ // cDB2TextFile Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDB2TextFile (Public Method) DESCRIPTION: Construct object/load file into memory PARAMETERS pFileName [ I ] - File name RETURN VALUE: None ===========================================================================*/ cDB2TextFile::cDB2TextFile( LPCSTR pFileName ) : mText( "" ), mStatus( ERROR_FILE_NOT_FOUND ), mCurrentPos( 0 ) { if (pFileName == 0 || pFileName[0] == 0) { return; } // Open the file std::ifstream tempFStream; tempFStream.open( pFileName, std::ios::in | std::ios::binary ); if (tempFStream.fail() == true) { mStatus = ERROR_FILE_NOT_FOUND; return; } // Get size LONG nFileSize = tempFStream.rdbuf()->in_avail(); if (nFileSize == -1 || nFileSize > MAX_FILE_SZ) { tempFStream.close(); mStatus = ERROR_GEN_FAILURE; return; } // Read file into pTempBuffer CHAR * pTempBuffer = new char[ nFileSize ]; if (pTempBuffer == NULL) { tempFStream.close(); mStatus = ERROR_GEN_FAILURE; return; } tempFStream.read( pTempBuffer, nFileSize ); if (tempFStream.fail() == true) { tempFStream.close(); delete [] pTempBuffer; mStatus = ERROR_GEN_FAILURE; return; } tempFStream.close(); // Convert to string mText = std::string( pTempBuffer, nFileSize ); delete [] pTempBuffer; // Final check if (mText.size() != nFileSize) { mStatus = ERROR_GEN_FAILURE; return; } // Success! mStatus = NO_ERROR; } /*=========================================================================== METHOD: cDB2TextFile (Public Method) DESCRIPTION: Construct object/copy from buffer into memory PARAMETERS pBuffer [ I ] - Buffer to copy from bufferLen [ I ] - Size of above buffer RETURN VALUE: None ===========================================================================*/ cDB2TextFile::cDB2TextFile( LPCSTR pBuffer, ULONG bufferLen ) : mText( "" ), mStatus( ERROR_FILE_NOT_FOUND ), mCurrentPos( 0 ) { // Convert to string mText = std::string( pBuffer, bufferLen ); // Final check if (mText.size() != bufferLen) { mStatus = ERROR_GEN_FAILURE; return; } // Success! mStatus = NO_ERROR; } /*=========================================================================== METHOD: ~cDB2TextFile (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDB2TextFile::~cDB2TextFile() { // Nothing to do } /*=========================================================================== METHOD: ReadLine (Public Method) DESCRIPTION: Read the next available line PARAMETERS line [ O ] - Line (minus CR/LF) RETURN VALUE: None ===========================================================================*/ bool cDB2TextFile::ReadLine( std::string & line ) { if (IsValid() == false) { return false; } int len = mText.size(); if (mCurrentPos >= len) { return false; } int newIdx = mText.find( '\n', mCurrentPos ); if (newIdx == -1) { // Possibly the end of the file newIdx = len; } if (newIdx < mCurrentPos) { return false; } if (newIdx == mCurrentPos) { // Return an empty line mCurrentPos++; line = ""; } else { // Grab line line = mText.substr( mCurrentPos, (newIdx - mCurrentPos) ); // Check for CR int nCR = line.find( '\r' ); if (nCR != -1) { line.erase( nCR, 1 ); } mCurrentPos = newIdx + 1; } return true; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DB2TextFile.h000077500000000000000000000073321455567757300234640ustar00rootroot00000000000000/*=========================================================================== FILE: DB2TextFile.h DESCRIPTION: Declaration of cDB2TextFile class PUBLIC CLASSES AND METHODS: cDB2TextFile The cDB2TextFile class provides the simple ability to read in an ANSI/UNICODE file and copy it to a dynamically allocated buffer The sole difference between this and CStdioFile is that the issues stemming from supporting both ANSI and UNICODE files are handled in a simpler fashion at the expense of a bit of performance Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ #include "StdAfx.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cDB2TextFile /*=========================================================================*/ class cDB2TextFile { public: // Constructor (loads file) cDB2TextFile( LPCSTR pMemFile ); // Constructor (loads file from resource table) cDB2TextFile( HMODULE hModule, LPCSTR pRscTable, DWORD rscID ); // Constructor (loads file from buffer) cDB2TextFile( LPCSTR pBuffer, ULONG bufferLen ); // Destructor ~cDB2TextFile(); // (Inline) Get error status DWORD GetStatus() { return mStatus; }; // (Inline) Get the file contents bool GetText( std::string & copy ) { bool bOK = IsValid(); if (bOK == true) { copy = mText; } return bOK; }; // (Inline) Get file validity virtual bool IsValid() { return (mStatus == NO_ERROR); }; // Read the next available line bool ReadLine( std::string & line ); protected: /* File contents */ std::string mText; /* Current position (in above contents) */ int mCurrentPos; /* Error status */ DWORD mStatus; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DB2Utilities.cpp000077500000000000000000000551661455567757300242560ustar00rootroot00000000000000/*=========================================================================== FILE: DB2Utilities.cpp DESCRIPTION: Utility functions for packing/parsing protocol entities using the database PUBLIC ENUMERATIONS AND METHODS: sProtocolEntityKey sDB2PackingInput sDB2NavInput MapQMIEntityTypeToProtocolType MapQMIEntityTypeToQMIServiceType MapQMIProtocolTypeToEntityType DB2GetMaxBufferSize DB2BuildQMIBuffer DB2PackQMIBuffer DB2ReduceQMIBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DB2Utilities.h" #include "QMIBuffers.h" #include "DataPacker.h" #include "ProtocolEntityFieldEnumerator.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Free Methods //--------------------------------------------------------------------------- /*=========================================================================== METHOD: MapQMIEntityTypeToQMIServiceType (Public Free Method) DESCRIPTION: Map a DB protocol entity type (for QMI) to a QMI service type PARAMETERS: et [ I ] - Protocol entity type RETURN VALUE: eQMIService ===========================================================================*/ eQMIService MapQMIEntityTypeToQMIServiceType( eDB2EntityType et ) { eQMIService st = eQMI_SVC_ENUM_BEGIN; switch (et) { case eDB2_ET_QMI_CTL_REQ: case eDB2_ET_QMI_CTL_RSP: case eDB2_ET_QMI_CTL_IND: st = eQMI_SVC_CONTROL; break; case eDB2_ET_QMI_WDS_REQ: case eDB2_ET_QMI_WDS_RSP: case eDB2_ET_QMI_WDS_IND: st = eQMI_SVC_WDS; break; case eDB2_ET_QMI_DMS_REQ: case eDB2_ET_QMI_DMS_RSP: case eDB2_ET_QMI_DMS_IND: st = eQMI_SVC_DMS; break; case eDB2_ET_QMI_NAS_REQ: case eDB2_ET_QMI_NAS_RSP: case eDB2_ET_QMI_NAS_IND: st = eQMI_SVC_NAS; break; case eDB2_ET_QMI_QOS_REQ: case eDB2_ET_QMI_QOS_RSP: case eDB2_ET_QMI_QOS_IND: st = eQMI_SVC_QOS; break; case eDB2_ET_QMI_WMS_REQ: case eDB2_ET_QMI_WMS_RSP: case eDB2_ET_QMI_WMS_IND: st = eQMI_SVC_WMS; break; case eDB2_ET_QMI_PDS_REQ: case eDB2_ET_QMI_PDS_RSP: case eDB2_ET_QMI_PDS_IND: st = eQMI_SVC_PDS; break; case eDB2_ET_QMI_AUTH_REQ: case eDB2_ET_QMI_AUTH_RSP: case eDB2_ET_QMI_AUTH_IND: st = eQMI_SVC_AUTH; break; case eDB2_ET_QMI_VOICE_REQ: case eDB2_ET_QMI_VOICE_RSP: case eDB2_ET_QMI_VOICE_IND: st = eQMI_SVC_VOICE; break; case eDB2_ET_QMI_CAT_REQ: case eDB2_ET_QMI_CAT_RSP: case eDB2_ET_QMI_CAT_IND: st = eQMI_SVC_CAT; break; case eDB2_ET_QMI_RMS_REQ: case eDB2_ET_QMI_RMS_RSP: case eDB2_ET_QMI_RMS_IND: st = eQMI_SVC_RMS; break; case eDB2_ET_QMI_OMA_REQ: case eDB2_ET_QMI_OMA_RSP: case eDB2_ET_QMI_OMA_IND: st = eQMI_SVC_OMA; break; } return st; } /*=========================================================================== METHOD: MapQMIEntityTypeToProtocolType (Public Free Method) DESCRIPTION: Map a DB protocol entity type (for QMI) to a buffer protocol type PARAMETERS: et [ I ] - Protocol entity type RETURN VALUE: eProtocolType ===========================================================================*/ eProtocolType MapQMIEntityTypeToProtocolType( eDB2EntityType et ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; switch (et) { case eDB2_ET_QMI_WDS_REQ: pt = ePROTOCOL_QMI_WDS_TX; break; case eDB2_ET_QMI_WDS_RSP: case eDB2_ET_QMI_WDS_IND: pt = ePROTOCOL_QMI_WDS_RX; break; case eDB2_ET_QMI_DMS_REQ: pt = ePROTOCOL_QMI_DMS_TX; break; case eDB2_ET_QMI_DMS_RSP: case eDB2_ET_QMI_DMS_IND: pt = ePROTOCOL_QMI_DMS_RX; break; case eDB2_ET_QMI_NAS_REQ: pt = ePROTOCOL_QMI_NAS_TX; break; case eDB2_ET_QMI_NAS_RSP: case eDB2_ET_QMI_NAS_IND: pt = ePROTOCOL_QMI_NAS_RX; break; case eDB2_ET_QMI_QOS_REQ: pt = ePROTOCOL_QMI_QOS_TX; break; case eDB2_ET_QMI_QOS_RSP: case eDB2_ET_QMI_QOS_IND: pt = ePROTOCOL_QMI_QOS_RX; break; case eDB2_ET_QMI_WMS_REQ: pt = ePROTOCOL_QMI_WMS_TX; break; case eDB2_ET_QMI_WMS_RSP: case eDB2_ET_QMI_WMS_IND: pt = ePROTOCOL_QMI_WMS_RX; break; case eDB2_ET_QMI_PDS_REQ: pt = ePROTOCOL_QMI_PDS_TX; break; case eDB2_ET_QMI_PDS_RSP: case eDB2_ET_QMI_PDS_IND: pt = ePROTOCOL_QMI_PDS_RX; break; case eDB2_ET_QMI_AUTH_REQ: pt = ePROTOCOL_QMI_AUTH_TX; break; case eDB2_ET_QMI_AUTH_RSP: case eDB2_ET_QMI_AUTH_IND: pt = ePROTOCOL_QMI_AUTH_RX; break; case eDB2_ET_QMI_VOICE_REQ: pt = ePROTOCOL_QMI_VOICE_TX; break; case eDB2_ET_QMI_VOICE_RSP: case eDB2_ET_QMI_VOICE_IND: pt = ePROTOCOL_QMI_VOICE_RX; break; case eDB2_ET_QMI_CAT_REQ: pt = ePROTOCOL_QMI_CAT_TX; break; case eDB2_ET_QMI_CAT_RSP: case eDB2_ET_QMI_CAT_IND: pt = ePROTOCOL_QMI_CAT_RX; break; case eDB2_ET_QMI_RMS_REQ: pt = ePROTOCOL_QMI_RMS_TX; break; case eDB2_ET_QMI_RMS_RSP: case eDB2_ET_QMI_RMS_IND: pt = ePROTOCOL_QMI_RMS_RX; break; case eDB2_ET_QMI_OMA_REQ: pt = ePROTOCOL_QMI_OMA_TX; break; case eDB2_ET_QMI_OMA_RSP: case eDB2_ET_QMI_OMA_IND: pt = ePROTOCOL_QMI_OMA_RX; break; case eDB2_ET_QMI_CTL_REQ: pt = ePROTOCOL_QMI_CTL_TX; break; case eDB2_ET_QMI_CTL_RSP: case eDB2_ET_QMI_CTL_IND: pt = ePROTOCOL_QMI_CTL_RX; break; } return pt; } /*=========================================================================== METHOD: MapQMIProtocolTypeToEntityType (Public Free Method) DESCRIPTION: Map a buffer protocol type to a DB protocol entity type PARAMETERS: pt [ I ] - Protocol type bIndication [ I ] - Is this for an indication? RETURN VALUE: eDB2EntityType ===========================================================================*/ eDB2EntityType MapQMIProtocolTypeToEntityType( eProtocolType pt, bool bIndication ) { eDB2EntityType et = eDB2_ET_ENUM_BEGIN; switch (pt) { case ePROTOCOL_QMI_WDS_RX: if (bIndication == true) { et = eDB2_ET_QMI_WDS_IND; } else { et = eDB2_ET_QMI_WDS_RSP; } break; case ePROTOCOL_QMI_WDS_TX: et = eDB2_ET_QMI_WDS_REQ; break; case ePROTOCOL_QMI_DMS_RX: if (bIndication == true) { et = eDB2_ET_QMI_DMS_IND; } else { et = eDB2_ET_QMI_DMS_RSP; } break; case ePROTOCOL_QMI_DMS_TX: et = eDB2_ET_QMI_DMS_REQ; break; case ePROTOCOL_QMI_NAS_RX: if (bIndication == true) { et = eDB2_ET_QMI_NAS_IND; } else { et = eDB2_ET_QMI_NAS_RSP; } break; case ePROTOCOL_QMI_NAS_TX: et = eDB2_ET_QMI_NAS_REQ; break; case ePROTOCOL_QMI_QOS_RX: if (bIndication == true) { et = eDB2_ET_QMI_QOS_IND; } else { et = eDB2_ET_QMI_QOS_RSP; } break; case ePROTOCOL_QMI_QOS_TX: et = eDB2_ET_QMI_QOS_REQ; break; case ePROTOCOL_QMI_WMS_RX: if (bIndication == true) { et = eDB2_ET_QMI_WMS_IND; } else { et = eDB2_ET_QMI_WMS_RSP; } break; case ePROTOCOL_QMI_WMS_TX: et = eDB2_ET_QMI_WMS_REQ; break; case ePROTOCOL_QMI_PDS_RX: if (bIndication == true) { et = eDB2_ET_QMI_PDS_IND; } else { et = eDB2_ET_QMI_PDS_RSP; } break; case ePROTOCOL_QMI_PDS_TX: et = eDB2_ET_QMI_PDS_REQ; break; case ePROTOCOL_QMI_AUTH_RX: if (bIndication == true) { et = eDB2_ET_QMI_AUTH_IND; } else { et = eDB2_ET_QMI_AUTH_RSP; } break; case ePROTOCOL_QMI_AUTH_TX: et = eDB2_ET_QMI_AUTH_REQ; break; case ePROTOCOL_QMI_VOICE_RX: if (bIndication == true) { et = eDB2_ET_QMI_VOICE_IND; } else { et = eDB2_ET_QMI_VOICE_RSP; } break; case ePROTOCOL_QMI_VOICE_TX: et = eDB2_ET_QMI_VOICE_REQ; break; case ePROTOCOL_QMI_CAT_RX: if (bIndication == true) { et = eDB2_ET_QMI_CAT_IND; } else { et = eDB2_ET_QMI_CAT_RSP; } break; case ePROTOCOL_QMI_CAT_TX: et = eDB2_ET_QMI_CAT_REQ; break; case ePROTOCOL_QMI_RMS_RX: if (bIndication == true) { et = eDB2_ET_QMI_RMS_IND; } else { et = eDB2_ET_QMI_RMS_RSP; } break; case ePROTOCOL_QMI_RMS_TX: et = eDB2_ET_QMI_RMS_REQ; break; case ePROTOCOL_QMI_OMA_RX: if (bIndication == true) { et = eDB2_ET_QMI_OMA_IND; } else { et = eDB2_ET_QMI_OMA_RSP; } break; case ePROTOCOL_QMI_OMA_TX: et = eDB2_ET_QMI_OMA_REQ; break; case ePROTOCOL_QMI_CTL_RX: if (bIndication == true) { et = eDB2_ET_QMI_CTL_IND; } else { et = eDB2_ET_QMI_CTL_RSP; } break; case ePROTOCOL_QMI_CTL_TX: et = eDB2_ET_QMI_CTL_REQ; break; } return et; } /*=========================================================================== METHOD: DB2GetMaxBufferSize (Public Free Method) DESCRIPTION: Return the maximum size of a payload buffer for given type of protocol entity PARAMETERS: et [ I ] - Protocol entity type RETURN VALUE: ULONG - Maximum ===========================================================================*/ ULONG DB2GetMaxBufferSize( eDB2EntityType et ) { ULONG maxSzInBytes = MAX_SHARED_BUFFER_SIZE; if (IsQMIEntityType( et ) == true) { // QMI items are further constrained in size maxSzInBytes = QMI_MAX_BUFFER_SIZE; } return maxSzInBytes; } /*=========================================================================== METHOD: DB2BuildQMIBuffer (Internal Method) DESCRIPTION: Build and return an allocated shared buffer for the QMI protocol using the specified DB keys and payloads (one per TLV content) PARAMETERS: input [ I ] - Protocol entity key and payload RETURN VALUE: sSharedBuffer * (0 upon failure) ===========================================================================*/ sSharedBuffer * DB2BuildQMIBuffer( const std::vector & input ) { // Assume failure sSharedBuffer * pRef = 0; const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szTLVHdr = (ULONG)sizeof(sQMIRawContentHeader); // Need something to build ULONG tlvs = (ULONG)input.size(); if (tlvs == 0) { return pRef; } // The protocol entity keys need to be consistent const sDB2NavInput & tlvInput = input[0]; if (tlvInput.IsValid() == false || tlvInput.mKey.size() < 3) { return pRef; } eDB2EntityType et = (eDB2EntityType)tlvInput.mKey[0]; if (IsQMIEntityType( et ) == false) { return pRef; } ULONG szReq = szTransHdr + szMsgHdr + (tlvs * szTLVHdr); szReq += tlvInput.mPayloadLen; ULONG t = 0; for (t = 1; t < tlvs; t++) { const sDB2NavInput & tlv2Input = input[t]; if (tlv2Input.IsValid() == false || tlv2Input.mKey.size() < 3) { return pRef; } if ( (tlvInput.mKey[0] != tlv2Input.mKey[0]) || (tlvInput.mKey[1] != tlv2Input.mKey[1]) ) { return pRef; } szReq += tlv2Input.mPayloadLen; } // What we are building cannot be too large if (szReq > QMI_MAX_BUFFER_SIZE) { return pRef; } BYTE buf[QMI_MAX_BUFFER_SIZE]; sQMIRawContentHeader * pTLV = 0; pTLV = (sQMIRawContentHeader *)&buf[0]; for (t = 0; t < tlvs; t++) { const sDB2NavInput & tlv2Input = input[t]; pTLV->mTypeID = (BYTE)tlv2Input.mKey[2]; pTLV->mLength = (WORD)tlv2Input.mPayloadLen; pTLV++; const BYTE * pPayload = (const BYTE *)pTLV; memcpy( (LPVOID)pPayload, (LPCVOID)tlv2Input.mpPayload, (SIZE_T)tlv2Input.mPayloadLen ); pPayload += tlv2Input.mPayloadLen; pTLV = (sQMIRawContentHeader *)pPayload; } ULONG contentLen = szReq - szTransHdr - szMsgHdr; eQMIService st = MapQMIEntityTypeToQMIServiceType( et ); pRef = sQMIServiceBuffer::BuildBuffer( st, (WORD)tlvInput.mKey[1], IsQMIEntityResponseType( et ), IsQMIEntityIndicationType( et ), &buf[0], contentLen ); return pRef; } /*=========================================================================== METHOD: DB2PackQMIBuffer (Internal Method) DESCRIPTION: Build an allocated shared buffer for the QMI protocol PARAMETERS: db [ I ] - Database to use for packing input [ I ] - Protocol entity key and field values RETURN VALUE: sSharedBuffer * (0 upon failure) ===========================================================================*/ sSharedBuffer * DB2PackQMIBuffer( const cCoreDatabase & db, const std::vector & input ) { // Assume failure sSharedBuffer * pRef = 0; // Need something to build ULONG tlvs = (ULONG)input.size(); if (tlvs == 0) { return pRef; } // The protocol entity keys need to be consistent const sDB2PackingInput & tlvInput = input[0]; if (tlvInput.IsValid() == false || tlvInput.mKey.size() < 3) { return pRef; } eDB2EntityType et = (eDB2EntityType)tlvInput.mKey[0]; if (IsQMIEntityType( et ) == false) { return pRef; } ULONG t = 0; for (t = 1; t < tlvs; t++) { const sDB2PackingInput & tlv2Input = input[t]; if (tlv2Input.IsValid() == false || tlv2Input.mKey.size() < 3) { return pRef; } if ( (tlvInput.mKey[0] != tlv2Input.mKey[0]) || (tlvInput.mKey[1] != tlv2Input.mKey[1]) ) { return pRef; } } BYTE buf[QMI_MAX_BUFFER_SIZE]; ULONG bufLen = 0; sQMIRawContentHeader * pTLV = 0; pTLV = (sQMIRawContentHeader *)&buf[0]; bool bOK = true; for (t = 0; t < tlvs; t++) { ULONG packedLen = 0; const BYTE * pPackedData = 0; const sDB2PackingInput & tlv2Input = input[t]; if (tlv2Input.mbString == true) { if (tlv2Input.mValues.empty() == false) { // Convert field string to input fields std::list fields = cDataPacker::LoadValues( tlv2Input.mValues ); // Now pack cDataPacker dp( db, tlv2Input.mKey, fields ); bOK = dp.Pack(); if (bOK == false) { break; } pPackedData = dp.GetBuffer( packedLen ); if (pPackedData == 0) { bOK = false; break; } } } else { packedLen = tlv2Input.mDataLen; pPackedData = tlv2Input.mpData; } // Check if we need to adjust buffer cProtocolEntityFieldEnumerator pefe( db, tlv2Input.mKey ); bool bEnum = pefe.Enumerate(); if (bEnum == true) { const std::vector & fieldIDs = pefe.GetFields(); ULONG fieldCount = (ULONG)fieldIDs.size(); if (fieldCount == 1) { const tDB2FieldMap & dbFields = db.GetProtocolFields(); tDB2FieldMap::const_iterator pField = dbFields.find( fieldIDs[0] ); if (pField != dbFields.end()) { const sDB2Field & theField = pField->second; if ( (theField.mType == eDB2_FIELD_STD) && (theField.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_ANT) ) { // For QMI we need to strip out the trailing NULL // string terminator when the TLV consists solely // of a string since the length contained in the // TLV structure itself renders the trailing NULL // redundant if (packedLen > 2) { packedLen--; } else { // This is the only way to specify an empty string in QMI // when the TLV consists solely of a string if (packedLen == 1) { packedLen--; } } } } } } if (bufLen + (ULONG)sizeof(sQMIRawContentHeader) < bufLen) { bOK = false; break; } bufLen += (ULONG)sizeof(sQMIRawContentHeader); if (bufLen + packedLen < bufLen) { bOK = false; break; } bufLen += packedLen; // What we are building cannot be too large if (bufLen > QMI_MAX_BUFFER_SIZE) { bOK = false; break; } pTLV->mTypeID = (BYTE)tlv2Input.mKey[2]; pTLV->mLength = (WORD)packedLen; pTLV++; const BYTE * pPayload = (const BYTE *)pTLV; memcpy( (LPVOID)pPayload, (LPCVOID)pPackedData, (SIZE_T)packedLen ); pPayload += packedLen; pTLV = (sQMIRawContentHeader *)pPayload; } if (bOK == false) { return pRef; } eQMIService st = MapQMIEntityTypeToQMIServiceType( et ); pRef = sQMIServiceBuffer::BuildBuffer( st, (WORD)tlvInput.mKey[1], IsQMIEntityResponseType( et ), IsQMIEntityIndicationType( et ), &buf[0], bufLen ); return pRef; } /*=========================================================================== METHOD: DB2ReduceQMIBuffer (Public Free Method) DESCRIPTION: Reduce a DIAG buffer to a DB key and payload PARAMETERS: buf [ I ] - Protocol buffer being reduced RETURN VALUE: sDB2NavInput (invalid upon failure) ===========================================================================*/ std::vector DB2ReduceQMIBuffer( const sProtocolBuffer & buf ) { std::vector retInput; // We must have a valid protocol buffer if (buf.IsValid() == false) { return retInput; } eProtocolType pt = (eProtocolType)buf.GetType(); if (IsQMIProtocol( pt ) != true) { return retInput; } sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); std::map tlvs = qmiBuf.GetContents(); bool bErr = false; std::map ::const_iterator pIter; for (pIter = tlvs.begin(); pIter != tlvs.end(); pIter++) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr == 0) { bErr = true; break; } bool bIndication = qmiBuf.IsIndication(); eProtocolType pt = (eProtocolType)qmiBuf.GetType(); eDB2EntityType et = MapQMIProtocolTypeToEntityType( pt, bIndication ); sDB2NavInput tmp; tmp.mKey.push_back( (ULONG)et ); tmp.mKey.push_back( qmiBuf.GetMessageID() ); tmp.mKey.push_back( (ULONG)pHdr->mTypeID ); tmp.mPayloadLen = pHdr->mLength; pHdr++; tmp.mpPayload = (const BYTE *)pHdr; if (tmp.IsValid() == true) { retInput.push_back( tmp ); } else { // Ignore empty TLVs if (tmp.mPayloadLen != 0) { bErr = true; break; } } } if (bErr == true) { retInput.clear(); } return retInput; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DB2Utilities.h000077500000000000000000000202731455567757300237120ustar00rootroot00000000000000/*=========================================================================== FILE: DB2Utilities.h DESCRIPTION: Utility functions for packing/parsing protocol entities using the database PUBLIC ENUMERATIONS AND METHODS: sProtocolEntityKey sDB2PackingInput sDB2NavInput MapQMIEntityTypeToProtocolType MapQMIEntityTypeToQMIServiceType MapQMIProtocolTypeToEntityType DB2GetMaxBufferSize DB2BuildQMIBuffer DB2PackQMIBuffer DB2ReduceQMIBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include "SharedBuffer.h" #include "ProtocolBuffer.h" #include "QMIEnum.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Struct sProtocolEntityKey // Simple structure to initializing protocol entity keys easier /*=========================================================================*/ struct sProtocolEntityKey { public: // (Inline) Constructor - default sProtocolEntityKey() { }; // (Inline) Constructor - single value keys sProtocolEntityKey( ULONG val1 ) { mKey.push_back( val1 ); }; // (Inline) Constructor - two value keys sProtocolEntityKey( ULONG val1, ULONG val2 ) { mKey.push_back( val1 ); mKey.push_back( val2 ); }; // (Inline) Constructor - three value keys sProtocolEntityKey( ULONG val1, ULONG val2, ULONG val3 ) { mKey.push_back( val1 ); mKey.push_back( val2 ); mKey.push_back( val3 ); }; // (Inline) Constructor - psuedo-copy constructor sProtocolEntityKey( const std::vector & key ) : mKey( key ) { }; // (Inline) Constructor - copy constructor sProtocolEntityKey( const sProtocolEntityKey & key ) : mKey( key.mKey ) { }; // (Inline) Assignment operator sProtocolEntityKey & operator = ( const sProtocolEntityKey & key ) { mKey = key.mKey; return *this; }; // Cast operator to a protocol entity key operator std::vector () const { return mKey; }; /* Underlying key */ std::vector mKey; }; /*=========================================================================*/ // Struct sDB2PackingInput // Simple structure to make dealing packing easier /*=========================================================================*/ struct sDB2PackingInput { public: // (Inline) Constructor - default sDB2PackingInput() : mpData( 0 ), mDataLen( 0 ), mbString( true ) { }; // (Inline) Constructor - parameterized (string payload) sDB2PackingInput( const sProtocolEntityKey & key, LPCSTR pValue ) : mKey( key ), mpData( 0 ), mDataLen( 0 ), mbString( true ) { if (pValue != 0 && pValue[0] != 0) { mValues = pValue; } }; // (Inline) Constructor - parameterized (buffer payload) sDB2PackingInput( const sProtocolEntityKey & key, const BYTE * pData, ULONG dataLen ) : mKey( key ), mpData( pData ), mDataLen( dataLen ), mbString( false ) { // Nothing to do }; // (Inline) Is this object in a valid state? bool IsValid() const { // We need a key if (mKey.size() <= 0) { return false; } return true; }; /* Underlying key */ std::vector mKey; /* Are the values specified by a string? */ bool mbString; /* String of space delimited field values */ std::string mValues; /* Buffer containing pre-formatted fields */ const BYTE * mpData; /* Length of above buffer */ ULONG mDataLen; }; /*=========================================================================*/ // Struct sDB2NavInput // Simple structure to make dealing with key/payload easier /*=========================================================================*/ struct sDB2NavInput { public: // (Inline) Constructor - default sDB2NavInput() : mpPayload( 0 ), mPayloadLen( 0 ) { }; // (Inline) Constructor - parameterized sDB2NavInput( const std::vector & key, const BYTE * pData, ULONG dataLen ) : mKey( key ), mpPayload( pData ), mPayloadLen( dataLen ) { }; // (Inline) Is this object in a valid state? bool IsValid() const { return (mKey.size() > 0 && mpPayload != 0 && mPayloadLen > 0); }; /* Database key for payload entity */ std::vector mKey; /* Payload */ const BYTE * mpPayload; /* Size of above payload */ ULONG mPayloadLen; }; // Map a DB protocol entity type to a buffer protocol type eProtocolType MapQMIEntityTypeToProtocolType( eDB2EntityType et ); // Map a DB protocol entity type to a QMI service type eQMIService MapQMIEntityTypeToQMIServiceType( eDB2EntityType et ); // Map a buffer protocol type to a DB protocol entity type eDB2EntityType MapQMIProtocolTypeToEntityType( eProtocolType pt, bool bIndication = false ); // Return the maximum size of a payload buffer for given type of // protocol entity ULONG DB2GetMaxBufferSize( eDB2EntityType et ); // Build an allocated shared buffer for the QMI protocol sSharedBuffer * DB2BuildQMIBuffer( const std::vector & input ); // Build an allocated shared buffer for the QMI protocol sSharedBuffer * DB2PackQMIBuffer( const cCoreDatabase & db, const std::vector & input ); // Reduce a QMI buffer to DB keys and payload std::vector DB2ReduceQMIBuffer( const sProtocolBuffer & buf ); libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DataPacker.cpp000077500000000000000000000554651455567757300240140ustar00rootroot00000000000000/*=========================================================================== FILE: DataPacker.cpp DESCRIPTION: Implementation of sUnpackedField and cDataPacker PUBLIC CLASSES AND METHODS: sUnpackedField Structure to represent a single unpacked (input) field - i.e. the field value as a string and an optional field name (either fully qualified) or partial cDataPacker Class to pack bit/byte specified fields into a buffer accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DataPacker.h" #include "CoreDatabase.h" #include "DB2Utilities.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cDataPacker Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDataPacker (Public Method) DESCRIPTION: Constructor PARAMETERS: db [ I ] - Database to use key [ I ] - Key into protocol entity table fields [ I ] - Fields to pack into buffer RETURN VALUE: None ===========================================================================*/ cDataPacker::cDataPacker( const cCoreDatabase & db, const std::vector & key, const std::list & fields ) : cProtocolEntityNav( db ), mKey( key ), mbValuesOnly( true ), mProcessedFields( 0 ), mbPacked( false ) { // Initialize internal buffer memset( &mBuffer[0], 0, (SIZE_T)MAX_SHARED_BUFFER_SIZE ); // Compute bits left in buffer ULONG bits = MAX_SHARED_BUFFER_SIZE * BITS_PER_BYTE; if (mKey.size() > 0) { eDB2EntityType et = (eDB2EntityType)mKey[0]; bits = DB2GetMaxBufferSize( et ) * BITS_PER_BYTE; } // Setup the bit packer mBitsy.SetData( mBuffer, bits ); // Copy fields/set value only flag std::list ::const_iterator pIter = fields.begin(); while (pIter != fields.end()) { if (pIter->mName.size() > 0) { mbValuesOnly = false; } mFields.push_back( *pIter ); pIter++; } } /*=========================================================================== METHOD: ~cDataPacker (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDataPacker::~cDataPacker() { // Ask bit packer to release data mBitsy.ReleaseData(); } /*=========================================================================== METHOD: Pack (Public Method) DESCRIPTION: Pack the buffer RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::Pack() { // Process (pack) the protocol entity if (mbPacked == false) { mbPacked = ProcessEntity( mKey ); if (mbPacked == false) { // Failed due to no structure ID? if (mEntity.IsValid() == true && mEntity.mStructID == -1) { // Yes, for us that means instant success (no payload to pack) mbPacked = true; } } } return mbPacked; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Get packed buffer contents PARAMETERS: bufferLen [ O ] - Length of packed buffer (in bytes) RETURN VALUE: const BYTE * - Packed buffer (0 upon error) ===========================================================================*/ const BYTE * cDataPacker::GetBuffer( ULONG & bufferLen ) { if (mbPacked == false) { bufferLen = 0; return 0; } // Payload size in bytes bufferLen = mBitsy.GetTotalBitsWritten() + BITS_PER_BYTE - 1; bufferLen /= BITS_PER_BYTE; // Payload is our buffer const BYTE * pBuffer = 0; if (bufferLen > 0) { pBuffer = (const BYTE *)&mBuffer[0]; } return pBuffer; } /*=========================================================================== METHOD: LoadValues (Static Public Method) DESCRIPTION: Load values by parsing a 'summary' string of values, an example of which would be: 0 1 100 "Foo Foo Foo" 15 -1 PARAMETERS: vals [ I ] - Value string RETURN VALUE: std::list ===========================================================================*/ std::list cDataPacker::LoadValues( const std::string & vals ) { std::list retList; if (vals.size() <= 0) { return retList; } std::vector tokens; ParseCommandLine( vals, tokens ); std::string name = ""; std::string val = ""; std::vector ::const_iterator pIter = tokens.begin(); while (pIter != tokens.end()) { val = *pIter++; sUnpackedField entry( name, val ); retList.push_back( entry ); } return retList; } /*=========================================================================== METHOD: LoadValues (Static Public Method) DESCRIPTION: Load values by parsing a vector of string values, an example of which would be: [0] 0 [1] 1 [2] 100 [3] "Foo Foo Foo" [4] 15 [5] -1 PARAMETERS: vals [ I ] - Vector of values startIndex [ I ] - Where in above vector values start RETURN VALUE: std::list ===========================================================================*/ std::list cDataPacker::LoadValues( std::vector & vals, ULONG startIndex ) { std::list retList; ULONG sz = (ULONG)vals.size(); if (startIndex >= sz) { return retList; } std::string name = ""; std::string val = ""; for (ULONG v = startIndex; v < sz; v++) { val = vals[v]; sUnpackedField entry( name, val ); retList.push_back( entry ); } return retList; } /*=========================================================================== METHOD: GetLastValue (Internal Method) DESCRIPTION: Working from the back of the current value list find and return the value for the specified field ID as a LONGLONG (field type must have been able to fit in a LONGLONG for a value to be stored in value list and thus returned) PARAMETERS: fieldID [ I ] - Field ID we are looking for val [ O ] - The value RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::GetLastValue( ULONG fieldID, LONGLONG & val ) { // Assume failure bool bRC = false; std::list < std::pair >::reverse_iterator pValues; pValues = mValues.rbegin(); while (pValues != mValues.rend()) { std::pair & entry = *pValues; if (entry.first == fieldID) { val = entry.second; // Success! bRC = true; break; } pValues++; } return bRC; } /*=========================================================================== METHOD: GetValueString (Internal Method) DESCRIPTION: For the given field return the (input) value string PARAMETERS: field [ I ] - The field being processed fieldName [ I ] - Partial (or fully qualified) field name pValueString [ O ] - Value string RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::GetValueString( const sDB2Field & field, const std::string & fieldName, LPCSTR & pValueString ) { // Assume failure pValueString = 0; // Create fully qualified field name std::string fullName = GetFullFieldName( fieldName ); std::vector ::const_iterator pVals = mFields.begin(); while (pVals != mFields.end()) { const std::string & inName = pVals->mName; if (fieldName == inName || fullName == inName) { pValueString = (LPCSTR)pVals->mValueString.c_str(); break; } pVals++; } // Value provided? if (pValueString == 0) { // No, are we in value only mode? if (mbValuesOnly == true) { if (mProcessedFields < (ULONG)mFields.size()) { sUnpackedField & upf = mFields[mProcessedFields++]; // Set field name (partial) upf.mName = fieldName; // Grab field value pValueString = (LPCSTR)upf.mValueString.c_str(); } } else { return false; } } // Value provided? if (pValueString == 0) { return false; } // Meaningful value provided? if (pValueString[0] == 0) { // No value provided for field? Is it a string? if (field.mType == eDB2_FIELD_STD) { if ( (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_A) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_U) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_U8) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_ANT) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_UNT) && (field.mTypeVal != eDB2_FIELD_STDTYPE_STRING_U8NT) ) { // No, unable to proceed return false; } } } return true; } /*=========================================================================== METHOD: PackString (Internal Method) DESCRIPTION: Pack the string (described by the given arguments) into the buffer PARAMETERS: numChars [ I ] - Number of characters to pack (0 = NULL terminated) pStr [ I ] - String to pack RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::PackString( ULONG numChars, LPCSTR pStr ) { // Sanity check string pointer if (pStr == 0) { return false; } // Assume success bool bOK = true; // Convert native string type to desired output type const BYTE * pTmp = (const BYTE *)pStr; // Have we reached the practical end of a fixed length string? ULONG numBytes = 0; numBytes = (ULONG)strlen( (LPCSTR)pTmp ); if (numChars == 0) { // We pack the string plus the NULL character numChars = (ULONG)strlen( (LPCSTR)pTmp ) + 1; } // String size too long? if (numBytes > numChars) { return false; } // Pack the string one byte at a time for (ULONG c = 0; c < numChars; c++) { BYTE val = 0; if (c < numBytes) { val = pTmp[c]; } DWORD rc = mBitsy.Set( BITS_PER_BYTE, val ); if (rc != NO_ERROR) { bOK = false; break; } } return bOK; } /*=========================================================================== METHOD: ProcessField (Internal Method) DESCRIPTION: Process the given field (described by the given arguments) by packing the value into the buffer PARAMETERS: pField [ I ] - The field being processed fieldName [ I ] - Field name (partial) arrayIndex [ I ] - Not used RETURN VALUE: bool ===========================================================================*/ bool cDataPacker::ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG /* arrayIndex */ ) { // Assume failure bool bOK = false; if (pField == 0) { return bOK; } // Find given value for field LPCSTR pVal = 0; bool bVal = GetValueString( *pField, fieldName, pVal ); if (bVal == false) { return bOK; } // Grab field ID ULONG id = pField->mID; // What type is this field? switch (pField->mType) { case eDB2_FIELD_STD: { // Standard field, what kind? eDB2StdFieldType ft = (eDB2StdFieldType)pField->mTypeVal; switch (ft) { // Field is a boolean (0/1, false/true)/8-bit unsigned integer case eDB2_FIELD_STDTYPE_BOOL: case eDB2_FIELD_STDTYPE_UINT8: { // We pack as a UCHAR UCHAR val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { if (ft == eDB2_FIELD_STDTYPE_BOOL && val > 1) { val = 1; } DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 8-bit signed integer case eDB2_FIELD_STDTYPE_INT8: { // We pack as a CHAR CHAR val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 16-bit signed integer case eDB2_FIELD_STDTYPE_INT16: { // We pack as a SHORT SHORT val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 16-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT16: { // We pack as a USHORT USHORT val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 32-bit signed integer case eDB2_FIELD_STDTYPE_INT32: { // We pack as a LONG LONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 32-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT32: { // We pack as a ULONG ULONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 64-bit signed integer case eDB2_FIELD_STDTYPE_INT64: { // We pack as a LONGLONG LONGLONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, val ); mValues.push_back( entry ); bOK = true; } } } break; // Field is 64-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT64: { // We pack as a ULONGLONG ULONGLONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! if (val <= LLONG_MAX) { std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); } bOK = true; } } } break; // ANSI/UNICODE strings case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U: case eDB2_FIELD_STDTYPE_STRING_ANT: case eDB2_FIELD_STDTYPE_STRING_UNT: { // Set the character size ULONG charSz = sizeof(CHAR); if ( (ft == eDB2_FIELD_STDTYPE_STRING_U) || (ft == eDB2_FIELD_STDTYPE_STRING_UNT) ) { charSz = sizeof(USHORT); } // Compute the number of characters? ULONG numChars = 0; if ( (ft == eDB2_FIELD_STDTYPE_STRING_A) || (ft == eDB2_FIELD_STDTYPE_STRING_U) ) { numChars = (pField->mSize / BITS_PER_BYTE) / charSz; } // Pack the string bOK = PackString( numChars, pVal ); } break; // UTF-8 strings case eDB2_FIELD_STDTYPE_STRING_U8: case eDB2_FIELD_STDTYPE_STRING_U8NT: { // Unsupported in the Linux adaptation bOK = false; } break; // Field is 32-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT32: { // We pack as a ULONG FLOAT val = (float)atof( (LPCSTR)pVal ); ULONG * pTmp = (ULONG *)&val; DWORD rc = mBitsy.Set( pField->mSize, *pTmp ); if (rc == NO_ERROR) { // Success! bOK = true; } } break; // Field is 64-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT64: { // We pack as a ULONGLONG double val = atof( (LPCSTR)pVal ); ULONGLONG * pTmp = (ULONGLONG *)&val; DWORD rc = mBitsy.Set( pField->mSize, *pTmp ); if (rc == NO_ERROR) { // Success! bOK = true; } } break; default: { bOK = false; } break; } } break; case eDB2_FIELD_ENUM_UNSIGNED: { // We pack as a ULONG ULONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; case eDB2_FIELD_ENUM_SIGNED: { // We pack as a LONG LONG val = 0; bool bVal = ::FromString( pVal, val ); if (bVal == true) { DWORD rc = mBitsy.Set( pField->mSize, val ); if (rc == NO_ERROR) { // Success! std::pair entry( id, (LONGLONG)val ); mValues.push_back( entry ); bOK = true; } } } break; default: { bOK = false; } break; } return bOK; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DataPacker.h000077500000000000000000000161731455567757300234520ustar00rootroot00000000000000/*=========================================================================== FILE: DataPacker.h DESCRIPTION: Declaration of sUnpackedField and cDataPacker PUBLIC CLASSES AND METHODS: sUnpackedField Structure to represent a single unpacked (input) field - i.e. the field value as a string and an optional field name (either fully qualified) or partial cDataPacker Class to pack bit/byte specified fields into a buffer accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include "CoreUtilities.h" #include "BitPacker.h" #include "SharedBuffer.h" #include "ProtocolEntityNav.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Struct sUnpackedField // // Structure to represent an unpacked (input) field /*=========================================================================*/ struct sUnpackedField { public: // (Inline) Constructor - default sUnpackedField() : mName( "" ), mValueString( "" ) { }; // (Inline) Constructor - parameterized sUnpackedField( const std::string & name, const std::string & valueStr ) : mName( name ), mValueString( valueStr ) { }; /* Field value as a string */ std::string mValueString; /* Name of field */ std::string mName; }; /*=========================================================================*/ // Class cDataPacker // Class to pack bit/byte specified fields into a buffer /*=========================================================================*/ class cDataPacker : public cProtocolEntityNav { public: // Constructor cDataPacker( const cCoreDatabase & db, const std::vector & key, const std::list & fields ); // Destructor virtual ~cDataPacker(); // Pack the buffer virtual bool Pack(); // Get packed buffer contents const BYTE * GetBuffer( ULONG & bufferLen ); // Return the results of packing as an allocated shared buffer sSharedBuffer * GetDiagBuffer( bool bNVRead ); // Load values by parsing a 'summary' string of values static std::list LoadValues( const std::string & vals ); // Load values by parsing a vector of string values static std::list LoadValues( std::vector & vals, ULONG startIndex ); protected: // Working from the back of the current value list find // and return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG fieldID, LONGLONG & val ); // For the given field return the (input) value string virtual bool GetValueString( const sDB2Field & field, const std::string & fieldName, LPCSTR & pValueString ); // Pack the string (described by the given arguments) into the buffer virtual bool PackString( ULONG numChars, LPCSTR pStr ); // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG arrayIndex = -1 ); // (Inline) Get current working offset virtual ULONG GetOffset() { return mBitsy.GetNumBitsWritten(); }; // (Inline) Set current working offset virtual bool SetOffset( ULONG offset ) { mBitsy.SetOffset( offset ); return true; }; // (Inline) Get current navigation order virtual bool GetLSBMode() { return mBitsy.GetLSBMode(); }; // (Inline) Set current navigation order virtual bool SetLSBMode( bool bLSB ) { // Assume success bool bOK = true; if (bLSB != GetLSBMode()) { if ((GetOffset() % BITS_PER_BYTE) != 0) { // We need to be on a byte boundary bOK = false; } else { mBitsy.SetLSBMode( bLSB ); } } return bOK; }; /* Entity key */ std::vector mKey; /* The underlying bit packer */ cBitPacker mBitsy; /* The vector of fields */ std::vector mFields; /* Are we operating in value only mode, i.e. no field names given? */ bool mbValuesOnly; ULONG mProcessedFields; /* Raw field values associated with field ID */ std::list < std::pair > mValues; /* Internal working buffer */ BYTE mBuffer[MAX_SHARED_BUFFER_SIZE]; /* Did we successfully pack the buffer? */ bool mbPacked; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DataParser.cpp000077500000000000000000000777141455567757300240440ustar00rootroot00000000000000/*=========================================================================== FILE: DataParser.cpp DESCRIPTION: Implementation of sParsedField and cDataParser PUBLIC CLASSES AND METHODS: sParsedField Structure to represent a single parsed field (field ID, offset, size, value, name, etc.) cDataParser Class to parse a buffer into bit/byte specified fields accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "DataParser.h" #include "CoreDatabase.h" #include "DB2Utilities.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sParsedField Methods /*=========================================================================*/ /*=========================================================================== METHOD: sParsedField (Public Method) DESCRIPTION: Construct a parsed field by setting the values and extracting the data according to the definition PARAMETERS: db [ I ] - Database to use field [ I ] - Field description (from database) name [ I ] - Desired field name bp [I/O] - Bit parser to use bGenStrings [ I ] - Generate field value strings? NOTE: 'bGenStrings' does not apply to fields that are string types? RETURN VALUE: None ===========================================================================*/ sParsedField::sParsedField( const cCoreDatabase & db, const sDB2Field * pField, const std::string & name, cBitParser & bp, bool bGenStrings ) : mField(), mOffset( bp.GetNumBitsParsed() ), mValueString( "" ), mName( name ), mbValid( false ) { // Clear value memset( (PVOID)&mValue, 0, (SIZE_T)sizeof( mValue ) ); // Assume failure bool bOK = false; if (pField == 0) { return; } mField = *pField; char tempValueString[128]; memset( &tempValueString[0], 0, 128 ); // What type is this field? switch (mField.mType) { case eDB2_FIELD_STD: { // Standard field, what kind? eDB2StdFieldType ft = (eDB2StdFieldType)mField.mTypeVal; switch (ft) { // Field is a boolean (0/1, false/true)/8-bit unsigned integer case eDB2_FIELD_STDTYPE_BOOL: case eDB2_FIELD_STDTYPE_UINT8: { // We store as a UCHAR UCHAR val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Constrain boolean values? if (ft == eDB2_FIELD_STDTYPE_BOOL && val > 1) { val = 1; } // Success! mValue.mU8 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%02X", (UINT)mValue.mU8 ); } else { snprintf( &tempValueString[0], 0, "%u", (UINT)mValue.mU8 ); } mValueString = &tempValueString[0]; } } } break; // Field is 8-bit signed integer case eDB2_FIELD_STDTYPE_INT8: { // We store as a CHAR CHAR val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS8 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%02X", (UINT)mValue.mU8 ); } else { snprintf( &tempValueString[0], 0, "%d", (INT)mValue.mS8 ); } mValueString = &tempValueString[0]; } } } break; // Field is 16-bit signed integer case eDB2_FIELD_STDTYPE_INT16: { // We store as a SHORT SHORT val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS16 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%04hX", mValue.mU16 ); } else { snprintf( &tempValueString[0], 0, "%hd", mValue.mS16 ); } mValueString = &tempValueString[0]; } } } break; // Field is 16-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT16: { // We store as a USHORT USHORT val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU16 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%04hX", mValue.mU16 ); } else { snprintf( &tempValueString[0], 0, "%hu", mValue.mU16 ); } mValueString = &tempValueString[0]; } } } break; // Field is 32-bit signed integer case eDB2_FIELD_STDTYPE_INT32: { // We store as a LONG LONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS32 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%08lX", mValue.mU32 ); } else { snprintf( &tempValueString[0], 0, "%ld", mValue.mS32 ); } mValueString = &tempValueString[0]; } } } break; // Field is 32-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT32: { // We store as a ULONG ULONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU32 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%08lX", mValue.mU32 ); } else { snprintf( &tempValueString[0], 0, "%lu", mValue.mU32 ); } mValueString = &tempValueString[0]; } } } break; // Field is 64-bit signed integer case eDB2_FIELD_STDTYPE_INT64: { // We store as a LONGLONG LONGLONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS64 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%016llX", mValue.mU64 ); } else { snprintf( &tempValueString[0], 0, "%lld", mValue.mS64 ); } mValueString = &tempValueString[0]; } } } break; // Field is 64-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT64: { // We store as a ULONGLONG ULONGLONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU64 = val; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%016llX", mValue.mU64 ); } else { snprintf( &tempValueString[0], 0, "%llu", mValue.mU64 ); } mValueString = &tempValueString[0]; } } } break; // ANSI/UNICODE fixed length string case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U: { // Compute the number of characters ULONG numChars = mField.mSize / BITS_PER_BYTE; // Parse out the string bOK = ParseString( numChars, bp ); } break; // ANSI NULL terminated string case eDB2_FIELD_STDTYPE_STRING_ANT: { // Figure out the length of the string ULONG numChars = 0; // Temporarily assume success bOK = true; ULONG tmpOffset = bp.GetNumBitsParsed(); CHAR val = 1; while (val != 0) { DWORD rc = bp.Get( BITS_PER_BYTE, val ); if (rc == NO_ERROR) { numChars++; } else { val = 0; } } // Now actually parse/load the string if (bOK == true) { bp.SetOffset( tmpOffset ); bOK = ParseString( numChars, bp ); } } break; // UNICODE NULL terminated string case eDB2_FIELD_STDTYPE_STRING_UNT: { // Figure out the length of the string ULONG numChars = 0; // Temporarily assume success bOK = true; ULONG tmpOffset = bp.GetNumBitsParsed(); USHORT val = 1; while (val != 0) { DWORD rc = bp.Get( BITS_PER_BYTE, val ); if (rc == NO_ERROR) { numChars++; } else { val = 0; } } // Now actually parse/load the string if (bOK == true) { bp.SetOffset( tmpOffset ); bOK = ParseString( numChars, bp ); } } break; case eDB2_FIELD_STDTYPE_STRING_U8: case eDB2_FIELD_STDTYPE_STRING_U8NT: // Unsupported in the Linux adaptation bOK = false; break; // Field is 32-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT32: { // We store as a ULONG ULONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { FLOAT * pFloat = (FLOAT *)&val; // Success! mValue.mFP32 = *pFloat; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%04lX", mValue.mU32 ); } else { snprintf( &tempValueString[0], 0, "%f", mValue.mFP32 ); } mValueString = &tempValueString[0]; } } } break; // Field is 64-bit floating point value case eDB2_FIELD_STDTYPE_FLOAT64: { // We store as a ULONGLONG ULONGLONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { DOUBLE * pFloat = (DOUBLE *)&val; // Success! mValue.mFP64 = *pFloat; bOK = true; if (bGenStrings == true) { if (mField.mbHex == true) { snprintf( &tempValueString[0], 0, "0x%08llX", mValue.mU64 ); } else { snprintf( &tempValueString[0], 0, "%f", mValue.mFP64 ); } mValueString = &tempValueString[0]; } } } break; } } break; // Unsigend enum value case eDB2_FIELD_ENUM_UNSIGNED: { // We store as a ULONG ULONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mU32 = val; bOK = true; // Grab the enum ID ULONG id = pField->mTypeVal; // Map to a string? if (bGenStrings == true) { mValueString = db.MapEnumToString( id, (int)mValue.mU32, true, mField.mbHex ); } } } break; // Signed enum value case eDB2_FIELD_ENUM_SIGNED: { // We store as a LONG LONG val; DWORD rc = bp.Get( mField.mSize, val ); if (rc == NO_ERROR) { // Success! mValue.mS32 = val; bOK = true; // Grab the enum ID ULONG id = pField->mTypeVal; // Map to a string? if (bGenStrings == true) { mValueString = db.MapEnumToString( id, (int)mValue.mS32, true, mField.mbHex ); } } } break; } mbValid = bOK; } /*=========================================================================== METHOD: ParseString (Public Method) DESCRIPTION: Convert the field value to a string PARAMETERS: numChars [ I ] - Number of characters to parse/load bp [I/O] - Bit parser to use RETURN VALUE: bool ===========================================================================*/ bool sParsedField::ParseString( ULONG numChars, cBitParser & bp ) { // Validate size (including '\0') if (MAX_SHARED_BUFFER_SIZE < numChars + 1) { return false; } // Assume success bool bRC = true; // Store current offset so we can update field length ULONG curOffset = bp.GetNumBitsParsed(); // Load each byte of the string individually BYTE buf[MAX_SHARED_BUFFER_SIZE]; for (ULONG c = 0; c < numChars; c++) { BYTE val = 0; DWORD rc = bp.Get( BITS_PER_BYTE, val ); if (rc == NO_ERROR) { buf[c] = val; } else { bRC = false; break; } } if (bRC == true) { // Write zeros to the rest of the buffer ULONG size = numChars; ULONG end = numChars + 1; for (ULONG current = size; current < end; current++) { buf[current] = 0; } mValueString = (LPCSTR)&buf[0]; mValue.mpAStr = (LPCSTR)mValueString.c_str(); // Update field size mField.mSize = bp.GetNumBitsParsed() - curOffset; } return bRC; } /*=========================================================================*/ // cParsedFieldNavigator Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetFieldIndex (Public Method) DESCRIPTION: Get index of the (first) field that matches the given field ID PARAMETERS: fieldID [ I ] - Field ID to look for bLoop [ I ] - Loop around end of field list? RETURN VALUE: ULONG - Index of the field (0xFFFFFFFF upon failure) ===========================================================================*/ ULONG cParsedFieldNavigator::GetFieldIndex( ULONG fieldID, bool bLoop ) const { ULONG id = ULONG_MAX; ULONG count = (ULONG)mFields.size(); // Start from last field ID? ULONG fp = 0; ULONG fi = 0; if (mLastIDIndex < count) { fi = mLastIDIndex; } else if (mLastIDIndex != ULONG_MAX && bLoop == false) { // Beyond end of fields with no looping mLastIDIndex = id; return id; } for (fp = 0; fp < count; fp++) { if (mFields[fi].mField.mID == fieldID) { id = fi; break; } fi++; if (fi == count) { if (bLoop == true) { fi = 0; } else { break; } } } // Update last ID accordingly (0xFFFFFFFF upon failure), and return mLastIDIndex = id; if (mLastIDIndex != ULONG_MAX) { mLastIDIndex++; if (mLastIDIndex == count) { mLastIDIndex = 0; } } return id; } /*=========================================================================*/ // cDataParser Methods /*=========================================================================*/ /*=========================================================================== METHOD: cDataParser (Public Method) DESCRIPTION: Constructor (protocol buffer, entity key, and payload) PARAMETERS: db [ I ] - Database to use buffer [ I ] - The protocol buffer being parsed key [ I ] - Protocol entity key pData [ I ] - Payload from above protocol buffer dataLen [ I ] - Size of above payload RETURN VALUE: None ===========================================================================*/ cDataParser::cDataParser( const cCoreDatabase & db, const sProtocolBuffer & buffer, const std::vector & key, const BYTE * pData, ULONG dataLen ) : cProtocolEntityNav( db ), mBuffer( buffer.GetSharedBuffer() ), mbFieldStrings( true ), mbParsed( false ) { // We must have a valid protocol buffer if (mBuffer.IsValid() == false) { return; } // We need something to parse if (pData == 0 || dataLen == 0) { return; } // Key has to be proper if (key.size() < 1) { return; } // Key needs to match protocol eProtocolType pt = (eProtocolType)mBuffer.GetType(); eDB2EntityType et = (eDB2EntityType)key[0]; if (pt == ePROTOCOL_DIAG_RX || pt == ePROTOCOL_DIAG_TX) { if (IsDiagEntityType( et ) == false) { return; } } else if (IsQMIProtocol( pt ) == true) { if (IsQMIEntityType( et ) == false) { return; } } // Pass data to the bit parser mKey = key; mBitsy.SetData( pData, dataLen * BITS_PER_BYTE ); } /*=========================================================================== METHOD: ~cDataParser (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cDataParser::~cDataParser() { // Ask bit parser to release data mBitsy.ReleaseData(); // Empty fields mFields.clear(); } /*=========================================================================== METHOD: Parse (Public Method) DESCRIPTION: Parse the data to a list of fields/summary text PARAMETERS: bFieldStrings [ I ] - Generate string representations of field values? bFieldNames [ I ] - Generate (partial) field names? RETURN VALUE: bool ===========================================================================*/ bool cDataParser::Parse( bool bFieldStrings, bool bFieldNames ) { // Store parsing options mbFieldStrings = bFieldStrings; mbFieldNames = bFieldNames; if (mbParsed == false) { // Allocate space for 1024 fields up front in order to increase // performance when parsing and accessing parsed fields mFields.reserve( 1024 ); // Process (parse) the protocol entity mbParsed = ProcessEntity( mKey ); } return mbParsed; } /*=========================================================================== METHOD: GetLastValue (Internal Method) DESCRIPTION: Working from the back of the current field list find and return the value for the specified field ID as a LONGLONG (field type must be able to fit in a LONGLONG for a value to be returned) PARAMETERS: fieldID [ I ] - Field ID we are looking for val [ O ] - The value RETURN VALUE: bool ===========================================================================*/ bool cDataParser::GetLastValue( ULONG fieldID, LONGLONG & val ) { // Assume failure bool bRC = false; // Use field value tracking information std::map >::iterator pTF; pTF = mTrackedFields.find( fieldID ); if (pTF != mTrackedFields.end() && pTF->second.first == true) { val = pTF->second.second; bRC = true; } return bRC; } /*=========================================================================== METHOD: ContinueNavigation (Internal Method) DESCRIPTION: Continue navigation now that entity has been set? RETURN VALUE: bool ===========================================================================*/ bool cDataParser::ContinueNavigation() { // Proceed to parse? bool bParse = true; // Is there actually something to process? if (mBitsy.GetNumBitsLeft() == 0) { bParse = false; } return bParse; } /*=========================================================================== METHOD: ProcessField (Internal Method) DESCRIPTION: Process the given field by parsing the value PARAMETERS: pField [ I ] - The field being processed fieldName [ I ] - Field name (partial) arrayIndex [ I ] - Not used RETURN VALUE: bool ===========================================================================*/ bool cDataParser::ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG /* arrayIndex */ ) { // Assume failure bool bRC = false; if (pField == 0) { return bRC; } // We must have a name sParsedField theField( mDB, pField, fieldName, mBitsy, mbFieldStrings ); // Did that result in a valid field? if (theField.IsValid() == true) { // Add field mFields.push_back( theField ); bRC = true; // Are we tracking the value of this field? std::map >::iterator pTF; pTF = mTrackedFields.find( pField->mID ); if (pTF != mTrackedFields.end()) { std::pair & entry = pTF->second; // What type is this field? switch (pField->mType) { case eDB2_FIELD_STD: { // Standard field, what kind? eDB2StdFieldType ft = (eDB2StdFieldType)pField->mTypeVal; switch (ft) { // Field is a boolean (0/1, false/true)/8-bit unsigned case eDB2_FIELD_STDTYPE_BOOL: case eDB2_FIELD_STDTYPE_UINT8: { // Treat as UCHAR entry.second = (LONGLONG)theField.mValue.mU8; entry.first = true; } break; // Field is 8-bit signed integer case eDB2_FIELD_STDTYPE_INT8: { // Treat as CHAR entry.second = (LONGLONG)theField.mValue.mS8; entry.first = true; } break; // Field is 16-bit signed integer case eDB2_FIELD_STDTYPE_INT16: { // Treat as SHORT entry.second = (LONGLONG)theField.mValue.mS16; entry.first = true; } break; // Field is 16-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT16: { // Treat as USHORT entry.second = (LONGLONG)theField.mValue.mU16; entry.first = true; } break; // Field is 32-bit signed integer case eDB2_FIELD_STDTYPE_INT32: { // Treat as LONG entry.second = (LONGLONG)theField.mValue.mS32; entry.first = true; } break; // Field is 32-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT32: { // Treat as ULONG entry.second = (LONGLONG)theField.mValue.mU32; entry.first = true; } break; // Field is 64-bit signed integer case eDB2_FIELD_STDTYPE_INT64: { // Treat as LONGLONG entry.second = (LONGLONG)theField.mValue.mS64; entry.first = true; } break; // Field is 64-bit unsigned integer case eDB2_FIELD_STDTYPE_UINT64: { // Treat as ULONGLONG if (theField.mValue.mU64 <= LLONG_MAX) { entry.second = (LONGLONG)theField.mValue.mU64; entry.first = true; } } break; } } break; case eDB2_FIELD_ENUM_UNSIGNED: { // Treat as ULONG entry.second = (LONGLONG)theField.mValue.mU32; entry.first = true; } break; case eDB2_FIELD_ENUM_SIGNED: { // Treat as LONG entry.second = (LONGLONG)theField.mValue.mS32; entry.first = true; } break; } } } return bRC; } /*=========================================================================== METHOD: HandleSpecialCases (Internal Method) DESCRIPTION: Handle special case processing for summary text generation NOTE: This should only be added to as a last resort PARAMETERS: args [I/O] - Current argument list/updated 'special' argument list fs [I/O] - Current format specifier/updated 'special' format specifier RETURN VALUE: None ===========================================================================*/ void cDataParser::HandleSpecialCases( std::string & args, std::string & fs ) { std::vector key = mEntity.GetKey(); if (key.size() == 2 && key[0] == (ULONG)eDB2_ET_DIAG_EVENT) { ULONG id = key[1]; mBitsy.SetOffset( 0 ); ULONG lenInBits = mBitsy.GetNumBitsLeft(); switch (id) { case 276: if (lenInBits == 16) { // Old style idle handoff event, remap summary args = "idle_handoff"; fs = "idle_handoff=%u"; } break; case 277: if (lenInBits == 16) { // Old style access handoff event, remap summary args = "ms_access_handoff"; fs = "ms_access_handoff=%u"; } break; case 278: if (lenInBits == 16) { // Old style access probe handoff event, remap summary args = "ms_access_probe_handoff"; fs = "ms_access_probe_handoff=%u"; } break; case 639: if (lenInBits == 16) { // Old style access entry handoff event, remap summary args = "ms_access_handoff"; fs = "ms_access_handoff=%u"; } break; } } } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/DataParser.h000077500000000000000000000276111455567757300235000ustar00rootroot00000000000000/*=========================================================================== FILE: DataParser.h DESCRIPTION: Declaration of sParsedField and cDataParser PUBLIC CLASSES AND METHODS: sParsedField Structure to represent a single parsed field (field ID, offset, size, value, name, etc.) cDataParser Class to parse a buffer into bit/byte specified fields accordinging to a database description, uses cProtocolEntityNav to navigate the DB definition Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" #include "BitParser.h" #include "ProtocolEntityNav.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- class cColorItem; /*=========================================================================*/ // Union uFields // // Union to represent the data of a parsed field /*=========================================================================*/ union uFields { CHAR mS8; UCHAR mU8; SHORT mS16; USHORT mU16; LONG mS32; ULONG mU32; FLOAT mFP32; LONGLONG mS64; ULONGLONG mU64; double mFP64; LPCSTR mpAStr; }; /*=========================================================================*/ // Struct sParsedField // // Structure to represent a parsed field /*=========================================================================*/ struct sParsedField { // Give data parser full access friend class cDataParser; public: // (Inline) Constructor - default sParsedField() : mField(), mOffset( 0 ), mValueString( "" ), mName( "" ), mbValid( false ) { memset( (PVOID)&mValue, 0, sizeof( mValue ) ); }; // Constructor - parameterized sParsedField( const cCoreDatabase & db, const sDB2Field * pField, const std::string & name, cBitParser & bp, bool bGenStrings = true ); // (Inline) Get the raw value string (i.e. unmapped enums) std::string GetRawValueString() const { std::string retStr = ""; std::ostringstream tmp; if (IsValid() == true) { if (mField.mType == eDB2_FIELD_ENUM_UNSIGNED) { if (mField.mbHex == false) { tmp << mValue.mU32; retStr = tmp.str(); } else { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << mValue.mU32; retStr = tmp.str(); } } else if (mField.mType == eDB2_FIELD_ENUM_SIGNED) { if (mField.mbHex == false) { tmp << mValue.mS32; retStr = tmp.str(); } else { tmp << std::ios_base::hex << std::ios_base::uppercase << std::ios_base::showbase << mValue.mU32; retStr = tmp.str(); } } else { retStr = mValueString; } } return retStr; }; // (Inline) Get field size in bits ULONG GetSize() const { ULONG sz = 0; if (mField.IsValid() == true) { sz = mField.mSize; } return sz; }; // (Inline) Is this field a string type? bool IsString() const { bool bStr = false; if (IsValid() == false) { return bStr; } if (mField.mType == eDB2_FIELD_STD) { switch ((eDB2StdFieldType)mField.mTypeVal) { case eDB2_FIELD_STDTYPE_STRING_A: case eDB2_FIELD_STDTYPE_STRING_U: case eDB2_FIELD_STDTYPE_STRING_U8: case eDB2_FIELD_STDTYPE_STRING_ANT: case eDB2_FIELD_STDTYPE_STRING_UNT: case eDB2_FIELD_STDTYPE_STRING_U8NT: bStr = true; break; } } return bStr; }; // (Inline) Is this object valid? bool IsValid() const { return mbValid; }; /* Field definition */ sDB2Field mField; /* Bit offset (from start of payload) */ ULONG mOffset; /* Field value */ uFields mValue; /* Field value as a string */ std::string mValueString; /* Partially qualified name of field */ std::string mName; protected: // Parse a string bool ParseString( ULONG numChars, cBitParser & bp ); /* Is this object valid? */ bool mbValid; }; /*=========================================================================*/ // Class cParsedFieldNavigator // // Class to navigate/search parsed fields produced by the above /*=========================================================================*/ class cParsedFieldNavigator { public: // (Inline) Constructor cParsedFieldNavigator( const std::vector & pf ) : mFields( pf ), mLastIDIndex( ULONG_MAX ) { }; // Get index of the (first) field that matches the field ID, // the search starts from the last success index returned by // a previous call to this method ULONG GetFieldIndex( ULONG fieldID, bool bLoop = false ) const; // (Inline) Get index of the (first) field that matches the // given ID, the search starts from the provided index ULONG GetFieldIndexFrom( ULONG fieldID, ULONG startIndex, bool bLoop = false ) const { mLastIDIndex = startIndex; return GetFieldIndex( fieldID, bLoop ); }; protected: /* The list of parsed fields */ const std::vector & mFields; /* Index of last field we matched */ mutable ULONG mLastIDIndex; }; /*=========================================================================*/ // Class cDataParser // Class to parse a buffer into bit/byte specified fields /*=========================================================================*/ class cDataParser : public cProtocolEntityNav { public: // Constructor (protocol buffer) cDataParser( const cCoreDatabase & db, const sProtocolBuffer & buffer ); // Constructor (protocol buffer, entity key, and payload) cDataParser( const cCoreDatabase & db, const sProtocolBuffer & buffer, const std::vector & key, const BYTE * pData, ULONG dataLen ); // Destructor virtual ~cDataParser(); // Parse the data to a list of fields/summary text virtual bool Parse( bool bFieldStrings = true, bool bFieldNames = true ); // (Inline) Get the protocol entity name std::string GetEntityName() const { std::string retName = "?"; if (mEntity.mpName != 0 && mEntity.mpName[0] != 0) { retName = mEntity.mpName; } return retName; }; // (Inline) Get the parsed fields typedef std::vector tParsedFields; const tParsedFields & GetFields() const { return mFields; }; protected: // Working from the back of the current field list find // and return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG fieldID, LONGLONG & val ); // Contiue navigation now that entity has been set? virtual bool ContinueNavigation(); // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG arrayIndex = -1 ); // (Inline) Get current working offset virtual ULONG GetOffset() { return mBitsy.GetNumBitsParsed(); }; // (Inline) Set current working offset virtual bool SetOffset( ULONG offset ) { mBitsy.SetOffset( offset ); return true; }; // (Inline) Get current navigation order virtual bool GetLSBMode() { return mBitsy.GetLSBMode(); }; // (Inline) Set current navigation order virtual bool SetLSBMode( bool bLSB ) { // Assume success bool bOK = true; if (bLSB != GetLSBMode()) { if ((GetOffset() % BITS_PER_BYTE) != 0) { // We need to be on a byte boundary bOK = false; } else { mBitsy.SetLSBMode( bLSB ); } } return bOK; }; // Handle special case processing for summary text generation virtual void HandleSpecialCases( std::string & args, std::string & fs ); /* Color item containing the data we are parsing */ sProtocolBuffer mBuffer; /* Entity key */ std::vector mKey; /* The underlying bit parser */ cBitParser mBitsy; /* The list of parsed fields */ tParsedFields mFields; /* Generate field value strings? */ bool mbFieldStrings; /* Did we successfully parse the buffer? */ bool mbParsed; /* Parsed field vector index of last instance of each field (by ID) */ std::map mFieldIndices; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/Event.cpp000077500000000000000000000260151455567757300230630ustar00rootroot00000000000000/*=========================================================================== FILE: Event.cpp DESCRIPTION: Implementation of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const DWORD READING = 0; const DWORD WRITING = 1; /*=========================================================================== METHOD: WaitOnMultipleEvents (Free Method) DESCRIPTION: Wait for any of the events to be set and return the value Note: If multiple events are set, only the event specified by eventIndex will be read from. Run this function again to get the next event. PARAMETERS: events [ I ] - Vector of events which may be signaled timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success eventIndex [ O ] - Index of event which was signaled RETURN VALUE: Return code positive for number of events set -ETIME on timeout negative errno value on failure ===========================================================================*/ int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ) { // Check internal pipes' status for (int index = 0; index < events.size(); index++) { int error = events[index]->mError; if (error != 0) { TRACE( "cEvent %d has error %d\n", index, error ); return -error; } } // Initialize the FD set fd_set fds; FD_ZERO( &fds ); // Add each item to the FD set, keeping track of the largest, // which is used for select() int largestFD = 0; for (int index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; FD_SET( pipe, &fds ); largestFD = std::max( pipe, largestFD ); } struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipes for the specified amount of time int rc = select( largestFD + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { TRACE( "WaitOnMultipleEvents error %d\n", errno ); return -errno; } else if (rc == 0) { // No activity on the pipes return -ETIME; } int numSignaled = rc; // Only read from first pipe which was signaled int signaled = -1; for (int index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; if (FD_ISSET( pipe, &fds ) != 0) { signaled = index; break; } } if (signaled == -1) { // Odd, no one was signaled return -ENODATA; } DWORD tempVal = 0; rc = events[signaled]->Read( tempVal ); if (rc == 0) { // Success val = tempVal; eventIndex = signaled; return numSignaled; } else { // failure return rc; } } /*=========================================================================*/ // cEvent Methods /*=========================================================================*/ /*=========================================================================== METHOD: cEvent (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cEvent::cEvent() : mError( 0 ) { int rc = pipe( mPipes ); if (rc != 0) { mError = errno; TRACE( "cEvent - Error %d creating pipe, %s\n", mError, strerror( mError ) ); } } /*=========================================================================== METHOD: ~cEvent (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cEvent::~cEvent() { // Check internal pipe status if (mError == 0) { Close(); mError = EBADF; } } /*=========================================================================== METHOD: Close (Internal Method) DESCRIPTION: Close pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Close() { int retCode = 0; int rc = close( mPipes[READING] ); mPipes[READING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[READING], %s\n", retCode, strerror( retCode ) ); } rc = close( mPipes[WRITING] ); mPipes[WRITING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[WRITING], %s\n", retCode, strerror( retCode ) ); } return retCode; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Set/signal the event with the specified value PARAMETERS: val [ I ] - Value to pass through with signal RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Set( DWORD val ) { // Check internal pipe status if (mError != 0) { return mError; } PBYTE pWrite = (PBYTE)&val; int writeSize = sizeof( DWORD ); while (writeSize > 0) { int bytesWritten = write( mPipes[WRITING], pWrite, writeSize ); if (bytesWritten == -1) { // Store error from write int writeErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = writeErr; } // We cannot recover from this error Close(); return writeErr; } pWrite += bytesWritten; writeSize -= bytesWritten; } // Success return 0; } /*=========================================================================== METHOD: Wait (Free Method) DESCRIPTION: Wait for the event to be signalled and return the read in value PARAMETERS: timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success RETURN VALUE: Return code 0 on success ETIME on timeout errno value on failure ===========================================================================*/ int cEvent::Wait( DWORD timeoutMS, DWORD & val ) { // Check internal pipe status if (mError != 0) { return mError; } fd_set fds; FD_ZERO( &fds ); FD_SET( mPipes[READING], &fds ); struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipe for the specified amount of time int rc = select( mPipes[READING] + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { // Store error from select int selectErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = selectErr; } // We cannot recover from this error Close(); return selectErr; } else if (rc == 0) { // No activity on the pipe return ETIME; } return Read( val ); } /*=========================================================================== METHOD: Clear (Free Method) DESCRIPTION: Read and discard all values currently in the pipe ===========================================================================*/ void cEvent::Clear() { DWORD unusedVal; int rc = 0; while (rc == 0) { rc = Wait( (DWORD)0, unusedVal ); } } /*=========================================================================== METHOD: Read (Internal Method) DESCRIPTION: Read a DWORD from the pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Read( DWORD & val ) { DWORD tempVal; PBYTE pRead = (PBYTE)&tempVal; int readSize = sizeof( DWORD ); while (readSize > 0) { int bytesRead = read( mPipes[READING], pRead, readSize ); if (bytesRead <= 0) { // Store error from read int readErr = errno; if (readErr == 0) { // Hard error! This should NEVER happen for a pipe ASSERT( 0 ); readErr = EBADF; } // First error? if (mError == 0) { // Yes, store the error mError = readErr; } // We cannot recover from this error Close(); return readErr; } pRead += bytesRead; readSize -= bytesRead; } val = tempVal; return 0; }libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/Event.h000077500000000000000000000102031455567757300225200ustar00rootroot00000000000000/*=========================================================================== FILE: Event.h DESCRIPTION: Declaration of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include //--------------------------------------------------------------------------- // Prototype //--------------------------------------------------------------------------- class cEvent; /*=========================================================================*/ // Free methods /*=========================================================================*/ // Wait for any of the events to be set and return the value int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); /*=========================================================================*/ // Class cEvent /*=========================================================================*/ class cEvent { public: // Constructor cEvent(); // Destructor ~cEvent(); // Set/signal the event with the specified value int Set( DWORD val ); // Wait for the event to be signalled and return the read in value int Wait( DWORD timeoutMS, DWORD & val ); // Read and discard all values currently in the pipe void Clear(); protected: // Close pipe (used in errors or normal exit) int Close(); // Read from the pipe int Read( DWORD & val ); /* Internal error status */ int mError; /* Internal pipes */ int mPipes[2]; // WaitOnMultipleEvents gets full access friend int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/HDLC.cpp000077500000000000000000000201261455567757300225110ustar00rootroot00000000000000/*=========================================================================== FILE: HDLC.cpp DESCRIPTION: Encode and decode asynchronous HDLC protocol packets as described by both the QUALCOMM download & SDIC (diagnostic) protocol documents PUBLIC CLASSES AND METHODS: HDLCDecode() HDLCEncode() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "HDLC.h" #include "CRC.h" #include "SharedBuffer.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /* Async HDLC defines */ const BYTE AHDLC_FLAG = 0x7e; const BYTE AHDLC_ESCAPE = 0x7d; const BYTE AHDLC_ESC_M = 0x20; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: HDLCDecode (Free Method) DESCRIPTION: HDLC decode the given buffer returning the results in an allocated buffer PARAMETERS: pBuf [ I ] - The data buffer to decode RETURN VALUE: sSharedBuffer * : The decoded buffer (allocated), 0 on error ===========================================================================*/ sSharedBuffer * HDLCDecode( sSharedBuffer * pBuf ) { // The return buffer sSharedBuffer * pRet = 0; // The has to be something to decode if (pBuf == 0 || pBuf->IsValid() == false) { return pRet; } // Grab raw data from shared buffer const BYTE * pData = pBuf->GetBuffer(); UINT sz = pBuf->GetSize(); // Is the first character a leading flag? if (pData[0] == AHDLC_FLAG) { pData++; sz--; } // There must be at least four bytes (data, CRC, trailing flag) if (sz < 4) { return pRet; } // The last character must be the trailing flag if (pData[sz - 1] == AHDLC_FLAG) { sz--; } else { return pRet; } // Allocate the decode buffer PBYTE pDecoded = new BYTE[sz]; if (pDecoded == 0) { return pRet; } // Handle escaped characters and copy into decode buffer UINT encodeIndex = 0; UINT decodeIndex = 0; while (encodeIndex < sz) { BYTE b = pData[encodeIndex++]; if (b == AHDLC_ESCAPE && encodeIndex < sz) { b = pData[encodeIndex++]; b ^= AHDLC_ESC_M; } pDecoded[decodeIndex++] = b; } // Check CRC value if (CheckCRC( pDecoded, decodeIndex ) == false) { delete [] pDecoded; return pRet; } // Adjust decode length down for CRC decodeIndex -= 2; // ... and wrap up in a shared buffer pRet = new sSharedBuffer( decodeIndex, pDecoded, pBuf->GetType() ); return pRet; } /*=========================================================================== METHOD: HDLCEncode (Free Method) DESCRIPTION: HDLC encode the given buffer returning the results in an allocated buffer PARAMETERS: pBuf [ I ] - The data buffer to decode RETURN VALUE: sSharedBuffer * : The decoded buffer (allocated), 0 on error ===========================================================================*/ sSharedBuffer * HDLCEncode( sSharedBuffer * pBuf ) { // The return buffer sSharedBuffer * pRet = 0; // The has to be something to decode if (pBuf == 0 || pBuf->IsValid() == false) { return pRet; } // Grab raw data from shared buffer const BYTE * pData = pBuf->GetBuffer(); UINT sz = pBuf->GetSize(); // Compute CRC USHORT CRC = CalculateCRC( pData, sz * 8 ); // Allocate the encode buffer PBYTE pEncoded = new BYTE[sz * 2 + 4]; if (pEncoded == 0) { return pRet; } // Add leading flag UINT encodeIndex = 0; pEncoded[encodeIndex++] = AHDLC_FLAG; // Add data, escaping when necessary UINT decodeIndex = 0; while (decodeIndex < sz) { BYTE value = pData[decodeIndex++]; if (value == AHDLC_FLAG || value == AHDLC_ESCAPE) { value ^= AHDLC_ESC_M; pEncoded[encodeIndex++] = AHDLC_ESCAPE; } pEncoded[encodeIndex++] = value; } // Byte order CRC BYTE byteOrderedCRC[2]; byteOrderedCRC[0] = (BYTE)(CRC & 0x00ff); byteOrderedCRC[1] = (BYTE)(CRC >> 8); // Add CRC UINT c = 0; while (c < 2) { BYTE value = byteOrderedCRC[c++]; if (value == AHDLC_FLAG || value == AHDLC_ESCAPE) { value ^= AHDLC_ESC_M; pEncoded[encodeIndex++] = AHDLC_ESCAPE; } pEncoded[encodeIndex++] = value; } // Add trailing flag pEncoded[encodeIndex++] = AHDLC_FLAG; // Wrap up in a shared buffer pRet = new sSharedBuffer( encodeIndex, pEncoded, pBuf->GetType() ); return pRet; } /*=========================================================================== METHOD: HDLCUnitTest (Free Method) DESCRIPTION: Simple in = out testing of HDLCEncode/HDLCDecode RETURN VALUE: bool: true - Test succeeded false - Test failed ===========================================================================*/ #ifdef DEBUG #include bool HDLCUnitTest() { // Assume failure bool bRC = false; const UINT MAX_LEN = 2048; BYTE testBuf[MAX_LEN]; srand( GetTickCount() ); UINT len = (((UINT)rand()) % MAX_LEN) + 1; for (UINT i = 0; i < len; i++) { testBuf[i] = (BYTE)((UINT)rand() % 256); } sSharedBuffer * pOrig = new sSharedBuffer( testBuf, len, 0 ); if (pOrig != 0) { // Encode buffer sSharedBuffer * pEnc = HDLCEncode( pOrig ); if (pEnc != 0) { // Now decode buffer encoded above sSharedBuffer * pDec = HDLCDecode( pEnc ); if (pDec != 0) { if (pOrig->IsValid() == true && pDec->IsValid() == true) { // Compare decoded to original const BYTE * pOrigData = pOrig->GetBuffer(); const BYTE * pDecData = pDec->GetBuffer(); if (len == pDec->GetSize()) { int cmp = memcmp( (const void *)pOrigData, (const void *)pDecData, (size_t)len ); bRC = (cmp == 0); } } delete [] pDec; } delete [] pEnc; } delete [] pOrig; } return bRC; } #endif libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/HDLC.h000077500000000000000000000055421455567757300221630ustar00rootroot00000000000000/*=========================================================================== FILE: HDLC.h DESCRIPTION: Encode and decode asynchronous HDLC protocol packets as described by both the QUALCOMM download & SDIC (diagnostic) protocol documents PUBLIC CLASSES AND METHODS: HDLCDecode() HDLCEncode() Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- extern const BYTE AHDLC_FLAG; extern const BYTE AHDLC_ESCAPE; extern const BYTE AHDLC_ESC_M; struct sSharedBuffer; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // HDLC encode the given buffer returning the results in an allocated buffer sSharedBuffer * HDLCEncode( sSharedBuffer * pBuf ); // HDLC decode the given buffer returning the results in an allocated buffer sSharedBuffer * HDLCDecode( sSharedBuffer * pBuf ); #ifdef DEBUG // Simple in = out testing of HDLCEncode/HDLCDecode bool HDLCUnitTest(); #endif libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/HDLCProtocolServer.cpp000077500000000000000000000224071455567757300254260ustar00rootroot00000000000000/*=========================================================================== FILE: HDLCProtocolServer.cpp DESCRIPTION: Generic HDLC framed protocol packet server PUBLIC CLASSES AND METHODS: cHDLCProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "HDLCProtocolServer.h" #include "HDLC.h" #include "CRC.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cHDLCProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cHDLCProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cHDLCProtocolServer::cHDLCProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( rxType, txType, bufferSzRx, logSz ), mRxType( rxType ), mpEncodedBuffer( 0 ), mpRxDecodeBuffer( 0 ), mRxDecodeOffset( 0 ), mbInEscape( false ) { // Allocate decode buffer? if (mRxBufferSize > 0) { mpRxDecodeBuffer = new BYTE[mRxBufferSize * 4]; } } /*=========================================================================== METHOD: ~cHDLCProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cHDLCProtocolServer::~cHDLCProtocolServer() { // Free encoded buffer? if (mpEncodedBuffer != 0) { delete mpEncodedBuffer; mpEncodedBuffer = 0; } // Free decode buffer? if (mpRxDecodeBuffer != 0) { delete [] mpRxDecodeBuffer; mpRxDecodeBuffer = 0; } } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization NOTE: This sends the commands to the driver which sends the IOCTL, but that isn't successful SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cHDLCProtocolServer::InitializeComm() { // Default configuration setting struct termios settings; if (mComm.GetSettings( &settings ) == false) { return false; } cfmakeraw( &settings ); settings.c_cflag |= CREAD|CLOCAL; return mComm.ConfigureSettings( &settings ); } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cHDLCProtocolServer::CleanupComm() { // Nothing to actually do here return true; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encoded data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cHDLCProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { // We encoded data bEncoded = true; // Last encoded buffer around? if (mpEncodedBuffer != 0) { // Yes free it. Note that this assumes that the last transmission has // concluded since the buffer must exist during transmission. Since we // support one and only one outstanding request this is valid delete mpEncodedBuffer; mpEncodedBuffer = 0; } mpEncodedBuffer = HDLCEncode( pBuffer ); return mpEncodedBuffer; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into packets returning the last response PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response bAbortTx [ O ] - Response aborts current transmission? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cHDLCProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; // Something to decode from/to? if (bytesReceived == 0 || mpRxDecodeBuffer == 0) { return bRC; } BYTE val; ULONG idx = 0; ULONG maxSz = mRxBufferSize * 4; while (idx < bytesReceived) { val = mpRxBuffer[idx++]; // Check for target spewing nonsense if (mRxDecodeOffset >= maxSz) { // Reset to beginning mRxDecodeOffset = 0; } // Was the previous byte an escape byte? if (mbInEscape == true) { // Yes, handle it mbInEscape = false; val ^= AHDLC_ESC_M; mpRxDecodeBuffer[mRxDecodeOffset++] = val; } else if (val == AHDLC_ESCAPE) { // No, but this one is mbInEscape = true; } else if (val == AHDLC_FLAG) { // Is this a valid frame? if ( (mRxDecodeOffset > 0) && (CheckCRC( mpRxDecodeBuffer, mRxDecodeOffset ) == true) ) { // Yes, extract it (minus CRC) to a shared buffer sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxDecodeBuffer, mRxDecodeOffset - 2, (ULONG)mRxType ); if (pTmp != 0) { sProtocolBuffer tmpPB( pTmp ); ULONG tmpIdx = mLog.AddBuffer( tmpPB ); // Abort? bool bTmpAbortTx = IsTxAbortResponse( tmpPB ); if (bTmpAbortTx == true) { bAbortTx = true; } else { // Is this the response we are looking for? bool bRsp = IsResponse( tmpPB ); if (bRsp == true) { rspIdx = tmpIdx; bRC = true; } } } } // Reset for next frame mRxDecodeOffset = 0; } else { // No, just a regular value mpRxDecodeBuffer[mRxDecodeOffset++] = val; } } return bRC; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/HDLCProtocolServer.h000077500000000000000000000102221455567757300250630ustar00rootroot00000000000000/*=========================================================================== FILE: HDLCProtocolServer.h DESCRIPTION: Generic HDLC framed protocol packet server PUBLIC CLASSES AND METHODS: cHDLCProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cHDLCProtocolServer /*=========================================================================*/ class cHDLCProtocolServer : public cProtocolServer { public: // Constructor cHDLCProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cHDLCProtocolServer(); protected: // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & /* rsp */ ) = 0; // Is the passed in data a response that aborts the current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & rsp ) = 0; /* Protocol type for incoming data*/ eProtocolType mRxType; /* Encoded data being transmitted */ sSharedBuffer * mpEncodedBuffer; /* Decode buffer for incoming data */ BYTE * mpRxDecodeBuffer; /* Current index into above buffer */ ULONG mRxDecodeOffset; /* Are we currently escaping a character? */ bool mbInEscape; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/Makefile.am000066400000000000000000000023611455567757300233250ustar00rootroot00000000000000noinst_LTLIBRARIES = libCore.la libCore_la_CXXFLAGS = -Wunused-variable libCore_includedir = $(includedir)/gobi libCore_include_HEADERS = \ types.h \ apidefs.h libCore_la_SOURCES = \ BitPacker.cpp \ BitPacker.h \ BitParser.cpp \ BitParser.h \ Comm.cpp \ Comm.h \ CoreDatabase.cpp \ CoreDatabase.h \ CoreUtilities.cpp \ CoreUtilities.h \ CRC.cpp \ CRC.h \ DataPacker.cpp \ DataPacker.h \ DataParser.cpp \ DataParser.h \ DB2NavTree.cpp \ DB2NavTree.h \ DB2TextFile.cpp \ DB2TextFile.h \ DB2Utilities.cpp \ DB2Utilities.h \ Event.cpp \ Event.h \ HDLC.cpp \ HDLC.h \ HDLCProtocolServer.cpp \ HDLCProtocolServer.h \ MemoryMappedFile.cpp \ MemoryMappedFile.h \ ProtocolBuffer.cpp \ ProtocolBuffer.h \ ProtocolEntityFieldEnumerator.h \ ProtocolEntityNav.cpp \ ProtocolEntityNav.h \ ProtocolEnum.h \ ProtocolLog.cpp \ ProtocolLog.h \ ProtocolNotification.cpp \ ProtocolNotification.h \ ProtocolRequest.cpp \ ProtocolRequest.h \ ProtocolServer.cpp \ ProtocolServer.h \ QDLBuffers.cpp \ QDLBuffers.h \ QDLEnum.h \ QDLProtocolServer.cpp \ QDLProtocolServer.h \ QMIBuffers.cpp \ QMIBuffers.h \ QMIEnum.h \ QMIProtocolServer.cpp \ QMIProtocolServer.h \ SharedBuffer.cpp \ SharedBuffer.h \ StdAfx.h \ SyncQueue.h libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/MemoryMappedFile.cpp000077500000000000000000000126271455567757300252050ustar00rootroot00000000000000/*=========================================================================== FILE: MemoryMappedFile.cpp DESCRIPTION: Implementation of cMemoryMappedFile class PUBLIC CLASSES AND METHODS: cMemoryMappedFile The cMemoryMappedFile class provides the ability to read in a file via Linux memory maps Note: cMemoryMappedFiles are read only Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //----------------------------------------------------------------------------- // Include Files //----------------------------------------------------------------------------- #include "StdAfx.h" #include "MemoryMappedFile.h" #include //----------------------------------------------------------------------------- // Definitions //----------------------------------------------------------------------------- // Maximum size of a file this interface will try to open (64 MB) const DWORD MAX_FILE_SZ = 1024 * 1024 * 64; /*=========================================================================*/ // cMemoryMappedFile Methods /*=========================================================================*/ /*=========================================================================== METHOD: cMemoryMappedFile (Public Method) DESCRIPTION: Construct object/load file into memory PARAMETERS pFile [ I ] - File name RETURN VALUE: None ===========================================================================*/ cMemoryMappedFile::cMemoryMappedFile( LPCSTR pFile ) : mbResourceBased( false ), mpBuffer( 0 ), mFileSize( 0 ), mStatus( ERROR_FILE_NOT_FOUND ) { if (pFile == 0 || pFile[0] == 0) { return; } // Open the file mFile = open( pFile, O_RDONLY ); if (mFile == -1) { TRACE( "Unable to Map %s to memory. Error %d: %s\n", pFile, errno, strerror( errno ) ); return; } // Grab the file size struct stat fileInfo; if (fstat( mFile, &fileInfo ) != 0) { TRACE( "Unable to get info for %s. Error %d: %s\n", pFile, errno, strerror( errno ) ); return; } DWORD fileSize = fileInfo.st_size; // Map to mpBuffer mpBuffer = mmap( 0, fileSize, PROT_READ, MAP_SHARED | MAP_POPULATE, mFile, 0 ); if (mpBuffer == 0 || mpBuffer == MAP_FAILED ) { TRACE( "Memory map failed error %d:, %s\n", errno, strerror( errno ) ); return; } // Success! mFileSize = fileSize; mStatus = NO_ERROR; } /*=========================================================================== METHOD: cMemoryMappedFile (Public Method) DESCRIPTION: Construct object/load resource based file into memory PARAMETERS pStart [ I ] - Start location of object nSize [ I ] - Size of object RETURN VALUE: None ===========================================================================*/ cMemoryMappedFile::cMemoryMappedFile( const char * pStart, const int nSize ) : mbResourceBased( true ), mpBuffer( 0 ), mFileSize( 0 ), mStatus( INVALID_HANDLE_VALUE ) { // Set size mFileSize = nSize; // Set memory pointer mpBuffer = (void * )pStart; // Success! mStatus = NO_ERROR; } /*=========================================================================== METHOD: ~cMemoryMappedFile (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cMemoryMappedFile::~cMemoryMappedFile() { if (mbResourceBased == false) { if (munmap( mpBuffer, mFileSize ) == -1) { TRACE( "Memory unmapping error %d: %s\n", errno, strerror( errno ) ); return; } } } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/MemoryMappedFile.h000077500000000000000000000072751455567757300246550ustar00rootroot00000000000000/*=========================================================================== FILE: MemoryMappedFile.h DESCRIPTION: Declaration of cMemoryMappedFile class PUBLIC CLASSES AND METHODS: cMemoryMappedFile The cMemoryMappedFile class provides the ability to read in a file via Linux memory maps Note: cMemoryMappedFiles are read only Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cMemoryMappedFile /*=========================================================================*/ class cMemoryMappedFile { public: // Constructor (loads file) cMemoryMappedFile( LPCSTR pFile ); // Constructor (loads file from resource) cMemoryMappedFile( const char * pStart, const int nSize ); // Destructor virtual ~cMemoryMappedFile(); // (Inline) Get error status DWORD GetStatus() { DWORD stat = mStatus; if (mStatus == NO_ERROR) { if (mpBuffer == 0 || mFileSize == 0) { // We failed but GetLastError() return NO_ERROR stat = ERROR_NO_MORE_ITEMS; } } return stat; }; // (Inline) Return the size of the file (contents) ULONG GetSize() { ULONG sz = 0; if (GetStatus() == NO_ERROR) { sz = mFileSize; } return sz; }; // (Inline) Return the file contents LPVOID GetContents() { LPVOID pContents = 0; if (GetStatus() == NO_ERROR) { pContents = mpBuffer; } return pContents; }; protected: /* Resource based file? */ bool mbResourceBased; /* File handle */ int mFile; /* File contents*/ LPVOID mpBuffer; /* File size */ ULONG mFileSize; /* Error status */ DWORD mStatus; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolBuffer.cpp000077500000000000000000000143601455567757300247350ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.cpp DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sProtocolBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer() : mpData( 0 ), mbValid( false ) { // Object is currently invalid mTimestamp = EMPTY_TIME; } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (parameterized) PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( sSharedBuffer * pBuffer ) : mpData( 0 ), mbValid( false ) { mTimestamp = EMPTY_TIME; time_t rawtime; time( &rawtime ); tm * timestamp = localtime( &rawtime ); if (timestamp != 0) { mTimestamp = *timestamp; } if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } mpData = pBuffer; if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; } // NOTE: Derived classes need to call their own validation method // in their constructors since the override might try to access // data that is not yet in place sProtocolBuffer::Validate(); } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Copy constructor PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( const sProtocolBuffer & copyThis ) : mpData( copyThis.mpData ), mTimestamp( copyThis.mTimestamp ), mbValid( copyThis.mbValid ) { // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } } /*=========================================================================== METHOD: operator = (Public Method) DESCRIPTION: Assignment operator PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: sProtocolBuffer & ===========================================================================*/ sProtocolBuffer & sProtocolBuffer::operator = ( const sProtocolBuffer & copyThis ) { // Do we already have data? if (mpData != 0) { // Is it different than what we are duplicating? if (mpData != copyThis.mpData) { // Yes, release our current buffer mpData->Release(); } } mpData = copyThis.mpData; mTimestamp = copyThis.mTimestamp; mbValid = copyThis.mbValid; // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } return *this; } /*=========================================================================== METHOD: ~sProtocolBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::~sProtocolBuffer() { if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } else if (mpData != 0) { ASSERT( 0 ); } mbValid = false; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolBuffer.h000077500000000000000000000116201455567757300243760ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.h DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SharedBuffer.h" #include "ProtocolEnum.h" static const tm EMPTY_TIME = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /*=========================================================================*/ // Struct sProtocolBuffer /*=========================================================================*/ struct sProtocolBuffer { public: // Constructor (default) sProtocolBuffer(); // Constructor (parameterized) sProtocolBuffer( sSharedBuffer * pBuffer ); // Copy constructor sProtocolBuffer( const sProtocolBuffer & copyThis ); // Assignment operator sProtocolBuffer & operator = ( const sProtocolBuffer & copyThis ); // Destructor virtual ~sProtocolBuffer(); // (Inline) Get buffer const BYTE * GetBuffer() const { BYTE * pRet = 0; if (IsValid() == true) { pRet = (BYTE *)mpData->GetBuffer(); } return (const BYTE *)pRet; }; // (Inline) Get buffer size ULONG GetSize() const { ULONG size = 0; if (IsValid() == true) { size = mpData->GetSize(); } return size; }; // (Inline) Return the protocol type eProtocolType GetType() const { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid() == true) { pt = (eProtocolType)mpData->GetType(); } return pt; }; // (Inline) Return the shared buffer sSharedBuffer * GetSharedBuffer() const { sSharedBuffer * pRet = 0; if (IsValid() == true) { pRet = mpData; } return pRet; }; // (Inline) Return the timestamp tm GetTimestamp() const { tm ft = EMPTY_TIME; if (IsValid() == true) { ft = mTimestamp; } return ft; }; // (Inline) Is this buffer valid? virtual bool IsValid() const { return mbValid; }; protected: // (Inline) Validate buffer virtual bool Validate() { // Do we have a shared buffer and is it valid? mbValid = (mpData != 0 && mpData->IsValid()); return mbValid; }; /* Our data buffer */ sSharedBuffer * mpData; /* Time buffer was created */ tm mTimestamp; /* Has this buffer been validated? (NOTE: *NOT* set in base) */ bool mbValid; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolEntityFieldEnumerator.h000077500000000000000000000114001455567757300274430ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityFieldEnumerator.h DESCRIPTION: Declaration of cProtocolEntityFieldEnumerator PUBLIC CLASSES AND METHODS: cProtocolEntityFieldEnumerator Class to navigate a protoocl entity, generating a vector of field IDs, i.e. every field referenced by this protocol entity in the exact order it would regularly be found NOTE: This only functions for fixed structures such as NV items Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolEntityNav.h" #include "DB2NavTree.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cProtocolEntityFieldEnumerator /*=========================================================================*/ class cProtocolEntityFieldEnumerator : public cProtocolEntityNav { public: // (Inline) Constructor cProtocolEntityFieldEnumerator( const cCoreDatabase & db, const std::vector & key ) : cProtocolEntityNav( db ), mKey( key ) { // Nothing to do }; // (Inline) Destructor virtual ~cProtocolEntityFieldEnumerator() { // Nothing to do }; // (Inline) Enumerate the fields virtual bool Enumerate() { bool bRC = ProcessEntity( mKey ); return bRC; }; // (Inline) Return fields const std::vector & GetFields() const { return mFields; }; protected: // (Inline) Evaluate the given condition virtual bool EvaluateCondition( LPCSTR /* pCondition */, bool & bResult ) { // All conditions pass bResult = true; return bResult; }; // Return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG /* fieldID */, LONGLONG & val ) { // This should only be called for figuring out array // boundaries (including strings) val = 1; return true; }; // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & /* fieldName */, LONGLONG /* arrayIndex = -1 */ ) { if (pField != 0) { mFields.push_back( pField->mID ); } return true; }; /* Protocol entity being navigated */ std::vector mKey; /* Fields (by ID) */ std::vector mFields; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolEntityNav.cpp000077500000000000000000000642121455567757300254460ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNav.cpp DESCRIPTION: Implementation of cProtocolEntityNav PUBLIC CLASSES AND METHODS: cProtocolEntityNav This calss serves as a base for all class that need to 'navigate' a protocol entity database description. It is necessary in order to seperate the structural aspects from parsing/packing details Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolEntityNav.h" #include "BitParser.h" #include "CoreUtilities.h" #include "DB2NavTree.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Field seperator string LPCSTR PE_NAV_FIELD_SEP = "."; /*=========================================================================*/ // cProtocolEntityNav Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolEntityNav (Public Method) DESCRIPTION: Constructor PARAMETERS: db [ I ] - Database to use bSummaryOnly [ I ] - Only navigate if a format specifier exists? RETURN VALUE: None ===========================================================================*/ cProtocolEntityNav::cProtocolEntityNav( const cCoreDatabase & db ) : mDB( db ), mbFieldNames( true ), mConditions( db.GetOptionalMods() ), mExpressions( db.GetExpressionMods() ), mArrays1( db.GetArray1Mods() ), mArrays2( db.GetArray2Mods() ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolEntityNav (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolEntityNav::~cProtocolEntityNav() { // Nothing to do } /*=========================================================================== METHOD: EvaluateCondition (Internal Method) DESCRIPTION: Evaluate the given condition PARAMETERS: pCondition [ I ] - Condition to evaluate bResult [ O ] - Result of evaluating the condition (true/false) RETURN VALUE: bool : true - We were able to evaluate the condition false - Unable to evaluate condition ===========================================================================*/ bool cProtocolEntityNav::EvaluateCondition( LPCSTR pCondition, bool & bResult ) { // Assume error bool bRC = false; tDB2OptionalModMap::const_iterator pIter; pIter = mConditions.find( pCondition ); if (pIter != mConditions.end()) { const sDB2SimpleCondition & con = pIter->second; // Grab the value for the given field ID LONGLONG valA = 0; bRC = GetLastValue( con.mID, valA ); // Field to field? LONGLONG valB = con.mValue; if (con.mbF2F == true) { // Yes, grab value of the second field bRC &= GetLastValue( (ULONG)con.mValue, valB ); } if (bRC == true) { bResult = sDB2Fragment::EvaluateCondition( valA, con.mOperator, valB ); } else { // We could not find the field used in the condition, this // can either be because of a bad entity (which is ruled // out prior to reaching this point) or the existence of // the field itself is based on another condition. The // former should not happen and the later is not an error bResult = false; bRC = true; } } return bRC; } /*=========================================================================== METHOD: GetArrayBounds (Internal Method) DESCRIPTION: Get the array bounds described by the fragment descriptor PARAMETERS: frag [ I ] - Fragment descriptor arraySz [ O ] - Size of array arrayAdj [ O ] - Adjust for array indices RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::GetArrayBounds( const sDB2Fragment & frag, LONGLONG & arraySz, LONGLONG & arrayAdj ) { // Assume failure bool bRC = false; // Figure out the array size/adjust arraySz = 0; arrayAdj = 0; switch (frag.mModifierType) { case eDB2_MOD_CONSTANT_ARRAY: { tDB2Array1ModMap::const_iterator pIter; pIter = mArrays1.find( frag.mpModifierValue ); if (pIter != mArrays1.end()) { arraySz = (LONGLONG)pIter->second; bRC = true; } } break; case eDB2_MOD_VARIABLE_ARRAY: { tDB2Array1ModMap::const_iterator pIter; pIter = mArrays1.find( frag.mpModifierValue ); if (pIter != mArrays1.end()) { ULONG id = pIter->second; // Now find last occurence of this field ID and grab the value bRC = GetLastValue( id, arraySz ); if (bRC == true) { // It makes no sense to have a negative sized array if (arraySz < 0) { bRC = false; } } } } break; case eDB2_MOD_VARIABLE_ARRAY2: { tDB2Array2ModMap::const_iterator pIter; pIter = mArrays2.find( frag.mpModifierValue ); if (pIter != mArrays2.end()) { ULONG sID = pIter->second.first; ULONG eID = pIter->second.second; LONGLONG s; LONGLONG e; // Now find last occurence of these field IDs and // grab the values bRC = GetLastValue( sID, s ); bRC &= GetLastValue( eID, e ); if (bRC == true) { // It makes no sense to have an negative sized array if (e < s) { bRC = false; } else { arrayAdj = s; arraySz = (e - s) + 1; } } } } break; case eDB2_MOD_VARIABLE_ARRAY3: { tDB2ExpressionModMap::const_iterator pIter; pIter = mExpressions.find( frag.mpModifierValue ); if (pIter != mExpressions.end()) { const sDB2SimpleExpression & expr = pIter->second; // Grab the value for the given field ID LONGLONG valA = 0; bRC = GetLastValue( expr.mID, valA ); // Field to field? LONGLONG valB = expr.mValue; if (expr.mbF2F == true) { // Yes, grab value of the second field bRC &= GetLastValue( (ULONG)expr.mValue, valB ); } if (bRC == true) { bRC = sDB2Fragment::EvaluateExpression( valA, expr.mOperator, valB, arraySz ); // It makes no sense to have a negative sized array if (bRC == true && arraySz < 0) { bRC = false; } } } } break; } return bRC; } /*=========================================================================== METHOD: ModifyStringLength (Internal Method) DESCRIPTION: Modify string length based on existing field value, at the end of this function the field size will be the string length in bits PARAMETERS: frag [ I ] - Fragment descriptor field [ O ] - Field to modify RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ModifyStringLength( const sDB2Fragment & frag, sDB2Field & field ) { // Assume failure bool bRC = false; if (field.mType != eDB2_FIELD_STD) { // Why are we here? ASSERT( 0 ); return false; } if ( (field.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_A) && (field.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_U) && (field.mTypeVal != (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) ) { // Why are we here? ASSERT( 0 ); return false; } if ( (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) && (field.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U8) ) { // We can't have the size specified in characters when the // size of the character itself is variable length ASSERT( 0 ); return false; } tDB2Array1ModMap::const_iterator pIter; pIter = mArrays1.find( frag.mpModifierValue ); if (pIter == mArrays1.end()) { // Unable to obtain string length return bRC; } ULONG id = pIter->second; // Now find last occurence of this field ID and grab the value LONGLONG strSz; bRC = GetLastValue( id, strSz ); if (bRC == false || strSz < 0) { // Unable to obtain size or invalid size bRC = false; return bRC; } // Compute character size ULONG charSz = BITS_PER_BYTE; if (field.mTypeVal == (ULONG)eDB2_FIELD_STDTYPE_STRING_U) { charSz *= 2; } if (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) { strSz *= BITS_PER_BYTE; } else if (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) { strSz *= charSz; } if (strSz > ULONG_MAX) { // String length far too large bRC = false; return bRC; } if (strSz != 0) { if (strSz < charSz || (strSz % charSz) != 0) { // String length not a proper multiple of character size bRC = false; return bRC; } } field.mSize = (ULONG)strSz; return bRC; } /*=========================================================================== METHOD: ProcessEntity (Internal Method) DESCRIPTION: Process a protocol entity PARAMETERS: key [ I ] - Key into the protocol entity table RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ProcessEntity( const std::vector & key ) { // Assume failure bool bRC = false; // Look up entity definition const cDB2NavTree * pNavTree = mDB.GetEntityNavTree( key ); // Did we find it? if (pNavTree == 0) { return bRC; } // Is it valid? mEntity = pNavTree->GetEntity(); if (mEntity.IsValid() == false) { // No definition in database return bRC; } // Check if we should continue if (ContinueNavigation() == false) { // Success! bRC = true; return bRC; } // A structure to navigate? if (mEntity.mStructID == -1) { // Success! bRC = true; return bRC; } // Grab navigation fragments const std::list & frags = pNavTree->GetFragments(); // Nothing to navigate? if (frags.size() == 0) { ASSERT( 0 ); return bRC; } // No name? if (mEntity.mpName == 0 || mEntity.mpName[0] == 0) { ASSERT( 0 ); return bRC; } // Grab tracked fields mTrackedFields = pNavTree->GetTrackedFields(); std::string preamble = ""; // Process the initial structure EnterStruct( mEntity.mpName, -1 ); bRC = ProcessStruct( frags.front(), preamble, -1 ); ExitStruct( mEntity.mpName, -1 ); return bRC; } /*=========================================================================== METHOD: ProcessStruct (Internal Method) DESCRIPTION: Process a structure described by the given initial fragment PARAMETERS: pFrag [ I ] - First fragment in structure preamable [ I ] - String to prepend to any field/struct names arrayIndex [ I ] - Array index (-1 = not part of an array) RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ProcessStruct( const sDB2NavFragment * pFrag, const std::string & preamble, LONGLONG /* arrayIndex */ ) { // Assume success bool bRC = true; ULONG structSz = 0; ULONG structOffset = GetOffset(); // Grab current navigation order bool bOldLSB = GetLSBMode(); bool bNewLSB = bOldLSB; // Check for directives if (pFrag != 0) { bool bDirective = false; const sDB2Fragment & frag = *pFrag->mpFragment; if (frag.mFragmentType == eDB2_FRAGMENT_MSB_2_LSB) { bDirective = true; if (bOldLSB == true) { bNewLSB = false; bRC = SetLSBMode( bNewLSB ); } } if (frag.mFragmentType == eDB2_FRAGMENT_LSB_2_MSB) { bDirective = true; if (bOldLSB == false) { bNewLSB = true; bRC = SetLSBMode( bNewLSB ); } } if (bDirective == true) { // We process directives here so move on to the next fragment // upon success if (bRC == true) { pFrag = pFrag->mpNextFragment; } else { pFrag = 0; } } } // Process each fragment in the structure while (pFrag != 0) { bRC = ProcessFragment( pFrag, structOffset, structSz, preamble ); if (bRC == true) { pFrag = pFrag->mpNextFragment; } else { break; } } // Restore navigation order if (bRC == true && bOldLSB != bNewLSB) { bRC = SetLSBMode( bOldLSB ); } return bRC; } /*=========================================================================== METHOD: ProcessFragment (Internal Method) DESCRIPTION: Process the given fragment PARAMETERS: pFrag [ I ] - Fragment to be processed structOffset [ I ] - Offset (from start of payload) of enclosing struct structSize [ I ] - Current size of enclosing struct preamble [ I ] - String to prepend to any field/struct names RETURN VALUE: bool ===========================================================================*/ bool cProtocolEntityNav::ProcessFragment( const sDB2NavFragment * pFrag, ULONG structOffset, ULONG & structSize, const std::string & preamble ) { // Assume failure bool bRC = false; if (pFrag == 0 || pFrag->mpFragment == 0) { return bRC; } // Grab database fragment const sDB2Fragment & frag = *pFrag->mpFragment; // Is this fragment optional? if (frag.mModifierType == eDB2_MOD_OPTIONAL) { bool bParse = false; bool bOK = EvaluateCondition( frag.mpModifierValue, bParse ); if (bOK == false) { // Error evaluating the condition bRC = false; return bRC; } if (bParse == false) { // Condition not satisfied, nothing to parse bRC = true; return bRC; } } // Is this an array? LONGLONG arraySz = -1; LONGLONG arrayAdj = 0; bool bArray = ModifiedToArray( frag.mModifierType ); if (bArray == true) { bool bOK = GetArrayBounds( frag, arraySz, arrayAdj ); if (bOK == false) { // Error obtaining array dimensions bRC = false; return bRC; } else if (arraySz == 0) { // No array to process bRC = true; return bRC; } } // Set base name std::string baseName = ""; if (mbFieldNames == true) { baseName = preamble; // Add in fragment name? if (frag.mpName != EMPTY_STRING) { if (baseName.size() > 0) { baseName += PE_NAV_FIELD_SEP; } // Yes, add to the preamble baseName += frag.mpName; } } // Is this fragment offset? if (frag.mFragmentOffset != -1) { // Yes, add in offset to structure offset and save ULONG newOffset = frag.mFragmentOffset + structOffset; SetOffset( newOffset ); } // What type of fragment is this? switch (frag.mFragmentType) { case eDB2_FRAGMENT_FIELD: { const sDB2Field * pField = pFrag->mpField; if (pField != 0) { if (mbFieldNames == true) { if (baseName.size() > 0) { baseName += PE_NAV_FIELD_SEP; } // Add in field name baseName += pField->mpName; } // Variable string? sDB2Field modField; if ( (frag.mModifierType == eDB2_MOD_VARIABLE_STRING1) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING2) || (frag.mModifierType == eDB2_MOD_VARIABLE_STRING3) ) { modField = *pField; bRC = ModifyStringLength( frag, modField ); if (bRC == false) { // Unable to obtain string length return bRC; } if (modField.mSize == 0) { // String has no length - treat like an optional fragment bRC = true; return bRC; } pField = &modField; } // Handle an array? if (bArray == true) { EnterArray( frag, arraySz ); if (mbFieldNames == true) { ULONG baseLen = baseName.size(); std::string fieldName; fieldName.reserve( baseLen + 16 ); fieldName = baseName; CHAR arraySpec[32]; for (LONGLONG i = 0; i < arraySz; i++) { snprintf( arraySpec, 31, "[%lld]", i + arrayAdj ); fieldName += arraySpec; bRC = ProcessField( pField, fieldName, i ); if (bRC == false) { break; } // Remove the array specifier for the next pass fieldName.resize( baseLen ); } } else { for (LONGLONG i = 0; i < arraySz; i++) { bRC = ProcessField( pField, baseName, i ); if (bRC == false) { break; } } } ExitArray( frag, arraySz ); } else { bRC = ProcessField( pField, baseName ); } } } break; case eDB2_FRAGMENT_STRUCT: { if (pFrag->mpLinkFragment != 0) { // Handle an array? if (bArray == true) { EnterArray( frag, arraySz ); if (mbFieldNames == true) { ULONG baseLen = baseName.size(); std::string structName; structName.reserve( baseLen + 16 ); structName = baseName; CHAR arraySpec[32]; for (LONGLONG i = 0; i < arraySz; i++) { snprintf( arraySpec, 31, "[%lld]", i + arrayAdj ); structName += arraySpec; EnterStruct( frag.mpName, i ); bRC = ProcessStruct( pFrag->mpLinkFragment, structName, i ); ExitStruct( frag.mpName, i ); if (bRC == false) { break; } // Remove the array specifier for the next pass structName.resize( baseLen ); } } else { for (LONGLONG i = 0; i < arraySz; i++) { EnterStruct( frag.mpName, i ); bRC = ProcessStruct( pFrag->mpLinkFragment, baseName, i ); ExitStruct( frag.mpName, i ); if (bRC == false) { break; } } } ExitArray( frag, arraySz ); } else { EnterStruct( frag.mpName, -1 ); bRC = ProcessStruct( pFrag->mpLinkFragment, baseName ); ExitStruct( frag.mpName, -1 ); } } } break; case eDB2_FRAGMENT_CONSTANT_PAD: { // Is the structure is smaller than the specified // value that we are to pad out to? ULONG totalSz = frag.mFragmentValue; if (totalSz >= structSize) { ULONG newOffset = structOffset + totalSz; SetOffset( newOffset ); } // Succcess! bRC = true; } break; case eDB2_FRAGMENT_VARIABLE_PAD_BITS: case eDB2_FRAGMENT_VARIABLE_PAD_BYTES: { // Find last occurence of this field ID and grab the value LONGLONG totalSz = 0; bRC = GetLastValue( frag.mFragmentValue, totalSz ); if (bRC == true) { // Convert to bits? if (frag.mFragmentType == eDB2_FRAGMENT_VARIABLE_PAD_BYTES) { totalSz *= BITS_PER_BYTE; } // Is the structure is smaller than the specified // value that we are to pad out to? if ((ULONG)totalSz >= structSize) { ULONG newOffset = structOffset + (ULONG)totalSz; SetOffset( newOffset ); } } } break; case eDB2_FRAGMENT_FULL_BYTE_PAD: { ULONG totalSz = structSize; while ((totalSz % BITS_PER_BYTE) != 0) { totalSz++; } if (totalSz > structSize) { ULONG newOffset = structOffset + totalSz; SetOffset( newOffset ); } // Succcess! bRC = true; } break; default: bRC = false; break; } // Adjust struct size? if (bRC == true) { ULONG newOffset = GetOffset(); if (newOffset > structOffset) { ULONG newSz = newOffset - structOffset; if (newSz > structSize) { structSize = newSz; } } } return bRC; } /*=========================================================================== METHOD: GetPartialFieldName (Public Method) DESCRIPTION: Return the fully qualified field name given the partial name PARAMETERS: partialName [ I ] - Partial field name RETURN VALUE: std::string ===========================================================================*/ std::string cProtocolEntityNav::GetFullFieldName( const std::string & partialName ) const { std::string retStr = EMPTY_STRING; if (mEntity.mpName != 0 && mEntity.mpName != EMPTY_STRING) { retStr = mEntity.mpName; retStr += PE_NAV_FIELD_SEP; retStr += partialName; } return retStr; } /*=========================================================================== METHOD: GetPartialFieldName (Public Method) DESCRIPTION: Return the partial field name given the fully qualified name PARAMETERS: fieldNameFQ [ I ] - Fully qualified name RETURN VALUE: std::string ===========================================================================*/ std::string cProtocolEntityNav::GetPartialFieldName( const std::string & fieldNameFQ ) const { std::string retStr = EMPTY_STRING; if (mEntity.mpName != 0 && mEntity.mpName != EMPTY_STRING) { int idx = fieldNameFQ.find( mEntity.mpName, 0 ); if (idx == 0) { idx = fieldNameFQ.find( PE_NAV_FIELD_SEP ); if (idx != -1) { retStr = fieldNameFQ.substr( idx - 1 ); } } } return retStr; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolEntityNav.h000077500000000000000000000205321455567757300251100ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEntityNav.h DESCRIPTION: Declaration of cProtocolEntityNav PUBLIC CLASSES AND METHODS: cProtocolEntityNav This class serves as a base for all class that need to 'navigate' a protocol entity database description. It is necessary in order to seperate the structural aspects from parsing/packing details Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "CoreDatabase.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- struct sSharedBuffer; struct sDB2NavFragment; // Field seperator string extern LPCSTR PE_NAV_FIELD_SEP; // Types of protocol entity field attributes enum ePENavFieldAttr { ePENAV_FIELD_BEGIN = -1, ePENAV_FIELD_NAME, // Name of field ePENAV_FIELD_NAME_FULL, // Fully qualified name of field ePENAV_FIELD_NAME_PARTIAL, // Partially qualified name of field ePENAV_FIELD_VALUE, // Translated value of field ePENAV_FIELD_VALUE_RAW, // Raw value of field ePENAV_FIELD_TYPE, // Type of field ePENAV_FIELD_SIZE, // Size of field ePENAV_FIELD_OFFSET, // Offset of field ePENAV_FIELD_INDEX, // Index of field ePENAV_FIELD_ID, // ID of field ePENAV_FIELD_END // Number of field attributes }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: Is this a valid ePENavFieldAttr? PARAMETERS: contentType [ I ] - The enum value being validated RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( ePENavFieldAttr attr ) { bool bRC = false; if (attr > ePENAV_FIELD_BEGIN && attr < ePENAV_FIELD_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Class cProtocolEntityNav // Class to navigate a protocol entity /*=========================================================================*/ class cProtocolEntityNav { public: // Constructor cProtocolEntityNav( const cCoreDatabase & db ); // Destructor virtual ~cProtocolEntityNav(); // Return the fully qualified field name given the partial name virtual std::string GetFullFieldName( const std::string & partialName ) const; // Return the partial field name given the fully qualified name virtual std::string GetPartialFieldName( const std::string & fieldNameFQ ) const; protected: // Evaluate the given condition virtual bool EvaluateCondition( LPCSTR pCondition, bool & bResult ); // Get the array bounds described by the fragment descriptor virtual bool GetArrayBounds( const sDB2Fragment & frag, LONGLONG & arraySz, LONGLONG & arrayAdj ); // Return the value for the specified field ID as a // LONGLONG (field type must be able to fit) virtual bool GetLastValue( ULONG fieldID, LONGLONG & val ) = 0; // Modify string length based on existing field value virtual bool ModifyStringLength( const sDB2Fragment & frag, sDB2Field & field ); // Process the protocol entity described by the given key/name virtual bool ProcessEntity( const std::vector & key ); // (Inline) Contiue navigation now that entity has been set? virtual bool ContinueNavigation() { // Override to implement return true; }; // Process a structure described by the given initial fragment virtual bool ProcessStruct( const sDB2NavFragment * pFrag, const std::string & preamble, LONGLONG arrayIndex = -1 ); // Process the given fragment virtual bool ProcessFragment( const sDB2NavFragment * pFrag, ULONG structOffset, ULONG & structSize, const std::string & preamble ); // Process the given field virtual bool ProcessField( const sDB2Field * pField, const std::string & fieldName, LONGLONG arrayIndex = -1 ) = 0; // (Inline) Handle an array being entered virtual void EnterArray( const sDB2Fragment & /* frag */, LONGLONG /* arraySz */ ) { }; // (Inline) Handle an array being exited virtual void ExitArray( const sDB2Fragment & /* frag */, LONGLONG /* arraySz */ ) { }; // (Inline) Handle a structure being entered virtual void EnterStruct( LPCSTR /* pName */, LONGLONG /* arrayIndex */ ) { }; // (Inline) Handle a structure being exited virtual void ExitStruct( LPCSTR /* pName */, LONGLONG /* arrayIndex */ ) { }; // (Inline) Get current working offset virtual ULONG GetOffset() { // Override to implement return 0; }; // (Inline) Set current working offset virtual bool SetOffset( ULONG /* offset */ ) { // Override to implement return true; }; // (Inline) Get current navigation order virtual bool GetLSBMode() { // Override to implement return true; }; // (Inline) Set current navigation order virtual bool SetLSBMode( bool /* bLSB */ ) { // Override to implement return true; }; /* Generate field name strings? */ bool mbFieldNames; /* Protocol entity being navigated */ sDB2ProtocolEntity mEntity; /* Database reference */ const cCoreDatabase & mDB; /* References to DB tables we need */ const tDB2OptionalModMap & mConditions; const tDB2ExpressionModMap & mExpressions; const tDB2Array1ModMap & mArrays1; const tDB2Array2ModMap & mArrays2; /* Map of all 'tracked' fields */ std::map > mTrackedFields; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolEnum.h000077500000000000000000000163431455567757300241000ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEnum.h DESCRIPTION: Generic protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eProtocolType Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // eProtocolType Enumeration /*=========================================================================*/ enum eProtocolType { ePROTOCOL_ENUM_BEGIN = -1, ePROTOCOL_COMMAND, // 00 Protocol server command ePROTOCOL_AT, // 01 AT command protocol ePROTOCOL_NMEA, // 02 NMEA (GPS) protocol ePROTOCOL_DIAG_RX, // 03 DIAG protocol (incoming) ePROTOCOL_DIAG_TX, // 04 DIAG protocol (outgoing) ePROTOCOL_DOWNLOAD_RX, // 05 Download protocol (incoming) ePROTOCOL_DOWNLOAD_TX, // 06 Download protocol (outgoing) ePROTOCOL_SDOWNLOAD_RX, // 07 Streaming download protocol (incoming) ePROTOCOL_SDOWNLOAD_TX, // 08 Streaming download protocol (outgoing) ePROTOCOL_QDL_RX, // 09 QDL variant of streaming protocol (incoming) ePROTOCOL_QDL_TX, // 10 QDL variant of streaming protocol (outgoing) ePROTOCOL_QMI_CTL_RX, // 11 QMI CTL protocol (incoming) ePROTOCOL_QMI_CTL_TX, // 12 QMI CTL protocol (outgoing) ePROTOCOL_QMI_WDS_RX, // 13 QMI WDS protocol (incoming) ePROTOCOL_QMI_WDS_TX, // 14 QMI WDS protocol (outgoing) ePROTOCOL_QMI_DMS_RX, // 15 QMI DMS protocol (incoming) ePROTOCOL_QMI_DMS_TX, // 16 QMI DMS protocol (outgoing) ePROTOCOL_QMI_NAS_RX, // 17 QMI NAS protocol (incoming) ePROTOCOL_QMI_NAS_TX, // 18 QMI NAS protocol (outgoing) ePROTOCOL_QMI_QOS_RX, // 19 QMI QOS protocol (incoming) ePROTOCOL_QMI_QOS_TX, // 20 QMI QOS protocol (outgoing) ePROTOCOL_QMI_WMS_RX, // 21 QMI WMS protocol (incoming) ePROTOCOL_QMI_WMS_TX, // 22 QMI WMS protocol (outgoing) ePROTOCOL_QMI_PDS_RX, // 23 QMI PDS protocol (incoming) ePROTOCOL_QMI_PDS_TX, // 24 QMI PDS protocol (outgoing) ePROTOCOL_QMI_AUTH_RX, // 25 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AUTH_TX, // 26 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_CAT_RX, // 27 QMI CAT protocol (incoming) ePROTOCOL_QMI_CAT_TX, // 28 QMI CAT protocol (outgoing) ePROTOCOL_QMI_RMS_RX, // 29 QMI RMS protocol (incoming) ePROTOCOL_QMI_RMS_TX, // 30 QMI RMS protocol (outgoing) ePROTOCOL_QMI_OMA_RX, // 31 QMI OMA protocol (incoming) ePROTOCOL_QMI_OMA_TX, // 32 QMI OMA protocol (outgoing) ePROTOCOL_QMI_VOICE_RX, // 33 QMI Voice protocol (incoming) ePROTOCOL_QMI_VOICE_TX, // 34 QMI Voice protocol (outgoing) ePROTOCOL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolType validity check PARAMETERS: pt [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolType pt ) { bool retVal = false; if (pt > ePROTOCOL_ENUM_BEGIN && pt < ePROTOCOL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocol( eProtocolType pt ) { bool retVal = false; if (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_VOICE_TX) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolRX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the incoming direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolRX( eProtocolType pt ) { bool retVal = false; switch (pt) { case ePROTOCOL_QMI_CTL_RX: case ePROTOCOL_QMI_WDS_RX: case ePROTOCOL_QMI_DMS_RX: case ePROTOCOL_QMI_NAS_RX: case ePROTOCOL_QMI_QOS_RX: case ePROTOCOL_QMI_WMS_RX: case ePROTOCOL_QMI_PDS_RX: case ePROTOCOL_QMI_AUTH_RX: case ePROTOCOL_QMI_CAT_RX: case ePROTOCOL_QMI_RMS_RX: case ePROTOCOL_QMI_OMA_RX: case ePROTOCOL_QMI_VOICE_RX: retVal = true; break; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolTX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the outgoing direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolTX( eProtocolType pt ) { bool retVal = false; switch (pt) { case ePROTOCOL_QMI_CTL_TX: case ePROTOCOL_QMI_WDS_TX: case ePROTOCOL_QMI_DMS_TX: case ePROTOCOL_QMI_NAS_TX: case ePROTOCOL_QMI_QOS_TX: case ePROTOCOL_QMI_WMS_TX: case ePROTOCOL_QMI_PDS_TX: case ePROTOCOL_QMI_AUTH_TX: case ePROTOCOL_QMI_CAT_TX: case ePROTOCOL_QMI_RMS_TX: case ePROTOCOL_QMI_OMA_TX: case ePROTOCOL_QMI_VOICE_TX: retVal = true; break; } return retVal; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolLog.cpp000077500000000000000000000133241455567757300242440ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class definition PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolLog.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // The maximum number of in-memory buffers we allow const ULONG MAX_PROTOCOL_BUFFERS = 1024 * 16; /*=========================================================================*/ // cProtocolLog Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolLog (Public Method) DESCRIPTION: Constructor PARAMETERS: maxBuffers [ I ] - Maximum number of buffers to store in the log RETURN VALUE: None ===========================================================================*/ cProtocolLog::cProtocolLog( ULONG maxBuffers ) : mLog( maxBuffers > MAX_PROTOCOL_BUFFERS ? MAX_PROTOCOL_BUFFERS : maxBuffers, true ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolLog (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolLog::~cProtocolLog() { // Empty out the log Clear(); } /*=========================================================================== METHOD: AddBuffer (Public Method) DESCRIPTION: Add an protocol buffer to the end of the log PARAMETERS: buff [ I ] - Protocol buffer to add RETURN VALUE: ULONG - Index of newly added buffer (INVALID_LOG_INDEX upon failure) ===========================================================================*/ ULONG cProtocolLog::AddBuffer( sProtocolBuffer & buf ) { ULONG idx = INVALID_LOG_INDEX; if (buf.IsValid() == false) { return idx; } bool bRC = mLog.AddElement( buf, idx ); if (bRC == false) { idx = INVALID_LOG_INDEX; } return idx; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Return the protocol buffer at the given index from the log PARAMETERS: idx [ I ] - Index of protocol buffer to obtain RETURN VALUE: sProtocolBuffer - Protocol buffer ===========================================================================*/ sProtocolBuffer cProtocolLog::GetBuffer( ULONG idx ) const { sProtocolBuffer buf; mLog.GetElement( idx, buf ); return buf; } /*=========================================================================== METHOD: GetSignalEvent (Public Method) DESCRIPTION: Return the underlying signal event, which will be set when the log is updated. RETURN VALUE: cEvent - Signal event ===========================================================================*/ cEvent & cProtocolLog::GetSignalEvent() const { return mLog.GetSignalEvent(); } /*=========================================================================== METHOD: GetCount (Public Method) DESCRIPTION: Return the total number of buffers added to the log RETURN VALUE: ULONG ===========================================================================*/ ULONG cProtocolLog::GetCount() const { return mLog.GetTotalCount(); } /*=========================================================================== METHOD: Clear (Public Method) DESCRIPTION: Clear the log RETURN VALUE: None ===========================================================================*/ void cProtocolLog::Clear() { mLog.EmptyQueue(); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolLog.h000077500000000000000000000070261455567757300237130ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class declaration PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "SyncQueue.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const ULONG INVALID_LOG_INDEX = ULONG_MAX; /*=========================================================================*/ // Class cProtocolLog /*=========================================================================*/ class cProtocolLog { public: // Constructor cProtocolLog( ULONG maxBuffers ); // Destructor virtual ~cProtocolLog(); // Add an protocol buffer to the end of the log virtual ULONG AddBuffer( sProtocolBuffer & buf ); // Return the protocol buffer at the given index from the log virtual sProtocolBuffer GetBuffer( ULONG idx ) const; // Return the underlying signal event virtual cEvent & GetSignalEvent() const; // Return the total number of buffers added to the log virtual ULONG GetCount() const; // Clear the log virtual void Clear(); protected: /* The underlying 'log' */ cSyncQueue mLog; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolNotification.cpp000077500000000000000000000132341455567757300261510ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.cpp DESCRIPTION: Implementation of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolNotification.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cProtocolQueueNotification Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Constructor PARAMETERS: pSQ [ I ] - Sync queue to utilize RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( cSyncQueue * pSQ ) : mpSQ( pSQ ) { // Nothing to do } /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Copy constructor PARAMETERS: notifier [ I ] - Notifier to base the new one on RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( const cProtocolQueueNotification & notifier ) : mpSQ( notifier.mpSQ ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolQueueNotification (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::~cProtocolQueueNotification() { mpSQ = 0; } /*=========================================================================== METHOD: Clone (Public Method) DESCRIPTION: Return an allocated copy of this object downcasted to our base class RETURN VALUE: cProtocolNotification * : Cloned object (0 on error) ===========================================================================*/ cProtocolNotification * cProtocolQueueNotification::Clone() const { cProtocolQueueNotification * pCopy = 0; try { pCopy = new cProtocolQueueNotification( *this ); } catch (...) { // Simply return 0 } return ((cProtocolNotification *)pCopy); } /*=========================================================================== METHOD: Notify (Public Method) DESCRIPTION: Notify view of a protocol event by adding notification structure to the underlying sync queue (which will provide the notification by signalling an event) PARAMETERS: eventType [ I ] - Protocol event type param1 [ I ] - Event type specific argument (see header description) param2 [ I ] - Event type specific argument (see header description) RETURN VALUE: None ===========================================================================*/ void cProtocolQueueNotification::Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const { sProtocolNotificationEvent evt( eventType, param1, param2 ); if (evt.IsValid() == true && mpSQ != 0 && mpSQ->IsValid() == true) { sProtocolNotificationEvent elem( eventType, param1, param2 ); mpSQ->AddElement( elem ); } } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolNotification.h000077500000000000000000000174311455567757300256210ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.h DESCRIPTION: Declaration of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SyncQueue.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- enum eProtocolEventType { ePROTOCOL_EVT_BEGIN = -1, ePROTOCOL_EVT_REQ_ERR, // There was an error sending the request ePROTOCOL_EVT_REQ_SENT, // The request has been sent ePROTOCOL_EVT_RSP_ERR, // There was an error receiving the response ePROTOCOL_EVT_RSP_RECV, // The response has been received ePROTOCOL_EVT_AUX_TU_SENT, // Auxiliary data transmission unit sent ePROTOCOL_EVT_END }; // NOTE: The arguments for each event are currently as follows: // // ePROTOCOL_EVT_REQ_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_REQ_SENT // param1: Request ID // param2: Index of request buffer in associated protocol log // ePROTOCOL_EVT_RSP_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_RSP_RECV // param1: Request ID // param2: Index of response buffer in associated protocol log // // ePROTOCOL_EVT_AUX_TU_SENT // param1: Request ID // param2: Size of transmission unit // NOTE: To handle protoocl events using the Windows notifier add the following // prototype to your Window class header file: // // afx_msg LRESULT OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ); // // Then add an entry to the message map in your Window class source file: // // BEGIN_MESSAGE_MAP( CView, CChildView ) // ON_MESSAGE( PROTOCOL_WM_BASE + (ULONG)ePROTOCOL_EVT_XXX, OnProtocolEvent ) // END_MESSAGE_MAP() // // Finally write the handler itself: // // LRESULT CView::OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ) // { // Do something // return 0; // } /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolEventType validity check PARAMETERS: evtType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolEventType evtType ) { bool bRC = false; if (evtType > ePROTOCOL_EVT_BEGIN && evtType < ePROTOCOL_EVT_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Struct sProtocolNotificationEvent /*=========================================================================*/ struct sProtocolNotificationEvent { public: // (Inline) Default constructor (results in invalid object) sProtocolNotificationEvent() : mEventType( ePROTOCOL_EVT_BEGIN ), mParam1( 0 ), mParam2( 0 ) { // Nothing to do }; // (Inline) Parameter constructor sProtocolNotificationEvent( eProtocolEventType eventType, DWORD param1, DWORD param2 ) : mEventType( eventType ), mParam1( param1 ), mParam2( param2 ) { // Nothing to do }; // (Inline) Is this object valid? bool IsValid() { return ::IsValid( mEventType ); } /* Event type */ eProtocolEventType mEventType; /* First parameter (see above) */ DWORD mParam1; /* Second parameter (see above) */ DWORD mParam2; }; /*=========================================================================*/ // Class cProtocolNotification // // This abstract base class provides notification of protocol server // events sent from the protocol server to protocol server clients /*=========================================================================*/ class cProtocolNotification { public: // Return an allocated copy of this object virtual cProtocolNotification * Clone() const = 0; // Notify view of a protocol event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const = 0; }; /*=========================================================================*/ // Class cProtocolQueueNotification // // This class provides notification via a cSyncQueue object // populated with sProtocolNotificationEvent objects /*=========================================================================*/ class cProtocolQueueNotification : public cProtocolNotification { public: // Constructor cProtocolQueueNotification( cSyncQueue * pSQ ); // Copy constructor cProtocolQueueNotification( const cProtocolQueueNotification & notifier ); // Destructor virtual ~cProtocolQueueNotification(); // Return a copy of this object virtual cProtocolNotification * Clone() const; // Notify view of a MIS event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const; protected: /* Event notification queue */ mutable cSyncQueue * mpSQ; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolRequest.cpp000077500000000000000000000177471455567757300251700ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.cpp DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolRequest.h" #include "ProtocolNotification.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout const ULONG DEFAULT_REQ_TIMEOUT = 1000; // Minimum and maximum allowable timeout values (in milliseconds) const ULONG MIN_REQ_TIMEOUT = 100; const ULONG MAX_REQ_TIMEOUT = 300000; // Minimum number of attempts a request can be scheduled for const ULONG MIN_REQ_ATTEMPTS = 1; // Value to indicate that a request is to be sent out indefinately const ULONG INFINITE_REQS = 0xFFFFFFFF; // Minimum/default amount of time between repeated requests (in milliseconds) const ULONG MIN_REQ_FREQUENCY = 10; const ULONG DEFAULT_REQ_FREQUENCY = 100; /*=========================================================================*/ // sProtocolRequest Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) schedule [ I ] - When (from now, in milliseconds) to send the first request, this isn't a hard value as the request is only guaranteed to go out after this time elapses timeout [ I ] - Milliseconds to wait for a response to an individual request before declaring a timeout. Regardless of what is passed in the timeout value used will be between MIN/MAX_REQ_TIMEOUT requests [ I ] - Number of request attempts to make, this isn't a retry count rather this value is used to specify repeating requests. Regardless of what is passed in the requests value used will be at least MIN_REQ_ATTEMPTS frequency [ I ] - If the 'requests' value is greater than the MIN_REQ_ATTEMPTS than this represents the amount of time to wait between requests (from the completion of the last request attempt, in milliseconds), again this isn't a hard value. Regardless of what is passed in the frequency value used will be at least MIN_REQ_FREQUENCY pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule, ULONG timeout, ULONG requests, ULONG frequency, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( schedule ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( 0 ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Constrain requested timeout to allowable range if (timeout < MIN_REQ_TIMEOUT) { timeout = MIN_REQ_TIMEOUT; } if (timeout > MAX_REQ_TIMEOUT) { timeout = MAX_REQ_TIMEOUT; } mTimeout = timeout; // Constrain request attempts if (requests >= MIN_REQ_ATTEMPTS) { mRequests = requests; } // Constrain frequency if (frequency >= MIN_REQ_FREQUENCY) { mFrequency = frequency; } // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor (notification with defaults) PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( 0 ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( pNotifier ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Copy constructor PARAMETERS: req [ I ] - Request to copy RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( const sProtocolRequest & req ) : sProtocolBuffer( req ), mSchedule( req.mSchedule ), mTimeout( req.mTimeout ), mRequests( req.mRequests ), mFrequency( req.mFrequency ), mpNotifier( 0 ), mpAuxData( req.mpAuxData ), mAuxDataSize( req.mAuxDataSize ), mbTXOnly( req.mbTXOnly ) { // Clone notifier? if (req.mpNotifier != 0) { mpNotifier = req.mpNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: ~sProtocolRequest DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolRequest::~sProtocolRequest() { // Delete cloned notifier? if (mpNotifier != 0) { delete mpNotifier; mpNotifier = 0; } } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolRequest.h000077500000000000000000000146261455567757300246260ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.h DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing protocol requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolNotification; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout extern const ULONG DEFAULT_REQ_TIMEOUT; // Minimum and maximum allowable timeout values (in milliseconds) extern const ULONG MIN_REQ_TIMEOUT; extern const ULONG MAX_REQ_TIMEOUT; // Minimum number of attempts a request can be scheduled for extern const ULONG MIN_REQ_ATTEMPTS; // Value to indicate that a request is to be sent out indefinately extern const ULONG INFINITE_REQS; // Minimum/default amount of time between repeated requests (in milliseconds) extern const ULONG MIN_REQ_FREQUENCY; extern const ULONG DEFAULT_REQ_FREQUENCY; /*=========================================================================*/ // Struct sProtocolRequest // // Structure to represent a generic request packet, including all the // information needed to schedule the request, send the request, and // (optionally) reschedule the request for another TX/RX attempt // // The default parameters schedule an immediate request (indicated by // passing in '0' for the schedule parameter) to be sent once with // the default timeout value /*=========================================================================*/ struct sProtocolRequest : public sProtocolBuffer { public: // Parameterized constructor sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule = 0, ULONG timeout = DEFAULT_REQ_TIMEOUT, ULONG requests = MIN_REQ_ATTEMPTS, ULONG frequency = DEFAULT_REQ_FREQUENCY, cProtocolNotification * pNotifier = 0 ); // Parameterized constructor (notification with defaults) sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ); // Copy constructor sProtocolRequest( const sProtocolRequest & req ); // Destructor virtual ~sProtocolRequest(); // (Inline) Get schedule value (value is in milliseconds) ULONG GetSchedule() const { return mSchedule; }; // (Inline) Get timeout value ULONG GetTimeout() const { return mTimeout; }; // (Inline) Get requests value ULONG GetRequests() const { return mRequests; }; // (Inline) Get frequency value (value is in milliseconds) ULONG GetFrequency() const { return mFrequency; }; const cProtocolNotification * GetNotifier() const { return mpNotifier; }; // (Inline) Set auxiliary data void SetAuxiliaryData( const BYTE * pData, ULONG dataSz ) { mpAuxData = pData; mAuxDataSize = dataSz; }; // (Inline) Get auxiliary data const BYTE * GetAuxiliaryData( ULONG & dataSz ) const { dataSz = mAuxDataSize; return mpAuxData; }; // (Inline) Set TX only flag void SetTXOnly() { mbTXOnly = true; }; // (Inline) Get TX only flag bool IsTXOnly() const { return mbTXOnly; }; protected: /* Schedule (approximately when to send the initial request) */ ULONG mSchedule; /* Timeout value for receiving a response */ ULONG mTimeout; /* Number of requests to schedule (must be at least one) */ ULONG mRequests; /* Frequency (approximately how long to wait before next request) */ ULONG mFrequency; /* Notification object */ cProtocolNotification * mpNotifier; /* Auxiliary data */ const BYTE * mpAuxData; /* Auxilary data size */ ULONG mAuxDataSize; /* TX only (i.e. do not wait for a response) ? */ bool mbTXOnly; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolServer.cpp000077500000000000000000001313531455567757300247740ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.cpp DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolServer.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID const ULONG INVALID_REQUEST_ID = 0; // Default activity timeout value const ULONG DEFAULT_WAIT = 10000; // MTU (Maximum Transmission Unit) for auxiliary data (QC USB imposed) const ULONG MAX_AUX_MTU_SIZE = 1024 * 256; // USB's MaxPacketSize const ULONG MAX_PACKET_SIZE = 512; // Maximum amount of time to wait on external access synchronization object #ifdef DEBUG // For the sake of debugging do not be so quick to assume failure const ULONG DEADLOCK_TIME = 180000; #else const ULONG DEADLOCK_TIME = 10000; #endif // Maximum amount of time to wait for the protocol server to process a command const ULONG COMMAND_TIME = DEADLOCK_TIME; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ScheduleThread (Free Method) DESCRIPTION: Watch schedule for event to process or timeout PARAMETERS: pArg [ I ] - The protocol server object RETURN VALUE: void * - thread exit value (always NULL) ===========================================================================*/ void * ScheduleThread( PVOID pArg ) { // Do we have a server? cProtocolServer * pServer = (cProtocolServer *)pArg; if (pServer == 0) { TRACE( "ScheduleThread started with empty pArg." " Unable to locate cProtocolServer\n" ); ASSERT( 0 ); return NULL; } TRACE( "Schedule thread [%lu] started\n", pthread_self() ); // Default wait event timespec toTime = TimeIn( DEFAULT_WAIT ); // Return value checking int nRet; while (pServer->mbExiting == false) { DWORD nTemp; nRet = pServer->mThreadScheduleEvent.Wait( TimeFromNow( toTime ), nTemp ); if (nRet != 0 && nRet != ETIME) { // Error condition TRACE( "ScheduleThread [%lu] ScheduleThread wait error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Time to exit? if (pServer->mbExiting == true) { break; } nRet = pthread_mutex_lock( &pServer->mScheduleMutex ); if (nRet != 0) { // Error condition TRACE( "ScheduleThread [%lu] mScheduleMutex error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Verify time. In the rare event it does move backward // it would simply place all our schedule items as due now pServer->CheckSystemTime(); // Default next wait period toTime = TimeIn( DEFAULT_WAIT ); timespec curTime = TimeIn( 0 ); if (pServer->mpActiveRequest != 0) { if (pServer->mpActiveRequest->mbWaitingForResponse == true) { // Waiting on a response, this takes priority over the next // scheduled event // Has timeout expired? if (pServer->mActiveRequestTimeout <= curTime) { // Response timeout // Note: This may clear mpActiveRequest pServer->RxTimeout(); } else { // Active response timer is not yet due to expire // Default timeout again, or this response's timeout? if (pServer->mActiveRequestTimeout <= toTime) { toTime = pServer->mActiveRequestTimeout; } } } else { // This should never happen TRACE( "ScheduleThread() Sequencing error: " "Active request %lu is not waiting for response ???\n", pServer->mpActiveRequest->mID ); pthread_mutex_unlock( &pServer->mScheduleMutex ); break; } } if (pServer->mpActiveRequest == 0 && pServer->mRequestSchedule.size() > 0) { // No response timer active, ready to start the next // scheduled item if due timespec scheduledItem = pServer->GetNextRequestTime(); // Is item due to be scheduled? if (scheduledItem <= curTime) { // Process scheduled item pServer->ProcessRequest(); } else { // Scheduled item is not yet due to be processed // Default timeout again, or this item's start time? if (scheduledItem <= toTime) { toTime = scheduledItem; } } } /*TRACE( "Updated timer at %llu waiting %lu\n", GetTickCount(), TimeFromNow( toTime ) ); */ pthread_mutex_unlock( &pServer->mScheduleMutex ); } TRACE( "Schedule thread [%lu] exited\n", pthread_self() ); return NULL; } /*=========================================================================== METHOD: TimeIn (Free Method) DESCRIPTION: Fill timespec with the time it will be in specified milliseconds Relative time to Absolute time PARAMETERS: millis [ I ] - Milliseconds from current time RETURN VALUE: timespec - resulting time (from epoc) NOTE: tv_sec of 0 is an error ===========================================================================*/ timespec TimeIn( ULONG millis ) { timespec outTime; int nRC = clock_gettime( CLOCK_REALTIME, &outTime ); if (nRC == 0) { // Add avoiding an overflow on (long)nsec outTime.tv_sec += millis / 1000l; outTime.tv_nsec += ( millis % 1000l ) * 1000000l; // Check if we need to carry if (outTime.tv_nsec >= 1000000000l) { outTime.tv_sec += outTime.tv_nsec / 1000000000l; outTime.tv_nsec = outTime.tv_nsec % 1000000000l; } } else { outTime.tv_sec = 0; outTime.tv_nsec = 0; } return outTime; } /*=========================================================================== METHOD: TimeFromNow (Free Method) DESCRIPTION: Find the milliseconds from current time this timespec will occur Absolute time to Relative time PARAMETERS: time [ I ] - Absolute time RETURN VALUE: Milliseconds in which absolute time will occur 0 if time has passed or error has occured ===========================================================================*/ ULONG TimeFromNow( timespec time ) { // Assume failure ULONG nOutTime = 0; timespec now; int nRC = clock_gettime( CLOCK_REALTIME, &now ); if (nRC == -1) { TRACE( "Error %d with gettime, %s\n", errno, strerror( errno ) ); return nOutTime; } if (time <= now) { return nOutTime; } nOutTime = (time.tv_sec - now.tv_sec) * 1000l; nOutTime += (time.tv_nsec - now.tv_nsec) / 1000000l; return nOutTime; } /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime = TimeIn( 0 ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================*/ // cProtocolServerRxCallback Methods /*=========================================================================*/ /*=========================================================================== METHOD: IOComplete (Free Method) DESCRIPTION: The I/O has been completed, process the results PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Bytes received during operation RETURN VALUE: None ===========================================================================*/ void cProtocolServerRxCallback::IOComplete( DWORD status, DWORD bytesReceived ) { if (mpServer != 0) { mpServer->RxComplete( status, bytesReceived ); } } /*=========================================================================*/ // cProtocolServer::sProtocolReqRsp Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Constructor PARAMETERS: requestInfo [ I ] - Underlying request object requestID [ I ] - Request ID auxDataMTU [ I ] - MTU (Maximum Transmission Unit) for auxiliary data RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ) : mRequest( requestInfo ), mID( requestID ), mAttempts( 0 ), mEncodedSize( requestInfo.GetSize() ), mRequiredAuxTxs( 0 ), mCurrentAuxTx( 0 ), mbWaitingForResponse( false ) { ULONG auxDataSz = 0; const BYTE * pAuxData = requestInfo.GetAuxiliaryData( auxDataSz ); // Compute the number of required auxiliary data transmissions? if (auxDataMTU > 0 && pAuxData != 0 && auxDataSz > 0) { mRequiredAuxTxs = 1; if (auxDataSz > auxDataMTU) { mRequiredAuxTxs = auxDataSz / auxDataMTU; if ((auxDataSz % auxDataMTU) != 0) { mRequiredAuxTxs++; } } } } /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Coop constructor PARAMETERS: reqRsp [ I ] - Object being copied RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolReqRsp & reqRsp ) : mRequest( reqRsp.mRequest ), mID( reqRsp.mID ), mAttempts( reqRsp.mAttempts ), mEncodedSize( reqRsp.mEncodedSize ), mRequiredAuxTxs( reqRsp.mRequiredAuxTxs ), mCurrentAuxTx( reqRsp.mCurrentAuxTx ), mbWaitingForResponse( reqRsp.mbWaitingForResponse ) { // Nothing to do }; /*=========================================================================*/ // cProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : mComm(), mRxCallback(), mScheduleThreadID( 0 ), mThreadScheduleEvent(), mbExiting( false ), mpServerControl( 0 ), mLastRequestID( 1 ), mpActiveRequest( 0 ), mpRxBuffer( 0 ), mRxBufferSize( bufferSzRx ), mRxType( rxType ), mTxType( txType ), mLog( logSz ) { mLastTime = TimeIn( 0 ); // Allocate receive buffer? if (mRxBufferSize > 0 && mComm.IsValid() == true) { mpRxBuffer = new BYTE[mRxBufferSize]; } // Before continuing verify receive buffer was allocated if (mpRxBuffer != 0) { // Schedule mutex int nRet = pthread_mutex_init( &mScheduleMutex, NULL ); if (nRet != 0) { TRACE( "Unable to init schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } } } /*=========================================================================== METHOD: ~cProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::~cProtocolServer() { // This should have already been called, but ... Exit(); // Schedule mutex int nRet = pthread_mutex_destroy( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to destroy schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); } // Free receive buffer if (mpRxBuffer != 0) { delete [] mpRxBuffer; mpRxBuffer = 0; } } /*=========================================================================== METHOD: HandleRemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request Note: if a request is being processed, it cannot be inturrupted PARAMETERS: reqID [ I ] - Server assigned request ID SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::HandleRemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Find and erase request from request map std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); if (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } mRequestMap.erase( pReqIter ); // Success! bRC = true; // Find and erase request from schedule bool bFound = false; int entryIndex = -1; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { entryIndex++; tSchedule entry = *pScheduleIter; if (entry.second == reqID) { bFound = true; mRequestSchedule.erase( pScheduleIter ); break; } else { pScheduleIter++; } } // Note: schedule will be updated when mutex is unlocked/signaled } else if (mpActiveRequest != 0 && mpActiveRequest->mID == reqID) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Cancel the response timer (when active) if (mpActiveRequest->mbWaitingForResponse == true) { // Schedule will be updated when mutex is unlocked // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)reqID, ECANCELED ); } } else { // This is the active request, cancel the underlying transmit // Note: Because ProcessRequest and RemoveRequest are both muxed // with ScheduleMutex, it is impossible to for the write // to actually be in progress when this code is reached. mComm.CancelTx(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, ECANCELED ); } } // Now delete the request delete mpActiveRequest; mpActiveRequest = 0; // Success! bRC = true; } else { TRACE( "cProtocolServer::RemoveRequest( %lu )," " invalid request ID\n", reqID ); } return bRC; } /*=========================================================================== METHOD: ScheduleRequest (Internal Method) DESCRIPTION: Schedule a request for transmission PARAMETERS: reqID [ I ] - ID of the request being scheduled this ID must exist in the internal request/schedule maps schedule [ I ] - Value in milliseconds that indicates the approximate time from now that the request is to be sent out, the actual time that the request is sent will be greater than or equal to this value dependant on requests scheduled before the request in question and standard server processing time SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ScheduleRequest( ULONG reqID, ULONG schedule ) { // Assume failure bool bRC = false; // Schedule adjust is in milliseconds timespec schTimer = TimeIn( schedule ); // Create the schedule entry tSchedule newEntry( schTimer, reqID ); // Fit this request into the schedule (ordered by scheduled time) mRequestSchedule.insert( newEntry ); // Note: timer will be updated when mScheduleMutex is unlocked return bRC; } /*=========================================================================== METHOD: RescheduleActiveRequest (Internal Method) DESCRIPTION: Reschedule (or cleanup) the active request SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RescheduleActiveRequest() { // Are there more attempts to be made? if (mpActiveRequest->mAttempts < mpActiveRequest->mRequest.GetRequests()) { // Yes, first reset the request mpActiveRequest->Reset(); // Now add it back to the request map mRequestMap[mpActiveRequest->mID] = mpActiveRequest; TRACE( "RescheduleActiveRequest(): req %lu rescheduled\n", mpActiveRequest->mID ); // Lastly reschedule the request ScheduleRequest( mpActiveRequest->mID, mpActiveRequest->mRequest.GetFrequency() ); } else { TRACE( "RescheduleActiveRequest(): req %lu removed\n", mpActiveRequest->mID ); // No, we are through with this request delete mpActiveRequest; } // There is no longer an active request mpActiveRequest = 0; } /*=========================================================================== METHOD: ProcessRequest (Internal Method) DESCRIPTION: Process a single outgoing protocol request, this consists of removing the request ID from the head of the schedule, looking up the internal request object in the request map, sending out the request, and setting up the response timer (if a response is required) SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: ===========================================================================*/ void cProtocolServer::ProcessRequest() { // Is there already an active request? if (mpActiveRequest != 0) { return; } // Grab request ID from the schedule std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); // Did we find the request? if (pScheduleIter == mRequestSchedule.end()) { // No return; } // Yes, grab the request ID ULONG reqID = pScheduleIter->second; // Remove from schedule mRequestSchedule.erase( pScheduleIter ); // Look up the internal request object std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); // Request not found around? if (pReqIter == mRequestMap.end() || pReqIter->second == 0) { // No return; } // Set this request as the active request mpActiveRequest = pReqIter->second; TRACE( "ProcessRequest(): req %lu started\n", mpActiveRequest->mID ); // Remove request from pending request map mRequestMap.erase( pReqIter ); // Extract the underlying request const sProtocolRequest & req = mpActiveRequest->mRequest; // Increment attempt count? if (req.GetRequests() != INFINITE_REQS) { // This request isn't an indefinite one, so keep track of each attempt mpActiveRequest->mAttempts++; } bool bTxSuccess = false; // Encode data for transmission? bool bEncoded = false; sSharedBuffer * pEncoded = 0; pEncoded = EncodeTxData( req.GetSharedBuffer(), bEncoded ); if (bEncoded == false) { // Note: no longer asynchronus // Send the request data bTxSuccess = mComm.TxData( req.GetBuffer(), req.GetSize() ); } else if (bEncoded == true) { if (pEncoded != 0 && pEncoded->IsValid() == true) { // Note: no longer asynchronus // Send the request data mpActiveRequest->mEncodedSize = pEncoded->GetSize(); bTxSuccess = mComm.TxData( pEncoded->GetBuffer(), pEncoded->GetSize() ); } } if (bTxSuccess == true) { TRACE( "ProcessRequest(): req %lu finished\n", mpActiveRequest->mID ); TxComplete(); } else { TxError(); TRACE( "ProcessRequest(): req finished with a TxError\n" ); } return; } /*=========================================================================== METHOD: CheckSystemTime (Internal Method) DESCRIPTION: Check that system time hasn't moved backwards. Since we use the system time for scheduling requests we need to periodically check that the user (or system itself) hasn't reset system time backwards, if it has then we reschedule everything to the current system time. This disrupts the schedule but avoids stranding requests Updates mLastTime SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool: System time moved backwards? ===========================================================================*/ bool cProtocolServer::CheckSystemTime() { // Assume that time is still marching forward bool bAdjust = false; timespec curTime = TimeIn( 0 ); if (curTime < mLastTime) { // Looks like the system clock has been adjusted to an earlier // value, go through the current schedule and adjust each timer // to reflect the adjustment. This isn't an exact approach but // it prevents requests from being stranded which is our goal // Note: set iterators are constant. This means we need to // create a set with the new data, we can't modify this one std::set < tSchedule, std::less > tempSchedule; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { tSchedule entry = *pScheduleIter; entry.first.tv_sec = curTime.tv_sec; entry.first.tv_nsec = curTime.tv_nsec; tempSchedule.insert( entry ); pScheduleIter++; } mRequestSchedule = tempSchedule; // Update mActiveRequestTimeout if ( (mpActiveRequest != 0) && (mpActiveRequest->mbWaitingForResponse == true) ) { // Restart active request's timeout ULONG mTimeout = mpActiveRequest->mRequest.GetTimeout(); mActiveRequestTimeout = TimeIn( mTimeout ); } TRACE( "Time has moved backwards, schedule updated\n" ); // Indicate the change bAdjust = true; } mLastTime.tv_sec = curTime.tv_sec; mLastTime.tv_nsec = curTime.tv_nsec; return bAdjust; } /*=========================================================================== METHOD: RxComplete (Internal Method) DESCRIPTION: Handle completion of receive data operation PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Number of bytes received SEQUENCING: This method is sequenced according to the schedule mutex i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxComplete( DWORD status, DWORD bytesReceived ) { if (status != NO_ERROR) { TRACE( "cProtocolServer::RxComplete() = %lu\n", status ); } // Error with the read if (status != NO_ERROR || bytesReceived == 0) { // Setup the next read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); return; } // Get Schedule Mutex if (GetScheduleMutex() == false) { TRACE( "RxComplete(), unable to get schedule Mutex\n" ); return; } TRACE( "RxComplete() - Entry at %llu\n", GetTickCount() ); // Decode data bool bAbortTx = false; ULONG rspIdx = INVALID_LOG_INDEX; bool bRsp = DecodeRxData( bytesReceived, rspIdx, bAbortTx ); // Is there an active request that needs to be aborted if (mpActiveRequest != 0 && bAbortTx == true) { // Yes, terminate the transmission and handle the error mComm.CancelTx(); TxError(); } // Is there an active request and a valid response? else if (mpActiveRequest != 0 && bRsp == true) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client that response was received if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_RECV, (DWORD)mpActiveRequest->mID, (DWORD)rspIdx ); } // Reschedule request as needed RescheduleActiveRequest(); } // Setup the next read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); TRACE( "RxComplete() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return; } return; } /*=========================================================================== METHOD: RxTimeout (Internal Method) DESCRIPTION: Handle the response timer expiring SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxTimeout() { // No active request? if (mpActiveRequest == 0) { TRACE( "RxTimeout() with no active request\n" ); ASSERT( 0 ); } TRACE( "RxTimeout() for req %lu\n", mpActiveRequest->mID ); const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)mpActiveRequest->mID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: TxComplete (Internal Method) DESCRIPTION: Handle completion of transmit data operation PARAMETERS: SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxComplete() { // No active request? if (mpActiveRequest == 0) { TRACE( "TxComplete() called with no active request\n" ); ASSERT( 0 ); } TRACE( "TxComplete() req %lu started\n", mpActiveRequest->mID ); ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client of auxiliary data being sent? if (mpActiveRequest->mRequiredAuxTxs && mpActiveRequest->mCurrentAuxTx) { pNotifier->Notify( ePROTOCOL_EVT_AUX_TU_SENT, (DWORD)reqID, (DWORD)mpActiveRequest->mEncodedSize ); } // Check for more auxiliary data to transmit if (mpActiveRequest->mCurrentAuxTx < mpActiveRequest->mRequiredAuxTxs) { ULONG auxDataSz = 0; const BYTE * pAuxData = req.GetAuxiliaryData( auxDataSz ); if (auxDataSz > 0 && pAuxData != 0) { bool bRC = false; // Adjust for current MTU pAuxData += (mpActiveRequest->mCurrentAuxTx * MAX_AUX_MTU_SIZE); mpActiveRequest->mCurrentAuxTx++; // Last MTU? if (mpActiveRequest->mCurrentAuxTx == mpActiveRequest->mRequiredAuxTxs) { // More than one MTU? if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = (auxDataSz % MAX_AUX_MTU_SIZE); if (auxDataSz == 0) { auxDataSz = MAX_AUX_MTU_SIZE; } } if (auxDataSz % MAX_PACKET_SIZE == 0) { // If last write of unframed write request is divisible // by 512, break off last byte and send seperatly. TRACE( "TxComplete() Special case, break off last byte\n" ); bRC = mComm.TxData( pAuxData, auxDataSz - 1 ); if (bRC == true) { bRC = mComm.TxData( pAuxData + auxDataSz -1, 1 ); } } else { bRC = mComm.TxData( pAuxData, auxDataSz ); } } else if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = MAX_AUX_MTU_SIZE; bRC = mComm.TxData( pAuxData, auxDataSz ); } if (bRC == true) { mpActiveRequest->mEncodedSize = auxDataSz; TxComplete(); } else { TxError(); } return; } } // Another successful transmission, add the buffer to the log ULONG reqIdx = INVALID_LOG_INDEX; sProtocolBuffer pb( req.GetSharedBuffer() ); reqIdx = mLog.AddBuffer( pb ); // Notify client? if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_SENT, (DWORD)reqID, (DWORD)reqIdx ); } // Wait for a response? if (mpActiveRequest->mRequest.IsTXOnly() == false) { // We now await the response mpActiveRequest->mbWaitingForResponse = true; mActiveRequestTimeout = TimeIn( mpActiveRequest->mRequest.GetTimeout() ); } else { // Reschedule request as needed RescheduleActiveRequest(); } } /*=========================================================================== METHOD: TxError (Internal Method) DESCRIPTION: Handle transmit data operation error be either rescheduling the request or cleaning it up SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxError() { // No active request? if (mpActiveRequest == 0) { return; } ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the protocol server by starting up the schedule thread SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Initialize() { // Assume failure bool bRC = false; mbExiting = false; // Get mScheduleMutex if (GetScheduleMutex() == true) { if (mScheduleThreadID == 0) { // Yes, start thread int nRet = pthread_create( &mScheduleThreadID, NULL, ScheduleThread, this ); if (nRet == 0) { // Success! bRC = true; } } } else { TRACE( "cProtocolServer::Initialize(), unable to aquire ScheduleMutex\n" ); return false; } // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit the protocol server by exiting the schedule thread (if necessary) SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Exit() { // Assume failure bool bRC = false; if (mScheduleThreadID != 0) { if (GetScheduleMutex() == false) { // This should never happen return false; } // Set exit event mbExiting = true; // Signal a schedule update if (mThreadScheduleEvent.Set( 1 ) != 0) { // This should never happen return false; } TRACE( "Joining ScheduleThread\n" ); // Allow process to continue until it finishes int nRet = pthread_join( mScheduleThreadID, NULL ); if (nRet == ESRCH) { TRACE( "ScheduleThread has exited already\n" ); } else if (nRet != 0) { TRACE( "Unable to join ScheduleThread. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } TRACE( "cProtocolServer::Exit(), completed thread %lu\n", (ULONG)mScheduleThreadID ); bRC = true; // Release "handle" mScheduleThreadID = 0; // Release mutex lock, don't signal ScheduleThread if (ReleaseScheduleMutex( false ) == false) { // This should never happen return false; } } else { // No ScheduleThread bRC = true; } // Free any allocated requests std::map ::iterator pReqIter; pReqIter = mRequestMap.begin(); while (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } pReqIter++; } mRequestMap.clear(); // Free log mLog.Clear(); return bRC; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the given communications port PARAMETERS: pPort [ I ] - String pointer representing the device node to connect to (IE: /dev/qcqmi0) SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Connect( LPCSTR pPort ) { // Assume failure bool bRC = false; if (pPort == 0 || pPort[0] == 0) { return bRC; } // Connect to device // Set callback mRxCallback.SetServer( this ); // Override to initialize port with protocol specific options bRC = mComm.Connect( pPort ); if (bRC == true) { bRC = InitializeComm(); if (bRC == true) { // Setup the initial read mComm.RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); } } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current communications port SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Disconnect() { // Disconnect // Cancel any outstanding I/O mComm.CancelIO(); // Empty callback mRxCallback.SetServer( 0 ); // Cleanup COM port CleanupComm(); // Now disconnect return mComm.Disconnect(); } /*=========================================================================== METHOD: IsConnected (Public Method) DESCRIPTION: Are we currently connected to a port? SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::IsConnected() { return mComm.IsConnected(); } /*=========================================================================== METHOD: AddRequest (Public Method) DESCRIPTION: Add an outgoing protocol request to the protocol server request queue PARAMETERS: req [ I ] - Request being added SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: ULONG - ID of scheduled request (INVALID_REQUEST_ID upon error) ===========================================================================*/ ULONG cProtocolServer::AddRequest( const sProtocolRequest & req ) { // Assume failure ULONG reqID = INVALID_REQUEST_ID; // Server not configured for sending requests? if (IsValid( mTxType ) == false) { return reqID; } // Request type not valid for server? if (req.GetType() != mTxType) { return reqID; } // Invalide request? if (ValidateRequest( req ) == false) { return reqID; } // Get mScheduleMutex if (GetScheduleMutex() == true) { TRACE( "AddRequest() - Entry at %llu\n", GetTickCount() ); // Grab next available request ID if (++mLastRequestID == 0) { mLastRequestID++; } reqID = mLastRequestID; while (mRequestMap.find( reqID ) != mRequestMap.end()) { reqID++; } // Wrap in our internal structure sProtocolReqRsp * pReqRsp = 0; pReqRsp = new sProtocolReqRsp( req, reqID, MAX_AUX_MTU_SIZE ); if (pReqRsp != 0) { // Add to request map mRequestMap[reqID] = pReqRsp; // ... and schedule ScheduleRequest( reqID, req.GetSchedule() ); } TRACE( "AddRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return INVALID_REQUEST_ID; } } else { TRACE( "cProtocolServer::AddRequest(), unable to get schedule Mutex\n" ); } return reqID; } /*=========================================================================== METHOD: RemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes Note: If a request is being written, it cannot be inturrupted as both ProcessRequest and RemoveRequest depend on the ScheduleMutex and the write is synchronus. If the request has been written but the read has not been triggered it can be removed. PARAMETERS: reqID [ I ] - ID of request being removed RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::RemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Get Schedule Mutex if (GetScheduleMutex() == true) { TRACE( "RemoveRequest() - Entry at %llu\n", GetTickCount() ); bRC = HandleRemoveRequest( reqID ); TRACE( "RemoveRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } } else { TRACE( "cProtocolServer::RemoveRequest(), unable to get mScheduleMutex\n" ); } return bRC; } /*=========================================================================== METHOD: GetScheduleMutex (Internal Method) DESCRIPTION: Get the schedule mutex. Additionally a check is applied to verify the DEADLOCK_TIME was not exceeded SEQUENCING: This function will block until the mScheduleMutex is aquired PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::GetScheduleMutex() { ULONGLONG nStart = GetTickCount(); //TRACE( "Locking Schedule mutex\n" ); int nRet = pthread_mutex_lock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to lock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } ULONGLONG nEnd = GetTickCount(); if (nEnd - nStart > DEADLOCK_TIME) { TRACE( "Deadlock time exceeded: took %llu ms\n", nEnd - nStart ); ReleaseScheduleMutex( true ); return false; } //TRACE( "Locked ScheduleMutex\n" ); return true; } /*=========================================================================== METHOD: ReleaseScheduleMutex (Internal Method) DESCRIPTION: Release lock on the schedule mutex SEQUENCING: Calling process must have lock PARAMETERS: bSignalThread [ I ] - Signal Schedule thread as well? RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ReleaseScheduleMutex( bool bSignalThread ) { if (bSignalThread == true) { if (mThreadScheduleEvent.Set( 1 ) != 0) { return false; } } int nRet = pthread_mutex_unlock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to unlock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return true; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/ProtocolServer.h000077500000000000000000000257571455567757300244530ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.h DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Comm.h" #include "ProtocolRequest.h" #include "ProtocolLog.h" #include "Event.h" #include #include //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolServer; struct sServerControl; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID extern const ULONG INVALID_REQUEST_ID; // Fill timespec with the time it will be in specified milliseconds // Relative time to Absolute time timespec TimeIn( ULONG millis ); // Find the milliseconds from current time this timespec will occur // Absolute time to Relative time ULONG TimeFromNow( timespec time ); // Provide a number for sequencing reference, similar to the windows function ULONGLONG GetTickCount(); // timespec < comparison method inline bool operator< (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec < second.tv_nsec) ) ); } // timespec <= comparison method inline bool operator<= (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec <= second.tv_nsec) ) ); } /*=========================================================================*/ // Class cProtocolServerRxCallback /*=========================================================================*/ class cProtocolServerRxCallback { public: // (Inline) Constructor cProtocolServerRxCallback() : mpServer( 0 ) { }; // (Inline) Destructor virtual ~cProtocolServerRxCallback() { }; // (Inline) Set server object to pass results to void SetServer( cProtocolServer * pServer ) { mpServer = pServer; }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesReceived ); protected: /* Protocol server to interact with */ cProtocolServer * mpServer; }; /*=========================================================================*/ // Class cProtocolServer /*=========================================================================*/ class cProtocolServer { public: // Constructor cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cProtocolServer(); // Initialize the protocol server bool Initialize(); // Exit the protocol server bool Exit(); // Connect to the given communications port bool Connect( LPCSTR pPort ); // Disconnect from target bool Disconnect(); // Are we currently connected to a port? bool IsConnected(); // Add an outgoing protocol request to the protocol server request queue ULONG AddRequest( const sProtocolRequest & req ); // Remove a previously added protocol request bool RemoveRequest( ULONG reqID ); // (Inline) Return the protocol log const cProtocolLog & GetLog() { return mLog; }; protected: // Internal protocol server request/response structure, used to track // info related to sending out a request struct sProtocolReqRsp { public: // Constructor sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ); // Copy constructor sProtocolReqRsp( const sProtocolReqRsp & reqRsp ); // (Inline) Reset for next transmission attempt void Reset() { mEncodedSize = mRequest.GetSize(); mCurrentAuxTx = 0; mbWaitingForResponse = 0; }; /* Request ID */ ULONG mID; /* Number of times this request has been attempted */ ULONG mAttempts; /* Size of encoded data being transmitted */ ULONG mEncodedSize; /* Number of required auxiliary data transmissions */ ULONG mRequiredAuxTxs; /* Current auxiliary data transmission */ ULONG mCurrentAuxTx; /* Are we currently waiting for a response? */ bool mbWaitingForResponse; /* Underlying protocol request */ sProtocolRequest mRequest; }; // Handle the remove request bool HandleRemoveRequest( ULONG reqID ); // Schedule a request for transmission bool ScheduleRequest( ULONG reqID, ULONG schedule ); // (Inline) Get next request's time from mRequestSchedule timespec GetNextRequestTime() { timespec outTime; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); tSchedule entry = *pScheduleIter; outTime = entry.first; return outTime; } // (Inline) Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ) { return req.IsValid(); }; // Reschedule (or cleanup) the active request void RescheduleActiveRequest(); // Process a single outgoing protocol request void ProcessRequest(); // Check that system time hasn't moved backwards bool CheckSystemTime(); // Perform protocol specific communications port initialization virtual bool InitializeComm() = 0; // Perform protocol specific communications port cleanup virtual bool CleanupComm() = 0; // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) = 0; // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) = 0; // Handle completion of receive data operation void RxComplete( DWORD status, DWORD bytesReceived ); // Handle the response timer expiring void RxTimeout(); // Handle completion of transmit data operation virtual void TxComplete(); // Handle a transmission error void TxError(); /* Underlying communications object */ cComm mComm; /* Rx callback */ cProtocolServerRxCallback mRxCallback; /* ID of Schedule thread */ pthread_t mScheduleThreadID; // ScheduleThread signal event cEvent mThreadScheduleEvent; // Schedule mutex // Ensures exclusive access to mRequestSchedule pthread_mutex_t mScheduleMutex; // Is the thread in the process of exiting? // (no new commands will be accepted) bool mbExiting; /* Client/server thread control object */ sSharedBuffer * mpServerControl; /* Protocol request schedule (scheduled time/request ID) */ typedef std::pair tSchedule; std::set < tSchedule, std::less > mRequestSchedule; /* Last system time value (used to check for time changes) */ timespec mLastTime; /* Protocol request map (request ID mapped to internal req/rsp struct) */ std::map mRequestMap; /* Last assigned request ID */ ULONG mLastRequestID; /* Current request being processed */ sProtocolReqRsp * mpActiveRequest; /* Absolute timeout for mpActiveRequest based on when write was completed */ timespec mActiveRequestTimeout; /* Data buffer for incoming data */ BYTE * mpRxBuffer; /* Size of above buffer (i.e. how much data to read in at once) */ ULONG mRxBufferSize; /* Protocol type for incoming/outgoing data*/ eProtocolType mRxType; eProtocolType mTxType; /* Protocol log */ cProtocolLog mLog; // Get a lock on ScheduleMutex bool GetScheduleMutex(); // Release lock on ScheduleMutex // Signal ScheduleThread if desired bool ReleaseScheduleMutex( bool bSignalThread = true ); // Schedule Thread gets full access friend void * ScheduleThread( PVOID pArg ); // Callback objects get full access friend class cProtocolServerRxCallback; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QDLBuffers.cpp000077500000000000000000000657371455567757300237550ustar00rootroot00000000000000/*=========================================================================== FILE: QDLBuffers.cpp DESCRIPTION: QDL protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQDLRawHelloReq sQDLRawHelloRsp sQDLRawErrorRsp sQDLRawOpenUnframedReq sQDLRawOpenUnframedRsp sQDLRawWriteUnframedReq sQDLRawWriteUnframedRsp sQDLRawDoneRsp sQDLRawGetImagePrefRsp sQDLRawImageID sQDLHello sQDLError sQDLOpenUnframed sQDLWriteUnframed sQDLDone sQDLGetImagePref Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QDLBuffers.h" #include "CRC.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQDLHello Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLHello (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLHello::sQDLHello( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLHello::Validate(); } /*=========================================================================== METHOD: ~sQDLHello (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLHello::~sQDLHello() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this hello request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLHello::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof(sQDLRawHelloReq); const ULONG szRsp = (ULONG)sizeof(sQDLRawHelloRsp); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const sQDLRawHelloReq * pReq = (const sQDLRawHelloReq *)GetBuffer(); if (pReq->mCommandCode != (BYTE)eQDL_CMD_HELLO_REQ) { return bRC; } int notEqual = memcmp( (const void *)&pReq->mMagicNumber[0], (const void *)&QDL_HELLO_MAGIC_REQ[0], sizeof( QDL_HELLO_MAGIC_REQ ) ); if (notEqual != 0) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz == szRsp) { const sQDLRawHelloRsp * pRsp = (const sQDLRawHelloRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_HELLO_RSP) { return bRC; } int notEqual = memcmp( (const void *)&pRsp->mMagicNumber[0], (const void *)&QDL_HELLO_MAGIC_RSP[0], sizeof( QDL_HELLO_MAGIC_RSP ) ); if (notEqual != 0) { return bRC; } if ( (pRsp->mMaxVersion != QDL_MIN_VERSION) || (pRsp->mMinVersion != QDL_MAX_VERSION) ) { return bRC; } if ( ((pRsp->mFeatures & QDL_FEATURE_GENERIC_UNFRAMED) == 0) || ((pRsp->mFeatures & QDL_FEATURE_QDL_UNFRAMED) == 0) ) { return bRC; } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetBootVersionInfo (Internal Method) DESCRIPTION: Extract boot downloader version info from the response PARAMETERS: major [ O ] - Major version minor [ O ] - Minor version RETURN VALUE: bool ===========================================================================*/ bool sQDLHello::GetBootVersionInfo( ULONG & major, ULONG & minor ) const { // Assume failure bool bRC = false; major = 0; minor = 0; const sQDLRawHelloRsp * pRsp = GetResponse(); if (pRsp == 0) { return bRC; } major = (ULONG)pRsp->mBootMajorVersion; minor = (ULONG)pRsp->mBootMinorVersion; bRC = true; return bRC; } /*=========================================================================== METHOD: BuildHelloReq (Static Public Method) DESCRIPTION: Build a hello request PARAMETERS: bBARMode [ O ] - Request boot and recovery mode feature RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQDLHello::BuildHelloReq( bool bBARMode ) { const ULONG sz = (ULONG)sizeof(sQDLRawHelloReq); BYTE req[sz]; sQDLRawHelloReq * pReq = (sQDLRawHelloReq *)&req[0]; pReq->mCommandCode = (BYTE)eQDL_CMD_HELLO_REQ; pReq->mMaxVersion = QDL_MIN_VERSION; pReq->mMinVersion = QDL_MAX_VERSION; pReq->mFeatures = QDL_FEATURE_GENERIC_UNFRAMED | QDL_FEATURE_QDL_UNFRAMED; if (bBARMode == true) { pReq->mFeatures |= QDL_FEATURE_BAR_MODE; } memcpy( (PVOID)&pReq->mMagicNumber[0], (const VOID *)&QDL_HELLO_MAGIC_REQ[0], (SIZE_T)32 ); eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pRetBuf = new sSharedBuffer( (const BYTE *)req, sz, pt ); return pRetBuf; } /*=========================================================================*/ // sQDLError Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLError (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLError::sQDLError( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLError::Validate(); } /*=========================================================================== METHOD: ~sQDLError (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLError::~sQDLError() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this session done request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLError::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szRsp = (ULONG)sizeof( sQDLRawErrorRsp ); if (sz >= szRsp) { const sQDLRawErrorRsp * pRsp = 0; pRsp = (const sQDLRawErrorRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_ERROR) { return bRC; } // Error code needs to be valid if (::IsValid( (eQDLError)pRsp->mErrorCode ) == false) { return bRC; } // Error text needs to be NULL terminated const BYTE * pTmp = GetBuffer(); if (pTmp[sz - 1] != 0) { return bRC; } // What there is of the error text needs to be printable pTmp = &pRsp->mErrorText; while (*pTmp != 0) { int val = (int)*pTmp++; if (isprint( (int)val ) == 0) { return bRC; } } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================*/ // sQDLOpenUnframed Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLOpenUnframed (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLOpenUnframed::sQDLOpenUnframed( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLOpenUnframed::Validate(); } /*=========================================================================== METHOD: ~sQDLOpenUnframed (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLOpenUnframed::~sQDLOpenUnframed() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLOpenUnframed::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof(sQDLRawOpenUnframedReq); const ULONG szRsp = (ULONG)sizeof(sQDLRawOpenUnframedRsp); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const sQDLRawOpenUnframedReq * pReq = 0; pReq = (const sQDLRawOpenUnframedReq *)GetBuffer(); if (pReq->mCommandCode != (BYTE)eQDL_CMD_OPEN_UNFRAMED_REQ) { return bRC; } if (::IsValid( (eQDLImageType)pReq->mImageType ) == false) { return bRC; } if (pReq->mWindowSize != 1) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz == szRsp) { const sQDLRawOpenUnframedRsp * pRsp = 0; pRsp = (const sQDLRawOpenUnframedRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_OPEN_UNFRAMED_RSP) { return bRC; } if (pRsp->mWindowSize != 1) { return bRC; } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetChunkSize (Internal Method) DESCRIPTION: Extract chunk size info from the response PARAMETERS: chunkSize [ O ] - Target supported chunk size RETURN VALUE: bool ===========================================================================*/ bool sQDLOpenUnframed::GetChunkSize( ULONG & chunkSize ) const { // Assume failure bool bRC = false; chunkSize = 0; const sQDLRawOpenUnframedRsp * pRsp = GetResponse(); if (pRsp == 0) { return bRC; } chunkSize = (ULONG)pRsp->mUnframedChunkSize; bRC = true; return bRC; } /*=========================================================================== METHOD: BuildOpenUnframedReq (Static Public Method) DESCRIPTION: Build an open image for unframed write request PARAMETERS: imageType [ I ] - Type of image about to be written imageSize [ I ] - Size of image about to be written chunkSize [ I ] - Desired size of chunk for each write RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQDLOpenUnframed::BuildOpenUnframedReq( eQDLImageType imageType, ULONG imageSize, ULONG chunkSize ) { sSharedBuffer * pRetBuf = 0; if (::IsValid( imageType ) == false) { return pRetBuf; } // We can not write out chunks larger than the maximum if (chunkSize > QDL_MAX_CHUNK_SIZE) { return pRetBuf; } const ULONG sz = (ULONG)sizeof(sQDLRawOpenUnframedReq); BYTE req[sz]; memset( (LPVOID)&req[0], 0, (SIZE_T)sz ); sQDLRawOpenUnframedReq * pReq = (sQDLRawOpenUnframedReq *)&req[0]; pReq->mCommandCode = (BYTE)eQDL_CMD_OPEN_UNFRAMED_REQ; pReq->mImageType = (BYTE)imageType; pReq->mImageLength = (DWORD)imageSize; pReq->mWindowSize = 1; pReq->mUnframedChunkSize = chunkSize; eProtocolType pt = ePROTOCOL_QDL_TX; pRetBuf = new sSharedBuffer( (const BYTE *)req, sz, pt ); return pRetBuf; } /*=========================================================================*/ // sQDLWriteUnframed Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLWriteUnframed (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLWriteUnframed::sQDLWriteUnframed( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLWriteUnframed::Validate(); } /*=========================================================================== METHOD: ~sQDLWriteUnframed (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLWriteUnframed::~sQDLWriteUnframed() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this unframed write request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLWriteUnframed::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof( sQDLRawWriteUnframedReq ); const ULONG szRsp = (ULONG)sizeof( sQDLRawWriteUnframedRsp ); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const sQDLRawWriteUnframedReq * pReq = 0; pReq = (const sQDLRawWriteUnframedReq *)GetBuffer(); if (pReq->mCommandCode != (BYTE)eQDL_CMD_WRITE_UNFRAMED_REQ) { return bRC; } bRC = CheckCRC( GetBuffer(), szReq - sizeof( USHORT ) ); } else if (pt == ePROTOCOL_QDL_RX && sz == szRsp) { const sQDLRawWriteUnframedRsp * pRsp = 0; pRsp = (const sQDLRawWriteUnframedRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_WRITE_UNFRAMED_RSP) { return bRC; } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetSequenceNumber (Internal Method) DESCRIPTION: Extract sequence number from the response PARAMETERS: sequenceNumber [ O ] - Target reported sequence number RETURN VALUE: bool ===========================================================================*/ bool sQDLWriteUnframed::GetSequenceNumber( ULONG & sequenceNumber ) const { // Assume failure bool bRC = false; sequenceNumber = 0; const sQDLRawWriteUnframedRsp * pRsp = GetResponse(); if (pRsp == 0) { return bRC; } sequenceNumber = (ULONG)pRsp->mSequenceNumber; bRC = true; return bRC; } /*=========================================================================== METHOD: BuildWriteUnframedReq (Static Public Method) DESCRIPTION: Build an unframed write request PARAMETERS: sequenceNumber [ I ] - Type of image about to be written chunkSize [ I ] - Size of chunk being written RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQDLWriteUnframed::BuildWriteUnframedReq( USHORT sequenceNumber, ULONG chunkSize ) { sSharedBuffer * pRetBuf = 0; // We can not write out chunks larger than the maximum if (chunkSize == 0 || chunkSize > (ULONG)QDL_MAX_CHUNK_SIZE) { return pRetBuf; } const ULONG sz = (ULONG)sizeof(sQDLRawWriteUnframedReq); BYTE req[sz]; memset( (LPVOID)&req[0], 0, (SIZE_T)sz ); sQDLRawWriteUnframedReq * pReq = (sQDLRawWriteUnframedReq *)&req[0]; pReq->mCommandCode = (BYTE)eQDL_CMD_WRITE_UNFRAMED_REQ; pReq->mSequenceNumber = (WORD)sequenceNumber; pReq->mUnframedChunkSize = (DWORD)chunkSize; SetCRC( req, sz - sizeof( USHORT ) ); eProtocolType pt = ePROTOCOL_QDL_TX; pRetBuf = new sSharedBuffer( (const BYTE *)req, sz, pt ); return pRetBuf; } /*=========================================================================== METHOD: BuildWriteUnframedReqs (Static Public Method) DESCRIPTION: Build list of unframed write requests from the given parameters PARAMETERS: chunkSize [ I ] - Size to write in each request dataLen [ I ] - Total number of bytes to write RETURN VALUE: std::list : The requests in allocated buffers (the list is empty on error) ===========================================================================*/ std::list sQDLWriteUnframed::BuildWriteUnframedReqs( ULONG chunkSize, ULONG totalSize ) { std::list retList; // Check length (in bytes) is acceptable if (chunkSize == 0 || chunkSize > QDL_MAX_CHUNK_SIZE) { return retList; } ULONG writes = 1; ULONG rem = totalSize; // Will we need more than one write request? if (totalSize > chunkSize) { writes = totalSize / chunkSize; rem = totalSize % chunkSize; // Total size is a multiple of chunk size? if (rem == 0) { // Yes, the remainder will be the block size rem = chunkSize; } else { // No, we need an extra write for the remainder writes++; } } ULONG blockSz = chunkSize; if (writes == 1) { blockSz = rem; } // Generate first request USHORT seqNum = 0; sSharedBuffer * pReq = 0; pReq = sQDLWriteUnframed::BuildWriteUnframedReq( seqNum++, blockSz ); if (pReq != 0) { retList.push_back( pReq ); } // Generate remaining requests for (UINT b = 1; b < writes; b++) { blockSz = chunkSize; if (b == writes - 1) { blockSz = rem; } pReq = sQDLWriteUnframed::BuildWriteUnframedReq( seqNum++, blockSz ); if (pReq != 0) { retList.push_back( pReq ); } } // Errors? if (retList.size() != writes) { // Free up all our hard work std::list ::const_iterator pIter = retList.begin(); while (pIter != retList.end()) { delete [] *pIter; pIter++; } retList.clear(); } return retList; } /*=========================================================================*/ // sQDLDone Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLDone (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLDone::sQDLDone( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLDone::Validate(); } /*=========================================================================== METHOD: ~sQDLDone (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLDone::~sQDLDone() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this session done request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLDone::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof( BYTE ); const ULONG szRsp = (ULONG)sizeof( sQDLRawDoneRsp ); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const BYTE * pReq = GetBuffer(); if (*pReq != (BYTE)eQDL_CMD_SESSION_DONE_REQ) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz >= szRsp) { const sQDLRawDoneRsp * pRsp = 0; pRsp = (const sQDLRawDoneRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_SESSION_DONE_RSP) { return bRC; } // Status needs to be valid if (::IsValid( (eQDLDoneStatus)pRsp->mStatus ) == false) { return bRC; } // For success the error text should be NULL if ( (pRsp->mStatus == (WORD)eQDL_DONE_STATUS_SUCCESS) && (sz != szRsp || pRsp->mErrorText != 0) ) { return bRC; } if (pRsp->mStatus != (WORD)eQDL_DONE_STATUS_SUCCESS) { // Error text needs to be NULL terminated const BYTE * pTmp = GetBuffer(); if (pTmp[sz - 1] != 0) { return bRC; } // What there is of the error text needs to be printable pTmp = &pRsp->mErrorText; while (*pTmp != 0) { int val = (int)*pTmp++; if (isprint( (int)val ) == 0) { return bRC; } } } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================*/ // sQDLGetImagePref Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQDLGetImagePref (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the QDL data RETURN VALUE: None ===========================================================================*/ sQDLGetImagePref::sQDLGetImagePref( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQDLGetImagePref::Validate(); } /*=========================================================================== METHOD: ~sQDLGetImagePref (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQDLGetImagePref::~sQDLGetImagePref() { // Nothing to do } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this get image preference request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQDLGetImagePref::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (pt != ePROTOCOL_QDL_RX && pt != ePROTOCOL_QDL_TX) { mbValid = bRC; return bRC; } ULONG sz = GetSize(); const ULONG szReq = (ULONG)sizeof( BYTE ); const ULONG szRsp = (ULONG)sizeof( sQDLRawGetImagePrefRsp ); if (pt == ePROTOCOL_QDL_TX && sz == szReq) { const BYTE * pReq = GetBuffer(); if (*pReq != (BYTE)eQDL_CMD_GET_IMAGE_PREF_REQ) { return bRC; } bRC = true; } else if (pt == ePROTOCOL_QDL_RX && sz >= szRsp) { const sQDLRawGetImagePrefRsp * pRsp = 0; pRsp = (const sQDLRawGetImagePrefRsp *)GetBuffer(); if (pRsp->mCommandCode != (BYTE)eQDL_CMD_GET_IMAGE_PREF_RSP) { return bRC; } BYTE entries = pRsp->mEntries; ULONG needSz = szRsp + (ULONG)entries * (ULONG)sizeof( sQDLRawImageID ); if (sz != needSz) { return bRC; } // Skip response header pRsp++; // Validate image IDs const sQDLRawImageID * pID = (const sQDLRawImageID *)pRsp; for (BYTE e = 0; e < entries; e++) { sQDLRawImageID imagePref = *pID++; if (::IsValid( (eQDLImageType)imagePref.mImageType) == false) { return bRC; } } bRC = true; } mbValid = bRC; return mbValid; } /*=========================================================================== METHOD: GetImageIDs (Public Method) DESCRIPTION: Return image IDs RETURN VALUE: std::list ===========================================================================*/ std::list sQDLGetImagePref::GetImageIDs() const { // Assume failure std::list retIDs; const sQDLRawGetImagePrefRsp * pRsp = GetResponse(); if (pRsp == 0) { return retIDs; } BYTE entries = pRsp->mEntries; if (entries == 0) { return retIDs; } // Skip response header pRsp++; const sQDLRawImageID * pID = (const sQDLRawImageID *)pRsp; for (BYTE e = 0; e < entries; e++) { retIDs.push_back( *pID++ ); } return retIDs; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QDLBuffers.h000077500000000000000000000476741455567757300234220ustar00rootroot00000000000000/*=========================================================================== FILE: QDLBuffers.h DESCRIPTION: QDL protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQDLRawHelloReq sQDLRawHelloRsp sQDLRawErrorRsp sQDLRawOpenUnframedReq sQDLRawOpenUnframedRsp sQDLRawWriteUnframedReq sQDLRawWriteUnframedRsp sQDLRawDoneRsp sQDLRawGetImagePrefRsp sQDLRawImageID sQDLHello sQDLError sQDLOpenUnframed sQDLWriteUnframed sQDLDone sQDLGetImagePref Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QDLEnum.h" #include //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQDLRawHelloReq // Struct to represent a QDL hello request (raw) /*=========================================================================*/ struct sQDLRawHelloReq { public: BYTE mCommandCode; BYTE mMagicNumber[32]; BYTE mMaxVersion; BYTE mMinVersion; BYTE mFeatures; }; /*=========================================================================*/ // Struct sQDLRawHelloRsp // Struct to represent a QDL hello response (raw) /*=========================================================================*/ struct sQDLRawHelloRsp { public: BYTE mCommandCode; BYTE mMagicNumber[24]; DWORD mReserved1; WORD mBootMajorVersion; WORD mBootMinorVersion; BYTE mMaxVersion; BYTE mMinVersion; DWORD mReserved2; DWORD mReserved3; BYTE mReserved4; WORD mReserved5; WORD mReserved6; BYTE mFeatures; }; /*=========================================================================*/ // Struct sQDLRawErrorRsp // Struct to represent a QDL error response (raw) /*=========================================================================*/ struct sQDLRawErrorRsp { public: BYTE mCommandCode; DWORD mErrorCode; BYTE mErrorText; }; /*=========================================================================*/ // Struct sQDLRawOpenUnframedReq // Struct to represent a QDL open unframed image write request (raw) /*=========================================================================*/ struct sQDLRawOpenUnframedReq { public: BYTE mCommandCode; BYTE mImageType; DWORD mImageLength; BYTE mWindowSize; DWORD mUnframedChunkSize; WORD mReserved1; }; /*=========================================================================*/ // Struct sQDLRawOpenUnframedRsp // Struct to represent a QDL open unframed image write response (raw) /*=========================================================================*/ struct sQDLRawOpenUnframedRsp { public: BYTE mCommandCode; WORD mStatus; BYTE mWindowSize; DWORD mUnframedChunkSize; }; /*=========================================================================*/ // Struct sQDLRawWriteUnframedReq // Struct to represent a QDL unframed image write request (raw) /*=========================================================================*/ struct sQDLRawWriteUnframedReq { public: BYTE mCommandCode; WORD mSequenceNumber; DWORD mReserved; DWORD mUnframedChunkSize; WORD mCRC; }; /*=========================================================================*/ // Struct sQDLRawWriteUnframedRsp // Struct to represent a QDL unframed image write response (raw) /*=========================================================================*/ struct sQDLRawWriteUnframedRsp { public: BYTE mCommandCode; WORD mSequenceNumber; DWORD mReserved; WORD mStatus; }; /*=========================================================================*/ // Struct sQDLRawDoneRsp // Struct to represent a QDL session done response (raw) /*=========================================================================*/ struct sQDLRawDoneRsp { public: BYTE mCommandCode; WORD mStatus; BYTE mImageType; BYTE mErrorText; }; /*=========================================================================*/ // Struct sQDLRawGetImagePrefRsp // Struct to represent a QDL get image preference response (raw) /*=========================================================================*/ struct sQDLRawGetImagePrefRsp { public: BYTE mCommandCode; BYTE mEntries; // Array of sQDLRawImageID follows (sized by mEntries) }; /*=========================================================================*/ // Struct sQDLRawImageID // Struct to represent a QDL image ID (raw) /*=========================================================================*/ struct sQDLRawImageID { public: BYTE mImageType; BYTE mImageID[16]; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQDLHello // Struct to represent a QDL hello request/response (shared buffer) /*=========================================================================*/ struct sQDLHello : public sProtocolBuffer { public: // Constructor sQDLHello( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLHello(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_HELLO_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_HELLO_RSP); } return bResponse; }; // (Inline) Return raw request const sQDLRawHelloReq * GetRequest() const { const sQDLRawHelloReq * pReq = 0; if (IsRequest() == true) { pReq = (const sQDLRawHelloReq *)GetBuffer(); } return pReq; }; // (Inline) Return raw response const sQDLRawHelloRsp * GetResponse() const { const sQDLRawHelloRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawHelloRsp *)GetBuffer(); } return pRsp; }; // Extract boot downloader version info from the response bool GetBootVersionInfo( ULONG & major, ULONG & minor ) const; // Build a hello request static sSharedBuffer * BuildHelloReq( bool bBARMode = false ); protected: // Is this hello request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLHello( const sProtocolBuffer & ); sQDLHello & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLError // Struct to represent a QDL error response (shared buffer) /*=========================================================================*/ struct sQDLError : public sProtocolBuffer { public: // Constructor sQDLError( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLError(); // (Inline) Return raw response const sQDLRawErrorRsp * GetResponse() const { const sQDLRawErrorRsp * pRsp = 0; if (IsValid() == true) { pRsp = (const sQDLRawErrorRsp *)GetBuffer(); } return pRsp; }; // (Inline) Return the (validated) error code eQDLError GetErrorCode() const { eQDLError err = eQDL_ERROR_ENUM_BEGIN; const sQDLRawErrorRsp * pRsp = GetResponse(); if (pRsp != 0) { err = (eQDLError)pRsp->mErrorCode; } return err; }; // (Inline) Return the error text string LPCSTR GetError() const { LPCSTR pErr = 0; const sQDLRawErrorRsp * pRsp = GetResponse(); if (pRsp != 0) { pErr = (LPCSTR)&pRsp->mErrorText; } return pErr; }; protected: // Is this session done request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLError( const sProtocolBuffer & ); sQDLError & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLOpenUnframed // Struct to represent a QDL open image for unframed write // request/response (shared buffer) /*=========================================================================*/ struct sQDLOpenUnframed : public sProtocolBuffer { public: // Constructor sQDLOpenUnframed( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLOpenUnframed(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_OPEN_UNFRAMED_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_OPEN_UNFRAMED_RSP); } return bResponse; }; // (Inline) Return raw request const sQDLRawOpenUnframedReq * GetRequest() const { const sQDLRawOpenUnframedReq * pReq = 0; if (IsRequest() == true) { pReq = (const sQDLRawOpenUnframedReq *)GetBuffer(); } return pReq; }; // (Inline) Return raw response const sQDLRawOpenUnframedRsp * GetResponse() const { const sQDLRawOpenUnframedRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawOpenUnframedRsp *)GetBuffer(); } return pRsp; }; // (Inline) Does the response indicate success? bool IsSuccess() const { bool bSuccess = false; const sQDLRawOpenUnframedRsp * pRsp = GetResponse(); if (pRsp != 0) { bSuccess = (pRsp->mStatus == eQDL_OPEN_STATUS_SUCCESS); } return bSuccess; }; // Extract supported chunk size from the response bool GetChunkSize( ULONG & chunkSize ) const; // Build an open image for unframed write request static sSharedBuffer * BuildOpenUnframedReq( eQDLImageType imageType, ULONG imageSize, ULONG chunkSize ); protected: // Is this open unframed request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLOpenUnframed( const sProtocolBuffer & ); sQDLOpenUnframed & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLWriteUnframed // Struct to represent a QDL unframed write of an image // request/response (shared buffer) /*=========================================================================*/ struct sQDLWriteUnframed : public sProtocolBuffer { public: // Constructor sQDLWriteUnframed( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLWriteUnframed(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_WRITE_UNFRAMED_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_WRITE_UNFRAMED_RSP); } return bResponse; }; // (Inline) Return raw request const sQDLRawWriteUnframedReq * GetRequest() const { const sQDLRawWriteUnframedReq * pReq = 0; if (IsRequest() == true) { pReq = (const sQDLRawWriteUnframedReq *)GetBuffer(); } return pReq; }; // (Inline) Return raw response const sQDLRawWriteUnframedRsp * GetResponse() const { const sQDLRawWriteUnframedRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawWriteUnframedRsp *)GetBuffer(); } return pRsp; }; // (Inline) Does the response indicate success? bool IsSuccess() const { bool bSuccess = false; const sQDLRawWriteUnframedRsp * pRsp = GetResponse(); if (pRsp != 0) { bSuccess = (pRsp->mStatus == eQDL_WRITE_STATUS_SUCCESS); } return bSuccess; }; // Extract sequence number from the response bool GetSequenceNumber( ULONG & sequenceNumber ) const; // Build an unframed write request static sSharedBuffer * BuildWriteUnframedReq( USHORT sequenceNumber, ULONG chunkSize ); // Build unframed write requests for the specified parameters static std::list BuildWriteUnframedReqs( ULONG chunkSize, ULONG totalSize ); protected: // Is this open unframed request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLWriteUnframed( const sProtocolBuffer & ); sQDLWriteUnframed & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLDone // Struct to represent a QDL session done request/response (shared buffer) /*=========================================================================*/ struct sQDLDone : public sProtocolBuffer { public: // Constructor sQDLDone( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLDone(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_SESSION_DONE_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_SESSION_DONE_RSP); } return bResponse; }; // (Inline) Return raw response const sQDLRawDoneRsp * GetResponse() const { const sQDLRawDoneRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawDoneRsp *)GetBuffer(); } return pRsp; }; // (Inline) Does the response indicate success? bool IsSuccess() const { bool bSuccess = false; const sQDLRawDoneRsp * pRsp = GetResponse(); if (pRsp != 0) { bSuccess = (pRsp->mStatus == eQDL_DONE_STATUS_SUCCESS); } return bSuccess; }; // (Inline) Return the error text string LPCSTR GetError() const { LPCSTR pErr = 0; const sQDLRawDoneRsp * pRsp = GetResponse(); if (pRsp != 0) { if (pRsp->mStatus != eQDL_DONE_STATUS_SUCCESS) { pErr = (LPCSTR)&pRsp->mErrorText; } } return pErr; }; protected: // Is this session done request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLDone( const sProtocolBuffer & ); sQDLDone & operator = ( const sProtocolBuffer & ); }; /*=========================================================================*/ // Struct sQDLGetImagePref // Struct to represent a QDL get image preference // request/response (shared buffer) /*=========================================================================*/ struct sQDLGetImagePref : public sProtocolBuffer { public: // Constructor sQDLGetImagePref( sSharedBuffer * pBuffer ); // Destructor virtual ~sQDLGetImagePref(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bRequest = (pBuf[0] == (BYTE)eQDL_CMD_GET_IMAGE_PREF_REQ); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; if (IsValid() == true) { const BYTE * pBuf = GetBuffer(); bResponse = (pBuf[0] == (BYTE)eQDL_CMD_GET_IMAGE_PREF_RSP); } return bResponse; }; // (Inline) Return raw response const sQDLRawGetImagePrefRsp * GetResponse() const { const sQDLRawGetImagePrefRsp * pRsp = 0; if (IsResponse() == true) { pRsp = (const sQDLRawGetImagePrefRsp *)GetBuffer(); } return pRsp; }; // Return image IDs std::list GetImageIDs() const; protected: // Is this get image preference request/response packet valid? virtual bool Validate(); private: // Prevent 'upcopying' sQDLGetImagePref( const sProtocolBuffer & ); sQDLGetImagePref & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QDLEnum.h000077500000000000000000000277621455567757300227260ustar00rootroot00000000000000/*=========================================================================== FILE: QDLEnum.h DESCRIPTION: QDL protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQDLCommand eQDLError eQDLImageType eQDLOpenStatus eQDLWriteStatus eQDLDoneStatus Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QDL feature bits const BYTE QDL_FEATURE_GENERIC_UNFRAMED = 0x10; const BYTE QDL_FEATURE_QDL_UNFRAMED = 0x20; const BYTE QDL_FEATURE_BAR_MODE = 0x40; // QDL protocol version const BYTE QDL_MIN_VERSION = 6; const BYTE QDL_MAX_VERSION = 6; const BYTE QDL_HELLO_MAGIC_REQ[32] = { 'Q', 'C', 'O', 'M', ' ', 'h', 'i', 'g', 'h', ' ', 's', 'p', 'e', 'e', 'd', ' ', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'h', 's', 't', 0, 0, 0, 0 }; const BYTE QDL_HELLO_MAGIC_RSP[24] = { 'Q', 'C', 'O', 'M', ' ', 'h', 'i', 'g', 'h', ' ', 's', 'p', 'e', 'e', 'd', ' ', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l' }; // QDL maximum chunk size we support const ULONG QDL_MAX_CHUNK_SIZE = 1024 * 1024 * 64; /*=========================================================================*/ // eQDLCommand Enumeration // QDL Command Code Enumeration /*=========================================================================*/ enum eQDLCommand { eQDL_CMD_ENUM_BEGIN = -1, eQDL_CMD_HELLO_REQ = 1, // 001 Hello request eQDL_CMD_HELLO_RSP, // 002 Hello response eQDL_CMD_ERROR = 13, // 013 Error report eQDL_CMD_OPEN_UNFRAMED_REQ = 37, // 037 Open unframed image write request eQDL_CMD_OPEN_UNFRAMED_RSP, // 038 Open unframed image write response eQDL_CMD_WRITE_UNFRAMED_REQ, // 039 Unframed image write request eQDL_CMD_WRITE_UNFRAMED_RSP, // 040 Unframed image write response eQDL_CMD_SESSION_DONE_REQ, // 041 Unframed session done request eQDL_CMD_SESSION_DONE_RSP, // 042 Unframed session done response eQDL_CMD_DOWNLOAD_REQ, // 043 Switch to download protocol request eQDL_CMD_SESSION_CLOSE_REQ = 45, // 045 Close unframed session request eQDL_CMD_GET_IMAGE_PREF_REQ, // 046 Get image preference request eQDL_CMD_GET_IMAGE_PREF_RSP, // 047 Get image preference response eQDL_CMD_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLCommand validity check PARAMETERS: cmd [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLCommand cmd ) { bool retVal = false; switch (cmd) { case eQDL_CMD_HELLO_REQ: case eQDL_CMD_HELLO_RSP: case eQDL_CMD_ERROR: case eQDL_CMD_OPEN_UNFRAMED_REQ: case eQDL_CMD_OPEN_UNFRAMED_RSP: case eQDL_CMD_WRITE_UNFRAMED_REQ: case eQDL_CMD_WRITE_UNFRAMED_RSP: case eQDL_CMD_SESSION_DONE_REQ: case eQDL_CMD_SESSION_DONE_RSP: case eQDL_CMD_DOWNLOAD_REQ: case eQDL_CMD_SESSION_CLOSE_REQ: case eQDL_CMD_GET_IMAGE_PREF_REQ: case eQDL_CMD_GET_IMAGE_PREF_RSP: retVal = true; break; } return retVal; }; /*=========================================================================*/ // eQDLError Enumeration // QDL Error Enumeration /*=========================================================================*/ enum eQDLError { eQDL_ERROR_ENUM_BEGIN = 0, eQDL_ERROR_01, // 01 Reserved eQDL_ERROR_BAD_ADDR, // 02 Invalid destination address eQDL_ERROR_BAD_LEN, // 03 Invalid length eQDL_ERROR_BAD_PACKET, // 04 Unexpected end of packet eQDL_ERROR_BAD_CMD, // 05 Invalid command eQDL_ERROR_06, // 06 Reserved eQDL_ERROR_OP_FAILED, // 07 Operation failed eQDL_ERROR_BAD_FLASH_ID, // 08 Invalid flash intelligent ID eQDL_ERROR_BAD_VOLTAGE, // 09 Invalid programming voltage eQDL_ERROR_WRITE_FAILED, // 10 Write verify failed eQDL_ERROR_11, // 11 Reserved eQDL_ERROR_BAD_SPC, // 12 Invalid security code eQDL_ERROR_POWERDOWN, // 13 Power-down failed eQDL_ERROR_UNSUPPORTED, // 14 NAND flash programming not supported eQDL_ERROR_CMD_SEQ, // 15 Command out of sequence eQDL_ERROR_CLOSE, // 16 Close failed eQDL_ERROR_BAD_FEATURES, // 17 Invalid feature bits eQDL_ERROR_SPACE, // 18 Out of space eQDL_ERROR_BAD_SECURITY, // 19 Invalid security mode eQDL_ERROR_MULTI_UNSUPPORTED, // 20 Multi-image NAND not supported eQDL_ERROR_POWEROFF, // 21 Power-off command not supported eQDL_ERROR_CMD_UNSUPPORTED, // 22 Command not supported eQDL_ERROR_BAD_CRC, // 23 Invalid CRC eQDL_ERROR_STATE, // 24 Command received in invalid state eQDL_ERROR_TIMEOUT, // 25 Receive timeout eQDL_ERROR_IMAGE_AUTH, // 26 Image authentication error eQDL_ERROR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLError validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLError err ) { bool retVal = false; if (err > eQDL_ERROR_ENUM_BEGIN && err < eQDL_ERROR_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQDLImageType Enumeration // QDL Download Image Type Enumeration /*=========================================================================*/ enum eQDLImageType { eQDL_IMAGE_ENUM_BEGIN = -1, eQDL_IMAGE_AMSS_MODEM = 5, // 05 AMSS modem image eQDL_IMAGE_AMSS_APPLICATION, // 06 AMSS application image eQDL_IMAGE_AMSS_UQCN = 13, // 13 Provisioning information eQDL_IMAGE_DBL = 15, // 15 DBL image eQDL_IMAGE_OSBL, // 16 OSBL image eQDL_IMAGE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLImageType validity check PARAMETERS: it [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLImageType it ) { bool retVal = false; switch (it) { case eQDL_IMAGE_AMSS_MODEM: case eQDL_IMAGE_AMSS_APPLICATION: case eQDL_IMAGE_AMSS_UQCN: case eQDL_IMAGE_DBL: case eQDL_IMAGE_OSBL: retVal = true; break; } return retVal; }; /*=========================================================================*/ // eQDLOpenStatus Enumeration // QDL Unframed Open Status Enumeration /*=========================================================================*/ enum eQDLOpenStatus { eQDL_OPEN_STATUS_ENUM_BEGIN = -1, eQDL_OPEN_STATUS_SUCCESS, // 00 Success eQDL_OPEN_STATUS_SIZE, // 01 Reported image size error eQDL_OPEN_STATUS_BAD_TYPE, // 02 Invalid image type for downloader eQDL_OPEN_STATUS_HDR_SIZE, // 03 Reported image header size error eQDL_OPEN_STATUS_HDR1, // 04 Image header incorrectly present eQDL_OPEN_STATUS_HDR2, // 05 Image header required eQDL_OPEN_STATUS_PROTECTION, // 06 Memory block protection error eQDL_OPEN_STATUS_NOT_NEEDED, // 07 Image type not required eQDL_OPEN_STATUS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLOpenStatus validity check PARAMETERS: os [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLOpenStatus os ) { bool retVal = false; if (os > eQDL_OPEN_STATUS_ENUM_BEGIN && os < eQDL_OPEN_STATUS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQDLWriteStatus Enumeration // QDL Unframed Write Status Enumeration /*=========================================================================*/ enum eQDLWriteStatus { eQDL_WRITE_STATUS_ENUM_BEGIN = -1, eQDL_WRITE_STATUS_SUCCESS, // 00 Success eQDL_WRITE_STATUS_CRC, // 01 Error with CRC eQDL_WRITE_STATUS_CONTENT, // 02 Error with chunk content eQDL_WRITE_STATUS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLWriteStatus validity check PARAMETERS: ws [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLWriteStatus ws ) { bool retVal = false; if (ws > eQDL_WRITE_STATUS_ENUM_BEGIN && ws < eQDL_WRITE_STATUS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQDLDoneStatus Enumeration // QDL Done Status Enumeration /*=========================================================================*/ enum eQDLDoneStatus { eQDL_DONE_STATUS_ENUM_BEGIN = -1, eQDL_DONE_STATUS_SUCCESS, // 00 Success eQDL_DONE_STATUS_AUTH, // 01 Authentication failure eQDL_DONE_STATUS_WRITE, // 02 Write failure eQDL_DONE_STATUS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQDLDoneStatus validity check PARAMETERS: ds [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQDLDoneStatus ds ) { bool retVal = false; if (ds > eQDL_DONE_STATUS_ENUM_BEGIN && ds < eQDL_DONE_STATUS_ENUM_END) { retVal = true; } return retVal; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QDLProtocolServer.cpp000077500000000000000000000172161455567757300253360ustar00rootroot00000000000000/*=========================================================================== FILE: QDLProtocolServer.cpp DESCRIPTION: QDL protocol packet server PUBLIC CLASSES AND METHODS: cQDLProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QDLProtocolServer.h" #include "QDLEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cQDLProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQDLProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: bufferSzRx [ I ] - Size of data buffer for incoming data SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQDLProtocolServer::cQDLProtocolServer( ULONG bufferSzRx, ULONG logSz ) : cHDLCProtocolServer( ePROTOCOL_QDL_RX, ePROTOCOL_QDL_TX, bufferSzRx, logSz ) { // Nothing to do } /*=========================================================================== METHOD: ~cQDLProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cQDLProtocolServer::~cQDLProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encoded data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQDLProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { // We encoded data bEncoded = true; if (pBuffer != 0 && pBuffer->IsValid() == true) { const BYTE * pReqBuf = mpActiveRequest->mRequest.GetBuffer(); eQDLCommand reqCmd = (eQDLCommand)pReqBuf[0]; if (reqCmd == eQDL_CMD_WRITE_UNFRAMED_REQ) { // The write request is not HDLC encoded bEncoded = false; } } if (bEncoded == true) { // Base class can handle HDLC encoding return cHDLCProtocolServer::EncodeTxData( pBuffer, bEncoded ); } return 0; } /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQDLProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } const BYTE * pReqBuf = mpActiveRequest->mRequest.GetBuffer(); const BYTE * pRspBuf = rsp.GetBuffer(); eQDLCommand reqCmd = (eQDLCommand)pReqBuf[0]; eQDLCommand rspCmd = (eQDLCommand)pRspBuf[0]; switch (reqCmd) { case eQDL_CMD_HELLO_REQ: if ( (rspCmd == eQDL_CMD_HELLO_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_OPEN_UNFRAMED_REQ: if ( (rspCmd == eQDL_CMD_OPEN_UNFRAMED_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_WRITE_UNFRAMED_REQ: if ( (rspCmd == eQDL_CMD_WRITE_UNFRAMED_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_SESSION_DONE_REQ: if ( (rspCmd == eQDL_CMD_SESSION_DONE_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; case eQDL_CMD_DOWNLOAD_REQ: case eQDL_CMD_SESSION_CLOSE_REQ: if (rspCmd == eQDL_CMD_ERROR) { bRC = true; } break; case eQDL_CMD_GET_IMAGE_PREF_REQ: if ( (rspCmd == eQDL_CMD_GET_IMAGE_PREF_RSP) || (rspCmd == eQDL_CMD_ERROR) ) { bRC = true; } break; } return bRC; } /*=========================================================================== METHOD: IsTxAbortResponse (Internal Method) DESCRIPTION: Is the passed in data a response that aborts the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQDLProtocolServer::IsTxAbortResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == true) || (rsp.IsValid() == false) ) { return bRC; } // If we are in the middle of a transmission an we receive an error // packet then we abort const BYTE * pRspBuf = rsp.GetBuffer(); eQDLCommand rspCmd = (eQDLCommand)pRspBuf[0]; if (rspCmd == eQDL_CMD_ERROR) { bRC = true; } return bRC; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QDLProtocolServer.h000077500000000000000000000063151455567757300250010ustar00rootroot00000000000000/*=========================================================================== FILE: QDLProtocolServer.h DESCRIPTION: QDL protocol packet server PUBLIC CLASSES AND METHODS: cQDLProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "HDLCProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQDLProtocolServer /*=========================================================================*/ class cQDLProtocolServer : public cHDLCProtocolServer { public: // Constructor cQDLProtocolServer( ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQDLProtocolServer(); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // Is the passed in data a response that aborts the current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & rsp ); }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QMIBuffers.cpp000077500000000000000000000234461455567757300237520ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.cpp DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQMIServiceBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQMIServiceBuffer (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::sQMIServiceBuffer( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQMIServiceBuffer::Validate(); } /*=========================================================================== METHOD: ~sQMIServiceBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::~sQMIServiceBuffer() { // Nothing to do } /*=========================================================================== METHOD: GetResult (Public Method) DESCRIPTION: Return contents of mandatory result content PARAMETERS: returnCode [ I ] - The return code (should be eQMIResultCode) errorCode [ I ] - The error code (should be eQMIErrorCode) RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::GetResult( ULONG & returnCode, ULONG & errorCode ) { if (IsResponse() == false) { return false; } std::map ::const_iterator pIter; pIter = mContents.find( QMI_TLV_ID_RESULT ); if (pIter == mContents.end()) { return false; } const sQMIRawContentHeader * pContent = pIter->second; if (pContent == 0) { ASSERT( 0 ); return false; } if (pContent->mLength != 4) { return false; } const WORD * pData = (const WORD *)(++pContent); returnCode = (ULONG)*pData++; errorCode = (ULONG)*pData; return true; } /*=========================================================================== METHOD: BuildBuffer (Static Public Method) DESCRIPTION: Build a QMI request PARAMETERS: serviceType [ I ] - QMI service type msgID [ I ] - The QMI message request ID bResponse [ I ] - Build a response? bIndication [ I ] - Build an indication? pPayload [ I ] - Payload payloadLen [ I ] - Size of above payload RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQMIServiceBuffer::BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse, bool bIndication, const BYTE * pPayload, ULONG payloadLen ) { const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG totalHdrSz = szTransHdr + szMsgHdr; // Truncate payload? if (payloadLen > (QMI_MAX_BUFFER_SIZE - totalHdrSz)) { payloadLen = QMI_MAX_BUFFER_SIZE - totalHdrSz; } // Make sure length agrees with pointer if (pPayload == 0) { payloadLen = 0; } // Allocate buffer PBYTE pBuffer = new BYTE[payloadLen + totalHdrSz]; if (pBuffer == 0) { return 0; } // Format header sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)&pBuffer[0]; pHdr->mCompound = 0; pHdr->mResponse = 0; pHdr->mIndication = 0; pHdr->mReserved = 0; pHdr->mTransactionID = 1; bool bTX = true; if (bResponse == true) { pHdr->mResponse = 1; bTX = false; } else if (bIndication == true) { pHdr->mIndication = 1; bTX = false; } pHdr++; // Format message header sQMIRawMessageHeader * pMsg = 0; pMsg = (sQMIRawMessageHeader *)pHdr; pMsg->mMessageID = msgID; pMsg->mLength = (WORD)payloadLen; // Copy in payload? if (payloadLen > 0 && pPayload != 0) { memcpy( (LPVOID)&pBuffer[totalHdrSz], (LPCVOID)&pPayload[0], (SIZE_T)payloadLen ); } // Compute total size ULONG sz = payloadLen + totalHdrSz; // Build and return the shared buffer eProtocolType pt = MapQMIServiceToProtocol( serviceType, bTX ); sSharedBuffer * pBuf = new sSharedBuffer( sz, pBuffer, pt ); return pBuf; } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (IsQMIProtocol( pt ) == false) { mbValid = bRC; return bRC; } const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szContentHdr = (ULONG)sizeof(sQMIRawContentHeader); // Must be enough space for both headers ULONG sz = GetSize(); if (sz < szTransHdr + szMsgHdr) { mbValid = bRC; return bRC; } const BYTE * pBuffer = GetBuffer(); // Obtain transaction header const sQMIServiceRawTransactionHeader * pTransHdr = 0; pTransHdr = (const sQMIServiceRawTransactionHeader *)pBuffer; pBuffer += szTransHdr; // This is required to be 0 if (pTransHdr->mCompound != 0) { mbValid = bRC; return bRC; } // These are mutually exclusive if (pTransHdr->mIndication == 1 && pTransHdr->mResponse == 1) { mbValid = bRC; return bRC; } // Requests/responses required valid transaction IDs if ( (pTransHdr->mIndication == 0) && (pTransHdr->mTransactionID == (WORD)INVALID_QMI_TRANSACTION_ID) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 1 || pTransHdr->mIndication == 1) && (IsQMIProtocolRX( pt ) == false) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 0 && pTransHdr->mIndication == 0) && (IsQMIProtocolTX( pt ) == false) ) { mbValid = bRC; return bRC; } // Obtain message header const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (const sQMIRawMessageHeader *)pBuffer; pBuffer += szMsgHdr; // Validate reported length if (sz != ((ULONG)pMsgHdr->mLength + szTransHdr + szMsgHdr)) { mbValid = bRC; return bRC; } // Extract content TLV structures ULONG contentProcessed = 0; ULONG contentSz = (ULONG)pMsgHdr->mLength; while (contentProcessed < contentSz) { const sQMIRawContentHeader * pContent = 0; pContent = (const sQMIRawContentHeader *)pBuffer; ULONG tlvLen = szContentHdr + pContent->mLength; contentProcessed += tlvLen; if (contentProcessed <= contentSz) { mContents[(ULONG)pContent->mTypeID] = pContent; } else { mContents.clear(); mbValid = bRC; return bRC; } pBuffer += tlvLen; } // Validate TLV reported lengths if (contentProcessed != contentSz) { mbValid = bRC; return bRC; } // Success! bRC = true; mbValid = bRC; return mbValid; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QMIBuffers.h000077500000000000000000000266061455567757300234200ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.h DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMUXHeader sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIEnum.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QMI maximum buffer size (cannot be larger than MAX_SHARED_BUFFER_SIZE) const ULONG QMI_MAX_BUFFER_SIZE = MAX_SHARED_BUFFER_SIZE; // Content ID for mandatory result TLV const ULONG QMI_TLV_ID_RESULT = 2; /*=========================================================================== METHOD: MapQMIServiceToProtocol (Inline Method) DESCRIPTION: Map QMI service type (eQMIService) and direction to a protocol type (eProtocolType) PARAMETERS: serviceType [ I ] - Enum value being mapped bTransmission [ I ] - IS this a transmission (TX vs. RX)? RETURN VALUE: bool ===========================================================================*/ inline eProtocolType MapQMIServiceToProtocol( eQMIService serviceType, bool bTransmission = true ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; switch (serviceType) { case eQMI_SVC_WDS: pt = ePROTOCOL_QMI_WDS_RX; break; case eQMI_SVC_DMS: pt = ePROTOCOL_QMI_DMS_RX; break; case eQMI_SVC_NAS: pt = ePROTOCOL_QMI_NAS_RX; break; case eQMI_SVC_QOS: pt = ePROTOCOL_QMI_QOS_RX; break; case eQMI_SVC_WMS: pt = ePROTOCOL_QMI_WMS_RX; break; case eQMI_SVC_PDS: pt = ePROTOCOL_QMI_PDS_RX; break; case eQMI_SVC_AUTH: pt = ePROTOCOL_QMI_AUTH_RX; break; case eQMI_SVC_VOICE: pt = ePROTOCOL_QMI_VOICE_RX; break; case eQMI_SVC_CAT: pt = ePROTOCOL_QMI_CAT_RX; break; case eQMI_SVC_RMS: pt = ePROTOCOL_QMI_RMS_RX; break; case eQMI_SVC_OMA: pt = ePROTOCOL_QMI_OMA_RX; break; case eQMI_SVC_CONTROL: pt = ePROTOCOL_QMI_CTL_RX; break; } if (pt != ePROTOCOL_ENUM_BEGIN && bTransmission == true) { // This relies on the fact the the TX variant is always the next // enumerated value after the RX variant (so don't do something // to change that) pt = (eProtocolType)((ULONG)pt + 1); } return pt; }; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQMUXHeader // Struct to represent a QMUX transaction header (raw) /*=========================================================================*/ struct sQMUXHeader { public: WORD mLength; BYTE mFlags; BYTE mServiceType; BYTE mClientID; }; /*=========================================================================*/ // Struct sQMIControlRawTransactionHeader // Struct to represent a QMI control transaction header (raw) /*=========================================================================*/ struct sQMIControlRawTransactionHeader { public: BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 6; BYTE mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIServiceRawTransactionHeader // Struct to represent a QMI service transaction header (raw) /*=========================================================================*/ struct sQMIServiceRawTransactionHeader { public: BYTE mCompound : 1; // Is this a compound transaction? BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 5; WORD mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIRawMessageHeader // Struct to represent a QMI (control/service) message header (raw) /*=========================================================================*/ struct sQMIRawMessageHeader { public: WORD mMessageID; // Message ID WORD mLength; // Length of message (not including this header) }; /*=========================================================================*/ // Struct sQMIRawContentHeader // Struct to represent a QMI (control/service) content // (i.e Type/Length/Value, TLV) header (raw) /*=========================================================================*/ struct sQMIRawContentHeader { public: BYTE mTypeID; // Content type ID WORD mLength; // Content length (not including this header) }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQMIServiceBuffer // Struct to represent a QMI service channel request/response/indication // (shared buffer) /*=========================================================================*/ struct sQMIServiceBuffer : public sProtocolBuffer { public: // Constructor sQMIServiceBuffer( sSharedBuffer * pBuffer ); // Destructor virtual ~sQMIServiceBuffer(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bRequest = (pHdr->mResponse == 0 && pHdr->mIndication == 0); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bResponse = (pHdr->mResponse == 1); } return bResponse; }; // (Inline) Is this an indication? bool IsIndication() const { bool bInd = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bInd = (pHdr->mIndication == 1); } return bInd; }; // (Inline) Return raw header const sQMIServiceRawTransactionHeader * GetHeader() const { const sQMIServiceRawTransactionHeader * pHdr = 0; if (IsValid() == true) { pHdr = (const sQMIServiceRawTransactionHeader *)GetBuffer(); } return pHdr; }; // (Inline) Return the message ID ULONG GetMessageID() const { ULONG id = (ULONG)ULONG_MAX; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; id = pMsgHdr->mMessageID; } return id; }; // (Inline) Return the transaction ID WORD GetTransactionID() const { WORD id = (WORD)INVALID_QMI_TRANSACTION_ID; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { id = pHdr->mTransactionID; } return id; }; // (Inline) Return content structures std::map GetContents() const { return mContents; }; // Return contents of mandatory result content bool GetResult( ULONG & returnCode, ULONG & errorCode ); // Build a QMI request/response/indication static sSharedBuffer * BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse = false, bool bIndication = false, const BYTE * pData = 0, ULONG dataLen = 0 ); protected: // QMI protocol server has to be able to set the transaction ID friend class cQMIProtocolServer; // Set the transaction ID void SetTransactionID( WORD tid ) const { if (tid == (WORD)INVALID_QMI_TRANSACTION_ID || IsValid() == false) { return; } sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)GetHeader(); if (pHdr != 0) { pHdr->mTransactionID = tid; } }; // Is this QMI request/response/indication packet valid? virtual bool Validate(); /* Content TLV structures (indexed by type ID) */ std::map mContents; private: // Prevent 'upcopying' sQMIServiceBuffer( const sProtocolBuffer & ); sQMIServiceBuffer & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QMIEnum.h000077500000000000000000001324411455567757300227230ustar00rootroot00000000000000/*=========================================================================== FILE: QMIEnum.h DESCRIPTION: QMI protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQMIService eQMIMessageCTL eQMIMessageWDS eQMIMessageDMS eQMIMessageNAS eQMIMessageWMS eQMIMessagePDS eQMIMessageAUTH eQMIMessageCAT eQMIMessageRMS eQMIMessageOMA eQMIResultCode eQMIErrorCode eQMICallEndReason Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid QMI transaction ID const ULONG INVALID_QMI_TRANSACTION_ID = 0; // QMI DMS PRL size constants const ULONG QMI_DMS_MAX_PRL_SIZE = 16384; const ULONG QMI_DMS_MAX_PRL_BLOCK = 256; /*=========================================================================*/ // eQMIService Enumeration // QMI Service Type Enumeration /*=========================================================================*/ enum eQMIService { eQMI_SVC_ENUM_BEGIN = -1, eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_VOICE = 9, // 009 Voice service eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service eQMI_SVC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIService validity check PARAMETERS: svc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIService svc ) { bool retVal = false; if ( (svc > eQMI_SVC_ENUM_BEGIN && svc <= eQMI_SVC_AUTH) || (svc == eQMI_SVC_VOICE) || (svc >= eQMI_SVC_CAT && svc < eQMI_SVC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCTL Enumeration // QMI Control Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCTL { eQMI_CTL_ENUM_BEGIN = -1, eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode eQMI_CTL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCTL validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCTL msgID ) { bool retVal = false; if (msgID >= eQMI_CTL_SET_INSTANCE_ID && msgID < eQMI_CTL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDS Enumeration // QMI WDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDS { eQMI_WDS_ENUM_BEGIN = -1, eQMI_WDS_RESET, // 00 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 01 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 01 Connection state report indication eQMI_WDS_ABORT, // 02 Abort previously issued WDS command eQMI_WDS_START_NET = 32, // 32 Start WDS network interface eQMI_WDS_STOP_NET, // 33 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 34 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 34 Packet data connection status indication eQMI_WDS_GET_RATES, // 35 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 36 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 37 Go dormant eQMI_WDS_G0_ACTIVE, // 38 Go active eQMI_WDS_CREATE_PROFILE, // 39 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 40 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 41 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 42 Get all profiles eQMI_WDS_GET_PROFILE, // 43 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 44 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 45 Get the runtime data session settings eQMI_WDS_SET_MIP, // 46 Get the mobile IP setting eQMI_WDS_GET_MIP, // 47 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 48 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 52 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 53 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 54 Get the modem status eQMI_WDS_MODEM_IND = 54, // 54 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 55 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 56 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 56 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 60 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 61 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 62 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 63 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 64 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 65 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 66 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 67 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 68 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 69 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 70 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 71 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 72 Get maximum size of call history list eQMI_WDS_SET_IP_FAMILY = 77, // 77 Set the client IP family preference eQMI_WDS_SET_AUTOCONNECT = 81, // 81 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 82 Get the DNS setting eQMI_WDS_SET_DNS, // 83 Set the DNS setting eQMI_WDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDS msgID ) { bool retVal = false; if ( (msgID > eQMI_WDS_ENUM_BEGIN && msgID <= eQMI_WDS_ABORT) || (msgID >= eQMI_WDS_START_NET && msgID <= eQMI_WDS_GET_DORMANCY) || (msgID >= eQMI_WDS_GET_AUTOCONNECT && msgID <= eQMI_WDS_MODEM_INFO_IND) || (msgID >= eQMI_WDS_GET_ACTIVE_MIP && msgID <= eQMI_WDS_GET_CALL_LIST_MAX) || (msgID == eQMI_WDS_SET_IP_FAMILY) || (msgID >= eQMI_WDS_SET_AUTOCONNECT && msgID < eQMI_WDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageDMS Enumeration // QMI DMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageDMS { eQMI_DMS_ENUM_BEGIN = -1, eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERTAING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mod eQMI_DMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageDMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageDMS msgID ) { bool retVal = false; if ( (msgID > eQMI_DMS_ENUM_BEGIN && msgID <= eQMI_DMS_EVENT_IND) || (msgID >= eQMI_DMS_GET_CAPS && msgID < eQMI_DMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageNAS Enumeration // QMI NAS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageNAS { eQMI_NAS_ENUM_BEGIN = -1, eQMI_NAS_RESET, // 00 Reset NAS service state variables eQMI_NAS_ABORT, // 01 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 02 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 02 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 03 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 32 Get the signal strength eQMI_NAS_SCAN_NETS, // 33 Scan for visible network eQMI_NAS_REGISTER_NET, // 34 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 35 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 36 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 36 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 37 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 38 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 39 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 40 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 41 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 42 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 43 Get the technology preference eQMI_NAS_GET_ACCOLC, // 44 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 45 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 46 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 47 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 48 Set various network parameters eQMI_NAS_GET_RF_INFO, // 49 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 50 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 51 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 52 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 52 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 55 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 56 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 56 DDTM preference indication eQMI_NAS_GET_PLMN_MODE = 59, // 59 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 60 CSP PLMN mode bit indication eQMI_NAS_GET_PLMN_NAME = 68, // 68 Get operator name for specified network eQMI_NAS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageNAS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageNAS msgID ) { bool retVal = false; if ( (msgID > eQMI_NAS_ENUM_BEGIN && msgID <= eQMI_NAS_SET_REG_EVENT) || (msgID >= eQMI_NAS_GET_RSSI && msgID <= eQMI_NAS_SYS_SELECT_IND) || (msgID >= eQMI_NAS_SET_DDTM_PREF && msgID <= eQMI_NAS_DDTM_IND) || (msgID >= eQMI_NAS_GET_PLMN_MODE && msgID <= eQMI_NAS_PLMN_MODE_IND) || (msgID >= eQMI_NAS_GET_PLMN_NAME && msgID < eQMI_NAS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWMS Enumeration // QMI WMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWMS { eQMI_WMS_ENUM_BEGIN = -1, eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWMS msgID ) { bool retVal = false; if ( (msgID > eQMI_WMS_ENUM_BEGIN && msgID <= eQMI_WMS_EVENT_IND) || (msgID >= eQMI_WMS_RAW_SEND && msgID <= eQMI_WMS_DELETE) || (msgID >= eQMI_WMS_GET_MSG_PROTOCOL && msgID < eQMI_WMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDS Enumeration // QMI PDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDS { eQMI_PDS_ENUM_BEGIN = -1, eQMI_PDS_RESET, // 00 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 01 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 01 PDS report indication eQMI_PDS_GET_STATE = 32, // 32 Return PDS service state eQMI_PDS_STATE_IND = 32, // 32 PDS service state indication eQMI_PDS_SET_STATE, // 33 Set PDS service state eQMI_PDS_START_SESSION, // 34 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 35 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 36 Manual tracking session position eQMI_PDS_END_SESSION, // 37 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 38 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 39 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 40 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 41 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 42 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 43 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 44 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 45 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 46 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 47 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 48 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 49 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 50 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 51 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 52 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 53 Request single position fix eQMI_PDS_GET_VERSION, // 54 Get PDS service version eQMI_PDS_INJECT_XTRA, // 55 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 56 Inject position data eQMI_PDS_INJECT_WIFI, // 57 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 58 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 59 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 60 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 61 Inject absolute time eQMI_PDS_INJECT_EFS, // 62 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 63 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 64 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 65 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 66 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 67 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 68 Get GPS state eQMI_PDS_GET_METHODS = 80, // 80 Get GPS position methods state eQMI_PDS_SET_METHODS, // 81 Set GPS position methods state eQMI_PDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDS msgID ) { bool retVal = false; if ( (msgID > eQMI_PDS_ENUM_BEGIN && msgID <= eQMI_PDS_EVENT_IND) || (msgID >= eQMI_PDS_GET_STATE && msgID <= eQMI_PDS_GET_GPS_STATE) || (msgID >= eQMI_PDS_GET_METHODS && msgID < eQMI_PDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAUTH Enumeration // QMI Authentication Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAUTH { eQMI_AUTH_ENUM_BEGIN = -1, eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_ENUM_END }; /*=========================================================================*/ // eQMIMessageVoice Enumeration // QMI Voice Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageVoice { eQMI_VOICE_ENUM_BEGIN = -1, eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageVoice validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageVoice msgID ) { bool retVal = false; if ( (msgID == eQMI_VOICE_INDICATION_REG) || (msgID >= eQMI_VOICE_CALL_ORIGINATE && msgID <= eQMI_VOICE_CALL_ANSWER) || (msgID >= eQMI_VOICE_GET_CALL_INFO && msgID <= eQMI_VOICE_GET_ALL_STATUS) || (msgID >= eQMI_VOICE_MANAGE_CALLS && msgID < eQMI_VOICE_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAUTH validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAUTH msgID ) { bool retVal = false; if (msgID >= eQMI_AUTH_START_EAP && msgID < eQMI_AUTH_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCAT Enumeration // QMI CAT Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCAT { eQMI_CAT_ENUM_BEGIN = -1, eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCAT msgID ) { bool retVal = false; if ( (msgID > eQMI_CAT_ENUM_BEGIN && msgID <= eQMI_CAT_EVENT_IND) || (msgID >= eQMI_CAT_GET_STATE && msgID < eQMI_CAT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMS Enumeration // QMI RMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMS { eQMI_RMS_ENUM_BEGIN = -1, eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE, // 33 Set SMS wake settings eQMI_RMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMS msgID ) { bool retVal = false; if ( (msgID == eQMI_RMS_RESET) || (msgID >= eQMI_RMS_GET_SMS_WAKE && msgID < eQMI_RMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageOMA Enumeration // QMI OMA-DM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageOMA { eQMI_OMA_ENUM_BEGIN = -1, eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES, // 37 Set feature settings eQMI_OMA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageOMA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageOMA msgID ) { bool retVal = false; if ( (msgID > eQMI_OMA_ENUM_BEGIN && msgID <= eQMI_OMA_EVENT_IND) || (msgID >= eQMI_OMA_START_SESSION && msgID < eQMI_OMA_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIResultCode Enumeration // QMI Result Code Enumeration /*=========================================================================*/ enum eQMIResultCode { eQMI_RC_ENUM_BEGIN = -1, eQMI_RC_SUCCESS, // 00 Success eQMI_RC_ERROR, // 01 Error eQMI_RC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIResultCode validity check PARAMETERS: rc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIResultCode rc ) { bool retVal = false; if (rc > eQMI_RC_ENUM_BEGIN && rc < eQMI_RC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIErrorCode Enumeration // QMI Error Code Enumeration /*=========================================================================*/ enum eQMIErrorCode { eQMI_ERR_ENUM_BEGIN = -1, eQMI_ERR_NONE, // 00 eQMI_ERR_MALFORMED_MSG, // 01 eQMI_ERR_NO_MEMORY, // 02 eQMI_ERR_INTERNAL, // 03 eQMI_ERR_ABORTED, // 04 eQMI_ERR_CLIENT_IDS_EXHAUSTED, // 05 eQMI_ERR_UNABORTABLE_TRANSACTION, // 06 eQMI_ERR_INVALID_CLIENT_ID, // 07 eQMI_ERR_NO_THRESHOLDS, // 08 eQMI_ERR_INVALID_HANDLE, // 09 eQMI_ERR_INVALID_PROFILE, // 10 eQMI_ERR_INVALID_PIN_ID, // 11 eQMI_ERR_INCORRECT_PIN, // 12 eQMI_ERR_NO_NETWORK_FOUND, // 13 eQMI_ERR_CALL_FAILED, // 14 eQMI_ERR_OUT_OF_CALL, // 15 eQMI_ERR_NOT_PROVISIONED, // 16 eQMI_ERR_MISSING_ARG, // 17 eQMI_ERR_18, // 18 eQMI_ERR_ARG_TOO_LONG, // 19 eQMI_ERR_20, // 20 eQMI_ERR_21, // 21 eQMI_ERR_INVALID_TX_ID, // 22 eQMI_ERR_DEVICE_IN_USE, // 23 eQMI_ERR_OP_NETWORK_UNSUPPORTED, // 24 eQMI_ERR_OP_DEVICE_UNSUPPORTED, // 25 eQMI_ERR_NO_EFFECT, // 26 eQMI_ERR_NO_FREE_PROFILE, // 27 eQMI_ERR_INVALID_PDP_TYPE, // 28 eQMI_ERR_INVALID_TECH_PREF, // 29 eQMI_ERR_INVALID_PROFILE_TYPE, // 30 eQMI_ERR_INVALID_SERVICE_TYPE, // 31 eQMI_ERR_INVALID_REGISTER_ACTION, // 32 eQMI_ERR_INVALID_PS_ATTACH_ACTION, // 33 eQMI_ERR_AUTHENTICATION_FAILED, // 34 eQMI_ERR_PIN_BLOCKED, // 35 eQMI_ERR_PIN_ALWAYS_BLOCKED, // 36 eQMI_ERR_UIM_UNINITIALIZED, // 37 eQMI_ERR_MAX_QOS_REQUESTS_IN_USE, // 38 eQMI_ERR_INCORRECT_FLOW_FILTER, // 39 eQMI_ERR_NETWORK_QOS_UNAWARE, // 40 eQMI_ERR_INVALID_QOS_ID, // 41 eQMI_ERR_REQUESTED_NUM_UNSUPPORTED, // 42 eQMI_ERR_INTERFACE_NOT_FOUND, // 43 eQMI_ERR_FLOW_SUSPENDED, // 44 eQMI_ERR_INVALID_DATA_FORMAT, // 45 eQMI_ERR_GENERAL, // 46 eQMI_ERR_UNKNOWN, // 47 eQMI_ERR_INVALID_ARG, // 48 eQMI_ERR_INVALID_INDEX, // 49 eQMI_ERR_NO_ENTRY, // 50 eQMI_ERR_DEVICE_STORAGE_FULL, // 51 eQMI_ERR_DEVICE_NOT_READY, // 52 eQMI_ERR_NETWORK_NOT_READY, // 53 eQMI_ERR_WMS_CAUSE_CODE, // 54 eQMI_ERR_WMS_MESSAGE_NOT_SENT, // 55 eQMI_ERR_WMS_MESSAGE_DELIVERY_FAILURE, // 56 eQMI_ERR_WMS_INVALID_MESSAGE_ID, // 57 eQMI_ERR_WMS_ENCODING, // 58 eQMI_ERR_AUTHENTICATION_LOCK, // 59 eQMI_ERR_INVALID_TRANSITION, // 60 eQMI_ERR_61, // 61 eQMI_ERR_62, // 62 eQMI_ERR_63, // 63 eQMI_ERR_64, // 64 eQMI_ERR_SESSION_INACTIVE, // 65 eQMI_ERR_SESSION_INVALID, // 66 eQMI_ERR_SESSION_OWNERSHIP, // 67 eQMI_ERR_INSUFFICIENT_RESOURCES, // 68 eQMI_ERR_DISABLED, // 69 eQMI_ERR_INVALID_OPERATION, // 70 eQMI_ERR_INVALID_QMI_CMD, // 71 eQMI_ERR_WMS_TPDU_TYPE, // 72 eQMI_ERR_WMS_SMSC_ADDR, // 73 eQMI_ERR_INFO_UNAVAILABLE, // 74 eQMI_ERR_SEGMENT_TOO_LONG, // 75 eQMI_ERR_SEGMENT_ORDER, // 76 eQMI_ERR_BUNDLING_NOT_SUPPORTED, // 77 eQMI_ERR_78, // 78 eQMI_ERR_POLICY_MISMATCH, // 79 eQMI_ERR_SIM_FILE_NOT_FOUND, // 80 eQMI_ERR_EXTENDED_EXTERNAL, // 81 eQMI_ERR_ACCESS_DENIED, // 82 eQMI_ERR_HARDWARE_RESTRICTED, // 83 eQMI_ERR_ACK_NOT_SENT, // 84 eQMI_ERR_INCOMPATIBLE_STATE = 90, // 90 eQMI_ERR_FDN_RESTRICT, // 91 eQMI_ERR_SUPS_FAILURE_CAUSE, // 92 eQMI_ERR_NO_RADIO, // 93 eQMI_ERR_NOT_SUPPORTED, // 94 eQMI_ERR_CARD_CALL_CONTROL_FAILED = 96, // 96 eQMI_ERR_NETWORK_ABORTED, // 97 eQMI_ERR_CAT_EVT_REG_FAILED, // 61441 eQMI_ERR_CAT_INVALID_TR, // 61442 eQMI_ERR_CAT_INVALID_ENV_CMD, // 61443 eQMI_ERR_CAT_ENV_CMD_BUSY, // 61444 eQMI_ERR_CAT_ENV_CMD_FAIL, // 61445 eQMI_ERR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIErrorCode validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIErrorCode ec ) { bool retVal = false; if ( (ec > eQMI_ERR_ENUM_BEGIN && ec <= eQMI_ERR_ACK_NOT_SENT) || (ec >= eQMI_ERR_INCOMPATIBLE_STATE && ec <= eQMI_ERR_NOT_SUPPORTED) || (ec == eQMI_ERR_CARD_CALL_CONTROL_FAILED) || (ec == eQMI_ERR_NETWORK_ABORTED) || (ec >= eQMI_ERR_CAT_EVT_REG_FAILED && ec < eQMI_ERR_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMICallEndReason Enumeration // QMI Call End Reason Enumeration /*=========================================================================*/ enum eQMICallEndReason { eQMI_CALL_END_REASON_BEGIN = -1, // General eQMI_CALL_END_REASON_UNSPECIFIED = 1, // 1 eQMI_CALL_END_REASON_CLIENT_END, // 2 eQMI_CALL_END_REASON_NO_SRV, // 3 eQMI_CALL_END_REASON_FADE, // 4 eQMI_CALL_END_REASON_REL_NORMAL, // 5 eQMI_CALL_END_REASON_ACC_IN_PROG, // 6 eQMI_CALL_END_REASON_ACC_FAIL, // 7 eQMI_CALL_END_REASON_REDIR_OR_HANDOFF, // 8 eQMI_CALL_END_REASON_CLOSE_IN_PROGRESS, // 9 eQMI_CALL_END_REASON_AUTH_FAILED, // 10 eQMI_CALL_END_REASON_INTERNAL, // 11 // CDMA eQMI_CALL_END_REASON_CDMA_LOCK = 500, // 500 eQMI_CALL_END_REASON_INTERCEPT, // 501 eQMI_CALL_END_REASON_REORDER, // 502 eQMI_CALL_END_REASON_REL_SO_REJ, // 503 eQMI_CALL_END_REASON_INCOM_CALL, // 504 eQMI_CALL_END_REASON_ALERT_STOP, // 505 eQMI_CALL_END_REASON_ACTIVATION, // 506 eQMI_CALL_END_REASON_MAX_ACCESS_PROBE, // 507 eQMI_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS, // 508 eQMI_CALL_END_REASON_NO_RESPONSE_FROM_BS, // 509 eQMI_CALL_END_REASON_REJECTED_BY_BS, // 510 eQMI_CALL_END_REASON_INCOMPATIBLE, // 511 eQMI_CALL_END_REASON_ALREADY_IN_TC, // 512 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_GPS, // 513 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_SMS, // 514 eQMI_CALL_END_REASON_NO_CDMA_SRV, // 515 // GSM/WCDMA eQMI_CALL_END_REASON_CONF_FAILED = 1000, // 1000 eQMI_CALL_END_REASON_INCOM_REJ, // 1001 eQMI_CALL_END_REASON_NO_GW_SRV, // 1002 eQMI_CALL_END_REASON_NETWORK_END, // 1003 eQMI_CALL_END_REASON_LLC_SNDCP_FAILURE, // 1004 eQMI_CALL_END_REASON_INSUFFICIENT_RESOURCES, // 1005 eQMI_CALL_END_REASON_OPTION_TEMP_OOO, // 1006 eQMI_CALL_END_REASON_NSAPI_ALREADY_USED, // 1007 eQMI_CALL_END_REASON_REGULAR_DEACTIVATION, // 1008 eQMI_CALL_END_REASON_NETWORK_FAILURE, // 1009 eQMI_CALL_END_REASON_UMTS_REATTACH_REQ, // 1010 eQMI_CALL_END_REASON_UMTS_PROTOCOL_ERROR, // 1011 eQMI_CALL_END_REASON_OPERATOR_BARRING, // 1012 eQMI_CALL_END_REASON_UNKNOWN_APN, // 1013 eQMI_CALL_END_REASON_UNKNOWN_PDP, // 1014 eQMI_CALL_END_REASON_GGSN_REJECT, // 1015 eQMI_CALL_END_REASON_ACTIVATION_REJECT, // 1016 eQMI_CALL_END_REASON_OPTION_NOT_SUPPORTED, // 1017 eQMI_CALL_END_REASON_OPTION_UNSUBSCRIBED, // 1018 eQMI_CALL_END_REASON_QOS_NOT_ACCEPTED, // 1019 eQMI_CALL_END_REASON_TFT_SEMANTIC_ERROR, // 1020 eQMI_CALL_END_REASON_TFT_SYNTAX_ERROR, // 1021 eQMI_CALL_END_REASON_UNKNOWN_PDP_CONTEXT, // 1022 eQMI_CALL_END_REASON_FILTER_SEMANTIC_ERROR, // 1023 eQMI_CALL_END_REASON_FILTER_SYNTAX_ERROR, // 1024 eQMI_CALL_END_REASON_PDP_WITHOUT_ACTIVE_TFT, // 1025 eQMI_CALL_END_REASON_INVALID_TRANSACTION_ID, // 1026 eQMI_CALL_END_REASON_MESSAGE_SEMANTIC_ERROR, // 1027 eQMI_CALL_END_REASON_INVALID_MANDATORY_INFO, // 1028 eQMI_CALL_END_REASON_TYPE_UNSUPPORTED, // 1029 eQMI_CALL_END_REASON_MSG_TYPE_WRONG_FOR_STATE, // 1030 eQMI_CALL_END_REASON_UNKNOWN_INFO_ELEMENT, // 1031 eQMI_CALL_END_REASON_CONDITIONAL_IE_ERROR, // 1032 eQMI_CALL_END_REASON_MSG_WRONG_FOR_PROTOCOL, // 1033 eQMI_CALL_END_REASON_APN_TYPE_CONFLICT, // 1034 eQMI_CALL_END_REASON_NO_GPRS_CONTEXT, // 1035 eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED, // 1036 // CDMA 1xEV-DO (HDR) eQMI_CALL_END_REASON_CD_GEN_OR_BUSY = 1500, // 1500 eQMI_CALL_END_REASON_CD_BILL_OR_AUTH, // 1501 eQMI_CALL_END_REASON_CHG_HDR, // 1502 eQMI_CALL_END_REASON_EXIT_HDR, // 1503 eQMI_CALL_END_REASON_HDR_NO_SESSION , // 1504 eQMI_CALL_END_REASON_HDR_ORIG_DURING_GPS_FIX, // 1505 eQMI_CALL_END_REASON_HDR_CS_TIMEOUT , // 1506 eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM, // 1507 eQMI_CALL_END_REASON_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMICallEndReason validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMICallEndReason err ) { if ( (err >= eQMI_CALL_END_REASON_UNSPECIFIED) && (err <= eQMI_CALL_END_REASON_INTERNAL) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CDMA_LOCK) && (err <= eQMI_CALL_END_REASON_NO_CDMA_SRV) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CONF_FAILED) && (err <= eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CD_GEN_OR_BUSY) && (err <= eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM) ) { return true; } return false; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QMIProtocolServer.cpp000077500000000000000000000266211455567757300253440ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIProtocolServer.h" #include "QMIBuffers.h" /*=========================================================================*/ // cQMIProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQMIProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: serviceType [ I ] - QMI service type requested bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( MapQMIServiceToProtocol( serviceType, false ), MapQMIServiceToProtocol( serviceType, true ), bufferSzRx, logSz ), mLastTID( (WORD)INVALID_QMI_TRANSACTION_ID ), mService( serviceType ), mMEID( "" ) { // Nothing to do } /*=========================================================================== METHOD: ~cQMIProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::~cQMIProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the configured QMI service using the given QMI control file PARAMETERS: pControlFile [ I ] - QMI control file SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::Connect( LPCSTR pControlFile ) { // Assume failure bool bRC = false; if (IsValid( mService ) == false || mService == eQMI_SVC_CONTROL) { return bRC; } // Store the MEID mMEID = GetDeviceMEID( pControlFile ); // Pass service file to base class for actual connection bRC = cProtocolServer::Connect( pControlFile ); if (bRC == false) { TRACE( "QMI connect %d failed\n", mService ); } return bRC; } /*=========================================================================== METHOD: GetDeviceMEID (Internal Method) DESCRIPTION: Get device MEID by interfacing to the given QMI control file PARAMETERS: deviceNode [ I ] - QMI device node SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: std::string (empty upon failure) ===========================================================================*/ std::string cQMIProtocolServer::GetDeviceMEID( std::string deviceNode ) { std::string retStr = ""; int devHandle = open( deviceNode.c_str(), 0 ); if (devHandle == INVALID_HANDLE_VALUE) { return retStr; } char devMEID[15]; memset( &devMEID[0], 0, 15 ); if (ioctl( devHandle, QMI_GET_MEID_IOCTL, &devMEID[0] ) != 0) { close( devHandle ); return retStr; } // Enforce null devMEID[14] = 0; retStr = &devMEID[0]; close( devHandle ); } /*=========================================================================== METHOD: ValidateRequest (Internal Method) DESCRIPTION: Validate a request that is about to be scheduled SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::ValidateRequest( const sProtocolRequest & req ) { if (cProtocolServer::ValidateRequest( req ) == false) { return false; } sQMIServiceBuffer qmiReq( req.GetSharedBuffer() ); return qmiReq.IsValid(); } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::InitializeComm() { // Setup the QMI Service type int result = mComm.RunIOCTL( QMI_GET_SERVICE_FILE_IOCTL, (void*)(unsigned long)mService ); if (result == 0) { return true; } else { return false; } } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::CleanupComm() { mComm.RunIOCTL(0x8BE4, NULL); // Nothing to actually do here return true; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into QMI indications/responses PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response (not used) bAbortTx [ O ] - Response aborts current transmission? (not used) SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cQMIProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; bAbortTx = false; // Something to decode from? if (bytesReceived == 0) { return bRC; } // Set protocol type (we have to be dealing with a valid QMI service) eProtocolType pt = MapQMIServiceToProtocol( mService, false ); if (pt == ePROTOCOL_ENUM_BEGIN) { return bRC; } sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxBuffer, bytesReceived, pt ); if (pTmp != 0) { sQMIServiceBuffer tmpBuf( pTmp ); if (tmpBuf.IsValid() == true) { rspIdx = mLog.AddBuffer( tmpBuf ); if (IsResponse( tmpBuf ) == true) { bRC = true; } else { rspIdx = INVALID_LOG_INDEX; } } } return bRC; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encode data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQMIProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { WORD tid = ++mLastTID; if (tid == (WORD)INVALID_QMI_TRANSACTION_ID) { tid++; } sQMIServiceBuffer tmpBuf( pBuffer ); tmpBuf.SetTransactionID( tid ); // No actual encoding required as we alter the original request bEncoded = false; return 0; }; /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } sQMIServiceBuffer qmiReq( mpActiveRequest->mRequest.GetSharedBuffer() ); sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiReq.IsValid() == false || qmiRsp.IsValid() == false) { return bRC; } if (qmiRsp.IsResponse() == false) { return bRC; } WORD reqID = qmiReq.GetTransactionID(); WORD rspID = qmiRsp.GetTransactionID(); if ( (reqID == (WORD)INVALID_QMI_TRANSACTION_ID) || (rspID == (WORD)INVALID_QMI_TRANSACTION_ID) || (reqID != rspID) ) { return bRC; } // Sadly there are documentated cases of firmware returning responses // with a matching transaction ID but a mismatching message ID. There // is no reason for this to be considered valid behavior as of yet ULONG reqMsgID = qmiReq.GetMessageID(); ULONG rspMsgID = qmiRsp.GetMessageID(); if (reqMsgID != rspMsgID) { return bRC; } bRC = true; return bRC; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/QMIProtocolServer.h000077500000000000000000000111641455567757300250050ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQMIProtocolServer /*=========================================================================*/ class cQMIProtocolServer : public cProtocolServer { public: // Constructor cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQMIProtocolServer(); // Connect to the given QMI service using the configured QMI // control file bool Connect( LPCSTR pControlFile ); // (Inline) Return the device MEID std::string GetMEID() { return mMEID; }; // (Inline) Return the QMI service type eQMIService GetServiceType() { return mService; }; // Get device MEID by interfacing to the given device node static std::string GetDeviceMEID( std::string deviceNode ); protected: // Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ); // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // (Inline) Is the passed in data a response that aborts the // current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & /* rsp */ ) { // QMI doesn't necessarily require this return false; }; /* Current transaction ID */ SHORT mLastTID; /* Type of QMI service we are serving */ eQMIService mService; /* Device MEID */ std::string mMEID; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/SharedBuffer.cpp000077500000000000000000000247631455567757300243520ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.cpp DESCRIPTION: Shareable protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes sDiagBuffer Simple struct to represent a DIAG buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for DIAG command code specific DIAG buffers Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "SharedBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Synchronization object struct sSharedBufferSync { public: // Constructor sSharedBufferSync() : mbInitialized( false ) { int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to init sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } mbInitialized = true; }; // Destructor ~sSharedBufferSync() { mbInitialized = false; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); } }; // Lock sync object void Lock() { if (mbInitialized == true) { int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to lock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // Unlock sync object void Unlock() { if (mbInitialized == true) { int nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to unlock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; protected: /* DIAG buffer critical section */ pthread_mutex_t mSyncSection; /* Has this object been initialized? */ bool mbInitialized; }; // Global (across all shared buffers) reference count guard sSharedBufferSync gRefCount; /*=========================================================================*/ // sSharedBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (copy passed in buffer) PARAMETERS: pDataToCopy [ I ] - The data buffer to copy (should be non-zero) dataLen [ I ] - The length of the above buffer (should be > 1) dataType [ I ] - Type of data (not used internal to class) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, data actually exists? if (pDataToCopy != 0) { // Yes, try to allocate memory mpData = new BYTE[dataLen]; if (mpData != 0) { // Now copy into our allocation memcpy( (PVOID)mpData, (LPCVOID)pDataToCopy, (SIZE_T)dataLen ); // Now set the size, we do this last so that our double // deletion logic is only applied if we had an allocation // in the first place mSize = dataLen; } } } } /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (assume ownership of passed in buffer) PARAMETERS: dataLen [ I ] - The length of the above buffer (should be > 1) pDataToOwn [ I ] - The data buffer to assume ownership of (should be non-zero) dataType [ I ] - Type of data (not used internal to class) NOTE: The order is intentionally reversed from the previous constructor to avoid any cases of mistaken identity (copy versus assume ownership) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Data actually exists? if (pDataToOwn != 0) { // Yes, length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, assume ownership of the passed in buffer mpData = pDataToOwn; mSize = dataLen; } else { // This data buffer is not acceptable to us, but we have assumed // ownership of the memory which we will now free delete [] pDataToOwn; } } } /*=========================================================================== METHOD: ~sSharedBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sSharedBuffer::~sSharedBuffer() { ASSERT( mRefCount == 0 ); // Buffer data to free? if (mpData != 0) { // Yes, zero first byte for caution and then delete it mpData[0] = 0; delete [] mpData; // Even more caution, zero out pointer mpData = 0; } else if (mSize != 0) { ASSERT( (PVOID)("Double deletion detected in ~sSharedBuffer") == 0 ); } } /*=========================================================================== METHOD: operator == (Public Method) DESCRIPTION: Equality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator == ( const sSharedBuffer & refBuf ) const { // Assume they are not equal bool bEq = false; // The buffers must be the same if (mpData == refBuf.mpData) { if (mSize == refBuf.mSize) { if (mRefCount == refBuf.mRefCount) { if (mType == refBuf.mType) { // The shared buffers are the same bEq = true; } } else { // Very odd - the buffers are the same, but not the ref count?!? ASSERT( 0 ); } } else { // Very odd - the buffers are the same, but not the size?!? ASSERT( 0 ); } } return bEq; } /*=========================================================================== METHOD: operator != (Public Method) DESCRIPTION: Inequality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator != ( const sSharedBuffer & refBuf ) const { if (*this == refBuf) { return false; } return true; } /*=========================================================================== METHOD: AddRef (Internal Method) DESCRIPTION: Increment reference count RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::AddRef() { gRefCount.Lock(); mRefCount++; gRefCount.Unlock(); } /*=========================================================================== METHOD: Release (Internal Method) DESCRIPTION: Release reference, delete if reference count zero RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::Release() { gRefCount.Lock(); ASSERT( mRefCount != 0 ); // Decrement reference count if (mRefCount > 0) { mRefCount--; } // ... and delete if reference count now 0 if (mRefCount == 0) { delete this; } gRefCount.Unlock(); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/SharedBuffer.h000077500000000000000000000127671455567757300240200ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.h DESCRIPTION: Shareable buffer structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- struct sProtocolBuffer; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum size of a shared buffer const ULONG MAX_SHARED_BUFFER_SIZE = 1024 * 16 + 256; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sSharedBuffer // // Simple struct to represent a reference counted shareable (no copy) // buffer, as the basis for all buffer related classes // // NOTE: Do *NOT* create instances of this structure on the stack, it // must be dynamically allocated in order to function correctly /*=========================================================================*/ struct sSharedBuffer { public: // Constructor (copy passed in buffer) sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ); // Constructor (assume ownership of passed in buffer) sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ); // Destructor virtual ~sSharedBuffer(); // Equality operator bool operator == ( const sSharedBuffer & ) const; // Inequality operator bool operator != ( const sSharedBuffer & ) const; // (Inline) Get buffer const BYTE * GetBuffer() const { return mpData; }; // (Inline) Get buffer size ULONG GetSize() const { return mSize; }; // (Inline) Get buffer type ULONG GetType() const { return mType; }; // (Inline) Is this buffer valid? bool IsValid() const { return (mpData != 0 && IsValidSize( mSize )); }; // (Inline) Get reference count ULONG GetRefCount() const { return mRefCount; }; // (Static Inline) Is the passed in size within the allowable range // a shared buffer? static bool IsValidSize( ULONG sz ) { return (sz > 0 && sz <= MAX_SHARED_BUFFER_SIZE); }; protected: // Add reference void AddRef(); // Release reference, delete if reference count zero void Release(); /* Data */ PBYTE mpData; /* Size of data */ ULONG mSize; /* Type of data */ ULONG mType; /* Reference count */ ULONG mRefCount; private: // Leave copy constructor and assignment operator unimplemented // to prevent unintentional and unauthorized copying of the object // (which would lead to bad reference counting) sSharedBuffer( const sSharedBuffer & ); sSharedBuffer & operator = ( const sSharedBuffer & ); friend struct sProtocolBuffer; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/StdAfx.h000077500000000000000000000127321455567757300226410ustar00rootroot00000000000000/*=========================================================================== FILE: StdAfx.h DESCRIPTION: Application Framework eXtenstions for Linux PUBLIC CLASSES AND FUNCTIONS: Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Includes //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- // Macro defination //--------------------------------------------------------------------------- #define ASSERT( x ) assert( x ) #ifdef DEBUG #define TRACE printf #else #define TRACE(...) #endif //--------------------------------------------------------------------------- // data type defination //--------------------------------------------------------------------------- #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef CONST #define CONST const #endif typedef void VOID; typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef double DOUBLE; typedef int INT; typedef unsigned int UINT; typedef unsigned int * PUINT; typedef INT HANDLE; typedef HANDLE HMODULE; typedef char CHAR; typedef short SHORT; typedef long LONG; typedef unsigned long ULONG; typedef ULONG * PULONG; typedef unsigned short USHORT; typedef USHORT * PUSHORT; typedef unsigned char UCHAR; typedef UCHAR * PUCHAR; typedef char * PSZ; typedef CONST CHAR * LPCSTR; typedef CHAR * LPSTR; typedef BYTE * PBYTE; typedef BOOL * PBOOL; typedef INT * PINT; typedef UINT * LPINT; typedef WORD * PWORD; typedef PWORD LPWORD; typedef LONG * LPLONG; typedef DWORD * PDWORD; typedef VOID * PVOID; typedef PVOID LPVOID; typedef const void * LPCVOID; typedef size_t SIZE_T; typedef double DATE; // Error code #define NO_ERROR 0L #define ERROR_SUCCESS 0L #define ERROR_NO_MORE_ITEMS 259L #define ERROR_CRC 23L #define ERROR_OUTOFMEMORY 14L #define ERROR_CAN_NOT_COMPLETE 1003L #define ERROR_REVISION_MISMATCH 1306L #define ERROR_BAD_ARGUMENTS 160L #define INVALID_SET_FILE_POINTER -1 #define VALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE -1 #define INVALID_FILE_SZ -1 #define ERROR_GEN_FAILURE 31L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_NOT_ENOUGH_MEMORY 8L #define ERROR_INVALID_PARAMETER 87L #define ERROR_BAD_FORMAT 11L // Other Constant definitions #define MAX_PATH 512 #define INFINITE 0xffffffff // SIOCIWFIRSTPRIV = 0x8BE0 // Device I/O control code for setting QMI service #define QMI_GET_SERVICE_FILE_IOCTL 0x8BE0 + 1 // Device I/O control code for obtaining device VIDPID #define QMI_GET_VIDPID_IOCTL 0x8BE0 + 2 // Device I/O control code for obtaining device MEID #define QMI_GET_MEID_IOCTL 0x8BE0 + 3 libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/SyncQueue.h000077500000000000000000000301061455567757300233640ustar00rootroot00000000000000/*=========================================================================== FILE: SyncQueue.h DESCRIPTION: Declaration/Implementation of cSyncQueue class PUBLIC CLASSES AND METHODS: cSyncQueue Synchronized shareable (across multiple threads) queue of structures with event notifications Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cSyncQueue /*=========================================================================*/ template class cSyncQueue { public: // (Inline) Constructor cSyncQueue( ULONG maxElements, bool bSignalEvent = false ) : mSignature( (ULONG)eSYNC_QUEUE_SIG ), mSignalEvent(), mbSignalEvent( bSignalEvent ), mMaxElements( maxElements ), mTotalElements( 0 ) { // Create sync CS int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SyncQueue: Unable to init sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } }; // (Inline) Destructor ~cSyncQueue() { if (IsValid() == false) { ASSERT( (PVOID)"Double deletion detected in ~cSyncQueue" == 0 ); } else { EmptyQueue(); mSignature = 0; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // (Inline) Add an element to the queue bool AddElement( const tElementType & elem ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { // Yes, drop oldest element mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Add an element to the queue returning the index of // the element bool AddElement( const tElementType & elem, ULONG & idx ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); idx = mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Return given element in the queue bool GetElement( ULONG idx, tElementType & elem ) const { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Is this a current element index? ULONG expiredIndices = mTotalElements - (ULONG)mElementDeque.size(); if (idx >= expiredIndices) { // Yes, grab it from the deque idx -= expiredIndices; if (idx < (ULONG)mElementDeque.size()) { elem = mElementDeque[idx]; bRC = true; } } nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Empty element queue bool EmptyQueue() { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } mElementDeque.clear(); mTotalElements = 0; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } bRC = true; return bRC; }; // (Inline) Return the number of queued elements ULONG GetQueueCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = (ULONG)mElementDeque.size(); nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the total number of elements added to queue ULONG GetTotalCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = mTotalElements; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the signal event cEvent & GetSignalEvent() const { return mSignalEvent; }; // (Inline) Is this sync queue valid? bool IsValid() const { return (mSignature == (ULONG)eSYNC_QUEUE_SIG); }; protected: // Object signature enum eClassConstants { eSYNC_QUEUE_SIG = 0x1799A2BC }; /* Object signature */ ULONG mSignature; /* Multithreaded mutex type */ mutable pthread_mutex_t mSyncSection; /* Signal event, set everytime an element is added (if configured) */ mutable cEvent mSignalEvent; /* Use above signal event? */ bool mbSignalEvent; /* Maximum number of elements to add to the deque */ ULONG mMaxElements; /* Total number of elements added to the deque */ ULONG mTotalElements; /* Element queue */ std::deque mElementDeque; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/apidefs.h000066400000000000000000000004341455567757300230540ustar00rootroot00000000000000/* Core/apidefs.h - API constants */ #ifndef GOBI_CORE_APIDEFS_H #define GOBI_CORE_APIDEFS_H #ifdef __cplusplus extern "C" { #endif typedef enum GobiType { GOBITYPE_UNKNOWN, GOBITYPE_2K, GOBITYPE_3K, } GobiType; #ifdef __cplusplus }; #endif #endif /* !GOBI_CORE_APIDEFS_H */ libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Core/types.h000066400000000000000000000006201455567757300226020ustar00rootroot00000000000000/* Core/types.h - basic sdk types */ #ifndef GOBI_CORE_TYPES_H #define GOBI_CORE_TYPES_H typedef unsigned long ULONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char *LPCSTR; #endif /* !GOBI_CORE_TYPES_H */ libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/000077500000000000000000000000001455567757300221035ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/Makefile.am000066400000000000000000000000151455567757300241330ustar00rootroot00000000000000SUBDIRS=QMI libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/000077500000000000000000000000001455567757300225315ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/Entity.txt000077500000000000000000001730111455567757300245540ustar00rootroot0000000000000030^"32,1"^"CTL/Set Instance ID Request/Instance"^50900^-1^0 30^"34,1"^"CTL/Get Client ID Request/Type"^50905^-1^0 30^"35,1"^"CTL/Release Client ID Request/ID"^50906^-1^0 30^"38,1"^"CTL/Set Data Format Request/Format"^50907^-1^0 30^"38,16"^"CTL/Set Data Format Request/Protocol"^50908^-1^0 30^"40,1"^"CTL/Set Event Report Request/Report"^50909^-1^0 30^"41,1"^"CTL/Set Power Save Config Request/Descriptor"^50911^-1^0 30^"41,17"^"CTL/Set Power Save Config Request/Permitted Set"^50912^-1^0 30^"42,1"^"CTL/Set Power Save Mode Request/Mode"^50913^-1^0 31^"32,1"^"CTL/Set Instance ID Response/Link"^50901^-1^0 31^"32,2"^"CTL/Set Instance ID Response/Result Code"^50000^-1^0 31^"33,1"^"CTL/Get Version Info Response/List"^50902^-1^0 31^"33,2"^"CTL/Get Version Info Response/Result Code"^50000^-1^0 31^"33,16"^"CTL/Get Version Info Response/Addendum"^50904^-1^0 31^"34,1"^"CTL/Get Client ID Response/ID"^50906^-1^0 31^"34,2"^"CTL/Get Client ID Response/Result Code"^50000^-1^0 31^"35,1"^"CTL/Release Client ID Response/ID"^50906^-1^0 31^"35,2"^"CTL/Release Client ID Response/Result Code"^50000^-1^0 31^"38,2"^"CTL/Set Data Format Response/Result Code"^50000^-1^0 31^"38,16"^"CTL/Set Data Format Response/Protocol"^50908^-1^0 31^"40,2"^"CTL/Set Event Report Response/Result Code"^50000^-1^0 31^"41,2"^"CTL/Set Power Save Config Response/Result Code"^50000^-1^0 31^"42,2"^"CTL/Set Power Save Mode Response/Result Code"^50000^-1^0 31^"43,1"^"CTL/Get Power Save Mode Response/Mode"^50913^-1^0 31^"43,2"^"CTL/Get Power Save Mode Response/Result Code"^50000^-1^0 32^"36,1"^"CTL/Release Client ID Indication/ID"^50906^-1^0 32^"37,1"^"CTL/Invalid Client ID Indication/ID"^50906^-1^0 32^"40,1"^"CTL/Event Report Indication/Report"^50910^-1^0 33^"1,16"^"WDS/Set Event Report Request/Channel Rate Indicator"^50010^-1 33^"1,17"^"WDS/Set Event Report Request/Transfer Statistics Indicator"^50011^-1 33^"1,18"^"WDS/Set Event Report Request/Data Bearer Technology Indicator"^50012^-1 33^"1,19"^"WDS/Set Event Report Request/Dormancy Status Indicator"^50041^-1 33^"1,20"^"WDS/Set Event Report Request/MIP Status Indicator"^50087^-1 33^"1,21"^"WDS/Set Event Report Request/Current Data Bearer Technology Indicator"^50012^-1 33^"2,1"^"WDS/Abort Request/Transaction ID"^50001^-1 33^"32,16"^"WDS/Start Network Interface Request/Primary DNS"^50021^-1 33^"32,17"^"WDS/Start Network Interface Request/Secondary DNS"^50021^-1 33^"32,18"^"WDS/Start Network Interface Request/Primary NBNS"^50021^-1 33^"32,19"^"WDS/Start Network Interface Request/Secondary NBNS"^50021^-1 33^"32,20"^"WDS/Start Network Interface Request/Context APN Name"^50022^-1 33^"32,21"^"WDS/Start Network Interface Request/IP Address"^50021^-1 33^"32,22"^"WDS/Start Network Interface Request/Authentication"^50023^-1 33^"32,23"^"WDS/Start Network Interface Request/Username"^50024^-1 33^"32,24"^"WDS/Start Network Interface Request/Password"^50025^-1 33^"32,25"^"WDS/Start Network Interface Request/IP Family"^50097^-1 33^"32,48"^"WDS/Start Network Interface Request/Technology Preference"^50026^-1 33^"32,49"^"WDS/Start Network Interface Request/3GPP Profile Identifier"^50027^-1 33^"32,50"^"WDS/Start Network Interface Request/3GPP2 Profile Identifier"^50027^-1 33^"32,51"^"WDS/Start Network Interface Request/Autoconnect"^50045^-1 33^"32,52"^"WDS/Start Network Interface Request/Extended Technology Preference"^50095^-1 33^"32,53"^"WDS/Start Network Interface Request/Call Type"^50096^-1 33^"33,1"^"WDS/Stop Network Interface Request/Packet Data Handle"^50028^-1 33^"33,16"^"WDS/Stop Network Interface Request/Autoconnect"^50046^-1 33^"36,1"^"WDS/Get Packet Statistics Request/Packet Stats Mask"^50032^-1 33^"39,1"^"WDS/Create Profile Request/Profile Type"^50033^-1 33^"39,16"^"WDS/Create Profile Request/Profile Name"^50034^-1 33^"39,17"^"WDS/Create Profile Request/PDP Type"^50035^-1 33^"39,20"^"WDS/Create Profile Request/APN Name"^50022^-1 33^"39,21"^"WDS/Create Profile Request/Primary DNS"^50021^-1 33^"39,22"^"WDS/Create Profile Request/Secondary DNS"^50021^-1 33^"39,23"^"WDS/Create Profile Request/UMTS Requested QoS"^50036^-1 33^"39,24"^"WDS/Create Profile Request/UMTS Minimum QoS"^50036^-1 33^"39,25"^"WDS/Create Profile Request/GPRS Requested QoS"^50037^-1 33^"39,26"^"WDS/Create Profile Request/GPRS Minimum QoS"^50037^-1 33^"39,27"^"WDS/Create Profile Request/Username"^50024^-1 33^"39,28"^"WDS/Create Profile Request/Password"^50025^-1 33^"39,29"^"WDS/Create Profile Request/Authentication"^50023^-1 33^"39,30"^"WDS/Create Profile Request/IP Address"^50021^-1 33^"39,31"^"WDS/Create Profile Request/P-CSCF"^50099^-1 33^"40,1"^"WDS/Modify Profile Request/Profile Identifier"^50038^-1 33^"40,16"^"WDS/Modify Profile Request/Profile Name"^50034^-1 33^"40,17"^"WDS/Modify Profile Request/PDP Type"^50035^-1 33^"40,20"^"WDS/Modify Profile Request/APN Name"^50022^-1 33^"40,21"^"WDS/Modify Profile Request/Primary DNS"^50021^-1 33^"40,22"^"WDS/Modify Profile Request/Secondary DNS"^50021^-1 33^"40,23"^"WDS/Modify Profile Request/UMTS Requested QoS"^50036^-1 33^"40,24"^"WDS/Modify Profile Request/UMTS Minimum QoS"^50036^-1 33^"40,25"^"WDS/Modify Profile Request/GPRS Requested QoS"^50037^-1 33^"40,26"^"WDS/Modify Profile Request/GPRS Minimum QoS"^50037^-1 33^"40,27"^"WDS/Modify Profile Request/Username"^50024^-1 33^"40,28"^"WDS/Modify Profile Request/Password"^50025^-1 33^"40,29"^"WDS/Modify Profile Request/Authentication"^50023^-1 33^"40,30"^"WDS/Modify Profile Request/IP Address"^50021^-1 33^"40,31"^"WDS/Modify Profile Request/P-CSCF"^50099^-1 33^"40,32"^"WDS/Modify Profile Request/PDP Access Control Flag"^60086^-1 33^"40,33"^"WDS/Modify Profile Request/P-CSCF Address Using DHCP"^60087^-1 33^"40,34"^"WDS/Modify Profile Request/IM CN Flag"^60088^-1 33^"40,35"^"WDS/Modify Profile Request/Traffic Flow Template ID1 Parameters"^60018^-1 33^"40,36"^"WDS/Modify Profile Request/Traffic Flow Template ID2 Parameters"^60018^-1 33^"40,37"^"WDS/Modify Profile Request/PDP Context Number"^60020^-1 33^"40,38"^"WDS/Modify Profile Request/PDP Context Secondary Flag"^60021^-1 33^"40,39"^"WDS/Modify Profile Request/PDP Context Primary ID"^60022^-1 33^"40,40"^"WDS/Modify Profile Request/IPv6 Address"^60023^-1 33^"40,41"^"WDS/Modify Profile Request/Requested QoS"^60024^-1 33^"40,42"^"WDS/Modify Profile Request/Minimum QoS"^60024^-1 33^"40,43"^"WDS/Modify Profile Request/Primary IPv6"^60090^-1 33^"40,44"^"WDS/Modify Profile Request/Secondary IPv6"^60090^-1 33^"40,45"^"WDS/Modify Profile Request/Address Allocation Preference"^60028^-1 33^"40,46"^"WDS/Modify Profile Request/LTE QoS Parameters"^60029^-1 33^"40,144"^"WDS/Modify Profile Request/Negotiate DNS Server Prefrence"^60059^-1 33^"40,145"^"WDS/Modify Profile Request/PPP Session Close Timer DO"^60060^-1 33^"40,146"^"WDS/Modify Profile Request/PPP Session Close Timer 1X"^60061^-1 33^"40,147"^"WDS/Modify Profile Request/Allow Linger"^60062^-1 33^"40,148"^"WDS/Modify Profile Request/LCP ACK Timeout"^60063^-1 33^"40,149"^"WDS/Modify Profile Request/IPCP ACK Timeout"^60064^-1 33^"40,150"^"WDS/Modify Profile Request/Authentication Timeout"^60065^-1 33^"40,154"^"WDS/Modify Profile Request/Authentication Protocol"^60069^-1 33^"40,155"^"WDS/Modify Profile Request/User ID"^60070^-1 33^"40,156"^"WDS/Modify Profile Request/Authentication Password"^60071^-1 33^"40,157"^"WDS/Modify Profile Request/Data Rate"^60072^-1 33^"40,158"^"WDS/Modify Profile Request/Application Type"^60073^-1 33^"40,159"^"WDS/Modify Profile Request/Data Mode"^60074^-1 33^"40,160"^"WDS/Modify Profile Request/Application Priority"^60075^-1 33^"40,161"^"WDS/Modify Profile Request/APN String"^60076^-1 33^"40,162"^"WDS/Modify Profile Request/PDN Type"^60077^-1 33^"40,163"^"WDS/Modify Profile Request/P-CSCF Address Needed"^60078^-1 33^"40,164"^"WDS/Modify Profile Request/Primary IPv4 Address"^60079^-1 33^"40,165"^"WDS/Modify Profile Request/Secondary IPv4 Address"^60080^-1 33^"40,166"^"WDS/Modify Profile Request/Primary IPv6 Address"^60081^-1 33^"40,167"^"WDS/Modify Profile Request/Secondary IPv6 Address"^60082^-1 33^"41,1"^"WDS/Delete Profile Request/Profile Identifier"^50038^-1 33^"43,1"^"WDS/Get Profile Settings Request/Profile Identifier"^50038^-1 33^"44,1"^"WDS/Get Default Settings Request/Profile Type"^50033^-1 33^"45,16"^"WDS/Get Current Settings Request/Requested Settings"^50084^-1 33^"46,1"^"WDS/Set MIP Mode Request/Mobile IP Mode"^50044^-1 33^"56,1"^"WDS/Get Modem Info Request/Requested Status"^50051^-1 33^"56,16"^"WDS/Get Modem Info Request/Connection Status Indicator"^50052^-1 33^"56,17"^"WDS/Get Modem Info Request/Transfer Statistics Indicator"^50053^-1 33^"56,18"^"WDS/Get Modem Info Request/Dormancy Status Indicator"^50041^-1 33^"56,19"^"WDS/Get Modem Info Request/Data Bearer Technology Indicator"^50012^-1 33^"56,20"^"WDS/Get Modem Info Request/Channel Rate Indicator"^50010^-1 33^"61,1"^"WDS/Set Active MIP Profile Request/Index"^50056^-1 33^"62,1"^"WDS/Get MIP Profile Request/Index"^50027^-1 33^"63,1"^"WDS/Set MIP Profile Request/Index"^50056^-1 33^"63,16"^"WDS/Set MIP Profile Request/State"^50057^-1 33^"63,17"^"WDS/Set MIP Profile Request/Home Address"^50021^-1 33^"63,18"^"WDS/Set MIP Profile Request/Primary Home Agent Address"^50021^-1 33^"63,19"^"WDS/Set MIP Profile Request/Secondary Home Agent Address"^50021^-1 33^"63,20"^"WDS/Set MIP Profile Request/Reverse Tunneling"^50058^-1 33^"63,21"^"WDS/Set MIP Profile Request/NAI"^50059^-1 33^"63,22"^"WDS/Set MIP Profile Request/HA SPI"^50060^-1 33^"63,23"^"WDS/Set MIP Profile Requeste/AAA SPI"^50061^-1 33^"63,24"^"WDS/Set MIP Profile Request/MN-HA"^50062^-1 33^"63,25"^"WDS/Set MIP Profile Request/MN-AAA"^50063^-1 33^"65,1"^"WDS/Set MIP Parameters Request/SPC"^50070^-1 33^"65,16"^"WDS/Set MIP Parameters Request/Mobile IP Mode"^50044^-1 33^"65,17"^"WDS/Set MIP Parameters Request/Retry Attempt Limit"^50064^-1 33^"65,18"^"WDS/Set MIP Parameters Request/Retry Attempt Interval"^50065^-1 33^"65,19"^"WDS/Set MIP Parameters Request/Re-Registration Period"^50066^-1 33^"65,20"^"WDS/Set MIP Parameters Request/Re-Registration Only With Traffic"^50067^-1 33^"65,21"^"WDS/Set MIP Parameters Request/MN-HA Authenticator Calculator"^50068^-1 33^"65,22"^"WDS/Set MIP Parameters Request/MN-HA RFC 2002 BIS Authentication"^50069^-1 33^"69,16"^"WDS/Get Call List Request/List Type"^50073^-1 33^"70,1"^"WDS/Get Call Record Request/Record ID"^50077^-1 33^"81,1"^"WDS/Set Autoconnect Setting Request/Autoconnect"^50045^-1 33^"81,16"^"WDS/Set Autoconnect Setting Request/Roam"^60008^-1 33^"83,16"^"WDS/Set DNS Setting Request/Primary"^60009^-1 33^"83,17"^"WDS/Set DNS Setting Request/Secondary"^60009^-1 33^"83,18"^"WDS/Set DNS Setting Request/Primary IPv6 Address"^60084^-1 33^"83,19"^"WDS/Set DNS Setting Request/Secondary IPv6 Address"^60085^-1 34^"0,2"^"WDS/Reset Response/Result Code"^50000^-1 34^"1,2"^"WDS/Set Event Report Response/Result Code"^50000^-1 34^"2,2"^"WDS/Abort Response/Result Code"^50000^-1 34^"32,1"^"WDS/Start Network Interface Response/Packet Data Handle"^50028^-1 34^"32,2"^"WDS/Start Network Interface Response/Result Code"^50000^-1 34^"32,16"^"WDS/Start Network Interface Response/Call End Reason"^50043^-1 34^"32,17"^"WDS/Start Network Interface Response/Verbose Call End Reason"^50098^-1 34^"33,2"^"WDS/Stop Network Interface Response/Result Code"^50000^-1 34^"34,1"^"WDS/Get Packet Service Status Response/Status"^50029^-1 34^"34,2"^"WDS/Get Packet Service Status Response/Result Code"^50000^-1 34^"35,1"^"WDS/Get Channel Rates Response/Channel Rates"^50031^-1 34^"35,2"^"WDS/Get Channel Rates Response/Result Code"^50000^-1 34^"36,2"^"WDS/Get Packet Statistics Response/Result Code"^50000^-1 34^"36,16"^"WDS/Get Packet Statistics Response/TX Packet Successes"^50013^-1 34^"36,17"^"WDS/Get Packet Statistics Response/RX Packet Successes"^50014^-1 34^"36,18"^"WDS/Get Packet Statistics Response/TX Packet Errors"^50015^-1 34^"36,19"^"WDS/Get Packet Statistics Response/RX Packet Errors"^50016^-1 34^"36,20"^"WDS/Get Packet Statistics Response/TX Overflows"^50017^-1 34^"36,21"^"WDS/Get Packet Statistics Response/RX Overflows"^50018^-1 34^"36,25"^"WDS/Get Packet Statistics Response/TX Bytes"^50054^-1 34^"36,26"^"WDS/Get Packet Statistics Response/RX Bytes"^50055^-1 34^"36,27"^"WDS/Get Packet Statistics Response/Previous TX Bytes"^50079^-1 34^"36,28"^"WDS/Get Packet Statistics Response/Previous RX Bytes"^50080^-1 34^"37,2"^"WDS/Go Dormant Response/Result Code"^50000^-1 34^"38,2"^"WDS/Go Active Response/Result Code"^50000^-1 34^"39,1"^"WDS/Create Profile Response/Profile Identifier"^50038^-1 34^"39,2"^"WDS/Create Profile Response/Result Code"^50000^-1 34^"40,2"^"WDS/Modify Profile Response/Result Code"^50000^-1 34^"40,151"^"WDS/Modify Profile Request/LCP Config Retry Count"^60066^-1 34^"40,152"^"WDS/Modify Profile Request/IPCP Config Retry Count"^60067^-1 34^"40,153"^"WDS/Modify Profile Request/Authentication Retry"^60068^-1 34^"40,224"^"WDS/Modify Profile Request/Extended Error Code"^60083^-1 34^"41,2"^"WDS/Delete Profile Response/Result Code"^50000^-1 34^"42,1"^"WDS/Get Profile List Response/Profile List"^50039^-1 34^"42,2"^"WDS/Get Profile List Response/Result Code"^50000^-1 34^"43,2"^"WDS/Get Profile Settings Response/Result Code"^50000^-1 34^"43,16"^"WDS/Get Profile Settings Response/Profile Name"^50034^-1 34^"43,17"^"WDS/Get Profile Settings Response/PDP Type"^50035^-1 34^"43,20"^"WDS/Get Profile Settings Response/APN Name"^50022^-1 34^"43,21"^"WDS/Get Profile Settings Response/Primary DNS"^50021^-1 34^"43,22"^"WDS/Get Profile Settings Response/Secondary DNS"^50021^-1 34^"43,23"^"WDS/Get Profile Settings Response/UMTS Requested QoS"^50036^-1 34^"43,24"^"WDS/Get Profile Settings Response/UMTS Minimum QoS"^50036^-1 34^"43,25"^"WDS/Get Profile Settings Response/GPRS Requested QoS"^50037^-1 34^"43,26"^"WDS/Get Profile Settings Response/GPRS Minimum QoS"^50037^-1 34^"43,27"^"WDS/Get Profile Settings Response/Username"^50024^-1 34^"43,29"^"WDS/Get Profile Settings Response/Authentication"^50023^-1 34^"43,30"^"WDS/Get Profile Settings Response/IP Address"^50021^-1 34^"43,31"^"WDS/Get Profile Settings Response/P-CSCF"^50099^-1 34^"44,2"^"WDS/Get Default Settings Response/Result Code"^50000^-1 34^"44,16"^"WDS/Get Default Settings Response/Profile Name"^50034^-1 34^"44,17"^"WDS/Get Default Settings Response/PDP Type"^50035^-1 34^"44,20"^"WDS/Get Default Settings Response/APN Name"^50022^-1 34^"44,21"^"WDS/Get Default Settings Response/Primary DNS"^50021^-1 34^"44,22"^"WDS/Get Default Settings Response/Secondary DNS"^50021^-1 34^"44,23"^"WDS/Get Default Settings Response/UMTS Requested QoS"^50036^-1 34^"44,24"^"WDS/Get Default Settings Response/UMTS Minimum QoS"^50036^-1 34^"44,25"^"WDS/Get Default Settings Response/GPRS Requested QoS"^50037^-1 34^"44,26"^"WDS/Get Default Settings Response/GPRS Minimum QoS"^50037^-1 34^"44,27"^"WDS/Get Default Settings Response/Username"^50024^-1 34^"44,28"^"WDS/Get Default Settings Response/Password"^50025^-1 34^"44,29"^"WDS/Get Default Settings Response/Authentication"^50023^-1 34^"44,30"^"WDS/Get Default Settings Response/IP Address"^50021^-1 34^"44,31"^"WDS/Get Default Settings Response/P-CSCF"^50099^-1 34^"44,32"^"WDS/Get Default Settings Response/PDP Access Control Flag"^60015^-1 34^"44,33"^"WDS/Get Default Settings Response/P-CSCF Address Using DHCP"^60016^-1 34^"44,34"^"WDS/Get Default Settings Response/IM CN Flag"^60017^-1 34^"44,35"^"WDS/Get Default Settings Response/Traffic Flow Template ID1 Parameters"^60018^-1 34^"44,36"^"WDS/Get Default Settings Response/Traffic Flow Template ID2 Parameters"^60019^-1 34^"44,37"^"WDS/Get Default Settings Response/PDP Context Number"^60020^-1 34^"44,38"^"WDS/Get Default Settings Response/PDP Context Secondary Flag"^60021^-1 34^"44,39"^"WDS/Get Default Settings Response/PDP Context Primary ID"^60022^-1 34^"44,40"^"WDS/Get Default Settings Response/IPv6 Address"^60023^-1 34^"44,41"^"WDS/Get Default Settings Response/Requested QoS"^60024^-1 34^"44,42"^"WDS/Get Default Settings Response/Minimum QoS"^60025^-1 34^"44,43"^"WDS/Get Default Settings Response/Primary DNS IPv6 Address"^60026^-1 34^"44,44"^"WDS/Get Default Settings Response/Secondary DNS IPv6 Address"^60027^-1 34^"44,45"^"WDS/Get Default Settings Response/DHCP NAS Preference"^60028^-1 34^"44,46"^"WDS/Get Default Settings Response/LTE QoS Parameters"^60029^-1 34^"44,144"^"WDS/Get Default Settings Response/Negotiate DSN Server Preferences"^60030^-1 34^"44,145"^"WDS/Get Default Settings Response/PPP Session CLose Timer DO"^60031^-1 34^"44,146"^"WDS/Get Default Settings Response/PPP Session Close Timer 1X"^60032^-1 34^"44,147"^"WDS/Get Default Settings Response/Allow Lingering Interface"^60033^-1 34^"44,148"^"WDS/Get Default Settings Response/LCP ACK Timeout"^60034^-1 34^"44,149"^"WDS/Get Default Settings Response/IPCP ACK Timeout"^60035^-1 34^"44,150"^"WDS/Get Default Settings Response/Authentication Timeout"^60036^-1 34^"44,151"^"WDS/Get Default Settings Response/LCP Config Retry Count"^60037^-1 34^"44,152"^"WDS/Get Default Settings Response/IPCP Config Retry Count"^60038^-1 34^"44,153"^"WDS/Get Default Settings Response/Authentication Retry"^60039^-1 34^"44,154"^"WDS/Get Default Settings Response/Authentication Protocol"^60040^-1 34^"44,155"^"WDS/Get Default Settings Response/User ID"^60041^-1^0^-1^0^0 34^"44,156"^"WDS/Get Default Settings Response/Authentication Password"^60042^-1 34^"44,157"^"WDS/Get Default Settings Response/Data Rate"^60043^-1 34^"44,158"^"WDS/Get Default Settings Response/Application Type"^60044^-1 34^"44,159"^"WDS/Get Default Settings Response/Data Mode"^60045^-1 34^"44,160"^"WDS/Get Default Settings Response/Application Priority"^60046^-1 34^"44,161"^"WDS/Get Default Settings Response/APN String"^60047^-1 34^"44,162"^"WDS/Get Default Settings Response/PDN Type"^60048^-1 34^"44,163"^"WDS/Get Default Settings Response/P-CSCF Address Needed"^60049^-1 34^"44,164"^"WDS/Get Default Settings Response/Primary DNS Address"^60050^-1 34^"44,165"^"WDS/Get Default Settings Response/Secondary DNS Address"^60051^-1 34^"44,166"^"WDS/Get Default Settings Response/Primary IPv6 Address"^60052^-1 34^"44,167"^"WDS/Get Default Settings Response/Secondary IPv6 Address"^60053^-1 34^"44,224"^"WDS/Get Default Settings Response/Extended Error Code"^60054^-1 34^"45,2"^"WDS/Get Current Settings Response/Result Code"^50000^-1 34^"45,16"^"WDS/Get Current Settings Response/Profile Name"^50034^-1 34^"45,17"^"WDS/Get Current Settings Response/PDP Type"^50035^-1 34^"45,20"^"WDS/Get Current Settings Response/APN Name"^50022^-1 34^"45,21"^"WDS/Get Current Settings Response/Primary DNS"^50021^-1 34^"45,22"^"WDS/Get Current Settings Response/Secondary DNS"^50021^-1 34^"45,23"^"WDS/Get Current Settings Response/UMTS Granted QoS"^50036^-1 34^"45,25"^"WDS/Get Current Settings Response/GPRS Granted QoS"^50037^-1 34^"45,27"^"WDS/Get Current Settings Response/Username"^50024^-1 34^"45,29"^"WDS/Get Current Settings Response/Authentication"^50023^-1 34^"45,30"^"WDS/Get Current Settings Response/IP Address"^50021^-1 34^"45,31"^"WDS/Get Current Settings Response/Profile ID"^50038^-1 34^"45,32"^"WDS/Get Current Settings Response/Gateway Address"^50021^-1 34^"45,33"^"WDS/Get Current Settings Response/Gateway Subnet Mask"^50085^-1 34^"45,34"^"WDS/Get Current Settings Response/P-CSCF"^50099^-1 34^"45,35"^"WDS/Get Current Settings Response/P-CSCF Server Address List"^60000^-1 34^"45,36"^"WDS/Get Current Settings Response/P-CSCF Domain Name List"^60001^-1 34^"45,37"^"WDS/Get Current Settings Response/IPv6 Address"^60010^-1 34^"45,38"^"WDS/Get Current Settings Response/IPv6 Gateway Address"^60011^-1 34^"45,39"^"WDS/Get Current Settings Response/Primary IPv6 DNS"^60003^-1 34^"45,40"^"WDS/Get Current Settings Response/Secondary IPv6 DNS"^60003^-1 34^"45,41"^"WDS/Get Current Settings Response/MTU"^60004^-1 34^"45,42"^"WDS/Get Current Settings Response/Domain Name List"^60005^-1 34^"45,43"^"WDS/Get Current Settings Response/IP Family"^50097^-1 34^"45,44"^"WDS/Get Current Settings Response/IM CN Flag"^60007^-1 34^"45,45"^"WDS/Get Current Settings Response/Extended Technology"^50095^-1 34^"45,46"^"WDS/Get Current Settings Response/P-CSCF IPv6 Address List"^60057^-1 34^"46,2"^"WDS/Set MIP Mode Response/Result Code"^50000^-1 34^"47,1"^"WDS/Get MIP Mode Response/Mobile IP Mode"^50044^-1 34^"47,2"^"WDS/Get MIP Mode Response/Result Code"^50000^-1 34^"48,1"^"WDS/Get Dormancy Response/Dormancy Status"^50042^-1 34^"48,2"^"WDS/Get Dormancy Response/Result Code"^50000^-1 34^"52,1"^"WDS/Get Autoconnect Setting Response/Autoconnect"^50045^-1 34^"52,2"^"WDS/Get Autoconnect Setting Response/Result Code"^50000^-1 34^"52,16"^"WDS/Get Autoconnect Setting Response/Roam"^60008^-1 34^"53,1"^"WDS/Get Data Session Duration Response/Duration"^50047^-1 34^"53,2"^"WDS/Get Data Session Duration Response/Result Code"^50000^-1 34^"53,16"^"WDS/Get Data Session Duration Response/Previous Duration"^50081^-1 34^"53,17"^"WDS/Get Data Session Duration Response/Active Duration"^50082^-1 34^"53,18"^"WDS/Get Data Session Duration Response/Previous Active Duration"^50083^-1 34^"54,1"^"WDS/Get Modem Status Response/Status"^50048^-1 34^"54,2"^"WDS/Get Modem Status Response/Result Code"^50000^-1 34^"54,16"^"WDS/Get Modem Status Response/Call End Reason"^50049^-1 34^"55,1"^"WDS/Get Data Bearer Technology Response/Technology"^50020^-1 34^"55,2"^"WDS/Get Data Bearer Technology Response/Result Code"^50000^-1 34^"55,16"^"WDS/Get Data Bearer Technology Response/Last Call Technology"^50020^-1 34^"56,2"^"WDS/Get Modem Info Response/Result Code"^50000^-1 34^"56,16"^"WDS/Get Modem Info Response/Status"^50048^-1 34^"56,17"^"WDS/Get Modem Info Response/Call End Reason"^50049^-1 34^"56,18"^"WDS/Get Modem Info Response/TX Bytes"^50054^-1 34^"56,19"^"WDS/Get Modem Info Response/RX Bytes"^50055^-1 34^"56,20"^"WDS/Get Modem Info Response/Dormancy Status"^50042^-1 34^"56,21"^"WDS/Get Modem Info Response/Technology"^50020^-1 34^"56,22"^"WDS/Get Modem Info Response/Rates"^50031^-1 34^"56,23"^"WDS/Get Modem Info Response/Previous TX Bytes"^50079^-1 34^"56,24"^"WDS/Get Modem Info Response/Previous RX Bytes"^50080^-1 34^"56,25"^"WDS/Get Modem Info Duration Response/Active Duration"^50082^-1 34^"60,1"^"WDS/Get Active MIP Profile Response/Index"^50027^-1 34^"60,2"^"WDS/Get Active MIP Profile Response/Result Code"^50000^-1 34^"61,2"^"WDS/Set Active MIP Profile Response/Result Code"^50000^-1 34^"62,2"^"WDS/Get MIP Profile Response/Result Code"^50000^-1 34^"62,16"^"WDS/Get MIP Profile Response/State"^50057^-1 34^"62,17"^"WDS/Get MIP Profile Response/Home Address"^50021^-1 34^"62,18"^"WDS/Get MIP Profile Response/Primary Home Agent Address"^50021^-1 34^"62,19"^"WDS/Get MIP Profile Response/Secondary Home Agent Address"^50021^-1 34^"62,20"^"WDS/Get MIP Profile Response/Reverse Tunneling"^50058^-1 34^"62,21"^"WDS/Get MIP Profile Response/NAI"^50059^-1 34^"62,22"^"WDS/Get MIP Profile Response/HA SPI"^50060^-1 34^"62,23"^"WDS/Get MIP Profile Response/AAA SPI"^50061^-1 34^"62,26"^"WDS/Get MIP Profile Response/HA State"^50086^-1 34^"62,27"^"WDS/Get MIP Profile Response/AAA State"^50086^-1 34^"63,2"^"WDS/Set MIP Profile Response/Result Code"^50000^-1 34^"64,2"^"WDS/Get MIP Parameters Response/Result Code"^50000^-1 34^"64,16"^"WDS/Get MIP Parameters Response/Mobile IP Mode"^50044^-1 34^"64,17"^"WDS/Get MIP Parameters Response/Retry Attempt Limit"^50064^-1 34^"64,18"^"WDS/Get MIP Parameters Response/Retry Attempt Interval"^50065^-1 34^"64,19"^"WDS/Get MIP Parameters Response/Re-Registration Period"^50066^-1 34^"64,20"^"WDS/Get MIP Parameters Response/Re-Registration Only With Traffic"^50067^-1 34^"64,21"^"WDS/Get MIP Parameters Response/MN-HA Authenticator Calculator"^50068^-1 34^"64,22"^"WDS/Get MIP Parameters Response/MN-HA RFC 2002 BIS Authentication"^50069^-1 34^"65,2"^"WDS/Set MIP Parameters Response/Result Code"^50000^-1 34^"66,1"^"WDS/Get Last MIP Status Response/Status"^50071^-1 34^"66,2"^"WDS/Get Last MIP Status Response/Result Code"^50000^-1 34^"67,1"^"WDS/Get AN-AAA Authentication Status Response/Status"^50072^-1 34^"67,2"^"WDS/Get AN-AAA Authentication Status Response/Result Code"^50000^-1 34^"68,1"^"WDS/Get Current Data Bearer Technology Response/Technology"^50090^-1 34^"68,2"^"WDS/Get Current Data Bearer Technology Response/Result Code"^50000^-1 34^"69,2"^"WDS/Get Call List Response/Result Code"^50000^-1 34^"69,16"^"WDS/Get Call List Response/Full List"^50074^-1 34^"69,17"^"WDS/Get Call List Response/ID List"^50076^-1 34^"70,1"^"WDS/Get Call Record Response/Record"^50075^-1 34^"70,2"^"WDS/Get Call Record Response/Result Code"^50000^-1 34^"71,2"^"WDS/Clear Call List Response/Result Code"^50000^-1 34^"72,1"^"WDS/Get Call List Max Size Response/Maximum"^50078^-1 34^"72,2"^"WDS/Get Call List Max Size Response/Result Code"^50000^-1 34^"81,2"^"WDS/Set Autoconnect Setting Response/Result Code"^50000^-1 34^"82,2"^"WDS/Get DNS Setting Response/Result Code"^50000^-1 34^"82,16"^"WDS/Get DNS Setting Response/Primary"^60009^-1 34^"82,17"^"WDS/Get DNS Setting Response/Secondary"^60009^-1 34^"82,18"^"WDS/Get DNS Setting Response/Primary IPv6"^60055^-1 34^"82,19"^"WDS/Get DNS Setting Response/Secondary IPv6"^60056^-1 34^"83,2"^"WDS/Set DNS Setting Response/Result Code"^50000^-1 35^"1,16"^"WDS/Event Report/TX Packet Successes"^50013^-1 35^"1,17"^"WDS/Event Report/RX Packet Successes"^50014^-1 35^"1,18"^"WDS/Event Report/TX Packet Errors"^50015^-1 35^"1,19"^"WDS/Event Report/RX Packet Errors"^50016^-1 35^"1,20"^"WDS/Event Report/TX Overflows"^50017^-1 35^"1,21"^"WDS/Event Report/RX Overflows"^50018^-1 35^"1,22"^"WDS/Event Report/Channel Rates"^50019^-1 35^"1,23"^"WDS/Event Report/Data Bearer Technology"^50020^-1 35^"1,24"^"WDS/Event Report/Dormancy Status"^50042^-1 35^"1,25"^"WDS/Event Report/TX Bytes"^50054^-1 35^"1,26"^"WDS/Event Report/RX Bytes"^50055^-1 35^"1,27"^"WDS/Event Report/MIP Status"^50088^-1 35^"1,29"^"WDS/Event Report/Current Data Bearer Technology"^50090^-1 35^"34,1"^"WDS/Packet Service Status Report/Status"^50030^-1 35^"34,16"^"WDS/Packet Service Status Report/Call End Reason"^50043^-1 35^"34,17"^"WDS/Packet Service Status Report/Verbose Call End Reason"^50098^-1 35^"54,1"^"WDS/Modem Status Report/Status"^50050^-1 35^"54,16"^"WDS/Modem Status Report/Call End Reason"^50049^-1 35^"56,16"^"WDS/Modem Info Report/Status"^50050^-1 35^"56,17"^"WDS/Modem Info Report/Call End Reason"^50049^-1 35^"56,18"^"WDS/Modem Info Report/TX Bytes"^50054^-1 35^"56,19"^"WDS/Modem Info Report/RX Bytes"^50055^-1 35^"56,20"^"WDS/Modem Info Report/Dormancy Status"^50042^-1 35^"56,21"^"WDS/Modem Info Report/Technology"^50020^-1 35^"56,22"^"WDS/Modem Info Report/Rates"^50019^-1 36^"1,16"^"DMS/Set Event Report Request/Power State"^50100^-1 36^"1,17"^"DMS/Set Event Report Request/Battery Level"^50101^-1 36^"1,18"^"DMS/Set Event Report Request/PIN Status"^50133^-1 36^"1,19"^"DMS/Set Event Report Request/Activation State"^50111^-1 36^"1,20"^"DMS/Set Event Report Request/Operating Mode"^50144^-1 36^"1,21"^"DMS/Set Event Report Request/UIM State"^50151^-1 36^"1,22"^"DMS/Set Event Report Request/Wireless Disable State"^50166^-1 36^"39,1"^"DMS/UIM Set PIN Protection Request/Info"^50127^-1 36^"40,1"^"DMS/UIM Verify PIN Request/Info"^50129^-1 36^"41,1"^"DMS/UIM Unblock PIN Request/Info"^50130^-1 36^"42,1"^"DMS/UIM Change PIN Request/Info"^50131^-1 36^"46,1"^"DMS/Set Operating Mode Request/Operating Mode"^50115^-1 36^"50,1"^"DMS/Activate Automatic Request/Activation Code"^50118^-1 36^"51,1"^"DMS/Activate Manual Request/Activation Data"^50119^-1 36^"51,16"^"DMS/Activate Manual Request/PRL (Obsolete)"^50120^-1 36^"51,17"^"DMS/Activate Manual Request/MN-HA Key"^50121^-1 36^"51,18"^"DMS/Activate Manual Request/MN-AAA Key"^50122^-1 36^"51,19"^"DMS/Activate Manual Request/PRL"^50135^-1 36^"53,1"^"DMS/Set Lock State Request/Lock State"^50124^-1 36^"54,1"^"DMS/Set Lock Code Request/Lock Code"^50125^-1 36^"56,1"^"DMS/Write User Data Request/User Data"^50126^-1 36^"58,1"^"DMS/Reset Factory Defaults Request/SPC"^50134^-1 36^"59,1"^"DMS/Validate SPC Request/SPC"^50070^-1 36^"62,1"^"DMS/UIM Set Firmware ID Request/ID"^50141^-1 36^"64,1"^"DMS/UIM Get Control Key Status Request/Facility"^50145^-1 36^"65,1"^"DMS/UIM Set Control Key Protection Request/Facility"^50147^-1 36^"66,1"^"DMS/UIM Unblock Control Key Request/Facility"^50149^-1 36^"72,1"^"DMS/Set Firmware Preference Request/Image List"^50155^-1 36^"72,16"^"DMS/Set Firmware Preference Request/Override"^50157^-1 36^"72,17"^"DMS/Set Firmware Preference Request/Index"^50158^-1 36^"74,1"^"DMS/Delete Stored Firmware Request/Image"^50156^-1 36^"75,1"^"DMS/Set Device Time Request/Time"^50170^-1 36^"75,16"^"DMS/Set Device Time Request/Type"^50171^-1 36^"76,1"^"DMS/Get Stored Firmware Info Request/Image"^50156^-1 36^"78,1"^"DMS/Set Alternate Net Config Request/Config"^50169^-1 36^"80,1"^"DMS/Set Image Download Mode Request/Mode"^50175^-1 37^"0,2"^"DMS/Reset Response/Result Code"^50000^-1 37^"1,2"^"DMS/Set Event Report Response/Result Code"^50000^-1 37^"32,1"^"DMS/Get Device Capabilities Response/Capabilities"^50103^-1 37^"32,2"^"DMS/Get Device Capabilities Response/Result Code"^50000^-1 37^"33,1"^"DMS/Get Device Manfacturer Response/Manfacturer"^50104^-1 37^"33,2"^"DMS/Get Device Manfacturer Response/Result Code"^50000^-1 37^"34,1"^"DMS/Get Device Model Response/Model"^50105^-1 37^"34,2"^"DMS/Get Device Model Response/Result Code"^50000^-1 37^"35,1"^"DMS/Get Device Revision Response/Revision"^50106^-1 37^"35,2"^"DMS/Get Device Revision Response/Result Code"^50000^-1 37^"35,16"^"DMS/Get Device Revision Response/Boot Code Revision"^50136^-1 37^"35,17"^"DMS/Get Device Revision Response/UQCN Revision"^50136^-1 37^"36,1"^"DMS/Get Device Voice Number Response/Voice Number"^50107^-1 37^"36,2"^"DMS/Get Device Voice Number Response/Result Code"^50000^-1 37^"36,16"^"DMS/Get Device Voice Number Response/Mobile ID Number"^50113^-1 37^"36,17"^"DMS/Get Device Voice Number Response/IMSI"^50138^-1 37^"37,2"^"DMS/Get Device Serial Numbers Response/Result Code"^50000^-1 37^"37,16"^"DMS/Get Device Serial Numbers Response/ESN"^50108^-1 37^"37,17"^"DMS/Get Device Serial Numbers Response/IMEI"^50109^-1 37^"37,18"^"DMS/Get Device Serial Numbers Response/MEID"^50110^-1 37^"38,1"^"DMS/Get Power State Response/Power State"^50102^-1 37^"38,2"^"DMS/Get Power State Response/Result Code"^50000^-1 37^"39,2"^"DMS/UIM Set PIN Protection Response/Result Code"^50000^-1 37^"39,16"^"DMS/UIM Set PIN Protection Response/Retry Info"^50128^-1 37^"40,2"^"DMS/UIM Verify PIN Response/Result Code"^50000^-1 37^"40,16"^"DMS/UIM Verify PIN Response/Retry Info"^50128^-1 37^"41,2"^"DMS/UIM Unblock PIN Response/Result Code"^50000^-1 37^"41,16"^"DMS/UIM Unblock PIN Response/Retry Info"^50128^-1 37^"42,2"^"DMS/UIM Change PIN Response/Result Code"^50000^-1 37^"42,16"^"DMS/UIM Change PIN Response/Retry Info"^50128^-1 37^"43,2"^"DMS/UIM Get PIN Status Response/Result Code"^50000^-1 37^"43,17"^"DMS/UIM Get PIN Status Response/PIN1 Status"^50132^-1 37^"43,18"^"DMS/UIM Get PIN Status Response/PIN2 Status"^50132^-1 37^"44,1"^"DMS/Get Hardware Revision Response/Hardware Revision"^50114^-1 37^"44,2"^"DMS/Get Hardware Revision Response/Result Code"^50000^-1 37^"45,1"^"DMS/Get Operating Mode Response/Operating Mode"^50115^-1 37^"45,2"^"DMS/Get Operating Mode Response/Result Code"^50000^-1 37^"45,16"^"DMS/Get Operating Mode Response/Offline Reason"^50139^-1 37^"45,17"^"DMS/Get Operating Mode Response/Platform Restricted"^50143^-1 37^"46,2"^"DMS/Set Operating Mode Response/Result Code"^50000^-1 37^"47,1"^"DMS/Get Timestamp Response/Timestamp"^50116^-1 37^"47,2"^"DMS/Get Timestamp Response/Result Code"^50000^-1 37^"48,1"^"DMS/Get PRL Version Response/PRL Version"^50117^-1 37^"48,2"^"DMS/Get PRL Version Response/Result Code"^50000^-1 37^"49,1"^"DMS/Get Activation State Response/Activation State"^50112^-1 37^"49,2"^"DMS/Get Activation State Response/Result Code"^50000^-1 37^"50,2"^"DMS/Activate Automatic Response/Result Code"^50000^-1 37^"51,2"^"DMS/Activate Manual Response/Result Code"^50000^-1 37^"52,1"^"DMS/Get Lock State Response/Lock State"^50123^-1 37^"52,2"^"DMS/Get Lock State Response/Result Code"^50000^-1 37^"53,2"^"DMS/Set Lock State Response/Result Code"^50000^-1 37^"54,2"^"DMS/Set Lock Code Response/Result Code"^50000^-1 37^"55,1"^"DMS/Read User Data Response/User Data"^50126^-1 37^"55,2"^"DMS/Read User Data Response/Result Code"^50000^-1 37^"56,2"^"DMS/Write User Data Response/Result Code"^50000^-1 37^"57,1"^"DMS/Read ERI Data Response/User Data"^50126^-1 37^"57,2"^"DMS/Read ERI Data Response/Result Code"^50000^-1 37^"58,2"^"DMS/Reset Factory Defaults Response/Result Code"^50000^-1 37^"59,2"^"DMS/Validate SPC Response/Result Code"^50000^-1 37^"60,1"^"DMS/UIM Get ICCID Response/ICCID"^50140^-1 37^"60,2"^"DMS/UIM Get ICCID Response/Result Code"^50000^-1 37^"61,1"^"DMS/UIM Get Firmware ID Response/ID"^50141^-1 37^"61,2"^"DMS/UIM Get Firmware ID Response/Result Code"^50000^-1 37^"62,2"^"DMS/UIM Set Firmware ID Response/Result Code"^50000^-1 37^"63,1"^"DMS/UIM Get Host Lock ID Response/ID"^50142^-1 37^"63,2"^"DMS/UIM Get Host Lock ID Response/Result Code"^50000^-1 37^"64,1"^"DMS/UIM Get Control Key Status Response/Status"^50146^-1 37^"64,2"^"DMS/UIM Get Control Key Status Response/Result Code"^50000^-1 37^"64,16"^"DMS/UIM Get Control Key Status Response/Blocking"^50153^-1 37^"65,2"^"DMS/UIM Set Control Key Protection Response/Result Code"^50000^-1 37^"65,16"^"DMS/UIM Set Control Key Protection Response/Status"^50148^-1 37^"66,2"^"DMS/UIM Unblock Control Key Response/Result Code"^50000^-1 37^"66,16"^"DMS/UIM Unblock Control Key Response/Status"^50150^-1 37^"67,1"^"DMS/Get IMSI Response/IMSI"^50138^-1 37^"67,2"^"DMS/Get IMSI Response/Result Code"^50000^-1 37^"68,1"^"DMS/Get UIM State Response/State"^50152^-1 37^"68,2"^"DMS/Get UIM State Response/Result Code"^50000^-1 37^"69,1"^"DMS/Get Band Capabilities Response/Bands"^50165^-1 37^"69,2"^"DMS/Get Band Capabilities Response/Result Code"^50000^-1 37^"70,1"^"DMS/Get Factory Serial Number Response/ID"^50168^-1^0 37^"70,2"^"DMS/Get Factory Serial Number Response/Result Code"^50000^-1^0 37^"71,1"^"DMS/Get Firmware Preference Response/Image List"^50155^-1 37^"71,2"^"DMS/Get Firmware Preference Response/Result Code"^50000^-1 37^"72,1"^"DMS/Set Firmware Preference Response/Image List"^50159^-1 37^"72,2"^"DMS/Set Firmware Preference Response/Result Code"^50000^-1 37^"72,16"^"DMS/Set Firmware Preference Response/Maximum"^50160^-1 37^"73,1"^"DMS/List Stored Firmware Response/Image List"^50161^-1 37^"73,2"^"DMS/List Stored Firmware Response/Result Code"^50000^-1 37^"74,2"^"DMS/Delete Stored Firmware Response/Result Code"^50000^-1 37^"75,2"^"DMS/Set Device Time Response/Result Code"^50000^-1 37^"76,2"^"DMS/Get Stored Firmware Info Response/Result Code"^50000^-1 37^"76,16"^"DMS/Get Stored Firmware Info Response/Boot Version"^50172^-1 37^"76,17"^"DMS/Get Stored Firmware Info Response/PRI Version"^50173^-1 37^"76,18"^"DMS/Get Stored Firmware Info Response/OEM Lock ID"^50174^-1 37^"77,1"^"DMS/Get Alternate Net Config Response/Config"^50169^-1 37^"77,2"^"DMS/Get Alternate Net Config Response/Result Code"^50000^-1 37^"78,2"^"DMS/Set Alternate Net Config Response/Result Code"^50000^-1 37^"79,2"^"DMS/Get Image Download Mode Response/Result Code"^50000^-1 37^"79,16"^"DMS/Get Image Download Mode Response/Mode"^50175^-1 37^"80,2"^"DMS/Set Image Download Mode Response/Result Code"^50000^-1 38^"1,16"^"DMS/Event Report/Power State"^50102^-1 38^"1,17"^"DMS/Event Report/PIN1 State"^50132^-1 38^"1,18"^"DMS/Event Report/PIN2 State"^50132^-1 38^"1,19"^"DMS/Event Report/Activation State"^50112^-1 38^"1,20"^"DMS/Event Report/Operating Mode"^50115^-1 38^"1,21"^"DMS/Event Report/UIM State"^50152^-1 38^"1,22"^"DMS/Event Report/Wireless Disable State"^50167^-1 39^"1,1"^"NAS/Abort Request/Transaction ID"^50001^-1 39^"2,16"^"NAS/Set Event Report Request/Signal Indicator"^50200^-1 39^"2,17"^"NAS/Set Event Report Request/RF Indicator"^50233^-1 39^"2,18"^"NAS/Set Event Report Request/Registration Reject Indicator"^50234^-1 39^"2,19"^"NAS/Set Event Report Request/RSSI Indicator"^50240^-1 39^"2,20"^"NAS/Set Event Report Request/ECIO Indicator"^50241^-1 39^"2,21"^"NAS/Set Event Report Request/IO Indicator"^50242^-1 39^"2,22"^"NAS/Set Event Report Request/SINR Indicator"^50243^-1 39^"2,23"^"NAS/Set Event Report Request/Error Rate Indicator"^50244^-1 39^"2,24"^"NAS/Set Event Report Request/RSRQ Indicator"^50277^-1 39^"3,16"^"NAS/Set Registration Event Report Request/System Select Indicator"^50250^-1 39^"3,18"^"NAS/Set Registration Event Report Request/DDTM Indicator"^50251^-1 39^"3,19"^"NAS/Set Registration Event Report Request/Serving System Indicator"^50252^-1 39^"32,16"^"NAS/Get Signal Strength Request/Request Mask"^50253^-1 39^"34,1"^"NAS/Initiate Network Register Request/Action"^50204^-1 39^"34,16"^"NAS/Initiate Network Register Request/Manual Info"^50205^-1 39^"34,17"^"NAS/Initiate Network Register Request/Change Duration"^50276^-1 39^"35,16"^"NAS/Initiate Attach Request/Action"^50206^-1 39^"39,16"^"NAS/Set Preferred Networks Request/Networks"^50210^-1 39^"41,16"^"NAS/Set Forbidden Networks Request/Networks"^50213^-1 39^"42,1"^"NAS/Set Technology Preference Request/Preference"^50216^-1 39^"45,1"^"NAS/Set ACCOLC Request/ACCOLC"^50219^-1 39^"48,16"^"NAS/Set Network Parameters Request/SPC"^50230^-1 39^"48,20"^"NAS/Set Network Parameters Request/CDMA 1xEV-DO Revision"^50228^-1 39^"48,21"^"NAS/Set Network Parameters Request/CDMA 1xEV-DO SCP Custom"^50229^-1 39^"48,22"^"NAS/Set Network Parameters Request/Roaming"^50231^-1 39^"51,16"^"NAS/Set System Selection Pref Request/Emergency Mode"^50263^-1 39^"51,17"^"NAS/Set System Selection Pref Request/Mode"^50264^-1 39^"51,18"^"NAS/Set System Selection Pref Request/Band"^50265^-1 39^"51,19"^"NAS/Set System Selection Pref Request/PRL"^50266^-1 39^"51,20"^"NAS/Set System Selection Pref Request/Roaming"^50267^-1 39^"55,1"^"NAS/Set DDTM Preference Request/DDTM"^50268^-1 39^"68,1"^"NAS/Get PLMN Name Request/PLMN"^50214^-1 40^"0,2"^"NAS/Reset Response/Result Code"^50000^-1 40^"1,2"^"NAS/Abort Response/Result Code"^50000^-1 40^"2,2"^"NAS/Set Event Report Response/Result Code"^50000^-1 40^"3,2"^"NAS/Set Registration Event Report Response/Result Code"^50000^-1 40^"32,1"^"NAS/Get Signal Strength Response/Signal Strength"^50201^-1 40^"32,2"^"NAS/Get Signal Strength Response/Result Code"^50000^-1 40^"32,16"^"NAS/Get Signal Strength Response/Signal Strength List"^50220^-1 40^"32,17"^"NAS/Get Signal Strength Response/RSSI List"^50254^-1 40^"32,18"^"NAS/Get Signal Strength Response/ECIO List"^50255^-1 40^"32,19"^"NAS/Get Signal Strength Response/IO"^50247^-1 40^"32,20"^"NAS/Get Signal Strength Response/SINR"^50248^-1 40^"32,21"^"NAS/Get Signal Strength Response/Error Rate List"^50256^-1 40^"33,2"^"NAS/Perform Network Scan Response/Result Code"^50000^-1 40^"33,16"^"NAS/Perform Network Scan Response/Network Info"^50202^-1 40^"33,17"^"NAS/Perform Network Scan Response/Network RAT"^50270^-1 40^"34,2"^"NAS/Initiate Network Register Response/Result Code"^50000^-1 40^"35,2"^"NAS/Initiate Attach Response/Result Code"^50000^-1 40^"36,1"^"NAS/Get Serving System Response/Serving System"^50207^-1 40^"36,2"^"NAS/Get Serving System Response/Result Code"^50000^-1 40^"36,16"^"NAS/Get Serving System Response/Roaming Indicator"^50208^-1 40^"36,17"^"NAS/Get Serving System Response/Data Services"^50223^-1 40^"36,18"^"NAS/Get Serving System Response/Current PLMN"^50209^-1 40^"36,19"^"NAS/Get Serving System Response/System ID"^50215^-1 40^"36,20"^"NAS/Get Serving System Response/Base Station"^50257^-1 40^"36,21"^"NAS/Get Serving System Response/Roaming List"^50258^-1 40^"36,22"^"NAS/Get Serving System Response/Default Roaming"^50260^-1 40^"36,23"^"NAS/Get Serving System Response/Time Zone"^50261^-1 40^"36,24"^"NAS/Get Serving System Response/Protocol Revision"^50262^-1 40^"37,1"^"NAS/Get Home Network Response/Home Network"^50209^-1 40^"37,2"^"NAS/Get Home Network Response/Result Code"^50000^-1 40^"37,16"^"NAS/Get Home Network Response/Home IDs"^50215^-1 40^"37,17"^"NAS/Get Home Network Response/Extended Home Network"^50269^-1 40^"38,2"^"NAS/Get Preferred Networks Response/Result Code"^50000^-1 40^"38,16"^"NAS/Get Preferred Networks Response/Networks"^50210^-1 40^"38,17"^"NAS/Get Preferred Networks Response/Static Networks"^50210^-1 40^"39,2"^"NAS/Set Preferred Networks Response/Result Code"^50000^-1 40^"40,2"^"NAS/Get Forbidden Networks Response/Result Code"^50000^-1 40^"40,16"^"NAS/Get Forbidden Networks Response/Networks"^50213^-1 40^"41,2"^"NAS/Set Forbidden Networks Response/Result Code"^50000^-1 40^"42,2"^"NAS/Set Technology Preference Response/Result Code"^50000^-1 40^"43,1"^"NAS/Get Technology Preference Response/Active Preference"^50216^-1 40^"43,2"^"NAS/Get Technology Preference Response/Result Code"^50000^-1 40^"43,16"^"NAS/Get Technology Preference Response/Persistent Preference"^50217^-1 40^"44,1"^"NAS/Get ACCOLC Response/ACCOLC"^50218^-1 40^"44,2"^"NAS/Get ACCOLC Response/Result Code"^50000^-1 40^"45,2"^"NAS/Set ACCOLC Response/Result Code"^50000^-1 40^"46,1"^"NAS/Get System Preference/Pref"^50224^-1 40^"46,2"^"NAS/Get System Preference/Result Code"^50000^-1 40^"47,2"^"NAS/Get Network Parameters Response/Result Code"^50000^-1 40^"47,17"^"NAS/Get Network Parameters Response/SCI"^50225^-1 40^"47,18"^"NAS/Get Network Parameters Response/SCM"^50226^-1 40^"47,19"^"NAS/Get Network Parameters Response/Registration"^50227^-1 40^"47,20"^"NAS/Get Network Parameters Response/CDMA 1xEV-DO Revision"^50228^-1 40^"47,21"^"NAS/Get Network Parameters Response/CDMA 1xEV-DO SCP Custom"^50229^-1 40^"47,22"^"NAS/Get Network Parameters Response/Roaming"^50231^-1 40^"48,2"^"NAS/Set Network Parameters Response/Result Code"^50000^-1 40^"49,1"^"NAS/Get RF Info Response/RF Info"^50235^-1 40^"49,2"^"NAS/Get RF Info Response/Result Code"^50000^-1 40^"50,1"^"NAS/Get AN-AAA Authentication Status Response/Status"^50237^-1 40^"50,2"^"NAS/Get AN-AAA Authentication Status Response/Result Code"^50000^-1 40^"51,2"^"NAS/Set System Selection Pref Response/Result Code"^50000^-1 40^"52,2"^"NAS/Get System Selection Pref Response/Result Code"^50000^-1 40^"52,16"^"NAS/Get System Selection Pref Response/Emergency Mode"^50263^-1 40^"52,17"^"NAS/Get System Selection Pref Response/Mode"^50264^-1 40^"52,18"^"NAS/Get System Selection Pref Response/Band"^50265^-1 40^"52,19"^"NAS/Get System Selection Pref Response/PRL"^50266^-1 40^"52,20"^"NAS/Get System Selection Pref Response/Roaming"^50267^-1 40^"55,2"^"NAS/Set DDTM Preference Response/Result Code"^50000^-1 40^"56,1"^"NAS/Get DDTM Preference Response/DDTM"^50268^-1 40^"56,2"^"NAS/Get DDTM Preference Response/Result Code"^50000^-1 40^"59,2"^"NAS/Get CSP PLMN Mode Response/Result Code"^50000^-1 40^"59,16"^"NAS/Get CSP PLMN Mode Response/Mode"^50273^-1 40^"68,2"^"NAS/Get PLMN Name Response/Result Code"^50000^-1 40^"68,16"^"NAS/Get PLMN Name Response/Name"^50274^-1 41^"2,16"^"NAS/Event Report/Signal Strength"^50201^-1 41^"2,17"^"NAS/Event Report/RF Info"^50235^-1 41^"2,18"^"NAS/Event Report/Registration Reject"^50236^-1 41^"2,19"^"NAS/Event Report/RSSI"^50245^-1 41^"2,20"^"NAS/Event Report/ECIO"^50246^-1 41^"2,21"^"NAS/Event Report/IO"^50247^-1 41^"2,22"^"NAS/Event Report/SINR"^50248^-1 41^"2,23"^"NAS/Event Report/Error Rate"^50249^-1 41^"2,24"^"NAS/Event Report/RSRQ"^50275^-1 41^"36,1"^"NAS/Serving System Indication/Serving System"^50207^-1 41^"36,16"^"NAS/Serving System Indication/Roaming Indicator"^50208^-1 41^"36,17"^"NAS/Serving System Indication/Data Services"^50223^-1 41^"36,18"^"NAS/Serving System Indication/Current PLMN"^50209^-1 41^"36,19"^"NAS/Serving System Indication/System ID"^50215^-1 41^"36,20"^"NAS/Serving System Indication/Base Station"^50257^-1 41^"36,21"^"NAS/Serving System Indication/Roaming List"^50258^-1 41^"36,22"^"NAS/Serving System Indication/Default Roaming"^50260^-1 41^"36,23"^"NAS/Serving System Indication/Time Zone"^50261^-1 41^"36,24"^"NAS/Serving System Indication/Protocol Revision"^50262^-1 41^"36,25"^"NAS/Serving System Indication/PLMN Change"^50272^-1 41^"52,16"^"NAS/System Selection Pref Indication/Emergency Mode"^50263^-1 41^"52,17"^"NAS/System Selection Pref Indication/Mode"^50264^-1 41^"52,18"^"NAS/System Selection Pref Indication/Band"^50265^-1 41^"52,19"^"NAS/System Selection Pref Indication/PRL"^50266^-1 41^"52,20"^"NAS/System Selection Pref Indication/Roaming"^50267^-1 41^"56,1"^"NAS/DDTM Preference Indication/DDTM"^50268^-1 41^"60,16"^"NAS/CSP PLMN Mode Indication/Mode"^50273^-1 45^"1,16"^"WMS/Set Event Report Request/New MT Message Indicator"^50300^-1 45^"32,1"^"WMS/Raw Send Request/Message Data"^50302^-1 45^"32,16"^"WMS/Raw Send Request/Force On DC"^50321^-1 45^"32,17"^"WMS/Raw Send Request/Follow On DC"^50322^-1 45^"32,18"^"WMS/Raw Send Request/Link Control"^50323^-1 45^"33,1"^"WMS/Raw Write Request/Message Data"^50304^-1 45^"34,1"^"WMS/Raw Read Request/Message Index"^50301^-1 45^"34,16"^"WMS/Raw Read Request/Message Mode"^50310^-1 45^"35,1"^"WMS/Modify Tag Request/Message Tag"^50307^-1 45^"35,16"^"WMS/Modify Tag Request/Message Mode"^50310^-1 45^"36,1"^"WMS/Delete Request/Memory Storage"^50308^-1 45^"36,16"^"WMS/Delete Request/Message Index"^50305^-1 45^"36,17"^"WMS/Delete Request/Message Tag"^50309^-1 45^"36,18"^"WMS/Delete Request/Message Mode"^50310^-1 45^"49,1"^"WMS/List Messages Request/Memory Storage"^50308^-1 45^"49,16"^"WMS/List Messages Request/Message Tag"^50309^-1 45^"49,17"^"WMS/List Messages Request/Message Mode"^50310^-1 45^"50,1"^"WMS/Set Routes Request/Route List"^50313^-1 45^"50,16"^"WMS/Set Routes Request/Transfer Status Report"^50326^-1 45^"53,1"^"WMS/Set SMSC Address Request/Address"^50319^-1 45^"53,16"^"WMS/Set SMSC Address Request/Address Type"^50318^-1 45^"54,1"^"WMS/Get Storage Max Size Request/Memory Storage"^50308^-1 45^"54,16"^"WMS/Get Storage Max Size Request/Message Mode"^50310^-1 45^"55,1"^"WMS/Send ACK Request/ACK"^50329^-1 45^"55,16"^"WMS/Send ACK Request/3GPP2 Failure Info"^50330^-1 45^"55,17"^"WMS/Send ACK Request/3GPP Failure Info"^50331^-1 45^"56,1"^"WMS/Set Retry Period Request/Period"^50332^-1 45^"57,1"^"WMS/Set Retry Interval Request/Interval"^50333^-1 45^"58,1"^"WMS/Set DC Disconnect Timer Request/Timer"^50334^-1 45^"59,1"^"WMS/Set Memory Status Request/Status"^50335^-1 45^"60,1"^"WMS/Set Broadcast Activation Request/BC Info"^50336^-1 45^"61,1"^"WMS/Set Broadcast Config Request/Mode"^50310^-1 45^"61,16"^"WMS/Set Broadcast Config Request/3GPP Info"^50337^-1 45^"61,17"^"WMS/Set Broadcast Config Request/3GPP2 Info"^50339^-1 45^"62,1"^"WMS/Get Broadcast Config Request/Mode"^50310^-1 45^"65,1"^"WMS/Set Domain Preference Request/Pref"^50344^-1 45^"66,1"^"WMS/Send From Memory Store Request/Info"^50345^-1 46^"0,2"^"WMS/Reset Response/Result Code"^50000^-1 46^"1,2"^"WMS/Set Event Report Response/Result Code"^50000^-1 46^"32,2"^"WMS/Raw Send Response/Result Code"^50000^-1 46^"32,16"^"WMS/Raw Send Response/Cause Code"^50303^-1 46^"32,17"^"WMS/Raw Send Response/Error Class"^50324^-1 46^"32,18"^"WMS/Raw Send Response/Cause Info"^50325^-1 46^"33,1"^"WMS/Raw Write Response/Message Index"^50305^-1 46^"33,2"^"WMS/Raw Write Response/Result Code"^50000^-1 46^"34,1"^"WMS/Raw Read Response/Message Data"^50306^-1 46^"34,2"^"WMS/Raw Read Response/Result Code"^50000^-1 46^"35,2"^"WMS/Modify Tag Response/Result Code"^50000^-1 46^"36,2"^"WMS/Delete Response/Result Code"^50000^-1 46^"48,1"^"WMS/Get Message Protocol Response/Message Protocol"^50310^-1 46^"48,2"^"WMS/Get Message Protocol Response/Result Code"^50000^-1 46^"49,1"^"WMS/List Messages Response/Message List"^50311^-1 46^"49,2"^"WMS/List Messages Response/Result Code"^50000^-1 46^"50,2"^"WMS/Set Routes Response/Result Code"^50000^-1 46^"51,1"^"WMS/Get Routes Response/Route List"^50315^-1 46^"51,16"^"WMS/Get Routes Response/Transfer Status Report"^50326^-1 46^"51,2"^"WMS/Get Routes Response/Result Code"^50000^-1 46^"52,1"^"WMS/Get SMSC Address Response/Address"^50317^-1 46^"52,2"^"WMS/Get SMSC Address Response/Result Code"^50000^-1 46^"54,1"^"WMS/Get Storage Max Size Response/Max Size"^50327^-1 46^"54,2"^"WMS/Get Storage Max Size Response/Result Code"^50000^-1 46^"54,16"^"WMS/Get Storage Max Size Response/Available Size"^50328^-1 46^"55,2"^"WMS/Send ACK Response/Result Code"^50000^-1 46^"56,2"^"WMS/Set Retry Period Response/Result Code"^50000^-1 46^"57,2"^"WMS/Set Retry Interval Response/Result Code"^50000^-1 46^"58,2"^"WMS/Set DC Disconnect Timer Response/Result Code"^50000^-1 46^"59,2"^"WMS/Set Memory Status Response/Result Code"^50000^-1 46^"60,2"^"WMS/Set Broadcast Activation Response/Result Code"^50000^-1 46^"61,2"^"WMS/Set Broadcast Config Response/Result Code"^50000^-1 46^"62,2"^"WMS/Get Broadcast Config Response/Result Code"^50000^-1 46^"62,16"^"WMS/Get Broadcast Config Response/3GPP Info"^50341^-1 46^"62,17"^"WMS/Get Broadcast Config Response/3GPP2 Info"^50342^-1 46^"64,1"^"WMS/Get Domain Preference Response/Pref"^50344^-1 46^"64,2"^"WMS/Get Domain Preference Response/Result Code"^50000^-1 46^"65,2"^"WMS/Set Domain Preference Response/Result Code"^50000^-1 46^"66,2"^"WMS/Send From Memory Store Response/Result Code"^50000^-1 46^"66,16"^"WMS/Send From Memory Store Response/Message ID"^50346^-1 46^"66,17"^"WMS/Send From Memory Store Response/Cause Code"^50303^-1 46^"66,18"^"WMS/Send From Memory Store Response/Error Class"^50324^-1 46^"66,19"^"WMS/Send From Memory Store Response/Cause Info"^50325^-1 47^"1,16"^"WMS/Event Report/Received MT Message"^50301^-1 47^"1,17"^"WMS/Event Report/Transfer Route MT Message"^50320^-1 47^"1,18"^"WMS/Event Report/Message Mode"^50310^-1 47^"63,1"^"WMS/Memory Full Indication/Info"^50343^-1 47^"70,1"^"WMS/SMSC Address Indication/Address"^50317^-1 48^"1,16"^"PDS/Set Event Report Request/NMEA Indicator"^50400^-1 48^"1,17"^"PDS/Set Event Report Request/Mode Indicator"^50416^-1 48^"1,18"^"PDS/Set Event Report Request/Raw Indicator"^50420^-1 48^"1,19"^"PDS/Set Event Report Request/XTRA Request Indicator"^50421^-1 48^"1,20"^"PDS/Set Event Report Request/Time Injection Indicator"^50422^-1 48^"1,21"^"PDS/Set Event Report Request/Wi-Fi Indicator"^50423^-1 48^"1,22"^"PDS/Set Event Report Request/Satellite Indicator"^50424^-1 48^"1,23"^"PDS/Set Event Report Request/VX Network Indicator"^50425^-1 48^"1,24"^"PDS/Set Event Report Request/SUPL Network Indicator"^50426^-1 48^"1,25"^"PDS/Set Event Report Request/UMTS CP Network Indicator"^50427^-1 48^"1,26"^"PDS/Set Event Report Request/PDS Comm Indicator"^50428^-1 48^"33,1"^"PDS/Set Service State Request/State"^50403^-1 48^"34,1"^"PDS/Start Tracking Session Request/Session"^50404^-1 48^"39,1"^"PDS/Set NMEA Config Request/Config"^50405^-1 48^"40,1"^"PDS/Inject Time Reference Request/Time"^50406^-1 48^"42,1"^"PDS/Set Defaults Request/Defaults"^50407^-1 48^"44,16"^"PDS/Set XTRA Parameters Request/Automatic"^50408^-1 48^"44,17"^"PDS/Set XTRA Parameters Request/Medium"^50409^-1 48^"44,18"^"PDS/Set XTRA Parameters Request/Network"^50410^-1 48^"44,20"^"PDS/Set XTRA Parameters Request/Embedded"^50441^-1 48^"46,18"^"PDS/Get AGPS Config Request/Network Mode"^50471^-1 48^"47,16"^"PDS/Set AGPS Config Request/Server"^50412^-1 48^"47,17"^"PDS/Set AGPS Config Request/Server URL"^50432^-1 48^"47,18"^"PDS/Set AGPS Config Request/Network Mode"^50471^-1 48^"49,1"^"PDS/Set Service Auto-Tracking State Request/State"^50413^-1 48^"51,1"^"PDS/Set COM Port Auto-Tracking Config Request/Config"^50413^-1 48^"52,16"^"PDS/Reset PDS Data Request/GPS Data"^50414^-1 48^"52,17"^"PDS/Reset PDS Data Request/Cell Data"^50415^-1 48^"53,16"^"PDS/Single Position Fix Request/Mode"^50442^-1 48^"53,17"^"PDS/Single Position Fix Request/Timeout"^50443^-1 48^"53,18"^"PDS/Single Position Fix Request/Accuracy"^50444^-1 48^"55,1"^"PDS/Inject XTRA Data Request/Data"^50446^-1 48^"56,16"^"PDS/Inject Position Data Request/Timestamp"^50447^-1 48^"56,17"^"PDS/Inject Position Data Request/Latitude"^50448^-1 48^"56,18"^"PDS/Inject Position Data Request/Longitude"^50449^-1 48^"56,19"^"PDS/Inject Position Data Request/Altitude Ellipsoid"^50450^-1 48^"56,20"^"PDS/Inject Position Data Request/Altitude Sea Level"^50451^-1 48^"56,21"^"PDS/Inject Position Data Request/Horizontal Uncertainty"^50452^-1 48^"56,22"^"PDS/Inject Position Data Request/Vertical Uncertainty"^50453^-1 48^"56,23"^"PDS/Inject Position Data Request/Horizontal Confidence"^50454^-1 48^"56,24"^"PDS/Inject Position Data Request/Vertical Confidence"^50455^-1 48^"56,25"^"PDS/Inject Position Data Request/Source"^50456^-1 48^"57,16"^"PDS/Inject Wi-Fi Position Data Request/Time"^50457^-1 48^"57,17"^"PDS/Inject Wi-Fi Position Data Request/Position"^50458^-1 48^"57,18"^"PDS/Inject Wi-Fi Position Data Request/AP Info"^50459^-1 48^"59,16"^"PDS/Set SBAS Config Request/Config"^50462^-1 48^"60,1"^"PDS/Send Network Initiated Response Request/Action"^50463^-1 48^"60,16"^"PDS/Send Network Initiated Response Request/VX"^50437^-1 48^"60,17"^"PDS/Send Network Initiated Response Request/SUPL"^50438^-1 48^"60,18"^"PDS/Send Network Initiated Response Request/UMTS CP"^50439^-1 48^"61,1"^"PDS/Inject Absolute Time Request/Time"^50464^-1 48^"62,1"^"PDS/Inject EFS Data Request/Date File"^50465^-1 48^"64,1"^"PDS/Set DPO Config Request/Config"^50467^-1 48^"66,16"^"PDS/Set ODP Config Request/Config"^50468^-1 48^"81,16"^"PDS/Set Position Methods State Request/XTRA Time"^50470^-1 48^"81,17"^"PDS/Set Position Methods State Request/XTRA Data"^50470^-1 48^"81,18"^"PDS/Set Position Methods State Request/Wi-Fi"^50470^-1 49^"0,2"^"PDS/Reset Response/Result Code"^50000^-1 49^"1,2"^"PDS/Set Event Report Response/Result Code"^50000^-1 49^"32,1"^"PDS/Get Service State Response/State"^50402^-1 49^"32,2"^"PDS/Get Service State Response/Result Code"^50000^-1 49^"33,2"^"PDS/Set Service State Response/Result Code"^50000^-1 49^"34,2"^"PDS/Start Tracking Session Response/Result Code"^50000^-1 49^"35,1"^"PDS/Get Tracking Session Info Response/Info"^50404^-1 49^"35,2"^"PDS/Get Tracking Session Info Response/Result Code"^50000^-1 49^"36,2"^"PDS/Fix Position Response/Result Code"^50000^-1 49^"37,2"^"PDS/End Tracking Session Response/Result Code"^50000^-1 49^"38,1"^"PDS/Get NMEA Config Response/Config"^50405^-1 49^"38,2"^"PDS/Get NMEA Config Response/Result Code"^50000^-1 49^"39,2"^"PDS/Set NMEA Config Response/Result Code"^50000^-1 49^"40,2"^"PDS/Inject Time Reference Response/Result Code"^50000^-1 49^"41,1"^"PDS/Get Defaults Response/Defaults"^50407^-1 49^"41,2"^"PDS/Get Defaults Response/Result Code"^50000^-1 49^"42,2"^"PDS/Set Defaults Response/Result Code"^50000^-1 49^"43,2"^"PDS/Get XTRA Parameters Response/Result Code"^50000^-1 49^"43,16"^"PDS/Get XTRA Parameters Response/Automatic"^50408^-1 49^"43,17"^"PDS/Get XTRA Parameters Response/Medium"^50409^-1 49^"43,18"^"PDS/Get XTRA Parameters Response/Network"^50410^-1 49^"43,19"^"PDS/Get XTRA Parameters Response/Validity"^50411^-1 49^"43,20"^"PDS/Get XTRA Parameters Response/Embedded"^50441^-1 49^"44,2"^"PDS/Set XTRA Parameters Response/Result Code"^50000^-1 49^"45,2"^"PDS/Force XTRA Download Response/Result Code"^50000^-1 49^"46,2"^"PDS/Get AGPS Config Response/Result Code"^50000^-1 49^"46,16"^"PDS/Get AGPS Config Response/Server"^50412^-1 49^"46,17"^"PDS/Get AGPS Config Response/Server URL"^50432^-1 49^"47,2"^"PDS/Set AGPS Config Response/Result Code"^50000^-1 49^"48,1"^"PDS/Get Service Auto-Tracking State Response/State"^50413^-1 49^"48,2"^"PDS/Get Service Auto-Tracking State Response/Result Code"^50000^-1 49^"49,2"^"PDS/Set Service Auto-Tracking State Response/Result Code"^50000^-1 49^"50,1"^"PDS/Get COM Port Auto-Tracking Config Response/Config"^50413^-1 49^"50,2"^"PDS/Get COM Port Auto-Tracking Config Response/Result Code"^50000^-1 49^"51,2"^"PDS/Set COM Port Auto-Tracking Config Response/Result Code"^50000^-1 49^"52,2"^"PDS/Reset PDS Data Response/Result Code"^50000^-1 49^"53,2"^"PDS/Single Position Fix Response/Result Code"^50000^-1 49^"54,1"^"PDS/Get Service Version Response/Version"^50445^-1 49^"54,2"^"PDS/Get Service Version Response/Result Code"^50000^-1 49^"55,2"^"PDS/Inject XTRA Data Response/Result Code"^50000^-1 49^"56,2"^"PDS/Inject Position Data Response/Result Code"^50000^-1 49^"57,2"^"PDS/Inject Wi-Fi Position Data Response/Result Code"^50000^-1 49^"58,2"^"PDS/Get SBAS Config Response/Result Code"^50000^-1 49^"58,16"^"PDS/Get SBAS Config Response/Config"^50461^-1 49^"59,2"^"PDS/Set SBAS Config Response/Result Code"^50000^-1 49^"60,2"^"PDS/Send Network Initiated Response Response/Result Code"^50000^-1 49^"61,2"^"PDS/Inject Absolute Time Response/Result Code"^50000^-1 49^"62,2"^"PDS/Inject EFS Data Response/Result Code"^50000^-1 49^"63,2"^"PDS/Get DPO Config Response/Result Code"^50000^-1 49^"63,16"^"PDS/Get DPO Config Response/Config"^50466^-1 49^"64,2"^"PDS/Set DPO Config Response/Result Code"^50000^-1 49^"65,2"^"PDS/Get ODP Config Response/Result Code"^50000^-1 49^"65,16"^"PDS/Get ODP Config Response/Config"^50468^-1 49^"66,2"^"PDS/Set ODP Config Response/Result Code"^50000^-1 49^"67,2"^"PDS/Cancel Single Position Fix Response/Result Code"^50000^-1 49^"68,2"^"PDS/Get GPS State Response/Result Code"^50000^-1 49^"68,16"^"PDS/Get GPS State Response/State"^50469^-1 49^"80,2"^"PDS/Get Position Methods State Response/Result Code"^50000^-1 49^"80,16"^"PDS/Get Position Methods State Response/XTRA Time"^50470^-1 49^"80,17"^"PDS/Get Position Methods State Response/XTRA Data"^50470^-1 49^"80,18"^"PDS/Get Position Methods State Response/Wi-Fi"^50470^-1 49^"81,2"^"PDS/Set Position Methods State Response/Result Code"^50000^-1 50^"1,16"^"PDS/Event Report/NMEA Sentence"^50401^-1 50^"1,17"^"PDS/Event Report/NMEA Sentence Plus Mode"^50417^-1 50^"1,18"^"PDS/Event Report/Position Session Status"^50429^-1 50^"1,19"^"PDS/Event Report/Parsed Position Data"^50430^-1 50^"1,20"^"PDS/Event Report/External XTRA Request"^50431^-1 50^"1,21"^"PDS/Event Report/External Time Injection Request"^50433^-1 50^"1,22"^"PDS/Event Report/External Wi-Fi Position Request"^50434^-1 50^"1,23"^"PDS/Event Report/Satellite Info"^50435^-1 50^"1,24"^"PDS/Event Report/VX Network Initiated Prompt"^50437^-1 50^"1,25"^"PDS/Event Report/SUPL Network Initiated Prompt"^50438^-1 50^"1,26"^"PDS/Event Report/UMTS CP Network Initiated Prompt"^50439^-1 50^"1,27"^"PDS/Event Report/Comm Events"^50440^-1 50^"32,1"^"PDS/Service State Indication/State"^50402^-1 51^"32,16"^"AUTH/Start EAP Session Request/Method Mask"^50700^-1^0 51^"33,1"^"AUTH/Send EAP Packet Request/Request Packet"^50701^-1^0 52^"32,2"^"AUTH/Start EAP Session Response/Result Code"^50000^-1^0 52^"33,1"^"AUTH/Send EAP Packet Response/Response Packet"^50703^-1^0 52^"33,2"^"AUTH/Send EAP Packet Response/Result Code"^50000^-1^0 52^"35,1"^"AUTH/Get EAP Session Keys Response/Session Keys"^50705^-1^0 52^"35,2"^"AUTH/Get EAP Session Keys Response/Result Code"^50000^-1^0 52^"36,2"^"AUTH/End EAP Session Response/Result Code"^50000^-1^0 52^"34,1"^"AUTH/EAP Session Result/Result"^50704^-1^0 54^"1,16"^"CAT/Set Event Report Request/Report Mask"^50600^-1^0 54^"33,1"^"CAT/Send Terminal Response Request/Terminal Response Type"^50612^-1^0 54^"34,1"^"CAT/Envelope Command Request/Envelope Command"^50613^-1^0 55^"0,2"^"CAT/Reset Response/Result Code"^50000^-1^0 55^"1,2"^"CAT/Set Event Report Response/Result Code"^50000^-1^0 55^"1,16"^"CAT/Set Event Report Response/Reg Status Mask"^50600^-1^0 55^"32,1"^"CAT/Get Service State Response/CAT Service State"^50615^-1^0 55^"32,2"^"CAT/Get Service State Response/Result Code"^50000^-1^0 55^"33,2"^"CAT/Send Terminal Response Response/Result Code"^50000^-1^0 55^"34,2"^"CAT/Envelope Command Response/Result Code"^50000^-1^0 56^"1,16"^"CAT/Event Report/Display Text Event"^50601^-1^0 56^"1,17"^"CAT/Event Report/Get Inkey Event"^50602^-1^0 56^"1,18"^"CAT/Event Report/Get Input Event"^50603^-1^0 56^"1,19"^"CAT/Event Report/Setup Menu Event"^50604^-1^0 56^"1,20"^"CAT/Event Report/Select Item Event"^50605^-1^0 56^"1,21"^"CAT/Event Report/Alpha ID Available"^50606^-1^0 56^"1,22"^"CAT/Event Report/Setup Event List"^50607^-1^0 56^"1,23"^"CAT/Event Report/Setup Idle Mode Text Event"^50608^-1^0 56^"1,24"^"CAT/Event Report/Language Notification Event"^50609^-1^0 56^"1,25"^"CAT/Event Report/Refresh Event"^50610^-1^0 56^"1,26"^"CAT/Event Report/End Proactive Session"^50611^-1^0 57^"33,16"^"RMS/Set SMS Wake Request/State"^50500^-1^0 57^"33,17"^"RMS/Set SMS Wake Request/Mask"^50501^-1^0 58^"0,2"^"RMS/Reset Response/Result Code"^50000^-1^0 58^"32,2"^"RMS/Get SMS Wake Response/Result Code"^50000^-1^0 58^"32,16"^"RMS/Get SMS Wake Response/State"^50500^-1^0 58^"32,17"^"RMS/Get SMS Wake Request/Mask"^50501^-1^0 58^"33,2"^"RMS/Set SMS Wake Response/Result Code"^50000^-1^0 60^"1,16"^"OMA/Set Event Report Request/NIA"^50800^-1^0 60^"1,17"^"OMA/Set Event Report Request/Status"^50801^-1^0 60^"32,16"^"OMA/Start Session Request/Type"^50805^-1^0 60^"35,16"^"OMA/Send Selection Request/Type"^50808^-1^0 60^"37,16"^"OMA/Set Features Response/Provisioning"^50809^-1^0 60^"37,17"^"OMA/Set Features Response/PRL Update"^50810^-1^0 60^"37,18"^"OMA/Set Features Response/HFA Feature"^50811^-1^0 61^"0,2"^"OMA/Reset Response/Result Code"^50000^-1^0 61^"1,2"^"OMA/Set Event Report Response/Result Code"^50000^-1^0 61^"32,2"^"OMA/Start Session Response/Result Code"^50000^-1^0 61^"33,2"^"OMA/Cancel Session Response/Result Code"^50000^-1^0 61^"34,2"^"OMA/Get Session Info Response/Result Code"^50000^-1^0 61^"34,16"^"OMA/Get Session Info Response/Info"^50806^-1^0 61^"34,17"^"OMA/Get Session Info Response/Failure"^50804^-1^0 61^"34,18"^"OMA/Get Session Info Response/Retry"^50807^-1^0 61^"34,19"^"OMA/Get Session Info Response/NIA"^50802^-1^0 61^"35,2"^"OMA/Send Selection Response/Result Code"^50000^-1^0 61^"36,2"^"OMA/Get Features Response/Result Code"^50000^-1^0 61^"36,16"^"OMA/Get Features Response/Provisioning"^50809^-1^0 61^"36,17"^"OMA/Get Features Response/PRL Update"^50810^-1^0 61^"36,18"^"OMA/Get Features Response/HFA Feature"^50811^-1^0 61^"36,19"^"OMA/Get Features Response/HFA Done State"^50812^-1^0 61^"37,2"^"OMA/Set Features Response/Result Code"^50000^-1^0 62^"1,16"^"OMA/Event Report/NIA"^50802^-1^0 62^"1,17"^"OMA/Event Report/Status"^50803^-1^0 62^"1,18"^"OMA/Event Report/Failure"^50804^-1^0 63^"58,1"^"Voice/Initiate USSD Request/Info"^70000^-1^0 63^"59,1"^"Voice/Answer USSD Request/Info"^70000^-1^0 63^"67,1"^"Voice/Async Initiate USSD Request/Info"^70000^-1^0 64^"58,2"^"Voice/Initiate USSD Response/Result Code"^50000^-1^0 64^"58,16"^"Voice/Initiate USSD Response/Fail Cause"^70001^-1^0 64^"58,17"^"Voice/Initiate USSD Response/Alpha ID"^70002^-1^0 64^"58,18"^"Voice/Initiate USSD Response/Data"^70000^-1^0 64^"59,2"^"Voice/Answer USSD Response/Result Code"^50000^-1^0 64^"60,2"^"Voice/Cancel USSD Response/Result Code"^50000^-1^0 64^"67,2"^"Voice/Async Initiate USSD Response/Result Code"^50000^-1^0 65^"62,1"^"Voice/USSD Indication/Type"^70003^-1^0 65^"62,16"^"Voice/USSD Indication/Data"^70000^-1 65^"67,16"^"Voice/USSD Async Indication/Error"^70004^-1^0 65^"67,17"^"Voice/USSD Async Indication/Fail Cause"^70001^-1^0 65^"67,18"^"Voice/USSD Async Indication/Info"^70000^-1^0 65^"67,19"^"Voice/USSD Async Indication/Alpha ID"^70002^-1^0libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/Enum.txt000077500000000000000000000126571455567757300242140ustar00rootroot0000000000000050000^"QMI Results"^-1^0 50001^"QMI Errors"^-1^0 50002^"QMI Data Bearer Technologies"^-1^0 50003^"QMI Connection Status"^-1^0 50004^"QMI Profile Types"^-1^0 50005^"QMI PDP Types"^-1^0 50006^"QMI Traffic Classes"^-1^0 50007^"QMI QoS Delivery Orders"^-1^0 50008^"QMI SDU Error Ratios"^-1^0 50009^"QMI SDU Residual Bit Error Ratios"^-1^0 50010^"QMI Erroneous SDU Deliveries"^-1^0 50011^"QMI Dormancy Status"^-1^0 50012^"QMI Call End Reasons"^-1^0 50013^"QMI Mobile IP Modes"^-1^0 50014^"QMI Call History Types"^-1^0 50015^"QMI Call Types"^-1^0 50016^"QMI HA/AAA Key States"^-1^0 50017^"QMI WDS Network Types"^-1^0 50018^"QMI WDS Extended Tech Prefs"^-1^0 50019^"QMI WDS Call Types"^-1^0 50020^"QMI WDS IP Families"^-1^0 50021^"QMI WDS Mobile IP Call End Reasons"^-1^0 50022^"QMI WDS Internal Call End Reasons"^-1^0 50023^"QMI WDS Call Manager Call End Reasons"^-1^0 50024^"QMI WDS 3GPP Call End Reasons"^-1^0 50025^"QMI WDS Call End Reason Types"^-1^0 50026^"QMI WDS Autoconnect Settings"^-1^0 50027^"QMI WDS Autoconnect Roam Settings"^-1^0 50028^"QMI PDP Access Control Flag"^-1^0 50029^"QMI IP Version"^-1^0 50030^"QMI Address Allocation Preference"^-1^0 50031^"QMI QoS Class Identifier"^-1^0 50032^"QMI Authentication Protocol"^-1^0 50033^"QMI Data Rate"^-1^0 50034^"QMI Application Type"^-1^0 50035^"QMI Data Mode"^-1^0 50036^"QMI PDN Type"^-1^0 50037^"QMI Extended Error Code"^-1^0 50100^"QMI Power Sources"^-1^0 50101^"QMI Data Service Capabilities 1"^-1^0 50102^"QMI DMS Radio Interfaces"^-1^0 50103^"QMI DMS Activation States"^-1^0 50104^"QMI DMS Operating Modes"^-1^0 50105^"QMI DMS Timestamp Sources"^-1^0 50106^"QMI DMS Activation Types"^-1^0 50107^"QMI DMS Lock States"^-1^0 50108^"QMI DMS PIN Status"^-1^0 50109^"QMI DMS UIM Facility"^-1^0 50110^"QMI DMS UIM Facility States"^-1^0 50111^"QMI DMS UIM States"^-1^0 50112^"QMI DMS Image Types"^-1^0 50113^"QMI DMS Time References"^-1^0 50200^"QMI NAS Radio Interfaces"^-1^0 50201^"QMI In Use States"^-1^0 50202^"QMI Roaming States"^-1^0 50203^"QMI Forbidden States"^-1^0 50204^"QMI Preferred States"^-1^0 50205^"QMI Register Actions"^-1^0 50206^"QMI Radio Access Technologies"^-1^0 50207^"QMI PS Attach Actions"^-1^0 50208^"QMI Registration States"^-1^0 50209^"QMI CS/PS Attach States"^-1^0 50210^"QMI Registered Networks"^-1^0 50211^"QMI Roaming Indicators"^-1^0 50212^"QMI Tech Pref Durations"^-1^0 50213^"QMI Tech Prefs"^-1^0 50214^"QMI Data Service Capabilities 2"^-1^0 50215^"QMI NAS System Preferences"^-1^0 50216^"QMI NAS Roaming Preferences"^-1^0 50217^"QMI NAS Band Classes"^-1^0 50218^"QMI NAS Service Domains"^-1^0 50219^"QMI NAS AN-AAA Authentication Status"^-1^0 50220^"QMI NAS SINR Levels"^-1^0 50221^"QMI NAS PRL Preferences"^-1^0 50222^"QMI NAS Roaming Preferences 2"^-1^0 50223^"QMI NAS DDTM Preferences"^-1^0 50224^"QMI NAS Service Option Actions"^-1^0 50225^"QMI NAS Network Description Displays"^-1^0 50226^"QMI NAS Network Description Encodings"^-1^0 50227^"QMI NAS PLMN Name Encoding Schemes"^-1^0 50228^"QMI NAS PLMN Name Country Initials"^-1^0 50229^"QMI NAS PLMN Name Spare Bits"^-1^0 50230^"QMI Change Duration"^-1^0 50300^"QMI WMS Storage Types"^-1^0 50301^"QMI WMS Message Formats"^-1^0 50302^"QMI WMS Message Tags"^-1^0 50303^"QMI WMS Message Protocols"^-1^0 50304^"QMI WMS Message Types"^-1^0 50305^"QMI WMS Message Classes"^-1^0 50306^"QMI WMS Receipt Actions"^-1^0 50307^"QMI WMS Route Values"^-1^0 50308^"QMI WMS CDMA Service Options"^-1^0 50309^"QMI WMS Error Classes"^-1^0 50310^"QMI WMS Error Classes 2"^-1^0 50311^"QMI WMS GSM/WCDMA Domains"^-1^0 50400^"QMI PDS Tracking Session States"^-1^0 50401^"QMI PDS Session Control Types"^-1^0 50402^"QMI PDS Session Types"^-1^0 50403^"QMI PDS Operation Types"^-1^0 50404^"QMI PDS Server Options"^-1^0 50405^"QMI PDS Output Devices"^-1^0 50406^"QMI PDS NMEA Reporting Options"^-1^0 50407^"QMI PDS Mediums"^-1^0 50408^"QMI PDS WWAN Network Preferences"^-1^0 50409^"QMI PDS NMEA Sentence Operating Modes"^-1^0 50410^"QMI PDS Session Status"^-1^0 50411^"QMI PDS Calendar Months"^-1^0 50412^"QMI PDS Calendar Days"^-1^0 50413^"QMI PDS Wi-Fi Request Types"^-1^0 50414^"QMI PDS SV Systems"^-1^0 50415^"QMI PDS SV Health Status"^-1^0 50416^"QMI PDS SV Processing Status"^-1^0 50417^"QMI PDS SV Ephemeris Status"^-1^0 50418^"QMI PDS SV Almanac Status"^-1^0 50419^"QMI PDS Privacy Modes"^-1^0 50420^"QMI PDS VX Modes"^-1^0 50421^"QMI PDS VX Data Coding Schemes"^-1^0 50422^"QMI PDS SUPL Modes"^-1^0 50423^"QMI PDS SUPL Data Coding Schemes"^-1^0 50424^"QMI PDS SUPL ID/Name Data Coding Schemes"^-1^0 50425^"QMI PDS UMTS CP Data Coding Schemes"^-1^0 50426^"QMI PDS UMTS CP Location Types"^-1^0 50427^"QMI PDS Comm Event Types"^-1^0 50428^"QMI PDS Comm Event Protocols"^-1^0 50429^"QMI PDS Injected Position Sources"^-1^0 50430^"QMI PDS SBAS States"^-1^0 50431^"QMI PDS Time Bases"^-1^0 50432^"QMI PDS EFS File Operations"^-1^0 50433^"QMI PDS ODP States"^-1^0 50434^"QMI PDS Method States"^-1^0 50435^"QMI Network Mode"^-1^0 50600^"QMI CAT Alpha ID Command Type"^-1^0 50601^"QMI CAT Refresh Stage"^-1^0 50602^"QMI CAT Proactive Session End Type"^-1^0 50603^"QMI CAT Envelope Command Type"^-1^0 50700^"QMI AUTH EAP Result"^-1^0 50800^"QMI OMA Session Types"^-1^0 50801^"QMI OMA Session States"^-1^0 50802^"QMI OMA Session Failure Reasons"^-1^0 50803^"QMI OMA Selections"^-1^0 50804^"QMI OMA HFA Done States"^-1^0 50900^"QMI Service Types"^-1^0 50901^"QMI Driver Data Formats"^-1^0 50902^"QMI Power Save States "^-1^0 70000^"USSD Data Coding Schemes"^-1^0 70001^"USSD Alpha Coding Schemes"^-1^0 70002^"USSD Notifcation Types"^-1^0libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/EnumEntry.txt000077500000000000000000000566201455567757300252340ustar00rootroot0000000000000050000^0^"Success" 50000^1^"Failure" 50001^0^"None" 50001^1^"Malformed Message" 50001^2^"No Memory" 50001^3^"Internal" 50001^4^"Aborted" 50001^5^"Client IDs Exhausted" 50001^6^"Unabortable Transaction" 50001^7^"Invalid Client ID" 50001^8^"No Thresholds Provided" 50001^9^"Invalid Handle" 50001^10^"Invalid Profile" 50001^11^"Invalid PIN ID" 50001^12^"Incorrect PIN" 50001^13^"No Network Found" 50001^14^"Call Failed" 50001^15^"Out Of Call" 50001^16^"Not Provisioned" 50001^17^"Missing Argument" 50001^19^"Argument Too Long" 50001^22^"Invalid Transaction ID" 50001^23^"Device In Use" 50001^24^"Network Unsupported" 50001^25^"Device Unsupported" 50001^26^"No Effect" 50001^27^"No Free Profile" 50001^28^"Invalid PDP Type" 50001^29^"Invalid Technology Preference" 50001^30^"Invalid Profile Type" 50001^31^"Invalid Service Type" 50001^32^"Invalid Register Action" 50001^33^"Invalid PS Attach Action" 50001^34^"Authentication Failed" 50001^35^"PIN Blocked" 50001^36^"PIN Always Blocked" 50001^37^"UIM Uninitialized" 50001^38^"Maximum QoS Requests In Use" 50001^39^"Incorrect Flow Filter" 50001^40^"Network QoS Unaware" 50001^41^"Invalid QoS ID" 50001^42^"QoS Unavailable" 50001^43^"Flow Suspended" 50001^46^"General Error" 50001^47^"Unknown Error" 50001^48^"Invalid Argument" 50001^49^"Invalid Index" 50001^50^"No Entry" 50001^51^"Device Storage Full" 50001^52^"Device Not Ready" 50001^53^"Network Not Ready" 50001^54^"WMS Cause Code" 50001^55^"WMS Message Not Sent" 50001^56^"WMS Message Delivery Failure" 50001^57^"WMS Invalid Message ID" 50001^58^"WMS Encoding" 50001^59^"Authentication Lock" 50001^60^"Invalid Transition" 50001^65^"Session Inactive" 50001^66^"Session Invalid" 50001^67^"Session Ownership" 50001^68^"Insufficient Resources" 50001^69^"Disabled" 50001^70^"Invalid Operation" 50001^71^"Invalid QMI Command" 50001^72^"WMS TPDU Type" 50001^73^"WMS SMSC Address" 50001^74^"Information Unavailable" 50001^75^"Segment Too Long" 50001^76^"Segment Order" 50001^77^"Bundling Not Supported" 50001^80^"SIM File Not Found" 50001^82^"Access Denied" 50001^83^"Hardware Restricted" 50001^61441^"CAT Event Registration Failed" 50001^61442^"CAT Invalid Terminal Response" 50001^61443^"CAT Invalid Envelope Command" 50001^61444^"CAT Envelope Command Busy" 50001^61445^"CAT Envelope Command Failed" 50002^1^"CDMA2000 1x" 50002^2^"CDMA2000 1x Ev-DO Rev. 0" 50002^3^"GPRS" 50002^4^"WCDMA" 50002^5^"CDMA2000 1x Ev-DO Rev. A" 50002^6^"EGPRS" 50002^7^"HSDPA/WCDMA" 50002^8^"WCDMA/HSUPA" 50002^9^"HSDPA/HSUPA" 50002^10^"LTE" 50002^11^"CDMA2000 EHRPD" 50003^1^"Disconnected" 50003^2^"Connected" 50003^3^"Suspended" 50003^4^"Authenticating" 50004^0^"3GPP" 50004^1^"3GPP2" 50005^0^"PDP-IP (V4)" 50006^0^"Subscribed" 50006^1^"Conversational" 50006^2^"Streaming" 50006^3^"Interactive" 50006^4^"Background" 50007^0^"Subscribe" 50007^1^"Delivery Order On" 50007^2^"Delivery Order Off" 50008^0^"Subscribe" 50008^1^"1 x 10-2" 50008^2^"7 x 10-3" 50008^3^"1 x 10-3" 50008^4^"1 x 10-4" 50008^5^"1 x 10-5" 50008^6^"1 x 10-6" 50008^7^"1 x 10-1" 50009^0^"Subscribe" 50009^1^"5 x 10-2" 50009^2^"1 x 10-2" 50009^3^"5 x 10-3" 50009^4^"4 x 10-3" 50009^5^"1 x 10-3" 50009^6^"1 x 10-4" 50009^7^"1 x 10-5" 50009^8^"1 x 10-6" 50009^9^"6 x 10-8" 50010^0^"Subscribe" 50010^1^"No Detection" 50010^2^"Erroneous SDU Is Delivered" 50010^3^"Erroneous SDU Is Not Delivered" 50011^1^"Traffic Channel Dormant" 50011^2^"Traffic Channel Active" 50012^1^"Unspecified" 50012^2^"Client End" 50012^3^"No Service" 50012^4^"Fade" 50012^5^"Release Normal" 50012^6^"Acc In Progress" 50012^7^"Acc Failed" 50012^8^"Redirect Or Handoff" 50012^9^"Close In Progress" 50012^10^"Authentication Failed" 50012^11^"Internal Error" 50012^500^"CDMA Lock" 50012^501^"Intercept" 50012^502^"Reorder" 50012^503^"Release Service Option Rejected" 50012^504^"Incoming Call" 50012^505^"Alert Stop" 50012^506^"Activation" 50012^507^"Max Access Probe" 50012^508^"CCS Not Supported By BS" 50012^509^"No Response From BS" 50012^510^"Rejected By BS" 50012^511^"Incompatible" 50012^512^"Already In TC" 50012^513^"User Call Orig During GPS" 50012^514^"User Call Orig During SMS" 50012^515^"No CDMA Service" 50012^1000^"Conf Failed" 50012^1001^"Incoming Rejected" 50012^1002^"No GW Service" 50012^1003^"Network End" 50012^1004^"LLC Or SNDCP Failure" 50012^1005^"Insufficient Resources" 50012^1006^"Service Option Out Of order" 50012^1007^"NSAPI Already Used" 50012^1008^"Regular PDP Context Deactivation" 50012^1009^"Network Failure" 50012^1010^"Reactivation Requested" 50012^1011^"Protocol Error" 50012^1012^"Operator Determined Barring" 50012^1013^"Unknown Or Missing APN" 50012^1014^"Unknown PDP Address Or PDP Type" 50012^1015^"Activation Rejected By GGSN" 50012^1016^"Activation Rejected, Unspecified" 50012^1017^"Service Option Not Supported" 50012^1018^"Requested Service Option Not Subscribed" 50012^1019^"QoS Not Accepted" 50012^1020^"Semantic Error In The TFT Operation" 50012^1021^"Syntactical Error In The TFT Operation" 50012^1022^"Unknown PDP Context" 50012^1023^"Semantic Errors In Packet Filter(s)" 50012^1024^"Syntactical Errors In Packet Filter(s)" 50012^1025^"PDP Context Without TFT Already Activated" 50012^1026^"Invalid Transaction Identifier Value" 50012^1027^"Semantically Incorrect Message" 50012^1028^"Invalid Mandatory Information" 50012^1029^"Message Type Non-Existent" 50012^1030^"Message Not Compatible With State" 50012^1031^"Information Element Nonexistent " 50012^1032^"Conditional Information Element Error" 50012^1033^"Message Not Compatible With Protocol State" 50012^1034^"APN Restriction Value Incompatible With Active PDP Context" 50012^1035^"No GPRS Context Present" 50012^1036^"Requested Feature Not Supported" 50012^1500^"CD Gen Or Busy" 50012^1501^"CD Bill Or Auth" 50012^1502^"Change HDR" 50012^1503^"Exit HDR" 50012^1504^"HDR No Session" 50012^1505^"HDR Orig During GPS Fix" 50012^1506^"HDR CS Timeout" 50012^1507^"HDR Released By CM" 50013^0^"MIP Off (Simple IP Only)" 50013^1^"MIP Preferred" 50013^2^"MIP Only" 50014^0^"Full" 50014^1^"IDs Only" 50015^0^"NDIS" 50015^1^"DUN" 50016^0^"Unset" 50016^1^"Set, Default" 50016^2^"Set, Modified" 50017^0^"Unknown" 50017^1^"CDMA" 50017^2^"UMTS" 50018^0x8001^"CDMA" 50018^0x8004^"UMTS" 50019^0^"Laptop" 50019^1^"Embedded" 50020^4^"IPv4" 50020^6^"IPv6" 50020^8^"Unspecified" 50021^64^"FA Unspecified" 50021^65^"FA Administratively Prohibited" 50021^66^"FA Insufficient Resources" 50021^67^"FA Mobile Node Authentication Failure" 50021^68^"FA HA Authentication Failure" 50021^69^"FA Requested Lifetime Too Long" 50021^70^"FA Malformed Request" 50021^71^"FA Malformed Reply" 50021^72^"FA Encapsulation Unavailable" 50021^73^"FA VJHC Unavailable" 50021^74^"FA Reverse Tunnel Unavailable" 50021^75^"FA Reverse Tunnel Is Mandatory And T Bit Is Not Set" 50021^79^"FA Delivery Style Not Supported" 50021^97^"FA Missing NAI" 50021^98^"FA Missing HA" 50021^99^"FA Missing Home Address" 50021^104^"FA Unknown Challenge" 50021^105^"FA Missing Challenge" 50021^106^"FA Stale Challenge" 50021^128^"HA Reason Unspecified" 50021^129^"HA Administratively Prohibited" 50021^130^"HA Insufficient Resources" 50021^131^"HA Mobile Node Authentication Failure" 50021^132^"HA FA Authentication Failure" 50021^133^"HA Registration ID Mismatch" 50021^134^"HA Malformed Request" 50021^136^"HA Unknown HA Address" 50021^137^"HA Reverse Tunnel Unavailable" 50021^138^"HA Reverse Tunnel Is Mandatory And T Bit Is Not Set" 50021^139^"HA Encapsulation Unavailable" 50021^65535^"Unknown" 50022^201^"Internal" 50022^202^"Call Ended" 50022^203^"Internal Unknown Cause Code" 50022^204^"Unknown Cause Code" 50022^205^"Close In Progress" 50022^206^"NW Initiated Termination" 50022^207^"App Preempted" 50023^500^"CDMA Lock" 50023^501^"Intercept" 50023^502^"Reorder" 50023^503^"Release Service Option Reject" 50023^504^"Incoming Call" 50023^505^"Alert Stop" 50023^506^"Activation" 50023^507^"Max Access Probe" 50023^508^"CCS Not Supported By BS" 50023^509^"No Response From BS" 50023^510^"Rejected By BS" 50023^511^"Incompatible" 50023^512^"Already In TC" 50023^513^"User Call Orig During GPS" 50023^514^"User Call Orig During SMS" 50023^515^"No CDMA Service" 50023^1000^"Conf Failed" 50023^1001^"Incoming Rejected" 50023^1002^"No GW Service" 50023^1003^"No GPRS Context" 50023^1004^"Illegal MS" 50023^1005^"Illegal ME" 50023^1006^"GPRS Services And Non-GPRS Service Not Allowed" 50023^1007^"GPRS Services Not Allowed" 50023^1008^"MS Identity Cannot Be Derived By The Network" 50023^1009^"Implicitly Detached" 50023^1010^"PLMN Not Allowed" 50023^1011^"LA Not Allowed" 50023^1012^"GPRS Services Not Allowed In This PLMN" 50023^1013^"PDP Duplicate" 50023^1014^"UE RAT Change" 50023^1015^"Congestion" 50023^1016^"No PDP Context Activated" 50023^1017^"Access Class DSAC Rejection" 50023^1500^"CD Gen Or Busy" 50023^1501^"CD Bill Or Auth" 50023^1502^"Change HDR" 50023^1503^"Exit HDR" 50023^1504^"HDR No Session" 50023^1505^"HDR Orig During GPS Fix" 50023^1506^"HDR CS Timeout" 50023^1507^"HDR Released By CM" 50023^2000^"Client End" 50023^2001^"No Service" 50023^2002^"Fade" 50023^2003^"Normal Release" 50023^2004^"Access In Progress" 50023^2005^"Access Fail" 50023^2006^"Redirect Or Handoff" 50024^8^"Operator Determined Barring" 50024^25^"LLC SNDCP Failure" 50024^26^"Insufficient Resources" 50024^27^"Unknown APN" 50024^28^"Unknown PDP" 50024^29^"Authentication FAiled" 50024^30^"GGSN Reject" 50024^31^"Activation Reject" 50024^32^"Option Not Supported" 50024^33^"Option Unsubscribed" 50024^34^"Option Temporarily OOO" 50024^35^"NSAPI Already Used" 50024^36^"Regular Deactivation" 50024^37^"QoS Not Accepted" 50024^38^"Network Failure" 50024^39^"UMTS Reactivation Request" 50024^40^"Feature Not Supported" 50024^41^"TFT Semantic Error" 50024^42^"TFT Syntax Error" 50024^43^"Unknown PDP Context" 50024^44^"Filter Semantic Error" 50024^45^"Filter Syntax Error" 50024^46^"PDP Without Active TFT" 50024^81^"Invalid Transaction ID" 50024^95^"Message Incorrect Semantic" 50024^96^"Invalid Mandatory ID" 50024^97^"Message Type Unsupported" 50024^98^"Message Type Noncompatible State" 50024^99^"Unknown Info Element" 50024^100^"Conditional Info Element Error" 50024^101^"Message And Protocol State Uncompatible" 50024^111^"Protocol Error" 50024^112^"APN Type Conflict" 50025^1^"Mobile IP" 50025^2^"Internal" 50025^3^"Call Manager Defined" 50025^6^"3GPP Specification Defined" 50026^0^"Disabled" 50026^1^"Enabled" 50026^2^"Paused" 50027^0^"Always" 50027^1^"Home Only" 50028^0^"PDP Access Control None" 50028^1^"PDP Access Control Reject" 50028^2^"PDP Access Control Permission" 50029^4^"IPv4" 50029^6^"IPv6" 50030^0^"NAS signaling" 50030^1^"DHCP" 50031^0^"Network Assign QCI" 50031^1^"Guaranteed Bitrate" 50031^2^"Guaranteed Bitrate" 50031^3^"Guaranteed Bitrate" 50031^4^"Guaranteed Bitrate" 50031^5^"Non Guaranteed Bitrate" 50031^6^"Non Guaranteed Bitrate" 50031^7^"Non Guaranteed Bitrate" 50031^8^"Non Guaranteed Bitrate" 50032^1^"PAP" 50032^2^"CHAP" 50032^3^"PAP or CHAP" 50033^0^"Low (SO15 Only)" 50033^1^"Medium (SO33 + low R-SCH)" 50033^2^"High (SO33 + high R-SCH)" 50034^0^"Default Application Type" 50034^32^"LBS Application Type" 50034^64^"Tethered Application Type" 50035^0^"CDMA or HDR" 50035^1^"CDMA Only" 50035^2^"HDR Only" 50036^0^"IPv4 PDN Type" 50036^1^"IPv6 PDN Type" 50036^2^"IPv4 or IPv6 PDN Type" 50036^3^"Unspecified PDN Type" 50037^1^"Failure" 50037^2^"Invalid handle" 50037^3^"Invalid Operation" 50037^4^"Invalid Profile Type" 50037^5^"Invalid Profile Number" 50037^6^"Invalid Identifier" 50037^7^"Invalid Argument" 50037^8^"Not Initialized" 50037^9^"Invalid Length" 50037^10^"List End" 50037^11^"Invalid Subscription ID" 50037^12^"Invalid Profile Family" 50037^1001^"3GPP Invalid Profile Family" 50037^1002^"3GPP Access Error" 50037^1003^"3GPP Context Not Defined" 50037^1004^"3GPP Valid Flag Not Set" 50037^1005^"3GPP Read Only Flag Set" 50037^1006^"3GPP Error Max Profile Number" 50037^1101^"3GPP2 Error Invalid Identifier For Profile" 50100^0^"Battery" 50100^1^"External" 50101^0^"No Data Services Supported" 50101^1^"Only Circuit Switched" 50101^2^"Only Packet Switched" 50101^3^"Simultaneous Circuit/Packet Switched" 50101^4^"Nonsimultaneous Circuit/Packet Switched" 50102^1^"CDMA2000 1x" 50102^2^"CDMA2000 HRPD" 50102^4^"GSM" 50102^5^"UMTS" 50102^8^"LTE" 50103^0^"Service Not Activated" 50103^1^"Serivce Activated" 50103^2^"Activation Connecting" 50103^3^"Activation In Progress" 50103^4^"OTASP Security Authenticated" 50103^5^"OTASP NAM Downloaded" 50103^6^"OTASP MDN Downloaded" 50103^7^"OTASP IMSI Downloaded" 50103^8^"OTASP PRL Downloaded" 50103^9^"OTASP SPC Downloaded" 50103^10^"OTASP Settings Committed" 50104^0^"Online" 50104^1^"Low Power" 50104^2^"Factory Test Mode" 50104^3^"Offline" 50104^4^"Reset" 50104^5^"Shutdown" 50104^6^"Persistent Low Power" 50104^7^"Mode-Only Low Power" 50105^0^"Device" 50105^1^"CDMA Network" 50105^2^"CDMA 1xEV-DO Network" 50105^3^"GSM Network" 50105^4^"WCDMA Network" 50105^5^"GPS Network" 50105^6^"MFLO Network" 50106^0^"OTASP" 50107^0^"Lock Disabled" 50107^1^"Lock Enabled" 50108^0^"PIN Uninitialized" 50108^1^"PIN Enabled, Unverified" 50108^2^"PIN Enabled, Verified" 50108^3^"PIN Disabled" 50108^4^"PIN Blocked" 50108^5^"PIN Blocked Permanently" 50108^6^"PIN Unblocked" 50108^7^"PIN Changed" 50109^0^"PN - Network Personalization" 50109^1^"PU - Network Subset Personalization" 50109^2^"PP - Service Provider Personalization" 50109^3^"PC - Corporate Personalization" 50109^4^"PF - UIM Personalization" 50110^0^"Deactivated" 50110^1^"Activated" 50110^2^"Block" 50111^0^"Initialization Completed" 50111^1^"Initialization Failed" 50111^2^"Not Present" 50111^255^"State Unavailable" 50112^0^"Modem" 50112^1^"PRI" 50113^0^"User" 50200^0^"None (No Service)" 50200^1^"CDMA2000 1x" 50200^2^"CDMA2000 HRPD" 50200^3^"AMPS" 50200^4^"GSM" 50200^5^"UMTS" 50200^8^"LTE" 50201^0^"Unknown" 50201^1^"Current Serving" 50201^2^"Available" 50202^0^"Unknown" 50202^1^"Home" 50202^2^"Roam" 50203^0^"Unknown" 50203^1^"Forbidden" 50203^2^"Not Forbidden" 50204^0^"Unknown" 50204^1^"Preferred" 50204^2^"Not Preferred" 50205^1^"Automatic" 50205^2^"Manual" 50206^4^"GSM" 50206^5^"UMTS" 50206^8^"LTE" 50207^1^"Attach" 50207^2^"Detach" 50208^0^"NAS Not Registered" 50208^1^"NAS Registered" 50208^2^"NAS Not Registered (Searching)" 50208^3^"NAS Registration Denied" 50208^4^"Registration State Unknown" 50209^0^"Unknown/Not Applicable" 50209^1^"Attached" 50209^2^"Detached" 50210^0^"Unknown" 50210^1^"3GPP2" 50210^2^"3GPP" 50211^0^"Roaming" 50211^1^"Home" 50211^2^"Roaming (Partner)" 50212^0^"Permanent" 50212^1^"Power Cycle" 50213^0^"Automatic" 50213^1^"3GPP2" 50213^2^"3GPP" 50213^3^"Invalid" 50214^1^"GPRS" 50214^2^"EGPRS" 50214^3^"HSDPA" 50214^4^"HSUPA" 50214^5^"WCDMA" 50214^6^"CDMA" 50214^7^"CDMA 1xEV-DO Rev. 0" 50214^8^"CDMA 1xEV-DO Rev. A" 50214^9^"GSM" 50214^10^"CDMA 1xEV-DO Rev. B" 50214^11^"LTE" 50214^12^"HSDPA+" 50214^13^"DC-HSDPA+" 50215^0^"Automatic" 50215^1^"Automatic A" 50215^2^"Automatic B" 50216^0^"Automatic" 50216^1^"Home Only" 50216^2^"Roaming Only" 50216^3^"Home/Roaming" 50217^0^"CDMA Band Class 0" 50217^1^"CDMA Band Class 1" 50217^3^"CDMA Band Class 3" 50217^4^"CDMA Band Class 4" 50217^5^"CDMA Band Class 5" 50217^6^"CDMA Band Class 6" 50217^7^"CDMA Band Class 7" 50217^8^"CDMA Band Class 8" 50217^9^"CDMA Band Class 9" 50217^10^"CDMA Band Class 10" 50217^11^"CDMA Band Class 11" 50217^12^"CDMA Band Class 12" 50217^13^"CDMA Band Class 13" 50217^14^"CDMA Band Class 14" 50217^15^"CDMA Band Class 15" 50217^16^"CDMA Band Class 16" 50217^40^"GSM 450" 50217^41^"GSM 480" 50217^42^"GSM 750" 50217^43^"GSM 850" 50217^44^"GSM 900 (Extended)" 50217^45^"GSM 900 (Primary)" 50217^46^"GSM 900 (Railways)" 50217^47^"GSM 1800" 50217^48^"GSM 1900" 50217^80^"WCDMA 2100" 50217^81^"WCDMA PCS 1900" 50217^82^"WCDMA DCS 1800" 50217^83^"WCDMA 1700 (US)" 50217^84^"WCDMA 850" 50217^85^"WCDMA 800" 50217^86^"WCDMA 2600" 50217^87^"WCDMA 900" 50217^88^"WCDMA 1700 (Japan)" 50217^120^"E-UTRA Band 1" 50217^121^"E-UTRA Band 2" 50217^122^"E-UTRA Band 3" 50217^123^"E-UTRA Band 4" 50217^124^"E-UTRA Band 5" 50217^125^"E-UTRA Band 6" 50217^126^"E-UTRA Band 7" 50217^127^"E-UTRA Band 8" 50217^128^"E-UTRA Band 9" 50217^129^"E-UTRA Band 10" 50217^130^"E-UTRA Band 11" 50217^131^"E-UTRA Band 12" 50217^132^"E-UTRA Band 13" 50217^133^"E-UTRA Band 14" 50217^134^"E-UTRA Band 17" 50217^135^"E-UTRA Band 33" 50217^136^"E-UTRA Band 34" 50217^137^"E-UTRA Band 35" 50217^138^"E-UTRA Band 36" 50217^139^"E-UTRA Band 37" 50217^140^"E-UTRA Band 38" 50217^141^"E-UTRA Band 39" 50217^142^"E-UTRA Band 40" 50218^1^"Circuit Switched" 50219^0^"Authentication Failed" 50219^1^"Authentication Success" 50219^2^"No Authentication Requested" 50220^0^"-9 dB" 50220^1^"-6 dB" 50220^2^"-4.5 dB" 50220^3^"-3 dB" 50220^4^"-2 dB" 50220^5^"1 dB" 50220^6^"3 dB" 50220^7^"6 dB" 50220^8^"9 dB" 50221^1^"Acquire A Side Only" 50221^2^"Acquire B Side Only" 50221^16383^"Acquire Any" 50222^1^"Acquire When Roaming Indicator Off" 50222^2^"Acquire When Roaming Indicator Not Off" 50222^3^"Acquire When Roaming Indicator Not Flashing" 50222^255^"Acquire Any" 50223^0^"Off" 50223^1^"On" 50223^2^"No Change" 50224^0^"Add" 50224^1^"Replace" 50224^2^"Delete" 50224^3^"No Change" 50225^0^"Do Not Display" 50225^1^"Display" 50225^255^"Unknown" 50226^0^"Unspecified Octet" 50226^1^"Extended Protocol Message" 50226^2^"7-Bit ASCII" 50226^3^"IA5" 50226^4^"UNICODE" 50226^5^"Shift-JIS" 50226^6^"Korean" 50226^7^"Latin/Hebrew" 50226^8^"Latin" 50226^9^"GSM 7-Bit" 50226^10^"GSM DCS" 50227^0^"ASCII" 50227^1^"UCS2-LE" 50228^0^"Do Not Add Country Initials" 50228^1^"Add Country Initials" 50228^255^"Unspecified" 50229^0^"Unknown" 50229^1^"Bit 8" 50229^2^"Bits 7/8" 50229^3^"Bits 6 - 8" 50229^4^"Bits 5 - 8" 50229^5^"Bits 4 - 8" 50229^6^"Bits 3 - 8" 50229^7^"Bits 2 - 8" 50230^0^"Power Cycle" 50230^1^"Permanent" 50300^0^"UIM" 50300^1^"NV" 50300^2^"Unknown" 50301^0^"CDMA" 50301^1^"Analog CLI (Unsupported)" 50301^2^"Analog Voice Mail (Unsupported)" 50301^3^"Analog WMS (Unsupported)" 50301^4^"Analog AWI/WMS (Unsupported)" 50301^5^"MWI (Unsupported)" 50301^6^"GSM/WCDMA PP" 50301^7^"GSM/WCDMA BC" 50301^8^"MWI" 50302^0^"MT Read" 50302^1^"MT Not Read" 50302^2^"MO Send" 50302^3^"MO Not Sent" 50303^0^"CDMA" 50303^1^"GSM/WCDMA (Unsupported)" 50304^0^"Point-To-Point" 50304^1^"Broadcast" 50305^0^"Class 0" 50305^1^"Class 1" 50305^2^"Class 2" 50305^3^"Class 3" 50305^4^"Class None" 50305^5^"Class CDMA" 50306^0^"Discard" 50306^1^"Store And Notify" 50307^0^"Discard" 50307^1^"Store And Notify" 50307^2^"Unknown" 50308^0^"Automatic" 50308^6^"SO 6" 50308^14^"SO 14" 50309^0^"Temporary" 50309^1^"Permanent" 50310^2^"Temporary" 50310^3^"Permanent" 50311^0^"CS Preferred" 50311^1^"PS Preferred" 50311^2^"CS Only" 50311^3^"PS Only" 50400^0^"Unknown" 50400^1^"Inactive" 50400^2^"Active" 50401^0^"Manual" 50402^0^"New" 50403^0^"Standalone" 50403^1^"MS Based" 50403^2^"MS Assisted" 50404^0^"Default" 50405^0^"None (Disabled)" 50405^1^"USB" 50405^2^"UART1" 50405^3^"UART2" 50405^4^"Shared Memory" 50406^0^"1 Hz From Time Requested Until Final Position Determination" 50406^1^"Final Position Determination Only" 50407^0^"WWAN" 50408^0^"Any Available" 50408^1^"Home Only" 50408^2^"Roam Only" 50409^0^"Standalone" 50409^1^"MS Based" 50409^2^"MS Assisted" 50409^255^"Unknown" 50410^0^"Success" 50410^1^"In Progress" 50410^2^"General Failure" 50410^3^"Timeout" 50410^4^"User Ended" 50410^5^"Bad Parameter" 50410^6^"Phone Offline" 50410^7^"Engine Locked" 50410^8^"E911 Session In Progress" 50411^0^"January" 50411^1^"February" 50411^2^"March" 50411^3^"April" 50411^4^"May" 50411^5^"June" 50411^6^"July" 50411^7^"August" 50411^8^"September" 50411^9^"October" 50411^10^"November" 50411^11^"December" 50412^0^"Sunday" 50412^1^"Monday" 50412^2^"Tuesday" 50412^3^"Wednesday" 50412^4^"Thursday" 50412^5^"Friday" 50412^6^"Saturday" 50413^0^"Start Periodic Fixes - High Frequency" 50413^1^"Start Periodic Fixes - Keep Warm" 50413^2^"Stop Periodic Fixes" 50413^4^"Suspend" 50414^1^"GPS" 50414^2^"Galileo" 50414^3^"SBAS" 50414^4^"Compass" 50414^5^"Glonass" 50415^0^"Unhealthy" 50415^1^"Healthy" 50416^1^"Idle" 50416^2^"Search" 50416^3^"Search Verify" 50416^4^"Bit Edge" 50416^5^"Track" 50417^0^"Unavailable" 50417^1^"Available" 50418^0^"Unavailable" 50418^1^"Available" 50419^0^"No Notify/Verify" 50419^1^"Notify" 50419^2^"Notify/Verify - Allow No Response" 50419^3^"Notify/Verify - Require Response" 50419^4^"Privacy Override" 50420^0^"MS Assisted" 50420^1^"MS Based" 50420^2^"MS Assisted Preferred" 50420^3^"MS Based Preferred" 50421^0^"Octet" 50421^1^"EXN Protocol Message" 50421^2^"ASCII" 50421^3^"IA5" 50421^4^"Unicode" 50421^5^"Shift JIS" 50421^6^"Korean" 50421^7^"Latin Hebrew" 50421^8^"Latin" 50421^9^"GSM" 50422^0^"MS Assisted" 50422^1^"MS Based" 50422^2^"MS Assisted Preferred" 50422^3^"MS Based Preferred" 50422^4^"Standalone" 50422^5^"AFLT" 50422^6^"ECID" 50422^7^"EOTD" 50422^8^"OTDOA" 50422^9^"No Position" 50423^0^"UTF8" 50423^1^"UCS2" 50423^2^"GSM" 50423^255^"Unknown" 50424^0^"Logical Name" 50424^1^"Email Address" 50424^2^"MSISDN" 50424^3^"URL" 50424^4^"SIP URL" 50424^5^"MIN" 50424^6^"MDN" 50424^255^"Unknown" 50425^0^"German" 50425^1^"English" 50425^2^"Italian" 50425^3^"French" 50425^4^"Spanish" 50425^5^"Dutch" 50425^6^"Swedish" 50425^7^"Danish" 50425^8^"Portuguese" 50425^9^"Finnish" 50425^10^"Norwegian" 50425^11^"Greek" 50425^12^"Turkish" 50425^13^"Hungarian" 50425^14^"Polish" 50425^255^"Unknown" 50426^0^"Current" 50426^1^"Current Or Last Known" 50426^2^"Initial" 50427^0^"Begin" 50427^1^"Connected" 50427^2^"Failure" 50427^3^"Done" 50427^4^"Other Failure" 50428^0^"UMTS User Plane SUPL" 50428^1^"1X" 50428^2^"UMTS Control Plane WCDMA" 50428^3^"UMTS Control Plane GSM" 50428^4^"V1/V2" 50428^5^"KDDI" 50428^6^"XTRA Data Download" 50428^7^"SNTP Time Download" 50429^0^"Unknown" 50429^1^"GPS" 50429^2^"Cell ID" 50429^3^"Enhanced Cell ID" 50429^4^"Wi-Fi" 50429^5^"Terrestial" 50429^6^"Terrestial Hybrid" 50429^7^"Other" 50430^0^"Disabled" 50430^1^"Enabled" 50430^255^"Unknown" 50431^0^"GPS" 50431^1^"UTC" 50432^0^"Write" 50433^0^"Disables" 50433^1^"Enabled - Low Power Mode" 50433^2^"Enabled - Ready Mode" 50434^0^"Disabled" 50434^1^"Enabled" 50434^255^"Not Supported" 50435^0^"UMTS" 50435^1^"CDMA" 50600^1^"Send SMS Proactive Command"^-1 50601^1^"Refresh Start"^-1 50601^2^"Refresh Success"^-1 50601^3^"Refresh Failed"^-1 50602^1^"End Proactive Session Command Received from the card"^-1 50602^2^"End Proactive Session Internal to ME"^-1 50603^1^"Menu Selection"^-1 50603^2^"Event Download User Activity"^-1 50603^3^"Event Download Idle Screen Available"^-1 50603^4^"Event Download Language Selection"^-1 50700^0^"Success"^-1 50700^1^"Failure"^-1 50800^0^"Client Initiated Device Configure"^-1 50800^1^"Client Initiated PRL Update"^-1 50800^2^"Client Initiated Hands Free Activation"^-1 50800^3^"Device Initiated Hands Free Activation"^-1 50800^4^"Network Initiated PRL Update"^-1 50800^5^"Network Initiated Device Configure"^-1 50801^0^"Complete, Info Updated"^-1 50801^1^"Complete, Info Unavailable"^-1 50801^2^"Failed"^-1 50801^3^"Retrying"^-1 50801^4^"Connecting"^-1 50801^5^"Connected"^-1 50801^6^"Authenticated"^-1 50801^7^"MDN Downloaded"^-1 50801^8^"MSID Downloaded"^-1 50801^9^"PRL Downloaded"^-1 50801^10^"MIP Profile Downloaded"^-1 50802^0^"Unknown"^-1 50802^1^"Network Unavailable"^-1 50802^2^"Server Unavailable"^-1 50802^3^"Authentication Failed"^-1 50802^4^"Max Retry Exceeded"^-1 50802^5^"Session Cancelled"^-1 50803^0^"Reject"^-1 50803^1^"Accept"^-1 50804^0^"None"^-1 50804^1^"Succeeded"^-1 50804^2^"Failed"^-1 50900^0^"Control"^-1 50900^1^"WDS"^-1 50900^2^"DMS"^-1 50900^3^"NAS"^-1 50900^4^"QOS"^-1 50900^5^"WMS"^-1 50900^6^"PDS"^-1 50900^7^"AUTH"^-1 50900^224^"CAT"^-1 50900^225^"RMS"^-1 50900^226^"OMA"^-1 50901^0^"QoS Flow Header Absent"^-1 50901^1^"QoS Flow Header Present"^-1 50902^0^"Normal"^-1 50902^1^"Suspend"^-1 50902^2^"Powerdown"^-1 70000^1^"ASCII"^-1 70000^2^"8-Bit"^-1 70000^3^"UCS2"^-1 70001^1^"GSM"^-1 70001^2^"UCS2"^-1 70002^1^"No Action Required"^-1 70002^2^"Action Is Required"^-1libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/Field.txt000077500000000000000000001011361455567757300243220ustar00rootroot0000000000000050000^"QMI Result"^16^1^50000^0 50001^"QMI Error"^16^1^50001^0 50002^"Transaction ID"^16^0^4^0 50100^"Report Channel Rate"^8^0^0^0 50101^"Transfer Statistics Interval (Seconds)"^8^0^2^0 50102^"Report TX Packet Successes"^1^0^0^0 50103^"Report RX Packet Successes"^1^0^0^0 50104^"Report TX Packet Errors"^1^0^0^0 50105^"Report RX Packet Errors"^1^0^0^0 50106^"Report TX Overflows"^1^0^0^0 50107^"Report RX Overflows"^1^0^0^0 50108^"Report Data Bearer Technology"^8^0^0^0 50109^"TX Packet Successes"^32^0^6^0 50110^"RX Packet Successes"^32^0^6^0 50111^"TX Packet Errors"^32^0^6^0 50112^"RX Packet Errors"^32^0^6^0 50113^"TX Overflows"^32^0^6^0 50114^"RX Overflows"^32^0^6^0 50115^"Channel TX Rate (bps)"^32^0^6^0 50116^"Channel RX Rate (bps)"^32^0^6^0 50117^"Data Bearer Technology"^8^1^50002^0 50118^"IP V4 Address"^8^0^2^0 50119^"APN Name"^0^0^11^0 50120^"Enable PAP"^1^0^0^0 50121^"Enable CHAP"^1^0^0^0 50122^"Username"^0^0^11^0 50123^"Password"^0^0^11^0 50124^"Enable 3GPP"^1^0^0^0 50125^"Enable 3GPP2"^1^0^0^0 50126^"Profile Index"^8^0^2^0 50127^"Packet Data Handle"^32^0^6^1 50128^"Connection Status"^8^1^50003^0 50129^"Reconfigure Required"^8^0^0^0 50130^"Max Channel TX Rate (bps)"^32^0^6^0 50131^"Max Channel RX Rate (bps)"^32^0^6^0 50132^"Profile Type"^8^1^50004^0 50133^"Profile Name"^0^0^11^0 50134^"PDP Type"^8^1^50005^0 50135^"Traffic Class"^8^1^50006^0 50136^"Max Uplink Bitrate"^32^0^6^0 50137^"Max Downlink Bitrate"^32^0^6^0 50138^"Guaranteed Uplink Bitrate"^32^0^6^0 50139^"Guaranteed Downlink Bitrate"^32^0^6^0 50140^"QoS Delivery Order"^8^1^50007^0 50141^"Max SDU Size"^32^0^6^0 50142^"SDU Error Ratio"^8^1^50008^0 50143^"SDU Residual Bit Error Ratio"^8^1^50009^0 50144^"Erroneous SDU Delivery"^8^1^50010^0 50145^"Transfer Delay"^32^0^6^0 50146^"Traffic Handling Priority"^32^0^6^0 50147^"Precedence Class"^32^0^6^0 50148^"Delay Class"^32^0^6^0 50149^"Reliability Class"^32^0^6^0 50150^"Peak Throughput Class"^32^0^6^0 50151^"Mean Throughput Class"^32^0^6^0 50152^"Number Of Profiles"^8^0^2^0 50153^"Profile Name Length"^8^0^2^0 50154^"Profile Name"^8^0^9^0 50155^"Report Dormancy Status"^8^0^0^0 50156^"Dormancy Status"^8^1^50011^0 50157^"Call End"^16^1^50012^0 50158^"MIP Mode"^8^1^50013^0 50159^"Autoconnect Setting"^8^1^50026^0 50160^"Autoconnect Off"^8^0^0^0 50161^"Data Session Duration"^64^0^8^0 50162^"Connection Status"^1^0^0^0 50163^"Last Call End Reason"^1^0^0^0 50164^"RX/TX Byte Totals"^1^0^0^0 50165^"Dormancy Status"^1^0^0^0 50166^"Data Bearer Technology"^1^0^0^0 50167^"Channel Rates"^1^0^0^0 50168^"Report Connection Status"^8^0^0^0 50169^"TX Byte Total"^1^0^0^0 50170^"RX Byte Total"^1^0^0^0 50171^"TX Byte Total"^64^0^8^0 50172^"RX Byte Total"^64^0^8^0 50173^"SPC"^48^0^9^0 50174^"Enabled"^8^0^0^0 50175^"Reverse Tunneling"^8^0^0^0 50176^"NAI"^0^0^11^0 50177^"HA SPI"^32^0^6^0 50178^"AAA SPI"^32^0^6^0 50179^"MN-HA Key"^0^0^11^0 50180^"MN-AAA Key"^0^0^11^0 50181^"Retry Attempt Limit"^8^0^2^0 50182^"Retry Attempt Interval"^8^0^2^0 50183^"Re-Registration Period"^8^0^2^0 50184^"Re-Registration Only With Traffic"^8^0^0^0 50185^"MN-HA Authenticator Calculator"^8^0^0^0 50186^"MN-HA RFC 2002 BIS Authentication"^8^0^0^0 50187^"Last MIP Status"^8^0^2^0 50188^"AN-AAA Authenticated"^8^0^0^0 50189^"Call List Type"^8^1^50014^0 50190^"Call Records"^16^0^4^0 50191^"ID"^16^0^4^0 50192^"Type"^8^1^50015^0 50193^"Data Bearer"^8^1^50002^0 50194^"Timestamp"^64^0^8^1 50196^"Total Duration"^64^0^8^0 50197^"Active Duration"^64^0^8^0 50198^"RX Byte Total"^64^0^8^0 50199^"TX Byte Total"^64^0^8^0 50201^"Phone Number Length"^8^0^2^0 50202^"Phone Number"^8^0^9^0 50203^"Call List Max Size"^16^0^4^0 50204^"Previous Call TX Byte Total"^64^0^8^0 50205^"Previous Call RX Byte Total"^64^0^8^0 50206^"Previous Data Session Duration"^64^0^8^0 50207^"Data Session Active Duration"^64^0^8^0 50208^"Previous Data Session Active Duration"^64^0^8^0 50209^"Duration"^1^0^0^0 50210^"Profile ID"^1^0^0^0 50211^"Profile Name"^1^0^0^0 50212^"PDP Type"^1^0^0^0 50213^"APN Name"^1^0^0^0 50214^"DNS Address"^1^0^0^0 50215^"Granted QoS"^1^0^0^0 50216^"Username"^1^0^0^0 50217^"Authentication Protocol"^1^0^0^0 50218^"IP Address"^1^0^0^0 50219^"Gateway Info"^1^0^0^0 50220^"IPv4 Subnet Mask"^32^0^6^1 50221^"Key State"^8^1^50016^0 50222^"Report MIP Status"^8^0^0^0 50223^"MIP Status"^8^0^2^0 50230^"Network Type"^8^1^50017^0 50231^"CDMA 1x"^1^0^0^0 50232^"CDMA 1x Ev-DO Rev. 0"^1^0^0^0 50233^"CDMA 1x Ev-DO Rev. A"^1^0^0^0 50234^"WCDMA"^1^0^0^0 50235^"GPRS"^1^0^0^0 50236^"HSDPA"^1^0^0^0 50237^"HSUPA"^1^0^0^0 50238^"EDGE"^1^0^0^0 50239^"CDMA 1x IS95"^1^0^0^0 50240^"CDMA 1x IS2000"^1^0^0^0 50241^"CDMA 1x IS2000 Rel. A"^1^0^0^0 50242^"CDMA 1x Ev-DO Rev. A DPA"^1^0^0^0 50243^"CDMA 1x Ev-DO Rev. A MFPA"^1^0^0^0 50244^"CDMA 1x Ev-DO Rev. A EMPA"^1^0^0^0 50245^"Extended Technology Preference"^16^1^50018^0 50246^"Call Type"^8^1^50019^0 50247^"IP Family"^8^1^50020^0 50248^"Call End Reason Type"^16^1^50025^0 50249^"Call End Reason Value"^16^0^4^0 50250^"Call End Reason"^16^1^50021^0 50251^"Call End Reason"^16^1^50022^0 50252^"Call End Reason"^16^1^50023^0 50253^"Call End Reason"^16^1^50024^0 50254^"P-CSCF Address Using PCO"^8^0^0^0 50255^"P-CSCF Address"^1^0^0^0 50256^"P-CSCF Server Address List"^1^0^0^0 50257^"P-CSCF Domain Name List"^1^0^0^0 50258^"MTU"^1^0^0^0 50259^"Domain Name List"^1^0^0^0 50260^"IP Family"^1^0^0^0 50261^"IM CN Flag"^1^0^0^0 50262^"Extended Technology"^1^0^0^0 50263^"Number Of Instances"^8^0^2^0 50264^"FQDN Length"^16^0^4^0 50265^"FQDN"^8^0^9^0 50266^"MTU"^32^0^6^0 50267^"Domain Name Length"^16^0^4^0 50268^"Domain Name"^8^0^9^0 50269^"IM CN"^8^0^0^0 50270^"Autoconnect Roam Setting"^8^1^50027^0 50271^"DNS Address"^8^0^2^0 50272^"IP Prefix Length"^8^0^2^0 50273^"LTE"^1^0^0^0 50274^"CDMA 1x Ev-DO Rev. A EMPA EHRPD"^1^0^0^0 50275^"IPv6 Address"^16^0^4^1 50276^"PDP Access Control Flag"^8^1^50028^0 50277^"P-CSCF Address Using DHCP"^8^0^0^0 50278^"Filter ID"^8^0^2^0 50279^"Evaluation ID"^8^0^2^0 50280^"IP Version"^8^1^50029^0 50281^"IP Source"^8^0^2^0 50282^"Source IP Mask"^8^0^2^0 50283^"Next Header"^8^0^2^0 50284^"Destination Port Range Start"^16^0^4^0 50285^"Destination Port Range End"^16^0^4^0 50286^"Source Port Range Start"^16^0^4^0 50287^"Source Port Range End"^16^0^4^0 50288^"IPSEC Security Parameter Index"^32^0^6^0 50289^"TOS Mask"^16^0^4^0 50290^"Flow Label"^32^0^6^0 50291^"PDP Context Number"^8^0^2^0 50292^"PDP Context Secondary Flag"^8^0^0^0 50293^"PDP Primary ID"^8^0^2^0 50294^"Signaling Indication"^8^0^0^0 50295^"Address Allocation Preference"^8^1^50030^0 50296^"QoS Class Identifier"^8^1^50031^0 50297^"Negotiate DNS Server Preference"^8^0^0^0 50298^"PPP Session Close Timer DO"^32^0^6^0 50299^"PPP Session Close Timer 1X"^32^0^6^0 50300^"Allow Linger"^8^0^0^0 50301^"Timeout"^16^0^4^0 50302^"Retry Count"^8^0^2^0 50303^"Authentication Protocol"^8^1^50032^0 50304^"Data Rate"^8^1^50033^0 50305^"Application Type"^32^1^50034^0 50306^"Data Mode"^8^1^50035^0 50307^"Application Priority"^8^0^2^0 50308^"PDN Type"^8^1^50036^0 50309^"P-CSCF Address Needed"^8^0^0^0 50310^"Extended Error Code"^16^1^50037^0 50311^"Number Of Addresses"^8^0^2^0 51000^"Report Power State"^8^0^0^0 51001^"Battery Level Lower Limit (%)"^8^0^2^0 51002^"Battery Level Upper Limit (%)"^8^0^2^0 51003^"Power Source"^1^1^50100^0 51004^"Battery Connected"^1^0^0^0 51005^"Battery Charging"^1^0^0^0 51006^"Power Fault"^1^0^0^0 51007^"Battery Level (%)"^8^0^2^0 51008^"Max TX Rate (bps)"^32^0^6^0 51009^"Max RX Rate (bps)"^32^0^6^0 51010^"Data Service Capability"^8^1^50101^0 51011^"SIM Supported"^8^0^0^0 51012^"Radio Interface Count"^8^0^2^0 51013^"Radio Interface"^8^1^50102^0 51014^"Device Manfacturer"^0^0^11^0 51015^"Device Model ID"^0^0^11^0 51016^"Device Revision ID"^0^0^11^0 51017^"Device Voice Number"^0^0^11^0 51018^"ESN"^0^0^11^0 51019^"IMEI"^0^0^11^0 51020^"MEID"^0^0^11^0 51021^"Report Activation State"^8^0^0^0 51022^"Activation State"^16^1^50103^0 51023^"Device Mobile ID Number"^0^0^11^0 51024^"Device Hardware Revision"^0^0^11^0 51025^"Operating Mode"^8^1^50104^0 51026^"Timestamp"^48^0^8^1 51027^"Source"^16^1^50105^0 51028^"PRL Version"^16^0^4^0 51030^"SPC"^48^0^9^0 51031^"SID"^16^0^4^0 51032^"MDN Length"^8^0^2^0 51033^"MDN"^8^0^9^0 51034^"MIN Length"^8^0^2^0 51035^"MIN"^8^0^9^0 51036^"PRL Length"^16^0^4^0 51037^"PRL"^8^0^2^1 51038^"MN-HA Length"^8^0^2^0 51039^"MN-HA"^8^0^9^0 51040^"MN-AAA Length"^8^0^2^0 51041^"MN-AAA"^8^0^9^0 51042^"Lock State"^8^1^50107^0 51043^"Lock Code"^32^0^9^0 51044^"Current Lock Code"^32^0^9^0 51045^"New Lock Code"^32^0^9^0 51046^"Data Length"^16^0^4^0 51047^"Data"^8^0^2^1 51048^"Code Length"^8^0^2^0 51049^"Code"^8^0^9^0 51050^"PIN ID"^8^0^2^0 51051^"PIN Enabled"^8^0^2^0 51052^"PIN Length"^8^0^2^0 51053^"PIN Value"^8^0^9^0 51054^"Remaining Verify Retries"^8^0^2^0 51055^"Remaining Unblock Retries"^8^0^2^0 51056^"PUK Length"^8^0^2^0 51057^"PUK Value"^8^0^9^0 51058^"Old PIN Length"^8^0^2^0 51059^"Old PIN Value"^8^0^9^0 51060^"New PIN Length"^8^0^2^0 51061^"New PIN Value"^8^0^9^0 51062^"PIN Status"^8^1^50108^0 51063^"Report PIN Status"^8^0^0^0 51064^"PRL Total Length"^16^0^4^0 51065^"PRL Segment Length"^16^0^4^0 51066^"PRL Segment ID"^8^0^2^0 51067^"Boot Code Revision ID"^0^0^11^0 51068^"UQCN Revision ID"^0^0^11^0 51069^"IMSI"^0^0^11^0 51070^"Host Image Mismatch"^1^0^2^0 51071^"UQCN Image Mismatch"^1^0^2^0 51072^"Incompatible UQCN"^1^0^2^0 51073^"ICCID"^0^0^11^0 51074^"Firmware ID"^32^0^6^0 51075^"Host Lock Code"^32^0^6^0 51076^"Platform Restricted"^8^0^0^0 51077^"Report Operating Mode"^8^0^0^0 51078^"Facility"^8^1^50109^0 51079^"Facility State"^8^1^50110^0 51080^"Control Key Length"^8^0^2^0 51081^"Control Key"^8^0^9^0 51082^"UQCN Copy Issue"^1^0^2^0 51083^"Report UIM State"^8^0^0^0 51084^"UIM State"^8^1^50111^0 51085^"Operation Blocking"^8^0^0^0 51090^"Number Of Images"^8^0^2^0 51091^"Image Type"^8^1^50112^0 51092^"Image ID"^8^0^2^1 51093^"Build ID Length"^8^0^2^0 51094^"Build ID"^8^0^9^0 51095^"Force Download"^8^0^0^0 51096^"Storage Index"^8^0^2^0 51097^"Maximum Build ID Length"^8^0^2^0 51098^"Number Of Image Types"^8^0^2^0 51099^"Maximum Number Of Images"^8^0^2^0 51100^"Index Of Executing Image"^8^0^2^0 51101^"Failure Count"^8^0^2^0 51110^"Band Class 0 - A System"^1^0^0^0 51111^"Band Class 0 - B System"^1^0^0^0 51112^"Band Class 1"^1^0^0^0 51113^"Band Class 2"^1^0^0^0 51114^"Band Class 3 - A System"^1^0^0^0 51115^"Band Class 4"^1^0^0^0 51116^"Band Class 5"^1^0^0^0 51117^"GSM DCS"^1^0^0^0 51118^"GSM Primary"^1^0^0^0 51119^"GSM Extended"^1^0^0^0 51120^"Band Class 6"^1^0^0^0 51121^"Band Class 7"^1^0^0^0 51122^"Band Class 8"^1^0^0^0 51123^"Band Class 9"^1^0^0^0 51124^"Band Class 10"^1^0^0^0 51125^"Band Class 11"^1^0^0^0 51126^"GSM 450"^1^0^0^0 51127^"GSM 480"^1^0^0^0 51128^"GSM 750"^1^0^0^0 51129^"GSM 850"^1^0^0^0 51130^"GSM Railways"^1^0^0^0 51131^"GSM PCS"^1^0^0^0 51132^"WCDMA 2100I"^1^0^0^0 51133^"WCDMA PCS 1900"^1^0^0^0 51134^"WCDMA DCS 1800"^1^0^0^0 51135^"WCDMA 1700 (US)"^1^0^0^0 51136^"WCDMA 850"^1^0^0^0 51137^"WCDMA 800"^1^0^0^0 51138^"Band Class 12"^1^0^0^0 51139^"Band Class 14"^1^0^0^0 51140^"Band Class 15"^1^0^0^0 51141^"WCDMA 2600"^1^0^0^0 51142^"WCDMA 900"^1^0^0^0 51143^"WCDMA 1700 (Japan)"^1^0^0^0 51144^"Band Class 16"^1^0^0^0 51145^"Band Class 17"^1^0^0^0 51146^"Band Class 18"^1^0^0^0 51147^"Band Class 19"^1^0^0^0 51148^"Report Wireless Disable State"^8^0^0^0 51149^"Wireless Disable On"^8^0^0^0 51150^"Factory Serial Number"^0^0^11^0 51151^"Alternate Enabled"^8^0^0^0 51152^"Time In Milliseconds"^64^0^8^0 51153^"Time Reference"^32^1^50113^0 51154^"Boot Major Version"^16^0^4^0 51155^"Boot Minor Version"^16^0^4^0 51156^"PRI Version"^32^0^6^1 51157^"PRI Info"^256^0^9^0 51158^"OEM Lock ID"^32^0^6^1 51159^"BAR Mode"^8^0^0^0 52000^"Report Signal Strength"^8^0^0^0 52001^"Number Of Thresholds"^8^0^2^0 52002^"Signal Strength Threshold (dBm)"^8^0^1^0 52003^"Signal Strength (dBm)"^8^0^1^0 52004^"Radio Interface"^8^1^50200^0 52005^"Number Of Info Instances"^16^0^4^0 52006^"Mobile Country Code"^16^0^4^0 52007^"Mobile Network Code"^16^0^4^0 52008^"In Use Status"^2^1^50201^0 52009^"Roaming Status"^2^1^50202^0 52010^"Forbidden Status"^2^1^50203^0 52011^"Preferred Status"^2^1^50204^0 52012^"Description Length"^8^0^2^0 52013^"Description"^8^0^9^0 52014^"Register Action"^8^1^50205^0 52015^"Radio Access Technology"^8^1^50206^0 52016^"PS Attach Action"^8^1^50207^0 52017^"Registration State"^8^1^50208^0 52018^"CS Attach State"^8^1^50209^0 52019^"PS Attach State"^8^1^50209^0 52020^"Registered Network"^8^1^50210^0 52021^"Number Of Radio Interfaces In Use"^8^0^2^0 52022^"Roaming Indicator"^8^1^50211^0 52023^"Number Of Preferred Networks"^16^0^4^0 52024^"GSM Compact"^1^0^0^0 52025^"GSM"^1^0^0^0 52026^"UMTS"^1^0^0^0 52027^"Number Of Forbidden Networks"^16^0^4^0 52028^"System ID"^16^0^4^0 52029^"Network ID"^16^0^4^0 52032^"Duration"^8^1^50212^0 52033^"ACCOLC"^8^0^2^0 52034^"SPC"^48^0^9^0 52035^"Technology"^2^1^50213^0 52036^"Analog"^1^0^2^0 52037^"Digital"^1^0^2^0 52038^"EV-DO"^1^0^2^0 52039^"GSM"^1^0^2^0 52040^"WCDMA"^1^0^2^0 52041^"Number Of Data Capabilities"^8^0^2^0 52042^"Data Capability"^8^1^50214^0 52043^"System Preference"^8^1^50215^0 52044^"Slot Cycle Index"^8^0^2^0 52045^"Station Class Mark"^8^0^2^0 52046^"Register On Home System"^8^0^0^0 52047^"Register On Foreign System"^8^0^0^0 52048^"Register On Foreign Network"^8^0^0^0 52049^"Force CDMA 1xEV-DO Rev. 0"^8^0^0^0 52050^"CDMA 1xEV-DO SCP Custom Config"^8^0^0^0 52051^"Subtype 2 Physical Layer"^1^0^0^0 52052^"Enhanced CC MAC"^1^0^0^0 52053^"Enhanced AC MAC"^1^0^0^0 52054^"Enhanced FTC MAC"^1^0^0^0 52055^"Subtype 3 RTC MAC"^1^0^0^0 52056^"Subtype 1 RTC MAC"^1^0^0^0 52057^"Enhanced Idle"^1^0^0^0 52058^"Generic Multimode Capable Disc Port"^1^0^0^0 52059^"Generic Broadcast"^1^0^0^0 52060^"SN Multiflow Packet Application"^1^0^0^0 52061^"SN Enhanced Multiflow Packet Application"^1^0^0^0 52062^"Roam Preference"^8^1^50216^0 52063^"Active Band Class"^16^1^50217^0 52064^"Active Channel"^16^0^4^0 52065^"Report RF Info"^8^0^0^0 52066^"Report LU Reject"^8^0^0^0 52067^"Number Of Instances"^8^0^2^0 52068^"Service Domain"^8^1^50218^0 52069^"Reject Cause"^16^0^4^0 52070^"AN-AAA Authentication Status"^8^1^50219^0 52080^"Report RSSI"^8^0^0^0 52081^"RSSI Delta"^8^0^2^0 52082^"Report ECIO"^8^0^0^0 52083^"ECIO Delta"^8^0^2^0 52084^"Report IO"^8^0^0^0 52085^"IO Delta"^8^0^2^0 52086^"Report SINR"^8^0^0^0 52087^"SINR Delta"^8^0^2^0 52088^"Report Error Rate"^8^0^0^0 52089^"RSSI"^8^0^2^0 52090^"ECIO"^8^0^2^0 52091^"IO"^32^0^6^0 52092^"SINR"^8^1^50220^0 52093^"Error Rate"^16^0^4^0 52094^"Report System Select"^8^0^0^0 52095^"Report DDTM"^8^0^0^0 52096^"Report Serving System"^8^0^0^0 52097^"Number Of Measurements"^16^0^4^0 52098^"Base Station ID"^16^0^4^0 52099^"Latitude"^32^0^5^0 52100^"Longitude"^32^0^5^0 52101^"Leap Seconds"^8^0^2^0 52102^"Local Time Offset"^8^0^1^0 52103^"Daylight Savings In Effect"^8^0^0^0 52104^"Protocol Revision"^8^0^2^0 52105^"Emergency Mode On"^8^0^0^0 52106^"CDMA 1x"^1^0^0^0 52107^"CDMA 1xEV-DO"^1^0^0^0 52108^"GSM"^1^0^0^0 52109^"UMTS"^1^0^0^0 52110^"Band Class 0 - A System"^1^0^0^0 52111^"Band Class 0 - B System"^1^0^0^0 52112^"Band Class 1"^1^0^0^0 52113^"Band Class 2"^1^0^0^0 52114^"Band Class 3 - A System"^1^0^0^0 52115^"Band Class 4"^1^0^0^0 52116^"Band Class 5"^1^0^0^0 52117^"GSM DCS"^1^0^0^0 52118^"GSM Primary"^1^0^0^0 52119^"GSM Extended"^1^0^0^0 52120^"Band Class 6"^1^0^0^0 52121^"Band Class 7"^1^0^0^0 52122^"Band Class 8"^1^0^0^0 52123^"Band Class 9"^1^0^0^0 52124^"Band Class 10"^1^0^0^0 52125^"Band Class 11"^1^0^0^0 52126^"GSM 450"^1^0^0^0 52127^"GSM 480"^1^0^0^0 52128^"GSM 750"^1^0^0^0 52129^"GSM 850"^1^0^0^0 52130^"GSM Railways"^1^0^0^0 52131^"GSM PCS"^1^0^0^0 52132^"WCDMA 2100I"^1^0^0^0 52133^"WCDMA PCS 1900"^1^0^0^0 52134^"WCDMA DCS 1800"^1^0^0^0 52135^"WCDMA 1700 (US)"^1^0^0^0 52136^"WCDMA 850"^1^0^0^0 52137^"WCDMA 800"^1^0^0^0 52138^"Band Class 12"^1^0^0^0 52139^"Band Class 14"^1^0^0^0 52140^"Band Class 15"^1^0^0^0 52141^"WCDMA 2600"^1^0^0^0 52142^"WCDMA 900"^1^0^0^0 52143^"WCDMA 1700 (Japan)"^1^0^0^0 52144^"Band Class 16"^1^0^0^0 52145^"Band Class 17"^1^0^0^0 52146^"Band Class 18"^1^0^0^0 52147^"Band Class 19"^1^0^0^0 52148^"PRL Preference"^16^1^50221^0 52149^"Roaming Preference"^16^1^50222^0 52150^"DDTM Preference"^8^1^50223^0 52151^"Suppress L2 ACK"^1^0^0^0 52152^"Suppress 1x Registrations"^1^0^0^0 52153^"Ignore Service Option Pages"^1^0^0^0 52154^"Block Mobile Originated SMS And DBM"^1^0^0^0 52155^"Service Option Action"^8^1^50224^0 52156^"Service Option"^16^0^4^0 52157^"Query RSSI"^1^0^0^0 52158^"Query ECIO"^1^0^0^0 52159^"Query IO"^1^0^0^0 52160^"Query SINR"^1^0^0^0 52161^"Query Error Rate"^1^0^0^0 52162^"Display Network Description"^8^1^50225^0 52163^"Network Description Encoding"^8^1^50226^0 52164^"Network Description Length"^8^0^2^0 52165^"Network Description"^8^0^2^1 52166^"PLMN Changed"^8^0^0^0 52167^"Restrict Manual PLMN Selection"^8^0^0^0 52168^"SPN Encoding"^8^1^50227^0 52169^"SPN Length"^8^0^2^0 52170^"SPN"^8^0^2^1 52171^"PLMN Short Encoding"^8^1^50227^0 52172^"PLMN Short Country Initials"^8^1^50228^0 52173^"PLMN Spare Bits"^8^1^50229^0 52174^"PLMN Short Length"^8^0^2^0 52175^"PLMN Short"^8^0^2^1 52176^"PLMN Long Encoding"^8^1^50227^0 52177^"PLMN Long Country Initials"^8^1^50228^0 52178^"PLMN Long Bits"^8^1^50229^0 52179^"PLMN Long Length"^8^0^2^0 52180^"PLMN Long"^8^0^2^1 52181^"RSRQ"^8^0^1^0 52182^"Change Duration"^8^1^50230^0 52183^"Report RSRQ"^8^0^0^0 52184^"RSRQ Delta"^8^0^2^0 53000^"Report New MT Messages"^8^0^0^0 53001^"Storage Type"^8^1^50300^0 53002^"Storage Index"^32^0^6^0 53003^"Message Format"^8^1^50301^0 53004^"Raw Message Length"^16^0^4^0 53005^"Raw Message"^8^0^2^1 53006^"Cause Code"^16^0^4^0 53007^"Message Tag"^8^1^50302^0 53008^"Mode"^8^1^50303^0 53009^"Number Of Messages"^32^0^6^0 53010^"Number Of Routes"^16^0^4^0 53011^"Message Type"^8^1^50304^0 53012^"Message Class"^8^1^50305^0 53013^"Receipt Action"^8^1^50306^0 53014^"Route Value"^8^1^50307^0 53015^"SMSC Address Type"^24^0^9^0 53016^"SMSC Address Length"^8^0^2^0 53017^"SMSC Address"^8^0^9^0 53018^"SMSC Address Type"^8^0^11^0 53019^"SMSC Address"^8^0^11^0 53020^"ACK Required"^8^0^0^0 53021^"Transaction ID"^32^0^6^0 53022^"Force Send On DC"^8^0^0^0 53023^"Service Option"^8^1^50308^0 53024^"Do Not Disconnect DC"^8^0^0^0 53025^"Link Timer In Seconds"^8^0^2^0 53026^"Error Class"^8^1^50309^0 53027^"GSM/WCDMA RP Cause"^16^0^4^0 53028^"GSM/WCDMA TP Cause"^8^0^2^0 53029^"Transfer Status Reports"^8^0^0^0 53030^"Max Storage Size In Messages"^32^0^6^0 53031^"Free Storage Size In Messages"^32^0^6^0 53032^"Processed Successfully"^8^0^0^0 53033^"Error Class"^8^1^50310^0 53034^"Transport Layer Status"^8^0^2^0 53035^"GSM/WCDMA RP Cause"^8^0^2^0 53036^"Retry Period In Seconds"^32^0^6^0 53037^"Retry Interval In Seconds"^32^0^6^0 53038^"DC Disconnect Timer In Seconds"^32^0^6^0 53039^"Memory Is Available"^8^0^0^0 53040^"Activate Broadcast"^8^0^0^0 53041^"Number Of Instances"^16^0^4^0 53042^"Message ID Start"^16^0^4^0 53043^"Message ID End"^16^0^4^0 53044^"Selected"^8^0^0^0 53045^"Service Category"^16^0^4^0 53046^"Language"^16^0^4^0 53047^"Activated"^8^0^0^0 53048^"Domain Preference"^8^1^50311^0 53049^"Message ID"^16^0^4^0 54000^"Report NMEA Sentences"^8^0^0^0 54001^"NMEA Sentence"^0^0^11^0 54002^"Service Enabled"^8^0^0^0 54003^"Tracking Session State"^8^1^50400^0 54004^"Session Control"^8^1^50401^0 54005^"Session Type"^8^1^50402^0 54006^"Session Operation"^8^1^50403^0 54007^"Server Option"^8^1^50404^0 54008^"Timeout In Seconds"^8^0^2^0 54009^"Session Fix Requests"^32^0^6^0 54010^"Fix Request Interval In Seconds"^32^0^6^0 54011^"Desired Accuracy In Meters"^32^0^6^0 54012^"GGA NMEA Sentences"^1^0^0^0 54013^"RMC NMEA Sentences"^1^0^0^0 54014^"GSV NMEA Sentences"^1^0^0^0 54015^"GSA NMEA Sentences"^1^0^0^0 54016^"VTG NMEA Sentences"^1^0^0^0 54017^"Output Device"^8^1^50405^0 54018^"NMEA Reporting"^8^1^50406^0 54019^"System Time"^64^0^8^0 54020^"System Discontinuties"^16^0^4^0 54021^"Automatic Download Enabled"^8^0^0^0 54022^"Download Interval In Hours"^16^0^4^0 54023^"Medium Preferences"^8^0^2^0 54024^"Medium Preference"^8^1^50407^0 54025^"WWAN Network Preference"^8^1^50408^0 54026^"Valid Period - GPS Start Week"^16^0^4^0 54027^"Valid Period - GPS Start Week Offset In Minutes"^16^0^4^0 54028^"Valid Period - Duration In Hours"^16^0^4^0 54029^"Server Address"^8^0^2^0 54030^"Server Port"^32^0^6^0 54031^"Auto-Tracking Enabled"^8^0^0^0 54032^"Reset EPH"^1^0^0^0 54033^"Reset ALM"^1^0^0^0 54034^"Reset POS"^1^0^0^0 54035^"Reset TIME"^1^0^0^0 54036^"Reset IONO"^1^0^0^0 54037^"Reset UTC"^1^0^0^0 54038^"Reset HEALTH"^1^0^0^0 54039^"Reset SVDIR"^1^0^0^0 54040^"Reset SVSTEER"^1^0^0^0 54041^"Reset SADATA"^1^0^0^0 54042^"Reset RTI"^1^0^0^0 54043^"Reset ALM CORR"^1^0^0^0 54044^"Reset FREQ BIAS EST"^1^0^0^0 54045^"Reset POS"^1^0^0^0 54046^"Reset LATEST GPS POS"^1^0^0^0 54047^"Reset OTA POS"^1^0^0^0 54048^"Reset EXT REF POS"^1^0^0^0 54049^"Reset TIMETAG"^1^0^0^0 54050^"Reset CELLID"^1^0^0^0 54051^"Reset CACHED CELLID"^1^0^0^0 54052^"Reset LAST SRV CELL"^1^0^0^0 54053^"Reset CUR SRV CELL"^1^0^0^0 54054^"Reset NEIGHBOR INFO"^1^0^0^0 54055^"Report NMEA Sentences Plus Mode"^8^0^0^0 54056^"NMEA Sentence Operating Mode"^8^1^50409^0 54057^"NMEA Sentence Length"^16^0^4^0 54058^"NMEA Sentence"^8^0^9^0 54100^"Report Raw Position Data"^8^0^0^0 54101^"Report External XTRA Data Requests"^8^0^0^0 54102^"Report External Time Injections"^8^0^0^0 54103^"Report External Wi-Fi Requests"^8^0^0^0 54104^"Report Satellite Info"^8^0^0^0 54105^"Report VX Network Initiated Prompts"^8^0^0^0 54106^"Report SUPL Network Initiated Prompts"^8^0^0^0 54107^"Report UMTS CP Network Initiated Prompts"^8^0^0^0 54108^"Report PDS Comm Events"^8^0^0^0 54109^"Session Status"^8^1^50410^0 54110^"Timestamp Calendar Valid"^1^0^0^0 54111^"Timestamp UTC Valid"^1^0^0^0 54112^"Leap Seconds Valid"^1^0^0^0 54113^"Time Uncertainty Valid"^1^0^0^0 54114^"Latitude Valid"^1^0^0^0 54115^"Longitude Valid"^1^0^0^0 54116^"Ellipsoid Altitude Valid"^1^0^0^0 54117^"Mean Sea Level Altitude Valid"^1^0^0^0 54118^"Horizontal Speed Valid"^1^0^0^0 54119^"Vertical Speed Valid"^1^0^0^0 54120^"Heading Valid"^1^0^0^0 54121^"Horizontal Uncertainty Circular Valid"^1^0^0^0 54122^"Horizontal Uncertainty Ellipse Semi-Major Valid"^1^0^0^0 54123^"Horizontal Uncertainty Ellipse Semi-Minor Valid"^1^0^0^0 54124^"Horizontal Uncertainty Ellipse Orient Azimuth Valid"^1^0^0^0 54125^"Vertical Uncertainty Valid"^1^0^0^0 54126^"Horizontal Velocity Uncertainty Valid"^1^0^0^0 54127^"Vertical Velocity Uncertainty Valid"^1^0^0^0 54128^"Horizontal Confidence Valid"^1^0^0^0 54129^"Position DOP Valid"^1^0^0^0 54130^"Horizontal DOP Valid"^1^0^0^0 54131^"Vertical DOP Valid"^1^0^0^0 54132^"Operating Mode Used Valid"^1^0^0^0 54133^"Calendar Year"^16^0^4^0 54134^"Calendar Month"^8^1^50411^0 54135^"Calendar Day"^8^1^50412^0 54136^"Calendar Day Of Month"^8^0^2^0 54137^"Calendar Hour"^8^0^2^0 54138^"Calendar Minute"^8^0^2^0 54139^"Calendar Second"^8^0^2^0 54140^"Calendar Millisecond"^16^0^4^0 54141^"Calendar Leap Seconds"^8^0^2^0 54142^"UTC Timestamp"^64^0^8^1 54143^"UTC Timestamp Uncertainty"^32^0^6^0 54144^"Latitude"^64^0^14^0 54145^"Longitude"^64^0^14^0 54146^"Ellipsoid Altitude"^32^0^13^0 54147^"Mean Sea Level Altitude"^32^0^13^0 54148^"Horizontal Speed"^32^0^13^0 54149^"Vertical Speed"^32^0^13^0 54150^"Heading"^32^0^13^0 54151^"Horizontal Uncertainty Circular"^32^0^13^0 54152^"Horizontal Uncertainty Ellipse Semi-Major"^32^0^13^0 54153^"Horizontal Uncertainty Ellipse Semi-Minor"^32^0^13^0 54154^"Horizontal Uncertainty Ellipse Orient Azimuth"^32^0^13^0 54155^"Vertical Uncertainty"^32^0^13^0 54156^"Horizontal Velocity Uncertainty"^32^0^13^0 54157^"Vertical Velocity Uncertainty"^32^0^13^0 54158^"Horizontal Confidence"^8^0^2^0 54159^"Position DOP "^32^0^13^0 54160^"Horizontal DOP"^32^0^13^0 54161^"Vertical DOP"^32^0^13^0 54162^"Operating Mode"^8^1^50409^0 54163^"Maximum File Size"^16^0^4^0 54164^"URL Record Count"^8^0^2^0 54165^"URL Length"^8^0^2^0 54166^"URL"^8^0^9^0 54167^"Delay Threshold"^32^0^6^0 54168^"Wi-Fi Request Type"^8^1^50413^0 54169^"Wi-Fi Request Time Between Fixes"^16^0^4^0 54170^"Iono Valid"^1^0^0^0 54171^"Satellite Count Valid"^1^0^0^0 54172^"Satellite List Valid"^1^0^0^0 54173^"Ionospheric Corrections"^8^0^0^0 54174^"SV Record Count"^8^0^2^0 54175^"System Valid"^1^0^0^0 54176^"PRN Valid"^1^0^0^0 54177^"Health Status Valid"^1^0^0^0 54178^"Process Status Valid"^1^0^0^0 54179^"Ephemeris State Valid"^1^0^0^0 54180^"Almanac State Valid"^1^0^0^0 54181^"Elevation Valid"^1^0^0^0 54182^"Azimuth Valid"^1^0^0^0 54183^"CN0 Valid"^1^0^0^0 54184^"System"^8^1^50414^0 54185^"PRN"^8^0^2^0 54186^"Health Level"^8^1^50415^0 54187^"Processing Status"^8^1^50416^0 54188^"Ephemeris State"^8^1^50417^0 54189^"Almanac State"^8^1^50418^0 54190^"Azimuth"^16^0^4^0 54191^"CN0"^16^0^4^0 54192^"Privacy Valid"^1^0^0^0 54193^"QoS Valid"^1^0^0^0 54194^"Count Valid"^1^0^0^0 54195^"Interval Valid"^1^0^0^0 54196^"Mode Valid"^1^0^0^0 54197^"Requestor ID Valid"^1^0^0^0 54198^"Privacy"^8^1^50419^0 54199^"QoS"^8^0^2^0 54200^"Position Count"^32^0^6^0 54201^"Interval Between Fixes"^32^0^6^0 54202^"Mode"^8^1^50420^0 54203^"Requestor ID DCS"^8^1^50421^0 54204^"Requestor ID Length"^8^0^2^0 54205^"Requestor ID"^8^0^2^1 54206^"Privacy Valid"^1^0^0^0 54207^"INIT Hash Valid"^1^0^0^0 54208^"Mode Valid"^1^0^0^0 54209^"SLP Session ID Valid"^1^0^0^0 54210^"SLP Server IPv4 Address Valid"^1^0^0^0 54211^"SLP Server IPv6 Address Valid"^1^0^0^0 54212^"SLP Server URL Address Valid"^1^0^0^0 54213^"DCS Valid"^1^0^0^0 54214^"Requestor ID Valid"^1^0^0^0 54215^"Client Name Valid"^1^0^0^0 54216^"QoP Horizontal Accuracy Valid"^1^0^0^0 54217^"QoP Vertical Accuracy Valid"^1^0^0^0 54218^"QoP Max Location Age Valid"^1^0^0^0 54219^"QoP Delay Valid"^1^0^0^0 54220^"Privacy"^8^1^50419^0 54221^"INIT Hash"^64^0^8^1 54222^"Mode"^8^1^50422^0 54223^"SLP Session ID"^32^0^6^0 54224^"SLP Server IPv4 Port"^32^0^6^0 54225^"SLP Server IPv4 Address"^8^0^2^0 54226^"SLP Server IPv6 Address"^8^0^2^0 54227^"SLP Server URL Length"^8^0^2^0 54228^"SLP Server URL Address"^8^0^9^0 54229^"Request DCS"^8^1^50423^0 54230^"Requestor ID DCS"^8^1^50424^0 54231^"Requestor ID Length"^8^0^2^0 54232^"Requestor ID"^8^0^2^1 54233^"Client Name DCS"^8^1^50424^0 54234^"Client Name Length"^8^0^2^0 54235^"Client Name"^8^0^2^1 54236^"QoP Horizontal Accuracy"^8^0^2^0 54237^"QoP Vertical Accuracy"^8^0^2^0 54238^"QoP Max Location Age"^8^0^2^0 54239^"QoP Delay"^8^0^2^0 54250^"Privacy Valid"^1^0^0^0 54251^"Invoke ID Valid"^1^0^0^0 54252^"Notification Text Valid"^1^0^0^0 54253^"Client Address Valid"^1^0^0^0 54254^"Location Type Valid"^1^0^0^0 54255^"Requestor ID Valid"^1^0^0^0 54256^"Codeword String Valid"^1^0^0^0 54257^"Service Type ID Valid"^1^0^0^0 54258^"Privacy"^8^1^50419^0 54259^"Invoke ID"^8^0^2^0 54260^"Notification Text DCS"^8^1^50425^0 54261^"Notification Text Length"^8^0^2^0 54262^"Notification Text"^8^0^2^1 54263^"Client Address Length"^8^0^2^0 54264^"Client Address"^8^0^9^0 54265^"Location Type"^8^1^50426^0 54266^"Requestor ID DCS"^8^1^50425^0 54267^"Requestor ID Length"^8^0^2^0 54268^"Requestor ID"^8^0^2^1 54269^"Codeword DCS"^8^1^50425^0 54270^"Codeword Length"^8^0^2^0 54271^"Codeword"^8^0^2^1 54272^"Service Type ID"^8^0^2^0 54273^"Type"^8^1^50427^0 54274^"Protocol/Data Type"^8^1^50428^0 54275^"Embedded XTRA Data Client Enabled"^8^0^0^0 54276^"Embedded XTRA Time Client Enabled"^8^0^0^0 54277^"Service Major Version"^8^0^2^0 54278^"Service Minor Version"^8^0^2^0 54279^"Sequence Number"^8^0^2^0 54280^"Total Length"^16^0^4^0 54281^"Sequence Length"^16^0^4^0 54282^"Data"^8^0^2^1 54283^"Vertical Confidence"^8^0^2^0 54284^"Source"^8^1^50429^0 54285^"Wi-Fi Time Counter"^32^0^6^0 54286^"Wi-Fi Latitude"^32^0^5^0 54287^"Wi-Fi Longitude"^32^0^5^0 54288^"HEPE In Meters"^16^0^4^0 54289^"AP Count"^8^0^2^0 54290^"Error Code"^8^0^2^0 54291^"MAC Address"^8^0^2^1 54292^"RSSI"^32^0^6^0 54293^"Beacon Channel"^16^0^4^0 54294^"State"^8^1^50430^0 54295^"Enable SBAS"^8^0^0^0 54296^"Allow Request"^8^0^0^0 54297^"Timestamp"^64^0^8^0 54298^"Time Uncertainty"^32^0^6^0 54299^"Time Base"^8^1^50431^0 54300^"Force Acceptance"^8^0^0^0 54301^"Filename Length"^8^0^2^0 54302^"Filename"^8^0^9^0 54303^"File Operation"^8^1^50432^0 54304^"Data Length"^32^0^6^0 54305^"Part Number"^8^0^2^0 54306^"Total Parts"^8^0^2^0 54307^"Data"^8^0^2^1 54308^"Data Power Optimization Enabled"^8^0^0^0 54309^"Enable Data Power Optimization"^8^0^0^0 54310^"On Demand Positioning"^8^1^50433^0 54311^"Position Valid"^1^0^0^0 54312^"Altitude/Vertical Uncertainty Valid"^1^0^0^0 54313^"Time Milliseconds Valid"^1^0^0^0 54314^"Time Week Number Valid"^1^0^0^0 54315^"Time Uncertainty Valid"^1^0^0^0 54316^"Iono Valid"^1^0^0^0 54317^"GPS Ephemeris Valid"^1^0^0^0 54318^"GPS Almanac Valid"^1^0^0^0 54319^"GPS Health Valid"^1^0^0^0 54320^"GPS Visible SVs Valid"^1^0^0^0 54321^"Glonass Ephemeris Valid"^1^0^0^0 54322^"Glonass Almanac Valid"^1^0^0^0 54323^"Glonass Health Valid"^1^0^0^0 54324^"Glonass Visible SVs Valid"^1^0^0^0 54325^"SBAS Ephemeris Valid"^1^0^0^0 54326^"SBAS Almanac Valid"^1^0^0^0 54327^"SBAS Health Valid"^1^0^0^0 54328^"SBAS Visible SVs Valid"^1^0^0^0 54329^"XTRA Information Valid"^1^0^0^0 54330^"Timestamp In TOW Milliseconds"^32^0^6^0 54331^"GPS Week Number"^16^0^4^0 54332^"Iono Is Valid"^8^0^0^0 54333^"GPS Ephemeris SV Mask"^32^0^6^1 54334^"GPS Almanac SV Mask"^32^0^6^1 54335^"GPS Health SV Mask"^32^0^6^1 54336^"GPS Visible SV Mask"^32^0^6^1 54337^"Glonass Ephemeris SV Mask"^32^0^6^1 54338^"Glonass Almanac SV Mask"^32^0^6^1 54339^"Glonass Health SV Mask"^32^0^6^1 54340^"Glonass Visible SV Mask"^32^0^6^1 54341^"SBAS Ephemeris SV Mask"^32^0^6^1 54342^"SBAS Almanac SV Mask"^32^0^6^1 54343^"SBAS Health SV Mask"^32^0^6^1 54344^"SBAS Visible SV Mask"^32^0^6^1 54345^"XTRA GPS Start Week"^16^0^4^0 54346^"XTRA GPS Start Minutes"^16^0^4^0 54347^"XTRA GPS Valid Hours"^16^0^4^0 54348^"Elevation"^32^0^13^0 54349^"SLP Server IPv6 Port"^32^0^6^0 54350^"Used For Position"^1^0^0^0 54351^"Hidden SSID"^1^0^0^0 54352^"Encryption On"^1^0^0^0 54353^"Infrastructure Mode"^1^0^0^0 54354^"Engine Enabled"^8^0^0^0 54355^"Method State"^8^1^50434^0 54356^"Network Mode"^8^1^50435^0 55000^"SMS Wake Enabled"^8^0^0^0^-1^0 55001^"Mask"^32^0^6^1^-1^0 56000^"Display Text"^1^0^0^0^-1^0 56001^"Get Inkey"^1^0^0^0^-1^0 56002^"Get Input"^1^0^0^0^-1^0 56003^"Setup Menu"^1^0^0^0^-1^0 56004^"Select Item"^1^0^0^0^-1^0 56005^"Send SMS Alpha Identifier"^1^0^0^0^-1^0 56006^"Setup Event User Activity"^1^0^0^0^-1^0 56007^"Setup Event Idle Screen Notify"^1^0^0^0^-1^0 56008^"Setup Event Language Sel Notify"^1^0^0^0^-1^0 56009^"Setup Idle Mode Text"^1^0^0^0^-1^0 56010^"Language Notification"^1^0^0^0^-1^0 56011^"Refresh"^1^0^0^0^-1^0 56012^"End Proactive Session"^1^0^0^0^-1^0 56013^"Reference ID"^32^0^6^1^-1^0 56014^"Command Length"^16^0^4^0^-1^0 56015^"Display Text Command"^8^0^2^1^-1^0 56016^"Get Inkey Command"^8^0^2^1^-1^0 56017^"Get Input Command"^8^0^2^1^-1^0 56018^"Setup Menu Command"^8^0^2^1^-1^0 56019^"Select Item Command"^8^0^2^1^-1^0 56020^"Alpha ID Command Type"^8^1^50600^1^-1^0 56021^"Alpha ID Length"^16^0^4^0^-1^0 56022^"Alpha ID"^8^0^2^1^-1^0 56023^"User Activity Notify"^1^0^0^0^-1^0 56024^"Idle Screen Available"^1^0^0^0^-1^0 56025^"Language Selection Notify"^1^0^0^0^-1^0 56026^"Setup Idle Mode Text Command"^8^0^2^1^-1^0 56027^"Language Notification Command"^8^0^2^1^-1^0 56028^"Refresh Mode"^16^0^4^1^-1^0 56029^"Refresh Stage"^16^1^50601^1^-1^0 56030^"Proactive Session End Type"^8^1^50602^1^-1^0 56031^"Terminal Response Length"^16^0^4^0^-1^0 56032^"Terminal Response"^8^0^2^1^-1^0 56033^"Envelope Command Type"^16^1^50005^0^-1^0 56034^"Envelope Length"^16^0^4^0^-1^0 56035^"Envelope Data"^8^0^2^1^-1^0 56036^"Envelope Command Type"^16^1^50603^0^-1^0 57000^"EAP-SIM"^1^0^0^0^-1^0 57001^"EAP-AKA"^1^0^0^0^-1^0 57002^"EAP Request Packet"^8^0^2^1^-1^0 57003^"Response Packet"^8^0^2^1^-1^0 57005^"Session Keys"^8^0^2^1^-1^0 57006^"Result"^8^1^50700^0^-1^0 58000^"Report Network Initiated Alerts"^8^0^0^0^-1^0 58001^"Report Session Status"^8^0^0^0^-1^0 58002^"Session Type"^8^1^50800^0^-1^0 58003^"Session ID"^16^0^4^0^-1^0 58004^"Session State"^8^1^50801^0^-1^0 58005^"Session Failure"^8^1^50802^0^-1^0 58006^"Retry Count"^8^0^2^0^-1^0 58007^"Retry Pause Timer"^16^0^4^0^-1^0 58008^"Remaining Time"^16^0^4^0^-1^0 58009^"Selection"^8^1^50803^0^-1^0 58010^"Device Provisioning Service Update Enabled"^8^0^0^0^-1^0 58011^"PRL Service Update Enabled"^8^0^0^0^-1^0 58012^"HFA Feature Enabled"^8^0^0^0^-1^0 58013^"HFA Feature Done State"^8^1^50804^0^-1^0 59000^"Instance ID"^8^0^2^0^-1^0 59001^"Link ID"^16^0^4^0^-1^0 59002^"Service Count"^8^0^2^0^-1^0 59003^"Service Type"^8^1^50900^0^-1^0 59004^"Major Version"^16^0^4^0^-1^0 59005^"Minor Version"^16^0^4^0^-1^0 59006^"Addendum Label Length"^8^0^2^0^-1^0 59007^"Addendum Label"^8^0^9^0^-1^0 59008^"Client ID"^8^0^2^0^-1^0 59009^"Data Format"^8^1^50901^0^-1^0 59010^"Link Protocol - 802.3"^1^0^0^0^-1^0 59011^"Link Protocol - IP"^1^0^0^0^-1^0 59012^"Report Power State Changes"^8^0^0^0^-1^0 59013^"Current Power Save State"^32^1^50902^0^-1^0 59014^"Previous Power Save State"^32^1^50902^0^-1^0 59015^"Message ID"^16^0^4^0^-1^0 70000^"USS DCS"^8^1^70000^0^-1^0 70001^"USS Length"^8^0^2^0^-1^0 70002^"USS Data"^8^0^2^1^-1^0 70003^"Failure Cause"^16^0^4^1^-1^0 70004^"Alpha DCS"^8^1^70001^0^-1^0 70005^"Alpha Length"^8^0^2^0^-1^0 70006^"Alpha Data"^8^0^2^1^-1^0 70007^"Notification Type"^8^1^70002^0^-1^0libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/Makefile.am000066400000000000000000000005151455567757300245660ustar00rootroot00000000000000noinst_LTLIBRARIES = libQMIDB.la DBFILES = \ $(srcdir)/Entity.txt \ $(srcdir)/EnumEntry.txt \ $(srcdir)/Enum.txt \ $(srcdir)/Field.txt \ $(srcdir)/Struct.txt QMIDB.o: $(DBFILES) $(LD) -r -b binary -o QMIDB.o $(DBFILES) libQMIDB_la_SOURCES = foo.c libQMIDB_la_LIBADD = QMIDB.o CLEANFILES = QMIDB.o EXTRA_DIST = $(DBFILES) libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/Struct.txt000077500000000000000000001072401455567757300245650ustar00rootroot0000000000000050000^0^0^50000^""^-1^0^"" 50000^1^0^50001^""^-1^0^"" 50001^0^0^50002^""^-1^0^"" 50010^0^0^50100^""^-1^0^"" 50011^0^0^50101^""^-1^0^"" 50011^1^0^50102^""^-1^0^"" 50011^2^0^50103^""^-1^0^"" 50011^3^0^50104^""^-1^0^"" 50011^4^0^50105^""^-1^0^"" 50011^5^0^50106^""^-1^0^"" 50011^6^0^50107^""^-1^0^"" 50011^7^0^50169^""^-1^0^"" 50011^8^0^50170^""^-1^0^"" 50011^9^2^40^""^-1^0^"" 50012^0^0^50108^""^-1^0^"" 50013^0^0^50109^""^-1^0^"" 50014^0^0^50110^""^-1^0^"" 50015^0^0^50111^""^-1^0^"" 50016^0^0^50112^""^-1^0^"" 50017^0^0^50113^""^-1^0^"" 50018^0^0^50114^""^-1^0^"" 50019^0^0^50115^""^-1^0^"" 50019^1^0^50116^""^-1^0^"" 50020^0^0^50117^""^-1^0^"" 50021^0^0^50118^""^-1^1^"4" 50022^0^0^50119^""^-1^0^"" 50023^0^0^50120^""^-1^0^"" 50023^1^0^50121^""^-1^0^"" 50023^2^2^8^""^-1^0^"" 50024^0^0^50122^""^-1^0^"" 50025^0^0^50123^""^-1^0^"" 50026^0^0^50124^""^-1^0^"" 50026^1^0^50125^""^-1^0^"" 50026^2^2^8^""^-1^0^"" 50027^0^0^50126^""^-1^0^"" 50028^0^0^50127^""^-1^0^"" 50029^0^0^50128^""^-1^0^"" 50030^0^0^50128^""^-1^0^"" 50030^1^0^50129^""^-1^0^"" 50031^0^0^50115^""^-1^0^"" 50031^1^0^50116^""^-1^0^"" 50031^2^0^50130^""^-1^0^"" 50031^3^0^50131^""^-1^0^"" 50032^0^0^50102^""^-1^0^"" 50032^1^0^50103^""^-1^0^"" 50032^2^0^50104^""^-1^0^"" 50032^3^0^50105^""^-1^0^"" 50032^4^0^50106^""^-1^0^"" 50032^5^0^50107^""^-1^0^"" 50032^6^0^50169^""^-1^0^"" 50032^7^0^50170^""^-1^0^"" 50032^8^2^32^""^-1^0^"" 50033^0^0^50132^""^-1^0^"" 50034^0^0^50133^""^-1^0^"" 50035^0^0^50134^""^-1^0^"" 50036^0^0^50135^""^-1^0^"" 50036^1^0^50136^""^-1^0^"" 50036^2^0^50137^""^-1^0^"" 50036^3^0^50138^""^-1^0^"" 50036^4^0^50139^""^-1^0^"" 50036^5^0^50140^""^-1^0^"" 50036^6^0^50141^""^-1^0^"" 50036^7^0^50142^""^-1^0^"" 50036^8^0^50143^""^-1^0^"" 50036^9^0^50144^""^-1^0^"" 50036^10^0^50145^""^-1^0^"" 50036^11^0^50146^""^-1^0^"" 50037^0^0^50147^""^-1^0^"" 50037^1^0^50148^""^-1^0^"" 50037^2^0^50149^""^-1^0^"" 50037^3^0^50150^""^-1^0^"" 50037^4^0^50151^""^-1^0^"" 50038^0^0^50132^""^-1^0^"" 50038^1^0^50126^""^-1^0^"" 50039^0^0^50152^""^-1^0^"" 50039^1^1^50040^"Profile"^-1^2^"50152" 50040^0^0^50132^""^-1^0^"" 50040^1^0^50126^""^-1^0^"" 50040^2^0^50153^""^-1^0^"" 50040^3^0^50154^""^-1^10^"50153" 50041^0^0^50155^""^-1^0^"" 50042^0^0^50156^""^-1^0^"" 50043^0^0^50157^""^-1^0^"" 50044^0^0^50158^""^-1^0^"" 50045^0^0^50159^""^-1^0^"" 50046^0^0^50160^""^-1^0^"" 50047^0^0^50161^""^-1^0^"" 50048^0^0^50128^""^-1^0^"" 50048^1^0^50161^""^-1^0^"" 50049^0^0^50157^""^-1^0^"" 50050^0^0^50128^""^-1^0^"" 50051^0^0^50162^""^-1^0^"" 50051^1^0^50163^""^-1^0^"" 50051^2^0^50164^""^-1^0^"" 50051^3^0^50165^""^-1^0^"" 50051^4^0^50166^""^-1^0^"" 50051^5^0^50167^""^-1^0^"" 50051^6^0^50209^""^-1^0^"" 50051^7^2^32^""^-1^0^"" 50052^0^0^50168^""^-1^0^"" 50053^0^0^50101^""^-1^0^"" 50053^1^0^50169^""^14^0^"" 50053^2^0^50170^""^-1^0^"" 50053^7^2^40^""^-1^0^"" 50054^0^0^50171^""^-1^0^"" 50055^0^0^50172^""^-1^0^"" 50056^0^0^50173^""^-1^0^"" 50056^1^0^50126^""^-1^0^"" 50057^0^0^50174^""^-1^0^"" 50058^0^0^50175^""^-1^0^"" 50059^0^0^50176^""^-1^0^"" 50060^0^0^50177^""^-1^0^"" 50061^0^0^50178^""^-1^0^"" 50062^0^0^50179^""^-1^0^"" 50063^0^0^50180^""^-1^0^"" 50064^0^0^50181^""^-1^0^"" 50065^0^0^50182^""^-1^0^"" 50066^0^0^50183^""^-1^0^"" 50067^0^0^50184^""^-1^0^"" 50068^0^0^50185^""^-1^0^"" 50069^0^0^50186^""^-1^0^"" 50070^0^0^50173^""^-1^0^"" 50071^0^0^50187^""^-1^0^"" 50072^0^0^50188^""^-1^0^"" 50073^0^0^50189^""^-1^0^"" 50074^0^0^50190^""^-1^0^"" 50074^1^1^50075^"Record"^-1^2^"50190" 50075^0^0^50191^""^-1^0^"" 50075^1^0^50192^""^-1^0^"" 50075^2^0^50193^""^-1^0^"" 50075^3^0^50194^""^-1^0^"" 50075^4^0^50118^""^-1^1^"4" 50075^5^0^50196^""^-1^0^"" 50075^6^0^50197^""^-1^0^"" 50075^7^0^50198^""^-1^0^"" 50075^8^0^50199^""^-1^0^"" 50075^9^0^50157^""^-1^0^"" 50075^10^0^50201^""^-1^0^"" 50075^11^0^50202^""^-1^10^"50201" 50076^0^0^50190^""^-1^0^"" 50076^1^1^50077^"Record"^-1^2^"50190" 50077^0^0^50191^""^-1^0^"" 50078^0^0^50203^""^-1^0^"" 50079^0^0^50204^""^-1^0^"" 50080^0^0^50205^""^-1^0^"" 50081^0^0^50206^""^-1^0^"" 50082^0^0^50207^""^-1^0^"" 50083^0^0^50208^""^-1^0^"" 50084^0^0^50210^""^-1^0^"" 50084^1^0^50211^""^-1^0^"" 50084^2^0^50212^""^-1^0^"" 50084^3^0^50213^""^-1^0^"" 50084^4^0^50214^""^-1^0^"" 50084^5^0^50215^""^-1^0^"" 50084^6^0^50216^""^-1^0^"" 50084^7^0^50217^""^-1^0^"" 50084^8^0^50218^""^-1^0^"" 50084^9^0^50219^""^-1^0^"" 50084^10^0^50255^""^-1^0^"" 50084^11^0^50256^""^-1^0^"" 50084^12^0^50257^""^-1^0^"" 50084^13^0^50258^""^-1^0^"" 50084^14^0^50259^""^-1^0^"" 50084^15^0^50260^""^-1^0^"" 50084^16^0^50261^""^-1^0^"" 50084^17^0^50262^""^-1^0^"" 50084^18^2^32^""^-1^0^"" 50085^0^0^50220^""^-1^0^"" 50086^0^0^50221^""^-1^0^"" 50087^0^0^50222^""^-1^0^"" 50088^0^0^50223^""^-1^0^"" 50090^0^0^50230^""^-1^0^"" 50090^1^1^50091^""^-1^5^"50230 = 1" 50090^2^1^50092^""^-1^5^"50230 = 2" 50090^3^2^72^""^-1^0^"" 50091^0^0^50231^""^-1^0^"" 50091^1^0^50232^""^-1^0^"" 50091^2^0^50233^""^-1^0^"" 50091^3^2^32^""^-1^0^"" 50091^4^1^50093^""^-1^5^"50231 = 1" 50091^5^1^50094^""^-1^5^"50233 = 1" 50091^6^2^64^""^-1^0^"" 50092^0^0^50234^""^-1^0^"" 50092^1^0^50235^""^-1^0^"" 50092^2^0^50236^""^-1^0^"" 50092^3^0^50237^""^-1^0^"" 50092^4^0^50238^""^-1^0^"" 50092^5^0^50273^""^-1^0^"" 50092^6^2^32^""^-1^0^"" 50093^0^0^50239^""^-1^0^"" 50093^1^0^50240^""^-1^0^"" 50093^2^0^50241^""^-1^0^"" 50093^3^2^32^""^-1^0^"" 50094^0^0^50242^""^-1^0^"" 50094^1^0^50243^""^-1^0^"" 50094^2^0^50244^""^-1^0^"" 50094^3^0^50274^""^-1^0^"" 50094^4^2^32^""^-1^0^"" 50095^0^0^50245^""^-1^0^"" 50096^0^0^50246^""^-1^0^"" 50097^0^0^50247^""^-1^0^"" 50098^0^0^50248^""^-1^0^"" 50098^1^0^50249^""^-1^0^"" 50098^2^0^50250^""^16^5^"50248 = 1" 50098^3^0^50251^""^16^5^"50248 = 2" 50098^4^0^50252^""^16^5^"50248 = 3" 50098^5^0^50253^""^16^5^"50248 = 6" 50099^0^0^50254^""^-1^0^"" 50100^0^0^51000^""^-1^0^"" 50101^0^0^51001^""^-1^0^"" 50101^1^0^51002^""^-1^0^"" 50102^0^0^51003^""^-1^0^"" 50102^1^0^51004^""^-1^0^"" 50102^2^0^51005^""^-1^0^"" 50102^3^0^51006^""^-1^0^"" 50102^4^0^51007^""^8^0^"" 50103^0^0^51008^""^-1^0^"" 50103^1^0^51009^""^-1^0^"" 50103^2^0^51010^""^-1^0^"" 50103^3^0^51011^""^-1^0^"" 50103^4^0^51012^""^-1^0^"" 50103^5^0^51013^""^-1^2^"51012" 50104^0^0^51014^""^-1^0^"" 50105^0^0^51015^""^-1^0^"" 50106^0^0^51016^""^-1^0^"" 50107^0^0^51017^""^-1^0^"" 50108^0^0^51018^""^-1^0^"" 50109^0^0^51019^""^-1^0^"" 50110^0^0^51020^""^-1^0^"" 50111^0^0^51021^""^-1^0^"" 50112^0^0^51022^""^-1^0^"" 50113^0^0^51023^""^-1^0^"" 50114^0^0^51024^""^-1^0^"" 50115^0^0^51025^""^-1^0^"" 50116^0^0^51026^""^-1^0^"" 50116^1^0^51027^""^-1^0^"" 50117^0^0^51028^""^-1^0^"" 50118^0^0^51048^""^-1^0^"" 50118^1^0^51049^""^-1^9^"51048" 50119^0^0^51030^""^-1^0^"" 50119^1^0^51031^""^-1^0^"" 50119^2^0^51032^""^-1^0^"" 50119^3^0^51033^""^-1^9^"51032" 50119^4^0^51034^""^-1^0^"" 50119^5^0^51035^""^-1^9^"51034" 50120^0^0^51036^""^-1^0^"" 50120^1^0^51037^""^-1^2^"51036" 50121^0^0^51038^""^-1^0^"" 50121^1^0^51039^""^-1^9^"51038" 50122^0^0^51040^""^-1^0^"" 50122^1^0^51041^""^-1^9^"51040" 50123^0^0^51042^""^-1^0^"" 50124^0^0^51042^""^-1^0^"" 50124^1^0^51043^""^-1^0^"" 50125^0^0^51044^""^-1^0^"" 50125^1^0^51045^""^-1^0^"" 50126^0^0^51046^""^-1^0^"" 50126^1^0^51047^""^-1^2^"51046" 50127^0^0^51050^""^-1^0^"" 50127^1^0^51051^""^-1^0^"" 50127^2^0^51052^""^-1^0^"" 50127^3^0^51053^""^-1^9^"51052" 50128^0^0^51054^""^-1^0^"" 50128^1^0^51055^""^-1^0^"" 50129^0^0^51050^""^-1^0^"" 50129^1^0^51052^""^-1^0^"" 50129^2^0^51053^""^-1^9^"51052" 50130^0^0^51050^""^-1^0^"" 50130^1^0^51056^""^-1^0^"" 50130^2^0^51057^""^-1^9^"51056" 50130^3^0^51060^""^-1^0^"" 50130^4^0^51061^""^-1^9^"51060" 50131^0^0^51050^""^-1^0^"" 50131^1^0^51058^""^-1^0^"" 50131^2^0^51059^""^-1^9^"51058" 50131^3^0^51060^""^-1^0^"" 50131^4^0^51061^""^-1^9^"51060" 50132^0^0^51062^""^-1^0^"" 50132^1^0^51054^""^-1^0^"" 50132^2^0^51055^""^-1^0^"" 50133^0^0^51063^""^-1^0^"" 50134^0^0^51030^""^-1^0^"" 50135^0^0^51064^""^-1^0^"" 50135^1^0^51065^""^-1^0^"" 50135^2^0^51066^""^-1^0^"" 50135^3^0^51037^""^-1^2^"51065" 50136^0^0^51067^""^-1^0^"" 50137^0^0^51068^""^-1^0^"" 50138^0^0^51069^""^-1^0^"" 50139^0^0^51070^""^-1^0^"" 50139^1^0^51071^""^-1^0^"" 50139^2^0^51072^""^-1^0^"" 50139^3^0^51082^""^-1^0^"" 50140^0^0^51073^""^-1^0^"" 50141^0^0^51074^""^-1^0^"" 50142^0^0^51075^""^-1^0^"" 50143^0^0^51076^""^-1^0^"" 50144^0^0^51077^""^-1^0^"" 50145^0^0^51078^""^-1^0^"" 50146^0^0^51079^""^-1^0^"" 50146^1^0^51054^""^-1^0^"" 50146^2^0^51055^""^-1^0^"" 50147^0^0^51078^""^-1^0^"" 50147^1^0^51079^""^-1^0^"" 50147^2^0^51080^""^-1^0^"" 50147^3^0^51081^""^-1^9^"51080" 50148^0^0^51054^""^-1^0^"" 50149^0^0^51078^""^-1^0^"" 50149^1^0^51080^""^-1^0^"" 50149^2^0^51081^""^-1^9^"51080" 50150^0^0^51055^""^-1^0^"" 50151^0^0^51083^""^-1^0^"" 50152^0^0^51084^""^-1^0^"" 50153^0^0^51085^""^-1^0^"" 50155^0^0^51090^""^-1^0^"" 50155^1^1^50156^"Image"^-1^2^"51090" 50156^0^0^51091^""^-1^0^"" 50156^1^0^51092^""^-1^1^"16" 50156^2^0^51093^""^-1^0^"" 50156^3^0^51094^""^-1^10^"51093" 50157^0^0^51095^""^-1^0^"" 50158^0^0^51096^""^-1^0^"" 50159^0^0^51090^""^-1^0^"" 50159^1^0^51091^""^-1^2^"51090" 50160^0^0^51097^""^-1^0^"" 50161^0^0^51098^""^-1^0^"" 50161^1^1^50162^"Type"^-1^2^"51098" 50162^0^0^51091^""^-1^0^"" 50162^1^0^51099^""^-1^0^"" 50162^2^0^51100^""^-1^0^"" 50162^3^0^51090^""^-1^0^"" 50162^4^1^50163^"Image"^-1^2^"51090" 50163^0^0^51096^""^-1^0^"" 50163^1^0^51101^""^-1^0^"" 50163^2^0^51092^""^-1^1^"16" 50163^3^0^51093^""^-1^0^"" 50163^4^0^51094^""^-1^10^"51093" 50165^0^0^51110^""^-1^0^"" 50165^1^0^51111^""^-1^0^"" 50165^2^0^51112^""^-1^0^"" 50165^3^0^51113^""^-1^0^"" 50165^4^0^51114^""^-1^0^"" 50165^5^0^51115^""^-1^0^"" 50165^6^0^51116^""^-1^0^"" 50165^7^0^51117^""^-1^0^"" 50165^8^0^51118^""^-1^0^"" 50165^9^0^51119^""^-1^0^"" 50165^10^0^51120^""^-1^0^"" 50165^11^0^51121^""^-1^0^"" 50165^12^0^51122^""^-1^0^"" 50165^13^0^51123^""^-1^0^"" 50165^14^0^51124^""^-1^0^"" 50165^15^0^51125^""^-1^0^"" 50165^16^0^51126^""^-1^0^"" 50165^17^0^51127^""^-1^0^"" 50165^18^0^51128^""^-1^0^"" 50165^19^0^51129^""^-1^0^"" 50165^20^0^51130^""^-1^0^"" 50165^21^0^51131^""^-1^0^"" 50165^22^0^51132^""^-1^0^"" 50165^23^0^51133^""^-1^0^"" 50165^24^0^51134^""^-1^0^"" 50165^25^0^51135^""^-1^0^"" 50165^26^0^51136^""^-1^0^"" 50165^27^0^51137^""^-1^0^"" 50165^28^0^51138^""^-1^0^"" 50165^29^0^51139^""^-1^0^"" 50165^30^0^51140^""^31^0^"" 50165^31^0^51141^""^48^0^"" 50165^32^0^51142^""^-1^0^"" 50165^33^0^51143^""^-1^0^"" 50165^34^0^51144^""^56^0^"" 50165^35^0^51145^""^-1^0^"" 50165^36^0^51146^""^-1^0^"" 50165^37^0^51147^""^-1^0^"" 50165^38^2^64^""^-1^0^"" 50166^0^0^51148^""^-1^0^"" 50167^0^0^51149^""^-1^0^"" 50168^0^0^51150^""^-1^0^"" 50169^0^0^51151^""^-1^0^"" 50170^0^0^51152^""^-1^0^"" 50171^0^0^51153^""^-1^0^"" 50172^0^0^51154^""^-1^0^"" 50172^1^0^51155^""^-1^0^"" 50173^0^0^51156^""^-1^0^"" 50173^1^0^51157^""^-1^0^"" 50174^0^0^51158^""^-1^0^"" 50175^0^0^51159^""^-1^0^"" 50200^0^0^52000^""^-1^0^"" 50200^1^0^52001^""^-1^0^"" 50200^2^0^52002^""^-1^2^"52001" 50201^0^0^52003^""^-1^0^"" 50201^1^0^52004^""^-1^0^"" 50202^0^0^52005^""^-1^0^"" 50202^1^1^50203^"Network Info"^-1^2^"52005" 50203^0^0^52006^""^-1^0^"" 50203^1^0^52007^""^-1^0^"" 50203^2^0^52008^""^-1^0^"" 50203^3^0^52009^""^-1^0^"" 50203^4^0^52010^""^-1^0^"" 50203^5^0^52011^""^-1^0^"" 50203^6^0^52012^""^-1^0^"" 50203^7^0^52013^""^-1^10^"52012" 50204^0^0^52014^""^-1^0^"" 50205^0^0^52006^""^-1^0^"" 50205^1^0^52007^""^-1^0^"" 50205^2^0^52015^""^-1^0^"" 50206^0^0^52016^""^-1^0^"" 50207^0^0^52017^""^-1^0^"" 50207^1^0^52018^""^-1^0^"" 50207^2^0^52019^""^-1^0^"" 50207^3^0^52020^""^-1^0^"" 50207^4^0^52021^""^-1^0^"" 50207^5^0^52004^""^-1^2^"52021" 50208^0^0^52022^""^-1^0^"" 50209^0^0^52006^""^-1^0^"" 50209^1^0^52007^""^-1^0^"" 50209^2^0^52012^""^-1^0^"" 50209^3^0^52013^""^-1^10^"52012" 50210^0^0^52023^""^-1^0^"" 50210^1^1^50211^"Network"^-1^2^"52023" 50211^0^0^52006^""^-1^0^"" 50211^1^0^52007^""^-1^0^"" 50211^2^1^50212^""^-1^0^"" 50212^0^0^52024^""^6^0^"" 50212^1^0^52025^""^-1^0^"" 50212^2^0^52026^""^15^0^"" 50213^0^0^52027^""^-1^0^"" 50213^1^1^50214^"Network"^-1^2^"52027" 50214^0^0^52006^""^-1^0^"" 50214^1^0^52007^""^-1^0^"" 50215^0^0^52028^""^-1^0^"" 50215^1^0^52029^""^-1^0^"" 50216^0^1^50217^""^-1^0^"" 50216^1^0^52032^""^-1^0^"" 50217^0^0^52035^""^-1^0^"" 50217^1^1^50221^""^-1^5^"52035 = 1" 50217^2^1^50222^""^-1^5^"52035 = 2" 50217^3^2^16^""^-1^0^"" 50218^0^0^52033^""^-1^0^"" 50219^0^0^52034^""^-1^0^"" 50219^1^0^52033^""^-1^0^"" 50220^0^0^52005^""^-1^0^"" 50220^1^1^50201^"Info"^-1^2^"52005" 50221^0^0^52036^""^-1^0^"" 50221^1^0^52037^""^-1^0^"" 50221^2^0^52038^""^-1^0^"" 50222^0^0^52039^""^-1^0^"" 50222^1^0^52040^""^-1^0^"" 50223^0^0^52041^""^-1^0^"" 50223^1^0^52042^""^-1^2^"52041" 50224^0^0^52043^""^-1^0^"" 50225^0^0^52044^""^-1^0^"" 50226^0^0^52045^""^-1^0^"" 50227^0^0^52046^""^-1^0^"" 50227^1^0^52047^""^-1^0^"" 50227^2^0^52048^""^-1^0^"" 50228^0^0^52049^""^-1^0^"" 50229^0^0^52050^""^-1^0^"" 50229^1^0^52051^""^-1^0^"" 50229^2^0^52052^""^-1^0^"" 50229^3^0^52053^""^-1^0^"" 50229^4^0^52054^""^-1^0^"" 50229^5^0^52055^""^-1^0^"" 50229^6^0^52056^""^-1^0^"" 50229^7^0^52057^""^-1^0^"" 50229^8^0^52058^""^-1^0^"" 50229^9^0^52059^""^40^0^"" 50229^10^0^52060^""^72^0^"" 50229^11^0^52061^""^-1^0^"" 50229^12^2^104^""^-1^0^"" 50230^0^0^52034^""^-1^0^"" 50231^0^0^52062^""^-1^0^"" 50232^0^0^52004^""^-1^0^"" 50232^1^0^52063^""^-1^0^"" 50232^2^0^52064^""^-1^0^"" 50233^0^0^52065^""^-1^0^"" 50234^0^0^52066^""^-1^0^"" 50235^0^0^52067^""^-1^0^"" 50235^1^1^50232^"Instance"^-1^2^"52067" 50236^0^0^52068^""^-1^0^"" 50236^1^0^52069^""^-1^0^"" 50237^0^0^52070^""^-1^0^"" 50240^0^0^52080^""^-1^0^"" 50240^1^0^52081^""^-1^0^"" 50241^0^0^52082^""^-1^0^"" 50241^1^0^52083^""^-1^0^"" 50242^0^0^52084^""^-1^0^"" 50242^1^0^52085^""^-1^0^"" 50243^0^0^52086^""^-1^0^"" 50243^1^0^52087^""^-1^0^"" 50244^0^0^52088^""^-1^0^"" 50245^0^0^52089^""^-1^0^"" 50245^1^0^52004^""^-1^0^"" 50246^0^0^52090^""^-1^0^"" 50246^1^0^52004^""^-1^0^"" 50247^0^0^52091^""^-1^0^"" 50248^0^0^52092^""^-1^0^"" 50249^0^0^52093^""^-1^0^"" 50249^1^0^52004^""^-1^0^"" 50250^0^0^52094^""^-1^0^"" 50251^0^0^52095^""^-1^0^"" 50252^0^0^52096^""^-1^0^"" 50253^0^0^52157^""^-1^0^"" 50253^1^0^52158^""^-1^0^"" 50253^2^0^52159^""^-1^0^"" 50253^3^0^52160^""^-1^0^"" 50253^4^0^52161^""^-1^0^"" 50253^5^2^16^""^-1^0^"" 50254^0^0^52097^""^-1^0^"" 50254^1^1^50245^"Measurement"^-1^2^"52097" 50255^0^0^52097^""^-1^0^"" 50255^1^1^50246^"Measurement"^-1^2^"52097" 50256^0^0^52097^""^-1^0^"" 50256^1^1^50249^"Measurement"^-1^2^"52097" 50257^0^0^52098^""^-1^0^"" 50257^1^0^52099^""^-1^0^"" 50257^2^0^52100^""^-1^0^"" 50258^0^0^52067^""^-1^0^"" 50258^1^1^50259^"Instance"^-1^2^"52067" 50259^0^0^52004^""^-1^0^"" 50259^1^0^52022^""^-1^0^"" 50260^0^0^52022^""^-1^0^"" 50261^0^0^52101^""^-1^0^"" 50261^1^0^52102^""^-1^0^"" 50261^2^0^52103^""^-1^0^"" 50262^0^0^52104^""^-1^0^"" 50263^0^0^52105^""^-1^0^"" 50264^0^0^52106^""^-1^0^"" 50264^1^0^52107^""^-1^0^"" 50264^2^0^52108^""^-1^0^"" 50264^3^0^52109^""^-1^0^"" 50264^4^2^16^""^-1^0^"" 50265^0^0^52110^""^-1^0^"" 50265^1^0^52111^""^-1^0^"" 50265^2^0^52112^""^-1^0^"" 50265^3^0^52113^""^-1^0^"" 50265^4^0^52114^""^-1^0^"" 50265^5^0^52115^""^-1^0^"" 50265^6^0^52116^""^-1^0^"" 50265^7^0^52117^""^-1^0^"" 50265^8^0^52118^""^-1^0^"" 50265^9^0^52119^""^-1^0^"" 50265^10^0^52120^""^-1^0^"" 50265^11^0^52121^""^-1^0^"" 50265^12^0^52122^""^-1^0^"" 50265^13^0^52123^""^-1^0^"" 50265^14^0^52124^""^-1^0^"" 50265^15^0^52125^""^-1^0^"" 50265^16^0^52126^""^-1^0^"" 50265^17^0^52127^""^-1^0^"" 50265^18^0^52128^""^-1^0^"" 50265^19^0^52129^""^-1^0^"" 50265^20^0^52130^""^-1^0^"" 50265^21^0^52131^""^-1^0^"" 50265^22^0^52132^""^-1^0^"" 50265^23^0^52133^""^-1^0^"" 50265^24^0^52134^""^-1^0^"" 50265^25^0^52135^""^-1^0^"" 50265^26^0^52136^""^-1^0^"" 50265^27^0^52137^""^-1^0^"" 50265^28^0^52138^""^-1^0^"" 50265^29^0^52139^""^-1^0^"" 50265^30^0^52140^""^31^0^"" 50265^31^0^52141^""^48^0^"" 50265^32^0^52142^""^-1^0^"" 50265^33^0^52143^""^-1^0^"" 50265^34^0^52144^""^56^0^"" 50265^35^0^52145^""^-1^0^"" 50265^36^0^52146^""^-1^0^"" 50265^37^0^52147^""^-1^0^"" 50265^38^2^64^""^-1^0^"" 50266^0^0^52148^""^-1^0^"" 50267^0^0^52149^""^-1^0^"" 50268^0^0^52150^""^-1^0^"" 50268^1^0^52151^""^-1^0^"" 50268^2^0^52152^""^-1^0^"" 50268^3^0^52153^""^-1^0^"" 50268^4^0^52154^""^-1^0^"" 50268^6^0^52155^""^24^0^"" 50268^7^0^52067^""^-1^0^"" 50268^8^0^52156^""^-1^2^"52067" 50269^0^0^52006^""^-1^0^"" 50269^1^0^52007^""^-1^0^"" 50269^2^0^52162^""^-1^0^"" 50269^3^0^52163^""^-1^0^"" 50269^4^0^52164^""^-1^0^"" 50269^5^0^52165^""^-1^2^"52164" 50270^0^0^52005^""^-1^0^"" 50270^1^1^50271^"Info"^-1^2^"52005" 50271^0^0^52006^""^-1^0^"" 50271^1^0^52007^""^-1^0^"" 50271^2^0^52015^""^-1^0^"" 50272^0^0^52166^""^-1^0^"" 50273^0^0^52167^""^-1^0^"" 50274^0^0^52168^""^-1^0^"" 50274^1^0^52169^""^-1^0^"" 50274^2^0^52170^""^-1^2^"52169" 50274^3^0^52171^""^-1^0^"" 50274^4^0^52172^""^-1^0^"" 50274^5^0^52173^""^-1^0^"" 50274^6^0^52174^""^-1^0^"" 50274^7^0^52175^""^-1^2^"52174" 50274^8^0^52176^""^-1^0^"" 50274^9^0^52177^""^-1^0^"" 50274^10^0^52178^""^-1^0^"" 50274^11^0^52179^""^-1^0^"" 50274^12^0^52180^""^-1^2^"52179" 50275^0^0^52181^""^-1^0^"" 50275^1^0^52004^""^-1^0^"" 50276^0^0^52182^""^-1^0^"" 50277^0^0^52183^""^-1^0^"" 50277^1^0^52184^""^-1^0^"" 50300^0^0^53000^""^-1^0^"" 50301^0^0^53001^""^-1^0^"" 50301^1^0^53002^""^-1^0^"" 50302^0^0^53003^""^-1^0^"" 50302^1^0^53004^""^-1^0^"" 50302^2^0^53005^""^-1^2^"53004" 50303^0^0^53006^""^-1^0^"" 50304^0^0^53001^""^-1^0^"" 50304^1^0^53003^""^-1^0^"" 50304^2^0^53004^""^-1^0^"" 50304^3^0^53005^""^-1^2^"53004" 50305^0^0^53002^""^-1^0^"" 50306^0^0^53007^""^-1^0^"" 50306^1^0^53003^""^-1^0^"" 50306^2^0^53004^""^-1^0^"" 50306^3^0^53005^""^-1^2^"53004" 50307^0^0^53001^""^-1^0^"" 50307^1^0^53002^""^-1^0^"" 50307^2^0^53007^""^-1^0^"" 50308^0^0^53001^""^-1^0^"" 50309^0^0^53007^""^-1^0^"" 50310^0^0^53008^""^-1^0^"" 50311^0^0^53009^""^-1^0^"" 50311^1^1^50312^"Message"^-1^2^"53009" 50312^0^0^53002^""^-1^0^"" 50312^1^0^53007^""^-1^0^"" 50313^0^0^53010^""^-1^0^"" 50313^1^1^50314^"Route"^-1^2^"53010" 50314^0^0^53011^""^-1^0^"" 50314^1^0^53012^""^-1^0^"" 50314^2^0^53001^""^-1^0^"" 50314^3^0^53013^""^-1^0^"" 50315^0^0^53010^""^-1^0^"" 50315^1^1^50316^"Route"^-1^2^"53010" 50316^0^0^53011^""^-1^0^"" 50316^1^0^53012^""^-1^0^"" 50316^2^0^53001^""^-1^0^"" 50316^3^0^53014^""^-1^0^"" 50317^0^0^53015^""^-1^0^"" 50317^1^0^53016^""^-1^0^"" 50317^2^0^53017^""^-1^9^"53016" 50318^0^0^53018^""^-1^0^"" 50319^0^0^53019^""^-1^0^"" 50320^0^0^53020^""^-1^0^"" 50320^1^0^53021^""^-1^0^"" 50320^2^0^53003^""^-1^0^"" 50320^3^0^53004^""^-1^0^"" 50320^4^0^53005^""^-1^2^"53004" 50321^0^0^53022^""^-1^0^"" 50321^1^0^53023^""^-1^0^"" 50322^0^0^53024^""^-1^0^"" 50323^0^0^53025^""^-1^0^"" 50324^0^0^53026^""^-1^0^"" 50325^0^0^53027^""^-1^0^"" 50325^1^0^53028^""^-1^0^"" 50326^0^0^53029^""^-1^0^"" 50327^0^0^53030^""^-1^0^"" 50328^0^0^53031^""^-1^0^"" 50329^0^0^53021^""^-1^0^"" 50329^1^0^53008^""^-1^0^"" 50329^2^0^53032^""^-1^0^"" 50330^0^0^53033^""^-1^0^"" 50330^1^0^53034^""^-1^0^"" 50331^0^0^53035^""^-1^0^"" 50331^1^0^53028^""^-1^0^"" 50332^0^0^53036^""^-1^0^"" 50333^0^0^53037^""^-1^0^"" 50334^0^0^53038^""^-1^0^"" 50335^0^0^53039^""^-1^0^"" 50336^0^0^53008^""^-1^0^"" 50336^1^0^53040^""^-1^0^"" 50337^0^0^53041^""^-1^0^"" 50337^1^1^50338^"Instance"^-1^2^"53041" 50338^0^0^53042^""^-1^0^"" 50338^1^0^53043^""^-1^0^"" 50338^2^0^53044^""^-1^0^"" 50339^0^0^53041^""^-1^0^"" 50339^1^1^50340^"Instance"^-1^2^"53041" 50340^0^0^53045^""^-1^0^"" 50340^1^0^53046^""^-1^0^"" 50340^2^0^53044^""^-1^0^"" 50341^0^0^53047^""^-1^0^"" 50341^1^0^53041^""^-1^0^"" 50341^2^1^50338^"Instance"^-1^2^"53041" 50342^0^0^53047^""^-1^0^"" 50342^1^0^53041^""^-1^0^"" 50342^2^1^50340^"Instance"^-1^2^"53041" 50343^0^0^53001^""^-1^0^"" 50343^1^0^53008^""^-1^0^"" 50344^0^0^53048^""^-1^0^"" 50345^0^0^53001^""^-1^0^"" 50345^1^0^53002^""^-1^0^"" 50345^2^0^53008^""^-1^0^"" 50346^0^0^53049^""^-1^0^"" 50400^0^0^54000^""^-1^0^"" 50401^0^0^54001^""^-1^0^"" 50402^0^0^54002^""^-1^0^"" 50402^1^0^54003^""^-1^0^"" 50403^0^0^54002^""^-1^0^"" 50404^0^0^54004^""^-1^0^"" 50404^1^0^54005^""^-1^0^"" 50404^2^0^54006^""^-1^0^"" 50404^3^0^54007^""^-1^0^"" 50404^4^0^54008^""^-1^0^"" 50404^5^0^54009^""^-1^0^"" 50404^6^0^54010^""^-1^0^"" 50404^7^0^54011^""^-1^0^"" 50405^0^0^54012^""^-1^0^"" 50405^1^0^54013^""^-1^0^"" 50405^2^0^54014^""^-1^0^"" 50405^3^0^54015^""^-1^0^"" 50405^4^0^54016^""^-1^0^"" 50405^5^0^54017^""^8^0^"" 50405^6^0^54018^""^-1^0^"" 50406^0^0^54019^""^-1^0^"" 50406^1^0^54020^""^-1^0^"" 50407^0^0^54006^""^-1^0^"" 50407^1^0^54008^""^-1^0^"" 50407^2^0^54010^""^-1^0^"" 50407^3^0^54011^""^-1^0^"" 50408^0^0^54021^""^-1^0^"" 50408^1^0^54022^""^-1^0^"" 50409^0^0^54023^""^-1^0^"" 50409^1^0^54024^""^-1^2^"54023" 50410^0^0^54025^""^-1^0^"" 50411^0^0^54026^""^-1^0^"" 50411^1^0^54027^""^-1^0^"" 50411^2^0^54028^""^-1^0^"" 50412^0^0^54029^""^-1^1^"4" 50412^1^0^54030^""^-1^0^"" 50413^0^0^54031^""^-1^0^"" 50414^0^0^54032^""^-1^0^"" 50414^1^0^54033^""^-1^0^"" 50414^2^0^54034^""^-1^0^"" 50414^3^0^54035^""^-1^0^"" 50414^4^0^54036^""^-1^0^"" 50414^5^0^54037^""^-1^0^"" 50414^6^0^54038^""^-1^0^"" 50414^7^0^54039^""^-1^0^"" 50414^8^0^54040^""^-1^0^"" 50414^9^0^54041^""^-1^0^"" 50414^10^0^54042^""^-1^0^"" 50414^11^0^54043^""^-1^0^"" 50414^12^0^54044^""^-1^0^"" 50414^13^2^32^""^-1^0^"" 50415^0^0^54045^""^-1^0^"" 50415^1^0^54046^""^-1^0^"" 50415^2^0^54047^""^-1^0^"" 50415^3^0^54048^""^-1^0^"" 50415^4^0^54049^""^-1^0^"" 50415^5^0^54050^""^-1^0^"" 50415^6^0^54051^""^-1^0^"" 50415^7^0^54052^""^-1^0^"" 50415^8^0^54053^""^-1^0^"" 50415^9^0^54054^""^-1^0^"" 50415^10^2^32^""^-1^0^"" 50416^0^0^54055^""^-1^0^"" 50417^0^0^54056^""^-1^0^"" 50417^1^0^54057^""^-1^0^"" 50417^2^0^54058^""^-1^10^"54057" 50420^0^0^54100^""^-1^0^"" 50421^0^0^54101^""^-1^0^"" 50422^0^0^54102^""^-1^0^"" 50423^0^0^54103^""^-1^0^"" 50424^0^0^54104^""^-1^0^"" 50425^0^0^54105^""^-1^0^"" 50426^0^0^54106^""^-1^0^"" 50427^0^0^54107^""^-1^0^"" 50428^0^0^54108^""^-1^0^"" 50429^0^0^54109^""^-1^0^"" 50430^0^0^54110^""^-1^0^"" 50430^1^0^54111^""^-1^0^"" 50430^2^0^54112^""^-1^0^"" 50430^3^0^54113^""^-1^0^"" 50430^4^0^54114^""^-1^0^"" 50430^5^0^54115^""^-1^0^"" 50430^6^0^54116^""^-1^0^"" 50430^7^0^54117^""^-1^0^"" 50430^8^0^54118^""^-1^0^"" 50430^9^0^54119^""^-1^0^"" 50430^10^0^54120^""^-1^0^"" 50430^11^0^54121^""^-1^0^"" 50430^12^0^54122^""^-1^0^"" 50430^13^0^54123^""^-1^0^"" 50430^14^0^54124^""^-1^0^"" 50430^15^0^54125^""^-1^0^"" 50430^16^0^54126^""^-1^0^"" 50430^17^0^54127^""^-1^0^"" 50430^18^0^54128^""^-1^0^"" 50430^19^0^54129^""^-1^0^"" 50430^20^0^54130^""^-1^0^"" 50430^21^0^54131^""^-1^0^"" 50430^22^0^54132^""^-1^0^"" 50430^23^0^54132^""^-1^0^"" 50430^24^2^32^""^-1^0^"" 50430^25^0^54133^""^-1^0^"" 50430^26^0^54134^""^-1^0^"" 50430^27^0^54135^""^-1^0^"" 50430^28^0^54136^""^-1^0^"" 50430^29^0^54137^""^-1^0^"" 50430^30^0^54138^""^-1^0^"" 50430^31^0^54139^""^-1^0^"" 50430^32^0^54140^""^-1^0^"" 50430^33^0^54141^""^-1^0^"" 50430^34^0^54142^""^-1^0^"" 50430^35^0^54143^""^-1^0^"" 50430^36^0^54144^""^-1^0^"" 50430^37^0^54145^""^-1^0^"" 50430^38^0^54146^""^-1^0^"" 50430^39^0^54147^""^-1^0^"" 50430^40^0^54148^""^-1^0^"" 50430^41^0^54149^""^-1^0^"" 50430^42^0^54150^""^-1^0^"" 50430^43^0^54151^""^-1^0^"" 50430^44^0^54152^""^-1^0^"" 50430^45^0^54153^""^-1^0^"" 50430^46^0^54154^""^-1^0^"" 50430^47^0^54155^""^-1^0^"" 50430^48^0^54156^""^-1^0^"" 50430^49^0^54157^""^-1^0^"" 50430^50^0^54158^""^-1^0^"" 50430^51^0^54159^""^-1^0^"" 50430^52^0^54160^""^-1^0^"" 50430^53^0^54161^""^-1^0^"" 50430^54^0^54162^""^-1^0^"" 50431^0^0^54163^""^-1^0^"" 50431^1^0^54164^""^-1^0^"" 50431^2^1^50432^"URL"^-1^2^"54164" 50432^0^0^54165^""^-1^0^"" 50432^1^0^54166^""^-1^10^"54165" 50433^0^0^54167^""^-1^0^"" 50433^1^0^54164^""^-1^0^"" 50433^2^1^50432^"URL"^-1^2^"54164" 50434^0^0^54168^""^-1^0^"" 50434^1^0^54169^""^-1^0^"" 50435^0^0^54170^""^-1^0^"" 50435^1^0^54171^""^-1^0^"" 50435^2^0^54172^""^-1^0^"" 50435^3^2^32^""^-1^0^"" 50435^4^0^54173^""^-1^0^"" 50435^5^0^54174^""^-1^0^"" 50435^6^1^50436^"SV"^-1^2^"54174" 50436^0^0^54175^""^-1^0^"" 50436^1^0^54176^""^-1^0^"" 50436^2^0^54177^""^-1^0^"" 50436^3^0^54178^""^-1^0^"" 50436^4^0^54179^""^-1^0^"" 50436^5^0^54180^""^-1^0^"" 50436^6^0^54181^""^-1^0^"" 50436^7^0^54182^""^-1^0^"" 50436^8^0^54183^""^-1^0^"" 50436^9^2^32^""^-1^0^"" 50436^10^0^54184^""^-1^0^"" 50436^11^0^54185^""^-1^0^"" 50436^12^0^54186^""^-1^0^"" 50436^13^0^54187^""^-1^0^"" 50436^14^0^54188^""^-1^0^"" 50436^15^0^54189^""^-1^0^"" 50436^16^0^54347^""^-1^0^"" 50436^17^0^54190^""^-1^0^"" 50436^18^0^54191^""^-1^0^"" 50437^0^0^54192^""^-1^0^"" 50437^1^0^54193^""^-1^0^"" 50437^2^0^54194^""^-1^0^"" 50437^3^0^54195^""^-1^0^"" 50437^4^0^54196^""^-1^0^"" 50437^5^0^54197^""^-1^0^"" 50437^6^2^32^""^-1^0^"" 50437^7^0^54198^""^-1^0^"" 50437^8^0^54199^""^-1^0^"" 50437^9^0^54200^""^-1^0^"" 50437^10^0^54201^""^-1^0^"" 50437^11^0^54202^""^-1^0^"" 50437^12^0^54203^""^-1^0^"" 50437^13^0^54204^""^-1^0^"" 50437^14^0^54205^""^-1^2^"54204" 50438^0^0^54206^""^-1^0^"" 50438^1^0^54207^""^-1^0^"" 50438^2^0^54208^""^-1^0^"" 50438^3^0^54209^""^-1^0^"" 50438^4^0^54210^""^-1^0^"" 50438^5^0^54211^""^-1^0^"" 50438^6^0^54212^""^-1^0^"" 50438^7^0^54213^""^-1^0^"" 50438^8^0^54214^""^-1^0^"" 50438^9^0^54215^""^-1^0^"" 50438^10^0^54216^""^-1^0^"" 50438^11^0^54217^""^-1^0^"" 50438^12^0^54218^""^-1^0^"" 50438^13^0^54219^""^-1^0^"" 50438^14^2^32^""^-1^0^"" 50438^15^0^54220^""^-1^0^"" 50438^16^0^54221^""^-1^0^"" 50438^17^0^54222^""^-1^0^"" 50438^18^0^54223^""^-1^0^"" 50438^19^0^54224^""^-1^0^"" 50438^20^0^54225^""^-1^1^"4" 50438^21^0^54348^""^-1^0^"" 50438^22^0^54226^""^-1^1^"16" 50438^23^0^54227^""^-1^0^"" 50438^24^0^54228^""^-1^10^"54227" 50438^25^0^54229^""^-1^0^"" 50438^26^0^54230^""^-1^0^"" 50438^27^0^54231^""^-1^0^"" 50438^28^0^54232^""^-1^2^"54231" 50438^29^0^54233^""^-1^0^"" 50438^30^0^54234^""^-1^0^"" 50438^31^0^54235^""^-1^2^"54234" 50438^32^0^54236^""^-1^0^"" 50438^33^0^54237^""^-1^0^"" 50438^34^0^54238^""^-1^0^"" 50438^35^0^54239^""^-1^0^"" 50439^0^0^54250^""^-1^0^"" 50439^1^0^54251^""^-1^0^"" 50439^2^0^54252^""^-1^0^"" 50439^3^0^54253^""^-1^0^"" 50439^4^0^54254^""^-1^0^"" 50439^5^0^54255^""^-1^0^"" 50439^6^0^54256^""^-1^0^"" 50439^7^0^54257^""^-1^0^"" 50439^8^2^32^""^-1^0^"" 50439^9^0^54258^""^-1^0^"" 50439^10^0^54259^""^-1^0^"" 50439^11^0^54260^""^-1^0^"" 50439^12^0^54261^""^-1^0^"" 50439^13^0^54262^""^-1^2^"54261" 50439^14^0^54263^""^-1^0^"" 50439^15^0^54264^""^-1^10^"54263" 50439^16^0^54265^""^-1^0^"" 50439^17^0^54266^""^-1^0^"" 50439^18^0^54267^""^-1^0^"" 50439^19^0^54268^""^-1^2^"54267" 50439^20^0^54269^""^-1^0^"" 50439^21^0^54270^""^-1^0^"" 50439^22^0^54271^""^-1^2^"54270" 50439^23^0^54272^""^-1^0^"" 50440^0^0^54273^""^-1^0^"" 50440^1^0^54274^""^-1^0^"" 50441^0^0^54275^""^-1^0^"" 50441^1^0^54276^""^-1^0^"" 50442^0^0^54006^""^-1^0^"" 50443^0^0^54008^""^-1^0^"" 50444^0^0^54011^""^-1^0^"" 50445^0^0^54277^""^-1^0^"" 50445^1^0^54278^""^-1^0^"" 50446^0^0^54279^""^-1^0^"" 50446^1^0^54280^""^-1^0^"" 50446^2^0^54281^""^-1^0^"" 50446^3^0^54282^""^-1^2^"54281" 50447^0^0^54142^""^-1^0^"" 50448^0^0^54144^""^-1^0^"" 50449^0^0^54145^""^-1^0^"" 50450^0^0^54146^""^-1^0^"" 50451^0^0^54147^""^-1^0^"" 50452^0^0^54151^""^-1^0^"" 50453^0^0^54155^""^-1^0^"" 50454^0^0^54158^""^-1^0^"" 50455^0^0^54283^""^-1^0^"" 50456^0^0^54284^""^-1^0^"" 50457^0^0^54285^""^-1^0^"" 50458^0^0^54286^""^-1^0^"" 50458^1^0^54287^""^-1^0^"" 50458^2^0^54288^""^-1^0^"" 50458^3^0^54289^""^-1^0^"" 50458^4^0^54290^""^-1^0^"" 50459^0^0^54289^""^-1^0^"" 50459^1^1^50460^"AP"^-1^2^"54289" 50460^0^0^54291^""^-1^1^"6" 50460^1^0^54292^""^-1^0^"" 50460^2^0^54293^""^-1^0^"" 50460^3^0^54350^""^-1^0^"" 50460^4^0^54351^""^-1^0^"" 50460^5^0^54352^""^-1^0^"" 50460^6^0^54353^""^-1^0^"" 50460^7^2^8^""^-1^0^"" 50461^0^0^54294^""^-1^0^"" 50462^0^0^54295^""^-1^0^"" 50463^0^0^54296^""^-1^0^"" 50464^0^0^54297^""^-1^0^"" 50464^1^0^54298^""^-1^0^"" 50464^2^0^54299^""^-1^0^"" 50464^3^0^54300^""^-1^0^"" 50465^0^0^54301^""^-1^0^"" 50465^1^0^54302^""^-1^10^"54301" 50465^2^0^54303^""^-1^0^"" 50465^3^0^54304^""^-1^0^"" 50465^4^0^54305^""^-1^0^"" 50465^5^0^54306^""^-1^0^"" 50465^6^0^54306^""^-1^2^"54304" 50466^0^0^54308^""^-1^0^"" 50467^0^0^54309^""^-1^0^"" 50468^0^0^54310^""^-1^0^"" 50469^0^0^54354^""^-1^0^"" 50469^1^0^54311^""^-1^0^"" 50469^2^0^54312^""^-1^0^"" 50469^3^0^54313^""^-1^0^"" 50469^4^0^54314^""^-1^0^"" 50469^5^0^54315^""^-1^0^"" 50469^6^0^54316^""^-1^0^"" 50469^7^0^54317^""^-1^0^"" 50469^8^0^54318^""^-1^0^"" 50469^9^0^54319^""^-1^0^"" 50469^10^0^54320^""^-1^0^"" 50469^11^0^54321^""^-1^0^"" 50469^12^0^54322^""^-1^0^"" 50469^13^0^54323^""^-1^0^"" 50469^14^0^54324^""^-1^0^"" 50469^15^0^54325^""^-1^0^"" 50469^16^0^54326^""^-1^0^"" 50469^17^0^54327^""^-1^0^"" 50469^18^0^54328^""^-1^0^"" 50469^19^0^54329^""^-1^0^"" 50469^20^2^32^""^-1^0^"" 50469^21^0^54144^""^-1^0^"" 50469^22^0^54145^""^-1^0^"" 50469^23^0^54151^""^-1^0^"" 50469^24^0^54146^""^-1^0^"" 50469^25^0^54155^""^-1^0^"" 50469^26^0^54330^""^-1^0^"" 50469^27^0^54331^""^-1^0^"" 50469^28^0^54298^""^-1^0^"" 50469^29^0^54332^""^-1^0^"" 50469^30^0^54333^""^-1^0^"" 50469^31^0^54334^""^-1^0^"" 50469^32^0^54335^""^-1^0^"" 50469^33^0^54336^""^-1^0^"" 50469^34^0^54337^""^-1^0^"" 50469^35^0^54338^""^-1^0^"" 50469^36^0^54339^""^-1^0^"" 50469^37^0^54340^""^-1^0^"" 50469^38^0^54341^""^-1^0^"" 50469^39^0^54342^""^-1^0^"" 50469^40^0^54343^""^-1^0^"" 50469^41^0^54344^""^-1^0^"" 50469^42^0^54345^""^-1^0^"" 50469^43^0^54346^""^-1^0^"" 50469^44^0^54347^""^-1^0^"" 50470^0^0^54355^""^-1^0^"" 50471^0^0^54356^""^-1^0^"" 50500^0^0^55000^""^-1^0^"" 50501^0^0^55001^""^-1^0^"" 50600^0^0^56000^""^-1^0^"" 50600^1^0^56001^""^-1^0^"" 50600^2^0^56002^""^-1^0^"" 50600^3^0^56003^""^-1^0^"" 50600^4^0^56004^""^-1^0^"" 50600^5^0^56005^""^-1^0^"" 50600^6^0^56006^""^-1^0^"" 50600^7^0^56007^""^-1^0^"" 50600^8^0^56008^""^-1^0^"" 50600^9^0^56009^""^-1^0^"" 50600^10^0^56010^""^-1^0^"" 50600^11^0^56011^""^-1^0^"" 50600^12^0^56012^""^-1^0^"" 50600^13^2^32^""^-1^0^"" 50601^0^0^56013^""^-1^0^"" 50601^1^0^56014^""^-1^0^"" 50601^2^0^56015^""^-1^2^"56014" 50602^0^0^56013^""^-1^0^"" 50602^1^0^56014^""^-1^0^"" 50602^2^0^56016^""^-1^2^"56014" 50603^0^0^56013^""^-1^0^"" 50603^1^0^56014^""^-1^0^"" 50603^2^0^56017^""^-1^2^"56014" 50604^0^0^56013^""^-1^0^"" 50604^1^0^56014^""^-1^0^"" 50604^2^0^56018^""^-1^2^"56014" 50605^0^0^56013^""^-1^0^"" 50605^1^0^56014^""^-1^0^"" 50605^2^0^56019^""^-1^2^"56014" 50606^0^0^56020^""^-1^0^"" 50606^1^0^56021^""^-1^0^"" 50606^2^0^56022^""^-1^2^"56021" 50607^0^0^56023^""^-1^0^"" 50607^1^0^56024^""^-1^0^"" 50607^2^0^56025^""^-1^0^"" 50607^3^2^32^""^-1^0^"" 50608^0^0^56013^""^-1^0^"" 50608^1^0^56014^""^-1^0^"" 50608^2^0^56026^""^-1^2^"56014" 50609^0^0^56013^""^-1^0^"" 50609^1^0^56014^""^-1^0^"" 50609^2^0^56027^""^-1^2^"56014" 50610^0^0^56028^""^-1^0^"" 50610^1^0^56029^""^-1^0^"" 50611^0^0^56030^""^-1^0^"" 50612^0^0^56013^""^-1^0^"" 50612^1^0^56031^""^-1^0^"" 50612^2^0^56032^""^-1^2^"56031" 50613^0^0^56036^""^-1^0^"" 50613^1^0^56034^""^-1^0^"" 50613^2^0^56035^""^-1^2^"56034" 50615^0^1^50600^"Common"^-1^0^"" 50615^1^1^50600^"Control"^-1^0^"" 50700^0^0^57000^""^-1^0^"" 50700^1^0^57001^""^-1^0^"" 50700^2^2^32^""^-1^0^"" 50701^0^0^57002^""^-1^1^"4096" 50703^0^0^57003^""^-1^1^"4096" 50704^0^0^57006^""^-1^0^"" 50705^0^0^57005^""^-1^1^"4096" 50800^0^0^58000^""^-1^0^"" 50801^0^0^58001^""^-1^0^"" 50802^0^0^58002^""^-1^0^"" 50802^1^0^58003^""^-1^0^"" 50803^0^0^58004^""^-1^0^"" 50804^0^0^58005^""^-1^0^"" 50805^0^0^58002^""^-1^0^"" 50806^0^0^58004^""^-1^0^"" 50806^1^0^58002^""^-1^0^"" 50807^0^0^58006^""^-1^0^"" 50807^1^0^58007^""^-1^0^"" 50807^2^0^58008^""^-1^0^"" 50808^0^0^58009^""^-1^0^"" 50808^1^0^58003^""^-1^0^"" 50809^0^0^58010^""^-1^0^"" 50810^0^0^58011^""^-1^0^"" 50811^0^0^58012^""^-1^0^"" 50812^0^0^58013^""^-1^0^"" 50900^0^0^59000^""^-1^0^"" 50901^0^0^59001^""^-1^0^"" 50902^0^0^59002^""^-1^0^"" 50902^1^1^50903^"Services"^-1^2^"59002" 50903^0^0^59003^""^-1^0^"" 50903^1^0^59004^""^-1^0^"" 50903^2^0^59005^""^-1^0^"" 50904^0^0^59006^""^-1^0^"" 50904^1^0^59007^""^-1^9^"59006" 50904^2^0^59002^""^-1^0^"" 50904^3^1^50903^"Services"^-1^2^"59002" 50905^0^0^59003^""^-1^0^"" 50906^0^0^59003^""^-1^0^"" 50906^1^0^59008^""^-1^0^"" 50907^0^0^59009^""^-1^0^"" 50908^0^0^59010^""^-1^0^"" 50908^1^0^59011^""^-1^0^"" 50908^2^2^16^""^-1^0^"" 50909^0^0^59012^""^-1^0^"" 50910^0^0^59013^""^-1^0^"" 50910^1^0^59014^""^-1^0^"" 50911^0^0^59013^""^-1^0^"" 50911^1^0^59003^""^-1^0^"" 50912^0^0^59015^""^-1^1^"255" 50913^0^0^59013^""^-1^0^"" 60000^0^0^50263^""^-1^0^"" 60000^1^1^50021^"Instance"^-1^2^"50263" 60001^0^0^50263^""^-1^0^"" 60001^1^1^60002^"Instance"^-1^2^"50263" 60002^0^0^50264^""^-1^0^"" 60002^1^0^50265^""^-1^10^"50264" 60003^0^1^60013^""^-1^0^"" 60004^0^0^50266^""^-1^0^"" 60005^0^0^50263^""^-1^0^"" 60005^1^1^60006^"Instance"^-1^2^"50263" 60006^0^0^50267^""^-1^0^"" 60006^1^0^50268^""^-1^10^"50267" 60007^0^0^50269^""^-1^0^"" 60008^0^0^50270^""^-1^0^"" 60009^0^0^50271^""^-1^1^"4" 60010^0^1^60012^""^-1^0^"" 60011^0^1^60012^""^-1^0^"" 60012^0^1^60013^""^-1^0^"" 60012^1^1^60014^""^-1^0^"" 60013^0^6^0^""^-1^0^"" 60013^1^0^50275^""^-1^1^"8" 60014^0^0^50272^""^-1^0^"" 60015^0^0^50276^""^-1^0^"" 60016^0^0^50277^""^-1^0^"" 60017^0^0^50269^""^-1^0^"" 60018^0^0^50278^""^-1^0^"" 60018^1^0^50279^""^-1^0^"" 60018^2^0^50280^""^-1^0^"" 60018^3^0^50281^""^-1^1^"16" 60018^4^0^50282^""^-1^0^"" 60018^5^0^50283^""^-1^0^"" 60018^6^0^50284^""^-1^0^"" 60018^7^0^50285^""^-1^0^"" 60018^8^0^50286^""^-1^0^"" 60018^9^0^50287^""^-1^0^"" 60018^10^0^50288^""^-1^0^"" 60018^11^0^50289^""^-1^0^"" 60018^12^0^50290^""^-1^0^"" 60019^0^0^50278^""^-1^0^"" 60019^1^0^50279^""^-1^0^"" 60019^2^0^50280^""^-1^0^"" 60019^3^0^50281^""^-1^0^"" 60019^4^0^50282^""^-1^0^"" 60019^5^0^50283^""^-1^0^"" 60019^6^0^50284^""^-1^0^"" 60019^7^0^50285^""^-1^0^"" 60019^8^0^50286^""^-1^0^"" 60019^9^0^50287^""^-1^0^"" 60019^10^0^50288^""^-1^0^"" 60019^11^0^50289^""^-1^0^"" 60019^12^0^50290^""^-1^0^"" 60020^0^0^50291^""^-1^0^"" 60021^0^0^50292^""^-1^0^"" 60022^0^0^50293^""^-1^0^"" 60023^0^1^60058^""^-1^0^"" 60024^0^0^50135^""^-1^0^"" 60024^1^0^50136^""^-1^0^"" 60024^2^0^50137^""^-1^0^"" 60024^3^0^50138^""^-1^0^"" 60024^4^0^50139^""^-1^0^"" 60024^5^0^50140^""^-1^0^"" 60024^6^0^50141^""^-1^0^"" 60024^7^0^50142^""^-1^0^"" 60024^8^0^50143^""^-1^0^"" 60024^9^0^50144^""^-1^0^"" 60024^10^0^50145^""^-1^0^"" 60024^11^0^50146^""^-1^0^"" 60024^12^0^50294^""^-1^0^"" 60025^0^0^50135^""^-1^0^"" 60025^1^0^50136^""^-1^0^"" 60025^2^0^50137^""^-1^0^"" 60025^3^0^50138^""^-1^0^"" 60025^4^0^50139^""^-1^0^"" 60025^5^0^50140^""^-1^0^"" 60025^6^0^50141^""^-1^0^"" 60025^7^0^50142^""^-1^0^"" 60025^8^0^50143^""^-1^0^"" 60025^9^0^50144^""^-1^0^"" 60025^10^0^50145^""^-1^0^"" 60025^11^0^50146^""^-1^0^"" 60025^12^0^50294^""^-1^0^"" 60026^0^1^60058^""^-1^0^"" 60027^0^1^60058^""^-1^0^"" 60028^0^0^50295^""^-1^0^"" 60029^0^0^50296^""^-1^0^"" 60029^1^0^50139^""^-1^0^"" 60029^2^0^50137^""^-1^0^"" 60029^3^0^50138^""^-1^0^"" 60029^4^0^50136^""^-1^0^"" 60030^0^0^50297^""^-1^0^"" 60031^0^0^50298^""^-1^0^"" 60032^0^0^50299^""^-1^0^"" 60033^0^0^50300^""^-1^0^"" 60034^0^0^50301^""^-1^0^"" 60035^0^0^50301^""^-1^0^"" 60036^0^0^50301^""^-1^0^"" 60037^0^0^50302^""^-1^0^"" 60038^0^0^50302^""^-1^0^"" 60039^0^0^50302^""^-1^0^"" 60040^0^0^50303^""^-1^0^"" 60041^0^0^50122^""^-1^0^"" 60042^0^0^50123^""^-1^0^"" 60043^0^0^50304^""^-1^0^"" 60044^0^0^50305^""^-1^0^"" 60045^0^0^50306^""^-1^0^"" 60046^0^0^50307^""^-1^0^"" 60047^0^0^50119^""^-1^0^"" 60048^0^0^50308^""^-1^0^"" 60049^0^0^50309^""^-1^0^"" 60050^0^0^50271^""^-1^0^"" 60051^0^0^50271^""^-1^0^"" 60052^0^1^60058^""^-1^0^"" 60053^0^1^60058^""^-1^0^"" 60054^0^0^50310^""^-1^0^"" 60055^0^1^60058^""^-1^0^"" 60056^0^1^60058^""^-1^0^"" 60057^0^0^50311^""^-1^0^"" 60057^1^1^60058^""^-1^2^"50311" 60058^0^1^60013^""^-1^0^"" 60059^0^0^50297^""^-1^0^"" 60060^0^0^50298^""^-1^0^"" 60061^0^0^50299^""^-1^0^"" 60062^0^0^50300^""^-1^0^"" 60063^0^0^50301^""^-1^0^"" 60064^0^0^50301^""^-1^0^"" 60065^0^0^50301^""^-1^0^"" 60066^0^0^50302^""^-1^0^"" 60067^0^0^50302^""^-1^0^"" 60068^0^0^50302^""^-1^0^"" 60069^0^0^50303^""^-1^0^"" 60070^0^0^50122^""^-1^0^"" 60071^0^0^50123^""^-1^0^"" 60072^0^0^50304^""^-1^0^"" 60073^0^0^50305^""^-1^0^"" 60074^0^0^50306^""^-1^0^"" 60075^0^0^50307^""^-1^0^"" 60076^0^0^50119^""^-1^0^"" 60077^0^0^50308^""^-1^0^"" 60078^0^0^50309^""^-1^0^"" 60079^0^0^50271^""^-1^0^"" 60080^0^0^50271^""^-1^0^"" 60081^0^1^60058^""^-1^0^"" 60082^0^1^60058^""^-1^0^"" 60083^0^0^50310^""^-1^0^"" 60084^0^1^60058^""^-1^0^"" 60085^0^1^60058^""^-1^0^"" 60086^0^0^50276^""^-1^0^"" 60087^0^0^50277^""^-1^0^"" 60088^0^0^50269^""^-1^0^"" 60090^0^1^60058^""^-1^0^"" 70000^0^0^70000^""^-1^0^"" 70000^1^0^70001^""^-1^0^"" 70000^2^0^70002^""^-1^2^"70001" 70001^0^0^70003^""^-1^0^"" 70002^0^0^70004^""^-1^0^"" 70002^1^0^70005^""^-1^0^"" 70002^2^0^70006^""^-1^2^"70005" 70003^0^0^70007^""^-1^0^"" 70004^0^0^50001^""^-1^0^""libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Database/QMI/foo.c000066400000000000000000000000001455567757300234460ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiConnectionMgmt/000077500000000000000000000000001455567757300241245ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiConnectionMgmt/GobiConnectionMgmt.cpp000077500000000000000000002322711455567757300303670ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.cpp DESCRIPTION: QUALCOMM Connection Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Global object cGobiConnectionMgmtDLL gConnectionDLL; // Interval between traffic processing loop iterations (milliseconds) const ULONG TRAFFIC_INTERVAL_MS = 300000; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: TrafficProcessThread (Free Method) DESCRIPTION: QMI traffic process thread - processes all traffic in order to fire off QMI traffic related callbacks PARAMETERS: pArg [ I ] - Object to interface to RETURN VALUE: VOID * - always NULL ===========================================================================*/ VOID * TrafficProcessThread( PVOID pArg ) { // Keep running? bool bRun = false; TRACE( "GobiConnectionMgmt traffic thread [%u] started\n", (UINT)pthread_self() ); // Create a vector of the objects to wait on std::vector events; // Store the index to service type for use later std::map services; cGobiConnectionMgmt * pAPI = (cGobiConnectionMgmt *)pArg; if (pAPI != 0) { // Time to go to work bRun = true; // Add the thread exit event events.push_back( &pAPI->mExitEvent ); // For each Protocol server, grab the signal event std::set ::const_iterator pIter; pIter = pAPI->mServerConfig.begin(); while (pIter != pAPI->mServerConfig.end()) { eQMIService svc = pIter->first; cQMIProtocolServer * pServer = pAPI->GetServer( svc ); if (pServer != 0) { // Grab the log from the server const cProtocolLog & log = pServer->GetLog(); // Grab the Signal event, if it exists cEvent & sigEvent = log.GetSignalEvent(); services[events.size()] = svc; events.push_back( &sigEvent ); } pIter++; } } // Loop waiting for exit event while (bRun == true) { // Wait for activity DWORD ignoredVal, index; int nRet = WaitOnMultipleEvents( events, TRAFFIC_INTERVAL_MS, ignoredVal, index ); // Timeout if (nRet == -ETIME) { // Do nothing } // Error? else if (nRet <= 0) { TRACE( "GobiConnectionMgmt traffic thread wait error %d\n", nRet ); bRun = false; } // Exit event? else if (index == 0) { bRun = false; } else if (index < events.size()) { // Run ProcessTraffic() for this service type if (services.find( index ) != services.end()) { pAPI->ProcessTraffic( services[index] ); } } else { // Fatal error bRun = false; } } TRACE( "GobiConnectionMgmt traffic thread [%u] exited\n", (UINT)pthread_self() ); return NULL; } /*=========================================================================== METHOD: CallbackThread (Free Method) DESCRIPTION: Thread to execute a callback asynchronously PARAMETERS: pArg [ I ] - The cAsyncFunction object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * CallbackThread( PVOID pArg ) { cGobiCMCallback * pCB = (cGobiCMCallback *)pArg; if (pCB == 0) { ASSERT( 0 ); return 0; } pCB->Call(); delete pCB; pCB = 0; return 0; } /*=========================================================================*/ // cGobiConnectionMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmtDLL::cGobiConnectionMgmtDLL() : mpAPI( 0 ), mbAllocated( false ) { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~cGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmtDLL::~cGobiConnectionMgmtDLL() { // Just in case if (mpAPI != 0) { mpAPI->Cleanup(); delete mpAPI; mpAPI = 0; } pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the cGobiConnectionMgmt object RETURN VALUE: cGobiConnectionMgmt * ===========================================================================*/ cGobiConnectionMgmt * cGobiConnectionMgmtDLL::GetAPI() { pthread_mutex_lock( &mSyncSection ); bool bAlloc = mbAllocated; pthread_mutex_unlock( &mSyncSection ); if (bAlloc == true) { return mpAPI; } pthread_mutex_lock( &mSyncSection ); mpAPI = new cGobiConnectionMgmt(); if (mpAPI != 0) { mpAPI->Initialize(); } // We have tried to allocate the object mbAllocated = true; pthread_mutex_unlock( &mSyncSection ); return mpAPI; } /*=========================================================================*/ // cGobiConnectionMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::cGobiConnectionMgmt() : cGobiQMICore(), mbThreadStarted( false ), mThreadID( 0 ), mWDSItemsProcessed( 0 ), mDMSItemsProcessed( 0 ), mNASItemsProcessed( 0 ), mWMSItemsProcessed( 0 ), mPDSItemsProcessed( 0 ), mCATItemsProcessed( 0 ), mOMAItemsProcessed( 0 ), mVoiceItemsProcessed( 0 ), mpFNSessionState( 0 ), mpFNByteTotals( 0 ), mpFNDataCapabilities( 0 ), mpFNDataBearer( 0 ), mpFNDormancyStatus( 0 ), mpFNMobileIPStatus( 0 ), mpFNActivationStatus( 0 ), mpFNPower( 0 ), mpFNWirelessDisable( 0 ), mpFNRoamingIndicator( 0 ), mpFNSignalStrength( 0 ), mpFNRFInfo( 0 ), mpFNLUReject( 0 ), mpPLMNMode( 0 ), mpFNNewSMS( 0 ), mpFNNewNMEA( 0 ), mpFNPDSState( 0 ), mpFNCATEvent( 0 ), mpFNOMADMAlert( 0 ), mpFNOMADMState( 0 ), mpFNUSSDRelease( 0 ), mpFNUSSDNotification( 0 ), mpFNUSSDOrigination( 0 ) { tServerConfig wdsSvr( eQMI_SVC_WDS, true ); tServerConfig dmsSvr( eQMI_SVC_DMS, true ); tServerConfig nasSvr( eQMI_SVC_NAS, true ); tServerConfig wmsSvr( eQMI_SVC_WMS, true ); tServerConfig pdsSvr( eQMI_SVC_PDS, true ); tServerConfig catSvr( eQMI_SVC_CAT, false ); tServerConfig rmsSvr( eQMI_SVC_RMS, false ); tServerConfig omaSvr( eQMI_SVC_OMA, false ); tServerConfig voiceSvr( eQMI_SVC_VOICE, false ); mServerConfig.insert( wdsSvr ); mServerConfig.insert( dmsSvr ); mServerConfig.insert( nasSvr ); mServerConfig.insert( wmsSvr ); mServerConfig.insert( pdsSvr ); mServerConfig.insert( catSvr ); mServerConfig.insert( rmsSvr ); mServerConfig.insert( omaSvr ); mServerConfig.insert( voiceSvr ); } /*=========================================================================== METHOD: ~cGobiConnectionMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::~cGobiConnectionMgmt() { Disconnect(); } /*=========================================================================== METHOD: ProcessTraffic (Internal Method) DESCRIPTION: Process traffic in a QMI server protocol log, this is done to exercise QMI indication related callbacks PARAMETERS: svc [ I ] - QMI Service type RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessTraffic( eQMIService svc ) { ULONG count = 0; switch (svc) { case eQMI_SVC_WDS: { cQMIProtocolServer * pWDS = GetServer( eQMI_SVC_WDS ); if (pWDS != 0) { // Grab the WDS log from the server const cProtocolLog & logWDS = pWDS->GetLog(); // New WDS items to process? count = logWDS.GetCount(); if (count != INVALID_LOG_INDEX && count > mWDSItemsProcessed) { for (ULONG i = mWDSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logWDS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_WDS_RX) ) { ProcessWDSBuffer( buf ); } } mWDSItemsProcessed = count; } } break; } case eQMI_SVC_DMS: { cQMIProtocolServer * pDMS = GetServer( eQMI_SVC_DMS ); if (pDMS != 0) { // Grab the DMS log from the server const cProtocolLog & logDMS = pDMS->GetLog(); // New DMS items to process? count = logDMS.GetCount(); if (count != INVALID_LOG_INDEX && count > mDMSItemsProcessed) { for (ULONG i = mDMSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logDMS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_DMS_RX) ) { ProcessDMSBuffer( buf ); } } mDMSItemsProcessed = count; } } break; } case eQMI_SVC_NAS: { cQMIProtocolServer * pNAS = GetServer( eQMI_SVC_NAS ); if (pNAS != 0) { // Grab the NAS log from the server const cProtocolLog & logNAS = pNAS->GetLog(); // New NAS items to process? count = logNAS.GetCount(); if (count != INVALID_LOG_INDEX && count > mNASItemsProcessed) { for (ULONG i = mNASItemsProcessed; i < count; i++) { sProtocolBuffer buf = logNAS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_NAS_RX) ) { ProcessNASBuffer( buf ); } } mNASItemsProcessed = count; } } break; } case eQMI_SVC_WMS: { cQMIProtocolServer * pWMS = GetServer( eQMI_SVC_WMS ); if (pWMS != 0) { // Grab the WMS log from the server const cProtocolLog & logWMS = pWMS->GetLog(); // New WMS items to process? count = logWMS.GetCount(); if (count != INVALID_LOG_INDEX && count > mWMSItemsProcessed) { for (ULONG i = mWMSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logWMS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_WMS_RX) ) { ProcessWMSBuffer( buf ); } } mWMSItemsProcessed = count; } } break; } case eQMI_SVC_PDS: { cQMIProtocolServer * pPDS = GetServer( eQMI_SVC_PDS ); if (pPDS != 0) { // Grab the PDS log from the server const cProtocolLog & logPDS = pPDS->GetLog(); // New PDS items to process? count = logPDS.GetCount(); if (count != INVALID_LOG_INDEX && count > mPDSItemsProcessed) { for (ULONG i = mPDSItemsProcessed; i < count; i++) { sProtocolBuffer buf = logPDS.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_PDS_RX) ) { ProcessPDSBuffer( buf ); } } mPDSItemsProcessed = count; } } break; } case eQMI_SVC_CAT: { cQMIProtocolServer * pCAT = GetServer( eQMI_SVC_CAT ); if (pCAT != 0) { // Grab the CAT log from the server const cProtocolLog & logCAT = pCAT->GetLog(); // New CAT items to process? count = logCAT.GetCount(); if (count != INVALID_LOG_INDEX && count > mCATItemsProcessed) { for (ULONG i = mCATItemsProcessed; i < count; i++) { sProtocolBuffer buf = logCAT.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_CAT_RX) ) { ProcessCATBuffer( buf ); } } mCATItemsProcessed = count; } } break; } case eQMI_SVC_OMA: { cQMIProtocolServer * pOMA = GetServer( eQMI_SVC_OMA ); if (pOMA != 0) { // Grab the OMA log from the server const cProtocolLog & logOMA = pOMA->GetLog(); // New OMA items to process? count = logOMA.GetCount(); if (count != INVALID_LOG_INDEX && count > mOMAItemsProcessed) { for (ULONG i = mOMAItemsProcessed; i < count; i++) { sProtocolBuffer buf = logOMA.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_OMA_RX) ) { ProcessOMABuffer( buf ); } } mOMAItemsProcessed = count; } } break; } case eQMI_SVC_VOICE: { cQMIProtocolServer * pVoice = GetServer( eQMI_SVC_VOICE ); if (pVoice != 0) { // Grab the voice log from the server const cProtocolLog & logVoice = pVoice->GetLog(); // New voice items to process? count = logVoice.GetCount(); if (count != INVALID_LOG_INDEX && count > mVoiceItemsProcessed) { for (ULONG i = mVoiceItemsProcessed; i < count; i++) { sProtocolBuffer buf = logVoice.GetBuffer( i ); if ( (buf.IsValid() == true) && (buf.GetType() == (ULONG)ePROTOCOL_QMI_VOICE_RX) ) { ProcessVoiceBuffer( buf ); } } mVoiceItemsProcessed = count; } } break; } default: break; } } /*=========================================================================== METHOD: ProcessWDSBuffer (Internal Method) DESCRIPTION: Process a WDS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessWDSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == eQMI_WDS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out data bearer technology sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_IND, msgID, 23 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNDataBearer != 0) { cDataBearerCallback * pCB = 0; pCB = new cDataBearerCallback( mpFNDataBearer, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out dormancy status tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 24 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNDormancyStatus != 0) { cDormancyStatusCallback * pCB = 0; pCB = new cDormancyStatusCallback( mpFNDormancyStatus, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out byte totals tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 25 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { ULONGLONG tx = pf[0].mValue.mU64; ULONGLONG rx = ULLONG_MAX; tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 26 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { rx = pf[0].mValue.mU64; } if (mpFNByteTotals != 0) { cByteTotalsCallback * pCB = 0; pCB = new cByteTotalsCallback( mpFNByteTotals, tx, rx ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out mobile IP status tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 27 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNMobileIPStatus != 0) { cMobileIPStatusCallback * pCB = 0; pCB = new cMobileIPStatusCallback( mpFNMobileIPStatus, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } else if (msgID == eQMI_WDS_PKT_STATUS_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out session status sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_IND, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { ULONG ss = pf[0].mValue.mU32; ULONG cer = ULONG_MAX; // Parse out call end reason (if present) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_IND, msgID, 16 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { cer = pf[0].mValue.mU32; } if (mpFNSessionState != 0) { cSessionStateCallback * pCB = 0; pCB = new cSessionStateCallback( mpFNSessionState, ss, cer ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessDMSBuffer (Internal Method) DESCRIPTION: Process a DMS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessDMSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == eQMI_DMS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out activation status sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_IND, msgID, 19 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNActivationStatus != 0) { cActivationStatusCallback * pCB = 0; pCB = new cActivationStatusCallback( mpFNActivationStatus, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } // Parse out operating mode tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_IND, msgID, 20 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNPower != 0) { cPowerCallback * pCB = 0; pCB = new cPowerCallback( mpFNPower, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } // Parse out wireless disable state tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_IND, msgID, 22 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNWirelessDisable != 0) { cWirelessDisableCallback * pCB = 0; pCB = new cWirelessDisableCallback( mpFNWirelessDisable, pf[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } /*=========================================================================== METHOD: ProcessNASBuffer (Internal Method) DESCRIPTION: Process a NAS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessNASBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_NAS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse signal strength sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2) { INT8 sigVal = pf[0].mValue.mS8; ULONG radioVal = pf[1].mValue.mU32; bool bValidSig = (sigVal <= -30 && sigVal > -125 && radioVal != 0); if (bValidSig == true && mpFNSignalStrength != 0) { cSignalStrengthCallback * pCB = 0; pCB = new cSignalStrengthCallback( mpFNSignalStrength, pf[0].mValue.mS8, pf[1].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out RF info sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_IND, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( mDB, buf, tlvs, tlvKey2 ); ULONG fieldCount = (ULONG)pf2.size(); if (fieldCount >= 1 && mpFNRFInfo != 0) { BYTE ifaceCount = pf2[0].mValue.mU8; if (fieldCount >= 1 + ((ULONG)ifaceCount * 3)) { for (BYTE i = 0; i < ifaceCount; i++) { ULONG offset = 3 * (ULONG)i; cRFInfoCallback * pCB = 0; pCB = new cRFInfoCallback( mpFNRFInfo, pf2[offset + 1].mValue.mU32, pf2[offset + 2].mValue.mU32, (ULONG)pf2[offset + 3].mValue.mU16 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } // Parse out LU reject sProtocolEntityKey tlvKey3( eDB2_ET_QMI_NAS_IND, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( mDB, buf, tlvs, tlvKey3 ); if (pf3.size() >= 2 && mpFNLUReject != 0) { cLURejectCallback * pCB = 0; pCB = new cLURejectCallback( mpFNLUReject, pf3[0].mValue.mU32, (ULONG)pf3[1].mValue.mU16 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } else if (msgID == (ULONG)eQMI_NAS_SS_INFO_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out roaming indicator sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_IND, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( mDB, buf, tlvs, tlvKey1 ); if (pf1.size() >= 1) { if (mpFNRoamingIndicator != 0) { cRoamingIndicatorCallback * pCB = 0; pCB = new cRoamingIndicatorCallback( mpFNRoamingIndicator, pf1[0].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out data capabilities sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_IND, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( mDB, buf, tlvs, tlvKey2 ); if (pf2.size() >= 1) { BYTE activeDataCaps = pf2[0].mValue.mU8; if (pf2.size() >= 1 + (ULONG)activeDataCaps) { ULONG caps[12] = { 0 }; if (activeDataCaps > 12) { activeDataCaps = 12; } for (ULONG d = 0; d < activeDataCaps; d++) { caps[d] = pf2[1 + d].mValue.mU32; } if (mpFNDataCapabilities != 0) { cDataCapabilitiesCallback * pCB = 0; pCB = new cDataCapabilitiesCallback( mpFNDataCapabilities, activeDataCaps, &caps[0] ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } else if (msgID == (ULONG)eQMI_NAS_PLMN_MODE_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse PLMN mode sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { cPLMNModeCallback * pCB = 0; pCB = new cPLMNModeCallback( mpPLMNMode, (ULONG)pf[0].mValue.mU8 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } /*=========================================================================== METHOD: ProcessWMSBuffer (Internal Method) DESCRIPTION: Process a WDS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessWMSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_WMS_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2) { if (mpFNNewSMS != 0) { cNewSMSCallback * pCB = 0; pCB = new cNewSMSCallback( mpFNNewSMS, pf[0].mValue.mU32, pf[1].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessPDSBuffer (Internal Method) DESCRIPTION: Process a PDS buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessPDSBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_PDS_EVENT_IND) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1 && mpFNNewNMEA != 0) { cNewNMEACallback * pCB = 0; pCB = new cNewNMEACallback( mpFNNewNMEA, pf[0].mValueString ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } else if (msgID == (ULONG)eQMI_PDS_STATE_IND) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_IND, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2 && mpFNPDSState != 0) { cPDSStateCallback * pCB = 0; pCB = new cPDSStateCallback( mpFNPDSState, pf[0].mValue.mU32, pf[1].mValue.mU32 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } /*=========================================================================== METHOD: ProcessCATBuffer (Internal Method) DESCRIPTION: Process a CAT buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessCATBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_CAT_EVENT_IND && mpFNCATEvent != 0) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); ULONG tlvCount = (ULONG)tlvs.size(); for (ULONG t = 0; t < tlvCount; t++) { const sDB2NavInput tlv = tlvs[t]; if (tlv.mKey.size() == 3) { cCATEventCallback * pCB = 0; pCB = new cCATEventCallback( mpFNCATEvent, tlv.mKey[2], tlv.mPayloadLen, tlv.mpPayload ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessOMABuffer (Internal Method) DESCRIPTION: Process an OMA buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessOMABuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_OMA_EVENT_IND) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); // Parse out NIA sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 2) { if (mpFNOMADMAlert != 0) { cOMADMAlertCallback * pCB = 0; pCB = new cOMADMAlertCallback( mpFNOMADMAlert, pf[0].mValue.mU32, pf[1].mValue.mU16 ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } // Parse out failure reason (may not be present) ULONG failureReason = ULONG_MAX; tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_IND, msgID, 18 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { failureReason = pf[0].mValue.mU32; } // Parse out state tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_IND, msgID, 17 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { if (mpFNOMADMState != 0) { cOMADMStateCallback * pCB = 0; pCB = new cOMADMStateCallback( mpFNOMADMState, pf[0].mValue.mU32, failureReason ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } } } /*=========================================================================== METHOD: ProcessVoiceBuffer (Internal Method) DESCRIPTION: Process a voice buffer PARAMETERS: buf [ I ] - QMI buffer to process RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessVoiceBuffer( const sProtocolBuffer & buf ) { sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsValid() == false) { return; } // Indication? if (qmiBuf.IsIndication() == false) { return; } // Do we even care? ULONG msgID = qmiBuf.GetMessageID(); if (msgID == (ULONG)eQMI_VOICE_USSD_RELEASE_IND && mpFNUSSDRelease != 0) { cUSSDReleaseCallback * pCB = 0; pCB = new cUSSDReleaseCallback( mpFNUSSDRelease ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } else if (msgID == (ULONG)eQMI_VOICE_USSD_IND && mpFNUSSDNotification != 0) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); std::map tlvMap; tlvMap = qmiBuf.GetContents(); // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_VOICE_IND, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { const BYTE * pUSSData = 0; std::map ::const_iterator pIter; pIter = tlvMap.find( 16 ); if (pIter != tlvMap.end()) { const sQMIRawContentHeader * pHdr = pIter->second; ULONG len = (ULONG)pHdr->mLength; if (len >= (ULONG)2) { const BYTE * pData = (const BYTE *)++pHdr; if (len >= (ULONG)pData[1] + (ULONG)2) { pUSSData = pData; } } } cUSSDNotificationCallback * pCB = 0; pCB = new cUSSDNotificationCallback( mpFNUSSDNotification, pf[0].mValue.mU32, pUSSData ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } else if ( (msgID == (ULONG)eQMI_VOICE_ASYNC_USSD_IND) && (mpFNUSSDOrigination != 0) ) { // Prepare TLVs for extraction std::vector tlvs = DB2ReduceQMIBuffer( qmiBuf ); std::map tlvMap; tlvMap = qmiBuf.GetContents(); ULONG ec = ULONG_MAX; ULONG fc = ULONG_MAX; // Parse out message details sProtocolEntityKey tlvKey( eDB2_ET_QMI_VOICE_IND, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { ec = pf[0].mValue.mU32; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_VOICE_IND, msgID, 17 ); pf = ParseTLV( mDB, buf, tlvs, tlvKey ); if (pf.size() >= 1) { fc = pf[0].mValue.mU32; } const BYTE * pNetworkInfo = 0; std::map ::const_iterator pIter; pIter = tlvMap.find( 18 ); if (pIter != tlvMap.end()) { const sQMIRawContentHeader * pHdr = pIter->second; ULONG len = (ULONG)pHdr->mLength; if (len >= (ULONG)2) { const BYTE * pData = (const BYTE *)++pHdr; if (len >= (ULONG)pData[1] + (ULONG)2) { pNetworkInfo = pData; } } } const BYTE * pAlpha = 0; pIter = tlvMap.find( 19 ); if (pIter != tlvMap.end()) { const sQMIRawContentHeader * pHdr = pIter->second; ULONG len = (ULONG)pHdr->mLength; if (len >= (ULONG)2) { const BYTE * pData = (const BYTE *)++pHdr; if (len >= (ULONG)pData[1] + (ULONG)2) { pAlpha = pData; } } } cUSSDOriginationCallback * pCB = 0; pCB = new cUSSDOriginationCallback( mpFNUSSDOrigination, ec, fc, pNetworkInfo, pAlpha ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified (or first detected) Gobi device PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Connect( LPCSTR pDeviceNode, LPCSTR pDeviceKey ) { // Assume failure bool bRC = cGobiQMICore::Connect( pDeviceNode, pDeviceKey ); if (bRC == true) { // Clear mExitEvent; mExitEvent.Clear(); pthread_create( &mThreadID, NULL, TrafficProcessThread, this ); mbThreadStarted = true; } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Disconnect() { // Clear all callback function pointers (no need to turn them off at // the device as we are about to tear-down each QMI service client) mpFNSessionState = 0; mpFNByteTotals = 0; mpFNDataCapabilities = 0; mpFNDataBearer = 0; mpFNDormancyStatus = 0; mpFNMobileIPStatus = 0; mpFNActivationStatus = 0; mpFNPower = 0; mpFNWirelessDisable = 0; mpFNRoamingIndicator = 0; mpFNSignalStrength = 0; mpFNRFInfo = 0; mpFNLUReject = 0; mpPLMNMode = 0; mpFNNewSMS = 0; mpFNNewNMEA = 0; mpFNPDSState = 0; mpFNCATEvent = 0; mpFNOMADMAlert = 0; mpFNOMADMState = 0; mpFNUSSDRelease = 0; mpFNUSSDNotification = 0; mpFNUSSDOrigination = 0; // Exit traffic processing thread if (mbThreadStarted == true) { // Signal thread to exit mExitEvent.Set( 0 ); // If we are not being called from the thread itself then wait for // it to exit, if not then it will have to exit automatically if (pthread_self() != mThreadID) { if (mThreadID != 0) { pthread_join( mThreadID, NULL ); } } } // Clear out thread handle/ID mbThreadStarted = false; mThreadID = 0; bool bRC = cGobiQMICore::Disconnect(); // Servers reset server logs so we need to reset our counters mWDSItemsProcessed = 0; mDMSItemsProcessed = 0; mNASItemsProcessed = 0; mWMSItemsProcessed = 0; mPDSItemsProcessed = 0; mCATItemsProcessed = 0; mOMAItemsProcessed = 0; mVoiceItemsProcessed = 0; return bRC; } /*=========================================================================== METHOD: SetSessionStateCallback (Public Method) DESCRIPTION: Enable/disable session state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetSessionStateCallback( tFNSessionState pCallback ) { // We don't have to register for anything so a simple assignment works mpFNSessionState = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetByteTotalsCallback DESCRIPTION: This function enables/disables the RX/TX byte counts callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) interval [ I ] - Interval in seconds (ignored when disabling) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNByteTotals == 0); bool bOff = (pCallback == 0 && mpFNByteTotals != 0); bool bReplace = (pCallback != 0 && mpFNByteTotals != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); if (bOn == true) { std::ostringstream tmp; tmp << (ULONG)interval << " 0 0 0 0 0 0 1 1"; sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0 0 0 0 0 0 0 0 0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNByteTotals = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNByteTotals = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetDataCapabilitiesCallback (Public Method) DESCRIPTION: Enables/disables the serving system data capabilities callback PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Corrected error code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ) { // We don't have to register for anything so a simple assignment works mpFNDataCapabilities = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetDataBearerCallback (Public Method) DESCRIPTION: Enable/disable data bearer callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return cod ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetDataBearerCallback( tFNDataBearer pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNDataBearer == 0); bool bOff = (pCallback == 0 && mpFNDataBearer != 0); bool bReplace = (pCallback != 0 && mpFNDataBearer != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNDataBearer = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNDataBearer = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetDormancyStatusCallback (Public Method) DESCRIPTION: Enable/disable dormancy status callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetDormancyStatusCallback( tFNDormancyStatus pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNDormancyStatus == 0); bool bOff = (pCallback == 0 && mpFNDormancyStatus != 0); bool bReplace = (pCallback != 0 && mpFNDormancyStatus != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNDormancyStatus = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNDormancyStatus = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetMobileIPStatusCallback (Public Method) DESCRIPTION: Enable/disable mobile IP status callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetMobileIPStatusCallback( tFNMobileIPStatus pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNMobileIPStatus == 0); bool bOff = (pCallback == 0 && mpFNMobileIPStatus != 0); bool bReplace = (pCallback != 0 && mpFNMobileIPStatus != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WDS; WORD msgID = (WORD)eQMI_WDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNMobileIPStatus = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNMobileIPStatus = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetActivationStatusCallback (Public Method) DESCRIPTION: Enable/disable activation status callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetActivationStatusCallback( tFNActivationStatus pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNActivationStatus == 0); bool bOff = (pCallback == 0 && mpFNActivationStatus != 0); bool bReplace = (pCallback != 0 && mpFNActivationStatus != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_DMS; WORD msgID = (WORD)eQMI_DMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 19 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNActivationStatus = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNActivationStatus = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetPowerCallback (Public Method) DESCRIPTION: Enable/disable power operating mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetPowerCallback( tFNPower pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNPower == 0); bool bOff = (pCallback == 0 && mpFNPower != 0); bool bReplace = (pCallback != 0 && mpFNPower != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_DMS; WORD msgID = (WORD)eQMI_DMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 20 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNPower = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNPower = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetWirelessDisableCallback (Public Method) DESCRIPTION: Enable/disable wireless disable state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetWirelessDisableCallback( tFNWirelessDisable pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNWirelessDisable == 0); bool bOff = (pCallback == 0 && mpFNWirelessDisable != 0); bool bReplace = (pCallback != 0 && mpFNWirelessDisable != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_DMS; WORD msgID = (WORD)eQMI_DMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 22 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNWirelessDisable = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNWirelessDisable = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetRoamingIndicatorCallback (Public Method) DESCRIPTION: Enable/disable roaming indicator callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Corrected error code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ) { // We don't have to register for anything so a simple assignment works mpFNRoamingIndicator = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSignalStrengthCallback (Public Method) DESCRIPTION: Enable/disable signal strength callback function PARAMETERS: pCallback [ I ] - Callback function thresholds [ I ] - Desired threholds (only valid when enabling) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetSignalStrengthCallback( tFNSignalStrength pCallback, std::list thresholds ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Grab number of thresholds ULONG thresholdCount = (ULONG)thresholds.size(); // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNSignalStrength == 0); if (bOn == true && thresholdCount == 0) { rc = eGOBI_ERR_INVALID_ARG; return rc; } bool bOff = (pCallback == 0 && mpFNSignalStrength != 0); if (bOff == true && thresholdCount != 0) { rc = eGOBI_ERR_INVALID_ARG; return rc; } bool bReplace = (pCallback != 0 && mpFNSignalStrength != 0); if (bReplace == true && thresholdCount == 0) { rc = eGOBI_ERR_INVALID_ARG; return rc; } eQMIService svc = eQMI_SVC_NAS; WORD msgID = (WORD)eQMI_NAS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); if (bOn == true || bOff == true || bReplace == true) { if (bOn == true || bReplace == true) { std::ostringstream args; args << "1 " << (UINT)thresholdCount; std::list ::const_iterator pThreshold = thresholds.begin(); while (pThreshold != thresholds.end()) { INT8 t = *pThreshold++; args << " " << (INT)t; } sDB2PackingInput pi( pek, (LPCSTR)args.str().c_str() ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0 0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true || bReplace == true) { mpFNSignalStrength = pCallback; } } else { // Turning it off redundantly if (thresholdCount != 0) { rc = eGOBI_ERR_INVALID_ARG; } else { rc = eGOBI_ERR_NONE; } } return rc; } /*=========================================================================== METHOD: SetRFInfoCallback (Public Method) DESCRIPTION: Enable/disable RF information callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetRFInfoCallback( tFNRFInfo pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNRFInfo == 0); bool bOff = (pCallback == 0 && mpFNRFInfo != 0); bool bReplace = (pCallback != 0 && mpFNRFInfo != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_NAS; WORD msgID = (WORD)eQMI_NAS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 17 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNRFInfo = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNRFInfo = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetLURejectCallback (Public Method) DESCRIPTION: Enable/disable LU reject callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetLURejectCallback( tFNLUReject pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNLUReject == 0); bool bOff = (pCallback == 0 && mpFNLUReject != 0); bool bReplace = (pCallback != 0 && mpFNLUReject != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_NAS; WORD msgID = (WORD)eQMI_NAS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 18 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNLUReject = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNLUReject = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetPLMNModeCallback (Public Method) DESCRIPTION: Enable/disable PLMN mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetPLMNModeCallback( tFNPLMNMode pCallback ) { // We don't have to register for anything so a simple assignment works mpPLMNMode = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetNewSMSCallback (Public Method) DESCRIPTION: Enable/disable new SMS callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetNewSMSCallback( tFNNewSMS pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNNewSMS == 0); bool bOff = (pCallback == 0 && mpFNNewSMS != 0); bool bReplace = (pCallback != 0 && mpFNNewSMS != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_WMS; WORD msgID = (WORD)eQMI_WMS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNNewSMS = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNNewSMS = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetNMEACallback (Public Method) DESCRIPTION: Enable/disable new NMEA sentence function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetNMEACallback( tFNNewNMEA pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNNewNMEA == 0); bool bOff = (pCallback == 0 && mpFNNewNMEA != 0); bool bReplace = (pCallback != 0 && mpFNNewNMEA != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_PDS; WORD msgID = (WORD)eQMI_PDS_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNNewNMEA = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNNewNMEA = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetPDSStateCallback (Public Method) DESCRIPTION: Enable/disable PDS service state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetPDSStateCallback( tFNPDSState pCallback ) { // We don't have to register for anything so a simple assignment works mpFNPDSState = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetCATEventCallback (Public Method) DESCRIPTION: This function enables/disables the CAT event callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) eventMask [ I ] - Bitmask of CAT events to register for pErrorMask [ O ] - Error bitmask RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ) { // Assume failure eGobiError retCode = eGOBI_ERR_GENERAL; *pErrorMask = ULONG_MAX; // Validate arguments versus what is changing bool bOn = (pCallback != 0 && mpFNCATEvent == 0); bool bOff = (pCallback == 0 && mpFNCATEvent != 0); bool bReplace = (pCallback != 0 && mpFNCATEvent != 0); if (bOn == true || bOff == true || bReplace == true) { const ULONG szTLVHdr = (ULONG)sizeof( sQMIRawContentHeader ); const ULONG szData = (ULONG)sizeof( ULONG ); BYTE buf[szTLVHdr + szData]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&buf[0]; pTLV->mTypeID = 16; pTLV->mLength = (WORD)szData; ULONG * pData = (ULONG *)&buf[szTLVHdr]; *pData = eventMask; if (bOff == true) { // Ignore event mask argument when disabling the callback *pData = 0; // We also always clear the callback regardless of the response mpFNCATEvent = pCallback; } sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_CAT, (WORD)eQMI_CAT_SET_EVENT, false, false, &buf[0], szTLVHdr + szData ); sProtocolBuffer rsp = Send( eQMI_SVC_CAT, pReq ); if (rsp.IsValid() == false) { retCode = GetCorrectedLastError(); return retCode; } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { retCode = eGOBI_ERR_MALFORMED_RSP; return retCode; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { retCode = eGOBI_ERR_MALFORMED_RSP; return retCode; } else if (rc != 0) { // Parse out the error mask? if (qmiRsp.GetMessageID() == (ULONG)eQMI_CAT_SET_EVENT) { std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr->mLength > 4) { pData = (ULONG *)++pHdr; *pErrorMask = *pData; } } } retCode = GetCorrectedQMIError( ec ); return retCode; } // Success! mpFNCATEvent = pCallback; retCode = eGOBI_ERR_NONE; } else { // Turning it off redundantly retCode = eGOBI_ERR_NONE; } return retCode; } /*=========================================================================== METHOD: SetOMADMAlertCallback (Public Method) DESCRIPTION: This function enables/disables the OMA-DM network initiated alert callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetOMADMAlertCallback( tFNOMADMAlert pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNOMADMAlert == 0); bool bOff = (pCallback == 0 && mpFNOMADMAlert != 0); bool bReplace = (pCallback != 0 && mpFNOMADMAlert != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_OMA; WORD msgID = (WORD)eQMI_OMA_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNOMADMAlert = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNOMADMAlert = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetOMADMStateCallback (Public Method) DESCRIPTION: This function enables/disables the OMA-DM state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetOMADMStateCallback( tFNOMADMState pCallback ) { // Assume failure eGobiError rc = eGOBI_ERR_GENERAL; // Something changing? bool bOn = (pCallback != 0 && mpFNOMADMState == 0); bool bOff = (pCallback == 0 && mpFNOMADMState != 0); bool bReplace = (pCallback != 0 && mpFNOMADMState != 0); if (bOn == true || bOff == true) { // Turning on/off eQMIService svc = eQMI_SVC_OMA; WORD msgID = (WORD)eQMI_OMA_SET_EVENT; sSharedBuffer * pReq = 0; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 17 ); if (bOn == true) { sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); } else { sDB2PackingInput pi( pek, "0" ); piv.push_back( pi ); } pReq = DB2PackQMIBuffer( mDB, piv ); rc = SendAndCheckReturn( svc, pReq ); if (rc == eGOBI_ERR_NONE || bOff == true) { mpFNOMADMState = pCallback; } } else if (bReplace == true) { // We don't have to register for anything so a simple assignment works mpFNOMADMState = pCallback; rc = eGOBI_ERR_NONE; } else { // Turning it off redundantly rc = eGOBI_ERR_NONE; } return rc; } /*=========================================================================== METHOD: SetUSSDReleaseCallback (Public Method) DESCRIPTION: Enable/disable USSD release callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetUSSDReleaseCallback( tFNUSSDRelease pCallback ) { // We don't have to register for anything so a simple assignment works mpFNUSSDRelease = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetUSSDNotificationCallback (Public Method) DESCRIPTION: Enable/disable USSD notification callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetUSSDNotificationCallback( tFNUSSDNotification pCallback ) { // We don't have to register for anything so a simple assignment works mpFNUSSDNotification = pCallback; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetUSSDOriginationCallback (Public Method) DESCRIPTION: Enable/disable USSD origination callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ) { // We don't have to register for anything so a simple assignment works mpFNUSSDOrigination = pCallback; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiConnectionMgmt/GobiConnectionMgmt.h000077500000000000000000001135551455567757300300370ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.h DESCRIPTION: QUALCOMM Connection Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- extern "C" { // Session state callback function typedef void (* tFNSessionState)( ULONG state, ULONG sessionEndReason ); // RX/TX byte counts callback function typedef void (* tFNByteTotals)( ULONGLONG totalBytesTX, ULONGLONG totalBytesRX ); // Dormancy status callback function typedef void (* tFNDormancyStatus)( ULONG dormancyStatus ); // Mobile IP status callback function typedef void (* tFNMobileIPStatus)( ULONG mipStatus ); // Activation status callback function typedef void (* tFNActivationStatus)( ULONG activationStatus ); // Power operating mode callback function typedef void (* tFNPower)( ULONG operatingMode ); // Wireless disable callback function typedef void (* tFNWirelessDisable)( ULONG bState ); // Serving system data capabilities callback function typedef void (* tFNDataCapabilities)( BYTE dataCapsSize, BYTE * pDataCaps ); // Data bearer technology callback function typedef void (* tFNDataBearer)( ULONG dataBearer ); // Roaming indicator callback function typedef void (* tFNRoamingIndicator)( ULONG roaming ); // Signal strength callback function typedef void (* tFNSignalStrength)( INT8 signalStrength, ULONG radioInterface ); // RF information callback function typedef void (* tFNRFInfo)( ULONG radioInterface, ULONG activeBandClass, ULONG activeChannel ); // LU reject callback function typedef void (* tFNLUReject)( ULONG serviceDomain, ULONG rejectCause ); // PLMN mode callback function typedef void (* tFNPLMNMode)( ULONG mode ); // New SMS message callback function typedef void (* tFNNewSMS)( ULONG storageType, ULONG messageIndex ); // New NMEA sentence callback function typedef void (* tFNNewNMEA)( LPCSTR pNMEA ); // PDS session state callback function typedef void (* tFNPDSState)( ULONG enabledStatus, ULONG trackingStatus ); // CAT event callback function typedef void (* tFNCATEvent)( ULONG eventID, ULONG eventLen, BYTE * pEventData ); // OMA-DM network initiated alert callback function typedef void (* tFNOMADMAlert)( ULONG sessionType, USHORT sessionID ); // OMA-DM state callback function typedef void (* tFNOMADMState)( ULONG sessionState, ULONG failureReason ); // USSD release callback function typedef void (* tFNUSSDRelease)(); // USSD notification callback function typedef void (* tFNUSSDNotification)( ULONG type, BYTE * pNetworkInfo ); // USSD origination callback function typedef void (* tFNUSSDOrigination)( ULONG errorCode, ULONG failureCause, BYTE * pNetworkInfo, BYTE * pAlpha ); }; // CallbackThread prototype // Thread to execute a callback asynchronously void * CallbackThread( PVOID pArg ); /*=========================================================================*/ // Class cGobiCMCallback /*=========================================================================*/ class cGobiCMCallback { public: // (Inline) Constructor cGobiCMCallback() { }; // (Inline) Destructor virtual ~cGobiCMCallback() { }; // (Inline) Initialize the callback object by starting the thread bool Initialize() { // Start the thread pthread_t threadID; pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); int nRC = pthread_create( &threadID, &attributes, CallbackThread, this ); if (nRC == 0) { // Success! return true; } return false; }; protected: // Call the function virtual void Call() = 0; // Function thread gets full access friend void * CallbackThread( PVOID pArg ); }; /*=========================================================================*/ // Class cSessionStateCallback /*=========================================================================*/ class cSessionStateCallback : public cGobiCMCallback { public: // (Inline) Constructor cSessionStateCallback( tFNSessionState pCallback, ULONG state, ULONG sessionEndReason ) : mpCallback( pCallback ), mState( state ), mSessionEndReason( sessionEndReason ) { }; // (Inline) Destructor virtual ~cSessionStateCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mState, mSessionEndReason ); } }; /* Callback function */ tFNSessionState mpCallback; /* Callback arguments */ ULONG mState; ULONG mSessionEndReason; }; /*=========================================================================*/ // Class cByteTotalsCallback /*=========================================================================*/ class cByteTotalsCallback : public cGobiCMCallback { public: // (Inline) Constructor cByteTotalsCallback( tFNByteTotals pCallback, ULONGLONG totalBytesTX, ULONGLONG totalBytesRX ) : mpCallback( pCallback ), mTotalBytesTX( totalBytesTX ), mTotalBytesRX( totalBytesRX ) { }; // (Inline) Destructor virtual ~cByteTotalsCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mTotalBytesTX, mTotalBytesRX ); } }; /* Callback function */ tFNByteTotals mpCallback; /* Callback arguments */ ULONGLONG mTotalBytesTX; ULONGLONG mTotalBytesRX; }; /*=========================================================================*/ // Class cDormancyStatusCallback /*=========================================================================*/ class cDormancyStatusCallback : public cGobiCMCallback { public: // (Inline) Constructor cDormancyStatusCallback( tFNDormancyStatus pCallback, ULONG dormancyStatus ) : mpCallback( pCallback ), mDormancyStatus( dormancyStatus ) { }; // (Inline) Destructor virtual ~cDormancyStatusCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mDormancyStatus ); } }; /* Callback function */ tFNDormancyStatus mpCallback; /* Callback arguments */ ULONG mDormancyStatus; }; /*=========================================================================*/ // Class cMobileIPStatusCallback /*=========================================================================*/ class cMobileIPStatusCallback : public cGobiCMCallback { public: // (Inline) Constructor cMobileIPStatusCallback( tFNMobileIPStatus pCallback, ULONG mobileIPStatus ) : mpCallback( pCallback ), mMobileIPStatus( mobileIPStatus ) { }; // (Inline) Destructor virtual ~cMobileIPStatusCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mMobileIPStatus ); } }; /* Callback function */ tFNMobileIPStatus mpCallback; /* Callback arguments */ ULONG mMobileIPStatus; }; /*=========================================================================*/ // Class cActivationStatusCallback /*=========================================================================*/ class cActivationStatusCallback : public cGobiCMCallback { public: // (Inline) Constructor cActivationStatusCallback( tFNActivationStatus pCallback, ULONG activationStatus ) : mpCallback( pCallback ), mActivationStatus( activationStatus ) { }; // (Inline) Destructor virtual ~cActivationStatusCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mActivationStatus ); } }; /* Callback function */ tFNActivationStatus mpCallback; /* Callback arguments */ ULONG mActivationStatus; }; /*=========================================================================*/ // Class cPowerCallback /*=========================================================================*/ class cPowerCallback : public cGobiCMCallback { public: // (Inline) Constructor cPowerCallback( tFNPower pCallback, ULONG operatingMode ) : mpCallback( pCallback ), mOperatingMode( operatingMode ) { }; // (Inline) Destructor virtual ~cPowerCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mOperatingMode ); } }; /* Callback function */ tFNPower mpCallback; /* Callback arguments */ ULONG mOperatingMode; }; /*=========================================================================*/ // Class cWirelessDisableCallback /*=========================================================================*/ class cWirelessDisableCallback : public cGobiCMCallback { public: // (Inline) Constructor cWirelessDisableCallback( tFNWirelessDisable pCallback, ULONG bState ) : mpCallback( pCallback ), mbState( bState ) { }; // (Inline) Destructor virtual ~cWirelessDisableCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mbState ); } }; /* Callback function */ tFNWirelessDisable mpCallback; /* Callback arguments */ ULONG mbState; }; /*=========================================================================*/ // Class cDataCapabilitiesCallback /*=========================================================================*/ class cDataCapabilitiesCallback : public cGobiCMCallback { public: // (Inline) Constructor cDataCapabilitiesCallback( tFNDataCapabilities pCallback, BYTE dataCapsSize, ULONG * pDataCaps ) : mpCallback( pCallback ), mDataCapsSize( dataCapsSize ) { memset( (LPVOID)&mDataCaps[0], 0, 12 * sizeof( ULONG ) ); if (mDataCapsSize > 12) { mDataCapsSize = 12; } for (ULONG d = 0; d < mDataCapsSize; d++) { mDataCaps[d] = pDataCaps[d]; } }; // (Inline) Destructor virtual ~cDataCapabilitiesCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mDataCapsSize, (BYTE *)&mDataCaps[0] ); } }; /* Callback function */ tFNDataCapabilities mpCallback; /* Callback arguments */ BYTE mDataCapsSize; ULONG mDataCaps[12]; }; /*=========================================================================*/ // Class cDataBearerCallback /*=========================================================================*/ class cDataBearerCallback : public cGobiCMCallback { public: // (Inline) Constructor cDataBearerCallback( tFNDataBearer pCallback, ULONG dataBearer ) : mpCallback( pCallback ), mDataBearer( dataBearer ) { }; // (Inline) Destructor virtual ~cDataBearerCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mDataBearer ); } }; /* Callback function */ tFNDataBearer mpCallback; /* Callback arguments */ ULONG mDataBearer; }; /*=========================================================================*/ // Class cRoamingIndicatorCallback /*=========================================================================*/ class cRoamingIndicatorCallback : public cGobiCMCallback { public: // (Inline) Constructor cRoamingIndicatorCallback( tFNRoamingIndicator pCallback, ULONG roaming ) : mpCallback( pCallback ), mRoaming( roaming ) { }; // (Inline) Destructor virtual ~cRoamingIndicatorCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mRoaming ); } }; /* Callback function */ tFNRoamingIndicator mpCallback; /* Callback arguments */ ULONG mRoaming; }; /*=========================================================================*/ // Class cSignalStrengthCallback /*=========================================================================*/ class cSignalStrengthCallback : public cGobiCMCallback { public: // (Inline) Constructor cSignalStrengthCallback( tFNSignalStrength pCallback, INT8 signalStrength, ULONG radioInterface ) : mpCallback( pCallback ), mSignalStrength( signalStrength ), mRadioInterface( radioInterface ) { }; // (Inline) Destructor virtual ~cSignalStrengthCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mSignalStrength, mRadioInterface ); } }; /* Callback function */ tFNSignalStrength mpCallback; /* Callback arguments */ INT8 mSignalStrength; ULONG mRadioInterface; }; /*=========================================================================*/ // Class cRFInfoCallback /*=========================================================================*/ class cRFInfoCallback : public cGobiCMCallback { public: // (Inline) Constructor cRFInfoCallback( tFNRFInfo pCallback, ULONG radioInterface, ULONG activeBandClass, ULONG activeChannel ) : mpCallback( pCallback ), mRadioInterface( radioInterface ), mActiveBandClass( activeBandClass ), mActiveChannel( activeChannel ) { }; // (Inline) Destructor virtual ~cRFInfoCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mRadioInterface, mActiveBandClass, mActiveChannel ); } }; /* Callback function */ tFNRFInfo mpCallback; /* Callback arguments */ ULONG mRadioInterface; ULONG mActiveBandClass; ULONG mActiveChannel; }; /*=========================================================================*/ // Class cLURejectCallback /*=========================================================================*/ class cLURejectCallback : public cGobiCMCallback { public: // (Inline) Constructor cLURejectCallback( tFNLUReject pCallback, ULONG serviceDomain, ULONG rejectCause ) : mpCallback( pCallback ), mServiceDomain( serviceDomain ), mRejectCause( rejectCause ) { }; // (Inline) Destructor virtual ~cLURejectCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mServiceDomain, mRejectCause ); } }; /* Callback function */ tFNLUReject mpCallback; /* Callback arguments */ ULONG mServiceDomain; ULONG mRejectCause; }; /*=========================================================================*/ // Class cPLMNModeCallback /*=========================================================================*/ class cPLMNModeCallback : public cGobiCMCallback { public: // (Inline) Constructor cPLMNModeCallback( tFNPLMNMode pCallback, ULONG mode ) : mpCallback( pCallback ), mMode( mode ) { }; // (Inline) Destructor virtual ~cPLMNModeCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mMode ); } }; /* Callback function */ tFNPLMNMode mpCallback; /* Callback arguments */ ULONG mMode; }; /*=========================================================================*/ // Class cNewSMSCallback /*=========================================================================*/ class cNewSMSCallback : public cGobiCMCallback { public: // (Inline) Constructor cNewSMSCallback( tFNNewSMS pCallback, ULONG storageType, ULONG messageIndex ) : mpCallback( pCallback ), mStorageType( storageType ), mMessageIndex( messageIndex ) { }; // (Inline) Destructor virtual ~cNewSMSCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mStorageType, mMessageIndex ); } }; /* Callback function */ tFNNewSMS mpCallback; /* Callback arguments */ ULONG mStorageType; ULONG mMessageIndex; }; /*=========================================================================*/ // Class cNewNMEACallback /*=========================================================================*/ class cNewNMEACallback : public cGobiCMCallback { public: // (Inline) Constructor cNewNMEACallback( tFNNewNMEA pCallback, std::string & nmea ) : mpCallback( pCallback ) { memset( (LPVOID)&mNMEA[0], 0, 512 ); ULONG len = nmea.size(); if (len > 0 && len < 512) { memcpy( (LPVOID)&mNMEA[0], (LPCVOID)nmea.c_str(), (SIZE_T)len ); } }; // (Inline) Destructor virtual ~cNewNMEACallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0 && mNMEA[0] != 0) { mpCallback( &mNMEA[0] ); } }; /* Callback function */ tFNNewNMEA mpCallback; /* Callback arguments */ CHAR mNMEA[512]; }; /*=========================================================================*/ // Class cPDSStateCallback /*=========================================================================*/ class cPDSStateCallback : public cGobiCMCallback { public: // (Inline) Constructor cPDSStateCallback( tFNPDSState pCallback, ULONG enabledState, ULONG trackingState ) : mpCallback( pCallback ), mEnabledState( enabledState ), mTrackingState( trackingState ) { }; // (Inline) Destructor virtual ~cPDSStateCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mEnabledState, mTrackingState ); } }; /* Callback function */ tFNPDSState mpCallback; /* Callback arguments */ ULONG mTrackingState; ULONG mEnabledState; }; /*=========================================================================*/ // Class cCATEventCallback /*=========================================================================*/ class cCATEventCallback : public cGobiCMCallback { public: // (Inline) Constructor cCATEventCallback( tFNCATEvent pCallback, ULONG eventID, ULONG eventLen, const BYTE * pEventData ) : mpCallback( pCallback ), mEventID( eventID ), mEventLen( 0 ) { memset( (LPVOID)&mData[0], 0, 2048 ); if (pEventData != 0 && eventLen > 0 && eventLen < 2048) { mEventLen = eventLen; memcpy( (LPVOID)&mData[0], (LPCVOID)pEventData, (SIZE_T)eventLen ); } }; // (Inline) Destructor virtual ~cCATEventCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mEventID, mEventLen, &mData[0] ); } }; /* Callback function */ tFNCATEvent mpCallback; /* Callback arguments */ ULONG mEventID; ULONG mEventLen; BYTE mData[2048]; }; /*=========================================================================*/ // Class cOMADMAlertCallback /*=========================================================================*/ class cOMADMAlertCallback : public cGobiCMCallback { public: // (Inline) Constructor cOMADMAlertCallback( tFNOMADMAlert pCallback, ULONG sessionType, USHORT sessionID ) : mpCallback( pCallback ), mSessionType( sessionType ), mSessionID( sessionID ) { }; // (Inline) Destructor virtual ~cOMADMAlertCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mSessionType, mSessionID ); } }; /* Callback function */ tFNOMADMAlert mpCallback; /* Callback arguments */ ULONG mSessionType; USHORT mSessionID; }; /*=========================================================================*/ // Class cOMADMStateCallback /*=========================================================================*/ class cOMADMStateCallback : public cGobiCMCallback { public: // (Inline) Constructor cOMADMStateCallback( tFNOMADMState pCallback, ULONG sessionState, ULONG failureReason ) : mpCallback( pCallback ), mSessionState( sessionState ), mFailureReason( failureReason ) { }; // (Inline) Destructor virtual ~cOMADMStateCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mSessionState, mFailureReason ); } }; /* Callback function */ tFNOMADMState mpCallback; /* Callback arguments */ ULONG mSessionState; ULONG mFailureReason; }; /*=========================================================================*/ // Class cUSSDReleaseCallback /*=========================================================================*/ class cUSSDReleaseCallback : public cGobiCMCallback { public: // (Inline) Constructor cUSSDReleaseCallback( tFNUSSDRelease pCallback ) : mpCallback( pCallback ) { }; // (Inline) Destructor virtual ~cUSSDReleaseCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { mpCallback(); } }; /* Callback function */ tFNUSSDRelease mpCallback; }; /*=========================================================================*/ // Class cUSSDNotificationCallback /*=========================================================================*/ class cUSSDNotificationCallback : public cGobiCMCallback { public: // (Inline) Constructor cUSSDNotificationCallback( tFNUSSDNotification pCallback, ULONG type, const BYTE * pData ) : mpCallback( pCallback ), mType( type ), mbData( false ) { memset( (LPVOID)&mData[0], 0, 512 ); // Data to copy? if (pData != 0) { ULONG len = (ULONG)pData[1] + (ULONG)2; memcpy( (LPVOID)&mData[0], (LPCVOID)pData, (SIZE_T)len ); mbData = true; } }; // (Inline) Destructor virtual ~cUSSDNotificationCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { if (mbData == true) { mpCallback( mType, &mData[0] ); } else { mpCallback( mType, 0 ); } } }; /* Callback function */ tFNUSSDNotification mpCallback; /* Callback arguments */ ULONG mType; BYTE mData[512]; /* Did we get data? */ bool mbData; }; /*=========================================================================*/ // Class cUSSDOriginationCallback /*=========================================================================*/ class cUSSDOriginationCallback : public cGobiCMCallback { public: // (Inline) Constructor cUSSDOriginationCallback( tFNUSSDOrigination pCallback, ULONG errorCode, ULONG failureCause, const BYTE * pNetworkInfo, const BYTE * pAlpha ) : mpCallback( pCallback ), mErrorCode( errorCode ), mFailureCause( failureCause ), mbNetwork( false ), mbAlpha( 0 ) { memset( &mNetworkInfo[0], 0, 512 ); memset( &mAlpha[0], 0, 512 ); // Data to copy? if (pNetworkInfo != 0) { ULONG len = (ULONG)pNetworkInfo[1] + (ULONG)2; memcpy( &mNetworkInfo[0], pNetworkInfo, len ); mbNetwork = true; } if (pAlpha != 0) { ULONG len = (ULONG)pAlpha[1] + (ULONG)2; memcpy( &mAlpha[0], pAlpha, len ); mbAlpha = true; } }; // (Inline) Destructor virtual ~cUSSDOriginationCallback() { mpCallback = 0; }; protected: // (Inline) Call the function virtual void Call() { if (mpCallback != 0) { BYTE * pNetworkInfo = (mbNetwork == true ? &mNetworkInfo[0] : 0); BYTE * pAlpha = (mbAlpha == true ? &mAlpha[0] : 0); mpCallback( mErrorCode, mFailureCause, pNetworkInfo, pAlpha ); } }; /* Callback function */ tFNUSSDOrigination mpCallback; /* Callback arguments */ ULONG mErrorCode; ULONG mFailureCause; BYTE mNetworkInfo[512]; BYTE mAlpha[512]; /* Did we get data? */ bool mbNetwork; bool mbAlpha; }; /*=========================================================================*/ // Class cGobiConnectionMgmt /*=========================================================================*/ class cGobiConnectionMgmt : public cGobiQMICore { public: // Constructor cGobiConnectionMgmt(); // Destructor virtual ~cGobiConnectionMgmt(); // Connect to the specified Gobi device virtual bool Connect( LPCSTR pDeviceNode = 0, LPCSTR pDeviceKey = 0 ); // Disconnect from the currently connected Gobi device virtual bool Disconnect(); // Enable/disable session state callback function eGobiError SetSessionStateCallback( tFNSessionState pCallback ); // Enables/disables the RX/TX byte counts callback function eGobiError SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ); // Enables/disables the serving system data capabilities callback eGobiError SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ); // Enable/disable data bearer callback function eGobiError SetDataBearerCallback( tFNDataBearer pCallback ); // Enable/disable dormancy status callback function eGobiError SetDormancyStatusCallback( tFNDormancyStatus pCallback ); // Enable/disable mobile IP status callback function eGobiError SetMobileIPStatusCallback( tFNDormancyStatus pCallback ); // Enable/disable activation status callback function eGobiError SetActivationStatusCallback( tFNActivationStatus pCallback ); // Enable/disable power operating mode callback function eGobiError SetPowerCallback( tFNPower pCallback ); // Enable/disable wireless disable state callback function eGobiError SetWirelessDisableCallback( tFNWirelessDisable pCallback ); // Enable/disable roaming indicator callback function eGobiError SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ); // Enable/disable signal strength callback function eGobiError SetSignalStrengthCallback( tFNSignalStrength pCallback, std::list thresholds ); // Enable/disable RF information callback function eGobiError SetRFInfoCallback( tFNRFInfo pCallback ); // Enable/disable LU reject callback function eGobiError SetLURejectCallback( tFNLUReject pCallback ); // Enable/disable PLMN mode callback function eGobiError SetPLMNModeCallback( tFNPLMNMode pCallback ); // Enable/disable new SMS callback function eGobiError SetNewSMSCallback( tFNNewSMS pCallback ); // Enable/disable NMEA sentence callback function eGobiError SetNMEACallback( tFNNewNMEA pCallback ); // Enable/disable PDS service state callback function eGobiError SetPDSStateCallback( tFNPDSState pCallback ); // Enable/disable CAT event callback function eGobiError SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ); // Enable/disable OMA-DM NIA callback function eGobiError SetOMADMAlertCallback( tFNOMADMAlert pCallback ); // Enable/disable OMA-DM state callback function eGobiError SetOMADMStateCallback( tFNOMADMState pCallback ); // Enable/disable USSD release callback function eGobiError SetUSSDReleaseCallback( tFNUSSDRelease pCallback ); // Enable/disable USSD notification callback function eGobiError SetUSSDNotificationCallback( tFNUSSDNotification pCallback ); // Enable/disable USSD origination callback function eGobiError SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ); protected: // Process new traffic void ProcessTraffic( eQMIService svc ); // Process QMI traffic void ProcessWDSBuffer( const sProtocolBuffer & buf ); void ProcessDMSBuffer( const sProtocolBuffer & buf ); void ProcessNASBuffer( const sProtocolBuffer & buf ); void ProcessWMSBuffer( const sProtocolBuffer & buf ); void ProcessPDSBuffer( const sProtocolBuffer & buf ); void ProcessCATBuffer( const sProtocolBuffer & buf ); void ProcessOMABuffer( const sProtocolBuffer & buf ); void ProcessVoiceBuffer( const sProtocolBuffer & buf ); /* Is there an active thread? */ bool mbThreadStarted; /* ID of traffic processing thread */ pthread_t mThreadID; /* Traffic processing thread exit event */ cEvent mExitEvent; /* Has the protocol server thread finished cleanup? */ bool mThreadCleanupFinished; /* Number of buffers processed by ProcessTraffic() (per server) */ ULONG mWDSItemsProcessed; ULONG mDMSItemsProcessed; ULONG mNASItemsProcessed; ULONG mWMSItemsProcessed; ULONG mPDSItemsProcessed; ULONG mCATItemsProcessed; ULONG mOMAItemsProcessed; ULONG mVoiceItemsProcessed; /* Callback functions */ tFNSessionState mpFNSessionState; tFNByteTotals mpFNByteTotals; tFNDataCapabilities mpFNDataCapabilities; tFNDataBearer mpFNDataBearer; tFNDormancyStatus mpFNDormancyStatus; tFNMobileIPStatus mpFNMobileIPStatus; tFNActivationStatus mpFNActivationStatus; tFNPower mpFNPower; tFNWirelessDisable mpFNWirelessDisable; tFNRoamingIndicator mpFNRoamingIndicator; tFNSignalStrength mpFNSignalStrength; tFNRFInfo mpFNRFInfo; tFNLUReject mpFNLUReject; tFNPLMNMode mpPLMNMode; tFNNewSMS mpFNNewSMS; tFNNewNMEA mpFNNewNMEA; tFNPDSState mpFNPDSState; tFNCATEvent mpFNCATEvent; tFNOMADMAlert mpFNOMADMAlert; tFNOMADMState mpFNOMADMState; tFNUSSDRelease mpFNUSSDRelease; tFNUSSDNotification mpFNUSSDNotification; tFNUSSDOrigination mpFNUSSDOrigination; // Traffic process thread gets full access friend VOID * TrafficProcessThread( PVOID pArg ); }; /*=========================================================================*/ // Class cGobiConnectionMgmtDLL /*=========================================================================*/ class cGobiConnectionMgmtDLL { public: // Constructor cGobiConnectionMgmtDLL(); // Destructor virtual ~cGobiConnectionMgmtDLL(); // Return the GobiConnectionMgmt object cGobiConnectionMgmt * GetAPI(); protected: /* API interface object */ cGobiConnectionMgmt * mpAPI; /* Above object allocation attempted? */ bool mbAllocated; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern cGobiConnectionMgmtDLL gConnectionDLL; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiConnectionMgmt/GobiConnectionMgmtAPI.h000077500000000000000000003317761455567757300304000ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPI.h DESCRIPTION: QUALCOMM Connection Management API for Gobi 3000 Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #include "apidefs.h" #include "types.h" /*=========================================================================*/ // Definitions /*=========================================================================*/ #ifdef __cplusplus extern "C" { #endif // Session state callback function typedef void (* tFNSessionState)( ULONG state, ULONG sessionEndReason ); // RX/TX byte counts callback function typedef void (* tFNByteTotals)( ULONGLONG totalBytesTX, ULONGLONG totalBytesRX ); // Dormancy status callback function typedef void (* tFNDormancyStatus)( ULONG dormancyStatus ); // Mobile IP status callback function typedef void (* tFNMobileIPStatus)( ULONG mipStatus ); // Activation status callback function typedef void (* tFNActivationStatus)( ULONG activationStatus ); // Power operating mode callback function typedef void (* tFNPower)( ULONG operatingMode ); // Wireless disable callback function typedef void (* tFNWirelessDisable)( ULONG bState ); // Serving system data capabilities callback function typedef void (* tFNDataCapabilities)( BYTE dataCapsSize, BYTE * pDataCaps ); // Data bearer technology callback function typedef void (* tFNDataBearer)( ULONG dataBearer ); // Roaming indicator callback function typedef void (* tFNRoamingIndicator)( ULONG roaming ); // Signal strength callback function typedef void (* tFNSignalStrength)( INT8 signalStrength, ULONG radioInterface ); // RF information callback function typedef void (* tFNRFInfo)( ULONG radioInterface, ULONG activeBandClass, ULONG activeChannel ); // LU reject callback function typedef void (* tFNLUReject)( ULONG serviceDomain, ULONG rejectCause ); // PLMN mode callback function typedef void (* tFNPLMNMode)( ULONG mode ); // New SMS message callback function typedef void (* tFNNewSMS)( ULONG storageType, ULONG messageIndex ); // New NMEA sentence callback function typedef void (* tFNNewNMEA)( LPCSTR pNMEA ); // PDS session state callback function typedef void (* tFNPDSState)( ULONG enabledStatus, ULONG trackingStatus ); // CAT event callback function typedef void (* tFNCATEvent)( ULONG eventID, ULONG eventLen, BYTE * pEventData ); // OMA-DM network initiated alert callback function typedef void (* tFNOMADMAlert)( ULONG sessionType, USHORT sessionID ); // OMA-DM state callback function typedef void (* tFNOMADMState)( ULONG sessionState, ULONG failureReason ); // USSD release callback function typedef void (* tFNUSSDRelease)(); // USSD notification callback function typedef void (* tFNUSSDNotification)( ULONG type, BYTE * pNetworkInfo ); // USSD origination callback function typedef void (* tFNUSSDOrigination)( ULONG errorCode, ULONG failureCause, BYTE * pNetworkInfo, BYTE * pAlpha ); /*=========================================================================*/ // Prototypes /*=========================================================================*/ /* Returns the type of the connected device. */ GobiType GetDeviceType(); /*=========================================================================== METHOD: QCWWANEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ); /*=========================================================================== METHOD: QCWWANConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device Both device node and key are case sensitive PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANConnect( CHAR * pDeviceNode, CHAR * pDeviceKey ); /*=========================================================================== METHOD: QCWWANCancel DESCRIPTION: This function cancels the most recent outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANCancel(); /*=========================================================================== METHOD: QCWWANDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANDisconnect(); /*=========================================================================== METHOD: QCWWANGetConnectedDeviceID DESCRIPTION: This function returns the Node/key of the device the Gobi CM API library is currently connected to PARAMETERS: deviceNodeSize [ I ] - The maximum number of characters (including NULL terminator) that the device Node array can contain pDeviceNode [ O ] - Device Node (NULL terminated string) deviceKeySize [ I ] - The maximum number of characters (including NULL terminator) that the device key array can contain pDeviceKey [ O ] - Device key (NULL terminated string) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANGetConnectedDeviceID( ULONG deviceNodeSize, CHAR * pDeviceNode, ULONG deviceKeySize, CHAR * pDeviceKey ); /*=========================================================================== METHOD: GetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionState( ULONG * pState ); /*=========================================================================== METHOD: GetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionDuration( ULONGLONG * pDuration ); /*=========================================================================== METHOD: GetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDormancyState( ULONG * pState ); /*=========================================================================== METHOD: GetAutoconnect (Deprecated) DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAutoconnect( ULONG * pSetting ); /*=========================================================================== METHOD: SetAutoconnect (Deprecated) DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect disabled (0) or enabled (non-zero) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAutoconnect( ULONG setting ); /*=========================================================================== METHOD: GetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ); /*=========================================================================== METHOD: SetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ); /*=========================================================================== METHOD: SetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); /*=========================================================================== METHOD: GetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being read pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); /*=========================================================================== METHOD: StartDataSession DESCRIPTION: These functions activate a packet data session PARAMETERS: pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ); /*=========================================================================== METHOD: CancelDataSession DESCRIPTION: This function cancels an in-progress packet data session activation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelDataSession(); /*=========================================================================== METHOD: StopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StopDataSession( ULONG sessionId ); /*=========================================================================== METHOD: GetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIPAddress( ULONG * pIPAddress ); /*=========================================================================== METHOD: GetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); /*=========================================================================== METHOD: GetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); /*=========================================================================== METHOD: GetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); /*=========================================================================== METHOD: SetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIP( ULONG mode ); /*=========================================================================== METHOD: GetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIP( ULONG * pMode ); /*=========================================================================== METHOD: SetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ); /*=========================================================================== METHOD: GetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActiveMobileIPProfile( BYTE * pIndex ); /*=========================================================================== METHOD: SetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address pRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); /*=========================================================================== METHOD: GetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: index [ I ] - Mobile IP profile ID pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); /*=========================================================================== METHOD: SetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); /*=========================================================================== METHOD: GetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); /*=========================================================================== METHOD: GetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetLastMobileIPError( ULONG * pError ); /*=========================================================================== METHOD: SetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); /*=========================================================================== METHOD: GetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); /*=========================================================================== METHOD: GetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetANAAAAuthenticationStatus( ULONG * pStatus ); /*=========================================================================== METHOD: GetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); /*=========================================================================== METHOD: GetRFInfo (Public Method) DESCRIPTION: This function gets the current RF information PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ); /*=========================================================================== METHOD: PerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ); /*=========================================================================== METHOD: PerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); /*=========================================================================== METHOD: InitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ); /*=========================================================================== METHOD: InitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateDomainAttach( ULONG action ); /*=========================================================================== METHOD: GetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); /*=========================================================================== METHOD: GetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetworkCapabilities( BYTE * pDataCapsSize, BYTE * pDataCaps ); /*=========================================================================== METHOD: GetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDataBearerTechnology( ULONG * pDataBearer ); /*=========================================================================== METHOD: GetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); /*=========================================================================== METHOD: SetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNetworkPreference( ULONG technologyPref, ULONG duration ); /*=========================================================================== METHOD: GetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); /*=========================================================================== METHOD: SetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); /*=========================================================================== METHOD: GetCDMANetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); /*=========================================================================== METHOD: GetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetACCOLC( BYTE * pACCOLC ); /*=========================================================================== METHOD: SetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetACCOLC( CHAR * pSPC, BYTE accolc ); /*=========================================================================== METHOD: GetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNMode( ULONG * pMode ); /*=========================================================================== METHOD: GetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ); /*=========================================================================== METHOD: GetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: pMaxTxChannelRate [ O ] - Maximum transmission rate (bps) pMaxRxChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); /*=========================================================================== METHOD: GetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetManufacturer( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetModelID( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevision( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); /*=========================================================================== METHOD: GetFirmwareInfo DESCRIPTION: Returns image information obtained from the current device firmware PARAMETERS: pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); /*=========================================================================== METHOD: GetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); /*=========================================================================== METHOD: GetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIMSI( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); /*=========================================================================== METHOD: SetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLock( ULONG state, CHAR * pCurrentPIN ); /*=========================================================================== METHOD: QueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QueryLock( ULONG * pState ); /*=========================================================================== METHOD: ChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pCurrentPIN [ O ] - Current four digit PIN string pDesiredPIN [ O ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ); /*=========================================================================== METHOD: GetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHardwareRevision( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: GetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPRLVersion( WORD * pPRLVersion ); /*=========================================================================== METHOD: GetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetERIFile( ULONG * pFileSize, BYTE * pFile ); /*=========================================================================== METHOD: ActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateAutomatic( CHAR * pActivationCode ); /*=========================================================================== METHOD: ActivateManual DESCRIPTION: This function requests the device perform manual service activation, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code sid [ I ] - System identification number pMDN [ I ] - Mobile Directory Number string pMIN [ I ] - Mobile Identification Number string prlSize [ I ] - (Optional) Size of PRL file array pPRL [ I ] - (Optional) The PRL file contents pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ); /*=========================================================================== METHOD: ResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetToFactoryDefaults( CHAR * pSPC ); /*=========================================================================== METHOD: GetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActivationState( ULONG * pActivationState ); /*=========================================================================== METHOD: SetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPower( ULONG powerMode ); /*=========================================================================== METHOD: GetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPower( ULONG * pPowerMode ); /*=========================================================================== METHOD: GetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ); /*=========================================================================== METHOD: GetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: pTimeStamp [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ); /*=========================================================================== METHOD: ValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateSPC( CHAR * pSPC ); /*=========================================================================== METHOD: DeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); /*=========================================================================== METHOD: GetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ); /*=========================================================================== METHOD: GetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ I ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); /*=========================================================================== METHOD: ModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ); /*=========================================================================== METHOD: SaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ); /*=========================================================================== METHOD: SendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ); /*=========================================================================== METHOD: GetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); /*=========================================================================== METHOD: SetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ); /*=========================================================================== METHOD: GetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); /*=========================================================================== METHOD: SetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: This function change the PIN value PARAMETERS: id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetICCID( BYTE stringSize, CHAR * pString ); /*=========================================================================== METHOD: UIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: UIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the blocking status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); /*=========================================================================== METHOD: UIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ); /*=========================================================================== METHOD: UIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ); /*=========================================================================== METHOD: GetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSState( ULONG * pEnabled, ULONG * pTracking ); /*=========================================================================== METHOD: SetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSState( ULONG enable ); /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ); /*=========================================================================== METHOD: GetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); /*=========================================================================== METHOD: SetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); /*=========================================================================== METHOD: GetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ); /*=========================================================================== METHOD: SetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ); /*=========================================================================== METHOD: GetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRANetwork( ULONG * pPreference ); /*=========================================================================== METHOD: SetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRANetwork( ULONG preference ); /*=========================================================================== METHOD: GetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); /*=========================================================================== METHOD: ForceXTRADownload DESCRIPTION: This function forces the XTRA database to be downloaded to the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ForceXTRADownload(); /*=========================================================================== METHOD: GetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRADataState( ULONG * pState ); /*=========================================================================== METHOD: SetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRADataState( ULONG state ); /*=========================================================================== METHOD: GetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRATimeState( ULONG * pState ); /*=========================================================================== METHOD: SetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRATimeState( ULONG state ); /*=========================================================================== METHOD: GetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ); /*=========================================================================== METHOD: SetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAGPSConfig( ULONG serverAddress, ULONG serverPort ); /*=========================================================================== METHOD: GetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServiceAutomaticTracking( ULONG * pbAuto ); /*=========================================================================== METHOD: SetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetServiceAutomaticTracking( ULONG bAuto ); /*=========================================================================== METHOD: GetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPortAutomaticTracking( ULONG * pbAuto ); /*=========================================================================== METHOD: SetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPortAutomaticTracking( ULONG bAuto ); /*=========================================================================== METHOD: ResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ); /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ); /*=========================================================================== METHOD: CATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ); /*=========================================================================== METHOD: GetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ); /*=========================================================================== METHOD: SetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSWake( ULONG bEnable, ULONG wakeMask ); /*=========================================================================== METHOD: OMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMStartSession( ULONG sessionType ); /*=========================================================================== METHOD: OMADMCancelSession DESCRIPTION: This function cancels an ongoing OMA-DM session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMCancelSession(); /*=========================================================================== METHOD: OMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); /*=========================================================================== METHOD: OMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ); /*=========================================================================== METHOD: OMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSendSelection( ULONG selection, USHORT sessionID ); /*=========================================================================== METHOD: OMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ); /*=========================================================================== METHOD: OMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetProvisioningFeature( ULONG bProvisioning ); /*=========================================================================== METHOD: OMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ); /*=========================================================================== METHOD: OriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OriginateUSSD( BYTE * pInfo ); /*=========================================================================== METHOD: AnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AnswerUSSD( BYTE * pInfo ); /*=========================================================================== METHOD: CancelUSSD DESCRIPTION: This function cancels an in-progress USSD operation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelUSSD(); /*=========================================================================== METHOD: UpgradeFirmware DESCRIPTION: This function performs the following set of steps: a) Verifies arguments b) Updates firmware ID on device c) Resets the device NOTE: Upon successful completion the above steps will have been completed, however the actual upgrade of the firmware will necessarily then follow. PARAMETERS: pDestinationPath [ I ] - The fully qualified path to the destination folder that the firmware download service will use RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UpgradeFirmware( CHAR * pDestinationPath ); /*=========================================================================== METHOD: GetImageInfo DESCRIPTION: Returns image information obtained from the firmware image located at the provided path PARAMETERS: pPath [ I ] - Location of the firmware image pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); /*=========================================================================== METHOD: GetImageStore DESCRIPTION: Returns the image store folder, i.e. the folder co-located with the QDL Service executable which (by default) contains one or more carrier specific image subfolders PARAMETERS: pathSize [ I ] - Maximum number of characters (including NULL terminator) that can be copied to the image store path array pImageStorePath [ O ] - The path to the image store RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageStore( WORD pathSize, CHAR * pImageStorePath ); /*=========================================================================== METHOD: SetSessionStateCallback DESCRIPTION: This function enables/disables the session state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSessionStateCallback( tFNSessionState pCallback ); /*=========================================================================== METHOD: SetByteTotalsCallback DESCRIPTION: This function enables/disables the RX/TX byte counts callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) interval [ I ] - Interval in seconds (ignored when disabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ); /*=========================================================================== METHOD: SetDataCapabilitiesCallback DESCRIPTION: This function enables/disables the serving system data capabilities callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ); /*=========================================================================== METHOD: SetDataBearerCallback DESCRIPTION: This function enables/disables the data bearer status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataBearerCallback( tFNDataBearer pCallback ); /*=========================================================================== METHOD: SetDormancyStatusCallback DESCRIPTION: This function enables/disables the dormancy status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDormancyStatusCallback( tFNDormancyStatus pCallback ); /*=========================================================================== METHOD: SetMobileIPStatusCallback DESCRIPTION: This function enables/disables the mobile IP status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPStatusCallback( tFNMobileIPStatus pCallback ); /*=========================================================================== METHOD: SetActivationStatusCallback DESCRIPTION: This function enables/disables the activation status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActivationStatusCallback( tFNActivationStatus pCallback ); /*=========================================================================== METHOD: SetPowerCallback DESCRIPTION: Enable/disable power operating mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetPowerCallback( tFNPower pCallback ); /*=========================================================================== METHOD: SetWirelessDisableCallback DESCRIPTION: Enables/disables wireless disable state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetWirelessDisableCallback( tFNWirelessDisable pCallback ); /*=========================================================================== METHOD: SetRoamingIndicatorCallback DESCRIPTION: This function enables/disables the roaming indicator callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ); /*=========================================================================== METHOD: SetSignalStrengthCallback DESCRIPTION: This function enables/disables the signal strength callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) thresholdsSize [ I ] - Number of elements the threshold array contain (a maximum of 5 thresholds is supported), must be 0 when disabling the callback pThresholds [ I ] - Signal threshold array (each entry in dBm), must be 0 when disabling the callback RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSignalStrengthCallback( tFNSignalStrength pCallback, BYTE thresholdsSize, INT8 * pThresholds ); /*=========================================================================== METHOD: SetRFInfoCallback DESCRIPTION: This function enables/disables the RF information callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRFInfoCallback( tFNRFInfo pCallback ); /*=========================================================================== METHOD: SetLURejectCallback DESCRIPTION: This function enables/disables the LU reject callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLURejectCallback( tFNLUReject pCallback ); /*=========================================================================== METHOD: SetPLMNModeCallback DESCRIPTION: This function enables/disables the PLMN mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPLMNModeCallback( tFNPLMNMode pCallback ); /*=========================================================================== METHOD: SetNewSMSCallback DESCRIPTION: This function enables/disables the new SMS callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNewSMSCallback( tFNNewSMS pCallback ); /*=========================================================================== METHOD: SetNMEACallback DESCRIPTION: This function enables/disables the NMEA sentence callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNMEACallback( tFNNewNMEA pCallback ); /*=========================================================================== METHOD: SetPDSStateCallback DESCRIPTION: This function enables/disables the PDS service state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSStateCallback( tFNPDSState pCallback ); /*=========================================================================== METHOD: SetCATEventCallback DESCRIPTION: This function enables/disables the CAT event callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) eventMask [ I ] - Bitmask of CAT events to register for pErrorMask [ O ] - Error bitmask RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ); /*=========================================================================== METHOD: SetOMADMAlertCallback DESCRIPTION: This function enables/disables the OMA-DM network initiated alert callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMAlertCallback( tFNOMADMAlert pCallback ); /*=========================================================================== METHOD: SetOMADMStateCallback DESCRIPTION: This function enables/disables the OMA-DM state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMStateCallback( tFNOMADMState pCallback ); /*=========================================================================== METHOD: SetUSSDReleaseCallback DESCRIPTION: This function enables/disables the USSD release callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDReleaseCallback( tFNUSSDRelease pCallback ); /*=========================================================================== METHOD: SetUSSDNotificationCallback DESCRIPTION: This function enables/disables the USSD notification callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDNotificationCallback( tFNUSSDNotification pCallback ); /*=========================================================================== METHOD: SetUSSDOriginationCallback DESCRIPTION: Enable/disable USSD origination callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ); #ifdef __cplusplus }; #endif libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp000077500000000000000000004552711455567757300317630ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtExports.cpp DESCRIPTION: QUALCOMM Gobi 3000 Connection Management API exports Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiConnectionMgmt.h" #include "GobiConnectionMgmtAPI.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for adapter device path const ULONG MAX_AI_DEVICE_PATH = 256; // Maximum length for adapter key const ULONG MAX_AI_KEY = 16; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sAdapterInfo // Struct to represent Gobi adapter info /*=========================================================================*/ struct sAdapterInfo { public: CHAR mPath[MAX_AI_DEVICE_PATH]; CHAR mKey[MAX_AI_KEY]; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /* Returns the type of the connected device */ GobiType GetDeviceType() { cGobiConnectionMgmt *pAPI = gConnectionDLL.GetAPI(); if (!pAPI) return GOBITYPE_UNKNOWN; return pAPI->GetDeviceType(); } /*=========================================================================== METHOD: QCWWANEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pDevicesSize == 0 || pDevices == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pDevicesSize; *pDevicesSize = 0; // Obtain adapter info std::vector adapters; adapters = pAPI->GetAvailableDevices(); ULONG sz = (ULONG)adapters.size(); if (sz > (ULONG)maxInstances) { sz = (ULONG)maxInstances; } sAdapterInfo * pOutput = (sAdapterInfo *)pDevices; for (ULONG a = 0; a < sz; a++) { const cGobiConnectionMgmt::tDeviceID & id = adapters[a]; memset( &pOutput->mPath[0], 0, (SIZE_T)MAX_AI_DEVICE_PATH ); memset( &pOutput->mKey[0], 0, (SIZE_T)MAX_AI_KEY ); ULONG len = id.first.size(); if (len > 0) { if (len >= MAX_AI_DEVICE_PATH) { len = MAX_AI_DEVICE_PATH - 1; } memcpy( (LPVOID)&pOutput->mPath[0], (LPVOID)id.first.c_str(), (SIZE_T)len ); } len = id.second.size(); if (len > 0) { if (len >= MAX_AI_KEY) { len = MAX_AI_KEY - 1; } memcpy( (LPVOID)&pOutput->mKey[0], (LPCVOID)id.second.c_str(), (SIZE_T)len ); } pOutput++; } *pDevicesSize = (BYTE)sz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: QCWWANConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device Both device node and key are case sensitive PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANConnect( CHAR * pDeviceNode, CHAR * pDeviceKey ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pDeviceNode == 0 && pDeviceKey != 0) { // If you specify a device key then you have to specify a device ID return (ULONG)eGOBI_ERR_INVALID_ARG; } bool bConnect = pAPI->Connect( (LPCSTR)pDeviceNode, (LPCSTR)pDeviceKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: QCWWANCancel DESCRIPTION: This function cancels the most recent outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANCancel() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelSend(); } /*=========================================================================== METHOD: QCWWANDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANDisconnect() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bDisco = pAPI->Disconnect(); if (bDisco == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: QCWWANGetConnectedDeviceID DESCRIPTION: This function returns the Node/key of the device the Gobi CM API library is currently connected to PARAMETERS: deviceNodeSize [ I ] - The maximum number of characters (including NULL terminator) that the device Node array can contain pDeviceNode [ O ] - Device Node (NULL terminated string) deviceKeySize [ I ] - The maximum number of characters (including NULL terminator) that the device key array can contain pDeviceKey [ O ] - Device key (NULL terminated string) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QCWWANGetConnectedDeviceID( ULONG deviceNodeSize, CHAR * pDeviceNode, ULONG deviceKeySize, CHAR * pDeviceKey ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if ( (deviceNodeSize == 0) || (pDeviceNode == 0) || (deviceKeySize == 0) || (pDeviceKey == 0) ) { return (ULONG)eGOBI_ERR_INVALID_ARG; } *pDeviceNode = 0; *pDeviceKey = 0; std::string devNode = ""; std::string devKey = ""; bool bOK = pAPI->GetConnectedDeviceID( devNode, devKey ); if (bOK == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG lenNode = (ULONG)devNode.size(); // Space to perform the copy? if (deviceNodeSize < lenNode + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pDeviceNode, (LPVOID)devNode.c_str(), lenNode ); // Enforce null termination pDeviceNode[lenNode] = 0; ULONG lenKey = (ULONG)devKey.size(); // Space to perform the copy? if (deviceKeySize < lenKey + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pDeviceKey, (LPVOID)devKey.c_str(), lenKey ); // Enforce null termination devKey[lenKey] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSessionState( pState ); } /*=========================================================================== METHOD: GetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSessionDuration( ULONGLONG * pDuration ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSessionDuration( pDuration ); } /*=========================================================================== METHOD: GetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDormancyState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDormancyState( pState ); } /*=========================================================================== METHOD: GetAutoconnect (Deprecated) DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAutoconnect( ULONG * pSetting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG dummy; return (ULONG)pAPI->GetEnhancedAutoconnect( pSetting, &dummy ); } /*=========================================================================== METHOD: SetAutoconnect (Deprecated) DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect disabled (0) or enabled (non-zero) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAutoconnect( ULONG setting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetEnhancedAutoconnect( setting, 0 ); } /*=========================================================================== METHOD: GetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetEnhancedAutoconnect( pSetting, pRoamSetting ); } /*=========================================================================== METHOD: SetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetEnhancedAutoconnect( setting, pRoamSetting ); } /*=========================================================================== METHOD: SetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDefaultProfile( profileType, pPDPType, pIPAddress, pPrimaryDNS, pSecondaryDNS, pAuthentication, pName, pAPNName, pUsername, pPassword ); } /*=========================================================================== METHOD: GetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being read pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDefaultProfile( profileType, pPDPType, pIPAddress, pPrimaryDNS, pSecondaryDNS, pAuthentication, nameSize, pName, apnSize, pAPNName, userSize, pUsername ); } /*=========================================================================== METHOD: StartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->StartDataSession( pTechnology, pPrimaryDNS, pSecondaryDNS, pPrimaryNBNS, pSecondaryNBNS, pAPNName, pIPAddress, pAuthentication, pUsername, pPassword, pSessionId, pFailureReason ); } /*=========================================================================== METHOD: CancelDataSession DESCRIPTION: This function cancels an in-progress packet data session activation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelDataSession() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->CancelDataSession(); } /*=========================================================================== METHOD: StopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG StopDataSession( ULONG sessionId ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->StopDataSession( sessionId ); } /*=========================================================================== METHOD: GetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIPAddress( ULONG * pIPAddress ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetIPAddress( pIPAddress ); } /*=========================================================================== METHOD: GetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetConnectionRate( pCurrentChannelTXRate, pCurrentChannelRXRate, pMaxChannelTXRate, pMaxChannelRXRate ); } /*=========================================================================== METHOD: GetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPacketStatus( pTXPacketSuccesses, pRXPacketSuccesses, pTXPacketErrors, pRXPacketErrors, pTXPacketOverflows, pRXPacketOverflows ); } /*=========================================================================== METHOD: GetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetByteTotals( pTXTotalBytes, pRXTotalBytes ); } /*=========================================================================== METHOD: SetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIP( ULONG mode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetMobileIP( mode ); } /*=========================================================================== METHOD: GetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIP( ULONG * pMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetMobileIP( pMode ); } /*=========================================================================== METHOD: SetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetActiveMobileIPProfile( pSPC, index ); } /*=========================================================================== METHOD: GetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActiveMobileIPProfile( BYTE * pIndex ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetActiveMobileIPProfile( pIndex ); } /*=========================================================================== METHOD: SetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address bRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetMobileIPProfile( pSPC, index, pEnabled, pAddress, pPrimaryHA, pSecondaryHA, pRevTunneling, pNAI, pHASPI, pAAASPI, pMNHA, pMNAAA ); } /*=========================================================================== METHOD: GetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: index [ I ] - Mobile IP profile ID pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetMobileIPProfile( index, pEnabled, pAddress, pPrimaryHA, pSecondaryHA, pRevTunneling, naiSize, pNAI, pHASPI, pAAASPI, pHAState, pAAAState ); } /*=========================================================================== METHOD: SetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetMobileIPParameters( pSPC, pMode, pRetryLimit, pRetryInterval, pReRegPeriod, pReRegTraffic, pHAAuthenticator, pHA2002bis ); } /*=========================================================================== METHOD: GetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetMobileIPParameters( pMode, pRetryLimit, pRetryInterval, pReRegPeriod, pReRegTraffic, pHAAuthenticator, pHA2002bis ); } /*=========================================================================== METHOD: GetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetLastMobileIPError( ULONG * pError ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetLastMobileIPError( pError ); } /*=========================================================================== METHOD: SetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDNSSettings( pPrimaryDNS, pSecondaryDNS ); } /*=========================================================================== METHOD: GetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDNSSettings( pPrimaryDNS, pSecondaryDNS ); } /*=========================================================================== METHOD: GetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetANAAAAuthenticationStatus( ULONG * pStatus ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetANAAAAuthenticationStatus( pStatus ); } /*=========================================================================== METHOD: GetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSignalStrengths( pArraySizes, pSignalStrengths, pRadioInterfaces ); } /*=========================================================================== METHOD: GetRFInfo DESCRIPTION: This function gets the current RF information PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetRFInfo( pInstanceSize, pInstances ); } /*=========================================================================== METHOD: PerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PerformNetworkScan( pInstanceSize, pInstances ); } /*=========================================================================== METHOD: PerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PerformNetworkRATScan( pInstanceSize, pInstances, pRATSize, pRATInstances ); } /*=========================================================================== METHOD: InitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->InitiateNetworkRegistration( regType, mcc, mnc, rat ); } /*=========================================================================== METHOD: InitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG InitiateDomainAttach( ULONG action ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->InitiateDomainAttach( action ); } /*=========================================================================== METHOD: GetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetServingNetwork( pRegistrationState, pCSDomain, pPSDomain, pRAN, pRadioIfacesSize, pRadioIfaces, pRoaming, pMCC, pMNC, nameSize, pName ); } /*=========================================================================== METHOD: GetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServingNetworkCapabilities( BYTE * pDataCapsSize, BYTE * pDataCaps ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetServingNetworkCapabilities( pDataCapsSize, pDataCaps ); } /*=========================================================================== METHOD: GetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDataBearerTechnology( ULONG * pDataBearer ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDataBearerTechnology( pDataBearer ); } /*=========================================================================== METHOD: GetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetHomeNetwork( pMCC, pMNC, nameSize, pName, pSID, pNID ); } /*=========================================================================== METHOD: SetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNetworkPreference( ULONG technologyPref, ULONG duration ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetNetworkPreference( technologyPref, duration ); } /*=========================================================================== METHOD: GetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetNetworkPreference( pTechnologyPref, pDuration, pPersistentTechnologyPref ); } /*=========================================================================== METHOD: SetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetCDMANetworkParameters( pSPC, pForceRev0, pCustomSCP, pProtocol, pBroadcast, pApplication, pRoaming ); } /*=========================================================================== METHOD: GetEVDONetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetCDMANetworkParameters( pSCI, pSCM, pRegHomeSID, pRegForeignSID, pRegForeignNID, pForceRev0, pCustomSCP, pProtocol, pBroadcast, pApplication, pRoaming ); } /*=========================================================================== METHOD: GetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetACCOLC( BYTE * pACCOLC ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetACCOLC( pACCOLC ); } /*=========================================================================== METHOD: SetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetACCOLC( CHAR * pSPC, BYTE accolc ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetACCOLC( pSPC, accolc ); } /*=========================================================================== METHOD: GetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNMode( ULONG * pMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetPLMNMode( pMode ); } /*=========================================================================== METHOD: GetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->GetPLMNName( mcc, mnc, pNamesSize, pNames ); } /*=========================================================================== METHOD: GetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetDeviceCapabilities( pMaxTXChannelRate, pMaxRXChannelRate, pDataServiceCapability, pSimCapability, pRadioIfacesSize, pRadioIfaces ); } /*=========================================================================== METHOD: GetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetManufacturer( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetManufacturer( stringSize, pString ); } /*=========================================================================== METHOD: GetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetModelID( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetModelID( stringSize, pString ); } /*=========================================================================== METHOD: GetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevision( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetFirmwareRevision( stringSize, pString ); } /*=========================================================================== METHOD: GetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetFirmwareRevisions( amssSize, pAMSSString, bootSize, pBootString, priSize, pPRIString ); } /*=========================================================================== METHOD: GetFirmwareInfo DESCRIPTION: Returns image information obtained from the current device firmware PARAMETERS: pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetFirmwareInfo( pFirmwareID, pTechnology, pCarrier, pRegion, pGPSCapability ); } /*=========================================================================== METHOD: GetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetVoiceNumber( voiceNumberSize, pVoiceNumber, minSize, pMIN ); } /*=========================================================================== METHOD: GetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetIMSI( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetIMSI( stringSize, pString ); } /*=========================================================================== METHOD: GetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSerialNumbers( esnSize, pESNString, imeiSize, pIMEIString, meidSize, pMEIDString ); } /*=========================================================================== METHOD: SetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLock( ULONG state, CHAR * pCurrentPIN ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetLock( state, pCurrentPIN ); } /*=========================================================================== METHOD: QueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG QueryLock( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->QueryLock( pState ); } /*=========================================================================== METHOD: ChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pCurrentPIN [ O ] - Current four digit PIN string pDesiredPIN [ O ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ChangeLockPIN( pCurrentPIN, pDesiredPIN ); } /*=========================================================================== METHOD: GetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetHardwareRevision( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetHardwareRevision( stringSize, pString ); } /*=========================================================================== METHOD: GetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPRLVersion( WORD * pPRLVersion ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPRLVersion( pPRLVersion ); } /*=========================================================================== METHOD: GetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetERIFile( ULONG * pFileSize, BYTE * pFile ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetERIFile( pFileSize, pFile ); } /*=========================================================================== METHOD: ActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateAutomatic( CHAR * pActivationCode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ActivateAutomatic( pActivationCode ); } /*=========================================================================== METHOD: ActivateManual DESCRIPTION: This function requests the device perform manual service activation PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code sid [ I ] - System identification number pMDN [ I ] - Mobile Directory Number string pMIN [ I ] - Mobile Identification Number string prlSize [ I ] - (Optional) Size of PRL file array pPRL [ I ] - (Optional) The PRL file contents pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ActivateManual( pSPC, sid, pMDN, pMIN, prlSize, pPRL, pMNHA, pMNAAA ); } /*=========================================================================== METHOD: ResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetToFactoryDefaults( CHAR * pSPC ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ResetToFactoryDefaults( pSPC ); } /*=========================================================================== METHOD: GetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetActivationState( ULONG * pActivationState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetActivationState( pActivationState ); } /*=========================================================================== METHOD: SetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPower( ULONG powerMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->SetPower( powerMode ); } /*=========================================================================== METHOD: GetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPower( ULONG * pPowerMode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPower( pPowerMode ); } /*=========================================================================== METHOD: GetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetOfflineReason( pReasonMask, pbPlatform ); } /*=========================================================================== METHOD: GetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: pTimeStamp [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetNetworkTime( pTimeCount, pTimeSource ); } /*=========================================================================== METHOD: ValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateSPC( CHAR * pSPC ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ValidateSPC( pSPC ); } /*=========================================================================== METHOD: DeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->DeleteSMS( storageType, pMessageIndex, pMessageTag ); } /*=========================================================================== METHOD: GetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSList( storageType, pRequestedTag, pMessageListSize, pMessageList ); } /*=========================================================================== METHOD: GetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ I ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMS( storageType, messageIndex, pMessageTag, pMessageFormat, pMessageSize, pMessage ); } /*=========================================================================== METHOD: ModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return pAPI->ModifySMSStatus( storageType, messageIndex, messageTag ); } /*=========================================================================== METHOD: SaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SaveSMS( storageType, messageFormat, messageSize, pMessage, pMessageIndex ); } /*=========================================================================== METHOD: SendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SendSMS( messageFormat, messageSize, pMessage, pMessageFailureCode ); } /*=========================================================================== METHOD: GetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSCAddress( addressSize, pSMSCAddress, typeSize, pSMSCType ); } /*=========================================================================== METHOD: SetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSMSCAddress( pSMSCAddress, pSMSCType ); } /*=========================================================================== METHOD: GetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSRoutes( pRouteSize, pRoutes ); } /*=========================================================================== METHOD: SetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSMSRoutes( pRouteSize, pRoutes ); } /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMSetPINProtection( id, bEnable, pValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMVerifyPIN( id, pValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMUnblockPIN( id, pPUKValue, pNewValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: This function change the PIN value PARAMETERS: id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMChangePIN( id, pOldValue, pNewValue, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetPINStatus( id, pStatus, pVerifyRetriesLeft, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: UIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetICCID( BYTE stringSize, CHAR * pString ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetICCID( stringSize, pString ); } /*=========================================================================== METHOD: UIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetControlKeyBlockingStatus( id, pStatus, pVerifyRetriesLeft, pUnblockRetriesLeft, 0 ); } /*=========================================================================== METHOD: UIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the blocking status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMGetControlKeyBlockingStatus( id, pStatus, pVerifyRetriesLeft, pUnblockRetriesLeft, pbBlocking); } /*=========================================================================== METHOD: UIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMSetControlKeyProtection( id, status, pValue, pVerifyRetriesLeft ); } /*=========================================================================== METHOD: UIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UIMUnblockControlKey( id, pValue, pUnblockRetriesLeft ); } /*=========================================================================== METHOD: GetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSState( ULONG * pEnabled, ULONG * pTracking ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPDSState( pEnabled, pTracking ); } /*=========================================================================== METHOD: SetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSState( ULONG enable ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPDSState( enable ); } /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PDSInjectTimeReference( systemTime, systemDiscontinuities ); } /*=========================================================================== METHOD: GetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPDSDefaults( pOperation, pTimeout, pInterval, pAccuracy ); } /*=========================================================================== METHOD: SetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPDSDefaults( operation, timeout, interval, accuracy ); } /*=========================================================================== METHOD: GetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRAAutomaticDownload( pbEnabled, pInterval ); } /*=========================================================================== METHOD: SetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRAAutomaticDownload( bEnabled, interval ); } /*=========================================================================== METHOD: GetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRANetwork( ULONG * pPreference ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRANetwork( pPreference ); } /*=========================================================================== METHOD: SetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRANetwork( ULONG preference ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRANetwork( preference ); } /*=========================================================================== METHOD: GetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRAValidity( pGPSWeek, pGPSWeekOffset, pDuration ); } /*=========================================================================== METHOD: ForceXTRADownload DESCRIPTION: This function forces the XTRA database to be downloaded to the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ForceXTRADownload() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ForceXTRADownload(); } /*=========================================================================== METHOD: GetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRADataState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRADataState( pState ); } /*=========================================================================== METHOD: SetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRADataState( ULONG state ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRADataState( state ); } /*=========================================================================== METHOD: GetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetXTRATimeState( ULONG * pState ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetXTRATimeState( pState ); } /*=========================================================================== METHOD: SetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetXTRATimeState( ULONG state ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetXTRATimeState( state ); } /*=========================================================================== METHOD: GetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetAGPSConfig( pServerAddress, pServerPort ); } /*=========================================================================== METHOD: SetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetAGPSConfig( ULONG serverAddress, ULONG serverPort ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetAGPSConfig( serverAddress, serverPort ); } /*=========================================================================== METHOD: GetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetServiceAutomaticTracking( ULONG * pbAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetServiceAutomaticTracking( pbAuto ); } /*=========================================================================== METHOD: SetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetServiceAutomaticTracking( ULONG bAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetServiceAutomaticTracking( bAuto ); } /*=========================================================================== METHOD: GetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetPortAutomaticTracking( ULONG * pbAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetPortAutomaticTracking( pbAuto ); } /*=========================================================================== METHOD: SetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPortAutomaticTracking( ULONG bAuto ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPortAutomaticTracking( bAuto ); } /*=========================================================================== METHOD: ResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ResetPDSData( pGPSDataMask, pCellDataMask ); } /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CATSendTerminalResponse( refID, dataLen, pData ); } /*=========================================================================== METHOD: CATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CATSendEnvelopeCommand( cmdID, dataLen, pData ); } /*=========================================================================== METHOD: GetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetSMSWake( pbEnabled, pWakeMask ); } /*=========================================================================== METHOD: SetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSMSWake( ULONG bEnable, ULONG wakeMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSMSWake( bEnable, wakeMask ); } /*=========================================================================== METHOD: OMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMStartSession( ULONG sessionType ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMStartSession( sessionType ); } /*=========================================================================== METHOD: OMADMCancelSession DESCRIPTION: This function cancels an ongoing OMA-DM session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMCancelSession() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMCancelSession(); } /*=========================================================================== METHOD: OMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMGetSessionInfo( pSessionState, pSessionType, pFailureReason, pRetryCount, pSessionPause, pTimeRemaining ); } /*=========================================================================== METHOD: OMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMGetPendingNIA( pSessionType, pSessionID ); } /*=========================================================================== METHOD: OMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSendSelection( ULONG selection, USHORT sessionID ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMSendSelection( selection, sessionID ); } /*=========================================================================== METHOD: OMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMGetFeatureSettings( pbProvisioning, pbPRLUpdate ); } /*=========================================================================== METHOD: OMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetProvisioningFeature( ULONG bProvisioning ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMSetProvisioningFeature( bProvisioning ); } /*=========================================================================== METHOD: OMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OMADMSetPRLUpdateFeature( bPRLUpdate ); } /*=========================================================================== METHOD: OriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OriginateUSSD( BYTE * pInfo ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->OriginateUSSD( pInfo ); } /*=========================================================================== METHOD: AnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AnswerUSSD( BYTE * pInfo ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->AnswerUSSD( pInfo ); } /*=========================================================================== METHOD: CancelUSSD DESCRIPTION: This function cancels an in-progress USSD operation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CancelUSSD() { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelUSSD(); } /*=========================================================================== METHOD: UpgradeFirmware DESCRIPTION: This function performs the following set of steps: a) Verifies arguments b) Updates firmware ID on device c) Resets the device NOTE: Upon successful completion the above steps will have been completed, however the actual upgrade of the firmware will necessarily then follow. PARAMETERS: pDestinationPath [ I ] - The fully qualified path to the destination folder that the firmware download service will use RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UpgradeFirmware( CHAR * pDestinationPath ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->UpgradeFirmware( pDestinationPath ); } /*=========================================================================== METHOD: GetImageInfo DESCRIPTION: Returns image information obtained from the firmware image located at the provided path PARAMETERS: pPath [ I ] - Location of the firmware image pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetImageInfo( pPath, pFirmwareID, pTechnology, pCarrier, pRegion, pGPSCapability ); } /*=========================================================================== METHOD: GetImageStore DESCRIPTION: Returns the image store folder, i.e. the folder co-located with the QDL Service executable which (by default) contains one or more carrier specific image subfolders PARAMETERS: pathSize [ I ] - Maximum number of characters (including NULL terminator) that can be copied to the image store path array pImageStorePath [ O ] - The path to the image store RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImageStore( WORD pathSize, CHAR * pImageStorePath ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetImageStore( pathSize, pImageStorePath ); } /*=========================================================================== METHOD: SetSessionStateCallback DESCRIPTION: This function enables/disables the session state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSessionStateCallback( tFNSessionState pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetSessionStateCallback( pCallback ); } /*=========================================================================== METHOD: SetByteTotalsCallback DESCRIPTION: This function enables/disables the RX/TX byte counts callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) interval [ I ] - Interval in seconds (ignored when disabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetByteTotalsCallback( tFNByteTotals pCallback, BYTE interval ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetByteTotalsCallback( pCallback, interval ); } /*=========================================================================== METHOD: SetDataCapabilitiesCallback DESCRIPTION: This function enables/disables the serving system data capabilities callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataCapabilitiesCallback( tFNDataCapabilities pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDataCapabilitiesCallback( pCallback ); } /*=========================================================================== METHOD: SetDataBearerCallback DESCRIPTION: This function enables/disables the data bearer status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDataBearerCallback( tFNDataBearer pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDataBearerCallback( pCallback ); } /*=========================================================================== METHOD: SetDormancyStatusCallback DESCRIPTION: This function enables/disables the dormancy status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDormancyStatusCallback( tFNDormancyStatus pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetDormancyStatusCallback( pCallback ); } /*=========================================================================== METHOD: SetMobileIPStatusCallback DESCRIPTION: This function enables/disables the mobile IP status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetMobileIPStatusCallback( tFNMobileIPStatus pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetMobileIPStatusCallback( pCallback ); } /*=========================================================================== METHOD: SetActivationStatusCallback DESCRIPTION: This function enables/disables the activation status callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetActivationStatusCallback( tFNActivationStatus pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetActivationStatusCallback( pCallback ); } /*=========================================================================== METHOD: SetPowerCallback DESCRIPTION: Enable/disable power operating mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPowerCallback( tFNPower pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPowerCallback( pCallback ); } /*=========================================================================== METHOD: SetWirelessDisableCallback DESCRIPTION: Enable/disable wireless disable state callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetWirelessDisableCallback( tFNWirelessDisable pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetWirelessDisableCallback( pCallback ); } /*=========================================================================== METHOD: SetRoamingIndicatorCallback DESCRIPTION: This function enables/disables the roaming indicator callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRoamingIndicatorCallback( tFNRoamingIndicator pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetRoamingIndicatorCallback( pCallback ); } /*=========================================================================== METHOD: SetSignalStrengthCallback DESCRIPTION: This function enables/disables the signal strength callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) thresholdsSize [ I ] - Number of elements the threshold array contain (a maximum of 5 thresholds is supported), must be 0 when disabling the callback pThresholds [ I ] - Signal threshold array (each entry in dBm), must be 0 when disabling the callback RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetSignalStrengthCallback( tFNSignalStrength pCallback, BYTE thresholdsSize, INT8 * pThresholds ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } if (thresholdsSize > 0 && pThresholds == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } std::list thresholdsList; for (BYTE t = 0; t < thresholdsSize; t++) { thresholdsList.push_back( pThresholds[t] ); } return (ULONG)pAPI->SetSignalStrengthCallback( pCallback, thresholdsList ); } /*=========================================================================== METHOD: SetRFInfoCallback DESCRIPTION: This function enables/disables the RF information callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetRFInfoCallback( tFNRFInfo pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetRFInfoCallback( pCallback ); } /*=========================================================================== METHOD: SetLURejectCallback DESCRIPTION: This function enables/disables the LU reject callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetLURejectCallback( tFNLUReject pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetLURejectCallback( pCallback ); } /*=========================================================================== METHOD: SetPLMNModeCallback DESCRIPTION: Enable/disable PLMN mode callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPLMNModeCallback( tFNPLMNMode pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPLMNModeCallback( pCallback ); } /*=========================================================================== METHOD: SetNewSMSCallback DESCRIPTION: This function enables/disables the new SMS callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNewSMSCallback( tFNNewSMS pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetNewSMSCallback( pCallback ); } /*=========================================================================== METHOD: SetNMEACallback DESCRIPTION: This function enables/disables the NMEA sentence callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetNMEACallback( tFNNewNMEA pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetNMEACallback( pCallback ); } /*=========================================================================== METHOD: SetPDSStateCallback DESCRIPTION: This function enables/disables the PDS service state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetPDSStateCallback( tFNPDSState pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetPDSStateCallback( pCallback ); } /*=========================================================================== METHOD: SetCATEventCallback DESCRIPTION: This function enables/disables the CAT event callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) eventMask [ I ] - Bitmask of CAT events to register for pErrorMask [ O ] - Error bitmask RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetCATEventCallback( tFNCATEvent pCallback, ULONG eventMask, ULONG * pErrorMask ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetCATEventCallback( pCallback, eventMask, pErrorMask ); } /*=========================================================================== METHOD: SetOMADMAlertCallback DESCRIPTION: This function enables/disables the OMA-DM network initiated alert callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMAlertCallback( tFNOMADMAlert pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetOMADMAlertCallback( pCallback ); } /*=========================================================================== METHOD: SetOMADMStateCallback DESCRIPTION: This function enables/disables the OMA-DM state callback function PARAMETERS: pCallback [ I ] - Callback function (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetOMADMStateCallback( tFNOMADMState pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetOMADMStateCallback( pCallback ); } #ifdef VOICE_SUPPORT /*=========================================================================== METHOD: SetUSSDReleaseCallback DESCRIPTION: Enable/disable USSD release callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDReleaseCallback( tFNUSSDRelease pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetUSSDReleaseCallback( pCallback ); } /*=========================================================================== METHOD: SetUSSDNotificationCallback DESCRIPTION: Enable/disable USSD notification callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDNotificationCallback( tFNUSSDNotification pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetUSSDNotificationCallback( pCallback ); } /*=========================================================================== METHOD: SetUSSDOriginationCallback DESCRIPTION: Enable/disable USSD origination callback function PARAMETERS: pCallback [ I ] - Callback function RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetUSSDOriginationCallback( tFNUSSDOrigination pCallback ) { cGobiConnectionMgmt * pAPI = gConnectionDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetUSSDOriginationCallback( pCallback ); } #endif libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiConnectionMgmt/Makefile.am000066400000000000000000000012431455567757300261600ustar00rootroot00000000000000INCLUDES = \ -I$(top_srcdir)/Core \ -I$(top_srcdir)/Shared lib_LTLIBRARIES = libGobiConnectionMgmt.la libGobiConnectionMgmt_la_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT libGobiConnectionMgmt_la_SOURCES = \ GobiConnectionMgmtAPI.h \ GobiConnectionMgmt.cpp \ GobiConnectionMgmt.h \ GobiConnectionMgmtExports.cpp libGobiConnectionMgmt_la_LIBADD = \ $(top_builddir)/Database/QMI/libQMIDB.la \ $(top_builddir)/Shared/libShared.la \ $(top_builddir)/Core/libCore.la \ -lpthread libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiImageMgmt/000077500000000000000000000000001455567757300230475ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiImageMgmt/GobiImageMgmt.cpp000077500000000000000000000202531455567757300262300ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMIImageMgmt.cpp DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiImageMgmtDLL cGobiImageMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiImageMgmt.h" #include "QMIBuffers.h" #include "QDLBuffers.h" // Global object cGobiImageMgmtDLL gImageDLL; /*=========================================================================*/ // cGobiImageMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiImageMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmtDLL::cGobiImageMgmtDLL() : mpAPI( 0 ), mbAllocated( false ) { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~cGobiImageMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmtDLL::~cGobiImageMgmtDLL() { // Just in case if (mpAPI != 0) { mpAPI->Cleanup(); delete mpAPI; mpAPI = 0; } pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the cGobiImageMgmt object RETURN VALUE: cGobiImageMgmt * ===========================================================================*/ cGobiImageMgmt * cGobiImageMgmtDLL::GetAPI() { pthread_mutex_lock( &mSyncSection ); bool bAlloc = mbAllocated; pthread_mutex_unlock( &mSyncSection ); if (bAlloc == true) { return mpAPI; } pthread_mutex_lock( &mSyncSection ); mpAPI = new cGobiImageMgmt; if (mpAPI != 0) { bool bAPI = mpAPI->Initialize(); if (bAPI == false) { delete mpAPI; mpAPI = 0; } } // We have tried to allocate/initialize the object mbAllocated = true; pthread_mutex_unlock( &mSyncSection ); return mpAPI; } /*=========================================================================*/ // cGobiImageMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiImageMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmt::cGobiImageMgmt() : cGobiQMICore(), mTargetDeviceNode( "" ), mTargetDeviceKey( "" ), mQDL() { // We require a DMS server tServerConfig dmsSvr( eQMI_SVC_DMS, true ); mServerConfig.insert( dmsSvr ); } /*=========================================================================== METHOD: ~cGobiImageMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiImageMgmt::~cGobiImageMgmt() { // Nothing to do } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiImageMgmt::Initialize() { bool bRC = cGobiQMICore::Initialize(); if (bRC == false) { return bRC; } bRC = mQDL.Initialize(); return bRC; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiImageMgmt::Cleanup() { mQDL.Cleanup(); return cGobiQMICore::Cleanup(); } /*=========================================================================== METHOD: GetDeviceID (Public Method) DESCRIPTION: Set the ID of the device to target PARAMETERS: deviceID [ I ] - The device ID as reported by Windows deviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: void ===========================================================================*/ void cGobiImageMgmt::GetDeviceID( std::string & deviceID, std::string & deviceKey ) { deviceID = mTargetDeviceNode; deviceKey = mTargetDeviceKey; } /*=========================================================================== METHOD: SetDeviceID (Public Method) DESCRIPTION: Set the ID of the device to target PARAMETERS: pDeviceID [ I ] - The device ID as reported by Windows pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: bool ===========================================================================*/ bool cGobiImageMgmt::SetDeviceID( LPCSTR pDeviceID, LPCSTR pDeviceKey ) { // Clear last error recorded ClearLastError(); // If you specify a device key then you have to specify a device ID if (pDeviceID == 0 && pDeviceKey != 0) { mLastError = eGOBI_ERR_INVALID_ARG; return false; } if (pDeviceID == 0 || pDeviceID[0] == 0) { mTargetDeviceNode.clear(); mTargetDeviceKey.clear(); } else { mTargetDeviceNode = pDeviceID; if (pDeviceKey == 0 || pDeviceKey[0] == 0) { mTargetDeviceKey.clear(); } else { mTargetDeviceKey = pDeviceKey; } } return true; } /*=========================================================================== METHOD: ResetDevice (Public Method) DESCRIPTION: This function resets the device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiImageMgmt::ResetDevice() { WORD msgID = (WORD)eQMI_DMS_SET_OPERATING_MODE; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, "5" ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiImageMgmt/GobiImageMgmt.h000077500000000000000000000145131455567757300256770ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageMgmt.h DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: cGobiImageMgmtDLL cGobiImageMgmt Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" #include "GobiQDLCore.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cGobiImageMgmt /*=========================================================================*/ class cGobiImageMgmt : public cGobiQMICore { public: // Constructor cGobiImageMgmt(); // Destructor virtual ~cGobiImageMgmt(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // Get the ID of the device to target void GetDeviceID( std::string & deviceID, std::string & deviceKey ); // Set the ID of the device to target bool SetDeviceID( LPCSTR pDeviceID = 0, LPCSTR pDeviceKey = 0 ); // This function resets the device eGobiError ResetDevice(); // (Inline) Return the set of available Gobi QDL ports std::vector GetAvailableQDLPorts() { return mQDL.GetAvailableQDLPorts(); }; // (Inline) Set the timeout for QDL transactions eGobiError SetQDLTimeout( ULONG to ) { return mQDL.SetQDLTimeout( to ); }; // (Inline) Open the specified QDL port of the device eGobiError OpenQDLPort( std::string & portID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ) { return mQDL.OpenQDLPort( portID, bBARMode, pMajorVersion, pMinorVersion ); }; // (Inline) Close the specified QDL port of the device eGobiError CloseQDLPort( bool bInformDevice ) { return mQDL.CloseQDLPort( bInformDevice ); }; // (Inline) Get the images preference as from the device boot downloader eGobiError GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { return mQDL.GetQDLImagesPreference( pImageListSize, pImageList ); }; // (Inline) Prepare the device boot downloader for an image write eGobiError PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ) { return mQDL.PrepareQDLImageWrite( imageType, imageSize, pBlockSize ); }; // (Inline) Write the specified image block to the device eGobiError WriteQDLImageBlock( USHORT sequenceNumber, ULONG chunkSize, BYTE * pImageBlock ) { return mQDL.WriteQDLImageBlock( sequenceNumber, chunkSize, pImageBlock ); }; // (Inline) Request the device validate the written images eGobiError ValidateQDLImages( BYTE * pImageType ) { return mQDL.ValidateQDLImages( pImageType ); }; protected: /* Device node/key of the device to target */ std::string mTargetDeviceNode; std::string mTargetDeviceKey; /* QDL protocol server */ cGobiQDLCore mQDL; }; /*=========================================================================*/ // Class cGobiImageMgmtDLL /*=========================================================================*/ class cGobiImageMgmtDLL { public: // Constructor cGobiImageMgmtDLL(); // Destructor virtual ~cGobiImageMgmtDLL(); // Return the GobiImageMgmt object cGobiImageMgmt * GetAPI(); protected: /* API interface object */ cGobiImageMgmt * mpAPI; /* Above object allocation attempted? */ bool mbAllocated; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern cGobiImageMgmtDLL gImageDLL; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiImageMgmt/GobiImageMgmtAPI.h000077500000000000000000000330551455567757300262330ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageMgmtAPI.h DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #include "types.h" /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once /*=========================================================================*/ // Definitions /*=========================================================================*/ #ifdef __cplusplus extern "C" { #endif /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: GobiEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ); /*=========================================================================== METHOD: SetDeviceID DESCRIPTION: This function sets the ID of the device to target PARAMETERS: pDeviceID [ I ] - The device ID as reported by Windows pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDeviceID( CHAR * pDeviceID, CHAR * pDeviceKey ); /*=========================================================================== METHOD: GetImagesPreference DESCRIPTION: This function gets the current images preference PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); /*=========================================================================== METHOD: SetImagesPreference DESCRIPTION: This function sets the current images preference PARAMETERS: imageListSize [ I ] - The size in BYTEs of the image list array pImageList [ I ] - The image list array bForceDownload [ I ] - Force device to download images from host? modemIndex [ I ] - Desired storage index for downloaded modem image pImageTypesSize [I/O] - Upon input the maximum number of elements that the download image types array can contain. Upon successful output the actual number of elements in the download image types array pImageTypes [ O ] - The download image types array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ); /*=========================================================================== METHOD: GetBARMode DESCRIPTION: This function returns the boot and recovery image download mode PARAMETERS: pBARMode [ O ] - Boot and recovery image download mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetBARMode( ULONG * pBARMode ); /*=========================================================================== METHOD: SetBARMode DESCRIPTION: This function requests the device enter boot and recovery image download mode after the next reset RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetBARMode(); /*=========================================================================== METHOD: GetStoredImages DESCRIPTION: This function gets the list of images stored on the device PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ); /*=========================================================================== METHOD: GetStoredImageInfo DESCRIPTION: This function returns info about the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader pVersionID [ O ] - Image version ID pInfo [ O ] - Image info string pLockID [ O ] - Image OEM lock ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ); /*=========================================================================== METHOD: DeleteStoredImage DESCRIPTION: This function deletes the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ); /*=========================================================================== METHOD: ResetDevice DESCRIPTION: This function resets the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetDevice(); /*=========================================================================== METHOD: GobiEnumerateQDLPorts DESCRIPTION: This function enumerates the Gobi QDL port IDs currently attached to the system PARAMETERS: pPortSize [I/O] - Upon input the maximum number of elements that the port ID array can contain. Upon successful output the actual number of elements in the port ID array pPorts [ O ] - Port ID array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateQDLPorts( BYTE * pPortSize, BYTE * pPorts ); /*=========================================================================== METHOD: SetQDLTimeout DESCRIPTION: This function sets the timeout for all subsequent QDL transactions PARAMETERS: to [ O ] - Timeout (in milliseconds) for subsequent transactions RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetQDLTimeout( ULONG to ); /*=========================================================================== METHOD: OpenQDLPort DESCRIPTION: This function opens the specified QDL port of the device PARAMETERS: pPortID [ I ] - ID of QDL port to connect to bBARMode [ I ] - Request boot and recovery mode feature pMajorVersion [ O ] - Major version of the device boot downloader pMinorVersion [ O ] - Minor version of the device boot downloader RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OpenQDLPort( CHAR * pPortID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ); /*=========================================================================== METHOD: CloseQDLPort DESCRIPTION: This function closes the currently open QDL port of the device PARAMETERS: bInformDevice [ I ] - Inform device that QDL port is being closed? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CloseQDLPort( ULONG bInformDevice ); /*=========================================================================== METHOD: GetQDLImagesPreference DESCRIPTION: This function gets the current images preference as reported by the device boot downloader PARAMETERS: pImageListSize [I/O] - Upon input the maximum number of elements that the image info list can contain. Upon successful output the actual number of elements in the image info list pImageList [ O ] - The image info list RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); /*=========================================================================== METHOD: PrepareQDLImageWrite DESCRIPTION: This function prepares the device boot downloader for an image write PARAMETERS: imageType [ I ] - Type of image being written imageSize [ I ] - Size of image being written pBlockSize [I/O] - Upon input the maximum size of image block supported by host, upon successful output the maximum size of image block supported by device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ); /*=========================================================================== METHOD: WriteQDLImageBlock DESCRIPTION: This function writes the specified image block to the device PARAMETERS: sequenceNumber [ I ] - Sequence number for image write blockSize [ I ] - Size of image block pImageBlock [ I ] - Image block RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WriteQDLImageBlock( USHORT sequenceNumber, ULONG blockSize, BYTE * pImageBlock ); /*=========================================================================== METHOD: ValidateQDLImages DESCRIPTION: This function requests the device validate the written images PARAMETERS: pImageType [ O ] - Upon failure this may contain the type of the image that failed validation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateQDLImages( BYTE * pImageType ); #ifdef __cplusplus }; #endif libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiImageMgmt/GobiImageMgmtExports.cpp000077500000000000000000000615351455567757300276250ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageMgmtExports.cpp DESCRIPTION: QUALCOMM Image Management API for Gobi 3000 exports Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiImageMgmt.h" #include "GobiImageMgmtAPI.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for adapter device path const ULONG MAX_DI_DEVICE_PATH = 256; // Maximum length for adapter key const ULONG MAX_DI_KEY = 16; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sDeviceInfo // Struct to represent Gobi device info /*=========================================================================*/ struct sDeviceInfoElement { public: CHAR mPath[MAX_DI_DEVICE_PATH]; CHAR mKey[MAX_DI_KEY]; }; /*=========================================================================*/ // Struct sPortInfo // Struct to represent Gobi QDL port info /*=========================================================================*/ struct sPortInfoElement { public: CHAR mPath[MAX_DI_DEVICE_PATH]; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: GobiEnumerateDevices DESCRIPTION: This function enumerates the Gobi devices currently attached to the system PARAMETERS: pDevicesSize [I/O] - Upon input the maximum number of elements that the device array can contain. Upon successful output the actual number of elements in the device array pDevices [ O ] - The device array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateDevices( BYTE * pDevicesSize, BYTE * pDevices ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pDevicesSize == 0 || pDevices == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pDevicesSize; *pDevicesSize = 0; // Obtain adapter info std::vector adapters; adapters = pAPI->GetAvailableDevices(); ULONG sz = (ULONG)adapters.size(); if (sz > (ULONG)maxInstances) { sz = (ULONG)maxInstances; } sDeviceInfoElement * pOutput = (sDeviceInfoElement *)pDevices; for (ULONG a = 0; a < sz; a++) { const cGobiQMICore::tDeviceID & id = adapters[a]; memset( &pOutput->mPath[0], 0, (SIZE_T)MAX_DI_DEVICE_PATH ); memset( &pOutput->mKey[0], 0, (SIZE_T)MAX_DI_KEY ); ULONG len = id.first.size(); if (len > 0) { if (len >= MAX_DI_DEVICE_PATH) { len = MAX_DI_DEVICE_PATH - 1; } LPCSTR pStr = (LPCSTR)id.first.c_str(); memcpy( (LPVOID)&pOutput->mPath[0], (LPCVOID)pStr, (SIZE_T)len ); } len = id.second.size(); if (len > 0) { if (len >= MAX_DI_KEY) { len = MAX_DI_KEY - 1; } LPCSTR pStr = (LPCSTR)id.second.c_str(); memcpy( (LPVOID)&pOutput->mKey[0], (LPCVOID)pStr, (SIZE_T)len ); } pOutput++; } *pDevicesSize = (BYTE)sz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetDeviceID DESCRIPTION: This function sets the ID of the device to target PARAMETERS: pDeviceID [ I ] - The device ID as reported by Windows pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetDeviceID( CHAR * pDeviceID, CHAR * pDeviceKey ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bOK = pAPI->SetDeviceID( pDeviceID, pDeviceKey ); if (bOK == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetImagesPreference DESCRIPTION: This function gets the current images preference PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetImagesPreference( pImageListSize, pImageList ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: SetImagesPreference DESCRIPTION: This function sets the current images preference PARAMETERS: imageListSize [ I ] - The size in BYTEs of the image list array pImageList [ I ] - The image list array bForceDownload [ I ] - Force device to download images from host? modemIndex [ I ] - Desired storage index for downloaded modem image pImageTypesSize [I/O] - Upon input the maximum number of elements that the download image types array can contain. Upon successful output the actual number of elements in the download image types array pImageTypes [ O ] - The download image types array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->SetImagesPreference( imageListSize, pImageList, bForceDownload, modemIndex, pImageTypesSize, pImageTypes ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GetBARMode DESCRIPTION: This function returns the boot and recovery image download mode PARAMETERS: pBARMode [ O ] - Boot and recovery image download mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetBARMode( ULONG * pBARMode ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetBARMode( pBARMode ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: SetBARMode DESCRIPTION: This function requests the device enter boot and recovery image download mode after the next reset RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetBARMode() { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->SetBARMode(); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GetStoredImages DESCRIPTION: This function gets the list of images stored on the device PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetStoredImages( pImageListSize, pImageList ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GetStoredImageInfo DESCRIPTION: This function returns info about the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader pVersionID [ O ] - Image version ID pInfo [ O ] - Image info string pLockID [ O ] - Image OEM lock ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->GetStoredImageInfo( imageInfoSize, pImageInfo, pMajorVersion, pMinorVersion, pVersionID, pInfo, pLockID ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: DeleteStoredImage DESCRIPTION: This function deletes the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->DeleteStoredImage( imageInfoSize, pImageInfo ); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: ResetDevice DESCRIPTION: This function resets the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ResetDevice() { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string devID; std::string devKey; pAPI->GetDeviceID( devID, devKey ); LPCSTR pID = 0; if (devID.size() > 0) { pID = (LPCSTR)devID.c_str(); } LPCSTR pKey = 0; if (devKey.size() > 0) { pKey = (LPCSTR)devKey.c_str(); } bool bConnect = pAPI->Connect( pID, pKey ); if (bConnect == false) { return (ULONG)pAPI->GetCorrectedLastError(); } ULONG rc = (ULONG)pAPI->ResetDevice(); pAPI->Disconnect(); return rc; } /*=========================================================================== METHOD: GobiEnumerateQDLPorts DESCRIPTION: This function enumerates the Gobi QDL port IDs currently attached to the system PARAMETERS: pPortSize [I/O] - Upon input the maximum number of elements that the port ID array can contain. Upon successful output the actual number of elements in the port ID array pPorts [ O ] - Port ID array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiEnumerateQDLPorts( BYTE * pPortSize, BYTE * pPorts ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } // Validate arguments if (pPortSize == 0 || *pPortSize == 0 || pPorts == 0) { return (ULONG)eGOBI_ERR_INVALID_ARG; } BYTE maxPorts = *pPortSize; *pPortSize = 0; std::vector ports = pAPI->GetAvailableQDLPorts(); ULONG portCount = (ULONG)ports.size(); if (portCount > maxPorts) { portCount = (ULONG)maxPorts; } sPortInfoElement * pOutput = (sPortInfoElement *)pPorts; for (ULONG a = 0; a < portCount; a++) { memset( &pOutput->mPath[0], 0, (SIZE_T)MAX_DI_DEVICE_PATH ); ULONG len = ports[a].size(); if (len > 0) { if (len >= MAX_DI_DEVICE_PATH) { len = MAX_DI_DEVICE_PATH - 1; } LPCSTR pStr = ports[a].c_str(); memcpy( (LPVOID)&pOutput->mPath[0], (LPCVOID)pStr, (SIZE_T)len ); } pOutput++; } *pPortSize = (BYTE)portCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetQDLTimeout DESCRIPTION: This function sets the timeout for all subsequent QDL transactions PARAMETERS: to [ O ] - Timeout (in milliseconds) for subsequent transactions RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG SetQDLTimeout( ULONG to ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetQDLTimeout( to ); } /*=========================================================================== METHOD: OpenQDLPort DESCRIPTION: This function opens the specified QDL port of the device PARAMETERS: pPortID [ I ] - ID of QDL port to connect to bBARMode [ I ] - Request boot and recovery mode feature pMajorVersion [ O ] - Major version of the device boot downloader pMinorVersion [ O ] - Minor version of the device boot downloader RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OpenQDLPort( CHAR * pPortID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } std::string strPortID( (const char *)pPortID ); return (ULONG)pAPI->OpenQDLPort( strPortID, bBARMode, pMajorVersion, pMinorVersion ); } /*=========================================================================== METHOD: CloseQDLPort DESCRIPTION: This function closes the currently open QDL port of the device PARAMETERS: bInformDevice [ I ] - Inform device that QDL port is being closed? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CloseQDLPort( ULONG bInformDevice ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bTmp = (bInformDevice != 0); return (ULONG)pAPI->CloseQDLPort( bTmp ); } /*=========================================================================== METHOD: GetQDLImagesPreference DESCRIPTION: This function gets the current images preference as reported by the device boot downloader PARAMETERS: pImageListSize [I/O] - Upon input the maximum number of elements that the image info list can contain. Upon successful output the actual number of elements in the image info list pImageList [ O ] - The image info list RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->GetQDLImagesPreference( pImageListSize, pImageList ); } /*=========================================================================== METHOD: PrepareQDLImageWrite DESCRIPTION: This function prepares the device boot downloader for an image write PARAMETERS: imageType [ I ] - Type of image being written imageSize [ I ] - Size of image being written pBlockSize [I/O] - Upon input the maximum size of image block supported by host, upon successful output the maximum size of image block supported by device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->PrepareQDLImageWrite( imageType, imageSize, pBlockSize ); } /*=========================================================================== METHOD: WriteQDLImageBlock DESCRIPTION: This function writes the specified image block to the device PARAMETERS: sequenceNumber [ I ] - Sequence number for image write blockSize [ I ] - Size of image block pImageBlock [ I ] - Image block RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WriteQDLImageBlock( USHORT sequenceNumber, ULONG blockSize, BYTE * pImageBlock ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->WriteQDLImageBlock( sequenceNumber, blockSize, pImageBlock ); } /*=========================================================================== METHOD: ValidateQDLImages DESCRIPTION: This function requests the device validate the written images PARAMETERS: pImageType [ O ] - Upon failure this may contain the type of the image that failed validation RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ValidateQDLImages( BYTE * pImageType ) { cGobiImageMgmt * pAPI = gImageDLL.GetAPI(); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->ValidateQDLImages( pImageType ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiImageMgmt/Makefile.am000066400000000000000000000011731455567757300251050ustar00rootroot00000000000000INCLUDES = \ -I$(top_srcdir)/Core \ -I$(top_srcdir)/Shared lib_LTLIBRARIES = libGobiImageMgmt.la libGobiImageMgmt_la_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT libGobiImageMgmt_la_SOURCES = \ GobiImageMgmtAPI.h \ GobiImageMgmt.h \ GobiImageMgmt.cpp \ GobiImageMgmtExports.cpp libGobiImageMgmt_la_LIBADD = \ $(top_builddir)/Database/QMI/libQMIDB.la \ $(top_builddir)/Shared/libShared.la \ $(top_builddir)/Core/libCore.la \ -lpthread libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiQDLService/000077500000000000000000000000001455567757300231415ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiQDLService/99-GobiQDLService.rules000077500000000000000000000037301455567757300272240ustar00rootroot00000000000000#=========================================================================== # FILE: # 99-GobiQDLService.rules # # DESCRIPTION: # Udev rules for Qualcomm Downloader application (GobiQDLService) # # PUBLIC CLASSES AND METHODS: # Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================ ACTION=="add", SUBSYSTEM=="tty", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="920c", RUN+="/opt/Qualcomm/Gobi/GobiQDLService/GobiQDLService" libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiQDLService/Main.cpp000077500000000000000000000137661455567757300245510ustar00rootroot00000000000000/*=========================================================================== FILE: Main.cpp DESCRIPTION: Firmware downloader using cGobiQDLCore class PUBLIC CLASSES AND FUNCTIONS: Run main Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQDLCore.h" #include "QDLBuffers.h" #include "MemoryMappedFile.h" #include //--------------------------------------------------------------------------- // Free Methods //--------------------------------------------------------------------------- /*=========================================================================== METHOD: Run (Public Method) DESCRIPTION: Simple QDL download RETURN VALUE: bool ===========================================================================*/ bool Run(void) { cGobiQDLCore qdl; bool bRC = qdl.Initialize(); if (bRC == false) { syslog( LOG_INFO, "Failed to initialize QDL core" ); return bRC; } qdl.SetQDLTimeout( 10000 ); std::vector qdlPorts = qdl.GetAvailableQDLPorts(); if (qdlPorts.size() == 0) { syslog( LOG_INFO, "No QDL devices found" ); return false; } std::string portName = qdlPorts[0]; syslog( LOG_INFO, "Download started to port %s", portName.c_str() ); // Connect to port ULONG maj = ULONG_MAX; ULONG min = ULONG_MAX; eGobiError err = qdl.OpenQDLPort( portName, 0, &maj, &min ); if (err != eGOBI_ERR_NONE) { syslog( LOG_INFO, "OpenQDLPort( %s ) = %d", portName.c_str(), err ); return false; } ULONG bufSz = 12; sQDLRawImageID buf[12]; err = qdl.GetQDLImagesPreference( &bufSz, (BYTE *)&buf[0] ); if (err != eGOBI_ERR_NONE) { syslog( LOG_INFO, "GetQDLImagesPreference() = %d", err ); qdl.CloseQDLPort( false ); return false; } if (bufSz > 12) { syslog( LOG_INFO, "GetQDLImagesPreference(), bufSz = %lu", bufSz ); qdl.CloseQDLPort( false ); return false; } bool bErr = false; for (ULONG i = 0; i < bufSz; i++) { std::string img = ::GetImageByUniqueID( &buf[i].mImageID[0] ); if (img.size() <= 0) { // Skip files we do not have access to syslog( LOG_INFO, "GetImageByUniqueID() failure" ); return false; } ULONG fileMaj = 0; ULONG fileMin = 0; err = ::GetImageBootCompatibility( img.c_str(), &fileMaj, &fileMin ); if (err != eGOBI_ERR_NONE || fileMaj != maj) { // Skip files that may not be compatible syslog( LOG_INFO, "GetImageBootCompatibility() failure [%d]", err ); return false; } cMemoryMappedFile imgFile( img.c_str() ); syslog( LOG_INFO, "Downloading %s", img.c_str() ); LPVOID pImgData = imgFile.GetContents(); ULONG imgSz = imgFile.GetSize(); if (pImgData == 0 || imgSz == 0) { syslog( LOG_INFO, "Image file failure [%s]", img.c_str() ); bErr = true; return false; } ULONG blockSz = QDL_MAX_CHUNK_SIZE; err = qdl.PrepareQDLImageWrite( buf[i].mImageType, imgSz, &blockSz ); if (err != eGOBI_ERR_NONE) { if (err == eGOBI_ERR_QDL_OPEN_SKIP) { // Device already has this file continue; } else { syslog( LOG_INFO, "PrepareQDLImageWrite() = %d", err ); bErr = true; break; } } err = qdl.WriteQDLImageBlock( 0, imgSz, (BYTE *)pImgData ); if (err != eGOBI_ERR_NONE) { syslog( LOG_INFO, "WriteQDLImageBlock() = %d", err ); bErr = true; break; } } if (bErr == false) { syslog( LOG_INFO, "Download completed" ); BYTE errImg; qdl.ValidateQDLImages( &errImg ); } qdl.CloseQDLPort( true ); } /*=========================================================================== METHOD: main (Public Method) DESCRIPTION: Application entry point RETURN VALUE: int - Process exit code ===========================================================================*/ int main(void) { // Add PID to log statements openlog( "GobiQDLService", LOG_PID, LOG_USER ); bool bSuccess = Run(); closelog(); return (bSuccess ? 0 : -1 ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/GobiQDLService/Makefile.am000066400000000000000000000010761455567757300252010ustar00rootroot00000000000000INCLUDES = \ -I$(top_srcdir)/Core \ -I$(top_srcdir)/Shared bin_PROGRAMS = GobiQDLService GobiQDLService_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT GobiQDLService_SOURCES = Main.cpp GobiQDLService_CXXFLAGS = -pthread GobiQDLService_LDADD = \ $(top_builddir)/Database/QMI/libQMIDB.la \ $(top_builddir)/Shared/libShared.la \ $(top_builddir)/Core/libCore.la \ -lrt \ -lpthread libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Makefile.am000066400000000000000000000001711455567757300224320ustar00rootroot00000000000000SUBDIRS= \ Database \ Shared \ Core \ GobiConnectionMgmt \ GobiImageMgmt \ GobiQDLService ACLOCAL_AMFLAGS = -I m4 libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/NEWS000066400000000000000000000000001455567757300210640ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/README000066400000000000000000000000001455567757300212450ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/000077500000000000000000000000001455567757300216055ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiError.h000077500000000000000000000145051455567757300236600ustar00rootroot00000000000000/*=========================================================================== FILE: GobiError.h DESCRIPTION: QUALCOMM Gobi Errors Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QMIEnum.h" #include "QDLEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiError Enumeration // Gobi API Error Enumeration /*=========================================================================*/ enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrorCode) eGOBI_ERR_QMI_OFFSET = 1000, // Offset from which mapped QDL errors start from (see eQDLError) eGOBI_ERR_QDL_OFFSET = 100000 }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eGobiError validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eGobiError ec ) { bool retVal = false; if (ec > eGOBI_ERR_ENUM_BEGIN && ec < eGOBI_ERR_ENUM_END) { retVal = true; } if (ec >= eGOBI_ERR_QMI_OFFSET && ec < eGOBI_ERR_QDL_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QMI_OFFSET; retVal = ::IsValid( (eQMIErrorCode)tmp ); } if (ec >= eGOBI_ERR_QDL_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QDL_OFFSET; retVal = ::IsValid( (eQDLError)tmp ); } return retVal; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiImageDefinitions.h000077500000000000000000000152631455567757300260070ustar00rootroot00000000000000/*=========================================================================== FILE: GobiImageDefinitions.h DESCRIPTION: QUALCOMM Gobi Image related definitions PUBLIC CLASSES AND FUNCTIONS: eGobiDeviceType eGobiMBNType eGobiImageTech eGobiImageCarrier eGobiImageRegion eGobiImageGPS Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiDeviceType Enumeration // Gobi Device Interface Enumeration /*=========================================================================*/ enum eGobiDeviceType { eGOBI_DEV_ENUM_BEGIN = -1, eGOBI_DEV_NET, // 0 - Network adapter eGOBI_DEV_NMEA, // 1 - NMEA COM port eGOBI_DEV_DIAG, // 2 - DIAG port eGOBI_DEV_MODEM, // 3 - Modem eGOBI_DEV_AT, // 4 - AT port eGOBI_DEV_NET2, // 5 - Auxiliary network adapter eGOBI_DEV_QDL, // 6 - QDL port (should always be last) eGOBI_DEV_ENUM_END }; /*=========================================================================*/ // eGobiMBNType Enumeration // Gobi MBN File Type Enumeration /*=========================================================================*/ enum eGobiMBNType { eGOBI_MBN_TYPE_ENUM_BEGIN = -1, eGOBI_MBN_TYPE_MODEM, // 0 - Modem/AMSS eGOBI_MBN_TYPE_PRI, // 1 - PRI/UQCN eGOBI_MBN_TYPE_ENUM_END, }; /*=========================================================================*/ // eGobiImageTech Enumeration // Gobi Image Technology Enumeration /*=========================================================================*/ enum eGobiImageTech { eGOBI_IMG_TECH_CDMA = 0, // 0 - CDMA eGOBI_IMG_TECH_UMTS // 1 - UMTS }; /*=========================================================================*/ // eGobiImageCarrier Enumeration // Gobi Image Carrier Enumeration /*=========================================================================*/ enum eGobiImageCarrier { eGOBI_IMG_CAR_GENERIC = 1, // 001 eGOBI_IMG_CAR_FACTORY, // 002 eGOBI_IMG_CAR_NORF, // 003 eGOBI_IMG_CAR_VERIZON = 101, // 101 eGOBI_IMG_CAR_SPRINT, // 102 eGOBI_IMG_CAR_ALLTEL, // 103 eGOBI_IMG_CAR_BELL, // 104 eGOBI_IMG_CAR_TELUS, // 105 eGOBI_IMG_CAR_US, // 106 eGOBI_IMG_CAR_TELSTRA1, // 107 eGOBI_IMG_CAR_CHINA_UNICOM, // 108 eGOBI_IMG_CAR_TELCOM_NZ, // 109 eGOBI_IMG_CAR_SK_TELCOM1, // 110 eGOBI_IMG_CAR_RELIANCE1, // 111 eGOBI_IMG_CAR_TATA, // 112 eGOBI_IMG_CAR_METROPCS, // 113 eGOBI_IMG_CAR_LEAP, // 114 eGOBI_IMG_CAR_KDDI, // 115 eGOBI_IMG_CAR_IUSACELL, // 116 eGOBI_IMG_CAR_CHINA_TELECOM, // 117 eGOBI_IMG_CAR_OMH, // 118 eGOBI_IMG_CAR_ATT = 201, // 201 eGOBI_IMG_CAR_VODAFONE, // 202 eGOBI_IMG_CAR_TMOBILE, // 203 eGOBI_IMG_CAR_ORANGE, // 204 eGOBI_IMG_CAR_TELEFONICA, // 205 eGOBI_IMG_CAR_TELCOM_ITALIA, // 206 eGOBI_IMG_CAR_3, // 207 eGOBI_IMG_CAR_O2, // 208 eGOBI_IMG_CAR_SFR, // 209 eGOBI_IMG_CAR_SWISSCOM, // 210 eGOBI_IMG_CAR_CHINA_MOBILE, // 211 eGOBI_IMG_CAR_TELSTRA2, // 212 eGOBI_IMG_CAR_SINGTEL_OPTUS, // 213 eGOBI_IMG_CAR_RELIANCE2, // 214 eGOBI_IMG_CAR_BHARTI, // 215 eGOBI_IMG_CAR_NTT_DOCOMO, // 216 eGOBI_IMG_CAR_EMOBILE, // 217 eGOBI_IMG_CAR_SOFTBANK, // 218 eGOBI_IMG_CAR_KT_FREETEL, // 219 eGOBI_IMG_CAR_SK_TELCOM2, // 220 eGOBI_IMG_CAR_TELENOR, // 221 eGOBI_IMG_CAR_NETCOM, // 222 eGOBI_IMG_CAR_TELIASONERA, // 223 eGOBI_IMG_CAR_AMX_TELCEL, // 224 eGOBI_IMG_CAR_BRASIL_VIVO // 225 }; /*=========================================================================*/ // eGobiImageRegion Enumeration // Gobi Image Region Enumeration /*=========================================================================*/ enum eGobiImageRegion { eGOBI_IMG_REG_NA = 0, // 0 - North America eGOBI_IMG_REG_LA, // 1 - Latin America eGOBI_IMG_REG_EU, // 2 - Europe eGOBI_IMG_REG_ASIA, // 3 - Asia eGOBI_IMG_REG_AUS, // 4 - Australia eGOBI_IMG_REG_GLOBAL // 5 - Global }; /*=========================================================================*/ // eGobiImageGPS Enumeration // Gobi Image GPS Enumeration /*=========================================================================*/ enum eGobiImageGPS { eGOBI_IMG_GPS_NONE = 0, // 0 - None eGOBI_IMG_GPS_STAND_ALONE, // 1 - Stand-alone eGOBI_IMG_GPS_ASSISTED, // 2 - Stand-alone + AGPS + XTRA eGOBI_IMG_GPS_NO_XTRA // 3 - Stand-alone + AGPS }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiMBNMgmt.cpp000077500000000000000000000712511455567757300243640ustar00rootroot00000000000000/*=========================================================================== FILE: GobiMBNMgmt.cpp DESCRIPTION: QUALCOMM Gobi MBN management functions for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: GetImageStore GetImageInfo GetImagesInfo GetImageBootCompatibility MapVersionInfo GetImageByUniqueID Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiMBNMgmt.h" #include "GobiError.h" #include "CoreUtilities.h" #include "MemoryMappedFile.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Magic values for MBN (AMSS/UQCN) images const ULONG MBN_LOCK_MAGIC = 0x809b1d80; const ULONG MBN_BOOT_MAGIC = 0xFEDC1234; const ULONG MBN_BUILD_MAGIC = 0xFEDC1235; const ULONG UQCN_INFO_MAGIC = 0xFEDC1236; const ULONG MBN_HASH_MAGIC = 0xFEDC1237; const ULONG MBN_LOCK_AUTH_MAGIC = 0xFEDC1238; // Maximum length for an UQCN build info string (including NULL) const ULONG MBN_BUILD_ID_LEN = 32; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sMBNBootRecord // Struct to represent the MBN boot flash record /*=========================================================================*/ struct sMBNBootRecord { public: ULONG mMagic; // MBN_BOOT_MAGIC WORD mMajorID; // Boot flash major version WORD mMinorID; // Boot flash minor version }; /*=========================================================================*/ // Struct sMBNBuildRecord // Struct to represent the build ID record /*=========================================================================*/ struct sMBNBuildIDRecord { public: ULONG mMagic; // MBN_BUILD_MAGIC CHAR mBuildID[MBN_BUILD_ID_LEN]; // Build ID string }; /*=========================================================================*/ // Struct sUQCNVersionID // Struct to represent the UQCN version ID /*=========================================================================*/ struct sUQCNVersionID { public: ULONG mMinorID : 7; ULONG mXTRADisabled : 1; ULONG mGPSDisabled : 1; ULONG mReserved : 7; ULONG mMajorID : 8; ULONG mSystem : 2; ULONG mCompatibility : 6; }; /*=========================================================================*/ // Struct sUQCNInfoRecord // Struct to represent the UQCN information record /*=========================================================================*/ struct sUQCNInfoRecord { public: ULONG mMagic; // UQCN_INFO_MAGIC sUQCNVersionID mVersionID; // Version ID CHAR mInfo[MBN_BUILD_ID_LEN]; // Build info string }; /*=========================================================================*/ // Struct sMBNHashRecord // Struct to represent the signature hash record /*=========================================================================*/ struct sMBNHashRecord { public: ULONG mMagic; // MBN_HASH_MAGIC BYTE mUniqueID[MBN_UNIQUE_ID_LEN]; // Build ID string }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ReverseBinaryDataSearch (Free Method) DESCRIPTION: Search a data buffer for the first occurence of a specified sequence of data (starting from the end of the buffer) PARAMETERS: pBuffer [ I ] - Buffer being search bufferLen [ I ] - Length of above buffer pData [ I ] - Data to search for dataLen [ I ] - Length of above buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ const BYTE * ReverseBinaryDataSearch( const BYTE * pBuffer, ULONG bufferLen, const BYTE * pData, ULONG dataLen ) { // Handle empty cases if (pBuffer == 0 || bufferLen == 0 || pData ==0 || dataLen == 0) { return 0; } // Handle impossible case if (dataLen > bufferLen) { return 0; } const BYTE * pTmp = pBuffer + (bufferLen - dataLen); while (pTmp > pBuffer) { int res = ::memcmp( (const void *)pTmp, (const void *)pData, (size_t)dataLen ); if (res == 0) { return pTmp; } pTmp--; } return 0; } /*=========================================================================== METHOD: ParseUQCNVersion (Free Method) DESCRIPTION: Parse UQCN version ID to image information PARAMETERS: uqcnID [ I ] - UQCN ID pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: bool ===========================================================================*/ bool ParseUQCNVersion( ULONG uqcnID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Assume failure bool bRC = false; *pTechnology = ULONG_MAX; *pCarrier = ULONG_MAX; *pRegion = ULONG_MAX; *pGPSCapability = ULONG_MAX; sUQCNVersionID * pID = (sUQCNVersionID *)&uqcnID; if (pID->mSystem == 2) { // Successs is returned when the technology is valid *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; bRC = true; } else if (pID->mSystem == 1) { // Successs is returned when the technology is valid *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; bRC = true; } // Valid technology? if (bRC == false) { return bRC; } switch (pID->mMajorID) { case 0x00: *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x01: *pCarrier = (ULONG)eGOBI_IMG_CAR_VERIZON; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x02: *pCarrier = (ULONG)eGOBI_IMG_CAR_SPRINT; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x03: *pCarrier = (ULONG)eGOBI_IMG_CAR_ATT; *pRegion = (ULONG)eGOBI_IMG_REG_NA; break; case 0x04: *pCarrier = (ULONG)eGOBI_IMG_CAR_VODAFONE; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x05: *pCarrier = (ULONG)eGOBI_IMG_CAR_TMOBILE; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x09: *pCarrier = (ULONG)eGOBI_IMG_CAR_GENERIC; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x0B: *pCarrier = (ULONG)eGOBI_IMG_CAR_ORANGE; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x0C: *pCarrier = (ULONG)eGOBI_IMG_CAR_TELEFONICA; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x0D: *pCarrier = (ULONG)eGOBI_IMG_CAR_NTT_DOCOMO; *pRegion = (ULONG)eGOBI_IMG_REG_ASIA; break; case 0x0E: *pCarrier = (ULONG)eGOBI_IMG_CAR_TELCOM_ITALIA; *pRegion = (ULONG)eGOBI_IMG_REG_EU; break; case 0x12: *pCarrier = (ULONG)eGOBI_IMG_CAR_TELCOM_NZ; *pRegion = (ULONG)eGOBI_IMG_REG_AUS; break; case 0x13: *pCarrier = (ULONG)eGOBI_IMG_CAR_CHINA_TELECOM; *pRegion = (ULONG)eGOBI_IMG_REG_ASIA; break; case 0x14: *pCarrier = (ULONG)eGOBI_IMG_CAR_OMH; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x16: *pCarrier = (ULONG)eGOBI_IMG_CAR_AMX_TELCEL; *pRegion = (ULONG)eGOBI_IMG_REG_LA; break; case 0x17: *pCarrier = (ULONG)eGOBI_IMG_CAR_NORF; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x18: *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; break; case 0x19: *pCarrier = (ULONG)eGOBI_IMG_CAR_BRASIL_VIVO; *pRegion = (ULONG)eGOBI_IMG_REG_LA; break; } // Set GPS capability if (pID->mGPSDisabled == 1) { *pGPSCapability = (ULONG)eGOBI_IMG_GPS_NONE; } else if (*pCarrier == (ULONG)eGOBI_IMG_CAR_NORF) { // No RF with GPS results in stand-alone GPS support only *pGPSCapability = (ULONG)eGOBI_IMG_GPS_STAND_ALONE; } else { if (pID->mXTRADisabled == 1) { *pGPSCapability = (ULONG)eGOBI_IMG_GPS_NO_XTRA; } else { *pGPSCapability = (ULONG)eGOBI_IMG_GPS_ASSISTED; } } return bRC; } /*=========================================================================== METHOD: ParseAMSSVersion (Free Method) DESCRIPTION: Parse UQCN version ID to image information PARAMETERS: pVersion [ I ] - Version string pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: bool ===========================================================================*/ bool ParseAMSSVersion( LPCSTR pVersion, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Assume failure bool bRC = false; *pTechnology = ULONG_MAX; *pCarrier = ULONG_MAX; *pRegion = ULONG_MAX; *pGPSCapability = ULONG_MAX; // Validate arguments if (pVersion == 0 || pVersion[0] == 0) { return bRC; } std::string tmpVer = pVersion; // std::string version of MakeUpper() transform( tmpVer.begin(), tmpVer.end(), tmpVer.begin(), toupper ); if ( (tmpVer.find( "STAUFH" ) != std::string::npos) || (tmpVer.find( "STSUFH" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUVH" ) != std::string::npos) || (tmpVer.find( "STSUVH" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_VERIZON; *pRegion = (ULONG)eGOBI_IMG_REG_NA; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUSH" ) != std::string::npos) || (tmpVer.find( "STSUSH" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_SPRINT; *pRegion = (ULONG)eGOBI_IMG_REG_NA; bRC = true; return bRC; } else if (tmpVer.find( "STSUCH" ) != std::string::npos) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_CHINA_TELECOM; *pRegion = (ULONG)eGOBI_IMG_REG_ASIA; bRC = true; return bRC; } else if (tmpVer.find( "STSUOH" ) != std::string::npos) { *pTechnology = (ULONG)eGOBI_IMG_TECH_CDMA; *pCarrier = (ULONG)eGOBI_IMG_CAR_OMH; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUXN" ) != std::string::npos) || (tmpVer.find( "STSUXN" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; *pCarrier = (ULONG)eGOBI_IMG_CAR_NORF; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUFN" ) != std::string::npos) || (tmpVer.find( "STSUFN" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; *pCarrier = (ULONG)eGOBI_IMG_CAR_FACTORY; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } else if ( (tmpVer.find( "STAUGN" ) != std::string::npos) || (tmpVer.find( "STSUGN" ) != std::string::npos) ) { *pTechnology = (ULONG)eGOBI_IMG_TECH_UMTS; *pCarrier = (ULONG)eGOBI_IMG_CAR_GENERIC; *pRegion = (ULONG)eGOBI_IMG_REG_GLOBAL; bRC = true; return bRC; } return bRC; } struct device_id { GobiType type; unsigned int vid; unsigned int pid; const char *fwpath; }; #define GOBI3(vid,pid) { GOBITYPE_3K, 0x ## vid, 0x ## pid, "/opt/Qualcomm/firmware/" #vid ":" #pid } #define GOBI2(vid,pid,oem) { GOBITYPE_2K, 0x ## vid, 0x ## pid, "/opt/Qualcomm/Images2k/" oem } const struct device_id device_ids[] = { GOBI3(05c6, 920d), /* Novatel */ GOBI3(12d1, 14f1), /* Sony */ GOBI3(1410, a021), /* Generic */ GOBI3(413c, 8194), /* Dell */ GOBI2(05c6, 9215, "Acer"), GOBI2(05c6, 9225, "Sony"), GOBI2(05c6, 9245, "Samsung"), GOBI2(1410, 0000, "Novatel"), GOBI2(413c, 8186, "Dell"), { GOBITYPE_UNKNOWN, 0, 0, NULL } }; static const struct device_id *VidPidToDev(unsigned int vid, unsigned int pid) { int i; for (i = 0; device_ids[i].fwpath; i++) { if (device_ids[i].vid && device_ids[i].vid != vid) continue; if (device_ids[i].pid && device_ids[i].pid != pid) continue; return &device_ids[i]; } return NULL; } GobiType GetDeviceType(unsigned int vid, unsigned int pid) { const struct device_id *dev = VidPidToDev(vid, pid); return dev ? dev->type : GOBITYPE_UNKNOWN; } static const char *VidPidToImageStore(unsigned int vid, unsigned int pid) { int i; const struct device_id *dev = VidPidToDev(vid, pid); /* Part of the gobi 3k image API doesn't have access to the device * vid:pid when it goes looking for images, so we support this as a * special case - 0000:0000 means "the directory with *all* gobi3 * firmwares in it". */ if (vid == 0 && pid == 0) return "/opt/Qualcomm/firmware"; return dev ? dev->fwpath : NULL; } /*=========================================================================== METHOD: GetImageStore (Public Method) DESCRIPTION: Get the image store folder, i.e., the folder containing one or more carrier-specific image subfolders RETURN VALUE: std::string - Image Store ===========================================================================*/ std::string GetImageStore(unsigned int vid, unsigned int pid) { std::string oem = VidPidToImageStore(vid, pid); printf("GetImageStore: dir %s\n", oem.c_str()); return oem; } /*=========================================================================== METHOD: GetImageInfo (Public Method) DESCRIPTION: Get the image information for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pImageType [ O ] - Image type pImageID [ O ] - Unique image ID pVersionID [ O ] - Version ID versionSize [ I ] - The maximum number of characters including the NULL terminator that can be copied to the version array pVersion [ O ] - NULL-terminated string representing the version RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageInfo( LPCSTR pFilePath, BYTE * pImageType, BYTE * pImageID, ULONG * pVersionID, USHORT versionSize, CHAR * pVersion ) { // Validate arguments if ( (pFilePath == 0) || (pFilePath[0] == 0) || (pImageType == 0) || (pImageID == 0) || (pVersionID == 0) || (versionSize == 0) || (pVersion == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Open up MBN file cMemoryMappedFile mbnFile( pFilePath ); const BYTE * pMBNData = (const BYTE *)mbnFile.GetContents(); ULONG dataSz = mbnFile.GetSize(); // MBN file (sort of) valid? if (pMBNData == 0) { return eGOBI_ERR_FILE_OPEN; } if (dataSz <= 256) { return eGOBI_ERR_INVALID_FILE; } // Skip to the end pMBNData += (dataSz - 256); // Search for the UQCN specific info const BYTE * pTmp = 0; pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&UQCN_INFO_MAGIC, (ULONG)sizeof( UQCN_INFO_MAGIC ) ); if (pTmp != 0) { const sUQCNInfoRecord * pRec = (const sUQCNInfoRecord *)pTmp; *pVersionID = *(ULONG *)&pRec->mVersionID; *pImageType = 1; } else { // Since we did not find UQCN info, presume this is an AMSS file pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_BOOT_MAGIC, (ULONG)sizeof( MBN_BOOT_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } const sMBNBootRecord * pRec = (const sMBNBootRecord *)pTmp; *pVersionID = pRec->mMinorID; *pImageType = 0; } // Search for the unique ID pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_HASH_MAGIC, (ULONG)sizeof( MBN_HASH_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } // Copy the unique ID const sMBNHashRecord * pHash = (const sMBNHashRecord *)pTmp; memcpy( (LPVOID)pImageID, (LPCVOID)&pHash->mUniqueID[0], (SIZE_T)MBN_UNIQUE_ID_LEN ); // Search for the build ID pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_BUILD_MAGIC, (ULONG)sizeof( MBN_BUILD_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } memset( (PVOID)&pVersion[0], 0, (SIZE_T)versionSize ); // Copy the MBN_BUILD_MAGIC ID const sMBNBuildIDRecord * pRec = (const sMBNBuildIDRecord *)pTmp; for (ULONG t = 0; t < MBN_BUILD_ID_LEN; t++) { if (t >= versionSize) { return eGOBI_ERR_BUFFER_SZ; } pVersion[t] = pRec->mBuildID[t]; if (pRec->mBuildID[t] == 0) { break; } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetImagesInfo (Public Method) DESCRIPTION: Return the info for the images located at the given path PARAMETERS: path [ I ] - Fully qualified path RETURN VALUE: std:vector - Vector of image information ===========================================================================*/ std::vector GetImagesInfo( const std::string & path ) { // Validate arguments std::vector retVec; if (path.size() <= 0) { return retVec; } // Search all MBN files in the specified folder std::string folderSearch = path; int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } folderSearch += "*.mbn"; glob_t files; int ret = glob( folderSearch.c_str(), 0, NULL, &files ); if (ret != 0) { // Glob error return retVec; } for (int i = 0; i < files.gl_pathc; i++) { std::string mbnName = files.gl_pathv[i]; BYTE imageType = UCHAR_MAX; BYTE imageID[16] = { 0 }; ULONG versionID = ULONG_MAX; USHORT versionSz = MAX_PATH * 2 + 1; CHAR versionStr[MAX_PATH * 2 + 1] = { 0 }; eGobiError rc = ::GetImageInfo( mbnName.c_str(), &imageType, &imageID[0], &versionID, versionSz, &versionStr[0] ); if (rc == eGOBI_ERR_NONE) { sImageInfo ii; ii.mImageType = (eGobiMBNType)imageType; ii.mVersionID = versionID; ii.mVersion = (LPCSTR)&versionStr[0]; memcpy( (LPVOID)&ii.mImageID[0], (LPCVOID)&imageID[0], 16 ); retVec.push_back( ii ); } } globfree( &files ); return retVec; } /*=========================================================================== METHOD: GetImageBootCompatibility (Public Method) DESCRIPTION: Get the image boot compatibility for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageBootCompatibility( LPCSTR pFilePath, ULONG * pMajorVersion, ULONG * pMinorVersion ) { // Validate arguments if ( (pFilePath == 0) || (pFilePath[0] == 0) || (pMajorVersion == 0) || (pMinorVersion == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Open up MBN file cMemoryMappedFile mbnFile( pFilePath ); const BYTE * pMBNData = (const BYTE *)mbnFile.GetContents(); ULONG dataSz = mbnFile.GetSize(); // MBN file (sort of) valid? if (pMBNData == 0) { return eGOBI_ERR_FILE_OPEN; } if (dataSz <= 256) { return eGOBI_ERR_INVALID_FILE; } // Skip to the end pMBNData += (dataSz - 256); const BYTE * pTmp = 0; pTmp = ReverseBinaryDataSearch( pMBNData, 256, (const BYTE *)&MBN_BOOT_MAGIC, (ULONG)sizeof( MBN_BOOT_MAGIC ) ); if (pTmp == 0) { return eGOBI_ERR_INVALID_FILE; } const sMBNBootRecord * pRec = (const sMBNBootRecord *)pTmp; *pMajorVersion = pRec->mMajorID; *pMinorVersion = pRec->mMinorID; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: MapVersionInfo (Public Method) DESCRIPTION: Map the specified version string to image capabilities PARAMETERS: versionID [ I ] - Version ID imageType [ I ] - Image type pVersion [ I ] - Version string for image pTechnology [ O ] - Technology type pCarrier [ O ] - Carrier type pRegion [ O ] - Region type pGPSCapability [ O ] - GPS capability RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError MapVersionInfo( ULONG versionID, BYTE imageType, LPCSTR pVersion, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { if ((eGobiMBNType)imageType == eGOBI_MBN_TYPE_MODEM) { // AMSS (modem) bool bOK = ParseAMSSVersion( pVersion, pTechnology, pCarrier, pRegion, pGPSCapability ); if (bOK == false) { return eGOBI_ERR_INVALID_ARG; } } else if ((eGobiMBNType)imageType == eGOBI_MBN_TYPE_PRI) { // UQCN (PRI) bool bOK = ParseUQCNVersion( versionID, pTechnology, pCarrier, pRegion, pGPSCapability ); if (bOK == false) { return eGOBI_ERR_INVALID_ARG; } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetImageByUniqueID (Public Method) DESCRIPTION: Return the fully qualified path to an image specified by unique ID PARAMETERS: pImageID [ I ] - Unique image ID RETURN VALUE: std::string - Fully qualified path to matching image ===========================================================================*/ std::string GetImageByUniqueID( BYTE * pImageID ) { // Validate arguments std::string retStr = ""; if (pImageID == 0) { return retStr; } // Enumerate all folders of the image store std::vector folders; std::string imageStore = ::GetImageStore(0, 0); EnumerateFolders( imageStore, folders ); // Did we find any folders? ULONG foldersSz = (ULONG)folders.size(); if (foldersSz == 0) { return retStr; } // Go through each folder searching for a match for (ULONG f = 0; f < foldersSz; f++) { // Search all MBN files in the specified folder std::string folderSearch = folders[f]; int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } folderSearch += "*.mbn"; glob_t files; int ret = glob( folderSearch.c_str(), 0, NULL, &files ); if (ret != 0) { // Glob error, often GLOB_NOMATCH continue; } for (int i = 0; i < files.gl_pathc; i++) { std::string mbnName = files.gl_pathv[i]; BYTE imageType = UCHAR_MAX; BYTE imageID[16] = { 0 }; ULONG versionID = ULONG_MAX; USHORT versionSz = MAX_PATH * 2 + 1; CHAR versionStr[MAX_PATH * 2 + 1] = { 0 }; eGobiError rc = ::GetImageInfo( mbnName.c_str(), &imageType, &imageID[0], &versionID, versionSz, &versionStr[0] ); if (rc == eGOBI_ERR_NONE) { bool bMatch = true; for (ULONG i = 0; i < 16; i++) { if (imageID[i] != pImageID[i]) { bMatch = false; break; } } if (bMatch == true) { retStr = mbnName; break; } } } globfree( &files ); if (retStr.size() > 0) { break; } } return retStr; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiMBNMgmt.h000077500000000000000000000173341455567757300240330ustar00rootroot00000000000000/*=========================================================================== FILE: GobiMBNMgmt.h DESCRIPTION: QUALCOMM Gobi MBN management functions for Gobi 3000 PUBLIC CLASSES AND FUNCTIONS: sImageInfo GetImageStore GetImageInfo GetImagesInfo GetImageBootCompatibility MapVersionInfo GetImageByUniqueID Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "apidefs.h" #include "GobiImageDefinitions.h" #include "GobiError.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for unique image ID const ULONG MBN_UNIQUE_ID_LEN = 16; /*=========================================================================*/ // Struct sImageInfo // Storage structure for Image information /*=========================================================================*/ struct sImageInfo { public: // Default constructor sImageInfo() : mImageType( eGOBI_MBN_TYPE_ENUM_BEGIN ), mVersionID( ULONG_MAX ), mVersion( "" ) { memset( (LPVOID)&mImageID[0], 0, MBN_UNIQUE_ID_LEN ); }; // Is this object valid? bool IsValid() const { return ( (mImageType != eGOBI_MBN_TYPE_ENUM_BEGIN) && (mVersionID != ULONG_MAX) && (mVersion.size() > 0) ); }; /* Image type */ eGobiMBNType mImageType; /* Unique image ID */ BYTE mImageID[MBN_UNIQUE_ID_LEN]; /* Version ID */ ULONG mVersionID; /* Version string */ std::string mVersion; }; /*=========================================================================*/ // Public Methods /*=========================================================================*/ GobiType GetDeviceType(unsigned int vid, unsigned int pid); /*=========================================================================== METHOD: GetImageStore (Public Method) DESCRIPTION: Return the image store folder, i.e., the folder containing one or more carrier-specific image subfolders RETURN VALUE: std::string - Image Store ===========================================================================*/ std::string GetImageStore(unsigned int vid, unsigned int pid); /*=========================================================================== METHOD: GetImageInfo (Public Method) DESCRIPTION: Get the image information for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pImageType [ O ] - Image type pImageID [ O ] - Unique image ID pVersionID [ O ] - Version ID versionSize [ I ] - The maximum number of characters including the NULL terminator that can be copied to the version array pVersion [ O ] - NULL-terminated string representing the version RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageInfo( LPCSTR pFilePath, BYTE * pImageType, BYTE * pImageID, ULONG * pVersionID, USHORT versionSize, CHAR * pVersion ); /*=========================================================================== METHOD: GetImagesInfo (Public Method) DESCRIPTION: Return the info for the images located at the given path PARAMETERS: path [ I ] - Fully qualified path RETURN VALUE: std:vector - Vector of image information ===========================================================================*/ std::vector GetImagesInfo( const std::string & path ); /*=========================================================================== METHOD: GetImageBootCompatibility (Public Method) DESCRIPTION: Get the image boot compatibility for the image specified by the given fully qualified path PARAMETERS: pFilePath [ I ] - Fully qualified path to image file pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError GetImageBootCompatibility( LPCSTR pFilePath, ULONG * pMajorVersion, ULONG * pMinorVersion ); /*=========================================================================== METHOD: MapVersionInfo (Public Method) DESCRIPTION: Map the specified version string to image capabilities PARAMETERS: versionID [ I ] - Version ID imageType [ I ] - Image type pVersion [ I ] - Version string for image pTechnology [ O ] - Technology type pCarrier [ O ] - Carrier type pRegion [ O ] - Region type pGPSCapability [ O ] - GPS capability RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError MapVersionInfo( ULONG versionID, BYTE imageType, LPCSTR pVersion, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); /*=========================================================================== METHOD: GetImageByUniqueID (Public Method) DESCRIPTION: Return the fully qualified path to an image specified by unique ID PARAMETERS: pImageID [ I ] - Unique image ID RETURN VALUE: std::string - Fully qualified path to matching image ===========================================================================*/ std::string GetImageByUniqueID( BYTE * pImageID ); libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQDLCore.cpp000077500000000000000000000571311455567757300243550ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQDLCore.cpp DESCRIPTION: QUALCOMM Gobi QDL Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQDLCore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQDLCore.h" #include "QDLBuffers.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default/minimum timeout for QCWWAN QMI requests const ULONG DEFAULT_GOBI_QDL_TIMEOUT = 4000; const ULONG MINIMUM_GOBI_QDL_TIMEOUT = 2000; /*=========================================================================*/ // cGobiQDLCore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQDLCore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQDLCore::cGobiQDLCore() : mQDL( 512, 512 ), mQDLPortNode( "" ), mQDLTimeout( DEFAULT_GOBI_QDL_TIMEOUT ) { // Nothing to do } /*=========================================================================== METHOD: ~cGobiQDLCore (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiQDLCore::~cGobiQDLCore() { // Nothing to do } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQDLCore::Initialize() { // Nothing to do return true; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQDLCore::Cleanup() { // Just in case CloseQDLPort( false ); return true; } /*=========================================================================== METHOD: GetAvailableQDLPorts (Public Method) DESCRIPTION: Return the set of available Gobi QDL ports RETURN VALUE: std::vector ===========================================================================*/ std::vector cGobiQDLCore::GetAvailableQDLPorts() { std::vector devices; std::string path = "/sys/bus/usb/devices/"; char buf[PATH_MAX]; glob_t files; int ret = glob( (path + "*/*/ttyUSB*").c_str(), 0, NULL, &files ); char *s; if (ret != 0) { // Glob failure return devices; } for (int i = 0; i < files.gl_pathc; i++) { // Example "/sys/bus/usb/devices/8-1/8-1:1.1/ttyUSB0" std::string nodePath = files.gl_pathv[i]; int lastSlash = nodePath.find_last_of( "/" ); // This is what we want to return if everything else matches std::string deviceNode = nodePath.substr( lastSlash + 1 ); // Move down one directory to the interface level std::string curPath = nodePath.substr( 0, lastSlash ); // Read bInterfaceNumber int handle = open( (curPath + "/bInterfaceNumber").c_str(), O_RDONLY ); if (handle == -1) { continue; } char buff[4]; memset( buff, 0, 4 ); bool bFound = false; ret = read( handle, buff, 2 ); if (ret == 2) { // Interface 1 or 0 ret = strncmp( buff, "01", 2 ); if (ret == 0) { bFound = true; } ret = strncmp( buff, "00", 2 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } memset(buf, 0, sizeof(buf)); if (readlink((curPath + "/driver").c_str(), buf, sizeof(buf)) < 0) continue; buf[sizeof(buf) - 1] = '\0'; s = strrchr(buf, '/'); s = s ? s + 1 : buf; if (strcmp(s, "qcserial") && strcmp(s, "QCSerial2k") && strcmp(s, "GobiSerial")) continue; // Success! devices.push_back( deviceNode ); } globfree( &files ); return devices; } /*=========================================================================== METHOD: SetQDLTimeout (Public Method) DESCRIPTION: Set the timeout for all subsequent QDL transactions PARAMETERS: to [ I ] - Timeout value (in milliseconds) RETURN VALUE: eGobiError ===========================================================================*/ eGobiError cGobiQDLCore::SetQDLTimeout( ULONG to ) { if (to < MINIMUM_GOBI_QDL_TIMEOUT) { return eGOBI_ERR_INVALID_ARG; } mQDLTimeout = to; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OpenQDLPort (Public Method) DESCRIPTION: This function opens the specified QDL port of the device PARAMETERS: portID [ I ] - ID of QDL port to connect to bBARMode [ I ] - Request boot and recovery mode feature pMajorVersion [ O ] - Major version of the device boot downloader pMinorVersion [ O ] - Minor version of the device boot downloader RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::OpenQDLPort( std::string & portID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ) { if (portID.empty() == true || pMajorVersion == 0 || pMinorVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // First disconnect from current port (if any) CloseQDLPort( false ); // Validate port ID std::string foundDevice; std::vector availPorts = GetAvailableQDLPorts(); for (int index = 0; index < availPorts.size(); index++) { if (availPorts[index] == portID) { foundDevice = availPorts[index]; break; } } if (foundDevice.empty() == true) { return eGOBI_ERR_INVALID_DEVID; } // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) mQDL.Initialize(); // Connect to the port std::string deviceStr = "/dev/" + foundDevice; bool bOK = mQDL.Connect( deviceStr.c_str() ); if (bOK == false) { return eGOBI_ERR_CONNECT; } // Store port ID (we are connected) mQDLPortNode = foundDevice; // Build the hello request bool bBARFeature = bBARMode != 0; sSharedBuffer * pHelloBuf = sQDLHello::BuildHelloReq( bBARFeature ); if (pHelloBuf == 0) { return eGOBI_ERR_MEMORY; } // Send the hello request and wait for the response sProtocolBuffer rsp; rsp = SendQDL( pHelloBuf ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Extract major and minor boot downloader versions ULONG majVer; ULONG minVer; sQDLHello helloRsp( rsp.GetSharedBuffer() ); if (helloRsp.GetBootVersionInfo( majVer, minVer ) == false) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } // NOTE: in the current firmware implimentation, this cannot happen. // No hello response will be received in case of feature mismatch. if (bBARFeature == true) { const sQDLRawHelloRsp * pTmpRsp = helloRsp.GetResponse(); if (pTmpRsp == 0) { return eGOBI_ERR_MALFORMED_RSP; } if ( (pTmpRsp->mFeatures & QDL_FEATURE_BAR_MODE) == 0) { return eGOBI_ERR_QDL_BAR_MODE; } } *pMajorVersion = majVer; *pMinorVersion = minVer; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CloseQDLPort (Public Method) DESCRIPTION: This function closes the currently open QDL port of the device PARAMETERS: bInformDevice [ I ] - Inform device that QDL port is being closed? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::CloseQDLPort( bool bInformDevice ) { // Assume success eGobiError rc = eGOBI_ERR_NONE; if (mQDLPortNode.empty() == true) { rc = eGOBI_ERR_NO_CONNECTION; } else if (bInformDevice == true) { BYTE cmd = (BYTE)eQDL_CMD_SESSION_CLOSE_REQ; eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pReq = 0; pReq = new sSharedBuffer( (const BYTE *)&cmd, 1, pt ); if (pReq == 0) { rc = eGOBI_ERR_MEMORY; } else { sProtocolBuffer rsp = SendQDL( pReq, 0, 0, false ); rc = GetLastError(); } } mQDL.Disconnect(); mQDL.Exit(); mQDLPortNode.clear(); return rc; } /*=========================================================================== METHOD: GetQDLImagesPreference (Public Method) DESCRIPTION: This function gets the current images preference as reported by the device boot downloader PARAMETERS: pImageListSize [I/O] - Upon input the maximum number of elements that the image info list can contain. Upon successful output the actual number of elements in the image info list pImageList [ O ] - The image info list RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { if (pImageListSize == 0 || *pImageListSize == 0 || pImageList == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE cmd = (BYTE)eQDL_CMD_GET_IMAGE_PREF_REQ; eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pReq = 0; pReq = new sSharedBuffer( (const BYTE *)&cmd, 1, pt ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } ULONG maxImages = (ULONG)*pImageListSize; *pImageListSize = 0; sProtocolBuffer rsp = SendQDL( pReq ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } sQDLGetImagePref prefRsp( rsp.GetSharedBuffer() ); if (prefRsp.IsValid() == false) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } std::list imageIDs = prefRsp.GetImageIDs(); ULONG imageCount = (ULONG)imageIDs.size(); if (imageCount > maxImages) { imageCount = maxImages; } sQDLRawImageID * pOutList = (sQDLRawImageID *)pImageList; std::list ::const_iterator pIter = imageIDs.begin(); for (ULONG i = 0; i < imageCount; i++) { *pOutList++ = *pIter++; } *pImageListSize = imageCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PrepareQDLImageWrite (Public Method) DESCRIPTION: This function prepares the device boot downloader for an image write PARAMETERS: imageType [ I ] - Type of image being written imageSize [ I ] - Size of image being written pBlockSize [I/O] - Upon input the maximum size of image block supported by host, upon successful output the maximum size of image block supported by device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ) { eQDLImageType it = (eQDLImageType)imageType; if (::IsValid( it ) == false) { return eGOBI_ERR_INVALID_ARG; } if (pBlockSize == 0 || *pBlockSize == 0 || *pBlockSize > QDL_MAX_CHUNK_SIZE) { return eGOBI_ERR_INVALID_ARG; } sSharedBuffer * pReq = 0; pReq = sQDLOpenUnframed::BuildOpenUnframedReq( it, imageSize, *pBlockSize ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = SendQDL( pReq ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } ULONG tmp; sQDLOpenUnframed openRsp( rsp.GetSharedBuffer() ); const sQDLRawOpenUnframedRsp * pTmp = openRsp.GetResponse(); if (pTmp == 0 || openRsp.GetChunkSize( tmp ) == false) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } if (openRsp.IsSuccess() == false) { switch ((eQDLOpenStatus)pTmp->mStatus) { case eQDL_OPEN_STATUS_SIZE: return eGOBI_ERR_QDL_OPEN_SIZE; case eQDL_OPEN_STATUS_BAD_TYPE: return eGOBI_ERR_QDL_OPEN_TYPE; case eQDL_OPEN_STATUS_PROTECTION: return eGOBI_ERR_QDL_OPEN_PROT; case eQDL_OPEN_STATUS_NOT_NEEDED: return eGOBI_ERR_QDL_OPEN_SKIP; } return eGOBI_ERR_QDL_ERR_GENERAL; } *pBlockSize = tmp; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: WriteQDLImageBlock (Public Method) DESCRIPTION: This function writes the specified image block to the device PARAMETERS: sequenceNumber [ I ] - Sequence number for image write blockSize [ I ] - Size of image block pImageBlock [ I ] - Image block RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::WriteQDLImageBlock( USHORT sequenceNumber, ULONG blockSize, BYTE * pImageBlock ) { if (blockSize > QDL_MAX_CHUNK_SIZE || pImageBlock == 0) { return eGOBI_ERR_INVALID_ARG; } sSharedBuffer * pReq = 0; pReq = sQDLWriteUnframed::BuildWriteUnframedReq( sequenceNumber, blockSize ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = SendQDL( pReq, pImageBlock, blockSize ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } sQDLWriteUnframed writeRsp( rsp.GetSharedBuffer() ); const sQDLRawWriteUnframedRsp * pTmp = writeRsp.GetResponse(); if (pTmp == 0) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } if (writeRsp.IsSuccess() == false) { switch ((eQDLWriteStatus)pTmp->mStatus) { case eQDL_WRITE_STATUS_CRC: return eGOBI_ERR_QDL_CRC; case eQDL_WRITE_STATUS_CONTENT: return eGOBI_ERR_QDL_PARSING; } return eGOBI_ERR_QDL_ERR_GENERAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ValidateQDLImages (Public Method) DESCRIPTION: This function requests the device validate the written images PARAMETERS: pImageType [ O ] - Upon failure this may contain the type of the image that failed validation RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQDLCore::ValidateQDLImages( BYTE * pImageType ) { if (pImageType == 0) { return eGOBI_ERR_INVALID_ARG; } *pImageType = UCHAR_MAX; BYTE cmd = (BYTE)eQDL_CMD_SESSION_DONE_REQ; eProtocolType pt = ePROTOCOL_QDL_TX; sSharedBuffer * pReq = 0; pReq = new sSharedBuffer( (const BYTE *)&cmd, 1, pt ); if (pReq == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = SendQDL( pReq ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } sQDLDone doneRsp( rsp.GetSharedBuffer() ); const sQDLRawDoneRsp * pTmp = doneRsp.GetResponse(); if (pTmp == 0) { sQDLError errRsp( rsp.GetSharedBuffer() ); if (errRsp.IsValid() == true) { eQDLError qdlErr = errRsp.GetErrorCode(); return GetCorrectedQDLError( qdlErr ); } return eGOBI_ERR_MALFORMED_RSP; } if (doneRsp.IsSuccess() == false) { *pImageType = pTmp->mImageType; switch ((eQDLDoneStatus)pTmp->mStatus) { case eQDL_DONE_STATUS_AUTH: return eGOBI_ERR_QDL_AUTH; case eQDL_DONE_STATUS_WRITE: return eGOBI_ERR_QDL_WRITE; } return eGOBI_ERR_QDL_ERR_GENERAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SendQDL (Public Method) DESCRIPTION: Send a QDL request and wait for and return response (if needed) PARAMETERS: pRequest [ I ] - Request to schedule pAuxData [ I ] - Auxiliary data for request auxDataSz [ I ] - Size of auxiliary data bWaitForResponse [ I ] - Wait for a response? RETURN VALUE: sProtocolBuffer - The response (invalid when no response was received) ===========================================================================*/ sProtocolBuffer cGobiQDLCore::SendQDL( sSharedBuffer * pRequest, const BYTE * pAuxData, ULONG auxDataSz, bool bWaitForResponse ) { // Clear last error recorded ClearLastError(); // Returned response sProtocolBuffer rsp; // Validate the arguments if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return rsp; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); // Build the request object sProtocolRequest req( pRequest, 0, mQDLTimeout, 1, 1, &pn ); req.SetAuxiliaryData( pAuxData, auxDataSz ); if (bWaitForResponse == false) { req.SetTXOnly(); } // Are we connected? if ( (mQDLPortNode.empty() == true) || (mQDL.IsConnected() == false) ) { mLastError = eGOBI_ERR_NO_CONNECTION; return rsp; } // Grab the log from the server const cProtocolLog & protocolLog = mQDL.GetLog(); // Schedule the request ULONG reqID = mQDL.AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return rsp; } bool bReq = false; bool bExit = false; DWORD idx; // Process up to the indicated timeout while (bExit == false) { int wc = sigEvt.Wait( mQDLTimeout, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { bReq = true; if (bWaitForResponse == false) { // Success! bExit = true; } } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed mQDL.RemoveRequest( reqID ); } return rsp; } /*=========================================================================== METHOD: GetConnectedPortID (Public Method) DESCRIPTION: Get the device node of the currently connected Gobi device PARAMETERS: devNode [ O ] - Device node (IE: ttyUSB0) RETURN VALUE: bool ===========================================================================*/ bool cGobiQDLCore::GetConnectedPortID( std::string & devNode ) { // Assume failure bool bFound = false; devNode.clear(); // Were we once connected? if (mQDLPortNode.size() > 0) { // Yes, but is our device still present? // NOTE: This does not garantee the device did not leave and come back std::vector devices = GetAvailableQDLPorts(); ULONG deviceCount = (ULONG)devices.size(); for (ULONG a = 0; a < deviceCount; a++) { if (devices[a] == mQDLPortNode) { devNode = devices[a]; bFound = true; break; } } if (bFound == false) { mLastError = eGOBI_ERR_NO_DEVICE; } } else { // We are not connected mLastError = eGOBI_ERR_NO_CONNECTION; } return bFound; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQDLCore.h000077500000000000000000000133131455567757300240140ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQDLCore.h DESCRIPTION: QUALCOMM Gobi QDL Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQDLCore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QDLProtocolServer.h" #include "GobiError.h" #include "GobiMBNMgmt.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cGobiQDLCore /*=========================================================================*/ class cGobiQDLCore { public: // Constructor cGobiQDLCore(); // Destructor virtual ~cGobiQDLCore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // Return the set of available Gobi QDL ports std::vector GetAvailableQDLPorts(); // Set the timeout for QDL transactions eGobiError SetQDLTimeout( ULONG to ); // Open the specified QDL port of the device eGobiError OpenQDLPort( std::string & portID, ULONG bBARMode, ULONG * pMajorVersion, ULONG * pMinorVersion ); // Close the specified QDL port of the device eGobiError CloseQDLPort( bool bInformDevice ); // Get the images preference as from the device boot downloader eGobiError GetQDLImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); // Prepare the device boot downloader for an image write eGobiError PrepareQDLImageWrite( BYTE imageType, ULONG imageSize, ULONG * pBlockSize ); // Write the specified image block to the device eGobiError WriteQDLImageBlock( USHORT sequenceNumber, ULONG chunkSize, BYTE * pImageBlock ); // Request the device validate the written images eGobiError ValidateQDLImages( BYTE * pImageType ); // Send a QDL request and wait for and return response sProtocolBuffer SendQDL( sSharedBuffer * pRequest, const BYTE * pAuxData = 0, ULONG auxDataSz = 0, bool bWAitForResponse = true ); // Get currently connected port ID bool GetConnectedPortID( std::string & portNode ); // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QDL error eGobiError GetCorrectedQDLError( ULONG qdlError ) { ULONG ec = qdlError + (ULONG)eGOBI_ERR_QDL_OFFSET; return (eGobiError)ec; }; protected: /* QDL protocol server */ cQDLProtocolServer mQDL; /* ID of QDL port device node is connected to */ std::string mQDLPortNode; /* Timeout for QDL transactions (in milliseconds) */ ULONG mQDLTimeout; /* Last error recorded */ eGobiError mLastError; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICore.cpp000077500000000000000000000640331455567757300243620ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include "ProtocolNotification.h" #include "CoreUtilities.h" extern "C" { #include #include #include }; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default timeout for Gobi QMI requests const ULONG DEFAULT_GOBI_QMI_TIMEOUT = 2000; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: FindTLV (Free Method) DESCRIPTION: Find the given TLV PARAMETERS: tlvs [ I ] - TLV parsing input vector tlvKey [ I ] - Key of the TLV that is to be found RETURN VALUE: cDataParser::tParsedFields ===========================================================================*/ sDB2NavInput FindTLV( const std::vector & tlvs, const sProtocolEntityKey & tlvKey ) { sDB2NavInput retNI; // We need some TLVs to parse and a valid QMI DB key ULONG tlvCount = (ULONG)tlvs.size(); if (tlvCount == 0 || tlvKey.mKey.size() < 3) { return retNI; } for (ULONG t = 0; t < tlvCount; t++) { const sDB2NavInput & ni = tlvs[t]; if (tlvKey.mKey == ni.mKey) { retNI = ni; break; } } return retNI; } /*=========================================================================== METHOD: ParseTLV (Free Method) DESCRIPTION: Parse the given TLV to fields PARAMETERS: db [ I ] - Database to use qmiBuf [ I ] - Original buffer containing TLV (locks data) tlvs [ I ] - TLV parsing input vector tlvKey [ I ] - Key of the TLV that is to be parsed bFieldStrings [ I ] - Generate field value strings? RETURN VALUE: cDataParser::tParsedFields ===========================================================================*/ cDataParser::tParsedFields ParseTLV( const cCoreDatabase & db, const sProtocolBuffer & qmiBuf, const std::vector & tlvs, const sProtocolEntityKey & tlvKey, bool bFieldStrings ) { cDataParser::tParsedFields retFields; // We need some TLVs to parse and a valid QMI DB key ULONG tlvCount = (ULONG)tlvs.size(); if (tlvCount == 0 || tlvKey.mKey.size() < 3) { return retFields; } for (ULONG t = 0; t < tlvCount; t++) { const sDB2NavInput & ni = tlvs[t]; if (tlvKey.mKey == ni.mKey) { cDataParser dp( db, qmiBuf, tlvKey, ni.mpPayload, ni.mPayloadLen ); dp.Parse( bFieldStrings, false ); retFields = dp.GetFields(); break; } } return retFields; } /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQMICore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQMICore::cGobiQMICore() : mbFailOnMultipleDevices( false ), mDeviceNode( "" ), mDeviceKey( "" ), mLastError( eGOBI_ERR_NONE ), mRequests( 16 ), mLastNetStartID( (WORD)INVALID_QMI_TRANSACTION_ID ), mVid(0xBAADBEEF), mPid(0xCAFEBABE) { // Nothing to do } /*=========================================================================== METHOD: ~cGobiQMICore (Public Method) DESCRIPTION: Destructor RETURN VALUE: BOOL ===========================================================================*/ cGobiQMICore::~cGobiQMICore() { Cleanup(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Initialize() { // Initialize database mDB.Initialize(); // Allocate configured QMI servers bool bOK = true; std::set ::const_iterator pIter = mServerConfig.begin(); while (pIter != mServerConfig.end()) { cQMIProtocolServer * pSvr = 0; pSvr = new cQMIProtocolServer( pIter->first, 8192, 512 ); if (pSvr == 0) { if (pIter->second == true) { bOK = false; break; } } else { mServers[pIter->first] = pSvr; } pIter++; } if (bOK == false) { Cleanup(); } return bOK; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Cleanup() { Disconnect(); // Free allocated QMI servers std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { cQMIProtocolServer * pSvr = pIter->second; if (pSvr != 0) { delete pSvr; } pIter++; } mServers.clear(); return true; } GobiType cGobiQMICore::GetDeviceType() { return ::GetDeviceType(mVid, mPid); } /*=========================================================================== METHOD: GetAvailableDevices (Public Method) DESCRIPTION: Return the set of available Gobi network devices RETURN VALUE: std::vector - Vector of device ID and device key pairs ===========================================================================*/ std::vector cGobiQMICore::GetAvailableDevices() { std::vector devices; std::string path = "/sys/bus/usb/devices/"; char buf[PATH_MAX]; char *s; glob_t files; int ret = glob( (path + "*/*/*/qcqmi*").c_str(), 0, NULL, &files ); if (ret != 0) { // Glob failure return devices; } for (int i = 0; i < files.gl_pathc; i++) { // Example "/sys/bus/usb/devices/8-1/8-1:1.0/GobiQMI/qcqmi0" std::string nodePath = files.gl_pathv[i]; int lastSlash = nodePath.find_last_of( "/" ); // This is what we want to return if everything else matches std::string deviceNode = nodePath.substr( lastSlash + 1 ); // Move down two directories to the interface level std::string curPath = nodePath.substr( 0, lastSlash ); curPath = curPath.substr( 0, curPath.find_last_of( "/" ) ); // Read bInterfaceNumber int handle = open( (curPath + "/bInterfaceNumber").c_str(), O_RDONLY ); if (handle == -1) { continue; } char buff[4]; memset( buff, 0, 4 ); bool bFound = false; ret = read( handle, buff, 2 ); if (ret == 2) { ret = strncmp( buff, "00", 2 ); if (ret == 0) { bFound = true; } ret = strncmp( buff, "05", 2 ); if (ret == 0) { bFound = true; } } close( handle ); if (bFound == false) { continue; } memset(buf, 0, sizeof(buf)); if (readlink((curPath + "/driver").c_str(), buf, sizeof(buf)) < 0) continue; buf[sizeof(buf) - 1] = '\0'; s = strrchr(buf, '/'); s = s ? s + 1 : buf; if (strcmp(s, "gobi")) continue; // Device node success! // Get MEID of device node (via ioctl) to use as key std::string deviceStr = "/dev/" + deviceNode; std::string key = cQMIProtocolServer::GetDeviceMEID( deviceStr ); tDeviceID device; device.first = deviceNode; device.second = key; devices.push_back( device ); } globfree( &files ); return devices; } static unsigned int getvidpid(const char *devname) { char buf[PATH_MAX + 1]; char nbuf[PATH_MAX + 1]; char idproduct[16]; char idvendor[16]; int fd; snprintf(buf, sizeof(buf), "/sys/class/QCQMI/%s/../../..", devname); memset(nbuf, 0, sizeof(nbuf)); if (!realpath(buf, nbuf)) { return 0; } snprintf(buf, sizeof(buf), "%s/idVendor", nbuf); fd = open(buf, O_RDONLY); if (fd < 0) { return 0; } if (read(fd, idvendor, sizeof(idvendor)) <= 0) { return 0; } close(fd); snprintf(buf, sizeof(buf), "%s/idProduct", nbuf); fd = open(buf, O_RDONLY); if (fd < 0) { return 0; } if (read(fd, idproduct, sizeof(idproduct)) <= 0) { return 0; } close(fd); return (strtoul(idvendor, NULL, 16) << 16) | strtoul(idproduct, NULL, 16); } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified (or first detected) Gobi device Both device node and key are case sensitive PARAMETERS: pDeviceNode [ I ] - The device node pDeviceKey [ I ] - The device key (unique, stored on-device) RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Connect( LPCSTR pDeviceNode, LPCSTR pDeviceKey ) { // Assume failure bool bRC = false; // Clear last error recorded ClearLastError(); // If you specify a device key then you have to specify a device ID if (pDeviceNode == 0 && pDeviceKey != 0) { mLastError = eGOBI_ERR_INVALID_ARG; return bRC; } // First we terminate the current connection Disconnect(); // Query system for list of active Gobi devices std::vector devices = GetAvailableDevices(); // Did we find any devices? ULONG deviceCount = (ULONG)devices.size(); if (deviceCount == 0) { mLastError = eGOBI_ERR_NO_DEVICE; return bRC; } std::string deviceKey = ""; if (pDeviceKey != 0) { deviceKey = pDeviceKey; } // Filter that list to include only the specified device? if (pDeviceNode != 0) { std::vector ::iterator current = devices.begin(); while (current != devices.end()) { // Remove if device node doesn't match if (current->first.compare( pDeviceNode ) != 0) { // Erase current element and update ourself to point to next current = devices.erase( current ); } // Remove if invalid key is specified else if (deviceKey.size() != 0 && current->second.compare( deviceKey ) != 0) { current = devices.erase( current ); } // All necessary parameters match else { current++; } } } // Anything left after filtering? deviceCount = (ULONG)devices.size(); if (deviceCount == 0) { mLastError = eGOBI_ERR_NO_DEVICE; return bRC; } // Too many to choose from? if (deviceCount > 1 && mbFailOnMultipleDevices == true) { mLastError = eGOBI_ERR_MULTIPLE_DEVICES; return bRC; } // Store device ID/key strings mDeviceNode = devices[0].first; mDeviceKey = devices[0].second; unsigned int vidpid = getvidpid(mDeviceNode.c_str()); mVid = (vidpid >> 16) & 0xFFFF; mPid = vidpid & 0xFFFF; // Initalize/connect all configured QMI servers std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { cQMIProtocolServer * pSvr = pIter->second; if (pSvr != 0) { // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) pSvr->Initialize(); std::string deviceStr = "/dev/" + mDeviceNode; bRC = pSvr->Connect( deviceStr.c_str() ); if (bRC == false) { tServerConfig tsc( pIter->first, true ); if (mServerConfig.find( tsc ) != mServerConfig.end()) { // Failure on essential server break; } else { // QMI server non-essential (ignore failure) bRC = true; } } } pIter++; } // Any server fail? if (bRC == false) { // Yes, disconnect them all Disconnect(); // ... and set the error code mLastError = eGOBI_ERR_CONNECT; } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Disconnect() { // Clear last error recorded ClearLastError(); // Assume failure bool bRC = false; if (mDeviceNode.size() > 0) { mDeviceNode.clear(); mDeviceKey.clear(); bRC = true; } else { mLastError = eGOBI_ERR_NO_CONNECTION; } // Disconnect/clean-up all configured QMI servers std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { cQMIProtocolServer * pSvr = pIter->second; if (pSvr != 0) { pSvr->Disconnect(); pSvr->Exit(); } pIter++; } mVid = 0xDEADD00D; mPid = 0xDEADD00D; return bRC; } /*=========================================================================== METHOD: GetConnectedDeviceID (Public Method) DESCRIPTION: Get the device node/key of the currently connected Gobi device PARAMETERS: devNode [ O ] - Device node (IE: qcqmi0) devKey [ O ] - Device key (may be empty) RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::GetConnectedDeviceID( std::string & devNode, std::string & devKey ) { // Clear last error recorded ClearLastError(); // Assume failure bool bFound = false; devNode.clear(); devKey.clear(); // Are all required servers connected? bool bAllConnected = true; std::map ::const_iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { tServerConfig tsc( pIter->first, true ); cQMIProtocolServer * pSvr = pIter->second; if (mServerConfig.find( tsc ) != mServerConfig.end() && pSvr != 0) { if (pSvr->IsConnected() == false) { // Failure on essential server bAllConnected = false; break; } } pIter++; } // Were we once connected? if (mDeviceNode.size() > 0 && bAllConnected == true) { // Yes, but is our device still present? // NOTE: This does not guarantee the device did not leave and come back std::vector devices = GetAvailableDevices(); ULONG deviceCount = (ULONG)devices.size(); for (ULONG a = 0; a < deviceCount; a++) { if (devices[a].first == mDeviceNode) { // If there is a device key specified, it must match. if (mDeviceKey.size() > 0) { if (devices[a].second == mDeviceKey) { devNode = devices[a].first; devKey = devices[a].second; bFound = true; break; } } else { devNode = devices[a].first; bFound = true; break; } } } if (bFound == false) { mLastError = eGOBI_ERR_NO_DEVICE; } } else { // We are not connected mLastError = eGOBI_ERR_NO_CONNECTION; } return bFound; } /*=========================================================================== METHOD: Send (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svc [ I ] - QMI service type pRequest [ I ] - Request to schedule to [ I ] - Timeout value (in milliseconds) RETURN VALUE: sProtocolBuffer - The response (invalid when no response was received) ===========================================================================*/ sProtocolBuffer cGobiQMICore::Send( eQMIService svc, sSharedBuffer * pRequest, ULONG to ) { // Clear last error recorded ClearLastError(); // Returned response sProtocolBuffer rsp; // Validate the arguments if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return rsp; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); // Build the request object sProtocolRequest req( pRequest, 0, to, 1, 1, &pn ); if (to == 0) { mLastError = eGOBI_ERR_INTERNAL; return rsp; } // Grab the server cQMIProtocolServer * pSvr = GetServer( svc ); if (pSvr == 0) { mLastError = eGOBI_ERR_INTERNAL; return rsp; } // Are we connected? if (mDeviceNode.size() <= 0 || pSvr->IsConnected() == false) { mLastError = eGOBI_ERR_NO_CONNECTION; return rsp; } // Grab the log from the server const cProtocolLog & protocolLog = pSvr->GetLog(); // Schedule the request ULONG reqID = pSvr->AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return rsp; } // Store for external cancel tServiceRequest sr( svc, reqID ); mRequests.AddElement( sr ); bool bReq = false; bool bExit = false; DWORD idx; // Process up to the indicated timeout while (bExit == false) { int wc = sigEvt.Wait( to, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { // Are we doing WDS business? if (svc == eQMI_SVC_WDS) { // Grab the as-sent request DWORD id = evt.mParam2; sProtocolBuffer tmpReq = protocolLog.GetBuffer( id ); sSharedBuffer * pTmpRequest = tmpReq.GetSharedBuffer(); if (pTmpRequest != 0) { // Check the message ID sQMIServiceBuffer actualReq( pTmpRequest ); ULONG msgID = actualReq.GetMessageID(); if (msgID == (ULONG)eQMI_WDS_START_NET) { // Grab the transaction ID mLastNetStartID = actualReq.GetTransactionID(); } } } bReq = true; } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed pSvr->RemoveRequest( reqID ); } // Check that the device is still there? if ( (mLastError == eGOBI_ERR_REQUEST) || (mLastError == eGOBI_ERR_RESPONSE) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { eGobiError tmp = mLastError; std::string dummy; GetConnectedDeviceID( dummy, dummy ); if (mLastError == eGOBI_ERR_NONE) { mLastError = tmp; } } return rsp; } /*=========================================================================== METHOD: SendAndCheckReturn (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then validate) the response PARAMETERS: svc [ I ] - QMI service type pRequest [ I ] - Request to schedule to [ I ] - Timeout value (in milliseconds) RETURN VALUE: eGobiError - Corrected error code ===========================================================================*/ eGobiError cGobiQMICore::SendAndCheckReturn( eQMIService svc, sSharedBuffer * pRequest, ULONG to ) { sProtocolBuffer rsp = Send( svc, pRequest, to ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Success! return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SendSimple (Public Method) DESCRIPTION: Generate/send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svc [ I ] - QMI service type msgID [ I ] - QMI message ID of the request to generate to [ I ] - Timeout value (in milliseconds) NOTE: The request has to be a single byte in length, i.e. just a command code, in order for success RETURN VALUE: sProtocolBuffer - The response (invalid when no response was received) ===========================================================================*/ sProtocolBuffer cGobiQMICore::SendSimple( eQMIService svc, WORD msgID, ULONG to ) { // Clear last error recorded ClearLastError(); sProtocolBuffer rsp; sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( svc, msgID ); if (pReq == 0) { mLastError = eGOBI_ERR_MEMORY; return rsp; } rsp = Send( svc, pReq, to ); return rsp; } /*=========================================================================== METHOD: CancelSend (Public Method) DESCRIPTION: Cancel the most recent in-progress Send() based operation RETURN VALUE: eGobiError ===========================================================================*/ eGobiError cGobiQMICore::CancelSend() { ULONG reqs = mRequests.GetTotalCount(); if (reqs == 0) { return eGOBI_ERR_NO_CANCELABLE_OP; } tServiceRequest elem( eQMI_SVC_ENUM_BEGIN, INVALID_REQUEST_ID ); bool bElem = mRequests.GetElement( --reqs, elem ); if (bElem == false) { return eGOBI_ERR_INTERNAL; } cQMIProtocolServer * pSvr = GetServer( elem.first ); if (pSvr == 0) { return eGOBI_ERR_INTERNAL; } bool bRemove = pSvr->RemoveRequest( elem.second ); if (bRemove == false) { return eGOBI_ERR_CANCEL_OP; } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICore.h000077500000000000000000001144411455567757300240260ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.h DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "apidefs.h" #include "CoreDatabase.h" #include "ProtocolBuffer.h" #include "QMIProtocolServer.h" #include "DataParser.h" #include "DataPacker.h" #include "DB2Utilities.h" #include "SyncQueue.h" #include "GobiError.h" #include "GobiMBNMgmt.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default timeout for Gobi QMI requests extern const ULONG DEFAULT_GOBI_QMI_TIMEOUT; /*=========================================================================*/ // Prototypes /*=========================================================================*/ // Find the given TLV sDB2NavInput FindTLV( const std::vector & tlvs, const sProtocolEntityKey & tlvKey ); // Parse the given TLV to fields cDataParser::tParsedFields ParseTLV( const cCoreDatabase & db, const sProtocolBuffer & qmiBuf, const std::vector & tlvs, const sProtocolEntityKey & tlvKey, bool bFieldStrings = false ); /*=========================================================================*/ // Class cGobiQMICore /*=========================================================================*/ class cGobiQMICore { public: // Constructor cGobiQMICore(); // Destructor virtual ~cGobiQMICore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // (Inline) Return the QMI database const cCoreDatabase & GetDatabase() { return mDB; }; // (Inline) Return the server as determined by the service type cQMIProtocolServer * GetServer( eQMIService svc ) { cQMIProtocolServer * pSvr = 0; std::map ::const_iterator pIter; pIter = mServers.find( svc ); if (pIter != mServers.end()) { pSvr = pIter->second; } return pSvr; }; // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QMI error (if this happens to indicate // that no error occurred then return the mapped eQMI_ERR_INTERNAL // value) eGobiError GetCorrectedQMIError( ULONG qmiErrorCode ) { ULONG ec = (ULONG)eQMI_ERR_INTERNAL + (ULONG)eGOBI_ERR_QMI_OFFSET; if (qmiErrorCode != (ULONG)eQMI_ERR_NONE) { ec = qmiErrorCode + (ULONG)eGOBI_ERR_QMI_OFFSET; } return (eGobiError)ec; }; // Return the set of available Gobi devices typedef std::pair tDeviceID; virtual std::vector GetAvailableDevices(); // Return the type of the currently connected device GobiType GetDeviceType(); // Connect to the specified (or first detected) Gobi device virtual bool Connect( LPCSTR pDeviceNode = 0, LPCSTR pDeviceKey = 0 ); // Disconnect from the currently connected Gobi device virtual bool Disconnect(); // Get the device ID of the currently connected Gobi device virtual bool GetConnectedDeviceID( std::string & devNode, std::string & devKey ); // Send a request using the specified QMI protocol server and wait // for (and then return) the response sProtocolBuffer Send( eQMIService svc, sSharedBuffer * pRequest, ULONG to = DEFAULT_GOBI_QMI_TIMEOUT ); // Send a request using the specified QMI protocol server and wait // for (and then validate) the response eGobiError SendAndCheckReturn( eQMIService svc, sSharedBuffer * pRequest, ULONG to = DEFAULT_GOBI_QMI_TIMEOUT ); // Generate/send a request using the specified QMI protocol server // and wait for (and then return) the response sProtocolBuffer SendSimple( eQMIService svc, WORD msgID, ULONG to = DEFAULT_GOBI_QMI_TIMEOUT ); // Cancel the most recent in-progress Send() based operation eGobiError CancelSend(); #ifdef WDS_SUPPORT // Return the state of the current packet data session eGobiError GetSessionState( ULONG * pState ); // Return the duration of the current packet data session eGobiError GetSessionDuration( ULONGLONG * pDuration ); // Return the active/total durations of the current packet data session eGobiError GetSessionDurations( ULONGLONG * pActiveDuration, ULONGLONG * pTotalDuration ); // Return the dormancy state of the current packet session eGobiError GetDormancyState( ULONG * pState ); // Return the current autoconnect data session setting eGobiError GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ); // Set the autoconnect data session setting eGobiError SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ); // Write the default profile settings to the device eGobiError SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); // Read the default profile settings from the device eGobiError GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); // Activate a packet data session eGobiError StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ); // Cancel an in-progress packet data session activation eGobiError CancelDataSession(); // Stop the current data session eGobiError StopDataSession( ULONG sessionId ); // Return the current packet data session IP address eGobiError GetIPAddress( ULONG * pIPAddress ); // Return connection rate information for the packet data connection eGobiError GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); // Return the packet data transfer statistics eGobiError GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); // Returns the RX/TX byte counts eGobiError GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); // Set the current mobile IP setting eGobiError SetMobileIP( ULONG mode ); // Get the current mobile IP setting eGobiError GetMobileIP( ULONG * pMode ); // Set the active mobile IP profile index eGobiError SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ); // Get the active mobile IP profile index eGobiError GetActiveMobileIPProfile( BYTE * pIndex ); // Set the specified mobile IP profile settings eGobiError SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); // Get the specified mobile IP profile settings eGobiError GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); // Set the mobile IP parameters eGobiError SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); // Get the mobile IP parameters eGobiError GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); // Get the last mobile IP error eGobiError GetLastMobileIPError( ULONG * pError ); // Set the DNS settings for the device eGobiError SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); // Get the DNS settings for the device eGobiError GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); #endif #ifdef NAS_SUPPORT // Get the AN-AAA authentication status eGobiError GetANAAAAuthenticationStatus( ULONG * pStatus ); // Get the current available signal strengths (in dBm) eGobiError GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); // Get the current RF information eGobiError GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ); // Perform a scan for available networks eGobiError PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ); // Perform a scan for available networks (includes RAT) eGobiError PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); // Initiate a network registration eGobiError InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ); // Initiate a domain attach (or detach) eGobiError InitiateDomainAttach( ULONG action ); // Get information regarding the system that currently provides service eGobiError GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); // Get data capabilities of serving network system eGobiError GetServingNetworkCapabilities( BYTE * pDataCapssSize, BYTE * pDataCaps ); // Retrieves the current data bearer technology eGobiError GetDataBearerTechnology( ULONG * pDataBearer ); // Retrieve information about the home network of the device eGobiError GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); // Sets the network registration preference eGobiError SetNetworkPreference( ULONG technologyPref, ULONG duration ); // Return the network registration preference eGobiError GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); // Set the current CDMA network parameters eGobiError SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); // Return the current CDMA network parameters eGobiError GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); // Return the Access Overload Class (ACCOLC) of the device eGobiError GetACCOLC( BYTE * pACCOLC ); // Set the Access Overload Class (ACCOLC) of the device eGobiError SetACCOLC( CHAR * pSPC, BYTE accolc ); // Return the PLMN mode from the CSP eGobiError GetPLMNMode( ULONG * pMode ); // Return PLMN name information for the given MCC/MNC eGobiError GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ); #endif #ifdef DMS_SUPPORT // Get device capabilities eGobiError GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); // Return the device manufacturer name eGobiError GetManufacturer( BYTE stringSize, CHAR * pString ); // Return the device model ID eGobiError GetModelID( BYTE stringSize, CHAR * pString ); // Return the device firmware revision eGobiError GetFirmwareRevision( BYTE stringSize, CHAR * pString ); // Return the device firmware revisions eGobiError GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); // Return the voice number in use by the device eGobiError GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); // Return the device IMSI eGobiError GetIMSI( BYTE stringSize, CHAR * pString ); // Return all serial numbers assigned to the device eGobiError GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); // Set the user lock state maintained by the device eGobiError SetLock( ULONG state, CHAR * pCurrentPIN ); // Set the user lock state maintained by the device eGobiError QueryLock( ULONG * pState ); // Set the user lock code maintained by the device eGobiError ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ); // Return the device hardware revision eGobiError GetHardwareRevision( BYTE stringSize, CHAR * pString ); // Return the version of the active Preferred Roaming List (PRL) eGobiError GetPRLVersion( WORD * pPRLVersion ); // Return the ERI file that is stored in EFS on the device eGobiError GetERIFile( ULONG * pFileSize, BYTE * pFile ); // Request the device to perform automatic service activation eGobiError ActivateAutomatic( CHAR * pActivationCode ); // Request the device perform manual service activation eGobiError ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ); // Requests the device reset configuration to factory defaults eGobiError ResetToFactoryDefaults( CHAR * pSPC ); // Return the device activation state eGobiError GetActivationState( ULONG * pActivationState ); // Set the operating mode of the device` eGobiError SetPower( ULONG powerMode ); // Return the operating mode of the device eGobiError GetPower( ULONG * pPowerMode ); // Return operating mode info from the device eGobiError GetPowerInfo( ULONG * pPowerMode, ULONG * pReasonMask, ULONG * pbPlatform ); // Return the reason why the device is currently offline eGobiError GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ); // Return the current time of the device eGobiError GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ); // Validates the service programming code eGobiError ValidateSPC( CHAR * pSPC ); #endif #ifdef UIM_SUPPORT // Enable or disable protection of UIM contents by a given PIN eGobiError UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Verify the PIN before accessing the UIM contents eGobiError UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Unblock a blocked PIN eGobiError UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Change the PIN value eGobiError UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Return the status of the pin eGobiError UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // Return the UIM ICCID eGobiError UIMGetICCID( BYTE stringSize, CHAR * pString ); // Return the blocking status of the specified facility control key eGobiError UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); // Change the specified facility control key eGobiError UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ); // Unblock the specified facility control key eGobiError UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ); #endif #ifdef WMS_SUPPORT // Delete one or more SMS messages from device memory eGobiError DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); // Return the list of SMS messages stored on the device eGobiError GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ); // Return an SMS message from device memory eGobiError GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); // Modify the status of an SMS message eGobiError ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ); // Save an SMS message to device memory eGobiError SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ); // Send an SMS message for immediate over the air transmission eGobiError SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ); // Return the SMS center address eGobiError GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); // Set the SMS center address eGobiError SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ); // Get the current incoming SMS routing information eGobiError GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); // Set the desired incoming SMS routing information eGobiError SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ); #endif #ifdef PDS_SUPPORT // Return the current PDS state eGobiError GetPDSState( ULONG * pEnabled, ULONG * pTracking ); // Set the PDS state eGobiError SetPDSState( ULONG enable ); // Inject a system time into the PDS engine eGobiError PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ); // Return the default tracking session configuration eGobiError GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); // Set the default tracking session configuration eGobiError SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); // Return the XTRA automatic download configuration eGobiError GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ); // Set the XTRA automatic download configuration eGobiError SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ); // Return the XTRA WWAN network preference eGobiError GetXTRANetwork( ULONG * pPreference ); // Set the XTRA WWAN network preference eGobiError SetXTRANetwork( ULONG preference ); // Return the XTRA database validity period eGobiError GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); // Force the XTRA database to be downloaded to the device eGobiError ForceXTRADownload(); // Return the XTRA data positioning state eGobiError GetXTRADataState( ULONG * pState ); // Set the XTRA data positioning state eGobiError SetXTRADataState( ULONG state ); // Return the XTRA time positioning state eGobiError GetXTRATimeState( ULONG * pState ); // Set the XTRA time positioning state eGobiError SetXTRATimeState( ULONG state ); // Return the PDS AGPS configuration eGobiError GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ); // Set the PDS AGPS configuration eGobiError SetAGPSConfig( ULONG serverAddress, ULONG serverPort ); // Return the automatic tracking state for the service eGobiError GetServiceAutomaticTracking( ULONG * pbAuto ); // Set the automatic tracking state for the service eGobiError SetServiceAutomaticTracking( ULONG bAuto ); // Return the automatic tracking config for the NMEA COM port eGobiError GetPortAutomaticTracking( ULONG * pbAuto ); // Set the automatic tracking config for the NMEA COM port eGobiError SetPortAutomaticTracking( ULONG bAuto ); // Reset the specified PDS data eGobiError ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ); #endif #ifdef CAT_SUPPORT // Send the terminal response to the device eGobiError CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ); // Send the envelope command to the device eGobiError CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ); #endif #ifdef RMS_SUPPORT // Query the state of the SMS wake functionality eGobiError GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ); // Enable/disable the SMS wake functionality eGobiError SetSMSWake( ULONG bEnable, ULONG wakeMask ); #endif #ifdef OMA_SUPPORT // Start an OMA-DM session eGobiError OMADMStartSession( ULONG sessionType ); // Cancel an ongoing OMA-DM session eGobiError OMADMCancelSession(); // Return info related to the current (or previous) OMA-DM session eGobiError OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); // Return information about the pending network initiated alert eGobiError OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ); // Send the specified OMA-DM selection for the current network // initiated session eGobiError OMADMSendSelection( ULONG selection, USHORT sessionID ); // Return the OMA-DM feature settings eGobiError OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ); // Set the OMA-DM device provisioning service update feature setting eGobiError OMADMSetProvisioningFeature( ULONG bProvisioning ); // Set the OMA-DM PRL service update feature setting eGobiError OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ); #endif #ifdef VOICE_SUPPORT // Initiates a USSD operation eGobiError OriginateUSSD( BYTE * pInfo ); // Respond to a USSD request from the network eGobiError AnswerUSSD( BYTE * pInfo ); // Cancels an in-progress USSD operation eGobiError CancelUSSD(); #endif #ifdef IMG_SUPPORT // Get the current image preference list eGobiError GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ); // Set the current image preference list eGobiError SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ); // Return the boot and recovery image download mode eGobiError GetBARMode( ULONG * pBARMode ); // Request the device enter boot and recovery image download mode eGobiError SetBARMode(); // Get the list of images stored on the device eGobiError GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ); // Return info about the specified image from the device eGobiError GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ); // Delete the specified image from the device eGobiError DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ); #endif #ifdef IMG2K_SUPPORT eGobiError GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); // Upgrade firmware eGobiError UpgradeFirmware( CHAR * pDestinationPath ); // Return image information eGobiError GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ); // Return the image store folder eGobiError GetImageStore( WORD pathSize, CHAR * pImageStorePath ); #endif protected: /* Database used for packing/parsing QMI protocol entities */ cCoreDatabase mDB; /* Service type/service is required for object operation */ typedef std::pair tServerConfig; /* Servers object is configured to support */ std::set mServerConfig; /* QMI protocol servers */ std::map mServers; /* Fail connect attempts when multiple devices are present? */ bool mbFailOnMultipleDevices; /* Device node that this object is currently connected to */ std::string mDeviceNode; /* Device key string of connected device (may be empty) */ std::string mDeviceKey; unsigned int mVid; unsigned int mPid; /* Last error recorded */ eGobiError mLastError; /* Outstanding requests */ typedef std::pair tServiceRequest; cSyncQueue mRequests; /* Last recorded QMI_WDS_START_NET transaction ID */ WORD mLastNetStartID; }; libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreCAT.cpp000077500000000000000000000172131455567757300247100ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreCAT.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (CAT Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sCATTerminalResponseHdr // Struct to represent a CAT terminal response header /*=========================================================================*/ struct sCATTerminalResponseHdr { public: ULONG mReferenceID; USHORT mLength; // Terminal response data of 'mLength' follows }; /*=========================================================================*/ // Struct sCATEnvelopeCommandHdr // Struct to represent a CAT envelope command header /*=========================================================================*/ struct sCATEnvelopeCommandHdr { public: USHORT mCommandID; USHORT mLength; // Envelope command data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: CATSendTerminalResponse (Public Method) DESCRIPTION: This function sends the terminal response to the device PARAMETERS: refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CATSendTerminalResponse( ULONG refID, ULONG dataLen, BYTE * pData ) { const ULONG szTransHdr = (ULONG)sizeof( sQMIServiceRawTransactionHeader ); const ULONG szMsgHdr = (ULONG)sizeof( sQMIRawMessageHeader ); const ULONG szTLVHdr = (ULONG)sizeof( sQMIRawContentHeader ); const ULONG szCATHdr = (ULONG)sizeof( sCATTerminalResponseHdr ); // Validate arguments if (pData == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE buf[QMI_MAX_BUFFER_SIZE]; ULONG totalLen = szTransHdr + szMsgHdr+ szTLVHdr + szCATHdr + dataLen; if (QMI_MAX_BUFFER_SIZE < totalLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&buf[0]; pTLV->mTypeID = 1; pTLV->mLength = (WORD)(szCATHdr + dataLen); sCATTerminalResponseHdr * pCAT = (sCATTerminalResponseHdr *)&buf[szTLVHdr]; pCAT->mReferenceID = refID; pCAT->mLength = (USHORT)dataLen; pCAT++; if (dataLen > 0) { memcpy( (LPVOID)pCAT, (LPCVOID)pData, (SIZE_T)dataLen ); } sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_CAT, (WORD)eQMI_CAT_SEND_TERMINAL, false, false, &buf[0], szTLVHdr + szCATHdr + dataLen ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_CAT, pReq ); } /*=========================================================================== METHOD: CATSendEnvelopeCommand (Public Method) DESCRIPTION: This function sends the envelope command to the device PARAMETERS: cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CATSendEnvelopeCommand( ULONG cmdID, ULONG dataLen, BYTE * pData ) { const ULONG szTransHdr = (ULONG)sizeof( sQMIServiceRawTransactionHeader ); const ULONG szMsgHdr = (ULONG)sizeof( sQMIRawMessageHeader ); const ULONG szTLVHdr = (ULONG)sizeof( sQMIRawContentHeader ); const ULONG szCATHdr = (ULONG)sizeof( sCATEnvelopeCommandHdr ); // Validate arguments if (pData == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE buf[QMI_MAX_BUFFER_SIZE]; ULONG totalLen = szTransHdr + szMsgHdr+ szTLVHdr + szCATHdr + dataLen; if (QMI_MAX_BUFFER_SIZE < totalLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&buf[0]; pTLV->mTypeID = 1; pTLV->mLength = (WORD)(szCATHdr + dataLen); sCATEnvelopeCommandHdr * pCAT = (sCATEnvelopeCommandHdr *)&buf[szTLVHdr]; pCAT->mCommandID = (USHORT)cmdID; pCAT->mLength = (USHORT)dataLen; pCAT++; if (dataLen > 0) { memcpy( (LPVOID)pCAT, (LPCVOID)pData, (SIZE_T)dataLen ); } sSharedBuffer * pReq = 0; pReq = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_CAT, (WORD)eQMI_CAT_SEND_ENVELOPE, false, false, &buf[0], szTLVHdr + szCATHdr + dataLen ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_CAT, pReq ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreDMS.cpp000077500000000000000000001570711455567757300247330ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreDMS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (DMS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetDeviceCapabilities (Public Method) DESCRIPTION: This function gets device capabilities PARAMETERS: pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDeviceCapabilities( ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { // Validate arguments if ( (pMaxTXChannelRate == 0) || (pMaxRXChannelRate == 0) || (pDataServiceCapability == 0) || (pSimCapability == 0) || (pRadioIfacesSize == 0) || (*pRadioIfacesSize == 0) || (pRadioIfaces == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxRadioIfaces = (ULONG)*pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_CAPS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 5) { return eGOBI_ERR_INVALID_RSP; } // Populate the variables *pMaxTXChannelRate = pf[0].mValue.mU32; *pMaxRXChannelRate = pf[1].mValue.mU32; *pDataServiceCapability = pf[2].mValue.mU32; *pSimCapability = pf[3].mValue.mU8; ULONG activeRadioIfaces = (ULONG)pf[4].mValue.mU8; if (pf.size() < 5 + activeRadioIfaces) { return eGOBI_ERR_INVALID_RSP; } if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces++ = pf[5 + r].mValue.mU32; } *pRadioIfacesSize = activeRadioIfaces; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetManufacturer (Public Method) DESCRIPTION: This function returns the device manufacturer name PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetManufacturer( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_MANUFACTURER; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (stringSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pString[strLen] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetModelID (Public Method) DESCRIPTION: This function returns the device model ID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetModelID( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_MODEL_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (stringSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pString[strLen] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetFirmwareRevision (Public Method) DESCRIPTION: This function returns the device firmware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetFirmwareRevision( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_REV_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (PRI revision) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpPRI = pf[0].mValueString; ULONG lenPRI = (ULONG)tmpPRI.size(); // Space to perform the copy? if (stringSize < lenPRI + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)tmpPRI.c_str(), lenPRI + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetFirmwareRevisions (Public Method) DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetFirmwareRevisions( BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { // Validate arguments if ( (amssSize == 0 || pAMSSString == 0) || (bootSize == 0 || pBootString == 0) || (priSize == 0 || pPRIString == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pAMSSString = 0; *pBootString = 0; *pPRIString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_REV_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (PRI revision) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpPRI = pf[0].mValueString; ULONG lenPRI = (ULONG)tmpPRI.size(); // Space to perform the copy? if (priSize < lenPRI + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pPRIString, (LPCSTR)tmpPRI.c_str(), lenPRI + 1 ); // Parse the TLV we want (boot code revision) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpBoot = pf[0].mValueString; ULONG lenBoot = (ULONG)tmpBoot.size(); // Space to perform the copy? if (bootSize < lenBoot + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pBootString, (LPCSTR)tmpBoot.c_str(), lenBoot + 1 ); // Parse the TLV we want (AMSS revision) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpAMSS = pf[0].mValueString; ULONG lenAMSS = (ULONG)tmpAMSS.size(); // Space to perform the copy? if (amssSize < lenAMSS + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pAMSSString, (LPCSTR)tmpAMSS.c_str(), lenAMSS + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetVoiceNumber (Public Method) DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetVoiceNumber( BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { // Validate arguments if (voiceNumberSize == 0 || pVoiceNumber == 0 || minSize == 0 || pMIN == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pVoiceNumber = 0; *pMIN = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_NUMBER; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf1[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (voiceNumberSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pVoiceNumber, (LPCSTR)pf1[0].mValueString.c_str(), strLen ); pVoiceNumber[strLen] = 0; // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 1) { strLen = pf2[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (minSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pMIN, (LPCSTR)pf2[0].mValueString.c_str(), strLen ); pMIN[strLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetIMSI (Public Method) DESCRIPTION: This function returns the device IMSI PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetIMSI( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_IMSI; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (IMSI) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpIMSI = pf[0].mValueString; ULONG lenIMSI = (ULONG)tmpIMSI.size(); // Space to perform the copy? if (stringSize < lenIMSI + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)tmpIMSI.c_str(), lenIMSI + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSerialNumbers (Public Method) DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSerialNumbers( BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { // Validate arguments if ( (esnSize == 0) || (pESNString == 0) || (imeiSize == 0) || (pIMEIString == 0) || (meidSize == 0) || (pMEIDString == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pESNString = 0; *pIMEIString = 0; *pMEIDString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_IDS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() >= 1) { LONG strLen = pf1[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (esnSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pESNString, (LPCSTR)pf1[0].mValueString.c_str(), strLen ); pESNString[strLen] = 0; } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 1) { LONG strLen = pf2[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (imeiSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pIMEIString, (LPCSTR)pf2[0].mValueString.c_str(), strLen ); pIMEIString[strLen] = 0; } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey3( eDB2_ET_QMI_DMS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() >= 1) { LONG strLen = pf3[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (meidSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pMEIDString, (LPCSTR)pf3[0].mValueString.c_str(), strLen ); pMEIDString[strLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetLock (Public Method) DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetLock( ULONG state, CHAR * pCurrentPIN ) { // Validate arguments if (pCurrentPIN == 0 || pCurrentPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string thePIN( pCurrentPIN ); if (thePIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = thePIN.find_first_not_of( "0123456789" ); std::string digitPIN = thePIN.substr( 0, nNonDigit ); if (digitPIN.size() != thePIN.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_SET_USER_LOCK_STATE; std::vector piv; // "%u %s" std::ostringstream tmp; tmp << (UINT)state << " " << thePIN; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: QueryLock (Public Method) DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pState [ O ] - Current lock state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::QueryLock( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_USER_LOCK_STATE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the mode *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ChangeLockPIN (Public Method) DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pCurrentPIN [ O ] - Current four digit PIN string pDesiredPIN [ O ] - New four digit PIN string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ChangeLockPIN( CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { // Validate arguments if ( (pCurrentPIN == 0) || (pCurrentPIN[0] == 0) || (pDesiredPIN == 0) || (pDesiredPIN[0] == 0) ) { return eGOBI_ERR_INVALID_ARG; } std::string theCurPIN( pCurrentPIN ); if (theCurPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = theCurPIN.find_first_not_of( "0123456789" ); std::string digitCurPIN = theCurPIN.substr( 0, nNonDigit ); if (digitCurPIN.size() != theCurPIN.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theNewPIN( pDesiredPIN ); if (theNewPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } nNonDigit = theNewPIN.find_first_not_of( "0123456789" ); std::string digitNewPIN = theNewPIN.substr( 0, nNonDigit ); if (digitNewPIN.size() != theNewPIN.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_SET_USER_LOCK_CODE; std::vector piv; // "%s %s" std::ostringstream tmp; tmp << theCurPIN << " " << theNewPIN; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: GetHardwareRevision (Public Method) DESCRIPTION: This function returns the device hardware revision PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetHardwareRevision( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_MSM_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (stringSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pString[strLen] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetPRLVersion (Public Method) DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: pPRLVersion [ O ] - The PRL version number RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPRLVersion( WORD * pPRLVersion ) { // Validate arguments if (pPRLVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_PRL_VERSION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pPRLVersion = pf[0].mValue.mU16; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetERIFile (Public Method) DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetERIFile( ULONG * pFileSize, BYTE * pFile ) { // Validate arguments if (pFileSize == 0 || *pFileSize == 0 || pFile == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure ULONG maxFileSize = *pFileSize; *pFileSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_READ_ERI_FILE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG fileSz = pf[0].mValue.mU16; if (pf.size() < 1 + fileSz) { return eGOBI_ERR_INVALID_RSP; } // Space to copy into? if (fileSz > maxFileSize) { return eGOBI_ERR_BUFFER_SZ; } for (ULONG f = 0; f < fileSz; f++) { pFile[f] = pf[1 + f].mValue.mU8; } *pFileSize = fileSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ActivateAutomatic (Public Method) DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ActivateAutomatic( CHAR * pActivationCode ) { // Validate arguments if ( (pActivationCode == 0) || (pActivationCode[0] == 0) ) { return eGOBI_ERR_INVALID_ARG; } std::string ac( pActivationCode ); if (ac.size() > 12) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_ACTIVATE_AUTOMATIC; std::vector piv; std::ostringstream tmp; tmp << (ULONG)ac.size() << " \"" << ac << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); /// Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest, 300000 ); } /*=========================================================================== METHOD: ActivateManual (Public Method) DESCRIPTION: This function requests the device perform manual service activation, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code sid [ I ] - System identification number pMDN [ I ] - Mobile Directory Number string pMIN [ I ] - Mobile Identification Number string prlSize [ I ] - (Optional) Size of PRL file array pPRL [ I ] - (Optional) The PRL file contents pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ActivateManual( CHAR * pSPC, WORD sid, CHAR * pMDN, CHAR * pMIN, ULONG prlSize, BYTE * pPRL, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if ( (pSPC == 0) || (pSPC[0] == 0) || (pMDN == 0) || (pMDN[0] == 0) || (pMIN == 0) || (pMIN[0] == 0) || (prlSize > QMI_DMS_MAX_PRL_SIZE) ) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theMDN( pMDN ); if (theMDN.size() > 16) { return eGOBI_ERR_INVALID_ARG; } nNonDigit = theMDN.find_first_not_of( "0123456789" ); std::string digitMDN = theMDN.substr( 0, nNonDigit ); if (digitMDN.size() != theMDN.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theMIN( pMIN ); if (theMIN.size() > 16) { return eGOBI_ERR_INVALID_ARG; } nNonDigit = theMIN.find_first_not_of( "0123456789" ); std::string digitMIN = theMIN.substr( 0, nNonDigit ); if (digitMIN.size() != theMIN.size()) { return eGOBI_ERR_INVALID_ARG; } std::string theMNHA; if (pMNHA != 0 && pMNHA[0] != 0) { theMNHA = pMNHA; if (theMNHA.size() > 16) { return eGOBI_ERR_INVALID_ARG; } } std::string theMNAAA; if (pMNAAA != 0 && pMNAAA[0] != 0) { theMNAAA = pMNAAA; if (theMNAAA.size() > 16) { return eGOBI_ERR_INVALID_ARG; } } WORD msgID = (WORD)eQMI_DMS_ACTIVATE_MANUAL; std::vector piv; // "%s %u %d %s %d %s" std::ostringstream tmp; tmp << spc << " " << (UINT)sid << " " << theMDN.size() << " " << theMDN << " " << theMIN.size() << " " << theMIN; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (theMNHA.size() > 0) { sProtocolEntityKey pek1( eDB2_ET_QMI_DMS_REQ, msgID, 17 ); std::ostringstream tmp; tmp << (int)theMNHA.size() << " \"" << theMNHA << "\""; sDB2PackingInput pi1( pek1, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi1 ); } if (theMNAAA.size() > 0) { sProtocolEntityKey pek1( eDB2_ET_QMI_DMS_REQ, msgID, 18 ); std::ostringstream tmp; tmp << (int)theMNAAA.size() << " \"" << theMNAAA << "\""; sDB2PackingInput pi1( pek1, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi1 ); } // Do we need to go through the anguish of the segmented PRL? if (prlSize > 0) { ULONG blockSz = QMI_DMS_MAX_PRL_BLOCK; // Determine number of writes ULONG writes = prlSize / blockSz; if ((prlSize % blockSz) != 0) { writes++; } ULONG offset = 0; ULONG to = DEFAULT_GOBI_QMI_TIMEOUT; // Generate and send requests eGobiError err = eGOBI_ERR_NONE; for (ULONG w = 0; w < writes; w++) { if (w == writes - 1) { to = 300000; if ((prlSize % blockSz) != 0) { blockSz = prlSize % blockSz; } } std::vector pivLocal = piv; // "%u %u %u" std::ostringstream tmp2; tmp2 << (UINT)prlSize << " " << (UINT)blockSz << " " << (UINT)w; for (ULONG p = 0; p < blockSz; p++) { tmp2 << " " << (UINT)pPRL[offset + p]; } sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 19 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); pivLocal.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, pivLocal ); // Send the QMI request, check result, and return err = SendAndCheckReturn( eQMI_SVC_DMS, pRequest, to ); if (err != eGOBI_ERR_NONE) { break; } else { offset += blockSz; } } if (err != eGOBI_ERR_NONE) { return err; } } else { // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return eGobiError rc = SendAndCheckReturn( eQMI_SVC_DMS, pRequest, 300000 ); if (rc != eGOBI_ERR_NONE) { return rc; } } // Ask device to power down eGobiError rc = SetPower( 5 ); if (rc != eGOBI_ERR_NONE) { return eGOBI_ERR_RESET; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ResetToFactoryDefaults (Public Method) DESCRIPTION: This function requests the device reset configuration to factory defaults, after a successful request the device is then asked to reset PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ResetToFactoryDefaults( CHAR * pSPC ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_FACTORY_DEFAULTS; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request and check result eGobiError rc = SendAndCheckReturn( eQMI_SVC_DMS, pRequest, 300000 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Ask device to power down rc = SetPower( 5 ); if (rc != eGOBI_ERR_NONE) { return eGOBI_ERR_RESET; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetActivationState (Public Method) DESCRIPTION: This function returns the device activation state PARAMETERS: pActivationState [ O ] - Service activation state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetActivationState( ULONG * pActivationState ) { // Validate arguments if (pActivationState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_ACTIVATED_STATE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pActivationState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPower (Public Method) DESCRIPTION: This function sets the operating mode of the device PARAMETERS: powerMode [ I ] - Selected operating mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPower( ULONG powerMode ) { WORD msgID = (WORD)eQMI_DMS_SET_OPERATING_MODE; std::vector piv; std::ostringstream tmp; tmp << (UINT)powerMode; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: GetPower (Public Method) DESCRIPTION: This function returns the operating mode of the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPower( ULONG * pPowerMode ) { // Validate arguments if (pPowerMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = ULONG_MAX; ULONG reasonMask = 0; ULONG bPlatform = 0; eGobiError rc = GetPowerInfo( pPowerMode, &reasonMask, &bPlatform ); return rc; } /*=========================================================================== METHOD: GetPowerInfo (Public Method) DESCRIPTION: This function returns operating mode info from the device PARAMETERS: pPowerMode [ O ] - Current operating mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPowerInfo( ULONG * pPowerMode, ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pPowerMode == 0 || pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = ULONG_MAX; *pReasonMask = 0; *pbPlatform = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_OPERTAING_MODE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pPowerMode = pf[0].mValue.mU32; // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); // Convert back to a bitmask ULONG fieldCount = (ULONG)pf.size(); if (fieldCount > 16) { fieldCount = 16; } for (ULONG f = 0; f < fieldCount; f++) { ULONG val = (ULONG)pf[f].mValue.mU8 & 0x00000001; *pReasonMask |= (val << f); } // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pbPlatform = (ULONG)pf[0].mValue.mU8; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetOfflineReason( ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pReasonMask = 0; *pbPlatform = 0; ULONG powerMode = 0; eGobiError rc = GetPowerInfo( &powerMode, pReasonMask, pbPlatform ); return rc; } /*=========================================================================== METHOD: GetNetworkTime (Public Method) DESCRIPTION: This function returns the current time of the device PARAMETERS: pTimeStamp [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetNetworkTime( ULONGLONG * pTimeCount, ULONG * pTimeSource ) { // Validate arguments if (pTimeCount == 0 || pTimeSource == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_TIME; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pTimeCount = pf[0].mValue.mU64; *pTimeSource = pf[1].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ValidateSPC (Public Method) DESCRIPTION: This function validates the service programming code PARAMETERS: pSPC [ I ] - Six digit service programming code RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ValidateSPC( CHAR * pSPC ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_VALIDATE_SPC; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request and check result return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreImg.cpp000077500000000000000000000442151455567757300250170ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreImg.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (Image Management) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetImagesPreference (Public Method) DESCRIPTION: This function gets the current images preference PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetImagesPreference( ULONG * pImageListSize, BYTE * pImageList ) { // Validate arguments if ( (pImageListSize == 0) || (*pImageListSize == 0) || (pImageList == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pImageListSize; *pImageListSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_FIRMWARE_PREF; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 1 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 1 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG needSz = (ULONG)pHdr->mLength; if (needSz == 0) { return eGOBI_ERR_INVALID_RSP; } *pImageListSize = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; memcpy( (LPVOID)pImageList, (LPCVOID)pData, (SIZE_T)needSz ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetImagesPreference (Public Method) DESCRIPTION: This function sets the current images preference PARAMETERS: imageListSize [ I ] - The size in BYTEs of the image list array pImageList [ I ] - The image list array bForceDownload [ I ] - Force device to download images from host? modemIndex [ I ] - Desired storage index for downloaded modem image pImageTypesSize [I/O] - Upon input the maximum number of elements that the download image types array can contain. Upon successful output the actual number of elements in the download image types array pImageTypes [ O ] - The download image types array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetImagesPreference( ULONG imageListSize, BYTE * pImageList, ULONG bForceDownload, BYTE modemIndex, ULONG * pImageTypesSize, BYTE * pImageTypes ) { // Validate arguments if ( (imageListSize == 0) || (pImageList == 0) || (pImageTypesSize == 0) || (*pImageTypesSize == 0) || (pImageTypes == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pImageTypesSize; *pImageTypesSize = 0; WORD msgID = (WORD)eQMI_DMS_SET_FIRMWARE_PREF; std::vector piv; sProtocolEntityKey pek1( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi1( pek1, pImageList, imageListSize ); piv.push_back( pi1 ); BYTE bOverride = 0; if (bForceDownload != 0) { bOverride = 1; sProtocolEntityKey pek2( eDB2_ET_QMI_DMS_REQ, msgID, 16 ); sDB2PackingInput pi2( pek2, &bOverride, 1 ); piv.push_back( pi2 ); } if (modemIndex != UCHAR_MAX) { sProtocolEntityKey pek3( eDB2_ET_QMI_DMS_REQ, msgID, 17 ); sDB2PackingInput pi3( pek3, &modemIndex, 1 ); piv.push_back( pi3 ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 1 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 1 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG dataLen = (ULONG)pHdr->mLength; if (dataLen == 0) { return eGOBI_ERR_INVALID_RSP; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; BYTE typeCount = *pData++; if (typeCount != 0) { if (dataLen != (ULONG)typeCount + 1) { return eGOBI_ERR_INVALID_RSP; } *pImageTypesSize = typeCount; if (typeCount > maxSz) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pImageTypes, (LPCVOID)pData, (SIZE_T)typeCount ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetBARMode (Public Method) DESCRIPTION: This function returns the boot and recovery image download mode PARAMETERS: pBARMode [ O ] - Boot and recovery image download mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetBARMode( ULONG * pBARMode ) { // Validate arguments if (pBARMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_IMG_DLOAD_MODE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pBARMode = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetBARMode (Public Method) DESCRIPTION: This function requests the device enter boot and recovery image download mode after the next reset RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetBARMode() { WORD msgID = (WORD)eQMI_DMS_SET_IMG_DLOAD_MODE; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, "1" ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } /*=========================================================================== METHOD: GetStoredImages (Public Method) DESCRIPTION: This function gets the list of images stored on the device PARAMETERS: pImageListSize [I/O] - Upon input the size in BYTEs of the image list array. Upon success the actual number of BYTEs copied to the image list array pImageList [ O ] - The image info list array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetStoredImages( ULONG * pImageListSize, BYTE * pImageList ) { // Validate arguments if ( (pImageListSize == 0) || (*pImageListSize == 0) || (pImageList == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pImageListSize; // Assume failure *pImageListSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_LIST_FIRMWARE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 1 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 1 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG needSz = (ULONG)pHdr->mLength; *pImageListSize = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; memcpy( (LPVOID)pImageList, (LPCVOID)pData, (SIZE_T)needSz ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetStoredImageInfo (Public Method) DESCRIPTION: This function returns info about the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array pMajorVersion [ O ] - Major version of compatible boot downloader pMinorVersion [ O ] - Minor version of compatible boot downloader pVersionID [ O ] - Image version ID pInfo [ O ] - Image info string pLockID [ O ] - Image OEM lock ID RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetStoredImageInfo( ULONG imageInfoSize, BYTE * pImageInfo, ULONG * pMajorVersion, ULONG * pMinorVersion, ULONG * pVersionID, CHAR * pInfo, ULONG * pLockID ) { // Validate arguments if ( (imageInfoSize == 0) || (pImageInfo == 0) || (pMajorVersion == 0) || (pMinorVersion == 0) || (pVersionID == 0) || (pInfo == 0) || (pLockID == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pMajorVersion = ULONG_MAX; *pMinorVersion = ULONG_MAX; *pVersionID = ULONG_MAX; *pLockID = ULONG_MAX; pInfo[0] = 0; WORD msgID = (WORD)eQMI_DMS_GET_FIRMWARE_INFO; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, pImageInfo, imageInfoSize ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Keep track of the number of TLVs we actually processed ULONG tlvCount = 0; // Parse the TLV we want (by DB key) std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { tlvCount++; *pMajorVersion = (ULONG)pf[0].mValue.mU16; *pMinorVersion = (ULONG)pf[1].mValue.mU16; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { tlvCount++; *pVersionID = pf[0].mValue.mU32; LONG strLen = pf[1].mValueString.size(); if (strLen > 0 && strLen <= 32) { memcpy( pInfo, pf[1].mValueString.c_str(), strLen ); if (strLen < 32) { pInfo[strLen] = 0; } } } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { tlvCount++; *pLockID = pf[0].mValue.mU32; } if (tlvCount == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: DeleteStoredImage (Public Method) DESCRIPTION: This function deletes the specified image from the device PARAMETERS: imageInfoSize [ I ] - The size in BYTEs of the image info array pImageInfo [ I ] - The image info array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::DeleteStoredImage( ULONG imageInfoSize, BYTE * pImageInfo ) { // Validate arguments if (imageInfoSize == 0 || pImageInfo == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_DMS_DELETE_FIRMWARE; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, pImageInfo, imageInfoSize ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreImg2k.cpp000077500000000000000000000376101455567757300252550ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreImg2k.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (Image Management, G2k API) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiMBNMgmt.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetGenericImage (Free Method) DESCRIPTION: Return a compatible AMSS generic image PARAMETERS: uqcnInfo [ I ] - UQCN image needing a compatible AMSS generic image RETURN VALUE: sImageInfo - Generic image information ===========================================================================*/ sImageInfo GetGenericImage( const sImageInfo & uqcnInfo, unsigned int vid, unsigned int pid ) { // Validate arguments sImageInfo amssInfo; // Obtain the technology/carrier of the UQCN ULONG uqcnTech; ULONG uqcnCarrier; ULONG dummy; eGobiError rc = ::MapVersionInfo( uqcnInfo.mVersionID, (BYTE)uqcnInfo.mImageType, uqcnInfo.mVersion.c_str(), &uqcnTech, &uqcnCarrier, &dummy, &dummy ); if (rc != eGOBI_ERR_NONE) { return amssInfo; } // Recursively enumerate all folders of the image store std::vector folders; std::string imageStore = ::GetImageStore(vid, pid); EnumerateFolders( imageStore, folders ); // Did we find any folders? ULONG foldersSz = (ULONG)folders.size(); if (foldersSz == 0) { return amssInfo; } // Go through each folder searching for a compatible generic AMSS image for (ULONG f = 0; f < foldersSz; f++) { // Search all MBN files in the specified folder std::string folderSearch = folders[f]; int folderLen = folderSearch.size(); if (folderSearch[folderLen - 1] != '/') { folderSearch += '/'; } folderSearch += "*.mbn"; glob_t files; int ret = glob( folderSearch.c_str(), 0, NULL, &files ); if (ret != 0) { // Glob error continue; } for (int i = 0; i < files.gl_pathc; i++) { std::string mbnName = files.gl_pathv[i]; BYTE imageType = UCHAR_MAX; BYTE imageID[16] = { 0 }; ULONG versionID = ULONG_MAX; USHORT versionSz = MAX_PATH * 2 + 1; CHAR versionStr[MAX_PATH * 2 + 1] = { 0 }; rc = ::GetImageInfo( mbnName.c_str(), &imageType, &imageID[0], &versionID, versionSz, &versionStr[0] ); if (rc == eGOBI_ERR_NONE) { if ((eGobiMBNType)imageType == eGOBI_MBN_TYPE_MODEM) { ULONG amssTech; ULONG amssCarrier; rc = ::MapVersionInfo( versionID, imageType, (LPCSTR)&versionStr[0], &amssTech, &amssCarrier, &dummy, &dummy ); if (rc == eGOBI_ERR_NONE) { if ( (amssTech == uqcnTech) && (amssCarrier == (ULONG)eGOBI_IMG_CAR_GENERIC) ) { amssInfo.mImageType = (eGobiMBNType)imageType; amssInfo.mVersionID = versionID; amssInfo.mVersion = (LPCSTR)&versionStr[0]; memcpy( (LPVOID)&amssInfo.mImageID[0], (LPCVOID)&imageID[0], MBN_UNIQUE_ID_LEN ); break; } } } } } globfree( &files ); } // Success return amssInfo; } /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetFirmwareInfo (Public Method) DESCRIPTION: Returns image information obtained from the current device firmware PARAMETERS: pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetFirmwareInfo( ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Validate arguments if ( (pFirmwareID == 0) || (pTechnology == 0) || (pCarrier == 0) || (pRegion == 0) || (pGPSCapability == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Do we have a device node? if (mDeviceNode.empty() == true) { return eGOBI_ERR_NO_CONNECTION; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_GET_REV_ID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } std::string uqcnIDString = pf[0].mValueString; LONG strLen = uqcnIDString.size(); if (strLen != 8) { return eGOBI_ERR_INVALID_RSP; } std::string idString1 = uqcnIDString.substr( 0, 2 ); std::string idString2 = uqcnIDString.substr( 2, 2 ); std::string idString3 = uqcnIDString.substr( 4, 2 ); std::string idString4 = uqcnIDString.substr( 6, 2 ); ULONG id1 = 0; ULONG id2 = 0; ULONG id3 = 0; ULONG id4 = 0; bool bID1 = StringToULONG( idString1.c_str(), 16, id1 ); bool bID2 = StringToULONG( idString2.c_str(), 16, id2 ); bool bID3 = StringToULONG( idString3.c_str(), 16, id3 ); bool bID4 = StringToULONG( idString4.c_str(), 16, id4 ); if (bID1 == false || bID2 == false || bID3 == false || bID4 == false) { return eGOBI_ERR_INVALID_RSP; } ULONG uqcnID = (id1 << 24) | (id2 << 16) | (id3 << 8) | id4; // Parse the TLV we want (AMSS revision) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } *pFirmwareID = uqcnID; eGobiError err = ::MapVersionInfo( uqcnID, (BYTE)eGOBI_MBN_TYPE_PRI, pf[0].mValueString.c_str(), pTechnology, pCarrier, pRegion, pGPSCapability ); return err; } /*=========================================================================== METHOD: UpgradeFirmware (Public Method) DESCRIPTION: This function performs the following set of steps: a) Verifies arguments b) Updates firmware ID on device c) Resets the device NOTE: Upon successful completion the above steps will have been completed, however the actual upgrade of the firmware will necessarily then follow. PARAMETERS: pDestinationPath [ I ] - The fully qualified path to the destination folder that the firmware download service will use RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UpgradeFirmware( CHAR * pDestinationPath ) { char *end; ULONG carrier; // Validate arguments if (pDestinationPath == 0 || pDestinationPath[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Do we have a device ID? if (mDeviceNode.empty() == true) { return eGOBI_ERR_NO_CONNECTION; } if (*pDestinationPath == '/') pDestinationPath++; carrier = strtoul(pDestinationPath, &end, 10); if (*end) return eGOBI_ERR_INVALID_ARG; sImageInfo amssInfo; sImageInfo uqcnInfo; std::vector images; WORD msgID = (WORD)eQMI_DMS_SET_FIRMWARE_ID; std::vector piv; std::ostringstream tmp; tmp << (UINT)carrier; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return eGobiError rc = SendAndCheckReturn( eQMI_SVC_DMS, pRequest ); if (rc != eGOBI_ERR_NONE) { return rc; } // Ask device to power down rc = SetPower( 5 ); if (rc != eGOBI_ERR_NONE) { return eGOBI_ERR_RESET; } return rc; } /*=========================================================================== METHOD: GetImageInfo (Public Method) DESCRIPTION: Returns image information obtained from the firmware image located at the provided path PARAMETERS: pPath [ I ] - Location of the firmware image pFirmwareID [ O ] - Firmware ID obtained from the firmware image pTechnology [ O ] - Technology (0xFFFFFFFF if unknown) pCarrier [ O ] - Carrier (0xFFFFFFFF if unknown) pRegion [ O ] - Region (0xFFFFFFFF if unknown) pGPSCapability [ O ] - GPS capability (0xFFFFFFFF if unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetImageInfo( CHAR * pPath, ULONG * pFirmwareID, ULONG * pTechnology, ULONG * pCarrier, ULONG * pRegion, ULONG * pGPSCapability ) { // Validate arguments if ( (pPath == 0) || (pPath[0] == 0) || (pFirmwareID == 0) || (pTechnology == 0) || (pCarrier == 0) || (pRegion == 0) || (pGPSCapability == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Do we have a device ID? if (mDeviceNode.empty() == true) { return eGOBI_ERR_NO_CONNECTION; } // Use that to validate the image store for this device std::string tmpPath( pPath ); int tmpPathlen = tmpPath.size(); if (tmpPath[tmpPathlen - 1] != '/') { tmpPath += '/'; } std::string imageStore = ::GetImageStore(mVid, mPid); if (tmpPath.find( imageStore ) < 0) { return eGOBI_ERR_INVALID_FILE; } std::vector images; images = ::GetImagesInfo( tmpPath ); ULONG imageCount = (ULONG)images.size(); for (ULONG i = 0; i < imageCount; i++) { const sImageInfo & ii = images[i]; if (ii.mImageType == eGOBI_MBN_TYPE_PRI) { *pFirmwareID = ii.mVersionID; return ::MapVersionInfo( ii.mVersionID, (BYTE)ii.mImageType, ii.mVersion.c_str(), pTechnology, pCarrier, pRegion, pGPSCapability ); } } return eGOBI_ERR_INVALID_FILE; } /*=========================================================================== METHOD: GetImageStore (Public Method) DESCRIPTION: Returns the image store folder, i.e. the folder co-located with the QDL Service executable which (by default) contains one or more carrier specific image subfolders PARAMETERS: pathSize [ I ] - Maximum number of characters (including NULL terminator) that can be copied to the image store path array pImageStorePath [ O ] - The path to the image store RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetImageStore( WORD pathSize, CHAR * pImageStorePath ) { // Do we have a device ID? if (mDeviceNode.size() == true) { return eGOBI_ERR_NO_CONNECTION; } std::string imageStore = ::GetImageStore(mVid, mPid); // Copy over image store LONG strLen = imageStore.size(); if (pathSize < (ULONG)strLen + 1) { pImageStorePath[0] = 0; return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pImageStorePath, (LPCVOID)imageStore.c_str(), (SIZE_T)strLen ); pImageStorePath[strLen] = 0; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreNAS.cpp000077500000000000000000001576601455567757300247350ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreNAS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (NAS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum length for a scanned network description const ULONG MAX_SNI_DESCRIPTION_LEN = 255; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sEVDOCustomSCPConfig // Struct to represent CDMA 1xEV-DO custom SCP config /*=========================================================================*/ struct sEVDOCustomSCPConfig { public: BYTE mbActive; ULONG mProtocolMask; ULONG mBroadcastMask; ULONG mApplicationMask; }; /*=========================================================================*/ // Struct sScannedNetworkInfo // Struct to represent scanned network information /*=========================================================================*/ struct sScannedNetworkInfo { public: USHORT mMCC; USHORT mMNC; ULONG mInUse; ULONG mRoaming; ULONG mForbidden; ULONG mPreferred; CHAR mDescription[MAX_SNI_DESCRIPTION_LEN]; }; /*=========================================================================*/ // Struct sScannedNetworkRATInfo // Struct to represent scanned network RAT information /*=========================================================================*/ struct sScannedNetworkRATInfo { public: USHORT mMCC; USHORT mMNC; ULONG mRAT; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetANAAAAuthenticationStatus (Public Method) DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: pStatus [ O ] - AN-AAA authentication status RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetANAAAAuthenticationStatus( ULONG * pStatus ) { // Validate arguments if (pStatus == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_AAA_AUTH_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the index *pStatus = (ULONG)pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSignalStrengths (Public Method) DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSignalStrengths( ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { // Validate arguments if ( (pArraySizes == 0) || (*pArraySizes == 0) || (pSignalStrengths == 0) || (pRadioInterfaces == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSignals = (ULONG)*pArraySizes; // Assume failure *pArraySizes = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_RSSI; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 2) { return eGOBI_ERR_INVALID_RSP; } // Remove any values outside the legal range std::map sigMap; INT8 sigVal = pf[0].mValue.mS8; ULONG radioVal = pf[1].mValue.mU32; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() > 2) { ULONG fi = 0; ULONG auxSigs = (ULONG)pf[fi++].mValue.mU16; if (pf.size() >= 1 + 2 * auxSigs) { for (ULONG s = 0; s < auxSigs; s++, fi += 2) { sigVal = pf[fi].mValue.mS8; radioVal = pf[fi + 1].mValue.mU32; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } } } } ULONG sigCount = 0; std::map ::const_iterator pIter; for (pIter = sigMap.begin(); pIter != sigMap.end(); pIter++, sigCount++) { if (sigCount < maxSignals) { pSignalStrengths[sigCount] = pIter->second; pRadioInterfaces[sigCount] = pIter->first; *pArraySizes = sigCount + 1; } } // No valid signals? if (sigCount == 0) { return eGOBI_ERR_NO_SIGNAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetRFInfo (Public Method) DESCRIPTION: This function gets the current RF information PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetRFInfo( BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pInstanceSize; *pInstanceSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_RF_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); ULONG fieldCount = (ULONG)pf.size(); if (fieldCount < 1) { return eGOBI_ERR_INVALID_RSP; } BYTE ifaceCount = pf[0].mValue.mU8; if (fieldCount < 1 + ((ULONG)ifaceCount * 3)) { return eGOBI_ERR_INVALID_RSP; } if (ifaceCount > maxInstances) { ifaceCount = maxInstances; } ULONG * pOutput = (ULONG *)pInstances; for (BYTE i = 0; i < ifaceCount; i++) { ULONG offset = 3 * (ULONG)i; *pOutput++ = pf[offset + 1].mValue.mU32; *pOutput++ = pf[offset + 2].mValue.mU32; *pOutput++ = (ULONG)pf[offset + 3].mValue.mU16; } *pInstanceSize = ifaceCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PerformNetworkScan (Public Method) DESCRIPTION: This function performs a scan for available networks PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::PerformNetworkScan( BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if ( (pInstanceSize == 0) || (*pInstanceSize == 0) || (pInstances == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; // Assume failure *pInstanceSize = 0; // This can take a really long time ULONG to = MAX_REQ_TIMEOUT; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_SCAN_NETS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID, to ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); ULONG maxIdx = (ULONG)pf.size(); if (maxIdx-- < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG idx = 0; BYTE netCount = pf[idx++].mValue.mU8; if (netCount > maxInstances) { netCount = maxInstances; } sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Validate field count if (idx + 6 > maxIdx) { return eGOBI_ERR_INVALID_RSP; } pNet->mMCC = pf[idx++].mValue.mU16; pNet->mMNC = pf[idx++].mValue.mU16; pNet->mInUse = pf[idx++].mValue.mU32; pNet->mRoaming = pf[idx++].mValue.mU32; pNet->mForbidden = pf[idx++].mValue.mU32; pNet->mPreferred = pf[idx++].mValue.mU32; memset( &pNet->mDescription[0], 0, (SIZE_T)MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pf[idx++].mValue.mU8; if (descLen > 0) { std::string netDesc( pf[idx++].mValueString ); ULONG actualLen = netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } memcpy( (LPVOID)&pNet->mDescription[0], (LPCSTR)netDesc.c_str(), (SIZE_T)actualLen ); } pNet++; } *pInstanceSize = netCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PerformNetworkRATScan (Public Method) DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::PerformNetworkRATScan( BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { // Validate arguments if ( (pInstanceSize == 0) || (*pInstanceSize == 0) || (pInstances == 0) || (pRATSize == 0) || (*pRATSize == 0) || (pRATInstances == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; BYTE maxRATInstances = *pRATSize; // Assume failure *pInstanceSize = 0; *pRATSize = 0; // This can take a really long time ULONG to = MAX_REQ_TIMEOUT; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_SCAN_NETS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID, to ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); ULONG maxIdx = (ULONG)pf.size(); if (maxIdx-- < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG idx = 0; BYTE netCount = pf[idx++].mValue.mU8; if (netCount > maxInstances) { netCount = maxInstances; } sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Validate field count if (idx + 6 > maxIdx) { return eGOBI_ERR_INVALID_RSP; } pNet->mMCC = pf[idx++].mValue.mU16; pNet->mMNC = pf[idx++].mValue.mU16; pNet->mInUse = pf[idx++].mValue.mU32; pNet->mRoaming = pf[idx++].mValue.mU32; pNet->mForbidden = pf[idx++].mValue.mU32; pNet->mPreferred = pf[idx++].mValue.mU32; memset( &pNet->mDescription[0], 0, (SIZE_T)MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pf[idx++].mValue.mU8; if (descLen > 0) { std::string netDesc( pf[idx++].mValueString ); ULONG actualLen = netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } LPCSTR pNetDesc = netDesc.c_str(); memcpy( (LPVOID)&pNet->mDescription[0], (LPCVOID)pNetDesc, (SIZE_T)actualLen ); } pNet++; } // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); maxIdx = (ULONG)pf.size(); if (maxIdx-- < 1) { return eGOBI_ERR_INVALID_RSP; } idx = 0; BYTE ratCount = pf[idx++].mValue.mU8; if (ratCount > maxRATInstances) { ratCount = maxRATInstances; } sScannedNetworkRATInfo * pRAT = (sScannedNetworkRATInfo *)pRATInstances; for (BYTE r = 0; r < ratCount; r++) { // Validate field count if (idx + 2 > maxIdx) { return eGOBI_ERR_INVALID_RSP; } pRAT->mMCC = pf[idx++].mValue.mU16; pRAT->mMNC = pf[idx++].mValue.mU16; pRAT->mRAT = pf[idx++].mValue.mU32; pRAT++; } *pInstanceSize = netCount; *pRATSize = ratCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: InitiateNetworkRegistration (Public Method) DESCRIPTION: This function initiates a network registration PARAMETERS: regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::InitiateNetworkRegistration( ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { WORD msgID = (WORD)eQMI_NAS_REGISTER_NET; std::vector piv; std::ostringstream tmp; tmp << (UINT)regType; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (regType == 2) { // We need to add the manual registration data // "%hu %hu %u" std::ostringstream tmp2; tmp2 << (USHORT)mcc << " " << (USHORT)mnc << " " << (UINT)rat; pek = sProtocolEntityKey( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 30000 ); } /*=========================================================================== METHOD: InitiateDomainAttach (Public Method) DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: action [ I ] - PS attach action (attach or detach) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::InitiateDomainAttach( ULONG action ) { WORD msgID = (WORD)eQMI_NAS_ATTACH_DETACH; std::vector piv; std::ostringstream tmp; tmp << (UINT)action; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 30000 ); } /*=========================================================================== METHOD: GetServingNetwork (Public Method) DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetServingNetwork( ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { // Validate arguments if ( (pRegistrationState == 0) || (pCSDomain == 0) || (pPSDomain == 0) || (pRAN == 0) || (pRadioIfacesSize == 0) || (*pRadioIfacesSize == 0) || (pRadioIfaces == 0) || (pRoaming == 0) || (pMCC == 0) || (pMNC == 0) || (nameSize == 0) || (pName == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRadioIfaces = *pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; *pRoaming = ULONG_MAX; *pMCC = USHRT_MAX; *pMNC = USHRT_MAX; *pName = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_SS_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 5) { return eGOBI_ERR_INVALID_RSP; } // Populate the variables *pRegistrationState = pf1[0].mValue.mU32; *pCSDomain = pf1[1].mValue.mU32; *pPSDomain = pf1[2].mValue.mU32; *pRAN = pf1[3].mValue.mU32; BYTE activeRadioIfaces = pf1[4].mValue.mU8; if (pf1.size() < 5 + (ULONG)activeRadioIfaces) { return eGOBI_ERR_INVALID_RSP; } if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces++ = pf1[5 + r].mValue.mU32; } *pRadioIfacesSize = activeRadioIfaces; // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 1) { *pRoaming = pf2[0].mValue.mU32; } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey3( eDB2_ET_QMI_NAS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() >= 3) { *pMCC = pf3[0].mValue.mU16; *pMNC = pf3[1].mValue.mU16; // Network name? if (pf3[2].mValue.mU8 > 0 && pf3.size() >= 4) { LONG strLen = pf3[3].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (nameSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pName, (LPCSTR)pf3[3].mValueString.c_str(), strLen ); pName[strLen] = 0; } } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetServingNetworkCapabilities (Public Method) DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetServingNetworkCapabilities( BYTE * pDataCapsSize, BYTE * pDataCaps ) { // Validate arguments if ( (pDataCapsSize == 0) || (*pDataCapsSize == 0) || (pDataCaps == 0) ) { return eGOBI_ERR_INVALID_ARG; } BYTE maxDataCaps = *pDataCapsSize; // Assume failure *pDataCapsSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_SS_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } BYTE activeDataCaps = pf[0].mValue.mU8; if (pf.size() < 1 + (ULONG)activeDataCaps) { return eGOBI_ERR_INVALID_RSP; } if (activeDataCaps > maxDataCaps) { activeDataCaps = maxDataCaps; } ULONG * pOutDataCaps = (ULONG *)pDataCaps; for (ULONG d = 0; d < activeDataCaps; d++) { *pOutDataCaps++ = pf[1 + d].mValue.mU32; } *pDataCapsSize = activeDataCaps; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetDataBearerTechnology (Public Method) DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: pDataCaps [ O ] - The data bearer technology RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDataBearerTechnology( ULONG * pDataBearer ) { // Validate arguments if (pDataBearer == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DATA_BEARER; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pDataBearer = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetHomeNetwork (Public Method) DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetHomeNetwork( WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { // Validate arguments if ( (pMCC == 0) || (pMNC == 0) || (nameSize == 0) || (pName == 0) || (pSID == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pName = 0; *pSID = USHRT_MAX; *pNID = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_HOME_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 3) { return eGOBI_ERR_INVALID_RSP; } // Populate the variables *pMCC = pf1[0].mValue.mU16; *pMNC = pf1[1].mValue.mU16; // Network name? if (pf1[2].mValue.mU8 > 0 && pf1.size() >= 4) { LONG strLen = pf1[3].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (nameSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pName, (LPCSTR)pf1[3].mValueString.c_str(), strLen ); pName[strLen] = 0; } } // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 2) { *pSID = pf2[0].mValue.mU16; *pNID = pf2[1].mValue.mU16; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetNetworkPreference (Public Method) DESCRIPTION: This function sets the network registration preference PARAMETERS: technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetNetworkPreference( ULONG technologyPref, ULONG duration ) { // Buffer to hold technology preference TLV (ID = 1) const ULONG TLV_HDR_SZ = (ULONG)sizeof( sQMIRawContentHeader ); BYTE req[3 + TLV_HDR_SZ]; // Fill out TLV header sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)&req[0]; pTLV->mLength = 3; pTLV->mTypeID = 1; // Copy packed technology preference WORD as-is WORD * pTmp = (WORD *)&req[TLV_HDR_SZ]; *pTmp = (WORD)technologyPref; // Fill out duration req[TLV_HDR_SZ + 2] = (BYTE)duration; // Pack TLV into a QMI NAS request sSharedBuffer * pRequest = 0; pRequest = sQMIServiceBuffer::BuildBuffer( eQMI_SVC_NAS, eQMI_NAS_SET_TECH_PREF, false, false, &req[0], 3 + TLV_HDR_SZ ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest ); } /*=========================================================================== METHOD: GetNetworkPreference (Public Method) DESCRIPTION: This function returns the network registration preference PARAMETERS: pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetNetworkPreference( ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { // Validate arguments if ( (pTechnologyPref == 0) || (pDuration == 0) || (pPersistentTechnologyPref == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_TECH_PREF; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); sDB2NavInput ni1 = FindTLV( tlvs, tlvKey1 ); if (ni1.mPayloadLen < 3) { return eGOBI_ERR_INVALID_RSP; } const BYTE * pData = ni1.mpPayload; const WORD * pTmp = (const WORD *)pData; pData += 2; // Populate the variables *pTechnologyPref = (ULONG)*pTmp; *pDuration = (ULONG)*pData; // Until we know any better the persistent setting is the current setting *pPersistentTechnologyPref = *pTechnologyPref; // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey2( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); sDB2NavInput ni2 = FindTLV( tlvs, tlvKey2 ); if (ni2.mPayloadLen >= 2) { pTmp = (const WORD *)ni2.mpPayload; *pPersistentTechnologyPref = (ULONG)*pTmp; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetCDMANetworkParameters (Public Method) DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetCDMANetworkParameters( CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // If you specify one of the custom SCP config fields then you must // specify them all ULONG scpCount = 0; if (pCustomSCP != 0) { scpCount++; } if (pProtocol != 0) { scpCount++; } if (pBroadcast != 0) { scpCount++; } if (pApplication != 0) { scpCount++; } if (scpCount != 0 && scpCount != 4) { return eGOBI_ERR_INVALID_ARG; } // Rev. 0 and SCP custom config are mutually exclusive if (pForceRev0 != 0 && scpCount == 4) { if (*pForceRev0 != 0 && *pCustomSCP != 0) { return eGOBI_ERR_INVALID_ARG; } } WORD msgID = (WORD)eQMI_NAS_SET_NET_PARAMS; std::vector piv; // Need to start with SPC? if (pForceRev0 != 0 || scpCount == 4) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); } if (pForceRev0 != 0) { // "%u" std::ostringstream tmp; tmp << (UINT)(*pForceRev0 == 0 ? 0 : 1); sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 20 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (scpCount == 4) { // "%u %u %u %u %u %u %u %u %u %u %u %u" std::ostringstream tmp; tmp << (UINT)(*pCustomSCP == 0 ? 0 : 1) << (UINT)(*pProtocol & 0x00000001 ? 1 : 0) << (UINT)(*pProtocol & 0x00000002 ? 1 : 0) << (UINT)(*pProtocol & 0x00000004 ? 1 : 0) << (UINT)(*pProtocol & 0x00000008 ? 1 : 0) << (UINT)(*pProtocol & 0x00000010 ? 1 : 0) << (UINT)(*pProtocol & 0x00000020 ? 1 : 0) << (UINT)(*pProtocol & 0x00000040 ? 1 : 0) << (UINT)(*pProtocol & 0x00000080 ? 1 : 0) << (UINT)(*pBroadcast & 0x00000001 ? 1 : 0) << (UINT)(*pApplication & 0x00000001 ? 1 : 0) << (UINT)(*pApplication & 0x00000002 ? 1 : 0); sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pRoaming != 0) { // "%u" std::ostringstream tmp; tmp << (UINT)*pRoaming; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 22 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // We require something to actually configure if (piv.size() == 0) { // Much ado about nothing return eGOBI_ERR_INVALID_ARG; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 5000 ); } /*=========================================================================== METHOD: GetCDMANetworkParameters (Public Method) DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetCDMANetworkParameters( BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if ( (pSCI == 0) || (pSCM == 0) || (pRegHomeSID == 0) || (pRegForeignSID == 0) || (pRegForeignNID == 0) || (pForceRev0 == 0) || (pCustomSCP == 0) || (pProtocol == 0) || (pBroadcast == 0) || (pApplication == 0) || (pRoaming == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pSCI = UCHAR_MAX; *pSCM = UCHAR_MAX; *pRegHomeSID = UCHAR_MAX; *pRegForeignSID = UCHAR_MAX; *pRegForeignNID = UCHAR_MAX; *pForceRev0 = UCHAR_MAX; *pCustomSCP = UCHAR_MAX; *pProtocol = ULONG_MAX; *pBroadcast = ULONG_MAX; *pApplication = ULONG_MAX; *pRoaming = UCHAR_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_NET_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pSCI = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pSCM = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 19 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 3) { *pRegHomeSID = pf[0].mValue.mU8; *pRegForeignSID = pf[0].mValue.mU8; *pRegForeignNID = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 20 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pForceRev0 = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_NAS_RSP, msgID, 21 ); sDB2NavInput ni = FindTLV( tlvs, tlvKey ); if (ni.mPayloadLen >= (ULONG)sizeof( sEVDOCustomSCPConfig )) { const sEVDOCustomSCPConfig * pData = 0; pData = (const sEVDOCustomSCPConfig *)ni.mpPayload; *pCustomSCP = pData->mbActive; *pProtocol = pData->mProtocolMask; *pBroadcast = pData->mBroadcastMask; *pApplication = pData->mApplicationMask; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_NAS_RSP, msgID, 22 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pRoaming = pf[0].mValue.mU32; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetACCOLC (Public Method) DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: pACCOLC [ O ] - The ACCOLC RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetACCOLC( BYTE * pACCOLC ) { // Validate arguments if (pACCOLC == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_ACCOLC; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the ACCOLC *pACCOLC = pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetACCOLC (Public Method) DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetACCOLC( CHAR * pSPC, BYTE accolc ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_NAS_SET_ACCOLC; std::vector piv; // "%s %u" std::ostringstream tmp; tmp << spc << " " << (UINT)accolc; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_NAS, pRequest, 5000 ); } /*=========================================================================== METHOD: GetPLMNMode (Public Method) DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: pMode [ O ] - PLMN mode RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPLMNMode( ULONG * pMode ) { // Validate arguments if (pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_NAS_GET_PLMN_MODE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_NAS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_NAS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the PLMN mode *pMode = (ULONG)pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetPLMNName (Public Method) DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPLMNName( USHORT mcc, USHORT mnc, ULONG * pNamesSize, BYTE * pNames ) { // Validate arguments if ( (pNamesSize == 0) || (*pNamesSize == 0) || (pNames == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSz = *pNamesSize; *pNamesSize = 0; WORD msgID = (WORD)eQMI_NAS_GET_PLMN_NAME; std::vector piv; // "%hu %hu" std::ostringstream tmp; tmp << mcc << " " << mnc; sProtocolEntityKey pek( eDB2_ET_QMI_NAS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); sProtocolBuffer rsp = Send( eQMI_SVC_NAS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLV ID 16 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 16 ); if (pIter == tlvs.end()) { return eGOBI_ERR_INVALID_RSP; } // Enough space to copy result? const sQMIRawContentHeader * pHdr = pIter->second; ULONG needSz = (ULONG)pHdr->mLength; if (needSz == 0) { return eGOBI_ERR_INVALID_RSP; } *pNamesSize = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } pHdr++; const BYTE * pData = (const BYTE *)pHdr; memcpy( (LPVOID)pNames, (LPCVOID)pData, (SIZE_T)needSz ); return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreOMA.cpp000077500000000000000000000363661455567757300247270ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreOMA.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (OMA-DM Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: OMADMStartSession (Public Method) DESCRIPTION: This function starts an OMA-DM session PARAMETERS: sessionType [ I ] - Type of session to initiate RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMStartSession( ULONG sessionType ) { WORD msgID = (WORD)eQMI_OMA_START_SESSION; std::vector piv; std::ostringstream tmp; tmp << sessionType; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } /*=========================================================================== METHOD: OMADMCancelSession (Public Method) DESCRIPTION: This function cancels an ongoing OMA-DM session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMCancelSession() { // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_CANCEL_SESSION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMGetSessionInfo (Public Method) DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMGetSessionInfo( ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { // Validate arguments if ( (pSessionState == 0) || (pSessionType == 0) || (pFailureReason == 0) || (pRetryCount == 0) || (pSessionPause == 0) || (pTimeRemaining == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pSessionState = ULONG_MAX; *pSessionType = ULONG_MAX; *pFailureReason = ULONG_MAX; *pRetryCount = UCHAR_MAX; *pSessionPause = USHRT_MAX; *pTimeRemaining = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_GET_SESSION_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // How many parameters did we populate? ULONG params = 0; // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pSessionState = pf[0].mValue.mU32; *pSessionType = pf[1].mValue.mU32; params += 2; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pFailureReason = pf[0].mValue.mU32; params++; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 3) { *pRetryCount = pf[0].mValue.mU8; *pSessionPause = pf[1].mValue.mU16; *pTimeRemaining = pf[2].mValue.mU16; params += 3; } if (params == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMGetPendingNIA (Public Method) DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMGetPendingNIA( ULONG * pSessionType, USHORT * pSessionID ) { // Validate arguments if (pSessionType == 0 || pSessionID == 0) { return eGOBI_ERR_INVALID_ARG; } *pSessionType = ULONG_MAX; *pSessionID = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_GET_SESSION_INFO; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // How many parameters did we populate? ULONG params = 0; // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_RSP, msgID, 19 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pSessionType = pf[0].mValue.mU32; *pSessionID = pf[1].mValue.mU16; params += 2; } if (params == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMSendSelection (Public Method) DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMSendSelection( ULONG selection, USHORT sessionID ) { WORD msgID = (WORD)eQMI_OMA_SEND_SELECTION; std::vector piv; std::ostringstream tmp; tmp << selection << " " << sessionID; sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } /*=========================================================================== METHOD: OMADMGetFeatureSettings (Public Method) DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMGetFeatureSettings( ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { // Validate arguments if (pbProvisioning == 0 || pbPRLUpdate == 0) { return eGOBI_ERR_INVALID_ARG; } *pbProvisioning = ULONG_MAX; *pbPRLUpdate = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_OMA_GET_FEATURES; sProtocolBuffer rsp = SendSimple( eQMI_SVC_OMA, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // How many parameters did we populate? ULONG params = 0; // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_OMA_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pbProvisioning = pf[0].mValue.mU32; params++; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_OMA_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pbPRLUpdate = pf[0].mValue.mU32; params++; } if (params == 0) { return eGOBI_ERR_INVALID_RSP; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: OMADMSetProvisioningFeature (Public Method) DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMSetProvisioningFeature( ULONG bProvisioning ) { WORD msgID = (WORD)eQMI_OMA_SET_FEATURES; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bProvisioning != 0); sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } /*=========================================================================== METHOD: OMADMSetPRLUpdateFeature (Public Method) DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OMADMSetPRLUpdateFeature( ULONG bPRLUpdate ) { WORD msgID = (WORD)eQMI_OMA_SET_FEATURES; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bPRLUpdate != 0); sProtocolEntityKey pek( eDB2_ET_QMI_OMA_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_OMA, pRequest ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICorePDS.cpp000077500000000000000000001072461455567757300247350ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICorePDS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (PDS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetPDSState (Public Method) DESCRIPTION: This function returns the current PDS state PARAMETERS: pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPDSState( ULONG * pEnabled, ULONG * pTracking ) { // Validate arguments if (pEnabled == 0 || pTracking == 0) { return eGOBI_ERR_INVALID_ARG; } *pEnabled = ULONG_MAX; *pTracking = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_STATE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 2) { return eGOBI_ERR_INVALID_RSP; } *pEnabled = pf[0].mValue.mU32; *pTracking = pf[1].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPDSState (Public Method) DESCRIPTION: This function sets the PDS state PARAMETERS: enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPDSState( ULONG enable ) { WORD msgID = (WORD)eQMI_PDS_SET_STATE; std::vector piv; LPCSTR pVal = enable != 0 ? "1" : "0"; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, pVal ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest, 5000 ); } /*=========================================================================== METHOD: PDSInjectTimeReference (Public Method) DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::PDSInjectTimeReference( ULONGLONG systemTime, USHORT systemDiscontinuities ) { WORD msgID = (WORD)eQMI_PDS_INJECT_TIME; std::vector piv; std::ostringstream tmp; tmp << systemTime << " " << systemDiscontinuities; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetPDSDefaults (Public Method) DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPDSDefaults( ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { // Validate arguments if (pOperation == 0 || pTimeout == 0 || pInterval == 0 || pAccuracy == 0) { return eGOBI_ERR_INVALID_ARG; } *pOperation = ULONG_MAX; *pTimeout = UCHAR_MAX; *pInterval = ULONG_MAX; *pAccuracy = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_DEFAULTS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 4) { return eGOBI_ERR_INVALID_RSP; } // Original QMI doc claimed milliseconds, turned out to be seconds ULONG apiInterval = pf[2].mValue.mU32 * 1000; *pOperation = pf[0].mValue.mU32; *pTimeout = pf[1].mValue.mU8; *pInterval = apiInterval; *pAccuracy = pf[3].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPDSDefaults (Public Method) DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPDSDefaults( ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { WORD msgID = (WORD)eQMI_PDS_SET_DEFAULTS; std::vector piv; // Original QMI doc claimed milliseconds, turned out to be seconds ULONG qmiInterval = interval / 1000; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)operation << " " << (UINT)timeout << " " << (UINT)qmiInterval << " " << (UINT)accuracy; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRAAutomaticDownload (Public Method) DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRAAutomaticDownload( ULONG * pbEnabled, USHORT * pInterval ) { // Validate arguments if (pbEnabled == 0 || pInterval == 0) { return eGOBI_ERR_INVALID_ARG; } *pbEnabled = ULONG_MAX; *pInterval = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_XTRA_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 2) { return eGOBI_ERR_INVALID_RSP; } *pbEnabled = pf[0].mValue.mU32; *pInterval = pf[1].mValue.mU16; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRAAutomaticDownload (Public Method) DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRAAutomaticDownload( ULONG bEnabled, USHORT interval ) { WORD msgID = (WORD)eQMI_PDS_SET_XTRA_PARAMS; std::vector piv; // "%u %hu" std::ostringstream tmp; tmp << (UINT)bEnabled << " " << (USHORT)interval; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRANetwork (Public Method) DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRANetwork( ULONG * pPreference ) { // Validate arguments if (pPreference == 0) { return eGOBI_ERR_INVALID_ARG; } *pPreference = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_XTRA_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 18 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pPreference = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRANetwork (Public Method) DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: preference [ I ] - XTRA WWAN network preference RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRANetwork( ULONG preference ) { WORD msgID = (WORD)eQMI_PDS_SET_XTRA_PARAMS; std::vector piv; std::ostringstream tmp; tmp << (UINT)preference; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 18 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRAValidity (Public Method) DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRAValidity( USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { // Validate arguments if (pGPSWeek == 0 || pGPSWeekOffset == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } *pGPSWeek = USHRT_MAX; *pGPSWeekOffset = USHRT_MAX; *pDuration = USHRT_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_XTRA_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 19 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pGPSWeek = pf[0].mValue.mU16; *pGPSWeekOffset = pf[1].mValue.mU16; *pDuration = pf[2].mValue.mU16; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ForceXTRADownload (Public Method) DESCRIPTION: This function forces the XTRA database to be downloaded to the device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ForceXTRADownload() { // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_FORCE_XTRA_DL; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetXTRADataState (Public Method) DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: pState [ O ] - XTRA data positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRADataState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } *pState = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_METHODS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 17 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRADataState (Public Method) DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: state [ I ] - XTRA data positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRADataState( ULONG state ) { WORD msgID = (WORD)eQMI_PDS_SET_METHODS; std::vector piv; std::ostringstream tmp; tmp << state; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetXTRATimeState (Public Method) DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: pState [ O ] - XTRA time positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetXTRATimeState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } *pState = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_METHODS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetXTRATimeState (Public Method) DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: state [ I ] - XTRA time positioning state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetXTRATimeState( ULONG state ) { WORD msgID = (WORD)eQMI_PDS_SET_METHODS; std::vector piv; std::ostringstream tmp; tmp << state; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetAGPSConfig (Public Method) DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetAGPSConfig( ULONG * pServerAddress, ULONG * pServerPort ) { // Validate arguments if (pServerAddress == 0 || pServerPort == 0) { return eGOBI_ERR_INVALID_ARG; } *pServerAddress = ULONG_MAX; *pServerPort = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_AGPS_CONFIG; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 5) { return eGOBI_ERR_INVALID_RSP; } ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pServerAddress = (ip4 | ip3 | ip2 | ip1); *pServerPort = pf[4].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetAGPSConfig (Public Method) DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetAGPSConfig( ULONG serverAddress, ULONG serverPort ) { WORD msgID = (WORD)eQMI_PDS_SET_AGPS_CONFIG; std::vector piv; ULONG ip4 = (serverAddress & 0x000000FF); ULONG ip3 = (serverAddress & 0x0000FF00) >> 8; ULONG ip2 = (serverAddress & 0x00FF0000) >> 16; ULONG ip1 = (serverAddress & 0xFF000000) >> 24; // "%u %u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1 << " " << (UINT)serverPort; sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetServiceAutomaticTracking (Public Method) DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetServiceAutomaticTracking( ULONG * pbAuto ) { // Validate arguments if (pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_SVC_AUTOTRACK; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pbAuto = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetServiceAutomaticTracking (Public Method) DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetServiceAutomaticTracking( ULONG bAuto ) { WORD msgID = (WORD)eQMI_PDS_SET_SVC_AUTOTRACK; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bAuto != 0); sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: GetPortAutomaticTracking (Public Method) DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPortAutomaticTracking( ULONG * pbAuto ) { // Validate arguments if (pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_PDS_GET_COM_AUTOTRACK; sProtocolBuffer rsp = SendSimple( eQMI_SVC_PDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_PDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pbAuto = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetPortAutomaticTracking (Public Method) DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pbAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetPortAutomaticTracking( ULONG bAuto ) { WORD msgID = (WORD)eQMI_PDS_SET_COM_AUTOTRACK; std::vector piv; std::ostringstream tmp; tmp << (ULONG)(bAuto != 0); sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } /*=========================================================================== METHOD: ResetPDSData (Public Method) DESCRIPTION: This function resets the specified PDS data PARAMETERS: pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ResetPDSData( ULONG * pGPSDataMask, ULONG * pCellDataMask ) { // Validate arguments (one must be present) if (pGPSDataMask == 0 && pCellDataMask == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_PDS_RESET_DATA; std::vector piv; if (pGPSDataMask != 0) { ULONG mask = *pGPSDataMask; // Note that we are being lazy here by specifying more arguments // than the DB description defines; that will not cause a problem // and we don't want to have to update this code should more bits // be defined std::ostringstream tmp; for (ULONG b = 0; b < 32; b++) { ULONG bit = mask & 0x00000001; mask = mask >> 1; tmp << bit << " "; } sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pCellDataMask != 0) { ULONG mask = *pCellDataMask; std::ostringstream tmp; for (ULONG b = 0; b < 32; b++) { ULONG bit = mask & 0x00000001; mask = mask >> 1; tmp << bit << " "; } sProtocolEntityKey pek( eDB2_ET_QMI_PDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_PDS, pRequest ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreRMS.cpp000077500000000000000000000134701455567757300247430ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreRMS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (RMS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSWake( ULONG * pbEnabled, ULONG * pWakeMask ) { // Validate arguments if (pbEnabled == 0 || pWakeMask == 0) { return eGOBI_ERR_INVALID_ARG; } *pbEnabled = ULONG_MAX; *pWakeMask = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_RMS_GET_SMS_WAKE; sProtocolBuffer rsp = SendSimple( eQMI_SVC_RMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Try to find TLVs ID 16/17 std::map tlvs; tlvs = qmiRsp.GetContents(); std::map ::const_iterator pIter; pIter = tlvs.find( 16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr->mLength < (WORD)1) { return eGOBI_ERR_MALFORMED_RSP; } const BYTE * pData = (const BYTE *)++pHdr; *pbEnabled = (ULONG)*pData; } pIter = tlvs.find( 17 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pHdr = pIter->second; if (pHdr->mLength < (WORD)4) { return eGOBI_ERR_MALFORMED_RSP; } const ULONG * pData = (const ULONG *)++pHdr; *pWakeMask = *pData; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetSMSWake( ULONG bEnable, ULONG wakeMask ) { WORD msgID = (WORD)eQMI_RMS_SET_SMS_WAKE; std::vector piv; BYTE enableTmp = (BYTE)(bEnable == 0 ? 0 : 1 ); sProtocolEntityKey pek1( eDB2_ET_QMI_RMS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, &enableTmp, 1 ); piv.push_back( pi1 ); if (bEnable != 0) { sProtocolEntityKey pek2( eDB2_ET_QMI_RMS_REQ, msgID, 17 ); sDB2PackingInput pi2( pek2, (const BYTE *)&wakeMask, 4 ); piv.push_back( pi2 ); } const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_RMS, pRequest ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreSMS.cpp000077500000000000000000000653341455567757300247520ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreSMS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (SMS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: DeleteSMS (Public Method) DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::DeleteSMS( ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { WORD msgID = (WORD)eQMI_WMS_DELETE; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (pMessageIndex != 0) { std::ostringstream tmp2; tmp2 << (UINT)*pMessageIndex; sProtocolEntityKey pek1( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi1 ); } if (pMessageTag != 0) { std::ostringstream tmp2; tmp2 << (UINT)*pMessageTag; sProtocolEntityKey pek1( eDB2_ET_QMI_WMS_REQ, msgID, 17 ); sDB2PackingInput pi1( pek1, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi1 ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 10000 ); } /*=========================================================================== METHOD: GetSMSList (Public Method) DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSList( ULONG storageType, ULONG * pRequestedTag, ULONG * pMessageListSize, BYTE * pMessageList ) { // Validate arguments if (pMessageListSize == 0 || *pMessageListSize == 0 || pMessageList == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageListSz = *pMessageListSize; // Assume failure *pMessageListSize = 0; WORD msgID = (WORD)eQMI_WMS_GET_MSG_LIST; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (pRequestedTag != 0) { std::ostringstream tmp2; tmp2 << (UINT)*pRequestedTag; sProtocolEntityKey pek1( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi1 ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG messageListSz = pf[0].mValue.mU32; if (messageListSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (pf.size() < (1 + (messageListSz * 2)) ) { return eGOBI_ERR_INVALID_RSP; } if (maxMessageListSz < messageListSz) { messageListSz = maxMessageListSz; } ULONG m = 0; ULONG mf = 1; ULONG * pData = (ULONG *)pMessageList; for (m = 0; m < messageListSz; m++) { *pData++ = pf[mf++].mValue.mU32; *pData++ = pf[mf++].mValue.mU32; } *pMessageListSize = messageListSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSMS (Public Method) DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ I ] - The message contents array RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMS( ULONG storageType, ULONG messageIndex, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { // Validate arguments if ( (pMessageTag == 0) || (pMessageFormat == 0) || (pMessageSize == 0) || (*pMessageSize == 0) || (pMessage == 0) ) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageSz = *pMessageSize; // Assume failure *pMessageSize = 0; WORD msgID = (WORD)eQMI_WMS_RAW_READ; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType << " " << (UINT)messageIndex; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pMessageTag = pf[0].mValue.mU32; *pMessageFormat = pf[1].mValue.mU32; ULONG messageSz = (ULONG)pf[2].mValue.mU16; if (messageSz == 0) { // There has to be message data return eGOBI_ERR_INVALID_RSP; } if (pf.size() < 3 + messageSz) { return eGOBI_ERR_INVALID_RSP; } if (maxMessageSz < messageSz) { // We have to be able to copy the whole message return eGOBI_ERR_BUFFER_SZ; } // Copy message data for (ULONG b = 0; b < messageSz; b++) { pMessage[b] = pf[3 + b].mValue.mU8; } *pMessageSize = messageSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ModifySMSStatus (Public Method) DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::ModifySMSStatus( ULONG storageType, ULONG messageIndex, ULONG messageTag ) { WORD msgID = (WORD)eQMI_WMS_MODIFY_TAG; std::vector piv; std::ostringstream tmp; tmp << (UINT)storageType << " " << (UINT)messageIndex << " " << (UINT)messageTag; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 5000 ); } /*=========================================================================== METHOD: SaveSMS (Public Method) DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SaveSMS( ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageIndex ) { // Validate arguments if (messageSize == 0 || pMessage == 0 || pMessageIndex == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WMS_RAW_WRITE; std::vector piv; // "%u %u %u" std::ostringstream tmp; tmp << (UINT)storageType << " " << (UINT)messageFormat << " " << (UINT)messageSize; for (ULONG b = 0; b < messageSize; b++) { tmp << " " << (UINT)pMessage[b]; } sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 10000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pMessageIndex = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SendSMS (Public Method) DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SendSMS( ULONG messageFormat, ULONG messageSize, BYTE * pMessage, ULONG * pMessageFailureCode ) { // Validate arguments if (messageSize == 0 || pMessage == 0 || pMessageFailureCode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume we have no message failure cause code *pMessageFailureCode = ULONG_MAX; WORD msgID = (WORD)eQMI_WMS_RAW_SEND; std::vector piv; std::ostringstream tmp; tmp << (UINT)messageFormat << " " << (UINT)messageSize; for (ULONG b = 0; b < messageSize; b++) { tmp << " " << (UINT)pMessage[b]; } sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WMS, pRequest, 300000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pMessageFailureCode = (ULONG)pf[0].mValue.mU16; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSMSCAddress (Public Method) DESCRIPTION: Return the SMS center address PARAMETERS: addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ 0 ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ 0 ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSCAddress( BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { // Validate arguments if (addressSize == 0 || pSMSCAddress == 0 || typeSize == 0 || pSMSCType == 0) { return eGOBI_ERR_INVALID_ARG; } pSMSCAddress[0] = 0; pSMSCType[0] = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WMS_GET_SMSC_ADDR; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } LONG strLen = pf[0].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (typeSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pSMSCType, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pSMSCType[strLen] = 0; } strLen = pf[2].mValueString.size(); if (strLen > 0) { // Space to perform the copy? if (addressSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pSMSCAddress, (LPCSTR)pf[2].mValueString.c_str(), strLen ); pSMSCAddress[strLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSMSCAddress (Public Method) DESCRIPTION: Set the SMS center address PARAMETERS: pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string (maximum of 21 characters, including NULL) pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetSMSCAddress( CHAR * pSMSCAddress, CHAR * pSMSCType ) { // Validate arguments if (pSMSCAddress == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WMS_SET_SMSC_ADDR; std::vector piv; std::ostringstream addr; if (pSMSCAddress[0] != 0) { addr << "\"" << pSMSCAddress << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)addr.str().c_str() ); piv.push_back( pi ); if (pSMSCType != 0) { std::ostringstream addrType; if (pSMSCType[0] != 0) { addrType << "\"" << pSMSCType << "\""; } pek = sProtocolEntityKey( eDB2_ET_QMI_WMS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)addrType.str().c_str() ); piv.push_back( pi ); } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 5000 ); } /*=========================================================================== METHOD: GetSMSRoutes (Public Method) DESCRIPTION: Get the current incoming SMS routing information PARAMETERS: pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxRoutes = *pRouteSize; *pRouteSize = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WMS_GET_ROUTES; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WMS, msgID, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } ULONG fi = 0; ULONG routeCount = (ULONG)pf[fi++].mValue.mU16; if ((ULONG)pf.size() < 1 + 4 * routeCount) { return eGOBI_ERR_INVALID_RSP; } if (routeCount > (ULONG)maxRoutes) { routeCount = (ULONG)maxRoutes; } ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { // Message type *pRouteArray++ = pf[fi++].mValue.mU32; // Message class *pRouteArray++ = pf[fi++].mValue.mU32; // Storage type *pRouteArray++ = pf[fi++].mValue.mU32; // Receipt action *pRouteArray++ = pf[fi++].mValue.mU32; } *pRouteSize = (BYTE)routeCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetSMSRoutes (Public Method) DESCRIPTION: Set the desired incoming SMS routing information PARAMETERS: pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetSMSRoutes( BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Format up the request ULONG routeCount = (ULONG)*pRouteSize; // %u std::ostringstream tmp; tmp << routeCount; ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { // Message type, class, storage type, receipt action for (ULONG f = 0; f < 4; f++) { // tmp += " %u" tmp << " " << *pRouteArray++; } } WORD msgID = (WORD)eQMI_WMS_SET_ROUTES; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WMS, pRequest, 5000 ); } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreUIM.cpp000077500000000000000000000715671455567757300247470ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreUIM.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (UIM Access) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: UIMSetPINProtection (Public Method) DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMSetPINProtection( ULONG id, ULONG bEnable, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_SET_PIN_PROT; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); if (bEnable != 0) { bEnable = 1; } // "%u %u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)bEnable << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMVerifyPIN (Public Method) DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMVerifyPIN( ULONG id, CHAR * pValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_PIN_VERIFY; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); // "%u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMUnblockPIN (Public Method) DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMUnblockPIN( ULONG id, CHAR * pPUKValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pPUKValue == 0) || (pPUKValue[0] == 0) || (pNewValue == 0) || (pNewValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_PIN_UNBLOCK; std::vector piv; std::string val1( pPUKValue ); ULONG val1Sz = val1.size(); std::string val2( pNewValue ); ULONG val2Sz = val2.size(); // "%u %u \"%s\" %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)val1Sz << " \"" << val1 << "\" " << (UINT)val2Sz << " \"" << val2 << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMChangePIN (Public Method) DESCRIPTION: This function change the PIN value PARAMETERS: id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMChangePIN( ULONG id, CHAR * pOldValue, CHAR * pNewValue, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pOldValue == 0) || (pOldValue[0] == 0) || (pNewValue == 0) || (pNewValue[0] == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_PIN_CHANGE; std::vector piv; std::string val1( pOldValue ); ULONG val1Sz = val1.size(); std::string val2( pNewValue ); ULONG val2Sz = val2.size(); // "%u %u \"%s\" %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)val1Sz << " \"" << val1 << "\" " << (UINT)val2Sz << " \"" << val2 << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[1].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMGetPINStatus (Public Method) DESCRIPTION: This function returns the status of the pin PARAMETERS: id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMGetPINStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } *pStatus = ULONG_MAX; *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_UIM_GET_PIN_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); ULONG tlvID = 16 + id; // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, tlvID ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pStatus = pf[0].mValue.mU32; *pVerifyRetriesLeft = (ULONG)pf[1].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[2].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMGetICCID (Public Method) DESCRIPTION: This function returns the UIM ICCID PARAMETERS: stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMGetICCID( BYTE stringSize, CHAR * pString ) { // Validate arguments if (stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_DMS_UIM_GET_ICCID; sProtocolBuffer rsp = SendSimple( eQMI_SVC_DMS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (IMSI) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1 || pf[0].mValueString.size() <= 0) { return eGOBI_ERR_INVALID_RSP; } std::string tmpICCID = pf[0].mValueString; ULONG lenICCID = (ULONG)tmpICCID.size(); // Space to perform the copy? if (stringSize < lenICCID + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pString, (LPCSTR)tmpICCID.c_str(), lenICCID + 1 ); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMGetControlKeyBlockingStatus (Public Method) DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: id [ I ] - Facility ID pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMGetControlKeyBlockingStatus( ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { // Validate arguments if ( (pStatus == 0) || (pVerifyRetriesLeft == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pStatus = ULONG_MAX; *pVerifyRetriesLeft = ULONG_MAX; *pUnblockRetriesLeft = ULONG_MAX; if (pbBlocking != 0) { *pbBlocking = 0; } WORD msgID = (WORD)eQMI_DMS_UIM_GET_CK_STATUS; std::vector piv; std::ostringstream tmp; tmp << (UINT)id; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the required TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 3) { return eGOBI_ERR_INVALID_RSP; } *pStatus = pf[0].mValue.mU32; *pVerifyRetriesLeft = (ULONG)pf[1].mValue.mU8; *pUnblockRetriesLeft = (ULONG)pf[2].mValue.mU8; if (pbBlocking != 0) { tlvKey = sProtocolEntityKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() > 0) { *pbBlocking = 1; } } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMSetControlKeyProtection (Public Method) DESCRIPTION: This function changes the specified facility control key PARAMETERS: id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMSetControlKeyProtection( ULONG id, ULONG status, CHAR * pValue, ULONG * pVerifyRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pVerifyRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pVerifyRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_SET_CK_PROT; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); //"%u %u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)status << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pVerifyRetriesLeft = (ULONG)pf[0].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: UIMUnblockControlKey (Public Method) DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::UIMUnblockControlKey( ULONG id, CHAR * pValue, ULONG * pUnblockRetriesLeft ) { // Validate arguments if ( (pValue == 0) || (pValue[0] == 0) || (pUnblockRetriesLeft == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pUnblockRetriesLeft = ULONG_MAX; WORD msgID = (WORD)eQMI_DMS_UIM_UNBLOCK_CK; std::vector piv; std::string val( pValue ); ULONG valSz = val.size(); // "%u %u \"%s\"" std::ostringstream tmp; tmp << (UINT)id << " " << (UINT)valSz << " \"" << val << "\""; sProtocolEntityKey pek( eDB2_ET_QMI_DMS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_DMS, pRequest, 5000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the optional TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_DMS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pUnblockRetriesLeft = (ULONG)pf[0].mValue.mU8; } return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMICoreWDS.cpp000077500000000000000000002370631455567757300247450ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreWDS.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (WDS Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetSessionState (Public Method) DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: pState [ O ] - State of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSessionState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_PKT_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSessionDuration (Public Method) DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: pDuration [ O ] - Duration of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSessionDuration( ULONGLONG * pDuration ) { // Validate arguments if (pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DURATION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pDuration = pf[0].mValue.mU64; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetSessionDurations (Public Method) DESCRIPTION: This function returns the the active/total durations of the current packet data session PARAMETERS: pActiveDuration [ O ] - Active duration of the current packet session pTotalDuration [ O ] - Total duration of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetSessionDurations( ULONGLONG * pActiveDuration, ULONGLONG * pTotalDuration ) { // Validate arguments if (pActiveDuration == 0 || pTotalDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DURATION; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the total duration *pTotalDuration = pf[0].mValue.mU64; // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the active duration *pActiveDuration = pf[0].mValue.mU64; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetDormancyState (Public Method) DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: pState [ O ] - Dormancy state of the current packet session RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDormancyState( ULONG * pState ) { // Validate arguments if (pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DORMANCY; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the state *pState = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetEnhancedAutoconnect (Public Method) DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetEnhancedAutoconnect( ULONG * pSetting, ULONG * pRoamSetting ) { // Validate arguments if (pSetting == 0 || pRoamSetting == 0) { return eGOBI_ERR_INVALID_ARG; } *pSetting = ULONG_MAX; *pRoamSetting = ULONG_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_AUTOCONNECT; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } *pSetting = (ULONG)pf[0].mValue.mU32; // Parse the TLV we want (by DB key) tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() > 0) { *pRoamSetting = (ULONG)pf[0].mValue.mU32; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetEnhancedAutoconnect (Public Method) DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetEnhancedAutoconnect( ULONG setting, ULONG * pRoamSetting ) { WORD msgID = (WORD)eQMI_WDS_SET_AUTOCONNECT; std::vector piv; // "%u" std::ostringstream tmp; tmp << setting; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, tmp.str().c_str() ); piv.push_back( pi ); if (pRoamSetting != 0) { std::ostringstream tmp2; tmp2 << *pRoamSetting; sProtocolEntityKey pek1( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi1( pek1, tmp2.str().c_str() ); piv.push_back( pi1 ); } ULONG to = 5000; if (setting == 1) { // Connections can take a long time to = 300000; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest, to ); } /*=========================================================================== METHOD: SetDefaultProfile (Public Method) DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { WORD msgID = (WORD)eQMI_WDS_MODIFY_PROFILE; std::vector piv; // "%u 1" std::ostringstream tmp; tmp << (UINT)profileType << " 1"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); if (pName != 0) { std::ostringstream tmp2; if (pName[0] != 0) { tmp2 << "\"" << pName << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pPDPType != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)*pPDPType; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pAPNName != 0) { std::ostringstream tmp2; if (pAPNName[0] != 0) { tmp2 << "\"" << pAPNName << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pPrimaryDNS != 0) { ULONG ip4 = (*pPrimaryDNS & 0x000000FF); ULONG ip3 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pSecondaryDNS != 0) { ULONG ip4 = (*pSecondaryDNS & 0x000000FF); ULONG ip3 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pUsername != 0) { std::ostringstream tmp2; if (pUsername[0] != 0) { tmp2 << "\"" << pUsername << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 27 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pPassword != 0) { std::ostringstream tmp2; if (pPassword[0] != 0) { tmp2 << "\"" << pPassword << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 28 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pAuthentication != 0) { ULONG pap = *pAuthentication & 0x00000001; ULONG chap = *pAuthentication & 0x00000002; // "%u %u" std::ostringstream tmp2; tmp2 << (UINT)pap << " " << (UINT)chap; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 29 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } if (pIPAddress != 0) { ULONG ip4 = (*pIPAddress & 0x000000FF); ULONG ip3 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip1 = (*pIPAddress & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 30 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // We need to be doing something here (beyond profile type) if (piv.size() <= 1) { return eGOBI_ERR_INVALID_ARG; } // Pack up and send the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetDefaultProfile (Public Method) DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: profileType [ I ] - Profile type being read pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDefaultProfile( ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { // Validate arguments if ( (pPDPType == 0) || (pIPAddress == 0) || (pPrimaryDNS == 0) || (pSecondaryDNS == 0) || (pAuthentication == 0) || (nameSize == 0) || (pName == 0) || (apnSize == 0) || (pAPNName == 0) || (userSize == 0) || (pUsername == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pPDPType = ULONG_MAX; *pIPAddress = ULONG_MAX; *pPrimaryDNS = ULONG_MAX; *pSecondaryDNS = ULONG_MAX; *pAuthentication = ULONG_MAX; pName[0] = 0; pAPNName[0] = 0; pUsername[0] = 0; WORD msgID = (WORD)eQMI_WDS_GET_DEFAULTS; std::vector piv; // "%u 0" std::ostringstream tmp; tmp << (UINT)profileType << " 0"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (nameSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pName, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pName[strLen] = 0; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pPDPType = pf[0].mValue.mU32; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (apnSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pAPNName, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pAPNName[strLen] = 0; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pPrimaryDNS = (ip4 | ip3 | ip2 | ip1); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 22 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pSecondaryDNS = (ip4 | ip3 | ip2 | ip1); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 27 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { LONG strLen = pf[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (userSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pUsername, (LPCSTR)pf[0].mValueString.c_str(), strLen ); pUsername[strLen] = 0; } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 29 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 2) { ULONG pap = (ULONG)pf[0].mValue.mU8; ULONG chap = (ULONG)pf[1].mValue.mU8 << 1; *pAuthentication = (pap | chap); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 30 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pIPAddress = (ip4 | ip3 | ip2 | ip1); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: StartDataSession (Public Method) DESCRIPTION: This function activates a packet data session PARAMETERS: pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::StartDataSession( ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword, ULONG * pSessionId, ULONG * pFailureReason ) { *pFailureReason = (ULONG)eQMI_CALL_END_REASON_UNSPECIFIED; // Validate arguments if (pSessionId == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_START_NET; std::vector piv; if (pTechnology != 0) { ULONG umts = *pTechnology & 0x00000001; ULONG cdma = *pTechnology & 0x00000002; // "%u %u" std::ostringstream tmp; tmp << (UINT)umts << " " << (UINT)cdma; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 48 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pPrimaryDNS != 0) { ULONG ip4 = (*pPrimaryDNS & 0x000000FF); ULONG ip3 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pSecondaryDNS != 0) { ULONG ip4 = (*pSecondaryDNS & 0x000000FF); ULONG ip3 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pPrimaryNBNS != 0) { ULONG ip4 = (*pPrimaryNBNS & 0x000000FF); ULONG ip3 = (*pPrimaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryNBNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryNBNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pSecondaryNBNS != 0) { ULONG ip4 = (*pSecondaryNBNS & 0x000000FF); ULONG ip3 = (*pSecondaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryNBNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryNBNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pAPNName != 0) { std::ostringstream tmp; if (pAPNName[0] != 0) { tmp << "\"" << pAPNName << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pIPAddress != 0) { ULONG ip4 = (*pIPAddress & 0x000000FF); ULONG ip3 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip1 = (*pIPAddress & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pAuthentication != 0) { ULONG pap = *pAuthentication & 0x00000001; ULONG chap = *pAuthentication & 0x00000002; // "%u %u" std::ostringstream tmp; tmp << (UINT)pap << " " << (UINT)chap; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pUsername != 0) { std::ostringstream tmp; if (pUsername[0] != 0) { tmp << "\"" << pUsername << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 23 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pPassword != 0) { std::ostringstream tmp; if (pPassword[0] != 0) { tmp << "\"" << pPassword << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 24 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } sProtocolBuffer rsp; if (piv.size() > 0) { // Pack up and send the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } else { rsp = Send( eQMI_SVC_WDS, pRequest, 300000 ); } } else { // Generate and send the QMI request rsp = SendSimple( eQMI_SVC_WDS, msgID, 300000 ); } if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pFailureReason = pf[0].mValue.mU32; } return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the session ID *pSessionId = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Cancel an in-progress packet data session activation RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CancelDataSession() { if (mLastNetStartID == (WORD)INVALID_QMI_TRANSACTION_ID) { return eGOBI_ERR_NO_CANCELABLE_OP; } WORD msgID = (WORD)eQMI_WDS_ABORT; std::vector piv; // %hu std::ostringstream tmp; tmp << mLastNetStartID; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return mLastNetStartID = (WORD)INVALID_QMI_TRANSACTION_ID; return SendAndCheckReturn( eQMI_SVC_WDS, pRequest, 60000 ); } /*=========================================================================== METHOD: StopDataSession (Public Method) DESCRIPTION: This function stops the current data session PARAMETERS: sessionId [ I ] - The ID of the session to terminate RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::StopDataSession( ULONG sessionId ) { WORD msgID = (WORD)eQMI_WDS_STOP_NET; std::vector piv; // "%u" std::ostringstream tmp; tmp << (UINT)sessionId; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest, 60000 ); } /*=========================================================================== METHOD: GetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pIPAddress [ I ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetIPAddress( ULONG * pIPAddress ) { // Validate arguments if (pIPAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pIPAddress = ULONG_MAX; WORD msgID = (WORD)eQMI_WDS_GET_SETTINGS; std::vector piv; std::string tmp = "0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLVs we want (IP address) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 30 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 4) { return eGOBI_ERR_INVALID_RSP; } ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pIPAddress = (ip4 | ip3 | ip2 | ip1); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetConnectionRate (Public Method) DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetConnectionRate( ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { // Validate arguments if ( (pCurrentChannelTXRate == 0) || (pCurrentChannelRXRate == 0) || (pMaxChannelTXRate == 0) || (pMaxChannelRXRate == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_RATES; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 4) { return eGOBI_ERR_INVALID_RSP; } // Populate the rates *pCurrentChannelTXRate = pf[0].mValue.mU32; *pCurrentChannelRXRate = pf[1].mValue.mU32; *pMaxChannelTXRate = pf[2].mValue.mU32; *pMaxChannelRXRate = pf[3].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetPacketStatus (Public Method) DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetPacketStatus( ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { // Validate arguments if ( (pTXPacketSuccesses == 0) || (pRXPacketSuccesses == 0) || (pTXPacketErrors == 0) || (pRXPacketErrors == 0) || (pTXPacketOverflows == 0) || (pRXPacketOverflows == 0) ) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_GET_STATISTICS; std::vector piv; std::string tmp = "1 1 1 1 1 1 0 0"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); // Parse the TLVs we want (by DB key) sProtocolEntityKey tlvKey1( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey2( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey3( eDB2_ET_QMI_WDS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey4( eDB2_ET_QMI_WDS_RSP, msgID, 19 ); cDataParser::tParsedFields pf4 = ParseTLV( db, rsp, tlvs, tlvKey4 ); if (pf4.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey5( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); cDataParser::tParsedFields pf5 = ParseTLV( db, rsp, tlvs, tlvKey5 ); if (pf5.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey6( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); cDataParser::tParsedFields pf6 = ParseTLV( db, rsp, tlvs, tlvKey5 ); if (pf6.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the statistics *pTXPacketSuccesses = pf1[0].mValue.mU32; *pRXPacketSuccesses = pf2[0].mValue.mU32; *pTXPacketErrors = pf3[0].mValue.mU32; *pRXPacketErrors = pf4[0].mValue.mU32; *pTXPacketOverflows = pf5[0].mValue.mU32; *pRXPacketOverflows = pf6[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetByteTotals (Public Method) DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetByteTotals( ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { // Validate arguments if (pTXTotalBytes == 0 || pRXTotalBytes == 0) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_GET_STATISTICS; std::vector piv; std::string tmp = "0 0 0 0 0 0 1 1"; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey1( eDB2_ET_QMI_WDS_RSP, msgID, 25 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() < 1) { return eGOBI_ERR_INVALID_RSP; } sProtocolEntityKey tlvKey2( eDB2_ET_QMI_WDS_RSP, msgID, 26 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the statistics *pTXTotalBytes = pf1[0].mValue.mU64; *pRXTotalBytes = pf2[0].mValue.mU64; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetMobileIP (Public Method) DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: mode [ I ] - Desired mobile IP setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetMobileIP( ULONG mode ) { WORD msgID = (WORD)eQMI_WDS_SET_MIP; std::vector piv; // "%u" std::ostringstream tmp; tmp << (UINT)mode; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetMobileIP (Public Method) DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: pMode [ I ] - Desired mobile IP setting RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetMobileIP( ULONG * pMode ) { // Validate arguments if (pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_MIP; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the mode *pMode = pf[0].mValue.mU32; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetActiveMobileIPProfile (Public Method) DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetActiveMobileIPProfile( CHAR * pSPC, BYTE index ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_ACTIVE_MIP; std::vector piv; // "%s %u" std::ostringstream tmp; tmp << spc << " " << (UINT)index; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetActiveMobileIPProfile (Public Method) DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: pIndex [ O ] - Active mobile IP profile index RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetActiveMobileIPProfile( BYTE * pIndex ) { // Validate arguments if (pIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_ACTIVE_MIP; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the index *pIndex = pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetMobileIPProfile (Public Method) DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address pRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetMobileIPProfile( CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_MIP_PROFILE; std::vector piv; // "%s %u" std::ostringstream tmp; tmp << spc << " " << (UINT)index; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); // Enabled flag provided? if (pEnabled != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)(*pEnabled == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Home address provided? if (pAddress != 0) { ULONG ip4 = (*pAddress & 0x000000FF); ULONG ip3 = (*pAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pAddress & 0x00FF0000) >> 16; ULONG ip1 = (*pAddress & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Primary HA address provided? if (pPrimaryHA != 0) { ULONG ip4 = (*pPrimaryHA & 0x000000FF); ULONG ip3 = (*pPrimaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryHA & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryHA & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Secondary HA address provided? if (pSecondaryHA != 0) { ULONG ip4 = (*pSecondaryHA & 0x000000FF); ULONG ip3 = (*pSecondaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryHA & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryHA & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp2; tmp2 << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // Reverse tunneling flag provided? if (pRevTunneling != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)(*pRevTunneling == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // NAI provided? if (pNAI != 0) { std::ostringstream tmp2; if (pNAI[0] != 0) { tmp2 << "\"" << pNAI << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // HA SPI provided? if (pHASPI != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)*pHASPI; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // AAA SPI provided? if (pAAASPI != 0) { // "%u" std::ostringstream tmp2; tmp2 << (UINT)*pAAASPI; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 23 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // MN-HA key provided? if (pMNHA != 0) { std::ostringstream tmp2; if (pMNHA[0] != 0) { tmp2 << "\"" << pMNHA << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 24 ); sDB2PackingInput pi( pek, (LPCSTR)tmp2.str().c_str() ); piv.push_back( pi ); } // MN-AAA key provided? if (pMNAAA != 0) { std::ostringstream tmp2; if (pMNAAA[0] != 0) { tmp2 << "\"" << pMNAAA << "\""; } sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 25 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // We require at least one of the optional arguments if (piv.size() <= 1) { // Much ado about nothing return eGOBI_ERR_INVALID_ARG; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetMobileIPProfile (Public Method) DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: index [ I ] - Mobile IP profile ID pEnabled [ O ] - MIP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetMobileIPProfile( BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { // Validate arguments if ( (pEnabled == 0) || (pAddress == 0) || (pPrimaryHA == 0) || (pSecondaryHA == 0) || (pRevTunneling == 0) || (naiSize == 0) || (pNAI == 0) || (pHASPI == 0) || (pAAASPI == 0) || (pHAState == 0) || (pAAAState == 0) ) { return eGOBI_ERR_INVALID_ARG; } // Assume errors *pEnabled = UCHAR_MAX; *pAddress = ULONG_MAX; *pPrimaryHA = ULONG_MAX; *pSecondaryHA = ULONG_MAX; *pRevTunneling = UCHAR_MAX; *pHASPI = ULONG_MAX; *pAAASPI = ULONG_MAX; *pHAState = ULONG_MAX; *pAAAState = ULONG_MAX; WORD msgID = (WORD)eQMI_WDS_GET_MIP_PROFILE; std::vector piv; // "%u" std::ostringstream arg; arg << (UINT)index; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)arg.str().c_str() ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request sProtocolBuffer rsp = Send( eQMI_SVC_WDS, pRequest ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); sProtocolEntityKey tlvKey1( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf1 = ParseTLV( db, rsp, tlvs, tlvKey1 ); if (pf1.size() >= 1) { *pEnabled = pf1[0].mValue.mU8; } sProtocolEntityKey tlvKey2( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); cDataParser::tParsedFields pf2 = ParseTLV( db, rsp, tlvs, tlvKey2 ); if (pf2.size() >= 4) { ULONG ip4 = (ULONG)pf2[0].mValue.mU8; ULONG ip3 = (ULONG)pf2[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf2[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf2[3].mValue.mU8 << 24; *pAddress = (ip4 | ip3 | ip2 | ip1); } sProtocolEntityKey tlvKey3( eDB2_ET_QMI_WDS_RSP, msgID, 18 ); cDataParser::tParsedFields pf3 = ParseTLV( db, rsp, tlvs, tlvKey3 ); if (pf3.size() >= 4) { ULONG ip4 = (ULONG)pf3[0].mValue.mU8; ULONG ip3 = (ULONG)pf3[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf3[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf3[3].mValue.mU8 << 24; *pPrimaryHA = (ip4 | ip3 | ip2 | ip1); } sProtocolEntityKey tlvKey4( eDB2_ET_QMI_WDS_RSP, msgID, 19 ); cDataParser::tParsedFields pf4 = ParseTLV( db, rsp, tlvs, tlvKey4 ); if (pf4.size() >= 4) { ULONG ip4 = (ULONG)pf4[0].mValue.mU8; ULONG ip3 = (ULONG)pf4[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf4[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf4[3].mValue.mU8 << 24; *pSecondaryHA = (ip4 | ip3 | ip2 | ip1); } sProtocolEntityKey tlvKey5( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); cDataParser::tParsedFields pf5 = ParseTLV( db, rsp, tlvs, tlvKey5 ); if (pf5.size() >= 1) { *pRevTunneling = pf5[0].mValue.mU8; } sProtocolEntityKey tlvKey6( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); cDataParser::tParsedFields pf6 = ParseTLV( db, rsp, tlvs, tlvKey6 ); if (pf6.size() >= 1) { LONG strLen = pf6[0].mValueString.size(); if (strLen <= 0) { return eGOBI_ERR_INVALID_RSP; } // Space to perform the copy? if (naiSize < strLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( (LPVOID)pNAI, (LPCSTR)pf6[0].mValueString.c_str(), strLen ); pNAI[strLen] = 0; } sProtocolEntityKey tlvKey7( eDB2_ET_QMI_WDS_RSP, msgID, 22 ); cDataParser::tParsedFields pf7 = ParseTLV( db, rsp, tlvs, tlvKey7 ); if (pf7.size() >= 1) { *pHASPI = pf7[0].mValue.mU32; } sProtocolEntityKey tlvKey8( eDB2_ET_QMI_WDS_RSP, msgID, 23 ); cDataParser::tParsedFields pf8 = ParseTLV( db, rsp, tlvs, tlvKey8 ); if (pf8.size() >= 1) { *pAAASPI = pf8[0].mValue.mU32; } sProtocolEntityKey tlvKey9( eDB2_ET_QMI_WDS_RSP, msgID, 26 ); cDataParser::tParsedFields pf9 = ParseTLV( db, rsp, tlvs, tlvKey9 ); if (pf9.size() >= 1) { *pHAState = pf9[0].mValue.mU32; } sProtocolEntityKey tlvKey10( eDB2_ET_QMI_WDS_RSP, msgID, 27 ); cDataParser::tParsedFields pf10 = ParseTLV( db, rsp, tlvs, tlvKey10 ); if (pf10.size() >= 1) { *pAAAState = pf10[0].mValue.mU32; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetMobileIPParameters (Public Method) DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetMobileIPParameters( CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } int nNonDigit = spc.find_first_not_of( "0123456789" ); std::string digitSPC = spc.substr( 0, nNonDigit ); if (digitSPC.size() != spc.size()) { return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_MIP_PARAMS; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (LPCSTR)spc.c_str() ); piv.push_back( pi ); // Mode provided? if (pMode != 0) { // "%u" std::ostringstream tmp; tmp << (UINT)*pMode; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Retry limit provided? if (pRetryLimit != 0) { std::ostringstream tmp; tmp << (UINT)*pRetryLimit; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Retry interval provided? if (pRetryInterval != 0) { std::ostringstream tmp; tmp << (UINT)*pRetryInterval; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 18 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Re-registration period provided? if (pReRegPeriod != 0) { std::ostringstream tmp; tmp << (UINT)*pReRegPeriod; pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 19 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Re-registration on traffic flag provided? if (pReRegTraffic != 0) { std::ostringstream tmp; tmp << (UINT)(*pReRegTraffic == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 20 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // HA authenticator flag provided? if (pHAAuthenticator != 0) { std::ostringstream tmp; tmp << (UINT)(*pHAAuthenticator == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 21 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // HA RFC2002bis authentication flag provided? if (pHA2002bis != 0) { std::ostringstream tmp; tmp << (UINT)(*pHA2002bis == 0 ? 0 : 1); pek = sProtocolEntityKey( eDB2_ET_QMI_WDS_REQ, msgID, 22 ); pi = sDB2PackingInput( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // We require at least one of the optional arguments if (piv.size() <= 1) { // Much ado about nothing return eGOBI_ERR_INVALID_ARG; } // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetMobileIPParameters (Public Method) DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: pMode [ 0 ] - Current mobile IP setting pRetryLimit [ 0 ] - Retry attempt limit pRetryInterval [ 0 ] - Retry attempt interval pReRegPeriod [ 0 ] - Re-registration period pReRegTraffic [ 0 ] - Re-registration only with traffic? pHAAuthenticator [ 0 ] - MH-HA authenticator calculator? pHA2002bis [ 0 ] - MH-HA RFC 2002bis authentication? RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetMobileIPParameters( ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if ( (pMode == 0) || (pRetryLimit == 0) || (pRetryInterval == 0) || (pReRegPeriod == 0) || (pReRegTraffic == 0) || (pHAAuthenticator == 0) || (pHA2002bis == 0) ) { return eGOBI_ERR_INVALID_ARG; } *pMode = ULONG_MAX; *pRetryLimit = UCHAR_MAX; *pRetryInterval = UCHAR_MAX; *pReRegPeriod = UCHAR_MAX; *pReRegTraffic = UCHAR_MAX; *pHAAuthenticator = UCHAR_MAX; *pHA2002bis = UCHAR_MAX; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_MIP_PARAMS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pMode = pf[0].mValue.mU32; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pRetryLimit = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 18 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pRetryInterval = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 19 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pReRegPeriod = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 20 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pReRegTraffic = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 21 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pHAAuthenticator = pf[0].mValue.mU8; } tlvKey = sProtocolEntityKey ( eDB2_ET_QMI_WDS_RSP, msgID, 22 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 1) { *pHA2002bis = pf[0].mValue.mU8; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GetLastMobileIPError (Public Method) DESCRIPTION: This function gets the last mobile IP error PARAMETERS: pError [ 0 ] - Last mobile IP error RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetLastMobileIPError( ULONG * pError ) { // Validate arguments if (pError == 0) { return eGOBI_ERR_INVALID_ARG; } // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_LAST_MIP_STATUS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 1 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() < 1) { return eGOBI_ERR_INVALID_RSP; } // Populate the index *pError = (ULONG)pf[0].mValue.mU8; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::SetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pPrimaryDNS == 0 && pSecondaryDNS == 0) { // At least one must be specified return eGOBI_ERR_INVALID_ARG; } WORD msgID = (WORD)eQMI_WDS_SET_DNS; std::vector piv; if (pPrimaryDNS != 0) { ULONG ip4 = (*pPrimaryDNS & 0x000000FF); ULONG ip3 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pPrimaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 16 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } if (pSecondaryDNS != 0) { ULONG ip4 = (*pSecondaryDNS & 0x000000FF); ULONG ip3 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip1 = (*pSecondaryDNS & 0xFF000000) >> 24; // "%u %u %u %u" std::ostringstream tmp; tmp << (UINT)ip4 << " " << (UINT)ip3 << " " << (UINT)ip2 << " " << (UINT)ip1; sProtocolEntityKey pek( eDB2_ET_QMI_WDS_REQ, msgID, 17 ); sDB2PackingInput pi( pek, (LPCSTR)tmp.str().c_str() ); piv.push_back( pi ); } // Pack up and send the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_WDS, pRequest ); } /*=========================================================================== METHOD: GetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::GetDNSSettings( ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pPrimaryDNS == 0 || pSecondaryDNS == 0) { return eGOBI_ERR_INVALID_ARG; } *pPrimaryDNS = 0; *pSecondaryDNS = 0; // Generate and send the QMI request WORD msgID = (WORD)eQMI_WDS_GET_DNS; sProtocolBuffer rsp = SendSimple( eQMI_SVC_WDS, msgID ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Prepare TLVs for parsing std::vector tlvs = DB2ReduceQMIBuffer( qmiRsp ); const cCoreDatabase & db = GetDatabase(); // Parse the TLV we want (by DB key) sProtocolEntityKey tlvKey( eDB2_ET_QMI_WDS_RSP, msgID, 16 ); cDataParser::tParsedFields pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pPrimaryDNS = (ip4 | ip3 | ip2 | ip1); } tlvKey = sProtocolEntityKey( eDB2_ET_QMI_WDS_RSP, msgID, 17 ); pf = ParseTLV( db, rsp, tlvs, tlvKey ); if (pf.size() >= 4) { ULONG ip4 = (ULONG)pf[0].mValue.mU8; ULONG ip3 = (ULONG)pf[1].mValue.mU8 << 8; ULONG ip2 = (ULONG)pf[2].mValue.mU8 << 16; ULONG ip1 = (ULONG)pf[3].mValue.mU8 << 24; *pSecondaryDNS = (ip4 | ip3 | ip2 | ip1); } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/GobiQMIVoice.cpp000077500000000000000000000144771455567757300245460ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICoreVoice.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core (Voice Service) PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2011, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sUSSDInfo // Struct to represent USSD/Alpha information header /*=========================================================================*/ struct sUSSDInfoHdr { public: BYTE mDCS; BYTE mLength; // Data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: OriginateUSSD (Public Method) DESCRIPTION: This function initiates a USSD operation PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::OriginateUSSD( BYTE * pInfo ) { // Validate arguments if (pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const ULONG INFO_HDR_SZ = (ULONG)sizeof( sUSSDInfoHdr ); sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; ULONG infoLen = pInInfo->mLength + INFO_HDR_SZ; WORD msgID = (WORD)eQMI_VOICE_ASYNC_ORIG_USSD; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_VOICE_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (const BYTE *)pInfo, infoLen ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } return SendAndCheckReturn( eQMI_SVC_VOICE, pRequest, 300000 ); } /*=========================================================================== METHOD: AnswerUSSD (Public Method) DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pInfo [ I ] - USSD information RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::AnswerUSSD( BYTE * pInfo ) { // Validate arguments if (pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const ULONG INFO_HDR_SZ = (ULONG)sizeof( sUSSDInfoHdr ); sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; ULONG infoLen = pInInfo->mLength + INFO_HDR_SZ; WORD msgID = (WORD)eQMI_VOICE_ANSWER_USSD; std::vector piv; sProtocolEntityKey pek( eDB2_ET_QMI_VOICE_REQ, msgID, 1 ); sDB2PackingInput pi( pek, (const BYTE *)pInfo, infoLen ); piv.push_back( pi ); // Pack up the QMI request const cCoreDatabase & db = GetDatabase(); sSharedBuffer * pRequest = DB2PackQMIBuffer( db, piv ); if (pRequest == 0) { return eGOBI_ERR_MEMORY; } // Send the QMI request, check result, and return return SendAndCheckReturn( eQMI_SVC_VOICE, pRequest, 300000 ); } /*=========================================================================== METHOD: CancelUSSD (Public Method) DESCRIPTION: This function cancels an in-progress USSD operation RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiQMICore::CancelUSSD() { // Generate and send the QMI request WORD msgID = (WORD)eQMI_VOICE_CANCEL_USSD; sProtocolBuffer rsp = SendSimple( eQMI_SVC_VOICE, msgID, 30000 ); if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { return eGOBI_ERR_MALFORMED_RSP; } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { return eGOBI_ERR_MALFORMED_RSP; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/Shared/Makefile.am000066400000000000000000000013611455567757300236420ustar00rootroot00000000000000noinst_LTLIBRARIES = libShared.la INCLUDES = \ -I$(top_srcdir)/Core libShared_la_CPPFLAGS = \ -D WDS_SUPPORT \ -D DMS_SUPPORT \ -D NAS_SUPPORT \ -D PDS_SUPPORT \ -D CAT_SUPPORT \ -D RMS_SUPPORT \ -D OMA_SUPPORT \ -D UIM_SUPPORT \ -D WMS_SUPPORT \ -D IMG2K_SUPPORT \ -D IMG_SUPPORT \ -D VOICE_SUPPORT libShared_la_SOURCES = \ GobiError.h \ GobiImageDefinitions.h \ GobiMBNMgmt.cpp \ GobiMBNMgmt.h \ GobiQDLCore.cpp \ GobiQDLCore.h \ GobiQMICoreCAT.cpp \ GobiQMICore.cpp \ GobiQMICoreDMS.cpp \ GobiQMICore.h \ GobiQMICoreImg2k.cpp \ GobiQMICoreImg.cpp \ GobiQMICoreNAS.cpp \ GobiQMICoreOMA.cpp \ GobiQMICorePDS.cpp \ GobiQMICoreRMS.cpp \ GobiQMICoreSMS.cpp \ GobiQMICoreUIM.cpp \ GobiQMICoreWDS.cpp \ GobiQMIVoice.cpp libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/autogen.sh000077500000000000000000000011071455567757300223770ustar00rootroot00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. # NOTE # This autogen.sh is only used when building libqcdm separately from ModemManager srcdir=`dirname $0` test -z "$srcdir" && srcdir=. REQUIRED_AUTOMAKE_VERSION=1.7 PKG_NAME=GobiAPI (test -f $srcdir/configure.ac \ && test -f $srcdir/Core/QDLEnum.h) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level $PKG_NAME directory" exit 1 } (cd $srcdir; mkdir m4 autoreconf --install --symlink && autoreconf && ./configure --enable-maintainer-mode $@ ) libqmi-1.35.2-dev/gobi-api/fixed-GobiAPI-1.0.40/configure.ac000066400000000000000000000010311455567757300226600ustar00rootroot00000000000000AC_PREREQ(2.52) AC_INIT(GobiAPI, 1.0.40, foo@it.com, GobiAPI) AM_INIT_AUTOMAKE([1.9 subdir-objects tar-ustar no-dist-gzip dist-bzip2]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AM_MAINTAINER_MODE AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_HEADERS(config.h) dnl Required programs AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX AC_PROG_INSTALL LT_INIT AC_CONFIG_FILES([ Makefile Core/Makefile Database/Makefile Database/QMI/Makefile Shared/Makefile GobiConnectionMgmt/Makefile GobiImageMgmt/Makefile GobiQDLService/Makefile ]) AC_OUTPUT libqmi-1.35.2-dev/meson.build000066400000000000000000000176421455567757300160370ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez project( 'libqmi', 'c', version: '1.35.2', license: 'GPL2', default_options: [ 'buildtype=debugoptimized', 'c_std=gnu89', 'warning_level=2', ], meson_version: '>= 0.53.0', ) qmi_name = meson.project_name() qmi_version = meson.project_version() version_array = qmi_version.split('.') qmi_major_version = version_array[0].to_int() qmi_minor_version = version_array[1].to_int() qmi_micro_version = version_array[2].to_int() qmi_prefix = get_option('prefix') qmi_bindir = get_option('bindir') qmi_datadir = get_option('datadir') qmi_includedir = get_option('includedir') qmi_libexecdir = get_option('libexecdir') qmi_mandir = get_option('mandir') qmi_glib_include_subdir = qmi_name + '-glib' qmi_glib_pkgincludedir = qmi_includedir / qmi_glib_include_subdir # libtool versioning for libqmi-glib (-version-info c:r:a) # - If the interface is unchanged, but the implementation has changed or been fixed, then increment r # - Otherwise, increment c and zero r. # - If the interface has grown (that is, the new library is compatible with old code), increment a. # - If the interface has changed in an incompatible way (that is, functions have changed or been removed), then zero a. current = 15 revision = 0 age = 10 qmi_glib_version = '@0@.@1@.@2@'.format(current - age, age, revision) qmi_gir_version = '1.0' gnome = import('gnome') i18n = import('i18n') pkg = import('pkgconfig') python = import('python').find_installation('python3') source_root = meson.current_source_dir() data_dir = source_root / 'data' templates_dir = source_root / 'build-aux/templates' qmi_codegen = find_program(source_root / 'build-aux/qmi-codegen/qmi-codegen') qmi_mkenums = find_program(source_root / 'build-aux/qmi-mkenums') top_inc = include_directories('.') cc = meson.get_compiler('c') config_h = configuration_data() config_h.set_quoted('PACKAGE_VERSION', qmi_version) # compiler flags common_flags = ['-DHAVE_CONFIG_H'] # compiler flags that are always enabled, even in release builds cc_flags = cc.get_supported_arguments([ # warning on unused parameters is overkill, never do that '-Wno-unused-parameter', # function type cast disabled: used throughout the code especially to # cast GAsyncReadyCallbacks with the real object type instead of GObject '-Wno-cast-function-type', # all message protocol structs are packed, never complain about it '-Wno-packed', ]) # strict flags to use in debug builds if get_option('buildtype').contains('debug') cc_flags += cc.get_supported_arguments([ '-fno-strict-aliasing', '-Waggregate-return', '-Wcast-align', '-Wdeclaration-after-statement', '-Wdouble-promotion', '-Wduplicated-branches', '-Wduplicated-cond', '-Wfloat-equal', '-Wformat=2', '-Wformat-nonliteral', '-Wformat-security', '-Winit-self', '-Winline', '-Wjump-misses-init', '-Wlogical-op', '-Wnested-externs', '-Wmissing-declarations', '-Wmissing-format-attribute', '-Wmissing-include-dirs', '-Wmissing-noreturn', '-Wmissing-prototypes', '-Wnull-dereference', '-Wpointer-arith', '-Wredundant-decls', '-Wrestrict', '-Wreturn-type', '-Wshadow', '-Wstrict-prototypes', '-Wsuggest-attribute=format', '-Wswitch-default', '-Wswitch-enum', '-Wundef', '-Wunused-but-set-variable', '-Wwrite-strings', ]) endif add_project_arguments(common_flags + cc_flags, language: 'c') no_deprecated_declarations_flags = cc.get_supported_arguments('-Wno-deprecated-declarations') glib_version = '2.56' glib_dep = dependency('glib-2.0', version: '>= ' + glib_version) gio_unix_dep = dependency('gio-unix-2.0') deps = [ glib_dep, dependency('gio-2.0'), dependency('gobject-2.0'), ] c_flags = [ '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_' + glib_version.underscorify(), '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_' + glib_version.underscorify(), '-DGLIB_DISABLE_DEPRECATION_WARNINGS', ] glib_deps = declare_dependency( dependencies: deps, compile_args: c_flags, ) # message collection (existing file in data/qmi-collection-${COLLECTION}.json) # dnl custom collections may be added as files in data/ qmi_collection_name = get_option('collection') # qmi-firmware-update is optional, enabled by default enable_firmware_update = get_option('firmware_update') assert(not enable_firmware_update or qmi_collection_name != 'minimal', 'Cannot build qmi-firmware-update when \'minimal\' collection enabled, use at least the \'basic\' collection instead.') # udev support is optional, enabled by default enable_udev = get_option('udev') if enable_udev assert(enable_firmware_update, 'Cannot build udev support without firmware_update support') gudev_dep = dependency('gudev-1.0', version: '>= 232') endif config_h.set('WITH_UDEV', enable_udev) enable_bash_completion = get_option('bash_completion') if enable_bash_completion bash_completion_dep = dependency('bash-completion') bash_completion_completionsdir = bash_completion_dep.get_pkgconfig_variable( 'completionsdir', # bash-completion 2.10 changed the substitutions define_variable: bash_completion_dep.version().version_compare('>= 2.10') ? ['datadir', qmi_datadir] : ['prefix', qmi_prefix], ) endif # rmnet link management support enable_rmnet = get_option('rmnet') config_h.set('RMNET_SUPPORT_ENABLED', enable_rmnet) # runtime MM check is optional, enabled by default config_h.set('MM_RUNTIME_CHECK_ENABLED', get_option('mm_runtime_check')) # QMI username qmi_username = get_option('qmi_username') enable_qmi_username = (qmi_username != '') if enable_qmi_username config_h.set_quoted('QMI_USERNAME', qmi_username) # FIXME: udev base directory, prefix can't be overrided udev_udevdir = get_option('udevdir') if udev_udevdir == '' udev_udevdir = dependency('udev').get_pkgconfig_variable('udevdir') endif else qmi_username = 'no (root)' endif config_h.set('QMI_USERNAME_ENABLED', enable_qmi_username) # MBIM QMUX service support enable_mbim_qmux = get_option('mbim_qmux') if enable_mbim_qmux mbim_glib_dep = dependency('mbim-glib', version: '>= 1.18.0') endif config_h.set('MBIM_QMUX_ENABLED', enable_mbim_qmux) # QRTR support enable_qrtr = get_option('qrtr') if enable_qrtr qrtr_glib_dep = dependency('qrtr-glib', version: '>= 1.0.0') endif config_h.set10('QMI_QRTR_SUPPORTED', enable_qrtr) version_conf = configuration_data() version_conf.set('VERSION', qmi_version) version_conf.set('QMI_MAJOR_VERSION', qmi_major_version) version_conf.set('QMI_MINOR_VERSION', qmi_minor_version) version_conf.set('QMI_MICRO_VERSION', qmi_micro_version) version_conf.set10('QMI_MBIM_QMUX_SUPPORTED', enable_mbim_qmux) version_conf.set10('QMI_QRTR_SUPPORTED', enable_qrtr) version_conf.set10('QMI_RMNET_SUPPORTED', enable_rmnet) # introspection support enable_gir = get_option('introspection') if enable_gir dependency('gobject-introspection-1.0', version: '>= 0.9.6') endif test_env = { 'G_DEBUG': 'gc-friendly', 'MALLOC_CHECK_': '2', } subdir('src') subdir('utils') enable_gtk_doc = get_option('gtk_doc') if enable_gtk_doc assert(qmi_collection_name == 'full', 'Building documentation requires the \'full\' message collection.') subdir('docs/reference/libqmi-glib') endif enable_man = get_option('man') if enable_man subdir('docs/man') endif enable_fuzzer = get_option('fuzzer') configure_file( output: 'config.h', configuration: config_h, ) summary({ 'compiler': cc.get_id(), 'cflags': cc_flags, 'Documentation': enable_gtk_doc, 'bash completion': enable_bash_completion, 'gobject introspection': enable_gir, 'man pages': enable_man, 'fuzzer': enable_fuzzer, }, section: 'Build') summary({ 'prefix': qmi_prefix, 'udev base directory': (enable_qmi_username ? udev_udevdir : 'disabled'), }, section: 'System paths') summary({ 'QMI over MBIM': enable_mbim_qmux, 'QMI over QRTR': enable_qrtr, 'QMI username': qmi_username, 'rmnet support': enable_rmnet, }, section: 'Features') libqmi-1.35.2-dev/meson_options.txt000066400000000000000000000030021455567757300173130ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez option('collection', type: 'combo', choices: ['minimal', 'basic', 'full'], value: 'full', description: 'message collection to build') option('firmware_update', type: 'boolean', value: true, description: 'enable compilation of `qmi-firmware-update') option('mbim_qmux', type: 'boolean', value: true, description: 'enable support for QMI over MBIM QMUX service') option('mm_runtime_check', type: 'boolean', value: true, description: 'build ModemManager runtime check support') option('qmi_username', type: 'string', value: '', description: 'user allowed to access QMI devices') option('qrtr', type: 'boolean', value: true, description: 'enable support for QRTR protocol') option('rmnet', type: 'boolean', value: true, description: 'enable support for RMNET link management') option('udev', type: 'boolean', value: true, description: 'build udev support') option('udevdir', type: 'string', value: '', description: 'where udev base directory is') option('introspection', type: 'boolean', value: true, description: 'build introspection support') option('gtk_doc', type: 'boolean', value: false, description: 'use gtk-doc to build documentation') option('man', type: 'boolean', value: true, description: 'build man pages using help2man') option('bash_completion', type: 'boolean', value: true, description: 'install bash completion files') option('fuzzer', type: 'boolean', value: false, description: 'build fuzzer tests') libqmi-1.35.2-dev/src/000077500000000000000000000000001455567757300144525ustar00rootroot00000000000000libqmi-1.35.2-dev/src/libqmi-glib/000077500000000000000000000000001455567757300166425ustar00rootroot00000000000000libqmi-1.35.2-dev/src/libqmi-glib/76-qmi-device-ownership.rules.in000066400000000000000000000013641455567757300246200ustar00rootroot00000000000000# do not edit this file, it will be overwritten on update ACTION!="add|change|move", GOTO="qmi_device_ownership_end" KERNEL=="cdc-wdm*", DRIVERS=="qmi_wwan", SUBSYSTEM=="usbmisc", OWNER="@QMI_USERNAME@" SUBSYSTEM=="net", DRIVERS=="qmi_wwan", TEST=="qmi/raw_ip", RUN+="/bin/chown @QMI_USERNAME@ \"$sys/$devpath/qmi/raw_ip\"" SUBSYSTEM=="net", DRIVERS=="qmi_wwan", TEST=="qmi/pass_through", RUN+="/bin/chown @QMI_USERNAME@ \"$sys/$devpath/qmi/pass_through\"" SUBSYSTEM=="net", DRIVERS=="qmi_wwan", TEST=="qmi/del_mux", RUN+="/bin/chown @QMI_USERNAME@ \"$sys/$devpath/qmi/del_mux\"" SUBSYSTEM=="net", DRIVERS=="qmi_wwan", TEST=="qmi/add_mux", RUN+="/bin/chown @QMI_USERNAME@ \"$sys/$devpath/qmi/add_mux\"" LABEL="qmi_device_ownership_end" libqmi-1.35.2-dev/src/libqmi-glib/generated/000077500000000000000000000000001455567757300206005ustar00rootroot00000000000000libqmi-1.35.2-dev/src/libqmi-glib/generated/meson.build000066400000000000000000000227031455567757300227460ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez generated_inc = include_directories('.') gen_sources = [] gen_headers = [] private_gen_sources = [] private_gen_headers = [] gen_sections = [] gen_sections_deps = [] # Error types enum_types = 'qmi-error-types' gen_headers += custom_target( enum_types + '.h', input: qmi_errors_header, output: enum_types + '.h', command: [ python, qmi_mkenums, '--fhead', '#ifndef __LIBQMI_GLIB_ERROR_TYPES_H__\n#define __LIBQMI_GLIB_ERROR_TYPES_H__\n#include "qmi-errors.h"\n', '--template', files(templates_dir / enum_types + '.h.template'), '--ftail', '#endif /* __LIBQMI_GLIB_ERROR_TYPES_H__ */\n', '@INPUT@'], capture: true, install: true, install_dir: qmi_glib_pkgincludedir, ) gen_sources += custom_target( enum_types + '.c', input: qmi_errors_header, output: enum_types + '.c', command: [ python, qmi_mkenums, '--fhead', '#include "qmi-errors.h"\n#include "qmi-error-types.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) enum_types = 'qmi-error-quarks' gen_sources += custom_target( enum_types + '.c', input: qmi_errors_header, output: enum_types + '.c', command: [ python, qmi_mkenums, '--fhead', '#include "qmi-errors.h"\n#include "qmi-error-types.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) # Enum types enum_types = 'qmi-enum-types' gen_headers += custom_target( enum_types + '.h', input: qmi_enums_headers, output: enum_types + '.h', command: [ python, qmi_mkenums, '--enums-only', '--fhead', '#ifndef __LIBQMI_GLIB_ENUM_TYPES_H__\n#define __LIBQMI_GLIB_ENUM_TYPES_H__\n#include "qmi-enums.h"\n#include "qmi-enums-wds.h"\n#include "qmi-enums-dms.h"\n#include "qmi-enums-nas.h"\n#include "qmi-enums-wms.h"\n#include "qmi-enums-pds.h"\n#include "qmi-enums-pdc.h"\n#include "qmi-enums-pbm.h"\n#include "qmi-enums-uim.h"\n#include "qmi-enums-sar.h"\n#include "qmi-enums-oma.h"\n#include "qmi-enums-wda.h"\n#include "qmi-enums-voice.h"\n#include "qmi-enums-loc.h"\n#include "qmi-enums-qos.h"\n#include "qmi-enums-gas.h"\n#include "qmi-enums-dsd.h"\n#include "qmi-enums-fox.h"\n#include "qmi-enums-imsp.h"\n#include "qmi-enums-imsa.h"\n#include "qmi-enums-ssc.h"\n#include "qmi-device.h"\n', '--template', files(templates_dir / enum_types + '.h.template'), '--ftail', '#endif /* __LIBQMI_GLIB_ENUM_TYPES_H__ */\n', '@INPUT@'], capture: true, install: true, install_dir: qmi_glib_pkgincludedir, ) gen_sources += custom_target( enum_types + '.c', input: qmi_enums_headers, output: enum_types + '.c', command: [ python, qmi_mkenums, '--enums-only', '--fhead', '#include "qmi-enum-types.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) # Flag types enum_types = 'qmi-flag-types' gen_headers += custom_target( enum_types + '.h', input: qmi_enums_headers, output: enum_types + '.h', command: [ python, qmi_mkenums, '--flags-only', '--fhead', '#ifndef __LIBQMI_GLIB_FLAG_TYPES_H__\n#define __LIBQMI_GLIB_FLAG_TYPES_H__\n#include "qmi-enums.h"\n#include "qmi-enums-wds.h"\n#include "qmi-enums-dms.h"\n#include "qmi-enums-nas.h"\n#include "qmi-enums-wms.h"\n#include "qmi-enums-pds.h"\n#include "qmi-enums-pdc.h"\n#include "qmi-enums-pbm.h"\n#include "qmi-enums-uim.h"\n#include "qmi-enums-sar.h"\n#include "qmi-enums-oma.h"\n#include "qmi-enums-wda.h"\n#include "qmi-enums-voice.h"\n#include "qmi-enums-loc.h"\n#include "qmi-enums-qos.h"\n#include "qmi-enums-gas.h"\n#include "qmi-enums-dsd.h"\n#include "qmi-enums-fox.h"\n#include "qmi-enums-ssc.h"\n#include "qmi-device.h"\n', '--template', files(templates_dir / enum_types + '.h.template'), '--ftail', '#endif /* __LIBQMI_GLIB_FLAG_TYPES_H__ */\n', '@INPUT@'], capture: true, install: true, install_dir: qmi_glib_pkgincludedir, ) gen_sources += custom_target( enum_types + '.c', input: qmi_enums_headers, output: enum_types + '.c', command: [ python, qmi_mkenums, '--flags-only', '--fhead', '#include "qmi-flag-types.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) # Private Enum types enum_types = 'qmi-enum-types-private' private_gen_headers += custom_target( enum_types + '.h', input: qmi_enums_private_header, output: enum_types + '.h', command: [ python, qmi_mkenums, '--enums-only', '--fhead', '#ifndef __LIBQMI_GLIB_ENUM_TYPES_PRIVATE_H__\n#define __LIBQMI_GLIB_ENUM_TYPES_PRIVATE_H__\n#include "qmi-enums-private.h"\n', '--template', files(templates_dir / enum_types + '.h.template'), '--ftail', '#endif /* __LIBQMI_GLIB_ENUM_TYPES_PRIVATE_H__ */\n', '@INPUT@'], capture: true, ) private_gen_sources += custom_target( enum_types + '.c', input: qmi_enums_private_header, output: enum_types + '.c', command: [ python, qmi_mkenums, '--enums-only', '--fhead', '#include "qmi-enum-types-private.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) # Private Flag types enum_types = 'qmi-flag-types-private' private_gen_headers += custom_target( enum_types + '.h', input: qmi_enums_private_header, output: enum_types + '.h', command: [ python, qmi_mkenums, '--flags-only', '--fhead', '#ifndef __LIBQMI_GLIB_FLAG_TYPES_PRIVATE_H__\n#define __LIBQMI_GLIB_FLAG_TYPES_PRIVATE_H__\n#include "qmi-enums-private.h"\n', '--template', files(templates_dir / enum_types + '.h.template'), '--ftail', '#endif /* __LIBQMI_GLIB_FLAG_TYPES_PRIVATE_H__ */\n', '@INPUT@'], capture: true, ) private_gen_sources += custom_target( enum_types + '.c', input: qmi_enums_private_header, output: enum_types + '.c', command: [ python, qmi_mkenums, '--flags-only', '--fhead', '#include "qmi-flag-types-private.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) # 64bit flag types enum_types = 'qmi-flags64-types' gen_headers += custom_target( enum_types + '.h', input: qmi_flags64_headers, output: enum_types + '.h', command: [ python, qmi_mkenums, '--fhead', '#ifndef __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#define __LIBQMI_GLIB_FLAGS64_TYPES_H__\n#include "qmi-flags64-dms.h"\n#include "qmi-flags64-nas.h"\n#include "qmi-flags64-loc.h"\n#include "qmi-flags64-dsd.h"\n#include "qmi-flags64-wds.h"\n', '--template', files(templates_dir / enum_types + '.h.template'), '--ftail', '#endif /* __LIBQMI_GLIB_FLAGS64_TYPES_H__ */\n', '@INPUT@'], capture: true, install: true, install_dir: qmi_glib_pkgincludedir, ) gen_sources += custom_target( enum_types + '.c', input: qmi_flags64_headers, output: enum_types + '.c', command: [ python, qmi_mkenums, '--fhead', '#include "qmi-flags64-types.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) qmi_common = data_dir / 'qmi-common.json' service = 'ctl' name = 'qmi-' + service generated = custom_target( name, input: data_dir / 'qmi-service-@0@.json'.format(service), output: [name + '.c', name + '.h', name + '.sections'], command: [qmi_codegen, '--input', '@INPUT@', '--include', qmi_common, '--output', '@OUTDIR@' / name], ) private_gen_sources += [generated[0], generated[1]] services = [ 'atr', 'dms', 'dpm', 'dsd', 'ims', 'imsa', 'imsp', 'fox', 'gas', 'gms', 'loc', 'nas', 'oma', 'pbm', 'pdc', 'pds', 'qos', 'sar', 'ssc', 'uim', 'voice', 'wda', 'wds', 'wms', ] command = [ qmi_codegen, '--input', '@INPUT@', '--include', qmi_common, ] if qmi_collection_name != 'full' command += ['--collection', data_dir / 'qmi-collection-@0@.json'.format(qmi_collection_name)] endif foreach service: services name = 'qmi-' + service generated = custom_target( name, input: data_dir / 'qmi-service-@0@.json'.format(service), output: [name + '.c', name + '.h', name + '.sections'], command: command + ['--output', '@OUTDIR@' / name], install: true, install_dir: [false, qmi_glib_pkgincludedir, false], ) gen_sources += generated[0] gen_headers += generated[1] # FIXME: the third target generated by custom target can't by used because is not a known # source file, to the path has to be used. the first workaround is to use the # build paths to point to the files, and the second workaround is to use # custom target objects to force its building. gen_sections += [meson.current_build_dir() / name + '.sections'] gen_sections_deps += [generated] endforeach incs = [ top_inc, libqmi_glib_inc, ] c_flags = [ '-DLIBQMI_GLIB_COMPILATION', '-DG_LOG_DOMAIN="Qmi"', '-Wno-unused-function', ] deps = [glib_deps] if enable_qrtr deps += qrtr_glib_dep endif libqmi_glib_generated = static_library( 'qmi-glib-generated', sources: private_gen_sources + private_gen_headers + gen_sources + gen_headers + [version_header], include_directories: incs, dependencies: deps, c_args: c_flags, ) # FIXME: in older versions of meson, if libqmi-glib-generated is linked as shared # it will also try to link it in documentation generation generated_dep = declare_dependency( sources: private_gen_headers + gen_headers + [version_header], include_directories: [libqmi_glib_inc, generated_inc], dependencies: deps, ) libqmi-1.35.2-dev/src/libqmi-glib/kernel/000077500000000000000000000000001455567757300201225ustar00rootroot00000000000000libqmi-1.35.2-dev/src/libqmi-glib/kernel/if_link_rmnet.h000066400000000000000000000025111455567757300231120ustar00rootroot00000000000000 #ifndef _QMI_IF_LINK_RMNET_H #define _QMI_IF_LINK_RMNET_H #include #include /* safe guard to avoid redefininig all these symbols if * the system provided kernel or libc headers already * define them */ #if !defined IFLA_RMNET_MAX enum { IFLA_RMNET_UNSPEC, IFLA_RMNET_MUX_ID, IFLA_RMNET_FLAGS, __IFLA_RMNET_MAX, }; #define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1) struct ifla_rmnet_flags { __u32 flags; __u32 mask; }; #endif /* IFLA_RMNET_MAX */ /* per-flag safe guards, because these symbols may have been * introduced in different kernel versions; we should only * define those symbols not already defined by the available * kernel headers */ #if !defined RMNET_FLAGS_INGRESS_DEAGGREGATION # define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0) #endif #if !defined RMNET_FLAGS_INGRESS_MAP_COMMANDS # define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1) #endif #if !defined RMNET_FLAGS_INGRESS_MAP_CKSUMV4 # define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2) #endif #if !defined RMNET_FLAGS_EGRESS_MAP_CKSUMV4 # define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3) #endif #if !defined RMNET_FLAGS_INGRESS_MAP_CKSUMV5 #define RMNET_FLAGS_INGRESS_MAP_CKSUMV5 (1U << 4) #endif #if !defined RMNET_FLAGS_EGRESS_MAP_CKSUMV5 #define RMNET_FLAGS_EGRESS_MAP_CKSUMV5 (1U << 5) #endif #endif /* _QMI_IF_LINK_RMNET_H */ libqmi-1.35.2-dev/src/libqmi-glib/libqmi-glib.h000066400000000000000000000053361455567757300212120ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google, Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_H_ #define _LIBQMI_GLIB_H_ #define __LIBQMI_GLIB_H_INSIDE__ /* libqmi-glib headers */ #include "qmi-version.h" #include "qmi-device.h" #include "qmi-client.h" #include "qmi-proxy.h" #include "qmi-message.h" #include "qmi-message-context.h" #include "qmi-enums.h" #include "qmi-utils.h" #include "qmi-compat.h" #include "qmi-enums-dms.h" #include "qmi-flags64-dms.h" #include "qmi-dms.h" #include "qmi-flags64-nas.h" #include "qmi-enums-nas.h" #include "qmi-nas.h" #include "qmi-flags64-wds.h" #include "qmi-enums-wds.h" #include "qmi-wds.h" #include "qmi-enums-wms.h" #include "qmi-wms.h" #include "qmi-enums-pds.h" #include "qmi-pds.h" #include "qmi-enums-pdc.h" #include "qmi-pdc.h" #include "qmi-enums-pbm.h" #include "qmi-pbm.h" #include "qmi-enums-uim.h" #include "qmi-uim.h" #include "qmi-enums-oma.h" #include "qmi-oma.h" #include "qmi-enums-wda.h" #include "qmi-wda.h" #include "qmi-enums-voice.h" #include "qmi-voice.h" #include "qmi-flags64-loc.h" #include "qmi-enums-loc.h" #include "qmi-loc.h" #include "qmi-enums-qos.h" #include "qmi-qos.h" #include "qmi-enums-gas.h" #include "qmi-gas.h" #include "qmi-gms.h" #include "qmi-enums-dsd.h" #include "qmi-flags64-dsd.h" #include "qmi-dsd.h" #include "qmi-enums-sar.h" #include "qmi-sar.h" #include "qmi-dpm.h" #include "qmi-enums-fox.h" #include "qmi-fox.h" #include "qmi-atr.h" #include "qmi-enums-imsp.h" #include "qmi-imsp.h" #include "qmi-enums-imsa.h" #include "qmi-imsa.h" #include "qmi-ims.h" #include "qmi-enums-ssc.h" #include "qmi-ssc.h" /* generated */ #include "qmi-error-types.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #include "qmi-flags64-types.h" #if QMI_QRTR_SUPPORTED # include #endif #endif /* _LIBQMI_GLIB_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/meson.build000066400000000000000000000102621455567757300210050ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez libqmi_glib_inc = include_directories('.') qmi_errors_header = files('qmi-errors.h') qmi_enums_headers = files( 'qmi-device.h', 'qmi-enums.h', 'qmi-enums-dms.h', 'qmi-enums-dsd.h', 'qmi-enums-fox.h', 'qmi-enums-gas.h', 'qmi-enums-imsa.h', 'qmi-enums-imsp.h', 'qmi-enums-loc.h', 'qmi-enums-nas.h', 'qmi-enums-oma.h', 'qmi-enums-pbm.h', 'qmi-enums-pdc.h', 'qmi-enums-pds.h', 'qmi-enums-qos.h', 'qmi-enums-sar.h', 'qmi-enums-uim.h', 'qmi-enums-voice.h', 'qmi-enums-wda.h', 'qmi-enums-wds.h', 'qmi-enums-wms.h', 'qmi-enums-ssc.h', ) qmi_enums_private_header = files('qmi-enums-private.h') qmi_flags64_headers = files( 'qmi-flags64-dms.h', 'qmi-flags64-dsd.h', 'qmi-flags64-loc.h', 'qmi-flags64-nas.h', 'qmi-flags64-wds.h', ) headers = qmi_errors_header + qmi_enums_headers + qmi_enums_private_header + qmi_flags64_headers + files( 'libqmi-glib.h', 'qmi-client.h', 'qmi-message-context.h', 'qmi-message.h', 'qmi-proxy.h', 'qmi-utils.h', ) install_headers( headers + files('qmi-compat.h'), install_dir: qmi_glib_pkgincludedir, ) version_header = configure_file( input: 'qmi-version.h.in', output: '@BASENAME@', configuration: version_conf, install_dir: qmi_glib_pkgincludedir, ) subdir('generated') common_c_flags = [ '-DLIBQMI_GLIB_COMPILATION', '-DG_LOG_DOMAIN="Qmi"', ] libqmi_glib_compat = static_library( 'qmi-glib-compat', sources: 'qmi-compat.c', include_directories: top_inc, dependencies: generated_dep, c_args: common_c_flags + no_deprecated_declarations_flags, ) libname = 'qmi-glib' sources = files( 'qmi-client.c', 'qmi-device.c', 'qmi-endpoint.c', 'qmi-endpoint-qmux.c', 'qmi-enums-dms.c', 'qmi-enums-nas.c', 'qmi-enums-wds.c', 'qmi-file.c', 'qmi-helpers.c', 'qmi-message.c', 'qmi-message-context.c', 'qmi-net-port-manager.c', 'qmi-net-port-manager-qmiwwan.c', 'qmi-proxy.c', 'qmi-utils.c', ) deps = [ generated_dep, gio_unix_dep, ] if enable_mbim_qmux sources += files('qmi-endpoint-mbim.c') deps += mbim_glib_dep endif if enable_qrtr sources += files('qmi-endpoint-qrtr.c') endif if enable_rmnet sources += files('qmi-net-port-manager-rmnet.c') endif libqmi_glib = library( libname, version: qmi_glib_version, sources: sources + [version_header], include_directories: top_inc, dependencies: deps, c_args: common_c_flags + ['-DLIBEXEC_PATH="@0@"'.format(qmi_prefix / qmi_libexecdir)], link_whole: [libqmi_glib_compat, libqmi_glib_generated], install: true, ) libqmi_glib_dep = declare_dependency( dependencies: generated_dep, link_with: libqmi_glib, ) libqmi_glib_pkg_requires = ['glib-2.0', 'gobject-2.0', 'gio-2.0'] if enable_qrtr libqmi_glib_pkg_requires += [ 'qrtr-glib' ] endif pkg.generate( libraries: libqmi_glib, version: qmi_version, name: libname, description: 'Library to communicate with QMI-powered modems', subdirs: qmi_glib_include_subdir, # FIXME: produced by the inhability of meson to use internal dependencies requires: libqmi_glib_pkg_requires, variables: [ 'exec_prefix=${prefix}', 'qmi_mbim_qmux_supported=' + enable_mbim_qmux.to_int().to_string(), 'qmi_qrtr_supported=' + enable_qrtr.to_int().to_string(), 'qmi_rmnet_supported=' + enable_rmnet.to_int().to_string(), ], ) if enable_gir and get_option('default_library') != 'static' incs = [ 'Gio-2.0', 'GLib-2.0', 'GObject-2.0', ] if enable_qrtr incs += ['Qrtr-1.0'] endif ns = 'Qmi' libqmi_glib_gir = gnome.generate_gir( libqmi_glib, sources: sources + headers + gen_sources + gen_headers, includes: incs, namespace: ns, nsversion: qmi_gir_version, identifier_prefix: ns, symbol_prefix: ns.to_lower() + '_', extra_args: common_c_flags + ['--identifier-prefix=' + ns.to_upper()], header: 'libqmi-glib.h', export_packages: libname, install: true, ) endif if enable_qmi_username configure_file( input: '76-qmi-device-ownership.rules.in', output: '@BASENAME@', configuration: {'QMI_USERNAME': qmi_username}, install_dir: udev_udevdir / 'rules.d', ) endif subdir('test') libqmi-1.35.2-dev/src/libqmi-glib/qmi-client.c000066400000000000000000000234661455567757300210630ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2017 Aleksander Morgado */ #include #include "qmi-error-types.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #include "qmi-device.h" #include "qmi-client.h" #include "qmi-ctl.h" G_DEFINE_ABSTRACT_TYPE (QmiClient, qmi_client, G_TYPE_OBJECT) enum { PROP_0, PROP_DEVICE, PROP_SERVICE, PROP_CID, PROP_VERSION_MAJOR, PROP_VERSION_MINOR, PROP_VALID, PROP_LAST }; static GParamSpec *properties[PROP_LAST]; struct _QmiClientPrivate { QmiDevice *device; QmiService service; guint8 cid; guint version_major; guint version_minor; guint16 transaction_id; }; /*****************************************************************************/ GObject * qmi_client_get_device (QmiClient *self) { GObject *device; g_return_val_if_fail (QMI_IS_CLIENT (self), NULL); g_object_get (G_OBJECT (self), QMI_CLIENT_DEVICE, &device, NULL); return device; } GObject * qmi_client_peek_device (QmiClient *self) { g_return_val_if_fail (QMI_IS_CLIENT (self), NULL); return G_OBJECT (self->priv->device); } QmiService qmi_client_get_service (QmiClient *self) { g_return_val_if_fail (QMI_IS_CLIENT (self), QMI_SERVICE_UNKNOWN); return self->priv->service; } guint8 qmi_client_get_cid (QmiClient *self) { g_return_val_if_fail (QMI_IS_CLIENT (self), QMI_CID_NONE); return self->priv->cid; } gboolean qmi_client_is_valid (QmiClient *self) { g_return_val_if_fail (QMI_IS_CLIENT (self), FALSE); return (self->priv->service != QMI_SERVICE_UNKNOWN && QMI_IS_DEVICE (self->priv->device) && ((self->priv->cid != QMI_CID_NONE || self->priv->service == QMI_SERVICE_CTL))); } gboolean qmi_client_get_version (QmiClient *self, guint *major, guint *minor) { g_return_val_if_fail (QMI_IS_CLIENT (self), FALSE); /* If the major version is greater than zero, assume it was * set properly */ if (!self->priv->version_major) return FALSE; *major = self->priv->version_major; *minor = self->priv->version_minor; return TRUE; } gboolean qmi_client_check_version (QmiClient *self, guint major, guint minor) { g_return_val_if_fail (QMI_IS_CLIENT (self), FALSE); /* If the major version is greater than zero, assume it was * set properly */ if (!self->priv->version_major) return FALSE; if (self->priv->version_major > major || (self->priv->version_major == major && self->priv->version_minor >= minor)) return TRUE; return FALSE; } guint16 qmi_client_get_next_transaction_id (QmiClient *self) { guint16 next; g_return_val_if_fail (QMI_IS_CLIENT (self), 0); next = self->priv->transaction_id; /* Don't go further than 8bits in the CTL service */ if ((self->priv->service == QMI_SERVICE_CTL && self->priv->transaction_id == G_MAXUINT8) || self->priv->transaction_id == G_MAXUINT16) /* Reset! */ self->priv->transaction_id = 0x01; else self->priv->transaction_id++; return next; } /*****************************************************************************/ void __qmi_client_process_indication (QmiClient *self, QmiMessage *message) { if (QMI_CLIENT_GET_CLASS (self)->process_indication) QMI_CLIENT_GET_CLASS (self)->process_indication (self, message); } /*****************************************************************************/ static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { QmiClient *self = QMI_CLIENT (object); switch (prop_id) { case PROP_DEVICE: /* NOTE!! We do NOT keep a reference to the device here. * Clients are OWNED by the device */ self->priv->device = g_value_get_object (value); break; case PROP_SERVICE: self->priv->service = g_value_get_enum (value); break; case PROP_CID: self->priv->cid = (guint8)g_value_get_uint (value); break; case PROP_VERSION_MAJOR: self->priv->version_major = g_value_get_uint (value); break; case PROP_VERSION_MINOR: self->priv->version_minor = g_value_get_uint (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QmiClient *self = QMI_CLIENT (object); switch (prop_id) { case PROP_DEVICE: g_value_set_object (value, self->priv->device); break; case PROP_SERVICE: g_value_set_enum (value, self->priv->service); break; case PROP_CID: g_value_set_uint (value, (guint)self->priv->cid); break; case PROP_VERSION_MAJOR: g_value_set_uint (value, self->priv->version_major); break; case PROP_VERSION_MINOR: g_value_set_uint (value, self->priv->version_minor); break; case PROP_VALID: g_value_set_boolean (value, qmi_client_is_valid (self)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void qmi_client_init (QmiClient *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), QMI_TYPE_CLIENT, QmiClientPrivate); /* Defaults */ self->priv->service = QMI_SERVICE_UNKNOWN; self->priv->transaction_id = 0x01; self->priv->cid = QMI_CID_NONE; self->priv->version_major = 0; self->priv->version_minor = 0; } static void qmi_client_class_init (QmiClientClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiClientPrivate)); object_class->get_property = get_property; object_class->set_property = set_property; /** * QmiClient:client-device: * * Since: 1.0 */ properties[PROP_DEVICE] = g_param_spec_object (QMI_CLIENT_DEVICE, "Device", "The QMI device", QMI_TYPE_DEVICE, G_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_DEVICE, properties[PROP_DEVICE]); /** * QmiClient:client-service: * * Since: 1.0 */ properties[PROP_SERVICE] = g_param_spec_enum (QMI_CLIENT_SERVICE, "Service", "QMI service this client is using", QMI_TYPE_SERVICE, QMI_SERVICE_UNKNOWN, G_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_SERVICE, properties[PROP_SERVICE]); /** * QmiClient:client-cid: * * Since: 1.0 */ properties[PROP_CID] = g_param_spec_uint (QMI_CLIENT_CID, "Client ID", "ID of the client registered into the QMI device", 0, G_MAXUINT8, QMI_CID_NONE, G_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_CID, properties[PROP_CID]); /** * QmiClient:client-version-major: * * Since: 1.0 */ properties[PROP_VERSION_MAJOR] = g_param_spec_uint (QMI_CLIENT_VERSION_MAJOR, "Version major", "Major version of the service handled by this client", 0, G_MAXUINT, 0, G_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_VERSION_MAJOR, properties[PROP_VERSION_MAJOR]); /** * QmiClient:client-version-minor: * * Since: 1.0 */ properties[PROP_VERSION_MINOR] = g_param_spec_uint (QMI_CLIENT_VERSION_MINOR, "Version minor", "Minor version of the service handled by this client", 0, G_MAXUINT, 0, G_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_VERSION_MINOR, properties[PROP_VERSION_MINOR]); /** * QmiClient:client-valid: * * Since: 1.20 */ properties[PROP_VALID] = g_param_spec_boolean (QMI_CLIENT_VALID, "Valid", "Whether the client is valid and usable", FALSE, G_PARAM_READABLE); g_object_class_install_property (object_class, PROP_VALID, properties[PROP_VALID]); } libqmi-1.35.2-dev/src/libqmi-glib/qmi-client.h000066400000000000000000000162621455567757300210640ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_CLIENT_H_ #define _LIBQMI_GLIB_QMI_CLIENT_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include #include "qmi-enums.h" #include "qmi-message.h" G_BEGIN_DECLS /** * SECTION:qmi-client * @title: QmiClient * @short_description: Generic QMI client handling routines * * #QmiClient is a generic type representing a QMI client for any kind of * #QmiService. * * These objects are created by a #QmiDevice with qmi_device_allocate_client(), * and before completely disposing them qmi_device_release_client() needs to be * called in order to release the unique client ID reserved. */ /** * QMI_CID_NONE: * * A symbol specifying a special CID value that references no CID. * * Since: 1.0 */ #define QMI_CID_NONE 0x00 /** * QMI_CID_BROADCAST: * * A symbol specifying the broadcast CID. * * Since: 1.0 */ #define QMI_CID_BROADCAST 0xFF #define QMI_TYPE_CLIENT (qmi_client_get_type ()) #define QMI_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_CLIENT, QmiClient)) #define QMI_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_CLIENT, QmiClientClass)) #define QMI_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_CLIENT)) #define QMI_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_CLIENT)) #define QMI_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_CLIENT, QmiClientClass)) typedef struct _QmiClient QmiClient; typedef struct _QmiClientClass QmiClientClass; typedef struct _QmiClientPrivate QmiClientPrivate; /** * QMI_CLIENT_DEVICE: * * Symbol defining the #QmiClient:client-device property. * * Since: 1.0 */ #define QMI_CLIENT_DEVICE "client-device" /** * QMI_CLIENT_SERVICE: * * Symbol defining the #QmiClient:client-service property. * * Since: 1.0 */ #define QMI_CLIENT_SERVICE "client-service" /** * QMI_CLIENT_CID: * * Symbol defining the #QmiClient:client-cid property. * * Since: 1.0 */ #define QMI_CLIENT_CID "client-cid" /** * QMI_CLIENT_VERSION_MAJOR: * * Symbol defining the #QmiClient:client-version-major property. * * Since: 1.0 */ #define QMI_CLIENT_VERSION_MAJOR "client-version-major" /** * QMI_CLIENT_VERSION_MINOR: * * Symbol defining the #QmiClient:client-version-minor property. * * Since: 1.0 */ #define QMI_CLIENT_VERSION_MINOR "client-version-minor" /** * QMI_CLIENT_VALID: * * Symbol defining the #QmiClient:client-valid property. * * Since: 1.20 */ #define QMI_CLIENT_VALID "client-valid" /** * QmiClient: * * The #QmiClient structure contains private data and should only be accessed * using the provided API. * * Since: 1.0 */ struct _QmiClient { /*< private >*/ GObject parent; QmiClientPrivate *priv; }; struct _QmiClientClass { /*< private >*/ GObjectClass parent; /* Virtual method to get indications processed */ void (* process_indication) (QmiClient *self, QmiMessage *message); }; GType qmi_client_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiClient, g_object_unref) /** * qmi_client_get_device: * @self: a #QmiClient * * Get the #QmiDevice associated with this #QmiClient. * * Returns: (transfer full): a #GObject that must be freed with g_object_unref(). * * Since: 1.0 */ GObject *qmi_client_get_device (QmiClient *self); /** * qmi_client_peek_device: * @self: a #QmiClient. * * Get the #QmiDevice associated with this #QmiClient, without increasing the reference count * on the returned object. * * Returns: (transfer none): a #GObject. Do not free the returned object, it is owned by @self. * * Since: 1.0 */ GObject *qmi_client_peek_device (QmiClient *self); /** * qmi_client_get_service: * @self: A #QmiClient * * Get the service being used by this #QmiClient. * * Returns: a #QmiService. * * Since: 1.0 */ QmiService qmi_client_get_service (QmiClient *self); /** * qmi_client_get_cid: * @self: A #QmiClient * * Get the client ID of this #QmiClient. * * Returns: the client ID. * * Since: 1.0 */ guint8 qmi_client_get_cid (QmiClient *self); /** * qmi_client_is_valid: * @self: a #QmiClient. * * Checks whether #QmiClient is a valid and usable client. * * The client is marked as invalid as soon as the client id is released or when * the associated #QmiDevice is closed. * * This method may be used if the caller needs to ensure validity before a * command is attempted, e.g. if the lifecycle of the object is managed in some * other place and the caller just has a reference to the #QmiClient. * * Returns: %TRUE if the client is valid, %FALSE otherwise. * * Since: 1.20 */ gboolean qmi_client_is_valid (QmiClient *self); /** * qmi_client_get_version: * @self: A #QmiClient * @major: placeholder for the output major version. * @minor: placeholder for the output minor version. * * Get the version of the service handled by this #QmiClient. * * Returns: %TRUE if the version was properly reported, %FALSE otherwise. * * Since: 1.0 */ gboolean qmi_client_get_version (QmiClient *self, guint *major, guint *minor); /** * qmi_client_check_version: * @self: A #QmiClient * @major: a major version. * @minor: a minor version. * * Checks if the version of the service handled by this #QmiClient is greater * or equal than the given version. * * Returns: %TRUE if the version of the service is greater or equal than the one given, %FALSE otherwise. * * Since: 1.0 */ gboolean qmi_client_check_version (QmiClient *self, guint major, guint minor); /** * qmi_client_get_next_transaction_id: * @self: A #QmiClient * * Acquire the next transaction ID of this #QmiClient. * The internal transaction ID gets incremented. * * Returns: the next transaction ID. * * Since: 1.0 */ guint16 qmi_client_get_next_transaction_id (QmiClient *self); /* not part of the public API */ #if defined (LIBQMI_GLIB_COMPILATION) G_GNUC_INTERNAL void __qmi_client_process_indication (QmiClient *self, QmiMessage *message); #endif G_END_DECLS #endif /* _LIBQMI_GLIB_QMI_CLIENT_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-compat.c000066400000000000000000002777351455567757300211020ustar00rootroot00000000000000 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2016-2022 Aleksander Morgado */ #include #include "qmi-compat.h" #include "qmi-helpers.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #ifndef QMI_DISABLE_DEPRECATED /*****************************************************************************/ #if defined UTILS_ENABLE_TRACE static void print_read_bytes_trace (const gchar *type, gconstpointer buffer, gconstpointer out, guint n_bytes) { gchar *str1; gchar *str2; str1 = qmi_helpers_str_hex (buffer, n_bytes, ':'); str2 = qmi_helpers_str_hex (out, n_bytes, ':'); g_debug ("Read %s (%s) --> (%s)", type, str1, str2); g_warn_if_fail (g_str_equal (str1, str2)); g_free (str1); g_free (str2); } #else #define print_read_bytes_trace(...) #endif void qmi_utils_read_guint8_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint8 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 1); *out = (*buffer)[0]; print_read_bytes_trace ("guint8", &(*buffer)[0], out, 1); *buffer = &((*buffer)[1]); *buffer_size = (*buffer_size) - 1; } void qmi_utils_read_gint8_from_buffer (const guint8 **buffer, guint16 *buffer_size, gint8 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 1); *out = (gint8)(*buffer)[0]; print_read_bytes_trace ("gint8", &(*buffer)[0], out, 1); *buffer = &((*buffer)[1]); *buffer_size = (*buffer_size) - 1; } void qmi_utils_read_guint16_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint16 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 2); memcpy (out, &((*buffer)[0]), 2); if (endian == QMI_ENDIAN_BIG) *out = GUINT16_FROM_BE (*out); else *out = GUINT16_FROM_LE (*out); print_read_bytes_trace ("guint16", &(*buffer)[0], out, 2); *buffer = &((*buffer)[2]); *buffer_size = (*buffer_size) - 2; } void qmi_utils_read_gint16_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint16 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 2); memcpy (out, &((*buffer)[0]), 2); if (endian == QMI_ENDIAN_BIG) *out = GINT16_FROM_BE (*out); else *out = GINT16_FROM_LE (*out); print_read_bytes_trace ("gint16", &(*buffer)[0], out, 2); *buffer = &((*buffer)[2]); *buffer_size = (*buffer_size) - 2; } void qmi_utils_read_guint32_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint32 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 4); memcpy (out, &((*buffer)[0]), 4); if (endian == QMI_ENDIAN_BIG) *out = GUINT32_FROM_BE (*out); else *out = GUINT32_FROM_LE (*out); print_read_bytes_trace ("guint32", &(*buffer)[0], out, 4); *buffer = &((*buffer)[4]); *buffer_size = (*buffer_size) - 4; } void qmi_utils_read_gint32_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint32 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 4); memcpy (out, &((*buffer)[0]), 4); if (endian == QMI_ENDIAN_BIG) *out = GINT32_FROM_BE (*out); else *out = GINT32_FROM_LE (*out); print_read_bytes_trace ("gint32", &(*buffer)[0], out, 4); *buffer = &((*buffer)[4]); *buffer_size = (*buffer_size) - 4; } void qmi_utils_read_guint64_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint64 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 8); memcpy (out, &((*buffer)[0]), 8); if (endian == QMI_ENDIAN_BIG) *out = GUINT64_FROM_BE (*out); else *out = GUINT64_FROM_LE (*out); print_read_bytes_trace ("guint64", &(*buffer)[0], out, 8); *buffer = &((*buffer)[8]); *buffer_size = (*buffer_size) - 8; } void qmi_utils_read_gint64_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint64 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 8); memcpy (out, &((*buffer)[0]), 8); if (endian == QMI_ENDIAN_BIG) *out = GINT64_FROM_BE (*out); else *out = GINT64_FROM_LE (*out); print_read_bytes_trace ("gint64", &(*buffer)[0], out, 8); *buffer = &((*buffer)[8]); *buffer_size = (*buffer_size) - 8; } void qmi_utils_read_sized_guint_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint n_bytes, QmiEndian endian, guint64 *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= n_bytes); g_assert (n_bytes <= 8); *out = 0; /* In Little Endian, we copy the bytes to the beginning of the output * buffer. */ if (endian == QMI_ENDIAN_LITTLE) { memcpy (out, *buffer, n_bytes); *out = GUINT64_FROM_LE (*out); } /* In Big Endian, we copy the bytes to the end of the output buffer */ else { guint8 tmp[8] = { 0 }; memcpy (&tmp[8 - n_bytes], *buffer, n_bytes); memcpy (out, &tmp[0], 8); *out = GUINT64_FROM_BE (*out); } *buffer = &((*buffer)[n_bytes]); *buffer_size = (*buffer_size) - n_bytes; } void qmi_utils_read_gfloat_from_buffer (const guint8 **buffer, guint16 *buffer_size, gfloat *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 4); /* Yeah, do this for now */ memcpy (out, &((*buffer)[0]), 4); print_read_bytes_trace ("gfloat", &(*buffer)[0], out, 4); *buffer = &((*buffer)[4]); *buffer_size = (*buffer_size) - 4; } void qmi_utils_write_guint8_to_buffer (guint8 **buffer, guint16 *buffer_size, guint8 *in) { g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 1); memcpy (&(*buffer)[0], in, sizeof (*in)); *buffer = &((*buffer)[1]); *buffer_size = (*buffer_size) - 1; } void qmi_utils_write_gint8_to_buffer (guint8 **buffer, guint16 *buffer_size, gint8 *in) { g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 1); memcpy (&(*buffer)[0], in, sizeof (*in)); *buffer = &((*buffer)[1]); *buffer_size = (*buffer_size) - 1; } void qmi_utils_write_guint16_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint16 *in) { guint16 tmp; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 2); if (endian == QMI_ENDIAN_BIG) tmp = GUINT16_TO_BE (*in); else tmp = GUINT16_TO_LE (*in); memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); *buffer = &((*buffer)[2]); *buffer_size = (*buffer_size) - 2; } void qmi_utils_write_gint16_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint16 *in) { gint16 tmp; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 2); if (endian == QMI_ENDIAN_BIG) tmp = GINT16_TO_BE (*in); else tmp = GINT16_TO_LE (*in); memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); *buffer = &((*buffer)[2]); *buffer_size = (*buffer_size) - 2; } void qmi_utils_write_guint32_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint32 *in) { guint32 tmp; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 4); if (endian == QMI_ENDIAN_BIG) tmp = GUINT32_TO_BE (*in); else tmp = GUINT32_TO_LE (*in); memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); *buffer = &((*buffer)[4]); *buffer_size = (*buffer_size) - 4; } void qmi_utils_write_gint32_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint32 *in) { gint32 tmp; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 4); if (endian == QMI_ENDIAN_BIG) tmp = GINT32_TO_BE (*in); else tmp = GINT32_TO_LE (*in); memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); *buffer = &((*buffer)[4]); *buffer_size = (*buffer_size) - 4; } void qmi_utils_write_guint64_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint64 *in) { guint64 tmp; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 8); if (endian == QMI_ENDIAN_BIG) tmp = GUINT64_TO_BE (*in); else tmp = GUINT64_TO_LE (*in); memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); *buffer = &((*buffer)[8]); *buffer_size = (*buffer_size) - 8; } void qmi_utils_write_gint64_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint64 *in) { gint64 tmp; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= 8); if (endian == QMI_ENDIAN_BIG) tmp = GINT64_TO_BE (*in); else tmp = GINT64_TO_LE (*in); memcpy (&(*buffer)[0], &tmp, sizeof (tmp)); *buffer = &((*buffer)[8]); *buffer_size = (*buffer_size) - 8; } void qmi_utils_write_sized_guint_to_buffer (guint8 **buffer, guint16 *buffer_size, guint n_bytes, QmiEndian endian, guint64 *in) { guint64 tmp; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (*buffer_size >= n_bytes); g_assert (n_bytes <= 8); if (endian == QMI_ENDIAN_BIG) tmp = GUINT64_TO_BE (*in); else tmp = GUINT64_TO_LE (*in); /* In Little Endian, we read the bytes from the beginning of the buffer */ if (endian == QMI_ENDIAN_LITTLE) { memcpy (*buffer, &tmp, n_bytes); } /* In Big Endian, we read the bytes from the end of the buffer */ else { guint8 tmp_buffer[8]; memcpy (&tmp_buffer[0], &tmp, 8); memcpy (*buffer, &tmp_buffer[8 - n_bytes], n_bytes); } *buffer = &((*buffer)[n_bytes]); *buffer_size = (*buffer_size) - n_bytes; } void qmi_utils_read_string_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint8 length_prefix_size, guint16 max_size, gchar **out) { guint16 string_length; guint16 valid_string_length; guint8 string_length_8; guint16 string_length_16; g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (length_prefix_size == 0 || length_prefix_size == 8 || length_prefix_size == 16); switch (length_prefix_size) { case 0: /* If no length prefix given, read the whole buffer into a string */ string_length = *buffer_size; break; case 8: qmi_utils_read_guint8_from_buffer (buffer, buffer_size, &string_length_8); string_length = string_length_8; break; case 16: qmi_utils_read_guint16_from_buffer (buffer, buffer_size, QMI_ENDIAN_LITTLE, &string_length_16); string_length = string_length_16; break; default: g_assert_not_reached (); } if (max_size > 0 && string_length > max_size) valid_string_length = max_size; else valid_string_length = string_length; /* Read 'valid_string_length' bytes */ *out = g_malloc (valid_string_length + 1); memcpy (*out, *buffer, valid_string_length); (*out)[valid_string_length] = '\0'; /* And walk 'string_length' bytes */ *buffer = &((*buffer)[string_length]); *buffer_size = (*buffer_size) - string_length; } void qmi_utils_read_fixed_size_string_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint16 fixed_size, gchar *out) { g_assert (out != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (fixed_size > 0); memcpy (out, *buffer, fixed_size); *buffer = &((*buffer)[fixed_size]); *buffer_size = (*buffer_size) - fixed_size; } void qmi_utils_write_string_to_buffer (guint8 **buffer, guint16 *buffer_size, guint8 length_prefix_size, const gchar *in) { gsize len; guint8 len_8; guint16 len_16; g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (length_prefix_size == 0 || length_prefix_size == 8 || length_prefix_size == 16); len = strlen (in); g_assert ( len + (length_prefix_size/8) <= *buffer_size || (length_prefix_size==8 && ((int) G_MAXUINT8 + 1) < *buffer_size)); switch (length_prefix_size) { case 0: break; case 8: if (len > G_MAXUINT8) { g_warn_if_reached (); len = G_MAXUINT8; } len_8 = (guint8)len; qmi_utils_write_guint8_to_buffer (buffer, buffer_size, &len_8); break; case 16: /* already asserted that @len is no larger then @buffer_size */ len_16 = (guint16)len; qmi_utils_write_guint16_to_buffer (buffer, buffer_size, QMI_ENDIAN_LITTLE, &len_16); break; default: g_assert_not_reached (); } memcpy (*buffer, in, len); *buffer = &((*buffer)[len]); *buffer_size = (*buffer_size) - len; } void qmi_utils_write_fixed_size_string_to_buffer (guint8 **buffer, guint16 *buffer_size, guint16 fixed_size, const gchar *in) { g_assert (in != NULL); g_assert (buffer != NULL); g_assert (buffer_size != NULL); g_assert (fixed_size > 0); g_assert (fixed_size <= *buffer_size); memcpy (*buffer, in, fixed_size); *buffer = &((*buffer)[fixed_size]); *buffer_size = (*buffer_size) - fixed_size; } /*****************************************************************************/ gchar * qmi_message_get_printable (QmiMessage *self, const gchar *line_prefix) { return qmi_message_get_printable_full (self, NULL, line_prefix); } gboolean qmi_message_get_version_introduced (QmiMessage *self, guint *major, guint *minor) { return qmi_message_get_version_introduced_full (self, NULL, major, minor); } gboolean qmi_message_get_version_introduced_full (QmiMessage *self, QmiMessageContext *context, guint *major, guint *minor) { /* We keep the method just avoid breaking API, but this is really no longer * usable */ return FALSE; } gboolean qmi_message_tlv_read_gfloat (QmiMessage *self, gsize tlv_offset, gsize *offset, gfloat *out, GError **error) { return qmi_message_tlv_read_gfloat_endian (self, tlv_offset, offset, QMI_ENDIAN_HOST, out, error); } /*****************************************************************************/ gboolean qmi_device_close (QmiDevice *self, GError **error) { g_return_val_if_fail (QMI_IS_DEVICE (self), FALSE); qmi_device_close_async (self, 0, NULL, NULL, NULL); return TRUE; } QmiMessage * qmi_device_command_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return qmi_device_command_full_finish (self, res, error); } void qmi_device_command (QmiDevice *self, QmiMessage *message, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_device_command_full (self, message, NULL, timeout, cancellable, callback, user_data); } /*****************************************************************************/ #if defined HAVE_QMI_MESSAGE_DMS_SET_SERVICE_PROGRAMMING_CODE gboolean qmi_message_dms_set_service_programming_code_input_get_new ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar **arg_new, GError **error) { return qmi_message_dms_set_service_programming_code_input_get_new_code (self, arg_new, error); } gboolean qmi_message_dms_set_service_programming_code_input_set_new ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar *arg_new, GError **error) { return qmi_message_dms_set_service_programming_code_input_set_new_code (self, arg_new, error); } gboolean qmi_message_dms_set_service_programming_code_input_get_current ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar **arg_current, GError **error) { return qmi_message_dms_set_service_programming_code_input_get_current_code (self, arg_current, error); } gboolean qmi_message_dms_set_service_programming_code_input_set_current ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar *arg_current, GError **error) { return qmi_message_dms_set_service_programming_code_input_set_current_code (self, arg_current, error); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_SERVICE_PROGRAMMING_CODE */ /*****************************************************************************/ #define SESSION_INFORMATION_DEPRECATED_METHOD(BUNDLE_SUBSTR,METHOD_SUBSTR) \ gboolean \ qmi_message_uim_##METHOD_SUBSTR##_input_get_session_information ( \ QmiMessageUim##BUNDLE_SUBSTR##Input *self, \ QmiUimSessionType *value_session_session_type, \ const gchar **value_session_information_application_identifier, \ GError **error) \ { \ /* just ignore the output string */ \ return qmi_message_uim_##METHOD_SUBSTR##_input_get_session (self, \ value_session_session_type, \ NULL, \ error); \ } \ gboolean \ qmi_message_uim_##METHOD_SUBSTR##_input_set_session_information ( \ QmiMessageUim##BUNDLE_SUBSTR##Input *self, \ QmiUimSessionType value_session_information_session_type, \ const gchar *value_session_information_application_identifier, \ GError **error) \ { \ GArray *array; \ gboolean ret; \ \ array = g_array_append_vals (g_array_new (FALSE, FALSE, sizeof (guint8)), \ value_session_information_application_identifier, \ strlen (value_session_information_application_identifier)); \ ret = qmi_message_uim_##METHOD_SUBSTR##_input_set_session (self, \ value_session_information_session_type, \ array, \ error); \ g_array_unref (array); \ return ret; \ } #if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT SESSION_INFORMATION_DEPRECATED_METHOD (ReadTransparent, read_transparent) #endif #if defined HAVE_QMI_MESSAGE_UIM_READ_RECORD SESSION_INFORMATION_DEPRECATED_METHOD (ReadRecord, read_record) #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES SESSION_INFORMATION_DEPRECATED_METHOD (GetFileAttributes, get_file_attributes) #endif #if defined HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION SESSION_INFORMATION_DEPRECATED_METHOD (SetPinProtection, set_pin_protection) #endif #if defined HAVE_QMI_MESSAGE_UIM_VERIFY_PIN SESSION_INFORMATION_DEPRECATED_METHOD (VerifyPin, verify_pin) #endif #if defined HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN SESSION_INFORMATION_DEPRECATED_METHOD (UnblockPin, unblock_pin) #endif #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PIN SESSION_INFORMATION_DEPRECATED_METHOD (ChangePin, change_pin) #endif /*****************************************************************************/ GType qmi_dms_dell_firmware_version_type_get_type (void) { return qmi_dms_foxconn_firmware_version_type_get_type (); } const gchar * qmi_dms_dell_firmware_version_type_get_string (QmiDeprecatedDmsDellFirmwareVersionType val) { return qmi_dms_foxconn_firmware_version_type_get_string ((QmiDmsFoxconnFirmwareVersionType) val); } #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION GType qmi_message_dms_dell_get_firmware_version_output_get_type (void) { return qmi_message_dms_foxconn_get_firmware_version_output_get_type (); } gboolean qmi_message_dms_dell_get_firmware_version_output_get_version ( QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self, const gchar **value_version, GError **error) { return qmi_message_dms_foxconn_get_firmware_version_output_get_version (self, value_version, error); } gboolean qmi_message_dms_dell_get_firmware_version_output_get_result ( QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self, GError **error) { return qmi_message_dms_foxconn_get_firmware_version_output_get_result (self, error); } GType qmi_message_dms_dell_get_firmware_version_input_get_type (void) { return qmi_message_dms_foxconn_get_firmware_version_input_get_type (); } gboolean qmi_message_dms_dell_get_firmware_version_input_get_version_type ( QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self, QmiDeprecatedDmsDellFirmwareVersionType *value_version_type, GError **error) { return qmi_message_dms_foxconn_get_firmware_version_input_get_version_type (self, (QmiDmsFoxconnFirmwareVersionType *)value_version_type, error); } gboolean qmi_message_dms_dell_get_firmware_version_input_set_version_type ( QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self, QmiDeprecatedDmsDellFirmwareVersionType value_version_type, GError **error) { return qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (self, (QmiDmsFoxconnFirmwareVersionType)value_version_type, error); } QmiDeprecatedMessageDmsDellGetFirmwareVersionInput * qmi_message_dms_dell_get_firmware_version_input_ref (QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self) { return qmi_message_dms_foxconn_get_firmware_version_input_ref (self); } void qmi_message_dms_dell_get_firmware_version_input_unref (QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self) { qmi_message_dms_foxconn_get_firmware_version_input_unref (self); } QmiDeprecatedMessageDmsDellGetFirmwareVersionInput * qmi_message_dms_dell_get_firmware_version_input_new (void) { return qmi_message_dms_foxconn_get_firmware_version_input_new (); } QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput * qmi_message_dms_dell_get_firmware_version_output_ref (QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self) { return qmi_message_dms_foxconn_get_firmware_version_output_ref (self); } void qmi_message_dms_dell_get_firmware_version_output_unref (QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self) { qmi_message_dms_foxconn_get_firmware_version_output_unref (self); } void qmi_client_dms_dell_get_firmware_version ( QmiClientDms *self, QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_client_dms_foxconn_get_firmware_version (self, input, timeout, cancellable, callback, user_data); } QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput * qmi_client_dms_dell_get_firmware_version_finish ( QmiClientDms *self, GAsyncResult *res, GError **error) { return qmi_client_dms_foxconn_get_firmware_version_finish (self, res, error); } #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION */ /*****************************************************************************/ GType qmi_dms_dell_device_mode_get_type (void) { return qmi_dms_foxconn_device_mode_get_type (); } const gchar * qmi_dms_dell_device_mode_get_string (QmiDeprecatedDmsDellDeviceMode val) { return qmi_dms_foxconn_device_mode_get_string ((QmiDmsFoxconnDeviceMode) val); } #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE GType qmi_message_dms_dell_change_device_mode_input_get_type (void) { return qmi_message_dms_foxconn_change_device_mode_input_get_type (); } gboolean qmi_message_dms_dell_change_device_mode_input_get_mode ( QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self, QmiDeprecatedDmsDellDeviceMode *value_mode, GError **error) { return qmi_message_dms_foxconn_change_device_mode_input_get_mode (self, (QmiDmsFoxconnDeviceMode *) value_mode, error); } gboolean qmi_message_dms_dell_change_device_mode_input_set_mode ( QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self, QmiDeprecatedDmsDellDeviceMode value_mode, GError **error) { return qmi_message_dms_foxconn_change_device_mode_input_set_mode (self, (QmiDmsFoxconnDeviceMode) value_mode, error); } QmiDeprecatedMessageDmsDellChangeDeviceModeInput * qmi_message_dms_dell_change_device_mode_input_ref (QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self) { return qmi_message_dms_foxconn_change_device_mode_input_ref (self); } void qmi_message_dms_dell_change_device_mode_input_unref (QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self) { qmi_message_dms_foxconn_change_device_mode_input_unref (self); } QmiDeprecatedMessageDmsDellChangeDeviceModeInput * qmi_message_dms_dell_change_device_mode_input_new (void) { return qmi_message_dms_foxconn_change_device_mode_input_new (); } GType qmi_message_dms_dell_change_device_mode_output_get_type (void) { return qmi_message_dms_foxconn_change_device_mode_output_get_type (); } gboolean qmi_message_dms_dell_change_device_mode_output_get_result ( QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self, GError **error) { return qmi_message_dms_foxconn_change_device_mode_output_get_result (self, error); } QmiDeprecatedMessageDmsDellChangeDeviceModeOutput * qmi_message_dms_dell_change_device_mode_output_ref (QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self) { return qmi_message_dms_foxconn_change_device_mode_output_ref (self); } void qmi_message_dms_dell_change_device_mode_output_unref (QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self) { qmi_message_dms_foxconn_change_device_mode_output_unref (self); } void qmi_client_dms_dell_change_device_mode ( QmiClientDms *self, QmiDeprecatedMessageDmsDellChangeDeviceModeInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_client_dms_foxconn_change_device_mode (self, input, timeout, cancellable, callback, user_data); } QmiDeprecatedMessageDmsDellChangeDeviceModeOutput * qmi_client_dms_dell_change_device_mode_finish ( QmiClientDms *self, GAsyncResult *res, GError **error) { return qmi_client_dms_foxconn_change_device_mode_finish (self, res, error); } #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE */ /*****************************************************************************/ #if defined HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME gboolean qmi_message_nas_get_operator_name_output_get_operator_nitz_information ( QmiMessageNasGetOperatorNameOutput *self, QmiNasPlmnEncodingScheme *value_operator_nitz_information_name_encoding, QmiNasPlmnNameCountryInitials *value_operator_nitz_information_short_country_initials, QmiNasPlmnNameSpareBits *value_operator_nitz_information_long_name_spare_bits, QmiNasPlmnNameSpareBits *value_operator_nitz_information_short_name_spare_bits, const gchar **value_operator_nitz_information_long_name, const gchar **value_operator_nitz_information_short_name, GError **error) { GArray *long_name = NULL; GArray *short_name = NULL; if (!qmi_message_nas_get_operator_name_output_get_nitz_information ( self, value_operator_nitz_information_name_encoding, value_operator_nitz_information_short_country_initials, value_operator_nitz_information_long_name_spare_bits, value_operator_nitz_information_short_name_spare_bits, &long_name, &short_name, error)) return FALSE; if (value_operator_nitz_information_long_name) *value_operator_nitz_information_long_name = (const gchar *)long_name->data; if (value_operator_nitz_information_short_name) *value_operator_nitz_information_short_name = (const gchar *)short_name->data; return TRUE; } #endif /* HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME */ #if defined HAVE_QMI_INDICATION_NAS_OPERATOR_NAME gboolean qmi_indication_nas_operator_name_output_get_operator_nitz_information ( QmiIndicationNasOperatorNameOutput *self, QmiNasPlmnEncodingScheme *value_operator_nitz_information_name_encoding, QmiNasPlmnNameCountryInitials *value_operator_nitz_information_short_country_initials, QmiNasPlmnNameSpareBits *value_operator_nitz_information_long_name_spare_bits, QmiNasPlmnNameSpareBits *value_operator_nitz_information_short_name_spare_bits, const gchar **value_operator_nitz_information_long_name, const gchar **value_operator_nitz_information_short_name, GError **error) { GArray *long_name = NULL; GArray *short_name = NULL; if (!qmi_indication_nas_operator_name_output_get_nitz_information ( self, value_operator_nitz_information_name_encoding, value_operator_nitz_information_short_country_initials, value_operator_nitz_information_long_name_spare_bits, value_operator_nitz_information_short_name_spare_bits, &long_name, &short_name, error)) return FALSE; if (value_operator_nitz_information_long_name) *value_operator_nitz_information_long_name = (const gchar *)long_name->data; if (value_operator_nitz_information_short_name) *value_operator_nitz_information_short_name = (const gchar *)short_name->data; return TRUE; } #endif /* HAVE_QMI_INDICATION_NAS_OPERATOR_NAME */ /*****************************************************************************/ #if defined HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK gboolean qmi_message_nas_get_home_network_output_get_home_network_3gpp2 ( QmiMessageNasGetHomeNetworkOutput *self, guint16 *value_home_network_3gpp2_mcc, guint16 *value_home_network_3gpp2_mnc, QmiNasNetworkDescriptionDisplay *value_home_network_3gpp2_display_description, QmiNasNetworkDescriptionEncoding *value_home_network_3gpp2_description_encoding, const gchar **value_home_network_3gpp2_description, GError **error) { GArray *description = NULL; if (!qmi_message_nas_get_home_network_output_get_home_network_3gpp2_ext ( self, value_home_network_3gpp2_mcc, value_home_network_3gpp2_mnc, value_home_network_3gpp2_display_description, value_home_network_3gpp2_description_encoding, &description, error)) return FALSE; if (value_home_network_3gpp2_description) *value_home_network_3gpp2_description = (const gchar *)description->data; return TRUE; } #endif /* HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK */ #if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO typedef struct { GArray *geran_info_cell; } MessageNasGetCellLocationInfoOutputCompatContext; static void message_nas_get_cell_location_info_output_compat_context_free (MessageNasGetCellLocationInfoOutputCompatContext *ctx) { if (ctx->geran_info_cell) g_array_unref (ctx->geran_info_cell); g_slice_free (MessageNasGetCellLocationInfoOutputCompatContext, ctx); } static MessageNasGetCellLocationInfoOutputCompatContext * message_nas_get_cell_location_info_output_get_compat_context (QmiMessageNasGetCellLocationInfoOutput *self) { MessageNasGetCellLocationInfoOutputCompatContext *ctx; ctx = qmi_message_nas_get_cell_location_info_output_get_compat_context (self); if (!ctx) { ctx = g_slice_new0 (MessageNasGetCellLocationInfoOutputCompatContext); qmi_message_nas_get_cell_location_info_output_set_compat_context (self, ctx, (GDestroyNotify)message_nas_get_cell_location_info_output_compat_context_free); } return ctx; } /* This PLMN string is returned because it's a 3-char long valid UTF-8. */ static const gchar invalid_plmn_str[] = " "; gboolean qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info ( QmiMessageNasGetCellLocationInfoOutput *self, gboolean *value_intrafrequency_lte_info_ue_in_idle, const gchar **value_intrafrequency_lte_info_plmn, guint16 *value_intrafrequency_lte_info_tracking_area_code, guint32 *value_intrafrequency_lte_info_global_cell_id, guint16 *value_intrafrequency_lte_info_eutra_absolute_rf_channel_number, guint16 *value_intrafrequency_lte_info_serving_cell_id, guint8 *value_intrafrequency_lte_info_cell_reselection_priority, guint8 *value_intrafrequency_lte_info_s_non_intra_search_threshold, guint8 *value_intrafrequency_lte_info_serving_cell_low_threshold, guint8 *value_intrafrequency_lte_info_s_intra_search_threshold, GArray **value_intrafrequency_lte_info_cell, GError **error) { if (!qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info_v2 ( self, value_intrafrequency_lte_info_ue_in_idle, NULL, value_intrafrequency_lte_info_tracking_area_code, value_intrafrequency_lte_info_global_cell_id, value_intrafrequency_lte_info_eutra_absolute_rf_channel_number, value_intrafrequency_lte_info_serving_cell_id, value_intrafrequency_lte_info_cell_reselection_priority, value_intrafrequency_lte_info_s_non_intra_search_threshold, value_intrafrequency_lte_info_serving_cell_low_threshold, value_intrafrequency_lte_info_s_intra_search_threshold, value_intrafrequency_lte_info_cell, error)) return FALSE; if (value_intrafrequency_lte_info_plmn) *value_intrafrequency_lte_info_plmn = invalid_plmn_str; return TRUE; } gboolean qmi_message_nas_get_cell_location_info_output_get_umts_info ( QmiMessageNasGetCellLocationInfoOutput *self, guint16 *value_umts_info_cell_id, const gchar **value_umts_info_plmn, guint16 *value_umts_info_lac, guint16 *value_umts_info_utra_absolute_rf_channel_number, guint16 *value_umts_info_primary_scrambling_code, gint16 *value_umts_info_rscp, gint16 *value_umts_info_ecio, GArray **value_umts_info_cell, GArray **value_umts_info_neighboring_geran, GError **error) { if (!qmi_message_nas_get_cell_location_info_output_get_umts_info_v2 ( self, value_umts_info_cell_id, NULL, value_umts_info_lac, value_umts_info_utra_absolute_rf_channel_number, value_umts_info_primary_scrambling_code, value_umts_info_rscp, value_umts_info_ecio, value_umts_info_cell, value_umts_info_neighboring_geran, error)) return FALSE; if (value_umts_info_plmn) *value_umts_info_plmn = invalid_plmn_str; return TRUE; } gboolean qmi_message_nas_get_cell_location_info_output_get_geran_info ( QmiMessageNasGetCellLocationInfoOutput *self, guint32 *value_geran_info_cell_id, const gchar **value_geran_info_plmn, guint16 *value_geran_info_lac, guint16 *value_geran_info_geran_absolute_rf_channel_number, guint8 *value_geran_info_base_station_identity_code, guint32 *value_geran_info_timing_advance, guint16 *value_geran_info_rx_level, GArray **value_geran_info_cell, GError **error) { GArray *geran_info_v2_cell = NULL; if (!qmi_message_nas_get_cell_location_info_output_get_geran_info_v2 ( self, value_geran_info_cell_id, NULL, value_geran_info_lac, value_geran_info_geran_absolute_rf_channel_number, value_geran_info_base_station_identity_code, value_geran_info_timing_advance, value_geran_info_rx_level, &geran_info_v2_cell, error)) return FALSE; if (value_geran_info_plmn) *value_geran_info_plmn = invalid_plmn_str; if (value_geran_info_cell) { MessageNasGetCellLocationInfoOutputCompatContext *ctx; /* We have an array of QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement elements, * we need to return an array of QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement elements * instead. */ ctx = message_nas_get_cell_location_info_output_get_compat_context (self); if (!ctx->geran_info_cell) { guint i; ctx->geran_info_cell = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement), geran_info_v2_cell->len); for (i = 0; i < geran_info_v2_cell->len; i++) { QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement *elemv2; QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement elem; elemv2 = &g_array_index (geran_info_v2_cell, QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement, i); elem.cell_id = elemv2->cell_id; elem.plmn = (gchar *)invalid_plmn_str; elem.lac = elemv2->lac; elem.geran_absolute_rf_channel_number = elemv2->geran_absolute_rf_channel_number; elem.base_station_identity_code = elemv2->base_station_identity_code; elem.rx_level = elemv2->rx_level; g_array_append_val (ctx->geran_info_cell, elem); } } *value_geran_info_cell = ctx->geran_info_cell; } return TRUE; } #endif /* HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO */ #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER GType qmi_message_wds_get_default_profile_num_input_get_type (void) { return qmi_message_wds_get_default_profile_number_input_get_type (); } gboolean qmi_message_wds_get_default_profile_num_input_get_profile_type ( QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self, QmiWdsProfileType *value_profile_type_profile_type, QmiWdsProfileFamily *value_profile_type_profile_family, GError **error) { return qmi_message_wds_get_default_profile_number_input_get_profile_type (self, value_profile_type_profile_type, value_profile_type_profile_family, error); } gboolean qmi_message_wds_get_default_profile_num_input_set_profile_type ( QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self, QmiWdsProfileType value_profile_type_profile_type, QmiWdsProfileFamily value_profile_type_profile_family, GError **error) { return qmi_message_wds_get_default_profile_number_input_set_profile_type (self, value_profile_type_profile_type, value_profile_type_profile_family, error); } QmiDeprecatedMessageWdsGetDefaultProfileNumInput * qmi_message_wds_get_default_profile_num_input_ref (QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self) { return qmi_message_wds_get_default_profile_number_input_ref (self); } void qmi_message_wds_get_default_profile_num_input_unref (QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self) { qmi_message_wds_get_default_profile_number_input_unref (self); } QmiDeprecatedMessageWdsGetDefaultProfileNumInput * qmi_message_wds_get_default_profile_num_input_new (void) { return qmi_message_wds_get_default_profile_number_input_new (); } GType qmi_message_wds_get_default_profile_num_output_get_type (void) { return qmi_message_wds_get_default_profile_number_output_get_type (); } gboolean qmi_message_wds_get_default_profile_num_output_get_result ( QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, GError **error) { return qmi_message_wds_get_default_profile_number_output_get_result (self, error); } gboolean qmi_message_wds_get_default_profile_num_output_get_default_profile_number ( QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, guint8 *value_default_profile_number, GError **error) { return qmi_message_wds_get_default_profile_number_output_get_index (self, value_default_profile_number, error); } gboolean qmi_message_wds_get_default_profile_num_output_get_extended_error_code ( QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, QmiWdsDsProfileError *value_extended_error_code, GError **error) { return qmi_message_wds_get_default_profile_number_output_get_extended_error_code (self, value_extended_error_code, error); } QmiDeprecatedMessageWdsGetDefaultProfileNumOutput * qmi_message_wds_get_default_profile_num_output_ref (QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self) { return qmi_message_wds_get_default_profile_number_output_ref (self); } void qmi_message_wds_get_default_profile_num_output_unref (QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self) { qmi_message_wds_get_default_profile_number_output_unref (self); } void qmi_client_wds_get_default_profile_num ( QmiClientWds *self, QmiMessageWdsGetDefaultProfileNumberInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_client_wds_get_default_profile_number ( self, input, timeout, cancellable, callback, user_data); } QmiMessageWdsGetDefaultProfileNumberOutput * qmi_client_wds_get_default_profile_num_finish ( QmiClientWds *self, GAsyncResult *res, GError **error) { return qmi_client_wds_get_default_profile_number_finish (self, res, error); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER */ #if defined HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER GType qmi_message_wds_set_default_profile_num_output_get_type (void) { return qmi_message_wds_set_default_profile_number_output_get_type (); } gboolean qmi_message_wds_set_default_profile_num_input_get_profile_identifier ( QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self, QmiWdsProfileType *value_profile_identifier_profile_type, QmiWdsProfileFamily *value_profile_identifier_profile_family, guint8 *value_profile_identifier_profile_index, GError **error) { return qmi_message_wds_set_default_profile_number_input_get_profile_identifier (self, value_profile_identifier_profile_type, value_profile_identifier_profile_family, value_profile_identifier_profile_index, error); } gboolean qmi_message_wds_set_default_profile_num_input_set_profile_identifier ( QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self, QmiWdsProfileType value_profile_identifier_profile_type, QmiWdsProfileFamily value_profile_identifier_profile_family, guint8 value_profile_identifier_profile_index, GError **error) { return qmi_message_wds_set_default_profile_number_input_set_profile_identifier (self, value_profile_identifier_profile_type, value_profile_identifier_profile_family, value_profile_identifier_profile_index, error); } QmiDeprecatedMessageWdsSetDefaultProfileNumInput * qmi_message_wds_set_default_profile_num_input_ref (QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self) { return qmi_message_wds_set_default_profile_number_input_ref (self); } void qmi_message_wds_set_default_profile_num_input_unref (QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self) { qmi_message_wds_set_default_profile_number_input_unref (self); } QmiDeprecatedMessageWdsSetDefaultProfileNumInput * qmi_message_wds_set_default_profile_num_input_new (void) { return qmi_message_wds_set_default_profile_number_input_new (); } GType qmi_message_wds_set_default_profile_num_input_get_type (void) { return qmi_message_wds_set_default_profile_number_input_get_type (); } gboolean qmi_message_wds_set_default_profile_num_output_get_result ( QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self, GError **error) { return qmi_message_wds_set_default_profile_number_output_get_result (self, error); } gboolean qmi_message_wds_set_default_profile_num_output_get_extended_error_code ( QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self, QmiWdsDsProfileError *value_extended_error_code, GError **error) { return qmi_message_wds_set_default_profile_number_output_get_extended_error_code (self, value_extended_error_code, error); } QmiDeprecatedMessageWdsSetDefaultProfileNumOutput * qmi_message_wds_set_default_profile_num_output_ref (QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self) { return qmi_message_wds_set_default_profile_number_output_ref (self); } void qmi_message_wds_set_default_profile_num_output_unref (QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self) { qmi_message_wds_set_default_profile_number_output_unref (self); } void qmi_client_wds_set_default_profile_num ( QmiClientWds *self, QmiMessageWdsSetDefaultProfileNumberInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_client_wds_set_default_profile_number ( self, input, timeout, cancellable, callback, user_data); } QmiMessageWdsSetDefaultProfileNumberOutput * qmi_client_wds_set_default_profile_num_finish ( QmiClientWds *self, GAsyncResult *res, GError **error) { return qmi_client_wds_set_default_profile_number_finish (self, res, error); } #endif /* HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO gboolean qmi_message_nas_get_system_info_output_get_gsm_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_gsm_system_info_domain_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_domain, gboolean *value_gsm_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_service_capability, gboolean *value_gsm_system_info_roaming_status_valid, QmiNasRoamingStatus *value_gsm_system_info_roaming_status, gboolean *value_gsm_system_info_forbidden_valid, gboolean *value_gsm_system_info_forbidden, gboolean *value_gsm_system_info_lac_valid, guint16 *value_gsm_system_info_lac, gboolean *value_gsm_system_info_cid_valid, guint32 *value_gsm_system_info_cid, gboolean *value_gsm_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_registration_reject_domain, guint8 *value_gsm_system_info_registration_reject_cause, gboolean *value_gsm_system_info_network_id_valid, const gchar **value_gsm_system_info_mcc, const gchar **value_gsm_system_info_mnc, gboolean *value_gsm_system_info_egprs_support_valid, gboolean *value_gsm_system_info_egprs_support, gboolean *value_gsm_system_info_dtm_support_valid, gboolean *value_gsm_system_info_dtm_support, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_message_nas_get_system_info_output_get_gsm_system_info_v2 ( self, value_gsm_system_info_domain_valid, value_gsm_system_info_domain, value_gsm_system_info_service_capability_valid, value_gsm_system_info_service_capability, value_gsm_system_info_roaming_status_valid, value_gsm_system_info_roaming_status, value_gsm_system_info_forbidden_valid, value_gsm_system_info_forbidden, value_gsm_system_info_lac_valid, value_gsm_system_info_lac, value_gsm_system_info_cid_valid, value_gsm_system_info_cid, value_gsm_system_info_registration_reject_info_valid, value_gsm_system_info_registration_reject_domain, &reject_cause, value_gsm_system_info_network_id_valid, value_gsm_system_info_mcc, value_gsm_system_info_mnc, value_gsm_system_info_egprs_support_valid, value_gsm_system_info_egprs_support, value_gsm_system_info_dtm_support_valid, value_gsm_system_info_dtm_support, error)) return FALSE; if (value_gsm_system_info_registration_reject_cause) *value_gsm_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } gboolean qmi_message_nas_get_system_info_output_get_wcdma_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_wcdma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_domain, gboolean *value_wcdma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_service_capability, gboolean *value_wcdma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_wcdma_system_info_roaming_status, gboolean *value_wcdma_system_info_forbidden_valid, gboolean *value_wcdma_system_info_forbidden, gboolean *value_wcdma_system_info_lac_valid, guint16 *value_wcdma_system_info_lac, gboolean *value_wcdma_system_info_cid_valid, guint32 *value_wcdma_system_info_cid, gboolean *value_wcdma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_registration_reject_domain, guint8 *value_wcdma_system_info_registration_reject_cause, gboolean *value_wcdma_system_info_network_id_valid, const gchar **value_wcdma_system_info_mcc, const gchar **value_wcdma_system_info_mnc, gboolean *value_wcdma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_call_status, gboolean *value_wcdma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_service, gboolean *value_wcdma_system_info_primary_scrambling_code_valid, guint16 *value_wcdma_system_info_primary_scrambling_code, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2 ( self, value_wcdma_system_info_domain_valid, value_wcdma_system_info_domain, value_wcdma_system_info_service_capability_valid, value_wcdma_system_info_service_capability, value_wcdma_system_info_roaming_status_valid, value_wcdma_system_info_roaming_status, value_wcdma_system_info_forbidden_valid, value_wcdma_system_info_forbidden, value_wcdma_system_info_lac_valid, value_wcdma_system_info_lac, value_wcdma_system_info_cid_valid, value_wcdma_system_info_cid, value_wcdma_system_info_registration_reject_info_valid, value_wcdma_system_info_registration_reject_domain, &reject_cause, value_wcdma_system_info_network_id_valid, value_wcdma_system_info_mcc, value_wcdma_system_info_mnc, value_wcdma_system_info_hs_call_status_valid, value_wcdma_system_info_hs_call_status, value_wcdma_system_info_hs_service_valid, value_wcdma_system_info_hs_service, value_wcdma_system_info_primary_scrambling_code_valid, value_wcdma_system_info_primary_scrambling_code, error)) return FALSE; if (value_wcdma_system_info_registration_reject_cause) *value_wcdma_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } gboolean qmi_message_nas_get_system_info_output_get_lte_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_lte_system_info_domain_valid, QmiNasNetworkServiceDomain *value_lte_system_info_domain, gboolean *value_lte_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_lte_system_info_service_capability, gboolean *value_lte_system_info_roaming_status_valid, QmiNasRoamingStatus *value_lte_system_info_roaming_status, gboolean *value_lte_system_info_forbidden_valid, gboolean *value_lte_system_info_forbidden, gboolean *value_lte_system_info_lac_valid, guint16 *value_lte_system_info_lac, gboolean *value_lte_system_info_cid_valid, guint32 *value_lte_system_info_cid, gboolean *value_lte_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_lte_system_info_registration_reject_domain, guint8 *value_lte_system_info_registration_reject_cause, gboolean *value_lte_system_info_network_id_valid, const gchar **value_lte_system_info_mcc, const gchar **value_lte_system_info_mnc, gboolean *value_lte_system_info_tac_valid, guint16 *value_lte_system_info_tac, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_message_nas_get_system_info_output_get_lte_system_info_v2 ( self, value_lte_system_info_domain_valid, value_lte_system_info_domain, value_lte_system_info_service_capability_valid, value_lte_system_info_service_capability, value_lte_system_info_roaming_status_valid, value_lte_system_info_roaming_status, value_lte_system_info_forbidden_valid, value_lte_system_info_forbidden, value_lte_system_info_lac_valid, value_lte_system_info_lac, value_lte_system_info_cid_valid, value_lte_system_info_cid, value_lte_system_info_registration_reject_info_valid, value_lte_system_info_registration_reject_domain, &reject_cause, value_lte_system_info_network_id_valid, value_lte_system_info_mcc, value_lte_system_info_mnc, value_lte_system_info_tac_valid, value_lte_system_info_tac, error)) return FALSE; if (value_lte_system_info_registration_reject_cause) *value_lte_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } gboolean qmi_message_nas_get_system_info_output_get_td_scdma_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_td_scdma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_domain, gboolean *value_td_scdma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_service_capability, gboolean *value_td_scdma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_td_scdma_system_info_roaming_status, gboolean *value_td_scdma_system_info_forbidden_valid, gboolean *value_td_scdma_system_info_forbidden, gboolean *value_td_scdma_system_info_lac_valid, guint16 *value_td_scdma_system_info_lac, gboolean *value_td_scdma_system_info_cid_valid, guint32 *value_td_scdma_system_info_cid, gboolean *value_td_scdma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_registration_reject_domain, guint8 *value_td_scdma_system_info_registration_reject_cause, gboolean *value_td_scdma_system_info_network_id_valid, const gchar **value_td_scdma_system_info_mcc, const gchar **value_td_scdma_system_info_mnc, gboolean *value_td_scdma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_td_scdma_system_info_hs_call_status, gboolean *value_td_scdma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_td_scdma_system_info_hs_service, gboolean *value_td_scdma_system_info_cell_parameter_id_valid, guint16 *value_td_scdma_system_info_cell_parameter_id, gboolean *value_td_scdma_system_info_cell_broadcast_support_valid, QmiNasCellBroadcastCapability *value_td_scdma_system_info_cell_broadcast_support, gboolean *value_td_scdma_system_info_cs_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scdma_system_info_cs_call_barring_status, gboolean *value_td_scdma_system_info_ps_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scdma_system_info_ps_call_barring_status, gboolean *value_td_scdma_system_info_cipher_domain_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_cipher_domain, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_message_nas_get_system_info_output_get_td_scdma_system_info_v2 ( self, value_td_scdma_system_info_domain_valid, value_td_scdma_system_info_domain, value_td_scdma_system_info_service_capability_valid, value_td_scdma_system_info_service_capability, value_td_scdma_system_info_roaming_status_valid, value_td_scdma_system_info_roaming_status, value_td_scdma_system_info_forbidden_valid, value_td_scdma_system_info_forbidden, value_td_scdma_system_info_lac_valid, value_td_scdma_system_info_lac, value_td_scdma_system_info_cid_valid, value_td_scdma_system_info_cid, value_td_scdma_system_info_registration_reject_info_valid, value_td_scdma_system_info_registration_reject_domain, &reject_cause, value_td_scdma_system_info_network_id_valid, value_td_scdma_system_info_mcc, value_td_scdma_system_info_mnc, value_td_scdma_system_info_hs_call_status_valid, value_td_scdma_system_info_hs_call_status, value_td_scdma_system_info_hs_service_valid, value_td_scdma_system_info_hs_service, value_td_scdma_system_info_cell_parameter_id_valid, value_td_scdma_system_info_cell_parameter_id, value_td_scdma_system_info_cell_broadcast_support_valid, value_td_scdma_system_info_cell_broadcast_support, value_td_scdma_system_info_cs_call_barring_status_valid, value_td_scdma_system_info_cs_call_barring_status, value_td_scdma_system_info_ps_call_barring_status_valid, value_td_scdma_system_info_ps_call_barring_status, value_td_scdma_system_info_cipher_domain_valid, value_td_scdma_system_info_cipher_domain, error)) return FALSE; if (value_td_scdma_system_info_registration_reject_cause) *value_td_scdma_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO */ #if defined HAVE_QMI_INDICATION_NAS_SYSTEM_INFO gboolean qmi_indication_nas_system_info_output_get_gsm_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_gsm_system_info_domain_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_domain, gboolean *value_gsm_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_service_capability, gboolean *value_gsm_system_info_roaming_status_valid, QmiNasRoamingStatus *value_gsm_system_info_roaming_status, gboolean *value_gsm_system_info_forbidden_valid, gboolean *value_gsm_system_info_forbidden, gboolean *value_gsm_system_info_lac_valid, guint16 *value_gsm_system_info_lac, gboolean *value_gsm_system_info_cid_valid, guint32 *value_gsm_system_info_cid, gboolean *value_gsm_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_registration_reject_domain, guint8 *value_gsm_system_info_registration_reject_cause, gboolean *value_gsm_system_info_network_id_valid, const gchar **value_gsm_system_info_mcc, const gchar **value_gsm_system_info_mnc, gboolean *value_gsm_system_info_egprs_support_valid, gboolean *value_gsm_system_info_egprs_support, gboolean *value_gsm_system_info_dtm_support_valid, gboolean *value_gsm_system_info_dtm_support, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_indication_nas_system_info_output_get_gsm_system_info_v2 ( self, value_gsm_system_info_domain_valid, value_gsm_system_info_domain, value_gsm_system_info_service_capability_valid, value_gsm_system_info_service_capability, value_gsm_system_info_roaming_status_valid, value_gsm_system_info_roaming_status, value_gsm_system_info_forbidden_valid, value_gsm_system_info_forbidden, value_gsm_system_info_lac_valid, value_gsm_system_info_lac, value_gsm_system_info_cid_valid, value_gsm_system_info_cid, value_gsm_system_info_registration_reject_info_valid, value_gsm_system_info_registration_reject_domain, &reject_cause, value_gsm_system_info_network_id_valid, value_gsm_system_info_mcc, value_gsm_system_info_mnc, value_gsm_system_info_egprs_support_valid, value_gsm_system_info_egprs_support, value_gsm_system_info_dtm_support_valid, value_gsm_system_info_dtm_support, error)) return FALSE; if (value_gsm_system_info_registration_reject_cause) *value_gsm_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } gboolean qmi_indication_nas_system_info_output_get_wcdma_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_wcdma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_domain, gboolean *value_wcdma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_service_capability, gboolean *value_wcdma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_wcdma_system_info_roaming_status, gboolean *value_wcdma_system_info_forbidden_valid, gboolean *value_wcdma_system_info_forbidden, gboolean *value_wcdma_system_info_lac_valid, guint16 *value_wcdma_system_info_lac, gboolean *value_wcdma_system_info_cid_valid, guint32 *value_wcdma_system_info_cid, gboolean *value_wcdma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_registration_reject_domain, guint8 *value_wcdma_system_info_registration_reject_cause, gboolean *value_wcdma_system_info_network_id_valid, const gchar **value_wcdma_system_info_mcc, const gchar **value_wcdma_system_info_mnc, gboolean *value_wcdma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_call_status, gboolean *value_wcdma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_service, gboolean *value_wcdma_system_info_primary_scrambling_code_valid, guint16 *value_wcdma_system_info_primary_scrambling_code, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_indication_nas_system_info_output_get_wcdma_system_info_v2 ( self, value_wcdma_system_info_domain_valid, value_wcdma_system_info_domain, value_wcdma_system_info_service_capability_valid, value_wcdma_system_info_service_capability, value_wcdma_system_info_roaming_status_valid, value_wcdma_system_info_roaming_status, value_wcdma_system_info_forbidden_valid, value_wcdma_system_info_forbidden, value_wcdma_system_info_lac_valid, value_wcdma_system_info_lac, value_wcdma_system_info_cid_valid, value_wcdma_system_info_cid, value_wcdma_system_info_registration_reject_info_valid, value_wcdma_system_info_registration_reject_domain, &reject_cause, value_wcdma_system_info_network_id_valid, value_wcdma_system_info_mcc, value_wcdma_system_info_mnc, value_wcdma_system_info_hs_call_status_valid, value_wcdma_system_info_hs_call_status, value_wcdma_system_info_hs_service_valid, value_wcdma_system_info_hs_service, value_wcdma_system_info_primary_scrambling_code_valid, value_wcdma_system_info_primary_scrambling_code, error)) return FALSE; if (value_wcdma_system_info_registration_reject_cause) *value_wcdma_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } gboolean qmi_indication_nas_system_info_output_get_lte_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_lte_system_info_domain_valid, QmiNasNetworkServiceDomain *value_lte_system_info_domain, gboolean *value_lte_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_lte_system_info_service_capability, gboolean *value_lte_system_info_roaming_status_valid, QmiNasRoamingStatus *value_lte_system_info_roaming_status, gboolean *value_lte_system_info_forbidden_valid, gboolean *value_lte_system_info_forbidden, gboolean *value_lte_system_info_lac_valid, guint16 *value_lte_system_info_lac, gboolean *value_lte_system_info_cid_valid, guint32 *value_lte_system_info_cid, gboolean *value_lte_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_lte_system_info_registration_reject_domain, guint8 *value_lte_system_info_registration_reject_cause, gboolean *value_lte_system_info_network_id_valid, const gchar **value_lte_system_info_mcc, const gchar **value_lte_system_info_mnc, gboolean *value_lte_system_info_tac_valid, guint16 *value_lte_system_info_tac, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_indication_nas_system_info_output_get_lte_system_info_v2 ( self, value_lte_system_info_domain_valid, value_lte_system_info_domain, value_lte_system_info_service_capability_valid, value_lte_system_info_service_capability, value_lte_system_info_roaming_status_valid, value_lte_system_info_roaming_status, value_lte_system_info_forbidden_valid, value_lte_system_info_forbidden, value_lte_system_info_lac_valid, value_lte_system_info_lac, value_lte_system_info_cid_valid, value_lte_system_info_cid, value_lte_system_info_registration_reject_info_valid, value_lte_system_info_registration_reject_domain, &reject_cause, value_lte_system_info_network_id_valid, value_lte_system_info_mcc, value_lte_system_info_mnc, value_lte_system_info_tac_valid, value_lte_system_info_tac, error)) return FALSE; if (value_lte_system_info_registration_reject_cause) *value_lte_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } gboolean qmi_indication_nas_system_info_output_get_td_scma_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_td_scma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_domain, gboolean *value_td_scma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_service_capability, gboolean *value_td_scma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_td_scma_system_info_roaming_status, gboolean *value_td_scma_system_info_forbidden_valid, gboolean *value_td_scma_system_info_forbidden, gboolean *value_td_scma_system_info_lac_valid, guint16 *value_td_scma_system_info_lac, gboolean *value_td_scma_system_info_cid_valid, guint32 *value_td_scma_system_info_cid, gboolean *value_td_scma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_registration_reject_domain, guint8 *value_td_scma_system_info_registration_reject_cause, gboolean *value_td_scma_system_info_network_id_valid, const gchar **value_td_scma_system_info_mcc, const gchar **value_td_scma_system_info_mnc, gboolean *value_td_scma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_td_scma_system_info_hs_call_status, gboolean *value_td_scma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_td_scma_system_info_hs_service, gboolean *value_td_scma_system_info_cell_parameter_id_valid, guint16 *value_td_scma_system_info_cell_parameter_id, gboolean *value_td_scma_system_info_cell_broadcast_support_valid, QmiNasCellBroadcastCapability *value_td_scma_system_info_cell_broadcast_support, gboolean *value_td_scma_system_info_cs_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scma_system_info_cs_call_barring_status, gboolean *value_td_scma_system_info_ps_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scma_system_info_ps_call_barring_status, gboolean *value_td_scma_system_info_cipher_domain_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_cipher_domain, GError **error) { QmiNasRejectCause reject_cause = QMI_NAS_REJECT_CAUSE_NONE; if (!qmi_indication_nas_system_info_output_get_td_scma_system_info_v2 ( self, value_td_scma_system_info_domain_valid, value_td_scma_system_info_domain, value_td_scma_system_info_service_capability_valid, value_td_scma_system_info_service_capability, value_td_scma_system_info_roaming_status_valid, value_td_scma_system_info_roaming_status, value_td_scma_system_info_forbidden_valid, value_td_scma_system_info_forbidden, value_td_scma_system_info_lac_valid, value_td_scma_system_info_lac, value_td_scma_system_info_cid_valid, value_td_scma_system_info_cid, value_td_scma_system_info_registration_reject_info_valid, value_td_scma_system_info_registration_reject_domain, &reject_cause, value_td_scma_system_info_network_id_valid, value_td_scma_system_info_mcc, value_td_scma_system_info_mnc, value_td_scma_system_info_hs_call_status_valid, value_td_scma_system_info_hs_call_status, value_td_scma_system_info_hs_service_valid, value_td_scma_system_info_hs_service, value_td_scma_system_info_cell_parameter_id_valid, value_td_scma_system_info_cell_parameter_id, value_td_scma_system_info_cell_broadcast_support_valid, value_td_scma_system_info_cell_broadcast_support, value_td_scma_system_info_cs_call_barring_status_valid, value_td_scma_system_info_cs_call_barring_status, value_td_scma_system_info_ps_call_barring_status_valid, value_td_scma_system_info_ps_call_barring_status, value_td_scma_system_info_cipher_domain_valid, value_td_scma_system_info_cipher_domain, error)) return FALSE; if (value_td_scma_system_info_registration_reject_cause) *value_td_scma_system_info_registration_reject_cause = (guint8) reject_cause; return TRUE; } #endif /* HAVE_QMI_INDICATION_NAS_SYSTEM_INFO */ #if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS gboolean qmi_message_nas_swi_get_status_output_get_common_info ( QmiMessageNasSwiGetStatusOutput *self, guint8 *value_common_info_temperature, QmiNasSwiModemMode *value_common_info_modem_mode, QmiNasSwiSystemMode *value_common_info_system_mode, QmiNasSwiImsRegState *value_common_info_ims_registration_state, QmiNasSwiPsState *value_common_info_packet_service_state, GError **error) { gint8 signed_temperature; if (!qmi_message_nas_swi_get_status_output_get_common_info_v2 ( self, &signed_temperature, value_common_info_modem_mode, value_common_info_system_mode, value_common_info_ims_registration_state, value_common_info_packet_service_state, error)) return FALSE; if (value_common_info_temperature) memcpy (value_common_info_temperature, &signed_temperature, sizeof (guint8)); return TRUE; } #endif /* HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS */ #if defined HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE gboolean qmi_message_nas_set_system_selection_preference_input_get_mnc_pds_digit_include_status ( QmiMessageNasSetSystemSelectionPreferenceInput *self, gboolean *value_mnc_pds_digit_include_status, GError **error) { return qmi_message_nas_set_system_selection_preference_input_get_mnc_pcs_digit_include_status (self, value_mnc_pds_digit_include_status, error); } #endif /* HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE gboolean qmi_message_pdc_config_change_input_get_type_with_id ( QmiMessagePdcConfigChangeInput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error) { QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; GArray *id = NULL; if (!qmi_message_pdc_config_change_input_get_type_with_id_v2 (self, &config_type, &id, error)) return FALSE; if (value_type_with_id) { value_type_with_id->config_type = config_type; value_type_with_id->id = id; } return TRUE; } gboolean qmi_message_pdc_config_change_input_set_type_with_id ( QmiMessagePdcConfigChangeInput *self, const QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error) { return qmi_message_pdc_config_change_input_set_type_with_id_v2 (self, value_type_with_id->config_type, value_type_with_id->id, error); } gboolean qmi_message_pdc_config_change_output_get_type_with_id ( QmiMessagePdcConfigChangeOutput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error) { QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; GArray *id = NULL; if (!qmi_message_pdc_config_change_output_get_type_with_id_v2 (self, &config_type, &id, error)) return FALSE; if (value_type_with_id) { value_type_with_id->config_type = config_type; value_type_with_id->id = id; } return TRUE; } #endif /* HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE */ #if defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG gboolean qmi_message_pdc_set_selected_config_input_get_type_with_id ( QmiMessagePdcSetSelectedConfigInput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error) { QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; GArray *id = NULL; if (!qmi_message_pdc_set_selected_config_input_get_type_with_id_v2 (self, &config_type, &id, error)) return FALSE; if (value_type_with_id) { value_type_with_id->config_type = config_type; value_type_with_id->id = id; } return TRUE; } gboolean qmi_message_pdc_set_selected_config_input_set_type_with_id ( QmiMessagePdcSetSelectedConfigInput *self, const QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error) { return qmi_message_pdc_set_selected_config_input_set_type_with_id_v2 (self, value_type_with_id->config_type, value_type_with_id->id, error); } #endif /* HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG */ #if defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO gboolean qmi_message_pdc_get_config_info_input_get_type_with_id ( QmiMessagePdcGetConfigInfoInput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error) { QmiPdcConfigurationType config_type = QMI_PDC_CONFIGURATION_TYPE_PLATFORM; GArray *id = NULL; if (!qmi_message_pdc_get_config_info_input_get_type_with_id_v2 (self, &config_type, &id, error)) return FALSE; if (value_type_with_id) { value_type_with_id->config_type = config_type; value_type_with_id->id = id; } return TRUE; } gboolean qmi_message_pdc_get_config_info_input_set_type_with_id ( QmiMessagePdcGetConfigInfoInput *self, const QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error) { return qmi_message_pdc_get_config_info_input_set_type_with_id_v2 (self, value_type_with_id->config_type, value_type_with_id->id, error); } #endif /* HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO */ #if defined HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE gboolean qmi_message_dms_delete_stored_image_input_get_image ( QmiMessageDmsDeleteStoredImageInput *self, QmiDeprecatedMessageDmsDeleteStoredImageInputImage *value_image, GError **error) { QmiDmsFirmwareImageType type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; GArray *unique_id = NULL; const gchar *build_id = NULL; if (!qmi_message_dms_delete_stored_image_input_get_image_details (self, &type, &unique_id, &build_id, error)) return FALSE; if (value_image) { value_image->type = type; value_image->unique_id = unique_id; value_image->build_id = (gchar *) build_id; } return TRUE; } gboolean qmi_message_dms_delete_stored_image_input_set_image ( QmiMessageDmsDeleteStoredImageInput *self, const QmiDeprecatedMessageDmsDeleteStoredImageInputImage *value_image, GError **error) { return qmi_message_dms_delete_stored_image_input_set_image_details (self, value_image->type, value_image->unique_id, value_image->build_id, error); } #endif /* HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE */ #if defined HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO gboolean qmi_message_dms_get_stored_image_info_input_get_image ( QmiMessageDmsGetStoredImageInfoInput *self, QmiDeprecatedMessageDmsGetStoredImageInfoInputImage *value_image, GError **error) { QmiDmsFirmwareImageType type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; GArray *unique_id = NULL; const gchar *build_id = NULL; if (!qmi_message_dms_get_stored_image_info_input_get_image_details (self, &type, &unique_id, &build_id, error)) return FALSE; if (value_image) { value_image->type = type; value_image->unique_id = unique_id; value_image->build_id = (gchar *) build_id; } return TRUE; } gboolean qmi_message_dms_get_stored_image_info_input_set_image ( QmiMessageDmsGetStoredImageInfoInput *self, const QmiDeprecatedMessageDmsGetStoredImageInfoInputImage *value_image, GError **error) { return qmi_message_dms_get_stored_image_info_input_set_image_details (self, value_image->type, value_image->unique_id, value_image->build_id, error); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO */ #if defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT gboolean qmi_indication_loc_position_report_output_get_dilution_of_precision ( QmiIndicationLocPositionReportOutput *self, QmiDeprecatedIndicationLocPositionReportOutputDilutionOfPrecision *value_dilution_of_precision, GError **error) { gfloat pdop = 0.0; gfloat hdop = 0.0; gfloat vdop = 0.0; if (!qmi_indication_loc_position_report_output_get_dop (self, &pdop, &hdop, &vdop, error)) return FALSE; if (value_dilution_of_precision) { value_dilution_of_precision->position_dilution_of_precision = pdop; value_dilution_of_precision->horizontal_dilution_of_precision = hdop; value_dilution_of_precision->vertical_dilution_of_precision = vdop; } return TRUE; } gboolean qmi_indication_loc_position_report_output_get_gps_time ( QmiIndicationLocPositionReportOutput *self, QmiDeprecatedIndicationLocPositionReportOutputGpsTime *value_gps_time, GError **error) { guint16 gps_weeks = 0; guint32 gps_time_of_week_milliseconds = 0; if (!qmi_indication_loc_position_report_output_get_gps_date_time (self, &gps_weeks, &gps_time_of_week_milliseconds, error)) return FALSE; if (value_gps_time) { value_gps_time->gps_weeks = gps_weeks; value_gps_time->gps_time_of_week_milliseconds = gps_time_of_week_milliseconds; } return TRUE; } #endif /* HAVE_QMI_INDICATION_LOC_POSITION_REPORT */ #if defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS typedef struct { GArray *slot_eid_information; } MessageUimGetSlotStatusOutputCompatContext; static void message_uim_get_slot_status_output_clear_slot_eid_information (GArray *array) { guint i; for (i = 0; i < array->len; i++) g_array_unref (g_array_index (array, GArray *, i)); g_array_unref (array); } static void message_uim_get_slot_status_output_compat_context_free (MessageUimGetSlotStatusOutputCompatContext *ctx) { if (ctx->slot_eid_information) message_uim_get_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); g_slice_free (MessageUimGetSlotStatusOutputCompatContext, ctx); } static MessageUimGetSlotStatusOutputCompatContext * message_uim_get_slot_status_output_get_compat_context (QmiMessageUimGetSlotStatusOutput *self) { MessageUimGetSlotStatusOutputCompatContext *ctx; ctx = qmi_message_uim_get_slot_status_output_get_compat_context (self); if (!ctx) { ctx = g_slice_new0 (MessageUimGetSlotStatusOutputCompatContext); qmi_message_uim_get_slot_status_output_set_compat_context (self, ctx, (GDestroyNotify)message_uim_get_slot_status_output_compat_context_free); } return ctx; } gboolean qmi_message_uim_get_slot_status_output_get_slot_eid_information ( QmiMessageUimGetSlotStatusOutput *self, GArray **value_slot_eid_information, GError **error) { GArray *slot_eid = NULL; if (!qmi_message_uim_get_slot_status_output_get_slot_eid (self, &slot_eid, error)) return FALSE; if (value_slot_eid_information) { MessageUimGetSlotStatusOutputCompatContext *ctx; guint i; ctx = message_uim_get_slot_status_output_get_compat_context (self); if (ctx->slot_eid_information) message_uim_get_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); ctx->slot_eid_information = g_array_sized_new (FALSE, FALSE, sizeof (GArray *), slot_eid->len); for (i = 0; i < slot_eid->len; i++) { QmiSlotEidElement *element; GArray *aux; element = &g_array_index (slot_eid, QmiSlotEidElement, i); aux = g_array_ref (element->eid); g_array_append_val (ctx->slot_eid_information, aux); } *value_slot_eid_information = ctx->slot_eid_information; } return TRUE; } #endif /* HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS */ #if defined HAVE_QMI_INDICATION_UIM_SLOT_STATUS typedef struct { GArray *slot_eid_information; } IndicationUimSlotStatusOutputCompatContext; static void indication_uim_slot_status_output_clear_slot_eid_information (GArray *array) { guint i; for (i = 0; i < array->len; i++) g_array_unref (g_array_index (array, GArray *, i)); g_array_unref (array); } static void indication_uim_slot_status_output_compat_context_free (IndicationUimSlotStatusOutputCompatContext *ctx) { if (ctx->slot_eid_information) indication_uim_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); g_slice_free (IndicationUimSlotStatusOutputCompatContext, ctx); } static IndicationUimSlotStatusOutputCompatContext * indication_uim_slot_status_output_get_compat_context (QmiIndicationUimSlotStatusOutput *self) { IndicationUimSlotStatusOutputCompatContext *ctx; ctx = qmi_indication_uim_slot_status_output_get_compat_context (self); if (!ctx) { ctx = g_slice_new0 (IndicationUimSlotStatusOutputCompatContext); qmi_indication_uim_slot_status_output_set_compat_context (self, ctx, (GDestroyNotify)indication_uim_slot_status_output_compat_context_free); } return ctx; } gboolean qmi_indication_uim_slot_status_output_get_slot_eid_information ( QmiIndicationUimSlotStatusOutput *self, GArray **value_slot_eid_information, GError **error) { GArray *slot_eid = NULL; if (!qmi_indication_uim_slot_status_output_get_slot_eid (self, &slot_eid, error)) return FALSE; if (value_slot_eid_information) { IndicationUimSlotStatusOutputCompatContext *ctx; guint i; ctx = indication_uim_slot_status_output_get_compat_context (self); if (ctx->slot_eid_information) indication_uim_slot_status_output_clear_slot_eid_information (ctx->slot_eid_information); ctx->slot_eid_information = g_array_sized_new (FALSE, FALSE, sizeof (GArray *), slot_eid->len); for (i = 0; i < slot_eid->len; i++) { QmiSlotEidElement *element; GArray *aux; element = &g_array_index (slot_eid, QmiSlotEidElement, i); aux = g_array_ref (element->eid); g_array_append_val (ctx->slot_eid_information, aux); } *value_slot_eid_information = ctx->slot_eid_information; } return TRUE; } #endif /* HAVE_QMI_INDICATION_UIM_SLOT_STATUS */ #if defined HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION typedef struct { GArray *personalization_status_other_slots; } MessageUimGetConfigurationOutputCompatContext; static void message_uim_get_configuration_output_clear_personalization_status_other_slots (GArray *array) { guint i; for (i = 0; i < array->len; i++) g_array_unref (g_array_index (array, GArray *, i)); g_array_unref (array); } static void message_uim_get_configuration_output_compat_context_free (MessageUimGetConfigurationOutputCompatContext *ctx) { if (ctx->personalization_status_other_slots) message_uim_get_configuration_output_clear_personalization_status_other_slots (ctx->personalization_status_other_slots); g_slice_free (MessageUimGetConfigurationOutputCompatContext, ctx); } static MessageUimGetConfigurationOutputCompatContext * message_uim_get_configuration_output_get_compat_context (QmiMessageUimGetConfigurationOutput *self) { MessageUimGetConfigurationOutputCompatContext *ctx; ctx = qmi_message_uim_get_configuration_output_get_compat_context (self); if (!ctx) { ctx = g_slice_new0 (MessageUimGetConfigurationOutputCompatContext); qmi_message_uim_get_configuration_output_set_compat_context (self, ctx, (GDestroyNotify)message_uim_get_configuration_output_compat_context_free); } return ctx; } gboolean qmi_message_uim_get_configuration_output_get_personalization_status_other_slots ( QmiMessageUimGetConfigurationOutput *self, GArray **value_personalization_status_other_slots, GError **error) { GArray *array = NULL; if (!qmi_message_uim_get_configuration_output_get_personalization_status_other (self, &array, error)) return FALSE; if (value_personalization_status_other_slots) { MessageUimGetConfigurationOutputCompatContext *ctx; guint i; ctx = message_uim_get_configuration_output_get_compat_context (self); if (ctx->personalization_status_other_slots) message_uim_get_configuration_output_clear_personalization_status_other_slots (ctx->personalization_status_other_slots); ctx->personalization_status_other_slots = g_array_sized_new (FALSE, FALSE, sizeof (GArray *), array->len); for (i = 0; i < array->len; i++) { QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElement *element; GArray *aux; element = &g_array_index (array, QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElement, i); /* We can do this because QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElementSlotElement (the new type) * and QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherSlotsSlotsElement (the old type) are equivalent */ aux = g_array_ref (element->slot); g_array_append_val (ctx->personalization_status_other_slots, aux); } *value_personalization_status_other_slots = ctx->personalization_status_other_slots; } return TRUE; } #endif /* HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION */ #if defined HAVE_QMI_INDICATION_WDS_SET_LTE_ATTACH_PDN_LIST gboolean qmi_indication_wds_set_lte_attach_pdn_list_output_get_result ( QmiIndicationWdsSetLteAttachPdnListOutput *self, GError **error) { /* NO-OP */ return TRUE; } #endif /* HAVE_QMI_INDICATION_WDS_SET_LTE_ATTACH_PDN_LIST */ /*****************************************************************************/ GType qmi_wds_get_current_settings_requested_settings_get_type (void) { return qmi_wds_requested_settings_get_type (); } gchar * qmi_wds_get_current_settings_requested_settings_build_string_from_mask (QmiDeprecatedWdsGetCurrentSettingsRequestedSettings mask) { return qmi_wds_requested_settings_build_string_from_mask ((QmiWdsRequestedSettings)mask); } /*****************************************************************************/ #if defined HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS GType qmi_message_uim_get_card_status_output_card_status_cards_element_applications_element_get_type (void) { return qmi_message_uim_get_card_status_output_card_status_cards_element_applications_element_v2_get_type (); } #endif /* HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS */ /*****************************************************************************/ #if defined HAVE_QMI_INDICATION_UIM_CARD_STATUS GType qmi_indication_uim_card_status_output_card_status_cards_element_applications_element_get_type (void) { return qmi_indication_uim_card_status_output_card_status_cards_element_applications_element_v2_get_type (); } #endif /* HAVE_QMI_INDICATION_UIM_CARD_STATUS */ #endif /* QMI_DISABLE_DEPRECATED */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-compat.h000066400000000000000000005705371455567757300211030ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2016-2022 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_COMPAT_H_ #define _LIBQMI_GLIB_QMI_COMPAT_H_ #ifndef QMI_DISABLE_DEPRECATED #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) # error "Only can be included directly." #endif #include "qmi-device.h" #include "qmi-dms.h" #include "qmi-nas.h" #include "qmi-uim.h" #include "qmi-wda.h" #include "qmi-wds.h" #include "qmi-pdc.h" #include "qmi-loc.h" #include "qmi-enums-nas.h" #include "qmi-enums-wms.h" #include "qmi-enums-pdc.h" /** * SECTION:qmi-compat * @short_description: Deprecated types and methods. * * These types and methods are flagged as deprecated and therefore * shouldn't be used in newly written code. They are provided to avoid * innecessary API/ABI breaks, for compatibility purposes only. */ /** * qmi_utils_read_guint8_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @out: return location for the read variable. * * Reads an unsigned byte from the buffer. * * The user needs to make sure that at least 1 byte is available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 1 byte * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_guint8() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_guint8) void qmi_utils_read_guint8_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint8 *out); /** * qmi_utils_read_gint8_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @out: return location for the read variable. * * Reads a signed byte from the buffer. * * The user needs to make sure that at least 1 byte is available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 1 byte * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_gint8() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_gint8) void qmi_utils_read_gint8_from_buffer (const guint8 **buffer, guint16 *buffer_size, gint8 *out); /** * qmi_utils_read_guint16_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped to host byte order if necessary * @out: return location for the read variable. * * Reads an unsigned 16-bit integer from the buffer. The number in the buffer is * expected to be given in the byte order specificed by @endian, and this method * takes care of converting the read value to the proper host endianness. * * The user needs to make sure that at least 2 bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 2 bytes * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_guint16() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_guint16) void qmi_utils_read_guint16_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint16 *out); /** * qmi_utils_read_gint16_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped to host byte order if necessary * @out: return location for the read variable. * * Reads a signed 16-bit integer from the buffer. The number in the buffer is * expected to be given in the byte order specified by @endian, and this method * takes care of converting the read value to the proper host endianness. * * The user needs to make sure that at least 2 bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 2 bytes * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_gint16() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_gint16) void qmi_utils_read_gint16_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint16 *out); /** * qmi_utils_read_guint32_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped to host byte order if necessary * @out: return location for the read variable. * * Reads an unsigned 32-bit integer from the buffer. The number in the buffer is * expected to be given in the byte order specified by @endian, and this method * takes care of converting the read value to the proper host endianness. * * The user needs to make sure that at least 4 bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 4 bytes * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_guint32() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_guint32) void qmi_utils_read_guint32_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint32 *out); /** * qmi_utils_read_gint32_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped to host byte order if necessary * @out: return location for the read variable. * * Reads a signed 32-bit integer from the buffer. The number in the buffer is * expected to be given in the byte order specified by @endian, and this method * takes care of converting the read value to the proper host endianness. * * The user needs to make sure that at least 4 bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 4 bytes * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_gint32() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_gint32) void qmi_utils_read_gint32_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint32 *out); /** * qmi_utils_read_guint64_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped to host byte order if necessary * @out: return location for the read variable. * * Reads an unsigned 64-bit integer from the buffer. The number in the buffer is * expected to be given in the byte order specified by @endian, and this method * takes care of converting the read value to the proper host endianness. * * The user needs to make sure that at least 8 bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 8 bytes * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_guint64() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_guint64) void qmi_utils_read_guint64_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint64 *out); /** * qmi_utils_read_gint64_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped to host byte order if necessary * @out: return location for the read variable. * * Reads a signed 64-bit integer from the buffer. The number in the buffer is * expected to be given in the byte order specified by @endian, and this method * takes care of converting the read value to the proper host endianness. * * The user needs to make sure that at least 8 bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 8 bytes * read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_gint64() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_gint64) void qmi_utils_read_gint64_from_buffer (const guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint64 *out); /** * qmi_utils_read_sized_guint_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @n_bytes: number of bytes to read. * @endian: endianness of firmware value; swapped to host byte order if necessary * @out: return location for the read variable. * * Reads a @n_bytes-sized unsigned integer from the buffer. The number in the * buffer is expected to be given in the byte order specified by @endian, and * this method takes care of converting the read value to the proper host * endianness. * * The user needs to make sure that at least @n_bytes bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the @n_bytes * bytes read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_sized_guint() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_sized_guint) void qmi_utils_read_sized_guint_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint n_bytes, QmiEndian endian, guint64 *out); /** * qmi_utils_read_gfloat_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @out: return location for the read variable. * * Reads a 32-bit floating-point number from the buffer. * * The user needs to make sure that at least 4 bytes are available * in the buffer. * * Also note that both @buffer and @buffer_size get updated after the 4 bytes * read. * * Since: 1.10 * Deprecated: 1.12: Use qmi_message_tlv_read_gfloat() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_gfloat) void qmi_utils_read_gfloat_from_buffer (const guint8 **buffer, guint16 *buffer_size, gfloat *out); /** * qmi_utils_write_guint8_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @in: location of the variable to be written. * * Writes an unsigned byte into the buffer. * * The user needs to make sure that the buffer is at least 1 byte long. * * Also note that both @buffer and @buffer_size get updated after the 1 byte * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_guint8() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_guint8) void qmi_utils_write_guint8_to_buffer (guint8 **buffer, guint16 *buffer_size, guint8 *in); /** * qmi_utils_write_gint8_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @in: location of the variable to be written. * * Writes a signed byte into the buffer. * * The user needs to make sure that the buffer is at least 1 byte long. * * Also note that both @buffer and @buffer_size get updated after the 1 byte * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_gint8() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_gint8) void qmi_utils_write_gint8_to_buffer (guint8 **buffer, guint16 *buffer_size, gint8 *in); /** * qmi_utils_write_guint16_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped from host byte order if necessary * @in: location of the variable to be written. * * Writes an unsigned 16-bit integer into the buffer. The number to be written * is expected to be given in host endianness, and this method takes care of * converting the value written to the byte order specified by @endian. * * The user needs to make sure that the buffer is at least 2 bytes long. * * Also note that both @buffer and @buffer_size get updated after the 2 bytes * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_guint16() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_guint16) void qmi_utils_write_guint16_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint16 *in); /** * qmi_utils_write_gint16_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped from host byte order if necessary * @in: location of the variable to be written. * * Writes a signed 16-bit integer into the buffer. The number to be written * is expected to be given in host endianness, and this method takes care of * converting the value written to the byte order specified by @endian. * * The user needs to make sure that the buffer is at least 2 bytes long. * * Also note that both @buffer and @buffer_size get updated after the 2 bytes * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_gint16() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_gint16) void qmi_utils_write_gint16_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint16 *in); /** * qmi_utils_write_guint32_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped from host byte order if necessary * @in: location of the variable to be written. * * Writes an unsigned 32-bit integer into the buffer. The number to be written * is expected to be given in host endianness, and this method takes care of * converting the value written to the byte order specified by @endian. * * The user needs to make sure that the buffer is at least 4 bytes long. * * Also note that both @buffer and @buffer_size get updated after the 4 bytes * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_guint32() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_guint32) void qmi_utils_write_guint32_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint32 *in); /** * qmi_utils_write_gint32_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped from host byte order if necessary * @in: location of the variable to be written. * * Writes a signed 32-bit integer into the buffer. The number to be written * is expected to be given in host endianness, and this method takes care of * converting the value written to the byte order specified by @endian. * * The user needs to make sure that the buffer is at least 4 bytes long. * * Also note that both @buffer and @buffer_size get updated after the 4 bytes * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_gint32() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_gint32) void qmi_utils_write_gint32_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint32 *in); /** * qmi_utils_write_guint64_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped from host byte order if necessary * @in: location of the variable to be written. * * Writes an unsigned 64-bit integer into the buffer. The number to be written * is expected to be given in host endianness, and this method takes care of * converting the value written to the byte order specified by @endian. * * The user needs to make sure that the buffer is at least 8 bytes long. * * Also note that both @buffer and @buffer_size get updated after the 8 bytes * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_guint64() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_guint64) void qmi_utils_write_guint64_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, guint64 *in); /** * qmi_utils_write_gint64_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @endian: endianness of firmware value; swapped from host byte order if necessary * @in: location of the variable to be written. * * Writes a signed 64-bit integer into the buffer. The number to be written * is expected to be given in host endianness, and this method takes care of * converting the value written to the byte order specified by @endian. * * The user needs to make sure that the buffer is at least 8 bytes long. * * Also note that both @buffer and @buffer_size get updated after the 8 bytes * write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_gint64() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_gint64) void qmi_utils_write_gint64_to_buffer (guint8 **buffer, guint16 *buffer_size, QmiEndian endian, gint64 *in); /** * qmi_utils_write_sized_guint_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @n_bytes: number of bytes to write. * @endian: endianness of firmware value; swapped from host byte order if necessary * @in: location of the variable to be written. * * Writes a @n_bytes-sized unsigned integer into the buffer. The number to be * written is expected to be given in host endianness, and this method takes * care of converting the value written to the byte order specified by @endian. * * The user needs to make sure that the buffer is at least @n_bytes bytes long. * * Also note that both @buffer and @buffer_size get updated after the @n_bytes * bytes write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_sized_guint() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_sized_guint) void qmi_utils_write_sized_guint_to_buffer (guint8 **buffer, guint16 *buffer_size, guint n_bytes, QmiEndian endian, guint64 *in); /** * qmi_utils_read_string_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @length_prefix_size: size of the length prefix integer in bits. * @max_size: maximum number of bytes to read, or 0 to read all available bytes. * @out: return location for the read string. The returned value should be freed with g_free(). * * Reads a string from the buffer. * * If @length_prefix_size is greater than 0, only the amount of bytes given * there will be read. Otherwise, up to @buffer_size bytes will be read. * * Also note that both @buffer and @buffer_size get updated after the write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_string() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_string) void qmi_utils_read_string_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint8 length_prefix_size, guint16 max_size, gchar **out); /** * qmi_utils_write_string_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @length_prefix_size: size of the length prefix integer in bits. * @in: string to write. * * Writes a string to the buffer. * * If @length_prefix_size is greater than 0, a length prefix integer will be * included in the write operation. * * The user needs to make sure that the buffer has enough space for both the * whole string and the length prefix. * * Also note that both @buffer and @buffer_size get updated after the write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_string() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_string) void qmi_utils_write_string_to_buffer (guint8 **buffer, guint16 *buffer_size, guint8 length_prefix_size, const gchar *in); /** * qmi_utils_read_fixed_size_string_from_buffer: * @buffer: a buffer with raw binary data. * @buffer_size: size of @buffer. * @fixed_size: number of bytes to read. * @out: buffer preallocated by the client, with at least @fixed_size bytes. * * Reads a @fixed_size-sized string from the buffer into the @out buffer. * * Also note that both @buffer and @buffer_size get updated after the * @fixed_size bytes read. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_read_fixed_size_string() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_fixed_size_string) void qmi_utils_read_fixed_size_string_from_buffer (const guint8 **buffer, guint16 *buffer_size, guint16 fixed_size, gchar *out); /** * qmi_utils_write_fixed_size_string_to_buffer: * @buffer: a buffer. * @buffer_size: size of @buffer. * @fixed_size: number of bytes to write. * @in: string to write. * * Writes a @fixed_size-sized string to the buffer, without any length prefix. * * The user needs to make sure that the buffer is at least @fixed_size bytes * long. * * Also note that both @buffer and @buffer_size get updated after the * @fixed_size bytes write. * * Since: 1.0 * Deprecated: 1.12: Use qmi_message_tlv_write_string() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_write_string) void qmi_utils_write_fixed_size_string_to_buffer (guint8 **buffer, guint16 *buffer_size, guint16 fixed_size, const gchar *in); /** * QMI_NAS_SIM_REJECT_STATE_SIM_VAILABLE: * * SIM available. * * Since: 1.0 * Deprecated: 1.14.0: Use the correct #QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE name instead. */ G_DEPRECATED typedef int QmiDeprecatedNasSimRejectState; #define QMI_NAS_SIM_REJECT_STATE_SIM_VAILABLE (QmiDeprecatedNasSimRejectState) QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE /** * qmi_message_get_printable: * @self: a #QmiMessage. * @line_prefix: prefix string to use in each new generated line. * * Gets a printable string with the contents of the whole QMI message. * * If known, the printable string will contain translated TLV values as well as the raw * data buffer contents. * * Returns: (transfer full): a newly allocated string, which should be freed with g_free(). * * Since: 1.0 * Deprecated: 1.18: Use qmi_message_get_printable_full() instead. */ G_DEPRECATED_FOR (qmi_message_get_printable_full) gchar *qmi_message_get_printable (QmiMessage *self, const gchar *line_prefix); /** * qmi_message_get_version_introduced: * @self: a #QmiMessage. * @major: (out): return location for the major version. * @minor: (out): return location for the minor version. * * Gets, if known, the service version in which the given message was first * introduced. * * Returns: %TRUE if @major and @minor are set, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.18: Use qmi_message_get_version_introduced_full() instead. */ G_DEPRECATED_FOR (qmi_message_get_version_introduced_full) gboolean qmi_message_get_version_introduced (QmiMessage *self, guint *major, guint *minor); /** * qmi_message_get_version_introduced_full: * @self: a #QmiMessage. * @context: a #QmiMessageContext. * @major: (out): return location for the major version. * @minor: (out): return location for the minor version. * * Gets, if known, the service version in which the given message was first * introduced. * * The lookup of the version may be specific to the @context provided, e.g. for * vendor-specific messages. * * If no @context given, the behavior is the same as qmi_message_get_version_introduced(). * * Since 1.26, this method will return %FALSE as the library no longer provides * version information for each message, given that this information was never * reliable. * * Returns: %TRUE if @major and @minor are set, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.26: The version information of each message is no longer available. */ G_DEPRECATED gboolean qmi_message_get_version_introduced_full (QmiMessage *self, QmiMessageContext *context, guint *major, guint *minor); /** * qmi_device_close: * @self: a #QmiDevice * @error: Return location for error or %NULL. * * Synchronously closes a #QmiDevice, preventing any further I/O. * * If this device was opened with @QMI_DEVICE_OPEN_FLAGS_MBIM, this * operation will not wait for the response of the underlying MBIM * close sequence. * * Closing a #QmiDevice multiple times will not return an error. * * Returns: %TRUE if successful, %FALSE if @error is set. * * Since: 1.0 * Deprecated: 1.18: Use qmi_device_close_async() instead. */ G_DEPRECATED_FOR (qmi_device_close_async) gboolean qmi_device_close (QmiDevice *self, GError **error); /** * qmi_device_command: * @self: a #QmiDevice. * @message: the message to send. * @timeout: maximum time, in seconds, to wait for the response. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously sends a generic #QmiMessage to the device with no context. * * If the operation is cancelled via @cancellable, a %QMI_PROTOCOL_ERROR_ABORTED * error will be returned always. If the QMI method may be aborted, there is * no guarantee that the operation is truly aborted before the error is returned * so it may really happen that the operation really succeeded and the method * would still return %QMI_PROTOCOL_ERROR_ABORTED. In order to use abortable * methods and make sure the response is the correct one, use * qmi_device_command_abortable(). * * When the operation is finished @callback will be called. You can then call * qmi_device_command_finish() to get the result of the operation. * * Since: 1.0 * Deprecated: 1.18: Use qmi_device_command_full() instead. */ G_DEPRECATED_FOR (qmi_device_command_full) void qmi_device_command (QmiDevice *self, QmiMessage *message, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_command_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_command(). * * Returns: (transfer full): a #QmiMessage response, or %NULL if @error is set. The returned value should be freed with qmi_message_unref(). * * Since: 1.0 * Deprecated: 1.18. Use qmi_device_command_full_finish() instead. */ G_DEPRECATED_FOR (qmi_device_command_full_finish) QmiMessage *qmi_device_command_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * QMI_WDS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT: * * Address is valid but not yet allocated. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT /** * QMI_WDS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE: * * Address is invalid. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE /** * QMI_WDS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE: * * Network resource shortage. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE /** * QMI_WDS_CDMA_CAUSE_CODE_NETWORK_FAILURE: * * Network failed. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_NETWORK_FAILURE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE /** * QMI_WDS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID: * * SMS teleservice ID is invalid. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID /** * QMI_WDS_CDMA_CAUSE_CODE_NETWORK_OTHER: * * Other network error. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_NETWORK_OTHER (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE: * * No page response from destination. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_BUSY: * * Destination is busy. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_BUSY (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK: * * No acknowledge from destination. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE: * * Destination resource shortage. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED: * * SMS delivery postponed. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE: * * Destination out of service. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS: * * Destination not at address. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS /** * QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_OTHER: * * Other destination error. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_DESTINATION_OTHER (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER /** * QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE: * * Radio interface resource shortage. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE /** * QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY: * * Radio interface incompatibility. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY /** * QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER: * * Other radio interface error * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_ENCODING: * * Encoding error. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_ENCODING (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED: * * SMS origin denied. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED: * * SMS destination denied. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED: * * Supplementary service not supported. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED: * * SMS not supported. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER: * * Missing optional expected parameter. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER: * * Missing mandatory parameter. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE: * * Unrecognized parameter value. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE: * * Unexpected parameter value. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR: * * User data size error. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR /** * QMI_WDS_CDMA_CAUSE_CODE_GENERAL_OTHER: * * Other general error. * * Since: 1.0 * Deprecated: 1.18.0: Use the correct #QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsCdmaCauseCode; #define QMI_WDS_CDMA_CAUSE_CODE_GENERAL_OTHER (QmiDeprecatedWdsCdmaCauseCode) QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER /** * QMI_PROTOCOL_ERROR_QOS_UNAVAILABLE: * * QoS unavailable. * * Since: 1.0 * Deprecated: 1.22.0: Use the #QMI_PROTOCOL_ERROR_REQUESTED_NUMBER_UNSUPPORTED instead. */ G_DEPRECATED typedef int QmiDeprecatedProtocolError; #define QMI_PROTOCOL_ERROR_QOS_UNAVAILABLE (QmiDeprecatedProtocolError) QMI_PROTOCOL_ERROR_REQUESTED_NUMBER_UNSUPPORTED /** * QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFIGURATION_FAILED: * * Conference (not configuration) failed. * * Since: 1.0 * Deprecated: 1.24.10: Use the correct #QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED name instead. */ G_DEPRECATED typedef int QmiDeprecatedWdsVerboseCallEndReasonCm; #define QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFIGURATION_FAILED (QmiDeprecatedWdsVerboseCallEndReasonCm) QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED /** * qmi_message_tlv_read_gfloat: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: address of a the offset within the TLV value. * @out: return location for the read #gfloat. * @error: return location for error or %NULL. * * Reads a 32-bit floating-point number from the TLV. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * The implementation assumes the float is encoded with the same endianness as * the host, which may not be true. The use of this method is discouraged, and * new code should use qmi_message_tlv_read_gfloat_endian() instead. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 * Deprecated: 1.22: Use qmi_message_tlv_read_gfloat_endian() instead. */ G_DEPRECATED_FOR (qmi_message_tlv_read_gfloat_endian) gboolean qmi_message_tlv_read_gfloat (QmiMessage *self, gsize tlv_offset, gsize *offset, gfloat *out, GError **error); /** * QmiDmsDellFirmwareVersionType: * @QMI_DMS_DELL_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG: E.g. T77W968.F0.0.0.2.3.GC.004. * @QMI_DMS_DELL_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS: E.g. T77W968.F0.0.0.2.3.GC.004.011. * @QMI_DMS_DELL_FIRMWARE_VERSION_TYPE_APPS: E.g. 011. * * Dell specific firmware version types. * * Since: 1.22.4 * Deprecated: 1.26: Use #QmiDmsFoxconnFirmwareVersionType instead. */ /* The following type exists just so that we don't get deprecation warnings on * our own methods */ typedef enum { QMI_DMS_DELL_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG = QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG, QMI_DMS_DELL_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS = QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS, QMI_DMS_DELL_FIRMWARE_VERSION_TYPE_APPS = QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_APPS, } QmiDeprecatedDmsDellFirmwareVersionType; G_DEPRECATED typedef QmiDeprecatedDmsDellFirmwareVersionType QmiDmsDellFirmwareVersionType; G_DEPRECATED_FOR (qmi_dms_foxconn_firmware_version_type_get_type) GType qmi_dms_dell_firmware_version_type_get_type (void) G_GNUC_CONST; #define QMI_TYPE_DMS_DELL_FIRMWARE_VERSION_TYPE QMI_TYPE_DMS_FOXCONN_FIRMWARE_VERSION_TYPE /** * qmi_dms_dell_firmware_version_type_get_string: * @val: a #QmiDmsFoxconnFirmwareVersionType. * * Gets the nickname string for the #QmiDmsFoxconnFirmwareVersionType specified at @val. * * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_dms_foxconn_firmware_version_type_get_string() instead. */ G_DEPRECATED_FOR (qmi_dms_foxconn_firmware_version_type_get_string) const gchar *qmi_dms_dell_firmware_version_type_get_string (QmiDeprecatedDmsDellFirmwareVersionType val); /** * QmiDmsDellDeviceMode: * @QMI_DMS_DELL_DEVICE_MODE_UNKNOWN: Unknown mode. * @QMI_DMS_DELL_DEVICE_MODE_FASTBOOT_ONLINE: Fastboot download mode for full partition files. * @QMI_DMS_DELL_DEVICE_MODE_FASTBOOT_OTA: Fastboot download mode for OTA files. * * Dell specific device modes. * * Since: 1.22.4 * Deprecated: 1.26: Use #QmiDmsFoxconnDeviceMode instead. */ /* The following type exists just so that we don't get deprecation warnings on * our own methods */ typedef enum { QMI_DMS_DELL_DEVICE_MODE_UNKNOWN = QMI_DMS_FOXCONN_DEVICE_MODE_UNKNOWN, QMI_DMS_DELL_DEVICE_MODE_FASTBOOT_ONLINE = QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_ONLINE, QMI_DMS_DELL_DEVICE_MODE_FASTBOOT_OTA = QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_OTA, } QmiDeprecatedDmsDellDeviceMode; G_DEPRECATED typedef QmiDeprecatedDmsDellDeviceMode QmiDmsDellDeviceMode; G_DEPRECATED_FOR (qmi_dms_foxconn_device_mode_get_type) GType qmi_dms_dell_device_mode_get_type (void) G_GNUC_CONST; #define QMI_TYPE_DMS_DELL_DEVICE_MODE QMI_TYPE_DMS_FOXCONN_DEVICE_MODE /** * qmi_dms_dell_device_mode_get_string: * @val: a QmiDmsDellDeviceMode. * * Gets the nickname string for the #QmiDmsDellDeviceMode specified at @val. * * Returns: (transfer none): a string with the nickname, or %NULL if not found. Do not free the returned value. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_dms_foxconn_device_mode_get_string() instead. */ G_DEPRECATED_FOR (qmi_dms_foxconn_device_mode_get_string) const gchar *qmi_dms_dell_device_mode_get_string (QmiDeprecatedDmsDellDeviceMode val); /** * QmiWdsGetCurrentSettingsRequestedSettings: * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_NONE: no settings requested * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_ID: request profile ID * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_NAME: request profile name * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE: request PDP context type * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_APN_NAME: request APN name * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS: request DNS server addresses * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS: request granted QoS * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_USERNAME: request username * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_AUTH_PROTOCOL: request authentication protocol, ie PAP/CHAP/none. * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS: request IP address * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO: request gateway address * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_ADDRESS: request PCSCF address * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST: request PCSCF server address list * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST: request PCSCF domain name list * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU: request MTU * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST: request domain name list * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY: request IP family, ie IPv4 or IPv6. * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IMCN_FLAG: request IMCN flag * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY: request extended technology info * @QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_OPERATOR_RESERVED_PCO: operator reserved protocol configuration option. Since 1.32. * * Flags specifying WDS bearer settings. * * Since: 1.0 * Deprecated: 1.32: Use #QmiWdsRequestedSettings instead. */ /* The following type exists just so that we don't get deprecation warnings on * our own methods */ typedef enum { QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_NONE = QMI_WDS_REQUESTED_SETTINGS_NONE, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_ID = QMI_WDS_REQUESTED_SETTINGS_PROFILE_ID, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PROFILE_NAME = QMI_WDS_REQUESTED_SETTINGS_PROFILE_NAME, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PDP_TYPE = QMI_WDS_REQUESTED_SETTINGS_PDP_TYPE, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_APN_NAME = QMI_WDS_REQUESTED_SETTINGS_APN_NAME, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DNS_ADDRESS = QMI_WDS_REQUESTED_SETTINGS_DNS_ADDRESS, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GRANTED_QOS = QMI_WDS_REQUESTED_SETTINGS_GRANTED_QOS, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_USERNAME = QMI_WDS_REQUESTED_SETTINGS_USERNAME, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_AUTH_PROTOCOL = QMI_WDS_REQUESTED_SETTINGS_AUTH_PROTOCOL, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_ADDRESS = QMI_WDS_REQUESTED_SETTINGS_IP_ADDRESS, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_GATEWAY_INFO = QMI_WDS_REQUESTED_SETTINGS_GATEWAY_INFO, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_ADDRESS = QMI_WDS_REQUESTED_SETTINGS_PCSCF_ADDRESS, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST = QMI_WDS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST = QMI_WDS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_MTU = QMI_WDS_REQUESTED_SETTINGS_MTU, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST = QMI_WDS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IP_FAMILY = QMI_WDS_REQUESTED_SETTINGS_IP_FAMILY, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_IMCN_FLAG = QMI_WDS_REQUESTED_SETTINGS_IMCN_FLAG, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY = QMI_WDS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY, QMI_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS_OPERATOR_RESERVED_PCO = QMI_WDS_REQUESTED_SETTINGS_OPERATOR_RESERVED_PCO, } QmiDeprecatedWdsGetCurrentSettingsRequestedSettings; G_DEPRECATED typedef QmiDeprecatedWdsGetCurrentSettingsRequestedSettings QmiWdsGetCurrentSettingsRequestedSettings; G_DEPRECATED_FOR (qmi_wds_get_current_settings_requested_settings_get_type) GType qmi_wds_get_current_settings_requested_settings_get_type (void) G_GNUC_CONST; #define QMI_TYPE_WDS_GET_CURRENT_SETTINGS_REQUESTED_SETTINGS QMI_TYPE_WDS_REQUESTED_SETTINGS /** * qmi_wds_get_current_settings_requested_settings_build_string_from_mask: * @mask: bitmask of QmiWdsGetCurrentSettingsRequestedSettings values. * * Builds a string containing a comma-separated list of nicknames for * each #QmiWdsGetCurrentSettingsRequestedSettings in @mask. * * Returns: (transfer full): a string with the list of nicknames, or %NULL if none given. The returned value should be freed with g_free(). * Since: 1.0 * Deprecated: 1.32: Use qmi_wds_requested_settings_build_string_from_mask() instead. */ G_DEPRECATED_FOR (qmi_wds_requested_settings_build_string_from_mask) gchar *qmi_wds_get_current_settings_requested_settings_build_string_from_mask (QmiDeprecatedWdsGetCurrentSettingsRequestedSettings mask); /** * QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN: * * Unknown personalization feature. * * This name was originally defined in the #QmiUimCardApplicationPersonalizationFeatureStatus * enum, which was renamed to #QmiUimCardApplicationPersonalizationFeatureStatus. * * Since: 1.10 * Deprecated: 1.34.0: Use #QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_UNKNOWN instead. */ G_DEPRECATED typedef int QmiDeprecatedUimCardApplicationPersonalizationFeature; #define QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_UNKNOWN (QmiDeprecatedUimCardApplicationPersonalizationFeature) QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_UNKNOWN /******************************************************************************/ /* Conditional method definitions */ #if defined HAVE_QMI_MESSAGE_DMS_SET_SERVICE_PROGRAMMING_CODE /** * qmi_message_dms_set_service_programming_code_input_get_new: * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. * @arg_new: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'New Code' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_get_new_code() instead. */ G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_get_new_code) gboolean qmi_message_dms_set_service_programming_code_input_get_new ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar **arg_new, GError **error); /** * qmi_message_dms_set_service_programming_code_input_set_new: * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. * @arg_new: a constant string of exactly 6 characters. * @error: Return location for error or %NULL. * * Set the 'New Code' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_set_new_code() instead. */ G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_set_new_code) gboolean qmi_message_dms_set_service_programming_code_input_set_new ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar *arg_new, GError **error); /** * qmi_message_dms_set_service_programming_code_input_get_current: * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. * @arg_current: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Current Code' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_get_current_code() instead. */ G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_get_current_code) gboolean qmi_message_dms_set_service_programming_code_input_get_current ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar **arg_current, GError **error); /** * qmi_message_dms_set_service_programming_code_input_set_current: * @self: a #QmiMessageDmsSetServiceProgrammingCodeInput. * @arg_current: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Current Code' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.14.0: Use qmi_message_dms_set_service_programming_code_input_set_current_code() instead. */ G_DEPRECATED_FOR (qmi_message_dms_set_service_programming_code_input_set_current_code) gboolean qmi_message_dms_set_service_programming_code_input_set_current ( QmiMessageDmsSetServiceProgrammingCodeInput *self, const gchar *arg_current, GError **error); #endif /* HAVE_QMI_MESSAGE_DMS_SET_SERVICE_PROGRAMMING_CODE */ #if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT /** * qmi_message_uim_read_transparent_input_get_session_information: * @self: a #QmiMessageUimReadTransparentInput. * @value_session_information_session_type: a placeholder for the output #QmiUimSessionType, or %NULL if not required. * @value_session_information_application_identifier: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Session Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.6 * Deprecated: 1.22: Use qmi_message_uim_read_transparent_input_get_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_read_transparent_input_get_session) gboolean qmi_message_uim_read_transparent_input_get_session_information ( QmiMessageUimReadTransparentInput *self, QmiUimSessionType *value_session_information_session_type, const gchar **value_session_information_application_identifier, GError **error); /** * qmi_message_uim_read_transparent_input_set_session_information: * @self: a #QmiMessageUimReadTransparentInput. * @value_session_information_session_type: a #QmiUimSessionType. * @value_session_information_application_identifier: a constant string. * @error: Return location for error or %NULL. * * Set the 'Session Information' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.6 * Deprecated: 1.22: Use qmi_message_uim_read_transparent_input_set_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_read_transparent_input_set_session) gboolean qmi_message_uim_read_transparent_input_set_session_information ( QmiMessageUimReadTransparentInput *self, QmiUimSessionType value_session_information_session_type, const gchar *value_session_information_application_identifier, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT */ #if defined HAVE_QMI_MESSAGE_UIM_READ_RECORD /** * qmi_message_uim_read_record_input_get_session_information: * @self: a #QmiMessageUimReadRecordInput. * @value_session_information_session_type: a placeholder for the output #QmiUimSessionType, or %NULL if not required. * @value_session_information_application_identifier: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Session Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.6 * Deprecated: 1.22: Use qmi_message_uim_read_record_input_get_session_information() instead. */ G_DEPRECATED_FOR (qmi_message_uim_read_record_input_get_session_information) gboolean qmi_message_uim_read_record_input_get_session_information ( QmiMessageUimReadRecordInput *self, QmiUimSessionType *value_session_information_session_type, const gchar **value_session_information_application_identifier, GError **error); /** * qmi_message_uim_read_record_input_set_session_information: * @self: a #QmiMessageUimReadRecordInput. * @value_session_information_session_type: a #QmiUimSessionType. * @value_session_information_application_identifier: a constant string. * @error: Return location for error or %NULL. * * Set the 'Session Information' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.6 * Deprecated: 1.22: Use qmi_message_uim_read_record_input_set_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_read_record_input_set_session) gboolean qmi_message_uim_read_record_input_set_session_information ( QmiMessageUimReadRecordInput *self, QmiUimSessionType value_session_information_session_type, const gchar *value_session_information_application_identifier, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_READ_RECORD */ #if defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES /** * qmi_message_uim_get_file_attributes_input_get_session_information: * @self: a #QmiMessageUimGetFileAttributesInput. * @value_session_information_session_type: a placeholder for the output #QmiUimSessionType, or %NULL if not required. * @value_session_information_application_identifier: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Session Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.6 * Deprecated: 1.22: Use qmi_message_uim_get_file_attributes_input_get_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_get_file_attributes_input_get_session) gboolean qmi_message_uim_get_file_attributes_input_get_session_information ( QmiMessageUimGetFileAttributesInput *self, QmiUimSessionType *value_session_information_session_type, const gchar **value_session_information_application_identifier, GError **error); /** * qmi_message_uim_get_file_attributes_input_set_session_information: * @self: a #QmiMessageUimGetFileAttributesInput. * @value_session_information_session_type: a #QmiUimSessionType. * @value_session_information_application_identifier: a constant string. * @error: Return location for error or %NULL. * * Set the 'Session Information' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.6 * Deprecated: 1.22: Use qmi_message_uim_get_file_attributes_input_set_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_get_file_attributes_input_set_session) gboolean qmi_message_uim_get_file_attributes_input_set_session_information ( QmiMessageUimGetFileAttributesInput *self, QmiUimSessionType value_session_information_session_type, const gchar *value_session_information_application_identifier, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES */ #if defined HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION /** * qmi_message_uim_set_pin_protection_input_get_session_information: * @self: a #QmiMessageUimSetPinProtectionInput. * @value_session_information_session_type: a placeholder for the output #QmiUimSessionType, or %NULL if not required. * @value_session_information_application_identifier: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Session Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_set_pin_protection_input_get_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_set_pin_protection_input_get_session) gboolean qmi_message_uim_set_pin_protection_input_get_session_information ( QmiMessageUimSetPinProtectionInput *self, QmiUimSessionType *value_session_information_session_type, const gchar **value_session_information_application_identifier, GError **error); /** * qmi_message_uim_set_pin_protection_input_set_session_information: * @self: a #QmiMessageUimSetPinProtectionInput. * @value_session_information_session_type: a #QmiUimSessionType. * @value_session_information_application_identifier: a constant string. * @error: Return location for error or %NULL. * * Set the 'Session Information' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_set_pin_protection_input_set_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_set_pin_protection_input_set_session) gboolean qmi_message_uim_set_pin_protection_input_set_session_information ( QmiMessageUimSetPinProtectionInput *self, QmiUimSessionType value_session_information_session_type, const gchar *value_session_information_application_identifier, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION */ #if defined HAVE_QMI_MESSAGE_UIM_VERIFY_PIN /** * qmi_message_uim_verify_pin_input_get_session_information: * @self: a #QmiMessageUimVerifyPinInput. * @value_session_information_session_type: a placeholder for the output #QmiUimSessionType, or %NULL if not required. * @value_session_information_application_identifier: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Session Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_verify_pin_input_get_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_verify_pin_input_get_session) gboolean qmi_message_uim_verify_pin_input_get_session_information ( QmiMessageUimVerifyPinInput *self, QmiUimSessionType *value_session_information_session_type, const gchar **value_session_information_application_identifier, GError **error); /** * qmi_message_uim_verify_pin_input_set_session_information: * @self: a #QmiMessageUimVerifyPinInput. * @value_session_information_session_type: a #QmiUimSessionType. * @value_session_information_application_identifier: a constant string. * @error: Return location for error or %NULL. * * Set the 'Session Information' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_verify_pin_input_set_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_verify_pin_input_set_session) gboolean qmi_message_uim_verify_pin_input_set_session_information ( QmiMessageUimVerifyPinInput *self, QmiUimSessionType value_session_information_session_type, const gchar *value_session_information_application_identifier, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_VERIFY_PIN */ #if defined HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN /** * qmi_message_uim_unblock_pin_input_get_session_information: * @self: a #QmiMessageUimUnblockPinInput. * @value_session_information_session_type: a placeholder for the output #QmiUimSessionType, or %NULL if not required. * @value_session_information_application_identifier: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Session Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_unblock_pin_input_get_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_unblock_pin_input_get_session) gboolean qmi_message_uim_unblock_pin_input_get_session_information ( QmiMessageUimUnblockPinInput *self, QmiUimSessionType *value_session_information_session_type, const gchar **value_session_information_application_identifier, GError **error); /** * qmi_message_uim_unblock_pin_input_set_session_information: * @self: a #QmiMessageUimUnblockPinInput. * @value_session_information_session_type: a #QmiUimSessionType. * @value_session_information_application_identifier: a constant string. * @error: Return location for error or %NULL. * * Set the 'Session Information' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_unblock_pin_input_set_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_unblock_pin_input_set_session) gboolean qmi_message_uim_unblock_pin_input_set_session_information ( QmiMessageUimUnblockPinInput *self, QmiUimSessionType value_session_information_session_type, const gchar *value_session_information_application_identifier, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN */ #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PIN /** * qmi_message_uim_change_pin_input_get_session_information: * @self: a #QmiMessageUimChangePinInput. * @value_session_information_session_type: a placeholder for the output #QmiUimSessionType, or %NULL if not required. * @value_session_information_application_identifier: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Session Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_change_pin_input_get_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_change_pin_input_get_session) gboolean qmi_message_uim_change_pin_input_get_session_information ( QmiMessageUimChangePinInput *self, QmiUimSessionType *value_session_information_session_type, const gchar **value_session_information_application_identifier, GError **error); /** * qmi_message_uim_change_pin_input_set_session_information: * @self: a #QmiMessageUimChangePinInput. * @value_session_information_session_type: a #QmiUimSessionType. * @value_session_information_application_identifier: a constant string. * @error: Return location for error or %NULL. * * Set the 'Session Information' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.14 * Deprecated: 1.22: Use qmi_message_uim_change_pin_input_set_session() instead. */ G_DEPRECATED_FOR (qmi_message_uim_change_pin_input_set_session) gboolean qmi_message_uim_change_pin_input_set_session_information ( QmiMessageUimChangePinInput *self, QmiUimSessionType value_session_information_session_type, const gchar *value_session_information_application_identifier, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_CHANGE_PIN */ #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION /** * QmiMessageDmsDellGetFirmwareVersionInput: * * The #QmiMessageDmsDellGetFirmwareVersionInput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22.4 * Deprecated: 1.26: Use #QmiMessageDmsFoxconnGetFirmwareVersionInput instead. */ typedef QmiMessageDmsFoxconnGetFirmwareVersionInput QmiDeprecatedMessageDmsDellGetFirmwareVersionInput; G_DEPRECATED_FOR (QmiMessageDmsFoxconnGetFirmwareVersionInput) typedef QmiDeprecatedMessageDmsDellGetFirmwareVersionInput QmiMessageDmsDellGetFirmwareVersionInput; #define QMI_TYPE_MESSAGE_DMS_DELL_GET_FIRMWARE_VERSION_INPUT QMI_TYPE_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION_INPUT G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_input_get_type) GType qmi_message_dms_dell_get_firmware_version_input_get_type (void) G_GNUC_CONST; /** * qmi_message_dms_dell_get_firmware_version_input_get_version_type: * @self: a #QmiMessageDmsDellGetFirmwareVersionInput. * @value_version_type: a placeholder for the output #QmiDmsDellFirmwareVersionType, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Version Type' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_input_get_version_type() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_input_get_version_type) gboolean qmi_message_dms_dell_get_firmware_version_input_get_version_type ( QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self, QmiDeprecatedDmsDellFirmwareVersionType *value_version_type, GError **error); /** * qmi_message_dms_dell_get_firmware_version_input_set_version_type: * @self: a #QmiMessageDmsDellGetFirmwareVersionInput. * @value_version_type: a #QmiDmsDellFirmwareVersionType. * @error: Return location for error or %NULL. * * Set the 'Version Type' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_input_set_version_type() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_input_set_version_type) gboolean qmi_message_dms_dell_get_firmware_version_input_set_version_type ( QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self, QmiDeprecatedDmsDellFirmwareVersionType value_version_type, GError **error); /** * qmi_message_dms_dell_get_firmware_version_input_ref: * @self: a #QmiMessageDmsDellGetFirmwareVersionInput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_input_ref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_input_ref) QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *qmi_message_dms_dell_get_firmware_version_input_ref (QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self); /** * qmi_message_dms_dell_get_firmware_version_input_unref: * @self: a #QmiMessageDmsDellGetFirmwareVersionInput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_input_unref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_input_unref) void qmi_message_dms_dell_get_firmware_version_input_unref (QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *self); /** * qmi_message_dms_dell_get_firmware_version_input_new: * * Allocates a new #QmiMessageDmsDellGetFirmwareVersionInput. * * Returns: the newly created #QmiMessageDmsDellGetFirmwareVersionInput. The returned value should be freed with qmi_message_dms_dell_get_firmware_version_input_unref(). * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_input_new() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_input_new) QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *qmi_message_dms_dell_get_firmware_version_input_new (void); /** * QmiMessageDmsDellGetFirmwareVersionOutput: * * The #QmiMessageDmsDellGetFirmwareVersionOutput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22.4 * Deprecated: 1.26: Use #QmiMessageDmsFoxconnGetFirmwareVersionOutput instead. */ typedef QmiMessageDmsFoxconnGetFirmwareVersionOutput QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput; G_DEPRECATED_FOR (QmiMessageDmsFoxconnGetFirmwareVersionOutput) typedef QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput QmiMessageDmsDellGetFirmwareVersionOutput; #define QMI_TYPE_MESSAGE_DMS_DELL_GET_FIRMWARE_VERSION_OUTPUT QMI_TYPE_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION_OUTPUT G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_output_get_type) GType qmi_message_dms_dell_get_firmware_version_output_get_type (void) G_GNUC_CONST; /** * qmi_message_dms_dell_get_firmware_version_output_get_result: * @self: a QmiMessageDmsDellGetFirmwareVersionOutput. * @error: Return location for error or %NULL. * * Get the result of the QMI operation. * * Returns: %TRUE if the QMI operation succeeded, %FALSE if @error is set. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_output_get_result() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_output_get_result) gboolean qmi_message_dms_dell_get_firmware_version_output_get_result ( QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self, GError **error); /** * qmi_message_dms_dell_get_firmware_version_output_get_version: * @self: a #QmiMessageDmsDellGetFirmwareVersionOutput. * @value_version: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Version' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_output_get_version() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_output_get_version) gboolean qmi_message_dms_dell_get_firmware_version_output_get_version ( QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self, const gchar **value_version, GError **error); /** * qmi_message_dms_dell_get_firmware_version_output_ref: * @self: a #QmiMessageDmsDellGetFirmwareVersionOutput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_output_ref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_output_ref) QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *qmi_message_dms_dell_get_firmware_version_output_ref (QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self); /** * qmi_message_dms_dell_get_firmware_version_output_unref: * @self: a #QmiMessageDmsDellGetFirmwareVersionOutput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_get_firmware_version_output_unref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_get_firmware_version_output_unref) void qmi_message_dms_dell_get_firmware_version_output_unref (QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *self); /** * qmi_client_dms_dell_get_firmware_version: * @self: a #QmiClientDms. * @input: a #QmiMessageDmsDellGetFirmwareVersionInput. * @timeout: maximum time to wait for the method to complete, in seconds. * @cancellable: a #GCancellable or %NULL. * @callback: a #GAsyncReadyCallback to call when the request is satisfied. * @user_data: user data to pass to @callback. * * Asynchronously sends a Dell Get Firmware Version request to the device. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. * * You can then call qmi_client_dms_dell_get_firmware_version_finish() to get the result of the operation. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_client_dms_foxconn_get_firmware_version() instead. */ G_DEPRECATED_FOR (qmi_client_dms_foxconn_get_firmware_version) void qmi_client_dms_dell_get_firmware_version ( QmiClientDms *self, QmiDeprecatedMessageDmsDellGetFirmwareVersionInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_client_dms_dell_get_firmware_version_finish: * @self: a #QmiClientDms. * @res: the #GAsyncResult obtained from the #GAsyncReadyCallback passed to qmi_client_dms_dell_get_firmware_version(). * @error: Return location for error or %NULL. * * Finishes an async operation started with qmi_client_dms_dell_get_firmware_version(). * * Returns: a #QmiMessageDmsDellGetFirmwareVersionOutput, or %NULL if @error is set. The returned value should be freed with qmi_message_dms_dell_get_firmware_version_output_unref(). * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_client_dms_foxconn_get_firmware_version_finish() instead. */ G_DEPRECATED_FOR (qmi_client_dms_foxconn_get_firmware_version_finish) QmiDeprecatedMessageDmsDellGetFirmwareVersionOutput *qmi_client_dms_dell_get_firmware_version_finish ( QmiClientDms *self, GAsyncResult *res, GError **error); #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION */ #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE /** * QmiMessageDmsDellChangeDeviceModeInput: * * The #QmiMessageDmsDellChangeDeviceModeInput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22.4 * Deprecated: 1.26: Use #QmiMessageDmsFoxconnChangeDeviceModeInput instead. */ typedef QmiMessageDmsFoxconnChangeDeviceModeInput QmiDeprecatedMessageDmsDellChangeDeviceModeInput; G_DEPRECATED_FOR (QmiMessageDmsFoxconnChangeDeviceModeInput) typedef QmiDeprecatedMessageDmsDellChangeDeviceModeInput QmiMessageDmsDellChangeDeviceModeInput; #define QMI_TYPE_MESSAGE_DMS_DELL_CHANGE_DEVICE_MODE_INPUT QMI_TYPE_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE_INPUT G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_input_get_type) GType qmi_message_dms_dell_change_device_mode_input_get_type (void) G_GNUC_CONST; /** * qmi_message_dms_dell_change_device_mode_input_get_mode: * @self: a #QmiMessageDmsDellChangeDeviceModeInput. * @value_mode: a placeholder for the output #QmiDmsDellDeviceMode, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Mode' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_input_get_mode() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_input_get_mode) gboolean qmi_message_dms_dell_change_device_mode_input_get_mode ( QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self, QmiDeprecatedDmsDellDeviceMode *value_mode, GError **error); /** * qmi_message_dms_dell_change_device_mode_input_set_mode: * @self: a #QmiMessageDmsDellChangeDeviceModeInput. * @value_mode: a #QmiDmsDellDeviceMode. * @error: Return location for error or %NULL. * * Set the 'Mode' field in the message. * * Returns: %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_input_set_mode() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_input_set_mode) gboolean qmi_message_dms_dell_change_device_mode_input_set_mode ( QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self, QmiDeprecatedDmsDellDeviceMode value_mode, GError **error); /** * qmi_message_dms_dell_change_device_mode_input_ref: * @self: a #QmiMessageDmsDellChangeDeviceModeInput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_input_ref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_input_ref) QmiDeprecatedMessageDmsDellChangeDeviceModeInput *qmi_message_dms_dell_change_device_mode_input_ref (QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self); /** * qmi_message_dms_dell_change_device_mode_input_unref: * @self: a #QmiMessageDmsDellChangeDeviceModeInput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_input_unref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_input_unref) void qmi_message_dms_dell_change_device_mode_input_unref (QmiDeprecatedMessageDmsDellChangeDeviceModeInput *self); /** * qmi_message_dms_dell_change_device_mode_input_new: * * Allocates a new #QmiMessageDmsDellChangeDeviceModeInput. * * Returns: the newly created #QmiMessageDmsDellChangeDeviceModeInput. The returned value should be freed with qmi_message_dms_dell_change_device_mode_input_unref(). * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_input_new() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_input_new) QmiDeprecatedMessageDmsDellChangeDeviceModeInput *qmi_message_dms_dell_change_device_mode_input_new (void); /** * QmiMessageDmsDellChangeDeviceModeOutput: * * The #QmiMessageDmsDellChangeDeviceModeOutput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22.4 * Deprecated: 1.26: Use #QmiMessageDmsFoxconnChangeDeviceModeOutput instead. */ typedef QmiMessageDmsFoxconnChangeDeviceModeOutput QmiDeprecatedMessageDmsDellChangeDeviceModeOutput; G_DEPRECATED_FOR (QmiMessageDmsFoxconnChangeDeviceModeOutput) typedef QmiDeprecatedMessageDmsDellChangeDeviceModeOutput QmiMessageDmsDellChangeDeviceModeOutput; #define QMI_TYPE_MESSAGE_DMS_DELL_CHANGE_DEVICE_MODE_OUTPUT QMI_TYPE_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE_OUTPUT G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_output_get_type) GType qmi_message_dms_dell_change_device_mode_output_get_type (void) G_GNUC_CONST; /** * qmi_message_dms_dell_change_device_mode_output_get_result: * @self: a QmiMessageDmsDellChangeDeviceModeOutput. * @error: Return location for error or %NULL. * * Get the result of the QMI operation. * * Returns: %TRUE if the QMI operation succeeded, %FALSE if @error is set. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_output_get_result() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_output_get_result) gboolean qmi_message_dms_dell_change_device_mode_output_get_result ( QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self, GError **error); /** * qmi_message_dms_dell_change_device_mode_output_ref: * @self: a #QmiMessageDmsDellChangeDeviceModeOutput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_output_ref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_output_ref) QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *qmi_message_dms_dell_change_device_mode_output_ref (QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self); /** * qmi_message_dms_dell_change_device_mode_output_unref: * @self: a #QmiMessageDmsDellChangeDeviceModeOutput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_message_dms_foxconn_change_device_mode_output_unref() instead. */ G_DEPRECATED_FOR (qmi_message_dms_foxconn_change_device_mode_output_unref) void qmi_message_dms_dell_change_device_mode_output_unref (QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *self); /** * qmi_client_dms_dell_change_device_mode: * @self: a #QmiClientDms. * @input: a #QmiMessageDmsDellChangeDeviceModeInput. * @timeout: maximum time to wait for the method to complete, in seconds. * @cancellable: a #GCancellable or %NULL. * @callback: a #GAsyncReadyCallback to call when the request is satisfied. * @user_data: user data to pass to @callback. * * Asynchronously sends a Dell Change Device Mode request to the device. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. * * You can then call qmi_client_dms_dell_change_device_mode_finish() to get the result of the operation. * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_client_dms_foxconn_change_device_mode() instead. */ G_DEPRECATED_FOR (qmi_client_dms_foxconn_change_device_mode) void qmi_client_dms_dell_change_device_mode ( QmiClientDms *self, QmiDeprecatedMessageDmsDellChangeDeviceModeInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_client_dms_dell_change_device_mode_finish: * @self: a #QmiClientDms. * @res: the #GAsyncResult obtained from the #GAsyncReadyCallback passed to qmi_client_dms_dell_change_device_mode(). * @error: Return location for error or %NULL. * * Finishes an async operation started with qmi_client_dms_dell_change_device_mode(). * * Returns: a #QmiMessageDmsDellChangeDeviceModeOutput, or %NULL if @error is set. The returned value should be freed with qmi_message_dms_dell_change_device_mode_output_unref(). * * Since: 1.22.4 * Deprecated: 1.26: Use qmi_client_dms_foxconn_change_device_mode_finish() instead. */ G_DEPRECATED_FOR (qmi_client_dms_foxconn_change_device_mode_finish) QmiDeprecatedMessageDmsDellChangeDeviceModeOutput *qmi_client_dms_dell_change_device_mode_finish ( QmiClientDms *self, GAsyncResult *res, GError **error); #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE */ #if defined HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME /** * qmi_message_nas_get_operator_name_output_get_operator_nitz_information: * @self: a #QmiMessageNasGetOperatorNameOutput. * @value_operator_nitz_information_name_encoding: a placeholder for the output #QmiNasPlmnEncodingScheme, or %NULL if not required. * @value_operator_nitz_information_short_country_initials: a placeholder for the output #QmiNasPlmnNameCountryInitials, or %NULL if not required. * @value_operator_nitz_information_long_name_spare_bits: a placeholder for the output #QmiNasPlmnNameSpareBits, or %NULL if not required. * @value_operator_nitz_information_short_name_spare_bits: a placeholder for the output #QmiNasPlmnNameSpareBits, or %NULL if not required. * @value_operator_nitz_information_long_name: a placeholder for the output constant string, or %NULL if not required. * @value_operator_nitz_information_short_name: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Operator NITZ Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.24.6: Use qmi_message_nas_get_operator_name_output_get_nitz_information() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_operator_name_output_get_nitz_information) gboolean qmi_message_nas_get_operator_name_output_get_operator_nitz_information ( QmiMessageNasGetOperatorNameOutput *self, QmiNasPlmnEncodingScheme *value_operator_nitz_information_name_encoding, QmiNasPlmnNameCountryInitials *value_operator_nitz_information_short_country_initials, QmiNasPlmnNameSpareBits *value_operator_nitz_information_long_name_spare_bits, QmiNasPlmnNameSpareBits *value_operator_nitz_information_short_name_spare_bits, const gchar **value_operator_nitz_information_long_name, const gchar **value_operator_nitz_information_short_name, GError **error); #endif /* HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME */ #if defined HAVE_QMI_INDICATION_NAS_OPERATOR_NAME /** * qmi_indication_nas_operator_name_output_get_operator_nitz_information: * @self: a #QmiIndicationNasOperatorNameOutput. * @value_operator_nitz_information_name_encoding: a placeholder for the output #QmiNasPlmnEncodingScheme, or %NULL if not required. * @value_operator_nitz_information_short_country_initials: a placeholder for the output #QmiNasPlmnNameCountryInitials, or %NULL if not required. * @value_operator_nitz_information_long_name_spare_bits: a placeholder for the output #QmiNasPlmnNameSpareBits, or %NULL if not required. * @value_operator_nitz_information_short_name_spare_bits: a placeholder for the output #QmiNasPlmnNameSpareBits, or %NULL if not required. * @value_operator_nitz_information_long_name: a placeholder for the output constant string, or %NULL if not required. * @value_operator_nitz_information_short_name: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Operator NITZ Information' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.24.6: Use qmi_indication_nas_operator_name_output_get_nitz_information() instead. */ G_DEPRECATED_FOR (qmi_indication_nas_operator_name_output_get_nitz_information) gboolean qmi_indication_nas_operator_name_output_get_operator_nitz_information ( QmiIndicationNasOperatorNameOutput *self, QmiNasPlmnEncodingScheme *value_operator_nitz_information_name_encoding, QmiNasPlmnNameCountryInitials *value_operator_nitz_information_short_country_initials, QmiNasPlmnNameSpareBits *value_operator_nitz_information_long_name_spare_bits, QmiNasPlmnNameSpareBits *value_operator_nitz_information_short_name_spare_bits, const gchar **value_operator_nitz_information_long_name, const gchar **value_operator_nitz_information_short_name, GError **error); #endif /* HAVE_QMI_INDICATION_NAS_OPERATOR_NAME */ #if defined HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK /** * qmi_message_nas_get_home_network_output_get_home_network_3gpp2: * @self: a #QmiMessageNasGetHomeNetworkOutput. * @value_home_network_3gpp2_mcc: a placeholder for the output #guint16, or %NULL if not required. * @value_home_network_3gpp2_mnc: a placeholder for the output #guint16, or %NULL if not required. * @value_home_network_3gpp2_display_description: a placeholder for the output #QmiNasNetworkDescriptionDisplay, or %NULL if not required. * @value_home_network_3gpp2_description_encoding: a placeholder for the output #QmiNasNetworkDescriptionEncoding, or %NULL if not required. * @value_home_network_3gpp2_description: a placeholder for the output constant string, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Home Network 3GPP2' field from @self. * * Returns: %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.24.6: Use qmi_message_nas_get_home_network_output_get_home_network_3gpp2_ext() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_home_network_output_get_home_network_3gpp2_ext) gboolean qmi_message_nas_get_home_network_output_get_home_network_3gpp2 ( QmiMessageNasGetHomeNetworkOutput *self, guint16 *value_home_network_3gpp2_mcc, guint16 *value_home_network_3gpp2_mnc, QmiNasNetworkDescriptionDisplay *value_home_network_3gpp2_display_description, QmiNasNetworkDescriptionEncoding *value_home_network_3gpp2_description_encoding, const gchar **value_home_network_3gpp2_description, GError **error); #endif /* HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK */ #if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO /** * QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement: * @cell_id: a #guint32. * @plmn: a string of exactly 3 characters. * @lac: a #guint16. * @geran_absolute_rf_channel_number: a #guint16. * @base_station_identity_code: a #guint8. * @rx_level: a #guint16. * * GERAN info cell. * * This type is deprecated and returns always an empty @plmn string. * * Since: 1.10 * Deprecated: 1.26.6. */ G_DEPRECATED typedef struct _QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement { guint32 cell_id; gchar *plmn; guint16 lac; guint16 geran_absolute_rf_channel_number; guint8 base_station_identity_code; guint16 rx_level; } QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement; /** * QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoCellElement: * * Intra-frequency LTE info cell. * * The format of this deprecated type is really the same as for the * new #QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement type, * it is only a name change. * * Since: 1.10 * Deprecated: 1.26.6. Use #QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement instead. */ G_DEPRECATED_FOR (QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement) typedef QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoCellElement; /** * qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info: * @self: a #QmiMessageNasGetCellLocationInfoOutput. * @value_intrafrequency_lte_info_ue_in_idle: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_intrafrequency_lte_info_plmn: (out): a placeholder for the output constant string, or %NULL if not required. * @value_intrafrequency_lte_info_tracking_area_code: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_intrafrequency_lte_info_global_cell_id: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_intrafrequency_lte_info_eutra_absolute_rf_channel_number: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_intrafrequency_lte_info_serving_cell_id: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_intrafrequency_lte_info_cell_reselection_priority: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_intrafrequency_lte_info_s_non_intra_search_threshold: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_intrafrequency_lte_info_serving_cell_low_threshold: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_intrafrequency_lte_info_s_intra_search_threshold: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_intrafrequency_lte_info_cell: (out)(element-type QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoCellElement)(transfer none): a placeholder for the output #GArray of #QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoCellElement elements, or %NULL if not required. Do not free it, it is owned by @self. * @error: Return location for error or %NULL. * * Get the 'Intrafrequency LTE Info' field from @self. * * This method is deprecated and returns an empty * @value_intrafrequency_lte_info_plmn string. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.10 * Deprecated: 1.26.6. Use qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info_v2) gboolean qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info ( QmiMessageNasGetCellLocationInfoOutput *self, gboolean *value_intrafrequency_lte_info_ue_in_idle, const gchar **value_intrafrequency_lte_info_plmn, guint16 *value_intrafrequency_lte_info_tracking_area_code, guint32 *value_intrafrequency_lte_info_global_cell_id, guint16 *value_intrafrequency_lte_info_eutra_absolute_rf_channel_number, guint16 *value_intrafrequency_lte_info_serving_cell_id, guint8 *value_intrafrequency_lte_info_cell_reselection_priority, guint8 *value_intrafrequency_lte_info_s_non_intra_search_threshold, guint8 *value_intrafrequency_lte_info_serving_cell_low_threshold, guint8 *value_intrafrequency_lte_info_s_intra_search_threshold, GArray **value_intrafrequency_lte_info_cell, GError **error); /** * QmiMessageNasGetCellLocationInfoOutputUmtsInfoCellElement: * * UMTS info cell. * * The format of this deprecated type is really the same as for the * new #QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2CellElement type, * it is only a name change. * * Since: 1.10 * Deprecated: 1.26.6. Use #QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2CellElement instead. */ G_DEPRECATED_FOR (QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2CellElement) typedef QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2CellElement QmiMessageNasGetCellLocationInfoOutputUmtsInfoCellElement; /** * QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringGeranElement: * * UMTS info neighboring GERAN cell. * * The format of this deprecated type is really the same as for the * new #QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2NeighboringGeranElement type, * it is only a name change. * * Since: 1.10 * Deprecated: 1.26.6. Use #QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2NeighboringGeranElement instead. */ G_DEPRECATED_FOR (QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2NeighboringGeranElement) typedef QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2NeighboringGeranElement QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringGeranElement; /** * qmi_message_nas_get_cell_location_info_output_get_umts_info: * @self: a #QmiMessageNasGetCellLocationInfoOutput. * @value_umts_info_cell_id: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_umts_info_plmn: (out): a placeholder for the output constant string, or %NULL if not required. * @value_umts_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_umts_info_utra_absolute_rf_channel_number: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_umts_info_primary_scrambling_code: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_umts_info_rscp: (out): a placeholder for the output #gint16, or %NULL if not required. * @value_umts_info_ecio: (out): a placeholder for the output #gint16, or %NULL if not required. * @value_umts_info_cell: (out)(element-type QmiMessageNasGetCellLocationInfoOutputUmtsInfoCellElement)(transfer none): a placeholder for the output #GArray of #QmiMessageNasGetCellLocationInfoOutputUmtsInfoCellElement elements, or %NULL if not required. Do not free it, it is owned by @self. * @value_umts_info_neighboring_geran: (out)(element-type QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringGeranElement)(transfer none): a placeholder for the output #GArray of #QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringGeranElement elements, or %NULL if not required. Do not free it, it is owned by @self. * @error: Return location for error or %NULL. * * Get the 'UMTS Info' field from @self. * * This method is deprecated and returns an empty @value_umts_info_plmn * string. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.10 * Deprecated: 1.26.6. Use qmi_message_nas_get_cell_location_info_output_get_umts_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_cell_location_info_output_get_umts_info_v2) gboolean qmi_message_nas_get_cell_location_info_output_get_umts_info ( QmiMessageNasGetCellLocationInfoOutput *self, guint16 *value_umts_info_cell_id, const gchar **value_umts_info_plmn, guint16 *value_umts_info_lac, guint16 *value_umts_info_utra_absolute_rf_channel_number, guint16 *value_umts_info_primary_scrambling_code, gint16 *value_umts_info_rscp, gint16 *value_umts_info_ecio, GArray **value_umts_info_cell, GArray **value_umts_info_neighboring_geran, GError **error); /** * qmi_message_nas_get_cell_location_info_output_get_geran_info: * @self: a #QmiMessageNasGetCellLocationInfoOutput. * @value_geran_info_cell_id: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_geran_info_plmn: (out): a placeholder for the output constant string, or %NULL if not required. * @value_geran_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_geran_info_geran_absolute_rf_channel_number: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_geran_info_base_station_identity_code: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_geran_info_timing_advance: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_geran_info_rx_level: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_geran_info_cell: (out)(element-type QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement)(transfer none): a placeholder for the output #GArray of #QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement elements, or %NULL if not required. Do not free it, it is owned by @self. * @error: Return location for error or %NULL. * * Get the 'GERAN Info' field from @self. * * This method is deprecated and returns an empty @value_geran_info_plmn * string. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.10 * Deprecated: 1.26.6. Use qmi_message_nas_get_cell_location_info_output_get_geran_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_cell_location_info_output_get_geran_info_v2) gboolean qmi_message_nas_get_cell_location_info_output_get_geran_info ( QmiMessageNasGetCellLocationInfoOutput *self, guint32 *value_geran_info_cell_id, const gchar **value_geran_info_plmn, guint16 *value_geran_info_lac, guint16 *value_geran_info_geran_absolute_rf_channel_number, guint8 *value_geran_info_base_station_identity_code, guint32 *value_geran_info_timing_advance, guint16 *value_geran_info_rx_level, GArray **value_geran_info_cell, GError **error); #endif /* HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO */ #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER /** * QmiMessageWdsGetDefaultProfileNumInput: * * The #QmiMessageWdsGetDefaultProfileNumInput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22 * Deprecated: 1.28: Use #QmiMessageWdsGetDefaultProfileNumberInput instead. */ typedef QmiMessageWdsGetDefaultProfileNumberInput QmiDeprecatedMessageWdsGetDefaultProfileNumInput; G_DEPRECATED_FOR (QmiMessageWdsGetDefaultProfileNumberInput) typedef QmiDeprecatedMessageWdsGetDefaultProfileNumInput QmiMessageWdsGetDefaultProfileNumInput; #define QMI_TYPE_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUM_INPUT QMI_TYPE_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER_INPUT G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_input_get_type) GType qmi_message_wds_get_default_profile_num_input_get_type (void) G_GNUC_CONST; /** * qmi_message_wds_get_default_profile_num_input_get_profile_type: * @self: a #QmiMessageWdsGetDefaultProfileNumInput. * @value_profile_type_profile_type: (out): a placeholder for the output #QmiWdsProfileType, or %NULL if not required. * @value_profile_type_profile_family: (out): a placeholder for the output #QmiWdsProfileFamily, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Profile Type' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_input_get_profile_type() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_input_get_profile_type) gboolean qmi_message_wds_get_default_profile_num_input_get_profile_type ( QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self, QmiWdsProfileType *value_profile_type_profile_type, QmiWdsProfileFamily *value_profile_type_profile_family, GError **error); /** * qmi_message_wds_get_default_profile_num_input_set_profile_type: * @self: a #QmiMessageWdsGetDefaultProfileNumInput. * @value_profile_type_profile_type: a #QmiWdsProfileType. * @value_profile_type_profile_family: a #QmiWdsProfileFamily. * @error: Return location for error or %NULL. * * Set the 'Profile Type' field in the message. * * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_input_set_profile_type() instead. */ G_DEPRECATED_FOR (Use qmi_message_wds_get_default_profile_number_input_set_profile_type) gboolean qmi_message_wds_get_default_profile_num_input_set_profile_type ( QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self, QmiWdsProfileType value_profile_type_profile_type, QmiWdsProfileFamily value_profile_type_profile_family, GError **error); /** * qmi_message_wds_get_default_profile_num_input_ref: * @self: a #QmiMessageWdsGetDefaultProfileNumInput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_input_ref() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_input_ref) QmiDeprecatedMessageWdsGetDefaultProfileNumInput *qmi_message_wds_get_default_profile_num_input_ref (QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self); /** * qmi_message_wds_get_default_profile_num_input_unref: * @self: a #QmiMessageWdsGetDefaultProfileNumInput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_input_unref() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_input_unref) void qmi_message_wds_get_default_profile_num_input_unref (QmiDeprecatedMessageWdsGetDefaultProfileNumInput *self); /** * qmi_message_wds_get_default_profile_num_input_new: * * Allocates a new #QmiMessageWdsGetDefaultProfileNumInput. * * Returns: the newly created #QmiMessageWdsGetDefaultProfileNumInput. The returned value should be freed with qmi_message_wds_get_default_profile_num_input_unref(). * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_input_new() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_input_new) QmiDeprecatedMessageWdsGetDefaultProfileNumInput *qmi_message_wds_get_default_profile_num_input_new (void); /** * QmiMessageWdsGetDefaultProfileNumOutput: * * The #QmiMessageWdsGetDefaultProfileNumOutput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22 * Deprecated: 1.28. Use #QmiMessageWdsGetDefaultProfileNumberOutput instead. */ typedef QmiMessageWdsGetDefaultProfileNumberOutput QmiDeprecatedMessageWdsGetDefaultProfileNumOutput; G_DEPRECATED_FOR (QmiMessageWdsGetDefaultProfileNumberOutput) typedef QmiDeprecatedMessageWdsGetDefaultProfileNumOutput QmiMessageWdsGetDefaultProfileNumOutput; #define QMI_TYPE_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUM_OUTPUT QMI_TYPE_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER_OUTPUT G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_output_get_type) GType qmi_message_wds_get_default_profile_num_output_get_type (void) G_GNUC_CONST; /** * qmi_message_wds_get_default_profile_num_output_get_result: * @self: a QmiMessageWdsGetDefaultProfileNumOutput. * @error: Return location for error or %NULL. * * Get the result of the QMI operation. * * Returns: (skip): %TRUE if the QMI operation succeeded, %FALSE if @error is set. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_output_get_result() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_output_get_result) gboolean qmi_message_wds_get_default_profile_num_output_get_result ( QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, GError **error); /** * qmi_message_wds_get_default_profile_num_output_get_default_profile_number: * @self: a #QmiMessageWdsGetDefaultProfileNumOutput. * @value_default_profile_number: (out): a placeholder for the output #guint8, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Default Profile Number' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_output_get_index() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_output_get_index) gboolean qmi_message_wds_get_default_profile_num_output_get_default_profile_number ( QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, guint8 *value_default_profile_number, GError **error); /** * qmi_message_wds_get_default_profile_num_output_get_extended_error_code: * @self: a #QmiMessageWdsGetDefaultProfileNumOutput. * @value_extended_error_code: (out): a placeholder for the output #QmiWdsDsProfileError, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Extended Error Code' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_output_get_extended_error_code() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_output_get_extended_error_code) gboolean qmi_message_wds_get_default_profile_num_output_get_extended_error_code ( QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self, QmiWdsDsProfileError *value_extended_error_code, GError **error); /** * qmi_message_wds_get_default_profile_num_output_ref: * @self: a #QmiMessageWdsGetDefaultProfileNumOutput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_output_ref() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_output_ref) QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *qmi_message_wds_get_default_profile_num_output_ref (QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self); /** * qmi_message_wds_get_default_profile_num_output_unref: * @self: a #QmiMessageWdsGetDefaultProfileNumOutput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_get_default_profile_number_output_unref() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_output_unref) void qmi_message_wds_get_default_profile_num_output_unref (QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *self); /** * qmi_client_wds_get_default_profile_num: * @self: a #QmiClientWds. * @input: a #QmiMessageWdsGetDefaultProfileNumberInput. * @timeout: maximum time to wait for the method to complete, in seconds. * @cancellable: a #GCancellable or %NULL. * @callback: a #GAsyncReadyCallback to call when the request is satisfied. * @user_data: user data to pass to @callback. * * Asynchronously sends a Get Default Profile Number request to the device. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. * * You can then call qmi_client_wds_get_default_profile_number_finish() to get the result of the operation. * * Since: 1.22 * Deprecated: 1.28. Use qmi_client_wds_get_default_profile_number() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number) void qmi_client_wds_get_default_profile_num ( QmiClientWds *self, QmiDeprecatedMessageWdsGetDefaultProfileNumInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_client_wds_get_default_profile_num_finish: * @self: a #QmiClientWds. * @res: the #GAsyncResult obtained from the #GAsyncReadyCallback passed to qmi_client_wds_get_default_profile_number(). * @error: Return location for error or %NULL. * * Finishes an async operation started with qmi_client_wds_get_default_profile_number(). * * Returns: a #QmiMessageWdsGetDefaultProfileNumberOutput, or %NULL if @error is set. The returned value should be freed with qmi_message_wds_get_default_profile_number_output_unref(). * * Since: 1.22 * Deprecated: 1.28. Use qmi_client_wds_get_default_profile_number_finish() instead. */ G_DEPRECATED_FOR (qmi_message_wds_get_default_profile_number_finish) QmiDeprecatedMessageWdsGetDefaultProfileNumOutput *qmi_client_wds_get_default_profile_num_finish ( QmiClientWds *self, GAsyncResult *res, GError **error); #endif /* HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER */ #if defined HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER /** * QmiMessageWdsSetDefaultProfileNumInput: * * The #QmiMessageWdsSetDefaultProfileNumInput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22 * Deprecated: 1.28. Use #QmiMessageWdsSetDefaultProfileNumberInput instead. */ typedef QmiMessageWdsSetDefaultProfileNumberInput QmiDeprecatedMessageWdsSetDefaultProfileNumInput; G_DEPRECATED_FOR (QmiMessageWdsSetDefaultProfileNumberInput) typedef QmiDeprecatedMessageWdsSetDefaultProfileNumInput QmiMessageWdsSetDefaultProfileNumInput; #define QMI_TYPE_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUM_INPUT QMI_TYPE_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER_INPUT G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_input_get_type) GType qmi_message_wds_set_default_profile_num_input_get_type (void) G_GNUC_CONST; /** * qmi_message_wds_set_default_profile_num_input_get_profile_identifier: * @self: a #QmiMessageWdsSetDefaultProfileNumInput. * @value_profile_identifier_profile_type: (out): a placeholder for the output #QmiWdsProfileType, or %NULL if not required. * @value_profile_identifier_profile_family: (out): a placeholder for the output #QmiWdsProfileFamily, or %NULL if not required. * @value_profile_identifier_profile_index: (out): a placeholder for the output #guint8, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Profile Identifier' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_input_get_profile_identifier() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_input_get_profile_identifier) gboolean qmi_message_wds_set_default_profile_num_input_get_profile_identifier ( QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self, QmiWdsProfileType *value_profile_identifier_profile_type, QmiWdsProfileFamily *value_profile_identifier_profile_family, guint8 *value_profile_identifier_profile_index, GError **error); /** * qmi_message_wds_set_default_profile_num_input_set_profile_identifier: * @self: a #QmiMessageWdsSetDefaultProfileNumInput. * @value_profile_identifier_profile_type: a #QmiWdsProfileType. * @value_profile_identifier_profile_family: a #QmiWdsProfileFamily. * @value_profile_identifier_profile_index: a #guint8. * @error: Return location for error or %NULL. * * Set the 'Profile Identifier' field in the message. * * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_input_set_profile_identifier() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_input_set_profile_identifier) gboolean qmi_message_wds_set_default_profile_num_input_set_profile_identifier ( QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self, QmiWdsProfileType value_profile_identifier_profile_type, QmiWdsProfileFamily value_profile_identifier_profile_family, guint8 value_profile_identifier_profile_index, GError **error); /** * qmi_message_wds_set_default_profile_num_input_ref: * @self: a #QmiMessageWdsSetDefaultProfileNumInput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_input_ref() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_input_ref) QmiDeprecatedMessageWdsSetDefaultProfileNumInput *qmi_message_wds_set_default_profile_num_input_ref (QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self); /** * qmi_message_wds_set_default_profile_num_input_unref: * @self: a #QmiMessageWdsSetDefaultProfileNumInput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_input_unref() instead. */ G_DEPRECATED_FOR (Use qmi_message_wds_set_default_profile_number_input_unref) void qmi_message_wds_set_default_profile_num_input_unref (QmiDeprecatedMessageWdsSetDefaultProfileNumInput *self); /** * qmi_message_wds_set_default_profile_num_input_new: * * Allocates a new #QmiMessageWdsSetDefaultProfileNumInput. * * Returns: the newly created #QmiMessageWdsSetDefaultProfileNumInput. The returned value should be freed with qmi_message_wds_set_default_profile_num_input_unref(). * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_input_new() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_input_new) QmiDeprecatedMessageWdsSetDefaultProfileNumInput *qmi_message_wds_set_default_profile_num_input_new (void); /** * QmiMessageWdsSetDefaultProfileNumOutput: * * The #QmiMessageWdsSetDefaultProfileNumOutput structure contains private data and should only be accessed * using the provided API. * * Since: 1.22 * Deprecated: 1.28. Use #QmiMessageWdsSetDefaultProfileNumberOutput instead. */ typedef QmiMessageWdsSetDefaultProfileNumberOutput QmiDeprecatedMessageWdsSetDefaultProfileNumOutput; G_DEPRECATED_FOR (QmiMessageWdsSetDefaultProfileNumberOutput) typedef QmiDeprecatedMessageWdsSetDefaultProfileNumOutput QmiMessageWdsSetDefaultProfileNumOutput; #define QMI_TYPE_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUM_OUTPUT QMI_TYPE_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER_OUTPUT G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_output_get_type) GType qmi_message_wds_set_default_profile_num_output_get_type (void) G_GNUC_CONST; /** * qmi_message_wds_set_default_profile_num_output_get_result: * @self: a QmiMessageWdsSetDefaultProfileNumOutput. * @error: Return location for error or %NULL. * * Get the result of the QMI operation. * * Returns: (skip): %TRUE if the QMI operation succeeded, %FALSE if @error is set. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_output_get_result() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_output_get_result) gboolean qmi_message_wds_set_default_profile_num_output_get_result ( QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self, GError **error); /** * qmi_message_wds_set_default_profile_num_output_get_extended_error_code: * @self: a #QmiMessageWdsSetDefaultProfileNumOutput. * @value_extended_error_code: (out): a placeholder for the output #QmiWdsDsProfileError, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Extended Error Code' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_output_get_extended_error_code() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_output_get_extended_error_code) gboolean qmi_message_wds_set_default_profile_num_output_get_extended_error_code ( QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self, QmiWdsDsProfileError *value_extended_error_code, GError **error); /** * qmi_message_wds_set_default_profile_num_output_ref: * @self: a #QmiMessageWdsSetDefaultProfileNumOutput. * * Atomically increments the reference count of @self by one. * * Returns: the new reference to @self. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_output_ref() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_output_ref) QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *qmi_message_wds_set_default_profile_num_output_ref (QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self); /** * qmi_message_wds_set_default_profile_num_output_unref: * @self: a #QmiMessageWdsSetDefaultProfileNumOutput. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.22 * Deprecated: 1.28. Use qmi_message_wds_set_default_profile_number_output_unref() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_output_unref) void qmi_message_wds_set_default_profile_num_output_unref (QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *self); /** * qmi_client_wds_set_default_profile_num: * @self: a #QmiClientWds. * @input: a #QmiMessageWdsSetDefaultProfileNumberInput. * @timeout: maximum time to wait for the method to complete, in seconds. * @cancellable: a #GCancellable or %NULL. * @callback: a #GAsyncReadyCallback to call when the request is satisfied. * @user_data: user data to pass to @callback. * * Asynchronously sends a Set Default Profile Number request to the device. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. * * You can then call qmi_client_wds_set_default_profile_number_finish() to get the result of the operation. * * Since: 1.22 * Deprecated: 1.28. Use qmi_client_wds_set_default_profile_number() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number) void qmi_client_wds_set_default_profile_num ( QmiClientWds *self, QmiDeprecatedMessageWdsSetDefaultProfileNumInput *input, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_client_wds_set_default_profile_num_finish: * @self: a #QmiClientWds. * @res: the #GAsyncResult obtained from the #GAsyncReadyCallback passed to qmi_client_wds_set_default_profile_number(). * @error: Return location for error or %NULL. * * Finishes an async operation started with qmi_client_wds_set_default_profile_number(). * * Returns: a #QmiMessageWdsSetDefaultProfileNumberOutput, or %NULL if @error is set. The returned value should be freed with qmi_message_wds_set_default_profile_number_output_unref(). * * Since: 1.22 * Deprecated: 1.28. Use qmi_client_wds_set_default_profile_number_finish() instead. */ G_DEPRECATED_FOR (qmi_message_wds_set_default_profile_number_finish) QmiDeprecatedMessageWdsSetDefaultProfileNumOutput *qmi_client_wds_set_default_profile_num_finish ( QmiClientWds *self, GAsyncResult *res, GError **error); #endif /* HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO /** * qmi_message_nas_get_system_info_output_get_gsm_system_info: * @self: a #QmiMessageNasGetSystemInfoOutput. * @value_gsm_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_gsm_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_gsm_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_gsm_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_gsm_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_gsm_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_gsm_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_gsm_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_gsm_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_gsm_system_info_egprs_support_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_egprs_support: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_dtm_support_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_dtm_support: (out): a placeholder for the output #gboolean, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'GSM System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30. Use qmi_message_nas_get_system_info_output_get_gsm_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_system_info_output_get_gsm_system_info_v2) gboolean qmi_message_nas_get_system_info_output_get_gsm_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_gsm_system_info_domain_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_domain, gboolean *value_gsm_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_service_capability, gboolean *value_gsm_system_info_roaming_status_valid, QmiNasRoamingStatus *value_gsm_system_info_roaming_status, gboolean *value_gsm_system_info_forbidden_valid, gboolean *value_gsm_system_info_forbidden, gboolean *value_gsm_system_info_lac_valid, guint16 *value_gsm_system_info_lac, gboolean *value_gsm_system_info_cid_valid, guint32 *value_gsm_system_info_cid, gboolean *value_gsm_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_registration_reject_domain, guint8 *value_gsm_system_info_registration_reject_cause, gboolean *value_gsm_system_info_network_id_valid, const gchar **value_gsm_system_info_mcc, const gchar **value_gsm_system_info_mnc, gboolean *value_gsm_system_info_egprs_support_valid, gboolean *value_gsm_system_info_egprs_support, gboolean *value_gsm_system_info_dtm_support_valid, gboolean *value_gsm_system_info_dtm_support, GError **error); /** * qmi_message_nas_get_system_info_output_get_wcdma_system_info: * @self: a #QmiMessageNasGetSystemInfoOutput. * @value_wcdma_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_wcdma_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_wcdma_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_wcdma_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_wcdma_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_wcdma_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_wcdma_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_wcdma_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_wcdma_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_wcdma_system_info_hs_call_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_hs_call_status: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_wcdma_system_info_hs_service_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_hs_service: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_wcdma_system_info_primary_scrambling_code_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_primary_scrambling_code: (out): a placeholder for the output #guint16, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'WCDMA System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30. Use qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2) gboolean qmi_message_nas_get_system_info_output_get_wcdma_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_wcdma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_domain, gboolean *value_wcdma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_service_capability, gboolean *value_wcdma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_wcdma_system_info_roaming_status, gboolean *value_wcdma_system_info_forbidden_valid, gboolean *value_wcdma_system_info_forbidden, gboolean *value_wcdma_system_info_lac_valid, guint16 *value_wcdma_system_info_lac, gboolean *value_wcdma_system_info_cid_valid, guint32 *value_wcdma_system_info_cid, gboolean *value_wcdma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_registration_reject_domain, guint8 *value_wcdma_system_info_registration_reject_cause, gboolean *value_wcdma_system_info_network_id_valid, const gchar **value_wcdma_system_info_mcc, const gchar **value_wcdma_system_info_mnc, gboolean *value_wcdma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_call_status, gboolean *value_wcdma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_service, gboolean *value_wcdma_system_info_primary_scrambling_code_valid, guint16 *value_wcdma_system_info_primary_scrambling_code, GError **error); /** * qmi_message_nas_get_system_info_output_get_lte_system_info: * @self: a #QmiMessageNasGetSystemInfoOutput. * @value_lte_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_lte_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_lte_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_lte_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_lte_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_lte_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_lte_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_lte_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_lte_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_lte_system_info_tac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_tac: (out): a placeholder for the output #guint16, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'LTE System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30. Use qmi_message_nas_get_system_info_output_get_lte_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_system_info_output_get_lte_system_info_v2) gboolean qmi_message_nas_get_system_info_output_get_lte_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_lte_system_info_domain_valid, QmiNasNetworkServiceDomain *value_lte_system_info_domain, gboolean *value_lte_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_lte_system_info_service_capability, gboolean *value_lte_system_info_roaming_status_valid, QmiNasRoamingStatus *value_lte_system_info_roaming_status, gboolean *value_lte_system_info_forbidden_valid, gboolean *value_lte_system_info_forbidden, gboolean *value_lte_system_info_lac_valid, guint16 *value_lte_system_info_lac, gboolean *value_lte_system_info_cid_valid, guint32 *value_lte_system_info_cid, gboolean *value_lte_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_lte_system_info_registration_reject_domain, guint8 *value_lte_system_info_registration_reject_cause, gboolean *value_lte_system_info_network_id_valid, const gchar **value_lte_system_info_mcc, const gchar **value_lte_system_info_mnc, gboolean *value_lte_system_info_tac_valid, guint16 *value_lte_system_info_tac, GError **error); /** * qmi_message_nas_get_system_info_output_get_td_scdma_system_info: * @self: a #QmiMessageNasGetSystemInfoOutput. * @value_td_scdma_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_td_scdma_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_td_scdma_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_td_scdma_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_td_scdma_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_td_scdma_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_td_scdma_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_td_scdma_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_td_scdma_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_td_scdma_system_info_hs_call_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_hs_call_status: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_td_scdma_system_info_hs_service_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_hs_service: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_td_scdma_system_info_cell_parameter_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_cell_parameter_id: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_td_scdma_system_info_cell_broadcast_support_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_cell_broadcast_support: (out): a placeholder for the output #QmiNasCellBroadcastCapability, or %NULL if not required. * @value_td_scdma_system_info_cs_call_barring_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_cs_call_barring_status: (out): a placeholder for the output #QmiNasCallBarringStatus, or %NULL if not required. * @value_td_scdma_system_info_ps_call_barring_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_ps_call_barring_status: (out): a placeholder for the output #QmiNasCallBarringStatus, or %NULL if not required. * @value_td_scdma_system_info_cipher_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scdma_system_info_cipher_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'TD SCDMA System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30. Use qmi_message_nas_get_system_info_output_get_td_scdma_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_get_system_info_output_get_td_scdma_system_info_v2) gboolean qmi_message_nas_get_system_info_output_get_td_scdma_system_info ( QmiMessageNasGetSystemInfoOutput *self, gboolean *value_td_scdma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_domain, gboolean *value_td_scdma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_service_capability, gboolean *value_td_scdma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_td_scdma_system_info_roaming_status, gboolean *value_td_scdma_system_info_forbidden_valid, gboolean *value_td_scdma_system_info_forbidden, gboolean *value_td_scdma_system_info_lac_valid, guint16 *value_td_scdma_system_info_lac, gboolean *value_td_scdma_system_info_cid_valid, guint32 *value_td_scdma_system_info_cid, gboolean *value_td_scdma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_registration_reject_domain, guint8 *value_td_scdma_system_info_registration_reject_cause, gboolean *value_td_scdma_system_info_network_id_valid, const gchar **value_td_scdma_system_info_mcc, const gchar **value_td_scdma_system_info_mnc, gboolean *value_td_scdma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_td_scdma_system_info_hs_call_status, gboolean *value_td_scdma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_td_scdma_system_info_hs_service, gboolean *value_td_scdma_system_info_cell_parameter_id_valid, guint16 *value_td_scdma_system_info_cell_parameter_id, gboolean *value_td_scdma_system_info_cell_broadcast_support_valid, QmiNasCellBroadcastCapability *value_td_scdma_system_info_cell_broadcast_support, gboolean *value_td_scdma_system_info_cs_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scdma_system_info_cs_call_barring_status, gboolean *value_td_scdma_system_info_ps_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scdma_system_info_ps_call_barring_status, gboolean *value_td_scdma_system_info_cipher_domain_valid, QmiNasNetworkServiceDomain *value_td_scdma_system_info_cipher_domain, GError **error); #endif /* HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO */ #if defined HAVE_QMI_INDICATION_NAS_SYSTEM_INFO /** * qmi_indication_nas_system_info_output_get_gsm_system_info: * @self: a #QmiIndicationNasSystemInfoOutput. * @value_gsm_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_gsm_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_gsm_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_gsm_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_gsm_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_gsm_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_gsm_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_gsm_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_gsm_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_gsm_system_info_egprs_support_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_egprs_support: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_dtm_support_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_gsm_system_info_dtm_support: (out): a placeholder for the output #gboolean, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'GSM System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30. Use qmi_indication_nas_system_info_output_get_gsm_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_indication_nas_system_info_output_get_gsm_system_info_v2) gboolean qmi_indication_nas_system_info_output_get_gsm_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_gsm_system_info_domain_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_domain, gboolean *value_gsm_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_service_capability, gboolean *value_gsm_system_info_roaming_status_valid, QmiNasRoamingStatus *value_gsm_system_info_roaming_status, gboolean *value_gsm_system_info_forbidden_valid, gboolean *value_gsm_system_info_forbidden, gboolean *value_gsm_system_info_lac_valid, guint16 *value_gsm_system_info_lac, gboolean *value_gsm_system_info_cid_valid, guint32 *value_gsm_system_info_cid, gboolean *value_gsm_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_gsm_system_info_registration_reject_domain, guint8 *value_gsm_system_info_registration_reject_cause, gboolean *value_gsm_system_info_network_id_valid, const gchar **value_gsm_system_info_mcc, const gchar **value_gsm_system_info_mnc, gboolean *value_gsm_system_info_egprs_support_valid, gboolean *value_gsm_system_info_egprs_support, gboolean *value_gsm_system_info_dtm_support_valid, gboolean *value_gsm_system_info_dtm_support, GError **error); /** * qmi_indication_nas_system_info_output_get_wcdma_system_info: * @self: a #QmiIndicationNasSystemInfoOutput. * @value_wcdma_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_wcdma_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_wcdma_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_wcdma_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_wcdma_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_wcdma_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_wcdma_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_wcdma_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_wcdma_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_wcdma_system_info_hs_call_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_hs_call_status: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_wcdma_system_info_hs_service_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_hs_service: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_wcdma_system_info_primary_scrambling_code_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_wcdma_system_info_primary_scrambling_code: (out): a placeholder for the output #guint16, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'WCDMA System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30. Use qmi_indication_nas_system_info_output_get_wcdma_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_indication_nas_system_info_output_get_wcdma_system_info_v2) gboolean qmi_indication_nas_system_info_output_get_wcdma_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_wcdma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_domain, gboolean *value_wcdma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_service_capability, gboolean *value_wcdma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_wcdma_system_info_roaming_status, gboolean *value_wcdma_system_info_forbidden_valid, gboolean *value_wcdma_system_info_forbidden, gboolean *value_wcdma_system_info_lac_valid, guint16 *value_wcdma_system_info_lac, gboolean *value_wcdma_system_info_cid_valid, guint32 *value_wcdma_system_info_cid, gboolean *value_wcdma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_wcdma_system_info_registration_reject_domain, guint8 *value_wcdma_system_info_registration_reject_cause, gboolean *value_wcdma_system_info_network_id_valid, const gchar **value_wcdma_system_info_mcc, const gchar **value_wcdma_system_info_mnc, gboolean *value_wcdma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_call_status, gboolean *value_wcdma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_wcdma_system_info_hs_service, gboolean *value_wcdma_system_info_primary_scrambling_code_valid, guint16 *value_wcdma_system_info_primary_scrambling_code, GError **error); /** * qmi_indication_nas_system_info_output_get_lte_system_info: * @self: a #QmiIndicationNasSystemInfoOutput. * @value_lte_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_lte_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_lte_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_lte_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_lte_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_lte_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_lte_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_lte_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_lte_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_lte_system_info_tac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_lte_system_info_tac: (out): a placeholder for the output #guint16, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'LTE System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprected: 1.30. Use qmi_indication_nas_system_info_output_get_lte_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_indication_nas_system_info_output_get_lte_system_info_v2) gboolean qmi_indication_nas_system_info_output_get_lte_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_lte_system_info_domain_valid, QmiNasNetworkServiceDomain *value_lte_system_info_domain, gboolean *value_lte_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_lte_system_info_service_capability, gboolean *value_lte_system_info_roaming_status_valid, QmiNasRoamingStatus *value_lte_system_info_roaming_status, gboolean *value_lte_system_info_forbidden_valid, gboolean *value_lte_system_info_forbidden, gboolean *value_lte_system_info_lac_valid, guint16 *value_lte_system_info_lac, gboolean *value_lte_system_info_cid_valid, guint32 *value_lte_system_info_cid, gboolean *value_lte_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_lte_system_info_registration_reject_domain, guint8 *value_lte_system_info_registration_reject_cause, gboolean *value_lte_system_info_network_id_valid, const gchar **value_lte_system_info_mcc, const gchar **value_lte_system_info_mnc, gboolean *value_lte_system_info_tac_valid, guint16 *value_lte_system_info_tac, GError **error); /** * qmi_indication_nas_system_info_output_get_td_scma_system_info: * @self: a #QmiIndicationNasSystemInfoOutput. * @value_td_scma_system_info_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_td_scma_system_info_service_capability_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_service_capability: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_td_scma_system_info_roaming_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_roaming_status: (out): a placeholder for the output #QmiNasRoamingStatus, or %NULL if not required. * @value_td_scma_system_info_forbidden_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_forbidden: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_lac_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_lac: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_td_scma_system_info_cid_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_cid: (out): a placeholder for the output #guint32, or %NULL if not required. * @value_td_scma_system_info_registration_reject_info_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_registration_reject_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @value_td_scma_system_info_registration_reject_cause: (out): a placeholder for the output #guint8, or %NULL if not required. * @value_td_scma_system_info_network_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_mcc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_td_scma_system_info_mnc: (out): a placeholder for the output constant string, or %NULL if not required. * @value_td_scma_system_info_hs_call_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_hs_call_status: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_td_scma_system_info_hs_service_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_hs_service: (out): a placeholder for the output #QmiNasWcdmaHsService, or %NULL if not required. * @value_td_scma_system_info_cell_parameter_id_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_cell_parameter_id: (out): a placeholder for the output #guint16, or %NULL if not required. * @value_td_scma_system_info_cell_broadcast_support_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_cell_broadcast_support: (out): a placeholder for the output #QmiNasCellBroadcastCapability, or %NULL if not required. * @value_td_scma_system_info_cs_call_barring_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_cs_call_barring_status: (out): a placeholder for the output #QmiNasCallBarringStatus, or %NULL if not required. * @value_td_scma_system_info_ps_call_barring_status_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_ps_call_barring_status: (out): a placeholder for the output #QmiNasCallBarringStatus, or %NULL if not required. * @value_td_scma_system_info_cipher_domain_valid: (out): a placeholder for the output #gboolean, or %NULL if not required. * @value_td_scma_system_info_cipher_domain: (out): a placeholder for the output #QmiNasNetworkServiceDomain, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'TD SCMA System Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30. Use qmi_indication_nas_system_info_output_get_td_scma_system_info_v2() instead. */ G_DEPRECATED_FOR (qmi_indication_nas_system_info_output_get_td_scma_system_info_v2) gboolean qmi_indication_nas_system_info_output_get_td_scma_system_info ( QmiIndicationNasSystemInfoOutput *self, gboolean *value_td_scma_system_info_domain_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_domain, gboolean *value_td_scma_system_info_service_capability_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_service_capability, gboolean *value_td_scma_system_info_roaming_status_valid, QmiNasRoamingStatus *value_td_scma_system_info_roaming_status, gboolean *value_td_scma_system_info_forbidden_valid, gboolean *value_td_scma_system_info_forbidden, gboolean *value_td_scma_system_info_lac_valid, guint16 *value_td_scma_system_info_lac, gboolean *value_td_scma_system_info_cid_valid, guint32 *value_td_scma_system_info_cid, gboolean *value_td_scma_system_info_registration_reject_info_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_registration_reject_domain, guint8 *value_td_scma_system_info_registration_reject_cause, gboolean *value_td_scma_system_info_network_id_valid, const gchar **value_td_scma_system_info_mcc, const gchar **value_td_scma_system_info_mnc, gboolean *value_td_scma_system_info_hs_call_status_valid, QmiNasWcdmaHsService *value_td_scma_system_info_hs_call_status, gboolean *value_td_scma_system_info_hs_service_valid, QmiNasWcdmaHsService *value_td_scma_system_info_hs_service, gboolean *value_td_scma_system_info_cell_parameter_id_valid, guint16 *value_td_scma_system_info_cell_parameter_id, gboolean *value_td_scma_system_info_cell_broadcast_support_valid, QmiNasCellBroadcastCapability *value_td_scma_system_info_cell_broadcast_support, gboolean *value_td_scma_system_info_cs_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scma_system_info_cs_call_barring_status, gboolean *value_td_scma_system_info_ps_call_barring_status_valid, QmiNasCallBarringStatus *value_td_scma_system_info_ps_call_barring_status, gboolean *value_td_scma_system_info_cipher_domain_valid, QmiNasNetworkServiceDomain *value_td_scma_system_info_cipher_domain, GError **error); #endif /* HAVE_QMI_INDICATION_NAS_SYSTEM_INFO */ #if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS /** * qmi_message_nas_swi_get_status_output_get_common_info: * @self: a #QmiMessageNasSwiGetStatusOutput. * @value_common_info_temperature: (out)(optional): a placeholder for the output #guint8, or %NULL if not required. * @value_common_info_modem_mode: (out)(optional): a placeholder for the output #QmiNasSwiModemMode, or %NULL if not required. * @value_common_info_system_mode: (out)(optional): a placeholder for the output #QmiNasSwiSystemMode, or %NULL if not required. * @value_common_info_ims_registration_state: (out)(optional): a placeholder for the output #QmiNasSwiImsRegState, or %NULL if not required. * @value_common_info_packet_service_state: (out)(optional): a placeholder for the output #QmiNasSwiPsState, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Common Info' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.24 * Deprecated: 1.30: Use qmi_message_nas_swi_get_status_output_get_common_info_v2() instead. */ G_DEPRECATED_FOR (qmi_message_nas_swi_get_status_output_get_common_info_v2) gboolean qmi_message_nas_swi_get_status_output_get_common_info ( QmiMessageNasSwiGetStatusOutput *self, guint8 *value_common_info_temperature, QmiNasSwiModemMode *value_common_info_modem_mode, QmiNasSwiSystemMode *value_common_info_system_mode, QmiNasSwiImsRegState *value_common_info_ims_registration_state, QmiNasSwiPsState *value_common_info_packet_service_state, GError **error); #endif /* HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS */ #if defined HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE /** * qmi_message_nas_set_system_selection_preference_input_get_mnc_pds_digit_include_status: * @self: a #QmiMessageNasSetSystemSelectionPreferenceInput. * @value_mnc_pds_digit_include_status: (out)(optional): a placeholder for the output #gboolean, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'MNC PDS Digit Include Status' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.30: Use qmi_message_nas_set_system_selection_preference_input_get_mnc_pcs_digit_include_status() instead. */ G_DEPRECATED_FOR (qmi_message_nas_set_system_selection_preference_input_get_mnc_pcs_digit_include_status) gboolean qmi_message_nas_set_system_selection_preference_input_get_mnc_pds_digit_include_status ( QmiMessageNasSetSystemSelectionPreferenceInput *self, gboolean *value_mnc_pds_digit_include_status, GError **error); #endif /* HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE || \ defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG || \ defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO /** * QmiConfigTypeAndId: * @config_type: a #QmiPdcConfigurationType. * @id: a #GArray of #guint8 elements. * * A QmiConfigTypeAndId struct. * * This type is deprecated and there is no replacement as the * new methods don't require any intermediate type any more. * * Since: 1.18 * Deprecated: 1.32 */ typedef struct _QmiDeprecatedConfigTypeAndId { QmiPdcConfigurationType config_type; GArray *id; } QmiDeprecatedConfigTypeAndId; G_DEPRECATED typedef QmiDeprecatedConfigTypeAndId QmiConfigTypeAndId; #endif /* HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE * HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG * HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO */ #if defined HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE /** * qmi_message_pdc_config_change_input_get_type_with_id: * @self: a #QmiMessagePdcConfigChangeInput. * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Type With Id' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.32: Use qmi_message_pdc_config_change_input_get_type_with_id_v2() instead. */ G_DEPRECATED_FOR (qmi_message_pdc_config_change_input_get_type_with_id_v2) gboolean qmi_message_pdc_config_change_input_get_type_with_id ( QmiMessagePdcConfigChangeInput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error); /** * qmi_message_pdc_config_change_input_set_type_with_id: * @self: a #QmiMessagePdcConfigChangeInput. * @value_type_with_id: the address of the #QmiConfigTypeAndId to set. * @error: Return location for error or %NULL. * * Set the 'Type With Id' field in the message. * * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.32: Use qmi_message_pdc_config_change_input_set_type_with_id_v2() instead. */ G_DEPRECATED_FOR (qmi_message_pdc_config_change_input_set_type_with_id_v2) gboolean qmi_message_pdc_config_change_input_set_type_with_id ( QmiMessagePdcConfigChangeInput *self, const QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error); /** * qmi_message_pdc_config_change_output_get_type_with_id: * @self: a #QmiMessagePdcConfigChangeOutput. * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Type With Id' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.32: Use qmi_message_pdc_config_change_output_get_type_with_id_v2() instead. */ G_DEPRECATED_FOR (qmi_message_pdc_config_change_output_get_type_with_id_v2) gboolean qmi_message_pdc_config_change_output_get_type_with_id ( QmiMessagePdcConfigChangeOutput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error); #endif /* HAVE_QMI_MESSAGE_PDC_CONFIG_CHANGE */ #if defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG /** * qmi_message_pdc_set_selected_config_input_get_type_with_id: * @self: a #QmiMessagePdcSetSelectedConfigInput. * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Type With Id' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.32: Use qmi_message_pdc_set_selected_config_input_get_type_with_id_v2() instead. */ G_DEPRECATED_FOR (qmi_message_pdc_set_selected_config_input_get_type_with_id_v2) gboolean qmi_message_pdc_set_selected_config_input_get_type_with_id ( QmiMessagePdcSetSelectedConfigInput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error); /** * qmi_message_pdc_set_selected_config_input_set_type_with_id: * @self: a #QmiMessagePdcSetSelectedConfigInput. * @value_type_with_id: the address of the #QmiConfigTypeAndId to set. * @error: Return location for error or %NULL. * * Set the 'Type With Id' field in the message. * * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.32: Use qmi_message_pdc_set_selected_config_input_set_type_with_id() instead. */ G_DEPRECATED_FOR (qmi_message_pdc_set_selected_config_input_set_type_with_id_v2) gboolean qmi_message_pdc_set_selected_config_input_set_type_with_id ( QmiMessagePdcSetSelectedConfigInput *self, const QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error); #endif /* HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG */ #if defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO /** * qmi_message_pdc_get_config_info_input_get_type_with_id: * @self: a #QmiMessagePdcGetConfigInfoInput. * @value_type_with_id: (out)(optional)(transfer none): a placeholder for the output constant #QmiConfigTypeAndId, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Type With Id' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.32: Use qmi_message_pdc_get_config_info_input_get_type_with_id_v2() instead. */ G_DEPRECATED_FOR (qmi_message_pdc_get_config_info_input_get_type_with_id_v2) gboolean qmi_message_pdc_get_config_info_input_get_type_with_id ( QmiMessagePdcGetConfigInfoInput *self, QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error); /** * qmi_message_pdc_get_config_info_input_set_type_with_id: * @self: a #QmiMessagePdcGetConfigInfoInput. * @value_type_with_id: the address of the #QmiConfigTypeAndId to set. * @error: Return location for error or %NULL. * * Set the 'Type With Id' field in the message. * * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.18 * Deprecated: 1.32: Use qmi_message_pdc_get_config_info_input_set_type_with_id_v2() instead. */ G_DEPRECATED_FOR (qmi_message_pdc_get_config_info_input_set_type_with_id_v2) gboolean qmi_message_pdc_get_config_info_input_set_type_with_id ( QmiMessagePdcGetConfigInfoInput *self, const QmiDeprecatedConfigTypeAndId *value_type_with_id, GError **error); #endif /* HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO */ #if defined HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE /** * QmiMessageDmsDeleteStoredImageInputImage: * @type: a #QmiDmsFirmwareImageType. * @unique_id: a #GArray of #guint8 elements. * @build_id: a string. * * A QmiMessageDmsDeleteStoredImageInputImage struct. * * This type is deprecated and there is no replacement as the * new methods don't require any intermediate type any more. * * Since: 1.0 * Deprecated: 1.32 */ typedef struct _QmiDeprecatedMessageDmsDeleteStoredImageInputImage { QmiDmsFirmwareImageType type; GArray *unique_id; gchar *build_id; } QmiDeprecatedMessageDmsDeleteStoredImageInputImage; G_DEPRECATED typedef QmiDeprecatedMessageDmsDeleteStoredImageInputImage QmiMessageDmsDeleteStoredImageInputImage; /** * qmi_message_dms_delete_stored_image_input_get_image: * @self: a #QmiMessageDmsDeleteStoredImageInput. * @value_image: (out)(optional)(transfer none): a placeholder for the output constant #QmiMessageDmsDeleteStoredImageInputImage, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Image' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.32: Use qmi_message_dms_delete_stored_image_input_set_image_details() instead. */ G_DEPRECATED_FOR (qmi_message_dms_delete_stored_image_input_get_image_details) gboolean qmi_message_dms_delete_stored_image_input_get_image ( QmiMessageDmsDeleteStoredImageInput *self, QmiDeprecatedMessageDmsDeleteStoredImageInputImage *value_image, GError **error); /** * qmi_message_dms_delete_stored_image_input_set_image: * @self: a #QmiMessageDmsDeleteStoredImageInput. * @value_image: the address of the #QmiMessageDmsDeleteStoredImageInputImage to set. * @error: Return location for error or %NULL. * * Set the 'Image' field in the message. * * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.32: Use qmi_message_dms_delete_stored_image_input_set_image_details() instead. */ G_DEPRECATED_FOR (qmi_message_dms_delete_stored_image_input_set_image_details) gboolean qmi_message_dms_delete_stored_image_input_set_image ( QmiMessageDmsDeleteStoredImageInput *self, const QmiDeprecatedMessageDmsDeleteStoredImageInputImage *value_image, GError **error); #endif /* HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE */ #if defined HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO /** * QmiMessageDmsGetStoredImageInfoInputImage: * @type: a #QmiDmsFirmwareImageType. * @unique_id: a #GArray of #guint8 elements. * @build_id: a string. * * A QmiMessageDmsGetStoredImageInfoInputImage struct. * * This type is deprecated and there is no replacement as the * new methods don't require any intermediate type any more. * * Since: 1.0 * Deprecated: 1.32 */ typedef struct _QmiDeprecatedMessageDmsGetStoredImageInfoInputImage { QmiDmsFirmwareImageType type; GArray *unique_id; gchar *build_id; } QmiDeprecatedMessageDmsGetStoredImageInfoInputImage; G_DEPRECATED typedef QmiDeprecatedMessageDmsGetStoredImageInfoInputImage QmiMessageDmsGetStoredImageInfoInputImage; /** * qmi_message_dms_get_stored_image_info_input_get_image: * @self: a #QmiMessageDmsGetStoredImageInfoInput. * @value_image: (out)(optional)(transfer none): a placeholder for the output constant #QmiMessageDmsGetStoredImageInfoInputImage, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Image' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.32: Use qmi_message_dms_get_stored_image_info_input_get_image_details() instead. */ G_DEPRECATED_FOR (qmi_message_dms_get_stored_image_info_input_get_image_details) gboolean qmi_message_dms_get_stored_image_info_input_get_image ( QmiMessageDmsGetStoredImageInfoInput *self, QmiDeprecatedMessageDmsGetStoredImageInfoInputImage *value_image, GError **error); /** * qmi_message_dms_get_stored_image_info_input_set_image: * @self: a #QmiMessageDmsGetStoredImageInfoInput. * @value_image: the address of the #QmiMessageDmsGetStoredImageInfoInputImage to set. * @error: Return location for error or %NULL. * * Set the 'Image' field in the message. * * Returns: (skip): %TRUE if @value was successfully set, %FALSE otherwise. * * Since: 1.0 * Deprecated: 1.32: Use qmi_message_dms_get_stored_image_info_input_set_image_details() instead. */ G_DEPRECATED_FOR (qmi_message_dms_get_stored_image_info_input_set_image_details) gboolean qmi_message_dms_get_stored_image_info_input_set_image ( QmiMessageDmsGetStoredImageInfoInput *self, const QmiDeprecatedMessageDmsGetStoredImageInfoInputImage *value_image, GError **error); #endif /* HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO */ #if defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT /** * QmiIndicationLocPositionReportOutputDilutionOfPrecision: * @position_dilution_of_precision: a #gfloat. * @horizontal_dilution_of_precision: a #gfloat. * @vertical_dilution_of_precision: a #gfloat. * * A QmiIndicationLocPositionReportOutputDilutionOfPrecision struct. * * This type is deprecated and there is no replacement as the * new methods don't require any intermediate type any more. * * Since: 1.22 * Deprecated: 1.32 */ typedef struct _QmiDeprecatedIndicationLocPositionReportOutputDilutionOfPrecision { gfloat position_dilution_of_precision; gfloat horizontal_dilution_of_precision; gfloat vertical_dilution_of_precision; } QmiDeprecatedIndicationLocPositionReportOutputDilutionOfPrecision; G_DEPRECATED typedef QmiDeprecatedIndicationLocPositionReportOutputDilutionOfPrecision QmiIndicationLocPositionReportOutputDilutionOfPrecision; /** * qmi_indication_loc_position_report_output_get_dilution_of_precision: * @self: a #QmiIndicationLocPositionReportOutput. * @value_dilution_of_precision: (out)(optional)(transfer none): a placeholder for the output constant #QmiIndicationLocPositionReportOutputDilutionOfPrecision, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'Dilution of Precision' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.32: Use qmi_indication_loc_position_report_output_get_dop() instead. */ G_DEPRECATED_FOR (qmi_indication_loc_position_report_output_get_dop) gboolean qmi_indication_loc_position_report_output_get_dilution_of_precision ( QmiIndicationLocPositionReportOutput *self, QmiDeprecatedIndicationLocPositionReportOutputDilutionOfPrecision *value_dilution_of_precision, GError **error); /** * QmiIndicationLocPositionReportOutputGpsTime: * @gps_weeks: a #guint16. * @gps_time_of_week_milliseconds: a #guint32. * * A QmiIndicationLocPositionReportOutputGpsTime struct. * * This type is deprecated and there is no replacement as the * new methods don't require any intermediate type any more. * * Since: 1.22 * Deprecated: 1.32 */ typedef struct _QmiDeprecatedIndicationLocPositionReportOutputGpsTime { guint16 gps_weeks; guint32 gps_time_of_week_milliseconds; } QmiDeprecatedIndicationLocPositionReportOutputGpsTime; G_DEPRECATED typedef QmiDeprecatedIndicationLocPositionReportOutputGpsTime QmiIndicationLocPositionReportOutputGpsTime; /** * qmi_indication_loc_position_report_output_get_gps_time: * @self: a #QmiIndicationLocPositionReportOutput. * @value_gps_time: (out)(optional)(transfer none): a placeholder for the output constant #QmiIndicationLocPositionReportOutputGpsTime, or %NULL if not required. * @error: Return location for error or %NULL. * * Get the 'GPS Time' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.22 * Deprecated: 1.32: Use qmi_indication_loc_position_report_output_get_gps_date_time() instead. */ G_DEPRECATED_FOR (qmi_indication_loc_position_report_output_get_gps_date_time) gboolean qmi_indication_loc_position_report_output_get_gps_time ( QmiIndicationLocPositionReportOutput *self, QmiDeprecatedIndicationLocPositionReportOutputGpsTime *value_gps_time, GError **error); #endif /* HAVE_QMI_INDICATION_LOC_POSITION_REPORT */ #if defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS /** * qmi_message_uim_get_slot_status_output_get_slot_eid_information: * @self: a #QmiMessageUimGetSlotStatusOutput. * @value_slot_eid_information: (out)(optional)(element-type GArray)(transfer none): a placeholder for the output #GArray of #GArray * elements, or %NULL if not required. Do not free it, it is owned by @self. * @error: Return location for error or %NULL. * * Get the 'Slot EID Information' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.26 * Deprecated: 1.32: Use qmi_message_uim_get_slot_status_output_get_slot_eid() instead. */ G_DEPRECATED_FOR (qmi_message_uim_get_slot_status_output_get_slot_eid) gboolean qmi_message_uim_get_slot_status_output_get_slot_eid_information ( QmiMessageUimGetSlotStatusOutput *self, GArray **value_slot_eid_information, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS */ #if defined HAVE_QMI_INDICATION_UIM_SLOT_STATUS /** * qmi_indication_uim_slot_status_output_get_slot_eid_information: * @self: a #QmiIndicationUimSlotStatusOutput. * @value_slot_eid_information: (out)(optional)(element-type GArray)(transfer none): a placeholder for the output #GArray of #GArray * elements, or %NULL if not required. Do not free it, it is owned by @self. * @error: Return location for error or %NULL. * * Get the 'Slot EID Information' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.26 * Deprecated: 1.32: Use qmi_indication_uim_slot_status_output_get_slot_eid() instead. */ G_DEPRECATED_FOR (qmi_indication_uim_slot_status_output_get_slot_eid) gboolean qmi_indication_uim_slot_status_output_get_slot_eid_information ( QmiIndicationUimSlotStatusOutput *self, GArray **value_slot_eid_information, GError **error); #endif /* HAVE_QMI_INDICATION_UIM_SLOT_STATUS */ #if defined HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION /** * QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherSlotsSlotsElement: * @feature: a #QmiUimCardApplicationPersonalizationFeature. * @verify_left: a #guint8. * @unblock_left: a #guint8. * * A QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherSlotsSlotsElement struct. * * Since: 1.30 * Deprecated: 1.32: Use #QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElementSlotElement instead. */ G_DEPRECATED_FOR (QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElementSlotElement) typedef struct _QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherSlotsSlotsElement { QmiUimCardApplicationPersonalizationFeature feature; guint8 verify_left; guint8 unblock_left; } QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherSlotsSlotsElement; /** * qmi_message_uim_get_configuration_output_get_personalization_status_other_slots: * @self: a #QmiMessageUimGetConfigurationOutput. * @value_personalization_status_other_slots: (out)(optional)(element-type GArray)(transfer none): a placeholder for the output #GArray of #GArray * elements, or %NULL if not required. Do not free it, it is owned by @self. * @error: Return location for error or %NULL. * * Get the 'Personalization Status Other Slots' field from @self. * * Returns: (skip): %TRUE if the field is found, %FALSE otherwise. * * Since: 1.30 * Deprecated: 1.32: Use qmi_message_uim_get_configuration_output_get_personalization_status_other() instead. */ G_DEPRECATED_FOR (qmi_message_uim_get_configuration_output_get_personalization_status_other) gboolean qmi_message_uim_get_configuration_output_get_personalization_status_other_slots ( QmiMessageUimGetConfigurationOutput *self, GArray **value_personalization_status_other_slots, GError **error); #endif /* HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION */ #if defined HAVE_QMI_INDICATION_WDS_SET_LTE_ATTACH_PDN_LIST /** * qmi_indication_wds_set_lte_attach_pdn_list_output_get_result: * @self: a QmiIndicationWdsSetLteAttachPdnListOutput. * @error: Return location for error or %NULL. * * Get the result of the QMI operation. * * Returns: (skip): %TRUE if the QMI operation succeeded, %FALSE if @error is set. * * Since: 1.28 * Deprecated: 1.34: This is a no-op. */ G_DEPRECATED gboolean qmi_indication_wds_set_lte_attach_pdn_list_output_get_result ( QmiIndicationWdsSetLteAttachPdnListOutput *self, GError **error); #endif /* HAVE_QMI_INDICATION_WDS_SET_LTE_ATTACH_PDN_LIST */ #if defined HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS /** * QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement: * @type: a #QmiUimCardApplicationType. * @state: a #QmiUimCardApplicationState. * @personalization_state: a #QmiUimCardApplicationPersonalizationState. * @personalization_feature: a #QmiUimCardApplicationPersonalizationFeature. * @personalization_retries: a #guint8. * @personalization_unblock_retries: a #guint8. * @application_identifier_value: a #GArray of #guint8 elements. * @upin_replaces_pin1: a #gboolean. * @pin1_state: a #QmiUimPinState. * @pin1_retries: a #guint8. * @puk1_retries: a #guint8. * @pin2_state: a #QmiUimPinState. * @pin2_retries: a #guint8. * @puk2_retries: a #guint8. * * A QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement struct. * * This type is binary compatible with #QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElementV2 * as the size and format of both structs is the same. The only thing that changed is the * representation of one of the enumeration fields. * * Since: 1.10 * Deprecated: 1.34. Use #QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElementV2 instead. */ G_DEPRECATED_FOR (QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElementV2) typedef struct _QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement { QmiUimCardApplicationType type; QmiUimCardApplicationState state; QmiUimCardApplicationPersonalizationState personalization_state; QmiUimCardApplicationPersonalizationFeature personalization_feature; guint8 personalization_retries; guint8 personalization_unblock_retries; GArray *application_identifier_value; gboolean upin_replaces_pin1; QmiUimPinState pin1_state; guint8 pin1_retries; guint8 puk1_retries; QmiUimPinState pin2_state; guint8 pin2_retries; guint8 puk2_retries; } QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement; G_DEPRECATED_FOR (qmi_message_uim_get_card_status_output_card_status_cards_element_applications_element_v2_get_type) GType qmi_message_uim_get_card_status_output_card_status_cards_element_applications_element_get_type (void) G_GNUC_CONST; #endif /* HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS */ #if defined HAVE_QMI_INDICATION_UIM_CARD_STATUS /** * QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElement: * @type: a #QmiUimCardApplicationType. * @state: a #QmiUimCardApplicationState. * @personalization_state: a #QmiUimCardApplicationPersonalizationState. * @personalization_feature: a #QmiUimCardApplicationPersonalizationFeature. * @personalization_retries: a #guint8. * @personalization_unblock_retries: a #guint8. * @application_identifier_value: a #GArray of #guint8 elements. * @upin_replaces_pin1: a #gboolean. * @pin1_state: a #QmiUimPinState. * @pin1_retries: a #guint8. * @puk1_retries: a #guint8. * @pin2_state: a #QmiUimPinState. * @pin2_retries: a #guint8. * @puk2_retries: a #guint8. * * A QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElement struct. * * This type is binary compatible with #QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElementV2 * as the size and format of both structs is the same. The only thing that changed is the * representation of one of the enumeration fields. * * Since: 1.22 * Deprecated: 1.34. Use #QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElementV2 instead. */ G_DEPRECATED_FOR (QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElementV2) typedef struct _QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElement { QmiUimCardApplicationType type; QmiUimCardApplicationState state; QmiUimCardApplicationPersonalizationState personalization_state; QmiUimCardApplicationPersonalizationFeature personalization_feature; guint8 personalization_retries; guint8 personalization_unblock_retries; GArray *application_identifier_value; gboolean upin_replaces_pin1; QmiUimPinState pin1_state; guint8 pin1_retries; guint8 puk1_retries; QmiUimPinState pin2_state; guint8 pin2_retries; guint8 puk2_retries; } QmiIndicationUimCardStatusOutputCardStatusCardsElementApplicationsElement; G_DEPRECATED_FOR (qmi_indication_uim_card_status_output_card_status_cards_element_applications_element_v2_get_type) GType qmi_indication_uim_card_status_output_card_status_cards_element_applications_element_get_type (void) G_GNUC_CONST; #endif /* HAVE_QMI_INDICATION_UIM_CARD_STATUS */ #endif /* QMI_DISABLE_DEPRECATED */ #endif /* _LIBQMI_GLIB_QMI_COMPAT_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-device.c000066400000000000000000003665111455567757300210450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH * Copyright (C) 2012-2021 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #include #include #include #include #include #include #include #include "qmi-device.h" #include "qmi-message.h" #include "qmi-file.h" #include "qmi-endpoint.h" #include "qmi-endpoint-mbim.h" #include "qmi-endpoint-qmux.h" #include "qmi-ctl.h" #include "qmi-dms.h" #include "qmi-wds.h" #include "qmi-nas.h" #include "qmi-wms.h" #include "qmi-pdc.h" #include "qmi-pds.h" #include "qmi-pbm.h" #include "qmi-uim.h" #include "qmi-sar.h" #include "qmi-oma.h" #include "qmi-wda.h" #include "qmi-voice.h" #include "qmi-loc.h" #include "qmi-qos.h" #include "qmi-gas.h" #include "qmi-gms.h" #include "qmi-dsd.h" #include "qmi-dpm.h" #include "qmi-fox.h" #include "qmi-atr.h" #include "qmi-ims.h" #include "qmi-imsp.h" #include "qmi-imsa.h" #include "qmi-ssc.h" #include "qmi-utils.h" #include "qmi-helpers.h" #include "qmi-error-types.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #include "qmi-proxy.h" #include "qmi-net-port-manager-qmiwwan.h" #include "qmi-version.h" #if QMI_QRTR_SUPPORTED # include "qmi-endpoint-qrtr.h" # include #endif #if defined RMNET_SUPPORT_ENABLED # include "qmi-net-port-manager-rmnet.h" #endif /* maximum number of printed data bytes when personal info * should be hidden */ #define MAX_PRINTED_BYTES 12 static void async_initable_iface_init (GAsyncInitableIface *iface); G_DEFINE_TYPE_EXTENDED (QmiDevice, qmi_device, G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (G_TYPE_ASYNC_INITABLE, async_initable_iface_init)) enum { PROP_0, PROP_FILE, PROP_NO_FILE_CHECK, PROP_PROXY_PATH, PROP_WWAN_IFACE, PROP_CONSECUTIVE_TIMEOUTS, #if QMI_QRTR_SUPPORTED PROP_NODE, #endif PROP_LAST }; enum { SIGNAL_INDICATION, SIGNAL_REMOVED, SIGNAL_LAST }; static GParamSpec *properties[PROP_LAST]; static guint signals [SIGNAL_LAST] = { 0 }; struct _QmiDevicePrivate { /* File or node */ QmiFile *file; #if QMI_QRTR_SUPPORTED QrtrNode *node; #endif gboolean no_file_check; /* WWAN interface */ gboolean no_wwan_check; gchar *wwan_iface; /* Information necessary for data port */ QmiNetPortManager *net_port_manager; /* Implicit CTL client */ QmiClientCtl *client_ctl; guint sync_indication_id; /* Supported services */ GArray *supported_services; /* Lower-level transport */ QmiEndpoint *endpoint; guint endpoint_new_data_id; guint endpoint_hangup_id; /* Support for qmi-proxy */ gchar *proxy_path; /* HT to keep track of ongoing transactions */ GHashTable *transactions; /* HT of clients that want to get indications */ GHashTable *registered_clients; /* Number of consecutive timeouts detected */ guint consecutive_timeouts; }; #if QMI_QRTR_SUPPORTED # define QMI_CLIENT_VERSION_UNKNOWN 99 #endif /*****************************************************************************/ /* Message transactions (private) */ typedef struct { QmiDevice *self; gpointer key; } TransactionWaitContext; typedef struct { QmiMessage *message; QmiMessageContext *message_context; GSimpleAsyncResult *result; GSource *timeout_source; GCancellable *cancellable; gulong cancellable_id; TransactionWaitContext *wait_ctx; /* abortable support */ GError *abort_error; GCancellable *abort_cancellable; QmiDeviceCommandAbortableBuildRequestFn abort_build_request_fn; QmiDeviceCommandAbortableParseResponseFn abort_parse_response_fn; gpointer abort_user_data; GDestroyNotify abort_user_data_free; } Transaction; static Transaction * transaction_new (QmiDevice *self, QmiMessage *message, QmiMessageContext *message_context, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { Transaction *tr; tr = g_slice_new0 (Transaction); tr->message = qmi_message_ref (message); tr->message_context = (message_context ? qmi_message_context_ref (message_context) : NULL); tr->result = g_simple_async_result_new (G_OBJECT (self), callback, user_data, transaction_new); if (cancellable) tr->cancellable = g_object_ref (cancellable); return tr; } static void transaction_complete_and_free (Transaction *tr, QmiMessage *reply, const GError *error) { g_assert (reply != NULL || error != NULL); /* always set result first, as we may be using one of the GErrors * stored in the Transaction as result itself */ if (reply) { /* if we got a valid response, we can cancel any ongoing abort * operation for this request */ if (tr->abort_cancellable) g_cancellable_cancel (tr->abort_cancellable); g_simple_async_result_set_op_res_gpointer (tr->result, qmi_message_ref (reply), (GDestroyNotify)qmi_message_unref); } else if (error) g_simple_async_result_set_from_error (tr->result, error); else g_assert_not_reached (); if (tr->timeout_source) g_source_destroy (tr->timeout_source); if (tr->cancellable) { if (tr->cancellable_id) g_cancellable_disconnect (tr->cancellable, tr->cancellable_id); g_object_unref (tr->cancellable); } if (tr->wait_ctx) g_slice_free (TransactionWaitContext, tr->wait_ctx); if (tr->abort_error) g_error_free (tr->abort_error); if (tr->abort_cancellable) g_object_unref (tr->abort_cancellable); if (tr->abort_user_data && tr->abort_user_data_free) tr->abort_user_data_free (tr->abort_user_data); g_simple_async_result_complete_in_idle (tr->result); g_object_unref (tr->result); if (tr->message_context) qmi_message_context_unref (tr->message_context); qmi_message_unref (tr->message); g_slice_free (Transaction, tr); } static inline gpointer build_transaction_key (QmiMessage *message) { gpointer key; guint8 service; guint8 client_id; guint16 transaction_id; service = (guint8)qmi_message_get_service (message); client_id = qmi_message_get_client_id (message); transaction_id = qmi_message_get_transaction_id (message); /* We're putting a 32 bit value into a gpointer */ key = GUINT_TO_POINTER ((((service << 8) | client_id) << 16) | transaction_id); return key; } static Transaction * device_peek_transaction (QmiDevice *self, gconstpointer key) { return g_hash_table_lookup (self->priv->transactions, key); } static Transaction * device_release_transaction (QmiDevice *self, gconstpointer key) { Transaction *tr = NULL; /* If found, remove it from the HT */ tr = device_peek_transaction (self, key); if (tr) g_hash_table_remove (self->priv->transactions, key); return tr; } static void transaction_abort_ready (QmiDevice *self, GAsyncResult *res, gpointer key) { Transaction *tr; GError *error = NULL; QmiMessage *abort_response; /* Always try to remove from the HT at this point. Note that the transaction * pointer may be NULL already, e.g. if the abort was cancelled. In this case * we totally ignore the result of the abort operation. */ tr = device_release_transaction (self, key); if (!tr) { g_debug ("[%s] not processing abort response, operation has already been completed", qmi_file_get_path_display (self->priv->file)); return; } g_assert (tr->abort_parse_response_fn); abort_response = qmi_device_command_full_finish (self, res, &error); if (!abort_response || !tr->abort_parse_response_fn (self, abort_response, tr->abort_user_data, &error)) { GError *built_error; g_debug ("[%s] abort operation failed: %s", qmi_file_get_path_display (self->priv->file), error->message); /* We don't want to return any kind of error, because what failed here * is the abort operation for the user request, so always return * QMI_CORE_ERROR_FAILED and provide the description on the error * in the message. */ built_error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "operation failed and couldn't be aborted: %s", error->message); g_error_free (error); transaction_complete_and_free (tr, NULL, built_error); g_error_free (built_error); } else { /* aborted successfully */ g_debug ("operation aborted successfully"); g_assert (tr->abort_error); transaction_complete_and_free (tr, NULL, tr->abort_error); } if (abort_response) qmi_message_unref (abort_response); } static void transaction_abort (QmiDevice *self, Transaction *tr, GError *abort_error_take) { QmiMessage *abort_request; GError *error = NULL; guint16 transaction_id; transaction_id = qmi_message_get_transaction_id (tr->message); /* If the command is not abortable, we'll return the error right away * to the user. */ if (!__qmi_message_is_abortable (tr->message, tr->message_context)) { g_debug ("[%s] transaction 0x%x aborted, but message is not abortable", qmi_file_get_path_display (self->priv->file), transaction_id); device_release_transaction (self, tr->wait_ctx->key); transaction_complete_and_free (tr, NULL, abort_error_take); g_error_free (abort_error_take); return; } /* if the command is abortable but the user didn't use qmi_device_command_abortable(), * then return the error right away anyway */ if (!tr->abort_build_request_fn || !tr->abort_parse_response_fn) { g_debug ("[%s] transaction 0x%x aborted, but no way to build abort request", qmi_file_get_path_display (self->priv->file), transaction_id); device_release_transaction (self, tr->wait_ctx->key); transaction_complete_and_free (tr, NULL, abort_error_take); g_error_free (abort_error_take); return; } g_debug ("[%s] transaction 0x%x aborted, building abort request...", qmi_file_get_path_display (self->priv->file), transaction_id); /* Try to build abort request */ abort_request = tr->abort_build_request_fn (self, tr->message, tr->abort_user_data, &error); if (!abort_request) { /* complete the transaction with the error we got while building the * abort request */ g_debug ("[%s] transaction 0x%x aborted, but building abort request failed", qmi_file_get_path_display (self->priv->file), transaction_id); device_release_transaction (self, tr->wait_ctx->key); transaction_complete_and_free (tr, NULL, error); g_error_free (error); return; } /* If command is abortable, let's abort the operation in the * device. We'll store the specific abort error to use once the abort * operation has been acknowledged by the device. */ tr->abort_error = abort_error_take; tr->abort_cancellable = g_cancellable_new (); qmi_device_command_full (self, abort_request, NULL, 30, tr->abort_cancellable, (GAsyncReadyCallback) transaction_abort_ready, tr->wait_ctx->key); qmi_message_unref (abort_request); } static gboolean transaction_timed_out (TransactionWaitContext *ctx) { Transaction *tr; GError *error = NULL; /* A timed out transaction is always tracked */ tr = device_peek_transaction (ctx->self, ctx->key); g_assert (tr); tr->timeout_source = NULL; /* Increase number of consecutive timeouts */ ctx->self->priv->consecutive_timeouts++; g_object_notify_by_pspec (G_OBJECT (ctx->self), properties[PROP_CONSECUTIVE_TIMEOUTS]); g_debug ("[%s] number of consecutive timeouts: %u", qmi_file_get_path_display (ctx->self->priv->file), ctx->self->priv->consecutive_timeouts); error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_TIMEOUT, "Transaction timed out"); transaction_abort (ctx->self, tr, error); return G_SOURCE_REMOVE; } static void transaction_cancelled (GCancellable *cancellable, TransactionWaitContext *ctx) { Transaction *tr; GError *error = NULL; tr = device_peek_transaction (ctx->self, ctx->key); /* The transaction may have already been cancelled before we stored it in * the tracking table, which means the command was NOT sent to the device * and we can safely ignore the cancellation request. */ if (!tr) return; tr->cancellable_id = 0; error = g_error_new (QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_ABORTED, "Transaction aborted"); transaction_abort (ctx->self, tr, error); } static gboolean device_store_transaction (QmiDevice *self, Transaction *tr, guint timeout, GError **error) { gpointer key; Transaction *existing; key = build_transaction_key (tr->message); /* Setup the timeout and cancellation */ tr->wait_ctx = g_slice_new (TransactionWaitContext); tr->wait_ctx->self = self; tr->wait_ctx->key = key; /* valid as long as the transaction is in the HT */ /* Timeout is optional (e.g. disabled when MBIM is used) */ if (timeout > 0) { tr->timeout_source = g_timeout_source_new_seconds (timeout); g_source_set_callback (tr->timeout_source, (GSourceFunc)transaction_timed_out, tr->wait_ctx, NULL); g_source_attach (tr->timeout_source, g_main_context_get_thread_default ()); g_source_unref (tr->timeout_source); } if (tr->cancellable) { /* Note: transaction_cancelled() will also be called directly if the * cancellable is already cancelled */ tr->cancellable_id = g_cancellable_connect (tr->cancellable, (GCallback)transaction_cancelled, tr->wait_ctx, NULL); if (!tr->cancellable_id) { g_set_error (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_ABORTED, "Request is already cancelled"); return FALSE; } } /* If we have already a transaction with the same ID complete the existing * one with an error before the new one is added, or we'll end up with * dangling timeouts and cancellation handlers that may be fired off later * on. */ existing = device_release_transaction (self, key); if (existing) { GError *inner_error; /* Complete transaction with an abort error */ inner_error = g_error_new (QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_ABORTED, "Transaction overwritten"); transaction_complete_and_free (existing, NULL, inner_error); g_error_free (inner_error); } /* Keep in the HT */ g_hash_table_insert (self->priv->transactions, key, tr); return TRUE; } static Transaction * device_match_transaction (QmiDevice *self, QmiMessage *message) { /* msg can be either the original message or the response */ return device_release_transaction (self, build_transaction_key (message)); } /*****************************************************************************/ static void device_hangup_transactions (QmiDevice *self) { GHashTableIter iter; gpointer key, value; g_autoptr(GError) common_error = NULL; common_error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "endpoint hangup"); g_hash_table_iter_init (&iter, self->priv->transactions); while (g_hash_table_iter_next (&iter, &key, &value)) { Transaction *tr = value; transaction_complete_and_free (tr, NULL, common_error); g_hash_table_iter_remove (&iter); } } /*****************************************************************************/ guint qmi_device_get_consecutive_timeouts (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), 0); return self->priv->consecutive_timeouts; } /*****************************************************************************/ /* Version info request */ GArray * qmi_device_get_service_version_info_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return g_task_propagate_pointer (G_TASK (res), error); } static void version_info_ready (QmiClientCtl *client_ctl, GAsyncResult *res, GTask *task) { GArray *service_list = NULL; GArray *out; QmiMessageCtlGetVersionInfoOutput *output; GError *error = NULL; guint i; /* Check result of the async operation */ output = qmi_client_ctl_get_version_info_finish (client_ctl, res, &error); if (!output) { g_task_return_error (task, error); g_object_unref (task); return; } /* Check result of the QMI operation */ if (!qmi_message_ctl_get_version_info_output_get_result (output, &error)) { qmi_message_ctl_get_version_info_output_unref (output); g_task_return_error (task, error); g_object_unref (task); return; } /* QMI operation succeeded, we can now get the outputs */ qmi_message_ctl_get_version_info_output_get_service_list (output, &service_list, NULL); out = g_array_sized_new (FALSE, FALSE, sizeof (QmiDeviceServiceVersionInfo), service_list->len); for (i = 0; i < service_list->len; i++) { QmiMessageCtlGetVersionInfoOutputServiceListService *info; QmiDeviceServiceVersionInfo outinfo; info = &g_array_index (service_list, QmiMessageCtlGetVersionInfoOutputServiceListService, i); outinfo.service = info->service; outinfo.major_version = info->major_version; outinfo.minor_version = info->minor_version; g_array_append_val (out, outinfo); } qmi_message_ctl_get_version_info_output_unref (output); g_task_return_pointer (task, out, (GDestroyNotify)g_array_unref); g_object_unref (task); } void qmi_device_get_service_version_info (QmiDevice *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_client_ctl_get_version_info ( self->priv->client_ctl, NULL, timeout, cancellable, (GAsyncReadyCallback)version_info_ready, g_task_new (self, cancellable, callback, user_data)); } /*****************************************************************************/ /* Version info checks (private) */ static const QmiMessageCtlGetVersionInfoOutputServiceListService * find_service_version_info (QmiDevice *self, QmiService service) { guint i; if (!self->priv->supported_services) return NULL; for (i = 0; i < self->priv->supported_services->len; i++) { const QmiMessageCtlGetVersionInfoOutputServiceListService *info; info = &g_array_index (self->priv->supported_services, QmiMessageCtlGetVersionInfoOutputServiceListService, i); if (service == info->service) return info; } return NULL; } static gboolean check_service_supported (QmiDevice *self, QmiService service) { /* If we didn't check supported services, just assume it is supported */ if (!self->priv->supported_services) { g_debug ("[%s] assuming service '%s' is supported...", qmi_file_get_path_display (self->priv->file), qmi_service_get_string (service)); return TRUE; } return !!find_service_version_info (self, service); } /*****************************************************************************/ GFile * qmi_device_get_file (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), NULL); return qmi_file_get_file (self->priv->file); } GFile * qmi_device_peek_file (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), NULL); return qmi_file_peek_file (self->priv->file); } const gchar * qmi_device_get_path (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), NULL); return qmi_file_get_path (self->priv->file); } const gchar * qmi_device_get_path_display (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), NULL); return qmi_file_get_path_display (self->priv->file); } gboolean qmi_device_is_open (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), FALSE); return !!self->priv->endpoint && qmi_endpoint_is_open (self->priv->endpoint); } /*****************************************************************************/ /* WWAN iface name * Always reload from scratch, to handle possible net interface renames */ static void reload_wwan_iface_name (QmiDevice *self) { g_autofree gchar *cdc_wdm_device_name = NULL; guint i; g_autoptr(GError) error = NULL; static const gchar *driver_names[] = { "usbmisc", /* kernel >= 3.6 */ "usb" }; /* kernel < 3.6 */ #if QMI_QRTR_SUPPORTED /* QRTR doesn't have a device file in sysfs, exit right away */ if (self->priv->node) return; #endif g_clear_pointer (&self->priv->wwan_iface, g_free); cdc_wdm_device_name = qmi_helpers_get_devname (qmi_file_get_path (self->priv->file), &error); if (!cdc_wdm_device_name) { g_warning ("[%s] invalid path for cdc-wdm control port: %s", qmi_file_get_path_display (self->priv->file), error->message); return; } for (i = 0; i < G_N_ELEMENTS (driver_names) && !self->priv->wwan_iface; i++) { g_autofree gchar *sysfs_path = NULL; g_autoptr(GFile) sysfs_file = NULL; g_autoptr(GFileEnumerator) enumerator = NULL; GFileInfo *file_info = NULL; /* WWAN iface name loading only applicable for qmi_wwan driver right now * (so QMI port exposed by the cdc-wdm driver in the usbmisc subsystem), * not for QRTR or any other subsystem or driver */ sysfs_path = g_strdup_printf ("/sys/class/%s/%s/device/net/", driver_names[i], cdc_wdm_device_name); sysfs_file = g_file_new_for_path (sysfs_path); enumerator = g_file_enumerate_children (sysfs_file, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NONE, NULL, NULL); if (!enumerator) continue; /* Ignore errors when enumerating */ while ((file_info = g_file_enumerator_next_file (enumerator, NULL, NULL)) != NULL) { const gchar *name; name = g_file_info_get_name (file_info); if (name) { /* We only expect ONE file in the sysfs directory corresponding * to this control port, if more found for any reason, warn about it */ if (self->priv->wwan_iface) g_warning ("[%s] invalid additional wwan iface found: %s", qmi_file_get_path_display (self->priv->file), name); else self->priv->wwan_iface = g_strdup (name); } g_object_unref (file_info); } if (!self->priv->wwan_iface) g_warning ("[%s] wwan iface not found", qmi_file_get_path_display (self->priv->file)); } /* wwan_iface won't be set at this point if the kernel driver in use isn't in * the usbmisc subsystem */ } const gchar * qmi_device_get_wwan_iface (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), NULL); reload_wwan_iface_name (self); return self->priv->wwan_iface; } /*****************************************************************************/ /* Expected data format */ static gboolean validate_yes_or_no (const gchar value, GError **error) { if (value != 'Y' && value != 'N') { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unexpected sysfs file contents: %c", value); return FALSE; } return TRUE; } static gchar * build_raw_ip_sysfs_path (QmiDevice *self) { return g_strdup_printf ("/sys/class/net/%s/qmi/raw_ip", self->priv->wwan_iface); } static gchar * build_pass_through_sysfs_path (QmiDevice *self) { return g_strdup_printf ("/sys/class/net/%s/qmi/pass_through", self->priv->wwan_iface); } static gboolean get_expected_data_format (QmiDevice *self, const gchar *raw_ip_sysfs_path, const gchar *pass_through_sysfs_path, GError **error) { gchar raw_ip_value = '\0'; gchar pass_through_value = '\0'; if (!qmi_helpers_read_sysfs_file (raw_ip_sysfs_path, &raw_ip_value, 1, error) || !validate_yes_or_no (raw_ip_value, error)) return QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; if (raw_ip_value == 'N') return QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3; if (qmi_helpers_read_sysfs_file (pass_through_sysfs_path, &pass_through_value, 1, NULL) && (pass_through_value == 'Y')) return QMI_DEVICE_EXPECTED_DATA_FORMAT_QMAP_PASS_THROUGH; return QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP; } static gboolean set_expected_data_format (QmiDevice *self, const gchar *raw_ip_sysfs_path, const gchar *pass_through_sysfs_path, QmiDeviceExpectedDataFormat requested, GError **error) { if (requested == QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3) { qmi_helpers_write_sysfs_file (pass_through_sysfs_path, "N", NULL); return qmi_helpers_write_sysfs_file (raw_ip_sysfs_path, "N", error); } if (requested == QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP) { qmi_helpers_write_sysfs_file (pass_through_sysfs_path, "N", NULL); return qmi_helpers_write_sysfs_file (raw_ip_sysfs_path, "Y", error); } if (requested == QMI_DEVICE_EXPECTED_DATA_FORMAT_QMAP_PASS_THROUGH) { return (qmi_helpers_write_sysfs_file (raw_ip_sysfs_path, "Y", error) && qmi_helpers_write_sysfs_file (pass_through_sysfs_path, "Y", error)); } g_assert_not_reached (); } static QmiDeviceExpectedDataFormat common_get_set_expected_data_format (QmiDevice *self, QmiDeviceExpectedDataFormat requested, GError **error) { g_autofree gchar *raw_ip = NULL; g_autofree gchar *pass_through = NULL; QmiDeviceExpectedDataFormat expected = QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; gboolean readonly; /* Make sure we load the WWAN iface name */ reload_wwan_iface_name (self); /* Expected data format setting and getting is only supported in the qmi_wwan * driver, same as the WWAN iface name detection. Therefore, if we cannot load * the WWAN iface name we can safely assume that we're not using the qmi_wwan * driver. */ if (!self->priv->wwan_iface) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED, "Setting expected data format management is unsupported by the driver"); return QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; } readonly = (requested == QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN); /* Build sysfs file paths */ raw_ip = build_raw_ip_sysfs_path (self); pass_through = build_pass_through_sysfs_path (self); /* Set operation? */ if (!readonly && !set_expected_data_format (self, raw_ip, pass_through, requested, error)) return QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; /* Get/Set operations */ if ((expected = get_expected_data_format (self, raw_ip, pass_through, error)) == QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN) return QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; /* If we requested an update but we didn't read that value, report an error */ if (!readonly && (requested != expected)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Expected data format not updated properly to '%s': got '%s' instead", qmi_device_expected_data_format_get_string (requested), qmi_device_expected_data_format_get_string (expected)); return QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; } /* If the set operation succeeds, we clear the net port manager, as we may need to use a * different one */ g_clear_object (&self->priv->net_port_manager); return expected; } QmiDeviceExpectedDataFormat qmi_device_get_expected_data_format (QmiDevice *self, GError **error) { g_return_val_if_fail (QMI_IS_DEVICE (self), QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN); return common_get_set_expected_data_format (self, QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN, error); } gboolean qmi_device_set_expected_data_format (QmiDevice *self, QmiDeviceExpectedDataFormat format, GError **error) { g_return_val_if_fail (QMI_IS_DEVICE (self), FALSE); return (common_get_set_expected_data_format (self, format, error) != QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN); } gboolean qmi_device_check_expected_data_format_supported (QmiDevice *self, QmiDeviceExpectedDataFormat format, GError **error) { g_autofree gchar *sysfs_path = NULL; gchar value = '\0'; g_return_val_if_fail (QMI_IS_DEVICE (self), FALSE); switch (format) { case QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3: return TRUE; case QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP: reload_wwan_iface_name (self); sysfs_path = build_raw_ip_sysfs_path (self); break; case QMI_DEVICE_EXPECTED_DATA_FORMAT_QMAP_PASS_THROUGH: reload_wwan_iface_name (self); sysfs_path = build_pass_through_sysfs_path (self); break; default: case QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN: g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unknown expected data format given: 0x%x", format); return FALSE; } g_assert (sysfs_path); return (qmi_helpers_read_sysfs_file (sysfs_path, &value, 1, error) && validate_yes_or_no (value, error)); } /*****************************************************************************/ /* Register/Unregister clients that want to receive indications */ static gpointer build_registered_client_key (guint8 cid, QmiService service) { return GUINT_TO_POINTER (((guint8)service << 8) | cid); } static gboolean register_client (QmiDevice *self, QmiClient *client, GError **error) { gpointer key; key = build_registered_client_key (qmi_client_get_cid (client), qmi_client_get_service (client)); /* Only add the new client if not already registered one with the same CID * for the same service */ if (g_hash_table_lookup (self->priv->registered_clients, key)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "A client with CID '%u' and service '%s' is already registered", qmi_client_get_cid (client), qmi_service_get_string (qmi_client_get_service (client))); return FALSE; } g_hash_table_insert (self->priv->registered_clients, key, g_object_ref (client)); return TRUE; } static void unregister_client (QmiDevice *self, QmiClient *client) { g_hash_table_remove (self->priv->registered_clients, build_registered_client_key (qmi_client_get_cid (client), qmi_client_get_service (client))); } /*****************************************************************************/ /* Allocate new client */ typedef struct { GType client_type; QmiService service; guint8 cid; } AllocateClientContext; static void allocate_client_context_free (AllocateClientContext *ctx) { g_slice_free (AllocateClientContext, ctx); } QmiClient * qmi_device_allocate_client_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return g_task_propagate_pointer (G_TASK (res), error); } static void build_client_object (GTask *task) { const QmiMessageCtlGetVersionInfoOutputServiceListService *version_info; g_autofree gchar *version_string = NULL; QmiDevice *self; AllocateClientContext *ctx; QmiClient *client; GError *error = NULL; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); /* We now have a proper CID for the client, we should be able to create it * right away */ client = g_object_new (ctx->client_type, QMI_CLIENT_DEVICE, self, QMI_CLIENT_SERVICE, ctx->service, QMI_CLIENT_CID, ctx->cid, NULL); /* Add version info to the client if it was retrieved */ version_info = find_service_version_info (self, ctx->service); if (version_info) g_object_set (client, QMI_CLIENT_VERSION_MAJOR, version_info->major_version, QMI_CLIENT_VERSION_MINOR, version_info->minor_version, NULL); #if QMI_QRTR_SUPPORTED else if (self->priv->node) { /* QRTR does not have any way of fetching version information. Assume * all services can handle all message types and TLVs. */ g_debug ("[%s] client version cannot be retrieved when using QRTR", qmi_file_get_path_display (self->priv->file)); g_object_set (client, QMI_CLIENT_VERSION_MAJOR, QMI_CLIENT_VERSION_UNKNOWN, QMI_CLIENT_VERSION_MINOR, QMI_CLIENT_VERSION_UNKNOWN, NULL); } #endif /* Register the client to get indications */ if (!register_client (self, client, &error)) { g_prefix_error (&error, "Cannot register new client with CID '%u' and service '%s'", ctx->cid, qmi_service_get_string (ctx->service)); g_task_return_error (task, error); g_object_unref (task); g_object_unref (client); return; } /* Build version string for the logging */ if (self->priv->supported_services) { const QmiMessageCtlGetVersionInfoOutputServiceListService *info; info = find_service_version_info (self, ctx->service); if (info) version_string = g_strdup_printf ("%u.%u", info->major_version, info->minor_version); } g_debug ("[%s] registered '%s' (version %s) client with ID '%u'", qmi_file_get_path_display (self->priv->file), qmi_service_get_string (ctx->service), version_string ? version_string : "unknown", ctx->cid); /* Client created and registered, complete successfully */ g_task_return_pointer (task, client, g_object_unref); g_object_unref (task); } #define ALLOCATE_CID_READY(MessageName, message_name) \ static void \ message_name##_ready (QmiClientCtl *client_ctl, \ GAsyncResult *res, \ GTask *task) \ { \ g_autoptr(QmiMessageCtl##MessageName##Output) output = NULL; \ QmiService service; \ guint8 cid; \ GError *error = NULL; \ AllocateClientContext *ctx; \ \ /* Check result of the async operation */ \ output = qmi_client_ctl_##message_name##_finish (client_ctl, res, &error); \ if (!output) { \ g_prefix_error (&error, "CID allocation failed in the CTL client: "); \ g_task_return_error (task, error); \ g_object_unref (task); \ return; \ } \ \ /* Check result of the QMI operation */ \ if (!qmi_message_ctl_##message_name##_output_get_result (output, &error)) { \ g_task_return_error (task, error); \ g_object_unref (task); \ return; \ } \ \ /* Allocation info is mandatory when result is success */ \ g_assert (qmi_message_ctl_##message_name##_output_get_allocation_info ( \ output, &service, &cid, NULL)); \ \ ctx = g_task_get_task_data (task); \ \ if (service != ctx->service) { \ g_task_return_new_error ( \ task, \ QMI_CORE_ERROR, \ QMI_CORE_ERROR_FAILED, \ "CID allocation failed in the CTL client: " \ "Service mismatch (requested '%s', got '%s')", \ qmi_service_get_string (ctx->service), \ qmi_service_get_string (service)); \ g_object_unref (task); \ return; \ } \ \ ctx->cid = cid; \ build_client_object (task); \ } ALLOCATE_CID_READY (AllocateCid, allocate_cid) ALLOCATE_CID_READY (InternalAllocateCidQrtr, internal_allocate_cid_qrtr) void qmi_device_allocate_client (QmiDevice *self, QmiService service, guint8 cid, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { AllocateClientContext *ctx; GTask *task; g_return_if_fail (QMI_IS_DEVICE (self)); g_return_if_fail (service != QMI_SERVICE_UNKNOWN); ctx = g_slice_new0 (AllocateClientContext); ctx->service = service; ctx->client_type = G_TYPE_INVALID; task = g_task_new (self, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)allocate_client_context_free); /* Check if the requested service is supported by the device */ if (!check_service_supported (self, service)) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED, "Service '%s' not supported by the device", qmi_service_get_string (service)); g_object_unref (task); return; } switch (service) { case QMI_SERVICE_CTL: g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_ARGS, "Cannot create additional clients for the CTL service"); g_object_unref (task); return; case QMI_SERVICE_DMS: #if defined HAVE_QMI_SERVICE_DMS ctx->client_type = QMI_TYPE_CLIENT_DMS; #endif break; case QMI_SERVICE_WDS: #if defined HAVE_QMI_SERVICE_WDS ctx->client_type = QMI_TYPE_CLIENT_WDS; #endif break; case QMI_SERVICE_NAS: #if defined HAVE_QMI_SERVICE_NAS ctx->client_type = QMI_TYPE_CLIENT_NAS; #endif break; case QMI_SERVICE_WMS: #if defined HAVE_QMI_SERVICE_WMS ctx->client_type = QMI_TYPE_CLIENT_WMS; #endif break; case QMI_SERVICE_PDS: #if defined HAVE_QMI_SERVICE_PDS ctx->client_type = QMI_TYPE_CLIENT_PDS; #endif break; case QMI_SERVICE_PDC: #if defined HAVE_QMI_SERVICE_PDC ctx->client_type = QMI_TYPE_CLIENT_PDC; #endif break; case QMI_SERVICE_PBM: #if defined HAVE_QMI_SERVICE_PBM ctx->client_type = QMI_TYPE_CLIENT_PBM; #endif break; case QMI_SERVICE_UIM: #if defined HAVE_QMI_SERVICE_UIM ctx->client_type = QMI_TYPE_CLIENT_UIM; #endif break; case QMI_SERVICE_OMA: #if defined HAVE_QMI_SERVICE_OMA ctx->client_type = QMI_TYPE_CLIENT_OMA; #endif break; case QMI_SERVICE_GAS: #if defined HAVE_QMI_SERVICE_GAS ctx->client_type = QMI_TYPE_CLIENT_GAS; #endif break; case QMI_SERVICE_GMS: #if defined HAVE_QMI_SERVICE_GMS ctx->client_type = QMI_TYPE_CLIENT_GMS; #endif break; case QMI_SERVICE_WDA: #if defined HAVE_QMI_SERVICE_WDA ctx->client_type = QMI_TYPE_CLIENT_WDA; #endif break; case QMI_SERVICE_VOICE: #if defined HAVE_QMI_SERVICE_VOICE ctx->client_type = QMI_TYPE_CLIENT_VOICE; #endif break; case QMI_SERVICE_LOC: #if defined HAVE_QMI_SERVICE_LOC ctx->client_type = QMI_TYPE_CLIENT_LOC; #endif break; case QMI_SERVICE_QOS: #if defined HAVE_QMI_SERVICE_QOS ctx->client_type = QMI_TYPE_CLIENT_QOS; #endif break; case QMI_SERVICE_DSD: #if defined HAVE_QMI_SERVICE_DSD ctx->client_type = QMI_TYPE_CLIENT_DSD; #endif break; case QMI_SERVICE_SAR: #if defined HAVE_QMI_SERVICE_SAR ctx->client_type = QMI_TYPE_CLIENT_SAR; #endif break; case QMI_SERVICE_DPM: #if defined HAVE_QMI_SERVICE_DPM ctx->client_type = QMI_TYPE_CLIENT_DPM; #endif break; case QMI_SERVICE_FOX: #if defined HAVE_QMI_SERVICE_FOX ctx->client_type = QMI_TYPE_CLIENT_FOX; #endif break; case QMI_SERVICE_ATR: #if defined HAVE_QMI_SERVICE_ATR ctx->client_type = QMI_TYPE_CLIENT_ATR; #endif break; case QMI_SERVICE_IMSP: #if defined HAVE_QMI_SERVICE_IMSP ctx->client_type = QMI_TYPE_CLIENT_IMSP; #endif break; case QMI_SERVICE_IMSA: #if defined HAVE_QMI_SERVICE_IMSA ctx->client_type = QMI_TYPE_CLIENT_IMSA; #endif break; case QMI_SERVICE_IMS: #if defined HAVE_QMI_SERVICE_IMS ctx->client_type = QMI_TYPE_CLIENT_IMS; #endif break; case QMI_SERVICE_SSC: #if defined HAVE_QMI_SERVICE_SSC ctx->client_type = QMI_TYPE_CLIENT_SSC; #endif break; case QMI_SERVICE_UNKNOWN: g_assert_not_reached (); case QMI_SERVICE_AUTH: case QMI_SERVICE_AT: case QMI_SERVICE_CAT2: case QMI_SERVICE_QCHAT: case QMI_SERVICE_RMTFS: case QMI_SERVICE_TEST: case QMI_SERVICE_ADC: case QMI_SERVICE_CSD: case QMI_SERVICE_MFS: case QMI_SERVICE_TIME: case QMI_SERVICE_TS: case QMI_SERVICE_TMD: case QMI_SERVICE_SAP: case QMI_SERVICE_TSYNC: case QMI_SERVICE_RFSA: case QMI_SERVICE_CSVT: case QMI_SERVICE_QCMAP: case QMI_SERVICE_IMSVT: case QMI_SERVICE_COEX: case QMI_SERVICE_STX: case QMI_SERVICE_BIT: case QMI_SERVICE_IMSRTP: case QMI_SERVICE_RFRPE: case QMI_SERVICE_SSCTL: case QMI_SERVICE_CAT: case QMI_SERVICE_RMS: case QMI_SERVICE_FOTA: default: break; } if (ctx->client_type == G_TYPE_INVALID) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_ARGS, "Clients for service '%s' not supported", qmi_service_get_string (service)); g_object_unref (task); return; } /* Allocate a new CID for the client to be created */ if (cid == QMI_CID_NONE) { g_debug ("[%s] allocating new client ID...", qmi_file_get_path_display (self->priv->file)); /* 8-bit service */ if (ctx->service <= G_MAXUINT8) { g_autoptr(QmiMessageCtlAllocateCidInput) input = NULL; input = qmi_message_ctl_allocate_cid_input_new (); qmi_message_ctl_allocate_cid_input_set_service (input, ctx->service, NULL); qmi_client_ctl_allocate_cid (self->priv->client_ctl, input, timeout, cancellable, (GAsyncReadyCallback)allocate_cid_ready, task); } /* 16-bit service */ else if (ctx->service > G_MAXUINT8 && ctx->service <= G_MAXUINT16) { g_autoptr(QmiMessageCtlInternalAllocateCidQrtrInput) input = NULL; input = qmi_message_ctl_internal_allocate_cid_qrtr_input_new (); qmi_message_ctl_internal_allocate_cid_qrtr_input_set_service (input, ctx->service, NULL); qmi_client_ctl_internal_allocate_cid_qrtr (self->priv->client_ctl, input, timeout, cancellable, (GAsyncReadyCallback)internal_allocate_cid_qrtr_ready, task); } else g_assert_not_reached (); return; } /* Reuse the given CID */ g_debug ("[%s] reusing client CID '%u'...", qmi_file_get_path_display (self->priv->file), cid); ctx->cid = cid; build_client_object (task); } /*****************************************************************************/ /* Release client */ gboolean qmi_device_release_client_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } #define RELEASE_CID_READY(MessageName, message_name) \ static void \ message_name##_ready (QmiClientCtl *client_ctl, \ GAsyncResult *res, \ GTask *task) \ { \ g_autoptr(QmiMessageCtl##MessageName##Output) output = NULL; \ GError *error = NULL; \ \ /* Note: even if we return an error, the client is to be considered \ * released! (so shouldn't be used) */ \ \ /* Check result of the async operation */ \ output = qmi_client_ctl_##message_name##_finish (client_ctl, res, &error); \ if (!output) { \ g_task_return_error (task, error); \ g_object_unref (task); \ return; \ } \ \ /* Check result of the QMI operation */ \ if (!qmi_message_ctl_##message_name##_output_get_result (output, &error)) { \ g_task_return_error (task, error); \ g_object_unref (task); \ return; \ } \ \ g_task_return_boolean (task, TRUE); \ g_object_unref (task); \ } RELEASE_CID_READY (ReleaseCid, release_cid) RELEASE_CID_READY (InternalReleaseCidQrtr, internal_release_cid_qrtr) void qmi_device_release_client (QmiDevice *self, QmiClient *client, QmiDeviceReleaseClientFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_autofree gchar *flags_str = NULL; GTask *task; QmiService service; guint8 cid; g_return_if_fail (QMI_IS_DEVICE (self)); g_return_if_fail (QMI_IS_CLIENT (client)); cid = qmi_client_get_cid (client); service = qmi_client_get_service (client); /* The CTL client should not have been created out of the QmiDevice */ g_return_if_fail (service != QMI_SERVICE_CTL); flags_str = qmi_device_release_client_flags_build_string_from_mask (flags); g_debug ("[%s] releasing '%s' client with flags '%s'...", qmi_file_get_path_display (self->priv->file), qmi_service_get_string (service), flags_str); task = g_task_new (self, cancellable, callback, user_data); /* Do not try to release an already released client */ if (cid == QMI_CID_NONE) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_ARGS, "Client is already released"); g_object_unref (task); return; } /* Keep the client object valid until after we reset its contents below */ g_object_ref (client); { /* Unregister from device */ unregister_client (self, client); g_debug ("[%s] unregistered '%s' client with ID '%u'", qmi_file_get_path_display (self->priv->file), qmi_service_get_string (service), cid); /* Reset the contents of the client object, making it invalid */ g_object_set (client, QMI_CLIENT_CID, QMI_CID_NONE, QMI_CLIENT_SERVICE, QMI_SERVICE_UNKNOWN, QMI_CLIENT_DEVICE, NULL, NULL); } g_object_unref (client); /* And now, really try to release the CID */ if (flags & QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID) { /* 8-bit service */ if (service <= G_MAXUINT8) { g_autoptr(QmiMessageCtlReleaseCidInput)input = NULL; input = qmi_message_ctl_release_cid_input_new (); qmi_message_ctl_release_cid_input_set_release_info (input, service, cid, NULL); qmi_client_ctl_release_cid (self->priv->client_ctl, input, timeout, cancellable, (GAsyncReadyCallback)release_cid_ready, task); } /* 16-bit service */ else if (service > G_MAXUINT8 && service <= G_MAXUINT16) { g_autoptr(QmiMessageCtlInternalReleaseCidQrtrInput) input = NULL; input = qmi_message_ctl_internal_release_cid_qrtr_input_new (); qmi_message_ctl_internal_release_cid_qrtr_input_set_release_info (input, service, cid, NULL); qmi_client_ctl_internal_release_cid_qrtr (self->priv->client_ctl, input, timeout, cancellable, (GAsyncReadyCallback)internal_release_cid_qrtr_ready, task); } else g_assert_not_reached (); return; } /* No need to release the CID, so just done */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; } /*****************************************************************************/ /* Set instance ID */ gboolean qmi_device_set_instance_id_finish (QmiDevice *self, GAsyncResult *res, guint16 *link_id, GError **error) { gssize value; value = g_task_propagate_int (G_TASK (res), error); if (value == -1) return FALSE; if (link_id) *link_id = (guint16)value; return TRUE; } static void set_instance_id_ready (QmiClientCtl *client_ctl, GAsyncResult *res, GTask *task) { QmiMessageCtlSetInstanceIdOutput *output; GError *error = NULL; /* Check result of the async operation */ output = qmi_client_ctl_set_instance_id_finish (client_ctl, res, &error); if (!output) g_task_return_error (task, error); else { /* Check result of the QMI operation */ if (!qmi_message_ctl_set_instance_id_output_get_result (output, &error)) g_task_return_error (task, error); else { guint16 link_id; qmi_message_ctl_set_instance_id_output_get_link_id (output, &link_id, NULL); g_task_return_int (task, link_id); } qmi_message_ctl_set_instance_id_output_unref (output); } g_object_unref (task); } void qmi_device_set_instance_id (QmiDevice *self, guint8 instance_id, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; QmiMessageCtlSetInstanceIdInput *input; g_return_if_fail (QMI_IS_DEVICE (self)); task = g_task_new (self, cancellable, callback, user_data); input = qmi_message_ctl_set_instance_id_input_new (); qmi_message_ctl_set_instance_id_input_set_id ( input, instance_id, NULL); qmi_client_ctl_set_instance_id (self->priv->client_ctl, input, timeout, cancellable, (GAsyncReadyCallback)set_instance_id_ready, task); qmi_message_ctl_set_instance_id_input_unref (input); } /*****************************************************************************/ /* Input channel processing */ static void process_message (QmiMessage *message, QmiDevice *self); static void endpoint_new_data_cb (QmiEndpoint *endpoint, QmiDevice *self) { GError *error = NULL; if (!qmi_endpoint_parse_buffer (endpoint, (QmiMessageHandler)process_message, self, &error)) { g_warning ("[%s] parsing error: %s", qmi_file_get_path_display (self->priv->file), error->message); g_error_free (error); } } static void endpoint_hangup_cb (QmiEndpoint *endpoint, QmiDevice *self) { g_debug ("[%s] endpoint hangup: removed", qmi_file_get_path_display (self->priv->file)); /* cancel all ongoing transactions as the endpoing hangup happened */ device_hangup_transactions (self); g_signal_emit (self, signals[SIGNAL_REMOVED], 0); } typedef struct { QmiClient *client; QmiMessage *message; } IdleIndicationContext; static gboolean process_indication_idle (IdleIndicationContext *ctx) { g_assert (ctx->client != NULL); g_assert (ctx->message != NULL); __qmi_client_process_indication (ctx->client, ctx->message); g_object_unref (ctx->client); qmi_message_unref (ctx->message); g_slice_free (IdleIndicationContext, ctx); return FALSE; } static void report_indication (QmiClient *client, QmiMessage *message) { IdleIndicationContext *ctx; GSource *source; /* Setup an idle to Pass the indication down to the client */ ctx = g_slice_new (IdleIndicationContext); ctx->client = g_object_ref (client); ctx->message = qmi_message_ref (message); source = g_idle_source_new (); g_source_set_priority (source, G_PRIORITY_DEFAULT); g_source_set_callback (source, (GSourceFunc)process_indication_idle, ctx, NULL); g_source_attach (source, g_main_context_get_thread_default ()); g_source_unref (source); } static void trace_message (QmiDevice *self, QmiMessage *message, gboolean sent_or_received, const gchar *message_str, QmiMessageContext *message_context) { gchar *printable; const gchar *prefix_str; const gchar *action_str; gchar *vendor_str = NULL; if (!qmi_utils_get_traces_enabled ()) return; if (sent_or_received) { prefix_str = "<<<<<< "; action_str = "sent"; } else { prefix_str = "<<<<<< "; action_str = "received"; } if (qmi_utils_get_show_personal_info () || (((GByteArray *)message)->len < MAX_PRINTED_BYTES)) { printable = qmi_helpers_str_hex (((GByteArray *)message)->data, ((GByteArray *)message)->len, ':'); } else { g_autofree gchar *tmp = NULL; tmp = qmi_helpers_str_hex (((GByteArray *)message)->data, MAX_PRINTED_BYTES, ':'); printable = g_strdup_printf ("%s...", tmp); } g_debug ("[%s] %s message...\n" "%sRAW:\n" "%s length = %u\n" "%s data = %s\n", qmi_file_get_path_display (self->priv->file), action_str, prefix_str, prefix_str, ((GByteArray *)message)->len, prefix_str, printable); g_free (printable); if (message_context) { guint16 vendor_id; vendor_id = qmi_message_context_get_vendor_id (message_context); if (vendor_id != QMI_MESSAGE_VENDOR_GENERIC) vendor_str = g_strdup_printf ("vendor-specific (0x%04x)", vendor_id); } printable = qmi_message_get_printable_full (message, message_context, prefix_str); g_debug ("[%s] %s %s %s (translated)...\n%s", qmi_file_get_path_display (self->priv->file), action_str, vendor_str ? vendor_str : "generic", message_str, printable); g_free (printable); g_free (vendor_str); } static void process_message (QmiMessage *message, QmiDevice *self) { if (qmi_message_is_indication (message)) { /* Indication traces translated without an explicit vendor */ trace_message (self, message, FALSE, "indication", NULL); /* Generic emission of the indication */ g_signal_emit (self, signals[SIGNAL_INDICATION], 0, message); if (qmi_message_get_client_id (message) == QMI_CID_BROADCAST) { GHashTableIter iter; gpointer key; QmiClient *client; g_hash_table_iter_init (&iter, self->priv->registered_clients); while (g_hash_table_iter_next (&iter, &key, (gpointer *)&client)) { /* For broadcast messages, report them just if the service matches */ if (qmi_message_get_service (message) == qmi_client_get_service (client)) report_indication (client, message); } } else { QmiClient *client; client = g_hash_table_lookup (self->priv->registered_clients, build_registered_client_key (qmi_message_get_client_id (message), qmi_message_get_service (message))); if (client) report_indication (client, message); } return; } if (qmi_message_is_response (message)) { Transaction *tr; tr = device_match_transaction (self, message); if (!tr) { /* Unmatched transactions translated without an explicit context */ trace_message (self, message, FALSE, "response", NULL); g_debug ("[%s] no transaction matched in received message", qmi_file_get_path_display (self->priv->file)); return; } /* Did the transaction sequence get out of sync? e.g. if the module reboots itself * while we're talking to it. If so, fail the transaction right away without setting the * message as response, or otherwise the parsers will complain */ if (qmi_message_get_message_id (tr->message) != qmi_message_get_message_id (message)) { g_autoptr(GError) error = NULL; error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_UNEXPECTED_MESSAGE, "Unexpected response of type 0x%04x received matching transaction for request of type 0x%04x", qmi_message_get_message_id (message), qmi_message_get_message_id (tr->message)); /* Translate without an explicit context as this message has nothing to do with the * request. */ trace_message (self, message, FALSE, "response", NULL); g_debug ("[%s] mismatched message id in received message for transaction 0x%04x (expected 0x%04x, received 0x%04x)", qmi_file_get_path_display (self->priv->file), qmi_message_get_transaction_id (message), qmi_message_get_message_id (tr->message), qmi_message_get_message_id (message)); transaction_complete_and_free (tr, NULL, error); return; } /* Reset number of consecutive timeouts */ if (self->priv->consecutive_timeouts > 0) { g_debug ("[%s] reseted number of consecutive timeouts", qmi_file_get_path_display (self->priv->file)); self->priv->consecutive_timeouts = 0; g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_CONSECUTIVE_TIMEOUTS]); } /* Matched transactions translated with the same context as the request */ trace_message (self, message, FALSE, "response", tr->message_context); /* Report the reply message */ transaction_complete_and_free (tr, message, NULL); return; } /* Unexpected message types translated without an explicit context */ trace_message (self, message, FALSE, "unexpected message", NULL); g_debug ("[%s] message received but it is neither an indication nor a response. Skipping it.", qmi_file_get_path_display (self->priv->file)); } /*****************************************************************************/ static gboolean setup_net_port_manager (QmiDevice *self, GError **error) { QmiDeviceExpectedDataFormat expected_data_format; /* If we have a valid one already, use that one */ if (self->priv->net_port_manager) return TRUE; /* The qmi_wwan driver allows configuring the expected data format, * and depending on the configured one, we'll use one link management * api or another one. */ expected_data_format = qmi_device_get_expected_data_format (self, NULL); switch (expected_data_format) { case QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3: g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Link management not supported with the expected data format configured as 802.3"); break; case QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP: self->priv->net_port_manager = QMI_NET_PORT_MANAGER (qmi_net_port_manager_qmiwwan_new (self->priv->wwan_iface, error)); break; case QMI_DEVICE_EXPECTED_DATA_FORMAT_QMAP_PASS_THROUGH: case QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN: default: #if defined RMNET_SUPPORT_ENABLED /* when the data format is unknown, it very likely is because this * is not the qmi_wwan driver; fallback to plain rmnet in that * case. */ self->priv->net_port_manager = QMI_NET_PORT_MANAGER (qmi_net_port_manager_rmnet_new (error)); #else g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Link management not supported"); #endif break; } return !!self->priv->net_port_manager; } /*****************************************************************************/ /* Link management APIs */ typedef struct { guint mux_id; gchar *ifname; } AddLinkResult; static void add_link_result_free (AddLinkResult *ctx) { g_free (ctx->ifname); g_free (ctx); } gchar * qmi_device_add_link_with_flags_finish (QmiDevice *self, GAsyncResult *res, guint *mux_id, GError **error) { AddLinkResult *ctx; gchar *ifname; ctx = g_task_propagate_pointer (G_TASK (res), error); if (!ctx) return NULL; if (mux_id) *mux_id = ctx->mux_id; ifname = g_steal_pointer (&ctx->ifname); add_link_result_free (ctx); return ifname; } gchar * qmi_device_add_link_finish (QmiDevice *self, GAsyncResult *res, guint *mux_id, GError **error) { return qmi_device_add_link_with_flags_finish (self, res, mux_id, error); } static void device_add_link_ready (QmiNetPortManager *net_port_manager, GAsyncResult *res, GTask *task) { GError *error = NULL; AddLinkResult *ctx; ctx = g_new0 (AddLinkResult, 1); ctx->ifname = qmi_net_port_manager_add_link_finish (net_port_manager, &ctx->mux_id, res, &error); if (!ctx->ifname) { g_prefix_error (&error, "Could not allocate link: "); g_task_return_error (task, error); add_link_result_free (ctx); } else g_task_return_pointer (task, ctx, (GDestroyNotify) add_link_result_free); g_object_unref (task); } void qmi_device_add_link_with_flags (QmiDevice *self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, QmiDeviceAddLinkFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; GError *error = NULL; g_return_if_fail (QMI_IS_DEVICE (self)); g_return_if_fail (base_ifname); g_return_if_fail (mux_id >= QMI_DEVICE_MUX_ID_MIN); g_return_if_fail ((mux_id <= QMI_DEVICE_MUX_ID_MAX) || (mux_id == QMI_DEVICE_MUX_ID_AUTOMATIC)); task = g_task_new (self, cancellable, callback, user_data); if (!setup_net_port_manager (self, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } g_assert (self->priv->net_port_manager); qmi_net_port_manager_add_link (self->priv->net_port_manager, mux_id, base_ifname, ifname_prefix, flags, 5, cancellable, (GAsyncReadyCallback) device_add_link_ready, task); } void qmi_device_add_link (QmiDevice *self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_device_add_link_with_flags (self, mux_id, base_ifname, ifname_prefix, QMI_DEVICE_ADD_LINK_FLAGS_NONE, cancellable, callback, user_data); } gboolean qmi_device_delete_link_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void device_del_link_ready (QmiNetPortManager *net_port_manager, GAsyncResult *res, GTask *task) { GError *error = NULL; if (!qmi_net_port_manager_del_link_finish (net_port_manager, res, &error)) g_task_return_error (task, error); else g_task_return_boolean (task, TRUE); g_object_unref (task); } void qmi_device_delete_link (QmiDevice *self, const gchar *ifname, guint mux_id, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; GError *error = NULL; g_return_if_fail (QMI_IS_DEVICE (self)); g_return_if_fail (ifname); task = g_task_new (self, cancellable, callback, user_data); if (!setup_net_port_manager (self, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } g_assert (self->priv->net_port_manager); qmi_net_port_manager_del_link (self->priv->net_port_manager, ifname, mux_id, 5, /* timeout */ cancellable, (GAsyncReadyCallback) device_del_link_ready, task); } /*****************************************************************************/ gboolean qmi_device_delete_all_links_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void device_del_all_links_ready (QmiNetPortManager *net_port_manager, GAsyncResult *res, GTask *task) { GError *error = NULL; if (!qmi_net_port_manager_del_all_links_finish (net_port_manager, res, &error)) g_task_return_error (task, error); else g_task_return_boolean (task, TRUE); g_object_unref (task); } void qmi_device_delete_all_links (QmiDevice *self, const gchar *base_ifname, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; GError *error = NULL; g_return_if_fail (QMI_IS_DEVICE (self)); g_return_if_fail (base_ifname); task = g_task_new (self, cancellable, callback, user_data); if (!setup_net_port_manager (self, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } g_assert (self->priv->net_port_manager); qmi_net_port_manager_del_all_links (self->priv->net_port_manager, base_ifname, cancellable, (GAsyncReadyCallback) device_del_all_links_ready, task); } /*****************************************************************************/ gboolean qmi_device_list_links (QmiDevice *self, const gchar *base_ifname, GPtrArray **out_links, GError **error) { g_return_val_if_fail (QMI_IS_DEVICE (self), FALSE); g_return_val_if_fail (base_ifname, FALSE); if (!setup_net_port_manager (self, error)) return FALSE; g_assert (self->priv->net_port_manager); return qmi_net_port_manager_list_links (self->priv->net_port_manager, base_ifname, out_links, error); } /*****************************************************************************/ gboolean qmi_device_check_link_supported (QmiDevice *self, GError **error) { g_return_val_if_fail (QMI_IS_DEVICE (self), FALSE); /* if we can setup a net port manager, link management is supported */ return setup_net_port_manager (self, error); } /*****************************************************************************/ /* Open device */ #define SYNC_TIMEOUT_SECS 2 typedef enum { DEVICE_OPEN_CONTEXT_STEP_FIRST = 0, DEVICE_OPEN_CONTEXT_STEP_DRIVER, DEVICE_OPEN_CONTEXT_STEP_CREATE_ENDPOINT, DEVICE_OPEN_CONTEXT_STEP_OPEN_ENDPOINT, DEVICE_OPEN_CONTEXT_STEP_FLAGS_VERSION_INFO, DEVICE_OPEN_CONTEXT_STEP_FLAGS_SYNC, DEVICE_OPEN_CONTEXT_STEP_FLAGS_NETPORT, DEVICE_OPEN_CONTEXT_STEP_FLAGS_EXPECT_INDICATIONS, DEVICE_OPEN_CONTEXT_STEP_LAST } DeviceOpenContextStep; typedef struct { DeviceOpenContextStep step; QmiDeviceOpenFlags flags; guint timeout; guint version_check_retries; guint sync_retries; } DeviceOpenContext; static void device_open_context_free (DeviceOpenContext *ctx) { g_slice_free (DeviceOpenContext, ctx); } gboolean qmi_device_open_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void device_open_step (GTask *task); static void setup_indications_ready (QmiEndpoint *endpoint, GAsyncResult *res, GTask *task) { GError *error = NULL; DeviceOpenContext *ctx; ctx = g_task_get_task_data (task); if (!qmi_endpoint_setup_indications_finish (endpoint, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } ctx->step++; device_open_step (task); } static void ctl_set_data_format_ready (QmiClientCtl *client, GAsyncResult *res, GTask *task) { QmiDevice *self; DeviceOpenContext *ctx; QmiMessageCtlSetDataFormatOutput *output = NULL; GError *error = NULL; output = qmi_client_ctl_set_data_format_finish (client, res, &error); /* Check result of the async operation */ if (!output) { g_task_return_error (task, error); g_object_unref (task); return; } /* Check result of the QMI operation */ if (!qmi_message_ctl_set_data_format_output_get_result (output, &error)) { g_task_return_error (task, error); g_object_unref (task); qmi_message_ctl_set_data_format_output_unref (output); return; } self = g_task_get_source_object (task); g_debug ("[%s] network port data format operation finished", qmi_file_get_path_display (self->priv->file)); qmi_message_ctl_set_data_format_output_unref (output); /* Go on */ ctx = g_task_get_task_data (task); ctx->step++; device_open_step (task); } static void sync_ready (QmiClientCtl *client_ctl, GAsyncResult *res, GTask *task) { QmiDevice *self; DeviceOpenContext *ctx; GError *error = NULL; QmiMessageCtlSyncOutput *output; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); /* Check result of the async operation */ output = qmi_client_ctl_sync_finish (client_ctl, res, &error); if (!output) { if (g_error_matches (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TIMEOUT)) { /* Update retries... */ ctx->sync_retries--; /* If retries left, retry */ if (ctx->sync_retries > 0) { g_error_free (error); qmi_client_ctl_sync (self->priv->client_ctl, NULL, SYNC_TIMEOUT_SECS, g_task_get_cancellable (task), (GAsyncReadyCallback)sync_ready, task); return; } /* Otherwise, propagate the error */ } g_task_return_error (task, error); g_object_unref (task); return; } /* Check result of the QMI operation */ if (!qmi_message_ctl_sync_output_get_result (output, &error)) { g_task_return_error (task, error); g_object_unref (task); qmi_message_ctl_sync_output_unref (output); return; } g_debug ("[%s] sync operation finished", qmi_file_get_path_display (self->priv->file)); qmi_message_ctl_sync_output_unref (output); /* Go on */ ctx->step++; device_open_step (task); } static void open_version_info_ready (QmiClientCtl *client_ctl, GAsyncResult *res, GTask *task) { QmiDevice *self; DeviceOpenContext *ctx; GArray *service_list; QmiMessageCtlGetVersionInfoOutput *output; GError *error = NULL; guint i; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); /* Check result of the async operation */ output = qmi_client_ctl_get_version_info_finish (client_ctl, res, &error); if (!output) { if (g_error_matches (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TIMEOUT)) { /* Update retries... */ ctx->version_check_retries--; /* If retries left, retry */ if (ctx->version_check_retries > 0) { g_error_free (error); qmi_client_ctl_get_version_info (self->priv->client_ctl, NULL, 1, g_task_get_cancellable (task), (GAsyncReadyCallback)open_version_info_ready, task); return; } /* Otherwise, propagate the error */ } g_task_return_error (task, error); g_object_unref (task); return; } /* Check result of the QMI operation */ if (!qmi_message_ctl_get_version_info_output_get_result (output, &error)) { g_task_return_error (task, error); g_object_unref (task); qmi_message_ctl_get_version_info_output_unref (output); return; } /* QMI operation succeeded, we can now get the outputs */ service_list = NULL; qmi_message_ctl_get_version_info_output_get_service_list (output, &service_list, NULL); g_clear_pointer (&self->priv->supported_services, g_array_unref); self->priv->supported_services = g_array_ref (service_list); g_debug ("[%s] device supports %u services:", qmi_file_get_path_display (self->priv->file), self->priv->supported_services->len); for (i = 0; i < self->priv->supported_services->len; i++) { QmiMessageCtlGetVersionInfoOutputServiceListService *info; const gchar *service_str; info = &g_array_index (self->priv->supported_services, QmiMessageCtlGetVersionInfoOutputServiceListService, i); service_str = qmi_service_get_string (info->service); if (service_str) g_debug ("[%s] %s (%u.%u)", qmi_file_get_path_display (self->priv->file), service_str, info->major_version, info->minor_version); else g_debug ("[%s] unknown [0x%02x] (%u.%u)", qmi_file_get_path_display (self->priv->file), info->service, info->major_version, info->minor_version); } qmi_message_ctl_get_version_info_output_unref (output); /* Go on */ ctx->step++; device_open_step (task); } #if QMI_QRTR_SUPPORTED static void build_services_from_qrtr_node (GTask *task) { QmiDevice *self; DeviceOpenContext *ctx; GList *services; guint n_services; GList *elem; QrtrNodeServiceInfo *qrtr_serv_info; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); g_assert (self->priv->node); services = qrtr_node_peek_service_info_list (self->priv->node); n_services = g_list_length (services); g_clear_pointer (&self->priv->supported_services, g_array_unref); self->priv->supported_services = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageCtlGetVersionInfoOutputServiceListService), n_services); g_debug ("[%s] device supports %u services:", qmi_file_get_path_display (self->priv->file), n_services); for (elem = services; elem; elem = elem->next) { const gchar *service_str; QmiMessageCtlGetVersionInfoOutputServiceListService info; qrtr_serv_info = elem->data; info.service = qrtr_node_service_info_get_service (qrtr_serv_info); info.major_version = qrtr_node_service_info_get_version (qrtr_serv_info); g_array_append_val (self->priv->supported_services, info); service_str = qmi_service_get_string (info.service); if (service_str) g_debug ("[%s] %s (%u) ", qmi_file_get_path_display (self->priv->file), service_str, info.major_version); else g_debug ("[%s] unknown [0x%04x] (%u)", qmi_file_get_path_display (self->priv->file), info.service, info.major_version); } ctx->step++; device_open_step (task); } #endif static void endpoint_ready (QmiEndpoint *endpoint, GAsyncResult *res, GTask *task) { GError *error = NULL; DeviceOpenContext *ctx; ctx = g_task_get_task_data (task); if (!qmi_endpoint_open_finish (endpoint, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } ctx->step++; device_open_step (task); } #define NETPORT_FLAGS (QMI_DEVICE_OPEN_FLAGS_NET_802_3 | \ QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP | \ QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER | \ QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER) static void device_create_endpoint (QmiDevice *self, DeviceOpenContext *ctx) { if (!(ctx->flags & QMI_DEVICE_OPEN_FLAGS_MBIM)) { #if QMI_QRTR_SUPPORTED /* We talk to proxies over QMUX even if they are proxying a QRTR device. */ if (self->priv->node && !(ctx->flags & QMI_DEVICE_OPEN_FLAGS_PROXY)) { self->priv->endpoint = QMI_ENDPOINT (qmi_endpoint_qrtr_new (self->priv->node)); } else #endif { self->priv->endpoint = QMI_ENDPOINT (qmi_endpoint_qmux_new (self->priv->file, self->priv->proxy_path, self->priv->client_ctl)); } } #if defined MBIM_QMUX_ENABLED else { self->priv->endpoint = QMI_ENDPOINT (qmi_endpoint_mbim_new (self->priv->file)); } #endif /* MBIM_QMUX_ENABLED */ if (!self->priv->endpoint) return; self->priv->endpoint_new_data_id = g_signal_connect (self->priv->endpoint, QMI_ENDPOINT_SIGNAL_NEW_DATA, G_CALLBACK (endpoint_new_data_cb), self); self->priv->endpoint_hangup_id = g_signal_connect (self->priv->endpoint, QMI_ENDPOINT_SIGNAL_HANGUP, G_CALLBACK (endpoint_hangup_cb), self); g_debug ("[%s] created endpoint", qmi_file_get_path_display (self->priv->file)); } static gboolean device_setup_open_flags_by_transport (QmiDevice *self, DeviceOpenContext *ctx, GError **error) { QmiHelpersTransportType transport; GError *inner_error = NULL; transport = qmi_helpers_get_transport_type (qmi_file_get_path (self->priv->file), &inner_error); if ((transport == QMI_HELPERS_TRANSPORT_TYPE_UNKNOWN) && !self->priv->no_file_check) g_warning ("[%s] couldn't detect transport type of port: %s", qmi_file_get_path_display (self->priv->file), inner_error->message); g_clear_error (&inner_error); #if defined MBIM_QMUX_ENABLED /* Auto mode requested? */ if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_AUTO) { switch (transport) { case QMI_HELPERS_TRANSPORT_TYPE_MBIM: g_debug ("[%s] automatically selecting MBIM mode", qmi_file_get_path_display (self->priv->file)); ctx->flags |= QMI_DEVICE_OPEN_FLAGS_MBIM; break; case QMI_HELPERS_TRANSPORT_TYPE_QMUX: g_debug ("[%s] automatically selecting QMI mode", qmi_file_get_path_display (self->priv->file)); ctx->flags &= ~QMI_DEVICE_OPEN_FLAGS_MBIM; break; case QMI_HELPERS_TRANSPORT_TYPE_UNKNOWN: g_set_error (&inner_error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Cannot automatically select QMI/MBIM mode"); break; default: g_assert_not_reached (); } goto out; } /* MBIM mode requested? */ if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_MBIM) { if ((transport != QMI_HELPERS_TRANSPORT_TYPE_MBIM) && !self->priv->no_file_check) g_warning ("[%s] requested MBIM mode but unexpected transport type found", qmi_file_get_path_display (self->priv->file)); goto out; } #else /* MBIM mode requested? */ if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_MBIM) { g_warning ("[%s] requested MBIM mode but no MBIM QMUX support available", qmi_file_get_path_display (self->priv->file)); goto out; } /* Treat AUTO as QMI mode, without warnings */ #endif /* MBIM_QMUX_ENABLED */ /* QMI mode requested? */ if ((transport != QMI_HELPERS_TRANSPORT_TYPE_QMUX) && !self->priv->no_file_check) g_warning ("[%s] requested QMI mode but unexpected transport type found", qmi_file_get_path_display (self->priv->file)); out: if (inner_error) { g_propagate_error (error, inner_error); return FALSE; } return TRUE; } static void device_open_step (GTask *task) { QmiDevice *self; DeviceOpenContext *ctx; GError *error = NULL; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); switch (ctx->step) { case DEVICE_OPEN_CONTEXT_STEP_FIRST: ctx->step++; /* Fall through */ case DEVICE_OPEN_CONTEXT_STEP_DRIVER: #if QMI_QRTR_SUPPORTED if (self->priv->node) { g_debug ("[%s] selecting QMI mode for QRTR endpoint", qmi_file_get_path_display (self->priv->file)); ctx->flags &= ~QMI_DEVICE_OPEN_FLAGS_MBIM; } else #endif if (!device_setup_open_flags_by_transport (self, ctx, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } ctx->step++; /* Fall through */ case DEVICE_OPEN_CONTEXT_STEP_CREATE_ENDPOINT: device_create_endpoint (self, ctx); if (!self->priv->endpoint) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Could not create endpoint"); g_object_unref (task); return; } ctx->step++; /* Fall through */ case DEVICE_OPEN_CONTEXT_STEP_OPEN_ENDPOINT: qmi_endpoint_open (self->priv->endpoint, !!(ctx->flags & QMI_DEVICE_OPEN_FLAGS_PROXY), 5, g_task_get_cancellable (task), (GAsyncReadyCallback)endpoint_ready, task); return; case DEVICE_OPEN_CONTEXT_STEP_FLAGS_VERSION_INFO: /* Query version info? */ if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_VERSION_INFO) { /* Setup how many times to retry... We'll retry once per second */ ctx->version_check_retries = ctx->timeout > 0 ? ctx->timeout : 1; g_debug ("[%s] checking version info (%u retries)...", qmi_file_get_path_display (self->priv->file), ctx->version_check_retries); #if QMI_QRTR_SUPPORTED if (self->priv->node) { g_debug ("[%s] QRTR does not support version info check: checking only for available services", qmi_file_get_path_display (self->priv->file)); build_services_from_qrtr_node (task); } else #endif qmi_client_ctl_get_version_info (self->priv->client_ctl, NULL, 1, g_task_get_cancellable (task), (GAsyncReadyCallback)open_version_info_ready, task); return; } ctx->step++; /* Fall through */ case DEVICE_OPEN_CONTEXT_STEP_FLAGS_SYNC: /* Sync? */ if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_SYNC) { /* Setup how many times to retry... We'll retry once per second */ ctx->sync_retries = ctx->timeout > SYNC_TIMEOUT_SECS ? (ctx->timeout / SYNC_TIMEOUT_SECS) : 1; g_debug ("[%s] running sync (%u retries)...", qmi_file_get_path_display (self->priv->file), ctx->sync_retries); qmi_client_ctl_sync (self->priv->client_ctl, NULL, SYNC_TIMEOUT_SECS, g_task_get_cancellable (task), (GAsyncReadyCallback)sync_ready, task); return; } ctx->step++; /* Fall through */ case DEVICE_OPEN_CONTEXT_STEP_FLAGS_NETPORT: /* Network port setup */ if (ctx->flags & NETPORT_FLAGS) { QmiMessageCtlSetDataFormatInput *input; QmiCtlDataFormat qos = QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT; QmiCtlDataLinkProtocol link_protocol = QMI_CTL_DATA_LINK_PROTOCOL_802_3; g_debug ("[%s] setting network port data format...", qmi_file_get_path_display (self->priv->file)); input = qmi_message_ctl_set_data_format_input_new (); if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER) qos = QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_PRESENT; qmi_message_ctl_set_data_format_input_set_format (input, qos, NULL); if (ctx->flags & QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP) link_protocol = QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP; qmi_message_ctl_set_data_format_input_set_protocol (input, link_protocol, NULL); qmi_client_ctl_set_data_format (self->priv->client_ctl, input, 5, NULL, (GAsyncReadyCallback)ctl_set_data_format_ready, task); qmi_message_ctl_set_data_format_input_unref (input); return; } ctx->step++; /* Fall through */ case DEVICE_OPEN_CONTEXT_STEP_FLAGS_EXPECT_INDICATIONS: qmi_endpoint_setup_indications (self->priv->endpoint, 10, g_task_get_cancellable (task), (GAsyncReadyCallback)setup_indications_ready, task); return; /* Fall through */ case DEVICE_OPEN_CONTEXT_STEP_LAST: /* Nothing else to process, done we are */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; default: break; } g_assert_not_reached (); } void qmi_device_open (QmiDevice *self, QmiDeviceOpenFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { DeviceOpenContext *ctx; gchar *flags_str; GTask *task; /* Raw IP and 802.3 are mutually exclusive */ g_return_if_fail (!((flags & QMI_DEVICE_OPEN_FLAGS_NET_802_3) && (flags & QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP))); /* QoS and no QoS are mutually exclusive */ g_return_if_fail (!((flags & QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER) && (flags & QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER))); /* At least one of both link protocol and QoS must be specified */ if (flags & (QMI_DEVICE_OPEN_FLAGS_NET_802_3 | QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP)) g_return_if_fail (flags & (QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER | QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER)); if (flags & (QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER | QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER)) g_return_if_fail (flags & (QMI_DEVICE_OPEN_FLAGS_NET_802_3 | QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP)); g_return_if_fail (QMI_IS_DEVICE (self)); flags_str = qmi_device_open_flags_build_string_from_mask (flags); g_debug ("[%s] opening device with flags '%s'...", qmi_file_get_path_display (self->priv->file), flags_str); g_free (flags_str); ctx = g_slice_new (DeviceOpenContext); ctx->step = DEVICE_OPEN_CONTEXT_STEP_FIRST; ctx->flags = flags; ctx->timeout = timeout; task = g_task_new (self, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)device_open_context_free); /* Start processing */ device_open_step (task); } /*****************************************************************************/ /* Close stream */ typedef struct { QmiEndpoint *endpoint; guint endpoint_new_data_id; guint endpoint_hangup_id; } CloseContext; static void close_context_free (CloseContext *ctx) { if (ctx->endpoint_hangup_id) g_signal_handler_disconnect (ctx->endpoint, ctx->endpoint_hangup_id); if (ctx->endpoint_new_data_id) g_signal_handler_disconnect (ctx->endpoint, ctx->endpoint_new_data_id); g_object_unref (ctx->endpoint); g_slice_free (CloseContext, ctx); } gboolean qmi_device_close_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void endpoint_close_ready (QmiEndpoint *endpoint, GAsyncResult *res, GTask *task) { GError *error = NULL; if (!qmi_endpoint_close_finish (endpoint, res, &error)) g_task_return_error (task, error); else g_task_return_boolean (task, TRUE); g_object_unref (task); } void qmi_device_close_async (QmiDevice *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; CloseContext *ctx; task = g_task_new (self, cancellable, callback, user_data); /* if already closed, we're done */ if (!self->priv->endpoint) { g_task_return_boolean (task, TRUE); g_object_unref (task); return; } /* Steal endpoint setup from private info, it will be freed once * the task is completed and disposed */ ctx = g_slice_new0 (CloseContext); ctx->endpoint = g_steal_pointer (&self->priv->endpoint); ctx->endpoint_new_data_id = self->priv->endpoint_new_data_id; self->priv->endpoint_new_data_id = 0; ctx->endpoint_hangup_id = self->priv->endpoint_hangup_id; self->priv->endpoint_hangup_id = 0; g_task_set_task_data (task, ctx, (GDestroyNotify) close_context_free); qmi_endpoint_close (ctx->endpoint, timeout, cancellable, (GAsyncReadyCallback)endpoint_close_ready, task); } /*****************************************************************************/ /* Command */ QmiMessage * qmi_device_command_abortable_finish (QmiDevice *self, GAsyncResult *res, GError **error) { if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error)) return NULL; return qmi_message_ref (g_simple_async_result_get_op_res_gpointer ( G_SIMPLE_ASYNC_RESULT (res))); } static void transaction_early_error (QmiDevice *self, Transaction *tr, gboolean stored, GError *error) { g_assert (error); if (stored) { /* Match transaction so that we remove it from our tracking table */ tr = device_match_transaction (self, tr->message); g_assert (tr); } transaction_complete_and_free (tr, NULL, error); g_error_free (error); } void qmi_device_command_abortable (QmiDevice *self, QmiMessage *message, QmiMessageContext *message_context, guint timeout, QmiDeviceCommandAbortableBuildRequestFn abort_build_request_fn, QmiDeviceCommandAbortableParseResponseFn abort_parse_response_fn, gpointer abort_user_data, GDestroyNotify abort_user_data_free, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GError *error = NULL; Transaction *tr; g_return_if_fail (QMI_IS_DEVICE (self)); g_return_if_fail (message != NULL); g_return_if_fail (timeout > 0); /* either none or both set */ g_return_if_fail ((!abort_build_request_fn && !abort_parse_response_fn) || (abort_build_request_fn && abort_parse_response_fn)); /* Use a proper transaction id for CTL messages if they don't have one */ if (qmi_message_get_service (message) == QMI_SERVICE_CTL && qmi_message_get_transaction_id (message) == 0) { qmi_message_set_transaction_id ( message, qmi_client_get_next_transaction_id ( QMI_CLIENT ( self->priv->client_ctl))); } tr = transaction_new (self, message, message_context, cancellable, callback, user_data); /* Device must be open */ if (!qmi_device_is_open (self)) { error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "Device must be open to send commands"); transaction_early_error (self, tr, FALSE, error); return; } /* Non-CTL services should use a proper CID */ if (qmi_message_get_service (message) != QMI_SERVICE_CTL && qmi_message_get_client_id (message) == 0) { error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Cannot send message in service '%s' without a CID", qmi_service_get_string (qmi_message_get_service (message))); transaction_early_error (self, tr, FALSE, error); return; } /* If message is not abortable, we should not allow using the abortable() interface */ if (!__qmi_message_is_abortable (message, message_context)) { if (abort_build_request_fn || abort_parse_response_fn) { error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Message is not abortable"); transaction_early_error (self, tr, FALSE, error); return; } } else { /* Store abortable info, if any */ tr->abort_build_request_fn = abort_build_request_fn; tr->abort_parse_response_fn = abort_parse_response_fn; tr->abort_user_data = abort_user_data; tr->abort_user_data_free = abort_user_data_free; } /* Setup context to match response */ if (!device_store_transaction (self, tr, timeout, &error)) { g_prefix_error (&error, "Cannot store transaction: "); transaction_early_error (self, tr, FALSE, error); return; } /* From now on, if we want to complete the transaction with an early error, * it needs to be removed from the tracking table as well. */ trace_message (self, message, TRUE, "request", message_context); if (!qmi_endpoint_send (self->priv->endpoint, message, timeout, cancellable, &error)) { transaction_early_error (self, tr, TRUE, error); return; } } /*****************************************************************************/ /* Non-abortable standard command */ QmiMessage * qmi_device_command_full_finish (QmiDevice *self, GAsyncResult *res, GError **error) { return qmi_device_command_abortable_finish (self, res, error); } void qmi_device_command_full (QmiDevice *self, QmiMessage *message, QmiMessageContext *message_context, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { qmi_device_command_abortable (self, message, message_context, timeout, NULL, /* abort_build_request_fn */ NULL, /* abort_parse_response_fn */ NULL, /* abort_user_data */ NULL, /* abort_user_data_free */ cancellable, callback, user_data); } /*****************************************************************************/ /* New QMI device */ static QmiDevice * common_device_new_finish (GAsyncResult *res, GError **error) { g_autoptr(GObject) source_object = NULL; source_object = g_async_result_get_source_object (res); return QMI_DEVICE (g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error)); } #if QMI_QRTR_SUPPORTED QmiDevice * qmi_device_new_from_node_finish (GAsyncResult *res, GError **error) { return common_device_new_finish (res, error); } void qmi_device_new_from_node (QrtrNode *node, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_return_if_fail (QRTR_IS_NODE (node)); g_async_initable_new_async (QMI_TYPE_DEVICE, G_PRIORITY_DEFAULT, cancellable, callback, user_data, QMI_DEVICE_NODE, node, NULL); } QrtrNode * qmi_device_get_node (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), NULL); return self->priv->node ? g_object_ref (self->priv->node) : NULL; } QrtrNode * qmi_device_peek_node (QmiDevice *self) { g_return_val_if_fail (QMI_IS_DEVICE (self), NULL); return self->priv->node; } #endif QmiDevice * qmi_device_new_finish (GAsyncResult *res, GError **error) { return common_device_new_finish (res, error); } void qmi_device_new (GFile *file, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_return_if_fail (G_IS_FILE (file)); g_async_initable_new_async (QMI_TYPE_DEVICE, G_PRIORITY_DEFAULT, cancellable, callback, user_data, QMI_DEVICE_FILE, file, NULL); } /*****************************************************************************/ /* Async init */ static gboolean initable_init_finish (GAsyncInitable *initable, GAsyncResult *result, GError **error) { return g_task_propagate_boolean (G_TASK (result), error); } static void sync_indication_cb (QmiClientCtl *client_ctl, QmiDevice *self) { /* Just log about it */ g_debug ("[%s] sync indication received", qmi_file_get_path_display (self->priv->file)); } static void client_ctl_setup (GTask *task) { QmiDevice *self; GError *error = NULL; self = g_task_get_source_object (task); /* Create the implicit CTL client */ self->priv->client_ctl = g_object_new (QMI_TYPE_CLIENT_CTL, QMI_CLIENT_DEVICE, self, QMI_CLIENT_SERVICE, QMI_SERVICE_CTL, QMI_CLIENT_CID, QMI_CID_NONE, NULL); /* Register the CTL client to get indications */ register_client (self, QMI_CLIENT (self->priv->client_ctl), &error); g_assert_no_error (error); /* Connect to 'Sync' indications */ self->priv->sync_indication_id = g_signal_connect (self->priv->client_ctl, "sync", G_CALLBACK (sync_indication_cb), self); /* Done we are */ g_task_return_boolean (task, TRUE); g_object_unref (task); } static void check_type_async_ready (QmiFile *file, GAsyncResult *res, GTask *task) { GError *error = NULL; if (!qmi_file_check_type_finish (file, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } /* Go on with client CTL setup */ client_ctl_setup (task); } static void initable_init_async (GAsyncInitable *initable, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiDevice *self; GTask *task; self = QMI_DEVICE (initable); task = g_task_new (self, cancellable, callback, user_data); /* We need a proper file to initialize */ g_assert (QMI_IS_FILE (self->priv->file)); #if QMI_QRTR_SUPPORTED /* If we have a node, just skip to setting up the control client */ if (self->priv->node) { client_ctl_setup (task); return; } #endif /* If no file check requested, don't do it */ if (self->priv->no_file_check) { client_ctl_setup (task); return; } /* Check the file type. Note that this is just a quick check to avoid * creating QmiDevices pointing to a location already known not to be a QMI * device. */ qmi_file_check_type_async (self->priv->file, cancellable, (GAsyncReadyCallback)check_type_async_ready, task); } /*****************************************************************************/ #if QMI_QRTR_SUPPORTED static QmiFile * get_file_for_node (QrtrNode *node) { g_autofree gchar *uri = NULL; uri = qrtr_get_uri_for_node (qrtr_node_get_id (node)); return qmi_file_new (g_file_new_for_uri (uri)); } #endif static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { QmiDevice *self = QMI_DEVICE (object); switch (prop_id) { case PROP_FILE: { GFile *file; file = g_value_get_object (value); g_assert (!self->priv->file); self->priv->file = file ? qmi_file_new (file) : NULL; break; } case PROP_NO_FILE_CHECK: self->priv->no_file_check = g_value_get_boolean (value); break; case PROP_PROXY_PATH: g_free (self->priv->proxy_path); self->priv->proxy_path = g_value_dup_string (value); break; case PROP_CONSECUTIVE_TIMEOUTS: g_assert_not_reached (); break; #if QMI_QRTR_SUPPORTED case PROP_NODE: g_assert (!self->priv->node); self->priv->node = g_value_dup_object (value); if (self->priv->node) { g_assert (!self->priv->file); self->priv->file = get_file_for_node (self->priv->node); } break; #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QmiDevice *self = QMI_DEVICE (object); switch (prop_id) { case PROP_FILE: g_assert (QMI_IS_FILE (self->priv->file)); g_value_set_object (value, qmi_file_get_file (self->priv->file)); break; case PROP_WWAN_IFACE: reload_wwan_iface_name (self); g_value_set_string (value, self->priv->wwan_iface); break; case PROP_CONSECUTIVE_TIMEOUTS: g_value_set_uint (value, self->priv->consecutive_timeouts); break; #if QMI_QRTR_SUPPORTED case PROP_NODE: g_value_set_object (value, self->priv->node); break; #endif default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void qmi_device_init (QmiDevice *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), QMI_TYPE_DEVICE, QmiDevicePrivate); self->priv->transactions = g_hash_table_new (g_direct_hash, g_direct_equal); self->priv->registered_clients = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_object_unref); self->priv->proxy_path = g_strdup (QMI_PROXY_SOCKET_PATH); } static gboolean foreach_warning (gpointer key, QmiClient *client, QmiDevice *self) { g_warning ("[%s] client for service '%s' with CID '%u' wasn't released", qmi_file_get_path_display (self->priv->file), qmi_service_get_string (qmi_client_get_service (client)), qmi_client_get_cid (client)); return TRUE; } static void dispose (GObject *object) { QmiDevice *self = QMI_DEVICE (object); /* unregister our CTL client */ if (self->priv->client_ctl) unregister_client (self, QMI_CLIENT (self->priv->client_ctl)); /* If clients were left unreleased, we'll just warn about it. * There is no point in trying to request CID releases, as the device * itself is being disposed. */ g_hash_table_foreach_remove (self->priv->registered_clients, (GHRFunc)foreach_warning, self); if (self->priv->sync_indication_id && self->priv->client_ctl) { g_signal_handler_disconnect (self->priv->client_ctl, self->priv->sync_indication_id); self->priv->sync_indication_id = 0; } g_clear_object (&self->priv->client_ctl); if (self->priv->endpoint) { if (self->priv->endpoint_hangup_id) { g_signal_handler_disconnect (self->priv->endpoint, self->priv->endpoint_hangup_id); self->priv->endpoint_hangup_id = 0; } if (self->priv->endpoint_new_data_id) { g_signal_handler_disconnect (self->priv->endpoint, self->priv->endpoint_new_data_id); self->priv->endpoint_new_data_id = 0; } g_clear_object (&self->priv->endpoint); } g_clear_object (&self->priv->net_port_manager); g_clear_object (&self->priv->file); #if QMI_QRTR_SUPPORTED g_clear_object (&self->priv->node); #endif G_OBJECT_CLASS (qmi_device_parent_class)->dispose (object); } static void finalize (GObject *object) { QmiDevice *self = QMI_DEVICE (object); /* Transactions keep refs to the device, so it's actually * impossible to have any content in the HT */ if (self->priv->transactions) { g_assert (g_hash_table_size (self->priv->transactions) == 0); g_hash_table_unref (self->priv->transactions); } g_hash_table_unref (self->priv->registered_clients); if (self->priv->supported_services) g_array_unref (self->priv->supported_services); g_free (self->priv->proxy_path); g_free (self->priv->wwan_iface); G_OBJECT_CLASS (qmi_device_parent_class)->finalize (object); } static void async_initable_iface_init (GAsyncInitableIface *iface) { iface->init_async = initable_init_async; iface->init_finish = initable_init_finish; } static void qmi_device_class_init (QmiDeviceClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiDevicePrivate)); object_class->get_property = get_property; object_class->set_property = set_property; object_class->finalize = finalize; object_class->dispose = dispose; /** * QmiDevice:device-file: * * Since: 1.0 */ properties[PROP_FILE] = g_param_spec_object (QMI_DEVICE_FILE, "Device file", "File to the underlying QMI device", G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_FILE, properties[PROP_FILE]); /** * QmiDevice:device-no-file-check: * * Since: 1.12 */ properties[PROP_NO_FILE_CHECK] = g_param_spec_boolean (QMI_DEVICE_NO_FILE_CHECK, "No file check", "Don't check for file existence when creating the Qmi device.", FALSE, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_NO_FILE_CHECK, properties[PROP_NO_FILE_CHECK]); /** * QmiDevice:device-proxy-path: * * Since: 1.12 */ properties[PROP_PROXY_PATH] = g_param_spec_string (QMI_DEVICE_PROXY_PATH, "Proxy path", "Path of the abstract socket where the proxy is available.", QMI_PROXY_SOCKET_PATH, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_PROXY_PATH, properties[PROP_PROXY_PATH]); /** * QmiDevice:device-wwan-iface: * * Since: 1.14 */ properties[PROP_WWAN_IFACE] = g_param_spec_string (QMI_DEVICE_WWAN_IFACE, "WWAN iface", "Name of the WWAN network interface associated with the control port.", NULL, G_PARAM_READABLE); g_object_class_install_property (object_class, PROP_WWAN_IFACE, properties[PROP_WWAN_IFACE]); /** * QmiDevice:device-consecutive-timeouts: * * Since: 1.32 */ properties[PROP_CONSECUTIVE_TIMEOUTS] = g_param_spec_uint (QMI_DEVICE_CONSECUTIVE_TIMEOUTS, "Consecutive timeouts", "Number of consecutive timeouts detected in requests sent to the device", 0, G_MAXUINT, 0, G_PARAM_READABLE); g_object_class_install_property (object_class, PROP_CONSECUTIVE_TIMEOUTS, properties[PROP_CONSECUTIVE_TIMEOUTS]); /** * QmiDevice:device-node: * * Since: 1.24 */ #if QMI_QRTR_SUPPORTED properties[PROP_NODE] = g_param_spec_object (QMI_DEVICE_NODE, "QRTR node", "Remote node on the QRTR bus", QRTR_TYPE_NODE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_NODE, properties[PROP_NODE]); #endif /** * QmiDevice::indication: * @object: A #QmiDevice. * @output: A #QmiMessage. * * The ::indication signal gets emitted when a QMI indication is received. * * Since: 1.8 */ signals[SIGNAL_INDICATION] = g_signal_new (QMI_DEVICE_SIGNAL_INDICATION, G_OBJECT_CLASS_TYPE (G_OBJECT_CLASS (klass)), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_BYTE_ARRAY); /** * QmiDevice::device-removed: * @object: A #QmiDevice. * @output: none * * The ::device-removed signal is emitted when an unexpected port hang-up is received. * * Since: 1.20 */ signals[SIGNAL_REMOVED] = g_signal_new (QMI_DEVICE_SIGNAL_REMOVED, G_OBJECT_CLASS_TYPE (G_OBJECT_CLASS (klass)), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0); } libqmi-1.35.2-dev/src/libqmi-glib/qmi-device.h000066400000000000000000001321201455567757300210350ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_DEVICE_H_ #define _LIBQMI_GLIB_QMI_DEVICE_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include #include #include "qmi-enums.h" #include "qmi-message.h" #include "qmi-message-context.h" #include "qmi-client.h" #include "qmi-version.h" #if QMI_QRTR_SUPPORTED # include #endif G_BEGIN_DECLS /** * SECTION:qmi-device * @title: QmiDevice * @short_description: Generic QMI device handling routines * * #QmiDevice is a generic type in charge of controlling the access of multiple * #QmiClient objects to the managed QMI port. * * A #QmiDevice can only handle one single QMI port. */ #define QMI_TYPE_DEVICE (qmi_device_get_type ()) #define QMI_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_DEVICE, QmiDevice)) #define QMI_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_DEVICE, QmiDeviceClass)) #define QMI_IS_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_DEVICE)) #define QMI_IS_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_DEVICE)) #define QMI_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_DEVICE, QmiDeviceClass)) typedef struct _QmiDevice QmiDevice; typedef struct _QmiDeviceClass QmiDeviceClass; typedef struct _QmiDevicePrivate QmiDevicePrivate; /** * QMI_DEVICE_FILE: * * Symbol defining the #QmiDevice:device-file property. * * Since: 1.0 */ #define QMI_DEVICE_FILE "device-file" /** * QMI_DEVICE_NO_FILE_CHECK: * * Symbol defining the #QmiDevice:device-no-file-check property. * * Since: 1.12 */ #define QMI_DEVICE_NO_FILE_CHECK "device-no-file-check" /** * QMI_DEVICE_PROXY_PATH: * * Symbol defining the #QmiDevice:device-proxy-path property. * * Since: 1.12 */ #define QMI_DEVICE_PROXY_PATH "device-proxy-path" /** * QMI_DEVICE_WWAN_IFACE: * * Symbol defining the #QmiDevice:device-wwan-iface property. * * Since: 1.14 */ #define QMI_DEVICE_WWAN_IFACE "device-wwan-iface" /** * QMI_DEVICE_CONSECUTIVE_TIMEOUTS: * * Symbol defining the #QmiDevice:device-consecutive-timeouts property. * * Since: 1.32 */ #define QMI_DEVICE_CONSECUTIVE_TIMEOUTS "device-consecutive-timeouts" /** * QMI_DEVICE_SIGNAL_INDICATION: * * Symbol defining the #QmiDevice::indication signal. * * Since: 1.8 */ #define QMI_DEVICE_SIGNAL_INDICATION "indication" /** * QMI_DEVICE_SIGNAL_REMOVED: * * Symbol defining the #QmiDevice::device-removed signal. * * Since: 1.20 */ #define QMI_DEVICE_SIGNAL_REMOVED "device-removed" /** * QmiDevice: * * The #QmiDevice structure contains private data and should only be accessed * using the provided API. * * Since: 1.0 */ struct _QmiDevice { /*< private >*/ GObject parent; QmiDevicePrivate *priv; }; struct _QmiDeviceClass { /*< private >*/ GObjectClass parent; }; GType qmi_device_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiDevice, g_object_unref) /** * qmi_device_new: * @file: a #GFile. * @cancellable: optional #GCancellable object, %NULL to ignore. * @callback: a #GAsyncReadyCallback to call when the initialization is finished. * @user_data: the data to pass to callback function. * * Asynchronously creates a #QmiDevice object to manage @file. * When the operation is finished, @callback will be invoked. You can then call * qmi_device_new_finish() to get the result of the operation. * * Since: 1.0 */ void qmi_device_new (GFile *file, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_new_finish: * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_new(). * * Returns: (transfer full): A newly created #QmiDevice, or %NULL if @error is set. * * Since: 1.0 */ QmiDevice *qmi_device_new_finish (GAsyncResult *res, GError **error); /** * qmi_device_get_file: * @self: a #QmiDevice. * * Get the #GFile associated with this #QmiDevice. * * Returns: (transfer full): a #GFile that must be freed with g_object_unref(). * * Since: 1.0 */ GFile *qmi_device_get_file (QmiDevice *self); /** * qmi_device_peek_file: * @self: a #QmiDevice. * * Get the #GFile associated with this #QmiDevice, without increasing the reference count * on the returned object. * * Returns: (transfer none): a #GFile. Do not free the returned object, it is owned by @self. * * Since: 1.0 */ GFile *qmi_device_peek_file (QmiDevice *self); /** * qmi_device_get_path: * @self: a #QmiDevice. * * Get the system path of the underlying QMI device. * * Returns: the system path of the device. * * Since: 1.0 */ const gchar *qmi_device_get_path (QmiDevice *self); /** * qmi_device_get_path_display: * @self: a #QmiDevice. * * Get the system path of the underlying QMI device in UTF-8. * * Returns: UTF-8 encoded system path of the device. * * Since: 1.0 */ const gchar *qmi_device_get_path_display (QmiDevice *self); /** * qmi_device_is_open: * @self: a #QmiDevice. * * Checks whether the #QmiDevice is open for I/O. * * Returns: %TRUE if @self is open, %FALSE otherwise. * * Since: 1.0 */ gboolean qmi_device_is_open (QmiDevice *self); /** * QmiDeviceOpenFlags: * @QMI_DEVICE_OPEN_FLAGS_NONE: No flags. * @QMI_DEVICE_OPEN_FLAGS_VERSION_INFO: Run version info check when opening. Since 1.24.4 this flag no longer prevents requests from being sent to the modem if they're assumed not supported based on the version info of each message. * @QMI_DEVICE_OPEN_FLAGS_SYNC: Synchronize with endpoint once the device is open. Will release any previously allocated client ID. * @QMI_DEVICE_OPEN_FLAGS_NET_802_3: Set network port to "802.3" mode; mutually exclusive with @QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP * @QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP: Set network port to "raw IP" mode; mutally exclusive with @QMI_DEVICE_OPEN_FLAGS_NET_802_3 * @QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER: Set network port to transmit/receive QoS headers; mutually exclusive with @QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER * @QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER: Set network port to not transmit/receive QoS headers; mutually exclusive with @QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER * @QMI_DEVICE_OPEN_FLAGS_PROXY: Try to open the port through the 'qmi-proxy'. Since 1.8. * @QMI_DEVICE_OPEN_FLAGS_MBIM: Open an MBIM port with QMUX tunneling service. Since 1.16. * @QMI_DEVICE_OPEN_FLAGS_AUTO: Open a port either in QMI or MBIM mode, depending on device driver. Since 1.18. * @QMI_DEVICE_OPEN_FLAGS_EXPECT_INDICATIONS: Explicitly state that indications are wanted (implicit in QMI mode, optional when in MBIM mode). * * Flags to specify which actions to be performed when the device is open. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DEVICE_OPEN_FLAGS_NONE = 0, QMI_DEVICE_OPEN_FLAGS_VERSION_INFO = 1 << 0, QMI_DEVICE_OPEN_FLAGS_SYNC = 1 << 1, QMI_DEVICE_OPEN_FLAGS_NET_802_3 = 1 << 2, QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP = 1 << 3, QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER = 1 << 4, QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER = 1 << 5, QMI_DEVICE_OPEN_FLAGS_PROXY = 1 << 6, QMI_DEVICE_OPEN_FLAGS_MBIM = 1 << 7, QMI_DEVICE_OPEN_FLAGS_AUTO = 1 << 8, QMI_DEVICE_OPEN_FLAGS_EXPECT_INDICATIONS = 1 << 9, } QmiDeviceOpenFlags; /** * qmi_device_open: * @self: a #QmiDevice. * @flags: mask of #QmiDeviceOpenFlags specifying how the device should be opened. * @timeout: maximum time, in seconds, to wait for the device to be opened. * @cancellable: optional #GCancellable object, %NULL to ignore. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously opens a #QmiDevice for I/O. * * When the operation is finished @callback will be called. You can then call * qmi_device_open_finish() to get the result of the operation. * * Since: 1.0 */ void qmi_device_open (QmiDevice *self, QmiDeviceOpenFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_open_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an asynchronous open operation started with qmi_device_open(). * * Returns: %TRUE if successful, %FALSE if @error is set. * * Since: 1.0 */ gboolean qmi_device_open_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * qmi_device_close_async: * @self: a #QmiDevice. * @timeout: maximum time, in seconds, to wait for the device to be closed. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously closes a #QmiDevice, preventing any further I/O. * * If this device was opened with @QMI_DEVICE_OPEN_FLAGS_MBIM, this * operation will wait for the response of the underlying MBIM close * sequence. * * Closing a #QmiDevice multiple times will not return an error. * * When the operation is finished @callback will be called. You can then call * qmi_device_close_finish() to get the result of the operation. * * Since: 1.18 */ void qmi_device_close_async (QmiDevice *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_close_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_close_async(). * * Returns: %TRUE if successful, %FALSE if @error is set. * * Since: 1.18 */ gboolean qmi_device_close_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * qmi_device_allocate_client: * @self: a #QmiDevice. * @service: a valid #QmiService. * @cid: a valid client ID, or %QMI_CID_NONE. * @timeout: maximum time to wait. * @cancellable: optional #GCancellable object, %NULL to ignore. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously allocates a new #QmiClient in @self. * * If %QMI_CID_NONE is given in @cid, a new client ID will be allocated; * otherwise a client with the given @cid will be generated. * * When the operation is finished @callback will be called. You can then call * qmi_device_allocate_client_finish() to get the result of the operation. * * Note: Clients for the %QMI_SERVICE_CTL cannot be created with this method; * instead get/peek the implicit one from @self. * * Since: 1.0 */ void qmi_device_allocate_client (QmiDevice *self, QmiService service, guint8 cid, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_allocate_client_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_allocate_client(). * * Returns: (transfer full): a newly allocated #QmiClient, or %NULL if @error is set. * * Since: 1.0 */ QmiClient *qmi_device_allocate_client_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * QmiDeviceReleaseClientFlags: * @QMI_DEVICE_RELEASE_CLIENT_FLAGS_NONE: No flags. * @QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID: Release the CID when releasing the client. * * Flags to specify which actions to be performed when releasing the client. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DEVICE_RELEASE_CLIENT_FLAGS_NONE = 0, QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID = 1 << 0 } QmiDeviceReleaseClientFlags; /** * qmi_device_release_client: * @self: a #QmiDevice. * @client: the #QmiClient to release. * @flags: mask of #QmiDeviceReleaseClientFlags specifying how the client should be released. * @timeout: maximum time to wait. * @cancellable: optional #GCancellable object, %NULL to ignore. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously releases the #QmiClient from the #QmiDevice. * * Once the #QmiClient has been released, it cannot be used any more to * perform operations. * * * When the operation is finished @callback will be called. You can then call * qmi_device_release_client_finish() to get the result of the operation. * * Since: 1.0 */ void qmi_device_release_client (QmiDevice *self, QmiClient *client, QmiDeviceReleaseClientFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_release_client_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_release_client(). * * Note that even if the release operation returns an error, the client should * anyway be considered released, and shouldn't be used afterwards. * * Returns: %TRUE if successful, or %NULL if @error is set. * * Since: 1.0 */ gboolean qmi_device_release_client_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * qmi_device_set_instance_id: * @self: a #QmiDevice. * @instance_id: the instance ID. * @timeout: maximum time to wait. * @cancellable: optional #GCancellable object, %NULL to ignore. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Sets the instance ID of the #QmiDevice. * * When the operation is finished @callback will be called. You can then call * qmi_device_set_instance_id_finish() to get the result of the operation. * * Since: 1.0 */ void qmi_device_set_instance_id (QmiDevice *self, guint8 instance_id, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_set_instance_id_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @link_id: a placeholder for the output #guint16, or %NULL if not required. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_set_instance_id(). * * Returns: %TRUE if successful, %FALSE if @error is set. * * Since: 1.0 */ gboolean qmi_device_set_instance_id_finish (QmiDevice *self, GAsyncResult *res, guint16 *link_id, GError **error); /** * qmi_device_command_full: * @self: a #QmiDevice. * @message: the message to send. * @message_context: the context of the message. * @timeout: maximum time, in seconds, to wait for the response. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously sends a #QmiMessage to the device. * * The message will be processed according to the specific @message_context * given. If no @context given, the behavior is the same as qmi_device_command(). * * If the operation is cancelled via @cancellable, a %QMI_PROTOCOL_ERROR_ABORTED * error will be returned always. If the QMI method may be aborted, there is * no guarantee that the operation is truly aborted before the error is returned * so it may really happen that the operation really succeeded and the method * would still return %QMI_PROTOCOL_ERROR_ABORTED. In order to use abortable * methods and make sure the response is the correct one, use * qmi_device_command_abortable(). * * When the operation is finished @callback will be called. You can then call * qmi_device_command_full_finish() to get the result of the operation. * * Since: 1.18 */ void qmi_device_command_full (QmiDevice *self, QmiMessage *message, QmiMessageContext *message_context, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_command_full_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_command_full(). * * Returns: (transfer full): a #QmiMessage response, or %NULL if @error is set. The returned value should be freed with qmi_message_unref(). * * Since: 1.18 */ QmiMessage *qmi_device_command_full_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * QmiDeviceCommandAbortableBuildRequestFn: * @self: a #QmiDevice. * @message: the #QmiMessage to abort. * @user_data: the data provided when calling qmi_device_command_abortable(). * @error: Return location for error or %NULL. * * Callback to run when processing the command abortion. This callback * should create a service-specific and client-specific abort request to * be passed to the device. * * Returns: the abort request as a #QmiMessage or %NULL if @error is set. * * Since: 1.24 */ typedef QmiMessage * (* QmiDeviceCommandAbortableBuildRequestFn) (QmiDevice *self, QmiMessage *message, gpointer user_data, GError **error); /** * QmiDeviceCommandAbortableParseResponseFn: * @self: a #QmiDevice. * @abort_response: the abort response #QmiMessage. * @user_data: the data provided when calling qmi_device_command_abortable(). * @error: Return location for error or %NULL. * * Callback to run when processing the command abortion. This callback * should parse the abort response provided by the device, and build an * appropriate output. * * Returns: %TRUE if the abort succeeded, %FALSE if error is set. * * Since: 1.24 */ typedef gboolean (* QmiDeviceCommandAbortableParseResponseFn) (QmiDevice *self, QmiMessage *abort_response, gpointer user_data, GError **error); /** * qmi_device_command_abortable: * @self: a #QmiDevice. * @message: the message to send. * @message_context: the context of the message. * @timeout: maximum time, in seconds, to wait for the response. * @abort_build_request_fn: (scope async): callback to build an abort request. * @abort_parse_response_fn: (scope async): callback to parse an abort response. * @abort_user_data: (closure): user data to pass to @build_request_fn and @parse_response_fn. * @abort_user_data_free: (destroy abort_user_data): a #GDestroyNotify to free @abort_user_data. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously sends a #QmiMessage to the device. * * The message will be processed according to the specific @message_context * given. * * If the operation is cancelled via @cancellable, an abort message will * be sent to the device in order to really abort the ongoing operation. The * qmi_device_command_abortable() method will not finish until either a * successful reply is received from the device or otherwise the command * abortion is confirmed. * * If a successful command response arrives before the abort is processed by * the device, the operation will succeed even if @cancellable has been set, so * that upper layers can do whatever they need to do to properly tear down the * operation. * * If an error command reponse arrives before the abort is processed by the * device, the operation will fail with the error returned by the device. * * The %QMI_PROTOCOL_ERROR_ABORTED error will only be returned as a result * of this operation if the command request was truly aborted by the device, * and so, the user of the method should not assume that cancelling the * @cancellable will always make the method return a %QMI_PROTOCOL_ERROR_ABORTED * error. * * The @build_request_fn and @parse_response_fn callbacks are required in order * to build the abort requests and parse the abort responses, because these * are both service and client specific. * * When the operation is finished @callback will be called. You can then call * qmi_device_command_abortable_finish() to get the result of the operation. * * Since: 1.24 */ void qmi_device_command_abortable (QmiDevice *self, QmiMessage *message, QmiMessageContext *message_context, guint timeout, QmiDeviceCommandAbortableBuildRequestFn abort_build_request_fn, QmiDeviceCommandAbortableParseResponseFn abort_parse_response_fn, gpointer abort_user_data, GDestroyNotify abort_user_data_free, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_command_abortable_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_command_abortable(). * * Returns: (transfer full): a #QmiMessage response, or %NULL if @error is set. The returned value should be freed with qmi_message_unref(). * * Since: 1.24 */ QmiMessage *qmi_device_command_abortable_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * QmiDeviceServiceVersionInfo: * @service: a #QmiService. * @major_version: major version of the service. * @minor_version: minor version of the service. * * Version information for a service. * * Since: 1.6 */ typedef struct { QmiService service; guint16 major_version; guint16 minor_version; } QmiDeviceServiceVersionInfo; /** * qmi_device_get_service_version_info: * @self: a #QmiDevice. * @timeout: maximum time to wait for the method to complete, in seconds. * @cancellable: a #GCancellable or %NULL. * @callback: a #GAsyncReadyCallback to call when the request is satisfied. * @user_data: user data to pass to @callback. * * Asynchronously requests the service version information of the device. * * When the operation is finished, @callback will be invoked in the thread-default main loop of the thread you are calling this method from. * * You can then call qmi_device_get_service_version_info_finish() to get the result of the operation. * * Since: 1.6 */ void qmi_device_get_service_version_info (QmiDevice *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_get_service_version_info_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_get_service_version_info(). * * Returns: (transfer full)(element-type QmiDeviceServiceVersionInfo): * a #GArray of #QmiDeviceServiceVersionInfo elements, or %NULL if @error * is set. The returned value should be freed with g_array_unref(). * * Since: 1.6 */ GArray *qmi_device_get_service_version_info_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * qmi_device_get_consecutive_timeouts: * @self: a #QmiDevice. * * Gets the number of consecutive transaction timeouts in the device. * * Returns: a #guint. * * Since: 1.32 */ guint qmi_device_get_consecutive_timeouts (QmiDevice *self); /******************************************************************************/ /* qmi_wwan specific APIs */ /** * qmi_device_get_wwan_iface: * @self: a #QmiDevice. * * Get the WWAN interface name associated with the QMI control port. * This value will be loaded every time it's asked for it. * * * This method is only applicable when using the qmi_wwan kernel driver. * * * Returns: UTF-8 encoded network interface name, or %NULL if not available. * * Since: 1.14 */ const gchar *qmi_device_get_wwan_iface (QmiDevice *self); /** * QmiDeviceExpectedDataFormat: * @QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN: Unknown. * @QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3: 802.3. * @QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP: Raw IP. * @QMI_DEVICE_EXPECTED_DATA_FORMAT_QMAP_PASS_THROUGH: QMAP pass-through. Since 1.28. * * Data format expected by the kernel. * * * This type is only applicable when using the qmi_wwan kernel driver. * * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN, QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3, QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP, QMI_DEVICE_EXPECTED_DATA_FORMAT_QMAP_PASS_THROUGH, } QmiDeviceExpectedDataFormat; /** * qmi_device_get_expected_data_format: * @self: a #QmiDevice. * @error: Return location for error or %NULL. * * Retrieves the data format currently expected by the kernel in the network * interface. * * If @QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN is returned, the user should * assume that 802.3 is the expected format, as that is what the qmi_wwan * driver expected by default before kernel 4.5. * * * This method is only applicable when using the qmi_wwan kernel driver. * * * Returns: a valid #QmiDeviceExpectedDataFormat, or @QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN if @error is set. * * Since: 1.14 */ QmiDeviceExpectedDataFormat qmi_device_get_expected_data_format (QmiDevice *self, GError **error); /** * qmi_device_set_expected_data_format: * @self: a #QmiDevice. * @format: a known #QmiDeviceExpectedDataFormat. * @error: Return location for error or %NULL. * * Configures the data format currently expected by the kernel in the network * interface. * * * This method is only applicable when using the qmi_wwan kernel driver. * * * Returns: %TRUE if successful, or %FALSE if @error is set. * * Since: 1.14 */ gboolean qmi_device_set_expected_data_format (QmiDevice *self, QmiDeviceExpectedDataFormat format, GError **error); /** * qmi_device_check_expected_data_format_supported: * @self: a #QmiDevice. * @format: a known #QmiDeviceExpectedDataFormat. * @error: Return location for error or %NULL. * * Checks whether the given data format is supported by the kernel. * interface. * * * This method is only applicable when using the qmi_wwan kernel driver. * * * Returns: %TRUE if the data format is supported, or %FALSE if @error is set. * * Since: 1.28 */ gboolean qmi_device_check_expected_data_format_supported (QmiDevice *self, QmiDeviceExpectedDataFormat format, GError **error); /******************************************************************************/ /* Link management APIs */ /** * QMI_DEVICE_MUX_ID_AUTOMATIC: * * Symbol defining a mux id that will be automatically allocated during runtime * when creating net links. * * Since: 1.28 */ #define QMI_DEVICE_MUX_ID_AUTOMATIC G_MAXUINT /** * QMI_DEVICE_MUX_ID_UNBOUND: * * Symbol defining the mux id for an unbound interface. This value is also used * to indicate an invalid mux id. * * Since: 1.28 */ #define QMI_DEVICE_MUX_ID_UNBOUND 0 /** * QMI_DEVICE_MUX_ID_MIN: * * Symbol defining the minimum supported mux id. * * Since: 1.28 */ #define QMI_DEVICE_MUX_ID_MIN 1 /** * QMI_DEVICE_MUX_ID_MAX: * * Symbol defining the maximum supported mux id. * * Since: 1.28 */ #define QMI_DEVICE_MUX_ID_MAX 0xFE /** * qmi_device_add_link: * @self: a #QmiDevice. * @mux_id: the mux id for the link, in the * [%QMI_DEVICE_MUX_ID_MIN,%QMI_DEVICE_MUX_ID_MAX] range, or * %QMI_DEVICE_MUX_ID_AUTOMATIC to find the first available mux id. * @base_ifname: the interface which the new link will be created on. * @ifname_prefix: the prefix suggested to be used for the name of the new link * created. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously creates a new virtual network device node with a custom prefix * on top of @base_ifname. This allows having multiple net interfaces running on * top of another using multiplexing. * * If the kernel driver doesn't allow this functionality, a * %QMI_CORE_ERROR_UNSUPPORTED error will be returned. * * The operation may fail if the given interface name is not associated to the * QMI control port managed by the #QmiDevice. * * Depending on the kernel driver in use and the multiplexing method, the given * @ifname_prefix may be ignored. The user should not assume that the returned * link interface name is prefixed with @ifname_prefix as it may not be the * case. * * When the operation is finished @callback will be called. You can then call * qmi_device_add_link_finish() to get the result of the operation. * * * When using the qmi_wwan kernel driver, the configured expected kernel data * format will be used to select the type of multiplexing method. If the * format is %QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP the qmi_wwan specific * add_mux/del_mux operations will be used. If the format is * %QMI_DEVICE_EXPECTED_DATA_FORMAT_QMAP_PASS_THROUGH, the generic rmnet netlink * operations will be used. No multiplexing support exists when the format is * %QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3. * * For every other kernel driver (e.g. ipa), rmnet netlink operations are * assumed to be supported. * * * * When using the qmi_wwan driver from a kernel older than v5.12, some of the * multiplexing features like using %QMI_DEVICE_MUX_ID_AUTOMATIC may not be fully * available for programs that use ephimeral #QmiDevice objects for single * operations. * * * Since: 1.28 */ void qmi_device_add_link (QmiDevice *self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_add_link_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @mux_id: the mux ID for the link created. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_add_link(). * * Returns: The name of the net interface created, %NULL if @error is set. * * Since: 1.28 */ gchar *qmi_device_add_link_finish (QmiDevice *self, GAsyncResult *res, guint *mux_id, GError **error); /** * QmiDeviceAddLinkFlags: * @QMI_DEVICE_ADD_LINK_FLAGS_NONE: none. * @QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV4: checksum offload (v4) is enabled in ingress path. * @QMI_DEVICE_ADD_LINK_FLAGS_EGRESS_MAP_CKSUMV4: checksum offload (v4) is enabled in egress path. * @QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV5: checksum offload (v5) is enabled in ingress path. Since 1.32. * @QMI_DEVICE_ADD_LINK_FLAGS_EGRESS_MAP_CKSUMV5: checksum offload (v5) is enabled in egress path. Since 1.32. * * Flags specifying the behavior of the new link. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_DEVICE_ADD_LINK_FLAGS_NONE = 0, QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV4 = 1 << 1, QMI_DEVICE_ADD_LINK_FLAGS_EGRESS_MAP_CKSUMV4 = 1 << 2, QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV5 = 1 << 3, QMI_DEVICE_ADD_LINK_FLAGS_EGRESS_MAP_CKSUMV5 = 1 << 4, } QmiDeviceAddLinkFlags; /** * qmi_device_add_link_with_flags: * @self: a #QmiDevice. * @mux_id: the mux id for the link, in the * [%QMI_DEVICE_MUX_ID_MIN,%QMI_DEVICE_MUX_ID_MAX] range, or * %QMI_DEVICE_MUX_ID_AUTOMATIC to find the first available mux id. * @base_ifname: the interface which the new link will be created on. * @ifname_prefix: the prefix suggested to be used for the name of the new link * created. * @flags: bitmask of %QmiDeviceAddLinkFlags values to pass to the kernel when * creating the new link. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously creates a new virtual network device in the same way as * qmi_device_add_link() does, but passing the additional @flags to the kernel * during the operation. * * Using %QMI_DEVICE_ADD_LINK_FLAGS_NONE as @flags is equivalent to calling * qmi_device_add_link() directly. * * If the link creation with the given set of @flags is unsupported by the * backend, the operation may fail. * * * None of the @flags supported are applicable when using the multiplexing * support provided by the qmi_wwan kernel driver, they are only used if using * the rmnet backend for link management support. * * * Since: 1.30 */ void qmi_device_add_link_with_flags (QmiDevice *self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, QmiDeviceAddLinkFlags flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_add_link_with_flags_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @mux_id: the mux ID for the link created. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_add_link_finish(). * * Returns: The name of the net interface created, %NULL if @error is set. * * Since: 1.30 */ gchar *qmi_device_add_link_with_flags_finish (QmiDevice *self, GAsyncResult *res, guint *mux_id, GError **error); /** * qmi_device_delete_link: * @self: a #QmiDevice. * @ifname: the name of the link to remove. * @mux_id: the mux ID of the link to remove. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously deletes a virtual network interface that has been previously * created with qmi_device_add_link(). * * If the kernel driver doesn't allow this functionality, a * %QMI_CORE_ERROR_UNSUPPORTED error will be returned. * * When the operation is finished @callback will be called. You can then call * qmi_device_delete_link_finish() to get the result of the operation. * * * The %QMI_DEVICE_MUX_ID_UNBOUND value may be given as @mux_id if the user * can guarantee that the underlying kernel support doesn't require the * mux id info to delete the link. When using the qmi_wwan driver from a kernel * older than v5.12, a valid @mux_id is required. * * * Since: 1.28 */ void qmi_device_delete_link (QmiDevice *self, const gchar *ifname, guint mux_id, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_delete_link_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_delete_link(). * * Returns: %TRUE if successful, %FALSE if @error is set. * * Since: 1.28 */ gboolean qmi_device_delete_link_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * qmi_device_delete_all_links: * @self: a #QmiDevice. * @base_ifname: the interface where all links are available. * @cancellable: a #GCancellable, or %NULL. * @callback: a #GAsyncReadyCallback to call when the operation is finished. * @user_data: the data to pass to callback function. * * Asynchronously deletes all virtual network interfaces that have been previously * created with qmi_device_add_link() in @base_ifname. * * When the operation is finished @callback will be called. You can then call * qmi_device_delete_link_finish() to get the result of the operation. * * * There is no guarantee that other processes haven't created new links by the * time this method returns. This method should be used with caution, or in setups * where only one single process is expected to do QMI network interface link * management. * * * Since: 1.28 */ void qmi_device_delete_all_links (QmiDevice *self, const gchar *base_ifname, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_delete_all_links_finish: * @self: a #QmiDevice. * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_delete_all_links(). * * Returns: %TRUE if successful, %FALSE if @error is set. * * Since: 1.28 */ gboolean qmi_device_delete_all_links_finish (QmiDevice *self, GAsyncResult *res, GError **error); /** * qmi_device_list_links: * @self: a #QmiDevice. * @base_ifname: the base interface. * @out_links: (out)(transfer full)(element-type utf8): a placeholder for the * output #GPtrArray of link names. * @error: Return location for error or %NULL. * * Synchronously lists all virtual network interfaces that have been previously * created with qmi_device_add_link() in @base_ifname. * * Returns: %TRUE if successful, %FALSE if @error is set. * * Since: 1.28 */ gboolean qmi_device_list_links (QmiDevice *self, const gchar *base_ifname, GPtrArray **out_links, GError **error); /** * qmi_device_check_link_supported: * @self: a #QmiDevice. * @error: Return location for error or %NULL. * * Checks whether link management is supported by the kernel. * * Returns: %TRUE if link management is supported, or %FALSE if @error is set. * * Since: 1.28 */ gboolean qmi_device_check_link_supported (QmiDevice *self, GError **error); /******************************************************************************/ /* New QRTR based APIs */ #if QMI_QRTR_SUPPORTED /** * QMI_DEVICE_NODE: * * Symbol defining the #QmiDevice:device-node property. * * * This property is only available when the library is built with QRTR support. * * * Since: 1.28 */ #define QMI_DEVICE_NODE "device-node" /** * qmi_device_new_from_node: * @node: a #QrtrNode. * @cancellable: optional #GCancellable object, #NULL to ignore. * @callback: a #GAsyncReadyCallback to call when the initialization is finished. * @user_data: the data to pass to callback function. * * Asynchronously creates a #QmiDevice object to manage @node. * When the operation is finished, @callback will be invoked. You can then call * qmi_device_new_finish() to get the result of the operation. * * * This method is only available when the library is built with QRTR support. * * * Since: 1.28 */ void qmi_device_new_from_node (QrtrNode *node, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); /** * qmi_device_new_from_node_finish: * @res: a #GAsyncResult. * @error: Return location for error or %NULL. * * Finishes an operation started with qmi_device_new_from_node(). * * * This method is only available when the library is built with QRTR support. * * * Returns: (transfer full): A newly created #QmiDevice, or %NULL if @error is set. * * Since: 1.28 */ QmiDevice *qmi_device_new_from_node_finish (GAsyncResult *res, GError **error); /** * qmi_device_get_node: * @self: a #QmiDevice. * * Get the #QrtrNode associated with this #QmiDevice. * * * This method is only available when the library is built with QRTR support. * * * Returns: (transfer full): a #QrtrNode that must be freed with g_object_unref() or %NULL if none available. * * Since: 1.28 */ QrtrNode *qmi_device_get_node (QmiDevice *self); /** * qmi_device_peek_node: * @self: a #QmiDevice. * * Get the #QrtrNode associated with this #QmiDevice, without increasing the * reference count on the returned object. * * * This method is only available when the library is built with QRTR support. * * * Returns: (transfer none): a #QrtrNode or %NULL if none available. Do not free the returned object, it is owned by @self. * * Since: 1.28 */ QrtrNode *qmi_device_peek_node (QmiDevice *self); #endif /* QMI_QRTR_SUPPORTED */ G_END_DECLS #endif /* _LIBQMI_GLIB_QMI_DEVICE_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint-mbim.c000066400000000000000000000410211455567757300223320ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (C) 2019 Eric Caruso */ #include #include #include "qmi-endpoint-mbim.h" #include "qmi-errors.h" #include "qmi-error-types.h" #include "qmi-file.h" G_DEFINE_TYPE (QmiEndpointMbim, qmi_endpoint_mbim, QMI_TYPE_ENDPOINT) struct _QmiEndpointMbimPrivate { MbimDevice *mbimdev; guint mbim_notification_id; guint mbim_removed_id; }; /* * Number of extra seconds to give the MBIM timeout delay. * Needed so the QMI timeout triggers first and we can be sure * that timeouts on the QMI side are not because of libmbim timeouts. */ #define MBIM_TIMEOUT_DELAY_SECS 1 /*****************************************************************************/ static void mbim_device_removed_cb (MbimDevice *device, QmiEndpointMbim *self) { g_signal_emit_by_name (QMI_ENDPOINT (self), QMI_ENDPOINT_SIGNAL_HANGUP); } /*****************************************************************************/ static void mbim_device_command_ready (MbimDevice *dev, GAsyncResult *res, QmiEndpointMbim *self) { MbimMessage *response; const guint8 *buf; guint32 len; GError *error = NULL; response = mbim_device_command_finish (dev, res, &error); if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) { g_warning ("[%s] MBIM error: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); if (response) mbim_message_unref (response); g_object_unref (self); g_error_free (error); return; } /* Store the raw information buffer in the internal reception buffer, * as if we had read from a iochannel. */ buf = mbim_message_command_done_get_raw_information_buffer (response, &len); qmi_endpoint_add_message (QMI_ENDPOINT (self), buf, len); mbim_message_unref (response); g_object_unref (self); } static void mbim_qmi_notification_cb (MbimDevice *device, MbimMessage *notification, QmiEndpointMbim *self) { MbimService service; const guint8 *buf; guint32 len; service = mbim_message_indicate_status_get_service (notification); if (service != MBIM_SERVICE_QMI) return; buf = mbim_message_indicate_status_get_raw_information_buffer (notification, &len); qmi_endpoint_add_message (QMI_ENDPOINT (self), buf, len); } static void mbim_subscribe_list_set_ready_cb (MbimDevice *device, GAsyncResult *res, GTask *task) { QmiEndpointMbim *self; MbimMessage *response; GError *error = NULL; self = g_task_get_source_object (task); response = mbim_device_command_finish (device, res, &error); if (response) { mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error); mbim_message_unref (response); } if (error) { g_warning ("[%s] couldn't enable QMI indications via MBIM: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); g_task_return_error (task, error); g_object_unref (task); return; } g_debug ("[%s] enabled QMI indications via MBIM", qmi_endpoint_get_name (QMI_ENDPOINT (self))); self->priv->mbim_notification_id = g_signal_connect (device, MBIM_DEVICE_SIGNAL_INDICATE_STATUS, G_CALLBACK (mbim_qmi_notification_cb), self); g_task_return_boolean (task, TRUE); g_object_unref (task); } /*****************************************************************************/ typedef struct { gboolean use_proxy; guint timeout; } MbimDeviceOpenContext; static void mbim_device_open_context_free (MbimDeviceOpenContext *ctx) { g_slice_free (MbimDeviceOpenContext, ctx); } static gboolean endpoint_open_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void mbim_device_open_ready (MbimDevice *dev, GAsyncResult *res, GTask *task) { QmiEndpointMbim *self; GError *error = NULL; if (!mbim_device_open_finish (dev, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } self = g_task_get_source_object (task); g_debug ("[%s] MBIM device open", qmi_endpoint_get_name (QMI_ENDPOINT (self))); g_task_return_boolean (task, TRUE); g_object_unref (task); } static void mbim_device_new_ready (GObject *source, GAsyncResult *res, GTask *task) { QmiEndpointMbim *self; MbimDeviceOpenContext *ctx; MbimDeviceOpenFlags open_flags = MBIM_DEVICE_OPEN_FLAGS_NONE; GError *error = NULL; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); self->priv->mbimdev = mbim_device_new_finish (res, &error); if (!self->priv->mbimdev) { g_task_return_error (task, error); g_object_unref (task); return; } g_debug ("[%s] MBIM device created", qmi_endpoint_get_name (QMI_ENDPOINT (self))); self->priv->mbim_removed_id = g_signal_connect (self->priv->mbimdev, MBIM_DEVICE_SIGNAL_REMOVED, G_CALLBACK (mbim_device_removed_cb), self); /* If QMI proxy was requested, use MBIM proxy instead */ if (ctx->use_proxy) open_flags |= MBIM_DEVICE_OPEN_FLAGS_PROXY; /* We pass the original timeout of the request to the open operation */ g_debug ("[%s] opening MBIM device...", qmi_endpoint_get_name (QMI_ENDPOINT (self))); mbim_device_open_full (self->priv->mbimdev, open_flags, ctx->timeout, g_task_get_cancellable (task), (GAsyncReadyCallback) mbim_device_open_ready, task); } static void endpoint_open (QmiEndpoint *endpoint, gboolean use_proxy, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiEndpointMbim *self; MbimDeviceOpenContext *ctx; QmiFile *qfile; GFile *file; GTask *task; self = QMI_ENDPOINT_MBIM (endpoint); task = g_task_new (self, cancellable, callback, user_data); ctx = g_slice_new0 (MbimDeviceOpenContext); ctx->use_proxy = use_proxy; ctx->timeout = timeout; g_task_set_task_data (task, ctx, (GDestroyNotify)mbim_device_open_context_free); if (self->priv->mbimdev) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "Already open"); g_object_unref (task); return; } g_object_get (self, QMI_ENDPOINT_FILE, &qfile, NULL); g_debug ("[%s] creating MBIM device...", qmi_endpoint_get_name (QMI_ENDPOINT (self))); file = g_file_new_for_path (qmi_file_get_path (qfile)); g_object_unref (qfile); mbim_device_new (file, g_task_get_cancellable (task), (GAsyncReadyCallback) mbim_device_new_ready, task); g_object_unref (file); } static gboolean endpoint_is_open (QmiEndpoint *self) { return !!(QMI_ENDPOINT_MBIM (self)->priv->mbimdev); } static gboolean endpoint_setup_indications_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void endpoint_setup_indications (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; MbimEventEntry **entries; guint n_entries = 0; MbimMessage *request; task = g_task_new (self, cancellable, callback, user_data); g_debug ("[%s] Enabling QMI indications via MBIM...", qmi_endpoint_get_name (QMI_ENDPOINT (self))); entries = g_new0 (MbimEventEntry *, 2); entries[n_entries] = g_new (MbimEventEntry, 1); memcpy (&(entries[n_entries]->device_service_id), MBIM_UUID_QMI, sizeof (MbimUuid)); entries[n_entries]->cids_count = 1; entries[n_entries]->cids = g_new0 (guint32, 1); entries[n_entries]->cids[0] = MBIM_CID_QMI_MSG; n_entries++; request = mbim_message_device_service_subscribe_list_set_new ( n_entries, (const MbimEventEntry *const *)entries, NULL); mbim_device_command (QMI_ENDPOINT_MBIM (self)->priv->mbimdev, request, 10, NULL, (GAsyncReadyCallback)mbim_subscribe_list_set_ready_cb, task); mbim_message_unref (request); mbim_event_entry_array_free (entries); } static gboolean endpoint_send (QmiEndpoint *self, QmiMessage *message, guint timeout, GCancellable *cancellable, GError **error) { g_autoptr(MbimMessage) mbim_message = NULL; gconstpointer raw_message; gsize raw_message_len; GError *inner_error = NULL; /* MBIM endpoint allows only QMUX messages */ if (qmi_message_get_marker (message) != QMI_MESSAGE_QMUX_MARKER) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "MBIM endpoint expects only QMUX messages"); return FALSE; } /* Disallow private CTL operations */ if ((qmi_message_get_service (message) == QMI_SERVICE_CTL) && (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR || qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "MBIM endpoint expects only 8bit QMI services"); return FALSE; } /* Get raw message */ raw_message = qmi_message_get_raw (message, &raw_message_len, &inner_error); if (!raw_message) { g_propagate_prefixed_error (error, inner_error, "Cannot get raw message: "); return FALSE; } mbim_message = mbim_message_qmi_msg_set_new (raw_message_len, raw_message, &inner_error); if (!mbim_message) { g_propagate_error (error, inner_error); return FALSE; } /* Note: * * Pass a full reference to the QMI endpoint to the MBIM command * operation, so that we make sure the parent object is valid regardless * of when the underlying device is fully disposed. This is required * because device close is async(). */ mbim_device_command (QMI_ENDPOINT_MBIM (self)->priv->mbimdev, mbim_message, timeout + MBIM_TIMEOUT_DELAY_SECS, cancellable, (GAsyncReadyCallback) mbim_device_command_ready, g_object_ref (self)); return TRUE; } /*****************************************************************************/ static gboolean endpoint_close_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void mbim_device_close_ready (MbimDevice *dev, GAsyncResult *res, GTask *task) { GError *error = NULL; if (!mbim_device_close_finish (dev, res, &error)) g_task_return_error (task, error); else g_task_return_boolean (task, TRUE); g_object_unref (task); } static void endpoint_close (QmiEndpoint *endpoint, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; QmiEndpointMbim *self; self = QMI_ENDPOINT_MBIM (endpoint); task = g_task_new (self, cancellable, callback, user_data); if (!self->priv->mbimdev) { g_task_return_boolean (task, TRUE); g_object_unref (task); } /* Schedule in new main context */ mbim_device_close (self->priv->mbimdev, timeout, NULL, (GAsyncReadyCallback) mbim_device_close_ready, task); /* Cleanup right away, we don't want multiple close attempts on the * device */ if (self->priv->mbim_notification_id) { g_signal_handler_disconnect (self->priv->mbimdev, self->priv->mbim_notification_id); self->priv->mbim_notification_id = 0; } if (self->priv->mbim_removed_id) { g_signal_handler_disconnect (self->priv->mbimdev, self->priv->mbim_removed_id); self->priv->mbim_removed_id = 0; } g_clear_object (&self->priv->mbimdev); } /*****************************************************************************/ QmiEndpointMbim * qmi_endpoint_mbim_new (QmiFile *file) { if (!file) return NULL; return g_object_new (QMI_TYPE_ENDPOINT_MBIM, QMI_ENDPOINT_FILE, file, NULL); } /*****************************************************************************/ static void qmi_endpoint_mbim_init (QmiEndpointMbim *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), QMI_TYPE_ENDPOINT_MBIM, QmiEndpointMbimPrivate); } static void dispose (GObject *object) { QmiEndpointMbim *self = QMI_ENDPOINT_MBIM (object); if (self->priv->mbimdev) { g_warning ("[%s] MBIM device wasn't explicitly closed", qmi_endpoint_get_name (QMI_ENDPOINT (self))); if (self->priv->mbim_notification_id) { g_signal_handler_disconnect (self->priv->mbimdev, self->priv->mbim_notification_id); self->priv->mbim_notification_id = 0; } if (self->priv->mbim_removed_id) { g_signal_handler_disconnect (self->priv->mbimdev, self->priv->mbim_removed_id); self->priv->mbim_removed_id = 0; } g_clear_object (&self->priv->mbimdev); } G_OBJECT_CLASS (qmi_endpoint_mbim_parent_class)->dispose (object); } static void qmi_endpoint_mbim_class_init (QmiEndpointMbimClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); QmiEndpointClass *endpoint_class = QMI_ENDPOINT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiEndpointMbimPrivate)); object_class->dispose = dispose; endpoint_class->open = endpoint_open; endpoint_class->open_finish = endpoint_open_finish; endpoint_class->is_open = endpoint_is_open; endpoint_class->setup_indications = endpoint_setup_indications; endpoint_class->setup_indications_finish = endpoint_setup_indications_finish; endpoint_class->send = endpoint_send; endpoint_class->close = endpoint_close; endpoint_class->close_finish = endpoint_close_finish; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint-mbim.h000066400000000000000000000044121455567757300223420ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019 Eric Caruso */ #ifndef _LIBQMI_GLIB_QMI_ENDPOINT_MBIM_H_ #define _LIBQMI_GLIB_QMI_ENDPOINT_MBIM_H_ #include "qmi-endpoint.h" #include "qmi-file.h" #define QMI_TYPE_ENDPOINT_MBIM (qmi_endpoint_mbim_get_type ()) #define QMI_ENDPOINT_MBIM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_ENDPOINT_MBIM, QmiEndpointMbim)) #define QMI_ENDPOINT_MBIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_ENDPOINT_MBIM, QmiEndpointMbimClass)) #define QMI_IS_ENDPOINT_MBIM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_ENDPOINT_MBIM)) #define QMI_IS_ENDPOINT_MBIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_ENDPOINT_MBIM)) #define QMI_ENDPOINT_MBIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_ENDPOINT_MBIM, QmiEndpointMbimClass)) typedef struct _QmiEndpointMbim QmiEndpointMbim; typedef struct _QmiEndpointMbimClass QmiEndpointMbimClass; typedef struct _QmiEndpointMbimPrivate QmiEndpointMbimPrivate; struct _QmiEndpointMbim { /*< private >*/ QmiEndpoint parent; QmiEndpointMbimPrivate *priv; }; struct _QmiEndpointMbimClass { /*< private >*/ QmiEndpointClass parent; }; GType qmi_endpoint_mbim_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiEndpointMbim, g_object_unref) QmiEndpointMbim *qmi_endpoint_mbim_new (QmiFile *file); #endif /* _LIBQMI_GLIB_QMI_ENDPOINT_MBIM_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint-qmux.c000066400000000000000000000474061455567757300224150ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (C) 2019 Eric Caruso */ #include #include #include #include #include #include #include #include #include #include "qmi-endpoint-qmux.h" #include "qmi-ctl.h" #include "qmi-errors.h" #include "qmi-error-types.h" #include "qmi-helpers.h" G_DEFINE_TYPE (QmiEndpointQmux, qmi_endpoint_qmux, QMI_TYPE_ENDPOINT) struct _QmiEndpointQmuxPrivate { /* I/O streams */ gint fd; GInputStream *istream; GOutputStream *ostream; GSource *input_source; /* Proxy socket */ gchar *proxy_path; GSocketClient *socket_client; GSocketConnection *socket_connection; /* Control client */ QmiClientCtl *client_ctl; }; #define BUFFER_SIZE 2048 #define MAX_SPAWN_RETRIES 10 static void destroy_iostream (QmiEndpointQmux *self); /*****************************************************************************/ static gboolean input_ready_cb (GInputStream *istream, QmiEndpointQmux *self) { guint8 buffer[BUFFER_SIZE]; GError *error = NULL; gssize r; r = g_pollable_input_stream_read_nonblocking (G_POLLABLE_INPUT_STREAM (istream), buffer, BUFFER_SIZE, NULL, &error); if (r < 0) { g_warning ("Error reading from istream: %s", error ? error->message : "unknown"); if (error) g_error_free (error); /* Hang up the endpoint */ g_signal_emit_by_name (QMI_ENDPOINT (self), QMI_ENDPOINT_SIGNAL_HANGUP); return G_SOURCE_REMOVE; } if (r == 0) { /* HUP! */ g_warning ("Cannot read from istream: connection broken"); g_signal_emit_by_name (QMI_ENDPOINT (self), QMI_ENDPOINT_SIGNAL_HANGUP); return G_SOURCE_REMOVE; } /* else, r > 0 */ qmi_endpoint_add_message (QMI_ENDPOINT (self), buffer, r); return G_SOURCE_CONTINUE; } /*****************************************************************************/ typedef struct { gboolean use_proxy; guint spawn_retries; } QmuxDeviceOpenContext; static void qmux_device_open_context_free (QmuxDeviceOpenContext *ctx) { g_slice_free (QmuxDeviceOpenContext, ctx); } static gboolean endpoint_open_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void internal_proxy_open_ready (QmiClientCtl *client_ctl, GAsyncResult *res, GTask *task) { QmiMessageCtlInternalProxyOpenOutput *output; GError *error = NULL; /* Check result of the async operation */ output = qmi_client_ctl_internal_proxy_open_finish (client_ctl, res, &error); if (!output) { g_task_return_error (task, error); g_object_unref (task); return; } /* Check result of the QMI operation */ if (!qmi_message_ctl_internal_proxy_open_output_get_result (output, &error)) { g_task_return_error (task, error); g_object_unref (task); qmi_message_ctl_internal_proxy_open_output_unref (output); return; } qmi_message_ctl_internal_proxy_open_output_unref (output); g_task_return_boolean (task, TRUE); g_object_unref (task); } static void setup_proxy (GTask *task) { QmiEndpointQmux *self; QmiMessageCtlInternalProxyOpenInput *input; QmiFile *file; self = g_task_get_source_object (task); g_object_get (self, QMI_ENDPOINT_FILE, &file, NULL); input = qmi_message_ctl_internal_proxy_open_input_new (); qmi_message_ctl_internal_proxy_open_input_set_device_path (input, qmi_file_get_path (file), NULL); qmi_client_ctl_internal_proxy_open (self->priv->client_ctl, input, 5, g_task_get_cancellable (task), (GAsyncReadyCallback)internal_proxy_open_ready, task); qmi_message_ctl_internal_proxy_open_input_unref (input); g_object_unref (file); } static void setup_iostream (GTask *task) { QmiEndpointQmux *self; QmuxDeviceOpenContext *ctx; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); /* Check in/out streams */ if (!self->priv->istream || !self->priv->ostream) { destroy_iostream (self); g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Cannot get input/output streams"); g_object_unref (task); return; } /* Setup input events */ self->priv->input_source = g_pollable_input_stream_create_source ( G_POLLABLE_INPUT_STREAM (self->priv->istream), NULL); g_source_set_callback (self->priv->input_source, (GSourceFunc)input_ready_cb, self, NULL); g_source_attach (self->priv->input_source, g_main_context_get_thread_default ()); if (!ctx->use_proxy) { /* We're done here */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; } setup_proxy (task); } static void create_iostream_with_fd (GTask *task) { QmiEndpointQmux *self; QmiFile *file; gint fd; self = g_task_get_source_object (task); g_object_get (self, QMI_ENDPOINT_FILE, &file, NULL); fd = open (qmi_file_get_path (file), O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY); if (fd < 0) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Cannot open device file '%s': %s", qmi_file_get_path_display (file), strerror (errno)); g_object_unref (file); g_object_unref (task); return; } g_object_unref (file); g_assert (self->priv->fd < 0); self->priv->fd = fd; self->priv->istream = g_unix_input_stream_new (fd, FALSE); self->priv->ostream = g_unix_output_stream_new (fd, FALSE); setup_iostream (task); } static void create_iostream_with_socket (GTask *task); static gboolean wait_for_proxy_cb (GTask *task) { create_iostream_with_socket (task); return FALSE; } static void spawn_child_setup (void) { if (setpgid (0, 0) < 0) g_warning ("couldn't setup proxy specific process group"); } static void create_iostream_with_socket (GTask *task) { QmiEndpointQmux *self; QmuxDeviceOpenContext *ctx; GSocketAddress *socket_address; GError *error = NULL; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); /* Create socket client */ self->priv->socket_client = g_socket_client_new (); g_socket_client_set_family (self->priv->socket_client, G_SOCKET_FAMILY_UNIX); g_socket_client_set_socket_type (self->priv->socket_client, G_SOCKET_TYPE_STREAM); g_socket_client_set_protocol (self->priv->socket_client, G_SOCKET_PROTOCOL_DEFAULT); /* Setup socket address */ socket_address = g_unix_socket_address_new_with_type ( self->priv->proxy_path, -1, G_UNIX_SOCKET_ADDRESS_ABSTRACT); /* Connect to address */ self->priv->socket_connection = g_socket_client_connect ( self->priv->socket_client, G_SOCKET_CONNECTABLE (socket_address), NULL, &error); g_object_unref (socket_address); if (!self->priv->socket_connection) { gchar **argc; GSource *source; g_debug ("cannot connect to proxy: %s", error->message); g_clear_error (&error); g_clear_object (&self->priv->socket_client); /* Don't retry forever */ ctx->spawn_retries++; if (ctx->spawn_retries > MAX_SPAWN_RETRIES) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Couldn't spawn the qmi-proxy"); g_object_unref (task); return; } g_debug ("spawning new qmi-proxy (try %u)...", ctx->spawn_retries); argc = g_new0 (gchar *, 2); argc[0] = g_strdup (LIBEXEC_PATH "/qmi-proxy"); if (!g_spawn_async (NULL, /* working directory */ argc, NULL, /* envp */ G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL, (GSpawnChildSetupFunc) spawn_child_setup, NULL, /* child_setup_user_data */ NULL, &error)) { g_debug ("error spawning qmi-proxy: %s", error->message); g_clear_error (&error); } g_strfreev (argc); /* Wait some ms and retry */ source = g_timeout_source_new (100); g_source_set_callback (source, (GSourceFunc)wait_for_proxy_cb, task, NULL); g_source_attach (source, g_main_context_get_thread_default ()); g_source_unref (source); return; } self->priv->istream = g_io_stream_get_input_stream (G_IO_STREAM (self->priv->socket_connection)); if (self->priv->istream) g_object_ref (self->priv->istream); self->priv->ostream = g_io_stream_get_output_stream (G_IO_STREAM (self->priv->socket_connection)); if (self->priv->ostream) g_object_ref (self->priv->ostream); setup_iostream (task); } static void create_iostream_with_socket_direct (GTask *task) { QmiEndpointQmux *self; QmiFile *file; GSocketAddress *socket_address; GError *error = NULL; self = g_task_get_source_object (task); /* Create socket client */ self->priv->socket_client = g_socket_client_new (); g_socket_client_set_family (self->priv->socket_client, G_SOCKET_FAMILY_UNIX); g_socket_client_set_socket_type (self->priv->socket_client, G_SOCKET_TYPE_STREAM); g_socket_client_set_protocol (self->priv->socket_client, G_SOCKET_PROTOCOL_DEFAULT); /* Setup socket address (using a system path) */ g_object_get (self, QMI_ENDPOINT_FILE, &file, NULL); socket_address = g_unix_socket_address_new_with_type ( qmi_file_get_path (file), -1, G_UNIX_SOCKET_ADDRESS_PATH); /* Connect to address */ self->priv->socket_connection = g_socket_client_connect ( self->priv->socket_client, G_SOCKET_CONNECTABLE (socket_address), NULL, &error); g_object_unref (socket_address); /* Display an error if the socket is not reachable */ if (!self->priv->socket_connection) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Cannot connect to the socket '%s': '%s'", qmi_file_get_path (file), error->message); g_object_unref (file); g_object_unref (task); return; } g_object_unref (file); /* Use the input and output streams of the socket */ self->priv->istream = g_io_stream_get_input_stream (G_IO_STREAM (self->priv->socket_connection)); if (self->priv->istream) g_object_ref (self->priv->istream); self->priv->ostream = g_io_stream_get_output_stream (G_IO_STREAM (self->priv->socket_connection)); if (self->priv->ostream) g_object_ref (self->priv->ostream); setup_iostream (task); } static void endpoint_open (QmiEndpoint *endpoint, gboolean use_proxy, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiEndpointQmux *self; QmuxDeviceOpenContext *ctx; QmiFile *file; GTask *task; ctx = g_slice_new (QmuxDeviceOpenContext); ctx->use_proxy = use_proxy; ctx->spawn_retries = 0; self = QMI_ENDPOINT_QMUX (endpoint); task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)qmux_device_open_context_free); if (self->priv->istream || self->priv->ostream) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "Already open"); g_object_unref (task); return; } /* Get the file name to determine whether a unix domain socket should be used instead of a device file */ g_object_get (self, QMI_ENDPOINT_FILE, &file, NULL); if (use_proxy) create_iostream_with_socket (task); else if (g_strrstr (qmi_file_get_path (file), QMI_QMUX_SOCKET_FILE_NAME)) create_iostream_with_socket_direct (task); else create_iostream_with_fd (task); g_object_unref (file); } /*****************************************************************************/ static gboolean endpoint_is_open (QmiEndpoint *self) { return !!(QMI_ENDPOINT_QMUX (self)->priv->istream || QMI_ENDPOINT_QMUX (self)->priv->ostream); } static gboolean endpoint_send (QmiEndpoint *self, QmiMessage *message, guint timeout, GCancellable *cancellable, GError **error) { gconstpointer raw_message; gsize raw_message_len; GError *inner_error = NULL; /* QMUX endpoint allows only QMUX messages */ if (qmi_message_get_marker (message) != QMI_MESSAGE_QMUX_MARKER) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "QMUX endpoint expects only QMUX messages"); return FALSE; } /* Disallow private CTL operations */ if ((qmi_message_get_service (message) == QMI_SERVICE_CTL) && (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR || qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "QMUX endpoint expects only 8bit QMI services"); return FALSE; } /* Get raw message */ raw_message = qmi_message_get_raw (message, &raw_message_len, &inner_error); if (!raw_message) { g_propagate_prefixed_error (error, inner_error, "Cannot get raw message: "); return FALSE; } if (!g_output_stream_write_all (QMI_ENDPOINT_QMUX (self)->priv->ostream, raw_message, raw_message_len, NULL, /* bytes_written */ NULL, /* cancellable */ &inner_error)) { g_propagate_prefixed_error (error, inner_error, "Cannot write message: "); return FALSE; } /* Flush explicitly if correctly written */ g_output_stream_flush (QMI_ENDPOINT_QMUX (self)->priv->ostream, NULL, NULL); return TRUE; } /*****************************************************************************/ static gboolean endpoint_close_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void destroy_iostream (QmiEndpointQmux *self) { if (self->priv->input_source) { g_source_destroy (self->priv->input_source); g_clear_pointer (&self->priv->input_source, g_source_unref); } g_clear_object (&self->priv->istream); g_clear_object (&self->priv->ostream); g_clear_object (&self->priv->socket_connection); g_clear_object (&self->priv->socket_client); if (self->priv->fd >= 0) { close (self->priv->fd); self->priv->fd = -1; } } static void endpoint_close (QmiEndpoint *endpoint, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiEndpointQmux *self; GTask *task; self = QMI_ENDPOINT_QMUX (endpoint); task = g_task_new (self, cancellable, callback, user_data); destroy_iostream (self); g_task_return_boolean (task, TRUE); g_object_unref (task); } /*****************************************************************************/ QmiEndpointQmux * qmi_endpoint_qmux_new (QmiFile *file, const gchar *proxy_path, QmiClientCtl *client_ctl) { QmiEndpointQmux *self; if (!file) return NULL; self = g_object_new (QMI_TYPE_ENDPOINT_QMUX, QMI_ENDPOINT_FILE, file, NULL); self->priv->proxy_path = g_strdup (proxy_path); self->priv->client_ctl = g_object_ref (client_ctl); return self; } /*****************************************************************************/ static void qmi_endpoint_qmux_init (QmiEndpointQmux *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), QMI_TYPE_ENDPOINT_QMUX, QmiEndpointQmuxPrivate); self->priv->fd = -1; } static void dispose (GObject *object) { QmiEndpointQmux *self = QMI_ENDPOINT_QMUX (object); destroy_iostream (self); g_clear_object (&self->priv->client_ctl); g_clear_pointer (&self->priv->proxy_path, g_free); G_OBJECT_CLASS (qmi_endpoint_qmux_parent_class)->dispose (object); } static void qmi_endpoint_qmux_class_init (QmiEndpointQmuxClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); QmiEndpointClass *endpoint_class = QMI_ENDPOINT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiEndpointQmuxPrivate)); object_class->dispose = dispose; endpoint_class->open = endpoint_open; endpoint_class->open_finish = endpoint_open_finish; endpoint_class->is_open = endpoint_is_open; endpoint_class->send = endpoint_send; endpoint_class->close = endpoint_close; endpoint_class->close_finish = endpoint_close_finish; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint-qmux.h000066400000000000000000000046501455567757300224140ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019 Eric Caruso */ #ifndef _LIBQMI_GLIB_QMI_ENDPOINT_QMUX_H_ #define _LIBQMI_GLIB_QMI_ENDPOINT_QMUX_H_ #include "qmi-ctl.h" #include "qmi-endpoint.h" #include "qmi-file.h" #define QMI_TYPE_ENDPOINT_QMUX (qmi_endpoint_qmux_get_type ()) #define QMI_ENDPOINT_QMUX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_ENDPOINT_QMUX, QmiEndpointQmux)) #define QMI_ENDPOINT_QMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_ENDPOINT_QMUX, QmiEndpointQmuxClass)) #define QMI_IS_ENDPOINT_QMUX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_ENDPOINT_QMUX)) #define QMI_IS_ENDPOINT_QMUX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_ENDPOINT_QMUX)) #define QMI_ENDPOINT_QMUX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_ENDPOINT_QMUX, QmiEndpointQmuxClass)) typedef struct _QmiEndpointQmux QmiEndpointQmux; typedef struct _QmiEndpointQmuxClass QmiEndpointQmuxClass; typedef struct _QmiEndpointQmuxPrivate QmiEndpointQmuxPrivate; struct _QmiEndpointQmux { /*< private >*/ QmiEndpoint parent; QmiEndpointQmuxPrivate *priv; }; struct _QmiEndpointQmuxClass { /*< private >*/ QmiEndpointClass parent; }; GType qmi_endpoint_qmux_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiEndpointQmux, g_object_unref) QmiEndpointQmux *qmi_endpoint_qmux_new (QmiFile *file, const gchar *proxy_path, QmiClientCtl *client_ctl); #endif /* _LIBQMI_GLIB_QMI_ENDPOINT_QMUX_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint-qrtr.c000066400000000000000000000536371455567757300224160ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019-2020 Eric Caruso * Copyright (C) 2020 Aleksander Morgado */ #include #include #include #include #include #include #include #include #include "qmi-endpoint-qrtr.h" #include "qmi-errors.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #include "qmi-error-types.h" #include "qmi-message.h" #define QMI_MESSAGE_OUTPUT_TLV_RESULT 0x02 #define QMI_MESSAGE_TLV_ALLOCATION_INFO 0x01 #define QMI_MESSAGE_INPUT_TLV_SERVICE 0x01 #define QMI_MESSAGE_CTL_GET_VERSION_INFO 0x0021 #define QMI_MESSAGE_CTL_SYNC 0x0027 G_DEFINE_TYPE (QmiEndpointQrtr, qmi_endpoint_qrtr, QMI_TYPE_ENDPOINT) struct _QmiEndpointQrtrPrivate { QrtrNode *node; guint node_removed_id; gboolean node_removed; gboolean endpoint_open; GList *clients; }; /*****************************************************************************/ static void add_qmi_message_to_buffer (QmiEndpointQrtr *self, QmiMessage *message) { g_autoptr(GError) error = NULL; const guint8 *raw_message; gsize raw_message_len; raw_message = qmi_message_get_raw (message, &raw_message_len, &error); if (!raw_message) g_warning ("[%s] Got malformed QMI message: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); else qmi_endpoint_add_message (QMI_ENDPOINT (self), raw_message, raw_message_len); qmi_message_unref (message); } /*****************************************************************************/ #define QRTR_CLIENT_DATA_SERVICE "service" #define QRTR_CLIENT_DATA_CID "cid" typedef struct { QmiService service; guint cid; QrtrClient *client; guint client_message_id; } ClientInfo; static void client_info_free (ClientInfo *client_info) { g_signal_handler_disconnect (client_info->client, client_info->client_message_id); g_object_unref (client_info->client); g_slice_free (ClientInfo, client_info); } static void client_info_list_free (GList *list) { g_list_free_full (list, (GDestroyNotify) client_info_free); } static ClientInfo * client_info_lookup (QmiEndpointQrtr *self, QmiService service, guint cid) { GList *l; for (l = self->priv->clients; l; l = g_list_next (l)) { ClientInfo *client_info = l->data; if ((service == client_info->service) && (cid == client_info->cid)) return client_info; } return NULL; } static gint client_info_cmp (const ClientInfo *a, const ClientInfo *b) { if (a->service != b->service) return a->service - b->service; return a->cid - b->cid; } static void client_message_cb (QrtrClient *qrtr_client, GByteArray *qrtr_message, QmiEndpointQrtr *self) { QmiMessage *message; QmiService service; guint cid; g_autoptr(GError) error = NULL; service = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (qrtr_client), QRTR_CLIENT_DATA_SERVICE)); cid = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (qrtr_client), QRTR_CLIENT_DATA_CID)); /* Create a fake QMUX/QRTR header and add this message to the buffer */ message = qmi_message_new_from_data (service, cid, qrtr_message, &error); if (!message) g_warning ("[%s] Got malformed QMI message: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); else add_qmi_message_to_buffer (self, message); } static ClientInfo * client_info_new (QmiEndpointQrtr *self, QmiService service, GError **error) { ClientInfo *client_info; QrtrClient *qrtr_client; GList *l; guint max_cid = 0; guint min_available_cid = 1; guint cid = 0; gint32 port; for (l = self->priv->clients; l; l = g_list_next (l)) { client_info = l->data; if (service != client_info->service) continue; max_cid = client_info->cid; if (min_available_cid == client_info->cid) min_available_cid++; } cid = max_cid + 1; if (cid > G_MAXUINT8) { cid = min_available_cid; if (min_available_cid > G_MAXUINT8) { g_set_error (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_CLIENT_IDS_EXHAUSTED, "Client IDs have been exhausted"); return NULL; } } port = qrtr_node_lookup_port (self->priv->node, service); if (port < 0) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED, "Service not supported"); return NULL; } qrtr_client = qrtr_client_new (self->priv->node, (guint)port, NULL, error); if (!qrtr_client) { g_prefix_error (error, "Couldn't create QRTR client: "); return NULL; } /* store service and cid info in the client itself for quicker access */ g_object_set_data (G_OBJECT (qrtr_client), QRTR_CLIENT_DATA_SERVICE, GUINT_TO_POINTER (service)); g_object_set_data (G_OBJECT (qrtr_client), QRTR_CLIENT_DATA_CID, GUINT_TO_POINTER (cid)); client_info = g_slice_new0 (ClientInfo); client_info->service = service; client_info->cid = cid; client_info->client = qrtr_client; client_info->client_message_id = g_signal_connect (qrtr_client, QRTR_CLIENT_SIGNAL_MESSAGE, G_CALLBACK (client_message_cb), self); self->priv->clients = g_list_insert_sorted (self->priv->clients, client_info, (GCompareFunc)client_info_cmp); return client_info; } /*****************************************************************************/ /* Client info operations */ static guint allocate_client (QmiEndpointQrtr *self, QmiService service, GError **error) { ClientInfo *client_info; if (!self->priv->endpoint_open) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "Endpoint is not open"); return 0; } client_info = client_info_new (self, service, error); if (!client_info) return 0; return client_info->cid; } static void release_client (QmiEndpointQrtr *self, QmiService service, guint cid) { ClientInfo *client_info; client_info = client_info_lookup (self, service, cid); if (!client_info) return; self->priv->clients = g_list_remove (self->priv->clients, client_info); client_info_free (client_info); } /*****************************************************************************/ static gboolean construct_alloc_tlv (QmiMessage *message, QmiService service, guint8 client) { gsize init_offset; init_offset = qmi_message_tlv_write_init (message, QMI_MESSAGE_TLV_ALLOCATION_INFO, NULL); if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_ALLOCATE_CID || qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_RELEASE_CID) { g_assert (service <= G_MAXUINT8); return init_offset && qmi_message_tlv_write_guint8 (message, service, NULL) && qmi_message_tlv_write_guint8 (message, client, NULL) && qmi_message_tlv_write_complete (message, init_offset, NULL); } if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR || qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR) { g_assert (service <= G_MAXUINT16); return init_offset && qmi_message_tlv_write_guint16 (message, QMI_ENDIAN_LITTLE, service, NULL) && qmi_message_tlv_write_guint8 (message, client, NULL) && qmi_message_tlv_write_complete (message, init_offset, NULL); } g_assert_not_reached (); } static void reply_protocol_error (QmiEndpointQrtr *self, QmiMessage *message, QmiProtocolError error) { QmiMessage *response = NULL; response = qmi_message_response_new (message, error); if (response) add_qmi_message_to_buffer (self, response); } static void handle_alloc_cid (QmiEndpointQrtr *self, QmiMessage *message) { gsize offset = 0; gsize init_offset; QmiService service = QMI_SERVICE_UNKNOWN; guint cid; g_autoptr(QmiMessage) response = NULL; g_autoptr(GError) error = NULL; if ((init_offset = qmi_message_tlv_read_init (message, QMI_MESSAGE_TLV_ALLOCATION_INFO, NULL, &error)) == 0) { g_debug ("[%s] error allocating CID: could not parse message: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE); return; } if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_ALLOCATE_CID) { guint8 service_tmp; if (!qmi_message_tlv_read_guint8 (message, init_offset, &offset, &service_tmp, &error)) { g_debug ("[%s] error allocating CID: failed to read service: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE); return; } service = (QmiService)service_tmp; } else if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR) { guint16 service_tmp; if (!qmi_message_tlv_read_guint16 (message, init_offset, &offset, QMI_ENDIAN_LITTLE, &service_tmp, &error)) { g_debug ("[%s] error allocating CID (QRTR): failed to read service: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE); return; } service = (QmiService)service_tmp; } else g_assert_not_reached (); cid = allocate_client (self, service, &error); if (!cid) { g_debug ("[%s] error allocating CID: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_INTERNAL); return; } response = qmi_message_response_new (message, QMI_PROTOCOL_ERROR_NONE); if (!response) return; if (!construct_alloc_tlv (response, service, cid)) return; add_qmi_message_to_buffer (self, g_steal_pointer (&response)); } static void handle_release_cid (QmiEndpointQrtr *self, QmiMessage *message) { gsize offset = 0; gsize init_offset; QmiService service; guint8 cid; g_autoptr(QmiMessage) response = NULL; g_autoptr(GError) error = NULL; if ((init_offset = qmi_message_tlv_read_init (message, QMI_MESSAGE_TLV_ALLOCATION_INFO, NULL, &error)) == 0) { g_debug ("[%s] error releasing CID: could not parse message: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE); return; } if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_RELEASE_CID) { guint8 service_tmp; if (!qmi_message_tlv_read_guint8 (message, init_offset, &offset, &service_tmp, &error)) { g_debug ("[%s] error releasing CID: could not read service: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE); return; } service = (QmiService)service_tmp; } else if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR) { guint16 service_tmp; if (!qmi_message_tlv_read_guint16 (message, init_offset, &offset, QMI_ENDIAN_LITTLE, &service_tmp, &error)) { g_debug ("[%s] error releasing CID (QRTR): could not read service: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE); return; } service = (QmiService)service_tmp; } else g_assert_not_reached (); if (!qmi_message_tlv_read_guint8 (message, init_offset, &offset, &cid, &error)) { g_debug ("[%s] error releasing CID: could not client id: %s", qmi_endpoint_get_name (QMI_ENDPOINT (self)), error->message); reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE); return; } release_client (self, service, cid); response = qmi_message_response_new (message, QMI_PROTOCOL_ERROR_NONE); if (!response) return; if (!construct_alloc_tlv (response, service, cid)) return; add_qmi_message_to_buffer (self, g_steal_pointer (&response)); } static void handle_sync (QmiEndpointQrtr *self, QmiMessage *message) { reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_NONE); } static void unhandled_message (QmiEndpointQrtr *self, QmiMessage *message) { reply_protocol_error (self, message, QMI_PROTOCOL_ERROR_NOT_SUPPORTED); } static void handle_ctl_message (QmiEndpointQrtr *self, QmiMessage *message) { switch (qmi_message_get_message_id (message)) { case QMI_MESSAGE_CTL_ALLOCATE_CID: case QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR: handle_alloc_cid (self, message); break; case QMI_MESSAGE_CTL_RELEASE_CID: case QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR: handle_release_cid (self, message); break; case QMI_MESSAGE_CTL_SYNC: handle_sync (self, message); break; case QMI_MESSAGE_CTL_GET_VERSION_INFO: default: unhandled_message (self, message); break; } } /*****************************************************************************/ static gboolean endpoint_open_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void endpoint_open (QmiEndpoint *endpoint, gboolean use_proxy, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiEndpointQrtr *self = QMI_ENDPOINT_QRTR (endpoint); GTask *task; g_assert (!use_proxy); task = g_task_new (self, cancellable, callback, user_data); if (self->priv->node_removed) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Node is not present on bus"); g_object_unref (task); return; } if (self->priv->endpoint_open) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "Already open"); g_object_unref (task); return; } g_assert (self->priv->clients == NULL); self->priv->endpoint_open = TRUE; g_task_return_boolean (task, TRUE); g_object_unref (task); } static gboolean endpoint_is_open (QmiEndpoint *self) { return QMI_ENDPOINT_QRTR (self)->priv->endpoint_open; } static gboolean endpoint_send (QmiEndpoint *endpoint, QmiMessage *message, guint timeout, GCancellable *cancellable, GError **error) { QmiEndpointQrtr *self = QMI_ENDPOINT_QRTR (endpoint); ClientInfo *client_info; QmiService service; guint cid; gconstpointer raw_message; gsize raw_message_len; g_autoptr(GByteArray) qrtr_message = NULL; /* We implement the CTL service here, so divert those messages */ service = qmi_message_get_service (message); if (service == QMI_SERVICE_CTL) { handle_ctl_message (self, message); return TRUE; } cid = qmi_message_get_client_id (message); client_info = client_info_lookup (self, service, cid); if (!client_info) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "Unknown client %u for service %s", cid, qmi_service_get_string (service)); return FALSE; } /* Build raw QRTR message without QMUX/QRTR header */ raw_message = qmi_message_get_data (message, &raw_message_len, error); if (!raw_message) { g_prefix_error (error, "Invalid QMI message: "); return FALSE; } qrtr_message = g_byte_array_sized_new (raw_message_len); g_byte_array_append (qrtr_message, raw_message, raw_message_len); return qrtr_client_send (client_info->client, qrtr_message, cancellable, error); } /*****************************************************************************/ static void internal_close (QmiEndpointQrtr *self) { g_clear_pointer (&self->priv->clients, client_info_list_free); self->priv->endpoint_open = FALSE; } static gboolean endpoint_close_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void endpoint_close (QmiEndpoint *endpoint, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiEndpointQrtr *self = QMI_ENDPOINT_QRTR (endpoint); GTask *task; task = g_task_new (self, cancellable, callback, user_data); internal_close (self); g_task_return_boolean (task, TRUE); g_object_unref (task); } /*****************************************************************************/ static void node_removed_cb (QrtrNode *node, QmiEndpointQrtr *self) { self->priv->node_removed = TRUE; g_signal_emit_by_name (QMI_ENDPOINT (self), QMI_ENDPOINT_SIGNAL_HANGUP); } QmiEndpointQrtr * qmi_endpoint_qrtr_new (QrtrNode *node) { QmiEndpointQrtr *self; g_autofree gchar *uri = NULL; g_autoptr(GFile) gfile = NULL; g_autoptr(QmiFile) file = NULL; if (!node) return NULL; uri = qrtr_get_uri_for_node (qrtr_node_get_id (node)); gfile = g_file_new_for_uri (uri); file = qmi_file_new (gfile); self = g_object_new (QMI_TYPE_ENDPOINT_QRTR, QMI_ENDPOINT_FILE, file, NULL); self->priv->node = g_object_ref (node); self->priv->node_removed_id = g_signal_connect (node, QRTR_NODE_SIGNAL_REMOVED, G_CALLBACK (node_removed_cb), self); return self; } /*****************************************************************************/ static void qmi_endpoint_qrtr_init (QmiEndpointQrtr *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), QMI_TYPE_ENDPOINT_QRTR, QmiEndpointQrtrPrivate); } static void dispose (GObject *object) { QmiEndpointQrtr *self = QMI_ENDPOINT_QRTR (object); internal_close (self); if (self->priv->node) { if (self->priv->node_removed_id) { g_signal_handler_disconnect (self->priv->node, self->priv->node_removed_id); self->priv->node_removed_id = 0; } g_clear_object (&self->priv->node); } G_OBJECT_CLASS (qmi_endpoint_qrtr_parent_class)->dispose (object); } static void qmi_endpoint_qrtr_class_init (QmiEndpointQrtrClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); QmiEndpointClass *endpoint_class = QMI_ENDPOINT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiEndpointQrtrPrivate)); object_class->dispose = dispose; endpoint_class->open = endpoint_open; endpoint_class->open_finish = endpoint_open_finish; endpoint_class->is_open = endpoint_is_open; endpoint_class->send = endpoint_send; endpoint_class->close = endpoint_close; endpoint_class->close_finish = endpoint_close_finish; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint-qrtr.h000066400000000000000000000044311455567757300224070ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019-2020 Eric Caruso * Copyright (C) 2020 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENDPOINT_QRTR_H_ #define _LIBQMI_GLIB_QMI_ENDPOINT_QRTR_H_ #include #include "qmi-endpoint.h" #define QMI_TYPE_ENDPOINT_QRTR (qmi_endpoint_qrtr_get_type ()) #define QMI_ENDPOINT_QRTR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_ENDPOINT_QRTR, QmiEndpointQrtr)) #define QMI_ENDPOINT_QRTR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_ENDPOINT_QRTR, QmiEndpointQrtrClass)) #define QMI_IS_ENDPOINT_QRTR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_ENDPOINT_QRTR)) #define QMI_IS_ENDPOINT_QRTR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_ENDPOINT_QRTR)) #define QMI_ENDPOINT_QRTR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_ENDPOINT_QRTR, QmiEndpointQrtrClass)) typedef struct _QmiEndpointQrtr QmiEndpointQrtr; typedef struct _QmiEndpointQrtrClass QmiEndpointQrtrClass; typedef struct _QmiEndpointQrtrPrivate QmiEndpointQrtrPrivate; struct _QmiEndpointQrtr { /*< private >*/ QmiEndpoint parent; QmiEndpointQrtrPrivate *priv; }; struct _QmiEndpointQrtrClass { /*< private >*/ QmiEndpointClass parent; }; GType qmi_endpoint_qrtr_get_type (void); QmiEndpointQrtr *qmi_endpoint_qrtr_new (QrtrNode *node); #endif /* _LIBQMI_GLIB_QMI_ENDPOINT_QRTR_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint.c000066400000000000000000000270341455567757300214200ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (C) 2019 Eric Caruso */ #include "qmi-endpoint.h" #include "qmi-helpers.h" #include "qmi-error-types.h" #include "qmi-errors.h" G_DEFINE_TYPE (QmiEndpoint, qmi_endpoint, G_TYPE_OBJECT) struct _QmiEndpointPrivate { GByteArray *buffer; QmiFile *file; }; enum { PROP_0, PROP_FILE, PROP_LAST }; enum { SIGNAL_NEW_DATA, SIGNAL_HANGUP, SIGNAL_LAST }; static GParamSpec *properties[PROP_LAST]; static guint signals[SIGNAL_LAST] = { 0 }; /*****************************************************************************/ gboolean qmi_endpoint_parse_buffer (QmiEndpoint *self, QmiMessageHandler handler, gpointer user_data, GError **error) { do { GError *inner_error = NULL; QmiMessage *message; /* Every message received must start with the QMUX or QRTR marker. * If it doesn't, we broke framing :-/ * If we broke framing, an error should be reported and the device * should get closed */ if (self->priv->buffer->len > 0 && self->priv->buffer->data[0] != QMI_MESSAGE_QMUX_MARKER && self->priv->buffer->data[0] != QMI_MESSAGE_QRTR_MARKER) { g_set_error (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE, "QMI framing error detected"); g_signal_emit (self, signals[SIGNAL_HANGUP], 0); return FALSE; } message = qmi_message_new_from_raw (self->priv->buffer, &inner_error); if (!message) { if (!inner_error) /* More data we need */ return TRUE; /* Warn about the issue */ g_warning ("[%s] invalid message received: '%s'", qmi_file_get_path_display (self->priv->file), inner_error->message); g_error_free (inner_error); if (qmi_utils_get_traces_enabled ()) { gchar *printable; guint len = MIN (self->priv->buffer->len, 2048); printable = qmi_helpers_str_hex (self->priv->buffer->data, len, ':'); g_debug ("<<<<<< RAW INVALID MESSAGE:\n" "<<<<<< length = %u\n" "<<<<<< data = %s\n", self->priv->buffer->len, /* show full buffer len */ printable); g_free (printable); } } else { /* Play with the received message */ handler (message, user_data); qmi_message_unref (message); } } while (self->priv->buffer->len > 0); return TRUE; } void qmi_endpoint_add_message (QmiEndpoint *self, const guint8 *data, guint len) { self->priv->buffer = g_byte_array_append (self->priv->buffer, data, len); g_signal_emit (self, signals[SIGNAL_NEW_DATA], 0); } /*****************************************************************************/ static gboolean endpoint_setup_indications_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void endpoint_setup_indications (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; task = g_task_new (self, cancellable, callback, user_data); g_task_return_boolean (task, TRUE); g_object_unref (task); } /*****************************************************************************/ const gchar * qmi_endpoint_get_name (QmiEndpoint *self) { return qmi_file_get_path_display (self->priv->file); } gboolean qmi_endpoint_open_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return QMI_ENDPOINT_GET_CLASS (self)->open_finish (self, res, error); } void qmi_endpoint_open (QmiEndpoint *self, gboolean use_proxy, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_assert (QMI_ENDPOINT_GET_CLASS (self)->open && QMI_ENDPOINT_GET_CLASS (self)->open_finish); return QMI_ENDPOINT_GET_CLASS (self)->open (self, use_proxy, timeout, cancellable, callback, user_data); } gboolean qmi_endpoint_is_open (QmiEndpoint *self) { g_assert (QMI_ENDPOINT_GET_CLASS (self)->is_open); return QMI_ENDPOINT_GET_CLASS (self)->is_open (self); } gboolean qmi_endpoint_setup_indications_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return QMI_ENDPOINT_GET_CLASS (self)->setup_indications_finish (self, res, error); } void qmi_endpoint_setup_indications (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_assert (QMI_ENDPOINT_GET_CLASS (self)->setup_indications && QMI_ENDPOINT_GET_CLASS (self)->setup_indications_finish); return QMI_ENDPOINT_GET_CLASS (self)->setup_indications (self, timeout, cancellable, callback, user_data); } gboolean qmi_endpoint_send (QmiEndpoint *self, QmiMessage *message, guint timeout, GCancellable *cancellable, GError **error) { g_assert (QMI_ENDPOINT_GET_CLASS (self)->send); return QMI_ENDPOINT_GET_CLASS (self)->send (self, message, timeout, cancellable, error); } gboolean qmi_endpoint_close_finish (QmiEndpoint *self, GAsyncResult *res, GError **error) { return QMI_ENDPOINT_GET_CLASS (self)->close_finish (self, res, error); } void qmi_endpoint_close (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { g_assert (QMI_ENDPOINT_GET_CLASS (self)->close && QMI_ENDPOINT_GET_CLASS (self)->close_finish); return QMI_ENDPOINT_GET_CLASS (self)->close (self, timeout, cancellable, callback, user_data); } /*****************************************************************************/ static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { QmiEndpoint *self = QMI_ENDPOINT (object); switch (prop_id) { case PROP_FILE: g_assert (self->priv->file == NULL); self->priv->file = g_value_dup_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QmiEndpoint *self = QMI_ENDPOINT (object); switch (prop_id) { case PROP_FILE: g_value_set_object (value, self->priv->file); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } /*****************************************************************************/ static void qmi_endpoint_init (QmiEndpoint *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), QMI_TYPE_ENDPOINT, QmiEndpointPrivate); self->priv->buffer = g_byte_array_new (); } static void dispose (GObject *object) { QmiEndpoint *self = QMI_ENDPOINT (object); g_clear_pointer (&self->priv->buffer, g_byte_array_unref); g_clear_object (&self->priv->file); G_OBJECT_CLASS (qmi_endpoint_parent_class)->dispose (object); } static void qmi_endpoint_class_init (QmiEndpointClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiEndpointPrivate)); object_class->get_property = get_property; object_class->set_property = set_property; object_class->dispose = dispose; klass->setup_indications = endpoint_setup_indications; klass->setup_indications_finish = endpoint_setup_indications_finish; properties[PROP_FILE] = g_param_spec_object (QMI_ENDPOINT_FILE, "Device file", "File to the underlying QMI device", QMI_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_FILE, properties[PROP_FILE]); signals[SIGNAL_NEW_DATA] = g_signal_new (QMI_ENDPOINT_SIGNAL_NEW_DATA, G_OBJECT_CLASS_TYPE (G_OBJECT_CLASS (klass)), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0); signals[SIGNAL_HANGUP] = g_signal_new (QMI_ENDPOINT_SIGNAL_HANGUP, G_OBJECT_CLASS_TYPE (G_OBJECT_CLASS (klass)), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0); } libqmi-1.35.2-dev/src/libqmi-glib/qmi-endpoint.h000066400000000000000000000161021455567757300214170ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019 Eric Caruso */ #ifndef _LIBQMI_GLIB_QMI_ENDPOINT_H_ #define _LIBQMI_GLIB_QMI_ENDPOINT_H_ #include #include #include "qmi-ctl.h" #include "qmi-file.h" #include "qmi-message.h" /* Constants for allocating/releasing clients */ #define QMI_MESSAGE_CTL_ALLOCATE_CID 0x0022 #define QMI_MESSAGE_CTL_RELEASE_CID 0x0023 #define QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR 0xFF22 #define QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR 0xFF23 typedef void (*QmiMessageHandler) (QmiMessage *message, gpointer user_data); #define QMI_TYPE_ENDPOINT (qmi_endpoint_get_type ()) #define QMI_ENDPOINT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_ENDPOINT, QmiEndpoint)) #define QMI_ENDPOINT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_ENDPOINT, QmiEndpointClass)) #define QMI_IS_ENDPOINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_ENDPOINT)) #define QMI_IS_ENDPOINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_ENDPOINT)) #define QMI_ENDPOINT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_ENDPOINT, QmiEndpointClass)) typedef struct _QmiEndpoint QmiEndpoint; typedef struct _QmiEndpointClass QmiEndpointClass; typedef struct _QmiEndpointPrivate QmiEndpointPrivate; #define QMI_ENDPOINT_FILE "endpoint-file" #define QMI_ENDPOINT_SIGNAL_NEW_DATA "new-data" #define QMI_ENDPOINT_SIGNAL_HANGUP "hangup" struct _QmiEndpoint { /*< private >*/ GObject parent; QmiEndpointPrivate *priv; }; struct _QmiEndpointClass { /*< private >*/ GObjectClass parent; /* low level I/O primitives */ void (* open) (QmiEndpoint *self, gboolean use_proxy, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (* open_finish) (QmiEndpoint *self, GAsyncResult *res, GError **error); gboolean (* is_open) (QmiEndpoint *self); void (* setup_indications) (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (* setup_indications_finish) (QmiEndpoint *self, GAsyncResult *res, GError **error); gboolean (* send) (QmiEndpoint *self, QmiMessage *message, guint timeout, GCancellable *cancellable, GError **error); void (* close) (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (* close_finish) (QmiEndpoint *self, GAsyncResult *res, GError **error); }; GType qmi_endpoint_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiEndpoint, g_object_unref) const gchar *qmi_endpoint_get_name (QmiEndpoint *self); void qmi_endpoint_open (QmiEndpoint *self, gboolean use_proxy, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qmi_endpoint_open_finish (QmiEndpoint *self, GAsyncResult *res, GError **error); gboolean qmi_endpoint_is_open (QmiEndpoint *self); void qmi_endpoint_setup_indications (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qmi_endpoint_setup_indications_finish (QmiEndpoint *self, GAsyncResult *res, GError **error); gboolean qmi_endpoint_send (QmiEndpoint *self, QmiMessage *message, guint timeout, GCancellable *cancellable, GError **error); void qmi_endpoint_close (QmiEndpoint *self, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qmi_endpoint_close_finish (QmiEndpoint *self, GAsyncResult *res, GError **error); /* * Parse all messages, calling @handler on each one while also passing * along @user_data. * * If it hits an unrecoverable error such as a framing issue, returns * false and sets @error. Otherwise, returns true. */ gboolean qmi_endpoint_parse_buffer (QmiEndpoint *self, QmiMessageHandler handler, gpointer user_data, GError **error); /* * Adds the message in @buf to the buffer. * * This function should only be called by subclasses when they receive * something on the underlying transport. */ void qmi_endpoint_add_message (QmiEndpoint *self, const guint8 *buf, guint len); #endif /* _LIBQMI_GLIB_QMI_ENDPOINT_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-dms.c000066400000000000000000000064711455567757300215120ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2017 Aleksander Morgado */ #include #include "qmi-enums-dms.h" /*****************************************************************************/ /* Helper for the 'QMI DMS Swi Get USB Composition' message */ static const gchar *usb_composition_description[] = { [QMI_DMS_SWI_USB_COMPOSITION_0] = "HIP, DM, NMEA, AT, MDM1, MDM2, MDM3, MS", [QMI_DMS_SWI_USB_COMPOSITION_1] = "HIP, DM, NMEA, AT, MDM1, MS", [QMI_DMS_SWI_USB_COMPOSITION_2] = "HIP, DM, NMEA, AT, NIC1, MS", [QMI_DMS_SWI_USB_COMPOSITION_3] = "HIP, DM, NMEA, AT, MDM1, NIC1, MS", [QMI_DMS_SWI_USB_COMPOSITION_4] = "HIP, DM, NMEA, AT, NIC1, NIC2, NIC3, MS", [QMI_DMS_SWI_USB_COMPOSITION_5] = "HIP, DM, NMEA, AT, ECM1, MS", [QMI_DMS_SWI_USB_COMPOSITION_6] = "DM, NMEA, AT, QMI", [QMI_DMS_SWI_USB_COMPOSITION_7] = "DM, NMEA, AT, RMNET1, RMNET2, RMNET3", [QMI_DMS_SWI_USB_COMPOSITION_8] = "DM, NMEA, AT, MBIM", [QMI_DMS_SWI_USB_COMPOSITION_9] = "MBIM", [QMI_DMS_SWI_USB_COMPOSITION_10] = "NMEA, MBIM", [QMI_DMS_SWI_USB_COMPOSITION_11] = "DM, MBIM", [QMI_DMS_SWI_USB_COMPOSITION_12] = "DM, NMEA, MBIM", [QMI_DMS_SWI_USB_COMPOSITION_13] = "Dual configuration: USB composition 6 and USB composition 8", [QMI_DMS_SWI_USB_COMPOSITION_14] = "Dual configuration: USB composition 6 and USB composition 9", [QMI_DMS_SWI_USB_COMPOSITION_15] = "Dual configuration: USB composition 6 and USB composition 10", [QMI_DMS_SWI_USB_COMPOSITION_16] = "Dual configuration: USB composition 6 and USB composition 11", [QMI_DMS_SWI_USB_COMPOSITION_17] = "Dual configuration: USB composition 6 and USB composition 12", [QMI_DMS_SWI_USB_COMPOSITION_18] = "Dual configuration: USB composition 7 and USB composition 8", [QMI_DMS_SWI_USB_COMPOSITION_19] = "Dual configuration: USB composition 7 and USB composition 9", [QMI_DMS_SWI_USB_COMPOSITION_20] = "Dual configuration: USB composition 7 and USB composition 10", [QMI_DMS_SWI_USB_COMPOSITION_21] = "Dual configuration: USB composition 7 and USB composition 11", [QMI_DMS_SWI_USB_COMPOSITION_22] = "Dual configuration: USB composition 7 and USB composition 12", }; const gchar * qmi_dms_swi_usb_composition_get_description (QmiDmsSwiUsbComposition value) { return (((value > QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN) && ((guint)value < G_N_ELEMENTS (usb_composition_description))) ? usb_composition_description[value] : NULL); } libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-dms.h000066400000000000000000000473521455567757300215220ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_DMS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_DMS_H_ #include #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-dms * @title: DMS enumerations and flags * @short_description: Enumerations and flags in the DMS service. * * This section defines enumerations and flags used in the DMS service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Capabilities' message */ /** * QmiDmsDataServiceCapability: * @QMI_DMS_DATA_SERVICE_CAPABILITY_NONE: No data services supported. * @QMI_DMS_DATA_SERVICE_CAPABILITY_CS: Only CS supported. * @QMI_DMS_DATA_SERVICE_CAPABILITY_PS: Only PS supported. * @QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS: Simultaneous CS and PS supported. * @QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS: Non simultaneous CS and PS supported. * * Data service capability. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_DATA_SERVICE_CAPABILITY_NONE = 0, QMI_DMS_DATA_SERVICE_CAPABILITY_CS = 1, QMI_DMS_DATA_SERVICE_CAPABILITY_PS = 2, QMI_DMS_DATA_SERVICE_CAPABILITY_SIMULTANEOUS_CS_PS = 3, QMI_DMS_DATA_SERVICE_CAPABILITY_NON_SIMULTANEOUS_CS_PS = 4 } QmiDmsDataServiceCapability; /** * QmiDmsSimCapability: * @QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED: SIM not supported. * @QMI_DMS_SIM_CAPABILITY_SUPPORTED: SIM is supported. * * SIM capability. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_SIM_CAPABILITY_NOT_SUPPORTED = 1, QMI_DMS_SIM_CAPABILITY_SUPPORTED = 2 } QmiDmsSimCapability; /** * QmiDmsRadioInterface: * @QMI_DMS_RADIO_INTERFACE_CDMA20001X: CDMA2000 1x. * @QMI_DMS_RADIO_INTERFACE_EVDO: CDMA2000 HRPD (1xEV-DO) * @QMI_DMS_RADIO_INTERFACE_GSM: GSM. * @QMI_DMS_RADIO_INTERFACE_UMTS: UMTS. * @QMI_DMS_RADIO_INTERFACE_LTE: LTE. * @QMI_DMS_RADIO_INTERFACE_TDS: TDS. Since 1.32. * @QMI_DMS_RADIO_INTERFACE_5GNR: 5G NR. Since 1.26. * * Radio interface type. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_RADIO_INTERFACE_CDMA20001X = 1, QMI_DMS_RADIO_INTERFACE_EVDO = 2, QMI_DMS_RADIO_INTERFACE_GSM = 4, QMI_DMS_RADIO_INTERFACE_UMTS = 5, QMI_DMS_RADIO_INTERFACE_LTE = 8, QMI_DMS_RADIO_INTERFACE_TDS = 9, QMI_DMS_RADIO_INTERFACE_5GNR = 10, } QmiDmsRadioInterface; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Power State' message */ /** * QmiDmsPowerState: * @QMI_DMS_POWER_STATE_EXTERNAL_SOURCE: Powered by an external source. * @QMI_DMS_POWER_STATE_BATTERY_CONNECTED: Battery is connected. * @QMI_DMS_POWER_STATE_BATTERY_CHARGING: Battery is currently being charged. * @QMI_DMS_POWER_STATE_FAULT: Recognized power fault. * * Flags specifying the current power state. * * If @QMI_DMS_POWER_STATE_EXTERNAL_SOURCE is set, the device is powerered by an * external source; otherwise it is powered by a battery. * * If @QMI_DMS_POWER_STATE_BATTERY_CONNECTED is set, the battery is connected; * otherwise the battery is not connected. * * If @QMI_DMS_POWER_STATE_BATTERY_CHARGING is set, the battery is being charged; * otherwise the battery is not being charged. * * If @QMI_DMS_POWER_STATE_FAULT is set, a power fault has been detected. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_POWER_STATE_EXTERNAL_SOURCE = 1 << 0, QMI_DMS_POWER_STATE_BATTERY_CONNECTED = 1 << 1, QMI_DMS_POWER_STATE_BATTERY_CHARGING = 1 << 2, QMI_DMS_POWER_STATE_FAULT = 1 << 3, } QmiDmsPowerState; /*****************************************************************************/ /* Helper enums for the 'QMI DMS UIM Set PIN Protection' message */ /** * QmiDmsUimPinId: * @QMI_DMS_UIM_PIN_ID_PIN: PIN. * @QMI_DMS_UIM_PIN_ID_PIN2: PIN2. * * The PIN identifier. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_UIM_PIN_ID_PIN = 1, QMI_DMS_UIM_PIN_ID_PIN2 = 2 } QmiDmsUimPinId; /*****************************************************************************/ /* Helper enums for the 'QMI DMS UIM Get PIN Status' message */ /** * QmiDmsUimPinStatus: * @QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED: Not initialized. * @QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED: Enabled, not verified. * @QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED: Enabled, verified. * @QMI_DMS_UIM_PIN_STATUS_DISABLED: Disabled. * @QMI_DMS_UIM_PIN_STATUS_BLOCKED: Blocked. * @QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED: Permanently Blocked. * @QMI_DMS_UIM_PIN_STATUS_UNBLOCKED: Unblocked. * @QMI_DMS_UIM_PIN_STATUS_CHANGED: Changed. * * The PIN status. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_UIM_PIN_STATUS_NOT_INITIALIZED = 0, QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED = 1, QMI_DMS_UIM_PIN_STATUS_ENABLED_VERIFIED = 2, QMI_DMS_UIM_PIN_STATUS_DISABLED = 3, QMI_DMS_UIM_PIN_STATUS_BLOCKED = 4, QMI_DMS_UIM_PIN_STATUS_PERMANENTLY_BLOCKED = 5, QMI_DMS_UIM_PIN_STATUS_UNBLOCKED = 6, QMI_DMS_UIM_PIN_STATUS_CHANGED = 7, } QmiDmsUimPinStatus; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Operating Mode' message */ /** * QmiDmsOperatingMode: * @QMI_DMS_OPERATING_MODE_ONLINE: Device can acquire a system and make calls. * @QMI_DMS_OPERATING_MODE_LOW_POWER: Device has temporarily disabled RF. * @QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER: Device has disabled RF and state persists even after a reset. * @QMI_DMS_OPERATING_MODE_FACTORY_TEST: Special mode for manufacturer tests. * @QMI_DMS_OPERATING_MODE_OFFLINE: Device has deactivated RF and is partially shutdown. * @QMI_DMS_OPERATING_MODE_RESET: Device is in the process of power cycling. * @QMI_DMS_OPERATING_MODE_SHUTTING_DOWN: Device is in the process of shutting down. * @QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER: Mode-only Low Power. * @QMI_DMS_OPERATING_MODE_UNKNOWN: Unknown. * * Operating mode of the device. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_OPERATING_MODE_ONLINE = 0, QMI_DMS_OPERATING_MODE_LOW_POWER = 1, QMI_DMS_OPERATING_MODE_FACTORY_TEST = 2, QMI_DMS_OPERATING_MODE_OFFLINE = 3, QMI_DMS_OPERATING_MODE_RESET = 4, QMI_DMS_OPERATING_MODE_SHUTTING_DOWN = 5, QMI_DMS_OPERATING_MODE_PERSISTENT_LOW_POWER = 6, QMI_DMS_OPERATING_MODE_MODE_ONLY_LOW_POWER = 7, QMI_DMS_OPERATING_MODE_UNKNOWN = 0xFF } QmiDmsOperatingMode; /** * QmiDmsOfflineReason: * @QMI_DMS_OFFLINE_REASON_HOST_IMAGE_MISCONFIGURATION: Host image misconfiguration. * @QMI_DMS_OFFLINE_REASON_PRI_IMAGE_MISCONFIGURATION: PRI image misconfiguration. * @QMI_DMS_OFFLINE_REASON_PRI_VERSION_INCOMPATIBLE: PRI version incompatible. * @QMI_DMS_OFFLINE_REASON_DEVICE_MEMORY_FULL: Memory full, cannot copy PRI information. * * Reasons for being in Offline (@QMI_DMS_OPERATING_MODE_OFFLINE) state. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_OFFLINE_REASON_HOST_IMAGE_MISCONFIGURATION = 1 << 0, QMI_DMS_OFFLINE_REASON_PRI_IMAGE_MISCONFIGURATION = 1 << 1, QMI_DMS_OFFLINE_REASON_PRI_VERSION_INCOMPATIBLE = 1 << 2, QMI_DMS_OFFLINE_REASON_DEVICE_MEMORY_FULL = 1 << 3 } QmiDmsOfflineReason; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Time' message */ /** * QmiDmsTimeSource: * @QMI_DMS_TIME_SOURCE_DEVICE: 32 kHz device clock. * @QMI_DMS_TIME_SOURCE_CDMA_NETWORK: CDMA network. * @QMI_DMS_TIME_SOURCE_HDR_NETWORK: HDR network. * * Source of the timestamp. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_TIME_SOURCE_DEVICE = 0, QMI_DMS_TIME_SOURCE_CDMA_NETWORK = 1, QMI_DMS_TIME_SOURCE_HDR_NETWORK = 2, } QmiDmsTimeSource; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Activation State' message */ /** * QmiDmsActivationState: * @QMI_DMS_ACTIVATION_STATE_NOT_ACTIVATED: Service not activated. * @QMI_DMS_ACTIVATION_STATE_ACTIVATED: Service is activated. * @QMI_DMS_ACTIVATION_STATE_CONNECTING: Connection in progress for automatic activation. * @QMI_DMS_ACTIVATION_STATE_CONNECTED: Connection connected for automatic activation. * @QMI_DMS_ACTIVATION_STATE_OTASP_AUTHENTICATED: OTASP security authenticated. * @QMI_DMS_ACTIVATION_STATE_OTASP_NAM: OTASP NAM downloaded. * @QMI_DMS_ACTIVATION_STATE_OTASP_MDN: OTASP MDN downloaded. * @QMI_DMS_ACTIVATION_STATE_OTASP_IMSI: OTASP IMSI downloaded. * @QMI_DMS_ACTIVATION_STATE_OTASP_PRL: OTASP PRL downloaded. * @QMI_DMS_ACTIVATION_STATE_OTASP_SPC: OTASP SPC downloaded. * @QMI_DMS_ACTIVATION_STATE_OTASP_COMMITED: OTASP settings committed. * * State of the service activation. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_ACTIVATION_STATE_NOT_ACTIVATED = 0x00, QMI_DMS_ACTIVATION_STATE_ACTIVATED = 0x01, QMI_DMS_ACTIVATION_STATE_CONNECTING = 0x02, QMI_DMS_ACTIVATION_STATE_CONNECTED = 0x03, QMI_DMS_ACTIVATION_STATE_OTASP_AUTHENTICATED = 0x04, QMI_DMS_ACTIVATION_STATE_OTASP_NAM = 0x05, QMI_DMS_ACTIVATION_STATE_OTASP_MDN = 0x06, QMI_DMS_ACTIVATION_STATE_OTASP_IMSI = 0x07, QMI_DMS_ACTIVATION_STATE_OTASP_PRL = 0x08, QMI_DMS_ACTIVATION_STATE_OTASP_SPC = 0x09, QMI_DMS_ACTIVATION_STATE_OTASP_COMMITED = 0x0A } QmiDmsActivationState; /*****************************************************************************/ /* Helper enums for the 'QMI DMS UIM Get CK Status' message */ /** * QmiDmsUimFacility: * @QMI_DMS_UIM_FACILITY_PN: Network personalization facility. * @QMI_DMS_UIM_FACILITY_PU: Network subset personalization facility. * @QMI_DMS_UIM_FACILITY_PP: Service provider facility. * @QMI_DMS_UIM_FACILITY_PC: Corporate personalization facility. * @QMI_DMS_UIM_FACILITY_PF: UIM personalization facility. * * UIM personalization facilities. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_UIM_FACILITY_PN = 0, QMI_DMS_UIM_FACILITY_PU = 1, QMI_DMS_UIM_FACILITY_PP = 2, QMI_DMS_UIM_FACILITY_PC = 3, QMI_DMS_UIM_FACILITY_PF = 4 } QmiDmsUimFacility; /** * QmiDmsUimFacilityState: * @QMI_DMS_UIM_FACILITY_STATE_DEACTIVATED: Facility is deactivated. * @QMI_DMS_UIM_FACILITY_STATE_ACTIVATED: Facility is activated. * @QMI_DMS_UIM_FACILITY_STATE_BLOCKED: Facility is blocked. * * State of the UIM facility. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_UIM_FACILITY_STATE_DEACTIVATED = 0, QMI_DMS_UIM_FACILITY_STATE_ACTIVATED = 1, QMI_DMS_UIM_FACILITY_STATE_BLOCKED = 2 } QmiDmsUimFacilityState; /*****************************************************************************/ /* Helper enums for the 'QMI DMS UIM Get State' message */ /** * QmiDmsUimState: * @QMI_DMS_UIM_STATE_INITIALIZATION_COMPLETED: UIM initialization completed. * @QMI_DMS_UIM_STATE_LOCKED_OR_FAILED: UIM is locked or failed. * @QMI_DMS_UIM_STATE_NOT_PRESENT: No UIM in the device. * @QMI_DMS_UIM_STATE_RESERVED: Reserved, unknown. * @QMI_DMS_UIM_STATE_UNKNOWN: UIM state currently unavailable. * * State of the UIM. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_UIM_STATE_INITIALIZATION_COMPLETED = 0x00, QMI_DMS_UIM_STATE_LOCKED_OR_FAILED = 0x01, QMI_DMS_UIM_STATE_NOT_PRESENT = 0x02, QMI_DMS_UIM_STATE_RESERVED = 0x03, QMI_DMS_UIM_STATE_UNKNOWN = 0xFF } QmiDmsUimState; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Set Time' message */ /** * QmiDmsTimeReferenceType: * @QMI_DMS_TIME_REFERENCE_TYPE_USER: User time. * * Time reference type. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_TIME_REFERENCE_TYPE_USER = 0 } QmiDmsTimeReferenceType; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Firmware Preference' message */ /** * QmiDmsFirmwareImageType: * @QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM: Modem image. * @QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI: PRI image. * * Type of firmware image. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM = 0, QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI = 1 } QmiDmsFirmwareImageType; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Boot Image Download Mode' message */ /** * QmiDmsBootImageDownloadMode: * @QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_NORMAL: Normal operation. * @QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_BOOT_AND_RECOVERY: Boot and recovery image download mode. * * Specifies the mode for the next boot. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_NORMAL = 0, QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_BOOT_AND_RECOVERY = 1, } QmiDmsBootImageDownloadMode; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get MAC Address' message */ /** * QmiDmsMacType: * @QMI_DMS_MAC_TYPE_WLAN: WLAN MAC address. * @QMI_DMS_MAC_TYPE_BT: Bluetooth MAC address. * * Specifies the device from which the MAC address should be queried. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_DMS_MAC_TYPE_WLAN = 0, QMI_DMS_MAC_TYPE_BT = 1, } QmiDmsMacType; /*****************************************************************************/ /* Helper enums for the 'QMI DMS HP Change Device Mode' message */ /** * QmiDmsHpDeviceMode: * @QMI_DMS_HP_DEVICE_MODE_FASTBOOT: Fastboot download mode. * * HP specific device modes. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_DMS_HP_DEVICE_MODE_FASTBOOT = 5, } QmiDmsHpDeviceMode; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Swi Get USB Composition' message */ /** * QmiDmsSwiUsbComposition: * @QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN: Unknown. * @QMI_DMS_SWI_USB_COMPOSITION_0: HIP, DM, NMEA, AT, MDM1, MDM2, MDM3, MS. * @QMI_DMS_SWI_USB_COMPOSITION_1: HIP, DM, NMEA, AT, MDM1, MS. * @QMI_DMS_SWI_USB_COMPOSITION_2: HIP, DM, NMEA, AT, NIC1, MS. * @QMI_DMS_SWI_USB_COMPOSITION_3: HIP, DM, NMEA, AT, MDM1, NIC1, MS. * @QMI_DMS_SWI_USB_COMPOSITION_4: HIP, DM, NMEA, AT, NIC1, NIC2, NIC3, MS. * @QMI_DMS_SWI_USB_COMPOSITION_5: HIP, DM, NMEA, AT, ECM1, MS. * @QMI_DMS_SWI_USB_COMPOSITION_6: DM, NMEA, AT, QMI. * @QMI_DMS_SWI_USB_COMPOSITION_7: DM, NMEA, AT, RMNET1, RMNET2, RMNET3. * @QMI_DMS_SWI_USB_COMPOSITION_8: DM, NMEA, AT, MBIM. * @QMI_DMS_SWI_USB_COMPOSITION_9: MBIM. * @QMI_DMS_SWI_USB_COMPOSITION_10: NMEA, MBIM. * @QMI_DMS_SWI_USB_COMPOSITION_11: DM, MBIM. * @QMI_DMS_SWI_USB_COMPOSITION_12: DM, NMEA, MBIM. * @QMI_DMS_SWI_USB_COMPOSITION_13: Dual configuration: USB composition 6 and USB composition 8. * @QMI_DMS_SWI_USB_COMPOSITION_14: Dual configuration: USB composition 6 and USB composition 9. * @QMI_DMS_SWI_USB_COMPOSITION_15: Dual configuration: USB composition 6 and USB composition 10. * @QMI_DMS_SWI_USB_COMPOSITION_16: Dual configuration: USB composition 6 and USB composition 11. * @QMI_DMS_SWI_USB_COMPOSITION_17: Dual configuration: USB composition 6 and USB composition 12. * @QMI_DMS_SWI_USB_COMPOSITION_18: Dual configuration: USB composition 7 and USB composition 8. * @QMI_DMS_SWI_USB_COMPOSITION_19: Dual configuration: USB composition 7 and USB composition 9. * @QMI_DMS_SWI_USB_COMPOSITION_20: Dual configuration: USB composition 7 and USB composition 10. * @QMI_DMS_SWI_USB_COMPOSITION_21: Dual configuration: USB composition 7 and USB composition 11. * @QMI_DMS_SWI_USB_COMPOSITION_22: Dual configuration: USB composition 7 and USB composition 12. * * Sierra Wireless USB composition modes. * * Since: 1.20 */ typedef enum { /*< since=1.20 >*/ QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN = -1, QMI_DMS_SWI_USB_COMPOSITION_0 = 0, QMI_DMS_SWI_USB_COMPOSITION_1 = 1, QMI_DMS_SWI_USB_COMPOSITION_2 = 2, QMI_DMS_SWI_USB_COMPOSITION_3 = 3, QMI_DMS_SWI_USB_COMPOSITION_4 = 4, QMI_DMS_SWI_USB_COMPOSITION_5 = 5, QMI_DMS_SWI_USB_COMPOSITION_6 = 6, QMI_DMS_SWI_USB_COMPOSITION_7 = 7, QMI_DMS_SWI_USB_COMPOSITION_8 = 8, QMI_DMS_SWI_USB_COMPOSITION_9 = 9, QMI_DMS_SWI_USB_COMPOSITION_10 = 10, QMI_DMS_SWI_USB_COMPOSITION_11 = 11, QMI_DMS_SWI_USB_COMPOSITION_12 = 12, QMI_DMS_SWI_USB_COMPOSITION_13 = 13, QMI_DMS_SWI_USB_COMPOSITION_14 = 14, QMI_DMS_SWI_USB_COMPOSITION_15 = 15, QMI_DMS_SWI_USB_COMPOSITION_16 = 16, QMI_DMS_SWI_USB_COMPOSITION_17 = 17, QMI_DMS_SWI_USB_COMPOSITION_18 = 18, QMI_DMS_SWI_USB_COMPOSITION_19 = 19, QMI_DMS_SWI_USB_COMPOSITION_20 = 20, QMI_DMS_SWI_USB_COMPOSITION_21 = 21, QMI_DMS_SWI_USB_COMPOSITION_22 = 22, } QmiDmsSwiUsbComposition; /** * qmi_dms_swi_usb_composition_get_description: * @value: a #QmiDmsSwiUsbComposition. * * Gets a text description of the Sierra Wireless USB composition. * * Since: 1.20 * Returns: a string. */ const gchar *qmi_dms_swi_usb_composition_get_description (QmiDmsSwiUsbComposition value); /*****************************************************************************/ /* Helper enums for the 'QMI DMS Foxconn Change Device Mode' message */ /** * QmiDmsFoxconnDeviceMode: * @QMI_DMS_FOXCONN_DEVICE_MODE_UNKNOWN: Unknown mode. * @QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_ONLINE: Fastboot download mode for full partition files. * @QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_OTA: Fastboot download mode for OTA files. * * Foxconn specific device modes. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_DMS_FOXCONN_DEVICE_MODE_UNKNOWN = 0, QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_ONLINE = 0x05, QMI_DMS_FOXCONN_DEVICE_MODE_FASTBOOT_OTA = 0x0A, } QmiDmsFoxconnDeviceMode; /*****************************************************************************/ /* Helper enums for the 'QMI DMS Foxconn Get Firmware Version' message */ /** * QmiDmsFoxconnFirmwareVersionType: * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG: E.g. T77W968.F0.0.0.2.3.GC.004. * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS: E.g. T77W968.F0.0.0.2.3.GC.004.011. * @QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_APPS: E.g. 011. * * Foxconn specific firmware version types. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG = 0x00, QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS = 0x01, QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_APPS = 0x02, } QmiDmsFoxconnFirmwareVersionType; #endif /* _LIBQMI_GLIB_QMI_ENUMS_DMS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-dsd.h000066400000000000000000000105231455567757300214770ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019 Wang Jing * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_DSD_H_ #define _LIBQMI_GLIB_QMI_ENUMS_DSD_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-dsd * @title: DSD enumerations and flags * @short_description: Enumerations and flags in the DSD service. * * This section defines enumerations and flags used in the DSD service * interface. */ /*****************************************************************************/ /** * QmiDsdApnType: * @QMI_DSD_APN_TYPE_DEFAULT: Default/Internet traffic. * @QMI_DSD_APN_TYPE_IMS: IMS. * @QMI_DSD_APN_TYPE_MMS: Multimedia Messaging Service. * @QMI_DSD_APN_TYPE_DUN: Dial Up Network. * @QMI_DSD_APN_TYPE_SUPL: Secure User Plane Location. * @QMI_DSD_APN_TYPE_HIPRI: High Priority Mobile Data. * @QMI_DSD_APN_TYPE_FOTA: over the air administration. * @QMI_DSD_APN_TYPE_CBS: Carrier Branded Services. * @QMI_DSD_APN_TYPE_IA: Initial Attach. * @QMI_DSD_APN_TYPE_EMERGENCY: Emergency. * * APN type. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_DSD_APN_TYPE_DEFAULT = 0, QMI_DSD_APN_TYPE_IMS = 1, QMI_DSD_APN_TYPE_MMS = 2, QMI_DSD_APN_TYPE_DUN = 3, QMI_DSD_APN_TYPE_SUPL = 4, QMI_DSD_APN_TYPE_HIPRI = 5, QMI_DSD_APN_TYPE_FOTA = 6, QMI_DSD_APN_TYPE_CBS = 7, QMI_DSD_APN_TYPE_IA = 8, QMI_DSD_APN_TYPE_EMERGENCY = 9, } QmiDsdApnType; /** * QmiDsdDataSystemNetworkType: * @QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP: 3GPP network type. * @QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP2: 3GPP2 network type. * @QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_WLAN: WLAN network type. * * Network type of the data system. * * Since: 1.32 */ typedef enum { /*< since=1.32 >*/ QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP = 0, QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_3GPP2 = 1, QMI_DSD_DATA_SYSTEM_NETWORK_TYPE_WLAN = 2, } QmiDsdDataSystemNetworkType; /** * QmiDsdRadioAccessTechnology: * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_UNKNOWN: Unknown. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA: WCDMA. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN: GERAN. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE: LTE. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA: TD-SDCMA. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN: 3GPP WLAN. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_5G: 5G. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X: CDMA 1x. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD: CDMA EVDO, HRPD. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD: CDMA EVDO with eHRPD. * @QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN: 3GPP2 WLAN. * * Radio access technology. * * Since: 1.32 */ typedef enum { /*< since=1.32 >*/ QMI_DSD_RADIO_ACCESS_TECHNOLOGY_UNKNOWN = 0, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA = 1, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN = 2, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE = 3, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA = 4, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN = 5, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP_5G = 6, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X = 101, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD = 102, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD = 103, QMI_DSD_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN = 104, } QmiDsdRadioAccessTechnology; #endif /* _LIBQMI_GLIB_QMI_ENUMS_DSD_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-fox.h000066400000000000000000000037321455567757300215250ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2022 Freedom Liu */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_FOX_H_ #define _LIBQMI_GLIB_QMI_ENUMS_FOX_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-fox * @title: FOX enumerations and flags * @short_description: Enumerations and flags in the FOX service. * * This section defines enumerations and flags used in the FOX service * interface. */ /** * QmiFoxFirmwareVersionType: * @QMI_FOX_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG: E.g. T99W265.F0.0.0.0.1.GC.004. * @QMI_FOX_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS: E.g. T99W265.F0.0.0.0.1.GC.004.001. * @QMI_FOX_FIRMWARE_VERSION_TYPE_APPS: E.g. 001. * * Foxconn specific firmware version types. * * Since: 1.32 */ typedef enum { /*< since=1.32 >*/ QMI_FOX_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG = 0x00, QMI_FOX_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS = 0x01, QMI_FOX_FIRMWARE_VERSION_TYPE_APPS = 0x02, } QmiFoxFirmwareVersionType; #endif /* _LIBQMI_GLIB_QMI_ENUMS_FOX_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-gas.h000066400000000000000000000046411455567757300215030ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019 Andreas Kling */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_GAS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_GAS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-gas * @title: GAS enumerations and flags * @short_description: Enumerations and flags in the GAS service. * * This section defines enumerations and flags used in the GAS service * interface. */ /** * QmiGasFirmwareListingMode: * @QMI_GAS_FIRMWARE_LISTING_MODE_ACTIVE_FIRMWARE: List only the active firmware. * @QMI_GAS_FIRMWARE_LISTING_MODE_ALL_FIRMWARE: List all stored firmwares. * @QMI_GAS_FIRMWARE_LISTING_MODE_SPECIFIC_FIRMWARE: List only specific firmware with condition. * * Mode when retrieving a list of stored firmwares. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_GAS_FIRMWARE_LISTING_MODE_ACTIVE_FIRMWARE = 0, QMI_GAS_FIRMWARE_LISTING_MODE_ALL_FIRMWARE = 1, QMI_GAS_FIRMWARE_LISTING_MODE_SPECIFIC_FIRMWARE = 2, } QmiGasFirmwareListingMode; /** * QmiGasUsbCompositionEndpointType: * @QMI_GAS_USB_COMPOSITION_ENDPOINT_TYPE_HSUSB: High-speed USB. * @QMI_GAS_USB_COMPOSITION_ENDPOINT_TYPE_HSIC: High-speed inter-chip interface. * * Peripheral endpoint type. * * Since: 1.32 */ typedef enum { /*< since=1.32 >*/ QMI_GAS_USB_COMPOSITION_ENDPOINT_TYPE_HSUSB = 0, QMI_GAS_USB_COMPOSITION_ENDPOINT_TYPE_HSIC = 1, } QmiGasUsbCompositionEndpointType; #endif /* _LIBQMI_GLIB_QMI_ENUMS_GAS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-imsa.h000066400000000000000000000057231455567757300216640ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2023 Dylan Van Assche */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_IMSA_H_ #define _LIBQMI_GLIB_QMI_ENUMS_IMSA_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-imsa * @title: IMSA enumerations and flags * @short_description: Enumerations and flags in the IMSA service. * * This section defines enumerations and flags used in the IMSA service * interface. */ /** * QmiImsaImsRegistrationStatus: * @QMI_IMSA_IMS_NOT_REGISTERED: no registration for IMS. * @QMI_IMSA_IMS_REGISTERING: IMS is registering. * @QMI_IMSA_IMS_REGISTERED: IMS is fully registered. * @QMI_IMSA_IMS_LIMITED_REGISTERED: IMS is limited registered, expect limited services. * * IMS registration status. * * Since: 1.34 */ typedef enum { /*< since=1.34 >*/ QMI_IMSA_IMS_NOT_REGISTERED = 0x00, QMI_IMSA_IMS_REGISTERING = 0x01, QMI_IMSA_IMS_REGISTERED = 0x02, QMI_IMSA_IMS_LIMITED_REGISTERED = 0x03, } QmiImsaImsRegistrationStatus; /** * QmiImsaServiceStatus: * @QMI_IMSA_SERVICE_UNAVAILABLE: Service unavailable. * @QMI_IMSA_SERVICE_LIMITED: Service limited available. * @QMI_IMSA_SERVICE_AVAILABLE: Service available. * * IMS Application Service availibility status. * * Since: 1.34 */ typedef enum { /*< since=1.34 >*/ QMI_IMSA_SERVICE_UNAVAILABLE = 0x00, QMI_IMSA_SERVICE_LIMITED = 0x01, QMI_IMSA_SERVICE_AVAILABLE = 0x02, } QmiImsaServiceStatus; /** * QmiImsaRegistrationTechnology: * @QMI_IMSA_REGISTERED_WLAN: registered on WLAN interface. * @QMI_IMSA_REGISTERED_WWAN: registered on WWAN interface. * @QMI_IMSA_REGISTERED_INTERWORKING_WLAN: registered on Interworking WLAN interface. * * Network technology on which service is available. * * Since: 1.34 */ typedef enum { /*< since=1.34 >*/ QMI_IMSA_REGISTERED_WLAN = 0x00, QMI_IMSA_REGISTERED_WWAN = 0x01, QMI_IMSA_REGISTERED_INTERWORKING_WLAN = 0x02, } QmiImsaRegistrationTechnology; #endif /* _LIBQMI_GLIB_QMI_ENUMS_IMSA_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-imsp.h000066400000000000000000000041331455567757300216750ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2023 Dylan Van Assche */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_IMSP_H_ #define _LIBQMI_GLIB_QMI_ENUMS_IMSP_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-imsp * @title: IMSP enumerations and flags * @short_description: Enumerations and flags in the IMSP service. * * This section defines enumerations and flags used in the IMSP service * interface. */ /** * QmiImspEnablerState: * @QMI_IMSP_ENABLER_STATE_UNINITIALIZED: IMS is not initialized yet. * @QMI_IMSP_ENABLER_STATE_INITIALIZED: IMS is initialized, but not registered yet with the network IMS service. * @QMI_IMSP_ENABLER_STATE_AIRPLANE: IMS is initialized but device is in airplane mode. * @QMI_IMSP_ENABLER_STATE_REGISTERED: IMS is initialized and registered. * * IMS Presence enabler state. * * Since: 1.34 */ typedef enum { /*< since=1.34 >*/ QMI_IMSP_ENABLER_STATE_UNINITIALIZED = 0x01, QMI_IMSP_ENABLER_STATE_INITIALIZED = 0x02, QMI_IMSP_ENABLER_STATE_AIRPLANE = 0x03, QMI_IMSP_ENABLER_STATE_REGISTERED = 0x04, } QmiImspEnablerState; #endif /* _LIBQMI_GLIB_QMI_ENUMS_IMSP_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-loc.h000066400000000000000000000443511455567757300215100ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_LOC_H_ #define _LIBQMI_GLIB_QMI_ENUMS_LOC_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-loc * @title: LOC enumerations and flags * @short_description: Enumerations and flags in the LOC service. * * This section defines enumerations and flags used in the LOC service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI LOC Start' indication */ /** * QmiLocIntermediateReportState: * @QMI_LOC_INTERMEDIATE_REPORT_STATE_UNKNOWN: Unknown. * @QMI_LOC_INTERMEDIATE_REPORT_STATE_ENABLE: Enable intermediate state reporting. * @QMI_LOC_INTERMEDIATE_REPORT_STATE_DISABLE: Disable intermediate state reporting. * * Whether to enable or disable intermediate state reporting. * * Since: 1.20 */ typedef enum { /*< since=1.20 >*/ QMI_LOC_INTERMEDIATE_REPORT_STATE_UNKNOWN = 0, QMI_LOC_INTERMEDIATE_REPORT_STATE_ENABLE = 1, QMI_LOC_INTERMEDIATE_REPORT_STATE_DISABLE = 2, } QmiLocIntermediateReportState; /** * QmiLocIndicationStatus: * @QMI_LOC_INDICATION_STATUS_SUCCESS: Success. * @QMI_LOC_INDICATION_STATUS_GENERAL_FAILURE: General Failure. * @QMI_LOC_INDICATION_STATUS_UNSUPPORTED: Unsupported. * @QMI_LOC_INDICATION_STATUS_INVALID_PARAMETER: Invalid Parameter. * @QMI_LOC_INDICATION_STATUS_ENGINE_BUSY: Engine is busy. * @QMI_LOC_INDICATION_STATUS_PHONE_OFFLINE: Phone is offline. * @QMI_LOC_INDICATION_STATUS_TIMEOUT: Timeout. * * General result of a received indication. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_INDICATION_STATUS_SUCCESS = 0, QMI_LOC_INDICATION_STATUS_GENERAL_FAILURE = 1, QMI_LOC_INDICATION_STATUS_UNSUPPORTED = 2, QMI_LOC_INDICATION_STATUS_INVALID_PARAMETER = 3, QMI_LOC_INDICATION_STATUS_ENGINE_BUSY = 4, QMI_LOC_INDICATION_STATUS_PHONE_OFFLINE = 5, QMI_LOC_INDICATION_STATUS_TIMEOUT = 6, } QmiLocIndicationStatus; /** * QmiLocSessionStatus: * @QMI_LOC_SESSION_STATUS_SUCCESS: Success * @QMI_LOC_SESSION_STATUS_IN_PROGRESS: Operation in Progress. * @QMI_LOC_SESSION_STATUS_GENERAL_FAILURE: General Failure. * @QMI_LOC_SESSION_STATUS_TIMEOUT: Timeout. * @QMI_LOC_SESSION_STATUS_USER_ENDED: User ended. * @QMI_LOC_SESSION_STATUS_BAD_PARAMETER: Bad Parameter. * @QMI_LOC_SESSION_STATUS_PHONE_OFFLINE: Phone is offline. * @QMI_LOC_SESSION_STATUS_ENGINE_LOCKED: Engine is locked. * * Status of a received session indication. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_SESSION_STATUS_SUCCESS = 0, QMI_LOC_SESSION_STATUS_IN_PROGRESS = 1, QMI_LOC_SESSION_STATUS_GENERAL_FAILURE = 2, QMI_LOC_SESSION_STATUS_TIMEOUT = 3, QMI_LOC_SESSION_STATUS_USER_ENDED = 4, QMI_LOC_SESSION_STATUS_BAD_PARAMETER = 5, QMI_LOC_SESSION_STATUS_PHONE_OFFLINE = 6, QMI_LOC_SESSION_STATUS_ENGINE_LOCKED = 6, } QmiLocSessionStatus; /** * QmiLocFixRecurrenceType: * @QMI_LOC_FIX_RECURRENCE_TYPE_REQUEST_PERIODIC_FIXES: Periodic fixes. * @QMI_LOC_FIX_RECURRENCE_TYPE_REQUEST_SINGLE_FIX: Single fix. * * Whether to request a single or periodic fixes. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_FIX_RECURRENCE_TYPE_REQUEST_PERIODIC_FIXES = 1, QMI_LOC_FIX_RECURRENCE_TYPE_REQUEST_SINGLE_FIX = 2, } QmiLocFixRecurrenceType; /** * QmiLocOperationMode: * @QMI_LOC_OPERATION_MODE_DEFAULT: Default. * @QMI_LOC_OPERATION_MODE_MSB: Mobile Station Based (MSB) A-GPS. * @QMI_LOC_OPERATION_MODE_MSA: Mobile Station Assisted (MSA) A-GPS. * @QMI_LOC_OPERATION_MODE_STANDALONE: Standalone. * @QMI_LOC_OPERATION_MODE_CELLID: Cell ID. * @QMI_LOC_OPERATION_MODE_WWAN: WWAN. * * Which operation mode to use. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_OPERATION_MODE_DEFAULT = 1, QMI_LOC_OPERATION_MODE_MSB = 2, QMI_LOC_OPERATION_MODE_MSA = 3, QMI_LOC_OPERATION_MODE_STANDALONE = 4, QMI_LOC_OPERATION_MODE_CELLID = 5, QMI_LOC_OPERATION_MODE_WWAN = 6, } QmiLocOperationMode; /** * QmiLocEngineState: * @QMI_LOC_ENGINE_STATE_ON: On. * @QMI_LOC_ENGINE_STATE_OFF: Off. * * State of the engine. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_ENGINE_STATE_ON = 1, QMI_LOC_ENGINE_STATE_OFF = 2, } QmiLocEngineState; /** * QmiLocTechnologyUsed: * @QMI_LOC_TECHNOLOGY_USED_SATELLITE: Satellite. * @QMI_LOC_TECHNOLOGY_USED_CELLULAR: Cellular. * @QMI_LOC_TECHNOLOGY_USED_WIFI: Wifi. * @QMI_LOC_TECHNOLOGY_USED_SENSORS: Sensors. * @QMI_LOC_TECHNOLOGY_USED_REFERENCE_LOCATION: Reference Location. * @QMI_LOC_TECHNOLOGY_USED_INJECTED_POSITION: Injected Position. * @QMI_LOC_TECHNOLOGY_USED_AFLT: AFLT (Advanced Forward Link Trilateration). * @QMI_LOC_TECHNOLOGY_USED_HYBRID: Hybrid. * * Which technology has been used. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_TECHNOLOGY_USED_SATELLITE = 1 << 0, QMI_LOC_TECHNOLOGY_USED_CELLULAR = 1 << 1, QMI_LOC_TECHNOLOGY_USED_WIFI = 1 << 2, QMI_LOC_TECHNOLOGY_USED_SENSORS = 1 << 3, QMI_LOC_TECHNOLOGY_USED_REFERENCE_LOCATION = 1 << 4, QMI_LOC_TECHNOLOGY_USED_INJECTED_POSITION = 1 << 5, QMI_LOC_TECHNOLOGY_USED_AFLT = 1 << 6, QMI_LOC_TECHNOLOGY_USED_HYBRID = 1 << 7, } QmiLocTechnologyUsed; /** * QmiLocReliability: * @QMI_LOC_RELIABILITY_NOT_SET: Not set. * @QMI_LOC_RELIABILITY_VERY_LOW: Very low. * @QMI_LOC_RELIABILITY_LOW: Low. * @QMI_LOC_RELIABILITY_MEDIUM: Medium. * @QMI_LOC_RELIABILITY_HIGH: High. * * Reliability of the provided information. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_RELIABILITY_NOT_SET = 0, QMI_LOC_RELIABILITY_VERY_LOW = 1, QMI_LOC_RELIABILITY_LOW = 2, QMI_LOC_RELIABILITY_MEDIUM = 3, QMI_LOC_RELIABILITY_HIGH = 4, } QmiLocReliability; /** * QmiLocTimeSource: * @QMI_LOC_TIME_SOURCE_INVALID: Invalid. * @QMI_LOC_TIME_SOURCE_NETWORK_TIME_TRANSFER: Time is set by the 1X system. * @QMI_LOC_TIME_SOURCE_NETWORK_TIME_TAGGING: Time is set by WCDMA/GSM time tagging. * @QMI_LOC_TIME_SOURCE_EXTERNAL_INPUT: Time set by external injection. * @QMI_LOC_TIME_SOURCE_TOW_DECODE: Time is set after decoding over-the-air GPS navigation data from one GPS satellite. * @QMI_LOC_TIME_SOURCE_TOW_CONFIRMED: Time is set after decoding over-the-air GPS navigation data from multiple satellites. * @QMI_LOC_TIME_SOURCE_TOW_AND_WEEK_CONFIRMED: Both time of the week and GPS week number are known. * @QMI_LOC_TIME_SOURCE_NAVIGATION_SOLUTION: Time is set by the position engine after the fix is obtained. * @QMI_LOC_TIME_SOURCE_SOLVE_FOR_TIME: Time is set by the position engine after performing SFT. * @QMI_LOC_TIME_SOURCE_GLO_TOW_DECODE: Time is set after decoding QZSS satellites. * @QMI_LOC_TIME_SOURCE_TIME_TRANSFORM: Time is set after transforming the GPS to GLO time. * @QMI_LOC_TIME_SOURCE_WCDMA_SLEEP_TIME_TAG: Time is set by the sleep time tag provided by the WCDMA network. * @QMI_LOC_TIME_SOURCE_GSM_SLEEP_TIME_TAG: Time is set by the sleep time tag provided by the GSM network. * @QMI_LOC_TIME_SOURCE_UNKNOWN: Unknown. * @QMI_LOC_TIME_SOURCE_SYSTEM_TIMETICK: Time is derived from the system clock. * @QMI_LOC_TIME_SOURCE_QZSS_TOW_DECODE: Time set after decoding QZSS satellites. * @QMI_LOC_TIME_SOURCE_BDS_TOW_DECODE: Time set after decoding BDS satellites. * * Source of the used time. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_TIME_SOURCE_INVALID = 0, QMI_LOC_TIME_SOURCE_NETWORK_TIME_TRANSFER = 1, QMI_LOC_TIME_SOURCE_NETWORK_TIME_TAGGING = 2, QMI_LOC_TIME_SOURCE_EXTERNAL_INPUT = 3, QMI_LOC_TIME_SOURCE_TOW_DECODE = 4, QMI_LOC_TIME_SOURCE_TOW_CONFIRMED = 5, QMI_LOC_TIME_SOURCE_TOW_AND_WEEK_CONFIRMED = 6, QMI_LOC_TIME_SOURCE_NAVIGATION_SOLUTION = 7, QMI_LOC_TIME_SOURCE_SOLVE_FOR_TIME = 8, QMI_LOC_TIME_SOURCE_GLO_TOW_DECODE = 9, QMI_LOC_TIME_SOURCE_TIME_TRANSFORM = 10, QMI_LOC_TIME_SOURCE_WCDMA_SLEEP_TIME_TAG = 11, QMI_LOC_TIME_SOURCE_GSM_SLEEP_TIME_TAG = 12, QMI_LOC_TIME_SOURCE_UNKNOWN = 13, QMI_LOC_TIME_SOURCE_SYSTEM_TIMETICK = 14, QMI_LOC_TIME_SOURCE_QZSS_TOW_DECODE = 15, QMI_LOC_TIME_SOURCE_BDS_TOW_DECODE = 16, } QmiLocTimeSource; /** * QmiLocSatelliteValidInformation: * @QMI_LOC_SATELLITE_VALID_INFORMATION_SYSTEM: System, * @QMI_LOC_SATELLITE_VALID_INFORMATION_GNSS_SATELLITE_ID: GNSS Satellite ID. * @QMI_LOC_SATELLITE_VALID_INFORMATION_HEALTH_STATUS: Health status. * @QMI_LOC_SATELLITE_VALID_INFORMATION_PROCESS_STATUS: Process status. * @QMI_LOC_SATELLITE_VALID_INFORMATION_SATELLITE_INFO_MASK: Satellite info mask. * @QMI_LOC_SATELLITE_VALID_INFORMATION_ELEVATION: Elevation. * @QMI_LOC_SATELLITE_VALID_INFORMATION_AZIMUTH: Azimuth. * @QMI_LOC_SATELLITE_VALID_INFORMATION_SIGNAL_TO_NOISE_RATIO: Signal to noise ratio. * * Which information about the satellite is valid. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_SATELLITE_VALID_INFORMATION_SYSTEM = 1 << 0, QMI_LOC_SATELLITE_VALID_INFORMATION_GNSS_SATELLITE_ID = 1 << 1, QMI_LOC_SATELLITE_VALID_INFORMATION_HEALTH_STATUS = 1 << 2, QMI_LOC_SATELLITE_VALID_INFORMATION_PROCESS_STATUS = 1 << 3, QMI_LOC_SATELLITE_VALID_INFORMATION_SATELLITE_INFO_MASK = 1 << 4, QMI_LOC_SATELLITE_VALID_INFORMATION_ELEVATION = 1 << 5, QMI_LOC_SATELLITE_VALID_INFORMATION_AZIMUTH = 1 << 6, QMI_LOC_SATELLITE_VALID_INFORMATION_SIGNAL_TO_NOISE_RATIO = 1 << 7, } QmiLocSatelliteValidInformation; /** * QmiLocSystem: * @QMI_LOC_SYSTEM_GPS: GPS. * @QMI_LOC_SYSTEM_GALILEO: Galileo. * @QMI_LOC_SYSTEM_SBAS: SBAS. * @QMI_LOC_SYSTEM_COMPASS: COMPASS (BeiDou). * @QMI_LOC_SYSTEM_GLONASS: GLONASS. * * Which location system a satellite is part of. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_SYSTEM_GPS = 1, QMI_LOC_SYSTEM_GALILEO = 2, QMI_LOC_SYSTEM_SBAS = 3, QMI_LOC_SYSTEM_COMPASS = 4, QMI_LOC_SYSTEM_GLONASS = 5, } QmiLocSystem; /** * QmiLocHealthStatus: * @QMI_LOC_HEALTH_STATUS_UNHEALTHY: Unhealthy. * @QMI_LOC_HEALTH_STATUS_HEALTHY: Healthy. * * Whether a satellite is healthy or unhealthy. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_HEALTH_STATUS_UNHEALTHY = 0, QMI_LOC_HEALTH_STATUS_HEALTHY = 1, } QmiLocHealthStatus; /** * QmiLocNavigationData: * @QMI_LOC_NAVIGATION_DATA_HAS_EPHEMERIS: Has ephemeris. * @QMI_LOC_NAVIGATION_DATA_HAS_ALMANAC: Has almanac. * * Whether the ephemeris or almanac exist for a satellite. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_NAVIGATION_DATA_HAS_EPHEMERIS = 0, QMI_LOC_NAVIGATION_DATA_HAS_ALMANAC = 1, } QmiLocNavigationData; /** * QmiLocSatelliteStatus: * @QMI_LOC_SATELLITE_STATUS_IDLE: Idle. * @QMI_LOC_SATELLITE_STATUS_SEARCHING: Searching. * @QMI_LOC_SATELLITE_STATUS_TRACKING: Tracking. * * Whether the engine searches or tracks a satellite. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_SATELLITE_STATUS_IDLE = 0, QMI_LOC_SATELLITE_STATUS_SEARCHING = 1, QMI_LOC_SATELLITE_STATUS_TRACKING = 2, } QmiLocSatelliteStatus; /** * QmiLocServerType: * @QMI_LOC_SERVER_TYPE_UNKNOWN: Unknown. * @QMI_LOC_SERVER_TYPE_CDMA_PDE: CDMA Position Determining System. * @QMI_LOC_SERVER_TYPE_CDMA_MPC: CDMA Mobile Positioning Center. * @QMI_LOC_SERVER_TYPE_UMTS_SLP: SUPL Location Platform. * @QMI_LOC_SERVER_TYPE_CUSTOM_PDE: Custom position determining system. * * Server type for Assisted-GPS. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_SERVER_TYPE_UNKNOWN = 0, QMI_LOC_SERVER_TYPE_CDMA_PDE = 1, QMI_LOC_SERVER_TYPE_CDMA_MPC = 2, QMI_LOC_SERVER_TYPE_UMTS_SLP = 3, QMI_LOC_SERVER_TYPE_CUSTOM_PDE = 4, } QmiLocServerType; /** * QmiLocServerAddressType: * @QMI_LOC_SERVER_ADDRESS_TYPE_NONE: None. * @QMI_LOC_SERVER_ADDRESS_TYPE_IPV4: IPv4 server address. * @QMI_LOC_SERVER_ADDRESS_TYPE_IPV6: IPv6 server address. * @QMI_LOC_SERVER_ADDRESS_TYPE_URL: URL server address. * * Type of server address for Assisted-GPS. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_SERVER_ADDRESS_TYPE_NONE = 0, QMI_LOC_SERVER_ADDRESS_TYPE_IPV4 = 1 << 0, QMI_LOC_SERVER_ADDRESS_TYPE_IPV6 = 1 << 1, QMI_LOC_SERVER_ADDRESS_TYPE_URL = 1 << 2, } QmiLocServerAddressType; /** * QmiLocPredictedOrbitsDataFormat: * @QMI_LOC_PREDICTED_ORBITS_DATA_FORMAT_XTRA: Qualcomm XTRA database. * * Type of predicted orbits data. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_PREDICTED_ORBITS_DATA_FORMAT_XTRA = 0 } QmiLocPredictedOrbitsDataFormat; /** * QmiLocDeleteSvInfo: * @QMI_LOC_DELETE_SV_INFO_EPHEMERIS: Ephemeris. * @QMI_LOC_DELETE_SV_INFO_ALMANAC: Almanac. * * Type of data to delete for a given satellite. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_DELETE_SV_INFO_EPHEMERIS = 1 << 0, QMI_LOC_DELETE_SV_INFO_ALMANAC = 1 << 1, } QmiLocDeleteSvInfo; /** * QmiLocDeleteCellDatabase: * @QMI_LOC_DELETE_CELL_DATABASE_POS: Position. * @QMI_LOC_DELETE_CELL_DATABASE_LATEST_GPS_POS: Latest GPS position. * @QMI_LOC_DELETE_CELL_DATABASE_OTA_POS: OTA position. * @QMI_LOC_DELETE_CELL_DATABASE_EXT_REF_POS: External reference position. * @QMI_LOC_DELETE_CELL_DATABASE_TIMETAG: Timetag. * @QMI_LOC_DELETE_CELL_DATABASE_CELLID: Cell ID. * @QMI_LOC_DELETE_CELL_DATABASE_CACHED_CELLID: Cached cell ID. * @QMI_LOC_DELETE_CELL_DATABASE_LAST_SRV_CELL: Last serving cell. * @QMI_LOC_DELETE_CELL_DATABASE_CUR_SRV_CELL: Current servince cell. * @QMI_LOC_DELETE_CELL_DATABASE_NEIGHBOR_INFO: Neighboring cell info. * * Type of data to delete from the cell database. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_DELETE_CELL_DATABASE_POS = 1 << 0, QMI_LOC_DELETE_CELL_DATABASE_LATEST_GPS_POS = 1 << 1, QMI_LOC_DELETE_CELL_DATABASE_OTA_POS = 1 << 2, QMI_LOC_DELETE_CELL_DATABASE_EXT_REF_POS = 1 << 3, QMI_LOC_DELETE_CELL_DATABASE_TIMETAG = 1 << 4, QMI_LOC_DELETE_CELL_DATABASE_CELLID = 1 << 5, QMI_LOC_DELETE_CELL_DATABASE_CACHED_CELLID = 1 << 6, QMI_LOC_DELETE_CELL_DATABASE_LAST_SRV_CELL = 1 << 7, QMI_LOC_DELETE_CELL_DATABASE_CUR_SRV_CELL = 1 << 8, QMI_LOC_DELETE_CELL_DATABASE_NEIGHBOR_INFO = 1 << 9, } QmiLocDeleteCellDatabase; /** * QmiLocDeleteClockInfo: * @QMI_LOC_DELETE_CLOCK_INFO_TIME_EST: Time estimation. * @QMI_LOC_DELETE_CLOCK_INFO_FREQ_EST: Frequency estimation. * @QMI_LOC_DELETE_CLOCK_INFO_WEEK_NUMBER: Week number. * @QMI_LOC_DELETE_CLOCK_INFO_RTC_TIME: RTC time. * @QMI_LOC_DELETE_CLOCK_INFO_TIME_TRANSFER: Time transfer. * @QMI_LOC_DELETE_CLOCK_INFO_GPS_TIME_EST: GPS time estimation. * @QMI_LOC_DELETE_CLOCK_INFO_GLO_TIME_EST: GLONASS time estimation. * @QMI_LOC_DELETE_CLOCK_INFO_GLO_DAY_NUMBER: GLONASS day number. * @QMI_LOC_DELETE_CLOCK_INFO_GLO_YEAR_NUMBER: GLONASS year number. * @QMI_LOC_DELETE_CLOCK_INFO_GLO_RF_GRP_DELAY: GLONASS RF group delay. * @QMI_LOC_DELETE_CLOCK_INFO_DISABLE_TT: Disable TT. * * Type of data to delete from the clock information. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_DELETE_CLOCK_INFO_TIME_EST = 1 << 0, QMI_LOC_DELETE_CLOCK_INFO_FREQ_EST = 1 << 1, QMI_LOC_DELETE_CLOCK_INFO_WEEK_NUMBER = 1 << 2, QMI_LOC_DELETE_CLOCK_INFO_RTC_TIME = 1 << 3, QMI_LOC_DELETE_CLOCK_INFO_TIME_TRANSFER = 1 << 4, QMI_LOC_DELETE_CLOCK_INFO_GPS_TIME_EST = 1 << 5, QMI_LOC_DELETE_CLOCK_INFO_GLO_TIME_EST = 1 << 6, QMI_LOC_DELETE_CLOCK_INFO_GLO_DAY_NUMBER = 1 << 7, QMI_LOC_DELETE_CLOCK_INFO_GLO_YEAR_NUMBER = 1 << 8, QMI_LOC_DELETE_CLOCK_INFO_GLO_RF_GRP_DELAY = 1 << 9, QMI_LOC_DELETE_CLOCK_INFO_DISABLE_TT = 1 << 10, } QmiLocDeleteClockInfo; /** * QmiLocNmeaType: * @QMI_LOC_NMEA_TYPE_GGA: Enable GGA traces. * @QMI_LOC_NMEA_TYPE_RMC: Enable RMC traces. * @QMI_LOC_NMEA_TYPE_GSV: Enable GSV traces. * @QMI_LOC_NMEA_TYPE_GSA: Enable GSA traces. * @QMI_LOC_NMEA_TYPE_VTG: Enable VTG traces. * @QMI_LOC_NMEA_TYPE_PQXFI: Enable PQXFI traces. * @QMI_LOC_NMEA_TYPE_PSTIS: Enable PSTIS traces. * @QMI_LOC_NMEA_TYPE_ALL: Enable all supported trace types. * * NMEA trace types that may be enabled in the GNSS engine. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_LOC_NMEA_TYPE_GGA = 1 << 0, QMI_LOC_NMEA_TYPE_RMC = 1 << 1, QMI_LOC_NMEA_TYPE_GSV = 1 << 2, QMI_LOC_NMEA_TYPE_GSA = 1 << 3, QMI_LOC_NMEA_TYPE_VTG = 1 << 4, QMI_LOC_NMEA_TYPE_PQXFI = 1 << 5, QMI_LOC_NMEA_TYPE_PSTIS = 1 << 6, QMI_LOC_NMEA_TYPE_ALL = 0x0000FFFF, } QmiLocNmeaType; /** * QmiLocLockType: * @QMI_LOC_LOCK_TYPE_NONE: Do not lock any position sessions. * @QMI_LOC_LOCK_TYPE_MI: Lock mobile-initiated position sessions. * @QMI_LOC_LOCK_TYPE_MT: Lock mobile-terminated position sessions. * @QMI_LOC_LOCK_TYPE_ALL: Lock all position sessions. * * Location engine lock type. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_LOC_LOCK_TYPE_NONE = 1, QMI_LOC_LOCK_TYPE_MI = 2, QMI_LOC_LOCK_TYPE_MT = 3, QMI_LOC_LOCK_TYPE_ALL = 4, } QmiLocLockType; #endif /* _LIBQMI_GLIB_QMI_ENUMS_LOC_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-nas.c000066400000000000000000000045441455567757300215070ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2020 Aleksander Morgado */ #include #include "qmi-enums-nas.h" #include "qmi-helpers.h" gchar * qmi_nas_read_string_from_plmn_encoded_array (QmiNasPlmnEncodingScheme encoding, const GArray *array) { switch (encoding) { case QMI_NAS_PLMN_ENCODING_SCHEME_GSM: return qmi_helpers_string_utf8_from_gsm7 ((const guint8 *)array->data, array->len); case QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE: return qmi_helpers_string_utf8_from_ucs2le ((const guint8 *)array->data, array->len); default: return NULL; } } gchar * qmi_nas_read_string_from_network_description_encoded_array (QmiNasNetworkDescriptionEncoding encoding, const GArray *array) { switch (encoding) { case QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED: case QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7: return (g_utf8_validate ((const gchar *)array->data, array->len, NULL) ? g_strndup ((const gchar *)array->data, array->len) : NULL); case QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM: return qmi_helpers_string_utf8_from_gsm7 ((const guint8 *)array->data, array->len); case QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE: return qmi_helpers_string_utf8_from_ucs2le ((const guint8 *)array->data, array->len); default: return NULL; } } libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-nas.h000066400000000000000000002177311455567757300215200ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-nas * @title: NAS enumerations and flags * @short_description: Enumerations and flags in the NAS service. * * This section defines enumerations and flags used in the NAS service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI NAS Event Report' indication */ /** * QmiNasRadioInterface: * @QMI_NAS_RADIO_INTERFACE_UNKNOWN: Not known or not needed. * @QMI_NAS_RADIO_INTERFACE_NONE: None, no service. * @QMI_NAS_RADIO_INTERFACE_CDMA_1X: CDMA2000 1X. * @QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO: CDMA2000 HRPD (1xEV-DO). * @QMI_NAS_RADIO_INTERFACE_AMPS: AMPS. * @QMI_NAS_RADIO_INTERFACE_GSM: GSM. * @QMI_NAS_RADIO_INTERFACE_UMTS: UMTS. * @QMI_NAS_RADIO_INTERFACE_LTE: LTE. * @QMI_NAS_RADIO_INTERFACE_TD_SCDMA: TD-SCDMA. * @QMI_NAS_RADIO_INTERFACE_5GNR: 5G NR. Since 1.26. * * Radio interface technology. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_RADIO_INTERFACE_UNKNOWN = -1, QMI_NAS_RADIO_INTERFACE_NONE = 0x00, QMI_NAS_RADIO_INTERFACE_CDMA_1X = 0x01, QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO = 0x02, QMI_NAS_RADIO_INTERFACE_AMPS = 0x03, QMI_NAS_RADIO_INTERFACE_GSM = 0x04, QMI_NAS_RADIO_INTERFACE_UMTS = 0x05, QMI_NAS_RADIO_INTERFACE_LTE = 0x08, QMI_NAS_RADIO_INTERFACE_TD_SCDMA = 0x09, QMI_NAS_RADIO_INTERFACE_5GNR = 0x0C, } QmiNasRadioInterface; /** * QmiNasActiveBand: * @QMI_NAS_ACTIVE_BAND_BC_0: Band class 0. * @QMI_NAS_ACTIVE_BAND_BC_1: Band class 1. * @QMI_NAS_ACTIVE_BAND_BC_2: Band class 2. * @QMI_NAS_ACTIVE_BAND_BC_3: Band class 3. * @QMI_NAS_ACTIVE_BAND_BC_4: Band class 4. * @QMI_NAS_ACTIVE_BAND_BC_5: Band class 5. * @QMI_NAS_ACTIVE_BAND_BC_6: Band class 6. * @QMI_NAS_ACTIVE_BAND_BC_7: Band class 7. * @QMI_NAS_ACTIVE_BAND_BC_8: Band class 8. * @QMI_NAS_ACTIVE_BAND_BC_9: Band class 9. * @QMI_NAS_ACTIVE_BAND_BC_10: Band class 10. * @QMI_NAS_ACTIVE_BAND_BC_11: Band class 11. * @QMI_NAS_ACTIVE_BAND_BC_12: Band class 12. * @QMI_NAS_ACTIVE_BAND_BC_13: Band class 13. * @QMI_NAS_ACTIVE_BAND_BC_14: Band class 14. * @QMI_NAS_ACTIVE_BAND_BC_15: Band class 15. * @QMI_NAS_ACTIVE_BAND_BC_16: Band class 16. * @QMI_NAS_ACTIVE_BAND_BC_17: Band class 17. * @QMI_NAS_ACTIVE_BAND_BC_18: Band class 18. * @QMI_NAS_ACTIVE_BAND_BC_19: Band class 19. * @QMI_NAS_ACTIVE_BAND_GSM_450: GSM 450. * @QMI_NAS_ACTIVE_BAND_GSM_480: GSM 480. * @QMI_NAS_ACTIVE_BAND_GSM_750: GSM 750. * @QMI_NAS_ACTIVE_BAND_GSM_850: GSM 850. * @QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED: GSM 900 (Extended). * @QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY: GSM 900 (Primary). * @QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS: GSM 900 (Railways). * @QMI_NAS_ACTIVE_BAND_GSM_DCS_1800: GSM 1800. * @QMI_NAS_ACTIVE_BAND_GSM_PCS_1900: GSM 1900. * @QMI_NAS_ACTIVE_BAND_WCDMA_2100: WCDMA 2100. * @QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900: WCDMA PCS 1900. * @QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800: WCDMA DCS 1800. * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_US: WCDMA 1700 (U.S.). * @QMI_NAS_ACTIVE_BAND_WCDMA_850: WCDMA 850. * @QMI_NAS_ACTIVE_BAND_WCDMA_800: WCDMA 800. * @QMI_NAS_ACTIVE_BAND_WCDMA_2600: WCDMA 2600. * @QMI_NAS_ACTIVE_BAND_WCDMA_900: WCDMA 900. * @QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN: WCDMA 1700 (Japan). * @QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN: WCDMA 1500 (Japan). * @QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN: WCDMA 850 (Japan). * @QMI_NAS_ACTIVE_BAND_EUTRAN_1: EUTRAN band 1. * @QMI_NAS_ACTIVE_BAND_EUTRAN_2: EUTRAN band 2. * @QMI_NAS_ACTIVE_BAND_EUTRAN_3: EUTRAN band 3. * @QMI_NAS_ACTIVE_BAND_EUTRAN_4: EUTRAN band 4. * @QMI_NAS_ACTIVE_BAND_EUTRAN_5: EUTRAN band 5. * @QMI_NAS_ACTIVE_BAND_EUTRAN_6: EUTRAN band 6. * @QMI_NAS_ACTIVE_BAND_EUTRAN_7: EUTRAN band 7. * @QMI_NAS_ACTIVE_BAND_EUTRAN_8: EUTRAN band 8. * @QMI_NAS_ACTIVE_BAND_EUTRAN_9: EUTRAN band 9. * @QMI_NAS_ACTIVE_BAND_EUTRAN_10: EUTRAN band 10. * @QMI_NAS_ACTIVE_BAND_EUTRAN_11: EUTRAN band 11. * @QMI_NAS_ACTIVE_BAND_EUTRAN_12: EUTRAN band 12. * @QMI_NAS_ACTIVE_BAND_EUTRAN_13: EUTRAN band 13. * @QMI_NAS_ACTIVE_BAND_EUTRAN_14: EUTRAN band 14. * @QMI_NAS_ACTIVE_BAND_EUTRAN_17: EUTRAN band 17. * @QMI_NAS_ACTIVE_BAND_EUTRAN_18: EUTRAN band 18. * @QMI_NAS_ACTIVE_BAND_EUTRAN_19: EUTRAN band 19. * @QMI_NAS_ACTIVE_BAND_EUTRAN_20: EUTRAN band 20. * @QMI_NAS_ACTIVE_BAND_EUTRAN_21: EUTRAN band 21. * @QMI_NAS_ACTIVE_BAND_EUTRAN_23: EUTRAN band 23. * @QMI_NAS_ACTIVE_BAND_EUTRAN_24: EUTRAN band 24. * @QMI_NAS_ACTIVE_BAND_EUTRAN_25: EUTRAN band 25. * @QMI_NAS_ACTIVE_BAND_EUTRAN_26: EUTRAN band 26. * @QMI_NAS_ACTIVE_BAND_EUTRAN_27: EUTRAN band 27. * @QMI_NAS_ACTIVE_BAND_EUTRAN_28: EUTRAN band 28. * @QMI_NAS_ACTIVE_BAND_EUTRAN_29: EUTRAN band 29. * @QMI_NAS_ACTIVE_BAND_EUTRAN_30: EUTRAN band 30. * @QMI_NAS_ACTIVE_BAND_EUTRAN_31: EUTRAN band 31. * @QMI_NAS_ACTIVE_BAND_EUTRAN_32: EUTRAN band 32. * @QMI_NAS_ACTIVE_BAND_EUTRAN_33: EUTRAN band 33. * @QMI_NAS_ACTIVE_BAND_EUTRAN_34: EUTRAN band 34. * @QMI_NAS_ACTIVE_BAND_EUTRAN_35: EUTRAN band 35. * @QMI_NAS_ACTIVE_BAND_EUTRAN_36: EUTRAN band 36. * @QMI_NAS_ACTIVE_BAND_EUTRAN_37: EUTRAN band 37. * @QMI_NAS_ACTIVE_BAND_EUTRAN_38: EUTRAN band 38. * @QMI_NAS_ACTIVE_BAND_EUTRAN_39: EUTRAN band 39. * @QMI_NAS_ACTIVE_BAND_EUTRAN_40: EUTRAN band 40. * @QMI_NAS_ACTIVE_BAND_EUTRAN_41: EUTRAN band 41. * @QMI_NAS_ACTIVE_BAND_EUTRAN_42: EUTRAN band 42. * @QMI_NAS_ACTIVE_BAND_EUTRAN_43: EUTRAN band 43. * @QMI_NAS_ACTIVE_BAND_EUTRAN_46: EUTRAN band 46. * @QMI_NAS_ACTIVE_BAND_EUTRAN_47: EUTRAN band 47. * @QMI_NAS_ACTIVE_BAND_EUTRAN_48: EUTRAN band 48. * @QMI_NAS_ACTIVE_BAND_EUTRAN_66: EUTRAN band 66. * @QMI_NAS_ACTIVE_BAND_EUTRAN_71: EUTRAN band 71. * @QMI_NAS_ACTIVE_BAND_EUTRAN_125: EUTRAN band 125. * @QMI_NAS_ACTIVE_BAND_EUTRAN_126: EUTRAN band 126. * @QMI_NAS_ACTIVE_BAND_EUTRAN_127: EUTRAN band 127. * @QMI_NAS_ACTIVE_BAND_EUTRAN_250: EUTRAN band 250. * @QMI_NAS_ACTIVE_BAND_TDSCDMA_A: TD-SCDMA Band A. * @QMI_NAS_ACTIVE_BAND_TDSCDMA_B: TD-SCDMA Band B. * @QMI_NAS_ACTIVE_BAND_TDSCDMA_C: TD-SCDMA Band C. * @QMI_NAS_ACTIVE_BAND_TDSCDMA_D: TD-SCDMA Band D. * @QMI_NAS_ACTIVE_BAND_TDSCDMA_E: TD-SCDMA Band E. * @QMI_NAS_ACTIVE_BAND_TDSCDMA_F: TD-SCDMA Band F. * @QMI_NAS_ACTIVE_BAND_NR5G_1: NR5G Band 1. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_2: NR5G Band 2. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_3: NR5G Band 3. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_5: NR5G Band 5. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_7: NR5G Band 7. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_8: NR5G Band 8. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_12: NR5G Band 12. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_13: NR5G Band 13. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_14: NR5G Band 14. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_18: NR5G Band 18. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_20: NR5G Band 20. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_25: NR5G Band 25. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_26: NR5G Band 26. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_28: NR5G Band 28. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_29: NR5G Band 29. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_30: NR5G Band 30. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_34: NR5G Band 34. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_38: NR5G Band 38. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_39: NR5G Band 39. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_40: NR5G Band 40. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_41: NR5G Band 41. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_48: NR5G Band 48. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_50: NR5G Band 50. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_51: NR5G Band 51. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_53: NR5G Band 53. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_65: NR5G Band 65. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_66: NR5G Band 66. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_70: NR5G Band 70. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_71: NR5G Band 71. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_74: NR5G Band 74. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_75: NR5G Band 75. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_76: NR5G Band 76. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_77: NR5G Band 77. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_78: NR5G Band 78. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_79: NR5G Band 79. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_80: NR5G Band 80. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_81: NR5G Band 81. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_82: NR5G Band 82. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_83: NR5G Band 83. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_84: NR5G Band 84. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_85: NR5G Band 85. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_86: NR5G Band 86. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_257: NR5G Band 257. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_258: NR5G Band 258. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_259: NR5G Band 259. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_260: NR5G Band 260. Since 1.32. * @QMI_NAS_ACTIVE_BAND_NR5G_261: NR5G Band 261. Since 1.32. * * Band classes. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_ACTIVE_BAND_BC_0 = 0, QMI_NAS_ACTIVE_BAND_BC_1 = 1, QMI_NAS_ACTIVE_BAND_BC_2 = 2, QMI_NAS_ACTIVE_BAND_BC_3 = 3, QMI_NAS_ACTIVE_BAND_BC_4 = 4, QMI_NAS_ACTIVE_BAND_BC_5 = 5, QMI_NAS_ACTIVE_BAND_BC_6 = 6, QMI_NAS_ACTIVE_BAND_BC_7 = 7, QMI_NAS_ACTIVE_BAND_BC_8 = 8, QMI_NAS_ACTIVE_BAND_BC_9 = 9, QMI_NAS_ACTIVE_BAND_BC_10 = 10, QMI_NAS_ACTIVE_BAND_BC_11 = 11, QMI_NAS_ACTIVE_BAND_BC_12 = 12, QMI_NAS_ACTIVE_BAND_BC_13 = 13, QMI_NAS_ACTIVE_BAND_BC_14 = 14, QMI_NAS_ACTIVE_BAND_BC_15 = 15, QMI_NAS_ACTIVE_BAND_BC_16 = 16, QMI_NAS_ACTIVE_BAND_BC_17 = 17, QMI_NAS_ACTIVE_BAND_BC_18 = 18, QMI_NAS_ACTIVE_BAND_BC_19 = 19, QMI_NAS_ACTIVE_BAND_GSM_450 = 40, QMI_NAS_ACTIVE_BAND_GSM_480 = 41, QMI_NAS_ACTIVE_BAND_GSM_750 = 42, QMI_NAS_ACTIVE_BAND_GSM_850 = 43, QMI_NAS_ACTIVE_BAND_GSM_900_EXTENDED = 44, QMI_NAS_ACTIVE_BAND_GSM_900_PRIMARY = 45, QMI_NAS_ACTIVE_BAND_GSM_900_RAILWAYS = 46, QMI_NAS_ACTIVE_BAND_GSM_DCS_1800 = 47, QMI_NAS_ACTIVE_BAND_GSM_PCS_1900 = 48, QMI_NAS_ACTIVE_BAND_WCDMA_2100 = 80, QMI_NAS_ACTIVE_BAND_WCDMA_PCS_1900 = 81, QMI_NAS_ACTIVE_BAND_WCDMA_DCS_1800 = 82, QMI_NAS_ACTIVE_BAND_WCDMA_1700_US = 83, QMI_NAS_ACTIVE_BAND_WCDMA_850 = 84, QMI_NAS_ACTIVE_BAND_WCDMA_800 = 85, QMI_NAS_ACTIVE_BAND_WCDMA_2600 = 86, QMI_NAS_ACTIVE_BAND_WCDMA_900 = 87, QMI_NAS_ACTIVE_BAND_WCDMA_1700_JAPAN = 88, QMI_NAS_ACTIVE_BAND_WCDMA_1500_JAPAN = 90, QMI_NAS_ACTIVE_BAND_WCDMA_850_JAPAN = 91, QMI_NAS_ACTIVE_BAND_EUTRAN_1 = 120, QMI_NAS_ACTIVE_BAND_EUTRAN_2 = 121, QMI_NAS_ACTIVE_BAND_EUTRAN_3 = 122, QMI_NAS_ACTIVE_BAND_EUTRAN_4 = 123, QMI_NAS_ACTIVE_BAND_EUTRAN_5 = 124, QMI_NAS_ACTIVE_BAND_EUTRAN_6 = 125, QMI_NAS_ACTIVE_BAND_EUTRAN_7 = 126, QMI_NAS_ACTIVE_BAND_EUTRAN_8 = 127, QMI_NAS_ACTIVE_BAND_EUTRAN_9 = 128, QMI_NAS_ACTIVE_BAND_EUTRAN_10 = 129, QMI_NAS_ACTIVE_BAND_EUTRAN_11 = 130, QMI_NAS_ACTIVE_BAND_EUTRAN_12 = 131, QMI_NAS_ACTIVE_BAND_EUTRAN_13 = 132, QMI_NAS_ACTIVE_BAND_EUTRAN_14 = 133, QMI_NAS_ACTIVE_BAND_EUTRAN_17 = 134, QMI_NAS_ACTIVE_BAND_EUTRAN_18 = 143, QMI_NAS_ACTIVE_BAND_EUTRAN_19 = 144, QMI_NAS_ACTIVE_BAND_EUTRAN_20 = 145, QMI_NAS_ACTIVE_BAND_EUTRAN_21 = 146, QMI_NAS_ACTIVE_BAND_EUTRAN_23 = 152, QMI_NAS_ACTIVE_BAND_EUTRAN_24 = 147, QMI_NAS_ACTIVE_BAND_EUTRAN_25 = 148, QMI_NAS_ACTIVE_BAND_EUTRAN_26 = 153, QMI_NAS_ACTIVE_BAND_EUTRAN_27 = 164, QMI_NAS_ACTIVE_BAND_EUTRAN_28 = 158, QMI_NAS_ACTIVE_BAND_EUTRAN_29 = 159, QMI_NAS_ACTIVE_BAND_EUTRAN_30 = 160, QMI_NAS_ACTIVE_BAND_EUTRAN_31 = 165, QMI_NAS_ACTIVE_BAND_EUTRAN_32 = 154, QMI_NAS_ACTIVE_BAND_EUTRAN_33 = 135, QMI_NAS_ACTIVE_BAND_EUTRAN_34 = 136, QMI_NAS_ACTIVE_BAND_EUTRAN_35 = 137, QMI_NAS_ACTIVE_BAND_EUTRAN_36 = 138, QMI_NAS_ACTIVE_BAND_EUTRAN_37 = 139, QMI_NAS_ACTIVE_BAND_EUTRAN_38 = 140, QMI_NAS_ACTIVE_BAND_EUTRAN_39 = 141, QMI_NAS_ACTIVE_BAND_EUTRAN_40 = 142, QMI_NAS_ACTIVE_BAND_EUTRAN_41 = 149, QMI_NAS_ACTIVE_BAND_EUTRAN_42 = 150, QMI_NAS_ACTIVE_BAND_EUTRAN_43 = 151, QMI_NAS_ACTIVE_BAND_EUTRAN_46 = 163, QMI_NAS_ACTIVE_BAND_EUTRAN_47 = 166, QMI_NAS_ACTIVE_BAND_EUTRAN_48 = 167, QMI_NAS_ACTIVE_BAND_EUTRAN_66 = 161, QMI_NAS_ACTIVE_BAND_EUTRAN_71 = 168, QMI_NAS_ACTIVE_BAND_EUTRAN_125 = 155, QMI_NAS_ACTIVE_BAND_EUTRAN_126 = 156, QMI_NAS_ACTIVE_BAND_EUTRAN_127 = 157, QMI_NAS_ACTIVE_BAND_EUTRAN_250 = 162, QMI_NAS_ACTIVE_BAND_TDSCDMA_A = 200, QMI_NAS_ACTIVE_BAND_TDSCDMA_B = 201, QMI_NAS_ACTIVE_BAND_TDSCDMA_C = 202, QMI_NAS_ACTIVE_BAND_TDSCDMA_D = 203, QMI_NAS_ACTIVE_BAND_TDSCDMA_E = 204, QMI_NAS_ACTIVE_BAND_TDSCDMA_F = 205, QMI_NAS_ACTIVE_BAND_NR5G_1 = 250, QMI_NAS_ACTIVE_BAND_NR5G_2 = 251, QMI_NAS_ACTIVE_BAND_NR5G_3 = 252, QMI_NAS_ACTIVE_BAND_NR5G_5 = 253, QMI_NAS_ACTIVE_BAND_NR5G_7 = 254, QMI_NAS_ACTIVE_BAND_NR5G_8 = 255, QMI_NAS_ACTIVE_BAND_NR5G_20 = 256, QMI_NAS_ACTIVE_BAND_NR5G_28 = 257, QMI_NAS_ACTIVE_BAND_NR5G_38 = 258, QMI_NAS_ACTIVE_BAND_NR5G_41 = 259, QMI_NAS_ACTIVE_BAND_NR5G_50 = 260, QMI_NAS_ACTIVE_BAND_NR5G_51 = 261, QMI_NAS_ACTIVE_BAND_NR5G_66 = 262, QMI_NAS_ACTIVE_BAND_NR5G_70 = 263, QMI_NAS_ACTIVE_BAND_NR5G_71 = 264, QMI_NAS_ACTIVE_BAND_NR5G_74 = 265, QMI_NAS_ACTIVE_BAND_NR5G_75 = 266, QMI_NAS_ACTIVE_BAND_NR5G_76 = 267, QMI_NAS_ACTIVE_BAND_NR5G_77 = 268, QMI_NAS_ACTIVE_BAND_NR5G_78 = 269, QMI_NAS_ACTIVE_BAND_NR5G_79 = 270, QMI_NAS_ACTIVE_BAND_NR5G_80 = 271, QMI_NAS_ACTIVE_BAND_NR5G_81 = 272, QMI_NAS_ACTIVE_BAND_NR5G_82 = 273, QMI_NAS_ACTIVE_BAND_NR5G_83 = 274, QMI_NAS_ACTIVE_BAND_NR5G_84 = 275, QMI_NAS_ACTIVE_BAND_NR5G_85 = 276, QMI_NAS_ACTIVE_BAND_NR5G_257 = 277, QMI_NAS_ACTIVE_BAND_NR5G_258 = 278, QMI_NAS_ACTIVE_BAND_NR5G_259 = 279, QMI_NAS_ACTIVE_BAND_NR5G_260 = 280, QMI_NAS_ACTIVE_BAND_NR5G_261 = 281, QMI_NAS_ACTIVE_BAND_NR5G_12 = 282, QMI_NAS_ACTIVE_BAND_NR5G_25 = 283, QMI_NAS_ACTIVE_BAND_NR5G_34 = 284, QMI_NAS_ACTIVE_BAND_NR5G_39 = 285, QMI_NAS_ACTIVE_BAND_NR5G_40 = 286, QMI_NAS_ACTIVE_BAND_NR5G_65 = 287, QMI_NAS_ACTIVE_BAND_NR5G_86 = 288, QMI_NAS_ACTIVE_BAND_NR5G_48 = 289, QMI_NAS_ACTIVE_BAND_NR5G_14 = 290, QMI_NAS_ACTIVE_BAND_NR5G_13 = 291, QMI_NAS_ACTIVE_BAND_NR5G_18 = 292, QMI_NAS_ACTIVE_BAND_NR5G_26 = 293, QMI_NAS_ACTIVE_BAND_NR5G_30 = 294, QMI_NAS_ACTIVE_BAND_NR5G_29 = 295, QMI_NAS_ACTIVE_BAND_NR5G_53 = 296 } QmiNasActiveBand; /** * QmiNasNetworkServiceDomain: * @QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE: No service. * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS: Circuit switched. * @QMI_NAS_NETWORK_SERVICE_DOMAIN_PS: Packet switched. * @QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS: Circuit and packet switched. * @QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN: Unknown service. * * Network Service Domain. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_SERVICE_DOMAIN_NONE = 0x00, QMI_NAS_NETWORK_SERVICE_DOMAIN_CS = 0x01, QMI_NAS_NETWORK_SERVICE_DOMAIN_PS = 0x02, QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS = 0x03, QMI_NAS_NETWORK_SERVICE_DOMAIN_UNKNOWN = 0x04, } QmiNasNetworkServiceDomain; /** * QmiNasEvdoSinrLevel: * @QMI_NAS_EVDO_SINR_LEVEL_0: -9 dB. * @QMI_NAS_EVDO_SINR_LEVEL_1: -6 dB. * @QMI_NAS_EVDO_SINR_LEVEL_2: -4.5 dB. * @QMI_NAS_EVDO_SINR_LEVEL_3: -3 dB. * @QMI_NAS_EVDO_SINR_LEVEL_4: -2 dB. * @QMI_NAS_EVDO_SINR_LEVEL_5: +1 dB. * @QMI_NAS_EVDO_SINR_LEVEL_6: +3 dB. * @QMI_NAS_EVDO_SINR_LEVEL_7: +6 dB. * @QMI_NAS_EVDO_SINR_LEVEL_8: +9 dB. * * EV-DO SINR level. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_EVDO_SINR_LEVEL_0 = 0, QMI_NAS_EVDO_SINR_LEVEL_1 = 1, QMI_NAS_EVDO_SINR_LEVEL_2 = 2, QMI_NAS_EVDO_SINR_LEVEL_3 = 3, QMI_NAS_EVDO_SINR_LEVEL_4 = 4, QMI_NAS_EVDO_SINR_LEVEL_5 = 5, QMI_NAS_EVDO_SINR_LEVEL_6 = 6, QMI_NAS_EVDO_SINR_LEVEL_7 = 7, QMI_NAS_EVDO_SINR_LEVEL_8 = 8 } QmiNasEvdoSinrLevel; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get Signal Strength' request/response */ /** * QmiNasSignalStrengthRequest: * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_NONE: None. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI: Request RSSI information. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO: Request ECIO information. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO: Request IO information. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR: Request SINR information. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_ERROR_RATE: Request error rate information. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ: Request RSRQ information. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR: Request LTE SNR information. * @QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP: Request LTE RSRP information. * * Extra information to request when gathering Signal Strength. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_SIGNAL_STRENGTH_REQUEST_NONE = 0, QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI = 1 << 0, QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO = 1 << 1, QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO = 1 << 2, QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR = 1 << 3, QMI_NAS_SIGNAL_STRENGTH_REQUEST_ERROR_RATE = 1 << 4, QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ = 1 << 5, QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR = 1 << 6, QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP = 1 << 7 } QmiNasSignalStrengthRequest; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Network Scan' request/response */ /** * QmiNasNetworkScanType: * @QMI_NAS_NETWORK_SCAN_TYPE_GSM: GSM network. * @QMI_NAS_NETWORK_SCAN_TYPE_UMTS: UMTS network. * @QMI_NAS_NETWORK_SCAN_TYPE_LTE: LTE network. * @QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA: TD-SCDMA network. * * Flags to use when specifying which networks to scan. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_SCAN_TYPE_GSM = 1 << 0, QMI_NAS_NETWORK_SCAN_TYPE_UMTS = 1 << 1, QMI_NAS_NETWORK_SCAN_TYPE_LTE = 1 << 2, QMI_NAS_NETWORK_SCAN_TYPE_TD_SCDMA = 1 << 3 } QmiNasNetworkScanType; /** * QmiNasNetworkScanResult: * @QMI_NAS_NETWORK_SCAN_RESULT_SUCCESS: Success. * @QMI_NAS_NETWORK_SCAN_RESULT_ABORT: Abort. * @QMI_NAS_NETWORK_SCAN_RESULT_RADIO_LINK_FAILURE: Radio link failure. * * Network scan result. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_NETWORK_SCAN_RESULT_SUCCESS = 0, QMI_NAS_NETWORK_SCAN_RESULT_ABORT = 1, QMI_NAS_NETWORK_SCAN_RESULT_RADIO_LINK_FAILURE = 2, } QmiNasNetworkScanResult; /** * QmiNasNetworkStatus: * @QMI_NAS_NETWORK_STATUS_CURRENT_SERVING: Network is in use, current serving. * @QMI_NAS_NETWORK_STATUS_AVAILABLE: Network is vailable. * @QMI_NAS_NETWORK_STATUS_HOME: Network is home network. * @QMI_NAS_NETWORK_STATUS_ROAMING: Network is a roaming network. * @QMI_NAS_NETWORK_STATUS_FORBIDDEN: Network is forbidden. * @QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN: Network is not forbidden. * @QMI_NAS_NETWORK_STATUS_PREFERRED: Network is preferred. * @QMI_NAS_NETWORK_STATUS_NOT_PREFERRED: Network is not preferred. * * Flags to specify the status of a given network. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_STATUS_CURRENT_SERVING = 1 << 0, QMI_NAS_NETWORK_STATUS_AVAILABLE = 1 << 1, QMI_NAS_NETWORK_STATUS_HOME = 1 << 2, QMI_NAS_NETWORK_STATUS_ROAMING = 1 << 3, QMI_NAS_NETWORK_STATUS_FORBIDDEN = 1 << 4, QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN = 1 << 5, QMI_NAS_NETWORK_STATUS_PREFERRED = 1 << 6, QMI_NAS_NETWORK_STATUS_NOT_PREFERRED = 1 << 7 } QmiNasNetworkStatus; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Initiate Network Register' request/response */ /** * QmiNasNetworkRegisterType: * @QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC: Automatic network registration. * @QMI_NAS_NETWORK_REGISTER_TYPE_MANUAL: Manual network registration. * * Type of network registration. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_REGISTER_TYPE_AUTOMATIC = 0x01, QMI_NAS_NETWORK_REGISTER_TYPE_MANUAL = 0x02 } QmiNasNetworkRegisterType; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Attach Detach' request/response */ /** * QmiNasPsAttachAction: * @QMI_NAS_PS_ATTACH_ACTION_ATTACH: Attach the PS domain. * @QMI_NAS_PS_ATTACH_ACTION_DETACH: Detach the PS domain. * * Packet Switched domain attach/detach action. * * Since: 1.20 */ typedef enum { /*< since=1.20 >*/ QMI_NAS_PS_ATTACH_ACTION_ATTACH = 0x01, QMI_NAS_PS_ATTACH_ACTION_DETACH = 0x02 } QmiNasPsAttachAction; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get Serving System' request/response */ /** * QmiNasRegistrationState: * @QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED: Not registered. * @QMI_NAS_REGISTRATION_STATE_REGISTERED: Registered. * @QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING: Searching. * @QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED: Registration denied. * @QMI_NAS_REGISTRATION_STATE_UNKNOWN: Unknown. * * Status of the network registration. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED = 0x00, QMI_NAS_REGISTRATION_STATE_REGISTERED = 0x01, QMI_NAS_REGISTRATION_STATE_NOT_REGISTERED_SEARCHING = 0x02, QMI_NAS_REGISTRATION_STATE_REGISTRATION_DENIED = 0x03, QMI_NAS_REGISTRATION_STATE_UNKNOWN = 0x04 } QmiNasRegistrationState; /** * QmiNasAttachState: * @QMI_NAS_ATTACH_STATE_UNKNOWN: Unknown attach state. * @QMI_NAS_ATTACH_STATE_ATTACHED: Attached. * @QMI_NAS_ATTACH_STATE_DETACHED: Detached. * * Domain attach state. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_ATTACH_STATE_UNKNOWN = 0x00, QMI_NAS_ATTACH_STATE_ATTACHED = 0x01, QMI_NAS_ATTACH_STATE_DETACHED = 0x02, } QmiNasAttachState; /** * QmiNasNetworkType: * @QMI_NAS_NETWORK_TYPE_UNKNOWN: Unknown. * @QMI_NAS_NETWORK_TYPE_3GPP2: 3GPP2 network. * @QMI_NAS_NETWORK_TYPE_3GPP: 3GPP network. * * Type of network. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_TYPE_UNKNOWN = 0x00, QMI_NAS_NETWORK_TYPE_3GPP2 = 0x01, QMI_NAS_NETWORK_TYPE_3GPP = 0x02, } QmiNasNetworkType; /** * QmiNasRoamingIndicatorStatus: * @QMI_NAS_ROAMING_INDICATOR_STATUS_ON: Roaming. * @QMI_NAS_ROAMING_INDICATOR_STATUS_OFF: Home. * * Status of the roaming indication. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_ROAMING_INDICATOR_STATUS_ON = 0x00, QMI_NAS_ROAMING_INDICATOR_STATUS_OFF = 0x01, /* next values only for 3GPP2 */ } QmiNasRoamingIndicatorStatus; /** * QmiNasDataCapability: * @QMI_NAS_DATA_CAPABILITY_NONE: None or unknown. * @QMI_NAS_DATA_CAPABILITY_GPRS: GPRS. * @QMI_NAS_DATA_CAPABILITY_EDGE: EDGE. * @QMI_NAS_DATA_CAPABILITY_HSDPA: HSDPA. * @QMI_NAS_DATA_CAPABILITY_HSUPA: HSUPA. * @QMI_NAS_DATA_CAPABILITY_WCDMA: WCDMA. * @QMI_NAS_DATA_CAPABILITY_CDMA: CDMA. * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_0: EV-DO revision 0. * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_A: EV-DO revision A. * @QMI_NAS_DATA_CAPABILITY_GSM: GSM. * @QMI_NAS_DATA_CAPABILITY_EVDO_REV_B: EV-DO revision B. * @QMI_NAS_DATA_CAPABILITY_LTE: LTE. * @QMI_NAS_DATA_CAPABILITY_HSDPA_PLUS: HSDPA+. * @QMI_NAS_DATA_CAPABILITY_DC_HSDPA_PLUS: DC-HSDPA+. * * Data capability of the network. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_DATA_CAPABILITY_NONE = 0x00, QMI_NAS_DATA_CAPABILITY_GPRS = 0x01, QMI_NAS_DATA_CAPABILITY_EDGE = 0x02, QMI_NAS_DATA_CAPABILITY_HSDPA = 0x03, QMI_NAS_DATA_CAPABILITY_HSUPA = 0x04, QMI_NAS_DATA_CAPABILITY_WCDMA = 0x05, QMI_NAS_DATA_CAPABILITY_CDMA = 0x06, QMI_NAS_DATA_CAPABILITY_EVDO_REV_0 = 0x07, QMI_NAS_DATA_CAPABILITY_EVDO_REV_A = 0x08, QMI_NAS_DATA_CAPABILITY_GSM = 0x09, QMI_NAS_DATA_CAPABILITY_EVDO_REV_B = 0x0A, QMI_NAS_DATA_CAPABILITY_LTE = 0x0B, QMI_NAS_DATA_CAPABILITY_HSDPA_PLUS = 0x0C, QMI_NAS_DATA_CAPABILITY_DC_HSDPA_PLUS = 0x0D } QmiNasDataCapability; /** * QmiNasServiceStatus: * @QMI_NAS_SERVICE_STATUS_NONE: No service. * @QMI_NAS_SERVICE_STATUS_LIMITED: Limited service. * @QMI_NAS_SERVICE_STATUS_AVAILABLE: Service available. * @QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL: Limited regional service. * @QMI_NAS_SERVICE_STATUS_POWER_SAVE: Device in power save mode. * * Status of the service. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_SERVICE_STATUS_NONE = 0x00, QMI_NAS_SERVICE_STATUS_LIMITED = 0x01, QMI_NAS_SERVICE_STATUS_AVAILABLE = 0x02, QMI_NAS_SERVICE_STATUS_LIMITED_REGIONAL = 0x03, QMI_NAS_SERVICE_STATUS_POWER_SAVE = 0x04 } QmiNasServiceStatus; /** * QmiNasHdrPersonality: * @QMI_NAS_HDR_PERSONALITY_UNKNOWN: Unknown. * @QMI_NAS_HDR_PERSONALITY_HRPD: HRPD. * @QMI_NAS_HDR_PERSONALITY_EHRPD: eHRPD. * * HDR personality type. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_HDR_PERSONALITY_UNKNOWN = 0x00, QMI_NAS_HDR_PERSONALITY_HRPD = 0x01, QMI_NAS_HDR_PERSONALITY_EHRPD = 0x02, } QmiNasHdrPersonality; /** * QmiNasCallBarringStatus: * @QMI_NAS_CALL_BARRING_STATUS_NORMAL_ONLY: Normal calls only. * @QMI_NAS_CALL_BARRING_STATUS_EMERGENCY_ONLY: Emergency calls only. * @QMI_NAS_CALL_BARRING_STATUS_NO_CALLS: No calls allowed. * @QMI_NAS_CALL_BARRING_STATUS_ALL_CALLS: All calls allowed. * @QMI_NAS_CALL_BARRING_STATUS_UNKNOWN: Unknown. * * Status of the call barring functionality. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_CALL_BARRING_STATUS_NORMAL_ONLY = 0x00, QMI_NAS_CALL_BARRING_STATUS_EMERGENCY_ONLY = 0x01, QMI_NAS_CALL_BARRING_STATUS_NO_CALLS = 0x02, QMI_NAS_CALL_BARRING_STATUS_ALL_CALLS = 0x03, QMI_NAS_CALL_BARRING_STATUS_UNKNOWN = -1 } QmiNasCallBarringStatus; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get Home Network' request/response */ /** * QmiNasNetworkDescriptionDisplay: * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_NO: Don't display. * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_YES: Display. * @QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_UNKNOWN: Unknown. * * Setup to define whether the network description should be displayed. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_NO = 0x00, QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_YES = 0x01, QMI_NAS_NETWORK_DESCRIPTION_DISPLAY_UNKNOWN = 0xFF } QmiNasNetworkDescriptionDisplay; /** * QmiNasNetworkDescriptionEncoding: * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED: Unspecified. * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7: ASCII-7. * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE: Unicode. * @QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM: GSM 7-bit. * * Type of encoding used in the network description. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED = 0x00, QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7 = 0x01, QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE = 0x04, QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM = 0x09 } QmiNasNetworkDescriptionEncoding; /** * qmi_nas_read_string_from_network_description_encoded_array: * @encoding: a #QmiNasNetworkDescriptionEncoding. * @array: (element-type guint8): a #GArray with the encoded data. * * Converts the encoded data in @array to UTF-8 and returns a newly allocated * NUL-terminated string. * * Returns: the UTF-8 encoded string, or %NULL if an error happened during the conversion. * The returned value should be freed with g_free(). * * Since: 1.24.6 */ gchar *qmi_nas_read_string_from_network_description_encoded_array (QmiNasNetworkDescriptionEncoding encoding, const GArray *array); /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get Preferred Networks' request/response */ /** * QmiNasPlmnAccessTechnologyIdentifier: * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED: Unspecified. * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM_COMPACT: GSM Compact. * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM: GSM. * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_NGRAN: NG-RAN. * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_EUTRAN: E-UTRAN. * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UTRAN: UTRAN. * @QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_ALL: All technologies. * * Preferred networks access technology identifier as specified in * ETSI TS 131 102, chapter 4.2.5. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED = 0x0000, QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM_COMPACT = 1 << 6, QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_GSM = 1 << 7, QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_NGRAN = 1 << 11, QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_EUTRAN = 1 << 14, QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UTRAN = 1 << 15, QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_ALL = 0xFFFF } QmiNasPlmnAccessTechnologyIdentifier; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get Technology Preference' request/response */ /** * QmiNasRadioTechnologyPreference: * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO: Automatic selection. * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2: 3GPP2 technology. * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP: 3GPP technology. * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM: AMPS if 3GPP2, GSM if 3GPP. * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA: CDMA if 3GPP2, WCDMA if 3GPP. * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR: CDMA EV-DO. * @QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE: LTE. * * Flags to specify the radio technology preference. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO = 0, QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 = 1 << 0, QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP = 1 << 1, QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM = 1 << 2, QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA = 1 << 3, QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR = 1 << 4, QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE = 1 << 5 } QmiNasRadioTechnologyPreference; /** * QmiNasPreferenceDuration: * @QMI_NAS_PREFERENCE_DURATION_PERMANENT: Permanent. * @QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE: Until the next power cycle. * @QMI_NAS_PREFERENCE_DURATION_ONE_CALL: Until end of call. * @QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME: Until end of call or a specified time. * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1: Internal reason 1, one call. * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2: Internal reason 2, one call. * @QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3: Internal reason 3, one call. * * Duration of the preference setting. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_PREFERENCE_DURATION_PERMANENT = 0x00, QMI_NAS_PREFERENCE_DURATION_POWER_CYCLE = 0x01, QMI_NAS_PREFERENCE_DURATION_ONE_CALL = 0x02, QMI_NAS_PREFERENCE_DURATION_ONE_CALL_OR_TIME = 0x03, QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_1 = 0x04, QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_2 = 0x05, QMI_NAS_PREFERENCE_DURATION_INTERNAL_ONE_CALL_3 = 0x06 } QmiNasPreferenceDuration; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get/Set System Selection Preference' * requests/responses */ /** * QmiNasRatModePreference: * @QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X: CDMA2000 1X. * @QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO: CDMA2000 HRPD (1xEV-DO). * @QMI_NAS_RAT_MODE_PREFERENCE_GSM: GSM. * @QMI_NAS_RAT_MODE_PREFERENCE_UMTS: UMTS. * @QMI_NAS_RAT_MODE_PREFERENCE_LTE: LTE. * @QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA: TD-SCDMA. * @QMI_NAS_RAT_MODE_PREFERENCE_5GNR: 5GNR. Since 1.26. * * Flags specifying radio access technology mode preference. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X = 1 << 0, QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO = 1 << 1, QMI_NAS_RAT_MODE_PREFERENCE_GSM = 1 << 2, QMI_NAS_RAT_MODE_PREFERENCE_UMTS = 1 << 3, QMI_NAS_RAT_MODE_PREFERENCE_LTE = 1 << 4, QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA = 1 << 5, QMI_NAS_RAT_MODE_PREFERENCE_5GNR = 1 << 6, } QmiNasRatModePreference; /** * QmiNasCdmaPrlPreference: * @QMI_NAS_CDMA_PRL_PREFERENCE_A_SIDE_ONLY: System A only. * @QMI_NAS_CDMA_PRL_PREFERENCE_B_SIDE_ONLY: System B only. * @QMI_NAS_CDMA_PRL_PREFERENCE_ANY: Any system. * * Flags specifying the preference when using CDMA Band Class 0. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_CDMA_PRL_PREFERENCE_A_SIDE_ONLY = 0x0001, QMI_NAS_CDMA_PRL_PREFERENCE_B_SIDE_ONLY = 0x0002, QMI_NAS_CDMA_PRL_PREFERENCE_ANY = 0x3FFF } QmiNasCdmaPrlPreference; /** * QmiNasRoamingPreference: * @QMI_NAS_ROAMING_PREFERENCE_OFF: Only non-roaming networks. * @QMI_NAS_ROAMING_PREFERENCE_NOT_OFF: Only roaming networks. * @QMI_NAS_ROAMING_PREFERENCE_NOT_FLASHING: Only non-roaming networks or not flashing. * @QMI_NAS_ROAMING_PREFERENCE_ANY: Don't filter by roaming when acquiring networks. * * Roaming preference. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_ROAMING_PREFERENCE_OFF = 0x01, QMI_NAS_ROAMING_PREFERENCE_NOT_OFF = 0x02, QMI_NAS_ROAMING_PREFERENCE_NOT_FLASHING = 0x03, QMI_NAS_ROAMING_PREFERENCE_ANY = 0xFF } QmiNasRoamingPreference; /** * QmiNasNetworkSelectionPreference: * @QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC: Automatic. * @QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL: Manual. * * Network selection preference. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC = 0x00, QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL = 0x01 } QmiNasNetworkSelectionPreference; /** * QmiNasChangeDuration: * @QMI_NAS_CHANGE_DURATION_PERMANENT: Permanent. * @QMI_NAS_CHANGE_DURATION_POWER_CYCLE: Until the next power cycle. * * Duration of the change setting. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_CHANGE_DURATION_POWER_CYCLE = 0x00, QMI_NAS_CHANGE_DURATION_PERMANENT = 0x01 } QmiNasChangeDuration; /** * QmiNasServiceDomainPreference: * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_ONLY: Circuit-switched only. * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ONLY: Packet-switched only. * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_PS: Circuit-switched and packet-switched. * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ATTACH: Packet-switched attach. * @QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_DETACH:Packet-switched dettach. * * Service domain preference. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_ONLY = 0x00, QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ONLY = 0x01, QMI_NAS_SERVICE_DOMAIN_PREFERENCE_CS_PS = 0x02, QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_ATTACH = 0x03, QMI_NAS_SERVICE_DOMAIN_PREFERENCE_PS_DETACH = 0x04, } QmiNasServiceDomainPreference; /** * QmiNasGsmWcdmaAcquisitionOrderPreference: * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC: Automatic. * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM: GSM first, then WCDMA. * @QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA: WCDMA first, then GSM. * * GSM/WCDMA acquisition order preference. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC = 0x00, QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM = 0x01, QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA = 0x02 } QmiNasGsmWcdmaAcquisitionOrderPreference; /** * QmiNasTdScdmaBandPreference: * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_A: Band A. * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_B: Band B. * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_C: Band C. * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_D: Band D. * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_E: Band E. * @QMI_NAS_TD_SCDMA_BAND_PREFERENCE_F: Band F. * * Flags to specify TD-SCDMA-specific frequency band preferences. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_TD_SCDMA_BAND_PREFERENCE_A = 1 << 0, QMI_NAS_TD_SCDMA_BAND_PREFERENCE_B = 1 << 1, QMI_NAS_TD_SCDMA_BAND_PREFERENCE_C = 1 << 2, QMI_NAS_TD_SCDMA_BAND_PREFERENCE_D = 1 << 3, QMI_NAS_TD_SCDMA_BAND_PREFERENCE_E = 1 << 4, QMI_NAS_TD_SCDMA_BAND_PREFERENCE_F = 1 << 5 } QmiNasTdScdmaBandPreference; /** * QmiNasVoiceDomainPreference: * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_ONLY: Circuit-switched voice only * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_ONLY: Packet-switched voice only. * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_PREFERRED: Circuit-switched voice is preferred. * @QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_PREFERRED: Packet-switched voice is preferred. * * Voice domain preference. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_ONLY = 0x00, QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_ONLY = 0x01, QMI_NAS_VOICE_DOMAIN_PREFERENCE_CS_PREFERRED = 0x02, QMI_NAS_VOICE_DOMAIN_PREFERENCE_PS_PREFERRED = 0x03, } QmiNasVoiceDomainPreference; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get System Info' request/response */ /** * QmiNasNetworkSelectionRegistrationRestriction: * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_UNRESTRICTED: Device follows the normal registration process. * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_CAMPED_ONLY: Device camps on the network according to its provisioning, but does not register. * @QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_LIMITED: Device selects the network for limited service. * * Registration restriction. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_UNRESTRICTED = 0x00, QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_CAMPED_ONLY = 0x01, QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_LIMITED = 0x02, } QmiNasNetworkSelectionRegistrationRestriction; /** * QmiNasLteRegistrationDomain: * @QMI_NAS_LTE_REGISTRATION_DOMAIN_NOT_APPLICABLE: Not applicable since the UE is not in "Camp Only" mode. * @QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_ONLY: UE is in "Camp Only" mode and the PLMN can provide CS service only. * @QMI_NAS_LTE_REGISTRATION_DOMAIN_PS_ONLY: UE is in "Camp Only" mode and the PLMN can provide PS service only. * @QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_PS: UE is in "Camp Only" mode and the PLMN can provide CS and PS service. * @QMI_NAS_LTE_REGISTRATION_DOMAIN_LIMITED_SERVICE: UE is in "Camp Only" mode but the PLMN cannot provide any service. * * LTE registration domain. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_LTE_REGISTRATION_DOMAIN_NOT_APPLICABLE = 0x00, QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_ONLY = 0x01, QMI_NAS_LTE_REGISTRATION_DOMAIN_PS_ONLY = 0x02, QMI_NAS_LTE_REGISTRATION_DOMAIN_CS_PS = 0x03, QMI_NAS_LTE_REGISTRATION_DOMAIN_LIMITED_SERVICE = 0x04, } QmiNasLteRegistrationDomain; /** * QmiNasRoamingStatus: * @QMI_NAS_ROAMING_STATUS_OFF: Off. * @QMI_NAS_ROAMING_STATUS_ON: On. * @QMI_NAS_ROAMING_STATUS_BLINK: Blinking. * @QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD: Out of neighborhood. * @QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING: Out of building. * @QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM: Preferred system. * @QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM: Available system. * @QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER: Alliance partner. * @QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER: Premium partner. * @QMI_NAS_ROAMING_STATUS_FULL_SERVICE: Full service. * @QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE: Partial service. * @QMI_NAS_ROAMING_STATUS_BANNER_ON: Banner on. * @QMI_NAS_ROAMING_STATUS_BANNER_OFF: Banner off. * * Roaming status. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_ROAMING_STATUS_OFF = 0x00, QMI_NAS_ROAMING_STATUS_ON = 0x01, /* Next ones only for 3GPP2 */ QMI_NAS_ROAMING_STATUS_BLINK = 0x02, QMI_NAS_ROAMING_STATUS_OUT_OF_NEIGHBORHOOD = 0x03, QMI_NAS_ROAMING_STATUS_OUT_OF_BUILDING = 0x04, QMI_NAS_ROAMING_STATUS_PREFERRED_SYSTEM = 0x05, QMI_NAS_ROAMING_STATUS_AVAILABLE_SYSTEM = 0x06, QMI_NAS_ROAMING_STATUS_ALLIANCE_PARTNER = 0x07, QMI_NAS_ROAMING_STATUS_PREMIUM_PARTNER = 0x08, QMI_NAS_ROAMING_STATUS_FULL_SERVICE = 0x09, QMI_NAS_ROAMING_STATUS_PARTIAL_SERVICE = 0x0A, QMI_NAS_ROAMING_STATUS_BANNER_ON = 0x0B, QMI_NAS_ROAMING_STATUS_BANNER_OFF = 0x0C } QmiNasRoamingStatus; /** * QmiNasLteCellAccessStatus: * @QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY: Access is allowed for normal calls only. * @QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY: Access is allowed for emergency calls only. * @QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS: Access is not allowed for any call type. * @QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS: Access is allowed for all call types. * @QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN: Unknown. * * Cell access status for LTE calls. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_CELL_ACCESS_STATUS_NORMAL_ONLY = 0x00, QMI_NAS_CELL_ACCESS_STATUS_EMERGENCY_ONLY = 0x01, QMI_NAS_CELL_ACCESS_STATUS_NO_CALLS = 0x02, QMI_NAS_CELL_ACCESS_STATUS_ALL_CALLS = 0x03, QMI_NAS_CELL_ACCESS_STATUS_UNKNOWN = 0xFF, } QmiNasLteCellAccessStatus; /** * QmiNasHdrProtocolRevision: * @QMI_NAS_HDR_PROTOCOL_REVISION_NONE: None. * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_0: HDR Rel 0. * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_A: HDR Rel A. * @QMI_NAS_HDR_PROTOCOL_REVISION_REL_B: HDR Rel B. * * HDR protocol revision. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_HDR_PROTOCOL_REVISION_NONE = 0x00, QMI_NAS_HDR_PROTOCOL_REVISION_REL_0 = 0x01, QMI_NAS_HDR_PROTOCOL_REVISION_REL_A = 0x02, QMI_NAS_HDR_PROTOCOL_REVISION_REL_B = 0x03 } QmiNasHdrProtocolRevision; /** * QmiNasWcdmaHsService: * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_UNSUPPORTED: HSDPA and HSUPA not supported. * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_SUPPORTED: HSDPA supported. * @QMI_NAS_WCDMA_HS_SERVICE_HSUPA_SUPPORTED: HSUPA supported. * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_SUPPORTED: HSDPA and HSUPA supported. * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_SUPPORTED: HSDPA+ supported. * @QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_HSUPA_SUPPORTED: HSDPA+ and HSUPA supported. * @QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_SUPPORTED: DC-HSDPA+ supported. * @QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_HSUPA_SUPPORTED: DC-HSDPA+ and HSUPA supported. * * Call status on high speed. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_UNSUPPORTED = 0x00, QMI_NAS_WCDMA_HS_SERVICE_HSDPA_SUPPORTED = 0x01, QMI_NAS_WCDMA_HS_SERVICE_HSUPA_SUPPORTED = 0x02, QMI_NAS_WCDMA_HS_SERVICE_HSDPA_HSUPA_SUPPORTED = 0x03, QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_SUPPORTED = 0x04, QMI_NAS_WCDMA_HS_SERVICE_HSDPA_PLUS_HSUPA_SUPPORTED = 0x05, QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_SUPPORTED = 0x06, QMI_NAS_WCDMA_HS_SERVICE_DC_HSDPA_PLUS_HSUPA_SUPPORTED = 0x07 } QmiNasWcdmaHsService; /** * QmiNasCellBroadcastCapability: * @QMI_NAS_CELL_BROADCAST_CAPABILITY_UNKNOWN: Unknown. * @QMI_NAS_CELL_BROADCAST_CAPABILITY_OFF: Cell broadcast not supported. * @QMI_NAS_CELL_BROADCAST_CAPABILITY_ON: Cell broadcast supported. * * Cell broadcast support. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_CELL_BROADCAST_CAPABILITY_UNKNOWN = 0x00, QMI_NAS_CELL_BROADCAST_CAPABILITY_OFF = 0x01, QMI_NAS_CELL_BROADCAST_CAPABILITY_ON = 0x02 } QmiNasCellBroadcastCapability; /** * QmiNasSimRejectState: * @QMI_NAS_SIM_REJECT_STATE_SIM_UNAVAILABLE: SIM not available. * @QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE: SIM available. * @QMI_NAS_SIM_REJECT_STATE_SIM_CS_INVALID: SIM invalid for circuit-switched connections. * @QMI_NAS_SIM_REJECT_STATE_SIM_PS_INVALID: SIM invalid for packet-switched connections. * @QMI_NAS_SIM_REJECT_STATE_SIM_CS_PS_INVALID: SIM invalid for circuit-switched and packet-switched connections. * * Reject information of the SIM. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_SIM_REJECT_STATE_SIM_UNAVAILABLE = 0, QMI_NAS_SIM_REJECT_STATE_SIM_AVAILABLE = 1, QMI_NAS_SIM_REJECT_STATE_SIM_CS_INVALID = 2, QMI_NAS_SIM_REJECT_STATE_SIM_PS_INVALID = 3, QMI_NAS_SIM_REJECT_STATE_SIM_CS_PS_INVALID = 4 } QmiNasSimRejectState; /** * QmiNasCdmaPilotType: * @QMI_NAS_CDMA_PILOT_TYPE_ACTIVE: the pilot is part of the active set. * @QMI_NAS_CDMA_PILOT_TYPE_NEIGHBOR: the pilot is part of the neighbor set. * * The pilot set the pilot belongs to. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_CDMA_PILOT_TYPE_ACTIVE = 0, QMI_NAS_CDMA_PILOT_TYPE_NEIGHBOR = 1, } QmiNasCdmaPilotType; /** * QmiNasDayOfWeek: * @QMI_NAS_DAY_OF_WEEK_MONDAY: Monday * @QMI_NAS_DAY_OF_WEEK_TUESDAY: Tuesday * @QMI_NAS_DAY_OF_WEEK_WEDNESDAY: Wednesday * @QMI_NAS_DAY_OF_WEEK_THURSDAY: Thursday * @QMI_NAS_DAY_OF_WEEK_FRIDAY: Friday * @QMI_NAS_DAY_OF_WEEK_SATURDAY: Saturday * @QMI_NAS_DAY_OF_WEEK_SUNDAY: Sunday * * The day of the week. * * Since: 1.4 */ typedef enum { /*< since=1.4 >*/ QMI_NAS_DAY_OF_WEEK_MONDAY = 0, QMI_NAS_DAY_OF_WEEK_TUESDAY = 1, QMI_NAS_DAY_OF_WEEK_WEDNESDAY = 2, QMI_NAS_DAY_OF_WEEK_THURSDAY = 3, QMI_NAS_DAY_OF_WEEK_FRIDAY = 4, QMI_NAS_DAY_OF_WEEK_SATURDAY = 5, QMI_NAS_DAY_OF_WEEK_SUNDAY = 6 } QmiNasDayOfWeek; /** * QmiNasDaylightSavingsAdjustment: * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_NONE: no adjustment * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_ONE_HOUR: one hour adjustment * @QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_TWO_HOURS: two hours adjustment * * The number of hours a time is adjusted for daylight savings. * * Since: 1.4 */ typedef enum { /*< since=1.4 >*/ QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_NONE = 0, QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_ONE_HOUR = 1, QMI_NAS_DAYLIGHT_SAVINGS_ADJUSTMENT_TWO_HOURS = 2 } QmiNasDaylightSavingsAdjustment; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get Cell Location Info' request/response */ /** * QmiNasWcdmaRrcState: * @QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED: Disconnected. * @QMI_NAS_WCDMA_RRC_STATE_CELL_PCH: WCDMA RRC state is CELL_PCH. * @QMI_NAS_WCDMA_RRC_STATE_URA_PCH: WCDMA RRC state is URA_PCH. * @QMI_NAS_WCDMA_RRC_STATE_CELL_FACH: WCDMA RRC state is CELL_FACH. * @QMI_NAS_WCDMA_RRC_STATE_CELL_DCH: WCDMA RRC state is CELL_DCH. * * RRC state. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_NAS_WCDMA_RRC_STATE_DISCONNECTED = 0, QMI_NAS_WCDMA_RRC_STATE_CELL_PCH = 1, QMI_NAS_WCDMA_RRC_STATE_URA_PCH = 2, QMI_NAS_WCDMA_RRC_STATE_CELL_FACH = 3, QMI_NAS_WCDMA_RRC_STATE_CELL_DCH = 4 } QmiNasWcdmaRrcState; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get LTE Cphy CA Info' request/response */ /** * QmiNasDLBandwidth: * @QMI_NAS_DL_BANDWIDTH_1_4: 1.4 MHz * @QMI_NAS_DL_BANDWIDTH_3: 3 MHz * @QMI_NAS_DL_BANDWIDTH_5: 5 MHz * @QMI_NAS_DL_BANDWIDTH_10: 10 MHz * @QMI_NAS_DL_BANDWIDTH_15: 15 MHz * @QMI_NAS_DL_BANDWIDTH_20: 20 MHz * @QMI_NAS_DL_BANDWIDTH_INVALID: Invalid * @QMI_NAS_DL_BANDWIDTH_UNKNOWN: Unknown * * DL Bandwidth. * * Since: 1.16 */ typedef enum { /*< since=1.16 >*/ QMI_NAS_DL_BANDWIDTH_1_4 = 0, QMI_NAS_DL_BANDWIDTH_3 = 1, QMI_NAS_DL_BANDWIDTH_5 = 2, QMI_NAS_DL_BANDWIDTH_10 = 3, QMI_NAS_DL_BANDWIDTH_15 = 4, QMI_NAS_DL_BANDWIDTH_20 = 5, QMI_NAS_DL_BANDWIDTH_INVALID = 6, QMI_NAS_DL_BANDWIDTH_UNKNOWN = 0xFF } QmiNasDLBandwidth; /** * QmiNasScellState: * @QMI_NAS_SCELL_STATE_DECONFIGURED: Deconfigured * @QMI_NAS_SCELL_STATE_DEACTIVATED: Deactivated * @QMI_NAS_SCELL_STATE_ACTIVATED: Activated * * SCell State. * * Since: 1.16 */ typedef enum { /*< since=1.16 >*/ QMI_NAS_SCELL_STATE_DECONFIGURED = 0, QMI_NAS_SCELL_STATE_DEACTIVATED = 1, QMI_NAS_SCELL_STATE_ACTIVATED = 2 } QmiNasScellState; /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get Operator Name' request/response */ /** * QmiNasPlmnEncodingScheme: * @QMI_NAS_PLMN_ENCODING_SCHEME_GSM: GSM default alphabet packed encoding (ETSI GSM 03.38) * @QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE: UCS-2 little-endian * * PLMN name encoding schemes. See 3GPP TS 24.008 section "Network Name * information element". * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_NAS_PLMN_ENCODING_SCHEME_GSM = 0, QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE = 1, } QmiNasPlmnEncodingScheme; /** * qmi_nas_read_string_from_plmn_encoded_array: * @encoding: a #QmiNasPlmnEncodingScheme. * @array: (element-type guint8): a #GArray with the encoded data. * * Converts the encoded data in @array to UTF-8 and returns a newly allocated * NUL-terminated string. * * Returns: the UTF-8 encoded string, or %NULL if an error happened during the conversion. * The returned value should be freed with g_free(). * * Since: 1.24.6 */ gchar *qmi_nas_read_string_from_plmn_encoded_array (QmiNasPlmnEncodingScheme encoding, const GArray *array); /** * QmiNasNetworkNameDisplayCondition: * @QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_REGISTERED_PLMN_IF_KNOWN_NETWORK: if * set, display of the registered PLMN is required when the registered PLMN is either * the HPLMN or a PLMN in the Service Provider PLMN List (see EFspdi). Otherwise * display of the registered PLMN is not required in this case. * @QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_SPN_NOT_REQUIRED_IF_UNKNOWN_NETWORK: if * set, display of the Service Provider Name is not required when registered PLMN is * neither HPLMN nor a PLMN in the service provider PLMN list (see EFspdi). If not set, * SPN display is required in this case. * * Flags used to control display of the PLMN name and Service Provider Name. See * 3GPP TS 51.011 descripton of the EFspn SIM file for more details. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_REGISTERED_PLMN_IF_KNOWN_NETWORK = 1 << 0, QMI_NAS_NETWORK_NAME_DISPLAY_CONDITION_DISPLAY_SPN_NOT_REQUIRED_IF_UNKNOWN_NETWORK = 1 << 1, } QmiNasNetworkNameDisplayCondition; /** * QmiNasPlmnNameCountryInitials: * @QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD: don't add country initials * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD: add country initials * @QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED: unspecified * * PLMN name country initials options. See 3GPP TS 24.008 * section "Network Name information element". * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_NAS_PLMN_NAME_COUNTRY_INITIALS_DO_NOT_ADD = 0, QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_ADD = 1, QMI_NAS_PLMN_NAME_COUNTRY_INIITALS_UNSPECIFIED = 0xFF, } QmiNasPlmnNameCountryInitials; /** * QmiNasNetworkNameSource: * @QMI_NAS_NETWORK_NAME_SOURCE_UNKNOWN: Unknown. * @QMI_NAS_NETWORK_NAME_SOURCE_OPERATOR_PLMN_LIST_AND_PLMN_NETWORK_NAME: Operator PLMN list and PLMN network name. * @QMI_NAS_NETWORK_NAME_SOURCE_COMMON_PCN_HANDSET_SPECIFICATION_AND_OPERATOR_NAME_STRING: Common PCN handset specification and operator name string. * @QMI_NAS_NETWORK_NAME_SOURCE_NITZ: Network identity and time zone. * @QMI_NAS_NETWORK_NAME_SOURCE_SE13: GSMA SE13 table. * @QMI_NAS_NETWORK_NAME_SOURCE_MCC_MNC: MCC and MNC. * @QMI_NAS_NETWORK_NAME_SOURCE_SERVICE_PROVIDER_NAME: Service provider name. * * Network name source. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_NETWORK_NAME_SOURCE_UNKNOWN = 0x00, QMI_NAS_NETWORK_NAME_SOURCE_OPERATOR_PLMN_LIST_AND_PLMN_NETWORK_NAME = 0x01, QMI_NAS_NETWORK_NAME_SOURCE_COMMON_PCN_HANDSET_SPECIFICATION_AND_OPERATOR_NAME_STRING = 0x02, QMI_NAS_NETWORK_NAME_SOURCE_NITZ = 0x03, QMI_NAS_NETWORK_NAME_SOURCE_SE13 = 0x04, QMI_NAS_NETWORK_NAME_SOURCE_MCC_MNC = 0x05, QMI_NAS_NETWORK_NAME_SOURCE_SERVICE_PROVIDER_NAME = 0x06, } QmiNasNetworkNameSource; /** * QmiNasPlmnNameSpareBits: * @QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN: unknown * @QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8: bit 8 is spare * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78: bits 7 - 8 are spare * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68: bits 6 - 8 are spare * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58: bits 5 - 8 are spare * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48: bits 4 - 8 are spare * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38: bits 3 - 8 are spare * @QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28: bits 2 - 8 are spare * * PLMN name spare bits in last octet of a network name. See 3GPP TS 24.008 * section "Network Name information element". * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_NAS_PLMN_NAME_SPARE_BITS_UNKNOWN = 0, QMI_NAS_PLMN_NAME_SPARE_BITS_BIT_8 = 1, QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_78 = 2, QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_68 = 3, QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_58 = 4, QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_48 = 5, QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_38 = 6, QMI_NAS_PLMN_NAME_SPARE_BITS_BITS_28 = 7, } QmiNasPlmnNameSpareBits; /** * QmiNasUsagePreference: * @QMI_NAS_USAGE_PREFERENCE_UNKNOWN: Unknown. * @QMI_NAS_USAGE_PREFERENCE_VOICE_CENTRIC: Voice centric. * @QMI_NAS_USAGE_PREFERENCE_DATA_CENTRIC: Data centric. * * Modem usage preference. * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_USAGE_PREFERENCE_UNKNOWN = 0x00, QMI_NAS_USAGE_PREFERENCE_VOICE_CENTRIC = 0x01, QMI_NAS_USAGE_PREFERENCE_DATA_CENTRIC = 0x02 } QmiNasUsagePreference; /** * QmiNasSwiModemMode: * @QMI_NAS_SWI_MODEM_MODE_POWERING_OFF: Powering off * @QMI_NAS_SWI_MODEM_MODE_FACTORY_TEST: Factory test * @QMI_NAS_SWI_MODEM_MODE_OFFLINE: Offline * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_AMPS: Offline AMPS * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_CDMA: Offline CDMA * @QMI_NAS_SWI_MODEM_MODE_ONLINE: Online * @QMI_NAS_SWI_MODEM_MODE_LOW_POWER: Low power * @QMI_NAS_SWI_MODEM_MODE_RESETTING: Resetting * @QMI_NAS_SWI_MODEM_MODE_NETWORK_TEST: Network test * @QMI_NAS_SWI_MODEM_MODE_OFFLINE_REQUEST: Offline request * @QMI_NAS_SWI_MODEM_MODE_PSEUDO_ONLINE: Pseudo online * @QMI_NAS_SWI_MODEM_MODE_RESETTING_MODEM: Resetting modem * @QMI_NAS_SWI_MODEM_MODE_UNKNOWN: Unknown * * Modem mode (Sierra Wireless specific). * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_SWI_MODEM_MODE_POWERING_OFF = 0x00, QMI_NAS_SWI_MODEM_MODE_FACTORY_TEST = 0x01, QMI_NAS_SWI_MODEM_MODE_OFFLINE = 0x02, QMI_NAS_SWI_MODEM_MODE_OFFLINE_AMPS = 0x03, QMI_NAS_SWI_MODEM_MODE_OFFLINE_CDMA = 0x04, QMI_NAS_SWI_MODEM_MODE_ONLINE = 0x05, QMI_NAS_SWI_MODEM_MODE_LOW_POWER = 0x06, QMI_NAS_SWI_MODEM_MODE_RESETTING = 0x07, QMI_NAS_SWI_MODEM_MODE_NETWORK_TEST = 0x08, QMI_NAS_SWI_MODEM_MODE_OFFLINE_REQUEST = 0x09, QMI_NAS_SWI_MODEM_MODE_PSEUDO_ONLINE = 0x0a, QMI_NAS_SWI_MODEM_MODE_RESETTING_MODEM = 0x0b, QMI_NAS_SWI_MODEM_MODE_UNKNOWN = 0xff } QmiNasSwiModemMode; /** * QmiNasSwiSystemMode: * @QMI_NAS_SWI_SYSTEM_MODE_NO_SERVICE: No service * @QMI_NAS_SWI_SYSTEM_MODE_AMPS: AMPS * @QMI_NAS_SWI_SYSTEM_MODE_CDMA: CDMA * @QMI_NAS_SWI_SYSTEM_MODE_GSM: GSM * @QMI_NAS_SWI_SYSTEM_MODE_HDR: HDR * @QMI_NAS_SWI_SYSTEM_MODE_WCDMA: WCDMA * @QMI_NAS_SWI_SYSTEM_MODE_GPS: GPS * @QMI_NAS_SWI_SYSTEM_MODE_WLAN: WLAN * @QMI_NAS_SWI_SYSTEM_MODE_LTE: LTE * @QMI_NAS_SWI_SYSTEM_MODE_UNKNOWN: Unknown * * System mode (Sierra Wireless specific). * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_SWI_SYSTEM_MODE_NO_SERVICE = 0x00, QMI_NAS_SWI_SYSTEM_MODE_AMPS = 0x01, QMI_NAS_SWI_SYSTEM_MODE_CDMA = 0x02, QMI_NAS_SWI_SYSTEM_MODE_GSM = 0x03, QMI_NAS_SWI_SYSTEM_MODE_HDR = 0x04, QMI_NAS_SWI_SYSTEM_MODE_WCDMA = 0x05, QMI_NAS_SWI_SYSTEM_MODE_GPS = 0x06, QMI_NAS_SWI_SYSTEM_MODE_WLAN = 0x08, QMI_NAS_SWI_SYSTEM_MODE_LTE = 0x09, QMI_NAS_SWI_SYSTEM_MODE_UNKNOWN = 0xff } QmiNasSwiSystemMode; /** * QmiNasSwiImsRegState: * @QMI_NAS_SWI_IMS_REG_NO_SRV: No service * @QMI_NAS_SWI_IMS_REG_IN_PROG: In prog * @QMI_NAS_SWI_IMS_REG_FAILED: Failed * @QMI_NAS_SWI_IMS_REG_LIMITED: Limited * @QMI_NAS_SWI_IMS_REG_FULL_SRV: Full service * @QMI_NAS_SWI_IMS_REG__UNKNOWN: Unknown * * IMS registration state. (Sierra Wireless specific). * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_SWI_IMS_REG_NO_SRV = 0x00, QMI_NAS_SWI_IMS_REG_IN_PROG = 0x01, QMI_NAS_SWI_IMS_REG_FAILED = 0x02, QMI_NAS_SWI_IMS_REG_LIMITED = 0x03, QMI_NAS_SWI_IMS_REG_FULL_SRV = 0x04, QMI_NAS_SWI_IMS_REG__UNKNOWN = 0xff } QmiNasSwiImsRegState; /** * QmiNasSwiPsState: * @QMI_NAS_SWI_PS_STATE_ATTACHED: Attached * @QMI_NAS_SWI_PS_STATE_DETACHED: Detached * @QMI_NAS_SWI_PS_STATE_UNKNOWN: Unknown * * PS registration state. (Sierra Wireless specific). * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_SWI_PS_STATE_ATTACHED = 0x00, QMI_NAS_SWI_PS_STATE_DETACHED = 0x01, QMI_NAS_SWI_PS_STATE_UNKNOWN = 0xff } QmiNasSwiPsState; /** * QmiNasSwiEmmState: * @QMI_NAS_SWI_EMM_STATE_DEREGISTERED: Deregistered * @QMI_NAS_SWI_EMM_STATE_REG_INITIATED: Registration initiated * @QMI_NAS_SWI_EMM_STATE_REGISTERED: Registered * @QMI_NAS_SWI_EMM_STATE_TAU_INITIATED: TAU initiated * @QMI_NAS_SWI_EMM_STATE_SR_INITIATED: SR initiated * @QMI_NAS_SWI_EMM_STATE_DEREG_INITIATED: Deregistration initiated * @QMI_NAS_SWI_EMM_STATE_INVALID: Invalid * @QMI_NAS_SWI_EMM_STATE_UNKNOWN: Unknown * * EMM registration state. (Sierra Wireless specific). * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_SWI_EMM_STATE_DEREGISTERED = 0x00, QMI_NAS_SWI_EMM_STATE_REG_INITIATED = 0x01, QMI_NAS_SWI_EMM_STATE_REGISTERED = 0x02, QMI_NAS_SWI_EMM_STATE_TAU_INITIATED = 0x03, QMI_NAS_SWI_EMM_STATE_SR_INITIATED = 0x04, QMI_NAS_SWI_EMM_STATE_DEREG_INITIATED = 0x05, QMI_NAS_SWI_EMM_STATE_INVALID = 0x06, QMI_NAS_SWI_EMM_STATE_UNKNOWN = 0xff } QmiNasSwiEmmState; /** * QmiNasSwiEmmConnectionState: * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_IDLE: RRC idle * @QMI_NAS_SWI_EMM_CONN_STATE_WAITING_RRC_CFM: Waiting RRC Cfm * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_CONNECTING: RRC connecting * @QMI_NAS_SWI_EMM_CONN_STATE_RRC_RELEASING: RRC releasing * @QMI_NAS_SWI_EMM_CONN_STATE_UNKNOWN: Unknown * * EMM connection state state. (Sierra Wireless specific). * * Since: 1.24 */ typedef enum { /*< since=1.24 >*/ QMI_NAS_SWI_EMM_CONN_STATE_RRC_IDLE = 0x00, QMI_NAS_SWI_EMM_CONN_STATE_WAITING_RRC_CFM = 0x01, QMI_NAS_SWI_EMM_CONN_STATE_RRC_CONNECTING = 0x02, QMI_NAS_SWI_EMM_CONN_STATE_RRC_RELEASING = 0x03, QMI_NAS_SWI_EMM_CONN_STATE_UNKNOWN = 0xff } QmiNasSwiEmmConnectionState; /** * QmiNasDrx: * @QMI_NAS_DRX_UNKNOWN: Unknown or not specified. * @QMI_NAS_DRX_CN6_T32: CN=6, T=32. * @QMI_NAS_DRX_CN7_T64: CN=7, T=64. * @QMI_NAS_DRX_CN8_T128: CN=8, T=128. * @QMI_NAS_DRX_CN9_T256: CN=9, T=256. * * DRX setting of the device. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_NAS_DRX_UNKNOWN = 0x00, QMI_NAS_DRX_CN6_T32 = 0x06, QMI_NAS_DRX_CN7_T64 = 0x07, QMI_NAS_DRX_CN8_T128 = 0x08, QMI_NAS_DRX_CN9_T256 = 0x09, } QmiNasDrx; /** * QmiNasBoolean: * @QMI_NAS_BOOLEAN_FALSE: Status FALSE. * @QMI_NAS_BOOLEAN_TRUE: Status TRUE. * @QMI_NAS_BOOLEAN_UNKNOWN: Status Unknown. * * Boolean flag with validity info. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_NAS_BOOLEAN_FALSE = 0x00, QMI_NAS_BOOLEAN_TRUE = 0x01, QMI_NAS_BOOLEAN_UNKNOWN = 0x02 } QmiNasBoolean; /** * QmiNasPlmnLanguageId: * @QMI_NAS_PLMN_LANGUAGE_ID_UNKNOWN: Language Unknown. * @QMI_NAS_PLMN_LANGUAGE_ID_ZH_TRAD: Traditional Chinese. * @QMI_NAS_PLMN_LANGUAGE_ID_ZH_SIMP: Simplified Chinese. * * Language ID used when encoding the PLMN. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_NAS_PLMN_LANGUAGE_ID_UNKNOWN = 0x00, QMI_NAS_PLMN_LANGUAGE_ID_ZH_TRAD = 0x01, QMI_NAS_PLMN_LANGUAGE_ID_ZH_SIMP = 0x02 } QmiNasPlmnLanguageId; /** * QmiNasLteVoiceDomain: * @QMI_NAS_LTE_VOICE_DOMAIN_NONE: No voice. * @QMI_NAS_LTE_VOICE_DOMAIN_IMS: Voice is supported over IMS network. * @QMI_NAS_LTE_VOICE_DOMAIN_1X: Voice is supported over the 1X network. * @QMI_NAS_LTE_VOICE_DOMAIN_3GPP: Voice is supported over the 3GPP network. * * LTE voice domain. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_NAS_LTE_VOICE_DOMAIN_NONE = 0x00, QMI_NAS_LTE_VOICE_DOMAIN_IMS = 0x01, QMI_NAS_LTE_VOICE_DOMAIN_1X = 0x02, QMI_NAS_LTE_VOICE_DOMAIN_3GPP = 0x03 } QmiNasLteVoiceDomain; /** * QmiNasRejectCause: * @QMI_NAS_REJECT_CAUSE_NONE: None. * @QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR: IMSI unknown in HLR/HSS. * @QMI_NAS_REJECT_CAUSE_ILLEGAL_UE: Illegal MS/UE. * @QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR: IMSI unknown in VLR. * @QMI_NAS_REJECT_CAUSE_IMEI_NOT_ACCEPTED: IMEI not accepted. * @QMI_NAS_REJECT_CAUSE_ILLEGAL_ME: Illegal ME. * @QMI_NAS_REJECT_CAUSE_PS_SERVICES_NOT_ALLOWED: GPRS/EPS services not allowed. * @QMI_NAS_REJECT_CAUSE_PS_AND_NON_PS_SERVICES_NOT_ALLOWED: GPRS/EPS and non-GPRS/EPS services not allowed. * @QMI_NAS_REJECT_CAUSE_UE_IDENTITY_NOT_DERIVED_BY_NETWORK: MS/UE identity not derived by network. * @QMI_NAS_REJECT_CAUSE_IMPLICITLY_DETACHED: Implicitly detached. * @QMI_NAS_REJECT_CAUSE_PLMN_NOT_ALLOWED: PLMN not allowed. * @QMI_NAS_REJECT_CAUSE_LOCATION_AREA_NOT_ALLOWED: Location/tracking area not allowed. * @QMI_NAS_REJECT_CAUSE_ROAMING_IN_LOCATION_AREA_NOT_ALLOWED: Roaming in location/tracking area not allowed. * @QMI_NAS_REJECT_CAUSE_PS_SERVICES_IN_LOCATION_AREA_NOT_ALLOWED: GPRS/EPS services in location/tracking area not allowed. * @QMI_NAS_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LOCATION_AREA: No suitable cells in location/tracking area. * @QMI_NAS_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE: MSC temporarily not reachable. * @QMI_NAS_REJECT_CAUSE_NETWORK_FAILURE: Network failure. * @QMI_NAS_REJECT_CAUSE_CS_DOMAIN_NOT_AVAILABLE: CS domain not available. * @QMI_NAS_REJECT_CAUSE_ESM_FAILURE: ESM failure. * @QMI_NAS_REJECT_CAUSE_MAC_FAILURE: MAC failure. * @QMI_NAS_REJECT_CAUSE_SYNCH_FAILURE: Synch failure. * @QMI_NAS_REJECT_CAUSE_CONGESTION: Congestion. * @QMI_NAS_REJECT_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH: GSM authentication unacceptable, UE security capabilities mismatch. * @QMI_NAS_REJECT_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED: Security mode rejected or unspecified. * @QMI_NAS_REJECT_CAUSE_CSG_NOT_AUTHORIZED: CSG not authorized. * @QMI_NAS_REJECT_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE: Non-EPS authentication unacceptable. * @QMI_NAS_REJECT_CAUSE_SMS_PROVIDED_BY_GPRS_IN_ROUTING_AREA: SMS provided by GPRS in routing area. * @QMI_NAS_REJECT_CAUSE_REDIRECTION_TO_5GCN_REQUIRED: Redirection to 5GCN required. * @QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED: Service option not supported. * @QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED: Requested service option not subscribed. * @QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER: Service option temporarily out of order. * @QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED: Requested service option not authorized. * @QMI_NAS_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED: Call cannot be identified. * @QMI_NAS_REJECT_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE: CS service temporarily not available. * @QMI_NAS_REJECT_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED: No EPS bearer context activated. * @QMI_NAS_REJECT_CAUSE_SEVERE_NETWORK_FAILURE: Severe network failure. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_0: Retry upon entry 0. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_1: Retry upon entry 1. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_2: Retry upon entry 2. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_3: Retry upon entry 3. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_4: Retry upon entry 4. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_5: Retry upon entry 5. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_6: Retry upon entry 6. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_7: Retry upon entry 7. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_8: Retry upon entry 8. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_9: Retry upon entry 9. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_10: Retry upon entry 10. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_11: Retry upon entry 11. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_12: Retry upon entry 12. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_13: Retry upon entry 13. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_14: Retry upon entry 14. * @QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_15: Retry upon entry 15. * @QMI_NAS_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE: Semantically incorrect message. * @QMI_NAS_REJECT_CAUSE_INVALID_MANDATORY_INFORMATION: Invalid mandatory information. * @QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTENT: Message type non existent. * @QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE: Message type not compatible. * @QMI_NAS_REJECT_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT: Information element non existent. * @QMI_NAS_REJECT_CAUSE_CONDITIONAL_INFORMATION_ELEMENT_ERROR: Conditional information element error. * @QMI_NAS_REJECT_CAUSE_MESSAGE_NOT_COMPATIBLE: Message not compatible. * @QMI_NAS_REJECT_CAUSE_UNSPECIFIED_PROTOCOL_ERROR: Unspecified protocol error. * * Reason why a request from the mobile station is rejected by the network. * * Defined in 3GPP TS 24.008 in sections 10.5.3.6 and 10.5.5.14 (detailed in * annex G) and in 3GPP TS 24.301 in section 9.9.3.9. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_NAS_REJECT_CAUSE_NONE = 0x00, QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_HLR = 0x02, QMI_NAS_REJECT_CAUSE_ILLEGAL_UE = 0x03, QMI_NAS_REJECT_CAUSE_IMSI_UNKNOWN_IN_VLR = 0x04, QMI_NAS_REJECT_CAUSE_IMEI_NOT_ACCEPTED = 0x05, QMI_NAS_REJECT_CAUSE_ILLEGAL_ME = 0x06, QMI_NAS_REJECT_CAUSE_PS_SERVICES_NOT_ALLOWED = 0x07, QMI_NAS_REJECT_CAUSE_PS_AND_NON_PS_SERVICES_NOT_ALLOWED = 0x08, QMI_NAS_REJECT_CAUSE_UE_IDENTITY_NOT_DERIVED_BY_NETWORK = 0x09, QMI_NAS_REJECT_CAUSE_IMPLICITLY_DETACHED = 0x0A, QMI_NAS_REJECT_CAUSE_PLMN_NOT_ALLOWED = 0x0B, QMI_NAS_REJECT_CAUSE_LOCATION_AREA_NOT_ALLOWED = 0x0C, QMI_NAS_REJECT_CAUSE_ROAMING_IN_LOCATION_AREA_NOT_ALLOWED = 0x0D, QMI_NAS_REJECT_CAUSE_PS_SERVICES_IN_LOCATION_AREA_NOT_ALLOWED = 0x0E, QMI_NAS_REJECT_CAUSE_NO_SUITABLE_CELLS_IN_LOCATION_AREA = 0x0F, QMI_NAS_REJECT_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE = 0x10, QMI_NAS_REJECT_CAUSE_NETWORK_FAILURE = 0x11, QMI_NAS_REJECT_CAUSE_CS_DOMAIN_NOT_AVAILABLE = 0x12, QMI_NAS_REJECT_CAUSE_ESM_FAILURE = 0x13, QMI_NAS_REJECT_CAUSE_MAC_FAILURE = 0x14, QMI_NAS_REJECT_CAUSE_SYNCH_FAILURE = 0x15, QMI_NAS_REJECT_CAUSE_CONGESTION = 0x16, QMI_NAS_REJECT_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH = 0x17, QMI_NAS_REJECT_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED = 0x18, QMI_NAS_REJECT_CAUSE_CSG_NOT_AUTHORIZED = 0x19, QMI_NAS_REJECT_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE = 0x1A, QMI_NAS_REJECT_CAUSE_SMS_PROVIDED_BY_GPRS_IN_ROUTING_AREA = 0x1C, QMI_NAS_REJECT_CAUSE_REDIRECTION_TO_5GCN_REQUIRED = 0x1F, QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_NOT_SUPPORTED = 0x20, QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED = 0x21, QMI_NAS_REJECT_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER = 0x22, QMI_NAS_REJECT_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED = 0x23, QMI_NAS_REJECT_CAUSE_CALL_CANNOT_BE_IDENTIFIED = 0x26, QMI_NAS_REJECT_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE = 0x27, QMI_NAS_REJECT_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED = 0x28, QMI_NAS_REJECT_CAUSE_SEVERE_NETWORK_FAILURE = 0x2A, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_0 = 0x30, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_1 = 0x31, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_2 = 0x32, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_3 = 0x33, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_4 = 0x34, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_5 = 0x35, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_6 = 0x36, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_7 = 0x37, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_8 = 0x38, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_9 = 0x39, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_10 = 0x3A, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_11 = 0x3B, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_12 = 0x3C, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_13 = 0x3D, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_14 = 0x3E, QMI_NAS_REJECT_CAUSE_RETRY_UPON_ENTRY_INTO_NEW_CELL_15 = 0x3F, QMI_NAS_REJECT_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE = 0x5F, QMI_NAS_REJECT_CAUSE_INVALID_MANDATORY_INFORMATION = 0x60, QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NON_EXISTENT = 0x61, QMI_NAS_REJECT_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE = 0x62, QMI_NAS_REJECT_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT = 0x63, QMI_NAS_REJECT_CAUSE_CONDITIONAL_INFORMATION_ELEMENT_ERROR = 0x64, QMI_NAS_REJECT_CAUSE_MESSAGE_NOT_COMPATIBLE = 0x65, QMI_NAS_REJECT_CAUSE_UNSPECIFIED_PROTOCOL_ERROR = 0x6F, } QmiNasRejectCause; #endif /* _LIBQMI_GLIB_QMI_ENUMS_NAS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-oma.h000066400000000000000000000133331455567757300215030ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2013 Google Inc. * Copyright (C) 2013-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_OMA_H_ #define _LIBQMI_GLIB_QMI_ENUMS_OMA_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-oma * @title: OMA enumerations and flags * @short_description: Enumerations and flags in the OMA service. * * This section defines enumerations and flags used in the OMA service * interface. */ /** * QmiOmaSessionType: * @QMI_OMA_SESSION_TYPE_CLIENT_INITIATED_DEVICE_CONFIGURE: Client-initiated device configure. * @QMI_OMA_SESSION_TYPE_CLIENT_INITIATED_PRL_UPDATE: Client-initiated PRL update. * @QMI_OMA_SESSION_TYPE_CLIENT_INITIATED_HANDS_FREE_ACTIVATION: Client-initiated hands free activation. * @QMI_OMA_SESSION_TYPE_DEVICE_INITIATED_HANDS_FREE_ACTIVATION: Device-initiated hands free activation. * @QMI_OMA_SESSION_TYPE_NETWORK_INITIATED_PRL_UPDATE: Network-initiated PRL update. * @QMI_OMA_SESSION_TYPE_NETWORK_INITIATED_DEVICE_CONFIGURE: Network-initiated device configure. * @QMI_OMA_SESSION_TYPE_DEVICE_INITIATED_PRL_UPDATE: Device-initiated PRL update. * * Type of OMA-DM session. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_OMA_SESSION_TYPE_CLIENT_INITIATED_DEVICE_CONFIGURE = 0, QMI_OMA_SESSION_TYPE_CLIENT_INITIATED_PRL_UPDATE = 1, QMI_OMA_SESSION_TYPE_CLIENT_INITIATED_HANDS_FREE_ACTIVATION = 2, QMI_OMA_SESSION_TYPE_DEVICE_INITIATED_HANDS_FREE_ACTIVATION = 3, QMI_OMA_SESSION_TYPE_NETWORK_INITIATED_PRL_UPDATE = 4, QMI_OMA_SESSION_TYPE_NETWORK_INITIATED_DEVICE_CONFIGURE = 5, QMI_OMA_SESSION_TYPE_DEVICE_INITIATED_PRL_UPDATE = 6 } QmiOmaSessionType; /** * QmiOmaSessionState: * @QMI_OMA_SESSION_STATE_COMPLETE_INFORMATION_UPDATED: Session complete and information updated. * @QMI_OMA_SESSION_STATE_COMPLETE_UPDATED_INFORMATION_UNAVAILABLE: Session complete but updated information not available. * @QMI_OMA_SESSION_STATE_FAILED: Session failed. * @QMI_OMA_SESSION_STATE_RETRYING: Session retrying. * @QMI_OMA_SESSION_STATE_CONNECTING: Session connecting. * @QMI_OMA_SESSION_STATE_CONNECTED: Session connected. * @QMI_OMA_SESSION_STATE_AUTHENTICATED: Session authenticated. * @QMI_OMA_SESSION_STATE_MDN_DOWNLOADED: MDN downloaded. * @QMI_OMA_SESSION_STATE_MSID_DOWNLOADED: MSID downloaded. * @QMI_OMA_SESSION_STATE_PRL_DOWNLOADED: PRL downloaded. * @QMI_OMA_SESSION_STATE_MIP_PROFILE_DOWNLOADED: MIP profile downloaded. * * State of the OMA-DM session. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_OMA_SESSION_STATE_COMPLETE_INFORMATION_UPDATED = 0, QMI_OMA_SESSION_STATE_COMPLETE_UPDATED_INFORMATION_UNAVAILABLE = 1, QMI_OMA_SESSION_STATE_FAILED = 2, QMI_OMA_SESSION_STATE_RETRYING = 3, QMI_OMA_SESSION_STATE_CONNECTING = 4, QMI_OMA_SESSION_STATE_CONNECTED = 5, QMI_OMA_SESSION_STATE_AUTHENTICATED = 6, QMI_OMA_SESSION_STATE_MDN_DOWNLOADED = 7, QMI_OMA_SESSION_STATE_MSID_DOWNLOADED = 8, QMI_OMA_SESSION_STATE_PRL_DOWNLOADED = 9, QMI_OMA_SESSION_STATE_MIP_PROFILE_DOWNLOADED = 10 } QmiOmaSessionState; /** * QmiOmaSessionFailedReason: * @QMI_OMA_SESSION_FAILED_REASON_UNKNOWN: Unknown reason. * @QMI_OMA_SESSION_FAILED_REASON_NETWORK_UNAVAILABLE: Network unavailable. * @QMI_OMA_SESSION_FAILED_REASON_SERVER_UNAVAILABLE: Server unavailable. * @QMI_OMA_SESSION_FAILED_REASON_AUTHENTICATION_FAILED: Authentication failed. * @QMI_OMA_SESSION_FAILED_REASON_MAX_RETRY_EXCEEDED: Maximum retries exceeded. * @QMI_OMA_SESSION_FAILED_REASON_SESSION_CANCELLED: Session cancelled. * * Session failure reason. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_OMA_SESSION_FAILED_REASON_UNKNOWN = 0, QMI_OMA_SESSION_FAILED_REASON_NETWORK_UNAVAILABLE = 1, QMI_OMA_SESSION_FAILED_REASON_SERVER_UNAVAILABLE = 2, QMI_OMA_SESSION_FAILED_REASON_AUTHENTICATION_FAILED = 3, QMI_OMA_SESSION_FAILED_REASON_MAX_RETRY_EXCEEDED = 4, QMI_OMA_SESSION_FAILED_REASON_SESSION_CANCELLED = 5 } QmiOmaSessionFailedReason; /** * QmiOmaHfaFeatureDoneState: * @QMI_OMA_HFA_FEATURE_DONE_STATE_NONE: None. * @QMI_OMA_HFA_FEATURE_DONE_STATE_SUCCEEDED: Succeeded. * @QMI_OMA_HFA_FEATURE_DONE_STATE_FAILED: Failed. * * HFA feature done state. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_OMA_HFA_FEATURE_DONE_STATE_NONE = 0, QMI_OMA_HFA_FEATURE_DONE_STATE_SUCCEEDED = 1, QMI_OMA_HFA_FEATURE_DONE_STATE_FAILED = 2 } QmiOmaHfaFeatureDoneState; #endif /* _LIBQMI_GLIB_QMI_ENUMS_OMA_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-pbm.h000066400000000000000000000126341455567757300215100ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_PBM_H_ #define _LIBQMI_GLIB_QMI_ENUMS_PBM_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-pbm * @title: PBM enumerations and flags * @short_description: Enumerations and flags in the PBM service. * * This section defines enumerations and flags used in the PBM service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI PBM Indication Register' indication */ /** * QmiPbmEventRegistrationFlag: * @QMI_PBM_EVENT_REGISTRATION_FLAG_RECORD_UPDATE: Request indications when records are added/edited/deleted. * @QMI_PBM_EVENT_REGISTRATION_FLAG_PHONEBOOK_READY: Request indications when phonebooks are ready. * @QMI_PBM_EVENT_REGISTRATION_FLAG_EMERGENCY_NUMBER_LIST: Request indications when emergency numbers are changed. * @QMI_PBM_EVENT_REGISTRATION_FLAG_HIDDEN_RECORD_STATUS: Request indications when hidden record status is changed. * @QMI_PBM_EVENT_REGISTRATION_FLAG_AAS_UPDATE: Request indications when Additional number Alpha String records are added/edited/deleted. * @QMI_PBM_EVENT_REGISTRATION_FLAG_GAS_UPDATE: Request indications when Grouping information Alpha String records are added/edited/deleted. * * Flags to use to register to phonebook indications. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_PBM_EVENT_REGISTRATION_FLAG_RECORD_UPDATE = 1 << 0, QMI_PBM_EVENT_REGISTRATION_FLAG_PHONEBOOK_READY = 1 << 1, QMI_PBM_EVENT_REGISTRATION_FLAG_EMERGENCY_NUMBER_LIST = 1 << 2, QMI_PBM_EVENT_REGISTRATION_FLAG_HIDDEN_RECORD_STATUS = 1 << 3, QMI_PBM_EVENT_REGISTRATION_FLAG_AAS_UPDATE = 1 << 4, QMI_PBM_EVENT_REGISTRATION_FLAG_GAS_UPDATE = 1 << 5, } QmiPbmEventRegistrationFlag; /*****************************************************************************/ /* Helper enums for the 'Get Capabilities' request */ /** * QmiPbmPhonebookType: * @QMI_PBM_PHONEBOOK_TYPE_ADN: Abbreviated Dialing Number. * @QMI_PBM_PHONEBOOK_TYPE_FDN: Fixed Dialing Number. * @QMI_PBM_PHONEBOOK_TYPE_MSISDN: Mobile Subscriber Integrated Services Digital Network. * @QMI_PBM_PHONEBOOK_TYPE_MBDN: Mail Box Dialing Number. * @QMI_PBM_PHONEBOOK_TYPE_SDN: Service Dialing Number. * @QMI_PBM_PHONEBOOK_TYPE_BDN: Barred Dialing Number. * @QMI_PBM_PHONEBOOK_TYPE_LND: Last Number Dialed. * @QMI_PBM_PHONEBOOK_TYPE_MBN: Mail Box Number. * * Phonebook type. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_PBM_PHONEBOOK_TYPE_ADN = 1 << 0, QMI_PBM_PHONEBOOK_TYPE_FDN = 1 << 1, QMI_PBM_PHONEBOOK_TYPE_MSISDN = 1 << 2, QMI_PBM_PHONEBOOK_TYPE_MBDN = 1 << 3, QMI_PBM_PHONEBOOK_TYPE_SDN = 1 << 4, QMI_PBM_PHONEBOOK_TYPE_BDN = 1 << 5, QMI_PBM_PHONEBOOK_TYPE_LND = 1 << 6, QMI_PBM_PHONEBOOK_TYPE_MBN = 1 << 7, } QmiPbmPhonebookType; /** * QmiPbmSessionType: * @QMI_PBM_SESSION_TYPE_GW_PRIMARY: Access phonebooks under GSM DF (ICC) or USIM application (UICC). * @QMI_PBM_SESSION_TYPE_1X_PRIMARY: Access phonebooks under CDMA DF (ICC) or CSIM application (UICC). * @QMI_PBM_SESSION_TYPE_GW_SECONDARY: Access phonebooks under GSM DF (ICC) or USIM application (UICC). Dual standby. * @QMI_PBM_SESSION_TYPE_1X_SECONDARY: Access phonebooks under CDMA DF (ICC) or CSIM application (UICC). Dual standby. * @QMI_PBM_SESSION_TYPE_NONPROVISIONING_SLOT_1: Access phonebooks under a nonprovisioning application in slot 1. * @QMI_PBM_SESSION_TYPE_NONPROVISIONING_SLOT_2: Access phonebooks under a nonprovisioning application in slot 2. * @QMI_PBM_SESSION_TYPE_GLOBAL_PHONEBOOK_SLOT_1: Access phonebooks that are not in any application of the card in slot 1. * @QMI_PBM_SESSION_TYPE_GLOBAL_PHONEBOOK_SLOT_2: Access phonebooks that are not in any application of the card in slot 2. * * Type of phonebook management session. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_PBM_SESSION_TYPE_GW_PRIMARY = 0, QMI_PBM_SESSION_TYPE_1X_PRIMARY = 1, QMI_PBM_SESSION_TYPE_GW_SECONDARY = 2, QMI_PBM_SESSION_TYPE_1X_SECONDARY = 3, QMI_PBM_SESSION_TYPE_NONPROVISIONING_SLOT_1 = 4, QMI_PBM_SESSION_TYPE_NONPROVISIONING_SLOT_2 = 5, QMI_PBM_SESSION_TYPE_GLOBAL_PHONEBOOK_SLOT_1 = 6, QMI_PBM_SESSION_TYPE_GLOBAL_PHONEBOOK_SLOT_2 = 7, } QmiPbmSessionType; #endif /* _LIBQMI_GLIB_QMI_ENUMS_PBM_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-pdc.h000066400000000000000000000045131455567757300214750ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_PDC_H_ #define _LIBQMI_GLIB_QMI_ENUMS_PDC_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-pdc * @title: PDC enumerations and flags * @short_description: Enumerations and flags in the PDC service. * * This section defines enumerations and flags used in the PDC service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI PDC' calls */ /** * QmiPdcConfigurationType: * @QMI_PDC_CONFIGURATION_TYPE_PLATFORM: Platform * @QMI_PDC_CONFIGURATION_TYPE_SOFTWARE: Software * * Configuration type for change/load configuration. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_PDC_CONFIGURATION_TYPE_PLATFORM = 0, QMI_PDC_CONFIGURATION_TYPE_SOFTWARE = 1, } QmiPdcConfigurationType; /** * QmiPdcRefreshEventType: * @QMI_PDC_REFRESH_START: Refresh start event * @QMI_PDC_REFRESH_COMPLETE: Refresh complete event * @QMI_PDC_REFRESH_CLIENT_REFRESH: Client refresh event * * Refresh event type. * * Since: 1.32 */ typedef enum { /*< since=1.32 >*/ QMI_PDC_REFRESH_START = 0, QMI_PDC_REFRESH_COMPLETE = 1, QMI_PDC_REFRESH_CLIENT_REFRESH = 2, } QmiPdcRefreshEventType; #endif /* _LIBQMI_GLIB_QMI_ENUMS_PDC_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-pds.h000066400000000000000000000206531455567757300215200ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-pds * @title: PDS enumerations and flags * @short_description: Enumerations and flags in the PDS service. * * This section defines enumerations and flags used in the PDS service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI PDS Event Report' indication */ /** * QmiPdsOperationMode: * @QMI_PDS_OPERATION_MODE_UNKNOWN: Unknown (position not fixed yet). * @QMI_PDS_OPERATION_MODE_STANDALONE: Standalone. * @QMI_PDS_OPERATION_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS. * @QMI_PDS_OPERATION_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS. * * Operation mode used to compute the position. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_PDS_OPERATION_MODE_UNKNOWN = -1, QMI_PDS_OPERATION_MODE_STANDALONE = 0, QMI_PDS_OPERATION_MODE_MS_BASED = 1, QMI_PDS_OPERATION_MODE_MS_ASSISTED = 2 } QmiPdsOperationMode; /** * QmiPdsPositionSessionStatus: * @QMI_PDS_POSITION_SESSION_STATUS_SUCCESS: Success. * @QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS: In progress. * @QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE: General failure. * @QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT: Timeout. * @QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION: User ended session. * @QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER: Bad parameter. * @QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE: Phone is offline. * @QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED: Engine locked. * @QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS: Emergency call in progress. * * Status of the positioning session. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_PDS_POSITION_SESSION_STATUS_SUCCESS = 0x00, QMI_PDS_POSITION_SESSION_STATUS_IN_PROGRESS = 0x01, QMI_PDS_POSITION_SESSION_STATUS_GENERAL_FAILURE = 0x02, QMI_PDS_POSITION_SESSION_STATUS_TIMEOUT = 0x03, QMI_PDS_POSITION_SESSION_STATUS_USER_ENDED_SESSION = 0x04, QMI_PDS_POSITION_SESSION_STATUS_BAD_PARAMETER = 0x05, QMI_PDS_POSITION_SESSION_STATUS_PHONE_OFFLINE = 0x06, QMI_PDS_POSITION_SESSION_STATUS_ENGINE_LOCKED = 0x07, QMI_PDS_POSITION_SESSION_STATUS_E911_SESSION_IN_PROGRESS = 0x08 } QmiPdsPositionSessionStatus; /** * QmiPdsDataValid: * @QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR: Timestamp calendar (GPS time). * @QMI_PDS_DATA_VALID_TIMESTAMP_UTC: Timestamp (UTC). * @QMI_PDS_DATA_VALID_LEAP_SECONDS: Leap seconds. * @QMI_PDS_DATA_VALID_TIME_UNCERTAINTY: Time uncertainty. * @QMI_PDS_DATA_VALID_LATITUDE: Latitude. * @QMI_PDS_DATA_VALID_LONGITUDE: Longitude. * @QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE: Ellipsoid altitude. * @QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE: Mean sea level altitude. * @QMI_PDS_DATA_VALID_HORIZONTAL_SPEED: Horizontal speed. * @QMI_PDS_DATA_VALID_VERTICAL_SPEED: Vertical speed. * @QMI_PDS_DATA_VALID_HEADING: Heading. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR: Horizontal uncertainty circular. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR: Horizontal uncertainty ellipse semi-major. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR: Horizontal uncertainty ellipse semi-minor. * @QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH: Horizontal uncertainty ellipse orient azimuth. * @QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY: Vertical uncertainty. * @QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY: Horizontal velocity uncertainty. * @QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY: Vertical velocity uncertainty. * @QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE: Horizontal confidence. * @QMI_PDS_DATA_VALID_POSITION_DOP: Position dillution of precision. * @QMI_PDS_DATA_VALID_HORIZONTAL_DOP: Horizontal dillution of precision. * @QMI_PDS_DATA_VALID_VERTICAL_DOP: Vertical dillution of precision. * @QMI_PDS_DATA_VALID_OPERATING_MODE: Operating mode. * * Flags to indicate which position data parameters are valid. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_PDS_DATA_VALID_TIMESTAMP_CALENDAR = 1 << 0, QMI_PDS_DATA_VALID_TIMESTAMP_UTC = 1 << 1, QMI_PDS_DATA_VALID_LEAP_SECONDS = 1 << 2, QMI_PDS_DATA_VALID_TIME_UNCERTAINTY = 1 << 3, QMI_PDS_DATA_VALID_LATITUDE = 1 << 4, QMI_PDS_DATA_VALID_LONGITUDE = 1 << 5, QMI_PDS_DATA_VALID_ELLIPSOID_ALTITUDE = 1 << 6, QMI_PDS_DATA_VALID_MEAN_SEA_LEVEL_ALTITUDE = 1 << 7, QMI_PDS_DATA_VALID_HORIZONTAL_SPEED = 1 << 8, QMI_PDS_DATA_VALID_VERTICAL_SPEED = 1 << 9, QMI_PDS_DATA_VALID_HEADING = 1 << 10, QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_CIRCULAR = 1 << 11, QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MAJOR = 1 << 12, QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_SEMI_MINOR = 1 << 13, QMI_PDS_DATA_VALID_HORIZONTAL_UNCERTAINTY_ELLIPSE_ORIENT_AZIMUTH = 1 << 14, QMI_PDS_DATA_VALID_VERTICAL_UNCERTAINTY = 1 << 15, QMI_PDS_DATA_VALID_HORIZONTAL_VELOCITY_UNCERTAINTY = 1 << 16, QMI_PDS_DATA_VALID_VERTICAL_VELOCITY_UNCERTAINTY = 1 << 17, QMI_PDS_DATA_VALID_HORIZONTAL_CONFIDENCE = 1 << 18, QMI_PDS_DATA_VALID_POSITION_DOP = 1 << 19, QMI_PDS_DATA_VALID_HORIZONTAL_DOP = 1 << 20, QMI_PDS_DATA_VALID_VERTICAL_DOP = 1 << 21, QMI_PDS_DATA_VALID_OPERATING_MODE = 1 << 22 } QmiPdsDataValid; /*****************************************************************************/ /* Helper enums for the 'QMI PDS Get GPS Service State' request/response */ /** * QmiPdsTrackingSessionState: * @QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN: Unknown state. * @QMI_PDS_TRACKING_SESSION_STATE_INACTIVE: Session inactive. * @QMI_PDS_TRACKING_SESSION_STATE_ACTIVE: Session active. * * State of the tracking session. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_PDS_TRACKING_SESSION_STATE_UNKNOWN = 0, QMI_PDS_TRACKING_SESSION_STATE_INACTIVE = 1, QMI_PDS_TRACKING_SESSION_STATE_ACTIVE = 2 } QmiPdsTrackingSessionState; /*****************************************************************************/ /* Helper enums for the 'QMI PDS Get Default Tracking Session' request/response */ /** * QmiPdsOperatingMode: * @QMI_PDS_OPERATING_MODE_STANDALONE: Standalone (GPS only). * @QMI_PDS_OPERATING_MODE_MS_BASED: Mobile Station Based (MSB) A-GPS * @QMI_PDS_OPERATING_MODE_MS_ASSISTED: Mobile Station Assisted (MSA) A-GPS. * * GPS operating mode. * * Since: 1.12 */ typedef enum { /*< since=1.12 >*/ QMI_PDS_OPERATING_MODE_STANDALONE = 0, QMI_PDS_OPERATING_MODE_MS_BASED = 1, QMI_PDS_OPERATING_MODE_MS_ASSISTED = 2, } QmiPdsOperatingMode; /*****************************************************************************/ /* Helper enums for the 'QMI PDS Get AGPS Config' request/response */ /** * QmiPdsNetworkMode: * @QMI_PDS_NETWORK_MODE_UMTS: UMTS. * @QMI_PDS_NETWORK_MODE_CDMA: CDMA. * * Network mode used during the A-GPS setup. * * Since: 1.12 */ typedef enum { /*< since=1.12 >*/ QMI_PDS_NETWORK_MODE_UMTS = 0, QMI_PDS_NETWORK_MODE_CDMA = 1, } QmiPdsNetworkMode; #endif /* _LIBQMI_GLIB_QMI_ENUMS_PDS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-private.h000066400000000000000000000055451455567757300224070ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_ #define _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_ /*****************************************************************************/ /* QMI Control */ /** * QmiCtlDataFormat: * @QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT: QoS header absent * @QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_PRESENT: QoS header present * * Controls whether the network port data format includes a QoS header or not. * Should normally be set to ABSENT. */ typedef enum { QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_ABSENT = 0, QMI_CTL_DATA_FORMAT_QOS_FLOW_HEADER_PRESENT = 1, } QmiCtlDataFormat; /** * QmiCtlDataLinkProtocol: * @QMI_CTL_DATA_LINK_PROTOCOL_802_3: data frames formatted as 802.3 Ethernet * @QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP: data frames are raw IP packets * * Determines the network port data format. */ typedef enum { QMI_CTL_DATA_LINK_PROTOCOL_UNKNOWN = 0, QMI_CTL_DATA_LINK_PROTOCOL_802_3 = 1, QMI_CTL_DATA_LINK_PROTOCOL_RAW_IP = 2, } QmiCtlDataLinkProtocol; /** * QmiCtlFlag: * @QMI_CTL_FLAG_NONE: None. * @QMI_CTL_FLAG_RESPONSE: Message is a response. * @QMI_CTL_FLAG_INDICATION: Message is an indication. * * QMI flags in messages of the %QMI_SERVICE_CTL service. */ typedef enum { QMI_CTL_FLAG_NONE = 0, QMI_CTL_FLAG_RESPONSE = 1 << 0, QMI_CTL_FLAG_INDICATION = 1 << 1 } QmiCtlFlag; /** * QmiServiceFlag: * @QMI_SERVICE_FLAG_NONE: None. * @QMI_SERVICE_FLAG_COMPOUND: Message is compound. * @QMI_SERVICE_FLAG_RESPONSE: Message is a response. * @QMI_SERVICE_FLAG_INDICATION: Message is an indication. * * QMI flags in messages which are not of the %QMI_SERVICE_CTL service. */ typedef enum { QMI_SERVICE_FLAG_NONE = 0, QMI_SERVICE_FLAG_COMPOUND = 1 << 0, QMI_SERVICE_FLAG_RESPONSE = 1 << 1, QMI_SERVICE_FLAG_INDICATION = 1 << 2 } QmiServiceFlag; #endif /* _LIBQMI_GLIB_QMI_ENUMS_PRIVATE_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-qos.h000066400000000000000000000050061455567757300215270ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2018 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_QOS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_QOS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-qos * @title: QOS enumerations and flags * @short_description: Enumerations and flags in the QOS service. * * This section defines enumerations and flags used in the QOS service * interface. */ /** * QmiQosStatus: * @QMI_QOS_STATUS_UNKNOWN: Unknown. * @QMI_QOS_STATUS_ACTIVATED: Activated. * @QMI_QOS_STATUS_SUSPENDED: Suspended. * @QMI_QOS_STATUS_GONE: Gone. * * QoS flow status. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_QOS_STATUS_UNKNOWN = 0, QMI_QOS_STATUS_ACTIVATED = 1, QMI_QOS_STATUS_SUSPENDED = 2, QMI_QOS_STATUS_GONE = 3, } QmiQosStatus; /** * QmiQosEvent: * @QMI_QOS_EVENT_UNKNOWN: Unknown. * @QMI_QOS_EVENT_ACTIVATED: Activated. * @QMI_QOS_EVENT_SUSPENDED: Suspended. * @QMI_QOS_EVENT_GONE: Gone. * @QMI_QOS_EVENT_MODIFY_ACCEPTED: Modify accepted. * @QMI_QOS_EVENT_MODIFY_REJECTED: Modify rejected. * @QMI_QOS_EVENT_INFO_CODE_UPDATED: Information code updated. * * QoS event. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_QOS_EVENT_UNKNOWN = 0, QMI_QOS_EVENT_ACTIVATED = 1, QMI_QOS_EVENT_SUSPENDED = 2, QMI_QOS_EVENT_GONE = 3, QMI_QOS_EVENT_MODIFY_ACCEPTED = 4, QMI_QOS_EVENT_MODIFY_REJECTED = 5, QMI_QOS_EVENT_INFO_CODE_UPDATED = 6, } QmiQosEvent; #endif /* _LIBQMI_GLIB_QMI_ENUMS_QOS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-sar.h000066400000000000000000000060051455567757300215120ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2020 Google Inc. */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_SAR_H_ #define _LIBQMI_GLIB_QMI_ENUMS_SAR_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-sar * @title: SAR enumerations and flags * @short_description: Enumerations and flags in the SAR service. * * This section defines enumerations and flags used in the SAR service * interface. */ /** * QmiSarRfState: * @QMI_SAR_RF_STATE_0 : RF State 0 * @QMI_SAR_RF_STATE_1 : RF State 1 * @QMI_SAR_RF_STATE_2 : RF State 2 * @QMI_SAR_RF_STATE_3 : RF State 3 * @QMI_SAR_RF_STATE_4 : RF State 4 * @QMI_SAR_RF_STATE_5 : RF State 5 * @QMI_SAR_RF_STATE_6 : RF State 6 * @QMI_SAR_RF_STATE_7 : RF State 7 * @QMI_SAR_RF_STATE_8 : RF State 8 * @QMI_SAR_RF_STATE_9 : RF State 9 * @QMI_SAR_RF_STATE_10 : RF State 10 * @QMI_SAR_RF_STATE_11 : RF State 11 * @QMI_SAR_RF_STATE_12 : RF State 12 * @QMI_SAR_RF_STATE_13 : RF State 13 * @QMI_SAR_RF_STATE_14 : RF State 14 * @QMI_SAR_RF_STATE_15 : RF State 15 * @QMI_SAR_RF_STATE_16 : RF State 16 * @QMI_SAR_RF_STATE_17 : RF State 17 * @QMI_SAR_RF_STATE_18 : RF State 18 * @QMI_SAR_RF_STATE_19 : RF State 19 * @QMI_SAR_RF_STATE_20 : RF State 20 * * SAR RF state. Each RF state corresponds to a TX power, and the mapping between TX power and RF state is dictated by NV items. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_SAR_RF_STATE_0 = 0, QMI_SAR_RF_STATE_1 = 1, QMI_SAR_RF_STATE_2 = 2, QMI_SAR_RF_STATE_3 = 3, QMI_SAR_RF_STATE_4 = 4, QMI_SAR_RF_STATE_5 = 5, QMI_SAR_RF_STATE_6 = 6, QMI_SAR_RF_STATE_7 = 7, QMI_SAR_RF_STATE_8 = 8, QMI_SAR_RF_STATE_9 = 9, QMI_SAR_RF_STATE_10 = 10, QMI_SAR_RF_STATE_11 = 11, QMI_SAR_RF_STATE_12 = 12, QMI_SAR_RF_STATE_13 = 13, QMI_SAR_RF_STATE_14 = 14, QMI_SAR_RF_STATE_15 = 15, QMI_SAR_RF_STATE_16 = 16, QMI_SAR_RF_STATE_17 = 17, QMI_SAR_RF_STATE_18 = 18, QMI_SAR_RF_STATE_19 = 19, QMI_SAR_RF_STATE_20 = 20 } QmiSarRfState; #endif /* _LIBQMI_GLIB_QMI_ENUMS_SAR_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-ssc.h000066400000000000000000000033361455567757300215210ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2023 Dylan Van Assche */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_SSC_H_ #define _LIBQMI_GLIB_QMI_ENUMS_SSC_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-ssc * @title: SSC enumerations and flags * @short_description: Enumerations and flags in the SSC service. * * This section defines enumerations and flags used in the SSC service * interface. */ /** * QmiSscReportType: * @QMI_SSC_REPORT_TYPE_SMALL: Small size report. * @QMI_SSC_REPORT_TYPE_LARGE: Large size report. * * SSC service report types. * * Since: 1.34 */ typedef enum { /*< since=1.34 >*/ QMI_SSC_REPORT_TYPE_SMALL = 0x00, QMI_SSC_REPORT_TYPE_LARGE = 0x01, } QmiSscReportType; #endif /* _LIBQMI_GLIB_QMI_ENUMS_SSC_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-uim.h000066400000000000000000000601751455567757300215270ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (c) 2023 Qualcomm Innovation Center, Inc. */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_UIM_H_ #define _LIBQMI_GLIB_QMI_ENUMS_UIM_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-uim * @title: UIM enumerations and flags * @short_description: Enumerations and flags in the UIM service. * * This section defines enumerations and flags used in the UIM service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI UIM Indication Register' indication */ /** * QmiUimEventRegistrationFlag: * @QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS: Card status. * @QMI_UIM_EVENT_REGISTRATION_FLAG_SAP_CONNECTION: SAP connection. * @QMI_UIM_EVENT_REGISTRATION_FLAG_EXTENDED_CARD_STATUS: Extended card status. * @QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS: Physical slot status. Since 1.26. * * Flags to use to register to UIM indications. * * Since: 1.22.4 */ typedef enum { /*< since=1.22.4 >*/ QMI_UIM_EVENT_REGISTRATION_FLAG_CARD_STATUS = 1 << 0, QMI_UIM_EVENT_REGISTRATION_FLAG_SAP_CONNECTION = 1 << 1, QMI_UIM_EVENT_REGISTRATION_FLAG_EXTENDED_CARD_STATUS = 1 << 2, QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS = 1 << 4, } QmiUimEventRegistrationFlag; /*****************************************************************************/ /* Helper enums for the 'QMI UIM Read Record' request/response */ /** * QmiUimSessionType: * @QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING: Primary GSM/WCDMA provisioning. * @QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING: Primary CDMA1x provisioning. * @QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING: Secondary GSM/WCDMA provisioning. * @QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING: Secondary CDMA1x provisioning. * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1: Nonprovisioning on slot 1. * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2: Nonprovisioning on slot 2. * @QMI_UIM_SESSION_TYPE_CARD_SLOT_1: Card on slot 1. * @QMI_UIM_SESSION_TYPE_CARD_SLOT_2: Card on slot 2. * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1: Logical channel on slot 1. * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2: Logical channel on slot 2. * @QMI_UIM_SESSION_TYPE_TERTIARY_GW_PROVISIONING: Tertiary GSM/WCDMA provisioning. Since 1.28. * @QMI_UIM_SESSION_TYPE_TERTIARY_1X_PROVISIONING: Tertiary CDMA1x provisioning. Since 1.28. * @QMI_UIM_SESSION_TYPE_QUATERNARY_GW_PROVISIONING: Quaternary GSM/WCDMA provisioning. Since 1.28. * @QMI_UIM_SESSION_TYPE_QUATERNARY_1X_PROVISIONING: Quaternary CDMA1x provisioning. Since 1.28. * @QMI_UIM_SESSION_TYPE_QUINARY_GW_PROVISIONING: Quinary GSM/WCDMA provisioning. Since 1.28. * @QMI_UIM_SESSION_TYPE_QUINARY_1X_PROVISIONING: Quinary CDMA1x provisioning. Since 1.28. * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_3: Nonprovisioning on slot 3. Since 1.28. * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_4: Nonprovisioning on slot 4. Since 1.28. * @QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_5: Nonprovisioning on slot 5. Since 1.28. * @QMI_UIM_SESSION_TYPE_CARD_SLOT_3: Card on slot 3. Since 1.28. * @QMI_UIM_SESSION_TYPE_CARD_SLOT_4: Card on slot 4. Since 1.28. * @QMI_UIM_SESSION_TYPE_CARD_SLOT_5: Card on slot 5. Since 1.28. * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_3: Logical channel on slot 3. Since 1.28. * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_4: Logical channel on slot 4. Since 1.28. * @QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_5: Logical channel on slot 5. Since 1.28. * * Type of UIM session. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING = 0, QMI_UIM_SESSION_TYPE_PRIMARY_1X_PROVISIONING = 1, QMI_UIM_SESSION_TYPE_SECONDARY_GW_PROVISIONING = 2, QMI_UIM_SESSION_TYPE_SECONDARY_1X_PROVISIONING = 3, QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_1 = 4, QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_2 = 5, QMI_UIM_SESSION_TYPE_CARD_SLOT_1 = 6, QMI_UIM_SESSION_TYPE_CARD_SLOT_2 = 7, QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_1 = 8, QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_2 = 9, QMI_UIM_SESSION_TYPE_TERTIARY_GW_PROVISIONING = 10, QMI_UIM_SESSION_TYPE_TERTIARY_1X_PROVISIONING = 11, QMI_UIM_SESSION_TYPE_QUATERNARY_GW_PROVISIONING = 12, QMI_UIM_SESSION_TYPE_QUATERNARY_1X_PROVISIONING = 13, QMI_UIM_SESSION_TYPE_QUINARY_GW_PROVISIONING = 14, QMI_UIM_SESSION_TYPE_QUINARY_1X_PROVISIONING = 15, QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_3 = 16, QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_4 = 17, QMI_UIM_SESSION_TYPE_NONPROVISIONING_SLOT_5 = 18, QMI_UIM_SESSION_TYPE_CARD_SLOT_3 = 19, QMI_UIM_SESSION_TYPE_CARD_SLOT_4 = 20, QMI_UIM_SESSION_TYPE_CARD_SLOT_5 = 21, QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_3 = 22, QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_4 = 23, QMI_UIM_SESSION_TYPE_LOGICAL_CHANNEL_SLOT_5 = 24, } QmiUimSessionType; /*****************************************************************************/ /* Helper enums for the 'QMI UIM Get File Attributes' request/response */ /** * QmiUimFileType: * @QMI_UIM_FILE_TYPE_TRANSPARENT: Transparent. * @QMI_UIM_FILE_TYPE_CYCLIC: Cyclic. * @QMI_UIM_FILE_TYPE_LINEAR_FIXED: Linear fixed. * @QMI_UIM_FILE_TYPE_DEDICATED_FILE: Dedicated file. * @QMI_UIM_FILE_TYPE_MASTER_FILE: Master file. * * Type of UIM file. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_UIM_FILE_TYPE_TRANSPARENT = 0, QMI_UIM_FILE_TYPE_CYCLIC = 1, QMI_UIM_FILE_TYPE_LINEAR_FIXED = 2, QMI_UIM_FILE_TYPE_DEDICATED_FILE = 3, QMI_UIM_FILE_TYPE_MASTER_FILE = 4 } QmiUimFileType; /** * QmiUimSecurityAttributeLogic: * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_ALWAYS: Always. * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_NEVER: Never. * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_AND: And. * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_OR: Or. * @QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_SINGLE: Single. * * Logic applicable to security attributes. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_ALWAYS = 0, QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_NEVER = 1, QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_AND = 2, QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_OR = 3, QMI_UIM_SECURITY_ATTRIBUTE_LOGIC_SINGLE = 4 } QmiUimSecurityAttributeLogic; /** * QmiUimSecurityAttribute: * @QMI_UIM_SECURITY_ATTRIBUTE_PIN1: PIN1. * @QMI_UIM_SECURITY_ATTRIBUTE_PIN2: PIN2. * @QMI_UIM_SECURITY_ATTRIBUTE_UPIN: UPIN. * @QMI_UIM_SECURITY_ATTRIBUTE_ADM: ADM. * * Security Attributes. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_UIM_SECURITY_ATTRIBUTE_PIN1 = 1 << 0, QMI_UIM_SECURITY_ATTRIBUTE_PIN2 = 1 << 1, QMI_UIM_SECURITY_ATTRIBUTE_UPIN = 1 << 2, QMI_UIM_SECURITY_ATTRIBUTE_ADM = 1 << 3 } QmiUimSecurityAttribute; /*****************************************************************************/ /* Helper enums for the 'QMI UIM Set PIN Protection' */ /** * QmiUimPinId: * @QMI_UIM_PIN_ID_UNKNOWN: Unknown. * @QMI_UIM_PIN_ID_PIN1: PIN1. * @QMI_UIM_PIN_ID_PIN2: PIN2. * @QMI_UIM_PIN_ID_UPIN: UPIN. * @QMI_UIM_PIN_ID_HIDDEN_KEY: Hidden key. * * PIN ID. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_UIM_PIN_ID_UNKNOWN = 0, QMI_UIM_PIN_ID_PIN1 = 1, QMI_UIM_PIN_ID_PIN2 = 2, QMI_UIM_PIN_ID_UPIN = 3, QMI_UIM_PIN_ID_HIDDEN_KEY = 4 } QmiUimPinId; /*****************************************************************************/ /* Helper enums for the 'QMI UIM Get Card Status' request/response */ /** * QmiUimCardState: * @QMI_UIM_CARD_STATE_ABSENT: Absent. * @QMI_UIM_CARD_STATE_PRESENT: Present. * @QMI_UIM_CARD_STATE_ERROR: Error. * * State of the card. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_UIM_CARD_STATE_ABSENT = 0, QMI_UIM_CARD_STATE_PRESENT = 1, QMI_UIM_CARD_STATE_ERROR = 2 } QmiUimCardState; /** * QmiUimPinState: * @QMI_UIM_PIN_STATE_NOT_INITIALIZED: Not initialized. * @QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED: Enabled, not verified. * @QMI_UIM_PIN_STATE_ENABLED_VERIFIED: Enabled, verified. * @QMI_UIM_PIN_STATE_DISABLED: Disabled. * @QMI_UIM_PIN_STATE_BLOCKED: Blocked. * @QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED: Permanently Blocked. * * The PIN state. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_UIM_PIN_STATE_NOT_INITIALIZED = 0, QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED = 1, QMI_UIM_PIN_STATE_ENABLED_VERIFIED = 2, QMI_UIM_PIN_STATE_DISABLED = 3, QMI_UIM_PIN_STATE_BLOCKED = 4, QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED = 5, } QmiUimPinState; /** * QmiUimCardError: * @QMI_UIM_CARD_ERROR_UNKNOWN: Unknown error. * @QMI_UIM_CARD_ERROR_POWER_DOWN: Power down. * @QMI_UIM_CARD_ERROR_POLL: Poll error. * @QMI_UIM_CARD_ERROR_NO_ATR_RECEIVED: No ATR received. * @QMI_UIM_CARD_ERROR_VOLTAGE_MISMATCH: Voltage mismatch. * @QMI_UIM_CARD_ERROR_PARITY: Parity error. * @QMI_UIM_CARD_ERROR_POSSIBLY_REMOVED: Unknown error, possibly removed. * @QMI_UIM_CARD_ERROR_TECHNICAL: Technical problem. * * Card error. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_UIM_CARD_ERROR_UNKNOWN = 0, QMI_UIM_CARD_ERROR_POWER_DOWN = 1, QMI_UIM_CARD_ERROR_POLL = 2, QMI_UIM_CARD_ERROR_NO_ATR_RECEIVED = 3, QMI_UIM_CARD_ERROR_VOLTAGE_MISMATCH = 4, QMI_UIM_CARD_ERROR_PARITY = 5, QMI_UIM_CARD_ERROR_POSSIBLY_REMOVED = 6, QMI_UIM_CARD_ERROR_TECHNICAL = 7 } QmiUimCardError; /** * QmiUimCardApplicationType: * @QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN: Unknown. * @QMI_UIM_CARD_APPLICATION_TYPE_SIM: SIM. * @QMI_UIM_CARD_APPLICATION_TYPE_USIM: USIM. * @QMI_UIM_CARD_APPLICATION_TYPE_RUIM: RUIM. * @QMI_UIM_CARD_APPLICATION_TYPE_CSIM: CSIM. * @QMI_UIM_CARD_APPLICATION_TYPE_ISIM: ISIM. * * Card application type. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN = 0, QMI_UIM_CARD_APPLICATION_TYPE_SIM = 1, QMI_UIM_CARD_APPLICATION_TYPE_USIM = 2, QMI_UIM_CARD_APPLICATION_TYPE_RUIM = 3, QMI_UIM_CARD_APPLICATION_TYPE_CSIM = 4, QMI_UIM_CARD_APPLICATION_TYPE_ISIM = 5, } QmiUimCardApplicationType; /** * QmiUimCardApplicationState: * @QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN: Unknown. * @QMI_UIM_CARD_APPLICATION_STATE_DETECTED: Detected. * @QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED: PIN1 or UPIN PIN required. * @QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED: PUK1 or UPIN PUK required. * @QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE: Personalization state must be checked. * @QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED: PIN1 blocked. * @QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL: Illegal. * @QMI_UIM_CARD_APPLICATION_STATE_READY: Ready * * Card application state. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_UIM_CARD_APPLICATION_STATE_UNKNOWN = 0, QMI_UIM_CARD_APPLICATION_STATE_DETECTED = 1, QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED = 2, QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED = 3, QMI_UIM_CARD_APPLICATION_STATE_CHECK_PERSONALIZATION_STATE = 4, QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED = 5, QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL = 6, QMI_UIM_CARD_APPLICATION_STATE_READY = 7, } QmiUimCardApplicationState; /** * QmiUimCardApplicationPersonalizationState: * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_UNKNOWN: Unknown. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_IN_PROGRESS: Operation in progress. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_READY: Ready. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_CODE_REQUIRED: Code required. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PUK_CODE_REQUIRED: PUK code required. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PERMANENTLY_BLOCKED: Permanently blocked- * * Card application personalization state. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_UNKNOWN = 0, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_IN_PROGRESS = 1, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_READY = 2, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_CODE_REQUIRED = 3, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PUK_CODE_REQUIRED = 4, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PERMANENTLY_BLOCKED = 5, } QmiUimCardApplicationPersonalizationState; /** * QmiUimCardApplicationPersonalizationFeature: * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK: GW network. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET: GW network subset. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER: GW service provider. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CORPORATE: GW corporate. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_UIM: UIM. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_1: 1X network type 1. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_2: 1X network type 2. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_HRPD: 1X HRPD. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_SERVICE_PROVIDER: 1X service provider. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_CORPORATE: 1X corporate. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_RUIM: 1X R-UIM. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER_NAME: GW SPN. Since 1.34. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SP_EHPLMN: GW SP + EHPLMN. Since 1.34. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_ICCID: GW ICCID. Since 1.34. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_IMPI: GW IMPI. Since 1.34. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET_SERVICE_PROVIDER: GW network subset and service provider. Since 1.34. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CARRIER: GW carrier. Since 1.34. * * Card application personalization feature, when a code is required. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK = 0, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET = 1, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER = 2, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CORPORATE = 3, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_UIM = 4, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_1 = 5, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_NETWORK_TYPE_2 = 6, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_HRPD = 7, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_SERVICE_PROVIDER = 8, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_CORPORATE = 9, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_1X_RUIM = 10, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SERVICE_PROVIDER_NAME = 11, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_SP_EHPLMN = 12, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_ICCID = 13, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_IMPI = 14, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_NETWORK_SUBSET_SERVICE_PROVIDER = 15, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_GW_CARRIER = 16, } QmiUimCardApplicationPersonalizationFeature; /** * QmiUimCardApplicationPersonalizationFeatureStatus: * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_NETWORK: GW network. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_NETWORK_SUBSET: GW network subset. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_SERVICE_PROVIDER: GW service provider. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_CORPORATE: GW corporate. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_UIM: UIM. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_NETWORK_TYPE_1: 1X network type 1. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_NETWORK_TYPE_2: 1X network type 2. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_HRPD: 1X HRPD. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_SERVICE_PROVIDER: 1X service provider. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_CORPORATE: 1X corporate. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_RUIM: 1X R-UIM. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_UNKNOWN: Unknown. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_SERVICE_PROVIDER_NAME: GW service provider name. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_SP_EHPLMN: GW SP + EHPLMN. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_ICCID: GW ICCID. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_IMPI: GW IMPI. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_NETWORK_SUBSET_SERVICE_PROVIDER: GW network subset and service provider. * @QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_CARRIER: GW carrier. * * Card application personalization feature status. * * Since: 1.34 */ typedef enum { /*< since=1.34 >*/ QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_NETWORK = 0, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_NETWORK_SUBSET = 1, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_SERVICE_PROVIDER = 2, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_CORPORATE = 3, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_UIM = 4, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_NETWORK_TYPE_1 = 5, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_NETWORK_TYPE_2 = 6, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_HRPD = 7, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_SERVICE_PROVIDER = 8, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_CORPORATE = 9, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_1X_RUIM = 10, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_UNKNOWN = 11, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_SERVICE_PROVIDER_NAME = 12, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_SP_EHPLMN = 13, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_ICCID = 14, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_IMPI = 15, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_NETWORK_SUBSET_SERVICE_PROVIDER = 16, QMI_UIM_CARD_APPLICATION_PERSONALIZATION_FEATURE_STATUS_GW_CARRIER = 17, } QmiUimCardApplicationPersonalizationFeatureStatus; /*****************************************************************************/ /* Helper enums for the 'QMI UIM Refresh' indication */ /** * QmiUimRefreshStage: * @QMI_UIM_REFRESH_STAGE_WAIT_FOR_OK: Waiting for REFRESH OK message. * @QMI_UIM_REFRESH_STAGE_START: Refresh started. * @QMI_UIM_REFRESH_STAGE_END_WITH_SUCCESS: Refresh completed successfully. * @QMI_UIM_REFRESH_STAGE_END_WITH_FAILURE: Refresh has failed. * * Current stage of the refresh procedure. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_UIM_REFRESH_STAGE_WAIT_FOR_OK = 0, QMI_UIM_REFRESH_STAGE_START = 1, QMI_UIM_REFRESH_STAGE_END_WITH_SUCCESS = 2, QMI_UIM_REFRESH_STAGE_END_WITH_FAILURE = 3 } QmiUimRefreshStage; /** * QmiUimRefreshMode: * @QMI_UIM_REFRESH_MODE_RESET: Reset. * @QMI_UIM_REFRESH_MODE_INIT: Init. * @QMI_UIM_REFRESH_MODE_INIT_FCN: Init & FCN. * @QMI_UIM_REFRESH_MODE_FCN: FCN. * @QMI_UIM_REFRESH_MODE_INIT_FULL_FCN: Init & full FCN. * @QMI_UIM_REFRESH_MODE_APP_RESET: Application reset. * @QMI_UIM_REFRESH_MODE_3G_RESET: 3G session reset. * * Refresh mode * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_UIM_REFRESH_MODE_RESET = 0, QMI_UIM_REFRESH_MODE_INIT = 1, QMI_UIM_REFRESH_MODE_INIT_FCN = 2, QMI_UIM_REFRESH_MODE_FCN = 3, QMI_UIM_REFRESH_MODE_INIT_FULL_FCN = 4, QMI_UIM_REFRESH_MODE_APP_RESET = 5, QMI_UIM_REFRESH_MODE_3G_RESET = 6 } QmiUimRefreshMode; /*****************************************************************************/ /* Helper enums for the 'QMI UIM Get Slot Status' request/response */ /** * QmiUimPhysicalCardState: * @QMI_UIM_PHYSICAL_CARD_STATE_UNKNOWN: Unknown. * @QMI_UIM_PHYSICAL_CARD_STATE_ABSENT: Absent. * @QMI_UIM_PHYSICAL_CARD_STATE_PRESENT: Present. * * State of the physical card. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_UIM_PHYSICAL_CARD_STATE_UNKNOWN = 0, QMI_UIM_PHYSICAL_CARD_STATE_ABSENT = 1, QMI_UIM_PHYSICAL_CARD_STATE_PRESENT = 2, } QmiUimPhysicalCardState; /** * QmiUimSlotState: * @QMI_UIM_SLOT_STATE_INACTIVE: Inactive. * @QMI_UIM_SLOT_STATE_ACTIVE: Active. * * State of the slot. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_UIM_SLOT_STATE_INACTIVE = 0, QMI_UIM_SLOT_STATE_ACTIVE = 1, } QmiUimSlotState; /** * QmiUimCardProtocol: * @QMI_UIM_CARD_PROTOCOL_UNKNOWN: Unknown. * @QMI_UIM_CARD_PROTOCOL_ICC: ICC protocol. * @QMI_UIM_CARD_PROTOCOL_UICC: UICC protocol. * * Protocol for the card. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_UIM_CARD_PROTOCOL_UNKNOWN = 0, QMI_UIM_CARD_PROTOCOL_ICC = 1, QMI_UIM_CARD_PROTOCOL_UICC = 2, } QmiUimCardProtocol; /** * QmiUimConfiguration: * @QMI_UIM_CONFIGURATION_AUTOMATIC_SELECTION: Automatic selection. * @QMI_UIM_CONFIGURATION_PERSONALIZATION_STATUS: Personalization status. * @QMI_UIM_CONFIGURATION_HALT_SUBSCRIPTION: Halt publication of subscription. * * Requested configurations. If none explicitly requested, all configuration * items are returned. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_UIM_CONFIGURATION_AUTOMATIC_SELECTION = 1 << 0, QMI_UIM_CONFIGURATION_PERSONALIZATION_STATUS = 1 << 1, QMI_UIM_CONFIGURATION_HALT_SUBSCRIPTION = 1 << 2, } QmiUimConfiguration; /** * QmiUimDepersonalizationOperation: * @QMI_UIM_DEPERSONALIZATION_OPERATION_DEACTIVATE: Deactivate personalization * @QMI_UIM_DEPERSONALIZATION_OPERATION_UNBLOCK: Unblock personalization * * Depersonalization operation to perform. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_UIM_DEPERSONALIZATION_OPERATION_DEACTIVATE = 0, QMI_UIM_DEPERSONALIZATION_OPERATION_UNBLOCK = 1, } QmiUimDepersonalizationOperation; #endif /* _LIBQMI_GLIB_QMI_ENUMS_UIM_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-voice.h000066400000000000000000001472241455567757300220430ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2014-2020 Aleksander Morgado * Copyright (C) 2019-2020 Alexander Couzens */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_VOICE_H_ #define _LIBQMI_GLIB_QMI_ENUMS_VOICE_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-voice * @title: VOICE enumerations and flags * @short_description: Enumerations and flags in the VOICE service. * * This section defines enumerations and flags used in the VOICE service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI Voice All Call Status' indication */ /** * QmiVoiceCallState: * @QMI_VOICE_CALL_STATE_UNKNOWN: Unknown state. * @QMI_VOICE_CALL_STATE_ORIGINATION: Call is being originated. * @QMI_VOICE_CALL_STATE_INCOMING: Incoming call. * @QMI_VOICE_CALL_STATE_CONVERSATION: Call is in progress. * @QMI_VOICE_CALL_STATE_CC_IN_PROGRESS: Call is originating but waiting for call control to complete. * @QMI_VOICE_CALL_STATE_ALERTING: Alerting. * @QMI_VOICE_CALL_STATE_HOLD: On hold. * @QMI_VOICE_CALL_STATE_WAITING: Waiting. * @QMI_VOICE_CALL_STATE_DISCONNECTING: Disconnecting. * @QMI_VOICE_CALL_STATE_END: Call is finished. * @QMI_VOICE_CALL_STATE_SETUP: 3GPP specific. MT call is in setup state. * * State of a call. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_CALL_STATE_UNKNOWN = 0x00, QMI_VOICE_CALL_STATE_ORIGINATION = 0x01, QMI_VOICE_CALL_STATE_INCOMING = 0x02, QMI_VOICE_CALL_STATE_CONVERSATION = 0x03, QMI_VOICE_CALL_STATE_CC_IN_PROGRESS = 0x04, QMI_VOICE_CALL_STATE_ALERTING = 0x05, QMI_VOICE_CALL_STATE_HOLD = 0x06, QMI_VOICE_CALL_STATE_WAITING = 0x07, QMI_VOICE_CALL_STATE_DISCONNECTING = 0x08, QMI_VOICE_CALL_STATE_END = 0x09, QMI_VOICE_CALL_STATE_SETUP = 0x0A, } QmiVoiceCallState; /** * QmiVoiceCallType: * @QMI_VOICE_CALL_TYPE_VOICE: Voice call. * @QMI_VOICE_CALL_TYPE_VOICE_IP: VoIP call. * @QMI_VOICE_CALL_TYPE_OTAPA: OTAPA. * @QMI_VOICE_CALL_TYPE_NON_STD_OTASP: Non-standard OTASP. * @QMI_VOICE_CALL_TYPE_EMERGENCY: Emergency call. * @QMI_VOICE_CALL_TYPE_SUPS: Supplementary service. * * Type of a voice call. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_CALL_TYPE_VOICE = 0x00, QMI_VOICE_CALL_TYPE_VOICE_IP = 0x02, QMI_VOICE_CALL_TYPE_OTAPA = 0x06, QMI_VOICE_CALL_TYPE_NON_STD_OTASP = 0x08, QMI_VOICE_CALL_TYPE_EMERGENCY = 0x09, QMI_VOICE_CALL_TYPE_SUPS = 0x0A, } QmiVoiceCallType; /** * QmiVoiceCallDirection: * @QMI_VOICE_CALL_DIRECTION_UNKNOWN: Unknown. * @QMI_VOICE_CALL_DIRECTION_MO: Mobile-originated. * @QMI_VOICE_CALL_DIRECTION_MT: Mobile-terminated. * * Call direction. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_CALL_DIRECTION_UNKNOWN = 0x00, QMI_VOICE_CALL_DIRECTION_MO = 0x01, QMI_VOICE_CALL_DIRECTION_MT = 0x02, } QmiVoiceCallDirection; /** * QmiVoiceCallMode: * @QMI_VOICE_CALL_MODE_UNKNOWN: Unknown. * @QMI_VOICE_CALL_MODE_CDMA: CDMA. * @QMI_VOICE_CALL_MODE_GSM: GSM. * @QMI_VOICE_CALL_MODE_UMTS: UMTS. * @QMI_VOICE_CALL_MODE_LTE: LTE. * * Call mode. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_CALL_MODE_UNKNOWN = 0x00, QMI_VOICE_CALL_MODE_CDMA = 0x01, QMI_VOICE_CALL_MODE_GSM = 0x02, QMI_VOICE_CALL_MODE_UMTS = 0x03, QMI_VOICE_CALL_MODE_LTE = 0x04, } QmiVoiceCallMode; /** * QmiVoiceAls: * @QMI_VOICE_ALS_LINE_1: Line 1, default. * @QMI_VOICE_ALS_LINE_2: Line 2. * * ALS line indicator. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_ALS_LINE_1 = 0x00, QMI_VOICE_ALS_LINE_2 = 0x01, } QmiVoiceAls; /** * QmiVoicePresentation: * @QMI_VOICE_PRESENTATION_ALLOWED: Allowed presentation. * @QMI_VOICE_PRESENTATION_RESTRICTED: Restricted presentation. * @QMI_VOICE_PRESENTATION_UNAVAILABLE: Unavailable presentation. * @QMI_VOICE_PRESENTATION_PAYPHONE: 3GPP specific. Payphone presentation. * * Remote party number presentation indicator. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_PRESENTATION_ALLOWED = 0x00, QMI_VOICE_PRESENTATION_RESTRICTED = 0x01, QMI_VOICE_PRESENTATION_UNAVAILABLE = 0x02, QMI_VOICE_PRESENTATION_PAYPHONE = 0x04, } QmiVoicePresentation; /*****************************************************************************/ /* Helper enums for the 'QMI Voice Get Config' request/response */ /** * QmiVoiceTtyMode: * @QMI_VOICE_TTY_MODE_FULL: Full. * @QMI_VOICE_TTY_MODE_VCO: Voice carry over. * @QMI_VOICE_TTY_MODE_HCO: Hearing carry over. * @QMI_VOICE_TTY_MODE_OFF: Off. * * TTY mode. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_TTY_MODE_FULL = 0x00, QMI_VOICE_TTY_MODE_VCO = 0x01, QMI_VOICE_TTY_MODE_HCO = 0x02, QMI_VOICE_TTY_MODE_OFF = 0x03, } QmiVoiceTtyMode; /** * QmiVoiceServiceOption: * @QMI_VOICE_SERVICE_OPTION_WILD: Any service option. * @QMI_VOICE_SERVICE_OPTION_IS_96A: IS-96A. * @QMI_VOICE_SERVICE_OPTION_EVRC: EVRC. * @QMI_VOICE_SERVICE_OPTION_13K_IS733: IS733. * @QMI_VOICE_SERVICE_OPTION_SELECTABLE_MODE_VOCODER: Selectable mode vocoder. * @QMI_VOICE_SERVICE_OPTION_4GV_NARROW_BAND: 4GV narrowband. * @QMI_VOICE_SERVICE_OPTION_4GV_WIDE_BAND: 4GV wideband. * @QMI_VOICE_SERVICE_OPTION_13K: 13K. * @QMI_VOICE_SERVICE_OPTION_IS_96: IS-96. * @QMI_VOICE_SERVICE_OPTION_WVRC: WVRC. * * Service option. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_SERVICE_OPTION_WILD = 0x0000, QMI_VOICE_SERVICE_OPTION_IS_96A = 0x0001, QMI_VOICE_SERVICE_OPTION_EVRC = 0x0003, QMI_VOICE_SERVICE_OPTION_13K_IS733 = 0x0011, QMI_VOICE_SERVICE_OPTION_SELECTABLE_MODE_VOCODER = 0x0038, QMI_VOICE_SERVICE_OPTION_4GV_NARROW_BAND = 0x0044, QMI_VOICE_SERVICE_OPTION_4GV_WIDE_BAND = 0x0046, QMI_VOICE_SERVICE_OPTION_13K = 0x8000, QMI_VOICE_SERVICE_OPTION_IS_96 = 0x8001, QMI_VOICE_SERVICE_OPTION_WVRC = 0x8023, } QmiVoiceServiceOption; /** * QmiVoiceWcdmaAmrStatus: * @QMI_VOICE_WCDMA_AMR_STATUS_NOT_SUPPORTED: Not supported. * @QMI_VOICE_WCDMA_AMR_STATUS_WCDMA_AMR_WB: WCDMA AMR wideband. * @QMI_VOICE_WCDMA_AMR_STATUS_GSM_HR_AMR: GSM half-rate AMR. * @QMI_VOICE_WCDMA_AMR_STATUS_GSM_AMR_WB: GSM AMR wideband. * @QMI_VOICE_WCDMA_AMR_STATUS_GSM_AMR_NB: GSM AMR narrowband. * * WCDMA AMR status. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_WCDMA_AMR_STATUS_NOT_SUPPORTED = 1 << 0, QMI_VOICE_WCDMA_AMR_STATUS_WCDMA_AMR_WB = 1 << 1, QMI_VOICE_WCDMA_AMR_STATUS_GSM_HR_AMR = 1 << 2, QMI_VOICE_WCDMA_AMR_STATUS_GSM_AMR_WB = 1 << 3, QMI_VOICE_WCDMA_AMR_STATUS_GSM_AMR_NB = 1 << 4, } QmiVoiceWcdmaAmrStatus; /** * QmiVoicePrivacy: * @QMI_VOICE_PRIVACY_STANDARD: Standard. * @QMI_VOICE_PRIVACY_ENHANCED: Enhanced. * * Voice privacy. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_PRIVACY_STANDARD = 0x00, QMI_VOICE_PRIVACY_ENHANCED = 0x01, } QmiVoicePrivacy; /** * QmiVoiceDomain: * @QMI_VOICE_DOMAIN_CS_ONLY: CS-only. * @QMI_VOICE_DOMAIN_PS_ONLY: PS-only. * @QMI_VOICE_DOMAIN_CS_PREFERRED: CS preferred, PS secondary. * @QMI_VOICE_DOMAIN_PS_PREFERRED: PS preferred, CS secondary. * * Voice domain preference. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_VOICE_DOMAIN_CS_ONLY = 0x00, QMI_VOICE_DOMAIN_PS_ONLY = 0x01, QMI_VOICE_DOMAIN_CS_PREFERRED = 0x02, QMI_VOICE_DOMAIN_PS_PREFERRED = 0x03, } QmiVoiceDomain; /** * QmiVoiceUserAction: * @QMI_VOICE_USER_ACTION_UNKNOWN: Unknown user action. * @QMI_VOICE_USER_ACTION_NOT_REQUIRED: User is not required to respond to the USSD code. * @QMI_VOICE_USER_ACTION_REQUIRED: User is required to respond to the USSD code. * * User action type. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_VOICE_USER_ACTION_UNKNOWN = 0x00, QMI_VOICE_USER_ACTION_NOT_REQUIRED = 0x01, QMI_VOICE_USER_ACTION_REQUIRED = 0x02, } QmiVoiceUserAction; /** * QmiVoiceUssDataCodingScheme: * @QMI_VOICE_USS_DATA_CODING_SCHEME_UNKNOWN: Unknown. * @QMI_VOICE_USS_DATA_CODING_SCHEME_ASCII: ASCII coding scheme. * @QMI_VOICE_USS_DATA_CODING_SCHEME_8BIT: 8-bit coding scheme. * @QMI_VOICE_USS_DATA_CODING_SCHEME_UCS2: UCS2. * * Data Coding Scheme used in USSD operations. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_VOICE_USS_DATA_CODING_SCHEME_UNKNOWN = 0x00, QMI_VOICE_USS_DATA_CODING_SCHEME_ASCII = 0x01, QMI_VOICE_USS_DATA_CODING_SCHEME_8BIT = 0x02, QMI_VOICE_USS_DATA_CODING_SCHEME_UCS2 = 0x03, } QmiVoiceUssDataCodingScheme; /** * QmiVoiceAlphaDataCodingScheme: * @QMI_VOICE_ALPHA_DATA_CODING_SCHEME_GSM: SMS default 7-bit coded alphabet. * @QMI_VOICE_ALPHA_DATA_CODING_SCHEME_UCS2: UCS2. * * Alpha Coding Scheme. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_VOICE_ALPHA_DATA_CODING_SCHEME_GSM = 0x01, QMI_VOICE_ALPHA_DATA_CODING_SCHEME_UCS2 = 0x02, } QmiVoiceAlphaDataCodingScheme; /** * QmiVoiceCallEndReason: * @QMI_VOICE_CALL_END_REASON_OFFLINE: Device is offline. * @QMI_VOICE_CALL_END_REASON_CDMA_LOCK: CDMA specific. Phone is CDMA locked. * @QMI_VOICE_CALL_END_REASON_NO_SERVICE: Device has no service. * @QMI_VOICE_CALL_END_REASON_FADE: Fade. * @QMI_VOICE_CALL_END_REASON_INTERCEPT: CDMA specific. Received intercept from the BS. * @QMI_VOICE_CALL_END_REASON_REORDER: CDMA specific. Received reorder from the BS. * @QMI_VOICE_CALL_END_REASON_RELEASE_NORMAL: Received release from the BS. * @QMI_VOICE_CALL_END_REASON_RELEASE_SO_REJECT: CDMA specific. Received release from the BS. * @QMI_VOICE_CALL_END_REASON_INCOMING_CALL: CDMA specific. Received incoming call from the BS. * @QMI_VOICE_CALL_END_REASON_ALERT_STOP: CDMA specific. Received alert stop from the BS. * @QMI_VOICE_CALL_END_REASON_CLIENT_END: Client ended the call. * @QMI_VOICE_CALL_END_REASON_ACTIVATION: CDMA specific. Received end activation. * @QMI_VOICE_CALL_END_REASON_MC_ABORT: CDMA specific. MC aborted the origination/conversation. * @QMI_VOICE_CALL_END_REASON_MAX_ACCESS_PROBE: CDMA specific. Maximum access probes transmitted. * @QMI_VOICE_CALL_END_REASON_PSIST_N: CDMA specific. Persistence test failure. * @QMI_VOICE_CALL_END_REASON_UIM_NOT_PRESENT: R-UIM not present. * @QMI_VOICE_CALL_END_REASON_ACCESS_ATTEMPT_IN_PROGRESS: Access attempt in progress. * @QMI_VOICE_CALL_END_REASON_ACCESS_FAILURE: Access failure. * @QMI_VOICE_CALL_END_REASON_ACCESS_RETRY_ORDER: CDMA specific. Retry order. * @QMI_VOICE_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS: CDMA specific. Concurrent service not supported by the BS. * @QMI_VOICE_CALL_END_REASON_NO_RESPONSE_FROM_BS: CDMA specific. No response received from the BS. * @QMI_VOICE_CALL_END_REASON_REJECTED_BY_BS: CDMA specific. Rejected by the BS. * @QMI_VOICE_CALL_END_REASON_INCOMPATIBLE: CDMA specific. Concurrent services requested are incompatible. * @QMI_VOICE_CALL_END_REASON_ACCESS_BLOCK: CDMA specific. Access blocked by the BS. * @QMI_VOICE_CALL_END_REASON_ALREADY_IN_TC: Already in TC. * @QMI_VOICE_CALL_END_REASON_EMERGENCY_FLASHED: CDMA specific. Emergency call is flashed over this call. * @QMI_VOICE_CALL_END_REASON_USER_CALL_ORIGINATED_DURING_GPS: Call originated during GPS. * @QMI_VOICE_CALL_END_REASON_USER_CALL_ORIGINATED_DURING_SMS: Call originated during SMS. * @QMI_VOICE_CALL_END_REASON_USER_CALL_ORIGINATED_DURING_DATA: Call originated during data. * @QMI_VOICE_CALL_END_REASON_REDIRECTION_OR_HANDOFF: Redirection or handoff. * @QMI_VOICE_CALL_END_REASON_ACCESS_BLOCK_ALL: Access blocked by BS for all. * @QMI_VOICE_CALL_END_REASON_OTASP_SPC_ERR: OTASP SPC error indication. * @QMI_VOICE_CALL_END_REASON_IS707B_MAX_ACCESS_PROBES: Maximum access probes for IS-707B call. * @QMI_VOICE_CALL_END_REASON_ACCESS_FAILURE_REJECT_ORDER: Base station reject order. * @QMI_VOICE_CALL_END_REASON_ACCESS_FAILURE_RETRY_ORDER: Base station retry order. * @QMI_VOICE_CALL_END_REASON_TIMEOUT_T42: Timer T42 expired. * @QMI_VOICE_CALL_END_REASON_TIMEOUT_T40: Timer T40 expired. * @QMI_VOICE_CALL_END_REASON_SERVICE_INIT_FAILURE: Service initialization failure. * @QMI_VOICE_CALL_END_REASON_TIMEOUT_T50: Timer T50 expired. * @QMI_VOICE_CALL_END_REASON_TIMEOUT_T51: Timer T51 expired. * @QMI_VOICE_CALL_END_REASON_RL_ACK_TIMEOUT: Acknowledgement timeout due to 12 retransmissions. * @QMI_VOICE_CALL_END_REASON_BAD_FORWARD_LINK: Bad forward link or timer T5M expired. * @QMI_VOICE_CALL_END_REASON_TRM_REQUEST_FAILED: Transceiver Resource Manager request failed. * @QMI_VOICE_CALL_END_REASON_TIMEOUT_T41: Timer T41 expired. * @QMI_VOICE_CALL_END_REASON_INCOMING_REJECTED: GSM/WCDMA specific. Client rejected incoming call. * @QMI_VOICE_CALL_END_REASON_SETUP_REJECTED: GSM/WCDMA specific. Client rejected a setup indication. * @QMI_VOICE_CALL_END_REASON_NETWORK_END: GSM/WCDMA specific. Network ended the call. * @QMI_VOICE_CALL_END_REASON_NO_FUNDS: GSM/WCDMA specific. No funds. * @QMI_VOICE_CALL_END_REASON_NO_GW_SERVICE: GSM/WCDMA specific. Device has no service. * @QMI_VOICE_CALL_END_REASON_NO_CDMA_SERVICE: CDMA specific. Device has no service. * @QMI_VOICE_CALL_END_REASON_NO_FULL_SERVICE: Full service is unavailable. * @QMI_VOICE_CALL_END_REASON_MAX_PS_CALLS: No resources available to handle a new MO/MT PS call. * @QMI_VOICE_CALL_END_REASON_UNKNOWN_SUBSCRIBER: Unknown subscriber. * @QMI_VOICE_CALL_END_REASON_ILLEGAL_SUBSCRIBER: Illegal subscriber. * @QMI_VOICE_CALL_END_REASON_BEARER_SERVICE_NOT_PROVISIONED: Bearer service not provisioned. * @QMI_VOICE_CALL_END_REASON_TELE_SERVICE_NOT_PROVISIONED: Tele service not provisioned. * @QMI_VOICE_CALL_END_REASON_ILLEGAL_EQUIPMENT: Illegal equipment. * @QMI_VOICE_CALL_END_REASON_CALL_BARRED: Call barred. * @QMI_VOICE_CALL_END_REASON_ILLEGAL_SS_OPERATION: Illegal SS operation. * @QMI_VOICE_CALL_END_REASON_SS_ERROR_STATUS: Supplementary service error status. * @QMI_VOICE_CALL_END_REASON_SS_NOT_AVAILABLE: Supplementary service not available. * @QMI_VOICE_CALL_END_REASON_SS_SUBSCRIPTION_VIOLATION: Supplementary service subscription violation. * @QMI_VOICE_CALL_END_REASON_SS_INCOMPATIBILITY: Supplementary service incompatibility. * @QMI_VOICE_CALL_END_REASON_FACILITY_NOT_SUPPORTED: Facility not supported. * @QMI_VOICE_CALL_END_REASON_ABSENT_SUBSCRIBER: Absent subscriber. * @QMI_VOICE_CALL_END_REASON_SHORT_TERM_DENIAL: Short term denial. * @QMI_VOICE_CALL_END_REASON_LONG_TERM_DENIAL: Long term denial. * @QMI_VOICE_CALL_END_REASON_SYSTEM_FAILURE: System failure. * @QMI_VOICE_CALL_END_REASON_DATA_MISSING: Data missing. * @QMI_VOICE_CALL_END_REASON_UNEXPECTED_DATA_VALUE: Unexpected data value. * @QMI_VOICE_CALL_END_REASON_PASSWORD_REGISTRATION_FAILURE: Password registration failure. * @QMI_VOICE_CALL_END_REASON_NEGATIVE_PASSWORD_CHECK: Negative password check. * @QMI_VOICE_CALL_END_REASON_NUM_OF_PASSWORD_ATTEMPTS_VIOLATION: Number of password attempts violation. * @QMI_VOICE_CALL_END_REASON_POSITION_METHOD_FAILURE: Position method failure. * @QMI_VOICE_CALL_END_REASON_UNKNOWN_ALPHABET: Unknown alphabet. * @QMI_VOICE_CALL_END_REASON_USSD_BUSY: USSD busy. * @QMI_VOICE_CALL_END_REASON_REJECTED_BY_USER: Rejected by user. * @QMI_VOICE_CALL_END_REASON_REJECTED_BY_NETWORK: Rejected by network. * @QMI_VOICE_CALL_END_REASON_DEFLECTION_TO_SERVED_SUBSCRIBER: Deflection to served subscriber. * @QMI_VOICE_CALL_END_REASON_SPECIAL_SERVICE_CODE: Special service codde. * @QMI_VOICE_CALL_END_REASON_INVALID_DEFLECTED_TO_NUMBER: Invalid deflected to number. * @QMI_VOICE_CALL_END_REASON_MULTIPARTY_PARTICIPANTS_EXCEEDED: Multiparty participants exceeded. * @QMI_VOICE_CALL_END_REASON_RESOURCES_NOT_AVAILABLE: Resources not available. * @QMI_VOICE_CALL_END_REASON_UNASSIGNED_NUMBER: Unassigned number. * @QMI_VOICE_CALL_END_REASON_NO_ROUTE_TO_DESTINATION: No route to destination. * @QMI_VOICE_CALL_END_REASON_CHANNEL_UNACCEPTABLE: Channel unacceptable. * @QMI_VOICE_CALL_END_REASON_OPERATOR_DETERMINED_BARRING: Operator determined barring. * @QMI_VOICE_CALL_END_REASON_NORMAL_CALL_CLEARING: Normal call clearing. * @QMI_VOICE_CALL_END_REASON_USER_BUSY: User busy. * @QMI_VOICE_CALL_END_REASON_NO_USER_RESPONDING: No user responding. * @QMI_VOICE_CALL_END_REASON_USER_ALERTING_NO_ANSWER: User alerting no answer. * @QMI_VOICE_CALL_END_REASON_CALL_REJECTED: Call rejected. * @QMI_VOICE_CALL_END_REASON_NUMBER_CHANGED: Number changed. * @QMI_VOICE_CALL_END_REASON_PREEMPTION: Preemption. * @QMI_VOICE_CALL_END_REASON_DESTINATION_OUT_OF_ORDER: Destination out of order. * @QMI_VOICE_CALL_END_REASON_INVALID_NUMBER_FORMAT: Invalid number format. * @QMI_VOICE_CALL_END_REASON_FACILITY_REJECTED: Facility rejected. * @QMI_VOICE_CALL_END_REASON_RESPONSE_TO_STATUS_ENQUIRY: Response to status enquiry. * @QMI_VOICE_CALL_END_REASON_NORMAL_UNSPECIFIED: Normal unspecified. * @QMI_VOICE_CALL_END_REASON_NO_CIRCUIT_OR_CHANNEL_AVAILABLE: No circuit or channel available. * @QMI_VOICE_CALL_END_REASON_NETWORK_OUT_OF_ORDER: Network out of order. * @QMI_VOICE_CALL_END_REASON_TEMPORARY_FAILURE: Temporary failure. * @QMI_VOICE_CALL_END_REASON_SWITCHING_EQUIPMENT_CONGESTION: Switching equipment congestion. * @QMI_VOICE_CALL_END_REASON_ACCESS_INFORMATION_DISCARDED: Access information discarded. * @QMI_VOICE_CALL_END_REASON_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE: Requested circuit or channel not available. * @QMI_VOICE_CALL_END_REASON_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED: Resources unavailable or unspecified. * @QMI_VOICE_CALL_END_REASON_QOS_UNAVAILABLE: QoS unavailable. * @QMI_VOICE_CALL_END_REASON_REQUESTED_FACILITY_NOT_SUBSCRIBED: Requested facility not subscribed. * @QMI_VOICE_CALL_END_REASON_INCOMING_CALLS_BARRED_WITHIN_CUG: Incoming calls barred withing closed user group. * @QMI_VOICE_CALL_END_REASON_BEARER_CAPABILITY_NOT_AUTH: Bearer capability not auth. * @QMI_VOICE_CALL_END_REASON_BEARER_CAPABILITY_UNAVAILABLE: Bearer capability unavailable. * @QMI_VOICE_CALL_END_REASON_SERVICE_OPTION_NOT_AVAILABLE: Service option not available. * @QMI_VOICE_CALL_END_REASON_ACM_LIMIT_EXCEEDED: ACM limit exceeded. * @QMI_VOICE_CALL_END_REASON_BEARER_SERVICE_NOT_IMPLEMENTED: Bearer service not implemented. * @QMI_VOICE_CALL_END_REASON_REQUESTED_FACILITY_NOT_IMPLEMENTED: Requested facility not implemented. * @QMI_VOICE_CALL_END_REASON_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE: Only digital information bearer available. * @QMI_VOICE_CALL_END_REASON_SERVICE_OR_OPTION_NOT_IMPLEMENTED: Service or option not implemented. * @QMI_VOICE_CALL_END_REASON_INVALID_TRANSACTION_IDENTIFIER: Invalid transaction identifier. * @QMI_VOICE_CALL_END_REASON_USER_NOT_MEMBER_OF_CUG: User not member of closed user group. * @QMI_VOICE_CALL_END_REASON_INCOMPATIBLE_DESTINATION: Incompatible destination. * @QMI_VOICE_CALL_END_REASON_INVALID_TRANSIT_NETWORK_SELECTION: Invalid transit network selection. * @QMI_VOICE_CALL_END_REASON_SEMANTICALLY_INCORRECT_MESSAGE: Semantically incorrect message. * @QMI_VOICE_CALL_END_REASON_INVALID_MANDATORY_INFORMATION: Invalid mandatory information. * @QMI_VOICE_CALL_END_REASON_MESSAGE_TYPE_NOT_IMPLEMENTED: Message type not implemented. * @QMI_VOICE_CALL_END_REASON_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: Message type not compatible with protocol state. * @QMI_VOICE_CALL_END_REASON_INFORMATION_ELEMENT_NON_EXISTENT: Information element non existent. * @QMI_VOICE_CALL_END_REASON_CONDITIONAL_IE_ERROR: IE error. * @QMI_VOICE_CALL_END_REASON_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: Message not compatible with protocol state. * @QMI_VOICE_CALL_END_REASON_RECOVERY_ON_TIMER_EXPIRED: Recovery on timer expired. * @QMI_VOICE_CALL_END_REASON_PROTOCOL_ERROR_UNSPECIFIED: Protocol error unspecified. * @QMI_VOICE_CALL_END_REASON_INTERWORKING_UNSPECIFIED: Interworking unspecified. * @QMI_VOICE_CALL_END_REASON_OUTGOING_CALLS_BARRED_WITHIN_CUG: Outgoing calls barred within closed user group. * @QMI_VOICE_CALL_END_REASON_NO_CUG_SELECTION: No closed user group selection. * @QMI_VOICE_CALL_END_REASON_UNKNOWN_CUG_INDEX: Unknown closed user group index. * @QMI_VOICE_CALL_END_REASON_CUG_INDEX_INCOMPATIBLE: Closed user group index incompatible. * @QMI_VOICE_CALL_END_REASON_CUG_CALL_FAILURE_UNSPECIFIED: Closed user group call failure unspecified. * @QMI_VOICE_CALL_END_REASON_CLIR_NOT_SUBSCRIBED: Calling line identification restriction not subscribed. * @QMI_VOICE_CALL_END_REASON_CCBS_POSSIBLE: Completion of communications to busy subscriber possible. * @QMI_VOICE_CALL_END_REASON_CCBS_NOT_POSSIBLE: Completion of communications to busy subscriber not possible. * @QMI_VOICE_CALL_END_REASON_IMSI_UNKNOWN_IN_HLR: IMSI unknown in HLR. * @QMI_VOICE_CALL_END_REASON_ILLEGAL_MS: Illegal MS. * @QMI_VOICE_CALL_END_REASON_IMSI_UNKNOWN_IN_VLR: IMSI unknown in VLR. * @QMI_VOICE_CALL_END_REASON_IMEI_NOT_ACCEPTED: IMEI not accepted. * @QMI_VOICE_CALL_END_REASON_ILLEGAL_ME: Illegal ME. * @QMI_VOICE_CALL_END_REASON_PLMN_NOT_ALLOWED: PLMN not allowed. * @QMI_VOICE_CALL_END_REASON_LOCATION_AREA_NOT_ALLOWED: Location area not allowed. * @QMI_VOICE_CALL_END_REASON_ROAMING_NOT_ALLOWED_IN_THIS_LOCATION_AREA: Roaming not allowed in this location area. * @QMI_VOICE_CALL_END_REASON_NO_SUITABLE_CELLS_IN_LOCATION_AREA: No suitable cells in location area. * @QMI_VOICE_CALL_END_REASON_NETWORK_FAILURE: Network failure. * @QMI_VOICE_CALL_END_REASON_MAC_FAILURE: MAC failure. * @QMI_VOICE_CALL_END_REASON_SYNCH_FAILURE: Synch failure. * @QMI_VOICE_CALL_END_REASON_NETWORK_CONGESTION: Network contestion. * @QMI_VOICE_CALL_END_REASON_GSM_AUTHENTICATION_UNACCEPTABLE: GSM authentication unacceptable. * @QMI_VOICE_CALL_END_REASON_SERVICE_NOT_SUBSCRIBED: Service not subscribed. * @QMI_VOICE_CALL_END_REASON_SERVICE_TEMPORARILY_OUT_OF_ORDER: Service temporarily out of order. * @QMI_VOICE_CALL_END_REASON_CALL_CANNOT_BE_IDENTIFIED: Call cannot be identified. * @QMI_VOICE_CALL_END_REASON_INCORRECT_SEMANTICS_IN_MESSAGE: Incorrect semantics in message. * @QMI_VOICE_CALL_END_REASON_MANDATORY_INFORMATION_INVALID: Mandatory information invalid. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_FAILURE: Access stratum failure. * @QMI_VOICE_CALL_END_REASON_INVALID_SIM: Invalid SIM. * @QMI_VOICE_CALL_END_REASON_WRONG_STATE: Wrong state. * @QMI_VOICE_CALL_END_REASON_ACCESS_CLASS_BLOCKED: Access class blocked. * @QMI_VOICE_CALL_END_REASON_NO_RESOURCES: No resources. * @QMI_VOICE_CALL_END_REASON_INVALID_USER_DATA: Invalid user data. * @QMI_VOICE_CALL_END_REASON_TIMER_T3230_EXPIRED: Timer T3230 expired. * @QMI_VOICE_CALL_END_REASON_NO_CELL_AVAILABLE: No cell available. * @QMI_VOICE_CALL_END_REASON_ABORT_MESSAGE_RECEIVED: Abort message received. * @QMI_VOICE_CALL_END_REASON_RADIO_LINK_LOST: Radio link lost. * @QMI_VOICE_CALL_END_REASON_TIMER_T303_EXPIRED: Timer T303 expired. * @QMI_VOICE_CALL_END_REASON_CNM_MM_RELEASE_PENDING: CNM MM release pending. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RR_RELEASE_INDICATION: Access stratum reject, RR release indication. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RR_RANDOM_ACCESS_FAILURE: Access stratum reject, RR random access failure. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RRC_RELEASE_INDICATION: Access stratum reject, RRC release indication. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RRC_CLOSE_SESSION_INDICATION: Access stratum reject, RRC close session indication. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RRC_OPEN_SESSION_FAILURE: Access stratum reject, RRC open session failure. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_LOW_LEVEL_FAILURE: Access stratum reject, low level failure. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_LOW_LEVEL_FAILURE_REDIAL_NOT_ALLOWED: Access stratum reject, low level failure redial not allowed. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_LOW_LEVEL_IMMEDIATE_RETRY: Access stratum reject, low level immediate retry. * @QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_ABORT_RADIO_UNAVAILABLE: Access stratum reject, abort radio unavailable. * @QMI_VOICE_CALL_END_REASON_SERVICE_OPTION_NOT_SUPPORTED: Service option not supported. * @QMI_VOICE_CALL_END_REASON_BAD_REQUEST_WAIT_INVITE: Bad request wait invite. * @QMI_VOICE_CALL_END_REASON_BAD_REQUEST_WAIT_REINVITE: Bad request wait reinvite. * @QMI_VOICE_CALL_END_REASON_INVALID_REMOTE_URI: Invalid remote URI. * @QMI_VOICE_CALL_END_REASON_REMOTE_UNSUPPORTED_MEDIA_TYPE: Remote unsupported media type. * @QMI_VOICE_CALL_END_REASON_PEER_NOT_REACHABLE: Peer not reachable. * @QMI_VOICE_CALL_END_REASON_NETWORK_NO_RESPONSE_TIMEOUT: Network no response, timeout. * @QMI_VOICE_CALL_END_REASON_NETWORK_NO_RESPONSE_HOLD_FAILURE: Network no response, hold failure. * @QMI_VOICE_CALL_END_REASON_DATA_CONNECTION_LOST: Data connection lost. * @QMI_VOICE_CALL_END_REASON_UPGRADE_DOWNGRADE_REJECTED: Upgrade/downgrade rejected. * @QMI_VOICE_CALL_END_REASON_SIP_403_FORBIDDEN: SIP 403 forbidden. * @QMI_VOICE_CALL_END_REASON_NO_NETWORK_RESPONSE: No network response. * @QMI_VOICE_CALL_END_REASON_UPGRADE_DOWNGRADE_FAILED: Upgrade/downgrade failed. * @QMI_VOICE_CALL_END_REASON_UPGRADE_DOWNGRADE_CANCELLED: Upgrade/downgrade cancelled. * @QMI_VOICE_CALL_END_REASON_SSAC_REJECT: Service specific access control reject. * @QMI_VOICE_CALL_END_REASON_THERMAL_EMERGENCY: Thermal emergency. * @QMI_VOICE_CALL_END_REASON_1XCSFB_SOFT_FAILURE: 1xCSFG soft failure. * @QMI_VOICE_CALL_END_REASON_1XCSFB_HARD_FAILURE: 1xCSFG hard failure. * * Possible call end reasons resulting from a voice call or supplementary * service connection being terminated. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_VOICE_CALL_END_REASON_OFFLINE = 0, QMI_VOICE_CALL_END_REASON_CDMA_LOCK = 20, QMI_VOICE_CALL_END_REASON_NO_SERVICE = 21, QMI_VOICE_CALL_END_REASON_FADE = 22, QMI_VOICE_CALL_END_REASON_INTERCEPT = 23, QMI_VOICE_CALL_END_REASON_REORDER = 24, QMI_VOICE_CALL_END_REASON_RELEASE_NORMAL = 25, QMI_VOICE_CALL_END_REASON_RELEASE_SO_REJECT = 26, QMI_VOICE_CALL_END_REASON_INCOMING_CALL = 27, QMI_VOICE_CALL_END_REASON_ALERT_STOP = 28, QMI_VOICE_CALL_END_REASON_CLIENT_END = 29, QMI_VOICE_CALL_END_REASON_ACTIVATION = 30, QMI_VOICE_CALL_END_REASON_MC_ABORT = 31, QMI_VOICE_CALL_END_REASON_MAX_ACCESS_PROBE = 32, QMI_VOICE_CALL_END_REASON_PSIST_N = 33, QMI_VOICE_CALL_END_REASON_UIM_NOT_PRESENT = 34, QMI_VOICE_CALL_END_REASON_ACCESS_ATTEMPT_IN_PROGRESS = 35, QMI_VOICE_CALL_END_REASON_ACCESS_FAILURE = 36, QMI_VOICE_CALL_END_REASON_ACCESS_RETRY_ORDER = 37, QMI_VOICE_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS = 38, QMI_VOICE_CALL_END_REASON_NO_RESPONSE_FROM_BS = 39, QMI_VOICE_CALL_END_REASON_REJECTED_BY_BS = 40, QMI_VOICE_CALL_END_REASON_INCOMPATIBLE = 41, QMI_VOICE_CALL_END_REASON_ACCESS_BLOCK = 42, QMI_VOICE_CALL_END_REASON_ALREADY_IN_TC = 43, QMI_VOICE_CALL_END_REASON_EMERGENCY_FLASHED = 44, QMI_VOICE_CALL_END_REASON_USER_CALL_ORIGINATED_DURING_GPS = 45, QMI_VOICE_CALL_END_REASON_USER_CALL_ORIGINATED_DURING_SMS = 46, QMI_VOICE_CALL_END_REASON_USER_CALL_ORIGINATED_DURING_DATA = 47, QMI_VOICE_CALL_END_REASON_REDIRECTION_OR_HANDOFF = 48, QMI_VOICE_CALL_END_REASON_ACCESS_BLOCK_ALL = 49, QMI_VOICE_CALL_END_REASON_OTASP_SPC_ERR = 50, QMI_VOICE_CALL_END_REASON_IS707B_MAX_ACCESS_PROBES = 51, QMI_VOICE_CALL_END_REASON_ACCESS_FAILURE_REJECT_ORDER = 52, QMI_VOICE_CALL_END_REASON_ACCESS_FAILURE_RETRY_ORDER = 53, QMI_VOICE_CALL_END_REASON_TIMEOUT_T42 = 54, QMI_VOICE_CALL_END_REASON_TIMEOUT_T40 = 55, QMI_VOICE_CALL_END_REASON_SERVICE_INIT_FAILURE = 56, QMI_VOICE_CALL_END_REASON_TIMEOUT_T50 = 57, QMI_VOICE_CALL_END_REASON_TIMEOUT_T51 = 58, QMI_VOICE_CALL_END_REASON_RL_ACK_TIMEOUT = 59, QMI_VOICE_CALL_END_REASON_BAD_FORWARD_LINK = 60, QMI_VOICE_CALL_END_REASON_TRM_REQUEST_FAILED = 61, QMI_VOICE_CALL_END_REASON_TIMEOUT_T41 = 62, QMI_VOICE_CALL_END_REASON_INCOMING_REJECTED = 102, QMI_VOICE_CALL_END_REASON_SETUP_REJECTED = 103, QMI_VOICE_CALL_END_REASON_NETWORK_END = 104, QMI_VOICE_CALL_END_REASON_NO_FUNDS = 105, QMI_VOICE_CALL_END_REASON_NO_GW_SERVICE = 106, QMI_VOICE_CALL_END_REASON_NO_CDMA_SERVICE = 107, QMI_VOICE_CALL_END_REASON_NO_FULL_SERVICE = 108, QMI_VOICE_CALL_END_REASON_MAX_PS_CALLS = 109, QMI_VOICE_CALL_END_REASON_UNKNOWN_SUBSCRIBER = 110, QMI_VOICE_CALL_END_REASON_ILLEGAL_SUBSCRIBER = 111, QMI_VOICE_CALL_END_REASON_BEARER_SERVICE_NOT_PROVISIONED = 112, QMI_VOICE_CALL_END_REASON_TELE_SERVICE_NOT_PROVISIONED = 113, QMI_VOICE_CALL_END_REASON_ILLEGAL_EQUIPMENT = 114, QMI_VOICE_CALL_END_REASON_CALL_BARRED = 115, QMI_VOICE_CALL_END_REASON_ILLEGAL_SS_OPERATION = 116, QMI_VOICE_CALL_END_REASON_SS_ERROR_STATUS = 117, QMI_VOICE_CALL_END_REASON_SS_NOT_AVAILABLE = 118, QMI_VOICE_CALL_END_REASON_SS_SUBSCRIPTION_VIOLATION = 119, QMI_VOICE_CALL_END_REASON_SS_INCOMPATIBILITY = 120, QMI_VOICE_CALL_END_REASON_FACILITY_NOT_SUPPORTED = 121, QMI_VOICE_CALL_END_REASON_ABSENT_SUBSCRIBER = 122, QMI_VOICE_CALL_END_REASON_SHORT_TERM_DENIAL = 123, QMI_VOICE_CALL_END_REASON_LONG_TERM_DENIAL = 124, QMI_VOICE_CALL_END_REASON_SYSTEM_FAILURE = 125, QMI_VOICE_CALL_END_REASON_DATA_MISSING = 126, QMI_VOICE_CALL_END_REASON_UNEXPECTED_DATA_VALUE = 127, QMI_VOICE_CALL_END_REASON_PASSWORD_REGISTRATION_FAILURE = 128, QMI_VOICE_CALL_END_REASON_NEGATIVE_PASSWORD_CHECK = 129, QMI_VOICE_CALL_END_REASON_NUM_OF_PASSWORD_ATTEMPTS_VIOLATION = 130, QMI_VOICE_CALL_END_REASON_POSITION_METHOD_FAILURE = 131, QMI_VOICE_CALL_END_REASON_UNKNOWN_ALPHABET = 132, QMI_VOICE_CALL_END_REASON_USSD_BUSY = 133, QMI_VOICE_CALL_END_REASON_REJECTED_BY_USER = 134, QMI_VOICE_CALL_END_REASON_REJECTED_BY_NETWORK = 135, QMI_VOICE_CALL_END_REASON_DEFLECTION_TO_SERVED_SUBSCRIBER = 136, QMI_VOICE_CALL_END_REASON_SPECIAL_SERVICE_CODE = 137, QMI_VOICE_CALL_END_REASON_INVALID_DEFLECTED_TO_NUMBER = 138, QMI_VOICE_CALL_END_REASON_MULTIPARTY_PARTICIPANTS_EXCEEDED = 139, QMI_VOICE_CALL_END_REASON_RESOURCES_NOT_AVAILABLE = 140, QMI_VOICE_CALL_END_REASON_UNASSIGNED_NUMBER = 141, QMI_VOICE_CALL_END_REASON_NO_ROUTE_TO_DESTINATION = 142, QMI_VOICE_CALL_END_REASON_CHANNEL_UNACCEPTABLE = 143, QMI_VOICE_CALL_END_REASON_OPERATOR_DETERMINED_BARRING = 144, QMI_VOICE_CALL_END_REASON_NORMAL_CALL_CLEARING = 145, QMI_VOICE_CALL_END_REASON_USER_BUSY = 146, QMI_VOICE_CALL_END_REASON_NO_USER_RESPONDING = 147, QMI_VOICE_CALL_END_REASON_USER_ALERTING_NO_ANSWER = 148, QMI_VOICE_CALL_END_REASON_CALL_REJECTED = 149, QMI_VOICE_CALL_END_REASON_NUMBER_CHANGED = 150, QMI_VOICE_CALL_END_REASON_PREEMPTION = 151, QMI_VOICE_CALL_END_REASON_DESTINATION_OUT_OF_ORDER = 152, QMI_VOICE_CALL_END_REASON_INVALID_NUMBER_FORMAT = 153, QMI_VOICE_CALL_END_REASON_FACILITY_REJECTED = 154, QMI_VOICE_CALL_END_REASON_RESPONSE_TO_STATUS_ENQUIRY = 155, QMI_VOICE_CALL_END_REASON_NORMAL_UNSPECIFIED = 156, QMI_VOICE_CALL_END_REASON_NO_CIRCUIT_OR_CHANNEL_AVAILABLE = 157, QMI_VOICE_CALL_END_REASON_NETWORK_OUT_OF_ORDER = 158, QMI_VOICE_CALL_END_REASON_TEMPORARY_FAILURE = 159, QMI_VOICE_CALL_END_REASON_SWITCHING_EQUIPMENT_CONGESTION = 160, QMI_VOICE_CALL_END_REASON_ACCESS_INFORMATION_DISCARDED = 161, QMI_VOICE_CALL_END_REASON_REQUESTED_CIRCUIT_OR_CHANNEL_NOT_AVAILABLE = 162, QMI_VOICE_CALL_END_REASON_RESOURCES_UNAVAILABLE_OR_UNSPECIFIED = 163, QMI_VOICE_CALL_END_REASON_QOS_UNAVAILABLE = 164, QMI_VOICE_CALL_END_REASON_REQUESTED_FACILITY_NOT_SUBSCRIBED = 165, QMI_VOICE_CALL_END_REASON_INCOMING_CALLS_BARRED_WITHIN_CUG = 166, QMI_VOICE_CALL_END_REASON_BEARER_CAPABILITY_NOT_AUTH = 167, QMI_VOICE_CALL_END_REASON_BEARER_CAPABILITY_UNAVAILABLE = 168, QMI_VOICE_CALL_END_REASON_SERVICE_OPTION_NOT_AVAILABLE = 169, QMI_VOICE_CALL_END_REASON_ACM_LIMIT_EXCEEDED = 170, QMI_VOICE_CALL_END_REASON_BEARER_SERVICE_NOT_IMPLEMENTED = 171, QMI_VOICE_CALL_END_REASON_REQUESTED_FACILITY_NOT_IMPLEMENTED = 172, QMI_VOICE_CALL_END_REASON_ONLY_DIGITAL_INFORMATION_BEARER_AVAILABLE = 173, QMI_VOICE_CALL_END_REASON_SERVICE_OR_OPTION_NOT_IMPLEMENTED = 174, QMI_VOICE_CALL_END_REASON_INVALID_TRANSACTION_IDENTIFIER = 175, QMI_VOICE_CALL_END_REASON_USER_NOT_MEMBER_OF_CUG = 176, QMI_VOICE_CALL_END_REASON_INCOMPATIBLE_DESTINATION = 177, QMI_VOICE_CALL_END_REASON_INVALID_TRANSIT_NETWORK_SELECTION = 178, QMI_VOICE_CALL_END_REASON_SEMANTICALLY_INCORRECT_MESSAGE = 179, QMI_VOICE_CALL_END_REASON_INVALID_MANDATORY_INFORMATION = 180, QMI_VOICE_CALL_END_REASON_MESSAGE_TYPE_NOT_IMPLEMENTED = 181, QMI_VOICE_CALL_END_REASON_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 182, QMI_VOICE_CALL_END_REASON_INFORMATION_ELEMENT_NON_EXISTENT = 183, QMI_VOICE_CALL_END_REASON_CONDITIONAL_IE_ERROR = 184, QMI_VOICE_CALL_END_REASON_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE = 185, QMI_VOICE_CALL_END_REASON_RECOVERY_ON_TIMER_EXPIRED = 186, QMI_VOICE_CALL_END_REASON_PROTOCOL_ERROR_UNSPECIFIED = 187, QMI_VOICE_CALL_END_REASON_INTERWORKING_UNSPECIFIED = 188, QMI_VOICE_CALL_END_REASON_OUTGOING_CALLS_BARRED_WITHIN_CUG = 189, QMI_VOICE_CALL_END_REASON_NO_CUG_SELECTION = 190, QMI_VOICE_CALL_END_REASON_UNKNOWN_CUG_INDEX = 191, QMI_VOICE_CALL_END_REASON_CUG_INDEX_INCOMPATIBLE = 192, QMI_VOICE_CALL_END_REASON_CUG_CALL_FAILURE_UNSPECIFIED = 193, QMI_VOICE_CALL_END_REASON_CLIR_NOT_SUBSCRIBED = 194, QMI_VOICE_CALL_END_REASON_CCBS_POSSIBLE = 195, QMI_VOICE_CALL_END_REASON_CCBS_NOT_POSSIBLE = 196, QMI_VOICE_CALL_END_REASON_IMSI_UNKNOWN_IN_HLR = 197, QMI_VOICE_CALL_END_REASON_ILLEGAL_MS = 198, QMI_VOICE_CALL_END_REASON_IMSI_UNKNOWN_IN_VLR = 199, QMI_VOICE_CALL_END_REASON_IMEI_NOT_ACCEPTED = 200, QMI_VOICE_CALL_END_REASON_ILLEGAL_ME = 201, QMI_VOICE_CALL_END_REASON_PLMN_NOT_ALLOWED = 202, QMI_VOICE_CALL_END_REASON_LOCATION_AREA_NOT_ALLOWED = 203, QMI_VOICE_CALL_END_REASON_ROAMING_NOT_ALLOWED_IN_THIS_LOCATION_AREA = 204, QMI_VOICE_CALL_END_REASON_NO_SUITABLE_CELLS_IN_LOCATION_AREA = 205, QMI_VOICE_CALL_END_REASON_NETWORK_FAILURE = 206, QMI_VOICE_CALL_END_REASON_MAC_FAILURE = 207, QMI_VOICE_CALL_END_REASON_SYNCH_FAILURE = 208, QMI_VOICE_CALL_END_REASON_NETWORK_CONGESTION = 209, QMI_VOICE_CALL_END_REASON_GSM_AUTHENTICATION_UNACCEPTABLE = 210, QMI_VOICE_CALL_END_REASON_SERVICE_NOT_SUBSCRIBED = 211, QMI_VOICE_CALL_END_REASON_SERVICE_TEMPORARILY_OUT_OF_ORDER = 212, QMI_VOICE_CALL_END_REASON_CALL_CANNOT_BE_IDENTIFIED = 213, QMI_VOICE_CALL_END_REASON_INCORRECT_SEMANTICS_IN_MESSAGE = 214, QMI_VOICE_CALL_END_REASON_MANDATORY_INFORMATION_INVALID = 215, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_FAILURE = 216, QMI_VOICE_CALL_END_REASON_INVALID_SIM = 217, QMI_VOICE_CALL_END_REASON_WRONG_STATE = 218, QMI_VOICE_CALL_END_REASON_ACCESS_CLASS_BLOCKED = 219, QMI_VOICE_CALL_END_REASON_NO_RESOURCES = 220, QMI_VOICE_CALL_END_REASON_INVALID_USER_DATA = 221, QMI_VOICE_CALL_END_REASON_TIMER_T3230_EXPIRED = 222, QMI_VOICE_CALL_END_REASON_NO_CELL_AVAILABLE = 223, QMI_VOICE_CALL_END_REASON_ABORT_MESSAGE_RECEIVED = 224, QMI_VOICE_CALL_END_REASON_RADIO_LINK_LOST = 225, QMI_VOICE_CALL_END_REASON_TIMER_T303_EXPIRED = 226, QMI_VOICE_CALL_END_REASON_CNM_MM_RELEASE_PENDING = 227, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RR_RELEASE_INDICATION = 228, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RR_RANDOM_ACCESS_FAILURE = 229, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RRC_RELEASE_INDICATION = 230, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RRC_CLOSE_SESSION_INDICATION = 231, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_RRC_OPEN_SESSION_FAILURE = 232, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_LOW_LEVEL_FAILURE = 233, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_LOW_LEVEL_FAILURE_REDIAL_NOT_ALLOWED = 234, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_LOW_LEVEL_IMMEDIATE_RETRY = 235, QMI_VOICE_CALL_END_REASON_ACCESS_STRATUM_REJECT_ABORT_RADIO_UNAVAILABLE = 236, QMI_VOICE_CALL_END_REASON_SERVICE_OPTION_NOT_SUPPORTED = 237, QMI_VOICE_CALL_END_REASON_BAD_REQUEST_WAIT_INVITE = 300, QMI_VOICE_CALL_END_REASON_BAD_REQUEST_WAIT_REINVITE = 301, QMI_VOICE_CALL_END_REASON_INVALID_REMOTE_URI = 302, QMI_VOICE_CALL_END_REASON_REMOTE_UNSUPPORTED_MEDIA_TYPE = 303, QMI_VOICE_CALL_END_REASON_PEER_NOT_REACHABLE = 304, QMI_VOICE_CALL_END_REASON_NETWORK_NO_RESPONSE_TIMEOUT = 305, QMI_VOICE_CALL_END_REASON_NETWORK_NO_RESPONSE_HOLD_FAILURE = 306, QMI_VOICE_CALL_END_REASON_DATA_CONNECTION_LOST = 307, QMI_VOICE_CALL_END_REASON_UPGRADE_DOWNGRADE_REJECTED = 308, QMI_VOICE_CALL_END_REASON_SIP_403_FORBIDDEN = 309, QMI_VOICE_CALL_END_REASON_NO_NETWORK_RESPONSE = 310, QMI_VOICE_CALL_END_REASON_UPGRADE_DOWNGRADE_FAILED = 311, QMI_VOICE_CALL_END_REASON_UPGRADE_DOWNGRADE_CANCELLED = 312, QMI_VOICE_CALL_END_REASON_SSAC_REJECT = 313, QMI_VOICE_CALL_END_REASON_THERMAL_EMERGENCY = 314, QMI_VOICE_CALL_END_REASON_1XCSFB_SOFT_FAILURE = 315, QMI_VOICE_CALL_END_REASON_1XCSFB_HARD_FAILURE = 316, } QmiVoiceCallEndReason; /** * QmiVoiceCallControlResultType: * @QMI_VOICE_CALL_CONTROL_RESULT_TYPE_VOICE: Voice. * @QMI_VOICE_CALL_CONTROL_RESULT_TYPE_SUPS: Supplementary service. * @QMI_VOICE_CALL_CONTROL_RESULT_TYPE_USSD: Unstructured supplementary service. * * Call control result type. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_VOICE_CALL_CONTROL_RESULT_TYPE_VOICE = 0x00, QMI_VOICE_CALL_CONTROL_RESULT_TYPE_SUPS = 0x01, QMI_VOICE_CALL_CONTROL_RESULT_TYPE_USSD = 0x02, } QmiVoiceCallControlResultType; /** * QmiVoiceCallControlSupplementaryServiceType: * @QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_ACTIVATE: Activate. * @QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_DEACTIVATE: Deactivate. * @QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_REGISTER: Register. * @QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_ERASE: Erase. * @QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_INTERROGATE: Interrogate. * @QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_REGISTER_PASSWORD: Register password. * @QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_USSD: USSD. * * Call control supplementary service type. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_ACTIVATE = 0x01, QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_DEACTIVATE = 0x02, QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_REGISTER = 0x03, QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_ERASE = 0x04, QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_INTERROGATE = 0x05, QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_REGISTER_PASSWORD = 0x06, QMI_VOICE_CALL_CONTROL_SUPPLEMENTARY_SERVICE_TYPE_USSD = 0x07, } QmiVoiceCallControlSupplementaryServiceType; /** * QmiVoiceSupplementaryServiceType: * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_RELEASE_HELD_OR_WAITING: Release held or waiting call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_RELEASE_ACTIVE_ACCEPT_HELD_OR_WAITING: Release active call and accept held or waiting call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_HOLD_ACTIVE_ACCEPT_WAITING_OR_HELD: Hold active call and accept held or waiting call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_HOLD_ALL_EXCEPT_SPECIFIED_CALL: Hold all calls except specified call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_MAKE_CONFERENCE_CALL: Create conference call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_EXPLICIT_CALL_TRANSFER: Explicit call transfer. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_CCBS_ACTIVATION: Activate completion of calls to busy subscriber. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_END_ALL_CALLS: End all calls. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_RELEASE_SPECIFIED_CALL: Release a specified call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_LOCAL_HOLD: Put all active calls to hold. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_LOCAL_UNHOLD: Unhold all held calls. * * Supplementary service type during call. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_RELEASE_HELD_OR_WAITING = 0x01, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_RELEASE_ACTIVE_ACCEPT_HELD_OR_WAITING = 0x02, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_HOLD_ACTIVE_ACCEPT_WAITING_OR_HELD = 0x03, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_HOLD_ALL_EXCEPT_SPECIFIED_CALL = 0x04, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_MAKE_CONFERENCE_CALL = 0x05, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_EXPLICIT_CALL_TRANSFER = 0x06, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_CCBS_ACTIVATION = 0x07, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_END_ALL_CALLS = 0x08, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_RELEASE_SPECIFIED_CALL = 0x09, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_LOCAL_HOLD = 0x0A, QMI_VOICE_SUPPLEMENTARY_SERVICE_TYPE_LOCAL_UNHOLD = 0x0B, } QmiVoiceSupplementaryServiceType; /** * QmiVoiceSupplementaryServiceNotificationType: * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALL_IS_FORWARDED: Outgoing call is forward. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALL_IS_WAITING: Outgoing call is waiting. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CUG_CALL: Outgoing CUG call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALLS_BARRED: All outgoing calls are barred. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALL_IS_DEFLECTED: Outgoing call is deflected. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CUG_CALL: Incoming CUG call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CALLS_BARRED: All incoming calls are barred. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_FORWARDED_CALL: Incoming forwarded call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_DEFLECTED_CALL: Incoming deflected call. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CALL_IS_FORWARDED: Incoming call is forwarded. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_UNCONDITIONAL_CALL_FORWARD_ACTIVE: Unconditional call forward is active. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CONDITIONAL_CALL_FORWARD_ACTIVE: Conditional call forward is active. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CLIR_SUPPRESSION_REJECTED: CLIR suppression is rejected. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CALL_IS_ON_HOLD: Call is on hold. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CALL_IS_RETRIEVED: Call is retrieved. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CALL_IS_IN_MULTIPARTY: Call is in multiparty. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CALL_IS_ECT: Incoming call is ECT. * * Supplementary service notification type. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALL_IS_FORWARDED = 0x01, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALL_IS_WAITING = 0x02, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CUG_CALL = 0x03, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALLS_BARRED = 0x04, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_OUTGOING_CALL_IS_DEFLECTED = 0x05, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CUG_CALL = 0x06, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CALLS_BARRED = 0x07, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_FORWARDED_CALL = 0x08, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_DEFLECTED_CALL = 0x09, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CALL_IS_FORWARDED = 0x0A, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_UNCONDITIONAL_CALL_FORWARD_ACTIVE = 0x0B, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CONDITIONAL_CALL_FORWARD_ACTIVE = 0x0C, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CLIR_SUPPRESSION_REJECTED = 0x0D, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CALL_IS_ON_HOLD = 0x0E, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CALL_IS_RETRIEVED = 0x0F, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_CALL_IS_IN_MULTIPARTY = 0x10, QMI_VOICE_SUPPLEMENTARY_SERVICE_NOTIFICATION_TYPE_INCOMING_CALL_IS_ECT = 0x11, } QmiVoiceSupplementaryServiceNotificationType; /** * QmiVoiceSupplementaryServiceAction: * @QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_ACTIVATE: Activate supplementary service. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_DEACTIVATE: De-activate supplementary service. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_REGISTER: Register supplementary service. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_ERASE: Erase/Un-register supplementary service. * * Supplementary service action. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_ACTIVATE = 0x01, QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_DEACTIVATE = 0x02, QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_REGISTER = 0x03, QMI_VOICE_SUPPLEMENTARY_SERVICE_ACTION_ERASE = 0x04, } QmiVoiceSupplementaryServiceAction; /** * QmiVoiceSupplementaryServiceReason: * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_UNCONDITIONAL: Unconditional call forward. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_MOBILE_BUSY: Forward when mobile is busy. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_NO_REPLY: Forward when no reply. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_UNREACHABLE: Forward when call is unreachable. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_ALL: Forward all calls. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_ALL_CONDITIONAL: Forward all calls conditionally. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_ALL_OUTGOING: All outgoing. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_OUTGOING_INTERNAL: Outgoing Internal. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_OUTGOING_INTERNAL_EXTERNAL_TO_HOME: Outgoing internal/external to home. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_ALL_INCOMING: All incoming. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_INCOMING_ROAMING: Roaming incoming. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_BAR_ALL: All calls are barred. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_BAR_ALL_OUTGOING: All outgoing calls are barred. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_BAR_ALL_INCOMING: All incoming calls are barred. * @QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_CALL_WAITING: Call waiting. * * Supplementary service reason. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_UNCONDITIONAL = 0x01, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_MOBILE_BUSY = 0x02, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_NO_REPLY = 0x03, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_UNREACHABLE = 0x04, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_ALL = 0x05, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_FORWARD_ALL_CONDITIONAL = 0x06, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_ALL_OUTGOING = 0x07, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_OUTGOING_INTERNAL = 0x08, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_OUTGOING_INTERNAL_EXTERNAL_TO_HOME = 0x09, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_ALL_INCOMING = 0x0A, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_INCOMING_ROAMING = 0x0B, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_BAR_ALL = 0x0C, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_BAR_ALL_OUTGOING = 0x0D, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_BAR_ALL_INCOMING = 0x0E, QMI_VOICE_SUPPLEMENTARY_SERVICE_REASON_CALL_WAITING = 0x0F, } QmiVoiceSupplementaryServiceReason; #endif /* _LIBQMI_GLIB_QMI_ENUMS_VOICE_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-wda.h000066400000000000000000000063321455567757300215030ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2014-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_WDA_H_ #define _LIBQMI_GLIB_QMI_ENUMS_WDA_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-wda * @title: WDA enumerations and flags * @short_description: Enumerations and flags in the WDA service. * * This section defines enumerations and flags used in the WDA service * interface. */ /** * QmiWdaLinkLayerProtocol: * @QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN: Unknown. * @QMI_WDA_LINK_LAYER_PROTOCOL_802_3: 802.3 ethernet mode. * @QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP: Raw IP mode. * * Link layer protocol. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN = 0x00, QMI_WDA_LINK_LAYER_PROTOCOL_802_3 = 0x01, QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP = 0x02, } QmiWdaLinkLayerProtocol; /** * QmiWdaDataAggregationProtocol: * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED: Disabled. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP: TLP enabled. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM: QC NCM enabled. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM: MBIM enabled. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS: RNDIS enabled. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP: QMAP enabled. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV2: QMAPV2 enabled. Since 1.30. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV3: QMAPV3 enabled. Since 1.30. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV4: QMAPV4 enabled. Since 1.30. * @QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV5: QMAPV5 enabled. Since 1.28. * * Data aggregation protocol in uplink or downlink. * * Since: 1.10 */ typedef enum { /*< since=1.10 >*/ QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED = 0x00, QMI_WDA_DATA_AGGREGATION_PROTOCOL_TLP = 0x01, QMI_WDA_DATA_AGGREGATION_PROTOCOL_QC_NCM = 0x02, QMI_WDA_DATA_AGGREGATION_PROTOCOL_MBIM = 0x03, QMI_WDA_DATA_AGGREGATION_PROTOCOL_RNDIS = 0x04, QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAP = 0x05, QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV2 = 0x06, QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV3 = 0x07, QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV4 = 0x08, QMI_WDA_DATA_AGGREGATION_PROTOCOL_QMAPV5 = 0x09, } QmiWdaDataAggregationProtocol; #endif /* _LIBQMI_GLIB_QMI_ENUMS_WDA_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-wds.c000066400000000000000000000045471455567757300215260ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2017 Aleksander Morgado */ #include #include #include #include "qmi-enums-wds.h" #include "qmi-enum-types.h" const gchar * qmi_wds_verbose_call_end_reason_get_string (QmiWdsVerboseCallEndReasonType type, gint16 reason) { switch (type) { case QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP: return qmi_wds_verbose_call_end_reason_mip_get_string ((QmiWdsVerboseCallEndReasonMip)reason); case QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL: return qmi_wds_verbose_call_end_reason_internal_get_string ((QmiWdsVerboseCallEndReasonInternal)reason); case QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM: return qmi_wds_verbose_call_end_reason_cm_get_string ((QmiWdsVerboseCallEndReasonCm)reason); case QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP: return qmi_wds_verbose_call_end_reason_3gpp_get_string ((QmiWdsVerboseCallEndReason3gpp)reason); case QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP: return qmi_wds_verbose_call_end_reason_ppp_get_string ((QmiWdsVerboseCallEndReasonPpp)reason); case QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD: return qmi_wds_verbose_call_end_reason_ehrpd_get_string ((QmiWdsVerboseCallEndReasonEhrpd)reason); case QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6: return qmi_wds_verbose_call_end_reason_ipv6_get_string ((QmiWdsVerboseCallEndReasonIpv6)reason); default: return NULL; } } libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-wds.h000066400000000000000000003367431455567757300215410ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH * Copyright (C) 2015 Velocloud Inc. * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_WDS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_WDS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-wds * @title: WDS enumerations and flags * @short_description: Enumerations and flags in the WDS service. * * This section defines enumerations and flags used in the WDS service * interface. */ #include /*****************************************************************************/ /* Helper enums for the 'QMI WDS Start Network' message */ /** * QmiWdsIpFamily: * @QMI_WDS_IP_FAMILY_UNKNOWN: unknown. Since 1.18. * @QMI_WDS_IP_FAMILY_IPV4: IPv4. * @QMI_WDS_IP_FAMILY_IPV6: IPv6. * @QMI_WDS_IP_FAMILY_UNSPECIFIED: None specified. * * Type of IP family. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_IP_FAMILY_UNKNOWN = 0, QMI_WDS_IP_FAMILY_IPV4 = 4, QMI_WDS_IP_FAMILY_IPV6 = 6, QMI_WDS_IP_FAMILY_UNSPECIFIED = 8 } QmiWdsIpFamily; /** * QmiWdsTechnologyPreference: * @QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP: 3GPP allowed. * @QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP2: 3GPP2 allowed. * * Type of network allowed when trying to connect. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP = 1 << 0, QMI_WDS_TECHNOLOGY_PREFERENCE_ALLOW_3GPP2 = 1 << 1 } QmiWdsTechnologyPreference; /** * QmiWdsExtendedTechnologyPreference: * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_CDMA: Use CDMA. * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_UMTS: Use UMTS. * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EPC: Use EPC, LTE. * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EMBMS: Use eMBMS. * @QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_MODEM_LINK_LOCAL: Use modem link-local. * * Type of network allowed when trying to connect. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_CDMA = 32769, QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_UMTS = 32772, QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EPC = 34944, QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_EMBMS = 34946, QMI_WDS_EXTENDED_TECHNOLOGY_PREFERENCE_MODEM_LINK_LOCAL = 34952, } QmiWdsExtendedTechnologyPreference; /** * QmiWdsCallType: * @QMI_WDS_CALL_TYPE_LAPTOP: Laptop call. * @QMI_WDS_CALL_TYPE_EMBEDDED: Embedded call. * * Type of call to originate. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_CALL_TYPE_LAPTOP = 0, QMI_WDS_CALL_TYPE_EMBEDDED = 1 } QmiWdsCallType; /** * QmiWdsCallEndReason: * @QMI_WDS_CALL_END_REASON_GENERIC_UNSPECIFIED: Unspecified reason. * @QMI_WDS_CALL_END_REASON_GENERIC_CLIENT_END: Client end. * @QMI_WDS_CALL_END_REASON_GENERIC_NO_SERVICE: No service. * @QMI_WDS_CALL_END_REASON_GENERIC_FADE: Fade. * @QMI_WDS_CALL_END_REASON_GENERIC_RELEASE_NORMAL: Release normal. * @QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_ATTEMPT_IN_PROGRESS: Access attempt in progress. * @QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_FAILURE: Access Failure. * @QMI_WDS_CALL_END_REASON_GENERIC_REDIRECTION_OR_HANDOFF: Redirection or handoff. * @QMI_WDS_CALL_END_REASON_GENERIC_CLOSE_IN_PROGRESS: Close in progress. * @QMI_WDS_CALL_END_REASON_GENERIC_AUTHENTICATION_FAILED: Authentication failed. * @QMI_WDS_CALL_END_REASON_GENERIC_INTERNAL_ERROR: Internal error. * @QMI_WDS_CALL_END_REASON_CDMA_LOCK: CDMA specific. Phone is CDMA-locked. * @QMI_WDS_CALL_END_REASON_CDMA_INTERCEPT: CDMA specific. Received intercept from the BS. * @QMI_WDS_CALL_END_REASON_CDMA_REORDER: CDMA specific. Received reorder from the BS. * @QMI_WDS_CALL_END_REASON_CDMA_RELEASE_SO_REJECT: CDMA specific. Received release from the BS, SO reject. * @QMI_WDS_CALL_END_REASON_CDMA_INCOMING_CALL: CDMA specific. Received incoming call from the BS. * @QMI_WDS_CALL_END_REASON_CDMA_ALERT_STOP: CDMA specific. Received alert stop from the BS. * @QMI_WDS_CALL_END_REASON_CDMA_ACTIVATION: CDMA specific. Received end activation. * @QMI_WDS_CALL_END_REASON_CDMA_MAX_ACCESS_PROBES: CDMA specific. Maximum access probes transmitted. * @QMI_WDS_CALL_END_REASON_CDMA_CCS_NOT_SUPPORTED_BY_BS: CDMA specific. Concurrent service not supported by the BS. * @QMI_WDS_CALL_END_REASON_CDMA_NO_RESPONSE_FROM_BS: CDMA specific. No response received from the BS. * @QMI_WDS_CALL_END_REASON_CDMA_REJECTED_BY_BS: CDMA specific. Rejected by the BS. * @QMI_WDS_CALL_END_REASON_CDMA_INCOMPATIBLE: CDMA specific. Concurrent services requested are incompatible. * @QMI_WDS_CALL_END_REASON_CDMA_ALREADY_IN_TC: CDMA specific. Already in TC. * @QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_GPS: CDMA specific. Call originated during GPS. * @QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_SMS: CDMA specific. Call originated during SMS. * @QMI_WDS_CALL_END_REASON_CDMA_NO_SERVICE: CDMA specific. No service. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONFERENCE_FAILED: GSM/WCDMA specific. Call origination request failed. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INCOMING_REJECTED: GSM/WCDMA specific. Client rejected incoming call. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_SERVICE: GSM/WCDMA specific. No service. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_END: GSM/WCDMA specific. Network ended the call. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_LLC_SNDCP_FAILURE: GSM/WCDMA specific. LLC or SNDCP failure. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INSUFFICIENT_RESOURCES: GSM/WCDMA specific. Insufficient resources. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_TEMPORARILY_OUT_OF_ORDER: GSM/WCDMA specific. Service option temporarily out of order. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NSAPI_ALREADY_USED: GSM/WCDMA specific. NSAPI already used. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_REGULAR_DEACTIVATION: GSM/WCDMA specific. Regular PDP context deactivation. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_FAILURE: GSM/WCDMA specific. Network failure. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_REATTACH_REQUIRED: GSM/WCDMA specific. Reattach required. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_PROTOCOL_ERROR: GSM/WCDMA specific. Protocol error. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPERATOR_DETERMINED_BARRING: GSM/WCDMA specific. Operator-determined barring. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_APN: GSM/WCDMA specific. Unknown or missing APN. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP: GSM/WCDMA specific. Unknown PDP address or type. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_GGSN_REJECT: GSM/WCDMA specific. Activation rejected by GGSN. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_ACTIVATION_REJECT: GSM/WCDMA specific. Activation rejected. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_NOT_SUPPORTED: GSM/WCDMA specific. Service option not supported. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_UNSUBSCRIBED: GSM/WCDMA specific. Service option not subscribed. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_QOS_NOT_ACCEPTED: GSM/WCDMA specific. QoS not accepted. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SEMANTIC_ERROR: GSM/WCDMA specific. Semantic error in TFT operation. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SYNTAX_ERROR: GSM/WCDMA specific. Syntax error in TFT operation. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP_CONTEXT: GSM/WCDMA specific. Unknown PDP context. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SEMANTIC_ERROR: GSM/WCDMA specific. Semantic error in packet filters. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SYNTAX_ERROR: GSM/WCDMA specific. Syntax error in packet filters. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_PDP_WITHOUT_ACTIVE_TFT: GSM/WCDMA specific. PDP context without TFT activated. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_TRANSACTION_ID: GSM/WCDMA specific. Invalid transaction ID. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_INCORRECT_SEMANTIC: GSM/WCDMA specific. Message incorrect semantically. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_MANDATORY_INFO: GSM/WCDMA specific. Invalid mandatory information. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_UNSUPPORTED: GSM/WCDMA specific. Message type not implemented. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_NONCOMPATIBLE_STATE: GSM/WCDMA specific. Message not compatible with state. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_INFO_ELEMENT: GSM/WCDMA specific. Information element unknown. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONDITIONAL_IE_ERROR: GSM/WCDMA specific. Conditional IE error. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE: GSM/WCDMA specific. Message and protocol state uncompatible. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_APN_TYPE_CONFLICT: GSM/WCDMA specific. APN type conflict. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_GPRS_CONTEXT: GSM/WCDMA specific. No GPRS context. * @QMI_WDS_CALL_END_REASON_GSM_WCDMA_FEATURE_NOT_SUPPORTED: GSM/WCDMA specific. Feature not supported. * @QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_GENERAL_OR_BUSY: CDMA/EVDO specific. Received Connection Deny: General or Network busy. * @QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE: CDMA/EVDO specific. Received Connection Deny: Billing or Authentication failure. * @QMI_WDS_CALL_END_REASON_EVDO_HDR_CHANGE: CDMA/EVDO specific. Change HDR. * @QMI_WDS_CALL_END_REASON_EVDO_HDR_EXIT: CDMA/EVDO specific. Exit HDR. * @QMI_WDS_CALL_END_REASON_EVDO_HDR_NO_SESSION: CDMA/EVDO specific. No HDR session. * @QMI_WDS_CALL_END_REASON_EVDO_HDR_ORIGINATION_DURING_GPS_FIX: CDMA/EVDO specific. HDR call ended in favor of a GPS fix. * @QMI_WDS_CALL_END_REASON_EVDO_HDR_CONNECTION_SETUP_TIMEOUT: CDMA/EVDO specific. Connection setup timeout. * @QMI_WDS_CALL_END_REASON_EVDO_HDR_RELEASED_BY_CM: CDMA/EVDO specific. Released HDR call by call manager. * * Reason for ending the call. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ /* Generic reasons */ QMI_WDS_CALL_END_REASON_GENERIC_UNSPECIFIED = 1, QMI_WDS_CALL_END_REASON_GENERIC_CLIENT_END = 2, QMI_WDS_CALL_END_REASON_GENERIC_NO_SERVICE = 3, QMI_WDS_CALL_END_REASON_GENERIC_FADE = 4, QMI_WDS_CALL_END_REASON_GENERIC_RELEASE_NORMAL = 5, QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_ATTEMPT_IN_PROGRESS = 6, QMI_WDS_CALL_END_REASON_GENERIC_ACCESS_FAILURE = 7, QMI_WDS_CALL_END_REASON_GENERIC_REDIRECTION_OR_HANDOFF = 8, QMI_WDS_CALL_END_REASON_GENERIC_CLOSE_IN_PROGRESS = 9, QMI_WDS_CALL_END_REASON_GENERIC_AUTHENTICATION_FAILED = 10, QMI_WDS_CALL_END_REASON_GENERIC_INTERNAL_ERROR = 11, /* CDMA specific reasons */ QMI_WDS_CALL_END_REASON_CDMA_LOCK = 500, QMI_WDS_CALL_END_REASON_CDMA_INTERCEPT = 501, QMI_WDS_CALL_END_REASON_CDMA_REORDER = 502, QMI_WDS_CALL_END_REASON_CDMA_RELEASE_SO_REJECT = 503, QMI_WDS_CALL_END_REASON_CDMA_INCOMING_CALL = 504, QMI_WDS_CALL_END_REASON_CDMA_ALERT_STOP = 505, QMI_WDS_CALL_END_REASON_CDMA_ACTIVATION = 506, QMI_WDS_CALL_END_REASON_CDMA_MAX_ACCESS_PROBES = 507, QMI_WDS_CALL_END_REASON_CDMA_CCS_NOT_SUPPORTED_BY_BS = 508, QMI_WDS_CALL_END_REASON_CDMA_NO_RESPONSE_FROM_BS = 509, QMI_WDS_CALL_END_REASON_CDMA_REJECTED_BY_BS = 510, QMI_WDS_CALL_END_REASON_CDMA_INCOMPATIBLE = 511, QMI_WDS_CALL_END_REASON_CDMA_ALREADY_IN_TC = 512, QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_GPS = 513, QMI_WDS_CALL_END_REASON_CDMA_USER_CALL_ORIGINATED_DURING_SMS = 514, QMI_WDS_CALL_END_REASON_CDMA_NO_SERVICE = 515, /* GSM/WCDMA specific reasons */ QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONFERENCE_FAILED = 1000, QMI_WDS_CALL_END_REASON_GSM_WCDMA_INCOMING_REJECTED = 1001, QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_SERVICE = 1002, QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_END = 1003, QMI_WDS_CALL_END_REASON_GSM_WCDMA_LLC_SNDCP_FAILURE = 1004, QMI_WDS_CALL_END_REASON_GSM_WCDMA_INSUFFICIENT_RESOURCES = 1005, QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_TEMPORARILY_OUT_OF_ORDER = 1006, QMI_WDS_CALL_END_REASON_GSM_WCDMA_NSAPI_ALREADY_USED = 1007, QMI_WDS_CALL_END_REASON_GSM_WCDMA_REGULAR_DEACTIVATION = 1008, QMI_WDS_CALL_END_REASON_GSM_WCDMA_NETWORK_FAILURE = 1009, QMI_WDS_CALL_END_REASON_GSM_WCDMA_REATTACH_REQUIRED = 1010, QMI_WDS_CALL_END_REASON_GSM_WCDMA_PROTOCOL_ERROR = 1011, QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPERATOR_DETERMINED_BARRING = 1012, QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_APN = 1013, QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP = 1014, QMI_WDS_CALL_END_REASON_GSM_WCDMA_GGSN_REJECT = 1015, QMI_WDS_CALL_END_REASON_GSM_WCDMA_ACTIVATION_REJECT = 1016, QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_NOT_SUPPORTED = 1017, QMI_WDS_CALL_END_REASON_GSM_WCDMA_OPTION_UNSUBSCRIBED = 1018, QMI_WDS_CALL_END_REASON_GSM_WCDMA_QOS_NOT_ACCEPTED = 1019, QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SEMANTIC_ERROR = 1020, QMI_WDS_CALL_END_REASON_GSM_WCDMA_TFT_SYNTAX_ERROR = 1021, QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_PDP_CONTEXT = 1022, QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SEMANTIC_ERROR = 1023, QMI_WDS_CALL_END_REASON_GSM_WCDMA_FILTER_SYNTAX_ERROR = 1024, QMI_WDS_CALL_END_REASON_GSM_WCDMA_PDP_WITHOUT_ACTIVE_TFT = 1025, QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_TRANSACTION_ID = 1026, QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_INCORRECT_SEMANTIC = 1027, QMI_WDS_CALL_END_REASON_GSM_WCDMA_INVALID_MANDATORY_INFO = 1028, QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_UNSUPPORTED = 1029, QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_TYPE_NONCOMPATIBLE_STATE = 1030, QMI_WDS_CALL_END_REASON_GSM_WCDMA_UNKNOWN_INFO_ELEMENT = 1031, QMI_WDS_CALL_END_REASON_GSM_WCDMA_CONDITIONAL_IE_ERROR = 1032, QMI_WDS_CALL_END_REASON_GSM_WCDMA_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE = 1033, QMI_WDS_CALL_END_REASON_GSM_WCDMA_APN_TYPE_CONFLICT = 1034, QMI_WDS_CALL_END_REASON_GSM_WCDMA_NO_GPRS_CONTEXT = 1035, QMI_WDS_CALL_END_REASON_GSM_WCDMA_FEATURE_NOT_SUPPORTED = 1036, /* EVDO specific reasons */ QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_GENERAL_OR_BUSY = 1500, QMI_WDS_CALL_END_REASON_EVDO_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE = 1501, QMI_WDS_CALL_END_REASON_EVDO_HDR_CHANGE = 1502, QMI_WDS_CALL_END_REASON_EVDO_HDR_EXIT = 1503, QMI_WDS_CALL_END_REASON_EVDO_HDR_NO_SESSION = 1504, QMI_WDS_CALL_END_REASON_EVDO_HDR_ORIGINATION_DURING_GPS_FIX = 1505, QMI_WDS_CALL_END_REASON_EVDO_HDR_CONNECTION_SETUP_TIMEOUT = 1506, QMI_WDS_CALL_END_REASON_EVDO_HDR_RELEASED_BY_CM = 1507 } QmiWdsCallEndReason; /** * QmiWdsVerboseCallEndReasonType: * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP: Mobile IP. * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL: Internal. * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM: Call manager. * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP: 3GPP. * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP: PPP. * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD: eHRPD. * @QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6: IPv6. * * Type of verbose call end reason. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP = 1, QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL = 2, QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM = 3, QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP = 6, QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP = 7, QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD = 8, QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6 = 9 } QmiWdsVerboseCallEndReasonType; /** * qmi_wds_verbose_call_end_reason_get_string: * @type: a #QmiWdsVerboseCallEndReasonType. * @reason: the reason id. * * Get verbose call end reason based on the reason type. * * Returns: (transfer none): a string with the reason, or %NULL if not found. Do not free the returned value. * * Since: 1.0 */ const gchar *qmi_wds_verbose_call_end_reason_get_string (QmiWdsVerboseCallEndReasonType type, gint16 reason); /** * QmiWdsVerboseCallEndReasonMip: * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_ERROR_REASON_UNKNOWN: Unknown reason. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REASON_UNSPECIFIED: FA error. Reason unspecified. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ADMINISTRATIVELY_PROHIBITED: FA error. Administratively prohibited. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_INSUFFICIENT_RESOURCES: FA error. Insufficient resources. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE: FA error. Mobile node authenticatin failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_HA_AUTHENTICATION_FAILURE: FA error. HA authentication failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REQUESTED_LIFETIME_TOO_LONG: FA error. Requested lifetime too long. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REQUEST: FA error. Malformed request. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REPLY: FA error. Malformed reply. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ENCAPSULATION_UNAVAILABLE: FA error. Encapsulation unavailable. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_VJHC_UNAVAILABLE: FA error. VJHC unavailable. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_UNAVAILABLE: FA error. Reverse tunnel unavailable. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET: FA error. Reverse tunnel mandatory and T bit not set. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_DELIVERY_STYLE_NOT_SUPPORTED: FA error. Delivery style not supported. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_NAI: FA error. Missing NAI. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HA: FA error. Missing HA. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HOME_ADDRESS: FA error. Missing home address. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_UNKNOWN_CHALLENGE: FA error. Unknown challenge. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_CHALLENGE: FA error. Missing challenge. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_STALE_CHALLENGE: FA error. Stale challenge. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REASON_UNSPECIFIED: HA error. Reason unspecified. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ADMINISTRATIVELY_PROHIBITED: HA error. Administratively prohibited. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_INSUFFICIENT_RESOURCES: HA error. Insufficient resources. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE: HA error. Mobile node authentication failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_FA_AUTHENTICATION_FAILURE: HA error. FA authentication failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REGISTRATION_ID_MISMATCH: HA error. Registration ID mismatch. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MALFORMED_REQUEST: HA error. Malformed request. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_UNKNOWN_HA_ADDRESS: HA error. Unknown HA address. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_UNAVAILABLE: HA error. Reverse tunnel unavailable. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET: HA error. Reverse tunnel mandatory and T bit not set. * @QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ENCAPSULATION_UNAVAILABLE: HA error. Encapsulation unavailable. * * Mobile IP specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_MIP. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_MIP_ERROR_REASON_UNKNOWN = -1, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REASON_UNSPECIFIED = 64, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ADMINISTRATIVELY_PROHIBITED = 65, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_INSUFFICIENT_RESOURCES = 66, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE = 67, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_HA_AUTHENTICATION_FAILURE = 68, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REQUESTED_LIFETIME_TOO_LONG = 69, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REQUEST = 70, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MALFORMED_REPLY = 71, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_ENCAPSULATION_UNAVAILABLE = 72, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_VJHC_UNAVAILABLE = 73, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_UNAVAILABLE = 74, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET = 75, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_DELIVERY_STYLE_NOT_SUPPORTED = 79, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_NAI = 97, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HA = 98, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_HOME_ADDRESS = 99, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_UNKNOWN_CHALLENGE = 104, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_MISSING_CHALLENGE = 105, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_FA_ERROR_STALE_CHALLENGE = 106, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REASON_UNSPECIFIED = 128, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ADMINISTRATIVELY_PROHIBITED = 129, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_INSUFFICIENT_RESOURCES = 130, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MOBILE_NODE_AUTHENTICATION_FAILURE = 131, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_FA_AUTHENTICATION_FAILURE = 132, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REGISTRATION_ID_MISMATCH = 133, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_MALFORMED_REQUEST = 134, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_UNKNOWN_HA_ADDRESS = 136, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_UNAVAILABLE = 137, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_REVERSE_TUNNEL_MANDATORY_AND_T_BIT_NOT_SET = 138, QMI_WDS_VERBOSE_CALL_END_REASON_MIP_HA_ERROR_ENCAPSULATION_UNAVAILABLE = 139 } QmiWdsVerboseCallEndReasonMip; /** * QmiWdsVerboseCallEndReasonInternal: * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_ERROR: Internal error. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ENDED: Call ended. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_INTERNAL_CAUSE: Unknown internal cause. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_CAUSE: Unknown cause. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CLOSE_IN_PROGRESS: Close in progress. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NETWORK_INITIATED_TERMINATION: Network initiated termination. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APP_PREEMPTED: App preempted. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_DISALLOWED: PDN IPv4 call disallowed. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_THROTTLED: PDN IPv4 call throttled. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_DISALLOWED: PDN IPv6 call disallowed. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_THROTTLED: PDN IPv6 call throttled. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MODEM_RESTART: Modem restart. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDP_PPP_NOT_SUPPORTED: PDP PPP not supported. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNPREFERRED_RAT: Unpreferred RAT. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PHYSICAL_LINK_CLOSE_IN_PROGRESS: Physical link close in progress. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PENDING_HANDOVER: APN pending handover. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PROFILE_BEARER_INCOMPATIBLE: Profile bearer incompatible. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MMGDSI_CARD_EVENT: MMGDSI Card event. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_LPM_OR_POWER_DOWN: LPM or power down. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISABLED: APN disabled. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MPIT_EXPIRED: MPIT expired. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IPV6_ADDRESS_TRANSFER_FAILED: IPv6 address transfer failed. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_TRAT_SWAP_FAILED: TRAT swap failed. Since 1.14. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EHRPD_TO_HRPD_FALLBACK: eHRPD to HRPD fallback. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MANDATORY_APN_DISABLED: Mandatory APN disabled. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MIP_CONFIG_FAILURE: MIP config failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_INACTIVITY_TIMER_EXPIRED: PDN inactivity timeout expired. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V4_CONNECTIONS: Max IPv4 connections. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V6_CONNECTIONS: Max IPv6 connections. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_MISMATCH: APN mismatch. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_VERSION_MISMATCH: IP version mismatch. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DUN_CALL_DISALLOWED: DUN call disallowed. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE: Invalid profile. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EPC_NONEPC_TRANSITION: EPC to non-EPC transition. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE_ID: Invalid profile ID. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ALREADY_PRESENT: Call already present. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE: Interface in use. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_PDP_MISMATCH: IP PDP mismatch. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISALLOWED_ON_ROAMING: APN disallowed on roaming. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PARAMETER_CHANGE: APN parameter change. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE_CONFIG_MATCH: Interface in use config match. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NULL_APN_DISALLOWED: NULL APN disallowed. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_THERMAL_MITIGATION: Thermal mitigation. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_SUBS_ID_MISMATCH: Subs ID mismatch Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_SETTINGS_DISABLED: Data settings disabled. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_ROAMING_SETTINGS_DISABLED: Data roaming settings disabled. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_FORMAT_INVALID: APN format invalid. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DDS_CALL_ABORT: DDS call abort. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_VALIDATION_FAILURE: Validation failure. Since 1.24.10. * * Internal call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_INTERNAL. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_ERROR = 201, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ENDED = 202, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_INTERNAL_CAUSE = 203, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNKNOWN_CAUSE = 204, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CLOSE_IN_PROGRESS = 205, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NETWORK_INITIATED_TERMINATION = 206, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APP_PREEMPTED = 207, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_DISALLOWED = 208, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV4_CALL_THROTTLED = 209, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_DISALLOWED = 210, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_IPV6_CALL_THROTTLED = 211, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MODEM_RESTART = 212, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDP_PPP_NOT_SUPPORTED = 213, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_UNPREFERRED_RAT = 214, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PHYSICAL_LINK_CLOSE_IN_PROGRESS = 215, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PENDING_HANDOVER = 216, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PROFILE_BEARER_INCOMPATIBLE = 217, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MMGDSI_CARD_EVENT = 218, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_LPM_OR_POWER_DOWN = 219, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISABLED = 220, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MPIT_EXPIRED = 221, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IPV6_ADDRESS_TRANSFER_FAILED = 222, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_TRAT_SWAP_FAILED = 223, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EHRPD_TO_HRPD_FALLBACK = 224, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MANDATORY_APN_DISABLED = 225, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MIP_CONFIG_FAILURE = 226, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_PDN_INACTIVITY_TIMER_EXPIRED = 227, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V4_CONNECTIONS = 228, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_MAX_V6_CONNECTIONS = 229, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_MISMATCH = 230, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_VERSION_MISMATCH = 231, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DUN_CALL_DISALLOWED = 232, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE = 233, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_EPC_NONEPC_TRANSITION = 234, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INVALID_PROFILE_ID = 235, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_CALL_ALREADY_PRESENT = 236, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE = 237, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_IP_PDP_MISMATCH = 238, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_DISALLOWED_ON_ROAMING = 239, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_PARAMETER_CHANGE = 240, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_INTERFACE_IN_USE_CONFIG_MATCH = 241, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_NULL_APN_DISALLOWED = 242, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_THERMAL_MITIGATION = 243, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_SUBS_ID_MISMATCH = 244, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_SETTINGS_DISABLED = 245, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DATA_ROAMING_SETTINGS_DISABLED = 246, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_APN_FORMAT_INVALID = 247, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_DDS_CALL_ABORT = 248, QMI_WDS_VERBOSE_CALL_END_REASON_INTERNAL_VALIDATION_FAILURE = 249, } QmiWdsVerboseCallEndReasonInternal; /** * QmiWdsVerboseCallEndReasonCm: * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CDMA_LOCK: CDMA specific. Phone is CDMA-locked. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INTERCEPT: CDMA specific. Received intercept from the BS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REORDER: CDMA specific. Received reorder from the BS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_SO_REJECT: CDMA specific. Received release from the BS, SO reject. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_CALL: CDMA specific. Received incoming call from the BS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALERT_STOP: CDMA specific. Received alert stop from the BS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACTIVATION: CDMA specific. Received end activation. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MAX_ACCESS_PROBES: CDMA specific. Maximum access probes transmitted. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CCS_NOT_SUPPORTED_BY_BS: CDMA specific. Concurrent service not supported by the BS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_RESPONSE_FROM_BS: CDMA specific. No response received from the BS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REJECTED_BY_BS: CDMA specific. Rejected by the BS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMPATIBLE: CDMA specific. Concurrent services requested are incompatible. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALREADY_IN_TC: CDMA specific. Already in TC. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_GPS: CDMA specific. Call originated during GPS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_SMS: CDMA specific. Call originated during SMS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_CDMA_SERVICE: CDMA specific. No service. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MC_ABORT: MC abort. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PSIST_NG: Persistence test failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_UIM_NOT_PRESENT: UIM not present. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RETRY_ORDER: Retry order. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK: Access blocked. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK_ALL: Access blocked for all. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_IS707B_MAX_ACCESS_PROBES: Maximum access probes for IS-707B call. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_THERMAL_EMERGENCY: Thermal emergency. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_ORIGINATION_THROTTLED: Call origination throttled. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED: Voice call originated and concurrent voice/data not supported. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED: Conference failed. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_REJECTED: Incoming rejected. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GATEWAY_SERVICE: No gateway service. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GPRS_CONTEXT: No GPRS context. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_MS: Illegal MS. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_ME: Illegal ME. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_AND_NON_GPRS_SERVICES_NOT_ALLOWED: GPRS and non GPRS services not allowed. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED: GPRS services not allowed. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MS_IDENTITY_NOT_DERIVED_BY_THE_NETWORK: MS identity not derived by the network. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_IMPLICITLY_DETACHED: Implicitly detached. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PLMN_NOT_ALLOWED: PLMN not allowed. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LA_NOT_ALLOWED: LA not allowed. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED_IN_PLMN: GPRS services not allowed in PLMN. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_DUPLICATE: PDP duplicate. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_UE_RAT_CHANGE: UE radio access technology change. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONGESTION: Congestion. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_PDP_CONTEXT_ACTIVATED: No PDP context activated. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_CLASS_DSAC_REJECTION: Access class DSAC rejection. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_ACTIVATE_MAX_RETRY_FAILED: Maximum retries failed to activate PDP context. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RAB_FAILURE: RAB failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EPS_SERVICE_NOT_ALLOWED: EPS service not allowed. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_TRACKING_AREA_NOT_ALLOWED: Tracking area not allowed. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ROAMING_NOT_ALLOWED_IN_TRACKING_AREA: Roaming not allowed in tracking area. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SUITABLE_CELLS_IN_TRACKING_AREA: No suitable cells in tracking area. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NOT_AUTHORIZED_CLOSED_SUBSCRIBER_GROUP: Not authorized in closed subscriber group. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_UNKNOWN_EPS_BEARER_CONTEXT: EPS Session Management, unknown EPS bearer context. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DRB_RELEASED_AT_RRC: DRB released at RRC. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NAS_SIGNAL_CONNECTION_RELEASED: NAS signal connection released. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_DETACHED: EPS Mobility Management, detached. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_FAILED: EPS Mobility Management, attach failed. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_STARTED: EPS Mobility Management, attach started. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED: LTE NAS service request failed. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_ACTIVE_DEDICATED_BEARER_REACTIVATED_BY_NW: EPS Session Management, active dedicated bearer reactivated by network. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOWER_LAYER_FAILURE: EPS Session Management, lower layer failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_SYNC_UP_WITH_NW: EPS Session Management, sync up with network. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_NW_ACTIVATED_DEDICATED_BEARER_WITH_ID_OF_DEFAULT_BEARER: EPS Session Management, network activated dedicated bearer with id of default bearer. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_BAD_OTA_MESSAGE: EPS Session Management, bad OTA message. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_DS_REJECTED_CALL: EPS Session Management, DS rejected call. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT: EPS Session Management, context transferred due to IRAT. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DS_EXPLICIT_DEACT: DS explicit deactivation. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOCAL_CAUSE_NONE: EPS Session Management, local cause none. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_NO_THROTTLE: LTE NAS service request failed, no throttle. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACL_FAILURE: ACL failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_DS_DISALLOW: LTE NAS service request failed, DS disallow. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXPIRED: EPS Mobility Management, T3417 expired. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXT_EXPIRED: EPS Mobility Management, T3417 ext expired. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_TXN: LTE Radio Resource Control, UL data confirmation failure, txn. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_HANDOVER: LTE Radio Resource Control, UL data confirmation failure, handover. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CONN_REL: LTE Radio Resource Control, UL data confirmation failure, connection release. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_RLF: LTE Radio Resource Control, UL data confirmation failure, radio link failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CTRL_NOT_CONN: LTE Radio Resource Control, UL data confirmation failure, ctrl not conn. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE: LTE Radio Resource Control, connection establishment failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ABORTED: LTE Radio Resource Control, connection establishment failure, aborted. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ACCESS_BARRED: LTE Radio Resource Control, connection establishment failure, access barred. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CELL_RESELECTION: LTE Radio Resource Control, connection establishment failure, cell reselection. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CONFIG_FAILURE: LTE Radio Resource Control, connection establishment failure, config failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_TIMER_EXPIRED: LTE Radio Resource Control, connection establishment failure, timer expired. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_LINK_FAILURE: LTE Radio Resource Control, connection establishment failure, link failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_NOT_CAMPED: LTE Radio Resource Control, connection establishment failure, not camped. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_SI_FAILURE: LTE Radio Resource Control, connection establishment failure, SI failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_REJECTED: LTE Radio Resource Control, connection establishment failure, rejected. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_NORMAL: LTE Radio Resource Control, connection release, normal. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_RLF: LTE Radio Resource Control, connection release, radio link failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_CRE_FAILURE: LTE Radio Resource Control, connection release, cre failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_OOS_DURING_CRE: LTE Radio Resource Control, connection release, oos during cre. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_ABORTED: LTE Radio Resource Control, connection release, aborted. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_SIB_READ_ERROR: LTE Radio Resource Control, connection release, SIB read error. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITH_REATTACH_LTE_NW_DETACH: Detach with reattach LTE network detach. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITHOUT_REATTACH_LTE_NW_DETACH: Detach without reattach LTE network detach. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_PROC_TIMEOUT: EPS Session Management, proc timeout. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_MESSAGE_EXCEED_MAX_L2_LIMIT: Message exceed max L2 limit. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_GENERAL_OR_BUSY: CDMA/EVDO specific. Received Connection Deny. General or Network busy. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE: CDMA/EVDO specific. Received Connection Deny. Billing or Authentication failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CHANGE: CDMA/EVDO specific. Change HDR. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_EXIT: CDMA/EVDO specific. Exit HDR. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_SESSION: CDMA/EVDO specific. No HDR session. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ORIGINATION_DURING_GPS_FIX: CDMA/EVDO specific. HDR call ended in favor of a GPS fix. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CONNECTION_SETUP_TIMEOUT: CDMA/EVDO specific. Connection setup timeout. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_RELEASED_BY_CM: CDMA/EVDO specific. Released HDR call by call manager. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_COLLOCATED_ACQUISITION_FAILED: Failed to acquire co-located HDR for origination. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_OTASP_COMMIT_IN_PROGRESS: CDMA/EVDO specific. OTASP commit in progress. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_HYBRID_SERVICE: CDMA/EVDO specific. No hybrid HDR service. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_LOCK_GRANTED: CDMA/EVDO specific. No lock granted. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HOLD_OTHER_IN_PROGRESS: CDMA/EVDO specific. hold other in progress. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_FADE: CDMA/EVDO specific. Fade. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ACCESS_FAILURE: CDMA/EVDO specific. Access failure. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CLIENT_END: Client end. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SERVICE: No service. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_FADE: Fade. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_NORMAL: Release normal. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_ATTEMPT_IN_PROGRESS: Access attempt in progress. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_FAILURE: Access Failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_REDIRECTION_OR_HANDOFF: Redirection or handoff. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_OFFLINE: Offline. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMERGENCY_MODE: Emergency mode. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_PHONE_IN_USE: Phone in use. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_MODE: Invalid mode. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_SIM_STATE: Invalid SIM state. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_COLLOCATED_HDR: No collocated HDR. Since 1.24.10. * @QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_CONTROL_REJECTED: Call control rejected. Since 1.24.10. * * Call manager specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_CM. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_CM_CDMA_LOCK = 500, QMI_WDS_VERBOSE_CALL_END_REASON_CM_INTERCEPT = 501, QMI_WDS_VERBOSE_CALL_END_REASON_CM_REORDER = 502, QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_SO_REJECT = 503, QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_CALL = 504, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALERT_STOP = 505, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACTIVATION = 506, QMI_WDS_VERBOSE_CALL_END_REASON_CM_MAX_ACCESS_PROBES = 507, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CCS_NOT_SUPPORTED_BY_BS = 508, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_RESPONSE_FROM_BS = 509, QMI_WDS_VERBOSE_CALL_END_REASON_CM_REJECTED_BY_BS = 510, QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMPATIBLE = 511, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ALREADY_IN_TC = 512, QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_GPS = 513, QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED_DURING_SMS = 514, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_CDMA_SERVICE = 515, QMI_WDS_VERBOSE_CALL_END_REASON_CM_MC_ABORT = 516, QMI_WDS_VERBOSE_CALL_END_REASON_CM_PSIST_NG = 517, QMI_WDS_VERBOSE_CALL_END_REASON_CM_UIM_NOT_PRESENT = 518, QMI_WDS_VERBOSE_CALL_END_REASON_CM_RETRY_ORDER = 519, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK = 520, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_BLOCK_ALL = 521, QMI_WDS_VERBOSE_CALL_END_REASON_CM_IS707B_MAX_ACCESS_PROBES = 522, QMI_WDS_VERBOSE_CALL_END_REASON_CM_THERMAL_EMERGENCY = 523, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_ORIGINATION_THROTTLED = 524, QMI_WDS_VERBOSE_CALL_END_REASON_CM_USER_CALL_ORIGINATED = 525, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONFERENCE_FAILED = 1000, QMI_WDS_VERBOSE_CALL_END_REASON_CM_INCOMING_REJECTED = 1001, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GATEWAY_SERVICE = 1002, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_GPRS_CONTEXT = 1003, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_MS = 1004, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ILLEGAL_ME = 1005, QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_AND_NON_GPRS_SERVICES_NOT_ALLOWED = 1006, QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED = 1007, QMI_WDS_VERBOSE_CALL_END_REASON_CM_MS_IDENTITY_NOT_DERIVED_BY_THE_NETWORK = 1008, QMI_WDS_VERBOSE_CALL_END_REASON_CM_IMPLICITLY_DETACHED = 1009, QMI_WDS_VERBOSE_CALL_END_REASON_CM_PLMN_NOT_ALLOWED = 1010, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LA_NOT_ALLOWED = 1011, QMI_WDS_VERBOSE_CALL_END_REASON_CM_GPRS_SERVICES_NOT_ALLOWED_IN_PLMN = 1012, QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_DUPLICATE = 1013, QMI_WDS_VERBOSE_CALL_END_REASON_CM_UE_RAT_CHANGE = 1014, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONGESTION = 1015, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_PDP_CONTEXT_ACTIVATED = 1016, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_CLASS_DSAC_REJECTION = 1017, QMI_WDS_VERBOSE_CALL_END_REASON_CM_PDP_ACTIVATE_MAX_RETRY_FAILED = 1018, QMI_WDS_VERBOSE_CALL_END_REASON_CM_RAB_FAILURE = 1019, QMI_WDS_VERBOSE_CALL_END_REASON_CM_EPS_SERVICE_NOT_ALLOWED = 1020, QMI_WDS_VERBOSE_CALL_END_REASON_CM_TRACKING_AREA_NOT_ALLOWED = 1021, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ROAMING_NOT_ALLOWED_IN_TRACKING_AREA = 1022, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SUITABLE_CELLS_IN_TRACKING_AREA = 1023, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NOT_AUTHORIZED_CLOSED_SUBSCRIBER_GROUP = 1024, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_UNKNOWN_EPS_BEARER_CONTEXT = 1025, QMI_WDS_VERBOSE_CALL_END_REASON_CM_DRB_RELEASED_AT_RRC = 1026, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NAS_SIGNAL_CONNECTION_RELEASED = 1027, QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_DETACHED = 1028, QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_FAILED = 1029, QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_ATTACH_STARTED = 1030, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED = 1031, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_ACTIVE_DEDICATED_BEARER_REACTIVATED_BY_NW = 1032, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOWER_LAYER_FAILURE = 1033, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_SYNC_UP_WITH_NW = 1034, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_NW_ACTIVATED_DEDICATED_BEARER_WITH_ID_OF_DEFAULT_BEARER = 1035, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_BAD_OTA_MESSAGE = 1036, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_DS_REJECTED_CALL = 1037, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_CONTEXT_TRANSFERRED_DUE_TO_IRAT = 1038, QMI_WDS_VERBOSE_CALL_END_REASON_CM_DS_EXPLICIT_DEACT = 1039, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_LOCAL_CAUSE_NONE = 1040, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_NO_THROTTLE = 1041, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACL_FAILURE = 1042, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LTE_NAS_SERVICE_REQUEST_FAILED_DS_DISALLOW = 1043, QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXPIRED = 1044, QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMM_T3417_EXT_EXPIRED = 1045, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_TXN = 1046, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_HANDOVER = 1047, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CONN_REL = 1048, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_RLF = 1049, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_UL_DATA_CONFIRMATION_FAILURE_CTRL_NOT_CONN = 1050, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE = 1051, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ABORTED = 1052, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_ACCESS_BARRED = 1053, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CELL_RESELECTION = 1054, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_CONFIG_FAILURE = 1055, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_TIMER_EXPIRED = 1056, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_LINK_FAILURE = 1057, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_NOT_CAMPED = 1058, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_SI_FAILURE = 1059, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_ESTABLISHMENT_FAILURE_REJECTED = 1060, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_NORMAL = 1061, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_RLF = 1062, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_CRE_FAILURE = 1063, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_OOS_DURING_CRE = 1064, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_ABORTED = 1065, QMI_WDS_VERBOSE_CALL_END_REASON_CM_LRRC_CONNECTION_RELEASE_SIB_READ_ERROR = 1066, QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITH_REATTACH_LTE_NW_DETACH = 1067, QMI_WDS_VERBOSE_CALL_END_REASON_CM_DETACH_WITHOUT_REATTACH_LTE_NW_DETACH = 1068, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ESM_PROC_TIMEOUT = 1069, QMI_WDS_VERBOSE_CALL_END_REASON_CM_MESSAGE_EXCEED_MAX_L2_LIMIT = 1070, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_GENERAL_OR_BUSY = 1500, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CONNECTION_DENY_BILLING_OR_AUTHENTICATION_FAILURE = 1501, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CHANGE = 1502, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_EXIT = 1503, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_SESSION = 1504, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ORIGINATION_DURING_GPS_FIX = 1505, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_CONNECTION_SETUP_TIMEOUT = 1506, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_RELEASED_BY_CM = 1507, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_COLLOCATED_ACQUISITION_FAILED = 1508, QMI_WDS_VERBOSE_CALL_END_REASON_CM_OTASP_COMMIT_IN_PROGRESS = 1509, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_HYBRID_SERVICE = 1510, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_NO_LOCK_GRANTED = 1511, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HOLD_OTHER_IN_PROGRESS = 1512, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_FADE = 1513, QMI_WDS_VERBOSE_CALL_END_REASON_CM_HDR_ACCESS_FAILURE = 1514, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CLIENT_END = 2000, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_SERVICE = 2001, QMI_WDS_VERBOSE_CALL_END_REASON_CM_FADE = 2002, QMI_WDS_VERBOSE_CALL_END_REASON_CM_RELEASE_NORMAL = 2003, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_ATTEMPT_IN_PROGRESS = 2004, QMI_WDS_VERBOSE_CALL_END_REASON_CM_ACCESS_FAILURE = 2005, QMI_WDS_VERBOSE_CALL_END_REASON_CM_REDIRECTION_OR_HANDOFF = 2006, QMI_WDS_VERBOSE_CALL_END_REASON_CM_OFFLINE = 2500, QMI_WDS_VERBOSE_CALL_END_REASON_CM_EMERGENCY_MODE = 2501, QMI_WDS_VERBOSE_CALL_END_REASON_CM_PHONE_IN_USE = 2502, QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_MODE = 2503, QMI_WDS_VERBOSE_CALL_END_REASON_CM_INVALID_SIM_STATE = 2504, QMI_WDS_VERBOSE_CALL_END_REASON_CM_NO_COLLOCATED_HDR = 2505, QMI_WDS_VERBOSE_CALL_END_REASON_CM_CALL_CONTROL_REJECTED = 2506, } QmiWdsVerboseCallEndReasonCm; /** * QmiWdsVerboseCallEndReason3gpp: * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPERATOR_DETERMINED_BARRING: Operator-determined barring. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_LLC_SNDCP_FAILURE: LLC or SNDCP failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INSUFFICIENT_RESOURCES: Insufficient resources. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_APN: Unknown or missing APN. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP: Unknown PDP address or type. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_AUTHENTICATION_FAILED: Authentication failed. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_GGSN_REJECT: Activation rejected by GGSN. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ACTIVATION_REJECT: Activation rejected. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_NOT_SUPPORTED: Service option not supported. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_UNSUBSCRIBED: Service option not subscribed. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_TEMPORARILY_OUT_OF_ORDER: Service option temporarily out of order. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NSAPI_ALREADY_USED: NSAPI already used. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REGULAR_DEACTIVATION: Regular PDP context deactivation. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_QOS_NOT_ACCEPTED: QoS not accepted. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NETWORK_FAILURE: Network failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REATTACH_REQUIRED: Reattach required. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FEATURE_NOT_SUPPORTED: Feature not supported. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SEMANTIC_ERROR: Semantic error in TFT operation. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SYNTAX_ERROR: Syntax error in TFT operation. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP_CONTEXT: Unknown PDP context. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SEMANTIC_ERROR: Semantic error in packet filters. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SYNTAX_ERROR: Syntax error in packet filters. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDP_WITHOUT_ACTIVE_TFT: PDP context without TFT activated. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV4_ONLY_ALLOWED: IPv4 only allowed. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV6_ONLY_ALLOWED: IPv6 only allowed. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_SINGLE_ADDRESS_BEARER_ONLY: Single address bearer only. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ESM_INFO_NOT_RECEIVED: ESM information not received. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDN_CONNECTION_DOES_NOT_EXIST: PDN connection does not exist. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MULTIPLE_CONNECTION_TO_SAME_PDN_NOT_ALLOWED: Multiple connection to same PDN not allowed. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_TRANSACTION_ID: Invalid transaction ID. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_INCORRECT_SEMANTIC: Message incorrect semantically. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_MANDATORY_INFO: Invalid mandatory information. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_UNSUPPORTED: Message type not implemented. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_NONCOMPATIBLE_STATE: Message not compatible with state. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_INFO_ELEMENT: Information element unknown. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_CONDITIONAL_IE_ERROR: Conditional IE error. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE: Message and protocol state uncompatible. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PROTOCOL_ERROR: Protocol error. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_APN_TYPE_CONFLICT: APN type conflict. * @QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_PROXY_CALL_SESSION_CONTROL_FUNCTION_ADDRESS: Invalid proxy call session control function address. Since 1.24.10. * * 3GPP-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_3GPP. * * Since: 1.0 */ typedef enum { /*< underscore_name=qmi_wds_verbose_call_end_reason_3gpp,since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPERATOR_DETERMINED_BARRING = 8, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_LLC_SNDCP_FAILURE = 25, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INSUFFICIENT_RESOURCES = 26, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_APN = 27, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP = 28, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_AUTHENTICATION_FAILED = 29, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_GGSN_REJECT = 30, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ACTIVATION_REJECT = 31, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_NOT_SUPPORTED = 32, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_UNSUBSCRIBED = 33, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_OPTION_TEMPORARILY_OUT_OF_ORDER = 34, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NSAPI_ALREADY_USED = 35, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REGULAR_DEACTIVATION = 36, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_QOS_NOT_ACCEPTED = 37, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_NETWORK_FAILURE = 38, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_REATTACH_REQUIRED = 39, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FEATURE_NOT_SUPPORTED = 40, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SEMANTIC_ERROR = 41, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_TFT_SYNTAX_ERROR = 42, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_PDP_CONTEXT = 43, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SEMANTIC_ERROR = 44, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_FILTER_SYNTAX_ERROR = 45, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDP_WITHOUT_ACTIVE_TFT = 46, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV4_ONLY_ALLOWED = 50, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_IPV6_ONLY_ALLOWED = 51, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_SINGLE_ADDRESS_BEARER_ONLY = 52, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_ESM_INFO_NOT_RECEIVED = 53, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PDN_CONNECTION_DOES_NOT_EXIST = 54, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MULTIPLE_CONNECTION_TO_SAME_PDN_NOT_ALLOWED = 55, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_TRANSACTION_ID = 81, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_INCORRECT_SEMANTIC = 95, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_MANDATORY_INFO = 96, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_UNSUPPORTED = 97, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_TYPE_NONCOMPATIBLE_STATE = 98, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_UNKNOWN_INFO_ELEMENT = 99, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_CONDITIONAL_IE_ERROR = 100, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_MESSAGE_AND_PROTOCOL_STATE_UNCOMPATIBLE = 101, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_PROTOCOL_ERROR = 111, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_APN_TYPE_CONFLICT = 112, QMI_WDS_VERBOSE_CALL_END_REASON_3GPP_INVALID_PROXY_CALL_SESSION_CONTROL_FUNCTION_ADDRESS = 113, } QmiWdsVerboseCallEndReason3gpp; /** * QmiWdsVerboseCallEndReasonPpp: * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_UNKNOWN: Unknown error. * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_TIMEOUT: Timeout. * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_AUTHENTICATION_FAILURE: Authentication failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_OPTION_MISMATCH: Option mismatch. * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_PAP_FAILURE: PAP failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CHAP_FAILURE: CHAP failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CLOSE_IN_PROGRESS: Close in progress. Since 1.24.10. * * PPP-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_PPP. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_PPP_UNKNOWN = -1, QMI_WDS_VERBOSE_CALL_END_REASON_PPP_TIMEOUT = 1, QMI_WDS_VERBOSE_CALL_END_REASON_PPP_AUTHENTICATION_FAILURE = 2, QMI_WDS_VERBOSE_CALL_END_REASON_PPP_OPTION_MISMATCH = 3, QMI_WDS_VERBOSE_CALL_END_REASON_PPP_PAP_FAILURE = 31, QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CHAP_FAILURE = 32, QMI_WDS_VERBOSE_CALL_END_REASON_PPP_CLOSE_IN_PROGRESS = 33, } QmiWdsVerboseCallEndReasonPpp; /** * QmiWdsVerboseCallEndReasonEhrpd: * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV4: Subscription limited to IPv4. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV6: Subscription limited to IPv6. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_TIMEOUT: VSNCP specific. timeout. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_FAILURE: VSNCP specific. failure. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_GENERAL_ERROR: VSNCP specific. 3GPP2 general error. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_UNAUTHENTICATED_APN: VSNCP specific. 3GPP2 unauthenticated APN. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_LIMIT_EXCEEDED: VSNCP specific. 3GPP2 PDN limit exceeded. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_NO_PDN_GATEWAY: VSNCP specific. 3GPP2 no PDN gateway. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_UNREACHABLE: VSNCP specific. 3GPP2 PDN gateway unreachable. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_REJECTED: VSNCP specific. 3GPP2 PDN gateway rejected. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_INSUFFICIENT_PARAMETERS: VSNCP specific. 3GPP2 insufficient parameters. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_RESOURCE_UNAVAILABLE: VSNCP specific. 3GPP2 resource unavailable. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_ADMINISTRATIVELY_PROHIBITED: VSNCP specific. 3GPP2 administratively prohibited. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_ID_IN_USE: VSNCP specific. 3GPP2 PDN ID in use. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_SUBSCRIPTION_LIMITATION: VSNCP specific. 3GPP2 subscription limitation. * @QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_EXISTS_FOR_THIS_APN: VSNCP specific. 3GPP2 PDN exists for this APN. * * eHRPD-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_EHRPD. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV4 = 1, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_SUBSCRIPTION_LIMITED_TO_IPV6 = 2, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_TIMEOUT = 4, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_FAILURE = 5, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_GENERAL_ERROR = 6, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_UNAUTHENTICATED_APN = 7, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_LIMIT_EXCEEDED = 8, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_NO_PDN_GATEWAY = 9, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_UNREACHABLE = 10, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_GATEWAY_REJECTED = 11, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_INSUFFICIENT_PARAMETERS = 12, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_RESOURCE_UNAVAILABLE = 13, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_ADMINISTRATIVELY_PROHIBITED = 14, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_ID_IN_USE = 15, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_SUBSCRIPTION_LIMITATION = 16, QMI_WDS_VERBOSE_CALL_END_REASON_EHRPD_VSNCP_3GPP2_PDN_EXISTS_FOR_THIS_APN = 17 } QmiWdsVerboseCallEndReasonEhrpd; /** * QmiWdsVerboseCallEndReasonIpv6: * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_PREFIX_UNAVAILABLE: Prefix unavailable. * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_HRPD_IPV6_DISABLED: HRDP IPv6 disabled. * @QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_DISABLED: IPv6 disabled. Since 1.24.10. * * IPv6-specific call end reasons, given when the @QmiWdsVerboseCallEndReasonType is #QMI_WDS_VERBOSE_CALL_END_REASON_TYPE_IPV6. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_PREFIX_UNAVAILABLE = 1, QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_HRPD_IPV6_DISABLED = 2, QMI_WDS_VERBOSE_CALL_END_REASON_IPV6_DISABLED = 3, } QmiWdsVerboseCallEndReasonIpv6; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Get Packet Service Status' message */ /** * QmiWdsConnectionStatus: * @QMI_WDS_CONNECTION_STATUS_UNKNOWN: Unknown status. * @QMI_WDS_CONNECTION_STATUS_DISCONNECTED: Network is disconnected * @QMI_WDS_CONNECTION_STATUS_CONNECTED: Network is connected. * @QMI_WDS_CONNECTION_STATUS_SUSPENDED: Network connection is suspended. * @QMI_WDS_CONNECTION_STATUS_AUTHENTICATING: Network authentication is ongoing. * * Status of the network connection. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_CONNECTION_STATUS_UNKNOWN = 0, QMI_WDS_CONNECTION_STATUS_DISCONNECTED = 1, QMI_WDS_CONNECTION_STATUS_CONNECTED = 2, QMI_WDS_CONNECTION_STATUS_SUSPENDED = 3, QMI_WDS_CONNECTION_STATUS_AUTHENTICATING = 4 } QmiWdsConnectionStatus; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Get Data Bearer Technology' message */ /** * QmiWdsDataBearerTechnology: * @QMI_WDS_DATA_BEARER_TECHNOLOGY_UNKNOWN: Unknown. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_CDMA20001X: CDMA2000 1x. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO: CDMA2000 HRPD 1xEVDO. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_GSM: GSM. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_UMTS: UMTS. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO_REVA: CDMA2000 HRPD 1xEVDO RevA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_EDGE: EDGE. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA: HSDPA and WCDMA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSUPA: WCDMA and HSUPA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA_HSUPDA: HSDPA and HSUPA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_LTE: LTE. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_EHRPD: CDMA2000 eHRPD. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS: HSDPA+ and WCDMA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_HSUPA: HSDPA+ and HSUPA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS: DC-HSDPA+ and WCDMA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS_HSUPA: DC-HSDPA+ and HSUPA. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM: HSDPA+ with 64QAM. Since 1.18. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM_HSUPA: HSDPA+ with 64QAM and HSUPA. Since 1.18. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA: TD-SCDMA. Since 1.18. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSDPA: TD-SCDMA and HSDPA. Since 1.18. * @QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSUPA: TD-SCDMA and HSUPA. Since 1.18. * * Data bearer technology. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_DATA_BEARER_TECHNOLOGY_UNKNOWN = -1, QMI_WDS_DATA_BEARER_TECHNOLOGY_CDMA20001X = 0x01, QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO = 0x02, QMI_WDS_DATA_BEARER_TECHNOLOGY_GSM = 0x03, QMI_WDS_DATA_BEARER_TECHNOLOGY_UMTS = 0x04, QMI_WDS_DATA_BEARER_TECHNOLOGY_1xEVDO_REVA = 0x05, QMI_WDS_DATA_BEARER_TECHNOLOGY_EDGE = 0x06, QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA = 0x07, QMI_WDS_DATA_BEARER_TECHNOLOGY_HSUPA = 0x08, QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPA_HSUPDA = 0x09, QMI_WDS_DATA_BEARER_TECHNOLOGY_LTE = 0x0A, QMI_WDS_DATA_BEARER_TECHNOLOGY_EHRPD = 0x0B, QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS = 0x0C, QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_HSUPA = 0x0D, QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS = 0x0E, QMI_WDS_DATA_BEARER_TECHNOLOGY_DCHSDPAPLUS_HSUPA = 0x0F, QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM = 0x10, QMI_WDS_DATA_BEARER_TECHNOLOGY_HSDPAPLUS_PLUS_64QAM_HSUPA = 0x11, QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA = 0x12, QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSDPA = 0x13, QMI_WDS_DATA_BEARER_TECHNOLOGY_TDSCDMA_HSUPA = 0x14, } QmiWdsDataBearerTechnology; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Get Current Data Bearer Technology' message */ /** * QmiWdsNetworkType: * @QMI_WDS_NETWORK_TYPE_UNKNOWN: Unknown. * @QMI_WDS_NETWORK_TYPE_3GPP2: 3GPP2 network type. * @QMI_WDS_NETWORK_TYPE_3GPP: 3GPP network type. * * Network type of the data bearer. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_NETWORK_TYPE_UNKNOWN = 0, QMI_WDS_NETWORK_TYPE_3GPP2 = 1, QMI_WDS_NETWORK_TYPE_3GPP = 2 } QmiWdsNetworkType; /** * QmiWdsDataSystemNetworkType: * @QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP2: 3GPP2 network type. * @QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP: 3GPP network type. * * Network type of the data system. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP = 0, QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP2 = 1, } QmiWdsDataSystemNetworkType; /** * QmiWdsDataSystem: * @QMI_WDS_DATA_SYSTEM_UNKNOWN: unknown * @QMI_WDS_DATA_SYSTEM_CDMA1X: CDMA 1x * @QMI_WDS_DATA_SYSTEM_CDMA1X_EVDO: CDMA 1x EVDO * @QMI_WDS_DATA_SYSTEM_GPRS: GPRS * @QMI_WDS_DATA_SYSTEM_WCDMA: WCDMA * @QMI_WDS_DATA_SYSTEM_LTE: LTE * @QMI_WDS_DATA_SYSTEM_TDSCDMA: TD-SCDMA. * * Data system type. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_DATA_SYSTEM_UNKNOWN = 0, QMI_WDS_DATA_SYSTEM_CDMA1X = 1, QMI_WDS_DATA_SYSTEM_CDMA1X_EVDO = 2, QMI_WDS_DATA_SYSTEM_GPRS = 3, QMI_WDS_DATA_SYSTEM_WCDMA = 4, QMI_WDS_DATA_SYSTEM_LTE = 5, QMI_WDS_DATA_SYSTEM_TDSCDMA = 6, } QmiWdsDataSystem; /** * QmiWdsRat3gpp2: * @QMI_WDS_RAT_3GPP2_NONE: Unknown, to be ignored. * @QMI_WDS_RAT_3GPP2_CDMA1X: CDMA 1x. * @QMI_WDS_RAT_3GPP2_EVDO_REV0: EVDO Rev0. * @QMI_WDS_RAT_3GPP2_EVDO_REVA: EVDO RevA. * @QMI_WDS_RAT_3GPP2_EVDO_REVB: EVDO RevB. * @QMI_WDS_RAT_3GPP2_EHRPD: eHRPD. Since 1.18. * @QMI_WDS_RAT_3GPP2_FMC: FMC. Since 1.18. * @QMI_WDS_RAT_3GPP2_NULL_BEARER: No bearer. * * Flags specifying the 3GPP2-specific Radio Access Technology, when the data * bearer network type is @QMI_WDS_NETWORK_TYPE_3GPP2. * * Since: 1.0 */ typedef enum { /*< underscore_name=qmi_wds_rat_3gpp2,since=1.0 >*/ QMI_WDS_RAT_3GPP2_NONE = 0, QMI_WDS_RAT_3GPP2_CDMA1X = 1 << 0, QMI_WDS_RAT_3GPP2_EVDO_REV0 = 1 << 1, QMI_WDS_RAT_3GPP2_EVDO_REVA = 1 << 2, QMI_WDS_RAT_3GPP2_EVDO_REVB = 1 << 3, QMI_WDS_RAT_3GPP2_EHRPD = 1 << 4, QMI_WDS_RAT_3GPP2_FMC = 1 << 5, QMI_WDS_RAT_3GPP2_NULL_BEARER = 1 << 15 } QmiWdsRat3gpp2; /** * QmiWdsRat3gpp: * @QMI_WDS_RAT_3GPP_NONE: Unknown, to be ignored. * @QMI_WDS_RAT_3GPP_WCDMA: WCDMA. * @QMI_WDS_RAT_3GPP_GPRS: GPRS. * @QMI_WDS_RAT_3GPP_HSDPA: HSDPA. * @QMI_WDS_RAT_3GPP_HSUPA: HSUPA. * @QMI_WDS_RAT_3GPP_EDGE: EDGE. * @QMI_WDS_RAT_3GPP_LTE: LTE. * @QMI_WDS_RAT_3GPP_HSDPAPLUS: HSDPA+. * @QMI_WDS_RAT_3GPP_DCHSDPAPLUS: DC-HSDPA+. * @QMI_WDS_RAT_3GPP_64QAM: 64QAM. Since 1.18. * @QMI_WDS_RAT_3GPP_TDSCDMA: TD-SCDMA. Since 1.18. * @QMI_WDS_RAT_3GPP_5GNR: 5GNR. Since 1.36. * @QMI_WDS_RAT_3GPP_NULL_BEARER: No bearer. * * Flags specifying the 3GPP-specific Radio Access Technology, when the data * bearer network type is @QMI_WDS_NETWORK_TYPE_3GPP. * * Since: 1.0 */ typedef enum { /*< underscore_name=qmi_wds_rat_3gpp,since=1.0 >*/ QMI_WDS_RAT_3GPP_NONE = 0, QMI_WDS_RAT_3GPP_WCDMA = 1 << 0, QMI_WDS_RAT_3GPP_GPRS = 1 << 1, QMI_WDS_RAT_3GPP_HSDPA = 1 << 2, QMI_WDS_RAT_3GPP_HSUPA = 1 << 3, QMI_WDS_RAT_3GPP_EDGE = 1 << 4, QMI_WDS_RAT_3GPP_LTE = 1 << 5, QMI_WDS_RAT_3GPP_HSDPAPLUS = 1 << 6, QMI_WDS_RAT_3GPP_DCHSDPAPLUS = 1 << 7, QMI_WDS_RAT_3GPP_64QAM = 1 << 8, QMI_WDS_RAT_3GPP_TDSCDMA = 1 << 9, QMI_WDS_RAT_3GPP_5GNR = 1 << 10, QMI_WDS_RAT_3GPP_NULL_BEARER = 1 << 15 } QmiWdsRat3gpp; /** * QmiWdsSoCdma1x: * @QMI_WDS_SO_CDMA1X_NONE: Unknown, to be ignored. * @QMI_WDS_SO_CDMA1X_IS95: IS95. * @QMI_WDS_SO_CDMA1X_IS2000: IS2000. * @QMI_WDS_SO_CDMA1X_IS2000_REL_A: IS2000 RelA. * * Flags specifying the Service Option when the bearer network type is * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask * contains @QMI_WDS_RAT_3GPP2_CDMA1X. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_SO_CDMA1X_NONE = 0, QMI_WDS_SO_CDMA1X_IS95 = 1 << 0, QMI_WDS_SO_CDMA1X_IS2000 = 1 << 1, QMI_WDS_SO_CDMA1X_IS2000_REL_A = 1 << 2 } QmiWdsSoCdma1x; /** * QmiWdsSoEvdoRev0: * @QMI_WDS_SO_EVDO_REV0_NONE: Unknown, to be ignored. * @QMI_WDS_SO_EVDO_REV0_DPA: DPA. * * Flags specifying the Service Option when the bearer network type is * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask * contains @QMI_WDS_RAT_3GPP2_EVDO_REV0. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_SO_EVDO_REV0_NONE = 0, QMI_WDS_SO_EVDO_REV0_DPA = 1 << 0, } QmiWdsSoEvdoRev0; /** * QmiWdsSoEvdoRevA: * @QMI_WDS_SO_EVDO_REVA_NONE: Unknown, to be ignored. * @QMI_WDS_SO_EVDO_REVA_DPA: DPA. * @QMI_WDS_SO_EVDO_REVA_MFPA: MFPA. * @QMI_WDS_SO_EVDO_REVA_EMPA: EMPA. * @QMI_WDS_SO_EVDO_REVA_EMPA_EHRPD: EMPA eHRPD. * * Flags specifying the Service Option when the bearer network type is * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask * contains @QMI_WDS_RAT_3GPP2_EVDO_REVA. * * Since: 1.0 */ typedef enum { /*< underscore_name=qmi_wds_so_evdo_reva,since=1.0 >*/ QMI_WDS_SO_EVDO_REVA_NONE = 0, QMI_WDS_SO_EVDO_REVA_DPA = 1 << 0, QMI_WDS_SO_EVDO_REVA_MFPA = 1 << 1, QMI_WDS_SO_EVDO_REVA_EMPA = 1 << 2, QMI_WDS_SO_EVDO_REVA_EMPA_EHRPD = 1 << 3, } QmiWdsSoEvdoRevA; /** * QmiWdsSoEvdoRevB: * @QMI_WDS_SO_EVDO_REVB_NONE: Unknown, to be ignored. * @QMI_WDS_SO_EVDO_REVB_DPA: DPA. * @QMI_WDS_SO_EVDO_REVB_MFPA: MFPA. * @QMI_WDS_SO_EVDO_REVB_EMPA: EMPA. * @QMI_WDS_SO_EVDO_REVB_EMPA_EHRPD: EMPA eHRPD. * @QMI_WDS_SO_EVDO_REVB_MMPA: MMPA. * @QMI_WDS_SO_EVDO_REVB_MMPA_EHRPD: MMPA eHRPD. * * Flags specifying the Service Option when the bearer network type is * @QMI_WDS_NETWORK_TYPE_3GPP2 and when the Radio Access Technology mask * contains @QMI_WDS_RAT_3GPP2_EVDO_REVB. * * Since: 1.18 */ typedef enum { /*< underscore_name=qmi_wds_so_evdo_revb,since=1.18 >*/ QMI_WDS_SO_EVDO_REVB_NONE = 0, QMI_WDS_SO_EVDO_REVB_DPA = 1 << 0, QMI_WDS_SO_EVDO_REVB_MFPA = 1 << 1, QMI_WDS_SO_EVDO_REVB_EMPA = 1 << 2, QMI_WDS_SO_EVDO_REVB_EMPA_EHRPD = 1 << 3, QMI_WDS_SO_EVDO_REVB_MMPA = 1 << 4, QMI_WDS_SO_EVDO_REVB_MMPA_EHRPD = 1 << 5, } QmiWdsSoEvdoRevB; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Get Current Settings' message */ /** * QmiWdsRequestedSettings: * @QMI_WDS_REQUESTED_SETTINGS_NONE: no settings. * @QMI_WDS_REQUESTED_SETTINGS_PROFILE_ID: profile ID. * @QMI_WDS_REQUESTED_SETTINGS_PROFILE_NAME: profile name. * @QMI_WDS_REQUESTED_SETTINGS_PDP_TYPE: PDP context type. * @QMI_WDS_REQUESTED_SETTINGS_APN_NAME: APN name. * @QMI_WDS_REQUESTED_SETTINGS_DNS_ADDRESS: DNS server addresses. * @QMI_WDS_REQUESTED_SETTINGS_GRANTED_QOS: granted QoS. * @QMI_WDS_REQUESTED_SETTINGS_USERNAME: username. * @QMI_WDS_REQUESTED_SETTINGS_AUTH_PROTOCOL: authentication protocol, ie PAP/CHAP/none. * @QMI_WDS_REQUESTED_SETTINGS_IP_ADDRESS: IP address. * @QMI_WDS_REQUESTED_SETTINGS_GATEWAY_INFO: gateway address. * @QMI_WDS_REQUESTED_SETTINGS_PCSCF_ADDRESS: PCSCF address. * @QMI_WDS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST: PCSCF server address list. * @QMI_WDS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST: PCSCF domain name list. * @QMI_WDS_REQUESTED_SETTINGS_MTU: MTU. * @QMI_WDS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST: domain name list. * @QMI_WDS_REQUESTED_SETTINGS_IP_FAMILY: IP family, ie IPv4 or IPv6. * @QMI_WDS_REQUESTED_SETTINGS_IMCN_FLAG: IMCN flag. * @QMI_WDS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY: extended technology info. * @QMI_WDS_REQUESTED_SETTINGS_OPERATOR_RESERVED_PCO: operator reserved protocol configuration option. * * Flags specifying requested WDS settings. * * Since: 1.32 */ typedef enum { /*< since=1.32 >*/ QMI_WDS_REQUESTED_SETTINGS_NONE = 0, QMI_WDS_REQUESTED_SETTINGS_PROFILE_ID = 1 << 0, QMI_WDS_REQUESTED_SETTINGS_PROFILE_NAME = 1 << 1, QMI_WDS_REQUESTED_SETTINGS_PDP_TYPE = 1 << 2, QMI_WDS_REQUESTED_SETTINGS_APN_NAME = 1 << 3, QMI_WDS_REQUESTED_SETTINGS_DNS_ADDRESS = 1 << 4, QMI_WDS_REQUESTED_SETTINGS_GRANTED_QOS = 1 << 5, QMI_WDS_REQUESTED_SETTINGS_USERNAME = 1 << 6, QMI_WDS_REQUESTED_SETTINGS_AUTH_PROTOCOL = 1 << 7, QMI_WDS_REQUESTED_SETTINGS_IP_ADDRESS = 1 << 8, QMI_WDS_REQUESTED_SETTINGS_GATEWAY_INFO = 1 << 9, QMI_WDS_REQUESTED_SETTINGS_PCSCF_ADDRESS = 1 << 10, QMI_WDS_REQUESTED_SETTINGS_PCSCF_SERVER_ADDRESS_LIST = 1 << 11, QMI_WDS_REQUESTED_SETTINGS_PCSCF_DOMAIN_NAME_LIST = 1 << 12, QMI_WDS_REQUESTED_SETTINGS_MTU = 1 << 13, QMI_WDS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST = 1 << 14, QMI_WDS_REQUESTED_SETTINGS_IP_FAMILY = 1 << 15, QMI_WDS_REQUESTED_SETTINGS_IMCN_FLAG = 1 << 16, QMI_WDS_REQUESTED_SETTINGS_EXTENDED_TECHNOLOGY = 1 << 17, QMI_WDS_REQUESTED_SETTINGS_OPERATOR_RESERVED_PCO = 1 << 18, } QmiWdsRequestedSettings; /** * QmiWdsPdpType: * @QMI_WDS_PDP_TYPE_IPV4: IPv4 * @QMI_WDS_PDP_TYPE_PPP: PPP * @QMI_WDS_PDP_TYPE_IPV6: IPv6 * @QMI_WDS_PDP_TYPE_IPV4_OR_IPV6: IPv4 and IPv6 combined context * * PDP context type. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_PDP_TYPE_IPV4 = 0, QMI_WDS_PDP_TYPE_PPP = 1, QMI_WDS_PDP_TYPE_IPV6 = 2, QMI_WDS_PDP_TYPE_IPV4_OR_IPV6 = 3 } QmiWdsPdpType; /** * QmiWdsTrafficClass: * @QMI_WDS_TRAFFIC_CLASS_SUBSCRIBED: default class, best-effort * @QMI_WDS_TRAFFIC_CLASS_CONVERSATIONAL: two-way video/voice, most delay sensitive * @QMI_WDS_TRAFFIC_CLASS_STREAMING: one-way video/audio, delay sensitive * @QMI_WDS_TRAFFIC_CLASS_INTERACTIVE: delay-sensitive, e.g. browsing, SSH. * @QMI_WDS_TRAFFIC_CLASS_BACKGROUND: delay-insensitive, e.g. downloads, email. * * QoS Traffic Classes. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_TRAFFIC_CLASS_SUBSCRIBED = 0, QMI_WDS_TRAFFIC_CLASS_CONVERSATIONAL = 1, QMI_WDS_TRAFFIC_CLASS_STREAMING = 2, QMI_WDS_TRAFFIC_CLASS_INTERACTIVE = 3, QMI_WDS_TRAFFIC_CLASS_BACKGROUND = 4 } QmiWdsTrafficClass; /** * QmiWdsAuthentication: * @QMI_WDS_AUTHENTICATION_NONE: no authentication * @QMI_WDS_AUTHENTICATION_PAP: PAP authentication * @QMI_WDS_AUTHENTICATION_CHAP: CHAP authentication * * PDP context authentication protocols. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_AUTHENTICATION_NONE = 0, QMI_WDS_AUTHENTICATION_PAP = 1 << 0, QMI_WDS_AUTHENTICATION_CHAP = 1 << 1 } QmiWdsAuthentication; /** * QmiWdsProfileType: * @QMI_WDS_PROFILE_TYPE_3GPP: 3GPP profile type. * @QMI_WDS_PROFILE_TYPE_3GPP2: 3GPP2 profile type. * @QMI_WDS_PROFILE_TYPE_EPC: EPC profile type. Since 1.34. * @QMI_WDS_PROFILE_TYPE_ALL: All technologies profile type. Since 1.34. * * Profile network type family. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WDS_PROFILE_TYPE_3GPP = 0, QMI_WDS_PROFILE_TYPE_3GPP2 = 1, QMI_WDS_PROFILE_TYPE_EPC = 2, QMI_WDS_PROFILE_TYPE_ALL = 255 } QmiWdsProfileType; /** * QmiWdsProfileFamily: * @QMI_WDS_PROFILE_FAMILY_EMBEDDED: Embedded profile family. * @QMI_WDS_PROFILE_FAMILY_TETHERED: Tethered profile family. * * Profile family. * * Since: 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_WDS_PROFILE_FAMILY_EMBEDDED = 0, QMI_WDS_PROFILE_FAMILY_TETHERED = 1 } QmiWdsProfileFamily; /** * QmiWdsDeliveryOrder: * @QMI_WDS_QOS_DELIVERY_ORDER_SUBSCRIBE: Subscribe. * @QMI_WDS_QOS_DELIVERY_ORDER_ON: On. * @QMI_WDS_QOS_DELIVERY_ORDER_OFF: Off. * * QoS delivery order. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_WDS_QOS_DELIVERY_ORDER_SUBSCRIBE = 0, QMI_WDS_QOS_DELIVERY_ORDER_ON = 1, QMI_WDS_QOS_DELIVERY_ORDER_OFF = 2 } QmiWdsDeliveryOrder; /** * QmiWdsSduErrorRatio: * @QMI_WDS_SDU_ERROR_RATIO_SUBSCRIBE: Subscribe. * @QMI_WDS_SDU_ERROR_RATIO_1E2: 1x10^2. * @QMI_WDS_SDU_ERROR_RATIO_7E3: 7x10^3. * @QMI_WDS_SDU_ERROR_RATIO_1E3: 1x10^3. * @QMI_WDS_SDU_ERROR_RATIO_1E4: 1x10^4. * @QMI_WDS_SDU_ERROR_RATIO_1E5: 1x10^5. * @QMI_WDS_SDU_ERROR_RATIO_1E6: 1x10^6. * @QMI_WDS_SDU_ERROR_RATIO_1E1: 1x10^7. * * Target value for the fraction of SDUs lost or detected as erroneous. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_WDS_SDU_ERROR_RATIO_SUBSCRIBE = 0, QMI_WDS_SDU_ERROR_RATIO_1E2 = 1, QMI_WDS_SDU_ERROR_RATIO_7E3 = 2, QMI_WDS_SDU_ERROR_RATIO_1E3 = 3, QMI_WDS_SDU_ERROR_RATIO_1E4 = 4, QMI_WDS_SDU_ERROR_RATIO_1E5 = 5, QMI_WDS_SDU_ERROR_RATIO_1E6 = 6, QMI_WDS_SDU_ERROR_RATIO_1E1 = 7 } QmiWdsSduErrorRatio; /** * QmiWdsSduResidualBitErrorRatio: * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_SUBSCRIBE: Subscribe. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E2: 5x10^2. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E2: 1x10^2. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E3: 5x10^3. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_4E3: 4x10^3. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E3: 1x10^3. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E4: 1x10^4. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E5: 1x10^5. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E6: 1x10^6. * @QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_6E8: 6x10^8. * * Target value for the undetected bit error ratio in the delivered SDUs. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_SUBSCRIBE = 0, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E2 = 1, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E2 = 2, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_5E3 = 3, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_4E3 = 4, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E3 = 5, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E4 = 6, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E5 = 7, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_1E6 = 8, QMI_WDS_SDU_RESIDUAL_BIT_ERROR_RATIO_6E8 = 9 } QmiWdsSduResidualBitErrorRatio; /** * QmiWdsSduErroneousDelivery: * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_SUBSCRIBE: Subscribe. * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_NO_DETECTION: No detection. * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_ENABLED: Erroneous SDUs are delivered. * @QMI_WDS_SDU_ERRONEOUS_DELIVERY_DISABLED: Erroneous SDUs are delivered. * * Whether SDUs detected as erroneous are delivered or not. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_WDS_SDU_ERRONEOUS_DELIVERY_SUBSCRIBE = 0, QMI_WDS_SDU_ERRONEOUS_DELIVERY_NO_DETECTION = 1, QMI_WDS_SDU_ERRONEOUS_DELIVERY_ENABLED = 2, QMI_WDS_SDU_ERRONEOUS_DELIVERY_DISABLED = 3 } QmiWdsSduErroneousDelivery; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Get Packet Statistics' message */ /** * QmiWdsPacketStatisticsMaskFlag: * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_OK: Request count of correctly sent packets. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_OK: Request count of correctly received packets. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_ERROR: Request count of sent packets with error. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_ERROR: Request count of received packets with error. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_OVERFLOWS: Request count of transmitter overflows. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_OVERFLOWS: Request count of receiver overflows. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_BYTES_OK: Request count of correctly sent bytes. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_BYTES_OK: Request count of correctly received bytes. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_DROPPED: Request count of dropped packets in transmission. * @QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_DROPPED: Request count of dropped packets in reception. * * Mask to use when requesting packet statistics. * * Since: 1.6 */ typedef enum { /*< since=1.6 >*/ QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_OK = 1 << 0, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_OK = 1 << 1, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_ERROR = 1 << 2, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_ERROR = 1 << 3, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_OVERFLOWS = 1 << 4, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_OVERFLOWS = 1 << 5, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_BYTES_OK = 1 << 6, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_BYTES_OK = 1 << 7, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_DROPPED = 1 << 8, QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_DROPPED = 1 << 9 } QmiWdsPacketStatisticsMaskFlag; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Get Profile List' message */ /** * QmiWdsDsProfileError: * @QMI_WDS_DS_PROFILE_ERROR_UNKNOWN: Unknown DS profile error. * @QMI_WDS_DS_PROFILE_ERROR_FAIL: General failure. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_HANDLE: Invalid handle. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_OPERATION: Invalid operation. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_TYPE: Invalid profile type. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_NUMBER: Invalid profile number. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_ID: Invalid profile identifier. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_ARGUMENT: Invalid argument. * @QMI_WDS_DS_PROFILE_ERROR_REGISTRY_NOT_INITIALIZED: Registry not initialized. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PARAMETER_LENGTH: Invalid parameter length. * @QMI_WDS_DS_PROFILE_ERROR_LIST_END: List end, profile not found. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_SUBSCRIPTION_ID: Invalid subscription identifier. * @QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_FAMILY: Invalid profile family. * @QMI_WDS_DS_PROFILE_ERROR_3GPP_INVALID_PROFILE_FAMILY: Invalid 3GPP profile family. * @QMI_WDS_DS_PROFILE_ERROR_3GPP_ACCESS_ERROR: Error accessing 3GPP profiles. * @QMI_WDS_DS_PROFILE_ERROR_3GPP_CONTEXT_NOT_DEFINED: 3GPP profile doesn't have a valid context. * @QMI_WDS_DS_PROFILE_ERROR_3GPP_VALID_FLAG_NOT_SET: 3GPP profile doesn't have valid flag set. * @QMI_WDS_DS_PROFILE_ERROR_3GPP_READ_ONLY_FLAG_SET: 3GPP profile has read-only flag set. * @QMI_WDS_DS_PROFILE_ERROR_3GPP_OUT_OF_PROFILES: Out of 3GPP profiles. * @QMI_WDS_DS_PROFILE_ERROR_3GPP2_INVALID_PROFILE_ID: Invalid 3GPP2 profile identifier. * * Extended DS profile errors. * * Since: 1.8 */ typedef enum { /*< since=1.8 >*/ QMI_WDS_DS_PROFILE_ERROR_UNKNOWN = 0, QMI_WDS_DS_PROFILE_ERROR_FAIL = 1, QMI_WDS_DS_PROFILE_ERROR_INVALID_HANDLE = 2, QMI_WDS_DS_PROFILE_ERROR_INVALID_OPERATION = 3, QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_TYPE = 4, QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_NUMBER = 5, QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_ID = 6, QMI_WDS_DS_PROFILE_ERROR_INVALID_ARGUMENT = 7, QMI_WDS_DS_PROFILE_ERROR_REGISTRY_NOT_INITIALIZED = 8, QMI_WDS_DS_PROFILE_ERROR_INVALID_PARAMETER_LENGTH = 9, QMI_WDS_DS_PROFILE_ERROR_LIST_END = 10, QMI_WDS_DS_PROFILE_ERROR_INVALID_SUBSCRIPTION_ID = 11, QMI_WDS_DS_PROFILE_ERROR_INVALID_PROFILE_FAMILY = 12, QMI_WDS_DS_PROFILE_ERROR_3GPP_INVALID_PROFILE_FAMILY = 1001, QMI_WDS_DS_PROFILE_ERROR_3GPP_ACCESS_ERROR = 1002, QMI_WDS_DS_PROFILE_ERROR_3GPP_CONTEXT_NOT_DEFINED = 1003, QMI_WDS_DS_PROFILE_ERROR_3GPP_VALID_FLAG_NOT_SET = 1004, QMI_WDS_DS_PROFILE_ERROR_3GPP_READ_ONLY_FLAG_SET = 1005, QMI_WDS_DS_PROFILE_ERROR_3GPP_OUT_OF_PROFILES = 1006, QMI_WDS_DS_PROFILE_ERROR_3GPP2_INVALID_PROFILE_ID = 1101, } QmiWdsDsProfileError; /** * QmiWdsAutoconnectSetting: * @QMI_WDS_AUTOCONNECT_SETTING_DISABLED: Disabled. * @QMI_WDS_AUTOCONNECT_SETTING_ENABLED: Enabled. * @QMI_WDS_AUTOCONNECT_SETTING_PAUSED: Paused, resume on power cycle. * * Status of the autoconnect setting. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_WDS_AUTOCONNECT_SETTING_DISABLED = 0, QMI_WDS_AUTOCONNECT_SETTING_ENABLED = 1, QMI_WDS_AUTOCONNECT_SETTING_PAUSED = 2, } QmiWdsAutoconnectSetting; /** * QmiWdsAutoconnectSettingRoaming: * @QMI_WDS_AUTOCONNECT_SETTING_ROAMING_ALLOWED: Autoconnect always allowed, even when roaming. * @QMI_WDS_AUTOCONNECT_SETTING_ROAMING_HOME_ONLY: Autoconnect allowed only in home network. * * Status of the autoconnect setting while roaming. * * Since: 1.14 */ typedef enum { /*< since=1.14 >*/ QMI_WDS_AUTOCONNECT_SETTING_ROAMING_ALLOWED = 0, QMI_WDS_AUTOCONNECT_SETTING_ROAMING_HOME_ONLY = 1, } QmiWdsAutoconnectSettingRoaming; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Set Event Report' message */ /** * QmiWdsSetEventReportTransferStatistics: * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_OK: report TX packet successes. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_OK: report RX packet successes. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_ERROR: report TX packet errors. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_ERROR: report RX packet errors. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_OVERFLOWS: report TX overflows. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_OVERFLOWS: report RX overflows. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_BYTES_OK: report TX byte total. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_BYTES_OK: report RX byte total. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_DROPPED: report TX packets dropped. * @QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_DROPPED: report RX packets dropped. * * Flags indicating which WDS Set Event Report Transfer Statistics indicators * should be emitted. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_OK = 1 << 0, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_OK = 1 << 1, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_ERROR = 1 << 2, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_ERROR = 1 << 3, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_OVERFLOWS = 1 << 4, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_OVERFLOWS = 1 << 5, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_BYTES_OK = 1 << 6, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_BYTES_OK = 1 << 7, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_TX_PACKETS_DROPPED = 1 << 8, QMI_WDS_SET_EVENT_REPORT_TRANSFER_STATISTICS_REPORT_RX_PACKETS_DROPPED = 1 << 9, } QmiWdsSetEventReportTransferStatistics; /** * QmiWdsDormancyStatus: * @QMI_WDS_DORMANCY_STATUS_UNKNOWN: dormancy status unknown. * @QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_DORMANT: traffic channel is dormant. * @QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_ACTIVE: traffic channel is active. * * Dormancy status. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_DORMANCY_STATUS_UNKNOWN = 0, QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_DORMANT = 1, QMI_WDS_DORMANCY_STATUS_TRAFFIC_CHANNEL_ACTIVE = 2, } QmiWdsDormancyStatus; /** * QmiWdsDataCallStatus: * @QMI_WDS_DATA_CALL_STATUS_UNKNOWN: data call status unknown. * @QMI_WDS_DATA_CALL_STATUS_ACTIVATED: data call status activated. * @QMI_WDS_DATA_CALL_STATUS_TERMINATED: data call status terminated. * * Data call status. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_DATA_CALL_STATUS_UNKNOWN = 0, QMI_WDS_DATA_CALL_STATUS_ACTIVATED = 1, QMI_WDS_DATA_CALL_STATUS_TERMINATED = 2, } QmiWdsDataCallStatus; /** * QmiWdsDataCallType: * @QMI_WDS_DATA_CALL_TYPE_UNKNOWN: data call type unknown. * @QMI_WDS_DATA_CALL_TYPE_EMBEDDED: embedded data call. * @QMI_WDS_DATA_CALL_TYPE_TETHERED: tethered data call. * @QMI_WDS_DATA_CALL_TYPE_MODEM_EMBEDDED: modem embedded data call. * * Data call type. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_DATA_CALL_TYPE_UNKNOWN = 0, QMI_WDS_DATA_CALL_TYPE_EMBEDDED = 1, QMI_WDS_DATA_CALL_TYPE_TETHERED = 2, QMI_WDS_DATA_CALL_TYPE_MODEM_EMBEDDED = 3, } QmiWdsDataCallType; /** * QmiWdsTetheredCallType: * @QMI_WDS_TETHERED_CALL_TYPE_NON_TETHERED: non-tethered. * @QMI_WDS_TETHERED_CALL_TYPE_RMNET: RmNet. * @QMI_WDS_TETHERED_CALL_TYPE_DUN: DUN. * * Tethered call type. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_TETHERED_CALL_TYPE_NON_TETHERED = 0, QMI_WDS_TETHERED_CALL_TYPE_RMNET = 1, QMI_WDS_TETHERED_CALL_TYPE_DUN = 2, } QmiWdsTetheredCallType; /** * QmiWdsRadioAccessTechnology: * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_NULL_BEARER: null bearer * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA: WCDMA. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN: GERAN. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE: LTE. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA: TD-SDCMA. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN: 3GPP WLAN. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_MAXIMUM: 3GPP maximum. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X: CDMA 1x. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD: CDMA EVDO, HRPD. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD: CDMA EVDO with eHRPD. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN: 3GPP2 WLAN. * @QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_MAXIMUM: 3GPP2 maximum. * * Radio access technology. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_RADIO_ACCESS_TECHNOLOGY_NULL_BEARER = 0, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WCDMA = 1, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_GERAN = 2, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_LTE = 3, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_TDSCDMA = 4, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_WLAN = 5, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP_MAXIMUM = 100, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_1X = 101, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_HRPD = 102, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_EHRPD = 103, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_WLAN = 104, QMI_WDS_RADIO_ACCESS_TECHNOLOGY_3GPP2_MAXIMUM = 200, } QmiWdsRadioAccessTechnology; /** * QmiWdsExtendedDataBearerTechnology3gpp: * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_UNKNOWN: unknown. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_WCDMA: WCDMA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA: HSDPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSUPA: HSUPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA_PLUS: HSDPA+. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_DC_HSDPA_PLUS: Dual-cell HSDPA+. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_64QAM: 64-QAM. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSPA: HSPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GPRS: GPRS. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_EDGE: EDGE. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GSM: GSM. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_S2B: S2B. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_LIMITED_SERVICE: LTE limited service. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_FDD: LTE FDD. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_TDD: LTE TDD. * * 3GPP extended data bearer technologies. * * Since: 1.18 */ typedef enum { /*< underscore_name=qmi_wds_extended_data_bearer_technology_3gpp,since=1.18 >*/ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_UNKNOWN = 0, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_WCDMA = 1 << 0, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA = 1 << 1, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSUPA = 1 << 2, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSDPA_PLUS = 1 << 3, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_DC_HSDPA_PLUS = 1 << 4, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_64QAM = 1 << 5, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_HSPA = 1 << 6, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GPRS = 1 << 7, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_EDGE = 1 << 8, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_GSM = 1 << 9, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_S2B = 1 << 10, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_LIMITED_SERVICE = 1 << 11, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_FDD = 1 << 12, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP_LTE_TDD = 1 << 13, } QmiWdsExtendedDataBearerTechnology3gpp; /** * QmiWdsExtendedDataBearerTechnology3gpp2: * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_UNKNOWN: unknown. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_RESERVED: reserved. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS95: CDMA1x IS-95. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000: CDMA1x IS-2000. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000_REL_A: CDMA1x IS-2000 Release A. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_0_DPA: HDR EVDO Rev 0 DPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_DPA: HDR EVDO Rev A DPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_DPA: HDR EVDO Rev B DPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_MPA: HDR EVDO Rev A MPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MPA: HDR EVDO Rev B MPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_EMPA: HDR EVDO Rev A EMPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_EMPA: HDR EVDO Rev B EMPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MMPA: HDR EVDO Rev B MMPA. * @QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_EVDO_FMC: HDR EVDO FMC. * * 3GPP2 extended data bearer technologies. * * Since: 1.18 */ typedef enum { /*< underscore_name=qmi_wds_extended_data_bearer_technology_3gpp2,since=1.18 >*/ QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_UNKNOWN = 0, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_RESERVED = 1 << 0, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS95 = 1 << 1, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000 = 1 << 2, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_CDMA1X_IS2000_REL_A = 1 << 3, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_0_DPA = 1 << 4, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_DPA = 1 << 5, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_DPA = 1 << 6, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_MPA = 1 << 7, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MPA = 1 << 8, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_A_EMPA = 1 << 9, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_EMPA = 1 << 10, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_REV_B_MMPA = 1 << 11, QMI_WDS_EXTENDED_DATA_BEARER_TECHNOLOGY_3GPP2_HDR_EVDO_FMC = 1 << 12, } QmiWdsExtendedDataBearerTechnology3gpp2; /*****************************************************************************/ /* Helper enums for the 'QMI WDS Profile'-related messages */ /** * QmiWdsPdpHeaderCompressionType: * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_OFF: no header compression * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_MANUFACTURER_PREFERRED: manufacturer preferred * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC1144: RFC1144 * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC2507: RFC2507 * @QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC3095: RFC3095 * * PDP header compression types. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_OFF = 0, QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_MANUFACTURER_PREFERRED = 1, QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC1144 = 2, QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC2507 = 3, QMI_WDS_PDP_HEADER_COMPRESSION_TYPE_RFC3095 = 4, } QmiWdsPdpHeaderCompressionType; /** * QmiWdsPdpDataCompressionType: * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_OFF: no data compression * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_MANUFACTURER_PREFERRED: manufacturer preferred * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V42BIS: V42bis * @QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V44: V44 * * PDP data compression types. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_PDP_DATA_COMPRESSION_TYPE_OFF = 0, QMI_WDS_PDP_DATA_COMPRESSION_TYPE_MANUFACTURER_PREFERRED = 1, QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V42BIS = 2, QMI_WDS_PDP_DATA_COMPRESSION_TYPE_V44 = 3, } QmiWdsPdpDataCompressionType; /** * QmiWdsQosClassIdentifier: * @QMI_WDS_QOS_CLASS_IDENTIFIER_NETWORK_ASSIGN: network assigned * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE1: guaranteed bitrate 1 * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE2: guaranteed bitrate 2 * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE3: guaranteed bitrate 3 * @QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE4: guaranteed bitrate 4 * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE5: non-guaranteed bitrate 5 * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE6: non-guaranteed bitrate 6 * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE7: non-guaranteed bitrate 7 * @QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE8: non-guaranteed bitrate 8 * * QoS Class Identifier. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_QOS_CLASS_IDENTIFIER_NETWORK_ASSIGN = 0, QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE1 = 1, QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE2 = 2, QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE3 = 3, QMI_WDS_QOS_CLASS_IDENTIFIER_GUARANTEED_BITRATE4 = 4, QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE5 = 5, QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE6 = 6, QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE7 = 7, QMI_WDS_QOS_CLASS_IDENTIFIER_NON_GUARANTEED_BITRATE8 = 8, } QmiWdsQosClassIdentifier; /** * QmiWdsAttachPdnListAction: * @QMI_WDS_ATTACH_PDN_LIST_ACTION_NONE: No action (default) * @QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT: PS detach or PDN disconnect based on the modem configuration * * Action when setting the attach PDN list. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_WDS_ATTACH_PDN_LIST_ACTION_NONE = 0x01, QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT = 0x02, } QmiWdsAttachPdnListAction; /** * QmiWdsClientType: * @QMI_WDS_CLIENT_TYPE_TETHERED: client type tethered * @QMI_WDS_CLIENT_TYPE_UNDEFINED: no client type defined * * Client Type * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_WDS_CLIENT_TYPE_TETHERED = 0x01, QMI_WDS_CLIENT_TYPE_UNDEFINED = 0xFF, } QmiWdsClientType; /** * QMI_WDS_RATE_UNAVAILABLE: * * The TX/RX rate information is unavailable or cannot be measured. * * Since: 1.22.4 */ #define QMI_WDS_RATE_UNAVAILABLE 0xFFFFFFFF /** * QmiWdsIpSupportType: * @QMI_WDS_IP_SUPPORT_TYPE_IPV4: IPv4 type. * @QMI_WDS_IP_SUPPORT_TYPE_IPV6: IPv6 type. * @QMI_WDS_IP_SUPPORT_TYPE_IPV4V6: IPv4v6 type. * * IP support type. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_WDS_IP_SUPPORT_TYPE_IPV4 = 0, QMI_WDS_IP_SUPPORT_TYPE_IPV6 = 1, QMI_WDS_IP_SUPPORT_TYPE_IPV4V6 = 2, } QmiWdsIpSupportType; /** * QmiWdsProfileChangeEvent: * @QMI_WDS_PROFILE_CREATE_EVENT: create profile event. * @QMI_WDS_PROFILE_DELETE_EVENT: delete profile event. * @QMI_WDS_PROFILE_MODIFY_EVENT: modify profile event. * @QMI_WDS_PROFILE_SUBSCRIPTION_CHANGE_EVENT: subscription changed event. * * Profile change event. * * Since: 1.34 */ typedef enum { /*< since=1.34 >*/ QMI_WDS_PROFILE_CREATE_EVENT = 1, QMI_WDS_PROFILE_DELETE_EVENT = 2, QMI_WDS_PROFILE_MODIFY_EVENT = 3, QMI_WDS_PROFILE_SUBSCRIPTION_CHANGE_EVENT = 4 } QmiWdsProfileChangeEvent; #endif /* _LIBQMI_GLIB_QMI_ENUMS_WDS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums-wms.h000066400000000000000000000534131455567757300215400ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_WMS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_WMS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums-wms * @title: WMS enumerations and flags * @short_description: Enumerations and flags in the WMS service. * * This section defines enumerations and flags used in the WMS service * interface. */ /*****************************************************************************/ /* Helper enums for the 'QMI WMS Event Report' indication */ /** * QmiWmsStorageType: * @QMI_WMS_STORAGE_TYPE_UIM: Message stored in UIM. * @QMI_WMS_STORAGE_TYPE_NV: Message stored in non-volatile memory. * @QMI_WMS_STORAGE_TYPE_NONE: None. * * Type of messaging storage. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_STORAGE_TYPE_UIM = 0x00, QMI_WMS_STORAGE_TYPE_NV = 0x01, QMI_WMS_STORAGE_TYPE_NONE = 0xFF } QmiWmsStorageType; /** * QmiWmsAckIndicator: * @QMI_WMS_ACK_INDICATOR_SEND: ACK needs to be sent. * @QMI_WMS_ACK_INDICATOR_DO_NOT_SEND: ACK doesn't need to be sent. * * Indication of whether ACK needs to be sent or not. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_ACK_INDICATOR_SEND = 0x00, QMI_WMS_ACK_INDICATOR_DO_NOT_SEND = 0x01 } QmiWmsAckIndicator; /** * QmiWmsMessageFormat: * @QMI_WMS_MESSAGE_FORMAT_CDMA: CDMA message. * @QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT: Point-to-point 3GPP message. * @QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_BROADCAST: Broadcast 3GPP message. * @QMI_WMS_MESSAGE_FORMAT_MWI: Message Waiting Indicator. * * Type of message. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_MESSAGE_FORMAT_CDMA = 0x00, QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT = 0x06, QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_BROADCAST = 0x07, QMI_WMS_MESSAGE_FORMAT_MWI = 0x08 } QmiWmsMessageFormat; /** * QmiWmsMessageMode: * @QMI_WMS_MESSAGE_MODE_CDMA: Message sent using 3GPP2 technologies. * @QMI_WMS_MESSAGE_MODE_GSM_WCDMA: Message sent using 3GPP technologies. * * Message mode. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_MESSAGE_MODE_CDMA = 0x00, QMI_WMS_MESSAGE_MODE_GSM_WCDMA = 0x01 } QmiWmsMessageMode; /** * QmiWmsNotificationType: * @QMI_WMS_NOTIFICATION_TYPE_PRIMARY: Primary. * @QMI_WMS_NOTIFICATION_TYPE_SECONDARY_GSM: Secondary GSM. * @QMI_WMS_NOTIFICATION_TYPE_SECONDARY_UMTS: Secondary UMTS. * * Type of notification. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_NOTIFICATION_TYPE_PRIMARY = 0x00, QMI_WMS_NOTIFICATION_TYPE_SECONDARY_GSM = 0x01, QMI_WMS_NOTIFICATION_TYPE_SECONDARY_UMTS = 0x02 } QmiWmsNotificationType; /*****************************************************************************/ /* Helper enums for the 'QMI WMS Raw Send' request/response */ /** * QmiWmsCdmaServiceOption: * @QMI_WMS_CDMA_SERVICE_OPTION_AUTO: Automatic selection of service option. * @QMI_WMS_CDMA_SERVICE_OPTION_6: Use service option 6. * @QMI_WMS_CDMA_SERVICE_OPTION_14: Use service option 14. * * CDMA service option selection. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_CDMA_SERVICE_OPTION_AUTO = 0x00, QMI_WMS_CDMA_SERVICE_OPTION_6 = 0x06, QMI_WMS_CDMA_SERVICE_OPTION_14 = 0x0E } QmiWmsCdmaServiceOption; /** * QmiWmsCdmaCauseCode: * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT: Address is valid but not yet allocated. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE: Address is invalid. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE: Network resource shortage. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE: Network failed. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID: SMS teleservice ID is invalid. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER: Other network error. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE: No page response from destination. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY: Destination is busy. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK: No acknowledge from destination. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE: Destination resource shortage. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED: SMS delivery postponed. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE: Destination out of service. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS: Destination not at address. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER: Other destination error. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE: Radio interface resource shortage. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY: Radio interface incompatibility. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER: Other radio interface error. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING: Encoding error. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED: SMS origin denied. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED: SMS destination denied. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED: Supplementary service not supported. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED: SMS not supported. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER: Missing optional expected parameter. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER: Missing mandatory parameter. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE: Unrecognized parameter value. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE: Unexpected parameter value. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR: User data size error. Since 1.18. * @QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER: Other general error. Since 1.18. * * Cause codes when failed to send an SMS in CDMA. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ /* Network errors */ QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_VACANT = 0x00, QMI_WMS_CDMA_CAUSE_CODE_NETWORK_ADDRESS_TRANSLATION_FAILURE = 0x01, QMI_WMS_CDMA_CAUSE_CODE_NETWORK_RESOURCE_SHORTAGE = 0x02, QMI_WMS_CDMA_CAUSE_CODE_NETWORK_FAILURE = 0x03, QMI_WMS_CDMA_CAUSE_CODE_NETWORK_INVALID_TELESERVICE_ID = 0x04, QMI_WMS_CDMA_CAUSE_CODE_NETWORK_OTHER = 0x05, /* Destination errors */ QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_PAGE_RESPONSE = 0x20, QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_BUSY = 0x21, QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NO_ACK = 0x22, QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_RESOURCE_SHORTAGE = 0x23, QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_SMS_DELIVERY_POSTPONED = 0x24, QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OUT_OF_SERVICE = 0x25, QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_NOT_AT_ADDRESS = 0x26, QMI_WMS_CDMA_CAUSE_CODE_DESTINATION_OTHER = 0x27, /* Radio Interface errors */ QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_RESOURCE_SHORTAGE = 0x40, QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_INCOMPATIBILITY = 0x41, QMI_WMS_CDMA_CAUSE_CODE_RADIO_INTERFACE_OTHER = 0x42, /* General errors */ QMI_WMS_CDMA_CAUSE_CODE_GENERAL_ENCODING = 0x60, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_ORIGIN_DENIED = 0x61, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_DESTINATION_DENIED = 0x62, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SUPPLEMENTARY_SERVICE_NOT_SUPPORTED = 0x63, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_SMS_NOT_SUPPORTED = 0x64, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_EXPECTED_PARAMETER = 0x65, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_MISSING_MANDATORY_PARAMETER = 0x66, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNRECOGNIZED_PARAMETER_VALUE = 0x67, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_UNEXPECTED_PARAMETER_VALUE = 0x68, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_USER_DATA_SIZE_ERROR = 0x69, QMI_WMS_CDMA_CAUSE_CODE_GENERAL_OTHER = 0x6A } QmiWmsCdmaCauseCode; /** * QmiWmsCdmaErrorClass: * @QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY: Temporary error reported by network. * @QMI_WMS_CDMA_ERROR_CLASS_PERMANENT: Permanent error reported by network. * @QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY_DEVICE: Temporary error reported by device. Since 1.28. * @QMI_WMS_CDMA_ERROR_CLASS_PERMANENT_DEVICE: Permanent error reported by device. Since 1.28. * * Error class reported from the network when failed to send an SMS in CDMA, * or reported by the device when failed to process a transfer-only CDMA message. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY = 0x00, QMI_WMS_CDMA_ERROR_CLASS_PERMANENT = 0x01, QMI_WMS_CDMA_ERROR_CLASS_TEMPORARY_DEVICE = 0x02, QMI_WMS_CDMA_ERROR_CLASS_PERMANENT_DEVICE = 0x03, } QmiWmsCdmaErrorClass; /** * QmiWmsGsmUmtsRpCause: * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNASSIGNED_NUMBER: Unassigned number. * @QMI_WMS_GSM_UMTS_RP_CAUSE_OPERATOR_DETERMINED_BARRING: Operator determined barring. * @QMI_WMS_GSM_UMTS_RP_CAUSE_CALL_BARRED: Call barred. * @QMI_WMS_GSM_UMTS_RP_CAUSE_RESERVED: Reserved. * @QMI_WMS_GSM_UMTS_RP_CAUSE_SMS_TRANSFER_REJECTED: SMS transfer rejected. * @QMI_WMS_GSM_UMTS_RP_CAUSE_MEMORY_CAPACITY_EXCEEDED: Memory capacity exceeded. * @QMI_WMS_GSM_UMTS_RP_CAUSE_DESTINATION_OUT_OF_ORDER: Destination out of order. * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER: Unidentified subscriber. * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_REJECTED: Facility rejected. * @QMI_WMS_GSM_UMTS_RP_CAUSE_UNKNOWN_SUBSCRIBER: Unknown subscriber. * @QMI_WMS_GSM_UMTS_RP_CAUSE_NETWORK_OUF_OF_ORDER: Network out of order. * @QMI_WMS_GSM_UMTS_RP_CAUSE_TEMPORARY_FAILURE: Temporary failure. * @QMI_WMS_GSM_UMTS_RP_CAUSE_CONGESTION: Congestion. * @QMI_WMS_GSM_UMTS_RP_CAUSE_RESOURCES_UNAVAILABLE: Resources unavailable. * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED: Facility not subscribed. * @QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED: Facility not implemented. * @QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_SMS_TRANSFER_REFERENCE_VALUE: Invalid SMS transfer reference value. * @QMI_WMS_GSM_UMTS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE: Semantically incorrect message. * @QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_MANDATORY_INFO: Invalid mandatory info. * @QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED: Message type not implemented. * @QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_SMS: Message not compatible with SMS. * @QMI_WMS_GSM_UMTS_RP_CAUSE_INFORMATION_ELEMENT_NOT_IMPLEMENTED: Information element not implemented. * @QMI_WMS_GSM_UMTS_RP_CAUSE_PROTOCOL_ERROR: Protocol error. * @QMI_WMS_GSM_UMTS_RP_CAUSE_INTERWORKING: Interworking error. * * RP cause codes when failed to send an SMS in GSM/WCDMA. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_GSM_UMTS_RP_CAUSE_UNASSIGNED_NUMBER = 0x01, QMI_WMS_GSM_UMTS_RP_CAUSE_OPERATOR_DETERMINED_BARRING = 0x08, QMI_WMS_GSM_UMTS_RP_CAUSE_CALL_BARRED = 0x0A, QMI_WMS_GSM_UMTS_RP_CAUSE_RESERVED = 0x0B, QMI_WMS_GSM_UMTS_RP_CAUSE_SMS_TRANSFER_REJECTED = 0x15, QMI_WMS_GSM_UMTS_RP_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0x16, QMI_WMS_GSM_UMTS_RP_CAUSE_DESTINATION_OUT_OF_ORDER = 0x1B, QMI_WMS_GSM_UMTS_RP_CAUSE_UNIDENTIFIED_SUBSCRIBER = 0x1C, QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_REJECTED = 0x1D, QMI_WMS_GSM_UMTS_RP_CAUSE_UNKNOWN_SUBSCRIBER = 0x1E, QMI_WMS_GSM_UMTS_RP_CAUSE_NETWORK_OUF_OF_ORDER = 0x20, QMI_WMS_GSM_UMTS_RP_CAUSE_TEMPORARY_FAILURE = 0x21, QMI_WMS_GSM_UMTS_RP_CAUSE_CONGESTION = 0x2A, QMI_WMS_GSM_UMTS_RP_CAUSE_RESOURCES_UNAVAILABLE = 0x2F, QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_SUBSCRIBED = 0x32, QMI_WMS_GSM_UMTS_RP_CAUSE_FACILITY_NOT_IMPLEMENTED = 0x45, QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_SMS_TRANSFER_REFERENCE_VALUE = 0x51, QMI_WMS_GSM_UMTS_RP_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE = 0x5F, QMI_WMS_GSM_UMTS_RP_CAUSE_INVALID_MANDATORY_INFO = 0x60, QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_TYPE_NOT_IMPLEMENTED = 0x61, QMI_WMS_GSM_UMTS_RP_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_SMS = 0x62, QMI_WMS_GSM_UMTS_RP_CAUSE_INFORMATION_ELEMENT_NOT_IMPLEMENTED = 0x63, QMI_WMS_GSM_UMTS_RP_CAUSE_PROTOCOL_ERROR = 0x6F, QMI_WMS_GSM_UMTS_RP_CAUSE_INTERWORKING = 0x7F } QmiWmsGsmUmtsRpCause; /** * QmiWmsGsmUmtsTpCause: * @QMI_WMS_GSM_UMTS_TP_CAUSE_TELE_INTERWORKING_NOT_SUPPORTED: Tele interworking not supported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED: Short message type 0 not supported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_CANNOT_BE_REPLACED: Short message cannot be replaced. * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_PID_ERROR: Unspecified TP-PID error. * @QMI_WMS_GSM_UMTS_TP_CAUSE_DCS_NOT_SUPPORTED: Data coding scheme not supported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_MESSAGE_CLASS_NOT_SUPPORTED: Message class not supported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_DCS_ERROR: Unspecified data coding scheme error. * @QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_CANNOT_BE_ACTIONED: Command cannot be actioned. * @QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_UNSUPPORTED: Command unsupported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_COMMAND_ERROR: Unspecified command error. * @QMI_WMS_GSM_UMTS_TP_CAUSE_TPDU_NOT_SUPPORTED: TPDU not supported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SC_BUSY: SC busy. * @QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SC_SUBSCRIPTION: No SC subscription. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SC_SYSTEM_FAILURE: SC system failure. * @QMI_WMS_GSM_UMTS_TP_CAUSE_INVALID_SME_ADDRESS: Invalid SME address. * @QMI_WMS_GSM_UMTS_TP_CAUSE_DESTINATION_SME_BARRED: Destination SME barred. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SM_REJECTED_OR_DUPLICATE: SM rejected or duplicate. * @QMI_WMS_GSM_UMTS_TP_CAUSE_VPF_NOT_SUPPORTED: TP-VPF not supported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_VP_NOT_SUPPORTED: TP-VP not supported. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_SMS_STORAGE_FULL: SIM SMS storage full. * @QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SMS_STORAGE_CAPABILITY_IN_SIM: No SMS storage capability in SIM. * @QMI_WMS_GSM_UMTS_TP_CAUSE_MS_ERROR: MS error. * @QMI_WMS_GSM_UMTS_TP_CAUSE_MEMORY_CAPACITY_EXCEEDED: Memory capacity exceeded. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_APPLICATION_TOOLKIT_BUSY: SIM application toolkit busy. * @QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_DATA_DOWNLOAD_ERROR: SIM data download error. * @QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_ERROR: Unspecified error. * * RT cause codes when failed to send an SMS in GSM/WCDMA. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_GSM_UMTS_TP_CAUSE_TELE_INTERWORKING_NOT_SUPPORTED = 0x80, QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED = 0x81, QMI_WMS_GSM_UMTS_TP_CAUSE_SHORT_MESSAGE_CANNOT_BE_REPLACED = 0x82, QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_PID_ERROR = 0x8F, QMI_WMS_GSM_UMTS_TP_CAUSE_DCS_NOT_SUPPORTED = 0x90, QMI_WMS_GSM_UMTS_TP_CAUSE_MESSAGE_CLASS_NOT_SUPPORTED = 0x91, QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_DCS_ERROR = 0x9F, QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_CANNOT_BE_ACTIONED = 0xA0, QMI_WMS_GSM_UMTS_TP_CAUSE_COMMAND_UNSUPPORTED = 0xA1, QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_COMMAND_ERROR = 0xAF, QMI_WMS_GSM_UMTS_TP_CAUSE_TPDU_NOT_SUPPORTED = 0xB0, QMI_WMS_GSM_UMTS_TP_CAUSE_SC_BUSY = 0xC0, QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SC_SUBSCRIPTION = 0xC1, QMI_WMS_GSM_UMTS_TP_CAUSE_SC_SYSTEM_FAILURE = 0xC2, QMI_WMS_GSM_UMTS_TP_CAUSE_INVALID_SME_ADDRESS = 0xC3, QMI_WMS_GSM_UMTS_TP_CAUSE_DESTINATION_SME_BARRED = 0xC4, QMI_WMS_GSM_UMTS_TP_CAUSE_SM_REJECTED_OR_DUPLICATE = 0xC5, QMI_WMS_GSM_UMTS_TP_CAUSE_VPF_NOT_SUPPORTED = 0xC6, QMI_WMS_GSM_UMTS_TP_CAUSE_VP_NOT_SUPPORTED = 0xC7, QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_SMS_STORAGE_FULL = 0xD0, QMI_WMS_GSM_UMTS_TP_CAUSE_NO_SMS_STORAGE_CAPABILITY_IN_SIM = 0xD1, QMI_WMS_GSM_UMTS_TP_CAUSE_MS_ERROR = 0xD2, QMI_WMS_GSM_UMTS_TP_CAUSE_MEMORY_CAPACITY_EXCEEDED = 0xD3, QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_APPLICATION_TOOLKIT_BUSY = 0xD4, QMI_WMS_GSM_UMTS_TP_CAUSE_SIM_DATA_DOWNLOAD_ERROR = 0xD5, QMI_WMS_GSM_UMTS_TP_CAUSE_UNSPECIFIED_ERROR = 0xFF } QmiWmsGsmUmtsTpCause; /** * QmiWmsMessageDeliveryFailureType: * @QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_TEMPORARY: Temporary failure. * @QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_PERMANENT: Permanent failure. * * Type of message delivery failure. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_TEMPORARY = 0x00, QMI_WMS_MESSAGE_DELIVERY_FAILURE_TYPE_PERMANENT = 0x01 } QmiWmsMessageDeliveryFailureType; /*****************************************************************************/ /* Helper enums for the 'QMI WMS Read Raw' request/response */ /** * QmiWmsMessageTagType: * @QMI_WMS_MESSAGE_TAG_TYPE_MT_READ: Received SMS, already read. * @QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ: Received SMS, not read. * @QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT: Sent SMS. * @QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT: Not yet sent SMS. * * Type of message tag. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_MESSAGE_TAG_TYPE_MT_READ = 0x00, QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ = 0x01, QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT = 0x02, QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT = 0x03 } QmiWmsMessageTagType; /** * QmiWmsMessageProtocol: * @QMI_WMS_MESSAGE_PROTOCOL_CDMA: CDMA. * @QMI_WMS_MESSAGE_PROTOCOL_WCDMA: WCDMA. * * Type of message protocol. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_MESSAGE_PROTOCOL_CDMA = 0x00, QMI_WMS_MESSAGE_PROTOCOL_WCDMA = 0x01 } QmiWmsMessageProtocol; /*****************************************************************************/ /* Helper enums for the 'QMI WMS Set Routes' request/response */ /** * QmiWmsMessageType: * @QMI_WMS_MESSAGE_TYPE_POINT_TO_POINT: Point to point message. * * Type of message. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_MESSAGE_TYPE_POINT_TO_POINT = 0x00 } QmiWmsMessageType; /** * QmiWmsMessageClass: * @QMI_WMS_MESSAGE_CLASS_0: Class 0. * @QMI_WMS_MESSAGE_CLASS_1: Class 1. * @QMI_WMS_MESSAGE_CLASS_2: Class 2. * @QMI_WMS_MESSAGE_CLASS_3: Class 3. * @QMI_WMS_MESSAGE_CLASS_NONE: Class none. * @QMI_WMS_MESSAGE_CLASS_CDMA: Class CDMA. * * Message class. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_MESSAGE_CLASS_0 = 0x00, QMI_WMS_MESSAGE_CLASS_1 = 0x01, QMI_WMS_MESSAGE_CLASS_2 = 0x02, QMI_WMS_MESSAGE_CLASS_3 = 0x03, QMI_WMS_MESSAGE_CLASS_NONE = 0x04, QMI_WMS_MESSAGE_CLASS_CDMA = 0x05 } QmiWmsMessageClass; /** * QmiWmsReceiptAction: * @QMI_WMS_RECEIPT_ACTION_DISCARD: Discard message. * @QMI_WMS_RECEIPT_ACTION_STORE_AND_NOTIFY: Store and notify to client. * @QMI_WMS_RECEIPT_ACTION_TRANSFER_ONLY: Notify to client, which should send back ACK. * @QMI_WMS_RECEIPT_ACTION_TRANSFER_AND_ACK: Notify to client and send back ACK. * @QMI_WMS_RECEIPT_ACTION_UNKNOWN: Unknown action. * * Action to perform when a message is received. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_RECEIPT_ACTION_DISCARD = 0x00, QMI_WMS_RECEIPT_ACTION_STORE_AND_NOTIFY = 0x01, QMI_WMS_RECEIPT_ACTION_TRANSFER_ONLY = 0x02, QMI_WMS_RECEIPT_ACTION_TRANSFER_AND_ACK = 0x03, QMI_WMS_RECEIPT_ACTION_UNKNOWN = 0xFF } QmiWmsReceiptAction; /** * QmiWmsTransferIndication: * @QMI_WMS_TRANSFER_INDICATION_CLIENT: Status reports transferred to the client. * * Transfer indication actions. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_WMS_TRANSFER_INDICATION_CLIENT = 0x01 } QmiWmsTransferIndication; /** * QmiWmsAckFailureCause: * @QMI_WMS_ACK_FAILURE_CAUSE_NO_NETWORK_RESPONSE: No network response. * @QMI_WMS_ACK_FAILURE_CAUSE_NETWORK_RELEASED_LINK: Network released link. * @QMI_WMS_ACK_FAILURE_CAUSE_NOT_SENT: Not sent. * * Ack failure cause. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_WMS_ACK_FAILURE_CAUSE_NO_NETWORK_RESPONSE = 0x00, QMI_WMS_ACK_FAILURE_CAUSE_NETWORK_RELEASED_LINK = 0x01, QMI_WMS_ACK_FAILURE_CAUSE_NOT_SENT = 0x02, } QmiWmsAckFailureCause; #endif /* _LIBQMI_GLIB_QMI_ENUMS_WMS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-enums.h000066400000000000000000000210311455567757300207230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google, Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ENUMS_H_ #define _LIBQMI_GLIB_QMI_ENUMS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-enums * @title: Common enumerations and flags * @short_description: Common enumerations and flags in the library. * * This section defines common enumerations and flags used in the interface. */ /** * QmiService: * @QMI_SERVICE_UNKNOWN: Unknown service. * @QMI_SERVICE_CTL: Control service. * @QMI_SERVICE_WDS: Wireless Data Service. * @QMI_SERVICE_DMS: Device Management Service. * @QMI_SERVICE_NAS: Network Access Service. * @QMI_SERVICE_QOS: Quality Of Service service. * @QMI_SERVICE_WMS: Wireless Messaging Service. * @QMI_SERVICE_PDS: Position Determination Service. * @QMI_SERVICE_AUTH: Authentication service. * @QMI_SERVICE_AT: AT service. * @QMI_SERVICE_VOICE: Voice service. * @QMI_SERVICE_CAT2: Card Application Toolkit service (v2). * @QMI_SERVICE_UIM: User Identity Module service. * @QMI_SERVICE_PBM: Phonebook Management service. * @QMI_SERVICE_QCHAT: QCHAT service. Since 1.8. * @QMI_SERVICE_RMTFS: Remote file system service. * @QMI_SERVICE_TEST: Test service. Since 1.8. * @QMI_SERVICE_LOC: Location service (~ PDS v2). * @QMI_SERVICE_SAR: Specific absorption rate service. * @QMI_SERVICE_IMS: IMS settings service. Since 1.8. * @QMI_SERVICE_ADC: Analog to digital converter driver service. Since 1.8. * @QMI_SERVICE_CSD: Core sound driver service. Since 1.8. * @QMI_SERVICE_MFS: Modem embedded file system service. Since 1.8. * @QMI_SERVICE_TIME: Time service. Since 1.8. * @QMI_SERVICE_TS: Thermal sensors service. Since 1.8. * @QMI_SERVICE_TMD: Thermal mitigation device service. Since 1.8. * @QMI_SERVICE_SAP: Service access proxy service. Since 1.8. * @QMI_SERVICE_WDA: Wireless data administrative service. Since 1.8. * @QMI_SERVICE_TSYNC: TSYNC control service. Since 1.8. * @QMI_SERVICE_RFSA: Remote file system access service. Since 1.8. * @QMI_SERVICE_CSVT: Circuit switched videotelephony service. Since 1.8. * @QMI_SERVICE_QCMAP: Qualcomm mobile access point service. Since 1.8. * @QMI_SERVICE_IMSP: IMS presence service. Since 1.8. * @QMI_SERVICE_IMSVT: IMS videotelephony service. Since 1.8. * @QMI_SERVICE_IMSA: IMS application service. Since 1.8. * @QMI_SERVICE_COEX: Coexistence service. Since 1.8. * @QMI_SERVICE_PDC: Persistent device configuration service. Since 1.8. * @QMI_SERVICE_STX: Simultaneous transmit service. Since 1.8. * @QMI_SERVICE_BIT: Bearer independent transport service. Since 1.8. * @QMI_SERVICE_IMSRTP: IMS RTP service. Since 1.8. * @QMI_SERVICE_RFRPE: RF radiated performance enhancement service. Since 1.8. * @QMI_SERVICE_DSD: Data system determination service. Since 1.8. * @QMI_SERVICE_SSCTL: Subsystem control service. Since 1.8. * @QMI_SERVICE_DPM: Data Port Mapper service. Since 1.30. * @QMI_SERVICE_CAT: Card Application Toolkit service (v1). * @QMI_SERVICE_RMS: Remote Management Service. * @QMI_SERVICE_OMA: Open Mobile Alliance device management service. * @QMI_SERVICE_FOX: Foxconn General Modem Service. Since 1.32. * @QMI_SERVICE_SSC: Snapdragon Sensore Core Service. Since 1.34. * @QMI_SERVICE_FOTA: Firmware Over The Air service. Since 1.24. * @QMI_SERVICE_GMS: Telit General Modem Service. Since 1.24. * @QMI_SERVICE_GAS: Telit General Application Service. Since 1.24. * @QMI_SERVICE_ATR: Telit AT Relay Service. Since 1.34. * * QMI services. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_SERVICE_UNKNOWN = -1, QMI_SERVICE_CTL = 0x00, QMI_SERVICE_WDS = 0x01, QMI_SERVICE_DMS = 0x02, QMI_SERVICE_NAS = 0x03, QMI_SERVICE_QOS = 0x04, QMI_SERVICE_WMS = 0x05, QMI_SERVICE_PDS = 0x06, QMI_SERVICE_AUTH = 0x07, QMI_SERVICE_AT = 0x08, QMI_SERVICE_VOICE = 0x09, QMI_SERVICE_CAT2 = 0x0A, QMI_SERVICE_UIM = 0x0B, QMI_SERVICE_PBM = 0x0C, QMI_SERVICE_QCHAT = 0x0D, QMI_SERVICE_RMTFS = 0x0E, QMI_SERVICE_TEST = 0x0F, QMI_SERVICE_LOC = 0x10, QMI_SERVICE_SAR = 0x11, QMI_SERVICE_IMS = 0x12, QMI_SERVICE_ADC = 0x13, QMI_SERVICE_CSD = 0x14, QMI_SERVICE_MFS = 0x15, QMI_SERVICE_TIME = 0x16, QMI_SERVICE_TS = 0x17, QMI_SERVICE_TMD = 0x18, QMI_SERVICE_SAP = 0x19, QMI_SERVICE_WDA = 0x1A, QMI_SERVICE_TSYNC = 0x1B, QMI_SERVICE_RFSA = 0x1C, QMI_SERVICE_CSVT = 0x1D, QMI_SERVICE_QCMAP = 0x1E, QMI_SERVICE_IMSP = 0x1F, QMI_SERVICE_IMSVT = 0x20, QMI_SERVICE_IMSA = 0x21, QMI_SERVICE_COEX = 0x22, /* 0x23, reserved */ QMI_SERVICE_PDC = 0x24, /* 0x25, reserved */ QMI_SERVICE_STX = 0x26, QMI_SERVICE_BIT = 0x27, QMI_SERVICE_IMSRTP = 0x28, QMI_SERVICE_RFRPE = 0x29, QMI_SERVICE_DSD = 0x2A, QMI_SERVICE_SSCTL = 0x2B, QMI_SERVICE_DPM = 0x2F, QMI_SERVICE_CAT = 0xE0, QMI_SERVICE_RMS = 0xE1, QMI_SERVICE_OMA = 0xE2, QMI_SERVICE_FOX = 0xE3, QMI_SERVICE_FOTA = 0xE6, QMI_SERVICE_GMS = 0xE7, QMI_SERVICE_GAS = 0xE8, QMI_SERVICE_ATR = 0xED, QMI_SERVICE_SSC = 0x190, } QmiService; /** * QmiEndian: * @QMI_ENDIAN_LITTLE: Little endian. * @QMI_ENDIAN_BIG: Big endian. * * Type of endianness. * * Since: 1.0 */ typedef enum { /*< since=1.28 >*/ /* the get_string() helper and QmiEndian type added in 1.28 */ QMI_ENDIAN_LITTLE = 0, QMI_ENDIAN_BIG = 1 } QmiEndian; /** * QmiDataEndpointType: * @QMI_DATA_ENDPOINT_TYPE_UNKNOWN: Unknown. Since 1.30. * @QMI_DATA_ENDPOINT_TYPE_HSIC: High-speed inter-chip interface. Since 1.30. * @QMI_DATA_ENDPOINT_TYPE_HSUSB: High-speed USB. * @QMI_DATA_ENDPOINT_TYPE_PCIE: PCIe. Since 1.28. * @QMI_DATA_ENDPOINT_TYPE_EMBEDDED: Embedded. Since 1.28. * @QMI_DATA_ENDPOINT_TYPE_BAM_DMUX: BAM/DMUX. Since 1.30. * @QMI_DATA_ENDPOINT_TYPE_UNDEFINED: Undefined. * * Data Endpoint Type. * * Since: 1.18 */ typedef enum { /*< since=1.18 >*/ QMI_DATA_ENDPOINT_TYPE_UNKNOWN = 0x00, QMI_DATA_ENDPOINT_TYPE_HSIC = 0x01, QMI_DATA_ENDPOINT_TYPE_HSUSB = 0x02, QMI_DATA_ENDPOINT_TYPE_PCIE = 0x03, QMI_DATA_ENDPOINT_TYPE_EMBEDDED = 0x04, QMI_DATA_ENDPOINT_TYPE_BAM_DMUX = 0x05, QMI_DATA_ENDPOINT_TYPE_UNDEFINED = 0xFF, } QmiDataEndpointType; /** * QmiSioPort: * @QMI_SIO_PORT_NONE: Invalid port number. * @QMI_SIO_PORT_A2_MUX_RMNET0: A2 MUX (BAM-DMUX) port for rmnet0. * @QMI_SIO_PORT_A2_MUX_RMNET1: A2 MUX (BAM-DMUX) port for rmnet1. * @QMI_SIO_PORT_A2_MUX_RMNET2: A2 MUX (BAM-DMUX) port for rmnet2. * @QMI_SIO_PORT_A2_MUX_RMNET3: A2 MUX (BAM-DMUX) port for rmnet3. * @QMI_SIO_PORT_A2_MUX_RMNET4: A2 MUX (BAM-DMUX) port for rmnet4. * @QMI_SIO_PORT_A2_MUX_RMNET5: A2 MUX (BAM-DMUX) port for rmnet5. * @QMI_SIO_PORT_A2_MUX_RMNET6: A2 MUX (BAM-DMUX) port for rmnet6. * @QMI_SIO_PORT_A2_MUX_RMNET7: A2 MUX (BAM-DMUX) port for rmnet7. * * SIO (serial I/O) port numbers. All ports available in the modem have a SIO * port number. This enum is incomplete, only few port numbers are publicly * known. * * Since: 1.28 */ typedef enum { /*< since=1.28 >*/ QMI_SIO_PORT_NONE = 0x0000, QMI_SIO_PORT_A2_MUX_RMNET0 = 0x0e04, QMI_SIO_PORT_A2_MUX_RMNET1 = 0x0e05, QMI_SIO_PORT_A2_MUX_RMNET2 = 0x0e06, QMI_SIO_PORT_A2_MUX_RMNET3 = 0x0e07, QMI_SIO_PORT_A2_MUX_RMNET4 = 0x0e08, QMI_SIO_PORT_A2_MUX_RMNET5 = 0x0e09, QMI_SIO_PORT_A2_MUX_RMNET6 = 0x0e0a, QMI_SIO_PORT_A2_MUX_RMNET7 = 0x0e0b, } QmiSioPort; #endif /* _LIBQMI_GLIB_QMI_ENUMS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-errors.h000066400000000000000000000557471455567757300211350ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_ERRORS_H_ #define _LIBQMI_GLIB_QMI_ERRORS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif /** * SECTION: qmi-errors * @title: Errors * @short_description: Common errors in the library. * * This section defines common error types used in the interface. */ /** * QMI_DBUS_ERROR_PREFIX: * * Symbol defining the common string prefix used for all libqmi errors in DBus. * * Since: 1.0 */ #define QMI_DBUS_ERROR_PREFIX "org.freedesktop.libqmi.Error" /** * QMI_CORE_ERROR_DBUS_PREFIX: * * Symbol defining the common string prefix used for all #QmiCoreError errors in DBus. * * Since: 1.0 */ #define QMI_CORE_ERROR_DBUS_PREFIX QMI_DBUS_ERROR_PREFIX ".Core" /** * QMI_PROTOCOL_ERROR_DBUS_PREFIX: * * Symbol defining the common string prefix used for all #QmiProtocolError errors in DBus. * * Since: 1.0 */ #define QMI_PROTOCOL_ERROR_DBUS_PREFIX QMI_DBUS_ERROR_PREFIX ".Protocol" /** * QmiCoreError: * @QMI_CORE_ERROR_FAILED: Operation failed. * @QMI_CORE_ERROR_WRONG_STATE: Operation cannot be executed in the current state. * @QMI_CORE_ERROR_TIMEOUT: Operation timed out. * @QMI_CORE_ERROR_INVALID_ARGS: Invalid arguments given. * @QMI_CORE_ERROR_INVALID_MESSAGE: QMI message is invalid. * @QMI_CORE_ERROR_TLV_NOT_FOUND: TLV not found. * @QMI_CORE_ERROR_TLV_TOO_LONG: TLV is too long. * @QMI_CORE_ERROR_UNSUPPORTED: Not supported. * @QMI_CORE_ERROR_TLV_EMPTY: TLV has no value. Empty TLVs are not a real error, so this error type is never generated. Since 1.12. Deprecated 1.22. * @QMI_CORE_ERROR_UNEXPECTED_MESSAGE: QMI message is unexpected. Since 1.16. * @QMI_CORE_ERROR_INVALID_DATA: Invalid data found in the message. Since 1.24.6. * * Common errors that may be reported by libqmi-glib. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_CORE_ERROR_FAILED = 0, /*< nick=Failed >*/ QMI_CORE_ERROR_WRONG_STATE = 1, /*< nick=WrongState >*/ QMI_CORE_ERROR_TIMEOUT = 2, /*< nick=Timeout >*/ QMI_CORE_ERROR_INVALID_ARGS = 3, /*< nick=InvalidArgs >*/ QMI_CORE_ERROR_INVALID_MESSAGE = 4, /*< nick=InvalidMessage >*/ QMI_CORE_ERROR_TLV_NOT_FOUND = 5, /*< nick=TlvNotFound >*/ QMI_CORE_ERROR_TLV_TOO_LONG = 6, /*< nick=TlvTooLong >*/ QMI_CORE_ERROR_UNSUPPORTED = 7, /*< nick=Unsupported >*/ QMI_CORE_ERROR_TLV_EMPTY = 8, /*< nick=TlvEmpty >*/ QMI_CORE_ERROR_UNEXPECTED_MESSAGE = 9, /*< nick=UnexpectedMessage >*/ QMI_CORE_ERROR_INVALID_DATA = 10, /*< nick=InvalidData >*/ } QmiCoreError; /** * QmiProtocolError: * @QMI_PROTOCOL_ERROR_NONE: No error. * @QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE: Malformed message. * @QMI_PROTOCOL_ERROR_NO_MEMORY: No memory. * @QMI_PROTOCOL_ERROR_INTERNAL: Internal. * @QMI_PROTOCOL_ERROR_ABORTED: Aborted. * @QMI_PROTOCOL_ERROR_CLIENT_IDS_EXHAUSTED: Client IDs exhausted. * @QMI_PROTOCOL_ERROR_UNABORTABLE_TRANSACTION: Unabortable transaction. * @QMI_PROTOCOL_ERROR_INVALID_CLIENT_ID: Invalid client ID. * @QMI_PROTOCOL_ERROR_NO_THRESHOLDS_PROVIDED: No thresholds provided. * @QMI_PROTOCOL_ERROR_INVALID_HANDLE: Invalid handle. * @QMI_PROTOCOL_ERROR_INVALID_PROFILE: Invalid profile. * @QMI_PROTOCOL_ERROR_INVALID_PIN_ID: Invalid PIN ID. * @QMI_PROTOCOL_ERROR_INCORRECT_PIN: Incorrect PIN. * @QMI_PROTOCOL_ERROR_NO_NETWORK_FOUND: No network found. * @QMI_PROTOCOL_ERROR_CALL_FAILED: Call failed. * @QMI_PROTOCOL_ERROR_OUT_OF_CALL: Out of call. * @QMI_PROTOCOL_ERROR_NOT_PROVISIONED: Not provisioned. * @QMI_PROTOCOL_ERROR_MISSING_ARGUMENT: Missing argument. * @QMI_PROTOCOL_ERROR_ARGUMENT_TOO_LONG: Argument too long. * @QMI_PROTOCOL_ERROR_INVALID_TRANSACTION_ID: Invalid transaction ID. * @QMI_PROTOCOL_ERROR_DEVICE_IN_USE: Device in use. * @QMI_PROTOCOL_ERROR_NETWORK_UNSUPPORTED: Network unsupported. * @QMI_PROTOCOL_ERROR_DEVICE_UNSUPPORTED: Device unsupported. * @QMI_PROTOCOL_ERROR_NO_EFFECT: No effect. * @QMI_PROTOCOL_ERROR_NO_FREE_PROFILE: No free profile. * @QMI_PROTOCOL_ERROR_INVALID_PDP_TYPE: Invalid PDP type. * @QMI_PROTOCOL_ERROR_INVALID_TECHNOLOGY_PREFERENCE: Invalid technology preference. * @QMI_PROTOCOL_ERROR_INVALID_PROFILE_TYPE: Invalid profile type. * @QMI_PROTOCOL_ERROR_INVALID_SERVICE_TYPE: Invalid service type. * @QMI_PROTOCOL_ERROR_INVALID_REGISTER_ACTION: Invalid register action. * @QMI_PROTOCOL_ERROR_INVALID_PS_ATTACH_ACTION: Invalid PS attach action. * @QMI_PROTOCOL_ERROR_AUTHENTICATION_FAILED: Authentication failed. * @QMI_PROTOCOL_ERROR_PIN_BLOCKED: PIN blocked. * @QMI_PROTOCOL_ERROR_PIN_ALWAYS_BLOCKED: PIN always blocked. * @QMI_PROTOCOL_ERROR_UIM_UNINITIALIZED: UIM uninitialized. * @QMI_PROTOCOL_ERROR_MAXIMUM_QOS_REQUESTS_IN_USE: Maximum QoS requests in use. * @QMI_PROTOCOL_ERROR_INCORRECT_FLOW_FILTER: Incorrect flow filter. * @QMI_PROTOCOL_ERROR_NETWORK_QOS_UNAWARE: Network QoS unaware. * @QMI_PROTOCOL_ERROR_INVALID_QOS_ID: Invalid QoS ID. * @QMI_PROTOCOL_ERROR_REQUESTED_NUMBER_UNSUPPORTED: Requested number unsupported. Since 1.22. * @QMI_PROTOCOL_ERROR_INTERFACE_NOT_FOUND: Interface not found. Since 1.22. * @QMI_PROTOCOL_ERROR_FLOW_SUSPENDED: Flow suspended. * @QMI_PROTOCOL_ERROR_INVALID_DATA_FORMAT: Invalid data format. Since 1.22. * @QMI_PROTOCOL_ERROR_GENERAL_ERROR: General error. * @QMI_PROTOCOL_ERROR_UNKNOWN_ERROR: Unknown error. * @QMI_PROTOCOL_ERROR_INVALID_ARGUMENT: Invalid argument. * @QMI_PROTOCOL_ERROR_INVALID_INDEX: Invalid index. * @QMI_PROTOCOL_ERROR_NO_ENTRY: No entry. * @QMI_PROTOCOL_ERROR_DEVICE_STORAGE_FULL: Device storage full. * @QMI_PROTOCOL_ERROR_DEVICE_NOT_READY: Device not ready. * @QMI_PROTOCOL_ERROR_NETWORK_NOT_READY: Network not ready. * @QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE: WMS cause code. * @QMI_PROTOCOL_ERROR_WMS_MESSAGE_NOT_SENT: WMS message not sent. * @QMI_PROTOCOL_ERROR_WMS_MESSAGE_DELIVERY_FAILURE: WMS message delivery failure. * @QMI_PROTOCOL_ERROR_WMS_INVALID_MESSAGE_ID: WMS invalid message ID. * @QMI_PROTOCOL_ERROR_WMS_ENCODING: WMS encoding. * @QMI_PROTOCOL_ERROR_AUTHENTICATION_LOCK: Authentication lock. * @QMI_PROTOCOL_ERROR_INVALID_TRANSITION: Invalid transition. * @QMI_PROTOCOL_ERROR_NOT_MCAST_INTERFACE: Not a multicast interface. Since 1.22. * @QMI_PROTOCOL_ERROR_MAXIMUM_MCAST_REQUESTS_IN_USE: Maximum multicast requests in use. Since 1.22. * @QMI_PROTOCOL_ERROR_INVALID_MCAST_HANDLE: Invalid mulitcast handle. Since 1.22. * @QMI_PROTOCOL_ERROR_INVALID_IP_FAMILY_PREFERENCE: Invalid IP family preference. Since 1.22. * @QMI_PROTOCOL_ERROR_SESSION_INACTIVE: Session inactive. * @QMI_PROTOCOL_ERROR_SESSION_INVALID: Session invalid. * @QMI_PROTOCOL_ERROR_SESSION_OWNERSHIP: Session ownership. * @QMI_PROTOCOL_ERROR_INSUFFICIENT_RESOURCES: Insufficient resources. * @QMI_PROTOCOL_ERROR_DISABLED: Disabled. * @QMI_PROTOCOL_ERROR_INVALID_OPERATION: Invalid operation. * @QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND: Invalid QMI command. * @QMI_PROTOCOL_ERROR_WMS_T_PDU_TYPE: WMS T-PDU type. * @QMI_PROTOCOL_ERROR_WMS_SMSC_ADDRESS: WMS SMSC address. * @QMI_PROTOCOL_ERROR_INFORMATION_UNAVAILABLE: Information unavailable. * @QMI_PROTOCOL_ERROR_SEGMENT_TOO_LONG: Segment too long. * @QMI_PROTOCOL_ERROR_SEGMENT_ORDER: Segment order. * @QMI_PROTOCOL_ERROR_BUNDLING_NOT_SUPPORTED: Bundling not supported. * @QMI_PROTOCOL_ERROR_OPERATION_PARTIAL_FAILURE: Operation partial failure. Since 1.22. * @QMI_PROTOCOL_ERROR_POLICY_MISMATCH: Policy mismatch. Since 1.6. * @QMI_PROTOCOL_ERROR_SIM_FILE_NOT_FOUND: SIM file not found. * @QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL: Extended internal error. Since 1.6. * @QMI_PROTOCOL_ERROR_ACCESS_DENIED: Access denied. * @QMI_PROTOCOL_ERROR_HARDWARE_RESTRICTED: Hardware restricted. * @QMI_PROTOCOL_ERROR_ACK_NOT_SENT: ACK not sent. Since 1.6. * @QMI_PROTOCOL_ERROR_INJECT_TIMEOUT: Inject timeout. Since 1.6. * @QMI_PROTOCOL_ERROR_INCOMPATIBLE_STATE: Incompatible state. Since 1.6. * @QMI_PROTOCOL_ERROR_FDN_RESTRICT: FDN restrict. Since 1.6. * @QMI_PROTOCOL_ERROR_SUPS_FAILURE_CASE: SUPS failure case. Since 1.6. * @QMI_PROTOCOL_ERROR_NO_RADIO: No radio. Since 1.6. * @QMI_PROTOCOL_ERROR_NOT_SUPPORTED: Not supported. Since 1.6. * @QMI_PROTOCOL_ERROR_NO_SUBSCRIPTION: No subscription. Since 1.6. * @QMI_PROTOCOL_ERROR_CARD_CALL_CONTROL_FAILED: Card call control failed. Since 1.6. * @QMI_PROTOCOL_ERROR_NETWORK_ABORTED: Network aborted. Since 1.6. * @QMI_PROTOCOL_ERROR_MSG_BLOCKED: Message blocked. Since 1.6. * @QMI_PROTOCOL_ERROR_INVALID_SESSION_TYPE: Invalid session type. Since 1.6. * @QMI_PROTOCOL_ERROR_INVALID_PB_TYPE: Invalid PB type. Since 1.6. * @QMI_PROTOCOL_ERROR_NO_SIM: No SIM. Since 1.6. * @QMI_PROTOCOL_ERROR_PB_NOT_READY: PB not ready. Since 1.6. * @QMI_PROTOCOL_ERROR_PIN_RESTRICTION: PIN restriction. Since 1.6. * @QMI_PROTOCOL_ERROR_PIN2_RESTRICTION: PIN2 restriction. Since 1.6. * @QMI_PROTOCOL_ERROR_PUK_RESTRICTION: PUK restriction. Since 1.6. * @QMI_PROTOCOL_ERROR_PUK2_RESTRICTION: PUK2 restriction. Since 1.6. * @QMI_PROTOCOL_ERROR_PB_ACCESS_RESTRICTED: PB access restricted. Since 1.6. * @QMI_PROTOCOL_ERROR_PB_DELETE_IN_PROGRESS: PB delete in progress. Since 1.22. * @QMI_PROTOCOL_ERROR_PB_TEXT_TOO_LONG: PB text too long. Since 1.6. * @QMI_PROTOCOL_ERROR_PB_NUMBER_TOO_LONG: PB number too long. Since 1.6. * @QMI_PROTOCOL_ERROR_PB_HIDDEN_KEY_RESTRICTION: PB hidden key restriction. Since 1.6. * @QMI_PROTOCOL_ERROR_PB_NOT_AVAILABLE: PB not available. Since 1.22. * @QMI_PROTOCOL_ERROR_DEVICE_MEMORY_ERROR: Device memory error. Since 1.22. * @QMI_PROTOCOL_ERROR_NO_PERMISSION: No permission. Since 1.22. * @QMI_PROTOCOL_ERROR_TOO_SOON: Too soon. Since 1.22. * @QMI_PROTOCOL_ERROR_TIME_NOT_ACQUIRED: Time not acquired. Since 1.22. * @QMI_PROTOCOL_ERROR_OPERATION_IN_PROGRESS: Operation in progress. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_WRITE_FAILED: Firmware write failed. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_INFO_READ_FAILED: Firmware info read failed. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_FILE_NOT_FOUND: Firmware file not found. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_DIR_NOT_FOUND: Firmware dir not found. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_ALREADY_ACTIVATED: Firmware already activated. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_CANNOT_GENERIC_IMAGE: Firmware cannot generic image. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_FILE_OPEN_FAILED: Firmware file open failed. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_UPDATE_DISCONTINUOUS_FRAME: Firmware update discontinuous frame. Since 1.22. * @QMI_PROTOCOL_ERROR_FW_UPDATE_FAILED: Firmware update failed. Since 1.22. * @QMI_PROTOCOL_ERROR_CAT_EVENT_REGISTRATION_FAILED: Event registration failed. * @QMI_PROTOCOL_ERROR_CAT_INVALID_TERMINAL_RESPONSE: Invalid terminal response. * @QMI_PROTOCOL_ERROR_CAT_INVALID_ENVELOPE_COMMAND: Invalid envelope command. * @QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_BUSY: Envelope command busy. * @QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_FAILED: Envelope command failed. * * QMI protocol errors. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_PROTOCOL_ERROR_NONE = 0, /*< nick=None >*/ QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE = 1, /*< nick=MalformedMessage >*/ QMI_PROTOCOL_ERROR_NO_MEMORY = 2, /*< nick=NoMemory >*/ QMI_PROTOCOL_ERROR_INTERNAL = 3, /*< nick=Internal >*/ QMI_PROTOCOL_ERROR_ABORTED = 4, /*< nick=Aborted >*/ QMI_PROTOCOL_ERROR_CLIENT_IDS_EXHAUSTED = 5, /*< nick=ClientIdsExhausted >*/ QMI_PROTOCOL_ERROR_UNABORTABLE_TRANSACTION = 6, /*< nick=UnabortableTransaction >*/ QMI_PROTOCOL_ERROR_INVALID_CLIENT_ID = 7, /*< nick=InvalidClientId >*/ QMI_PROTOCOL_ERROR_NO_THRESHOLDS_PROVIDED = 8, /*< nick=NoThresholdsProvided >*/ QMI_PROTOCOL_ERROR_INVALID_HANDLE = 9, /*< nick=InvalidHandle >*/ QMI_PROTOCOL_ERROR_INVALID_PROFILE = 10, /*< nick=InvalidProfile >*/ QMI_PROTOCOL_ERROR_INVALID_PIN_ID = 11, /*< nick=InvalidPinId >*/ QMI_PROTOCOL_ERROR_INCORRECT_PIN = 12, /*< nick=IncorrectPin >*/ QMI_PROTOCOL_ERROR_NO_NETWORK_FOUND = 13, /*< nick=NoNetworkFound >*/ QMI_PROTOCOL_ERROR_CALL_FAILED = 14, /*< nick=CallFailed >*/ QMI_PROTOCOL_ERROR_OUT_OF_CALL = 15, /*< nick=OutOfCall >*/ QMI_PROTOCOL_ERROR_NOT_PROVISIONED = 16, /*< nick=NotProvisioned >*/ QMI_PROTOCOL_ERROR_MISSING_ARGUMENT = 17, /*< nick=MissingArgument >*/ QMI_PROTOCOL_ERROR_ARGUMENT_TOO_LONG = 19, /*< nick=ArgumentTooLong >*/ QMI_PROTOCOL_ERROR_INVALID_TRANSACTION_ID = 22, /*< nick=InvalidTransactionId >*/ QMI_PROTOCOL_ERROR_DEVICE_IN_USE = 23, /*< nick=DeviceInUse >*/ QMI_PROTOCOL_ERROR_NETWORK_UNSUPPORTED = 24, /*< nick=NetworkUnsupported >*/ QMI_PROTOCOL_ERROR_DEVICE_UNSUPPORTED = 25, /*< nick=DeviceUnsupported >*/ QMI_PROTOCOL_ERROR_NO_EFFECT = 26, /*< nick=NoEffect >*/ QMI_PROTOCOL_ERROR_NO_FREE_PROFILE = 27, /*< nick=NoFreeProfile >*/ QMI_PROTOCOL_ERROR_INVALID_PDP_TYPE = 28, /*< nick=InvalidPdpType >*/ QMI_PROTOCOL_ERROR_INVALID_TECHNOLOGY_PREFERENCE = 29, /*< nick=InvalidTechnologyPreference >*/ QMI_PROTOCOL_ERROR_INVALID_PROFILE_TYPE = 30, /*< nick=InvalidProfileType >*/ QMI_PROTOCOL_ERROR_INVALID_SERVICE_TYPE = 31, /*< nick=InvalidServiceType >*/ QMI_PROTOCOL_ERROR_INVALID_REGISTER_ACTION = 32, /*< nick=InvalidRegisterAction >*/ QMI_PROTOCOL_ERROR_INVALID_PS_ATTACH_ACTION = 33, /*< nick=InvalidPsAttachAction >*/ QMI_PROTOCOL_ERROR_AUTHENTICATION_FAILED = 34, /*< nick=AuthenticationFailed >*/ QMI_PROTOCOL_ERROR_PIN_BLOCKED = 35, /*< nick=PinBlocked >*/ QMI_PROTOCOL_ERROR_PIN_ALWAYS_BLOCKED = 36, /*< nick=PinAlwaysBlocked >*/ QMI_PROTOCOL_ERROR_UIM_UNINITIALIZED = 37, /*< nick=UimUninitialized >*/ QMI_PROTOCOL_ERROR_MAXIMUM_QOS_REQUESTS_IN_USE = 38, /*< nick=MaximumQosRequestsInUse >*/ QMI_PROTOCOL_ERROR_INCORRECT_FLOW_FILTER = 39, /*< nick=IncorrectFlowFilter >*/ QMI_PROTOCOL_ERROR_NETWORK_QOS_UNAWARE = 40, /*< nick=NetworkQosUnaware >*/ QMI_PROTOCOL_ERROR_INVALID_QOS_ID = 41, /*< nick=InvalidQosId >*/ QMI_PROTOCOL_ERROR_REQUESTED_NUMBER_UNSUPPORTED = 42, /*< nick=RequestedNumberUnsupported >*/ QMI_PROTOCOL_ERROR_INTERFACE_NOT_FOUND = 43, /*< nick=InterfaceNotFound >*/ QMI_PROTOCOL_ERROR_FLOW_SUSPENDED = 44, /*< nick=FlowSuspended >*/ QMI_PROTOCOL_ERROR_INVALID_DATA_FORMAT = 45, /*< nick=InvalidDataFormat >*/ QMI_PROTOCOL_ERROR_GENERAL_ERROR = 46, /*< nick=GeneralError >*/ QMI_PROTOCOL_ERROR_UNKNOWN_ERROR = 47, /*< nick=UnknownError >*/ QMI_PROTOCOL_ERROR_INVALID_ARGUMENT = 48, /*< nick=InvalidArgument >*/ QMI_PROTOCOL_ERROR_INVALID_INDEX = 49, /*< nick=InvalidIndex >*/ QMI_PROTOCOL_ERROR_NO_ENTRY = 50, /*< nick=NoEntry >*/ QMI_PROTOCOL_ERROR_DEVICE_STORAGE_FULL = 51, /*< nick=DeviceStorageFull >*/ QMI_PROTOCOL_ERROR_DEVICE_NOT_READY = 52, /*< nick=DeviceNotReady >*/ QMI_PROTOCOL_ERROR_NETWORK_NOT_READY = 53, /*< nick=NetworkNotReady >*/ QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE = 54, /*< nick=WmsCauseCode >*/ QMI_PROTOCOL_ERROR_WMS_MESSAGE_NOT_SENT = 55, /*< nick=WmsMessageNotSent >*/ QMI_PROTOCOL_ERROR_WMS_MESSAGE_DELIVERY_FAILURE = 56, /*< nick=WmsMessageDeliveryFailure >*/ QMI_PROTOCOL_ERROR_WMS_INVALID_MESSAGE_ID = 57, /*< nick=WmsInvalidMessageId >*/ QMI_PROTOCOL_ERROR_WMS_ENCODING = 58, /*< nick=WmsEncoding >*/ QMI_PROTOCOL_ERROR_AUTHENTICATION_LOCK = 59, /*< nick=AuthenticationLock >*/ QMI_PROTOCOL_ERROR_INVALID_TRANSITION = 60, /*< nick=InvalidTransition >*/ QMI_PROTOCOL_ERROR_NOT_MCAST_INTERFACE = 61, /*< nick=NotMcastInterface >*/ QMI_PROTOCOL_ERROR_MAXIMUM_MCAST_REQUESTS_IN_USE = 62, /*< nick=MaximumMcastRequestsInUse >*/ QMI_PROTOCOL_ERROR_INVALID_MCAST_HANDLE = 63, /*< nick=InvalidMcastHandle >*/ QMI_PROTOCOL_ERROR_INVALID_IP_FAMILY_PREFERENCE = 64, /*< nick=InvalidIpFamilyPreference >*/ QMI_PROTOCOL_ERROR_SESSION_INACTIVE = 65, /*< nick=SessionInactive >*/ QMI_PROTOCOL_ERROR_SESSION_INVALID = 66, /*< nick=SessionInvalid >*/ QMI_PROTOCOL_ERROR_SESSION_OWNERSHIP = 67, /*< nick=SessionOwnership >*/ QMI_PROTOCOL_ERROR_INSUFFICIENT_RESOURCES = 68, /*< nick=InsufficientResources >*/ QMI_PROTOCOL_ERROR_DISABLED = 69, /*< nick=Disabled >*/ QMI_PROTOCOL_ERROR_INVALID_OPERATION = 70, /*< nick=InvalidOperation >*/ QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND = 71, /*< nick=InvalidQmiCommand >*/ QMI_PROTOCOL_ERROR_WMS_T_PDU_TYPE = 72, /*< nick=WmsTPduType >*/ QMI_PROTOCOL_ERROR_WMS_SMSC_ADDRESS = 73, /*< nick=WmsSmscAddress >*/ QMI_PROTOCOL_ERROR_INFORMATION_UNAVAILABLE = 74, /*< nick=InformationUnavailable >*/ QMI_PROTOCOL_ERROR_SEGMENT_TOO_LONG = 75, /*< nick=SegmentTooLong >*/ QMI_PROTOCOL_ERROR_SEGMENT_ORDER = 76, /*< nick=SegmentOrder >*/ QMI_PROTOCOL_ERROR_BUNDLING_NOT_SUPPORTED = 77, /*< nick=BundlingNotSupported >*/ QMI_PROTOCOL_ERROR_OPERATION_PARTIAL_FAILURE = 78, /*< nick=OperationPartialFailure >*/ QMI_PROTOCOL_ERROR_POLICY_MISMATCH = 79, /*< nick=PolicyMismatch >*/ QMI_PROTOCOL_ERROR_SIM_FILE_NOT_FOUND = 80, /*< nick=SimFileNotFound >*/ QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL = 81, /*< nick=ExtendedInternal >*/ QMI_PROTOCOL_ERROR_ACCESS_DENIED = 82, /*< nick=AccessDenied >*/ QMI_PROTOCOL_ERROR_HARDWARE_RESTRICTED = 83, /*< nick=HardwareRestricted >*/ QMI_PROTOCOL_ERROR_ACK_NOT_SENT = 84, /*< nick=AckNotSent >*/ QMI_PROTOCOL_ERROR_INJECT_TIMEOUT = 85, /*< nick=InjectTimeout >*/ QMI_PROTOCOL_ERROR_INCOMPATIBLE_STATE = 90, /*< nick=IncompatibleState >*/ QMI_PROTOCOL_ERROR_FDN_RESTRICT = 91, /*< nick=FdnRestrict >*/ QMI_PROTOCOL_ERROR_SUPS_FAILURE_CASE = 92, /*< nick=SupsFailureCase >*/ QMI_PROTOCOL_ERROR_NO_RADIO = 93, /*< nick=NoRadio >*/ QMI_PROTOCOL_ERROR_NOT_SUPPORTED = 94, /*< nick=NotSupported >*/ QMI_PROTOCOL_ERROR_NO_SUBSCRIPTION = 95, /*< nick=NoSubscription >*/ QMI_PROTOCOL_ERROR_CARD_CALL_CONTROL_FAILED = 96, /*< nick=CardCallControlFailed >*/ QMI_PROTOCOL_ERROR_NETWORK_ABORTED = 97, /*< nick=NetworkAborted >*/ QMI_PROTOCOL_ERROR_MSG_BLOCKED = 98, /*< nick=MsgBlocked >*/ QMI_PROTOCOL_ERROR_INVALID_SESSION_TYPE = 100, /*< nick=InvalidSessionType >*/ QMI_PROTOCOL_ERROR_INVALID_PB_TYPE = 101, /*< nick=InvalidPbType >*/ QMI_PROTOCOL_ERROR_NO_SIM = 102, /*< nick=NoSim >*/ QMI_PROTOCOL_ERROR_PB_NOT_READY = 103, /*< nick=PbNotReady >*/ QMI_PROTOCOL_ERROR_PIN_RESTRICTION = 104, /*< nick=PinRestriction >*/ QMI_PROTOCOL_ERROR_PIN2_RESTRICTION = 105, /*< nick=Pin1Restriction >*/ QMI_PROTOCOL_ERROR_PUK_RESTRICTION = 106, /*< nick=PukRestriction >*/ QMI_PROTOCOL_ERROR_PUK2_RESTRICTION = 107, /*< nick=Puk2Restriction >*/ QMI_PROTOCOL_ERROR_PB_ACCESS_RESTRICTED = 108, /*< nick=PbAccessRestricted >*/ QMI_PROTOCOL_ERROR_PB_DELETE_IN_PROGRESS = 109, /*< nick=PbDeleteInProgress >*/ QMI_PROTOCOL_ERROR_PB_TEXT_TOO_LONG = 110, /*< nick=PbTextTooLong >*/ QMI_PROTOCOL_ERROR_PB_NUMBER_TOO_LONG = 111, /*< nick=PbNumberTooLong >*/ QMI_PROTOCOL_ERROR_PB_HIDDEN_KEY_RESTRICTION = 112, /*< nick=PbHiddenKeyRestriction >*/ QMI_PROTOCOL_ERROR_PB_NOT_AVAILABLE = 113, /*< nick=PbNotAvailable >*/ QMI_PROTOCOL_ERROR_DEVICE_MEMORY_ERROR = 114, /*< nick=DeviceMemoryError >*/ QMI_PROTOCOL_ERROR_NO_PERMISSION = 115, /*< nick=NoPermission >*/ QMI_PROTOCOL_ERROR_TOO_SOON = 116, /*< nick=TooSoon >*/ QMI_PROTOCOL_ERROR_TIME_NOT_ACQUIRED = 117, /*< nick=TimeNotAcquired >*/ QMI_PROTOCOL_ERROR_OPERATION_IN_PROGRESS = 118, /*< nick=OperationInProgress >*/ QMI_PROTOCOL_ERROR_FW_WRITE_FAILED = 388, /*< nick=FwWriteFailed >*/ QMI_PROTOCOL_ERROR_FW_INFO_READ_FAILED = 389, /*< nick=FwInfoReadFailed >*/ QMI_PROTOCOL_ERROR_FW_FILE_NOT_FOUND = 390, /*< nick=FwFileNotFound >*/ QMI_PROTOCOL_ERROR_FW_DIR_NOT_FOUND = 391, /*< nick=FwDirNotFound >*/ QMI_PROTOCOL_ERROR_FW_ALREADY_ACTIVATED = 392, /*< nick=FwAlreadyActivated >*/ QMI_PROTOCOL_ERROR_FW_CANNOT_GENERIC_IMAGE = 393, /*< nick=FwCannotGenericImage >*/ QMI_PROTOCOL_ERROR_FW_FILE_OPEN_FAILED = 400, /*< nick=FwFileOpenFailed >*/ QMI_PROTOCOL_ERROR_FW_UPDATE_DISCONTINUOUS_FRAME = 401, /*< nick=FwUpdateDiscontinuousFrame >*/ QMI_PROTOCOL_ERROR_FW_UPDATE_FAILED = 402, /*< nick=FwUpdateFailed >*/ QMI_PROTOCOL_ERROR_CAT_EVENT_REGISTRATION_FAILED = 61441, /*< nick=CatEventRegistrationFailed >*/ QMI_PROTOCOL_ERROR_CAT_INVALID_TERMINAL_RESPONSE = 61442, /*< nick=CatInvalidTerminalResponse >*/ QMI_PROTOCOL_ERROR_CAT_INVALID_ENVELOPE_COMMAND = 61443, /*< nick=CatInvalidEnvelopeCommand >*/ QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_BUSY = 61444, /*< nick=CatEnvelopeCommandBusy >*/ QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_FAILED = 61445 /*< nick=CatEnvelopeCommandFailed >*/ } QmiProtocolError; #endif /* _LIBQMI_GLIB_QMI_ERRORS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-file.c000066400000000000000000000127731455567757300205230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (C) 2019 Eric Caruso */ #include "qmi-file.h" #include "qmi-error-types.h" #include "qmi-errors.h" G_DEFINE_TYPE (QmiFile, qmi_file, G_TYPE_OBJECT) struct _QmiFilePrivate { GFile *file; gboolean is_uri; gchar *path; gchar *path_display; }; /*****************************************************************************/ GFile * qmi_file_get_file (QmiFile *self) { return g_object_ref (self->priv->file); } GFile * qmi_file_peek_file (QmiFile *self) { return self->priv->file; } const gchar * qmi_file_get_path (QmiFile *self) { return self->priv->path; } const gchar * qmi_file_get_path_display (QmiFile *self) { return self->priv->path_display; } /*****************************************************************************/ gboolean qmi_file_check_type_finish (QmiFile *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void query_info_async_ready (GFile *file, GAsyncResult *res, GTask *task) { GError *error = NULL; GFileInfo *info; GFileType file_type; info = g_file_query_info_finish (file, res, &error); if (!info) { g_prefix_error (&error, "Couldn't query file info: "); g_task_return_error (task, error); g_object_unref (task); return; } file_type = g_file_info_get_file_type (info); g_object_unref (info); if (file_type != G_FILE_TYPE_SPECIAL) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Wrong file type"); g_object_unref (task); return; } g_task_return_boolean (task, TRUE); g_object_unref (task); } void qmi_file_check_type_async (QmiFile *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; task = g_task_new (self, cancellable, callback, user_data); /* If this file only has a URI and no local path, then it refers to some * non-filesystem resource, such as something on a device bus. We can't * figure out if it's the right type in this case, so we just try to see * if it's OK later. */ if (self->priv->is_uri) { g_task_return_boolean (task, TRUE); g_object_unref (task); return; } /* Check the file type. Note that this is just a quick check to avoid * creating QmiDevices pointing to a location already known not to be a QMI * device. */ g_file_query_info_async (self->priv->file, G_FILE_ATTRIBUTE_STANDARD_TYPE, G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, cancellable, (GAsyncReadyCallback)query_info_async_ready, task); } /*****************************************************************************/ QmiFile * qmi_file_new (GFile *file) { QmiFile *self; gchar *path; g_assert (G_IS_FILE (file)); self = g_object_new (QMI_TYPE_FILE, NULL); self->priv->file = g_object_ref (file); path = g_file_get_path (self->priv->file); if (path) { self->priv->is_uri = FALSE; self->priv->path = path; self->priv->path_display = g_filename_display_name (self->priv->path); } else { self->priv->is_uri = TRUE; self->priv->path = g_file_get_uri (self->priv->file); self->priv->path_display = g_strdup (self->priv->path); } return self; } /*****************************************************************************/ static void qmi_file_init (QmiFile *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QMI_TYPE_FILE, QmiFilePrivate); } static void dispose (GObject *object) { QmiFile *self = QMI_FILE (object); g_clear_object (&self->priv->file); g_clear_pointer (&self->priv->path, g_free); g_clear_pointer (&self->priv->path_display, g_free); G_OBJECT_CLASS (qmi_file_parent_class)->dispose (object); } static void qmi_file_class_init (QmiFileClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiFilePrivate)); object_class->dispose = dispose; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-file.h000066400000000000000000000054241455567757300205230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019 Eric Caruso */ #ifndef _LIBQMI_GLIB_QMI_FILE_H_ #define _LIBQMI_GLIB_QMI_FILE_H_ #include #include #define QMI_TYPE_FILE (qmi_file_get_type ()) #define QMI_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_FILE, QmiFile)) #define QMI_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_FILE, QmiFileClass)) #define QMI_IS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_FILE)) #define QMI_IS_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_FILE)) #define QMI_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_FILE, QmiFileClass)) typedef struct _QmiFile QmiFile; typedef struct _QmiFileClass QmiFileClass; typedef struct _QmiFilePrivate QmiFilePrivate; struct _QmiFile { /*< private >*/ GObject parent; QmiFilePrivate *priv; }; struct _QmiFileClass { /*< private >*/ GObjectClass parent; }; GType qmi_file_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiFile, g_object_unref) QmiFile *qmi_file_new (GFile *file); GFile *qmi_file_get_file (QmiFile *self); GFile *qmi_file_peek_file (QmiFile *self); const gchar *qmi_file_get_path (QmiFile *self); const gchar *qmi_file_get_path_display (QmiFile *self); void qmi_file_check_type_async (QmiFile *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qmi_file_check_type_finish (QmiFile *self, GAsyncResult *res, GError **error); #endif /* _LIBQMI_GLIB_QMI_FILE_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-flags64-dms.h000066400000000000000000000262441455567757300216360ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Lanedo GmbH. * Copyright (C) 2012 Google, Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_ #define _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include /*****************************************************************************/ /* Helper enums for the 'QMI DMS Get Band Capability' message */ /** * QmiDmsBandCapability: * @QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM: Band class 0, A-system. * @QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM: Band class 0, B-system. * @QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS: Band class 1, all blocks. * @QMI_DMS_BAND_CAPABILITY_BC_2: Band class 2. * @QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM: Band class 3, A-system. * @QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS: Band class 4, all blocks. * @QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS: Band class 5, all blocks. * @QMI_DMS_BAND_CAPABILITY_BC_6: Band class 6. * @QMI_DMS_BAND_CAPABILITY_BC_7: Band class 7. * @QMI_DMS_BAND_CAPABILITY_BC_8: Band class 8. * @QMI_DMS_BAND_CAPABILITY_BC_9: Band class 9. * @QMI_DMS_BAND_CAPABILITY_BC_10: Band class 10. * @QMI_DMS_BAND_CAPABILITY_BC_11: Band class 11. * @QMI_DMS_BAND_CAPABILITY_BC_12: Band class 12. * @QMI_DMS_BAND_CAPABILITY_BC_14: Band class 14. * @QMI_DMS_BAND_CAPABILITY_BC_15: Band class 15. * @QMI_DMS_BAND_CAPABILITY_BC_16: Band class 16. * @QMI_DMS_BAND_CAPABILITY_BC_17: Band class 17. * @QMI_DMS_BAND_CAPABILITY_BC_18: Band class 18. * @QMI_DMS_BAND_CAPABILITY_BC_19: Band class 19. * @QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800: GSM DCS band. * @QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED: GSM Extended GSM band (900). * @QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY: GSM Primary GSM band (900). * @QMI_DMS_BAND_CAPABILITY_GSM_450: GSM 450 band. * @QMI_DMS_BAND_CAPABILITY_GSM_480: GSM 480 band. * @QMI_DMS_BAND_CAPABILITY_GSM_750: GSM 750 band. * @QMI_DMS_BAND_CAPABILITY_GSM_850: GSM 850 band. * @QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS: GSM railways band (900). * @QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900: GSM PCS band (1900). * @QMI_DMS_BAND_CAPABILITY_WCDMA_2100: WCDMA 2100 band (Europe, Japan, China). * @QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900: WCDMA PCS 1900 band (US). * @QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800: WCDMA DCS 1800 band (Europe, China). * @QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US: WCDMA 1700 band (US). * @QMI_DMS_BAND_CAPABILITY_WCDMA_850_US: WCDMA 850 band (US). * @QMI_DMS_BAND_CAPABILITY_WCDMA_800: QWCDMA 850 band (Japan). * @QMI_DMS_BAND_CAPABILITY_WCDMA_2600: WCDMA 2600 band (Europe). * @QMI_DMS_BAND_CAPABILITY_WCDMA_900: WCDMA 900 band (Europe, Japan). * @QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN: WCDMA 1700 band (Japan). * @QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN: WCDMA 850 band (Japan) * @QMI_DMS_BAND_CAPABILITY_WCDMA_1500: WCDMA 1500 band. * * Frequency band capabilities. * * This type is bit to bit compatible with #QmiNasBandPreference. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_BAND_CAPABILITY_BC_0_A_SYSTEM = 1 << 0, QMI_DMS_BAND_CAPABILITY_BC_0_B_SYSTEM = 1 << 1, QMI_DMS_BAND_CAPABILITY_BC_1_ALL_BLOCKS = 1 << 2, QMI_DMS_BAND_CAPABILITY_BC_2 = 1 << 3, QMI_DMS_BAND_CAPABILITY_BC_3_A_SYSTEM = 1 << 4, QMI_DMS_BAND_CAPABILITY_BC_4_ALL_BLOCKS = 1 << 5, QMI_DMS_BAND_CAPABILITY_BC_5_ALL_BLOCKS = 1 << 6, QMI_DMS_BAND_CAPABILITY_GSM_DCS_1800 = 1 << 7, QMI_DMS_BAND_CAPABILITY_GSM_900_EXTENDED = 1 << 8, QMI_DMS_BAND_CAPABILITY_GSM_900_PRIMARY = 1 << 9, QMI_DMS_BAND_CAPABILITY_BC_6 = 1 << 10, QMI_DMS_BAND_CAPABILITY_BC_7 = 1 << 11, QMI_DMS_BAND_CAPABILITY_BC_8 = 1 << 12, QMI_DMS_BAND_CAPABILITY_BC_9 = 1 << 13, QMI_DMS_BAND_CAPABILITY_BC_10 = 1 << 14, QMI_DMS_BAND_CAPABILITY_BC_11 = 1 << 15, QMI_DMS_BAND_CAPABILITY_GSM_450 = 1 << 16, QMI_DMS_BAND_CAPABILITY_GSM_480 = 1 << 17, QMI_DMS_BAND_CAPABILITY_GSM_750 = 1 << 18, QMI_DMS_BAND_CAPABILITY_GSM_850 = 1 << 19, QMI_DMS_BAND_CAPABILITY_GSM_900_RAILWAYS = 1 << 20, QMI_DMS_BAND_CAPABILITY_GSM_PCS_1900 = 1 << 21, QMI_DMS_BAND_CAPABILITY_WCDMA_2100 = 1 << 22, QMI_DMS_BAND_CAPABILITY_WCDMA_PCS_1900 = 1 << 23, QMI_DMS_BAND_CAPABILITY_WCDMA_DCS_1800 = 1 << 24, QMI_DMS_BAND_CAPABILITY_WCDMA_1700_US = 1 << 25, QMI_DMS_BAND_CAPABILITY_WCDMA_850_US = 1 << 26, QMI_DMS_BAND_CAPABILITY_WCDMA_800 = 1 << 27, QMI_DMS_BAND_CAPABILITY_BC_12 = 1 << 28, QMI_DMS_BAND_CAPABILITY_BC_14 = 1 << 29, /* Bit 30 reserved */ QMI_DMS_BAND_CAPABILITY_BC_15 = ((guint64) 1) << 31, /* Bits 32-47 reserved */ QMI_DMS_BAND_CAPABILITY_WCDMA_2600 = ((guint64) 1) << 48, QMI_DMS_BAND_CAPABILITY_WCDMA_900 = ((guint64) 1) << 49, QMI_DMS_BAND_CAPABILITY_WCDMA_1700_JAPAN = ((guint64) 1) << 50, /* Bits 51-55 reserved */ QMI_DMS_BAND_CAPABILITY_BC_16 = ((guint64) 1) << 56, QMI_DMS_BAND_CAPABILITY_BC_17 = ((guint64) 1) << 57, QMI_DMS_BAND_CAPABILITY_BC_18 = ((guint64) 1) << 58, QMI_DMS_BAND_CAPABILITY_BC_19 = ((guint64) 1) << 59, QMI_DMS_BAND_CAPABILITY_WCDMA_850_JAPAN = ((guint64) 1) << 60, QMI_DMS_BAND_CAPABILITY_WCDMA_1500 = ((guint64) 1) << 61, /* Bits 62-63 reserved */ } QmiDmsBandCapability; /** * QmiDmsLteBandCapability: * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1: LTE EUTRAN Band 1 * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2: LTE EUTRAN Band 2. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3: LTE EUTRAN Band 3. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4: LTE EUTRAN Band 4. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5: LTE EUTRAN Band 5. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6: LTE EUTRAN Band 6. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7: LTE EUTRAN Band 7. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8: LTE EUTRAN Band 8. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9: LTE EUTRAN Band 9. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10: LTE EUTRAN Band 10. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11: LTE EUTRAN Band 11. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12: LTE EUTRAN Band 12. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13: LTE EUTRAN Band 13. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14: LTE EUTRAN Band 14. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17: LTE EUTRAN Band 17. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18: LTE EUTRAN Band 18. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19: LTE EUTRAN Band 19. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20: LTE EUTRAN Band 20. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21: LTE EUTRAN Band 21. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24: LTE EUTRAN Band 24. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25: LTE EUTRAN Band 25. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26: LTE EUTRAN Band 26. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27: LTE EUTRAN Band 27. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28: LTE EUTRAN Band 28. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29: LTE EUTRAN Band 29. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30: LTE EUTRAN Band 30. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31: LTE EUTRAN Band 31. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32: LTE EUTRAN Band 32. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33: LTE EUTRAN Band 33. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34: LTE EUTRAN Band 34. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35: LTE EUTRAN Band 35. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36: LTE EUTRAN Band 36. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37: LTE EUTRAN Band 37. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38: LTE EUTRAN Band 38. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39: LTE EUTRAN Band 39. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40: LTE EUTRAN Band 40. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41: LTE EUTRAN Band 41. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42: LTE EUTRAN Band 42. * @QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43: LTE EUTRAN Band 43. * * LTE-specific Frequency bands. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_1 = 1 << 0, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_2 = 1 << 1, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_3 = 1 << 2, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_4 = 1 << 3, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_5 = 1 << 4, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_6 = 1 << 5, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_7 = 1 << 6, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_8 = 1 << 7, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_9 = 1 << 8, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_10 = 1 << 9, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_11 = 1 << 10, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_12 = 1 << 11, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_13 = 1 << 12, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_14 = 1 << 13, /* Bit 14-15 reserved */ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_17 = 1 << 16, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_18 = 1 << 17, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_19 = 1 << 18, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_20 = 1 << 19, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_21 = 1 << 20, /* Bit 21-22 reserved */ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_24 = 1 << 23, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_25 = 1 << 24, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_26 = 1 << 25, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_27 = 1 << 26, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_28 = 1 << 27, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29 = 1 << 28, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30 = 1 << 29, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31 = 1 << 30, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32 = ((guint64) 1) << 31, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33 = ((guint64) 1) << 32, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34 = ((guint64) 1) << 33, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35 = ((guint64) 1) << 34, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_36 = ((guint64) 1) << 35, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_37 = ((guint64) 1) << 36, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_38 = ((guint64) 1) << 37, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_39 = ((guint64) 1) << 38, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_40 = ((guint64) 1) << 39, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_41 = ((guint64) 1) << 40, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_42 = ((guint64) 1) << 41, QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_43 = ((guint64) 1) << 42 /* Bit 43-64 reserved */ } QmiDmsLteBandCapability; #endif /* _LIBQMI_GLIB_QMI_FLAGS64_DMS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-flags64-dsd.h000066400000000000000000000161101455567757300216140ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2019 Wang Jing * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #ifndef _LIBQMI_GLIB_QMI_FLAGS64_DSD_H_ #define _LIBQMI_GLIB_QMI_FLAGS64_DSD_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include "qmi-enums-dsd.h" #include /** * QmiDsdApnTypePreference: * @QMI_DSD_APN_TYPE_PREFERENCE_DEFAULT: Default/Internet traffic. * @QMI_DSD_APN_TYPE_PREFERENCE_IMS: IMS. * @QMI_DSD_APN_TYPE_PREFERENCE_MMS: Multimedia Messaging Service. * @QMI_DSD_APN_TYPE_PREFERENCE_DUN: Dial Up Network. * @QMI_DSD_APN_TYPE_PREFERENCE_SUPL: Secure User Plane Location. * @QMI_DSD_APN_TYPE_PREFERENCE_HIPRI: High Priority Mobile Data. * @QMI_DSD_APN_TYPE_PREFERENCE_FOTA: over the air administration. * @QMI_DSD_APN_TYPE_PREFERENCE_CBS: Carrier Branded Services. * @QMI_DSD_APN_TYPE_PREFERENCE_IA: Initial Attach. * @QMI_DSD_APN_TYPE_PREFERENCE_EMERGENCY: Emergency. * * APN type preference as a bitmask. * * Since: 1.26 */ typedef enum { /*< since=1.26 >*/ QMI_DSD_APN_TYPE_PREFERENCE_DEFAULT = ((guint64) 1) << QMI_DSD_APN_TYPE_DEFAULT, QMI_DSD_APN_TYPE_PREFERENCE_IMS = ((guint64) 1) << QMI_DSD_APN_TYPE_IMS, QMI_DSD_APN_TYPE_PREFERENCE_MMS = ((guint64) 1) << QMI_DSD_APN_TYPE_MMS, QMI_DSD_APN_TYPE_PREFERENCE_DUN = ((guint64) 1) << QMI_DSD_APN_TYPE_DUN, QMI_DSD_APN_TYPE_PREFERENCE_SUPL = ((guint64) 1) << QMI_DSD_APN_TYPE_SUPL, QMI_DSD_APN_TYPE_PREFERENCE_HIPRI = ((guint64) 1) << QMI_DSD_APN_TYPE_HIPRI, QMI_DSD_APN_TYPE_PREFERENCE_FOTA = ((guint64) 1) << QMI_DSD_APN_TYPE_FOTA, QMI_DSD_APN_TYPE_PREFERENCE_CBS = ((guint64) 1) << QMI_DSD_APN_TYPE_CBS, QMI_DSD_APN_TYPE_PREFERENCE_IA = ((guint64) 1) << QMI_DSD_APN_TYPE_IA, QMI_DSD_APN_TYPE_PREFERENCE_EMERGENCY = ((guint64) 1) << QMI_DSD_APN_TYPE_EMERGENCY, } QmiDsdApnTypePreference; /** * QmiDsdSoMask: * @QMI_DSD_3GPP_SO_MASK_WCDMA: WCDMA. * @QMI_DSD_3GPP_SO_MASK_HSDPA: HSDPA. * @QMI_DSD_3GPP_SO_MASK_HSUPA: HSUPA. * @QMI_DSD_3GPP_SO_MASK_HSDPAPLUS: HSDPAPLUS. * @QMI_DSD_3GPP_SO_MASK_DC_HSDPAPLUS: DC HSDPAPLUS. * @QMI_DSD_3GPP_SO_MASK_64_QAM: 64 QAM. * @QMI_DSD_3GPP_SO_MASK_HSPA: HSPA. * @QMI_DSD_3GPP_SO_MASK_GPRS: GPRS. * @QMI_DSD_3GPP_SO_MASK_EDGE: EDGE. * @QMI_DSD_3GPP_SO_MASK_GSM: GSM. * @QMI_DSD_3GPP_SO_MASK_S2B: S2B. * @QMI_DSD_3GPP_SO_MASK_LTE_LIMITED_SRVC: LTE Limited Service. * @QMI_DSD_3GPP_SO_MASK_LTE_FDD: LTE FDD. * @QMI_DSD_3GPP_SO_MASK_LTE_TDD: LTE TDD. * @QMI_DSD_3GPP_SO_MASK_TDSCDMA: TDSCDMA. * @QMI_DSD_3GPP_SO_MASK_DC_HSUPA: DC_HSUPA. * @QMI_DSD_3GPP_SO_MASK_LTE_CA_DL: LTE CA DL. * @QMI_DSD_3GPP_SO_MASK_LTE_CA_UL: LTE CA UL. * @QMI_DSD_3GPP_SO_MASK_S2B_LIMITED_SRVC: S2B Limited Service. * @QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G: 4.5G. * @QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G_PLUS: 4.5G+. * @QMI_DSD_3GPP2_SO_MASK_1X_IS95: 1X IS95. * @QMI_DSD_3GPP2_SO_MASK_1X_IS2000: 1X IS2000. * @QMI_DSD_3GPP2_SO_MASK_1X_IS2000_REL_A: 1X IS2000 REL A. * @QMI_DSD_3GPP2_SO_MASK_HDR_REV0_DPA: HDR REV0 DPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_REVA_DPA: HDR REVB DPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_REVB_DPA: HDR REVB DPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_REVA_MPA: HDR REVA MPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MPA: HDR REVB MPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_REVA_EMPA: HDR REVA EMPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_REVB_EMPA: HDR REVB EMPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MMPA: HDR REVB MMPA. * @QMI_DSD_3GPP2_SO_MASK_HDR_EVDO_FMC: HDR EVDO FMC. * @QMI_DSD_3GPP2_SO_MASK_1X_CS: 1X Circuit Switched. * @QMI_DSD_3GPP_SO_MASK_5G_TDD: 5G TDD. * @QMI_DSD_3GPP_SO_MASK_5G_SUB6: 5G SUB6. * @QMI_DSD_3GPP_SO_MASK_5G_MMWAVE: 5G MMWAVE. * @QMI_DSD_3GPP_SO_MASK_5G_NSA: 5G NSA. * @QMI_DSD_3GPP_SO_MASK_5G_SA: 5G SA. * * Service Option (SO) mask. * * Since: 1.32 */ typedef enum { /*< since=1.32 >*/ QMI_DSD_3GPP_SO_MASK_WCDMA = 1 << 0, QMI_DSD_3GPP_SO_MASK_HSDPA = 1 << 1, QMI_DSD_3GPP_SO_MASK_HSUPA = 1 << 2, QMI_DSD_3GPP_SO_MASK_HSDPAPLUS = 1 << 3, QMI_DSD_3GPP_SO_MASK_DC_HSDPAPLUS = 1 << 4, QMI_DSD_3GPP_SO_MASK_64_QAM = 1 << 5, QMI_DSD_3GPP_SO_MASK_HSPA = 1 << 6, QMI_DSD_3GPP_SO_MASK_GPRS = 1 << 7, QMI_DSD_3GPP_SO_MASK_EDGE = 1 << 8, QMI_DSD_3GPP_SO_MASK_GSM = 1 << 9, QMI_DSD_3GPP_SO_MASK_S2B = 1 << 10, QMI_DSD_3GPP_SO_MASK_LTE_LIMITED_SRVC = 1 << 11, QMI_DSD_3GPP_SO_MASK_LTE_FDD = 1 << 12, QMI_DSD_3GPP_SO_MASK_LTE_TDD = 1 << 13, QMI_DSD_3GPP_SO_MASK_TDSCDMA = 1 << 14, QMI_DSD_3GPP_SO_MASK_DC_HSUPA = 1 << 15, QMI_DSD_3GPP_SO_MASK_LTE_CA_DL = 1 << 16, QMI_DSD_3GPP_SO_MASK_LTE_CA_UL = 1 << 17, QMI_DSD_3GPP_SO_MASK_S2B_LIMITED_SRVC = 1 << 18, QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G = 1 << 19, QMI_DSD_3GPP_SO_MASK_FOUR_POINT_FIVE_G_PLUS = 1 << 20, QMI_DSD_3GPP2_SO_MASK_1X_IS95 = 1 << 24, QMI_DSD_3GPP2_SO_MASK_1X_IS2000 = 1 << 25, QMI_DSD_3GPP2_SO_MASK_1X_IS2000_REL_A = 1 << 26, QMI_DSD_3GPP2_SO_MASK_HDR_REV0_DPA = 1 << 27, QMI_DSD_3GPP2_SO_MASK_HDR_REVA_DPA = 1 << 28, QMI_DSD_3GPP2_SO_MASK_HDR_REVB_DPA = 1 << 29, QMI_DSD_3GPP2_SO_MASK_HDR_REVA_MPA = 1 << 30, QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MPA = ((guint64) 1) << 31, QMI_DSD_3GPP2_SO_MASK_HDR_REVA_EMPA = ((guint64) 1) << 32, QMI_DSD_3GPP2_SO_MASK_HDR_REVB_EMPA = ((guint64) 1) << 33, QMI_DSD_3GPP2_SO_MASK_HDR_REVB_MMPA = ((guint64) 1) << 34, QMI_DSD_3GPP2_SO_MASK_HDR_EVDO_FMC = ((guint64) 1) << 35, QMI_DSD_3GPP2_SO_MASK_1X_CS = ((guint64) 1) << 36, QMI_DSD_3GPP_SO_MASK_5G_TDD = ((guint64) 1) << 40, QMI_DSD_3GPP_SO_MASK_5G_SUB6 = ((guint64) 1) << 41, QMI_DSD_3GPP_SO_MASK_5G_MMWAVE = ((guint64) 1) << 42, QMI_DSD_3GPP_SO_MASK_5G_NSA = ((guint64) 1) << 43, QMI_DSD_3GPP_SO_MASK_5G_SA = ((guint64) 1) << 44, } QmiDsdSoMask; #endif /* _LIBQMI_GLIB_QMI_FLAGS64_DSD_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-flags64-loc.h000066400000000000000000000170431455567757300216250ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_FLAGS64_LOC_H_ #define _LIBQMI_GLIB_QMI_FLAGS64_LOC_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include /** * QmiLocEventRegistrationFlag: * @QMI_LOC_EVENT_REGISTRATION_FLAG_POSITION_REPORT: Position report. * @QMI_LOC_EVENT_REGISTRATION_FLAG_GNSS_SATELLITE_INFO: GNSS satellite info. * @QMI_LOC_EVENT_REGISTRATION_FLAG_NMEA: NMEA. * @QMI_LOC_EVENT_REGISTRATION_FLAG_NI_NOTIFY_VERIFY_REQUEST: NI Notify verify request. * @QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_TIME_REQUEST: Inject time request. * @QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_PREDICTED_ORBITS_REQUEST: Inject predicted orbits request. * @QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_POSITION_REQUEST: Inject position request. * @QMI_LOC_EVENT_REGISTRATION_FLAG_ENGINE_STATE: Engine state. * @QMI_LOC_EVENT_REGISTRATION_FLAG_FIX_SESSION_STATE: Fix session state. * @QMI_LOC_EVENT_REGISTRATION_FLAG_WIFI_REQUEST: WIFI request. * @QMI_LOC_EVENT_REGISTRATION_FLAG_SENSOR_STREAMING_READY_STATUS: Sensor streaming ready status. * @QMI_LOC_EVENT_REGISTRATION_FLAG_TIME_SYNC_REQUEST: Time sync request. * @QMI_LOC_EVENT_REGISTRATION_FLAG_SET_SPI_STREAMING_REPORT: Set SPI streaming report. * @QMI_LOC_EVENT_REGISTRATION_FLAG_LOCATION_SERVER_CONNECTION_REQUEST: Location server connection request. * @QMI_LOC_EVENT_REGISTRATION_FLAG_NI_GEOFENCE_NOTIFICATION: NI geofence notification. * @QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_GENERAL_ALERT: Geofence general alert. * @QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_BREACH_NOTIFICATION: Geofence breach notification. * @QMI_LOC_EVENT_REGISTRATION_FLAG_PEDOMETER_CONTROL: Pedometer control. * @QMI_LOC_EVENT_REGISTRATION_FLAG_MOTION_DATA_CONTROL: Motion data control. * * For which events to register the subscription. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_EVENT_REGISTRATION_FLAG_POSITION_REPORT = 1 << 0, QMI_LOC_EVENT_REGISTRATION_FLAG_GNSS_SATELLITE_INFO = 1 << 1, QMI_LOC_EVENT_REGISTRATION_FLAG_NMEA = 1 << 2, QMI_LOC_EVENT_REGISTRATION_FLAG_NI_NOTIFY_VERIFY_REQUEST = 1 << 3, QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_TIME_REQUEST = 1 << 4, QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_PREDICTED_ORBITS_REQUEST = 1 << 5, QMI_LOC_EVENT_REGISTRATION_FLAG_INJECT_POSITION_REQUEST = 1 << 6, QMI_LOC_EVENT_REGISTRATION_FLAG_ENGINE_STATE = 1 << 7, QMI_LOC_EVENT_REGISTRATION_FLAG_FIX_SESSION_STATE = 1 << 8, QMI_LOC_EVENT_REGISTRATION_FLAG_WIFI_REQUEST = 1 << 9, QMI_LOC_EVENT_REGISTRATION_FLAG_SENSOR_STREAMING_READY_STATUS = 1 << 10, QMI_LOC_EVENT_REGISTRATION_FLAG_TIME_SYNC_REQUEST = 1 << 11, QMI_LOC_EVENT_REGISTRATION_FLAG_SET_SPI_STREAMING_REPORT = 1 << 12, QMI_LOC_EVENT_REGISTRATION_FLAG_LOCATION_SERVER_CONNECTION_REQUEST = 1 << 13, QMI_LOC_EVENT_REGISTRATION_FLAG_NI_GEOFENCE_NOTIFICATION = 1 << 14, QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_GENERAL_ALERT = 1 << 15, QMI_LOC_EVENT_REGISTRATION_FLAG_GEOFENCE_BREACH_NOTIFICATION = 1 << 16, QMI_LOC_EVENT_REGISTRATION_FLAG_PEDOMETER_CONTROL = 1 << 17, QMI_LOC_EVENT_REGISTRATION_FLAG_MOTION_DATA_CONTROL = 1 << 18, } QmiLocEventRegistrationFlag; /** * QmiLocSensorDataUsage: * @QMI_LOC_SENSOR_DATA_USAGE_ACCELEROMETER_USED: Accelerometer used. * @QMI_LOC_SENSOR_DATA_USAGE_GYRO_USED: Gyro used. * @QMI_LOC_SENSOR_DATA_USAGE_AIDED_HEADING: Aided heading. * @QMI_LOC_SENSOR_DATA_USAGE_AIDED_SPEED: Aided speed. * @QMI_LOC_SENSOR_DATA_USAGE_AIDED_POSITION: Aided position. * @QMI_LOC_SENSOR_DATA_USAGE_AIDED_VELOCITY: Aided velocity. * * Which sensors where used and for which measurements. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_SENSOR_DATA_USAGE_ACCELEROMETER_USED = 1 << 0, QMI_LOC_SENSOR_DATA_USAGE_GYRO_USED = 1 << 1, QMI_LOC_SENSOR_DATA_USAGE_AIDED_HEADING = ((guint64) 1) << 32, QMI_LOC_SENSOR_DATA_USAGE_AIDED_SPEED = ((guint64) 1) << 33, QMI_LOC_SENSOR_DATA_USAGE_AIDED_POSITION = ((guint64) 1) << 34, QMI_LOC_SENSOR_DATA_USAGE_AIDED_VELOCITY = ((guint64) 1) << 35, } QmiLocSensorDataUsage; /** * QmiLocDeleteGnssData: * @QMI_LOC_DELETE_GNSS_DATA_GPS_SVDIR: GPS SV dir. * @QMI_LOC_DELETE_GNSS_DATA_GPS_SVSTEER: GPS SV steer. * @QMI_LOC_DELETE_GNSS_DATA_GPS_TIME: GPS time. * @QMI_LOC_DELETE_GNSS_DATA_GPS_ALM_CORR: GPS alm corr. * @QMI_LOC_DELETE_GNSS_DATA_GLO_SVDIR: GLONASS SV dir. * @QMI_LOC_DELETE_GNSS_DATA_GLO_SVSTEER: GLONASS SV steer. * @QMI_LOC_DELETE_GNSS_DATA_GLO_TIME: GLONASS time. * @QMI_LOC_DELETE_GNSS_DATA_GLO_ALM_CORR: GLONASS alm corr. * @QMI_LOC_DELETE_GNSS_DATA_SBAS_SVDIR: SBAS SV dir. * @QMI_LOC_DELETE_GNSS_DATA_SBAS_SVSTEER: SBAS SV steer. * @QMI_LOC_DELETE_GNSS_DATA_POSITION: Position. * @QMI_LOC_DELETE_GNSS_DATA_TIME: Time. * @QMI_LOC_DELETE_GNSS_DATA_IONO: Ionospheric data. * @QMI_LOC_DELETE_GNSS_DATA_UTC: UTC time. * @QMI_LOC_DELETE_GNSS_DATA_HEALTH: Health information. * @QMI_LOC_DELETE_GNSS_DATA_SADATA: SA data. * @QMI_LOC_DELETE_GNSS_DATA_RTI: RTI. * @QMI_LOC_DELETE_GNSS_DATA_SV_NO_EXIST: SV no exist. * @QMI_LOC_DELETE_GNSS_DATA_FREQ_BIAS_EST: Frequency bias estimation. * * Flags to use when deleting GNSS assistance data. * * Since 1.22 */ typedef enum { /*< since=1.22 >*/ QMI_LOC_DELETE_GNSS_DATA_GPS_SVDIR = 1 << 0, QMI_LOC_DELETE_GNSS_DATA_GPS_SVSTEER = 1 << 1, QMI_LOC_DELETE_GNSS_DATA_GPS_TIME = 1 << 2, QMI_LOC_DELETE_GNSS_DATA_GPS_ALM_CORR = 1 << 3, QMI_LOC_DELETE_GNSS_DATA_GLO_SVDIR = 1 << 4, QMI_LOC_DELETE_GNSS_DATA_GLO_SVSTEER = 1 << 5, QMI_LOC_DELETE_GNSS_DATA_GLO_TIME = 1 << 6, QMI_LOC_DELETE_GNSS_DATA_GLO_ALM_CORR = 1 << 7, QMI_LOC_DELETE_GNSS_DATA_SBAS_SVDIR = 1 << 8, QMI_LOC_DELETE_GNSS_DATA_SBAS_SVSTEER = 1 << 9, QMI_LOC_DELETE_GNSS_DATA_POSITION = 1 << 10, QMI_LOC_DELETE_GNSS_DATA_TIME = 1 << 11, QMI_LOC_DELETE_GNSS_DATA_IONO = 1 << 12, QMI_LOC_DELETE_GNSS_DATA_UTC = 1 << 13, QMI_LOC_DELETE_GNSS_DATA_HEALTH = 1 << 14, QMI_LOC_DELETE_GNSS_DATA_SADATA = 1 << 15, QMI_LOC_DELETE_GNSS_DATA_RTI = 1 << 16, QMI_LOC_DELETE_GNSS_DATA_SV_NO_EXIST = 1 << 17, QMI_LOC_DELETE_GNSS_DATA_FREQ_BIAS_EST = 1 << 18, } QmiLocDeleteGnssData; #endif /* _LIBQMI_GLIB_QMI_FLAGS64_LOC_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-flags64-nas.h000066400000000000000000000260361455567757300216330ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Google Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_ #define _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include /*****************************************************************************/ /* Helper enums for the 'QMI NAS Get System Selection Preference' * request/response */ /** * QmiNasBandPreference: * @QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM: Band class 0, A system. * @QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM: Band class 0, B system. * @QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS: Band class 1. * @QMI_NAS_BAND_PREFERENCE_BC_2: Band class 2. * @QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM: Band class 3, A system. * @QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS: Band class 4, all blocks. * @QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS: Band class 5, all blocks. * @QMI_NAS_BAND_PREFERENCE_BC_6: Band class 6. * @QMI_NAS_BAND_PREFERENCE_BC_7: Band class 7. * @QMI_NAS_BAND_PREFERENCE_BC_8: Band class 8. * @QMI_NAS_BAND_PREFERENCE_BC_9: Band class 9. * @QMI_NAS_BAND_PREFERENCE_BC_10: Band class 10. * @QMI_NAS_BAND_PREFERENCE_BC_11: Band class 11. * @QMI_NAS_BAND_PREFERENCE_BC_12: Band class 12. * @QMI_NAS_BAND_PREFERENCE_BC_14: Band class 14. * @QMI_NAS_BAND_PREFERENCE_BC_15: Band class 15. * @QMI_NAS_BAND_PREFERENCE_BC_16: Band class 16. * @QMI_NAS_BAND_PREFERENCE_BC_17: Band class 17. * @QMI_NAS_BAND_PREFERENCE_BC_18: Band class 18. * @QMI_NAS_BAND_PREFERENCE_BC_19: Band class 19. * @QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800: GSM DCS 1800 band. * @QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED: Extended GSM 900 band. * @QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY: Primary GSM 900 band. * @QMI_NAS_BAND_PREFERENCE_GSM_450: GSM 450. * @QMI_NAS_BAND_PREFERENCE_GSM_480: GSM 480. * @QMI_NAS_BAND_PREFERENCE_GSM_750: GSM 750. * @QMI_NAS_BAND_PREFERENCE_GSM_850: GSM 850. * @QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS: GSM 900 (Railways). * @QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900: GSM 1900. * @QMI_NAS_BAND_PREFERENCE_WCDMA_2100: WCDMA 2100. * @QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900: WCDMA PCS 1900. * @QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800: WCDMA DCS 1800. * @QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US: WCDMA 1700 (U.S.). * @QMI_NAS_BAND_PREFERENCE_WCDMA_850_US: WCDMA 850. * @QMI_NAS_BAND_PREFERENCE_WCDMA_800: WCDMA 800. * @QMI_NAS_BAND_PREFERENCE_WCDMA_2600: WCDMA 2600. * @QMI_NAS_BAND_PREFERENCE_WCDMA_900: WCDMA 900. * @QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN: WCDMA 1700 (Japan). * @QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN: WCDMA 850 (Japan). Since 1.22. * @QMI_NAS_BAND_PREFERENCE_WCDMA_1500: WCDMA 1500. Since 1.22. * * Flags to specify frequency band preferences. * * This type is bit to bit compatible with #QmiDmsBandCapability. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_BAND_PREFERENCE_BC_0_A_SYSTEM = 1 << 0, QMI_NAS_BAND_PREFERENCE_BC_0_B_SYSTEM = 1 << 1, QMI_NAS_BAND_PREFERENCE_BC_1_ALL_BLOCKS = 1 << 2, QMI_NAS_BAND_PREFERENCE_BC_2 = 1 << 3, QMI_NAS_BAND_PREFERENCE_BC_3_A_SYSTEM = 1 << 4, QMI_NAS_BAND_PREFERENCE_BC_4_ALL_BLOCKS = 1 << 5, QMI_NAS_BAND_PREFERENCE_BC_5_ALL_BLOCKS = 1 << 6, QMI_NAS_BAND_PREFERENCE_GSM_DCS_1800 = 1 << 7, QMI_NAS_BAND_PREFERENCE_GSM_900_EXTENDED = 1 << 8, QMI_NAS_BAND_PREFERENCE_GSM_900_PRIMARY = 1 << 9, QMI_NAS_BAND_PREFERENCE_BC_6 = 1 << 10, QMI_NAS_BAND_PREFERENCE_BC_7 = 1 << 11, QMI_NAS_BAND_PREFERENCE_BC_8 = 1 << 12, QMI_NAS_BAND_PREFERENCE_BC_9 = 1 << 13, QMI_NAS_BAND_PREFERENCE_BC_10 = 1 << 14, QMI_NAS_BAND_PREFERENCE_BC_11 = 1 << 15, QMI_NAS_BAND_PREFERENCE_GSM_450 = 1 << 16, QMI_NAS_BAND_PREFERENCE_GSM_480 = 1 << 17, QMI_NAS_BAND_PREFERENCE_GSM_750 = 1 << 18, QMI_NAS_BAND_PREFERENCE_GSM_850 = 1 << 19, QMI_NAS_BAND_PREFERENCE_GSM_900_RAILWAYS = 1 << 20, QMI_NAS_BAND_PREFERENCE_GSM_PCS_1900 = 1 << 21, QMI_NAS_BAND_PREFERENCE_WCDMA_2100 = 1 << 22, QMI_NAS_BAND_PREFERENCE_WCDMA_PCS_1900 = 1 << 23, QMI_NAS_BAND_PREFERENCE_WCDMA_DCS_1800 = 1 << 24, QMI_NAS_BAND_PREFERENCE_WCDMA_1700_US = 1 << 25, QMI_NAS_BAND_PREFERENCE_WCDMA_850_US = 1 << 26, QMI_NAS_BAND_PREFERENCE_WCDMA_800 = 1 << 27, QMI_NAS_BAND_PREFERENCE_BC_12 = 1 << 28, QMI_NAS_BAND_PREFERENCE_BC_14 = 1 << 29, /* Bit 30 reserved */ QMI_NAS_BAND_PREFERENCE_BC_15 = ((guint64) 1) << 31, /* Bits 32-47 reserved */ QMI_NAS_BAND_PREFERENCE_WCDMA_2600 = ((guint64) 1) << 48, QMI_NAS_BAND_PREFERENCE_WCDMA_900 = ((guint64) 1) << 49, QMI_NAS_BAND_PREFERENCE_WCDMA_1700_JAPAN = ((guint64) 1) << 50, /* Bits 51-55 reserved */ QMI_NAS_BAND_PREFERENCE_BC_16 = ((guint64) 1) << 56, QMI_NAS_BAND_PREFERENCE_BC_17 = ((guint64) 1) << 57, QMI_NAS_BAND_PREFERENCE_BC_18 = ((guint64) 1) << 58, QMI_NAS_BAND_PREFERENCE_BC_19 = ((guint64) 1) << 59, QMI_NAS_BAND_PREFERENCE_WCDMA_850_JAPAN = ((guint64) 1) << 60, QMI_NAS_BAND_PREFERENCE_WCDMA_1500 = ((guint64) 1) << 61, /* Bits 62-63 reserved */ } QmiNasBandPreference; /** * QmiNasLteBandPreference: * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1: LTE EUTRAN Band 1 * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2: LTE EUTRAN Band 2. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3: LTE EUTRAN Band 3. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4: LTE EUTRAN Band 4. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5: LTE EUTRAN Band 5. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6: LTE EUTRAN Band 6. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7: LTE EUTRAN Band 7. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8: LTE EUTRAN Band 8. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9: LTE EUTRAN Band 9. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10: LTE EUTRAN Band 10. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11: LTE EUTRAN Band 11. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12: LTE EUTRAN Band 12. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13: LTE EUTRAN Band 13. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14: LTE EUTRAN Band 14. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17: LTE EUTRAN Band 17. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18: LTE EUTRAN Band 18. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19: LTE EUTRAN Band 19. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20: LTE EUTRAN Band 20. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21: LTE EUTRAN Band 21. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24: LTE EUTRAN Band 24. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25: LTE EUTRAN Band 25. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26: LTE EUTRAN Band 26. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27: LTE EUTRAN Band 27. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28: LTE EUTRAN Band 28. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29: LTE EUTRAN Band 29. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30: LTE EUTRAN Band 30. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31: LTE EUTRAN Band 31. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32: LTE EUTRAN Band 32. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33: LTE EUTRAN Band 33. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34: LTE EUTRAN Band 34. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35: LTE EUTRAN Band 35. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36: LTE EUTRAN Band 36. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37: LTE EUTRAN Band 37. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38: LTE EUTRAN Band 38. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39: LTE EUTRAN Band 39. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40: LTE EUTRAN Band 40. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41: LTE EUTRAN Band 41. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42: LTE EUTRAN Band 42. * @QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43: LTE EUTRAN Band 43. * * Flags to specify LTE-specific frequency band preferences. * * Since: 1.0 */ typedef enum { /*< since=1.0 >*/ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_1 = 1 << 0, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_2 = 1 << 1, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_3 = 1 << 2, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_4 = 1 << 3, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_5 = 1 << 4, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_6 = 1 << 5, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_7 = 1 << 6, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_8 = 1 << 7, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_9 = 1 << 8, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_10 = 1 << 9, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_11 = 1 << 10, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_12 = 1 << 11, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_13 = 1 << 12, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_14 = 1 << 13, /* Bit 14-15 reserved */ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_17 = 1 << 16, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_18 = 1 << 17, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_19 = 1 << 18, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_20 = 1 << 19, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_21 = 1 << 20, /* Bit 21-22 reserved */ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_24 = 1 << 23, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_25 = 1 << 24, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_26 = 1 << 25, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_27 = 1 << 26, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_28 = 1 << 27, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29 = 1 << 28, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30 = 1 << 29, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31 = 1 << 30, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32 = ((guint64) 1) << 31, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33 = ((guint64) 1) << 32, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34 = ((guint64) 1) << 33, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35 = ((guint64) 1) << 34, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_36 = ((guint64) 1) << 35, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_37 = ((guint64) 1) << 36, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_38 = ((guint64) 1) << 37, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_39 = ((guint64) 1) << 38, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_40 = ((guint64) 1) << 39, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_41 = ((guint64) 1) << 40, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_42 = ((guint64) 1) << 41, QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_43 = ((guint64) 1) << 42 /* Bit 43-64 reserved */ } QmiNasLteBandPreference; #endif /* _LIBQMI_GLIB_QMI_FLAGS64_NAS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-flags64-wds.h000066400000000000000000000037601455567757300216460ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2021 Google Inc. */ #ifndef _LIBQMI_GLIB_QMI_FLAGS64_WDS_H_ #define _LIBQMI_GLIB_QMI_FLAGS64_WDS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include /** * QmiWdsApnTypeMask: * @QMI_WDS_APN_TYPE_MASK_DEFAULT: Default/Internet traffic. * @QMI_WDS_APN_TYPE_MASK_IMS: IP Multimedia Subsystem. * @QMI_WDS_APN_TYPE_MASK_MMS: Multimedia Messaging Service. * @QMI_WDS_APN_TYPE_MASK_FOTA: over the air administration. * @QMI_WDS_APN_TYPE_MASK_IA: Initial Attach. * @QMI_WDS_APN_TYPE_MASK_EMERGENCY: Emergency. * * APN type as a bitmask. * * Since: 1.30 */ typedef enum { /*< since=1.30 >*/ QMI_WDS_APN_TYPE_MASK_DEFAULT = ((guint64) 1) << 0, QMI_WDS_APN_TYPE_MASK_IMS = ((guint64) 1) << 1, QMI_WDS_APN_TYPE_MASK_MMS = ((guint64) 1) << 2, QMI_WDS_APN_TYPE_MASK_FOTA = ((guint64) 1) << 6, QMI_WDS_APN_TYPE_MASK_IA = ((guint64) 1) << 8, QMI_WDS_APN_TYPE_MASK_EMERGENCY = ((guint64) 1) << 9, } QmiWdsApnTypeMask; #endif /* _LIBQMI_GLIB_QMI_FLAGS64_WDS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-helpers.c000066400000000000000000000624641455567757300212500ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2020 Dan Williams * Copyright (C) 2012-2020 Aleksander Morgado */ #include #define _GNU_SOURCE #include #include #include #include #include #include #include "qmi-helpers.h" #include "qmi-error-types.h" /*****************************************************************************/ gchar * qmi_helpers_str_hex (gconstpointer mem, gsize size, gchar delimiter) { const guint8 *data = mem; gsize i; gsize j; gsize new_str_length; gchar *new_str; /* Get new string length. If input string has N bytes, we need: * - 1 byte for last NUL char * - 2N bytes for hexadecimal char representation of each byte... * - N-1 bytes for the separator ':' * So... a total of (1+2N+N-1) = 3N bytes are needed... */ new_str_length = 3 * size; /* Allocate memory for new array and initialize contents to NUL */ new_str = g_malloc0 (new_str_length); /* Print hexadecimal representation of each byte... */ for (i = 0, j = 0; i < size; i++, j += 3) { /* Print character in output string... */ snprintf (&new_str[j], 3, "%02X", data[i]); /* And if needed, add separator */ if (i != (size - 1) ) new_str[j + 2] = delimiter; } /* Set output string */ return new_str; } /*****************************************************************************/ gboolean qmi_helpers_check_user_allowed (uid_t uid, GError **error) { #ifndef QMI_USERNAME_ENABLED if (uid == 0) return TRUE; #else # ifndef QMI_USERNAME # error QMI username not defined # endif struct passwd *expected_usr = NULL; /* Root user is always allowed, regardless of the specified QMI_USERNAME */ if (uid == 0) return TRUE; expected_usr = getpwnam (QMI_USERNAME); if (!expected_usr) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Not enough privileges (unknown username %s)", QMI_USERNAME); return FALSE; } if (uid == expected_usr->pw_uid) return TRUE; #endif g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Not enough privileges"); return FALSE; } /*****************************************************************************/ gboolean qmi_helpers_string_utf8_validate_printable (const guint8 *utf8, gsize utf8_len) { const gchar *p; const gchar *init; g_assert (utf8); g_assert (utf8_len); /* Ignore all trailing NUL bytes, if any */ while ((utf8_len > 0) && (utf8[utf8_len - 1] == '\0')) utf8_len--; /* An empty string */ if (!utf8_len) return TRUE; /* First check if valid UTF-8 */ init = (const gchar *)utf8; if (!g_utf8_validate (init, utf8_len, NULL)) return FALSE; /* Then check if contents are printable. If one is not, * check fails. */ for (p = init; (gsize)(p - init) < utf8_len; p = g_utf8_next_char (p)) { gunichar unichar; /* Explicitly allow CR and LF even if they're control characters, given * that NMEA traces reported via QMI LOC indications seem to have these * suffixed. * Also, explicitly allow TAB as some manufacturers seem to include it * e.g. in model info strings. */ if (*p == '\r' || *p == '\n' || *p == '\t') continue; unichar = g_utf8_get_char (p); if (!g_unichar_isprint (unichar)) return FALSE; } return TRUE; } /*****************************************************************************/ /* GSM 03.38 encoding conversion stuff, imported from ModemManager */ #define GSM_DEF_ALPHABET_SIZE 128 #define GSM_EXT_ALPHABET_SIZE 10 typedef struct GsmUtf8Mapping { gchar chars[3]; guint8 len; guint8 gsm; /* only used for extended GSM charset */ } GsmUtf8Mapping; #define ONE(a) { {a, 0x00, 0x00}, 1, 0 } #define TWO(a, b) { {a, b, 0x00}, 2, 0 } /* * Mapping from GSM default alphabet to UTF-8. * * ETSI GSM 03.38, version 6.0.1, section 6.2.1; Default alphabet. Mapping to UCS-2. * Mapping according to http://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT */ static const GsmUtf8Mapping gsm_def_utf8_alphabet[GSM_DEF_ALPHABET_SIZE] = { /* @ £ $ ¥ */ ONE(0x40), TWO(0xc2, 0xa3), ONE(0x24), TWO(0xc2, 0xa5), /* è é ù ì */ TWO(0xc3, 0xa8), TWO(0xc3, 0xa9), TWO(0xc3, 0xb9), TWO(0xc3, 0xac), /* ò Ç \n Ø */ TWO(0xc3, 0xb2), TWO(0xc3, 0x87), ONE(0x0a), TWO(0xc3, 0x98), /* ø \r Å å */ TWO(0xc3, 0xb8), ONE(0x0d), TWO(0xc3, 0x85), TWO(0xc3, 0xa5), /* Δ _ Φ Γ */ TWO(0xce, 0x94), ONE(0x5f), TWO(0xce, 0xa6), TWO(0xce, 0x93), /* Λ Ω Π Ψ */ TWO(0xce, 0x9b), TWO(0xce, 0xa9), TWO(0xce, 0xa0), TWO(0xce, 0xa8), /* Σ Θ Ξ Escape Code */ TWO(0xce, 0xa3), TWO(0xce, 0x98), TWO(0xce, 0x9e), ONE(0xa0), /* Æ æ ß É */ TWO(0xc3, 0x86), TWO(0xc3, 0xa6), TWO(0xc3, 0x9f), TWO(0xc3, 0x89), /* ' ' ! " # */ ONE(0x20), ONE(0x21), ONE(0x22), ONE(0x23), /* ¤ % & ' */ TWO(0xc2, 0xa4), ONE(0x25), ONE(0x26), ONE(0x27), /* ( ) * + */ ONE(0x28), ONE(0x29), ONE(0x2a), ONE(0x2b), /* , - . / */ ONE(0x2c), ONE(0x2d), ONE(0x2e), ONE(0x2f), /* 0 1 2 3 */ ONE(0x30), ONE(0x31), ONE(0x32), ONE(0x33), /* 4 5 6 7 */ ONE(0x34), ONE(0x35), ONE(0x36), ONE(0x37), /* 8 9 : ; */ ONE(0x38), ONE(0x39), ONE(0x3a), ONE(0x3b), /* < = > ? */ ONE(0x3c), ONE(0x3d), ONE(0x3e), ONE(0x3f), /* ¡ A B C */ TWO(0xc2, 0xa1), ONE(0x41), ONE(0x42), ONE(0x43), /* D E F G */ ONE(0x44), ONE(0x45), ONE(0x46), ONE(0x47), /* H I J K */ ONE(0x48), ONE(0x49), ONE(0x4a), ONE(0x4b), /* L M N O */ ONE(0x4c), ONE(0x4d), ONE(0x4e), ONE(0x4f), /* P Q R S */ ONE(0x50), ONE(0x51), ONE(0x52), ONE(0x53), /* T U V W */ ONE(0x54), ONE(0x55), ONE(0x56), ONE(0x57), /* X Y Z Ä */ ONE(0x58), ONE(0x59), ONE(0x5a), TWO(0xc3, 0x84), /* Ö Ñ Ü § */ TWO(0xc3, 0x96), TWO(0xc3, 0x91), TWO(0xc3, 0x9c), TWO(0xc2, 0xa7), /* ¿ a b c */ TWO(0xc2, 0xbf), ONE(0x61), ONE(0x62), ONE(0x63), /* d e f g */ ONE(0x64), ONE(0x65), ONE(0x66), ONE(0x67), /* h i j k */ ONE(0x68), ONE(0x69), ONE(0x6a), ONE(0x6b), /* l m n o */ ONE(0x6c), ONE(0x6d), ONE(0x6e), ONE(0x6f), /* p q r s */ ONE(0x70), ONE(0x71), ONE(0x72), ONE(0x73), /* t u v w */ ONE(0x74), ONE(0x75), ONE(0x76), ONE(0x77), /* x y z ä */ ONE(0x78), ONE(0x79), ONE(0x7a), TWO(0xc3, 0xa4), /* ö ñ ü à */ TWO(0xc3, 0xb6), TWO(0xc3, 0xb1), TWO(0xc3, 0xbc), TWO(0xc3, 0xa0) }; static guint8 gsm_def_char_to_utf8 (const guint8 gsm, guint8 *out_utf8) { if (gsm >= GSM_DEF_ALPHABET_SIZE) return 0; memcpy (out_utf8, &gsm_def_utf8_alphabet[gsm].chars[0], gsm_def_utf8_alphabet[gsm].len); return gsm_def_utf8_alphabet[gsm].len; } #define EONE(a, g) { {a, 0x00, 0x00}, 1, g } #define ETHR(a, b, c, g) { {a, b, c}, 3, g } /* Mapping from GSM extended alphabet to UTF-8 */ static const GsmUtf8Mapping gsm_ext_utf8_alphabet[GSM_EXT_ALPHABET_SIZE] = { /* form feed ^ { } */ EONE(0x0c, 0x0a), EONE(0x5e, 0x14), EONE(0x7b, 0x28), EONE(0x7d, 0x29), /* \ [ ~ ] */ EONE(0x5c, 0x2f), EONE(0x5b, 0x3c), EONE(0x7e, 0x3d), EONE(0x5d, 0x3e), /* | € */ EONE(0x7c, 0x40), ETHR(0xe2, 0x82, 0xac, 0x65) }; #define GSM_ESCAPE_CHAR 0x1b static guint8 gsm_ext_char_to_utf8 (const guint8 gsm, guint8 *out_utf8) { int i; for (i = 0; i < GSM_EXT_ALPHABET_SIZE; i++) { if (gsm == gsm_ext_utf8_alphabet[i].gsm) { memcpy (out_utf8, &gsm_ext_utf8_alphabet[i].chars[0], gsm_ext_utf8_alphabet[i].len); return gsm_ext_utf8_alphabet[i].len; } } return 0; } static guint8 * charset_gsm_unpack (const guint8 *gsm, guint32 num_septets, guint8 start_offset, /* in _bits_ */ gsize *out_unpacked_len) { GByteArray *unpacked; guint i; unpacked = g_byte_array_sized_new (num_septets + 1); for (i = 0; i < num_septets; i++) { guint8 bits_here, bits_in_next, octet, offset, c; guint32 start_bit; start_bit = start_offset + (i * 7); /* Overall bit offset of char in buffer */ offset = start_bit % 8; /* Offset to start of char in this byte */ bits_here = offset ? (8 - offset) : 7; bits_in_next = 7 - bits_here; /* Grab bits in the current byte */ octet = gsm[start_bit / 8]; c = (octet >> offset) & (0xFF >> (8 - bits_here)); /* Grab any bits that spilled over to next byte */ if (bits_in_next) { octet = gsm[(start_bit / 8) + 1]; c |= (octet & (0xFF >> (8 - bits_in_next))) << bits_here; } g_byte_array_append (unpacked, &c, 1); } *out_unpacked_len = unpacked->len; return g_byte_array_free (unpacked, FALSE); } gchar * qmi_helpers_string_utf8_from_gsm7 (const guint8 *gsm_packed, gsize gsm_packed_len) { GByteArray *utf8; guint8 *gsm_unpacked; gsize gsm_unpacked_len; gsize i; /* unpack operation needs input length in SEPTETS */ gsm_unpacked = charset_gsm_unpack (gsm_packed, gsm_packed_len * 8 / 7, 0, &gsm_unpacked_len); /* worst case initial length */ utf8 = g_byte_array_sized_new (gsm_unpacked_len * 2 + 1); for (i = 0; i < gsm_unpacked_len; i++) { guint8 uchars[4]; guint8 ulen; /* * 0x00 is NULL (when followed only by 0x00 up to the * end of (fixed byte length) message, possibly also up to * FORM FEED. But 0x00 is also the code for COMMERCIAL AT * when some other character (CARRIAGE RETURN if nothing else) * comes after the 0x00. * http://unicode.org/Public/MAPPINGS/ETSI/GSM0338.TXT * * So, if we find a '@' (0x00) and all the next chars after that * are also 0x00, we can consider the string finished already. */ if (gsm_unpacked[i] == 0x00) { gsize j; for (j = i + 1; j < gsm_unpacked_len; j++) { if (gsm_unpacked[j] != 0x00) break; } if (j == gsm_unpacked_len) break; } if (gsm_unpacked[i] == GSM_ESCAPE_CHAR) { /* Extended alphabet, decode next char */ ulen = gsm_ext_char_to_utf8 (gsm_unpacked[i+1], uchars); if (ulen) i += 1; } else { /* Default alphabet */ ulen = gsm_def_char_to_utf8 (gsm_unpacked[i], uchars); } /* Invalid GSM-7, abort */ if (!ulen) { g_free (gsm_unpacked); g_byte_array_unref (utf8); return NULL; } g_byte_array_append (utf8, &uchars[0], ulen); } g_byte_array_append (utf8, (guint8 *) "\0", 1); /* NUL terminator */ g_free (gsm_unpacked); return (gchar *) g_byte_array_free (utf8, FALSE); } /*****************************************************************************/ gchar * qmi_helpers_string_utf8_from_ucs2le (const guint8 *ucs2le, gsize ucs2le_len) { gsize ucs2he_nchars; g_autofree guint16 *ucs2he = NULL; /* UCS2 data length given in bytes must be multiple of 2 */ if (ucs2le_len % 2 != 0) return NULL; /* Convert length from bytes to number of ucs2 characters */ ucs2he_nchars = ucs2le_len / 2; /* We'll attempt to convert UCS2 to UTF-8, using GLib's support to convert * from UTF-16 to UTF-8 (given that UCS2 is a subset of UTF-16). In order * to do so, we need the input string in "host endian", so if we're in a * BE system (where host endian is not little endian), we do an explicit * conversion. * * We don't want to use g_convert() because that would mean requiring * full iconv() support in the system. * * We're using an extra allocation always because we need to increase * alignment (guint8 -> (guint16)gunichar2) */ ucs2he = g_new (guint16, ucs2he_nchars); g_assert (sizeof (guint16) * ucs2he_nchars == ucs2le_len); memcpy (ucs2he, ucs2le, ucs2le_len); #if G_BYTE_ORDER == G_BIG_ENDIAN { guint i; for (i = 0; i < ucs2he_nchars; i++) ucs2he[i] = GUINT16_FROM_LE (ucs2he[i]); } #endif return g_utf16_to_utf8 ((const gunichar2 *)ucs2he, ucs2he_nchars, NULL, NULL, NULL); } /*****************************************************************************/ static gchar * helpers_get_usb_driver (const gchar *device_basename) { static const gchar *subsystems[] = { "usbmisc", "usb" }; guint i; gchar *driver = NULL; for (i = 0; !driver && i < G_N_ELEMENTS (subsystems); i++) { gchar *tmp; gchar *path; /* driver sysfs can be built directly using subsystem and name; e.g. for subsystem * usbmisc and name cdc-wdm0: * $ realpath /sys/class/usbmisc/cdc-wdm0/device/driver * /sys/bus/usb/drivers/qmi_wwan */ tmp = g_strdup_printf ("/sys/class/%s/%s/device/driver", subsystems[i], device_basename); path = realpath (tmp, NULL); g_free (tmp); if (!path) continue; driver = g_path_get_basename (path); g_free (path); } return driver; } QmiHelpersTransportType qmi_helpers_get_transport_type (const gchar *path, GError **error) { g_autofree gchar *device_basename = NULL; g_autofree gchar *usb_driver = NULL; g_autofree gchar *wwan_sysfs_path = NULL; g_autofree gchar *wwan_type_sysfs_path = NULL; g_autofree gchar *smdpkt_sysfs_path = NULL; g_autofree gchar *rpmsg_sysfs_path = NULL; gchar wwan_type[16] = { 0 }; device_basename = qmi_helpers_get_devname (path, error); if (!device_basename) return QMI_HELPERS_TRANSPORT_TYPE_UNKNOWN; /* Most likely case, we have a USB driver */ usb_driver = helpers_get_usb_driver (device_basename); if (usb_driver) { if (!g_strcmp0 (usb_driver, "cdc_mbim")) return QMI_HELPERS_TRANSPORT_TYPE_MBIM; if (!g_strcmp0 (usb_driver, "qmi_wwan")) return QMI_HELPERS_TRANSPORT_TYPE_QMUX; g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unexpected usb driver detected: %s", usb_driver); return QMI_HELPERS_TRANSPORT_TYPE_UNKNOWN; } /* WWAN devices have a type attribute or protocol in their name */ wwan_sysfs_path = g_strdup_printf ("/sys/class/wwan/%s", device_basename); if (g_file_test (wwan_sysfs_path, G_FILE_TEST_EXISTS)) { wwan_type_sysfs_path = g_strdup_printf ("/sys/class/wwan/%s/type", device_basename); if (qmi_helpers_read_sysfs_file (wwan_type_sysfs_path, wwan_type, sizeof (wwan_type) - 1, NULL)) { g_strstrip (wwan_type); if (!g_strcmp0 (wwan_type, "QMI")) return QMI_HELPERS_TRANSPORT_TYPE_QMUX; if (!g_strcmp0 (wwan_type, "MBIM")) return QMI_HELPERS_TRANSPORT_TYPE_MBIM; } else { /* "type" attribute exists only on Linux 5.14+, fall back to device name */ if (g_strrstr (device_basename, "QMI")) return QMI_HELPERS_TRANSPORT_TYPE_QMUX; if (g_strrstr (device_basename, "MBIM")) return QMI_HELPERS_TRANSPORT_TYPE_MBIM; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unsupported wwan port"); return QMI_HELPERS_TRANSPORT_TYPE_UNKNOWN; } /* On Android systems we get access to the QMI control port through * virtual smdcntl devices in the smdpkt subsystem. */ smdpkt_sysfs_path = g_strdup_printf ("/sys/class/smdpkt/%s", device_basename); if (g_file_test (smdpkt_sysfs_path, G_FILE_TEST_EXISTS)) return QMI_HELPERS_TRANSPORT_TYPE_QMUX; /* On mainline kernels this control port is provided by rpmsg */ rpmsg_sysfs_path = g_strdup_printf ("/sys/class/rpmsg/%s", device_basename); if (g_file_test (rpmsg_sysfs_path, G_FILE_TEST_EXISTS)) return QMI_HELPERS_TRANSPORT_TYPE_QMUX; /* Allow libqmi to connect directly to a unix domain socket with a specific file name */ if (g_strrstr (device_basename, QMI_QMUX_SOCKET_FILE_NAME)) return QMI_HELPERS_TRANSPORT_TYPE_QMUX; g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unexpected port subsystem"); return QMI_HELPERS_TRANSPORT_TYPE_UNKNOWN; } gchar * qmi_helpers_get_devpath (const gchar *cdc_wdm_path, GError **error) { gchar *aux; if (!g_file_test (cdc_wdm_path, G_FILE_TEST_IS_SYMLINK)) return g_strdup (cdc_wdm_path); aux = realpath (cdc_wdm_path, NULL); if (!aux) { int saved_errno = errno; g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Couldn't get realpath: %s", g_strerror (saved_errno)); return NULL; } return aux; } gchar * qmi_helpers_get_devname (const gchar *cdc_wdm_path, GError **error) { gchar *aux; gchar *devname = NULL; aux = qmi_helpers_get_devpath (cdc_wdm_path, error); if (aux) { devname = g_path_get_basename (aux); g_free (aux); } return devname; } gboolean qmi_helpers_read_sysfs_file (const gchar *sysfs_path, gchar *out_value, guint max_read_size, GError **error) { FILE *f; gboolean status = FALSE; if (!(f = fopen (sysfs_path, "r"))) { g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno), "Failed to open sysfs file '%s': %s", sysfs_path, g_strerror (errno)); goto out; } if (fread (out_value, 1, max_read_size, f) == 0) { g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno), "Failed to read from sysfs file '%s': %s", sysfs_path, g_strerror (errno)); goto out; } status = TRUE; out: if (f) fclose (f); return status; } gboolean qmi_helpers_write_sysfs_file (const gchar *sysfs_path, const gchar *value, GError **error) { gboolean status = FALSE; FILE *f; guint value_len; if (!(f = fopen (sysfs_path, "w"))) { g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno), "Failed to open sysfs file '%s' for R/W: %s", sysfs_path, g_strerror (errno)); goto out; } /* we require unbuffered so that we get errors on the fwrite() */ setvbuf (f, NULL, _IONBF, 0); value_len = strlen (value); if ((fwrite (value, 1, value_len, f) != value_len) || ferror (f)) { g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno), "Failed to write to sysfs file '%s': %s", sysfs_path, g_strerror (errno)); goto out; } status = TRUE; out: if (f) fclose (f); return status; } /******************************************************************************/ gboolean qmi_helpers_list_links (GFile *sysfs_file, GCancellable *cancellable, GPtrArray *previous_links, GPtrArray **out_links, GError **error) { g_autofree gchar *sysfs_path = NULL; g_autoptr(GFileEnumerator) direnum = NULL; g_autoptr(GPtrArray) links = NULL; direnum = g_file_enumerate_children (sysfs_file, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NONE, cancellable, error); if (!direnum) return FALSE; sysfs_path = g_file_get_path (sysfs_file); links = g_ptr_array_new_with_free_func (g_free); while (TRUE) { GFileInfo *info; g_autofree gchar *filename = NULL; g_autofree gchar *link_path = NULL; g_autofree gchar *real_path = NULL; g_autofree gchar *basename = NULL; if (!g_file_enumerator_iterate (direnum, &info, NULL, cancellable, error)) return FALSE; if (!info) break; filename = g_file_info_get_attribute_as_string (info, G_FILE_ATTRIBUTE_STANDARD_NAME); if (!filename || !g_str_has_prefix (filename, "upper_")) continue; link_path = g_strdup_printf ("%s/%s", sysfs_path, filename); real_path = realpath (link_path, NULL); if (!real_path) continue; basename = g_path_get_basename (real_path); /* skip interface if it was already known */ if (previous_links && g_ptr_array_find_with_equal_func (previous_links, basename, g_str_equal, NULL)) continue; g_ptr_array_add (links, g_steal_pointer (&basename)); } if (!links || !links->len) { *out_links = NULL; return TRUE; } g_ptr_array_sort (links, (GCompareFunc) g_ascii_strcasecmp); *out_links = g_steal_pointer (&links); return TRUE; } /******************************************************************************/ void qmi_helpers_clear_string (gchar **value) { if (value && *value) g_free (*value); } /******************************************************************************/ #if !GLIB_CHECK_VERSION(2,54,0) gboolean qmi_ptr_array_find_with_equal_func (GPtrArray *haystack, gconstpointer needle, GEqualFunc equal_func, guint *index_) { guint i; g_return_val_if_fail (haystack != NULL, FALSE); if (equal_func == NULL) equal_func = g_direct_equal; for (i = 0; i < haystack->len; i++) { if (equal_func (g_ptr_array_index (haystack, i), needle)) { if (index_ != NULL) *index_ = i; return TRUE; } } return FALSE; } #endif libqmi-1.35.2-dev/src/libqmi-glib/qmi-helpers.h000066400000000000000000000130221455567757300212370ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2015 Dan Williams * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (C) 1999,2000 Erik Walthinsen * Copyright (C) 2000 Wim Taymans * Copyright (C) 2002 Thomas Vander Stichele */ #ifndef _LIBQMI_GLIB_QMI_HELPERS_H_ #define _LIBQMI_GLIB_QMI_HELPERS_H_ #include #include G_BEGIN_DECLS G_GNUC_INTERNAL gchar *qmi_helpers_str_hex (gconstpointer mem, gsize size, gchar delimiter); G_GNUC_INTERNAL gboolean qmi_helpers_check_user_allowed (uid_t uid, GError **error); G_GNUC_INTERNAL gboolean qmi_helpers_string_utf8_validate_printable (const guint8 *utf8, gsize utf8_len); G_GNUC_INTERNAL gchar *qmi_helpers_string_utf8_from_gsm7 (const guint8 *gsm, gsize gsm_len); G_GNUC_INTERNAL gchar *qmi_helpers_string_utf8_from_ucs2le (const guint8 *ucs2le, gsize ucs2le_len); typedef enum { QMI_HELPERS_TRANSPORT_TYPE_UNKNOWN, QMI_HELPERS_TRANSPORT_TYPE_QMUX, QMI_HELPERS_TRANSPORT_TYPE_MBIM, } QmiHelpersTransportType; /* * Symbol defining the file name for a unix domain socket used instead of a device file. * The unix domain socket is addressed with the QMUX protocol. */ #define QMI_QMUX_SOCKET_FILE_NAME "qmux_socket" G_GNUC_INTERNAL QmiHelpersTransportType qmi_helpers_get_transport_type (const gchar *path, GError **error); G_GNUC_INTERNAL gchar *qmi_helpers_get_devpath (const gchar *cdc_wdm_path, GError **error); G_GNUC_INTERNAL gchar *qmi_helpers_get_devname (const gchar *cdc_wdm_path, GError **error); G_GNUC_INTERNAL gboolean qmi_helpers_read_sysfs_file (const gchar *sysfs_path, gchar *out_value, /* caller allocates */ guint max_read_size, GError **error); G_GNUC_INTERNAL gboolean qmi_helpers_write_sysfs_file (const gchar *sysfs_path, const gchar *value, GError **error); G_GNUC_INTERNAL gboolean qmi_helpers_list_links (GFile *sysfs_file, GCancellable *cancellable, GPtrArray *previous_links, GPtrArray **out_links, GError **error); G_GNUC_INTERNAL void qmi_helpers_clear_string (gchar **value); static inline gfloat QMI_GFLOAT_SWAP_LE_BE (gfloat in) { union { guint32 i; gfloat f; } u; u.f = in; u.i = GUINT32_SWAP_LE_BE (u.i); return u.f; } static inline gdouble QMI_GDOUBLE_SWAP_LE_BE (gdouble in) { union { guint64 i; gdouble d; } u; u.d = in; u.i = GUINT64_SWAP_LE_BE (u.i); return u.d; } #if G_BYTE_ORDER == G_LITTLE_ENDIAN #define QMI_ENDIAN_HOST QMI_ENDIAN_LITTLE #define QMI_GFLOAT_TO_LE(val) ((gfloat) (val)) #define QMI_GFLOAT_TO_BE(val) (QMI_GFLOAT_SWAP_LE_BE (val)) #define QMI_GDOUBLE_TO_LE(val) ((gdouble) (val)) #define QMI_GDOUBLE_TO_BE(val) (QMI_GDOUBLE_SWAP_LE_BE (val)) #elif G_BYTE_ORDER == G_BIG_ENDIAN #define QMI_ENDIAN_HOST QMI_ENDIAN_BIG #define QMI_GFLOAT_TO_LE(val) (QMI_GFLOAT_SWAP_LE_BE (val)) #define QMI_GFLOAT_TO_BE(val) ((gfloat) (val)) #define QMI_GDOUBLE_TO_LE(val) (QMI_GDOUBLE_SWAP_LE_BE (val)) #define QMI_GDOUBLE_TO_BE(val) ((gdouble) (val)) #else /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ #error unknown ENDIAN type #endif /* !G_LITTLE_ENDIAN && !G_BIG_ENDIAN */ #define QMI_GFLOAT_FROM_LE(val) (QMI_GFLOAT_TO_LE (val)) #define QMI_GFLOAT_FROM_BE(val) (QMI_GFLOAT_TO_BE (val)) #define QMI_GDOUBLE_FROM_LE(val) (QMI_GDOUBLE_TO_LE (val)) #define QMI_GDOUBLE_FROM_BE(val) (QMI_GDOUBLE_TO_BE (val)) #if !GLIB_CHECK_VERSION(2,54,0) /* Pointer Array lookup with a GEqualFunc, imported from GLib 2.54 */ #define g_ptr_array_find_with_equal_func qmi_ptr_array_find_with_equal_func G_GNUC_INTERNAL gboolean qmi_ptr_array_find_with_equal_func (GPtrArray *haystack, gconstpointer needle, GEqualFunc equal_func, guint *index_); #endif G_END_DECLS #endif /* _LIBQMI_GLIB_QMI_UTILS_PRIVATE_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-message-context.c000066400000000000000000000054271455567757300227100ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2017 Aleksander Morgado */ #include #include "qmi-message-context.h" /*****************************************************************************/ /* Basic context */ struct _QmiMessageContext { volatile gint ref_count; /* Vendor ID */ guint16 vendor_id; }; QmiMessageContext * qmi_message_context_new (void) { QmiMessageContext *self; self = g_slice_new0 (QmiMessageContext); self->ref_count = 1; return self; } GType qmi_message_context_get_type (void) { static gsize g_define_type_id_initialized = 0; if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_boxed_type_register_static (g_intern_static_string ("QmiMessageContext"), (GBoxedCopyFunc) qmi_message_context_ref, (GBoxedFreeFunc) qmi_message_context_unref); g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } return g_define_type_id_initialized; } QmiMessageContext * qmi_message_context_ref (QmiMessageContext *self) { g_return_val_if_fail (self != NULL, NULL); g_atomic_int_inc (&self->ref_count); return self; } void qmi_message_context_unref (QmiMessageContext *self) { g_return_if_fail (self != NULL); if (g_atomic_int_dec_and_test (&self->ref_count)) { g_slice_free (QmiMessageContext, self); } } /*****************************************************************************/ /* Vendor ID */ void qmi_message_context_set_vendor_id (QmiMessageContext *self, guint16 vendor_id) { g_return_if_fail (self != NULL); self->vendor_id = vendor_id; } guint16 qmi_message_context_get_vendor_id (QmiMessageContext *self) { g_return_val_if_fail (self != NULL, QMI_MESSAGE_VENDOR_GENERIC); return self->vendor_id; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-message-context.h000066400000000000000000000111421455567757300227040ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_MESSAGE_CONTEXT_H_ #define _LIBQMI_GLIB_QMI_MESSAGE_CONTEXT_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include #include G_BEGIN_DECLS /** * SECTION:qmi-message-context * @short_description: the QMI message context * * The #QmiMessageContext defines non-standard features of the QMI message * associated with it, which may be required for a correct processing. * * The main purpose of this type is to provide a common context when processing * the request sent and the response received, so that the reception logic * can know in advance the type of response expected. Therefore, when a context * is given when sending a request with qmi_device_command_full(), the same * context will then be applied for the associated response. * * If there are multiple types of messages using the same service and command * id, the context is flagged as vendor-specific automatically, by assigning * a specific vendor id in the #QmiMessageContext. This does not mean that the * command will only be available for that specific vendor id, it is just a way * to make a difference among commands that have the same command id and a * totally different meaning. The actual vendor id value given in the context is * therefore really irrelevant, as long as the vendor id is different to the * other vendor ids specified for other commands reusing the same command id. In * order to simplify the selection of the vendor id, the library will use the * standard vendor-specific USB vendor id. */ /** * QmiMessageContext: * * An opaque type representing a QMI message context. * * Since: 1.18 */ typedef struct _QmiMessageContext QmiMessageContext; GType qmi_message_context_get_type (void); /*****************************************************************************/ /* Basic context */ /** * qmi_message_context_new: * * Create a new empty #QmiMessageContext. * * Returns: (transfer full): a newly created #QmiMessageContext. The returned value should be freed with qmi_message_context_unref(). * * Since: 1.18 */ QmiMessageContext *qmi_message_context_new (void); /** * qmi_message_context_ref: * @self: a #QmiMessageContext. * * Atomically increments the reference count of @self by one. * * Returns: (transfer full): the new reference to @self. * * Since: 1.18 */ QmiMessageContext *qmi_message_context_ref (QmiMessageContext *self); /** * qmi_message_context_unref: * @self: a #QmiMessageContext. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.18 */ void qmi_message_context_unref (QmiMessageContext *self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiMessageContext, qmi_message_context_unref) /*****************************************************************************/ /* Vendor ID */ /** * QMI_MESSAGE_VENDOR_GENERIC: * * Generic vendor id (0x0000). * * Since: 1.18 */ #define QMI_MESSAGE_VENDOR_GENERIC 0x0000 /** * qmi_message_context_set_vendor_id: * @self: a #QmiMessageContext. * @vendor_id: the vendor ID. * * Sets the vendor ID associated to the message. * * Since: 1.18 */ void qmi_message_context_set_vendor_id (QmiMessageContext *self, guint16 vendor_id); /** * qmi_message_context_get_vendor_id: * @self: a #QmiMessageContext. * * Gets the vendor ID associated to the message. * * Returns: the vendor ID. * * Since: 1.18 */ guint16 qmi_message_context_get_vendor_id (QmiMessageContext *self); G_END_DECLS #endif /* _LIBQMI_GLIB_QMI_MESSAGE_CONTEXT_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-message.c000066400000000000000000001703241455567757300212250ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright (c) 2012 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file of the libqmi library. */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2019 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #include #include #include #include #include #include "qmi-message.h" #include "qmi-helpers.h" #include "qmi-enums-private.h" #include "qmi-enum-types-private.h" #include "qmi-flag-types-private.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #include "qmi-error-types.h" #include "qmi-ctl.h" #include "qmi-dms.h" #include "qmi-wds.h" #include "qmi-nas.h" #include "qmi-wms.h" #include "qmi-pdc.h" #include "qmi-pds.h" #include "qmi-pbm.h" #include "qmi-uim.h" #include "qmi-oma.h" #include "qmi-wda.h" #include "qmi-voice.h" #include "qmi-loc.h" #include "qmi-qos.h" #include "qmi-gas.h" #include "qmi-gms.h" #include "qmi-dsd.h" #include "qmi-sar.h" #include "qmi-dpm.h" #include "qmi-fox.h" #include "qmi-atr.h" #include "qmi-ssc.h" #define PACKED __attribute__((packed)) struct qmux_header { guint16 length; guint8 flags; guint8 service; guint8 client; } PACKED; /* This is not a real header in QRTR messages, it is exclusively used within * libqmi to flag messages that have 16-bit service id and would otherwise not * fit in a standard QMUX message. */ struct qrtr_header { guint16 length; guint16 service; guint8 client; } PACKED; struct control_header { guint8 flags; guint8 transaction; guint16 message; guint16 tlv_length; } PACKED; struct service_header { guint8 flags; guint16 transaction; guint16 message; guint16 tlv_length; } PACKED; struct tlv { guint8 type; guint16 length; guint8 value[]; } PACKED; struct control_message { struct control_header header; struct tlv tlv[]; } PACKED; struct service_message { struct service_header header; struct tlv tlv[]; } PACKED; struct full_message { guint8 marker; union { struct qmux_header qmux; struct qrtr_header qrtr; } header; union { struct control_message control; struct service_message service; } qmi; } PACKED; /* qmux_header and qrtr_header are of the same size, so that the overall * QMI header struct is also always of the same size. This is convenient * when building new QMI messages or ensuring the full header is available, * but it is not a strict requirement. */ G_STATIC_ASSERT (sizeof (struct qmux_header) == sizeof (struct qrtr_header)); #define MESSAGE_IS_QMUX(self) (((struct full_message *)(self->data))->marker == QMI_MESSAGE_QMUX_MARKER) #define MESSAGE_IS_QRTR(self) (((struct full_message *)(self->data))->marker == QMI_MESSAGE_QRTR_MARKER) static inline gboolean message_is_control (QmiMessage *self) { return MESSAGE_IS_QMUX (self) ? ((struct full_message *)(self->data))->header.qmux.service == QMI_SERVICE_CTL : ((struct full_message *)(self->data))->header.qrtr.service == QMI_SERVICE_CTL; } static inline guint16 get_message_length (QmiMessage *self) { return MESSAGE_IS_QMUX (self) ? GUINT16_FROM_LE (((struct full_message *)(self->data))->header.qmux.length) : GUINT16_FROM_LE (((struct full_message *)(self->data))->header.qrtr.length); } static inline void set_message_length (QmiMessage *self, guint16 length) { if (MESSAGE_IS_QMUX (self)) ((struct full_message *)(self->data))->header.qmux.length = GUINT16_TO_LE (length); else ((struct full_message *)(self->data))->header.qrtr.length = GUINT16_TO_LE (length); } static inline guint8 get_qmux_flags (QmiMessage *self) { /* QMI_MESSAGE_QRTR_MARKER does not support flags */ g_assert (MESSAGE_IS_QMUX (self)); return ((struct full_message *)(self->data))->header.qmux.flags; } static inline guint8 get_qmi_flags (QmiMessage *self) { if (message_is_control (self)) return ((struct full_message *)(self->data))->qmi.control.header.flags; return ((struct full_message *)(self->data))->qmi.service.header.flags; } gboolean qmi_message_is_request (QmiMessage *self) { g_return_val_if_fail (self != NULL, FALSE); return (!qmi_message_is_response (self) && !qmi_message_is_indication (self)); } gboolean qmi_message_is_response (QmiMessage *self) { g_return_val_if_fail (self != NULL, FALSE); if (message_is_control (self)) { if (((struct full_message *)(self->data))->qmi.control.header.flags & QMI_CTL_FLAG_RESPONSE) return TRUE; } else { if (((struct full_message *)(self->data))->qmi.service.header.flags & QMI_SERVICE_FLAG_RESPONSE) return TRUE; } return FALSE; } gboolean qmi_message_is_indication (QmiMessage *self) { g_return_val_if_fail (self != NULL, FALSE); if (message_is_control (self)) { if (((struct full_message *)(self->data))->qmi.control.header.flags & QMI_CTL_FLAG_INDICATION) return TRUE; } else { if (((struct full_message *)(self->data))->qmi.service.header.flags & QMI_SERVICE_FLAG_INDICATION) return TRUE; } return FALSE; } QmiService qmi_message_get_service (QmiMessage *self) { g_return_val_if_fail (self != NULL, QMI_SERVICE_UNKNOWN); if (MESSAGE_IS_QMUX (self)) return (QmiService)((struct full_message *)(self->data))->header.qmux.service; return (QmiService)GUINT16_FROM_LE (((struct full_message *)(self->data))->header.qrtr.service); } guint8 qmi_message_get_client_id (QmiMessage *self) { g_return_val_if_fail (self != NULL, 0); if (MESSAGE_IS_QMUX (self)) return ((struct full_message *)(self->data))->header.qmux.client; return ((struct full_message *)(self->data))->header.qrtr.client; } guint16 qmi_message_get_transaction_id (QmiMessage *self) { g_return_val_if_fail (self != NULL, 0); if (message_is_control (self)) /* note: only 1 byte for transaction in CTL message */ return (guint16)((struct full_message *)(self->data))->qmi.control.header.transaction; return GUINT16_FROM_LE (((struct full_message *)(self->data))->qmi.service.header.transaction); } void qmi_message_set_transaction_id (QmiMessage *self, guint16 transaction_id) { g_return_if_fail (self != NULL); if (message_is_control (self)) ((struct full_message *)self->data)->qmi.control.header.transaction = (guint8)transaction_id; else ((struct full_message *)self->data)->qmi.service.header.transaction = GUINT16_TO_LE (transaction_id); } guint16 qmi_message_get_message_id (QmiMessage *self) { g_return_val_if_fail (self != NULL, 0); if (message_is_control (self)) return GUINT16_FROM_LE (((struct full_message *)(self->data))->qmi.control.header.message); return GUINT16_FROM_LE (((struct full_message *)(self->data))->qmi.service.header.message); } gsize qmi_message_get_length (QmiMessage *self) { g_return_val_if_fail (self != NULL, 0); return self->len; } static inline guint16 get_all_tlvs_length (QmiMessage *self) { if (message_is_control (self)) return GUINT16_FROM_LE (((struct full_message *)(self->data))->qmi.control.header.tlv_length); return GUINT16_FROM_LE (((struct full_message *)(self->data))->qmi.service.header.tlv_length); } static inline void set_all_tlvs_length (QmiMessage *self, guint16 length) { if (message_is_control (self)) ((struct full_message *)(self->data))->qmi.control.header.tlv_length = GUINT16_TO_LE (length); else ((struct full_message *)(self->data))->qmi.service.header.tlv_length = GUINT16_TO_LE (length); } static inline struct tlv * qmi_tlv (QmiMessage *self) { if (message_is_control (self)) return ((struct full_message *)(self->data))->qmi.control.tlv; return ((struct full_message *)(self->data))->qmi.service.tlv; } static inline guint8 * qmi_end (QmiMessage *self) { return (guint8 *) self->data + self->len; } static inline struct tlv * tlv_next (struct tlv *tlv) { return (struct tlv *)((guint8 *)tlv + sizeof(struct tlv) + GUINT16_FROM_LE (tlv->length)); } static inline struct tlv * qmi_tlv_first (QmiMessage *self) { if (get_all_tlvs_length (self)) return qmi_tlv (self); return NULL; } static inline struct tlv * qmi_tlv_next (QmiMessage *self, struct tlv *tlv) { struct tlv *end; struct tlv *next; end = (struct tlv *) qmi_end (self); next = tlv_next (tlv); return (next < end ? next : NULL); } /* * Checks the validity of a QMI message. * * In particular, checks: * 1. The message has space for all required headers. * 2. The length of the buffer, the qmux length field, and the QMI tlv_length * field are all consistent. * 3. The TLVs in the message fit exactly in the payload size. * * Returns: %TRUE if the message is valid, %FALSE otherwise. */ static gboolean message_check (QmiMessage *self, GError **error) { gsize header_length; gsize message_length; guint8 *end; struct tlv *tlv; if (self->len < (1 + sizeof (struct qmux_header))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_MESSAGE, "Buffer length too short for QMUX header (%u < %" G_GSIZE_FORMAT ")", self->len, 1 + sizeof (struct qmux_header)); return FALSE; } if (!MESSAGE_IS_QMUX (self) && !MESSAGE_IS_QRTR (self)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_MESSAGE, "Unexpected marker (0x%02x)", ((struct full_message *)(self->data))->marker); return FALSE; } /* * message length is one byte shorter than buffer length because it * does not include the qmux frame marker. */ message_length = get_message_length (self); if (message_length != self->len - 1) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_MESSAGE, "Message length and buffer length don't match (%u != %u)", get_message_length (self), self->len - 1); return FALSE; } header_length = sizeof (struct qmux_header) + (message_is_control (self) ? sizeof (struct control_header) : sizeof (struct service_header)); if (message_length < header_length) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_MESSAGE, "Message length too short for QMI header (%u < %" G_GSIZE_FORMAT ")", get_message_length (self), header_length); return FALSE; } if (message_length - header_length != get_all_tlvs_length (self)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_MESSAGE, "QMUX length and QMI TLV lengths don't match (%u - %" G_GSIZE_FORMAT " != %u)", get_message_length (self), header_length, get_all_tlvs_length (self)); return FALSE; } end = qmi_end (self); for (tlv = qmi_tlv (self); tlv < (struct tlv *)end; tlv = tlv_next (tlv)) { if (tlv->value > end) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_MESSAGE, "TLV header runs over buffer (%p > %p)", tlv->value, end); return FALSE; } if (tlv->value + GUINT16_FROM_LE (tlv->length) > end) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_MESSAGE, "TLV value runs over buffer (%p + %u > %p)", tlv->value, GUINT16_FROM_LE (tlv->length), end); return FALSE; } } /* * If this assert triggers, one of the if statements in the loop is wrong. * (It shouldn't be reached on malformed QMI messages.) */ g_assert (tlv == (struct tlv *)end); return TRUE; } QmiMessage * qmi_message_new (QmiService service, guint8 client_id, guint16 transaction_id, guint16 message_id) { GByteArray *self; struct full_message *buffer; gsize buffer_len; /* Transaction ID in the control service is 8bit only */ g_return_val_if_fail ((service != QMI_SERVICE_CTL || transaction_id <= G_MAXUINT8), NULL); /* Service must fit in 16 bits */ g_return_val_if_fail (service <= G_MAXUINT16, NULL); /* Create array with enough size for the QMUX marker, the QMUX header and * the QMI header. Use the qmux_header size for both QMUX and QRTR messages * as they are the same size. */ buffer_len = (1 + sizeof (struct qmux_header) + (service == QMI_SERVICE_CTL ? sizeof (struct control_header) : sizeof (struct service_header))); /* Create the GByteArray with buffer_len bytes preallocated */ self = g_byte_array_sized_new (buffer_len); /* Actually flag as all the buffer_len bytes being used. */ g_byte_array_set_size (self, buffer_len); buffer = (struct full_message *)(self->data); /* QMI messages of services up to 255 are QMUX compatible */ if (service <= G_MAXUINT8) { buffer->marker = QMI_MESSAGE_QMUX_MARKER; buffer->header.qmux.flags = 0; buffer->header.qmux.service = (guint8) service; buffer->header.qmux.client = client_id; } else if (service <= G_MAXUINT16) { buffer->marker = QMI_MESSAGE_QRTR_MARKER; buffer->header.qrtr.service = (guint16) service; buffer->header.qrtr.client = client_id; } else g_assert_not_reached (); if (service == QMI_SERVICE_CTL) { buffer->qmi.control.header.flags = 0; buffer->qmi.control.header.transaction = (guint8)transaction_id; buffer->qmi.control.header.message = GUINT16_TO_LE (message_id); } else { buffer->qmi.service.header.flags = 0; buffer->qmi.service.header.transaction = GUINT16_TO_LE (transaction_id); buffer->qmi.service.header.message = GUINT16_TO_LE (message_id); } /* Update length fields. */ set_message_length (self, buffer_len - 1); /* marker not included in length */ set_all_tlvs_length (self, 0); /* We shouldn't create invalid empty messages */ g_assert (message_check (self, NULL)); return (QmiMessage *)self; } QmiMessage * qmi_message_new_from_data (QmiService service, guint8 client_id, GByteArray *qmi_data, GError **error) { g_autoptr(GByteArray) self = NULL; struct full_message *buffer; gsize buffer_len; gsize message_len; /* Service must fit in 16 bits */ g_return_val_if_fail (service <= G_MAXUINT16, NULL); /* Create array with enough size for the QMUX marker and QMUX header, and * with enough room to copy the rest of the message into */ if (service == QMI_SERVICE_CTL) { message_len = sizeof (struct control_header) + ((struct control_message *)(qmi_data->data))->header.tlv_length; } else { message_len = sizeof (struct service_header) + ((struct service_message *)(qmi_data->data))->header.tlv_length; } /* Use the size of qmux_header for both QMUX and QRTR as they are the same */ buffer_len = (1 + sizeof (struct qmux_header) + message_len); /* Create the GByteArray with buffer_len bytes preallocated */ self = g_byte_array_sized_new (buffer_len); g_byte_array_set_size (self, buffer_len); /* Set up fake QMUX header */ buffer = (struct full_message *)(self->data); if (service <= G_MAXUINT8) { buffer->marker = QMI_MESSAGE_QMUX_MARKER; buffer->header.qmux.length = GUINT16_TO_LE (buffer_len - 1); buffer->header.qmux.flags = 0; buffer->header.qmux.service = (guint8) service; buffer->header.qmux.client = client_id; } else if (service <= G_MAXUINT16) { buffer->marker = QMI_MESSAGE_QRTR_MARKER; buffer->header.qrtr.length = GUINT16_TO_LE (buffer_len - 1); buffer->header.qrtr.service = (guint16) service; buffer->header.qrtr.client = client_id; } else g_assert_not_reached (); /* Move bytes from the qmi_data array to the newly created message */ memcpy (&buffer->qmi, qmi_data->data, message_len); g_byte_array_remove_range (qmi_data, 0, message_len); /* Check input message validity as soon as we create the QmiMessage */ if (!message_check (self, error)) return NULL; return (QmiMessage *) g_steal_pointer (&self); } QmiMessage * qmi_message_response_new (QmiMessage *request, QmiProtocolError error) { QmiMessage *response; gsize tlv_offset; response = qmi_message_new (qmi_message_get_service (request), qmi_message_get_client_id (request), qmi_message_get_transaction_id (request), qmi_message_get_message_id (request)); /* Set sender type flag */ if (qmi_message_get_service (request) <= G_MAXUINT8) ((struct full_message *)(((GByteArray *)response)->data))->header.qmux.flags = 0x80; /* Set the response flag */ if (message_is_control (request)) ((struct full_message *)(((GByteArray *)response)->data))->qmi.control.header.flags |= QMI_CTL_FLAG_RESPONSE; else ((struct full_message *)(((GByteArray *)response)->data))->qmi.service.header.flags |= QMI_SERVICE_FLAG_RESPONSE; /* Add result TLV, should never fail */ tlv_offset = qmi_message_tlv_write_init (response, 0x02, NULL); qmi_message_tlv_write_guint16 (response, QMI_ENDIAN_LITTLE, (error != QMI_PROTOCOL_ERROR_NONE), NULL); qmi_message_tlv_write_guint16 (response, QMI_ENDIAN_LITTLE, error, NULL); qmi_message_tlv_write_complete (response, tlv_offset, NULL); /* We shouldn't create invalid response messages */ g_assert (message_check (response, NULL)); return response; } QmiMessage * qmi_message_ref (QmiMessage *self) { g_return_val_if_fail (self != NULL, NULL); return (QmiMessage *)g_byte_array_ref (self); } void qmi_message_unref (QmiMessage *self) { g_return_if_fail (self != NULL); g_byte_array_unref (self); } guint8 qmi_message_get_marker (QmiMessage *self) { g_return_val_if_fail (self != NULL, 0x00); return ((struct full_message *)(self->data))->marker; } const guint8 * qmi_message_get_raw (QmiMessage *self, gsize *length, GError **error) { g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (length != NULL, NULL); *length = self->len; return self->data; } const guint8 * qmi_message_get_data (QmiMessage *self, gsize *length, GError **error) { g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (length != NULL, NULL); if (message_is_control (self)) *length = sizeof (struct control_header); else *length = sizeof (struct service_header); *length += get_all_tlvs_length (self); return (guint8 *)(&((struct full_message *)(self->data))->qmi); } /*****************************************************************************/ /* TLV builder & writer */ static gboolean tlv_error_if_write_overflow (QmiMessage *self, gsize len, GError **error) { /* Check for overflow of message size. */ if (self->len + len > G_MAXUINT16) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG, "Writing TLV would overflow"); return FALSE; } return TRUE; } static struct tlv * tlv_get_header (QmiMessage *self, gsize init_offset) { g_assert (init_offset <= self->len); return (struct tlv *)(&self->data[init_offset]); } gsize qmi_message_tlv_write_init (QmiMessage *self, guint8 type, GError **error) { gsize init_offset; struct tlv *tlv; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (self->len > 0, 0); /* Check for overflow of message size. Note that a valid TLV will at least * have 1 byte of value. */ if (!tlv_error_if_write_overflow (self, sizeof (struct tlv) + 1, error)) return 0; /* Store where exactly we started adding the TLV */ init_offset = self->len; /* Resize buffer to fit the TLV header */ g_byte_array_set_size (self, self->len + sizeof (struct tlv)); /* Write the TLV header */ tlv = tlv_get_header (self, init_offset); tlv->type = type; tlv->length = 0; /* Correct value will be set in complete() */ return init_offset; } void qmi_message_tlv_write_reset (QmiMessage *self, gsize tlv_offset) { g_return_if_fail (self != NULL); g_byte_array_set_size (self, tlv_offset); } gboolean qmi_message_tlv_write_complete (QmiMessage *self, gsize tlv_offset, GError **error) { gsize tlv_length; struct tlv *tlv; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (self->len >= (tlv_offset + sizeof (struct tlv)), FALSE); /* A TLV without content is actually not an error, e.g. TLV strings with no * data are totally valid. */ tlv_length = self->len - tlv_offset; /* Update length fields. */ tlv = tlv_get_header (self, tlv_offset); tlv->length = GUINT16_TO_LE (tlv_length - sizeof (struct tlv)); set_message_length (self, (guint16)(get_message_length (self) + tlv_length)); set_all_tlvs_length (self, (guint16)(get_all_tlvs_length (self) + tlv_length)); /* Make sure we didn't break anything. */ g_assert (message_check (self, NULL)); return TRUE; } gboolean qmi_message_tlv_write_guint8 (QmiMessage *self, guint8 in, GError **error) { g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; g_byte_array_append (self, &in, sizeof (in)); return TRUE; } gboolean qmi_message_tlv_write_gint8 (QmiMessage *self, gint8 in, GError **error) { g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; g_byte_array_append (self, (guint8 *)&in, sizeof (in)); return TRUE; } gboolean qmi_message_tlv_write_guint16 (QmiMessage *self, QmiEndian endian, guint16 in, GError **error) { guint16 tmp; g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; tmp = (endian == QMI_ENDIAN_BIG ? GUINT16_TO_BE (in) : GUINT16_TO_LE (in)); g_byte_array_append (self, (guint8 *)&tmp, sizeof (tmp)); return TRUE; } gboolean qmi_message_tlv_write_gint16 (QmiMessage *self, QmiEndian endian, gint16 in, GError **error) { gint16 tmp; g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; tmp = (endian == QMI_ENDIAN_BIG ? GINT16_TO_BE (in) : GINT16_TO_LE (in)); g_byte_array_append (self, (guint8 *)&tmp, sizeof (tmp)); return TRUE; } gboolean qmi_message_tlv_write_guint32 (QmiMessage *self, QmiEndian endian, guint32 in, GError **error) { guint32 tmp; g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; tmp = (endian == QMI_ENDIAN_BIG ? GUINT32_TO_BE (in) : GUINT32_TO_LE (in)); g_byte_array_append (self, (guint8 *)&tmp, sizeof (tmp)); return TRUE; } gboolean qmi_message_tlv_write_gint32 (QmiMessage *self, QmiEndian endian, gint32 in, GError **error) { gint32 tmp; g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; tmp = (endian == QMI_ENDIAN_BIG ? GINT32_TO_BE (in) : GINT32_TO_LE (in)); g_byte_array_append (self, (guint8 *)&tmp, sizeof (tmp)); return TRUE; } gboolean qmi_message_tlv_write_guint64 (QmiMessage *self, QmiEndian endian, guint64 in, GError **error) { guint64 tmp; g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; tmp = (endian == QMI_ENDIAN_BIG ? GUINT64_TO_BE (in) : GUINT64_TO_LE (in)); g_byte_array_append (self, (guint8 *)&tmp, sizeof (tmp)); return TRUE; } gboolean qmi_message_tlv_write_gint64 (QmiMessage *self, QmiEndian endian, gint64 in, GError **error) { gint64 tmp; g_return_val_if_fail (self != NULL, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, sizeof (in), error)) return FALSE; tmp = (endian == QMI_ENDIAN_BIG ? GINT64_TO_BE (in) : GINT64_TO_LE (in)); g_byte_array_append (self, (guint8 *)&tmp, sizeof (tmp)); return TRUE; } gboolean qmi_message_tlv_write_sized_guint (QmiMessage *self, guint n_bytes, QmiEndian endian, guint64 in, GError **error) { guint64 tmp; goffset offset; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (n_bytes <= 8, FALSE); /* Check for overflow of message size */ if (!tlv_error_if_write_overflow (self, n_bytes, error)) return FALSE; tmp = (endian == QMI_ENDIAN_BIG ? GUINT64_TO_BE (in) : GUINT64_TO_LE (in)); /* Update buffer size */ offset = self->len; g_byte_array_set_size (self, self->len + n_bytes); /* In Little Endian, we read the bytes from the beginning of the buffer */ if (endian == QMI_ENDIAN_LITTLE) { memcpy (&self->data[offset], &tmp, n_bytes); } /* In Big Endian, we read the bytes from the end of the buffer */ else { guint8 tmp_buffer[8]; memcpy (&tmp_buffer[0], &tmp, 8); memcpy (&self->data[offset], &tmp_buffer[8 - n_bytes], n_bytes); } return TRUE; } gboolean qmi_message_tlv_write_string (QmiMessage *self, guint8 n_size_prefix_bytes, const gchar *in, gssize in_length, GError **error) { gsize len; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (in != NULL, FALSE); g_return_val_if_fail (n_size_prefix_bytes <= 2, FALSE); len = (in_length < 0 ? strlen (in) : (gsize) in_length); /* Write size prefix first */ switch (n_size_prefix_bytes) { case 0: break; case 1: if (len > G_MAXUINT8) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_ARGS, "String too long for a 1 byte size prefix: %" G_GSIZE_FORMAT, len); return FALSE; } if (!qmi_message_tlv_write_guint8 (self, (guint8) len, error)) { g_prefix_error (error, "Cannot append string 1 byte size prefix"); return FALSE; } break; case 2: if (len > G_MAXUINT16) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_ARGS, "String too long for a 2 byte size prefix: %" G_GSIZE_FORMAT, len); return FALSE; } if (!qmi_message_tlv_write_guint16 (self, QMI_ENDIAN_LITTLE, (guint16) len, error)) { g_prefix_error (error, "Cannot append string 2 byte size prefix"); return FALSE; } break; default: g_assert_not_reached (); } /* Check for overflow of string size */ if (!tlv_error_if_write_overflow (self, len, error)) return FALSE; g_byte_array_append (self, (guint8 *)in, len); return TRUE; } /*****************************************************************************/ /* TLV reader */ gsize qmi_message_tlv_read_init (QmiMessage *self, guint8 type, guint16 *out_tlv_length, GError **error) { struct tlv *tlv; guint16 tlv_length; g_return_val_if_fail (self != NULL, 0); g_return_val_if_fail (self->len > 0, 0); for (tlv = qmi_tlv_first (self); tlv; tlv = qmi_tlv_next (self, tlv)) { if (tlv->type == type) break; } if (!tlv) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_NOT_FOUND, "TLV 0x%02X not found", type); return 0; } tlv_length = GUINT16_FROM_LE (tlv->length); if (((guint8 *) tlv_next (tlv)) > ((guint8 *) qmi_end (self))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG, "Invalid length for TLV 0x%02X: %" G_GUINT16_FORMAT, type, tlv_length); return 0; } if (out_tlv_length) *out_tlv_length = tlv_length; return (((guint8 *)tlv) - self->data); } static const guint8 * tlv_error_if_read_overflow (QmiMessage *self, gsize tlv_offset, gsize offset, gsize len, GError **error) { const guint8 *ptr; struct tlv *tlv; tlv = (struct tlv *) &(self->data[tlv_offset]); ptr = ((guint8 *)tlv) + sizeof (struct tlv) + offset; if (((guint8 *)(ptr + len) > (guint8 *)tlv_next (tlv)) || ((guint8 *)(ptr + len) > (guint8 *)qmi_end (self))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG, "Reading TLV would overflow"); return NULL; } return ptr; } gboolean qmi_message_tlv_read_guint8 (QmiMessage *self, gsize tlv_offset, gsize *offset, guint8 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; *offset = *offset + 1; *out = *ptr; return TRUE; } gboolean qmi_message_tlv_read_gint8 (QmiMessage *self, gsize tlv_offset, gsize *offset, gint8 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; *out = (gint8)(*ptr); *offset = *offset + 1; return TRUE; } gboolean qmi_message_tlv_read_guint16 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, guint16 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; memcpy (out, ptr, 2); if (endian == QMI_ENDIAN_BIG) *out = GUINT16_FROM_BE (*out); else *out = GUINT16_FROM_LE (*out); *offset = *offset + 2; return TRUE; } gboolean qmi_message_tlv_read_gint16 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gint16 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; memcpy (out, ptr, 2); if (endian == QMI_ENDIAN_BIG) *out = GUINT16_FROM_BE (*out); else *out = GUINT16_FROM_LE (*out); *offset = *offset + 2; return TRUE; } gboolean qmi_message_tlv_read_guint32 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, guint32 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; memcpy (out, ptr, 4); if (endian == QMI_ENDIAN_BIG) *out = GUINT32_FROM_BE (*out); else *out = GUINT32_FROM_LE (*out); *offset = *offset + 4; return TRUE; } gboolean qmi_message_tlv_read_gint32 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gint32 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; memcpy (out, ptr, 4); if (endian == QMI_ENDIAN_BIG) *out = GINT32_FROM_BE (*out); else *out = GINT32_FROM_LE (*out); *offset = *offset + 4; return TRUE; } gboolean qmi_message_tlv_read_guint64 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, guint64 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; memcpy (out, ptr, 8); if (endian == QMI_ENDIAN_BIG) *out = GUINT64_FROM_BE (*out); else *out = GUINT64_FROM_LE (*out); *offset = *offset + 8; return TRUE; } gboolean qmi_message_tlv_read_gint64 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gint64 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, sizeof (*out), error))) return FALSE; memcpy (out, ptr, 8); if (endian == QMI_ENDIAN_BIG) *out = GINT64_FROM_BE (*out); else *out = GINT64_FROM_LE (*out); *offset = *offset + 8; return TRUE; } gboolean qmi_message_tlv_read_sized_guint (QmiMessage *self, gsize tlv_offset, gsize *offset, guint n_bytes, QmiEndian endian, guint64 *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); g_return_val_if_fail (n_bytes <= 8, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, n_bytes, error))) return FALSE; *out = 0; /* In Little Endian, we copy the bytes to the beginning of the output * buffer. */ if (endian == QMI_ENDIAN_LITTLE) { memcpy (out, ptr, n_bytes); *out = GUINT64_FROM_LE (*out); } /* In Big Endian, we copy the bytes to the end of the output buffer */ else { guint8 tmp[8] = { 0 }; memcpy (&tmp[8 - n_bytes], ptr, n_bytes); memcpy (out, &tmp[0], 8); *out = GUINT64_FROM_BE (*out); } *offset = *offset + n_bytes; return TRUE; } gboolean qmi_message_tlv_read_gfloat_endian (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gfloat *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, 4, error))) return FALSE; memcpy (out, ptr, 4); if (endian == QMI_ENDIAN_BIG) *out = QMI_GFLOAT_FROM_BE (*out); else *out = QMI_GFLOAT_FROM_LE (*out); *offset = *offset + 4; return TRUE; } gboolean qmi_message_tlv_read_gdouble (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gdouble *out, GError **error) { const guint8 *ptr; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, 8, error))) return FALSE; /* Yeah, do this for now */ memcpy (out, ptr, 8); if (endian == QMI_ENDIAN_BIG) *out = QMI_GDOUBLE_FROM_BE (*out); else *out = QMI_GDOUBLE_FROM_LE (*out); *offset = *offset + 8; return TRUE; } gboolean qmi_message_tlv_read_string (QmiMessage *self, gsize tlv_offset, gsize *offset, guint8 n_size_prefix_bytes, guint16 max_size, gchar **out, GError **error) { const guint8 *ptr; guint16 string_length; guint16 valid_string_length; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); g_return_val_if_fail (n_size_prefix_bytes <= 2, FALSE); switch (n_size_prefix_bytes) { case 0: { struct tlv *tlv; if (!tlv_error_if_read_overflow (self, tlv_offset, *offset, 0, error)) return FALSE; /* If no length prefix given, read the remaining TLV buffer into a string */ tlv = (struct tlv *) &(self->data[tlv_offset]); string_length = (GUINT16_FROM_LE (tlv->length) - *offset); break; } case 1: { guint8 string_length_8; if (!qmi_message_tlv_read_guint8 (self, tlv_offset, offset, &string_length_8, error)) return FALSE; string_length = (guint16) string_length_8; break; } case 2: if (!qmi_message_tlv_read_guint16 (self, tlv_offset, offset, QMI_ENDIAN_LITTLE, &string_length, error)) return FALSE; break; default: g_assert_not_reached (); } if (string_length == 0) { *out = g_strdup (""); return TRUE; } if (max_size > 0 && string_length > max_size) valid_string_length = max_size; else valid_string_length = string_length; if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, valid_string_length, error))) return FALSE; /* Perform a quick UTF-8 validation check first. This check isn't perfect, * because there may be GSM-7 encoded strings that are valid UTF-8 as well, * but hey, the strings read using this method should all really be ASCII-7 * and we're trying to do our best to overcome modem firmware problems... */ if (qmi_helpers_string_utf8_validate_printable (ptr, valid_string_length)) { *out = g_malloc (valid_string_length + 1); memcpy (*out, ptr, valid_string_length); (*out)[valid_string_length] = '\0'; } else { /* Otherwise, attempt GSM-7 */ *out =qmi_helpers_string_utf8_from_gsm7 (ptr, valid_string_length); if (*out == NULL) { /* Otherwise, attempt UCS-2 */ *out = qmi_helpers_string_utf8_from_ucs2le (ptr, valid_string_length); if (*out == NULL) { /* Otherwise, error */ g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_DATA, "invalid string"); return FALSE; } } } *offset = (*offset + string_length); return TRUE; } gboolean qmi_message_tlv_read_fixed_size_string (QmiMessage *self, gsize tlv_offset, gsize *offset, guint16 string_length, gchar *out, GError **error) { const guint8 *ptr; const gchar *end = NULL; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (offset != NULL, FALSE); g_return_val_if_fail (out != NULL, FALSE); if (string_length == 0) return TRUE; if (!(ptr = tlv_error_if_read_overflow (self, tlv_offset, *offset, string_length, error))) return FALSE; /* full string valid? */ if (g_utf8_validate ((const gchar *)ptr, string_length, &end)) { memcpy (out, ptr, string_length); *offset = (*offset + string_length); return TRUE; } /* partial string valid? */ if (end && end > (const gchar *)ptr) { /* copy only the valid bytes */ memcpy (out, ptr, end - (const gchar *)ptr); /* but update offset with the full expected length */ *offset = (*offset + string_length); return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_DATA, "invalid string"); return FALSE; } guint16 qmi_message_tlv_read_remaining_size (QmiMessage *self, gsize tlv_offset, gsize offset) { struct tlv *tlv; g_return_val_if_fail (self != NULL, FALSE); tlv = (struct tlv *) &(self->data[tlv_offset]); g_warn_if_fail (GUINT16_FROM_LE (tlv->length) >= offset); return (GUINT16_FROM_LE (tlv->length) >= offset ? (GUINT16_FROM_LE (tlv->length) - offset) : 0); } /*****************************************************************************/ const guint8 * qmi_message_get_raw_tlv (QmiMessage *self, guint8 type, guint16 *length) { struct tlv *tlv; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (length != NULL, NULL); for (tlv = qmi_tlv_first (self); tlv; tlv = qmi_tlv_next (self, tlv)) { if (tlv->type == type) { *length = GUINT16_FROM_LE (tlv->length); return (guint8 *)&(tlv->value[0]); } } return NULL; } void qmi_message_foreach_raw_tlv (QmiMessage *self, QmiMessageForeachRawTlvFn func, gpointer user_data) { struct tlv *tlv; g_return_if_fail (self != NULL); g_return_if_fail (func != NULL); for (tlv = qmi_tlv_first (self); tlv; tlv = qmi_tlv_next (self, tlv)) { func (tlv->type, (const guint8 *)tlv->value, (gsize)(GUINT16_FROM_LE (tlv->length)), user_data); } } gboolean qmi_message_add_raw_tlv (QmiMessage *self, guint8 type, const guint8 *raw, gsize length, GError **error) { size_t tlv_len; struct tlv *tlv; g_return_val_if_fail (self != NULL, FALSE); g_return_val_if_fail (raw != NULL, FALSE); g_return_val_if_fail (length > 0, FALSE); /* Find length of new TLV */ tlv_len = sizeof (struct tlv) + length; /* Check for overflow of message size. */ if (get_message_length (self) + tlv_len > G_MAXUINT16) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG, "TLV to add is too long"); return FALSE; } /* Resize buffer. */ g_byte_array_set_size (self, self->len + tlv_len); /* Fill in new TLV. */ tlv = (struct tlv *)(qmi_end (self) - tlv_len); tlv->type = type; tlv->length = GUINT16_TO_LE (length); memcpy (tlv->value, raw, length); /* Update length fields. */ set_message_length (self, (guint16)(get_message_length (self) + tlv_len)); set_all_tlvs_length (self, (guint16)(get_all_tlvs_length (self) + tlv_len)); /* Make sure we didn't break anything. */ g_assert (message_check (self, NULL)); return TRUE; } QmiMessage * qmi_message_new_from_raw (GByteArray *raw, GError **error) { GByteArray *self; gsize message_len; g_return_val_if_fail (raw != NULL, NULL); if (MESSAGE_IS_QMUX (raw)) message_len = GUINT16_FROM_LE (((struct full_message *)raw->data)->header.qmux.length); else message_len = GUINT16_FROM_LE (((struct full_message *)raw->data)->header.qrtr.length); /* If we didn't even read the QMUX header (comes after the 1-byte marker), * leave */ if (raw->len < (sizeof (struct qrtr_header) + 1)) return NULL; /* We need to have read the length reported by the QMUX header (plus the * initial 1-byte marker) */ if (raw->len < (message_len + 1)) return NULL; /* Ok, so we should have all the data available already */ self = g_byte_array_sized_new (message_len + 1); g_byte_array_prepend (self, raw->data, message_len + 1); /* We got a complete QMI message, remove from input buffer */ g_byte_array_remove_range (raw, 0, self->len); /* Check input message validity as soon as we create the QmiMessage */ if (!message_check (self, error)) { /* Yes, we lose the whole message here */ qmi_message_unref (self); return NULL; } return (QmiMessage *)self; } gchar * qmi_message_get_tlv_printable (QmiMessage *self, const gchar *line_prefix, guint8 type, const guint8 *raw, gsize raw_length) { gchar *printable; gchar *value_hex; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (line_prefix != NULL, NULL); g_return_val_if_fail (raw != NULL, NULL); value_hex = qmi_helpers_str_hex (raw, raw_length, ':'); printable = g_strdup_printf ("%sTLV:\n" "%s type = 0x%02x\n" "%s length = %" G_GSIZE_FORMAT "\n" "%s value = %s\n", line_prefix, line_prefix, type, line_prefix, raw_length, line_prefix, value_hex); g_free (value_hex); return printable; } static gchar * get_generic_printable (QmiMessage *self, const gchar *line_prefix) { GString *printable; struct tlv *tlv; printable = g_string_new (""); g_string_append_printf (printable, "%s message = (0x%04x)\n", line_prefix, qmi_message_get_message_id (self)); for (tlv = qmi_tlv_first (self); tlv; tlv = qmi_tlv_next (self, tlv)) { gchar *printable_tlv; printable_tlv = qmi_message_get_tlv_printable (self, line_prefix, tlv->type, tlv->value, GUINT16_FROM_LE (tlv->length)); g_string_append (printable, printable_tlv); g_free (printable_tlv); } return g_string_free (printable, FALSE); } gchar * qmi_message_get_printable_full (QmiMessage *self, QmiMessageContext *context, const gchar *line_prefix) { GString *printable; gchar *qmi_flags_str; gchar *contents; g_return_val_if_fail (self != NULL, NULL); if (!line_prefix) line_prefix = ""; printable = g_string_new (""); if (MESSAGE_IS_QMUX (self)) { g_string_append_printf (printable, "%sQMUX:\n" "%s length = %u\n" "%s flags = 0x%02x\n" "%s service = \"%s\"\n" "%s client = %u\n", line_prefix, line_prefix, get_message_length (self), line_prefix, get_qmux_flags (self), line_prefix, qmi_service_get_string (qmi_message_get_service (self)), line_prefix, qmi_message_get_client_id (self)); } else if (MESSAGE_IS_QRTR (self)) { g_string_append_printf (printable, "%sQRTR:\n" "%s length = %u\n" "%s service = \"%s\"\n" "%s client = %u\n", line_prefix, line_prefix, get_message_length (self), line_prefix, qmi_service_get_string (qmi_message_get_service (self)), line_prefix, qmi_message_get_client_id (self)); } else { g_warn_if_reached (); return g_string_free (printable, FALSE); } if (qmi_message_get_service (self) == QMI_SERVICE_CTL) qmi_flags_str = qmi_ctl_flag_build_string_from_mask (get_qmi_flags (self)); else qmi_flags_str = qmi_service_flag_build_string_from_mask (get_qmi_flags (self)); g_string_append_printf (printable, "%sQMI:\n" "%s flags = \"%s\"\n" "%s transaction = %u\n" "%s tlv_length = %u\n", line_prefix, line_prefix, qmi_flags_str, line_prefix, qmi_message_get_transaction_id (self), line_prefix, get_all_tlvs_length (self)); g_free (qmi_flags_str); contents = NULL; switch (qmi_message_get_service (self)) { case QMI_SERVICE_CTL: #if defined HAVE_QMI_SERVICE_CTL contents = __qmi_message_ctl_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_DMS: #if defined HAVE_QMI_SERVICE_DMS contents = __qmi_message_dms_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_WDS: #if defined HAVE_QMI_SERVICE_WDS contents = __qmi_message_wds_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_NAS: #if defined HAVE_QMI_SERVICE_NAS contents = __qmi_message_nas_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_WMS: #if defined HAVE_QMI_SERVICE_WMS contents = __qmi_message_wms_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_PDC: #if defined HAVE_QMI_SERVICE_PDC contents = __qmi_message_pdc_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_PDS: #if defined HAVE_QMI_SERVICE_PDS contents = __qmi_message_pds_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_PBM: #if defined HAVE_QMI_SERVICE_PBM contents = __qmi_message_pbm_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_UIM: #if defined HAVE_QMI_SERVICE_UIM contents = __qmi_message_uim_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_OMA: #if defined HAVE_QMI_SERVICE_OMA contents = __qmi_message_oma_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_GAS: #if defined HAVE_QMI_SERVICE_GAS contents = __qmi_message_gas_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_GMS: #if defined HAVE_QMI_SERVICE_GMS contents = __qmi_message_gms_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_WDA: #if defined HAVE_QMI_SERVICE_WDA contents = __qmi_message_wda_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_VOICE: #if defined HAVE_QMI_SERVICE_VOICE contents = __qmi_message_voice_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_LOC: #if defined HAVE_QMI_SERVICE_LOC contents = __qmi_message_loc_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_QOS: #if defined HAVE_QMI_SERVICE_QOS contents = __qmi_message_qos_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_DSD: #if defined HAVE_QMI_SERVICE_DSD contents = __qmi_message_dsd_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_DPM: #if defined HAVE_QMI_SERVICE_DPM contents = __qmi_message_dpm_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_FOX: #if defined HAVE_QMI_SERVICE_FOX contents = __qmi_message_fox_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_ATR: #if defined HAVE_QMI_SERVICE_ATR contents = __qmi_message_atr_get_printable (self, context, line_prefix); #endif case QMI_SERVICE_IMSP: #if defined HAVE_QMI_SERVICE_IMSP contents = __qmi_message_imsp_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_IMSA: #if defined HAVE_QMI_SERVICE_IMSA contents = __qmi_message_imsa_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_IMS: #if defined HAVE_QMI_SERVICE_IMS contents = __qmi_message_ims_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_SSC: #if defined HAVE_QMI_SERVICE_SSC contents = __qmi_message_ssc_get_printable (self, context, line_prefix); #endif break; case QMI_SERVICE_UNKNOWN: g_assert_not_reached (); case QMI_SERVICE_AUTH: case QMI_SERVICE_AT: case QMI_SERVICE_CAT2: case QMI_SERVICE_QCHAT: case QMI_SERVICE_RMTFS: case QMI_SERVICE_TEST: case QMI_SERVICE_SAR: case QMI_SERVICE_ADC: case QMI_SERVICE_CSD: case QMI_SERVICE_MFS: case QMI_SERVICE_TIME: case QMI_SERVICE_TS: case QMI_SERVICE_TMD: case QMI_SERVICE_SAP: case QMI_SERVICE_TSYNC: case QMI_SERVICE_RFSA: case QMI_SERVICE_CSVT: case QMI_SERVICE_QCMAP: case QMI_SERVICE_IMSVT: case QMI_SERVICE_COEX: case QMI_SERVICE_STX: case QMI_SERVICE_BIT: case QMI_SERVICE_IMSRTP: case QMI_SERVICE_RFRPE: case QMI_SERVICE_SSCTL: case QMI_SERVICE_CAT: case QMI_SERVICE_RMS: case QMI_SERVICE_FOTA: default: break; } if (!contents) contents = get_generic_printable (self, line_prefix); g_string_append (printable, contents); g_free (contents); return g_string_free (printable, FALSE); } gboolean __qmi_message_is_abortable (QmiMessage *self, QmiMessageContext *context) { switch (qmi_message_get_service (self)) { case QMI_SERVICE_WDS: #if defined HAVE_QMI_SERVICE_WDS return __qmi_message_wds_is_abortable (self, context); #else return FALSE; #endif case QMI_SERVICE_NAS: #if defined HAVE_QMI_SERVICE_NAS return __qmi_message_nas_is_abortable (self, context); #else return FALSE; #endif case QMI_SERVICE_UNKNOWN: g_assert_not_reached (); case QMI_SERVICE_CTL: case QMI_SERVICE_DMS: case QMI_SERVICE_WMS: case QMI_SERVICE_PDS: case QMI_SERVICE_PBM: case QMI_SERVICE_UIM: case QMI_SERVICE_OMA: case QMI_SERVICE_GAS: case QMI_SERVICE_WDA: case QMI_SERVICE_LOC: case QMI_SERVICE_AUTH: case QMI_SERVICE_AT: case QMI_SERVICE_CAT2: case QMI_SERVICE_QCHAT: case QMI_SERVICE_RMTFS: case QMI_SERVICE_TEST: case QMI_SERVICE_SAR: case QMI_SERVICE_IMS: case QMI_SERVICE_ADC: case QMI_SERVICE_CSD: case QMI_SERVICE_MFS: case QMI_SERVICE_TIME: case QMI_SERVICE_TS: case QMI_SERVICE_TMD: case QMI_SERVICE_SAP: case QMI_SERVICE_TSYNC: case QMI_SERVICE_RFSA: case QMI_SERVICE_CSVT: case QMI_SERVICE_QCMAP: case QMI_SERVICE_IMSP: case QMI_SERVICE_IMSVT: case QMI_SERVICE_IMSA: case QMI_SERVICE_COEX: case QMI_SERVICE_STX: case QMI_SERVICE_BIT: case QMI_SERVICE_IMSRTP: case QMI_SERVICE_RFRPE: case QMI_SERVICE_SSCTL: case QMI_SERVICE_DPM: case QMI_SERVICE_CAT: case QMI_SERVICE_RMS: case QMI_SERVICE_FOTA: case QMI_SERVICE_GMS: case QMI_SERVICE_VOICE: case QMI_SERVICE_PDC: case QMI_SERVICE_DSD: case QMI_SERVICE_QOS: case QMI_SERVICE_FOX: case QMI_SERVICE_ATR: case QMI_SERVICE_SSC: default: return FALSE; } } libqmi-1.35.2-dev/src/libqmi-glib/qmi-message.h000066400000000000000000001175041455567757300212330ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright (c) 2012 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2017 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_MESSAGE_H_ #define _LIBQMI_GLIB_QMI_MESSAGE_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include #include "qmi-utils.h" #include "qmi-enums.h" #include "qmi-errors.h" #include "qmi-message-context.h" G_BEGIN_DECLS /** * SECTION:qmi-message * @short_description: Generic QMI message handling routines * * #QmiMessage is a generic type representing a QMI message of any kind * (request, response, indication) or service (including #QMI_SERVICE_CTL). * * This set of generic routines help in handling these message types, and * allow creating any kind of message with any kind of TLV. */ /** * QMI_MESSAGE_QMUX_MARKER: * * First byte of every QMI QMUX message. * * Since: 1.0 */ #define QMI_MESSAGE_QMUX_MARKER (guint8) 0x01 /** * QMI_MESSAGE_QRTR_MARKER: * * Fake header added by libqmi to re-use existing QMUX message parsers for QRTR messages. * QRTR QMI services with a service ID > 0xFF use this fake header where the service ID * is set to 16 bits instead of 8 bits. This header has no purpose outside of libqmi * and is never send to the actual device implementing these QMI services. * * Since: 1.34 */ #define QMI_MESSAGE_QRTR_MARKER (guint8) 0x02 /** * QmiMessage: * * An opaque type representing a QMI message. * * Since: 1.0 */ typedef GByteArray QmiMessage; /*****************************************************************************/ /* QMI Message life cycle */ /** * qmi_message_new: * @service: a #QmiService * @client_id: client ID of the originating control point. * @transaction_id: transaction ID. * @message_id: message ID. * * Create a new #QmiMessage with the specified parameters. * * Note that @transaction_id must be less than #G_MAXUINT8 if @service is * #QMI_SERVICE_CTL. * * Returns: (transfer full): a newly created #QmiMessage. The returned value should be freed with qmi_message_unref(). * * Since: 1.0 */ QmiMessage *qmi_message_new (QmiService service, guint8 client_id, guint16 transaction_id, guint16 message_id); /** * qmi_message_new_from_raw: * @raw: (inout): raw data buffer. * @error: return location for error or %NULL. * * Create a new #QmiMessage from the given raw data buffer. * * Whenever a complete QMI message is read, its raw data gets removed from the @raw buffer. * * Returns: (transfer full): a newly created #QmiMessage, which should be freed with qmi_message_unref(). If @raw doesn't contain a complete QMI message %NULL is returned. If there is a complete QMI message but it appears not to be valid, %NULL is returned and @error is set. * * Since: 1.0 */ QmiMessage *qmi_message_new_from_raw (GByteArray *raw, GError **error); /** * qmi_message_new_from_data: * @service: a #QmiService * @client_id: client ID of the originating control point. * @qmi_data: (inout): data buffer containing only the QMI part of the message. * @error: return location for error or %NULL. * * Create a new #QmiMessage for the given @service and @client_id and including the given QMI data buffer. * * Whenever a complete QMI message is read, its data gets removed from the @qmi_data buffer. * * This method should be used instead of qmi_message_new_from_raw() if the input data doesn't have QMUX headers. * * Returns: (transfer full): a newly created #QmiMessage, which should be freed with qmi_message_unref(). If @qmi_data doesn't contain a complete QMI data payload %NULL is returned. If there is a complete QMI data payload but it appears not to be valid, %NULL is returned and @error is set. * * Since: 1.24 */ QmiMessage *qmi_message_new_from_data (QmiService service, guint8 client_id, GByteArray *qmi_data, GError **error); /** * qmi_message_response_new: * @request: a request #QmiMessage. * @error: a #QmiProtocolError to set in the result TLV. * * Create a new response #QmiMessage for the specified @request. * * Returns: (transfer full): a newly created #QmiMessage. The returned value should be freed with qmi_message_unref(). * * Since: 1.8 */ QmiMessage *qmi_message_response_new (QmiMessage *request, QmiProtocolError error); /** * qmi_message_ref: * @self: a #QmiMessage. * * Atomically increments the reference count of @self by one. * * Returns: (transfer full): the new reference to @self. * * Since: 1.0 */ QmiMessage *qmi_message_ref (QmiMessage *self); /** * qmi_message_unref: * @self: a #QmiMessage. * * Atomically decrements the reference count of @self by one. * If the reference count drops to 0, @self is completely disposed. * * Since: 1.0 */ void qmi_message_unref (QmiMessage *self); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiMessage, qmi_message_unref) /*****************************************************************************/ /* QMI Message content getters */ /** * qmi_message_is_request: * @self: a #QmiMessage. * * Checks whether the given #QmiMessage is a request. * * Returns: %TRUE if @self is a request message, %FALSE otherwise. * * Since: 1.8 */ gboolean qmi_message_is_request (QmiMessage *self); /** * qmi_message_is_response: * @self: a #QmiMessage. * * Checks whether the given #QmiMessage is a response. * * Returns: %TRUE if @self is a response message, %FALSE otherwise. * * Since: 1.0 */ gboolean qmi_message_is_response (QmiMessage *self); /** * qmi_message_is_indication: * @self: a #QmiMessage. * * Checks whether the given #QmiMessage is an indication. * * Returns: %TRUE if @self is an indication message, %FALSE otherwise. * * Since: 1.0 */ gboolean qmi_message_is_indication (QmiMessage *self); /** * qmi_message_get_service: * @self: a #QmiMessage. * * Gets the service corresponding to the given #QmiMessage. * * Returns: a #QmiService. * * Since: 1.0 */ QmiService qmi_message_get_service (QmiMessage *self); /** * qmi_message_get_client_id: * @self: a #QmiMessage. * * Gets the client ID of the message. * * Returns: the client ID. * * Since: 1.0 */ guint8 qmi_message_get_client_id (QmiMessage *self); /** * qmi_message_get_transaction_id: * @self: a #QmiMessage. * * Gets the transaction ID of the message. * * Returns: the transaction ID. * * Since: 1.0 */ guint16 qmi_message_get_transaction_id (QmiMessage *self); /** * qmi_message_get_message_id: * @self: a #QmiMessage. * * Gets the ID of the message. * * Returns: the ID. * * Since: 1.0 */ guint16 qmi_message_get_message_id (QmiMessage *self); /** * qmi_message_get_length: * @self: a #QmiMessage. * * Gets the length of the raw data corresponding to the given #QmiMessage. * * Returns: the length of the raw data. * * Since: 1.0 */ gsize qmi_message_get_length (QmiMessage *self); /** * qmi_message_get_raw: * @self: a #QmiMessage. * @length: (out): return location for the size of the output buffer. * @error: return location for error or %NULL. * * Gets the raw data buffer of the #QmiMessage. * * Returns: (transfer none): The raw data buffer, or %NULL if @error is set. * * Since: 1.0 */ const guint8 *qmi_message_get_raw (QmiMessage *self, gsize *length, GError **error); /** * qmi_message_get_data: * @self: a #QmiMessage. * @length: (out): return location for the size of the output buffer. * @error: return location for error or %NULL. * * Gets the data buffer of the #QmiMessage without the QMUX header. * * Returns: (transfer none): The raw QMI buffer, or %NULL if @error is set. * * Since: 1.24 */ const guint8 *qmi_message_get_data (QmiMessage *self, gsize *length, GError **error); /** * qmi_message_get_marker: * @self: a #QmiMessage. * * Gets the marker of the #QmiMessage. * * Returns: The message marker. * * Since: 1.34 */ guint8 qmi_message_get_marker (QmiMessage *self); /*****************************************************************************/ /* TLV builder & writer */ /** * qmi_message_tlv_write_init: * @self: a #QmiMessage. * @type: specific ID of the TLV to add. * @error: return location for error or %NULL. * * Starts building a new TLV in the #QmiMessage. * * In order to finish adding the TLV, qmi_message_tlv_write_complete() needs to be * called. * * If any error happens adding fields on the TLV, the previous state can be * recovered using qmi_message_tlv_write_reset(). * * Returns: the offset where the TLV was started to be added, or 0 if an error happens. * * Since: 1.12 */ gsize qmi_message_tlv_write_init (QmiMessage *self, guint8 type, GError **error); /** * qmi_message_tlv_write_reset: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_write_init(). * * Removes the TLV being currently added. * * Since: 1.12 */ void qmi_message_tlv_write_reset (QmiMessage *self, gsize tlv_offset); /** * qmi_message_tlv_write_complete: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_write_init(). * @error: return location for error or %NULL. * * Completes building a TLV in the #QmiMessage. * * In case of error the TLV will be reseted; i.e. there is no need to explicitly * call qmi_message_tlv_write_reset(). * * Returns: %TRUE if the TLV is successfully completed, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_complete (QmiMessage *self, gsize tlv_offset, GError **error); /** * qmi_message_tlv_write_guint8: * @self: a #QmiMessage. * @in: a #guint8. * @error: return location for error or %NULL. * * Appends an unsigned byte to the TLV being built. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_guint8 (QmiMessage *self, guint8 in, GError **error); /** * qmi_message_tlv_write_gint8: * @self: a #QmiMessage. * @in: a #gint8. * @error: return location for error or %NULL. * * Appends a signed byte variable to the TLV being built. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_gint8 (QmiMessage *self, gint8 in, GError **error); /** * qmi_message_tlv_write_guint16: * @self: a #QmiMessage. * @endian: target endianness, swapped from host byte order if necessary. * @in: a #guint16 in host byte order. * @error: return location for error or %NULL. * * Appends an unsigned 16-bit integer to the TLV being built. The number to be * written is expected to be given in host endianness, and this method takes * care of converting the value written to the byte order specified by @endian. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_guint16 (QmiMessage *self, QmiEndian endian, guint16 in, GError **error); /** * qmi_message_tlv_write_gint16: * @self: a #QmiMessage. * @endian: target endianness, swapped from host byte order if necessary. * @in: a #gint16 in host byte order. * @error: return location for error or %NULL. * * Appends a signed 16-bit integer to the TLV being built. The number to be * written is expected to be given in host endianness, and this method takes * care of converting the value written to the byte order specified by @endian. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_gint16 (QmiMessage *self, QmiEndian endian, gint16 in, GError **error); /** * qmi_message_tlv_write_guint32: * @self: a #QmiMessage. * @endian: target endianness, swapped from host byte order if necessary. * @in: a #guint32 in host byte order. * @error: return location for error or %NULL. * * Appends an unsigned 32-bit integer to the TLV being built. The number to be * written is expected to be given in host endianness, and this method takes * care of converting the value written to the byte order specified by @endian. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_guint32 (QmiMessage *self, QmiEndian endian, guint32 in, GError **error); /** * qmi_message_tlv_write_gint32: * @self: a #QmiMessage. * @endian: target endianness, swapped from host byte order if necessary. * @in: a #gint32 in host byte order. * @error: return location for error or %NULL. * * Appends a signed 32-bit integer to the TLV being built. The number to be * written is expected to be given in host endianness, and this method takes * care of converting the value written to the byte order specified by @endian. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_gint32 (QmiMessage *self, QmiEndian endian, gint32 in, GError **error); /** * qmi_message_tlv_write_guint64: * @self: a #QmiMessage. * @endian: target endianness, swapped from host byte order if necessary. * @in: a #guint64 in host byte order. * @error: return location for error or %NULL. * * Appends an unsigned 64-bit integer to the TLV being built. The number to be * written is expected to be given in host endianness, and this method takes * care of converting the value written to the byte order specified by @endian. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_guint64 (QmiMessage *self, QmiEndian endian, guint64 in, GError **error); /** * qmi_message_tlv_write_gint64: * @self: a #QmiMessage. * @endian: target endianness, swapped from host byte order if necessary. * @in: a #gint64 in host byte order. * @error: return location for error or %NULL. * * Appends a signed 32-bit integer to the TLV being built. The number to be * written is expected to be given in host endianness, and this method takes * care of converting the value written to the byte order specified by @endian. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_gint64 (QmiMessage *self, QmiEndian endian, gint64 in, GError **error); /** * qmi_message_tlv_write_sized_guint: * @self: a #QmiMessage. * @n_bytes: number of bytes to write. * @endian: target endianness, swapped from host byte order if necessary. * @in: a #guint64 in host byte order. * @error: return location for error or %NULL. * * Appends a @n_bytes-sized unsigned integer to the TLV being built. The number * to be written is expected to be given in host endianness, and this method * takes care of converting the value written to the byte order specified by * @endian. * * The value of @n_bytes can be any between 1 and 8. * * Returns: %TRUE if the variable is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_sized_guint (QmiMessage *self, guint n_bytes, QmiEndian endian, guint64 in, GError **error); /** * qmi_message_tlv_write_string: * @self: a #QmiMessage. * @n_size_prefix_bytes: number of bytes to use in the size prefix. * @in: string to write. * @in_length: length of @in, or -1 if @in is NUL-terminated. * @error: return location for error or %NULL. * * Appends a string to the TLV being built. * * Fixed-sized strings should give @n_size_prefix_bytes equal to 0. * * Returns: %TRUE if the string is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_write_string (QmiMessage *self, guint8 n_size_prefix_bytes, const gchar *in, gssize in_length, GError **error); /*****************************************************************************/ /* TLV reader */ /** * qmi_message_tlv_read_init: * @self: a #QmiMessage. * @type: specific ID of the TLV to read. * @out_tlv_length: (out): optional return location for the TLV size. * @error: return location for error or %NULL. * * Starts reading a given TLV from the #QmiMessage. * * Returns: the offset where the TLV starts, or 0 if an error happens. * * Since: 1.12 */ gsize qmi_message_tlv_read_init (QmiMessage *self, guint8 type, guint16 *out_tlv_length, GError **error); /** * qmi_message_tlv_read_guint8: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of the offset within the TLV value. * @out: (out): return location for the read #guint8. * @error: return location for error or %NULL. * * Reads an unsigned byte from the TLV. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_guint8 (QmiMessage *self, gsize tlv_offset, gsize *offset, guint8 *out, GError **error); /** * qmi_message_tlv_read_gint8: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @out: (out): return location for the read #gint8. * @error: return location for error or %NULL. * * Reads a signed byte from the TLV. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_gint8 (QmiMessage *self, gsize tlv_offset, gsize *offset, gint8 *out, GError **error); /** * qmi_message_tlv_read_guint16: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #guint16. * @error: return location for error or %NULL. * * Reads an unsigned 16-bit integer from the TLV, in host byte order. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_guint16 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, guint16 *out, GError **error); /** * qmi_message_tlv_read_gint16: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #gint16. * @error: return location for error or %NULL. * * Reads a signed 16-bit integer from the TLV, in host byte order. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_gint16 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gint16 *out, GError **error); /** * qmi_message_tlv_read_guint32: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #guint32. * @error: return location for error or %NULL. * * Reads an unsigned 32-bit integer from the TLV, in host byte order. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_guint32 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, guint32 *out, GError **error); /** * qmi_message_tlv_read_gint32: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #gint32. * @error: return location for error or %NULL. * * Reads a signed 32-bit integer from the TLV, in host byte order. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_gint32 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gint32 *out, GError **error); /** * qmi_message_tlv_read_guint64: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #guint64. * @error: return location for error or %NULL. * * Reads an unsigned 64-bit integer from the TLV, in host byte order. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_guint64 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, guint64 *out, GError **error); /** * qmi_message_tlv_read_gint64: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #gint64. * @error: return location for error or %NULL. * * Reads a signed 64-bit integer from the TLV, in host byte order. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_gint64 (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gint64 *out, GError **error); /** * qmi_message_tlv_read_sized_guint: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @n_bytes: number of bytes to read. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #guint64. * @error: return location for error or %NULL. * * Reads a @b_bytes-sized integer from the TLV, in host byte order. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_sized_guint (QmiMessage *self, gsize tlv_offset, gsize *offset, guint n_bytes, QmiEndian endian, guint64 *out, GError **error); /** * qmi_message_tlv_read_gfloat_endian: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #gfloat. * @error: return location for error or %NULL. * * Reads a 32-bit floating-point number from the TLV. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_gfloat_endian (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gfloat *out, GError **error); /** * qmi_message_tlv_read_gdouble: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @endian: source endianness, which will be swapped to host byte order if necessary. * @out: (out): return location for the read #gdouble. * @error: return location for error or %NULL. * * Reads a 64-bit floating-point number from the TLV. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.22 */ gboolean qmi_message_tlv_read_gdouble (QmiMessage *self, gsize tlv_offset, gsize *offset, QmiEndian endian, gdouble *out, GError **error); /** * qmi_message_tlv_read_string: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @n_size_prefix_bytes: number of bytes used in the size prefix. * @max_size: maximum number of bytes to read, or 0 to read all available bytes. * @out: (out): return location for the read string. The returned value should be freed with g_free(). * @error: return location for error or %NULL. * * Reads a string from the TLV. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Since 1.24.6 the read string is guaranteed to be valid UTF-8. Also, in order to * overcome known firmware errors on string fields, this method will also * attempt to parse the string as GSM-7 or UCS-2 if the initial UTF-8 validation * fails. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_string (QmiMessage *self, gsize tlv_offset, gsize *offset, guint8 n_size_prefix_bytes, guint16 max_size, gchar **out, GError **error); /** * qmi_message_tlv_read_fixed_size_string: * @self: a #QmiMessage. * @tlv_offset: offset that was returned by qmi_message_tlv_read_init(). * @offset: (inout): address of a the offset within the TLV value. * @string_length: amount of bytes to read. * @out: (out): buffer preallocated by the client, with at least @string_length bytes. * @error: return location for error or %NULL. * * Reads a string from the TLV. * * The string written in @out will need to be NUL-terminated by the caller. * * @offset needs to point to a valid @gsize specifying the index to start * reading from within the TLV value (0 for the first item). If the variable * is successfully read, @offset will be updated to point past the read item. * * Since 1.24.6 the read string is guaranteed to be valid UTF-8. * * The fixed sized field may be suffixed with e.g. 0xFF if the contents are * shorter than @string_length. Since 1.26, this method will return the valid * UTF-8 characters in the start of the string, instead of returning an error * when doing the full UTF-8 string validation. * * Returns: %TRUE if the variable is successfully read, otherwise %FALSE is returned and @error is set. * * Since: 1.12 */ gboolean qmi_message_tlv_read_fixed_size_string (QmiMessage *self, gsize tlv_offset, gsize *offset, guint16 string_length, gchar *out, GError **error); #if defined (LIBQMI_GLIB_COMPILATION) G_GNUC_INTERNAL guint16 qmi_message_tlv_read_remaining_size (QmiMessage *self, gsize tlv_offset, gsize offset); #endif /*****************************************************************************/ /* Raw TLV handling */ /** * QmiMessageForeachRawTlvFn: * @type: specific ID of the TLV. * @value: value of the TLV. * @length: length of the TLV, in bytes. * @user_data: user data. * * Callback type to use when iterating raw TLVs with * qmi_message_foreach_raw_tlv(). * * Since: 1.0 */ typedef void (* QmiMessageForeachRawTlvFn) (guint8 type, const guint8 *value, gsize length, gpointer user_data); /** * qmi_message_foreach_raw_tlv: * @self: a #QmiMessage. * @func: (scope call): the function to call for each TLV. * @user_data: (closure func): user data to pass to the function. * * Calls the given function for each TLV found within the #QmiMessage. * * Since: 1.0 */ void qmi_message_foreach_raw_tlv (QmiMessage *self, QmiMessageForeachRawTlvFn func, gpointer user_data); /** * qmi_message_get_raw_tlv: * @self: a #QmiMessage. * @type: specific ID of the TLV to get. * @length: (out): return location for the length of the TLV. * * Get the raw data buffer of a specific TLV within the #QmiMessage. * * Returns: (transfer none): The raw data buffer of the TLV, or %NULL if not found. * * Since: 1.0 */ const guint8 *qmi_message_get_raw_tlv (QmiMessage *self, guint8 type, guint16 *length); /** * qmi_message_add_raw_tlv: * @self: a #QmiMessage. * @type: specific ID of the TLV to add. * @raw: raw data buffer with the value of the TLV. * @length: length of the raw data buffer. * @error: return location for error or %NULL. * * Creates a new @type TLV with the value given in @raw, and adds it to the #QmiMessage. * * Returns: %TRUE if the TLV is successfully added, otherwise %FALSE is returned and @error is set. * * Since: 1.0 */ gboolean qmi_message_add_raw_tlv (QmiMessage *self, guint8 type, const guint8 *raw, gsize length, GError **error); /*****************************************************************************/ /* Other helpers */ /** * qmi_message_set_transaction_id: * @self: a #QmiMessage. * @transaction_id: transaction id. * * Overwrites the transaction ID of the message. * * Since: 1.8 */ void qmi_message_set_transaction_id (QmiMessage *self, guint16 transaction_id); #if defined (LIBQMI_GLIB_COMPILATION) G_GNUC_INTERNAL gboolean __qmi_message_is_abortable (QmiMessage *self, QmiMessageContext *context); #endif /*****************************************************************************/ /* Printable helpers */ /** * qmi_message_get_printable_full: * @self: a #QmiMessage. * @context: a #QmiMessageContext. * @line_prefix: prefix string to use in each new generated line. * * Gets a printable string with the contents of the whole QMI message. * * If known, the printable string will contain translated TLV values as well as * the raw data buffer contents. * * The translation of the contents may be specific to the @context provided, * e.g. for vendor-specific messages. * * If no @context given, the behavior is the same as qmi_message_get_printable(). * * Returns: (transfer full): a newly allocated string, which should be freed with g_free(). * * Since: 1.18 */ gchar *qmi_message_get_printable_full (QmiMessage *self, QmiMessageContext *context, const gchar *line_prefix); /** * qmi_message_get_tlv_printable: * @self: a #QmiMessage. * @line_prefix: prefix string to use in each new generated line. * @type: type of the TLV. * @raw: raw data buffer with the value of the TLV. * @raw_length: length of the raw data buffer. * * Gets a printable string with the contents of the TLV. * * This method is the most generic one and doesn't try to translate the TLV contents. * * Returns: (transfer full): a newly allocated string, which should be freed with g_free(). * * Since: 1.0 */ gchar *qmi_message_get_tlv_printable (QmiMessage *self, const gchar *line_prefix, guint8 type, const guint8 *raw, gsize raw_length); G_END_DECLS #endif /* _LIBQMI_GLIB_QMI_MESSAGE_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-net-port-manager-qmiwwan.c000066400000000000000000000573411455567757300244450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2021 Aleksander Morgado */ #include #include #include "qmi-net-port-manager-qmiwwan.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #include "qmi-error-types.h" #include "qmi-errors.h" #include "qmi-helpers.h" G_DEFINE_TYPE (QmiNetPortManagerQmiwwan, qmi_net_port_manager_qmiwwan, QMI_TYPE_NET_PORT_MANAGER) struct _QmiNetPortManagerQmiwwanPrivate { gchar *iface; gchar *sysfs_path; GFile *sysfs_file; gchar *add_mux_sysfs_path; gchar *del_mux_sysfs_path; /* mux id tracking table */ GHashTable *mux_id_map; }; /*****************************************************************************/ /* The qmap/mux_id attribute was introduced in a newer kernel version. If * we don't have this info, try to keep the track of what iface applies to * what mux id manually here. * * Not perfect, but works if the MM doesn't crash and loses the info. * This legacy logic won't make any sense on plain qmicli operations, though. */ static gboolean track_mux_id (QmiNetPortManagerQmiwwan *self, const gchar *link_iface, const gchar *mux_id, GError **error) { if (g_hash_table_lookup (self->priv->mux_id_map, link_iface)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Already exists"); return FALSE; } g_hash_table_insert (self->priv->mux_id_map, g_strdup (link_iface), g_strdup (mux_id)); return TRUE; } static gboolean untrack_mux_id (QmiNetPortManagerQmiwwan *self, const gchar *link_iface, GError **error) { if (!g_hash_table_remove (self->priv->mux_id_map, link_iface)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Not found"); return FALSE; } return TRUE; } static const gchar * get_tracked_mux_id (QmiNetPortManagerQmiwwan *self, const gchar *link_iface, GError **error) { const gchar *found; found = g_hash_table_lookup (self->priv->mux_id_map, link_iface); if (!found) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Not found"); return NULL; } return found; } /*****************************************************************************/ static gchar * read_link_mux_id (const gchar *link_iface, GError **error) { g_autofree gchar *link_mux_id_sysfs_path = NULL; g_autofree gchar *link_mux_id = NULL; /* mux id expected as an hex integer between 0x01 and 0xfe */ link_mux_id = g_malloc0 (5); link_mux_id_sysfs_path = g_strdup_printf ("/sys/class/net/%s/qmap/mux_id", link_iface); if (!qmi_helpers_read_sysfs_file (link_mux_id_sysfs_path, link_mux_id, 4, error)) return NULL; return g_steal_pointer (&link_mux_id); } static gboolean lookup_mux_id_in_links (GPtrArray *links, const gchar *mux_id, gchar **out_link, GError **error) { guint i; for (i = 0; links && i < links->len; i++) { const gchar *link_iface; g_autofree gchar *link_mux_id = NULL; link_iface = g_ptr_array_index (links, i); link_mux_id = read_link_mux_id (link_iface, error); if (!link_mux_id) return FALSE; if (g_strcmp0 (mux_id, link_mux_id) == 0) { *out_link = g_strdup (link_iface); return TRUE; } } *out_link = NULL; return TRUE; } static gchar * lookup_first_new_link (GPtrArray *links_before, GPtrArray *links_after) { guint i; if (!links_after) return NULL; for (i = 0; i < links_after->len; i++) { const gchar *link_iface; link_iface = g_ptr_array_index (links_after, i); if (!links_before || !g_ptr_array_find_with_equal_func (links_before, link_iface, g_str_equal, NULL)) return g_strdup (link_iface); } return NULL; } /*****************************************************************************/ static gint cmpuint (const guint *a, const guint *b) { return ((*a > *b) ? 1 : ((*b > *a) ? -1 : 0)); } static guint get_first_free_mux_id (QmiNetPortManagerQmiwwan *self, GPtrArray *links, GError **error) { guint i; g_autoptr(GArray) existing_mux_ids = NULL; guint next_mux_id; static const guint max_mux_id_upper_threshold = QMI_DEVICE_MUX_ID_MAX + 1; if (!links) return QMI_DEVICE_MUX_ID_MIN; existing_mux_ids = g_array_new (FALSE, FALSE, sizeof (guint)); for (i = 0; i < links->len; i++) { const gchar *link_iface; g_autofree gchar *link_mux_id = NULL; gulong link_mux_id_num; link_iface = g_ptr_array_index (links, i); link_mux_id = read_link_mux_id (link_iface, NULL); if (!link_mux_id) { const gchar *tracked_link_mux_id; g_debug ("Couldn't read mux id from sysfs for link '%s': unsupported by driver", link_iface); /* fallback to use our internal tracking table... far from perfect */ tracked_link_mux_id = get_tracked_mux_id (self, link_iface, NULL); if (!tracked_link_mux_id) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED, "Couldn't get tracked mux id for link '%s'", link_iface); return QMI_DEVICE_MUX_ID_UNBOUND; } link_mux_id_num = strtoul (tracked_link_mux_id, NULL, 16); } else link_mux_id_num = strtoul (link_mux_id, NULL, 16); if (!link_mux_id_num) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Couldn't parse mux id '%s'", link_mux_id); return QMI_DEVICE_MUX_ID_UNBOUND; } g_array_append_val (existing_mux_ids, link_mux_id_num); } /* add upper level threshold, so that if we end up out of the loop * below, it means we have exhausted all mux ids */ g_array_append_val (existing_mux_ids, max_mux_id_upper_threshold); g_array_sort (existing_mux_ids, (GCompareFunc)cmpuint); for (next_mux_id = QMI_DEVICE_MUX_ID_MIN, i = 0; i < existing_mux_ids->len; next_mux_id++, i++) { guint existing; existing = g_array_index (existing_mux_ids, guint, i); if (next_mux_id < existing) return next_mux_id; g_assert_cmpuint (next_mux_id, ==, existing); } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "No mux ids left"); return QMI_DEVICE_MUX_ID_UNBOUND; } /*****************************************************************************/ static gchar * net_port_manager_add_link_finish (QmiNetPortManager *self, guint *mux_id, GAsyncResult *res, GError **error) { gchar *link_name; link_name = g_task_propagate_pointer (G_TASK (res), error); if (!link_name) return NULL; if (mux_id) *mux_id = GPOINTER_TO_UINT (g_task_get_task_data (G_TASK (res))); return link_name; } static void net_port_manager_add_link (QmiNetPortManager *_self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, QmiDeviceAddLinkFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiNetPortManagerQmiwwan *self = QMI_NET_PORT_MANAGER_QMIWWAN (_self); GTask *task; GError *error = NULL; g_autoptr(GPtrArray) links_before = NULL; g_autoptr(GPtrArray) links_after = NULL; g_autofree gchar *link_name = NULL; g_autofree gchar *mux_id_str = NULL; g_debug ("Net port manager based on qmi_wwan ignores the ifname prefix '%s'", ifname_prefix); g_debug ("Running add link operation..."); task = g_task_new (self, cancellable, callback, user_data); if (flags != QMI_DEVICE_ADD_LINK_FLAGS_NONE) { g_autofree gchar *flags_str = NULL; flags_str = qmi_device_add_link_flags_build_string_from_mask (flags); g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED, "Adding link with flags '%s' is not supported", flags_str); g_object_unref (task); return; } if (!qmi_helpers_list_links (self->priv->sysfs_file, cancellable, NULL, &links_before, &error)) { g_prefix_error (&error, "Couldn't enumerate files in the sysfs directory before link addition: "); g_task_return_error (task, error); g_object_unref (task); return; } if (mux_id == QMI_DEVICE_MUX_ID_AUTOMATIC) { mux_id = get_first_free_mux_id (self, links_before, &error); if (mux_id == QMI_DEVICE_MUX_ID_UNBOUND) { g_prefix_error (&error, "Couldn't add link with automatic mux id: "); g_task_return_error (task, error); g_object_unref (task); return; } g_debug ("Using mux id %u", mux_id); } g_task_set_task_data (task, GUINT_TO_POINTER (mux_id), NULL); mux_id_str = g_strdup_printf ("0x%02x", mux_id); if (!qmi_helpers_write_sysfs_file (self->priv->add_mux_sysfs_path, mux_id_str, &error)) { g_prefix_error (&error, "Couldn't add create link with mux id %s: ", mux_id_str); g_task_return_error (task, error); g_object_unref (task); return; } if (!qmi_helpers_list_links (self->priv->sysfs_file, cancellable, links_before, &links_after, &error)) { g_prefix_error (&error, "Couldn't enumerate files in the sysfs directory after link addition: "); g_task_return_error (task, error); g_object_unref (task); return; } if (!lookup_mux_id_in_links (links_after, mux_id_str, &link_name, NULL)) { /* Now, assume this is because the mux_id attribute was added in a newer * kernel. As a fallback, we'll try to detect the first new link listed, * even if this is definitely very racy. */ link_name = lookup_first_new_link (links_before, links_after); if (!link_name) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "No new link detected for mux id %s", mux_id_str); g_object_unref (task); return; } g_debug ("Found first new link '%s' (unknown mux id)", link_name); } else g_debug ("Found link '%s' associated to mux id '%s'", link_name, mux_id_str); if (!track_mux_id (self, link_name, mux_id_str, &error)) { g_warning ("Couldn't track mux id: %s", error->message); g_clear_error (&error); } g_task_return_pointer (task, g_steal_pointer (&link_name), g_free); g_object_unref (task); } /*****************************************************************************/ static gboolean net_port_manager_del_link_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void net_port_manager_del_link (QmiNetPortManager *_self, const gchar *ifname, guint mux_id, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiNetPortManagerQmiwwan *self = QMI_NET_PORT_MANAGER_QMIWWAN (_self); GTask *task; GError *error = NULL; g_autoptr(GPtrArray) links_before = NULL; g_autoptr(GPtrArray) links_after = NULL; g_autofree gchar *mux_id_str = NULL; g_debug ("Running del link (%s) operation...", ifname); task = g_task_new (self, cancellable, callback, user_data); if (!qmi_helpers_list_links (self->priv->sysfs_file, cancellable, NULL, &links_before, &error)) { g_prefix_error (&error, "Couldn't enumerate files in the sysfs directory before link deletion: "); g_task_return_error (task, error); g_object_unref (task); return; } if (!links_before || !g_ptr_array_find_with_equal_func (links_before, ifname, g_str_equal, NULL)) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_ARGS, "Cannot delete link '%s': interface not found", ifname); g_object_unref (task); return; } /* Try to guess mux id if not given as input */ if (mux_id != QMI_DEVICE_MUX_ID_UNBOUND) mux_id_str = g_strdup_printf ("0x%02x", mux_id); else { mux_id_str = read_link_mux_id (ifname, NULL); if (!mux_id_str) { mux_id_str = g_strdup (get_tracked_mux_id (self, ifname, NULL)); if (!mux_id_str) { /* This unsupported error allows us to flag when del_all_links() * needs to switch to the fallback mechanism */ g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED, "Cannot delete link '%s': unknown mux id", ifname); g_object_unref (task); return; } } } if (!qmi_helpers_write_sysfs_file (self->priv->del_mux_sysfs_path, mux_id_str, &error)) { g_prefix_error (&error, "Couldn't delete link with mux id %s: ", mux_id_str); g_task_return_error (task, error); g_object_unref (task); return; } if (!qmi_helpers_list_links (self->priv->sysfs_file, cancellable, links_before, &links_after, &error)) { g_prefix_error (&error, "Couldn't enumerate files in the sysfs directory after link deletion: "); g_task_return_error (task, error); g_object_unref (task); return; } if (links_after && g_ptr_array_find_with_equal_func (links_after, ifname, g_str_equal, NULL)) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "link '%s' still detected", ifname); g_object_unref (task); return; } if (!untrack_mux_id (self, ifname, &error)) { g_debug ("couldn't untrack mux id: %s", error->message); g_clear_error (&error); } g_task_return_boolean (task, TRUE); g_object_unref (task); } /*****************************************************************************/ static gboolean net_port_manager_del_all_links_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void fallback_del_all_links (GTask *task) { QmiNetPortManagerQmiwwan *self; guint i; g_autoptr(GPtrArray) links_before = NULL; g_autoptr(GPtrArray) links_after = NULL; GError *error = NULL; guint n_deleted = 0; self = g_task_get_source_object (task); g_debug ("Running fallback link deletion logic..."); if (!qmi_helpers_list_links (self->priv->sysfs_file, g_task_get_cancellable (task), NULL, &links_before, &error)) { g_prefix_error (&error, "Couldn't list links before deleting all: "); g_task_return_error (task, error); g_object_unref (task); return; } if (!links_before) { g_task_return_boolean (task, TRUE); g_object_unref (task); return; } for (i = QMI_DEVICE_MUX_ID_MIN; i <= QMI_DEVICE_MUX_ID_MAX; i++) { g_autofree gchar *mux_id = NULL; mux_id = g_strdup_printf ("0x%02x", i); /* attempt to delete link with the given mux id; if there is no such link * the kernel will complain with a harmless "mux_id not present" warning */ if ((qmi_helpers_write_sysfs_file (self->priv->del_mux_sysfs_path, mux_id, NULL) && (++n_deleted == links_before->len))) { /* early break if all N links deleted already */ break; } } if (!qmi_helpers_list_links (self->priv->sysfs_file, g_task_get_cancellable (task), NULL, &links_after, &error)) { g_prefix_error (&error, "Couldn't list links after deleting all: "); g_task_return_error (task, error); } else if (links_after) g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Not all links were deleted"); else g_task_return_boolean (task, TRUE); g_object_unref (task); } static void parent_del_all_links_ready (QmiNetPortManager *self, GAsyncResult *res, GTask *task) { g_autoptr(GError) error = NULL; if (!QMI_NET_PORT_MANAGER_CLASS (qmi_net_port_manager_qmiwwan_parent_class)->del_all_links_finish (self, res, &error)) { if (g_error_matches (error, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED)) { fallback_del_all_links (task); return; } g_task_return_error (task, g_steal_pointer (&error)); } else g_task_return_boolean (task, TRUE); g_object_unref (task); } static void net_port_manager_del_all_links (QmiNetPortManager *_self, const gchar *base_ifname, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiNetPortManagerQmiwwan *self = QMI_NET_PORT_MANAGER_QMIWWAN (_self); GTask *task; task = g_task_new (self, cancellable, callback, user_data); /* validate base ifname before doing anything else */ if (base_ifname && !g_str_equal (base_ifname, self->priv->iface)) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_INVALID_ARGS, "Invalid base interface given: '%s' (must be '%s')", base_ifname, self->priv->iface); g_object_unref (task); return; } QMI_NET_PORT_MANAGER_CLASS (qmi_net_port_manager_qmiwwan_parent_class)->del_all_links (_self, base_ifname, cancellable, (GAsyncReadyCallback)parent_del_all_links_ready, task); } /*****************************************************************************/ QmiNetPortManagerQmiwwan * qmi_net_port_manager_qmiwwan_new (const gchar *iface, GError **error) { g_autoptr(QmiNetPortManagerQmiwwan) self = NULL; self = QMI_NET_PORT_MANAGER_QMIWWAN (g_object_new (QMI_TYPE_NET_PORT_MANAGER_QMIWWAN, NULL)); self->priv->iface = g_strdup (iface); self->priv->sysfs_path = g_strdup_printf ("/sys/class/net/%s", iface); self->priv->sysfs_file = g_file_new_for_path (self->priv->sysfs_path); self->priv->add_mux_sysfs_path = g_strdup_printf ("%s/qmi/add_mux", self->priv->sysfs_path); self->priv->del_mux_sysfs_path = g_strdup_printf ("%s/qmi/del_mux", self->priv->sysfs_path); if (!g_file_test (self->priv->add_mux_sysfs_path, G_FILE_TEST_EXISTS) || !g_file_test (self->priv->del_mux_sysfs_path, G_FILE_TEST_EXISTS)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "No support for multiplexing in the interface"); return NULL; } return g_steal_pointer (&self); } /*****************************************************************************/ static void qmi_net_port_manager_qmiwwan_init (QmiNetPortManagerQmiwwan *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QMI_TYPE_NET_PORT_MANAGER_QMIWWAN, QmiNetPortManagerQmiwwanPrivate); self->priv->mux_id_map = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free); } static void finalize (GObject *object) { QmiNetPortManagerQmiwwan *self = QMI_NET_PORT_MANAGER_QMIWWAN (object); g_hash_table_unref (self->priv->mux_id_map); g_free (self->priv->iface); g_object_unref (self->priv->sysfs_file); g_free (self->priv->sysfs_path); g_free (self->priv->del_mux_sysfs_path); g_free (self->priv->add_mux_sysfs_path); G_OBJECT_CLASS (qmi_net_port_manager_qmiwwan_parent_class)->finalize (object); } static void qmi_net_port_manager_qmiwwan_class_init (QmiNetPortManagerQmiwwanClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); QmiNetPortManagerClass *net_port_manager_class = QMI_NET_PORT_MANAGER_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiNetPortManagerQmiwwanPrivate)); object_class->finalize = finalize; net_port_manager_class->add_link = net_port_manager_add_link; net_port_manager_class->add_link_finish = net_port_manager_add_link_finish; net_port_manager_class->del_link = net_port_manager_del_link; net_port_manager_class->del_link_finish = net_port_manager_del_link_finish; net_port_manager_class->del_all_links = net_port_manager_del_all_links; net_port_manager_class->del_all_links_finish = net_port_manager_del_all_links_finish; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-net-port-manager-qmiwwan.h000066400000000000000000000052621455567757300244450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2021 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_QMIWWAN_H_ #define _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_QMIWWAN_H_ #include #include #include "qmi-net-port-manager.h" #define QMI_TYPE_NET_PORT_MANAGER_QMIWWAN (qmi_net_port_manager_qmiwwan_get_type ()) #define QMI_NET_PORT_MANAGER_QMIWWAN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_NET_PORT_MANAGER_QMIWWAN, QmiNetPortManagerQmiwwan)) #define QMI_NET_PORT_MANAGER_QMIWWAN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_NET_PORT_MANAGER_QMIWWAN, QmiNetPortManagerQmiwwanClass)) #define QMI_IS_NET_PORT_MANAGER_QMIWWAN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_NET_PORT_MANAGER_QMIWWAN)) #define QMI_IS_NET_PORT_MANAGER_QMIWWAN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_NET_PORT_MANAGER_QMIWWAN)) #define QMI_NET_PORT_MANAGER_QMIWWAN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_NET_PORT_MANAGER_QMIWWAN, QmiNetPortManagerQmiwwanClass)) typedef struct _QmiNetPortManagerQmiwwan QmiNetPortManagerQmiwwan; typedef struct _QmiNetPortManagerQmiwwanClass QmiNetPortManagerQmiwwanClass; typedef struct _QmiNetPortManagerQmiwwanPrivate QmiNetPortManagerQmiwwanPrivate; struct _QmiNetPortManagerQmiwwan { QmiNetPortManager parent; QmiNetPortManagerQmiwwanPrivate *priv; }; struct _QmiNetPortManagerQmiwwanClass { QmiNetPortManagerClass parent; }; GType qmi_net_port_manager_qmiwwan_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiNetPortManagerQmiwwan, g_object_unref) QmiNetPortManagerQmiwwan *qmi_net_port_manager_qmiwwan_new (const gchar *iface, GError **error); #endif /* _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_QMIWWAN_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-net-port-manager-rmnet.c000066400000000000000000000562271455567757300241110ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2020 Eric Caruso * Copyright (C) 2020 Andrew Lassalle */ #include #include #include /* This is a built-in file, not provided by the kernel headers, * used to add unconditional rmnet support if requested in the build */ #include #include #include /* The if_arp.h from libc may not have this symbol yet */ #if !defined ARPHRD_RAWIP #define ARPHRD_RAWIP 519 #endif #include #include #include #include "qmi-device.h" #include "qmi-error-types.h" #include "qmi-errors.h" #include "qmi-net-port-manager-rmnet.h" G_DEFINE_TYPE (QmiNetPortManagerRmnet, qmi_net_port_manager_rmnet, QMI_TYPE_NET_PORT_MANAGER) struct _QmiNetPortManagerRmnetPrivate { /* Netlink socket */ GSocket *socket; GSource *source; /* Netlink state */ guint current_sequence_id; GHashTable *transactions; }; #define RMNET_DATA_TYPE "rmnet" #define RMNET_MAX_MUX_ID 255 /*****************************************************************************/ static gchar * mux_id_to_ifname (const gchar *ifname_prefix, guint mux_id) { /* * By convention, ifname_prefix0 corresponds to mux ID 1, and so on. * A more defensive implementation of this class could always fetch * mux ID via netlink for each existing rmnet interface instead of * encoding it in the interface name in this manner, and then the * interface name could just be assigned incrementally regardless * of the mux ID. */ return g_strdup_printf ("%s%u", ifname_prefix, mux_id - 1); } /*****************************************************************************/ /* * Netlink message construction functions */ typedef GByteArray NetlinkMessage; typedef struct { struct nlmsghdr msghdr; struct ifinfomsg ifreq; } NetlinkHeader; static NetlinkHeader * netlink_message_header (NetlinkMessage *msg) { return (NetlinkHeader *) (msg->data); } static guint get_pos_of_next_attr (NetlinkMessage *msg) { return NLMSG_ALIGN (msg->len); } static void append_netlink_attribute (NetlinkMessage *msg, gushort type, gconstpointer value, gushort len) { guint attr_len; guint old_len; guint next_attr_rel_pos; char *next_attr_abs_pos; struct rtattr new_attr; /* Expand the buffer to hold the new attribute */ attr_len = RTA_ALIGN (RTA_LENGTH (len)); old_len = msg->len; next_attr_rel_pos = get_pos_of_next_attr (msg); g_byte_array_set_size (msg, next_attr_rel_pos + attr_len); /* fill new bytes with zero, since some padding is added between attributes. */ memset ((char *) msg->data + old_len, 0, msg->len - old_len); new_attr.rta_type = type; new_attr.rta_len = RTA_LENGTH (len); next_attr_abs_pos = (char *) msg->data + next_attr_rel_pos; memcpy (next_attr_abs_pos, &new_attr, sizeof (struct rtattr)); if (value) memcpy (RTA_DATA (next_attr_abs_pos), value, len); /* Update the total netlink message length */ netlink_message_header (msg)->msghdr.nlmsg_len = msg->len; } static void append_netlink_attribute_nested (NetlinkMessage *msg, gushort type) { append_netlink_attribute (msg, type, NULL, 0); } static void append_netlink_attribute_string (NetlinkMessage *msg, gushort type, const gchar *value) { append_netlink_attribute (msg, type, value, strlen (value)); } static void append_netlink_attribute_uint16 (NetlinkMessage *msg, gushort type, guint16 value) { append_netlink_attribute (msg, type, &value, sizeof (value)); } static void append_netlink_attribute_uint32 (NetlinkMessage *msg, gushort type, guint32 value) { append_netlink_attribute (msg, type, &value, sizeof (value)); } static NetlinkMessage * netlink_message_new (guint16 type, guint16 extra_flags) { NetlinkMessage *msg; NetlinkHeader *hdr; int size = sizeof (NetlinkHeader); msg = g_byte_array_new (); g_byte_array_set_size (msg, size); memset ((char *) msg->data, 0, size); hdr = netlink_message_header (msg); hdr->msghdr.nlmsg_len = msg->len; hdr->msghdr.nlmsg_type = type; hdr->msghdr.nlmsg_flags = NLM_F_REQUEST | NLM_F_ACK | extra_flags; hdr->ifreq.ifi_family = AF_UNSPEC; if (type != RTM_DELLINK) { hdr->ifreq.ifi_type = ARPHRD_RAWIP; hdr->ifreq.ifi_flags = 0; hdr->ifreq.ifi_change = 0xFFFFFFFF; } return msg; } static void netlink_message_free (NetlinkMessage *msg) { g_byte_array_unref (msg); } /*****************************************************************************/ typedef struct { QmiNetPortManagerRmnet *manager; guint32 sequence_id; GSource *timeout_source; GTask *completion_task; } Transaction; static gboolean transaction_timed_out (Transaction *tr) { GTask *task; guint32 sequence_id; task = g_steal_pointer (&tr->completion_task); sequence_id = tr->sequence_id; g_hash_table_remove (tr->manager->priv->transactions, GUINT_TO_POINTER (tr->sequence_id)); g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_TIMED_OUT, "Netlink message with sequence ID %u timed out", sequence_id); g_object_unref (task); return G_SOURCE_REMOVE; } static void transaction_complete_with_error (Transaction *tr, GError *error) { GTask *task; task = g_steal_pointer (&tr->completion_task); g_hash_table_remove (tr->manager->priv->transactions, GUINT_TO_POINTER (tr->sequence_id)); g_task_return_error (task, error); g_object_unref (task); } static void transaction_complete (Transaction *tr, gint saved_errno) { GTask *task; guint32 sequence_id; task = g_steal_pointer (&tr->completion_task); sequence_id = tr->sequence_id; g_hash_table_remove (tr->manager->priv->transactions, GUINT_TO_POINTER (tr->sequence_id)); if (!saved_errno) { g_task_return_boolean (task, TRUE); } else { g_task_return_new_error (task, G_IO_ERROR, g_io_error_from_errno (saved_errno), "Netlink message with transaction %u failed", sequence_id); } g_object_unref (task); } static void transaction_free (Transaction *tr) { g_assert (tr->completion_task == NULL); g_source_destroy (tr->timeout_source); g_source_unref (tr->timeout_source); g_slice_free (Transaction, tr); } static Transaction * transaction_new (QmiNetPortManagerRmnet *manager, NetlinkMessage *msg, guint timeout, GTask *task) { Transaction *tr; tr = g_slice_new0 (Transaction); tr->manager = manager; tr->sequence_id = ++manager->priv->current_sequence_id; netlink_message_header (msg)->msghdr.nlmsg_seq = tr->sequence_id; if (timeout) { tr->timeout_source = g_timeout_source_new_seconds (timeout); g_source_set_callback (tr->timeout_source, (GSourceFunc) transaction_timed_out, tr, NULL); g_source_attach (tr->timeout_source, g_main_context_get_thread_default ()); } tr->completion_task = g_object_ref (task); g_hash_table_insert (manager->priv->transactions, GUINT_TO_POINTER (tr->sequence_id), tr); return tr; } /*****************************************************************************/ static NetlinkMessage * netlink_message_new_link (guint mux_id, gchar *ifname, guint base_if_index, guint rmnet_flags, guint rmnet_mask) { NetlinkMessage *msg; guint linkinfo_pos, datainfo_pos; struct rtattr info; struct ifla_rmnet_flags flags; g_assert (mux_id != QMI_DEVICE_MUX_ID_UNBOUND); msg = netlink_message_new (RTM_NEWLINK, NLM_F_CREATE | NLM_F_EXCL); append_netlink_attribute_uint32 (msg, IFLA_LINK, base_if_index); append_netlink_attribute_string (msg, IFLA_IFNAME, ifname); /* Store the position of the next attribute to adjust its length later. */ linkinfo_pos = get_pos_of_next_attr (msg); append_netlink_attribute_nested (msg, IFLA_LINKINFO); append_netlink_attribute_string (msg, IFLA_INFO_KIND, RMNET_DATA_TYPE); /* Store the position of the next attribute to adjust its length later. */ datainfo_pos = get_pos_of_next_attr (msg); append_netlink_attribute_nested (msg, IFLA_INFO_DATA); append_netlink_attribute_uint16 (msg, IFLA_RMNET_MUX_ID, mux_id); flags.flags = rmnet_flags; flags.mask = rmnet_mask; append_netlink_attribute (msg, IFLA_RMNET_FLAGS, &flags, sizeof (struct ifla_rmnet_flags)); /* Use memcpy to preserve byte alignment */ memcpy (&info, (char *) msg->data + datainfo_pos, sizeof (struct rtattr)); info.rta_len = msg->len - datainfo_pos; memcpy ((char *) msg->data + datainfo_pos, &info, sizeof (struct rtattr)); memcpy (&info, (char *) msg->data + linkinfo_pos, sizeof (struct rtattr)); info.rta_len = msg->len - linkinfo_pos; memcpy ((char *) msg->data + linkinfo_pos, &info, sizeof (struct rtattr)); return msg; } static NetlinkMessage * netlink_message_del_link (guint ifindex) { NetlinkMessage *msg; g_assert (ifindex != 0); msg = netlink_message_new (RTM_DELLINK, 0); netlink_message_header (msg)->ifreq.ifi_index = ifindex; return msg; } /*****************************************************************************/ static gboolean netlink_message_cb (GSocket *socket, GIOCondition condition, QmiNetPortManagerRmnet *self) { GError *error = NULL; gchar buf[512]; int bytes_received; unsigned int buffer_len; struct nlmsghdr *hdr; if (condition & G_IO_HUP || condition & G_IO_ERR) { g_warning ("[netlink] socket connection closed."); return G_SOURCE_REMOVE; } bytes_received = g_socket_receive (socket, buf, sizeof (buf), NULL, &error); if (bytes_received < 0) { g_warning ("[netlink] socket i/o failure: %s", error->message); g_error_free (error); return G_SOURCE_REMOVE; } buffer_len = (unsigned int ) bytes_received; for (hdr = (struct nlmsghdr *) buf; NLMSG_OK (hdr, buffer_len); NLMSG_NEXT (hdr, buffer_len)) { Transaction *tr; struct nlmsgerr *err; if (hdr->nlmsg_type != NLMSG_ERROR) continue; tr = g_hash_table_lookup (self->priv->transactions, GUINT_TO_POINTER (hdr->nlmsg_seq)); if (!tr) continue; err = NLMSG_DATA (buf); transaction_complete (tr, err->error); } return G_SOURCE_CONTINUE; } /*****************************************************************************/ static guint get_first_free_mux_id (QmiNetPortManagerRmnet *self, const gchar *ifname_prefix) { guint i; /* Note that this function does not actually need to use the * QmiNetPortManagerRmnet at the moment. But it will if we ever do rewrite it * to inspect mux IDs of existing rmnet interfaces, so we will pass it * for now. */ for (i = QMI_DEVICE_MUX_ID_MIN; i <= QMI_DEVICE_MUX_ID_MAX; i++) { gchar *ifname; gboolean mux_id_is_free; ifname = mux_id_to_ifname (ifname_prefix, i); mux_id_is_free = !if_nametoindex (ifname); g_free (ifname); if (mux_id_is_free) return i; } return QMI_DEVICE_MUX_ID_UNBOUND; } /*****************************************************************************/ typedef struct { guint mux_id; gchar *ifname; } AddLinkContext; static void add_link_context_free (AddLinkContext *ctx) { g_free (ctx->ifname); g_free (ctx); } static gchar * net_port_manager_add_link_finish (QmiNetPortManager *self, guint *mux_id, GAsyncResult *res, GError **error) { AddLinkContext *ctx; ctx = g_task_get_task_data (G_TASK (res)); if (!g_task_propagate_boolean (G_TASK (res), error)) { g_prefix_error (error, "Failed to add link with mux id %d: ", ctx->mux_id); return NULL; } *mux_id = ctx->mux_id; return g_steal_pointer (&ctx->ifname); } static void net_port_manager_add_link (QmiNetPortManager *_self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, QmiDeviceAddLinkFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiNetPortManagerRmnet *self = QMI_NET_PORT_MANAGER_RMNET (_self); NetlinkMessage *msg; Transaction *tr; GTask *task; GError *error = NULL; gssize bytes_sent; guint base_if_index; AddLinkContext *ctx; guint rmnet_flags; guint rmnet_mask; task = g_task_new (self, cancellable, callback, user_data); ctx = g_new0 (AddLinkContext, 1); ctx->mux_id = mux_id; g_task_set_task_data (task, ctx, (GDestroyNotify) add_link_context_free); if (ctx->mux_id == QMI_DEVICE_MUX_ID_UNBOUND) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Tried to create interface for unbound mux ID"); g_object_unref (task); return; } if (ctx->mux_id == QMI_DEVICE_MUX_ID_AUTOMATIC) { ctx->mux_id = get_first_free_mux_id (self, ifname_prefix); g_debug ("Using dynamic mux ID %u", ctx->mux_id); if (ctx->mux_id == QMI_DEVICE_MUX_ID_UNBOUND) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Failed to find an available mux ID"); g_object_unref (task); return; } } else g_debug ("Using static mux ID %u", ctx->mux_id); base_if_index = if_nametoindex (base_ifname); if (!base_if_index) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "%s interface is not available", base_ifname); g_object_unref (task); return; } ctx->ifname = mux_id_to_ifname (ifname_prefix, ctx->mux_id); /* Convert flags from libqmi API to rmnet API */ rmnet_flags = RMNET_FLAGS_INGRESS_DEAGGREGATION; if (flags & QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV4) rmnet_flags |= RMNET_FLAGS_INGRESS_MAP_CKSUMV4; if (flags & QMI_DEVICE_ADD_LINK_FLAGS_EGRESS_MAP_CKSUMV4) rmnet_flags |= RMNET_FLAGS_EGRESS_MAP_CKSUMV4; if (flags & QMI_DEVICE_ADD_LINK_FLAGS_INGRESS_MAP_CKSUMV5) rmnet_flags |= RMNET_FLAGS_INGRESS_MAP_CKSUMV5; if (flags & QMI_DEVICE_ADD_LINK_FLAGS_EGRESS_MAP_CKSUMV5) rmnet_flags |= RMNET_FLAGS_EGRESS_MAP_CKSUMV5; rmnet_mask = (RMNET_FLAGS_EGRESS_MAP_CKSUMV4 | RMNET_FLAGS_INGRESS_MAP_CKSUMV4 | RMNET_FLAGS_EGRESS_MAP_CKSUMV5 | RMNET_FLAGS_INGRESS_MAP_CKSUMV5 | RMNET_FLAGS_INGRESS_DEAGGREGATION); msg = netlink_message_new_link (ctx->mux_id, ctx->ifname, base_if_index, rmnet_flags, rmnet_mask); /* The task ownership is transferred to the transaction. */ tr = transaction_new (self, msg, timeout, task); bytes_sent = g_socket_send (self->priv->socket, (const gchar *) msg->data, msg->len, cancellable, &error); netlink_message_free (msg); if (bytes_sent < 0) transaction_complete_with_error (tr, error); g_object_unref (task); } static gboolean net_port_manager_del_link_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void net_port_manager_del_link (QmiNetPortManager *_self, const gchar *ifname, guint mux_id_unused, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QmiNetPortManagerRmnet *self = QMI_NET_PORT_MANAGER_RMNET (_self); guint ifindex; NetlinkMessage *msg; Transaction *tr; GTask *task; GError *error = NULL; gssize bytes_sent; task = g_task_new (self, cancellable, callback, user_data); ifindex = if_nametoindex (ifname); if (ifindex == 0) { g_task_return_new_error (task, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Failed to retrieve interface index for interface:%s", ifname); g_object_unref (task); return; } msg = netlink_message_del_link (ifindex); /* The task ownership is transferred to the transaction. */ tr = transaction_new (self, msg, timeout, task); bytes_sent = g_socket_send (self->priv->socket, (const gchar *) msg->data, msg->len, cancellable, &error); netlink_message_free (msg); if (bytes_sent < 0) transaction_complete_with_error (tr, error); g_object_unref (task); } /*****************************************************************************/ QmiNetPortManagerRmnet * qmi_net_port_manager_rmnet_new (GError **error) { QmiNetPortManagerRmnet *self; gint socket_fd; GSocket *gsocket; GError *inner_error = NULL; socket_fd = socket (AF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); if (socket_fd < 0) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Failed to create netlink socket"); return NULL; } gsocket = g_socket_new_from_fd (socket_fd, &inner_error); if (inner_error) { g_debug ("Could not create socket: %s", inner_error->message); close (socket_fd); g_propagate_error (error, inner_error); return NULL; } self = g_object_new (QMI_TYPE_NET_PORT_MANAGER_RMNET, NULL); self->priv->socket = gsocket; self->priv->source = g_socket_create_source (self->priv->socket, G_IO_IN | G_IO_ERR | G_IO_HUP, NULL); g_source_set_callback (self->priv->source, (GSourceFunc) netlink_message_cb, self, NULL); g_source_attach (self->priv->source, g_main_context_get_thread_default ()); self->priv->current_sequence_id = 0; self->priv->transactions = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) transaction_free); return self; } /*****************************************************************************/ static void qmi_net_port_manager_rmnet_init (QmiNetPortManagerRmnet *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QMI_TYPE_NET_PORT_MANAGER_RMNET, QmiNetPortManagerRmnetPrivate); } static void dispose (GObject *object) { QmiNetPortManagerRmnet *self = QMI_NET_PORT_MANAGER_RMNET (object); g_assert (g_hash_table_size (self->priv->transactions) == 0); g_clear_pointer (&self->priv->transactions, g_hash_table_unref); if (self->priv->source) g_source_destroy (self->priv->source); g_clear_pointer (&self->priv->source, g_source_unref); g_clear_object (&self->priv->socket); G_OBJECT_CLASS (qmi_net_port_manager_rmnet_parent_class)->dispose (object); } static void qmi_net_port_manager_rmnet_class_init (QmiNetPortManagerRmnetClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); QmiNetPortManagerClass *net_port_manager_class = QMI_NET_PORT_MANAGER_CLASS (klass); g_type_class_add_private (object_class, sizeof (QmiNetPortManagerRmnetPrivate)); object_class->dispose = dispose; net_port_manager_class->add_link = net_port_manager_add_link; net_port_manager_class->add_link_finish = net_port_manager_add_link_finish; net_port_manager_class->del_link = net_port_manager_del_link; net_port_manager_class->del_link_finish = net_port_manager_del_link_finish; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-net-port-manager-rmnet.h000066400000000000000000000051451455567757300241070ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2020 Eric Caruso * Copyright (C) 2020 Andrew Lassalle */ #ifndef _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_RMNET_H_ #define _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_RMNET_H_ #include #include #include "qmi-net-port-manager.h" #define QMI_TYPE_NET_PORT_MANAGER_RMNET (qmi_net_port_manager_rmnet_get_type ()) #define QMI_NET_PORT_MANAGER_RMNET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_NET_PORT_MANAGER_RMNET, QmiNetPortManagerRmnet)) #define QMI_NET_PORT_MANAGER_RMNET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_NET_PORT_MANAGER_RMNET, QmiNetPortManagerRmnetClass)) #define QMI_IS_NET_PORT_MANAGER_RMNET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_NET_PORT_MANAGER_RMNET)) #define QMI_IS_NET_PORT_MANAGER_RMNET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_NET_PORT_MANAGER_RMNET)) #define QMI_NET_PORT_MANAGER_RMNET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_NET_PORT_MANAGER_RMNET, QmiNetPortManagerRmnetClass)) typedef struct _QmiNetPortManagerRmnet QmiNetPortManagerRmnet; typedef struct _QmiNetPortManagerRmnetClass QmiNetPortManagerRmnetClass; typedef struct _QmiNetPortManagerRmnetPrivate QmiNetPortManagerRmnetPrivate; struct _QmiNetPortManagerRmnet { QmiNetPortManager parent; QmiNetPortManagerRmnetPrivate *priv; }; struct _QmiNetPortManagerRmnetClass { QmiNetPortManagerClass parent; }; GType qmi_net_port_manager_rmnet_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiNetPortManagerRmnet, g_object_unref) QmiNetPortManagerRmnet *qmi_net_port_manager_rmnet_new (GError **error); #endif /* _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_RMNET_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-net-port-manager.c000066400000000000000000000215141455567757300227550ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2021 Aleksander Morgado */ #include "qmi-net-port-manager.h" #include "qmi-device.h" #include "qmi-helpers.h" G_DEFINE_ABSTRACT_TYPE (QmiNetPortManager, qmi_net_port_manager, G_TYPE_OBJECT) /*****************************************************************************/ void qmi_net_port_manager_add_link (QmiNetPortManager *self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, QmiDeviceAddLinkFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QMI_NET_PORT_MANAGER_GET_CLASS (self)->add_link (self, mux_id, base_ifname, ifname_prefix, flags, timeout, cancellable, callback, user_data); } gchar * qmi_net_port_manager_add_link_finish (QmiNetPortManager *self, guint *mux_id, GAsyncResult *res, GError **error) { return QMI_NET_PORT_MANAGER_GET_CLASS (self)->add_link_finish (self, mux_id, res, error); } void qmi_net_port_manager_del_link (QmiNetPortManager *self, const gchar *ifname, guint mux_id, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QMI_NET_PORT_MANAGER_GET_CLASS (self)->del_link (self, ifname, mux_id, timeout, cancellable, callback, user_data); } gboolean qmi_net_port_manager_del_link_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error) { return QMI_NET_PORT_MANAGER_GET_CLASS (self)->del_link_finish (self, res, error); } void qmi_net_port_manager_del_all_links (QmiNetPortManager *self, const gchar *base_ifname, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { QMI_NET_PORT_MANAGER_GET_CLASS (self)->del_all_links (self, base_ifname, cancellable, callback, user_data); } gboolean qmi_net_port_manager_del_all_links_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error) { return QMI_NET_PORT_MANAGER_GET_CLASS (self)->del_all_links_finish (self, res, error); } gboolean qmi_net_port_manager_list_links (QmiNetPortManager *self, const gchar *base_ifname, GPtrArray **out_links, GError **error) { return QMI_NET_PORT_MANAGER_GET_CLASS (self)->list_links (self, base_ifname, out_links, error); } /*****************************************************************************/ /* Default implementations */ static gboolean net_port_manager_list_links (QmiNetPortManager *self, const gchar *base_ifname, GPtrArray **out_links, GError **error) { g_autoptr(GFile) sysfs_file = NULL; g_autofree gchar *sysfs_path = NULL; sysfs_path = g_strdup_printf ("/sys/class/net/%s", base_ifname); sysfs_file = g_file_new_for_path (sysfs_path); return qmi_helpers_list_links (sysfs_file, NULL, NULL, out_links, error); } typedef struct { GPtrArray *links; guint link_i; } DelAllLinksContext; static void del_all_links_context_free (DelAllLinksContext *ctx) { g_clear_pointer (&ctx->links, g_ptr_array_unref); g_slice_free (DelAllLinksContext, ctx); } static gboolean net_port_manager_del_all_links_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void delete_next_link (GTask *task); static void port_manager_del_link_ready (QmiNetPortManager *self, GAsyncResult *res, GTask *task) { DelAllLinksContext *ctx; GError *error = NULL; ctx = g_task_get_task_data (task); if (!qmi_net_port_manager_del_link_finish (self, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } g_ptr_array_remove_index_fast (ctx->links, 0); delete_next_link (task); } static void delete_next_link (GTask *task) { QmiNetPortManager *self; DelAllLinksContext *ctx; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); if (!ctx->links || ctx->links->len == 0) { g_task_return_boolean (task, TRUE); g_object_unref (task); return; } qmi_net_port_manager_del_link (self, g_ptr_array_index (ctx->links, 0), QMI_DEVICE_MUX_ID_UNBOUND, 5, g_task_get_cancellable (task), (GAsyncReadyCallback)port_manager_del_link_ready, task); } static void net_port_manager_del_all_links (QmiNetPortManager *self, const gchar *base_ifname, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; DelAllLinksContext *ctx; GError *error = NULL; task = g_task_new (self, cancellable, callback, user_data); ctx = g_slice_new0 (DelAllLinksContext); g_task_set_task_data (task, ctx, (GDestroyNotify)del_all_links_context_free); if (!qmi_net_port_manager_list_links (self, base_ifname, &ctx->links, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } delete_next_link (task); } /*****************************************************************************/ static void qmi_net_port_manager_init (QmiNetPortManager *self) { } static void qmi_net_port_manager_class_init (QmiNetPortManagerClass *klass) { klass->list_links = net_port_manager_list_links; klass->del_all_links = net_port_manager_del_all_links; klass->del_all_links_finish = net_port_manager_del_all_links_finish; } libqmi-1.35.2-dev/src/libqmi-glib/qmi-net-port-manager.h000066400000000000000000000165501455567757300227660ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2020-2021 Eric Caruso * Copyright (C) 2020-2021 Andrew Lassalle * Copyright (C) 2021 Aleksander Morgado */ #ifndef _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_H_ #define _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_H_ #include #include #include "qmi-device.h" #define QMI_TYPE_NET_PORT_MANAGER (qmi_net_port_manager_get_type ()) #define QMI_NET_PORT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_NET_PORT_MANAGER, QmiNetPortManager)) #define QMI_NET_PORT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_NET_PORT_MANAGER, QmiNetPortManagerClass)) #define QMI_IS_NET_PORT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_NET_PORT_MANAGER)) #define QMI_IS_NET_PORT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QMI_TYPE_NET_PORT_MANAGER)) #define QMI_NET_PORT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_NET_PORT_MANAGER, QmiNetPortManagerClass)) typedef struct _QmiNetPortManager QmiNetPortManager; typedef struct _QmiNetPortManagerClass QmiNetPortManagerClass; struct _QmiNetPortManager { GObject parent; }; struct _QmiNetPortManagerClass { GObjectClass parent; gboolean (* list_links) (QmiNetPortManager *self, const gchar *base_ifname, GPtrArray **out_links, GError **error); void (* add_link) (QmiNetPortManager *self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, QmiDeviceAddLinkFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gchar * (* add_link_finish) (QmiNetPortManager *self, guint *mux_id, GAsyncResult *res, GError **error); void (* del_link) (QmiNetPortManager *self, const gchar *ifname, guint mux_id, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (* del_link_finish) (QmiNetPortManager *self, GAsyncResult *res, GError **error); void (* del_all_links) (QmiNetPortManager *self, const gchar *base_ifname, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (* del_all_links_finish) (QmiNetPortManager *self, GAsyncResult *res, GError **error); }; GType qmi_net_port_manager_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiNetPortManager, g_object_unref) gboolean qmi_net_port_manager_list_links (QmiNetPortManager *self, const gchar *base_ifname, GPtrArray **out_links, GError **error); void qmi_net_port_manager_add_link (QmiNetPortManager *self, guint mux_id, const gchar *base_ifname, const gchar *ifname_prefix, QmiDeviceAddLinkFlags flags, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gchar *qmi_net_port_manager_add_link_finish (QmiNetPortManager *self, guint *mux_id, GAsyncResult *res, GError **error); void qmi_net_port_manager_del_link (QmiNetPortManager *self, const gchar *ifname, guint mux_id, guint timeout, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qmi_net_port_manager_del_link_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error); void qmi_net_port_manager_del_all_links (QmiNetPortManager *self, const gchar *base_ifname, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qmi_net_port_manager_del_all_links_finish (QmiNetPortManager *self, GAsyncResult *res, GError **error); #endif /* _LIBQMI_GLIB_QMI_NET_PORT_MANAGER_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-proxy.c000066400000000000000000001206331455567757300207600ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2013-2017 */ #include #include #include #include #include #include #include #include #include "config.h" #include "qmi-enum-types.h" #include "qmi-flag-types.h" #include "qmi-error-types.h" #include "qmi-device.h" #include "qmi-ctl.h" #include "qmi-helpers.h" #include "qmi-proxy.h" #include "qmi-version.h" #if QMI_QRTR_SUPPORTED # include "libqrtr-glib.h" #endif #define BUFFER_SIZE 512 #define QMI_MESSAGE_OUTPUT_TLV_RESULT 0x02 #define QMI_MESSAGE_OUTPUT_TLV_ALLOCATION_INFO 0x01 #define QMI_MESSAGE_CTL_ALLOCATE_CID 0x0022 #define QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR 0xFF22 #define QMI_MESSAGE_INPUT_TLV_RELEASE_INFO 0x01 #define QMI_MESSAGE_CTL_RELEASE_CID 0x0023 #define QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR 0xFF23 #define QMI_MESSAGE_CTL_INTERNAL_PROXY_OPEN 0xFF00 #define QMI_MESSAGE_CTL_INTERNAL_PROXY_OPEN_INPUT_TLV_DEVICE_PATH 0x01 G_DEFINE_TYPE (QmiProxy, qmi_proxy, G_TYPE_OBJECT) enum { PROP_0, PROP_N_CLIENTS, PROP_LAST }; static GParamSpec *properties[PROP_LAST]; struct _QmiProxyPrivate { /* Unix socket service */ GSocketService *socket_service; /* Client applications */ GList *clients; /* Devices */ GList *devices; /* Array of QMI client infos that are not owned by any client * application (e.g. they were allocated by a client application but * then not explicitly released). */ GArray *disowned_qmi_client_info_array; #if QMI_QRTR_SUPPORTED QrtrBus *qrtr_bus; #endif }; /*****************************************************************************/ guint qmi_proxy_get_n_clients (QmiProxy *self) { g_return_val_if_fail (QMI_IS_PROXY (self), 0); return g_list_length (self->priv->clients); } /*****************************************************************************/ typedef struct { QmiService service; guint8 cid; } QmiClientInfo; typedef struct { volatile gint ref_count; QmiProxy *proxy; /* not full ref */ /* client socket connection context */ GSocketConnection *connection; GSource *connection_readable_source; GByteArray *buffer; /* QMI device associated to connection */ QmiDevice *device; QmiMessage *internal_proxy_open_request; GArray *qmi_client_info_array; guint indication_id; guint device_removed_id; #if QMI_QRTR_SUPPORTED guint node_id; #endif } Client; static gboolean connection_readable_cb (GSocket *socket, GIOCondition condition, Client *client); static void track_client (QmiProxy *self, Client *client); static void untrack_client (QmiProxy *self, Client *client); static void client_disconnect (Client *client) { if (client->connection_readable_source) { g_source_destroy (client->connection_readable_source); g_source_unref (client->connection_readable_source); client->connection_readable_source = 0; } if (client->connection) { g_debug ("Client (%d) connection closed...", g_socket_get_fd (g_socket_connection_get_socket (client->connection))); g_output_stream_close (g_io_stream_get_output_stream (G_IO_STREAM (client->connection)), NULL, NULL); g_object_unref (client->connection); client->connection = NULL; } } static void client_unref (Client *client) { if (g_atomic_int_dec_and_test (&client->ref_count)) { /* Ensure disconnected */ client_disconnect (client); if (client->device) { if (g_signal_handler_is_connected (client->device, client->indication_id)) g_signal_handler_disconnect (client->device, client->indication_id); if (g_signal_handler_is_connected (client->device, client->device_removed_id)) g_signal_handler_disconnect (client->device, client->device_removed_id); g_object_unref (client->device); } g_clear_pointer (&client->buffer, g_byte_array_unref); g_clear_pointer (&client->internal_proxy_open_request, g_byte_array_unref); g_clear_pointer (&client->qmi_client_info_array, g_array_unref); g_slice_free (Client, client); } } G_DEFINE_AUTOPTR_CLEANUP_FUNC (Client, client_unref) static Client * client_ref (Client *client) { g_atomic_int_inc (&client->ref_count); return client; } static gboolean client_send_message (Client *client, QmiMessage *message, GError **error) { if (!client->connection) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE, "Cannot send message: not connected"); return FALSE; } g_debug ("Client (%d) TX: %u bytes", g_socket_get_fd (g_socket_connection_get_socket (client->connection)), message->len); if (!g_output_stream_write_all (g_io_stream_get_output_stream (G_IO_STREAM (client->connection)), message->data, message->len, NULL, /* bytes_written */ NULL, /* cancellable */ error)) { g_prefix_error (error, "Cannot send message to client: "); return FALSE; } return TRUE; } /*****************************************************************************/ /* Track/untrack clients */ static void track_client (QmiProxy *self, Client *client) { self->priv->clients = g_list_append (self->priv->clients, client_ref (client)); g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_CLIENTS]); } static void disown_not_released_clients (QmiProxy *self, Client *client) { guint i; if (!client->qmi_client_info_array || !client->qmi_client_info_array->len) return; for (i = 0; i < client->qmi_client_info_array->len; i++) { QmiClientInfo *info; info = &g_array_index (client->qmi_client_info_array, QmiClientInfo, i); g_debug ("QMI client disowned [%s,%s,%u]", qmi_device_get_path_display (client->device), qmi_service_get_string (info->service), info->cid); } if (!self->priv->disowned_qmi_client_info_array) self->priv->disowned_qmi_client_info_array = g_steal_pointer (&client->qmi_client_info_array); else { self->priv->disowned_qmi_client_info_array = g_array_append_vals (self->priv->disowned_qmi_client_info_array, client->qmi_client_info_array->data, client->qmi_client_info_array->len); g_clear_pointer (&client->qmi_client_info_array, g_array_unref); } } static void device_close_if_unused (QmiProxy *self, QmiDevice *device); static void untrack_client (QmiProxy *self, Client *client) { g_autoptr(QmiDevice) device = NULL; device = client->device ? g_object_ref (client->device) : NULL; /* Disconnect the client explicitly when untracking */ client_disconnect (client); /* Disown all QMI clients that were not explicitly released */ disown_not_released_clients (self, client); if (g_list_find (self->priv->clients, client)) { self->priv->clients = g_list_remove (self->priv->clients, client); client_unref (client); g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_N_CLIENTS]); } if (device) device_close_if_unused (self, device); } static QmiDevice * find_device_for_path (QmiProxy *self, const gchar *path) { GList *l; for (l = self->priv->devices; l; l = g_list_next (l)) { QmiDevice *device; device = (QmiDevice *)l->data; /* Return if found */ if (g_str_equal (qmi_device_get_path (device), path)) return device; } return NULL; } static void complete_internal_proxy_open (QmiProxy *self, Client *client) { QmiMessage *response; GError *error = NULL; g_debug ("connection to QMI device '%s' established", qmi_device_get_path (client->device)); g_assert (client->internal_proxy_open_request != NULL); response = qmi_message_response_new (client->internal_proxy_open_request, QMI_PROTOCOL_ERROR_NONE); qmi_message_unref (client->internal_proxy_open_request); client->internal_proxy_open_request = NULL; if (!client_send_message (client, response, &error)) { g_warning ("couldn't send proxy open response to client: %s", error->message); g_error_free (error); untrack_client (self, client); } qmi_message_unref (response); } static void indication_cb (QmiDevice *device, QmiMessage *message, Client *client) { guint i; if (!client->qmi_client_info_array) return; for (i = 0; i < client->qmi_client_info_array->len; i++) { QmiClientInfo *info; info = &g_array_index (client->qmi_client_info_array, QmiClientInfo, i); /* If service and CID match; or if service and broadcast, forward to * the remote client. This message may therefore be forwarded to multiple * clients, all that match the conditions. */ if ((qmi_message_get_service (message) == info->service) && (qmi_message_get_client_id (message) == info->cid || qmi_message_get_client_id (message) == QMI_CID_BROADCAST)) { GError *error = NULL; if (!client_send_message (client, message, &error)) { g_warning ("couldn't forward indication to client: %s", error->message); g_error_free (error); } } } } static void device_removed_cb (QmiDevice *device, Client *client) { untrack_client (client->proxy, client); } static void register_signal_handlers (Client *client) { /* Register for device indications */ client->indication_id = g_signal_connect (client->device, "indication", G_CALLBACK (indication_cb), client); client->device_removed_id = g_signal_connect (client->device, "device-removed", G_CALLBACK (device_removed_cb), client); } static void device_open_ready (QmiDevice *device, GAsyncResult *res, Client *client) { QmiProxy *self = client->proxy; QmiDevice *existing; GError *error = NULL; /* Note: we get a full client ref */ if (!qmi_device_open_finish (device, res, &error)) { g_debug ("couldn't open QMI device: %s", error->message); g_error_free (error); untrack_client (self, client); goto out; } /* Store device in the proxy independently */ existing = find_device_for_path (self, qmi_device_get_path (client->device)); if (existing) { /* Race condition, we created two QmiDevices for the same port, just skip ours, no big deal */ g_object_unref (client->device); client->device = g_object_ref (existing); } else { /* Keep the newly added device in the proxy */ self->priv->devices = g_list_append (self->priv->devices, g_object_ref (client->device)); } register_signal_handlers (client); complete_internal_proxy_open (self, client); out: /* Balance out the reference we got */ client_unref (client); } static void device_new_ready (GObject *source, GAsyncResult *res, Client *client) { QmiProxy *self = client->proxy; GError *error = NULL; /* Note: we get a full client ref */ client->device = qmi_device_new_finish (res, &error); if (!client->device) { g_debug ("couldn't open QMI device: %s", error->message); g_error_free (error); untrack_client (self, client); goto out; } qmi_device_open (client->device, QMI_DEVICE_OPEN_FLAGS_NONE, 10, NULL, (GAsyncReadyCallback)device_open_ready, client_ref (client)); /* Full ref */ out: /* Balance out the reference we got */ client_unref (client); } #if QMI_QRTR_SUPPORTED static void device_from_node (QmiProxy *self, Client *client) { QrtrNode *node; g_assert (self->priv->qrtr_bus); node = qrtr_bus_peek_node (self->priv->qrtr_bus, client->node_id); if (!node) { g_debug ("node with id %u not found in QRTR bus", client->node_id); untrack_client (self, client); return; } qmi_device_new_from_node (node, NULL, (GAsyncReadyCallback)device_new_ready, client_ref (client)); /* full reference */ } static void bus_new_ready (GObject *source, GAsyncResult *res, Client *client) { QmiProxy *self; g_autoptr(QrtrBus) qrtr_bus = NULL; g_autoptr(GError) error = NULL; /* Note: we get a full client ref */ self = client->proxy; qrtr_bus = qrtr_bus_new_finish (res, &error); if (!qrtr_bus) { g_debug ("couldn't access QRTR bus: %s", error->message); untrack_client (self, client); client_unref (client); return; } /* Don't store the new bus if some other concurrent request already did * it. We don't really care which bus object to use, we just need to use * always the same */ if (!self->priv->qrtr_bus) self->priv->qrtr_bus = g_object_ref (qrtr_bus); device_from_node (self, client); client_unref (client); } #endif static gboolean process_internal_proxy_open (QmiProxy *self, Client *client, QmiMessage *message) { gsize offset = 0; gsize init_offset; g_autofree gchar *incoming_path = NULL; g_autofree gchar *device_file_path = NULL; g_autoptr(GError) error = NULL; if ((init_offset = qmi_message_tlv_read_init (message, QMI_MESSAGE_CTL_INTERNAL_PROXY_OPEN_INPUT_TLV_DEVICE_PATH, NULL, &error)) == 0) { g_debug ("ignoring message from client: invalid proxy open request: %s", error->message); return FALSE; } if (!qmi_message_tlv_read_string (message, init_offset, &offset, 0, 0, &incoming_path, &error)) { g_debug ("ignoring message from client: invalid device file path: %s", error->message); return FALSE; } /* The incoming path may be a symlink. In the proxy, we always use the real path of the * device, so that clients using different symlinks for the same file don't collide with * each other. */ device_file_path = qmi_helpers_get_devpath (incoming_path, &error); if (!device_file_path) { g_warning ("Error looking up real device path: %s", error->message); return FALSE; } /* The remaining size of the buffer needs to be 0 if we successfully read the TLV */ if ((offset = qmi_message_tlv_read_remaining_size (message, init_offset, offset)) > 0) g_warning ("Left '%" G_GSIZE_FORMAT "' bytes unread when getting the 'Device Path' TLV", offset); g_debug ("valid request to open connection to QMI device file: %s", device_file_path); /* Keep it */ client->internal_proxy_open_request = qmi_message_ref (message); client->device = find_device_for_path (self, device_file_path); /* Need to create a device ourselves */ if (!client->device) { #if QMI_QRTR_SUPPORTED if (qrtr_get_node_for_uri (device_file_path, &client->node_id)) { if (!self->priv->qrtr_bus) { qrtr_bus_new (1000, /* ms */ NULL, (GAsyncReadyCallback)bus_new_ready, client_ref (client)); /* Full ref */ return TRUE; } device_from_node (self, client); return TRUE; } #endif { g_autoptr(GFile) file = NULL; file = g_file_new_for_path (device_file_path); qmi_device_new (file, NULL, (GAsyncReadyCallback)device_new_ready, client_ref (client)); /* Full ref */ return TRUE; } } register_signal_handlers (client); /* Keep a reference to the device in the client */ g_object_ref (client->device); complete_internal_proxy_open (self, client); return FALSE; } static gint qmi_client_info_array_lookup_cid (GArray *array, QmiService service, guint8 cid) { guint i; if (!array) return -1; for (i = 0; i < array->len; i++) { QmiClientInfo *item; item = &g_array_index (array, QmiClientInfo, i); if (item->service == service && item->cid == cid) return (gint)i; } return -1; } static void track_cid (Client *client, QmiMessage *message) { g_autoptr(GError) error = NULL; gsize offset = 0; gsize init_offset; guint16 error_status; guint16 error_code; QmiClientInfo info; gint i; g_assert_cmpuint (qmi_message_get_service (message), ==, QMI_SERVICE_CTL); g_assert (qmi_message_is_response (message)); if (((init_offset = qmi_message_tlv_read_init (message, QMI_MESSAGE_OUTPUT_TLV_RESULT, NULL, &error)) == 0) || !qmi_message_tlv_read_guint16 (message, init_offset, &offset, QMI_ENDIAN_LITTLE, &error_status, &error) || !qmi_message_tlv_read_guint16 (message, init_offset, &offset, QMI_ENDIAN_LITTLE, &error_code, &error)) { g_warning ("invalid 'CTL allocate CID' response: missing or invalid result TLV: %s", error->message); return; } g_warn_if_fail (qmi_message_tlv_read_remaining_size (message, init_offset, offset) == 0); if ((error_status != 0x00) || (error_code != QMI_PROTOCOL_ERROR_NONE)) return; offset = 0; if ((init_offset = qmi_message_tlv_read_init (message, QMI_MESSAGE_OUTPUT_TLV_ALLOCATION_INFO, NULL, &error)) == 0) { g_warning ("invalid 'CTL allocate CID' response: missing allocation info TLV: %s", error->message); return; } if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_ALLOCATE_CID) { guint8 service_tmp; if (!qmi_message_tlv_read_guint8 (message, init_offset, &offset, &service_tmp, &error)) { g_warning ("invalid 'CTL allocate CID' request: failed to read service: %s", error->message); return; } info.service = (QmiService)service_tmp; } else if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR) { guint16 service_tmp; if (!qmi_message_tlv_read_guint16 (message, init_offset, &offset, QMI_ENDIAN_LITTLE, &service_tmp, &error)) { g_warning ("invalid 'CTL allocate CID QRTR' request: failed to read service: %s", error->message); return; } info.service = (QmiService)service_tmp; } if (!qmi_message_tlv_read_guint8 (message, init_offset, &offset, &(info.cid), &error)) { g_warning ("invalid 'CTL allocate CID' request: failed to read client id: %s", error->message); return; } /* Check if it already exists */ i = qmi_client_info_array_lookup_cid (client->qmi_client_info_array, info.service, info.cid); if (i < 0) { g_debug ("QMI client tracked [%s,%s,%u]", qmi_device_get_path_display (client->device), qmi_service_get_string (info.service), info.cid); g_array_append_val (client->qmi_client_info_array, info); } } static void untrack_cid (QmiProxy *self, Client *client, QmiMessage *message) { g_autoptr(GError) error = NULL; gsize offset = 0; gsize init_offset; QmiClientInfo info; gint i; g_assert_cmpuint (qmi_message_get_service (message), ==, QMI_SERVICE_CTL); g_assert (qmi_message_is_request (message)); if ((init_offset = qmi_message_tlv_read_init (message, QMI_MESSAGE_INPUT_TLV_RELEASE_INFO, NULL, &error)) == 0) { g_warning ("invalid 'CTL release CID' request: missing release info TLV: %s", error->message); return; } if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_RELEASE_CID) { guint8 service_tmp; if (!qmi_message_tlv_read_guint8 (message, init_offset, &offset, &service_tmp, &error)) { g_warning ("invalid 'CTL release CID' request: failed to read service: %s", error->message); return; } info.service = (QmiService)service_tmp; } else if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR) { guint16 service_tmp; if (!qmi_message_tlv_read_guint16 (message, init_offset, &offset, QMI_ENDIAN_LITTLE, &service_tmp, &error)) { g_warning ("invalid 'CTL release CID QRTR' request: failed to read service: %s", error->message); return; } info.service = (QmiService)service_tmp; } else g_assert_not_reached (); if (!qmi_message_tlv_read_guint8 (message, init_offset, &offset, &(info.cid), &error)) { g_warning ("invalid 'CTL release CID' request: failed to read client id: %s", error->message); return; } /* Check if it already exists in the client */ i = qmi_client_info_array_lookup_cid (client->qmi_client_info_array, info.service, info.cid); if (i >= 0) { g_debug ("QMI client untracked [%s,%s,%u]", qmi_device_get_path_display (client->device), qmi_service_get_string (info.service), info.cid); g_array_remove_index (client->qmi_client_info_array, i); return; } /* Otherwise, check if it wasn't onwned */ i = qmi_client_info_array_lookup_cid (self->priv->disowned_qmi_client_info_array, info.service, info.cid); if (i >= 0) { g_debug ("disowned QMI client untracked [%s,%s,%u]", qmi_device_get_path_display (client->device), qmi_service_get_string (info.service), info.cid); g_array_remove_index (self->priv->disowned_qmi_client_info_array, i); return; } g_debug ("unexpected attempt to release QMI client [%s,%s,%u]", qmi_device_get_path_display (client->device), qmi_service_get_string (info.service), info.cid); } static void track_implicit_cid (QmiProxy *self, Client *client, QmiMessage *message) { QmiClientInfo info; gint i; info.service = qmi_message_get_service (message); info.cid = qmi_message_get_client_id (message); g_assert_cmpuint (info.service, !=, QMI_SERVICE_CTL); /* Check if the QMI client already exists in the client application, and if * so, nothing else to do */ i = qmi_client_info_array_lookup_cid (client->qmi_client_info_array, info.service, info.cid); if (i >= 0) return; /* The QMI client doesn't exist in the client application, see if it * was disowned previously */ i = qmi_client_info_array_lookup_cid (self->priv->disowned_qmi_client_info_array, info.service, info.cid); if (i >= 0) { /* Remove client info from array of disowned ones, and append it to the client */ g_debug ("QMI client reowned [%s,%s,%u]", qmi_device_get_path_display (client->device), qmi_service_get_string (info.service), info.cid); g_array_remove_index (self->priv->disowned_qmi_client_info_array, i); g_array_append_val (client->qmi_client_info_array, info); return; } /* The QMI client wasn't disowned earlier either. Well, this could be due to the proxy * having crashed and restarted. Just create a new client info from scratch. */ g_debug ("QMI client tracked implicitly [%s,%s,%u]", qmi_device_get_path_display (client->device), qmi_service_get_string (info.service), info.cid); g_array_append_val (client->qmi_client_info_array, info); } /*****************************************************************************/ #define TRACK_CTL_QUARK_STR "track-ctl-data" static GQuark track_ctl_quark; static void device_track_ctl_request (QmiDevice *device) { guint ongoing_ctl; if (G_UNLIKELY (!track_ctl_quark)) { track_ctl_quark = g_quark_from_static_string (TRACK_CTL_QUARK_STR); ongoing_ctl = 0; } else ongoing_ctl = GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (device), track_ctl_quark)); g_object_set_qdata (G_OBJECT (device), track_ctl_quark, GUINT_TO_POINTER (ongoing_ctl + 1)); } static void device_untrack_ctl_request (QmiDevice *device) { guint ongoing_ctl; g_assert (track_ctl_quark != 0); ongoing_ctl = GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (device), track_ctl_quark)); g_assert_cmpuint (ongoing_ctl, >, 0); g_object_set_qdata (G_OBJECT (device), track_ctl_quark, GUINT_TO_POINTER (ongoing_ctl - 1)); } static void device_close_if_unused (QmiProxy *self, QmiDevice *device) { GList *l; /* If there is at least one client using the device, * no need to close */ for (l = self->priv->clients; l; l = g_list_next (l)) { Client *client = l->data; if (client->device && (device == client->device || g_str_equal (qmi_device_get_path (device), qmi_device_get_path (client->device)))) return; } /* If there are no clients using the device BUT there * are still ongoing CTL requests ongoing, no need to * close */ if (GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (device), track_ctl_quark)) > 0) return; /* Now, untrack device from proxy and close it */ for (l = self->priv->devices; l; l = g_list_next (l)) { QmiDevice *device_in_list = QMI_DEVICE (l->data); if (device_in_list && (device == device_in_list || g_str_equal (qmi_device_get_path (device), qmi_device_get_path (device_in_list)))) { g_debug ("closing device '%s': no longer used", qmi_device_get_path_display (device)); qmi_device_close_async (device_in_list, 0, NULL, NULL, NULL); g_object_unref (device_in_list); self->priv->devices = g_list_remove (self->priv->devices, device_in_list); return; } } } /*****************************************************************************/ typedef struct { QmiProxy *self; /* Full ref */ Client *client; /* Full ref */ guint8 in_trid; gboolean ctl; } Request; static void request_free (Request *request) { if (!request) return; client_unref (request->client); g_object_unref (request->self); g_slice_free (Request, request); } static void device_command_ready (QmiDevice *device, GAsyncResult *res, Request *request) { g_autoptr(QmiMessage) response = NULL; g_autoptr(GError) error = NULL; response = qmi_device_command_full_finish (device, res, &error); if (!response) { g_warning ("sending request to device failed: %s", error->message); goto out; } if (qmi_message_get_service (response) == QMI_SERVICE_CTL) { qmi_message_set_transaction_id (response, request->in_trid); if (qmi_message_get_message_id (response) == QMI_MESSAGE_CTL_ALLOCATE_CID || qmi_message_get_message_id (response) == QMI_MESSAGE_CTL_INTERNAL_ALLOCATE_CID_QRTR) track_cid (request->client, response); } if (!client_send_message (request->client, response, &error)) { /* ignore errors when client is not connected, because it really didn't * need this response back */ if (!g_error_matches (error, QMI_CORE_ERROR, QMI_CORE_ERROR_WRONG_STATE)) g_warning ("forwarding response to client failed: %s", error->message); untrack_client (request->self, request->client); } out: if (request->ctl) { device_untrack_ctl_request (device); device_close_if_unused (request->self, device); } request_free (request); } static gboolean process_message (QmiProxy *self, Client *client, QmiMessage *message) { Request *request; /* Accept only request messages from the client */ if (!qmi_message_is_request (message)) { g_debug ("invalid message from client: not a request message"); return FALSE; } if (qmi_message_get_service (message) == QMI_SERVICE_CTL && qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_PROXY_OPEN) return process_internal_proxy_open (self, client, message); request = g_slice_new0 (Request); request->self = g_object_ref (self); request->client = client_ref (client); if (qmi_message_get_service (message) == QMI_SERVICE_CTL) { /* Keep track of how many CTL requests are ongoing */ device_track_ctl_request (client->device); request->ctl = TRUE; request->in_trid = qmi_message_get_transaction_id (message); qmi_message_set_transaction_id (message, 0); /* Try to untrack QMI client as soon as we detect the associated * release message, no need to wait for the response. */ if (qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_RELEASE_CID || qmi_message_get_message_id (message) == QMI_MESSAGE_CTL_INTERNAL_RELEASE_CID_QRTR) untrack_cid (self, client, message); } else track_implicit_cid (self, client, message); /* The timeout needs to be big enough for any kind of transaction to * complete, otherwise the remote clients will lose the reply if they * configured a timeout bigger than this internal one. We should likely * make this value configurable per-client, instead of a hardcoded value. * * Note: the proxy will not translate vendor-specific messages in its * logs (as it doesn't have the original message context with the vendor * id). */ qmi_device_command_full (client->device, message, NULL, 300, NULL, (GAsyncReadyCallback)device_command_ready, request); return TRUE; } static void parse_request (QmiProxy *self, Client *client) { do { GError *error = NULL; QmiMessage *message; /* Every message received must start with the QMUX marker. * If it doesn't, we broke framing :-/ * If we broke framing, an error should be reported and the device * should get closed */ if (client->buffer->len > 0 && client->buffer->data[0] != QMI_MESSAGE_QMUX_MARKER && client->buffer->data[0] != QMI_MESSAGE_QRTR_MARKER) { /* TODO: Report fatal error */ g_warning ("QMI framing error detected"); return; } message = qmi_message_new_from_raw (client->buffer, &error); if (!message) { if (!error) /* More data we need */ return; /* Warn about the issue */ g_warning ("Invalid QMI message received: '%s'", error->message); g_error_free (error); } else { /* Play with the received message */ process_message (self, client, message); qmi_message_unref (message); } } while (client->buffer->len > 0); } static gboolean connection_readable_cb (GSocket *socket, GIOCondition condition, Client *_client) { g_autoptr(Client) client = NULL; QmiProxy *self; guint8 buffer[BUFFER_SIZE]; GError *error = NULL; gssize r; client = client_ref (_client); self = client->proxy; if (condition & G_IO_IN || condition & G_IO_PRI) { r = g_input_stream_read (g_io_stream_get_input_stream (G_IO_STREAM (client->connection)), buffer, BUFFER_SIZE, NULL, &error); if (r < 0) { g_warning ("Error reading from istream: %s", error ? error->message : "unknown"); if (error) g_error_free (error); untrack_client (self, client); return FALSE; } if (r > 0) { if (!G_UNLIKELY (client->buffer)) client->buffer = g_byte_array_sized_new (r); g_byte_array_append (client->buffer, buffer, r); /* Try to parse input messages */ parse_request (self, client); } } if (condition & G_IO_HUP || condition & G_IO_ERR) { untrack_client (self, client); return FALSE; } return TRUE; } static void incoming_cb (GSocketService *service, GSocketConnection *connection, GObject *unused, QmiProxy *self) { Client *client; GCredentials *credentials; GError *error = NULL; uid_t uid; g_debug ("Client (%d) connection open...", g_socket_get_fd (g_socket_connection_get_socket (connection))); credentials = g_socket_get_credentials (g_socket_connection_get_socket (connection), &error); if (!credentials) { g_warning ("Client not allowed: Error getting socket credentials: %s", error->message); g_error_free (error); return; } uid = g_credentials_get_unix_user (credentials, &error); g_object_unref (credentials); if (error) { g_warning ("Client not allowed: Error getting unix user id: %s", error->message); g_error_free (error); return; } if (!qmi_helpers_check_user_allowed (uid, &error)) { g_warning ("Client not allowed: %s", error->message); g_error_free (error); return; } /* Create client */ client = g_slice_new0 (Client); client->ref_count = 1; client->proxy = self; client->connection = g_object_ref (connection); client->connection_readable_source = g_socket_create_source (g_socket_connection_get_socket (client->connection), G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP, NULL); g_source_set_callback (client->connection_readable_source, (GSourceFunc)connection_readable_cb, client, NULL); g_source_attach (client->connection_readable_source, g_main_context_get_thread_default ()); client->qmi_client_info_array = g_array_sized_new (FALSE, FALSE, sizeof (QmiClientInfo), 8); /* Keep the client info around */ track_client (self, client); client_unref (client); } static gboolean setup_socket_service (QmiProxy *self, GError **error) { GSocketAddress *socket_address; GSocket *socket; socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, error); if (!socket) return FALSE; /* Bind to address */ socket_address = (g_unix_socket_address_new_with_type ( QMI_PROXY_SOCKET_PATH, -1, G_UNIX_SOCKET_ADDRESS_ABSTRACT)); if (!g_socket_bind (socket, socket_address, TRUE, error)) return FALSE; g_object_unref (socket_address); g_debug ("creating UNIX socket service..."); /* Listen */ if (!g_socket_listen (socket, error)) { g_object_unref (socket); return FALSE; } /* Create socket service */ self->priv->socket_service = g_socket_service_new (); g_signal_connect (self->priv->socket_service, "incoming", G_CALLBACK (incoming_cb), self); if (!g_socket_listener_add_socket (G_SOCKET_LISTENER (self->priv->socket_service), socket, NULL, /* don't pass an object, will take a reference */ error)) { g_prefix_error (error, "Error adding socket at '%s' to socket service: ", QMI_PROXY_SOCKET_PATH); g_object_unref (socket); return FALSE; } g_debug ("starting UNIX socket service at '%s'...", QMI_PROXY_SOCKET_PATH); g_socket_service_start (self->priv->socket_service); g_object_unref (socket); return TRUE; } /*****************************************************************************/ QmiProxy * qmi_proxy_new (GError **error) { QmiProxy *self; if (!qmi_helpers_check_user_allowed (getuid (), error)) return NULL; self = g_object_new (QMI_TYPE_PROXY, NULL); if (!setup_socket_service (self, error)) g_clear_object (&self); return self; } static void qmi_proxy_init (QmiProxy *self) { /* Setup private data */ self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QMI_TYPE_PROXY, QmiProxyPrivate); } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QmiProxy *self = QMI_PROXY (object); switch (prop_id) { case PROP_N_CLIENTS: g_value_set_uint (value, g_list_length (self->priv->clients)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void dispose (GObject *object) { QmiProxyPrivate *priv = QMI_PROXY (object)->priv; g_clear_pointer (&priv->disowned_qmi_client_info_array, g_array_unref); g_list_free_full (g_steal_pointer (&priv->clients), (GDestroyNotify) client_unref); if (priv->socket_service) { if (g_socket_service_is_active (priv->socket_service)) g_socket_service_stop (priv->socket_service); g_clear_object (&priv->socket_service); g_unlink (QMI_PROXY_SOCKET_PATH); g_debug ("UNIX socket service at '%s' stopped", QMI_PROXY_SOCKET_PATH); } #if QMI_QRTR_SUPPORTED g_clear_object (&priv->qrtr_bus); #endif G_OBJECT_CLASS (qmi_proxy_parent_class)->dispose (object); } static void qmi_proxy_class_init (QmiProxyClass *proxy_class) { GObjectClass *object_class = G_OBJECT_CLASS (proxy_class); g_type_class_add_private (object_class, sizeof (QmiProxyPrivate)); object_class->get_property = get_property; object_class->dispose = dispose; /** * QmiProxy:qmi-proxy-n-clients * * Since: 1.8 */ properties[PROP_N_CLIENTS] = g_param_spec_uint (QMI_PROXY_N_CLIENTS, "Number of clients", "Number of clients currently connected to the proxy", 0, G_MAXUINT, 0, G_PARAM_READABLE); g_object_class_install_property (object_class, PROP_N_CLIENTS, properties[PROP_N_CLIENTS]); } libqmi-1.35.2-dev/src/libqmi-glib/qmi-proxy.h000066400000000000000000000067131455567757300207670ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2013-2017 Aleksander Morgado */ #ifndef QMI_PROXY_H #define QMI_PROXY_H /** * SECTION:qmi-proxy * @title: QmiProxy * @short_description: QMI proxy handling routines * * The #QmiProxy will setup an abstract socket listening on a predefined * address, and will take care of synchronizing the access to a set of shared * QMI ports. * * Multiple #QmiDevice objects may be connected to the #QmiProxy at any given * time. The #QmiProxy acts as a stateless proxy for non-CTL services (messages * are transferred unmodified), and as a stateful proxy for the CTL service (all * remote #QmiDevice objects will need to share the same CTL message sequence * ID). */ #include #include #define QMI_TYPE_PROXY (qmi_proxy_get_type ()) #define QMI_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QMI_TYPE_PROXY, QmiProxy)) #define QMI_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QMI_TYPE_PROXY, QmiProxyClass)) #define QMI_IS_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QMI_TYPE_PROXY)) #define QMI_IS_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), QMI_TYPE_PROXY)) #define QMI_PROXY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QMI_TYPE_PROXY, QmiProxyClass)) typedef struct _QmiProxy QmiProxy; typedef struct _QmiProxyClass QmiProxyClass; typedef struct _QmiProxyPrivate QmiProxyPrivate; /** * QMI_PROXY_SOCKET_PATH: * * Symbol defining the default abstract socket name where the #QmiProxy will listen. * * Since: 1.8 */ #define QMI_PROXY_SOCKET_PATH "qmi-proxy" /** * QMI_PROXY_N_CLIENTS: * * Symbol defining the #QmiProxy:qmi-proxy-n-clients property. * * Since: 1.8 */ #define QMI_PROXY_N_CLIENTS "qmi-proxy-n-clients" /** * QmiProxy: * * The #QmiProxy structure contains private data and should only be accessed * using the provided API. * * Since: 1.8 */ struct _QmiProxy { GObject parent; QmiProxyPrivate *priv; }; struct _QmiProxyClass { GObjectClass parent; }; GType qmi_proxy_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QmiProxy, g_object_unref) /** * qmi_proxy_new: * @error: Return location for error or %NULL. * * Creates a #QmiProxy listening in the default proxy addess. * * Returns: A newly created #QmiProxy, or %NULL if @error is set. * * Since: 1.8 */ QmiProxy *qmi_proxy_new (GError **error); /** * qmi_proxy_get_n_clients: * @self: a #QmiProxy. * * Get the number of clients currently connected to the proxy. * * Returns: a #guint. * * Since: 1.8 */ guint qmi_proxy_get_n_clients (QmiProxy *self); #endif /* QMI_PROXY_H */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-utils.c000066400000000000000000000033661455567757300207420ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2020 Dan Williams * Copyright (C) 2012-2020 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #include #include "qmi-utils.h" /*****************************************************************************/ static volatile gint __traces_enabled = FALSE; static volatile gint __hide_personal_info = FALSE; gboolean qmi_utils_get_traces_enabled (void) { return (gboolean) g_atomic_int_get (&__traces_enabled); } void qmi_utils_set_traces_enabled (gboolean enabled) { g_atomic_int_set (&__traces_enabled, enabled); } void qmi_utils_set_show_personal_info (gboolean hide_personal_info) { g_atomic_int_set (&__hide_personal_info, hide_personal_info); } gboolean qmi_utils_get_show_personal_info (void) { return (gboolean) g_atomic_int_get (&__hide_personal_info); }libqmi-1.35.2-dev/src/libqmi-glib/qmi-utils.h000066400000000000000000000054121455567757300207410ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * libqmi-glib -- GLib/GIO based library to control QMI devices * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2012-2015 Dan Williams * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (C) 1999,2000 Erik Walthinsen * Copyright (C) 2000 Wim Taymans * Copyright (C) 2002 Thomas Vander Stichele * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #ifndef _LIBQMI_GLIB_QMI_UTILS_H_ #define _LIBQMI_GLIB_QMI_UTILS_H_ #if !defined (__LIBQMI_GLIB_H_INSIDE__) && !defined (LIBQMI_GLIB_COMPILATION) #error "Only can be included directly." #endif #include G_BEGIN_DECLS /** * SECTION: qmi-utils * @title: Common utilities * @short_description: Common utilities in the library. * * This section exposes a set of common utilities that may be used to work * with the QMI library. */ /* Enabling/Disabling traces */ /** * qmi_utils_get_traces_enabled: * * Checks whether QMI message traces are currently enabled. * * Returns: %TRUE if traces are enabled, %FALSE otherwise. * * Since: 1.0 */ gboolean qmi_utils_get_traces_enabled (void); /** * qmi_utils_set_traces_enabled: * @enabled: %TRUE to enable traces, %FALSE to disable them. * * Sets whether QMI message traces are enabled or disabled. * * Since: 1.0 */ void qmi_utils_set_traces_enabled (gboolean enabled); /** * qmi_utils_set_show_personal_info: * @show_personal_info: %TRUE to show personal info in traces, %FALSE otherwise. * * Sets whether personal info is printed when traces are enabled. * * Since: 1.32 */ void qmi_utils_set_show_personal_info (gboolean show_personal_info); /** * qmi_utils_get_show_personal_info: * * Checks whether personal info should be hidden when traces are enabled. * * Returns: %TRUE to show personal info in trace, %FALSE otherwise. * * Since: 1.32 */ gboolean qmi_utils_get_show_personal_info (void); G_END_DECLS #endif /* _LIBQMI_GLIB_QMI_UTILS_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/qmi-version.h.in000066400000000000000000000065671455567757300217070ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA. * * Copyright (C) 2013 Lanedo GmbH * Copyright (C) 2013-2017 Aleksander Morgado */ #ifndef _QMI_VERSION_H_ #define _QMI_VERSION_H_ /** * SECTION:qmi-version * @short_description: Version information in the API. * * This section defines types that are used to identify the libqmi-glib version. **/ /** * QMI_MAJOR_VERSION: * * Evaluates to the major version number of libqmi-glib which this source * is compiled against. * * Since: 1.6 */ #define QMI_MAJOR_VERSION (@QMI_MAJOR_VERSION@) /** * QMI_MINOR_VERSION: * * Evaluates to the minor version number of libqmi-glib which this source * is compiled against. * * Since: 1.6 */ #define QMI_MINOR_VERSION (@QMI_MINOR_VERSION@) /** * QMI_MICRO_VERSION: * * Evaluates to the micro version number of libqmi-glib which this source * compiled against. * * Since: 1.6 */ #define QMI_MICRO_VERSION (@QMI_MICRO_VERSION@) /** * QMI_CHECK_VERSION: * @major: major version (e.g. 1 for version 1.2.5) * @minor: minor version (e.g. 2 for version 1.2.5) * @micro: micro version (e.g. 5 for version 1.2.5) * * Checks the version of the libqmi library that is being compiled against. * * Returns: %TRUE if the version of the libqmi-glib header files * is the same as or newer than the passed-in version. * * Since: 1.6 */ #define QMI_CHECK_VERSION(major,minor,micro) \ (QMI_MAJOR_VERSION > (major) || \ (QMI_MAJOR_VERSION == (major) && QMI_MINOR_VERSION > (minor)) || \ (QMI_MAJOR_VERSION == (major) && QMI_MINOR_VERSION == (minor) && QMI_MICRO_VERSION >= (micro))) /** * QMI_MBIM_QMUX_SUPPORTED: * * Symbol to expose wether QMI over MBIM is supported. The symbol is always * defined and set to either or 1 or 0. * * E.g.: * |[ * #if QMI_MBIM_QMUX_SUPPORTED * // do something * #endif * ]| * * Since: 1.16 */ #define QMI_MBIM_QMUX_SUPPORTED @QMI_MBIM_QMUX_SUPPORTED@ /** * QMI_QRTR_SUPPORTED: * * Symbol to expose wether QMI over QRTR is supported. The symbol is always * defined and set to either or 1 or 0. * * E.g.: * |[ * #if QMI_QRTR_SUPPORTED * // do something * #endif * ]| * * Since: 1.26 */ #define QMI_QRTR_SUPPORTED @QMI_QRTR_SUPPORTED@ /** * QMI_RMNET_SUPPORTED: * * Symbol to expose wether RMNET link management operations are supported. The * symbol is always defined and set to either or 1 or 0. * * E.g.: * |[ * #if QMI_RMNET_SUPPORTED * // do something * #endif * ]| * * Since: 1.30 */ #define QMI_RMNET_SUPPORTED @QMI_RMNET_SUPPORTED@ #endif /* _QMI_VERSION_H_ */ libqmi-1.35.2-dev/src/libqmi-glib/test/000077500000000000000000000000001455567757300176215ustar00rootroot00000000000000libqmi-1.35.2-dev/src/libqmi-glib/test/meson.build000066400000000000000000000024261455567757300217670ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez test_units = { 'test-compat-utils': {'sources': files('test-compat-utils.c'), 'dependencies': libqmi_glib_dep}, 'test-message': {'sources': files('test-message.c'), 'dependencies': libqmi_glib_dep}, 'test-utils': {'sources': files('test-utils.c'), 'dependencies': libqmi_glib_dep}, } sources = files( 'test-fixture.c', 'test-generated.c', 'test-port-context.c', ) deps = [ gio_unix_dep, libqmi_glib_dep, ] test_units += {'test-generated': {'sources': sources, 'dependencies': deps}} test_env += { 'G_TEST_BUILDDIR': meson.current_build_dir(), 'G_TEST_SRCDIR': meson.current_source_dir(), } foreach test_name, test_args: test_units exe = executable( test_name, include_directories: top_inc, c_args: ['-DLIBQMI_GLIB_COMPILATION'] + no_deprecated_declarations_flags, kwargs: test_args, ) test( test_name, exe, env: test_env, ) endforeach if get_option('fuzzer') fuzzer_name = 'test-message-fuzzer' exe = executable( fuzzer_name, sources: fuzzer_name + '.c', include_directories: top_inc, dependencies: libqmi_glib_dep, c_args: '-DLIBQMI_GLIB_COMPILATION', link_args : '-fsanitize=fuzzer', ) endif libqmi-1.35.2-dev/src/libqmi-glib/test/test-compat-utils.c000066400000000000000000001164121455567757300233700ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2012 Aleksander Morgado */ #include #include #include "qmi-utils.h" #include "qmi-compat.h" #ifndef QMI_DISABLE_DEPRECATED static void test_utils_uint8 (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; guint8 out_buffer[8] = { 0 }; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; while (in_buffer_size) { guint8 tmp; qmi_utils_read_guint8_from_buffer (&in_buffer_walker, &in_buffer_size, &tmp); qmi_utils_write_guint8_to_buffer (&out_buffer_walker, &out_buffer_size, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_int8 (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; guint8 out_buffer[8] = { 0 }; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; while (in_buffer_size) { gint8 tmp; qmi_utils_read_gint8_from_buffer (&in_buffer_walker, &in_buffer_size, &tmp); qmi_utils_write_gint8_to_buffer (&out_buffer_walker, &out_buffer_size, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_uint16_le (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const guint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint16 tmp; qmi_utils_read_guint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_uint16_be (void) { static const guint8 in_buffer[8] = { 0x50, 0x0F, 0xE2, 0xEB, 0x00, 0xB6, 0x00, 0x00 }; static const guint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint16 tmp; qmi_utils_read_guint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_int16_le (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const gint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint16 tmp; qmi_utils_read_gint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_int16_be (void) { static const guint8 in_buffer[8] = { 0x50, 0x0F, 0xE2, 0xEB, 0x00, 0xB6, 0x00, 0x00 }; static const gint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint16 tmp; qmi_utils_read_gint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_uint16_unaligned_le (void) { static const guint8 in_buffer[9] = { 0x00, 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static guint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint16 tmp; qmi_utils_read_guint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_uint16_unaligned_be (void) { static const guint8 in_buffer[9] = { 0x00, 0x50, 0x0F, 0xE2, 0xEB, 0x00, 0xB6, 0x00, 0x00 }; static guint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint16 tmp; qmi_utils_read_guint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_int16_unaligned_le (void) { static const guint8 in_buffer[9] = { 0x00, 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static gint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint16 tmp; qmi_utils_read_gint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_int16_unaligned_be (void) { static const guint8 in_buffer[9] = { 0x00, 0x50, 0x0F, 0xE2, 0xEB, 0x00, 0xB6, 0x00, 0x00 }; static gint16 values[4] = { 0x500F, 0xE2EB, 0x00B6, 0x0000 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint16 tmp; qmi_utils_read_gint16_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint16_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_uint32_le (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const guint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint32 tmp; qmi_utils_read_guint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_uint32_be (void) { static const guint8 in_buffer[8] = { 0xE2, 0xEB, 0x50, 0x0F, 0x00, 0x00, 0x00, 0xB6 }; static const guint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint32 tmp; qmi_utils_read_guint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_int32_le (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const gint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint32 tmp; qmi_utils_read_gint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_int32_be (void) { static const guint8 in_buffer[8] = { 0xE2, 0xEB, 0x50, 0x0F, 0x00, 0x00, 0x00, 0xB6 }; static const gint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint32 tmp; qmi_utils_read_gint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_uint32_unaligned_le (void) { static const guint8 in_buffer[9] = { 0x00, 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static guint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint32 tmp; qmi_utils_read_guint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_uint32_unaligned_be (void) { static const guint8 in_buffer[9] = { 0x00, 0xE2, 0xEB, 0x50, 0x0F, 0x00, 0x00, 0x00, 0xB6 }; static guint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint32 tmp; qmi_utils_read_guint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_int32_unaligned_le (void) { static const guint8 in_buffer[9] = { 0x00, 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static gint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint32 tmp; qmi_utils_read_gint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_int32_unaligned_be (void) { static const guint8 in_buffer[9] = { 0x00, 0xE2, 0xEB, 0x50, 0x0F, 0x00, 0x00, 0x00, 0xB6 }; static gint32 values[2] = { 0xE2EB500F, 0x000000B6 }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint32 tmp; qmi_utils_read_gint32_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint32_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_uint64_le (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const guint64 values[1] = { 0x000000B6E2EB500FULL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint64 tmp; qmi_utils_read_guint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_uint64_be (void) { static const guint8 in_buffer[8] = { 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xEB, 0x50, 0x0F }; static const guint64 values[1] = { 0x000000B6E2EB500FULL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint64 tmp; qmi_utils_read_guint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_int64_le (void) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const gint64 values[1] = { 0x000000B6E2EB500FLL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint64 tmp; qmi_utils_read_gint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_int64_be (void) { static const guint8 in_buffer[8] = { 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xEB, 0x50, 0x0F }; static const gint64 values[1] = { 0x000000B6E2EB500FLL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint64 tmp; qmi_utils_read_gint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (in_buffer, out_buffer, sizeof (in_buffer)) == 0); } static void test_utils_uint64_unaligned_le (void) { static const guint8 in_buffer[9] = { 0x00, 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static guint64 values[1] = { 0x000000B6E2EB500FULL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint64 tmp; qmi_utils_read_guint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_uint64_unaligned_be (void) { static const guint8 in_buffer[9] = { 0x00, 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xEB, 0x50, 0x0F }; static guint64 values[1] = { 0x000000B6E2EB500FULL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { guint64 tmp; qmi_utils_read_guint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, values[i++]); qmi_utils_write_guint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_int64_unaligned_le (void) { static const guint8 in_buffer[9] = { 0x00, 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static gint64 values[1] = { 0x000000B6E2EB500FLL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint64 tmp; qmi_utils_read_gint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_LITTLE, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void test_utils_int64_unaligned_be (void) { static const guint8 in_buffer[9] = { 0x00, 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xEB, 0x50, 0x0F }; static gint64 values[1] = { 0x000000B6E2EB500FLL }; guint8 out_buffer[8] = { 0 }; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; i = 0; while (in_buffer_size) { gint64 tmp; qmi_utils_read_gint64_from_buffer (&in_buffer_walker, &in_buffer_size, QMI_ENDIAN_BIG, &tmp); g_assert_cmpint (tmp, ==, values[i++]); qmi_utils_write_gint64_to_buffer (&out_buffer_walker, &out_buffer_size, QMI_ENDIAN_BIG, &tmp); } g_assert_cmpuint (out_buffer_size, ==, 0); g_assert (memcmp (&in_buffer[1], out_buffer, sizeof (in_buffer) - 1) == 0); } static void common_test_utils_uint_sized_le (guint n_bytes) { static const guint8 in_buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; guint64 value = 0x000000B6E2EB500FULL; guint8 expected_out_buffer[8] = { 0 }; guint8 out_buffer[8] = { 0 }; guint64 tmp; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; /* Build expected intermediate value */ tmp = 0xFF; for (i = 1; i < n_bytes; i++) { tmp <<= 8; tmp |= 0xFF; } value &= tmp; /* Build expected output buffer */ memcpy (expected_out_buffer, in_buffer, n_bytes); in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; qmi_utils_read_sized_guint_from_buffer (&in_buffer_walker, &in_buffer_size, n_bytes, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, value); qmi_utils_write_sized_guint_to_buffer (&out_buffer_walker, &out_buffer_size, n_bytes, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (out_buffer_size, ==, 8 - n_bytes); g_assert (memcmp (expected_out_buffer, out_buffer, sizeof (expected_out_buffer)) == 0); } static void test_utils_uint_sized_1_le (void) { common_test_utils_uint_sized_le (1); } static void test_utils_uint_sized_2_le (void) { common_test_utils_uint_sized_le (2); } static void test_utils_uint_sized_4_le (void) { common_test_utils_uint_sized_le (4); } static void test_utils_uint_sized_8_le (void) { common_test_utils_uint_sized_le (8); } static void common_test_utils_uint_sized_be (guint n_bytes) { static const guint8 in_buffer[8] = { 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xEB, 0x50, 0x0F }; guint64 value = 0x000000B6E2EB500FULL; guint8 expected_out_buffer[8] = { 0 }; guint8 out_buffer[8] = { 0 }; guint8 in_buffer_aux[8] = { 0 }; guint64 tmp; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; /* Build expected intermediate value */ tmp = 0xFF; for (i = 1; i < n_bytes; i++) { tmp <<= 8; tmp |= 0xFF; } value &= tmp; /* In BIG ENDIAN buffers, let's read only the bytes we want, starting from * the byte we want, not from the beginning of the input buffer. But we do * want to be aligned while reading, so we copy the bytes to read to the * beginning of an aux buffer */ g_assert (n_bytes <= sizeof (in_buffer)); memcpy (&in_buffer_aux[0], &in_buffer[sizeof (in_buffer) - n_bytes], n_bytes); /* Build expected output buffer */ memcpy (&expected_out_buffer[0], &in_buffer_aux[0], n_bytes); in_buffer_size = sizeof (in_buffer); in_buffer_walker = &in_buffer_aux[0]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; qmi_utils_read_sized_guint_from_buffer (&in_buffer_walker, &in_buffer_size, n_bytes, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, value); qmi_utils_write_sized_guint_to_buffer (&out_buffer_walker, &out_buffer_size, n_bytes, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (out_buffer_size, ==, 8 - n_bytes); if (memcmp (expected_out_buffer, out_buffer, sizeof (expected_out_buffer)) != 0) { g_print ("OUTPUT: %x, %x, %x, %x, %x, %x, %x, %x\n", out_buffer[0], out_buffer[1], out_buffer[2], out_buffer[3], out_buffer[4], out_buffer[5], out_buffer[6], out_buffer[7]); g_print ("EXPECTED: %x, %x, %x, %x, %x, %x, %x, %x\n", expected_out_buffer[0], expected_out_buffer[1], expected_out_buffer[2], expected_out_buffer[3], expected_out_buffer[4], expected_out_buffer[5], expected_out_buffer[6], expected_out_buffer[7]); } g_assert (memcmp (expected_out_buffer, out_buffer, sizeof (expected_out_buffer)) == 0); } static void test_utils_uint_sized_1_be (void) { common_test_utils_uint_sized_be (1); } static void test_utils_uint_sized_2_be (void) { common_test_utils_uint_sized_be (2); } static void test_utils_uint_sized_4_be (void) { common_test_utils_uint_sized_be (4); } static void test_utils_uint_sized_8_be (void) { common_test_utils_uint_sized_be (8); } static void common_test_utils_uint_sized_unaligned_le (guint n_bytes) { static const guint8 in_buffer[9] = { 0x00, 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; guint64 value = 0x000000B6E2EB500FULL; guint8 expected_out_buffer[8] = { 0 }; guint8 out_buffer[8] = { 0 }; guint64 tmp; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; /* Build expected intermediate value */ tmp = 0xFF; for (i = 1; i < n_bytes; i++) { tmp <<= 8; tmp |= 0xFF; } value &= tmp; /* Build expected output buffer */ memcpy (expected_out_buffer, &in_buffer[1], n_bytes); in_buffer_size = sizeof (in_buffer) - 1; in_buffer_walker = &in_buffer[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; qmi_utils_read_sized_guint_from_buffer (&in_buffer_walker, &in_buffer_size, n_bytes, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (tmp, ==, value); qmi_utils_write_sized_guint_to_buffer (&out_buffer_walker, &out_buffer_size, n_bytes, QMI_ENDIAN_LITTLE, &tmp); g_assert_cmpuint (out_buffer_size, ==, 8 - n_bytes); g_assert (memcmp (expected_out_buffer, out_buffer, sizeof (expected_out_buffer)) == 0); } static void test_utils_uint_sized_1_unaligned_le (void) { common_test_utils_uint_sized_unaligned_le (1); } static void test_utils_uint_sized_2_unaligned_le (void) { common_test_utils_uint_sized_unaligned_le (2); } static void test_utils_uint_sized_4_unaligned_le (void) { common_test_utils_uint_sized_unaligned_le (4); } static void test_utils_uint_sized_8_unaligned_le (void) { common_test_utils_uint_sized_unaligned_le (8); } static void common_test_utils_uint_sized_unaligned_be (guint n_bytes) { static const guint8 in_buffer[8] = { 0x00, 0x00, 0x00, 0xB6, 0xE2, 0xEB, 0x50, 0x0F }; guint64 value = 0x000000B6E2EB500FULL; guint8 expected_out_buffer[8] = { 0 }; guint8 out_buffer[8] = { 0 }; guint8 in_buffer_aux[9] = { 0 }; guint64 tmp; guint i; guint16 in_buffer_size; const guint8 *in_buffer_walker; guint16 out_buffer_size; guint8 *out_buffer_walker; /* Build expected intermediate value */ tmp = 0xFF; for (i = 1; i < n_bytes; i++) { tmp <<= 8; tmp |= 0xFF; } value &= tmp; /* In BIG ENDIAN buffers, let's read only the bytes we want, starting from * the byte we want, not from the beginning of the input buffer. But we do * not want to be aligned while reading, so we copy the bytes to read to * almost the beginning of an aux buffer */ g_assert (n_bytes <= (sizeof (in_buffer))); memcpy (&in_buffer_aux[1], &in_buffer[sizeof (in_buffer) - n_bytes], n_bytes); /* Build expected output buffer */ memcpy (expected_out_buffer, &in_buffer_aux[1], n_bytes); in_buffer_size = sizeof (in_buffer_aux) - 1; in_buffer_walker = &in_buffer_aux[1]; out_buffer_size = sizeof (out_buffer); out_buffer_walker = &out_buffer[0]; qmi_utils_read_sized_guint_from_buffer (&in_buffer_walker, &in_buffer_size, n_bytes, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (tmp, ==, value); qmi_utils_write_sized_guint_to_buffer (&out_buffer_walker, &out_buffer_size, n_bytes, QMI_ENDIAN_BIG, &tmp); g_assert_cmpuint (out_buffer_size, ==, 8 - n_bytes); if (memcmp (expected_out_buffer, out_buffer, sizeof (expected_out_buffer)) != 0) { g_print ("OUTPUT: %x, %x, %x, %x, %x, %x, %x, %x\n", out_buffer[0], out_buffer[1], out_buffer[2], out_buffer[3], out_buffer[4], out_buffer[5], out_buffer[6], out_buffer[7]); g_print ("EXPECTED: %x, %x, %x, %x, %x, %x, %x, %x\n", expected_out_buffer[0], expected_out_buffer[1], expected_out_buffer[2], expected_out_buffer[3], expected_out_buffer[4], expected_out_buffer[5], expected_out_buffer[6], expected_out_buffer[7]); } g_assert (memcmp (expected_out_buffer, out_buffer, sizeof (expected_out_buffer)) == 0); } static void test_utils_uint_sized_1_unaligned_be (void) { common_test_utils_uint_sized_unaligned_be (1); } static void test_utils_uint_sized_2_unaligned_be (void) { common_test_utils_uint_sized_unaligned_be (2); } static void test_utils_uint_sized_4_unaligned_be (void) { common_test_utils_uint_sized_unaligned_be (4); } static void test_utils_uint_sized_8_unaligned_be (void) { common_test_utils_uint_sized_unaligned_be (8); } int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); g_test_add_func ("/libqmi-glib/compat/utils/uint8", test_utils_uint8); g_test_add_func ("/libqmi-glib/compat/utils/int8", test_utils_int8); g_test_add_func ("/libqmi-glib/compat/utils/uint16-LE", test_utils_uint16_le); g_test_add_func ("/libqmi-glib/compat/utils/uint16-BE", test_utils_uint16_be); g_test_add_func ("/libqmi-glib/compat/utils/int16-LE", test_utils_int16_le); g_test_add_func ("/libqmi-glib/compat/utils/int16-BE", test_utils_int16_be); g_test_add_func ("/libqmi-glib/compat/utils/uint16-unaligned-LE", test_utils_uint16_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/uint16-unaligned-Be", test_utils_uint16_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/int16-unaligned-LE", test_utils_int16_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/int16-unaligned-BE", test_utils_int16_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/uint32-LE", test_utils_uint32_le); g_test_add_func ("/libqmi-glib/compat/utils/uint32-BE", test_utils_uint32_be); g_test_add_func ("/libqmi-glib/compat/utils/int32-LE", test_utils_int32_le); g_test_add_func ("/libqmi-glib/compat/utils/int32-BE", test_utils_int32_be); g_test_add_func ("/libqmi-glib/compat/utils/uint32/unaligned-LE", test_utils_uint32_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/uint32/unaligned-BE", test_utils_uint32_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/int32/unaligned-LE", test_utils_int32_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/int32/unaligned-BE", test_utils_int32_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/uint64-LE", test_utils_uint64_le); g_test_add_func ("/libqmi-glib/compat/utils/uint64-BE", test_utils_uint64_be); g_test_add_func ("/libqmi-glib/compat/utils/int64-LE", test_utils_int64_le); g_test_add_func ("/libqmi-glib/compat/utils/int64-BE", test_utils_int64_be); g_test_add_func ("/libqmi-glib/compat/utils/uint64/unaligned-LE", test_utils_uint64_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/uint64/unaligned-BE", test_utils_uint64_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/int64/unaligned-LE", test_utils_int64_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/int64/unaligned-BE", test_utils_int64_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-1-LE", test_utils_uint_sized_1_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-2-LE", test_utils_uint_sized_2_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-4-LE", test_utils_uint_sized_4_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-8-LE", test_utils_uint_sized_8_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-1-BE", test_utils_uint_sized_1_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-2-BE", test_utils_uint_sized_2_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-4-BE", test_utils_uint_sized_4_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-8-BE", test_utils_uint_sized_8_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-1-unaligned-LE", test_utils_uint_sized_1_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-2-unaligned-LE", test_utils_uint_sized_2_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-4-unaligned-LE", test_utils_uint_sized_4_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-8-unaligned-LE", test_utils_uint_sized_8_unaligned_le); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-1-unaligned-BE", test_utils_uint_sized_1_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-2-unaligned-BE", test_utils_uint_sized_2_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-4-unaligned-BE", test_utils_uint_sized_4_unaligned_be); g_test_add_func ("/libqmi-glib/compat/utils/uint-sized-8-unaligned-BE", test_utils_uint_sized_8_unaligned_be); return g_test_run (); } #else int main (int argc, char **argv) { return 0; } #endif /* QMI_DISABLE_DEPRECATED */ libqmi-1.35.2-dev/src/libqmi-glib/test/test-fixture.c000066400000000000000000000267531455567757300224450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2014 Aleksander Morgado */ #include #include #include #include "test-fixture.h" #define VIRTUAL_SOCKET_PATH "virtual-socket-path" static const QmiService services [] = { #if defined HAVE_QMI_SERVICE_DMS QMI_SERVICE_DMS, #endif #if defined HAVE_QMI_SERVICE_NAS QMI_SERVICE_NAS, #endif #if defined HAVE_QMI_SERVICE_WDS QMI_SERVICE_WDS, #endif #if defined HAVE_QMI_SERVICE_PDS QMI_SERVICE_PDS #endif }; static void device_allocate_client_ready (QmiDevice *device, GAsyncResult *res, TestFixture *fixture) { GError *error = NULL; QmiClient *client; QmiService service; client = qmi_device_allocate_client_finish (device, res, &error); g_assert_no_error (error); g_assert (QMI_IS_CLIENT (client)); service = qmi_client_get_service (client); g_assert (service > QMI_SERVICE_CTL); fixture->service_info[service].client = client; fixture->service_info[service].transaction_id = 0x0001; test_fixture_loop_stop (fixture); } static void device_open_ready (QmiDevice *device, GAsyncResult *res, TestFixture *fixture) { GError *error = NULL; gboolean ret; ret = qmi_device_open_finish (device, res, &error); g_assert_no_error (error); g_assert (ret); test_fixture_loop_stop (fixture); } static void device_virtual_new_ready (GObject *source, GAsyncResult *res, TestFixture *fixture) { GError *error = NULL; fixture->device = qmi_device_new_finish (res, &error); g_assert_no_error (error); g_assert (QMI_IS_DEVICE (fixture->device)); test_fixture_loop_stop (fixture); } void test_fixture_setup (TestFixture *fixture) { GFile *file; guint i; static guint32 num = 0; g_debug ("[%lu,%p] fixture setup", (gulong) pthread_self (), g_main_context_get_thread_default ()); qmi_utils_set_traces_enabled (TRUE); /* Create port name, and add process ID so that multiple runs of this test * in the same system don't clash with each other */ fixture->path = g_strdup_printf ("/dev/qmi%08lu%04u", (gulong) getpid (), num++); fixture->service_info[QMI_SERVICE_CTL].transaction_id = 0x0001; fixture->ctx = test_port_context_new (fixture->path); test_port_context_start (fixture->ctx); /* Create device */ file = g_file_new_for_path (fixture->path); g_async_initable_new_async (QMI_TYPE_DEVICE, G_PRIORITY_DEFAULT, NULL, (GAsyncReadyCallback) device_virtual_new_ready, fixture, QMI_DEVICE_FILE, file, QMI_DEVICE_NO_FILE_CHECK, TRUE, QMI_DEVICE_PROXY_PATH, fixture->path, NULL); g_object_unref (file); test_fixture_loop_run (fixture); /* Open device */ { guint8 expected[] = { 0x01, /* marker */ /* QMUX */ 0x22, 0x00, /* length */ 0x00, /* flags */ 0x00, /* service CTL */ 0x00, /* client */ /* QMI header */ 0x00, /* flags */ 0xFF, /* transaction */ 0x00, 0xFF, /* message: Internal proxy open */ 0x17, 0x00, /* tlv length */ /* TLV */ 0x01, /* type */ 0x14, 0x00, /* length */ 0x2F, 0x64, 0x65, 0x76, 0x2F, 0x76, 0x69, 0x72, 0x74, 0x75, 0x61, 0x6C, 0x2F, 0x71, 0x6D, 0x69, 0x00, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, /* marker */ /* QMUX */ 0x12, 0x00, /* length */ 0x00, /* flags */ 0x00, /* service CTL */ 0x00, /* client */ /* QMI header */ 0x01, /* flags */ 0xFF, /* transaction */ 0x00, 0xFF, /* message: Internal proxy open */ 0x07, 0x00, /* tlv length */ /* TLV */ 0x02, /* type: Result */ 0x04, 0x00, /* length */ 0x00, 0x00, /* error status */ 0x00, 0x00, /* error code */ }; g_assert_cmpuint (strlen (fixture->path), ==, 20); memcpy (&expected[15], fixture->path, strlen (fixture->path)); test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_CTL].transaction_id++); } qmi_device_open (fixture->device, QMI_DEVICE_OPEN_FLAGS_PROXY, 1, NULL, (GAsyncReadyCallback) device_open_ready, fixture); test_fixture_loop_run (fixture); /* Allocate clients */ for (i = 0; i < G_N_ELEMENTS (services); i++) { guint8 expected[] = { 0x01, /* marker */ /* QMUX */ 0x0F, 0x00, /* length */ 0x00, /* flags */ 0x00, /* service CTL */ 0x00, /* client */ /* QMI header */ 0x00, /* flags */ 0xFF, /* transaction */ 0x22, 0x00, /* message: Allocate CID */ 0x04, 0x00, /* tlv length */ /* TLV */ 0x01, /* type */ 0x01, 0x00, /* length */ 0xFF /* UPDATE: service */ }; guint8 response[] = { 0x01, /* marker */ /* QMUX */ 0x17, 0x00, /* length */ 0x00, /* flags */ 0x00, /* service */ 0x00, /* client */ /* QMI header */ 0x01, /* flags: Response */ 0xFF, /* transaction */ 0x22, 0x00, /* message */ 0x0C, 0x00, /* tlv length */ /* TLV */ 0x02, /* type: Result */ 0x04, 0x00, /* length */ 0x00, 0x00, /* error status */ 0x00, 0x00, /* error code */ /* TLV */ 0x01, /* type: Allocation info */ 0x02, 0x00, /* length */ 0xFF, /* UPDATE: service */ 0x01, /* cid: 1 */ }; expected[15] = services[i]; response[22] = services[i]; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_CTL].transaction_id++); qmi_device_allocate_client (fixture->device, services[i], QMI_CID_NONE, 10, NULL, (GAsyncReadyCallback) device_allocate_client_ready, fixture); test_fixture_loop_run (fixture); } } static void device_release_client_ready (QmiDevice *device, GAsyncResult *res, TestFixture *fixture) { GError *error = NULL; gboolean st; st = qmi_device_release_client_finish (device, res, &error); g_assert_no_error (error); g_assert (st); test_fixture_loop_stop (fixture); } static void device_close_ready (QmiDevice *device, GAsyncResult *res, TestFixture *fixture) { GError *error = NULL; gboolean st; st = qmi_device_close_finish (device, res, &error); g_assert_no_error (error); g_assert (st); test_fixture_loop_stop (fixture); } void test_fixture_teardown (TestFixture *fixture) { guint i; for (i = 0; i < G_N_ELEMENTS (services); i++) { guint8 expected[] = { 0x01, /* marker */ /* QMUX */ 0x10, 0x00, /* length */ 0x00, /* flags */ 0x00, /* service CTL */ 0x00, /* client */ /* QMI header */ 0x00, /* flags */ 0xFF, /* transaction */ 0x23, 0x00, /* message: Release CID */ 0x05, 0x00, /* tlv length: 5 bytes */ /* TLV */ 0x01, /* type */ 0x02, 0x00, /* length */ 0xFF, /* UPDATE: service */ 0x01 }; guint8 response[] = { 0x01, /* marker */ /* QMUX */ 0x17, 0x00, /* length */ 0x00, /* flags */ 0x00, /* service */ 0x00, /* client */ /* QMI header */ 0x01, /* flags: Response */ 0xFF, /* transaction */ 0x23, 0x00, /* message */ 0x0C, 0x00, /* tlv length */ /* TLV */ 0x02, /* type: Result*/ 0x04, 0x00, /* length */ 0x00, 0x00, /* error status */ 0x00, 0x00, /* error code */ /* TLV */ 0x01, /* type: Allocation Info */ 0x02, 0x00, /* length */ 0xFF, /* UPDATE: service */ 0x01, /* cid: 1 */ }; expected[15] = services[i]; response[22] = services[i]; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_CTL].transaction_id++); qmi_device_release_client (fixture->device, fixture->service_info[services[i]].client, QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, 10, NULL, (GAsyncReadyCallback) device_release_client_ready, fixture); test_fixture_loop_run (fixture); g_clear_object (&fixture->service_info[services[i]].client); fixture->service_info[services[i]].transaction_id = 0x0000; } if (fixture->device) { qmi_device_close_async (fixture->device, 10, NULL, (GAsyncReadyCallback) device_close_ready, fixture); test_fixture_loop_run (fixture); g_object_unref (fixture->device); } g_free (fixture->path); /* Stop port context */ test_port_context_stop (fixture->ctx); test_port_context_free (fixture->ctx); } void test_fixture_loop_stop (TestFixture *fixture) { g_assert (fixture->loop); g_main_loop_quit (fixture->loop); } void test_fixture_loop_run (TestFixture *fixture) { g_assert (!fixture->loop); fixture->loop = g_main_loop_new (g_main_context_get_thread_default (), FALSE); g_main_loop_run (fixture->loop); g_main_loop_unref (fixture->loop); fixture->loop = NULL; } libqmi-1.35.2-dev/src/libqmi-glib/test/test-fixture.h000066400000000000000000000034511455567757300224400ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2014 Aleksander Morgado */ #ifndef TEST_FIXTURE_H #define TEST_FIXTURE_H #include #include #include "test-port-context.h" /*****************************************************************************/ /* Test fixture setup */ typedef struct { QmiClient *client; guint16 transaction_id; } TestServiceInfo; typedef struct { GMainLoop *loop; gchar *path; TestPortContext *ctx; QmiDevice *device; TestServiceInfo service_info[255]; } TestFixture; void test_fixture_setup (TestFixture *fixture); void test_fixture_teardown (TestFixture *fixture); void test_fixture_loop_run (TestFixture *fixture); void test_fixture_loop_stop (TestFixture *fixture); typedef void (*TCFunc) (TestFixture *, gconstpointer); #define TEST_ADD(path,method) \ g_test_add (path, \ TestFixture, \ NULL, \ (TCFunc)test_fixture_setup, \ (TCFunc)method, \ (TCFunc)test_fixture_teardown) #endif /* TEST_FIXTURE_H */ libqmi-1.35.2-dev/src/libqmi-glib/test/test-generated.c000066400000000000000000001610171455567757300227060ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2014 Aleksander Morgado */ #include #include #include "test-fixture.h" /*****************************************************************************/ static void test_generated_core (TestFixture *fixture) { /* Noop */ } /*****************************************************************************/ /* DMS Get IDs */ #if defined HAVE_QMI_MESSAGE_DMS_GET_IDS static void dms_get_ids_ready (QmiClientDms *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageDmsGetIdsOutput *output; GError *error = NULL; gboolean st; const gchar *str; output = qmi_client_dms_get_ids_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_dms_get_ids_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); /* [/dev/cdc-wdm3] Device IDs retrieved: * ESN: '80997874' * IMEI: '359225050039973' * MEID: '35922505003997' */ st = qmi_message_dms_get_ids_output_get_esn (output, &str, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpstr (str, ==, "80997874"); st = qmi_message_dms_get_ids_output_get_imei (output, &str, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpstr (str, ==, "359225050039973"); st = qmi_message_dms_get_ids_output_get_meid (output, &str, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpstr (str, ==, "35922505003997"); qmi_message_dms_get_ids_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_dms_get_ids (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x02, 0x01, 0x00, 0xFF, 0xFF, 0x25, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x45, 0x00, 0x80, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x25, 0x00, 0x39, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x01, 0x00, 0x42, 0x12, 0x0E, 0x00, 0x33, 0x35, 0x39, 0x32, 0x32, 0x35, 0x30, 0x35, 0x30, 0x30, 0x33, 0x39, 0x39, 0x37, 0x10, 0x08, 0x00, 0x38, 0x30, 0x39, 0x39, 0x37, 0x38, 0x37, 0x34, 0x11, 0x0F, 0x00, 0x33, 0x35, 0x39, 0x32, 0x32, 0x35, 0x30, 0x35, 0x30, 0x30, 0x33, 0x39, 0x39, 0x37, 0x33 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_DMS].transaction_id++); qmi_client_dms_get_ids (QMI_CLIENT_DMS (fixture->service_info[QMI_SERVICE_DMS].client), NULL, 3, NULL, (GAsyncReadyCallback) dms_get_ids_ready, fixture); test_fixture_loop_run (fixture); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_IDS */ /*****************************************************************************/ /* DMS UIM Get PIN Status */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS static void dms_uim_get_pin_status_ready (QmiClientDms *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageDmsUimGetPinStatusOutput *output; GError *error = NULL; gboolean st; QmiDmsUimPinStatus current_status; guint8 verify_retries_left; guint8 unblock_retries_left; output = qmi_client_dms_uim_get_pin_status_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_dms_uim_get_pin_status_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); /* [/dev/cdc-wdm3] PIN1: * Status: enabled-not-verified * Verify: 3 * Unblock: 10 * [/dev/cdc-wdm3] PIN2: * Status: enabled-not-verified * Verify: 2 * Unblock: 10 */ st = (qmi_message_dms_uim_get_pin_status_output_get_pin1_status ( output, ¤t_status, &verify_retries_left, &unblock_retries_left, &error)); g_assert_no_error (error); g_assert (st); g_assert_cmpuint (current_status, ==, QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED); g_assert_cmpuint (verify_retries_left, ==, 3); g_assert_cmpuint (unblock_retries_left, ==, 10); st = (qmi_message_dms_uim_get_pin_status_output_get_pin2_status ( output, ¤t_status, &verify_retries_left, &unblock_retries_left, &error)); g_assert_no_error (error); g_assert (st); g_assert_cmpuint (current_status, ==, QMI_DMS_UIM_PIN_STATUS_ENABLED_NOT_VERIFIED); g_assert_cmpuint (verify_retries_left, ==, 2); g_assert_cmpuint (unblock_retries_left, ==, 10); qmi_message_dms_uim_get_pin_status_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_dms_uim_get_pin_status (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x02, 0x01, 0x00, 0xFF, 0xFF, 0x2B, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x1F, 0x00, 0x80, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x2B, 0x00, 0x13, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x01, 0x02, 0x0A, 0x11, 0x03, 0x00, 0x01, 0x03, 0x0A }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_DMS].transaction_id++); qmi_client_dms_uim_get_pin_status (QMI_CLIENT_DMS (fixture->service_info[QMI_SERVICE_DMS].client), NULL, 3, NULL, (GAsyncReadyCallback) dms_uim_get_pin_status_ready, fixture); test_fixture_loop_run (fixture); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS */ /*****************************************************************************/ /* DMS UIM Verify PIN */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_VERIFY_PIN static void dms_uim_verify_pin_ready (QmiClientDms *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageDmsUimVerifyPinOutput *output; GError *error = NULL; gboolean st; output = qmi_client_dms_uim_verify_pin_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_dms_uim_verify_pin_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); qmi_message_dms_uim_verify_pin_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_dms_uim_verify_pin (TestFixture *fixture) { QmiMessageDmsUimVerifyPinInput *input; gboolean st; GError *error = NULL; guint8 expected[] = { 0x01, 0x15, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x00, 0x28, 0x00, 0x09, 0x00, 0x01, 0x06, 0x00, 0x01, 0x04, 0x31, 0x32, 0x33, 0x34 }; guint8 response[] = { 0x01, 0x13, 0x00, 0x80, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0x28, 0x00, 0x07, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_DMS].transaction_id++); input = qmi_message_dms_uim_verify_pin_input_new (); st = qmi_message_dms_uim_verify_pin_input_set_info (input, QMI_DMS_UIM_PIN_ID_PIN, "1234", &error); g_assert_no_error (error); g_assert (st); qmi_client_dms_uim_verify_pin (QMI_CLIENT_DMS (fixture->service_info[QMI_SERVICE_DMS].client), input, 3, NULL, (GAsyncReadyCallback) dms_uim_verify_pin_ready, fixture); qmi_message_dms_uim_verify_pin_input_unref (input); test_fixture_loop_run (fixture); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_VERIFY_PIN */ /*****************************************************************************/ /* DMS Get Time * * Note: the original device time in the real-life binary message used had the * time source set to QMI_DMS_TIME_SOURCE_DEVICE. This value has been modified * to explicitly make the 6-byte long uint read different from an 8-byte long * read of the same buffer, as QMI_DMS_TIME_SOURCE_DEVICE is actually 0x0000. */ #if defined HAVE_QMI_MESSAGE_DMS_GET_TIME static void dms_get_time_ready (QmiClientDms *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageDmsGetTimeOutput *output; GError *error = NULL; gboolean st; guint64 device_time_time_count; QmiDmsTimeSource device_time_time_source; guint64 system_time; guint64 user_time; output = qmi_client_dms_get_time_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_dms_get_time_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); st = qmi_message_dms_get_time_output_get_device_time (output, &device_time_time_count, &device_time_time_source, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpuint (device_time_time_count, == , 884789480513ULL); g_assert_cmpuint (device_time_time_source, ==, QMI_DMS_TIME_SOURCE_HDR_NETWORK); st = qmi_message_dms_get_time_output_get_system_time (output, &system_time, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpuint (system_time, ==, 1105986850641ULL); st = qmi_message_dms_get_time_output_get_user_time (output, &user_time, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpuint (user_time, ==, 11774664); qmi_message_dms_get_time_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_dms_get_time (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x02, 0x01, 0x00, 0x01, 0x00, 0x2F, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x34, 0x00, 0x80, 0x02, 0x01, 0x02, 0x01, 0x00, 0x2F, 0x00, 0x28, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x41, 0x0C, 0x90, 0x01, 0xCE, 0x00, 0x02, 0x00, /* Note: last 0x0200 for HDR network source */ 0x10, 0x08, 0x00, 0x51, 0x0F, 0xF4, 0x81, 0x01, 0x01, 0x00, 0x00, 0x11, 0x08, 0x00, 0xC8, 0xAA, 0xB3, 0x00, 0x00, 0x00, 0x00, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_DMS].transaction_id++); qmi_client_dms_get_time (QMI_CLIENT_DMS (fixture->service_info[QMI_SERVICE_DMS].client), NULL, 3, NULL, (GAsyncReadyCallback) dms_get_time_ready, fixture); test_fixture_loop_run (fixture); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_TIME */ /*****************************************************************************/ /* NAS Network Scan */ #if defined HAVE_QMI_MESSAGE_NAS_NETWORK_SCAN typedef struct { guint16 mcc; guint16 mnc; gboolean includes_pcs_digit; QmiNasNetworkStatus network_status; QmiNasRadioInterface rat; const gchar *description; } NetworkScanResult; static NetworkScanResult scan_results[] = { { .mcc = 214, .mnc = 1, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_AVAILABLE | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_GSM, .description = "voda ES" }, { .mcc = 214, .mnc = 3, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_AVAILABLE | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_GSM, .description = "Orange" }, { .mcc = 214, .mnc = 4, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_AVAILABLE | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_UMTS, .description = "YOIGO" }, { .mcc = 214, .mnc = 1, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_AVAILABLE | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_UMTS, .description = "voda ES" }, { .mcc = 214, .mnc = 4, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_AVAILABLE | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_GSM, .description = "YOIGO" }, { .mcc = 214, .mnc = 7, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_AVAILABLE | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_GSM, .description = "Movistar" }, { .mcc = 214, .mnc = 7, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_AVAILABLE | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_UMTS, .description = "Movistar" }, { .mcc = 214, .mnc = 3, .includes_pcs_digit = FALSE, .network_status = (QMI_NAS_NETWORK_STATUS_CURRENT_SERVING | QMI_NAS_NETWORK_STATUS_ROAMING | QMI_NAS_NETWORK_STATUS_NOT_FORBIDDEN | QMI_NAS_NETWORK_STATUS_NOT_PREFERRED), .rat = QMI_NAS_RADIO_INTERFACE_UMTS, .description = "" }, }; static void nas_network_scan_ready (QmiClientNas *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageNasNetworkScanOutput *output; GError *error = NULL; gboolean st; GArray *network_information = NULL; GPtrArray *network_information_ptr = NULL; GArray *radio_access_technology = NULL; GArray *mnc_pcs_digit_include_status = NULL; guint i; output = qmi_client_nas_network_scan_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_nas_network_scan_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); st = (qmi_message_nas_network_scan_output_get_network_information ( output, &network_information, &error)); g_assert_no_error (error); g_assert (st); g_assert (network_information); g_assert_cmpuint (network_information->len, ==, 8); for (i = 0; i < network_information->len; i++) { QmiMessageNasNetworkScanOutputNetworkInformationElement *el; el = &g_array_index (network_information, QmiMessageNasNetworkScanOutputNetworkInformationElement, i); g_assert_cmpuint (el->mcc, ==, scan_results[i].mcc); g_assert_cmpuint (el->mnc, ==, scan_results[i].mnc); g_assert_cmpuint (el->network_status, ==, scan_results[i].network_status); g_assert_cmpstr (el->description, ==, scan_results[i].description); } /* GIR compat method with GPtrArray */ st = (qmi_message_nas_network_scan_output_get_network_information_gir ( output, &network_information_ptr, &error)); g_assert_no_error (error); g_assert (st); g_assert (network_information_ptr); g_assert_cmpuint (network_information_ptr->len, ==, 8); for (i = 0; i < network_information_ptr->len; i++) { QmiMessageNasNetworkScanOutputNetworkInformationElement *el; el = g_ptr_array_index (network_information_ptr, i); g_assert_cmpuint (el->mcc, ==, scan_results[i].mcc); g_assert_cmpuint (el->mnc, ==, scan_results[i].mnc); g_assert_cmpuint (el->network_status, ==, scan_results[i].network_status); g_assert_cmpstr (el->description, ==, scan_results[i].description); } st = (qmi_message_nas_network_scan_output_get_radio_access_technology ( output, &radio_access_technology, &error)); g_assert_no_error (error); g_assert (st); g_assert (radio_access_technology); g_assert_cmpuint (radio_access_technology->len, ==, 8); for (i = 0; i < radio_access_technology->len; i++) { QmiMessageNasNetworkScanOutputRadioAccessTechnologyElement *el; el = &g_array_index (radio_access_technology, QmiMessageNasNetworkScanOutputRadioAccessTechnologyElement, i); g_assert_cmpuint (el->mcc, ==, scan_results[i].mcc); g_assert_cmpuint (el->mnc, ==, scan_results[i].mnc); g_assert_cmpuint (el->radio_interface, ==, scan_results[i].rat); } st = (qmi_message_nas_network_scan_output_get_mnc_pcs_digit_include_status ( output, &mnc_pcs_digit_include_status, &error)); g_assert_no_error (error); g_assert (st); g_assert (mnc_pcs_digit_include_status); g_assert_cmpuint (mnc_pcs_digit_include_status->len, ==, 8); for (i = 0; i < mnc_pcs_digit_include_status->len; i++) { QmiMessageNasNetworkScanOutputMncPcsDigitIncludeStatusElement *el; el = &g_array_index (mnc_pcs_digit_include_status, QmiMessageNasNetworkScanOutputMncPcsDigitIncludeStatusElement, i); g_assert_cmpuint (el->mcc, ==, scan_results[i].mcc); g_assert_cmpuint (el->mnc, ==, scan_results[i].mnc); g_assert_cmpuint (el->includes_pcs_digit, ==, scan_results[i].includes_pcs_digit); } qmi_message_nas_network_scan_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_nas_network_scan (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x03, 0x01, 0x00, 0xFF, 0xFF, 0x21, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x43, 0x01, 0x80, 0x03, 0x01, 0x02, 0xFF, 0xFF, 0x21, 0x00, 0x37, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x60, 0x00, 0x08, 0x00, 0xD6, 0x00, 0x01, 0x00, 0xAA, 0x07, 0x76, 0x6F, 0x64, 0x61, 0x20, 0x45, 0x53, 0xD6, 0x00, 0x03, 0x00, 0xAA, 0x06, 0x4F, 0x72, 0x61, 0x6E, 0x67, 0x65, 0xD6, 0x00, 0x04, 0x00, 0xAA, 0x05, 0x59, 0x4F, 0x49, 0x47, 0x4F, 0xD6, 0x00, 0x01, 0x00, 0xAA, 0x07, 0x76, 0x6F, 0x64, 0x61, 0x20, 0x45, 0x53, 0xD6, 0x00, 0x04, 0x00, 0xAA, 0x05, 0x59, 0x4F, 0x49, 0x47, 0x4F, 0xD6, 0x00, 0x07, 0x00, 0xAA, 0x08, 0x4D, 0x6F, 0x76, 0x69, 0x73, 0x74, 0x61, 0x72, 0xD6, 0x00, 0x07, 0x00, 0xAA, 0x08, 0x4D, 0x6F, 0x76, 0x69, 0x73, 0x74, 0x61, 0x72, 0xD6, 0x00, 0x03, 0x00, 0xA9, 0x00, 0x11, 0x2A, 0x00, 0x08, 0x00, 0xD6, 0x00, 0x01, 0x00, 0x04, 0xD6, 0x00, 0x03, 0x00, 0x04, 0xD6, 0x00, 0x04, 0x00, 0x05, 0xD6, 0x00, 0x01, 0x00, 0x05, 0xD6, 0x00, 0x04, 0x00, 0x04, 0xD6, 0x00, 0x07, 0x00, 0x04, 0xD6, 0x00, 0x07, 0x00, 0x05, 0xD6, 0x00, 0x03, 0x00, 0x05, 0x12, 0x2A, 0x00, 0x08, 0x00, 0xD6, 0x00, 0x01, 0x00, 0x00, 0xD6, 0x00, 0x03, 0x00, 0x00, 0xD6, 0x00, 0x04, 0x00, 0x00, 0xD6, 0x00, 0x01, 0x00, 0x00, 0xD6, 0x00, 0x04, 0x00, 0x00, 0xD6, 0x00, 0x07, 0x00, 0x00, 0xD6, 0x00, 0x07, 0x00, 0x00, 0xD6, 0x00, 0x03, 0x00, 0x00, 0x13, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x69, 0x00, 0x08, 0xD6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_NAS].transaction_id++); qmi_client_nas_network_scan (QMI_CLIENT_NAS (fixture->service_info[QMI_SERVICE_NAS].client), NULL, 3, NULL, (GAsyncReadyCallback) nas_network_scan_ready, fixture); test_fixture_loop_run (fixture); } #endif /* HAVE_QMI_MESSAGE_NAS_NETWORK_SCAN */ /*****************************************************************************/ /* NAS Get Cell Location */ #if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO static void nas_get_cell_location_info_1_ready (QmiClientNas *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageNasGetCellLocationInfoOutput *output; GError *error = NULL; gboolean st; output = qmi_client_nas_get_cell_location_info_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_nas_get_cell_location_info_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); qmi_message_nas_get_cell_location_info_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_nas_get_cell_location_info_1 (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x43, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x53, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x43, 0x00, 0x47, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x00, 0x03, 0x7D, 0x6F, 0x00, 0x00, 0x32, 0xF4, 0x51, 0xB3, 0x00, 0x4D, 0x00, 0x11, 0x2A, 0x00, 0x8A, 0x3C, 0x00, 0x00, 0x32, 0xF4, 0x51, 0xB3, 0x00, 0x63, 0x00, 0x30, 0x14, 0x00, 0x89, 0x3C, 0x00, 0x00, 0x32, 0xF4, 0x51, 0xB3, 0x00, 0x59, 0x00, 0x11, 0x0D, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_NAS].transaction_id++); qmi_client_nas_get_cell_location_info (QMI_CLIENT_NAS (fixture->service_info[QMI_SERVICE_NAS].client), NULL, 3, NULL, (GAsyncReadyCallback) nas_get_cell_location_info_1_ready, fixture); test_fixture_loop_run (fixture); } static void nas_get_cell_location_info_2_ready (QmiClientNas *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageNasGetCellLocationInfoOutput *output; GError *error = NULL; gboolean st; output = qmi_client_nas_get_cell_location_info_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_nas_get_cell_location_info_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); { gboolean value_intrafrequency_lte_info_ue_in_idle = FALSE; GArray *value_intrafrequency_lte_info_plmn = NULL; guint16 value_intrafrequency_lte_info_tracking_area_code = 0; guint32 value_intrafrequency_lte_info_global_cell_id = 0; guint16 value_intrafrequency_lte_info_eutra_absolute_rf_channel_number = 0; guint16 value_intrafrequency_lte_info_serving_cell_id = 0; guint8 value_intrafrequency_lte_info_cell_reselection_priority = 0; guint8 value_intrafrequency_lte_info_s_non_intra_search_threshold = 0; guint8 value_intrafrequency_lte_info_serving_cell_low_threshold = 0; guint8 value_intrafrequency_lte_info_s_intra_search_threshold = 0; GArray *value_intrafrequency_lte_info_cell = NULL; gboolean value_intrafrequency_lte_info_ue_in_idle_gir = FALSE; GArray *value_intrafrequency_lte_info_plmn_gir = NULL; guint16 value_intrafrequency_lte_info_tracking_area_code_gir = 0; guint32 value_intrafrequency_lte_info_global_cell_id_gir = 0; guint16 value_intrafrequency_lte_info_eutra_absolute_rf_channel_number_gir = 0; guint16 value_intrafrequency_lte_info_serving_cell_id_gir = 0; guint8 value_intrafrequency_lte_info_cell_reselection_priority_gir = 0; guint8 value_intrafrequency_lte_info_s_non_intra_search_threshold_gir = 0; guint8 value_intrafrequency_lte_info_serving_cell_low_threshold_gir = 0; guint8 value_intrafrequency_lte_info_s_intra_search_threshold_gir = 0; GPtrArray *value_intrafrequency_lte_info_cell_gir = NULL; guint i; st = qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info_v2 (output, &value_intrafrequency_lte_info_ue_in_idle, &value_intrafrequency_lte_info_plmn, &value_intrafrequency_lte_info_tracking_area_code, &value_intrafrequency_lte_info_global_cell_id, &value_intrafrequency_lte_info_eutra_absolute_rf_channel_number, &value_intrafrequency_lte_info_serving_cell_id, &value_intrafrequency_lte_info_cell_reselection_priority, &value_intrafrequency_lte_info_s_non_intra_search_threshold, &value_intrafrequency_lte_info_serving_cell_low_threshold, &value_intrafrequency_lte_info_s_intra_search_threshold, &value_intrafrequency_lte_info_cell, &error); g_assert_no_error (error); g_assert (st); st = qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info_v2_gir (output, &value_intrafrequency_lte_info_ue_in_idle_gir, &value_intrafrequency_lte_info_plmn_gir, &value_intrafrequency_lte_info_tracking_area_code_gir, &value_intrafrequency_lte_info_global_cell_id_gir, &value_intrafrequency_lte_info_eutra_absolute_rf_channel_number_gir, &value_intrafrequency_lte_info_serving_cell_id_gir, &value_intrafrequency_lte_info_cell_reselection_priority_gir, &value_intrafrequency_lte_info_s_non_intra_search_threshold_gir, &value_intrafrequency_lte_info_serving_cell_low_threshold_gir, &value_intrafrequency_lte_info_s_intra_search_threshold_gir, &value_intrafrequency_lte_info_cell_gir, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpuint (value_intrafrequency_lte_info_ue_in_idle, ==, value_intrafrequency_lte_info_ue_in_idle_gir); g_assert_cmpuint (value_intrafrequency_lte_info_plmn->len, ==, value_intrafrequency_lte_info_plmn_gir->len); for (i = 0; i < value_intrafrequency_lte_info_plmn->len; i++) g_assert_cmpuint (g_array_index (value_intrafrequency_lte_info_plmn, guint8, i), ==, g_array_index (value_intrafrequency_lte_info_plmn_gir, guint8, i)); g_assert_cmpuint (value_intrafrequency_lte_info_tracking_area_code, ==, value_intrafrequency_lte_info_tracking_area_code_gir); g_assert_cmpuint (value_intrafrequency_lte_info_global_cell_id, == , value_intrafrequency_lte_info_global_cell_id_gir); g_assert_cmpuint (value_intrafrequency_lte_info_eutra_absolute_rf_channel_number, == , value_intrafrequency_lte_info_eutra_absolute_rf_channel_number_gir); g_assert_cmpuint (value_intrafrequency_lte_info_serving_cell_id, == , value_intrafrequency_lte_info_serving_cell_id_gir); g_assert_cmpuint (value_intrafrequency_lte_info_cell_reselection_priority, == , value_intrafrequency_lte_info_cell_reselection_priority_gir); g_assert_cmpuint (value_intrafrequency_lte_info_s_non_intra_search_threshold, == , value_intrafrequency_lte_info_s_non_intra_search_threshold_gir); g_assert_cmpuint (value_intrafrequency_lte_info_serving_cell_low_threshold, == , value_intrafrequency_lte_info_serving_cell_low_threshold_gir); g_assert_cmpuint (value_intrafrequency_lte_info_s_intra_search_threshold, == , value_intrafrequency_lte_info_s_intra_search_threshold_gir); g_assert_cmpuint (value_intrafrequency_lte_info_cell->len, ==, value_intrafrequency_lte_info_cell_gir->len); for (i = 0; i < value_intrafrequency_lte_info_cell->len; i++) { QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement *cell; QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement *cell_gir; cell = &g_array_index (value_intrafrequency_lte_info_cell, QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement, i); cell_gir = g_ptr_array_index (value_intrafrequency_lte_info_cell_gir, i); g_assert_cmpuint (cell->physical_cell_id, ==, cell_gir->physical_cell_id); g_assert_cmpuint (cell->rsrq, ==, cell_gir->rsrq); g_assert_cmpuint (cell->rsrp, ==, cell_gir->rsrp); g_assert_cmpuint (cell->rssi, ==, cell_gir->rssi); g_assert_cmpuint (cell->cell_selection_rx_level, ==, cell_gir->cell_selection_rx_level); } } qmi_message_nas_get_cell_location_info_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_nas_get_cell_location_info_2 (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x43, 0x00, 0x00, 0x00, }; guint8 response[] = { 0x01, 0x67, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x43, 0x00, 0x5B, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x1D, 0x00, 0x01, 0x99, 0xF9, 0x04, 0x99, 0x00, 0x01, 0xC2, 0x01, 0x00, 0x7E, 0xA9, 0x00, 0x00, 0x01, 0x3E, 0x28, 0x3E, 0x01, 0x00, 0x00, 0xBD, 0xFF, 0x19, 0xFC, 0x23, 0xFD, 0x1E, 0x00, 0x14, 0x02, 0x00, 0x01, 0x00, 0x15, 0x02, 0x00, 0x01, 0x00, 0x16, 0x02, 0x00, 0x01, 0x00, 0x1E, 0x04, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x26, 0x02, 0x00, 0x46, 0x00, 0x27, 0x04, 0x00, 0x7E, 0xA9, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00, 0x2A, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_NAS].transaction_id++); qmi_client_nas_get_cell_location_info (QMI_CLIENT_NAS (fixture->service_info[QMI_SERVICE_NAS].client), NULL, 3, NULL, (GAsyncReadyCallback) nas_get_cell_location_info_2_ready, fixture); test_fixture_loop_run (fixture); } static void nas_get_cell_location_info_invalid_ready (QmiClientNas *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageNasGetCellLocationInfoOutput *output; g_autoptr(GError) error = NULL; output = qmi_client_nas_get_cell_location_info_finish (client, res, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_UNEXPECTED_MESSAGE); g_assert (!output); test_fixture_loop_stop (fixture); } static void test_generated_nas_get_cell_location_info_invalid (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x43, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x53, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x44, 0x00, 0x47, 0x00, 0x02, /* command id set to 0x0044 instead of 0x0043 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0x00, 0x03, 0x7D, 0x6F, 0x00, 0x00, 0x32, 0xF4, 0x51, 0xB3, 0x00, 0x4D, 0x00, 0x11, 0x2A, 0x00, 0x8A, 0x3C, 0x00, 0x00, 0x32, 0xF4, 0x51, 0xB3, 0x00, 0x63, 0x00, 0x30, 0x14, 0x00, 0x89, 0x3C, 0x00, 0x00, 0x32, 0xF4, 0x51, 0xB3, 0x00, 0x59, 0x00, 0x11, 0x0D, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_NAS].transaction_id++); qmi_client_nas_get_cell_location_info (QMI_CLIENT_NAS (fixture->service_info[QMI_SERVICE_NAS].client), NULL, 3, NULL, (GAsyncReadyCallback) nas_get_cell_location_info_invalid_ready, fixture); test_fixture_loop_run (fixture); } static void test_compat_nas_get_cell_location_info_geran_info_ready (QmiClientNas *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageNasGetCellLocationInfoOutput *output; GError *error = NULL; gboolean st; output = qmi_client_nas_get_cell_location_info_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_nas_get_cell_location_info_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); { guint32 geran_info_v2_cell_id = 0; GArray *geran_info_v2_plmn = NULL; guint16 geran_info_v2_lac = 0; guint16 geran_info_v2_geran_absolute_rf_channel_number = 0; guint8 geran_info_v2_base_station_identity_code = 0; guint32 geran_info_v2_timing_advance = 0; guint16 geran_info_v2_rx_level = 0; GArray *geran_info_v2_cell = NULL; st = qmi_message_nas_get_cell_location_info_output_get_geran_info_v2 (output, &geran_info_v2_cell_id, &geran_info_v2_plmn, &geran_info_v2_lac, &geran_info_v2_geran_absolute_rf_channel_number, &geran_info_v2_base_station_identity_code, &geran_info_v2_timing_advance, &geran_info_v2_rx_level, &geran_info_v2_cell, &error); g_assert_no_error (error); g_assert (st); #ifndef QMI_DISABLE_DEPRECATED { guint i; guint32 geran_info_cell_id = 0; const gchar *geran_info_plmn = NULL; guint16 geran_info_lac = 0; guint16 geran_info_geran_absolute_rf_channel_number = 0; guint8 geran_info_base_station_identity_code = 0; guint32 geran_info_timing_advance = 0; guint16 geran_info_rx_level = 0; GArray *geran_info_cell = NULL; st = qmi_message_nas_get_cell_location_info_output_get_geran_info (output, &geran_info_cell_id, &geran_info_plmn, &geran_info_lac, &geran_info_geran_absolute_rf_channel_number, &geran_info_base_station_identity_code, &geran_info_timing_advance, &geran_info_rx_level, &geran_info_cell, &error); g_assert_no_error (error); g_assert (st); g_assert_cmpuint (geran_info_v2_cell_id, ==, geran_info_cell_id); /* plmn won't be equal, as it's broken in v1 */ g_assert_cmpuint (geran_info_v2_lac, ==, geran_info_lac); g_assert_cmpuint (geran_info_v2_geran_absolute_rf_channel_number, ==, geran_info_geran_absolute_rf_channel_number); g_assert_cmpuint (geran_info_v2_base_station_identity_code, ==, geran_info_base_station_identity_code); g_assert_cmpuint (geran_info_v2_timing_advance, ==, geran_info_timing_advance); g_assert_cmpuint (geran_info_v2_rx_level, ==, geran_info_rx_level); g_assert (geran_info_cell); g_assert_cmpuint (geran_info_cell->len, ==, geran_info_v2_cell->len); for (i = 0; i < geran_info_v2_cell->len; i++) { QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement *elemv2; QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement *elem; elemv2 = &g_array_index (geran_info_v2_cell, QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement, i); elem = &g_array_index (geran_info_cell, QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement, i); g_assert_cmpuint (elem->cell_id, ==, elemv2->cell_id); /* plmn won't be equal, as it's broken in v1 */ g_assert_cmpuint (elem->lac, ==, elemv2->lac); g_assert_cmpuint (elem->geran_absolute_rf_channel_number, ==, elemv2->geran_absolute_rf_channel_number); g_assert_cmpuint (elem->base_station_identity_code, ==, elemv2->base_station_identity_code); g_assert_cmpuint (elem->rx_level, ==, elemv2->rx_level); } } #endif /* QMI_DISABLE_DEPRECATED */ } qmi_message_nas_get_cell_location_info_output_unref (output); test_fixture_loop_stop (fixture); } static void test_compat_nas_get_cell_location_info_geran_info (TestFixture *fixture) { guint8 request[] = { 0x01, 0x0C, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x43, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x58, 0x01, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x43, 0x00, 0x4C, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x67, 0x00, 0x02, 0x09, 0x00, 0x00, 0x12, 0xF4, 0x30, 0x76, 0x04, 0xDD, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x06, 0x8E, 0x08, 0x00, 0x00, 0x12, 0xF4, 0x30, 0x76, 0x04, 0xD0, 0x03, 0x28, 0x28, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x03, 0x0B, 0x1C, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x03, 0x24, 0x1A, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x03, 0x01, 0x18, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDF, 0x03, 0x22, 0x17, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDA, 0x03, 0x08, 0x10, 0x00, 0x1B, 0x04, 0x00, 0xFF, 0xFF, 0xDD, 0x03, 0x21, 0xC7, 0x00, 0x02, 0x09, 0x00, 0x00, 0x12, 0xF4, 0x30, 0x76, 0x04, 0xDD, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x06, 0x8E, 0x08, 0x00, 0x00, 0x12, 0xF4, 0x30, 0x76, 0x04, 0xD0, 0x03, 0x28, 0x28, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0x03, 0x0B, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD5, 0x03, 0x24, 0x1A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD7, 0x03, 0x01, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDF, 0x03, 0x22, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDA, 0x03, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x03, 0x00, 0x00, 0xFF, 0xFF, 0x25, 0x01, 0x00, 0x00 }; test_port_context_set_command (fixture->ctx, request, G_N_ELEMENTS (request), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_NAS].transaction_id++); qmi_client_nas_get_cell_location_info (QMI_CLIENT_NAS (fixture->service_info[QMI_SERVICE_NAS].client), NULL, 3, NULL, (GAsyncReadyCallback) test_compat_nas_get_cell_location_info_geran_info_ready, fixture); test_fixture_loop_run (fixture); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO */ /*****************************************************************************/ /* NAS Get Serving System */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SERVING_SYSTEM static void nas_get_serving_system_ready (QmiClientNas *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageNasGetServingSystemOutput *output; GError *error = NULL; gboolean st; output = qmi_client_nas_get_serving_system_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_nas_get_serving_system_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); /* current plmn in GSM-7 instead of UTF-8: * <<<<<< TLV: * <<<<<< type = "Current PLMN" (0x12) * <<<<<< length = 10 * <<<<<< value = DE:00:32:00:05:49:76:3A:4C:06 * <<<<<< translated = [ mcc = '222' mnc = '50' description = 'Iliad' ] */ { guint16 mcc; guint16 mnc; const gchar *description; g_assert (qmi_message_nas_get_serving_system_output_get_current_plmn (output, &mcc, &mnc, &description, &error)); g_assert_no_error (error); g_assert_cmpuint (mcc, ==, 222); g_assert_cmpuint (mnc, ==, 50); g_assert_cmpstr (description, ==, "Iliad"); } qmi_message_nas_get_serving_system_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_nas_get_serving_system (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x6E, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x24, 0x00, 0x62, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x05, 0x10, 0x01, 0x00, 0x01, 0x11, 0x04, 0x00, 0x03, 0x03, 0x04, 0x05, 0x12, 0x0A, 0x00, 0xDE, 0x00, 0x32, 0x00, 0x05, 0x49, 0x76, 0x3A, 0x4C, 0x06, 0x15, 0x03, 0x00, 0x01, 0x05, 0x01, 0x1B, 0x01, 0x00, 0x00, 0x1C, 0x02, 0x00, 0xB4, 0x5F, 0x1D, 0x04, 0x00, 0xCF, 0x5A, 0x13, 0x01, 0x21, 0x05, 0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x25, 0x08, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x26, 0x02, 0x00, 0x22, 0x01, 0x27, 0x05, 0x00, 0xDE, 0x00, 0x32, 0x00, 0x00, 0x28, 0x01, 0x00, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_NAS].transaction_id++); qmi_client_nas_get_serving_system (QMI_CLIENT_NAS (fixture->service_info[QMI_SERVICE_NAS].client), NULL, 3, NULL, (GAsyncReadyCallback) nas_get_serving_system_ready, fixture); test_fixture_loop_run (fixture); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SERVING_SYSTEM */ /*****************************************************************************/ /* NAS Get System Info */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO static void nas_get_system_info_ready (QmiClientNas *client, GAsyncResult *res, TestFixture *fixture) { QmiMessageNasGetSystemInfoOutput *output; GError *error = NULL; gboolean st; output = qmi_client_nas_get_system_info_finish (client, res, &error); g_assert_no_error (error); g_assert (output); st = qmi_message_nas_get_system_info_output_get_result (output, &error); g_assert_no_error (error); g_assert (st); { gboolean domain_valid = FALSE; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid = FALSE; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid = FALSE; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid = FALSE; gboolean forbidden; gboolean lac_valid = FALSE; guint16 lac; gboolean cid_valid = FALSE; guint32 cid; gboolean registration_reject_info_valid = FALSE; QmiNasNetworkServiceDomain registration_reject_domain; QmiNasRejectCause registration_reject_cause; gboolean network_id_valid = FALSE; const gchar *mcc = NULL; const gchar *mnc = NULL; gboolean tac_valid = FALSE; guint16 tac; /* * LTE service: * Status: 'available' * True Status: 'available' * Preferred data path: 'no' * Domain: 'cs-ps' * Service capability: 'cs-ps' * Roaming status: 'off' * Forbidden: 'no' * Cell ID: '1609474' * MCC: '530' * MNC: '24' -- Given as 2 digits, suffixed with 0xFF! * Tracking Area Code: '63001' * Voice support: 'yes' * IMS voice support: 'no' * eMBMS coverage info support: 'no' * eMBMS coverage info trace ID: '65535' * Cell access: 'all-calls' * Registration restriction: 'unrestricted' * Registration domain: 'not-applicable' */ g_assert (qmi_message_nas_get_system_info_output_get_lte_system_info_v2 ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &lac_valid, &lac, &cid_valid, &cid, ®istration_reject_info_valid, ®istration_reject_domain, ®istration_reject_cause, &network_id_valid, &mcc, &mnc, &tac_valid, &tac, &error)); g_assert_no_error (error); g_assert (domain_valid); g_assert_cmpuint (domain, ==, QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS); g_assert (service_capability_valid); g_assert_cmpuint (service_capability, ==, QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS); g_assert (roaming_status_valid); g_assert_cmpuint (roaming_status, ==, QMI_NAS_ROAMING_STATUS_OFF); g_assert (forbidden_valid); g_assert (!forbidden); g_assert (!lac_valid); g_assert (cid_valid); g_assert_cmpuint (cid, ==, 1616133); g_assert (!registration_reject_info_valid); g_assert (network_id_valid); g_assert_cmpstr (mcc, ==, "530"); g_assert_cmpstr (mnc, ==, "24"); g_assert (tac_valid); g_assert_cmpuint (tac, ==, 63001); } qmi_message_nas_get_system_info_output_unref (output); test_fixture_loop_stop (fixture); } static void test_generated_nas_get_system_info (TestFixture *fixture) { guint8 expected[] = { 0x01, 0x0C, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x00, 0x4D, 0x00, 0x00, 0x00 }; guint8 response[] = { 0x01, 0x9A, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x4D, 0x00, 0x8E, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00, 0x00, 0x00, 0x13, 0x03, 0x00, 0x00, 0x00, 0x00, 0x14, 0x03, 0x00, 0x02, 0x02, 0x00, 0x19, 0x1D, 0x00, 0x01, 0x03, 0x01, 0x03, 0x01, 0x00, 0x01, 0x00, 0x00, 0xFF, 0xFF, 0x01, 0x05, 0xA9, 0x18, 0x00, 0x00, 0x00, 0x00, 0x01, 0x35, 0x33, 0x30, 0x32, 0x34, 0xFF, 0x01, 0x19, 0xF6, 0x1E, 0x02, 0x00, 0xFF, 0xFF, 0x21, 0x01, 0x00, 0x01, 0x26, 0x01, 0x00, 0x00, 0x27, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x29, 0x01, 0x00, 0x00, 0x2A, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2F, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x34, 0x02, 0x00, 0xFF, 0xFF, 0x38, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00, 0x39, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3E, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x04, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00 }; test_port_context_set_command (fixture->ctx, expected, G_N_ELEMENTS (expected), response, G_N_ELEMENTS (response), fixture->service_info[QMI_SERVICE_NAS].transaction_id++); qmi_client_nas_get_system_info (QMI_CLIENT_NAS (fixture->service_info[QMI_SERVICE_NAS].client), NULL, 3, NULL, (GAsyncReadyCallback) nas_get_system_info_ready, fixture); test_fixture_loop_run (fixture); } #endif /*****************************************************************************/ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); /* Test the setup/teardown test methods */ TEST_ADD ("/libqmi-glib/generated/core", test_generated_core); #if defined HAVE_QMI_MESSAGE_DMS_GET_IDS TEST_ADD ("/libqmi-glib/generated/dms/get-ids", test_generated_dms_get_ids); #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS TEST_ADD ("/libqmi-glib/generated/dms/uim-get-pin-status", test_generated_dms_uim_get_pin_status); #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_VERIFY_PIN TEST_ADD ("/libqmi-glib/generated/dms/uim-verify-pin", test_generated_dms_uim_verify_pin); #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_TIME TEST_ADD ("/libqmi-glib/generated/dms/get-time", test_generated_dms_get_time); #endif #if defined HAVE_QMI_MESSAGE_NAS_NETWORK_SCAN TEST_ADD ("/libqmi-glib/generated/nas/network-scan", test_generated_nas_network_scan); #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO TEST_ADD ("/libqmi-glib/generated/nas/get-cell-location-info/1", test_generated_nas_get_cell_location_info_1); TEST_ADD ("/libqmi-glib/generated/nas/get-cell-location-info/2", test_generated_nas_get_cell_location_info_2); TEST_ADD ("/libqmi-glib/generated/nas/get-cell-location-info/invalid", test_generated_nas_get_cell_location_info_invalid); TEST_ADD ("/libqmi-glib/compat/nas/get-cell-location-info/geran-info", test_compat_nas_get_cell_location_info_geran_info); #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SERVING_SYSTEM TEST_ADD ("/libqmi-glib/generated/nas/get-serving-system", test_generated_nas_get_serving_system); #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO TEST_ADD ("/libqmi-glib/generated/nas/get-system-info", test_generated_nas_get_system_info); #endif return g_test_run (); } libqmi-1.35.2-dev/src/libqmi-glib/test/test-message-fuzzer.c000066400000000000000000000012561455567757300237150ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright (C) 2022 Google, Inc. */ #include #include #include #include #include "qmi-message.h" int LLVMFuzzerTestOneInput (const uint8_t *data, size_t size) { g_autoptr(GByteArray) bytearray = NULL; g_autoptr(QmiMessage) message = NULL; g_autoptr(GError) error = NULL; if (!size) return 0; bytearray = g_byte_array_append (g_byte_array_sized_new (size), data, size); message = qmi_message_new_from_raw (bytearray, &error); return 0; } libqmi-1.35.2-dev/src/libqmi-glib/test/test-message.c000066400000000000000000001767471455567757300224140ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2012-2014 Aleksander Morgado */ #include #include #include #include #include /*****************************************************************************/ static gchar * __str_hex (gconstpointer mem, gsize size, gchar delimiter) { const guint8 *data = mem; gsize i; gsize j; gsize new_str_length; gchar *new_str; /* Get new string length. If input string has N bytes, we need: * - 1 byte for last NUL char * - 2N bytes for hexadecimal char representation of each byte... * - N-1 bytes for the separator ':' * So... a total of (1+2N+N-1) = 3N bytes are needed... */ new_str_length = 3 * size; /* Allocate memory for new array and initialize contents to NUL */ new_str = g_malloc0 (new_str_length); /* Print hexadecimal representation of each byte... */ for (i = 0, j = 0; i < size; i++, j += 3) { /* Print character in output string... */ snprintf (&new_str[j], 3, "%02X", data[i]); /* And if needed, add separator */ if (i != (size - 1) ) new_str[j + 2] = delimiter; } /* Set output string */ return new_str; } static void _g_assert_cmpmem (gconstpointer mem1, gsize size1, gconstpointer mem2, gsize size2) { g_autofree gchar *str1 = NULL; g_autofree gchar *str2 = NULL; str1 = __str_hex (mem1, size1, ':'); str2 = __str_hex (mem2, size2, ':'); g_assert_cmpstr (str1, ==, str2); } /*****************************************************************************/ static void test_message_parse_common (const guint8 *buffer, guint buffer_len, guint n_expected_messages) { g_autoptr(GByteArray) array = NULL; guint n_messages = 0; array = g_byte_array_sized_new (buffer_len); g_byte_array_append (array, buffer, buffer_len); do { g_autoptr(GError) error = NULL; g_autoptr(QmiMessage) message = NULL; g_autofree gchar *printable = NULL; message = qmi_message_new_from_raw (array, &error); if (!message) { if (error) { if (n_messages < n_expected_messages) g_printerr ("error creating message from raw data: '%s'\n", error->message); else g_debug ("error creating message from raw data: '%s'", error->message); } break; } printable = qmi_message_get_printable_full (message, NULL, ""); g_debug ("%s", printable); n_messages++; } while (array->len > 0); g_assert_cmpuint (n_messages, ==, n_expected_messages); } static void test_message_parse_wrong_qmux (void) { const guint8 buffer[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a }; test_message_parse_common (buffer, sizeof (buffer), 0); } static void test_message_parse_tiny (void) { const guint8 buffer[] = { 0x01, 0x00, 0x02 }; test_message_parse_common (buffer, sizeof (buffer), 0); } static void test_message_parse_short (void) { const guint8 buffer[] = { 0x01, 0x26, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x9b, 0x05, 0x11, 0x04, 0x00, 0x01, 0x00, 0x66, 0x05 }; test_message_parse_common (buffer, sizeof (buffer), 0); } static void test_message_parse_complete (void) { const guint8 buffer[] = { 0x01, 0x26, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x9b, 0x05, 0x11, 0x04, 0x00, 0x01, 0x00, 0x65, 0x05, 0x12, 0x04, 0x00, 0x01, 0x00, 0x11, 0x05 }; test_message_parse_common (buffer, sizeof (buffer), 1); } static void test_message_parse_complete_and_short (void) { const guint8 buffer[] = { 0x01, 0x26, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x9b, 0x05, 0x11, 0x04, 0x00, 0x01, 0x00, 0x65, 0x05, 0x12, 0x04, 0x00, 0x01, 0x00, 0x11, 0x05, 0x01, 0x26, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x9b, 0x05, 0x11, 0x04, 0x00, 0x01, 0x00, 0x66, 0x05 }; test_message_parse_common (buffer, sizeof (buffer), 1); } static void test_message_parse_complete_and_complete (void) { const guint8 buffer[] = { 0x01, 0x26, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x9b, 0x05, 0x11, 0x04, 0x00, 0x01, 0x00, 0x65, 0x05, 0x12, 0x04, 0x00, 0x01, 0x00, 0x11, 0x05, 0x01, 0x26, 0x00, 0x80, 0x03, 0x01, 0x02, 0x01, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x9b, 0x05, 0x11, 0x04, 0x00, 0x01, 0x00, 0x65, 0x05, 0x12, 0x04, 0x00, 0x01, 0x00, 0x11, 0x05 }; test_message_parse_common (buffer, sizeof (buffer), 2); } static void test_message_printable_common (const guint8 *buffer, guint buffer_len, guint16 vendor_id, const gchar *expected_in_printable) { g_autoptr(QmiMessageContext) context = NULL; g_autoptr(QmiMessage) message = NULL; g_autoptr(GByteArray) array = NULL; g_autoptr(GError) error = NULL; g_autofree gchar *printable = NULL; if (vendor_id != QMI_MESSAGE_VENDOR_GENERIC) { context = qmi_message_context_new (); qmi_message_context_set_vendor_id (context, vendor_id); } array = g_byte_array_sized_new (buffer_len); g_byte_array_append (array, buffer, buffer_len); message = qmi_message_new_from_raw (array, &error); g_assert_no_error (error); g_assert (message); printable = qmi_message_get_printable_full (message, context, ""); g_debug ("%s", printable); g_assert (strstr (printable, expected_in_printable)); } static void test_message_parse_wrong_tlv (void) { const guint8 buffer[] = { 0x01, 0x4F, 0x00, 0x80, 0x03, 0x03, 0x02, 0x01, 0x00, 0x24, 0x00, 0x43, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0x04, 0x00, 0x02, 0x03, 0x00, 0x00, 0x1D, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x02, 0x00, 0x00, 0x00, 0x15, 0x03, 0x00, 0x01, 0x05, 0x01, 0x12, 0x0E, 0x00, 0x36, 0x01, 0x04, 0x01, 0x09, 0x20, 0x54, 0x2D, 0x4D, 0x6F, 0x62, 0x69, 0x6C, 0x65, 0x11, 0x02, 0x00, 0x01, 0x05, 0x10, 0x01, 0x00, 0x01, 0x01, 0x06, 0x00, 0x01, 0x01, 0x01, 0x02, 0x01, 0x05 }; test_message_printable_common (buffer, G_N_ELEMENTS (buffer), QMI_MESSAGE_VENDOR_GENERIC, "ERROR: Reading TLV would overflow"); } #if defined HAVE_QMI_INDICATION_PDS_EVENT_REPORT static void test_message_parse_missing_size (void) { /* PDS Event Report indication: NMEA position */ const guint8 buffer[] = { 0x01, /* marker */ 0x10, 0x00, /* qmux length */ 0x80, /* qmux flags */ 0x06, /* service: PDS */ 0x03, /* client */ 0x04, /* service flags: Indication */ 0x01, 0x00, /* transaction */ 0x01, 0x00, /* message: Event Report */ 0x04, 0x00, /* all tlvs length: 4 bytes */ /* TLV */ 0x11, /* type: Extended NMEA Position (1 guint8 and one 16-bit-sized string) */ 0x01, 0x00, /* length: 1 byte (WE ONLY GIVE THE GUINT8!!!) */ 0x01 }; test_message_printable_common (buffer, G_N_ELEMENTS (buffer), QMI_MESSAGE_VENDOR_GENERIC, "ERROR: Reading TLV would overflow"); } #endif #if defined HAVE_QMI_INDICATION_LOC_NMEA static void test_message_parse_string_with_crlf (void) { /* LOC indication: NMEA * The NMEA trace comes suffixed with \r\n, this test makes sure the proper * parsing is done on the string. */ const guint8 buffer[] = { 0x01, 0x2D, 0x00, 0x80, 0x10, 0x01, 0x04, 0xB4, 0x00, 0x26, 0x00, 0x21, 0x00, 0x01, 0x1E, 0x00, 0x24, 0x47, 0x50, 0x47, 0x53, 0x41, 0x2C, 0x41, 0x2C, 0x31, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2A, 0x31, 0x45, 0x0D, 0x0A }; test_message_printable_common (buffer, sizeof (buffer), QMI_MESSAGE_VENDOR_GENERIC, "$GPGSA,A,1,,,,,,,,,,,,,,,*1E"); } #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_CURRENT_FIRMWARE static void test_message_parse_string_with_trailing_nul (void) { /* The Sierra Wireless (vid 0x1199) specific method to get current firmware * info uses NUL-terminated strings. */ const guint8 buffer[] = { 0x01, 0x82, 0x00, 0x80, 0x02, 0x03, 0x02, 0x01, 0x00, 0x56, 0x55, 0x76, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0C, 0x00, 0x30, 0x30, 0x32, 0x2E, 0x30, 0x37, 0x32, 0x5F, 0x30, 0x30, 0x30, 0x00, 0x17, 0x08, 0x00, 0x47, 0x45, 0x4E, 0x45, 0x52, 0x49, 0x43, 0x00, 0x16, 0x08, 0x00, 0x30, 0x30, 0x30, 0x2E, 0x30, 0x30, 0x35, 0x00, 0x15, 0x02, 0x00, 0x31, 0x00, 0x13, 0x08, 0x00, 0x31, 0x31, 0x30, 0x32, 0x34, 0x37, 0x36, 0x00, 0x12, 0x15, 0x00, 0x53, 0x57, 0x49, 0x39, 0x58, 0x33, 0x30, 0x43, 0x5F, 0x30, 0x32, 0x2E, 0x33, 0x33, 0x2E, 0x30, 0x33, 0x2E, 0x30, 0x30, 0x00, 0x11, 0x15, 0x00, 0x53, 0x57, 0x49, 0x39, 0x58, 0x33, 0x30, 0x43, 0x5F, 0x30, 0x32, 0x2E, 0x33, 0x33, 0x2E, 0x30, 0x33, 0x2E, 0x30, 0x30, 0x00, 0x10, 0x07, 0x00, 0x4D, 0x43, 0x37, 0x34, 0x35, 0x35, 0x00 }; test_message_printable_common (buffer, sizeof (buffer), 0x1199, "SWI9X30C_02.33.03.00"); } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MODEL static void test_message_parse_string_with_trailing_tab (void) { /* Quectel EM12-AW model strint has a trailing TAB character (ASCII 0x09) */ const guint8 buffer[] = { 0x01, 0x1E, 0x00, 0x80, 0x02, 0x05, 0x02, 0x01, 0x00, 0x22, 0x00, 0x12, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x45, 0x4D, 0x31, 0x32, 0x2D, 0x41, 0x57, 0x09 }; test_message_printable_common (buffer, sizeof (buffer), QMI_MESSAGE_VENDOR_GENERIC, "EM12-AW"); } #endif #if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS static void test_message_parse_signed_int (void) { /* Temperature given as a signed int */ const guint8 buffer[] = { 0x01, 0x27, 0x00, 0x80, 0x03, 0x05, 0x02, 0x01, 0x00, 0x56, 0x55, 0x1B, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x09, 0x00, 0x08, 0x01, 0xFC, 0x0D, 0xFF, 0xFF, 0x02, 0x00, 0x00, 0x01, 0x05, 0x00, 0xFB, 0x05, 0x09, 0x00, 0x00 }; test_message_printable_common (buffer, sizeof (buffer), 0x1199, "temperature = '-5'"); } #endif /*****************************************************************************/ static void test_message_new_request (void) { static const guint8 expected_buffer [] = { 0x01, /* marker */ 0x0C, 0x00, /* qmux length */ 0x00, /* qmux flags */ 0x02, /* service: DMS */ 0x01, /* client id */ 0x00, /* service flags */ 0x02, 0x00, /* transaction */ 0xFF, 0xFF, /* message id */ 0x00, 0x00, /* all tlvs length */ }; g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; const guint8 *buffer; gsize buffer_length = 0; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); g_assert (self); buffer = qmi_message_get_raw (self, &buffer_length, &error); g_assert_no_error (error); g_assert (buffer != NULL); g_assert_cmpuint (buffer_length, >, 0); _g_assert_cmpmem (buffer, buffer_length, expected_buffer, sizeof (expected_buffer)); } static void test_message_new_request_from_data (void) { static const guint8 expected_buffer [] = { 0x00, /* service flags */ 0x02, 0x00, /* transaction */ 0xFF, 0xFF, /* message id */ 0x00, 0x00, /* all tlvs length */ }; g_autoptr(GByteArray) qmi = NULL; g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; const guint8 *buffer; gsize buffer_length = 0; /* set up service header */ qmi = g_byte_array_new (); g_byte_array_append (qmi, expected_buffer, sizeof (expected_buffer)); self = qmi_message_new_from_data (QMI_SERVICE_DMS, 0x01, qmi, &error); g_assert_no_error (error); g_assert (self); /* check that the QMUX header contains the right values*/ g_assert_cmpuint (qmi_message_get_service (self), ==, QMI_SERVICE_DMS); g_assert_cmpuint (qmi_message_get_client_id (self), ==, 0x01); /* length (13) = qmux marker (1) + qmux header length (5) + qmi header length (7) */ g_assert_cmpuint (qmi_message_get_length (self), ==, 13); /* check that transaction and message IDs line up */ g_assert_cmpuint (qmi_message_get_transaction_id (self), ==, 0x02); g_assert_cmpuint (qmi_message_get_message_id (self), ==, 0xFFFF); buffer = qmi_message_get_raw (self, &buffer_length, &error); g_assert_no_error (error); g_assert (buffer != NULL); g_assert_cmpuint (buffer_length, >, 0); /* check that we have a qmux marker so we don't break framing */ g_assert_cmpuint (buffer[0], ==, 0x01); /* make sure the qmi portion of the message is what we expect */ buffer = qmi_message_get_data (self, &buffer_length, &error); g_assert_no_error (error); g_assert (buffer != NULL); g_assert_cmpuint (buffer_length, >, 0); _g_assert_cmpmem (buffer, buffer_length, expected_buffer, sizeof (expected_buffer)); } static void test_message_new_response_ok (void) { static const guint8 expected_buffer [] = { 0x01, /* marker */ 0x13, 0x00, /* qmux length */ 0x80, /* qmux flags */ 0x02, /* service: DMS */ 0x01, /* client id */ 0x02, /* service flags */ 0x02, 0x00, /* transaction */ 0xFF, 0xFF, /* message id */ 0x07, 0x00, /* all tlvs length */ /* TLV */ 0x02, /* tlv type */ 0x04, 0x00, /* tlv size */ 0x00, 0x00, 0x00, 0x00 }; g_autoptr(QmiMessage) request = NULL; g_autoptr(QmiMessage) response = NULL; g_autoptr(GError) error = NULL; const guint8 *buffer; gsize buffer_length = 0; request = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); g_assert (request); response = qmi_message_response_new (request, QMI_PROTOCOL_ERROR_NONE); g_assert (response); buffer = qmi_message_get_raw (response, &buffer_length, &error); g_assert_no_error (error); g_assert (buffer != NULL); g_assert_cmpuint (buffer_length, >, 0); _g_assert_cmpmem (buffer, buffer_length, expected_buffer, sizeof (expected_buffer)); } static void test_message_new_response_error (void) { static const guint8 expected_buffer [] = { 0x01, /* marker */ 0x13, 0x00, /* qmux length */ 0x80, /* qmux flags */ 0x02, /* service: DMS */ 0x01, /* client id */ 0x02, /* service flags */ 0x02, 0x00, /* transaction */ 0xFF, 0xFF, /* message id */ 0x07, 0x00, /* all tlvs length */ /* TLV */ 0x02, /* tlv type */ 0x04, 0x00, /* tlv size */ 0x01, 0x00, 0x03, 0x00 }; g_autoptr(QmiMessage) request = NULL; g_autoptr(QmiMessage) response = NULL; g_autoptr(GError) error = NULL; const guint8 *buffer; gsize buffer_length = 0; request = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); g_assert (request); response = qmi_message_response_new (request, QMI_PROTOCOL_ERROR_INTERNAL); g_assert (response); buffer = qmi_message_get_raw (response, &buffer_length, &error); g_assert_no_error (error); g_assert (buffer != NULL); g_assert_cmpuint (buffer_length, >, 0); _g_assert_cmpmem (buffer, buffer_length, expected_buffer, sizeof (expected_buffer)); } /*****************************************************************************/ static void test_message_tlv_write_empty (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); } static void test_message_tlv_write_reset (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; gsize previous_size; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); previous_size = qmi_message_get_length (self); /* Test reset just after init */ init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); qmi_message_tlv_write_reset (self, init_offset); g_assert_cmpuint (previous_size, ==, qmi_message_get_length (self)); /* Test reset after adding variables */ init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); ret = qmi_message_tlv_write_guint8 (self, 0x12, &error); g_assert_no_error (error); g_assert (ret); qmi_message_tlv_write_reset (self, init_offset); g_assert_cmpuint (previous_size, ==, qmi_message_get_length (self)); } static void test_message_tlv_rw_8 (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; gsize expected_tlv_payload_size = 0; guint16 tlv_length = 0; gsize offset; guint8 uint8; gint8 int8; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); /* Add one of each */ expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_guint8 (self, 0x12, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_gint8 (self, 0 - 0x12, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); g_assert_cmpuint (tlv_length, ==, expected_tlv_payload_size); offset = 0; ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &uint8, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint8, ==, 0x12); ret = qmi_message_tlv_read_gint8 (self, init_offset, &offset, &int8, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int8, ==, 0 - 0x12); } static void test_message_tlv_rw_16 (void) { guint n_bytes_prefixed; /* We'll add [0 or 1] bytes before the actual 16-bit values, so that we * check all possible memory alignments. */ for (n_bytes_prefixed = 0; n_bytes_prefixed <= 1; n_bytes_prefixed++) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gsize expected_tlv_payload_size = 0; guint16 uint16; gint16 int16; guint i; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); for (i = 0; i < n_bytes_prefixed; i++) { expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_guint8 (self, 0xFF, &error); g_assert_no_error (error); g_assert (ret); } /* Add one of each */ expected_tlv_payload_size += 2; ret = qmi_message_tlv_write_guint16 (self, QMI_ENDIAN_LITTLE, 0x1212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 2; ret = qmi_message_tlv_write_gint16 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 2; ret = qmi_message_tlv_write_guint16 (self, QMI_ENDIAN_BIG, 0x1212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 2; ret = qmi_message_tlv_write_gint16 (self, QMI_ENDIAN_BIG, 0 - 0x1212, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); g_assert_cmpuint (tlv_length, ==, expected_tlv_payload_size); offset = 0; for (i = 0; i < n_bytes_prefixed; i++) { guint8 aux; ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &aux, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (aux, ==, 0xFF); } ret = qmi_message_tlv_read_guint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint16, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint16, ==, 0x1212); ret = qmi_message_tlv_read_gint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int16, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int16, ==, 0 - 0x1212); ret = qmi_message_tlv_read_guint16 (self, init_offset, &offset, QMI_ENDIAN_BIG, &uint16, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint16, ==, 0x1212); ret = qmi_message_tlv_read_gint16 (self, init_offset, &offset, QMI_ENDIAN_BIG, &int16, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int16, ==, 0 - 0x1212); } } static void test_message_tlv_rw_32 (void) { guint n_bytes_prefixed; /* We'll add [0, 1, 2, 3] bytes before the actual 32-bit values, so that we * check all possible memory alignments. */ for (n_bytes_prefixed = 0; n_bytes_prefixed <= 3; n_bytes_prefixed++) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gsize expected_tlv_payload_size = 0; guint32 uint32; gint32 int32; guint i; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); for (i = 0; i < n_bytes_prefixed; i++) { expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_guint8 (self, 0xFF, &error); g_assert_no_error (error); g_assert (ret); } /* Add one of each */ expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_guint32 (self, QMI_ENDIAN_LITTLE, 0x12121212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_gint32 (self, QMI_ENDIAN_LITTLE, 0 - 0x12121212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_guint32 (self, QMI_ENDIAN_BIG, 0x12121212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_gint32 (self, QMI_ENDIAN_BIG, 0 - 0x12121212, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); g_assert_cmpuint (tlv_length, ==, expected_tlv_payload_size); offset = 0; for (i = 0; i < n_bytes_prefixed; i++) { guint8 aux; ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &aux, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (aux, ==, 0xFF); } ret = qmi_message_tlv_read_guint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint32, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint32, ==, 0x12121212); ret = qmi_message_tlv_read_gint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int32, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int32, ==, 0 - 0x12121212); ret = qmi_message_tlv_read_guint32 (self, init_offset, &offset, QMI_ENDIAN_BIG, &uint32, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint32, ==, 0x12121212); ret = qmi_message_tlv_read_gint32 (self, init_offset, &offset, QMI_ENDIAN_BIG, &int32, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int32, ==, 0 - 0x12121212); } } static void test_message_tlv_rw_64 (void) { guint n_bytes_prefixed; /* We'll add [0, 1, 2, 3, 4, 5, 6, 7] bytes before the actual 64-bit values, * so that we check all possible memory alignments. */ for (n_bytes_prefixed = 0; n_bytes_prefixed <= 7; n_bytes_prefixed++) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gsize expected_tlv_payload_size = 0; guint64 uint64; gint64 int64; guint i; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); for (i = 0; i < n_bytes_prefixed; i++) { expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_guint8 (self, 0xFF, &error); g_assert_no_error (error); g_assert (ret); } /* Add one of each */ expected_tlv_payload_size += 8; ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212ULL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212LL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_BIG, 0x1212121212121212ULL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_BIG, 0 - 0x1212121212121212LL, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); g_assert_cmpuint (tlv_length, ==, expected_tlv_payload_size); offset = 0; for (i = 0; i < n_bytes_prefixed; i++) { guint8 aux; ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &aux, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (aux, ==, 0xFF); } ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint64, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint64, ==, 0x1212121212121212ULL); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int64, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212LL); ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_BIG, &uint64, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint64, ==, 0x1212121212121212ULL); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_BIG, &int64, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212LL); } } static void test_message_tlv_rw_sized (void) { guint sized[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; guint sized_i; for (sized_i = 0; sized_i < G_N_ELEMENTS (sized); sized_i++) { guint n_bytes_prefixed; /* We'll add [0, 1, 2, 3, 4, 5, 6, 7] bytes before the actual N-bit values, * so that we check all possible memory alignments. */ for (n_bytes_prefixed = 0; n_bytes_prefixed <= sized[sized_i] - 1; n_bytes_prefixed++) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gsize expected_tlv_payload_size = 0; guint64 uint64; guint i; guint64 value; guint64 tmp; value = 0x1212121212121212ULL; tmp = 0xFF; for (i = 1; i < sized[sized_i]; i++) { tmp <<= 8; tmp |= 0xFF; } value &= tmp; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); for (i = 0; i < n_bytes_prefixed; i++) { expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_guint8 (self, 0xFF, &error); g_assert_no_error (error); g_assert (ret); } /* Add one of each */ expected_tlv_payload_size += sized[sized_i]; ret = qmi_message_tlv_write_sized_guint (self, sized[sized_i], QMI_ENDIAN_LITTLE, value, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += sized[sized_i]; ret = qmi_message_tlv_write_sized_guint (self, sized[sized_i], QMI_ENDIAN_BIG, value, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); g_assert_cmpuint (tlv_length, ==, expected_tlv_payload_size); offset = 0; for (i = 0; i < n_bytes_prefixed; i++) { guint8 aux; ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &aux, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (aux, ==, 0xFF); } qmi_message_tlv_read_sized_guint (self, init_offset, &offset, sized[sized_i], QMI_ENDIAN_LITTLE, &uint64, &error); g_assert_cmpuint (uint64, ==, value); qmi_message_tlv_read_sized_guint (self, init_offset, &offset, sized[sized_i], QMI_ENDIAN_BIG, &uint64, &error); g_assert_cmpuint (uint64, ==, value); } } } static void test_message_tlv_rw_strings (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gsize expected_tlv_payload_size = 0; gchar *str; gchar fixed_str[5]; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); /* FIXED SIZE */ expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_string (self, 0, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); /* 1-BYTE PREFIX */ expected_tlv_payload_size += 5; ret = qmi_message_tlv_write_string (self, 1, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); /* 2-BYTE PREFIX */ expected_tlv_payload_size += 6; ret = qmi_message_tlv_write_string (self, 2, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); /* FIXED SIZE */ expected_tlv_payload_size += 0; ret = qmi_message_tlv_write_string (self, 0, "", -1, &error); g_assert_no_error (error); g_assert (ret); /* 1-BYTE PREFIX */ expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_string (self, 1, "", -1, &error); g_assert_no_error (error); g_assert (ret); /* 2-BYTE PREFIX */ expected_tlv_payload_size += 2; ret = qmi_message_tlv_write_string (self, 2, "", -1, &error); g_assert_no_error (error); g_assert (ret); /* 0-BYTE PREFIX (same as fixed size, but LAST in TLV) */ expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_string (self, 0, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); g_assert_cmpuint (tlv_length, ==, expected_tlv_payload_size); offset = 0; ret = qmi_message_tlv_read_fixed_size_string (self, init_offset, &offset, 4, fixed_str, &error); g_assert_no_error (error); g_assert (ret); fixed_str[4] = '\0'; g_assert_cmpstr (fixed_str, ==, "abcd"); ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, "abcd"); g_free (str); ret = qmi_message_tlv_read_string (self, init_offset, &offset, 2, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, "abcd"); g_free (str); fixed_str[0] = 'z'; ret = qmi_message_tlv_read_fixed_size_string (self, init_offset, &offset, 0, fixed_str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (fixed_str[0], ==, 'z'); ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, ""); g_free (str); ret = qmi_message_tlv_read_string (self, init_offset, &offset, 2, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, ""); g_free (str); ret = qmi_message_tlv_read_string (self, init_offset, &offset, 0, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, "abcd"); g_free (str); /* There's no other string added, but we can try to read a new one without * size prefix, and we should get a 0-length string */ ret = qmi_message_tlv_read_string (self, init_offset, &offset, 0, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, ""); g_free (str); } static void test_message_tlv_rw_mixed (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gsize expected_tlv_payload_size = 0; guint8 uint8; gint8 int8; guint16 uint16; gint16 int16; guint32 uint32; gint32 int32; guint64 uint64; gint64 int64; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); /* Add one of each */ expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_guint8 (self, 0x12, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 1; ret = qmi_message_tlv_write_gint8 (self, 0 - 0x12, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 2; ret = qmi_message_tlv_write_guint16 (self, QMI_ENDIAN_LITTLE, 0x1212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 2; ret = qmi_message_tlv_write_gint16 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_guint32 (self, QMI_ENDIAN_LITTLE, 0x12121212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_gint32 (self, QMI_ENDIAN_LITTLE, 0 - 0x12121212, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212ULL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 8; ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212LL, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 4; ret = qmi_message_tlv_write_string (self, 0, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 5; ret = qmi_message_tlv_write_string (self, 1, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); expected_tlv_payload_size += 6; ret = qmi_message_tlv_write_string (self, 2, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); g_assert_cmpuint (tlv_length, ==, expected_tlv_payload_size); offset = 0; ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &uint8, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint8, ==, 0x12); ret = qmi_message_tlv_read_gint8 (self, init_offset, &offset, &int8, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int8, ==, 0 - 0x12); ret = qmi_message_tlv_read_guint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint16, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint16, ==, 0x1212); ret = qmi_message_tlv_read_gint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int16, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int16, ==, 0 - 0x1212); ret = qmi_message_tlv_read_guint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint32, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint32, ==, 0x12121212); ret = qmi_message_tlv_read_gint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int32, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int32, ==, 0 - 0x12121212); ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint64, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (uint64, ==, 0x1212121212121212ULL); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int64, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpuint (int64, ==, 0 - 0x1212121212121212LL); } static void test_message_tlv_write_overflow (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); /* Add guint8 values until we get to the maximum message size */ while (qmi_message_get_length (self) < G_MAXUINT16) { ret = qmi_message_tlv_write_guint8 (self, 0x12, &error); g_assert_no_error (error); g_assert (ret); } /* Message is max size now, don't allow more variables */ ret = qmi_message_tlv_write_guint8 (self, 0x12, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_gint8 (self, 0 - 0x12, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_guint16 (self, QMI_ENDIAN_LITTLE, 0x1212, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_gint16 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_guint32 (self, QMI_ENDIAN_LITTLE, 0x12121212, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_gint32 (self, QMI_ENDIAN_LITTLE, 0 - 0x12121212, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_guint64 (self, QMI_ENDIAN_LITTLE, 0x1212121212121212ULL, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_gint64 (self, QMI_ENDIAN_LITTLE, 0 - 0x1212121212121212LL, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_sized_guint (self, 1, QMI_ENDIAN_LITTLE, 0x12, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_string (self, 0, "a", -1, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_string (self, 1, "a", -1, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_write_string (self, 2, "a", -1, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); /* Writing an empty string with a 0-size prefix is actually valid :) */ ret = qmi_message_tlv_write_string (self, 0, "", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Message is max size now, don't allow more TLVs */ init_offset = qmi_message_tlv_write_init (self, 0x02, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (init_offset == 0); g_clear_error (&error); } static void test_message_tlv_read_overflow_message (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gchar *str; guint8 uint8; gint8 int8; guint16 uint16; gint16 int16; guint32 uint32; gint32 int32; guint64 uint64; gint64 int64; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); /* Create a 1-byte size prefixed string manually, with a wrong length (out of message) */ ret = qmi_message_tlv_write_guint8 (self, 5, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_string (self, 0, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); offset = 0; ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); g_clear_pointer (&self, qmi_message_unref); self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); ret = qmi_message_tlv_write_string (self, 1, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); offset = 0; ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, "abcd"); g_free (str); /* Reading more will fail */ ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_string (self, init_offset, &offset, 2, 0, &str, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &uint8, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint8 (self, init_offset, &offset, &int8, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint16, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int16, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint32, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int32, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint64, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int64, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); g_clear_pointer (&self, qmi_message_unref); } static void test_message_tlv_read_overflow_tlv (void) { g_autoptr(QmiMessage) self = NULL; g_autoptr(GError) error = NULL; gboolean ret; gsize init_offset; guint16 tlv_length = 0; gsize offset; gchar *str; guint8 uint8; gint8 int8; guint16 uint16; gint16 int16; guint32 uint32; gint32 int32; guint64 uint64; gint64 int64; self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); /* Create a 1-byte size prefixed string manually, with a wrong length (out of tlv) */ ret = qmi_message_tlv_write_guint8 (self, 5, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_string (self, 0, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); init_offset = qmi_message_tlv_write_init (self, 0x02, &error); g_assert_no_error (error); g_assert (init_offset > 0); ret = qmi_message_tlv_write_string (self, 1, "efgh", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); offset = 0; ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); g_clear_pointer (&self, qmi_message_unref); self = qmi_message_new (QMI_SERVICE_DMS, 0x01, 0x02, 0xFFFF); init_offset = qmi_message_tlv_write_init (self, 0x01, &error); g_assert_no_error (error); g_assert (init_offset > 0); ret = qmi_message_tlv_write_string (self, 1, "abcd", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); init_offset = qmi_message_tlv_write_init (self, 0x02, &error); g_assert_no_error (error); g_assert (init_offset > 0); ret = qmi_message_tlv_write_string (self, 1, "efgh", -1, &error); g_assert_no_error (error); g_assert (ret); ret = qmi_message_tlv_write_complete (self, init_offset, &error); g_assert_no_error (error); g_assert (ret); /* Now read */ init_offset = qmi_message_tlv_read_init (self, 0x01, &tlv_length, &error); g_assert_no_error (error); g_assert (init_offset > 0); offset = 0; ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_no_error (error); g_assert (ret); g_assert_cmpstr (str, ==, "abcd"); g_free (str); /* Reading more will fail */ ret = qmi_message_tlv_read_string (self, init_offset, &offset, 1, 0, &str, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_string (self, init_offset, &offset, 2, 0, &str, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint8 (self, init_offset, &offset, &uint8, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint8 (self, init_offset, &offset, &int8, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint16, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint16 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int16, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint32, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint32 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int32, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_guint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &uint64, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); ret = qmi_message_tlv_read_gint64 (self, init_offset, &offset, QMI_ENDIAN_LITTLE, &int64, &error); g_assert_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_TLV_TOO_LONG); g_assert (!ret); g_clear_error (&error); g_clear_pointer (&self, qmi_message_unref); } /*****************************************************************************/ static void test_message_set_transaction_id_ctl (void) { g_autoptr(GByteArray) buffer = NULL; g_autoptr(QmiMessage) message = NULL; g_autoptr(GError) error = NULL; guint8 ctl_message[] = { 0x01, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, /* TRID to update */ 0x22, 0x00, 0x04, 0x00, 0x01, 0x01, 0x00, 0x01 }; /* CTL message */ buffer = g_byte_array_append (g_byte_array_sized_new (G_N_ELEMENTS (ctl_message)), ctl_message, G_N_ELEMENTS (ctl_message)); message = qmi_message_new_from_raw (buffer, &error); g_assert_no_error (error); g_assert (message); qmi_message_set_transaction_id (message, 0x55); g_assert_cmpuint (qmi_message_get_transaction_id (message), ==, 0x55); } static void test_message_set_transaction_id_services (void) { g_autoptr(GByteArray) buffer = NULL; g_autoptr(QmiMessage) message = NULL; g_autoptr(GError) error = NULL; guint8 dms_message[] = { 0x01, 0x0C, 0x00, 0x00, 0x02, 0x01, 0x00, 0xFF, 0xFF, /* TRID to update */ 0x25, 0x00, 0x00, 0x00 }; /* DMS message */ buffer = g_byte_array_append (g_byte_array_sized_new (G_N_ELEMENTS (dms_message)), dms_message, G_N_ELEMENTS (dms_message)); message = qmi_message_new_from_raw (buffer, &error); g_assert_no_error (error); g_assert (message); qmi_message_set_transaction_id (message, 0x5566); g_assert_cmpuint (qmi_message_get_transaction_id (message), ==, 0x5566); } /*****************************************************************************/ static void test_message_16bit_service_indication (void) { g_autoptr(GByteArray) buffer = NULL; g_autoptr(QmiMessage) message = NULL; g_autoptr(GError) error = NULL; const guint8 ssc_message[] = { 0x02, /* marker is the QRTR one because we have a 16bit service! */ 0x21, 0x00, /* message length: 33 bytes*/ 0x90, 0x01, /* service: SSC */ 0x03, /* client */ 0x04, /* service flags: Indication */ 0x01, 0x00, /* transaction */ 0x21, 0x00, /* message: Report Small */ 0x15, 0x00, /* all tlvs length: 21 bytes */ /* TLV */ 0x01, /* type: client id */ 0x08, 0x00, /* length: 8 bytes */ 0x01, 0x00, 0x00, 0x00, /* 64bit uint value */ 0x00, 0x00, 0x00, 0x00, /* TLV */ 0x02, /* type: data */ 0x07, 0x00, /* length: 7 bytes */ 0x05, 0x00, /* array size */ 0x00, 0x01, 0x02, 0x03, 0x04, /* 5 bytes in data array */ }; test_message_printable_common (ssc_message, sizeof (ssc_message), QMI_MESSAGE_VENDOR_GENERIC, ""); /* DMS message */ buffer = g_byte_array_append (g_byte_array_sized_new (sizeof (ssc_message)), ssc_message, sizeof (ssc_message)); message = qmi_message_new_from_raw (buffer, &error); g_assert_no_error (error); g_assert (message); g_assert (qmi_message_is_indication (message)); g_assert_cmpuint (qmi_message_get_service (message), ==, QMI_SERVICE_SSC); g_assert_cmpuint (qmi_message_get_message_id (message), ==, 0x0021); #if defined HAVE_QMI_INDICATION_SSC_REPORT_SMALL { g_autoptr(QmiIndicationSscReportSmallOutput) output = NULL; gboolean tlv_exists; GArray *value_data; guint64 client_id; const guint8 expected_value_data[] = { 0x00, 0x01, 0x02, 0x03, 0x04 }; output = qmi_indication_ssc_report_small_indication_parse (message, &error); g_assert_no_error (error); g_assert (output); tlv_exists = qmi_indication_ssc_report_small_output_get_client_id (output, &client_id, &error); g_assert_no_error (error); g_assert (tlv_exists); g_assert_cmpuint (client_id, ==, (guint64)0x01); tlv_exists = qmi_indication_ssc_report_small_output_get_data (output, &value_data, &error); g_assert_no_error (error); g_assert (tlv_exists); _g_assert_cmpmem (value_data->data, value_data->len, expected_value_data, G_N_ELEMENTS (expected_value_data)); } #endif } /*****************************************************************************/ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); g_test_add_func ("/libqmi-glib/message/parse/wrong-qmux", test_message_parse_wrong_qmux); g_test_add_func ("/libqmi-glib/message/parse/tiny", test_message_parse_tiny); g_test_add_func ("/libqmi-glib/message/parse/short", test_message_parse_short); g_test_add_func ("/libqmi-glib/message/parse/complete", test_message_parse_complete); g_test_add_func ("/libqmi-glib/message/parse/complete-and-short", test_message_parse_complete_and_short); g_test_add_func ("/libqmi-glib/message/parse/complete-and-complete", test_message_parse_complete_and_complete); g_test_add_func ("/libqmi-glib/message/parse/wrong-tlv", test_message_parse_wrong_tlv); #if defined HAVE_QMI_INDICATION_PDS_EVENT_REPORT g_test_add_func ("/libqmi-glib/message/parse/missing-size", test_message_parse_missing_size); #endif #if defined HAVE_QMI_INDICATION_LOC_NMEA g_test_add_func ("/libqmi-glib/message/parse/string-with-crlf", test_message_parse_string_with_crlf); #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_CURRENT_FIRMWARE g_test_add_func ("/libqmi-glib/message/parse/string-with-trailing-nul", test_message_parse_string_with_trailing_nul); #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MODEL g_test_add_func ("/libqmi-glib/message/parse/string-with-trailing-tab", test_message_parse_string_with_trailing_tab); #endif #if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS g_test_add_func ("/libqmi-glib/message/parse/signed-int", test_message_parse_signed_int); #endif g_test_add_func ("/libqmi-glib/message/new/request", test_message_new_request); g_test_add_func ("/libqmi-glib/message/new/request-from-data", test_message_new_request_from_data); g_test_add_func ("/libqmi-glib/message/new/response/ok", test_message_new_response_ok); g_test_add_func ("/libqmi-glib/message/new/response/error", test_message_new_response_error); g_test_add_func ("/libqmi-glib/message/tlv-write/empty", test_message_tlv_write_empty); g_test_add_func ("/libqmi-glib/message/tlv-write/reset", test_message_tlv_write_reset); g_test_add_func ("/libqmi-glib/message/tlv-rw/8", test_message_tlv_rw_8); g_test_add_func ("/libqmi-glib/message/tlv-rw/16", test_message_tlv_rw_16); g_test_add_func ("/libqmi-glib/message/tlv-rw/32", test_message_tlv_rw_32); g_test_add_func ("/libqmi-glib/message/tlv-rw/64", test_message_tlv_rw_64); g_test_add_func ("/libqmi-glib/message/tlv-rw/sized", test_message_tlv_rw_sized); g_test_add_func ("/libqmi-glib/message/tlv-rw/strings", test_message_tlv_rw_strings); g_test_add_func ("/libqmi-glib/message/tlv-rw/mixed", test_message_tlv_rw_mixed); g_test_add_func ("/libqmi-glib/message/tlv-write/overflow", test_message_tlv_write_overflow); g_test_add_func ("/libqmi-glib/message/tlv-read/overflow-message", test_message_tlv_read_overflow_message); g_test_add_func ("/libqmi-glib/message/tlv-read/overflow-tlv", test_message_tlv_read_overflow_tlv); g_test_add_func ("/libqmi-glib/message/set-transaction-id/ctl", test_message_set_transaction_id_ctl); g_test_add_func ("/libqmi-glib/message/set-transaction-id/services", test_message_set_transaction_id_services); g_test_add_func ("/libqmi-glib/message/16bit-service/indication", test_message_16bit_service_indication); return g_test_run (); } libqmi-1.35.2-dev/src/libqmi-glib/test/test-port-context.c000066400000000000000000000324061455567757300234150ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2014 Aleksander Morgado * * Higly based on the test-port-context setup in ModemManager. */ #include #include #include #include #include #include #include #include "test-port-context.h" #define BUFFER_SIZE 1024 struct _TestPortContext { gchar *name; GThread *thread; gboolean ready; GCond ready_cond; GMutex ready_mutex; GMainLoop *loop; GSocketService *socket_service; GList *clients; GMutex command_mutex; GByteArray *command; GByteArray *response; }; /*****************************************************************************/ /* Helpers */ static gchar * str_hex (gconstpointer mem, gsize size, gchar delimiter) { const guint8 *data = mem; gsize i; gsize j; gsize new_str_length; gchar *new_str; /* Get new string length. If input string has N bytes, we need: * - 1 byte for last NUL char * - 2N bytes for hexadecimal char representation of each byte... * - N-1 bytes for the separator ':' * So... a total of (1+2N+N-1) = 3N bytes are needed... */ new_str_length = 3 * size; /* Allocate memory for new array and initialize contents to NUL */ new_str = g_malloc0 (new_str_length); /* Print hexadecimal representation of each byte... */ for (i = 0, j = 0; i < size; i++, j += 3) { /* Print character in output string... */ snprintf (&new_str[j], 3, "%02X", data[i]); /* And if needed, add separator */ if (i != (size - 1) ) new_str[j + 2] = delimiter; } /* Set output string */ return new_str; } /*****************************************************************************/ void test_port_context_set_command (TestPortContext *ctx, const guint8 *command, gsize command_size, const guint8 *response, gsize response_size, guint16 transaction_id) { g_mutex_lock (&ctx->command_mutex); { g_assert (!ctx->command); ctx->command = g_byte_array_append (g_byte_array_sized_new (command_size), command, command_size); qmi_message_set_transaction_id ((QmiMessage *)ctx->command, transaction_id); g_assert (!ctx->response); ctx->response = g_byte_array_append (g_byte_array_sized_new (response_size), response, response_size); qmi_message_set_transaction_id ((QmiMessage *)ctx->response, transaction_id); } g_mutex_unlock (&ctx->command_mutex); } static GByteArray * process_next_command (TestPortContext *ctx, GByteArray *buffer) { QmiMessage *message; GError *error = NULL; const guint8 *message_raw; gsize message_raw_length; gchar *expected; gchar *received; GByteArray *response; /* Every message received must start with the QMUX or QRTR marker. * If it doesn't, we broke framing :-/ * If we broke framing, an error should be reported and the device * should get closed */ if (buffer->len > 0 && buffer->data[0] != QMI_MESSAGE_QMUX_MARKER && buffer->data[0] != QMI_MESSAGE_QRTR_MARKER) g_assert_not_reached (); message = qmi_message_new_from_raw (buffer, &error); if (!message) { if (!error) /* More data we need */ return NULL; /* Fail */ g_assert_no_error (error); } /* Process received message */ message_raw = qmi_message_get_raw (message, &message_raw_length, &error); g_assert_no_error (error); g_assert (message_raw); /* Get printables to compare (we'll just get a nicer error if they are * different), compared to a simple memcmp(). */ g_mutex_lock (&ctx->command_mutex); { g_assert (ctx->command); expected = str_hex (ctx->command->data, ctx->command->len, ':'); } g_mutex_unlock (&ctx->command_mutex); received = str_hex (message_raw, message_raw_length, ':'); g_assert_cmpstr (expected, ==, received); g_free (expected); g_free (received); qmi_message_unref (message); g_byte_array_unref (ctx->command); ctx->command = NULL; /* Command Expected == Received, so now return the Response */ g_mutex_lock (&ctx->command_mutex); { response = ctx->response; ctx->response = NULL; } g_mutex_unlock (&ctx->command_mutex); return response; } /*****************************************************************************/ typedef struct { TestPortContext *ctx; GSocketConnection *connection; GSource *connection_readable_source; GByteArray *buffer; } Client; static void client_free (Client *client) { g_source_destroy (client->connection_readable_source); g_source_unref (client->connection_readable_source); g_output_stream_close (g_io_stream_get_output_stream (G_IO_STREAM (client->connection)), NULL, NULL); if (client->buffer) g_byte_array_unref (client->buffer); g_object_unref (client->connection); g_slice_free (Client, client); } static void connection_close (Client *client) { client->ctx->clients = g_list_remove (client->ctx->clients, client); client_free (client); } static void client_parse_request (Client *client) { GByteArray *response; do { response = process_next_command (client->ctx, client->buffer); if (response) { GError *error = NULL; if (!g_output_stream_write_all (g_io_stream_get_output_stream (G_IO_STREAM (client->connection)), response->data, response->len, NULL, /* bytes_written */ NULL, /* cancellable */ &error)) { g_warning ("Cannot send response to client: %s", error->message); g_error_free (error); } g_byte_array_unref (response); } } while (response); } static gboolean connection_readable_cb (GSocket *socket, GIOCondition condition, Client *client) { guint8 buffer[BUFFER_SIZE]; GError *error = NULL; gssize r; if (condition & G_IO_HUP || condition & G_IO_ERR) { g_debug ("client connection closed"); connection_close (client); return FALSE; } if (!(condition & G_IO_IN || condition & G_IO_PRI)) return TRUE; r = g_input_stream_read (g_io_stream_get_input_stream (G_IO_STREAM (client->connection)), buffer, BUFFER_SIZE, NULL, &error); if (r < 0) { g_warning ("Error reading from istream: %s", error ? error->message : "unknown"); if (error) g_error_free (error); /* Close the device */ connection_close (client); return FALSE; } if (r == 0) return TRUE; /* else, r > 0 */ if (!G_UNLIKELY (client->buffer)) client->buffer = g_byte_array_sized_new (r); g_byte_array_append (client->buffer, buffer, r); /* Try to parse input messages */ client_parse_request (client); return TRUE; } static Client * client_new (TestPortContext *ctx, GSocketConnection *connection) { Client *client; client = g_slice_new0 (Client); client->ctx = ctx; client->connection = g_object_ref (connection); client->connection_readable_source = g_socket_create_source (g_socket_connection_get_socket (client->connection), G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP, NULL); g_source_set_callback (client->connection_readable_source, (GSourceFunc)connection_readable_cb, client, NULL); g_source_attach (client->connection_readable_source, g_main_context_get_thread_default ()); return client; } /* /\*****************************************************************************\/ */ static void incoming_cb (GSocketService *service, GSocketConnection *connection, GObject *unused, TestPortContext *ctx) { Client *client; client = client_new (ctx, connection); ctx->clients = g_list_append (ctx->clients, client); } static void create_socket_service (TestPortContext *ctx) { GError *error = NULL; GSocketService *service; GSocketAddress *address; GSocket *socket; g_assert (ctx->socket_service == NULL); /* Create socket */ socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, &error); if (!socket) g_error ("Cannot create socket: %s", error->message); /* Bind to address */ address = (g_unix_socket_address_new_with_type ( ctx->name, -1, G_UNIX_SOCKET_ADDRESS_ABSTRACT)); if (!g_socket_bind (socket, address, TRUE, &error)) g_error ("Cannot bind socket '%s': %s", ctx->name, error->message); /* Listen */ if (!g_socket_listen (socket, &error)) g_error ("Cannot listen in socket: %s", error->message); /* Create socket service */ service = g_socket_service_new (); g_signal_connect (service, "incoming", G_CALLBACK (incoming_cb), ctx); if (!g_socket_listener_add_socket (G_SOCKET_LISTENER (service), socket, NULL, /* don't pass an object, will take a reference */ &error)) g_error ("Cannot add listener to socket: %s", error->message); /* Start it */ g_socket_service_start (service); /* And store it */ ctx->socket_service = service; /* Signal that the thread is ready */ g_mutex_lock (&ctx->ready_mutex); ctx->ready = TRUE; g_cond_signal (&ctx->ready_cond); g_mutex_unlock (&ctx->ready_mutex); if (socket) g_object_unref (socket); if (address) g_object_unref (address); } /*****************************************************************************/ void test_port_context_stop (TestPortContext *ctx) { g_assert (ctx->thread != NULL); g_assert (ctx->loop != NULL); g_main_loop_quit (ctx->loop); g_thread_join (ctx->thread); ctx->thread = NULL; } static gpointer port_context_thread_func (TestPortContext *ctx) { GMainContext *thread_context; thread_context = g_main_context_new (); g_main_context_push_thread_default (thread_context); create_socket_service (ctx); g_assert (ctx->loop == NULL); ctx->loop = g_main_loop_new (g_main_context_get_thread_default (), FALSE); g_main_loop_run (ctx->loop); g_main_loop_unref (ctx->loop); ctx->loop = NULL; return NULL; } void test_port_context_start (TestPortContext *ctx) { g_assert (ctx->thread == NULL); ctx->thread = g_thread_new (ctx->name, (GThreadFunc)port_context_thread_func, ctx); /* Now wait until the thread has finished its initialization and is * ready to serve connections */ g_mutex_lock (&ctx->ready_mutex); while (!ctx->ready) g_cond_wait (&ctx->ready_cond, &ctx->ready_mutex); g_mutex_unlock (&ctx->ready_mutex); } /*****************************************************************************/ void test_port_context_free (TestPortContext *ctx) { g_assert (ctx->thread == NULL); g_assert (ctx->loop == NULL); g_cond_clear (&ctx->ready_cond); g_mutex_clear (&ctx->ready_mutex); g_mutex_clear (&ctx->command_mutex); g_list_free_full (ctx->clients, (GDestroyNotify)client_free); if (ctx->socket_service) { if (g_socket_service_is_active (ctx->socket_service)) g_socket_service_stop (ctx->socket_service); g_object_unref (ctx->socket_service); } g_free (ctx->name); if (ctx->command) g_byte_array_unref (ctx->command); if (ctx->response) g_byte_array_unref (ctx->response); g_slice_free (TestPortContext, ctx); } TestPortContext * test_port_context_new (const gchar *name) { TestPortContext *ctx; ctx = g_slice_new0 (TestPortContext); ctx->name = g_strdup (name); g_cond_init (&ctx->ready_cond); g_mutex_init (&ctx->ready_mutex); g_mutex_init (&ctx->command_mutex); return ctx; } libqmi-1.35.2-dev/src/libqmi-glib/test/test-port-context.h000066400000000000000000000032121455567757300234130ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2014 Aleksander Morgado * * Higly based on the test-port-context setup in ModemManager. */ #ifndef TEST_PORT_CONTEXT_H #define TEST_PORT_CONTEXT_H #include #include typedef struct _TestPortContext TestPortContext; TestPortContext *test_port_context_new (const gchar *name); void test_port_context_start (TestPortContext *ctx); void test_port_context_stop (TestPortContext *ctx); void test_port_context_free (TestPortContext *ctx); void test_port_context_set_command (TestPortContext *ctx, const guint8 *command, gsize command_size, const guint8 *response, gsize response_size, guint16 transaction_id); #endif /* TEST_PORT_CONTEXT_H */ libqmi-1.35.2-dev/src/libqmi-glib/test/test-utils.c000066400000000000000000000277171455567757300221200ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2020 Aleksander Morgado */ #include #include #include "qmi-utils.h" #include "qmi-enums-nas.h" /******************************************************************************/ static void common_test_read_string_from_plmn_encoded_array (QmiNasPlmnEncodingScheme encoding, const guint8 *data, gsize data_len, const gchar *expected_utf8) { g_autofree gchar *utf8 = NULL; g_autoptr(GArray) array = NULL; array = g_array_append_vals (g_array_sized_new (FALSE, FALSE, sizeof (guint8), data_len), data, data_len); utf8 = qmi_nas_read_string_from_plmn_encoded_array (encoding, array); g_assert_nonnull (utf8); g_assert_cmpstr (utf8, ==, expected_utf8); } static void test_read_string_from_plmn_encoded_array_gsm7_default_chars (void) { const guint8 gsm[] = { 0x80, 0x80, 0x60, 0x40, 0x28, 0x18, 0x0E, 0x88, 0x84, 0x62, 0xC1, 0x68, 0x38, 0x1E, 0x90, 0x88, 0x64, 0x42, 0xA9, 0x58, 0x2E, 0x98, 0x8C, 0x86, 0xD3, 0xF1, 0x7C, 0x40, 0x21, 0xD1, 0x88, 0x54, 0x32, 0x9D, 0x50, 0x29, 0xD5, 0x8A, 0xD5, 0x72, 0xBD, 0x60, 0x31, 0xD9, 0x8C, 0x56, 0xB3, 0xDD, 0x70, 0x39, 0xDD, 0x8E, 0xD7, 0xF3, 0xFD, 0x80, 0x41, 0xE1, 0x90, 0x58, 0x34, 0x1E, 0x91, 0x49, 0xE5, 0x92, 0xD9, 0x74, 0x3E, 0xA1, 0x51, 0xE9, 0x94, 0x5A, 0xB5, 0x5E, 0xB1, 0x59, 0xED, 0x96, 0xDB, 0xF5, 0x7E, 0xC1, 0x61, 0xF1, 0x98, 0x5C, 0x36, 0x9F, 0xD1, 0x69, 0xF5, 0x9A, 0xDD, 0x76, 0xBF, 0xE1, 0x71, 0xF9, 0x9C, 0x5E, 0xB7, 0xDF, 0xF1, 0x79, 0xFD, 0x9E, 0xDF, 0xF7, 0xFF, 0x01, }; const gchar *expected_utf8 = "@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !\"#¤%&'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà"; common_test_read_string_from_plmn_encoded_array (QMI_NAS_PLMN_ENCODING_SCHEME_GSM, gsm, G_N_ELEMENTS (gsm), expected_utf8); } static void test_read_string_from_plmn_encoded_array_gsm7_extended_chars (void) { const guint8 gsm[] = { 0x1B, 0xC5, 0x86, 0xB2, 0x41, 0x6D, 0x52, 0x9B, 0xD7, 0x86, 0xB7, 0xE9, 0x6D, 0x7C, 0x1B, 0xE0, 0xA6, 0x0C }; const gchar *expected_utf8 = "\f^{}\\[~]|€"; common_test_read_string_from_plmn_encoded_array (QMI_NAS_PLMN_ENCODING_SCHEME_GSM, gsm, G_N_ELEMENTS (gsm), expected_utf8); } static void test_read_string_from_plmn_encoded_array_gsm7_mixed_chars (void) { const guint8 gsm[] = { 0x80, 0x80, 0x60, 0x40, 0x28, 0x18, 0x0E, 0x8C, 0x8D, 0xA2, 0x62, 0xB9, 0x60, 0x32, 0x1B, 0x94, 0x86, 0xD3, 0xF1, 0xA0, 0x36, 0xA9, 0xD4, 0x0D, 0x97, 0xDB, 0xBC, 0x74, 0x3B, 0x5E, 0xCF, 0xB7, 0xE1, 0xFD, 0x80, 0x51, 0xE9, 0x74, 0xE3, 0xA3, 0x56, 0xB9, 0x1B, 0x60, 0xD7, 0xFB, 0x05, 0x87, 0xC5, 0xF0, 0xB8, 0x7C, 0x4E, 0xAF, 0xDB, 0xF9, 0x7D, 0xFF, 0x7F, 0x53, 0x06 }; const gchar *expected_utf8 = "@£$¥èéùìø\fΩΠΨΣΘ{ΞÆæß(})789\\:;<=>[?¡QRS]TUÖ|Ñܧ¿abpqrstuvöñüà€"; common_test_read_string_from_plmn_encoded_array (QMI_NAS_PLMN_ENCODING_SCHEME_GSM, gsm, G_N_ELEMENTS (gsm), expected_utf8); } static void test_read_string_from_plmn_encoded_array_ucs2le (void) { const guint8 ucs2le[] = { 0x54, 0x00, 0x2d, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x62, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00 }; const gchar *expected_utf8 = "T-Mobile"; common_test_read_string_from_plmn_encoded_array (QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE, ucs2le, G_N_ELEMENTS (ucs2le), expected_utf8); } /******************************************************************************/ static void common_test_read_string_from_network_description_encoded_array (QmiNasNetworkDescriptionEncoding encoding, const guint8 *data, gsize data_len, const gchar *expected_utf8) { g_autofree gchar *utf8 = NULL; g_autoptr(GArray) array = NULL; array = g_array_append_vals (g_array_sized_new (FALSE, FALSE, sizeof (guint8), data_len), data, data_len); utf8 = qmi_nas_read_string_from_network_description_encoded_array (encoding, array); if (expected_utf8) { g_assert_nonnull (utf8); g_assert_cmpstr (utf8, ==, expected_utf8); } else g_assert_null (utf8); } static void test_read_string_from_network_description_encoded_array_gsm7_default_chars (void) { const guint8 gsm[] = { 0x80, 0x80, 0x60, 0x40, 0x28, 0x18, 0x0E, 0x88, 0x84, 0x62, 0xC1, 0x68, 0x38, 0x1E, 0x90, 0x88, 0x64, 0x42, 0xA9, 0x58, 0x2E, 0x98, 0x8C, 0x86, 0xD3, 0xF1, 0x7C, 0x40, 0x21, 0xD1, 0x88, 0x54, 0x32, 0x9D, 0x50, 0x29, 0xD5, 0x8A, 0xD5, 0x72, 0xBD, 0x60, 0x31, 0xD9, 0x8C, 0x56, 0xB3, 0xDD, 0x70, 0x39, 0xDD, 0x8E, 0xD7, 0xF3, 0xFD, 0x80, 0x41, 0xE1, 0x90, 0x58, 0x34, 0x1E, 0x91, 0x49, 0xE5, 0x92, 0xD9, 0x74, 0x3E, 0xA1, 0x51, 0xE9, 0x94, 0x5A, 0xB5, 0x5E, 0xB1, 0x59, 0xED, 0x96, 0xDB, 0xF5, 0x7E, 0xC1, 0x61, 0xF1, 0x98, 0x5C, 0x36, 0x9F, 0xD1, 0x69, 0xF5, 0x9A, 0xDD, 0x76, 0xBF, 0xE1, 0x71, 0xF9, 0x9C, 0x5E, 0xB7, 0xDF, 0xF1, 0x79, 0xFD, 0x9E, 0xDF, 0xF7, 0xFF, 0x01, }; const gchar *expected_utf8 = "@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !\"#¤%&'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà"; common_test_read_string_from_network_description_encoded_array (QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM, gsm, G_N_ELEMENTS (gsm), expected_utf8); } static void test_read_string_from_network_description_encoded_array_gsm7_extended_chars (void) { const guint8 gsm[] = { 0x1B, 0xC5, 0x86, 0xB2, 0x41, 0x6D, 0x52, 0x9B, 0xD7, 0x86, 0xB7, 0xE9, 0x6D, 0x7C, 0x1B, 0xE0, 0xA6, 0x0C }; const gchar *expected_utf8 = "\f^{}\\[~]|€"; common_test_read_string_from_network_description_encoded_array (QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM, gsm, G_N_ELEMENTS (gsm), expected_utf8); } static void test_read_string_from_network_description_encoded_array_gsm7_mixed_chars (void) { const guint8 gsm[] = { 0x80, 0x80, 0x60, 0x40, 0x28, 0x18, 0x0E, 0x8C, 0x8D, 0xA2, 0x62, 0xB9, 0x60, 0x32, 0x1B, 0x94, 0x86, 0xD3, 0xF1, 0xA0, 0x36, 0xA9, 0xD4, 0x0D, 0x97, 0xDB, 0xBC, 0x74, 0x3B, 0x5E, 0xCF, 0xB7, 0xE1, 0xFD, 0x80, 0x51, 0xE9, 0x74, 0xE3, 0xA3, 0x56, 0xB9, 0x1B, 0x60, 0xD7, 0xFB, 0x05, 0x87, 0xC5, 0xF0, 0xB8, 0x7C, 0x4E, 0xAF, 0xDB, 0xF9, 0x7D, 0xFF, 0x7F, 0x53, 0x06 }; const gchar *expected_utf8 = "@£$¥èéùìø\fΩΠΨΣΘ{ΞÆæß(})789\\:;<=>[?¡QRS]TUÖ|Ñܧ¿abpqrstuvöñüà€"; common_test_read_string_from_network_description_encoded_array (QMI_NAS_NETWORK_DESCRIPTION_ENCODING_GSM, gsm, G_N_ELEMENTS (gsm), expected_utf8); } static void test_read_string_from_network_description_encoded_array_ucs2le (void) { const guint8 ucs2le[] = { 0x54, 0x00, 0x2d, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x62, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00 }; const gchar *expected_utf8 = "T-Mobile"; common_test_read_string_from_network_description_encoded_array (QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNICODE, ucs2le, G_N_ELEMENTS (ucs2le), expected_utf8); } static void test_read_string_from_network_description_encoded_array_ascii (void) { const guint8 ascii[] = { 'T', '-', 'M', 'o', 'b', 'i', 'l', 'e' }; const gchar *expected_utf8 = "T-Mobile"; common_test_read_string_from_network_description_encoded_array (QMI_NAS_NETWORK_DESCRIPTION_ENCODING_ASCII7, ascii, G_N_ELEMENTS (ascii), expected_utf8); } static void test_read_string_from_network_description_encoded_array_unspecified_ascii (void) { const guint8 ascii[] = { 'T', '-', 'M', 'o', 'b', 'i', 'l', 'e' }; const gchar *expected_utf8 = "T-Mobile"; common_test_read_string_from_network_description_encoded_array (QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED, ascii, G_N_ELEMENTS (ascii), expected_utf8); } static void test_read_string_from_network_description_encoded_array_unspecified_other (void) { const guint8 other[] = { 0x54, 0x00, 0x2d, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x62, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00 }; common_test_read_string_from_network_description_encoded_array (QMI_NAS_NETWORK_DESCRIPTION_ENCODING_UNSPECIFIED, other, G_N_ELEMENTS (other), NULL); } static void test_read_string_from_network_description_encoded_array_unknown (void) { const guint8 other[] = { 0x54, 0x00, 0x2d, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x62, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x65, 0x00 }; common_test_read_string_from_network_description_encoded_array (0xFF, other, G_N_ELEMENTS (other), NULL); } /******************************************************************************/ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); g_test_add_func ("/libqmi-glib/utils/read-string-from-plmn-encoded-array/gsm7-default-chars", test_read_string_from_plmn_encoded_array_gsm7_default_chars); g_test_add_func ("/libqmi-glib/utils/read-string-from-plmn-encoded-array/gsm7-extended-chars", test_read_string_from_plmn_encoded_array_gsm7_extended_chars); g_test_add_func ("/libqmi-glib/utils/read-string-from-plmn-encoded-array/gsm7-mixed-chars", test_read_string_from_plmn_encoded_array_gsm7_mixed_chars); g_test_add_func ("/libqmi-glib/utils/read-string-from-plmn-encoded-array/ucs2le", test_read_string_from_plmn_encoded_array_ucs2le); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/gsm7-default-chars", test_read_string_from_network_description_encoded_array_gsm7_default_chars); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/gsm7-extended-chars", test_read_string_from_network_description_encoded_array_gsm7_extended_chars); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/gsm7-mixed-chars", test_read_string_from_network_description_encoded_array_gsm7_mixed_chars); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/ucs2le", test_read_string_from_network_description_encoded_array_ucs2le); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/ascii", test_read_string_from_network_description_encoded_array_ascii); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/unspecified-ascii", test_read_string_from_network_description_encoded_array_unspecified_ascii); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/unspecified-other", test_read_string_from_network_description_encoded_array_unspecified_other); g_test_add_func ("/libqmi-glib/utils/read-string-from-network-description-encoded-array/unknown", test_read_string_from_network_description_encoded_array_unknown); return g_test_run (); } libqmi-1.35.2-dev/src/meson.build000066400000000000000000000003571455567757300166210ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez subdir('libqmi-glib') subdir('qmicli') subdir('qmi-proxy') if enable_firmware_update subdir('qmi-firmware-update') endif libqmi-1.35.2-dev/src/qmi-firmware-update/000077500000000000000000000000001455567757300203325ustar00rootroot00000000000000libqmi-1.35.2-dev/src/qmi-firmware-update/meson.build000066400000000000000000000045561455567757300225060ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez libutils = static_library( 'utils', sources: 'qfu-utils.c', include_directories: top_inc, dependencies: libqmi_glib_dep, ) libutils_dep = declare_dependency( include_directories: '.', dependencies: libqmi_glib_dep, link_with: libutils, ) libfirehose = static_library( 'firehose', sources: 'qfu-firehose-message.c', dependencies: glib_deps, ) libfirehose_dep = declare_dependency( include_directories: '.', dependencies: glib_deps, link_with: libfirehose, ) enum_headers = files( 'qfu-dload-message.h', 'qfu-image.h', 'qfu-qdl-message.h', 'qfu-sahara-message.h', ) sources = files( 'qfu-at-device.c', 'qfu-device-selection.c', 'qfu-dload-message.c', 'qfu-helpers.c', 'qfu-image.c', 'qfu-image-cwe.c', 'qfu-image-factory.c', 'qfu-log.c', 'qfu-main.c', 'qfu-operation-reset.c', 'qfu-operation-update.c', 'qfu-operation-verify.c', 'qfu-qdl-device.c', 'qfu-qdl-message.c', 'qfu-reseter.c', 'qfu-sahara-device.c', 'qfu-sahara-message.c', 'qfu-updater.c', ) if enable_udev sources += files('qfu-helpers-udev.c') else sources += files('qfu-helpers-sysfs.c') endif enum_types = 'qfu-enum-types' sources += custom_target( enum_types + '.h', input: enum_headers, output: enum_types + '.h', command: [ python, qmi_mkenums, '--enums-only', '--fhead', '#ifndef QFU_ENUM_TYPES_H\n#define QFU_ENUM_TYPES_H\n#include "qfu-image.h"\n#include "qfu-qdl-message.h"\n#include "qfu-dload-message.h"\n#include "qfu-sahara-message.h"\n', '--template', files(templates_dir / enum_types + '.h.template'), '--ftail', '#endif /* __QFUENUM_TYPES_H__ */\n', '@INPUT@'], capture: true, ) sources += custom_target( enum_types + '.c', input: enum_headers, output: enum_types + '.c', command: [ python, qmi_mkenums, '--enums-only', '--fhead', '#include "qfu-enum-types.h"\n', '--template', files(templates_dir / enum_types + '.c.template'), '@INPUT@'], capture: true, ) deps = [ libfirehose_dep, libutils_dep, ] if enable_mbim_qmux deps += mbim_glib_dep endif if enable_udev deps += gudev_dep endif qmi_firmware_update = executable( 'qmi-firmware-update', sources: sources, include_directories: top_inc, dependencies: deps, install: true, ) subdir('test') libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-at-device.c000066400000000000000000000326751455567757300231450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Qfu-firmware-update -- Command line tool to update firmware in QFU devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include #include #include #include #include #include #include #include "qfu-log.h" #include "qfu-at-device.h" #include "qfu-utils.h" #define QFU_AT_BUFFER_SIZE 128 static void initable_iface_init (GInitableIface *iface); G_DEFINE_TYPE_EXTENDED (QfuAtDevice, qfu_at_device, G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) enum { PROP_0, PROP_FILE, PROP_LAST }; static GParamSpec *properties[PROP_LAST]; struct _QfuAtDevicePrivate { GFile *file; gchar *name; gint fd; GByteArray *buffer; }; /******************************************************************************/ /* Send */ static gboolean send_request (QfuAtDevice *self, const gchar *request, GCancellable *cancellable, GError **error) { gssize wlen; fd_set wr; gint aux; struct timeval tv = { .tv_sec = 2, .tv_usec = 0, }; /* Wait for the fd to be writable and don't wait forever */ FD_ZERO (&wr); FD_SET (self->priv->fd, &wr); aux = select (self->priv->fd + 1, NULL, &wr, NULL, &tv); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return FALSE; if (aux < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error waiting to write: %s", g_strerror (errno)); return FALSE; } if (aux == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "timed out waiting to write"); return FALSE; } /* Debug output */ if (qfu_log_get_verbose ()) g_debug ("[qfu-at-device,%s] >> %s", self->priv->name, request); wlen = write (self->priv->fd, request, strlen (request)); if (wlen < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error writting: %s", g_strerror (errno)); return FALSE; } /* We treat EINTR as an error, so we also treat as an error if not all bytes * were wlen */ if ((gsize)wlen != strlen (request)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error writing: only %" G_GSSIZE_FORMAT "/%" G_GSIZE_FORMAT " bytes written", wlen, strlen (request)); return FALSE; } wlen = write (self->priv->fd, "\r", 1); if (wlen < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error writting : %s", g_strerror (errno)); return FALSE; } return TRUE; } /******************************************************************************/ /* Receive */ static gssize receive_response (QfuAtDevice *self, guint timeout_secs, gchar **response, GCancellable *cancellable, GError **error) { fd_set rd; struct timeval tv; gint aux; gssize rlen; gchar *start; /* Use requested timeout */ tv.tv_sec = timeout_secs; tv.tv_usec = 0; FD_ZERO (&rd); FD_SET (self->priv->fd, &rd); aux = select (self->priv->fd + 1, &rd, NULL, NULL, &tv); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return -1; if (aux < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error waiting to read response: %s", g_strerror (errno)); return -1; } if (aux == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "timed out waiting for the response"); return -1; } /* Receive in the primary buffer */ rlen = read (self->priv->fd, self->priv->buffer->data, self->priv->buffer->len); if (rlen < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read response: %s", g_strerror (errno)); return -1; } if (rlen == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read response: HUP detected"); return -1; } /* Force end of string */ start = (gchar *) &self->priv->buffer->data[0]; start[rlen] = '\0'; /* Remove trailing LFs and CRs */ while (rlen > 0 && (start[rlen - 1] == '\r' || start[rlen - 1] == '\n')) start[--rlen] = '\0'; /* Remove heading LFs and CRs */ while (rlen > 0 && (start[0] == '\r' || start[0] == '\n')) { start++; rlen--; } /* Debug output */ if (qfu_log_get_verbose ()) g_debug ("[qfu-at-device,%s] << %s", self->priv->name, start); if (response) *response = start; return rlen; } /******************************************************************************/ /* Send/receive */ static gssize send_receive (QfuAtDevice *self, const gchar *request, guint response_timeout_secs, gchar **response, GCancellable *cancellable, GError **error) { gboolean sent; if (self->priv->fd < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "device is closed"); return FALSE; } sent = send_request (self, request, cancellable, error); if (!sent) return -1; if (!response) return 0; while (1) { gssize rsplen; rsplen = receive_response (self, response_timeout_secs, response, cancellable, error); if (rsplen > 0 && g_str_has_prefix (*response, request)) { *response += strlen (request); rsplen -= strlen (request); if (rsplen == 0) continue; } return rsplen; } } /******************************************************************************/ gboolean qfu_at_device_boothold (QfuAtDevice *self, GCancellable *cancellable, GError **error) { gssize rsplen; gchar *rsp = NULL; rsplen = send_receive (self, "AT!BOOTHOLD", 3, &rsp, cancellable, error); if (rsplen < 0) return FALSE; if (strstr (rsp, "OK")) return TRUE; if (strstr (rsp, "ERROR")) g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unknown command"); else g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unknown error"); return FALSE; } /******************************************************************************/ static gboolean initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { QfuAtDevice *self; struct termios terminal_data; gchar *path = NULL; GError *inner_error = NULL; self = QFU_AT_DEVICE (initable); if (g_cancellable_set_error_if_cancelled (cancellable, &inner_error)) goto out; path = g_file_get_path (self->priv->file); g_debug ("[qfu-at-device,%s] opening TTY", self->priv->name); self->priv->fd = open (path, O_RDWR | O_NOCTTY); if (self->priv->fd < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error opening serial device: %s", g_strerror (errno)); goto out; } g_debug ("[qfu-at-device,%s] setting up serial port...", self->priv->name); if (tcgetattr (self->priv->fd, &terminal_data) < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error getting serial port attributes: %s", g_strerror (errno)); goto out; } terminal_data.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXANY ); terminal_data.c_oflag &= ~(OPOST | OLCUC | OCRNL | ONLCR | ONLRET); terminal_data.c_lflag &= ~(ICANON | ECHO | ECHOE | ECHONL); terminal_data.c_cc[VMIN] = 1; terminal_data.c_cc[VTIME] = 0; terminal_data.c_cc[VEOF] = 1; terminal_data.c_iflag |= (IXON | IXOFF | IXANY | IGNPAR); terminal_data.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | CRTSCTS); terminal_data.c_cflag |= (CS8 | CREAD | CLOCAL); /* 8N1 */ errno = 0; if (cfsetispeed (&terminal_data, B115200) != 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "failed to set serial port input speed: %s", g_strerror (errno)); goto out; } errno = 0; if (cfsetospeed (&terminal_data, B115200) != 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "failed to set serial port output speed: %s", g_strerror (errno)); goto out; } if (tcsetattr (self->priv->fd, TCSANOW, &terminal_data) < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error setting serial port attributes: %s", g_strerror (errno)); goto out; } out: g_free (path); if (inner_error) { if (!(self->priv->fd < 0)) { close (self->priv->fd); self->priv->fd = -1; } g_propagate_error (error, inner_error); return FALSE; } return TRUE; } /******************************************************************************/ const gchar * qfu_at_device_get_name (QfuAtDevice *self) { return self->priv->name; } /******************************************************************************/ QfuAtDevice * qfu_at_device_new (GFile *file, GCancellable *cancellable, GError **error) { g_return_val_if_fail (G_IS_FILE (file), NULL); return QFU_AT_DEVICE (g_initable_new (QFU_TYPE_AT_DEVICE, cancellable, error, "file", file, NULL)); } static void qfu_at_device_init (QfuAtDevice *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_AT_DEVICE, QfuAtDevicePrivate); self->priv->fd = -1; /* Long buffer for I/O */ self->priv->buffer = g_byte_array_new (); g_byte_array_set_size (self->priv->buffer, QFU_AT_BUFFER_SIZE); } static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { QfuAtDevice *self = QFU_AT_DEVICE (object); switch (prop_id) { case PROP_FILE: self->priv->file = g_value_dup_object (value); if (self->priv->file) self->priv->name = g_file_get_basename (self->priv->file); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QfuAtDevice *self = QFU_AT_DEVICE (object); switch (prop_id) { case PROP_FILE: g_value_set_object (value, self->priv->file); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void dispose (GObject *object) { QfuAtDevice *self = QFU_AT_DEVICE (object); if (!(self->priv->fd < 0)) { close (self->priv->fd); self->priv->fd = -1; } g_clear_pointer (&self->priv->name, g_free); g_clear_pointer (&self->priv->buffer, g_byte_array_unref); g_clear_object (&self->priv->file); G_OBJECT_CLASS (qfu_at_device_parent_class)->dispose (object); } static void initable_iface_init (GInitableIface *iface) { iface->init = initable_init; } static void qfu_at_device_class_init (QfuAtDeviceClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuAtDevicePrivate)); object_class->dispose = dispose; object_class->get_property = get_property; object_class->set_property = set_property; properties[PROP_FILE] = g_param_spec_object ("file", "File", "File object", G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_FILE, properties[PROP_FILE]); } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-at-device.h000066400000000000000000000047011455567757300231370ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_AT_DEVICE_H #define QFU_AT_DEVICE_H #include #include G_BEGIN_DECLS #define QFU_TYPE_AT_DEVICE (qfu_at_device_get_type ()) #define QFU_AT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_AT_DEVICE, QfuAtDevice)) #define QFU_AT_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_AT_DEVICE, QfuAtDeviceClass)) #define QFU_IS_AT_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_AT_DEVICE)) #define QFU_IS_AT_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_AT_DEVICE)) #define QFU_AT_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_AT_DEVICE, QfuAtDeviceClass)) typedef struct _QfuAtDevice QfuAtDevice; typedef struct _QfuAtDeviceClass QfuAtDeviceClass; typedef struct _QfuAtDevicePrivate QfuAtDevicePrivate; struct _QfuAtDevice { GObject parent; QfuAtDevicePrivate *priv; }; struct _QfuAtDeviceClass { GObjectClass parent; }; GType qfu_at_device_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuAtDevice, g_object_unref); QfuAtDevice *qfu_at_device_new (GFile *file, GCancellable *cancellable, GError **error); const gchar *qfu_at_device_get_name (QfuAtDevice *self); gboolean qfu_at_device_boothold (QfuAtDevice *self, GCancellable *cancellable, GError **error); G_END_DECLS #endif /* QFU_AT_DEVICE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-device-selection.c000066400000000000000000000266441455567757300245250ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2017 Zodiac Inflight Innovations * Copyright (C) 2017 Aleksander Morgado */ #include #include #include #include #include "qfu-device-selection.h" #include "qfu-helpers.h" G_DEFINE_TYPE (QfuDeviceSelection, qfu_device_selection, G_TYPE_OBJECT) struct _QfuDeviceSelectionPrivate { /* inputs */ gchar *preferred_devices[QFU_HELPERS_DEVICE_TYPE_LAST]; guint16 preferred_vid; guint16 preferred_pid; guint preferred_busnum; guint preferred_devnum; /* sysfs path */ gchar *sysfs_path; /* peer port sysfs path */ gchar *peer_port; #if defined WITH_UDEV /* generic udev monitor */ QfuHelpersUdevGenericMonitor *monitor; #endif }; /******************************************************************************/ static GFile * device_selection_get_single (QfuDeviceSelection *self, QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode) { GFile *first_selection = NULL; GFile *preferred_selection = NULL; GList *list, *l; gchar *path; g_debug ("[qfu,device-selection] single %s device requested in sysfs path '%s'", qfu_helpers_device_type_to_string (device_type), self->priv->sysfs_path); list = qfu_helpers_list_devices (device_type, device_mode, self->priv->sysfs_path); for (l = list; l; l = g_list_next (l)) { path = g_file_get_path (G_FILE (l->data)); g_debug ("[qfu,device-selection] device found: %s", path); if (!first_selection) first_selection = g_object_ref (l->data); if (!preferred_selection && !g_strcmp0 (path, self->priv->preferred_devices[device_type])) preferred_selection = g_object_ref (l->data); g_free (path); } g_list_free_full (list, g_object_unref); if (preferred_selection) { path = g_file_get_path (preferred_selection); g_debug ("[qfu,device-selection] using preferred device: %s", path); g_free (path); if (first_selection) g_object_unref (first_selection); return preferred_selection; } if (first_selection) { path = g_file_get_path (first_selection); g_debug ("[qfu,device-selection] using automatically selected device: %s", path); g_free (path); return first_selection; } g_debug ("[qfu,device-selection] couldn't find any device to use"); return NULL; } GFile * qfu_device_selection_get_single_cdc_wdm (QfuDeviceSelection *self) { return device_selection_get_single (self, QFU_HELPERS_DEVICE_TYPE_CDC_WDM, QFU_HELPERS_DEVICE_MODE_MODEM); } GFile * qfu_device_selection_get_single_tty (QfuDeviceSelection *self, QfuHelpersDeviceMode mode) { return device_selection_get_single (self, QFU_HELPERS_DEVICE_TYPE_TTY, mode); } /******************************************************************************/ static GList * device_selection_get_multiple (QfuDeviceSelection *self, QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode) { GFile *preferred_selection = NULL; GList *list, *l; gchar *path; g_debug ("[qfu,device-selection] multiple %s devices requested in sysfs path '%s'", qfu_helpers_device_type_to_string (device_type), self->priv->sysfs_path); list = qfu_helpers_list_devices (device_type, device_mode, self->priv->sysfs_path); for (l = list; l; l = g_list_next (l)) { path = g_file_get_path (G_FILE (l->data)); g_debug ("[qfu,device-selection] device found: %s", path); if (!preferred_selection && !g_strcmp0 (path, self->priv->preferred_devices[device_type])) preferred_selection = g_object_ref (l->data); g_free (path); } /* If we have a preferred device selected, we will only include that one in the output list */ if (preferred_selection) { path = g_file_get_path (preferred_selection); g_debug ("[qfu,device-selection] using only preferred device: %s", path); g_free (path); g_list_free_full (list, g_object_unref); return g_list_append (NULL, preferred_selection); } if (list) return list; g_debug ("[qfu,device-selection] couldn't find any device to use"); return NULL; } GList * qfu_device_selection_get_multiple_ttys (QfuDeviceSelection *self, QfuHelpersDeviceMode mode) { return device_selection_get_multiple (self, QFU_HELPERS_DEVICE_TYPE_TTY, mode); } /******************************************************************************/ GFile * qfu_device_selection_wait_for_cdc_wdm_finish (QfuDeviceSelection *self, GAsyncResult *res, GError **error) { return G_FILE (g_task_propagate_pointer (G_TASK (res), error)); } GFile * qfu_device_selection_wait_for_tty_finish (QfuDeviceSelection *self, GAsyncResult *res, GError **error) { return G_FILE (g_task_propagate_pointer (G_TASK (res), error)); } static void wait_for_device_ready (gpointer unused, GAsyncResult *res, GTask *task) { GError *error = NULL; GFile *file; file = qfu_helpers_wait_for_device_finish (res, &error); if (!file) g_task_return_error (task, error); else g_task_return_pointer (task, file, g_object_unref); g_object_unref (task); } void qfu_device_selection_wait_for_cdc_wdm (QfuDeviceSelection *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; task = g_task_new (self, cancellable, callback, user_data); qfu_helpers_wait_for_device (QFU_HELPERS_DEVICE_TYPE_CDC_WDM, QFU_HELPERS_DEVICE_MODE_MODEM, self->priv->sysfs_path, self->priv->peer_port, cancellable, (GAsyncReadyCallback) wait_for_device_ready, task); } void qfu_device_selection_wait_for_tty (QfuDeviceSelection *self, QfuHelpersDeviceMode mode, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; task = g_task_new (self, cancellable, callback, user_data); qfu_helpers_wait_for_device (QFU_HELPERS_DEVICE_TYPE_TTY, mode, self->priv->sysfs_path, self->priv->peer_port, cancellable, (GAsyncReadyCallback) wait_for_device_ready, task); } /******************************************************************************/ QfuDeviceSelection * qfu_device_selection_new (const gchar *preferred_cdc_wdm, const gchar *preferred_tty, guint16 preferred_vid, guint16 preferred_pid, guint preferred_busnum, guint preferred_devnum, GError **error) { QfuDeviceSelection *self; guint n_selections; /* Note: pid and busnum may be zero */ n_selections = (!!preferred_cdc_wdm + !!preferred_tty + !!preferred_vid + !!preferred_devnum); if (!n_selections) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "No device selected"); return NULL; } if (n_selections > 1) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Only one device selection option may be provided"); return NULL; } /* Selection valid, create object */ self = g_object_new (QFU_TYPE_DEVICE_SELECTION, NULL); /* Store inputs */ self->priv->preferred_devices[QFU_HELPERS_DEVICE_TYPE_CDC_WDM] = g_strdup (preferred_cdc_wdm); self->priv->preferred_devices[QFU_HELPERS_DEVICE_TYPE_TTY] = g_strdup (preferred_tty); self->priv->preferred_vid = preferred_vid; self->priv->preferred_pid = preferred_pid; self->priv->preferred_busnum = preferred_busnum; self->priv->preferred_devnum = preferred_devnum; /* Initialize sysfs path from inputs */ if (preferred_vid || preferred_devnum) self->priv->sysfs_path = qfu_helpers_find_by_device_info (preferred_vid, preferred_pid, preferred_busnum, preferred_devnum, error); else if (preferred_cdc_wdm || preferred_tty) self->priv->sysfs_path = qfu_helpers_find_by_file_path (preferred_cdc_wdm ? preferred_cdc_wdm : preferred_tty, error); else g_assert_not_reached (); if (!self->priv->sysfs_path) { g_object_unref (self); return NULL; } /* look for a peer port */ self->priv->peer_port = qfu_helpers_find_peer_port (self->priv->sysfs_path, error); #if defined WITH_UDEV /* Initialize right away the generic udev monitor for this sysfs path */ self->priv->monitor = qfu_helpers_udev_generic_monitor_new (self->priv->sysfs_path); #endif return self; } static void qfu_device_selection_init (QfuDeviceSelection *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_DEVICE_SELECTION, QfuDeviceSelectionPrivate); } static void finalize (GObject *object) { QfuDeviceSelection *self = QFU_DEVICE_SELECTION (object); guint i; #if defined WITH_UDEV if (self->priv->monitor) qfu_helpers_udev_generic_monitor_free (self->priv->monitor); #endif g_free (self->priv->sysfs_path); g_free (self->priv->peer_port); for (i = 0; i < QFU_HELPERS_DEVICE_TYPE_LAST; i++) g_free (self->priv->preferred_devices[i]); G_OBJECT_CLASS (qfu_device_selection_parent_class)->finalize (object); } static void qfu_device_selection_class_init (QfuDeviceSelectionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuDeviceSelectionPrivate)); object_class->finalize = finalize; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-device-selection.h000066400000000000000000000106131455567757300245170ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2017 Zodiac Inflight Innovations * Copyright (C) 2017 Aleksander Morgado */ #ifndef QFU_DEVICE_SELECTION_H #define QFU_DEVICE_SELECTION_H #include #include #include "qfu-helpers.h" G_BEGIN_DECLS #define QFU_TYPE_DEVICE_SELECTION (qfu_device_selection_get_type ()) #define QFU_DEVICE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_DEVICE_SELECTION, QfuDeviceSelection)) #define QFU_DEVICE_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_DEVICE_SELECTION, QfuDeviceSelectionClass)) #define QFU_IS_DEVICE_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_DEVICE_SELECTION)) #define QFU_IS_DEVICE_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_DEVICE_SELECTION)) #define QFU_DEVICE_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_DEVICE_SELECTION, QfuDeviceSelectionClass)) typedef struct _QfuDeviceSelection QfuDeviceSelection; typedef struct _QfuDeviceSelectionClass QfuDeviceSelectionClass; typedef struct _QfuDeviceSelectionPrivate QfuDeviceSelectionPrivate; struct _QfuDeviceSelection { GObject parent; QfuDeviceSelectionPrivate *priv; }; struct _QfuDeviceSelectionClass { GObjectClass parent; }; GType qfu_device_selection_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuDeviceSelection, g_object_unref); QfuDeviceSelection *qfu_device_selection_new (const gchar *preferred_cdc_wdm, const gchar *preferred_tty, guint16 preferred_vid, guint16 preferred_pid, guint preferred_busnum, guint preferred_devnum, GError **error); GFile *qfu_device_selection_get_single_cdc_wdm (QfuDeviceSelection *self); void qfu_device_selection_wait_for_cdc_wdm (QfuDeviceSelection *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GFile *qfu_device_selection_wait_for_cdc_wdm_finish (QfuDeviceSelection *self, GAsyncResult *res, GError **error); GFile *qfu_device_selection_get_single_tty (QfuDeviceSelection *self, QfuHelpersDeviceMode mode); GList *qfu_device_selection_get_multiple_ttys (QfuDeviceSelection *self, QfuHelpersDeviceMode mode); void qfu_device_selection_wait_for_tty (QfuDeviceSelection *self, QfuHelpersDeviceMode mode, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GFile *qfu_device_selection_wait_for_tty_finish (QfuDeviceSelection *self, GAsyncResult *res, GError **error); G_END_DECLS #endif /* QFU_DEVICE_SELECTION_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-dload-message.c000066400000000000000000000055701455567757300240030ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include "qfu-dload-message.h" #include "qfu-utils.h" #include "qfu-enum-types.h" /******************************************************************************/ /* DLOAD SDP */ /* Generic message for operations that just require the command id */ typedef struct _DloadSdpReq DloadSdpReq; struct _DloadSdpReq { guint8 cmd; guint16 reserved; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (DloadSdpReq) <= QFU_DLOAD_MESSAGE_MAX_SIZE); gsize qfu_dload_request_sdp_build (guint8 *buffer, gsize buffer_len) { DloadSdpReq *req; g_assert (buffer_len >= sizeof (DloadSdpReq)); /* Create request */ req = (DloadSdpReq *) buffer; memset (buffer, 0, sizeof (DloadSdpReq)); req->cmd = (guint8) QFU_DLOAD_CMD_SDP; g_debug ("[qfu,dload-message] sent %s:", qfu_dload_cmd_get_string ((QfuDloadCmd) req->cmd)); return (sizeof (DloadSdpReq)); } /******************************************************************************/ /* DLOAD Ack */ typedef struct _DloadAckRsp DloadAckRsp; struct _DloadAckRsp { guint8 cmd; /* 0x2a */ } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (DloadAckRsp) <= QFU_DLOAD_MESSAGE_MAX_SIZE); gboolean qfu_dload_response_ack_parse (const guint8 *buffer, gsize buffer_len, GError **error) { DloadAckRsp *rsp; if (buffer_len != sizeof (DloadAckRsp)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (DloadAckRsp)); return FALSE; } rsp = (DloadAckRsp *) buffer; g_assert (rsp->cmd == QFU_DLOAD_CMD_ACK); g_debug ("[qfu,dload-message] received %s:", qfu_dload_cmd_get_string ((QfuDloadCmd) rsp->cmd)); return TRUE; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-dload-message.h000066400000000000000000000040251455567757300240020ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_DLOAD_MESSAGE_H #define QFU_DLOAD_MESSAGE_H #include #include #include "qfu-image.h" G_BEGIN_DECLS /* Maximum DLOAD message size */ #define QFU_DLOAD_MESSAGE_MAX_SIZE 3 /* * Most of this is from Josuah Hill's DLOAD tool for iPhone * Some spec is also available in document 80-39912-1 Rev. E DMSS Download Protocol Interface Specification and Operational Description * https://github.com/posixninja/DLOADTool/blob/master/dloadtool/dload.h * * The 0x70 switching command was found by snooping on firmware updates */ typedef enum { QFU_DLOAD_CMD_ACK = 0x02, QFU_DLOAD_CMD_NOP = 0x06, QFU_DLOAD_CMD_SDP = 0x70, } QfuDloadCmd; /* Request builders */ gsize qfu_dload_request_sdp_build (guint8 *buffer, gsize buffer_len); /* Response parsers */ gboolean qfu_dload_response_ack_parse (const guint8 *buffer, gsize buffer_len, GError **error); G_END_DECLS #endif /* QFU_DLOAD_MESSAGE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-firehose-message.c000066400000000000000000000165131455567757300245230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Zodiac Inflight Innovations * Copyright (C) 2019 Aleksander Morgado */ #include #include #include #include "qfu-firehose-message.h" /* NOTE: these parsers are NOT supposed to be general purpose parsers for the * firehose protocol message types, we're exclusively processing the messages * expected in the Sierra 9x50 firmware upgrade protocol, and therefore it's * assumed that using the regex matching approach is enough... */ #define FIREHOSE_MESSAGE_HEADER "\n\n" #define FIREHOSE_MESSAGE_TRAILER "\n\n\n" gsize qfu_firehose_message_build_ping (guint8 *buffer, gsize buffer_len) { g_snprintf ((gchar *)buffer, buffer_len, "%s" "" "%s", FIREHOSE_MESSAGE_HEADER, FIREHOSE_MESSAGE_TRAILER); return strlen ((gchar *)buffer); } gsize qfu_firehose_message_build_configure (guint8 *buffer, gsize buffer_len, guint max_payload_size_to_target_in_bytes) { g_snprintf ((gchar *)buffer, buffer_len, "%s" "" "%s", FIREHOSE_MESSAGE_HEADER, /* if not a specific value given, pass some placeholder big value; we expect the modem * to return a NAK with the correct value to use after that. */ max_payload_size_to_target_in_bytes ? max_payload_size_to_target_in_bytes : 1048576, FIREHOSE_MESSAGE_TRAILER); return strlen ((gchar *)buffer); } gsize qfu_firehose_message_build_get_storage_info (guint8 *buffer, gsize buffer_len) { g_snprintf ((gchar *)buffer, buffer_len, "%s" "" "%s", FIREHOSE_MESSAGE_HEADER, FIREHOSE_MESSAGE_TRAILER); return strlen ((gchar *)buffer); } gsize qfu_firehose_message_build_program (guint8 *buffer, gsize buffer_len, guint pages_per_block, guint sector_size_in_bytes, guint num_partition_sectors) { g_snprintf ((gchar *)buffer, buffer_len, "%s" "" "%s", FIREHOSE_MESSAGE_HEADER, pages_per_block, sector_size_in_bytes, num_partition_sectors, FIREHOSE_MESSAGE_TRAILER); return strlen ((gchar *)buffer); } gsize qfu_firehose_message_build_reset (guint8 *buffer, gsize buffer_len) { g_snprintf ((gchar *)buffer, buffer_len, "%s" "" "%s", FIREHOSE_MESSAGE_HEADER, FIREHOSE_MESSAGE_TRAILER); return strlen ((gchar *)buffer); } gboolean qfu_firehose_message_parse_response_ack (const gchar *rsp, gchar **value, gchar **rawmode) { GRegex *r; GMatchInfo *match_info = NULL; gboolean success = FALSE; /* * * * * */ r = g_regex_new ("\\s*\\s*", G_REGEX_RAW, 0, NULL); g_assert (r); if (!g_regex_match (r, rsp, 0, &match_info)) goto out; if (!g_match_info_matches (match_info)) goto out; if (value) *value = g_match_info_fetch (match_info, 1); if (rawmode) { if (g_match_info_get_match_count (match_info) > 2) *rawmode = g_match_info_fetch (match_info, 2); else *rawmode = NULL; } success = TRUE; out: if (match_info) g_match_info_unref (match_info); g_regex_unref (r); return success; } gboolean qfu_firehose_message_parse_log (const gchar *rsp, gchar **value) { GRegex *r; GMatchInfo *match_info = NULL; gboolean success = FALSE; /* * * * * */ r = g_regex_new ("\\s*\\s*", G_REGEX_RAW, 0, NULL); g_assert (r); if (!g_regex_match (r, rsp, 0, &match_info)) goto out; if (!g_match_info_matches (match_info)) goto out; if (value) *value = g_match_info_fetch (match_info, 1); success = TRUE; out: if (match_info) g_match_info_unref (match_info); g_regex_unref (r); return success; } gboolean qfu_firehose_message_parse_response_configure (const gchar *rsp, guint32 *max_payload_size_to_target_in_bytes) { GRegex *r; GMatchInfo *match_info = NULL; gboolean success = FALSE; /* * * * * */ r = g_regex_new ("\\s*\\s*", G_REGEX_RAW, 0, NULL); g_assert (r); if (!g_regex_match (r, rsp, 0, &match_info)) goto out; if (!g_match_info_matches (match_info)) goto out; if (max_payload_size_to_target_in_bytes) { gchar *aux; aux = g_match_info_fetch (match_info, 1); *max_payload_size_to_target_in_bytes = atoi (aux); g_free (aux); } success = TRUE; out: if (match_info) g_match_info_unref (match_info); g_regex_unref (r); return success; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-firehose-message.h000066400000000000000000000054561455567757300245340ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Zodiac Inflight Innovations * Copyright (C) 2019 Aleksander Morgado */ #ifndef QFU_FIREHOSE_MESSAGE_H #define QFU_FIREHOSE_MESSAGE_H #include #include G_BEGIN_DECLS gsize qfu_firehose_message_build_ping (guint8 *buffer, gsize buffer_len); gsize qfu_firehose_message_build_configure (guint8 *buffer, gsize buffer_len, guint max_payload_size_to_target_in_bytes); gsize qfu_firehose_message_build_get_storage_info (guint8 *buffer, gsize buffer_len); gsize qfu_firehose_message_build_program (guint8 *buffer, gsize buffer_len, guint pages_per_block, guint sector_size_in_bytes, guint num_partition_sectors); gsize qfu_firehose_message_build_reset (guint8 *buffer, gsize buffer_len); gboolean qfu_firehose_message_parse_response_ack (const gchar *rsp, gchar **value, gchar **rawmode); gboolean qfu_firehose_message_parse_response_configure (const gchar *rsp, guint32 *max_payload_size_to_target_in_bytes); gboolean qfu_firehose_message_parse_log (const gchar *rsp, gchar **value); G_END_DECLS #endif /* QFU_FIREHOSE_MESSAGE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-helpers-sysfs.c000066400000000000000000000553321455567757300241060ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2022 VMware, Inc. */ #include "config.h" #include #include #if defined WITH_UDEV # error udev found #endif #include "qfu-helpers.h" #include "qfu-helpers-sysfs.h" /******************************************************************************/ static const gchar *tty_subsys_list[] = { "tty", NULL }; static const gchar *cdc_wdm_subsys_list[] = { "usbmisc", "usb", NULL }; static gboolean has_sysfs_attribute (const gchar *path, const gchar *attribute) { g_autofree gchar *aux_filepath = NULL; aux_filepath = g_strdup_printf ("%s/%s", path, attribute); return g_file_test (aux_filepath, G_FILE_TEST_EXISTS); } static gchar * read_sysfs_attribute_as_string (const gchar *path, const gchar *attribute) { g_autofree gchar *aux = NULL; gchar *contents = NULL; aux = g_strdup_printf ("%s/%s", path, attribute); if (g_file_get_contents (aux, &contents, NULL, NULL)) { g_strdelimit (contents, "\r\n", ' '); g_strstrip (contents); } return contents; } static gulong read_sysfs_attribute_as_num (const gchar *path, const gchar *attribute, guint base) { g_autofree gchar *contents = NULL; gulong val = 0; contents = read_sysfs_attribute_as_string (path, attribute); if (contents) val = strtoul (contents, NULL, base); return val; } static gchar * read_sysfs_attribute_link_basename (const gchar *path, const gchar *attribute) { g_autofree gchar *aux_filepath = NULL; g_autofree gchar *canonicalized_path = NULL; aux_filepath = g_strdup_printf ("%s/%s", path, attribute); if (!g_file_test (aux_filepath, G_FILE_TEST_EXISTS)) return NULL; canonicalized_path = realpath (aux_filepath, NULL); return g_path_get_basename (canonicalized_path); } static gboolean get_device_details (const gchar *port_sysfs_path, gchar **out_sysfs_path, QfuHelpersDeviceMode *out_device_mode, guint16 *out_vid, guint16 *out_pid, guint *out_busnum, guint *out_devnum, GError **error) { g_autofree gchar *iter = NULL; g_autofree gchar *physdev_sysfs_path = NULL; gulong aux; if (out_vid) *out_vid = 0; if (out_pid) *out_pid = 0; if (out_busnum) *out_busnum = 0; if (out_devnum) *out_devnum = 0; if (out_sysfs_path) *out_sysfs_path = NULL; if (out_device_mode) *out_device_mode = QFU_HELPERS_DEVICE_MODE_UNKNOWN; iter = realpath (port_sysfs_path, NULL); while (iter && (g_strcmp0 (iter, "/") != 0)) { gchar *parent; /* is this the USB physdev? */ if (has_sysfs_attribute (iter, "idVendor")) { /* stop traversing as soon as the physical device is found */ physdev_sysfs_path = g_steal_pointer (&iter); break; } parent = g_path_get_dirname (iter); g_clear_pointer (&iter, g_free); iter = parent; } if (!physdev_sysfs_path) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't find parent physical USB device"); return FALSE; } if (out_device_mode) { aux = read_sysfs_attribute_as_num (physdev_sysfs_path, "bNumInterfaces", 10); /* QDL download mode has exactly one single USB interface */ if (aux == 1) *out_device_mode = QFU_HELPERS_DEVICE_MODE_DOWNLOAD; else if (aux > 1) *out_device_mode = QFU_HELPERS_DEVICE_MODE_MODEM; } if (out_vid) { aux = read_sysfs_attribute_as_num (physdev_sysfs_path, "idVendor", 16); if (aux <= G_MAXUINT16) *out_vid = (guint16) aux; } if (out_pid) { aux = read_sysfs_attribute_as_num (physdev_sysfs_path, "idProduct", 16); if (aux <= G_MAXUINT16) *out_pid = (guint16) aux; } if (out_busnum) { aux = read_sysfs_attribute_as_num (physdev_sysfs_path, "busnum", 10); if (aux <= G_MAXUINT) *out_busnum = (guint16) aux; } if (out_devnum) { aux = read_sysfs_attribute_as_num (physdev_sysfs_path, "devnum", 10); if (aux <= G_MAXUINT) *out_devnum = (guint16) aux; } if (out_sysfs_path) *out_sysfs_path = g_steal_pointer (&physdev_sysfs_path); return TRUE; } static gboolean get_interface_details (const gchar *port_sysfs_path, gchar **out_driver, GError **error) { g_autofree gchar *iter = NULL; g_autofree gchar *interface_sysfs_path = NULL; if (out_driver) *out_driver = NULL; iter = realpath (port_sysfs_path, NULL); while (iter && (g_strcmp0 (iter, "/") != 0)) { gchar *parent; /* is this the USB interface? */ if (has_sysfs_attribute (iter, "bInterfaceClass")) { /* stop traversing as soon as the physical device is found */ interface_sysfs_path = g_steal_pointer (&iter); break; } parent = g_path_get_dirname (iter); g_clear_pointer (&iter, g_free); iter = parent; } if (!interface_sysfs_path) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't find parent interface USB device"); return FALSE; } if (out_driver) *out_driver = read_sysfs_attribute_link_basename (interface_sysfs_path, "driver"); return TRUE; } /******************************************************************************/ gchar * qfu_helpers_sysfs_find_by_file (GFile *file, GError **error) { const gchar **subsys_list = NULL; g_autofree gchar *physdev_sysfs_path = NULL; g_autofree gchar *found_port_sysfs_path = NULL; g_autofree gchar *basename = NULL; guint i; basename = g_file_get_basename (file); if (!basename) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't get filename"); return NULL; } if (g_str_has_prefix (basename, "tty")) subsys_list = tty_subsys_list; else if (g_str_has_prefix (basename, "cdc-wdm")) subsys_list = cdc_wdm_subsys_list; else { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unknown device file type"); return NULL; } for (i = 0; !found_port_sysfs_path && subsys_list[i]; i++) { g_autofree gchar *tmp = NULL; g_autofree gchar *port_sysfs_path = NULL; tmp = g_strdup_printf ("/sys/class/%s/%s", subsys_list[i], basename); port_sysfs_path = realpath (tmp, NULL); if (port_sysfs_path && g_file_test (port_sysfs_path, G_FILE_TEST_EXISTS)) found_port_sysfs_path = g_steal_pointer (&port_sysfs_path); } if (!found_port_sysfs_path) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "device not found"); return NULL; } if (!get_device_details (found_port_sysfs_path, &physdev_sysfs_path, NULL, NULL, NULL, NULL, NULL, error)) return NULL; g_debug ("[qfu-sysfs] sysfs path for '%s' found: %s", basename, physdev_sysfs_path); return g_steal_pointer (&physdev_sysfs_path); } /******************************************************************************/ static gboolean device_already_added (GPtrArray *ptr, const gchar *sysfs_path) { guint i; for (i = 0; i < ptr->len; i++) { if (g_strcmp0 (g_ptr_array_index (ptr, i), sysfs_path) == 0) return TRUE; } return FALSE; } static GPtrArray * find_by_device_info_in_subsystem (GPtrArray *sysfs_paths, const gchar *subsystem, guint16 vid, guint16 pid, guint busnum, guint devnum) { g_autofree gchar *subsys_sysfs_path = NULL; g_autoptr(GFile) subsys_sysfs_file = NULL; g_autoptr(GFileEnumerator) direnum = NULL; subsys_sysfs_path = g_strdup_printf ("/sys/class/%s", subsystem); subsys_sysfs_file = g_file_new_for_path (subsys_sysfs_path); direnum = g_file_enumerate_children (subsys_sysfs_file, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NONE, NULL, NULL); if (direnum) { while (TRUE) { GFileInfo *info = NULL; g_autoptr(GFile) child = NULL; g_autofree gchar *child_path = NULL; guint16 device_vid = 0; guint16 device_pid = 0; guint device_busnum = 0; guint device_devnum = 0; g_autofree gchar *device_sysfs_path = NULL; if (!g_file_enumerator_iterate (direnum, &info, NULL, NULL, NULL) || !info) break; child = g_file_enumerator_get_child (direnum, info); child_path = g_file_get_path (child); if (get_device_details (child_path, &device_sysfs_path, NULL, &device_vid, &device_pid, &device_busnum, &device_devnum, NULL)) { if ((vid == 0 || vid == device_vid) && (pid == 0 || pid == device_pid) && (busnum == 0 || busnum == device_busnum) && (devnum == 0 || devnum == device_devnum) && (!device_already_added (sysfs_paths, device_sysfs_path))) g_ptr_array_add (sysfs_paths, g_steal_pointer (&device_sysfs_path)); } } } return sysfs_paths; } gchar * qfu_helpers_sysfs_find_by_device_info (guint16 vid, guint16 pid, guint busnum, guint devnum, GError **error) { g_autoptr(GPtrArray) sysfs_paths = NULL; g_autoptr(GString) match_str = NULL; guint i; sysfs_paths = g_ptr_array_new_with_free_func (g_free); match_str = g_string_new (""); if (vid != 0) g_string_append_printf (match_str, "vid 0x%04x", vid); if (pid != 0) g_string_append_printf (match_str, "%spid 0x%04x", match_str->len > 0 ? ", " : "", pid); if (busnum != 0) g_string_append_printf (match_str, "%sbus %03u", match_str->len > 0 ? ", " : "", busnum); if (devnum != 0) g_string_append_printf (match_str, "%sdev %03u", match_str->len > 0 ? ", " : "", devnum); g_assert (match_str->len > 0); for (i = 0; tty_subsys_list[i]; i++) sysfs_paths = find_by_device_info_in_subsystem (sysfs_paths, tty_subsys_list[i], vid, pid, busnum, devnum); for (i = 0; cdc_wdm_subsys_list[i]; i++) sysfs_paths = find_by_device_info_in_subsystem (sysfs_paths, cdc_wdm_subsys_list[i], vid, pid, busnum, devnum); for (i = 0; i < sysfs_paths->len; i++) g_debug ("[%s] sysfs path: %s", match_str->str, (gchar *) g_ptr_array_index (sysfs_paths, i)); if (sysfs_paths->len == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "no device found with matching criteria: %s", match_str->str); return NULL; } if (sysfs_paths->len > 1) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "multiple devices (%u) found with matching criteria: %s", sysfs_paths->len, match_str->str); return NULL; } return g_strdup (g_ptr_array_index (sysfs_paths, 0)); } /******************************************************************************/ static GFile * device_matches (GFile *file, QfuHelpersDeviceType type, QfuHelpersDeviceMode mode, const gchar *sysfs_path) { g_autofree gchar *port_sysfs_path = NULL; g_autofree gchar *device_sysfs_path = NULL; g_autofree gchar *device_driver = NULL; g_autofree gchar *device_path = NULL; QfuHelpersDeviceMode device_mode = QFU_HELPERS_DEVICE_MODE_UNKNOWN; port_sysfs_path = g_file_get_path (file); if (!get_device_details (port_sysfs_path, &device_sysfs_path, &device_mode, NULL, NULL, NULL, NULL, NULL)) return NULL; if (!device_sysfs_path) return NULL; if (g_strcmp0 (device_sysfs_path, sysfs_path) != 0) return NULL; if (device_mode != mode) return NULL; if (!get_interface_details (port_sysfs_path, &device_driver, NULL)) return NULL; switch (type) { case QFU_HELPERS_DEVICE_TYPE_TTY: if (g_strcmp0 (device_driver, "qcserial") != 0) return NULL; break; case QFU_HELPERS_DEVICE_TYPE_CDC_WDM: if (g_strcmp0 (device_driver, "qmi_wwan") != 0 && g_strcmp0 (device_driver, "cdc_mbim") != 0) return NULL; break; case QFU_HELPERS_DEVICE_TYPE_LAST: default: g_assert_not_reached (); } device_path = g_strdup_printf ("/dev/%s", g_file_get_basename (file)); return g_file_new_for_path (device_path); } GList * qfu_helpers_sysfs_list_devices (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path) { const gchar **subsys_list = NULL; guint i; GList *files = NULL; switch (device_type) { case QFU_HELPERS_DEVICE_TYPE_TTY: subsys_list = tty_subsys_list; break; case QFU_HELPERS_DEVICE_TYPE_CDC_WDM: subsys_list = cdc_wdm_subsys_list; break; case QFU_HELPERS_DEVICE_TYPE_LAST: default: g_assert_not_reached (); } for (i = 0; subsys_list[i]; i++) { g_autofree gchar *subsys_sysfs_path = NULL; g_autoptr(GFile) subsys_sysfs_file = NULL; g_autoptr(GFileEnumerator) direnum = NULL; subsys_sysfs_path = g_strdup_printf ("/sys/class/%s", subsys_list[i]); subsys_sysfs_file = g_file_new_for_path (subsys_sysfs_path); direnum = g_file_enumerate_children (subsys_sysfs_file, G_FILE_ATTRIBUTE_STANDARD_NAME, G_FILE_QUERY_INFO_NONE, NULL, NULL); if (!direnum) continue; while (TRUE) { GFileInfo *info = NULL; g_autoptr(GFile) child = NULL; g_autoptr(GFile) devfile = NULL; if (!g_file_enumerator_iterate (direnum, &info, NULL, NULL, NULL) || !info) break; child = g_file_enumerator_get_child (direnum, info); devfile = device_matches (child, device_type, device_mode, sysfs_path); if (devfile) files = g_list_prepend (files, g_steal_pointer (&devfile)); } } return files; } /******************************************************************************/ /* Check for the new port addition every 10s */ #define WAIT_FOR_DEVICE_CHECK_SECS 10 /* And up to 12 attempts to check (so 120s in total) */ #define WAIT_FOR_DEVICE_CHECK_ATTEMPTS 12 typedef struct { QfuHelpersDeviceType device_type; QfuHelpersDeviceMode device_mode; gchar *sysfs_path; gchar *peer_port; guint check_attempts; guint timeout_id; gulong cancellable_id; } WaitForDeviceContext; static void wait_for_device_context_free (WaitForDeviceContext *ctx) { g_assert (!ctx->timeout_id); g_assert (!ctx->cancellable_id); g_free (ctx->sysfs_path); g_free (ctx->peer_port); g_slice_free (WaitForDeviceContext, ctx); } GFile * qfu_helpers_sysfs_wait_for_device_finish (GAsyncResult *res, GError **error) { return G_FILE (g_task_propagate_pointer (G_TASK (res), error)); } static GFile * wait_for_device_lookup (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path, const gchar *peer_port) { GList *devices; GFile *file; devices = qfu_helpers_sysfs_list_devices (device_type, device_mode, sysfs_path); if (!devices) { g_autofree gchar *tmp = NULL; g_autofree gchar *path = NULL; if (!peer_port) return NULL; /* Check with peer port */ tmp = g_build_filename (peer_port, "device", NULL); path = realpath (tmp, NULL); if (path) { g_debug ("[qfu-sysfs] peer lookup: %s => %s", peer_port, path); devices = qfu_helpers_sysfs_list_devices (device_type, device_mode, path); if (!devices) return NULL; } } if (g_list_length (devices) > 1) g_warning ("[qfu-sysfs] waiting device (%s) matched multiple times", qfu_helpers_device_type_to_string (device_type)); /* Take the first one from the list */ file = G_FILE (g_object_ref (devices->data)); g_list_free_full (devices, g_object_unref); return file; } static gboolean wait_for_device_check (GTask *task) { WaitForDeviceContext *ctx; g_autoptr(GFile) device = NULL; g_autofree gchar *device_name = NULL; ctx = (WaitForDeviceContext *) g_task_get_task_data (task); /* Check devices matching */ device = wait_for_device_lookup (ctx->device_type, ctx->device_mode, ctx->sysfs_path, ctx->peer_port); if (!device) { /* No devices found */ if (ctx->check_attempts == WAIT_FOR_DEVICE_CHECK_ATTEMPTS) { /* Disconnect this handler */ ctx->timeout_id = 0; /* Disconnect the other handlers */ g_cancellable_disconnect (g_task_get_cancellable (task), ctx->cancellable_id); ctx->cancellable_id = 0; g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_TIMED_OUT, "waiting for device at '%s' timed out", ctx->sysfs_path); g_object_unref (task); return G_SOURCE_REMOVE; } /* go on with next attempt */ ctx->check_attempts++; return G_SOURCE_CONTINUE; } device_name = g_file_get_basename (device); g_debug ("[qfu-sysfs] waiting device (%s) matched: %s", qfu_helpers_device_type_to_string (ctx->device_type), device_name); /* Disconnect the other handlers */ g_cancellable_disconnect (g_task_get_cancellable (task), ctx->cancellable_id); ctx->cancellable_id = 0; /* Disconnect this handler */ ctx->timeout_id = 0; g_task_return_pointer (task, g_steal_pointer (&device), g_object_unref); g_object_unref (task); return G_SOURCE_REMOVE; } static void wait_for_device_cancelled (GCancellable *cancellable, GTask *task) { WaitForDeviceContext *ctx; ctx = (WaitForDeviceContext *) g_task_get_task_data (task); /* Disconnect this handler */ g_cancellable_disconnect (g_task_get_cancellable (task), ctx->cancellable_id); ctx->cancellable_id = 0; /* Disconnect the other handlers */ g_source_remove (ctx->timeout_id); ctx->timeout_id = 0; g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_CANCELLED, "waiting for device at '%s' cancelled", ctx->sysfs_path); g_object_unref (task); } void qfu_helpers_sysfs_wait_for_device (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path, const gchar *peer_port, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; WaitForDeviceContext *ctx; ctx = g_slice_new0 (WaitForDeviceContext); ctx->device_type = device_type; ctx->device_mode = device_mode; ctx->sysfs_path = g_strdup (sysfs_path); ctx->peer_port = g_strdup (peer_port); task = g_task_new (NULL, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify) wait_for_device_context_free); /* Allow cancellation */ ctx->cancellable_id = g_cancellable_connect (cancellable, (GCallback) wait_for_device_cancelled, task, NULL); /* Schedule lookup of of port every once in a while */ ctx->timeout_id = g_timeout_add_seconds (WAIT_FOR_DEVICE_CHECK_SECS, (GSourceFunc) wait_for_device_check, task); /* Note: task ownership is shared between the signals and the timeout */ } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-helpers-sysfs.h000066400000000000000000000047251455567757300241130ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2022 VMware, Inc. */ #ifndef QFU_HELPERS_SYSFS_H #define QFU_HELPERS_SYSFS_H #include "config.h" #include #if defined WITH_UDEV # error udev found #endif G_BEGIN_DECLS gchar *qfu_helpers_sysfs_find_by_file (GFile *file, GError **error); gchar *qfu_helpers_sysfs_find_by_device_info (guint16 vid, guint16 pid, guint busnum, guint devnum, GError **error); GList *qfu_helpers_sysfs_list_devices (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path); void qfu_helpers_sysfs_wait_for_device (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path, const gchar *peer_port, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GFile *qfu_helpers_sysfs_wait_for_device_finish (GAsyncResult *res, GError **error); G_END_DECLS #endif /* QFU_HELPERS_SYSFS_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-helpers-udev.c000066400000000000000000000521001455567757300236700ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include "config.h" #include #include #if !defined WITH_UDEV # error udev is required #endif #include "qfu-helpers.h" #include "qfu-helpers-udev.h" #include /******************************************************************************/ #if defined WITH_UDEV static const gchar *tty_subsys_list[] = { "tty", NULL }; static const gchar *cdc_wdm_subsys_list[] = { "usbmisc", "usb", NULL }; static gboolean get_device_details (GUdevDevice *device, gchar **out_sysfs_path, QfuHelpersDeviceMode *out_device_mode, guint16 *out_vid, guint16 *out_pid, guint *out_busnum, guint *out_devnum, GError **error) { GUdevDevice *parent; gulong aux; if (out_vid) *out_vid = 0; if (out_pid) *out_pid = 0; if (out_sysfs_path) *out_sysfs_path = NULL; if (out_busnum) *out_busnum = 0; if (out_devnum) *out_devnum = 0; if (out_device_mode) *out_device_mode = QFU_HELPERS_DEVICE_MODE_UNKNOWN; /* We need to look for the parent GUdevDevice which has a "usb_device" * devtype. */ parent = g_udev_device_get_parent (device); while (parent) { GUdevDevice *next; if (g_strcmp0 (g_udev_device_get_devtype (parent), "usb_device") == 0) break; /* Check next parent */ next = g_udev_device_get_parent (parent); g_object_unref (parent); parent = next; } if (!parent) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't find parent physical USB device"); return FALSE; } if (out_sysfs_path) *out_sysfs_path = g_strdup (g_udev_device_get_sysfs_path (parent)); if (out_device_mode) { aux = strtoul (g_udev_device_get_sysfs_attr (parent, "bNumInterfaces"), NULL, 10); /* QDL download mode has exactly one single USB interface */ if (aux == 1) *out_device_mode = QFU_HELPERS_DEVICE_MODE_DOWNLOAD; else if (aux > 1) *out_device_mode = QFU_HELPERS_DEVICE_MODE_MODEM; } if (out_vid) { aux = strtoul (g_udev_device_get_property (parent, "ID_VENDOR_ID"), NULL, 16); if (aux <= G_MAXUINT16) *out_vid = (guint16) aux; } if (out_pid) { aux = strtoul (g_udev_device_get_property (parent, "ID_MODEL_ID"), NULL, 16); if (aux <= G_MAXUINT16) *out_pid = (guint16) aux; } if (out_busnum) { aux = strtoul (g_udev_device_get_property (parent, "BUSNUM"), NULL, 10); if (aux <= G_MAXUINT) *out_busnum = (guint16) aux; } if (out_devnum) { aux = strtoul (g_udev_device_get_property (parent, "DEVNUM"), NULL, 10); if (aux <= G_MAXUINT) *out_devnum = (guint16) aux; } g_object_unref (parent); return TRUE; } static gboolean udev_helper_get_udev_interface_details (GUdevDevice *device, gchar **out_driver, GError **error) { GUdevDevice *parent; /* We need to look for the parent GUdevDevice which has a "usb_interface" * devtype. */ parent = g_udev_device_get_parent (device); while (parent) { GUdevDevice *next; if (g_strcmp0 (g_udev_device_get_devtype (parent), "usb_interface") == 0) break; /* Check next parent */ next = g_udev_device_get_parent (parent); g_object_unref (parent); parent = next; } if (!parent) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't find parent interface USB device"); return FALSE; } if (out_driver) *out_driver = g_strdup (g_udev_device_get_driver (parent)); g_object_unref (parent); return TRUE; } /******************************************************************************/ gchar * qfu_helpers_udev_find_by_file (GFile *file, GError **error) { GUdevClient *client = NULL; GUdevDevice *device = NULL; gchar *basename = NULL; const gchar **subsys_list = NULL; gchar *sysfs_path = NULL; guint i; basename = g_file_get_basename (file); if (!basename) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't get filename"); goto out; } client = g_udev_client_new (NULL); if (g_str_has_prefix (basename, "tty")) subsys_list = tty_subsys_list; else if (g_str_has_prefix (basename, "cdc-wdm")) subsys_list = cdc_wdm_subsys_list; else { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unknown device file type"); goto out; } for (i = 0; !device && subsys_list[i]; i++) device = g_udev_client_query_by_subsystem_and_name (client, subsys_list[i], basename); if (!device) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "device not found"); goto out; } if (!get_device_details (device, &sysfs_path, NULL, NULL, NULL, NULL, NULL, error)) goto out; g_debug ("[qfu-udev] sysfs path for '%s' found: %s", basename, sysfs_path); out: g_free (basename); g_clear_object (&device); g_clear_object (&client); return sysfs_path; } /******************************************************************************/ static gboolean udev_helper_device_already_added (GPtrArray *ptr, const gchar *sysfs_path) { guint i; for (i = 0; i < ptr->len; i++) { if (g_strcmp0 (g_ptr_array_index (ptr, i), sysfs_path) == 0) return TRUE; } return FALSE; } static GPtrArray * udev_helper_find_by_device_info_in_subsystem (GPtrArray *sysfs_paths, GUdevClient *udev, const gchar *subsystem, guint16 vid, guint16 pid, guint busnum, guint devnum) { GList *devices; GList *iter; devices = g_udev_client_query_by_subsystem (udev, subsystem); for (iter = devices; iter; iter = g_list_next (iter)) { GUdevDevice *device; guint16 device_vid = 0; guint16 device_pid = 0; guint device_busnum = 0; guint device_devnum = 0; gchar *device_sysfs_path = NULL; device = G_UDEV_DEVICE (iter->data); if (get_device_details (device, &device_sysfs_path, NULL, &device_vid, &device_pid, &device_busnum, &device_devnum, NULL)) { if ((vid == 0 || vid == device_vid) && (pid == 0 || pid == device_pid) && (busnum == 0 || busnum == device_busnum) && (devnum == 0 || devnum == device_devnum) && (!udev_helper_device_already_added (sysfs_paths, device_sysfs_path))) g_ptr_array_add (sysfs_paths, device_sysfs_path); else g_free (device_sysfs_path); } g_object_unref (device); } g_list_free (devices); return sysfs_paths; } gchar * qfu_helpers_udev_find_by_device_info (guint16 vid, guint16 pid, guint busnum, guint devnum, GError **error) { GUdevClient *udev; guint i; GPtrArray *sysfs_paths; GString *match_str; gchar *sysfs_path = NULL; sysfs_paths = g_ptr_array_new_with_free_func (g_free); udev = g_udev_client_new (NULL); match_str = g_string_new (""); if (vid != 0) g_string_append_printf (match_str, "vid 0x%04x", vid); if (pid != 0) g_string_append_printf (match_str, "%spid 0x%04x", match_str->len > 0 ? ", " : "", pid); if (busnum != 0) g_string_append_printf (match_str, "%sbus %03u", match_str->len > 0 ? ", " : "", busnum); if (devnum != 0) g_string_append_printf (match_str, "%sdev %03u", match_str->len > 0 ? ", " : "", devnum); g_assert (match_str->len > 0); for (i = 0; tty_subsys_list[i]; i++) sysfs_paths = udev_helper_find_by_device_info_in_subsystem (sysfs_paths, udev, tty_subsys_list[i], vid, pid, busnum, devnum); for (i = 0; cdc_wdm_subsys_list[i]; i++) sysfs_paths = udev_helper_find_by_device_info_in_subsystem (sysfs_paths, udev, cdc_wdm_subsys_list[i], vid, pid, busnum, devnum); for (i = 0; i < sysfs_paths->len; i++) g_debug ("[%s] sysfs path: %s", match_str->str, (gchar *) g_ptr_array_index (sysfs_paths, i)); if (sysfs_paths->len == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "no device found with matching criteria: %s", match_str->str); goto out; } if (sysfs_paths->len > 1) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "multiple devices (%u) found with matching criteria: %s", sysfs_paths->len, match_str->str); goto out; } sysfs_path = g_strdup (g_ptr_array_index (sysfs_paths, 0)); out: g_ptr_array_unref (sysfs_paths); g_string_free (match_str, TRUE); g_object_unref (udev); return sysfs_path; } /******************************************************************************/ static GFile * device_matches (GUdevDevice *device, QfuHelpersDeviceType type, QfuHelpersDeviceMode mode, const gchar *sysfs_path) { GFile *file = NULL; gchar *device_sysfs_path = NULL; gchar *device_driver = NULL; gchar *device_path = NULL; QfuHelpersDeviceMode device_mode = QFU_HELPERS_DEVICE_MODE_UNKNOWN; if (!get_device_details (device, &device_sysfs_path, &device_mode, NULL, NULL, NULL, NULL, NULL)) goto out; if (!device_sysfs_path) goto out; if (g_strcmp0 (device_sysfs_path, sysfs_path) != 0) goto out; if (device_mode != mode) return NULL; if (!udev_helper_get_udev_interface_details (device, &device_driver, NULL)) goto out; switch (type) { case QFU_HELPERS_DEVICE_TYPE_TTY: if (g_strcmp0 (device_driver, "qcserial") != 0) goto out; break; case QFU_HELPERS_DEVICE_TYPE_CDC_WDM: if (g_strcmp0 (device_driver, "qmi_wwan") != 0 && g_strcmp0 (device_driver, "cdc_mbim") != 0) goto out; break; case QFU_HELPERS_DEVICE_TYPE_LAST: default: g_assert_not_reached (); } device_path = g_strdup_printf ("/dev/%s", g_udev_device_get_name (device)); file = g_file_new_for_path (device_path); g_free (device_path); out: g_free (device_sysfs_path); g_free (device_driver); return file; } GList * qfu_helpers_udev_list_devices (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path) { GUdevClient *udev; const gchar **subsys_list = NULL; guint i; GList *files = NULL; udev = g_udev_client_new (NULL); switch (device_type) { case QFU_HELPERS_DEVICE_TYPE_TTY: subsys_list = tty_subsys_list; break; case QFU_HELPERS_DEVICE_TYPE_CDC_WDM: subsys_list = cdc_wdm_subsys_list; break; case QFU_HELPERS_DEVICE_TYPE_LAST: default: g_assert_not_reached (); } for (i = 0; subsys_list[i]; i++) { GList *devices, *iter; devices = g_udev_client_query_by_subsystem (udev, subsys_list[i]); for (iter = devices; iter; iter = g_list_next (iter)) { GFile *file; file = device_matches (G_UDEV_DEVICE (iter->data), device_type, device_mode, sysfs_path); if (file) files = g_list_prepend (files, file); g_object_unref (G_OBJECT (iter->data)); } g_list_free (devices); } g_object_unref (udev); return files; } /******************************************************************************/ #define WAIT_FOR_DEVICE_TIMEOUT_SECS 120 typedef struct { QfuHelpersDeviceType device_type; QfuHelpersDeviceMode device_mode; GUdevClient *udev; gchar *sysfs_path; gchar *peer_port; guint timeout_id; gulong uevent_id; gulong cancellable_id; } WaitForDeviceContext; static void wait_for_device_context_free (WaitForDeviceContext *ctx) { g_assert (!ctx->timeout_id); g_assert (!ctx->uevent_id); g_assert (!ctx->cancellable_id); g_object_unref (ctx->udev); g_free (ctx->sysfs_path); g_free (ctx->peer_port); g_slice_free (WaitForDeviceContext, ctx); } GFile * qfu_helpers_udev_wait_for_device_finish (GAsyncResult *res, GError **error) { return G_FILE (g_task_propagate_pointer (G_TASK (res), error)); } static void handle_uevent (GUdevClient *client, const char *action, GUdevDevice *device, GTask *task) { WaitForDeviceContext *ctx; GFile *file; ctx = (WaitForDeviceContext *) g_task_get_task_data (task); if (!g_str_equal (action, "add") && !g_str_equal (action, "move") && !g_str_equal (action, "change")) return; file = device_matches (device, ctx->device_type, ctx->device_mode, ctx->sysfs_path); if (!file && ctx->peer_port) { gchar *tmp, *path; tmp = g_build_filename (ctx->peer_port, "device", NULL); path = realpath (tmp, NULL); g_free (tmp); if (!path) return; file = device_matches (device, ctx->device_type, ctx->device_mode, path); g_debug ("[qfu-udev] peer lookup for %s: %s => %s", g_udev_device_get_name (device), ctx->peer_port, path); g_free (path); } if (!file) return; g_debug ("[qfu-udev] waiting device (%s) matched: %s", qfu_helpers_device_type_to_string (ctx->device_type), g_udev_device_get_name (device)); /* Disconnect this handler */ g_signal_handler_disconnect (ctx->udev, ctx->uevent_id); ctx->uevent_id = 0; /* Disconnect the other handlers */ g_cancellable_disconnect (g_task_get_cancellable (task), ctx->cancellable_id); ctx->cancellable_id = 0; g_source_remove (ctx->timeout_id); ctx->timeout_id = 0; g_task_return_pointer (task, file, g_object_unref); g_object_unref (task); } static gboolean wait_for_device_timed_out (GTask *task) { WaitForDeviceContext *ctx; ctx = (WaitForDeviceContext *) g_task_get_task_data (task); /* Disconnect this handler */ ctx->timeout_id = 0; /* Disconnect the other handlers */ g_cancellable_disconnect (g_task_get_cancellable (task), ctx->cancellable_id); ctx->cancellable_id = 0; g_signal_handler_disconnect (ctx->udev, ctx->uevent_id); ctx->uevent_id = 0; g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_TIMED_OUT, "waiting for device at '%s' timed out", ctx->sysfs_path); g_object_unref (task); return FALSE; } static void wait_for_device_cancelled (GCancellable *cancellable, GTask *task) { WaitForDeviceContext *ctx; ctx = (WaitForDeviceContext *) g_task_get_task_data (task); /* Disconnect this handler */ g_cancellable_disconnect (g_task_get_cancellable (task), ctx->cancellable_id); ctx->cancellable_id = 0; /* Disconnect the other handlers */ g_source_remove (ctx->timeout_id); ctx->timeout_id = 0; g_signal_handler_disconnect (ctx->udev, ctx->uevent_id); ctx->uevent_id = 0; g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_CANCELLED, "waiting for device at '%s' cancelled", ctx->sysfs_path); g_object_unref (task); } void qfu_helpers_udev_wait_for_device (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path, const gchar *peer_port, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; WaitForDeviceContext *ctx; ctx = g_slice_new0 (WaitForDeviceContext); ctx->device_type = device_type; ctx->device_mode = device_mode; ctx->sysfs_path = g_strdup (sysfs_path); ctx->peer_port = g_strdup (peer_port); if (ctx->device_type == QFU_HELPERS_DEVICE_TYPE_TTY) ctx->udev = g_udev_client_new (tty_subsys_list); else if (ctx->device_type == QFU_HELPERS_DEVICE_TYPE_CDC_WDM) ctx->udev = g_udev_client_new (cdc_wdm_subsys_list); else g_assert_not_reached (); task = g_task_new (NULL, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify) wait_for_device_context_free); /* Monitor for device additions. */ ctx->uevent_id = g_signal_connect (ctx->udev, "uevent", G_CALLBACK (handle_uevent), task); /* Allow cancellation */ ctx->cancellable_id = g_cancellable_connect (cancellable, (GCallback) wait_for_device_cancelled, task, NULL); /* And also, setup a timeout to avoid waiting forever. */ ctx->timeout_id = g_timeout_add_seconds (WAIT_FOR_DEVICE_TIMEOUT_SECS, (GSourceFunc) wait_for_device_timed_out, task); /* Note: task ownership is shared between the signals and the timeout */ } /******************************************************************************/ struct _QfuHelpersUdevGenericMonitor { GUdevClient *udev; }; void qfu_helpers_udev_generic_monitor_free (QfuHelpersUdevGenericMonitor *self) { g_object_unref (self->udev); g_slice_free (QfuHelpersUdevGenericMonitor, self); } static void handle_uevent_generic (GUdevClient *client, const char *action, GUdevDevice *device, GTask *task) { g_debug ("[qfu-udev] event: %s %s", action, g_udev_device_get_name (device)); } QfuHelpersUdevGenericMonitor * qfu_helpers_udev_generic_monitor_new (const gchar *sysfs_path) { static const gchar *all_list[] = { "usbmisc", "usb", "tty", "net", NULL }; QfuHelpersUdevGenericMonitor *self; self = g_slice_new0 (QfuHelpersUdevGenericMonitor); self->udev = g_udev_client_new (all_list); /* Monitor for device events. */ g_signal_connect (self->udev, "uevent", G_CALLBACK (handle_uevent_generic), NULL); return self; } #endif /* WITH_UDEV */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-helpers-udev.h000066400000000000000000000057251455567757300237100ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_HELPERS_UDEV_H #define QFU_HELPERS_UDEV_H #include "config.h" #include #if !defined WITH_UDEV # error udev not found #endif G_BEGIN_DECLS gchar *qfu_helpers_udev_find_by_file (GFile *file, GError **error); gchar *qfu_helpers_udev_find_by_file_path (const gchar *path, GError **error); gchar *qfu_helpers_udev_find_by_device_info (guint16 vid, guint16 pid, guint busnum, guint devnum, GError **error); GList *qfu_helpers_udev_list_devices (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path); void qfu_helpers_udev_wait_for_device (QfuHelpersDeviceType device_type, QfuHelpersDeviceMode device_mode, const gchar *sysfs_path, const gchar *peer_port, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); GFile *qfu_helpers_udev_wait_for_device_finish (GAsyncResult *res, GError **error); typedef struct _QfuHelpersUdevGenericMonitor QfuHelpersUdevGenericMonitor; QfuHelpersUdevGenericMonitor *qfu_helpers_udev_generic_monitor_new (const gchar *sysfs_path); void qfu_helpers_udev_generic_monitor_free (QfuHelpersUdevGenericMonitor *self); G_END_DECLS #endif /* QFU_HELPERS_UDEV_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-helpers.c000066400000000000000000000051701455567757300227340ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2022 Aleksander Morgado */ #include "config.h" #include #include "qfu-helpers.h" /******************************************************************************/ static const gchar *device_type_str[] = { [QFU_HELPERS_DEVICE_TYPE_TTY] = "tty", [QFU_HELPERS_DEVICE_TYPE_CDC_WDM] = "cdc-wdm", }; G_STATIC_ASSERT (G_N_ELEMENTS (device_type_str) == QFU_HELPERS_DEVICE_TYPE_LAST); const gchar * qfu_helpers_device_type_to_string (QfuHelpersDeviceType type) { return device_type_str[type]; } /******************************************************************************/ static const gchar *device_mode_str[] = { [QFU_HELPERS_DEVICE_MODE_UNKNOWN] = "unknown", [QFU_HELPERS_DEVICE_MODE_MODEM] = "modem", [QFU_HELPERS_DEVICE_MODE_DOWNLOAD] = "download", }; G_STATIC_ASSERT (G_N_ELEMENTS (device_mode_str) == QFU_HELPERS_DEVICE_MODE_LAST); const gchar * qfu_helpers_device_mode_to_string (QfuHelpersDeviceMode mode) { return device_mode_str[mode]; } /******************************************************************************/ gchar * qfu_helpers_find_by_file_path (const gchar *path, GError **error) { GFile *file; gchar *sysfs_path; file = g_file_new_for_path (path); sysfs_path = qfu_helpers_find_by_file (file, error); g_object_unref (file); return sysfs_path; } gchar * qfu_helpers_find_peer_port (const gchar *sysfs_path, GError **error) { gchar *tmp, *path; tmp = g_build_filename (sysfs_path, "port", "peer", NULL); path = realpath (tmp, NULL); g_free (tmp); if (!path) return NULL; g_debug ("[qfu-helpers] peer port for '%s' found: %s", sysfs_path, path); return path; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-helpers.h000066400000000000000000000057111455567757300227420ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_HELPERS_H #define QFU_HELPERS_H #include "config.h" #include G_BEGIN_DECLS /******************************************************************************/ typedef enum { QFU_HELPERS_DEVICE_TYPE_TTY, QFU_HELPERS_DEVICE_TYPE_CDC_WDM, QFU_HELPERS_DEVICE_TYPE_LAST } QfuHelpersDeviceType; const gchar *qfu_helpers_device_type_to_string (QfuHelpersDeviceType type); /******************************************************************************/ typedef enum { QFU_HELPERS_DEVICE_MODE_UNKNOWN, QFU_HELPERS_DEVICE_MODE_MODEM, QFU_HELPERS_DEVICE_MODE_DOWNLOAD, QFU_HELPERS_DEVICE_MODE_LAST } QfuHelpersDeviceMode; const gchar *qfu_helpers_device_mode_to_string (QfuHelpersDeviceMode mode); /******************************************************************************/ gchar *qfu_helpers_find_by_file_path (const gchar *path, GError **error); gchar *qfu_helpers_find_peer_port (const gchar *sysfs_path, GError **error); /******************************************************************************/ #if defined WITH_UDEV # include "qfu-helpers-udev.h" # define qfu_helpers_find_by_file qfu_helpers_udev_find_by_file # define qfu_helpers_find_by_device_info qfu_helpers_udev_find_by_device_info # define qfu_helpers_list_devices qfu_helpers_udev_list_devices # define qfu_helpers_wait_for_device qfu_helpers_udev_wait_for_device # define qfu_helpers_wait_for_device_finish qfu_helpers_udev_wait_for_device_finish #else # include "qfu-helpers-sysfs.h" # define qfu_helpers_find_by_file qfu_helpers_sysfs_find_by_file # define qfu_helpers_find_by_device_info qfu_helpers_sysfs_find_by_device_info # define qfu_helpers_list_devices qfu_helpers_sysfs_list_devices # define qfu_helpers_wait_for_device qfu_helpers_sysfs_wait_for_device # define qfu_helpers_wait_for_device_finish qfu_helpers_sysfs_wait_for_device_finish #endif G_END_DECLS #endif /* QFU_HELPERS_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-image-cwe.c000066400000000000000000000465471455567757300231450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include "qfu-image-cwe.h" #include "qfu-utils.h" static GInitableIface *iface_initable_parent; static void initable_iface_init (GInitableIface *iface); G_DEFINE_TYPE_EXTENDED (QfuImageCwe, qfu_image_cwe, QFU_TYPE_IMAGE, 0, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) /* Sierra Wireless CWE file header * Note: 32bit numbers are big endian */ typedef struct _QfuCweFileHeader QfuCweFileHeader; struct _QfuCweFileHeader { gchar reserved1[256]; guint32 crc; /* 32bit CRC of "reserved1" field */ guint32 rev; /* header revision */ guint32 val; /* CRC validity indicator */ gchar type[4]; /* ASCII - not null terminated */ gchar product[4]; /* ASCII - not null terminated */ guint32 imgsize; /* image size */ guint32 imgcrc; /* 32bit CRC of the image */ gchar version[84]; /* ASCII - null terminated */ gchar date[8]; /* ASCII - null terminated */ guint32 compat; /* backward compatibility */ gchar reserved2[20]; } __attribute__ ((packed)); typedef struct { guint parent_image_index; QfuCweFileHeader hdr; gchar *type; gchar *product; } ImageInfo; struct _QfuImageCwePrivate { GArray *images; /* Parsed */ gchar *firmware_version; gchar *config_version; gchar *carrier; }; /******************************************************************************/ guint qfu_image_cwe_get_n_embedded_headers (QfuImageCwe *self) { g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), 0); return (self->priv->images ? self->priv->images->len : 0); } gint qfu_image_cwe_embedded_header_get_parent_index (QfuImageCwe *self, guint embedded_i) { ImageInfo *info; g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), -1); g_return_val_if_fail (self->priv->images, -1); g_return_val_if_fail (embedded_i < self->priv->images->len, -1); info = &g_array_index (self->priv->images, ImageInfo, embedded_i); return info->parent_image_index; } const gchar * qfu_image_cwe_embedded_header_get_type (QfuImageCwe *self, guint embedded_i) { ImageInfo *info; g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), NULL); g_return_val_if_fail (self->priv->images, NULL); g_return_val_if_fail (embedded_i < self->priv->images->len, NULL); info = &g_array_index (self->priv->images, ImageInfo, embedded_i); return info->type; } const gchar * qfu_image_cwe_embedded_header_get_product (QfuImageCwe *self, guint embedded_i) { ImageInfo *info; g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), NULL); g_return_val_if_fail (self->priv->images, NULL); g_return_val_if_fail (embedded_i < self->priv->images->len, NULL); info = &g_array_index (self->priv->images, ImageInfo, embedded_i); return info->product; } const gchar * qfu_image_cwe_embedded_header_get_version (QfuImageCwe *self, guint embedded_i) { ImageInfo *info; g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), NULL); g_return_val_if_fail (self->priv->images, NULL); g_return_val_if_fail (embedded_i < self->priv->images->len, NULL); info = &g_array_index (self->priv->images, ImageInfo, embedded_i); return info->hdr.version; } const gchar * qfu_image_cwe_embedded_header_get_date (QfuImageCwe *self, guint embedded_i) { ImageInfo *info; g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), NULL); g_return_val_if_fail (self->priv->images, NULL); g_return_val_if_fail (embedded_i < self->priv->images->len, NULL); info = &g_array_index (self->priv->images, ImageInfo, embedded_i); return info->hdr.date; } guint32 qfu_image_cwe_embedded_header_get_image_size (QfuImageCwe *self, guint embedded_i) { ImageInfo *info; g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), 0); g_return_val_if_fail (self->priv->images, 0); g_return_val_if_fail (embedded_i < self->priv->images->len, 0); info = &g_array_index (self->priv->images, ImageInfo, embedded_i); return GUINT32_FROM_BE (info->hdr.imgsize); } /******************************************************************************/ /* The 'main' header is the one at index 0 of the array, always */ const gchar * qfu_image_cwe_header_get_type (QfuImageCwe *self) { return qfu_image_cwe_embedded_header_get_type (self, 0); } const gchar * qfu_image_cwe_header_get_product (QfuImageCwe *self) { return qfu_image_cwe_embedded_header_get_product (self, 0); } const gchar * qfu_image_cwe_header_get_version (QfuImageCwe *self) { return qfu_image_cwe_embedded_header_get_version (self, 0); } const gchar * qfu_image_cwe_header_get_date (QfuImageCwe *self) { return qfu_image_cwe_embedded_header_get_date (self, 0); } guint32 qfu_image_cwe_header_get_image_size (QfuImageCwe *self) { return qfu_image_cwe_embedded_header_get_image_size (self, 0); } /******************************************************************************/ static void parse_firmware_config_carrier (QfuImageCwe *self) { GError *inner_error = NULL; guint i; g_assert (!self->priv->firmware_version); g_assert (!self->priv->config_version); g_assert (!self->priv->carrier); /* Try using the internal version first */ if (!qfu_utils_parse_cwe_version_string ( qfu_image_cwe_header_get_version (self), &self->priv->firmware_version, &self->priv->config_version, &self->priv->carrier, &inner_error)) { /* Just log the error message */ g_debug ("[qfu-image-cwe] couldn't parse internal version string '%s': %s", qfu_image_cwe_header_get_version (self), inner_error->message); g_clear_error (&inner_error); } /* If all retrieved with the internal version string, we're done */ if (self->priv->firmware_version && self->priv->config_version && self->priv->carrier) goto done; /* Try using the filename to gather more info */ if (!qfu_utils_parse_cwe_version_string ( qfu_image_get_display_name (QFU_IMAGE (self)), self->priv->firmware_version ? NULL : &self->priv->firmware_version, self->priv->config_version ? NULL : &self->priv->config_version, self->priv->carrier ? NULL : &self->priv->carrier, &inner_error)) { /* Just log the error message */ g_debug ("[qfu-image-cwe] couldn't parse filename '%s': %s", qfu_image_get_display_name (QFU_IMAGE (self)), inner_error->message); g_clear_error (&inner_error); } /* If all retrieved with the filename, we're done */ if (self->priv->firmware_version && self->priv->config_version && self->priv->carrier) goto done; /* Try with embedded images of type BOOT or NVU */ for (i = 0; i < self->priv->images->len; i++) { ImageInfo *info; info = &g_array_index (self->priv->images, ImageInfo, i); /* BOOT partition in system images won't likely contain anything else * than firmware version */ if (!g_strcmp0 (info->type, "BOOT") && !self->priv->firmware_version) { if (!qfu_utils_parse_cwe_version_string ( info->hdr.version, &self->priv->firmware_version, NULL, NULL, &inner_error)) { /* Just log the error message */ g_debug ("[qfu-image-cwe] couldn't parse BOOT version '%s': %s", qfu_image_get_display_name (QFU_IMAGE (self)), inner_error->message); g_clear_error (&inner_error); } } /* NVUP partition in nvu images are usually carrier-specific */ if (!g_strcmp0 (info->type, "NVUP")) { if (!qfu_utils_parse_cwe_version_string ( info->hdr.version, self->priv->firmware_version ? NULL : &self->priv->firmware_version, self->priv->config_version ? NULL : &self->priv->config_version, self->priv->carrier ? NULL : &self->priv->carrier, &inner_error)) { /* Just log the error message */ g_debug ("[qfu-image-cwe] couldn't parse NVUP version '%s': %s", qfu_image_get_display_name (QFU_IMAGE (self)), inner_error->message); g_clear_error (&inner_error); } } /* As soon as all retrieved, we're done */ if (self->priv->firmware_version && self->priv->config_version && self->priv->carrier) goto done; } done: g_debug ("[qfu-image-cwe] firmware version: %s", self->priv->firmware_version ? self->priv->firmware_version : "unknown"); g_debug ("[qfu-image-cwe] config version: %s", self->priv->config_version ? self->priv->config_version : "unknown"); g_debug ("[qfu-image-cwe] carrier: %s", self->priv->carrier ? self->priv->carrier : "unknown"); } const gchar * qfu_image_cwe_get_parsed_firmware_version (QfuImageCwe *self) { g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), NULL); return self->priv->firmware_version; } const gchar * qfu_image_cwe_get_parsed_config_version (QfuImageCwe *self) { g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), NULL); return self->priv->config_version; } const gchar * qfu_image_cwe_get_parsed_carrier (QfuImageCwe *self) { g_return_val_if_fail (QFU_IS_IMAGE_CWE (self), NULL); return self->priv->carrier; } /******************************************************************************/ static goffset get_header_size (QfuImage *self) { return (goffset) sizeof (QfuCweFileHeader); } static goffset get_data_size (QfuImage *self) { return qfu_image_get_size (self) - sizeof (QfuCweFileHeader); } static gssize read_header (QfuImage *_self, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error) { QfuImageCwe *self = QFU_IMAGE_CWE (_self); ImageInfo *info; if (out_buffer_size < sizeof (QfuCweFileHeader)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "buffer too small to read header"); return -1; } info = &g_array_index (self->priv->images, ImageInfo, 0); memcpy (out_buffer, &(info->hdr), sizeof (QfuCweFileHeader)); return sizeof (QfuCweFileHeader); } /******************************************************************************/ static void clear_image_info (ImageInfo *info) { g_free (info->type); g_free (info->product); } static gboolean is_ascii_str (const gchar *str, guint str_len) { guint i; guint real_len = 0; for (i = 0; (str[i] != '\0') && (i < str_len); i++) real_len++; /* All valid characters need to be printable */ for (i = 0; i < real_len; i++) { if (!g_ascii_isprint (str[i])) return FALSE; } /* All remaining characters need to be zero */ for (i = real_len; i < str_len; i++) { if (str[i] != '\0') return FALSE; } return TRUE; } static gboolean load_image_info (QfuImageCwe *self, GInputStream *input_stream, const gchar *parent_prefix, gint parent_image_index, goffset parent_image_end_offset, GCancellable *cancellable, GError **error) { ImageInfo info; gssize n_read; gchar *image_prefix; guint image_index; goffset image_start_offset; goffset image_end_offset; goffset walker; /* Store image start offset */ image_start_offset = g_seekable_tell (G_SEEKABLE (input_stream)); memset (&info, 0, sizeof (info)); /* Store parent image index */ info.parent_image_index = parent_image_index; /* Read header from file */ n_read = g_input_stream_read (input_stream, &(info.hdr), sizeof (QfuCweFileHeader), cancellable, error); if (n_read < 0) { g_prefix_error (error, "couldn't read file header: "); return FALSE; } if (n_read != sizeof (QfuCweFileHeader)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "CWE firmware image file is too short: full header not available"); return FALSE; } /* No image size reported */ if (!info.hdr.imgsize) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid image size"); return FALSE; } /* Check limits of the current image */ image_end_offset = image_start_offset + GUINT32_FROM_BE (info.hdr.imgsize) + sizeof (QfuCweFileHeader); if (parent_image_end_offset > 0 && parent_image_end_offset < image_end_offset) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "embedded image out of parent image bounds"); return FALSE; } /* Validate strings */ if (!is_ascii_str (info.hdr.type, sizeof (info.hdr.type)) || !is_ascii_str (info.hdr.product, sizeof (info.hdr.product)) || !is_ascii_str (info.hdr.version, sizeof (info.hdr.version)) || !is_ascii_str (info.hdr.date, sizeof (info.hdr.date))) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid strings given in image"); return FALSE; } /* Preload non-NUL terminated strings */ info.type = g_strndup (info.hdr.type, sizeof (info.hdr.type)); info.product = g_strndup (info.hdr.product, sizeof (info.hdr.product)); /* Valid image! We'll append to the array */ image_index = self->priv->images->len; g_array_insert_val (self->priv->images, image_index, info); g_debug ("[qfu-image-cwe] %simage offset range: [%" G_GOFFSET_FORMAT ",%" G_GOFFSET_FORMAT "]", parent_prefix, image_start_offset, image_end_offset); /* And check if it has embedded images */ image_prefix = g_strdup_printf ("%s ", parent_prefix); walker = image_start_offset; while (walker < image_end_offset) { goffset tested_offset; /* Read embedded image */ tested_offset = g_seekable_tell (G_SEEKABLE (input_stream)); if (!load_image_info (self, input_stream, image_prefix, image_index, image_end_offset, cancellable, NULL)) break; g_debug ("[qfu-image-cwe] %simage at offset %" G_GOFFSET_FORMAT " is valid", parent_prefix, tested_offset); walker = g_seekable_tell (G_SEEKABLE (input_stream)); } g_free (image_prefix); /* Finally, seek to just after this image */ if (!g_seekable_seek (G_SEEKABLE (input_stream), image_end_offset, G_SEEK_SET, cancellable, error)) { g_prefix_error (error, "couldn't seek after image: "); return FALSE; } return TRUE; } static gboolean initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { QfuImageCwe *self; GInputStream *input_stream = NULL; gboolean result = FALSE; self = QFU_IMAGE_CWE (initable); /* Run parent initable */ if (!iface_initable_parent->init (initable, cancellable, error)) return FALSE; g_object_get (self, "input-stream", &input_stream, NULL); g_assert (G_IS_FILE_INPUT_STREAM (input_stream)); g_debug ("[qfu-image-cwe] reading image headers..."); if (!g_seekable_seek (G_SEEKABLE (input_stream), 0, G_SEEK_SET, cancellable, error)) { g_prefix_error (error, "couldn't seek input stream: "); goto out; } if (!load_image_info (self, input_stream, "", -1, (goffset) -1, cancellable, error)) { g_prefix_error (error, "couldn't read file header: "); goto out; } g_debug ("[qfu-image-cwe] validating data size..."); if (qfu_image_get_data_size (QFU_IMAGE (self)) != qfu_image_cwe_header_get_image_size (self)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "CWE image file size mismatch (expected size: %" G_GUINT32_FORMAT " bytes, real size: %" G_GOFFSET_FORMAT " bytes)", qfu_image_cwe_header_get_image_size (self), qfu_image_get_data_size (QFU_IMAGE (self))); goto out; } g_debug ("[qfu-image-cwe] preloading firmware/config/carrier..."); parse_firmware_config_carrier (self); /* Success! */ result = TRUE; out: g_object_unref (input_stream); return result; } /******************************************************************************/ QfuImage * qfu_image_cwe_new (GFile *file, GCancellable *cancellable, GError **error) { g_return_val_if_fail (G_IS_FILE (file), NULL); return QFU_IMAGE (g_initable_new (QFU_TYPE_IMAGE_CWE, cancellable, error, "file", file, "image-type", QFU_IMAGE_TYPE_CWE, NULL)); } static void qfu_image_cwe_init (QfuImageCwe *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_IMAGE_CWE, QfuImageCwePrivate); self->priv->images = g_array_new (FALSE, FALSE, sizeof (ImageInfo)); g_array_set_clear_func (self->priv->images, (GDestroyNotify) clear_image_info); } static void finalize (GObject *object) { QfuImageCwe *self = QFU_IMAGE_CWE (object); g_free (self->priv->firmware_version); g_free (self->priv->config_version); g_free (self->priv->carrier); g_array_unref (self->priv->images); G_OBJECT_CLASS (qfu_image_cwe_parent_class)->finalize (object); } static void initable_iface_init (GInitableIface *iface) { iface_initable_parent = g_type_interface_peek_parent (iface); iface->init = initable_init; } static void qfu_image_cwe_class_init (QfuImageCweClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); QfuImageClass *image_class = QFU_IMAGE_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuImageCwePrivate)); object_class->finalize = finalize; image_class->get_header_size = get_header_size; image_class->get_data_size = get_data_size; image_class->read_header = read_header; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-image-cwe.h000066400000000000000000000101361455567757300231330ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_IMAGE_CWE_H #define QFU_IMAGE_CWE_H #include #include #include "qfu-image.h" G_BEGIN_DECLS #define QFU_TYPE_IMAGE_CWE (qfu_image_cwe_get_type ()) #define QFU_IMAGE_CWE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_IMAGE_CWE, QfuImageCwe)) #define QFU_IMAGE_CWE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_IMAGE_CWE, QfuImageCweClass)) #define QFU_IS_IMAGE_CWE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_IMAGE_CWE)) #define QFU_IS_IMAGE_CWE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_IMAGE_CWE)) #define QFU_IMAGE_CWE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_IMAGE_CWE, QfuImageCweClass)) typedef struct _QfuImageCwe QfuImageCwe; typedef struct _QfuImageCweClass QfuImageCweClass; typedef struct _QfuImageCwePrivate QfuImageCwePrivate; struct _QfuImageCwe { QfuImage parent; QfuImageCwePrivate *priv; }; struct _QfuImageCweClass { QfuImageClass parent; }; GType qfu_image_cwe_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuImageCwe, g_object_unref); QfuImage *qfu_image_cwe_new (GFile *file, GCancellable *cancellable, GError **error); const gchar *qfu_image_cwe_header_get_type (QfuImageCwe *self); const gchar *qfu_image_cwe_header_get_product (QfuImageCwe *self); const gchar *qfu_image_cwe_header_get_version (QfuImageCwe *self); const gchar *qfu_image_cwe_header_get_date (QfuImageCwe *self); guint32 qfu_image_cwe_header_get_image_size (QfuImageCwe *self); const gchar *qfu_image_cwe_get_parsed_firmware_version (QfuImageCwe *self); const gchar *qfu_image_cwe_get_parsed_config_version (QfuImageCwe *self); const gchar *qfu_image_cwe_get_parsed_carrier (QfuImageCwe *self); guint qfu_image_cwe_get_n_embedded_headers (QfuImageCwe *self); gint qfu_image_cwe_embedded_header_get_parent_index (QfuImageCwe *self, guint embedded_i); const gchar *qfu_image_cwe_embedded_header_get_type (QfuImageCwe *self, guint embedded_i); const gchar *qfu_image_cwe_embedded_header_get_product (QfuImageCwe *self, guint embedded_i); const gchar *qfu_image_cwe_embedded_header_get_version (QfuImageCwe *self, guint embedded_i); const gchar *qfu_image_cwe_embedded_header_get_date (QfuImageCwe *self, guint embedded_i); guint32 qfu_image_cwe_embedded_header_get_image_size (QfuImageCwe *self, guint embedded_i); G_END_DECLS #endif /* QFU_IMAGE_CWE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-image-factory.c000066400000000000000000000051171455567757300240220ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include "qfu-image-factory.h" #include "qfu-image.h" #include "qfu-image-cwe.h" QfuImage * qfu_image_factory_build (GFile *file, GCancellable *cancellable, GError **error) { gchar *basename; QfuImage *image = NULL; GError *inner_error = NULL; g_assert (G_IS_FILE (file)); basename = g_file_get_basename (file); /* guessing image type based on the well known Gobi 1k and 2k * filenames, and assumes anything else could be a CWE image * * This is based on the types in gobi-loader's snooped magic strings: * 0x05 => "amss.mbn" * 0x06 => "apps.mbn" * 0x0d => "uqcn.mbn" (Gobi 2000 only) */ if (g_ascii_strcasecmp (basename, "amss.mbn") == 0) image = qfu_image_new (file, QFU_IMAGE_TYPE_AMSS_MODEM, cancellable, error); else if (g_ascii_strcasecmp (basename, "apps.mbn") == 0) image = qfu_image_new (file, QFU_IMAGE_TYPE_AMSS_APPLICATION, cancellable, error); else if (g_ascii_strcasecmp (basename, "uqcn.mbn") == 0) image = qfu_image_new (file, QFU_IMAGE_TYPE_AMSS_UQCN, cancellable, error); else { /* Try to autodetect format */ /* Maybe a CWE image? */ image = qfu_image_cwe_new (file, cancellable, &inner_error); if (!image) { g_debug ("[qfu-image-factory] not a CWE file: %s", inner_error->message); g_error_free (inner_error); g_set_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_DATA, "unknown firmware image file"); } } g_free (basename); return image; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-image-factory.h000066400000000000000000000025351455567757300240300ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_IMAGE_FACTORY_H #define QFU_IMAGE_FACTORY_H #include #include #include "qfu-image.h" #include "qfu-image-cwe.h" G_BEGIN_DECLS QfuImage *qfu_image_factory_build (GFile *file, GCancellable *cancellable, GError **error); G_END_DECLS #endif /* QFU_IMAGE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-image.c000066400000000000000000000335311455567757300223560ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include "qfu-image.h" #include "qfu-enum-types.h" static void initable_iface_init (GInitableIface *iface); G_DEFINE_TYPE_EXTENDED (QfuImage, qfu_image, G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) enum { PROP_0, PROP_FILE, PROP_IMAGE_TYPE, PROP_INPUT_STREAM, PROP_LAST }; static GParamSpec *properties[PROP_LAST]; struct _QfuImagePrivate { QfuImageType image_type; GFile *file; GFileInfo *info; GInputStream *input_stream; }; /******************************************************************************/ gsize qfu_image_get_data_chunk_size (QfuImage *self, guint16 chunk_i) { gssize chunk_size = QFU_IMAGE_CHUNK_SIZE; guint n_chunks; n_chunks = qfu_image_get_n_data_chunks (self); g_assert (chunk_i < n_chunks); if ((guint)chunk_i == (n_chunks - 1)) { chunk_size = qfu_image_get_data_size (self) - ((gssize)chunk_i * QFU_IMAGE_CHUNK_SIZE); g_assert (chunk_size > 0); } else chunk_size = QFU_IMAGE_CHUNK_SIZE; return chunk_size; } gssize qfu_image_read_data_chunk (QfuImage *self, guint16 chunk_i, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error) { gsize chunk_size; guint n_chunks; goffset chunk_offset; gssize n_read; g_return_val_if_fail (QFU_IS_IMAGE (self), -1); g_debug ("[qfu-image] reading chunk #%u", chunk_i); n_chunks = qfu_image_get_n_data_chunks (self); if (chunk_i >= n_chunks) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid chunk index %u", chunk_i); return -1; } /* Last chunk may be shorter than the default */ chunk_size = qfu_image_get_data_chunk_size (self, chunk_i); g_debug ("[qfu-image] chunk #%u size: %" G_GSIZE_FORMAT " bytes", chunk_i, chunk_size); /* Make sure there's enough room */ if (out_buffer_size < chunk_size) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "buffer too small to fit chunk size: %" G_GSIZE_FORMAT, chunk_size); return -1; } /* Compute chunk offset */ chunk_offset = qfu_image_get_header_size (self) + ((goffset)chunk_i * QFU_IMAGE_CHUNK_SIZE); g_debug ("[qfu-image] chunk #%u offset: %" G_GOFFSET_FORMAT " bytes", chunk_i, chunk_offset); /* Seek to the correct place: note that this is likely a noop if already in that offset */ if (!g_seekable_seek (G_SEEKABLE (self->priv->input_stream), chunk_offset, G_SEEK_SET, cancellable, error)) { g_prefix_error (error, "couldn't seek input stream: "); return -1; } /* Read full chunk */ n_read = g_input_stream_read (self->priv->input_stream, out_buffer, chunk_size, cancellable, error); if (n_read < 0) { g_prefix_error (error, "couldn't read chunk %u", chunk_i); return -1; } if ((gsize)n_read != chunk_size) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read expected chunk %u size: %" G_GSIZE_FORMAT " (%" G_GSSIZE_FORMAT " bytes read)", chunk_i, chunk_size, n_read); return -1; } g_debug ("[qfu-image] chunk #%u successfully read", chunk_i); return chunk_size; } /******************************************************************************/ gssize qfu_image_read (QfuImage *self, goffset offset, gsize size, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error) { gssize n_read; goffset remaining_size; gsize read_size; g_return_val_if_fail (QFU_IS_IMAGE (self), -1); remaining_size = qfu_image_get_size (self) - offset; g_assert (remaining_size >= 0); read_size = ((gsize)remaining_size > size) ? size : (gsize)remaining_size; g_debug ("[qfu-image] reading [%" G_GOFFSET_FORMAT "-%" G_GOFFSET_FORMAT "]", offset, offset + read_size); /* Make sure there's enough room */ if (out_buffer_size < read_size) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "buffer too small to fit read size: %" G_GSIZE_FORMAT, read_size); return -1; } /* Seek to the correct place: note that this is likely a noop if already in that offset */ if (!g_seekable_seek (G_SEEKABLE (self->priv->input_stream), offset, G_SEEK_SET, cancellable, error)) { g_prefix_error (error, "couldn't seek input stream: "); return -1; } /* Read full chunk */ n_read = g_input_stream_read (self->priv->input_stream, out_buffer, read_size, cancellable, error); if (n_read < 0) { g_prefix_error (error, "couldn't read data at offset %" G_GOFFSET_FORMAT, offset); return -1; } if ((gsize)n_read != read_size) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read expected data size: %" G_GSIZE_FORMAT " (%" G_GSSIZE_FORMAT " bytes read)", read_size, n_read); return -1; } g_debug ("[qfu-image] data at offset %" G_GOFFSET_FORMAT " successfully read", offset); return read_size; } /******************************************************************************/ QfuImageType qfu_image_get_image_type (QfuImage *self) { g_return_val_if_fail (QFU_IS_IMAGE (self), QFU_IMAGE_TYPE_UNKNOWN); return self->priv->image_type; } const gchar * qfu_image_get_display_name (QfuImage *self) { g_return_val_if_fail (QFU_IS_IMAGE (self), NULL); return g_file_info_get_display_name (self->priv->info); } goffset qfu_image_get_size (QfuImage *self) { g_return_val_if_fail (QFU_IS_IMAGE (self), 0); return g_file_info_get_size (self->priv->info); } goffset qfu_image_get_header_size (QfuImage *self) { g_return_val_if_fail (QFU_IS_IMAGE (self), 0); return QFU_IMAGE_GET_CLASS (self)->get_header_size (self); } gssize qfu_image_read_header (QfuImage *self, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error) { g_return_val_if_fail (QFU_IS_IMAGE (self), 0); return (QFU_IMAGE_GET_CLASS (self)->read_header ? QFU_IMAGE_GET_CLASS (self)->read_header (self, out_buffer, out_buffer_size, cancellable, error) : 0); } goffset qfu_image_get_data_size (QfuImage *self) { g_return_val_if_fail (QFU_IS_IMAGE (self), 0); return QFU_IMAGE_GET_CLASS (self)->get_data_size (self); } guint16 qfu_image_get_n_data_chunks (QfuImage *self) { goffset data_size; data_size = qfu_image_get_data_size (self); g_assert (data_size <= ((goffset) G_MAXUINT16 * (goffset) QFU_IMAGE_CHUNK_SIZE)); return (guint16) (data_size / QFU_IMAGE_CHUNK_SIZE) + !!(data_size % QFU_IMAGE_CHUNK_SIZE); } /******************************************************************************/ static goffset get_header_size (QfuImage *self) { return 0; } static goffset get_data_size (QfuImage *self) { goffset file_size; file_size = qfu_image_get_size (self); /* some image types contain trailing garbage - from gobi-loader */ if (self->priv->image_type == QFU_IMAGE_TYPE_AMSS_MODEM) file_size -= 8; return file_size; } /******************************************************************************/ static gboolean initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { QfuImage *self; self = QFU_IMAGE (initable); g_assert (self->priv->file); /* Load file info */ g_debug ("[qfu-image] loading file info..."); self->priv->info = g_file_query_info (self->priv->file, G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "," G_FILE_ATTRIBUTE_STANDARD_SIZE, G_FILE_QUERY_INFO_NONE, cancellable, error); if (!self->priv->info) return FALSE; /* Check minimum file size */ if (qfu_image_get_size (self) < qfu_image_get_header_size (self)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "image is too short"); return FALSE; } /* Open file for reading. Kept open while the input stream reference is valid. */ g_debug ("[qfu-image] opening file for reading..."); self->priv->input_stream = G_INPUT_STREAM (g_file_read (self->priv->file, cancellable, error)); if (!self->priv->input_stream) return FALSE; return TRUE; } /******************************************************************************/ QfuImage * qfu_image_new (GFile *file, QfuImageType image_type, GCancellable *cancellable, GError **error) { g_return_val_if_fail (G_IS_FILE (file), NULL); return QFU_IMAGE (g_initable_new (QFU_TYPE_IMAGE, cancellable, error, "file", file, "image-type", image_type, NULL)); } static void qfu_image_init (QfuImage *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_IMAGE, QfuImagePrivate); self->priv->image_type = QFU_IMAGE_TYPE_UNKNOWN; } static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { QfuImage *self = QFU_IMAGE (object); switch (prop_id) { case PROP_FILE: self->priv->file = g_value_dup_object (value); break; case PROP_IMAGE_TYPE: self->priv->image_type = g_value_get_enum (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QfuImage *self = QFU_IMAGE (object); switch (prop_id) { case PROP_FILE: g_value_set_object (value, self->priv->file); break; case PROP_IMAGE_TYPE: g_value_set_enum (value, self->priv->image_type); break; case PROP_INPUT_STREAM: g_value_set_object (value, self->priv->input_stream); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void dispose (GObject *object) { QfuImage *self = QFU_IMAGE (object); g_clear_object (&self->priv->input_stream); g_clear_object (&self->priv->info); g_clear_object (&self->priv->file); G_OBJECT_CLASS (qfu_image_parent_class)->dispose (object); } static void initable_iface_init (GInitableIface *iface) { iface->init = initable_init; } static void qfu_image_class_init (QfuImageClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuImagePrivate)); object_class->dispose = dispose; object_class->get_property = get_property; object_class->set_property = set_property; klass->get_header_size = get_header_size; klass->get_data_size = get_data_size; properties[PROP_FILE] = g_param_spec_object ("file", "File", "File object", G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_FILE, properties[PROP_FILE]); properties[PROP_IMAGE_TYPE] = g_param_spec_enum ("image-type", "Image type", "Type of firmware image", QFU_TYPE_IMAGE_TYPE, QFU_IMAGE_TYPE_UNKNOWN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_IMAGE_TYPE, properties[PROP_IMAGE_TYPE]); properties[PROP_INPUT_STREAM] = g_param_spec_object ("input-stream", "Input stream", "Input stream object", G_TYPE_FILE_INPUT_STREAM, G_PARAM_READABLE); g_object_class_install_property (object_class, PROP_INPUT_STREAM, properties[PROP_INPUT_STREAM]); } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-image.h000066400000000000000000000122411455567757300223560ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_IMAGE_H #define QFU_IMAGE_H #include #include G_BEGIN_DECLS /* Most of these origin from GobiAPI_1.0.40/Core/QDLEnum.h * * The gobi-loader's snooped magic strings use types * 0x05 => "amss.mbn" * 0x06 => "apps.mbn" * 0x0d => "uqcn.mbn" (Gobi 2000 only) * with no file header data * * The 0x80 type is snooped from the Sierra Wireless firmware * uploaders, using 400 bytes file header data */ typedef enum { QFU_IMAGE_TYPE_UNKNOWN = 0x00, QFU_IMAGE_TYPE_AMSS_MODEM = 0x05, QFU_IMAGE_TYPE_AMSS_APPLICATION = 0x06, QFU_IMAGE_TYPE_AMSS_UQCN = 0x0d, QFU_IMAGE_TYPE_DBL = 0x0f, QFU_IMAGE_TYPE_OSBL = 0x10, QFU_IMAGE_TYPE_CWE = 0x80, } QfuImageType; /* Default chunk size */ #define QFU_IMAGE_CHUNK_SIZE (1024 * 1024) #define QFU_TYPE_IMAGE (qfu_image_get_type ()) #define QFU_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_IMAGE, QfuImage)) #define QFU_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_IMAGE, QfuImageClass)) #define QFU_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_IMAGE)) #define QFU_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_IMAGE)) #define QFU_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_IMAGE, QfuImageClass)) typedef struct _QfuImage QfuImage; typedef struct _QfuImageClass QfuImageClass; typedef struct _QfuImagePrivate QfuImagePrivate; struct _QfuImage { GObject parent; QfuImagePrivate *priv; }; struct _QfuImageClass { GObjectClass parent; goffset (* get_header_size) (QfuImage *self); gssize (* read_header) (QfuImage *self, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error); goffset (* get_data_size) (QfuImage *self); }; GType qfu_image_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuImage, g_object_unref); QfuImage *qfu_image_new (GFile *file, QfuImageType image_type, GCancellable *cancellable, GError **error); QfuImageType qfu_image_get_image_type (QfuImage *self); const gchar *qfu_image_get_display_name (QfuImage *self); goffset qfu_image_get_size (QfuImage *self); goffset qfu_image_get_header_size (QfuImage *self); gssize qfu_image_read_header (QfuImage *self, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error); goffset qfu_image_get_data_size (QfuImage *self); guint16 qfu_image_get_n_data_chunks (QfuImage *self); gsize qfu_image_get_data_chunk_size (QfuImage *self, guint16 chunk_i); gssize qfu_image_read_data_chunk (QfuImage *self, guint16 chunk_i, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error); gssize qfu_image_read (QfuImage *self, goffset offset, gsize size, guint8 *out_buffer, gsize out_buffer_size, GCancellable *cancellable, GError **error); G_END_DECLS #endif /* QFU_IMAGE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-log.c000066400000000000000000000103641455567757300220540ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016-2017 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include #include #if QMI_MBIM_QMUX_SUPPORTED #include #endif #include "qfu-log.h" static gboolean stdout_silent_flag; static gboolean stdout_verbose_flag; static FILE *verbose_log_file; static void log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { const gchar *log_level_str; time_t now; gchar time_str[64]; struct tm *local_time; gboolean err; /* Nothing to do if we're silent */ if (stdout_silent_flag && !verbose_log_file) return; now = time ((time_t *) NULL); local_time = localtime (&now); strftime (time_str, 64, "%d %b %Y, %H:%M:%S", local_time); err = FALSE; switch (log_level) { case G_LOG_LEVEL_WARNING: log_level_str = "-Warning **"; break; case G_LOG_LEVEL_CRITICAL: case G_LOG_LEVEL_ERROR: log_level_str = "-Error **"; err = TRUE; break; case G_LOG_LEVEL_DEBUG: log_level_str = "[Debug]"; break; case G_LOG_LEVEL_MESSAGE: case G_LOG_LEVEL_INFO: log_level_str = ""; break; case G_LOG_FLAG_FATAL: case G_LOG_LEVEL_MASK: case G_LOG_FLAG_RECURSION: default: g_assert_not_reached (); } if (verbose_log_file) { g_fprintf (verbose_log_file, "[%s] %s %s\n", time_str, log_level_str, message); fflush (verbose_log_file); } if (stdout_verbose_flag || err) g_fprintf (err ? stderr : stdout, "[%s] %s %s\n", time_str, log_level_str, message); } gboolean qfu_log_get_verbose (void) { return (stdout_verbose_flag || verbose_log_file); } gboolean qfu_log_get_verbose_stdout (void) { return (stdout_verbose_flag); } gboolean qfu_log_init (gboolean stdout_verbose, gboolean stdout_silent, const gchar *verbose_log_path) { if (stdout_verbose && stdout_silent) { g_printerr ("error: cannot specify --verbose and --silent at the same time\n"); return FALSE; } /* Store flags */ stdout_verbose_flag = stdout_verbose; stdout_silent_flag = stdout_silent; /* Open verbose log if required */ if (verbose_log_path) { verbose_log_file = fopen (verbose_log_path, "w"); if (!verbose_log_file) { g_printerr ("error: cannot open verbose log file for writing: %s\n", g_strerror (errno)); return FALSE; } } /* Default application logging */ g_log_set_handler (NULL, G_LOG_LEVEL_MASK, log_handler, NULL); /* libqmi logging */ g_log_set_handler ("Qmi", G_LOG_LEVEL_MASK, log_handler, NULL); if (stdout_verbose_flag || verbose_log_file) qmi_utils_set_traces_enabled (TRUE); #if QMI_MBIM_QMUX_SUPPORTED /* libmbim logging */ g_log_set_handler ("Mbim", G_LOG_LEVEL_MASK, log_handler, NULL); if (stdout_verbose_flag || verbose_log_file) mbim_utils_set_traces_enabled (TRUE); #endif return TRUE; } void qfu_log_shutdown (void) { if (verbose_log_file) fclose (verbose_log_file); } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-log.h000066400000000000000000000025501455567757300220570ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016-2017 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_LOG_H #define QFU_LOG_H #include G_BEGIN_DECLS gboolean qfu_log_init (gboolean stdout_verbose, gboolean stdout_silent, const gchar *verbose_log_path); void qfu_log_shutdown (void); gboolean qfu_log_get_verbose (void); gboolean qfu_log_get_verbose_stdout (void); G_END_DECLS #endif /* QFU_LOG_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-main.c000066400000000000000000000700741455567757300222230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016-2017 Zodiac Inflight Innovation * Copyright (C) 2016-2017 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include "qfu-log.h" #include "qfu-operation.h" #include "qfu-device-selection.h" #include "qfu-helpers.h" #include "qfu-utils.h" #define PROGRAM_NAME "qmi-firmware-update" #define PROGRAM_VERSION PACKAGE_VERSION /*****************************************************************************/ /* Options */ /* Generic device selections */ static guint busnum; static guint devnum; static guint16 vid; static guint16 pid; static gchar *cdc_wdm_str; static gchar *tty_str; #if defined MM_RUNTIME_CHECK_ENABLED static gboolean ignore_mm_runtime_check_flag; #endif /* Update */ static gboolean action_update_flag; static gchar *firmware_version_str; static gchar *config_version_str; static gchar *carrier_str; static gboolean ignore_version_errors_flag; static gboolean override_download_flag; static gint modem_storage_index_int; static gboolean skip_validation_flag; /* Reset */ static gboolean action_reset_flag; /* Update (in download mode) */ static gboolean action_update_download_flag; /* Verify */ static gboolean action_verify_flag; /* Main */ static gchar **image_strv; static gboolean device_open_proxy_flag; static gboolean device_open_qmi_flag; static gboolean device_open_mbim_flag; static gboolean device_open_auto_flag; static gboolean stdout_verbose_flag; static gboolean stdout_silent_flag; static gchar *verbose_log_str; static gboolean version_flag; static gboolean help_flag; static gboolean help_examples_flag; static gboolean parse_busnum_devnum (const gchar *option_name, const gchar *value, gpointer data, GError **error) { gchar **strv; gint busnum_idx = -1; gint devnum_idx = 0; gulong aux; gboolean result = FALSE; strv = g_strsplit (value, ":", -1); g_assert (strv[0]); if (strv[1]) { busnum_idx = 0; devnum_idx = 1; if (strv[2]) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid busnum-devnum string: too many fields"); goto out; } } if (busnum_idx != -1) { aux = strtoul (strv[busnum_idx], NULL, 10); if (aux == 0 || aux > G_MAXUINT) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid bus number: %s", strv[busnum_idx]); goto out; } busnum = (guint) aux; } aux = strtoul (strv[devnum_idx], NULL, 10); if (aux == 0 || aux > G_MAXUINT) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid dev number: %s", strv[devnum_idx]); goto out; } devnum = (guint) aux; result = TRUE; out: g_strfreev (strv); return result; } static gboolean parse_vid_pid (const gchar *option_name, const gchar *value, gpointer data, GError **error) { gchar **strv; gint vid_idx = 0; gint pid_idx = -1; gulong aux; gboolean result = FALSE; strv = g_strsplit (value, ":", -1); g_assert (strv[0]); if (strv[1]) { pid_idx = 1; if (strv[2]) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid vid-pid string: too many fields"); goto out; } } if (pid_idx != -1) { aux = strtoul (strv[pid_idx], NULL, 16); if (aux == 0 || aux > G_MAXUINT16) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid product id: %s", strv[pid_idx]); goto out; } pid = (guint) aux; } aux = strtoul (strv[vid_idx], NULL, 16); if (aux == 0 || aux > G_MAXUINT16) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid vendor id: %s", strv[vid_idx]); goto out; } vid = (guint16) aux; result = TRUE; out: g_strfreev (strv); return result; } static GOptionEntry context_selection_entries[] = { { "busnum-devnum", 's', 0, G_OPTION_ARG_CALLBACK, &parse_busnum_devnum, "Select device by bus and device number (in decimal).", "[BUS:]DEV" }, { "vid-pid", 'd', 0, G_OPTION_ARG_CALLBACK, &parse_vid_pid, "Select device by device vendor and product id (in hexadecimal).", "VID[:PID]" }, { "cdc-wdm", 'w', 0, G_OPTION_ARG_FILENAME, &cdc_wdm_str, "Select device by QMI/MBIM cdc-wdm device path (e.g. /dev/cdc-wdm0).", "[PATH]" }, { "tty", 't', 0, G_OPTION_ARG_FILENAME, &tty_str, "Select device by serial device path (e.g. /dev/ttyUSB2).", "[PATH]" }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static GOptionEntry context_update_entries[] = { { "update", 'u', 0, G_OPTION_ARG_NONE, &action_update_flag, "Launch firmware update process.", NULL }, { "firmware-version", 'f', 0, G_OPTION_ARG_STRING, &firmware_version_str, "Firmware version (e.g. '05.05.58.00').", "[VERSION]", }, { "config-version", 'c', 0, G_OPTION_ARG_STRING, &config_version_str, "Config version (e.g. '005.025_002').", "[VERSION]", }, { "carrier", 'C', 0, G_OPTION_ARG_STRING, &carrier_str, "Carrier name (e.g. 'Generic').", "[CARRIER]", }, { "ignore-version-errors", 0, 0, G_OPTION_ARG_NONE, &ignore_version_errors_flag, "Run update operation even with version string errors.", NULL }, { "override-download", 0, 0, G_OPTION_ARG_NONE, &override_download_flag, "Download images even if module says it already has them.", NULL }, { "modem-storage-index", 0, 0, G_OPTION_ARG_INT, &modem_storage_index_int, "Index storage for the modem image.", "[INDEX]" }, { "skip-validation", 0, 0, G_OPTION_ARG_NONE, &skip_validation_flag, "Don't wait to validate the running firmware after update.", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static GOptionEntry context_reset_entries[] = { { "reset", 'b', 0, G_OPTION_ARG_NONE, &action_reset_flag, "Reset device into download mode.", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static GOptionEntry context_update_download_entries[] = { { "update-download", 'U', 0, G_OPTION_ARG_NONE, &action_update_download_flag, "Launch firmware update process while in download (boot & hold) mode.", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static GOptionEntry context_verify_entries[] = { { "verify", 'z', 0, G_OPTION_ARG_NONE, &action_verify_flag, "Analyze and verify firmware images.", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static GOptionEntry context_main_entries[] = { { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &image_strv, "", "FILE1 FILE2..." }, { "device-open-proxy", 'p', 0, G_OPTION_ARG_NONE, &device_open_proxy_flag, "Request to use the 'qmi-proxy' proxy.", NULL }, { "device-open-qmi", 0, 0, G_OPTION_ARG_NONE, &device_open_qmi_flag, "Open a cdc-wdm device explicitly in QMI mode", NULL }, { "device-open-mbim", 0, 0, G_OPTION_ARG_NONE, &device_open_mbim_flag, "Open a cdc-wdm device explicitly in MBIM mode", NULL }, { "device-open-auto", 0, 0, G_OPTION_ARG_NONE, &device_open_auto_flag, "Open a cdc-wdm device in either QMI or MBIM mode (default)", NULL }, #if defined MM_RUNTIME_CHECK_ENABLED { "ignore-mm-runtime-check", 0, 0, G_OPTION_ARG_NONE, &ignore_mm_runtime_check_flag, "Ignore ModemManager runtime check", NULL }, #endif { "verbose", 'v', 0, G_OPTION_ARG_NONE, &stdout_verbose_flag, "Run action with verbose messages in standard output, including the debug ones.", NULL }, { "silent", 'S', 0, G_OPTION_ARG_NONE, &stdout_silent_flag, "Run action with no messages in standard output; not even the error ones.", NULL }, { "verbose-log", 'L', 0, G_OPTION_ARG_FILENAME, &verbose_log_str, "Write verbose messages to an output file.", "[PATH]" }, { "version", 'V', 0, G_OPTION_ARG_NONE, &version_flag, "Print version.", NULL }, { "help", 'h', 0, G_OPTION_ARG_NONE, &help_flag, "Show help.", NULL }, { "help-examples", 'H', 0, G_OPTION_ARG_NONE, &help_examples_flag, "Show help examples.", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static const gchar *context_description = " ***************************************************************************\n" " Warning!\n" " ***************************************************************************\n" "\n" " Use this program with caution. The authors take *no* responsibility if any\n" " device gets broken as a result of using this program.\n" "\n" " Please report issues to the libqmi mailing list at:\n" " libqmi-devel@lists.freedesktop.org\n"; /*****************************************************************************/ static void print_version (void) { g_print ("\n" PROGRAM_NAME " " PROGRAM_VERSION "\n" "\n" " Copyright (C) 2016-2022 Aleksander Morgado\n" " Copyright (C) 2022 VMware, Inc.\n" " Copyright (C) 2016-2019 Bjørn Mork\n" " Copyright (C) 2016-2018 Zodiac Inflight Innovations\n" "\n" "License GPLv2+: GNU GPL version 2 or later \n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n"); } static void print_help (GOptionContext *context) { gchar *str; /* Always print --help-all */ str = g_option_context_get_help (context, FALSE, NULL); g_print ("%s", str); g_free (str); } static void print_help_examples (void) { g_print ("\n" "********************************************************************************\n" "\n" " Example: Updating a Sierra Wireless MC7354.\n" " (or other 9x15 or 9x30 devices, like the MC7304, MC7330, MC7455... ).\n" "\n" " The MC7354 is a 9x15 device which requires the firmware updater to specify the\n" " firmware version string, the config version string and the carrier string, so\n" " that they are included as identifiers of the firmware images downloaded. The\n" " core logic in the application will try to automatically detect these strings,\n" " although the user can also use specific options to override them or if the\n" " automatic detection failed.\n" "\n" " While in normal operation, the device will expose multiple cdc-wdm ports, and\n" " the updater application just needs one of those cdc-wdm ports to start the\n" " operation. The user can explicitly specify the cdc-wdm port to use, or\n" " otherwise use the generic device selection options (i.e. --busnum-devnum or\n" " --vid-pid) to do that automatically.\n" "\n" " Note that the firmware for the MC7354 is usually composed of a core system image\n" " (.cwe) and a carrier-specific image (.nvu). These two images need to be flashed\n" " on the same operation, unless upgrading the carrier-specific image on a device\n" " which already has the matching firmware version. The two images may be given\n" " combined into a single image (.spk) file.\n" "\n" " a) An update operation specifying the vid:pid of the device (fails if multiple\n" " devices with the same vid:pid are found):\n" " $ sudo " PROGRAM_NAME " \\\n" " --update \\\n" " -d 1199:68c0 \\\n" " SWI9X15C_05.05.58.00.cwe \\\n" " SWI9X15C_05.05.58.00_Generic_005.025_002.nvu\n" "\n" " b) An update operation specifying an explicit QMI cdc-wdm device:\n" " $ sudo " PROGRAM_NAME " \\\n" " --update \\\n" " --cdc-wdm /dev/cdc-wdm0 \\\n" " SWI9X15C_05.05.58.00.cwe \\\n" " SWI9X15C_05.05.58.00_Generic_005.025_002.nvu\n" "\n" " c) An update operation specifying explicit firmware, config and carrier strings:\n" " $ sudo " PROGRAM_NAME " \\\n" " --update \\\n" " -d 1199:68c0 \\\n" " --firmware-version 05.05.58.00 \\\n" " --config-version 005.025_002 \\\n" " --carrier Generic \\\n" " SWI9X15C_05.05.58.00.cwe \\\n" " SWI9X15C_05.05.58.00_Generic_005.025_002.nvu\n" "\n" " d) An update operation with a combined image containing both system and carrier\n" " specific images::\n" " $ sudo " PROGRAM_NAME " \\\n" " --update \\\n" " -d 1199:68c0 \\\n" " 9999999_9902574_SWI9X15C_05.05.66.00_00_GENNA-UMTS_005.028_000-field.spk\n"); g_print ("\n" "********************************************************************************\n" "\n" " Example: Updating a Sierra Wireless MC7700.\n" " (or other 9200 devices, like the MC7710).\n" "\n" " The MC7700 is a 9200 device which doesn't require the explicit firmware, config\n" " and carrier strings. Unlike the MC7354, which would reboot itself into QDL\n" " download mode once these previous strings were configured, the MC7700 requires\n" " a specific \"boot and hold\" command to be sent (either via QMI or AT) to request\n" " the reset in QDL download mode.\n" "\n" " a) An update operation specifying the vid:pid of the device (fails if multiple\n" " devices with the same vid:pid are found):\n" " $ sudo " PROGRAM_NAME " \\\n" " --update \\\n" " -d 1199:68a2 \\\n" " 9999999_9999999_9200_03.05.14.00_00_generic_000.000_001_SPKG_MC.cwe\n" "\n" " b) An update operation specifying an explicit QMI cdc-wdm device:\n" " $ sudo " PROGRAM_NAME " \\\n" " --update \\\n" " --cdc-wdm /dev/cdc-wdm0 \\\n" " 9999999_9999999_9200_03.05.14.00_00_generic_000.000_001_SPKG_MC.cwe\n"); g_print ("\n" "********************************************************************************\n" "\n" " Example: Manual process to update a Sierra Wireless MC7354.\n" " (or other 9x15 or 9x30 devices, like the MC7304, MC7330, MC7455... ).\n" "\n" " The upgrade of devices from the 9x15 and 9x30 families is triggered via a\n" " 'firmware preference' setting. If the device accepts the setting, the user\n" " can request a device power cycle, which will boot in QDL download mode:\n" "\n" " a) Set firmware preference setting:\n" " $ sudo qmicli \\\n" " -d /dev/cdc-wdm0 \\\n" " --dms-set-firmware-preference=\"firmware-version=05.05.58.00, \\\n" " config-version=005.025_002, \\\n" " carrier=Generic\"\n" "\n" " The --override-download and --modem-storage-index=[INDEX] options that are\n" " supported in automatic mode may be used in manual mode by passing the\n" " additional 'override-download=yes' and 'modem-storage-index=[INDEX]' keys to the \n" " --dms-set-firmware-preference operation.\n" "\n" " b) Request power cycle:\n" " $ sudo qmicli \\\n" " -d /dev/cdc-wdm0 \\\n" " --dms-set-operating-mode=offline\n" " $ sudo qmicli \\\n" " -d /dev/cdc-wdm0 \\\n" " --dms-set-operating-mode=reset\n" "\n" " c) Wait for the /dev/ttyUSB device to appear.\n" "\n" " d) Run updater operation while in QDL download mode:\n" " $ sudo " PROGRAM_NAME " \\\n" " -t /dev/ttyUSB0 \\\n" " --update-download \\\n" " SWI9X15C_05.05.58.00.cwe \\\n" " SWI9X15C_05.05.58.00_Generic_005.025_002.nvu\n" "\n" " d) Now wait for the device to fully reboot, may take up to several minutes.\n"); g_print ("\n" "********************************************************************************\n" "\n" " Example: Manual process to update a Sierra Wireless MC7700.\n" " (or other 9200 devices, like the MC7710).\n" "\n" " Instead of setting a 'firmware preference', the devices from the 9200 family\n" " can just be rebooted in QDL mode:\n" "\n" " a) Request device to go into QDL download mode:\n" " $ sudo " PROGRAM_NAME " \\\n" " -d 1199:68a2 \\\n" " --reset\n" "\n" " b) Wait for the /dev/ttyUSB device to appear.\n" "\n" " c) Run updater operation while in QDL download mode:\n" " $ sudo " PROGRAM_NAME " \\\n" " -d 1199:68a2 \\\n" " --update-download \\\n" " 9999999_9999999_9200_03.05.14.00_00_generic_000.000_001_SPKG_MC.cwe\n" "\n" " d) Now wait for the device to fully reboot, may take up to several minutes.\n"); g_print ("\n" "********************************************************************************\n" "\n" " Example: Verify firmware images.\n" "\n" " a) Verify several images at once:\n" " $ " PROGRAM_NAME " \\\n" " --verify \\\n" " SWI9X15C_05.05.58.00.cwe \\\n" " SWI9X15C_05.05.58.00_Generic_005.025_002.nvu\n" "\n" " b) Verify all .cwe, .nvu and .spk images inside a directory:\n" " $ find . -regex \".*\\.\\(nvu\\|spk\\|cwe\\)\" -exec " PROGRAM_NAME " -v -z {} \\;\n" "\n" " c) Image files may be given within .exe files; extract them with 7-Zip:\n" " $ 7z x SWI9200M_3.5-Release13-SWI9200X_03.05.29.03.exe\n" " $ ls *.{cwe,nvu,spk} 2>/dev/null\n" " 9999999_9999999_9200_03.05.29.03_00_generic_000.000_001_SPKG_MC.cwe\n" "\n"); } /*****************************************************************************/ int main (int argc, char **argv) { GError *error = NULL; GOptionContext *context; GOptionGroup *group; guint n_actions; guint n_actions_images_needed; guint n_actions_device_needed; guint n_actions_cdc_wdm_needed; gboolean result = FALSE; QfuDeviceSelection *device_selection = NULL; QmiDeviceOpenFlags device_open_flags = QMI_DEVICE_OPEN_FLAGS_NONE; setlocale (LC_ALL, ""); /* Setup option context, process it and destroy it */ context = g_option_context_new ("- Update firmware in QMI devices"); g_option_context_set_description (context, context_description); group = g_option_group_new ("selection", "Generic device selection options:", "", NULL, NULL); g_option_group_add_entries (group, context_selection_entries); g_option_context_add_group (context, group); group = g_option_group_new ("update", "Update options (normal mode):", "", NULL, NULL); g_option_group_add_entries (group, context_update_entries); g_option_context_add_group (context, group); group = g_option_group_new ("reset", "Reset options (normal mode):", "", NULL, NULL); g_option_group_add_entries (group, context_reset_entries); g_option_context_add_group (context, group); group = g_option_group_new ("update-download", "Update options (download mode):", "", NULL, NULL); g_option_group_add_entries (group, context_update_download_entries); g_option_context_add_group (context, group); group = g_option_group_new ("verify", "Verify options:", "", NULL, NULL); g_option_group_add_entries (group, context_verify_entries); g_option_context_add_group (context, group); g_option_context_add_main_entries (context, context_main_entries, NULL); g_option_context_set_help_enabled (context, FALSE); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_printerr ("error: couldn't parse option context: %s\n", error->message); g_error_free (error); goto out; } if (version_flag) { print_version (); result = TRUE; goto out; } if (help_flag) { print_help (context); result = TRUE; goto out; } if (help_examples_flag) { print_help_examples (); result = TRUE; goto out; } /* Initialize logging */ qfu_log_init (stdout_verbose_flag, stdout_silent_flag, verbose_log_str); /* Total actions */ n_actions = (action_verify_flag + action_update_download_flag + action_reset_flag); /* Actions that require images specified */ n_actions_images_needed = (action_verify_flag + action_update_download_flag); /* Actions that require a device specified */ n_actions_device_needed = (action_update_download_flag + action_reset_flag); /* Actions that allow using a cdc-wdm device */ n_actions_cdc_wdm_needed = (action_reset_flag); n_actions += action_update_flag; n_actions_cdc_wdm_needed += action_update_flag; n_actions_images_needed += action_update_flag; n_actions_device_needed += action_update_flag; /* We don't allow multiple actions at the same time */ if (n_actions == 0) { g_printerr ("error: no actions specified\n"); goto out; } if (n_actions > 1) { g_printerr ("error: too many actions specified\n"); goto out; } /* A list of images must be provided for update and verify operations */ if (n_actions_images_needed && !image_strv) { g_printerr ("error: no firmware images specified\n"); goto out; } /* device selection must be performed for update and reset operations */ if (n_actions_device_needed) { device_selection = qfu_device_selection_new (cdc_wdm_str, tty_str, vid, pid, busnum, devnum, &error); if (!device_selection) { g_printerr ("error: couldn't select device:: %s\n", error->message); g_error_free (error); goto out; } #if defined MM_RUNTIME_CHECK_ENABLED /* For all those actions that require a device, we will be doing MM runtime checks */ if (!ignore_mm_runtime_check_flag) { gboolean mm_running; gboolean abort_needed = FALSE; if (!qfu_utils_modemmanager_running (&mm_running, &error)) { g_printerr ("error: couldn't check if ModemManager running: %s\n", error->message); g_error_free (error); abort_needed = TRUE; } else if (mm_running) { g_printerr ("error: ModemManager is running: cannot perform firmware upgrade operation at the same time\n"); abort_needed = TRUE; } if (abort_needed) { g_printerr ("\n" "Note: in order to do a clean firmware upgrade, ModemManager must NOT be running;\n" "please stop it and retry. On a 'systemd' based system this may be done as follows:\n" " # systemctl stop ModemManager\n" "\n" "You can also ignore this runtime check (at your own risk) using --ignore-mm-runtime-check.\n" "\n"); goto out; } } #endif } /* Validate device open flags */ if (n_actions_cdc_wdm_needed) { if (device_open_mbim_flag + device_open_qmi_flag + device_open_auto_flag > 1) { g_printerr ("error: cannot specify multiple mode flags to open device\n"); goto out; } if (device_open_proxy_flag) device_open_flags |= QMI_DEVICE_OPEN_FLAGS_PROXY; if (device_open_mbim_flag) device_open_flags |= QMI_DEVICE_OPEN_FLAGS_MBIM; if (device_open_auto_flag || (!device_open_qmi_flag && !device_open_mbim_flag)) device_open_flags |= QMI_DEVICE_OPEN_FLAGS_AUTO; } /* Run */ if (action_update_flag) { g_assert (QFU_IS_DEVICE_SELECTION (device_selection)); /* Validate storage index, just (0,G_MAXUINT8] for now. The value 0 is also not * valid, but we use it to flag when no specific index has been requested. */ if (modem_storage_index_int < 0 || modem_storage_index_int > G_MAXUINT8) { g_printerr ("error: invalid modem storage index\n"); goto out; } result = qfu_operation_update_run ((const gchar **) image_strv, device_selection, firmware_version_str, config_version_str, carrier_str, device_open_flags, ignore_version_errors_flag, override_download_flag, (guint8) modem_storage_index_int, skip_validation_flag); goto out; } if (action_update_download_flag) { g_assert (QFU_IS_DEVICE_SELECTION (device_selection)); result = qfu_operation_update_download_run ((const gchar **) image_strv, device_selection); goto out; } if (action_reset_flag) { g_assert (QFU_IS_DEVICE_SELECTION (device_selection)); result = qfu_operation_reset_run (device_selection, device_open_flags); goto out; } if (action_verify_flag) { result = qfu_operation_verify_run ((const gchar **) image_strv); goto out; } g_assert_not_reached (); out: qfu_log_shutdown (); /* Clean exit for a clean memleak report */ if (context) g_option_context_free (context); if (device_selection) g_object_unref (device_selection); return (result ? EXIT_SUCCESS : EXIT_FAILURE); } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-operation-reset.c000066400000000000000000000071241455567757300244130ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-reseter -- Command line tool to reseter firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include "qfu-operation.h" #include "qfu-reseter.h" typedef struct { GMainLoop *loop; GCancellable *cancellable; gboolean result; } ReseterOperation; static gboolean signal_handler (ReseterOperation *operation) { operation->result = FALSE; /* Ignore consecutive requests of cancellation */ if (!g_cancellable_is_cancelled (operation->cancellable)) { g_printerr ("cancelling the operation...\n"); g_cancellable_cancel (operation->cancellable); /* Reset the signal handler to allow main loop cancellation on * second signal */ return G_SOURCE_CONTINUE; } if (g_main_loop_is_running (operation->loop)) { g_printerr ("cancelling the main loop...\n"); g_main_loop_quit (operation->loop); } return G_SOURCE_REMOVE; } static void run_ready (QfuReseter *reseter, GAsyncResult *res, ReseterOperation *operation) { GError *error = NULL; if (!qfu_reseter_run_finish (reseter, res, &error)) { g_printerr ("error: reseter operation finished: %s\n", error->message); g_error_free (error); } else { g_print ("reseter operation finished successfully\n"); operation->result = TRUE; } g_idle_add ((GSourceFunc) g_main_loop_quit, operation->loop); } static gboolean operation_reseter_run (QfuReseter *reseter) { ReseterOperation operation = { .loop = NULL, .cancellable = NULL, .result = FALSE, }; g_assert (QFU_IS_RESETER (reseter)); /* Create runtime context */ operation.loop = g_main_loop_new (NULL, FALSE); operation.cancellable = g_cancellable_new (); /* Setup signals */ g_unix_signal_add (SIGINT, (GSourceFunc) signal_handler, &operation); g_unix_signal_add (SIGHUP, (GSourceFunc) signal_handler, &operation); g_unix_signal_add (SIGTERM, (GSourceFunc) signal_handler, &operation); /* Run! */ qfu_reseter_run (reseter, operation.cancellable, (GAsyncReadyCallback) run_ready, &operation); g_main_loop_run (operation.loop); if (operation.cancellable) g_object_unref (operation.cancellable); if (operation.loop) g_main_loop_unref (operation.loop); return operation.result; } gboolean qfu_operation_reset_run (QfuDeviceSelection *device_selection, QmiDeviceOpenFlags device_open_flags) { QfuReseter *reseter = NULL; gboolean result; reseter = qfu_reseter_new (device_selection, NULL, device_open_flags); result = operation_reseter_run (reseter); g_object_unref (reseter); return result; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-operation-update.c000066400000000000000000000125471455567757300245600ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include "qfu-operation.h" #include "qfu-updater.h" typedef struct { GMainLoop *loop; GCancellable *cancellable; gboolean result; } UpdateOperation; static gboolean signal_handler (UpdateOperation *operation) { operation->result = FALSE; /* Ignore consecutive requests of cancellation */ if (!g_cancellable_is_cancelled (operation->cancellable)) { g_printerr ("cancelling the operation...\n"); g_cancellable_cancel (operation->cancellable); /* Reset the signal handler to allow main loop cancellation on * second signal */ return G_SOURCE_CONTINUE; } if (g_main_loop_is_running (operation->loop)) { g_printerr ("cancelling the main loop...\n"); g_main_loop_quit (operation->loop); } return G_SOURCE_REMOVE; } static void run_ready (QfuUpdater *updater, GAsyncResult *res, UpdateOperation *operation) { GError *error = NULL; if (!qfu_updater_run_finish (updater, res, &error)) { g_printerr ("error: %s\n", error->message); if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED)) g_printerr ("note: you can ignore this error using --ignore-version-errors\n"); g_error_free (error); } else { g_print ("firmware update operation finished successfully\n"); operation->result = TRUE; } g_idle_add ((GSourceFunc) g_main_loop_quit, operation->loop); } static gboolean operation_update_run (QfuUpdater *updater, const gchar **images) { UpdateOperation operation = { .loop = NULL, .cancellable = NULL, .result = FALSE, }; GList *image_file_list = NULL; guint i; g_assert (images); g_assert (QFU_IS_UPDATER (updater)); /* Create runtime context */ operation.loop = g_main_loop_new (NULL, FALSE); operation.cancellable = g_cancellable_new (); /* Setup signals */ g_unix_signal_add (SIGINT, (GSourceFunc) signal_handler, &operation); g_unix_signal_add (SIGHUP, (GSourceFunc) signal_handler, &operation); g_unix_signal_add (SIGTERM, (GSourceFunc) signal_handler, &operation); /* Create list of image files */ for (i = 0; images[i]; i++) image_file_list = g_list_append (image_file_list, g_file_new_for_commandline_arg (images[i])); /* Run! */ qfu_updater_run (updater, image_file_list, operation.cancellable, (GAsyncReadyCallback) run_ready, &operation); g_list_free_full (image_file_list, g_object_unref); g_main_loop_run (operation.loop); if (operation.cancellable) g_object_unref (operation.cancellable); if (operation.loop) g_main_loop_unref (operation.loop); return operation.result; } gboolean qfu_operation_update_run (const gchar **images, QfuDeviceSelection *device_selection, const gchar *firmware_version, const gchar *config_version, const gchar *carrier, QmiDeviceOpenFlags device_open_flags, gboolean ignore_version_errors, gboolean override_download, guint8 modem_storage_index, gboolean skip_validation) { QfuUpdater *updater = NULL; gboolean result; g_assert (images); updater = qfu_updater_new (device_selection, firmware_version, config_version, carrier, device_open_flags, ignore_version_errors, override_download, modem_storage_index, skip_validation); result = operation_update_run (updater, images); g_object_unref (updater); return result; } gboolean qfu_operation_update_download_run (const gchar **images, QfuDeviceSelection *device_selection) { QfuUpdater *updater = NULL; gboolean result; g_assert (images); updater = qfu_updater_new_download (device_selection); result = operation_update_run (updater, images); g_object_unref (updater); return result; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-operation-verify.c000066400000000000000000000113721455567757300245750ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include "qfu-operation.h" #include "qfu-image.h" #include "qfu-image-cwe.h" #include "qfu-image-factory.h" #include "qfu-enum-types.h" #define VALIDATE_STR_NA(str) (str && str[0] ? str : "n/a") static void print_image_cwe (QfuImageCwe *image, const gchar *indent_prefix, const gchar *id_str, guint idx) { guint i; guint j; g_print ("%s-------------------------------------\n", indent_prefix); g_print ("%s[cwe %s] type: %s\n", indent_prefix, id_str, VALIDATE_STR_NA (qfu_image_cwe_embedded_header_get_type (image, idx))); g_print ("%s[cwe %s] product: %s\n", indent_prefix, id_str, VALIDATE_STR_NA (qfu_image_cwe_embedded_header_get_product (image, idx))); g_print ("%s[cwe %s] version: %s\n", indent_prefix, id_str, VALIDATE_STR_NA (qfu_image_cwe_embedded_header_get_version (image, idx))); g_print ("%s[cwe %s] date: %s\n", indent_prefix, id_str, VALIDATE_STR_NA (qfu_image_cwe_embedded_header_get_date (image, idx))); g_print ("%s[cwe %s] size: %" G_GUINT32_FORMAT "\n", indent_prefix, id_str, qfu_image_cwe_embedded_header_get_image_size (image, idx)); for (i = idx + 1, j = 0; i < qfu_image_cwe_get_n_embedded_headers (image); i++) { gchar *sub_id_str; gchar *sub_indent_prefix; /* As soon as we find one which doesn't have the expected parent index, break */ if (qfu_image_cwe_embedded_header_get_parent_index (image, i) != (gint) idx) continue; sub_id_str = g_strdup_printf ("%s.%u", id_str, j++); sub_indent_prefix = g_strdup_printf ("%s ", indent_prefix); print_image_cwe (image, sub_indent_prefix, sub_id_str, i); g_free (sub_id_str); g_free (sub_indent_prefix); } } static gboolean operation_verify_run_single (const gchar *image_path) { QfuImage *image; GFile *file; GError *error = NULL; gboolean result = FALSE; file = g_file_new_for_commandline_arg (image_path); image = qfu_image_factory_build (file, NULL, &error); if (!image) { g_printerr ("error: couldn't detect image type: %s\n", error->message); g_error_free (error); goto out; } g_print ("\n"); g_print ("Firmware image:\n"); g_print (" filename: %s\n", qfu_image_get_display_name (image)); g_print (" detected type: %s\n", qfu_image_type_get_string (qfu_image_get_image_type (image))); g_print (" size: %" G_GOFFSET_FORMAT " bytes\n", qfu_image_get_size (image)); g_print (" header: %" G_GOFFSET_FORMAT " bytes\n", qfu_image_get_header_size (image)); g_print (" data: %" G_GOFFSET_FORMAT " bytes\n", qfu_image_get_data_size (image)); g_print (" data chunks: %" G_GUINT16_FORMAT " (%lu bytes/chunk)\n", qfu_image_get_n_data_chunks (image), (gulong) QFU_IMAGE_CHUNK_SIZE); if (QFU_IS_IMAGE_CWE (image)) { QfuImageCwe *image_cwe = QFU_IMAGE_CWE (image); g_print (" [cwe] detected firmware version: %s\n", VALIDATE_STR_NA (qfu_image_cwe_get_parsed_firmware_version (image_cwe))); g_print (" [cwe] detected config version: %s\n", VALIDATE_STR_NA (qfu_image_cwe_get_parsed_config_version (image_cwe))); g_print (" [cwe] detected carrier: %s\n", VALIDATE_STR_NA (qfu_image_cwe_get_parsed_carrier (image_cwe))); print_image_cwe (image_cwe, " ", "0", 0); } result = TRUE; out: if (image) g_object_unref (image); return result; } gboolean qfu_operation_verify_run (const gchar **images) { guint invalid_images = 0; guint i; for (i = 0; images[i] ; i++) invalid_images += !operation_verify_run_single (images[i]); return !invalid_images; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-operation.h000066400000000000000000000044731455567757300233040ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_OPERATION_H #define QFU_OPERATION_H #include "config.h" #include #include #include "qfu-device-selection.h" G_BEGIN_DECLS gboolean qfu_operation_update_run (const gchar **images, QfuDeviceSelection *device_selection, const gchar *firmware_version, const gchar *config_version, const gchar *carrier, QmiDeviceOpenFlags device_open_flags, gboolean ignore_version_errors, gboolean override_download, guint8 modem_storage_index, gboolean skip_validation); gboolean qfu_operation_update_download_run (const gchar **images, QfuDeviceSelection *device_selection); gboolean qfu_operation_verify_run (const gchar **images); gboolean qfu_operation_reset_run (QfuDeviceSelection *device_selection, QmiDeviceOpenFlags device_open_flags); G_END_DECLS #endif /* QFU_OPERATION_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-qdl-device.c000066400000000000000000000654251455567757300233200ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Qfu-firmware-update -- Command line tool to update firmware in QFU devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include #include #include #include #include #include #include "qfu-log.h" #include "qfu-qdl-message.h" #include "qfu-dload-message.h" #include "qfu-qdl-device.h" #include "qfu-utils.h" #include "qfu-enum-types.h" static void initable_iface_init (GInitableIface *iface); G_DEFINE_TYPE_EXTENDED (QfuQdlDevice, qfu_qdl_device, G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) enum { PROP_0, PROP_FILE, PROP_LAST }; static GParamSpec *properties[PROP_LAST]; #define SECONDARY_BUFFER_DEFAULT_SIZE 512 #define MAX_PRINTABLE_SIZE 80 struct _QfuQdlDevicePrivate { GFile *file; gint fd; guint qdl_version; GByteArray *buffer; GByteArray *secondary_buffer; }; /******************************************************************************/ /* HDLC */ #define CONTROL 0x7e #define ESCAPE 0x7d #define MASK 0x20 static gsize escape (const guint8 *in, gsize inlen, guint8 *out, gsize outlen) { gsize i, j; for (i = 0, j = 0; i < inlen; i++) { /* Caller should give a big enough buffer */ g_assert ((j + 1) < outlen); if (in[i] == CONTROL || in[i] == ESCAPE) { out[j++] = ESCAPE; out[j++] = in[i] ^ MASK; } else out[j++] = in[i]; } return j; } static gsize unescape (const guint8 *in, gsize inlen, guint8 *out, gsize outlen) { gsize i, j = 0; gboolean escaping = FALSE; for (i = 0; i < inlen; i++) { /* Caller should give a big enough buffer */ g_assert (j < outlen); if (escaping) { out[j++] = in[i] ^ MASK; escaping = FALSE; } else if (in[i] == ESCAPE) { escaping = TRUE; } else { out[j++] = in[i]; } } return j; } /* copy a possibly escaped single byte to out */ static gsize escape_byte (guint8 byte, guint8 *out, gsize outlen) { gsize j = 0; if (byte == CONTROL || byte == ESCAPE) { out[j++] = ESCAPE; byte ^= MASK; } out[j++] = byte; return j; } static gsize hdlc_max_framed_size (gsize unframed_size) { /* 1 header byte, (2 * input size) bytes, 2 crc bytes and 1 trailing byte */ return 4 + (2 * unframed_size); } static gsize hdlc_frame (const guint8 *in, gsize inlen, guint8 *out, gsize outlen) { guint16 crc; gsize j = 0; out[j++] = CONTROL; j += escape (in, inlen, &out[j], outlen - j); crc = qfu_utils_crc16 (in, inlen); j += escape_byte (crc & 0xff, &out[j], outlen - j); j += escape_byte (crc >> 8 & 0xff, &out[j], outlen - j); out[j++] = CONTROL; return j; } static gsize hdlc_max_unframed_size (gsize framed_size) { /* -1 header byte, -2 crc bytes and -1 trailing byte */ g_assert (framed_size > 3); return framed_size - 3; } static gsize hdlc_unframe (const guint8 *in, gsize inlen, guint8 *out, gsize outlen, GError **error) { guint16 crc; gsize j, i = inlen; /* the first control char is optional */ if (*in == CONTROL) { in++; i--; } if (in[i - 1] == CONTROL) i--; j = unescape (in, i, out, outlen); if (j < 2) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unescaping failed: too few bytes as output: %" G_GSIZE_FORMAT, j); return 0; } j -= 2; /* remove the crc */ /* verify the crc */ crc = qfu_utils_crc16 (out, j); if (crc != (out[j] | out[j + 1] << 8)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "crc check failed: 0x%04x != 0x%04x\n", crc, out[j] | out[j + 1] << 8); return 0; } return j; } /******************************************************************************/ /* Send */ static gboolean send_request (QfuQdlDevice *self, const guint8 *request, gsize request_size, GCancellable *cancellable, GError **error) { gssize wlen; fd_set wr; gint aux; struct timeval tv = { .tv_sec = 2, .tv_usec = 0, }; /* Wait for the fd to be writable and don't wait forever */ FD_ZERO (&wr); FD_SET (self->priv->fd, &wr); aux = select (self->priv->fd + 1, NULL, &wr, NULL, &tv); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return FALSE; if (aux < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error waiting to write: %s", g_strerror (errno)); return FALSE; } if (aux == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "timed out waiting to write"); return FALSE; } /* Debug output */ if (qfu_log_get_verbose ()) { gchar *printable; gsize printable_size = request_size; gboolean shorted = FALSE; if (printable_size > MAX_PRINTABLE_SIZE) { printable_size = MAX_PRINTABLE_SIZE; shorted = TRUE; } printable = qfu_utils_str_hex (request, printable_size, ':'); g_debug ("[qfu-qdl-device] >> %s%s [%" G_GSIZE_FORMAT "]", printable, shorted ? "..." : "", request_size); g_free (printable); } wlen = write (self->priv->fd, request, request_size); if (wlen < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error writting: %s", g_strerror (errno)); return FALSE; } /* We treat EINTR as an error, so we also treat as an error if not all bytes * were wlen */ if ((gsize)wlen != request_size) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error writing: only %" G_GSSIZE_FORMAT "/%" G_GSIZE_FORMAT " bytes written", wlen, request_size); return FALSE; } return TRUE; } static gboolean send_framed_request (QfuQdlDevice *self, const guint8 *request, gsize request_size, GCancellable *cancellable, GError **error) { gsize max_framed_size; gsize framed_size; /* Debug output */ if (qfu_log_get_verbose ()) { gchar *printable; gsize printable_size = request_size; gboolean shorted = FALSE; if (printable_size > MAX_PRINTABLE_SIZE) { printable_size = MAX_PRINTABLE_SIZE; shorted = TRUE; } printable = qfu_utils_str_hex (request, printable_size, ':'); g_debug ("[qfu-qdl-device] >> %s%s [%" G_GSIZE_FORMAT ", unframed]", printable, shorted ? "..." : "", request_size); g_free (printable); } max_framed_size = hdlc_max_framed_size (request_size); if (G_UNLIKELY (max_framed_size > self->priv->secondary_buffer->len)) g_byte_array_set_size (self->priv->secondary_buffer, max_framed_size); /* Pack into an HDLC frame */ framed_size = hdlc_frame (request, request_size, self->priv->secondary_buffer->data, self->priv->secondary_buffer->len); g_assert (framed_size > 0); return send_request (self, self->priv->secondary_buffer->data, framed_size, cancellable, error); } /******************************************************************************/ /* Receive */ static gssize receive_response (QfuQdlDevice *self, guint timeout_secs, guint8 **response, GCancellable *cancellable, GError **error) { fd_set rd; struct timeval tv; gint aux; gssize rlen; guint8 *end; gssize frame_size; gsize max_unframed_size; gsize unframed_size; /* Use requested timeout */ tv.tv_sec = timeout_secs; tv.tv_usec = 0; FD_ZERO (&rd); FD_SET (self->priv->fd, &rd); aux = select (self->priv->fd + 1, &rd, NULL, NULL, &tv); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return -1; if (aux < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error waiting to read response: %s", g_strerror (errno)); return -1; } if (aux == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "timed out waiting for the response"); return -1; } /* Receive in the primary buffer */ rlen = read (self->priv->fd, self->priv->buffer->data, self->priv->buffer->len); if (rlen < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read response: %s", g_strerror (errno)); return -1; } if (rlen == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read response: HUP detected"); return -1; } /* Debug output */ if (qfu_log_get_verbose ()) { gchar *printable; gsize printable_size = rlen; gboolean shorted = FALSE; if (printable_size > MAX_PRINTABLE_SIZE) { printable_size = MAX_PRINTABLE_SIZE; shorted = TRUE; } printable = qfu_utils_str_hex (self->priv->buffer->data, printable_size, ':'); g_debug ("[qfu-qdl-device] << %s%s [%" G_GSIZE_FORMAT "]", printable, shorted ? "..." : "", rlen); g_free (printable); } end = memchr (self->priv->buffer->data + 1, CONTROL, rlen - 1); if (!end) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "HDLC trailing control character not found"); return -1; } frame_size = end - self->priv->buffer->data + 1; g_assert (frame_size >= 0); g_assert (frame_size <= rlen); if (frame_size < 5) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "minimum HDLC frame size not received"); return -1; } if (frame_size < rlen) g_debug ("[qfu-qdl-device] received %" G_GSSIZE_FORMAT " trailing bytes after HDLC frame (ignored)", rlen - frame_size); max_unframed_size = hdlc_max_unframed_size (frame_size); if (G_UNLIKELY (max_unframed_size > self->priv->secondary_buffer->len)) g_byte_array_set_size (self->priv->secondary_buffer, max_unframed_size); unframed_size = hdlc_unframe (self->priv->buffer->data, (gsize)frame_size, self->priv->secondary_buffer->data, self->priv->secondary_buffer->len, error); if (unframed_size == 0) { g_prefix_error (error, "error unframing message: "); return -1; } /* Debug output */ if (qfu_log_get_verbose ()) { gchar *printable; gsize printable_size = unframed_size; gboolean shorted = FALSE; if (printable_size > MAX_PRINTABLE_SIZE) { printable_size = MAX_PRINTABLE_SIZE; shorted = TRUE; } printable = qfu_utils_str_hex (self->priv->secondary_buffer->data, printable_size, ':'); g_debug ("[qfu-qdl-device] << %s%s [%" G_GSIZE_FORMAT ", unframed]", printable, shorted ? "..." : "", unframed_size); g_free (printable); } if (response) *response = self->priv->secondary_buffer->data; return unframed_size; } /******************************************************************************/ /* Send/receive */ static gssize send_receive (QfuQdlDevice *self, const guint8 *request, gsize request_size, gboolean request_framed, guint response_timeout_secs, guint8 **response, GCancellable *cancellable, GError **error) { gboolean sent; if (self->priv->fd < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "device is closed"); return FALSE; } if (request_framed) sent = send_framed_request (self, request, request_size, cancellable, error); else sent = send_request (self, request, request_size, cancellable, error); if (!sent) return -1; if (!response) return 0; return receive_response (self, response_timeout_secs, response, cancellable, error); } /******************************************************************************/ /******************************************************************************/ gboolean qfu_qdl_device_ufopen (QfuQdlDevice *self, QfuImage *image, GCancellable *cancellable, GError **error) { gssize reqlen; gssize rsplen; guint8 *rsp = NULL; reqlen = qfu_qdl_request_ufopen_build (self->priv->buffer->data, self->priv->buffer->len, image, cancellable, error); if (reqlen < 0) return FALSE; rsplen = send_receive (self, self->priv->buffer->data, reqlen, TRUE, 1, &rsp, cancellable, error); if (rsplen < 0) return FALSE; switch (rsp[0]) { case QFU_QDL_CMD_OPEN_UNFRAMED_RSP: return qfu_qdl_response_ufopen_parse (rsp, rsplen, error); case QFU_QDL_CMD_ERROR: return qfu_qdl_response_error_parse (rsp, rsplen, error); default: g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected response received in ufopen: 0x%02x (%s)", rsp[0], qfu_qdl_cmd_get_string (rsp[0]) ? qfu_qdl_cmd_get_string (rsp[0]) : "unknown"); return FALSE; } } /******************************************************************************/ gboolean qfu_qdl_device_ufwrite (QfuQdlDevice *self, QfuImage *image, guint16 sequence, GCancellable *cancellable, GError **error) { gssize reqlen; gssize rsplen; guint8 *rsp = NULL; guint16 ack_sequence = 0; reqlen = qfu_qdl_request_ufwrite_build (self->priv->buffer->data, self->priv->buffer->len, image, sequence, cancellable, error); if (reqlen < 0) return FALSE; /* NOTE: the last chunk will require a long timeout, so just define the * same one for all chunks */ rsplen = send_receive (self, self->priv->buffer->data, reqlen, FALSE, 120, &rsp, cancellable, error); if (rsplen < 0) return FALSE; switch (rsp[0]) { case QFU_QDL_CMD_WRITE_UNFRAMED_RSP: if (!qfu_qdl_response_ufwrite_parse (rsp, rsplen, &ack_sequence, error)) return FALSE; if (ack_sequence != sequence) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "received ack for chunk #%" G_GUINT16_FORMAT " instead of chunk #%" G_GUINT16_FORMAT, ack_sequence, sequence); return FALSE; } return TRUE; case QFU_QDL_CMD_ERROR: return qfu_qdl_response_error_parse (rsp, rsplen, error); default: g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected response received in ufwrite: 0x%02x (%s)", rsp[0], qfu_qdl_cmd_get_string (rsp[0]) ? qfu_qdl_cmd_get_string (rsp[0]) : "unknown"); return FALSE; } } /******************************************************************************/ gboolean qfu_qdl_device_ufclose (QfuQdlDevice *self, GCancellable *cancellable, GError **error) { gsize reqlen; gssize rsplen; guint8 *rsp = NULL; reqlen = qfu_qdl_request_ufclose_build (self->priv->buffer->data, self->priv->buffer->len); rsplen = send_receive (self, self->priv->buffer->data, reqlen, TRUE, 1, &rsp, cancellable, error); if (rsplen < 0) return FALSE; switch (rsp[0]) { case QFU_QDL_CMD_CLOSE_UNFRAMED_RSP: return qfu_qdl_response_ufclose_parse (rsp, rsplen, error); case QFU_QDL_CMD_ERROR: return qfu_qdl_response_error_parse (rsp, rsplen, error); default: g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected response received in ufclose: 0x%02x (%s)", rsp[0], qfu_qdl_cmd_get_string (rsp[0]) ? qfu_qdl_cmd_get_string (rsp[0]) : "unknown"); return FALSE; } } /******************************************************************************/ gboolean qfu_qdl_device_hello (QfuQdlDevice *self, GCancellable *cancellable, GError **error) { gsize reqlen; gssize rsplen; guint8 *rsp = NULL; g_assert (self->priv->qdl_version > 0); /* If no error, we assume version is found */ reqlen = qfu_qdl_request_hello_build (self->priv->buffer->data, self->priv->buffer->len, self->priv->qdl_version, self->priv->qdl_version); rsplen = send_receive (self, self->priv->buffer->data, reqlen, TRUE, 1, &rsp, cancellable, error); if (rsplen < 0) return FALSE; switch (rsp[0]) { case QFU_QDL_CMD_HELLO_RSP: return qfu_qdl_response_hello_parse (rsp, rsplen, error); case QFU_QDL_CMD_ERROR: return qfu_qdl_response_error_parse (rsp, rsplen, error); default: g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected response received in hello: 0x%02x (%s)", rsp[0], qfu_qdl_cmd_get_string (rsp[0]) ? qfu_qdl_cmd_get_string (rsp[0]) : "unknown"); return FALSE; } } /******************************************************************************/ gboolean qfu_qdl_device_reset (QfuQdlDevice *self, GCancellable *cancellable, GError **error) { gsize reqlen; gssize rsplen; if (self->priv->fd < 0) return TRUE; reqlen = qfu_qdl_request_reset_build (self->priv->buffer->data, self->priv->buffer->len); rsplen = send_receive (self, self->priv->buffer->data, reqlen, TRUE, 0, NULL, cancellable, error); /* Close device after a reset, even if we got an error */ close (self->priv->fd); self->priv->fd = -1; if (rsplen < 0) return FALSE; return TRUE; } /******************************************************************************/ static gboolean qdl_device_dload_sdp (QfuQdlDevice *self, GCancellable *cancellable, GError **error) { gsize reqlen; gssize rsplen; guint8 *rsp = NULL; reqlen = qfu_dload_request_sdp_build (self->priv->buffer->data, self->priv->buffer->len); rsplen = send_receive (self, self->priv->buffer->data, reqlen, TRUE, 1, &rsp, cancellable, error); if (rsplen < 0) return FALSE; switch (rsp[0]) { case QFU_DLOAD_CMD_ACK: return qfu_dload_response_ack_parse (rsp, rsplen, error); case QFU_QDL_CMD_ERROR: return qfu_qdl_response_error_parse (rsp, rsplen, error); default: g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected response received in dload sdp: 0x%02x", rsp[0]); return FALSE; } return TRUE; } static gboolean qdl_device_detect_version (QfuQdlDevice *self, GCancellable *cancellable, GError **error) { guint version; #define MAX_VALID_VERSION 6 /* Attempt to probe supported protocol version * Newer modems like Sierra Wireless MC7710 must use '6' for both fields * Gobi2000 modems like HP un2420 must use '5' for both fields * Gobi1000 modems must use '4' for both fields */ for (version = 4; version <= MAX_VALID_VERSION; version++) { gsize reqlen; gssize rsplen; guint8 *rsp = NULL; /* If no error, we assume version is found */ reqlen = qfu_qdl_request_hello_build (self->priv->buffer->data, self->priv->buffer->len, version, version); rsplen = send_receive (self, self->priv->buffer->data, reqlen, TRUE, 1, &rsp, cancellable, error); if (rsplen < 0) return FALSE; /* Break right away on a successful parse, so that we finish with the * correct version tested */ if (qfu_qdl_response_hello_parse (rsp, rsplen, NULL)) break; } if (version > MAX_VALID_VERSION) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't detect QDL version"); return FALSE; } g_debug ("[qfu-qdl-device] QDL version detected: %u", version); self->priv->qdl_version = version; return TRUE; } static gboolean initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { QfuQdlDevice *self; struct termios terminal_data; gchar *path = NULL; GError *inner_error = NULL; self = QFU_QDL_DEVICE (initable); if (g_cancellable_set_error_if_cancelled (cancellable, &inner_error)) goto out; path = g_file_get_path (self->priv->file); g_debug ("[qfu-qdl-device] opening TTY: %s", path); self->priv->fd = open (path, O_RDWR | O_NOCTTY); if (self->priv->fd < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error opening serial device: %s", g_strerror (errno)); goto out; } g_debug ("[qfu-qdl-device] setting terminal in raw mode..."); if (tcgetattr (self->priv->fd, &terminal_data) < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error getting serial port attributes: %s", g_strerror (errno)); goto out; } cfmakeraw (&terminal_data); if (tcsetattr (self->priv->fd, TCSANOW, &terminal_data) < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error setting serial port attributes: %s", g_strerror (errno)); goto out; } if (!qdl_device_dload_sdp (self, cancellable, &inner_error)) { if (!g_error_matches (inner_error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) goto out; g_debug ("[qfu-qdl-device] error (ignored): DLOAD SDP not supported"); g_clear_error (&inner_error); } if (!qdl_device_detect_version (self, cancellable, &inner_error)) goto out; out: g_free (path); if (inner_error) { if (!(self->priv->fd < 0)) { close (self->priv->fd); self->priv->fd = -1; } g_propagate_error (error, inner_error); return FALSE; } return TRUE; } /******************************************************************************/ QfuQdlDevice * qfu_qdl_device_new (GFile *file, GCancellable *cancellable, GError **error) { g_return_val_if_fail (G_IS_FILE (file), NULL); return QFU_QDL_DEVICE (g_initable_new (QFU_TYPE_QDL_DEVICE, cancellable, error, "file", file, NULL)); } static void qfu_qdl_device_init (QfuQdlDevice *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_QDL_DEVICE, QfuQdlDevicePrivate); self->priv->fd = -1; /* Long buffer for I/O */ self->priv->buffer = g_byte_array_new (); g_byte_array_set_size (self->priv->buffer, QFU_QDL_MESSAGE_MAX_SIZE); /* Shorter secondary buffer for framing/unframing */ self->priv->secondary_buffer = g_byte_array_new (); g_byte_array_set_size (self->priv->secondary_buffer, SECONDARY_BUFFER_DEFAULT_SIZE); } static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { QfuQdlDevice *self = QFU_QDL_DEVICE (object); switch (prop_id) { case PROP_FILE: self->priv->file = g_value_dup_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QfuQdlDevice *self = QFU_QDL_DEVICE (object); switch (prop_id) { case PROP_FILE: g_value_set_object (value, self->priv->file); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void dispose (GObject *object) { QfuQdlDevice *self = QFU_QDL_DEVICE (object); if (!(self->priv->fd < 0)) { close (self->priv->fd); self->priv->fd = -1; } g_clear_pointer (&self->priv->buffer, g_byte_array_unref); g_clear_pointer (&self->priv->secondary_buffer, g_byte_array_unref); g_clear_object (&self->priv->file); G_OBJECT_CLASS (qfu_qdl_device_parent_class)->dispose (object); } static void initable_iface_init (GInitableIface *iface) { iface->init = initable_init; } static void qfu_qdl_device_class_init (QfuQdlDeviceClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuQdlDevicePrivate)); object_class->dispose = dispose; object_class->get_property = get_property; object_class->set_property = set_property; properties[PROP_FILE] = g_param_spec_object ("file", "File", "File object", G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_FILE, properties[PROP_FILE]); } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-qdl-device.h000066400000000000000000000066441455567757300233230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_QDL_DEVICE_H #define QFU_QDL_DEVICE_H #include #include G_BEGIN_DECLS #define QFU_TYPE_QDL_DEVICE (qfu_qdl_device_get_type ()) #define QFU_QDL_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_QDL_DEVICE, QfuQdlDevice)) #define QFU_QDL_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_QDL_DEVICE, QfuQdlDeviceClass)) #define QFU_IS_QDL_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_QDL_DEVICE)) #define QFU_IS_QDL_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_QDL_DEVICE)) #define QFU_QDL_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_QDL_DEVICE, QfuQdlDeviceClass)) typedef struct _QfuQdlDevice QfuQdlDevice; typedef struct _QfuQdlDeviceClass QfuQdlDeviceClass; typedef struct _QfuQdlDevicePrivate QfuQdlDevicePrivate; struct _QfuQdlDevice { GObject parent; QfuQdlDevicePrivate *priv; }; struct _QfuQdlDeviceClass { GObjectClass parent; }; GType qfu_qdl_device_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuQdlDevice, g_object_unref); QfuQdlDevice *qfu_qdl_device_new (GFile *file, GCancellable *cancellable, GError **error); gboolean qfu_qdl_device_hello (QfuQdlDevice *self, GCancellable *cancellable, GError **error); gboolean qfu_qdl_device_ufopen (QfuQdlDevice *self, QfuImage *image, GCancellable *cancellable, GError **error); gboolean qfu_qdl_device_ufwrite (QfuQdlDevice *self, QfuImage *image, guint16 sequence, GCancellable *cancellable, GError **error); gboolean qfu_qdl_device_ufclose (QfuQdlDevice *self, GCancellable *cancellable, GError **error); gboolean qfu_qdl_device_reset (QfuQdlDevice *self, GCancellable *cancellable, GError **error); G_END_DECLS #endif /* QFU_QDL_DEVICE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-qdl-message.c000066400000000000000000000454771455567757300235120ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include "qfu-qdl-message.h" #include "qfu-utils.h" #include "qfu-enum-types.h" /******************************************************************************/ /* QDL generic */ /* Generic message for operations that just require the command id */ typedef struct _QdlMsg QdlMsg; struct _QdlMsg { guint8 cmd; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlMsg) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); static gsize qdl_message_generic_build (guint8 *buffer, gsize buffer_len, QfuQdlCmd cmd) { QdlMsg *req; g_assert (buffer_len >= sizeof (QdlMsg)); /* Create request */ req = (QdlMsg *) buffer; req->cmd = (guint8) cmd; g_debug ("[qfu,qdl-message] sent %s:", qfu_qdl_cmd_get_string ((QfuQdlCmd) req->cmd)); return (sizeof (QdlMsg)); } /******************************************************************************/ /* QDL Hello */ /* feature bits */ #define QDL_FEATURE_GENERIC_UNFRAMED 0x10 #define QDL_FEATURE_QDL_UNFRAMED 0x20 #define QDL_FEATURE_BAR_MODE 0x40 typedef struct _QdlHelloReq QdlHelloReq; struct _QdlHelloReq { guint8 cmd; /* 0x01 */ gchar magic[32]; guint8 maxver; guint8 minver; guint8 features; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlHelloReq) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); gsize qfu_qdl_request_hello_build (guint8 *buffer, gsize buffer_len, guint8 minver, guint8 maxver) { static const QdlHelloReq common_hello_req = { .cmd = QFU_QDL_CMD_HELLO_REQ, .magic = { "QCOM high speed protocol hst" }, .maxver = 0, .minver = 0, .features = QDL_FEATURE_QDL_UNFRAMED | QDL_FEATURE_GENERIC_UNFRAMED, }; QdlHelloReq *req; g_assert (buffer_len >= sizeof (QdlHelloReq)); /* Create request */ req = (QdlHelloReq *) buffer; memcpy (req, &common_hello_req, sizeof (QdlHelloReq)); req->minver = minver; req->maxver = maxver; g_debug ("[qfu,qdl-message] sent %s:", qfu_qdl_cmd_get_string ((QfuQdlCmd) req->cmd)); g_debug ("[qfu,qdl-message] magic: %.*s", req->maxver <= 5 ? 24 : 32, req->magic); g_debug ("[qfu,qdl-message] maximum version: %u", req->maxver); g_debug ("[qfu,qdl-message] minimum version: %u", req->minver); g_debug ("[qfu,qdl-message] features: 0x%02x", req->features); return (sizeof (QdlHelloReq)); } typedef struct _QdlHelloRsp QdlHelloRsp; struct _QdlHelloRsp { guint8 cmd; /* 0x02 */ gchar magic[32]; guint8 maxver; guint8 minver; guint32 reserved1; guint32 reserved2; guint8 reserved3; guint16 reserved4; guint16 reserved5; guint8 features; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlHelloRsp) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); gboolean qfu_qdl_response_hello_parse (const guint8 *buffer, gsize buffer_len, GError **error) { QdlHelloRsp *rsp; if (buffer_len != sizeof (QdlHelloRsp)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (QdlHelloRsp)); return FALSE; } rsp = (QdlHelloRsp *) buffer; g_assert (rsp->cmd == QFU_QDL_CMD_HELLO_RSP); g_debug ("[qfu,qdl-message] received %s:", qfu_qdl_cmd_get_string ((QfuQdlCmd) rsp->cmd)); g_debug ("[qfu,qdl-message] magic: %.*s", rsp->maxver <= 5 ? 24 : 32, rsp->magic); g_debug ("[qfu,qdl-message] maximum version: %u", rsp->maxver); g_debug ("[qfu,qdl-message] minimum version: %u", rsp->minver); g_debug ("[qfu,qdl-message] features: 0x%02x", rsp->features); /* For now, ignore fields */ return TRUE; } /******************************************************************************/ /* QDL Error */ typedef enum { QDL_ERROR_NONE = 0x00, QDL_ERROR_01_RESERVED = 0x01, QDL_ERROR_BAD_ADDR = 0x02, QDL_ERROR_BAD_LEN = 0x03, QDL_ERROR_BAD_PACKET = 0x04, QDL_ERROR_BAD_CMD = 0x05, QDL_ERROR_06 = 0x06, QDL_ERROR_OP_FAILED = 0x07, QDL_ERROR_BAD_FLASH_ID = 0x08, QDL_ERROR_BAD_VOLTAGE = 0x09, QDL_ERROR_WRITE_FAILED = 0x0a, QDL_ERROR_11_RESERVED = 0x0b, QDL_ERROR_BAD_SPC = 0x0c, QDL_ERROR_POWERDOWN = 0x0d, QDL_ERROR_UNSUPPORTED = 0x0e, QDL_ERROR_CMD_SEQ = 0x0f, QDL_ERROR_CLOSE = 0x10, QDL_ERROR_BAD_FEATURES = 0x11, QDL_ERROR_SPACE = 0x12, QDL_ERROR_BAD_SECURITY = 0x13, QDL_ERROR_MULTI_UNSUPPORTED = 0x14, QDL_ERROR_POWEROFF = 0x15, QDL_ERROR_CMD_UNSUPPORTED = 0x16, QDL_ERROR_BAD_CRC = 0x17, QDL_ERROR_STATE = 0x18, QDL_ERROR_TIMEOUT = 0x19, QDL_ERROR_IMAGE_AUTH = 0x1a, QDL_ERROR_LAST } QdlError; static const gchar *qdl_error_str[] = { [QDL_ERROR_NONE ] = "None", [QDL_ERROR_01_RESERVED ] = "Reserved", [QDL_ERROR_BAD_ADDR ] = "Invalid destination address", [QDL_ERROR_BAD_LEN ] = "Invalid length", [QDL_ERROR_BAD_PACKET ] = "Unexpected end of packet", [QDL_ERROR_BAD_CMD ] = "Invalid command", [QDL_ERROR_06 ] = "Reserved", [QDL_ERROR_OP_FAILED ] = "Operation failed", [QDL_ERROR_BAD_FLASH_ID ] = "Invalid flash intelligent ID", [QDL_ERROR_BAD_VOLTAGE ] = "Invalid programming voltage", [QDL_ERROR_WRITE_FAILED ] = "Write verify failed", [QDL_ERROR_11_RESERVED ] = "Reserved", [QDL_ERROR_BAD_SPC ] = "Invalid security code", [QDL_ERROR_POWERDOWN ] = "Power-down failed", [QDL_ERROR_UNSUPPORTED ] = "NAND flash programming not supported", [QDL_ERROR_CMD_SEQ ] = "Command out of sequence", [QDL_ERROR_CLOSE ] = "Close failed", [QDL_ERROR_BAD_FEATURES ] = "Invalid feature bits", [QDL_ERROR_SPACE ] = "Out of space", [QDL_ERROR_BAD_SECURITY ] = "Invalid security mode", [QDL_ERROR_MULTI_UNSUPPORTED ] = "Multi-image NAND not supported", [QDL_ERROR_POWEROFF ] = "Power-off command not supported", [QDL_ERROR_CMD_UNSUPPORTED ] = "Command not supported", [QDL_ERROR_BAD_CRC ] = "Invalid CRC", [QDL_ERROR_STATE ] = "Command received in invalid state", [QDL_ERROR_TIMEOUT ] = "Receive timeout", [QDL_ERROR_IMAGE_AUTH ] = "Image authentication error", }; G_STATIC_ASSERT (G_N_ELEMENTS (qdl_error_str) == QDL_ERROR_LAST); static GIOErrorEnum qdl_error_to_gio_error_enum (QdlError err) { if (err == QDL_ERROR_CMD_UNSUPPORTED) return G_IO_ERROR_NOT_SUPPORTED; return G_IO_ERROR_FAILED; } static const gchar * qdl_error_to_string (QdlError err) { return (err < QDL_ERROR_LAST ? qdl_error_str[err] : "Unknown"); } typedef struct _QdlErrRsp QdlErrRsp; struct _QdlErrRsp { guint8 cmd; /* 0x0d */ guint32 error; guint8 errortxt; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlErrRsp) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); gboolean qfu_qdl_response_error_parse (const guint8 *buffer, gsize buffer_len, GError **error) { QdlErrRsp *rsp; if (buffer_len != sizeof (QdlErrRsp)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (QdlErrRsp)); return FALSE; } rsp = (QdlErrRsp *) buffer; g_assert (rsp->cmd == QFU_QDL_CMD_ERROR); g_debug ("[qfu,qdl-message] received %s", qfu_qdl_cmd_get_string ((QfuQdlCmd) rsp->cmd)); g_debug ("[qfu,qdl-message] error: %" G_GUINT32_FORMAT, GUINT32_FROM_LE (rsp->error)); g_debug ("[qfu,qdl-message] errortxt: %u", rsp->errortxt); /* Always return an error in this case */ g_set_error (error, G_IO_ERROR, qdl_error_to_gio_error_enum (GUINT32_FROM_LE (rsp->error)), "%s", qdl_error_to_string ((QdlError) GUINT32_FROM_LE (rsp->error))); return FALSE; } /******************************************************************************/ /* QDL Ufopen */ typedef struct _QdlUfopenReq QdlUfopenReq; struct _QdlUfopenReq { guint8 cmd; /* 0x25 */ guint8 type; guint32 length; guint8 windowsize; guint32 chunksize; guint16 reserved; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlUfopenReq) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); gssize qfu_qdl_request_ufopen_build (guint8 *buffer, gsize buffer_len, QfuImage *image, GCancellable *cancellable, GError **error) { QdlUfopenReq *req; g_assert (buffer_len >= sizeof (QdlUfopenReq)); /* Create request */ req = (QdlUfopenReq *) buffer; memset (req, 0, sizeof (QdlUfopenReq)); req->cmd = QFU_QDL_CMD_OPEN_UNFRAMED_REQ; req->type = (guint8) qfu_image_get_image_type (image); req->windowsize = 1; /* snooped */ req->length = GUINT32_TO_LE (qfu_image_get_header_size (image) + qfu_image_get_data_size (image)); req->chunksize = GUINT32_TO_LE (qfu_image_get_data_size (image)); /* Append header */ if (qfu_image_read_header (image, buffer + sizeof (QdlUfopenReq), buffer_len - sizeof (QdlUfopenReq), cancellable, error) < 0) { g_prefix_error (error, "couldn't read image header: "); return -1; } g_debug ("[qfu,qdl-message] sent %s:", qfu_qdl_cmd_get_string ((QfuQdlCmd) req->cmd)); g_debug ("[qfu,qdl-message] type: %u", req->type); g_debug ("[qfu,qdl-message] length: %" G_GUINT32_FORMAT, GUINT32_FROM_LE (req->length)); g_debug ("[qfu,qdl-message] window size: %u", req->windowsize); g_debug ("[qfu,qdl-message] chunk size: %" G_GUINT32_FORMAT, GUINT32_FROM_LE (req->chunksize)); return (sizeof (QdlUfopenReq) + qfu_image_get_header_size (image)); } typedef struct _QdlUfopenRsp QdlUfopenRsp; struct _QdlUfopenRsp { guint8 cmd; /* 0x26 */ guint16 status; guint8 windowsize; guint32 chunksize; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlUfopenRsp) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); gboolean qfu_qdl_response_ufopen_parse (const guint8 *buffer, gsize buffer_len, GError **error) { QdlUfopenRsp *rsp; if (buffer_len != sizeof (QdlUfopenRsp)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (QdlUfopenRsp)); return FALSE; } rsp = (QdlUfopenRsp *) buffer; g_assert (rsp->cmd == QFU_QDL_CMD_OPEN_UNFRAMED_RSP); g_debug ("[qfu,qdl-message] received %s", qfu_qdl_cmd_get_string ((QfuQdlCmd) rsp->cmd)); g_debug ("[qfu,qdl-message] status: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (rsp->status)); g_debug ("[qfu,qdl-message] window size: %u", rsp->windowsize); g_debug ("[qfu,qdl-message] chunk size: %" G_GUINT32_FORMAT, GUINT32_FROM_LE (rsp->chunksize)); /* For now, ignore all fields but build a GError based on status */ /* Return error if status != 0 */ if (rsp->status != 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "operation returned an error status: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (rsp->status)); return FALSE; } return TRUE; } /******************************************************************************/ /* QDL Ufwrite */ /* This request is not HDLC framed, so this "header" includes the crc */ typedef struct _QdlUfwriteReq QdlUfwriteReq; struct _QdlUfwriteReq { guint8 cmd; /* 0x27 */ guint16 sequence; guint32 reserved; guint32 chunksize; guint16 crc; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlUfwriteReq) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); gssize qfu_qdl_request_ufwrite_build (guint8 *buffer, gsize buffer_len, QfuImage *image, guint16 sequence, GCancellable *cancellable, GError **error) { QdlUfwriteReq *req; gssize n_read; g_assert (buffer_len >= sizeof (QdlUfwriteReq)); /* Append chunk */ n_read = qfu_image_read_data_chunk (image, sequence, buffer + sizeof (QdlUfwriteReq), buffer_len - sizeof (QdlUfwriteReq), cancellable, error); if (n_read < 0) { g_prefix_error (error, "couldn't read image chunk #%u: ", sequence); return -1; } /* Create request after appending, so that we have correct chunksize */ req = (QdlUfwriteReq *) buffer; memset (req, 0, sizeof (QdlUfwriteReq)); req->cmd = QFU_QDL_CMD_WRITE_UNFRAMED_REQ; req->sequence = GUINT16_TO_LE (sequence); req->reserved = 0; req->chunksize = GUINT32_TO_LE ((guint32) n_read); req->crc = GUINT16_TO_LE (qfu_utils_crc16 (buffer, sizeof (QdlUfwriteReq) - 2)); g_debug ("[qfu,qdl-message] sent %s:", qfu_qdl_cmd_get_string ((QfuQdlCmd) req->cmd)); g_debug ("[qfu,qdl-message] sequence: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (req->sequence)); g_debug ("[qfu,qdl-message] chunk size: %" G_GUINT32_FORMAT, GUINT32_FROM_LE (req->chunksize)); return (sizeof (QdlUfopenReq) + n_read); } /* The response is HDLC framed, so the crc is part of the framing */ typedef struct _QdlUfwriteRsp QdlUfwriteRsp; struct _QdlUfwriteRsp { guint8 cmd; /* 0x28 */ guint16 sequence; guint32 reserved; guint16 status; } __attribute__ ((packed)); G_STATIC_ASSERT (sizeof (QdlUfwriteRsp) <= QFU_QDL_MESSAGE_MAX_HEADER_SIZE); gboolean qfu_qdl_response_ufwrite_parse (const guint8 *buffer, gsize buffer_len, guint16 *sequence, GError **error) { QdlUfwriteRsp *rsp; if (buffer_len != sizeof (QdlUfwriteRsp)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (QdlUfwriteRsp)); return FALSE; } rsp = (QdlUfwriteRsp *) buffer; g_assert (rsp->cmd == QFU_QDL_CMD_WRITE_UNFRAMED_RSP); g_debug ("[qfu,qdl-message] received %s", qfu_qdl_cmd_get_string ((QfuQdlCmd) rsp->cmd)); g_debug ("[qfu,qdl-message] status: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (rsp->status)); g_debug ("[qfu,qdl-message] sequence: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (rsp->sequence)); /* Only return sequence and return GError based on status */ /* Return error if status != 0 */ if (rsp->status != 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "operation returned an error status: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (rsp->status)); return FALSE; } if (sequence) *sequence = GUINT16_FROM_LE (rsp->sequence); return TRUE; } /******************************************************************************/ /* QDL Ufclose */ gsize qfu_qdl_request_ufclose_build (guint8 *buffer, gsize buffer_len) { return qdl_message_generic_build (buffer, buffer_len, QFU_QDL_CMD_CLOSE_UNFRAMED_REQ); } typedef struct _QdlUfcloseRsp QdlUfcloseRsp; struct _QdlUfcloseRsp { guint8 cmd; /* 0x2a */ guint16 status; guint8 type; guint8 errortxt; } __attribute__ ((packed)); gboolean qfu_qdl_response_ufclose_parse (const guint8 *buffer, gsize buffer_len, GError **error) { QdlUfcloseRsp *rsp; if (buffer_len != sizeof (QdlUfcloseRsp)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (QdlUfcloseRsp)); return FALSE; } rsp = (QdlUfcloseRsp *) buffer; g_assert (rsp->cmd == QFU_QDL_CMD_CLOSE_UNFRAMED_RSP); g_debug ("[qfu,qdl-message] received %s", qfu_qdl_cmd_get_string ((QfuQdlCmd) rsp->cmd)); g_debug ("[qfu,qdl-message] status: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (rsp->status)); g_debug ("[qfu,qdl-message] type: %u", rsp->type); g_debug ("[qfu,qdl-message] errortxt: %u", rsp->errortxt); /* For now, ignore all fields but build a GError based on status */ /* Return error if status != 0 */ if (rsp->status != 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "operation returned an error status: %" G_GUINT16_FORMAT, GUINT16_FROM_LE (rsp->status)); return FALSE; } return TRUE; } /******************************************************************************/ /* QDL session close */ gsize qfu_qdl_request_reset_build (guint8 *buffer, gsize buffer_len) { return qdl_message_generic_build (buffer, buffer_len, QFU_QDL_CMD_RESET_REQ); } /******************************************************************************/ /* Other unused messages */ /* 0x29 - cmd only */ /* 0x2d - cmd only */ /* 0x2e - cmd only */ typedef struct _QdlImageprefRsp QdlImageprefRsp; struct _QdlImageprefRsp { guint8 cmd; /* 0x2f */ guint8 entries; struct { guint8 type; gchar id[16]; } image[]; } __attribute__ ((packed)); libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-qdl-message.h000066400000000000000000000105171455567757300235020ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_QDL_MESSAGE_H #define QFU_QDL_MESSAGE_H #include #include #include "qfu-image.h" G_BEGIN_DECLS /* Maximum QDL header size (i.e. without payload) */ #define QFU_QDL_MESSAGE_MAX_HEADER_SIZE 50 /* Maximum QDL message size (header and payload) */ #define QFU_QDL_MESSAGE_MAX_SIZE (QFU_QDL_MESSAGE_MAX_HEADER_SIZE + QFU_IMAGE_CHUNK_SIZE) /* from GobiAPI_1.0.40/Core/QDLEnum.h and * GobiAPI_1.0.40/Core/QDLBuffers.h with additional details from USB * snooping */ typedef enum { QFU_QDL_CMD_HELLO_REQ = 0x01, QFU_QDL_CMD_HELLO_RSP = 0x02, QFU_QDL_CMD_ERROR = 0x0d, QFU_QDL_CMD_OPEN_UNFRAMED_REQ = 0x25, QFU_QDL_CMD_OPEN_UNFRAMED_RSP = 0x26, QFU_QDL_CMD_WRITE_UNFRAMED_REQ = 0x27, QFU_QDL_CMD_WRITE_UNFRAMED_RSP = 0x28, QFU_QDL_CMD_CLOSE_UNFRAMED_REQ = 0x29, QFU_QDL_CMD_CLOSE_UNFRAMED_RSP = 0x2a, QFU_QDL_CMD_DOWNLOAD_REQ = 0x2b, QFU_QDL_CMD_RESET_REQ = 0x2d, QFU_QDL_CMD_GET_IMAGE_PREF_REQ = 0x2e, QFU_QDL_CMD_GET_IMAGE_PREF_RSP = 0x2f, } QfuQdlCmd; /* Request builders */ gsize qfu_qdl_request_hello_build (guint8 *buffer, gsize buffer_len, guint8 minver, guint8 maxver); gssize qfu_qdl_request_ufopen_build (guint8 *buffer, gsize buffer_len, QfuImage *image, GCancellable *cancellable, GError **error); gssize qfu_qdl_request_ufwrite_build (guint8 *buffer, gsize buffer_len, QfuImage *image, guint16 sequence, GCancellable *cancellable, GError **error); gsize qfu_qdl_request_ufclose_build (guint8 *buffer, gsize buffer_len); gsize qfu_qdl_request_reset_build (guint8 *buffer, gsize buffer_len); /* Response parsers */ gboolean qfu_qdl_response_hello_parse (const guint8 *buffer, gsize buffer_len, GError **error); gboolean qfu_qdl_response_error_parse (const guint8 *buffer, gsize buffer_len, GError **error); gboolean qfu_qdl_response_ufopen_parse (const guint8 *buffer, gsize buffer_len, GError **error); gboolean qfu_qdl_response_ufwrite_parse (const guint8 *buffer, gsize buffer_len, guint16 *sequence, GError **error); gboolean qfu_qdl_response_ufclose_parse (const guint8 *buffer, gsize buffer_len, GError **error); G_END_DECLS #endif /* QFU_QDL_MESSAGE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-reseter.c000066400000000000000000000343511455567757300227460ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include #include "qfu-reseter.h" #include "qfu-at-device.h" #include "qfu-utils.h" G_DEFINE_TYPE (QfuReseter, qfu_reseter, G_TYPE_OBJECT) struct _QfuReseterPrivate { QfuDeviceSelection *device_selection; QmiClientDms *qmi_client; QmiDeviceOpenFlags device_open_flags; }; /******************************************************************************/ /* Run */ #define MAX_RETRIES 2 typedef struct { /* Files to use */ GList *ttys; GFile *cdc_wdm; /* QMI client amd device */ QmiDevice *qmi_device; QmiClientDms *qmi_client; gboolean ignore_release_cid; /* List of AT devices */ GList *at_devices; GList *current; /* Retries */ guint retries; } RunContext; static void run_context_free (RunContext *ctx) { if (ctx->cdc_wdm) g_object_unref (ctx->cdc_wdm); if (ctx->qmi_client) { g_assert (ctx->qmi_device); qmi_device_release_client (ctx->qmi_device, QMI_CLIENT (ctx->qmi_client), (ctx->ignore_release_cid ? QMI_DEVICE_RELEASE_CLIENT_FLAGS_NONE : QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID), 10, NULL, NULL, NULL); g_object_unref (ctx->qmi_client); } if (ctx->qmi_device) { qmi_device_close_async (ctx->qmi_device, 10, NULL, NULL, NULL); g_object_unref (ctx->qmi_device); } g_list_free_full (ctx->ttys, g_object_unref); g_list_free_full (ctx->at_devices, g_object_unref); g_slice_free (RunContext, ctx); } gboolean qfu_reseter_run_finish (QfuReseter *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void run_context_step_at (GTask *task); static gboolean run_context_step_at_cb (GTask *task) { run_context_step_at (task); return FALSE; } static void run_context_step_at_next (GTask *task) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); ctx->current = g_list_next (ctx->current); if (!ctx->current) { if (!ctx->retries) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't run reset operation"); g_object_unref (task); return; } /* Launch retry with the first device */ ctx->retries--; ctx->current = ctx->at_devices; } /* Schedule next step in an idle */ g_idle_add ((GSourceFunc) run_context_step_at_cb, task); } static gint device_sort_by_name_reversed (QfuAtDevice *a, QfuAtDevice *b) { return strcmp (qfu_at_device_get_name (b), qfu_at_device_get_name (a)); } static void run_context_step_at (GTask *task) { RunContext *ctx; QfuAtDevice *at_device; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); /* If we get to AT reset after trying QMI, and we didn't find any port to * use, return error */ if (!ctx->ttys) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, "No devices found to run reset operation"); g_object_unref (task); return; } /* Initialize AT devices the first time we get here */ if (!ctx->at_devices) { GList *l; for (l = ctx->ttys; l; l = g_list_next (l)) { at_device = qfu_at_device_new (G_FILE (l->data), g_task_get_cancellable (task), &error); if (!at_device) { g_task_return_error (task, error); g_object_unref (task); return; } ctx->at_devices = g_list_append (ctx->at_devices, at_device); } /* Sort by filename reversed; usually the TTY with biggest number is a * good AT port */ ctx->at_devices = g_list_sort (ctx->at_devices, (GCompareFunc) device_sort_by_name_reversed); /* Select first TTY to start */ ctx->current = ctx->at_devices; } else g_assert (ctx->current); at_device = QFU_AT_DEVICE (ctx->current->data); if (!qfu_at_device_boothold (at_device, g_task_get_cancellable (task), &error)) { g_debug ("[qfu-reseter] error: %s", error->message); g_error_free (error); run_context_step_at_next (task); return; } /* Success! */ g_debug ("[qfu-reseter] successfully run 'at boothold' operation"); ctx->ignore_release_cid = TRUE; g_task_return_boolean (task, TRUE); g_object_unref (task); } static void power_cycle_ready (QmiClientDms *qmi_client, GAsyncResult *res, GTask *task) { GError *error = NULL; RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); if (!qfu_utils_power_cycle_finish (qmi_client, res, &error)) { g_debug ("[qfu-reseter] error: couldn't power cycle: %s", error->message); g_error_free (error); g_debug ("[qfu-reseter] skipping QMI-based boothold"); run_context_step_at (task); return; } g_debug ("[qfu-reseter] reset requested successfully..."); ctx->ignore_release_cid = TRUE; g_task_return_boolean (task, TRUE); g_object_unref (task); } static void set_boot_image_download_mode_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { QmiMessageDmsSetBootImageDownloadModeOutput *output; GError *error = NULL; RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); output = qmi_client_dms_set_boot_image_download_mode_finish (client, res, &error); if (!output || !qmi_message_dms_set_boot_image_download_mode_output_get_result (output, &error)) { g_debug ("[qfu-reseter] error: couldn't run 'set boot image download mode' operation: %s", error->message); g_error_free (error); if (output) qmi_message_dms_set_boot_image_download_mode_output_unref (output); g_debug ("[qfu-reseter] skipping QMI-based boothold"); run_context_step_at (task); return; } qmi_message_dms_set_boot_image_download_mode_output_unref (output); g_debug ("[qfu-reseter] successfully run 'set boot image download mode' operation"); qfu_utils_power_cycle (ctx->qmi_client, g_task_get_cancellable (task), (GAsyncReadyCallback) power_cycle_ready, task); } static void run_context_step_qmi_boot_image_download_mode (GTask *task) { RunContext *ctx; QfuReseter *self; QmiMessageDmsSetBootImageDownloadModeInput *input; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); g_assert (ctx->qmi_client || self->priv->qmi_client); /* Try DMS 0x0050 */ input = qmi_message_dms_set_boot_image_download_mode_input_new (); qmi_message_dms_set_boot_image_download_mode_input_set_mode (input, QMI_DMS_BOOT_IMAGE_DOWNLOAD_MODE_BOOT_AND_RECOVERY, NULL); qmi_client_dms_set_boot_image_download_mode (self->priv->qmi_client ? self->priv->qmi_client : ctx->qmi_client, input, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) set_boot_image_download_mode_ready, task); qmi_message_dms_set_boot_image_download_mode_input_unref (input); } static void set_firmware_id_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { QmiMessageDmsSetFirmwareIdOutput *output; GError *error = NULL; RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); output = qmi_client_dms_set_firmware_id_finish (client, res, &error); if (!output || !qmi_message_dms_set_firmware_id_output_get_result (output, &error)) { g_debug ("[qfu-reseter] error: couldn't run 'set firmware id' operation: %s", error->message); g_error_free (error); if (output) qmi_message_dms_set_firmware_id_output_unref (output); g_debug ("[qfu-reseter] trying boot image download mode..."); run_context_step_qmi_boot_image_download_mode (task); return; } qmi_message_dms_set_firmware_id_output_unref (output); g_debug ("[qfu-reseter] successfully run 'set firmware id' operation"); ctx->ignore_release_cid = TRUE; g_task_return_boolean (task, TRUE); g_object_unref (task); } static void run_context_step_qmi_firmware_id (GTask *task) { RunContext *ctx; QfuReseter *self; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); g_assert (ctx->qmi_client || self->priv->qmi_client); /* Run DMS 0x003e to power cycle in boot & hold mode */ qmi_client_dms_set_firmware_id (self->priv->qmi_client ? self->priv->qmi_client : ctx->qmi_client, NULL, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) set_firmware_id_ready, task); } static void new_client_dms_ready (gpointer unused, GAsyncResult *res, GTask *task) { RunContext *ctx; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); if (!qfu_utils_new_client_dms_finish (res, &ctx->qmi_device, &ctx->qmi_client, NULL, NULL, NULL, NULL, NULL, NULL, &error)) { /* Jump to AT-based boothold */ g_debug ("[qfu-reseter] error: couldn't allocate QMI client: %s", error->message); g_error_free (error); g_debug ("[qfu-reseter] skipping QMI-based boothold"); run_context_step_at (task); return; } run_context_step_qmi_firmware_id (task); } void qfu_reseter_run (QfuReseter *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { RunContext *ctx; GTask *task; ctx = g_slice_new0 (RunContext); ctx->retries = MAX_RETRIES; task = g_task_new (self, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify) run_context_free); /* List devices to use */ if (!self->priv->qmi_client) ctx->cdc_wdm = qfu_device_selection_get_single_cdc_wdm (self->priv->device_selection); ctx->ttys = qfu_device_selection_get_multiple_ttys (self->priv->device_selection, QFU_HELPERS_DEVICE_MODE_MODEM); if (!ctx->ttys && !ctx->cdc_wdm && !self->priv->qmi_client) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, "No devices found to run reset operation"); g_object_unref (task); return; } /* If no cdc-wdm file available, try AT directly */ if (!ctx->cdc_wdm && !self->priv->qmi_client) { run_context_step_at (task); return; } /* If we already got a QMI client as input, try QMI directly */ if (self->priv->qmi_client) { run_context_step_qmi_firmware_id (task); return; } /* Otherwise, try to allocate a QMI client */ g_assert (ctx->cdc_wdm); qfu_utils_new_client_dms (ctx->cdc_wdm, 3, self->priv->device_open_flags, FALSE, cancellable, (GAsyncReadyCallback) new_client_dms_ready, task); } /******************************************************************************/ QfuReseter * qfu_reseter_new (QfuDeviceSelection *device_selection, QmiClientDms *qmi_client, QmiDeviceOpenFlags device_open_flags) { QfuReseter *self; self = g_object_new (QFU_TYPE_RESETER, NULL); self->priv->device_selection = g_object_ref (device_selection); self->priv->qmi_client = qmi_client ? g_object_ref (qmi_client) : NULL; self->priv->device_open_flags = device_open_flags; return self; } static void qfu_reseter_init (QfuReseter *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_RESETER, QfuReseterPrivate); } static void dispose (GObject *object) { QfuReseter *self = QFU_RESETER (object); g_clear_object (&self->priv->device_selection); g_clear_object (&self->priv->qmi_client); G_OBJECT_CLASS (qfu_reseter_parent_class)->dispose (object); } static void qfu_reseter_class_init (QfuReseterClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuReseterPrivate)); object_class->dispose = dispose; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-reseter.h000066400000000000000000000053461455567757300227550ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_RESETER_H #define QFU_RESETER_H #include #include #include #include "qfu-device-selection.h" G_BEGIN_DECLS #define QFU_TYPE_RESETER (qfu_reseter_get_type ()) #define QFU_RESETER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_RESETER, QfuReseter)) #define QFU_RESETER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_RESETER, QfuReseterClass)) #define QFU_IS_RESETER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_RESETER)) #define QFU_IS_RESETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_RESETER)) #define QFU_RESETER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_RESETER, QfuReseterClass)) typedef struct _QfuReseter QfuReseter; typedef struct _QfuReseterClass QfuReseterClass; typedef struct _QfuReseterPrivate QfuReseterPrivate; struct _QfuReseter { GObject parent; QfuReseterPrivate *priv; }; struct _QfuReseterClass { GObjectClass parent; }; GType qfu_reseter_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuReseter, g_object_unref); QfuReseter *qfu_reseter_new (QfuDeviceSelection *device_selection, QmiClientDms *qmi_client, QmiDeviceOpenFlags device_open_flags); void qfu_reseter_run (QfuReseter *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qfu_reseter_run_finish (QfuReseter *self, GAsyncResult *res, GError **error); G_END_DECLS #endif /* QFU_RESETER_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-sahara-device.c000066400000000000000000001422461455567757300237740ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Qfu-firmware-update -- Command line tool to update firmware in QFU devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Zodiac Inflight Innovations * Copyright (C) 2019 Aleksander Morgado */ #include #include #include #include #include #include #include #include #include #include "qfu-log.h" #include "qfu-firehose-message.h" #include "qfu-sahara-message.h" #include "qfu-sahara-device.h" #include "qfu-utils.h" #include "qfu-enum-types.h" static void initable_iface_init (GInitableIface *iface); G_DEFINE_TYPE_EXTENDED (QfuSaharaDevice, qfu_sahara_device, G_TYPE_OBJECT, 0, G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init)) enum { PROP_0, PROP_FILE, PROP_LAST }; static GParamSpec *properties[PROP_LAST]; #define DEFAULT_SECTOR_SIZE_IN_BYTES 4096 #define DEFAULT_PAGES_IN_BLOCK 64 #define MAX_PRINTABLE_SIZE 80 struct _QfuSaharaDevicePrivate { GFile *file; gint fd; GByteArray *buffer; /* target and transfer settings */ guint max_payload_size_to_target_in_bytes; guint sector_size_in_bytes; guint pages_in_block; /* computed from settings */ guint transfer_block_size; /* number of images setup */ guint n_setup_images; }; /******************************************************************************/ /* Split response into multiple XML messages */ #define XML_START_TAG "len == 0) { g_ptr_array_free (xml_docs, TRUE); return NULL; } g_ptr_array_add (xml_docs, NULL); return (gchar **) g_ptr_array_free (xml_docs, FALSE); } /******************************************************************************/ /* Send */ static gboolean send_request (QfuSaharaDevice *self, const guint8 *request, gsize request_size, GCancellable *cancellable, GError **error) { gssize wlen; fd_set wr; gint aux; struct timeval tv = { .tv_sec = 2, .tv_usec = 0, }; /* Wait for the fd to be writable and don't wait forever */ FD_ZERO (&wr); FD_SET (self->priv->fd, &wr); aux = select (self->priv->fd + 1, NULL, &wr, NULL, &tv); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return FALSE; if (aux < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error waiting to write: %s", g_strerror (errno)); return FALSE; } if (aux == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "timed out waiting to write"); return FALSE; } /* Debug output */ if (qfu_log_get_verbose ()) { gchar *printable; gsize printable_size = request_size; gboolean shorted = FALSE; if (printable_size > MAX_PRINTABLE_SIZE) { printable_size = MAX_PRINTABLE_SIZE; shorted = TRUE; } printable = qfu_utils_str_hex (request, printable_size, ':'); g_debug ("[qfu-sahara-device] >> %s%s [%" G_GSIZE_FORMAT "]", printable, shorted ? "..." : "", request_size); g_free (printable); if (strncmp ((const gchar *)request, XML_START_TAG, strlen (XML_START_TAG)) == 0) { printable = g_strdup ((const gchar *)request); g_strdelimit (printable, "\r\n", ' '); g_debug ("[qfu-sahara-device] >> %s", printable); g_free (printable); } } wlen = write (self->priv->fd, request, request_size); if (wlen < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error writting: %s", g_strerror (errno)); return FALSE; } /* We treat EINTR as an error, so we also treat as an error if not all bytes * were wlen */ if ((gsize)wlen != request_size) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error writing: only %" G_GSSIZE_FORMAT "/%" G_GSIZE_FORMAT " bytes written", wlen, request_size); return FALSE; } return TRUE; } /******************************************************************************/ /* Receive */ static gssize receive_response (QfuSaharaDevice *self, guint timeout_secs, guint8 **response, GCancellable *cancellable, GError **error) { fd_set rd; struct timeval tv; gint aux; gssize rlen; /* Use requested timeout */ tv.tv_sec = timeout_secs; tv.tv_usec = 0; FD_ZERO (&rd); FD_SET (self->priv->fd, &rd); aux = select (self->priv->fd + 1, &rd, NULL, NULL, &tv); if (g_cancellable_set_error_if_cancelled (cancellable, error)) return -1; if (aux < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "error waiting to read response: %s", g_strerror (errno)); return -1; } /* we may not always get a response, so just return 0 bytes read if we timeout */ if (aux == 0) return 0; /* Receive in the primary buffer * Always leave room for setting next byte as NUL. */ memset (self->priv->buffer->data, 0, self->priv->buffer->len); rlen = read (self->priv->fd, self->priv->buffer->data, self->priv->buffer->len - 1); if (rlen < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read response: %s", g_strerror (errno)); return -1; } if (rlen == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't read response: HUP detected"); return -1; } /* make sure that we can treat the response as a NUL-terminated string */ g_assert ((guint)rlen <= self->priv->buffer->len - 1); self->priv->buffer->data[rlen] = '\0'; /* Debug output */ if (qfu_log_get_verbose ()) { gchar *printable; gsize printable_size = rlen; gboolean shorted = FALSE; if (printable_size > MAX_PRINTABLE_SIZE) { printable_size = MAX_PRINTABLE_SIZE; shorted = TRUE; } printable = qfu_utils_str_hex (self->priv->buffer->data, printable_size, ':'); g_debug ("[qfu-sahara-device] << %s%s [%" G_GSIZE_FORMAT "]", printable, shorted ? "..." : "", rlen); g_free (printable); if (strncmp ((const gchar *)self->priv->buffer->data, XML_START_TAG, strlen (XML_START_TAG)) == 0) { printable = g_strdup ((const gchar *)self->priv->buffer->data); g_strdelimit (printable, "\r\n", ' '); g_debug ("[qfu-sahara-device] << %s", printable); g_free (printable); } } if (response) *response = self->priv->buffer->data; return rlen; } /******************************************************************************/ /* Send/receive */ static gssize send_receive (QfuSaharaDevice *self, const guint8 *request, gsize request_size, guint response_timeout_secs, guint8 **response, GCancellable *cancellable, GError **error) { gboolean sent; if (self->priv->fd < 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "device is closed"); return -1; } if (request_size > 0) { sent = send_request (self, request, request_size, cancellable, error); if (!sent) return -1; } if (!response) return 0; return receive_response (self, response_timeout_secs, response, cancellable, error); } /******************************************************************************/ /* Common firehose state machine */ static gboolean firehose_common_process_response_ack_message (const gchar *rsp, const gchar *expected_value, const gchar *expected_rawmode, GError **error) { gchar *value = NULL; gchar *rawmode = NULL; g_assert (expected_value); if (!qfu_firehose_message_parse_response_ack (rsp, &value, &rawmode)) return FALSE; if ((g_strcmp0 (value, expected_value) == 0) && (!expected_rawmode || (rawmode && g_strcmp0 (rawmode, expected_rawmode) == 0))) g_debug ("[qfu-sahara-device] firehose response received: value=%s, rawmode=%s", value, rawmode ? rawmode : "n/a"); else g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected firehose response received: value=%s, rawmode=%s", value, rawmode ? rawmode : "n/a"); g_free (value); g_free (rawmode); return TRUE; } static gboolean firehose_common_process_log_message (const gchar *rsp) { gchar *value = NULL; if (!qfu_firehose_message_parse_log (rsp, &value)) return FALSE; g_debug ("[qfu-sahara-device] firehose log: %s", value); g_free (value); return TRUE; } typedef const gchar * (* PrepareRequestCallback) (QfuSaharaDevice *self, gpointer user_data); typedef gboolean (* ProcessResponseCallback) (QfuSaharaDevice *self, const gchar *rsp, gpointer user_data, GError **error); typedef gboolean (* CheckCompletionCallback) (QfuSaharaDevice *self, gpointer user_data); typedef void (* InitRetryCallback) (QfuSaharaDevice *self, gpointer user_data); static gboolean firehose_operation_run (QfuSaharaDevice *self, PrepareRequestCallback prepare_request, ProcessResponseCallback process_response, CheckCompletionCallback check_completion, InitRetryCallback init_retry, guint max_retries, guint timeout_secs, gpointer user_data, GCancellable *cancellable, GError **error) { GTimer *timer; GError *inner_error = NULL; guint n_retries = 0; g_assert ((max_retries && init_retry) || (!max_retries && !init_retry)); g_debug ("[qfu-sahara-device] running firehose operation..."); timer = g_timer_new (); while (TRUE) { const gchar *req = NULL; gssize rsplen; guint8 *rsp = NULL; gchar **xmldocs; guint i; /* check timeout */ if (g_timer_elapsed (timer, NULL) > timeout_secs) { /* retry? */ if (max_retries && ++n_retries < max_retries) { g_timer_reset (timer); g_clear_error (&inner_error); init_retry (self, user_data); continue; } inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_TIMED_OUT, "operation timed out"); break; } /* check cancellation */ if (g_cancellable_is_cancelled (cancellable)) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_CANCELLED, "operation cancelled"); break; } /* user-provided callback to prepare request, may return NULL if there's nothing to send */ if (prepare_request) req = prepare_request (self, user_data); rsplen = send_receive (self, (const guint8 *)req, req ? strlen (req) : 0, 2, &rsp, cancellable, &inner_error); if (rsplen < 0) break; /* timed out without response received */ if (!rsplen) continue; /* we may receive multiple XML documents on a single read() */ xmldocs = split_xml_document ((const gchar *)rsp); for (i = 0; xmldocs && xmldocs[i] && !inner_error; i++) { /* user-provided callback to process response, may return FALSE and * an error if the operation is detected as failed */ process_response (self, xmldocs[i], user_data, &inner_error); } g_strfreev (xmldocs); if (inner_error) { /* retry? */ if (max_retries && ++n_retries < max_retries) { g_timer_reset (timer); g_clear_error (&inner_error); init_retry (self, user_data); continue; } break; } /* keep on operation? */ if (check_completion (self, user_data)) break; } g_timer_destroy (timer); if (inner_error) { g_debug ("[qfu-sahara-device] firehose operation failed: %s", inner_error->message); g_propagate_error (error, inner_error); return FALSE; } g_debug ("[qfu-sahara-device] firehose operation finished successfully"); return TRUE; } /******************************************************************************/ static gboolean validate_ascii_print (const guint8 *rsp, gsize rsplen) { guint i; for (i = 0; i < rsplen; i++) { if (!g_ascii_isprint (rsp[i])) return FALSE; } return TRUE; } /******************************************************************************/ /* Firehose setup download */ #define FIREHOSE_SETUP_DOWNLOAD_TIMEOUT_SECS 10 #define FIREHOSE_SETUP_DOWNLOAD_MAX_RETRIES 3 typedef struct { guint n_partition_sectors; gboolean sent; gboolean acked; } FirehoseSetupDownloadContext; static const gchar * firehose_setup_download_prepare_request (QfuSaharaDevice *self, FirehoseSetupDownloadContext *ctx) { if (!ctx->sent) { ctx->sent = TRUE; g_debug ("[qfu-sahara-device] sending firehose program request..."); qfu_firehose_message_build_program (self->priv->buffer->data, self->priv->buffer->len, self->priv->pages_in_block, self->priv->sector_size_in_bytes, ctx->n_partition_sectors); return (const gchar *)self->priv->buffer->data; } return NULL; } static gboolean firehose_setup_download_process_response (QfuSaharaDevice *self, const gchar *rsp, FirehoseSetupDownloadContext *ctx, GError **error) { GError *inner_error = NULL; if (firehose_common_process_log_message (rsp)) return TRUE; if (firehose_common_process_response_ack_message (rsp, "ACK", "true", &inner_error)) { if (inner_error) { g_propagate_error (error, inner_error); return FALSE; } ctx->acked = TRUE; return TRUE; } g_debug ("[qfu-sahara-device] unknown firehose message received"); return TRUE; } static gboolean firehose_setup_download_check_completion (QfuSaharaDevice *self, FirehoseSetupDownloadContext *ctx) { return (ctx->acked); } static void firehose_setup_download_init_retry (QfuSaharaDevice *self, FirehoseSetupDownloadContext *ctx) { /* no need to cleanup n_partition_sectors */ ctx->sent = FALSE; ctx->acked = FALSE; } gboolean qfu_sahara_device_firehose_setup_download (QfuSaharaDevice *self, QfuImage *image, guint *n_blocks, GCancellable *cancellable, GError **error) { FirehoseSetupDownloadContext ctx = { .n_partition_sectors = 0, .sent = FALSE, .acked = FALSE, }; goffset image_size; guint n_transfer_blocks; /* NOTE: the firmware download process in Windows sends an additional * configure message before the program request when the 2nd firmware * image is downloaded... but it really doesn't seem to be required * for anything, so we're explicitly avoiding that. Sending the * program request seems to be enough. */ /* compute how many sectors are required */ image_size = qfu_image_get_size (image); ctx.n_partition_sectors = image_size / self->priv->sector_size_in_bytes; if (image_size % self->priv->sector_size_in_bytes > 0) ctx.n_partition_sectors++; /* compute how many transfer block are required, and set them as output right away */ n_transfer_blocks = image_size / self->priv->transfer_block_size; if (image_size % self->priv->transfer_block_size > 0) n_transfer_blocks++; if (n_blocks) *n_blocks = n_transfer_blocks; g_debug ("Setting up firehose download for %" G_GOFFSET_FORMAT " bytes image...", image_size); g_debug (" pages in block: %u", self->priv->pages_in_block); g_debug (" sector size: %u", self->priv->sector_size_in_bytes); g_debug (" num partition sectors: %u", ctx.n_partition_sectors); g_debug (" transfer block size: %u (%u sectors/transfer)", self->priv->transfer_block_size, self->priv->transfer_block_size / self->priv->sector_size_in_bytes); g_debug (" num transfers: %u", n_transfer_blocks); return firehose_operation_run (self, (PrepareRequestCallback) firehose_setup_download_prepare_request, (ProcessResponseCallback) firehose_setup_download_process_response, (CheckCompletionCallback) firehose_setup_download_check_completion, (InitRetryCallback) firehose_setup_download_init_retry, FIREHOSE_SETUP_DOWNLOAD_MAX_RETRIES, FIREHOSE_SETUP_DOWNLOAD_TIMEOUT_SECS, &ctx, cancellable, error); } /******************************************************************************/ /* Firehose write block in raw mode */ #define END_OF_TRANSFER_BLOCK_SIZE 512 gboolean qfu_sahara_device_firehose_write_block (QfuSaharaDevice *self, QfuImage *image, guint block_i, GCancellable *cancellable, GError **error) { gssize reqlen; goffset offset; gsize size; gboolean send_last = FALSE; g_debug ("[qfu-sahara-device] writing block %u...", block_i); g_assert (self->priv->transfer_block_size < self->priv->buffer->len); memset (self->priv->buffer->data, 0, self->priv->transfer_block_size); offset = block_i * (goffset)self->priv->transfer_block_size; size = qfu_image_get_size (image) - offset; if (size >= self->priv->transfer_block_size) size = self->priv->transfer_block_size; else { gsize last_block_size; /* we need to send an additional packet full of 0s after the last * sector is transferred. */ send_last = TRUE; /* last transfer block adjusted to sector size multiple */ last_block_size = self->priv->sector_size_in_bytes; while (last_block_size < size) last_block_size += self->priv->sector_size_in_bytes; size = last_block_size; g_assert (size <= self->priv->transfer_block_size); } reqlen = qfu_image_read (image, offset, size, self->priv->buffer->data, self->priv->buffer->len, cancellable, error); if (reqlen < 0) { g_prefix_error (error, "couldn't read transfer block %u", block_i); return FALSE; } g_assert ((guint)reqlen <= self->priv->transfer_block_size); if (send_receive (self, self->priv->buffer->data, size, 0, NULL, cancellable, error) < 0) { g_prefix_error (error, "couldn't send transfer block %u", block_i); return FALSE; } if (send_last) { /* We're sending a last block to notify the end of the transmission, * which seems to be a reliable way to tell the modem that it shouldn't * expect more data. * * This block is full of 0s, but the modem seems to end up storing * it and leaving it to be processed once the image has been processed, * which will trigger a warning during the next firehose operation: * ERROR: XML not formed correctly. Expected a < character at loc 0 * And it will also fail the operation with a NAK... * * But, just retrying the operation (the program request for the next * file to download, or the reset if no more files to download) is enough * to make it work. */ memset (self->priv->buffer->data, 0, END_OF_TRANSFER_BLOCK_SIZE); if (send_receive (self, self->priv->buffer->data, END_OF_TRANSFER_BLOCK_SIZE, 0, NULL, cancellable, error) < 0) { g_prefix_error (error, "couldn't send last end-of-transfer block"); return FALSE; } } return TRUE; } /******************************************************************************/ /* Firehose teardown download */ #define FIREHOSE_TEARDOWN_DOWNLOAD_TIMEOUT_SECS 300 typedef struct { gboolean acked; } FirehoseTeardownDownloadContext; static gboolean firehose_teardown_download_process_response (QfuSaharaDevice *self, const gchar *rsp, FirehoseTeardownDownloadContext *ctx, GError **error) { GError *inner_error = NULL; if (firehose_common_process_log_message (rsp)) return TRUE; if (firehose_common_process_response_ack_message (rsp, "ACK", "false", &inner_error)) { /* We've seen in a EM7511 how the response to the download operation comes * followed *right away* in the same read() with the "XML not formed correctly" * warning plus an additional response with a NAK. In order to avoid failing * the teardown operation with that second response, we'll ignore it completely * if we have already detected a successful response earlier. */ if (ctx->acked) { g_debug ("[qfu-sahara-device] ignoring additional response message detected"); g_clear_error (&inner_error); return TRUE; } if (inner_error) { g_propagate_error (error, inner_error); return FALSE; } ctx->acked = TRUE; return TRUE; } g_debug ("[qfu-sahara-device] unknown firehose message received"); return TRUE; } static gboolean firehose_teardown_download_check_completion (QfuSaharaDevice *self, FirehoseTeardownDownloadContext *ctx) { return (ctx->acked); } gboolean qfu_sahara_device_firehose_teardown_download (QfuSaharaDevice *self, QfuImage *image, GCancellable *cancellable, GError **error) { FirehoseTeardownDownloadContext ctx = { .acked = FALSE, }; return firehose_operation_run (self, NULL, /* PrepareRequestCallback */ (ProcessResponseCallback) firehose_teardown_download_process_response, (CheckCompletionCallback) firehose_teardown_download_check_completion, NULL, /* InitRetryCallback */ 0, /* max_retries */ FIREHOSE_TEARDOWN_DOWNLOAD_TIMEOUT_SECS, &ctx, cancellable, error); } /******************************************************************************/ /* Firehose reset */ #define FIREHOSE_RESET_TIMEOUT_SECS 10 #define FIREHOSE_RESET_MAX_RETRIES 10 typedef struct { gboolean sent; gboolean acked; } FirehoseResetContext; static const gchar * firehose_reset_prepare_request (QfuSaharaDevice *self, FirehoseResetContext *ctx) { if (!ctx->sent) { ctx->sent = TRUE; g_debug ("[qfu-sahara-device] sending firehose reset..."); qfu_firehose_message_build_reset (self->priv->buffer->data, self->priv->buffer->len); return (const gchar *)self->priv->buffer->data; } return NULL; } static gboolean firehose_reset_process_response (QfuSaharaDevice *self, const gchar *rsp, FirehoseResetContext *ctx, GError **error) { GError *inner_error = NULL; if (firehose_common_process_log_message (rsp)) return TRUE; if (firehose_common_process_response_ack_message (rsp, "ACK", NULL, &inner_error)) { if (inner_error) { g_propagate_error (error, inner_error); return FALSE; } ctx->acked = TRUE; return TRUE; } g_debug ("[qfu-sahara-device] unknown firehose message received"); return TRUE; } static gboolean firehose_reset_check_completion (QfuSaharaDevice *self, FirehoseResetContext *ctx) { return (ctx->acked); } static void firehose_reset_init_retry (QfuSaharaDevice *self, FirehoseResetContext *ctx) { ctx->sent = FALSE; ctx->acked = FALSE; } gboolean qfu_sahara_device_firehose_reset (QfuSaharaDevice *self, GCancellable *cancellable, GError **error) { FirehoseResetContext ctx = { .sent = FALSE, .acked = FALSE, }; return firehose_operation_run (self, (PrepareRequestCallback) firehose_reset_prepare_request, (ProcessResponseCallback) firehose_reset_process_response, (CheckCompletionCallback) firehose_reset_check_completion, (InitRetryCallback) firehose_reset_init_retry, FIREHOSE_RESET_MAX_RETRIES, FIREHOSE_RESET_TIMEOUT_SECS, &ctx, cancellable, error); } /******************************************************************************/ /* Firehose initialization */ #define FIREHOSE_INIT_TIMEOUT_SECS 10 typedef enum { FIREHOSE_INIT_STEP_PING, FIREHOSE_INIT_STEP_WAIT_PING, FIREHOSE_INIT_STEP_CONFIGURE, FIREHOSE_INIT_STEP_WAIT_CONFIGURE, FIREHOSE_INIT_STEP_STORAGE_INFO, FIREHOSE_INIT_STEP_WAIT_STORAGE_INFO, FIREHOSE_INIT_STEP_LAST, } FirehoseInitStep; typedef struct { FirehoseInitStep step; guint max_payload_size_to_target_in_bytes; guint sector_size_in_bytes; guint pages_in_block; } FirehoseInitContext; static gboolean firehose_init_context_process_log_message (const gchar *rsp, FirehoseInitContext *ctx) { gchar *value = NULL; gchar **strv; if (!qfu_firehose_message_parse_log (rsp, &value)) return FALSE; /* The log message may contain specific settings that we want to read */ strv = g_strsplit (value, "=", -1); if (g_strv_length (strv) == 2) { g_strstrip (strv[0]); g_strstrip (strv[1]); if (g_ascii_strcasecmp (strv[0], "sector_size_in_bytes") == 0) ctx->sector_size_in_bytes = atoi (strv[1]); else if (g_ascii_strcasecmp (strv[0], "pages_in_block") == 0) ctx->pages_in_block = atoi (strv[1]); } g_strfreev (strv); g_debug ("[qfu-sahara-device] firehose log: %s", value); g_free (value); return TRUE; } static gboolean firehose_init_context_process_response_configure_message (const gchar *rsp, FirehoseInitContext *ctx, GError **error) { guint32 max_payload_size_to_target_in_bytes = 0; if (!qfu_firehose_message_parse_response_configure (rsp, &max_payload_size_to_target_in_bytes)) return FALSE; if (max_payload_size_to_target_in_bytes > 0) { g_debug ("[qfu-sahara-device] firehose requested max payload size: %u bytes", max_payload_size_to_target_in_bytes); ctx->max_payload_size_to_target_in_bytes = max_payload_size_to_target_in_bytes; } else { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected max payload size: %u", max_payload_size_to_target_in_bytes); } return TRUE; } static const gchar * firehose_init_prepare_request (QfuSaharaDevice *self, FirehoseInitContext *ctx) { switch (ctx->step) { case FIREHOSE_INIT_STEP_PING: g_debug ("[qfu-sahara-device] sending firehose ping..."); qfu_firehose_message_build_ping (self->priv->buffer->data, self->priv->buffer->len); ctx->step++; return (const gchar *)self->priv->buffer->data; case FIREHOSE_INIT_STEP_WAIT_PING: /* not sending anything, just processing responses */ return NULL; case FIREHOSE_INIT_STEP_CONFIGURE: g_debug ("[qfu-sahara-device] sending firehose configure..."); qfu_firehose_message_build_configure (self->priv->buffer->data, self->priv->buffer->len, 0); ctx->step++; return (const gchar *)self->priv->buffer->data; case FIREHOSE_INIT_STEP_WAIT_CONFIGURE: /* not sending anything, just processing responses */ return NULL; case FIREHOSE_INIT_STEP_STORAGE_INFO: g_debug ("[qfu-sahara-device] sending firehose storage info request..."); qfu_firehose_message_build_get_storage_info (self->priv->buffer->data, self->priv->buffer->len); ctx->step++; return (const gchar *)self->priv->buffer->data; case FIREHOSE_INIT_STEP_WAIT_STORAGE_INFO: /* not sending anything, just processing responses */ return NULL; case FIREHOSE_INIT_STEP_LAST: default: g_assert_not_reached (); return NULL; } } static gboolean firehose_init_process_response (QfuSaharaDevice *self, const gchar *rsp, FirehoseInitContext *ctx, GError **error) { GError *inner_error = NULL; if (firehose_init_context_process_log_message (rsp, ctx)) return TRUE; if (firehose_common_process_response_ack_message (rsp, "ACK", NULL, &inner_error)) { if (inner_error) { g_propagate_error (error, inner_error); return FALSE; } /* if we were expecting a response, go on to next step */ if (ctx->step == FIREHOSE_INIT_STEP_WAIT_PING || ctx->step == FIREHOSE_INIT_STEP_WAIT_STORAGE_INFO) ctx->step++; return TRUE; } if (firehose_init_context_process_response_configure_message (rsp, ctx, &inner_error)) { if (inner_error) { g_propagate_error (error, inner_error); return FALSE; } /* if we were expecting a response, go on to next step */ if (ctx->step == FIREHOSE_INIT_STEP_WAIT_CONFIGURE) ctx->step++; return TRUE; } g_debug ("[qfu-sahara-device] unknown firehose message received"); return TRUE; } static gboolean firehose_init_check_completion (QfuSaharaDevice *self, FirehoseInitContext *ctx) { return (ctx->step == FIREHOSE_INIT_STEP_LAST); } static gboolean sahara_device_firehose_init (QfuSaharaDevice *self, GCancellable *cancellable, GError **error) { FirehoseInitContext ctx = { .step = FIREHOSE_INIT_STEP_PING, .max_payload_size_to_target_in_bytes = 0, .sector_size_in_bytes = 0, .pages_in_block = 0, }; if (!firehose_operation_run (self, (PrepareRequestCallback) firehose_init_prepare_request, (ProcessResponseCallback) firehose_init_process_response, (CheckCompletionCallback) firehose_init_check_completion, NULL, /* InitRetryCallback */ 0, /* max_retries */ FIREHOSE_INIT_TIMEOUT_SECS, &ctx, cancellable, error)) return FALSE; if (!ctx.sector_size_in_bytes) { g_debug ("[qfu-sahara-device] using default sector size (%u bytes)", DEFAULT_SECTOR_SIZE_IN_BYTES); self->priv->sector_size_in_bytes = DEFAULT_SECTOR_SIZE_IN_BYTES; } else self->priv->sector_size_in_bytes = ctx.sector_size_in_bytes; if (!ctx.pages_in_block) { g_debug ("[qfu-sahara-device] using default pages in block (%u)", DEFAULT_PAGES_IN_BLOCK); self->priv->pages_in_block = DEFAULT_PAGES_IN_BLOCK; } else self->priv->pages_in_block = ctx.pages_in_block; if (!ctx.max_payload_size_to_target_in_bytes) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unknown max payload size"); return FALSE; } self->priv->max_payload_size_to_target_in_bytes = ctx.max_payload_size_to_target_in_bytes; /* compute transfer block size, which will be equal to the max payload size * to target if it's multiple of sector size */ self->priv->transfer_block_size = (self->priv->max_payload_size_to_target_in_bytes / self->priv->sector_size_in_bytes) * self->priv->sector_size_in_bytes; g_assert (self->priv->transfer_block_size <= self->priv->max_payload_size_to_target_in_bytes); g_assert (self->priv->transfer_block_size > 0); return TRUE; } /******************************************************************************/ /* Sahara initialization */ #define SAHARA_MAX_PROTOCOL_STEP_ATTEMPTS 5 typedef enum { SAHARA_PROTOCOL_STEP_UNKNOWN, SAHARA_PROTOCOL_STEP_INIT, SAHARA_PROTOCOL_STEP_HELLO, SAHARA_PROTOCOL_STEP_SWITCH, SAHARA_PROTOCOL_STEP_DATA, SAHARA_PROTOCOL_STEP_LAST, } SaharaProtocolStep; static gboolean validate_firehose_switch_confirmation (const guint8 *rsp, gsize rsplen, GError **error) { if (!rsplen) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "no confirmation received"); return FALSE; } if (!validate_ascii_print (rsp, rsplen)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "invalid confirmation data"); return FALSE; } return TRUE; } static SaharaProtocolStep sahara_device_run_protocol_step (QfuSaharaDevice *self, SaharaProtocolStep step, GCancellable *cancellable, GError **error) { SaharaProtocolStep next_step = SAHARA_PROTOCOL_STEP_UNKNOWN; gsize reqlen = 0; gssize rsplen; guint8 *rsp = NULL; memset (self->priv->buffer->data, 0, self->priv->buffer->len); switch (step) { case SAHARA_PROTOCOL_STEP_INIT: /* * Just after opening the port we must NOT SEND anything to the device. * If we do that, we would get the sahara hello back, but the initialization * process would fail later on with a command-end-image-transfer message * reporting that the 0x0000ff00 command to switch to firehose protocol is * unsupported. */ break; case SAHARA_PROTOCOL_STEP_HELLO: reqlen = qfu_sahara_response_hello_build (self->priv->buffer->data, self->priv->buffer->len); break; case SAHARA_PROTOCOL_STEP_SWITCH: reqlen = qfu_sahara_request_switch_build (self->priv->buffer->data, self->priv->buffer->len); break; case SAHARA_PROTOCOL_STEP_DATA: reqlen = qfu_sahara_request_switch_data_build (self->priv->buffer->data, self->priv->buffer->len); break; case SAHARA_PROTOCOL_STEP_UNKNOWN: case SAHARA_PROTOCOL_STEP_LAST: default: g_assert_not_reached (); break; } rsplen = send_receive (self, reqlen ? self->priv->buffer->data : NULL, reqlen, 3, &rsp, cancellable, error); if (rsplen < 0) return SAHARA_PROTOCOL_STEP_UNKNOWN; if (rsplen == 0) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "no sahara response received"); return SAHARA_PROTOCOL_STEP_UNKNOWN; } /* The sahara initialization finishes once the switch to firehose is confirmed. * The EM7565 replies "confirmed" explicitly, but we'll just accept any printable * ASCII string. */ if (step == SAHARA_PROTOCOL_STEP_DATA) { if (!validate_firehose_switch_confirmation (rsp, rsplen, error)) return SAHARA_PROTOCOL_STEP_UNKNOWN; /* initialization finished */ g_debug ("[qfu-sahara-device] sahara initialization finished: %.*s", (gint)rsplen, rsp); return SAHARA_PROTOCOL_STEP_LAST; } /* in case several messages are received together, parse and process them one by one */ while (rsplen > 0) { gsize msglen; QfuSaharaHeader *msghdr; if ((gsize)rsplen < QFU_SAHARA_MESSAGE_MAX_HEADER_SIZE) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "sahara header not fully received: %" G_GSSIZE_FORMAT " < %" G_GSIZE_FORMAT, rsplen, QFU_SAHARA_MESSAGE_MAX_HEADER_SIZE); return SAHARA_PROTOCOL_STEP_UNKNOWN; } msghdr = (QfuSaharaHeader *)rsp; msglen = GUINT32_FROM_LE (msghdr->size); if ((gsize)rsplen < msglen) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "sahara message not fully received: %" G_GSSIZE_FORMAT " < %" G_GSIZE_FORMAT, rsplen, msglen); return SAHARA_PROTOCOL_STEP_UNKNOWN; } switch (GUINT32_FROM_LE (msghdr->cmd)) { case QFU_SAHARA_CMD_HELLO_REQ: if (!qfu_sahara_request_hello_parse (rsp, rsplen, error)) return SAHARA_PROTOCOL_STEP_UNKNOWN; g_debug ("[qfu-sahara-device] sahara hello request received"); next_step = SAHARA_PROTOCOL_STEP_HELLO; break; case QFU_SAHARA_CMD_COMMAND_READY: g_debug ("[qfu-sahara-device] module is ready for commands"); next_step = SAHARA_PROTOCOL_STEP_SWITCH; break; case QFU_SAHARA_CMD_COMMAND_EXECUTE_RSP: g_debug ("[qfu-sahara-device] request to switch to firehose accepted"); if (!qfu_sahara_response_switch_parse (rsp, rsplen, error)) return SAHARA_PROTOCOL_STEP_UNKNOWN; next_step = SAHARA_PROTOCOL_STEP_DATA; break; case QFU_SAHARA_CMD_COMMAND_END_IMAGE_TRANSFER: if (!qfu_sahara_response_end_image_transfer_parse (rsp, rsplen, error)) return SAHARA_PROTOCOL_STEP_UNKNOWN; g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unexpected sahara message"); return SAHARA_PROTOCOL_STEP_UNKNOWN; default: g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unsupported sahara message: '0x%08x'", GUINT32_FROM_LE (msghdr->cmd)); return SAHARA_PROTOCOL_STEP_UNKNOWN; } rsp += msglen; rsplen -= msglen; } g_assert (next_step != SAHARA_PROTOCOL_STEP_UNKNOWN); return next_step; } static gboolean sahara_device_initialize (QfuSaharaDevice *self, GCancellable *cancellable, GError **error) { SaharaProtocolStep step = SAHARA_PROTOCOL_STEP_INIT; guint n_attempts = 0; while (step != SAHARA_PROTOCOL_STEP_LAST) { SaharaProtocolStep next_step; /* check cancellation */ if (g_cancellable_is_cancelled (cancellable)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED, "operation cancelled"); return FALSE; } /* check step error */ next_step = sahara_device_run_protocol_step (self, step, cancellable, error); if (next_step == SAHARA_PROTOCOL_STEP_UNKNOWN) return FALSE; /* retrying with same step? */ if (next_step == step) { if (++n_attempts == SAHARA_MAX_PROTOCOL_STEP_ATTEMPTS) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "too many attempts"); return FALSE; } } else n_attempts = 0; /* continue to next step */ step = next_step; } return TRUE; } /******************************************************************************/ static gboolean initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { QfuSaharaDevice *self; struct termios terminal_data; gchar *path = NULL; GError *inner_error = NULL; self = QFU_SAHARA_DEVICE (initable); if (g_cancellable_set_error_if_cancelled (cancellable, &inner_error)) goto out; path = g_file_get_path (self->priv->file); g_debug ("[qfu-sahara-device] opening TTY: %s", path); self->priv->fd = open (path, O_RDWR | O_NOCTTY); if (self->priv->fd < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error opening serial device: %s", g_strerror (errno)); goto out; } g_debug ("[qfu-sahara-device] setting terminal in raw mode..."); if (tcgetattr (self->priv->fd, &terminal_data) < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error getting serial port attributes: %s", g_strerror (errno)); goto out; } cfmakeraw (&terminal_data); if (tcsetattr (self->priv->fd, TCSANOW, &terminal_data) < 0) { inner_error = g_error_new (G_IO_ERROR, G_IO_ERROR_FAILED, "error setting serial port attributes: %s", g_strerror (errno)); goto out; } /* We need to give some time to the device before trying to initialize * the sahara protocol, because otherwise the sequence won't work. If * this wait time is not given, the initialization sequence will fail with * a command-end-image-transfer message reporting that the 0x0000ff00 * command to switch to firehose protocol is unsupported. * * 2 full seconds selected a bit arbitrarily, didn't get any failure when * using this amount of time. */ g_debug ("[qfu-sahara-device] waiting time for device to boot properly..."); g_usleep (2 * G_USEC_PER_SEC); g_debug ("[qfu-sahara-device] initializing sahara protocol..."); if (!sahara_device_initialize (self, cancellable, &inner_error)) goto out; g_debug ("[qfu-sahara-device] initializing firehose protocol..."); if (!sahara_device_firehose_init (self, cancellable, &inner_error)) goto out; out: g_free (path); if (inner_error) { if (!(self->priv->fd < 0)) { close (self->priv->fd); self->priv->fd = -1; } g_propagate_error (error, inner_error); return FALSE; } return TRUE; } /******************************************************************************/ QfuSaharaDevice * qfu_sahara_device_new (GFile *file, GCancellable *cancellable, GError **error) { g_return_val_if_fail (G_IS_FILE (file), NULL); return QFU_SAHARA_DEVICE (g_initable_new (QFU_TYPE_SAHARA_DEVICE, cancellable, error, "file", file, NULL)); } static void qfu_sahara_device_init (QfuSaharaDevice *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_SAHARA_DEVICE, QfuSaharaDevicePrivate); self->priv->fd = -1; /* Long buffer for I/O, way more than ever needed when using sahara/firehose */ self->priv->buffer = g_byte_array_new (); g_byte_array_set_size (self->priv->buffer, QFU_IMAGE_CHUNK_SIZE); } static void set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { QfuSaharaDevice *self = QFU_SAHARA_DEVICE (object); switch (prop_id) { case PROP_FILE: self->priv->file = g_value_dup_object (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { QfuSaharaDevice *self = QFU_SAHARA_DEVICE (object); switch (prop_id) { case PROP_FILE: g_value_set_object (value, self->priv->file); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } } static void dispose (GObject *object) { QfuSaharaDevice *self = QFU_SAHARA_DEVICE (object); if (!(self->priv->fd < 0)) { close (self->priv->fd); self->priv->fd = -1; } G_OBJECT_CLASS (qfu_sahara_device_parent_class)->dispose (object); } static void initable_iface_init (GInitableIface *iface) { iface->init = initable_init; } static void qfu_sahara_device_class_init (QfuSaharaDeviceClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuSaharaDevicePrivate)); object_class->dispose = dispose; object_class->get_property = get_property; object_class->set_property = set_property; properties[PROP_FILE] = g_param_spec_object ("file", "File", "File object", G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_FILE, properties[PROP_FILE]); } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-sahara-device.h000066400000000000000000000076121455567757300237760ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Zodiac Inflight Innovations * Copyright (C) 2019 Aleksander Morgado */ #ifndef QFU_SAHARA_DEVICE_H #define QFU_SAHARA_DEVICE_H #include #include G_BEGIN_DECLS #define QFU_TYPE_SAHARA_DEVICE (qfu_sahara_device_get_type ()) #define QFU_SAHARA_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_SAHARA_DEVICE, QfuSaharaDevice)) #define QFU_SAHARA_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_SAHARA_DEVICE, QfuSaharaDeviceClass)) #define QFU_IS_SAHARA_DEVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_SAHARA_DEVICE)) #define QFU_IS_SAHARA_DEVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_SAHARA_DEVICE)) #define QFU_SAHARA_DEVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_SAHARA_DEVICE, QfuSaharaDeviceClass)) typedef struct _QfuSaharaDevice QfuSaharaDevice; typedef struct _QfuSaharaDeviceClass QfuSaharaDeviceClass; typedef struct _QfuSaharaDevicePrivate QfuSaharaDevicePrivate; struct _QfuSaharaDevice { GObject parent; QfuSaharaDevicePrivate *priv; }; struct _QfuSaharaDeviceClass { GObjectClass parent; }; GType qfu_sahara_device_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuSaharaDevice, g_object_unref); QfuSaharaDevice *qfu_sahara_device_new (GFile *file, GCancellable *cancellable, GError **error); gboolean qfu_sahara_device_firehose_setup_download (QfuSaharaDevice *self, QfuImage *image, guint *n_blocks, GCancellable *cancellable, GError **error); gboolean qfu_sahara_device_firehose_write_block (QfuSaharaDevice *self, QfuImage *image, guint block_i, GCancellable *cancellable, GError **error); gboolean qfu_sahara_device_firehose_teardown_download (QfuSaharaDevice *self, QfuImage *image, GCancellable *cancellable, GError **error); gboolean qfu_sahara_device_firehose_reset (QfuSaharaDevice *self, GCancellable *cancellable, GError **error); G_END_DECLS #endif /* QFU_SAHARA_DEVICE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-sahara-message.c000066400000000000000000000217451455567757300241610ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Zodiac Inflight Innovations * Copyright (C) 2019 Aleksander Morgado */ #include #include #include #include "qfu-image.h" #include "qfu-sahara-message.h" #include "qfu-enum-types.h" /******************************************************************************/ /* Sahara messages */ #define CURRENT_SAHARA_VERSION 0x00000002 typedef struct _SaharaHelloRequest SaharaHelloRequest; struct _SaharaHelloRequest { QfuSaharaHeader header; guint32 version; guint32 compatible; guint32 max_len; guint32 mode; guint32 reserved[6]; } __attribute__ ((packed)); gboolean qfu_sahara_request_hello_parse (const guint8 *buffer, gsize buffer_len, GError **error) { SaharaHelloRequest *msg; QfuSaharaMode mode; const gchar *mode_str; if (buffer_len < sizeof (SaharaHelloRequest)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (SaharaHelloRequest)); return FALSE; } msg = (SaharaHelloRequest *) buffer; g_assert (msg->header.cmd == GUINT32_FROM_LE (QFU_SAHARA_CMD_HELLO_REQ)); mode = (QfuSaharaMode) GUINT32_FROM_LE (msg->mode); mode_str = qfu_sahara_mode_get_string (mode); g_debug ("[qfu,sahara-message] received %s:", qfu_sahara_cmd_get_string (QFU_SAHARA_CMD_HELLO_REQ)); g_debug ("[qfu,sahara-message] version: %u", GUINT32_FROM_LE (msg->version)); g_debug ("[qfu,sahara-message] compatible: %u", GUINT32_FROM_LE (msg->compatible)); g_debug ("[qfu,sahara-message] max length: %u", GUINT32_FROM_LE (msg->max_len)); if (mode_str) g_debug ("[qfu,sahara-message] mode: %s", mode_str ? mode_str : "unknown"); else g_debug ("[qfu,sahara-message] mode: unknown (0x%08x)", mode); /* our version needs to be greater or equal than the minimum version reported */ if (GUINT32_FROM_LE (msg->compatible) > CURRENT_SAHARA_VERSION) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "unsupported sahara version (%u > %u)", GUINT32_FROM_LE (msg->compatible), CURRENT_SAHARA_VERSION); return FALSE; } return TRUE; } typedef struct _SaharaHelloResponse SaharaHelloResponse; struct _SaharaHelloResponse { QfuSaharaHeader header; guint32 version; guint32 compatible; guint32 status; guint32 mode; guint32 reserved[6]; } __attribute__ ((packed)); gsize qfu_sahara_response_hello_build (guint8 *buffer, gsize buffer_len) { SaharaHelloResponse *msg = (SaharaHelloResponse *)buffer; g_assert (buffer_len >= sizeof (SaharaHelloResponse)); msg->header.cmd = GUINT32_TO_LE (QFU_SAHARA_CMD_HELLO_RSP); msg->header.size = GUINT32_TO_LE (sizeof (SaharaHelloResponse)); msg->version = GUINT32_TO_LE (CURRENT_SAHARA_VERSION); msg->compatible = GUINT32_TO_LE (CURRENT_SAHARA_VERSION); msg->status = GUINT32_TO_LE (QFU_SAHARA_STATUS_SUCCESS); msg->mode = GUINT32_TO_LE (QFU_SAHARA_MODE_COMMAND); memset (msg->reserved, 0, sizeof (msg->reserved)); return sizeof (SaharaHelloResponse); } #define EXECUTE_SWITCH_FIREHOSE 0x0000ff00 typedef struct _SaharaCommandExecuteRequest SaharaCommandExecuteRequest; struct _SaharaCommandExecuteRequest { QfuSaharaHeader header; guint32 execute; } __attribute__ ((packed)); gsize qfu_sahara_request_switch_build (guint8 *buffer, gsize buffer_len) { SaharaCommandExecuteRequest *msg = (SaharaCommandExecuteRequest *)buffer; g_assert (buffer_len >= sizeof (SaharaCommandExecuteRequest)); msg->header.cmd = GUINT32_TO_LE (QFU_SAHARA_CMD_COMMAND_EXECUTE_REQ); msg->header.size = GUINT32_TO_LE (sizeof (SaharaCommandExecuteRequest)); msg->execute = GUINT32_TO_LE (EXECUTE_SWITCH_FIREHOSE); return sizeof (SaharaCommandExecuteRequest); } typedef struct _SaharaCommandExecuteResponse SaharaCommandExecuteResponse; struct _SaharaCommandExecuteResponse { QfuSaharaHeader header; guint32 execute; guint32 expected_data_length; } __attribute__ ((packed)); gboolean qfu_sahara_response_switch_parse (const guint8 *buffer, gsize buffer_len, GError **error) { SaharaCommandExecuteResponse *msg; if (buffer_len < sizeof (SaharaCommandExecuteResponse)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (SaharaCommandExecuteResponse)); return FALSE; } msg = (SaharaCommandExecuteResponse *) buffer; g_assert (msg->header.cmd == GUINT32_FROM_LE (QFU_SAHARA_CMD_COMMAND_EXECUTE_RSP)); g_debug ("[qfu,sahara-message] received %s:", qfu_sahara_cmd_get_string (QFU_SAHARA_CMD_COMMAND_EXECUTE_RSP)); g_debug ("[qfu,sahara-message] execute: 0x%08x", GUINT32_FROM_LE (msg->execute)); g_debug ("[qfu,sahara-message] expected data length: %u", GUINT32_FROM_LE (msg->expected_data_length)); /* Note: the expected data length is the length of the data expected in the next sahara * protocol step, the modem is telling us how much data it's going to send; e.g. the EM7565 * returns just 9 bytes ("confirmed"). Not doing anything else with this value because * we don't really need it for anything */ return TRUE; } typedef struct _SaharaCommandExecuteDataRequest SaharaCommandExecuteDataRequest; struct _SaharaCommandExecuteDataRequest { QfuSaharaHeader header; guint32 execute; } __attribute__ ((packed)); gsize qfu_sahara_request_switch_data_build (guint8 *buffer, gsize buffer_len) { SaharaCommandExecuteDataRequest *msg = (SaharaCommandExecuteDataRequest *)buffer; g_assert (buffer_len >= sizeof (SaharaCommandExecuteDataRequest)); msg->header.cmd = GUINT32_TO_LE (QFU_SAHARA_CMD_COMMAND_EXECUTE_DATA); msg->header.size = GUINT32_TO_LE (sizeof (SaharaCommandExecuteDataRequest)); msg->execute = GUINT32_TO_LE (EXECUTE_SWITCH_FIREHOSE); return sizeof (SaharaCommandExecuteDataRequest); } typedef struct _SaharaEndImageTransferResponse SaharaEndImageTransferResponse; struct _SaharaEndImageTransferResponse { QfuSaharaHeader header; guint32 file; guint32 status; } __attribute__ ((packed)); gboolean qfu_sahara_response_end_image_transfer_parse (const guint8 *buffer, gsize buffer_len, GError **error) { SaharaEndImageTransferResponse *msg; QfuSaharaStatus status; const gchar *status_str; if (buffer_len < sizeof (SaharaEndImageTransferResponse)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "message size mismatch: %" G_GSIZE_FORMAT " != %" G_GSIZE_FORMAT, buffer_len, sizeof (SaharaEndImageTransferResponse)); return FALSE; } msg = (SaharaEndImageTransferResponse *) buffer; g_assert (msg->header.cmd == GUINT32_FROM_LE (QFU_SAHARA_CMD_COMMAND_END_IMAGE_TRANSFER)); status = (QfuSaharaStatus) GUINT32_FROM_LE (msg->status); status_str = qfu_sahara_status_get_string (status); g_debug ("[qfu,sahara-message] received %s:", qfu_sahara_cmd_get_string (QFU_SAHARA_CMD_COMMAND_END_IMAGE_TRANSFER)); g_debug ("[qfu,sahara-message] file: %u", GUINT32_FROM_LE (msg->file)); if (status_str) g_debug ("[qfu,sahara-message] status: %s", status_str); else g_debug ("[qfu,sahara-message] status: unknown (0x%08x)", status); if (status != QFU_SAHARA_STATUS_SUCCESS) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "operation failed: %s", status_str); return FALSE; } return TRUE; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-sahara-message.h000066400000000000000000000163751455567757300241710ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Zodiac Inflight Innovations * Copyright (C) 2019 Aleksander Morgado * * The definitions in this header file are imported from libopenpst: * https://github.com/openpst/libopenpst * And from CodeAurora's quic/imm/imm/qdl: * https://portland.source.codeaurora.org/quic/imm/imm/qdl */ #ifndef QFU_SAHARA_MESSAGE_H #define QFU_SAHARA_MESSAGE_H #include #include #include "qfu-image.h" G_BEGIN_DECLS typedef struct _QfuSaharaHeader QfuSaharaHeader; struct _QfuSaharaHeader { guint32 cmd; guint32 size; } __attribute__ ((packed)); #define QFU_SAHARA_MESSAGE_MAX_HEADER_SIZE sizeof (QfuSaharaHeader) #define QFU_SAHARA_MESSAGE_MAX_PACKET_SIZE 0x400 typedef enum { QFU_SAHARA_CMD_HELLO_REQ = 0x01, /* Initialize connection and protocol */ QFU_SAHARA_CMD_HELLO_RSP = 0x02, /* Acknowledge connection/protocol, mode of operation */ QFU_SAHARA_CMD_COMMAND_READ_DATA = 0x03, /* Read specified number of bytes from host */ QFU_SAHARA_CMD_COMMAND_END_IMAGE_TRANSFER = 0x04, /* image transfer end / target transfer failure */ QFU_SAHARA_CMD_COMMAND_DONE = 0x05, /* Acknowledgement: image transfer is complete */ QFU_SAHARA_CMD_COMMAND_DONE_RESPONSE = 0x06, /* Target is exiting protocol */ QFU_SAHARA_CMD_COMMAND_RESET = 0x07, /* Instruct target to perform a reset */ QFU_SAHARA_CMD_COMMAND_RESET_RESPONSE = 0x08, /* Indicate to host that target is about to reset */ QFU_SAHARA_CMD_COMMAND_MEMORY_DEBUG = 0x09, /* Indicate to host: target debug mode & ready to transfer memory content */ QFU_SAHARA_CMD_COMMAND_MEMORY_READ = 0x0A, /* Read number of bytes, starting from a specified address */ QFU_SAHARA_CMD_COMMAND_READY = 0x0B, /* Indicate to host: target ready to receive client commands, */ QFU_SAHARA_CMD_COMMAND_SWITCH_MODE = 0x0C, /* Switch to a mode defined in enum SAHARA_MODE */ QFU_SAHARA_CMD_COMMAND_EXECUTE_REQ = 0x0D, /* Indicate to host: to execute a given client command */ QFU_SAHARA_CMD_COMMAND_EXECUTE_RSP = 0x0E, /* Indicate to host: target command execution status */ QFU_SAHARA_CMD_COMMAND_EXECUTE_DATA = 0x0F, /* Indicate to target that host is ready to receive (more) data */ QFU_SAHARA_CMD_COMMAND_MEMORY_DEBUG_64 = 0x10, QFU_SAHARA_CMD_COMMAND_MEMORY_READ_64 = 0x11, } QfuSaharaCmd; typedef enum { QFU_SAHARA_MODE_IMAGE_TX_PENDING = 0x00, QFU_SAHARA_MODE_IMAGE_TX_COMPLETE = 0x01, QFU_SAHARA_MODE_MEMORY_DEBUG = 0x02, QFU_SAHARA_MODE_COMMAND = 0x03, } QfuSaharaMode; typedef enum { QFU_SAHARA_STATUS_SUCCESS = 0x00, QFU_SAHARA_STATUS_INVALID_COMMAND = 0x01, QFU_SAHARA_STATUS_PROTOCOL_MISMATCH = 0x02, QFU_SAHARA_STATUS_INVALID_TARGET_PROTOCOL = 0x03, QFU_SAHARA_STATUS_INVALID_HOST_PROTOCOL = 0x04, QFU_SAHARA_STATUS_INVALID_PACKET_SIZE = 0x05, QFU_SAHARA_STATUS_UNEXPECTED_IMAGE_ID = 0x06, QFU_SAHARA_STATUS_INVALID_HEADER_SIZE = 0x07, QFU_SAHARA_STATUS_INVALID_DATA_SIZE = 0x08, QFU_SAHARA_STATUS_INVALID_IMAGE_TYPE = 0x09, QFU_SAHARA_STATUS_INVALID_TX_LENGTH = 0x0A, QFU_SAHARA_STATUS_INVALID_RX_LENGTH = 0x0B, QFU_SAHARA_STATUS_TX_RX_ERROR = 0x0C, QFU_SAHARA_STATUS_READ_DATA_ERROR = 0x0D, QFU_SAHARA_STATUS_UNSUPPORTED_NUM_PHDRS = 0x0E, QFU_SAHARA_STATUS_INVALID_PHDR_SIZE = 0x0F, QFU_SAHARA_STATUS_MULTIPLE_SHARED_SEG = 0x10, QFU_SAHARA_STATUS_UNINIT_PHDR_LOC = 0x11, QFU_SAHARA_STATUS_INVALID_DEST_ADDRESS = 0x12, QFU_SAHARA_STATUS_INVALID_IMAGE_HEADER_SIZE = 0x13, QFU_SAHARA_STATUS_INVALID_ELF_HEADER = 0x14, QFU_SAHARA_STATUS_UNKNOWN_ERROR = 0x15, QFU_SAHARA_STATUS_TIMEOUT_RX = 0x16, QFU_SAHARA_STATUS_TIMEOUT_TX = 0x17, QFU_SAHARA_STATUS_INVALID_MODE = 0x18, QFU_SAHARA_STATUS_INVALID_MEMORY_READ = 0x19, QFU_SAHARA_STATUS_INVALID_DATA_SIZE_REQUEST = 0x1A, QFU_SAHARA_STATUS_MEMORY_DEBUG_NOT_SUPPORTED = 0x1B, QFU_SAHARA_STATUS_INVALID_MODE_SWITCH = 0x1C, QFU_SAHARA_STATUS_EXEC_FAILURE = 0x1D, QFU_SAHARA_STATUS_EXEC_CMD_INVALID_PARAM = 0x1E, QFU_SAHARA_STATUS_EXEC_CMD_UNSUPPORTED = 0x1F, QFU_SAHARA_STATUS_EXEC_DATA_INVALID = 0x20, QFU_SAHARA_STATUS_HASH_TABLE_AUTH_FAILURE = 0x21, QFU_SAHARA_STATUS_HASH_VERIFICATION_FAILURE = 0x22, QFU_SAHARA_STATUS_HASH_TABLE_NOT_FOUND = 0x23, QFU_SAHARA_STATUS_TARGET_INIT_FAILURE = 0x24, QFU_SAHARA_STATUS_IMAGE_AUTH_FAILURE = 0x25, QFU_SAHARA_STATUS_INVALID_IMG_HASH_TABLE_SIZE = 0x26, } QfuSaharaStatus; gsize qfu_sahara_response_hello_build (guint8 *buffer, gsize buffer_len); gsize qfu_sahara_request_switch_build (guint8 *buffer, gsize buffer_len); gsize qfu_sahara_request_switch_data_build (guint8 *buffer, gsize buffer_len); gboolean qfu_sahara_request_hello_parse (const guint8 *buffer, gsize buffer_len, GError **error); gboolean qfu_sahara_response_switch_parse (const guint8 *buffer, gsize buffer_len, GError **error); gboolean qfu_sahara_response_end_image_transfer_parse (const guint8 *buffer, gsize buffer_len, GError **error); G_END_DECLS #endif /* QFU_SAHARA_MESSAGE_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-updater.c000066400000000000000000001635741455567757300227530ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #include #include #include #include #include "qfu-log.h" #include "qfu-image-factory.h" #include "qfu-updater.h" #include "qfu-reseter.h" #include "qfu-utils.h" #include "qfu-helpers.h" #include "qfu-qdl-device.h" #include "qfu-sahara-device.h" #include "qfu-enum-types.h" G_DEFINE_TYPE (QfuUpdater, qfu_updater, G_TYPE_OBJECT) #define CLEAR_LINE "\33[2K\r" typedef enum { UPDATER_TYPE_UNKNOWN, UPDATER_TYPE_GENERIC, UPDATER_TYPE_DOWNLOAD, } UpdaterType; struct _QfuUpdaterPrivate { UpdaterType type; QfuDeviceSelection *device_selection; gchar *firmware_version; gchar *config_version; gchar *carrier; QmiDeviceOpenFlags device_open_flags; gboolean ignore_version_errors; gboolean override_download; guint8 modem_storage_index; gboolean skip_validation; }; /******************************************************************************/ static const gchar *progress[] = { "(*-----)", "(-*----)", "(--*---)", "(---*--)", "(----*-)", "(-----*)", "(----*-)", "(---*--)", "(--*---)", "(-*----)" }; /******************************************************************************/ /* Run */ /* Wait time after the upgrade has been done, before using the cdc-wdm port */ #define WAIT_FOR_BOOT_TIMEOUT_SECS 5 #define WAIT_FOR_BOOT_RETRIES 12 typedef enum { RUN_CONTEXT_STEP_QMI_CLIENT, RUN_CONTEXT_STEP_GET_FIRMWARE_PREFERENCE, RUN_CONTEXT_STEP_SET_FIRMWARE_PREFERENCE, RUN_CONTEXT_STEP_POWER_CYCLE, RUN_CONTEXT_STEP_CLEANUP_QMI_DEVICE, RUN_CONTEXT_STEP_WAIT_FOR_TTY, RUN_CONTEXT_STEP_SELECT_DEVICE, RUN_CONTEXT_STEP_SELECT_IMAGE, RUN_CONTEXT_STEP_DOWNLOAD_IMAGE, RUN_CONTEXT_STEP_CLEANUP_IMAGE, RUN_CONTEXT_STEP_CLEANUP_DEVICE, RUN_CONTEXT_STEP_WAIT_FOR_CDC_WDM, RUN_CONTEXT_STEP_WAIT_FOR_BOOT, RUN_CONTEXT_STEP_QMI_CLIENT_AFTER, RUN_CONTEXT_STEP_CLEANUP_QMI_DEVICE_FULL, RUN_CONTEXT_STEP_LAST } RunContextStep; typedef struct { /* Device selection */ GFile *cdc_wdm_file; GFile *serial_file; /* Context step */ RunContextStep step; /* Old/New info and capabilities */ gchar *revision; gboolean supports_stored_image_management; guint8 max_modem_storage_index; gboolean supports_firmware_preference_management; QmiMessageDmsGetFirmwarePreferenceOutput *firmware_preference; QmiMessageDmsSwiGetCurrentFirmwareOutput *current_firmware; gchar *new_revision; gboolean new_supports_stored_image_management; gboolean new_supports_firmware_preference_management; QmiMessageDmsGetFirmwarePreferenceOutput *new_firmware_preference; QmiMessageDmsSwiGetCurrentFirmwareOutput *new_current_firmware; /* List of pending QfuImages to download, and the current one being * processed. */ GList *pending_images; QfuImage *current_image; /* QMI device and client */ QmiDevice *qmi_device; QmiClientDms *qmi_client; /* Reset configuration */ gboolean boothold_reset; /* Information gathered from the firmware images themselves */ gchar *firmware_version; gchar *config_version; gchar *carrier; /* Waiting for boot */ guint wait_for_boot_seconds_elapsed; guint wait_for_boot_retries; /* Device to use while already in download mode */ QfuQdlDevice *qdl_device; QfuSaharaDevice *sahara_device; } RunContext; static void run_context_free (RunContext *ctx) { if (ctx->current_firmware) qmi_message_dms_swi_get_current_firmware_output_unref (ctx->current_firmware); if (ctx->new_current_firmware) qmi_message_dms_swi_get_current_firmware_output_unref (ctx->new_current_firmware); if (ctx->firmware_preference) qmi_message_dms_get_firmware_preference_output_unref (ctx->firmware_preference); if (ctx->new_firmware_preference) qmi_message_dms_get_firmware_preference_output_unref (ctx->new_firmware_preference); g_free (ctx->new_revision); g_free (ctx->revision); g_free (ctx->firmware_version); g_free (ctx->config_version); g_free (ctx->carrier); if (ctx->qmi_client) { g_assert (ctx->qmi_device); /* This release only happens when cleaning up from an error, * therefore always release CID */ qmi_device_release_client (ctx->qmi_device, QMI_CLIENT (ctx->qmi_client), QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, 10, NULL, NULL, NULL); g_object_unref (ctx->qmi_client); } if (ctx->qmi_device) { qmi_device_close_async (ctx->qmi_device, 10, NULL, NULL, NULL); g_object_unref (ctx->qmi_device); } if (ctx->cdc_wdm_file) g_object_unref (ctx->cdc_wdm_file); g_clear_object (&ctx->qdl_device); g_clear_object (&ctx->sahara_device); g_clear_object (&ctx->serial_file); g_clear_object (&ctx->current_image); g_list_free_full (ctx->pending_images, g_object_unref); g_slice_free (RunContext, ctx); } gboolean qfu_updater_run_finish (QfuUpdater *self, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void print_firmware_preference (QmiMessageDmsGetFirmwarePreferenceOutput *firmware_preference, const gchar *prefix) { GArray *array; guint i; qmi_message_dms_get_firmware_preference_output_get_list (firmware_preference, &array, NULL); if (array->len > 0) { for (i = 0; i < array->len; i++) { QmiMessageDmsGetFirmwarePreferenceOutputListImage *image; gchar *unique_id_str; image = &g_array_index (array, QmiMessageDmsGetFirmwarePreferenceOutputListImage, i); unique_id_str = qfu_utils_get_firmware_image_unique_id_printable (image->unique_id); g_print ("%simage '%s': unique id '%s', build id '%s'\n", prefix, qmi_dms_firmware_image_type_get_string (image->type), unique_id_str, image->build_id); g_free (unique_id_str); } } else g_debug ("%sno preference specified\n", prefix); } static void print_current_firmware (QmiMessageDmsSwiGetCurrentFirmwareOutput *current_firmware, const gchar *prefix) { const gchar *model = NULL; const gchar *boot_version = NULL; const gchar *amss_version = NULL; const gchar *sku_id = NULL; const gchar *package_id = NULL; const gchar *carrier_id = NULL; const gchar *pri_version = NULL; const gchar *carrier = NULL; const gchar *config_version = NULL; qmi_message_dms_swi_get_current_firmware_output_get_model (current_firmware, &model, NULL); qmi_message_dms_swi_get_current_firmware_output_get_boot_version (current_firmware, &boot_version, NULL); qmi_message_dms_swi_get_current_firmware_output_get_amss_version (current_firmware, &amss_version, NULL); qmi_message_dms_swi_get_current_firmware_output_get_sku_id (current_firmware, &sku_id, NULL); qmi_message_dms_swi_get_current_firmware_output_get_package_id (current_firmware, &package_id, NULL); qmi_message_dms_swi_get_current_firmware_output_get_carrier_id (current_firmware, &carrier_id, NULL); qmi_message_dms_swi_get_current_firmware_output_get_pri_version (current_firmware, &pri_version, NULL); qmi_message_dms_swi_get_current_firmware_output_get_carrier (current_firmware, &carrier, NULL); qmi_message_dms_swi_get_current_firmware_output_get_config_version (current_firmware, &config_version, NULL); if (model) g_print ("%sModel: %s\n", prefix, model); if (boot_version) g_print ("%sBoot version: %s\n", prefix, boot_version); if (amss_version) g_print ("%sAMSS version: %s\n", prefix, amss_version); if (sku_id) g_print ("%sSKU ID: %s\n", prefix, sku_id); if (package_id) g_print ("%sPackage ID: %s\n", prefix, package_id); if (carrier_id) g_print ("%sCarrier ID: %s\n", prefix, carrier_id); if (config_version) g_print ("%sConfig version: %s\n", prefix, config_version); } static void run_context_step_last (GTask *task) { RunContext *ctx; QfuUpdater *self; ctx = (RunContext *) g_task_get_task_data (task); g_assert (ctx); self = g_task_get_source_object (task); if (self->priv->type == UPDATER_TYPE_DOWNLOAD) { g_task_return_boolean (task, TRUE); g_object_unref (task); return; } if (self->priv->type == UPDATER_TYPE_GENERIC) { g_print ("\n" "------------------------------------------------------------------------\n"); g_print ("\n" " original firmware revision was:\n" " %s\n", ctx->revision ? ctx->revision : "unknown"); if (ctx->current_firmware) { g_print (" original running firmware details:\n"); print_current_firmware (ctx->current_firmware, " "); } if (ctx->firmware_preference) { g_print (" original firmware preference details:\n"); print_firmware_preference (ctx->firmware_preference, " "); } g_print ("\n" " new firmware revision is:\n" " %s\n", ctx->new_revision ? ctx->new_revision : "unknown"); if (ctx->new_current_firmware) { g_print (" new running firmware details:\n"); print_current_firmware (ctx->new_current_firmware, " "); } if (ctx->new_firmware_preference) { g_print (" new firmware preference details:\n"); print_firmware_preference (ctx->new_firmware_preference, " "); } if (ctx->new_supports_stored_image_management) g_print ("\n" " NOTE: this device supports stored image management\n" " with qmicli operations:\n" " --dms-list-stored-images\n" " --dms-select-stored-image\n" " --dms-delete-stored-image\n"); if (ctx->new_supports_firmware_preference_management) g_print ("\n" " NOTE: this device supports firmware preference management\n" " with qmicli operations:\n" " --dms-get-firmware-preference\n" " --dms-set-firmware-preference\n"); g_print ("\n" "------------------------------------------------------------------------\n" "\n"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } g_assert_not_reached (); } static void run_context_step (GTask *task); static gboolean run_context_step_cb (GTask *task) { run_context_step (task); return FALSE; } static void run_context_step_next (GTask *task, RunContextStep next) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); ctx->step = next; /* Schedule next step in an idle */ g_idle_add ((GSourceFunc) run_context_step_cb, task); } static void run_context_step_next_no_idle (GTask *task, RunContextStep next) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); ctx->step = next; /* Run right away */ run_context_step (task); } static void close_ready (QmiDevice *dev, GAsyncResult *res, GTask *task) { RunContext *ctx; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); if (!qmi_device_close_finish (dev, res, &error)) { g_warning ("[qfu-updater] couldn't close device: %s", error->message); g_error_free (error); } else g_debug ("[qfu-updater] closed"); /* Go on */ run_context_step_next (task, ctx->step + 1); } static void release_client_ready (QmiDevice *dev, GAsyncResult *res, GTask *task) { RunContext *ctx; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); if (!qmi_device_release_client_finish (dev, res, &error)) { g_warning ("[qfu-updater] couldn't release client: %s", error->message); g_error_free (error); } else g_debug ("[qfu-updater] client released"); qmi_device_close_async (ctx->qmi_device, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) close_ready, task); g_clear_object (&ctx->qmi_device); } static void run_context_step_cleanup_qmi_device_full (GTask *task) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); qmi_device_release_client (ctx->qmi_device, QMI_CLIENT (ctx->qmi_client), QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) release_client_ready, task); g_clear_object (&ctx->qmi_client); } static void new_client_dms_after_ready (gpointer unused, GAsyncResult *res, GTask *task) { RunContext *ctx; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); g_assert (!ctx->qmi_device); g_assert (!ctx->qmi_client); /* After the upgrade, non-fatal error if DMS client couldn't be created */ if (!qfu_utils_new_client_dms_finish (res, &ctx->qmi_device, &ctx->qmi_client, &ctx->new_revision, &ctx->new_supports_stored_image_management, NULL, /* we don't care about the max number of images */ &ctx->new_supports_firmware_preference_management, &ctx->new_firmware_preference, &ctx->new_current_firmware, &error)) { if (ctx->wait_for_boot_retries == WAIT_FOR_BOOT_RETRIES) { g_warning ("couldn't create DMS client after upgrade: %s", error->message); run_context_step_next (task, ctx->step + 1); } else { g_debug ("couldn't create DMS client after upgrade: %s (will retry)", error->message); run_context_step_next (task, RUN_CONTEXT_STEP_WAIT_FOR_BOOT); } g_error_free (error); return; } /* Go on */ run_context_step_next (task, ctx->step + 1); } static void run_context_step_qmi_client_after (GTask *task) { RunContext *ctx; QfuUpdater *self; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); ctx->wait_for_boot_retries++; g_print ("loading device information after the update (%u/%u)...\n", ctx->wait_for_boot_retries, WAIT_FOR_BOOT_RETRIES); g_debug ("[qfu-updater] creating QMI DMS client after upgrade..."); g_assert (ctx->cdc_wdm_file); qfu_utils_new_client_dms (ctx->cdc_wdm_file, 1, /* single try to allocate DMS client */ self->priv->device_open_flags, TRUE, g_task_get_cancellable (task), (GAsyncReadyCallback) new_client_dms_after_ready, task); } static gboolean wait_for_boot_ready (GTask *task) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); ctx->wait_for_boot_seconds_elapsed++; if (ctx->wait_for_boot_seconds_elapsed < WAIT_FOR_BOOT_TIMEOUT_SECS) { if (!qfu_log_get_verbose_stdout ()) g_print (CLEAR_LINE "%s %u", progress[ctx->wait_for_boot_seconds_elapsed % G_N_ELEMENTS (progress)], WAIT_FOR_BOOT_TIMEOUT_SECS - ctx->wait_for_boot_seconds_elapsed); return G_SOURCE_CONTINUE; } if (!qfu_log_get_verbose_stdout ()) g_print (CLEAR_LINE); /* Go on */ run_context_step_next (task, ctx->step + 1); return G_SOURCE_REMOVE; } static void run_context_step_wait_for_boot (GTask *task) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); ctx->wait_for_boot_seconds_elapsed = 0; g_debug ("[qfu-updater] waiting some time (%us) before accessing the cdc-wdm device...", WAIT_FOR_BOOT_TIMEOUT_SECS); if (!qfu_log_get_verbose_stdout ()) { g_print ("waiting some time for the device to boot...\n"); g_print ("%s %u", progress[0], WAIT_FOR_BOOT_TIMEOUT_SECS); } g_timeout_add_seconds (1, (GSourceFunc) wait_for_boot_ready, task); } static void wait_for_cdc_wdm_ready (QfuDeviceSelection *device_selection, GAsyncResult *res, GTask *task) { GError *error = NULL; RunContext *ctx; QfuUpdater *self; gchar *path; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); g_assert (!ctx->cdc_wdm_file); ctx->cdc_wdm_file = qfu_device_selection_wait_for_cdc_wdm_finish (device_selection, res, &error); if (!ctx->cdc_wdm_file) { g_prefix_error (&error, "error waiting for cdc-wdm: "); g_task_return_error (task, error); g_object_unref (task); return; } path = g_file_get_path (ctx->cdc_wdm_file); g_debug ("[qfu-updater] cdc-wdm device found: %s", path); g_free (path); g_print ("normal mode detected\n"); /* If no need to validate, we're done */ if (self->priv->skip_validation) { run_context_step_next (task, RUN_CONTEXT_STEP_LAST); return; } g_print ("\n" "------------------------------------------------------------------------\n" " NOTE: in order to validate which is the firmware running in the\n" " module, the program will wait for a complete boot; this process\n" " may take some time and several retries.\n" "------------------------------------------------------------------------\n" "\n"); /* Go on */ run_context_step_next (task, ctx->step + 1); } static void run_context_step_wait_for_cdc_wdm (GTask *task) { QfuUpdater *self; self = g_task_get_source_object (task); g_debug ("[qfu-updater] now waiting for cdc-wdm device..."); qfu_device_selection_wait_for_cdc_wdm (self->priv->device_selection, g_task_get_cancellable (task), (GAsyncReadyCallback) wait_for_cdc_wdm_ready, task); } static void run_context_step_cleanup_device (GTask *task) { RunContext *ctx; QfuUpdater *self; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); g_assert (ctx->serial_file); if (ctx->qdl_device) { g_debug ("[qfu-updater] QDL reset"); qfu_qdl_device_reset (ctx->qdl_device, g_task_get_cancellable (task), NULL); g_clear_object (&ctx->qdl_device); } else if (ctx->sahara_device) { g_debug ("[qfu-updater] firehose reset"); qfu_sahara_device_firehose_reset (ctx->sahara_device, g_task_get_cancellable (task), NULL); g_clear_object (&ctx->sahara_device); } else g_assert_not_reached (); g_clear_object (&ctx->serial_file); g_print ("rebooting in normal mode...\n"); /* If we were running in download mode, we don't even wait for the reboot to finish */ if (self->priv->type == UPDATER_TYPE_DOWNLOAD) { run_context_step_next (task, RUN_CONTEXT_STEP_LAST); return; } run_context_step_next (task, ctx->step + 1); } static void run_context_step_cleanup_image (GTask *task) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); g_assert (ctx->current_image); g_clear_object (&ctx->current_image); /* Select next image */ if (ctx->pending_images) { run_context_step_next (task, RUN_CONTEXT_STEP_SELECT_IMAGE); return; } /* If no more files to download, we're done! */ g_debug ("[qfu-updater] no more files to download"); run_context_step_next (task, ctx->step + 1); } static gboolean download_image_firehose (QfuSaharaDevice *device, QfuImage *image, GCancellable *cancellable, GError **error) { guint sequence; guint n_blocks; if (!qfu_sahara_device_firehose_setup_download (device, image, &n_blocks, cancellable, error)) { g_prefix_error (error, "couldn't prepare download: "); return FALSE; } for (sequence = 0; sequence < n_blocks; sequence++) { if (!qfu_log_get_verbose_stdout ()) { if (n_blocks > 1) { g_print (CLEAR_LINE "%s %04.1lf%%", progress[sequence % G_N_ELEMENTS (progress)], 100.0 * ((gdouble) sequence / (gdouble) (n_blocks - 1))); } } if (!qfu_sahara_device_firehose_write_block (device, image, sequence, cancellable, error)) { g_prefix_error (error, "couldn't write in session: "); return FALSE; } } g_debug ("[qfu-updater] all blocks downloaded"); if (!qfu_log_get_verbose_stdout ()) g_print (CLEAR_LINE "finalizing download... (may take several minutes, be patient)\n"); if (!qfu_sahara_device_firehose_teardown_download (device, image, cancellable, error)) { g_prefix_error (error, "couldn't teardown download: "); return FALSE; } if (!qfu_log_get_verbose_stdout ()) g_print (CLEAR_LINE); g_debug ("[qfu-updater] sahara/firehose download finished"); return TRUE; } static gboolean download_image_qdl (QfuQdlDevice *device, QfuImage *image, GCancellable *cancellable, GError **error) { guint16 sequence; guint16 n_chunks; if (!qfu_qdl_device_hello (device, cancellable, error)) { g_prefix_error (error, "couldn't send greetings to device: "); return FALSE; } if (!qfu_qdl_device_ufopen (device, image, cancellable, error)) { g_prefix_error (error, "couldn't open session: "); return FALSE; } n_chunks = qfu_image_get_n_data_chunks (image); for (sequence = 0; sequence < n_chunks; sequence++) { if (!qfu_log_get_verbose_stdout ()) { /* Use n-1 chunks for progress reporting; because the last one will take * a lot longer. */ if (n_chunks > 1 && sequence < (n_chunks - 1)) g_print (CLEAR_LINE "%s %04.1lf%%", progress[sequence % G_N_ELEMENTS (progress)], 100.0 * ((gdouble) sequence / (gdouble) (n_chunks - 1))); else if (sequence == (n_chunks - 1)) g_print (CLEAR_LINE "finalizing download... (may take more than one minute, be patient)\n"); } if (!qfu_qdl_device_ufwrite (device, image, sequence, cancellable, error)) { g_prefix_error (error, "couldn't write in session: "); return FALSE; } } g_debug ("[qfu-updater] all chunks ack-ed"); if (!qfu_log_get_verbose_stdout ()) g_print (CLEAR_LINE); if (!qfu_qdl_device_ufclose (device, cancellable, error)) { g_prefix_error (error, "couldn't close session: "); return FALSE; } g_debug ("[qfu-updater] qdl/sdp download finished"); return TRUE; } static void run_context_step_download_image (GTask *task) { RunContext *ctx; GError *error = NULL; GCancellable *cancellable; GTimer *timer; gdouble elapsed; gchar *aux; ctx = (RunContext *) g_task_get_task_data (task); cancellable = g_task_get_cancellable (task); timer = g_timer_new (); aux = g_format_size ((guint64) qfu_image_get_size (ctx->current_image)); g_print ("downloading %s image: %s (%s)...\n", qfu_image_type_get_string (qfu_image_get_image_type (ctx->current_image)), qfu_image_get_display_name (ctx->current_image), aux); g_free (aux); /* QDL/SDP based download */ if (ctx->qdl_device) download_image_qdl (ctx->qdl_device, ctx->current_image, cancellable, &error); /* Sahara based download */ else if (ctx->sahara_device) download_image_firehose (ctx->sahara_device, ctx->current_image, cancellable, &error); else g_assert_not_reached (); elapsed = g_timer_elapsed (timer, NULL); g_timer_destroy (timer); if (error) { g_prefix_error (&error, "error downloading image: "); g_task_return_error (task, error); return; } aux = g_format_size ((guint64) ((qfu_image_get_size (ctx->current_image)) / elapsed)); g_print ("successfully downloaded in %.2lfs (%s/s)\n", elapsed, aux); g_free (aux); /* Go on */ run_context_step_next (task, ctx->step + 1); } static void run_context_step_select_image (GTask *task) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); g_assert (!ctx->current_image); g_assert (ctx->pending_images); /* Select new current image */ ctx->current_image = QFU_IMAGE (ctx->pending_images->data); ctx->pending_images = g_list_delete_link (ctx->pending_images, ctx->pending_images); g_debug ("[qfu-updater] selected file '%s' (%" G_GOFFSET_FORMAT " bytes)", qfu_image_get_display_name (ctx->current_image), qfu_image_get_size (ctx->current_image)); /* Go on */ run_context_step_next (task, ctx->step + 1); } static void run_context_step_select_device (GTask *task) { RunContext *ctx; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); g_assert (ctx->serial_file); g_assert (!ctx->qdl_device); g_assert (!ctx->sahara_device); /* Check if we can setup a Sahara device. Always check this first, because * the sahara stack is very sensitive to any kind of data sent to the port. */ ctx->sahara_device = qfu_sahara_device_new (ctx->serial_file, g_task_get_cancellable (task), &error); if (!ctx->sahara_device) { g_debug ("[qfu-updater] sahara device creation failed: %s", error->message); g_clear_error (&error); /* Check if we can setup a QDL device */ ctx->qdl_device = qfu_qdl_device_new (ctx->serial_file, g_task_get_cancellable (task), &error); if (!ctx->qdl_device) { g_debug ("[qfu-updater] qdl device creation failed: %s", error->message); g_clear_error (&error); } } if (!ctx->qdl_device && !ctx->sahara_device) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "unsupported download protocol"); g_object_unref (task); return; } run_context_step_next (task, ctx->step + 1); } static void wait_for_tty_ready (QfuDeviceSelection *device_selection, GAsyncResult *res, GTask *task) { GError *error = NULL; RunContext *ctx; gchar *path; ctx = (RunContext *) g_task_get_task_data (task); g_assert (!ctx->serial_file); ctx->serial_file = qfu_device_selection_wait_for_tty_finish (device_selection, res, &error); if (!ctx->serial_file) { g_prefix_error (&error, "error waiting for serial device in download mode: "); g_task_return_error (task, error); g_object_unref (task); return; } path = g_file_get_path (ctx->serial_file); g_debug ("[qfu-updater] serial device in download mode found: %s", path); g_free (path); g_print ("download mode detected\n"); /* Go on */ run_context_step_next (task, ctx->step + 1); } static void run_context_step_wait_for_tty (GTask *task) { QfuUpdater *self; self = g_task_get_source_object (task); g_print ("rebooting in download mode...\n"); g_debug ("[qfu-updater] reset requested, now waiting for serial device..."); qfu_device_selection_wait_for_tty (self->priv->device_selection, QFU_HELPERS_DEVICE_MODE_DOWNLOAD, g_task_get_cancellable (task), (GAsyncReadyCallback) wait_for_tty_ready, task); } static void run_context_step_cleanup_qmi_device (GTask *task) { RunContext *ctx; QmiDevice *tmp; ctx = (RunContext *) g_task_get_task_data (task); g_debug ("[qfu-updater] cleaning up QMI device..."); /* We don't release CID as we're going to reset anyway */ qmi_device_release_client (ctx->qmi_device, QMI_CLIENT (ctx->qmi_client), QMI_DEVICE_RELEASE_CLIENT_FLAGS_NONE, 10, NULL, NULL, NULL); g_clear_object (&ctx->qmi_client); /* We want to close and unref the QmiDevice only AFTER having set the wait * tasks for cdc-wdm or tty devices. This is because the close operation may * take a long time if doing QMI over MBIM (as the MBIM close async * operation is run internally). If we don't do this in this sequence, we * may end up getting udev events reported before the wait have started. */ tmp = g_object_ref (ctx->qmi_device); g_clear_object (&ctx->qmi_device); g_clear_object (&ctx->cdc_wdm_file); /* If nothing to download we don't need to wait for QDL download mode */ if (!ctx->pending_images) run_context_step_next_no_idle (task, RUN_CONTEXT_STEP_WAIT_FOR_CDC_WDM); else /* Go on */ run_context_step_next_no_idle (task, ctx->step + 1); /* After the wait operation has been started, we do run the close */ qmi_device_close_async (tmp, 10, NULL, NULL, NULL); g_object_unref (tmp); } static void reseter_run_ready (QfuReseter *reseter, GAsyncResult *res, GTask *task) { GError *error = NULL; RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); if (!qfu_reseter_run_finish (reseter, res, &error)) { g_prefix_error (&error, "boothold reseter operation failed: "); g_task_return_error (task, error); g_object_unref (task); return; } g_debug ("[qfu-updater] boothold reset requested successfully..."); /* Go on */ run_context_step_next (task, ctx->step + 1); } static void power_cycle_ready (QmiClientDms *qmi_client, GAsyncResult *res, GTask *task) { GError *error = NULL; RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); if (!qfu_utils_power_cycle_finish (qmi_client, res, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } g_debug ("[qfu-updater] reset requested successfully..."); /* Go on */ run_context_step_next (task, ctx->step + 1); } static void run_context_step_power_cycle (GTask *task) { RunContext *ctx; QfuUpdater *self; QfuReseter *reseter; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); g_debug ("[qfu-updater] power cycling..."); if (!ctx->boothold_reset) { qfu_utils_power_cycle (ctx->qmi_client, g_task_get_cancellable (task), (GAsyncReadyCallback) power_cycle_ready, task); return; } /* Boothold is required when firmware preference isn't supported; and if so, * there must always be images to download. The only case in which we don't * have images listed for download is when we're told that there is nothing * to download via firmware preference. */ g_assert (ctx->pending_images != NULL); /* Boothold reset */ reseter = qfu_reseter_new (self->priv->device_selection, ctx->qmi_client, self->priv->device_open_flags); qfu_reseter_run (reseter, g_task_get_cancellable (task), (GAsyncReadyCallback) reseter_run_ready, task); g_object_unref (reseter); } static void set_firmware_preference_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { RunContext *ctx; QmiMessageDmsSetFirmwarePreferenceOutput *output; GError *error = NULL; GArray *array = NULL; guint next_step; ctx = (RunContext *) g_task_get_task_data (task); output = qmi_client_dms_set_firmware_preference_finish (client, res, &error); if (!output) { g_prefix_error (&error, "QMI operation failed, couldn't set firmware preference: "); g_task_return_error (task, error); g_object_unref (task); return; } if (!qmi_message_dms_set_firmware_preference_output_get_result (output, &error)) { g_prefix_error (&error, "couldn't set firmware preference: "); g_task_return_error (task, error); g_object_unref (task); qmi_message_dms_set_firmware_preference_output_unref (output); return; } /* We'll go to next step, unless told to finish early */ next_step = ctx->step + 1; /* list images we need to download? */ if (qmi_message_dms_set_firmware_preference_output_get_image_download_list (output, &array, &error)) { if (!array->len) { g_print ("device already contains the given firmware/config version: no download needed\n"); g_print ("forcing the download may be requested with the --override-download option\n"); g_print ("now power cycling to apply the new firmware preference...\n"); g_list_free_full (ctx->pending_images, g_object_unref); ctx->pending_images = NULL; } else { GString *images = NULL; QmiDmsFirmwareImageType type; guint i; images = g_string_new (""); for (i = 0; i < array->len; i++) { type = g_array_index (array, QmiDmsFirmwareImageType, i); g_string_append (images, qmi_dms_firmware_image_type_get_string (type)); if (i < array->len -1) g_string_append (images, ", "); } g_debug ("[qfu-updater] need to download the following images: %s", images->str); g_string_free (images, TRUE); } } qmi_message_dms_set_firmware_preference_output_unref (output); /* Go on */ run_context_step_next (task, next_step); } static void run_context_step_set_firmware_preference (GTask *task) { QfuUpdater *self; RunContext *ctx; QmiMessageDmsSetFirmwarePreferenceInput *input; GArray *array; QmiMessageDmsSetFirmwarePreferenceInputListImage modem_image_id; QmiMessageDmsSetFirmwarePreferenceInputListImage pri_image_id; const gchar *firmware_version; const gchar *config_version; const gchar *carrier; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); firmware_version = self->priv->firmware_version ? self->priv->firmware_version : ctx->firmware_version; config_version = self->priv->config_version ? self->priv->config_version : ctx->config_version; carrier = self->priv->carrier ? self->priv->carrier : ctx->carrier; g_assert (firmware_version); g_assert (config_version); g_assert (carrier); g_print ("setting firmware preference:\n"); g_print (" firmware version: '%s'\n", firmware_version); g_print (" config version: '%s'\n", config_version); g_print (" carrier: '%s'\n", carrier); /* Set modem image info */ modem_image_id.type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; modem_image_id.unique_id = g_array_sized_new (FALSE, TRUE, sizeof (gchar), 16); g_array_insert_vals (modem_image_id.unique_id, 0, "?_?", 3); g_array_set_size (modem_image_id.unique_id, 16); modem_image_id.build_id = g_strdup_printf ("%s_?", firmware_version); /* Set pri image info */ pri_image_id.type = QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI; pri_image_id.unique_id = g_array_sized_new (FALSE, TRUE, sizeof (gchar), 16); g_array_insert_vals (pri_image_id.unique_id, 0, config_version, strlen (config_version)); g_array_set_size (pri_image_id.unique_id, 16); pri_image_id.build_id = g_strdup_printf ("%s_%s", firmware_version, carrier); array = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageDmsSetFirmwarePreferenceInputListImage), 2); g_array_append_val (array, modem_image_id); g_array_append_val (array, pri_image_id); input = qmi_message_dms_set_firmware_preference_input_new (); qmi_message_dms_set_firmware_preference_input_set_list (input, array, NULL); g_array_unref (array); if (self->priv->override_download) qmi_message_dms_set_firmware_preference_input_set_download_override (input, TRUE, NULL); if (self->priv->modem_storage_index > 0) qmi_message_dms_set_firmware_preference_input_set_modem_storage_index (input, (guint8) self->priv->modem_storage_index, NULL); g_debug ("[qfu-updater] setting firmware preference..."); g_debug ("[qfu-updater] modem image: unique id '%.16s', build id '%s'", (gchar *) (modem_image_id.unique_id->data), modem_image_id.build_id); g_debug ("[qfu-updater] pri image: unique id '%.16s', build id '%s'", (gchar *) (pri_image_id.unique_id->data), pri_image_id.build_id); g_debug ("[qfu-updater] override download: %s", self->priv->override_download ? "yes" : "no"); qmi_client_dms_set_firmware_preference (ctx->qmi_client, input, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) set_firmware_preference_ready, task); g_array_unref (modem_image_id.unique_id); g_free (modem_image_id.build_id); g_array_unref (pri_image_id.unique_id); g_free (pri_image_id.build_id); qmi_message_dms_set_firmware_preference_input_unref (input); } static gboolean validate_firmware_config_carrier (QfuUpdater *self, RunContext *ctx, GError **error) { GList *l; /* Try to preload information like firmware/config/carrier from CWE images */ for (l = ctx->pending_images; l; l = g_list_next (l)) { const gchar *firmware_version; const gchar *config_version; const gchar *carrier; QfuImageCwe *image; if (!QFU_IS_IMAGE_CWE (l->data)) continue; image = QFU_IMAGE_CWE (l->data); firmware_version = qfu_image_cwe_get_parsed_firmware_version (image); config_version = qfu_image_cwe_get_parsed_config_version (image); carrier = qfu_image_cwe_get_parsed_carrier (image); if (firmware_version) { if (!ctx->firmware_version) ctx->firmware_version = g_strdup (firmware_version); else if (!g_str_equal (firmware_version, ctx->firmware_version)) { if (!self->priv->ignore_version_errors) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, "couldn't detect firmware version: " "firmware version strings don't match on specified images: " "'%s' != '%s'", firmware_version, ctx->firmware_version); return FALSE; } g_warning ("firmware version strings don't match on specified images: " "'%s' != '%s' (IGNORED with --ignore-version-errors)", firmware_version, ctx->firmware_version); } } if (config_version) { if (!ctx->config_version) ctx->config_version = g_strdup (config_version); else if (!g_str_equal (config_version, ctx->config_version)) { if (!self->priv->ignore_version_errors) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, "couldn't detect config version: " "config version strings don't match on specified images: " "'%s' != '%s'", config_version, ctx->config_version); return FALSE; } g_warning ("[qfu-updater] config version strings don't match on specified images: " "'%s' != '%s' (IGNORED with --ignore-version-errors)", config_version, ctx->config_version); } } if (carrier) { if (!ctx->carrier) ctx->carrier = g_strdup (carrier); else if (!g_str_equal (carrier, ctx->carrier)) { if (!self->priv->ignore_version_errors) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, "couldn't detect carrier: " "carrier strings don't match on specified images: " "'%s' != '%s'", carrier, ctx->carrier); return FALSE; } g_warning ("[qfu-updater] carrier strings don't match on specified images: " "'%s' != '%s' (IGNORED with --ignore-version-errors)", carrier, ctx->carrier); } } } /* If given firmware version doesn't match the one in the image, error out */ if (self->priv->firmware_version && (g_strcmp0 (self->priv->firmware_version, ctx->firmware_version) != 0)) { if (!self->priv->ignore_version_errors) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, "error validating firmware version: " "user provided firmware version doesn't match the one in the specified images: " "'%s' != '%s'", self->priv->firmware_version, ctx->firmware_version); return FALSE; } g_warning ("[qfu-updater] user provided firmware version doesn't match the one in the specified images: " "'%s' != '%s' (IGNORED with --ignore-version-errors)", self->priv->firmware_version, ctx->firmware_version); } /* If given config version doesn't match the one in the image, error out */ if (self->priv->config_version && (g_strcmp0 (self->priv->config_version, ctx->config_version) != 0)) { if (!self->priv->ignore_version_errors) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, "error validating firmware version: " "user provided firmware version doesn't match the one in the specified images: " "'%s' != '%s'", self->priv->config_version, ctx->config_version); return FALSE; } g_warning ("[qfu-updater] user provided config version doesn't match the one in the specified images: " "'%s' != '%s' (IGNORED with --ignore-version-errors)", self->priv->firmware_version, ctx->firmware_version); } /* If given carrier doesn't match the one in the image, error out */ if (self->priv->carrier && (g_strcmp0 (self->priv->carrier, ctx->carrier) != 0)) { if (!self->priv->ignore_version_errors) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_PERMISSION_DENIED, "error validating carrier: " "user provided carrier doesn't match the one in the specified images: " "'%s' != '%s'", self->priv->carrier, ctx->carrier); return FALSE; } g_warning ("[qfu-updater] user provided carrier doesn't match the one in the specified images: " "'%s' != '%s' (IGNORED with --ignore-version-errors)", self->priv->carrier, ctx->carrier); } /* No firmware version? */ if (!self->priv->firmware_version && !ctx->firmware_version) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "firmware version required"); return FALSE; } /* No config version? */ if (!self->priv->config_version && !ctx->config_version) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "config version required"); return FALSE; } /* No carrier? */ if (!self->priv->carrier && !ctx->carrier) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "carrier required"); return FALSE; } return TRUE; } static void run_context_step_get_firmware_preference (GTask *task) { RunContext *ctx; QfuUpdater *self; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); if (!ctx->supports_firmware_preference_management) { /* Firmware preference setting not supported; fail if we got those settings explicitly */ if (self->priv->firmware_version || self->priv->config_version || self->priv->carrier) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "setting firmware/config/carrier is not supported by this device"); g_object_unref (task); return; } /* Jump to the reset step and run boothold there */ ctx->boothold_reset = TRUE; run_context_step_next (task, RUN_CONTEXT_STEP_POWER_CYCLE); return; } /* Firmware preference setting is supported so we require firmware/config/carrier */ if (!validate_firmware_config_carrier (self, ctx, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } /* Go on */ run_context_step_next (task, ctx->step + 1); } static void new_client_dms_ready (gpointer unused, GAsyncResult *res, GTask *task) { RunContext *ctx; QfuUpdater *self; GError *error = NULL; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); g_assert (!ctx->qmi_device); g_assert (!ctx->qmi_client); if (!qfu_utils_new_client_dms_finish (res, &ctx->qmi_device, &ctx->qmi_client, &ctx->revision, &ctx->supports_stored_image_management, &ctx->max_modem_storage_index, &ctx->supports_firmware_preference_management, &ctx->firmware_preference, &ctx->current_firmware, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } /* Validate modem storage index, if one specified */ if (self->priv->modem_storage_index > ctx->max_modem_storage_index) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_FAILED, "modem storage index out of bounds (%u > %u)", self->priv->modem_storage_index, ctx->max_modem_storage_index); g_object_unref (task); return; } /* Go on */ run_context_step_next (task, ctx->step + 1); } static void run_context_step_qmi_client (GTask *task) { RunContext *ctx; QfuUpdater *self; ctx = (RunContext *) g_task_get_task_data (task); self = g_task_get_source_object (task); g_print ("loading device information before the update...\n"); g_debug ("[qfu-updater] creating QMI DMS client..."); g_assert (ctx->cdc_wdm_file); qfu_utils_new_client_dms (ctx->cdc_wdm_file, 3, /* initially, up to 3 tries to allocate DMS client */ self->priv->device_open_flags, TRUE, g_task_get_cancellable (task), (GAsyncReadyCallback) new_client_dms_ready, task); } typedef void (* RunContextStepFunc) (GTask *task); static const RunContextStepFunc run_context_step_func[] = { [RUN_CONTEXT_STEP_QMI_CLIENT] = run_context_step_qmi_client, [RUN_CONTEXT_STEP_GET_FIRMWARE_PREFERENCE] = run_context_step_get_firmware_preference, [RUN_CONTEXT_STEP_SET_FIRMWARE_PREFERENCE] = run_context_step_set_firmware_preference, [RUN_CONTEXT_STEP_POWER_CYCLE] = run_context_step_power_cycle, [RUN_CONTEXT_STEP_CLEANUP_QMI_DEVICE] = run_context_step_cleanup_qmi_device, [RUN_CONTEXT_STEP_WAIT_FOR_TTY] = run_context_step_wait_for_tty, [RUN_CONTEXT_STEP_SELECT_DEVICE] = run_context_step_select_device, [RUN_CONTEXT_STEP_SELECT_IMAGE] = run_context_step_select_image, [RUN_CONTEXT_STEP_DOWNLOAD_IMAGE] = run_context_step_download_image, [RUN_CONTEXT_STEP_CLEANUP_IMAGE] = run_context_step_cleanup_image, [RUN_CONTEXT_STEP_CLEANUP_DEVICE] = run_context_step_cleanup_device, [RUN_CONTEXT_STEP_WAIT_FOR_CDC_WDM] = run_context_step_wait_for_cdc_wdm, [RUN_CONTEXT_STEP_WAIT_FOR_BOOT] = run_context_step_wait_for_boot, [RUN_CONTEXT_STEP_QMI_CLIENT_AFTER] = run_context_step_qmi_client_after, [RUN_CONTEXT_STEP_CLEANUP_QMI_DEVICE_FULL] = run_context_step_cleanup_qmi_device_full, }; G_STATIC_ASSERT (G_N_ELEMENTS (run_context_step_func) == RUN_CONTEXT_STEP_LAST); static void run_context_step (GTask *task) { RunContext *ctx; ctx = (RunContext *) g_task_get_task_data (task); /* Early halt operation if cancelled */ if (g_task_return_error_if_cancelled (task)) { g_object_unref (task); return; } if (ctx->step < G_N_ELEMENTS (run_context_step_func)) { run_context_step_func [ctx->step] (task); return; } g_debug ("[qfu-updater] operation finished"); run_context_step_last (task); } static gint image_sort_by_size (QfuImage *a, QfuImage *b) { return qfu_image_get_size (b) - qfu_image_get_size (a); } static gboolean preload_images (RunContext *ctx, GList *image_file_list, GCancellable *cancellable, GError **error) { GList *l; /* Build QfuImage objects for each image file given */ for (l = image_file_list; l; l = g_list_next (l)) { QfuImage *image; image = qfu_image_factory_build (G_FILE (l->data), cancellable, error); if (!image) return FALSE; ctx->pending_images = g_list_append (ctx->pending_images, image); } /* Sort by size, we want to download bigger images first, as that is usually * the use case anyway, first flash e.g. the .cwe file, then the .nvu one. */ ctx->pending_images = g_list_sort (ctx->pending_images, (GCompareFunc) image_sort_by_size); return TRUE; } void qfu_updater_run (QfuUpdater *self, GList *image_file_list, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { RunContext *ctx; GTask *task; GError *error = NULL; g_assert (image_file_list); ctx = g_slice_new0 (RunContext); task = g_task_new (self, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify) run_context_free); if (!preload_images (ctx, image_file_list, cancellable, &error)) { g_task_return_error (task, error); g_object_unref (task); return; } switch (self->priv->type) { case UPDATER_TYPE_GENERIC: ctx->step = RUN_CONTEXT_STEP_QMI_CLIENT; ctx->cdc_wdm_file = qfu_device_selection_get_single_cdc_wdm (self->priv->device_selection); if (!ctx->cdc_wdm_file) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, "No cdc-wdm device found to run update operation"); g_object_unref (task); return; } break; case UPDATER_TYPE_DOWNLOAD: ctx->step = RUN_CONTEXT_STEP_SELECT_DEVICE; ctx->serial_file = qfu_device_selection_get_single_tty (self->priv->device_selection, QFU_HELPERS_DEVICE_MODE_DOWNLOAD); if (!ctx->serial_file) { g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT, "No serial device in download mode found to run QDL update operation"); g_object_unref (task); return; } break; case UPDATER_TYPE_UNKNOWN: default: g_assert_not_reached (); } run_context_step (task); } /******************************************************************************/ QfuUpdater * qfu_updater_new (QfuDeviceSelection *device_selection, const gchar *firmware_version, const gchar *config_version, const gchar *carrier, QmiDeviceOpenFlags device_open_flags, gboolean ignore_version_errors, gboolean override_download, guint8 modem_storage_index, gboolean skip_validation) { QfuUpdater *self; g_assert (QFU_IS_DEVICE_SELECTION (device_selection)); self = g_object_new (QFU_TYPE_UPDATER, NULL); self->priv->type = UPDATER_TYPE_GENERIC; self->priv->device_selection = g_object_ref (device_selection); self->priv->device_open_flags = device_open_flags; self->priv->firmware_version = (firmware_version ? g_strdup (firmware_version) : NULL); self->priv->config_version = (config_version ? g_strdup (config_version) : NULL); self->priv->carrier = (carrier ? g_strdup (carrier) : NULL); self->priv->ignore_version_errors = ignore_version_errors; self->priv->override_download = override_download; self->priv->modem_storage_index = modem_storage_index; self->priv->skip_validation = skip_validation; return self; } QfuUpdater * qfu_updater_new_download (QfuDeviceSelection *device_selection) { QfuUpdater *self; g_assert (QFU_IS_DEVICE_SELECTION (device_selection)); self = g_object_new (QFU_TYPE_UPDATER, NULL); self->priv->type = UPDATER_TYPE_DOWNLOAD; self->priv->device_selection = g_object_ref (device_selection); return self; } static void qfu_updater_init (QfuUpdater *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, QFU_TYPE_UPDATER, QfuUpdaterPrivate); self->priv->type = UPDATER_TYPE_UNKNOWN; } static void dispose (GObject *object) { QfuUpdater *self = QFU_UPDATER (object); g_clear_object (&self->priv->device_selection); G_OBJECT_CLASS (qfu_updater_parent_class)->dispose (object); } static void finalize (GObject *object) { QfuUpdater *self = QFU_UPDATER (object); g_free (self->priv->firmware_version); g_free (self->priv->config_version); g_free (self->priv->carrier); G_OBJECT_CLASS (qfu_updater_parent_class)->finalize (object); } static void qfu_updater_class_init (QfuUpdaterClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (object_class, sizeof (QfuUpdaterPrivate)); object_class->dispose = dispose; object_class->finalize = finalize; } libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-updater.h000066400000000000000000000065111455567757300227430ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_UPDATER_H #define QFU_UPDATER_H #include #include #include "qfu-device-selection.h" G_BEGIN_DECLS #define QFU_TYPE_UPDATER (qfu_updater_get_type ()) #define QFU_UPDATER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), QFU_TYPE_UPDATER, QfuUpdater)) #define QFU_UPDATER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), QFU_TYPE_UPDATER, QfuUpdaterClass)) #define QFU_IS_UPDATER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), QFU_TYPE_UPDATER)) #define QFU_IS_UPDATER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), QFU_TYPE_UPDATER)) #define QFU_UPDATER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), QFU_TYPE_UPDATER, QfuUpdaterClass)) typedef struct _QfuUpdater QfuUpdater; typedef struct _QfuUpdaterClass QfuUpdaterClass; typedef struct _QfuUpdaterPrivate QfuUpdaterPrivate; struct _QfuUpdater { GObject parent; QfuUpdaterPrivate *priv; }; struct _QfuUpdaterClass { GObjectClass parent; }; GType qfu_updater_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (QfuUpdater, g_object_unref); QfuUpdater *qfu_updater_new (QfuDeviceSelection *device_selection, const gchar *firmware_version, const gchar *config_version, const gchar *carrier, QmiDeviceOpenFlags device_open_flags, gboolean ignore_version_errors, gboolean override_download, guint8 modem_storage_index, gboolean skip_validation); QfuUpdater *qfu_updater_new_download (QfuDeviceSelection *device_selection); void qfu_updater_run (QfuUpdater *self, GList *image_file_list, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qfu_updater_run_finish (QfuUpdater *self, GAsyncResult *res, GError **error); G_END_DECLS #endif /* QFU_UPDATER_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-utils.c000066400000000000000000000656541455567757300224470ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado * * crc16 and HDLC escape code borrowed from modemmanager/libqcdm * Copyright (C) 2010 Red Hat, Inc. */ #include #include #include #include #include "qfu-utils.h" /******************************************************************************/ gchar * qfu_utils_str_hex (gconstpointer mem, gsize size, gchar delimiter) { const guint8 *data = mem; gsize i; gsize j; gsize new_str_length; gchar *new_str; /* Get new string length. If input string has N bytes, we need: * - 1 byte for last NUL char * - 2N bytes for hexadecimal char representation of each byte... * - N-1 bytes for the separator ':' * So... a total of (1+2N+N-1) = 3N bytes are needed... */ new_str_length = 3 * size; /* Allocate memory for new array and initialize contents to NUL */ new_str = g_malloc0 (new_str_length); /* Print hexadecimal representation of each byte... */ for (i = 0, j = 0; i < size; i++, j += 3) { /* Print character in output string... */ snprintf (&new_str[j], 3, "%02X", data[i]); /* And if needed, add separator */ if (i != (size - 1) ) new_str[j + 2] = delimiter; } /* Set output string */ return new_str; } /******************************************************************************/ gchar * qfu_utils_get_firmware_image_unique_id_printable (const GArray *unique_id) { gchar *unique_id_str; guint i; guint n_ascii = 0; gboolean end = FALSE; #define UNIQUE_ID_LEN 16 g_warn_if_fail (unique_id->len <= UNIQUE_ID_LEN); unique_id_str = g_malloc0 (UNIQUE_ID_LEN + 1); memcpy (unique_id_str, unique_id->data, UNIQUE_ID_LEN); /* We want an ASCII string that, if finished before the 16 bytes, * is suffixed with NUL bytes. */ for (i = 0; i < UNIQUE_ID_LEN; i++) { /* If a byte isn't ASCII, stop */ if (unique_id_str[i] & 0x80) break; /* If string isn't finished yet... */ if (!end) { /* String finished now */ if (unique_id_str[i] == '\0') end = TRUE; else n_ascii++; } else { /* String finished but we then got * another ASCII byte? not possible */ if (unique_id_str[i] != '\0') break; } } if (i == UNIQUE_ID_LEN && n_ascii > 0) return unique_id_str; #undef UNIQUE_ID_LEN g_free (unique_id_str); /* Get a raw hex string otherwise */ unique_id_str = qfu_utils_str_hex (unique_id->data, unique_id->len, ':'); return unique_id_str; } /******************************************************************************/ /* Table of CRCs for each possible byte, with a generator polynomial of 0x8408 */ static const guint16 crc_table[256] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 }; /* Calculate the CRC for a buffer using a seed of 0xffff */ guint16 qfu_utils_crc16 (const guint8 *buffer, gsize len) { guint16 crc = 0xffff; while (len--) crc = crc_table[(crc ^ *buffer++) & 0xff] ^ (crc >> 8); return ~crc; } /******************************************************************************/ gboolean qfu_utils_parse_cwe_version_string (const gchar *version, gchar **firmware_version, gchar **config_version, gchar **carrier, GError **error) { GRegex *regex; GMatchInfo *match_info = NULL; gboolean result = FALSE; regex = g_regex_new ("(?:.*)" "_([0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9]\\.[0-9][0-9])" /* firmware version */ "(?:" "(?:.*)" "_([a-zA-Z\\-]+)" /* carrier */ "_([0-9][0-9][0-9]\\.[0-9][0-9][0-9]_[0-9][0-9][0-9])" /* config version */ ")?", 0, 0, NULL); g_assert (regex); if (!g_regex_match_full (regex, version, strlen (version), 0, 0, &match_info, NULL)) { g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "couldn't parse CWE version string '%s': didn't match", version); goto out; } if (firmware_version) *firmware_version = g_match_info_fetch (match_info, 1); if (carrier) *carrier = (g_match_info_get_match_count (match_info) > 2 ? g_match_info_fetch (match_info, 2) : NULL); if (config_version) *config_version = (g_match_info_get_match_count (match_info) > 3 ? g_match_info_fetch (match_info, 3) : NULL); result = TRUE; out: g_match_info_free (match_info); g_regex_unref (regex); return result; } /******************************************************************************/ typedef struct { QmiDevice *qmi_device; QmiDeviceOpenFlags device_open_flags; gint qmi_client_retries; QmiClientDms *qmi_client; gboolean load_capabilities; gchar *revision; gboolean revision_done; gboolean supports_stored_image_management; gboolean supports_stored_image_management_done; guint8 max_storage_index; gboolean supports_firmware_preference_management; QmiMessageDmsGetFirmwarePreferenceOutput *firmware_preference; gboolean supports_firmware_preference_management_done; QmiMessageDmsSwiGetCurrentFirmwareOutput *current_firmware; gboolean supports_current_firmware_done; } NewClientDmsContext; static void new_client_dms_context_free (NewClientDmsContext *ctx) { if (ctx->current_firmware) qmi_message_dms_swi_get_current_firmware_output_unref (ctx->current_firmware); if (ctx->firmware_preference) qmi_message_dms_get_firmware_preference_output_unref (ctx->firmware_preference); if (ctx->qmi_client) g_object_unref (ctx->qmi_client); if (ctx->qmi_device) g_object_unref (ctx->qmi_device); g_free (ctx->revision); g_slice_free (NewClientDmsContext, ctx); } gboolean qfu_utils_new_client_dms_finish (GAsyncResult *res, QmiDevice **qmi_device, QmiClientDms **qmi_client, gchar **revision, gboolean *supports_stored_image_management, guint8 *max_storage_index, gboolean *supports_firmware_preference_management, QmiMessageDmsGetFirmwarePreferenceOutput **firmware_preference, QmiMessageDmsSwiGetCurrentFirmwareOutput **current_firmware, GError **error) { NewClientDmsContext *ctx; if (!g_task_propagate_boolean (G_TASK (res), error)) return FALSE; ctx = g_task_get_task_data (G_TASK (res)); if (qmi_device) *qmi_device = g_object_ref (ctx->qmi_device); if (qmi_client) *qmi_client = g_object_ref (ctx->qmi_client); if (revision) *revision = (ctx->revision ? g_strdup (ctx->revision) : NULL); if (supports_stored_image_management) *supports_stored_image_management = ctx->supports_stored_image_management; if (max_storage_index) *max_storage_index = ctx->max_storage_index; if (supports_firmware_preference_management) *supports_firmware_preference_management = ctx->supports_firmware_preference_management; if (firmware_preference) *firmware_preference = (ctx->firmware_preference ? qmi_message_dms_get_firmware_preference_output_ref (ctx->firmware_preference) : NULL); if (current_firmware) *current_firmware = (ctx->current_firmware ? qmi_message_dms_swi_get_current_firmware_output_ref (ctx->current_firmware) : NULL); return TRUE; } static void check_capabilities_done (GTask *task) { NewClientDmsContext *ctx; ctx = g_task_get_task_data (task); if (!ctx->revision_done || !ctx->supports_stored_image_management_done || !ctx->supports_firmware_preference_management_done || !ctx->supports_current_firmware_done) return; /* All done! */ g_task_return_boolean (task, TRUE); g_object_unref (task); } static void dms_get_revision_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { QmiMessageDmsGetRevisionOutput *output; const gchar *str = NULL; NewClientDmsContext *ctx; ctx = g_task_get_task_data (task); output = qmi_client_dms_get_revision_finish (client, res, NULL); if (output && qmi_message_dms_get_revision_output_get_result (output, NULL)) qmi_message_dms_get_revision_output_get_revision (output, &str, NULL); if (str) { g_debug ("[qfu,utils] current revision loaded: %s", str); ctx->revision = g_strdup (str); } if (output) qmi_message_dms_get_revision_output_unref (output); ctx->revision_done = TRUE; check_capabilities_done (task); } static void dms_list_stored_images_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { QmiMessageDmsListStoredImagesOutput *output; NewClientDmsContext *ctx; ctx = g_task_get_task_data (task); output = qmi_client_dms_list_stored_images_finish (client, res, NULL); ctx->supports_stored_image_management = (output && qmi_message_dms_list_stored_images_output_get_result (output, NULL)); if (ctx->supports_stored_image_management) { GArray *array; guint i; qmi_message_dms_list_stored_images_output_get_list (output, &array, NULL); for (i = 0; i < array->len; i++) { QmiMessageDmsListStoredImagesOutputListImage *image; image = &g_array_index (array, QmiMessageDmsListStoredImagesOutputListImage, i); if (image->type == QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM) { ctx->max_storage_index = image->maximum_images; break; } } } if (output) qmi_message_dms_list_stored_images_output_unref (output); ctx->supports_stored_image_management_done = TRUE; check_capabilities_done (task); } static void dms_get_firmware_preference_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { QmiMessageDmsGetFirmwarePreferenceOutput *output; NewClientDmsContext *ctx; ctx = g_task_get_task_data (task); output = qmi_client_dms_get_firmware_preference_finish (client, res, NULL); ctx->supports_firmware_preference_management = (output && qmi_message_dms_get_firmware_preference_output_get_result (output, NULL)); /* Log the current firmware preference */ if (ctx->supports_firmware_preference_management) { GArray *array; guint i; g_debug ("[qfu,utils] current firmware preference loaded:"); /* Store */ ctx->firmware_preference = qmi_message_dms_get_firmware_preference_output_ref (output); qmi_message_dms_get_firmware_preference_output_get_list (output, &array, NULL); if (array->len > 0) { for (i = 0; i < array->len; i++) { QmiMessageDmsGetFirmwarePreferenceOutputListImage *image; gchar *unique_id_str; image = &g_array_index (array, QmiMessageDmsGetFirmwarePreferenceOutputListImage, i); unique_id_str = qfu_utils_get_firmware_image_unique_id_printable (image->unique_id); g_debug ("[qfu,utils] [image %u]", i); g_debug ("[qfu,utils] \tImage type: '%s'", qmi_dms_firmware_image_type_get_string (image->type)); g_debug ("[qfu,utils] \tUnique ID: '%s'", unique_id_str); g_debug ("[qfu,utils] \tBuild ID: '%s'", image->build_id); g_free (unique_id_str); } } else g_debug ("[qfu,utils] no images specified"); } if (output) qmi_message_dms_get_firmware_preference_output_unref (output); ctx->supports_firmware_preference_management_done = TRUE; check_capabilities_done (task); } static void swi_get_current_firmware_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { QmiMessageDmsSwiGetCurrentFirmwareOutput *output; NewClientDmsContext *ctx; ctx = g_task_get_task_data (task); output = qmi_client_dms_swi_get_current_firmware_finish (client, res, NULL); if (output) { if (qmi_message_dms_swi_get_current_firmware_output_get_result (output, NULL)) ctx->current_firmware = output; else qmi_message_dms_swi_get_current_firmware_output_unref (output); } ctx->supports_current_firmware_done = TRUE; check_capabilities_done (task); } static void retry_allocate_qmi_client (GTask *task); static void qmi_client_ready (QmiDevice *device, GAsyncResult *res, GTask *task) { NewClientDmsContext *ctx; GError *error = NULL; ctx = (NewClientDmsContext *) g_task_get_task_data (task); ctx->qmi_client = QMI_CLIENT_DMS (qmi_device_allocate_client_finish (device, res, &error)); if (!ctx->qmi_client) { /* If this was the last attempt, error out */ if (!ctx->qmi_client_retries) { g_prefix_error (&error, "couldn't allocate DMS QMI client: "); g_task_return_error (task, error); g_object_unref (task); return; } /* Retry allocation */ g_debug ("[qfu,utils] DMS QMI client allocation failed: %s", error->message); g_error_free (error); g_debug ("[qfu,utils] retrying..."); retry_allocate_qmi_client (task); return; } g_debug ("[qfu,utils] DMS QMI client allocated"); /* If loading capabilities not required, we're done */ if (!ctx->load_capabilities) { g_task_return_boolean (task, TRUE); g_object_unref (task); return; } /* Query capabilities */ qmi_client_dms_get_revision (ctx->qmi_client, NULL, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) dms_get_revision_ready, task); qmi_client_dms_list_stored_images (ctx->qmi_client, NULL, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) dms_list_stored_images_ready, task); qmi_client_dms_get_firmware_preference (ctx->qmi_client, NULL, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) dms_get_firmware_preference_ready, task); qmi_client_dms_swi_get_current_firmware (ctx->qmi_client, NULL, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) swi_get_current_firmware_ready, task); } static void retry_allocate_qmi_client (GTask *task) { NewClientDmsContext *ctx; ctx = (NewClientDmsContext *) g_task_get_task_data (task); /* Consume one retry attempt */ ctx->qmi_client_retries--; g_assert (ctx->qmi_client_retries >= 0); g_debug ("[qfu,utils] allocating new DMS QMI client..."); qmi_device_allocate_client (ctx->qmi_device, QMI_SERVICE_DMS, QMI_CID_NONE, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) qmi_client_ready, task); } static void qmi_device_open_ready (QmiDevice *device, GAsyncResult *res, GTask *task) { GError *error = NULL; if (!qmi_device_open_finish (device, res, &error)) { g_prefix_error (&error, "couldn't open QMI device: "); g_task_return_error (task, error); g_object_unref (task); return; } g_debug ("[qfu,utils] QMI device open"); retry_allocate_qmi_client (task); } static void qmi_device_ready (GObject *source, GAsyncResult *res, GTask *task) { NewClientDmsContext *ctx; GError *error = NULL; ctx = (NewClientDmsContext *) g_task_get_task_data (task); ctx->qmi_device = qmi_device_new_finish (res, &error); if (!ctx->qmi_device) { g_prefix_error (&error, "couldn't create QMI device: "); g_task_return_error (task, error); g_object_unref (task); return; } g_debug ("[qfu,utils] QMI device created"); g_debug ("[qfu,utils] opening QMI device (%s proxy, %s mode)...", (ctx->device_open_flags & QMI_DEVICE_OPEN_FLAGS_PROXY) ? "with" : "without", (ctx->device_open_flags & QMI_DEVICE_OPEN_FLAGS_MBIM) ? "mbim" : "qmi"); qmi_device_open (ctx->qmi_device, ctx->device_open_flags | QMI_DEVICE_OPEN_FLAGS_SYNC, 20, g_task_get_cancellable (task), (GAsyncReadyCallback) qmi_device_open_ready, task); } void qfu_utils_new_client_dms (GFile *cdc_wdm_file, guint retries, QmiDeviceOpenFlags device_open_flags, gboolean load_capabilities, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; NewClientDmsContext *ctx; ctx = g_slice_new0 (NewClientDmsContext); ctx->qmi_client_retries = retries; ctx->device_open_flags = device_open_flags; ctx->load_capabilities = load_capabilities; task = g_task_new (NULL, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify) new_client_dms_context_free); g_debug ("[qfu,utils] creating QMI device..."); qmi_device_new (cdc_wdm_file, g_task_get_cancellable (task), (GAsyncReadyCallback) qmi_device_ready, task); } /******************************************************************************/ typedef enum { POWER_CYCLE_STEP_OFFLINE, POWER_CYCLE_STEP_RESET, POWER_CYCLE_STEP_DONE, } PowerCycleStep; typedef struct { QmiClientDms *qmi_client; PowerCycleStep step; } PowerCycleContext; static void power_cycle_context_free (PowerCycleContext *ctx) { g_object_unref (ctx->qmi_client); g_slice_free (PowerCycleContext, ctx); } gboolean qfu_utils_power_cycle_finish (QmiClientDms *qmi_client, GAsyncResult *res, GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void power_cycle_step (GTask *task); static void power_cycle_step_ready (QmiClientDms *qmi_client, GAsyncResult *res, GTask *task) { QmiMessageDmsSetOperatingModeOutput *output; GError *error = NULL; PowerCycleContext *ctx; ctx = (PowerCycleContext *) g_task_get_task_data (task); output = qmi_client_dms_set_operating_mode_finish (qmi_client, res, &error); if (!output) { g_prefix_error (&error, "QMI operation failed: couldn't set operating mode: "); g_task_return_error (task, error); g_object_unref (task); return; } if (!qmi_message_dms_set_operating_mode_output_get_result (output, &error)) { g_prefix_error (&error, "couldn't set operating mode: "); g_task_return_error (task, error); g_object_unref (task); qmi_message_dms_set_operating_mode_output_unref (output); return; } g_debug ("[qfu,utils] operating mode set successfully..."); qmi_message_dms_set_operating_mode_output_unref (output); /* Go on */ ctx->step++; power_cycle_step (task); } static void power_cycle_step (GTask *task) { QmiMessageDmsSetOperatingModeInput *input; QmiDmsOperatingMode mode; PowerCycleContext *ctx; ctx = (PowerCycleContext *) g_task_get_task_data (task); switch (ctx->step) { case POWER_CYCLE_STEP_OFFLINE: mode = QMI_DMS_OPERATING_MODE_OFFLINE; break; case POWER_CYCLE_STEP_RESET: mode = QMI_DMS_OPERATING_MODE_RESET; break; case POWER_CYCLE_STEP_DONE: /* Finished! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; default: g_assert_not_reached (); } input = qmi_message_dms_set_operating_mode_input_new (); qmi_message_dms_set_operating_mode_input_set_mode (input, mode, NULL); qmi_client_dms_set_operating_mode (ctx->qmi_client, input, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) power_cycle_step_ready, task); qmi_message_dms_set_operating_mode_input_unref (input); } void qfu_utils_power_cycle (QmiClientDms *qmi_client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; PowerCycleContext *ctx; ctx = g_slice_new0 (PowerCycleContext); ctx->step = POWER_CYCLE_STEP_OFFLINE; ctx->qmi_client = g_object_ref (qmi_client); task = g_task_new (NULL, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify) power_cycle_context_free); power_cycle_step (task); } /******************************************************************************/ #if defined MM_RUNTIME_CHECK_ENABLED gboolean qfu_utils_modemmanager_running (gboolean *mm_running, GError **error) { GDBusConnection *connection; GVariant *response; GError *inner_error = NULL; g_assert (mm_running); connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, error); if (!connection) { g_prefix_error (error, "Couldn't get system bus: "); return FALSE; } response = g_dbus_connection_call_sync (connection, "org.freedesktop.ModemManager1", "/org/freedesktop/ModemManager1", "org.freedesktop.DBus.Peer", "Ping", NULL, NULL, G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL, &inner_error); if (!response) { g_debug ("[qfu-utils] couldn't ping ModemManager: %s", inner_error->message); g_error_free (inner_error); *mm_running = FALSE; } else { *mm_running = TRUE; g_variant_unref (response); } g_object_unref (connection); return TRUE; } #endif libqmi-1.35.2-dev/src/qmi-firmware-update/qfu-utils.h000066400000000000000000000075241455567757300224440ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Bjørn Mork * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016-2017 Aleksander Morgado */ #ifndef QFU_UTILS_H #define QFU_UTILS_H #include "config.h" #include #include #include G_BEGIN_DECLS gchar *qfu_utils_str_hex (gconstpointer mem, gsize size, gchar delimiter); gchar *qfu_utils_get_firmware_image_unique_id_printable (const GArray *unique_id); guint16 qfu_utils_crc16 (const guint8 *buffer, gsize len); gboolean qfu_utils_parse_cwe_version_string (const gchar *version, gchar **firmware_version, gchar **config_version, gchar **carrier, GError **error); void qfu_utils_new_client_dms (GFile *cdc_wdm_file, guint retries, QmiDeviceOpenFlags device_open_flags, gboolean load_capabilities, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qfu_utils_new_client_dms_finish (GAsyncResult *res, QmiDevice **qmi_device, QmiClientDms **qmi_client, gchar **revision, gboolean *supports_stored_image_management, guint8 *max_storage_index, gboolean *supports_firmware_preference_management, QmiMessageDmsGetFirmwarePreferenceOutput **firmware_preference, QmiMessageDmsSwiGetCurrentFirmwareOutput **current_firmware, GError **error); void qfu_utils_power_cycle (QmiClientDms *qmi_client, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean qfu_utils_power_cycle_finish (QmiClientDms *qmi_client, GAsyncResult *res, GError **error); #if defined MM_RUNTIME_CHECK_ENABLED gboolean qfu_utils_modemmanager_running (gboolean *mm_running, GError **error); #endif G_END_DECLS #endif /* QFU_UTILS_H */ libqmi-1.35.2-dev/src/qmi-firmware-update/test/000077500000000000000000000000001455567757300213115ustar00rootroot00000000000000libqmi-1.35.2-dev/src/qmi-firmware-update/test/meson.build000066400000000000000000000012711455567757300234540ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez test_units = { 'test-utils': {'dependencies': libutils_dep}, 'test-firehose': {'dependencies': libfirehose_dep}, } test_env += { 'G_TEST_BUILDDIR': meson.current_build_dir(), 'G_TEST_SRCDIR': meson.current_source_dir(), } foreach test_name, test_args: test_units exe = executable( # FIXME: added `firm` prefix to avoid target name collision 'firm-' + test_name, sources: test_name + '.c', include_directories: top_inc, c_args: '-DLIBQMI_GLIB_COMPILATION', kwargs: test_args, ) test( test_name, exe, env: test_env, ) endforeach libqmi-1.35.2-dev/src/qmi-firmware-update/test/test-firehose.c000066400000000000000000000066511455567757300242460ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Zodiac Inflight Innovations * Copyright (C) 2019 Aleksander Morgado */ #include "qfu-firehose-message.h" static void test_firehose_response_ack_parser_value (void) { const gchar *rsp = "\n\n\n"; gchar *value = NULL; gchar *rawmode = NULL; g_assert (qfu_firehose_message_parse_response_ack (rsp, &value, &rawmode)); g_assert_cmpstr (value, ==, "ACK"); g_assert (rawmode == NULL); g_clear_pointer (&value, g_free); } static void test_firehose_response_ack_parser_value_rawmode (void) { const gchar *rsp = "\n\n\n"; gchar *value = NULL; gchar *rawmode = NULL; g_assert (qfu_firehose_message_parse_response_ack (rsp, &value, &rawmode)); g_assert_cmpstr (value, ==, "ACK"); g_assert_cmpstr (rawmode, ==, "true"); g_clear_pointer (&value, g_free); g_clear_pointer (&rawmode, g_free); } static void test_firehose_response_configure_parser (void) { const gchar *rsp = "\n\n\n"; guint number = 0; g_assert (qfu_firehose_message_parse_response_configure (rsp, &number)); g_assert_cmpuint (number, ==, 8192); } static void test_firehose_log_parser_value (void) { const gchar *rsp = "\n\n\n"; gchar *value = NULL; g_assert (qfu_firehose_message_parse_log (rsp, &value)); g_assert_cmpstr (value, ==, "SWI supported functions: CWE"); g_clear_pointer (&value, g_free); } /******************************************************************************/ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); g_test_add_func ("/qmi-firmware-update/firehose/response-ack-parser/value", test_firehose_response_ack_parser_value); g_test_add_func ("/qmi-firmware-update/firehose/response-ack-varser/value-rawmode", test_firehose_response_ack_parser_value_rawmode); g_test_add_func ("/qmi-firmware-update/firehose/response-configure-parser", test_firehose_response_configure_parser); g_test_add_func ("/qmi-firmware-update/firehose/log-parser/value", test_firehose_log_parser_value); return g_test_run (); } libqmi-1.35.2-dev/src/qmi-firmware-update/test/test-utils.c000066400000000000000000000074221455567757300235770ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-firmware-update -- Command line tool to update firmware in QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2016 Zodiac Inflight Innovations * Copyright (C) 2016 Aleksander Morgado */ #include "qfu-utils.h" /******************************************************************************/ static void common_version_parser_test (const gchar *version, const gchar *expected_firmware_version, const gchar *expected_config_version, const gchar *expected_carrier) { gboolean res; GError *error = NULL; gchar *firmware_version = NULL; gchar *config_version = NULL; gchar *carrier = NULL; res = qfu_utils_parse_cwe_version_string (version, &firmware_version, &config_version, &carrier, &error); g_assert_no_error (error); g_assert (res); g_assert_cmpstr (firmware_version, ==, expected_firmware_version); g_assert_cmpstr (config_version, ==, expected_config_version); g_assert_cmpstr (carrier, ==, expected_carrier); g_free (firmware_version); g_free (config_version); g_free (carrier); } static void test_cwe_version_parser_mc7700 (void) { common_version_parser_test ("9999999_9999999_9200_03.05.29.03_00_generic_000.000_001_SPKG_MC", "03.05.29.03", "000.000_001", "generic"); } static void test_cwe_version_parser_mc7354_cwe (void) { common_version_parser_test ("INTERNAL_?_SWI9X15C_05.05.63.01_?_?_?_?", "05.05.63.01", NULL, NULL); } static void test_cwe_version_parser_mc7354_nvu (void) { common_version_parser_test ("9999999_9902350_SWI9X15C_05.05.63.01_00_SPRINT_005.037_000", "05.05.63.01", "005.037_000", "SPRINT"); } static void test_cwe_version_parser_mc7354b_spk (void) { common_version_parser_test ("9999999_9902574_SWI9X15C_05.05.66.00_00_GENNA-UMTS_005.028_000", "05.05.66.00", "005.028_000", "GENNA-UMTS"); } /******************************************************************************/ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); g_test_add_func ("/qmi-firmware-update/cwe-version-parser/mc7700", test_cwe_version_parser_mc7700); g_test_add_func ("/qmi-firmware-update/cwe-version-parser/mc7354/cwe", test_cwe_version_parser_mc7354_cwe); g_test_add_func ("/qmi-firmware-update/cwe-version-parser/mc7354/nvu", test_cwe_version_parser_mc7354_nvu); g_test_add_func ("/qmi-firmware-update/cwe-version-parser/mc7354b/spk", test_cwe_version_parser_mc7354b_spk); return g_test_run (); } libqmi-1.35.2-dev/src/qmi-proxy/000077500000000000000000000000001455567757300164175ustar00rootroot00000000000000libqmi-1.35.2-dev/src/qmi-proxy/meson.build000066400000000000000000000004461455567757300205650ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez name = 'qmi-proxy' executable( name, sources: name + '.c', include_directories: top_inc, dependencies: libqmi_glib_dep, install: true, install_dir: qmi_libexecdir, ) libqmi-1.35.2-dev/src/qmi-proxy/qmi-proxy.c000066400000000000000000000162401455567757300205330ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmi-proxy -- A proxy to communicate with QMI ports * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2013-2023 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include #include #define PROGRAM_NAME "qmi-proxy" #define PROGRAM_VERSION PACKAGE_VERSION #define EMPTY_TIMEOUT_DEFAULT 300 /* Globals */ static GMainLoop *loop; static QmiProxy *proxy; static guint timeout_id; /* Main options */ static gboolean verbose_flag; static gboolean verbose_full_flag; static gboolean version_flag; static gboolean no_exit_flag; static gint empty_timeout = -1; static GOptionEntry main_entries[] = { { "no-exit", 0, 0, G_OPTION_ARG_NONE, &no_exit_flag, "Don't exit after being idle without clients", NULL }, { "empty-timeout", 0, 0, G_OPTION_ARG_INT, &empty_timeout, "If no clients, exit after this timeout. If set to 0, equivalent to --no-exit.", "[SECS]" }, { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose_flag, "Run action with verbose logs, including the debug ones", NULL }, { "verbose-full", 'v', 0, G_OPTION_ARG_NONE, &verbose_full_flag, "Run action with verbose logs, including the debug ones and personal info", NULL }, { "version", 'V', 0, G_OPTION_ARG_NONE, &version_flag, "Print version", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static gboolean quit_cb (gpointer user_data) { if (loop) { g_warning ("Caught signal, stopping the loop..."); g_idle_add ((GSourceFunc) g_main_loop_quit, loop); } return FALSE; } static void log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { const gchar *log_level_str; time_t now; gchar time_str[64]; struct tm *local_time; gboolean err = FALSE; switch (log_level) { case G_LOG_LEVEL_WARNING: log_level_str = "-Warning **"; err = TRUE; break; case G_LOG_LEVEL_CRITICAL: case G_LOG_LEVEL_ERROR: log_level_str = "-Error **"; err = TRUE; break; case G_LOG_LEVEL_DEBUG: log_level_str = "[Debug]"; break; case G_LOG_LEVEL_MESSAGE: case G_LOG_LEVEL_INFO: log_level_str = ""; break; case G_LOG_FLAG_FATAL: case G_LOG_LEVEL_MASK: case G_LOG_FLAG_RECURSION: default: g_assert_not_reached (); } if (!verbose_flag && !verbose_full_flag && !err) return; now = time ((time_t *) NULL); local_time = localtime (&now); strftime (time_str, 64, "%d %b %Y, %H:%M:%S", local_time); g_fprintf (err ? stderr : stdout, "[%s] %s %s\n", time_str, log_level_str, message); } static void print_version_and_exit (void) { g_print ("\n" PROGRAM_NAME " " PROGRAM_VERSION "\n" "Copyright (2013-2023) Aleksander Morgado\n" "License GPLv2+: GNU GPL version 2 or later \n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n"); exit (EXIT_SUCCESS); } /*****************************************************************************/ static gboolean stop_loop_cb (void) { timeout_id = 0; if (loop) g_main_loop_quit (loop); return FALSE; } static void proxy_n_clients_changed (QmiProxy *_proxy) { if (qmi_proxy_get_n_clients (proxy) == 0) { g_assert (timeout_id == 0); g_assert (empty_timeout > 0); timeout_id = g_timeout_add_seconds (empty_timeout, (GSourceFunc)stop_loop_cb, NULL); return; } /* At least one client, remove timeout if any */ if (timeout_id) { g_source_remove (timeout_id); timeout_id = 0; } } /*****************************************************************************/ int main (int argc, char **argv) { GError *error = NULL; GOptionContext *context; setlocale (LC_ALL, ""); /* Setup option context, process it and destroy it */ context = g_option_context_new ("- Proxy for QMI devices"); g_option_context_add_main_entries (context, main_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_printerr ("error: %s\n", error->message); exit (EXIT_FAILURE); } g_option_context_free (context); if (version_flag) print_version_and_exit (); g_log_set_handler (NULL, G_LOG_LEVEL_MASK, log_handler, NULL); g_log_set_handler ("Qmi", G_LOG_LEVEL_MASK, log_handler, NULL); if (verbose_flag && verbose_full_flag) { g_printerr ("error: cannot specify --verbose and --verbose-full at the same time\n"); exit (EXIT_FAILURE); } else if (verbose_flag) { qmi_utils_set_traces_enabled (TRUE); qmi_utils_set_show_personal_info (FALSE); } else if (verbose_full_flag) { qmi_utils_set_traces_enabled (TRUE); qmi_utils_set_show_personal_info (TRUE); } /* Setup signals */ g_unix_signal_add (SIGINT, quit_cb, NULL); g_unix_signal_add (SIGHUP, quit_cb, NULL); g_unix_signal_add (SIGTERM, quit_cb, NULL); /* Setup empty timeout */ if (empty_timeout < 0) empty_timeout = EMPTY_TIMEOUT_DEFAULT; /* Setup proxy */ proxy = qmi_proxy_new (&error); if (!proxy) { g_printerr ("error: %s\n", error->message); exit (EXIT_FAILURE); } /* Don't exit the proxy when no clients are found */ if (!no_exit_flag && empty_timeout != 0) { g_debug ("proxy will exit after %d secs if unused", empty_timeout); proxy_n_clients_changed (proxy); g_signal_connect (proxy, "notify::" QMI_PROXY_N_CLIENTS, G_CALLBACK (proxy_n_clients_changed), NULL); } else g_debug ("proxy will remain running if unused"); /* Loop */ loop = g_main_loop_new (NULL, FALSE); g_main_loop_run (loop); g_main_loop_unref (loop); /* Cleanup; releases socket and such */ g_object_unref (proxy); g_debug ("exiting 'qmi-proxy'..."); return EXIT_SUCCESS; } libqmi-1.35.2-dev/src/qmicli/000077500000000000000000000000001455567757300157305ustar00rootroot00000000000000libqmi-1.35.2-dev/src/qmicli/meson.build000066400000000000000000000022001455567757300200640ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez libhelpers = static_library( 'helpers', sources: 'qmicli-helpers.c', dependencies: libqmi_glib_dep, ) libhelpers_dep = declare_dependency( include_directories: '.', dependencies: libqmi_glib_dep, link_with: libhelpers, ) sources = files( 'qmicli.c', 'qmicli-atr.c', 'qmicli-dms.c', 'qmicli-dpm.c', 'qmicli-dsd.c', 'qmicli-ims.c', 'qmicli-imsa.c', 'qmicli-imsp.c', 'qmicli-fox.c', 'qmicli-gas.c', 'qmicli-gms.c', 'qmicli-link-management.c', 'qmicli-loc.c', 'qmicli-nas.c', 'qmicli-pbm.c', 'qmicli-pdc.c', 'qmicli-qmiwwan.c', 'qmicli-qos.c', 'qmicli-sar.c', 'qmicli-uim.c', 'qmicli-voice.c', 'qmicli-wda.c', 'qmicli-wds.c', 'qmicli-wms.c', ) deps = [libhelpers_dep] if enable_mbim_qmux deps += mbim_glib_dep endif qmicli = executable( 'qmicli', sources: sources, include_directories: top_inc, dependencies: deps, install: true, ) if enable_bash_completion install_data( 'qmicli', install_dir: bash_completion_completionsdir, ) endif subdir('test') libqmi-1.35.2-dev/src/qmicli/qmicli000066400000000000000000000122451455567757300171350ustar00rootroot00000000000000# qmicli(1) completion -*- shell-script -*- _qmicli() { local cur prev words cword split _init_completion -s || return case $prev in -d|--device) _filedir return 0 ;; '--device-set-instance-id') COMPREPLY=( $(compgen -W "[Instance-ID]" -- $cur) ) return 0 ;; '--device-open-net') COMPREPLY=( $(compgen -W "[net-802-3|net-raw-ip|net-qos-header|net-no-qos-header]" -- $cur) ) return 0 ;; '--client-cid') COMPREPLY=( $(compgen -W "[CID]" -- $cur) ) return 0 ;; '--dms-uim-set-pin-protection') COMPREPLY=( $(compgen -W "[(PIN|PIN2),(disable|enable),(current-PIN)]" -- $cur) ) return 0 ;; '--dms-uim-verify-pin') COMPREPLY=( $(compgen -W "[(PIN|PIN2),(current-PIN)]" -- $cur) ) return 0 ;; '--dms-uim-unblock-pin') COMPREPLY=( $(compgen -W "[(PIN|PIN2),(PUK),(new-PIN)]" -- $cur) ) return 0 ;; '--dms-uim-change-pin') COMPREPLY=( $(compgen -W "[(PIN|PIN2),(old-PIN),(new-PIN)]" -- $cur) ) return 0 ;; '--dms-uim-get-ck-status') COMPREPLY=( $(compgen -W "[(pn|pu|pp|pc|pf)]" -- $cur) ) return 0 ;; '--dms-uim-set-ck-protection') COMPREPLY=( $(compgen -W "[(pn|pu|pp|pc|pf),(disable),(key)]" -- $cur) ) return 0 ;; '--dms-uim-unblock-ck') COMPREPLY=( $(compgen -W "[(pn|pu|pp|pc|pf),(key)]" -- $cur) ) return 0 ;; '--dms-set-operating-mode') COMPREPLY=( $(compgen -W "[(Operating-Mode)]" -- $cur) ) return 0 ;; '--dms-activate-automatic') COMPREPLY=( $(compgen -W "[Activation-Code]" -- $cur) ) return 0 ;; '--dms-activate-manual') COMPREPLY=( $(compgen -W "[SPC,SID,MDN,MIN]" -- $cur) ) return 0 ;; '--dms-set-user-lock-state') COMPREPLY=( $(compgen -W "[(disable|enable),(current-lock-code)]" -- $cur) ) return 0 ;; '--dms-set-user-lock-code') COMPREPLY=( $(compgen -W "[(old-lock-code),(new-lock-code)]" -- $cur) ) return 0 ;; '--dms-write-user-data') COMPREPLY=( $(compgen -W "[(User-data)]" -- $cur) ) return 0 ;; '--dms-restore-factory-defaults') COMPREPLY=( $(compgen -W "[(Service-Programming-Code)]" -- $cur) ) return 0 ;; '--dms-validate-service-programming-code') COMPREPLY=( $(compgen -W "[(Service-Programming-Code)]" -- $cur) ) return 0 ;; '--dms-select-stored-image') COMPREPLY=( $(compgen -W "[modem#,pri#]" -- $cur) ) return 0 ;; '--dms-delete-stored-image') COMPREPLY=( $(compgen -W "[modem#,pri#]" -- $cur) ) return 0 ;; '--nas-get-tx-rx-info') COMPREPLY=( $(compgen -W "[(Radio-Interface)]" -- $cur) ) return 0 ;; '--nas-set-system-selection-preference') COMPREPLY=( $(compgen -W "[cdma-1x|cdma-1xevdo|gsm|umts|lte|td-scdma]" -- $cur) ) return 0 ;; '--wds-start-network') COMPREPLY=( $(compgen -W "[(APN),(PAP|CHAP|BOTH),(Username),(Password)]" -- $cur) ) return 0 ;; '--wds-stop-network') COMPREPLY=( $(compgen -W "[Packet-data-handle]" -- $cur) ) return 0 ;; '--wds-get-profile-list') COMPREPLY=( $(compgen -W "[3gpp|3gpp2]" -- $cur) ) return 0 ;; '--wds-get-default-settings') COMPREPLY=( $(compgen -W "[3gpp|3gpp2]" -- $cur) ) return 0 ;; '--wds-bind-mux-data-port') COMPREPLY=( $(compgen -W "[(MuxId),(Ep-Iface-Number)]" -- $cur) ) return 0 ;; '--wds-set-ip-family') COMPREPLY=( $(compgen -W "[4|6]" -- $cur) ) return 0 ;; '--uim-read-transparent') COMPREPLY=( $(compgen -W "[0xNNNN,0xNNNN,...]" -- $cur) ) return 0 ;; '--uim-get-file-attributes') COMPREPLY=( $(compgen -W "[0xNNNN,0xNNNN,...]" -- $cur) ) return 0 ;; '--wda-set-data-format') COMPREPLY=( $(compgen -W "[raw-ip|802-3]" -- $cur) ) return 0 ;; '-V'|'--version') return 0 ;; '-h'|'--help'|'--help-all'|'--help-dms'|'--help-nas'|'--help-wds'|'--help-pbm'|'--help-uim'|'--help-wda') return 0 ;; esac $split && return 0 if [[ $cur == -* ]]; then COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help-all )' -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return 0 fi } && complete -F _qmicli qmicli # ex: ts=4 sw=4 et filetype=sh libqmi-1.35.2-dev/src/qmicli/qmicli-atr.c000066400000000000000000000312541455567757300201430ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2023 Daniele Palmas */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_ATR /* Context */ typedef struct { QmiDevice *device; QmiClientAtr *client; GCancellable *cancellable; guint timeout_id; guint received_indication_id; gboolean monitor; } Context; static Context *ctx; /* Options */ static gchar *send_str; static gchar *send_only_str; static gboolean monitor_indications_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_ATR_SEND && defined HAVE_QMI_INDICATION_ATR_RECEIVED { "atr-send", 0, 0, G_OPTION_ARG_STRING, &send_str, "Send an AT command and wait for the reply", "[AT command]" }, #endif #if defined HAVE_QMI_MESSAGE_ATR_SEND { "atr-send-only", 0, 0, G_OPTION_ARG_STRING, &send_only_str, "Send an AT command without waiting for the reply", "[AT command]" }, #endif #if defined HAVE_QMI_MESSAGE_ATR_SEND && defined HAVE_QMI_INDICATION_ATR_RECEIVED { "atr-monitor", 0, 0, G_OPTION_ARG_NONE, &monitor_indications_flag, "Watch for unsolicited indications", NULL }, #endif { "atr-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release an ATR client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_atr_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("atr", "ATR options:", "Show AT Relay Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_atr_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!send_str + !!send_only_str + monitor_indications_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many ATR actions requested\n"); exit (EXIT_FAILURE); } /* Actions that require receiving QMI indication messages must specify that * indications are expected. */ if (!!send_str || monitor_indications_flag) qmicli_expect_indications (); checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->timeout_id) g_source_remove (context->timeout_id); if (context->received_indication_id) g_signal_handler_disconnect (context->client, context->received_indication_id); if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_ATR_SEND && defined HAVE_QMI_INDICATION_ATR_RECEIVED /******************************************************************************/ /* Send */ static QmiMessageAtrSendInput * send_input_create (const gchar *str) { QmiMessageAtrSendInput *input = NULL; input = qmi_message_atr_send_input_new (); qmi_message_atr_send_input_set_message (input, str, NULL); return input; } static gboolean send_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static gboolean is_final_response (const gchar *reply) { /* The following regexes are taken from MM serial parser */ GRegexCompileFlags flags = G_REGEX_DOLLAR_ENDONLY | G_REGEX_RAW | G_REGEX_OPTIMIZE; g_autoptr(GRegex) regex_ok = NULL; g_autoptr(GRegex) regex_connect = NULL; g_autoptr(GRegex) regex_cme_error = NULL; g_autoptr(GRegex) regex_cms_error = NULL; g_autoptr(GRegex) regex_unknown_error = NULL; g_autoptr(GRegex) regex_connect_failed = NULL; regex_ok = g_regex_new ("\\r\\nOK(\\r\\n)+", flags, 0, NULL); regex_connect = g_regex_new ("\\r\\nCONNECT.*\\r\\n", flags, 0, NULL); regex_cme_error = g_regex_new ("\\r\\n\\+CME ERROR*\\r\\n", flags, 0, NULL); regex_cms_error = g_regex_new ("\\r\\n\\+CMS ERROR*\\r\\n", flags, 0, NULL); regex_unknown_error = g_regex_new ("\\r\\n(ERROR)|(COMMAND NOT SUPPORT)\\r\\n", flags, 0, NULL); regex_connect_failed = g_regex_new ("\\r\\n(NO CARRIER)|(BUSY)|(NO ANSWER)|(NO DIALTONE)\\r\\n", flags, 0, NULL); if (g_regex_match_full (regex_ok, reply, strlen (reply), 0, 0, NULL, NULL) || g_regex_match_full (regex_unknown_error, reply, strlen (reply), 0, 0, NULL, NULL) || g_regex_match_full (regex_cme_error, reply, strlen (reply), 0, 0, NULL, NULL) || g_regex_match_full (regex_cms_error, reply, strlen (reply), 0, 0, NULL, NULL) || g_regex_match_full (regex_connect, reply, strlen (reply), 0, 0, NULL, NULL) || g_regex_match_full (regex_connect_failed, reply, strlen (reply), 0, 0, NULL, NULL)) return TRUE; return FALSE; } static void indication_received (QmiClientAtr *client, QmiIndicationAtrReceivedOutput *output) { const gchar *received; g_autoptr(GError) error = NULL; if (!qmi_indication_atr_received_output_get_message (output, &received, &error)) { g_printerr ("error: couldn't get indication message: %s\n", error->message); operation_shutdown (FALSE); return; } if (ctx->monitor) { /* When monitoring we don't want to print final responses * e.g. the initial ATE0 reply or the ones for the commands sent with * atr-send-only using the same cid * The comparison with "ATE0" is for avoid printing the echo of the * mandatory initial command */ if (!is_final_response (received) && g_strcmp0 (received, "ATE0\r")) g_print ("%s", received); } else { /* No need to print an additional '\n', since the indication already has '\r\n' */ g_print ("%s", received); /* The reply can arrive with multiple indications, so we need to check if the * indication has the final response */ if (is_final_response (received)) { g_print ("Successfully received final response\n"); operation_shutdown (TRUE); } } } static void monitoring_cancelled (GCancellable *cancellable) { operation_shutdown (TRUE); } static void send_ready (QmiClientAtr *client, GAsyncResult *res) { g_autoptr(QmiMessageAtrSendOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_atr_send_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_atr_send_output_get_result (output, &error)) { g_printerr ("error: couldn't send AT command: %s\n", error->message); operation_shutdown (FALSE); return; } if (ctx->monitor) { /* User can use Ctrl+C to cancel the monitoring at any time */ g_cancellable_connect (ctx->cancellable, G_CALLBACK (monitoring_cancelled), NULL, NULL); g_print ("Monitoring unsolicited indications: press Ctrl+C to stop\n"); } else /* Wait for the response asynchronously: 120 seconds should be enough also * for long-lasting commands (e.g. AT+COPS=?) */ ctx->timeout_id = g_timeout_add_seconds (120, (GSourceFunc) send_timed_out, NULL); ctx->received_indication_id = g_signal_connect (ctx->client, "received", G_CALLBACK (indication_received), NULL); } #endif /* HAVE_QMI_MESSAGE_ATR_SEND * HAVE_QMI_INDICATION_ATR_RECEIVED */ #if defined HAVE_QMI_MESSAGE_ATR_SEND /******************************************************************************/ /* Send and don't wait for the reply */ static void send_only_ready (QmiClientAtr *client, GAsyncResult *res) { g_autoptr(QmiMessageAtrSendOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_atr_send_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_atr_send_output_get_result (output, &error)) { g_printerr ("error: couldn't send AT command: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Successfully sent AT command\n"); operation_shutdown (TRUE); } static void generic_send (const gchar *cmd, GAsyncReadyCallback cb) { g_autofree gchar *at_cmd = NULL; g_autoptr(QmiMessageAtrSendInput) input = NULL; g_debug ("Asynchronously sending AT command..."); at_cmd = g_strconcat (cmd, "\r", NULL); input = send_input_create (at_cmd); if (!input) { operation_shutdown (FALSE); return; } qmi_client_atr_send (ctx->client, input, 10, ctx->cancellable, cb, NULL); } #endif /* HAVE_QMI_MESSAGE_ATR_SEND */ /******************************************************************************/ /* Common */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_atr_run (QmiDevice *device, QmiClientAtr *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new0 (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_ATR_SEND && defined HAVE_QMI_INDICATION_ATR_RECEIVED if (send_str) { generic_send (send_str, (GAsyncReadyCallback)send_ready); return; } if (monitor_indications_flag) { /* To really open the AT communication and receive unsolicited * indications it is mandatory to send an initial AT command. * The command ATE0 has been chosen so that, if needed, commands * can be sent by a different qmicli instance reusing the monitoring * cid with --atr-send-only. This avoids also polluting the monitoring * operation with the comands echo */ ctx->monitor = TRUE; generic_send ("ATE0", (GAsyncReadyCallback)send_ready); return; } #endif #if defined HAVE_QMI_MESSAGE_ATR_SEND if (send_only_str) { generic_send (send_only_str, (GAsyncReadyCallback)send_only_ready); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_ATR */ libqmi-1.35.2-dev/src/qmicli/qmicli-dms.c000066400000000000000000005655641455567757300201600ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2012-2017 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_DMS #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") /* Context */ typedef struct { QmiDevice *device; QmiClientDms *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_ids_flag; static gboolean get_capabilities_flag; static gboolean get_manufacturer_flag; static gboolean get_model_flag; static gboolean get_revision_flag; static gboolean get_msisdn_flag; static gboolean get_power_state_flag; static gchar *uim_set_pin_protection_str; static gchar *uim_verify_pin_str; static gchar *uim_unblock_pin_str; static gchar *uim_change_pin_str; static gboolean uim_get_pin_status_flag; static gboolean uim_get_iccid_flag; static gboolean uim_get_imsi_flag; static gboolean uim_get_state_flag; static gchar *uim_get_ck_status_str; static gchar *uim_set_ck_protection_str; static gchar *uim_unblock_ck_str; static gboolean get_hardware_revision_flag; static gboolean get_operating_mode_flag; static gchar *set_operating_mode_str; static gboolean get_time_flag; static gboolean get_prl_version_flag; static gboolean get_activation_state_flag; static gchar *activate_automatic_str; static gchar *activate_manual_str; static gboolean get_user_lock_state_flag; static gchar *set_user_lock_state_str; static gchar *set_user_lock_code_str; static gboolean read_user_data_flag; static gchar *write_user_data_str; static gboolean read_eri_file_flag; static gchar *restore_factory_defaults_str; static gchar *validate_service_programming_code_str; static gboolean set_firmware_id_flag; static gboolean get_band_capabilities_flag; static gboolean get_factory_sku_flag; static gboolean list_stored_images_flag; static gchar *select_stored_image_str; static gchar *delete_stored_image_str; static gboolean get_firmware_preference_flag; static gchar *set_firmware_preference_str; static gboolean get_boot_image_download_mode_flag; static gchar *set_boot_image_download_mode_str; static gboolean get_software_version_flag; static gboolean set_fcc_authentication_flag; static gboolean get_supported_messages_flag; static gchar *hp_change_device_mode_str; static gboolean swi_get_current_firmware_flag; static gboolean swi_get_usb_composition_flag; static gchar *swi_set_usb_composition_str; static gchar *dell_change_device_mode_str; /* deprecated */ static gchar *foxconn_change_device_mode_str; static gchar *dell_get_firmware_version_str; /* deprecated */ static gchar *foxconn_get_firmware_version_str; static gint foxconn_set_fcc_authentication_int = -1; static gchar *foxconn_set_fcc_authentication_v2_str; static gchar *get_mac_address_str; static gboolean reset_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_DMS_GET_IDS { "dms-get-ids", 0, 0, G_OPTION_ARG_NONE, &get_ids_flag, "Get IDs", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_CAPABILITIES { "dms-get-capabilities", 0, 0, G_OPTION_ARG_NONE, &get_capabilities_flag, "Get capabilities", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MANUFACTURER { "dms-get-manufacturer", 0, 0, G_OPTION_ARG_NONE, &get_manufacturer_flag, "Get manufacturer", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MODEL { "dms-get-model", 0, 0, G_OPTION_ARG_NONE, &get_model_flag, "Get model", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_REVISION { "dms-get-revision", 0, 0, G_OPTION_ARG_NONE, &get_revision_flag, "Get revision", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MSISDN { "dms-get-msisdn", 0, 0, G_OPTION_ARG_NONE, &get_msisdn_flag, "Get MSISDN", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_POWER_STATE { "dms-get-power-state", 0, 0, G_OPTION_ARG_NONE, &get_power_state_flag, "Get power state", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_SET_PIN_PROTECTION { "dms-uim-set-pin-protection", 0, 0, G_OPTION_ARG_STRING, &uim_set_pin_protection_str, "Set PIN protection in the UIM", "[(PIN|PIN2),(disable|enable),(current PIN)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_VERIFY_PIN { "dms-uim-verify-pin", 0, 0, G_OPTION_ARG_STRING, &uim_verify_pin_str, "Verify PIN", "[(PIN|PIN2),(current PIN)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_UNBLOCK_PIN { "dms-uim-unblock-pin", 0, 0, G_OPTION_ARG_STRING, &uim_unblock_pin_str, "Unblock PIN", "[(PIN|PIN2),(PUK),(new PIN)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_CHANGE_PIN { "dms-uim-change-pin", 0, 0, G_OPTION_ARG_STRING, &uim_change_pin_str, "Change PIN", "[(PIN|PIN2),(old PIN),(new PIN)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS { "dms-uim-get-pin-status", 0, 0, G_OPTION_ARG_NONE, &uim_get_pin_status_flag, "Get PIN status", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_ICCID { "dms-uim-get-iccid", 0, 0, G_OPTION_ARG_NONE, &uim_get_iccid_flag, "Get ICCID", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_IMSI { "dms-uim-get-imsi", 0, 0, G_OPTION_ARG_NONE, &uim_get_imsi_flag, "Get IMSI", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_STATE { "dms-uim-get-state", 0, 0, G_OPTION_ARG_NONE, &uim_get_state_flag, "Get UIM State", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_CK_STATUS { "dms-uim-get-ck-status", 0, 0, G_OPTION_ARG_STRING, &uim_get_ck_status_str, "Get CK Status", "[(pn|pu|pp|pc|pf)]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_SET_CK_PROTECTION { "dms-uim-set-ck-protection", 0, 0, G_OPTION_ARG_STRING, &uim_set_ck_protection_str, "Disable CK protection", "[(pn|pu|pp|pc|pf),(disable),(key)]" }, #endif { "dms-uim-unblock-ck", 0, 0, G_OPTION_ARG_STRING, &uim_unblock_ck_str, "Unblock CK", "[(pn|pu|pp|pc|pf),(key)]" }, #if defined HAVE_QMI_MESSAGE_DMS_GET_HARDWARE_REVISION { "dms-get-hardware-revision", 0, 0, G_OPTION_ARG_NONE, &get_hardware_revision_flag, "Get the HW revision", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_OPERATING_MODE { "dms-get-operating-mode", 0, 0, G_OPTION_ARG_NONE, &get_operating_mode_flag, "Get the device operating mode", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_OPERATING_MODE { "dms-set-operating-mode", 0, 0, G_OPTION_ARG_STRING, &set_operating_mode_str, "Set the device operating mode", "[(Operating mode)]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_TIME { "dms-get-time", 0, 0, G_OPTION_ARG_NONE, &get_time_flag, "Get the device time", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_PRL_VERSION { "dms-get-prl-version", 0, 0, G_OPTION_ARG_NONE, &get_prl_version_flag, "Get the PRL version", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_ACTIVATION_STATE { "dms-get-activation-state", 0, 0, G_OPTION_ARG_NONE, &get_activation_state_flag, "Get the state of the service activation", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_DMS_ACTIVATE_AUTOMATIC { "dms-activate-automatic", 0, 0, G_OPTION_ARG_STRING, &activate_automatic_str, "Request automatic service activation", "[Activation Code]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_ACTIVATE_MANUAL { "dms-activate-manual", 0, 0, G_OPTION_ARG_STRING, &activate_manual_str, "Request manual service activation", "[SPC,SID,MDN,MIN]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_USER_LOCK_STATE { "dms-get-user-lock-state", 0, 0, G_OPTION_ARG_NONE, &get_user_lock_state_flag, "Get the state of the user lock", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_USER_LOCK_STATE { "dms-set-user-lock-state", 0, 0, G_OPTION_ARG_STRING, &set_user_lock_state_str, "Set the state of the user lock", "[(disable|enable),(current lock code)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_USER_LOCK_CODE { "dms-set-user-lock-code", 0, 0, G_OPTION_ARG_STRING, &set_user_lock_code_str, "Change the user lock code", "[(old lock code),(new lock code)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_READ_USER_DATA { "dms-read-user-data", 0, 0, G_OPTION_ARG_NONE, &read_user_data_flag, "Read user data", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_DMS_WRITE_USER_DATA { "dms-write-user-data", 0, 0, G_OPTION_ARG_STRING, &write_user_data_str, "Write user data", "[(User data)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_READ_ERI_FILE { "dms-read-eri-file", 0, 0, G_OPTION_ARG_NONE, &read_eri_file_flag, "Read ERI file", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_DMS_RESTORE_FACTORY_DEFAULTS { "dms-restore-factory-defaults", 0, 0, G_OPTION_ARG_STRING, &restore_factory_defaults_str, "Restore factory defaults", "[(Service Programming Code)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_VALIDATE_SERVICE_PROGRAMMING_CODE { "dms-validate-service-programming-code", 0, 0, G_OPTION_ARG_STRING, &validate_service_programming_code_str, "Validate the Service Programming Code", "[(Service Programming Code)]", }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_ID { "dms-set-firmware-id", 0, 0, G_OPTION_ARG_NONE, &set_firmware_id_flag, "Set firmware id", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_BAND_CAPABILITIES { "dms-get-band-capabilities", 0, 0, G_OPTION_ARG_NONE, &get_band_capabilities_flag, "Get band capabilities", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_FACTORY_SKU { "dms-get-factory-sku", 0, 0, G_OPTION_ARG_NONE, &get_factory_sku_flag, "Get factory stock keeping unit", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && defined HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO { "dms-list-stored-images", 0, 0, G_OPTION_ARG_NONE, &list_stored_images_flag, "List stored images", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE && \ defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES { "dms-select-stored-image", 0, 0, G_OPTION_ARG_STRING, &select_stored_image_str, "Select stored image", "[modem#,pri#] where # is the index" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE && \ defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && \ defined HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE { "dms-delete-stored-image", 0, 0, G_OPTION_ARG_STRING, &delete_stored_image_str, "Delete stored image", "[modem#|pri#] where # is the index" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_FIRMWARE_PREFERENCE { "dms-get-firmware-preference", 0, 0, G_OPTION_ARG_NONE, &get_firmware_preference_flag, "Get firmware preference", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE { "dms-set-firmware-preference", 0, 0, G_OPTION_ARG_STRING, &set_firmware_preference_str, "Set firmware preference (required keys: firmware-version, config-version, carrier; optional keys: modem-storage-index, override-download=yes)", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_BOOT_IMAGE_DOWNLOAD_MODE { "dms-get-boot-image-download-mode", 0, 0, G_OPTION_ARG_NONE, &get_boot_image_download_mode_flag, "Get boot image download mode", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_BOOT_IMAGE_DOWNLOAD_MODE { "dms-set-boot-image-download-mode", 0, 0, G_OPTION_ARG_STRING, &set_boot_image_download_mode_str, "Set boot image download mode", "[normal|boot-and-recovery]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_SOFTWARE_VERSION { "dms-get-software-version", 0, 0, G_OPTION_ARG_NONE, &get_software_version_flag, "Get software version", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FCC_AUTHENTICATION { "dms-set-fcc-authentication", 0, 0, G_OPTION_ARG_NONE, &set_fcc_authentication_flag, "Set FCC authentication", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_SUPPORTED_MESSAGES { "dms-get-supported-messages", 0, 0, G_OPTION_ARG_NONE, &get_supported_messages_flag, "Get supported messages", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_HP_CHANGE_DEVICE_MODE { "dms-hp-change-device-mode", 0, 0, G_OPTION_ARG_STRING, &hp_change_device_mode_str, "Change device mode (HP specific)", "[fastboot]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_CURRENT_FIRMWARE { "dms-swi-get-current-firmware", 0, 0, G_OPTION_ARG_NONE, &swi_get_current_firmware_flag, "Get Current Firmware (Sierra Wireless specific)", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_USB_COMPOSITION { "dms-swi-get-usb-composition", 0, 0, G_OPTION_ARG_NONE, &swi_get_usb_composition_flag, "Get current and supported USB compositions (Sierra Wireless specific)", NULL }, #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_SET_USB_COMPOSITION { "dms-swi-set-usb-composition", 0, 0, G_OPTION_ARG_STRING, &swi_set_usb_composition_str, "Set USB composition (Sierra Wireless specific)", "[#]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE { "dms-foxconn-change-device-mode", 0, 0, G_OPTION_ARG_STRING, &foxconn_change_device_mode_str, "Change device mode (Foxconn specific)", "[fastboot-ota|fastboot-online]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION { "dms-foxconn-get-firmware-version", 0, 0, G_OPTION_ARG_STRING, &foxconn_get_firmware_version_str, "Get firmware version (Foxconn specific)", "[firmware-mcfg-apps|firmware-mcfg|apps]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION { "dms-foxconn-set-fcc-authentication", 0, 0, G_OPTION_ARG_INT, &foxconn_set_fcc_authentication_int, "Set FCC authentication (Foxconn specific)", "[magic]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION_V2 { "dms-foxconn-set-fcc-authentication-v2", 0, 0, G_OPTION_ARG_STRING, &foxconn_set_fcc_authentication_v2_str, "Set FCC authentication (Foxconn specific, v2)", "[magic-string,magic-number]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MAC_ADDRESS { "dms-get-mac-address", 0, 0, G_OPTION_ARG_STRING, &get_mac_address_str, "Get default MAC address", "[wlan|bt]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_RESET { "dms-reset", 0, 0, G_OPTION_ARG_NONE, &reset_flag, "Reset the service state", NULL }, #endif { "dms-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a DMS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, /* deprecated entries (hidden in --help) */ #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE { "dms-dell-change-device-mode", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &dell_change_device_mode_str, "Change device mode (DELL specific)", "[fastboot-ota|fastboot-online]" }, #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION { "dms-dell-get-firmware-version", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &dell_get_firmware_version_str, "Get firmware version (DELL specific)", "[firmware-mcfg-apps|firmware-mcfg|apps]" }, #endif { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_dms_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("dms", "DMS options:", "Show Device Management Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_dms_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_ids_flag + get_capabilities_flag + get_manufacturer_flag + get_model_flag + get_revision_flag + get_msisdn_flag + get_power_state_flag + !!uim_set_pin_protection_str + !!uim_verify_pin_str + !!uim_unblock_pin_str + !!uim_change_pin_str + uim_get_pin_status_flag + uim_get_iccid_flag + uim_get_imsi_flag + uim_get_state_flag + !!uim_get_ck_status_str + !!uim_set_ck_protection_str + !!uim_unblock_ck_str + get_hardware_revision_flag + get_operating_mode_flag + !!set_operating_mode_str + get_time_flag + get_prl_version_flag + get_activation_state_flag + !!activate_automatic_str + !!activate_manual_str + get_user_lock_state_flag + !!set_user_lock_state_str + !!set_user_lock_code_str + read_user_data_flag + !!write_user_data_str + read_eri_file_flag + !!restore_factory_defaults_str + !!validate_service_programming_code_str + set_firmware_id_flag + get_band_capabilities_flag + get_factory_sku_flag + list_stored_images_flag + !!select_stored_image_str + !!delete_stored_image_str + get_firmware_preference_flag + !!set_firmware_preference_str + get_boot_image_download_mode_flag + !!set_boot_image_download_mode_str + get_software_version_flag + set_fcc_authentication_flag + get_supported_messages_flag + !!hp_change_device_mode_str + swi_get_current_firmware_flag + swi_get_usb_composition_flag + !!swi_set_usb_composition_str + !!dell_change_device_mode_str + !!foxconn_change_device_mode_str + !!dell_get_firmware_version_str + !!foxconn_get_firmware_version_str + (foxconn_set_fcc_authentication_int >= 0) + !!foxconn_set_fcc_authentication_v2_str + !!get_mac_address_str + reset_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many DMS actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE || \ defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE static void operation_shutdown_skip_cid_release (gboolean operation_status) { /* Cleanup context and finish async operation. Explicitly ask not to release * the client CID. This is so that the qmicli operation doesn't fail after * this step, e.g. if the device just reboots after the action. */ context_free (ctx); qmicli_async_operation_done (operation_status, TRUE); } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_IDS static void get_ids_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *esn = NULL; const gchar *imei = NULL; const gchar *meid = NULL; const gchar *imei_software_version = NULL; QmiMessageDmsGetIdsOutput *output; GError *error = NULL; output = qmi_client_dms_get_ids_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_ids_output_get_result (output, &error)) { g_printerr ("error: couldn't get IDs: %s\n", error->message); g_error_free (error); qmi_message_dms_get_ids_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_ids_output_get_esn (output, &esn, NULL); qmi_message_dms_get_ids_output_get_imei (output, &imei, NULL); qmi_message_dms_get_ids_output_get_meid (output, &meid, NULL); g_print ("[%s] Device IDs retrieved:\n" "\t ESN: '%s'\n" "\t IMEI: '%s'\n" "\t MEID: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (esn), VALIDATE_UNKNOWN (imei), VALIDATE_UNKNOWN (meid)); if (qmi_message_dms_get_ids_output_get_imei_software_version (output, &imei_software_version, NULL)) { g_print("\tIMEI SV: '%s'\n", imei_software_version); } qmi_message_dms_get_ids_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_IDS */ #if defined HAVE_QMI_MESSAGE_DMS_GET_CAPABILITIES static void get_capabilities_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetCapabilitiesOutput *output; guint32 max_tx_channel_rate; guint32 max_rx_channel_rate; QmiDmsDataServiceCapability data_service_capability; QmiDmsSimCapability sim_capability; GArray *radio_interface_list; GError *error = NULL; GString *networks; guint i; output = qmi_client_dms_get_capabilities_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_capabilities_output_get_result (output, &error)) { g_printerr ("error: couldn't get capabilities: %s\n", error->message); g_error_free (error); qmi_message_dms_get_capabilities_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_capabilities_output_get_info (output, &max_tx_channel_rate, &max_rx_channel_rate, &data_service_capability, &sim_capability, &radio_interface_list, NULL); networks = g_string_new (""); for (i = 0; i < radio_interface_list->len; i++) { g_string_append (networks, qmi_dms_radio_interface_get_string ( g_array_index (radio_interface_list, QmiDmsRadioInterface, i))); if (i != radio_interface_list->len - 1) g_string_append (networks, ", "); } g_print ("[%s] Device capabilities retrieved:\n" "\tMax TX channel rate: '%u'\n" "\tMax RX channel rate: '%u'\n" "\t Data Service: '%s'\n" "\t SIM: '%s'\n" "\t Networks: '%s'\n", qmi_device_get_path_display (ctx->device), max_tx_channel_rate, max_rx_channel_rate, qmi_dms_data_service_capability_get_string (data_service_capability), qmi_dms_sim_capability_get_string (sim_capability), networks->str); g_string_free (networks, TRUE); qmi_message_dms_get_capabilities_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_CAPABILITIES */ #if defined HAVE_QMI_MESSAGE_DMS_GET_MANUFACTURER static void get_manufacturer_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsGetManufacturerOutput *output; GError *error = NULL; output = qmi_client_dms_get_manufacturer_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_manufacturer_output_get_result (output, &error)) { g_printerr ("error: couldn't get manufacturer: %s\n", error->message); g_error_free (error); qmi_message_dms_get_manufacturer_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_manufacturer_output_get_manufacturer (output, &str, NULL); g_print ("[%s] Device manufacturer retrieved:\n" "\tManufacturer: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_get_manufacturer_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_MANUFACTURER */ #if defined HAVE_QMI_MESSAGE_DMS_GET_MODEL static void get_model_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsGetModelOutput *output; GError *error = NULL; output = qmi_client_dms_get_model_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_model_output_get_result (output, &error)) { g_printerr ("error: couldn't get model: %s\n", error->message); g_error_free (error); qmi_message_dms_get_model_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_model_output_get_model (output, &str, NULL); g_print ("[%s] Device model retrieved:\n" "\tModel: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_get_model_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_MODEL */ #if defined HAVE_QMI_MESSAGE_DMS_GET_REVISION static void get_revision_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsGetRevisionOutput *output; GError *error = NULL; output = qmi_client_dms_get_revision_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_revision_output_get_result (output, &error)) { g_printerr ("error: couldn't get revision: %s\n", error->message); g_error_free (error); qmi_message_dms_get_revision_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_revision_output_get_revision (output, &str, NULL); g_print ("[%s] Device revision retrieved:\n" "\tRevision: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_get_revision_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_REVISION */ #if defined HAVE_QMI_MESSAGE_DMS_GET_MSISDN static void get_msisdn_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsGetMsisdnOutput *output; GError *error = NULL; output = qmi_client_dms_get_msisdn_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_msisdn_output_get_result (output, &error)) { g_printerr ("error: couldn't get MSISDN: %s\n", error->message); g_error_free (error); qmi_message_dms_get_msisdn_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_msisdn_output_get_msisdn (output, &str, NULL); g_print ("[%s] Device MSISDN retrieved:\n" "\tMSISDN: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_get_msisdn_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_MSISDN */ #if defined HAVE_QMI_MESSAGE_DMS_GET_POWER_STATE static void get_power_state_ready (QmiClientDms *client, GAsyncResult *res) { g_autofree gchar *power_state_str = NULL; guint8 power_state_flags; guint8 battery_level; QmiMessageDmsGetPowerStateOutput *output; GError *error = NULL; output = qmi_client_dms_get_power_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_power_state_output_get_result (output, &error)) { g_printerr ("error: couldn't get power state: %s\n", error->message); g_error_free (error); qmi_message_dms_get_power_state_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_power_state_output_get_info (output, &power_state_flags, &battery_level, NULL); power_state_str = qmi_dms_power_state_build_string_from_mask ((QmiDmsPowerState)power_state_flags); g_print ("[%s] Device power state retrieved:\n" "\tPower state: '%s'\n" "\tBattery level: '%u %%'\n", qmi_device_get_path_display (ctx->device), VALIDATE_MASK_NONE (power_state_str), (guint)battery_level); qmi_message_dms_get_power_state_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_POWER_STATE */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_SET_PIN_PROTECTION static QmiMessageDmsUimSetPinProtectionInput * uim_set_pin_protection_input_create (const gchar *str) { QmiMessageDmsUimSetPinProtectionInput *input = NULL; gchar **split; QmiDmsUimPinId pin_id; gboolean enable_disable; gchar *current_pin; /* Prepare inputs. * Format of the string is: * "[(PIN|PIN2),(disable|enable),(current PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_dms_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_enable_disable_from_string (split[1], &enable_disable) && qmicli_read_non_empty_string (split[2], "current PIN", ¤t_pin)) { GError *error = NULL; input = qmi_message_dms_uim_set_pin_protection_input_new (); if (!qmi_message_dms_uim_set_pin_protection_input_set_info ( input, pin_id, enable_disable, current_pin, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_uim_set_pin_protection_input_unref (input); input = NULL; } } g_strfreev (split); return input; } static void uim_set_pin_protection_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsUimSetPinProtectionOutput *output; GError *error = NULL; output = qmi_client_dms_uim_set_pin_protection_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_set_pin_protection_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't set PIN protection: %s\n", error->message); g_error_free (error); if (qmi_message_dms_uim_set_pin_protection_output_get_pin_retries_status ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_dms_uim_set_pin_protection_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN protection updated\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_uim_set_pin_protection_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_SET_PIN_PROTECTION */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_VERIFY_PIN static QmiMessageDmsUimVerifyPinInput * uim_verify_pin_input_create (const gchar *str) { QmiMessageDmsUimVerifyPinInput *input = NULL; gchar **split; QmiDmsUimPinId pin_id; gchar *current_pin; /* Prepare inputs. * Format of the string is: * "[(PIN|PIN2),(current PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_dms_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_non_empty_string (split[1], "current PIN", ¤t_pin)) { GError *error = NULL; input = qmi_message_dms_uim_verify_pin_input_new (); if (!qmi_message_dms_uim_verify_pin_input_set_info ( input, pin_id, current_pin, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_uim_verify_pin_input_unref (input); input = NULL; } } g_strfreev (split); return input; } static void uim_verify_pin_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsUimVerifyPinOutput *output; GError *error = NULL; output = qmi_client_dms_uim_verify_pin_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_verify_pin_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't verify PIN: %s\n", error->message); g_error_free (error); if (qmi_message_dms_uim_verify_pin_output_get_pin_retries_status ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_dms_uim_verify_pin_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN verified successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_uim_verify_pin_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_VERIFY_PIN */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_UNBLOCK_PIN static QmiMessageDmsUimUnblockPinInput * uim_unblock_pin_input_create (const gchar *str) { QmiMessageDmsUimUnblockPinInput *input = NULL; gchar **split; QmiDmsUimPinId pin_id; gchar *puk; gchar *new_pin; /* Prepare inputs. * Format of the string is: * "[(PIN|PIN2),(PUK),(new PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_dms_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_non_empty_string (split[1], "PUK", &puk) && qmicli_read_non_empty_string (split[2], "new PIN", &new_pin)) { GError *error = NULL; input = qmi_message_dms_uim_unblock_pin_input_new (); if (!qmi_message_dms_uim_unblock_pin_input_set_info ( input, pin_id, puk, new_pin, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_uim_unblock_pin_input_unref (input); input = NULL; } } g_strfreev (split); return input; } static void uim_unblock_pin_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsUimUnblockPinOutput *output; GError *error = NULL; output = qmi_client_dms_uim_unblock_pin_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_unblock_pin_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't unblock PIN: %s\n", error->message); g_error_free (error); if (qmi_message_dms_uim_unblock_pin_output_get_pin_retries_status ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_dms_uim_unblock_pin_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN unblocked successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_uim_unblock_pin_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_UNBLOCK_PIN */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_CHANGE_PIN static QmiMessageDmsUimChangePinInput * uim_change_pin_input_create (const gchar *str) { QmiMessageDmsUimChangePinInput *input = NULL; gchar **split; QmiDmsUimPinId pin_id; gchar *old_pin; gchar *new_pin; /* Prepare inputs. * Format of the string is: * "[(PIN|PIN2),(old PIN),(new PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_dms_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_non_empty_string (split[1], "old PIN", &old_pin) && qmicli_read_non_empty_string (split[2], "new PIN", &new_pin)) { GError *error = NULL; input = qmi_message_dms_uim_change_pin_input_new (); if (!qmi_message_dms_uim_change_pin_input_set_info ( input, pin_id, old_pin, new_pin, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_uim_change_pin_input_unref (input); input = NULL; } } g_strfreev (split); return input; } static void uim_change_pin_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsUimChangePinOutput *output; GError *error = NULL; output = qmi_client_dms_uim_change_pin_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_change_pin_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't change PIN: %s\n", error->message); g_error_free (error); if (qmi_message_dms_uim_change_pin_output_get_pin_retries_status ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_dms_uim_change_pin_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN changed successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_uim_change_pin_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_CHANGE_PIN */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS static void uim_get_pin_status_ready (QmiClientDms *client, GAsyncResult *res) { guint8 verify_retries_left; guint8 unblock_retries_left; QmiDmsUimPinStatus current_status; QmiMessageDmsUimGetPinStatusOutput *output; GError *error = NULL; output = qmi_client_dms_uim_get_pin_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_get_pin_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get PIN status: %s\n", error->message); g_error_free (error); qmi_message_dms_uim_get_pin_status_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN status retrieved successfully\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_dms_uim_get_pin_status_output_get_pin1_status ( output, ¤t_status, &verify_retries_left, &unblock_retries_left, NULL)) { g_print ("[%s] PIN1:\n" "\tStatus: %s\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), qmi_dms_uim_pin_status_get_string (current_status), verify_retries_left, unblock_retries_left); } if (qmi_message_dms_uim_get_pin_status_output_get_pin2_status ( output, ¤t_status, &verify_retries_left, &unblock_retries_left, NULL)) { g_print ("[%s] PIN2:\n" "\tStatus: %s\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), qmi_dms_uim_pin_status_get_string (current_status), verify_retries_left, unblock_retries_left); } qmi_message_dms_uim_get_pin_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_ICCID static void uim_get_iccid_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsUimGetIccidOutput *output; GError *error = NULL; output = qmi_client_dms_uim_get_iccid_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_get_iccid_output_get_result (output, &error)) { g_printerr ("error: couldn't get ICCID: %s\n", error->message); g_error_free (error); qmi_message_dms_uim_get_iccid_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_uim_get_iccid_output_get_iccid (output, &str, NULL); g_print ("[%s] UIM ICCID retrieved:\n" "\tICCID: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_uim_get_iccid_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_GET_ICCID */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_IMSI static void uim_get_imsi_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsUimGetImsiOutput *output; GError *error = NULL; output = qmi_client_dms_uim_get_imsi_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_get_imsi_output_get_result (output, &error)) { g_printerr ("error: couldn't get IMSI: %s\n", error->message); g_error_free (error); qmi_message_dms_uim_get_imsi_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_uim_get_imsi_output_get_imsi (output, &str, NULL); g_print ("[%s] UIM IMSI retrieved:\n" "\tIMSI: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_uim_get_imsi_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_GET_IMSI */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_STATE static void uim_get_state_ready (QmiClientDms *client, GAsyncResult *res) { QmiDmsUimState state; QmiMessageDmsUimGetStateOutput *output; GError *error = NULL; output = qmi_client_dms_uim_get_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_get_state_output_get_result (output, &error)) { g_printerr ("error: couldn't get UIM state: %s\n", error->message); g_error_free (error); qmi_message_dms_uim_get_state_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_uim_get_state_output_get_state (output, &state, NULL); g_print ("[%s] UIM state retrieved:\n" "\tState: '%s'\n", qmi_device_get_path_display (ctx->device), qmi_dms_uim_state_get_string (state)); qmi_message_dms_uim_get_state_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_GET_STATE */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_CK_STATUS static QmiMessageDmsUimGetCkStatusInput * uim_get_ck_status_input_create (const gchar *str) { QmiMessageDmsUimGetCkStatusInput *input = NULL; QmiDmsUimFacility facility; if (qmicli_read_dms_uim_facility_from_string (str, &facility)) { GError *error = NULL; input = qmi_message_dms_uim_get_ck_status_input_new (); if (!qmi_message_dms_uim_get_ck_status_input_set_facility ( input, facility, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_uim_get_ck_status_input_unref (input); input = NULL; } } return input; } static void uim_get_ck_status_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsUimGetCkStatusOutput *output; GError *error = NULL; QmiDmsUimFacilityState state; guint8 verify_retries_left; guint8 unblock_retries_left; gboolean blocking; output = qmi_client_dms_uim_get_ck_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_get_ck_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get UIM CK status: %s\n", error->message); g_error_free (error); qmi_message_dms_uim_get_ck_status_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_uim_get_ck_status_output_get_ck_status ( output, &state, &verify_retries_left, &unblock_retries_left, NULL); g_print ("[%s] UIM facility state retrieved:\n" "\tState: '%s'\n", qmi_device_get_path_display (ctx->device), qmi_dms_uim_facility_state_get_string (state)); g_print ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); if (qmi_message_dms_uim_get_ck_status_output_get_operation_blocking_facility ( output, &blocking, NULL) && blocking) { g_print ("[%s] Facility is blocking operation\n", qmi_device_get_path_display (ctx->device)); } qmi_message_dms_uim_get_ck_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_GET_CK_STATUS */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_SET_CK_PROTECTION static QmiMessageDmsUimSetCkProtectionInput * uim_set_ck_protection_input_create (const gchar *str) { QmiMessageDmsUimSetCkProtectionInput *input = NULL; gchar **split; QmiDmsUimFacility facility; gboolean enable_disable; gchar *key; /* Prepare inputs. * Format of the string is: * "[(facility),disable,(key)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_dms_uim_facility_from_string (split[0], &facility) && qmicli_read_enable_disable_from_string (split[1], &enable_disable) && qmicli_read_non_empty_string (split[2], "control key", &key)) { /* We should only allow 'disable' here */ if (enable_disable) { g_printerr ("error: only 'disable' action is allowed\n"); } else { GError *error = NULL; input = qmi_message_dms_uim_set_ck_protection_input_new (); if (!qmi_message_dms_uim_set_ck_protection_input_set_facility ( input, facility, (QmiDmsUimFacilityState)enable_disable, /* 0 == DISABLE */ key, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_uim_set_ck_protection_input_unref (input); input = NULL; } } } g_strfreev (split); return input; } static void uim_set_ck_protection_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsUimSetCkProtectionOutput *output; GError *error = NULL; output = qmi_client_dms_uim_set_ck_protection_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_set_ck_protection_output_get_result (output, &error)) { guint8 verify_retries_left; g_printerr ("error: couldn't set UIM CK protection: %s\n", error->message); g_error_free (error); if (qmi_message_dms_uim_set_ck_protection_output_get_verify_retries_left ( output, &verify_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left); } qmi_message_dms_uim_set_ck_protection_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] UIM CK protection set\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_uim_set_ck_protection_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_SET_CK_PROTECTION */ #if defined HAVE_QMI_MESSAGE_DMS_UIM_UNBLOCK_CK static QmiMessageDmsUimUnblockCkInput * uim_unblock_ck_input_create (const gchar *str) { QmiMessageDmsUimUnblockCkInput *input = NULL; gchar **split; QmiDmsUimFacility facility; gchar *key; /* Prepare inputs. * Format of the string is: * "[(facility),(key)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_dms_uim_facility_from_string (split[0], &facility) && qmicli_read_non_empty_string (split[1], "control key", &key)) { GError *error = NULL; input = qmi_message_dms_uim_unblock_ck_input_new (); if (!qmi_message_dms_uim_unblock_ck_input_set_facility ( input, facility, key, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_uim_unblock_ck_input_unref (input); input = NULL; } } g_strfreev (split); return input; } static void uim_unblock_ck_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsUimUnblockCkOutput *output; GError *error = NULL; output = qmi_client_dms_uim_unblock_ck_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_uim_unblock_ck_output_get_result (output, &error)) { guint8 unblock_retries_left; g_printerr ("error: couldn't unblock CK: %s\n", error->message); g_error_free (error); if (qmi_message_dms_uim_unblock_ck_output_get_unblock_retries_left ( output, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), unblock_retries_left); } qmi_message_dms_uim_unblock_ck_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] UIM CK unblocked\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_uim_unblock_ck_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_UIM_UNBLOCK_CK */ #if defined HAVE_QMI_MESSAGE_DMS_GET_HARDWARE_REVISION static void get_hardware_revision_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsGetHardwareRevisionOutput *output; GError *error = NULL; output = qmi_client_dms_get_hardware_revision_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_hardware_revision_output_get_result (output, &error)) { g_printerr ("error: couldn't get the HW revision: %s\n", error->message); g_error_free (error); qmi_message_dms_get_hardware_revision_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_hardware_revision_output_get_revision (output, &str, NULL); g_print ("[%s] Hardware revision retrieved:\n" "\tRevision: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_get_hardware_revision_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_HARDWARE_REVISION */ #if defined HAVE_QMI_MESSAGE_DMS_GET_OPERATING_MODE static void get_operating_mode_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetOperatingModeOutput *output; QmiDmsOperatingMode mode; gboolean hw_restricted = FALSE; GError *error = NULL; output = qmi_client_dms_get_operating_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_operating_mode_output_get_result (output, &error)) { g_printerr ("error: couldn't get the HW revision: %s\n", error->message); g_error_free (error); qmi_message_dms_get_operating_mode_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_operating_mode_output_get_mode (output, &mode, NULL); g_print ("[%s] Operating mode retrieved:\n" "\tMode: '%s'\n", qmi_device_get_path_display (ctx->device), qmi_dms_operating_mode_get_string (mode)); if (mode == QMI_DMS_OPERATING_MODE_OFFLINE || mode == QMI_DMS_OPERATING_MODE_LOW_POWER) { QmiDmsOfflineReason reason; if (qmi_message_dms_get_operating_mode_output_get_offline_reason (output, &reason, NULL)) { g_autofree gchar *reason_str = NULL; reason_str = qmi_dms_offline_reason_build_string_from_mask (reason); g_print ("\tReason: '%s'\n", VALIDATE_MASK_NONE (reason_str)); } } qmi_message_dms_get_operating_mode_output_get_hardware_restricted_mode (output, &hw_restricted, NULL); g_print ("\tHW restricted: '%s'\n", hw_restricted ? "yes" : "no"); qmi_message_dms_get_operating_mode_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_OPERATING_MODE */ #if defined HAVE_QMI_MESSAGE_DMS_SET_OPERATING_MODE static QmiMessageDmsSetOperatingModeInput * set_operating_mode_input_create (const gchar *str) { QmiMessageDmsSetOperatingModeInput *input = NULL; QmiDmsOperatingMode mode; if (qmicli_read_dms_operating_mode_from_string (str, &mode)) { GError *error = NULL; input = qmi_message_dms_set_operating_mode_input_new (); if (!qmi_message_dms_set_operating_mode_input_set_mode ( input, mode, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_set_operating_mode_input_unref (input); input = NULL; } } return input; } static void set_operating_mode_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetOperatingModeOutput *output; GError *error = NULL; output = qmi_client_dms_set_operating_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_set_operating_mode_output_get_result (output, &error)) { g_printerr ("error: couldn't set operating mode: %s\n", error->message); g_error_free (error); qmi_message_dms_set_operating_mode_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Operating mode set successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_set_operating_mode_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_OPERATING_MODE */ #if defined HAVE_QMI_MESSAGE_DMS_GET_TIME static void get_time_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetTimeOutput *output; guint64 time_count; QmiDmsTimeSource time_source; GError *error = NULL; gchar *str; GTimeZone *time_zone; GDateTime *gpstime_epoch; GDateTime *computed_epoch; output = qmi_client_dms_get_time_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_time_output_get_result (output, &error)) { g_printerr ("error: couldn't get the device time: %s\n", error->message); g_error_free (error); qmi_message_dms_get_time_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_time_output_get_device_time ( output, &time_count, &time_source, NULL); /* January 6th 1980 */ time_zone = g_time_zone_new_utc (); gpstime_epoch = g_date_time_new (time_zone, 1980, 1, 6, 0, 0, 0.0); computed_epoch = g_date_time_add_seconds (gpstime_epoch, ((gdouble) time_count / 1000.0)); str = g_date_time_format (computed_epoch, "%F %T"); g_print ("[%s] Time retrieved:\n" "\tTime count: '%" G_GUINT64_FORMAT " (x 1.25ms): %s'\n" "\tTime source: '%s'\n", qmi_device_get_path_display (ctx->device), time_count, str, qmi_dms_time_source_get_string (time_source)); g_free (str); g_date_time_unref (computed_epoch); if (qmi_message_dms_get_time_output_get_system_time ( output, &time_count, NULL)){ computed_epoch = g_date_time_add_seconds (gpstime_epoch, ((gdouble) time_count / 1000.0)); str = g_date_time_format (computed_epoch, "%F %T"); g_print ("\tSystem time: '%" G_GUINT64_FORMAT " (ms): %s'\n", time_count, str); g_free (str); g_date_time_unref (computed_epoch); } if (qmi_message_dms_get_time_output_get_user_time ( output, &time_count, NULL)){ computed_epoch = g_date_time_add_seconds (gpstime_epoch, ((gdouble) time_count / 1000.0)); str = g_date_time_format (computed_epoch, "%F %T"); g_print ("\tUser time: '%" G_GUINT64_FORMAT " (ms): %s'\n", time_count, str); g_free (str); g_date_time_unref (computed_epoch); } g_date_time_unref (gpstime_epoch); g_time_zone_unref (time_zone); qmi_message_dms_get_time_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_TIME */ #if defined HAVE_QMI_MESSAGE_DMS_GET_PRL_VERSION static void get_prl_version_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetPrlVersionOutput *output; guint16 prl_version; gboolean prl_only; GError *error = NULL; output = qmi_client_dms_get_prl_version_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_prl_version_output_get_result (output, &error)) { g_printerr ("error: couldn't get the PRL version: %s\n", error->message); g_error_free (error); qmi_message_dms_get_prl_version_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_prl_version_output_get_version ( output, &prl_version, NULL); g_print ("[%s] PRL version retrieved:\n" "\tPRL version: '%" G_GUINT16_FORMAT "'\n", qmi_device_get_path_display (ctx->device), prl_version); if (qmi_message_dms_get_prl_version_output_get_prl_only_preference ( output, &prl_only, NULL)){ g_print ("\tPRL only preference: '%s'\n", prl_only ? "yes" : "no"); } qmi_message_dms_get_prl_version_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_PRL_VERSION */ #if defined HAVE_QMI_MESSAGE_DMS_GET_ACTIVATION_STATE static void get_activation_state_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetActivationStateOutput *output; QmiDmsActivationState activation_state; GError *error = NULL; output = qmi_client_dms_get_activation_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_activation_state_output_get_result (output, &error)) { g_printerr ("error: couldn't get the state of the service activation: %s\n", error->message); g_error_free (error); qmi_message_dms_get_activation_state_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_activation_state_output_get_info ( output, &activation_state, NULL); g_print ("[%s] Activation state retrieved:\n" "\tState: '%s'\n", qmi_device_get_path_display (ctx->device), qmi_dms_activation_state_get_string (activation_state)); qmi_message_dms_get_activation_state_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_ACTIVATION_STATE */ #if defined HAVE_QMI_MESSAGE_DMS_ACTIVATE_MANUAL static QmiMessageDmsActivateManualInput * activate_manual_input_create (const gchar *str) { QmiMessageDmsActivateManualInput *input; gchar **split; GError *error = NULL; gulong split_1_int; split = g_strsplit (str, ",", -1); if (g_strv_length (split) != 4) { g_printerr ("error: incorrect number of arguments given\n"); g_strfreev (split); return NULL; } split_1_int = strtoul (split[1], NULL, 10); if (split_1_int > G_MAXUINT16) { g_printerr ("error: invalid SID given '%s'\n", split[1]); return NULL; } input = qmi_message_dms_activate_manual_input_new (); if (!qmi_message_dms_activate_manual_input_set_info ( input, split[0], (guint16)split_1_int, split[2], split[3], &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_activate_manual_input_unref (input); input = NULL; } g_strfreev(split); return input; } static void activate_manual_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsActivateManualOutput *output; GError *error = NULL; output = qmi_client_dms_activate_manual_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_activate_manual_output_get_result (output, &error)) { g_printerr ("error: couldn't request manual service activation: %s\n", error->message); g_error_free (error); qmi_message_dms_activate_manual_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_activate_manual_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_ACTIVATE_MANUAL */ #if defined HAVE_QMI_MESSAGE_DMS_ACTIVATE_AUTOMATIC static QmiMessageDmsActivateAutomaticInput * activate_automatic_input_create (const gchar *str) { QmiMessageDmsActivateAutomaticInput *input; GError *error = NULL; input = qmi_message_dms_activate_automatic_input_new (); if (!qmi_message_dms_activate_automatic_input_set_activation_code ( input, str, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_activate_automatic_input_unref (input); input = NULL; } return input; } static void activate_automatic_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsActivateAutomaticOutput *output; GError *error = NULL; output = qmi_client_dms_activate_automatic_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_activate_automatic_output_get_result (output, &error)) { g_printerr ("error: couldn't request automatic service activation: %s\n", error->message); g_error_free (error); qmi_message_dms_activate_automatic_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_activate_automatic_output_unref (output); operation_shutdown (TRUE); } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_USER_LOCK_STATE static void get_user_lock_state_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetUserLockStateOutput *output; gboolean enabled; GError *error = NULL; output = qmi_client_dms_get_user_lock_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_user_lock_state_output_get_result (output, &error)) { g_printerr ("error: couldn't get the state of the user lock: %s\n", error->message); g_error_free (error); qmi_message_dms_get_user_lock_state_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_user_lock_state_output_get_enabled ( output, &enabled, NULL); g_print ("[%s] User lock state retrieved:\n" "\tEnabled: '%s'\n", qmi_device_get_path_display (ctx->device), enabled ? "yes" : "no"); qmi_message_dms_get_user_lock_state_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_USER_LOCK_STATE */ #if defined HAVE_QMI_MESSAGE_DMS_SET_USER_LOCK_STATE static QmiMessageDmsSetUserLockStateInput * set_user_lock_state_input_create (const gchar *str) { QmiMessageDmsSetUserLockStateInput *input = NULL; gchar **split; gboolean enable_disable; gchar *code; /* Prepare inputs. * Format of the string is: * "[(disable|enable),(current lock code)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_enable_disable_from_string (split[0], &enable_disable) && qmicli_read_non_empty_string (split[1], "current lock code", &code)) { GError *error = NULL; input = qmi_message_dms_set_user_lock_state_input_new (); if (!qmi_message_dms_set_user_lock_state_input_set_info ( input, enable_disable, code, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_set_user_lock_state_input_unref (input); input = NULL; } } g_strfreev (split); return input; } static void set_user_lock_state_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetUserLockStateOutput *output; GError *error = NULL; output = qmi_client_dms_set_user_lock_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_set_user_lock_state_output_get_result (output, &error)) { g_printerr ("error: couldn't set state of the user lock: %s\n", error->message); g_error_free (error); qmi_message_dms_set_user_lock_state_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] User lock state updated\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_set_user_lock_state_output_unref (output); operation_shutdown (TRUE); } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_USER_LOCK_CODE static QmiMessageDmsSetUserLockCodeInput * set_user_lock_code_input_create (const gchar *str) { QmiMessageDmsSetUserLockCodeInput *input = NULL; gchar **split; gchar *old_code; gchar *new_code; /* Prepare inputs. * Format of the string is: * "[(old lock code),(new lock code)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_non_empty_string (split[0], "old lock code", &old_code) && qmicli_read_non_empty_string (split[1], "new lock code", &new_code)) { GError *error = NULL; input = qmi_message_dms_set_user_lock_code_input_new (); if (!qmi_message_dms_set_user_lock_code_input_set_info ( input, old_code, new_code, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_set_user_lock_code_input_unref (input); input = NULL; } } g_strfreev (split); return input; } static void set_user_lock_code_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetUserLockCodeOutput *output; GError *error = NULL; output = qmi_client_dms_set_user_lock_code_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_set_user_lock_code_output_get_result (output, &error)) { g_printerr ("error: couldn't change user lock code: %s\n", error->message); g_error_free (error); qmi_message_dms_set_user_lock_code_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] User lock code changed\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_set_user_lock_code_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_USER_LOCK_CODE */ #if defined HAVE_QMI_MESSAGE_DMS_READ_USER_DATA static void read_user_data_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsReadUserDataOutput *output; GArray *user_data = NULL; gchar *user_data_printable; GError *error = NULL; output = qmi_client_dms_read_user_data_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_read_user_data_output_get_result (output, &error)) { g_printerr ("error: couldn't read user data: %s\n", error->message); g_error_free (error); qmi_message_dms_read_user_data_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_read_user_data_output_get_user_data ( output, &user_data, NULL); user_data_printable = qmicli_get_raw_data_printable (user_data, 80, "\t\t"); g_print ("[%s] User data read:\n" "\tSize: '%u' bytes\n" "\tContents:\n" "%s", qmi_device_get_path_display (ctx->device), user_data->len, user_data_printable); g_free (user_data_printable); qmi_message_dms_read_user_data_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_READ_USER_DATA */ #if defined HAVE_QMI_MESSAGE_DMS_WRITE_USER_DATA static QmiMessageDmsWriteUserDataInput * write_user_data_input_create (const gchar *str) { QmiMessageDmsWriteUserDataInput *input; GArray *array; GError *error = NULL; /* Prepare inputs. Just assume we'll get some text string here, although * nobody said this had to be text. Read User Data actually treats the * contents of the user data as raw binary data. */ array = g_array_sized_new (FALSE, FALSE, 1, strlen (str)); g_array_insert_vals (array, 0, str, strlen (str)); input = qmi_message_dms_write_user_data_input_new (); if (!qmi_message_dms_write_user_data_input_set_user_data ( input, array, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_write_user_data_input_unref (input); input = NULL; } g_array_unref (array); return input; } static void write_user_data_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsWriteUserDataOutput *output; GError *error = NULL; output = qmi_client_dms_write_user_data_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_write_user_data_output_get_result (output, &error)) { g_printerr ("error: couldn't write user data: %s\n", error->message); g_error_free (error); qmi_message_dms_write_user_data_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] User data written", qmi_device_get_path_display (ctx->device)); qmi_message_dms_write_user_data_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_WRITE_USER_DATA */ #if defined HAVE_QMI_MESSAGE_DMS_READ_ERI_FILE static void read_eri_file_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsReadEriFileOutput *output; GArray *eri_file = NULL; gchar *eri_file_printable; GError *error = NULL; output = qmi_client_dms_read_eri_file_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_read_eri_file_output_get_result (output, &error)) { g_printerr ("error: couldn't read eri file: %s\n", error->message); g_error_free (error); qmi_message_dms_read_eri_file_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_read_eri_file_output_get_eri_file ( output, &eri_file, NULL); eri_file_printable = qmicli_get_raw_data_printable (eri_file, 80, "\t\t"); g_print ("[%s] ERI file read:\n" "\tSize: '%u' bytes\n" "\tContents:\n" "%s", qmi_device_get_path_display (ctx->device), eri_file->len, eri_file_printable); g_free (eri_file_printable); qmi_message_dms_read_eri_file_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_READ_ERI_FILE */ #if defined HAVE_QMI_MESSAGE_DMS_RESTORE_FACTORY_DEFAULTS static QmiMessageDmsRestoreFactoryDefaultsInput * restore_factory_defaults_input_create (const gchar *str) { QmiMessageDmsRestoreFactoryDefaultsInput *input; GError *error = NULL; input = qmi_message_dms_restore_factory_defaults_input_new (); if (!qmi_message_dms_restore_factory_defaults_input_set_service_programming_code ( input, str, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_restore_factory_defaults_input_unref (input); input = NULL; } return input; } static void restore_factory_defaults_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsRestoreFactoryDefaultsOutput *output; GError *error = NULL; output = qmi_client_dms_restore_factory_defaults_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_restore_factory_defaults_output_get_result (output, &error)) { g_printerr ("error: couldn't restores factory defaults: %s\n", error->message); g_error_free (error); qmi_message_dms_restore_factory_defaults_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Factory defaults restored\n" "Device needs to get power-cycled for reset to take effect.\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_restore_factory_defaults_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_RESTORE_FACTORY_DEFAULTS */ #if defined HAVE_QMI_MESSAGE_DMS_VALIDATE_SERVICE_PROGRAMMING_CODE static QmiMessageDmsValidateServiceProgrammingCodeInput * validate_service_programming_code_input_create (const gchar *str) { QmiMessageDmsValidateServiceProgrammingCodeInput *input; GError *error = NULL; input = qmi_message_dms_validate_service_programming_code_input_new (); if (!qmi_message_dms_validate_service_programming_code_input_set_service_programming_code ( input, str, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_validate_service_programming_code_input_unref (input); input = NULL; } return input; } static void validate_service_programming_code_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsValidateServiceProgrammingCodeOutput *output; GError *error = NULL; output = qmi_client_dms_validate_service_programming_code_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_validate_service_programming_code_output_get_result (output, &error)) { g_printerr ("error: couldn't validate Service Programming Code: %s\n", error->message); g_error_free (error); qmi_message_dms_validate_service_programming_code_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Service Programming Code validated\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_validate_service_programming_code_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_VALIDATE_SERVICE_PROGRAMMING_CODE */ #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_ID static void set_firmware_id_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetFirmwareIdOutput *output; GError *error = NULL; output = qmi_client_dms_set_firmware_id_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_set_firmware_id_output_get_result (output, &error)) { g_printerr ("error: couldn't set firmware id: %s\n", error->message); g_error_free (error); qmi_message_dms_set_firmware_id_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Firmware id set\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_set_firmware_id_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_ID */ #if defined HAVE_QMI_MESSAGE_DMS_GET_BAND_CAPABILITIES static void get_band_capabilities_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetBandCapabilitiesOutput *output; QmiDmsBandCapability band_capability; QmiDmsLteBandCapability lte_band_capability; GArray *extended_lte_band_capability; GArray *nr5g_band_capability; GError *error = NULL; output = qmi_client_dms_get_band_capabilities_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_band_capabilities_output_get_result (output, &error)) { g_printerr ("error: couldn't get band capabilities: %s\n", error->message); g_error_free (error); qmi_message_dms_get_band_capabilities_output_unref (output); operation_shutdown (FALSE); return; } if (qmi_message_dms_get_band_capabilities_output_get_band_capability ( output, &band_capability, NULL)) { g_autofree gchar *str = NULL; str = qmi_dms_band_capability_build_string_from_mask (band_capability); g_print ("[%s] Device band capabilities retrieved:\n" "\tBands: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_MASK_NONE (str)); } if (qmi_message_dms_get_band_capabilities_output_get_lte_band_capability ( output, <e_band_capability, NULL)) { g_autofree gchar *str = NULL; str = qmi_dms_lte_band_capability_build_string_from_mask (lte_band_capability); g_print ("\tLTE bands: '%s'\n", VALIDATE_MASK_NONE (str)); } if (qmi_message_dms_get_band_capabilities_output_get_extended_lte_band_capability ( output, &extended_lte_band_capability, NULL)) { guint i; g_print ("\tLTE bands (extended): '"); for (i = 0; i < extended_lte_band_capability->len; i++) g_print ("%s%" G_GUINT16_FORMAT, i == 0 ? "" : ", ", g_array_index (extended_lte_band_capability, guint16, i)); g_print ("'\n"); } if (qmi_message_dms_get_band_capabilities_output_get_nr5g_band_capability ( output, &nr5g_band_capability, NULL)) { guint i; g_print ("\tNR5G bands: '"); for (i = 0; i < nr5g_band_capability->len; i++) g_print ("%s%" G_GUINT16_FORMAT, i == 0 ? "" : ", ", g_array_index (nr5g_band_capability, guint16, i)); g_print ("'\n"); } qmi_message_dms_get_band_capabilities_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_BAND_CAPABILITIES */ #if defined HAVE_QMI_MESSAGE_DMS_GET_FACTORY_SKU static void get_factory_sku_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsGetFactorySkuOutput *output; GError *error = NULL; output = qmi_client_dms_get_factory_sku_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_factory_sku_output_get_result (output, &error)) { g_printerr ("error: couldn't get factory SKU: %s\n", error->message); g_error_free (error); qmi_message_dms_get_factory_sku_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_factory_sku_output_get_sku (output, &str, NULL); g_print ("[%s] Device factory SKU retrieved:\n" "\tSKU: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_get_factory_sku_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_FACTORY_SKU */ #if defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && \ defined HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO typedef struct { QmiMessageDmsListStoredImagesOutput *list_images_output; guint i; guint j; } ListImagesContext; static void list_images_context_free (ListImagesContext *operation_ctx) { qmi_message_dms_list_stored_images_output_unref (operation_ctx->list_images_output); g_slice_free (ListImagesContext, operation_ctx); } static void get_image_info (ListImagesContext *operation_ctx); static void print_image_info (ListImagesContext *operation_ctx, QmiMessageDmsGetStoredImageInfoOutput *output) { GArray *array; QmiMessageDmsListStoredImagesOutputListImage *image; QmiMessageDmsListStoredImagesOutputListImageSublistSublistElement *subimage; g_autofree gchar *unique_id_str = NULL; qmi_message_dms_list_stored_images_output_get_list ( operation_ctx->list_images_output, &array, NULL); image = &g_array_index (array, QmiMessageDmsListStoredImagesOutputListImage, operation_ctx->i); subimage = &g_array_index (image->sublist, QmiMessageDmsListStoredImagesOutputListImageSublistSublistElement, operation_ctx->j); unique_id_str = qmicli_get_firmware_image_unique_id_printable (subimage->unique_id); g_print ("%s" "\t\t[%s%u]\n" "\t\tUnique ID: '%s'\n" "\t\tBuild ID: '%s'\n", operation_ctx->j == image->index_of_running_image ? "\t\t>>>>>>>>>> [CURRENT] <<<<<<<<<<\n" : "", qmi_dms_firmware_image_type_get_string (image->type), operation_ctx->j, unique_id_str, subimage->build_id); if (subimage->storage_index != 255) g_print ("\t\tStorage index: '%u'\n", subimage->storage_index); if (subimage->failure_count != 255) g_print ("\t\tFailure count: '%u'\n", subimage->failure_count); if (output) { /* Boot version (optional) */ { guint16 boot_major_version; guint16 boot_minor_version; if (qmi_message_dms_get_stored_image_info_output_get_boot_version ( output, &boot_major_version, &boot_minor_version, NULL)) { g_print ("\t\tBoot version: '%u.%u'\n", boot_major_version, boot_minor_version); } } /* PRI version (optional) */ { guint32 pri_version; const gchar *pri_info; if (qmi_message_dms_get_stored_image_info_output_get_pri_version ( output, &pri_version, &pri_info, NULL)) { g_print ("\t\tPRI version: '%u'\n" "\t\tPRI info: '%s'\n", pri_version, pri_info); } } /* OEM lock ID (optional) */ { guint32 lock_id; if (qmi_message_dms_get_stored_image_info_output_get_oem_lock_id ( output, &lock_id, NULL)) { g_print ("\t\tOEM lock ID: '%u'\n", lock_id); } } } g_print ("\n"); } static void get_stored_image_info_ready (QmiClientDms *client, GAsyncResult *res, ListImagesContext *operation_ctx) { g_autoptr(QmiMessageDmsGetStoredImageInfoOutput) output = NULL; output = qmi_client_dms_get_stored_image_info_finish (client, res, NULL); if (output && !qmi_message_dms_get_stored_image_info_output_get_result (output, NULL)) g_clear_pointer (&output, qmi_message_dms_get_stored_image_info_output_unref); print_image_info (operation_ctx, output); /* Go on to the next one */ operation_ctx->j++; get_image_info (operation_ctx); } static void get_image_info (ListImagesContext *operation_ctx) { GArray *array; QmiMessageDmsListStoredImagesOutputListImage *image; QmiMessageDmsListStoredImagesOutputListImageSublistSublistElement *subimage; g_autoptr(QmiMessageDmsGetStoredImageInfoInput) input = NULL; qmi_message_dms_list_stored_images_output_get_list ( operation_ctx->list_images_output, &array, NULL); if (operation_ctx->i >= array->len) { /* We're done */ list_images_context_free (operation_ctx); operation_shutdown (TRUE); return; } image = &g_array_index (array, QmiMessageDmsListStoredImagesOutputListImage, operation_ctx->i); if (operation_ctx->j >= image->sublist->len) { /* No more images in the sublist, go to next image type */ operation_ctx->j = 0; operation_ctx->i++; get_image_info (operation_ctx); return; } /* Print info of the image type */ if (operation_ctx->j == 0) { g_print ("\t[%u] Type: '%s'\n" "\t Maximum: '%u'\n" "\n", operation_ctx->i, qmi_dms_firmware_image_type_get_string (image->type), image->maximum_images); } subimage = &g_array_index (image->sublist, QmiMessageDmsListStoredImagesOutputListImageSublistSublistElement, operation_ctx->j); /* Query image info */ input = qmi_message_dms_get_stored_image_info_input_new (); qmi_message_dms_get_stored_image_info_input_set_image_details (input, image->type, subimage->unique_id, subimage->build_id, NULL); qmi_client_dms_get_stored_image_info (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_stored_image_info_ready, operation_ctx); } static void list_stored_images_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsListStoredImagesOutput *output; GError *error = NULL; ListImagesContext *operation_ctx; output = qmi_client_dms_list_stored_images_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_list_stored_images_output_get_result (output, &error)) { g_printerr ("error: couldn't list stored images: %s\n", error->message); g_error_free (error); qmi_message_dms_list_stored_images_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Device list of stored images retrieved:\n\n", qmi_device_get_path_display (ctx->device)); operation_ctx = g_slice_new0 (ListImagesContext); operation_ctx->list_images_output = output; operation_ctx->i = 0; operation_ctx->j = 0; get_image_info (operation_ctx); } #endif /* HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO */ #if defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && \ defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE typedef struct { gint modem_index; gint pri_index; } GetStoredImageContext; typedef struct { GArray *modem_unique_id; gchar *modem_build_id; GArray *pri_unique_id; gchar *pri_build_id; } GetStoredImageResult; static void get_stored_image_context_free (GetStoredImageContext *operation_ctx) { g_slice_free (GetStoredImageContext, operation_ctx); } static void get_stored_image_result_free (GetStoredImageResult *result) { if (result) { g_clear_pointer (&result->modem_unique_id, g_array_unref); g_free (result->modem_build_id); g_clear_pointer (&result->pri_unique_id, g_array_unref); g_free (result->pri_build_id); g_slice_free (GetStoredImageResult, result); } } static void get_stored_image_finish (QmiClientDms *client, GAsyncResult *res, GArray **modem_unique_id, gchar **modem_build_id, GArray **pri_unique_id, gchar **pri_build_id) { GetStoredImageResult *result; GError *error = NULL; result = g_task_propagate_pointer (G_TASK (res), &error); /* The operation always returns a result */ g_assert (result); g_assert_no_error (error); /* Simply pass ownership to caller */ *modem_unique_id = result->modem_unique_id; *modem_build_id = result->modem_build_id; *pri_unique_id = result->pri_unique_id; *pri_build_id = result->pri_build_id; g_slice_free (GetStoredImageResult, result); } static void get_stored_image_list_stored_images_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { GetStoredImageContext *operation_ctx; GetStoredImageResult *result; GArray *array; QmiMessageDmsListStoredImagesOutput *output; GError *error = NULL; guint i; output = qmi_client_dms_list_stored_images_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); g_object_unref (task); operation_shutdown (FALSE); return; } if (!qmi_message_dms_list_stored_images_output_get_result (output, &error)) { g_printerr ("error: couldn't list stored images: %s\n", error->message); g_error_free (error); qmi_message_dms_list_stored_images_output_unref (output); g_object_unref (task); operation_shutdown (FALSE); return; } qmi_message_dms_list_stored_images_output_get_list ( output, &array, NULL); operation_ctx = g_task_get_task_data (task); /* A single result struct is used for all iterations */ result = g_slice_new0 (GetStoredImageResult); for (i = 0; i < array->len; i++) { QmiMessageDmsListStoredImagesOutputListImageSublistSublistElement *subimage; QmiMessageDmsListStoredImagesOutputListImage *image; gchar *unique_id_str; gint image_index; image = &g_array_index (array, QmiMessageDmsListStoredImagesOutputListImage, i); if (image->type == QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM) image_index = operation_ctx->modem_index; else if (image->type == QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI) image_index = operation_ctx->pri_index; else g_assert_not_reached (); /* If not looking for the specific image type, go on */ if (image_index < 0) continue; if ((guint)image_index >= image->sublist->len) { g_printerr ("error: couldn't find '%s' image at index '%d'\n", qmi_dms_firmware_image_type_get_string (image->type), image_index); qmi_message_dms_list_stored_images_output_unref (output); g_object_unref (task); operation_shutdown (FALSE); return; } subimage = &g_array_index (image->sublist, QmiMessageDmsListStoredImagesOutputListImageSublistSublistElement, image_index); unique_id_str = qmicli_get_firmware_image_unique_id_printable (subimage->unique_id); g_debug ("Found [%s%d]: Unique ID: '%s', Build ID: '%s'", qmi_dms_firmware_image_type_get_string (image->type), image_index, unique_id_str, subimage->build_id); g_free (unique_id_str); if (image->type == QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM) { result->modem_unique_id = g_array_ref (subimage->unique_id); result->modem_build_id = g_strdup (subimage->build_id); } else if (image->type == QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI) { result->pri_unique_id = g_array_ref (subimage->unique_id); result->pri_build_id = g_strdup (subimage->build_id); } else g_assert_not_reached (); } /* Complete */ g_task_return_pointer (task, result, (GDestroyNotify)get_stored_image_result_free); g_object_unref (task); qmi_message_dms_list_stored_images_output_unref (output); } static void get_stored_image (QmiClientDms *client, const gchar *str, GAsyncReadyCallback callback, gpointer user_data) { GetStoredImageContext *operation_ctx; GTask *task; gchar **split; guint i = 0; gint modem_index = -1; gint pri_index = -1; split = g_strsplit (str, ",", -1); while (split[i]) { QmiDmsFirmwareImageType type; guint image_index; if (i >= 3) { g_printerr ("A maximum of 2 images should be given: '%s'\n", str); operation_shutdown (FALSE); return; } if (!qmicli_read_firmware_id_from_string (split[i], &type, &image_index)) { g_printerr ("Couldn't parse input string as firmware index info: '%s'\n", str); operation_shutdown (FALSE); return; } if (type == QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM) { if (modem_index >= 0) { g_printerr ("Cannot handle two 'modem' type firmware indices: '%s'\n", str); operation_shutdown (FALSE); return; } modem_index = (gint)image_index; } else if (type == QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI) { if (pri_index >= 0) { g_printerr ("Cannot handle two 'pri' type firmware indices: '%s'\n", str); operation_shutdown (FALSE); return; } pri_index = (gint)image_index; } i++; } operation_ctx = g_slice_new (GetStoredImageContext); operation_ctx->modem_index = modem_index; operation_ctx->pri_index = pri_index; task = g_task_new (client, NULL, callback, user_data); g_task_set_task_data (task, operation_ctx, (GDestroyNotify)get_stored_image_context_free); qmi_client_dms_list_stored_images ( ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_stored_image_list_stored_images_ready, task); } #endif /* HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES * HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE /* Note: * used by both --dms-set-firmware-preference and --dms-select-stored-image * But only one single symbol check, as the select operation already * requires SET_FIRMWARE_PREFERENCE. */ static void dms_set_firmware_preference_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetFirmwarePreferenceOutput *output; GError *error = NULL; GArray *array; GString *pending_images = NULL; output = qmi_client_dms_set_firmware_preference_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_set_firmware_preference_output_get_result (output, &error)) { g_printerr ("error: couldn't select stored image: %s\n", error->message); g_error_free (error); qmi_message_dms_set_firmware_preference_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Firmware preference successfully selected\n" "\n" "\tYou may want to power-cycle the modem now, or just set it offline and reset it:\n" "\t\t$> sudo qmicli ... --dms-set-operating-mode=offline\n" "\t\t$> sudo qmicli ... --dms-set-operating-mode=reset\n" "\n", qmi_device_get_path_display (ctx->device)); /* do we need to download a new modem and/or pri image? */ if (qmi_message_dms_set_firmware_preference_output_get_image_download_list (output, &array, NULL) && array->len) { guint i; QmiDmsFirmwareImageType type; pending_images = g_string_new (""); for (i = 0; i < array->len; i++) { type = g_array_index (array, QmiDmsFirmwareImageType, i); g_string_append (pending_images, qmi_dms_firmware_image_type_get_string (type)); if (i < array->len -1) g_string_append (pending_images, ", "); } } if (pending_images) { g_print ("\tAfter reset, the modem will wait in QDL mode for new firmware.\n" "\tImages to download: '%s'\n" "\n", pending_images->str); g_string_free (pending_images, TRUE); } else { /* If we're selecting an already stored image, or if we don't need any * more images to be downloaded, we're done. */ g_print ("\tNo new images are required to be downloaded.\n" "\n" "\tYou should check that the modem|pri image pair is valid by checking the current operating mode:\n" "\t\t$> sudo qmicli .... --dms-get-operating-mode\n" "\tIf the Mode is reported as 'online', you're good to go.\n" "\tIf the Mode is reported as 'offline' with a 'pri-version-incompatible' reason, you chose an incorrect pair\n" "\n"); } qmi_message_dms_set_firmware_preference_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE && \ defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES static void get_stored_image_select_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetFirmwarePreferenceInput *input; GArray *array; QmiMessageDmsSetFirmwarePreferenceInputListImage modem_image_id; QmiMessageDmsSetFirmwarePreferenceInputListImage pri_image_id; modem_image_id.type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; pri_image_id.type = QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI; get_stored_image_finish (client, res, &modem_image_id.unique_id, &modem_image_id.build_id, &pri_image_id.unique_id, &pri_image_id.build_id); if (!modem_image_id.unique_id || !modem_image_id.build_id || !pri_image_id.unique_id || !pri_image_id.build_id) { g_printerr ("error: must specify a pair of 'modem' and 'pri' images to select\n"); operation_shutdown (FALSE); return; } array = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageDmsSetFirmwarePreferenceInputListImage), 2); g_array_append_val (array, modem_image_id); g_array_append_val (array, pri_image_id); input = qmi_message_dms_set_firmware_preference_input_new (); qmi_message_dms_set_firmware_preference_input_set_list (input, array, NULL); qmi_client_dms_set_firmware_preference ( client, input, 10, NULL, (GAsyncReadyCallback)dms_set_firmware_preference_ready, NULL); qmi_message_dms_set_firmware_preference_input_unref (input); g_free (modem_image_id.build_id); g_array_unref (modem_image_id.unique_id); g_free (pri_image_id.build_id); g_array_unref (pri_image_id.unique_id); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE * HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES */ #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE && \ defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && \ defined HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE static void delete_stored_image_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsDeleteStoredImageOutput *output; GError *error = NULL; output = qmi_client_dms_delete_stored_image_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_delete_stored_image_output_get_result (output, &error)) { g_printerr ("error: couldn't delete stored image: %s\n", error->message); g_error_free (error); qmi_message_dms_delete_stored_image_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Stored image successfully deleted\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_delete_stored_image_output_unref (output); operation_shutdown (TRUE); } static void get_stored_image_delete_ready (QmiClientDms *client, GAsyncResult *res) { g_autoptr(QmiMessageDmsDeleteStoredImageInput) input = NULL; g_autoptr(GArray) modem_unique_id = NULL; g_autofree gchar *modem_build_id = NULL; g_autoptr(GArray) pri_unique_id = NULL; g_autofree gchar *pri_build_id = NULL; get_stored_image_finish (client, res, &modem_unique_id, &modem_build_id, &pri_unique_id, &pri_build_id); if (modem_unique_id && modem_build_id && pri_unique_id && pri_build_id) { g_printerr ("error: cannot specify multiple images to delete\n"); operation_shutdown (FALSE); return; } input = qmi_message_dms_delete_stored_image_input_new (); if (modem_unique_id && modem_build_id) qmi_message_dms_delete_stored_image_input_set_image_details (input, QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM, modem_unique_id, modem_build_id, NULL); else if (pri_unique_id && pri_build_id) qmi_message_dms_delete_stored_image_input_set_image_details (input, QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI, pri_unique_id, pri_build_id, NULL); else { g_printerr ("error: didn't specify correctly an image to delete\n"); operation_shutdown (FALSE); return; } qmi_client_dms_delete_stored_image ( client, input, 10, NULL, (GAsyncReadyCallback)delete_stored_image_ready, NULL); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE * HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES * HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE */ #if defined HAVE_QMI_MESSAGE_DMS_GET_FIRMWARE_PREFERENCE static void dms_get_firmware_preference_ready (QmiClientDms *client, GAsyncResult *res) { GError *error = NULL; QmiMessageDmsGetFirmwarePreferenceOutput *output; GArray *array; guint i; output = qmi_client_dms_get_firmware_preference_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_firmware_preference_output_get_result (output, &error)) { g_printerr ("error: couldn't get firmware preference: %s\n", error->message); g_error_free (error); qmi_message_dms_get_firmware_preference_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_firmware_preference_output_get_list (output, &array, NULL); g_print ("firmware preference successfully retrieved:\n"); if (array->len > 0) { for (i = 0; i < array->len; i++) { QmiMessageDmsGetFirmwarePreferenceOutputListImage *image; gchar *unique_id_str; image = &g_array_index (array, QmiMessageDmsGetFirmwarePreferenceOutputListImage, i); unique_id_str = qmicli_get_firmware_image_unique_id_printable (image->unique_id); g_print ("[image %u]\n" "\tImage type: '%s'\n" "\tUnique ID: '%s'\n" "\tBuild ID: '%s'\n", i, qmi_dms_firmware_image_type_get_string (image->type), unique_id_str, image->build_id); g_free (unique_id_str); } } else g_print ("no images specified\n"); qmi_message_dms_get_firmware_preference_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_FIRMWARE_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE typedef struct { QmiMessageDmsSetFirmwarePreferenceInputListImage modem_image_id; QmiMessageDmsSetFirmwarePreferenceInputListImage pri_image_id; } SetFirmwarePreferenceContext; static void set_firmware_preference_context_clear (SetFirmwarePreferenceContext *firmware_preference_ctx) { g_clear_pointer (&firmware_preference_ctx->modem_image_id.unique_id, g_array_unref); g_free (firmware_preference_ctx->modem_image_id.build_id); g_clear_pointer (&firmware_preference_ctx->pri_image_id.unique_id, g_array_unref); g_free (firmware_preference_ctx->pri_image_id.build_id); } typedef struct { gchar *firmware_version; gchar *config_version; gchar *carrier; gint modem_storage_index; gboolean override_download; gboolean override_download_set; } SetFirmwarePreferenceProperties; static void set_firmware_preference_properties_clear (SetFirmwarePreferenceProperties *props) { g_free (props->firmware_version); g_free (props->config_version); g_free (props->carrier); } static gboolean set_firmware_preference_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { SetFirmwarePreferenceProperties *props = user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' required a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "firmware-version") == 0 && !props->firmware_version) { props->firmware_version = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "config-version") == 0 && !props->config_version) { props->config_version = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "carrier") == 0 && !props->carrier) { props->carrier = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "override-download") == 0 && !props->override_download_set) { if (!qmicli_read_yes_no_from_string (value, &(props->override_download))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown override-download '%s'", value); return FALSE; } props->override_download_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "modem-storage-index") == 0 && props->modem_storage_index == -1) { props->modem_storage_index = atoi (value); if (props->modem_storage_index < 0 || props->modem_storage_index > G_MAXUINT8) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid modem-storage-index '%s'", value); return FALSE; } return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unrecognized or duplicate option '%s'", key); return FALSE; } static QmiMessageDmsSetFirmwarePreferenceInput * set_firmware_preference_input_create (const gchar *str, SetFirmwarePreferenceContext *firmware_preference_ctx, GError **error) { g_autoptr(QmiMessageDmsSetFirmwarePreferenceInput) input = NULL; g_autoptr(GArray) array = NULL; SetFirmwarePreferenceProperties props = { .firmware_version = NULL, .config_version = NULL, .carrier = NULL, .modem_storage_index = -1, .override_download = FALSE, .override_download_set = FALSE, }; /* New key=value format */ if (strchr (str, '=')) { g_autoptr(GError) parse_error = NULL; if (!qmicli_parse_key_value_string (str, &parse_error, set_firmware_preference_properties_handle, &props)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Couldn't parse input string: %s", parse_error->message); set_firmware_preference_properties_clear (&props); return NULL; } if (!props.firmware_version || !props.config_version || !props.carrier) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Missing mandatory parameters: 'firmware-version', 'config-version' and 'carrier' are mandatory"); set_firmware_preference_properties_clear (&props); return NULL; } } /* Old non key=value format, like this: * "[(firmware_version),(config_version),(carrier)]" */ else { g_auto(GStrv) split = NULL; split = g_strsplit (str, ",", -1); if (g_strv_length (split) != 3) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Invalid format string, expected 3 elements: 'firmware-version', 'config-version' and 'carrier'"); return NULL; } props.firmware_version = g_strdup (split[0]); props.config_version = g_strdup (split[1]); props.carrier = g_strdup (split[2]); } /* modem unique id is the fixed wildcard string '?_?' matching any pri. * modem build id format is "(firmware_version)_?", matching any carrier */ firmware_preference_ctx->modem_image_id.type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; firmware_preference_ctx->modem_image_id.unique_id = g_array_sized_new (FALSE, TRUE, 1, 16); g_array_insert_vals (firmware_preference_ctx->modem_image_id.unique_id, 0, "?_?", 3); g_array_set_size (firmware_preference_ctx->modem_image_id.unique_id, 16); firmware_preference_ctx->modem_image_id.build_id = g_strdup_printf ("%s_?", props.firmware_version); /* pri unique id is the "(config_version)" input */ firmware_preference_ctx->pri_image_id.type = QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI; firmware_preference_ctx->pri_image_id.unique_id = g_array_sized_new (FALSE, TRUE, 1, 16); g_array_insert_vals (firmware_preference_ctx->pri_image_id.unique_id, 0, props.config_version, strlen (props.config_version)); g_array_set_size (firmware_preference_ctx->pri_image_id.unique_id, 16); firmware_preference_ctx->pri_image_id.build_id = g_strdup_printf ("%s_%s", props.firmware_version, props.carrier); /* Create an array with both images, the contents of each image struct, * though, aren't owned by the array (i.e. need to be disposed afterwards * when no longer used). */ array = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageDmsSetFirmwarePreferenceInputListImage), 2); g_array_append_val (array, firmware_preference_ctx->modem_image_id); g_array_append_val (array, firmware_preference_ctx->pri_image_id); /* The input bundle takes a reference to the array itself */ input = qmi_message_dms_set_firmware_preference_input_new (); qmi_message_dms_set_firmware_preference_input_set_list (input, array, NULL); /* Other optional settings */ if (props.modem_storage_index >= 0) qmi_message_dms_set_firmware_preference_input_set_modem_storage_index (input, (guint8)props.modem_storage_index, NULL); if (props.override_download_set) qmi_message_dms_set_firmware_preference_input_set_download_override (input, props.override_download, NULL); set_firmware_preference_properties_clear (&props); return g_steal_pointer (&input); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_DMS_GET_BOOT_IMAGE_DOWNLOAD_MODE static void get_boot_image_download_mode_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetBootImageDownloadModeOutput *output; GError *error = NULL; QmiDmsBootImageDownloadMode mode; output = qmi_client_dms_get_boot_image_download_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_boot_image_download_mode_output_get_result (output, &error)) { g_printerr ("error: couldn't get boot image download mode: %s\n", error->message); g_error_free (error); qmi_message_dms_get_boot_image_download_mode_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_boot_image_download_mode_output_get_mode (output, &mode, NULL); g_print ("[%s] Boot image download mode: %s\n", qmi_device_get_path_display (ctx->device), qmi_dms_boot_image_download_mode_get_string (mode)); qmi_message_dms_get_boot_image_download_mode_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_BOOT_IMAGE_DOWNLOAD_MODE */ #if defined HAVE_QMI_MESSAGE_DMS_SET_BOOT_IMAGE_DOWNLOAD_MODE static QmiMessageDmsSetBootImageDownloadModeInput * set_boot_image_download_mode_input_create (const gchar *str) { QmiMessageDmsSetBootImageDownloadModeInput *input = NULL; QmiDmsBootImageDownloadMode mode; GError *error = NULL; /* Prepare inputs. * Format of the string is: * [normal|boot-and-recovery] */ if (!qmicli_read_dms_boot_image_download_mode_from_string (str, &mode)) return NULL; input = qmi_message_dms_set_boot_image_download_mode_input_new (); if (!qmi_message_dms_set_boot_image_download_mode_input_set_mode (input, mode, &error)) { g_printerr ("error: couldn't create input bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_set_boot_image_download_mode_input_unref (input); return NULL; } return input; } static void set_boot_image_download_mode_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetBootImageDownloadModeOutput *output; GError *error = NULL; output = qmi_client_dms_set_boot_image_download_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_set_boot_image_download_mode_output_get_result (output, &error)) { g_printerr ("error: couldn't set boot image download mode: %s\n", error->message); g_error_free (error); qmi_message_dms_set_boot_image_download_mode_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Boot image download mode successfully set\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_set_boot_image_download_mode_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_BOOT_IMAGE_DOWNLOAD_MODE */ #if defined HAVE_QMI_MESSAGE_DMS_GET_SOFTWARE_VERSION static void get_software_version_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetSoftwareVersionOutput *output; GError *error = NULL; const gchar *version; output = qmi_client_dms_get_software_version_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_software_version_output_get_result (output, &error)) { g_printerr ("error: couldn't get boot image download mode: %s\n", error->message); g_error_free (error); qmi_message_dms_get_software_version_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_software_version_output_get_version (output, &version, NULL); g_print ("[%s] Software version: %s\n", qmi_device_get_path_display (ctx->device), version); qmi_message_dms_get_software_version_output_unref (output); operation_shutdown (TRUE); } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FCC_AUTHENTICATION static void set_fcc_authentication_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSetFccAuthenticationOutput *output; GError *error = NULL; output = qmi_client_dms_set_fcc_authentication_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_set_fcc_authentication_output_get_result (output, &error)) { g_printerr ("error: couldn't set FCC authentication: %s\n", error->message); g_error_free (error); qmi_message_dms_set_fcc_authentication_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully set FCC authentication\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_set_fcc_authentication_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SET_FCC_AUTHENTICATION */ #if defined HAVE_QMI_MESSAGE_DMS_GET_SUPPORTED_MESSAGES static void get_supported_messages_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetSupportedMessagesOutput *output; GError *error = NULL; GArray *bytearray = NULL; gchar *str; output = qmi_client_dms_get_supported_messages_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_supported_messages_output_get_result (output, &error)) { g_printerr ("error: couldn't get supported DMS messages: %s\n", error->message); g_error_free (error); qmi_message_dms_get_supported_messages_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got supported DMS messages:\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_get_supported_messages_output_get_list (output, &bytearray, NULL); str = qmicli_get_supported_messages_list (bytearray ? (const guint8 *)bytearray->data : NULL, bytearray ? bytearray->len : 0); g_print ("%s", str); g_free (str); qmi_message_dms_get_supported_messages_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_SUPPORTED_MESSAGES */ #if defined HAVE_QMI_MESSAGE_DMS_HP_CHANGE_DEVICE_MODE static QmiMessageDmsHpChangeDeviceModeInput * hp_change_device_mode_input_create (const gchar *str) { QmiMessageDmsHpChangeDeviceModeInput *input = NULL; QmiDmsHpDeviceMode mode; GError *error = NULL; if (!qmicli_read_dms_hp_device_mode_from_string (str, &mode)) { g_printerr ("error: couldn't parse input HP device mode : '%s'\n", str); return NULL; } input = qmi_message_dms_hp_change_device_mode_input_new (); if (!qmi_message_dms_hp_change_device_mode_input_set_mode (input, mode, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_hp_change_device_mode_input_unref (input); return NULL; } return input; } static void hp_change_device_mode_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsHpChangeDeviceModeOutput *output; GError *error = NULL; output = qmi_client_dms_hp_change_device_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_hp_change_device_mode_output_get_result (output, &error)) { g_printerr ("error: couldn't change HP device mode: %s\n", error->message); g_error_free (error); qmi_message_dms_hp_change_device_mode_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully changed HP device mode\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_hp_change_device_mode_output_unref (output); /* Changing the mode will end up power cycling the device right away, so * just ignore any error from now on and don't even try to release the * client CID */ operation_shutdown_skip_cid_release (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_HP_CHANGE_DEVICE_MODE */ #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_CURRENT_FIRMWARE static void swi_get_current_firmware_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSwiGetCurrentFirmwareOutput *output; GError *error = NULL; const gchar *model = NULL; const gchar *boot_version = NULL; const gchar *amss_version = NULL; const gchar *sku_id = NULL; const gchar *package_id = NULL; const gchar *carrier_id = NULL; const gchar *pri_version = NULL; const gchar *carrier = NULL; const gchar *config_version = NULL; output = qmi_client_dms_swi_get_current_firmware_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_swi_get_current_firmware_output_get_result (output, &error)) { g_printerr ("error: couldn't get current firmware: %s\n", error->message); g_error_free (error); qmi_message_dms_swi_get_current_firmware_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_swi_get_current_firmware_output_get_model (output, &model, NULL); qmi_message_dms_swi_get_current_firmware_output_get_boot_version (output, &boot_version, NULL); qmi_message_dms_swi_get_current_firmware_output_get_amss_version (output, &amss_version, NULL); qmi_message_dms_swi_get_current_firmware_output_get_sku_id (output, &sku_id, NULL); qmi_message_dms_swi_get_current_firmware_output_get_package_id (output, &package_id, NULL); qmi_message_dms_swi_get_current_firmware_output_get_carrier_id (output, &carrier_id, NULL); qmi_message_dms_swi_get_current_firmware_output_get_pri_version (output, &pri_version, NULL); qmi_message_dms_swi_get_current_firmware_output_get_carrier (output, &carrier, NULL); qmi_message_dms_swi_get_current_firmware_output_get_config_version (output, &config_version, NULL); /* We'll consider it a success if we got at least one of the expected strings */ if (!model && !boot_version && !amss_version && !sku_id && !package_id && !carrier_id && !pri_version && !carrier && !config_version) { g_printerr ("error: couldn't get any of the current firmware fields\n"); qmi_message_dms_swi_get_current_firmware_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully retrieved current firmware:\n", qmi_device_get_path_display (ctx->device)); g_print ("\tModel: %s\n", VALIDATE_UNKNOWN (model)); g_print ("\tBoot version: %s\n", VALIDATE_UNKNOWN (boot_version)); g_print ("\tAMSS version: %s\n", VALIDATE_UNKNOWN (amss_version)); g_print ("\tSKU ID: %s\n", VALIDATE_UNKNOWN (sku_id)); g_print ("\tPackage ID: %s\n", VALIDATE_UNKNOWN (package_id)); g_print ("\tCarrier ID: %s\n", VALIDATE_UNKNOWN (carrier_id)); g_print ("\tConfig version: %s\n", VALIDATE_UNKNOWN (config_version)); qmi_message_dms_swi_get_current_firmware_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SWI_GET_CURRENT_FIRMWARE */ #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_USB_COMPOSITION static void swi_get_usb_composition_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSwiGetUsbCompositionOutput *output; GError *error = NULL; GArray *supported = NULL; QmiDmsSwiUsbComposition current = QMI_DMS_SWI_USB_COMPOSITION_UNKNOWN; guint i; output = qmi_client_dms_swi_get_usb_composition_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_swi_get_usb_composition_output_get_result (output, &error)) { g_printerr ("error: couldn't get USB composite modes: %s\n", error->message); g_error_free (error); qmi_message_dms_swi_get_usb_composition_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully retrieved USB compositions:\n", qmi_device_get_path_display (ctx->device)); if (!qmi_message_dms_swi_get_usb_composition_output_get_current (output, ¤t, &error)) { g_printerr ("error: couldn't get current USB composition: %s\n", error->message); g_clear_error (&error); } if (!qmi_message_dms_swi_get_usb_composition_output_get_supported (output, &supported, &error)) { g_printerr ("error: couldn't get list of USB compositions: %s\n", error->message); g_clear_error (&error); } for (i = 0; i < supported->len; i++) { QmiDmsSwiUsbComposition value; value = g_array_index (supported, QmiDmsSwiUsbComposition, i); g_print ("\t%sUSB composition %s: %s\n", (value == current ? "[*] " : " "), qmi_dms_swi_usb_composition_get_string (value), qmi_dms_swi_usb_composition_get_description (value)); } qmi_message_dms_swi_get_usb_composition_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_SWI_GET_USB_COMPOSITION */ #if defined HAVE_QMI_MESSAGE_DMS_SWI_SET_USB_COMPOSITION static void swi_set_usb_composition_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsSwiSetUsbCompositionOutput *output; GError *error = NULL; output = qmi_client_dms_swi_set_usb_composition_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_swi_set_usb_composition_output_get_result (output, &error)) { g_printerr ("error: couldn't set USB composite modes: %s\n", error->message); g_error_free (error); qmi_message_dms_swi_set_usb_composition_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully set USB composition\n" "\n" "\tYou may want to power-cycle the modem now, or just set it offline and reset it:\n" "\t\t$> sudo qmicli ... --dms-set-operating-mode=offline\n" "\t\t$> sudo qmicli ... --dms-set-operating-mode=reset\n" "\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_swi_set_usb_composition_output_unref (output); operation_shutdown (TRUE); } static QmiMessageDmsSwiSetUsbCompositionInput * swi_set_usb_composition_input_create (const gchar *str) { QmiMessageDmsSwiSetUsbCompositionInput *input = NULL; QmiDmsSwiUsbComposition value; GError *error = NULL; if (!qmicli_read_dms_swi_usb_composition_from_string (str, &value)) return NULL; input = qmi_message_dms_swi_set_usb_composition_input_new (); if (!qmi_message_dms_swi_set_usb_composition_input_set_current (input, value, &error)) { g_printerr ("error: couldn't create input bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_swi_set_usb_composition_input_unref (input); return NULL; } return input; } #endif /* HAVE_QMI_MESSAGE_DMS_SWI_SET_USB_COMPOSITION */ #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE static QmiMessageDmsFoxconnChangeDeviceModeInput * foxconn_change_device_mode_input_create (const gchar *str) { QmiMessageDmsFoxconnChangeDeviceModeInput *input = NULL; QmiDmsFoxconnDeviceMode mode; GError *error = NULL; if (!qmicli_read_dms_foxconn_device_mode_from_string (str, &mode)) { g_printerr ("error: couldn't parse input foxconn device mode : '%s'\n", str); return NULL; } input = qmi_message_dms_foxconn_change_device_mode_input_new (); if (!qmi_message_dms_foxconn_change_device_mode_input_set_mode (input, mode, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_foxconn_change_device_mode_input_unref (input); return NULL; } return input; } static void foxconn_change_device_mode_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsFoxconnChangeDeviceModeOutput *output; GError *error = NULL; output = qmi_client_dms_foxconn_change_device_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_foxconn_change_device_mode_output_get_result (output, &error)) { g_printerr ("error: couldn't change foxconn device mode: %s\n", error->message); g_error_free (error); qmi_message_dms_foxconn_change_device_mode_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully changed foxconn device mode\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_foxconn_change_device_mode_output_unref (output); /* Changing the mode will end up power cycling the device right away, so * just ignore any error from now on and don't even try to release the * client CID */ operation_shutdown_skip_cid_release (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE */ #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION static QmiMessageDmsFoxconnGetFirmwareVersionInput * foxconn_get_firmware_version_input_create (const gchar *str) { QmiMessageDmsFoxconnGetFirmwareVersionInput *input = NULL; QmiDmsFoxconnFirmwareVersionType type; GError *error = NULL; if (!qmicli_read_dms_foxconn_firmware_version_type_from_string (str, &type)) { g_printerr ("error: couldn't parse input foxconn firmware version type : '%s'\n", str); return NULL; } input = qmi_message_dms_foxconn_get_firmware_version_input_new (); if (!qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (input, type, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_foxconn_get_firmware_version_input_unref (input); return NULL; } return input; } static void foxconn_get_firmware_version_ready (QmiClientDms *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageDmsFoxconnGetFirmwareVersionOutput *output; GError *error = NULL; output = qmi_client_dms_foxconn_get_firmware_version_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_foxconn_get_firmware_version_output_get_result (output, &error)) { g_printerr ("error: couldn't get foxconn firmware version: %s\n", error->message); g_error_free (error); qmi_message_dms_foxconn_get_firmware_version_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_foxconn_get_firmware_version_output_get_version (output, &str, NULL); g_print ("[%s] Firmware version retrieved:\n" "\tVersion: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_dms_foxconn_get_firmware_version_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION */ #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION static void foxconn_set_fcc_authentication_ready (QmiClientDms *client, GAsyncResult *res) { g_autoptr(QmiMessageDmsFoxconnSetFccAuthenticationOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_dms_foxconn_set_fcc_authentication_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_dms_foxconn_set_fcc_authentication_output_get_result (output, &error)) { g_printerr ("error: couldn't run Foxconn FCC authentication: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully run Foxconn FCC authentication\n", qmi_device_get_path_display (ctx->device)); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION */ #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION_V2 static void foxconn_set_fcc_authentication_v2_ready (QmiClientDms *client, GAsyncResult *res) { g_autoptr(QmiMessageDmsFoxconnSetFccAuthenticationV2Output) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_dms_foxconn_set_fcc_authentication_v2_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_dms_foxconn_set_fcc_authentication_v2_output_get_result (output, &error)) { g_printerr ("error: couldn't run Foxconn FCC authentication: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully run Foxconn FCC authentication v2\n", qmi_device_get_path_display (ctx->device)); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION_V2 */ #if defined HAVE_QMI_MESSAGE_DMS_GET_MAC_ADDRESS static QmiMessageDmsGetMacAddressInput * get_mac_address_input_create (const gchar *str) { QmiMessageDmsGetMacAddressInput *input = NULL; QmiDmsMacType device; if (qmicli_read_dms_mac_type_from_string (str, &device)) { GError *error = NULL; input = qmi_message_dms_get_mac_address_input_new (); if (!qmi_message_dms_get_mac_address_input_set_device ( input, device, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dms_get_mac_address_input_unref (input); input = NULL; } } return input; } static void get_mac_address_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsGetMacAddressOutput *output; GError *error = NULL; gchar *mac_address_printable; GArray *mac_address = NULL; output = qmi_client_dms_get_mac_address_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_get_mac_address_output_get_result (output, &error)) { g_printerr ("error: couldn't get mac address: %s\n", error->message); g_error_free (error); qmi_message_dms_get_mac_address_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dms_get_mac_address_output_get_mac_address (output, &mac_address, NULL); mac_address_printable = qmicli_get_raw_data_printable (mac_address, 80, "\t\t"); g_print ("[%s] MAC address read:\n" "\tSize: '%u' bytes\n" "\tContents:\n" "%s", qmi_device_get_path_display (ctx->device), mac_address->len, mac_address_printable); g_free (mac_address_printable); qmi_message_dms_get_mac_address_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_GET_MAC_ADDRESS */ #if defined HAVE_QMI_MESSAGE_DMS_RESET static void reset_ready (QmiClientDms *client, GAsyncResult *res) { QmiMessageDmsResetOutput *output; GError *error = NULL; output = qmi_client_dms_reset_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dms_reset_output_get_result (output, &error)) { g_printerr ("error: couldn't reset the DMS service: %s\n", error->message); g_error_free (error); qmi_message_dms_reset_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed DMS service reset\n", qmi_device_get_path_display (ctx->device)); qmi_message_dms_reset_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DMS_RESET */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_dms_run (QmiDevice *device, QmiClientDms *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_DMS_GET_IDS if (get_ids_flag) { g_debug ("Asynchronously getting IDs..."); qmi_client_dms_get_ids (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_ids_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_CAPABILITIES if (get_capabilities_flag) { g_debug ("Asynchronously getting capabilities..."); qmi_client_dms_get_capabilities (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_capabilities_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MANUFACTURER if (get_manufacturer_flag) { g_debug ("Asynchronously getting manufacturer..."); qmi_client_dms_get_manufacturer (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_manufacturer_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MODEL if (get_model_flag) { g_debug ("Asynchronously getting model..."); qmi_client_dms_get_model (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_model_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_REVISION if (get_revision_flag) { g_debug ("Asynchronously getting revision..."); qmi_client_dms_get_revision (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_revision_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MSISDN if (get_msisdn_flag) { g_debug ("Asynchronously getting msisdn..."); qmi_client_dms_get_msisdn (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_msisdn_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_POWER_STATE if (get_power_state_flag) { g_debug ("Asynchronously getting power status..."); qmi_client_dms_get_power_state (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_power_state_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_SET_PIN_PROTECTION if (uim_set_pin_protection_str) { QmiMessageDmsUimSetPinProtectionInput *input; g_debug ("Asynchronously setting PIN protection..."); input = uim_set_pin_protection_input_create (uim_set_pin_protection_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_uim_set_pin_protection (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)uim_set_pin_protection_ready, NULL); qmi_message_dms_uim_set_pin_protection_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_VERIFY_PIN if (uim_verify_pin_str) { QmiMessageDmsUimVerifyPinInput *input; g_debug ("Asynchronously verifying PIN..."); input = uim_verify_pin_input_create (uim_verify_pin_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_uim_verify_pin (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)uim_verify_pin_ready, NULL); qmi_message_dms_uim_verify_pin_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_UNBLOCK_PIN if (uim_unblock_pin_str) { QmiMessageDmsUimUnblockPinInput *input; g_debug ("Asynchronously unblocking PIN..."); input = uim_unblock_pin_input_create (uim_unblock_pin_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_uim_unblock_pin (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)uim_unblock_pin_ready, NULL); qmi_message_dms_uim_unblock_pin_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_CHANGE_PIN if (uim_change_pin_str) { QmiMessageDmsUimChangePinInput *input; g_debug ("Asynchronously changing PIN..."); input = uim_change_pin_input_create (uim_change_pin_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_uim_change_pin (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)uim_change_pin_ready, NULL); qmi_message_dms_uim_change_pin_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_PIN_STATUS if (uim_get_pin_status_flag) { g_debug ("Asynchronously getting PIN status..."); qmi_client_dms_uim_get_pin_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)uim_get_pin_status_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_ICCID if (uim_get_iccid_flag) { g_debug ("Asynchronously getting UIM ICCID..."); qmi_client_dms_uim_get_iccid (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)uim_get_iccid_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_IMSI if (uim_get_imsi_flag) { g_debug ("Asynchronously getting UIM IMSI..."); qmi_client_dms_uim_get_imsi (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)uim_get_imsi_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_STATE if (uim_get_state_flag) { g_debug ("Asynchronously getting UIM state..."); qmi_client_dms_uim_get_state (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)uim_get_state_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_HARDWARE_REVISION if (get_hardware_revision_flag) { g_debug ("Asynchronously getting hardware revision..."); qmi_client_dms_get_hardware_revision (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_hardware_revision_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_OPERATING_MODE if (get_operating_mode_flag) { g_debug ("Asynchronously getting operating mode..."); qmi_client_dms_get_operating_mode (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_operating_mode_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_OPERATING_MODE if (set_operating_mode_str) { QmiMessageDmsSetOperatingModeInput *input; g_debug ("Asynchronously setting operating mode..."); input = set_operating_mode_input_create (set_operating_mode_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_set_operating_mode (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_operating_mode_ready, NULL); qmi_message_dms_set_operating_mode_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_TIME if (get_time_flag) { g_debug ("Asynchronously getting time..."); qmi_client_dms_get_time (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_time_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_PRL_VERSION if (get_prl_version_flag) { g_debug ("Asynchronously getting PRL version..."); qmi_client_dms_get_prl_version (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_prl_version_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_ACTIVATION_STATE if (get_activation_state_flag) { g_debug ("Asynchronously getting activation state..."); qmi_client_dms_get_activation_state (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_activation_state_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_ACTIVATE_AUTOMATIC if (activate_automatic_str) { QmiMessageDmsActivateAutomaticInput *input; g_debug ("Asynchronously requesting automatic activation..."); input = activate_automatic_input_create (activate_automatic_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_activate_automatic (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)activate_automatic_ready, NULL); qmi_message_dms_activate_automatic_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_ACTIVATE_MANUAL if (activate_manual_str) { QmiMessageDmsActivateManualInput *input; g_debug ("Asynchronously requesting manual activation..."); input = activate_manual_input_create (activate_manual_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_activate_manual (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)activate_manual_ready, NULL); qmi_message_dms_activate_manual_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_USER_LOCK_STATE if (get_user_lock_state_flag) { g_debug ("Asynchronously getting user lock state..."); qmi_client_dms_get_user_lock_state (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_user_lock_state_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_USER_LOCK_STATE if (set_user_lock_state_str) { QmiMessageDmsSetUserLockStateInput *input; g_debug ("Asynchronously setting user lock state..."); input = set_user_lock_state_input_create (set_user_lock_state_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_set_user_lock_state (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_user_lock_state_ready, NULL); qmi_message_dms_set_user_lock_state_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_USER_LOCK_CODE if (set_user_lock_code_str) { QmiMessageDmsSetUserLockCodeInput *input; g_debug ("Asynchronously changing user lock code..."); input = set_user_lock_code_input_create (set_user_lock_code_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_set_user_lock_code (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_user_lock_code_ready, NULL); qmi_message_dms_set_user_lock_code_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_READ_USER_DATA if (read_user_data_flag) { g_debug ("Asynchronously reading user data..."); qmi_client_dms_read_user_data (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)read_user_data_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_WRITE_USER_DATA if (write_user_data_str) { QmiMessageDmsWriteUserDataInput *input; g_debug ("Asynchronously writing user data..."); input = write_user_data_input_create (write_user_data_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_write_user_data (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)write_user_data_ready, NULL); qmi_message_dms_write_user_data_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_READ_ERI_FILE if (read_eri_file_flag) { g_debug ("Asynchronously reading ERI file..."); qmi_client_dms_read_eri_file (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)read_eri_file_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_RESTORE_FACTORY_DEFAULTS if (restore_factory_defaults_str) { QmiMessageDmsRestoreFactoryDefaultsInput *input; g_debug ("Asynchronously restoring factory defaults..."); input = restore_factory_defaults_input_create (restore_factory_defaults_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_restore_factory_defaults (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)restore_factory_defaults_ready, NULL); qmi_message_dms_restore_factory_defaults_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_VALIDATE_SERVICE_PROGRAMMING_CODE if (validate_service_programming_code_str) { QmiMessageDmsValidateServiceProgrammingCodeInput *input; g_debug ("Asynchronously validating SPC..."); input = validate_service_programming_code_input_create (validate_service_programming_code_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_validate_service_programming_code (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)validate_service_programming_code_ready, NULL); qmi_message_dms_validate_service_programming_code_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_ID if (set_firmware_id_flag) { g_debug ("Asynchronously setting firmware id..."); qmi_client_dms_set_firmware_id (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)set_firmware_id_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_GET_CK_STATUS if (uim_get_ck_status_str) { QmiMessageDmsUimGetCkStatusInput *input; g_debug ("Asynchronously getting CK status..."); input = uim_get_ck_status_input_create (uim_get_ck_status_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_uim_get_ck_status (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)uim_get_ck_status_ready, NULL); qmi_message_dms_uim_get_ck_status_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_SET_CK_PROTECTION if (uim_set_ck_protection_str) { QmiMessageDmsUimSetCkProtectionInput *input; g_debug ("Asynchronously setting CK protection..."); input = uim_set_ck_protection_input_create (uim_set_ck_protection_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_uim_set_ck_protection (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)uim_set_ck_protection_ready, NULL); qmi_message_dms_uim_set_ck_protection_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_UIM_UNBLOCK_CK if (uim_unblock_ck_str) { QmiMessageDmsUimUnblockCkInput *input; g_debug ("Asynchronously unblocking CK..."); input = uim_unblock_ck_input_create (uim_unblock_ck_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_uim_unblock_ck (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)uim_unblock_ck_ready, NULL); qmi_message_dms_uim_unblock_ck_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_BAND_CAPABILITIES if (get_band_capabilities_flag) { g_debug ("Asynchronously getting band capabilities..."); qmi_client_dms_get_band_capabilities (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_band_capabilities_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_FACTORY_SKU if (get_factory_sku_flag) { g_debug ("Asynchronously getting factory SKU..."); qmi_client_dms_get_factory_sku (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_factory_sku_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && defined HAVE_QMI_MESSAGE_DMS_GET_STORED_IMAGE_INFO if (list_stored_images_flag) { g_debug ("Asynchronously listing stored images..."); qmi_client_dms_list_stored_images (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)list_stored_images_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE && \ defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES if (select_stored_image_str) { g_debug ("Asynchronously selecting stored image..."); get_stored_image (ctx->client, select_stored_image_str, (GAsyncReadyCallback)get_stored_image_select_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE && \ defined HAVE_QMI_MESSAGE_DMS_LIST_STORED_IMAGES && \ defined HAVE_QMI_MESSAGE_DMS_DELETE_STORED_IMAGE if (delete_stored_image_str) { g_debug ("Asynchronously deleting stored image..."); get_stored_image (ctx->client, delete_stored_image_str, (GAsyncReadyCallback)get_stored_image_delete_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_FIRMWARE_PREFERENCE if (get_firmware_preference_flag) { qmi_client_dms_get_firmware_preference ( client, NULL, 10, NULL, (GAsyncReadyCallback)dms_get_firmware_preference_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FIRMWARE_PREFERENCE if (set_firmware_preference_str) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessageDmsSetFirmwarePreferenceInput) input = NULL; SetFirmwarePreferenceContext firmware_preference_ctx; memset (&firmware_preference_ctx, 0, sizeof (firmware_preference_ctx)); g_debug ("Asynchronously setting firmware preference..."); input = set_firmware_preference_input_create (set_firmware_preference_str, &firmware_preference_ctx, &error); if (!input) { g_printerr ("error: %s\n", error->message); operation_shutdown (FALSE); return; } qmi_client_dms_set_firmware_preference ( client, input, 10, NULL, (GAsyncReadyCallback)dms_set_firmware_preference_ready, NULL); set_firmware_preference_context_clear (&firmware_preference_ctx); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_BOOT_IMAGE_DOWNLOAD_MODE if (get_boot_image_download_mode_flag) { g_debug ("Asynchronously getting boot image download mode..."); qmi_client_dms_get_boot_image_download_mode (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_boot_image_download_mode_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_BOOT_IMAGE_DOWNLOAD_MODE if (set_boot_image_download_mode_str) { QmiMessageDmsSetBootImageDownloadModeInput *input; g_debug ("Asynchronously setting boot image download mode..."); input = set_boot_image_download_mode_input_create (set_boot_image_download_mode_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_set_boot_image_download_mode (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_boot_image_download_mode_ready, NULL); qmi_message_dms_set_boot_image_download_mode_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_SOFTWARE_VERSION if (get_software_version_flag) { g_debug ("Asynchronously getting software version..."); qmi_client_dms_get_software_version (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_software_version_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SET_FCC_AUTHENTICATION if (set_fcc_authentication_flag) { g_debug ("Asynchronously setting FCC auth..."); qmi_client_dms_set_fcc_authentication (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)set_fcc_authentication_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_SUPPORTED_MESSAGES if (get_supported_messages_flag) { g_debug ("Asynchronously getting supported DMS messages..."); qmi_client_dms_get_supported_messages (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_supported_messages_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_HP_CHANGE_DEVICE_MODE if (hp_change_device_mode_str) { QmiMessageDmsHpChangeDeviceModeInput *input; g_debug ("Asynchronously changing device mode (HP specific)..."); input = hp_change_device_mode_input_create (hp_change_device_mode_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_hp_change_device_mode (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)hp_change_device_mode_ready, NULL); qmi_message_dms_hp_change_device_mode_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_CURRENT_FIRMWARE if (swi_get_current_firmware_flag) { g_debug ("Asynchronously getting current firmware (Sierra Wireless specific)..."); qmi_client_dms_swi_get_current_firmware (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)swi_get_current_firmware_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_GET_USB_COMPOSITION if (swi_get_usb_composition_flag) { g_debug ("Asynchronously getting USB compositionss (Sierra Wireless specific)..."); qmi_client_dms_swi_get_usb_composition (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)swi_get_usb_composition_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_SWI_SET_USB_COMPOSITION if (swi_set_usb_composition_str) { QmiMessageDmsSwiSetUsbCompositionInput *input; g_debug ("Asynchronously setting USB composition (Sierra Wireless specific)..."); input = swi_set_usb_composition_input_create (swi_set_usb_composition_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_swi_set_usb_composition (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)swi_set_usb_composition_ready, NULL); qmi_message_dms_swi_set_usb_composition_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_CHANGE_DEVICE_MODE if (foxconn_change_device_mode_str || dell_change_device_mode_str) { QmiMessageDmsFoxconnChangeDeviceModeInput *input; g_debug ("Asynchronously changing device mode (Foxconn specific)..."); input = foxconn_change_device_mode_input_create (foxconn_change_device_mode_str ? foxconn_change_device_mode_str : dell_change_device_mode_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_foxconn_change_device_mode (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)foxconn_change_device_mode_ready, NULL); qmi_message_dms_foxconn_change_device_mode_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_GET_FIRMWARE_VERSION if (foxconn_get_firmware_version_str || dell_get_firmware_version_str) { QmiMessageDmsFoxconnGetFirmwareVersionInput *input; g_debug ("Asynchronously getting firmware version (Foxconn specific)..."); input = foxconn_get_firmware_version_input_create (foxconn_get_firmware_version_str ? foxconn_get_firmware_version_str : dell_get_firmware_version_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_foxconn_get_firmware_version (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)foxconn_get_firmware_version_ready, NULL); qmi_message_dms_foxconn_get_firmware_version_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION if (foxconn_set_fcc_authentication_int >= 0) { g_autoptr(QmiMessageDmsFoxconnSetFccAuthenticationInput) input = NULL; if (foxconn_set_fcc_authentication_int > 0xFF) { g_printerr ("error: magic value out of [0,255] range\n"); operation_shutdown (FALSE); return; } g_debug ("Asynchronously running Foxconn FCC authentication..."); input = qmi_message_dms_foxconn_set_fcc_authentication_input_new (); qmi_message_dms_foxconn_set_fcc_authentication_input_set_value (input, (guint8)foxconn_set_fcc_authentication_int, NULL); qmi_client_dms_foxconn_set_fcc_authentication (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)foxconn_set_fcc_authentication_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_FOXCONN_SET_FCC_AUTHENTICATION_V2 if (foxconn_set_fcc_authentication_v2_str) { g_autoptr(QmiMessageDmsFoxconnSetFccAuthenticationV2Input) input = NULL; g_auto(GStrv) split = NULL; gulong magic_number; split = g_strsplit (foxconn_set_fcc_authentication_v2_str, ",", -1); if (g_strv_length (split) < 2) { g_printerr ("error: missing fields\n"); operation_shutdown (FALSE); return; } if (g_strv_length (split) > 2) { g_printerr ("error: too many fields given\n"); operation_shutdown (FALSE); return; } magic_number = strtoul (split[1], NULL, 10); if (magic_number > 0xFF) { g_printerr ("error: magic number value out of [0,255] range\n"); operation_shutdown (FALSE); return; } g_debug ("Asynchronously running Foxconn FCC authentication v2..."); input = qmi_message_dms_foxconn_set_fcc_authentication_v2_input_new (); qmi_message_dms_foxconn_set_fcc_authentication_v2_input_set_magic_string (input, split[0], NULL); qmi_message_dms_foxconn_set_fcc_authentication_v2_input_set_magic_number (input, magic_number, NULL); qmi_client_dms_foxconn_set_fcc_authentication_v2 (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)foxconn_set_fcc_authentication_v2_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_GET_MAC_ADDRESS if (get_mac_address_str) { QmiMessageDmsGetMacAddressInput *input; g_debug ("Asynchronously getting MAC address..."); input = get_mac_address_input_create (get_mac_address_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dms_get_mac_address (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_mac_address_ready, NULL); qmi_message_dms_get_mac_address_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DMS_RESET if (reset_flag) { g_debug ("Asynchronously resetting DMS service..."); qmi_client_dms_reset (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)reset_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_DMS */ libqmi-1.35.2-dev/src/qmicli/qmicli-dpm.c000066400000000000000000000423641455567757300201410ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2021 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_DPM #define QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED -1 /* Context */ typedef struct { QmiDevice *device; QmiClientDpm *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gchar *open_port_str; static gboolean close_port_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_DPM_OPEN_PORT { "dpm-open-port", 0, 0, G_OPTION_ARG_STRING, &open_port_str, "Open port (allowed-keys: ctrl-ep-type, ctrl-ep-iface-number, ctrl-port-name, hw-data-ep-type, hw-data-ep-iface-number, hw-data-rx-id, hw-data-tx-id, sw-data-ep-type, sw-data-ep-iface-number, sw-data-port-name)", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_DPM_CLOSE_PORT { "dpm-close-port", 0, 0, G_OPTION_ARG_NONE, &close_port_flag, "Close port", NULL }, #endif { "dpm-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a DPM client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_dpm_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("dpm", "DPM options:", "Show Data Port Mapper Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_dpm_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!open_port_str + close_port_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many DPM actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_DPM_OPEN_PORT static void open_port_ready (QmiClientDpm *client, GAsyncResult *res) { g_autoptr(QmiMessageDpmOpenPortOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_dpm_open_port_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_dpm_open_port_output_get_result (output, &error)) { g_printerr ("error: couldn't open port: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Successfully opened the port\n"); operation_shutdown (TRUE); } typedef struct { /* control port item building */ GArray *ctrl_ports; QmiDataEndpointType ctrl_ep_type; gint ctrl_ep_iface_number; gchar *ctrl_port_name; /* hw data port item building */ GArray *hw_data_ports; QmiDataEndpointType hw_data_ep_type; gint hw_data_ep_iface_number; guint hw_data_rx_id; guint hw_data_tx_id; /* sw data port item building */ GArray *sw_data_ports; QmiDataEndpointType sw_data_ep_type; gint sw_data_ep_iface_number; gchar *sw_data_port_name; } OpenPortProperties; static void reset_ctrl_port_item (OpenPortProperties *props) { g_free (props->ctrl_port_name); props->ctrl_port_name = NULL; props->ctrl_ep_type = QMI_DATA_ENDPOINT_TYPE_UNKNOWN; props->ctrl_ep_iface_number = QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED; } static void ctrl_port_details_clear (QmiMessageDpmOpenPortInputControlPortsElement *details) { g_free (details->port_name); } static void build_ctrl_port_item (OpenPortProperties *props) { if ((props->ctrl_ep_type != QMI_DATA_ENDPOINT_TYPE_UNKNOWN) && (props->ctrl_ep_iface_number != QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) && (props->ctrl_port_name != NULL)) { QmiMessageDpmOpenPortInputControlPortsElement details; details.port_name = g_strdup (props->ctrl_port_name); details.endpoint_type = props->ctrl_ep_type; details.interface_number = props->ctrl_ep_iface_number; if (!props->ctrl_ports) { props->ctrl_ports = g_array_new (FALSE, FALSE, sizeof (QmiMessageDpmOpenPortInputControlPortsElement)); g_array_set_clear_func (props->ctrl_ports, (GDestroyNotify)ctrl_port_details_clear); } g_array_append_val (props->ctrl_ports, details); reset_ctrl_port_item (props); } } static gboolean check_unfinished_ctrl_port_item (OpenPortProperties *props, GError **error) { if ((props->ctrl_ep_type != QMI_DATA_ENDPOINT_TYPE_UNKNOWN) || (props->ctrl_ep_iface_number != QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) || (props->ctrl_port_name != NULL)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "error: unfinished ctrl port item"); return FALSE; } return TRUE; } static void reset_hw_data_port_item (OpenPortProperties *props) { props->hw_data_rx_id = 0; props->hw_data_tx_id = 0; props->hw_data_ep_type = QMI_DATA_ENDPOINT_TYPE_UNKNOWN; props->hw_data_ep_iface_number = QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED; } static void build_hw_data_port_item (OpenPortProperties *props) { if ((props->hw_data_ep_type != QMI_DATA_ENDPOINT_TYPE_UNKNOWN) && (props->hw_data_ep_iface_number != QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) && (props->hw_data_rx_id != 0) && (props->hw_data_tx_id != 0)) { QmiMessageDpmOpenPortInputHardwareDataPortsElement details; details.rx_endpoint_number = props->hw_data_rx_id; details.tx_endpoint_number = props->hw_data_tx_id; details.endpoint_type = props->hw_data_ep_type; details.interface_number = props->hw_data_ep_iface_number; if (!props->hw_data_ports) props->hw_data_ports = g_array_new (FALSE, FALSE, sizeof (QmiMessageDpmOpenPortInputHardwareDataPortsElement)); g_array_append_val (props->hw_data_ports, details); reset_hw_data_port_item (props); } } static gboolean check_unfinished_hw_data_port_item (OpenPortProperties *props, GError **error) { if ((props->hw_data_ep_type != QMI_DATA_ENDPOINT_TYPE_UNKNOWN) || (props->hw_data_ep_iface_number != QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) || (props->hw_data_rx_id != 0) || (props->hw_data_tx_id != 0)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "error: unfinished hw data port item"); return FALSE; } return TRUE; } static void reset_sw_data_port_item (OpenPortProperties *props) { g_free (props->sw_data_port_name); props->sw_data_port_name = NULL; props->sw_data_ep_type = QMI_DATA_ENDPOINT_TYPE_UNKNOWN; props->sw_data_ep_iface_number = QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED; } static void sw_data_port_details_clear (QmiMessageDpmOpenPortInputSoftwareDataPortsElement *details) { g_free (details->port_name); } static void build_sw_data_port_item (OpenPortProperties *props) { if ((props->sw_data_ep_type != QMI_DATA_ENDPOINT_TYPE_UNKNOWN) && (props->sw_data_ep_iface_number != QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) && (props->sw_data_port_name != NULL)) { QmiMessageDpmOpenPortInputSoftwareDataPortsElement details; details.port_name = g_strdup (props->sw_data_port_name); details.endpoint_type = props->sw_data_ep_type; details.interface_number = props->sw_data_ep_iface_number; if (!props->sw_data_ports) { props->sw_data_ports = g_array_new (FALSE, FALSE, sizeof (QmiMessageDpmOpenPortInputSoftwareDataPortsElement)); g_array_set_clear_func (props->sw_data_ports, (GDestroyNotify)sw_data_port_details_clear); } g_array_append_val (props->sw_data_ports, details); reset_sw_data_port_item (props); } } static gboolean check_unfinished_sw_data_port_item (OpenPortProperties *props, GError **error) { if ((props->sw_data_ep_type != QMI_DATA_ENDPOINT_TYPE_UNKNOWN) || (props->sw_data_ep_iface_number != QMI_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) || (props->sw_data_port_name != NULL)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "error: unfinished sw data port item"); return FALSE; } return TRUE; } static gboolean open_port_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { OpenPortProperties *props = (OpenPortProperties *)user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' requires a value", key); return FALSE; } /* control port item */ if (g_ascii_strcasecmp (key, "ctrl-ep-type") == 0) { if (!qmicli_read_data_endpoint_type_from_string (value, &(props->ctrl_ep_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Endpoint Type '%s'", value); return FALSE; } build_ctrl_port_item (props); return TRUE; } if (g_ascii_strcasecmp (key, "ctrl-ep-iface-number") == 0) { props->ctrl_ep_iface_number = atoi (value); build_ctrl_port_item (props); return TRUE; } if (g_ascii_strcasecmp (key, "ctrl-port-name") == 0) { g_clear_pointer (&props->ctrl_port_name, g_free); props->ctrl_port_name = g_strdup (value); build_ctrl_port_item (props); return TRUE; } /* hw data port item */ if (g_ascii_strcasecmp (key, "hw-data-ep-type") == 0) { if (!qmicli_read_data_endpoint_type_from_string (value, &(props->hw_data_ep_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Endpoint Type '%s'", value); return FALSE; } build_hw_data_port_item (props); return TRUE; } if (g_ascii_strcasecmp (key, "hw-data-ep-iface-number") == 0) { props->hw_data_ep_iface_number = atoi (value); build_hw_data_port_item (props); return TRUE; } if (g_ascii_strcasecmp (key, "hw-data-rx-id") == 0) { props->hw_data_rx_id = atoi (value); build_hw_data_port_item (props); return TRUE; } if (g_ascii_strcasecmp (key, "hw-data-tx-id") == 0) { props->hw_data_tx_id = atoi (value); build_hw_data_port_item (props); return TRUE; } /* sw data port item */ if (g_ascii_strcasecmp (key, "sw-data-ep-type") == 0) { if (!qmicli_read_data_endpoint_type_from_string (value, &(props->sw_data_ep_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Endpoint Type '%s'", value); return FALSE; } build_sw_data_port_item (props); return TRUE; } if (g_ascii_strcasecmp (key, "sw-data-ep-iface-number") == 0) { props->sw_data_ep_iface_number = atoi (value); build_sw_data_port_item (props); return TRUE; } if (g_ascii_strcasecmp (key, "sw-data-port-name") == 0) { g_clear_pointer (&props->sw_data_port_name, g_free); props->sw_data_port_name = g_strdup (value); build_sw_data_port_item (props); return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized option '%s'", key); return FALSE; } static gboolean open_port_input_create (const gchar *str, QmiMessageDpmOpenPortInput **out_input, GError **error) { QmiMessageDpmOpenPortInput *input; OpenPortProperties props = { 0 }; reset_ctrl_port_item (&props); reset_hw_data_port_item (&props); reset_sw_data_port_item (&props); if (!qmicli_parse_key_value_string (str, error, open_port_properties_handle, &props)) return FALSE; if (!check_unfinished_ctrl_port_item (&props, error) || !check_unfinished_hw_data_port_item (&props, error) || !check_unfinished_sw_data_port_item (&props, error)) return FALSE; input = qmi_message_dpm_open_port_input_new (); if (props.ctrl_ports) { qmi_message_dpm_open_port_input_set_control_ports (input, props.ctrl_ports, NULL); g_clear_pointer (&props.ctrl_ports, g_array_unref); } if (props.hw_data_ports) { qmi_message_dpm_open_port_input_set_hardware_data_ports (input, props.hw_data_ports, NULL); g_clear_pointer (&props.hw_data_ports, g_array_unref); } if (props.sw_data_ports) { qmi_message_dpm_open_port_input_set_software_data_ports (input, props.sw_data_ports, NULL); g_clear_pointer (&props.sw_data_ports, g_array_unref); } *out_input = input; return TRUE; } #endif /* HAVE_QMI_MESSAGE_DPM_OPEN_PORT */ #if defined HAVE_QMI_MESSAGE_DPM_CLOSE_PORT static void close_port_ready (QmiClientDpm *client, GAsyncResult *res) { g_autoptr(QmiMessageDpmClosePortOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_dpm_close_port_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_dpm_close_port_output_get_result (output, &error)) { g_printerr ("error: couldn't close port: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Successfully closeed the port\n"); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DPM_CLOSE_PORT */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_dpm_run (QmiDevice *device, QmiClientDpm *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_DPM_OPEN_PORT if (open_port_str) { g_autoptr(QmiMessageDpmOpenPortInput) input = NULL; g_autoptr(GError) error = NULL; if (!open_port_input_create (open_port_str, &input, &error)) { g_printerr ("error: couldn't process input arguments: %s\n", error->message); operation_shutdown (FALSE); return; } qmi_client_dpm_open_port (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)open_port_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_DPM_CLOSE_PORT if (close_port_flag) { qmi_client_dpm_close_port (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)close_port_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_DPM */ libqmi-1.35.2-dev/src/qmicli/qmicli-dsd.c000066400000000000000000000307741455567757300201350ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_DSD #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") /* Context */ typedef struct { QmiDevice *device; QmiClientDsd *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gchar *get_apn_info_str; static gchar *set_apn_type_str; static gboolean get_system_status_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_DSD_GET_APN_INFO { "dsd-get-apn-info", 0, 0, G_OPTION_ARG_STRING, &get_apn_info_str, "Gets the settings associated to a given APN type", "[(type)]" }, #endif #if defined HAVE_QMI_MESSAGE_DSD_SET_APN_TYPE { "dsd-set-apn-type", 0, 0, G_OPTION_ARG_STRING, &set_apn_type_str, "Sets the types associated to a given APN name", "[(name), (type1|type2|type3...)]" }, #endif #if defined HAVE_QMI_MESSAGE_DSD_GET_SYSTEM_STATUS { "dsd-get-system-status", 0, 0, G_OPTION_ARG_NONE, &get_system_status_flag, "Gets system status", NULL }, #endif { "dsd-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a DSD client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_dsd_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("dsd", "DSD options:", "Show Data System Determination options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_dsd_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!get_apn_info_str + !!set_apn_type_str + get_system_status_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many DSD actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_DSD_GET_APN_INFO static void get_apn_info_ready (QmiClientDsd *client, GAsyncResult *res) { QmiMessageDsdGetApnInfoOutput *output; GError *error = NULL; const gchar *apn_name = NULL; output = qmi_client_dsd_get_apn_info_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dsd_get_apn_info_output_get_result (output, &error)) { g_printerr ("error: couldn't get APN info: %s\n", error->message); g_error_free (error); qmi_message_dsd_get_apn_info_output_unref (output); operation_shutdown (FALSE); return; } g_print ("APN info found:\n"); if (qmi_message_dsd_get_apn_info_output_get_apn_name (output, &apn_name, NULL)) g_print ("APN name: %s\n", apn_name); else g_print ("APN name: n/a\n"); qmi_message_dsd_get_apn_info_output_unref (output); operation_shutdown (TRUE); } static QmiMessageDsdGetApnInfoInput * get_apn_info_input_create (const gchar *str) { QmiMessageDsdGetApnInfoInput *input = NULL; GError *error = NULL; QmiDsdApnType apn_type; if (!qmicli_read_dsd_apn_type_from_string (str, &apn_type)) { g_printerr ("error: couldn't parse input string as APN type: '%s'\n", str); return NULL; } input = qmi_message_dsd_get_apn_info_input_new (); if (!qmi_message_dsd_get_apn_info_input_set_apn_type (input, apn_type, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dsd_get_apn_info_input_unref (input); input = NULL; } return input; } #endif /* HAVE_QMI_MESSAGE_DSD_GET_APN_INFO */ #if defined HAVE_QMI_MESSAGE_DSD_SET_APN_TYPE static void set_apn_type_ready (QmiClientDsd *client, GAsyncResult *res) { QmiMessageDsdSetApnTypeOutput *output; GError *error = NULL; output = qmi_client_dsd_set_apn_type_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dsd_set_apn_type_output_get_result (output, &error)) { g_printerr ("error: couldn't set APN type: %s\n", error->message); g_error_free (error); qmi_message_dsd_set_apn_type_output_unref (output); operation_shutdown (FALSE); return; } g_print ("APN type set\n"); qmi_message_dsd_set_apn_type_output_unref (output); operation_shutdown (TRUE); } static QmiMessageDsdSetApnTypeInput * set_apn_type_input_create (const gchar *str) { QmiMessageDsdSetApnTypeInput *input = NULL; GError *error = NULL; QmiDsdApnTypePreference apn_type_preference; gchar **split; split = g_strsplit_set (str, ",", 0); if (g_strv_length (split) != 2) { g_printerr ("input string requires 2 values, %u given: '%s'\n", g_strv_length (split), str); g_strfreev (split); return NULL; } g_strstrip (split[0]); g_strstrip (split[1]); if (!qmicli_read_dsd_apn_type_preference_from_string (split[1], &apn_type_preference)) { g_printerr ("error: couldn't parse input string as APN type preference mask: '%s'\n", split[1]); g_strfreev (split); return NULL; } input = qmi_message_dsd_set_apn_type_input_new (); if (!qmi_message_dsd_set_apn_type_input_set_apn_type (input, split[0], apn_type_preference, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_dsd_set_apn_type_input_unref (input); input = NULL; } g_strfreev (split); return input; } #endif /* HAVE_QMI_MESSAGE_DSD_SET_APN_TYPE */ #if defined HAVE_QMI_MESSAGE_DSD_GET_SYSTEM_STATUS static void get_system_status_ready (QmiClientDsd *client, GAsyncResult *res) { QmiMessageDsdGetSystemStatusOutput *output; GError *error = NULL; GArray *available_systems = NULL; guint i; output = qmi_client_dsd_get_system_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_dsd_get_system_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get system status: %s\n", error->message); g_error_free (error); qmi_message_dsd_get_system_status_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_dsd_get_system_status_output_get_available_systems (output, &available_systems, NULL); if (!available_systems || !available_systems->len) { g_print ("No available data system\n"); } else { g_print ("Available data systems retrieved:\n"); for (i = 0; i < available_systems->len; i++) { QmiMessageDsdGetSystemStatusOutputAvailableSystemsSystem *system; g_autofree gchar *so_mask_str = NULL; system = &g_array_index (available_systems, QmiMessageDsdGetSystemStatusOutputAvailableSystemsSystem, i); so_mask_str = qmi_dsd_so_mask_build_string_from_mask ((QmiDsdSoMask)system->so_mask); g_print ("System [%u]%s:\n" "\tNetwork type: '%s'\n" "\tRAT: '%s'\n" "\tService option: '%s'\n", i, i > 0 ? "" : " (current preferred)", qmi_dsd_data_system_network_type_get_string (system->technology), qmi_dsd_radio_access_technology_get_string (system->rat), VALIDATE_MASK_NONE (so_mask_str)); } } qmi_message_dsd_get_system_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_DSD_GET_SYSTEM_STATUS */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_dsd_run (QmiDevice *device, QmiClientDsd *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_DSD_GET_APN_INFO if (get_apn_info_str) { QmiMessageDsdGetApnInfoInput *input; g_debug ("Asynchronously getting APN info..."); input = get_apn_info_input_create (get_apn_info_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dsd_get_apn_info (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_apn_info_ready, NULL); qmi_message_dsd_get_apn_info_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DSD_SET_APN_TYPE if (set_apn_type_str) { QmiMessageDsdSetApnTypeInput *input; g_debug ("Asynchronously setting APN type..."); input = set_apn_type_input_create (set_apn_type_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_dsd_set_apn_type (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_apn_type_ready, NULL); qmi_message_dsd_set_apn_type_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_DSD_GET_SYSTEM_STATUS if (get_system_status_flag) { g_debug ("Asynchronously getting system status..."); qmi_client_dsd_get_system_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_system_status_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_DSD */ libqmi-1.35.2-dev/src/qmicli/qmicli-fox.c000066400000000000000000000151641455567757300201530ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2022 Freedom Liu */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_FOX #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") /* Context */ typedef struct { QmiDevice *device; QmiClientFox *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gchar *get_firmware_version_str; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_FOX_GET_FIRMWARE_VERSION { "fox-get-firmware-version", 0, 0, G_OPTION_ARG_STRING, &get_firmware_version_str, "Get firmware version", "[firmware-mcfg-apps|firmware-mcfg|apps]" }, #endif { "fox-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a FOX client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_fox_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("fox", "FOX options:", "Show Foxconn Modem Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_fox_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!get_firmware_version_str + noop_flag); if (n_actions > 1) { g_printerr ("error: too many FOX actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_FOX_GET_FIRMWARE_VERSION static QmiMessageFoxGetFirmwareVersionInput * get_firmware_version_input_create (const gchar *str) { QmiMessageFoxGetFirmwareVersionInput *input = NULL; QmiFoxFirmwareVersionType type; GError *error = NULL; if (!qmicli_read_fox_firmware_version_type_from_string (str, &type)) { g_printerr ("error: couldn't parse input firmware version type : '%s'\n", str); return NULL; } input = qmi_message_fox_get_firmware_version_input_new (); if (!qmi_message_fox_get_firmware_version_input_set_version_type (input, type, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_fox_get_firmware_version_input_unref (input); return NULL; } return input; } static void get_firmware_version_ready (QmiClientFox *client, GAsyncResult *res) { const gchar *str = NULL; QmiMessageFoxGetFirmwareVersionOutput *output; GError *error = NULL; output = qmi_client_fox_get_firmware_version_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_fox_get_firmware_version_output_get_result (output, &error)) { g_printerr ("error: couldn't get firmware version: %s\n", error->message); g_error_free (error); qmi_message_fox_get_firmware_version_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_fox_get_firmware_version_output_get_version (output, &str, NULL); g_print ("[%s] Firmware version retrieved:\n" "\tVersion: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_UNKNOWN (str)); qmi_message_fox_get_firmware_version_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_FOX_GET_FIRMWARE_VERSION */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_fox_run (QmiDevice *device, QmiClientFox *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_FOX_GET_FIRMWARE_VERSION if (get_firmware_version_str) { QmiMessageFoxGetFirmwareVersionInput *input; g_debug ("Asynchronously getting firmware version..."); input = get_firmware_version_input_create (get_firmware_version_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_fox_get_firmware_version (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_firmware_version_ready, NULL); qmi_message_fox_get_firmware_version_input_unref (input); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_FOX */ libqmi-1.35.2-dev/src/qmicli/qmicli-gas.c000066400000000000000000000345211455567757300201270ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2019 Andreas Kling */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_GAS /* Context */ typedef struct { QmiDevice *device; QmiClientGas *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_firmware_list_flag; static gboolean get_active_firmware_flag; static gint set_active_firmware_int = -1; static gint set_usb_composition_int = -1; static gboolean get_usb_composition_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_GAS_DMS_SET_USB_COMPOSITION { "gas-dms-set-usb-composition", 0, 0, G_OPTION_ARG_INT, &set_usb_composition_int, "Sets the USB composition", "[pid]" }, #endif #if defined HAVE_QMI_MESSAGE_GAS_DMS_GET_USB_COMPOSITION { "gas-dms-get-usb-composition", 0, 0, G_OPTION_ARG_NONE, &get_usb_composition_flag, "Gets the current USB composition", NULL }, #endif #if defined HAVE_QMI_MESSAGE_GAS_DMS_GET_FIRMWARE_LIST { "gas-dms-get-firmware-list", 0, 0, G_OPTION_ARG_NONE, &get_firmware_list_flag, "Gets the list of stored firmware", NULL }, { "gas-dms-get-active-firmware", 0, 0, G_OPTION_ARG_NONE, &get_active_firmware_flag, "Gets the currently active firmware", NULL }, #endif #if defined HAVE_QMI_MESSAGE_GAS_DMS_SET_ACTIVE_FIRMWARE { "gas-dms-set-active-firmware", 0, 0, G_OPTION_ARG_INT, &set_active_firmware_int, "Sets the active firmware index", "[index]" }, #endif { "gas-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a GAS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_gas_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("gas", "GAS options:", "Show General Application Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_gas_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = ((set_usb_composition_int >= 0) + get_usb_composition_flag + get_firmware_list_flag + get_active_firmware_flag + (set_active_firmware_int >= 0) + noop_flag); if (n_actions > 1) { g_printerr ("error: too many GAS actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_GAS_DMS_SET_USB_COMPOSITION static void set_usb_composition_ready (QmiClientGas *client, GAsyncResult *res) { QmiMessageGasDmsSetUsbCompositionOutput *output; GError *error = NULL; output = qmi_client_gas_dms_set_usb_composition_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_gas_dms_set_usb_composition_output_get_result (output, &error)) { g_printerr ("error: unable to switch composition: %s\n", error->message); g_error_free (error); qmi_message_gas_dms_set_usb_composition_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully switched composition.\n", qmi_device_get_path_display (ctx->device)); qmi_message_gas_dms_set_usb_composition_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_GAS_DMS_SET_USB_COMPOSITION */ #if defined HAVE_QMI_MESSAGE_GAS_DMS_GET_USB_COMPOSITION static void get_usb_composition_ready (QmiClientGas *client, GAsyncResult *res) { QmiMessageGasDmsGetUsbCompositionOutput *output; GError *error = NULL; guint32 composition; output = qmi_client_gas_dms_get_usb_composition_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_gas_dms_get_usb_composition_output_get_result (output, &error)) { g_printerr ("error: unable to get current composition: %s\n", error->message); g_error_free (error); qmi_message_gas_dms_get_usb_composition_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_gas_dms_get_usb_composition_output_get_usb_composition (output, &composition, NULL); g_print ("[%s] Current composition is 0x%x\n", qmi_device_get_path_display (ctx->device), composition); qmi_message_gas_dms_get_usb_composition_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_GAS_DMS_GET_USB_COMPOSITION */ #if defined HAVE_QMI_MESSAGE_GAS_DMS_GET_FIRMWARE_LIST static void print_firmware_listing (guint8 idx, const gchar *name, const gchar *version, const gchar *pri_revision) { g_print ("Firmware #%u:\n" "\tIndex: %u\n" "\tName: %s\n" "\tVersion: %s\n" "\tPRI revision: %s\n", idx, idx, name, version, pri_revision); } static void get_firmware_list_ready (QmiClientGas *client, GAsyncResult *res) { QmiMessageGasDmsGetFirmwareListOutput *output; GError *error = NULL; guint8 idx; const gchar *name; const gchar *version; const gchar *pri_revision; output = qmi_client_gas_dms_get_firmware_list_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_gas_dms_get_firmware_list_output_get_result (output, &error)) { g_printerr ("error: couldn't get stored firmware list: %s\n", error->message); g_error_free (error); qmi_message_gas_dms_get_firmware_list_output_unref (output); operation_shutdown (FALSE); return; } if (qmi_message_gas_dms_get_firmware_list_output_get_stored_firmware_1 (output, &idx, &name, &version, &pri_revision, NULL)) print_firmware_listing (idx, name, version, pri_revision); if (qmi_message_gas_dms_get_firmware_list_output_get_stored_firmware_2 (output, &idx, &name, &version, &pri_revision, NULL)) print_firmware_listing (idx, name, version, pri_revision); if (qmi_message_gas_dms_get_firmware_list_output_get_stored_firmware_3 (output, &idx, &name, &version, &pri_revision, NULL)) print_firmware_listing (idx, name, version, pri_revision); if (qmi_message_gas_dms_get_firmware_list_output_get_stored_firmware_4 (output, &idx, &name, &version, &pri_revision, NULL)) print_firmware_listing (idx, name, version, pri_revision); qmi_message_gas_dms_get_firmware_list_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_GAS_DMS_GET_FIRMWARE_LIST */ #if defined HAVE_QMI_MESSAGE_GAS_DMS_SET_ACTIVE_FIRMWARE static void set_active_firmware_ready (QmiClientGas *client, GAsyncResult *res) { QmiMessageGasDmsSetActiveFirmwareOutput *output; GError *error = NULL; output = qmi_client_gas_dms_set_active_firmware_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_gas_dms_set_active_firmware_output_get_result (output, &error)) { g_printerr ("error: couldn't set active firmware list: %s\n", error->message); g_error_free (error); qmi_message_gas_dms_set_active_firmware_output_unref (output); operation_shutdown (FALSE); return; } g_print ("Successfully set the active firmware.\n"); qmi_message_gas_dms_set_active_firmware_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_GAS_DMS_SET_ACTIVE_FIRMWARE */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_gas_run (QmiDevice *device, QmiClientGas *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_GAS_DMS_SET_USB_COMPOSITION if (set_usb_composition_int >= 0) { QmiMessageGasDmsSetUsbCompositionInput *input; input = qmi_message_gas_dms_set_usb_composition_input_new (); qmi_message_gas_dms_set_usb_composition_input_set_usb_composition (input, set_usb_composition_int, NULL); qmi_message_gas_dms_set_usb_composition_input_set_endpoint_type (input, QMI_GAS_USB_COMPOSITION_ENDPOINT_TYPE_HSUSB, NULL); qmi_message_gas_dms_set_usb_composition_input_set_composition_persistence (input, TRUE, NULL); qmi_message_gas_dms_set_usb_composition_input_set_immediate_setting (input, FALSE, NULL); qmi_message_gas_dms_set_usb_composition_input_set_reboot_after_setting (input, TRUE, NULL); g_debug ("Asynchronously switching the USB composition..."); qmi_client_gas_dms_set_usb_composition (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_usb_composition_ready, NULL); qmi_message_gas_dms_set_usb_composition_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_GAS_DMS_GET_USB_COMPOSITION if (get_usb_composition_flag) { g_debug ("Asynchronously getting the USB composition..."); qmi_client_gas_dms_get_usb_composition (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_usb_composition_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_GAS_DMS_GET_FIRMWARE_LIST if (get_firmware_list_flag || get_active_firmware_flag) { QmiMessageGasDmsGetFirmwareListInput *input; input = qmi_message_gas_dms_get_firmware_list_input_new (); if (get_firmware_list_flag) { g_debug ("Asynchronously getting full firmware list..."); qmi_message_gas_dms_get_firmware_list_input_set_mode (input, QMI_GAS_FIRMWARE_LISTING_MODE_ALL_FIRMWARE, NULL); } else if (get_active_firmware_flag) { g_debug ("Asynchronously getting active firmware list..."); qmi_message_gas_dms_get_firmware_list_input_set_mode (input, QMI_GAS_FIRMWARE_LISTING_MODE_ACTIVE_FIRMWARE, NULL); } else g_assert_not_reached (); qmi_client_gas_dms_get_firmware_list (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_firmware_list_ready, NULL); qmi_message_gas_dms_get_firmware_list_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_GAS_DMS_SET_ACTIVE_FIRMWARE if (set_active_firmware_int >= 0) { QmiMessageGasDmsSetActiveFirmwareInput *input; input = qmi_message_gas_dms_set_active_firmware_input_new (); qmi_message_gas_dms_set_active_firmware_input_set_slot_index (input, set_active_firmware_int, NULL); g_debug ("Asynchronously setting the active firmware index..."); qmi_client_gas_dms_set_active_firmware (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_active_firmware_ready, NULL); qmi_message_gas_dms_set_active_firmware_input_unref (input); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_GAS */ libqmi-1.35.2-dev/src/qmicli/qmicli-gms.c000066400000000000000000000217051455567757300201430ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2020 Vladimir Podshivalov */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_GMS /* Context */ typedef struct { QmiDevice *device; QmiClientGms *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_value_flag; static gchar *set_value_str; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_GMS_TEST_GET_VALUE { "gms-test-get-value", 0, 0, G_OPTION_ARG_NONE, &get_value_flag, "Gets test value", NULL }, #endif #if defined HAVE_QMI_MESSAGE_GMS_TEST_SET_VALUE { "gms-test-set-value", 0, 0, G_OPTION_ARG_STRING, &set_value_str, "Sets test value", "[mandatory-value][,[optional-value]]" }, #endif { "gms-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a GMS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_gms_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("gms", "GMS options:", "Show General Modem Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_gms_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_value_flag + !!set_value_str + noop_flag); if (n_actions > 1) { g_printerr ("error: too many GMS actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_GMS_TEST_GET_VALUE static void get_value_ready (QmiClientGms *client, GAsyncResult *res) { QmiMessageGmsTestGetValueOutput *output; GError *error = NULL; guint8 test_mandatory_value; guint8 test_optional_value; output = qmi_client_gms_test_get_value_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_gms_test_get_value_output_get_result (output, &error)) { g_printerr ("error: couldn't get stored test value: %s\n", error->message); g_error_free (error); qmi_message_gms_test_get_value_output_unref (output); operation_shutdown (FALSE); return; } if (qmi_message_gms_test_get_value_output_get_test_mandatory_value (output, &test_mandatory_value, NULL)) { g_print ("Test mandatory value: %u\n", test_mandatory_value); } if (qmi_message_gms_test_get_value_output_get_test_optional_value (output, &test_optional_value, NULL)) { g_print ("Test optional value: %u\n", test_optional_value); } qmi_message_gms_test_get_value_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_GMS_TEST_GET_VALUE */ #if defined HAVE_QMI_MESSAGE_GMS_TEST_SET_VALUE static QmiMessageGmsTestSetValueInput * set_value_input_create (const gchar *str) { QmiMessageGmsTestSetValueInput *input = NULL; const gchar *mand_value_str = NULL; const gchar *opt_value_str = NULL; guint mand_value_int = 0; guint opt_value_int = 0; gchar **parts = NULL; if (strchr (str, ',')) { /* Both Mandatory Test Value and Optional Test Value were given */ parts = g_strsplit_set (str, ",", -1); if (g_strv_length (parts) != 2) { g_printerr ("error: failed to parse test value: '%s'\n", str); goto out; } mand_value_str = parts[0]; opt_value_str = parts[1]; } else { /* Only Mandatory Test Value was given */ mand_value_str = str; } g_assert (mand_value_str); if (!qmicli_read_uint_from_string (mand_value_str, &mand_value_int) || (mand_value_int > G_MAXUINT8)) { g_printerr ("error: failed to parse test mandatory value as 8bit value: '%s'\n", mand_value_str); goto out; } if (opt_value_str && (!qmicli_read_uint_from_string (opt_value_str, &opt_value_int) || (opt_value_int > G_MAXUINT8))) { g_printerr ("error: failed to parse test optional value as 8bit value: '%s'\n", opt_value_str); goto out; } input = qmi_message_gms_test_set_value_input_new (); qmi_message_gms_test_set_value_input_set_test_mandatory_value (input, (guint8) mand_value_int, NULL); if (opt_value_str) { qmi_message_gms_test_set_value_input_set_test_optional_value (input, (guint8) opt_value_int, NULL); } out: g_strfreev (parts); return input; } static void set_value_ready (QmiClientGms *client, GAsyncResult *res) { QmiMessageGmsTestSetValueOutput *output; GError *error = NULL; output = qmi_client_gms_test_set_value_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_gms_test_set_value_output_get_result (output, &error)) { g_printerr ("error: couldn't set test value: %s\n", error->message); g_error_free (error); qmi_message_gms_test_set_value_output_unref (output); operation_shutdown (FALSE); return; } g_print ("Successfully set test value.\n"); qmi_message_gms_test_set_value_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_GMS_TEST_SET_VALUE */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_gms_run (QmiDevice *device, QmiClientGms *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_GMS_TEST_GET_VALUE if (get_value_flag) { g_debug ("Asynchronously getting test value..."); qmi_client_gms_test_get_value (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_value_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_GMS_TEST_SET_VALUE if (set_value_str) { QmiMessageGmsTestSetValueInput *input; g_debug ("Asynchronously setting test value..."); input = set_value_input_create (set_value_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_gms_test_set_value (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_value_ready, NULL); qmi_message_gms_test_set_value_input_unref (input); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_GMS */ libqmi-1.35.2-dev/src/qmicli/qmicli-helpers.c000066400000000000000000001035441455567757300210210ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2015 Velocloud Inc. * Copyright (C) 2012-2019 Aleksander Morgado */ #include #include #include #include #include "qmicli-helpers.h" #define QMICLI_ENUM_LIST_ITEM(TYPE,TYPE_UNDERSCORE,DESCR) \ gboolean \ qmicli_read_## TYPE_UNDERSCORE ##_from_string (const gchar *str, \ TYPE *out) \ { \ GType type; \ GEnumClass *enum_class; \ GEnumValue *enum_value; \ \ type = qmi_## TYPE_UNDERSCORE ##_get_type (); \ enum_class = G_ENUM_CLASS (g_type_class_ref (type)); \ enum_value = g_enum_get_value_by_nick (enum_class, str); \ \ if (enum_value) \ *out = (TYPE)enum_value->value; \ else \ g_printerr ("error: invalid " DESCR " value given: '%s'\n", str); \ \ g_type_class_unref (enum_class); \ return !!enum_value; \ } QMICLI_ENUM_LIST #undef QMICLI_ENUM_LIST_ITEM #define QMICLI_FLAGS_LIST_ITEM(TYPE,TYPE_UNDERSCORE,DESCR) \ gboolean \ qmicli_read_## TYPE_UNDERSCORE ##_from_string (const gchar *str, \ TYPE *out) \ { \ GType type; \ GFlagsClass *flags_class; \ GFlagsValue *flags_value; \ gchar **items, **iter; \ gboolean success = TRUE; \ \ type = qmi_## TYPE_UNDERSCORE ##_get_type (); \ flags_class = G_FLAGS_CLASS (g_type_class_ref (type)); \ \ *out = 0; \ items = g_strsplit_set (str, "|", 0); \ for (iter = items; iter && *iter && success; iter++) { \ g_strstrip (*iter); \ if (!*iter[0]) \ continue; \ \ flags_value = g_flags_get_value_by_nick (flags_class, *iter); \ if (flags_value) { \ *out |= (TYPE)flags_value->value; \ } else { \ g_printerr ("error: unknown " DESCR " value given: '%s'\n", *iter); \ success = FALSE; \ } \ } \ \ g_strfreev (items); \ g_type_class_unref (flags_class); \ return success; \ } QMICLI_FLAGS_LIST #undef QMICLI_FLAGS_LIST_ITEM /* For 64-bit flags we don't have GFlagsClass as they're aren't registered in the * type system. Instead, we create a temporary array with all known flag names, and * use it to match the input values given */ #define QMICLI_FLAGS64_LIST_ITEM(TYPE,TYPE_UNDERSCORE,DESCR) \ gboolean \ qmicli_read_## TYPE_UNDERSCORE ##_from_string (const gchar *str, \ TYPE *out) \ { \ gchar *flag_names[64]; \ gchar **items, **iter; \ guint i; \ gboolean success = TRUE; \ \ for (i = 0; i < G_N_ELEMENTS (flag_names); i++) \ flag_names[i] = qmi_ ## TYPE_UNDERSCORE ## _build_string_from_mask (((guint64)1) << i); \ \ *out = 0; \ items = g_strsplit_set (str, "|", 0); \ for (iter = items; iter && *iter && success; iter++) { \ g_strstrip (*iter); \ if (!*iter[0]) \ continue; \ \ for (i = 0; i < G_N_ELEMENTS (flag_names); i++) { \ if (g_strcmp0 (*iter, flag_names[i]) == 0) { \ *out |= (TYPE)(((guint64)1) << i); \ break; \ } \ } \ if (i == G_N_ELEMENTS (flag_names)) { \ g_printerr ("error: unknown " DESCR " value given: '%s'\n", *iter); \ success = FALSE; \ } \ } \ \ for (i = 0; i < G_N_ELEMENTS (flag_names); i++) \ g_free (flag_names[i]); \ g_strfreev (items); \ return success; \ } QMICLI_FLAGS64_LIST #undef QMICLI_FLAGS64_LIST_ITEM gchar * qmicli_get_raw_data_printable (const GArray *data, gsize max_line_length, const gchar *line_prefix) { gsize i; gsize j; gsize k; gsize new_str_length; gchar *new_str; gsize prefix_len; guint n_lines; gboolean is_new_line; g_return_val_if_fail (max_line_length >= 3, NULL); if (!data) return g_strdup (""); /* Get new string length. If input string has N bytes, we need: * - 1 byte for last NUL char * - 2N bytes for hexadecimal char representation of each byte... * - N-1 bytes for the separator ':' * So... a total of (1+2N+N-1) = 3N bytes are needed... */ new_str_length = 3 * data->len; /* Effective max line length needs to be multiple of 3, we don't want to * split in half a given byte representation */ while (max_line_length % 3 != 0) max_line_length--; /* Prefix len includes the newline character plus the length of the input * prefix */ prefix_len = strlen (line_prefix) + 1; /* We don't consider the last NUL byte when counting lines to generate */ n_lines = (new_str_length - 1) / max_line_length; if ((new_str_length - 1) % max_line_length != 0) n_lines++; /* Build new str length expected when we prefix the string and we limit the * line length */ new_str_length += (n_lines * prefix_len); /* Allocate memory for new array and initialize contents to NUL */ new_str = g_malloc0 (new_str_length); /* Print hexadecimal representation of each byte... */ is_new_line = TRUE; for (i = 0, j = 0, k = 0; i < data->len; i++) { if (is_new_line) { strcpy (&new_str[j], line_prefix); j += strlen (line_prefix); is_new_line = FALSE; } /* Print character in output string... */ snprintf (&new_str[j], 3, "%02X", g_array_index (data, guint8, i)); j+=2; k+=2; if (i != (data->len - 1) ) { new_str[j] = ':'; j++; k++; } if (k % max_line_length == 0 || i == (data->len -1)) { new_str[j] = '\n'; j++; is_new_line = TRUE; } } /* Set output string */ return new_str; } gchar * qmicli_get_firmware_image_unique_id_printable (const GArray *unique_id) { gchar *unique_id_str; guint i; guint n_ascii = 0; gboolean end = FALSE; #define UNIQUE_ID_LEN 16 g_warn_if_fail (unique_id->len <= UNIQUE_ID_LEN); unique_id_str = g_malloc0 (UNIQUE_ID_LEN + 1); memcpy (unique_id_str, unique_id->data, UNIQUE_ID_LEN); /* We want an ASCII string that, if finished before the 16 bytes, * is suffixed with NUL bytes. */ for (i = 0; i < UNIQUE_ID_LEN; i++) { /* If a byte isn't ASCII, stop */ if (unique_id_str[i] & 0x80) break; /* If string isn't finished yet... */ if (!end) { /* String finished now */ if (unique_id_str[i] == '\0') end = TRUE; else n_ascii++; } else { /* String finished but we then got * another ASCII byte? not possible */ if (unique_id_str[i] != '\0') break; } } if (i == UNIQUE_ID_LEN && n_ascii > 0) return unique_id_str; #undef UNIQUE_ID_LEN g_free (unique_id_str); /* Get a raw hex string otherwise */ unique_id_str = qmicli_get_raw_data_printable (unique_id, 80, ""); unique_id_str[strlen (unique_id_str) - 1] = '\0'; /* remove EOL */ return unique_id_str; } gboolean qmicli_read_dms_uim_pin_id_from_string (const gchar *str, QmiDmsUimPinId *out) { if (!str || str[0] == '\0') { g_printerr ("error: expected 'PIN' or 'PIN2', got: none\n"); return FALSE; } if (g_str_equal (str, "PIN")) { *out = QMI_DMS_UIM_PIN_ID_PIN; return TRUE; } if (g_str_equal (str, "PIN2")) { *out = QMI_DMS_UIM_PIN_ID_PIN2; return TRUE; } g_printerr ("error: expected 'PIN' or 'PIN2', got: '%s'\n", str); return FALSE; } gboolean qmicli_read_uim_pin_id_from_string (const gchar *str, QmiUimPinId *out) { if (!str || str[0] == '\0') { g_printerr ("error: expected 'PIN1', 'PIN2' or 'UPIN', got: none\n"); return FALSE; } if (g_str_equal (str, "PIN1")) { *out = QMI_UIM_PIN_ID_PIN1; return TRUE; } if (g_str_equal (str, "PIN2")) { *out = QMI_UIM_PIN_ID_PIN2; return TRUE; } if (g_str_equal (str, "UPIN")) { *out = QMI_UIM_PIN_ID_UPIN; return TRUE; } g_printerr ("error: expected 'PIN1', 'PIN2' or 'UPIN', got: '%s'\n", str); return FALSE; } gboolean qmicli_read_ssp_rat_options_from_string (const gchar *str, QmiNasRatModePreference *out_mode_preference, GArray **out_acquisition_order) { GType rat_mode_preference_type; GFlagsClass *rat_mode_preference_flags_class; GFlagsValue *rat_mode_preference_flags_value; gboolean mode_preference_set = FALSE; GType radio_interface_type; GEnumClass *radio_interface_enum_class; GEnumValue *radio_interface_enum_value; gboolean acquisition_order_set = FALSE; gboolean success = TRUE; char **items, **iter; rat_mode_preference_type = qmi_nas_rat_mode_preference_get_type (); rat_mode_preference_flags_class = G_FLAGS_CLASS (g_type_class_ref (rat_mode_preference_type)); radio_interface_type = qmi_nas_radio_interface_get_type (); radio_interface_enum_class = G_ENUM_CLASS (g_type_class_ref (radio_interface_type)); *out_mode_preference = 0; *out_acquisition_order = g_array_new (FALSE, FALSE, sizeof (QmiNasRadioInterface)); items = g_strsplit_set (str, "|", 0); for (iter = items; iter && *iter && success; iter++) { if (!*iter[0]) continue; /* Note: we can use the same nick names both for mode preference flags * and acquistion order enums, which is very fortunate */ rat_mode_preference_flags_value = g_flags_get_value_by_nick (rat_mode_preference_flags_class, *iter); if (rat_mode_preference_flags_value) { *out_mode_preference |= (QmiNasRatModePreference)rat_mode_preference_flags_value->value; mode_preference_set = TRUE; } else { g_printerr ("error: invalid rat mode pref value given: '%s'\n", *iter); success = FALSE; } radio_interface_enum_value = g_enum_get_value_by_nick (radio_interface_enum_class, *iter); if (radio_interface_enum_value) { QmiNasRadioInterface value; value = (QmiNasRadioInterface)(radio_interface_enum_value->value); g_array_append_val (*out_acquisition_order, value); acquisition_order_set = TRUE; } else { g_printerr ("error: invalid radio interface value given: '%s'\n", *iter); success = FALSE; } } if (!mode_preference_set) g_printerr ("error: invalid rat mode pref input given: '%s'\n", str); if (!acquisition_order_set) g_printerr ("error: invalid rat mode pref input given: '%s'\n", str); if (items) g_strfreev (items); g_type_class_unref (rat_mode_preference_flags_class); g_type_class_unref (radio_interface_enum_class); return success && (mode_preference_set || acquisition_order_set);; } static gboolean parse_3gpp_mcc_mnc (const gchar *str, guint16 *out_mcc, guint16 *out_mnc, gboolean *out_pcs_digit) { guint len; guint i; gchar aux[4]; guint16 tmp; len = strlen (str); if (len != 5 && len != 6) return FALSE; for (i = 0; i < len; i++) { if (!g_ascii_isdigit (str[i])) return FALSE; } memcpy (&aux[0], str, 3); aux[3] = '\0'; tmp = atoi (aux); if (tmp == 0) return FALSE; *out_mcc = tmp; if (len == 5) { memcpy (&aux[0], &str[3], 2); aux[2] = '\0'; } else memcpy (&aux[0], &str[3], 3); *out_mnc = atoi (aux); if (out_pcs_digit) *out_pcs_digit = len == 6; return TRUE; } gboolean qmicli_read_ssp_net_options_from_string (const gchar *str, QmiNasNetworkSelectionPreference *out, guint16 *out_mcc, guint16 *out_mnc) { GType type; GEnumClass *enum_class; GEnumValue *enum_value; gchar *copy, *equals; guint16 mcc = 0, mnc = 0; copy = g_strdup (str); equals = strchr (copy, '='); if (equals) { /* Parse MCC/MNC */ *equals++ = '\0'; if (!parse_3gpp_mcc_mnc (equals, &mcc, &mnc, NULL)) { g_free (copy); g_printerr ("error: invalid net selection MCC/MNC: '%s'\n", equals); return FALSE; } } type = qmi_nas_network_selection_preference_get_type (); enum_class = G_ENUM_CLASS (g_type_class_ref (type)); enum_value = g_enum_get_value_by_nick (enum_class, copy); if (enum_value) { *out = (QmiNasNetworkSelectionPreference)enum_value->value; *out_mcc = mcc; *out_mnc = mnc; } else g_printerr ("error: invalid net selection preference value given: '%s'\n", copy); g_free (copy); g_type_class_unref (enum_class); return !!enum_value; } gboolean qmicli_read_parse_3gpp_mcc_mnc (const gchar *str, guint16 *out_mcc, guint16 *out_mnc, gboolean *out_pcs_digit) { g_autofree gchar *copy = NULL; guint16 mcc = 0, mnc = 0; gboolean pcs_digit = FALSE; copy = g_strdup (str); if (!parse_3gpp_mcc_mnc (copy, &mcc, &mnc, &pcs_digit)) { g_printerr ("error: invalid net selection MCC/MNC: '%s'\n", str); return FALSE; } *out_mcc = mcc; *out_mnc = mnc; if (out_pcs_digit) *out_pcs_digit = pcs_digit; return TRUE; } gboolean qmicli_read_enable_disable_from_string (const gchar *str, gboolean *out) { if (!str || str[0] == '\0') { g_printerr ("error: expected 'disable' or 'enable', got: none\n"); return FALSE; } if (g_str_equal (str, "disable")) { *out = FALSE; return TRUE; } if (g_str_equal (str, "enable")) { *out = TRUE; return TRUE; } g_printerr ("error: expected 'disable' or 'enable', got: '%s'\n", str); return FALSE; } gboolean qmicli_read_yes_no_from_string (const gchar *str, gboolean *out) { if (!str || str[0] == '\0') { g_printerr ("error: expected 'true', 'false', 'yes' or 'no', got: none\n"); return FALSE; } if ((g_strcasecmp (str, "yes") == 0) || (g_strcasecmp (str, "true") == 0)) { *out = TRUE; return TRUE; } if ((g_strcasecmp (str, "no") == 0) || (g_strcasecmp (str, "false") == 0)) { *out = FALSE; return TRUE; } g_printerr ("error: expected 'true', 'false', 'yes' or 'no', got: %s\n", str); return FALSE; } gboolean qmicli_read_non_empty_string (const gchar *str, const gchar *description, gchar **out) { if (!str || str[0] == '\0') { g_printerr ("error: empty %s given\n", description); return FALSE; } *out = (gchar *)str; return TRUE; } gboolean qmicli_read_raw_data_from_string (const gchar *str, GArray **out) { GArray *array; gsize i; gsize str_len; array = g_array_new (FALSE, FALSE, sizeof (guint8)); str_len = str ? strlen (str) : 0; for (i = 0; i < str_len; i += 2) { gint high, low; guint8 value; /* For easy processing, we just ignore the ':' chars, if any available */ if (str[i] == ':') i++; high = g_ascii_xdigit_value (str[i]); if (high < 0 || high > 0xF) { g_printerr ("error: invalid hex char found: '%c'\n", str[i]); g_clear_pointer (&array, g_array_unref); return FALSE; } if (!((i + 1) < str_len)) { g_printerr ("unterminated byte found: '%c?'\n", str[i]); g_clear_pointer (&array, g_array_unref); return FALSE; } low = g_ascii_xdigit_value (str[i + 1]); if (low < 0 || low > 0xF) { g_printerr ("invalid hex char found: '%c'\n", str[i + 1]); g_clear_pointer (&array, g_array_unref); return FALSE; } value = (high << 4) | low; g_array_append_val (array, value); } *out = array; return TRUE; } gboolean qmicli_read_firmware_id_from_string (const gchar *str, QmiDmsFirmwareImageType *out_type, guint *out_index) { const gchar *index_str; if (g_str_has_prefix (str, "modem")) { *out_type = QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM; index_str = &str[5]; } else if (g_str_has_prefix (str, "pri")) { *out_type = QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI; index_str = &str[3]; } else { g_printerr ("error: invalid firmware image type value given: '%s'\n", str); return FALSE; } return qmicli_read_uint_from_string (index_str, out_index); } gboolean qmicli_read_binary_array_from_string (const gchar *str, GArray **out) { gsize i, j, len; g_return_val_if_fail (out != NULL, FALSE); g_return_val_if_fail (str, FALSE); /* Ignore ':' digits in the binary string input */ for (len = 0, i = 0; str[i]; i++) { if (str[i] == ':') continue; len++; } /* Length must be a multiple of 2 */ if (len & 1) return FALSE; *out = g_array_sized_new (FALSE, TRUE, sizeof (guint8), len >> 1); g_array_set_size (*out, len >> 1); i = 0; j = 0; while (str[i]) { gint a, b; while (str[i] == ':') i++; a = g_ascii_xdigit_value (str[i++]); while (str[i] == ':') i++; b = g_ascii_xdigit_value (str[i++]); if (a < 0 || b < 0) { g_array_unref (*out); return FALSE; } g_array_index (*out, guint8, j++) = (a << 4) | b; } return TRUE; } gboolean qmicli_validate_device_open_flags (QmiDeviceOpenFlags mask) { if (!mask) { g_printerr ("error: invalid device open flags given\n"); return FALSE; } if ((mask & QMI_DEVICE_OPEN_FLAGS_NET_802_3) && (mask & QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP)) { g_printerr ("error: cannot give both 802.3 and raw-IP options\n"); return FALSE; } if ((mask & QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER) && (mask & QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER)) { g_printerr ("error: cannot request both QoS and no-QoS headers\n"); return FALSE; } if ((mask & (QMI_DEVICE_OPEN_FLAGS_NET_802_3 | QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP)) && !(mask & (QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER | QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER))) { g_printerr ("error: missing QoS or no-QoS header request\n"); return FALSE; } if ((mask & (QMI_DEVICE_OPEN_FLAGS_NET_QOS_HEADER | QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER)) && !(mask & (QMI_DEVICE_OPEN_FLAGS_NET_802_3 | QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP))) { g_printerr ("error: missing link protocol (802.3 or raw IP)\n"); return FALSE; } return TRUE; } gboolean qmicli_read_authentication_from_string (const gchar *str, QmiWdsAuthentication *out) { if (g_ascii_strcasecmp (str, "PAP") == 0) *out = QMI_WDS_AUTHENTICATION_PAP; else if (g_ascii_strcasecmp (str, "CHAP") == 0) *out = QMI_WDS_AUTHENTICATION_CHAP; else if (g_ascii_strcasecmp (str, "BOTH") == 0) *out = (QMI_WDS_AUTHENTICATION_PAP | QMI_WDS_AUTHENTICATION_CHAP); else if (!str[0] || g_ascii_strcasecmp (str, "NONE") == 0) *out = QMI_WDS_AUTHENTICATION_NONE; else return FALSE; return TRUE; } gboolean qmicli_read_pdp_type_from_string (const gchar *str, QmiWdsPdpType *out) { if (g_ascii_strcasecmp (str, "IP") == 0 || g_ascii_strcasecmp (str, "IPV4") == 0) *out = QMI_WDS_PDP_TYPE_IPV4; else if (g_ascii_strcasecmp (str, "PPP") == 0) *out = QMI_WDS_PDP_TYPE_PPP; else if (g_ascii_strcasecmp (str, "IPV6") == 0) *out = (QMI_WDS_PDP_TYPE_IPV6); else if (g_ascii_strcasecmp (str, "IPV4V6") == 0) *out = QMI_WDS_PDP_TYPE_IPV4_OR_IPV6; else return FALSE; return TRUE; } gboolean qmicli_read_uint_from_string (const gchar *str, guint *out) { gulong num; if (!str || !str[0]) return FALSE; for (num = 0; str[num]; num++) { if (!g_ascii_isdigit (str[num])) return FALSE; } errno = 0; num = strtoul (str, NULL, 10); if (!errno && num <= G_MAXUINT) { *out = (guint)num; return TRUE; } return FALSE; } gchar * qmicli_get_supported_messages_list (const guint8 *data, gsize len) { GString *str = NULL; if (len > 0 && data) { guint bytearray_i; for (bytearray_i = 0; bytearray_i < len; bytearray_i++) { guint bit_i; for (bit_i = 0; bit_i < 8; bit_i++) { if (data[bytearray_i] & (1 << bit_i)) { if (!str) str = g_string_new (""); g_string_append_printf (str, "\t0x%04X\n", (guint16) (bit_i + (8 * bytearray_i))); } } } } return (str ? g_string_free (str, FALSE) : g_strdup ("\tnone\n")); } /******************************************************************************/ typedef struct { guint16 min; guint16 max; const gchar *name; } EarfcnRange; /* http://niviuk.free.fr/lte_band.php */ static const EarfcnRange earfcn_ranges[] = { { 0, 599, "E-UTRA band 1: 2100" }, { 600, 1199, "E-UTRA band 2: 1900 PCS" }, { 1200, 1949, "E-UTRA band 3: 1800+" }, { 1950, 2399, "E-UTRA band 4: AWS-1" }, { 2400, 2649, "E-UTRA band 5: 850" }, { 2650, 2749, "E-UTRA band 6: UMTS only" }, { 2750, 3449, "E-UTRA band 7: 2600" }, { 3450, 3799, "E-UTRA band 8: 900" }, { 3800, 4149, "E-UTRA band 9: 1800" }, { 4150, 4749, "E-UTRA band 10: AWS-1+" }, { 4750, 4999, "E-UTRA band 11: 1500 Lower" }, { 5000, 5179, "E-UTRA band 12: 700 a" }, { 5180, 5279, "E-UTRA band 13: 700 c" }, { 5280, 5379, "E-UTRA band 14: 700 PS" }, { 5730, 5849, "E-UTRA band 17: 700 b" }, { 5850, 5999, "E-UTRA band 18: 800 Lower" }, { 6000, 6149, "E-UTRA band 19: 800 Upper" }, { 6150, 6449, "E-UTRA band 20: 800 DD" }, { 6450, 6599, "E-UTRA band 21: 1500 Upper" }, { 6600, 7399, "E-UTRA band 22: 3500" }, { 7500, 7699, "E-UTRA band 23: 2000 S-band" }, { 7700, 8039, "E-UTRA band 24: 1600 L-band" }, { 8040, 8689, "E-UTRA band 25: 1900+" }, { 8690, 9039, "E-UTRA band 26: 850+" }, { 9040, 9209, "E-UTRA band 27: 800 SMR" }, { 9210, 9659, "E-UTRA band 28: 700 APT" }, { 9660, 9769, "E-UTRA band 29: 700 d" }, { 9770, 9869, "E-UTRA band 30: 2300 WCS" }, { 9870, 9919, "E-UTRA band 31: 450" }, { 9920, 10359, "E-UTRA band 32: 1500 L-band" }, { 36000, 36199, "E-UTRA band 33: TD 1900" }, { 36200, 36349, "E-UTRA band 34: TD 2000" }, { 36350, 36949, "E-UTRA band 35: TD PCS Lower" }, { 36950, 37549, "E-UTRA band 36: TD PCS Upper" }, { 37550, 37749, "E-UTRA band 37: TD PCS Center" }, { 37750, 38249, "E-UTRA band 38: TD 2600" }, { 38250, 38649, "E-UTRA band 39: TD 1900+" }, { 38650, 39649, "E-UTRA band 40: TD 2300" }, { 39650, 41589, "E-UTRA band 41: TD 2500" }, { 41590, 43589, "E-UTRA band 42: TD 3500" }, { 43590, 45589, "E-UTRA band 43: TD 3700" }, { 45590, 46589, "E-UTRA band 44: TD 700" }, }; const char * qmicli_earfcn_to_eutra_band_string (guint16 earfcn) { guint i; for (i = 0; i < G_N_ELEMENTS (earfcn_ranges); i++) { if (earfcn <= earfcn_ranges[i].max && earfcn >= earfcn_ranges[i].min) return earfcn_ranges[i].name; } return "unknown"; } /* Expecting input as: * key1=string,key2=true,key3=false... * Strings may also be passed enclosed between double or single quotes, like: * key1="this is a string", key2='and so is this' * * Based on libmbim's mbimcli_parse_key_value_string(). */ gboolean qmicli_parse_key_value_string (const gchar *str, GError **error, QmiParseKeyValueForeachFn callback, gpointer user_data) { GError *inner_error = NULL; gchar *dupstr, *p, *key, *key_end, *value, *value_end, quote; g_return_val_if_fail (callback != NULL, FALSE); g_return_val_if_fail (str != NULL, FALSE); /* Allow empty strings, we'll just return with success */ while (g_ascii_isspace (*str)) str++; if (!str[0]) return TRUE; dupstr = g_strdup (str); p = dupstr; while (TRUE) { gboolean keep_iteration = FALSE; /* Skip leading spaces */ while (g_ascii_isspace (*p)) p++; /* Key start */ key = p; if (!g_ascii_isalnum (*key)) { inner_error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Key must start with alpha/num, starts with '%c'", *key); break; } /* Key end */ while (g_ascii_isalnum (*p) || (*p == '-') || (*p == '_')) p++; key_end = p; if (key_end == key) { inner_error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Couldn't find a proper key"); break; } /* Skip whitespaces, if any */ while (g_ascii_isspace (*p)) p++; /* Equal sign must be here */ if (*p != '=') { inner_error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Couldn't find equal sign separator"); break; } /* Skip the equal */ p++; /* Skip whitespaces, if any */ while (g_ascii_isspace (*p)) p++; /* Do we have a quote-enclosed string? */ if (*p == '\"' || *p == '\'') { quote = *p; /* Skip the quote */ p++; /* Value start */ value = p; /* Find the closing quote */ p = strchr (p, quote); if (!p) { inner_error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unmatched quotes in string value"); break; } /* Value end */ value_end = p; /* Skip the quote */ p++; } else { /* Value start */ value = p; /* Value end */ while ((*p != ',') && (*p != '\0') && !g_ascii_isspace (*p)) p++; value_end = p; } /* Note that we allow value == value_end here */ /* Skip whitespaces, if any */ while (g_ascii_isspace (*p)) p++; /* If a comma is found, we should keep the iteration */ if (*p == ',') { /* skip the comma */ p++; keep_iteration = TRUE; } /* Got key and value, prepare them and run the callback */ *value_end = '\0'; *key_end = '\0'; if (!callback (key, value, &inner_error, user_data)) { /* We were told to abort */ break; } g_assert (!inner_error); if (keep_iteration) continue; /* Check if no more key/value pairs expected */ if (*p == '\0') break; inner_error = g_error_new (QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unexpected content (%s) after value", p); break; } g_free (dupstr); if (inner_error) { g_propagate_error (error, inner_error); return FALSE; } return TRUE; } libqmi-1.35.2-dev/src/qmicli/qmicli-helpers.h000066400000000000000000000260061455567757300210230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2015 Velocloud Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #include #include #ifndef __QMICLI_HELPERS_H__ #define __QMICLI_HELPERS_H__ /* Common helpers to read enums from strings */ #define QMICLI_ENUM_LIST \ QMICLI_ENUM_LIST_ITEM (QmiDmsOperatingMode, dms_operating_mode, "operating mode") \ QMICLI_ENUM_LIST_ITEM (QmiDmsUimFacility, dms_uim_facility, "facility") \ QMICLI_ENUM_LIST_ITEM (QmiPdcConfigurationType, pdc_configuration_type, "configuration type") \ QMICLI_ENUM_LIST_ITEM (QmiNasRadioInterface, nas_radio_interface, "radio interface") \ QMICLI_ENUM_LIST_ITEM (QmiDeviceExpectedDataFormat, device_expected_data_format, "device expected data format") \ QMICLI_ENUM_LIST_ITEM (QmiWdaLinkLayerProtocol, wda_link_layer_protocol, "link layer protocol") \ QMICLI_ENUM_LIST_ITEM (QmiWdaDataAggregationProtocol, wda_data_aggregation_protocol, "data aggregation protocol") \ QMICLI_ENUM_LIST_ITEM (QmiDataEndpointType, data_endpoint_type, "data endpoint type") \ QMICLI_ENUM_LIST_ITEM (QmiWdsAutoconnectSetting, wds_autoconnect_setting, "autoconnect setting") \ QMICLI_ENUM_LIST_ITEM (QmiWdsAutoconnectSettingRoaming, wds_autoconnect_setting_roaming, "autoconnect setting roaming") \ QMICLI_ENUM_LIST_ITEM (QmiDmsBootImageDownloadMode, dms_boot_image_download_mode, "boot image download mode") \ QMICLI_ENUM_LIST_ITEM (QmiDmsHpDeviceMode, dms_hp_device_mode, "hp device mode") \ QMICLI_ENUM_LIST_ITEM (QmiDmsSwiUsbComposition, dms_swi_usb_composition, "swi usb composition") \ QMICLI_ENUM_LIST_ITEM (QmiDmsFoxconnDeviceMode, dms_foxconn_device_mode, "foxconn device mode") \ QMICLI_ENUM_LIST_ITEM (QmiDmsFoxconnFirmwareVersionType, dms_foxconn_firmware_version_type, "foxconn firmware version type") \ QMICLI_ENUM_LIST_ITEM (QmiUimSessionType, uim_session_type, "session type") \ QMICLI_ENUM_LIST_ITEM (QmiDsdApnType, dsd_apn_type, "apn type") \ QMICLI_ENUM_LIST_ITEM (QmiDmsMacType, dms_mac_type, "mac address type") \ QMICLI_ENUM_LIST_ITEM (QmiSarRfState, sar_rf_state, "sar rf state") \ QMICLI_ENUM_LIST_ITEM (QmiSioPort, sio_port, "sio port") \ QMICLI_ENUM_LIST_ITEM (QmiLocOperationMode, loc_operation_mode, "operation mode") \ QMICLI_ENUM_LIST_ITEM (QmiLocLockType, loc_lock_type, "lock type") \ QMICLI_ENUM_LIST_ITEM (QmiUimCardApplicationPersonalizationFeature, uim_card_application_personalization_feature, "personalization feature" ) \ QMICLI_ENUM_LIST_ITEM (QmiUimDepersonalizationOperation, uim_depersonalization_operation, "depersonalization operation" ) \ QMICLI_ENUM_LIST_ITEM (QmiWmsMessageType, wms_message_type, "message type" ) \ QMICLI_ENUM_LIST_ITEM (QmiWmsMessageClass, wms_message_class, "message class" ) \ QMICLI_ENUM_LIST_ITEM (QmiWmsStorageType, wms_storage_type, "storage type" ) \ QMICLI_ENUM_LIST_ITEM (QmiWmsReceiptAction, wms_receipt_action, "receipt action" ) \ QMICLI_ENUM_LIST_ITEM (QmiFoxFirmwareVersionType, fox_firmware_version_type, "fox firmware version type") #define QMICLI_ENUM_LIST_ITEM(TYPE,TYPE_UNDERSCORE,DESCR) \ gboolean qmicli_read_## TYPE_UNDERSCORE ##_from_string (const gchar *str, TYPE *out); QMICLI_ENUM_LIST #undef QMICLI_ENUM_LIST_ITEM /* Common helpers to read flags from strings */ #define QMICLI_FLAGS_LIST \ QMICLI_FLAGS_LIST_ITEM (QmiDeviceOpenFlags, device_open_flags, "device open flags") \ QMICLI_FLAGS_LIST_ITEM (QmiDeviceAddLinkFlags, device_add_link_flags, "device add link flags") \ QMICLI_FLAGS_LIST_ITEM (QmiLocNmeaType, loc_nmea_type, "NMEA type") \ QMICLI_FLAGS_LIST_ITEM (QmiNasPlmnAccessTechnologyIdentifier, nas_plmn_access_technology_identifier, "PLMN access technology") #define QMICLI_FLAGS_LIST_ITEM(TYPE,TYPE_UNDERSCORE,DESCR) \ gboolean qmicli_read_## TYPE_UNDERSCORE ##_from_string (const gchar *str, TYPE *out); QMICLI_FLAGS_LIST #undef QMICLI_FLAGS_LIST_ITEM /* Common helpers to read 64bit flags from strings */ #define QMICLI_FLAGS64_LIST \ QMICLI_FLAGS64_LIST_ITEM (QmiDsdApnTypePreference, dsd_apn_type_preference, "apn type preference") \ QMICLI_FLAGS64_LIST_ITEM (QmiWdsApnTypeMask, wds_apn_type_mask, "apn type mask") #define QMICLI_FLAGS64_LIST_ITEM(TYPE,TYPE_UNDERSCORE,DESCR) \ gboolean qmicli_read_## TYPE_UNDERSCORE ##_from_string (const gchar *str, TYPE *out); QMICLI_FLAGS64_LIST #undef QMICLI_FLAGS64_LIST_ITEM gchar *qmicli_get_raw_data_printable (const GArray *data, gsize max_line_length, const gchar *new_line_prefix); gchar *qmicli_get_firmware_image_unique_id_printable (const GArray *unique_id); gboolean qmicli_read_dms_uim_pin_id_from_string (const gchar *str, QmiDmsUimPinId *out); gboolean qmicli_read_uim_pin_id_from_string (const gchar *str, QmiUimPinId *out); gboolean qmicli_read_ssp_rat_options_from_string (const gchar *str, QmiNasRatModePreference *out_mode_preference, GArray **out_acquisition_order); gboolean qmicli_read_ssp_net_options_from_string (const gchar *str, QmiNasNetworkSelectionPreference *out_network_preference, guint16 *out_network_mcc, guint16 *out_network_mnc); gboolean qmicli_read_parse_3gpp_mcc_mnc (const gchar *str, guint16 *out_mcc, guint16 *out_mnc, gboolean *out_pcs_digit); gboolean qmicli_read_enable_disable_from_string (const gchar *str, gboolean *out); gboolean qmicli_read_firmware_id_from_string (const gchar *str, QmiDmsFirmwareImageType *out_type, guint *out_index); gboolean qmicli_read_binary_array_from_string (const gchar *str, GArray **out); gboolean qmicli_read_authentication_from_string (const gchar *str, QmiWdsAuthentication *out); gboolean qmicli_read_pdp_type_from_string (const gchar *str, QmiWdsPdpType *out); gboolean qmicli_read_non_empty_string (const gchar *str, const gchar *description, gchar **out); gboolean qmicli_read_uint_from_string (const gchar *str, guint *out); gboolean qmicli_read_raw_data_from_string (const gchar *str, GArray **out); gboolean qmicli_read_yes_no_from_string (const gchar *str, gboolean *out); gchar *qmicli_get_supported_messages_list (const guint8 *data, gsize len); const char *qmicli_earfcn_to_eutra_band_string (guint16 earfcn); gboolean qmicli_validate_device_open_flags (QmiDeviceOpenFlags mask); typedef gboolean (*QmiParseKeyValueForeachFn) (const gchar *key, const gchar *value, GError **error, gpointer user_data); gboolean qmicli_parse_key_value_string (const gchar *str, GError **error, QmiParseKeyValueForeachFn callback, gpointer user_data); #endif /* __QMICLI_H__ */ libqmi-1.35.2-dev/src/qmicli/qmicli-ims.c000066400000000000000000000165601455567757300201500ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2023 Dylan Van Assche */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_IMS /* Context */ typedef struct { QmiDevice *device; QmiClientIms *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_services_enabled_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_IMS_GET_IMS_SERVICES_ENABLED_SETTING { "ims-get-ims-services-enabled-setting", 0, 0, G_OPTION_ARG_NONE, &get_services_enabled_flag, "Get IMS Services Enabled Setting", NULL }, #endif { "ims-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a IMS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL } }; GOptionGroup * qmicli_ims_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("ims", "IMS options:", "Show IP Multimedia Subsystem Settings Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_ims_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_services_enabled_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many IMS actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_IMS_GET_IMS_SERVICES_ENABLED_SETTING static void get_services_enabled_ready (QmiClientIms *client, GAsyncResult *res) { QmiMessageImsGetImsServicesEnabledSettingOutput *output; gboolean service_voice_enabled; gboolean service_vt_enabled; gboolean service_voice_wifi_enabled; gboolean service_ims_registration_enabled; gboolean service_ut_enabled; gboolean service_sms_enabled; gboolean service_ussd_enabled; GError *error = NULL; output = qmi_client_ims_get_ims_services_enabled_setting_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_ims_get_ims_services_enabled_setting_output_get_result (output, &error)) { g_printerr ("error: couldn't get IMS services enabled setting: %s\n", error->message); g_error_free (error); qmi_message_ims_get_ims_services_enabled_setting_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] IMS services:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_voice_service_enabled (output, &service_voice_enabled, NULL)) g_print ("\t IMS registration enabled: %s\n", service_ims_registration_enabled? "yes" : "no"); if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_video_telephony_service_enabled (output, &service_vt_enabled, NULL)) g_print ("\t Voice service enabled: %s\n", service_voice_enabled? "yes" : "no"); if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_voice_wifi_service_enabled (output, &service_voice_wifi_enabled, NULL)) g_print ("\t Voice WiFi service enabled: %s\n", service_voice_wifi_enabled? "yes" : "no"); if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_registration_service_enabled (output, &service_ims_registration_enabled, NULL)) g_print ("\tVideo Telephony service enabled: %s\n", service_vt_enabled? "yes" : "no"); if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_ut_service_enabled (output, &service_ut_enabled, NULL)) g_print ("\t UE to TAS service enabled: %s\n", service_ut_enabled? "yes" : "no"); if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_sms_service_enabled (output, &service_sms_enabled, NULL)) g_print ("\t SMS service enabled: %s\n", service_sms_enabled? "yes" : "no"); if (qmi_message_ims_get_ims_services_enabled_setting_output_get_ims_ussd_service_enabled (output, &service_ussd_enabled, NULL)) g_print ("\t USSD service enabled: %s\n", service_ut_enabled? "yes" : "no"); qmi_message_ims_get_ims_services_enabled_setting_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_IMS_GET_IMS_SERVICES_ENABLED_SETTING */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_ims_run (QmiDevice *device, QmiClientIms *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_IMS_GET_IMS_SERVICES_ENABLED_SETTING if (get_services_enabled_flag) { g_debug ("Asynchronously getting services enabled setting..."); qmi_client_ims_get_ims_services_enabled_setting (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_services_enabled_ready, NULL); return; } #endif /* HAVE_QMI_MESSAGE_IMS_GET_IMS_SERVICES_ENABLED_SETTING */ /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_IMS */ libqmi-1.35.2-dev/src/qmicli/qmicli-imsa.c000066400000000000000000000262041455567757300203050ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2023 Dylan Van Assche */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_IMSA /* Context */ typedef struct { QmiDevice *device; QmiClientImsa *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_ims_registration_status_flag; static gboolean get_ims_services_status_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_IMSA_GET_IMS_REGISTRATION_STATUS { "imsa-get-ims-registration-status", 0, 0, G_OPTION_ARG_NONE, &get_ims_registration_status_flag, "Get IMS registration status", NULL }, #endif #if defined HAVE_QMI_MESSAGE_IMSA_GET_IMS_SERVICES_STATUS { "imsa-get-ims-services-status", 0, 0, G_OPTION_ARG_NONE, &get_ims_services_status_flag, "Get IMS services status", NULL }, #endif { "imsa-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a IMSA client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL } }; GOptionGroup * qmicli_imsa_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("imsa", "IMSA options:", "Show IP Multimedia Subsystem Application Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_imsa_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!get_ims_registration_status_flag + get_ims_services_status_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many IMSA actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_IMSA_GET_IMS_REGISTRATION_STATUS static void get_ims_registration_status_ready (QmiClientImsa *client, GAsyncResult *res) { QmiMessageImsaGetImsRegistrationStatusOutput *output; QmiImsaImsRegistrationStatus registration_status; QmiImsaRegistrationTechnology registration_technology; GError *error = NULL; output = qmi_client_imsa_get_ims_registration_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_imsa_get_ims_registration_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get IMS registration status: %s\n", error->message); g_error_free (error); qmi_message_imsa_get_ims_registration_status_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] IMS registration:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_imsa_get_ims_registration_status_output_get_ims_registration_status (output, ®istration_status, NULL)) g_print ("\t Status: '%s'\n", qmi_imsa_ims_registration_status_get_string (registration_status)); if (qmi_message_imsa_get_ims_registration_status_output_get_ims_registration_technology (output, ®istration_technology, NULL)) g_print ("\tTechnology: '%s'\n", qmi_imsa_registration_technology_get_string (registration_technology)); qmi_message_imsa_get_ims_registration_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_IMSA_GET_IMS_REGISTRATION_STATUS */ #if defined HAVE_QMI_MESSAGE_IMSA_GET_IMS_SERVICES_STATUS static void get_ims_services_status_ready (QmiClientImsa *client, GAsyncResult *res) { QmiMessageImsaGetImsServicesStatusOutput *output; QmiImsaServiceStatus service_sms_status; QmiImsaRegistrationTechnology service_sms_technology; QmiImsaServiceStatus service_voice_status; QmiImsaRegistrationTechnology service_voice_technology; QmiImsaServiceStatus service_vt_status; QmiImsaRegistrationTechnology service_vt_technology; QmiImsaServiceStatus service_ut_status; QmiImsaRegistrationTechnology service_ut_technology; QmiImsaServiceStatus service_vs_status; QmiImsaRegistrationTechnology service_vs_technology; GError *error = NULL; output = qmi_client_imsa_get_ims_services_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_imsa_get_ims_services_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get IMS services status: %s\n", error->message); g_error_free (error); qmi_message_imsa_get_ims_services_status_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] IMS services:\n", qmi_device_get_path_display (ctx->device)); g_print ("\tSMS service\n"); if (qmi_message_imsa_get_ims_services_status_output_get_ims_sms_service_status (output, &service_sms_status, NULL)) g_print ("\t\t Status: '%s'\n", qmi_imsa_service_status_get_string (service_sms_status)); if (qmi_message_imsa_get_ims_services_status_output_get_ims_sms_service_registration_technology (output, &service_sms_technology, NULL)) g_print ("\t\tTechnology: '%s'\n", qmi_imsa_registration_technology_get_string (service_sms_technology)); g_print ("\tVoice service\n"); if (qmi_message_imsa_get_ims_services_status_output_get_ims_voice_service_status (output, &service_voice_status, NULL)) g_print ("\t\t Status: '%s'\n", qmi_imsa_service_status_get_string (service_voice_status)); if (qmi_message_imsa_get_ims_services_status_output_get_ims_voice_service_registration_technology (output, &service_voice_technology, NULL)) g_print ("\t\tTechnology: '%s'\n", qmi_imsa_registration_technology_get_string (service_voice_technology)); g_print ("\tVideo Telephony service\n"); if (qmi_message_imsa_get_ims_services_status_output_get_ims_video_telephony_service_status (output, &service_vt_status, NULL)) g_print ("\t\t Status: '%s'\n", qmi_imsa_service_status_get_string (service_vt_status)); if (qmi_message_imsa_get_ims_services_status_output_get_ims_video_telephony_service_registration_technology (output, &service_vt_technology, NULL)) g_print ("\t\tTechnology: '%s'\n", qmi_imsa_registration_technology_get_string (service_vt_technology)); g_print ("\tUE to TAS service\n"); if (qmi_message_imsa_get_ims_services_status_output_get_ims_ue_to_tas_service_status (output, &service_ut_status, NULL)) g_print ("\t\t Status: '%s'\n", qmi_imsa_service_status_get_string (service_ut_status)); if (qmi_message_imsa_get_ims_services_status_output_get_ims_ue_to_tas_service_registration_technology (output, &service_ut_technology, NULL)) g_print ("\t\tTechnology: '%s'\n", qmi_imsa_registration_technology_get_string (service_ut_technology)); g_print ("\tVideo Share service\n"); if (qmi_message_imsa_get_ims_services_status_output_get_ims_video_share_service_status (output, &service_vs_status, NULL)) g_print ("\t\t Status: '%s'\n", qmi_imsa_service_status_get_string (service_vs_status)); if (qmi_message_imsa_get_ims_services_status_output_get_ims_video_share_service_registration_technology (output, &service_vs_technology, NULL)) g_print ("\t\tTechnology: '%s'\n", qmi_imsa_registration_technology_get_string (service_vs_technology)); qmi_message_imsa_get_ims_services_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_IMSA_GET_IMS_SERVICES_STATUS */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_imsa_run (QmiDevice *device, QmiClientImsa *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_IMSA_GET_IMS_REGISTRATION_STATUS if (get_ims_registration_status_flag) { g_debug ("Asynchronously getting IMS registration status..."); qmi_client_imsa_get_ims_registration_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_ims_registration_status_ready, NULL); return; } #endif /* HAVE_QMI_MESSAGE_IMSA_GET_IMS_REGISTRATION_STATUS */ #if defined HAVE_QMI_MESSAGE_IMSA_GET_IMS_SERVICES_STATUS if (get_ims_services_status_flag) { g_debug ("Asynchronously getting IMS services status..."); qmi_client_imsa_get_ims_services_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_ims_services_status_ready, NULL); return; } #endif /* HAVE_QMI_MESSAGE_IMSA_GET_IMS_SERVICES_STATUS */ /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_IMSA */ libqmi-1.35.2-dev/src/qmicli/qmicli-imsp.c000066400000000000000000000127711455567757300203300ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2023 Dylan Van Assche */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_IMSP /* Context */ typedef struct { QmiDevice *device; QmiClientImsp *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_enabler_state_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_IMSP_GET_ENABLER_STATE { "imsp-get-enabler-state", 0, 0, G_OPTION_ARG_NONE, &get_enabler_state_flag, "Get IMSP enabler state", NULL }, #endif { "imsp-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a IMSP client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL } }; GOptionGroup * qmicli_imsp_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("imsp", "IMSP options:", "Show IP Multimedia Subsystem Presence Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_imsp_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_enabler_state_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many IMSP actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_IMSP_GET_ENABLER_STATE static void get_enabler_state_ready (QmiClientImsp *client, GAsyncResult *res) { QmiMessageImspGetEnablerStateOutput *output; QmiImspEnablerState enabler_state; GError *error = NULL; output = qmi_client_imsp_get_enabler_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_imsp_get_enabler_state_output_get_result (output, &error)) { g_printerr ("error: couldn't get enabler state: %s\n", error->message); g_error_free (error); qmi_message_imsp_get_enabler_state_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] IMSP enabler state retrieved:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_imsp_get_enabler_state_output_get_enabler_state (output, &enabler_state, NULL)) { g_print ("\tRegistration status: '%s'\n", qmi_imsp_enabler_state_get_string (enabler_state)); } qmi_message_imsp_get_enabler_state_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_IMSP_GET_ENABLER_STATE */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_imsp_run (QmiDevice *device, QmiClientImsp *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_IMSP_GET_ENABLER_STATE if (get_enabler_state_flag) { g_debug ("Asynchronously getting enabler state..."); qmi_client_imsp_get_enabler_state (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_enabler_state_ready, NULL); return; } #endif /* HAVE_QMI_MESSAGE_IMSP_GET_ENABLER_STATE */ /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_IMSP */ libqmi-1.35.2-dev/src/qmicli/qmicli-link-management.c000066400000000000000000000300251455567757300224170ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2021 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" /* Options */ static gchar *link_list_str; static gchar *link_add_str; static gchar *link_delete_str; static gchar *link_delete_all_str; static GOptionEntry entries[] = { { "link-list", 0, 0, G_OPTION_ARG_STRING, &link_list_str, "List links created from a given interface", "[IFACE]" }, { "link-add", 0, 0, G_OPTION_ARG_STRING, &link_add_str, "Create new network interface link", "[iface=IFACE,prefix=PREFIX[,mux-id=N][,flags=FLAGS]]" }, { "link-delete", 0, 0, G_OPTION_ARG_STRING, &link_delete_str, "Delete a given network interface link", "[link-iface=IFACE][,[mux-id=N]]" }, { "link-delete-all", 0, 0, G_OPTION_ARG_STRING, &link_delete_all_str, "Delete all network interface links from the given interface", "[IFACE]" }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_link_management_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("link-management", "Link management options:", "Show link management specific options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_link_management_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!link_list_str + !!link_add_str + !!link_delete_str + !!link_delete_all_str); if (n_actions > 1) { g_printerr ("error: too many link management actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } /******************************************************************************/ static void link_delete_all_ready (QmiDevice *dev, GAsyncResult *res) { g_autoptr(GError) error = NULL; if (!qmi_device_delete_all_links_finish (dev, res, &error)) g_printerr ("error: couldn't delete all links: %s\n", error->message); else g_print ("[%s] all links successfully deleted\n", qmi_device_get_path_display (dev)); qmicli_async_operation_done (!error, FALSE); } static void device_link_delete_all (QmiDevice *dev, GCancellable *cancellable, const gchar *iface) { qmi_device_delete_all_links (dev, iface, cancellable, (GAsyncReadyCallback)link_delete_all_ready, NULL); } typedef struct { guint mux_id; gchar *link_iface; } DeleteLinkProperties; static void link_delete_ready (QmiDevice *dev, GAsyncResult *res) { g_autoptr(GError) error = NULL; if (!qmi_device_delete_link_finish (dev, res, &error)) g_printerr ("error: couldn't delete link: %s\n", error->message); else g_print ("[%s] link successfully deleted\n", qmi_device_get_path_display (dev)); qmicli_async_operation_done (!error, FALSE); } static gboolean del_link_properties_handle (const gchar *key, const gchar *value, GError **error, DeleteLinkProperties *props) { if (g_ascii_strcasecmp (key, "mux-id") == 0 && props->mux_id == QMI_DEVICE_MUX_ID_UNBOUND) { if (!qmicli_read_uint_from_string (value, &props->mux_id)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid mux-id given: '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "link-iface") == 0 && !props->link_iface) { props->link_iface = g_strdup (value); return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unrecognized or duplicate option '%s'", key); return FALSE; } static void device_link_delete (QmiDevice *dev, GCancellable *cancellable, const gchar *del_settings) { g_autoptr(GError) error = NULL; DeleteLinkProperties props = { .mux_id = QMI_DEVICE_MUX_ID_UNBOUND, .link_iface = NULL, }; if (!qmicli_parse_key_value_string (del_settings, &error, (QmiParseKeyValueForeachFn)del_link_properties_handle, &props)) { g_printerr ("error: couldn't parse input add link settings: %s\n", error->message); qmicli_async_operation_done (FALSE, FALSE); return; } if (!props.link_iface) { g_printerr ("error: missing mandatory 'link-iface' setting\n"); qmicli_async_operation_done (FALSE, FALSE); return; } if ((props.mux_id != QMI_DEVICE_MUX_ID_UNBOUND) && (props.mux_id < QMI_DEVICE_MUX_ID_MIN || props.mux_id > QMI_DEVICE_MUX_ID_MAX)) { g_printerr ("error: mux id %u out of range [%u,%u]\n", props.mux_id, QMI_DEVICE_MUX_ID_MIN, QMI_DEVICE_MUX_ID_MAX); qmicli_async_operation_done (FALSE, FALSE); return; } qmi_device_delete_link (dev, props.link_iface, props.mux_id, cancellable, (GAsyncReadyCallback)link_delete_ready, NULL); g_free (props.link_iface); } typedef struct { guint mux_id; gchar *iface; gchar *prefix; QmiDeviceAddLinkFlags flags; } AddLinkProperties; static void link_add_ready (QmiDevice *dev, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autofree gchar *link_iface = NULL; guint mux_id; link_iface = qmi_device_add_link_with_flags_finish (dev, res, &mux_id, &error); if (!link_iface) g_printerr ("error: couldn't add link: %s\n", error->message); else g_print ("[%s] link successfully added:\n" " iface name: %s\n" " mux-id: %u\n", qmi_device_get_path_display (dev), link_iface, mux_id); qmicli_async_operation_done (!error, FALSE); } static gboolean add_link_properties_handle (const gchar *key, const gchar *value, GError **error, AddLinkProperties *props) { if (g_ascii_strcasecmp (key, "mux-id") == 0 && props->mux_id == QMI_DEVICE_MUX_ID_AUTOMATIC) { if (!qmicli_read_uint_from_string (value, &props->mux_id)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid mux-id given: '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "iface") == 0 && !props->iface) { props->iface = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "prefix") == 0 && !props->prefix) { props->prefix = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "flags") == 0 && !props->flags) { if (!qmicli_read_device_add_link_flags_from_string (value, &props->flags)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid flags given: '%s'", value); return FALSE; } return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unrecognized or duplicate option '%s'", key); return FALSE; } static void device_link_add (QmiDevice *dev, GCancellable *cancellable, const gchar *add_settings) { g_autoptr(GError) error = NULL; AddLinkProperties props = { .mux_id = QMI_DEVICE_MUX_ID_AUTOMATIC, .iface = NULL, .prefix = NULL, .flags = QMI_DEVICE_ADD_LINK_FLAGS_NONE, }; if (!qmicli_parse_key_value_string (add_settings, &error, (QmiParseKeyValueForeachFn)add_link_properties_handle, &props)) { g_printerr ("error: couldn't parse input add link settings: %s\n", error->message); qmicli_async_operation_done (FALSE, FALSE); return; } if (!props.iface) { g_printerr ("error: missing mandatory 'iface' setting\n"); qmicli_async_operation_done (FALSE, FALSE); return; } if (!props.prefix) props.prefix = g_strdup_printf ("%s.", props.iface); if ((props.mux_id != QMI_DEVICE_MUX_ID_AUTOMATIC) && (props.mux_id < QMI_DEVICE_MUX_ID_MIN || props.mux_id > QMI_DEVICE_MUX_ID_MAX)) { g_printerr ("error: mux id %u out of range [%u,%u]\n", props.mux_id, QMI_DEVICE_MUX_ID_MIN, QMI_DEVICE_MUX_ID_MAX); qmicli_async_operation_done (FALSE, FALSE); return; } qmi_device_add_link_with_flags (dev, props.mux_id, props.iface, props.prefix, props.flags, cancellable, (GAsyncReadyCallback)link_add_ready, NULL); g_free (props.iface); g_free (props.prefix); } static void device_link_list (QmiDevice *dev, GCancellable *cancellable, const gchar *iface) { g_autoptr(GError) error = NULL; g_autoptr(GPtrArray) links = NULL; if (!qmi_device_list_links (dev, iface, &links, &error)) g_printerr ("error: couldn't list links: %s\n", error->message); else { guint i; guint n_links; n_links = (links ? links->len : 0); g_print ("[%s] found %u links%s\n", qmi_device_get_path_display (dev), n_links, n_links > 0 ? ":" : ""); for (i = 0; i < n_links; i++) g_print (" [%u] %s\n", i, (const gchar *) g_ptr_array_index (links, i)); } qmicli_async_operation_done (!error, FALSE); } /******************************************************************************/ /* Common */ void qmicli_link_management_run (QmiDevice *dev, GCancellable *cancellable) { if (link_list_str) device_link_list (dev, cancellable, link_list_str); else if (link_add_str) device_link_add (dev, cancellable, link_add_str); else if (link_delete_str) device_link_delete (dev, cancellable, link_delete_str); else if (link_delete_all_str) device_link_delete_all (dev, cancellable, link_delete_all_str); else g_warn_if_reached (); } libqmi-1.35.2-dev/src/qmicli/qmicli-loc.c000066400000000000000000001626041455567757300201360ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2018 Thomas Weißschuh * Copyright (C) 2018 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_LOC #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") /* Context */ typedef enum { MONITORING_STEP_FIRST, MONITORING_STEP_REGISTER_EVENTS, MONITORING_STEP_SETUP_TIMEOUT, MONITORING_STEP_ONGOING, } MonitoringStep; typedef struct { QmiDevice *device; QmiClientLoc *client; GCancellable *cancellable; guint timeout_id; MonitoringStep monitoring_step; guint position_report_indication_id; guint nmea_indication_id; guint gnss_sv_info_indication_id; guint delete_assistance_data_indication_id; guint get_nmea_types_indication_id; guint set_nmea_types_indication_id; guint get_operation_mode_indication_id; guint set_operation_mode_indication_id; guint get_engine_lock_indication_id; guint set_engine_lock_indication_id; } Context; static Context *ctx; /* Options */ static gint session_id; static gboolean start_flag; static gboolean stop_flag; static gboolean get_position_report_flag; static gboolean get_gnss_sv_info_flag; static gint timeout; static gboolean follow_position_report_flag; static gboolean follow_gnss_sv_info_flag; static gboolean follow_nmea_flag; static gboolean delete_assistance_data_flag; static gboolean get_nmea_types_flag; static gchar *set_nmea_types_str; static gboolean get_operation_mode_flag; static gchar *set_operation_mode_str; static gboolean get_engine_lock_flag; static gchar *set_engine_lock_str; static gboolean noop_flag; #define DEFAULT_LOC_TIMEOUT_SECS 30 static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_LOC_START || defined HAVE_QMI_MESSAGE_LOC_STOP { "loc-session-id", 0, 0, G_OPTION_ARG_INT, &session_id, "Session ID for the LOC session", "[ID]", }, #endif #if defined HAVE_QMI_MESSAGE_LOC_START { "loc-start", 0, 0, G_OPTION_ARG_NONE, &start_flag, "Start location gathering", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_LOC_STOP { "loc-stop", 0, 0, G_OPTION_ARG_NONE, &stop_flag, "Stop location gathering", NULL, }, #endif #if defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS { "loc-get-position-report", 0, 0, G_OPTION_ARG_NONE, &get_position_report_flag, "Get position reported by the location module", NULL, }, #endif #if defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS { "loc-get-gnss-sv-info", 0, 0, G_OPTION_ARG_NONE, &get_gnss_sv_info_flag, "Show GNSS space vehicle info", NULL, }, #endif #if (defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT || defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO) && \ defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS { "loc-timeout", 0, 0, G_OPTION_ARG_INT, &timeout, "Maximum time to wait for information in `--loc-get-position-report' and `--loc-get-gnss-sv-info' (default 30s)", "[SECS]", }, #endif #if defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS { "loc-follow-position-report", 0, 0, G_OPTION_ARG_NONE, &follow_position_report_flag, "Follow all position updates reported by the location module indefinitely", NULL, }, #endif #if defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS { "loc-follow-gnss-sv-info", 0, 0, G_OPTION_ARG_NONE, &follow_gnss_sv_info_flag, "Follow all GNSS space vehicle info updates reported by the location module indefinitely", NULL, }, #endif #if defined HAVE_QMI_INDICATION_LOC_NMEA && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS { "loc-follow-nmea", 0, 0, G_OPTION_ARG_NONE, &follow_nmea_flag, "Follow all NMEA trace updates reported by the location module indefinitely", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_LOC_DELETE_ASSISTANCE_DATA { "loc-delete-assistance-data", 0, 0, G_OPTION_ARG_NONE, &delete_assistance_data_flag, "Delete positioning assistance data", NULL, }, #endif #if defined HAVE_QMI_MESSAGE_LOC_GET_NMEA_TYPES { "loc-get-nmea-types", 0, 0, G_OPTION_ARG_NONE, &get_nmea_types_flag, "Get list of enabled NMEA traces", NULL }, #endif #if defined HAVE_QMI_MESSAGE_LOC_SET_NMEA_TYPES { "loc-set-nmea-types", 0, 0, G_OPTION_ARG_STRING, &set_nmea_types_str, "Set list of enabled NMEA traces", "[type1|type2|type3...]" }, #endif #if defined HAVE_QMI_MESSAGE_LOC_GET_OPERATION_MODE { "loc-get-operation-mode", 0, 0, G_OPTION_ARG_NONE, &get_operation_mode_flag, "Get operation mode", NULL }, #endif #if defined HAVE_QMI_MESSAGE_LOC_SET_OPERATION_MODE { "loc-set-operation-mode", 0, 0, G_OPTION_ARG_STRING, &set_operation_mode_str, "Set operation mode", "[default|msb|msa|standalone|cellid|wwan]" }, #endif #if defined HAVE_QMI_MESSAGE_LOC_GET_ENGINE_LOCK { "loc-get-engine-lock", 0, 0, G_OPTION_ARG_NONE, &get_engine_lock_flag, "Get engine lock status", NULL }, #endif #if defined HAVE_QMI_MESSAGE_LOC_SET_ENGINE_LOCK { "loc-set-engine-lock", 0, 0, G_OPTION_ARG_STRING, &set_engine_lock_str, "Set engine lock status", "[none|mi|mt|all]" }, #endif { "loc-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a LOC client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_loc_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("loc", "LOC options:", "Show location options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_loc_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; gboolean follow_action; if (checked) return !!n_actions; /* Let's define the following actions: * - Start location engine * - Stop location engine * - Show current position (oneshot). * - Show current satellite info (oneshot). * - Follow updates indefinitely, including either position, satellite info or NMEA traces. * - Other single-request operations. */ follow_action = !!(follow_position_report_flag + follow_gnss_sv_info_flag + follow_nmea_flag); n_actions = (start_flag + stop_flag + get_position_report_flag + get_gnss_sv_info_flag + follow_action + delete_assistance_data_flag + get_nmea_types_flag + !!set_nmea_types_str + get_operation_mode_flag + !!set_operation_mode_str + get_engine_lock_flag + !!set_engine_lock_str + noop_flag); if (n_actions > 1) { g_printerr ("error: too many LOC actions requested\n"); exit (EXIT_FAILURE); } if (session_id < 0 || session_id > G_MAXUINT8) { g_printerr ("error: invalid session ID: %d [0,%u]\n", session_id, G_MAXUINT8); exit (EXIT_FAILURE); } if (timeout < 0) { g_printerr ("error: invalid timeout: %d", timeout); exit (EXIT_FAILURE); } if (timeout > 0 && !(get_position_report_flag || get_gnss_sv_info_flag)) { g_printerr ("error: `--loc-timeout' is only applicable with `--loc-get-position-report' or `--loc-get-gnss-sv-info'\n"); exit (EXIT_FAILURE); } /* Actions that require receiving QMI indication messages must specify that * indications are expected. */ if (get_position_report_flag || get_gnss_sv_info_flag || follow_action || delete_assistance_data_flag || get_nmea_types_flag || set_nmea_types_str || get_operation_mode_flag || set_operation_mode_str || get_engine_lock_flag || set_engine_lock_str) qmicli_expect_indications (); checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->timeout_id) g_source_remove (context->timeout_id); if (context->position_report_indication_id) g_signal_handler_disconnect (context->client, context->position_report_indication_id); if (context->gnss_sv_info_indication_id) g_signal_handler_disconnect (context->client, context->gnss_sv_info_indication_id); if (context->nmea_indication_id) g_signal_handler_disconnect (context->client, context->nmea_indication_id); if (context->delete_assistance_data_indication_id) g_signal_handler_disconnect (context->client, context->delete_assistance_data_indication_id); if (context->get_nmea_types_indication_id) g_signal_handler_disconnect (context->client, context->get_nmea_types_indication_id); if (context->set_nmea_types_indication_id) g_signal_handler_disconnect (context->client, context->set_nmea_types_indication_id); if (context->get_operation_mode_indication_id) g_signal_handler_disconnect (context->client, context->get_operation_mode_indication_id); if (context->set_operation_mode_indication_id) g_signal_handler_disconnect (context->client, context->set_operation_mode_indication_id); if (context->get_engine_lock_indication_id) g_signal_handler_disconnect (context->client, context->get_engine_lock_indication_id); if (context->set_engine_lock_indication_id) g_signal_handler_disconnect (context->client, context->set_engine_lock_indication_id); g_clear_object (&context->cancellable); g_clear_object (&context->client); g_clear_object (&context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if (defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT || \ defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO || \ defined HAVE_QMI_INDICATION_LOC_NMEA) && \ defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS static void monitoring_step_run (void); static gboolean monitoring_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void monitoring_cancelled (GCancellable *cancellable) { /* For GET operations, this is a failure */ if (get_position_report_flag || get_gnss_sv_info_flag) { g_printerr ("error: operation failed: cancelled\n"); operation_shutdown (FALSE); return; } /* For FOLLOW operations, silently exit */ if (follow_position_report_flag || follow_gnss_sv_info_flag || follow_nmea_flag) { operation_shutdown (TRUE); return; } g_assert_not_reached (); } #endif /* HAVE_QMI_INDICATION_LOC_POSITION_REPORT * HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO * HAVE_QMI_INDICATION_LOC_NMEA */ #if defined HAVE_QMI_INDICATION_LOC_NMEA && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS static void nmea_received (QmiClientLoc *client, QmiIndicationLocNmeaOutput *output) { const gchar *nmea = NULL; qmi_indication_loc_nmea_output_get_nmea_string (output, &nmea, NULL); if (nmea) /* Note: NMEA traces already have an EOL */ g_print ("%s", nmea); } #endif /* HAVE_QMI_INDICATION_LOC_NMEA */ #if defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS static void gnss_sv_info_received (QmiClientLoc *client, QmiIndicationLocGnssSvInfoOutput *output) { GArray *satellite_infos = NULL; guint i, num_satellite_infos; gboolean altitude_assumed; if (qmi_indication_loc_gnss_sv_info_output_get_altitude_assumed (output, &altitude_assumed, NULL)) g_print ("[gnss sv info] Altitude assumed: %s\n", altitude_assumed ? "yes" : "no"); else g_print ("[gnss sv info] Altitude assumed: n/a\n"); qmi_indication_loc_gnss_sv_info_output_get_list (output, &satellite_infos, NULL); num_satellite_infos = satellite_infos ? satellite_infos->len : 0; g_print ("[gnss sv info] %d satellites detected:\n", num_satellite_infos); for (i = 0; i < num_satellite_infos; i++) { QmiIndicationLocGnssSvInfoOutputListElement *element; element = &g_array_index (satellite_infos, QmiIndicationLocGnssSvInfoOutputListElement, i); g_print (" [satellite #%u]\n", i); g_print (" system: %s\n", (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_SYSTEM) ? qmi_loc_system_get_string (element->system) : "n/a"); if (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_GNSS_SATELLITE_ID) g_print (" satellite id: %u\n", element->gnss_satellite_id); else g_print (" satellite id: n/a\n"); g_print (" health status: %s\n", (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_HEALTH_STATUS) ? qmi_loc_health_status_get_string (element->health_status) : "n/a"); g_print (" satellite status: %s\n", (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_PROCESS_STATUS) ? qmi_loc_satellite_status_get_string (element->satellite_status) : "n/a"); g_print (" navigation data: %s\n", (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_SATELLITE_INFO_MASK) ? qmi_loc_navigation_data_get_string (element->navigation_data) : "n/a"); if (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_ELEVATION) g_print (" elevation: %lf\n", (gdouble)element->elevation_degrees); else g_print (" elevation: n/a\n"); if (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_AZIMUTH) g_print (" azimuth: %lf\n", (gdouble)element->azimuth_degrees); else g_print (" azimuth: n/a\n"); if (element->valid_information & QMI_LOC_SATELLITE_VALID_INFORMATION_SIGNAL_TO_NOISE_RATIO) g_print (" SNR: %lf\n", (gdouble)element->signal_to_noise_ratio_bhz); else g_print (" SNR: n/a\n"); } /* Terminate GET request */ if (get_gnss_sv_info_flag) operation_shutdown (TRUE); } #endif /* HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO */ #if defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT && defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS static void position_report_received (QmiClientLoc *client, QmiIndicationLocPositionReportOutput *output) { QmiLocSessionStatus status; qmi_indication_loc_position_report_output_get_session_status (output, &status, NULL); g_print ("[position report] status: %s\n", qmi_loc_session_status_get_string (status)); if (status == QMI_LOC_SESSION_STATUS_SUCCESS || status == QMI_LOC_SESSION_STATUS_IN_PROGRESS) { gdouble auxd; gfloat auxf; guint8 aux8; guint32 aux32; guint64 aux64; QmiLocReliability reliability; QmiLocTechnologyUsed technology; QmiLocTimeSource time_source; QmiLocSensorDataUsage sensor_data_usage; gfloat pdop; gfloat hdop; gfloat vdop; guint16 gps_weeks; guint32 gps_time_of_week_milliseconds; gboolean auxb; GArray *array; if (qmi_indication_loc_position_report_output_get_latitude (output, &auxd, NULL)) g_print (" latitude: %lf degrees\n", auxd); else g_print (" latitude: n/a\n"); if (qmi_indication_loc_position_report_output_get_longitude (output, &auxd, NULL)) g_print (" longitude: %lf degrees\n", auxd); else g_print (" longitude: n/a\n"); if (qmi_indication_loc_position_report_output_get_horizontal_uncertainty_circular (output, &auxf, NULL)) g_print (" circular horizontal position uncertainty: %lf meters\n", (gdouble)auxf); else g_print (" circular horizontal position uncertainty: n/a\n"); if (qmi_indication_loc_position_report_output_get_horizontal_uncertainty_elliptical_minor (output, &auxf, NULL)) g_print (" horizontal elliptical uncertainty (semi-minor axis): %lf meters\n", (gdouble)auxf); else g_print (" horizontal elliptical uncertainty (semi-minor axis): n/a\n"); if (qmi_indication_loc_position_report_output_get_horizontal_uncertainty_elliptical_major (output, &auxf, NULL)) g_print (" horizontal elliptical uncertainty (semi-major axis): %lf meters\n", (gdouble)auxf); else g_print (" horizontal elliptical uncertainty (semi-major axis): n/a\n"); if (qmi_indication_loc_position_report_output_get_horizontal_uncertainty_elliptical_azimuth (output, &auxf, NULL)) g_print (" horizontal elliptical uncertainty azimuth: %lf meters\n", (gdouble)auxf); else g_print (" horizontal elliptical uncertainty azimuth: n/a\n"); if (qmi_indication_loc_position_report_output_get_horizontal_confidence (output, &aux8, NULL)) g_print (" horizontal confidence: %u%%\n", aux8); else g_print (" horizontal confidence: n/a\n"); if (qmi_indication_loc_position_report_output_get_horizontal_reliability (output, &reliability, NULL)) g_print (" horizontal reliability: %s\n", qmi_loc_reliability_get_string (reliability)); else g_print (" horizontal reliability: n/a\n"); if (qmi_indication_loc_position_report_output_get_horizontal_speed (output, &auxf, NULL)) g_print (" horizontal speed: %lf m/s\n", (gdouble)auxf); else g_print (" horizontal speed: n/a\n"); if (qmi_indication_loc_position_report_output_get_speed_uncertainty (output, &auxf, NULL)) g_print (" speed uncertainty: %lf m/s\n", (gdouble)auxf); else g_print (" speed uncertainty: n/a\n"); if (qmi_indication_loc_position_report_output_get_altitude_from_ellipsoid (output, &auxf, NULL)) g_print (" altitude w.r.t. ellipsoid: %lf meters\n", (gdouble)auxf); else g_print (" altitude w.r.t. ellipsoid: n/a\n"); if (qmi_indication_loc_position_report_output_get_altitude_from_sealevel (output, &auxf, NULL)) g_print (" altitude w.r.t. mean sea level: %lf meters\n", (gdouble)auxf); else g_print (" altitude w.r.t. mean sea level: n/a\n"); if (qmi_indication_loc_position_report_output_get_vertical_uncertainty (output, &auxf, NULL)) g_print (" vertical uncertainty: %lf meters\n", (gdouble)auxf); else g_print (" vertical uncertainty: n/a\n"); if (qmi_indication_loc_position_report_output_get_vertical_confidence (output, &aux8, NULL)) g_print (" vertical confidence: %u%%\n", aux8); else g_print (" vertical confidence: n/a\n"); if (qmi_indication_loc_position_report_output_get_vertical_reliability (output, &reliability, NULL)) g_print (" vertical reliability: %s\n", qmi_loc_reliability_get_string (reliability)); else g_print (" vertical reliability: n/a\n"); if (qmi_indication_loc_position_report_output_get_vertical_speed (output, &auxf, NULL)) g_print (" vertical speed: %lf m/s\n", (gdouble)auxf); else g_print (" vertical speed: n/a\n"); if (qmi_indication_loc_position_report_output_get_heading (output, &auxf, NULL)) g_print (" heading: %lf degrees\n", (gdouble)auxf); else g_print (" heading: n/a\n"); if (qmi_indication_loc_position_report_output_get_heading_uncertainty (output, &auxf, NULL)) g_print (" heading uncertainty: %lf meters\n", (gdouble)auxf); else g_print (" heading uncertainty: n/a\n"); if (qmi_indication_loc_position_report_output_get_magnetic_deviation (output, &auxf, NULL)) g_print (" magnetic deviation: %lf degrees\n", (gdouble)auxf); else g_print (" magnetic deviation: n/a\n"); if (qmi_indication_loc_position_report_output_get_technology_used (output, &technology, NULL)) { g_autofree gchar *technology_str = NULL; technology_str = qmi_loc_technology_used_build_string_from_mask (technology); g_print (" technology: %s\n", VALIDATE_MASK_NONE (technology_str)); } else g_print (" technology: n/a\n"); if (qmi_indication_loc_position_report_output_get_dop (output, &pdop, &hdop, &vdop, NULL)) { g_print (" position DOP: %lf\n", (gdouble)pdop); g_print (" horizontal DOP: %lf\n", (gdouble)hdop); g_print (" vertical DOP: %lf\n", (gdouble)vdop); } else { g_print (" position DOP: n/a\n"); g_print (" horizontal DOP: n/a\n"); g_print (" vertical DOP: n/a\n"); } if (qmi_indication_loc_position_report_output_get_utc_timestamp (output, &aux64, NULL)) g_print (" UTC timestamp: %" G_GUINT64_FORMAT " ms\n", aux64); else g_print (" UTC timestamp: n/a\n"); if (qmi_indication_loc_position_report_output_get_leap_seconds (output, &aux8, NULL)) g_print (" Leap seconds: %u\n", aux8); else g_print (" Leap seconds: n/a\n"); if (qmi_indication_loc_position_report_output_get_gps_date_time (output, &gps_weeks, &gps_time_of_week_milliseconds, NULL)) g_print (" GPS time: %u weeks and %ums\n", gps_weeks, gps_time_of_week_milliseconds); else g_print (" GPS time: n/a\n"); if (qmi_indication_loc_position_report_output_get_time_uncertainty (output, &auxf, NULL)) g_print (" time uncertainty: %lf ms\n", (gdouble)auxf); else g_print (" time uncertainty: n/a\n"); if (qmi_indication_loc_position_report_output_get_time_source (output, &time_source, NULL)) g_print (" time source: %s\n", qmi_loc_time_source_get_string (time_source)); else g_print (" time source: n/a\n"); if (qmi_indication_loc_position_report_output_get_sensor_data_usage (output, &sensor_data_usage, NULL)) { g_autofree gchar *sensor_data_usage_str = NULL; sensor_data_usage_str = qmi_loc_sensor_data_usage_build_string_from_mask (sensor_data_usage); g_print (" sensor data usage: %s\n", VALIDATE_MASK_NONE (sensor_data_usage_str)); } else g_print (" sensor data usage: n/a\n"); if (qmi_indication_loc_position_report_output_get_session_fix_count (output, &aux32, NULL)) g_print (" Fix count: %u\n", aux32); else g_print (" Fix count: n/a\n"); if (qmi_indication_loc_position_report_output_get_satellites_used (output, &array, NULL)) { guint i; g_print (" Satellites used: "); for (i = 0; i < array->len; i++) { guint16 sv_id; /* * - For GPS: 1 to 32 * - For SBAS: 33 to 64 * - For GLONASS: 65 to 96 * - For QZSS: 193 to 197 * - For BDS: 201 to 237 */ sv_id = g_array_index (array, guint16, i); g_print ("%u%s", sv_id, i == array->len - 1 ? "" : ","); } g_print ("\n"); } else g_print (" Satellites used: n/a\n"); if (qmi_indication_loc_position_report_output_get_altitude_assumed (output, &auxb, NULL)) g_print (" Altitude assumed: %s\n", auxb ? "yes" : "no"); else g_print (" Altitude assumed: n/a\n"); /* Terminate GET request */ if (get_position_report_flag) operation_shutdown (TRUE); return; } /* Otherwise, treat as error */ g_printerr ("[position report] error: %s\n", qmi_loc_session_status_get_string (status)); if (get_position_report_flag) operation_shutdown (FALSE); } #endif /* HAVE_QMI_INDICATION_LOC_POSITION_REPORT */ #if (defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT || \ defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO || \ defined HAVE_QMI_INDICATION_LOC_NMEA) && \ defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS static void monitoring_step_ongoing (void) { #if defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT if (get_position_report_flag || follow_position_report_flag) ctx->position_report_indication_id = g_signal_connect (ctx->client, "position-report", G_CALLBACK (position_report_received), NULL); #endif #if defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO if (get_gnss_sv_info_flag || follow_gnss_sv_info_flag) ctx->gnss_sv_info_indication_id = g_signal_connect (ctx->client, "gnss-sv-info", G_CALLBACK (gnss_sv_info_received), NULL); #endif #if defined HAVE_QMI_INDICATION_LOC_NMEA if (follow_nmea_flag) ctx->nmea_indication_id = g_signal_connect (ctx->client, "nmea", G_CALLBACK (nmea_received), NULL); #endif g_assert (ctx->position_report_indication_id || ctx->gnss_sv_info_indication_id || ctx->nmea_indication_id); } static void monitoring_step_setup_timeout (void) { /* User can use Ctrl+C to cancel the monitoring at any time */ g_cancellable_connect (ctx->cancellable, G_CALLBACK (monitoring_cancelled), NULL, NULL); /* For non-follow requests, we also setup a timeout */ if (get_position_report_flag || get_gnss_sv_info_flag) ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) monitoring_timed_out, NULL); /* Go on */ ctx->monitoring_step++; monitoring_step_run (); } static void register_events_ready (QmiClientLoc *client, GAsyncResult *res) { QmiMessageLocRegisterEventsOutput *output; GError *error = NULL; output = qmi_client_loc_register_events_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_loc_register_events_output_get_result (output, &error)) { g_printerr ("error: could not register location tracking events: %s\n", error->message); qmi_message_loc_register_events_output_unref (output); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Registered location tracking events..."); /* Go on */ ctx->monitoring_step++; monitoring_step_run (); qmi_message_loc_register_events_output_unref (output); } static void monitoring_step_register_events (void) { QmiMessageLocRegisterEventsInput *re_input; QmiLocEventRegistrationFlag indication_mask = 0; /* Configure events to enable */ if (get_position_report_flag || follow_position_report_flag) indication_mask |= QMI_LOC_EVENT_REGISTRATION_FLAG_POSITION_REPORT; if (get_gnss_sv_info_flag || follow_gnss_sv_info_flag) indication_mask |= QMI_LOC_EVENT_REGISTRATION_FLAG_GNSS_SATELLITE_INFO; if (follow_nmea_flag) indication_mask |= QMI_LOC_EVENT_REGISTRATION_FLAG_NMEA; g_assert (indication_mask); re_input = qmi_message_loc_register_events_input_new (); qmi_message_loc_register_events_input_set_event_registration_mask ( re_input, indication_mask, NULL); qmi_client_loc_register_events (ctx->client, re_input, 10, ctx->cancellable, (GAsyncReadyCallback) register_events_ready, NULL); qmi_message_loc_register_events_input_unref (re_input); } static void monitoring_step_run (void) { switch (ctx->monitoring_step) { case MONITORING_STEP_FIRST: ctx->monitoring_step++; /* fall through */ case MONITORING_STEP_REGISTER_EVENTS: monitoring_step_register_events (); return; case MONITORING_STEP_SETUP_TIMEOUT: monitoring_step_setup_timeout (); return; case MONITORING_STEP_ONGOING: monitoring_step_ongoing (); return; default: g_assert_not_reached(); } } #endif /* HAVE_QMI_INDICATION_LOC_POSITION_REPORT * HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO * HAVE_QMI_INDICATION_LOC_NMEA */ #if defined HAVE_QMI_MESSAGE_LOC_DELETE_ASSISTANCE_DATA static gboolean delete_assistance_data_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void delete_assistance_data_received (QmiClientLoc *client, QmiIndicationLocDeleteAssistanceDataOutput *output) { QmiLocIndicationStatus status; GError *error = NULL; if (!qmi_indication_loc_delete_assistance_data_output_get_indication_status (output, &status, &error)) { g_printerr ("error: couldn't delete assistance data: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_print ("Successfully deleted assistance data\n"); operation_shutdown (TRUE); } static void delete_assistance_data_ready (QmiClientLoc *client, GAsyncResult *res) { QmiMessageLocDeleteAssistanceDataOutput *output; GError *error = NULL; output = qmi_client_loc_delete_assistance_data_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_loc_delete_assistance_data_output_get_result (output, &error)) { g_printerr ("error: could not delete assistance data: %s\n", error->message); qmi_message_loc_delete_assistance_data_output_unref (output); g_error_free (error); operation_shutdown (FALSE); return; } /* Wait for response asynchronously */ ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) delete_assistance_data_timed_out, NULL); ctx->delete_assistance_data_indication_id = g_signal_connect (ctx->client, "delete-assistance-data", G_CALLBACK (delete_assistance_data_received), NULL); qmi_message_loc_delete_assistance_data_output_unref (output); } #endif /* HAVE_QMI_MESSAGE_LOC_DELETE_ASSISTANCE_DATA */ #if defined HAVE_QMI_MESSAGE_LOC_GET_NMEA_TYPES static gboolean get_nmea_types_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void get_nmea_types_received (QmiClientLoc *client, QmiIndicationLocGetNmeaTypesOutput *output) { QmiLocIndicationStatus status; QmiLocNmeaType nmea_types_mask; g_autoptr(GError) error = NULL; g_autofree gchar *nmea_types_str = NULL; if (!qmi_indication_loc_get_nmea_types_output_get_indication_status (output, &status, &error)) { g_printerr ("error: couldn't get NMEA types: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_indication_loc_get_nmea_types_output_get_nmea_types (output, &nmea_types_mask, NULL)) { g_printerr ("error: couldn't get NMEA types: missing\n"); operation_shutdown (FALSE); return; } nmea_types_str = qmi_loc_nmea_type_build_string_from_mask (nmea_types_mask); g_print ("Successfully retrieved NMEA types: %s\n", VALIDATE_MASK_NONE (nmea_types_str)); operation_shutdown (TRUE); } static void get_nmea_types_ready (QmiClientLoc *client, GAsyncResult *res) { g_autoptr(QmiMessageLocGetNmeaTypesOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_loc_get_nmea_types_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_loc_get_nmea_types_output_get_result (output, &error)) { g_printerr ("error: could not get NMEA types: %s\n", error->message); operation_shutdown (FALSE); return; } /* Wait for response asynchronously */ ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) get_nmea_types_timed_out, NULL); ctx->get_nmea_types_indication_id = g_signal_connect (ctx->client, "get-nmea-types", G_CALLBACK (get_nmea_types_received), NULL); } #endif /* HAVE_QMI_MESSAGE_LOC_GET_NMEA_TYPES */ #if defined HAVE_QMI_MESSAGE_LOC_SET_NMEA_TYPES static gboolean set_nmea_types_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void set_nmea_types_received (QmiClientLoc *client, QmiIndicationLocSetNmeaTypesOutput *output) { QmiLocIndicationStatus status; g_autoptr(GError) error = NULL; if (!qmi_indication_loc_set_nmea_types_output_get_indication_status (output, &status, &error)) { g_printerr ("error: couldn't set NMEA types: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Successfully set NMEA types\n"); operation_shutdown (TRUE); } static void set_nmea_types_ready (QmiClientLoc *client, GAsyncResult *res) { g_autoptr(QmiMessageLocSetNmeaTypesOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_loc_set_nmea_types_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_loc_set_nmea_types_output_get_result (output, &error)) { g_printerr ("error: could not set NMEA types: %s\n", error->message); operation_shutdown (FALSE); return; } /* Wait for response asynchronously */ ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) set_nmea_types_timed_out, NULL); ctx->set_nmea_types_indication_id = g_signal_connect (ctx->client, "set-nmea-types", G_CALLBACK (set_nmea_types_received), NULL); } static QmiMessageLocSetNmeaTypesInput * set_nmea_types_input_create (const gchar *str) { g_autoptr(QmiMessageLocSetNmeaTypesInput) input = NULL; g_autoptr(GError) error = NULL; QmiLocNmeaType nmea_type_mask; if (!qmicli_read_loc_nmea_type_from_string (str, &nmea_type_mask)) { g_printerr ("error: couldn't parse input string as NMEA types: '%s'\n", str); return NULL; } input = qmi_message_loc_set_nmea_types_input_new (); if (!qmi_message_loc_set_nmea_types_input_set_nmea_types (input, nmea_type_mask, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } #endif /* HAVE_QMI_MESSAGE_LOC_SET_NMEA_TYPES */ #if defined HAVE_QMI_MESSAGE_LOC_GET_OPERATION_MODE static gboolean get_operation_mode_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void get_operation_mode_received (QmiClientLoc *client, QmiIndicationLocGetOperationModeOutput *output) { QmiLocIndicationStatus status; QmiLocOperationMode operation_mode; g_autoptr(GError) error = NULL; if (!qmi_indication_loc_get_operation_mode_output_get_indication_status (output, &status, &error)) { g_printerr ("error: couldn't get operation mode %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_indication_loc_get_operation_mode_output_get_operation_mode (output, &operation_mode, NULL)) { g_printerr ("error: couldn't get operation mode: missing\n"); operation_shutdown (FALSE); return; } g_print ("Successfully retrieved operation mode: %s\n", qmi_loc_operation_mode_get_string (operation_mode)); operation_shutdown (TRUE); } static void get_operation_mode_ready (QmiClientLoc *client, GAsyncResult *res) { g_autoptr(QmiMessageLocGetOperationModeOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_loc_get_operation_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_loc_get_operation_mode_output_get_result (output, &error)) { g_printerr ("error: could not get operation mode: %s\n", error->message); operation_shutdown (FALSE); return; } /* Wait for response asynchronously */ ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) get_operation_mode_timed_out, NULL); ctx->get_operation_mode_indication_id = g_signal_connect (ctx->client, "get-operation-mode", G_CALLBACK (get_operation_mode_received), NULL); } #endif /* HAVE_QMI_MESSAGE_LOC_GET_OPERATION_MODE */ #if defined HAVE_QMI_MESSAGE_LOC_SET_OPERATION_MODE static gboolean set_operation_mode_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void set_operation_mode_received (QmiClientLoc *client, QmiIndicationLocSetOperationModeOutput *output) { QmiLocIndicationStatus status; g_autoptr(GError) error = NULL; if (!qmi_indication_loc_set_operation_mode_output_get_indication_status (output, &status, &error)) { g_printerr ("error: couldn't set operation mode: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Successfully set operation mode\n"); operation_shutdown (TRUE); } static void set_operation_mode_ready (QmiClientLoc *client, GAsyncResult *res) { g_autoptr(QmiMessageLocSetOperationModeOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_loc_set_operation_mode_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_loc_set_operation_mode_output_get_result (output, &error)) { g_printerr ("error: could not set operation mode: %s\n", error->message); operation_shutdown (FALSE); return; } /* Wait for response asynchronously */ ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) set_operation_mode_timed_out, NULL); ctx->set_operation_mode_indication_id = g_signal_connect (ctx->client, "set-operation-mode", G_CALLBACK (set_operation_mode_received), NULL); } static QmiMessageLocSetOperationModeInput * set_operation_mode_input_create (const gchar *str) { g_autoptr(QmiMessageLocSetOperationModeInput) input = NULL; g_autoptr(GError) error = NULL; QmiLocOperationMode operation_mode; if (!qmicli_read_loc_operation_mode_from_string (str, &operation_mode)) return NULL; input = qmi_message_loc_set_operation_mode_input_new (); if (!qmi_message_loc_set_operation_mode_input_set_operation_mode (input, operation_mode, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } #endif /* HAVE_QMI_MESSAGE_LOC_SET_OPERATION_MODE */ #if defined HAVE_QMI_MESSAGE_LOC_GET_ENGINE_LOCK static gboolean get_engine_lock_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void get_engine_lock_received (QmiClientLoc *client, QmiIndicationLocGetEngineLockOutput *output) { QmiLocIndicationStatus status; QmiLocLockType type; g_autoptr(GError) error = NULL; if (!qmi_indication_loc_get_engine_lock_output_get_indication_status (output, &status, &error)) { g_printerr ("error: couldn't get engine lock %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_indication_loc_get_engine_lock_output_get_lock_type (output, &type, NULL)) { g_printerr ("error: couldn't get engine lock: missing\n"); operation_shutdown (FALSE); return; } g_print ("Successfully retrieved engine lock: %s\n", qmi_loc_lock_type_get_string (type)); operation_shutdown (TRUE); } static void get_engine_lock_ready (QmiClientLoc *client, GAsyncResult *res) { g_autoptr(QmiMessageLocGetEngineLockOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_loc_get_engine_lock_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_loc_get_engine_lock_output_get_result (output, &error)) { g_printerr ("error: could not get engine lock: %s\n", error->message); operation_shutdown (FALSE); return; } /* Wait for response asynchronously */ ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) get_engine_lock_timed_out, NULL); ctx->get_engine_lock_indication_id = g_signal_connect (ctx->client, "get-engine-lock", G_CALLBACK (get_engine_lock_received), NULL); } #endif /* HAVE_QMI_MESSAGE_LOC_GET_ENGINE_LOCK */ #if defined HAVE_QMI_MESSAGE_LOC_SET_ENGINE_LOCK static gboolean set_engine_lock_timed_out (void) { ctx->timeout_id = 0; g_printerr ("error: operation failed: timeout\n"); operation_shutdown (FALSE); return G_SOURCE_REMOVE; } static void set_engine_lock_received (QmiClientLoc *client, QmiIndicationLocSetEngineLockOutput *output) { QmiLocIndicationStatus status; g_autoptr(GError) error = NULL; if (!qmi_indication_loc_set_engine_lock_output_get_indication_status (output, &status, &error)) { g_printerr ("error: couldn't set engine lock: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Successfully set engine lock\n"); operation_shutdown (TRUE); } static void set_engine_lock_ready (QmiClientLoc *client, GAsyncResult *res) { g_autoptr(QmiMessageLocSetEngineLockOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_loc_set_engine_lock_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_loc_set_engine_lock_output_get_result (output, &error)) { g_printerr ("error: could not set engine lock: %s\n", error->message); operation_shutdown (FALSE); return; } /* Wait for response asynchronously */ ctx->timeout_id = g_timeout_add_seconds (timeout > 0 ? timeout : DEFAULT_LOC_TIMEOUT_SECS, (GSourceFunc) set_engine_lock_timed_out, NULL); ctx->set_engine_lock_indication_id = g_signal_connect (ctx->client, "set-engine-lock", G_CALLBACK (set_engine_lock_received), NULL); } static QmiMessageLocSetEngineLockInput * set_engine_lock_input_create (const gchar *str) { g_autoptr(QmiMessageLocSetEngineLockInput) input = NULL; g_autoptr(GError) error = NULL; QmiLocLockType type; if (!qmicli_read_loc_lock_type_from_string (str, &type)) return NULL; input = qmi_message_loc_set_engine_lock_input_new (); if (!qmi_message_loc_set_engine_lock_input_set_lock_type (input, type, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } #endif /* HAVE_QMI_MESSAGE_LOC_SET_ENGINE_LOCK */ #if defined HAVE_QMI_MESSAGE_LOC_STOP static void stop_ready (QmiClientLoc *client, GAsyncResult *res) { QmiMessageLocStopOutput *output; GError *error = NULL; output = qmi_client_loc_stop_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_loc_stop_output_get_result (output, &error)) { g_printerr ("error: could not stop location tracking: %s\n", error->message); qmi_message_loc_stop_output_unref (output); g_error_free (error); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully stopped location tracking (session id %u)\n", qmi_device_get_path_display (ctx->device), session_id); qmi_message_loc_stop_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_LOC_STOP */ #if defined HAVE_QMI_MESSAGE_LOC_START static void start_ready (QmiClientLoc *client, GAsyncResult *res) { QmiMessageLocStartOutput *output; GError *error = NULL; output = qmi_client_loc_start_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_loc_start_output_get_result (output, &error)) { g_printerr ("error: could not start location tracking: %s\n", error->message); qmi_message_loc_start_output_unref (output); g_error_free (error); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully started location tracking (session id %u)\n", qmi_device_get_path_display (ctx->device), session_id); qmi_message_loc_start_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_LOC_START */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return G_SOURCE_REMOVE; } void qmicli_loc_run (QmiDevice *device, QmiClientLoc *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new0 (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_LOC_START if (start_flag) { QmiMessageLocStartInput *input; input = qmi_message_loc_start_input_new (); qmi_message_loc_start_input_set_session_id (input, (guint8) session_id, NULL); qmi_message_loc_start_input_set_intermediate_report_state (input, QMI_LOC_INTERMEDIATE_REPORT_STATE_ENABLE, NULL); qmi_message_loc_start_input_set_minimum_interval_between_position_reports (input, 1000, NULL); qmi_message_loc_start_input_set_fix_recurrence_type (input, QMI_LOC_FIX_RECURRENCE_TYPE_REQUEST_PERIODIC_FIXES, NULL); qmi_client_loc_start (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) start_ready, NULL); qmi_message_loc_start_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_STOP if (stop_flag) { QmiMessageLocStopInput *input; input = qmi_message_loc_stop_input_new (); qmi_message_loc_stop_input_set_session_id (input, (guint8) session_id, NULL); qmi_client_loc_stop (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) stop_ready, NULL); qmi_message_loc_stop_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_DELETE_ASSISTANCE_DATA if (delete_assistance_data_flag) { QmiMessageLocDeleteAssistanceDataInput *input; input = qmi_message_loc_delete_assistance_data_input_new (); qmi_message_loc_delete_assistance_data_input_set_delete_all (input, TRUE, NULL); qmi_client_loc_delete_assistance_data (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) delete_assistance_data_ready, NULL); qmi_message_loc_delete_assistance_data_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_GET_NMEA_TYPES if (get_nmea_types_flag) { qmi_client_loc_get_nmea_types (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback) get_nmea_types_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_SET_NMEA_TYPES if (set_nmea_types_str) { g_autoptr(QmiMessageLocSetNmeaTypesInput) input = NULL; g_debug ("Asynchronously setting APN type..."); input = set_nmea_types_input_create (set_nmea_types_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_loc_set_nmea_types (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_nmea_types_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_GET_OPERATION_MODE if (get_operation_mode_flag) { qmi_client_loc_get_operation_mode (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback) get_operation_mode_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_SET_OPERATION_MODE if (set_operation_mode_str) { g_autoptr(QmiMessageLocSetOperationModeInput) input = NULL; g_debug ("Asynchronously setting operation mode..."); input = set_operation_mode_input_create (set_operation_mode_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_loc_set_operation_mode (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_operation_mode_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_GET_ENGINE_LOCK if (get_engine_lock_flag) { qmi_client_loc_get_engine_lock (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback) get_engine_lock_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_LOC_SET_ENGINE_LOCK if (set_engine_lock_str) { g_autoptr(QmiMessageLocSetEngineLockInput) input = NULL; g_debug ("Asynchronously setting engine lock..."); input = set_engine_lock_input_create (set_engine_lock_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_loc_set_engine_lock (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_engine_lock_ready, NULL); return; } #endif #if (defined HAVE_QMI_INDICATION_LOC_POSITION_REPORT || \ defined HAVE_QMI_INDICATION_LOC_GNSS_SV_INFO || \ defined HAVE_QMI_INDICATION_LOC_NMEA) && \ defined HAVE_QMI_MESSAGE_LOC_REGISTER_EVENTS if (get_position_report_flag || get_gnss_sv_info_flag || follow_position_report_flag || follow_gnss_sv_info_flag || follow_nmea_flag) { /* All the remaining actions require monitoring */ ctx->monitoring_step = MONITORING_STEP_FIRST; monitoring_step_run (); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_LOC */ libqmi-1.35.2-dev/src/qmicli/qmicli-nas.c000066400000000000000000005462231455567757300201450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_NAS #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") /* Context */ typedef struct { QmiDevice *device; QmiClientNas *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_signal_strength_flag; static gboolean get_signal_info_flag; static gchar *get_tx_rx_info_str; static gboolean get_home_network_flag; static gboolean get_serving_system_flag; static gboolean get_system_info_flag; static gboolean get_technology_preference_flag; static gboolean get_preferred_networks_flag; static gchar *set_preferred_networks_str; static gboolean get_system_selection_preference_flag; static gchar *set_system_selection_preference_str; static gchar *get_plmn_name_str; static gboolean network_scan_flag; static gboolean get_cell_location_info_flag; static gboolean force_network_search_flag; static gboolean get_operator_name_flag; static gboolean get_lte_cphy_ca_info_flag; static gboolean get_rf_band_info_flag; static gboolean get_drx_flag; static gboolean get_supported_messages_flag; static gboolean swi_get_status_flag; static gboolean reset_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH { "nas-get-signal-strength", 0, 0, G_OPTION_ARG_NONE, &get_signal_strength_flag, "Get signal strength", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_INFO { "nas-get-signal-info", 0, 0, G_OPTION_ARG_NONE, &get_signal_info_flag, "Get signal info", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_TX_RX_INFO { "nas-get-tx-rx-info", 0, 0, G_OPTION_ARG_STRING, &get_tx_rx_info_str, "Get TX/RX info", "[(Radio Interface)]", }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK { "nas-get-home-network", 0, 0, G_OPTION_ARG_NONE, &get_home_network_flag, "Get home network", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SERVING_SYSTEM { "nas-get-serving-system", 0, 0, G_OPTION_ARG_NONE, &get_serving_system_flag, "Get serving system", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO { "nas-get-system-info", 0, 0, G_OPTION_ARG_NONE, &get_system_info_flag, "Get system info", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_TECHNOLOGY_PREFERENCE { "nas-get-technology-preference", 0, 0, G_OPTION_ARG_NONE, &get_technology_preference_flag, "Get technology preference", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_PREFERRED_NETWORKS { "nas-get-preferred-networks", 0, 0, G_OPTION_ARG_NONE, &get_preferred_networks_flag, "Get preferred networks", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_SET_PREFERRED_NETWORKS { "nas-set-preferred-networks", 0, 0, G_OPTION_ARG_STRING, &set_preferred_networks_str, "Set preferred networks list", "[[MCCMNC,access_tech],...]" }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_SELECTION_PREFERENCE { "nas-get-system-selection-preference", 0, 0, G_OPTION_ARG_NONE, &get_system_selection_preference_flag, "Get system selection preference", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE { "nas-set-system-selection-preference", 0, 0, G_OPTION_ARG_STRING, &set_system_selection_preference_str, "Set system selection preference", "[cdma-1x|cdma-1xevdo|gsm|umts|lte|td-scdma][,[automatic|manual=MCCMNC]]" }, #endif #if defined HAVE_QMI_MESSAGE_NAS_NETWORK_SCAN { "nas-network-scan", 0, 0, G_OPTION_ARG_NONE, &network_scan_flag, "Scan networks", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO { "nas-get-cell-location-info", 0, 0, G_OPTION_ARG_NONE, &get_cell_location_info_flag, "Get Cell Location Info", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_FORCE_NETWORK_SEARCH { "nas-force-network-search", 0, 0, G_OPTION_ARG_NONE, &force_network_search_flag, "Force network search", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME { "nas-get-operator-name", 0, 0, G_OPTION_ARG_NONE, &get_operator_name_flag, "Get operator name data", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_PLMN_NAME { "nas-get-plmn-name", 0, 0, G_OPTION_ARG_STRING, &get_plmn_name_str, "Get plmn name data", "[mccmnc]" }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_LTE_CPHY_CA_INFO { "nas-get-lte-cphy-ca-info", 0, 0, G_OPTION_ARG_NONE, &get_lte_cphy_ca_info_flag, "Get LTE Cphy CA Info", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_RF_BAND_INFORMATION { "nas-get-rf-band-info", 0, 0, G_OPTION_ARG_NONE, &get_rf_band_info_flag, "Get RF Band Info", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_DRX { "nas-get-drx", 0, 0, G_OPTION_ARG_NONE, &get_drx_flag, "Get DRX", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SUPPORTED_MESSAGES { "nas-get-supported-messages", 0, 0, G_OPTION_ARG_NONE, &get_supported_messages_flag, "Get supported messages", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS { "nas-swi-get-status", 0, 0, G_OPTION_ARG_NONE, &swi_get_status_flag, "Get status ((Sierra Wireless specific)", NULL }, #endif #if defined HAVE_QMI_MESSAGE_NAS_RESET { "nas-reset", 0, 0, G_OPTION_ARG_NONE, &reset_flag, "Reset the service state", NULL }, #endif { "nas-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a NAS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_nas_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("nas", "NAS options:", "Show Network Access Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_nas_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_signal_strength_flag + get_signal_info_flag + !!get_tx_rx_info_str + get_home_network_flag + get_serving_system_flag + get_system_info_flag + get_technology_preference_flag + get_preferred_networks_flag + !!set_preferred_networks_str + get_system_selection_preference_flag + !!set_system_selection_preference_str + !!get_plmn_name_str + network_scan_flag + get_cell_location_info_flag + force_network_search_flag + get_operator_name_flag + get_lte_cphy_ca_info_flag + get_rf_band_info_flag + get_drx_flag + get_supported_messages_flag + swi_get_status_flag + reset_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many NAS actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_INFO || \ defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH static gboolean get_db_from_sinr_level (QmiNasEvdoSinrLevel level, gdouble *out) { g_assert (out != NULL); switch (level) { case QMI_NAS_EVDO_SINR_LEVEL_0: *out = -9.0; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_1: *out = -6.0; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_2: *out = -4.5; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_3: *out = -3.0; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_4: *out = -2.0; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_5: *out = 1.0; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_6: *out = 3.0; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_7: *out = 6.0; return TRUE; case QMI_NAS_EVDO_SINR_LEVEL_8: *out = 9.0; return TRUE; default: g_warning ("Invalid SINR level '%u'", level); return FALSE; } } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_INFO * HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_INFO static void get_signal_info_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetSignalInfoOutput *output; GError *error = NULL; gint8 rssi; gint16 ecio; QmiNasEvdoSinrLevel sinr_level; gint32 io; gint8 rsrq; gint16 rsrp; gint16 snr; gint8 rscp; gint16 wcdma_rscp; gint16 rsrq_5g; gint32 rssi_tdma; gint32 rscp_tdma; gint32 ecio_tdma; gint32 sinr_tdma; output = qmi_client_nas_get_signal_info_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_signal_info_output_get_result (output, &error)) { g_printerr ("error: couldn't get signal info: %s\n", error->message); g_error_free (error); qmi_message_nas_get_signal_info_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got signal info\n", qmi_device_get_path_display (ctx->device)); /* CDMA... */ if (qmi_message_nas_get_signal_info_output_get_cdma_signal_strength (output, &rssi, &ecio, NULL)) { g_print ("CDMA:\n" "\tRSSI: '%d dBm'\n" "\tECIO: '%.1lf dBm'\n", rssi, (-0.5)*((gdouble)ecio)); } /* HDR... */ if (qmi_message_nas_get_signal_info_output_get_hdr_signal_strength (output, &rssi, &ecio, &sinr_level, &io, NULL)) { gdouble db_sinr = 0.0; g_print ("HDR:\n" "\tRSSI: '%d dBm'\n" "\tECIO: '%.1lf dBm'\n" "\tIO: '%d dBm'\n", rssi, (-0.5)*((gdouble)ecio), io); if (get_db_from_sinr_level (sinr_level, &db_sinr)) g_print ("\tSINR (%u): '%.1lf dB'\n", sinr_level, db_sinr); else g_print ("\tSINR (%u): N/A'\n", sinr_level); } /* GSM */ if (qmi_message_nas_get_signal_info_output_get_gsm_signal_strength (output, &rssi, NULL)) { g_print ("GSM:\n" "\tRSSI: '%d dBm'\n", rssi); } /* WCDMA... */ if (qmi_message_nas_get_signal_info_output_get_wcdma_signal_strength (output, &rssi, &ecio, NULL)) { g_print ("WCDMA:\n" "\tRSSI: '%d dBm'\n" "\tECIO: '%.1lf dBm'\n", rssi, (-0.5)*((gdouble)ecio)); } /* WCDMA Signal Code Power... */ if (qmi_message_nas_get_signal_info_output_get_wcdma_rscp (output, &wcdma_rscp, NULL)) { g_print ("\tRSCP: '%d dBm'\n", (-1)*wcdma_rscp); } /* LTE... */ if (qmi_message_nas_get_signal_info_output_get_lte_signal_strength (output, &rssi, &rsrq, &rsrp, &snr, NULL)) { g_print ("LTE:\n" "\tRSSI: '%d dBm'\n" "\tRSRQ: '%d dB'\n" "\tRSRP: '%d dBm'\n" "\tSNR: '%.1lf dB'\n", rssi, rsrq, rsrp, (0.1) * ((gdouble)snr)); } /* TDMA */ if (qmi_message_nas_get_signal_info_output_get_tdma_signal_strength (output, &rscp, NULL)) { g_print ("TDMA:\n" "\tRSCP: '%d dBm'\n", rscp); } /* TDMA extended */ if (qmi_message_nas_get_signal_info_output_get_tdma_signal_strength_extended (output, &rssi_tdma, &rscp_tdma, &ecio_tdma, &sinr_tdma, NULL)) { g_print ("\tRSSI: '%d dB'\n" "\tRSCP: '%d dBm'\n" "\tECIO: '%d dBm'\n" "\tSINR: '%d dB'\n", rssi_tdma, rscp_tdma, ecio_tdma, sinr_tdma); } /* 5G, values of -32768 in EN-DC mode indicate the modem is not connected... */ if (qmi_message_nas_get_signal_info_output_get_5g_signal_strength (output, &rsrp, &snr, NULL)) { g_print ("5G:\n"); if (rsrp == (gint16)(0x8000)) g_print ("\tRSRP: 'n/a'\n"); else g_print ("\tRSRP: '%d dBm'\n", rsrp); if (snr == (gint16)(0x8000)) g_print ("\tSNR: 'n/a'\n"); else g_print ("\tSNR: '%.1lf dB'\n", (0.1) * ((gdouble)snr)); } /* 5G extended... */ if (qmi_message_nas_get_signal_info_output_get_5g_signal_strength_extended (output, &rsrq_5g, NULL)) { if (rsrq_5g == (gint16)(0x8000)) g_print ("\tRSRQ: 'n/a'\n"); else g_print ("\tRSRQ: '%d dB'\n", rsrq_5g); } qmi_message_nas_get_signal_info_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_INFO */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH static QmiMessageNasGetSignalStrengthInput * get_signal_strength_input_create (void) { GError *error = NULL; QmiMessageNasGetSignalStrengthInput *input; QmiNasSignalStrengthRequest mask; mask = (QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI | QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO | QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO | QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR | QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ | QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR | QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP); input = qmi_message_nas_get_signal_strength_input_new (); if (!qmi_message_nas_get_signal_strength_input_set_request_mask ( input, mask, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_nas_get_signal_strength_input_unref (input); input = NULL; } return input; } static void get_signal_strength_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetSignalStrengthOutput *output; GError *error = NULL; GArray *array; QmiNasRadioInterface radio_interface; gint8 strength; gint32 io; QmiNasEvdoSinrLevel sinr_level; gint8 rsrq; gint16 rsrp; gint16 snr; output = qmi_client_nas_get_signal_strength_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_signal_strength_output_get_result (output, &error)) { g_printerr ("error: couldn't get signal strength: %s\n", error->message); g_error_free (error); qmi_message_nas_get_signal_strength_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_nas_get_signal_strength_output_get_signal_strength (output, &strength, &radio_interface, NULL); g_print ("[%s] Successfully got signal strength\n" "Current:\n" "\tNetwork '%s': '%d dBm'\n", qmi_device_get_path_display (ctx->device), qmi_nas_radio_interface_get_string (radio_interface), strength); /* Other signal strengths in other networks... */ if (qmi_message_nas_get_signal_strength_output_get_strength_list (output, &array, NULL)) { guint i; g_print ("Other:\n"); for (i = 0; i < array->len; i++) { QmiMessageNasGetSignalStrengthOutputStrengthListElement *element; element = &g_array_index (array, QmiMessageNasGetSignalStrengthOutputStrengthListElement, i); g_print ("\tNetwork '%s': '%d dBm'\n", qmi_nas_radio_interface_get_string (element->radio_interface), element->strength); } } /* RSSI... */ if (qmi_message_nas_get_signal_strength_output_get_rssi_list (output, &array, NULL)) { guint i; g_print ("RSSI:\n"); for (i = 0; i < array->len; i++) { QmiMessageNasGetSignalStrengthOutputRssiListElement *element; element = &g_array_index (array, QmiMessageNasGetSignalStrengthOutputRssiListElement, i); g_print ("\tNetwork '%s': '%d dBm'\n", qmi_nas_radio_interface_get_string (element->radio_interface), (-1) * element->rssi); } } /* ECIO... */ if (qmi_message_nas_get_signal_strength_output_get_ecio_list (output, &array, NULL)) { guint i; g_print ("ECIO:\n"); for (i = 0; i < array->len; i++) { QmiMessageNasGetSignalStrengthOutputEcioListElement *element; element = &g_array_index (array, QmiMessageNasGetSignalStrengthOutputEcioListElement, i); g_print ("\tNetwork '%s': '%.1lf dBm'\n", qmi_nas_radio_interface_get_string (element->radio_interface), (-0.5) * ((gdouble)element->ecio)); } } /* IO... */ if (qmi_message_nas_get_signal_strength_output_get_io (output, &io, NULL)) { g_print ("IO: '%d dBm'\n", io); } /* SINR level */ if (qmi_message_nas_get_signal_strength_output_get_sinr (output, &sinr_level, NULL)) { gdouble db_sinr = 0.0; if (get_db_from_sinr_level (sinr_level, &db_sinr)) g_print ("SINR (%u): '%.1lf dB'\n", sinr_level, db_sinr); else g_print ("SINR (%u): N/A'\n", sinr_level); } /* RSRQ */ if (qmi_message_nas_get_signal_strength_output_get_rsrq (output, &rsrq, &radio_interface, NULL)) { g_print ("RSRQ:\n" "\tNetwork '%s': '%d dB'\n", qmi_nas_radio_interface_get_string (radio_interface), rsrq); } /* LTE SNR */ if (qmi_message_nas_get_signal_strength_output_get_lte_snr (output, &snr, NULL)) { g_print ("SNR:\n" "\tNetwork '%s': '%.1lf dB'\n", qmi_nas_radio_interface_get_string (QMI_NAS_RADIO_INTERFACE_LTE), (0.1) * ((gdouble)snr)); } /* LTE RSRP */ if (qmi_message_nas_get_signal_strength_output_get_lte_rsrp (output, &rsrp, NULL)) { g_print ("RSRP:\n" "\tNetwork '%s': '%d dBm'\n", qmi_nas_radio_interface_get_string (QMI_NAS_RADIO_INTERFACE_LTE), rsrp); } /* Just skip others for now */ qmi_message_nas_get_signal_strength_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH */ #if defined HAVE_QMI_MESSAGE_NAS_GET_TX_RX_INFO static void get_tx_rx_info_ready (QmiClientNas *client, GAsyncResult *res, gpointer user_data) { QmiNasRadioInterface interface; QmiMessageNasGetTxRxInfoOutput *output; GError *error = NULL; gboolean is_radio_tuned; gboolean is_in_traffic; gint32 power; gint32 ecio; gint32 rscp; gint32 rsrp; guint32 phase; interface = GPOINTER_TO_UINT (user_data); output = qmi_client_nas_get_tx_rx_info_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_tx_rx_info_output_get_result (output, &error)) { g_printerr ("error: couldn't get TX/RX info: %s\n", error->message); g_error_free (error); qmi_message_nas_get_tx_rx_info_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got TX/RX info\n", qmi_device_get_path_display (ctx->device)); /* RX Channel 0 */ if (qmi_message_nas_get_tx_rx_info_output_get_rx_chain_0_info ( output, &is_radio_tuned, &power, &ecio, &rscp, &rsrp, &phase, NULL)) { g_print ("RX Chain 0:\n" "\tRadio tuned: '%s'\n" "\tPower: '%.1lf dBm'\n", is_radio_tuned ? "yes" : "no", (0.1) * ((gdouble)power)); if (interface == QMI_NAS_RADIO_INTERFACE_CDMA_1X || interface == QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO || interface == QMI_NAS_RADIO_INTERFACE_GSM || interface == QMI_NAS_RADIO_INTERFACE_UMTS || interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tECIO: '%.1lf dB'\n", (0.1) * ((gdouble)ecio)); if (interface == QMI_NAS_RADIO_INTERFACE_UMTS) g_print ("\tRSCP: '%.1lf dBm'\n", (0.1) * ((gdouble)rscp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tRSRP: '%.1lf dBm'\n", (0.1) * ((gdouble)rsrp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) { if (phase == 0xFFFFFFFF) g_print ("\tPhase: 'unknown'\n"); else g_print ("\tPhase: '%.2lf degrees'\n", (0.01) * ((gdouble)phase)); } } /* RX Channel 1 */ if (qmi_message_nas_get_tx_rx_info_output_get_rx_chain_1_info ( output, &is_radio_tuned, &power, &ecio, &rscp, &rsrp, &phase, NULL)) { g_print ("RX Chain 1:\n" "\tRadio tuned: '%s'\n" "\tPower: '%.1lf dBm'\n", is_radio_tuned ? "yes" : "no", (0.1) * ((gdouble)power)); if (interface == QMI_NAS_RADIO_INTERFACE_CDMA_1X || interface == QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO || interface == QMI_NAS_RADIO_INTERFACE_GSM || interface == QMI_NAS_RADIO_INTERFACE_UMTS || interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tECIO: '%.1lf dB'\n", (0.1) * ((gdouble)ecio)); if (interface == QMI_NAS_RADIO_INTERFACE_UMTS) g_print ("\tRSCP: '%.1lf dBm'\n", (0.1) * ((gdouble)rscp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tRSRP: '%.1lf dBm'\n", (0.1) * ((gdouble)rsrp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) { if (phase == 0xFFFFFFFF) g_print ("\tPhase: 'unknown'\n"); else g_print ("\tPhase: '%.2lf degrees'\n", (0.01) * ((gdouble)phase)); } } /* RX Channel 2 */ if (qmi_message_nas_get_tx_rx_info_output_get_rx_chain_2_info ( output, &is_radio_tuned, &power, &ecio, &rscp, &rsrp, &phase, NULL)) { g_print ("RX Chain 2:\n" "\tRadio tuned: '%s'\n" "\tPower: '%.1lf dBm'\n", is_radio_tuned ? "yes" : "no", (0.1) * ((gdouble)power)); if (interface == QMI_NAS_RADIO_INTERFACE_CDMA_1X || interface == QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO || interface == QMI_NAS_RADIO_INTERFACE_GSM || interface == QMI_NAS_RADIO_INTERFACE_UMTS || interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tECIO: '%.1lf dB'\n", (0.1) * ((gdouble)ecio)); if (interface == QMI_NAS_RADIO_INTERFACE_UMTS) g_print ("\tRSCP: '%.1lf dBm'\n", (0.1) * ((gdouble)rscp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tRSRP: '%.1lf dBm'\n", (0.1) * ((gdouble)rsrp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) { if (phase == 0xFFFFFFFF) g_print ("\tPhase: 'unknown'\n"); else g_print ("\tPhase: '%.2lf degrees'\n", (0.01) * ((gdouble)phase)); } } /* RX Channel 3 */ if (qmi_message_nas_get_tx_rx_info_output_get_rx_chain_3_info ( output, &is_radio_tuned, &power, &ecio, &rscp, &rsrp, &phase, NULL)) { g_print ("RX Chain 3:\n" "\tRadio tuned: '%s'\n" "\tPower: '%.1lf dBm'\n", is_radio_tuned ? "yes" : "no", (0.1) * ((gdouble)power)); if (interface == QMI_NAS_RADIO_INTERFACE_CDMA_1X || interface == QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO || interface == QMI_NAS_RADIO_INTERFACE_GSM || interface == QMI_NAS_RADIO_INTERFACE_UMTS || interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tECIO: '%.1lf dB'\n", (0.1) * ((gdouble)ecio)); if (interface == QMI_NAS_RADIO_INTERFACE_UMTS) g_print ("\tRSCP: '%.1lf dBm'\n", (0.1) * ((gdouble)rscp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) g_print ("\tRSRP: '%.1lf dBm'\n", (0.1) * ((gdouble)rsrp)); if (interface == QMI_NAS_RADIO_INTERFACE_LTE || interface == QMI_NAS_RADIO_INTERFACE_5GNR) { if (phase == 0xFFFFFFFF) g_print ("\tPhase: 'unknown'\n"); else g_print ("\tPhase: '%.2lf degrees'\n", (0.01) * ((gdouble)phase)); } } /* TX Channel */ if (qmi_message_nas_get_tx_rx_info_output_get_tx_info ( output, &is_in_traffic, &power, NULL)) { g_print ("TX:\n"); if (is_in_traffic) g_print ("\tIn traffic: 'yes'\n" "\tPower: '%.1lf dBm'\n", (0.1) * ((gdouble)power)); else g_print ("\tIn traffic: 'no'\n"); } qmi_message_nas_get_tx_rx_info_output_unref (output); operation_shutdown (TRUE); } static QmiMessageNasGetTxRxInfoInput * get_tx_rx_info_input_create (const gchar *str, QmiNasRadioInterface *interface) { QmiMessageNasGetTxRxInfoInput *input = NULL; g_assert (interface != NULL); if (qmicli_read_nas_radio_interface_from_string (str, interface)) { GError *error = NULL; input = qmi_message_nas_get_tx_rx_info_input_new (); if (!qmi_message_nas_get_tx_rx_info_input_set_radio_interface ( input, *interface, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_nas_get_tx_rx_info_input_unref (input); input = NULL; } } return input; } #endif /* HAVE_QMI_MESSAGE_NAS_GET_TX_RX_INFO */ #if defined HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK static void get_home_network_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetHomeNetworkOutput *output; GError *error = NULL; output = qmi_client_nas_get_home_network_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_home_network_output_get_result (output, &error)) { g_printerr ("error: couldn't get home network: %s\n", error->message); g_error_free (error); qmi_message_nas_get_home_network_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got home network:\n", qmi_device_get_path_display (ctx->device)); { guint16 mcc; guint16 mnc; const gchar *description; qmi_message_nas_get_home_network_output_get_home_network ( output, &mcc, &mnc, &description, NULL); g_print ("\tHome network:\n" "\t\tMCC: '%" G_GUINT16_FORMAT"'\n" "\t\tMNC: '%" G_GUINT16_FORMAT"'\n" "\t\tDescription: '%s'\n", mcc, mnc, description); } { QmiNasNetworkNameSource network_name_source; if (qmi_message_nas_get_home_network_output_get_network_name_source ( output, &network_name_source, NULL)) { g_print ("\tNetwork name source: %s\n", qmi_nas_network_name_source_get_string (network_name_source)); } } { guint16 sid; guint16 nid; if (qmi_message_nas_get_home_network_output_get_home_system_id ( output, &sid, &nid, NULL)) { g_print ("\t\tSID: '%" G_GUINT16_FORMAT"'\n" "\t\tNID: '%" G_GUINT16_FORMAT"'\n", sid, nid); } } { guint16 mcc; guint16 mnc; QmiNasNetworkDescriptionEncoding description_encoding; GArray *description_array; if (qmi_message_nas_get_home_network_output_get_home_network_3gpp2_ext ( output, &mcc, &mnc, NULL, /* display_description */ &description_encoding, &description_array, NULL)) { g_autofree gchar *description = NULL; description = qmi_nas_read_string_from_network_description_encoded_array (description_encoding, description_array); g_print ("\t3GPP2 Home network (extended):\n" "\t\tMCC: '%" G_GUINT16_FORMAT"'\n" "\t\tMNC: '%" G_GUINT16_FORMAT"'\n" "\t\tDescription: '%s'\n", mcc, mnc, description ?: ""); } } qmi_message_nas_get_home_network_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK */ #if defined HAVE_QMI_MESSAGE_NAS_GET_PREFERRED_NETWORKS static void get_preferred_networks_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetPreferredNetworksOutput *output; GError *error = NULL; GArray *preferred_networks_array; GArray *pcs_digit_array; output = qmi_client_nas_get_preferred_networks_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_preferred_networks_output_get_result (output, &error)) { g_printerr ("error: couldn't get preferred networks: %s\n", error->message); g_error_free (error); qmi_message_nas_get_preferred_networks_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got preferred networks:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_nas_get_preferred_networks_output_get_preferred_networks (output, &preferred_networks_array, NULL)) { guint i; g_print ("Preferred PLMN list:\n"); if (preferred_networks_array->len == 0) g_print ("\t\n"); for (i = 0; i < preferred_networks_array->len; i++) { QmiMessageNasGetPreferredNetworksOutputPreferredNetworksElement *element; g_autofree gchar *access_tech_string = NULL; element = &g_array_index (preferred_networks_array, QmiMessageNasGetPreferredNetworksOutputPreferredNetworksElement, i); access_tech_string = qmi_nas_plmn_access_technology_identifier_build_string_from_mask (element->radio_access_technology); g_print ("[%u]:\n" "\tMCC: '%" G_GUINT16_FORMAT "'\n" "\tMNC: '%" G_GUINT16_FORMAT "'\n" "\tAccess Technology: '%s'\n", i, element->mcc, element->mnc, VALIDATE_MASK_NONE (access_tech_string)); } } if (qmi_message_nas_get_preferred_networks_output_get_mnc_pcs_digit_include_status (output, &pcs_digit_array, NULL)) { guint i; g_print ("PCS digit status:\n"); if (pcs_digit_array->len == 0) g_print ("\t\n"); for (i = 0; i < pcs_digit_array->len; i++) { QmiMessageNasGetPreferredNetworksOutputMncPcsDigitIncludeStatusElement *element; element = &g_array_index (pcs_digit_array, QmiMessageNasGetPreferredNetworksOutputMncPcsDigitIncludeStatusElement, i); g_print ("[%u]:\n" "\tMCC: '%" G_GUINT16_FORMAT "'\n" "\tMNC: '%" G_GUINT16_FORMAT "'\n" "\tMCC with PCS digit: '%s'\n", i, element->mcc, element->mnc, element->includes_pcs_digit ? "yes" : "no"); } } qmi_message_nas_get_preferred_networks_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_PREFERRED_NETWORKS */ #if defined HAVE_QMI_MESSAGE_NAS_SET_PREFERRED_NETWORKS static QmiMessageNasSetPreferredNetworksInput * set_preferred_networks_input_create (const gchar *str) { QmiMessageNasSetPreferredNetworksInput *input = NULL; GError *error = NULL; gchar **parts = NULL; gint i; gint num_parts; const gchar *part; guint16 mcc = 0; guint16 mnc = 0; gboolean pcs_digit = FALSE; QmiNasPlmnAccessTechnologyIdentifier access_tech = QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED; GArray *preferred_nets_array; GArray *pcs_digit_array; QmiMessageNasSetPreferredNetworksInputPreferredNetworksElement preferred_nets_element; QmiMessageNasSetPreferredNetworksInputMncPcsDigitIncludeStatusElement pcs_digit_element; preferred_nets_array = g_array_new (FALSE, FALSE, sizeof (QmiMessageNasSetPreferredNetworksInputPreferredNetworksElement)); pcs_digit_array = g_array_new (FALSE, FALSE, sizeof (QmiMessageNasSetPreferredNetworksInputMncPcsDigitIncludeStatusElement)); parts = g_strsplit (str, ",", -1); num_parts = g_strv_length (parts); for (i = 0; i < num_parts; i += 2) { part = parts[i]; /* Parse MCCMNC, if it's found, also read the access technology in numeric format */ if (qmicli_read_parse_3gpp_mcc_mnc (part, &mcc, &mnc, &pcs_digit)) { access_tech = QMI_NAS_PLMN_ACCESS_TECHNOLOGY_IDENTIFIER_UNSPECIFIED; if (i + 1 < num_parts) { const gchar *access_tech_str = parts[i + 1]; if (!qmicli_read_nas_plmn_access_technology_identifier_from_string (access_tech_str, &access_tech)) goto out; memset (&preferred_nets_element, 0, sizeof (preferred_nets_element)); preferred_nets_element.mcc = mcc; preferred_nets_element.mnc = mnc; preferred_nets_element.radio_access_technology = access_tech; g_array_append_val (preferred_nets_array, preferred_nets_element); memset (&pcs_digit_element, 0, sizeof (pcs_digit_element)); pcs_digit_element.mcc = mcc; pcs_digit_element.mnc = mnc; pcs_digit_element.includes_pcs_digit = pcs_digit; g_array_append_val (pcs_digit_array, pcs_digit_element); } else { g_printerr ("error: access technology missing for MCCMNC: '%s'\n", part); goto out; } } else goto out; } input = qmi_message_nas_set_preferred_networks_input_new (); if (!qmi_message_nas_set_preferred_networks_input_set_preferred_networks (input, preferred_nets_array, &error)) goto out; if (!qmi_message_nas_set_preferred_networks_input_set_mnc_pcs_digit_include_status (input, pcs_digit_array, &error)) goto out; /* Always set the clear previous flag, leaving any previously configured networks is not desired */ if (!qmi_message_nas_set_preferred_networks_input_set_clear_previous_preferred_networks (input, TRUE, &error)) goto out; out: g_strfreev (parts); if (preferred_nets_array) g_array_unref (preferred_nets_array); if (pcs_digit_array) g_array_unref (pcs_digit_array); if (error) { g_printerr ("error: couldn't create preferred networks input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_nas_set_preferred_networks_input_unref (input); return NULL; } return input; } static void set_preferred_networks_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasSetPreferredNetworksOutput *output = NULL; GError *error = NULL; output = qmi_client_nas_set_preferred_networks_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_set_preferred_networks_output_get_result (output, &error)) { g_printerr ("error: couldn't set preferred networks: %s\n", error->message); g_error_free (error); qmi_message_nas_set_preferred_networks_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Preferred networks set successfully.\n", qmi_device_get_path_display (ctx->device)); qmi_message_nas_set_preferred_networks_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_SET_PREFERRED_NETWORKS */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SERVING_SYSTEM static void get_serving_system_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetServingSystemOutput *output; GError *error = NULL; output = qmi_client_nas_get_serving_system_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_serving_system_output_get_result (output, &error)) { g_printerr ("error: couldn't get serving system: %s\n", error->message); g_error_free (error); qmi_message_nas_get_serving_system_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got serving system:\n", qmi_device_get_path_display (ctx->device)); { QmiNasRegistrationState registration_state; QmiNasAttachState cs_attach_state; QmiNasAttachState ps_attach_state; QmiNasNetworkType selected_network; GArray *radio_interfaces; guint i; qmi_message_nas_get_serving_system_output_get_serving_system ( output, ®istration_state, &cs_attach_state, &ps_attach_state, &selected_network, &radio_interfaces, NULL); g_print ("\tRegistration state: '%s'\n" "\tCS: '%s'\n" "\tPS: '%s'\n" "\tSelected network: '%s'\n" "\tRadio interfaces: '%u'\n", qmi_nas_registration_state_get_string (registration_state), qmi_nas_attach_state_get_string (cs_attach_state), qmi_nas_attach_state_get_string (ps_attach_state), qmi_nas_network_type_get_string (selected_network), radio_interfaces->len); for (i = 0; i < radio_interfaces->len; i++) { QmiNasRadioInterface iface; iface = g_array_index (radio_interfaces, QmiNasRadioInterface, i); g_print ("\t\t[%u]: '%s'\n", i, qmi_nas_radio_interface_get_string (iface)); } } { QmiNasRoamingIndicatorStatus roaming; if (qmi_message_nas_get_serving_system_output_get_roaming_indicator ( output, &roaming, NULL)) { g_print ("\tRoaming status: '%s'\n", qmi_nas_roaming_indicator_status_get_string (roaming)); } } { GArray *data_service_capability; if (qmi_message_nas_get_serving_system_output_get_data_service_capability ( output, &data_service_capability, NULL)) { guint i; g_print ("\tData service capabilities: '%u'\n", data_service_capability->len); for (i = 0; i < data_service_capability->len; i++) { QmiNasDataCapability cap; cap = g_array_index (data_service_capability, QmiNasDataCapability, i); g_print ("\t\t[%u]: '%s'\n", i, qmi_nas_data_capability_get_string (cap)); } } } { guint16 current_plmn_mcc; guint16 current_plmn_mnc; const gchar *current_plmn_description; if (qmi_message_nas_get_serving_system_output_get_current_plmn ( output, ¤t_plmn_mcc, ¤t_plmn_mnc, ¤t_plmn_description, NULL)) { g_print ("\tCurrent PLMN:\n" "\t\tMCC: '%" G_GUINT16_FORMAT"'\n" "\t\tMNC: '%" G_GUINT16_FORMAT"'\n" "\t\tDescription: '%s'\n", current_plmn_mcc, current_plmn_mnc, current_plmn_description); } } { QmiNasNetworkNameSource network_name_source; if (qmi_message_nas_get_serving_system_output_get_network_name_source ( output, &network_name_source, NULL)) { g_print ("\tNetwork name source: %s\n", qmi_nas_network_name_source_get_string (network_name_source)); } } { guint16 sid; guint16 nid; if (qmi_message_nas_get_serving_system_output_get_cdma_system_id ( output, &sid, &nid, NULL)) { g_print ("\tCDMA System ID:\n" "\t\tSID: '%" G_GUINT16_FORMAT"'\n" "\t\tNID: '%" G_GUINT16_FORMAT"'\n", sid, nid); } } { guint16 id; gint32 latitude; gint32 longitude; if (qmi_message_nas_get_serving_system_output_get_cdma_base_station_info ( output, &id, &latitude, &longitude, NULL)) { gdouble latitude_degrees; gdouble longitude_degrees; /* TODO: give degrees, minutes, seconds */ latitude_degrees = ((gdouble)latitude * 0.25)/3600.0; longitude_degrees = ((gdouble)longitude * 0.25)/3600.0; g_print ("\tCDMA Base station info:\n" "\t\tBase station ID: '%" G_GUINT16_FORMAT"'\n" "\t\tLatitude: '%lf'º\n" "\t\tLongitude: '%lf'º\n", id, latitude_degrees, longitude_degrees); } } { GArray *roaming_indicators; if (qmi_message_nas_get_serving_system_output_get_roaming_indicator_list ( output, &roaming_indicators, NULL)) { guint i; g_print ("\tRoaming indicators: '%u'\n", roaming_indicators->len); for (i = 0; i < roaming_indicators->len; i++) { QmiMessageNasGetServingSystemOutputRoamingIndicatorListElement *element; element = &g_array_index (roaming_indicators, QmiMessageNasGetServingSystemOutputRoamingIndicatorListElement, i); g_print ("\t\t[%u]: '%s' (%s)\n", i, qmi_nas_roaming_indicator_status_get_string (element->roaming_indicator), qmi_nas_radio_interface_get_string (element->radio_interface)); } } } { QmiNasRoamingIndicatorStatus roaming; if (qmi_message_nas_get_serving_system_output_get_default_roaming_indicator ( output, &roaming, NULL)) { g_print ("\tDefault roaming status: '%s'\n", qmi_nas_roaming_indicator_status_get_string (roaming)); } } { guint8 leap_seconds; gint8 local_time_offset; gboolean daylight_saving_time; if (qmi_message_nas_get_serving_system_output_get_time_zone_3gpp2 ( output, &leap_seconds, &local_time_offset, &daylight_saving_time, NULL)) { g_print ("\t3GPP2 time zone:\n" "\t\tLeap seconds: '%u' seconds\n" "\t\tLocal time offset: '%d' minutes\n" "\t\tDaylight saving time: '%s'\n", leap_seconds, (gint)local_time_offset * 30, daylight_saving_time ? "yes" : "no"); } } { guint8 cdma_p_rev; if (qmi_message_nas_get_serving_system_output_get_cdma_p_rev ( output, &cdma_p_rev, NULL)) { g_print ("\tCDMA P_Rev: '%u'\n", cdma_p_rev); } } { gint8 time_zone; if (qmi_message_nas_get_serving_system_output_get_time_zone_3gpp ( output, &time_zone, NULL)) { g_print ("\t3GPP time zone offset: '%d' minutes\n", (gint)time_zone * 15); } } { guint8 adjustment; if (qmi_message_nas_get_serving_system_output_get_daylight_saving_time_adjustment_3gpp ( output, &adjustment, NULL)) { g_print ("\t3GPP daylight saving time adjustment: '%u' hours\n", adjustment); } } { guint16 lac; if (qmi_message_nas_get_serving_system_output_get_lac_3gpp ( output, &lac, NULL)) { g_print ("\t3GPP location area code: '%" G_GUINT16_FORMAT"'\n", lac); } } { guint32 cid; if (qmi_message_nas_get_serving_system_output_get_cid_3gpp ( output, &cid, NULL)) { g_print ("\t3GPP cell ID: '%u'\n", cid); } } { gboolean concurrent; if (qmi_message_nas_get_serving_system_output_get_concurrent_service_info_3gpp2 ( output, &concurrent, NULL)) { g_print ("\t3GPP2 concurrent service info: '%s'\n", concurrent ? "available" : "not available"); } } { gboolean prl; if (qmi_message_nas_get_serving_system_output_get_prl_indicator_3gpp2 ( output, &prl, NULL)) { g_print ("\t3GPP2 PRL indicator: '%s'\n", prl ? "system in PRL" : "system not in PRL"); } } { gboolean supported; if (qmi_message_nas_get_serving_system_output_get_dtm_support ( output, &supported, NULL)) { g_print ("\tDual transfer mode: '%s'\n", supported ? "supported" : "not supported"); } } { QmiNasServiceStatus status; QmiNasNetworkServiceDomain capability; QmiNasServiceStatus hdr_status; gboolean hdr_hybrid; gboolean forbidden; if (qmi_message_nas_get_serving_system_output_get_detailed_service_status ( output, &status, &capability, &hdr_status, &hdr_hybrid, &forbidden, NULL)) { g_print ("\tDetailed status:\n" "\t\tStatus: '%s'\n" "\t\tCapability: '%s'\n" "\t\tHDR Status: '%s'\n" "\t\tHDR Hybrid: '%s'\n" "\t\tForbidden: '%s'\n", qmi_nas_service_status_get_string (status), qmi_nas_network_service_domain_get_string (capability), qmi_nas_service_status_get_string (hdr_status), hdr_hybrid ? "yes" : "no", forbidden ? "yes" : "no"); } } { guint16 mcc; guint8 imsi_11_12; if (qmi_message_nas_get_serving_system_output_get_cdma_system_info ( output, &mcc, &imsi_11_12, NULL)) { g_print ("\tCDMA system info:\n" "\t\tMCC: '%" G_GUINT16_FORMAT"'\n" "\t\tIMSI_11_12: '%u'\n", mcc, imsi_11_12); } } { QmiNasHdrPersonality personality; if (qmi_message_nas_get_serving_system_output_get_hdr_personality ( output, &personality, NULL)) { g_print ("\tHDR personality: '%s'\n", qmi_nas_hdr_personality_get_string (personality)); } } { guint16 tac; if (qmi_message_nas_get_serving_system_output_get_lte_tac ( output, &tac, NULL)) { g_print ("\tLTE tracking area code: '%" G_GUINT16_FORMAT"'\n", tac); } } { QmiNasCallBarringStatus cs_status; QmiNasCallBarringStatus ps_status; if (qmi_message_nas_get_serving_system_output_get_call_barring_status ( output, &cs_status, &ps_status, NULL)) { g_print ("\tCall barring status:\n" "\t\tCircuit switched: '%s'\n" "\t\tPacket switched: '%s'\n", qmi_nas_call_barring_status_get_string (cs_status), qmi_nas_call_barring_status_get_string (ps_status)); } } { guint16 code; if (qmi_message_nas_get_serving_system_output_get_umts_primary_scrambling_code ( output, &code, NULL)) { g_print ("\tUMTS primary scrambling code: '%" G_GUINT16_FORMAT"'\n", code); } } { guint16 mcc; guint16 mnc; gboolean has_pcs_digit; if (qmi_message_nas_get_serving_system_output_get_mnc_pcs_digit_include_status ( output, &mcc, &mnc, &has_pcs_digit, NULL)) { g_print ("\tFull operator code info:\n" "\t\tMCC: '%" G_GUINT16_FORMAT"'\n" "\t\tMNC: '%" G_GUINT16_FORMAT"'\n" "\t\tMNC with PCS digit: '%s'\n", mcc, mnc, has_pcs_digit ? "yes" : "no"); } } qmi_message_nas_get_serving_system_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SERVING_SYSTEM */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO static void get_system_info_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetSystemInfoOutput *output; GError *error = NULL; output = qmi_client_nas_get_system_info_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_system_info_output_get_result (output, &error)) { g_printerr ("error: couldn't get system info: %s\n", error->message); g_error_free (error); qmi_message_nas_get_system_info_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got system info:\n", qmi_device_get_path_display (ctx->device)); /* CDMA 1x */ { QmiNasServiceStatus service_status; gboolean preferred_data_path; gboolean domain_valid; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid; gboolean forbidden; gboolean prl_match_valid; gboolean prl_match; gboolean p_rev_valid; guint8 p_rev; gboolean base_station_p_rev_valid; guint8 base_station_p_rev; gboolean concurrent_service_support_valid; gboolean concurrent_service_support; gboolean cdma_system_id_valid; guint16 sid; guint16 nid; gboolean base_station_info_valid; guint16 base_station_id; gint32 base_station_latitude; gint32 base_station_longitude; gboolean packet_zone_valid; guint16 packet_zone; gboolean network_id_valid; const gchar *mcc; const gchar *mnc; guint16 geo_system_index; guint16 registration_period; if (qmi_message_nas_get_system_info_output_get_cdma_service_status ( output, &service_status, &preferred_data_path, NULL)) { g_print ("\tCDMA 1x service:\n" "\t\tStatus: '%s'\n" "\t\tPreferred data path: '%s'\n", qmi_nas_service_status_get_string (service_status), preferred_data_path ? "yes" : "no"); if (qmi_message_nas_get_system_info_output_get_cdma_system_info ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &prl_match_valid, &prl_match, &p_rev_valid, &p_rev, &base_station_p_rev_valid, &base_station_p_rev, &concurrent_service_support_valid, &concurrent_service_support, &cdma_system_id_valid, &sid, &nid, &base_station_info_valid, &base_station_id, &base_station_longitude, &base_station_latitude, &packet_zone_valid, &packet_zone, &network_id_valid, &mcc, &mnc, NULL)) { if (domain_valid) g_print ("\t\tDomain: '%s'\n", qmi_nas_network_service_domain_get_string (domain)); if (service_capability_valid) g_print ("\t\tService capability: '%s'\n", qmi_nas_network_service_domain_get_string (service_capability)); if (roaming_status_valid) g_print ("\t\tRoaming status: '%s'\n", qmi_nas_roaming_status_get_string (roaming_status)); if (forbidden_valid) g_print ("\t\tForbidden: '%s'\n", forbidden ? "yes" : "no"); if (prl_match_valid) g_print ("\t\tPRL match: '%s'\n", prl_match ? "yes" : "no"); if (p_rev_valid) g_print ("\t\tP-Rev: '%u'\n", p_rev); if (base_station_p_rev_valid) g_print ("\t\tBase station P-Rev: '%u'\n", base_station_p_rev); if (concurrent_service_support_valid) g_print ("\t\tConcurrent service support: '%s'\n", concurrent_service_support ? "yes" : "no"); if (cdma_system_id_valid) { g_print ("\t\tSID: '%" G_GUINT16_FORMAT"'\n", sid); g_print ("\t\tNID: '%" G_GUINT16_FORMAT"'\n", nid); } if (base_station_info_valid) { gdouble latitude_degrees; gdouble longitude_degrees; /* TODO: give degrees, minutes, seconds */ latitude_degrees = ((gdouble)base_station_latitude * 0.25)/3600.0; longitude_degrees = ((gdouble)base_station_longitude * 0.25)/3600.0; g_print ("\t\tBase station ID: '%" G_GUINT16_FORMAT"'\n", base_station_id); g_print ("\t\tBase station latitude: '%lf'º\n", latitude_degrees); g_print ("\t\tBase station longitude: '%lf'º\n", longitude_degrees); } if (packet_zone_valid) g_print ("\t\tPacket zone: '%" G_GUINT16_FORMAT "'\n", packet_zone); if (network_id_valid) { g_print ("\t\tMCC: '%s'\n", mcc); if ((guchar)mnc[2] == 0xFF) g_print ("\t\tMNC: '%.2s'\n", mnc); else g_print ("\t\tMNC: '%.3s'\n", mnc); } } if (qmi_message_nas_get_system_info_output_get_additional_cdma_system_info ( output, &geo_system_index, ®istration_period, NULL)) { if (geo_system_index != 0xFFFF) g_print ("\t\tGeo system index: '%" G_GUINT16_FORMAT "'\n", geo_system_index); if (registration_period != 0xFFFF) g_print ("\t\tRegistration period: '%" G_GUINT16_FORMAT "'\n", registration_period); } } } /* CDMA 1xEV-DO */ { QmiNasServiceStatus service_status; gboolean preferred_data_path; gboolean domain_valid; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid; gboolean forbidden; gboolean prl_match_valid; gboolean prl_match; gboolean personality_valid; QmiNasHdrPersonality personality; gboolean protocol_revision_valid; QmiNasHdrProtocolRevision protocol_revision; gboolean is_856_system_id_valid; const gchar *is_856_system_id; guint16 geo_system_index; if (qmi_message_nas_get_system_info_output_get_hdr_service_status ( output, &service_status, &preferred_data_path, NULL)) { g_print ("\tCDMA 1xEV-DO (HDR) service:\n" "\t\tStatus: '%s'\n" "\t\tPreferred data path: '%s'\n", qmi_nas_service_status_get_string (service_status), preferred_data_path ? "yes" : "no"); if (qmi_message_nas_get_system_info_output_get_hdr_system_info ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &prl_match_valid, &prl_match, &personality_valid, &personality, &protocol_revision_valid, &protocol_revision, &is_856_system_id_valid, &is_856_system_id, NULL)) { if (domain_valid) g_print ("\t\tDomain: '%s'\n", qmi_nas_network_service_domain_get_string (domain)); if (service_capability_valid) g_print ("\t\tService capability: '%s'\n", qmi_nas_network_service_domain_get_string (service_capability)); if (roaming_status_valid) g_print ("\t\tRoaming status: '%s'\n", qmi_nas_roaming_status_get_string (roaming_status)); if (forbidden_valid) g_print ("\t\tForbidden: '%s'\n", forbidden ? "yes" : "no"); if (prl_match_valid) g_print ("\t\tPRL match: '%s'\n", prl_match ? "yes" : "no"); if (personality_valid) g_print ("\t\tPersonality: '%s'\n", qmi_nas_hdr_personality_get_string (personality)); if (protocol_revision_valid) g_print ("\t\tProtocol revision: '%s'\n", qmi_nas_hdr_protocol_revision_get_string (protocol_revision)); if (is_856_system_id_valid) g_print ("\t\tIS-856 system ID: '%s'\n", is_856_system_id); } if (qmi_message_nas_get_system_info_output_get_additional_hdr_system_info ( output, &geo_system_index, NULL)) { if (geo_system_index != 0xFFFF) g_print ("\t\tGeo system index: '%" G_GUINT16_FORMAT "'\n", geo_system_index); } } } /* GSM */ { QmiNasServiceStatus service_status; QmiNasServiceStatus true_service_status; gboolean preferred_data_path; gboolean domain_valid; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid; gboolean forbidden; gboolean lac_valid; guint16 lac; gboolean cid_valid; guint32 cid; gboolean registration_reject_info_valid; QmiNasNetworkServiceDomain registration_reject_domain; QmiNasRejectCause registration_reject_cause; gboolean network_id_valid; const gchar *mcc; const gchar *mnc; gboolean egprs_support_valid; gboolean egprs_support; gboolean dtm_support_valid; gboolean dtm_support; guint16 geo_system_index; QmiNasCellBroadcastCapability cell_broadcast_support; QmiNasCallBarringStatus call_barring_status_cs; QmiNasCallBarringStatus call_barring_status_ps; QmiNasNetworkServiceDomain cipher_domain; if (qmi_message_nas_get_system_info_output_get_gsm_service_status ( output, &service_status, &true_service_status, &preferred_data_path, NULL)) { g_print ("\tGSM service:\n" "\t\tStatus: '%s'\n" "\t\tTrue Status: '%s'\n" "\t\tPreferred data path: '%s'\n", qmi_nas_service_status_get_string (service_status), qmi_nas_service_status_get_string (true_service_status), preferred_data_path ? "yes" : "no"); if (qmi_message_nas_get_system_info_output_get_gsm_system_info_v2 ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &lac_valid, &lac, &cid_valid, &cid, ®istration_reject_info_valid, ®istration_reject_domain, ®istration_reject_cause, &network_id_valid, &mcc, &mnc, &egprs_support_valid, &egprs_support, &dtm_support_valid, &dtm_support, NULL)) { if (domain_valid) g_print ("\t\tDomain: '%s'\n", qmi_nas_network_service_domain_get_string (domain)); if (service_capability_valid) g_print ("\t\tService capability: '%s'\n", qmi_nas_network_service_domain_get_string (service_capability)); if (roaming_status_valid) g_print ("\t\tRoaming status: '%s'\n", qmi_nas_roaming_status_get_string (roaming_status)); if (forbidden_valid) g_print ("\t\tForbidden: '%s'\n", forbidden ? "yes" : "no"); if (lac_valid) g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac); if (cid_valid) g_print ("\t\tCell ID: '%u'\n", cid); if (registration_reject_info_valid) g_print ("\t\tRegistration reject: '%s' (%s)\n", qmi_nas_network_service_domain_get_string (registration_reject_domain), qmi_nas_reject_cause_get_string (registration_reject_cause)); if (network_id_valid) { g_print ("\t\tMCC: '%s'\n", mcc); if ((guchar)mnc[2] == 0xFF) g_print ("\t\tMNC: '%.2s'\n", mnc); else g_print ("\t\tMNC: '%.3s'\n", mnc); } if (egprs_support_valid) g_print ("\t\tE-GPRS supported: '%s'\n", egprs_support ? "yes" : "no"); if (dtm_support_valid) g_print ("\t\tDual Transfer Mode supported: '%s'\n", dtm_support ? "yes" : "no"); } if (qmi_message_nas_get_system_info_output_get_additional_gsm_system_info ( output, &geo_system_index, &cell_broadcast_support, NULL)) { if (geo_system_index != 0xFFFF) g_print ("\t\tGeo system index: '%" G_GUINT16_FORMAT "'\n", geo_system_index); g_print ("\t\tCell broadcast support: '%s'\n", qmi_nas_cell_broadcast_capability_get_string (cell_broadcast_support)); } if (qmi_message_nas_get_system_info_output_get_gsm_call_barring_status ( output, &call_barring_status_cs, &call_barring_status_ps, NULL)) { g_print ("\t\tCall barring status (CS): '%s'\n", qmi_nas_call_barring_status_get_string (call_barring_status_cs)); g_print ("\t\tCall barring status (PS): '%s'\n", qmi_nas_call_barring_status_get_string (call_barring_status_ps)); } if (qmi_message_nas_get_system_info_output_get_gsm_cipher_domain ( output, &cipher_domain, NULL)) { g_print ("\t\tCipher Domain: '%s'\n", qmi_nas_network_service_domain_get_string (cipher_domain)); } } } /* WCDMA */ { QmiNasServiceStatus service_status; QmiNasServiceStatus true_service_status; gboolean preferred_data_path; gboolean domain_valid; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid; gboolean forbidden; gboolean lac_valid; guint16 lac; gboolean cid_valid; guint32 cid; gboolean registration_reject_info_valid; QmiNasNetworkServiceDomain registration_reject_domain; QmiNasRejectCause registration_reject_cause; gboolean network_id_valid; const gchar *mcc; const gchar *mnc; gboolean hs_call_status_valid; QmiNasWcdmaHsService hs_call_status; gboolean hs_service_valid; QmiNasWcdmaHsService hs_service; gboolean primary_scrambling_code_valid; guint16 primary_scrambling_code; guint16 geo_system_index; QmiNasCellBroadcastCapability cell_broadcast_support; QmiNasCallBarringStatus call_barring_status_cs; QmiNasCallBarringStatus call_barring_status_ps; QmiNasNetworkServiceDomain cipher_domain; if (qmi_message_nas_get_system_info_output_get_wcdma_service_status ( output, &service_status, &true_service_status, &preferred_data_path, NULL)) { g_print ("\tWCDMA service:\n" "\t\tStatus: '%s'\n" "\t\tTrue Status: '%s'\n" "\t\tPreferred data path: '%s'\n", qmi_nas_service_status_get_string (service_status), qmi_nas_service_status_get_string (true_service_status), preferred_data_path ? "yes" : "no"); if (qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2 ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &lac_valid, &lac, &cid_valid, &cid, ®istration_reject_info_valid, ®istration_reject_domain, ®istration_reject_cause, &network_id_valid, &mcc, &mnc, &hs_call_status_valid, &hs_call_status, &hs_service_valid, &hs_service, &primary_scrambling_code_valid, &primary_scrambling_code, NULL)) { if (domain_valid) g_print ("\t\tDomain: '%s'\n", qmi_nas_network_service_domain_get_string (domain)); if (service_capability_valid) g_print ("\t\tService capability: '%s'\n", qmi_nas_network_service_domain_get_string (service_capability)); if (roaming_status_valid) g_print ("\t\tRoaming status: '%s'\n", qmi_nas_roaming_status_get_string (roaming_status)); if (forbidden_valid) g_print ("\t\tForbidden: '%s'\n", forbidden ? "yes" : "no"); if (lac_valid) g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac); if (cid_valid) g_print ("\t\tCell ID: '%u'\n", cid); if (registration_reject_info_valid) g_print ("\t\tRegistration reject: '%s' (%s)\n", qmi_nas_network_service_domain_get_string (registration_reject_domain), qmi_nas_reject_cause_get_string (registration_reject_cause)); if (network_id_valid) { g_print ("\t\tMCC: '%s'\n", mcc); if ((guchar)mnc[2] == 0xFF) g_print ("\t\tMNC: '%.2s'\n", mnc); else g_print ("\t\tMNC: '%.3s'\n", mnc); } if (hs_call_status_valid) g_print ("\t\tHS call status: '%s'\n", qmi_nas_wcdma_hs_service_get_string (hs_call_status)); if (hs_service_valid) g_print ("\t\tHS service: '%s'\n", qmi_nas_wcdma_hs_service_get_string (hs_service)); if (primary_scrambling_code_valid) g_print ("\t\tPrimary scrambling code: '%" G_GUINT16_FORMAT"'\n", primary_scrambling_code); } if (qmi_message_nas_get_system_info_output_get_additional_wcdma_system_info ( output, &geo_system_index, &cell_broadcast_support, NULL)) { if (geo_system_index != 0xFFFF) g_print ("\t\tGeo system index: '%" G_GUINT16_FORMAT "'\n", geo_system_index); g_print ("\t\tCell broadcast support: '%s'\n", qmi_nas_cell_broadcast_capability_get_string (cell_broadcast_support)); } if (qmi_message_nas_get_system_info_output_get_wcdma_call_barring_status ( output, &call_barring_status_cs, &call_barring_status_ps, NULL)) { g_print ("\t\tCall barring status (CS): '%s'\n", qmi_nas_call_barring_status_get_string (call_barring_status_cs)); g_print ("\t\tCall barring status (PS): '%s'\n", qmi_nas_call_barring_status_get_string (call_barring_status_ps)); } if (qmi_message_nas_get_system_info_output_get_wcdma_cipher_domain ( output, &cipher_domain, NULL)) { g_print ("\t\tCipher Domain: '%s'\n", qmi_nas_network_service_domain_get_string (cipher_domain)); } } } /* LTE */ { QmiNasServiceStatus service_status; QmiNasServiceStatus true_service_status; gboolean preferred_data_path; gboolean domain_valid; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid; gboolean forbidden; gboolean lac_valid; guint16 lac; gboolean cid_valid; guint32 cid; gboolean registration_reject_info_valid; QmiNasNetworkServiceDomain registration_reject_domain; QmiNasRejectCause registration_reject_cause; gboolean network_id_valid; const gchar *mcc; const gchar *mnc; gboolean tac_valid; guint16 tac; guint16 geo_system_index; gboolean voice_support; gboolean ims_voice_support; gboolean embms_coverage_info_support; guint16 embms_coverage_info_trace_id; QmiNasNetworkSelectionRegistrationRestriction registration_restriction; QmiNasLteCellAccessStatus cell_access_status; QmiNasLteRegistrationDomain registration_domain; gboolean endc_available; gboolean restrict_dcnr; if (qmi_message_nas_get_system_info_output_get_lte_service_status ( output, &service_status, &true_service_status, &preferred_data_path, NULL)) { g_print ("\tLTE service:\n" "\t\tStatus: '%s'\n" "\t\tTrue Status: '%s'\n" "\t\tPreferred data path: '%s'\n", qmi_nas_service_status_get_string (service_status), qmi_nas_service_status_get_string (true_service_status), preferred_data_path ? "yes" : "no"); if (qmi_message_nas_get_system_info_output_get_lte_system_info_v2 ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &lac_valid, &lac, &cid_valid, &cid, ®istration_reject_info_valid,®istration_reject_domain,®istration_reject_cause, &network_id_valid, &mcc, &mnc, &tac_valid, &tac, NULL)) { if (domain_valid) g_print ("\t\tDomain: '%s'\n", qmi_nas_network_service_domain_get_string (domain)); if (service_capability_valid) g_print ("\t\tService capability: '%s'\n", qmi_nas_network_service_domain_get_string (service_capability)); if (roaming_status_valid) g_print ("\t\tRoaming status: '%s'\n", qmi_nas_roaming_status_get_string (roaming_status)); if (forbidden_valid) g_print ("\t\tForbidden: '%s'\n", forbidden ? "yes" : "no"); if (lac_valid) g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac); if (cid_valid) g_print ("\t\tCell ID: '%u'\n", cid); if (registration_reject_info_valid) g_print ("\t\tRegistration reject: '%s' (%s)\n", qmi_nas_network_service_domain_get_string (registration_reject_domain), qmi_nas_reject_cause_get_string (registration_reject_cause)); if (network_id_valid) { g_print ("\t\tMCC: '%s'\n", mcc); if ((guchar)mnc[2] == 0xFF) g_print ("\t\tMNC: '%.2s'\n", mnc); else g_print ("\t\tMNC: '%.3s'\n", mnc); } if (tac_valid) g_print ("\t\tTracking Area Code: '%" G_GUINT16_FORMAT"'\n", tac); } if (qmi_message_nas_get_system_info_output_get_additional_lte_system_info ( output, &geo_system_index, NULL)) { if (geo_system_index != 0xFFFF) g_print ("\t\tGeo system index: '%" G_GUINT16_FORMAT "'\n", geo_system_index); } if (qmi_message_nas_get_system_info_output_get_lte_voice_support ( output, &voice_support, NULL)) { g_print ("\t\tVoice support: '%s'\n", voice_support ? "yes" : "no"); } if (qmi_message_nas_get_system_info_output_get_ims_voice_support ( output, &ims_voice_support, NULL)) { g_print ("\t\tIMS voice support: '%s'\n", ims_voice_support ? "yes" : "no"); } if (qmi_message_nas_get_system_info_output_get_lte_embms_coverage_info_support ( output, &embms_coverage_info_support, NULL)) { g_print ("\t\teMBMS coverage info support: '%s'\n", embms_coverage_info_support ? "yes" : "no"); } if (qmi_message_nas_get_system_info_output_get_lte_embms_coverage_info_trace_id ( output, &embms_coverage_info_trace_id, NULL)) { g_print ("\t\teMBMS coverage info trace ID: '%" G_GUINT16_FORMAT "'\n", embms_coverage_info_trace_id); } if (qmi_message_nas_get_system_info_output_get_lte_cell_access_status ( output, &cell_access_status, NULL)) { g_print ("\t\tCell access: '%s'\n", qmi_nas_lte_cell_access_status_get_string (cell_access_status)); } if (qmi_message_nas_get_system_info_output_get_network_selection_registration_restriction ( output, ®istration_restriction, NULL)) { g_print ("\t\tRegistration restriction: '%s'\n", qmi_nas_network_selection_registration_restriction_get_string (registration_restriction)); } if (qmi_message_nas_get_system_info_output_get_lte_registration_domain ( output, ®istration_domain, NULL)) { g_print ("\t\tRegistration domain: '%s'\n", qmi_nas_lte_registration_domain_get_string (registration_domain)); } if (qmi_message_nas_get_system_info_output_get_eutra_with_nr5g_availability ( output, &endc_available, NULL)) { g_print ("\t\t5G NSA Available: '%s'\n", endc_available ? "yes" : "no"); } if (qmi_message_nas_get_system_info_output_get_dcnr_restriction_info ( output, &restrict_dcnr, NULL)) { g_print ("\t\tDCNR Restriction: '%s'\n", restrict_dcnr ? "yes" : "no"); } } } /* TD-SCDMA */ { QmiNasServiceStatus service_status; QmiNasServiceStatus true_service_status; gboolean preferred_data_path; gboolean domain_valid; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid; gboolean forbidden; gboolean lac_valid; guint16 lac; gboolean cid_valid; guint32 cid; gboolean registration_reject_info_valid; QmiNasNetworkServiceDomain registration_reject_domain; QmiNasRejectCause registration_reject_cause; gboolean network_id_valid; const gchar *mcc; const gchar *mnc; gboolean hs_call_status_valid; QmiNasWcdmaHsService hs_call_status; gboolean hs_service_valid; QmiNasWcdmaHsService hs_service; gboolean cell_parameter_id_valid; guint16 cell_parameter_id; gboolean cell_broadcast_support_valid; QmiNasCellBroadcastCapability cell_broadcast_support; gboolean call_barring_status_cs_valid; QmiNasCallBarringStatus call_barring_status_cs; gboolean call_barring_status_ps_valid; QmiNasCallBarringStatus call_barring_status_ps; gboolean cipher_domain_valid; QmiNasNetworkServiceDomain cipher_domain; if (qmi_message_nas_get_system_info_output_get_td_scdma_service_status ( output, &service_status, &true_service_status, &preferred_data_path, NULL)) { g_print ("\tTD-SCDMA service:\n" "\t\tStatus: '%s'\n" "\t\tTrue Status: '%s'\n" "\t\tPreferred data path: '%s'\n", qmi_nas_service_status_get_string (service_status), qmi_nas_service_status_get_string (true_service_status), preferred_data_path ? "yes" : "no"); if (qmi_message_nas_get_system_info_output_get_td_scdma_system_info_v2 ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &lac_valid, &lac, &cid_valid, &cid, ®istration_reject_info_valid, ®istration_reject_domain, ®istration_reject_cause, &network_id_valid, &mcc, &mnc, &hs_call_status_valid, &hs_call_status, &hs_service_valid, &hs_service, &cell_parameter_id_valid, &cell_parameter_id, &cell_broadcast_support_valid, &cell_broadcast_support, &call_barring_status_cs_valid, &call_barring_status_cs, &call_barring_status_ps_valid, &call_barring_status_ps, &cipher_domain_valid, &cipher_domain, NULL)) { if (domain_valid) g_print ("\t\tDomain: '%s'\n", qmi_nas_network_service_domain_get_string (domain)); if (service_capability_valid) g_print ("\t\tService capability: '%s'\n", qmi_nas_network_service_domain_get_string (service_capability)); if (roaming_status_valid) g_print ("\t\tRoaming status: '%s'\n", qmi_nas_roaming_status_get_string (roaming_status)); if (forbidden_valid) g_print ("\t\tForbidden: '%s'\n", forbidden ? "yes" : "no"); if (lac_valid) g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac); if (cid_valid) g_print ("\t\tCell ID: '%u'\n", cid); if (registration_reject_info_valid) g_print ("\t\tRegistration reject: '%s' (%s)\n", qmi_nas_network_service_domain_get_string (registration_reject_domain), qmi_nas_reject_cause_get_string (registration_reject_cause)); if (network_id_valid) { g_print ("\t\tMCC: '%s'\n", mcc); if ((guchar)mnc[2] == 0xFF) g_print ("\t\tMNC: '%.2s'\n", mnc); else g_print ("\t\tMNC: '%.3s'\n", mnc); } if (hs_call_status_valid) g_print ("\t\tHS call status: '%s'\n", qmi_nas_wcdma_hs_service_get_string (hs_call_status)); if (hs_service_valid) g_print ("\t\tHS service: '%s'\n", qmi_nas_wcdma_hs_service_get_string (hs_service)); if (cell_parameter_id_valid) g_print ("\t\tCell parameter ID: '%" G_GUINT16_FORMAT"'\n", cell_parameter_id); if (cell_broadcast_support_valid) g_print ("\t\tCell broadcast support: '%s'\n", qmi_nas_cell_broadcast_capability_get_string (cell_broadcast_support)); if (call_barring_status_cs_valid) g_print ("\t\tCall barring status (CS): '%s'\n", qmi_nas_call_barring_status_get_string (call_barring_status_cs)); if (call_barring_status_ps_valid) g_print ("\t\tCall barring status (PS): '%s'\n", qmi_nas_call_barring_status_get_string (call_barring_status_ps)); if (cipher_domain_valid) g_print ("\t\tCipher Domain: '%s'\n", qmi_nas_network_service_domain_get_string (cipher_domain)); } } } /* 5G SA */ { QmiNasServiceStatus service_status; QmiNasServiceStatus true_service_status; gboolean preferred_data_path; gboolean domain_valid; QmiNasNetworkServiceDomain domain; gboolean service_capability_valid; QmiNasNetworkServiceDomain service_capability; gboolean roaming_status_valid; QmiNasRoamingStatus roaming_status; gboolean forbidden_valid; gboolean forbidden; gboolean lac_valid; guint16 lac; gboolean cid_valid; guint32 cid; gboolean registration_reject_info_valid; QmiNasNetworkServiceDomain registration_reject_domain; guint8 registration_reject_cause; gboolean network_id_valid; const gchar *mcc; const gchar *mnc; gboolean tac_valid; guint16 tac; if (qmi_message_nas_get_system_info_output_get_nr5g_service_status_info ( output, &service_status, &true_service_status, &preferred_data_path, NULL)) { g_print ("\t5G SA service:\n" "\t\tStatus: '%s'\n" "\t\tTrue Status: '%s'\n" "\t\tPreferred data path: '%s'\n", qmi_nas_service_status_get_string (service_status), qmi_nas_service_status_get_string (true_service_status), preferred_data_path ? "yes" : "no"); if (qmi_message_nas_get_system_info_output_get_nr5g_system_info ( output, &domain_valid, &domain, &service_capability_valid, &service_capability, &roaming_status_valid, &roaming_status, &forbidden_valid, &forbidden, &lac_valid, &lac, &cid_valid, &cid, ®istration_reject_info_valid,®istration_reject_domain,®istration_reject_cause, &network_id_valid, &mcc, &mnc, &tac_valid, &tac, NULL)) { if (domain_valid) g_print ("\t\tDomain: '%s'\n", qmi_nas_network_service_domain_get_string (domain)); if (service_capability_valid) g_print ("\t\tService capability: '%s'\n", qmi_nas_network_service_domain_get_string (service_capability)); if (roaming_status_valid) g_print ("\t\tRoaming status: '%s'\n", qmi_nas_roaming_status_get_string (roaming_status)); if (forbidden_valid) g_print ("\t\tForbidden: '%s'\n", forbidden ? "yes" : "no"); if (lac_valid) g_print ("\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", lac); if (cid_valid) g_print ("\t\tCell ID: '%u'\n", cid); if (registration_reject_info_valid) g_print ("\t\tRegistration reject: '%s' (%u)\n", qmi_nas_network_service_domain_get_string (registration_reject_domain), registration_reject_cause); if (network_id_valid) { g_print ("\t\tMCC: '%s'\n", mcc); if ((guchar)mnc[2] == 0xFF) g_print ("\t\tMNC: '%.2s'\n", mnc); else g_print ("\t\tMNC: '%.3s'\n", mnc); } if (tac_valid) g_print ("\t\tTracking Area Code: '%" G_GUINT16_FORMAT"'\n", tac); } } } { GArray *nr5g_tracking_area_code; if (qmi_message_nas_get_system_info_output_get_nr5g_tracking_area_code ( output, &nr5g_tracking_area_code, NULL)) { guint32 tac; g_assert (nr5g_tracking_area_code->len == 3); tac = ((((g_array_index (nr5g_tracking_area_code, guint8, 0) << 8) | g_array_index (nr5g_tracking_area_code, guint8, 1)) << 8) | g_array_index (nr5g_tracking_area_code, guint8, 2)); g_print ("\t5GNR Tracking Area Code: '%" G_GUINT32_FORMAT "'\n", tac); } } /* Common */ { QmiNasSimRejectState sim_reject_info; if (qmi_message_nas_get_system_info_output_get_sim_reject_info ( output, &sim_reject_info, NULL)) { g_print ("\tSIM reject info: '%s'\n", qmi_nas_sim_reject_state_get_string (sim_reject_info)); } } qmi_message_nas_get_system_info_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO */ #if defined HAVE_QMI_MESSAGE_NAS_GET_TECHNOLOGY_PREFERENCE static void get_technology_preference_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetTechnologyPreferenceOutput *output; GError *error = NULL; QmiNasRadioTechnologyPreference preference; QmiNasPreferenceDuration duration; g_autofree gchar *preference_string = NULL; g_autofree gchar *persistent_preference_string = NULL; output = qmi_client_nas_get_technology_preference_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_technology_preference_output_get_result (output, &error)) { g_printerr ("error: couldn't get technology preference: %s\n", error->message); g_error_free (error); qmi_message_nas_get_technology_preference_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_nas_get_technology_preference_output_get_active ( output, &preference, &duration, NULL); preference_string = qmi_nas_radio_technology_preference_build_string_from_mask (preference); g_print ("[%s] Successfully got technology preference\n" "\tActive: '%s', duration: '%s'\n", qmi_device_get_path_display (ctx->device), VALIDATE_MASK_NONE (preference_string), qmi_nas_preference_duration_get_string (duration)); if (qmi_message_nas_get_technology_preference_output_get_persistent ( output, &preference, NULL)) { persistent_preference_string = qmi_nas_radio_technology_preference_build_string_from_mask (preference); g_print ("\tPersistent: '%s'\n", VALIDATE_MASK_NONE (persistent_preference_string)); } qmi_message_nas_get_technology_preference_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_TECHNOLOGY_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_SELECTION_PREFERENCE static void get_system_selection_preference_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetSystemSelectionPreferenceOutput *output; GError *error = NULL; gboolean emergency_mode; QmiNasRatModePreference mode_preference; QmiNasRatModePreference disabled_modes; QmiNasBandPreference band_preference; QmiNasLteBandPreference lte_band_preference; QmiNasTdScdmaBandPreference td_scdma_band_preference; QmiNasCdmaPrlPreference cdma_prl_preference; QmiNasRoamingPreference roaming_preference; QmiNasNetworkSelectionPreference network_selection_preference; QmiNasServiceDomainPreference service_domain_preference; QmiNasUsagePreference usage_preference; QmiNasGsmWcdmaAcquisitionOrderPreference gsm_wcdma_acquisition_order_preference; QmiNasNetworkSelectionRegistrationRestriction registration_restriction; QmiNasVoiceDomainPreference voice_domain_preference; guint16 mcc; guint16 mnc; guint64 extended_lte_band_preference[4]; guint64 nr5g_sa_band_preference[8]; guint64 nr5g_nsa_band_preference[8]; gboolean has_pcs_digit; GArray *acquisition_order_preference; output = qmi_client_nas_get_system_selection_preference_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_system_selection_preference_output_get_result (output, &error)) { g_printerr ("error: couldn't get system_selection preference: %s\n", error->message); g_error_free (error); qmi_message_nas_get_system_selection_preference_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got system selection preference\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_nas_get_system_selection_preference_output_get_emergency_mode ( output, &emergency_mode, NULL)) { g_print ("\tEmergency mode: '%s'\n", emergency_mode ? "yes" : "no"); } if (qmi_message_nas_get_system_selection_preference_output_get_mode_preference ( output, &mode_preference, NULL)) { g_autofree gchar *str = NULL; str = qmi_nas_rat_mode_preference_build_string_from_mask (mode_preference); g_print ("\tMode preference: '%s'\n", VALIDATE_MASK_NONE (str)); } if (qmi_message_nas_get_system_selection_preference_output_get_disabled_modes ( output, &disabled_modes, NULL)) { g_autofree gchar *str = NULL; str = qmi_nas_rat_mode_preference_build_string_from_mask (disabled_modes); g_print ("\tDisabled modes: '%s'\n", VALIDATE_MASK_NONE (str)); } if (qmi_message_nas_get_system_selection_preference_output_get_band_preference ( output, &band_preference, NULL)) { g_autofree gchar *str = NULL; str = qmi_nas_band_preference_build_string_from_mask (band_preference); g_print ("\tBand preference: '%s'\n", VALIDATE_MASK_NONE (str)); } if (qmi_message_nas_get_system_selection_preference_output_get_lte_band_preference ( output, <e_band_preference, NULL)) { g_autofree gchar *str = NULL; str = qmi_nas_lte_band_preference_build_string_from_mask (lte_band_preference); g_print ("\tLTE band preference: '%s'\n", VALIDATE_MASK_NONE (str)); } if (qmi_message_nas_get_system_selection_preference_output_get_extended_lte_band_preference ( output, &extended_lte_band_preference[0], &extended_lte_band_preference[1], &extended_lte_band_preference[2], &extended_lte_band_preference[3], NULL)) { guint i; gboolean first = TRUE; g_print ("\tLTE band preference (extended): '"); for (i = 0; i < G_N_ELEMENTS (extended_lte_band_preference); i++) { guint j; for (j = 0; j < 64; j++) { guint band; if (!(extended_lte_band_preference[i] & (((guint64) 1) << j))) continue; band = 1 + j + (i * 64); if (first) { g_print ("%u", band); first = FALSE; } else g_print (", %u", band); } } g_print ("'\n"); } if (qmi_message_nas_get_system_selection_preference_output_get_nr5g_sa_band_preference ( output, &nr5g_sa_band_preference[0], &nr5g_sa_band_preference[1], &nr5g_sa_band_preference[2], &nr5g_sa_band_preference[3], &nr5g_sa_band_preference[4], &nr5g_sa_band_preference[5], &nr5g_sa_band_preference[6], &nr5g_sa_band_preference[7], NULL)) { guint i; gboolean first = TRUE; g_print ("\tNR5G SA band preference: '"); for (i = 0; i < G_N_ELEMENTS (nr5g_sa_band_preference); i++) { guint j; for (j = 0; j < 64; j++) { guint band; if (!(nr5g_sa_band_preference[i] & (((guint64) 1) << j))) continue; band = 1 + j + (i * 64); if (first) { g_print ("%u", band); first = FALSE; } else g_print (", %u", band); } } g_print ("'\n"); } if (qmi_message_nas_get_system_selection_preference_output_get_nr5g_nsa_band_preference ( output, &nr5g_nsa_band_preference[0], &nr5g_nsa_band_preference[1], &nr5g_nsa_band_preference[2], &nr5g_nsa_band_preference[3], &nr5g_nsa_band_preference[4], &nr5g_nsa_band_preference[5], &nr5g_nsa_band_preference[6], &nr5g_nsa_band_preference[7], NULL)) { guint i; gboolean first = TRUE; g_print ("\tNR5G NSA band preference: '"); for (i = 0; i < G_N_ELEMENTS (nr5g_nsa_band_preference); i++) { guint j; for (j = 0; j < 64; j++) { guint band; if (!(nr5g_nsa_band_preference[i] & (((guint64) 1) << j))) continue; band = 1 + j + (i * 64); if (first) { g_print ("%u", band); first = FALSE; } else g_print (", %u", band); } } g_print ("'\n"); } if (qmi_message_nas_get_system_selection_preference_output_get_td_scdma_band_preference ( output, &td_scdma_band_preference, NULL)) { g_autofree gchar *str = NULL; str = qmi_nas_td_scdma_band_preference_build_string_from_mask (td_scdma_band_preference); g_print ("\tTD-SCDMA band preference: '%s'\n", VALIDATE_MASK_NONE (str)); } if (qmi_message_nas_get_system_selection_preference_output_get_cdma_prl_preference ( output, &cdma_prl_preference, NULL)) { g_print ("\tCDMA PRL preference: '%s'\n", qmi_nas_cdma_prl_preference_get_string (cdma_prl_preference)); } if (qmi_message_nas_get_system_selection_preference_output_get_roaming_preference ( output, &roaming_preference, NULL)) { g_print ("\tRoaming preference: '%s'\n", qmi_nas_roaming_preference_get_string (roaming_preference)); } if (qmi_message_nas_get_system_selection_preference_output_get_network_selection_preference ( output, &network_selection_preference, NULL)) { g_print ("\tNetwork selection preference: '%s'\n", qmi_nas_network_selection_preference_get_string (network_selection_preference)); } if (qmi_message_nas_get_system_selection_preference_output_get_service_domain_preference ( output, &service_domain_preference, NULL)) { g_print ("\tService domain preference: '%s'\n", qmi_nas_service_domain_preference_get_string (service_domain_preference)); } if (qmi_message_nas_get_system_selection_preference_output_get_gsm_wcdma_acquisition_order_preference ( output, &gsm_wcdma_acquisition_order_preference, NULL)) { g_print ("\tGSM/WCDMA acquisition order preference: '%s'\n", qmi_nas_gsm_wcdma_acquisition_order_preference_get_string (gsm_wcdma_acquisition_order_preference)); } if (qmi_message_nas_get_system_selection_preference_output_get_usage_preference ( output, &usage_preference, NULL)) { g_print ("\tUsage preference: '%s'\n", qmi_nas_usage_preference_get_string (usage_preference)); } if (qmi_message_nas_get_system_selection_preference_output_get_voice_domain_preference ( output, &voice_domain_preference, NULL)) { g_print ("\tVoice domain preference: '%s'\n", qmi_nas_voice_domain_preference_get_string (voice_domain_preference)); } if (qmi_message_nas_get_system_selection_preference_output_get_network_selection_registration_restriction ( output, ®istration_restriction, NULL)) { g_print ("\tRegistration restriction: '%s'\n", qmi_nas_network_selection_registration_restriction_get_string (registration_restriction)); } if (qmi_message_nas_get_system_selection_preference_output_get_manual_network_selection ( output, &mcc, &mnc, &has_pcs_digit, NULL)) { g_print ("\tManual network selection:\n" "\t\tMCC: '%" G_GUINT16_FORMAT"'\n" "\t\tMNC: '%" G_GUINT16_FORMAT"'\n" "\t\tMCC with PCS digit: '%s'\n", mcc, mnc, has_pcs_digit ? "yes" : "no"); } if (qmi_message_nas_get_system_selection_preference_output_get_acquisition_order_preference ( output, &acquisition_order_preference, NULL)) { guint i; g_print ("\tAcquisition order preference: '"); for (i = 0; i < acquisition_order_preference->len; i++) { QmiNasRadioInterface radio_interface; radio_interface = g_array_index (acquisition_order_preference, QmiNasRadioInterface, i); g_print ("%s%s", i > 0 ? ", " : "", qmi_nas_radio_interface_get_string (radio_interface)); } g_print ("'\n"); } qmi_message_nas_get_system_selection_preference_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_SELECTION_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE static QmiMessageNasSetSystemSelectionPreferenceInput * set_system_selection_preference_input_create (const gchar *str) { QmiMessageNasSetSystemSelectionPreferenceInput *input = NULL; GError *error = NULL; gchar *rat_pref_str = NULL; gchar *net_pref_str = NULL; QmiNasRatModePreference rat_mode_preference = 0; GArray *acquisition_order = NULL; QmiNasNetworkSelectionPreference net_preference = 0; guint16 mcc = 0; guint16 mnc = 0; if (strchr (str, ',')) { gchar **parts; /* Both RAT mode preference and network selection preference were given */ parts = g_strsplit_set (str, ",", -1); if (g_strv_length (parts) != 2) { g_printerr ("error: failed to parse selection pref: '%s'\n", str); g_strfreev (parts); return NULL; } rat_pref_str = g_strdup (parts[0]); net_pref_str = g_strdup (parts[1]); g_strfreev (parts); } else if (g_str_has_prefix (str, "automatic") || g_str_has_prefix (str, "manual")) { /* Only network selection preference was given */ net_pref_str = g_strdup (str); } else { /* Only RAT mode preference was given */ rat_pref_str = g_strdup (str); } if (net_pref_str && !qmicli_read_ssp_net_options_from_string (net_pref_str, &net_preference, &mcc, &mnc)) { g_printerr ("error: failed to parse network preference options: '%s'\n", net_pref_str); goto out; } if (rat_pref_str && !qmicli_read_ssp_rat_options_from_string (rat_pref_str, &rat_mode_preference, &acquisition_order)) { g_printerr ("error: failed to parse system selection preference options: '%s'\n", rat_pref_str); goto out; } /* from now on, if an error happens, the GError must be set */ input = qmi_message_nas_set_system_selection_preference_input_new (); if (!qmi_message_nas_set_system_selection_preference_input_set_change_duration (input, QMI_NAS_CHANGE_DURATION_PERMANENT, &error)) goto out; if (rat_mode_preference && !qmi_message_nas_set_system_selection_preference_input_set_mode_preference (input, rat_mode_preference, &error)) goto out; if ((rat_mode_preference & (QMI_NAS_RAT_MODE_PREFERENCE_GSM | QMI_NAS_RAT_MODE_PREFERENCE_UMTS | QMI_NAS_RAT_MODE_PREFERENCE_LTE)) && (!qmi_message_nas_set_system_selection_preference_input_set_gsm_wcdma_acquisition_order_preference ( input, QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC, &error))) goto out; if (acquisition_order && !qmi_message_nas_set_system_selection_preference_input_set_acquisition_order_preference (input, acquisition_order, &error)) goto out; if (net_pref_str && !qmi_message_nas_set_system_selection_preference_input_set_network_selection_preference (input, net_preference, mcc, mnc, &error)) goto out; out: g_free (rat_pref_str); g_free (net_pref_str); if (acquisition_order) g_array_unref (acquisition_order); if (error) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_nas_set_system_selection_preference_input_unref (input); return NULL; } return input; } static void set_system_selection_preference_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasSetSystemSelectionPreferenceOutput *output = NULL; GError *error = NULL; output = qmi_client_nas_set_system_selection_preference_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_set_system_selection_preference_output_get_result (output, &error)) { g_printerr ("error: couldn't set operating mode: %s\n", error->message); g_error_free (error); qmi_message_nas_set_system_selection_preference_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] System selection preference set successfully; replug your device.\n", qmi_device_get_path_display (ctx->device)); qmi_message_nas_set_system_selection_preference_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE */ #if defined HAVE_QMI_MESSAGE_NAS_NETWORK_SCAN static void network_scan_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasNetworkScanOutput *output; QmiNasNetworkScanResult network_scan_result; GError *error = NULL; GArray *array; output = qmi_client_nas_network_scan_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_network_scan_output_get_result (output, &error)) { g_printerr ("error: couldn't scan networks: %s\n", error->message); g_error_free (error); qmi_message_nas_network_scan_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully scanned networks\n", qmi_device_get_path_display (ctx->device)); array = NULL; if (qmi_message_nas_network_scan_output_get_network_information (output, &array, NULL)) { guint i; for (i = 0; i < array->len; i++) { QmiMessageNasNetworkScanOutputNetworkInformationElement *element; g_autofree gchar *status_str = NULL; element = &g_array_index (array, QmiMessageNasNetworkScanOutputNetworkInformationElement, i); status_str = qmi_nas_network_status_build_string_from_mask (element->network_status); g_print ("Network [%u]:\n" "\tMCC: '%" G_GUINT16_FORMAT"'\n" "\tMNC: '%" G_GUINT16_FORMAT"'\n" "\tStatus: '%s'\n" "\tDescription: '%s'\n", i, element->mcc, element->mnc, VALIDATE_MASK_NONE (status_str), element->description); } } array = NULL; if (qmi_message_nas_network_scan_output_get_radio_access_technology (output, &array, NULL)) { guint i; for (i = 0; i < array->len; i++) { QmiMessageNasNetworkScanOutputRadioAccessTechnologyElement *element; element = &g_array_index (array, QmiMessageNasNetworkScanOutputRadioAccessTechnologyElement, i); g_print ("Network [%u]:\n" "\tMCC: '%" G_GUINT16_FORMAT"'\n" "\tMNC: '%" G_GUINT16_FORMAT"'\n" "\tRAT: '%s'\n", i, element->mcc, element->mnc, qmi_nas_radio_interface_get_string (element->radio_interface)); } } array = NULL; if (qmi_message_nas_network_scan_output_get_mnc_pcs_digit_include_status (output, &array, NULL)) { guint i; for (i = 0; i < array->len; i++) { QmiMessageNasNetworkScanOutputMncPcsDigitIncludeStatusElement *element; element = &g_array_index (array, QmiMessageNasNetworkScanOutputMncPcsDigitIncludeStatusElement, i); g_print ("Network [%u]:\n" "\tMCC: '%" G_GUINT16_FORMAT"'\n" "\tMNC: '%" G_GUINT16_FORMAT"'\n" "\tMCC with PCS digit: '%s'\n", i, element->mcc, element->mnc, element->includes_pcs_digit ? "yes" : "no"); } } if (qmi_message_nas_network_scan_output_get_network_scan_result (output, &network_scan_result, NULL)) { g_print ("Network scan result: %s\n", qmi_nas_network_scan_result_get_string (network_scan_result)); } qmi_message_nas_network_scan_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_NETWORK_SCAN */ #if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO static gchar * str_from_bcd_plmn (GArray *bcd) { static const gchar bcd_chars[] = "0123456789*#abc\0\0"; gchar *str; guint i; guint j; if (!bcd || !bcd->len) return NULL; str = g_malloc (1 + (bcd->len * 2)); for (i = 0, j = 0 ; i < bcd->len; i++) { str[j] = bcd_chars[g_array_index (bcd, guint8, i) & 0xF]; if (str[j]) j++; str[j] = bcd_chars[(g_array_index (bcd, guint8, i) >> 4) & 0xF]; if (str[j]) j++; } str[j] = '\0'; return str; } static void get_cell_location_info_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetCellLocationInfoOutput *output; GError *error = NULL; GArray *array; GArray *array2; GArray *operator; guint32 cell_id; guint16 lac; guint16 absolute_rf_channel_number; guint8 base_station_identity_code; guint32 timing_advance; guint16 rx_level; guint16 cell_id_16; guint16 primary_scrambling_code; gint16 rscp; gint16 ecio; guint16 system_id; guint16 network_id; guint16 base_station_id; guint16 reference_pn; guint32 latitude; guint32 longitude; gboolean ue_in_idle; guint16 tracking_area_code; guint32 global_cell_id; guint16 serving_cell_id; guint8 cell_reselection_priority; guint8 s_non_intra_search_threshold; guint8 serving_cell_low_threshold; guint8 s_intra_search_threshold; QmiNasWcdmaRrcState rrc_state; guint32 lte_timing_advance; guint32 nr5g_arfcn; GArray *nr5g_cell_information_plmn; GArray *nr5g_cell_information_tac; guint64 nr5g_cell_information_global_cell_id; guint16 nr5g_cell_information_physical_cell_id; gint16 nr5g_cell_information_rsrp; gint16 nr5g_cell_information_rsrq; gint16 nr5g_cell_information_snr; output = qmi_client_nas_get_cell_location_info_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_cell_location_info_output_get_result (output, &error)) { g_printerr ("error: couldn't get cell location info: %s\n", error->message); g_error_free (error); qmi_message_nas_get_cell_location_info_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got cell location info\n", qmi_device_get_path_display (ctx->device)); array = NULL; if (qmi_message_nas_get_cell_location_info_output_get_geran_info_v2 ( output, &cell_id, &operator, &lac, &absolute_rf_channel_number, &base_station_identity_code, &timing_advance, &rx_level, &array, NULL)) { guint i; g_print ("GERAN Info\n"); if (cell_id == 0xFFFFFFFF) g_print ("\tCell ID: 'unavailable'\n" "\tPLMN: 'unavailable'\n" "\tLocation Area Code: 'unavailable'\n"); else { gchar *plmn; plmn = str_from_bcd_plmn (operator); g_print ("\tCell ID: '%" G_GUINT32_FORMAT"'\n" "\tPLMN: '%s'\n" "\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", cell_id, plmn, lac); g_free (plmn); } g_print ("\tGERAN Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n" "\tBase Station Identity Code: '%u'\n", absolute_rf_channel_number, base_station_identity_code); if (timing_advance == 0xFFFFFFFF) g_print ("\tTiming Advance: 'unavailable'\n"); else g_print ("\tTiming Advance: '%" G_GUINT32_FORMAT"' bit periods ('%lf' us)\n", timing_advance, (gdouble)timing_advance * 48.0 / 13.0); if (rx_level == 0) g_print ("\tRX Level: -110 dBm > level ('%" G_GUINT16_FORMAT"')\n", rx_level); else if (rx_level == 63) g_print ("\tRX Level: level > -48 dBm ('%" G_GUINT16_FORMAT"')\n", rx_level); else if (rx_level > 0 && rx_level < 63) g_print ("\tRX Level: %d dBm > level > %d dBm ('%" G_GUINT16_FORMAT"')\n", (gint32) rx_level - 111, (gint32) rx_level - 110, rx_level); else g_print ("\tRX Level: invalid ('%" G_GUINT16_FORMAT"')\n", rx_level); for (i = 0; i < array->len; i++) { QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement *element; element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputGeranInfoV2CellElement, i); g_print ("\tCell [%u]:\n", i); if (element->cell_id == 0xFFFFFFFF) g_print ("\t\tCell ID: 'unavailable'\n" "\t\tPLMN: 'unavailable'\n" "\t\tLocation Area Code: 'unavailable'\n"); else { gchar *plmn; plmn = str_from_bcd_plmn (element->plmn); g_print ("\t\tCell ID: '%" G_GUINT32_FORMAT"'\n" "\t\tPLMN: '%s'\n" "\t\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n", element->cell_id, plmn, element->lac); g_free (plmn); } g_print ("\t\tGERAN Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n" "\t\tBase Station Identity Code: '%u'\n", element->geran_absolute_rf_channel_number, element->base_station_identity_code); if (element->rx_level == 0) g_print ("\t\tRX Level: -110 dBm > level ('%" G_GUINT16_FORMAT"')\n", element->rx_level); else if (element->rx_level == 63) g_print ("\t\tRX Level: level > -48 dBm ('%" G_GUINT16_FORMAT"')\n", element->rx_level); else if (element->rx_level > 0 && element->rx_level < 63) g_print ("\t\tRX Level: %d dBm > level > %d dBm ('%" G_GUINT16_FORMAT"')\n", (gint32) element->rx_level - 111, (gint32) element->rx_level - 110, element->rx_level); else g_print ("\tRX Level: invalid ('%" G_GUINT16_FORMAT"')\n", element->rx_level); } } array = NULL; array2 = NULL; if (qmi_message_nas_get_cell_location_info_output_get_umts_info_v2 ( output, &cell_id_16, &operator, &lac, &absolute_rf_channel_number, &primary_scrambling_code, &rscp, &ecio, &array, &array2, NULL)) { guint i; gchar *plmn; g_print ("UMTS Info\n"); if (cell_id_16 == 0xFFFF) g_print ("\tCell ID: 'unavailable'\n"); else g_print ("\tCell ID: '%" G_GUINT16_FORMAT"'\n", cell_id_16); plmn = str_from_bcd_plmn (operator); g_print ("\tPLMN: '%s'\n" "\tLocation Area Code: '%" G_GUINT16_FORMAT"'\n" "\tUTRA Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n" "\tPrimary Scrambling Code: '%" G_GUINT16_FORMAT"'\n" "\tRSCP: '%" G_GINT16_FORMAT"' dBm\n" "\tECIO: '%" G_GINT16_FORMAT"' dBm\n", plmn, lac, absolute_rf_channel_number, primary_scrambling_code, rscp, ecio); g_free (plmn); for (i = 0; i < array->len; i++) { QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2CellElement *element; element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2CellElement, i); g_print ("\tCell [%u]:\n" "\t\tUTRA Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n" "\t\tPrimary Scrambling Code: '%" G_GUINT16_FORMAT"'\n" "\t\tRSCP: '%" G_GINT16_FORMAT"' dBm\n" "\t\tECIO: '%" G_GINT16_FORMAT"' dBm\n", i, element->utra_absolute_rf_channel_number, element->primary_scrambling_code, element->rscp, element->ecio); } for (i = 0; i < array2->len; i++) { QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2NeighboringGeranElement *element; element = &g_array_index (array2, QmiMessageNasGetCellLocationInfoOutputUmtsInfoV2NeighboringGeranElement, i); g_print ("\tNeighboring GERAN Cell [%u]:\n" "\t\tGERAN Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n", i, element->geran_absolute_rf_channel_number); if (element->network_color_code == 0xFF) g_print ("\t\tNetwork Color Code: 'unavailable'\n"); else g_print ("\t\tNetwork Color Code: '%u'\n", element->network_color_code); if (element->base_station_color_code == 0xFF) g_print ("\t\tBase Station Color Code: 'unavailable'\n"); else g_print ("\t\tBase Station Color Code: '%u'\n", element->base_station_color_code); g_print ("\t\tRSSI: '%" G_GUINT16_FORMAT"'\n", element->rssi); } } if (qmi_message_nas_get_cell_location_info_output_get_cdma_info ( output, &system_id, &network_id, &base_station_id, &reference_pn, &latitude, &longitude, NULL)) { gdouble latitude_degrees; gdouble longitude_degrees; /* TODO: give degrees, minutes, seconds */ latitude_degrees = ((gdouble)latitude * 0.25)/3600.0; longitude_degrees = ((gdouble)longitude * 0.25)/3600.0; g_print ("CDMA Info\n" "\tSystem ID: '%" G_GUINT16_FORMAT"'\n" "\tNetwork ID: '%" G_GUINT16_FORMAT"'\n" "\tBase Station ID: '%" G_GUINT16_FORMAT"'\n" "\tReference PN: '%" G_GUINT16_FORMAT"'\n" "\tLatitude: '%lf'º\n" "\tLongitude: '%lfº'\n", system_id, network_id, base_station_id, reference_pn, latitude_degrees, longitude_degrees); } array = NULL; if (qmi_message_nas_get_cell_location_info_output_get_intrafrequency_lte_info_v2 ( output, &ue_in_idle, &operator, &tracking_area_code, &global_cell_id, &absolute_rf_channel_number, &serving_cell_id, &cell_reselection_priority, &s_non_intra_search_threshold, &serving_cell_low_threshold, &s_intra_search_threshold, &array, NULL)) { guint i; gchar *plmn; plmn = str_from_bcd_plmn (operator); g_print ("Intrafrequency LTE Info\n" "\tUE In Idle: '%s'\n" "\tPLMN: '%s'\n" "\tTracking Area Code: '%" G_GUINT16_FORMAT"'\n" "\tGlobal Cell ID: '%" G_GUINT32_FORMAT"'\n" "\tEUTRA Absolute RF Channel Number: '%" G_GUINT16_FORMAT"' (%s)\n" "\tServing Cell ID: '%" G_GUINT16_FORMAT"'\n", ue_in_idle ? "yes" : "no", plmn, tracking_area_code, global_cell_id, absolute_rf_channel_number, qmicli_earfcn_to_eutra_band_string (absolute_rf_channel_number), serving_cell_id); g_free (plmn); if (ue_in_idle) g_print ("\tCell Reselection Priority: '%u'\n" "\tS Non Intra Search Threshold: '%u'\n" "\tServing Cell Low Threshold: '%u'\n" "\tS Intra Search Threshold: '%u'\n", cell_reselection_priority, s_non_intra_search_threshold, serving_cell_low_threshold, s_intra_search_threshold); for (i = 0; i < array->len; i++) { QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement *element; element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputIntrafrequencyLteInfoV2CellElement, i); g_print ("\tCell [%u]:\n" "\t\tPhysical Cell ID: '%" G_GUINT16_FORMAT"'\n" "\t\tRSRQ: '%.1lf' dB\n" "\t\tRSRP: '%.1lf' dBm\n" "\t\tRSSI: '%.1lf' dBm\n", i, element->physical_cell_id, (gdouble) element->rsrq * 0.1, (gdouble) element->rsrp * 0.1, (gdouble) element->rssi * 0.1); if (ue_in_idle) g_print ("\t\tCell Selection RX Level: '%" G_GINT16_FORMAT"'\n", element->cell_selection_rx_level); } } array = NULL; if (qmi_message_nas_get_cell_location_info_output_get_interfrequency_lte_info ( output, &ue_in_idle, &array, NULL)) { guint i; g_print ("Interfrequency LTE Info\n" "\tUE In Idle: '%s'\n", ue_in_idle ? "yes" : "no"); for (i = 0; i < array->len; i++) { QmiMessageNasGetCellLocationInfoOutputInterfrequencyLteInfoFrequencyElement *element; GArray *cell_array; guint j; element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputInterfrequencyLteInfoFrequencyElement, i); g_print ("\tFrequency [%u]:\n" "\t\tEUTRA Absolute RF Channel Number: '%" G_GUINT16_FORMAT"' (%s)\n" "\t\tSelection RX Level Low Threshold: '%u'\n" "\t\tCell Selection RX Level High Threshold: '%u'\n", i, element->eutra_absolute_rf_channel_number, qmicli_earfcn_to_eutra_band_string (element->eutra_absolute_rf_channel_number), element->cell_selection_rx_level_low_threshold, element->cell_selection_rx_level_high_threshold); if (ue_in_idle) g_print ("\t\tCell Reselection Priority: '%u'\n", element->cell_reselection_priority); cell_array = element->cell; for (j = 0; j < cell_array->len; j++) { QmiMessageNasGetCellLocationInfoOutputInterfrequencyLteInfoFrequencyElementCellElement *cell; cell = &g_array_index (cell_array, QmiMessageNasGetCellLocationInfoOutputInterfrequencyLteInfoFrequencyElementCellElement, j); g_print ("\t\tCell [%u]:\n" "\t\t\tPhysical Cell ID: '%" G_GUINT16_FORMAT"'\n" "\t\t\tRSRQ: '%.1lf' dB\n" "\t\t\tRSRP: '%.1lf' dBm\n" "\t\t\tRSSI: '%.1lf' dBm\n" "\t\t\tCell Selection RX Level: '%" G_GINT16_FORMAT"'\n", j, cell->physical_cell_id, (gdouble) cell->rsrq * 0.1, (gdouble) cell->rsrp * 0.1, (gdouble) cell->rssi * 0.1, cell->cell_selection_rx_level); } } } array = NULL; if (qmi_message_nas_get_cell_location_info_output_get_lte_info_neighboring_gsm ( output, &ue_in_idle, &array, NULL)) { guint i; g_print ("LTE Info Neighboring GSM\n" "\tUE In Idle: '%s'\n", ue_in_idle ? "yes" : "no"); for (i = 0; i < array->len; i++) { QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringGsmFrequencyElement *element; GArray *cell_array; guint j; element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringGsmFrequencyElement, i); g_print ("\tFrequency [%u]:\n", i); if (ue_in_idle) g_print ("\t\tCell Reselection Priority: '%u'\n" "\t\tCell Reselection High Threshold: '%u'\n" "\t\tCell Reselection Low Threshold: '%u'\n" "\t\tNCC Permitted: '0x%2X'\n", element->cell_reselection_priority, element->cell_reselection_high_threshold, element->cell_reselection_low_threshold, element->ncc_permitted); cell_array = element->cell; for (j = 0; j < cell_array->len; j++) { QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringGsmFrequencyElementCellElement *cell; cell = &g_array_index (cell_array, QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringGsmFrequencyElementCellElement, j); g_print ("\t\tCell [%u]:\n" "\t\t\tGERAN Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n" "\t\t\tBand Is 1900: '%s'\n", j, cell->geran_absolute_rf_channel_number, cell->band_is_1900 ? "yes" : "no"); if (cell->cell_id_valid) g_print ("\t\t\tBase Station Identity Code: '%u'\n", cell->base_station_identity_code); else g_print ("\t\t\tBase Station Identity Code: 'unknown'\n"); g_print ("\t\t\tRSSI: '%.1lf' dB\n" "\t\t\tCell Selection RX Level: '%" G_GINT16_FORMAT"'\n", (gdouble) cell->rssi * 0.1, cell->cell_selection_rx_level); } } } array = NULL; if (qmi_message_nas_get_cell_location_info_output_get_lte_info_neighboring_wcdma ( output, &ue_in_idle, &array, NULL)) { guint i; g_print ("LTE Info Neighboring WCDMA\n" "\tUE In Idle: '%s'\n", ue_in_idle ? "yes" : "no"); for (i = 0; i < array->len; i++) { QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringWcdmaFrequencyElement *element; GArray *cell_array; guint j; element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringWcdmaFrequencyElement, i); g_print ("\tFrequency [%u]:\n" "\t\tUTRA Absolute RF Channel Number: '%" G_GUINT16_FORMAT"'\n", i, element->utra_absolute_rf_channel_number); if (ue_in_idle) g_print ("\t\tCell Reselection Priority: '%u'\n" "\t\tCell Reselection High Threshold: '%" G_GINT16_FORMAT"'\n" "\t\tCell Reselection Low Threshold: '%" G_GINT16_FORMAT"'\n", element->cell_reselection_priority, element->cell_reselection_high_threshold, element->cell_reselection_low_threshold); cell_array = element->cell; for (j = 0; j < cell_array->len; j++) { QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringWcdmaFrequencyElementCellElement *cell; cell = &g_array_index (cell_array, QmiMessageNasGetCellLocationInfoOutputLteInfoNeighboringWcdmaFrequencyElementCellElement, j); g_print ("\t\tCell [%u]:\n" "\t\t\tPrimary Scrambling Code: '%" G_GUINT16_FORMAT"'\n" "\t\t\tCPICH RSCP: '%.1lf' dBm\n" "\t\t\tCPICH EcNo: '%.1lf' dB\n", j, cell->primary_scrambling_code, (gdouble) cell->cpich_rscp * 0.1, (gdouble) cell->cpich_ecno * 0.1); if (ue_in_idle) g_print ("\t\t\tCell Selection RX Level: '%" G_GUINT16_FORMAT"'\n", cell->cell_selection_rx_level); } } } if (qmi_message_nas_get_cell_location_info_output_get_umts_cell_id ( output, &cell_id, NULL)) { g_print ("UMTS Cell ID: '%" G_GUINT32_FORMAT"'\n", cell_id); } array = NULL; if (qmi_message_nas_get_cell_location_info_output_get_umts_info_neighboring_lte ( output, &rrc_state, &array, NULL)) { guint i; g_print ("UMTS Info Neighboring LTE\n" "\tRRC State: '%s'\n", qmi_nas_wcdma_rrc_state_get_string (rrc_state)); for (i = 0; i < array->len; i++) { QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringLteFrequencyElement *element; element = &g_array_index (array, QmiMessageNasGetCellLocationInfoOutputUmtsInfoNeighboringLteFrequencyElement, i); g_print ("\tFrequency [%u]:\n" "\t\tEUTRA Absolute RF Channel Number: '%" G_GUINT16_FORMAT"' (%s)\n" "\t\tPhysical Cell ID: '%" G_GUINT16_FORMAT "'\n" "\t\tRSRP: '%lf' dBm\n" "\t\tRSRQ: '%lf' dB\n", i, element->eutra_absolute_rf_channel_number, qmicli_earfcn_to_eutra_band_string (element->eutra_absolute_rf_channel_number), element->physical_cell_id, (gdouble)element->rsrp, (gdouble)element->rsrq); if (rrc_state != QMI_NAS_WCDMA_RRC_STATE_CELL_FACH && rrc_state != QMI_NAS_WCDMA_RRC_STATE_CELL_DCH) g_print ("\t\tCell Selection RX Level: '%" G_GINT16_FORMAT"'\n", element->cell_selection_rx_level); g_print ("\t\tIs TDD?: '%s'\n", element->is_tdd ? "yes" : "no"); } } if (qmi_message_nas_get_cell_location_info_output_get_lte_info_timing_advance ( output, <e_timing_advance, NULL)) { if (lte_timing_advance == 0xFFFFFFFF) g_print ("LTE Timing Advance: 'unavailable'\n"); else g_print ("LTE Timing Advance: '%" G_GUINT32_FORMAT"' us\n", lte_timing_advance); } if (qmi_message_nas_get_cell_location_info_output_get_nr5g_arfcn ( output, &nr5g_arfcn, NULL)) { g_print ("5GNR ARFCN: '%" G_GUINT32_FORMAT"'\n", nr5g_arfcn); } if (qmi_message_nas_get_cell_location_info_output_get_nr5g_cell_information ( output, &nr5g_cell_information_plmn, &nr5g_cell_information_tac, &nr5g_cell_information_global_cell_id, &nr5g_cell_information_physical_cell_id, &nr5g_cell_information_rsrq, &nr5g_cell_information_rsrp, &nr5g_cell_information_snr, NULL)) { g_autofree gchar *plmn = NULL; guint32 tac; plmn = str_from_bcd_plmn (nr5g_cell_information_plmn); g_assert (nr5g_cell_information_tac->len == 3); tac = ((((g_array_index (nr5g_cell_information_tac, guint8, 0) << 8) | g_array_index (nr5g_cell_information_tac, guint8, 1)) << 8) | g_array_index (nr5g_cell_information_tac, guint8, 2)); g_print ("5GNR cell information\n" "\tPLMN: '%s'\n" "\tTracking Area Code: '%" G_GUINT32_FORMAT "'\n" "\tGlobal Cell ID: '%" G_GUINT64_FORMAT "'\n" "\tPhysical Cell ID: '%" G_GUINT16_FORMAT "'\n" "\tRSRQ: '%.1lf dB'\n" "\tRSRP: '%.1lf dBm'\n" "\tSNR: '%.1lf dB'\n", plmn, tac, nr5g_cell_information_global_cell_id, nr5g_cell_information_physical_cell_id, (0.1) * ((gdouble)nr5g_cell_information_rsrq), (0.1) * ((gdouble)nr5g_cell_information_rsrp), (0.1) * ((gdouble)nr5g_cell_information_snr)); } qmi_message_nas_get_cell_location_info_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO */ #if defined HAVE_QMI_MESSAGE_NAS_FORCE_NETWORK_SEARCH static void force_network_search_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasForceNetworkSearchOutput *output; GError *error = NULL; output = qmi_client_nas_force_network_search_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_force_network_search_output_get_result (output, &error)) { g_printerr ("error: couldn't force network search: %s\n", error->message); g_error_free (error); qmi_message_nas_force_network_search_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully forced network search\n", qmi_device_get_path_display (ctx->device)); qmi_message_nas_force_network_search_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_FORCE_NETWORK_SEARCH */ #if defined HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME static void get_operator_name_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetOperatorNameOutput *output; GError *error = NULL; QmiNasNetworkNameDisplayCondition spn_display_condition; const gchar *spn; const gchar *operator_name; GArray *array; QmiNasPlmnEncodingScheme nitz_information_name_encoding; QmiNasPlmnNameCountryInitials nitz_information_short_country_initials; QmiNasPlmnNameSpareBits nitz_information_long_name_spare_bits; QmiNasPlmnNameSpareBits nitz_information_short_name_spare_bits; GArray *nitz_information_long_name; GArray *nitz_information_short_name; output = qmi_client_nas_get_operator_name_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_operator_name_output_get_result (output, &error)) { g_printerr ("error: couldn't get operator name data: %s\n", error->message); g_error_free (error); qmi_message_nas_get_operator_name_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got operator name data\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_nas_get_operator_name_output_get_service_provider_name ( output, &spn_display_condition, &spn, NULL)) { g_autofree gchar *dc_string = NULL; dc_string = qmi_nas_network_name_display_condition_build_string_from_mask (spn_display_condition); g_print ("Service Provider Name\n"); g_print ("\tDisplay Condition: '%s'\n" "\tName : '%s'\n", VALIDATE_MASK_NONE (dc_string), spn); } if (qmi_message_nas_get_operator_name_output_get_operator_string_name ( output, &operator_name, NULL)) { g_print ("Operator Name: '%s'\n", operator_name); } if (qmi_message_nas_get_operator_name_output_get_operator_plmn_list (output, &array, NULL)) { guint i; g_print ("PLMN List:\n"); for (i = 0; i < array->len; i++) { QmiMessageNasGetOperatorNameOutputOperatorPlmnListElement *element; gchar *mnc; element = &g_array_index (array, QmiMessageNasGetOperatorNameOutputOperatorPlmnListElement, i); mnc = g_strdup (element->mnc); if (strlen (mnc) >= 3 && (mnc[2] == 'F' || mnc[2] == 'f')) mnc[2] = '\0'; g_print ("\tMCC/MNC: '%s-%s'%s LAC Range: %u->%u\tPNN Record: %u\n", element->mcc, mnc, mnc[2] == '\0' ? " " : "", element->lac1, element->lac2, element->plmn_name_record_identifier); } } if (qmi_message_nas_get_operator_name_output_get_operator_plmn_name (output, &array, NULL)) { guint i; g_print ("PLMN Names:\n"); for (i = 0; i < array->len; i++) { QmiMessageNasGetOperatorNameOutputOperatorPlmnNameElement *element; gchar *long_name; gchar *short_name; element = &g_array_index (array, QmiMessageNasGetOperatorNameOutputOperatorPlmnNameElement, i); long_name = qmi_nas_read_string_from_plmn_encoded_array (element->name_encoding, element->long_name); short_name = qmi_nas_read_string_from_plmn_encoded_array (element->name_encoding, element->short_name); g_print ("\t%d: '%s'%s%s%s\t\tCountry: '%s'\n", i, long_name ?: "", short_name ? " ('" : "", short_name ?: "", short_name ? "')" : "", qmi_nas_plmn_name_country_initials_get_string (element->short_country_initials)); g_free (long_name); g_free (short_name); } } if (qmi_message_nas_get_operator_name_output_get_nitz_information ( output, &nitz_information_name_encoding, &nitz_information_short_country_initials, &nitz_information_long_name_spare_bits, &nitz_information_short_name_spare_bits, &nitz_information_long_name, &nitz_information_short_name, NULL)) { g_autofree gchar *long_name = NULL; g_autofree gchar *short_name = NULL; long_name = qmi_nas_read_string_from_plmn_encoded_array (nitz_information_name_encoding, nitz_information_long_name); short_name = qmi_nas_read_string_from_plmn_encoded_array (nitz_information_name_encoding, nitz_information_short_name); g_print ("NITZ information:\n" "\tLong Name: '%s'\n" "\tShort Name: '%s'\n" "\tCountry: '%s'\n", long_name ?: "", short_name ?: "", qmi_nas_plmn_name_country_initials_get_string (nitz_information_short_country_initials)); } qmi_message_nas_get_operator_name_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME */ #if defined HAVE_QMI_MESSAGE_NAS_GET_PLMN_NAME static QmiMessageNasGetPlmnNameInput * set_plmn_name_input_plmn_create (const gchar *str) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessageNasGetPlmnNameInput) input = NULL; guint16 mcc = 0; guint16 mnc = 0; if (!qmicli_read_parse_3gpp_mcc_mnc (str, &mcc, &mnc, NULL)) { g_printerr ("error: invalid net selection MCC/MNC: '%s'\n", str); return NULL; } input = qmi_message_nas_get_plmn_name_input_new (); if (!qmi_message_nas_get_plmn_name_input_set_plmn ( input, mcc, mnc, &error)) { g_printerr ("error: couldn't set MCC/MNC: '%s'\n", error->message); g_clear_pointer(&input, qmi_message_nas_get_plmn_name_input_unref); } return input; } static void get_plmn_name_ready (QmiClientNas *client, GAsyncResult *res) { g_autoptr(QmiMessageNasGetPlmnNameOutput) output = NULL; g_autoptr(GError) error = NULL; GArray *array; QmiNasNetworkDescriptionEncoding plmn_name_service_provider_name_encoding; GArray *plmn_name_service_provider_name; QmiNasNetworkDescriptionEncoding plmn_name_short_name_encoding; QmiNasPlmnNameCountryInitials plmn_name_short_name_country_initials; QmiNasPlmnNameSpareBits plmn_name_short_name_spare_bits; GArray *plmn_name_short_name; QmiNasNetworkDescriptionEncoding plmn_name_long_name_encoding; QmiNasPlmnNameCountryInitials plmn_name_long_name_country_initials; QmiNasPlmnNameSpareBits plmn_name_long_name_spare_bits; GArray *plmn_name_long_name; output = qmi_client_nas_get_plmn_name_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_plmn_name_output_get_result (output, &error)) { g_printerr ("error: couldn't get operator name data: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got plmn name data\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_nas_get_plmn_name_output_get_3gpp_eons_plmn_name ( output, &plmn_name_service_provider_name_encoding, &plmn_name_service_provider_name, &plmn_name_short_name_encoding, &plmn_name_short_name_country_initials, &plmn_name_short_name_spare_bits, &plmn_name_short_name, &plmn_name_long_name_encoding, &plmn_name_long_name_country_initials, &plmn_name_long_name_spare_bits, &plmn_name_long_name, NULL)) { g_autofree gchar *long_name = NULL; g_autofree gchar *short_name = NULL; g_autofree gchar *service_name = NULL; long_name = qmi_nas_read_string_from_network_description_encoded_array (plmn_name_long_name_encoding, plmn_name_long_name); short_name = qmi_nas_read_string_from_network_description_encoded_array (plmn_name_short_name_encoding, plmn_name_short_name); service_name = qmi_nas_read_string_from_network_description_encoded_array (plmn_name_service_provider_name_encoding, plmn_name_service_provider_name); g_print ("3GPP EONS PLMN Name:\n" "\tLong Name: '%s'\n" "\tShort Name: '%s'\n" "\tService Name: '%s'\n" "\tCountry: '%s'\n", long_name ?: "", short_name ?: "", service_name ?: "", qmi_nas_plmn_name_country_initials_get_string (plmn_name_short_name_country_initials)); } if (qmi_message_nas_get_plmn_name_output_get_plmn_name_with_language_id (output, &array, NULL)) { guint i; g_print ("3GPP EONS PLMN Name with Language ID:\n"); for (i = 0; i < array->len; i++) { QmiMessageNasGetPlmnNameOutputPlmnNameWithLanguageIdElement *element; g_autofree gchar *long_name; g_autofree gchar *short_name; element = &g_array_index (array, QmiMessageNasGetPlmnNameOutputPlmnNameWithLanguageIdElement, i); long_name = qmi_nas_read_string_from_plmn_encoded_array (QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE, element->long_name); short_name = qmi_nas_read_string_from_plmn_encoded_array (QMI_NAS_PLMN_ENCODING_SCHEME_UCS2LE, element->short_name); g_print ("\t%d: '%s'%s%s%s\t\tCountry: '%s'\n", i, long_name ?: "", short_name ? " ('" : "", short_name ?: "", short_name ? "')" : "", qmi_nas_plmn_language_id_get_string (element->language_id)); } } operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_PLMN_NAME */ #if defined HAVE_QMI_MESSAGE_NAS_GET_LTE_CPHY_CA_INFO static void get_lte_cphy_ca_info_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetLteCphyCaInfoOutput *output; GError *error = NULL; guint16 pci; guint16 channel; QmiNasDLBandwidth dl_bandwidth; QmiNasActiveBand band; QmiNasScellState state; guint8 scell_index; GArray *array; output = qmi_client_nas_get_lte_cphy_ca_info_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_lte_cphy_ca_info_output_get_result (output, &error)) { g_printerr ("error: couldn't get carrier aggregation info: %s\n", error->message); g_error_free (error); qmi_message_nas_get_lte_cphy_ca_info_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got carrier aggregation info\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_nas_get_lte_cphy_ca_info_output_get_dl_bandwidth ( output, &dl_bandwidth, NULL)) { g_print ("DL Bandwidth: '%s'\n", qmi_nas_dl_bandwidth_get_string (dl_bandwidth)); } if (qmi_message_nas_get_lte_cphy_ca_info_output_get_phy_ca_agg_pcell_info ( output, &pci, &channel, &dl_bandwidth, &band, NULL)) { g_print ("Primary Cell Info\n"); g_print ("\tPhysical Cell ID: '%" G_GUINT16_FORMAT"'\n" "\tRX Channel: '%" G_GUINT16_FORMAT"'\n" "\tDL Bandwidth: '%s'\n" "\tLTE Band: '%s'\n", pci, channel, qmi_nas_dl_bandwidth_get_string (dl_bandwidth), qmi_nas_active_band_get_string (band)); } if (qmi_message_nas_get_lte_cphy_ca_info_output_get_phy_ca_agg_secondary_cells ( output, &array, NULL)) { guint i; if (!array->len) g_print ("No Secondary Cells\n"); for (i = 0; i < array->len; i++) { QmiMessageNasGetLteCphyCaInfoOutputPhyCaAggSecondaryCellsSsc *e; e = &g_array_index (array, QmiMessageNasGetLteCphyCaInfoOutputPhyCaAggSecondaryCellsSsc, i); g_print ("Secondary Cell %u Info\n" "\tPhysical Cell ID: '%" G_GUINT16_FORMAT"'\n" "\tRX Channel: '%" G_GUINT16_FORMAT"'\n" "\tDL Bandwidth: '%s'\n" "\tLTE Band: '%s'\n" "\tState: '%s'\n" "\tCell index: '%u'\n", i + 1, e->physical_cell_id, e->rx_channel, qmi_nas_dl_bandwidth_get_string (e->dl_bandwidth), qmi_nas_active_band_get_string (e->lte_band), qmi_nas_scell_state_get_string (e->state), e->cell_index); } } else { if (qmi_message_nas_get_lte_cphy_ca_info_output_get_phy_ca_agg_scell_info ( output, &pci, &channel, &dl_bandwidth, &band, &state, NULL)) { g_print ("Secondary Cell Info\n"); g_print ("\tPhysical Cell ID: '%" G_GUINT16_FORMAT"'\n" "\tRX Channel: '%" G_GUINT16_FORMAT"'\n" "\tDL Bandwidth: '%s'\n" "\tLTE Band: '%s'\n" "\tState: '%s'\n", pci, channel, qmi_nas_dl_bandwidth_get_string (dl_bandwidth), qmi_nas_active_band_get_string (band), qmi_nas_scell_state_get_string (state)); } if (qmi_message_nas_get_lte_cphy_ca_info_output_get_scell_index ( output, &scell_index, NULL)) { g_print ("Secondary Cell index: '%u'\n", scell_index); } } qmi_message_nas_get_lte_cphy_ca_info_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_LTE_CPHY_CA_INFO */ #if defined HAVE_QMI_MESSAGE_NAS_GET_RF_BAND_INFORMATION static void get_rf_band_info_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetRfBandInformationOutput *output; GError *error = NULL; GArray *band_array = NULL; GArray *extended_band_array = NULL; GArray *bandwidth_array = NULL; guint i; output = qmi_client_nas_get_rf_band_information_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_rf_band_information_output_get_result (output, &error)) { g_printerr ("error: couldn't get rf band info: %s\n", error->message); g_error_free (error); qmi_message_nas_get_rf_band_information_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got RF band info\n", qmi_device_get_path_display (ctx->device)); if (!qmi_message_nas_get_rf_band_information_output_get_list ( output, &band_array, &error)) { g_printerr ("error: couldn't get rf band list: %s\n", error->message); g_error_free (error); qmi_message_nas_get_rf_band_information_output_unref (output); operation_shutdown (FALSE); return; } g_print ("Band Information:\n"); for (i = 0; band_array && i < band_array->len; i++) { QmiMessageNasGetRfBandInformationOutputListElement *info; info = &g_array_index (band_array, QmiMessageNasGetRfBandInformationOutputListElement, i); g_print ("\tRadio Interface: '%s'\n" "\tActive Band Class: '%s'\n" "\tActive Channel: '%" G_GUINT16_FORMAT"'\n", qmi_nas_radio_interface_get_string (info->radio_interface), qmi_nas_active_band_get_string (info->active_band_class), info->active_channel); } if (qmi_message_nas_get_rf_band_information_output_get_extended_list ( output, &extended_band_array, NULL)) { g_print ("Band Information (Extended):\n"); for (i = 0; extended_band_array && i < extended_band_array->len; i++) { QmiMessageNasGetRfBandInformationOutputExtendedListElement *info; info = &g_array_index (extended_band_array, QmiMessageNasGetRfBandInformationOutputExtendedListElement, i); g_print ("\tRadio Interface: '%s'\n" "\tActive Band Class: '%s'\n" "\tActive Channel: '%" G_GUINT32_FORMAT"'\n", qmi_nas_radio_interface_get_string (info->radio_interface), qmi_nas_active_band_get_string (info->active_band_class), info->active_channel); } } if (qmi_message_nas_get_rf_band_information_output_get_bandwidth_list ( output, &bandwidth_array, NULL)) { g_print ("Bandwidth:\n"); for (i = 0; bandwidth_array && i < bandwidth_array->len; i++) { QmiMessageNasGetRfBandInformationOutputBandwidthListElement *info; info = &g_array_index (bandwidth_array, QmiMessageNasGetRfBandInformationOutputBandwidthListElement, i); g_print ("\tRadio Interface: '%s'\n" "\tBandwidth: '%s'\n", qmi_nas_radio_interface_get_string (info->radio_interface), qmi_nas_dl_bandwidth_get_string (info->bandwidth)); } } qmi_message_nas_get_rf_band_information_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_RF_BAND_INFORMATION */ #if defined HAVE_QMI_MESSAGE_NAS_GET_DRX static void get_drx_ready (QmiClientNas *client, GAsyncResult *res) { g_autoptr(QmiMessageNasGetDrxOutput) output = NULL; g_autoptr(GError) error = NULL; QmiNasDrx drx = QMI_NAS_DRX_UNKNOWN; output = qmi_client_nas_get_drx_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_drx_output_get_result (output, &error)) { g_printerr ("error: couldn't get DRX: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_drx_output_get_info (output, &drx, NULL)) { g_printerr ("error: DRX info not provided\n"); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got DRX: %s\n", qmi_device_get_path_display (ctx->device), qmi_nas_drx_get_string (drx)); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_DRX */ #if defined HAVE_QMI_MESSAGE_NAS_GET_SUPPORTED_MESSAGES static void get_supported_messages_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasGetSupportedMessagesOutput *output; GError *error = NULL; GArray *bytearray = NULL; gchar *str; output = qmi_client_nas_get_supported_messages_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_get_supported_messages_output_get_result (output, &error)) { g_printerr ("error: couldn't get supported NAS messages: %s\n", error->message); g_error_free (error); qmi_message_nas_get_supported_messages_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got supported NAS messages:\n", qmi_device_get_path_display (ctx->device)); qmi_message_nas_get_supported_messages_output_get_list (output, &bytearray, NULL); str = qmicli_get_supported_messages_list (bytearray ? (const guint8 *)bytearray->data : NULL, bytearray ? bytearray->len : 0); g_print ("%s", str); g_free (str); qmi_message_nas_get_supported_messages_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_GET_SUPPORTED_MESSAGES */ #if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS static void swi_get_status_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasSwiGetStatusOutput *output; GError *error = NULL; gint8 temperature; QmiNasSwiModemMode modem_mode; QmiNasSwiSystemMode system_mode; QmiNasSwiImsRegState ims_reg_state; QmiNasSwiPsState ps_state; QmiNasActiveBand band; QmiNasDLBandwidth bandwidth; guint16 rx_channel; guint16 tx_channel; QmiNasSwiEmmState emm_state; guint8 emm_sub_state; QmiNasSwiEmmConnectionState emm_conn_state; output = qmi_client_nas_swi_get_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_swi_get_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get status: %s\n", error->message); g_error_free (error); qmi_message_nas_swi_get_status_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got status:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_nas_swi_get_status_output_get_common_info_v2 ( output, &temperature, &modem_mode, &system_mode, &ims_reg_state, &ps_state, NULL)) { g_print ("Common Info:\n" "\tTemperature: '%d'\n" "\tModem mode: '%s'\n" "\tSystem mode: '%s'\n" "\tIMS registration state: '%s'\n" "\tPacket service state: '%s'\n", temperature, qmi_nas_swi_modem_mode_get_string (modem_mode), qmi_nas_swi_system_mode_get_string (system_mode), qmi_nas_swi_ims_reg_state_get_string (ims_reg_state), qmi_nas_swi_ps_state_get_string (ps_state)); } if (qmi_message_nas_swi_get_status_output_get_lte_info ( output, &band, &bandwidth, &rx_channel, &tx_channel, &emm_state, &emm_sub_state, &emm_conn_state, NULL)) { g_print ("LTE info:\n" "\tBand: '%s'\n" "\tBandwidth: '%s'\n" "\tRX channel: '%" G_GUINT16_FORMAT"'\n" "\tTX channel: '%" G_GUINT16_FORMAT"'\n" "\tEMM state: '%s'\n" "\tEMM sub state: '%u'\n" "\tEMM connection state: '%s'\n", qmi_nas_active_band_get_string (band), qmi_nas_dl_bandwidth_get_string (bandwidth), rx_channel, tx_channel, qmi_nas_swi_emm_state_get_string (emm_state), emm_sub_state, qmi_nas_swi_emm_connection_state_get_string (emm_conn_state)); } qmi_message_nas_swi_get_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS */ #if defined HAVE_QMI_MESSAGE_NAS_RESET static void reset_ready (QmiClientNas *client, GAsyncResult *res) { QmiMessageNasResetOutput *output; GError *error = NULL; output = qmi_client_nas_reset_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_nas_reset_output_get_result (output, &error)) { g_printerr ("error: couldn't reset the NAS service: %s\n", error->message); g_error_free (error); qmi_message_nas_reset_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed NAS service reset\n", qmi_device_get_path_display (ctx->device)); qmi_message_nas_reset_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_NAS_RESET */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_nas_run (QmiDevice *device, QmiClientNas *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_STRENGTH if (get_signal_strength_flag) { QmiMessageNasGetSignalStrengthInput *input; input = get_signal_strength_input_create (); g_debug ("Asynchronously getting signal strength..."); qmi_client_nas_get_signal_strength (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_signal_strength_ready, NULL); qmi_message_nas_get_signal_strength_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SIGNAL_INFO if (get_signal_info_flag) { g_debug ("Asynchronously getting signal info..."); qmi_client_nas_get_signal_info (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_signal_info_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_TX_RX_INFO if (get_tx_rx_info_str) { QmiMessageNasGetTxRxInfoInput *input; QmiNasRadioInterface interface; input = get_tx_rx_info_input_create (get_tx_rx_info_str, &interface); if (!input) { operation_shutdown (FALSE); return; } g_debug ("Asynchronously getting TX/RX info..."); qmi_client_nas_get_tx_rx_info (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_tx_rx_info_ready, GUINT_TO_POINTER (interface)); qmi_message_nas_get_tx_rx_info_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_HOME_NETWORK if (get_home_network_flag) { g_debug ("Asynchronously getting home network..."); qmi_client_nas_get_home_network (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_home_network_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_PREFERRED_NETWORKS if (get_preferred_networks_flag) { g_debug ("Asynchronously getting preferred networks..."); qmi_client_nas_get_preferred_networks (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_preferred_networks_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_SET_PREFERRED_NETWORKS if (set_preferred_networks_str) { QmiMessageNasSetPreferredNetworksInput *input; g_debug ("Asynchronously setting preferred networks..."); input = set_preferred_networks_input_create (set_preferred_networks_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_nas_set_preferred_networks (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_preferred_networks_ready, NULL); qmi_message_nas_set_preferred_networks_input_ref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SERVING_SYSTEM if (get_serving_system_flag) { g_debug ("Asynchronously getting serving system..."); qmi_client_nas_get_serving_system (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_serving_system_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_INFO if (get_system_info_flag) { g_debug ("Asynchronously getting system info..."); qmi_client_nas_get_system_info (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_system_info_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_TECHNOLOGY_PREFERENCE if (get_technology_preference_flag) { g_debug ("Asynchronously getting technology preference..."); qmi_client_nas_get_technology_preference (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_technology_preference_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SYSTEM_SELECTION_PREFERENCE if (get_system_selection_preference_flag) { g_debug ("Asynchronously getting system selection preference..."); qmi_client_nas_get_system_selection_preference (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_system_selection_preference_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_SET_SYSTEM_SELECTION_PREFERENCE if (set_system_selection_preference_str) { QmiMessageNasSetSystemSelectionPreferenceInput *input; g_debug ("Asynchronously setting system selection preference..."); input = set_system_selection_preference_input_create (set_system_selection_preference_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_nas_set_system_selection_preference (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_system_selection_preference_ready, NULL); qmi_message_nas_set_system_selection_preference_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_NETWORK_SCAN if (network_scan_flag) { g_debug ("Asynchronously scanning networks..."); qmi_client_nas_network_scan (ctx->client, NULL, 300, /* this operation takes a lot of time! */ ctx->cancellable, (GAsyncReadyCallback)network_scan_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_CELL_LOCATION_INFO if (get_cell_location_info_flag) { g_debug ("Asynchronously getting cell location info ..."); qmi_client_nas_get_cell_location_info (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_cell_location_info_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_FORCE_NETWORK_SEARCH if (force_network_search_flag) { g_debug ("Forcing network search..."); qmi_client_nas_force_network_search (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)force_network_search_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_OPERATOR_NAME if (get_operator_name_flag) { g_debug ("Asynchronously getting operator name data..."); qmi_client_nas_get_operator_name (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_operator_name_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_PLMN_NAME if (get_plmn_name_str) { g_autoptr(QmiMessageNasGetPlmnNameInput) input = NULL; input = set_plmn_name_input_plmn_create(get_plmn_name_str); g_debug ("Asynchronously getting plmn name data..."); qmi_client_nas_get_plmn_name (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_plmn_name_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_LTE_CPHY_CA_INFO if (get_lte_cphy_ca_info_flag) { g_debug ("Asynchronously getting carrier aggregation info ..."); qmi_client_nas_get_lte_cphy_ca_info (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_lte_cphy_ca_info_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_RF_BAND_INFORMATION if (get_rf_band_info_flag) { g_debug ("Asynchronously getting RF band info ..."); qmi_client_nas_get_rf_band_information (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_rf_band_info_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_DRX if (get_drx_flag) { g_debug ("Asynchronously getting DRX ..."); qmi_client_nas_get_drx (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_drx_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_GET_SUPPORTED_MESSAGES if (get_supported_messages_flag) { g_debug ("Asynchronously getting supported NAS messages..."); qmi_client_nas_get_supported_messages (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_supported_messages_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_SWI_GET_STATUS if (swi_get_status_flag) { g_debug ("Asynchronously getting status (Sierra Wireless specific)..."); qmi_client_nas_swi_get_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)swi_get_status_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_NAS_RESET if (reset_flag) { g_debug ("Asynchronously resetting NAS service..."); qmi_client_nas_reset (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)reset_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_NAS */ libqmi-1.35.2-dev/src/qmicli/qmicli-pbm.c000066400000000000000000000335711455567757300201370ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2013-2017 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #if defined HAVE_QMI_SERVICE_PBM #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") /* Context */ typedef struct { QmiDevice *device; QmiClientPbm *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_all_capabilities_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_PBM_GET_ALL_CAPABILITIES { "pbm-get-all-capabilities", 0, 0, G_OPTION_ARG_NONE, &get_all_capabilities_flag, "Get all phonebook capabilities", NULL }, #endif { "pbm-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a PBM client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_pbm_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("pbm", "PBM options:", "Show Phonebook Management options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_pbm_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_all_capabilities_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many PBM actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->client) g_object_unref (context->client); g_object_unref (context->cancellable); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_PBM_GET_ALL_CAPABILITIES static void get_all_capabilities_ready (QmiClientPbm *client, GAsyncResult *res) { GError *error = NULL; QmiMessagePbmGetAllCapabilitiesOutput *output; GArray *capability_basic_information = NULL; GArray *group_capability = NULL; GArray *additional_number_capability = NULL; GArray *email_capability = NULL; GArray *second_name_capability = NULL; GArray *hidden_records_capability = NULL; GArray *grouping_information_alpha_string_capability = NULL; GArray *additional_number_alpha_string_capability = NULL; guint i, j; output = qmi_client_pbm_get_all_capabilities_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_pbm_get_all_capabilities_output_get_result (output, &error)) { g_printerr ("error: couldn't get capabilities: %s\n", error->message); g_error_free (error); qmi_message_pbm_get_all_capabilities_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_pbm_get_all_capabilities_output_get_capability_basic_information (output, &capability_basic_information, NULL); qmi_message_pbm_get_all_capabilities_output_get_group_capability (output, &group_capability, NULL); qmi_message_pbm_get_all_capabilities_output_get_additional_number_capability (output, &additional_number_capability, NULL); qmi_message_pbm_get_all_capabilities_output_get_email_capability (output, &email_capability, NULL); qmi_message_pbm_get_all_capabilities_output_get_second_name_capability (output, &second_name_capability, NULL); qmi_message_pbm_get_all_capabilities_output_get_hidden_records_capability (output, &hidden_records_capability, NULL); qmi_message_pbm_get_all_capabilities_output_get_grouping_information_alpha_string_capability (output, &grouping_information_alpha_string_capability, NULL); qmi_message_pbm_get_all_capabilities_output_get_additional_number_alpha_string_capability (output, &additional_number_alpha_string_capability, NULL); g_print ("[%s] Phonebook capabilities:%s\n", qmi_device_get_path_display (ctx->device), (capability_basic_information || group_capability || additional_number_capability || email_capability || second_name_capability || hidden_records_capability || grouping_information_alpha_string_capability || additional_number_alpha_string_capability) ? "" : " none"); if (capability_basic_information) { g_print ("Capability basic information:\n"); for (i = 0; i < capability_basic_information->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputCapabilityBasicInformationElement *session; session = &g_array_index (capability_basic_information, QmiMessagePbmGetAllCapabilitiesOutputCapabilityBasicInformationElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); for (j = 0; j < session->phonebooks->len; j++) { QmiMessagePbmGetAllCapabilitiesOutputCapabilityBasicInformationElementPhonebooksElement *phonebook; g_autofree gchar *phonebook_type_str = NULL; phonebook = &g_array_index (session->phonebooks, QmiMessagePbmGetAllCapabilitiesOutputCapabilityBasicInformationElementPhonebooksElement, j); phonebook_type_str = qmi_pbm_phonebook_type_build_string_from_mask (phonebook->phonebook_type); g_print ("\t\t[%s]:\n", VALIDATE_MASK_NONE (phonebook_type_str)); g_print ("\t\t\tUsed records: %" G_GUINT16_FORMAT "\n", phonebook->used_records); g_print ("\t\t\tMaximum records: %" G_GUINT16_FORMAT "\n", phonebook->maximum_records); g_print ("\t\t\tMaximum number length: %u\n", phonebook->maximum_number_length); g_print ("\t\t\tMaximum name length: %u\n", phonebook->maximum_name_length); } } } if (group_capability) { g_print ("Group capability:\n"); for (i = 0; i < group_capability->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputGroupCapabilityElement *session; session = &g_array_index (group_capability, QmiMessagePbmGetAllCapabilitiesOutputGroupCapabilityElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); g_print ("\t\tMaximum groups: %u\n", session->maximum_groups); g_print ("\t\tMaximum group tag length: %u\n", session->maximum_group_tag_length); } } if (additional_number_capability) { g_print ("Additional number capability:\n"); for (i = 0; i < additional_number_capability->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputAdditionalNumberCapabilityElement *session; session = &g_array_index (additional_number_capability, QmiMessagePbmGetAllCapabilitiesOutputAdditionalNumberCapabilityElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); g_print ("\t\tMaximum additional numbers: %u\n", session->maximum_additional_numbers); g_print ("\t\tMaximum additional number length: %u\n", session->maximum_additional_number_length); g_print ("\t\tMaximum additional number tag length: %u\n", session->maximum_additional_number_tag_length); } } if (email_capability) { g_print ("Email capability:\n"); for (i = 0; i < email_capability->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputEmailCapabilityElement *session; session = &g_array_index (email_capability, QmiMessagePbmGetAllCapabilitiesOutputEmailCapabilityElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); g_print ("\t\tMaximum emails: %u\n", session->maximum_emails); g_print ("\t\tMaximum email address length: %u\n", session->maximum_email_address_length); } } if (second_name_capability) { g_print ("Second name capability:\n"); for (i = 0; i < second_name_capability->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputSecondNameCapabilityElement *session; session = &g_array_index (second_name_capability, QmiMessagePbmGetAllCapabilitiesOutputSecondNameCapabilityElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); g_print ("\t\tMaximum second name length: %u\n", session->maximum_second_name_length); } } if (hidden_records_capability) { g_print ("Hidden records capability:\n"); for (i = 0; i < hidden_records_capability->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputHiddenRecordsCapabilityElement *session; session = &g_array_index (hidden_records_capability, QmiMessagePbmGetAllCapabilitiesOutputHiddenRecordsCapabilityElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); g_print ("\t\tSupported: %s\n", session->supported ? "yes" : "no"); } } if (grouping_information_alpha_string_capability) { g_print ("Alpha string capability:\n"); for (i = 0; i < grouping_information_alpha_string_capability->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputGroupingInformationAlphaStringCapabilityElement *session; session = &g_array_index (grouping_information_alpha_string_capability, QmiMessagePbmGetAllCapabilitiesOutputGroupingInformationAlphaStringCapabilityElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); g_print ("\t\tMaximum records: %u\n", session->maximum_records); g_print ("\t\tUsed records: %u\n", session->used_records); g_print ("\t\tMaximum string length: %u\n", session->maximum_string_length); } } if (additional_number_alpha_string_capability) { g_print ("Additional number alpha string capability:\n"); for (i = 0; i < additional_number_alpha_string_capability->len; i++) { QmiMessagePbmGetAllCapabilitiesOutputAdditionalNumberAlphaStringCapabilityElement *session; session = &g_array_index (additional_number_alpha_string_capability, QmiMessagePbmGetAllCapabilitiesOutputAdditionalNumberAlphaStringCapabilityElement, i); g_print ("\t[%s]:\n", qmi_pbm_session_type_get_string (session->session_type)); g_print ("\t\tMaximum records: %u\n", session->maximum_records); g_print ("\t\tUsed records: %u\n", session->used_records); g_print ("\t\tMaximum string length: %u\n", session->maximum_string_length); } } qmi_message_pbm_get_all_capabilities_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_PBM_GET_ALL_CAPABILITIES */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_pbm_run (QmiDevice *device, QmiClientPbm *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_PBM_GET_ALL_CAPABILITIES if (get_all_capabilities_flag) { g_debug ("Asynchronously getting phonebook capabilities..."); qmi_client_pbm_get_all_capabilities (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_all_capabilities_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_PBM */ libqmi-1.35.2-dev/src/qmicli/qmicli-pdc.c000066400000000000000000001403431455567757300201230ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2013-2022 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_PDC #define LIST_CONFIGS_TIMEOUT_SECS 2 #define LOAD_CONFIG_CHUNK_SIZE 0x400 /* Info about config */ typedef struct { GArray *id; QmiPdcConfigurationType config_type; guint32 token; guint32 version; gchar *description; guint32 total_size; } ConfigInfo; /* Info about loading config */ typedef struct { GMappedFile *mapped_file; GArray *checksum; gsize offset; } LoadConfigFileData; /* Context */ typedef struct { QmiDevice *device; QmiClientPdc *client; GCancellable *cancellable; gboolean skip_cid_release; /* local data */ guint timeout_id; GArray *config_list; guint configs_loaded; GArray *active_config_id; GArray *pending_config_id; gboolean ids_loaded; guint list_configs_indication_id; guint get_selected_config_indication_id; LoadConfigFileData *load_config_file_data; guint load_config_indication_id; guint get_config_info_indication_id; guint set_selected_config_indication_id; guint activate_config_indication_id; guint device_removed_indication_id; guint deactivate_config_indication_id; guint refresh_indication_id; guint token; } Context; static Context *ctx; /* Options */ static gchar *list_configs_str; static gchar *delete_config_str; static gchar *activate_config_str; static gchar *deactivate_config_str; static gchar *load_config_str; static gboolean monitor_refresh_flag; static gboolean noop_flag; #if defined HAVE_QMI_MESSAGE_PDC_LIST_CONFIGS && \ defined HAVE_QMI_INDICATION_PDC_LIST_CONFIGS && \ defined HAVE_QMI_MESSAGE_PDC_GET_SELECTED_CONFIG && \ defined HAVE_QMI_INDICATION_PDC_GET_SELECTED_CONFIG && \ defined HAVE_QMI_MESSAGE_PDC_GET_CONFIG_INFO && \ defined HAVE_QMI_INDICATION_PDC_GET_CONFIG_INFO # define HAVE_QMI_ACTION_PDC_LIST_CONFIGS #endif #if defined HAVE_QMI_MESSAGE_PDC_ACTIVATE_CONFIG && \ defined HAVE_QMI_INDICATION_PDC_ACTIVATE_CONFIG && \ defined HAVE_QMI_MESSAGE_PDC_SET_SELECTED_CONFIG && \ defined HAVE_QMI_INDICATION_PDC_SET_SELECTED_CONFIG # define HAVE_QMI_ACTION_PDC_ACTIVATE_CONFIG #endif #if defined HAVE_QMI_MESSAGE_PDC_DEACTIVATE_CONFIG && \ defined HAVE_QMI_INDICATION_PDC_DEACTIVATE_CONFIG # define HAVE_QMI_ACTION_PDC_DEACTIVATE_CONFIG #endif #if defined HAVE_QMI_MESSAGE_PDC_LOAD_CONFIG && \ defined HAVE_QMI_INDICATION_PDC_LOAD_CONFIG # define HAVE_QMI_ACTION_PDC_LOAD_CONFIG #endif #if defined HAVE_QMI_INDICATION_PDC_REFRESH && \ defined HAVE_QMI_MESSAGE_PDC_REGISTER # define HAVE_QMI_ACTION_PDC_REFRESH #endif static GOptionEntry entries[] = { #if defined HAVE_QMI_ACTION_PDC_LIST_CONFIGS { "pdc-list-configs", 0, 0, G_OPTION_ARG_STRING, &list_configs_str, "List all configs", "[(platform|software)]" }, #endif #if defined HAVE_QMI_MESSAGE_PDC_DELETE_CONFIG { "pdc-delete-config", 0, 0, G_OPTION_ARG_STRING, &delete_config_str, "Delete config", "[(platform|software),ConfigId]" }, #endif #if defined HAVE_QMI_ACTION_PDC_ACTIVATE_CONFIG { "pdc-activate-config", 0, 0, G_OPTION_ARG_STRING, &activate_config_str, "Activate config", "[(platform|software),ConfigId]" }, #endif #if defined HAVE_QMI_ACTION_PDC_DEACTIVATE_CONFIG { "pdc-deactivate-config", 0, 0, G_OPTION_ARG_STRING, &deactivate_config_str, "Deactivate config", "[(platform|software),ConfigId]" }, #endif #if defined HAVE_QMI_ACTION_PDC_LOAD_CONFIG { "pdc-load-config", 0, 0, G_OPTION_ARG_STRING, &load_config_str, "Load config to device", "[Path to config]" }, #endif #if defined HAVE_QMI_ACTION_PDC_REFRESH { "pdc-monitor-refresh", 0, 0, G_OPTION_ARG_NONE, &monitor_refresh_flag, "Watch for refresh indications", NULL }, #endif { "pdc-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a PDC client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_pdc_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("pdc", "PDC options:", "Show platform device configurations options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_pdc_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!list_configs_str + !!delete_config_str + !!activate_config_str + !!deactivate_config_str + !!load_config_str + monitor_refresh_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many PDC actions requested\n"); exit (EXIT_FAILURE); } /* Actions that require receiving QMI indication messages must specify that * indications are expected. */ if (list_configs_str || activate_config_str || deactivate_config_str || load_config_str || monitor_refresh_flag) qmicli_expect_indications (); checked = TRUE; return !!n_actions; } static Context * context_new (QmiDevice *device, QmiClientPdc *client, GCancellable *cancellable) { Context *context; context = g_slice_new0 (Context); context->device = g_object_ref (device); context->client = g_object_ref (client); context->cancellable = g_object_ref (cancellable); return context; } static void context_free (Context *context) { guint i; if (!context) return; if (context->config_list) { for (i = 0; i < context->config_list->len; i++) { ConfigInfo *current_config; current_config = &g_array_index (context->config_list, ConfigInfo, i); g_free (current_config->description); if (current_config->id) g_array_unref (current_config->id); } g_array_unref (context->config_list); g_signal_handler_disconnect (context->client, context->list_configs_indication_id); g_signal_handler_disconnect (context->client, context->get_config_info_indication_id); g_signal_handler_disconnect (context->client, context->get_selected_config_indication_id); } if (context->load_config_file_data) { g_array_unref (context->load_config_file_data->checksum); g_mapped_file_unref (context->load_config_file_data->mapped_file); g_slice_free (LoadConfigFileData, context->load_config_file_data); g_signal_handler_disconnect (context->client, context->load_config_indication_id); } if (context->set_selected_config_indication_id) g_signal_handler_disconnect (context->client, context->set_selected_config_indication_id); if (context->activate_config_indication_id) g_signal_handler_disconnect (context->client, context->activate_config_indication_id); if (context->device_removed_indication_id) g_signal_handler_disconnect (context->device, context->device_removed_indication_id); if (context->deactivate_config_indication_id) g_signal_handler_disconnect (context->client, context->deactivate_config_indication_id); g_object_unref (context->cancellable); g_object_unref (context->client); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ qmicli_async_operation_done (operation_status, ctx->skip_cid_release); context_free (ctx); ctx = NULL; } /******************************************************************************/ /* Common */ #if defined HAVE_QMI_ACTION_PDC_ACTIVATE_CONFIG || \ defined HAVE_QMI_ACTION_PDC_DEACTIVATE_CONFIG || \ defined HAVE_QMI_MESSAGE_PDC_DELETE_CONFIG static gboolean parse_type_and_id (const gchar *str, QmiPdcConfigurationType *config_type, GArray **id) { guint num_parts; g_auto(GStrv) substrings = NULL; substrings = g_strsplit (str, ",", -1); num_parts = g_strv_length (substrings); if (num_parts != 2) { g_printerr ("Expected 2 parameters, but found %u\n", num_parts); return FALSE; } if (!qmicli_read_pdc_configuration_type_from_string (substrings[0], config_type)) { g_printerr ("Incorrect id specified: %s\n", substrings[0]); return FALSE; } if (!qmicli_read_binary_array_from_string (substrings[1], id)) { g_printerr ("Incorrect config type specified: %s\n", substrings[1]); return FALSE; } return TRUE; } #endif /* HAVE_QMI_ACTION_PDC_ACTIVATE_CONFIG * HAVE_QMI_ACTION_PDC_DEACTIVATE_CONFIG * HAVE_QMI_MESSAGE_PDC_DELETE_CONFIG */ /******************************************************************************/ /* List configs and get selected config */ #if defined HAVE_QMI_ACTION_PDC_LIST_CONFIGS static const char * status_string (GArray *id) { if (!id) return "Unknown"; if (ctx->active_config_id && id->len == ctx->active_config_id->len && memcmp (id->data, ctx->active_config_id->data, id->len) == 0) return "Active"; if (ctx->pending_config_id && id->len == ctx->pending_config_id->len && memcmp (id->data, ctx->pending_config_id->data, id->len) == 0) return "Pending"; return "Inactive"; } static void print_configs (GArray *configs) { guint i; g_printf ("Total configurations: %u\n", ctx->config_list->len); for (i = 0; i < ctx->config_list->len; i++) { ConfigInfo *current_config; char *id_str; current_config = &g_array_index (ctx->config_list, ConfigInfo, i); g_printf ("Configuration %u:\n", i + 1); g_printf ("\tDescription: %s\n", current_config->description); g_printf ("\tType: %s\n", qmi_pdc_configuration_type_get_string (current_config->config_type)); g_printf ("\tSize: %u\n", current_config->total_size); g_printf ("\tStatus: %s\n", status_string (current_config->id)); g_printf ("\tVersion: 0x%X\n", current_config->version); id_str = qmicli_get_raw_data_printable (current_config->id, 80, ""); g_printf ("\tID: %s\n", id_str ? id_str : "none"); g_free (id_str); } } static void check_list_config_completed (void) { if (ctx->configs_loaded == ctx->config_list->len && ctx->ids_loaded) { print_configs (ctx->config_list); operation_shutdown (TRUE); } } static void get_config_info_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcGetConfigInfoOutput) output = NULL; output = qmi_client_pdc_get_config_info_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_pdc_get_config_info_output_get_result (output, &error)) { g_printerr ("error: couldn't get config info: %s\n", error->message); operation_shutdown (FALSE); return; } } static void get_config_info_ready_indication (QmiClientPdc *client, QmiIndicationPdcGetConfigInfoOutput *output) { g_autoptr(GError) error = NULL; ConfigInfo *current_config = NULL; guint32 token; const gchar *description; guint i; guint16 error_code = 0; if (!qmi_indication_pdc_get_config_info_output_get_indication_result (output, &error_code, &error)) { g_printerr ("error: couldn't get config info: %s\n", error->message); operation_shutdown (FALSE); return; } if (error_code != 0) { g_printerr ("error: couldn't get config info: %s\n", qmi_protocol_error_get_string ((QmiProtocolError) error_code)); operation_shutdown (FALSE); return; } if (!qmi_indication_pdc_get_config_info_output_get_token (output, &token, &error)) { g_printerr ("error: couldn't get config info token: %s\n", error->message); operation_shutdown (FALSE); return; } /* Look for the current config in the list */ for (i = 0; i < ctx->config_list->len; i++) { current_config = &g_array_index (ctx->config_list, ConfigInfo, i); if (current_config->token == token) break; } /* Store total size, version and description of the current config */ if (!qmi_indication_pdc_get_config_info_output_get_total_size (output, ¤t_config->total_size, &error) || !qmi_indication_pdc_get_config_info_output_get_version (output, ¤t_config->version, &error) || !qmi_indication_pdc_get_config_info_output_get_description (output, &description, &error)) { g_printerr ("error: couldn't get config info details: %s\n", error->message); operation_shutdown (FALSE); return; } current_config->description = g_strdup (description); ctx->configs_loaded++; check_list_config_completed (); } static gboolean list_configs_timeout (void) { /* No indication yet, cancelling */ if (!ctx->config_list) { g_printf ("Total configurations: 0\n"); operation_shutdown (TRUE); } return FALSE; } static void list_configs_ready_indication (QmiClientPdc *client, QmiIndicationPdcListConfigsOutput *output) { g_autoptr(GError) error = NULL; GArray *configs = NULL; guint i; guint16 error_code = 0; /* Remove timeout as soon as we get the indication */ if (ctx->timeout_id) { g_source_remove (ctx->timeout_id); ctx->timeout_id = 0; } if (!qmi_indication_pdc_list_configs_output_get_indication_result (output, &error_code, &error)) { g_printerr ("error: couldn't list configs: %s\n", error->message); operation_shutdown (FALSE); return; } if (error_code != 0) { g_printerr ("error: couldn't list config: %s\n", qmi_protocol_error_get_string ((QmiProtocolError) error_code)); operation_shutdown (FALSE); return; } if (!qmi_indication_pdc_list_configs_output_get_configs (output, &configs, &error)) { g_printerr ("error: couldn't list configs: %s\n", error->message); operation_shutdown (FALSE); return; } /* Preallocate config list and request details for each */ ctx->config_list = g_array_sized_new (FALSE, TRUE, sizeof (ConfigInfo), configs->len); g_array_set_size (ctx->config_list, configs->len); for (i = 0; i < configs->len; i++) { ConfigInfo *current_info; QmiIndicationPdcListConfigsOutputConfigsElement *element; guint32 token; g_autoptr(QmiMessagePdcGetConfigInfoInput) input = NULL; token = ctx->token++; element = &g_array_index (configs, QmiIndicationPdcListConfigsOutputConfigsElement, i); current_info = &g_array_index (ctx->config_list, ConfigInfo, i); current_info->token = token; current_info->id = g_array_ref (element->id); current_info->config_type = element->config_type; input = qmi_message_pdc_get_config_info_input_new (); /* Add type with id */ if (!qmi_message_pdc_get_config_info_input_set_type_with_id_v2 (input, element->config_type, current_info->id, &error)) { g_printerr ("error: couldn't set type with id: %s\n", error->message); operation_shutdown (FALSE); return; } /* Add token */ if (!qmi_message_pdc_get_config_info_input_set_token (input, token, &error)) { g_printerr ("error: couldn't set token: %s\n", error->message); operation_shutdown (FALSE); return; } qmi_client_pdc_get_config_info (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) get_config_info_ready, NULL); } check_list_config_completed (); } static void list_configs_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcListConfigsOutput) output = NULL; output = qmi_client_pdc_list_configs_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_pdc_list_configs_output_get_result (output, &error)) { g_printerr ("error: couldn't list configs: %s\n", error->message); operation_shutdown (FALSE); return; } } static QmiMessagePdcListConfigsInput * list_configs_input_create (const gchar *str) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcListConfigsInput) input = NULL; QmiPdcConfigurationType config_type; if (!qmicli_read_pdc_configuration_type_from_string (str, &config_type)) return NULL; input = qmi_message_pdc_list_configs_input_new (); if (!qmi_message_pdc_list_configs_input_set_config_type (input, config_type, &error) || !qmi_message_pdc_list_configs_input_set_token (input, ctx->token++, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void get_selected_config_ready_indication (QmiClientPdc *client, QmiIndicationPdcGetSelectedConfigOutput *output) { g_autoptr(GError) error = NULL; GArray *pending_id = NULL; GArray *active_id = NULL; guint16 error_code = 0; if (!qmi_indication_pdc_get_selected_config_output_get_indication_result (output, &error_code, &error)) { g_printerr ("error: couldn't get selected config: %s\n", error->message); operation_shutdown (FALSE); return; } if (error_code != 0 && error_code != QMI_PROTOCOL_ERROR_NOT_PROVISIONED) { /* No configs active */ g_printerr ("error: couldn't get selected config: %s\n", qmi_protocol_error_get_string ((QmiProtocolError) error_code)); operation_shutdown (FALSE); return; } qmi_indication_pdc_get_selected_config_output_get_pending_id (output, &pending_id, NULL); qmi_indication_pdc_get_selected_config_output_get_active_id (output, &active_id, NULL); if (active_id) ctx->active_config_id = g_array_ref (active_id); if (pending_id) ctx->pending_config_id = g_array_ref (pending_id); ctx->ids_loaded = TRUE; check_list_config_completed (); } static void get_selected_config_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcGetSelectedConfigOutput) output = NULL; output = qmi_client_pdc_get_selected_config_finish (client, res, &error); if (!qmi_message_pdc_get_selected_config_output_get_result (output, &error)) { g_printerr ("error: couldn't get selected config: %s\n", error->message); operation_shutdown (FALSE); return; } } static QmiMessagePdcGetSelectedConfigInput * get_selected_config_input_create (const gchar *str) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcGetSelectedConfigInput) input = NULL; QmiPdcConfigurationType config_type; if (!qmicli_read_pdc_configuration_type_from_string (str, &config_type)) return NULL; input = qmi_message_pdc_get_selected_config_input_new (); if (!qmi_message_pdc_get_selected_config_input_set_config_type (input, config_type, &error) || !qmi_message_pdc_get_selected_config_input_set_token (input, ctx->token++, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void run_list_configs (void) { g_autoptr(QmiMessagePdcListConfigsInput) input = NULL; g_autoptr(QmiMessagePdcGetSelectedConfigInput) get_selected_config_input = NULL; g_debug ("Listing configs asynchronously..."); /* Results are reported via indications */ ctx->list_configs_indication_id = g_signal_connect (ctx->client, "list-configs", G_CALLBACK (list_configs_ready_indication), NULL); ctx->get_selected_config_indication_id = g_signal_connect (ctx->client, "get-selected-config", G_CALLBACK (get_selected_config_ready_indication), NULL); ctx->get_config_info_indication_id = g_signal_connect (ctx->client, "get-config-info", G_CALLBACK (get_config_info_ready_indication), NULL); input = list_configs_input_create (list_configs_str); if (!input) { operation_shutdown (FALSE); return; } get_selected_config_input = get_selected_config_input_create (list_configs_str); if (!get_selected_config_input) { operation_shutdown (FALSE); return; } /* We need a timeout, because there will be no indications if no configs * are loaded */ ctx->timeout_id = g_timeout_add_seconds (LIST_CONFIGS_TIMEOUT_SECS, (GSourceFunc) list_configs_timeout, NULL); qmi_client_pdc_list_configs (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) list_configs_ready, NULL); qmi_client_pdc_get_selected_config (ctx->client, get_selected_config_input, 10, ctx->cancellable, (GAsyncReadyCallback) get_selected_config_ready, NULL); } #endif /* HAVE_QMI_ACTION_PDC_LIST_CONFIGS */ /******************************************************************************/ /* Activate config */ #if defined HAVE_QMI_ACTION_PDC_ACTIVATE_CONFIG static void device_removed_indication (QmiDevice *device) { g_print ("[%s] Successfully requested config activation\n", qmi_device_get_path_display (ctx->device)); /* Device gone, don't attempt to release CIDs */ ctx->skip_cid_release = TRUE; /* If device gets removed during an activate config operation, * it means the operation is successful */ operation_shutdown (TRUE); } static void activate_config_ready_indication (QmiClientPdc *client, QmiIndicationPdcActivateConfigOutput *output) { g_autoptr(GError) error = NULL; guint16 error_code = 0; if (!qmi_indication_pdc_activate_config_output_get_indication_result (output, &error_code, &error)) { g_printerr ("error: couldn't activate config: %s\n", error->message); operation_shutdown (FALSE); return; } if (error_code != 0) { g_printerr ("error: couldn't activate config: %s\n", qmi_protocol_error_get_string ((QmiProtocolError) error_code)); operation_shutdown (FALSE); return; } /* NOTE: config activation is expected to reboot the device, so we may detect the * actual reboot before receiving this indication */ g_print ("[%s] Successfully requested config activation\n", qmi_device_get_path_display (ctx->device)); operation_shutdown (TRUE); } static void activate_config_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcActivateConfigOutput) output = NULL; output = qmi_client_pdc_activate_config_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_pdc_activate_config_output_get_result (output, &error)) { g_printerr ("error: couldn't activate config: %s\n", error->message); operation_shutdown (FALSE); return; } } static QmiMessagePdcActivateConfigInput * activate_config_input_create (const gchar *str) { g_autoptr(QmiMessagePdcActivateConfigInput) input = NULL; g_autoptr(GError) error = NULL; QmiPdcConfigurationType config_type; g_autoptr(GArray) id = NULL; /* Note: id not needed here really */ if (!parse_type_and_id (str, &config_type, &id)) return NULL; input = qmi_message_pdc_activate_config_input_new (); if (!qmi_message_pdc_activate_config_input_set_config_type (input, config_type, &error) || !qmi_message_pdc_activate_config_input_set_token (input, ctx->token++, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void set_selected_config_ready_indication (QmiClientPdc *client, QmiIndicationPdcSetSelectedConfigOutput *output) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcActivateConfigInput) input = NULL; guint16 error_code = 0; if (!qmi_indication_pdc_set_selected_config_output_get_indication_result (output, &error_code, &error)) { g_printerr ("error: couldn't set selected config: %s\n", error->message); operation_shutdown (FALSE); return; } if (error_code != 0) { g_printerr ("error: couldn't set selected config: %s\n", qmi_protocol_error_get_string ((QmiProtocolError) error_code)); operation_shutdown (FALSE); return; } input = activate_config_input_create (activate_config_str); if (!input) { operation_shutdown (FALSE); return; } ctx->activate_config_indication_id = g_signal_connect (ctx->client, "activate-config", G_CALLBACK (activate_config_ready_indication), NULL); ctx->device_removed_indication_id = g_signal_connect (ctx->device, QMI_DEVICE_SIGNAL_REMOVED, G_CALLBACK (device_removed_indication), NULL); qmi_client_pdc_activate_config (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) activate_config_ready, NULL); } static void set_selected_config_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcSetSelectedConfigOutput) output = NULL; output = qmi_client_pdc_set_selected_config_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } } static QmiMessagePdcSetSelectedConfigInput * set_selected_config_input_create (const gchar *str) { g_autoptr(QmiMessagePdcSetSelectedConfigInput) input = NULL; g_autoptr(GError) error = NULL; QmiPdcConfigurationType config_type; g_autoptr(GArray) id = NULL; if (!parse_type_and_id (str, &config_type, &id)) return NULL; input = qmi_message_pdc_set_selected_config_input_new (); if (!qmi_message_pdc_set_selected_config_input_set_type_with_id_v2 (input, config_type, id, &error) || !qmi_message_pdc_set_selected_config_input_set_token (input, ctx->token++, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void run_activate_config (void) { g_autoptr(QmiMessagePdcSetSelectedConfigInput) input = NULL; g_debug ("Activating config asynchronously..."); input = set_selected_config_input_create (activate_config_str); if (!input) { operation_shutdown (FALSE); return; } /* Results are reported via indications */ ctx->set_selected_config_indication_id = g_signal_connect (ctx->client, "set-selected-config", G_CALLBACK (set_selected_config_ready_indication), NULL); qmi_client_pdc_set_selected_config (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) set_selected_config_ready, NULL); } #endif /* HAVE_QMI_ACTION_PDC_ACTIVATE_CONFIG */ /******************************************************************************/ /* Deactivate config */ #if defined HAVE_QMI_ACTION_PDC_DEACTIVATE_CONFIG static void deactivate_config_ready_indication (QmiClientPdc *client, QmiIndicationPdcDeactivateConfigOutput *output) { g_autoptr(GError) error = NULL; guint16 error_code = 0; if (!qmi_indication_pdc_deactivate_config_output_get_indication_result (output, &error_code, &error)) { g_printerr ("error: couldn't deactivate config: %s\n", error->message); operation_shutdown (FALSE); return; } if (error_code != 0) { g_printerr ("error: couldn't deactivate config: %s\n", qmi_protocol_error_get_string ((QmiProtocolError) error_code)); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully requested config deactivation\n", qmi_device_get_path_display (ctx->device)); operation_shutdown (TRUE); } static void deactivate_config_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcDeactivateConfigOutput) output = NULL; output = qmi_client_pdc_deactivate_config_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_pdc_deactivate_config_output_get_result (output, &error)) { g_printerr ("error: couldn't deactivate config: %s\n", error->message); operation_shutdown (FALSE); return; } } static QmiMessagePdcDeactivateConfigInput * deactivate_config_input_create (const gchar *str) { g_autoptr(QmiMessagePdcDeactivateConfigInput) input = NULL; g_autoptr(GError) error = NULL; QmiPdcConfigurationType config_type; g_autoptr(GArray) id = NULL; /* Note: id not needed here really */ if (!parse_type_and_id (str, &config_type, &id)) return NULL; input = qmi_message_pdc_deactivate_config_input_new (); if (!qmi_message_pdc_deactivate_config_input_set_config_type (input, config_type, &error) || !qmi_message_pdc_deactivate_config_input_set_token (input, ctx->token++, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void run_deactivate_config (void) { g_autoptr(QmiMessagePdcDeactivateConfigInput) input = NULL; g_debug ("Deactivating config asynchronously..."); input = deactivate_config_input_create (deactivate_config_str); if (!input) { operation_shutdown (FALSE); return; } /* Results are reported via indications */ ctx->deactivate_config_indication_id = g_signal_connect (ctx->client, "deactivate-config", G_CALLBACK (deactivate_config_ready_indication), NULL); qmi_client_pdc_deactivate_config (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) deactivate_config_ready, NULL); } #endif /* HAVE_QMI_ACTION_PDC_DEACTIVATE_CONFIG */ /******************************************************************************/ /* Delete config */ #if defined HAVE_QMI_MESSAGE_PDC_DELETE_CONFIG static void delete_config_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcDeleteConfigOutput) output = NULL; output = qmi_client_pdc_delete_config_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_pdc_delete_config_output_get_result (output, &error)) { g_printerr ("error: couldn't delete config: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully deleted config\n", qmi_device_get_path_display (ctx->device)); operation_shutdown (TRUE); } static QmiMessagePdcDeleteConfigInput * delete_config_input_create (const gchar *str) { g_autoptr(QmiMessagePdcDeleteConfigInput) input = NULL; g_autoptr(GError) error = NULL; QmiPdcConfigurationType config_type; g_autoptr(GArray) id = NULL; if (!parse_type_and_id (str, &config_type, &id)) return NULL; input = qmi_message_pdc_delete_config_input_new (); if (!qmi_message_pdc_delete_config_input_set_config_type (input, config_type, &error) || !qmi_message_pdc_delete_config_input_set_token (input, ctx->token++, &error) || !qmi_message_pdc_delete_config_input_set_id (input, id, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void run_delete_config (void) { g_autoptr(QmiMessagePdcDeleteConfigInput) input = NULL; g_debug ("Deleting config asynchronously..."); input = delete_config_input_create (delete_config_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_pdc_delete_config (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) delete_config_ready, NULL); } #endif /* HAVE_QMI_MESSAGE_PDC_DELETE_CONFIG */ /******************************************************************************/ /* Load config */ #if defined HAVE_QMI_ACTION_PDC_LOAD_CONFIG static LoadConfigFileData * load_config_file_from_string (const gchar *str) { g_autoptr(GError) error = NULL; g_autoptr(GMappedFile) mapped_file = NULL; LoadConfigFileData *data; guchar *file_contents; GChecksum *checksum; gsize file_size; gsize hash_size; if (!(mapped_file = g_mapped_file_new (str, FALSE, &error))) { g_printerr ("error: couldn't map config file: '%s'\n", error->message); return NULL; } if (!(file_contents = (guchar *) g_mapped_file_get_contents (mapped_file))) { g_printerr ("error: couldn't get file content\n"); return NULL; } /* Get checksum */ file_size = g_mapped_file_get_length (mapped_file); hash_size = g_checksum_type_get_length (G_CHECKSUM_SHA1); checksum = g_checksum_new (G_CHECKSUM_SHA1); g_checksum_update (checksum, file_contents, file_size); data = g_slice_new (LoadConfigFileData); data->mapped_file = g_mapped_file_ref (mapped_file); data->checksum = g_array_sized_new (FALSE, FALSE, sizeof (guint8), hash_size); g_array_set_size (data->checksum, hash_size); data->offset = 0; g_checksum_get_digest (checksum, &g_array_index (data->checksum, guint8, 0), &hash_size); g_checksum_free (checksum); return data; } static QmiMessagePdcLoadConfigInput * load_config_input_create_chunk (LoadConfigFileData *config_file) { g_autoptr(QmiMessagePdcLoadConfigInput) input = NULL; g_autoptr(GError) error = NULL; g_autoptr(GArray) chunk = NULL; gsize full_size; gsize chunk_size; guint8 *file_content; if (!config_file) return NULL; input = qmi_message_pdc_load_config_input_new (); if (!qmi_message_pdc_load_config_input_set_token (input, ctx->token++, &error)) { g_printerr ("error: couldn't set token: '%s'\n", error->message); return NULL; } chunk = g_array_new (FALSE, FALSE, sizeof (guint8)); full_size = g_mapped_file_get_length (config_file->mapped_file); chunk_size = (((config_file->offset + LOAD_CONFIG_CHUNK_SIZE) > full_size) ? (full_size - config_file->offset) : LOAD_CONFIG_CHUNK_SIZE); file_content = (guint8 *) g_mapped_file_get_contents (config_file->mapped_file); g_array_append_vals (chunk, &file_content[config_file->offset], chunk_size); g_print ("Uploaded %" G_GSIZE_FORMAT " of %" G_GSIZE_FORMAT "\n", config_file->offset, full_size); if (!qmi_message_pdc_load_config_input_set_config_chunk (input, QMI_PDC_CONFIGURATION_TYPE_SOFTWARE, config_file->checksum, full_size, chunk, &error)) { g_printerr ("error: couldn't set chunk: '%s'\n", error->message); return NULL; } config_file->offset += chunk_size; return g_steal_pointer (&input); } static void load_config_ready (QmiClientPdc *client, GAsyncResult *res); static void load_config_ready_indication (QmiClientPdc *client, QmiIndicationPdcLoadConfigOutput *output) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcLoadConfigInput) input = NULL; gboolean frame_reset; guint32 remaining_size; guint16 error_code = 0; if (!qmi_indication_pdc_load_config_output_get_indication_result (output, &error_code, &error)) { g_printerr ("error: couldn't load config: %s\n", error->message); operation_shutdown (FALSE); return; } if (error_code != 0) { g_printerr ("error: couldn't load config: %s\n", qmi_protocol_error_get_string ((QmiProtocolError) error_code)); operation_shutdown (FALSE); return; } if (qmi_indication_pdc_load_config_output_get_frame_reset (output, &frame_reset, NULL) && frame_reset) { g_printerr ("error: frame reset requested\n"); operation_shutdown (FALSE); return; } if (!qmi_indication_pdc_load_config_output_get_remaining_size (output, &remaining_size, &error)) { g_printerr ("error: couldn't load config: %s\n", error->message); operation_shutdown (FALSE); return; } if (remaining_size == 0) { g_print ("Finished loading\n"); operation_shutdown (TRUE); return; } g_print ("Loading next chunk (%u bytes remaining)\n", remaining_size); input = load_config_input_create_chunk (ctx->load_config_file_data); if (!input) { g_printerr ("error: couldn't create next chunk\n"); operation_shutdown (FALSE); return; } qmi_client_pdc_load_config (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) load_config_ready, NULL); } static void load_config_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(GError) error = NULL; g_autoptr(QmiMessagePdcLoadConfigOutput) output = NULL; output = qmi_client_pdc_load_config_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_pdc_load_config_output_get_result (output, &error)) { g_printerr ("error: couldn't load config: %s\n", error->message); operation_shutdown (FALSE); return; } } static QmiMessagePdcLoadConfigInput * load_config_input_create (const gchar *str) { LoadConfigFileData *config_file; QmiMessagePdcLoadConfigInput *input; config_file = load_config_file_from_string (str); if (!config_file) return NULL; input = load_config_input_create_chunk (config_file); if (!input) return NULL; ctx->load_config_file_data = config_file; return input; } static void run_load_config (void) { g_autoptr(QmiMessagePdcLoadConfigInput) input = NULL; g_debug ("Loading config asynchronously..."); input = load_config_input_create (load_config_str); if (!input) { operation_shutdown (FALSE); return; } /* Results are reported via indications */ ctx->load_config_indication_id = g_signal_connect (ctx->client, "load-config", G_CALLBACK (load_config_ready_indication), NULL); qmi_client_pdc_load_config (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) load_config_ready, NULL); } #endif /* HAVE_QMI_ACTION_PDC_LOAD_CONFIG */ /******************************************************************************/ /* Refresh */ #if defined HAVE_QMI_ACTION_PDC_REFRESH #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") static void monitoring_cancelled (GCancellable *cancellable) { operation_shutdown (TRUE); } static void refresh_received (QmiClientPdc *client, QmiIndicationPdcRefreshOutput *output) { g_autoptr(GError) error = NULL; QmiPdcRefreshEventType type; guint subscription_id; guint slot_id; g_print ("[%s] Received refresh indication:\n", qmi_device_get_path_display (ctx->device)); if (!qmi_indication_pdc_refresh_output_get_refresh_event (output, &type, &error)) { g_printerr ("error: refresh event has no type: %s\n", error->message); operation_shutdown (FALSE); return; } g_print (" Received event type %s", VALIDATE_UNKNOWN (qmi_pdc_refresh_event_type_get_string (type))); if (qmi_indication_pdc_refresh_output_get_subscription_id (output, &subscription_id, NULL)) g_print (", subscription ID: %u", subscription_id); if (qmi_indication_pdc_refresh_output_get_slot_id (output, &slot_id, NULL)) g_print (", slot ID: %u", slot_id); g_print ("\n"); } static void register_refresh_ready (QmiClientPdc *client, GAsyncResult *res) { g_autoptr(QmiMessagePdcRegisterOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_pdc_register_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_pdc_register_output_get_result (output, &error)) { g_printerr ("error: could not register for refresh events: %s\n", error->message); operation_shutdown (FALSE); return; } g_debug ("Registered for refresh events..."); ctx->refresh_indication_id = g_signal_connect (ctx->client, "refresh", G_CALLBACK (refresh_received), NULL); /* User can use Ctrl+C to cancel the monitoring at any time */ g_cancellable_connect (ctx->cancellable, G_CALLBACK (monitoring_cancelled), NULL, NULL); } static void register_refresh_events (void) { g_autoptr(QmiMessagePdcRegisterInput) re_input = NULL; re_input = qmi_message_pdc_register_input_new (); qmi_message_pdc_register_input_set_enable_reporting (re_input, TRUE, NULL); qmi_message_pdc_register_input_set_enable_refresh (re_input, TRUE, NULL); qmi_client_pdc_register ( ctx->client, re_input, 10, ctx->cancellable, (GAsyncReadyCallback) register_refresh_ready, NULL); } #endif /* HAVE_QMI_ACTION_PDC_REFRESH */ /******************************************************************************/ /* Common */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_pdc_run (QmiDevice *device, QmiClientPdc *client, GCancellable *cancellable) { /* Initialize context */ ctx = context_new (device, client, cancellable); #if defined HAVE_QMI_ACTION_PDC_LIST_CONFIGS if (list_configs_str) { run_list_configs (); return; } #endif #if defined HAVE_QMI_ACTION_PDC_ACTIVATE_CONFIG if (activate_config_str) { run_activate_config (); return; } #endif #if defined HAVE_QMI_ACTION_PDC_DEACTIVATE_CONFIG if (deactivate_config_str) { run_deactivate_config (); return; } #endif #if defined HAVE_QMI_MESSAGE_PDC_DELETE_CONFIG if (delete_config_str) { run_delete_config (); return; } #endif #if defined HAVE_QMI_ACTION_PDC_LOAD_CONFIG if (load_config_str) { run_load_config (); return; } #endif #if defined HAVE_QMI_ACTION_PDC_REFRESH if (monitor_refresh_flag) { register_refresh_events (); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_PDC */ libqmi-1.35.2-dev/src/qmicli/qmicli-qmiwwan.c000066400000000000000000000132351455567757300210370ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2021 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" /* Options */ static gboolean get_wwan_iface_flag; static gboolean get_expected_data_format_flag; static gchar *set_expected_data_format_str; static GOptionEntry entries[] = { { "get-wwan-iface", 'w', 0, G_OPTION_ARG_NONE, &get_wwan_iface_flag, "Get the associated WWAN iface name", NULL }, { "get-expected-data-format", 'e', 0, G_OPTION_ARG_NONE, &get_expected_data_format_flag, "Get the expected data format in the WWAN iface", NULL }, { "set-expected-data-format", 'E', 0, G_OPTION_ARG_STRING, &set_expected_data_format_str, "Set the expected data format in the WWAN iface", "[802-3|raw-ip|qmap-pass-through]" }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_qmiwwan_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("qmiwwan", "qmi_wwan specific options:", "Show qmi_wwan driver specific options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_qmiwwan_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_wwan_iface_flag + get_expected_data_format_flag + !!set_expected_data_format_str); if (n_actions > 1) { g_printerr ("error: too many qmi_wwan specific actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } /******************************************************************************/ static gboolean device_set_expected_data_format_cb (QmiDevice *dev) { QmiDeviceExpectedDataFormat expected; GError *error = NULL; if (!qmicli_read_device_expected_data_format_from_string (set_expected_data_format_str, &expected) || expected == QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN) g_printerr ("error: invalid requested data format: %s", set_expected_data_format_str); else if (!qmi_device_set_expected_data_format (dev, expected, &error)) { g_printerr ("error: cannot set expected data format: %s\n", error->message); g_error_free (error); } else g_print ("[%s] expected data format set to: %s\n", qmi_device_get_path_display (dev), qmi_device_expected_data_format_get_string (expected)); /* We're done now */ qmicli_async_operation_done (!error, FALSE); g_object_unref (dev); return FALSE; } static void device_set_expected_data_format (QmiDevice *dev) { g_debug ("Setting expected WWAN data format this control port..."); g_idle_add ((GSourceFunc) device_set_expected_data_format_cb, g_object_ref (dev)); } static gboolean device_get_expected_data_format_cb (QmiDevice *dev) { QmiDeviceExpectedDataFormat expected; GError *error = NULL; expected = qmi_device_get_expected_data_format (dev, &error); if (expected == QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN) { g_printerr ("error: cannot get expected data format: %s\n", error->message); g_error_free (error); } else g_print ("%s\n", qmi_device_expected_data_format_get_string (expected)); /* We're done now */ qmicli_async_operation_done (!error, FALSE); g_object_unref (dev); return FALSE; } static void device_get_expected_data_format (QmiDevice *dev) { g_debug ("Getting expected WWAN data format this control port..."); g_idle_add ((GSourceFunc) device_get_expected_data_format_cb, g_object_ref (dev)); } static gboolean device_get_wwan_iface_cb (QmiDevice *dev) { const gchar *wwan_iface; wwan_iface = qmi_device_get_wwan_iface (dev); if (!wwan_iface) g_printerr ("error: cannot get WWAN interface name\n"); else g_print ("%s\n", wwan_iface); /* We're done now */ qmicli_async_operation_done (!!wwan_iface, FALSE); g_object_unref (dev); return FALSE; } static void device_get_wwan_iface (QmiDevice *dev) { g_debug ("Getting WWAN iface for this control port..."); g_idle_add ((GSourceFunc) device_get_wwan_iface_cb, g_object_ref (dev)); } /******************************************************************************/ /* Common */ void qmicli_qmiwwan_run (QmiDevice *device, GCancellable *cancellable) { if (get_wwan_iface_flag) device_get_wwan_iface (device); else if (get_expected_data_format_flag) device_get_expected_data_format (device); else if (set_expected_data_format_str) device_set_expected_data_format (device); else g_warn_if_reached (); } libqmi-1.35.2-dev/src/qmicli/qmicli-qos.c000066400000000000000000000326711455567757300201630ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2018 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_QOS #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") /* Context */ typedef struct { QmiDevice *device; QmiClientQos *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gint get_flow_status_int = -1; static gboolean get_network_status_flag; static gint swi_read_data_stats_int = -1; static gboolean reset_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_QOS_GET_FLOW_STATUS { "qos-get-flow-status", 0, 0, G_OPTION_ARG_INT, &get_flow_status_int, "Get QoS flow status", "[QoS ID]" }, #endif #if defined HAVE_QMI_MESSAGE_QOS_GET_NETWORK_STATUS { "qos-get-network-status", 0, 0, G_OPTION_ARG_NONE, &get_network_status_flag, "Gets the network status", NULL }, #endif #if defined HAVE_QMI_MESSAGE_QOS_SWI_READ_DATA_STATS { "qos-swi-read-data-stats", 0, 0, G_OPTION_ARG_INT, &swi_read_data_stats_int, "Read data stats (Sierra Wireless specific)", "[APN ID]" }, #endif #if defined HAVE_QMI_MESSAGE_QOS_RESET { "qos-reset", 0, 0, G_OPTION_ARG_NONE, &reset_flag, "Reset the service state", NULL }, #endif { "qos-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a QOS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_qos_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("qos", "QoS options:", "Show Quality of Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_qos_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = ((get_flow_status_int >= 0) + get_network_status_flag + (swi_read_data_stats_int >= 0) + reset_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many QoS actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->cancellable) g_object_unref (context->cancellable); if (context->device) g_object_unref (context->device); if (context->client) g_object_unref (context->client); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_QOS_GET_FLOW_STATUS static void get_flow_status_ready (QmiClientQos *client, GAsyncResult *res) { QmiMessageQosGetFlowStatusOutput *output; GError *error = NULL; QmiQosStatus flow_status; output = qmi_client_qos_get_flow_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_qos_get_flow_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get QoS flow status: %s\n", error->message); g_error_free (error); qmi_message_qos_get_flow_status_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_qos_get_flow_status_output_get_value (output, &flow_status, NULL); g_print ("[%s] QoS flow status: %s\n", qmi_device_get_path_display (ctx->device), qmi_qos_status_get_string (flow_status)); qmi_message_qos_get_flow_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_QOS_GET_FLOW_STATUS */ #if defined HAVE_QMI_MESSAGE_QOS_GET_NETWORK_STATUS static void get_network_status_ready (QmiClientQos *client, GAsyncResult *res) { QmiMessageQosGetNetworkStatusOutput *output; GError *error = NULL; gboolean qos_supported; output = qmi_client_qos_get_network_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_qos_get_network_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get network status: %s\n", error->message); g_error_free (error); qmi_message_qos_get_network_status_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_qos_get_network_status_output_get_qos_supported (output, &qos_supported, NULL); g_print ("[%s] QoS %ssupported in network\n", qmi_device_get_path_display (ctx->device), qos_supported ? "" : "not "); qmi_message_qos_get_network_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_QOS_GET_NETWORK_STATUS */ #if defined HAVE_QMI_MESSAGE_QOS_SWI_READ_DATA_STATS static void swi_read_data_stats_ready (QmiClientQos *client, GAsyncResult *res) { QmiMessageQosSwiReadDataStatsOutput *output; GError *error = NULL; guint32 apn_id = 0; guint32 apn_tx_packets = 0; guint32 apn_tx_packets_dropped = 0; guint32 apn_rx_packets = 0; guint64 apn_tx_bytes = 0; guint64 apn_tx_bytes_dropped = 0; guint64 apn_rx_bytes = 0; GArray *flow = NULL; output = qmi_client_qos_swi_read_data_stats_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_qos_swi_read_data_stats_output_get_result (output, &error)) { g_printerr ("error: couldn't read data stats: %s\n", error->message); g_error_free (error); qmi_message_qos_swi_read_data_stats_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] QoS data stats read\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_qos_swi_read_data_stats_output_get_apn ( output, &apn_id, &apn_tx_packets, &apn_tx_packets_dropped, &apn_rx_packets, &apn_tx_bytes, &apn_tx_bytes_dropped, &apn_rx_bytes, NULL)) { g_print (" APN ID: %u\n", apn_id); g_print (" TX packets: %u\n", apn_tx_packets); g_print (" TX packets dropped: %u\n", apn_tx_packets_dropped); g_print (" RX packets: %u\n", apn_rx_packets); g_print (" TX bytes: %" G_GUINT64_FORMAT "\n", apn_tx_bytes); g_print (" TX bytes dropped: %" G_GUINT64_FORMAT "\n", apn_tx_bytes_dropped); g_print (" RX bytes: %" G_GUINT64_FORMAT "\n", apn_rx_bytes); } if (qmi_message_qos_swi_read_data_stats_output_get_flow ( output, &flow, NULL)) { guint i; for (i = 0; i < flow->len; i++) { QmiMessageQosSwiReadDataStatsOutputFlowElement *element; element = &g_array_index(flow, QmiMessageQosSwiReadDataStatsOutputFlowElement, i); g_print (" Flow %u\n", i); g_print (" Bearer ID: %u\n", element->bearer_id); g_print (" TX packets: %u\n", element->tx_packets); g_print (" TX packets dropped: %u\n", element->tx_packets_dropped); g_print (" TX bytes: %" G_GUINT64_FORMAT "\n", element->tx_bytes); g_print (" TX bytes dropped: %" G_GUINT64_FORMAT "\n", element->tx_bytes_dropped); } } qmi_message_qos_swi_read_data_stats_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_QOS_SWI_READ_DATA_STATS */ #if defined HAVE_QMI_MESSAGE_QOS_RESET static void reset_ready (QmiClientQos *client, GAsyncResult *res) { QmiMessageQosResetOutput *output; GError *error = NULL; output = qmi_client_qos_reset_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_qos_reset_output_get_result (output, &error)) { g_printerr ("error: couldn't reset the QoS service: %s\n", error->message); g_error_free (error); qmi_message_qos_reset_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed QoS service reset\n", qmi_device_get_path_display (ctx->device)); qmi_message_qos_reset_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_QOS_RESET */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_qos_run (QmiDevice *device, QmiClientQos *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_QOS_GET_FLOW_STATUS if (get_flow_status_int >= 0) { QmiMessageQosGetFlowStatusInput *input; input = qmi_message_qos_get_flow_status_input_new (); qmi_message_qos_get_flow_status_input_set_qos_id (input, get_flow_status_int, NULL); g_debug ("Asynchronously getting QoS flow status..."); qmi_client_qos_get_flow_status (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_flow_status_ready, NULL); qmi_message_qos_get_flow_status_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_QOS_GET_NETWORK_STATUS if (get_network_status_flag) { g_debug ("Asynchronously getting network status..."); qmi_client_qos_get_network_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_network_status_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_QOS_SWI_READ_DATA_STATS if (swi_read_data_stats_int >= 0) { QmiMessageQosSwiReadDataStatsInput *input; input = qmi_message_qos_swi_read_data_stats_input_new (); qmi_message_qos_swi_read_data_stats_input_set_apn_id (input, swi_read_data_stats_int, NULL); g_debug ("Asynchronously reading data stats..."); qmi_client_qos_swi_read_data_stats (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)swi_read_data_stats_ready, NULL); qmi_message_qos_swi_read_data_stats_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_QOS_RESET if (reset_flag) { g_debug ("Asynchronously resetting QoS service..."); qmi_client_qos_reset (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)reset_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_QOS */ libqmi-1.35.2-dev/src/qmicli/qmicli-sar.c000066400000000000000000000176101455567757300201420ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2020 Google Inc. */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_SAR /* Context */ typedef struct { QmiDevice *device; QmiClientSar *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gchar *rf_set_state_str; static gboolean rf_get_state_flag; static gboolean noop_flag; #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_SAR_RF_GET_STATE { "sar-rf-get-state", 0, 0, G_OPTION_ARG_NONE, &rf_get_state_flag, "Get RF state", NULL }, #endif #if defined HAVE_QMI_MESSAGE_SAR_RF_SET_STATE { "sar-rf-set-state", 0, 0, G_OPTION_ARG_STRING, &rf_set_state_str, "Set RF state.", "[(state number)]" }, #endif { "sar-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a SAR client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_sar_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("sar", "SAR options:", "Show Specific Absorption Rate options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_sar_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!rf_set_state_str + rf_get_state_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many SAR actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->client) g_object_unref (context->client); g_object_unref (context->cancellable); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_SAR_RF_GET_STATE static void rf_get_state_ready (QmiClientSar *client, GAsyncResult *res) { QmiMessageSarRfGetStateOutput *output; GError *error = NULL; QmiSarRfState rf_state; output = qmi_client_sar_rf_get_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_sar_rf_get_state_output_get_result (output, &error)) { g_printerr ("error: couldn't get SAR RF state: %s\n", error->message); g_error_free (error); qmi_message_sar_rf_get_state_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_sar_rf_get_state_output_get_state (output, &rf_state, NULL); g_print ("[%s] Successfully got SAR RF state: %s\n", qmi_device_get_path_display (ctx->device), qmi_sar_rf_state_get_string (rf_state)); qmi_message_sar_rf_get_state_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_SAR_RF_GET_STATE */ #if defined HAVE_QMI_MESSAGE_SAR_RF_SET_STATE static QmiMessageSarRfSetStateInput * rf_set_state_input_create (const gchar *str) { QmiMessageSarRfSetStateInput *input = NULL; QmiSarRfState rf_state; if (qmicli_read_sar_rf_state_from_string (str, &rf_state)) { GError *error = NULL; input = qmi_message_sar_rf_set_state_input_new (); if (!qmi_message_sar_rf_set_state_input_set_state ( input, rf_state, &error)) { g_printerr ("error: couldn't create input data: '%s'\n", error->message); g_error_free (error); qmi_message_sar_rf_set_state_input_unref (input); input = NULL; } } return input; } static void rf_set_state_ready (QmiClientSar *client, GAsyncResult *res) { QmiMessageSarRfSetStateOutput *output; GError *error = NULL; output = qmi_client_sar_rf_set_state_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_sar_rf_set_state_output_get_result (output, &error)) { g_printerr ("error: couldn't set RF state: %s\n", error->message); g_error_free (error); qmi_message_sar_rf_set_state_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] RF state set successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_sar_rf_set_state_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_SAR_RF_SET_STATE */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_sar_run (QmiDevice *device, QmiClientSar *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new0 (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_SAR_RF_GET_STATE if (rf_get_state_flag) { g_debug ("Asynchronously getting RF power state..."); qmi_client_sar_rf_get_state (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback) rf_get_state_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_SAR_RF_SET_STATE if (rf_set_state_str) { QmiMessageSarRfSetStateInput *input; g_debug ("Asynchronously setting RF power state..."); input = rf_set_state_input_create (rf_set_state_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_sar_rf_set_state (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback) rf_set_state_ready, NULL); qmi_message_sar_rf_set_state_input_unref (input); return; } #endif /* HAVE_QMI_MESSAGE_SAR_RF_SET_STATE */ /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_SAR */ libqmi-1.35.2-dev/src/qmicli/qmicli-uim.c000066400000000000000000003123761455567757300201560ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2012-2017 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_UIM #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") /* Context */ typedef struct { QmiDevice *device; QmiClientUim *client; GCancellable *cancellable; /* For Slot Status indication */ guint slot_status_indication_id; guint refresh_indication_id; } Context; static Context *ctx; /* Options */ static gchar *read_transparent_str; static gchar *read_record_str; static gchar *set_pin_protection_str; static gchar *verify_pin_str; static gchar *unblock_pin_str; static gchar *change_pin_str; static gchar *get_file_attributes_str; static gchar *sim_power_on_str; static gchar *sim_power_off_str; static gchar *change_provisioning_session_str; static gchar *switch_slot_str; static gchar *depersonalization_str; static gchar *remote_unlock_str; static gchar **monitor_refresh_file_array; static gboolean get_card_status_flag; static gboolean get_supported_messages_flag; static gboolean get_slot_status_flag; static gboolean monitor_slot_status_flag; static gboolean reset_flag; static gboolean monitor_refresh_all_flag; static gboolean noop_flag; static gboolean get_configuration_flag; #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION { "uim-set-pin-protection", 0, 0, G_OPTION_ARG_STRING, &set_pin_protection_str, "Set PIN protection", "[(PIN1|PIN2|UPIN),(disable|enable),(current PIN)]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_VERIFY_PIN { "uim-verify-pin", 0, 0, G_OPTION_ARG_STRING, &verify_pin_str, "Verify PIN", "[(PIN1|PIN2|UPIN),(current PIN)]", }, #endif #if defined HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN { "uim-unblock-pin", 0, 0, G_OPTION_ARG_STRING, &unblock_pin_str, "Unblock PIN", "[(PIN1|PIN2|UPIN),(PUK),(new PIN)]", }, #endif #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PIN { "uim-change-pin", 0, 0, G_OPTION_ARG_STRING, &change_pin_str, "Change PIN", "[(PIN1|PIN2|UPIN),(old PIN),(new PIN)]", }, #endif #if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT { "uim-read-transparent", 0, 0, G_OPTION_ARG_STRING, &read_transparent_str, "Read a transparent file given the file path", "[0xNNNN,0xNNNN,...]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES { "uim-get-file-attributes", 0, 0, G_OPTION_ARG_STRING, &get_file_attributes_str, "Get the attributes of a given file", "[0xNNNN,0xNNNN,...]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_READ_RECORD { "uim-read-record", 0, 0, G_OPTION_ARG_STRING, &read_record_str, "Read a record from given file (allowed keys: record-number, record-length, file ([0xNNNN-0xNNNN,...])", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS { "uim-get-card-status", 0, 0, G_OPTION_ARG_NONE, &get_card_status_flag, "Get card status", NULL }, #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_SUPPORTED_MESSAGES { "uim-get-supported-messages", 0, 0, G_OPTION_ARG_NONE, &get_supported_messages_flag, "Get supported messages", NULL }, #endif #if defined HAVE_QMI_MESSAGE_UIM_POWER_ON_SIM { "uim-sim-power-on", 0, 0, G_OPTION_ARG_STRING, &sim_power_on_str, "Power on SIM card", "[(slot number)]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_POWER_OFF_SIM { "uim-sim-power-off", 0, 0, G_OPTION_ARG_STRING, &sim_power_off_str, "Power off SIM card", "[(slot number)]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PROVISIONING_SESSION { "uim-change-provisioning-session", 0, 0, G_OPTION_ARG_STRING, &change_provisioning_session_str, "Change provisioning session (allowed keys: session-type, activate, slot, aid)", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS { "uim-get-slot-status", 0, 0, G_OPTION_ARG_NONE, &get_slot_status_flag, "Get slot status", NULL }, #endif #if defined HAVE_QMI_MESSAGE_UIM_SWITCH_SLOT && defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS { "uim-switch-slot", 0, 0, G_OPTION_ARG_STRING, &switch_slot_str, "Switch active physical slot", "[(slot number)]" }, #endif #if defined HAVE_QMI_INDICATION_UIM_SLOT_STATUS { "uim-monitor-slot-status", 0, 0, G_OPTION_ARG_NONE, &monitor_slot_status_flag, "Watch for slot status indications", NULL }, #endif #if defined HAVE_QMI_MESSAGE_UIM_RESET { "uim-reset", 0, 0, G_OPTION_ARG_NONE, &reset_flag, "Reset the service state", NULL }, #endif #if defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER { "uim-monitor-refresh-file", 0, 0, G_OPTION_ARG_STRING_ARRAY, &monitor_refresh_file_array, "Watch for REFRESH events for given file paths", "[0xNNNN,0xNNNN,...]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER_ALL { "uim-monitor-refresh-all", 0, 0, G_OPTION_ARG_NONE, &monitor_refresh_all_flag, "Watch for REFRESH events for any file", NULL }, #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION { "uim-get-configuration", 0, 0, G_OPTION_ARG_NONE, &get_configuration_flag, "Get personalization status of the modem", NULL }, #endif #if defined HAVE_QMI_MESSAGE_UIM_DEPERSONALIZATION { "uim-depersonalization", 0, 0, G_OPTION_ARG_STRING, &depersonalization_str, "Deactivates or unblocks personalization feature", "[(feature),(operation),(control key)[,(slot number)]]" }, #endif #if defined HAVE_QMI_MESSAGE_UIM_REMOTE_UNLOCK { "uim-remote-unlock", 0, 0, G_OPTION_ARG_STRING, &remote_unlock_str, "Updates the SimLock configuration data", "[XX:XX:...]" }, #endif { "uim-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a UIM client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_uim_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("uim", "UIM options:", "Show User Identity Module options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_uim_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!set_pin_protection_str + !!verify_pin_str + !!unblock_pin_str + !!change_pin_str + !!read_transparent_str + !!read_record_str + !!get_file_attributes_str + !!sim_power_on_str + !!sim_power_off_str + !!change_provisioning_session_str + !!switch_slot_str + !!monitor_refresh_file_array + !!depersonalization_str + !!remote_unlock_str + get_card_status_flag + get_supported_messages_flag + get_slot_status_flag + monitor_slot_status_flag + reset_flag + monitor_refresh_all_flag + get_configuration_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many UIM actions requested\n"); exit (EXIT_FAILURE); } if (monitor_slot_status_flag || monitor_refresh_file_array || monitor_refresh_all_flag) qmicli_expect_indications (); checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->slot_status_indication_id) g_signal_handler_disconnect (context->client, context->slot_status_indication_id); if (context->refresh_indication_id) g_signal_handler_disconnect (context->client, context->refresh_indication_id); if (context->client) g_object_unref (context->client); g_object_unref (context->cancellable); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION static QmiMessageUimSetPinProtectionInput * set_pin_protection_input_create (const gchar *str) { QmiMessageUimSetPinProtectionInput *input = NULL; gchar **split; QmiUimPinId pin_id; gboolean enable_disable; gchar *current_pin; /* Prepare inputs. * Format of the string is: * "[(PIN1|PIN2|UPIN),(disable|enable),(current PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_enable_disable_from_string (split[1], &enable_disable) && qmicli_read_non_empty_string (split[2], "current PIN", ¤t_pin)) { GError *error = NULL; GArray *placeholder_aid; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); input = qmi_message_uim_set_pin_protection_input_new (); if (!qmi_message_uim_set_pin_protection_input_set_info ( input, pin_id, enable_disable, current_pin, &error) || !qmi_message_uim_set_pin_protection_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, placeholder_aid, /* ignored */ &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_uim_set_pin_protection_input_unref (input); input = NULL; } g_array_unref (placeholder_aid); } g_strfreev (split); return input; } static void set_pin_protection_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimSetPinProtectionOutput *output; GError *error = NULL; output = qmi_client_uim_set_pin_protection_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_set_pin_protection_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't set PIN protection: %s\n", error->message); g_error_free (error); if (qmi_message_uim_set_pin_protection_output_get_retries_remaining ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_uim_set_pin_protection_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN protection updated\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_set_pin_protection_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION */ #if defined HAVE_QMI_MESSAGE_UIM_VERIFY_PIN static QmiMessageUimVerifyPinInput * verify_pin_input_create (const gchar *str) { QmiMessageUimVerifyPinInput *input = NULL; gchar **split; QmiUimPinId pin_id; gchar *current_pin; /* Prepare inputs. * Format of the string is: * "[(PIN1|PIN2),(current PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_non_empty_string (split[1], "current PIN", ¤t_pin)) { GError *error = NULL; GArray *placeholder_aid; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); input = qmi_message_uim_verify_pin_input_new (); if (!qmi_message_uim_verify_pin_input_set_info ( input, pin_id, current_pin, &error) || !qmi_message_uim_verify_pin_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, placeholder_aid, /* ignored */ &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_uim_verify_pin_input_unref (input); input = NULL; } g_array_unref (placeholder_aid); } g_strfreev (split); return input; } static void verify_pin_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimVerifyPinOutput *output; GError *error = NULL; output = qmi_client_uim_verify_pin_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_verify_pin_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't verify PIN: %s\n", error->message); g_error_free (error); if (qmi_message_uim_verify_pin_output_get_retries_remaining ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_uim_verify_pin_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN verified successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_verify_pin_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_VERIFY_PIN */ #if defined HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN static QmiMessageUimUnblockPinInput * unblock_pin_input_create (const gchar *str) { QmiMessageUimUnblockPinInput *input = NULL; gchar **split; QmiUimPinId pin_id; gchar *puk; gchar *new_pin; /* Prepare inputs. * Format of the string is: * "[(PIN|PIN2),(PUK),(new PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_non_empty_string (split[1], "PUK", &puk) && qmicli_read_non_empty_string (split[2], "new PIN", &new_pin)) { GError *error = NULL; GArray *placeholder_aid; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); input = qmi_message_uim_unblock_pin_input_new (); if (!qmi_message_uim_unblock_pin_input_set_info ( input, pin_id, puk, new_pin, &error) || !qmi_message_uim_unblock_pin_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, placeholder_aid, /* ignored */ &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_uim_unblock_pin_input_unref (input); input = NULL; } g_array_unref (placeholder_aid); } g_strfreev (split); return input; } static void unblock_pin_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimUnblockPinOutput *output; GError *error = NULL; output = qmi_client_uim_unblock_pin_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_unblock_pin_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't unblock PIN: %s\n", error->message); g_error_free (error); if (qmi_message_uim_unblock_pin_output_get_retries_remaining ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_uim_unblock_pin_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN unblocked successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_unblock_pin_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN */ #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PIN static QmiMessageUimChangePinInput * change_pin_input_create (const gchar *str) { QmiMessageUimChangePinInput *input = NULL; gchar **split; QmiUimPinId pin_id; gchar *old_pin; gchar *new_pin; /* Prepare inputs. * Format of the string is: * "[(PIN1|PIN2),(old PIN),(new PIN)]" */ split = g_strsplit (str, ",", -1); if (qmicli_read_uim_pin_id_from_string (split[0], &pin_id) && qmicli_read_non_empty_string (split[1], "old PIN", &old_pin) && qmicli_read_non_empty_string (split[2], "new PIN", &new_pin)) { GError *error = NULL; GArray *placeholder_aid; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); input = qmi_message_uim_change_pin_input_new (); if (!qmi_message_uim_change_pin_input_set_info ( input, pin_id, old_pin, new_pin, &error) || !qmi_message_uim_change_pin_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, placeholder_aid, /* ignored */ &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); qmi_message_uim_change_pin_input_unref (input); input = NULL; } g_array_unref (placeholder_aid); } g_strfreev (split); return input; } static void change_pin_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimChangePinOutput *output; GError *error = NULL; output = qmi_client_uim_change_pin_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_change_pin_output_get_result (output, &error)) { guint8 verify_retries_left; guint8 unblock_retries_left; g_printerr ("error: couldn't change PIN: %s\n", error->message); g_error_free (error); if (qmi_message_uim_change_pin_output_get_retries_remaining ( output, &verify_retries_left, &unblock_retries_left, NULL)) { g_printerr ("[%s] Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", qmi_device_get_path_display (ctx->device), verify_retries_left, unblock_retries_left); } qmi_message_uim_change_pin_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] PIN changed successfully\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_change_pin_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_CHANGE_PIN */ #if defined HAVE_QMI_MESSAGE_UIM_GET_SUPPORTED_MESSAGES static void get_supported_messages_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimGetSupportedMessagesOutput *output; GError *error = NULL; GArray *bytearray = NULL; gchar *str; output = qmi_client_uim_get_supported_messages_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_get_supported_messages_output_get_result (output, &error)) { g_printerr ("error: couldn't get supported UIM messages: %s\n", error->message); g_error_free (error); qmi_message_uim_get_supported_messages_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got supported UIM messages:\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_get_supported_messages_output_get_list (output, &bytearray, NULL); str = qmicli_get_supported_messages_list (bytearray ? (const guint8 *)bytearray->data : NULL, bytearray ? bytearray->len : 0); g_print ("%s", str); g_free (str); qmi_message_uim_get_supported_messages_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_GET_SUPPORTED_MESSAGES */ #if defined HAVE_QMI_MESSAGE_UIM_POWER_ON_SIM static QmiMessageUimPowerOnSimInput * power_on_sim_input_create (const gchar *slot_str) { QmiMessageUimPowerOnSimInput *input; guint slot; GError *error = NULL; input = qmi_message_uim_power_on_sim_input_new (); if (!qmicli_read_uint_from_string (slot_str, &slot) || (slot > G_MAXUINT8)) { g_printerr ("error: invalid slot number\n"); return NULL; } if (!qmi_message_uim_power_on_sim_input_set_slot (input, slot, &error)) { g_printerr ("error: could not create SIM power on input: %s\n", error->message); g_error_free (error); qmi_message_uim_power_on_sim_input_unref (input); input = NULL; } return input; } static void power_on_sim_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimPowerOnSimOutput *output; GError *error = NULL; output = qmi_client_uim_power_on_sim_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_power_on_sim_output_get_result (output, &error)) { g_printerr ("error: could not power on SIM: %s\n", error->message); g_error_free (error); qmi_message_uim_power_on_sim_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed SIM power on\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_power_on_sim_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_POWER_ON_SIM */ #if defined HAVE_QMI_MESSAGE_UIM_POWER_OFF_SIM static QmiMessageUimPowerOffSimInput * power_off_sim_input_create (const gchar *slot_str) { QmiMessageUimPowerOffSimInput *input; guint slot; GError *error = NULL; input = qmi_message_uim_power_off_sim_input_new (); if (!qmicli_read_uint_from_string (slot_str, &slot) || (slot > G_MAXUINT8)) { g_printerr ("error: invalid slot number\n"); return NULL; } if (!qmi_message_uim_power_off_sim_input_set_slot (input, slot, &error)) { g_printerr ("error: could not create SIM power off input: %s\n", error->message); g_error_free (error); qmi_message_uim_power_off_sim_input_unref (input); input = NULL; } return input; } static void power_off_sim_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimPowerOffSimOutput *output; GError *error = NULL; output = qmi_client_uim_power_off_sim_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_power_off_sim_output_get_result (output, &error)) { g_printerr ("error: could not power off SIM: %s\n", error->message); g_error_free (error); qmi_message_uim_power_off_sim_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed SIM power off\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_power_off_sim_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_POWER_OFF_SIM */ #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PROVISIONING_SESSION typedef struct { QmiUimSessionType session_type; gboolean session_type_set; gboolean activate; gboolean activate_set; guint slot; GArray *aid; } SetChangeProvisioningSessionProperties; static gboolean set_change_provisioning_session_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { SetChangeProvisioningSessionProperties *props = (SetChangeProvisioningSessionProperties *) user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' requires a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "session-type") == 0) { if (!qmicli_read_uim_session_type_from_string (value, &props->session_type)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid session type value: %s (not a valid enum)", value); return FALSE; } props->session_type_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "activate") == 0) { if (!qmicli_read_yes_no_from_string (value, &props->activate)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid activate value: %s (not a boolean)", value); return FALSE; } props->activate_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "slot") == 0) { if (!qmicli_read_uint_from_string (value, &props->slot)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid slot value: %s (not a number)", value); return FALSE; } if (props->slot > G_MAXUINT8) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid slot value: %s (out of range)", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "aid") == 0) { if (!qmicli_read_raw_data_from_string (value, &props->aid)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid aid value: %s (not an hex string)", value); return FALSE; } return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized option '%s'", key); return FALSE; } static QmiMessageUimChangeProvisioningSessionInput * change_provisioning_session_input_create (const gchar *str) { QmiMessageUimChangeProvisioningSessionInput *input; GError *error = NULL; SetChangeProvisioningSessionProperties props = { 0 }; input = qmi_message_uim_change_provisioning_session_input_new (); if (!qmicli_parse_key_value_string (str, &error, set_change_provisioning_session_properties_handle, &props)) { g_printerr ("error: could not parse input string '%s': %s\n", str, error->message); g_error_free (error); g_clear_pointer (&input, qmi_message_uim_change_provisioning_session_input_unref); goto out; } if (!props.session_type_set || !props.activate_set) { g_printerr ("error: mandatory fields 'session-type' and 'activate' not given\n"); g_clear_pointer (&input, qmi_message_uim_change_provisioning_session_input_unref); goto out; } qmi_message_uim_change_provisioning_session_input_set_session_change ( input, props.session_type, props.activate, NULL); if (props.slot || props.aid) { GArray *aid = NULL; aid = props.aid ? g_array_ref (props.aid) : g_array_new (FALSE, FALSE, sizeof (guint8)); qmi_message_uim_change_provisioning_session_input_set_application_information ( input, props.slot, aid, NULL); g_array_unref (aid); } out: return input; } static void change_provisioning_session_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimChangeProvisioningSessionOutput *output; GError *error = NULL; output = qmi_client_uim_change_provisioning_session_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_change_provisioning_session_output_get_result (output, &error)) { g_printerr ("error: could not power off SIM: %s\n", error->message); g_error_free (error); qmi_message_uim_change_provisioning_session_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully changed provisioning session\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_change_provisioning_session_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_CHANGE_PROVISIONING_SESSION */ #if (defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS || \ defined HAVE_QMI_INDICATION_UIM_SLOT_STATUS) static const gchar bcd_chars[] = "0123456789\0\0\0\0\0\0"; static gchar * decode_iccid (const gchar *bcd, gsize bcd_len) { GString *str; gsize i; if (!bcd) return NULL; str = g_string_sized_new (bcd_len * 2 + 1); for (i = 0; i < bcd_len; i++) { str = g_string_append_c (str, bcd_chars[bcd[i] & 0xF]); str = g_string_append_c (str, bcd_chars[(bcd[i] >> 4) & 0xF]); } return g_string_free (str, FALSE); } #define EID_LENGTH 16 static gchar * decode_eid (const gchar *eid, gsize eid_len) { GString *str; gsize i; if (!eid) return NULL; if (eid_len != EID_LENGTH) return NULL; str = g_string_sized_new (eid_len * 2 + 1); for (i = 0; i < eid_len; i++) { str = g_string_append_c (str, bcd_chars[(eid[i] >> 4) & 0xF]); str = g_string_append_c (str, bcd_chars[eid[i] & 0xF]); } return g_string_free (str, FALSE); } static void print_slot_status (GArray *physical_slots, GArray *ext_information, GArray *slot_eids) { guint i; if (ext_information && physical_slots->len != ext_information->len) { g_print ("Malformed extended information data"); ext_information = NULL; } if (slot_eids && physical_slots->len != slot_eids->len) { g_print ("Malformed slot EID data"); slot_eids = NULL; } for (i = 0; i < physical_slots->len; i++) { QmiPhysicalSlotStatusSlot *slot_status; QmiPhysicalSlotInformationSlot *slot_info = NULL; QmiSlotEidElement *slot_eid = NULL; g_autofree gchar *iccid = NULL; g_autofree gchar *eid = NULL; slot_status = &g_array_index (physical_slots, QmiPhysicalSlotStatusSlot, i); g_print (" Physical slot %u:\n", i + 1); g_print (" Card status: %s\n", qmi_uim_physical_card_state_get_string (slot_status->physical_card_status)); g_print (" Slot status: %s\n", qmi_uim_slot_state_get_string (slot_status->physical_slot_status)); if (slot_status->physical_slot_status == QMI_UIM_SLOT_STATE_ACTIVE) g_print (" Logical slot: %u\n", slot_status->logical_slot); if (slot_status->physical_card_status != QMI_UIM_PHYSICAL_CARD_STATE_PRESENT) continue; if (slot_status->iccid->len) iccid = decode_iccid (slot_status->iccid->data, slot_status->iccid->len); g_print (" ICCID: %s\n", VALIDATE_UNKNOWN (iccid)); /* Extended information, if available */ if (!ext_information) continue; slot_info = &g_array_index (ext_information, QmiPhysicalSlotInformationSlot, i); g_print (" Protocol: %s\n", qmi_uim_card_protocol_get_string (slot_info->card_protocol)); g_print (" Num apps: %u\n", slot_info->valid_applications); g_print (" Is eUICC: %s\n", slot_info->is_euicc ? "yes" : "no"); /* EID info, if available and this is an eUICC */ if (!slot_info->is_euicc || !slot_eids) continue; slot_eid = &g_array_index (slot_eids, QmiSlotEidElement, i); if (slot_eid->eid) eid = decode_eid (slot_eid->eid->data, slot_eid->eid->len); g_print (" EID: %s\n", VALIDATE_UNKNOWN (eid)); } } #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS static void get_slot_status_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimGetSlotStatusOutput *output; GArray *physical_slots; GArray *ext_information = NULL; GArray *slot_eids = NULL; GError *error = NULL; output = qmi_client_uim_get_slot_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_get_slot_status_output_get_result (output, &error)) { g_printerr ("error: could not get slots status: %s\n", error->message); g_error_free (error); qmi_message_uim_get_slot_status_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got slots status\n", qmi_device_get_path_display (ctx->device)); if (!qmi_message_uim_get_slot_status_output_get_physical_slot_status ( output, &physical_slots, &error)) { g_printerr ("error: could not parse slots status response: %s\n", error->message); g_error_free (error); qmi_message_uim_get_slot_status_output_unref (output); operation_shutdown (FALSE); return; } /* Both of these are recoverable, just print less information per slot */ qmi_message_uim_get_slot_status_output_get_physical_slot_information (output, &ext_information, NULL); qmi_message_uim_get_slot_status_output_get_slot_eid (output, &slot_eids, NULL); g_print ("[%s] %u physical slots found:\n", qmi_device_get_path_display (ctx->device), physical_slots->len); print_slot_status (physical_slots, ext_information, slot_eids); qmi_message_uim_get_slot_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS */ #if defined HAVE_QMI_MESSAGE_UIM_SWITCH_SLOT && defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS static void switch_slot_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimSwitchSlotOutput *output; GError *error = NULL; output = qmi_client_uim_switch_slot_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_switch_slot_output_get_result (output, &error)) { g_printerr ("error: couldn't switch slots: %s\n", error->message); g_error_free (error); qmi_message_uim_switch_slot_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully switched slots\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_switch_slot_output_unref (output); operation_shutdown (TRUE); } static QmiMessageUimSwitchSlotInput * switch_slot_input_create (guint logical_slot, guint physical_slot) { QmiMessageUimSwitchSlotInput *input; GError *error = NULL; input = qmi_message_uim_switch_slot_input_new (); if (!qmi_message_uim_switch_slot_input_set_logical_slot (input, logical_slot, &error) || !qmi_message_uim_switch_slot_input_set_physical_slot (input, physical_slot, &error)) { g_printerr ("error: could not create switch slot input: %s\n", error->message); g_error_free (error); g_clear_pointer (&input, qmi_message_uim_switch_slot_input_unref); } return input; } static void get_active_logical_slot_ready (QmiClientUim *client, GAsyncResult *res, gpointer user_data) { QmiMessageUimGetSlotStatusOutput *output; QmiMessageUimSwitchSlotInput *input; GArray *physical_slots; guint physical_slot_id; guint active_logical_slot_id = 0; guint i; GError *error = NULL; physical_slot_id = GPOINTER_TO_UINT (user_data); output = qmi_client_uim_get_slot_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_get_slot_status_output_get_result (output, &error)) { g_printerr ("error: could not get slots status: %s\n", error->message); g_error_free (error); qmi_message_uim_get_slot_status_output_unref (output); operation_shutdown (FALSE); return; } if (!qmi_message_uim_get_slot_status_output_get_physical_slot_status ( output, &physical_slots, &error)) { g_printerr ("error: could not parse slots status response: %s\n", error->message); g_error_free (error); qmi_message_uim_get_slot_status_output_unref (output); operation_shutdown (FALSE); return; } /* Ensure the physical slot is available. */ if (physical_slot_id > physical_slots->len) { g_printerr ("error: physical slot %u is unavailable\n", physical_slot_id); qmi_message_uim_get_slot_status_output_unref (output); operation_shutdown (FALSE); return; } /* Find active logical slot */ for (i = 0; i < physical_slots->len; i++) { QmiPhysicalSlotStatusSlot *slot_status; slot_status = &g_array_index (physical_slots, QmiPhysicalSlotStatusSlot, i); if (slot_status->physical_slot_status == QMI_UIM_SLOT_STATE_ACTIVE) { active_logical_slot_id = slot_status->logical_slot; break; } } qmi_message_uim_get_slot_status_output_unref (output); if (active_logical_slot_id == 0) { g_printerr ("error: no active logical slot\n"); operation_shutdown (FALSE); return; } input = switch_slot_input_create (active_logical_slot_id, physical_slot_id); qmi_client_uim_switch_slot (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)switch_slot_ready, ctx); qmi_message_uim_switch_slot_input_unref (input); } #endif /* HAVE_QMI_MESSAGE_UIM_SWITCH_SLOT && HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS */ #if defined HAVE_QMI_INDICATION_UIM_SLOT_STATUS static void monitoring_cancelled (GCancellable *cancellable) { operation_shutdown (TRUE); } static void slot_status_received (QmiClientUim *client, QmiIndicationUimSlotStatusOutput *output) { GArray *physical_slots; GArray *ext_information = NULL; GArray *slot_eids = NULL; GError *error = NULL; g_print ("[%s] Received slot status indication:\n", qmi_device_get_path_display (ctx->device)); if (!qmi_indication_uim_slot_status_output_get_physical_slot_status ( output, &physical_slots, &error)) { g_printerr ("error: could not parse slots status: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } /* Both of these are recoverable, just print less information per slot */ qmi_indication_uim_slot_status_output_get_physical_slot_information (output, &ext_information, NULL); qmi_indication_uim_slot_status_output_get_slot_eid (output, &slot_eids, NULL); print_slot_status (physical_slots, ext_information, slot_eids); } static void register_physical_slot_status_events_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimRegisterEventsOutput *output; GError *error = NULL; output = qmi_client_uim_register_events_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_register_events_output_get_result (output, &error)) { g_printerr ("error: could not register slot status change events: %s\n", error->message); qmi_message_uim_register_events_output_unref (output); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Registered physical slot status change events..."); ctx->slot_status_indication_id = g_signal_connect (ctx->client, "slot-status", G_CALLBACK (slot_status_received), NULL); /* User can use Ctrl+C to cancel the monitoring at any time */ g_cancellable_connect (ctx->cancellable, G_CALLBACK (monitoring_cancelled), NULL, NULL); } static void register_physical_slot_status_events (void) { QmiMessageUimRegisterEventsInput *re_input; re_input = qmi_message_uim_register_events_input_new (); qmi_message_uim_register_events_input_set_event_registration_mask ( re_input, QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS, NULL); qmi_client_uim_register_events ( ctx->client, re_input, 10, ctx->cancellable, (GAsyncReadyCallback) register_physical_slot_status_events_ready, NULL); qmi_message_uim_register_events_input_unref (re_input); } #endif /* HAVE_QMI_INDICATION_UIM_SLOT_STATUS */ #if defined HAVE_QMI_MESSAGE_UIM_RESET static void reset_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimResetOutput *output; GError *error = NULL; output = qmi_client_uim_reset_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_reset_output_get_result (output, &error)) { g_printerr ("error: couldn't reset the UIM service: %s\n", error->message); g_error_free (error); qmi_message_uim_reset_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed UIM service reset\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_reset_output_unref (output); operation_shutdown (TRUE); } #endif static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } #if defined HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS static void get_card_status_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimGetCardStatusOutput *output; GError *error = NULL; guint16 index_gw_primary; guint16 index_1x_primary; guint16 index_gw_secondary; guint16 index_1x_secondary; GArray *cards; guint i; output = qmi_client_uim_get_card_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_get_card_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get card status: %s\n", error->message); g_error_free (error); qmi_message_uim_get_card_status_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got card status\n", qmi_device_get_path_display (ctx->device)); qmi_message_uim_get_card_status_output_get_card_status ( output, &index_gw_primary, &index_1x_primary, &index_gw_secondary, &index_1x_secondary, &cards, NULL); g_print ("Provisioning applications:\n"); if (index_gw_primary == 0xFFFF) g_print ("\tPrimary GW: session doesn't exist\n"); else g_print ("\tPrimary GW: slot '%u', application '%u'\n", ((index_gw_primary & 0xFF00) >> 8) + 1, ((index_gw_primary & 0x00FF)) + 1); if (index_1x_primary == 0xFFFF) g_print ("\tPrimary 1X: session doesn't exist\n"); else g_print ("\tPrimary 1X: slot '%u', application '%u'\n", ((index_1x_primary & 0xFF00) >> 8) + 1, ((index_1x_primary & 0x00FF)) + 1); if (index_gw_secondary == 0xFFFF) g_print ("\tSecondary GW: session doesn't exist\n"); else g_print ("\tSecondary GW: slot '%u', application '%u'\n", ((index_gw_secondary & 0xFF00) >> 8) + 1, ((index_gw_secondary & 0x00FF)) + 1); if (index_1x_secondary == 0xFFFF) g_print ("\tSecondary 1X: session doesn't exist\n"); else g_print ("\tSecondary 1X: slot '%u', application '%u'\n", ((index_1x_secondary & 0xFF00) >> 8) + 1, ((index_1x_secondary & 0x00FF)) + 1); for (i = 0; i < cards->len; i++) { QmiMessageUimGetCardStatusOutputCardStatusCardsElement *card; guint j; card = &g_array_index (cards, QmiMessageUimGetCardStatusOutputCardStatusCardsElement, i); g_print ("Slot [%u]:\n", i + 1); if (card->card_state != QMI_UIM_CARD_STATE_ERROR) g_print ("\tCard state: '%s'\n", qmi_uim_card_state_get_string (card->card_state)); else g_print ("\tCard state: '%s: %s (%u)'\n", qmi_uim_card_state_get_string (card->card_state), VALIDATE_UNKNOWN (qmi_uim_card_error_get_string (card->error_code)), card->error_code); g_print ("\tUPIN state: '%s'\n" "\t\tUPIN retries: '%u'\n" "\t\tUPUK retries: '%u'\n", qmi_uim_pin_state_get_string (card->upin_state), card->upin_retries, card->upuk_retries); for (j = 0; j < card->applications->len; j++) { QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElementV2 *app; gchar *str; app = &g_array_index (card->applications, QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElementV2, j); str = qmicli_get_raw_data_printable (app->application_identifier_value, 80, ""); g_print ("\tApplication [%u]:\n" "\t\tApplication type: '%s (%u)'\n" "\t\tApplication state: '%s'\n" "\t\tApplication ID:\n" "\t\t\t%s", j + 1, VALIDATE_UNKNOWN (qmi_uim_card_application_type_get_string (app->type)), app->type, qmi_uim_card_application_state_get_string (app->state), str); if (app->personalization_state == QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_CODE_REQUIRED || app->personalization_state == QMI_UIM_CARD_APPLICATION_PERSONALIZATION_STATE_PUK_CODE_REQUIRED) g_print ("\t\tPersonalization state: '%s' (feature: %s)\n" "\t\t\tDisable retries: '%u'\n" "\t\t\tUnblock retries: '%u'\n", qmi_uim_card_application_personalization_state_get_string (app->personalization_state), qmi_uim_card_application_personalization_feature_status_get_string (app->personalization_feature), app->personalization_retries, app->personalization_unblock_retries); else g_print ("\t\tPersonalization state: '%s'\n", qmi_uim_card_application_personalization_state_get_string (app->personalization_state)); g_print ("\t\tUPIN replaces PIN1: '%s'\n", app->upin_replaces_pin1 ? "yes" : "no"); g_print ("\t\tPIN1 state: '%s'\n" "\t\t\tPIN1 retries: '%u'\n" "\t\t\tPUK1 retries: '%u'\n" "\t\tPIN2 state: '%s'\n" "\t\t\tPIN2 retries: '%u'\n" "\t\t\tPUK2 retries: '%u'\n", qmi_uim_pin_state_get_string (app->pin1_state), app->pin1_retries, app->puk1_retries, qmi_uim_pin_state_get_string (app->pin2_state), app->pin2_retries, app->puk2_retries); g_free (str); } } qmi_message_uim_get_card_status_output_unref (output); operation_shutdown (TRUE); } #endif /* defined HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS */ #if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT || \ defined HAVE_QMI_MESSAGE_UIM_READ_RECORD || \ defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES static gboolean get_sim_file_id_and_path_with_separator (const gchar *file_path_str, guint16 *file_id, GArray **file_path, const gchar *separator) { guint i; gchar **split; split = g_strsplit (file_path_str, separator, -1); if (!split) { g_printerr ("error: invalid file path given: '%s'\n", file_path_str); return FALSE; } *file_path = g_array_sized_new (FALSE, FALSE, sizeof (guint8), g_strv_length (split) - 1); *file_id = 0; for (i = 0; split[i]; i++) { gulong path_item; path_item = (strtoul (split[i], NULL, 16)) & 0xFFFF; /* If there are more fields, this is part of the path; otherwise it's * the file id */ if (split[i + 1]) { guint8 val; val = path_item & 0xFF; g_array_append_val (*file_path, val); val = (path_item >> 8) & 0xFF; g_array_append_val (*file_path, val); } else { *file_id = path_item; } } g_strfreev (split); if (*file_id == 0) { g_array_unref (*file_path); g_printerr ("error: invalid file path given: '%s'\n", file_path_str); return FALSE; } return TRUE; } #endif /* HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT * HAVE_QMI_MESSAGE_UIM_READ_RECORD * HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES */ #if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT || \ defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES || \ defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER static gboolean get_sim_file_id_and_path (const gchar *file_path_str, guint16 *file_id, GArray **file_path) { return get_sim_file_id_and_path_with_separator (file_path_str, file_id, file_path, ","); } #endif /* HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT * HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES * HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER */ #if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT static void read_transparent_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimReadTransparentOutput *output; GError *error = NULL; guint8 sw1 = 0; guint8 sw2 = 0; GArray *read_result = NULL; output = qmi_client_uim_read_transparent_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_read_transparent_output_get_result (output, &error)) { g_printerr ("error: couldn't read transparent file from the UIM: %s\n", error->message); g_error_free (error); /* Card result */ if (qmi_message_uim_read_transparent_output_get_card_result ( output, &sw1, &sw2, NULL)) { g_print ("Card result:\n" "\tSW1: '0x%02x'\n" "\tSW2: '0x%02x'\n", sw1, sw2); } qmi_message_uim_read_transparent_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully read information from the UIM:\n", qmi_device_get_path_display (ctx->device)); /* Card result */ if (qmi_message_uim_read_transparent_output_get_card_result ( output, &sw1, &sw2, NULL)) { g_print ("Card result:\n" "\tSW1: '0x%02x'\n" "\tSW2: '0x%02x'\n", sw1, sw2); } /* Read result */ if (qmi_message_uim_read_transparent_output_get_read_result ( output, &read_result, NULL)) { gchar *str; str = qmicli_get_raw_data_printable (read_result, 80, "\t"); g_print ("Read result:\n" "%s\n", str); g_free (str); } qmi_message_uim_read_transparent_output_unref (output); operation_shutdown (TRUE); } static QmiMessageUimReadTransparentInput * read_transparent_build_input (const gchar *file_path_str) { QmiMessageUimReadTransparentInput *input; guint16 file_id = 0; GArray *file_path = NULL; GArray *placeholder_aid; if (!get_sim_file_id_and_path (file_path_str, &file_id, &file_path)) return NULL; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); input = qmi_message_uim_read_transparent_input_new (); qmi_message_uim_read_transparent_input_set_session ( input, QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING, placeholder_aid, /* ignored */ NULL); qmi_message_uim_read_transparent_input_set_file ( input, file_id, file_path, NULL); qmi_message_uim_read_transparent_input_set_read_information (input, 0, 0, NULL); g_array_unref (file_path); g_array_unref (placeholder_aid); return input; } #endif /* HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT */ #if defined HAVE_QMI_MESSAGE_UIM_READ_RECORD static void read_record_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimReadRecordOutput *output; GError *error = NULL; guint8 sw1 = 0; guint8 sw2 = 0; GArray *read_result = NULL; output = qmi_client_uim_read_record_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_read_record_output_get_result (output, &error)) { g_printerr ("error: couldn't read record file from the UIM: %s\n", error->message); g_error_free (error); /* Card result */ if (qmi_message_uim_read_record_output_get_card_result ( output, &sw1, &sw2, NULL)) { g_print ("Card result:\n" "\tSW1: '0x%02x'\n" "\tSW2: '0x%02x'\n", sw1, sw2); } qmi_message_uim_read_record_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully read information from the UIM:\n", qmi_device_get_path_display (ctx->device)); /* Card result */ if (qmi_message_uim_read_record_output_get_card_result ( output, &sw1, &sw2, NULL)) { g_print ("Card result:\n" "\tSW1: '0x%02x'\n" "\tSW2: '0x%02x'\n", sw1, sw2); } /* Read result */ if (qmi_message_uim_read_record_output_get_read_result ( output, &read_result, NULL)) { gchar *str; str = qmicli_get_raw_data_printable (read_result, 80, "\t"); g_print ("Read result:\n" "%s\n", str); g_free (str); } qmi_message_uim_read_record_output_unref (output); operation_shutdown (TRUE); } typedef struct { char *file; guint16 record_number; guint16 record_length; } SetReadRecordProperties; static gboolean set_read_record_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { SetReadRecordProperties *props = (SetReadRecordProperties *) user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' requires a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "file") == 0) { props->file = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "record-number") == 0) { guint aux; if (!qmicli_read_uint_from_string (value, &aux) || (aux > G_MAXUINT16)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "failed reading key 'record-number' as 16bit value"); return FALSE; } props->record_number = (guint16) aux; return TRUE; } if (g_ascii_strcasecmp (key, "record-length") == 0) { guint aux; if (!qmicli_read_uint_from_string (value, &aux) || (aux > G_MAXUINT16)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "failed reading key 'record-length' as 16bit value"); return FALSE; } props->record_length = (guint16) aux; return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized option '%s'", key); return FALSE; } static QmiMessageUimReadRecordInput * read_record_input_create (const gchar *str) { GError *error = NULL; QmiMessageUimReadRecordInput *input = NULL; SetReadRecordProperties props = { .file = NULL, .record_number = 0, .record_length = 0, }; guint16 file_id = 0; GArray *file_path = NULL; GArray *placeholder_aid; if (!qmicli_parse_key_value_string (str, &error, set_read_record_properties_handle, &props)) { g_printerr ("error: could not parse input string '%s': %s\n", str, error->message); g_error_free (error); goto out; } if (!get_sim_file_id_and_path_with_separator (props.file, &file_id, &file_path, "-")) goto out; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); input = qmi_message_uim_read_record_input_new (); qmi_message_uim_read_record_input_set_session ( input, QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING, placeholder_aid, /* ignored */ NULL); qmi_message_uim_read_record_input_set_file ( input, file_id, file_path, NULL); qmi_message_uim_read_record_input_set_record ( input, props.record_number, props.record_length, NULL); g_array_unref (placeholder_aid); out: free (props.file); g_array_unref (file_path); return input; } #endif /* HAVE_QMI_MESSAGE_UIM_READ_RECORD */ #if defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES static void get_file_attributes_ready (QmiClientUim *client, GAsyncResult *res, gchar *file_name) { QmiMessageUimGetFileAttributesOutput *output; GError *error = NULL; guint8 sw1 = 0; guint8 sw2 = 0; guint16 file_size; guint16 file_id; QmiUimFileType file_type; guint16 record_size; guint16 record_count; QmiUimSecurityAttributeLogic read_security_attributes_logic; QmiUimSecurityAttribute read_security_attributes; QmiUimSecurityAttributeLogic write_security_attributes_logic; QmiUimSecurityAttribute write_security_attributes; QmiUimSecurityAttributeLogic increase_security_attributes_logic; QmiUimSecurityAttribute increase_security_attributes; QmiUimSecurityAttributeLogic deactivate_security_attributes_logic; QmiUimSecurityAttribute deactivate_security_attributes; QmiUimSecurityAttributeLogic activate_security_attributes_logic; QmiUimSecurityAttribute activate_security_attributes; GArray *raw = NULL; output = qmi_client_uim_get_file_attributes_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); g_free (file_name); return; } if (!qmi_message_uim_get_file_attributes_output_get_result (output, &error)) { g_printerr ("error: couldn't get '%s' file attributes from the UIM: %s\n", file_name, error->message); g_error_free (error); /* Card result */ if (qmi_message_uim_get_file_attributes_output_get_card_result ( output, &sw1, &sw2, NULL)) { g_print ("Card result:\n" "\tSW1: '0x%02x'\n" "\tSW2: '0x%02x'\n", sw1, sw2); } qmi_message_uim_get_file_attributes_output_unref (output); operation_shutdown (FALSE); g_free (file_name); return; } g_print ("[%s] Successfully got file '%s' attributes from the UIM:\n", file_name, qmi_device_get_path_display (ctx->device)); /* Card result */ if (qmi_message_uim_get_file_attributes_output_get_card_result ( output, &sw1, &sw2, NULL)) { g_print ("Card result:\n" "\tSW1: '0x%02x'\n" "\tSW2: '0x%02x'\n", sw1, sw2); } /* File attributes */ if (qmi_message_uim_get_file_attributes_output_get_file_attributes ( output, &file_size, &file_id, &file_type, &record_size, &record_count, &read_security_attributes_logic, &read_security_attributes, &write_security_attributes_logic, &write_security_attributes, &increase_security_attributes_logic, &increase_security_attributes, &deactivate_security_attributes_logic, &deactivate_security_attributes, &activate_security_attributes_logic, &activate_security_attributes, &raw, NULL)) { g_autofree gchar *read_security_attributes_str = NULL; g_autofree gchar *write_security_attributes_str = NULL; g_autofree gchar *increase_security_attributes_str = NULL; g_autofree gchar *deactivate_security_attributes_str = NULL; g_autofree gchar *activate_security_attributes_str = NULL; g_autofree gchar *raw_str = NULL; g_print ("File attributes:\n"); g_print ("\tFile size: %u\n", (guint)file_size); g_print ("\tFile ID: %u\n", (guint)file_id); g_print ("\tFile type: %s\n", qmi_uim_file_type_get_string (file_type)); g_print ("\tRecord size: %u\n", (guint)record_size); g_print ("\tRecord count: %u\n", (guint)record_count); read_security_attributes_str = qmi_uim_security_attribute_build_string_from_mask (read_security_attributes); g_print ("\tRead security attributes: (%s) %s\n", qmi_uim_security_attribute_logic_get_string (read_security_attributes_logic), VALIDATE_MASK_NONE (read_security_attributes_str)); write_security_attributes_str = qmi_uim_security_attribute_build_string_from_mask (write_security_attributes); g_print ("\tWrite security attributes: (%s) %s\n", qmi_uim_security_attribute_logic_get_string (write_security_attributes_logic), VALIDATE_MASK_NONE (write_security_attributes_str)); increase_security_attributes_str = qmi_uim_security_attribute_build_string_from_mask (increase_security_attributes); g_print ("\tIncrease security attributes: (%s) %s\n", qmi_uim_security_attribute_logic_get_string (increase_security_attributes_logic), VALIDATE_MASK_NONE (increase_security_attributes_str)); deactivate_security_attributes_str = qmi_uim_security_attribute_build_string_from_mask (deactivate_security_attributes); g_print ("\tDeactivate security attributes: (%s) %s\n", qmi_uim_security_attribute_logic_get_string (deactivate_security_attributes_logic), VALIDATE_MASK_NONE (deactivate_security_attributes_str)); activate_security_attributes_str = qmi_uim_security_attribute_build_string_from_mask (activate_security_attributes); g_print ("\tActivate security attributes: (%s) %s\n", qmi_uim_security_attribute_logic_get_string (activate_security_attributes_logic), VALIDATE_MASK_NONE (activate_security_attributes_str)); raw_str = qmicli_get_raw_data_printable (raw, 80, "\t"); g_print ("\tRaw: %s\n", raw_str); } qmi_message_uim_get_file_attributes_output_unref (output); operation_shutdown (TRUE); } static QmiMessageUimGetFileAttributesInput * get_file_attributes_build_input (const gchar *file_path_str) { QmiMessageUimGetFileAttributesInput *input; guint16 file_id = 0; GArray *file_path = NULL; GArray *placeholder_aid; if (!get_sim_file_id_and_path (file_path_str, &file_id, &file_path)) return NULL; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); input = qmi_message_uim_get_file_attributes_input_new (); qmi_message_uim_get_file_attributes_input_set_session ( input, QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING, placeholder_aid, /* ignored */ NULL); qmi_message_uim_get_file_attributes_input_set_file ( input, file_id, file_path, NULL); g_array_unref (placeholder_aid); g_array_unref (file_path); return input; } #endif /* HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES */ #if defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER || \ defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER_ALL static void refresh_complete_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimRefreshCompleteOutput *output; GError *error = NULL; output = qmi_client_uim_refresh_complete_finish (client, res, &error); if (!output) { g_printerr ("error: refresh complete failed: %s\n", error->message); g_error_free (error); return; } /* Ignore error, just log it as warning. In case we send complete message when * the modem does not expect it, we could get an error that is harmless. */ if (!qmi_message_uim_refresh_complete_output_get_result (output, &error)) { g_warning ("refresh complete failed: %s\n", error->message); g_error_free (error); } else g_debug ("Refresh complete OK."); qmi_message_uim_refresh_complete_output_unref (output); } static void refresh_complete (QmiClientUim *client, gboolean success) { QmiMessageUimRefreshCompleteInput *refresh_complete_input; GArray *placeholder_aid; placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); refresh_complete_input = qmi_message_uim_refresh_complete_input_new (); qmi_message_uim_refresh_complete_input_set_session ( refresh_complete_input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, placeholder_aid, /* ignored */ NULL); qmi_message_uim_refresh_complete_input_set_info ( refresh_complete_input, success, NULL); qmi_client_uim_refresh_complete ( ctx->client, refresh_complete_input, 10, ctx->cancellable, (GAsyncReadyCallback) refresh_complete_ready, NULL); qmi_message_uim_refresh_complete_input_unref (refresh_complete_input); g_array_unref (placeholder_aid); } static void refresh_received (QmiClientUim *client, QmiIndicationUimRefreshOutput *output) { QmiUimRefreshStage stage; QmiUimRefreshMode mode; GArray *files = NULL; GError *error = NULL; guint i, j; g_print ("[%s] Received refresh indication:\n", qmi_device_get_path_display (ctx->device)); if (!qmi_indication_uim_refresh_output_get_event ( output, &stage, &mode, NULL, NULL, &files, &error)) { g_printerr ("error: could not parse refresh ind: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_print (" Refresh stage: %s\n", qmi_uim_refresh_stage_get_string (stage)); g_print (" Refresh mode: %s\n", qmi_uim_refresh_mode_get_string (mode)); g_print (" Files:\n"); if (files && files->len > 0) for (i = 0; i < files->len; i++) { QmiIndicationUimRefreshOutputEventFilesElement *file; GArray *path; file = &g_array_index (files, QmiIndicationUimRefreshOutputEventFilesElement, i); g_print (" 0x%x; path:", file->file_id); path = file->path; if (path && path->len >= 2) for (j = 0; j < path->len / 2; j++) { guint16 path_component; path_component = g_array_index (path, guint8, j * 2) | ((guint16)g_array_index (path, guint8, j * 2 + 1) << 8); g_print (" 0x%x", path_component); } else g_print (" "); g_print ("\n"); } else g_print (" \n"); /* Send refresh complete message only in start stage and only if the * mode is something other than reset. */ if (stage == QMI_UIM_REFRESH_STAGE_START && mode != QMI_UIM_REFRESH_MODE_RESET) refresh_complete (client, TRUE); } static void refresh_cancelled (GCancellable *cancellable) { operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER * HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER_ALL */ #if defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER static void register_refresh_events_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimRefreshRegisterOutput *output; GError *error = NULL; output = qmi_client_uim_refresh_register_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_refresh_register_output_get_result (output, &error)) { g_printerr ("error: could not register refresh file events: %s\n", error->message); qmi_message_uim_refresh_register_output_unref (output); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Registered refresh file events..."); ctx->refresh_indication_id = g_signal_connect (ctx->client, "refresh", G_CALLBACK (refresh_received), NULL); /* User can use Ctrl+C to cancel the monitoring at any time */ g_cancellable_connect (ctx->cancellable, G_CALLBACK (refresh_cancelled), NULL, NULL); qmi_message_uim_refresh_register_output_unref (output); } static void register_refresh_events (gchar **file_path_array) { QmiMessageUimRefreshRegisterInput *refresh_input; GArray *placeholder_aid; GArray *file_list; QmiMessageUimRefreshRegisterInputInfoFilesElement file_element; guint i; file_list = g_array_new (FALSE, FALSE, sizeof (QmiMessageUimRefreshRegisterInputInfoFilesElement)); while (*file_path_array) { memset (&file_element, 0, sizeof (file_element)); if (!get_sim_file_id_and_path (*file_path_array, &file_element.file_id, &file_element.path)) goto out; g_array_append_val (file_list, file_element); file_path_array++; } placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); refresh_input = qmi_message_uim_refresh_register_input_new (); qmi_message_uim_refresh_register_input_set_session ( refresh_input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, placeholder_aid, /* ignored */ NULL); qmi_message_uim_refresh_register_input_set_info ( refresh_input, TRUE, FALSE, file_list, NULL); qmi_client_uim_refresh_register ( ctx->client, refresh_input, 10, ctx->cancellable, (GAsyncReadyCallback) register_refresh_events_ready, NULL); qmi_message_uim_refresh_register_input_unref (refresh_input); g_array_unref (placeholder_aid); out: for (i = 0; i < file_list->len; i++) { QmiMessageUimRefreshRegisterInputInfoFilesElement *file; file = &g_array_index (file_list, QmiMessageUimRefreshRegisterInputInfoFilesElement, i); g_array_unref (file->path); } g_array_unref (file_list); } #endif /* HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER */ #if defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER_ALL static void register_refresh_all_events_ready (QmiClientUim *client, GAsyncResult *res) { QmiMessageUimRefreshRegisterAllOutput *output; GError *error = NULL; output = qmi_client_uim_refresh_register_all_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_uim_refresh_register_all_output_get_result (output, &error)) { g_printerr ("error: could not register refresh file events: %s\n", error->message); qmi_message_uim_refresh_register_all_output_unref (output); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Registered refresh all file events..."); ctx->refresh_indication_id = g_signal_connect (ctx->client, "refresh", G_CALLBACK (refresh_received), NULL); /* User can use Ctrl+C to cancel the monitoring at any time */ g_cancellable_connect (ctx->cancellable, G_CALLBACK (refresh_cancelled), NULL, NULL); qmi_message_uim_refresh_register_all_output_unref (output); } static void register_refresh_all_events (void) { QmiMessageUimRefreshRegisterAllInput *refresh_all_input; GArray *placeholder_aid; refresh_all_input = qmi_message_uim_refresh_register_all_input_new (); placeholder_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); qmi_message_uim_refresh_register_all_input_set_session ( refresh_all_input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, placeholder_aid, /* ignored */ NULL); qmi_message_uim_refresh_register_all_input_set_info ( refresh_all_input, TRUE, NULL); qmi_client_uim_refresh_register_all ( ctx->client, refresh_all_input, 10, ctx->cancellable, (GAsyncReadyCallback) register_refresh_all_events_ready, NULL); qmi_message_uim_refresh_register_all_input_unref (refresh_all_input); g_array_unref (placeholder_aid); } #endif /* HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER_ALL */ #if defined HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION static QmiMessageUimGetConfigurationInput * get_configuration_input_create (void) { QmiMessageUimGetConfigurationInput *input; input = qmi_message_uim_get_configuration_input_new (); qmi_message_uim_get_configuration_input_set_configuration_mask ( input, QMI_UIM_CONFIGURATION_PERSONALIZATION_STATUS, NULL); return input; } static void get_configuration_ready (QmiClientUim *client, GAsyncResult *res) { g_autoptr(QmiMessageUimGetConfigurationOutput) output = NULL; g_autoptr(GError) error = NULL; GArray *elements = NULL; GArray *other_slots = NULL; output = qmi_client_uim_get_configuration_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_uim_get_configuration_output_get_result (output, &error)) { g_printerr ("error: get configuration failed: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Configuration successfully retrieved\n"); /* Other slots TLV contains info for slots > 1 */ qmi_message_uim_get_configuration_output_get_personalization_status_other (output, &other_slots, NULL); if (qmi_message_uim_get_configuration_output_get_personalization_status (output, &elements, NULL)) { if (elements->len == 0) g_print ("Personalization features%s: all disabled\n", other_slots ? " in slot 1" : ""); else { QmiMessageUimGetConfigurationOutputPersonalizationStatusElement *element; guint i; g_print ("Personalization features%s:\n", other_slots ? " in slot 1" : ""); for (i = 0; i < elements->len; i++) { element = &g_array_index (elements, QmiMessageUimGetConfigurationOutputPersonalizationStatusElement, i); g_print ("\tPersonalization: %s\n" "\t\tVerify left: %u\n" "\t\tUnblock left: %u\n", qmi_uim_card_application_personalization_feature_get_string (element->feature), element->verify_left, element->unblock_left); } } } if (other_slots) { if (other_slots->len == 0) g_print ("Personalization features in other slots: all disabled\n"); else { guint i_slot; for (i_slot = 0; i_slot < other_slots->len; i_slot++) { QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElement *slot_element; guint i; slot_element = &g_array_index (other_slots, QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElement, i_slot); if (!slot_element->slot) continue; g_print ("Personalization features in slot %u:\n", i_slot + 2); for (i = 0; i < slot_element->slot->len; i++) { QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElementSlotElement *element; element = &g_array_index (slot_element->slot, QmiMessageUimGetConfigurationOutputPersonalizationStatusOtherElementSlotElement, i); g_print ("\tPersonalization: %s\n" "\t\tVerify left: %u\n" "\t\tUnblock left: %u\n", qmi_uim_card_application_personalization_feature_get_string (element->feature), element->verify_left, element->unblock_left); } } } } operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION */ #if defined HAVE_QMI_MESSAGE_UIM_DEPERSONALIZATION static QmiMessageUimDepersonalizationInput * depersonalization_input_create (const gchar *str) { g_auto(GStrv) split = NULL; QmiMessageUimDepersonalizationInput *input = NULL; QmiUimCardApplicationPersonalizationFeature feature; QmiUimDepersonalizationOperation operation; const gchar *control_key; guint slot = 0; /* Prepare inputs. * Format of the string is: * "[(feature),(operation),(control key)[,(slot number)]]" */ split = g_strsplit (str, ",", -1); if (!split[0] || !qmicli_read_uim_card_application_personalization_feature_from_string (split[0], &feature)) { g_printerr ("error: invalid personalization feature\n"); return NULL; } if (!split[1] || !qmicli_read_uim_depersonalization_operation_from_string (split[1], &operation)) { g_printerr ("error: invalid depersonalization operation\n"); return NULL; } if (!split[2]) { g_printerr ("error: missing control key\n"); return NULL; } control_key = split[2]; if (g_strv_length (split) > 3) { if (!qmicli_read_uint_from_string (split[3], &slot) || (slot < 1) || (slot > 5)) { g_printerr ("error: invalid slot number\n"); return NULL; } } input = qmi_message_uim_depersonalization_input_new (); qmi_message_uim_depersonalization_input_set_info (input, feature, operation, control_key, NULL); /* skip setting slot if not given by the user */ if (slot > 0) qmi_message_uim_depersonalization_input_set_slot (input, slot, NULL); return input; } static void depersonalization_ready (QmiClientUim *client, GAsyncResult *res) { g_autoptr(QmiMessageUimDepersonalizationOutput) output = NULL; g_autoptr(GError) error = NULL; guint8 unblock_left; guint8 verify_left; output = qmi_client_uim_depersonalization_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (qmi_message_uim_depersonalization_output_get_result (output, &error)) { g_print ("Modem was unlocked successfully\n"); operation_shutdown (TRUE); return; } g_printerr ("error: depersonalization failed: %s\n", error->message); if (qmi_message_uim_depersonalization_output_get_retries_remaining ( output, &verify_left, &unblock_left, NULL)) { g_printerr ("Retries left:\n" "\tVerify: %u\n" "\tUnblock: %u\n", verify_left, unblock_left); } operation_shutdown (FALSE); } #endif /* HAVE_QMI_MESSAGE_UIM_DEPERSONALIZATION */ #if defined HAVE_QMI_MESSAGE_UIM_REMOTE_UNLOCK static QmiMessageUimRemoteUnlockInput * remote_unlock_input_create (const gchar *simlock_data_str) { QmiMessageUimRemoteUnlockInput *input; GArray *simlock_data = NULL; if (!qmicli_read_raw_data_from_string (simlock_data_str, &simlock_data)) return NULL; input = qmi_message_uim_remote_unlock_input_new (); if (simlock_data->len <= 1024) { qmi_message_uim_remote_unlock_input_set_simlock_data (input, simlock_data, NULL); } else { qmi_message_uim_remote_unlock_input_set_simlock_extended_data (input, simlock_data, NULL); } g_array_unref (simlock_data); return input; } static void remote_unlock_ready (QmiClientUim *client, GAsyncResult *res) { g_autoptr(QmiMessageUimRemoteUnlockOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_uim_remote_unlock_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_uim_remote_unlock_output_get_result (output, &error)) { g_printerr ("error: remote unlock operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Remote unlock operation successfully completed\n"); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_UIM_REMOTE_UNLOCK */ void qmicli_uim_run (QmiDevice *device, QmiClientUim *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new0 (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_UIM_SET_PIN_PROTECTION if (set_pin_protection_str) { QmiMessageUimSetPinProtectionInput *input; g_debug ("Asynchronously setting PIN protection..."); input = set_pin_protection_input_create (set_pin_protection_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_set_pin_protection (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_pin_protection_ready, NULL); qmi_message_uim_set_pin_protection_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_VERIFY_PIN if (verify_pin_str) { QmiMessageUimVerifyPinInput *input; g_debug ("Asynchronously verifying PIN..."); input = verify_pin_input_create (verify_pin_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_verify_pin (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)verify_pin_ready, NULL); qmi_message_uim_verify_pin_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_UNBLOCK_PIN if (unblock_pin_str) { QmiMessageUimUnblockPinInput *input; g_debug ("Asynchronously unblocking PIN..."); input = unblock_pin_input_create (unblock_pin_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_unblock_pin (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)unblock_pin_ready, NULL); qmi_message_uim_unblock_pin_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PIN if (change_pin_str) { QmiMessageUimChangePinInput *input; g_debug ("Asynchronously changing PIN..."); input = change_pin_input_create (change_pin_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_change_pin (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)change_pin_ready, NULL); qmi_message_uim_change_pin_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_READ_TRANSPARENT if (read_transparent_str) { QmiMessageUimReadTransparentInput *input; input = read_transparent_build_input (read_transparent_str); if (!input) { operation_shutdown (FALSE); return; } g_debug ("Asynchronously reading transparent file at '%s'...", read_transparent_str); qmi_client_uim_read_transparent (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)read_transparent_ready, NULL); qmi_message_uim_read_transparent_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_READ_RECORD if (read_record_str) { QmiMessageUimReadRecordInput *input; input = read_record_input_create (read_record_str); if (!input) { operation_shutdown (FALSE); return; } g_debug ("Asynchronously reading record file at '%s'...", read_record_str); qmi_client_uim_read_record (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)read_record_ready, NULL); qmi_message_uim_read_record_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_FILE_ATTRIBUTES if (get_file_attributes_str) { QmiMessageUimGetFileAttributesInput *input; input = get_file_attributes_build_input (get_file_attributes_str); if (!input) { operation_shutdown (FALSE); return; } g_debug ("Asynchronously reading attributes of file '%s'...", get_file_attributes_str); qmi_client_uim_get_file_attributes (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_file_attributes_ready, NULL); qmi_message_uim_get_file_attributes_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_CARD_STATUS if (get_card_status_flag) { g_debug ("Asynchronously getting card status..."); qmi_client_uim_get_card_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_card_status_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_SUPPORTED_MESSAGES if (get_supported_messages_flag) { g_debug ("Asynchronously getting supported UIM messages..."); qmi_client_uim_get_supported_messages (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_supported_messages_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_POWER_ON_SIM if (sim_power_on_str) { QmiMessageUimPowerOnSimInput *input; g_debug ("Asynchronously power on SIM card"); input = power_on_sim_input_create (sim_power_on_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_power_on_sim (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)power_on_sim_ready, NULL); qmi_message_uim_power_on_sim_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_POWER_OFF_SIM if (sim_power_off_str) { QmiMessageUimPowerOffSimInput *input; g_debug ("Asynchronously power off SIM card"); input = power_off_sim_input_create (sim_power_off_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_power_off_sim (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)power_off_sim_ready, NULL); qmi_message_uim_power_off_sim_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_CHANGE_PROVISIONING_SESSION if (change_provisioning_session_str) { QmiMessageUimChangeProvisioningSessionInput *input; g_debug ("Asynchronously changing provisioning session"); input = change_provisioning_session_input_create (change_provisioning_session_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_change_provisioning_session (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)change_provisioning_session_ready, NULL); qmi_message_uim_change_provisioning_session_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS /* Request to get slot status? */ if (get_slot_status_flag) { g_debug ("Asynchronously getting slot status..."); qmi_client_uim_get_slot_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_slot_status_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_SWITCH_SLOT && defined HAVE_QMI_MESSAGE_UIM_GET_SLOT_STATUS /* Request to change active slot? */ if (switch_slot_str) { guint physical_slot; if (!qmicli_read_uint_from_string (switch_slot_str, &physical_slot) || (physical_slot < 1) || (physical_slot > G_MAXUINT8)) { g_printerr ("error: invalid slot number\n"); return; } g_debug ("Asynchronously switching active slot"); qmi_client_uim_get_slot_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_active_logical_slot_ready, GUINT_TO_POINTER (physical_slot)); return; } #endif #if defined HAVE_QMI_INDICATION_UIM_SLOT_STATUS /* Watch for slot status changes? */ if (monitor_slot_status_flag) { g_debug ("Listening for slot status changes..."); register_physical_slot_status_events (); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER if (monitor_refresh_file_array) { g_debug ("Listening for refresh events..."); register_refresh_events (monitor_refresh_file_array); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_REFRESH_REGISTER_ALL if (monitor_refresh_all_flag) { g_debug ("Listening for all refresh events..."); register_refresh_all_events (); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_RESET /* Request to reset UIM service? */ if (reset_flag) { g_debug ("Asynchronously resetting UIM service..."); qmi_client_uim_reset (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)reset_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_GET_CONFIGURATION /* Request to get personalization status? */ if (get_configuration_flag) { g_autoptr(QmiMessageUimGetConfigurationInput) input = NULL; g_debug ("Asynchronously getting UIM configuration..."); input = get_configuration_input_create (); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_get_configuration (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_configuration_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_DEPERSONALIZATION /* Request to depersonalize the modem? */ if (depersonalization_str) { g_autoptr(QmiMessageUimDepersonalizationInput) input = NULL; g_debug ("Asynchronously removing personalization..."); input = depersonalization_input_create (depersonalization_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_uim_depersonalization (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)depersonalization_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_UIM_REMOTE_UNLOCK /* Request to perform remote unlock operations? */ if (remote_unlock_str) { g_autoptr(QmiMessageUimRemoteUnlockInput) input = NULL; g_debug ("Asynchronously updating SimLock data..."); input = remote_unlock_input_create (remote_unlock_str); if (!input) { g_printerr ("error: couldn't parse the input string as a bytearray\n"); operation_shutdown (FALSE); return; } qmi_client_uim_remote_unlock (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)remote_unlock_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_UIM */ libqmi-1.35.2-dev/src/qmicli/qmicli-voice.c000066400000000000000000000317721455567757300204670ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2014-2017 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_VOICE #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") /* Context */ typedef struct { QmiDevice *device; QmiClientVoice *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_config_flag; static gboolean get_supported_messages_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_VOICE_GET_CONFIG { "voice-get-config", 0, 0, G_OPTION_ARG_NONE, &get_config_flag, "Get Voice service configuration", NULL }, #endif #if defined HAVE_QMI_MESSAGE_VOICE_GET_SUPPORTED_MESSAGES { "voice-get-supported-messages", 0, 0, G_OPTION_ARG_NONE, &get_supported_messages_flag, "Get supported messages", NULL }, #endif { "voice-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a VOICE client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_voice_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("voice", "VOICE options:", "Show Voice Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_voice_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_config_flag + get_supported_messages_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many VOICE actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->client) g_object_unref (context->client); g_object_unref (context->cancellable); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_VOICE_GET_CONFIG static void get_config_ready (QmiClientVoice *client, GAsyncResult *res) { QmiMessageVoiceGetConfigOutput *output; GError *error = NULL; QmiVoiceDomain current_voice_domain_preference; QmiVoicePrivacy current_voice_privacy_preference; gboolean current_amr_status_gsm; QmiVoiceWcdmaAmrStatus current_amr_status_wcdma; guint8 current_preferred_voice_so_nam_id; gboolean current_preferred_voice_so_evrc_capability; QmiVoiceServiceOption current_preferred_voice_so_home_page_voice_service_option; QmiVoiceServiceOption current_preferred_voice_so_home_origination_voice_service_option; QmiVoiceServiceOption current_preferred_voice_so_roaming_origination_voice_service_option; QmiVoiceTtyMode current_tty_mode; guint8 roam_timer_count_nam_id; guint32 roam_timer_count_roam_timer; guint8 air_timer_count_nam_id; guint32 air_timer_count_air_timer; gboolean auto_answer_status; output = qmi_client_voice_get_config_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_voice_get_config_output_get_result (output, &error)) { g_printerr ("error: couldn't get Voice configuration: %s\n", error->message); g_error_free (error); qmi_message_voice_get_config_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully retrieved Voice configuration:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_voice_get_config_output_get_auto_answer_status ( output, &auto_answer_status, NULL)) g_print ("Auto Answer Status: '%s'", auto_answer_status ? "enabled" : "disabled"); if (qmi_message_voice_get_config_output_get_air_timer_count ( output, &air_timer_count_nam_id, &air_timer_count_air_timer, NULL)) g_print ("Air Timer Count:\n" "\tNAM ID: '%u'" "\tTimer: '%u'", air_timer_count_nam_id, air_timer_count_air_timer); if (qmi_message_voice_get_config_output_get_roam_timer_count ( output, &roam_timer_count_nam_id, &roam_timer_count_roam_timer, NULL)) g_print ("Roam Timer Count:\n" "\tNAM ID: '%u'" "\tTimer: '%u'", roam_timer_count_nam_id, roam_timer_count_roam_timer); if (qmi_message_voice_get_config_output_get_current_tty_mode ( output, ¤t_tty_mode, NULL)) g_print ("Current TTY mode: '%s'", qmi_voice_tty_mode_get_string (current_tty_mode)); if (qmi_message_voice_get_config_output_get_current_preferred_voice_so ( output, ¤t_preferred_voice_so_nam_id, ¤t_preferred_voice_so_evrc_capability, ¤t_preferred_voice_so_home_page_voice_service_option, ¤t_preferred_voice_so_home_origination_voice_service_option, ¤t_preferred_voice_so_roaming_origination_voice_service_option, NULL)) { g_print ("Current Preferred Voice SO:\n" "\tNAM ID: '%u'\n" "\tEVRC capability: '%s'\n" "\tHome Page Voice SO: '%s'\n" "\tHome Origination Voice SO: '%s'\n" "\tRoaming Origination Voice SO: '%s'\n", current_preferred_voice_so_nam_id, current_preferred_voice_so_evrc_capability ? "enabled" : "disabled", qmi_voice_service_option_get_string (current_preferred_voice_so_home_page_voice_service_option), qmi_voice_service_option_get_string (current_preferred_voice_so_home_origination_voice_service_option), qmi_voice_service_option_get_string (current_preferred_voice_so_roaming_origination_voice_service_option)); } if (qmi_message_voice_get_config_output_get_current_amr_status ( output, ¤t_amr_status_gsm, ¤t_amr_status_wcdma, NULL)) { gchar *current_amr_status_wcdma_str; current_amr_status_wcdma_str = qmi_voice_wcdma_amr_status_build_string_from_mask (current_amr_status_wcdma); g_print ("AMR Status:\n" "\tGSM: '%s'\n" "\tWCDMA: '%s' (0x%04X)\n", current_amr_status_gsm ? "enabled" : "disabled", VALIDATE_MASK_NONE (current_amr_status_wcdma_str), current_amr_status_wcdma); g_free (current_amr_status_wcdma_str); } if (qmi_message_voice_get_config_output_get_current_voice_privacy_preference ( output, ¤t_voice_privacy_preference, NULL)) g_print ("Current Voice Privacy Preference: '%s'\n", qmi_voice_privacy_get_string (current_voice_privacy_preference)); if (qmi_message_voice_get_config_output_get_current_voice_domain_preference ( output, ¤t_voice_domain_preference, NULL)) g_print ("Current Voice Domain Preference: '%s'\n", qmi_voice_domain_get_string (current_voice_domain_preference)); qmi_message_voice_get_config_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_VOICE_GET_CONFIG */ #if defined HAVE_QMI_MESSAGE_VOICE_GET_SUPPORTED_MESSAGES static void get_supported_messages_ready (QmiClientVoice *client, GAsyncResult *res) { QmiMessageVoiceGetSupportedMessagesOutput *output; GError *error = NULL; GArray *bytearray = NULL; gchar *str; output = qmi_client_voice_get_supported_messages_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_voice_get_supported_messages_output_get_result (output, &error)) { g_printerr ("error: couldn't get supported VOICE messages: %s\n", error->message); g_error_free (error); qmi_message_voice_get_supported_messages_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got supported VOICE messages:\n", qmi_device_get_path_display (ctx->device)); qmi_message_voice_get_supported_messages_output_get_list (output, &bytearray, NULL); str = qmicli_get_supported_messages_list (bytearray ? (const guint8 *)bytearray->data : NULL, bytearray ? bytearray->len : 0); g_print ("%s", str); g_free (str); qmi_message_voice_get_supported_messages_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_VOICE_GET_SUPPORTED_MESSAGES */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_voice_run (QmiDevice *device, QmiClientVoice *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_VOICE_GET_CONFIG if (get_config_flag) { QmiMessageVoiceGetConfigInput *input; input = qmi_message_voice_get_config_input_new (); qmi_message_voice_get_config_input_set_auto_answer (input, TRUE, NULL); qmi_message_voice_get_config_input_set_air_timer (input, TRUE, NULL); qmi_message_voice_get_config_input_set_roam_timer (input, TRUE, NULL); qmi_message_voice_get_config_input_set_tty_mode (input, TRUE, NULL); qmi_message_voice_get_config_input_set_preferred_voice_service_option (input, TRUE, NULL); qmi_message_voice_get_config_input_set_amr_status (input, TRUE, NULL); qmi_message_voice_get_config_input_set_preferred_voice_privacy (input, TRUE, NULL); if (qmi_client_check_version (QMI_CLIENT (ctx->client), 2, 3)) qmi_message_voice_get_config_input_set_nam_index (input, TRUE, NULL); if (qmi_client_check_version (QMI_CLIENT (ctx->client), 2, 9)) qmi_message_voice_get_config_input_set_voice_domain_preference (input, TRUE, NULL); g_debug ("Asynchronously getting voice configuration..."); qmi_client_voice_get_config (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_config_ready, NULL); qmi_message_voice_get_config_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_VOICE_GET_SUPPORTED_MESSAGES if (get_supported_messages_flag) { g_debug ("Asynchronously getting supported voice messages..."); qmi_client_voice_get_supported_messages (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_supported_messages_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_VOICE */ libqmi-1.35.2-dev/src/qmicli/qmicli-wda.c000066400000000000000000000677711455567757300201450ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2014-2017 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_WDA #define QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAMS_UNDEFINED 0xFFFFFFFF #define QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAM_SIZE_UNDEFINED 0xFFFFFFFF #define QMI_WDA_ENDPOINT_INTERFACE_NUMBER_UNDEFINED -1 /* Context */ typedef struct { QmiDevice *device; QmiClientWda *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gchar *set_data_format_str; static gchar *get_data_format_str; static gboolean get_data_format_flag; static gboolean get_supported_messages_flag; static gboolean noop_flag; #if defined HAVE_QMI_MESSAGE_WDA_GET_DATA_FORMAT static gboolean parse_get_data_format (const gchar *option_name, const gchar *value, gpointer data, GError **error) { get_data_format_flag = TRUE; if (value && value[0]) get_data_format_str = g_strdup (value); return TRUE; } #endif static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_WDA_SET_DATA_FORMAT { "wda-set-data-format", 0, 0, G_OPTION_ARG_STRING, &set_data_format_str, "Set data format (allowed keys: link-layer-protocol (802-3|raw-ip), ul-protocol (disabled|tlp|qc-ncm|mbim|rndis|qmap|qmapv5), dl-protocol (disabled|tlp|qc-ncm|mbim|rndis|qmap|qmapv5), dl-datagram-max-size, dl-max-datagrams, ep-type (undefined|hsusb|pcie|embedded), ep-iface-number, ul-datagram-max-size, ul-max-datagrams)", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_WDA_GET_DATA_FORMAT { "wda-get-data-format", 0, G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, parse_get_data_format, "Get data format (allowed keys: ep-type (undefined|hsusb|pcie|embedded), ep-iface-number); also allows empty key list", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_WDA_GET_SUPPORTED_MESSAGES { "wda-get-supported-messages", 0, 0, G_OPTION_ARG_NONE, &get_supported_messages_flag, "Get supported messages", NULL }, #endif { "wda-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a WDA client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_wda_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("wda", "WDA options:", "Show Wireless Data Administrative options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_wda_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!set_data_format_str + get_data_format_flag + get_supported_messages_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many WDA actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->client) g_object_unref (context->client); g_object_unref (context->cancellable); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } #if defined HAVE_QMI_MESSAGE_WDA_GET_DATA_FORMAT typedef struct { QmiDataEndpointType endpoint_type; gint endpoint_iface_number; } GetDataFormatProperties; static gboolean get_data_format_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { GetDataFormatProperties *props = (GetDataFormatProperties *)user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' requires a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "ep-type") == 0) { if (!qmicli_read_data_endpoint_type_from_string (value, &(props->endpoint_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Endpoint Type '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "ep-iface-number") == 0) { props->endpoint_iface_number = atoi (value); return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized option '%s'", key); return FALSE; } static QmiMessageWdaGetDataFormatInput * get_data_format_input_create (const gchar *str) { g_autoptr(QmiMessageWdaGetDataFormatInput) input = NULL; g_autoptr(GError) error = NULL; GetDataFormatProperties props = { .endpoint_type = QMI_DATA_ENDPOINT_TYPE_UNDEFINED, .endpoint_iface_number = QMI_WDA_ENDPOINT_INTERFACE_NUMBER_UNDEFINED, }; input = qmi_message_wda_get_data_format_input_new (); if (!qmicli_parse_key_value_string (str, &error, get_data_format_properties_handle, &props)) { g_printerr ("error: could not parse input string '%s'\n", error->message); return NULL; } if ((props.endpoint_type == QMI_DATA_ENDPOINT_TYPE_UNDEFINED) ^ (props.endpoint_iface_number == QMI_WDA_ENDPOINT_INTERFACE_NUMBER_UNDEFINED)) { g_printerr ("error: endpoint type and interface number must be both set or both unset\n"); return NULL; } if ((props.endpoint_type != QMI_DATA_ENDPOINT_TYPE_UNDEFINED) && (props.endpoint_iface_number != QMI_WDA_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) && !qmi_message_wda_get_data_format_input_set_endpoint_info ( input, props.endpoint_type, props.endpoint_iface_number, &error)) { g_printerr ("error: could not set peripheral endpoint id: %s\n", error->message); return NULL; } return g_steal_pointer (&input); } static void get_data_format_ready (QmiClientWda *client, GAsyncResult *res) { QmiMessageWdaGetDataFormatOutput *output; GError *error = NULL; gboolean qos_format; QmiWdaLinkLayerProtocol link_layer_protocol; QmiWdaDataAggregationProtocol data_aggregation_protocol; guint32 ndp_signature; guint32 data_aggregation_max_size; guint32 data_aggregation_max_datagrams; output = qmi_client_wda_get_data_format_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wda_get_data_format_output_get_result (output, &error)) { g_printerr ("error: couldn't get data format: %s\n", error->message); g_error_free (error); qmi_message_wda_get_data_format_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got data format\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_wda_get_data_format_output_get_qos_format ( output, &qos_format, NULL)) g_print (" QoS flow header: %s\n", qos_format ? "yes" : "no"); if (qmi_message_wda_get_data_format_output_get_link_layer_protocol ( output, &link_layer_protocol, NULL)) g_print (" Link layer protocol: '%s'\n", qmi_wda_link_layer_protocol_get_string (link_layer_protocol)); if (qmi_message_wda_get_data_format_output_get_uplink_data_aggregation_protocol ( output, &data_aggregation_protocol, NULL)) g_print (" Uplink data aggregation protocol: '%s'\n", qmi_wda_data_aggregation_protocol_get_string (data_aggregation_protocol)); if (qmi_message_wda_get_data_format_output_get_downlink_data_aggregation_protocol ( output, &data_aggregation_protocol, NULL)) g_print ("Downlink data aggregation protocol: '%s'\n", qmi_wda_data_aggregation_protocol_get_string (data_aggregation_protocol)); if (qmi_message_wda_get_data_format_output_get_ndp_signature ( output, &ndp_signature, NULL)) g_print (" NDP signature: '%u'\n", ndp_signature); if (qmi_message_wda_get_data_format_output_get_downlink_data_aggregation_max_datagrams ( output, &data_aggregation_max_datagrams, NULL)) g_print ("Downlink data aggregation max datagrams: '%u'\n", data_aggregation_max_datagrams); if (qmi_message_wda_get_data_format_output_get_downlink_data_aggregation_max_size ( output, &data_aggregation_max_size, NULL)) g_print ("Downlink data aggregation max size: '%u'\n", data_aggregation_max_size); qmi_message_wda_get_data_format_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDA_GET_DATA_FORMAT */ #if defined HAVE_QMI_MESSAGE_WDA_SET_DATA_FORMAT static void set_data_format_ready (QmiClientWda *client, GAsyncResult *res) { QmiMessageWdaSetDataFormatOutput *output; GError *error = NULL; gboolean qos_format; QmiWdaLinkLayerProtocol link_layer_protocol; QmiWdaDataAggregationProtocol data_aggregation_protocol; guint32 ndp_signature; guint32 dl_data_aggregation_max_datagrams; guint32 dl_data_aggregation_max_size; guint32 ul_data_aggregation_max_datagrams; guint32 ul_data_aggregation_max_size; output = qmi_client_wda_set_data_format_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wda_set_data_format_output_get_result (output, &error)) { g_printerr ("error: couldn't set data format: %s\n", error->message); g_error_free (error); qmi_message_wda_set_data_format_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully set data format\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_wda_set_data_format_output_get_qos_format ( output, &qos_format, NULL)) g_print (" QoS flow header: %s\n", qos_format ? "yes" : "no"); if (qmi_message_wda_set_data_format_output_get_link_layer_protocol ( output, &link_layer_protocol, NULL)) g_print (" Link layer protocol: '%s'\n", qmi_wda_link_layer_protocol_get_string (link_layer_protocol)); if (qmi_message_wda_set_data_format_output_get_uplink_data_aggregation_protocol ( output, &data_aggregation_protocol, NULL)) g_print (" Uplink data aggregation protocol: '%s'\n", qmi_wda_data_aggregation_protocol_get_string (data_aggregation_protocol)); if (qmi_message_wda_set_data_format_output_get_downlink_data_aggregation_protocol ( output, &data_aggregation_protocol, NULL)) g_print (" Downlink data aggregation protocol: '%s'\n", qmi_wda_data_aggregation_protocol_get_string (data_aggregation_protocol)); if (qmi_message_wda_set_data_format_output_get_ndp_signature ( output, &ndp_signature, NULL)) g_print (" NDP signature: '%u'\n", ndp_signature); if (qmi_message_wda_set_data_format_output_get_downlink_data_aggregation_max_datagrams ( output, &dl_data_aggregation_max_datagrams, NULL)) g_print ("Downlink data aggregation max datagrams: '%u'\n", dl_data_aggregation_max_datagrams); if (qmi_message_wda_set_data_format_output_get_downlink_data_aggregation_max_size ( output, &dl_data_aggregation_max_size, NULL)) g_print (" Downlink data aggregation max size: '%u'\n", dl_data_aggregation_max_size); if (qmi_message_wda_set_data_format_output_get_uplink_data_aggregation_max_datagrams ( output, &ul_data_aggregation_max_datagrams, NULL)) g_print (" Uplink data aggregation max datagrams: '%u'\n", ul_data_aggregation_max_datagrams); if (qmi_message_wda_set_data_format_output_get_uplink_data_aggregation_max_size ( output, &ul_data_aggregation_max_size, NULL)) g_print (" Uplink data aggregation max size: '%u'\n", ul_data_aggregation_max_size); qmi_message_wda_set_data_format_output_unref (output); operation_shutdown (TRUE); } typedef struct { QmiWdaLinkLayerProtocol link_layer_protocol; QmiWdaDataAggregationProtocol ul_protocol; QmiWdaDataAggregationProtocol dl_protocol; guint32 dl_datagram_max_size; guint32 dl_max_datagrams; QmiDataEndpointType endpoint_type; gint endpoint_iface_number; guint32 ul_datagram_max_size; guint32 ul_max_datagrams; } SetDataFormatProperties; static gboolean set_data_format_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { SetDataFormatProperties *props = (SetDataFormatProperties *)user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' requires a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "link-layer-protocol") == 0) { if (!qmicli_read_wda_link_layer_protocol_from_string (value, &(props->link_layer_protocol))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Link Layer Protocol '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "ul-protocol") == 0) { if (!qmicli_read_wda_data_aggregation_protocol_from_string (value, &(props->ul_protocol))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Data Aggregation Protocol '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "dl-protocol") == 0) { if (!qmicli_read_wda_data_aggregation_protocol_from_string (value, &(props->dl_protocol))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Data Aggregation Protocol '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "dl-datagram-max-size") == 0) { props->dl_datagram_max_size = atoi(value); return TRUE; } if (g_ascii_strcasecmp (key, "dl-max-datagrams") == 0) { props->dl_max_datagrams = atoi(value); return TRUE; } if (g_ascii_strcasecmp (key, "ep-type") == 0) { if (!qmicli_read_data_endpoint_type_from_string (value, &(props->endpoint_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized Endpoint Type '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "ep-iface-number") == 0) { props->endpoint_iface_number = atoi(value); return TRUE; } if (g_ascii_strcasecmp (key, "ul-datagram-max-size") == 0) { props->ul_datagram_max_size = atoi(value); return TRUE; } if (g_ascii_strcasecmp (key, "ul-max-datagrams") == 0) { props->ul_max_datagrams = atoi(value); return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "Unrecognized option '%s'", key); return FALSE; } static QmiMessageWdaSetDataFormatInput * set_data_format_input_create (const gchar *str) { QmiMessageWdaSetDataFormatInput *input = NULL; GError *error = NULL; SetDataFormatProperties props = { .link_layer_protocol = QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN, .ul_protocol = QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED, .dl_protocol = QMI_WDA_DATA_AGGREGATION_PROTOCOL_DISABLED, .dl_datagram_max_size = QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAM_SIZE_UNDEFINED, .dl_max_datagrams = QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAMS_UNDEFINED, .endpoint_type = QMI_DATA_ENDPOINT_TYPE_UNDEFINED, .endpoint_iface_number = QMI_WDA_ENDPOINT_INTERFACE_NUMBER_UNDEFINED, .ul_datagram_max_size = QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAM_SIZE_UNDEFINED, .ul_max_datagrams = QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAMS_UNDEFINED, }; input = qmi_message_wda_set_data_format_input_new (); /* New key=value format */ if (strchr (str, '=')) { if (!qmicli_parse_key_value_string (str, &error, set_data_format_properties_handle, &props)) { g_printerr ("error: could not parse input string '%s'\n", error->message); g_error_free (error); goto error_out; } if (!qmi_message_wda_set_data_format_input_set_uplink_data_aggregation_protocol ( input, props.ul_protocol, &error)) { g_printerr ("error: could not set Upload data aggregation protocol '%d': %s\n", props.ul_protocol, error->message); g_error_free (error); goto error_out; } if (!qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_protocol ( input, props.dl_protocol, &error)) { g_printerr ("error: could not set Download data aggregation protocol '%d': %s\n", props.dl_protocol, error->message); g_error_free (error); goto error_out; } if (props.dl_datagram_max_size != QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAM_SIZE_UNDEFINED && !qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_max_size ( input, props.dl_datagram_max_size, &error)) { g_printerr ("error: could not set Download data aggregation max size %d: %s\n", props.dl_datagram_max_size, error->message); g_error_free (error); goto error_out; } if (props.dl_max_datagrams != QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAMS_UNDEFINED && !qmi_message_wda_set_data_format_input_set_downlink_data_aggregation_max_datagrams ( input, props.dl_max_datagrams, &error)) { g_printerr ("error: could not set Download data aggregation max datagrams %d: %s\n", props.dl_max_datagrams, error->message); g_error_free (error); goto error_out; } if ((props.endpoint_type == QMI_DATA_ENDPOINT_TYPE_UNDEFINED) ^ (props.endpoint_iface_number == QMI_WDA_ENDPOINT_INTERFACE_NUMBER_UNDEFINED)) { g_printerr ("error: endpoint type and interface number must be both set or both unset\n"); goto error_out; } if ((props.endpoint_type != QMI_DATA_ENDPOINT_TYPE_UNDEFINED) && (props.endpoint_iface_number != QMI_WDA_ENDPOINT_INTERFACE_NUMBER_UNDEFINED) && !qmi_message_wda_set_data_format_input_set_endpoint_info ( input, props.endpoint_type, props.endpoint_iface_number, &error)) { g_printerr ("error: could not set peripheral endpoint id: %s\n", error->message); g_error_free (error); goto error_out; } if (props.ul_datagram_max_size != QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAM_SIZE_UNDEFINED && !qmi_message_wda_set_data_format_input_set_uplink_data_aggregation_max_size ( input, props.ul_datagram_max_size, &error)) { g_printerr ("error: could not set Upload data aggregation max size %d: %s\n", props.ul_datagram_max_size, error->message); g_error_free (error); goto error_out; } if (props.ul_max_datagrams != QMI_WDA_AGGREGATION_PROTOCOL_MAX_DATAGRAMS_UNDEFINED && !qmi_message_wda_set_data_format_input_set_uplink_data_aggregation_max_datagrams ( input, props.ul_max_datagrams, &error)) { g_printerr ("error: could not set Upload data aggregation max datagrams %d: %s\n", props.ul_max_datagrams, error->message); g_error_free (error); goto error_out; } } /* Old non key=value format, like this: * "[(raw-ip|802-3)]" */ else { if (!qmicli_read_wda_link_layer_protocol_from_string (str, &(props.link_layer_protocol))) { g_printerr ("Unrecognized Link Layer Protocol '%s'\n", str); goto error_out; } } if (props.link_layer_protocol == QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN) { g_printerr ("error: Link Layer Protocol value is missing\n"); goto error_out; } if (!qmi_message_wda_set_data_format_input_set_link_layer_protocol ( input, props.link_layer_protocol, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); g_error_free (error); goto error_out; } return input; error_out: qmi_message_wda_set_data_format_input_unref (input); return NULL; } #endif /* HAVE_QMI_MESSAGE_WDA_SET_DATA_FORMAT */ #if defined HAVE_QMI_MESSAGE_WDA_GET_SUPPORTED_MESSAGES static void get_supported_messages_ready (QmiClientWda *client, GAsyncResult *res) { QmiMessageWdaGetSupportedMessagesOutput *output; GError *error = NULL; GArray *bytearray = NULL; gchar *str; output = qmi_client_wda_get_supported_messages_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wda_get_supported_messages_output_get_result (output, &error)) { g_printerr ("error: couldn't get supported WDA messages: %s\n", error->message); g_error_free (error); qmi_message_wda_get_supported_messages_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got supported WDA messages:\n", qmi_device_get_path_display (ctx->device)); qmi_message_wda_get_supported_messages_output_get_list (output, &bytearray, NULL); str = qmicli_get_supported_messages_list (bytearray ? (const guint8 *)bytearray->data : NULL, bytearray ? bytearray->len : 0); g_print ("%s", str); g_free (str); qmi_message_wda_get_supported_messages_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDA_GET_SUPPORTED_MESSAGES */ void qmicli_wda_run (QmiDevice *device, QmiClientWda *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_WDA_SET_DATA_FORMAT if (set_data_format_str) { QmiMessageWdaSetDataFormatInput *input; input = set_data_format_input_create (set_data_format_str); if (!input) { operation_shutdown (FALSE); return; } g_debug ("Asynchronously setting data format..."); qmi_client_wda_set_data_format (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_data_format_ready, NULL); qmi_message_wda_set_data_format_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDA_GET_DATA_FORMAT if (get_data_format_flag) { g_autoptr(QmiMessageWdaGetDataFormatInput) input = NULL; if (get_data_format_str) { input = get_data_format_input_create (get_data_format_str); if (!input) { operation_shutdown (FALSE); return; } } g_debug ("Asynchronously getting data format..."); qmi_client_wda_get_data_format (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_data_format_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDA_GET_SUPPORTED_MESSAGES if (get_supported_messages_flag) { g_debug ("Asynchronously getting supported WDA messages..."); qmi_client_wda_get_supported_messages (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_supported_messages_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_WDA */ libqmi-1.35.2-dev/src/qmicli/qmicli-wds.c000066400000000000000000004175051455567757300201610ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2015 Velocloud Inc. * Copyright (C) 2012-2017 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_WDS #undef VALIDATE_MASK_NONE #define VALIDATE_MASK_NONE(str) (str ? str : "none") #define QMI_WDS_MUX_ID_UNDEFINED 0xFF #define QMI_WDS_ENDPOINT_INTERFACE_NUMBER_UNDEFINED -1 /* Context */ typedef struct { QmiDevice *device; QmiClientWds *client; GCancellable *cancellable; /* Helpers for the wds-start-network command */ gulong network_started_id; guint packet_status_timeout_id; guint32 packet_data_handle; } Context; static Context *ctx; /* Options */ static gchar *start_network_str; static gboolean follow_network_flag; static gchar *stop_network_str; static gboolean get_current_settings_flag; static gboolean get_packet_service_status_flag; static gboolean get_packet_statistics_flag; static gboolean get_data_bearer_technology_flag; static gboolean get_current_data_bearer_technology_flag; static gboolean go_dormant_flag; static gboolean go_active_flag; static gboolean get_dormancy_status_flag; static gchar *create_profile_str; static gchar *swi_create_profile_indexed_str; static gchar *modify_profile_str; static gchar *delete_profile_str; static gchar *get_profile_list_str; static gchar *get_default_profile_num_str; /* deprecated */ static gchar *get_default_profile_number_str; static gchar *set_default_profile_num_str; /* deprecated */ static gchar *set_default_profile_number_str; static gchar *get_default_settings_str; static gboolean get_autoconnect_settings_flag; static gchar *set_autoconnect_settings_str; static gboolean get_supported_messages_flag; static gboolean reset_flag; static gboolean noop_flag; static gchar *bind_data_port_str; static gchar *bind_mux_str; static gchar *set_ip_family_str; static gboolean get_channel_rates_flag; static gboolean get_lte_attach_parameters_flag; static gboolean get_max_lte_attach_pdn_number_flag; static gboolean get_lte_attach_pdn_list_flag; static gchar *set_lte_attach_pdn_list_str; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_WDS_START_NETWORK { "wds-start-network", 0, 0, G_OPTION_ARG_STRING, &start_network_str, "Start network (allowed keys: apn, 3gpp-profile, 3gpp2-profile, auth (PAP|CHAP|BOTH), username, password, autoconnect=yes, ip-type (4|6))", "[\"key=value,...\"]" }, # if defined HAVE_QMI_MESSAGE_WDS_STOP_NETWORK && defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS { "wds-follow-network", 0, 0, G_OPTION_ARG_NONE, &follow_network_flag, "Follow the network status until disconnected. Use with `--wds-start-network'", NULL }, # endif #endif #if defined HAVE_QMI_MESSAGE_WDS_STOP_NETWORK { "wds-stop-network", 0, 0, G_OPTION_ARG_STRING, &stop_network_str, "Stop network", "[Packet data handle] OR [disable-autoconnect]", }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_CURRENT_SETTINGS { "wds-get-current-settings", 0, 0, G_OPTION_ARG_NONE, &get_current_settings_flag, "Get current settings", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS { "wds-get-packet-service-status", 0, 0, G_OPTION_ARG_NONE, &get_packet_service_status_flag, "Get packet service status", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_STATISTICS { "wds-get-packet-statistics", 0, 0, G_OPTION_ARG_NONE, &get_packet_statistics_flag, "Get packet statistics", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DATA_BEARER_TECHNOLOGY { "wds-get-data-bearer-technology", 0, 0, G_OPTION_ARG_NONE, &get_data_bearer_technology_flag, "Get data bearer technology", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_CURRENT_DATA_BEARER_TECHNOLOGY { "wds-get-current-data-bearer-technology", 0, 0, G_OPTION_ARG_NONE, &get_current_data_bearer_technology_flag, "Get current data bearer technology", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GO_DORMANT { "wds-go-dormant", 0, 0, G_OPTION_ARG_NONE, &go_dormant_flag, "Make the active data connection go dormant", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GO_ACTIVE { "wds-go-active", 0, 0, G_OPTION_ARG_NONE, &go_active_flag, "Make the active data connection go active", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DORMANCY_STATUS { "wds-get-dormancy-status", 0, 0, G_OPTION_ARG_NONE, &get_dormancy_status_flag, "Get the dormancy status of the active data connection", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_CREATE_PROFILE { "wds-create-profile", 0, 0, G_OPTION_ARG_STRING, &create_profile_str, "Create new profile using first available profile index (optional keys: name, apn, pdp-type (IP|PPP|IPV6|IPV4V6), auth (NONE|PAP|CHAP|BOTH), username, password, context-num, no-roaming=yes, disabled=yes)", "[\"(3gpp|3gpp2)[,key=value,...]\"]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_SWI_CREATE_PROFILE_INDEXED { "wds-swi-create-profile-indexed", 0, 0, G_OPTION_ARG_STRING, &swi_create_profile_indexed_str, "Create new profile at specified profile index [Sierra Wireless specific] (optional keys: name, apn, pdp-type (IP|PPP|IPV6|IPV4V6), auth (NONE|PAP|CHAP|BOTH), username, password, context-num, no-roaming=yes, disabled=yes)", "[\"(3gpp|3gpp2),#[,key=value,...]\"]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_MODIFY_PROFILE { "wds-modify-profile", 0, 0, G_OPTION_ARG_STRING, &modify_profile_str, "Modify existing profile (optional keys: name, apn, pdp-type (IP|PPP|IPV6|IPV4V6), auth (NONE|PAP|CHAP|BOTH), username, password, context-num, no-roaming=yes, disabled=yes)", "[\"(3gpp|3gpp2),#,key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_DELETE_PROFILE { "wds-delete-profile", 0, 0, G_OPTION_ARG_STRING, &delete_profile_str, "Delete existing profile", "[(3gpp|3gpp2),#]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_LIST && defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_SETTINGS { "wds-get-profile-list", 0, 0, G_OPTION_ARG_STRING, &get_profile_list_str, "Get profile list", "[3gpp|3gpp2]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER { "wds-get-default-profile-number", 0, 0, G_OPTION_ARG_STRING, &get_default_profile_number_str, "Get default profile number", "[3gpp|3gpp2]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER { "wds-set-default-profile-number", 0, 0, G_OPTION_ARG_STRING, &set_default_profile_number_str, "Set default profile number", "[(3gpp|3gpp2),#]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_SETTINGS { "wds-get-default-settings", 0, 0, G_OPTION_ARG_STRING, &get_default_settings_str, "Get default settings", "[3gpp|3gpp2]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_AUTOCONNECT_SETTINGS { "wds-get-autoconnect-settings", 0, 0, G_OPTION_ARG_NONE, &get_autoconnect_settings_flag, "Get autoconnect settings", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_AUTOCONNECT_SETTINGS { "wds-set-autoconnect-settings", 0, 0, G_OPTION_ARG_STRING, &set_autoconnect_settings_str, "Set autoconnect settings (roaming settings optional)", "[(enabled|disabled|paused)[,(roaming-allowed|home-only)]]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_SUPPORTED_MESSAGES { "wds-get-supported-messages", 0, 0, G_OPTION_ARG_NONE, &get_supported_messages_flag, "Get supported messages", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_RESET { "wds-reset", 0, 0, G_OPTION_ARG_NONE, &reset_flag, "Reset the service state", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_BIND_DATA_PORT { "wds-bind-data-port", 0, 0, G_OPTION_ARG_STRING, &bind_data_port_str, "Bind data port to controller device to be used with `--client-no-release-cid'", "[a2-mux-rmnet0-7|#]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_BIND_MUX_DATA_PORT { "wds-bind-mux-data-port", 0, 0, G_OPTION_ARG_STRING, &bind_mux_str, "Bind qmux data port to controller device (allowed keys: mux-id, ep-type (undefined|hsusb|pcie|embedded|bam-dmux), ep-iface-number) to be used with `--client-no-release-cid'", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_IP_FAMILY { "wds-set-ip-family", 0, 0, G_OPTION_ARG_STRING, &set_ip_family_str, "Set IP family", "[4|6]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_CHANNEL_RATES { "wds-get-channel-rates", 0, 0, G_OPTION_ARG_NONE, &get_channel_rates_flag, "Get channel data rates", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PARAMETERS { "wds-get-lte-attach-parameters", 0, 0, G_OPTION_ARG_NONE, &get_lte_attach_parameters_flag, "Get LTE attach parameters", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_MAX_LTE_ATTACH_PDN_NUMBER { "wds-get-max-lte-attach-pdn-num", 0, 0, G_OPTION_ARG_NONE, &get_max_lte_attach_pdn_number_flag, "Get the maximum number of LTE attach PDN", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PDN_LIST { "wds-get-lte-attach-pdn-list", 0, 0, G_OPTION_ARG_NONE, &get_lte_attach_pdn_list_flag, "Get the list of LTE attach PDN", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_LTE_ATTACH_PDN_LIST { "wds-set-lte-attach-pdn-list", 0, 0, G_OPTION_ARG_STRING, &set_lte_attach_pdn_list_str, "Set the list of LTE attach PDN", "[#,#,...]" }, #endif { "wds-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a WDS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, /* deprecated entries (hidden in --help) */ #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER { "wds-get-default-profile-num", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &get_default_profile_num_str, "Get default profile number", "[3gpp|3gpp2]" }, #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER { "wds-set-default-profile-num", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_STRING, &set_default_profile_num_str, "Set default profile number", "[(3gpp|3gpp2),#]" }, #endif { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_wds_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("wds", "WDS options:", "Show Wireless Data Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_wds_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!start_network_str + !!stop_network_str + !!bind_data_port_str + !!bind_mux_str + !!set_ip_family_str + get_current_settings_flag + get_packet_service_status_flag + get_packet_statistics_flag + get_data_bearer_technology_flag + get_current_data_bearer_technology_flag + go_dormant_flag + go_active_flag + get_dormancy_status_flag + !!create_profile_str + !!swi_create_profile_indexed_str + !!modify_profile_str + !!delete_profile_str + !!get_profile_list_str + !!get_default_profile_num_str + !!get_default_profile_number_str + !!set_default_profile_num_str + !!set_default_profile_number_str + !!get_default_settings_str + get_autoconnect_settings_flag + !!set_autoconnect_settings_str + get_supported_messages_flag + reset_flag + !!get_channel_rates_flag + get_lte_attach_parameters_flag + get_max_lte_attach_pdn_number_flag + get_lte_attach_pdn_list_flag + !!set_lte_attach_pdn_list_str + noop_flag); if (n_actions > 1) { g_printerr ("error: too many WDS actions requested\n"); exit (EXIT_FAILURE); } else if (n_actions == 0 && follow_network_flag) { g_printerr ("error: `--wds-follow-network' must be used with `--wds-start-network'\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->client) g_object_unref (context->client); if (context->network_started_id) g_cancellable_disconnect (context->cancellable, context->network_started_id); if (context->packet_status_timeout_id) g_source_remove (context->packet_status_timeout_id); g_object_unref (context->cancellable); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_WDS_START_NETWORK || defined HAVE_QMI_MESSAGE_WDS_STOP_NETWORK static void stop_network_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsStopNetworkOutput *output; output = qmi_client_wds_stop_network_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_stop_network_output_get_result (output, &error)) { g_printerr ("error: couldn't stop network: %s\n", error->message); g_error_free (error); qmi_message_wds_stop_network_output_unref (output); operation_shutdown (FALSE); return; } #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") g_print ("[%s] Network stopped\n", qmi_device_get_path_display (ctx->device)); qmi_message_wds_stop_network_output_unref (output); operation_shutdown (TRUE); } static void internal_stop_network (GCancellable *cancellable, guint32 packet_data_handle, gboolean disable_autoconnect) { QmiMessageWdsStopNetworkInput *input; input = qmi_message_wds_stop_network_input_new (); qmi_message_wds_stop_network_input_set_packet_data_handle (input, packet_data_handle, NULL); if (disable_autoconnect) qmi_message_wds_stop_network_input_set_disable_autoconnect (input, TRUE, NULL); g_print ("Network cancelled... releasing resources\n"); qmi_client_wds_stop_network (ctx->client, input, 120, ctx->cancellable, (GAsyncReadyCallback)stop_network_ready, NULL); qmi_message_wds_stop_network_input_unref (input); } #endif /* HAVE_QMI_MESSAGE_WDS_START_NETWORK * HAVE_QMI_MESSAGE_WDS_STOP_NETWORK */ #if defined HAVE_QMI_MESSAGE_WDS_START_NETWORK #if defined HAVE_QMI_MESSAGE_WDS_STOP_NETWORK && defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS static void network_cancelled (GCancellable *cancellable) { ctx->network_started_id = 0; /* Remove the timeout right away */ if (ctx->packet_status_timeout_id) { g_source_remove (ctx->packet_status_timeout_id); ctx->packet_status_timeout_id = 0; } g_print ("Network cancelled... releasing resources\n"); internal_stop_network (cancellable, ctx->packet_data_handle, FALSE); } static void timeout_get_packet_service_status_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetPacketServiceStatusOutput *output; QmiWdsConnectionStatus status; output = qmi_client_wds_get_packet_service_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); return; } if (!qmi_message_wds_get_packet_service_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get packet service status: %s\n", error->message); g_error_free (error); qmi_message_wds_get_packet_service_status_output_unref (output); return; } qmi_message_wds_get_packet_service_status_output_get_connection_status ( output, &status, NULL); g_print ("[%s] Connection status: '%s'\n", qmi_device_get_path_display (ctx->device), qmi_wds_connection_status_get_string (status)); qmi_message_wds_get_packet_service_status_output_unref (output); /* If packet service checks detect disconnection, halt --wds-follow-network */ if (status != QMI_WDS_CONNECTION_STATUS_CONNECTED) { g_print ("[%s] Stopping after detecting disconnection\n", qmi_device_get_path_display (ctx->device)); internal_stop_network (NULL, ctx->packet_data_handle, FALSE); } } static gboolean packet_status_timeout (void) { qmi_client_wds_get_packet_service_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)timeout_get_packet_service_status_ready, NULL); return TRUE; } #endif /* HAVE_QMI_MESSAGE_WDS_STOP_NETWORK * HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS */ typedef struct { gchar *apn; guint8 profile_index_3gpp; guint8 profile_index_3gpp2; QmiWdsAuthentication auth; gboolean auth_set; QmiWdsIpFamily ip_type; gchar *username; gchar *password; gboolean autoconnect; gboolean autoconnect_set; } StartNetworkProperties; static gboolean start_network_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { StartNetworkProperties *props = user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' required a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "apn") == 0 && !props->apn) { props->apn = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "3gpp-profile") == 0 && !props->profile_index_3gpp) { props->profile_index_3gpp = atoi (value); return TRUE; } if (g_ascii_strcasecmp (key, "3gpp2-profile") == 0 && !props->profile_index_3gpp2) { props->profile_index_3gpp2 = atoi (value); return TRUE; } if (g_ascii_strcasecmp (key, "auth") == 0 && !props->auth_set) { if (!qmicli_read_authentication_from_string (value, &(props->auth))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown auth protocol '%s'", value); return FALSE; } props->auth_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "username") == 0 && !props->username) { props->username = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "password") == 0 && !props->password) { props->password = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "autoconnect") == 0 && !props->autoconnect_set) { if (!qmicli_read_yes_no_from_string (value, &(props->autoconnect))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown autoconnect setup '%s'", value); return FALSE; } props->autoconnect_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "ip-type") == 0 && props->ip_type == QMI_WDS_IP_FAMILY_UNSPECIFIED) { switch (atoi (value)) { case 4: props->ip_type = QMI_WDS_IP_FAMILY_IPV4; break; case 6: props->ip_type = QMI_WDS_IP_FAMILY_IPV6; break; default: g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown IP type '%s' (not 4 or 6)", value); return FALSE; } return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unrecognized or duplicate option '%s'", key); return FALSE; } static gboolean start_network_input_create (const gchar *str, QmiMessageWdsStartNetworkInput **input, GError **error) { g_autofree gchar *aux_auth_str = NULL; const gchar *ip_type_str = NULL; gchar **split = NULL; StartNetworkProperties props = { .auth = QMI_WDS_AUTHENTICATION_NONE, .ip_type = QMI_WDS_IP_FAMILY_UNSPECIFIED, }; gboolean success = FALSE; g_assert (input && !*input); /* An empty string is totally valid (i.e. no TLVs) */ if (!str[0]) return TRUE; /* New key=value format */ if (strchr (str, '=')) { GError *parse_error = NULL; if (!qmicli_parse_key_value_string (str, &parse_error, start_network_properties_handle, &props)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "couldn't parse input string: %s", parse_error->message); g_error_free (parse_error); goto out; } } /* Old non key=value format, like this: * "[(APN),(PAP|CHAP|BOTH),(Username),(Password)]" */ else { /* Parse input string into the expected fields */ split = g_strsplit (str, ",", 0); props.apn = g_strdup (split[0]); if (props.apn && split[1]) { if (!qmicli_read_authentication_from_string (split[1], &(props.auth))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown auth protocol '%s'", split[1]); goto out; } props.auth_set = TRUE; } props.username = (props.auth_set ? g_strdup (split[2]) : NULL); props.password = (props.username ? g_strdup (split[3]) : NULL); } /* Create input bundle */ *input = qmi_message_wds_start_network_input_new (); /* Set APN */ if (props.apn) qmi_message_wds_start_network_input_set_apn (*input, props.apn, NULL); /* Set 3GPP profile */ if (props.profile_index_3gpp > 0) qmi_message_wds_start_network_input_set_profile_index_3gpp (*input, props.profile_index_3gpp, NULL); /* Set 3GPP2 profile */ if (props.profile_index_3gpp2 > 0) qmi_message_wds_start_network_input_set_profile_index_3gpp2 (*input, props.profile_index_3gpp2, NULL); /* Set IP Type */ if (props.ip_type != 0) { qmi_message_wds_start_network_input_set_ip_family_preference (*input, props.ip_type, NULL); if (props.ip_type == QMI_WDS_IP_FAMILY_IPV4) ip_type_str = "4"; else if (props.ip_type == QMI_WDS_IP_FAMILY_IPV6) ip_type_str = "6"; } /* Set authentication method */ if (props.auth_set) { aux_auth_str = qmi_wds_authentication_build_string_from_mask (props.auth); qmi_message_wds_start_network_input_set_authentication_preference (*input, props.auth, NULL); } /* Set username, avoid empty strings */ if (props.username && props.username[0]) qmi_message_wds_start_network_input_set_username (*input, props.username, NULL); /* Set password, avoid empty strings */ if (props.password && props.password[0]) qmi_message_wds_start_network_input_set_password (*input, props.password, NULL); /* Set autoconnect */ if (props.autoconnect_set) qmi_message_wds_start_network_input_set_enable_autoconnect (*input, props.autoconnect, NULL); success = TRUE; g_debug ("Network start parameters set (apn: '%s', 3gpp_profile: '%u', 3gpp2_profile: '%u', auth: '%s', ip-type: '%s', username: '%s', password: '%s', autoconnect: '%s')", props.apn ? props.apn : "unspecified", props.profile_index_3gpp, props.profile_index_3gpp2, aux_auth_str ? aux_auth_str : "unspecified", ip_type_str ? ip_type_str : "unspecified", (props.username && props.username[0]) ? props.username : "unspecified", (props.password && props.password[0]) ? props.password : "unspecified", props.autoconnect_set ? (props.autoconnect ? "yes" : "no") : "unspecified"); out: g_strfreev (split); g_free (props.apn); g_free (props.username); g_free (props.password); return success; } static void start_network_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsStartNetworkOutput *output; output = qmi_client_wds_start_network_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_start_network_output_get_result (output, &error)) { g_printerr ("error: couldn't start network: %s\n", error->message); if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_CALL_FAILED)) { QmiWdsCallEndReason cer; QmiWdsVerboseCallEndReasonType verbose_cer_type; gint16 verbose_cer_reason; if (qmi_message_wds_start_network_output_get_call_end_reason ( output, &cer, NULL)) g_printerr ("call end reason (%u): %s\n", cer, qmi_wds_call_end_reason_get_string (cer)); if (qmi_message_wds_start_network_output_get_verbose_call_end_reason ( output, &verbose_cer_type, &verbose_cer_reason, NULL)) g_printerr ("verbose call end reason (%u,%d): [%s] %s\n", verbose_cer_type, verbose_cer_reason, qmi_wds_verbose_call_end_reason_type_get_string (verbose_cer_type), qmi_wds_verbose_call_end_reason_get_string (verbose_cer_type, verbose_cer_reason)); } g_error_free (error); qmi_message_wds_start_network_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_start_network_output_get_packet_data_handle (output, &ctx->packet_data_handle, NULL); qmi_message_wds_start_network_output_unref (output); #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") g_print ("[%s] Network started\n" "\tPacket data handle: '%u'\n", qmi_device_get_path_display (ctx->device), (guint)ctx->packet_data_handle); #if defined HAVE_QMI_MESSAGE_WDS_STOP_NETWORK && defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS if (follow_network_flag) { g_print ("\nCtrl+C will stop the network\n"); ctx->network_started_id = g_cancellable_connect (ctx->cancellable, G_CALLBACK (network_cancelled), NULL, NULL); ctx->packet_status_timeout_id = g_timeout_add_seconds (20, (GSourceFunc)packet_status_timeout, NULL); return; } #endif /* Nothing else to do */ operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_START_NETWORK */ #if defined HAVE_QMI_MESSAGE_WDS_GET_CURRENT_SETTINGS static void get_current_settings_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetCurrentSettingsOutput *output; QmiWdsIpFamily ip_family = QMI_WDS_IP_FAMILY_UNSPECIFIED; guint32 mtu = 0; GArray *array; guint32 addr = 0; struct in_addr in_addr_val; struct in6_addr in6_addr_val; gchar buf4[INET_ADDRSTRLEN]; gchar buf6[INET6_ADDRSTRLEN]; guint8 prefix = 0; guint i; output = qmi_client_wds_get_current_settings_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_current_settings_output_get_result (output, &error)) { g_printerr ("error: couldn't get current settings: %s\n", error->message); g_error_free (error); qmi_message_wds_get_current_settings_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Current settings retrieved:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_wds_get_current_settings_output_get_ip_family (output, &ip_family, NULL)) g_print (" IP Family: %s\n", ((ip_family == QMI_WDS_IP_FAMILY_IPV4) ? "IPv4" : ((ip_family == QMI_WDS_IP_FAMILY_IPV6) ? "IPv6" : "unknown"))); /* IPv4... */ if (qmi_message_wds_get_current_settings_output_get_ipv4_address (output, &addr, NULL)) { in_addr_val.s_addr = GUINT32_TO_BE (addr); memset (buf4, 0, sizeof (buf4)); inet_ntop (AF_INET, &in_addr_val, buf4, sizeof (buf4)); g_print (" IPv4 address: %s\n", buf4); } if (qmi_message_wds_get_current_settings_output_get_ipv4_gateway_subnet_mask (output, &addr, NULL)) { in_addr_val.s_addr = GUINT32_TO_BE (addr); memset (buf4, 0, sizeof (buf4)); inet_ntop (AF_INET, &in_addr_val, buf4, sizeof (buf4)); g_print (" IPv4 subnet mask: %s\n", buf4); } if (qmi_message_wds_get_current_settings_output_get_ipv4_gateway_address (output, &addr, NULL)) { in_addr_val.s_addr = GUINT32_TO_BE (addr); memset (buf4, 0, sizeof (buf4)); inet_ntop (AF_INET, &in_addr_val, buf4, sizeof (buf4)); g_print ("IPv4 gateway address: %s\n", buf4); } if (qmi_message_wds_get_current_settings_output_get_primary_ipv4_dns_address (output, &addr, NULL)) { in_addr_val.s_addr = GUINT32_TO_BE (addr); memset (buf4, 0, sizeof (buf4)); inet_ntop (AF_INET, &in_addr_val, buf4, sizeof (buf4)); g_print (" IPv4 primary DNS: %s\n", buf4); } if (qmi_message_wds_get_current_settings_output_get_secondary_ipv4_dns_address (output, &addr, NULL)) { in_addr_val.s_addr = GUINT32_TO_BE (addr); memset (buf4, 0, sizeof (buf4)); inet_ntop (AF_INET, &in_addr_val, buf4, sizeof (buf4)); g_print (" IPv4 secondary DNS: %s\n", buf4); } /* IPv6... */ if (qmi_message_wds_get_current_settings_output_get_ipv6_address (output, &array, &prefix, NULL)) { for (i = 0; i < array->len; i++) in6_addr_val.s6_addr16[i] = GUINT16_TO_BE (g_array_index (array, guint16, i)); memset (buf6, 0, sizeof (buf6)); inet_ntop (AF_INET6, &in6_addr_val, buf6, sizeof (buf6)); g_print (" IPv6 address: %s/%d\n", buf6, prefix); } if (qmi_message_wds_get_current_settings_output_get_ipv6_gateway_address (output, &array, &prefix, NULL)) { for (i = 0; i < array->len; i++) in6_addr_val.s6_addr16[i] = GUINT16_TO_BE (g_array_index (array, guint16, i)); memset (buf6, 0, sizeof (buf6)); inet_ntop (AF_INET6, &in6_addr_val, buf6, sizeof (buf6)); g_print ("IPv6 gateway address: %s/%d\n", buf6, prefix); } if (qmi_message_wds_get_current_settings_output_get_ipv6_primary_dns_address (output, &array, NULL)) { for (i = 0; i < array->len; i++) in6_addr_val.s6_addr16[i] = GUINT16_TO_BE (g_array_index (array, guint16, i)); memset (buf6, 0, sizeof (buf6)); inet_ntop (AF_INET6, &in6_addr_val, buf6, sizeof (buf6)); g_print (" IPv6 primary DNS: %s\n", buf6); } if (qmi_message_wds_get_current_settings_output_get_ipv6_secondary_dns_address (output, &array, NULL)) { for (i = 0; i < array->len; i++) in6_addr_val.s6_addr16[i] = GUINT16_TO_BE (g_array_index (array, guint16, i)); memset (buf6, 0, sizeof (buf6)); inet_ntop (AF_INET6, &in6_addr_val, buf6, sizeof (buf6)); g_print (" IPv6 secondary DNS: %s\n", buf6); } /* Other... */ if (qmi_message_wds_get_current_settings_output_get_mtu (output, &mtu, NULL)) g_print (" MTU: %u\n", mtu); if (qmi_message_wds_get_current_settings_output_get_domain_name_list (output, &array, &error)) { GString *s = NULL; if (array) { for (i = 0; i < array->len; i++) { if (!s) s = g_string_new (""); else g_string_append (s, ", "); g_string_append (s, g_array_index (array, const gchar *, i)); } } if (s) { g_print (" Domains: %s\n", s->str); g_string_free (s, TRUE); } else g_print (" Domains: none\n"); } qmi_message_wds_get_current_settings_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_CURRENT_SETTINGS */ #if defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS static void get_packet_service_status_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetPacketServiceStatusOutput *output; QmiWdsConnectionStatus status; output = qmi_client_wds_get_packet_service_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_packet_service_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get packet service status: %s\n", error->message); g_error_free (error); qmi_message_wds_get_packet_service_status_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_get_packet_service_status_output_get_connection_status ( output, &status, NULL); g_print ("[%s] Connection status: '%s'\n", qmi_device_get_path_display (ctx->device), qmi_wds_connection_status_get_string (status)); qmi_message_wds_get_packet_service_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS */ #if defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_STATISTICS static void get_packet_statistics_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetPacketStatisticsOutput *output; guint32 val32; guint64 val64; output = qmi_client_wds_get_packet_statistics_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_packet_statistics_output_get_result (output, &error)) { g_printerr ("error: couldn't get packet statistics: %s\n", error->message); g_error_free (error); qmi_message_wds_get_packet_statistics_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Connection statistics:\n", qmi_device_get_path_display (ctx->device)); if (qmi_message_wds_get_packet_statistics_output_get_tx_packets_ok (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tTX packets OK: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_rx_packets_ok (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tRX packets OK: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_tx_packets_error (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tTX packets error: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_rx_packets_error (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tRX packets error: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_tx_overflows (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tTX overflows: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_rx_overflows (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tRX overflows: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_tx_packets_dropped (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tTX packets dropped: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_rx_packets_dropped (output, &val32, NULL) && val32 != 0xFFFFFFFF) g_print ("\tRX packets dropped: %u\n", val32); if (qmi_message_wds_get_packet_statistics_output_get_tx_bytes_ok (output, &val64, NULL)) g_print ("\tTX bytes OK: %" G_GUINT64_FORMAT "\n", val64); if (qmi_message_wds_get_packet_statistics_output_get_rx_bytes_ok (output, &val64, NULL)) g_print ("\tRX bytes OK: %" G_GUINT64_FORMAT "\n", val64); if (qmi_message_wds_get_packet_statistics_output_get_last_call_tx_bytes_ok (output, &val64, NULL)) g_print ("\tTX bytes OK (last): %" G_GUINT64_FORMAT "\n", val64); if (qmi_message_wds_get_packet_statistics_output_get_last_call_rx_bytes_ok (output, &val64, NULL)) g_print ("\tRX bytes OK (last): %" G_GUINT64_FORMAT "\n", val64); qmi_message_wds_get_packet_statistics_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_PACKET_STATISTICS */ #if defined HAVE_QMI_MESSAGE_WDS_GET_DATA_BEARER_TECHNOLOGY static void get_data_bearer_technology_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetDataBearerTechnologyOutput *output; QmiWdsDataBearerTechnology current; output = qmi_client_wds_get_data_bearer_technology_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_data_bearer_technology_output_get_result (output, &error)) { g_printerr ("error: couldn't get data bearer technology: %s\n", error->message); if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_OUT_OF_CALL)) { QmiWdsDataBearerTechnology last = QMI_WDS_DATA_BEARER_TECHNOLOGY_UNKNOWN; if (qmi_message_wds_get_data_bearer_technology_output_get_last ( output, &last, NULL)) g_print ("[%s] Data bearer technology (last): '%s'(%d)\n", qmi_device_get_path_display (ctx->device), qmi_wds_data_bearer_technology_get_string (last), last); } g_error_free (error); qmi_message_wds_get_data_bearer_technology_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_get_data_bearer_technology_output_get_current ( output, ¤t, NULL); g_print ("[%s] Data bearer technology (current): '%s'\n", qmi_device_get_path_display (ctx->device), qmi_wds_data_bearer_technology_get_string (current)); qmi_message_wds_get_data_bearer_technology_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_DATA_BEARER_TECHNOLOGY */ #if defined HAVE_QMI_MESSAGE_WDS_GET_CURRENT_DATA_BEARER_TECHNOLOGY static void print_current_data_bearer_technology_results (const gchar *which, QmiWdsNetworkType network_type, guint32 rat_mask, guint32 so_mask) { g_autofree gchar *rat_string = NULL; g_autofree gchar *so_string = NULL; if (network_type == QMI_WDS_NETWORK_TYPE_3GPP2) { rat_string = qmi_wds_rat_3gpp2_build_string_from_mask (rat_mask); if (rat_mask & QMI_WDS_RAT_3GPP2_CDMA1X) so_string = qmi_wds_so_cdma1x_build_string_from_mask (so_mask); else if (rat_mask & QMI_WDS_RAT_3GPP2_EVDO_REVA) so_string = qmi_wds_so_evdo_reva_build_string_from_mask (so_mask); } else if (network_type == QMI_WDS_NETWORK_TYPE_3GPP) { rat_string = qmi_wds_rat_3gpp_build_string_from_mask (rat_mask); } g_print ("[%s] Data bearer technology (%s):\n" " Network type: '%s'\n" " Radio Access Technology: '%s'\n", qmi_device_get_path_display (ctx->device), which, qmi_wds_network_type_get_string (network_type), VALIDATE_MASK_NONE (rat_string)); if (network_type == QMI_WDS_NETWORK_TYPE_3GPP2) g_print (" Service Option: '%s'\n", VALIDATE_MASK_NONE (so_string)); } static void get_current_data_bearer_technology_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetCurrentDataBearerTechnologyOutput *output; QmiWdsNetworkType network_type; guint32 rat_mask; guint32 so_mask; output = qmi_client_wds_get_current_data_bearer_technology_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } #undef VALIDATE_UNKNOWN #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") if (!qmi_message_wds_get_current_data_bearer_technology_output_get_result (output, &error)) { g_printerr ("error: couldn't get current data bearer technology: %s\n", error->message); if (qmi_message_wds_get_current_data_bearer_technology_output_get_last ( output, &network_type, &rat_mask, &so_mask, NULL)) { print_current_data_bearer_technology_results ( "last", network_type, rat_mask, so_mask); } g_error_free (error); qmi_message_wds_get_current_data_bearer_technology_output_unref (output); operation_shutdown (FALSE); return; } /* Retrieve CURRENT */ if (qmi_message_wds_get_current_data_bearer_technology_output_get_current ( output, &network_type, &rat_mask, &so_mask, NULL)) { print_current_data_bearer_technology_results ( "current", network_type, rat_mask, so_mask); } qmi_message_wds_get_current_data_bearer_technology_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_CURRENT_DATA_BEARER_TECHNOLOGY */ #if defined HAVE_QMI_MESSAGE_WDS_GO_DORMANT static void go_dormant_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGoDormantOutput *output; output = qmi_client_wds_go_dormant_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_go_dormant_output_get_result (output, &error)) { g_printerr ("error: couldn't go dormant: %s\n", error->message); g_error_free (error); qmi_message_wds_go_dormant_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_go_dormant_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GO_DORMANT */ #if defined HAVE_QMI_MESSAGE_WDS_GO_ACTIVE static void go_active_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGoActiveOutput *output; output = qmi_client_wds_go_active_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_go_active_output_get_result (output, &error)) { g_printerr ("error: couldn't go active: %s\n", error->message); g_error_free (error); qmi_message_wds_go_active_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_go_active_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GO_ACTIVE */ #if defined HAVE_QMI_MESSAGE_WDS_GET_DORMANCY_STATUS static void get_dormancy_status_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetDormancyStatusOutput *output; QmiWdsDormancyStatus status; output = qmi_client_wds_get_dormancy_status_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_dormancy_status_output_get_result (output, &error)) { g_printerr ("error: couldn't get dormancy status: %s\n", error->message); g_error_free (error); qmi_message_wds_get_dormancy_status_output_unref (output); operation_shutdown (FALSE); return; } if (qmi_message_wds_get_dormancy_status_output_get_dormancy_status ( output, &status, NULL)) { g_print ("[%s] Dormancy Status: '%s'\n", qmi_device_get_path_display (ctx->device), qmi_wds_dormancy_status_get_string (status)); } qmi_message_wds_get_dormancy_status_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_DORMANCY_STATUS */ #if defined HAVE_QMI_MESSAGE_WDS_CREATE_PROFILE || \ defined HAVE_QMI_MESSAGE_WDS_SWI_CREATE_PROFILE_INDEXED || \ defined HAVE_QMI_MESSAGE_WDS_MODIFY_PROFILE typedef struct { QmiWdsProfileType profile_type; guint profile_index; guint context_number; gchar *name; QmiWdsPdpType pdp_type; gboolean pdp_type_set; QmiWdsApnTypeMask apn_type; gboolean apn_type_set; gchar *apn; gchar *username; gchar *password; QmiWdsAuthentication auth; gboolean auth_set; gboolean no_roaming; gboolean no_roaming_set; gboolean disabled; gboolean disabled_set; } CreateModifyProfileProperties; static gboolean create_modify_profile_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { CreateModifyProfileProperties *props = user_data; /* Allow empty values for string parameters */ if (g_ascii_strcasecmp (key, "name") == 0 && !props->name) { props->name = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "apn") == 0 && !props->apn) { props->apn = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "username") == 0 && !props->username) { props->username = g_strdup (value); return TRUE; } if (g_ascii_strcasecmp (key, "password") == 0 && !props->password) { props->password = g_strdup (value); return TRUE; } /* all other TLVs do require a value... */ if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' required a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "context-num") == 0 && !props->context_number) { props->context_number = atoi (value); if (props->context_number <= 0 || props->context_number > G_MAXUINT8) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid or out of range context number [1,%u]: '%s'", G_MAXUINT8, value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "auth") == 0 && !props->auth_set) { if (!qmicli_read_authentication_from_string (value, &(props->auth))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown auth protocol '%s'", value); return FALSE; } props->auth_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "pdp-type") == 0 && !props->pdp_type_set) { if (!qmicli_read_pdp_type_from_string (value, &(props->pdp_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown pdp type '%s'", value); return FALSE; } props->pdp_type_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "apn-type-mask") == 0 && !props->apn_type_set) { if (!qmicli_read_wds_apn_type_mask_from_string (value, &(props->apn_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown apn type '%s'", value); return FALSE; } props->apn_type_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "no-roaming") == 0 && !props->no_roaming_set) { if (!qmicli_read_yes_no_from_string (value, &(props->no_roaming))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown 'no-roaming' value '%s'", value); return FALSE; } props->no_roaming_set = TRUE; return TRUE; } if (g_ascii_strcasecmp (key, "disabled") == 0 && !props->disabled_set) { if (!qmicli_read_yes_no_from_string (value, &(props->disabled))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown 'disabled' value '%s'", value); return FALSE; } props->disabled_set = TRUE; return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unrecognized or duplicate option '%s'", key); return FALSE; } #endif /* HAVE_QMI_MESSAGE_WDS_CREATE_PROFILE * HAVE_QMI_MESSAGE_WDS_SWI_CREATE_PROFILE_INDEXED * HAVE_QMI_MESSAGE_WDS_MODIFY_PROFILE */ #if defined HAVE_QMI_MESSAGE_WDS_CREATE_PROFILE static gboolean create_profile_input_create (const gchar *str, QmiMessageWdsCreateProfileInput **input, GError **error) { GError *parse_error = NULL; CreateModifyProfileProperties props = {}; gboolean success = FALSE; gchar **split; g_assert (input && !*input); split = g_strsplit (str, ",", 2); if (g_strv_length (split) < 1) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "expected at least 1 arguments for 'wds create profile' command"); goto out; } g_strstrip (split[0]); if (g_str_equal (split[0], "3gpp")) props.profile_type = QMI_WDS_PROFILE_TYPE_3GPP; else if (g_str_equal (split[0], "3gpp2")) props.profile_type = QMI_WDS_PROFILE_TYPE_3GPP2; else { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid profile type. Expected '3gpp' or '3gpp2'.'"); goto out; } if (split[1]) { if (!qmicli_parse_key_value_string (split[1], &parse_error, create_modify_profile_properties_handle, &props)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "couldn't parse input string: %s", parse_error->message); g_error_free (parse_error); goto out; } } /* Create input bundle */ *input = qmi_message_wds_create_profile_input_new (); /* Profile type is required */ qmi_message_wds_create_profile_input_set_profile_type (*input, props.profile_type, NULL); if (props.context_number) qmi_message_wds_create_profile_input_set_pdp_context_number (*input, props.context_number, NULL); if (props.pdp_type_set) qmi_message_wds_create_profile_input_set_pdp_type (*input, props.pdp_type, NULL); if (props.apn_type_set) qmi_message_wds_create_profile_input_set_apn_type_mask (*input, props.apn_type, NULL); if (props.name) qmi_message_wds_create_profile_input_set_profile_name (*input, props.name, NULL); if (props.apn) qmi_message_wds_create_profile_input_set_apn_name (*input, props.apn, NULL); if (props.auth_set) qmi_message_wds_create_profile_input_set_authentication (*input, props.auth, NULL); if (props.username) qmi_message_wds_create_profile_input_set_username (*input, props.username, NULL); if (props.password) qmi_message_wds_create_profile_input_set_password (*input, props.password, NULL); if (props.no_roaming_set) qmi_message_wds_create_profile_input_set_roaming_disallowed_flag (*input, props.no_roaming, NULL); if (props.disabled_set) qmi_message_wds_create_profile_input_set_apn_disabled_flag (*input, props.disabled, NULL); success = TRUE; out: g_strfreev (split); g_free (props.name); g_free (props.apn); g_free (props.username); g_free (props.password); return success; } static void create_profile_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsCreateProfileOutput *output; GError *error = NULL; QmiWdsProfileType profile_type; guint8 profile_index; output = qmi_client_wds_create_profile_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_create_profile_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_create_profile_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't create profile: ds profile error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't create profile: %s\n", error->message); } g_error_free (error); qmi_message_wds_create_profile_output_unref (output); operation_shutdown (FALSE); return; } g_print ("New profile created:\n"); if (qmi_message_wds_create_profile_output_get_profile_identifier (output, &profile_type, &profile_index, NULL)) { g_print ("\tProfile type: '%s'\n", qmi_wds_profile_type_get_string(profile_type)); g_print ("\tProfile index: '%d'\n", profile_index); } qmi_message_wds_create_profile_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_CREATE_PROFILE */ #if defined HAVE_QMI_MESSAGE_WDS_SWI_CREATE_PROFILE_INDEXED static gboolean swi_create_profile_indexed_input_create (const gchar *str, QmiMessageWdsSwiCreateProfileIndexedInput **input, GError **error) { GError *parse_error = NULL; CreateModifyProfileProperties props = {}; gchar **split; gboolean success = FALSE; g_assert (input && !*input); /* Expect max 3 tokens: the first two give us the mandatory parameters of the command, * the 3rd one will contain the key/value pair list */ split = g_strsplit (str, ",", 3); if (g_strv_length (split) < 2) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "expected at least 2 arguments for 'wds swi create profile indexed' command"); goto out; } g_strstrip (split[0]); if (g_str_equal (split[0], "3gpp")) props.profile_type = QMI_WDS_PROFILE_TYPE_3GPP; else if (g_str_equal (split[0], "3gpp2")) props.profile_type = QMI_WDS_PROFILE_TYPE_3GPP2; else { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid profile type '%s'. Expected '3gpp' or '3gpp2'.'", split[0]); goto out; } g_strstrip (split[1]); props.profile_index = atoi (split[1]); if (props.profile_index <= 0 || props.profile_index > G_MAXUINT8) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid or out of range profile index [1,%u]: '%s'\n", G_MAXUINT8, split[1]); goto out; } if (split[2]) { if (!qmicli_parse_key_value_string (split[2], &parse_error, create_modify_profile_properties_handle, &props)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "couldn't parse input string: %s", parse_error->message); g_error_free (parse_error); goto out; } } /* Create input bundle */ *input = qmi_message_wds_swi_create_profile_indexed_input_new (); /* Profile identifier is required */ qmi_message_wds_swi_create_profile_indexed_input_set_profile_identifier (*input, props.profile_type, props.profile_index, NULL); if (props.context_number) qmi_message_wds_swi_create_profile_indexed_input_set_pdp_context_number (*input, props.context_number, NULL); if (props.pdp_type_set) qmi_message_wds_swi_create_profile_indexed_input_set_pdp_type (*input, props.pdp_type, NULL); if (props.name) qmi_message_wds_swi_create_profile_indexed_input_set_profile_name (*input, props.name, NULL); if (props.apn) qmi_message_wds_swi_create_profile_indexed_input_set_apn_name (*input, props.apn, NULL); if (props.auth_set) qmi_message_wds_swi_create_profile_indexed_input_set_authentication (*input, props.auth, NULL); if (props.username) qmi_message_wds_swi_create_profile_indexed_input_set_username (*input, props.username, NULL); if (props.password) qmi_message_wds_swi_create_profile_indexed_input_set_password (*input, props.password, NULL); if (props.no_roaming_set) qmi_message_wds_swi_create_profile_indexed_input_set_roaming_disallowed_flag (*input, props.no_roaming, NULL); if (props.disabled_set) qmi_message_wds_swi_create_profile_indexed_input_set_apn_disabled_flag (*input, props.disabled, NULL); success = TRUE; out: g_strfreev (split); g_free (props.name); g_free (props.apn); g_free (props.username); g_free (props.password); return success; } static void swi_create_profile_indexed_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsSwiCreateProfileIndexedOutput *output; GError *error = NULL; QmiWdsProfileType profile_type; guint8 profile_index; output = qmi_client_wds_swi_create_profile_indexed_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_swi_create_profile_indexed_output_get_result (output, &error)) { g_printerr ("error: couldn't create indexed profile: %s\n", error->message); g_error_free (error); qmi_message_wds_swi_create_profile_indexed_output_unref (output); operation_shutdown (FALSE); return; } g_print ("New profile created:\n"); if (qmi_message_wds_swi_create_profile_indexed_output_get_profile_identifier (output, &profile_type, &profile_index, NULL)) { g_print ("\tProfile type: '%s'\n", qmi_wds_profile_type_get_string(profile_type)); g_print ("\tProfile index: '%d'\n", profile_index); } qmi_message_wds_swi_create_profile_indexed_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_SWI_CREATE_PROFILE_INDEXED */ #if defined HAVE_QMI_MESSAGE_WDS_MODIFY_PROFILE static gboolean modify_profile_input_create (const gchar *str, QmiMessageWdsModifyProfileInput **input, GError **error) { GError *parse_error = NULL; CreateModifyProfileProperties props = {}; gchar **split; gboolean success = FALSE; g_assert (input && !*input); /* Expect max 3 tokens: the first two give us the mandatory parameters of the command, * the 3rd one will contain the key/value pair list */ split = g_strsplit (str, ",", 3); if (g_strv_length (split) < 3) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "expected at least 3 arguments for 'wds modify profile' command"); goto out; } g_strstrip (split[0]); if (g_str_equal (split[0], "3gpp")) props.profile_type = QMI_WDS_PROFILE_TYPE_3GPP; else if (g_str_equal (split[0], "3gpp2")) props.profile_type = QMI_WDS_PROFILE_TYPE_3GPP2; else { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid profile type '%s'. Expected '3gpp' or '3gpp2'.'", split[0]); goto out; } g_strstrip (split[1]); props.profile_index = atoi (split[1]); if (props.profile_index <= 0 || props.profile_index > G_MAXUINT8) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "invalid or out of range profile index [1,%u]: '%s'\n", G_MAXUINT8, split[1]); goto out; } /* advance to third token, that's where key/value pairs start */ if (!qmicli_parse_key_value_string (split[2], &parse_error, create_modify_profile_properties_handle, &props)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "couldn't parse input string: %s", parse_error->message); g_error_free (parse_error); goto out; } /* Create input bundle */ *input = qmi_message_wds_modify_profile_input_new (); /* Profile identifier is required */ qmi_message_wds_modify_profile_input_set_profile_identifier (*input, props.profile_type, props.profile_index, NULL); if (props.context_number) qmi_message_wds_modify_profile_input_set_pdp_context_number (*input, props.context_number, NULL); if (props.pdp_type_set) qmi_message_wds_modify_profile_input_set_pdp_type (*input, props.pdp_type, NULL); if (props.apn_type_set) qmi_message_wds_modify_profile_input_set_apn_type_mask (*input, props.apn_type, NULL); if (props.name) qmi_message_wds_modify_profile_input_set_profile_name (*input, props.name, NULL); if (props.apn) qmi_message_wds_modify_profile_input_set_apn_name (*input, props.apn, NULL); if (props.auth_set) qmi_message_wds_modify_profile_input_set_authentication (*input, props.auth, NULL); if (props.username) qmi_message_wds_modify_profile_input_set_username (*input, props.username, NULL); if (props.password) qmi_message_wds_modify_profile_input_set_password (*input, props.password, NULL); if (props.no_roaming_set) qmi_message_wds_modify_profile_input_set_roaming_disallowed_flag (*input, props.no_roaming, NULL); if (props.disabled_set) qmi_message_wds_modify_profile_input_set_apn_disabled_flag (*input, props.disabled, NULL); success = TRUE; out: g_strfreev (split); g_free (props.name); g_free (props.apn); g_free (props.username); g_free (props.password); return success; } static void modify_profile_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsModifyProfileOutput *output; GError *error = NULL; output = qmi_client_wds_modify_profile_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_modify_profile_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_modify_profile_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't modify profile: ds profile error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't modify profile: %s\n", error->message); } g_error_free (error); qmi_message_wds_modify_profile_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_modify_profile_output_unref (output); g_print ("Profile successfully modified.\n"); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_MODIFY_PROFILE */ #if defined HAVE_QMI_MESSAGE_WDS_DELETE_PROFILE static void delete_profile_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsDeleteProfileOutput *output; GError *error = NULL; output = qmi_client_wds_delete_profile_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_delete_profile_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_delete_profile_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't delete profile: ds profile error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't delete profile: %s\n", error->message); } g_error_free (error); qmi_message_wds_delete_profile_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_delete_profile_output_unref (output); g_print ("Profile successfully deleted.\n"); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_DELETE_PROFILE */ #if defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_LIST && defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_SETTINGS typedef struct { guint i; GArray *profile_list; } GetProfileListContext; static void get_next_profile_settings (GetProfileListContext *inner_ctx); static void get_profile_settings_ready (QmiClientWds *client, GAsyncResult *res, GetProfileListContext *inner_ctx) { QmiMessageWdsGetProfileSettingsOutput *output; GError *error = NULL; output = qmi_client_wds_get_profile_settings_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); } else if (!qmi_message_wds_get_profile_settings_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_get_profile_settings_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't get profile settings: ds profile error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't get profile settings: %s\n", error->message); } g_error_free (error); qmi_message_wds_get_profile_settings_output_unref (output); } else { const gchar *str; guint8 context_number; QmiWdsPdpType pdp_type; QmiWdsAuthentication auth; QmiWdsApnTypeMask apn_type; gboolean flag; if (qmi_message_wds_get_profile_settings_output_get_apn_name (output, &str, NULL)) g_print ("\t\tAPN: '%s'\n", str); if (qmi_message_wds_get_profile_settings_output_get_apn_type_mask (output, &apn_type, NULL)) { g_autofree gchar *aux = NULL; aux = qmi_wds_apn_type_mask_build_string_from_mask (apn_type); g_print ("\t\tAPN type: '%s'\n", VALIDATE_MASK_NONE (aux)); } if (qmi_message_wds_get_profile_settings_output_get_pdp_type (output, &pdp_type, NULL)) g_print ("\t\tPDP type: '%s'\n", qmi_wds_pdp_type_get_string (pdp_type)); if (qmi_message_wds_get_profile_settings_output_get_pdp_context_number (output, &context_number, NULL)) g_print ("\t\tPDP context number: '%d'\n", context_number); if (qmi_message_wds_get_profile_settings_output_get_username (output, &str, NULL)) g_print ("\t\tUsername: '%s'\n", str); if (qmi_message_wds_get_profile_settings_output_get_password (output, &str, NULL)) g_print ("\t\tPassword: '%s'\n", str); if (qmi_message_wds_get_profile_settings_output_get_authentication (output, &auth, NULL)) { g_autofree gchar *aux = NULL; aux = qmi_wds_authentication_build_string_from_mask (auth); g_print ("\t\tAuth: '%s'\n", VALIDATE_MASK_NONE (aux)); } if (qmi_message_wds_get_profile_settings_output_get_roaming_disallowed_flag (output, &flag, NULL)) g_print ("\t\tNo roaming: '%s'\n", flag ? "yes" : "no"); if (qmi_message_wds_get_profile_settings_output_get_apn_disabled_flag (output, &flag, NULL)) g_print ("\t\tAPN disabled: '%s'\n", flag ? "yes" : "no"); qmi_message_wds_get_profile_settings_output_unref (output); } /* Keep on */ inner_ctx->i++; get_next_profile_settings (inner_ctx); } static void get_next_profile_settings (GetProfileListContext *inner_ctx) { QmiMessageWdsGetProfileListOutputProfileListProfile *profile; QmiMessageWdsGetProfileSettingsInput *input; if (inner_ctx->i >= inner_ctx->profile_list->len) { /* All done */ g_array_unref (inner_ctx->profile_list); g_slice_free (GetProfileListContext, inner_ctx); operation_shutdown (TRUE); return; } profile = &g_array_index (inner_ctx->profile_list, QmiMessageWdsGetProfileListOutputProfileListProfile, inner_ctx->i); g_print ("\t[%u] %s - %s\n", profile->profile_index, qmi_wds_profile_type_get_string (profile->profile_type), profile->profile_name); input = qmi_message_wds_get_profile_settings_input_new (); qmi_message_wds_get_profile_settings_input_set_profile_id ( input, profile->profile_type, profile->profile_index, NULL); qmi_client_wds_get_profile_settings (ctx->client, input, 3, NULL, (GAsyncReadyCallback)get_profile_settings_ready, inner_ctx); qmi_message_wds_get_profile_settings_input_unref (input); } static void get_profile_list_ready (QmiClientWds *client, GAsyncResult *res) { GError *error = NULL; QmiMessageWdsGetProfileListOutput *output; GetProfileListContext *inner_ctx; GArray *profile_list = NULL; output = qmi_client_wds_get_profile_list_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_profile_list_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_get_profile_list_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't get profile list: ds profile error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't get profile list: %s\n", error->message); } g_error_free (error); qmi_message_wds_get_profile_list_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_get_profile_list_output_get_profile_list (output, &profile_list, NULL); if (!profile_list || !profile_list->len) { g_print ("Profile list empty\n"); qmi_message_wds_get_profile_list_output_unref (output); operation_shutdown (TRUE); return; } g_print ("Profile list retrieved:\n"); inner_ctx = g_slice_new (GetProfileListContext); inner_ctx->profile_list = g_array_ref (profile_list); inner_ctx->i = 0; get_next_profile_settings (inner_ctx); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_PROFILE_LIST * HAVE_QMI_MESSAGE_WDS_GET_PROFILE_SETTINGS */ #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_SETTINGS static void get_default_settings_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsGetDefaultSettingsOutput *output; GError *error = NULL; const gchar *str; QmiWdsPdpType pdp_type; QmiWdsAuthentication auth; output = qmi_client_wds_get_default_settings_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_default_settings_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_get_default_settings_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't get default settings: ds default error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't get default settings: %s\n", error->message); } g_error_free (error); qmi_message_wds_get_default_settings_output_unref (output); operation_shutdown (FALSE); return; } g_print ("Default settings retrieved:\n"); if (qmi_message_wds_get_default_settings_output_get_apn_name (output, &str, NULL)) g_print ("\tAPN: '%s'\n", str); if (qmi_message_wds_get_default_settings_output_get_pdp_type (output, &pdp_type, NULL)) g_print ("\tPDP type: '%s'\n", qmi_wds_pdp_type_get_string (pdp_type)); if (qmi_message_wds_get_default_settings_output_get_username (output, &str, NULL)) g_print ("\tUsername: '%s'\n", str); if (qmi_message_wds_get_default_settings_output_get_password (output, &str, NULL)) g_print ("\tPassword: '%s'\n", str); if (qmi_message_wds_get_default_settings_output_get_authentication (output, &auth, NULL)) { g_autofree gchar *aux = NULL; aux = qmi_wds_authentication_build_string_from_mask (auth); g_print ("\tAuth: '%s'\n", VALIDATE_MASK_NONE (aux)); } qmi_message_wds_get_default_settings_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_SETTINGS */ #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER static void get_default_profile_number_ready (QmiClientWds *client, GAsyncResult *res) { g_autoptr(QmiMessageWdsGetDefaultProfileNumberOutput) output = NULL; g_autoptr(GError) error = NULL; guint8 profile_num; output = qmi_client_wds_get_default_profile_number_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_default_profile_number_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_get_default_profile_number_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't get default profile number: ds profile error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't get default profile number: %s\n", error->message); } operation_shutdown (FALSE); return; } g_print ("Default profile number retrieved:\n"); if (qmi_message_wds_get_default_profile_number_output_get_index (output, &profile_num, NULL)) g_print ("\tDefault profile number: '%d'\n", profile_num); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER */ #if defined HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER static void set_default_profile_number_ready (QmiClientWds *client, GAsyncResult *res) { g_autoptr(QmiMessageWdsSetDefaultProfileNumberOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_wds_set_default_profile_number_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_wds_set_default_profile_number_output_get_result (output, &error)) { QmiWdsDsProfileError ds_profile_error; if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && qmi_message_wds_set_default_profile_number_output_get_extended_error_code ( output, &ds_profile_error, NULL)) { g_printerr ("error: couldn't set default settings: ds profile error: %s\n", qmi_wds_ds_profile_error_get_string (ds_profile_error)); } else { g_printerr ("error: couldn't set default settings: %s\n", error->message); } operation_shutdown (FALSE); return; } g_print ("Default profile number updated\n"); operation_shutdown (TRUE); } static QmiMessageWdsSetDefaultProfileNumberInput * set_default_profile_number_input_create (const gchar *str) { g_autoptr(QmiMessageWdsSetDefaultProfileNumberInput) input = NULL; g_autoptr(GError) error = NULL; g_auto(GStrv) split = NULL; QmiWdsProfileType profile_type; guint profile_num; split = g_strsplit (str, ",", -1); input = qmi_message_wds_set_default_profile_number_input_new (); if (g_strv_length (split) != 2) { g_printerr ("error: expected 2 options in default profile number settings\n"); return NULL; } g_strstrip (split[0]); if (g_str_equal (split[0], "3gpp")) profile_type = QMI_WDS_PROFILE_TYPE_3GPP; else if (g_str_equal (split[0], "3gpp2")) profile_type = QMI_WDS_PROFILE_TYPE_3GPP2; else { g_printerr ("error: invalid profile type '%s'. Expected '3gpp' or '3gpp2'.'\n", split[0]); return NULL; } g_strstrip (split[1]); profile_num = atoi (split[1]); if (profile_num <= 0 || profile_num > G_MAXUINT8) { g_printerr ("error: invalid or out of range profile number [1,%u]: '%s'\n", G_MAXUINT8, split[1]); return NULL; } if (!qmi_message_wds_set_default_profile_number_input_set_profile_identifier ( input, profile_type, QMI_WDS_PROFILE_FAMILY_TETHERED, (guint8)profile_num, &error)) { g_printerr ("error: couldn't create input bundle: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } #endif /* HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER */ #if defined HAVE_QMI_MESSAGE_WDS_GET_AUTOCONNECT_SETTINGS static void get_autoconnect_settings_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsGetAutoconnectSettingsOutput *output; GError *error = NULL; QmiWdsAutoconnectSetting status; QmiWdsAutoconnectSettingRoaming roaming; output = qmi_client_wds_get_autoconnect_settings_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_autoconnect_settings_output_get_result (output, &error)) { g_printerr ("error: couldn't get autoconnect settings: %s\n", error->message); g_error_free (error); qmi_message_wds_get_autoconnect_settings_output_unref (output); operation_shutdown (FALSE); return; } g_print ("Autoconnect settings retrieved:\n"); qmi_message_wds_get_autoconnect_settings_output_get_status (output, &status, NULL); g_print ("\tStatus: '%s'\n", qmi_wds_autoconnect_setting_get_string (status)); if (qmi_message_wds_get_autoconnect_settings_output_get_roaming (output, &roaming, NULL)) g_print ("\tRoaming: '%s'\n", qmi_wds_autoconnect_setting_roaming_get_string (roaming)); qmi_message_wds_get_autoconnect_settings_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_AUTOCONNECT_SETTINGS */ #if defined HAVE_QMI_MESSAGE_WDS_SET_AUTOCONNECT_SETTINGS static QmiMessageWdsSetAutoconnectSettingsInput * set_autoconnect_settings_input_create (const gchar *str) { QmiMessageWdsSetAutoconnectSettingsInput *input = NULL; gchar **split; QmiWdsAutoconnectSetting status; QmiWdsAutoconnectSettingRoaming roaming; GError *error = NULL; split = g_strsplit (str, ",", -1); input = qmi_message_wds_set_autoconnect_settings_input_new (); if (g_strv_length (split) != 2 && g_strv_length (split) != 1) { g_printerr ("error: expected 1 or 2 options in autoconnect settings\n"); goto error_out; } g_strstrip (split[0]); if (!qmicli_read_wds_autoconnect_setting_from_string (split[0], &status)) { g_printerr ("error: failed to parse autoconnect setting\n"); goto error_out; } if (!qmi_message_wds_set_autoconnect_settings_input_set_status (input, status, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); goto error_out; } if (g_strv_length (split) == 2) { g_strstrip (split[1]); if (!qmicli_read_wds_autoconnect_setting_roaming_from_string (g_str_equal (split[1], "roaming-allowed") ? "allowed" : split[1], &roaming)) { g_printerr ("error: failed to parse autoconnect roaming setting\n"); goto error_out; } if (!qmi_message_wds_set_autoconnect_settings_input_set_roaming (input, roaming, &error)) { g_printerr ("error: couldn't create input data bundle: '%s'\n", error->message); goto error_out; } } g_strfreev (split); return input; error_out: if (error) g_error_free (error); g_strfreev (split); qmi_message_wds_set_autoconnect_settings_input_unref (input); return NULL; } static void set_autoconnect_settings_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsSetAutoconnectSettingsOutput *output; GError *error = NULL; output = qmi_client_wds_set_autoconnect_settings_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_set_autoconnect_settings_output_get_result (output, &error)) { g_printerr ("error: couldn't set autoconnect settings: %s\n", error->message); g_error_free (error); qmi_message_wds_set_autoconnect_settings_output_unref (output); operation_shutdown (FALSE); return; } g_print ("Autoconnect settings updated\n"); qmi_message_wds_set_autoconnect_settings_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_SET_AUTOCONNECT_SETTINGS */ #if defined HAVE_QMI_MESSAGE_WDS_GET_SUPPORTED_MESSAGES static void get_supported_messages_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsGetSupportedMessagesOutput *output; GError *error = NULL; GArray *bytearray = NULL; gchar *str; output = qmi_client_wds_get_supported_messages_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_supported_messages_output_get_result (output, &error)) { g_printerr ("error: couldn't get supported WDS messages: %s\n", error->message); g_error_free (error); qmi_message_wds_get_supported_messages_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got supported WDS messages:\n", qmi_device_get_path_display (ctx->device)); qmi_message_wds_get_supported_messages_output_get_list (output, &bytearray, NULL); str = qmicli_get_supported_messages_list (bytearray ? (const guint8 *)bytearray->data : NULL, bytearray ? bytearray->len : 0); g_print ("%s", str); g_free (str); qmi_message_wds_get_supported_messages_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_SUPPORTED_MESSAGES */ #if defined HAVE_QMI_MESSAGE_WDS_RESET static void reset_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsResetOutput *output; GError *error = NULL; output = qmi_client_wds_reset_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_reset_output_get_result (output, &error)) { g_printerr ("error: couldn't reset the WDS service: %s\n", error->message); g_error_free (error); qmi_message_wds_reset_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed WDS service reset\n", qmi_device_get_path_display (ctx->device)); qmi_message_wds_reset_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_RESET */ static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } #if defined HAVE_QMI_MESSAGE_WDS_BIND_DATA_PORT static QmiMessageWdsBindDataPortInput * bind_data_port_input_create (const gchar *str) { g_autoptr(QmiMessageWdsBindDataPortInput) input = NULL; g_autoptr(GError) error = NULL; QmiSioPort sio_port; sio_port = strtoul(str, NULL, 0); if (!sio_port && !qmicli_read_sio_port_from_string (str, &sio_port)) return NULL; input = qmi_message_wds_bind_data_port_input_new (); if (!qmi_message_wds_bind_data_port_input_set_data_port (input, sio_port, &error)) { g_printerr ("error: couldn't set data port: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void bind_data_port_ready (QmiClientWds *client, GAsyncResult *res) { g_autoptr(QmiMessageWdsBindDataPortOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_wds_bind_data_port_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_wds_bind_data_port_output_get_result (output, &error)) { g_printerr ("error: couldn't bind data port: %s\n", error->message); operation_shutdown (FALSE); return; } operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_BIND_DATA_PORT */ #if defined HAVE_QMI_MESSAGE_WDS_BIND_MUX_DATA_PORT typedef struct { guint8 mux_id; QmiDataEndpointType ep_type; gint ep_iface_number; QmiWdsClientType client_type; } BindMuxDataPortProperties; static gboolean bind_mux_data_port_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { BindMuxDataPortProperties *props = user_data; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' requires a value", key); return FALSE; } if (g_ascii_strcasecmp (key, "mux-id") == 0) { guint aux; /* QMI_WDS_MUX_ID_UNDEFINED is G_MAXUINT8 (0xff) */ if (!qmicli_read_uint_from_string (value, &aux) || (aux >= G_MAXUINT8)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "failed reading key 'mux-id' value in range [0,254]: '%s'", value); return FALSE; } props->mux_id = (guint8) aux; return TRUE; } if (g_ascii_strcasecmp (key, "ep-type") == 0) { if (!qmicli_read_data_endpoint_type_from_string (value, &(props->ep_type))) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "failed reading key 'ep-type' value: '%s'", value); return FALSE; } return TRUE; } if (g_ascii_strcasecmp (key, "ep-iface-number") == 0) { guint aux; if (!qmicli_read_uint_from_string (value, &aux)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "failed reading key 'ep-iface-number' value: '%s'", value); return FALSE; } props->ep_iface_number = (gint) aux; return TRUE; } g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unrecognized key: '%s'", key); return FALSE; } static QmiMessageWdsBindMuxDataPortInput * bind_mux_data_port_input_create (const gchar *str) { QmiMessageWdsBindMuxDataPortInput *input = NULL; GError *error = NULL; BindMuxDataPortProperties props = { .mux_id = QMI_WDS_MUX_ID_UNDEFINED, .ep_type = QMI_DATA_ENDPOINT_TYPE_HSUSB, .ep_iface_number = QMI_WDS_ENDPOINT_INTERFACE_NUMBER_UNDEFINED, .client_type = QMI_WDS_CLIENT_TYPE_TETHERED, }; if (!str[0]) return NULL; if (strchr (str, '=')) { if (!qmicli_parse_key_value_string (str, &error, bind_mux_data_port_properties_handle, &props)) { g_printerr ("error: could not parse input string '%s'\n", error->message); g_error_free (error); return NULL; } } else { g_printerr ("error: malformed input string, key=value format expected.\n"); goto error_out; } if ((props.mux_id == QMI_WDS_MUX_ID_UNDEFINED) || (props.ep_iface_number == QMI_WDS_ENDPOINT_INTERFACE_NUMBER_UNDEFINED)) { g_printerr ("error: Mux ID and Endpoint Iface Number are both needed\n"); return NULL; } input = qmi_message_wds_bind_mux_data_port_input_new (); if (!qmi_message_wds_bind_mux_data_port_input_set_endpoint_info (input, props.ep_type, props.ep_iface_number, &error)) { g_printerr ("error: couldn't set endpoint info: '%s'\n", error->message); goto error_out; } if (!qmi_message_wds_bind_mux_data_port_input_set_mux_id (input, props.mux_id, &error)) { g_printerr ("error: couldn't set mux ID %d: '%s'\n", props.mux_id, error->message); goto error_out; } if (!qmi_message_wds_bind_mux_data_port_input_set_client_type (input, props.client_type , &error)) { g_printerr ("error: couldn't set client type: '%s'\n", error->message); goto error_out; } return input; error_out: if (error) g_error_free (error); qmi_message_wds_bind_mux_data_port_input_unref (input); return NULL; } static void bind_mux_data_port_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsBindMuxDataPortOutput *output; GError *error = NULL; output = qmi_client_wds_bind_mux_data_port_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_bind_mux_data_port_output_get_result (output, &error)) { g_printerr ("error: couldn't bind mux data port: %s\n", error->message); g_error_free (error); qmi_message_wds_bind_mux_data_port_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_bind_mux_data_port_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_BIND_MUX_DATA_PORT */ #if defined HAVE_QMI_MESSAGE_WDS_SET_IP_FAMILY static void set_ip_family_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsSetIpFamilyOutput *output; GError *error = NULL; output = qmi_client_wds_set_ip_family_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_set_ip_family_output_get_result (output, &error)) { g_printerr ("error: couldn't set IP family: %s\n", error->message); g_error_free (error); qmi_message_wds_set_ip_family_output_unref (output); operation_shutdown (FALSE); return; } qmi_message_wds_set_ip_family_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_SET_IP_FAMILY */ #if defined HAVE_QMI_MESSAGE_WDS_GET_CHANNEL_RATES static void get_channel_rates_ready (QmiClientWds *client, GAsyncResult *res) { QmiMessageWdsGetChannelRatesOutput *output; guint32 txrate = 0, rxrate = 0, maxtxrate = 0, maxrxrate = 0; GError *error = NULL; output = qmi_client_wds_get_channel_rates_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_channel_rates_output_get_result (output, &error)) { g_printerr ("error: couldn't get channel rates: %s\n", error->message); g_error_free (error); qmi_message_wds_get_channel_rates_output_unref (output); operation_shutdown (FALSE); return; } g_print ("Channel data rates:\n"); qmi_message_wds_get_channel_rates_output_get_channel_rates (output, &txrate, &rxrate, &maxtxrate, &maxrxrate, NULL); /* Current TX/RX rates may not be available if device is disconnected */ g_print ("\tCurrent TX rate: "); if (txrate != QMI_WDS_RATE_UNAVAILABLE) g_print ("%ubps\n", txrate); else g_print ("n/a\n"); g_print ("\tCurrent RX rate: "); if (rxrate != QMI_WDS_RATE_UNAVAILABLE) g_print ("%ubps\n", rxrate); else g_print ("n/a\n"); g_print ("\tMax TX rate: %ubps\n" "\tMax RX rate: %ubps\n", maxtxrate, maxrxrate); qmi_message_wds_get_channel_rates_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_CHANNEL_RATES */ #if defined HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PARAMETERS static void get_lte_attach_parameters_ready (QmiClientWds *client, GAsyncResult *res) { g_autoptr(QmiMessageWdsGetLteAttachParametersOutput) output = NULL; g_autoptr(GError) error = NULL; const gchar *apn; gboolean ota_attach_performed; QmiWdsIpSupportType ip_support_type; output = qmi_client_wds_get_lte_attach_parameters_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_lte_attach_parameters_output_get_result (output, &error)) { g_printerr ("error: couldn't get LTE attach parameters: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("LTE attach parameters successfully retrieved:\n"); if (qmi_message_wds_get_lte_attach_parameters_output_get_apn (output, &apn, NULL)) g_print ("\tAPN: %s\n", apn); if (qmi_message_wds_get_lte_attach_parameters_output_get_ip_support_type (output, &ip_support_type, NULL)) g_print ("\tIP support type: %s\n", qmi_wds_ip_support_type_get_string (ip_support_type)); if (qmi_message_wds_get_lte_attach_parameters_output_get_ota_attach_performed (output, &ota_attach_performed, NULL)) g_print ("\tOTA attach performed: %s\n", ota_attach_performed ? "yes" : "no"); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PARAMETERS */ #if defined HAVE_QMI_MESSAGE_WDS_GET_MAX_LTE_ATTACH_PDN_NUMBER static void get_max_lte_attach_pdn_number_ready (QmiClientWds *client, GAsyncResult *res) { g_autoptr(QmiMessageWdsGetMaxLteAttachPdnNumberOutput) output = NULL; g_autoptr(GError) error = NULL; guint8 maxnum = 0; output = qmi_client_wds_get_max_lte_attach_pdn_number_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_max_lte_attach_pdn_number_output_get_result (output, &error)) { g_printerr ("error: couldn't get maximum number of attach PDN: %s\n", error->message); operation_shutdown (FALSE); return; } qmi_message_wds_get_max_lte_attach_pdn_number_output_get_info (output, &maxnum, NULL); g_print ("Maximum number of LTE attach PDN: %u\n", maxnum); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_MAX_LTE_ATTACH_PDN_NUMBER */ #if defined HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PDN_LIST static void get_lte_attach_pdn_list_ready (QmiClientWds *client, GAsyncResult *res) { g_autoptr(QmiMessageWdsGetLteAttachPdnListOutput) output = NULL; g_autoptr(GError) error = NULL; GArray *current_list = NULL; GArray *pending_list = NULL; guint i; output = qmi_client_wds_get_lte_attach_pdn_list_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_wds_get_lte_attach_pdn_list_output_get_result (output, &error)) { g_printerr ("error: couldn't get the list of LTE attach PDN: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Attach PDN list retrieved:\n"); qmi_message_wds_get_lte_attach_pdn_list_output_get_current_list (output, ¤t_list, NULL); if (!current_list || !current_list->len) { g_print ("\tCurrent list: n/a\n"); } else { g_print ("\tCurrent list: '"); for (i = 0; i < current_list->len; i++) g_print ("%s%u", i > 0 ? ", " : "", g_array_index (current_list, guint16, i)); g_print ("'\n"); } qmi_message_wds_get_lte_attach_pdn_list_output_get_pending_list (output, &pending_list, NULL); if (!pending_list || !pending_list->len) { g_print ("\tPending list: n/a\n"); } else { g_print ("\tPending list: '"); for (i = 0; i < pending_list->len; i++) g_print ("%s%u", i > 0 ? ", " : "", g_array_index (pending_list, guint16, i)); g_print ("'\n"); } operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PDN_LIST */ #if defined HAVE_QMI_MESSAGE_WDS_SET_LTE_ATTACH_PDN_LIST static QmiMessageWdsSetLteAttachPdnListInput * set_lte_attach_pdn_list_input_create (const gchar *str) { g_autoptr(QmiMessageWdsSetLteAttachPdnListInput) input = NULL; g_autoptr(GError) error = NULL; g_auto(GStrv) split = NULL; g_autoptr(GArray) pdn_list = NULL; guint i; pdn_list = g_array_new (FALSE, FALSE, sizeof (guint16)); split = g_strsplit (str, ",", -1); for (i = 0; i < g_strv_length (split); i++) { guint val = 0; guint16 profile_index; gboolean success; g_strstrip (split[i]); success = qmicli_read_uint_from_string (split[i], &val); if (!success || val == 0 || val > G_MAXUINT16) { g_printerr ("error: invalid or out of range profile number [1,%u]: '%s'\n", G_MAXUINT16, split[i]); operation_shutdown (FALSE); return NULL; } profile_index = (guint16) val; g_array_append_val (pdn_list, profile_index); } input = qmi_message_wds_set_lte_attach_pdn_list_input_new (); if (!qmi_message_wds_set_lte_attach_pdn_list_input_set_list (input, pdn_list, &error)) { g_printerr ("error: couldn't set attach PDN list: '%s'\n", error->message); return NULL; } if (!qmi_message_wds_set_lte_attach_pdn_list_input_set_action (input, QMI_WDS_ATTACH_PDN_LIST_ACTION_DETACH_OR_PDN_DISCONNECT, &error)) { g_printerr ("error: couldn't set attach PDN list action: '%s'\n", error->message); return NULL; } return g_steal_pointer (&input); } static void set_lte_attach_pdn_list_ready (QmiClientWds *client, GAsyncResult *res) { g_autoptr(QmiMessageWdsSetLteAttachPdnListOutput) output = NULL; g_autoptr(GError) error = NULL; output = qmi_client_wds_set_lte_attach_pdn_list_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); operation_shutdown (FALSE); return; } if (!qmi_message_wds_set_lte_attach_pdn_list_output_get_result (output, &error)) { g_printerr ("error: couldn't set attach PDN list: %s\n", error->message); operation_shutdown (FALSE); return; } g_print ("Attach PDN list update successfully requested\n"); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WDS_SET_LTE_ATTACH_PDN_LIST */ void qmicli_wds_run (QmiDevice *device, QmiClientWds *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); ctx->network_started_id = 0; ctx->packet_status_timeout_id = 0; #if defined HAVE_QMI_MESSAGE_WDS_START_NETWORK if (start_network_str) { QmiMessageWdsStartNetworkInput *input = NULL; GError *error = NULL; if (!start_network_input_create (start_network_str, &input, &error)) { g_printerr ("error: %s\n", error->message); g_error_free (error); return; } g_debug ("Asynchronously starting network..."); qmi_client_wds_start_network (ctx->client, input, 180, ctx->cancellable, (GAsyncReadyCallback)start_network_ready, NULL); if (input) qmi_message_wds_start_network_input_unref (input); return; } #endif /* HAVE_QMI_MESSAGE_WDS_START_NETWORK */ #if defined HAVE_QMI_MESSAGE_WDS_STOP_NETWORK if (stop_network_str) { gulong packet_data_handle; gboolean disable_autoconnect; if (g_str_equal (stop_network_str, "disable-autoconnect")) { packet_data_handle = 0xFFFFFFFF; disable_autoconnect = TRUE; } else { disable_autoconnect = FALSE; if (g_str_has_prefix (stop_network_str, "0x")) packet_data_handle = strtoul (stop_network_str, NULL, 16); else packet_data_handle = strtoul (stop_network_str, NULL, 10); if (!packet_data_handle || packet_data_handle > G_MAXUINT32) { g_printerr ("error: invalid packet data handle given '%s'\n", stop_network_str); operation_shutdown (FALSE); return; } } g_debug ("Asynchronously stopping network (%lu)...", packet_data_handle); internal_stop_network (ctx->cancellable, (guint32)packet_data_handle, disable_autoconnect); return; } #endif /* HAVE_QMI_MESSAGE_WDS_STOP_NETWORK */ #if defined HAVE_QMI_MESSAGE_WDS_BIND_DATA_PORT if (bind_data_port_str) { g_autoptr(QmiMessageWdsBindDataPortInput) input = NULL; g_debug ("Binding data port..."); input = bind_data_port_input_create (bind_data_port_str); if (!input) { operation_shutdown (FALSE); return; } qmi_client_wds_bind_data_port (client, input, 10, ctx->cancellable, (GAsyncReadyCallback) bind_data_port_ready, NULL); return; } #endif /* HAVE_QMI_MESSAGE_WDS_BIND_MUX_DATA_PORT */ #if defined HAVE_QMI_MESSAGE_WDS_BIND_MUX_DATA_PORT if (bind_mux_str) { QmiMessageWdsBindMuxDataPortInput *input; g_debug ("Binding mux data port.."); input = bind_mux_data_port_input_create (bind_mux_str); qmi_client_wds_bind_mux_data_port (client, input, 10, ctx->cancellable, (GAsyncReadyCallback) bind_mux_data_port_ready, NULL); qmi_message_wds_bind_mux_data_port_input_unref (input); return; } #endif /* HAVE_QMI_MESSAGE_WDS_BIND_MUX_DATA_PORT */ #if defined HAVE_QMI_MESSAGE_WDS_SET_IP_FAMILY if (set_ip_family_str) { QmiMessageWdsSetIpFamilyInput *input; input = qmi_message_wds_set_ip_family_input_new (); switch (atoi (set_ip_family_str)) { case 4: qmi_message_wds_set_ip_family_input_set_preference (input, QMI_WDS_IP_FAMILY_IPV4, NULL); break; case 6: qmi_message_wds_set_ip_family_input_set_preference (input, QMI_WDS_IP_FAMILY_IPV6, NULL); break; default: g_printerr ("error: unknown IP type '%s' (not 4 or 6)\n", set_ip_family_str); operation_shutdown (FALSE); return; } g_debug ("Asynchronously set IP family..."); qmi_client_wds_set_ip_family (client, input, 10, ctx->cancellable, (GAsyncReadyCallback) set_ip_family_ready, NULL); qmi_message_wds_set_ip_family_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_CURRENT_SETTINGS if (get_current_settings_flag) { QmiMessageWdsGetCurrentSettingsInput *input; input = qmi_message_wds_get_current_settings_input_new (); qmi_message_wds_get_current_settings_input_set_requested_settings ( input, (QMI_WDS_REQUESTED_SETTINGS_DNS_ADDRESS | QMI_WDS_REQUESTED_SETTINGS_GRANTED_QOS | QMI_WDS_REQUESTED_SETTINGS_IP_ADDRESS | QMI_WDS_REQUESTED_SETTINGS_GATEWAY_INFO | QMI_WDS_REQUESTED_SETTINGS_MTU | QMI_WDS_REQUESTED_SETTINGS_DOMAIN_NAME_LIST | QMI_WDS_REQUESTED_SETTINGS_IP_FAMILY), NULL); g_debug ("Asynchronously getting current settings..."); qmi_client_wds_get_current_settings (client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_current_settings_ready, NULL); qmi_message_wds_get_current_settings_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_SERVICE_STATUS if (get_packet_service_status_flag) { g_debug ("Asynchronously getting packet service status..."); qmi_client_wds_get_packet_service_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_packet_service_status_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_PACKET_STATISTICS if (get_packet_statistics_flag) { QmiMessageWdsGetPacketStatisticsInput *input; input = qmi_message_wds_get_packet_statistics_input_new (); qmi_message_wds_get_packet_statistics_input_set_mask ( input, (QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_OK | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_OK | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_ERROR | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_ERROR | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_OVERFLOWS | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_OVERFLOWS | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_BYTES_OK | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_BYTES_OK | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_TX_PACKETS_DROPPED | QMI_WDS_PACKET_STATISTICS_MASK_FLAG_RX_PACKETS_DROPPED), NULL); g_debug ("Asynchronously getting packet statistics..."); qmi_client_wds_get_packet_statistics (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_packet_statistics_ready, NULL); qmi_message_wds_get_packet_statistics_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DATA_BEARER_TECHNOLOGY if (get_data_bearer_technology_flag) { g_debug ("Asynchronously getting data bearer technology..."); qmi_client_wds_get_data_bearer_technology (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_data_bearer_technology_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_CURRENT_DATA_BEARER_TECHNOLOGY if (get_current_data_bearer_technology_flag) { g_debug ("Asynchronously getting current data bearer technology..."); qmi_client_wds_get_current_data_bearer_technology (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_current_data_bearer_technology_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GO_DORMANT if (go_dormant_flag) { g_debug ("Asynchronously going dormant..."); qmi_client_wds_go_dormant (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)go_dormant_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GO_ACTIVE if (go_active_flag) { g_debug ("Asynchronously going active..."); qmi_client_wds_go_active (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)go_active_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DORMANCY_STATUS if (get_dormancy_status_flag) { g_debug ("Asynchronously getting dormancy status..."); qmi_client_wds_get_dormancy_status (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_dormancy_status_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_CREATE_PROFILE if (create_profile_str) { QmiMessageWdsCreateProfileInput *input = NULL; GError *error = NULL; if (!create_profile_input_create (create_profile_str, &input, &error)) { g_printerr ("error: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Asynchronously creating new profile..."); qmi_client_wds_create_profile (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)create_profile_ready, NULL); qmi_message_wds_create_profile_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_SWI_CREATE_PROFILE_INDEXED if (swi_create_profile_indexed_str) { QmiMessageWdsSwiCreateProfileIndexedInput *input = NULL; GError *error = NULL; if (!swi_create_profile_indexed_input_create (swi_create_profile_indexed_str, &input, &error)) { g_printerr ("error: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Asynchronously creating new indexed profile..."); qmi_client_wds_swi_create_profile_indexed (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)swi_create_profile_indexed_ready, NULL); qmi_message_wds_swi_create_profile_indexed_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_MODIFY_PROFILE if (modify_profile_str) { QmiMessageWdsModifyProfileInput *input = NULL; GError *error = NULL; if (!modify_profile_input_create (modify_profile_str, &input, &error)) { g_printerr ("error: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Asynchronously modifying profile..."); qmi_client_wds_modify_profile (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)modify_profile_ready, NULL); qmi_message_wds_modify_profile_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_DELETE_PROFILE if (delete_profile_str) { QmiMessageWdsDeleteProfileInput *input; gchar **split; QmiWdsProfileType profile_type; guint profile_index; split = g_strsplit (delete_profile_str, ",", -1); input = qmi_message_wds_delete_profile_input_new (); if (g_strv_length (split) != 2) { g_printerr ("error: expected 2 arguments for delete profile command\n"); operation_shutdown (FALSE); return; } g_strstrip (split[0]); if (g_str_equal (split[0], "3gpp")) profile_type = QMI_WDS_PROFILE_TYPE_3GPP; else if (g_str_equal (split[0], "3gpp2")) profile_type = QMI_WDS_PROFILE_TYPE_3GPP2; else { g_printerr ("error: invalid profile type '%s'. Expected '3gpp' or '3gpp2'.'\n", split[0]); operation_shutdown (FALSE); return; } g_strstrip (split[1]); profile_index = atoi (split[1]); if (profile_index <= 0 || profile_index > G_MAXUINT8) { g_printerr ("error: invalid or out of range profile number [1,%u]: '%s'\n", G_MAXUINT8, split[1]); operation_shutdown (FALSE); return; } qmi_message_wds_delete_profile_input_set_profile_identifier (input, profile_type, (guint8)profile_index, NULL); g_strfreev (split); g_debug ("Asynchronously deleting new profile..."); qmi_client_wds_delete_profile (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)delete_profile_ready, NULL); qmi_message_wds_delete_profile_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_LIST && defined HAVE_QMI_MESSAGE_WDS_GET_PROFILE_SETTINGS if (get_profile_list_str) { QmiMessageWdsGetProfileListInput *input; input = qmi_message_wds_get_profile_list_input_new (); if (g_str_equal (get_profile_list_str, "3gpp")) qmi_message_wds_get_profile_list_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP, NULL); else if (g_str_equal (get_profile_list_str, "3gpp2")) qmi_message_wds_get_profile_list_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP2, NULL); else { g_printerr ("error: invalid profile type '%s'. Expected '3gpp' or '3gpp2'.'\n", get_profile_list_str); operation_shutdown (FALSE); return; } g_debug ("Asynchronously get profile list..."); qmi_client_wds_get_profile_list (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_profile_list_ready, NULL); qmi_message_wds_get_profile_list_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_PROFILE_NUMBER if (get_default_profile_number_str || get_default_profile_num_str) { g_autoptr(QmiMessageWdsGetDefaultProfileNumberInput) input = NULL; QmiWdsProfileType profile_type; const gchar *str; str = get_default_profile_number_str ? get_default_profile_number_str : get_default_profile_num_str; if (g_str_equal (str, "3gpp")) profile_type = QMI_WDS_PROFILE_TYPE_3GPP; else if (g_str_equal (str, "3gpp2")) profile_type = QMI_WDS_PROFILE_TYPE_3GPP2; else { g_printerr ("error: invalid profile type '%s'. Expected '3gpp' or '3gpp2'.'\n", str); operation_shutdown (FALSE); return; } input = qmi_message_wds_get_default_profile_number_input_new (); /* always use profile family 'tethered', we don't really know what it means */ qmi_message_wds_get_default_profile_number_input_set_profile_type (input, profile_type, QMI_WDS_PROFILE_FAMILY_TETHERED, NULL); g_debug ("Asynchronously getting default profile number..."); qmi_client_wds_get_default_profile_number (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_default_profile_number_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_DEFAULT_PROFILE_NUMBER if (set_default_profile_number_str || set_default_profile_num_str) { g_autoptr(QmiMessageWdsSetDefaultProfileNumberInput) input = NULL; input = set_default_profile_number_input_create (set_default_profile_number_str ? set_default_profile_number_str : set_default_profile_num_str); if (!input) { operation_shutdown (FALSE); return; } g_debug ("Asynchronously setting default profile number..."); qmi_client_wds_set_default_profile_number (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_default_profile_number_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_DEFAULT_SETTINGS if (get_default_settings_str) { QmiMessageWdsGetDefaultSettingsInput *input; input = qmi_message_wds_get_default_settings_input_new (); if (g_str_equal (get_default_settings_str, "3gpp")) qmi_message_wds_get_default_settings_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP, NULL); else if (g_str_equal (get_default_settings_str, "3gpp2")) qmi_message_wds_get_default_settings_input_set_profile_type (input, QMI_WDS_PROFILE_TYPE_3GPP2, NULL); else { g_printerr ("error: invalid default type '%s'. Expected '3gpp' or '3gpp2'.'\n", get_default_settings_str); operation_shutdown (FALSE); return; } g_debug ("Asynchronously get default settings..."); qmi_client_wds_get_default_settings (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)get_default_settings_ready, NULL); qmi_message_wds_get_default_settings_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_AUTOCONNECT_SETTINGS if (get_autoconnect_settings_flag) { g_debug ("Asynchronously getting autoconnect settings..."); qmi_client_wds_get_autoconnect_settings (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_autoconnect_settings_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_AUTOCONNECT_SETTINGS if (set_autoconnect_settings_str) { QmiMessageWdsSetAutoconnectSettingsInput *input; input = set_autoconnect_settings_input_create (set_autoconnect_settings_str); if (!input) { operation_shutdown (FALSE); return; } g_debug ("Asynchronously set autoconnect settings..."); qmi_client_wds_set_autoconnect_settings (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_autoconnect_settings_ready, NULL); qmi_message_wds_set_autoconnect_settings_input_unref (input); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_SUPPORTED_MESSAGES if (get_supported_messages_flag) { g_debug ("Asynchronously getting supported WDS messages..."); qmi_client_wds_get_supported_messages (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_supported_messages_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_RESET if (reset_flag) { g_debug ("Asynchronously resetting WDS service..."); qmi_client_wds_reset (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)reset_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_CHANNEL_RATES if (get_channel_rates_flag) { g_debug ("Asynchronously getting channel data rates..."); qmi_client_wds_get_channel_rates (client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_channel_rates_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PARAMETERS if (get_lte_attach_parameters_flag) { g_debug ("Asynchronously getting LTE attach parameters..."); qmi_client_wds_get_lte_attach_parameters (client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_lte_attach_parameters_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_MAX_LTE_ATTACH_PDN_NUMBER if (get_max_lte_attach_pdn_number_flag) { g_debug ("Asynchronously getting max LTE attach PDN number..."); qmi_client_wds_get_max_lte_attach_pdn_number (client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_max_lte_attach_pdn_number_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_GET_LTE_ATTACH_PDN_LIST if (get_lte_attach_pdn_list_flag) { g_debug ("Asynchronously getting LTE Attach PDN list..."); qmi_client_wds_get_lte_attach_pdn_list (client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_lte_attach_pdn_list_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WDS_SET_LTE_ATTACH_PDN_LIST if (set_lte_attach_pdn_list_str) { g_autoptr(QmiMessageWdsSetLteAttachPdnListInput) input = NULL; input = set_lte_attach_pdn_list_input_create (set_lte_attach_pdn_list_str); g_debug ("Asynchronously setting LTE Attach PDN list..."); qmi_client_wds_set_lte_attach_pdn_list (client, input, 10, ctx->cancellable, (GAsyncReadyCallback) set_lte_attach_pdn_list_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_WDS */ libqmi-1.35.2-dev/src/qmicli/qmicli-wms.c000066400000000000000000000434621455567757300201670ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2015-2017 Aleksander Morgado */ #include "config.h" #include #include #include #include #include #include #include #include "qmicli.h" #include "qmicli-helpers.h" #if defined HAVE_QMI_SERVICE_WMS #define VALIDATE_UNKNOWN(str) (str ? str : "unknown") /* Context */ typedef struct { QmiDevice *device; QmiClientWms *client; GCancellable *cancellable; } Context; static Context *ctx; /* Options */ static gboolean get_supported_messages_flag; static gboolean get_routes_flag; static gchar *set_routes_str; static gboolean reset_flag; static gboolean noop_flag; static GOptionEntry entries[] = { #if defined HAVE_QMI_MESSAGE_WMS_GET_SUPPORTED_MESSAGES { "wms-get-supported-messages", 0, 0, G_OPTION_ARG_NONE, &get_supported_messages_flag, "Get supported messages", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WMS_GET_ROUTES { "wms-get-routes", 0, 0, G_OPTION_ARG_NONE, &get_routes_flag, "Get SMS route information", NULL }, #endif #if defined HAVE_QMI_MESSAGE_WMS_SET_ROUTES { "wms-set-routes", 0, 0, G_OPTION_ARG_STRING, &set_routes_str, "Set SMS route information (keys: type, class, storage, receipt-action)", "[\"key=value,...\"]" }, #endif #if defined HAVE_QMI_MESSAGE_WMS_RESET { "wms-reset", 0, 0, G_OPTION_ARG_NONE, &reset_flag, "Reset the service state", NULL }, #endif { "wms-noop", 0, 0, G_OPTION_ARG_NONE, &noop_flag, "Just allocate or release a WMS client. Use with `--client-no-release-cid' and/or `--client-cid'", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; GOptionGroup * qmicli_wms_get_option_group (void) { GOptionGroup *group; group = g_option_group_new ("wms", "WMS options:", "Show Wireless Messaging Service options", NULL, NULL); g_option_group_add_entries (group, entries); return group; } gboolean qmicli_wms_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (get_supported_messages_flag + get_routes_flag + !!set_routes_str + reset_flag + noop_flag); if (n_actions > 1) { g_printerr ("error: too many WMS actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } static void context_free (Context *context) { if (!context) return; if (context->client) g_object_unref (context->client); g_object_unref (context->cancellable); g_object_unref (context->device); g_slice_free (Context, context); } static void operation_shutdown (gboolean operation_status) { /* Cleanup context and finish async operation */ context_free (ctx); qmicli_async_operation_done (operation_status, FALSE); } #if defined HAVE_QMI_MESSAGE_WMS_GET_SUPPORTED_MESSAGES static void get_supported_messages_ready (QmiClientWms *client, GAsyncResult *res) { QmiMessageWmsGetSupportedMessagesOutput *output; GError *error = NULL; GArray *bytearray = NULL; gchar *str; output = qmi_client_wms_get_supported_messages_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wms_get_supported_messages_output_get_result (output, &error)) { g_printerr ("error: couldn't get supported WMS messages: %s\n", error->message); g_error_free (error); qmi_message_wms_get_supported_messages_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully got supported WMS messages:\n", qmi_device_get_path_display (ctx->device)); qmi_message_wms_get_supported_messages_output_get_list (output, &bytearray, NULL); str = qmicli_get_supported_messages_list (bytearray ? (const guint8 *)bytearray->data : NULL, bytearray ? bytearray->len : 0); g_print ("%s", str); g_free (str); qmi_message_wms_get_supported_messages_output_unref (output); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WMS_GET_SUPPORTED_MESSAGES */ #if defined HAVE_QMI_MESSAGE_WMS_GET_ROUTES static void get_routes_ready (QmiClientWms *client, GAsyncResult *res) { g_autoptr(QmiMessageWmsGetRoutesOutput) output = NULL; GError *error = NULL; GArray *route_list; guint i; output = qmi_client_wms_get_routes_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wms_get_routes_output_get_result (output, &error)) { g_printerr ("error: couldn't get SMS routes: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wms_get_routes_output_get_route_list (output, &route_list, &error)) { g_printerr ("error: got invalid SMS routes: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_print ("[%s] Got %u SMS routes:\n", qmi_device_get_path_display (ctx->device), route_list->len); for (i = 0; i < route_list->len; i++) { QmiMessageWmsGetRoutesOutputRouteListElement *route; route = &g_array_index (route_list, QmiMessageWmsGetRoutesOutputRouteListElement, i); g_print (" Route #%u:\n", i + 1); g_print (" Message Type: %s\n", VALIDATE_UNKNOWN (qmi_wms_message_type_get_string (route->message_type))); g_print (" Message Class: %s\n", VALIDATE_UNKNOWN (qmi_wms_message_class_get_string (route->message_class))); g_print (" Storage Type: %s\n", VALIDATE_UNKNOWN (qmi_wms_storage_type_get_string (route->storage))); g_print (" Receipt Action: %s\n", VALIDATE_UNKNOWN (qmi_wms_receipt_action_get_string (route->receipt_action))); } operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WMS_GET_ROUTES */ #if defined HAVE_QMI_MESSAGE_WMS_SET_ROUTES typedef struct { GArray *route_list; gboolean message_type_set; gboolean message_class_set; gboolean storage_set; gboolean receipt_action_set; } SetRoutesContext; static void set_routes_context_init (SetRoutesContext *routes_ctx) { memset (routes_ctx, 0, sizeof(SetRoutesContext)); routes_ctx->route_list = g_array_new (FALSE, TRUE, sizeof (QmiMessageWmsSetRoutesInputRouteListElement)); } static void set_routes_context_destroy (SetRoutesContext *routes_ctx) { g_array_unref (routes_ctx->route_list); } static gboolean set_route_properties_handle (const gchar *key, const gchar *value, GError **error, gpointer user_data) { SetRoutesContext *routes_ctx = user_data; QmiMessageWmsSetRoutesInputRouteListElement *cur_route; gboolean ret = FALSE; if (!value || !value[0]) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "key '%s' required a value", key); return FALSE; } if (!routes_ctx->message_type_set && !routes_ctx->message_class_set && !routes_ctx->storage_set && !routes_ctx->receipt_action_set) { QmiMessageWmsSetRoutesInputRouteListElement new_elt; memset (&new_elt, 0, sizeof (QmiMessageWmsSetRoutesInputRouteListElement)); g_array_append_val (routes_ctx->route_list, new_elt); } cur_route = &g_array_index (routes_ctx->route_list, QmiMessageWmsSetRoutesInputRouteListElement, routes_ctx->route_list->len - 1); if (g_ascii_strcasecmp (key, "type") == 0 && !routes_ctx->message_type_set) { if (!qmicli_read_wms_message_type_from_string (value, &cur_route->message_type)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown message type '%s'", value); return FALSE; } routes_ctx->message_type_set = TRUE; ret = TRUE; } else if (g_ascii_strcasecmp (key, "class") == 0 && !routes_ctx->message_class_set) { if (!qmicli_read_wms_message_class_from_string (value, &cur_route->message_class)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown message class '%s'", value); return FALSE; } routes_ctx->message_class_set = TRUE; ret = TRUE; } else if (g_ascii_strcasecmp (key, "storage") == 0 && !routes_ctx->storage_set) { if (!qmicli_read_wms_storage_type_from_string (value, &cur_route->storage)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown storage type '%s'", value); return FALSE; } routes_ctx->storage_set = TRUE; ret = TRUE; } else if (g_ascii_strcasecmp (key, "receipt-action") == 0 && !routes_ctx->receipt_action_set) { if (!qmicli_read_wms_receipt_action_from_string (value, &cur_route->receipt_action)) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unknown receipt action '%s'", value); return FALSE; } routes_ctx->receipt_action_set = TRUE; ret = TRUE; } if (routes_ctx->message_type_set && routes_ctx->message_class_set && routes_ctx->storage_set && routes_ctx->receipt_action_set) { /* We have a complete set of details for this route. Reset the context state. */ routes_ctx->message_type_set = FALSE; routes_ctx->message_class_set = FALSE; routes_ctx->storage_set = FALSE; routes_ctx->receipt_action_set = FALSE; } if (!ret) { g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "unrecognized or duplicate option '%s'", key); } return ret; } static QmiMessageWmsSetRoutesInput * set_routes_input_create (const gchar *str, GError **error) { g_autoptr(QmiMessageWmsSetRoutesInput) input = NULL; SetRoutesContext routes_ctx; GError *inner_error = NULL; set_routes_context_init (&routes_ctx); if (!qmicli_parse_key_value_string (str, &inner_error, set_route_properties_handle, &routes_ctx)) { g_propagate_prefixed_error (error, inner_error, "couldn't parse input string: "); set_routes_context_destroy (&routes_ctx); return NULL; } if (routes_ctx.route_list->len == 0) { g_set_error_literal (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "route list was empty"); set_routes_context_destroy (&routes_ctx); return NULL; } if (routes_ctx.message_type_set || routes_ctx.message_class_set || routes_ctx.storage_set || routes_ctx.receipt_action_set) { g_set_error_literal (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, "final route was missing one or more options"); set_routes_context_destroy (&routes_ctx); return NULL; } /* Create input */ input = qmi_message_wms_set_routes_input_new (); if (!qmi_message_wms_set_routes_input_set_route_list (input, routes_ctx.route_list, &inner_error)) { g_propagate_error (error, inner_error); set_routes_context_destroy (&routes_ctx); return NULL; } set_routes_context_destroy (&routes_ctx); return g_steal_pointer (&input); } static void set_routes_ready (QmiClientWms *client, GAsyncResult *res) { g_autoptr(QmiMessageWmsSetRoutesOutput) output = NULL; GError *error = NULL; output = qmi_client_wms_set_routes_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wms_set_routes_output_get_result (output, &error)) { g_printerr ("error: couldn't set SMS routes: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully set SMS routes\n", qmi_device_get_path_display (ctx->device)); operation_shutdown (TRUE); } #endif /* HAVE_QMI_MESSAGE_WMS_SET_ROUTES */ #if defined HAVE_QMI_MESSAGE_WMS_RESET static void reset_ready (QmiClientWms *client, GAsyncResult *res) { QmiMessageWmsResetOutput *output; GError *error = NULL; output = qmi_client_wms_reset_finish (client, res, &error); if (!output) { g_printerr ("error: operation failed: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } if (!qmi_message_wms_reset_output_get_result (output, &error)) { g_printerr ("error: couldn't reset the WMS service: %s\n", error->message); g_error_free (error); qmi_message_wms_reset_output_unref (output); operation_shutdown (FALSE); return; } g_print ("[%s] Successfully performed WMS service reset\n", qmi_device_get_path_display (ctx->device)); qmi_message_wms_reset_output_unref (output); operation_shutdown (TRUE); } #endif static gboolean noop_cb (gpointer unused) { operation_shutdown (TRUE); return FALSE; } void qmicli_wms_run (QmiDevice *device, QmiClientWms *client, GCancellable *cancellable) { /* Initialize context */ ctx = g_slice_new (Context); ctx->device = g_object_ref (device); ctx->client = g_object_ref (client); ctx->cancellable = g_object_ref (cancellable); #if defined HAVE_QMI_MESSAGE_WMS_GET_SUPPORTED_MESSAGES if (get_supported_messages_flag) { g_debug ("Asynchronously getting supported WMS messages..."); qmi_client_wms_get_supported_messages (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_supported_messages_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WMS_GET_ROUTES if (get_routes_flag) { g_debug ("Asynchronously getting SMS routes..."); qmi_client_wms_get_routes (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)get_routes_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WMS_SET_ROUTES if (set_routes_str) { g_autoptr(QmiMessageWmsSetRoutesInput) input = NULL; GError *error = NULL; input = set_routes_input_create (set_routes_str, &error); if (!input) { g_printerr ("Failed to set route: %s\n", error->message); g_error_free (error); operation_shutdown (FALSE); return; } g_debug ("Asynchronously setting SMS routes..."); qmi_client_wms_set_routes (ctx->client, input, 10, ctx->cancellable, (GAsyncReadyCallback)set_routes_ready, NULL); return; } #endif #if defined HAVE_QMI_MESSAGE_WMS_RESET if (reset_flag) { g_debug ("Asynchronously resetting WMS service..."); qmi_client_wms_reset (ctx->client, NULL, 10, ctx->cancellable, (GAsyncReadyCallback)reset_ready, NULL); return; } #endif /* Just client allocate/release? */ if (noop_flag) { g_idle_add (noop_cb, NULL); return; } g_warn_if_reached (); } #endif /* HAVE_QMI_SERVICE_WMS */ libqmi-1.35.2-dev/src/qmicli/qmicli.c000066400000000000000000001002001455567757300173430ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2012-2023 Aleksander Morgado * Copyright (c) 2022 Qualcomm Innovation Center, Inc. */ #include "config.h" #include #include #include #include #include #include #include #include #include #if QMI_MBIM_QMUX_SUPPORTED #include #endif #include "qmicli.h" #include "qmicli-helpers.h" #define PROGRAM_NAME "qmicli" #define PROGRAM_VERSION PACKAGE_VERSION /* Globals */ static GMainLoop *loop; static GCancellable *cancellable; static QmiDevice *device; static QmiClient *client; static QmiService service; static gboolean operation_status; static gboolean expect_indications; #if QMI_QRTR_SUPPORTED static QrtrBus *qrtr_bus; #endif /* Main options */ static gchar *device_str; static gboolean get_service_version_info_flag; static gchar *device_set_instance_id_str; static gboolean device_open_version_info_flag; static gboolean device_open_sync_flag; static gchar *device_open_net_str; static gboolean device_open_proxy_flag; #if QMI_MBIM_QMUX_SUPPORTED static gboolean device_open_qmi_flag; static gboolean device_open_mbim_flag; static gboolean device_open_auto_flag; #endif static gchar *client_cid_str; static gboolean client_no_release_cid_flag; static gboolean verbose_flag; static gboolean verbose_full_flag; static gboolean silent_flag; static gboolean version_flag; static GOptionEntry main_entries[] = { { "device", 'd', 0, G_OPTION_ARG_STRING, &device_str, #if QMI_QRTR_SUPPORTED "Specify device path or QRTR URI (e.g. qrtr://0)", "[PATH|URI]" #else "Specify device path", "[PATH]" #endif }, { "get-service-version-info", 0, 0, G_OPTION_ARG_NONE, &get_service_version_info_flag, "Get service version info", NULL }, { "device-set-instance-id", 0, 0, G_OPTION_ARG_STRING, &device_set_instance_id_str, "Set instance ID", "[Instance ID]" }, { "device-open-version-info", 0, 0, G_OPTION_ARG_NONE, &device_open_version_info_flag, "Run version info check when opening device", NULL }, { "device-open-sync", 0, 0, G_OPTION_ARG_NONE, &device_open_sync_flag, "Run sync operation when opening device", NULL }, { "device-open-proxy", 'p', 0, G_OPTION_ARG_NONE, &device_open_proxy_flag, "Request to use the 'qmi-proxy' proxy", NULL }, #if QMI_MBIM_QMUX_SUPPORTED { "device-open-qmi", 0, 0, G_OPTION_ARG_NONE, &device_open_qmi_flag, "Open a cdc-wdm device explicitly in QMI mode", NULL }, { "device-open-mbim", 0, 0, G_OPTION_ARG_NONE, &device_open_mbim_flag, "Open a cdc-wdm device explicitly in MBIM mode", NULL }, { "device-open-auto", 0, 0, G_OPTION_ARG_NONE, &device_open_auto_flag, "Open a cdc-wdm device in either QMI or MBIM mode (default)", NULL }, #endif { "device-open-net", 0, 0, G_OPTION_ARG_STRING, &device_open_net_str, "Open device with specific link protocol and QoS flags", "[net-802-3|net-raw-ip|net-qos-header|net-no-qos-header]" }, { "client-cid", 0, 0, G_OPTION_ARG_STRING, &client_cid_str, "Use the given CID, don't allocate a new one", "[CID]" }, { "client-no-release-cid", 0, 0, G_OPTION_ARG_NONE, &client_no_release_cid_flag, "Do not release the CID when exiting", NULL }, { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose_flag, "Run action with verbose logs, including the debug ones", NULL }, { "verbose-full", 0, 0, G_OPTION_ARG_NONE, &verbose_full_flag, "Run action with verbose logs, including the debug ones and personal info", NULL }, { "silent", 0, 0, G_OPTION_ARG_NONE, &silent_flag, "Run action with no logs; not even the error/warning ones", NULL }, { "version", 'V', 0, G_OPTION_ARG_NONE, &version_flag, "Print version", NULL }, { NULL, 0, 0, 0, NULL, NULL, NULL } }; static gboolean signals_handler (void) { if (cancellable) { /* Ignore consecutive requests of cancellation */ if (!g_cancellable_is_cancelled (cancellable)) { g_printerr ("cancelling the operation...\n"); g_cancellable_cancel (cancellable); /* Re-set the signal handler to allow main loop cancellation on * second signal */ return G_SOURCE_CONTINUE; } } if (loop && g_main_loop_is_running (loop)) { g_printerr ("cancelling the main loop...\n"); g_idle_add ((GSourceFunc) g_main_loop_quit, loop); } return G_SOURCE_REMOVE; } static void log_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { const gchar *log_level_str; time_t now; gchar time_str[64]; struct tm *local_time; gboolean err; /* Nothing to do if we're silent */ if (silent_flag) return; now = time ((time_t *) NULL); local_time = localtime (&now); strftime (time_str, 64, "%d %b %Y, %H:%M:%S", local_time); err = FALSE; switch (log_level) { case G_LOG_LEVEL_WARNING: log_level_str = "-Warning **"; err = TRUE; break; case G_LOG_LEVEL_CRITICAL: case G_LOG_LEVEL_ERROR: log_level_str = "-Error **"; err = TRUE; break; case G_LOG_LEVEL_DEBUG: log_level_str = "[Debug]"; break; case G_LOG_LEVEL_MESSAGE: case G_LOG_LEVEL_INFO: log_level_str = ""; break; case G_LOG_FLAG_FATAL: case G_LOG_LEVEL_MASK: case G_LOG_FLAG_RECURSION: default: g_assert_not_reached (); } if (!verbose_flag && !verbose_full_flag && !err) return; g_fprintf (err ? stderr : stdout, "[%s] %s %s\n", time_str, log_level_str, message); } G_GNUC_NORETURN static void print_version_and_exit (void) { g_print (PROGRAM_NAME " " PROGRAM_VERSION "\n" "Copyright (C) 2012-2023 Aleksander Morgado\n" "License GPLv2+: GNU GPL version 2 or later \n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" "\n"); exit (EXIT_SUCCESS); } static gboolean generic_options_enabled (void) { static guint n_actions = 0; static gboolean checked = FALSE; if (checked) return !!n_actions; n_actions = (!!device_set_instance_id_str + get_service_version_info_flag); if (n_actions > 1) { g_printerr ("error: too many generic actions requested\n"); exit (EXIT_FAILURE); } checked = TRUE; return !!n_actions; } /*****************************************************************************/ /* Report that indications are expected */ void qmicli_expect_indications (void) { expect_indications = TRUE; } /*****************************************************************************/ /* Running asynchronously */ static void close_ready (QmiDevice *dev, GAsyncResult *res) { GError *error = NULL; if (!qmi_device_close_finish (dev, res, &error)) { g_printerr ("error: couldn't close: %s\n", error->message); g_error_free (error); } else g_debug ("Closed"); g_main_loop_quit (loop); } static void release_client_ready (QmiDevice *dev, GAsyncResult *res) { GError *error = NULL; if (!qmi_device_release_client_finish (dev, res, &error)) { g_printerr ("error: couldn't release client: %s\n", error->message); g_error_free (error); } else g_debug ("Client released"); qmi_device_close_async (dev, 10, NULL, (GAsyncReadyCallback) close_ready, NULL); } void qmicli_async_operation_done (gboolean reported_operation_status, gboolean skip_cid_release) { QmiDeviceReleaseClientFlags flags = QMI_DEVICE_RELEASE_CLIENT_FLAGS_NONE; /* Keep the result of the operation */ operation_status = reported_operation_status; /* Cleanup cancellation */ g_clear_object (&cancellable); /* If no client was allocated (e.g. generic action), just quit */ if (!client) { g_main_loop_quit (loop); return; } if (skip_cid_release) g_debug ("Skipped CID release"); else if (!client_no_release_cid_flag) flags |= QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID; else g_print ("[%s] Client ID not released:\n" "\tService: '%s'\n" "\t CID: '%u'\n", qmi_device_get_path_display (device), qmi_service_get_string (service), qmi_client_get_cid (client)); qmi_device_release_client (device, client, flags, 10, NULL, (GAsyncReadyCallback)release_client_ready, NULL); } static void allocate_client_ready (QmiDevice *dev, GAsyncResult *res) { GError *error = NULL; client = qmi_device_allocate_client_finish (dev, res, &error); if (!client) { g_printerr ("error: couldn't create client for the '%s' service: %s\n", qmi_service_get_string (service), error->message); exit (EXIT_FAILURE); } /* Run the service-specific action */ switch (service) { case QMI_SERVICE_DMS: #if defined HAVE_QMI_SERVICE_DMS qmicli_dms_run (dev, QMI_CLIENT_DMS (client), cancellable); return; #else break; #endif case QMI_SERVICE_NAS: #if defined HAVE_QMI_SERVICE_NAS qmicli_nas_run (dev, QMI_CLIENT_NAS (client), cancellable); return; #else break; #endif case QMI_SERVICE_WDS: #if defined HAVE_QMI_SERVICE_WDS qmicli_wds_run (dev, QMI_CLIENT_WDS (client), cancellable); return; #else break; #endif case QMI_SERVICE_PBM: #if defined HAVE_QMI_SERVICE_PBM qmicli_pbm_run (dev, QMI_CLIENT_PBM (client), cancellable); return; #else break; #endif case QMI_SERVICE_PDC: #if defined HAVE_QMI_SERVICE_PDC qmicli_pdc_run (dev, QMI_CLIENT_PDC (client), cancellable); return; #else break; #endif case QMI_SERVICE_UIM: #if defined HAVE_QMI_SERVICE_UIM qmicli_uim_run (dev, QMI_CLIENT_UIM (client), cancellable); return; #else break; #endif case QMI_SERVICE_WMS: #if defined HAVE_QMI_SERVICE_WMS qmicli_wms_run (dev, QMI_CLIENT_WMS (client), cancellable); return; #else break; #endif case QMI_SERVICE_WDA: #if defined HAVE_QMI_SERVICE_WDA qmicli_wda_run (dev, QMI_CLIENT_WDA (client), cancellable); return; #else break; #endif case QMI_SERVICE_VOICE: #if defined HAVE_QMI_SERVICE_VOICE qmicli_voice_run (dev, QMI_CLIENT_VOICE (client), cancellable); return; #else break; #endif case QMI_SERVICE_LOC: #if defined HAVE_QMI_SERVICE_LOC qmicli_loc_run (dev, QMI_CLIENT_LOC (client), cancellable); return; #else break; #endif case QMI_SERVICE_QOS: #if defined HAVE_QMI_SERVICE_QOS qmicli_qos_run (dev, QMI_CLIENT_QOS (client), cancellable); return; #else break; #endif case QMI_SERVICE_GAS: #if defined HAVE_QMI_SERVICE_GAS qmicli_gas_run (dev, QMI_CLIENT_GAS (client), cancellable); return; #else break; #endif case QMI_SERVICE_GMS: #if defined HAVE_QMI_SERVICE_GMS qmicli_gms_run (dev, QMI_CLIENT_GMS (client), cancellable); return; #else break; #endif case QMI_SERVICE_DSD: #if defined HAVE_QMI_SERVICE_DSD qmicli_dsd_run (dev, QMI_CLIENT_DSD (client), cancellable); return; #else break; #endif case QMI_SERVICE_SAR: #if defined HAVE_QMI_SERVICE_SAR qmicli_sar_run (dev, QMI_CLIENT_SAR (client), cancellable); return; #else break; #endif case QMI_SERVICE_DPM: #if defined HAVE_QMI_SERVICE_DPM qmicli_dpm_run (dev, QMI_CLIENT_DPM (client), cancellable); return; #else break; #endif case QMI_SERVICE_FOX: #if defined HAVE_QMI_SERVICE_FOX qmicli_fox_run (dev, QMI_CLIENT_FOX (client), cancellable); return; #else break; #endif case QMI_SERVICE_ATR: #if defined HAVE_QMI_SERVICE_ATR qmicli_atr_run (dev, QMI_CLIENT_ATR (client), cancellable); return; #else break; #endif case QMI_SERVICE_IMSP: #if defined HAVE_QMI_SERVICE_IMSP qmicli_imsp_run (dev, QMI_CLIENT_IMSP (client), cancellable); return; #else break; #endif case QMI_SERVICE_IMSA: #if defined HAVE_QMI_SERVICE_IMSA qmicli_imsa_run (dev, QMI_CLIENT_IMSA (client), cancellable); return; #else break; #endif case QMI_SERVICE_IMS: #if defined HAVE_QMI_SERVICE_IMS qmicli_ims_run (dev, QMI_CLIENT_IMS (client), cancellable); return; #else break; #endif case QMI_SERVICE_UNKNOWN: case QMI_SERVICE_CTL: case QMI_SERVICE_AUTH: case QMI_SERVICE_AT: case QMI_SERVICE_CAT2: case QMI_SERVICE_QCHAT: case QMI_SERVICE_RMTFS: case QMI_SERVICE_TEST: case QMI_SERVICE_ADC: case QMI_SERVICE_CSD: case QMI_SERVICE_MFS: case QMI_SERVICE_TIME: case QMI_SERVICE_TS: case QMI_SERVICE_TMD: case QMI_SERVICE_SAP: case QMI_SERVICE_TSYNC: case QMI_SERVICE_RFSA: case QMI_SERVICE_CSVT: case QMI_SERVICE_QCMAP: case QMI_SERVICE_IMSVT: case QMI_SERVICE_COEX: case QMI_SERVICE_STX: case QMI_SERVICE_BIT: case QMI_SERVICE_IMSRTP: case QMI_SERVICE_RFRPE: case QMI_SERVICE_SSCTL: case QMI_SERVICE_CAT: case QMI_SERVICE_RMS: case QMI_SERVICE_FOTA: case QMI_SERVICE_PDS: case QMI_SERVICE_OMA: case QMI_SERVICE_SSC: default: break; } g_assert_not_reached (); } static void device_allocate_client (QmiDevice *dev) { guint8 cid = QMI_CID_NONE; if (client_cid_str) { guint32 cid32; cid32 = atoi (client_cid_str); if (!cid32 || cid32 > G_MAXUINT8) { g_printerr ("error: invalid CID given '%s'\n", client_cid_str); exit (EXIT_FAILURE); } cid = (guint8)cid32; g_debug ("Reusing CID '%u'", cid); } /* As soon as we get the QmiDevice, create a client for the requested * service */ qmi_device_allocate_client (dev, service, cid, 10, cancellable, (GAsyncReadyCallback)allocate_client_ready, NULL); } static void set_instance_id_ready (QmiDevice *dev, GAsyncResult *res) { GError *error = NULL; guint16 link_id; if (!qmi_device_set_instance_id_finish (dev, res, &link_id, &error)) { g_printerr ("error: couldn't set instance ID: %s\n", error->message); exit (EXIT_FAILURE); } g_print ("[%s] Instance ID set:\n" "\tLink ID: '%" G_GUINT16_FORMAT "'\n", qmi_device_get_path_display (dev), link_id); /* We're done now */ qmicli_async_operation_done (TRUE, FALSE); } static void device_set_instance_id (QmiDevice *dev) { gint instance_id; if (g_str_equal (device_set_instance_id_str, "0")) instance_id = 0; else { instance_id = atoi (device_set_instance_id_str); if (instance_id == 0) { g_printerr ("error: invalid instance ID given: '%s'\n", device_set_instance_id_str); exit (EXIT_FAILURE); } else if (instance_id < 0 || instance_id > G_MAXUINT8) { g_printerr ("error: given instance ID is out of range [0,%u]: '%s'\n", G_MAXUINT8, device_set_instance_id_str); exit (EXIT_FAILURE); } } g_debug ("Setting instance ID '%d'...", instance_id); qmi_device_set_instance_id (dev, (guint8)instance_id, 10, cancellable, (GAsyncReadyCallback)set_instance_id_ready, NULL); } static void get_service_version_info_ready (QmiDevice *dev, GAsyncResult *res) { GError *error = NULL; GArray *services; guint i; services = qmi_device_get_service_version_info_finish (dev, res, &error); if (!services) { g_printerr ("error: couldn't get service version info: %s\n", error->message); exit (EXIT_FAILURE); } g_print ("[%s] Supported versions:\n", qmi_device_get_path_display (dev)); for (i = 0; i < services->len; i++) { QmiDeviceServiceVersionInfo *info; const gchar *service_str; info = &g_array_index (services, QmiDeviceServiceVersionInfo, i); service_str = qmi_service_get_string (info->service); if (service_str) g_print ("\t%s (%u.%u)\n", service_str, info->major_version, info->minor_version); else g_print ("\tunknown [0x%02x] (%u.%u)\n", info->service, info->major_version, info->minor_version); } g_array_unref (services); /* We're done now */ qmicli_async_operation_done (TRUE, FALSE); } static void device_get_service_version_info (QmiDevice *dev) { g_debug ("Getting service version info..."); qmi_device_get_service_version_info (dev, 10, cancellable, (GAsyncReadyCallback)get_service_version_info_ready, NULL); } static void device_open_ready (QmiDevice *dev, GAsyncResult *res) { GError *error = NULL; if (!qmi_device_open_finish (dev, res, &error)) { g_printerr ("error: couldn't open the QmiDevice: %s\n", error->message); exit (EXIT_FAILURE); } g_debug ("QMI Device at '%s' ready", qmi_device_get_path_display (dev)); if (device_set_instance_id_str) device_set_instance_id (dev); else if (get_service_version_info_flag) device_get_service_version_info (dev); else if (qmicli_link_management_options_enabled ()) qmicli_link_management_run (dev, cancellable); else if (qmicli_qmiwwan_options_enabled ()) qmicli_qmiwwan_run (dev, cancellable); else device_allocate_client (dev); } static void device_new_ready (GObject *unused, GAsyncResult *res) { QmiDeviceOpenFlags open_flags = QMI_DEVICE_OPEN_FLAGS_NONE; GError *error = NULL; device = qmi_device_new_finish (res, &error); if (!device) { g_printerr ("error: couldn't create QmiDevice: %s\n", error->message); exit (EXIT_FAILURE); } #if QMI_MBIM_QMUX_SUPPORTED if (device_open_mbim_flag + device_open_qmi_flag + device_open_auto_flag > 1) { g_printerr ("error: cannot specify multiple mode flags to open device\n"); exit (EXIT_FAILURE); } #endif /* Setup device open flags */ if (device_open_version_info_flag) open_flags |= QMI_DEVICE_OPEN_FLAGS_VERSION_INFO; if (device_open_sync_flag) open_flags |= QMI_DEVICE_OPEN_FLAGS_SYNC; if (device_open_proxy_flag) open_flags |= QMI_DEVICE_OPEN_FLAGS_PROXY; #if QMI_MBIM_QMUX_SUPPORTED if (device_open_mbim_flag) open_flags |= QMI_DEVICE_OPEN_FLAGS_MBIM; if (device_open_auto_flag || (!device_open_qmi_flag && !device_open_mbim_flag)) open_flags |= QMI_DEVICE_OPEN_FLAGS_AUTO; #endif if (expect_indications) open_flags |= QMI_DEVICE_OPEN_FLAGS_EXPECT_INDICATIONS; if (device_open_net_str) { if (!qmicli_read_device_open_flags_from_string (device_open_net_str, &open_flags) || !qmicli_validate_device_open_flags (open_flags)) exit (EXIT_FAILURE); } /* Open the device */ qmi_device_open (device, open_flags, 15, cancellable, (GAsyncReadyCallback)device_open_ready, NULL); } #if QMI_QRTR_SUPPORTED static void bus_new_ready (GObject *source, GAsyncResult *res, gpointer user_data) { g_autoptr(GError) error = NULL; guint node_id; QrtrNode *node; node_id = GPOINTER_TO_UINT (user_data); qrtr_bus = qrtr_bus_new_finish (res, &error); if (!qrtr_bus) { g_printerr ("error: couldn't access QRTR bus: %s\n", error->message); exit (EXIT_FAILURE); } node = qrtr_bus_peek_node (qrtr_bus, node_id); if (!node) { g_printerr ("error: node with id %u not found in QRTR bus\n", node_id); exit (EXIT_FAILURE); } qmi_device_new_from_node (node, cancellable, (GAsyncReadyCallback)device_new_ready, NULL); } #endif static gboolean make_device (GFile *file) { g_autofree gchar *id = NULL; id = g_file_get_path (file); if (id) { /* Describes a local device file. */ qmi_device_new (file, cancellable, (GAsyncReadyCallback)device_new_ready, NULL); return TRUE; } #if QMI_QRTR_SUPPORTED { guint32 node_id; id = g_file_get_uri (file); if (qrtr_get_node_for_uri (id, &node_id)) { qrtr_bus_new (1000, /* ms */ cancellable, (GAsyncReadyCallback)bus_new_ready, GUINT_TO_POINTER (node_id)); return TRUE; } g_printerr ("error: URI is neither a local file path nor a QRTR node: %s\n", id); return FALSE; } #else g_printerr ("error: URI is not a local file path: %s\n", id); return FALSE; #endif } /*****************************************************************************/ static void parse_actions (void) { guint actions_enabled = 0; if (generic_options_enabled ()) { service = QMI_SERVICE_CTL; actions_enabled++; } if (qmicli_link_management_options_enabled ()) { service = QMI_SERVICE_UNKNOWN; actions_enabled++; } if (qmicli_qmiwwan_options_enabled ()) { service = QMI_SERVICE_UNKNOWN; actions_enabled++; } #if defined HAVE_QMI_SERVICE_DMS if (qmicli_dms_options_enabled ()) { service = QMI_SERVICE_DMS; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_NAS if (qmicli_nas_options_enabled ()) { service = QMI_SERVICE_NAS; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_WDS if (qmicli_wds_options_enabled ()) { service = QMI_SERVICE_WDS; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_PBM if (qmicli_pbm_options_enabled ()) { service = QMI_SERVICE_PBM; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_PDC if (qmicli_pdc_options_enabled ()) { service = QMI_SERVICE_PDC; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_UIM if (qmicli_uim_options_enabled ()) { service = QMI_SERVICE_UIM; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_SAR if (qmicli_sar_options_enabled ()) { service = QMI_SERVICE_SAR; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_WMS if (qmicli_wms_options_enabled ()) { service = QMI_SERVICE_WMS; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_WDA if (qmicli_wda_options_enabled ()) { service = QMI_SERVICE_WDA; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_VOICE if (qmicli_voice_options_enabled ()) { service = QMI_SERVICE_VOICE; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_LOC if (qmicli_loc_options_enabled ()) { service = QMI_SERVICE_LOC; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_QOS if (qmicli_qos_options_enabled ()) { service = QMI_SERVICE_QOS; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_GAS if (qmicli_gas_options_enabled ()) { service = QMI_SERVICE_GAS; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_GMS if (qmicli_gms_options_enabled ()) { service = QMI_SERVICE_GMS; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_DSD if (qmicli_dsd_options_enabled ()) { service = QMI_SERVICE_DSD; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_DPM if (qmicli_dpm_options_enabled ()) { service = QMI_SERVICE_DPM; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_FOX if (qmicli_fox_options_enabled ()) { service = QMI_SERVICE_FOX; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_ATR if (qmicli_atr_options_enabled ()) { service = QMI_SERVICE_ATR; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_IMSP if (qmicli_imsp_options_enabled ()) { service = QMI_SERVICE_IMSP; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_IMSA if (qmicli_imsa_options_enabled ()) { service = QMI_SERVICE_IMSA; actions_enabled++; } #endif #if defined HAVE_QMI_SERVICE_IMS if (qmicli_ims_options_enabled ()) { service = QMI_SERVICE_IMS; actions_enabled++; } #endif /* Cannot mix actions from different services */ if (actions_enabled > 1) { g_printerr ("error: cannot execute multiple actions of different services\n"); exit (EXIT_FAILURE); } /* No options? */ if (actions_enabled == 0) { g_printerr ("error: no actions specified\n"); exit (EXIT_FAILURE); } /* Go on! */ } int main (int argc, char **argv) { GError *error = NULL; GFile *file; GOptionContext *context; setlocale (LC_ALL, ""); /* Setup option context, process it and destroy it */ context = g_option_context_new ("- Control QMI devices"); #if defined HAVE_QMI_SERVICE_DMS g_option_context_add_group (context, qmicli_dms_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_NAS g_option_context_add_group (context, qmicli_nas_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_WDS g_option_context_add_group (context, qmicli_wds_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_PBM g_option_context_add_group (context, qmicli_pbm_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_PDC g_option_context_add_group (context, qmicli_pdc_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_UIM g_option_context_add_group (context, qmicli_uim_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_SAR g_option_context_add_group (context, qmicli_sar_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_WMS g_option_context_add_group (context, qmicli_wms_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_WDA g_option_context_add_group (context, qmicli_wda_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_VOICE g_option_context_add_group (context, qmicli_voice_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_LOC g_option_context_add_group (context, qmicli_loc_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_QOS g_option_context_add_group (context, qmicli_qos_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_GAS g_option_context_add_group (context, qmicli_gas_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_GMS g_option_context_add_group (context, qmicli_gms_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_DSD g_option_context_add_group (context, qmicli_dsd_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_DPM g_option_context_add_group (context, qmicli_dpm_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_FOX g_option_context_add_group (context, qmicli_fox_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_ATR g_option_context_add_group (context, qmicli_atr_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_IMSP g_option_context_add_group (context, qmicli_imsp_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_IMSA g_option_context_add_group (context, qmicli_imsa_get_option_group ()); #endif #if defined HAVE_QMI_SERVICE_IMS g_option_context_add_group (context, qmicli_ims_get_option_group ()); #endif g_option_context_add_group (context, qmicli_link_management_get_option_group ()); g_option_context_add_group (context, qmicli_qmiwwan_get_option_group ()); g_option_context_add_main_entries (context, main_entries, NULL); if (!g_option_context_parse (context, &argc, &argv, &error)) { g_printerr ("error: %s\n", error->message); exit (EXIT_FAILURE); } g_option_context_free (context); if (version_flag) print_version_and_exit (); g_log_set_handler (NULL, G_LOG_LEVEL_MASK, log_handler, NULL); g_log_set_handler ("Qmi", G_LOG_LEVEL_MASK, log_handler, NULL); if (verbose_flag && verbose_full_flag) { g_printerr ("error: cannot specify --verbose and --verbose-full at the same time\n"); exit (EXIT_FAILURE); } else if (verbose_flag) { qmi_utils_set_traces_enabled (TRUE); qmi_utils_set_show_personal_info (FALSE); } else if (verbose_full_flag) { qmi_utils_set_traces_enabled (TRUE); qmi_utils_set_show_personal_info (TRUE); } #if QMI_MBIM_QMUX_SUPPORTED /* libmbim logging */ g_log_set_handler ("Mbim", G_LOG_LEVEL_MASK, log_handler, NULL); if (verbose_flag) { mbim_utils_set_traces_enabled (TRUE); #if MBIM_CHECK_VERSION(1,27,6) mbim_utils_set_show_personal_info (FALSE); #endif } else if (verbose_full_flag) { mbim_utils_set_traces_enabled (TRUE); #if MBIM_CHECK_VERSION(1,27,6) mbim_utils_set_show_personal_info (TRUE); #endif } #endif #if QMI_QRTR_SUPPORTED /* libqrtr-glib logging */ g_log_set_handler ("Qrtr", G_LOG_LEVEL_MASK, log_handler, NULL); #endif /* No device path given? */ if (!device_str) { g_printerr ("error: no device path specified\n"); exit (EXIT_FAILURE); } /* Build new GFile from the commandline arg */ file = g_file_new_for_commandline_arg (device_str); parse_actions (); /* Create requirements for async options */ cancellable = g_cancellable_new (); loop = g_main_loop_new (NULL, FALSE); /* Setup signals */ g_unix_signal_add (SIGINT, (GSourceFunc) signals_handler, NULL); g_unix_signal_add (SIGHUP, (GSourceFunc) signals_handler, NULL); g_unix_signal_add (SIGTERM, (GSourceFunc) signals_handler, NULL); /* Launch QmiDevice creation */ if (!make_device (file)) return EXIT_FAILURE; g_main_loop_run (loop); if (cancellable) g_object_unref (cancellable); if (client) g_object_unref (client); if (device) g_object_unref (device); g_main_loop_unref (loop); g_object_unref (file); return (operation_status ? EXIT_SUCCESS : EXIT_FAILURE); } libqmi-1.35.2-dev/src/qmicli/qmicli.h000066400000000000000000000213401455567757300173570ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * qmicli -- Command line interface to control QMI devices * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) 2012-2017 Aleksander Morgado */ #include #include #ifndef __QMICLI_H__ #define __QMICLI_H__ /* Common */ void qmicli_async_operation_done (gboolean reported_operation_status, gboolean skip_cid_release); void qmicli_expect_indications (void); /* qmi_wwan specific */ GOptionGroup *qmicli_qmiwwan_get_option_group (void); gboolean qmicli_qmiwwan_options_enabled (void); void qmicli_qmiwwan_run (QmiDevice *device, GCancellable *cancellable); /* link management */ GOptionGroup *qmicli_link_management_get_option_group (void); gboolean qmicli_link_management_options_enabled (void); void qmicli_link_management_run (QmiDevice *device, GCancellable *cancellable); #if defined HAVE_QMI_SERVICE_DMS GOptionGroup *qmicli_dms_get_option_group (void); gboolean qmicli_dms_options_enabled (void); void qmicli_dms_run (QmiDevice *device, QmiClientDms *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_WDS GOptionGroup *qmicli_wds_get_option_group (void); gboolean qmicli_wds_options_enabled (void); void qmicli_wds_run (QmiDevice *device, QmiClientWds *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_NAS GOptionGroup *qmicli_nas_get_option_group (void); gboolean qmicli_nas_options_enabled (void); void qmicli_nas_run (QmiDevice *device, QmiClientNas *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_PBM GOptionGroup *qmicli_pbm_get_option_group (void); gboolean qmicli_pbm_options_enabled (void); void qmicli_pbm_run (QmiDevice *device, QmiClientPbm *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_PDC GOptionGroup *qmicli_pdc_get_option_group (void); gboolean qmicli_pdc_options_enabled (void); void qmicli_pdc_run (QmiDevice *device, QmiClientPdc *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_UIM GOptionGroup *qmicli_uim_get_option_group (void); gboolean qmicli_uim_options_enabled (void); void qmicli_uim_run (QmiDevice *device, QmiClientUim *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_WMS GOptionGroup *qmicli_wms_get_option_group (void); gboolean qmicli_wms_options_enabled (void); void qmicli_wms_run (QmiDevice *device, QmiClientWms *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_WDA GOptionGroup *qmicli_wda_get_option_group (void); gboolean qmicli_wda_options_enabled (void); void qmicli_wda_run (QmiDevice *device, QmiClientWda *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_VOICE GOptionGroup *qmicli_voice_get_option_group (void); gboolean qmicli_voice_options_enabled (void); void qmicli_voice_run (QmiDevice *device, QmiClientVoice *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_LOC GOptionGroup *qmicli_loc_get_option_group (void); gboolean qmicli_loc_options_enabled (void); void qmicli_loc_run (QmiDevice *device, QmiClientLoc *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_QOS GOptionGroup *qmicli_qos_get_option_group (void); gboolean qmicli_qos_options_enabled (void); void qmicli_qos_run (QmiDevice *device, QmiClientQos *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_GAS GOptionGroup *qmicli_gas_get_option_group (void); gboolean qmicli_gas_options_enabled (void); void qmicli_gas_run (QmiDevice *device, QmiClientGas *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_GMS GOptionGroup *qmicli_gms_get_option_group (void); gboolean qmicli_gms_options_enabled (void); void qmicli_gms_run (QmiDevice *device, QmiClientGms *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_DSD GOptionGroup *qmicli_dsd_get_option_group (void); gboolean qmicli_dsd_options_enabled (void); void qmicli_dsd_run (QmiDevice *device, QmiClientDsd *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_SAR GOptionGroup *qmicli_sar_get_option_group (void); gboolean qmicli_sar_options_enabled (void); void qmicli_sar_run (QmiDevice *device, QmiClientSar *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_DPM GOptionGroup *qmicli_dpm_get_option_group (void); gboolean qmicli_dpm_options_enabled (void); void qmicli_dpm_run (QmiDevice *device, QmiClientDpm *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_FOX GOptionGroup *qmicli_fox_get_option_group (void); gboolean qmicli_fox_options_enabled (void); void qmicli_fox_run (QmiDevice *device, QmiClientFox *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_ATR GOptionGroup *qmicli_atr_get_option_group (void); gboolean qmicli_atr_options_enabled (void); void qmicli_atr_run (QmiDevice *device, QmiClientAtr *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_IMSP GOptionGroup *qmicli_imsp_get_option_group (void); gboolean qmicli_imsp_options_enabled (void); void qmicli_imsp_run (QmiDevice *device, QmiClientImsp *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_IMSA GOptionGroup *qmicli_imsa_get_option_group (void); gboolean qmicli_imsa_options_enabled (void); void qmicli_imsa_run (QmiDevice *device, QmiClientImsa *client, GCancellable *cancellable); #endif #if defined HAVE_QMI_SERVICE_IMS GOptionGroup *qmicli_ims_get_option_group (void); gboolean qmicli_ims_options_enabled (void); void qmicli_ims_run (QmiDevice *device, QmiClientIms *client, GCancellable *cancellable); #endif #endif /* __QMICLI_H__ */ libqmi-1.35.2-dev/src/qmicli/test/000077500000000000000000000000001455567757300167075ustar00rootroot00000000000000libqmi-1.35.2-dev/src/qmicli/test/meson.build000066400000000000000000000006531455567757300210550ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez test_unit = 'test-helpers' exe = executable( test_unit, sources: test_unit + '.c', include_directories: top_inc, dependencies: libhelpers_dep, ) test_env += { 'G_TEST_BUILDDIR': meson.current_build_dir(), 'G_TEST_SRCDIR': meson.current_source_dir(), } test( test_unit, exe, env: test_env, ) libqmi-1.35.2-dev/src/qmicli/test/test-helpers.c000066400000000000000000000227041455567757300214770ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * * Copyright (C) 2012-2016 Aleksander Morgado */ #include #include #include "qmicli-helpers.h" /******************************************************************************/ static void test_helpers_raw_printable_1 (void) { GArray *array; gchar *printable; static guint8 buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const gchar *expected = "0F:\n" "50:\n" "EB:\n" "E2:\n" "B6:\n" "00:\n" "00:\n" "00\n"; array = g_array_sized_new (FALSE, FALSE, 1, 8); g_array_insert_vals (array, 0, buffer, 8); printable = qmicli_get_raw_data_printable (array, 3, ""); g_assert_cmpstr (printable, ==, expected); g_free (printable); g_array_unref (array); } static void test_helpers_raw_printable_2 (void) { GArray *array; gchar *printable; static guint8 buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const gchar *expected = "\t0F:50:\n" "\tEB:E2:\n" "\tB6:00:\n" "\t00:00\n"; array = g_array_sized_new (FALSE, FALSE, 1, 8); g_array_insert_vals (array, 0, buffer, 8); /* When passing 7, we'll be really getting 6 (the closest lower multiple of 3) */ printable = qmicli_get_raw_data_printable (array, 7, "\t"); g_assert_cmpstr (printable, ==, expected); g_free (printable); g_array_unref (array); } static void test_helpers_raw_printable_3 (void) { GArray *array; gchar *printable; static guint8 buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const gchar *expected = "\t\t\t0F:50:EB:E2:\n" "\t\t\tB6:00:00:00\n"; array = g_array_sized_new (FALSE, FALSE, 1, 8); g_array_insert_vals (array, 0, buffer, 8); printable = qmicli_get_raw_data_printable (array, 12, "\t\t\t"); g_assert_cmpstr (printable, ==, expected); g_free (printable); g_array_unref (array); } static void test_helpers_raw_printable_4 (void) { GArray *array; gchar *printable; static guint8 buffer[8] = { 0x0F, 0x50, 0xEB, 0xE2, 0xB6, 0x00, 0x00, 0x00 }; static const gchar *expected = "\t0F:50:EB:E2:B6:00:00:00\n"; array = g_array_sized_new (FALSE, FALSE, 1, 8); g_array_insert_vals (array, 0, buffer, 8); printable = qmicli_get_raw_data_printable (array, 24, "\t"); g_assert_cmpstr (printable, ==, expected); g_free (printable); g_array_unref (array); } /******************************************************************************/ static void test_helpers_binary_array_from_string_0 (void) { const guint8 expected[] = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 0xAB, 0xCD, 0xEF }; const gchar *str = "12:34:56:78:9A:BC:DE:F0:ab:cd:ef"; GArray *out = NULL; g_assert (qmicli_read_binary_array_from_string (str, &out)); g_assert (out != NULL); g_assert_cmpmem ((guint8 *)(out->data), out->len, expected, G_N_ELEMENTS (expected)); g_array_unref (out); } static void test_helpers_binary_array_from_string_1 (void) { const guint8 expected[] = { 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xF0, 0xAB, 0xCD, 0xEF }; const gchar *str = "123456789ABCDEF0abcdef"; GArray *out = NULL; g_assert (qmicli_read_binary_array_from_string (str, &out)); g_assert (out != NULL); g_assert_cmpmem ((guint8 *)(out->data), out->len, expected, G_N_ELEMENTS (expected)); g_array_unref (out); } static void test_helpers_binary_array_from_string_2 (void) { const gchar *str = ""; GArray *out = NULL; g_assert (qmicli_read_binary_array_from_string (str, &out)); g_assert (out != NULL); g_assert_cmpuint (out->len, ==, 0); g_array_unref (out); } static void test_helpers_binary_array_from_string_3 (void) { const gchar *str = "hello"; GArray *out = NULL; g_assert (qmicli_read_binary_array_from_string (str, &out) == FALSE); } static void test_helpers_binary_array_from_string_4 (void) { const gchar *str = "a"; GArray *out = NULL; g_assert (qmicli_read_binary_array_from_string (str, &out) == FALSE); } /******************************************************************************/ static void test_helpers_supported_messages_list (void) { const guint8 bytearray[] = { 0x03, 0x00, 0x00, 0xC0 }; const gchar *expected_str = "\t0x0000\n" /* 0 dec */ "\t0x0001\n" /* 1 dec */ "\t0x001E\n" /* 30 dec */ "\t0x001F\n"; /* 31 dec */ gchar *str; str = qmicli_get_supported_messages_list (bytearray, G_N_ELEMENTS (bytearray)); g_assert (str); g_assert_cmpstr (str, ==, expected_str); g_free (str); } static void test_helpers_supported_messages_list_none (void) { const gchar *expected_str = "\tnone\n"; gchar *str; str = qmicli_get_supported_messages_list (NULL, 0); g_assert (str); g_assert_cmpstr (str, ==, expected_str); g_free (str); } /******************************************************************************/ typedef struct { const gchar *key; const gchar *value; gboolean found; } KeyValue; static const KeyValue test_key_values[] = { { "key1", "", FALSE }, { "key2", "value", FALSE }, { "key3", "1234", FALSE }, { "key4", "value1234", FALSE }, }; static gboolean key_value_callback (const gchar *key, const gchar *value, GError **error, gboolean *found) { guint i; for (i = 0; i < G_N_ELEMENTS (test_key_values); i++) { if (!g_str_equal (test_key_values[i].key, key)) continue; if (!g_str_equal (test_key_values[i].value, value)) continue; /* Must not be found multiple times */ g_assert (!found[i]); found[i] = TRUE; return TRUE; } g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Key/value '%s/%s' pair not expected", key, value); return FALSE; } static void common_validate_key_value (const gchar *str) { gboolean found[G_N_ELEMENTS (test_key_values)] = { FALSE }; gboolean result; GError *error = NULL; guint i; result = qmicli_parse_key_value_string (str, &error, (QmiParseKeyValueForeachFn) key_value_callback, &found[0]); g_assert_no_error (error); g_assert (result); for (i = 0; i < G_N_ELEMENTS (test_key_values); i++) g_assert (found[i]); } static void test_parse_key_value_string_no_quotes (void) { common_validate_key_value ("key1=,key2=value,key3=1234,key4=value1234"); } static void test_parse_key_value_string_single_quotes (void) { common_validate_key_value ("key1='',key2='value',key3='1234',key4='value1234'"); } static void test_parse_key_value_string_double_quotes (void) { common_validate_key_value ("key1=\"\",key2=\"value\",key3=\"1234\",key4=\"value1234\""); } static void test_parse_key_value_string_mixed_quotes (void) { common_validate_key_value ("key1=\"\",key2='value',key3=1234,key4=\"value1234\""); } /******************************************************************************/ int main (int argc, char **argv) { g_test_init (&argc, &argv, NULL); g_test_add_func ("/qmicli/helpers/raw-printable/1", test_helpers_raw_printable_1); g_test_add_func ("/qmicli/helpers/raw-printable/2", test_helpers_raw_printable_2); g_test_add_func ("/qmicli/helpers/raw-printable/3", test_helpers_raw_printable_3); g_test_add_func ("/qmicli/helpers/raw-printable/4", test_helpers_raw_printable_4); g_test_add_func ("/qmicli/helpers/binary-array-from-string/0", test_helpers_binary_array_from_string_0); g_test_add_func ("/qmicli/helpers/binary-array-from-string/1", test_helpers_binary_array_from_string_1); g_test_add_func ("/qmicli/helpers/binary-array-from-string/2", test_helpers_binary_array_from_string_2); g_test_add_func ("/qmicli/helpers/binary-array-from-string/3", test_helpers_binary_array_from_string_3); g_test_add_func ("/qmicli/helpers/binary-array-from-string/4", test_helpers_binary_array_from_string_4); g_test_add_func ("/qmicli/helpers/supported-message-list", test_helpers_supported_messages_list); g_test_add_func ("/qmicli/helpers/supported-message-list/none", test_helpers_supported_messages_list_none); g_test_add_func ("/qmicli/helpers/key-value/no-quotes", test_parse_key_value_string_no_quotes); g_test_add_func ("/qmicli/helpers/key-value/single-quotes", test_parse_key_value_string_single_quotes); g_test_add_func ("/qmicli/helpers/key-value/double-quotes", test_parse_key_value_string_double_quotes); g_test_add_func ("/qmicli/helpers/key-value/mixed-quotes", test_parse_key_value_string_mixed_quotes); return g_test_run (); } libqmi-1.35.2-dev/utils/000077500000000000000000000000001455567757300150235ustar00rootroot00000000000000libqmi-1.35.2-dev/utils/meson.build000066400000000000000000000007301455567757300171650ustar00rootroot00000000000000# SPDX-License-Identifier: GPL-2.0-or-later # Copyright (C) 2019 - 2021 Iñigo Martinez cflags = cc.get_supported_arguments([ '-Wno-empty-body', '-Wno-sign-compare', '-Wno-switch-default', ]) executable( 'swi-update', sources: 'swi-update.c', c_args: cflags, ) qmi_network = configure_file( input: 'qmi-network.in', output: '@BASENAME@', configuration: version_conf, install_dir: qmi_bindir, install_mode: 'rwxr-xr-x', ) libqmi-1.35.2-dev/utils/qmi-network.in000077500000000000000000000400571455567757300176410ustar00rootroot00000000000000#!/bin/sh # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, either version 2 of the License, or (at your option) any later # version. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2012-2017 Aleksander Morgado print_usage () { echo "usage: $0 [OPTIONS] [DEVICE] [COMMAND]" } help () { echo "Usage: qmi-network [OPTIONS] [DEVICE] [COMMAND]" echo echo "Simple network management of QMI devices" echo echo "Commands:" echo " start Start network connection" echo " stop Stop network connection" echo " status Query network connection status" echo echo "Options:" echo " --profile=[PATH] Use the profile in the specified path" echo " --help Show help options" echo " --version Show version" echo echo "Notes:" echo echo " 1) [DEVICE] is given as the full path to the cdc-wdm character" echo " device, e.g.:" echo " /dev/cdc-wdm0" echo echo " 2) The qmi-network script requires a profile to work. Unless" echo " explicitly specified with \`--profile', the file is assumed to" echo " be available in the following path:" echo " /etc/qmi-network.conf" echo echo " 3) The APN to use should be configured in the profile, in the" echo " following way (e.g. assuming APN is called 'internet'):" echo " APN=internet" echo echo " 4) Optional APN user/password strings may be given in the following" echo " way:" echo " APN_USER=user" echo " APN_PASS=password" echo echo " 5) Optional IP_TYPE strings may be given in the following" echo " way:" echo " IP_TYPE=[4|6]" echo echo " 6) If you want to instruct the qmi-network script to use the" echo " qmi-proxy setup, you can do so by configuring the following line" echo " in the profile:" echo " PROXY=yes" echo echo " 7) To instruct the qmi-network script to use an already existing" echo " Profile ID, or to create a new one on the fly, use the following" echo " configuration in the profile:" echo " PROFILE=number # to use the profile-id number" echo " PROFILE=auto # to create a temporary profile on the fly" echo echo " 8) Once the qmi-network script reports a successful connection" echo " you still need to run a DHCP client on the associated WWAN network" echo " interface." echo } version () { echo "qmi-network @VERSION@" echo "Copyright (C) 2013-2021 Aleksander Morgado" echo "License GPLv2+: GNU GPL version 2 or later " echo "This is free software: you are free to change and redistribute it." echo "There is NO WARRANTY, to the extent permitted by law." echo } # Basic options if [ $# -lt 2 ]; then if [ "$1" = "--help" ]; then help exit 0 elif [ "$1" = "--version" ]; then version exit 0 fi echo "error: missing arguments" 1>&2 print_usage exit 255 fi # Defaults PROFILE_FILE=/etc/qmi-network.conf # Device + Command with options; options given first while [ $# -gt 2 ]; do OPT="$1" shift case "$OPT" in "--") break 2;; "--profile") if [ $# -gt 2 ]; then PROFILE_FILE="$1" shift else PROFILE_FILE="" fi ;; "--profile="*) PROFILE_FILE="${OPT#*=}";; *) echo >&2 "Invalid option: $OPT" print_usage exit 255;; esac done if [ -z "$PROFILE_FILE" ]; then echo "error: empty profile path given" 1>&2 print_usage exit 255 fi if [ $# -ne 2 ] || [ "$1" = '--*' ] || [ "$2" = '--*' ]; then echo "error: missing arguments" 1>&2 print_usage exit 255 fi DEVICE=$1 COMMAND=$2 STATE_FILE=/tmp/qmi-network-state-`basename $DEVICE` load_profile () { if [ -f "$PROFILE_FILE" ]; then echo "Loading profile at ${PROFILE_FILE}..." . $PROFILE_FILE if [ -n "$APN" ]; then echo " APN: $APN" else echo " APN: unset" fi if [ -n "$APN_USER" ]; then echo " APN user: $APN_USER" else echo " APN user: unset" fi if [ -n "$APN_PASS" ]; then echo " APN password: $APN_PASS" else echo " APN password: unset" fi if [ "$PROXY" = "yes" ]; then echo " qmi-proxy: $PROXY" PROXY_OPT='--device-open-proxy' else echo " qmi-proxy: no" fi if [ -n "$IP_TYPE" ]; then echo " IP_TYPE: $IP_TYPE" else echo " IP_TYPE: unset" fi if [ -n "$PROFILE" ]; then echo " PROFILE: $PROFILE" else echo " PROFILE: unset" fi else echo "Profile at '$PROFILE_FILE' not found..." fi } save_state () { KEY=$1 VAL=$2 echo "Saving state at ${STATE_FILE}... ($KEY: $VAL)" if [ -f "$STATE_FILE" ]; then PREVIOUS=`cat $STATE_FILE` PREVIOUS=`echo "$PREVIOUS" | grep -v $KEY` if [ -n "$PREVIOUS" ]; then echo $PREVIOUS > $STATE_FILE else rm $STATE_FILE fi fi if [ -n "$VAL" ]; then echo "$KEY=\"$VAL\"" >> $STATE_FILE fi } load_state () { if [ -f "$STATE_FILE" ]; then echo "Loading previous state from ${STATE_FILE}..." . $STATE_FILE if [ -n "$CID" ]; then echo " Previous CID: $CID" fi if [ -n "$PDH" ]; then echo " Previous PDH: $PDH" fi fi } clear_state () { echo "Clearing state at ${STATE_FILE}..." rm -f $STATE_FILE } setup_data_format () { RUN_WDA=0 # Read link layer protocol setup in the device DEVICE_DATA_FORMAT_CMD="qmicli -d $DEVICE --wda-get-data-format $PROXY_OPT" echo "Checking data format with '$DEVICE_DATA_FORMAT_CMD'..." if [ -n "$QMIDEBUG" ]; then DEVICE_DATA_FORMAT_OUT="\ [/dev/cdc-wdm1] Successfully got data format QoS flow header: no Link layer protocol: '802-3' Uplink data aggregation protocol: 'disabled' Downlink data aggregation protocol: 'disabled' NDP signature: '0' Uplink data aggregation max size: '0' Downlink data aggregation max size: '0'" else DEVICE_DATA_FORMAT_OUT=`$DEVICE_DATA_FORMAT_CMD` fi DEVICE_LLP=`echo "$DEVICE_DATA_FORMAT_OUT" | sed -n "s/.*Link layer protocol:.*'\(.*\)'.*/\1/p"` if [ -z "$DEVICE_LLP" ]; then echo "Device link layer protocol not retrieved: WDA unsupported" 1>&2 return fi if [ "$DEVICE_LLP" != "802-3" -a "$DEVICE_LLP" != "raw-ip" ]; then echo "Device link layer protocol not retrieved: unexpected value reported: '$DEVICE_LLP'" 1>&2 return fi echo "Device link layer protocol retrieved: $DEVICE_LLP" # Read link layer protocol setup in the kernel EXPECTED_DATA_FORMAT_CMD="qmicli -d $DEVICE --get-expected-data-format" echo "Getting expected data format with '$EXPECTED_DATA_FORMAT_CMD'..." if [ -n "$QMIDEBUG" ]; then EXPECTED_LLP="raw-ip" else EXPECTED_DATA_FORMAT_OUT=`$EXPECTED_DATA_FORMAT_CMD` if [ $? -eq 0 ]; then EXPECTED_LLP=$EXPECTED_DATA_FORMAT_OUT echo "Expected link layer protocol retrieved: $EXPECTED_LLP" else echo "Expected link layer protocol not retrieved: kernel unsupported" 1>&2 EXPECTED_LLP="802-3" # The kernel doesn't support expected data format, so we change the # device data format instead RUN_WDA=1 fi fi if [ "$EXPECTED_LLP" != "802-3" -a "$EXPECTED_LLP" != "raw-ip" ]; then echo "Expected link layer protocol not retrieved: unexpected value reported: '$EXPECTED_LLP'" 1>&2 return fi if [ "$DEVICE_LLP" = "$EXPECTED_LLP" ]; then echo "Device and kernel link layer protocol match: $DEVICE_LLP" return fi if [ $RUN_WDA -eq 1 ]; then DEVICE_DATA_FORMAT_SET_CMD="qmicli -d $DEVICE --wda-set-data-format=$EXPECTED_LLP $PROXY_OPT" echo "Updating device link layer protocol with '$DEVICE_DATA_FORMAT_SET_CMD'..." if [ -n "$QMIDEBUG" ]; then DEVICE_DATA_FORMAT_SET_OUT="\ [/dev/cdc-wdm1] Successfully set data format QoS flow header: no Link layer protocol: '802-3' Uplink data aggregation protocol: 'disabled' Downlink data aggregation protocol: 'disabled' NDP signature: '0' Downlink data aggregation max datagrams: '0' Downlink data aggregation max size: '0'" else DEVICE_DATA_FORMAT_SET_OUT=`$DEVICE_DATA_FORMAT_SET_CMD` fi LLP=`echo "$DEVICE_DATA_FORMAT_SET_OUT" | sed -n "s/.*Link layer protocol:.*'\(.*\)'.*/\1/p"` if [ -z "$LLP" ]; then echo "Error updating Device link layer protocol" 1>&2 else echo "New device link layer protocol retrieved: $LLP" fi else EXPECTED_DATA_FORMAT_SET_CMD="qmicli -d $DEVICE --set-expected-data-format=$DEVICE_LLP" echo "Updating kernel link layer protocol with '$EXPECTED_DATA_FORMAT_SET_CMD'..." EXPECTED_DATA_FORMAT_SET_OUT=`$EXPECTED_DATA_FORMAT_SET_CMD` if [ $? -eq 0 ]; then echo "Kernel link layer protocol updated" else echo "Error updating kernel link layer protocol " 1>&2 fi fi } # qmicli -d /dev/cdc-wdm0 --wds-create-profile --client-no-release-cid create_profile() { if [ -n "$CID" ]; then USE_PREVIOUS_CID="--client-cid=$CID" fi CREATE_PROFILE_ARGS="3gpp" if [ -n "$APN" ]; then CREATE_PROFILE_ARGS="${CREATE_PROFILE_ARGS},apn='$APN'" fi if [ -n "$IP_TYPE" ]; then if [ "$IP_TYPE" -eq 4 ]; then CREATE_PROFILE_ARGS="${CREATE_PROFILE_ARGS},pdp-type='IP'" fi if [ "$IP_TYPE" -eq 6 ]; then CREATE_PROFILE_ARGS="${CREATE_PROFILE_ARGS},pdp-type='IPV6'" fi fi if [ -n "$APN_USER" ]; then CREATE_PROFILE_ARGS="${CREATE_PROFILE_ARGS},username='$APN_USER'" if [ -n "$APN_PASS" ]; then CREATE_PROFILE_ARGS="${CREATE_PROFILE_ARGS},password='$APN_PASS'" fi fi CREATE_PROFILE_CMD="qmicli -d $DEVICE --wds-create-profile=$CREATE_PROFILE_ARGS $USE_PREVIOUS_CID --client-no-release-cid $PROXY_OPT" echo "Creating profile with '$CREATE_PROFILE_CMD'..." CREATE_PROFILE_OUT=`$CREATE_PROFILE_CMD` # Save the profile ID PROFILE_ID=`echo "$CREATE_PROFILE_OUT" | sed -n "s/.*Profile index:\s*'\([0-9]*\)'.*/\1/p"` if [ -z "$PROFILE_ID" ]; then echo "Profile ID creation failed" echo $CREATE_PROFILE_OUT exit 255 fi } delete_profile() { if [ -n "$PROFILE" -a "$PROFILE" = "auto" ]; then if [ -n "$CID" ]; then USE_PREVIOUS_CID="--client-cid=$CID" fi DELETE_PROFILE_CMD="qmicli -d $DEVICE --wds-delete-profile=3gpp,$PROFILE_ID $USE_PREVIOUS_CID --client-no-release-cid $PROXY_OPT" echo "Deleting profile with '$DELETE_PROFILE_CMD'..." $DELETE_PROFILE_CMD fi } # qmicli -d /dev/cdc-wdm0 --wds-start-network --client-no-release-cid # [/dev/cdc-wdm0] Network started # Packet data handle: 3634026241 # [/dev/cdc-wdm0] Client ID not released: # Service: 'wds' # CID: '80' start_network () { if [ -n "$CID" ]; then USE_PREVIOUS_CID="--client-cid=$CID" fi if [ -n "$PDH" ]; then echo "error: cannot re-start network, PDH already exists" 1>&2 exit 3 fi setup_data_format if [ -n "$PROFILE" ]; then if [ "$PROFILE" = "auto" ]; then create_profile else PROFILE_ID="$PROFILE" fi START_NETWORK_ARGS="3gpp-profile=$PROFILE_ID" fi if [ -z "$PROFILE" -a -n "$APN" ]; then START_NETWORK_ARGS="apn='$APN'" if [ -n "$APN_USER" ]; then START_NETWORK_ARGS="${START_NETWORK_ARGS},username='$APN_USER'" if [ -n "$APN_PASS" ]; then START_NETWORK_ARGS="${START_NETWORK_ARGS},password='$APN_PASS'" fi fi if [ -n "$IP_TYPE" ]; then START_NETWORK_ARGS="${START_NETWORK_ARGS},ip-type='$IP_TYPE'" fi fi START_NETWORK_CMD="qmicli -d $DEVICE --wds-start-network=$START_NETWORK_ARGS $USE_PREVIOUS_CID --client-no-release-cid $PROXY_OPT" echo "Starting network with '$START_NETWORK_CMD'..." if [ -n "$QMIDEBUG" ]; then START_NETWORK_OUT="\ [/dev/cdc-wdm0] Network started Packet data handle: '3634026241' [/dev/cdc-wdm0] Client ID not released: Service: 'wds' CID: '80'" else START_NETWORK_OUT=`$START_NETWORK_CMD` fi # Save the new CID if we didn't use any before if [ -z "$CID" ]; then CID=`echo "$START_NETWORK_OUT" | sed -n "s/.*CID.*'\(.*\)'.*/\1/p"` if [ -z "$CID" ]; then echo "error: network start failed, client not allocated" 1>&2 exit 1 else save_state "CID" $CID fi fi PDH=`echo "$START_NETWORK_OUT" | sed -n "s/.*handle.*'\(.*\)'.*/\1/p"` if [ -z "$PDH" ]; then echo "error: network start failed, no packet data handle" 1>&2 # Cleanup the client qmicli -d "$DEVICE" --wds-noop --client-cid="$CID" $PROXY_OPT clear_state exit 2 else save_state "PDH" $PDH fi echo "Network started successfully" if [ "$PROFILE" = "auto" ]; then delete_profile fi } # qmicli -d /dev/cdc-wdm0 --wds-stop-network stop_network () { if [ -z "$CID" ]; then echo "Network already stopped" elif [ -z "$PDH" ]; then echo "Network already stopped; need to cleanup CID $CID" # Cleanup the client qmicli -d "$DEVICE" --wds-noop --client-cid="$CID" $PROXY_OPT else STOP_NETWORK_CMD="qmicli -d $DEVICE --wds-stop-network=$PDH --client-cid=$CID $PROXY_OPT" echo "Stopping network with '$STOP_NETWORK_CMD'..." if [ -n "$QMIDEBUG" ]; then STOP_NETWORK_OUT="\ [/dev/cdc-wdm0] Network stopped " else STOP_NETWORK_OUT=`$STOP_NETWORK_CMD` fi echo "Network stopped successfully" fi clear_state } # qmicli -d /dev/cdc-wdm0 --wds-get-packet-service-status packet_service_status () { if [ -n "$CID" ]; then USE_PREVIOUS_CID="--client-cid=$CID --client-no-release-cid" fi STATUS_CMD="qmicli -d $DEVICE --wds-get-packet-service-status $USE_PREVIOUS_CID $PROXY_OPT" echo "Getting status with '$STATUS_CMD'..." if [ -n "$QMIDEBUG" ]; then STATUS_OUT="\ [/dev/cdc-wdm0] Connection status: 'disconnected' " else STATUS_OUT=`$STATUS_CMD` fi CONN=`echo "$STATUS_OUT" | sed -n "s/.*Connection status:.*'\(.*\)'.*/\1/p"` if [ -z "$CONN" ]; then echo "error: couldn't get packet service status" 1>&2 exit 2 else echo "Status: $CONN" if [ "$CONN" != "connected" ]; then exit 64 fi fi } # Main # Load profile, if any load_profile # Load previous state, if any load_state # Process commands case $COMMAND in "start") start_network ;; "stop") stop_network ;; "status") packet_service_status ;; *) echo "error: unexpected command '$COMMAND'" 1>&2 print_usage exit 255 ;; esac exit 0 libqmi-1.35.2-dev/utils/qmidb/000077500000000000000000000000001455567757300161175ustar00rootroot00000000000000libqmi-1.35.2-dev/utils/qmidb/Entities.py000066400000000000000000000102211455567757300202510ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2011 - 2012 Red Hat, Inc. # import utils class Entity: def __init__(self, line): # Each entity defines a TLV item in a QMI request or response. The # entity's 'struct' field maps to the ID of a struct in Struct.txt, # which describes the fields of that struct. For example: # # 33^"32,16"^"WDS/Start Network Interface Request/Primary DNS"^50021^-1 # # The first field (33) indicates that this entity is valid for the QMI # message eDB2_ET_QMI_WDS_REQ. The "32,16" is a tuple # (eQMI_WDS_START_NET, 16), the first item of which (32) indicates the # general QMI service the entity is associated with (WDS, CTL, NAS, etc) # and the second item indicates the specific entity number (ie, the 'T' # in TLV). # # The 'struct' field (50021) points to: # # Struct.txt:50021^0^0^50118^""^-1^1^"4" # # which indicates that the only member of this struct is field #50118: # # Field.txt:50118^"IP V4 Address"^8^0^2^0 # # which should be pretty self-explanatory. Note that different entities # can point to the same struct. parts = line.split('^') if len(parts) < 4: raise Exception("Invalid entity line '%s'" % line) self.uniqueid = parts[0] + '.' + parts[1].replace('"', '').replace(',', '.') self.type = int(parts[0]) # eDB2EntityType self.key = parts[1].replace('"','') # tuple of (eQMIMessageXXX, entity number) self.cmdno = int(self.key.split(",")[0]) self.tlvno = int(self.key.split(",")[1]) self.name = parts[2].replace('"', '') self.struct = int(parts[3]) self.format = None self.internal = True self.extformat = None if len(parts) > 4: self.format = int(parts[4]) if len(parts) > 5: self.internal = int(parts[5]) != 0 if len(parts) > 6: self.extformat = int(parts[6]) def validate(self, structs): if not structs.has_child(self.struct): raise Exception("Entity missing struct: %d" % self.struct) def emit(self, fields, structs, enums): if self.tlvno == 2 and self.name.find("/Result Code") > 0 and self.struct == 50000: # ignore this entity if it's a standard QMI result code struct return self.struct # Tell the struct this value is for to emit itself s = structs.get_child(self.struct) s.emit_header(self.name, self.cmdno, self.tlvno) s.emit(self.name, 0, 0, fields, structs, enums) return self.struct class Entities(utils.DbFile): def __init__(self, path): self.byid = {} f = file(path + "Entity.txt") for line in f: ent = Entity(line) self.byid[ent.uniqueid] = ent def validate(self, structs): for e in self.byid.values(): e.validate(structs) def emit(self, fields, structs, enums): # emit the standard status TLV struct print "struct qmi_result_code { /* QMI Result Code TLV (0x0002) */" print "\tgobi_qmi_results qmi_result; /* QMI Result */" print "\tgobi_qmi_errors qmi_error; /* QMI Error */" print "};" print "" structs_used = [] for e in self.byid.values(): sused = e.emit(fields, structs, enums) structs_used.append(sused) return structs_used libqmi-1.35.2-dev/utils/qmidb/Enums.py000066400000000000000000000057361455567757300175730ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2011 - 2012 Red Hat, Inc. # import utils class EnumEntry: def __init__(self, line): parts = line.split('^') if len(parts) < 3: raise Exception("Invalid enum entry line '%s'" % line) self.id = int(parts[0]) self.value = int(parts[1], 0) self.name = parts[2].replace('"', '') self.descid = None if len(parts) > 3: self.descid = int(parts[3]) def emit(self, enum_name): print "\tGOBI_%s_%s\t\t= 0x%08x, /* %s */" % ( utils.constname(enum_name), utils.constname(self.name), self.value, self.name) class Enum: def __init__(self, line): parts = line.split('^') if len(parts) < 4: raise Exception("Invalid enum line '%s'" % line) self.id = int(parts[0]) self.name = parts[1].replace('"', '') self.descid = int(parts[2]) self.internal = int(parts[3]) != 0 self.values = [] # list of EnumEntry objects def add_entry(self, entry): for v in self.values: if entry.value == v.value: raise Exception("Enum %d already has value %d" % (self.id, v.value)) self.values.append(entry) self.values.sort(lambda x, y: cmp(x.value, y.value)) def emit(self): print 'typedef enum { /* %s */ ' % self.name for en in self.values: en.emit(self.name) print "} gobi_%s;\n" % utils.nicename(self.name) class Enums(utils.DbFile): def __init__(self, path): self.enums = {} # parse the enums f = file(path + "Enum.txt") for line in f: try: enum = Enum(line.strip()) self.enums[enum.id] = enum except Exception(e): pass f.close() # and now the enum entries f = file(path + "EnumEntry.txt") for line in f: try: entry = EnumEntry(line.strip()) self.enums[entry.id].add_entry(entry) except Exception(e): pass f.close() def emit(self): for e in self.enums: self.enums[e].emit() def get_child(self, eid): return self.enums[eid] libqmi-1.35.2-dev/utils/qmidb/Fields.py000066400000000000000000000136371455567757300177110ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2011 - 2012 Red Hat, Inc. # import utils # eDB2FieldType FIELD_TYPE_STD = 0 # Field is a standard type (see below) FIELD_TYPE_ENUM_UNSIGNED = 1 # Field is an unsigned enumerated type FIELD_TYPE_ENUM_SIGNED = 2 # Field is a signed enumerated type # eDB2StdFieldType FIELD_STD_BOOL = 0 # boolean (0/1, false/true) FIELD_STD_INT8 = 1 # 8-bit signed integer FIELD_STD_UINT8 = 2 # 8-bit unsigned integer FIELD_STD_INT16 = 3 # 16-bit signed integer FIELD_STD_UINT16 = 4 # 16-bit unsigned integer FIELD_STD_INT32 = 5 # 32-bit signed integer FIELD_STD_UINT32 = 6 # 32-bit unsigned integer FIELD_STD_INT64 = 7 # 64-bit signed integer FIELD_STD_UINT64 = 8 # 64-bit unsigned integer FIELD_STD_STRING_A = 9 # ANSI (ASCII?) fixed length string; size in bits FIELD_STD_STRING_U = 10 # UCS-2 fixed length string FIELD_STD_STRING_ANT = 11 # ANSI (ASCII?) NULL terminated string FIELD_STD_STRING_UNT = 12 # UCS-2 NULL terminated string FIELD_STD_FLOAT32 = 13 # 32-bit floating point value FIELD_STD_FLOAT64 = 14 # 64-bit floating point value FIELD_STD_STRING_U8 = 15 # UTF-8 encoded fixed length string FIELD_STD_STRING_U8NT = 16 # UTF-8 encoded NULL terminated string stdtypes = { # Maps field type to [ , , ] FIELD_STD_BOOL: [ 'bool', False, 8 ], FIELD_STD_INT8: [ 'int8', False, 8 ], FIELD_STD_UINT8: [ 'uint8', False, 8 ], FIELD_STD_INT16: [ 'int16', False, 16 ], FIELD_STD_UINT16: [ 'uint16', False, 16 ], FIELD_STD_INT32: [ 'int32', False, 32 ], FIELD_STD_UINT32: [ 'uint32', False, 32 ], FIELD_STD_INT64: [ 'int64', False, 64 ], FIELD_STD_UINT64: [ 'uint64', False, 64 ], FIELD_STD_STRING_A: [ 'char', True, 8 ], FIELD_STD_STRING_U: [ 'uint16', True, 16 ], FIELD_STD_STRING_ANT: [ 'char *', False, 8 ], FIELD_STD_STRING_UNT: [ 'char *', False, 8 ], FIELD_STD_FLOAT32: [ 'float32', False, 32 ], FIELD_STD_FLOAT64: [ 'float64', False, 64 ], } def is_array_type(t): return stdtypes[t][1] class Field: def __init__(self, line): parts = line.split('^') if len(parts) < 6: raise Exception("Invalid field line '%s'" % line) self.id = int(parts[0]) self.name = parts[1].replace('"', '') self.size = int(parts[2]) # in *bits* self.type = int(parts[3]) # eDB2FieldType self.typeval = int(parts[4]) # eDB2StdFieldType if 'type' == 0 self.hex = int(parts[5]) != 0 self.descid = None self.internal = False if len(parts) > 6: self.descid = int(parts[6]) if len(parts) > 7: self.internal = int(parts[7]) # Field.txt:50118^"IP V4 Address"^8^0^2^0 #Field.txt:50118^"IP V4 Address"^8^0^2^0 def get_charsize(self): if self.type == FIELD_TYPE_STD: if self.typeval == FIELD_STD_STRING_A or self.typeval == FIELD_STD_STRING_ANT or \ self.typeval == FIELD_STD_STRING_U or self.typeval == FIELD_STD_STRING_UNT: return stdtypes[self.typeval][2] raise Exception("Called for non-string type") def emit(self, do_print, indent, enums, num_elements, comment, isarray): ctype = '' arraypart = '' sizebits = 0 if self.type == FIELD_TYPE_STD: # eDB2_FIELD_STD tinfo = stdtypes[self.typeval] ctype = tinfo[0] if is_array_type(self.typeval) or num_elements > 0: if num_elements > 0: arraypart = "[%d]" % num_elements sizebits = num_elements * tinfo[2] elif isarray: # array with size given by previous fragment arraypart = "[0]" sizebits = 0 else: arraypart = "[%d]" % (self.size / tinfo[2]) sizebits = self.size * tinfo[2] elif self.type == FIELD_TYPE_ENUM_UNSIGNED or self.type == FIELD_TYPE_ENUM_SIGNED: # It's a enum; find the enum e = enums.get_child(self.typeval) ctype = "gobi_%s" % utils.nicename(e.name) if isarray: if num_elements != 0: raise Exception("Unhandled ENUM field type with size %d" % num_elements) arraypart = "[0]"; sizebits = 0 else: if self.size > 0: # enum size is # of bits arraypart = ":%d" % self.size sizebits = self.size else: sizebits = 32 else: raise ValueError("Unknown Field type") if comment: comment = " (%s)" % comment if do_print: print "%s%s %s%s; /* %s%s */" % ("\t" * indent, ctype, utils.nicename(self.name), arraypart, self.name, comment) return sizebits class Fields: def __init__(self, path): self.byid = {} f = file(path + "Field.txt") for line in f: field = Field(line.strip()) self.byid[field.id] = field def has_child(self, fid): return fid in self.byid def get_child(self, fid): return self.byid[fid] libqmi-1.35.2-dev/utils/qmidb/Structs.py000066400000000000000000000323101455567757300201370ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2011 - 2012 Red Hat, Inc. # import utils # eDB2FragmentType TYPE_FIELD = 0 # Simple field fragment TYPE_STRUCT = 1 # Structure fragment TYPE_CONSTANT_PAD = 2 # Pad fragment, fixed length (bits) TYPE_VARIABLE_PAD_BITS = 3 # Pad fragment, variable (bits) TYPE_VARIABLE_PAD_BYTES = 4 # Pad fragment, variable (bytes) TYPE_FULL_BYTE_PAD = 5 # Pad fragment, pad to a full byte TYPE_MSB_2_LSB = 6 # Switch to MSB -> LSB order TYPE_LSB_2_MSB = 7 # Switch to LSB -> MSB order def is_pad_type(t): if t == TYPE_CONSTANT_PAD or t == TYPE_VARIABLE_PAD_BITS or \ t == TYPE_VARIABLE_PAD_BYTES or t == TYPE_FULL_BYTE_PAD: return True return False # eDB2ModifierType MOD_NONE = 0 # Modifier is not used MOD_CONSTANT_ARRAY = 1 # Constant (elements) array MOD_VARIABLE_ARRAY = 2 # Variable (elements) array (modval gives #elements field) MOD_OBSOLETE_3 = 3 # Constant (bits) array [OBS] MOD_OBSOLETE_4 = 4 # Variable (bits) array [OBS] MOD_OPTIONAL = 5 # Fragment is optional MOD_VARIABLE_ARRAY2 = 6 # Variable (elements) array, start/stop given MOD_VARIABLE_ARRAY3 = 7 # Variable (elements) array, simple expression MOD_VARIABLE_STRING1 = 8 # Variable length string (bit length) MOD_VARIABLE_STRING2 = 9 # Variable length string (byte length) MOD_VARIABLE_STRING3 = 10 # Variable length string (character length) class FragmentBase: # Struct fragments (ie, each line in Struct.txt describe each member of # a struct. The format is as follows: # # id^order^type^fieldid^name^offset^modtype^modval # # 50409^1^0^54024^""^-1^2^"54023" # # This describes the second element (ie, element #1) of struct 50409, # which is of type FIELD (0) and the value is described by Field #54024. # Additionally, it's "modtype" is VARIABLE_ARRAY which is described by # Field #54023. Basically, this fragment is a variable array of # "Medium Preference" values, each element of which is one of the # "QMI PDS Mediums" (Enum.txt, #50407 given by Field.txt #54024). The # number of elements in the array is given by the "modtype" and "modval" # pointers, which say that Field #54023 (which is also the first member # of this struct) specifies the number of elements in this variable array. def __init__(self, line): parts = line.split('^') if len(parts) < 8: raise Exception("Invalid struct fragment '%s'" % line) self.id = int(parts[0]) self.order = int(parts[1]) self.type = int(parts[2]) # eDB2FragmentType self.value = int(parts[3]) # id of field in Fields.txt self.name = parts[4].replace('"', '') self.offset = int(parts[5]) self.modtype = int(parts[6]) # eDB2ModifierType self.modval = parts[7].replace('"', '') #Struct.txt:50021^0^0^50118^""^-1^1^"4" def validate(self, fields, structs): raise Exception("Surprising struct %d:%d field: %d" % (self.id, self.order, self.type)) # Should return size in *bits* of this struct fragment, including all # sub-fragments def emit(self, do_print, entity_name, indent, reserved_bits, fields, structs, enums, cur_structsize): return 0 class Msb2LsbFragment(FragmentBase): # Subclass for TYPE_MSB_2_LSB def validate(self, fields, structs): pass class FieldFragment(FragmentBase): # Subclass for TYPE_FIELD def validate(self, fields, structs): self.field = fields.get_child(self.value) def emit(self, do_print, entity_name, indent, reserved_bits, fields, structs, enums, cur_structsize): # modify the field like cProtocolEntityNav::ProcessFragment() num_elements = 0 comment = "" isarray = False if self.modtype == MOD_CONSTANT_ARRAY: # modval is number of elements num_elements = int(self.modval) elif self.modtype == MOD_VARIABLE_ARRAY or \ self.modtype == MOD_VARIABLE_STRING1 or \ self.modtype == MOD_VARIABLE_STRING2 or \ self.modtype == MOD_VARIABLE_STRING3: # The "modval" is the field id that gives the # of elements # of this variable array. That field is usually the immediately # previous fragment of this struct. ie it's something like: # # struct foobar { # u8 arraylen; <- specified by modval # char array[]; <- current struct fragment # } # fdesc = fields.get_child(int(self.modval)) comment = "size given by %s" % utils.nicename(fdesc.name) isarray = True return self.field.emit(do_print, indent, enums, num_elements, comment, isarray) class StructFragment(FragmentBase): # Subclass for TYPE_STRUCT def validate(self, fields, structs): self.struct = structs.get_child(self.value) def emit(self, do_print, entity_name, indent, reserved_bits, fields, structs, enums, cur_structsize): # embedded structs often won't have a name of their own structname = "a_item" if self.name: structname = "%s_item" % utils.nicename(self.name) bits = self.struct.emit(structname, indent, reserved_bits, fields, structs, enums) # Ignore the condition on some structs' modvals fdesc_id = 0 if len(self.modval) and self.modval.find("=") < 0: fdesc_id = int(self.modval) comment = "" arraybits = "" try: fdesc = fields.get_child(fdesc_id) comment = "\t /* size given by %s */" % utils.nicename(fdesc.name) arraybits = "[0]" except KeyError: pass if do_print: varname = utils.nicename(self.name) if not varname: varname = "item" print "%sstruct %s %s%s;%s" % ("\t" * indent, structname, utils.nicename(self.name), arraybits, comment) return bits class ConstantPadFragment(FragmentBase): # Subclass for TYPE_CONSTANT_PAD def __init__(self, line): FragmentBase.__init__(self, line) # padsize is total struct size (in bits) including this fragment; ie # given the current struct size, pad the struct out to padsize self.padsize = self.value def validate(self, fields, structs): if self.value < 0 or self.value > 1000: raise Exception("Invalid constant pad size %d" % self.value) def emit(self, do_print, entity_name, indent, reserved_bits, fields, structs, enums, cur_structsize): # cur_structsize is in bits if cur_structsize > self.padsize: raise ValueError("Current structure size (%d) is larger than pad size (%d)!") padbits = self.padsize - cur_structsize padtype = "uint8" if padbits > 8 and padbits <= 16: padtype = "uint16" elif padbits > 16 and padbits <= 32: padtype = "uint32" elif padbits > 32 and padbits <= 64: padtype = "uint64" else: raise ValueError("FIXME: handle multi-long padding") if do_print: if padbits in [8, 16, 32]: print "%s%s padding;" % ("\t" * indent, padtype) else: print "%s%s padding:%d;" % ("\t" * indent, padtype, padbits) return padbits class Struct: def __init__(self, sid): self.id = sid self.fragments = [] self.name = "struct_%d" % sid def add_fragment(self, fragment): for f in self.fragments: if fragment.order == f.order: raise Exception("Struct %d already has fragment order %d" % (self.id, fragment.order)) self.fragments.append(fragment) self.fragments.sort(lambda x, y: cmp(x.order, y.order)) def validate(self, fields, structs): for f in self.fragments: f.validate(fields, structs) def emit_header(self, entity_name, cmdno, tlvno): if not entity_name: entity_name = self.name svcname = "Unknown" cmdname = "Unknown" tlvname = "Unknown" else: parts = entity_name.split("/") svcname = parts[0].upper() cmdname = parts[1].upper().replace(" ", "_") tlvname = parts[2] print '/**' print ' * SVC: %s' % svcname print ' * CMD: 0x%04x (%s)' % (cmdno, cmdname) print ' * TLV: 0x%02x (%s)' % (tlvno, tlvname) print ' * ID: %d' % self.id print ' */' def need_union(self, frag_idx): # scan to see if there is any pad fragment in this struct; if there is, # and if there's a struct fragment before the pad fragment, we'll need # to make a union found_struct = False for i in range(frag_idx, len(self.fragments)): if self.fragments[i].type == TYPE_STRUCT: found_struct = True if is_pad_type(self.fragments[i].type): if found_struct: return True break return False def emit(self, entity_name, indent, pad_bits, fields, structs, enums): print '%sstruct %s {' % ("\t" * indent, utils.nicename(entity_name)) # current structure size in *bits* size_in_bits = 0 # if there was a previous member we're supposed to add some padding # for (ie, this struct is in a union and something is before it) do # that now if pad_bits: print '%suint8 padding:%d;' % ("\t" * (indent + 1), pad_bits) size_in_bits += pad_bits union_frag = None reserved_bits = 0 for i in range(0, len(self.fragments)): frag = self.fragments[i] if not union_frag: if self.need_union(i): union_frag = frag indent += 1 print '%sunion u_%s {' % ("\t" * indent, utils.nicename(frag.field.name)) bits = frag.emit(True, entity_name, indent + 1, reserved_bits, fields, structs, enums, size_in_bits) if frag == union_frag: # Track the first union fragment's reserved bits; we'll ignore # them for total struct size since the following struct(s) will # include it's size reserved_bits = bits elif is_pad_type(frag.type): # When we reach the pad fragment, the union terminates so # clear out union-specific state reserved_bits = 0 if union_frag: print '%s};' % ("\t" * indent) indent -= 1 union_frag = None size_in_bits += bits else: size_in_bits += bits print "%s};\n" % ("\t" * indent) return size_in_bits class Structs(utils.DbFile): def __init__(self, path): self.structs = {} f = file(path + "Struct.txt") for line in f: if len(line.strip()) == 0: continue # parse enough of the line to get struct ID and type parts = line.split('^') if len(parts) < 3: raise Exception("Invalid struct fragment '%s'" % line) # make a new struct if we don't know about this one already struct_id = int(parts[0]) try: struct = self.structs[struct_id] except KeyError: struct = Struct(struct_id) self.structs[struct.id] = struct frag_type = int(parts[2]) try: frag_class = { TYPE_FIELD: FieldFragment, TYPE_STRUCT: StructFragment, TYPE_CONSTANT_PAD: ConstantPadFragment, TYPE_MSB_2_LSB: Msb2LsbFragment }[frag_type] except KeyError: # fall back to base class frag_class = FragmentBase frag = frag_class(line.strip()) struct.add_fragment(frag) f.close() def validate(self, fields): for s in self.structs.values(): s.validate(fields, self) def has_child(self, sid): return sid in self.structs def get_child(self, sid): return self.structs[sid] def emit_unused(self, used, fields, enums): print '/**** UNKNOWN TLVs ****/\n' for s in self.structs.values(): if not s.id in used: s.emit_header(None, 0, 0) s.emit(None, 0, fields, self, enums) libqmi-1.35.2-dev/utils/qmidb/qmidb.py000077500000000000000000000026501455567757300175730ustar00rootroot00000000000000#!/usr/bin/env python # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2011 - 2012 Red Hat, Inc. # import sys import Entities import Enums import Fields import Structs if len(sys.argv) > 2: print "Usage: qmidb.py " sys.exit(1) path = "" if len(sys.argv) == 2: path = sys.argv[1] + "/" enums = Enums.Enums(path) entities = Entities.Entities(path) fields = Fields.Fields(path) structs = Structs.Structs(path) structs.validate(fields) entities.validate(structs) print '/* GENERATED CODE. DO NOT EDIT. */' print '\ntypedef uint8 bool;\n' enums.emit() print '\n\n' structs_used = entities.emit(fields, structs, enums) # emit structs that weren't associated with an entity structs.emit_unused(structs_used, fields, enums) libqmi-1.35.2-dev/utils/qmidb/utils.py000066400000000000000000000072111455567757300176320ustar00rootroot00000000000000# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 51 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Copyright (C) 2011 - 2012 Red Hat, Inc. # def constname(name): rlist = { '(': '', ')': '', ' ': '_', '/': '_', '.': '', ',': '' } # Capture stuff like "-9 dB" correctly if name.find("dB") == -1: rlist['-'] = '_' else: rlist['-'] = 'NEG_' sanitized = "" for c in name: try: sanitized += rlist[c] except KeyError: sanitized += c # Handle E_UTRA -> EUTRA and E_UTRAN -> EUTRAN foo = sanitized.upper().strip('_') foo.replace('E_UTRA', 'EUTRA') # And HSDPA+ -> HSDPA_PLUS then strip all plusses foo = foo.replace('HSDPA+', 'HSDPA_PLUS') foo = foo.replace('+', '') # 1xEV-DO -> 1x EVDO foo = foo.replace("1XEV_DO", "1X_EVDO") foo = foo.replace("EV_DO", "EVDO") # Wi-Fi -> WiFi foo = foo.replace("WI_FI", "WIFI") # modify certain words words = foo.split('_') klist = [ 'UNSUPPORTED' ] slist = [ 'STATES', 'REASONS', 'FORMATS', 'SELECTIONS', 'TYPES', 'TAGS', 'PROTOCOLS', 'CLASSES', 'ACTIONS', 'VALUES', 'OPTIONS', 'DOMAINS', 'DEVICES', 'MODES', 'MONTHS', 'PREFERENCES', 'PREFS', 'DURATIONS', 'CAPABILITIES', 'INTERFACES', 'TECHNOLOGIES', 'NETWORKS', 'DAYS', 'SYSTEMS', 'SCHEMES', 'INDICATORS', 'ENCODINGS', 'INITIALS', 'BITS', 'MEDIUMS', 'BASES', 'ERRORS', 'RESULTS', 'RATIOS', 'DELIVERIES', 'FAMILIES', 'SETTINGS', 'SOURCES', 'ORDERS' ] blist = { 'CLASSES': 'CLASS' } final = '' for word in words: if word in klist or len(word) == 0: continue if len(final): final += '_' if word in blist: final += blist[word] elif word in slist: if word.endswith("IES"): final += word[:len(word) - 3] + "Y" elif word.endswith("S"): final += word[:len(word) - 1] else: final += word return final def nicename(name): name = name.lower() name = name.replace("1xev-do", "1x evdo") name = name.replace("ev-do", "evdo") name = name.replace("wi-fi", "wifi") name = name.replace("%", "pct") name = name.replace(' ', '_').replace('/', '_').replace('-', '_').replace('.','').replace('(', '').replace(')', '') name = name.replace("___", "_").replace("__", "_") return name.strip('_') class DbFile: # Base class for objects that handle reading a database file like # Enum.txt or Struct.txt def __init__(self, path): raise Exception("init() method must be implemented") def validate(self): pass def has_child(self, cid): raise Exception("has_child() method must be implemented") def get_child(self, cid): raise Exception("get_child() method must be implemented") def emit(self): pass def emit_unused(self, used, fields, enums): pass libqmi-1.35.2-dev/utils/qmitest.c000066400000000000000000000426431455567757300166660ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and * only version 2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. * * Copyright (C) 2011 - 2012 Red Hat, Inc. * Copyright (C) 2010 - 2012 Google, Inc. */ #include #include #include #include #include #include #include #include #include typedef u_int16_t u16; typedef u_int8_t u8; typedef u_int32_t u32; typedef u_int64_t u64; typedef unsigned int qbool; #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif /***********************************************************/ static void print_buf (const char *detail, const char *buf, size_t len) { int i = 0, z; qbool newline = FALSE, indent = FALSE; char *f; guint flen; f = g_strdup_printf ("%s (%zu) ", detail, len); flen = strlen (f); g_print ("%s", f); for (i = 0; i < len; i++) { if (indent) { z = flen; while (z--) g_print (" "); indent = FALSE; } g_print ("%02x ", buf[i] & 0xFF); if (((i + 1) % 16) == 0) { g_print ("\n"); newline = TRUE; indent = TRUE; } else newline = FALSE; } if (!newline) g_print ("\n"); } /**************************************************************/ typedef enum { QMI_SVC_CTL = 0x00, QMI_SVC_WDS = 0x01, QMI_SVC_DMS = 0x02, QMI_SVC_NAS = 0x03, QMI_SVC_QOS = 0x04, QMI_SVC_WMS = 0x05, QMI_SVC_PDS = 0x06, QMI_SVC_AUTH = 0x07, QMI_SVC_AT = 0x08, QMI_SVC_VOICE = 0x09, QMI_SVC_CAT2 = 0x0A, QMI_SVC_UIM = 0x0B, QMI_SVC_PBM = 0x0C, QMI_SVC_LOC = 0x10, QMI_SVC_SAR = 0x11, QMI_SVC_RMTFS = 0x14, QMI_SVC_CAT = 0xE0, QMI_SVC_RMS = 0xE1, QMI_SVC_OMA = 0xE2 } qmi_service_type; struct qmux { u8 tf; /* always 1 */ u16 len; u8 ctrl; u8 service; u8 qmicid; } __attribute__((__packed__)); struct qmi_tlv_status { u16 status; u16 error; } __attribute__((__packed__)); struct getcid_req { struct qmux header; u8 req; u8 tid; u16 msgid; u16 tlvsize; u8 service; u16 size; u8 qmisvc; } __attribute__((__packed__)); struct releasecid_req { struct qmux header; u8 req; u8 tid; u16 msgid; u16 tlvsize; u8 rlscid; u16 size; u16 cid; } __attribute__((__packed__)); struct version_info_req { struct qmux header; u8 req; u8 tid; u16 msgid; u16 tlvsize; } __attribute__((__packed__)); struct qmi_ctl_version_info_list_service { u8 service_type; /* QMI_SVC_xxx */ u16 major_version; u16 minor_version; } __attribute__((__packed__)); struct qmi_tlv_ctl_version_info_list { u8 count; struct qmi_ctl_version_info_list_service services[0]; }__attribute__((__packed__)); struct seteventreport_req { struct qmux header; u8 req; u16 tid; u16 msgid; u16 tlvsize; u8 reportchanrate; u16 size; u8 period; u32 mask; } __attribute__((__packed__)); struct getpkgsrvcstatus_req { struct qmux header; u8 req; u16 tid; u16 msgid; u16 tlvsize; } __attribute__((__packed__)); struct getmeid_req { struct qmux header; u8 req; u16 tid; u16 msgid; u16 tlvsize; } __attribute__((__packed__)); struct qmiwds_stats { u32 txok; u32 rxok; u32 txerr; u32 rxerr; u32 txofl; u32 rxofl; u64 txbytesok; u64 rxbytesok; qbool linkstate; qbool reconfigure; }; struct nas_signal_req { struct qmux header; u8 req; u16 tid; u16 msgid; u16 tlvsize; } __attribute__((__packed__)); const size_t qmux_size = sizeof(struct qmux); static void qmux_fill(struct qmux *qmux, u8 service, u16 cid, u16 size) { qmux->tf = 1; qmux->len = size - 1; qmux->ctrl = 0; qmux->service = cid & 0xff; qmux->qmicid = cid >> 8; } static void * qmictl_new_getcid(u8 tid, u8 svctype, size_t *size) { struct getcid_req *req; req = g_malloc0 (sizeof (*req)); req->req = 0x00; req->tid = tid; req->msgid = 0x0022; req->tlvsize = 0x0004; req->service = 0x01; req->size = 0x0001; req->qmisvc = svctype; *size = sizeof(*req); qmux_fill (&req->header, QMI_SVC_CTL, 0, *size); return req; } static void * qmictl_new_releasecid(u8 tid, u16 cid, size_t *size) { struct releasecid_req *req; req = g_malloc0 (sizeof (*req)); req->req = 0x00; req->tid = tid; req->msgid = 0x0023; req->tlvsize = 0x05; req->rlscid = 0x01; req->size = 0x0002; req->cid = cid; *size = sizeof(*req); qmux_fill (&req->header, QMI_SVC_CTL, 0, *size); return req; } static void * qmictl_new_version_info(u8 tid, size_t *size) { struct version_info_req *req; req = g_malloc0 (sizeof (*req)); req->req = 0x00; req->tid = tid; req->msgid = 0x21; req->tlvsize = 0; *size = sizeof(*req); qmux_fill (&req->header, QMI_SVC_CTL, 0, *size); return req; } static void * qmiwds_new_seteventreport(u8 tid, size_t *size) { struct seteventreport_req *req; req = g_malloc0 (sizeof (*req)); req->req = 0x00; req->tid = tid; req->msgid = 0x0001; req->tlvsize = 0x0008; req->reportchanrate = 0x11; req->size = 0x0005; req->period = 0x01; req->mask = 0x000000ff; *size = sizeof(*req); return req; } static void * qmiwds_new_getpkgsrvcstatus(u8 tid, size_t *size) { struct getpkgsrvcstatus_req *req; req = g_malloc0 (sizeof (*req)); req->req = 0x00; req->tid = tid; req->msgid = 0x22; req->tlvsize = 0x0000; *size = sizeof(*req); return req; } static void * qmidms_new_getmeid(u16 cid, u8 tid, size_t *size) { struct getmeid_req *req; req = g_malloc0 (sizeof (*req)); req->req = 0x00; req->tid = tid; req->msgid = 0x25; req->tlvsize = 0x0000; *size = sizeof(*req); qmux_fill (&req->header, QMI_SVC_WDS, cid, *size); return req; } static int qmux_parse(u16 *cid, void *buf, size_t size) { struct qmux *qmux = buf; if (!buf || size < 12) return -ENOMEM; if (qmux->tf != 1 || qmux->len != size - 1 || qmux->ctrl != 0x80) return -EINVAL; *cid = (qmux->qmicid << 8) + qmux->service; return sizeof(*qmux); } static u16 tlv_get(void *msg, u16 msgsize, u8 type, void *buf, u16 bufsize) { u16 pos; u16 msize = 0; if (!msg || !buf) return -ENOMEM; for (pos = 4; pos + 3 < msgsize; pos += msize + 3) { msize = *(u16 *)(msg + pos + 1); if (*(u8 *)(msg + pos) == type) { if (bufsize < msize) return -ENOMEM; memcpy(buf, msg + pos + 3, msize); return msize; } } return -ENOMSG; } static int qmi_msgisvalid(void *msg, u16 size) { struct qmi_tlv_status status; if (tlv_get(msg, size, 2, &status, sizeof (status)) == sizeof (status)) { if (le16toh (status.status != 0)) return le16toh (status.error); else return 0; } return -ENOMSG; } static int qmi_msgid(void *msg, u16 size) { return size < 2 ? -ENODATA : *(u16 *)msg; } static int qmictl_version_info_resp(void *buf, u16 size) { int result, i; u8 offset = sizeof(struct qmux) + 2; u8 svcbuf[100]; struct qmi_tlv_ctl_version_info_list *service_list; struct qmi_ctl_version_info_list_service *svc; if (!buf || size < offset) return -ENOMEM; buf = buf + offset; size -= offset; result = qmi_msgid(buf, size); if (result != 0x21) return -EFAULT; result = qmi_msgisvalid(buf, size); if (result != 0) return -EFAULT; /* Get the services TLV */ result = tlv_get(buf, size, 0x01, svcbuf, sizeof (svcbuf)); if (result < 0) return -EFAULT; service_list = (struct qmi_tlv_ctl_version_info_list *) svcbuf; if (result < (service_list->count * sizeof (struct qmi_ctl_version_info_list_service))) return -EFAULT; svc = &(service_list->services[0]); for (i = 0; i < service_list->count; i++, svc++) { g_message ("SVC: %d v%d.%d", svc->service_type, le16toh (svc->major_version), le16toh (svc->minor_version)); } return 0; } static int qmictl_getcid_resp(void *buf, u16 size, u16 *cid) { int result; u8 offset = sizeof(struct qmux) + 2; if (!buf || size < offset) return -ENOMEM; buf = buf + offset; size -= offset; result = qmi_msgid(buf, size); if (result != 0x22) return -EFAULT; result = qmi_msgisvalid(buf, size); if (result != 0) return -EFAULT; result = tlv_get(buf, size, 0x01, cid, 2); if (result != 2) return -EFAULT; return 0; } static int qmictl_releasecid_resp(void *buf, u16 size) { int result; u8 offset = sizeof(struct qmux) + 2; if (!buf || size < offset) return -ENOMEM; buf = buf + offset; size -= offset; result = qmi_msgid(buf, size); if (result != 0x23) return -EFAULT; result = qmi_msgisvalid(buf, size); if (result != 0) return -EFAULT; return 0; } static int qmiwds_event_resp(void *buf, u16 size, struct qmiwds_stats *stats) { int result; u8 status[2]; u8 offset = sizeof(struct qmux) + 3; if (!buf || size < offset || !stats) return -ENOMEM; buf = buf + offset; size -= offset; result = qmi_msgid(buf, size); if (result == 0x01) { tlv_get(buf, size, 0x10, &stats->txok, 4); tlv_get(buf, size, 0x11, &stats->rxok, 4); tlv_get(buf, size, 0x12, &stats->txerr, 4); tlv_get(buf, size, 0x13, &stats->rxerr, 4); tlv_get(buf, size, 0x14, &stats->txofl, 4); tlv_get(buf, size, 0x15, &stats->rxofl, 4); tlv_get(buf, size, 0x19, &stats->txbytesok, 8); tlv_get(buf, size, 0x1A, &stats->rxbytesok, 8); } else if (result == 0x22) { result = tlv_get(buf, size, 0x01, &status[0], 2); if (result >= 1) stats->linkstate = status[0] == 0x02; if (result == 2) stats->reconfigure = status[1] == 0x01; if (result < 0) return result; } else { return -EFAULT; } return 0; } static int qmidms_meid_resp(void *buf, u16 size, char *meid, int meidsize) { int result; u8 offset = sizeof(struct qmux) + 3; if (!buf || size < offset || meidsize < 14) return -ENOMEM; buf = buf + offset; size -= offset; result = qmi_msgid(buf, size); if (result != 0x25) return -EFAULT; result = qmi_msgisvalid(buf, size); if (result) return -EFAULT; result = tlv_get(buf, size, 0x12, meid, 14); if (result != 14) return -EFAULT; return 0; } static void * qminas_new_signal(u16 cid, u8 tid, size_t *size) { struct nas_signal_req *req; req = g_malloc0 (sizeof (*req)); req->req = 0x00; req->tid = tid; req->msgid = 0x20; req->tlvsize = 0x0000; *size = sizeof(*req); qmux_fill (&req->header, QMI_SVC_NAS, cid, *size); return req; } /* NAS/Get Signal Strength TLV 0x01 */ struct qminas_resp_signalstrength { u8 dbm; u8 act; } __attribute__((__packed__)); static int qminas_signal_resp(void *buf, u16 size, u8 *dbm, u8 *act) { int result; struct qminas_resp_signalstrength signal; u8 offset = sizeof(struct qmux) + 3; if (!buf || size < offset) return -ENOMEM; buf = buf + offset; size -= offset; result = qmi_msgid(buf, size); if (result != 0x20) return -EFAULT; result = qmi_msgisvalid(buf, size); if (result) return -EFAULT; result = tlv_get(buf, size, 0x01, &signal, sizeof (signal)); if (result != sizeof (signal)) return -EFAULT; *dbm = signal.dbm; *act = signal.act; return 0; } /*****************************************************/ static size_t send_and_wait_reply (int fd, void *b, size_t blen, char *reply, size_t rlen) { ssize_t num; fd_set in; int result; struct timeval timeout = { 1, 0 }; print_buf (">>>", b, blen); num = write (fd, b, blen); if (num != blen) { g_warning ("Failed to write: wrote %zd err %d", num, errno); return 0; } FD_ZERO (&in); FD_SET (fd, &in); result = select (fd + 1, &in, NULL, NULL, &timeout); if (result != 1 || !FD_ISSET (fd, &in)) { g_warning ("No data pending"); return 0; } errno = 0; num = read (fd, reply, rlen); if (num < 0) { g_warning ("read error %d", errno); return 0; } print_buf ("<<<", reply, num); return num; } /* CTL service transaction ID */ static u8 ctl_tid = 1; static int get_meid (int fd) { void *b; size_t blen; u8 dms_tid = 1; u16 dms_cid = 0; char reply[2048]; size_t rlen; char meid[16]; int err; /* Allocate a DMS client ID */ b = qmictl_new_getcid (ctl_tid++, QMI_SVC_DMS, &blen); g_assert (b); rlen = send_and_wait_reply (fd, b, blen, reply, sizeof (reply)); g_free (b); if (rlen <= 0) return 1; err = qmictl_getcid_resp (reply, rlen, &dms_cid); if (err < 0) { g_warning ("Failed to get DMS client ID: %d", err); return 1; } g_message ("DMS CID %d 0x%X", dms_cid, dms_cid); /* Get the MEID */ b = qmidms_new_getmeid(dms_cid, dms_tid++, &blen); g_assert (b); rlen = send_and_wait_reply (fd, b, blen, reply, sizeof (reply)); g_free (b); if (rlen <= 0) return 1; memset (meid, 0, sizeof (meid)); err = qmidms_meid_resp (reply, rlen, meid, sizeof (meid) - 1); if (err < 0) g_warning ("Failed to get MEID: %d", err); else g_message ("MEID: %s", meid); /* Relese the DMS client ID */ b = qmictl_new_releasecid (ctl_tid++, dms_cid, &blen); g_assert (b); rlen = send_and_wait_reply (fd, b, blen, reply, sizeof (reply)); g_free (b); if (rlen <= 0) return 1; err = qmictl_releasecid_resp (reply, rlen); if (err < 0) { g_warning ("Failed to release DMS client ID: %d", err); return 1; } return 0; } static const char * act_to_string (u8 act) { switch (act) { case 0: return "no service"; case 1: return "CDMA2000 1x"; case 2: return "CDMA2000 HRPD/EVDO"; case 3: return "AMPS"; case 4: return "GSM"; case 5: return "UMTS"; case 8: return "LTE"; default: break; } return "unknown"; } static int get_signal (int fd) { void *b; size_t blen; u8 nas_tid = 1; u16 nas_cid = 0; char reply[2048]; size_t rlen; int err; u8 dbm = 0, act = 0; /* Allocate a NAS client ID */ b = qmictl_new_getcid (ctl_tid++, QMI_SVC_NAS, &blen); g_assert (b); rlen = send_and_wait_reply (fd, b, blen, reply, sizeof (reply)); g_free (b); if (rlen <= 0) return 1; err = qmictl_getcid_resp (reply, rlen, &nas_cid); if (err < 0) { g_warning ("Failed to get NAS client ID: %d", err); return 1; } g_message ("NAS CID %d 0x%X", nas_cid, nas_cid); /* Get the signal strength */ b = qminas_new_signal(nas_cid, nas_tid++, &blen); g_assert (b); rlen = send_and_wait_reply (fd, b, blen, reply, sizeof (reply)); g_free (b); if (rlen <= 0) return 1; err = qminas_signal_resp (reply, rlen, &dbm, &act); if (err < 0) g_warning ("Failed to get signal: %d", err); else { g_message ("dBm: -%d", 0x100 - (dbm & 0xFF)); g_message ("AcT: %s", act_to_string (act)); } /* Relese the NAS client ID */ b = qmictl_new_releasecid (ctl_tid++, nas_cid, &blen); g_assert (b); rlen = send_and_wait_reply (fd, b, blen, reply, sizeof (reply)); g_free (b); if (rlen <= 0) return 1; err = qmictl_releasecid_resp (reply, rlen); if (err < 0) { g_warning ("Failed to release NAS client ID: %d", err); return 1; } return 0; } int main(int argc, char *argv[]) { int fd; void *b; size_t blen; u8 ctl_tid = 1; char reply[2048]; size_t rlen; int err; if (argc != 2) { g_warning ("usage: %s ", argv[0]); return 1; } errno = 0; fd = open (argv[1], O_RDWR | O_EXCL | O_NONBLOCK | O_NOCTTY); if (fd < 0) { g_warning ("%s: open failed: %d", argv[1], errno); return 1; } /* Send the ready request */ b = qmictl_new_version_info (ctl_tid++, &blen); g_assert (b); rlen = send_and_wait_reply (fd, b, blen, reply, sizeof (reply)); g_free (b); if (rlen <= 0) goto out; err = qmictl_version_info_resp (reply, rlen); if (err < 0) { g_warning ("Failed to get version info: %d", err); goto out; } get_meid (fd); get_signal (fd); out: close (fd); return 0; } libqmi-1.35.2-dev/utils/swi-update.c000066400000000000000000000725061455567757300172630ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * swi-update -- Command line tool to update QMI firmware * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * * Copyright (C) Copyright 2016 Bjørn Mork * * crc16 and hdlc parts: * Copyright (C) 2010 Red Hat, Inc. * * parts of this is based on gobi-loader, which is * * "Copyright 2009 Red Hat - heavily based on work done by * Alexander Shumakovitch * * Gobi 2000 support provided by Anssi Hannula " */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* FIXME: endianness - this works on LE for now... */ #ifndef VERSION #define VERSION "unknown" #endif #define DESCRIPTION "swi-update (" VERSION ")" #ifdef DEBUG static bool debug; #define debug(arg...) if (debug) fprintf(stderr, arg) static void print_packet(const char *pfx, void *buf, int len) { int i; unsigned char *p = buf; if (!debug) return; fprintf(stderr, "%s: ", pfx); for (i=0; i "amss.mbn" * 0x06 => "apps.mbn" * 0x0d => "uqcn.mbn" (Gobi 2000 only) * with no file header data * * The 0x80 type is snooped from the Sierra Wireless firmware * uploaders, using 400 bytes file header data */ enum qdl_type { QDL_IMAGE_AMSS_MODEM = 0x05, // 05 AMSS modem image QDL_IMAGE_AMSS_APPLICATION, // 06 AMSS application image QDL_IMAGE_AMSS_UQCN = 0x0d, // 13 Provisioning information QDL_IMAGE_DBL = 0x0f, // 15 DBL image QDL_IMAGE_OSBL, // 16 OSBL image QDL_IMAGE_CWE = 0x80, // 128 CWE image }; static const char *qdl_type2str(__u8 type) { switch (type) { case QDL_IMAGE_AMSS_MODEM: return "AMSS_MODEM"; case QDL_IMAGE_AMSS_APPLICATION: return "AMSS_APPLICATION"; case QDL_IMAGE_AMSS_UQCN: return "AMSS_UQCN"; case QDL_IMAGE_DBL: return "DBL"; case QDL_IMAGE_OSBL: return "OSBL"; case QDL_IMAGE_CWE: return "CWE"; default: return "UNKNOWN"; } } /* feature bits */ #define QDL_FEATURE_GENERIC_UNFRAMED 0x10 #define QDL_FEATURE_QDL_UNFRAMED 0x20 #define QDL_FEATURE_BAR_MODE 0x40 struct qdl_hello_req { __u8 cmd; /* 0x01 */ char magic[32]; __u8 maxver; __u8 minver; __u8 features; } __attribute__ ((packed)); static struct qdl_hello_req qdl_hello_req = { .cmd = QDL_CMD_HELLO_REQ, .magic = { 'Q', 'C', 'O', 'M', ' ', 'h', 'i', 'g', 'h', ' ', 's', 'p', 'e', 'e', 'd', ' ', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'h', 's', 't', }, .maxver = 0, .minver = 0, .features = QDL_FEATURE_QDL_UNFRAMED | QDL_FEATURE_GENERIC_UNFRAMED, }; struct qdl_hello_rsp { __u8 cmd; /* 0x02 */ char magic[32]; __u8 maxver; __u8 minver; __u32 reserved1; __u32 reserved2; __u8 reserved3; __u16 reserved4; __u16 reserved5; __u8 features; } __attribute__ ((packed)); struct qdl_err_rsp { __u8 cmd; /* 0x0d */ __u32 error; __u8 errortxt; } __attribute__ ((packed)); struct qdl_ufopen_req { __u8 cmd; /* 0x25 */ __u8 type; __u32 length; __u8 windowsize; __u32 chunksize; __u16 reserved; /* The first 400 bytes of the image is appended to the "open * unframed" request on Sierra Wireless modems. This chunk is * not included here as it is not a part of the request. * * The file header inclusion here seems to depend on the file * type */ } __attribute__ ((packed)); struct qdl_ufopen_rsp { __u8 cmd; /* 0x26 */ __u16 status; __u8 windowsize; __u32 chunksize; } __attribute__ ((packed)); /* This request is not HDLC framed, so this "header" includes the crc */ struct qdl_ufwrite_req { __u8 cmd; /* 0x27 */ __u16 sequence; __u32 reserved; __u32 chunksize; __u16 crc; } __attribute__ ((packed)); /* the buffer most hold a file chunk + this header */ #define BUFSIZE (CHUNK + sizeof(struct qdl_ufwrite_req)) /* The response is HDLC framed, so the crc is part of the framing */ struct qdl_ufwrite_rsp { __u8 cmd; /* 0x28 */ __u16 sequence; __u32 reserved; __u16 status; } __attribute__ ((packed)); /* __u8 0x29 - cmd only */ struct qdl_ufclose_rsp { __u8 cmd; /* 0x2a */ __u16 status; __u8 type; __u8 errortxt; } __attribute__ ((packed)); /* __u8 0x2d - cmd only */ /* __u8 0x2e - cmd only */ struct qdl_imagepref_rsp { __u8 cmd; /* 0x2f */ __u8 entries; struct { __u8 type; char id[16]; } image[]; } __attribute__ ((packed)); /* * crc16 and HDLC escape code borrowed from modemmanager/libqcdm * Copyright (C) 2010 Red Hat, Inc. */ /* Table of CRCs for each possible byte, with a generator polynomial of 0x8408 */ static const __u16 crc_table[256] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 }; /* Calculate the CRC for a buffer using a seed of 0xffff */ static __u16 crc16(const char *buffer, size_t len) { __u16 crc = 0xffff; while (len--) crc = crc_table[(crc ^ *buffer++) & 0xff] ^ (crc >> 8); return ~crc; } #define CONTROL 0x7e #define ESCAPE 0x7d #define MASK 0x20 static size_t escape(const char *in, size_t inlen, char *out, size_t outlen) { size_t i, j; for (i = 0, j = 0; i < inlen; i++) { if (in[i] == CONTROL || in[i] == ESCAPE) { out[j++] = ESCAPE; if (j < outlen) out[j++] = in[i] ^ MASK; } else { out[j++] = in[i]; } if (j >= outlen) return 0; /* failed to enscape - buffer too small */ } return j; } static size_t unescape(const char *in, size_t inlen, char *out, size_t outlen) { size_t i, j = 0; bool escaping = false; for (i = 0; i < inlen; i++) { if (j >= outlen) { debug("i=%zu, j=%zu, inlen=%zu, outlen=%zu\n", i, j, inlen, outlen); return 0; } if (escaping) { out[j++] = in[i] ^ MASK; escaping = false; } else if (in[i] == ESCAPE) { escaping = true; } else { out[j++] = in[i]; } } return j; } /* copy a possibly escaped single byte to out */ static size_t escape_byte(__u8 byte, char *out, size_t outlen) { size_t j = 0; if (byte == CONTROL || byte == ESCAPE) { out[j++] = ESCAPE; byte ^= MASK; } out[j++] = byte; return j; } static size_t hdlc_frame(const char *in, size_t inlen, char *out, size_t outlen) { __u16 crc; size_t j = 0; out[j++] = CONTROL; j += escape(in, inlen, &out[j], outlen - j); crc = crc16(in, inlen); j += escape_byte(crc & 0xff, &out[j], outlen - j); j += escape_byte(crc >> 8 & 0xff, &out[j], outlen - j); out[j++] = CONTROL; if (j < inlen) return 0; /* FIXME */ return j; } static size_t hdlc_unframe(const char *in, size_t inlen, char *out, size_t outlen) { __u16 crc; size_t j, i = inlen; /* the first control char is optional */ if (*in == CONTROL) { in++; i--; } if (in[i - 1] == CONTROL) i--; j = unescape(in, i, out, outlen); if (j < 2) { debug("unescape failed: j = %zu\n", j); return 0; } j -= 2; /* remove the crc */ /* verify the crc */ crc = crc16(out, j); if (crc != ((unsigned char)out[j] | (unsigned char)out[j + 1] << 8)) { debug("crc failed: 0x%04x != 0x%04x\n", crc, out[j] | out[j + 1] << 8); return 0; } return j; } /* should the unframed open request include a file header? */ static inline size_t hdrlen(__u8 type) { switch (type) { case QDL_IMAGE_CWE: return 400; default: return 0; } } /* some image types contain trailing garbage - from gobi-loader */ static inline size_t imglen(__u8 type, size_t len) { switch (type) { case QDL_IMAGE_AMSS_MODEM: return len - 8; default: return len; } } static size_t create_ufopen_req(char *in, size_t filelen, __u8 type) { struct qdl_ufopen_req *req = (void *)in; req->cmd = QDL_CMD_OPEN_UNFRAMED_REQ; req->type = type; req ->windowsize = 1; /* snooped */ req->length = imglen(type, filelen); req->chunksize = imglen(type, filelen) - hdrlen(type); return sizeof(struct qdl_ufopen_req); } static size_t create_ufwrite_req(char *out, size_t chunksize, int sequence) { struct qdl_ufwrite_req *req = (void *)out; req->cmd = QDL_CMD_WRITE_UNFRAMED_REQ; req->sequence = sequence; req->reserved = 0; req->chunksize = chunksize; req->crc = crc16(out, sizeof(*req) - 2); return sizeof(*req); } static int parse_sdp_hello(const char *in, size_t inlen) { struct qdl_hello_rsp *r; char buf[sizeof(*r) + sizeof(__u16)]; char magicbuf[33] = {0}; size_t ret; r = (struct qdl_hello_rsp *)buf; ret = hdlc_unframe(in, inlen, buf, sizeof(buf)); if (ret == sizeof(*r) && r->cmd == QDL_CMD_HELLO_RSP) { memcpy(magicbuf, r->magic, r->maxver <= 5 ? 24 : 32); debug("magic: '%s'\nmaxver: %u\nminver: %u\nfeatures: 0x%02x\n", magicbuf, r->maxver, r->minver, r->features); return 0; } return -1; /* unexpected error */ } static const char *sdperr2str(__u32 err) { switch (err) { case QDL_ERROR_01: return "Reserved"; case QDL_ERROR_BAD_ADDR: return "Invalid destination address"; case QDL_ERROR_BAD_LEN: return "Invalid length"; case QDL_ERROR_BAD_PACKET: return "Unexpected end of packet"; case QDL_ERROR_BAD_CMD: return "Invalid command"; case QDL_ERROR_06: return "Reserved"; case QDL_ERROR_OP_FAILED: return "Operation failed"; case QDL_ERROR_BAD_FLASH_ID: return "Invalid flash intelligent ID"; case QDL_ERROR_BAD_VOLTAGE: return "Invalid programming voltage"; case QDL_ERROR_WRITE_FAILED: return "Write verify failed"; case QDL_ERROR_11: return "Reserved"; case QDL_ERROR_BAD_SPC: return "Invalid security code"; case QDL_ERROR_POWERDOWN: return "Power-down failed"; case QDL_ERROR_UNSUPPORTED: return "NAND flash programming not supported"; case QDL_ERROR_CMD_SEQ: return "Command out of sequence"; case QDL_ERROR_CLOSE: return "Close failed"; case QDL_ERROR_BAD_FEATURES: return "Invalid feature bits"; case QDL_ERROR_SPACE: return "Out of space"; case QDL_ERROR_BAD_SECURITY: return "Invalid security mode"; case QDL_ERROR_MULTI_UNSUPPORTED: return "Multi-image NAND not supported"; case QDL_ERROR_POWEROFF: return "Power-off command not supported"; case QDL_ERROR_CMD_UNSUPPORTED: return "Command not supported"; case QDL_ERROR_BAD_CRC: return "Invalid CRC"; case QDL_ERROR_STATE: return "Command received in invalid state"; case QDL_ERROR_TIMEOUT: return "Receive timeout"; case QDL_ERROR_IMAGE_AUTH: return "Image authentication error"; default: return "Unknown error"; } } static int parse_sdp_err(const char *in, size_t inlen, bool silent) { struct qdl_err_rsp *r; char buf[sizeof(*r) + sizeof(__u16)]; size_t ret; r = (struct qdl_err_rsp *)buf; ret = hdlc_unframe(in, inlen, buf, sizeof(buf)); if (ret == sizeof(*r) && r->cmd == QDL_CMD_ERROR) { if (!silent) fprintf(stderr, "SDP error %d (%d): %s\n", r->error, r->errortxt, sdperr2str(r->error)); return -r->error; } return -1; /* not an proper error frame */ } static int parse_ufopen(const char *in, size_t inlen) { struct qdl_ufopen_rsp *r; char buf[sizeof(*r) + sizeof(__u16)]; size_t ret; r = (struct qdl_ufopen_rsp *)buf; ret = hdlc_unframe(in, inlen, buf, sizeof(buf)); if (ret != sizeof(*r) || r->cmd != QDL_CMD_OPEN_UNFRAMED_RSP) return -1; debug("status=%d, windowsize=%d, chunksize=%d\n", r->status, r->windowsize, r->chunksize); return -r->status; } static int parse_ufwrite(const char *in, size_t inlen) { struct qdl_ufwrite_rsp *r; char buf[sizeof(*r) + sizeof(__u16)]; size_t ret; r = (struct qdl_ufwrite_rsp *)buf; ret = hdlc_unframe(in, inlen, buf, sizeof(buf)); if (ret != sizeof(*r) || r->cmd != QDL_CMD_WRITE_UNFRAMED_RSP) return -1; if (r->status) { fprintf(stderr, "seq 0x%04x status=%d\n", r->sequence, r->status); return -r->status; } debug("ack: %d\n", r->sequence); return r->sequence; } static int parse_ufdone(const char *in, size_t inlen) { struct qdl_ufclose_rsp *r; char buf[sizeof(*r) + sizeof(__u16)]; size_t ret; r = (struct qdl_ufclose_rsp *)buf; ret = hdlc_unframe(in, inlen, buf, sizeof(buf)); if (ret != sizeof(*r) || r->cmd != QDL_CMD_SESSION_DONE_RSP) return -1; debug("UF close: status=%d, type=%d, errortxt=%d\n", r->status, r->type, r->errortxt); return -r->status; } /* read and parse QDL if available. Will return unless data is * available withing 5 ms */ static int read_and_parse(int fd, bool silent) { char *end, *p, rbuf[512]; int rlen, framelen, ret = 0; fd_set rd; struct timeval tv = { .tv_sec = 1, .tv_usec = 0, }; FD_ZERO(&rd); FD_SET(fd, &rd); if (select(fd + 1, &rd, NULL, NULL, &tv) <= 0) { debug("timeout: no data read\n"); return 0; } rlen = read(fd, rbuf, sizeof(rbuf)); if (rlen <= 0) return rlen; print_packet("read", rbuf, rlen); p = rbuf; while (rlen > 0 && (end = memchr(p + 1, CONTROL, rlen - 1)) != NULL) { end++; framelen = end - p; switch (p[1]) { case QDL_CMD_ERROR: ret = parse_sdp_err(p, framelen, silent); break; case QDL_CMD_HELLO_RSP: /* == DLOAD_ACK */ if (framelen != 5) ret = parse_sdp_hello(p, framelen); else debug("Got DLOAD_ACK\n"); break; case QDL_CMD_OPEN_UNFRAMED_RSP: ret = parse_ufopen(p, framelen); break; case QDL_CMD_WRITE_UNFRAMED_RSP: ret = parse_ufwrite(p, framelen); break; case QDL_CMD_SESSION_DONE_RSP: ret = parse_ufdone(p, framelen); break; default: fprintf(stderr, "Unsupported response code: 0x%02x\n", p[1]); } if (ret < 0) return ret; p = end; rlen -= framelen; } return ret; } static int write_hdlc(int fd, const char *in, size_t inlen) { char wbuf[512]; int wlen; wlen = hdlc_frame(in, inlen, wbuf, sizeof(wbuf)); if (wlen > 0) { if (write(fd, wbuf, wlen) < 0) fprintf(stderr, "error writing HDLC"); else print_packet("write", wbuf, wlen); } else { debug("hdlc_frame() returned %d\n", wlen); } return wlen; } static int serial_open(const char *dev) { struct termios terminal_data; int fd; /* FIXME: verify that the serial device is a Sierra Wireless device in QDL mode */ fd = open(dev, O_RDWR | O_NOCTTY); if (fd > 0) { tcgetattr(fd, &terminal_data); cfmakeraw(&terminal_data); tcsetattr(fd, TCSANOW, &terminal_data); } debug("opened %s\n", dev); return fd; } /* Sierra Wireless CWE file header * Note: 32bit numbers are big endian */ struct cwehdr { char reserved1[256]; __u32 crc; /* 32bit CRC of "reserved1" field */ __u32 rev; /* header revision */ __u32 val; /* CRC validity indicator */ char type[4]; /* ASCII - not null terminated */ char product[4]; /* ASCII - not null terminated */ __u32 imgsize; /* image size */ __u32 imgcrc; /* 32bit CRC of the image */ char version[84]; /* ASCII - null terminated */ char date[8]; /* ASCII - null terminated */ __u32 compat; /* backward compatibility */ char reserved2[20]; }; static int verify_cwehdr(char *buf) { struct cwehdr *h = (void *)buf; char tmp[5]; fprintf(stderr, " CWE revision: %d\n", be32toh(h->rev)); memcpy(tmp, h->type, 4); tmp[4] = 0; fprintf(stderr, " type: %s\n", tmp); memcpy(tmp, h->product, 4); tmp[4] = 0; fprintf(stderr, " product: %s\n", tmp); fprintf(stderr, " image size: %d\n", be32toh(h->imgsize)); fprintf(stderr, " version: %s\n", h->version); fprintf(stderr, " date: %s\n", h->date); return 0; } /* guessing image type based on the well known Gobi 1k and 2k * filenames, and assumes anything else is a CWE image * * This is based on the types in gobi-loader's snooped magic strings: * 0x05 => "amss.mbn" * 0x06 => "apps.mbn" * 0x0d => "uqcn.mbn" (Gobi 2000 only) */ static __u8 filename2type(const char *filename) { char *base = strrchr(filename, '/'); if (!base) base = (char *)filename; if (!strcasecmp(base, "amss.mbn")) return QDL_IMAGE_AMSS_MODEM; if (!strcasecmp(base, "apps.mbn")) return QDL_IMAGE_AMSS_APPLICATION; if (!strcasecmp(base, "uqcn.mbn")) return QDL_IMAGE_AMSS_UQCN; return QDL_IMAGE_CWE; } static int download_image(int serfd, char *buf, const char *image) { int imgfd = -1, ret = 0, seq = 0; size_t chunksize, rlen, filelen; struct stat img_data; __u8 type = filename2type(image); /* FIXME: verify that this image matches the modem */ imgfd = open(image, O_RDONLY); if (imgfd < 0) { fprintf(stderr, "Cannot open %s: %d\n", image, imgfd); ret = imgfd; goto out; } fstat(imgfd, &img_data); if (imglen(type, img_data.st_size) < hdrlen(type)) { fprintf(stderr, "%s is too short\n", image); ret = -1; goto out; } fprintf(stderr, "Downloading %s image '%s'\n", qdl_type2str(type), image); /* send open request */ rlen = create_ufopen_req(buf, img_data.st_size, type); if (hdrlen(type) > 0) { ret = -1; if (hdrlen(type) + rlen > BUFSIZE) goto out; if (read(imgfd, buf + rlen, hdrlen(type)) != hdrlen(type)) goto out; if (type == QDL_IMAGE_CWE) verify_cwehdr(buf + rlen); } write_hdlc(serfd, buf, rlen + hdrlen(type)); /* read ufopen response - FIXME: act on errors! */ if (read_and_parse(serfd, false) < 0) goto out; filelen = imglen(type, img_data.st_size) - hdrlen(type); /* remaining data to send */ while (filelen > 0) { fd_set wr; struct timeval tv = { .tv_sec = 2, .tv_usec = 0, }; chunksize = CHUNK; if (chunksize > filelen) chunksize = filelen; debug("write #%d (%zu)...", seq, chunksize); rlen = create_ufwrite_req(buf, chunksize, seq++); rlen += read(imgfd, buf + rlen, CHUNK); filelen -= chunksize; FD_ZERO(&wr); FD_SET(serfd, &wr); if (select(serfd + 1, NULL, &wr, NULL, &tv) <= 0) goto out; if (write(serfd, buf, rlen) < 0) { fprintf(stderr, "error writing data"); goto out; } ret = read_and_parse(serfd, false); if (ret < 0) goto out; } debug("finished writing\n"); /* This may take a considerable amount of time */ fprintf(stderr, "\nWaiting for ack"); while (ret != seq - 1) { fprintf(stderr, "."); sleep(3); ret = read_and_parse(serfd, false); } fprintf(stderr, "\n"); out: if (imgfd > 0) close(imgfd); return ret; } static struct option main_options[] = { { "help", 0, 0, 'h' }, { "serial", 1, 0, 's' }, { "debug", 0, 0, 'd' }, { 0, 0, 0, 0 } }; static void usage(const char *prog) { fprintf(stderr, "\n%s: %s [ --help ]" #ifdef DEBUG " [--debug] " #endif "--serial [image2] [image3]\n", __func__, prog); } int main(int argc, char *argv[]) { int opt, serfd = -1, ret = 0, version; char *buffer = NULL; fprintf(stderr, "%s\n", DESCRIPTION); while ((opt = getopt_long(argc, argv, "i:s:m:dvh", main_options, NULL)) != -1) { switch(opt) { case 's': serfd = serial_open(optarg); break; #ifdef DEBUG case 'd': debug = true; break; #endif case 'h': usage(argv[0]); return 0; } } buffer = malloc(BUFSIZE); if (!buffer) { ret = -ENOMEM; goto err; } /* FIXME: should do the following for a complete image upload* * * For CWE images: * - verify image and retrive model/version data for next step if applicable * - if application mode: * + verify qmi model/version matching image * + check usb sysfs (serial++) to match against bootloader mode * + switch to bootloader mode * + wait for QDL device to appear * * For all images: * - verify that the QDL device is the correct one (check serial etc) * * NON WORKING: * - allow multiple images to be uploaded in one run * How do we do this properly? */ /* need at least one firmware filename */ if (optind == argc) { usage(argv[0]); return -1; } if (serfd < 0) return serfd; /* switch to SDP - this is required for some modems like MC7710 */ write_hdlc(serfd, (const char *)&dload_sdp, sizeof(dload_sdp)); ret = read_and_parse(serfd, true); /* the modem could already be in SDP mode, so ignore "unsupported" errors */ if (ret < 0 && ret != -QDL_ERROR_CMD_UNSUPPORTED) goto err; /* attempt to probe supported protocol version * Newer modems like Sierra Wireless MC7710 must use '6' for both fields * Gobi2000 modems like HP un2420 must use '5' for both fields * Gobi1000 modems must use '4' for both fields */ for (version = 4; version < 7; version++) { qdl_hello_req.minver = version; qdl_hello_req.maxver = version; write_hdlc(serfd, (const char *)&qdl_hello_req, sizeof(qdl_hello_req)); ret = read_and_parse(serfd, true); if (!ret) break; } if (ret < 0) { fprintf(stderr, "Unable to detect QDL version\n"); goto err; } fprintf(stderr, "Got QDL version: %u\n", version); /* download all images */ while (optind < argc && ret >= 0) ret = download_image(serfd, buffer, argv[optind++]); /* close unframed session */ buffer[0] = QDL_CMD_SESSION_DONE_REQ; write_hdlc(serfd, buffer, 1); /* read close response */ if (!read_and_parse(serfd, false)) fprintf(stderr, "Success!\n"); /* terminate SDP session */ fprintf(stderr, "Terminating session - rebooting modem...\n"); buffer[0] = QDL_CMD_SESSION_CLOSE_REQ; write_hdlc(serfd, buffer, 1); /* no response? */ read_and_parse(serfd, false); err: if (serfd > 0) close(serfd); free(buffer); return ret; }

TrƣϣbVSdd:j5:fIz2^6%'hcB:9zʯ "0 ,!і (`:'y~>ϊ5QXAR7776ZGUл,i0nBUlDO)ά~1taV6( 8y6?1 p}}mGs[=RUU4ّ&{[톤AY2 wzE##]{!sRnf4jոxz%%d253߽<SP,mA o #"x-d ZgN٤El6kY,dGtzzy;=Fٴ+JP\C˥dh42o0݄ %eEo«S!_D/XvF˒BP`XI~1/`) ~$v2@^拹xF*Ek5e3s%lKklئ/$_q`VTn":e<甯TQ$j?kE?(} E2Fb Ÿ}g+=ᗌ3he@2#xZ͘L `,Pټ{T-*}s@{a̷:BSh}1$ Kuww[_8,{.ϭ0+JJҍ‚ֽN.e}>ve9>Mw+REaYaX|0+Dc4X,Z1x{{wVp5CJbxzd21~ݝN1"Oh45دf3}V$___ϹǡlNOڕBGGG|>pv0(VT^Ie1Z̈';+/HVP!ށ=-&I ;ȇjWTTlxOޑ`ǗPu7!qw##P4]z 3rZ/U(JRX$K~{4VnQuٿ2K :W1Q1m+^Fj7{(nG)YFwPz s CPEۃGļ1U%t'WeBAP:(<2Q efA$w~'ƈl:.hLO{e)7Ά*$qn (3!ӧj6̔&&]*Nf:>/*>FR/ꤛ#%]e߽fT5'z$Z-Wq X,E}Ľ ;Vf3KT^Ɛ0=453C螞27o ('si'è?|`5RcAԃ.r=jS٤]HIlVp@\(rV􇠭I6p~mɫ'K"IycT>YcNʤSq?M1Z^my\l6f~@QAo'],ڤK7 Uin9`ԓS#gA\O=_Bw*,jTN z<{*K?J<==5&S}SKOQmv0v$4MsI.-. Pǥ8"*{i/¢DZRd0JTW۳nZh7E "λ; W5𳦠m@{bBMޮsˠT,FJtzwj(=+pMR&y&DNQ}P8PF:hhcx&<3hZF~o@<,I Ql٨Yi>%GAv[777pJπV X>Oy@_ E[6 pɣ0Y(]wV⼡@1 '(Jb'=!E_+b}1ϟ?en=վrYWWW&sy yZUq$Ywն_Bϙg ?Oɹ$yn]X*owoȓA:C]\\Ǐ6K @3jb1rTj^-y@mI5k˝zb:i=IyMIFWӇёѾ,VƙX,X gYA"$իW) av j5 ;`/xbVbȢYMBZ `D zbU>T*e=`/@ ֻ0,éPHI>$? ^)/.f|y$B#hzGx$ʬ$Kġ$cI6J9?7,@^spıB bK[BTUlЩ9P)G+ b} '?peMyzO+ijZj*M 2oчr'd@ ramh_( ? !PpZ?qףA`xf޼yT>B</{Ę{ڂ}Q]` :ERH^F9$gǏ6fio4$.woB8DrALAyrfPS,4/[KM I7}L1{*-wkݮ5\\DVTUlnwkIZ@F sS3 IDATO1* ݥgϞe $qĀa$ĦE\GGGvr@F$gԦJ+8aHQo~|偁Ҩ*@gq4g\q2ۄ)!ŢNNN4 5f t<1zT* W:m4=mf4D]'''FP>@zj>B#6zkPXT( 5N* jNvyP`4h r/'Lf66$qOh=-^L]n,Tϟ?*HAZ^ >= D]@|Gg;0[F&1^k2~%g#|Wzk@DyT~>{Cg7lU{ b#"Z#@B4ٚ. Zpg/˙՞IV`o׉}!wsI7Fj1O45]BW溻Yj2^k1FvT)i>]sp8W(| su $ηaeĦZQkMS CKD¦݌ ΒY@e4i:H G^n|NS:R_e8aWb v80q+*oOR"28l h 6}~'~HT\~"< FH@Os!m^< % %{LӨs3xI\)+F *:xX ?euӌ/%}:pa{б_E.!bI,f-r .NZէOrl~ N&;y&WDTo$6Hа^BD~A/WxE53~!~qPP3ΏZ6^6P*׼>Na 2RdT(T \y@o޼@[F<oH]癭mUk-G0G+k/>FJs,ALjq|+?u'ۍ.u%PvjͲz4 T)We،iq&Qݣ#i$Ad#P8z={Цp;88ޯQFc )JK]ⓓ]\\?#+>8[Pa|3\.c@!3ZbMl1%kߠPIҨ:&$MG4٩=ƥVSAV+|4 { w}dQ 2PFFi~}LJjf$Z @? 4 q$ H@+^W*ji6+@TR<0.߯Ju蝌Yru|? ti}l|߄?_k6$*Z< >IfѪ s=cr:'B*k5zNZ-6L8m=u/;|ǺKiQ>,gfOKgn'E :eիWH\XT؜I }o,(Y&130{36XpEBOk<K-qu:F' a2(Z ׯ-Cc@h|v/VZ(txfx"GQrl8^)JIRRYrxZ9/R&Z.Mֺ5YasKMc-d>j?l?+ K -EAY㩪(z޿orrD p/0 |ZvJD@7X_)ҶX, ){} 뛛;$Ab^:l6zxx8TznČ P4͏o1@aTXTT( > N] BsyC0GPx.YGg WE!HǨ0|$ȗ P,h:W[u$w-*N3y>JO=ǣM~@~7W|V/F(*X;jӝ ӹP. DP/8e ch#4fG.)N~χjFijk;+$&@ɡc8_}YBDzy \fhlo@bxE@2fxЁ9ga1Qt1Lы:Rl0WbrJgnJ\UjCXDk<\jtOs]ith$jfd+k uU  s6r~/foSQ"hЭ®+k>[ kf65¹]һ%V+,ҶqnݨkZT{V&&"0PqxblJZ-QHPzB-,Ե"UYUņsy؞E>EoFcfT\/F D͓ 'ʶR)4/KXFL9t;m@GZEQQacTS9`cL % Q%Av]S6  N.t;8`^*t)ˋVQ5 jU~}!&m իWF2}L;_@sKO50q A۳FC?.ғg9>>qqq|xlxQDDrxr~0TZ6׺4Zzh7K=Vmd'~W,iL5,\,M@C3E-SX,znnnh4tsscXNG,~ʟàuBKC~MQuw]}#1v-Ƃs0~<۞ZZ~'a @[,ېܼ׳y.7XF^~ I`H/NIR9AǏMEЃ¥M<*jG)^#pL&u@坎.J3SUn1rFdi:3m:tMAEZ}"yu1JyGeT~ovjj[,BZ-[)mFx @x\|)=*ĆH_֧OrTɽ^daRH'L8Il'Lwc$ʦhzML ՉPWX"53Ǐ9kZ\.ij.DSn\-t\gYnh$*DE=܄Z/INCh-1mvƜ Pye3 Ď[KZ0$~Ćnۙ9cA>|왱6S}00hz왮MYH S,ac{+FaxGGۈůJRh4Rp}RY{g+t+;_ * :!}\/`K~f҂Jv"w-tAo*FI NʼnjjkZ $@fI@V%ITINe{܀{$x]x^Q)Vmi:j6Yqh`fnǛsYOm(L7.hL~'g " 1"C 1@ż(3Ѐ ${=j0L߿7B`ڰX$xl,*!;ǀz(I؊8֢x/;Qb1Xq|hgpu@%uZ= Cu:&FFv{{k o£(`'M֓@ ??ڛ!, j}zPfrizy2琇[HVuUwգFK4l2 Yo ? _Z0lȀU]s"3##/8d5^Y$ϒ'yy)|HpGtvQcDz7旉#?$dJAL42C@"Oloa#  X^ MTT ZMz+Ȃ+U*?-j!#egȋ?S0' k%8\vU#*[7*#w]y`xTz;1M;'KS%J&Y$*cHv 7M$/M%Jݷu$MEm ^EMgv/pCkV3@mAge qwrt:u-H$YurȩI;ߛt . P/[(/˽n<WӁ/oA(ݮok<8s8<3AĐ{Orϛͳz=Ν;я~RW^9x^pv:wֹk3y}K| xNSW'*MgJWL&fΙ:؝Un4ncwVSPT^ h b'ˑR)[7DpzE\#Ce}_ [.>E d̳ڮt|]zum8TUkjtli1*o^Ŋ։m#||cOy0?tƩvǍ6eTV_ WYV3_T5y#J ݭ; <J$jNTv `׭q~$vaܫw*C9>yDggg`c%'IS-5$;z k TZS|܀ h5tOpeDPd|/ϒn@`{Vb] F'/+  뿾+NfUUKmEXE <ʁDu4UUq`tAX~p}}\ˈh`A r2 :,7w^eq pڨݠ9xxF@@鸫A 4`A/z!]_Y+np\VjNL$A`5ɋ /oM=_HztVEia4Mu]]__n7~ X n֡sz۵ VP^+_] 4Ix*Z'Z/c['`KҳH<&]'NWMT難MJM-~kBV˜mhԨ7ܙCLG`m#pJ sKQ#p1b-Fk#Ɓ(2EάEᬣ(r|&\)8Tg.ΝA3g1f]jw&s&1$],Cqvf/˜nj%E{z&+@&ķ;Fu Zy]0[e?x[Cv|y302 pdvW%sۨRd[3E,Jհ&1dxﻠđb2O[Tܢi7\.ȗ+SP!@x2UާڬbzFfIbXUh(NP|`g!< y>*RTRP\juB &”twPkd``n@~ۭ](REkH@Ub_r @av0n޽{Ӵc/d\ˀem^׎c$)O$"td = amOYːAv5GI#kʃ; $jA9f;POOOu}}oP:x'^nCi?+3&م#y;K$RaNB(I<4*^O%^; jcG(v:5dh]ݺݮ3vNQ${Хyáz^f%.q{r hMng>|̶0;[mŅv R m6ځSt[< ʹ$r,')(Mxߏ׮ѣ{##Q.K{}xt#R…dgz99q+U>>N KTٙS$c8mBjEIU|;b.K+CнZҽ~|Ӊ‚ϵ 7 P>t#k5MT浉޽MU*QRZs/N.a]`.'~1ND4Le';&V=8enZ~r>BFnw wKҏ?vcsf4AXcp2^uz"QFHiB.tĸh@P I5 5&o[ +²jSJ$Ys`0F\! 8݁d$. Q@+pEЁXgԵ$ R~mi4*˺PSG*}0W}DJ)/-TR:&E z4'2{>yT Pk+rc g?|rߧigϞZzx,I bYK\pIɓ'zꕎ26+Z9hUX[f|r %)DcSd3yչoV u6nmpTr=Q%mX6XJ]0#D5K)8::r͗udDG3bP Aw뼹Qs[r)]ёV@vL&0T$j5@/l|W'cwx"Ik=)`y$kcsz; Ԭ&^j;= ׅa<JN4b 58u֜g‘dItA7 SrU|$;P!Plai0Ml[.[D¯${FC˅Z!јf3}}pH&h5ʎDZN\|9glQ GT͹qqB&vm䣏>L`P֠h\޽{[kp婵fַvnжz8̘"mA/G%!@maT0ݔDUOKGN of4W: ܜ%>n>DgI捵:Z|pt$gΖ5C!GX=#0&ӭsFQ# $Fo]hwqmN&woWMv{:BQ/w+' ;H ߪ>XE#DmGL{O"-8eXk4̻ڕgVż'we e?0ɓ'> X7sb5.\.c-+ɴ5 nK ÇQt̚ӉG~}EMAϞ|CSyp)&Iz[5 ±E 2MNVs.E B 3VԊlImrkҀ0 uw xV>{vl6ӽ{\I1j#CaZ:OXlP13g _lGkp YMshx@.0T ]%ɗWF`چ#lDqI8XA H$Lt$lS,1v}=>${07]jo`+Iaj=`FahkUCŴyK%PNRguDŤ$VrjhȘV7vS h ?$YR |,?R( y(P- [v f8bI mDR^5ƢNtv7!]2w3'ϔBl`a@n B$eE~o2+sGMnc55MgCBJi~AD}fU.h>ժw4R8V5Z~10rb*-ɔ;̸&VK4%6gF$PmbP` LDMm^< j4FDa8+U+Ztvo1vU TX0F nAi[oZ\0r*R֖q h=NĘ&goGCŶnUǠV'jՊ%&ky w/,ժm傼BfsgN.Xi8: s *flΤPTZX%'jbZ6.%JubM (r7^Zxu6/Ս 1Y:gV`F(e<5ۿ]wNM Сsm6+%mr7jg*e<ҿΓ@\SBMi" Eάk3@T4>}0 v9l@ jjl((wYvInu}}^Kv3Mx]5Bh>P,@2g^+2I(`1!żP8!~ȯ3AdI-f̐[Y5.UيnAG-#J$Iy&?D;obfژE~x (U8Y+D*-8KmשZ=8Ɉg` pyv3Ƹy8v<&p vxOB'-^+0],%VEn^>"Ayph 8m8&P\ d z삔5Laee~)\(QC;>ہ$RQO~N$/pIؓuK^R|R\xto 7ͪJqA} %HXbp S9[:+IfY)dPm{,3:Է"bJ(Yz:T㚶նʥ,K)5J=^؅ 4A"`4eW7TݵY1 n.G]#0pNr8֌HҶrP"SG}G-Y7xf'&8Y@+0-BKiz{Clr I[kTYCE@µݞdZ\.:d+A@(ѻώRuܸY_QP^Dbj9[]EWǏG`Kf m Om'pϰz *  ylhQp?Q@Y3$Ob`^.Dpt֙x驮l ytTV `7,DbV'cV@T&*#yzR*4wUAQ/j:g b ŮI"4 f$ TFíTpTV?S³c&aݮP[Hv QxwK (,7Ocw(o`~tж"Xʀ"(HrY|t(]I©yKr:btjpP_(r8 \ n*ґ^F#7ʇnZZ,St]]__g&^ŠhtP6vuqq()HPYwWL3|ƽᠡ x̊_@unp%R T'] (k5g9\+DOTZH恒(m)( X_QlY%+[1JbG*4\AW])Kc(iKۍuJ^Z hG̭B3PEq8I_KΉ]n@h 0E&a4gU :Th$^l?('7s0ӧO5\B$Pei&:qp"XթuγO/kr5*Z*JuD5 尨xknjiZ;Q*?HS4#|.yXAb }:Ak|s_F#uQ񱳂?-3M<\"QZ"”N(X77:5@F!FAgFh8Zpͥ3%PUQREsD;)06,~h_xn^t Q߱fq_!@f`)F PRV>(K#7_WwHx*䋊JŊ򹂳o"`|j[ry; ,12&ֲq6B HVE00 iOOO]R{Z<ҽN Cz?8v !W4 eJ%ɁTEh$,Dm{(ܯlٰE;4f$ ;'y'}+dm[[;_$&͑mNJV5ꍌoIA.!qgy|1eYg\N3Rl[h5jr|.#qu)JWDY0@#z;*PV=Nγ 6bP@cr9yؠO{(3e$_|w_Y3t1TAt<`OZ dXF"m/Lj9d2qJEjս{eh lSg+B|xRK j5]Q{jא5 ժ[eb .; " 3{>(-:w( sד-'9- S9cx8Juuu`Zh4-$ӡHb"3so2ϪPkz^#=z~$I37^ĽNwb2Z ytttXVI4VO3sJhϭ씗sMNuJDl"E>tb7M7~;_V^k @RtJ/pDA]3ߛ k0I+t/ƚ,G@C|ƨ9s<0~<86h(װ; 0'3}sH B/@@iz 3.n PbAqzPǡhQ>wO;8U+ʋ{|_6xA$h0z. IC%y1bU@°S(.*0N$ @V@CmJm/=|s^)P&s&Va9⃪|rt)WI;#uCN(X @Fd J+ء(ƣ*Ւ|֝y?< sޤ*䪚BA^rW{HIekHBMR0X pgϞZB,TXMx]:Mg +$mi+ŠU>{wbE Wj()\-[EYTx4VWXr1Z IDAT<7]E (h%q>f|!PT3s_͜祊y늒(P\p0|l/_fLco΂ݡN7A:Da$#2t/ y}fHn[BMû=b;%:Hv$A⃠f9hb'6J[PkPT\[ڔT*5-6 $`E"g{fӧOu}}Ԕ, ZNq9W^}@Dl;J\(rǾWx !bJj1\ŬH8rYrQXjxZ'}dUQokU*VZm\8>>? $F#$9>u69ocDPF5=9Ϟ=sbJ`Obl6uqqmilzq3AaY H$8aQw2?| iЊ[AX|Aɡ&P(8膭%a4 ECEx 8@K!>E*A.-"\ x،C2%11Sգ[]TzMJd|9zmDJ]MJ6DzK66Sf\;g8DWWWn%<._Λ@67o̚Snܹsǡ;m› )l9cd*}2$@T0HP.(Xӑ{{DR[pu4& IQ;*俣rBP~//6yE'#yڏ4Z}އ~?P/_tJ$ DOw^W^ni:+\//I^xX]J=O^*_T9\ -IzD?$ݮ=Z8﹍URsKMI 'ݻw3S v-я~ v}F{@Rs玃Q`s:SD{cG?X/F+bAG 4)=8dTL7Nٱ.PQA焅 n /f5L@Eyf]wЩeɓ'Fz2)p#U<ƾaT{((I7T[K38ړJ|$%6HvXn?ojPZ *br^*],BCU:B:Sefb/ ο\^+2e_*E98[ Kb jxtzMI+UM*lj_+5\r# ?`F/4_iRg.?'/^j{J~CLt;!!q%؟Q0L>tB9P(\jLJ9;~u'cIWpCTg *)5LDv[777:99q0ύ`EHtֵȘJ(ZPI➵nS4񺬢R E}Iqӧ/j[GG(Xni|h4RqhSY/[(کONN^J[|leSQ!rA0X_ࣁ~S*UcH3  ƒKM0tNv?7<cVPqXq4;</kaƑwd}//WSk3X|Uu؀976ҵZHF p>dQV ^0 8{VkZ2Ev5@dVB<Ŝ5gp$I&4QRd6RS?Tg\FgY|KV 7sEZx$$xMPM5_5[knf?$<;wuK|_rY(v]TA A1DAevĂ=yj6}|vss`\%roN8`P==! ٙڣ#g)]$p]ZA$H hWѣGz*c-bT]F3bQ^Z Zf!:(a/l~DgyXr$w;3W_k<"48C~u7㪒jQZKQvb*/HzotuV*wIe}$I]wʿZhhus$E5]M' [NԏŹ #d pΘN\__;v݂Zۭ޽% @eȼsKVׯ#p3:a^#q%;b>:"K(˻e @hǏ@Ҩ( PCTpd )5Y^pZw|Dwn c잤MpBLTɊEei|r<|m]@clZKfR4M *)*ȧQ۳̻Ix`y}=弒6XFVDWˁF;+j*ȥZo/?n3W&k%Jt{jo$dk?yIUh/%O?ӿ`Fj 3+*ZVFGƖm@ꍺBGqVtpf+a*S%뒂r/jZk eu=q< 4U3&1ou]wVoQ$/kŘ>'t]5MܨX,9PU*(I'k4F:::rgڴnv*BGY VLs\)MD<=wz# .$3ַg3d@`)T[aөݮsnCK14⾼txpҡӷ VEqa].'݄>CJ7dw ё]¸8k=x@~_۽@X+"J0ճ$J:5)ΫhX:Qv^.5f^,]wkaJ!Ir6á+,Y.q-5l67Ĥ@E.4c6l[A,>nAnꍺRAt>R>懺YX&+%i,}2uNb%2wt!'ƊӭF3?/5KT.Wu1>"3鄬AhvU\l>Xկ6 -  Ǥ֨#~EfZPkL. vDKQV[|>;`0p]'///@"G&`JA7އ 㨛*#e q#g:}ǙC~k,r]!%'L@Ѣwbgj\H xa!g- q|, v\v* E/.d "B-T^<:Ve\H~ЍPoȁ#6{: tv4yVK{^]\Q)_ܭ%U~ B,Okⵢ,:`ϓNZh1(ڬ7T}FĔ JZ;dX`CaeG΀u:_vP*t# GKQXpF;O$D -ڀhNX3pNOO<,b05J^R5'kO˿qQ_j6 uhmMC2c2t~4Vl6Y)ot9Ts/Z,BJG#m6+e9>+ZES=xs^I[l74/UIh.W*U*VTT W.nBM&z=2ako;bx\Jrmд֎XZD B.a2~11/ҽ.ؙr^GaiIE3N&"9h6/-D"&ÑhdDPI6aBjr$I\`BbDS. >olZգG\\@$T?dI `HL7n3$pN/zZm*y72sa.wj4j9[^oV ̕[23ec%@P2Bg F-aQ`Y[K5~z&Y#fFh0!w1m]\\0gl[%;Lu40L$z]J{X%CBN=Xdb,)\Q1 lLjHVEp:??SRl4_Adeq2NrC/R~UT/બ1IRqp$KPc,@^de28Zٰ`B`j׷X,_3R_\E+kJ vveC/O;jkz9#="Q+\.N/wvU"Vp/i_t:u7 y8:\=s3(8::RpsX)+# ێ"ij\h<b} W/{VIUEU{UnwBt'J*x[ptb;h?O$JDwɟC}'+UjEUyn^j9Y;`SguS%ڪ**(8M][=b>>] O$_r(?/t6e' @777ַ֍Yx. *J:??w_d .%A~T}o w鸯g?Y1\m[-xPCGbxh)DXO3B2 )`c:BPDv`v2_ D)9VVF\rWA?to)R-Cl~Hl{Xz D4FC ]#1rkɎUkb .l./sI8DEg@[e /LB׉ҕ@Dmf@|Ү\.z{c.6Pϵ&o'bOg&3gz]pgX+B/Y WY8{_7gKMFS%q.,UP$UF*rYEfq6> hm&xG,~ Yq9@c@t4^W 9O^g?)_iT/?(Jdgt"+%O$Wlqd$ISVTv볉$$f7Q=^z=VBNr^ٵfEATW&ԍ)eDZΨ#u,B`OV,*ܪZ:A,E͍:CA,` Ifd8?爣t777nwDjʬaTTԘy`xAaz BM2d%™Dz||+4(űhx&XSs@Ϡh}Z$1; i*u+2t Uq zl6NCOݺ:ԭ\`I^ &^;bMFÑyU i[2гwJie7)r*4WZ#͖r< TN3c =3f $ ""t5@v%|/KňU6#^ÔJ~/ٽKM2PHfY(W)'~^7&NS3ϛoCm8r.qyt?Knv?Gw"[ɋ].h&˗/5#U9k,b]Ug?==&g<ӿYQDE) T5o|É># GOb=2'|"jE82<{bAOP$QUz=1#nm)z]Q}5p\Nn b:::r!ppkj4j6n$arM \NATz&R+ s–K"$m: *X,TT |*-[v&K&;i9TVYuA IDAT$m"ww`~>87]5^2u;Kpݳjh6(ߩ ee`e+9RIR'BORjFLU.GHrp,HHvT$vP|ř_VMg^g#030.HQRcǦ۔ڌ-a4BaDƑf˾_*N7K=ȶ>IHaF$b҄7uF;'· V*ʒk28x+hC U*%*wg7!?{i75D;[o^{$U5**vW\GX(h]x||nK'ڲz@K*@ >T? IdY xN5 CanY!# Fn׭aX₎ 32B;t]v[W 4UP(^`ʮ%ȜVS#ؽn`0*uT."qS+3ބ`x:aH000㨶4U^SF3?>52=$SY(>q"w( u1T?|9?=S>_PσeNZ1g)W+&z휆גV:͌"yN,v07쐢R O; g[5]Q(ںs $^%clxݣpVˍUiӠj5}?kAEoR82LjiXqa gl:j$kzjE.+* O[$+h4/B$KK?^v\BlW V:th#qVڻc8?[aVGZ NW3K+x6bQPn[ jk^jN3ۻn'aٽ͊䃙$K* ꕎƣqNp 0-8$&P~lpqqfi >r<գ`B;^|ČOAV\#cK,0^ !l_Bîer'yfARy63ŠN#KT-?vP $\`g-F\v-,]Sd(}6 CWR߃3wHto3{BIH>c‚BrQiZRϥZoV*~{;U~z>ʘt3qtPJKMjf.|*gf49;+ s.4s-V̥D@G`1(>]]]RbڇǕ IYT 1_i:X>k mzH8 G'j{Srݬo&8Uo-VS])ISu;=MLLw >}pr&?s=nUɹ2=kf72}|pk Eհj+k2jި\:܇Kz=]__s9tΝ&0f n<;`T$k+F>~Ï?s3M>ֽ{gGGG.ӼAyF#MVz=/NKݢ%ۅ 4ٞf:>>v4f9,c381xCHVl7+kC*L~P~H1/V@7&#ӡHrt :.Xgl6u}]\\7a.H)@T)ڮTK~orWALM`-`Harᣇӱ֫Hi}5;ADo[TbZZ~$LE{i<$.(9Twl{_ggzzDQLJI9-+,$2l6lE '#0@ O~ q1tI(ECνUukfoqHF=cVvǔQȕAҀH;ʸ]Kd%&@T*\ kɋ5EB O`'JG@ MeI#QvWՕ=S3ZͭAvV(NM,!|ak^-`OjfMWk::*yPd>WcqguG[$q^u~ZLBEQ+άDQdShhUi>S u$*f:D1i^w+dBw]L=h0qܤȰϕ&Fz q$)QP>3w4 Zs6 ;lՀVi+IڍcEI8h8p0V?`8d* g|.Exzv]}-/* \]k V?_[^ZMF,[ϟ+drvLtf Ttk)ZP)_S~G^wcGrT*7;5@_3jT(j2~]ǹΎ3Q%ImwttVi g޽{LfM70tpz^ÉxK޷)}m]찅 јNr nd 'lё^~4 =h`}2*Yņ~uܠE#Lw=p0e jL!ٸK*%e[ \o{~g:5nZzݨۻQSW0cMcMơ&ah)K/WILV9ْYHNF7Wz_O飗oHjɔ!𴂊Θd bw Y4h*R(rܽ{WN'OY˿0"=99֖ݮCqO ^\\<FaJVUm, CuΝLAsn|vL1瞢؟lcBCe &06;0PAOAa h4J M]̛J>˗/J!:7A7\tF84 @L&" dGn7k.X.@tk=OmZu}VK0{y+e+G+:1vXӛF"kNBV )1%/~IӜ7}U5 EG3.C5zՍqIZY*1 GEWzyB94#뼉ߣV5iq]@|x2V3{|c>:qɜ(.^(~#Cv VNώ_h2髖rX?ѳS8gB~I)KZA{z+rSE *:,l]C֪; =FD4 hy d(.Lp`z3n%G.!Z-lmmBDZsQa/^. 0 (@$adJ^ύ {e_L;3}עeKLmZ[[{B@ і%Kw UlO"%1(8x{AAHp#-gFCa҉Йц mU( ,#WѲA$iKОG$W(+ O~_?˷SlN/{'uzV7>E~|Bh:U}BC3EuAт=IsHR[&؟"\hht4t\/Pdk(C۝Ø7PnFrQI4yᄎsTtzO4i6R$݀v$NQ3K:R++F(>,(N}E8zv]}義q~ۮzi}Њue%Wڐ' U+muݹQ>_pKḣkhqb&?dmBG1r{Fek]g㞰4Y[Fq]wf2X$hVɒǚ٨/0b`uYjΎ[BD69 Ŕ 2-8д@stY ]/ oχ:N8g֦Iٙ{x.L%@# Cw3 FKXE^ * {X  MofHPX1b)W-[n̉NW$e(a[w׫gDQ8u  p HZsfôc_FM5Rt ]dH1DUZ.h;6t:jl+_+Fq8r̄dRoBp)r};,C'aQ_|EJ^AKWVPdE/s(ؓ› AU7}5*nmmI.//9nCb9oWXt̅BA_NȽs\T*M#өͦ+6u>ޞcsC/̎XۮCw )Rf+Ք`XUj2 5`80Rx1d`5>X,>1] :&ݾS$Bw;1 hȟ9"bnHᣣ# Ô↎FcB IDATe j@HN0677]g 9Óth ʿ3B}Q?kنp"ewڦ%chewRl Msy?t-`@a`0kWvwwu~~ܘh4ܠ69s0hssӡ 7RP ZTuӽQ+Ū49;Ld v 2#b7K ^^Po C^dEx6Z _7l@ʹVEv Mݠ,t$f珑 4 TQj$/ih t6JXt~~v.NI/¹\m¼ĴSkkkz~`%/// F z1$i<koo5!zw }姾g^_d.2gSu(4tJ5oL;=NFn,ϒMi7ь!XFNah4b5q8W* G*W%v~b/RG`Qdߐ*JqOـ ⥕~~RDz%| F)<@ɂ86fOz$4r6$eZn @ʶz^I/LXR 9TK:*g3bгgϴj*gsn?9Ύ;A3Fp6Bnocgi#v 'u7>F"Bf{" >RAv1ìڳ:f VU磲&B0sASNpA\8R{IC5MC{7G̲AIL0 J>88pPlN(94̧! 1NBnR0!mu{TK<%Ti4Rٱ#oSOuw/X.~VM׭P4}@whnYX).&gC >3.nL1,h,٤bscѳ@b+=6.k< 3^$yP4"3jl/Q4g?/C]FYT[5^aѰ;[ 'DkٟPYI{o(hv%tV]tzy=]U8ըmպQPT2WWWn)6d&3d !*% nmNBVd"(ZS1 0\[[[|ƄС^4Myg xwŋT dh`Clr{;@k\E`B' NRTO!CرDAv ["0Ga}ZS`r`RA`d8>>v,qxA4l ‚jgќ9h1B@Հ0*vU(G3{C[n,mW :p I#ɢbYdyy繾 ??z}KZvLp$0VDJ bW]|0?x ﰴuGc`Zεs- < RܡنáVQ c"EhkB j oF4&ϗYHLhg$VΰC|rsHR.MF~)XWs׿D-o|ZrŞ݆?k-èUTw ̃411siXQ' ;-M FnƲ빥 M4 q-mllb9.uqq$S:d5+Zgb0 ab'sV9'81v[c8LHbĢ\6,[h HaeAb` UѦ0:Ay} ABt:,^)Uk1F-60QMZjYhtq*TbYu:(6sIz(T…4r]~9tWd1zJ6(-f˓ź@S4 N&d>&]EOӄ i&0+,)H5t<Maػ=bג$]6$?u\{+t5z1#[]]H+z/*{cGt{"*zo3J^p3Ttv:w^<}%-jK= UE#_k+t6MEemf(Y,3*C㴷:\__1?ǧ,MŊ8/IϞP7tz.2H_E. r8%-T777v&xF@rY/_LY 3Ә?Կ`gg 2 x91Ô :-*vBZuo842n{Rtm-C CS|)<`>p +7z%KݮC48h|M6 ^s7f08oK\uL.{Տ^GSEw6:Ytνyj~wpΝ'YMo"]ܹP!3tH~B9vx3@6#"B)1ȋb2]-;DlphHh>T&4Fx6ޙsNo=q7߿_n~0hooO2h11ts3s6zT5w/J~StAZzumo8+-I⠶tASOS8M|V9kkkt:7%0מݻkm %ōς %EQj(#e80l~8 !.}Fmh͠]hu+B ƣj5 CyT\U{k3j\S-gz[p4vr[҄6&i͡Z,V -a[rW Se4 Pp-^eAEoC$/?)j0DŽY箝 L[D7FVѦRؔ-pM7bS1T=9tMǏsXҴJ% /]bĊ N6fhRR9 7&4-;F˙q}}4bcs~@VTRJTaج]%4114(HCB9քpѱug }NϚ0Z&c`Dn6ͮBd+ij<nfWۥrY^Oa48(&*E&hQj^0A+fK6c\#}uOY3y~`$LIi`,!)?G &n5ǁh3VYΌU(e0wfq>,;K  L&H~Ο+)' Xo=Rơ6yCq~3]2^ Kejz :JUI%Dr}Ak.Pz:6{777]#D:Rn[4~_{{{:;;S>wCL \44P\\tۖ¤9bp5%DLk;zpO׃9],tI]'ƛl-E8;#qZ X*Yws26n.IztghmBF%))H*=|7]'А%IVZFQf[ouG4MW*Ysj4w^jvƁO+Pl@Ń@fS]+!^룏>Zy㉬B˽1x7s5KݢٞL&#QmY75?jE3Yן m&4@;dM86Ŗ"Ía̡BB٠}FF[Cfl7ʐT MVx9&#MB@kAwx68}r恮r}}ȼ,F) 46K?\-j<TUptd ^6v>=ɓN_\+*24!vi$Ia*'iAn؜][?@,Xe Ȟ@ &Iiw4 #kk*Jzc}?R;<_8SF+* 1[{ͪ" MVJ%Ys.K]m 2`6:#Zʛhk2Nt~v$tQd1 Gs3N+z&@# Cu:,1O!a/8عt {n]AFߦYD6N8jijGV Pt#2g_hX?v4e^p_cE>j)DAC?%`qA 2il mƆsàNʡŦ~]ȃɮ4!ggM'۴E=zlAj L}H 7".MS.gT P4TTEv:4?/C IDAT-(21֤G~JTg4ͽ a5 3, ,e6Wuv/VrSh"9h`ONN|x8QPV!(*Lϵ^ks}>Y4T,o{[^^:/%=O5@Eg- N~{d2T~燝$,JӂujwWEO 7wDZ+\78YDIAArrYg?bn.b[61g̾vr3ݻwOng69TD0rloo*lXjZ{^x?Q4ȓlKI|:bEcY#yc`X\>2Mn d9(*p|hÈ9\:P1ɼ!vg1]#P`f2uuu.e4aumONNt}xŴ0dBsc%IG C STrYRV| pfJWˣGjjm'BJ-kXP%63;=oV`^]~_W5~N@h-P5#7,<׍A ʊFE^X M@2zD`8.m{te|)=ycO ??=ZeSw#D6<]8fʔ6UL^[ǒH[2|ҩ #SxWb^^fIlLoFKqX[[sΝ;:>>vAl4lNU "kccå \V*]\\P  ܂ zti h4E BG1q#Ԣ5`{;潢رBFA:%?Q8p0Ñ[cT]EήBGFGLfM]v"؎s6C.\@gК :D }Nqc!obs'.uZ,*c(<5qtd|!x8X)DQZl!o'7ai\i99;{oB0^FM'8xٷoB틾rA^5^D2V.r1HI;dͬsEn¥5i#Q)@ ӤQq^&a%ϑƣYt*U+uM5Tm m֤"ba[49[Zͫ"mtU[(81flF!e\˂qE:}Ea$mgV8<pU ժ HT`-y=SP3!P[Bh4+ S?k[ѫ '@ы9rvg35ܦ6 RW^]X1#@y(/ԣollŋQsz3 )g6` Pd͏Hwu6 T>y`Apaq2 ( g0f-wyNNNyc{4=gMP*XP|?o$t-Pd 7Xw 8\___aLH=kkkK)5ҡ P9V;lUBQX¿A W md=[>Wt9.h}3XT B^BNa4RPr%Y^|+w)|SHoq>+ǎTB_A^{_m]G3Ɔih:U>w&'< .n_c֖Sآq2 ErQ8#fЂlh]09歳ZVjE֖C HRYBIn_J|rEM5֋RkᖆkG۳Wow8g JK餬aw{ YXZV"TQ6Z,[򶑤EY^$,jc}W~BMgd =+d2q(\M'6 P "޽{a"fub?"PNNN4Oya&Cg05 CFj0Nq - @Ɏ Z0lH/ _*fnEK@><:UXރFA"5f3MUr2'/76ؘ,m.x)*\G9}rc{n+* %aQ~RuO[)m97޽/_bhMJ<؟$Ic€&K΋=za/`IF677Kzss] } _pfÇl6kS_\\jUV}d_z葫}C# C1:{Mvv3- OpJZq2M;J4wxx3̴ŎLapB/?"=cz@f[B;ºcV"oQ0S1m* e3y^ /}W5\< @ai$)2bhu ،+i{nR?^-xx˛g*%O]ݿhݚeÈw=纤у%هΖLJa!C/bF.\[[s w+G{ȕ'l'jTbqj=ݮ7=Ea qg*+wI[.xaOˁ6?zsL^s݋$7y0 ٙlS*jXu8X 7nU uorE+8Z95Hf 1/B0VR'skk DbQ̜2L!ܓ ؜g;3v W6HDŽF6x Y3E\4gw[?*F `D5::fkT@WdZn[Xn<ʹ|ͦ+J]*&v&}q`#<8ёNOO݌$E!tG=gw:UWOXl 8ヮx,>lg;I8`U(W+U9n2g"+J+gjtzW~z{V>1m b8{j }ӿ5Zih& n\]Mc#ElSp35kyfk똃3]; FB܃:a' r+#yšBBQW?wOfin,JyJT;[d$o_{/jym73,[w- xC(;C?sę-M^P.3sfj8Et::kNVw]B'p7fpm3t/l߰>(C7cZyN:=8bѳmD' 3i Ri4Jzrr%xA)g4 [bX[3z}9/S#9TNG鳾ip,S˷hh2t{9a0H1g_4ao~ޢ`-:34d[a# *=l>/R^G©SOY[ Rfs /l,*ki3Qz&Qʉe'sYm[iӆ42JsxXԻhkcGY: \.fi T^A\"034yV0mnnf}uyy yS@K.//{yX@m"hj̔J%lyuuvk6 8dGEvwwݽ~||>f{g&á\.~CnfDVFs {,҄fwF0v #CQx;$lAᴋy8@~_N]CYs푦Jԍf`e0χ䂢A", J0Qfu?~JL\JNq^{ $Y8hni?}_oGJi8͝ |ukAvLF$k EK0|sc î zC kWƝe8kIboWO;y/+XjlV)w2{de&1eޜd奨[XɢQHV,Q󲠼W7-k:{yU+ =M P Ѐ iϙT0l6]# I״MMYό1޽{VzC;;;E#]bA?X8]p͵e|a_}ݻwu||֑'4 ;0 Ս-i4Om#H3 ! +\7//"-~08wvvtzzr)E|>ԧ>>H.}hva3.0ƛx?0q. ! &ݘ0 *&wq5woIP#7G*MSk#%Wo2sy+mqZZLTkO g1cwMaZ/Nu6Ǐ) :TK#ŵO+0уﹸЧ>)]\\(9*Pk,bz<k4kmk ^?Vi~Airg+r\!/+ziB6+J$+/PN2@mF)[άv3Qy^o]~\ը7Uzxx/_:-;,E4{` | Hts=W^9e{{!s|BNI%RRI^z3 U(RF'IY8G{7@#=5$n gssӅ@-_\\8Ԍq҆:Èم'0fܸiR%f.mAt@tt*A[ѳ<.>ZyP$J^ɉ^1ܱXކbe6PA,=4lUտT-7N"cUvxxV s4X;M6fDQd6fa^ȯ'iHa<48GKCw:RmW6e|S~өbg6G\$B1BWڰ6΢M&wCI&>d\XUt`bh:4*,>Xg?H7~f*:D٬kyן_//?ѿS4*h2++8[n>M6nPe4[9w^y%Re9Mu/p=0hH'-6z6wʳ:q[#Jkƈё 8Ө:I9󢚍}@ao$T\1\>TӧO.^P֠f4n+CP`$;~o5|$ËĄ$<) ;-8Jit }l6 IDATr2ܙi:ѓI︣y-4)vnnpAMcǺ@r<U]ןpC;jpUJ<("(*I;#)Ι?;׍A[0Hƌ?po&^vlpچ]\̋~o %5XPq<^ ūnmTt& :#j5I9߾(A+)U zp Ͱ()e5ֶn]ɓZX3+}!PlLYsݚeAjh8ra:`V871˲&YѣG:??w.|C!4Y7 $>`6MZ-mmm sr GR@06CAuϟ19IIփ"3 xkn6kHrs9np1E*EW@EiMOA!.P`Ī;N]1%,K6,B+Cl0@P>vt 5nӊl6 tᆱVk/Zv]r1J;,4F<`FU@4@z]ATSq*צ K7oU+$y>fšCI܆~\?[TjzqCMy Fh@ehi0C92D`RRqa+4=\RYNWc ?\\MHM%Eu7ry_QOhAo[0Xh N-1QݾIJ]{<ӊsI[ƒnG]J*R;'qq): cA|"(w4z1g1fn1EXGgÇvS4 vv:Ԉ>ϩիWݼD⋁UfGv&("FD7xH_}[zu=xXsɽ#zN\QxL:z;9Ǫ.܀q@ @C.@;D wu6#&J32B:88pf/q 5ԍ2 EQ@BQt0Vy}0?Jٰ}w`K2ӷ *w% H9/?Ɍy"Uh7Y?^GJQq@g ɩVʈHHbX7.V(ޞ.//=HBI?5T*j]"9IW=ts}&[_ϔ*Ϳ;r.s/3 d>2@~bc\WrhD~NN?aUv$7*ZڐCu;=G.D:kFm" ~fօ ^3"!zRR1"CgXV9`\tj׿~3ʺ =ӲD~Ë/?Uu[(\.Sx_wy YL&~mgNA(0;mrV[`Xuֲ# DOPF}󲝣6nnnS~!AL% ̆ja5ѧ$͍'Hs6 v(CLXNZt:퉪>SYs}Qzm)*ʍU; *oj~rxEZ%x|:X#ϫ|akyWjzya8v͠=0~FeF9}/tqGe&۳kR+ZuKO+6R@ { QœsYhk&1咺[uugR+ɹbkG:o7tI`F[?;_5.VEAuRviFv"ފ`{ɉF-OcJ/x*hЉ4D*+Bԑd0kwwWfSjW#5 ?tna.k`&IC_qYg>"COM.Z3MS.D¾///Sv_&+\!~V|UBqAҟ9W5uC.;?MQs7B_w7Ojޜ)RE[jTVn_ٳg( UБ5Oɜk4yUO&moo^Ed:QPPgt.VOg&nRZ+jů?g_?:)v;hky^nNa,9L?v#Kiɇz vIvcuI^nI?#7Ω}u:]=~WL2oa~b_Rk09=8K(%0wvv|uh4P.51]2bUիW^lIw/^P3pIA+DU: IGokށ=f I`_U1 s,<c8բ`K+j(,EVD(*51Hs 77ڪcd ΅̘lN"CL&z޿$Bׅj'O?ϮY\>#cjr=)ぢL2ȥM6W@XW rQ}0$XD~*m/ >^Usg*6Vz/Պ:oN~ZsURF*nGn^ynẙ!oTjMS0/2XT~/7OOm?Iun&AbV6U[uc) vԭ|Ssx]L\$*m9?g_ \P<*(5iW6,Łnn xw* (sXW聝L&w{^yϙLr:;;O?}k\.+\w@^c^`r 0xZڠ<wKu[Wc:ZPDQ~[sb+F AD*:k2AdYMJv [8hc`i֛7o<ˉAX=;T܎@OQի _KUEz%`Nh1J~g9x*d ^ Ȉ[PϟlJTZVan :r}u:&'򿫹-NΧC1IPAbRp,˪]S!{_ߪT菿޽=ѤS[9D4b0u۾3%W/幷xR`0*U㉢Ldl6^bq0[҃Ê>=ԯOUzotw.R{xt,y/kRꀹҕaA}j4z9د:8J+Trv?kscLpw%[Nm\ A y]\\6!*CL7?ί׬RYK96Dg{ܦQ>Jg*[KK3 rHsyy!sy8BXkuZʚmllšiOYkh̡X)ApmGj<-`WHf#"XSK AIjEk dWfs0NP˗/ <a~ɶ-aWUfB 9WsfS%=nf(u"!R@FHe"Ueo[ scE.jDNt+LMFRx}kR*HbZ1MuD+O?$rFYAT<3M'E]n~lK6rs|E;8QSUidv:$Wͦq𷷷2rs?: k ZPCNqcd2|%LrVJ>ͦ_߿/I:==MTgͦռxB^{yy/^W HYwOիẀʶFJ%*ql^ODj4ecU׳LU&*oTٌ͈?k iYZ ? 2R<]G [~VIy^+%ΏL ksK0a^J-E%EAA٨lXT&,( KE5e<(Mb7Txᴭa| IDATZIKiCѩM㑦(V^Z֋rDWw'4SUk 0K𵖟M|jGJTBM.q<8j79]5hUaA+y?R}gdgҡh4|I}Z jaaZJ0^H !loou޶,2Pʗ]I,rȼlzjgOSmnn&`!vZ#GkLbH=|PǞ`LŶrLrN!mw5*g.뤕N(Bä-0j2 Ÿ0b)%nTvP-f39߻%>ve+Iis u^&2kiuUֵ{OX=^z]d2~8JY){eX@)J:vww=uڝ!b| 'Uh4Ux;A:c!tXjs"ZKݿ߯60 g<Я?`2w a}q,~A2 *; X-̌ImUR%5sV)ͰCY-WJŸdiL&`[}충N{9& $(V(`yVVhF`'-a[⾽mKr*U M; CjS)ƣrOuZ,/A5ĸsA2Y s"K >6x˪ăDSڞ ۇh/K 2T]'~gQ:FWW, ⏈V@K~BU Xw[ rҨBfMXk~?A -'ް8İgjl?HPDil.R6V:=‰7\kpqj!6. (XYIwLfb`jjEs# M^~C$i?xٌOlJ3+Uƒ tyw~,b JHX4\bHbԟȠEvޠm}pnڕ`K`CHuڱqYhMu E\h}cݷ0N>#V9 t=5 ]\\B"1g^I ZHiaivwQ U^l6!]__-,3&?VjNѣIEŲ3zoj|>}Ouf2}Lc*k(p?(#FPv]Md1Nw\4h]=R["9ѳl2æ0*G$RҐ=,&-2O\M(>me1EJb($n3T@n\t}}]B jy'`g;te7KǬDr~Wi(&|P-*X 50tj,y5o~.H[.p}ojBҪ㒤YţNz݁FÉ0P/NK3'hR؄*rFP_S&0p8vZՕJ$pgx;I #ݏ5)?K%nEa=NmhyZ'E *2uѢ - p1l6d np%稖AURgrwww}[o@j_`\\\x@JY]T?IjZv)&Hێ@_uBFKa2&B0y# c;D3tP0(`,4t`~ %oJF+H$yX?>085hynp|o-3 >]K{]8(w=QOZ5T@t;7=2IƆWF[X*؎=ŵu1c=|eB!P}eonnu4 3 oml6}𺸸н{t}}ki{{;᳏j2xyQ֯k[Y6{&`|>}j}_~ͦ O Spnnn.uG@߿hH6U| ϼ[dt4|CS#{EOF#|](ҙ KFm_fN~|"zM;[q444Y~_ a@@T677}DZW7p\8`Gca3*J \yH[X*+{U]XKUnN+1aXz^ӐpČPc*ML[nzyEcwIEu*¥`"^5>-UVeG:"rZ&t?Xl7ƫE[ !Vs;smLPJᅨrâ+5O4< }g`0r>yyIIYd;IlֻPj5r9{#Az# FNOyzݯTbûT҈7\ΩZ :keC]\\$0㗵z4M_]#`m{{{x`0^~흹NNNS@)Έv/EP`0@@U q0+wb' "KhS±aClmmyN(`q]{g_  J+@cy!Ё'~[Ryx%P&(Pp_8.n2 2 \ ({Oջq*T;|TGf|n5,H*|ݧ Ôc3{%}ښƃX=6rߢ jV xWzKAj >?+R)3h~uA4`)`%\ȨWh1o^ȧ<)Z C, ymrR0HZ}އNgO9ӒQYDx<͂* PWWWCU;;;jZzNǣ}'''}0x0kH`A0VfM#2alVgggvw}+VNǾז!39u {5{8[~b/U;DbccCz08\zϗ l ko4͍7LA\hZGZ[.\AǠHy\,ډعmOûg/0Ro+Q% . Rp*cL@PjDз"Tus/Ѹ /ns굥ݑ&y**eN`VfMY,m& ,δS(4SVuxxv텬l:uhX,^{Ț`m-%WHQS*j~uuMѢ&:>>|xYLK> BxST@pTT%^&Jb_B=]^^JFR@зQ/s.7sȐғKY;P\T*')2QVa(+h:hؓX5 j'yylVcyIw2T]O9O\vؚWF/b⯋2+ځ]*6ƗOn|PSH.>O^JN't}Q 5Mݑ5ryOaCUZ5Meaf=/ׯ}`ڣ͇wڎ$/-FӑHQ lnn=lhiBEO17"02Z_~mooD@d{{{{Nۦ`S r'OSE Ç>)sKEm+Mlo*R€BX-"-D| lUFpP2x,&ddȹ٬?qOuNbB"6SR>bJԆÑiTg$ddWddNϟ?ɉ qٶ\.@নyy4E2E?U7^BmWrMr==Fv Rf]YK&…B.Ǫ~h{ŹߩNa -iVY+z{]"@k:p.Y:ZV'] fv)rMV+9߻x?e4 ⚺7 9Vj6"QP]__$DPG6B_֖;dMcfXoZt_]]yW(7CI2\̺IUW6bg8ӧzuBwͦR1$U:??WLBco}Lfl 1+Ɍu#-i oѹ@@i = RvF5 4KP'xl\K7XEw8zPW > s|}onnC' (^TM&8ׂƾ{ʵ<h:'QfuuT4=gf)l^훎嚢 h(ԻJDˌVWM)ʀwp',;l r:l{teg5* =Ya6է+wZR6ϰ.>|JvwBMEMyMyeUU!WSV!_p0kHUuB ̔Fbϟ?W3I_/"ڡƏýj5Mdf=j$6Mmnn*pо=MJW,;}>pmllP(J;;;_|Y__Ņ𮮮(HK>pجcTt(yoZo]Ȏtzza‰M _6 cz*@E@#E~Mߗu~ᠭ#A9{A0pHbr2Ĭ%ٕq&)ʬ\.' ^ΕJEO>ٙ~gv:@+O@`Ȫp!rt:~/Iln 5Ngr,$Gp\tt Elh2VlA(px*ݶbN_zdpho"p|f?R'6rpWN$;s- aamM.~pswzn5V`}`XRE 4i:+4dsg*'p0RP^t\; [sRwyNJNycc *˵jd; :Ç #fڱlztor,?K"R*l6}% ư! IDAT rKooD/0048p7-HМP5r}詄9ﴡPLR*[Tt=`͵(`5ˆiFFn1GE"m1^g.-$ix+tn1'&Z,Iuyy>mb{ID_ZCέ-'LKm_`4,蛶C^,x@Gx V:==Uu\.lچ[m%Fc9\圊4?t^<}*l!<,US7˽%w ]2Vlݥ&FOKG 4>4VͷNq:e\]~(Y{##EQ'@Y $$vJ.}(Q:nmmė` E k*0@Drzο68hR"j%FW2֐tP`P䐤P1#%!NCeW6Ɔ_~t|AQHP^z^d2_>[ :99mPNTվd2Y (P4BЩqRH^xZRC%lGe/KlszHQ\%urQMWQK84՟0 Hg5qLf- PS!:7'>yDJEWWW-(ONN A`-̺g=iw:??V jGe gZMO<\眯Qhͦ*浵5]^^z 'րZPTaAr6izQA/[p| %Vo'8S Saq@!xI5M!K{Û 6bs+,Ab\;7:S[7 a}2ɓ'^f>ࢍ my6@O,(=WaZ6:= e #UJ5 : )*k*Oay蹨*r$VWwV {ʔ[I3lm[(gf%B RD[ *MEPEX) wNi(KÜ&P((̨X(۷=°#.<,J Lt8щ@"HF; r_zo 11`ntg;39wu^]]immMRׯgݻw>8dN2orHhJ~+Oc]__bB>Rd}8iwwǭJߌv/:[d7 [>T:L&>b!j4ڃf@qǺ磞 d#_uhx///=Cu LS՞.֓>}?\2jU;;;pNNN~ѣGc+pR2Vl I&z'Re3C%CݶoV_d<$-귥a?Vyi<+!X-%PE]mElCrwzU9 VX Msy DB\4 [2`A +8lRKN7Sշw/CFNV~~qVDB=zDnϋ( S$,LF_|NOO nVDmΎj a@0:dœpQimmͫ6e.U?,`_{ BVKϞ=驾+Oۢf`6Ej4~aE+a>%WqP\SL2@ET$6]Zu]]]&LN(\y>AB7#s (RbřQz4tXPZm!kp  FT1?>ELAӓdA5ȵA @h'ijڂ޽{©&XV@$$BG'rG5'>zHv;qͽP$lw u ]\4tÉ2QFX4VyX){2'T{~AbR0V6;Cc~lgc唜̭v Ew\z@-buiy w)ɟ5LKwsE3EU zcAFr`0*?# nu~~C$ά1 "RCQ=r9zhZ,[M07EQjxETT<}N.۷o|`3P?Z>Qcr@'zP777BTIO:?5xRpwff?=h *kv& }N` .(P sNCFb h >( ZKf>Rzg:L5f>РTk3./\D+*ջw|U\ 207 %.5έh!ɕH&(<' uo4*j\4OT*V*dQϩH {\"t綴"39-2fт$ Ϗ9}qH XL*UKMr |`\IV;09`vKw$[0t}MNѴ~;FEMG9n'gKDYs xD%΀,tX=пegwɓ'_Oa۷^7͛7^Gi>_Gk&= _C>yn#rN}xx2xFem;;;SzG CVlZh.#ZEA1dmGUT!'!>$.{4IܿǛ( omG%8G+Jf`NFň&[z9p6qJ"Q yPail4LI)vT#Y-F77Y2^j^=~<7<-9 ҒAu 7zE"s͋A4[WJLF* ' Ì-ڕfwԻM?Pz~T̡U IP r2 o ~MYEAjhiX.rvnNr.be^997:̳1Pm^a\6Q7Q/#7ɩZ\W.WsR.8<61)A ^\.c/Pd͢k@ZDРwEյDfGṟƳa"k7t֖RG_gL,o{|| ,aZGYZ/ |d4<(Ȱ6@硝Q ~y]eKyө>|m%ɬFǩV}k[k@bEeیX٬vvvtsso0~~ o0|+p2;uHH~`ɃB?.\mnM<? ڡj(mu.vj3PS":u 8/Z7yIܬKxDu `"]C YM:9r?UZH|A|0tRE,|:yxx*Ri?$ـpZ4R BcXgA8)OTM$٬{LFNGo?V%ޠ)a3k DChuDCW_מPs_Z-mooK$6Te.A1YG*@'(l-OHnxwѷ\LpqCގ 2q-0.^7MXn3rֹVxqPdp?AHF@ ı`#/ӧO׆  z j\gez 6 |@ϴ.pV d|v?~()=K}!b>QZS&S.נ7R5;@ӉSZ];R&? (aj^Cwmf`hm^%H{pY5V UP/XL#rM bґRA7)Z=~ApGpt`~VXN`'NʂH괜>P碠Q7ҁn.'EN{Ah|-K^PɻKkM-h!( Vj5}֯5S*⬙<Л7oT(`tJ )Lnp aQ/ۡ7`YUTu:DӋ/|E "_z%s.,`c< >}FRabl,5A4 oF9&|YpP-87)vFUH+ަ0g kl |BLS@υd6N@O5 yZ T$BV)~tts Ȳ@ B>HC' ΨYqcS1$T͖ŒݞS\W<BX'n.&X5+b }ZV~M m@]@ ?PѢVY-Dv&w \T\htZ*Q!/v,T/qM(JweXw|'ݟNOےPn^~^~N{[ONս( " e堽'sA`mʥ'SUҧ3 Jh%"uH5A?4TBA߿Ɔ_ù]^^zj]GGGz|,$>JE3`5nrVD ,uf!iݮOZ:Qa(~":!`X88,1ӔjpOF@@:T`Nn EdbTp #e F@> M@V?dFB#PJr@n~@ 8.^b*ه&lv8o  E9n1;?V(7G$5 ! GtݺQ6[ mj؟h:q]9S>B3(-x$j۴y>HM]BA2HLY./ Y~7tu)-Wԫ[V+,@^QA;tPT!ڐy]4UU* /ղc0K<a)ɹPP@Ab"ő0R:yLV*ւEO'K}X}J"}UT p~p[S쬲M9`cTL2\!c۪\9Y8dUlX.=E&&74.Ԩ8dBPUi>Eqssm]^^*H~1WWWxDf=F[ F;7 d?(t\AGQ8Z/IQTlnnIzdFp,2N8ΩnuzclE $zPSEӏlÇO?y[: \cړ2aQ+ TKr3cF =Uɉokҷ{~B ˂uiAÏmYV=[(ñBU+kiuǡ0(ְQtLN*V90Ho4L9dۥjccnV6"?t,%+Z&yZvzR&"U& B֦]71jǬD wjZY94e+vr*\EiS}@ [Z鉥e 8k(7= F?{u Z AkG;m PGGGޔ?.{ͦժSkkk:<<ԫWȓ@ge Sj6/(N NF1&_ }⫀"1fE 9Zo޼':TZ`qT\3b5P[Ԑ'sN IDATd2?e, JRAsdldTi)MlT@ VLjLxrggG'''  ^0tvv/"9f*rՀqĹ~63miÕKĠnOUp9}iaDiXn1p +aR VzCKX E> 5fҸhZu{=\(̨qLX5"!a#SmZv6TS@,ȼ+I 8כ7oפ}z=x a;M q>StUҵ`(,}tͦG--R$(Cv>Q8|/?)|-nEz򥇬 ?+h(ݻcDP绱۵Y9 _Ë?+ <(Xh ` 2J2!N@^)k$Fn0 `ةBl{{{"aU<|f!# 0y٬AS`#CdG5` Zn$\p?GL(΋3G޾} &\C "QC|brn,灧R{i<(+Pm_ni2wǺվ Nª1LVJ9HZINEa QUD`[ 3p!H0v??$Ȣ<Yt[lӪi`kUun}):]qz@݌&6+<@B]77]E*%4#Wl#6,?"mv@OEgGPЃtuuwy.q`QɚDagA?;;6yrj4|ia f` "e:l6pt6ϟ˗:::O @677=Sv"Rї_~:]e{ίGQLJ%1NV¡4׺vٙt&²^ȹSP6Bk bJoNnx<lʗ6&օh][(x!l` *_!ٟ%!d $vei^DT43ȷnɓ'~(p |Idţ\+#+|᙭ e `9L3w8Ԡ?V j؏5MTWfY 7 U)I[LɠuI:Hb)Lt,4!n(jPtS*rh7G~[+-#`.5EI)Ǭv[%0аtӫ9 Z n#i\Q0j؎t}1䔋*noU w:dv&Pl}o](,0BAS6ʄ!+奯yyи`Pa`/^ Qr9Ó BxJ~VDB` yyhV'$b/Mf[u" wʃFG&GEY!Ct!Zrz n_ 'Xޕj܊ؙ ,jo TFvppǰ`i$p $[T*:==|\p0RTt"{#SrUunʄ.(V-Ng|&/JTjf[K⎃ 5'Gzut,0-  iu]\}WT Զ<k8peX» iCeݺ݌]RP&,I.Z}e J '*{q3 h480ອ5n^`/?cqs˗/}p?<n(5?9di(xBK`DKST<*} 厎gCAϵGb*/, < 蝄 XUx.e$m@(áʥ FX٨(ȫk2 ˔5OUȕjK]^q$kG--LnwH(<;3thx]z Ai l,SUyiemb,őb(D`#) Bĭ2O/z@6b}:_ ଵ5n?56V;}uB*Gl5RNjh暏}9͂(N>"1 E-$ć f3πV--R/jd$GckΪ*kՕkWZjt"hvR*W@?Z/;ũTm.ڍ(ߙHχS#acoTͦ ̖ۏ~C;o)wќ >D^?6؞{wߍ/"Z&3]~Y+5H{sGS'$ P3/e[kkO[kGOQg [{sA,X{1qݝ& |"-CbRvj =4&'WAOSuF;T, GWj2*NuUiLUZlTmjetausD*FCF 7ߠdmQѿ¡oze~ߝRB@%hgY5xF#^ʒ([QVիTyrf׭v}4j(fws幫/P=b Bzi fd̋ iݻw˖$uY  E:_q bRv V24 qtt[OCnؗ `Qӯ4p,)"..iF}}8,EE-L7%oVjA[N9S& dY>x g =Xd GYQ.Hwvv#BG- @0 Bf0M{\YthUh6CY\\k+ׯ}6mɓ'Ye}&bLB:j~p$-g899r 3|>}t:IKfC&Äc& >9[.P 1Pw5Z`q p8(BIɡ拥MͺVemreՉ*V$*WRWML=zne;)-J~2Qh񛖢e~k81A `lhh);@^𵿱@tGb_Jg?6ZĪn`̵EDSٺPWeZk==|f><@];=d8=9kC|tkAi3Ă0=XX,K'¢X:p#&C^jmP*zC R{RAAHL &VU{Kb6 "=s l^4,oZ>d&'pAءIUU铧]B!F#$$ o->|P4:==˗/}b$ƨD6b2Ҡx_$^_ޚ x DCjÉ{6p0*buUW[Mƻ*W:rěH)T(W]YmFk_nZ՛NQ>H{4:*v-9z%]z2x3߫?~D9S7C$*=Mgi}Z.i՝QT/SuHYjJPQ;j)wkm֕j2Mɳ\wwzN2@V_ B!)B&of$XJ/?l \Ϟ= Cnoo a+`Žq8}O/JJeC_k/֕eY^. ڹ50H0=PHGW}=DJّvot0ʻc/~ǝ߯淭VTWUvZwjTʪ)#֨.uV'JDWWf6U(61!OfŖ@Z}~~Xk^oi@ƏV.Ύka7>~ϟ?{F3310 1؟g}'n$8P_CԢyZ髯gJ,-, ё|C=C;84GvwwDx0|ooϟ VS$,_M=-s !ς=LSEQN`)`(өV$...ttt-*onn|R"???mMmXEQ>γky7"O?9yg:%RN}KFK'3% ,~/ 4u}/!`]b#bDFᡟ4AI&l k.1_e! tЦ; $(rQz萜xWhHݻwC3¹!OCTJÁ \cG5syV{h%q ێ`!(9@ ;Gájtzzp(2ZV ʪ5nX5ʍ\uQH a"E*J:eE$J2(n\$Y'PT;;{x4VVڮQUjmݨ6lv;Y۪S+kY)2%QdLIeL$ʔHYtzzkF) d`0Ǐ?xƳgDUI(7|ї@M&2z p?&/̰ 7'޾}GHEOcKZz;tF[CmJ!s #6^]H mWgT bP>͓M2`C ۩BK$ԍȘEoջigba&<}KR.nòB8"MC`AWWWͲh1m`G, Xitppu\.edT rk r{pyUdʺUVIk%iu"4Kd"di6JM)SSFUFbۣb|Md%}Xű5s2=r66=LѴGf֚kԹu mcյhkFs]m)IRMHFqz@Ų z)%EZgΑfm1ӃP{+Qв(eo-qa2G0 's4Muyy4M}4 KDQ3`0yR$ znI~0=L F{g"A kr?>'~{9ы/T>N.7lf:88!5_g8a.{$AeF 6~Y^@g9Ak}I_|>L`$l]9 z:\ϟ?n dQ#FQgpAYrYy@Pho"BC(A+p¡{ >!ʧ@f9  z$l'"iƿ((/JcÀDJI*9 [yB,:@ʻ%lz`X pdGGG:;;ۚ<ͼtx 7s٨m; +M?~PD,]DTU*jI"ۉܻ6ÜۄrMldm*cu]:")a|f'qd|!cgFmJ][m|a-s*m4(r>rD(5R-i&Ñg5BJRwTiSV-xbxrƣPJP&\H/d9+p ˧Oz8+l(l] +h/,[...t||{P_xo:;;Tha'OROYv|&ywwoFE pwHs PP塎/Rި 8qiO䄵f5Zjx|xaG::#lW3AP jWڕBL >j44 xh5, }Qޔ`m<IoA@J~ɸPds\Ȓ_? Sx:Pq> bTldZ@شnA,$(zׯ_opQ81T{Rǭ ZoDQPKPsv?,Q*DZw6u,őr(dU6 Q*MbuQ۵T2ꚾQWc:dG.Fi@!I+USu+HMmTҨjeUQʅfiU"sj3Vj5ZͤLZ޹_KN?c6 i3MլSY_oҪlcm:EQi]PmEQD2C`-[RFKj1R]ش<{/uUS- %imUץ^y<,\{fPͺIŵB1eu_tr>} pGJ Mhc;|;1aEPEW 3p4@}(Ɉ*Prft)TY/9ɉw gEQǏFr/~*gA(/K/F2pggGǺ=_@0<6={o:<$}P!#gB%gi Go j.Hajy43P_۶:::R4ҟ'ޤ""HQ7r  w8e/G\]]s$l?<2Znc|ӟGM3Ued/^ЦNphg\ϟ?W8Sڗ988lnB[$M&N𓦉`P+~(ful]#5M2}pߔkEQӶZei4ʹ^/5EJPcGLą:YQc޼y8JN`HBj |+q$I<:ޞW$ M>SNNNӧO ' y}#􃾻=:f5FG7kUbf6FA4,U׵jFqlz:юΎGQkFq;ڶC]0*IQZOOް!ٮsdm_e6o+6ָzu }O4jFnE"'rBQdu軳ـ(akUa)pb-m)"Eq]kvMHԝw:xΗd5l"ѕRUlUj$Ĕ{$$/q6Ǿ G!2@g;*q(iz~'!}V7IcWpb466LBPį{XWΊp3 :oB plɵAIcu޲ķZ0TᜂM%28/<ՇCTXx;G4X6b͑@z5 >= y7A7tnbZ$hg %E-v8_t2/䂾_ - C=:H޿tk8PCש Pq*IIH` `K _ȼifi]m֊Q:<:TSURmUVYőQ:YYFHτTG $ PrG eG#miV"u՗/_/nL./A$ 2a1jejSd塨]@p#e6f^ONN~oO0x쇉CXaYU>|գoyYd+1ġӮ\y8h>ڶQZU\&2Ӥs'}ᮿd)¶q(NqʡֶwEpiңZy+Y$0IEȨijmԉd}?f &WuCf^N@S}Iwww* Hhӛ7oK},K_rbKO&UK},CPd=}}@fCpC%OU6AXS j/"G& д@idcVHjL8Cv,,j+ #L___.>s.a#ׂ:B^d,2O)d% a b"4hd;"AƫJYi5ud-FMza4TVh8r&ֺ:pVJDMר(2]e"bL,MԵ,ulB6"$Mz4q?Y9'I[[4Qg aKxM{z;ĉO"w}&,Pn"P[1R=Ǒ8\_tiY d2VY>hZ%i냨S鏆Cu,\,x2A@V1۳u}#dr‰zGnbЬׯ_{v1&=_|jd (06?~-04-RHb$pZ4nooX^3%2܂2%Cn`ϽZz%c0^JF8m0ą)N$3ub,ijC~(>(}+l(5>æid,YYm8&lv#)|-R5Z##>34ɑx!Jސ~BǽhdU\߰gk3}4W J:<<_(_/`Sq{KM7Bs+On-OΠ |1WԳ)ekSEF@JAѷ9Q1h<«񇽫M]z ={e*;%} fèn&2 V+m$r2cە NvmO#G=:vy'4ġg7 8Mڶ񴳟q'MkӸm[%Y̵+!U^dj[AZʲґ7\ƚ6EJS^6 jjd4unD_K3j$rza5 i 4T~F:V4C8VCŋ?b5!%W^eeY-c!n8"ti*{cw"_UUoɉƦ 5?.sܛ_'9)G_8*# Uנs|B',2,LGӁ8iL҇`c7iL)4vO{z"v^5T41 HT LC3Y؃K d,+QRAڥG Fmh4dulrWG$hcPK[V~n22LLy۷ZdHJH]*kf9^?)pFL٤ "]|iw ,cjCT|v8*7l#]q{i|Ņp %a@_R{EQ PӘ<c@;⩉s/ )>0m^~%8ƒcA1:u#65oXlY pTV!(5ʵud=#Z m#ȡ3fvjh}ƸZ/^l =_]_mOdVGjZQljk&CٮUg={vZ)}4:ety6 5MG;uzk{8-#>HyQ8y_y4Kű!,O]5re9xJEz5 IDAT#> Fq8Ha8v?A,CIK&Ɠ::Kͮp8UiQL3W1($4TUYj8Aj0(eʪtf ùڶn]YWNѨ/%$իgAGymj2+\iM=Ezm6V޽{-aLH޻1TҗDO.^ =0P49PBݮV+^?'jwm/CӢ=o: =18mpggǷp悐i,P/qK8ᡟ&atg/g1A/! CmQw $q",h/ 6hzq^Wx5f0C?fDWa$g [aO A fa AdLdaxHk }" cqzJ''' fArMhrjo޼'? W^i>2K=0u*{&cWWl^o]p4i*>PK9TTCUM,UW3heYO&Y4dͲLQ+2zoGnC1T6= ´v j:70R5MbXx-IȔfڮp8P۵ 2w]YlJosJ:@w(Е BA>g=0`C3"R`BE1P$&@sƲ i8d.r~ C]__oucPl6zVJ@ѠQ!CzH5Cnhm,g9s/yУȳ\+b`h*M1u jL7!{z Y@_ HBOY˲SWȌi :==JEhs 62GH3dPؔdn4~(@BԱ^|)v}EZoXM(SG#3Mcif)k[I;mbiYi4(.R%jܫZV`83 CmʵtsC4.dR6ƪyEZMJ TUxN]רwxDBgkձ:'Pg; \q t@dutTZ>jϠʍ,U}[ CyKMv&h4ԎDU1(H\ r*Zi(O{}Bko 2 ٔJTmi8Kٳ#]]_;?M^z5Q٣dޛFLIrлoU7oRM]e:sgQaB'$< L*¡_R ]И>HCu0(.g>5 :_@0E UZӧO}KΏ?z70zaȨ郌a\ډ$f t.uy97&݁Xu&quF7N}̄&Ѯm~@8˲Bˁ _ Lp08 x gi Z"5ghTZmO\"ⳡgBds +&T(к V@B# DZ<]RFA\K`BCP1")|VQ{\~N&{㽽=K5MbpՔ:9tgm4'F6Zkuo˅$`P(:N׶ZVja1PYVDuU TmJ]h]+cE]nJ Fi)w{a:j]nu2zd_8Zqʵ9dynjEQ,Mq gc3_?KokYٽF㱞R@(c޾}6'ch!"|-b765# ČJ-tK =AЋU&o| -P*@MF;/rYy"x55#-sUՕ&l^UC sHsUu 6&WU;Kr>T&T1&I4*rwI֪n*NvV]*ڏLr&uh#JH\w{ʮ;j]k$Y>"e]Zp_3$#2|xxk#M(j.^-f$gGGj!mS^x2d\,UW u$KdĎkgi9Oz@$N\νCY p8|)hRBa GbLЅB#~'Ρ/B3o1Ε?*$Ç[>ӔQ(=ydK'Ox1V'''QeZ*۶ӧO&!|>#otvvEsf...?3 dl6~WW@ljwch]DKMHA@Ҋ4XgggI#g<̏û4t (uŅoކr@0 FT K ~ lP mXY<öq HBK[*O>.jDQ'$0Իp*'$;5/9Ln"'LFVM*#͗sI Xyi?8VosGjVGjyiZs-W+L%ڞwOyQ'zme4Q8f3I/TjNDU]덒,ӧQ&jVM)0h4(AzS)ו$$V=;&ʪVӴ~eY*Y5uP<˴ZU 2u$SYuYi:92ظݶs0\3uU'Nώ*Jbjs~ыB;Ih]+VÑ/3-KՌ=d2fQ1MO9OM3 YD]՚L]~M,|C9IS?@%1!,\ swhf'P"jZj h%%&]+{{{_lp FŽHwwwDZ&.//}'ڔ$9[@Ǹg!*ÃdJq%߀9Ο}?yhXsߙ=Y%LE\0X!31z3~ȵZ,U ~brHPUVCWNm)O]ҵN\ Kwx%iώTvvh(2+'JTE;5vV(rV.PMU;R噫GWI,UյáЦ*5,Fsu]JLJYkXikS9[M-Y<ݼe7'XlZ5^#HWK #eIMY*MRM<͔dՕ&]UprTwwn/sfʳ\JmhgAQ_~Hi;Z_Vbgsٷp uYb)? Qeޞwozc&1}vv-hUbIqЇqWx^Z`,Z6CuNNN! A$R~Ņƨ9C齻NOҷZp cwMyHy"A+5`|Q҇QU83J:><<`Jb-_#G/maUA=#?dBy`A`Ad"4ㇳ:Al$PIP3 X4;ܲ_h<˶˕&rUe4u-BFq)(zp׹&*Gg3NS^-] ԶVetFIhMh8I5PZ=LJuk>_h2j6k4_.!twlɑZhDAr7_7Y̞dD(ZG_9B!Eduws2I5fbXߢ@{Ym;l7[83#Jů ? az֞y%yyk'0CbJ(NW3qirĵ Ƚ8_quuǕ <www_89@y\5Ξ(hx^HEV3%TKP nӌSDkyn\% L Xo;9H9y>7Ⱙ b˕w$3+%kٶ;eϵ[Q=Ѩ-a;gbIbaAc1TE8=:Ye[zst7i:ią9lsa K302Ow6 siu"9ElD2ٕqg! 5s22(" 8_V2-F(B,e~]U S2-M# 1aM*m"cd]C QBc)%iufuU1׃jrKU ]^D9 8mZgL$uHi!3a욆 ˴1N{JF3n;f߇ UU#be:pؖ `[N?^La]G\źN 8 ӴTT<+ GQq Uh)MajtG(ӄ0Q\Qրc^h^]L#u&|'r ӡ{vo޼AQO˳I`N!d!R&1| ʆa׎YˈHvmd(ͲLÐ ]y2B5Z9OD`Y2~/r(1޾}qP IDATlGMi>/*Xu4uӠmi,Ѷ=qB od(U!/9k ]/S*A4xBzDQIK|J yG#8|eUui$ɉ.Ƅz_p}}zDh"b"a"6Tjp#[Ϟ=g&6AƄy]h8 <<<~'dDY93{sVD1YЄR:耹ޕ=}$1c|eϵ3/'cB!IyLf掖lğ[eFI,Ω0F-@N◨\_~dk fdC"P}3 9'2("dt`Dkb#,*Y!͏mKdeܡ؁k$cYHL30&<UYkw59G],jJ, Vr}=@vy+bVejZ]qQ5 !UU4Lu I ]?[1U8`ٖLaE%S ZDQyu, m#da4iX^a`&t݀ۛ[Vkl! bEP <`z v(FI8##4ypZ E]|€(=ie_g٥Ve1P < Dٌjq;'9NPݒ_mRCS+POˋu ZK-+oe51/ -yiƱ^8yȝ7Ҝ"v00a%,3  w}$-^xxS s̉;^¸XB6$IlcH*N`@U0-eY]rVrğm$Fu`Z!M UiDaԓԵEg*KxHkNk`nNR]8N5sś7oq{w449H E,ϟARJݴ݀jЏaDIl0Zp]g=P$Y',0PqBS ,˅8x69"h0-die D, m {$A1ˀe p<աjz8jl[)}blZ,zAQX+JzAzLV5BpYs=i(x,!㸂6<>H!,K\\\,K-s1IH,\!-WIx$1?MFK7<9sB ai{8prr GRQ(B_eѿe}!g.C-uȄeQaB238s֖;MGf '0 q~~QjVy~Z^[BMgy 6U7udd.L#XzEQ¶gL/cy(D}O<͊䫎F׍Yҗq,_а $+ѿ?}" ۲p8E:xd ObZBe˜g04ʤ;+]9BP6"8=}UUbJT>(0eHA!MsfW U_4EQJPa(*E)\!bbPi1N00|F{DQ IGdN$Dvt߾} BGȞ|ׯM?z$ŝ_6@d?d8n(3 C1  g3>:1Z#" caɗ(s-.$ UY-9-K(q!+Gq$3*d$/=xxJ+-#sbgʋE.{l q\^^www" nYA8KV1$IG|]$Q~߾}G$IT*5hiyzŗ/RlTh}{ND Q5\F.MO CU?&`V{+& <9.v$/^]4q~~w$pnO--[Nvo߾EUUAY 5m/:bvܻ.Mԙɚ{_BK}w .pdE V'^J `Q'#si^҆(y0T1= B}a,?"4jc=a=04S䘼(ԀiC42=EYhm*Y, /Dd,ӆ1̀FE(4Ldy*VJ +)Fai /J)I>.Vq,F4w!^b~BiaFfb֧l%޿4M1B@sDJ%V|Cˉ Miz5;jݠjD'';1m(y( m¶ldyqlU3u}do߾=l֜qrȆx^YdD[Цn!@]UCqjA$cur{Ө&7˶P`{z b*. $\[Bpɂ߿ 3it`_Ez"gv*,TnO(A2̿n"y;;;F$~Ljg_BOdF(+%@5 pssr*C%ˠ"q "fEpBdfb'1] H燺p'G'3$ynILZJ$o4eYMsffb3'r Hv]?Aws. k儾 fX:s!lL`)"*@%'i.z1= ZfmFUWxj\F`0L`%j0 cGs]qISq0#0q`0mUѝ W&#'hڳmZeoZX/jV&jvz C?bu1¨VplAmZ5dTҌLW6/fVЧ() p1O@F8*ׄeJ"qJy2sE)砮puC'MvH )<" e!aHT4lj0Ӭ,A!= ii0aŸ'|lˁ{(PSۨtQvl^>UqpLbR=fFϟ[}P:C$g'(-ŠzNYl߾}SfRMZ3*c PLji9>?ʲԻn3yК(K*8ag>Á4Džו'$E$XqψQ˗^I˳3/...~"; ^x.}ٙ&kв`,;yƻwp}} irfn7>"2yaȬ~ᳳ3!|eg'LH/ud[ZX.NE{N%_-79s^z@35yy/Cz\21arg^puuEp SX+O\kTx(Bw{b'mf<!V05[yg,˗H8K(R3Fon0&N8IAyGJ.E|8!5ihʶn1M3hcWYVgZE# \U6K‘aHlSVQٖ|QXW-G)V+Nbmi&mdYVJ(b!͓S߆)9m9-zfŴD>#<_dGJV 0S\$|TȖmD( Jy:Siu= /Sׯquu4a;tG% c6(zr!#x|||n =KKj 5 K<5FFS;ݮ,/ (աR#2Ƚ_N\<$e9n-noo4XD)y-&Ffs]J2Ri`u]V'?DTs_A-![.9&qAO'`.v;X KB|/fQc+"4ĉ%{\J5䮆ٳgQf&Gй0eq\F,RL8&Dh5G3wt6W³1XJxꕎ2L^]ݼ!54EڶAwl7#V$ugFLecW KBfByvhb0NL(-Si*#p֨j0u!"2q"īyn$05;$u}aqqL}_Q$z'y^HJíZ rӀ L0M/^DS7p4#/rd `e0{]iɊ#qe)=_m֫(T/:_(#QK|~QՒTd0G@ $>rErPՕBg2-KB[n*((o߾՗+l7L-mςg0 hZi~̠܆)"p<ȉqj#"SabGCϽe} rJpY0~ׯ_54]c$DooouOjUUxr&q&<> ﳰs (eQZYwu˳t2U&{`NRl~א9YȮ &)vZqaNZp|ԶѰnS2$KN"wɜcQʛ^_([] / I?#YXOyw4L!<$62E qaP nɼ8i&е-=З_"wh=(y(+a(FU$6> ]'R !TH[|?iuz+OxyZ6U~<0 a:A4HXM>-ڶA(KI#,Ĝ,iX\ਸ਼iqLXdY" ЩH"dZL@ѧ:hN߿_Kgʍ-Z\/_['1DJPd0p]/^@QYk5 eiNAaoeYaf 6-lV(B^m9l m[\]}ǏP7B|uz?3rnkUw'zY[ˢ(F ] rؖmLdŴ\dYaP5 ڦz\YܝfLdzm +]!QRI\ZLD%\Ngp N'=yaŇ (тWs)$7_=*Wg/S>|5P*ׯ_kI+Jg'wDL/,w iq~~o Q#;;5Ry!qfQO0/_۷oYȤ_^^J.($pZ%DN%qiM0$75/&Y,iIg'mvY|I ]jכfұf׻$:Yf% ;G/7&T\䣬j&ԞYñm?cda(E٘NVhUE2P< c$옡:lw[dTw_v' nZP5y_E4(qi"N"4Y/.QNT;prr򤐳͢!HL$HO>i{fo|Kf~KE( <%㘨$%ˡ&Mh祢{cTO 4JTq<$MAr 6v,|Х)ca^و+fY[V H޽ӬJ0~o䞃{-X޼yo6H" &Qb N),5v:!!~>2D0vLc!2 Ba2'IͶmqg!>.yX ӲQt]υ,71( cx<+5 |~`۫IqM<ôl=up5J`ܶ0,5,UqlV8DBvh:!]JܥDT-Ry$qQ";xse%6Mm#jSx \LBQy~)Єkȳ ڵ^Ck[èT,( TkwuUcƌz1^ft\2Ie,SqNy9ǺҤd9lѴ yR&2Czć8=tyeZ(덐I|t5u-d7z0bݩ^a㪪tP Ex릗 'ip~~wC{Rr7Jݻwxxxx#nnnP׵J!N9N yϲ,˰J#O>鉔$'pD7D!|W*u|؎mLj84K1|ׅ8SErYAE]cTп8c ]75jUhZ<ΏǣOᓌ" VyOp-ưN\Y siv;-⒙)}GQ}ykH P.y{N 2֋&d _㾖7(/s.} n[ StLNǏz>%eLԶ-A<)>NȍS2cUƆ,I膈w>'I" {?~1=t{0,?M#:zdi_jub .O@pEYi;;1J0M;?=G%Ƕ%pbup@umek>UYc`&v$߿}׬jvw=^ FwzG"j'+Y0r6`lEzLH&uJfpC!3- `qzzL?c8]nQd6-,90`m$l q1N Bwpf{UV*78J ,z4J|װ^p{'|`?81Q\GZ%kc*اzP75׶U%~mad*\Q"Ms/wi7<qwq|;GIF&5-l6xxxM1> y&q@Oh3" ymj0 ;cOđ}%DJ%=K(g x @pjRl>NOOO;n`N^3Y_|^L708LJ"40DU<4N{rgbl[13ɱֶu+Pz ( =z D߶p=_KdGY|&iRUƌm1(qG ΣQ(`tHWWWյw3"g(Y^"uSt:݊eQbxSgY4.~D'Jd-H~tݠ ~WݢS爠/ѵ&(r}.:,LE2aK+[_!^zG}~ẻ䢺c{_,k3Pg9 ],l~X+5`F#N48!DEqX09$> ws7@jn9ɲbaFXd] .,NAӧOV&v ?\'s00? rz%^5D6lH";. C| 0h;c&8Q]|d>`OIҧOJpq8ה ]tG ,PSj##QӒ* X-qqia.䳺?R< QrOѪ"T?m`(U_UU%+L'1*4" J8b ۲uC3i-ȓuY+OU,GxL]4L8.aRI3̂Dac60C kzWk0,ɶDQ\fnī54iYQ7[d90&mxZab1\0 aA`Y_1=€|n!K3AMgg-'=>ׯ??:Ɛ? 8B'\%ᔅ>ZX*S8rw{{?O:ij,KK tR)Mg뾔>I5%1[`A ^Xd ]2:M ikinRBx)5ZL !sBojnnn4l;i(G5F8mRGrW{|U3ى1 0 ~IH/NׄYvtaw{uu;C~ق :1h庲wq\i(J ڦ˗8;`0ѕmiirf +$a mnZ~TA~2-88D0,Y^ &pMۢS:|W{bA UU#R{#)z tɽN2Ib ÏBLX(:<DfDU-P"Fm@]6]õō\\Ƕ0ŽnjMγ\W`z@ܵYiuNv\ eCخv"K3-s]cGjnnXH6;Z,4z1 ;2LdFSp MDx8]TJò[lk!ű7b̃ya /uUvv\GhϓϞɥ Iǒi6}Sq)I䈒$$ >} 0y0¸v999E}8Wq<99͍ðJ"eK$)=qeưK^ 5,$ۭfu_z,Am !?͗} sɁYZ~_p%MΒIl7ٴt>rŎ]>Ղ{2M/Q~⒞tr9-M5rgSNVB)`# ή+I ݰI`c7DXL$Ipuuh2Hb?\Q,YfJ҅INIgz2UY*]ᬮ80a;כy$NT@vilǒT#HoZ74aM+tUh[Ɩ@P M-e`Ii4U YY$eT4l[?c4ò 4n"ɛICMzbNr *̥~kCN4BgwLA'×g!溮 *M e!#UH $m~i4Ɖ>}" pwwzK4@]ReYXܖKv64&0vl4/vٸc\/Ĝ@|><(4gW/7\HfX:Znjl%giMB6m[ *5F,` VC+ rl;TM-XRqQ7 0 i0MyHd %4x<" HMI{KOtS $J`;6,NNNqw{m1"*Y#=+D/[tLT;]ۢn'b׃isE2eZR덐r<DžirE=`k;eф${rj=-饧㇇=C6/'\BM0 5 W\,K미 ӗ;~||T\/si ҮM͍6-KD*zXpqq׀PX'޿JK>~s&.Sp9#$,r9UXpt&TK2i s)ɡgwaʂɖ]ݳgt*=7OnWp?0’gC7m+='5iDƀF6 0 (#ٷkGsVe#hG=Wy4Bp*Ej︹Ans-R Bf)\Ul2*EQ!hwqR20J.*lw;i2iɅ*X4ÀJdA[w6f*SAg tm/eR4-ضi%e(aY6À0 _2yoѵB0;RQ3y1#&̸CK80LQ`lȫFWNp<<+E'jmJmmeU! Dޮ5l g檓LؗAH|=>}(t̵ %sR K"e~\YN]2 =38p]\\FgÀk]xKLh(oʕؒlqvvm1LAim_F%d9@|<۶q<Mf6IL#Ien<_4 Vu76 IQ9P2vmm׸WF1H6]H\s7 /,Գl^.//`d0 kJ~7 IDAT81rν1nq2O(en?CB?CK|e2! ]u-}+0 3<8NbNXڮEưlS dQϟKy8YiR]m q}>0pssq1N#iF]2!e$^φ SYHbQ,K9DJ8+K08q2Ma5H%rIzK*l/RXxm CJzxGϓwgQ3P<qa!_8išM*zEUVh#}"Je15zD1U"%]WEZBl8e VL~nP޼~8NRB13Oq+ d* D(=3a(`vIQcTA rZە+]'Ȇa Yqx|C~UhD,Z"oXqda[82_͛7/ƒrM#:Xbi].!gs>B^K]ך%і&u|ܾ__Ձ *ݽr߀{bzKkiA驎d"ť?,B޽{}6 K (^Zzr\: ,Oڏvk4 ,'2hvq? ԆqgټK2ryssy +bW Š$I)'Ijvk n51 P$Q4'B|.BR`dB"jR7;{.a9k 9 t%#e:Rn@Rů*] LW_`]Dqk!yFSj"+ʓ3Oz&ª5f5"dF,˄㈃8Y=G^D"pŔQ e ;=쒚*I0bm;LK9tcLK7Dԁ=݂qDlxqGi# # ݀a$kda$9:syi&ilfhRU(`q!O3Av|S[,yyV8S*)0c eHr&vA]WLc6j ,ChBd}b&l6{ Cx b?\iV;vhVJ"յ=`X%+nZ#/2x,EHO3pxԒ"!ABaFZvJ (9xHT{43x|ljiuKq KPHmҬ\rRۓtRQ;V*_Bk9ۋb]1ۇYZ @5NcZ5UR9K" 8e:Zj;Akk]Q}ȷ:JTSv*Qt8Y/Btȵ*GS!iZ/l &SEPe{||Tݲ?/ <p 2tj9%yxlj׳$l#2I'' v^R4ޱy䜠{@2A0$^GDDn]nS׳B,{u-aoZ$-F: ZNVk\82ި+Qeo*C2zq5UJYQV?V3-su:]GceI}tס$6뭚Q2|g Фj*Iqq"6F=@f+A:h(iC{Nm*B-zt҇Tf#N)[o(:.߫Zfƻ,l8ŞidPyV?|Лԇ?b|z@BF;^|nuQX?~Wnoo #i1z22N(KjtHpjǴM>>>ZY@^Z%ClZM=+z^^HCwLVe%xJA@אvNxNq(˗O~# -x4ܳ1qD3ժ^~?j,ddlȓ=¼ BӐ`{Rk㥶lDKψTw:CL FzxI&5M$em`CsIuͶVŮ0(rD4˹ʥ*TEObPZ A~WT8RVK!ߙw%IBX1 '^X˂jV5fө../f`zv6W#F!pk'gs}MSnnn4R48çmJ&=-ˠ} ~Q,!(F蓞nYC܂`1tnz%v4tRd5ͬ7֢]}kDB5;yjטؠӳv-YH׈|fpڜ&& ,ba :?.Z|PRxMljJ5@8's znu\zYDR۪i vzR9HrTRRI}>4mX 勲'ft*01 :0zQfh4  ?EЎV[Y- SjN84eC)!ȣsOge4"_mϵVpTBtu e'm\E+>Gvq 2K*JT7n}N f~LD8Rq0x:i1_D nO\x_0ڱRh٨b+F6QkP;^o`0p84y^k>ѐB#(EѾcW7pٙq{Ή%[uBNs<[O^7܋,ѲRWzED96,ļNo0DrU0b/3rv k sdv<,taq?>|4^g֡ɠ q86 c 43pH8lۈha= e^y.'I4 իJNf#BSXHȸf bVr]$OGvlTggjjIO%mT}ŵF㡺p|ˍ͆zݞR={BB:IYV f+"+yaĤv`Vq˨?IUkgJRZa=*0=sye5*Se`b$ l6M!t C V4_,ԏ5v',߼Q0h4VV\pa"8/bf^rZ h6_hu8u85$3ۭJY^O4 .subfZ0oWY"iAjbh INGFVvTx+=>j-@HggGcw}?>cgL'5Z`b& xΟqpF}Ru8 M+)WG켒ڬZBĝZxA$FU$(e|Nԝ $Q5g^mk~!^J5~<UUը\&++u0?TR5hj:JJDfֿ(YQl#5ԪwZT?3~Xo~4ګ'u`( V+Ӛw8#CNF&Z7v E)R2'2)Jԡy?x+dѠUz=aMT[$/s}3D@=IA&$N":_Q xV& ©=߫횀\F&#ȸ/Ԉ?}~>X.%yj'KR {0"8|͡aa3V":!,?<A5eZUp8ׯRYZf[Y#3 guT2l0{ˉ㑑v Ud# bX,#4Mp9E( ~ayF A'?8 :|fe>{FdX,tؓ,bZp>q R/1 Hzw}gM~楯az'gD숏C {noo 'z \,P F3QΗ,òR35t .z1\ax|$zuJ(&1z7=QRu/@uw\T:iT^6TZ*M*:IjNˈEv[E|HN “ǐ}ML#j6٬+y$77/jt:i Soϟ>r#ų&Y2O'eK ,Y%⬀ C#u<#LȢ> *JFHj)Αu\Yt/FPv[WWWajvcpmThI]'^M5-B⠴k^?m;a2PQNٓ,GT, kjQp+w=gXP^<\.\yQZ)/ry|1;O޻v;{sNqjHbAf-rlv#l'L`w]BI҂Cf VZGF#%LV=L3w]u ~ ^| CDL3VPRje5e rj N M>1x<)deτ/5t\|3HVNg  LTe110怦!(|  N d~Q'V^IKw `I0ϳ.AuP5 \X^GIRYrIi[Q%MCr4-X5Eld!D1oN:Q<%///-k0,ȫR[N&A35Ek_9 t6{ynanºۡ6ZS,aD-U%i m#QyWT^4g2oV780A+5YIcz8+DMBi^7˔8.vj%Q6YCi(لyEJݾƓzݞۍqx^~?82$IhRca>d>8fcŴ2`p8{~7ksfPizIbhI:??h42=h@@:Yx'Zv gٙt~~niб Q "zUx\X&0nz 7[4Yo44h6/u+aMvK (KeO?{q HJ)%_/ Hߍ3&X2iOPBx%1A(nRQ{id^ʳ `+d|>rn%KCނ?M3|~!́o63Rп{m_pjju/"N͘6'pyAȸv|>7T*j(nGaP- -A,AoD,̋-({ ڭVˍt:o8k#Et@"ZWAhFBi5UeE֛VHvZobzP09)[~WR+TmLJݞǓ՝BV!"RIVK$@&d@^i4V 2浑}PXVz>W^i\t:ohd GOØ1ègl0y߹߫QoڢRyPVboax:zv4[U.TQ$[WNgZ.W[ga岾yBS8',Zd/W+QݵZKIR~r^, Lؿ\F `IkubiC`ȥ.ϝg}k7l8tT+鴠˅G/$jŒn RRo޼駟,'WӖX,t~~dLj='4INBQJ9(zKV!y h!O!P7Շ'd8qzjɤ}2J9 ֋~o8>c xcDMlN75(׿U̲ޛ:F8pԓ`X8Sv#=@ρ?OCM?JyMGq 4)ʥ0S6$ DR^S#IEYZURIb`P.SVo i&CjA2wm[BZN5wj<ߨR ,JRt4aZ Riܔ6֛q(AZF ,\@*sJ[s'^Yŗ` 8;ALIr8E\`Q&YoGEI4]%DY=|NyU0pA*KZ1"/% TLWWW| \_[u;_BJ%j`WCPw\IRÃZͶju{J*QY*i:*'T2ͦsyQSo44Ol "1ɝV'āx-KD,8LFgtqqaV \7_$ItvvfN }QaIac03CfݝieӰfio3)p  L*F`&#6j8q2wjURIk0 q:hv8RV lYJj,NK"cI  dǓ! EN-W[JZU<}6U$wB}9J!Í] {G4%c; h$AE Ƒ?t(xYXOB`!F3 |nQ( N뵾^UR;ݠl?LJ'E ͰFCRb#2qoY.1D. .蟲 h}"ň" -M&@&bFlC!}~d|P`h<?!FZK }@Bd8gU&ӉZR%֟::ڝVʷN$v{M˥Q5-Ѧi펚͆kFޯ Yj5pةGզbݮPJr<˷[;//T$D7^i4jg_d|_#}o70 ^2o:jsq ٭T*7X9A,a&_r' B!$m6F#Ee~aNm6W*"AݫY/$t@ZZ,fAN;!yNU夆fvن}^֪g5}ެQZ-}ևh;6jNlѫXJJ,l69 _ggg>|nkYG˥~G>Zk,> $&ݣ|h``G2xOdb\Y?l6?øB:Dmh&@'䎢l@Tp~h"#q68Vz|+9 wmGRȌ\.-# "cqxFC/_44djjv8}.%8=D/@ xHG1'?>sfU^__k45T2$~ڰ yߩU-KfY‰ vǠ(b"35+Nw敊"0_ժyO.\jU9?<UocI!PI)Nʴne UN#_4Ԅ=jUז@"eJX\:.']\\\X& /[)|*XX@}8q -KԐsQ_^^jX<%Z:M$@ -8<4z!Z mSfia3LT %"z]?6dbh^eZ6FIᅩT*ARt6BlXEO5ʥ(mXx2V 1w)`%k[*BgegҴg.$Cgq QWju7Q۷z̐f ?ӷ.P~LdTL&zvvfgBY  hdh4r$OĈCڟE~)hQѨ9 ̠En/JRA?iM^x'jڪTkɥ9+UҪ>Z ^MCo8e7|_~EFC>|0tE nr_QJK׿U?~4??Jw&8lgdCVLVoϽT%ϫWh6+H&Z[KFc8H=(SQƿg2?ظ( k'k6#"sJ6Nc0lLثpT ,}+v^gB@O#!p*R[xx0]a?rTt8Tt:f$Du#V-radammDi6Ng(Bv٨()^osc;ٸ Ңȵn SE4 kyZԄz ȫ~ZOXhm@ (hԊC,4#Ѡ}ԅ޷zv;dY/nuyyph"4ROJX"h>3mw+JTVIR\=A9ITIȲb sG#LE7CzSVFr)-bRIR%?2,6M>V;6~D1 ӵf5jY"^<a˾:AlbJpRsDR 5ϟax6HB>BZYǀB皳G+~ %Z..., gϞY}$+,ӏ?J8>vrlprM0>cXz 6%#.l$N #ɖ=8[jnF{ B3AQ]/p8顥Lpbfdcr1d"y F5)U8p<ȿa e~QKEͷֻV*tnUVu8qe6 >wEjZR fU.TB-(Bv>+,IIXB;jۺZ- g8Vʣs #&j6[j5 xo"{d|Ge@}/ WyD ;bzwwg$ri=">T*)JN<I ?bsEjwt\q*0 0!C)!ϐFv*Xz^윅Z3I hc'$I0\ǏuuueDm岊< gq>IA4Юۓ¹9vE Hv{kÀj5UI%'Pbfk0>+hvu}Y=HӚQ:K GvIH/.uh?ň,g¹D3t }SY@)dV槖YW0܅lfF{xd\*6 ؑxgW=hݿ~Z? Xib!yBZmBFK`-'M20~_ "aI63⩁6ܜJHu[փI50O=&[f`| N &6LQ&ރ%(ͱVD`\VfeY-QG5M-Aݬl۝;ʷ"7^kZ[Fuu5d{ T}_~E9`e}&atx—W@æsVglyjtjg{~~G[ r2Iglܐ.ZH9^ {H>':!A iztJKS&SBIZ}WVCRy)?'a,=Dd &IE.#'t$IKc!YD%&e$ ͳύ@zyJ;E gqc q\HLIuz1q8`=RL rϊ#<;Wigd@vO"sY0zƹctnϟ~Zmzz>`7BM2d Z y MJ1^DF 1d/ΟvdN#dIߚE}u6Yzpjjޙ~z㇓`y~W$<#[V&rvWWWbc}pnuqqa/qwΘ;28{Pq tWћ7ouQ TSxyyCW(TUF#vZs@)Qm(^={f##2w`kx;`lJ5?C[V8$1P3Q,N!:ObpX/^Q[uX|p~-e2<(~wwgFHșV?IH-MSx²c=d*u%[&#ۡ.MH3t:5'IDH ,dԮw `$m)?z//$A`0Lf1;^ e6LY#ZLzt:O lzX,LTnnn,zyQ`N~|dϿ[ IDATf;NA(./!A';«h%O`Jz2^??a-ӝ;?l*ro) |Rdh)J k'5".N Vt<=l6-ZAb[ <+ =8mnV( e.<ƙl+2 C]__!fɺ9 w!eE cn{%5XDx7 W2*(2bp8I (ȏXpcZ'D#9C;X=N3;Pβ@]ةQ|gkDQJzwiZ_0,tssc,F[@@y[FG Z/͎ 4 5jq8B!`,6(:zTh42~_5T_в4U< TDj\j^'4 =>>j0X&Dykch]Q~7 p3[`GKɤi";gbH: <5{xA>g,k} ~` > % "@0Y_J$4=>>>ARY֏r*mLD P%lA.ghׄ=ij0Re833R~2+;4s`EggguS m0q3sdFD`g "t1ِ0K6 y CE/kԳgt{{kmh@|4u.d>|.w6 ~L%FuDC3hFK=ľsͦ]*ߧ͹T*=djW_:k&eH}Z Q Vyyi<X@g2/DE-۾5ǐSw4!Kމr+/Ksk5iYO~Ϟ9cMZ>~h:63󹮮 YbHيg?÷ \2}Pp5 ƶ'Ժ޾}ϟ??A@[JԸ56ٳg搰g8p8wZso5u\92 ӋiL|i-F 9A 3a_xx^]9IIzq lqDl6#,$T`{u!y1ʄx&޾}xDda_2'~c n[MKLGs`9h23::d"7<gh!)QbS9d`/LD?{0D8adqzD5L˓<♶~~+`Ȏ=A`^xa7|c3B1J\*y7a0nA7gcq/^ϟm1@O>~h5X{^E@{qWWWv,WI`qTըAtΛ@RAJozU*?϶jσ5McPKa81?*6Mpy[m3!Pb,)rl3B.QњuACl5y.oK1~/'kzmK69{Lu 煨La 2gC`0H#zьf+駟ir1!R'@'C'd6w?icCt$ $a,`\ Ϥ q؃I H~~QZ*B? ώHK$^RiI>9qy7bзgQזLPV>L,bG`#`)Cj4G*H  o;|)ր}gs^)I $ӞO\°8k#iy-<˺iHv;  *J6YP电9_[{CC{4?'C}5$]|GNɑdԴ!#}酫/AXgD+ꀐpD]wZǣhT*3DB97byE\ڼIX99gMdFdɌ- M`O6YT{Å 3Xdr,OV0%撃L4u,bag^(ʄ|ZX+2' J<3:Wi ?z8Cl;hg.{P2N$OV z=7)A(P]hd6gIdb =ri:do~ K4?;8phDWJ^dr%9c]޼y~͐s scZ5D+f1fJBCs厬x0#>V?gs5\@ӦAO ( Kp\%d1dR_t:zxx0"A%H=Ȭk q8cbD6lRSư{,8]893v萉⌱W B;] ?;;36ω"@!ٙsq >}D /_@>B2vPYJ@}'Xf w;1s {A {wqqa9ʅ>9Nu϶džE!`~D$Gz}b3̽ЅFOFy"F"3jCwv2 3~-XAo ^~KH!n|mGԂLZ̡sX8hH xcH-cCv8 |MO©>ޜ=)2\.4NĜ`"cz֕ h 6ԕpHA^D@>u'GJ p=Ф@VO SIY{Y+;~$emJ}`fqK8A㈍w.0'g+xw' A*i EɄ]&3$b#_x[z d \wHv]5㳑CbN P9t"33DR1~_R;M;lO|KL/ j{زeY˗bQQDUx 9P ڦgbm=vݮ>lu; e(~<ЩXFBG 'IbunOR+jJUA{Ngp;߁ya15$ Gyu2&yOy~DAo,b|`/Q>>HC#gYq~]*@a\`$05HłP6_.GNV+c>>>ܗL/ @,< 72ڜ[Zj^04@}xJ?>zN~$+@w50I|{jX]=HK(PMd8Zo7F8kr'$`M!fYf3-a 82W&`@Hā\!!B 6b?9ڗ$@At$ZuA 9, c jLji H H0~LoƕK $,s6e6 'L&_,B09,6h{:G)nJjH-<3ύ8ʹ^~o Qyxx0}vvJ_ղSNd9 Ըl6 ~O&3JdJ|Wp+'fCNi;vk538&(uC@s<#XNf4>ri# < D o7 R|wb#ļh wbΦөu+}~6{۵Vz||4TA i8x<ٳg& B b'P>K2q(*7OS|+ |vvf@bȈgapk-6_^g!I]__?aAsh% ._"pD//F 8rl͛7nFx"7 x재v L@o"Q1$0pG N2&%эcky5MV@{M2M 6 ͍"?jh &dQ8{!%{[CDyk2`w {B'b@`Gpk xE[X/L?, gY>#lۺ{ d@d_FS~ApD?<$t!fd??Iw>HmNlŇ%m0v(PU|=d~5}7!0m4d8UzqLdOZ| RdQ-up@ZvA;#QZ$y(XAVLk l\8q__vذ&s`jF0^ʋ?>}jc,^gO=p4Nx`Z`~#Fϫ>aޯx7wo6&:LO?\>|l ~8!8E&@bpgSӃ1u(;=<<_ח#bx  - @}2Jo@"ʹ eH[ 2l?^uBgU83/_;O?2~83$wᐭY'!)e!xF9jf$q^wx5aH~v I>`j$ZARK𲔾MffspCCM{rH#aѰ^d6% 9+Ǡ } 3laQVXddL+ \Y$^:1Sxvzt^Z|BN|EM(6{zzEx_B7aX}_"lT`e U@&TXW*lEHVho¨=QWc@o0 /uÀѱ  AV!kL'5p؁cyl Ƚe @]Yǫ'*r `@,q z# ;ɤ D`q. NgT|!蕟r sgFE>&Q3fw#P3dk)1dV0n5Sv%(!3hDn>G졇HHG:_xa/]@?Ϛ4c^" gto0NgE#>2%p<@>z"O6}m&Cc fm %$ [KGs?_wSw CBbZ$Y{D,8-׌DZիWZ r=d@8fۋNd_Oṹ`Q޽3#g'xPͦ...bP)f3{S!ڰU%`ؐ@(bm|+`kLC-ϝ.;5O"3aBgǓ@.gxգɜȢr qv<{l< |zC D <(P'33V~wikOpb| q!Sc>PDOGhu``Yu`)K@ F8dl6j|NI(NFG'SK#y=_=*RQ2Fe #aB9"`&է(ipn6=FGd1Ǐ8>rV4'D;nnn`t QOr}Zg(Ƒ :"0#^ B),7@+( D3kY85 xGXgel(6rw.˙ W˾ +#bq@WBWY7?>ɲ= Ẋ|g~XדZ ye&!o,ޡP,P7jW^ )ς"cN ׏?BER WuR!F גQk"z;%0g8nq?`9h^ ۷_@s>xd{4 % i C} D o8/S3CwdM 4s>iށy['(HYw46 _~U^c?l#>2eT/Xę~{1jX~ 0>hñyn0lR^JjO(=~$(Ѽ8qV /74Y{A wA!Z ;{< 3j/'ufxsA ,a0Ĥ@S9ȓ<*Y>(ygNGRؚ/d 18UϬ󓽔*!{׃1 iqPzMy>ށϥ`? 0~C :9 J)Sߧ 'cHH^\\'0^\\v߽Bl6V2_3}<CDnnnl+?`Γ>z=z. ŋ'G7r<AǙFku'·z>X?CQe=\B"@Z He $nX_X,lFN}ck@&I@#`EC@ "IOcNLrPyPT@s/QʪtBsE׎uΈR8yakrd= {]]]rarȹ3Mى!0ˁ9=$[a3Hq:###Ն Af92O\&ؔU̞C65D F SYGK kO򲍏!+<٦=11Q8#᜷`$36==]?D9FhDYKRQUEpzGu!Э3ʐOxtlgBe AΥ [N0:fzfƜgffg"A%i&GYryGs}&ghEeN?~o<>fɆCHY?D&'p`(r~KNNAf84c^HYp]+~=3瀼իӧ\{^WuS—rmqq̂ˬيmfPA@"G!Lf޽[D?GA2AZߏ-Ex>4ȝC!۹jѣcقϓ0콩]^^Ν;wJ3 Q3/ЀZM=p9bމa9IkfwɈF߾}RZ"aY'SCu8y0֦ˍΈ2tkrHY*+-//37 @x0kAZ8677W%)<;;΁9{LaMI!lgebN}ɞid<f1 ׁ~s@^AθZб$1՟MШR2I(|9|z!͠T.ϙƈXY8֖}j}r-3[1==NOOKwA ;Ki`lS8o߾J@OF亸hbtʾYwCމVCb>'R"prBj{;::*6=?H{*(! r INGF"O>v:[/c(efpQ:ZB߼yvwwPPla<Ab F-PJk05{&:r,뿠#z`5(I9]:rN"2 G{e_nUiKKKmkkhL@0@0(=^s)J# ׯmoo_B drz1ؘaY yg VJ+;TV@%a9Qd###mXYY)}cC@K˗/mff4cQ pw<d:8.{vM"ᴉV0Q4FrHK.!kV8<<\ӿ1]fv+-T2_֎!h Oȟ~,bsFe`T5R߯. tsAlWj{k536Rn :k!{nq(rV޿$t|rEB6) ޹s5 /6R_dԠ1;DZNNNvlVierrȐ5P`bb_&R62xE`w)#gI &q:ÇߊNՄ5cyIe @T:qϞ=+ҁLv\dtu5chhDο,H,2>88Qj Pcw,2i T Dz1s純:΁嶵U 9sCyn;8ϟ2 XoҷF~W<]80^Z] :E#V1؏Hw\hgqəV` t.L8lRΧ,7)`OI%3P###myyP vqqQ,Y"CD2韞o߾(J@ e`Ɲ () v?CX`7o=Â="<<|(`yJ&hu||\vCg6$Y- Z hG*b8`W=ܲV Y،κ#EF/K'X.))X+MF!aӂ( sQϑNșQMbe%kAdjڐԐ $_/Nv+i(wIX5J `S99{~xxjOhA#|9cccuPYqv$(EiEPL w^A{Y_>J [p# PL`Ɖb}×?~,.AC:tڂ2TrfA ]a%đb-J5U-'iM &+ƈ$J\ |rIʲΝs:;;k$$Y۳gQ_DF, >>>.%q.zB9(ٸqhѲBp635lv*?,Ȃh"zddf^#q)IDcAO4rNՁˉKʓɟD>HJQb`eS#99[!ghfff1bkYL4i9@VFGGt}& F ( TRT70sw [i!3z;dxfϲv=YƩ;d+Z?Y74mjj n7/\J1uELk\5B-Dրf`Ts_' p##' x7?8/H 7!ֲh(xvYwGJA 6Cav1ɫLe#A2iSJcQcULY&Pe>?HV-gbD96"+o'ڵ2E>5FF`g&):*H# H%H2TMVRgm{{{93zx-//M QNϪmAxJr2+:D=j9Hee[ODzy30@,\1qttT=ǝJu9#צ$ @OiDcSmP!45Lm^]]m[[[~ߞ 8DQ=~lBdtChg 9WIDVn~vppP$_~H$QaeK;D)pfBÆ.)Ji/^Ӿ2Cĭϟ?W锈&qsˢЭ)Y`V_Y3%$dCHɂҸɈ<cmc||'&&j]M&v.|EsA>Wpv.*AdgSN3>_~>܎rޮ9! s(9"Q=}2&̥%^liIMdzr(yq5DAm u{C$HLꝂfLx V6ϊ߼+xH8b52=-s*@P'p&<ڟ^~ [ :!-*Cv}JW+++5;B ?88k96+BrAPDMJ -lnňX+s, ٜCd>.G ``"3}K9˹PiTL[+T'u~؆J4@` L y["(0<.휯P˵鴅> WtRvWWW+P'eeC_v1^fnaZ3p}1e4}9`vc)j7$@Q5Fz~-  `$7GU$wmKKKeXMisVtf " KQy2CN^`;f19@oe.eTc.//y_{ZjSβG0!'m{{oB'(9'}x q g9) Ԯ$իRJ87y%;{Aւn"YaBy?2A`NcS5MY;KOO! Tu ymooWQp,IYhw'HB^Ƿΐ7ԏ-9>>̵/$~ Ag7D9P;fI6.\6sommUΆ#nDA>'Od>e`- 2lIAAqkCDĹ}'Ch>G9߬ P@j]f:^WĒ4ȩ3-#-;:ғ'OBƧEMD_'ttt{}| \l#PQl(%Zz1WY/_A{Ezmff˞Ǐ ޮJJ r||@랥KvNFw]]]: :H=̲Uf#BD' Ԏ!k°̡鴩JՀw"_D@іmrwi}CCCӧuh5VĥI̒%=j{dz>~dѦF.P}E,iSlv - 9/z.d͙L@ )Ϩ˧hwjO7{e`o# IDAT;w>SL-;I}`>Gz΄ϳBO>1a>^mBU2;3 bHxIJCiF-jIUj6JiӥL!>G: ZiB0%mEBF2X# 9sxvvzBNyG,E_[A@Pi:-iCFB{Y+e"Biqk^wRdn!;u) "Pz  lɎl.B"UkTo׾GВ,]MP v[,؈Cj1ӶVLoDB 97uxxmllTPwdd-"EZA8ak0B3E&K/{r<$&5q0dGxh!; D3E"Ӂ94#?cgj3Fm:GWOaR|vvi B8zuCƷ9 W&gY*hB͎'P$EM*1X׭3<pNle ܌8z x ({S geyy$٭KNi MҊ'es6T'Ct:Er7Sx|֐oĞ .5 c&E.&yY]t 7o^w2jWH=&lQBkH6v&s XF*䎡(ׂB ]y;;GrhmccTjAAi{{{}WSL5.k#M655׎499YQ*E̜޽[2ͬJj"yP@ A.2ΌU"省qygf O}TRԛH3|Qy v}sUSfIAxcw#ARh/իWÇ}'Q+5~,B ˩Xꖲ;C_vFFFfeϗH|8VW55TF^CEܴY_A}`uu"No 9TYӧOv^LÒL:lńPMaI=ߍS󾭯z"怅Մ] cR12߃,fgI%u-.k5v_~U̙sD^()[CYlA)bU^)Jp5,0ƪ77;HGU ?==-v38)&,zp-;{i;88.Rj'''maamooWgKupp`1- Qb$y={2lUuoA9;\5ܹsOV-(,;rZbYI В錓<[CdXwi?.Ùcrs `63ǯ_RVݻmoo]__7o޴O>8W?-bOf`<dk}}0mnnzr5P}(_ƅA :^3/P#ԧ 1OVB6TƌOxS$"Ё@2 qJRwK pB9ט#%X-:չmIz N0'պI"rT)L>\:hy D:I8*bÇ[#IiWBa+8ST>&vN|^jڳ8'۳C~7޲\R֘NNNʶ1&#/K*.xpWP-D&Bϓ sd KrJf)E,^N{HY,*ѷ /wE'Aˑ(5RoNןeL ҍ0={ \XTD @@t2?NT&˗^Мɕr`)uW,T"oKggg ܬpSBsYH}XD k<X?Ȇ,Ǐ}`,8Kw(FΑs{W& :t*;IVɶ$HqlDsoM$~W\{5׮V_bUJiCNC ֶgR"9??/+CsA_:U&7η6Tc(GAi)en[4H'g`4'''jB aN? +@>B3chH"8[]|~YYvB9T5|`) v}}ݦ9;=Io޽{W-\5Ay >AMI<5?PBHJw7hN3A.!0f}>ոQ8BwZ@pC'C1[L5;`r2M3^-6ϥ zu\KgTEA*uٜ̰hiWaN^)sɀNq9 ٞMq ͧLg ?19lbesϞ=kLU{dZ {/0!w߾}yM!֑҇Q-~Sֽ"o"YJOف:nLNcH%OtATvɩ`zrT̴>u?tJum]-dmΝ;[' pP Xft~Og{SZ+ K,Xg=;Ky }P筍S P4v@@ 1"d03p !H*XM)u1 WLv%kXɰMs9J799YYB𐟯U b3D[1uss3Dw0 H<|&愜,E2I" CsUDc2!ȘX'#ExŦ7ճlfOf|]YY @DKJtdmtCeRP{zzZsj`WЩ-I7^WsN~xc7j).Çe@==/xv6sp@"@𿠍9&ršy*iAT@p` ONNVk`Jڱ/i @ ׳Ij?>>677FAa|fX!Hΐ7uV|X鲏cw.E`TSP?J9sƝ)$|EJ#YF3!e*9p%B ל(CTq̖+1`'G lnSwzzVVVPP1q<ι"B$~Ϋ$/w0e9<)"q.~7URJ%u8;Ç E95!S~XF9儳۷ vqqTzeQQDi:{4sI8Z sR# Cf (pj)!p42:Y۫YO?UXpS&LĂ-f%v_ex)B_~}2Q]67AVOM$`YX:yyvwwK=F,ݏw-I:IpY3 yvQ3H$Kb$_\;?Y9^,ŮZ߿Z,[QyH*cO3N "űp]`ugθ8"lfh!3 iTu{/yG%<x`VjVbI&)_kA8fNe g3ʜ'?~;G$1FyN!$"8D-YLB_U41]7>n00'd #}uuU 9X&*[]˗r)H9^ШK(=88(չDA<16Ն]g#']}YQb8p~9HǦĐbC+_ٔa ^'[S'V‚P8 v/KYZ{]9ìlbb6<<\3{^ϛ;<2AɃN4D,^ްl$͖D>ed/gIpro2!,{NRCj ĸĹ" pȃv' I:m*zmmmU[{N+F.su^9lH V Sl.~Z6Q Θg#J͑n[ǩ0MNN4@3AQDăe|=;n;(Jn7`MID zֺa~&''e)ŞH :c$ 235V؂[N_2tm>Ӕ=MԢf|icccZ3kyd l@M#F&L(CѦ\ !EZrm{Ѭ@\/ʒYqvZ]GCRV&YFwEI#@auY/D17"0x >AZ 4nb~5ĦW KADb3az)99&3?Su | mooW3[5JR;'XQOy0,MѲ˙MOO}ζEj\:޲^&''k q}}ʀX眽ɓ*9@(e-)ruu՞?޶+ȁ.iȉQ,e-Jp=ՍGGGak1UyQnsjBP$ lS"mJaEl)9;9(l{:9 X*G {[ksR6\{QB5u\^_$csr,P1' qHDi J4aZ(5Rʌ]ܴZ90Eʍ1lpȀql_A2JYaB86DjQL–hzz`jf kxxO?mΗ+TV3-ܹTHn a61F;{e`*SY__onoFiOrR8!ЮȈ Nd $,A1v'9klSzvrr]\\ӧ%)'zd IDAT"è~-//W}{ˢKqnՈϯ_'c4aRwH'E*ik V!qLXYni\Zw;*'&&e,L=yJNU9lezC)[Od)nTJPId]]J01gk.}|v1;.} Ȇl2p b43.8ujAs0R%Ggeq摊H[kmnnP6;\Uhԃ#` g{v%Z[Շw_Qu Xrɛ2\q`&c63Xi* ԛ] Z:am_\\V/ÇED2@pM{C.Rh8mkk/qS53hZK3we}r޽?YЌ_5rlIcFÇmww"Nٕ O%UKw1FN%$Y&:G]u~joscDE6ϳ,b% <с9abp5)6Zm]EiM?p Z⁐`XxR5]uNJ aGN0 8*PowXuL8Dr &ӦƩc3~ %hAfo#`Wp |b#d;s)~?::jSSSe#hNK+3スK`,ض?2~O ⦬(ۤC}V6Rk SΔz}0B9RO>+e+Ȧ5cnU'v2;;[A8 Uuݲetv@y sudk^t[wRz5S -N)G]&?z{688޼ySr"@>O655W\XO/}6^bqfYJdHK:ރQuʇ5=nzz-%.w'\N+>#19緂x8;јCȢe"3ޕ Լф'nSԟ_^^öXnADB_~iu)A٪=f ̟MlMX޾uZ $4vM)e1 -s.kNz!h-<*8↺l#$RtI=z)1X5 ؛XxǗpdI p~1 ,b,ڬ١4 $RJyލvD2 aj|;aΛ7oZk/xY#K=DθBvdSa ?۳`2hR@IU968Z;~ZMk͏?>|P)U$0A㣣6??_@W=a)q΂r Mk2ۉVdsmuu-|xU(-..655ZkU277Wc߿ϟ?nA@ΉL͙"/ˇ@,.KJd me R"zlAu/C}<766vvv*V3^-Bq%8IIA\ϜJ)ȳ*( &sZ9s[@Fb >J5HϚ7۷omaa)a,9!H5633SIN b$guJ6o}fy)J#DDZ M B`?88X)Lc)zu7b)/{ 8^lҝ}q(e=O>m^Έ!97nhr2V7==]םwiJ@ߙtK^sxxm0mI.*HZTʰ$YH,G+jhʙ9A/)^de>KbRp,WQm䤭= ӧ۷omMMMU`3>>^ Y8lR82H>)GR3HR"rzWKbvzW% ܙٽ UD}wfs r˒U8.1i&ErԟdjJ5XlP 4C!CU"QHiD#6iS19sI ØKKK%>[__o?~}Tqkm,̄nv a sm%4hǚOb<c@fSXA$0::Z%ǥ ZpxE}{dB;I{y-Z&d&Y;88>I0VTBrV ;o dsfs"C$3{h @߹s8A,W~)dPH\F<`F+ wwr4h~}A`JK6 9"D@O:ӂ@ƑjR~WիWee_fY ɸϵ&6Fz4NIK D Md&}F:! 8{t!e `蕑g49|A 0j?"5&Rmc0%`KBѲQN)e+bvʝQvQoONNJO$d=23=99i+++EbeY9d-//?V[ZmTtseY⸜u7swxgggh3,9Yr>Q9*Gdq/ H_05/dqju.V|MTLLLTml=!k+'39PCʕ{ plUJ*"RGCv'dViO-h/SrgB0`O'-cq*.66?KG黲fL2v $B"ezD"Ib7 A`lG Sw^)2drԢ$ U/ ԁNI} ܍`%p7633GGG~h#f4tn_+g%LȾ@I@FLa);#1"D%1 pmo dܥl`looqY)SJW6566666*Ch) #0k駟F$>RoBz^9B!>% %?\fWISx#j)Т.o\+#g?YJsvpp&&&*һmw麟FnL%8NBNNNJ]:4! 99ͮctss%Y@'p#_UlwKBkdʴ&'&yH_K÷` WvHET.xYRPh1hqVROTa.u} 1LSa̜ZTD">kX@LOOPV؄29d&ğ੯&eAv5;%iHE-gI0QƳޙ`-*#Yd!PcköRgWJf=jO>`óq>/^g;:^ 8*aNʞF$͌ڝ/A}u="uvR^1gO˗/8daŋʎS:tz?xYESC@/AiX6Ų T#ű'JW S/KŶ')huzloo)jqq}l{)qǐbʂw?Bi]#{ُ}J8tjJPs5ln%777fX]850$-j*8LuṙRI!DR|av.AJ`ٜ 6DQ+vn2i73oOWjADs_=Wfޔ>F"C^̐ec^2]rE,=r7MkMMMs82{ |r\Es=wOr> G쉡vvF.d2]!pγ>_Ee ÆoW9C.IYIm2=?5ܴ/^*>D>}UI9 =<wN{>&Rq=8zZԯv/!bZg8Kusd PdŞY^K5{NR9 Nbұʼn39?>N AH# : -"ϩc {;Y;T-#,dMa}StHGY z 9pF`P):o#0 Ό2SJ&WA)%9nHYdÌcuם&o<}Tؽ`.zq1f JGPu||\poڶCI69::Z5A6-KJO*zBpۧ~.W^KfR 9^ ZnnnڀhC .j zH8ڦ᩵0jl!s:ύ_Y4@&EsxF}0;FGGHM+O<)~vtt%ê^>Xùdj8.G(ÜW=zH HT1@b (>|'*266ֺn(RW)ѣGmgglLEA+ҠǙ cFpFʬCRZ~غ[t0w!Ln ,6C O@0An֣GJ뵹>.л^d"|pEy0Y{ԓ}-WWWmM@.!j_2QRlP;88(՝k1¯4W?755UvBe'r0!:BQV/ 9nX>{mmZ EJ) Ǐ>%7n>|X5y?suuUzω[HZOk7ʶG %C4` W?.s&D:IgLQܱd̾N-gǐ-1Xق cHR{,dKc$0>' rh'nԻ6O)#csޢ$1 'c(x~YڰNOO ) t85_\\>%PDŽ~ec nWwdxrrfff* grLF$"Q @BYR.5A#ٱeBe+ p`*2/{D\Qrdع2,*8g[A588XAB / b;!&9cppח&-!hƍ@ed2@;ta%K,YIAbc_{eT>Ƚ`/S]l='z%U#.={0߯2`Ur89oVZg_'Ǜ-JusrG,C OOOcR Op)#-Pp ҐdOzBhrQqg4sG;6<q!=CNt\Bsul8<2)Cl}m58a8o~*ιd bJ*E}QL'}M뮼uq'y{{{l:5-3Eã(A |zjgff S(2f ,V;@U;yN֘qöj3@ul5 9~.{AU  s6݊-EqyvY:kJKI0Gan IDATe9 YO$RI(ZBə.NāI .]ˏڜzj1 93f" ޙq#czwZZY/vlHCj}HGpue k jJj,r߉_KinH""ߜ|||\:$!9y̨*?zfRRG%#T`qs482O2c6Ø9]F oD{9o߾Tl-c'lʧu,gJ0~+]ck` B4#aݻ*D娐haR:yݻמ?^#jK:B({n[]]m[[[UZwj?s?2`q$*+X&? +њSDɂS-52 q.f%:tir┽gamH0cccғB!uYeXدXMͩGA24?I} sQC$hooO_ SM*Lf }@^DʱZVHq|g• =Eκul;;;E*Tg¼d$u&NNN* 'Rw-9HQc.^<<<ܞ>}>~XuIG{YOMMUI(gkLi ԚesD,ޕ_ݔ@{ yM5iZ2/ljw-ɰe`ΆC-^|Y5`0-G[JQߴR5 9? 9%ɭ돕Ͼ|iTmq6tg[fr{8#7%[M v݀YDJ f󉉉嬽aʖd ezJ37#Z"{9lgD.QzF)}^@g@A3ZcTj|AeS>˙I,9ծ|4eEC(Vo?s;;;+55ί_iHP'zқݻwm~~D`gU7&Tݭ:,aV1`G)$SA^K %ҩ 1 ^T.~$8:Οte hv477WYVMHjPDa"p¢#Б$6Ii UVjA,4`hbijŲ A \$(H$w-Ur"ڢϼ~.![hT@.U X`\=kBLRF**EiEsE٢7zF[Icdd5ιߋ3YсsX}j'$ǼqgMy"ř{$CG o%'^B#/쥿t: nw3e$ yx1;;;줖d+". X9[gCxttT6$%]S>w:[X95Sd=}dHORpxbf]$79~'U:,шc ;9 x8qW#VH(T$k*;cAi9#sPdALǏwpRIO0jJ9L0:RQf$a3Y}98;޲mRթO¹Rr4 W ğ骷cc ve&ɢ]3)*2`BkN9AA!,픱"䕩I@|llw;Y~vxēHPB\ Jkj::ŋ#`muu}Tbc~駶ע!ယQl`qppЦ#Gnj1k~h;;;X4#Uۘ#] H>'Ɋr+'@%j׃IRNr=ПBe cpXwN顲)ODdr`?PCjAds ?"8K!ቸ8$) 0Ѷ>EE{˜}ΖxQ,YL&a C"8+Gk% $(9 ꜰkNMe/G{t{l4vV`6g{|~FdY2[b#,h3`H)Bq817J !!39{I>>>2cpWu9cH[dЪ(3Mg\&6g[Y qߡtBT]ճkTeV)ʖhaS.QkkАWzq4{n{Y;99i_| eñٶL\j< G˗/x6IL{&P0,G`kv677vvvj[.H<'l]T2|D)ZX+A,Sz6Oq} 9є$` Xr)KwA§`B&CD³OOOkӧO*+Nj:XdIfV9 hB!$I*B&@sAAmff2$_Ph FLp+4OA :HB59==ֺ$ܦ@fuwwlӝ,+B%#׺Wk_n[?D{]_ !ߩ\jn$rRHUGa9_NlnѣGo 'cJq| U8>ZLREH‚k3x'4eD-Pl*pf,7 MylNZ82mI˗]$rl=bLauf*6L\tE'`@X|AYMy<1'埄fS LRB lҙaaMRɺ/j*\~"gϚ|{iyRAf;mݵ~ Qi۫K)EisS)GI׫ wZoooWcEg_"LI淿_u,&-Gyrƭ)Āϕ+]gP˓:OБm}}O2n[fdz%{)'Qw^m޽d]Bd{( e mYF*=yH VȾZA .Q=66RN,c,]4W4Jb?gc{d zDP* y (uS~ÇzN677΁]IF9l{RA]޿_}{J`͌'''!猀@"[{M0K֓s2QrP!葟/@ѕ;wm!xȬNj)qfK> Vo5E@ɶdzUoMpfV˲O l Xg`5rKKK~X M pzz~J0 Jo,W%@S 4)XQ- oFd,0?WWW%H/Mx ydwI굯S-4wmniM ړ }777PǻnKKKo[-5+?Pu'BmҠ毜ŋٺצ(,{rPAN (n'&bf>_r{DTΙ" (YϿ":Z!>bev1{GaL`xxl ?88qbҡSjj(eNK"[n[Nfvvݾ}FtT.<~mmm=qggga.A{b;88y((` 98r<|uc#xFgq rR:"C*, f!eld lb}VyAiwB ` U{O؃E^]]gϞUnr8H,a?Ä0ޒ$`/Y8D=|<;37o=11~zwٳgmssO` 8jѣGm{{0f)Mx?2`4k CΩ"MÁ#$*g $Եfad aA{΄rnnqN%ڻw}3c=8bφx#:/o>|vgYpbxHi萨zf ڹʬ$a' h&Q+[²b0!D*`7CC3˗/f`2BYAGRdɉ5r j{e~GB$?<=dQkպ8d[T2春 fXJRy Gz i `,#B)lyV/ s$qٛ-ܽ{o'Ydnaf0[jϳ'POo;kUJt:rttTe,EYCe9!;ׯ_Òipp9Zdƛ] tohhhyhhu:ؿHp\+z=}(N7LV9dHH]TI}`cF%3dDю&bJiܼl&qh0Q;g#]JٰQ{VбK"[O5Ԫ]^^: ƅxT@F!(8;ZP@ xΫ^a͌W%"LCeEgD>D2dXs0BOz)H 002S\MxjSZ:;BNՌB-e)2+@eԈEe7qZ骥rȩY D4/E* IDAT5o߾O<)iS Õ]k2ҙR6bl6(`Q v y$fs9a6TNCG(qȅYvo9oZP;+΂;.okkk(P8:RzellP1?))Ҩʘ$8t$9ghttM rj2KxT$rYJIz&AEP,d<#pĩKy!W3-ڴ=0a8 e}9˱pzdҨ>?9'0 ^6$J8ș sL׬C09vI $8QRj{`Z~R9oƙ[YY3c Q` LhrK׫W]ACf %RSt_eN ?JGjogtvZ nO@\i[R2;==-Yԥ9ݻw59QSJP* $J^hQK~rrR,+sqC; j-VY{E 'fByp/x@333UFFlE^`oko߾-$:Dι }÷aaPCIqf i('uɆs@ :224$ fΎU肱V!qT$y(ui JK˪K; #_]d dê"@~݄,8{6]slYi*+?5E&iC"^*Q}O@KRx+'w"{ӧOz믿7خhfm ӻ10)Q977WsBΓ36lZ2|Yٯ"%r'eCCCEI'k>Y7#C R|߷[nqH"ɜ%kAC9> asvL=&NL=$x޽}L5m) $t!`S ޘ촻[ɰm Yo&b6޻9OWupDZkmyyO>mmm/ YPWw"J h,ӧ"f$ֆAl4MP5D J([n߾&aY?? ĉql` '&3\F R4ij6 3=ou89["Uh@/6RfmrʋEIKcD%/ a R5%Ppj>u@! #)kt> xnYL :1bHbR?55՞`5gԙDdpMɧLmvp2gUdjjy΃,ecI;E2IK(|GvD6e 2)`[Cw2'\VS [腖)bݐs%8G |{랝n[|06??߾|^|޾}*VJNJ*j3L"v$Dv>8:/PNX~ q>$.ܹIE!5c9Zr^ڄqEps|}E !юsDaq2yxsF?(^;vaa߼y vgxbS2A Y3PVSDNFs:h2h|9" R2r1z˜xIZLO@eD8ClwBpԸ>~^zU \,Z7rM1j)a dXH~j.V r(%h uyyYsmUF-u:Y wf}}L B]8f{α19PUm|nn7#꘲a\c_pҡ?Dhr0Zۭ?AK7ZBƜD3Κa|$9ONϞ)QXuuLj${n}}qF#&'˼}"-I,xv?/L(){ۆ2iDc4=r0e8y _qsbB9*.D-4$o{&! )IG);-8D^C6vmvvmO-=epbŹJ\`%2Ms:j>K%'pz ?H^fA8ܤ>1WՃi H'v0sD}p GB0!2C S0 FFF* R~ڗI[/)O})ٝYS1V4Q3੸E>}...K=T9&H90AP(f4T9Oٻ73A,~% 7;mجO lJ LpRصq/e| D*IQJs03ߑ/{oR'e ՝Do٫B7\4)BR.uOe62hgv`l6F.a ]vʁ͕q gS1* C;(z!ð6$ed #r!eX * @Ov/X73$;pZ~zu8&EY(0$jPtLe LTb&''+Sڂ''EJ P)tRCVUIo{r RSamh>{heQ߾}k^j߿/͹s^5AN<ج ~ˤ=Kj tGp+;c[1X|yy uC5 2eON>(Q?vwg\%[`<&Ӗׯ_W- M{o{X r4 #%7߿I Ps@҂$J oʱ9khllV aMf4xڟqjxC6AA!g{iEs7d^p+!9J=X5M/կ |5PGR>OdBaʺ )bcD`8jnv4GY}fffi 0]&'B1QN۩ }Cꂫ}9 L<}mm}2{{{U#4W9`"C=x9$p+HzykuF(An?@` l4==],i(+u>+QƱ %}vv7RZb<#)se[lzEo>k˜IB*!{ia///ۧOÇQ\l1`gI6o"Yvm޽?wg.)%H)+GrfYyK; g! ZȚ_`z9a%;&~4 ݾ}MFvI3eX2`1OSɠ)XKHK V `~VVVR]]6W2"jG&cccugggqV]lZRH_gp4ŋE6dEb%AC) zmʸ%IKMkwfF%aha03Hdn,YpkZ$άL K^` `=pN eߵ.o_l79g[ Y%4CC١L2-ZY3I CXgcbHAΓ:N#yhCFr>,^X]uugMf[lH tSRS"iɂhAN0{d?<5•ryJ 90)?gCS׿%Y Л$x//zlHW4@l8y01CD*c`Ej"tʩ 0˒d`7o 'OnɄ Td,BOP9Z?޽{WzUhR3^oMj (7 2pe`~H}c:jTCuCjP?}I߯+ b,x}29[r4&qL7n_Cmaa]]]eGڏ9||~~vww@0@>< `vvou9vC,r, c4'(Go#[)[|u*{ͶUE Bg8t7tYw/+aMH>Ir#$855Uw.j͎!)Mwe]\k>\l]-i&ӟTAޝH*ufA{"9/RFnMI ipM8$^A7[]&J"HWIԷ:JDsЍ7ޤC>K.hvELC9)}EPgH+7oh\Pd`͈/^0'#,0K9R7A2xuf?l?n>|(G~xm!1@ d9ѣG=B "nk,E ×/,,#H§9k-N_f.ZڻY<I#fca[۫d AN.”:3,XE[U+q&@uܷlK k 9ɠϽ&&&Jiϗ8;;kK+nþ 'wA;eTqƃleI2,X>'p ÌAZWl31ЮK)OO?;d .%J3;v\ Vz)%ي!5nۧY}~ 8td(Sk[Qf`|;j `z ψeQJ?H`彃K0\e2AٰYz0|mqq9㝵]P +]*}~֥9*^ceL~ЦHd},fqqlg]ٳgmgg>g677WA:UJpzP<ݗrorZ먱SFKR|֭V$GڇUw^A-+5<<$---EPp~~^ @ OP@ƍmvvl=RF9n{ݻwK{җiC{R[.PN[4t72Q8a4r*z:dApM5ey@nUǏɓ]S=gREc߿o+++5%>}cOE3}4bӡ `=F&z ^ma%iJ5!meG! GNNNP҂ag=_+ #ګ9J 9J0J•]z";r 6%{|j-e zCԧk:VV7,L>55U[93>ӧO՟ggg9F]lR"#;{vI Nog+js4VolJw2ON, Rg6y(kW&;LeoZ(5zgŋݻm1S=G ONNn7 ٩@MHY MęK:>>666Nj^\\_T̺7-)Ys! ٶ sN[S7ŋ*;Z IgA[m;^(E,N:QZl&&&Q{Q] WN1 p1rٖq>Aad6YWLZ3* r0mw6PSl߾} 57nhCoR9T'(rK2Z,/ZQ?d yj`ѝ NNNs2>pmQIJ+:0#,{9)a,+h&,wSSobkEJ ɱelJl`pLБbbV_j6%9)dA,)(ֆؒ7. {jYd2 J3Bʑ~pz  2ؖ'Oʀ 8듓}*=ީ׶X5@\pǘM{}}^zU` -셝lKcUAmQ5uIȟLC ƨ&[2!2&Ɓ-[BEY֭[Xۗeke\#p9g5{U1ۨO\TY@vޱ~^{moYPP߹srA&uђRB ^_MJ2;ߩ3I57|bb⍈AyPZlWS3Pa-Ö\ENF`I'4r[5e0sHxTA?{S3083{5m-2Ke`%G C*/T@r1zիWmggMbP,AHm g95+dCs28(%_t3'Sq?~Wpz+ɱ5.W8Ky>siE֐SWޙ13dڹscw,CPgf e3"!v?KBl2l߾}kkkkӧO}R={677X`yHZj Jun8իzgV2] פ+kԅ6mj}vx{mmmoo R9`eCv_]kĿjѶ۽{ԖY~vNPJ?O.廱1:vӧOK1 ϐ5q6j9:e h$7'/G;88( "FɸObdifffn@m | kill|mnnpJvn r DJ,>,t0qS*éĘ :44ԆFGGȒr &ND\@v{0B66UD\XQz̐=;`n$ h[ZZ*h9Bϳ7"\rV 0bmllH~YA爨߁e)1u+/@90>>>|PWk'pzz^z۽{ U_ g/3bK4C'#{*S 8>hkkk}S8ܔ'T3e4!L ;̉*vڶ#5z ?22ҞÞ ɲE'{9e>Sv^WFp.l{{{}{})-g)B!C/LmO" B4ZkU&J!kAB&' ifרGP?K6g+!A8Hvo!8ߥldd.ΎM ~{ttTp0C_οK x` T)ax{ZAq]BrԳ~橋ll8ӡF|&<4c!dQamookr+gr <_ړ'O*Of. vxxX,zYz^=Qq0g ;C0(ERK>>CmO"\r3jSt9ҕ,z} ڬ}ح[Jjm=rfi  d7o,9aHO%Ȝ 8ĸT:|$ݺu덌H";Jz{fBS7T#cb8$muu ł:2=з,484Yh$Ur o-c cNOO2F/ r:]@=gp|֭ÇLAI?Ťi }kZ+fcv c"ÇT1R?n=*=huubmMLL644T5>xYRo˚U[YYHX`^=HE0 C MexCRM6 - IVg|\{᥼a # fff=IM9hATL\3#7owU&ǪhK[__5sc( qi_^9@.{!qb,G H8j::8PY3d-d'˗Gq jtt2z_mnn.{nܬrQDs!|ui ^6z>|J*~3񶹹YrLl+)  VΙ^@F,2Xp3N9%[D\='&&J[lqwH=!SF(UsH e$F uvv HwQL{J}(G:wε%ϐ%ti\-x뺯)966VϽYTu^^^#B]{|(+jlF%)#"gǜ҂5񂱴?U;A-..5[''QTQ qk-s 6zjs0N6ljѪ0dz!^a( p7pٳ" ~GZn߿ Ҡ jh 2}!!!tjő YCwld1$g}1XN'gA9|׹S2vT擤(A_޿?~޾}[g}ii=I@I Y4)rB_LY#ɝvppPF`}kZkKKK|uuUi{+E=F~fC rJIrs@}'Uc-JXr\`VfthbbMd #|E`ll7c d؉rslV>~a`HA+ChJӷo* w 0.ڑC~0bsn`>kcDe?n^. $=Gf]j3 _.ۨR9FlAы.ݸ>|P g2oSGg,b%3Xmgg"tH{Qx&n!͹γ(N_<>::Z6;poNɲڔn޼CYl2>>ޞ?J!j2ԜG>$əLqm) anFp(H XMϡ1Afڽg R qA#Gud$aQ__Z[,"P-WbCk Ҡ1'Lۘ_mnx t\:zU zA!-u+W7K!Bd~~zJ%Ȕfn%T dלW>9tΝjCRtF:R̶yL!^ϥr9f¨QtN`J!xTr5YYv ݻmkkXv6$"3N(hqJٲ5H* 8Z"RNi@; ն]5/{YGsO:F:ٗ'Tc9(ƌKe6?>>nX@}9gMecCVg4 Bgr)' $6jUl 5ҏSfd{euhK7ΊTGhpЈʪ9o߾gϞU=qmm}x!6 RžeV ƾ~>~ا&R.KZDdR2U2Z0hQV-|dvrv7iMj!Ŷ5)CJ$RW5ke$G&)6Q3}=k(a|gY( WR]y,h†)ǧجW #T).١x*emRS:1rl{zsY7v8? L0'䠅]AX2yK}矫Wѵ%w^W633B$N6)H> '2\R[#^[ϔ=zڿ9STj-3]eKD" Ѹ֕an0_R+3"MS i5}hڙgw hRe{zvzzZ)r7 ZùaCԐ3WX}rټcA gzbbz/{ym}]^^}B*L)kdeJqfsf:f_-92hNoaaY5 [k+q Z<+/2`Ӵ/a4w? 3Xߟ ݥTb:- 5U ʰkrQ*$˘*T;2H/rjx𠞝= ;Aó+3J(Cᇇ}h E,4R̰:59*RLiKnn1w3ׯ_+5_2`Y)G#M&V Njksmqqj6͛ՑNi[\\@cggu: @Ґr~ Bio2{QBVzݿD"iǕnll677-yaW׿'+L Q(}>YJK ȫ `0k3Eظ6-{#e&9azz4(8$a'^;MHneAKKK訜/נ|[p !35ׯ2XT|{]eboN'a˗e1M tjj]\g9 +S$^={R 9ؑd(T'c9 @RI r%0πKq$hˆ= VV}%۷oj$#;,SܝN9211677"k,I1Ĕyelg9E}6[ Jkkkݻw62{hgggk}I4yΝ |$A8+;"K &`d!$]R ~OOOÇ(THV9{8SA/^h{{{ljۋLh*#fe렺?%`i#~vpp:NOr`N 'OhRQuZq;ٮd\}qq٭ B99B$2.9w$!A;`MЀ%CȩKq +`d!o߾͞Ak8:6C05Y0* *b*X99sT9←4fokC kT ʩPQRWVflAd)-7Xÿ}v[\\lURVI*Nǟ(8)xummzVrV1T&uOqvvV\fjg ,) ށx>q-,,TU-yet:u1d RDJN} D=H6!{yf?~hGGGm~~9K@vı%Mْ%;¦3MKrSD%]A{J]:;VCb߼,!Z*(p1/..  st~~^vA0 !J<`oy9Vlw!d8TX~[:2k4.FNJIE)/5u@K>E?ԗ=\j1Ueϟ?K( 7>Sd75X'4@3K (zi`e|lt"W*k-\/"/¿9:ң9#X~[ߏTsTLS$U9vgi:Pjc ܹӦK/XY3;Zk>KH[^^n?~Sh/ut92Y*zOEKi; JAv8Z311Q2}P|֭_0O*eNIArSdZl FFFn. :ǘ;= pl$ԕz N}aLI"[!Z"B7666ڗ/_*2'T9W^BQj:ԹC[?~lk1< >??o/_,ѷ9ѹIϵ06NOq kQ<2&xvFA&%]VgWQ$mxiל)ARR !H_V sNIa|$l94aB`޾}[NG֘@)J#=K1`f`ȃ?22R8ƍ-NKO1!3ޟ $M^ Ivw=V )ԘW^\2mďMWmѲ#~/999igggdQ>,.<(q^c/>FZ**KY3F ҔK҄G+Na~YR+`HjzǏ0e)jS0n^Fe6X&>bfc/ sdʰ(8CFY8#+L$=99+SZԶN+mxfW @e.WɓjONN!cjj8 2꓅[d\ȥ*rxx?pp].D(եζ V$TZ8WvM+V`cls$H0/:eMw-3֠Gc*s֒p#  zsvuuUoL|jC 8::$ϑp .ȚimwwNvwwq'rtNL)ce{\&kd3S^4W0ttH!rw-,,T/&aǏdj"H &c ͦpEm T-.kCӨ>"d"&TCA^M IDAT6$X1X 7"80)g@9+yff`wO3SS|O2Se2$0e]V-B`^Y5!+F^=Z@YPtɾDgܴȂfff~###5Z-,,s32C*eLԭPk=[_VvǏŜXzZ}A]@3O@O֌S isssuMDMd \FGGۓ'OǏ[l3 ҳUreN 'hYl|LY(B^u^XX(Bg3+ R&SkడsUP7p)4ćRC?ᔊr><݂gggW"1D۷o@uAQΓ,2Z@ B6)ŋg%(w7;uGN%?$Ð}G(Τ.e>)eG 9ub2FIp322*cA[nK=c?a\D=iO{ѶR>CSA [$k@7nh}=o{;2OI*$b_^^n'&6{o/9$4,5(z|.'(I2WKIBV~Ɂ= >6JS 9.];::ڨRFCRRS)+'|vNmAS98V{-a@eZHn޽{}eNS-+Ć8J.~ _ mggjtʕ 8mgXђ `Dц T 3377_&G@'3c677WHH!I8CesB A+!!M `cضD$ݻWzv{ٝ!x@BK,nCoD79 37Ml2ڢ TlO89hdA5+B&K;0^R;kٓ)rlcMh'YqV2U[d~ւ%Уg~ڞ@dzwCNdƂ9E){'r|>! F>&۔r2N,yg{MǾtM0e:x&2HȨRtɄOɎO%86<7oBѠ#mM ={ֶ+M[֟RglzzoD:TpK]nb9$h7on[-Z)OÇzNYL6(d9"$s9#Dq3}k}MɄFvےƲaѬ?1Fm2呑z(dϟUun]O3`qdd-h$T,|^&-rڡl`6#ۏt.[ .E O5Za8 k=CsEɌh/zVN!5V_%w)&/ԙRvp!#mc/l&1"C (Ge w<'UҠhA!Yfpd=8$ *\87!(:WVVj]}"7NJL=XeCF~Y )iG}u>4ꟲA>yRgXO I { OYUBc/mssQ[L;AN]7??_]1I )&i5w޽{Ν;%?V=77WdvO_mmmU&3{nvž6v sq4=A=|!&񹹹>b&ޖ3ݽ쥅)_@$@؜ I@Ս ?Ɉؓ ~]S1 7ا+ KEf*$xttYds8drrhƉnocdRAF=5DE^B#EzT9&s,G}fԚe\,[P|x~r Li:;207Ѭiﲼ\s1` :%g&¯_#Y7y_ZP{] ]B~QiK%3Y?k*:#z_3R@_$@E>k qu^WIL"}d' ތ1U  f(;/--Ij5L3h@jC訂HhrIH"!=z!T MMMIgtm BNbCD$($[d9*ٌ*9V{&B,Ȃ&/roc6'ΉTg8>VδjM oEdZ__Hd9H$]r.)Wzݒe |^hRW!)4<255URǽ7g/ә(%,I`M=s%0N2{]*8=Za8v_$*)Kt:_uHhTy !gBzz Rh+++\ToeFLӌRV0(p-G糰He QָMrɀA%sׯ_۷1Tv1N':Q;g:n[XXh^Ievv.̶x/óW.wwwd9#:' ;f Bк,&r2yS!*=AV#TvRne||8;p*Aw]S ړg *SUOY d}2 @e9.6B#RKJ$ HUl ")fw)U9228œ,] ':#QJ%*IH"K݅`:|S\4B9ԲCh8]L74@vvv*e8Jxpcc#A#aD:d2G*u) X#FLcA &޽ 6D5dϗˑJ9C 3557X@TЕdVzD#C*Vzedmyy3E[__/L}9"tG~G 5D=˙ RAf @ԾG)\ZZ*4Ս썺~ۭ) 6ܻw ^NSMմAs!=-)2{8W-A&R%^vNv:Rrxh~KPmaatl\=;Lйs3'F @)+XMy/P{g")i\cm6?&ፍa86""OIBړlYF) ɑ2lI Z1+i^a) A. ^JyǂeթmQ}ǏfҏuP~Yb+ˌWsba tfz" 9L鱶ZrZgET%c4/_^W i9h9Y g 9B&g=+e̓gݬ@Nܵ<;;qZI_iU1ȮsɆL  @ر^)Yieq = ϟmnnxI)ՏeY<(9dgK6.N p$pAHyf &@U›Z*9( ĸZD3rIQ@#a9V<==$EP48Qkݘi1[rUiӛ֐:3Bݒa&4##29Is|sjw<<<,Qq(9DϚp\%+D /#Dy鉛Peq(rSPX2g{QgTa26/Zue_8RFM{-b:gL x_v$lG=K:2Ǧ&مuwhܾZ^ϊߠh}>;gHbÇ䤫d V0[y1NYc`oG)ɹP <8HH94}C'{[k/IIv<'Ѱ!9Y g6A20IqFz.9ERgD4~Hb"=o'y$#ַv<ȍ3u#7opf MNBx22c@rTd0Pm*,Hgsyj:Ipg;zC@+<<<͌Idh겙'{, @{;w"I(sVĎLWU,yZ-RSedxv#JC566fffv>bQ/PϩX٢F1Κ3F9M{V@ 䤽zwfʣmooG{q2Yκ>A}吜NgPtƗI` s~S0/a$dO|΄ Ptw MR72< Ԗ=1`vYCE%ϛAZ RZrrstT򞜜,a&%9{+8SRgN Am*? M(5~94+(+67ɱl5\*f ɾJ*RdlDLJCH~9uVWZ9;;[8>(0ـ`&9h~VTiYPT?e=G^TtJ…/GiHvcO=2Y|3@&v$&} .x0/* ieJE1,<9uWWW j֞F=֌[m4eRi$7{Pr&i'D!@Ejسt~t:j l޸qP&;!|/ɬ R*NNN|e?9h 2e? 0g...JžȜG5A2ׯ_úoH955Ֆ*)I]oZHoKKKeo0t~lg G$j3TB#))A0AΞ:Gr {}}fggn!_#7ha{I {8f4g.^J:$U.Hze@w lYrR TZr6J6$Ŀ9T-yUH̆lɶA43VVV^{QDe֣EQ-pT\&DM5d1jYX0Ҩ9ܜqX0de npj#}LLL>(HsfR&&I+5E93#Lu:nݪ<sS'q#8Cz(KPs=<茵szPLBI}]PAv{B 'BTٜH\#]?c CX$)V;<}H-JmM;Nɜ0>>~r}$zIj;Hf0sׯ_|KUVYҠ=-(^35HMv= bJ[]>l{{ 06G R#066VvtBqN8}I,/ZQbEZ21tΝ7GI9"5?&4è剫j֘U"@!2xvV[&DVI"2#fvm+yYL;iYy^%] (i2tf^ܜ<b%8.LIJÿ(O\KN`A8C4 i;`5#$JNY666jmyW?==mm{{!k0$%$M(R^W9 9??Z 8αy2 ?gs\5Vl3geg}rGSY?wIb8 9Fy&K,ԁA5PDDC`ǧp ;%h޵ *(sN{ElY[XXOKqϟmvv]W7K*9Djb.KJ$~9w $ԫ6422&N7' a43 }.U4P(]VF0'pꔠ=pKL o}fh<SI6E"hکS1pZv{N`|L"c9㤼3.n.0v,}ӄuEj9L+!:ă,aEρ.ozqqQce(|.]ͩF^p:9*r 9߯>gY$ۄ'ǛLɓ'Usf A"(Eө,1aMhȶ8Uhh# ܀1y) ( e(`>==mUv"E7Ib{Sr=g˅ --..Vv~A56 z)攡OV9/U9+;/DYpו*A8Pv@mXGc;_yksssuȌJpW Pcccm}}촅x;Ev9 Sf!G|+< $-..,Y'- 8'''muu%_ɘb+Q,NT"uVe"[upe0u%˶_J99IP ^ )5Y+BsT8$gORK\mrrzk5)\.?O9,!J߿/-ph UđquTI$_FJE^8s>{xx=zHN٫s!!&7 n g'ܒ`( ^&8UYҡF$!P= QAtop<>YȵagIRCmbR$G)C!ȔS5(^ 3O Hj♙>T9l%ZP OyvCZ_Ѝ%yx?ahX-NQ$G1H6$KkN1r9rr"@پiA"cP eL<%mI9-,,dfx e/`Kρ0*αjȊ,ȑ$\3nT;4"g33&H=y״%jh-..֚?k"y)LG.­[Ǿ Ƞ"%e;H}Qxswgyr֭[o00Uo,,<0{KR-=]1:-Yl*&vxsƹELKɟr "?iʧ+M{(~Q{} <,&, 1/ #]2oDٛ&EDCF(dz좻`)YAôE',3Yf آ!zd`~;99E3HpyEpOꝝh?~,GtumZ \n/>'H3Aؕ ;_[\ytmxdvK{!,(*G9u16 ^KR 5=zt7ߡkSJcaBM N@_.CFΑ`L疦IrFĠnt8J#Jr ZYOtщLg(οX/NFA'~Vcf2RM@(>$ufJ` ⰤjWB'M[% dou9 g3s&RlUcSy{FhJuBH+ѱ켴f={6RSWWWC ;;;1(pK}2:b'MВJ)Q]d)>ȿ=|z8Ψ4{* )[F]_7TfŭS2Jv+B7DAu۴2 a/JBCV6HT\͇㨠G`{yy9&:X1U:06u"_;;;f#:Ӵ2n>k)9 nՙrX; `(D KIYk2Ehn e~*c5fMk++VȀUؚ( 2#ָ`>?~<]\\0y8Z+jʙ;sLS==Jp[[[Ӎ7%v<%P2Udg6m~ cySs< '礪A+N$Ƞ i8?>ؘЙ4\-19駟FW'uhÉ4P-{;Z5@qD;w"cܞ6ӃƌXg@ ؿb1}7{tw`763!Jf\[M .AsiP$Up[96e xvkM"樝gxZ.!Yki@6h%Zjƍڝ;wNZmv._\|PUg!Qsrr t{7&W!-@jDB')Hz92cE;.Ј5 ~ؒjp\SL |XNB/g\Bd\Z*\ ա@9r2W2w)mY'IPU8L tauǘcl6z(۠=gY;QdObΚ~qFZgRO> "}Ù;/af Į%y;׭kngF&=}R4\\\\h8 0^,qX6`|Zj V岁/^ ~5VP mllLv9DH{G4z,c؀~_}մ91thWRu걁7nL96 Ppؾ7oNgggbcݻ7gUs~[qΎ-s4Ȼuk; j)#s` iNm bL|mZoh EwE+{K +vrmDQ6hJ]>mD"RꝼAC~e"IPkՇ;gߓ$XBsVևSJ7o؍{97kܺh(S^[%lxF)%Θ]%QlVHtPP A 0nR,dVMmqkrjr/_%80~ "b"p$074rCp4+ };R÷|u,NH K3,6MӋ/czw@Eֿ8wخ}} ~>N(o=zD8%_ HBMqZuHn+HjZ1&Ck?,bKj6%SÊ㤡zNIge.3&ѣGD1 mP"NJ*ʒEg:5#yFy@rƢ Z=\ p$Dn 1m^r|_N=90Q!Ga_Ey}!`:>>RnG-yDZNGc#$jBz)׀A[ͼ~z*1WZ۾#o#d(89k)L`ݕR髯  c>xb89gt $fLwS>$"džLF8ѹ5DE[JLDx',fSSjxƸElz\s:Ʋ@ZHIm6#BE C*0A9k=hlP.nzNc"`Y+I{Y4SBp ϦOOAehGooV.OZ܋ {~~>]]]pnHQdb&7'*Jg<"*&vEPʈ`.zc\Rt۩}!?cPnr~~>.& v4;ؾ\5@fggg R%y@lnnNϟ?~9w}7 @H3zc}7Q paж:^qTEP8<~ H5bvU-{ታ&zш:jQ~Ȯg777s$ TGOӕnR![O3}gggPմ+ SQEbʔw6+[wԆw"s솳稪.T&=4?°8Wf R8w 8 {;%Ρyѣm$!8@ċu&/5簧i?~<(EQF, VTD-cD=r?h:.P!W9\y9Hহ6Gi:88b0WSh!Mnס<!p?sv{B1@_  q;cÇc@ϦǏOr Jp{0:" gÇ+ Z[ߡ #iG6ݙRFA9 m)j@.m#Y3UUHK@58g(}...V -9J?>"9kkS;#m,4r߿?lgwPBm ڼM9)eخvE\>иBP6gjPx.Dm'ZPˈWuUq_-jG.9]1aC#+bc\ R( T3 0iư7PKn޼9Fk\cw;S6t.o&4AkFӌ/_ʫmHnKwX.3A;0[xzn5k&ro߾tm;m"$xEbήHV#Fq1bL ;6~t~~>&3 88P>Ȕ~b^lr9L5˛cJZwsC@m{YSs!*0!ҮVwܙNOOǽrQJ ?Sa FrXQO>]g9lqZ5z7F *}F6 06}'sc@c R@QK6<0! ɣ*ju,F4b`rϏPPk\C{sw2J#劤-NFUd/C_%aV''Gۼ_4DK \Fa T*v4*K] ژ!K WLÁ֙Zl Ρ=EPu޵PnLw~;pmdC9*?s:YJmEžCLbАV8"|㗮I"/X,`o^󞟟:}azɸ7l 2$d1Σ^J:l EanbVh{{{c A!T^(dY.)cy)Q:o `ۗ yΞ6saĵ͓*Ҵ\39)OExں.1)itetӉL "JUծ>'Xf:H(f<*ҊP5pҡϩ^Z*Yw)MiO[t^!C`(Й{իHږQhpV Xb1 ٳ޿UBhXY.c-P|5%&}?N>4w FnG39 KrRhkmWK9ayE9:ztK5lS(T6 NZVA;sIgNqoݺ5lg}6zj;!ڎgc7[u6V>ɇ:c?Ӵ7XɓǣE;?dI'"\0%tݙn[Rs@D>Ln;BfbЖ۷o@ эGXlma^^R&ds+>8Fu ɸ:^~_~>}:z 3Dȋ!N-1}RaS%adW8̞֭[iF/΀!mDA(\QWǀsu"x"s\퉨Y__^|9ַR{o\&76(aݥc5o1V)Q3-p777GβE,Sl@p"@SUA$ gFtmmmm;$Q=VT'q O<%TmwZ+u0yuu;>2uMNcxTFt~P7—nN?} /..FC#sg3jE,ʶQjn[4II|iY>p`?[.'u}P.w Rw4qͿ1B F*{xx8QԖ}>[$+ٍ:m 8X.#'AjJ|srv g;꓂E=uх1Գ <"S l@F4?+b sT͔8;Ƥ÷R_IeLeڋUJQ*Ď-uY&䬯;)im&Forrm/-ʮӒαng!I8ιme pfmN/|Qݳ϶ hzsӶ2\$p;h^ʢVQNqLI`;q-Cطd;YzŊN=NGiwww<,\UH5_*lwÇBhXvo됑H 0whMQ'PvJv֭9TRUl{DBKr( hhG T ˹EҢ;4; iG]A Cɭ .i22~mCT @*}g!6;X϶o޼9H@Ǒ@_H>򶶶_q  (n^f3[^؞CCHW5زy4 g:R9yH x+m("ܮ==YG={F76>9{kF0/erK$ : kZ ;<}tԡ[˻w+lK8-q:8gϞM#iryѩ*ڦ8b̳ј()` ՎQdا6w||5FU<gYv~zʀ147{Ҟ ͡Enr"45LςD˗d8ayy- =oC[ݹsD9iJeTtg29/8Њ/8 T\`b 9ہn6K2Br܁tZ:L_}({(͏Uv28ֺb'k !7EmnnFaU4 yɓ1WNkj*:u7Is ;`u%wM)i.Z -_bLdPJM/q[Uv)HvZgB[n;{ ͨJO 6Qnv{^΂Rf2mzlo #]ז&} K~-O t\FjG_|1r@9?~ܭm?<m,?Iy\@SY.zy%'Hbmن^me@;=  m,5QQUpZDyyJ?׼ ;Dn -!lu|}S#lmhͪ)GtJ\tvvSk]֜9 wmH- x! +NA){#G vt"j4&Pv#2d́4HQ>cHZMDAsznooLj[Z~top8+4"*Zokςd3ֿ)w]0{-[Š^MCO ;5狢=t ZVuzf"e9d )ݒ3 P`:gb'-"Y3 YLNZ:r- Y*rM{1YEgj2; kPN?iY" Ual&CŴ?giYG[5sY̚8HyPpEX@wkL= ÑoүCmXВ@|0KuC FPIX%w>ơٝErRމ0 ZlA khڻ>0{ȍԁtdL=ׯ_h\Atǥg\p(Y*_[[SzPmJDPji\ +i7n pyE ^eM`%y9i2f ZW&!Wƺc,[Oݶ5hXPsGGGc.jݹh' ݮ[/^~=d vZtu$=88,ܿ(u9k̇)jįvh"?)R0̎cr`)u:\Y<` Y2#RWsFRp0C|UdN]HQ},N-ASj}ݻhe 4`a8F'OcAݝ=([O9;ъVa|WM @۷~kkk` J3N=ojIm7H➥) iNHj6|Ǐ![.pc _ @D?Ym)%HX >`Uԝ+,ͽ{T]E;e cZinctZM"PbtvvvnK؜mnvP%(Z0Sv=,$bN NmxQ®Oc|م7ʫ!wiCZh{y Pvۼ BO߾}{䏽fQbaPF8PӫW{a@ElǏ#Av+f Rpt)M։>qh^tjgv(r o:~P3zfdb9̖iGGUhNT;zNK }Es:m5 hDsΊ@e8 j^FCC%y9o=3)? Ԫh'uEM P+p޷4W{J'wO{Wv?ȩBPzt^Ž)VV9Nȁl{G]Z`yA<i^QXTs5mQ~*sK:vrkmn_@䎍VImQC;/+`E3 .e4.뼖}]B|˰X:kcTb &y!~r<֥S\>}4ꮁǀY;L~ ;4 zGZxw8Bc5nllL?2tBXd֡~:mS #΄g;T9hb>RIEXf/muUXSeZݴG;;;+iu.EҰ6_.3B_vb/Z 4k@[)( u*( @WmIcS}uA*p $r*oD2J UwrT^lB;4Yʶ5g;SAu.R:`Dgz>,DA:UmUU~,iH5Fƍ9;x;ږv }.oɖi3Αַ @}?UwM I3 _fϵskm PQaکꬷ\.G]t<3 EJ^g&]a L?`9[ҴD) (}NmJuwqR(:9|0p8'T /0=f%ԮM8cX4}zX}\g4 gǝ wyfE N(yvӧOÆR46<1H4s|荎k㍊vr$j(e-v MjQ_5^*TCΥ ]""D?{Ff#d³jP~5i3nEIX,~XDޢkݞ=ĥ*;۷a'P%?-!B!6R/Z-⽆ /Bw" ,snQhɶsfkl&LUPζӚ(8T!=/x8+Zz;u |[ǹFQ@eS/+`wySu/Cֽ=w5Ž849Ckw}If+z6#3ufmKl4p;|DShvpbD~ga6@C- .v{094 e[~vPvc*jiFQiKE8gL[zAʃ3va<%@ֻALg€|I*#zdw~m)ssA#漴=n;bxG'8#LzA4[[a(ewM׊=h)2Yj1g>:ȃxmx e\ȝruKk(؊2mjomE ܚ> i7)j,܁6E~eXYZ6Z,mQ"0*if\*}e\ f\Nsra[&HUPAFk0n/'/:c|^IV!P Oz &T8oPx0c?W(:pw[ѝhљȁAtdk *CPṋ;h)s7O;W}/R9CQV9?|4.(jܶ=d[ rH̱vc[.g1?ء9hLK>(b,K.___Wnͤ?ϫI-)a'ZRD]iS@fB"u98C&m䷋cg솳&~ڍbo'9wXs#jvz٢:@N)֛DH5oƉ['m{B/R1DK[Un%HHhMn6NMP Ppޣ Hpjラ |~~"5WM8"|SPHSe:ɞpEe0V"ղǏLժ̿Xt38lHyI@GcP9sޞܹ3]^^>/_}V^//si o5KዾDv/5~gNNY2yL;~æ,:vWcQ+&%Ul:Kr/-@6V9N'-z? \;lܹ3wy{h/jePe~Nsu(h:m/|@MU8Ê6uⴌUR[tNjI;FS8LBEUPI~ Kw4ZlWpQj#"gJa:NZ8@s֦y߃i\#4耺WGj9t1_E2UrJPҁ-yV (Ștsi ژ@w0ٳ5;3vv01mx-!}tu{Z:C>)x֮31|ӕaeWD=bKZ(:L1[[[F)ҀvDq֒B<]si3o_ab1-AK{ Qψnr*zwGTݲ2kmҽՖGv1`|bZw7oެ(]=G[]/UT#Y`W1 ͣ*"K*k9R=͗Qz*m{۸Cu2\ϡ)THekszޡ@WbET>uNyfeE ϙӂ& -ª`DfT>۟ˌ9" کn>Wt879ض6^_GYQ.zh@PekP>NͳhfۃmD[[[shƴ3_)yښ޼y"zw5̕w8z=W|4M T4[|n޼FR BFC>[tuu5 ;mjGnYgy[ZXBXZ/r ޭᔊxѨ%au[ZY z=}n#RU=Ne(-Ϩ@u 7yfOUUUrFB)նmZ6|*ӿݼys5{:=U\U1:;!r-i+O|rsTx~## Dw(=!lI=Qlj;Rhg3 uX\&c*iTt;3=gQ4sɼ1x֯ѽXKG޾}{({Ҫ*0V["\R]Q TZ·FcQ[|130.f`4sjn씗 hMb6T#30<Af 0c[X[HOev(ڨ+EM֋Q!s1n˹]__vvvFw4g;;ӥLiiuui::Tu]+:dr~B+kCNgwM ԶщlQlitekimssdtjFdnˏ tCltKS}FmMiDU>Wg3Hruu5J*D 鵷C ;XZ*j^yE l]6A*]ʸuWJfz4z=mߦ]ŒjY*û bk-z#hc {!n~wv8ukZP9AΠN*.QtDdxF~amM}k罼}j*DgNXwbTJ}kȼkV q^ + ]AfmO#6hڡcZq̕yCwY#Ė6hǖݕEEw_kwij1}/4`\=էIENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/main.cpp000066400000000000000000000036411455567757300241610ustar00rootroot00000000000000/*=========================================================================== FILE: main.cpp DESCRIPTION: Entry point to the Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ #include "QTSampleCM.h" Q_DECL_EXPORT int main( int argc, char ** argv ) { cQTSampleCM cm( argc, argv ); cm.Init(); // This function blocks until the app closes return cm.Run(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/qml/000077500000000000000000000000001455567757300233165ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/qml/GobiSampleCM/000077500000000000000000000000001455567757300255605ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/qml/GobiSampleCM/Connect.png000066400000000000000000000116521455567757300276640ustar00rootroot00000000000000PNG  IHDR@@% sRGB pHYs  tIME 4K$ V !"V)P7J+CR 0\SMMNkDi\*]Å֯ȼ$T޿4bZLۇ_OvE _!o1_ؼ᥍=h@I~+ -o~)j# /Y @ BB"s/)ʡ3 T7>}, BSAW]A&#P 6l+j ?{O ?2UeЃc?P&'ז t[= 05&^o'`B P1"LӸ{AݽFLxu;|pNg=>, (c0:hz@8|R_?~Ȳ Ivl!g|2%Aƃ@8`eY رv;scܲP54>/!mz`jy/|R %HхR@P^\=nI.UQSѯ0ddw{ǡNaB@%Hf/~e}B{~(H "C 33r׾ܰxz}s#xo6]xr"B;G/^hJ\O뇡PyN"AI t)@rtYYܵ⊂P~}% W4 4+0uMC^ =-w^(нa$A ':@//Wk6ہV yIJMo3~/z 39)k}c᪹BRizok[R7?>h>h` 8pIkĚXQSCdcI$l-/\P81 @ٷ_G<JT>z@0`,U3f\lKmO4\lEA_80e{-}N?Nvqe60a8A`s<=EFB!4PP=Zꇕ6ԗv2MGWiL}M4o&s(PR_}OnEM~$[c}({9G][d߇ۡ28xsX3 ?{:hK%J B*&R{sP0ljn,;l<1&3gS .{䎅gvO^@ dJ1T̃.$ҡ"6{O11u]JgPf^tXZnO 8E?wř/PP HɤtKH¥$ᲦTXӴ@lii#ts!ȓ?ʔ*xiRRT}7s )!!..qVJiN;Յ`!7*= 8;V(- 9̮#My' VͥqO&;OuccGфTtܵ_RR:닦8[Wx^Y͛R)Mp]21c b.YV+t敷3FzԳ ݓrcK]>jЋw &C)(c 044$0dLɉڙ ghA iRc^}v;v10ĶӹʓC2ED@h^|5! $pEL]zЭmւ~DnҲL5Щ*o9H;vx³y5u ,?fqceprǘQ*(rj$p1t9 X5{̪c 1ιȈ3 (*:PY rTG^_qTJi|RJ.+̈ɪ T7ץŚ뒌_ RJqs.4Mn#ǛHsʘ]O)E660 qsUa05(a!naAf!q.(S?t={woc'[yy焱X|C=g 6mڴsN4b.!)r3"+R`xN=a=ط7P(\;w=cck>[x{ۿ_KkR)9 T$u #)p{viI)?''۞}Zۉ(*W]W._{iMgmʲ񏛮~ɲe󿚫㸩TjFUjȼ}N-SG :_}#f8v"~xÜ $CsfM'nͻݳU׵4t֦Q296v֣G{ٶ͹a [w~u0` @@zGRߺaue%lDSہ#'@) .9O=dŐ뮻iڢc׶S?&Zg6B83J4#pFZT*u卯r߿DS8 lJ% _x+FkkA&Wha(8ΜYᇧ7N˖Oolpۆ.]g'Buʕknkmmm}\7zL<w'LVUUΝ3+qo|4 0PC(@qJ_1D"  0{z L޴dFa(Ұ6{Mˢw\w۶W:ض=p࠵7߼s;p$R;r()9g3JiEYg1$"i @70A=9}G#Cy .++8qi?4`{Ǝ>뮕KްzS5Mlk%)S9/B)eu C\3kts;~a+€y2hu 1ke߿nXy%\`juEic^)tk<SGK 8jHgފk̚& .lzV18Mcyo um_? B&j_I% s5ys6Μ?Rh@&n;}D,&DoLŌQBC3@ 5ĝW5K"`b)tߓ?Gs٠]mt%Ta 3rҋO@߀w~6Mϥm M)EaplвI\֋yUmq`|?/>a4R@Vjom'Z\t=;З:FQ;{}7t4Qodw@ .QPjFCH0Ѵm.S'$G}-;_v=A2 Bl.{sRݏ?rqgQ _}2[`p ^W*P20BOM+Yޜۋ<{u~gNk$iQ_H@ PSSWWR\<}Pj[q<!t׀PS殸pE+؉nZi Z{JRRl'2g3JeYRJ"d/ ЪB=\QutǫC}i(J]*F%1e.P}fQ c30{+;|Fm>yEǟG)1 yT9)S\ dRJYr?,K1P"R'STT]]`ƍW>k^CX4l CpH!8̹dMuOZkJ)!PJ V ف B<% ܿyJǮAf T8RZA1V|e%y>Ki,*Rr .+Z5mBD4F d᳿޿ڴdxwB@g躁h=}9h]蕄X56O]8}N=h h !QdQ˺O}ۮ. TVP2/`G] T]v>א>rǻoƣAufLngu17󌩤dT(B6 4VVfu4>~m/ooL̙ڜG&11Nj>y~JFUgpE* ~뙝mgvs. 1 cBt%G9К1U,30:@FQ.bM#CeJO&V_=ǃ;88wN che֪H~fИ1f ~bǞ?uڵ]r麵xmA(zh.( 4`ԆlP5$eB@(b^ػmS'?Pwsgox__2xdp< knqIviӧt*K+9YZE*ؤtȺw 4DOh$S m~{{7~˷]颞H*kÏ=H&xatlw]Z[oR)¢UZRI@©^k @˹b|% Ap( Af,wƬc<Ə صpE"ˆ{[;jΐ{577f2Yu$BH)Br}.|,|%m#Pb 䖟 .jڠV&E >* c >a۰'&z'oďz1HJ-[GkRI) ϹBx7c4۶{p .,+Ĺ ²%T>FػzYc]b˖]Ma9 U90BB͛/4ևWwux~Z1Rc\.8cyO^ A V-6<'l} 56H$g/ݗY<}VBk/Oej``!1^ZX,0`<9 `ʝXpj&E}ԙѸ`f{"Ϫ%g,ˬ7<)I$-TZYp~X}uL&3sY˖ bB\BȁARZA3|X,j׮]CO?q1|ٶ]VjCG3{e2sWN1^5f?*a)`v9 L:3ς}$!zlf3;wɎY5jHb:"N3}}}7m`*5Feߠ^jO9mXƢᔗ:e9!: !{'SRm*Pb1q..SeYV*v'ŢSRl.y^.omm[z[x"Ť2765%겙UWm?XGFkWy\^km۶8Ƕe$+ﻮ8L%RI)]=Pbێ-|>2557]݋ r4[pjqA ! LI)E@n! 1&2|W}8\11tcCM7:&o)=ϣ ʒ\kI<Տ`RJR)@Pes8bNt͹N4IA! 2ڲh>35Ȗ)%s Pq2Vϻ]ye`T:JVZ@I:TFA |@/ =_*t5k^VmֆՌ #ٜ2i:$'9Th@0NcGbi_t(a]h]ϫ*Ku .TdG|̙3O7A(|JŢ9K2)1ŧN5kNsSӛlm)Fc \Bh-Jch<8v4wv4ZFz%Qwa _{|Cr<IENDB`libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/GobiSampleCM/qml/GobiSampleCM/main.qml000066400000000000000000000413511455567757300272230ustar00rootroot00000000000000/*=========================================================================== FILE: main.qml DESCRIPTION: Graphic meta description for Gobi Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ import QtQuick 1.0 Rectangle { id: mainWindow width: 360 height: 360 color: "#000000" state: windowState // This window is not stretched to fullscreen // which is what we want to demonstrate for now Rectangle { width: 360 height: 360 color: "#ffffff" // The box on the left hand side of the screen Rectangle { x: 15 y: 15 width: 80 height: 330 color: "#ffffff" anchors.left: parent.left anchors.leftMargin: 15 anchors.verticalCenter: parent.verticalCenter border.width: 2 border.color: "#000000" // The connection stats button Rectangle { id: connectIcon width: 60 height: 70 color: "#ffffff" anchors.top: parent.top anchors.topMargin: 10 anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Connect.png" } Text { text: "Connection" anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter font.pixelSize: 9 } MouseArea { id: connectionsButtonArea anchors.fill: parent onClicked: { connectionsButton.Click() } } } // The info stats button Rectangle { id: infoIcon x: 10 y: 90 width: 60 height: 70 color: "#ffffff" anchors.horizontalCenter: parent.horizontalCenter Image { width: 50 height: 50 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.topMargin: 5 source: "Info.png" } Text { text: "Information" font.pixelSize: 9 anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom anchors.bottomMargin: 5 horizontalAlignment: Text.AlignHCenter } MouseArea { id: infosButtonArea anchors.fill: parent onClicked: { infosButton.Click() } } } } // The "connect" button Rectangle { id: connectionButtonID x: 240 y: 10 width: 100 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { text: connectButtonText font.pixelSize: 16 anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } MouseArea { anchors.fill: parent onClicked: { connectButton.Click() } } } } // Map a property ID to its human readable text function getName( propID ) { if (propID == "status") { return "State" } if (propID == "rssi") { return "RSSI (db)" } if (propID == "tech") { return "Technology" } if (propID == "rx") { return "Current RX Rate (bps)" } if (propID == "tx") { return "Current TX Rate (bps)" } if (propID == "maxRx") { return "Maximum RX Rate (bps)" } if (propID == "maxTx") { return "Maximum TX Rate (bps)" } if (propID == "roam") { return "Roaming Indicator" } if (propID == "duration") { return "Connection Duration" } if (propID == "lifeDuration") { return "Life Total Connection Duration" } if (propID == "lifeRx") { return "Life Total RX Bytes" } if (propID == "lifeTx") { return "Life Total TX Bytes" } if (propID == "manufact") { return "Manufacturer" } if (propID == "model") { return "Model ID" } if (propID == "hardware") { return "Hardware Revision" } if (propID == "firmware") { return "Firmware Revision" } if (propID == "mdn") { return "MDN" } if (propID == "min") { return "MIN" } if (propID == "esn") { return "ESN" } if (propID == "meid") { return "MEID" } if (propID == "imei") { return "IMEI" } if (propID == "imsi") { return "IMSI" } return "Bad PropID" } // Map a property ID to its variable function getValue( propID ) { if (propID == "status") { return status } if (propID == "rssi") { return rssi } if (propID == "tech") { return tech } if (propID == "rx") { return rx } if (propID == "tx") { return tx } if (propID == "maxRx") { return maxRx } if (propID == "maxTx") { return maxTx } if (propID == "roam") { return roam } if (propID == "duration") { return duration } if (propID == "lifeDuration") { return lifeDuration } if (propID == "lifeRx") { return lifeRx } if (propID == "lifeTx") { return lifeTx } if (propID == "manufact") { return manufact } if (propID == "model") { return model } if (propID == "hardware") { return hardware } if (propID == "firmware") { return firmware } if (propID == "mdn") { return mdn } if (propID == "min") { return min } if (propID == "esn") { return esn } if (propID == "meid") { return meid } if (propID == "imei") { return imei } if (propID == "imsi") { return imsi } return "Bad PropID" } // Connection statistics list Rectangle { id: connectionStatistics x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: connectionStatistic spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 150 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 80 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { id: connectionStats ListElement { propID: "status" } ListElement { propID: "rssi" } ListElement { propID: "tech" } ListElement { propID: "rx" } ListElement { propID: "tx" } ListElement { propID: "maxRx" } ListElement { propID: "maxTx" } ListElement { propID: "roam" } ListElement { propID: "duration" } ListElement { propID: "lifeDuration" } ListElement { propID: "lifeRx" } ListElement { propID: "lifeTx" } } } } // Info statistics list Rectangle { id: infos x: 110 y: 50 width: 230 height: 180 color: "#ffffff" border.color: "#000000" border.width: 2 visible: false ListView { anchors.fill: parent delegate: Item { x: 5 height: 15 Row { id: info spacing: 10 // PropID is a unique identification string // used to generate a human readable string and // link to variable property string propID: "unknown" Text { text: getName( propID ) width: 100 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft font.bold: true } Text { text: getValue( propID ) width: 120 font.pixelSize: 10 horizontalAlignment: Text.AlignLeft } } } model: ListModel { ListElement { propID: "manufact" } ListElement { propID: "model" } ListElement { propID: "hardware" } ListElement { propID: "firmware" } ListElement { propID: "mdn" } ListElement { propID: "min" } ListElement { propID: "esn" } ListElement { propID: "meid" } ListElement { propID: "imei" } ListElement { propID: "imsi" } } } } // The close button Rectangle { x: 280 y: 315 width: 60 height: 30 color: "#ffffff" border.color: "#000000" border.width: 2 Text { anchors.fill: parent text: "Close" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter font.pixelSize: 16 } MouseArea { anchors.fill: parent onClicked: { Qt.quit(); } } } Text { id: apnTextID x: 110 y: 246 width: 73 height: 20 text: "APN" verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignRight font.pixelSize: 12 } Text { id: usernameTextID x: 110 y: 266 width: 73 height: 20 text: "Username" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } Text { id: passwordTextID x: 110 y: 286 width: 73 height: 20 text: "Password" font.pixelSize: 12 horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter } // The APN text box Rectangle { id: apnTextBoxID x: 190 y: 246 width: 150 height: 20 color: "#ffffff" border.width: 2 border.color: "#000000" TextInput { anchors.fill: parent id: apnName font.pixelSize: 12 } Binding { target: apnNameText property: "text" value: apnName.text } } // The Username text box Rectangle { id: usernameTextBoxID x: 190 y: 266 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: username font.pixelSize: 12 } Binding { target: usernameText property: "text" value: username.text } } // Password text box Rectangle { id: passwordTextBoxID x: 190 y: 286 width: 150 height: 20 color: "#ffffff" border.color: "#000000" border.width: 2 TextInput { anchors.fill: parent id: password font.pixelSize: 12 } Binding { target: passwordText property: "text" value: password.text } } // Dialog window to be shown Rectangle { id: connectingDialog x: 55 y: 105 width: 250 height: 150 color: "#ffffff" border.color: "#000000" border.width: 2 z: 1 visible: false Text { id: connectingDialogText text: dialogText horizontalAlignment: Text.AlignHCenter anchors.top: parent.top anchors.topMargin: 30 anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 12 } } // State transitions states: [ // Info state, shown when info button is clicked State { name: "infos" PropertyChanges { target: connectionButtonID visible: false } PropertyChanges { target: apnTextID visible: false } PropertyChanges { target: usernameTextID visible: false } PropertyChanges { target: passwordTextID visible: false } PropertyChanges { target: apnTextBoxID visible: false } PropertyChanges { target: usernameTextBoxID visible: false } PropertyChanges { target: passwordTextBoxID visible: false } PropertyChanges { target: connectionStatistics visible: false } PropertyChanges { target: infos visible: true } PropertyChanges { target: connectingDialog visible: false } }, // Connecting Dialog state, shown when connecting State { name: "connectingDialog" PropertyChanges { target: connectingDialog visible: true } // Disable the "info stats" button while the connection dialog is up PropertyChanges { target: infosButtonArea visible: false } // Disable the "connection stats" button while the connection // dialog is up PropertyChanges { target: connectionsButtonArea visible: false } } ] } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Readme.txt000066400000000000000000000055601455567757300222270ustar00rootroot00000000000000Gobi Extensible API 2012-07-12-1036 This readme covers important information concerning the Gobi Extensible API. Table of Contents 1. What's new in this release 2. Known issues 3. Build steps ------------------------------------------------------------------------------- 1. WHAT'S NEW This Release (Gobi Extensible API 2012-07-12-1036) a. Cleanup correctly during Disconnect() to fix possible race condition which could cause future connections to have read timeouts. b. Add a device access qualifier for SMD connections, for example: "QMUXD:0" for the first SMD channel. c. Updated API reflect the following QMI ICDs: AUTH ICD Rev. C (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YC (80-VB816-6) PBM ICD Rev. H (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. W (80-VB816-12) Voice ICD Rev. M (80-VB816-10) WDS ICD Rev. YB (80-VB816-5) WMS ICD Rev. H (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-06-18-1054) a. Added support for SMD devices b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. L (80-VB816-11) DMS ICD Rev. N (80-VB816-4) LOC ICD Rev. F (80-VB816-17) NAS ICD Rev. YA (80-VB816-6) PBM ICD Rev. H (80-VB816-15) PDS ICD Rev. N (80-VB816-8) UIM ICD Rev. V (80-VB816-12) Voice ICD Rev. L (80-VB816-10) WDS ICD Rev. YA (80-VB816-5) WMS ICD Rev. H (80-VB816-9) Addendum ICD Rev. C (80-VK268-3) Prior Release (Gobi Extensible API 2012-01-12-1106) a. Addition of Gobi Sample CM (documentation is on QDevNet - the use of this me be subject to additional license terms) b. Updated API reflect the following QMI ICDs: AUTH ICD Rev. B (80-VB816-21) CAT ICD Rev. J (80-VB816-11) DMS ICD Rev. K (80-VB816-4) LOC ICD Rev. D (80-VB816-17) NAS ICD Rev. W (80-VB816-6) PBM ICD Rev. F (80-VB816-15) PDS 1 ICD Rev. J (80-VB816-8) PDS 2 ICD Rev. D (80-VB816-14) UIM ICD Rev. T (80-VB816-12) Voice ICD Rev. J (80-VB816-10) WDS ICD Rev. U (80-VB816-5) WMS ICD Rev. F (80-VB816-9) Prior Release (Gobi Extensible API 2011-12-15-0819) a. Initial beta code release ------------------------------------------------------------------------------- 2. KNOWN ISSUES No known issues. ------------------------------------------------------------------------------- 3. BUILD STEPS a. Start in the 'GobiConnectionMgmt' folder b. For Android, run: make Android ANDROID_PATH= For x86, run: make ------------------------------------------------------------------------------- libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Shared/000077500000000000000000000000001455567757300214715ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Shared/GobiError.h000066400000000000000000000140261455567757300235370ustar00rootroot00000000000000/*=========================================================================== FILE: GobiError.h DESCRIPTION: QUALCOMM Gobi Errors Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eGobiError Enumeration // Gobi API Error Enumeration /*=========================================================================*/ enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrorCode) eGOBI_ERR_QMI_OFFSET = 1000, }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eGobiError validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eGobiError ec ) { bool retVal = false; if (ec > eGOBI_ERR_ENUM_BEGIN && ec < eGOBI_ERR_ENUM_END) { retVal = true; } if (ec >= eGOBI_ERR_QMI_OFFSET) { ULONG tmp = (ULONG)ec - (ULONG)eGOBI_ERR_QMI_OFFSET; retVal = ::IsValid( (eQMIErrorCode)tmp ); } return retVal; };libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Shared/GobiQMICore.cpp000066400000000000000000000333041455567757300242400ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.cpp DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiQMICore.h" #include "QMIBuffers.h" #include "ProtocolNotification.h" /*=========================================================================*/ // cGobiQMICore Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiQMICore (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiQMICore::cGobiQMICore() : mLastError( eGOBI_ERR_NONE ) { mInterface[0] = 0; } /*=========================================================================== METHOD: ~cGobiQMICore (Public Method) DESCRIPTION: Destructor RETURN VALUE: BOOL ===========================================================================*/ cGobiQMICore::~cGobiQMICore() { Cleanup(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Initialize() { return true; } /*=========================================================================== METHOD: Cleanup (Public Method) DESCRIPTION: Cleanup the object RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Cleanup() { Disconnect(); return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Gobi device interface to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiQMICore::Connect( LPCSTR pInterface, std::set & services ) { // The services we successfully connected to std::set retServices; // Clear last error recorded ClearLastError(); size_t ifaceLen = strnlen( pInterface, MAX_PATH ) + 1; if (ifaceLen >= (size_t)MAX_PATH) { mLastError = eGOBI_ERR_INVALID_ARG; return retServices; } // Allocate configured QMI servers std::set ::const_iterator pIter = services.begin(); while (pIter != services.end()) { cQMIProtocolServer * pSvr = 0; pSvr = new cQMIProtocolServer( *pIter, 8192, 512 ); if (pSvr != 0) { // Initialize server (we don't care about the return code // since the following Connect() call will fail if we are // unable to initialize the server) pSvr->Initialize(); bool bRC = pSvr->Connect( pInterface ); if (bRC == true) { sServerInfo si( pSvr ); std::pair entry( *pIter, si ); mServers.insert( entry ); retServices.insert( *pIter ); } } pIter++; } // All servers fail? if (retServices.size() == 0) { // Yes, disconnect them all Disconnect(); // ... and set the error code mLastError = eGOBI_ERR_CONNECT; } memcpy( mInterface, pInterface, ifaceLen ); return retServices; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiQMICore::Disconnect() { // Clear last error recorded ClearLastError(); // Clear device interface mInterface[0] = 0; // Assume failure bool bRC = false; if (mServers.size() == 0) { mLastError = eGOBI_ERR_NO_CONNECTION; return bRC; } // Disconnect/clean-up all configured QMI servers std::map ::iterator pIter; pIter = mServers.begin(); while (pIter != mServers.end()) { sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr != 0) { pSvr->Disconnect(); pSvr->Exit(); delete pSvr; } si.mLogsProcessed = 0; pIter++; } mServers.clear(); bRC = true; return bRC; } /*=========================================================================== METHOD: Send (Public Method) DESCRIPTION: Send a request using the specified QMI protocol server and wait for (and then return) the response PARAMETERS: svcID [ I ] - QMI service type msgID [ I ] - QMI message ID to [ I ] - Timeout value (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { // Clear last error recorded ClearLastError(); if (msgID > 0xffff) { mLastError = eGOBI_ERR_INVALID_ARG; return mLastError; } sSharedBuffer * pRequest = 0; pRequest = sQMIServiceBuffer::BuildBuffer( (eQMIService)svcID, (WORD)msgID, false, false, pIn, inLen ); if (pRequest == 0) { mLastError = eGOBI_ERR_MEMORY; return mLastError; } // We use the event based notification approach cSyncQueue evts( 12, true ); cProtocolQueueNotification pn( &evts ); // Build the request object sProtocolRequest req( pRequest, 0, to, 1, 1, &pn ); if (to == 0) { mLastError = eGOBI_ERR_INTERNAL; return mLastError; } // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0 || pSvr->IsConnected() == false) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } // Grab the log from the server const cProtocolLog & protocolLog = pSvr->GetLog(); // Schedule the request ULONG reqID = pSvr->AddRequest( req ); if (reqID == INVALID_REQUEST_ID) { mLastError = eGOBI_ERR_REQ_SCHEDULE; return mLastError; } // Store for external cancel si.mRequestID = reqID; bool bReq = false; bool bExit = false; DWORD idx; // Returned response sProtocolBuffer rsp; // Process up to the indicated timeout cEvent & sigEvt = evts.GetSignalEvent(); while (bExit == false) { int wc = sigEvt.Wait( to, idx ); if (wc == ETIME) { if (bReq == true) { mLastError = eGOBI_ERR_RESPONSE_TO; } else { mLastError = eGOBI_ERR_REQUEST_TO; } break; } else if (wc != 0) { mLastError = eGOBI_ERR_INTERNAL; break; } sProtocolNotificationEvent evt; bool bEvt = evts.GetElement( idx, evt ); if (bEvt == false) { mLastError = eGOBI_ERR_INTERNAL; bExit = true; break; } switch (evt.mEventType) { case ePROTOCOL_EVT_REQ_ERR: mLastError = eGOBI_ERR_REQUEST; bExit = true; break; case ePROTOCOL_EVT_RSP_ERR: mLastError = eGOBI_ERR_RESPONSE; bExit = true; break; case ePROTOCOL_EVT_REQ_SENT: { // Grab the as-sent request DWORD id = evt.mParam2; sProtocolBuffer tmpReq = protocolLog.GetBuffer( id ); sSharedBuffer * pTmpRequest = tmpReq.GetSharedBuffer(); if (pTmpRequest != 0) { // Grab the transaction ID sQMIServiceBuffer actualReq( pTmpRequest ); si.mRequestTXID = actualReq.GetTransactionID(); } bReq = true; } break; case ePROTOCOL_EVT_RSP_RECV: // Success! rsp = protocolLog.GetBuffer( evt.mParam2 ); bExit = true; break; } } if ( (mLastError == eGOBI_ERR_INTERNAL) || (mLastError == eGOBI_ERR_REQUEST_TO) || (mLastError == eGOBI_ERR_RESPONSE_TO) ) { // Remove the request as our protocol notification object is // about to go out of scope and hence be destroyed pSvr->RemoveRequest( reqID ); } if (rsp.IsValid() == false) { return GetCorrectedLastError(); } // Did we receive a valid QMI response? sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiRsp.IsValid() == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } // Caller might not be interested in actual output (beyond error code) ULONG maxSz = 0; if (pOutLen != 0) { maxSz = *pOutLen; } if (maxSz > 0) { // TLV 2 is always present ULONG needSz = 0; const BYTE * pData = (const BYTE *)qmiRsp.GetRawContents( needSz ); if (needSz == 0 || pData == 0) { return eGOBI_ERR_INVALID_RSP; } *pOutLen = needSz; if (needSz > maxSz) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pOut, pData, needSz ); } // Check the mandatory QMI result TLV for success ULONG rc = 0; ULONG ec = 0; bool bResult = qmiRsp.GetResult( rc, ec ); if (bResult == false) { mLastError = eGOBI_ERR_MALFORMED_RSP; return mLastError; } else if (rc != 0) { return GetCorrectedQMIError( ec ); } // Success! return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: CancelSend (Public Method) DESCRIPTION: Cancel the most recent in-progress Send() based operation PARAMETERS: svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: eGobiError - The result ===========================================================================*/ eGobiError cGobiQMICore::CancelSend( ULONG svcID, ULONG * pTXID ) { // Grab the server std::map ::iterator pSvrIter; pSvrIter = mServers.find( (eQMIService)svcID ); if (pSvrIter == mServers.end()) { mLastError = eGOBI_ERR_NO_CONNECTION; return mLastError; } sServerInfo & si = pSvrIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return eGOBI_ERR_INTERNAL; } if (si.mRequestID == 0xffffffff) { return eGOBI_ERR_NO_CANCELABLE_OP; } bool bRemove = pSvr->RemoveRequest( si.mRequestID ); if (bRemove == false) { return eGOBI_ERR_CANCEL_OP; } if (pTXID != 0) { *pTXID = si.mRequestTXID; } return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-07-12-1036/Shared/GobiQMICore.h000066400000000000000000000143501455567757300237050ustar00rootroot00000000000000/*=========================================================================== FILE: GobiQMICore.h DESCRIPTION: QUALCOMM Gobi QMI Based API Core PUBLIC CLASSES AND FUNCTIONS: cGobiQMICore Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIProtocolServer.h" #include "SyncQueue.h" #include "GobiError.h" /*=========================================================================*/ // Class cGobiQMICore /*=========================================================================*/ class cGobiQMICore { public: // Constructor cGobiQMICore(); // Destructor virtual ~cGobiQMICore(); // Initialize the object virtual bool Initialize(); // Cleanup the object virtual bool Cleanup(); // (Inline) Return the server as determined by the service type cQMIProtocolServer * GetServer( eQMIService svc ) { cQMIProtocolServer * pSvr = 0; std::map ::const_iterator pIter; pIter = mServers.find( svc ); if (pIter != mServers.end()) { const sServerInfo & si = pIter->second; pSvr = si.mpServer; } return pSvr; }; // (Inline) Clear last error recorded void ClearLastError() { mLastError = eGOBI_ERR_NONE; }; // (Inline) Get last error recorded eGobiError GetLastError() { return mLastError; }; // (Inline) Return the last recorded error (if this happens to indicate // that no error occurred then return eGOBI_ERR_INTERNAL) eGobiError GetCorrectedLastError() { eGobiError ec = GetLastError(); if (ec == eGOBI_ERR_NONE) { ec = eGOBI_ERR_INTERNAL; } return ec; }; // (Inline) Return the correct QMI error (if this happens to indicate // that no error occurred then return the mapped eQMI_ERR_INTERNAL // value) eGobiError GetCorrectedQMIError( ULONG qmiErrorCode ) { ULONG ec = (ULONG)eQMI_ERR_INTERNAL + (ULONG)eGOBI_ERR_QMI_OFFSET; if (qmiErrorCode != (ULONG)eQMI_ERR_NONE) { ec = qmiErrorCode + (ULONG)eGOBI_ERR_QMI_OFFSET; } return (eGobiError)ec; }; // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Send a request using the specified QMI protocol server and wait // for (and then return) the response eGobiError Send( ULONG svcID, ULONG msgID, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); // Cancel the most recent in-progress Send() based operation eGobiError CancelSend( ULONG svcID, ULONG * pTXID ); protected: /* Device interface */ CHAR mInterface[MAX_PATH]; /* QMI protocol server/protocol server log count */ struct sServerInfo { public: // Constructor (default) sServerInfo() : mpServer( 0 ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; // Constructor (parameterized) sServerInfo( cQMIProtocolServer * pServer ) : mpServer( pServer ), mLogsProcessed( 0 ), mRequestID( 0xffffffff ), mRequestTXID( 0xffffffff ) { }; /* Protocol server */ cQMIProtocolServer * mpServer; /* Protocol server logs processed */ ULONG mLogsProcessed; /* Last scheduled request ID */ ULONG mRequestID; /* Last schedule request QMI transaction ID */ ULONG mRequestTXID; }; /* QMI protocol servers */ std::map mServers; /* Last error recorded */ eGobiError mLastError; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/000077500000000000000000000000001455567757300202745ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/000077500000000000000000000000001455567757300211645ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/Comm.cpp000077500000000000000000000371771455567757300226050ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.cpp DESCRIPTION: Implementation of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Comm.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads PARAMETERS: pData [ I ] Asynchronous read object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxThread( void * pData ) { cComm * pComm = (cComm*)pData; if (pComm == NULL || pComm->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pComm->mCommandPipe[READING], &inputSet ); int largestFD = pComm->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pComm->mCommandPipe[READING], &outputSet ) == true) { // Read from the pipe BYTE cmd; status = read( pComm->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pComm->mPort, &inputSet ); largestFD = std::max( pComm->mPort, pComm->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; } else { // EXIT_CMD or anything else pComm->mpRxCallback = 0; break; } } else if (FD_ISSET( pComm->mPort, &outputSet ) == true) { // Stop watching for read data FD_CLR( pComm->mPort, &inputSet ); largestFD = pComm->mCommandPipe[READING]; // Perform a read status = read( pComm->mPort, pComm->mpBuffer, pComm->mBuffSz ); cIOCallback * pCallback = pComm->mpRxCallback; pComm->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } } return 0; }; /*=========================================================================*/ // cComm Methods /*=========================================================================*/ /*=========================================================================== METHOD: cComm (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cComm::cComm() : mPortName( "" ), mPort( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cComm (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cComm::~cComm() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cComm::IsValid() { // Nothing to do, dependant on extended class functionality return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pPort [ I ] - Name of port to open (IE: /dev/qcqmi0) RETURN VALUE: bool ===========================================================================*/ bool cComm::Connect( LPCSTR pPort ) { if (IsValid() == false || pPort == 0 || pPort[0] == 0) { return false; } if (mPort != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cComm:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxThread, this ); if (nRet != 0) { TRACE( "cComm::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Opening the com port mPort = open( pPort, O_RDWR ); if (mPort == INVALID_HANDLE_VALUE) { Disconnect(); return false; } // Save port name mPortName = pPort; // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Run an IOCTL on the open file handle PARAMETERS: ioctlReq [ I ] - ioctl request value pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - ioctl return value (0 for success) ===========================================================================*/ int cComm::SendCtl( UINT ioctlReq, void * pData ) { if (mPort == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } return ioctl( mPort, ioctlReq, pData ); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cComm::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it TRACE( "cComm::Disconnnect() joining thread %lu\n", mRxThreadID ); int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mPort != INVALID_HANDLE_VALUE) { close( mPort ); mPort = INVALID_HANDLE_VALUE; } // Double check mpRxCallback = 0; mPortName.clear(); return bRC; } /*=========================================================================== METHOD: ConfigureSettings (Public Method) DESCRIPTION: Configure the port with the passed in parameters PARAMETERS: pSettings [ I ] - Desired port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::ConfigureSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } tcflush( mPort, TCIOFLUSH ); int nRC = tcsetattr( mPort, TCSANOW, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: GetSettings (Public Method) DESCRIPTION: Return the current port settings PARAMETERS: pSettings [ I ] - Current port settings RETURN VALUE: bool ===========================================================================*/ bool cComm::GetSettings( termios * pSettings ) { if (mPort == INVALID_HANDLE_VALUE || pSettings == 0) { return false; } // Get the COM port settings int nRC = tcgetattr( mPort, pSettings ); if (nRC == -1) { return false; } // Success! return true; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelIO() { if (mPort == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelRx() { if (mPort == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); mpRxCallback = 0; return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cComm::CancelTx() { if (mPort == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cComm::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to stop reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cComm::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // This seems a bit pointless, but we're still going verify // the device is ready for writing, and give it up to // (1000 + num bytes) MS to be ready (in 100 MS chunks) struct timeval TimeOut; fd_set set; int nReady = 0; int nCount = 0; while ( nReady == 0 ) { if (mbCancelWrite == true) { TRACE( "cComm::TxData() write canceled before device was ready\n" ); return false; } if (nCount >= (1000 + bufSz) / 100) { // Timeout is expired break; } FD_ZERO( &set ); FD_SET( mPort, &set ); TimeOut.tv_sec = 0; TimeOut.tv_usec = 100000; nReady = select( mPort + 1, NULL, &set, NULL, &TimeOut ); nCount++; } if (nReady <= 0) { TRACE( "cComm::TxData() Unable to get device ready for" " Write, error %d: %s\n", nReady, strerror( nReady) ); return false; } int nRet = write( mPort, pBuf, bufSz ); if (nRet != bufSz) { TRACE( "cComm::TxData() write returned %d instead of %lu\n", nRet, bufSz ); return false; } #ifdef DEBUG TRACE( "Write of %lu bytes took %llu miliseconds\n", bufSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/Comm.h000077500000000000000000000104121455567757300222310ustar00rootroot00000000000000/*=========================================================================== FILE: Comm.h DESCRIPTION: Declaration of cComm class PUBLIC CLASSES AND METHODS: cComm This class wraps low level port communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cComm /*=========================================================================*/ class cComm : public cConnection { public: // Constructor cComm(); // Destructor ~cComm(); // Is this object valid? bool IsValid(); // Connect to the specified port bool Connect( LPCSTR pPort ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current port name std::string GetPortName() const { return mPortName; }; // Are we currently connected to a port? bool IsConnected() { return (mPort != INVALID_HANDLE_VALUE); }; protected: /* Name of current port */ std::string mPortName; /* Handle to COM port */ int mPort; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; // Rx thread is allowed complete access friend void * RxThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/Connection.h000077500000000000000000000106301455567757300234370ustar00rootroot00000000000000/*=========================================================================== FILE: Connection.h DESCRIPTION: Declaration of cConnection class PUBLIC CLASSES AND METHODS: cComm This class defines a prototype for low level communications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Class cIOCallback /*=========================================================================*/ class cIOCallback { public: // (Inline) Constructor cIOCallback() { }; // (Inline) Destructor virtual ~cIOCallback() { }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesTransferred ) = 0; }; /*=========================================================================*/ // Class cConnection /*=========================================================================*/ class cConnection { public: // Constructor cConnection() : mpRxCallback( 0 ) { }; // Is this object valid? virtual bool IsValid() { return false; }; // Connect to the specified interface virtual bool Connect( LPCSTR pPort ) { return false; }; // Send a control message virtual int SendCtl( UINT type, void * pData ) { return -1; }; // Disconnect from the current port virtual bool Disconnect() { return false; }; // Cancel any in-progress I/O virtual bool CancelIO() { return false; }; // Cancel any in-progress receive operation virtual bool CancelRx() { return false; }; // Cancel any in-progress transmit operation virtual bool CancelTx() { return false; }; // Receive data virtual bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { return false; }; // Transmit data virtual bool TxData( const BYTE * pBuf, ULONG bufSz ) { return false; }; // Are we currently connected to a port? virtual bool IsConnected() { return false; }; protected: /* Read callbacks */ cIOCallback * mpRxCallback; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/Event.cpp000077500000000000000000000254671455567757300227720ustar00rootroot00000000000000/*=========================================================================== FILE: Event.cpp DESCRIPTION: Implementation of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Event.h" /*=========================================================================== METHOD: WaitOnMultipleEvents (Free Method) DESCRIPTION: Wait for any of the events to be set and return the value Note: If multiple events are set, only the event specified by eventIndex will be read from. Run this function again to get the next event. PARAMETERS: events [ I ] - Vector of events which may be signaled timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success eventIndex [ O ] - Index of event which was signaled RETURN VALUE: Return code positive for number of events set -ETIME on timeout negative errno value on failure ===========================================================================*/ int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ) { // Check internal pipes' status for (ULONG index = 0; index < events.size(); index++) { int error = events[index]->mError; if (error != 0) { TRACE( "cEvent %lu has error %d\n", index, error ); return -error; } } // Initialize the FD set fd_set fds; FD_ZERO( &fds ); // Add each item to the FD set, keeping track of the largest, // which is used for select() int largestFD = 0; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; FD_SET( pipe, &fds ); largestFD = std::max( pipe, largestFD ); } struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipes for the specified amount of time int rc = select( largestFD + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { TRACE( "WaitOnMultipleEvents error %d\n", errno ); return -errno; } else if (rc == 0) { // No activity on the pipes return -ETIME; } int numSignaled = rc; // Only read from first pipe which was signaled int signaled = -1; for (ULONG index = 0; index < events.size(); index++) { int pipe = events[index]->mPipes[READING]; if (FD_ISSET( pipe, &fds ) != 0) { signaled = index; break; } } if (signaled == -1) { // Odd, no one was signaled return -ENODATA; } DWORD tempVal = 0; rc = events[signaled]->Read( tempVal ); if (rc == 0) { // Success val = tempVal; eventIndex = signaled; return numSignaled; } else { // failure return rc; } } /*=========================================================================*/ // cEvent Methods /*=========================================================================*/ /*=========================================================================== METHOD: cEvent (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cEvent::cEvent() : mError( 0 ) { int rc = pipe( mPipes ); if (rc != 0) { mError = errno; TRACE( "cEvent - Error %d creating pipe, %s\n", mError, strerror( mError ) ); } } /*=========================================================================== METHOD: ~cEvent (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cEvent::~cEvent() { // Check internal pipe status if (mError == 0) { Close(); mError = EBADF; } } /*=========================================================================== METHOD: Close (Internal Method) DESCRIPTION: Close pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Close() { int retCode = 0; int rc = close( mPipes[READING] ); mPipes[READING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[READING], %s\n", retCode, strerror( retCode ) ); } rc = close( mPipes[WRITING] ); mPipes[WRITING] = -1; if (rc != 0) { retCode = errno; TRACE( "cEvent - Error %d deleting pipe[WRITING], %s\n", retCode, strerror( retCode ) ); } return retCode; } /*=========================================================================== METHOD: Set (Public Method) DESCRIPTION: Set/signal the event with the specified value PARAMETERS: val [ I ] - Value to pass through with signal RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Set( DWORD val ) { // Check internal pipe status if (mError != 0) { return mError; } PBYTE pWrite = (PBYTE)&val; int writeSize = sizeof( DWORD ); while (writeSize > 0) { int bytesWritten = write( mPipes[WRITING], pWrite, writeSize ); if (bytesWritten == -1) { // Store error from write int writeErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = writeErr; } // We cannot recover from this error Close(); return writeErr; } pWrite += bytesWritten; writeSize -= bytesWritten; } // Success return 0; } /*=========================================================================== METHOD: Wait (Free Method) DESCRIPTION: Wait for the event to be signalled and return the read in value PARAMETERS: timeoutMS [ I ] - Relative timeout length (in milliseconds) val [ O ] - Associated value upon success RETURN VALUE: Return code 0 on success ETIME on timeout errno value on failure ===========================================================================*/ int cEvent::Wait( DWORD timeoutMS, DWORD & val ) { // Check internal pipe status if (mError != 0) { return mError; } fd_set fds; FD_ZERO( &fds ); FD_SET( mPipes[READING], &fds ); struct timeval timeOut; // Add avoiding an overflow on (long)usec timeOut.tv_sec = timeoutMS / 1000l; timeOut.tv_usec = ( timeoutMS % 1000l ) * 1000l; // Wait for activity on the pipe for the specified amount of time int rc = select( mPipes[READING] + 1, &fds, 0, 0, &timeOut ); if (rc == -1) { // Store error from select int selectErr = errno; // First error? if (mError == 0) { // Yes, save the error mError = selectErr; } // We cannot recover from this error Close(); return selectErr; } else if (rc == 0) { // No activity on the pipe return ETIME; } return Read( val ); } /*=========================================================================== METHOD: Clear (Free Method) DESCRIPTION: Read and discard all values currently in the pipe ===========================================================================*/ void cEvent::Clear() { DWORD unusedVal; int rc = 0; while (rc == 0) { rc = Wait( (DWORD)0, unusedVal ); } } /*=========================================================================== METHOD: Read (Internal Method) DESCRIPTION: Read a DWORD from the pipe RETURN VALUE: Return code 0 on success errno value on failure ===========================================================================*/ int cEvent::Read( DWORD & val ) { DWORD tempVal; PBYTE pRead = (PBYTE)&tempVal; int readSize = sizeof( DWORD ); while (readSize > 0) { int bytesRead = read( mPipes[READING], pRead, readSize ); if (bytesRead <= 0) { // Store error from read int readErr = errno; if (readErr == 0) { // Hard error! This should NEVER happen for a pipe ASSERT( 0 ); readErr = EBADF; } // First error? if (mError == 0) { // Yes, store the error mError = readErr; } // We cannot recover from this error Close(); return readErr; } pRead += bytesRead; readSize -= bytesRead; } val = tempVal; return 0; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/Event.h000077500000000000000000000102031455567757300224150ustar00rootroot00000000000000/*=========================================================================== FILE: Event.h DESCRIPTION: Declaration of cEvent class PUBLIC CLASSES AND METHODS: WaitOnMultipleEvents cEvent Functionality to mimic Windows events using UNIX pipes (enhanced somewhat to allow one to specify a DWORD value to pass through when signalling the event) WARNING: This class is not designed to be thread safe Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include //--------------------------------------------------------------------------- // Prototype //--------------------------------------------------------------------------- class cEvent; /*=========================================================================*/ // Free methods /*=========================================================================*/ // Wait for any of the events to be set and return the value int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); /*=========================================================================*/ // Class cEvent /*=========================================================================*/ class cEvent { public: // Constructor cEvent(); // Destructor ~cEvent(); // Set/signal the event with the specified value int Set( DWORD val ); // Wait for the event to be signalled and return the read in value int Wait( DWORD timeoutMS, DWORD & val ); // Read and discard all values currently in the pipe void Clear(); protected: // Close pipe (used in errors or normal exit) int Close(); // Read from the pipe int Read( DWORD & val ); /* Internal error status */ int mError; /* Internal pipes */ int mPipes[2]; // WaitOnMultipleEvents gets full access friend int WaitOnMultipleEvents( std::vector events, DWORD timeoutMS, DWORD & val, DWORD & eventIndex ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolBuffer.cpp000077500000000000000000000143601455567757300246320ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.cpp DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sProtocolBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (default) RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer() : mpData( 0 ), mbValid( false ) { // Object is currently invalid mTimestamp = EMPTY_TIME; } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Constructor (parameterized) PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( sSharedBuffer * pBuffer ) : mpData( 0 ), mbValid( false ) { mTimestamp = EMPTY_TIME; time_t rawtime; time( &rawtime ); tm * timestamp = localtime( &rawtime ); if (timestamp != 0) { mTimestamp = *timestamp; } if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } mpData = pBuffer; if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; } // NOTE: Derived classes need to call their own validation method // in their constructors since the override might try to access // data that is not yet in place sProtocolBuffer::Validate(); } /*=========================================================================== METHOD: sProtocolBuffer (Public Method) DESCRIPTION: Copy constructor PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::sProtocolBuffer( const sProtocolBuffer & copyThis ) : mpData( copyThis.mpData ), mTimestamp( copyThis.mTimestamp ), mbValid( copyThis.mbValid ) { // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } } /*=========================================================================== METHOD: operator = (Public Method) DESCRIPTION: Assignment operator PARAMETERS: copyThis [ I ] - sProtocolBuffer to base the new one on RETURN VALUE: sProtocolBuffer & ===========================================================================*/ sProtocolBuffer & sProtocolBuffer::operator = ( const sProtocolBuffer & copyThis ) { // Do we already have data? if (mpData != 0) { // Is it different than what we are duplicating? if (mpData != copyThis.mpData) { // Yes, release our current buffer mpData->Release(); } } mpData = copyThis.mpData; mTimestamp = copyThis.mTimestamp; mbValid = copyThis.mbValid; // Bump reference count for shared buffer if (mpData != 0 && mpData->IsValid() == true) { mpData->AddRef(); } else { mpData = 0; mbValid = false; } return *this; } /*=========================================================================== METHOD: ~sProtocolBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolBuffer::~sProtocolBuffer() { if (mpData != 0 && mpData->IsValid() == true) { mpData->Release(); mpData = 0; } else if (mpData != 0) { ASSERT( 0 ); } mbValid = false; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolBuffer.h000077500000000000000000000116201455567757300242730ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolBuffer.h DESCRIPTION: Generic protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sProtocolBuffer Simple struct to represent a protocol buffer using a reference counted (shared) buffer, this allows us to use in in several places without copying it once in each place. A few base services are provided but the main purpose is to provide a class to inherit off of for specific protocols Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SharedBuffer.h" #include "ProtocolEnum.h" static const tm EMPTY_TIME = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; /*=========================================================================*/ // Struct sProtocolBuffer /*=========================================================================*/ struct sProtocolBuffer { public: // Constructor (default) sProtocolBuffer(); // Constructor (parameterized) sProtocolBuffer( sSharedBuffer * pBuffer ); // Copy constructor sProtocolBuffer( const sProtocolBuffer & copyThis ); // Assignment operator sProtocolBuffer & operator = ( const sProtocolBuffer & copyThis ); // Destructor virtual ~sProtocolBuffer(); // (Inline) Get buffer const BYTE * GetBuffer() const { BYTE * pRet = 0; if (IsValid() == true) { pRet = (BYTE *)mpData->GetBuffer(); } return (const BYTE *)pRet; }; // (Inline) Get buffer size ULONG GetSize() const { ULONG size = 0; if (IsValid() == true) { size = mpData->GetSize(); } return size; }; // (Inline) Return the protocol type eProtocolType GetType() const { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid() == true) { pt = (eProtocolType)mpData->GetType(); } return pt; }; // (Inline) Return the shared buffer sSharedBuffer * GetSharedBuffer() const { sSharedBuffer * pRet = 0; if (IsValid() == true) { pRet = mpData; } return pRet; }; // (Inline) Return the timestamp tm GetTimestamp() const { tm ft = EMPTY_TIME; if (IsValid() == true) { ft = mTimestamp; } return ft; }; // (Inline) Is this buffer valid? virtual bool IsValid() const { return mbValid; }; protected: // (Inline) Validate buffer virtual bool Validate() { // Do we have a shared buffer and is it valid? mbValid = (mpData != 0 && mpData->IsValid()); return mbValid; }; /* Our data buffer */ sSharedBuffer * mpData; /* Time buffer was created */ tm mTimestamp; /* Has this buffer been validated? (NOTE: *NOT* set in base) */ bool mbValid; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolEnum.h000077500000000000000000000242111455567757300237660ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolEnum.h DESCRIPTION: Generic protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eProtocolType Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // eProtocolType Enumeration // // NOTE: QMI protocol types need to be in the same order as eQMIService // with RX added first then TX /*=========================================================================*/ enum eProtocolType { ePROTOCOL_ENUM_BEGIN = -1, ePROTOCOL_COMMAND, // 000 Protocol server command ePROTOCOL_AT, // 001 AT command protocol ePROTOCOL_NMEA, // 002 NMEA (GPS) protocol ePROTOCOL_DIAG_RX, // 003 DIAG protocol (incoming) ePROTOCOL_DIAG_TX, // 004 DIAG protocol (outgoing) ePROTOCOL_DOWNLOAD_RX, // 005 Download protocol (incoming) ePROTOCOL_DOWNLOAD_TX, // 006 Download protocol (outgoing) ePROTOCOL_SDOWNLOAD_RX, // 007 Streaming download protocol (incoming) ePROTOCOL_SDOWNLOAD_TX, // 008 Streaming download protocol (outgoing) ePROTOCOL_QDL_RX, // 009 QDL streaming protocol (incoming) ePROTOCOL_QDL_TX, // 010 QDL streaming protocol (outgoing) ePROTOCOL_QMI_CTL_RX = 60, // 060 QMI CTL protocol (incoming) ePROTOCOL_QMI_CTL_TX, // 061 QMI CTL protocol (outgoing) ePROTOCOL_QMI_WDS_RX, // 062 QMI WDS protocol (incoming) ePROTOCOL_QMI_WDS_TX, // 063 QMI WDS protocol (outgoing) ePROTOCOL_QMI_DMS_RX, // 064 QMI DMS protocol (incoming) ePROTOCOL_QMI_DMS_TX, // 065 QMI DMS protocol (outgoing) ePROTOCOL_QMI_NAS_RX, // 066 QMI NAS protocol (incoming) ePROTOCOL_QMI_NAS_TX, // 067 QMI NAS protocol (outgoing) ePROTOCOL_QMI_QOS_RX, // 068 QMI QOS protocol (incoming) ePROTOCOL_QMI_QOS_TX, // 069 QMI QOS protocol (outgoing) ePROTOCOL_QMI_WMS_RX, // 070 QMI WMS protocol (incoming) ePROTOCOL_QMI_WMS_TX, // 071 QMI WMS protocol (outgoing) ePROTOCOL_QMI_PDS_RX, // 072 QMI PDS protocol (incoming) ePROTOCOL_QMI_PDS_TX, // 073 QMI PDS protocol (outgoing) ePROTOCOL_QMI_AUTH_RX, // 074 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AUTH_TX, // 075 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_AT_RX, // 076 QMI AUTH protocol (incoming) ePROTOCOL_QMI_AT_TX, // 077 QMI AUTH protocol (outgoing) ePROTOCOL_QMI_VOICE_RX, // 078 QMI Voice protocol (incoming) ePROTOCOL_QMI_VOICE_TX, // 079 QMI Voice protocol (outgoing) ePROTOCOL_QMI_CAT2_RX, // 080 QMI CAT (new) protocol (incoming) ePROTOCOL_QMI_CAT2_TX, // 081 QMI CAT (new) protocol (outgoing) ePROTOCOL_QMI_UIM_RX, // 082 QMI UIM protocol (incoming) ePROTOCOL_QMI_UIM_TX, // 083 QMI UIM protocol (outgoing) ePROTOCOL_QMI_PBM_RX, // 084 QMI PBM protocol (incoming) ePROTOCOL_QMI_PBM_TX, // 085 QMI PBM protocol (outgoing) ePROTOCOL_QMI_13_RX, // 086 QMI service ID 13 protocol (incoming) ePROTOCOL_QMI_13_TX, // 087 QMI service ID 13 protocol (outgoing) ePROTOCOL_QMI_RMTFS_RX, // 088 QMI RMTFS protocol (incoming) ePROTOCOL_QMI_RMTFS_TX, // 089 QMI RMTFS protocol (outgoing) ePROTOCOL_QMI_15_RX, // 090 QMI service ID 15 protocol (incoming) ePROTOCOL_QMI_15_TX, // 091 QMI service ID 15 protocol (outgoing) ePROTOCOL_QMI_LOC_RX, // 092 QMI UIM protocol (incoming) ePROTOCOL_QMI_LOC_TX, // 093 QMI UIM protocol (outgoing) ePROTOCOL_QMI_SAR_RX, // 094 QMI PBM protocol (incoming) ePROTOCOL_QMI_SAR_TX, // 095 QMI PBM protocol (outgoing) ePROTOCOL_QMI_18_RX, // 096 QMI service ID 18 protocol (incoming) ePROTOCOL_QMI_18_TX, // 097 QMI service ID 18 protocol (outgoing) ePROTOCOL_QMI_19_RX, // 098 QMI service ID 19 protocol (incoming) ePROTOCOL_QMI_19_TX, // 099 QMI service ID 19 protocol (outgoing) ePROTOCOL_QMI_CSD_RX, // 100 QMI CSD protocol (incoming) ePROTOCOL_QMI_CSD_TX, // 101 QMI CSD protocol (outgoing) ePROTOCOL_QMI_EFS_RX, // 102 QMI EFS protocol (incoming) ePROTOCOL_QMI_EFS_TX, // 103 QMI EFS protocol (outgoing) ePROTOCOL_QMI_22_RX, // 104 QMI service ID 22 protocol (incoming) ePROTOCOL_QMI_22_TX, // 105 QMI service ID 22 protocol (outgoing) ePROTOCOL_QMI_TS_RX, // 106 QMI TS protocol (incoming) ePROTOCOL_QMI_TS_TX, // 107 QMI TS protocol (outgoing) ePROTOCOL_QMI_TMD_RX, // 108 QMI TMD protocol (incoming) ePROTOCOL_QMI_TMD_TX, // 109 QMI TMD protocol (outgoing) ePROTOCOL_QMI_25_RX, // 110 QMI service ID 25 protocol (incoming) ePROTOCOL_QMI_25_TX, // 111 QMI service ID 25 protocol (outgoing) ePROTOCOL_QMI_26_RX, // 112 QMI service ID 26 protocol (incoming) ePROTOCOL_QMI_26_TX, // 113 QMI service ID 26 protocol (outgoing) ePROTOCOL_QMI_27_RX, // 114 QMI service ID 27 protocol (incoming) ePROTOCOL_QMI_27_TX, // 115 QMI service ID 27 protocol (outgoing) ePROTOCOL_QMI_28_RX, // 116 QMI service ID 28 protocol (incoming) ePROTOCOL_QMI_28_TX, // 117 QMI service ID 28 protocol (outgoing) ePROTOCOL_QMI_CAT_RX = 508, // 508 QMI CAT protocol (incoming) ePROTOCOL_QMI_CAT_TX, // 509 QMI CAT protocol (outgoing) ePROTOCOL_QMI_RMS_RX, // 510 QMI RMS protocol (incoming) ePROTOCOL_QMI_RMS_TX, // 511 QMI RMS protocol (outgoing) ePROTOCOL_QMI_OMA_RX, // 512 QMI OMA protocol (incoming) ePROTOCOL_QMI_OMA_TX, // 513 QMI OMA protocol (outgoing) ePROTOCOL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolType validity check PARAMETERS: pt [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolType pt ) { bool retVal = false; if ( (pt > ePROTOCOL_ENUM_BEGIN && pt <= ePROTOCOL_QDL_TX) || (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_28_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocol (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocol( eProtocolType pt ) { bool retVal = false; if ( (pt >= ePROTOCOL_QMI_CTL_RX && pt <= ePROTOCOL_QMI_28_TX) || (pt >= ePROTOCOL_QMI_CAT_RX && pt < ePROTOCOL_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolRX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the incoming direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolRX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are even are RX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 0) ) { retVal = true; } return retVal; }; /*=========================================================================== METHOD: IsQMIProtocolTX (Inline Method) DESCRIPTION: Does the passed in value represent a QMI protocol and if so in the outgoing direction? PARAMETERS: pt [ I ] - Enum value being checked RETURN VALUE: bool ===========================================================================*/ inline bool IsQMIProtocolTX( eProtocolType pt ) { bool retVal = false; // QMI protocol values that are odd are TX if ( (IsQMIProtocol( pt ) == true) && ((DWORD)pt % 2 == 1) ) { retVal = true; } return retVal; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolLog.cpp000077500000000000000000000133241455567757300241410ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class definition PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolLog.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // The maximum number of in-memory buffers we allow const ULONG MAX_PROTOCOL_BUFFERS = 1024 * 16; /*=========================================================================*/ // cProtocolLog Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolLog (Public Method) DESCRIPTION: Constructor PARAMETERS: maxBuffers [ I ] - Maximum number of buffers to store in the log RETURN VALUE: None ===========================================================================*/ cProtocolLog::cProtocolLog( ULONG maxBuffers ) : mLog( maxBuffers > MAX_PROTOCOL_BUFFERS ? MAX_PROTOCOL_BUFFERS : maxBuffers, true ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolLog (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolLog::~cProtocolLog() { // Empty out the log Clear(); } /*=========================================================================== METHOD: AddBuffer (Public Method) DESCRIPTION: Add an protocol buffer to the end of the log PARAMETERS: buff [ I ] - Protocol buffer to add RETURN VALUE: ULONG - Index of newly added buffer (INVALID_LOG_INDEX upon failure) ===========================================================================*/ ULONG cProtocolLog::AddBuffer( sProtocolBuffer & buf ) { ULONG idx = INVALID_LOG_INDEX; if (buf.IsValid() == false) { return idx; } bool bRC = mLog.AddElement( buf, idx ); if (bRC == false) { idx = INVALID_LOG_INDEX; } return idx; } /*=========================================================================== METHOD: GetBuffer (Public Method) DESCRIPTION: Return the protocol buffer at the given index from the log PARAMETERS: idx [ I ] - Index of protocol buffer to obtain RETURN VALUE: sProtocolBuffer - Protocol buffer ===========================================================================*/ sProtocolBuffer cProtocolLog::GetBuffer( ULONG idx ) const { sProtocolBuffer buf; mLog.GetElement( idx, buf ); return buf; } /*=========================================================================== METHOD: GetSignalEvent (Public Method) DESCRIPTION: Return the underlying signal event, which will be set when the log is updated. RETURN VALUE: cEvent - Signal event ===========================================================================*/ cEvent & cProtocolLog::GetSignalEvent() const { return mLog.GetSignalEvent(); } /*=========================================================================== METHOD: GetCount (Public Method) DESCRIPTION: Return the total number of buffers added to the log RETURN VALUE: ULONG ===========================================================================*/ ULONG cProtocolLog::GetCount() const { return mLog.GetTotalCount(); } /*=========================================================================== METHOD: Clear (Public Method) DESCRIPTION: Clear the log RETURN VALUE: None ===========================================================================*/ void cProtocolLog::Clear() { mLog.EmptyQueue(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolLog.h000077500000000000000000000070261455567757300236100ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolLog.h DESCRIPTION: Simple protocol 'log' class declaration PUBLIC CLASSES AND METHODS: cProtocolLog This class stores protocol buffers in to a flat array (actually a double-ended queue) so that they can be accessed by other objects during the flow of normal processing. Note that the storage is in-memory and therefore finite Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "SyncQueue.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- const ULONG INVALID_LOG_INDEX = ULONG_MAX; /*=========================================================================*/ // Class cProtocolLog /*=========================================================================*/ class cProtocolLog { public: // Constructor cProtocolLog( ULONG maxBuffers ); // Destructor virtual ~cProtocolLog(); // Add an protocol buffer to the end of the log virtual ULONG AddBuffer( sProtocolBuffer & buf ); // Return the protocol buffer at the given index from the log virtual sProtocolBuffer GetBuffer( ULONG idx ) const; // Return the underlying signal event virtual cEvent & GetSignalEvent() const; // Return the total number of buffers added to the log virtual ULONG GetCount() const; // Clear the log virtual void Clear(); protected: /* The underlying 'log' */ cSyncQueue mLog; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolNotification.cpp000077500000000000000000000132341455567757300260460ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.cpp DESCRIPTION: Implementation of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolNotification.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // cProtocolQueueNotification Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Constructor PARAMETERS: pSQ [ I ] - Sync queue to utilize RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( cSyncQueue * pSQ ) : mpSQ( pSQ ) { // Nothing to do } /*=========================================================================== METHOD: cProtocolQueueNotification (Public Method) DESCRIPTION: Copy constructor PARAMETERS: notifier [ I ] - Notifier to base the new one on RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::cProtocolQueueNotification( const cProtocolQueueNotification & notifier ) : mpSQ( notifier.mpSQ ) { // Nothing to do } /*=========================================================================== METHOD: ~cProtocolQueueNotification (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cProtocolQueueNotification::~cProtocolQueueNotification() { mpSQ = 0; } /*=========================================================================== METHOD: Clone (Public Method) DESCRIPTION: Return an allocated copy of this object downcasted to our base class RETURN VALUE: cProtocolNotification * : Cloned object (0 on error) ===========================================================================*/ cProtocolNotification * cProtocolQueueNotification::Clone() const { cProtocolQueueNotification * pCopy = 0; try { pCopy = new cProtocolQueueNotification( *this ); } catch (...) { // Simply return 0 } return ((cProtocolNotification *)pCopy); } /*=========================================================================== METHOD: Notify (Public Method) DESCRIPTION: Notify view of a protocol event by adding notification structure to the underlying sync queue (which will provide the notification by signalling an event) PARAMETERS: eventType [ I ] - Protocol event type param1 [ I ] - Event type specific argument (see header description) param2 [ I ] - Event type specific argument (see header description) RETURN VALUE: None ===========================================================================*/ void cProtocolQueueNotification::Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const { sProtocolNotificationEvent evt( eventType, param1, param2 ); if (evt.IsValid() == true && mpSQ != 0 && mpSQ->IsValid() == true) { sProtocolNotificationEvent elem( eventType, param1, param2 ); mpSQ->AddElement( elem ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolNotification.h000077500000000000000000000174311455567757300255160ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolNotification.h DESCRIPTION: Declaration of cProtocolNotification base class and derivations PUBLIC CLASSES AND METHODS: sProtocolNotificationEvent Generic protocol event notification structure cProtocolNotification This abstract base class provides notification of protocol server events sent from the protocol server to protocol server clients cProtocolQueueNotification This class provides notification via a cSyncQueue object populated with sProtocolNotificationEvent objects Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SyncQueue.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- enum eProtocolEventType { ePROTOCOL_EVT_BEGIN = -1, ePROTOCOL_EVT_REQ_ERR, // There was an error sending the request ePROTOCOL_EVT_REQ_SENT, // The request has been sent ePROTOCOL_EVT_RSP_ERR, // There was an error receiving the response ePROTOCOL_EVT_RSP_RECV, // The response has been received ePROTOCOL_EVT_AUX_TU_SENT, // Auxiliary data transmission unit sent ePROTOCOL_EVT_END }; // NOTE: The arguments for each event are currently as follows: // // ePROTOCOL_EVT_REQ_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_REQ_SENT // param1: Request ID // param2: Index of request buffer in associated protocol log // ePROTOCOL_EVT_RSP_ERR // param1: Request ID // param2: Error code // // ePROTOCOL_EVT_RSP_RECV // param1: Request ID // param2: Index of response buffer in associated protocol log // // ePROTOCOL_EVT_AUX_TU_SENT // param1: Request ID // param2: Size of transmission unit // NOTE: To handle protoocl events using the Windows notifier add the following // prototype to your Window class header file: // // afx_msg LRESULT OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ); // // Then add an entry to the message map in your Window class source file: // // BEGIN_MESSAGE_MAP( CView, CChildView ) // ON_MESSAGE( PROTOCOL_WM_BASE + (ULONG)ePROTOCOL_EVT_XXX, OnProtocolEvent ) // END_MESSAGE_MAP() // // Finally write the handler itself: // // LRESULT CView::OnProtocolEvent( // WPARAM wParam, // LPARAM lParam ) // { // Do something // return 0; // } /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eProtocolEventType validity check PARAMETERS: evtType [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eProtocolEventType evtType ) { bool bRC = false; if (evtType > ePROTOCOL_EVT_BEGIN && evtType < ePROTOCOL_EVT_END) { bRC = true; } return bRC; }; /*=========================================================================*/ // Struct sProtocolNotificationEvent /*=========================================================================*/ struct sProtocolNotificationEvent { public: // (Inline) Default constructor (results in invalid object) sProtocolNotificationEvent() : mEventType( ePROTOCOL_EVT_BEGIN ), mParam1( 0 ), mParam2( 0 ) { // Nothing to do }; // (Inline) Parameter constructor sProtocolNotificationEvent( eProtocolEventType eventType, DWORD param1, DWORD param2 ) : mEventType( eventType ), mParam1( param1 ), mParam2( param2 ) { // Nothing to do }; // (Inline) Is this object valid? bool IsValid() { return ::IsValid( mEventType ); } /* Event type */ eProtocolEventType mEventType; /* First parameter (see above) */ DWORD mParam1; /* Second parameter (see above) */ DWORD mParam2; }; /*=========================================================================*/ // Class cProtocolNotification // // This abstract base class provides notification of protocol server // events sent from the protocol server to protocol server clients /*=========================================================================*/ class cProtocolNotification { public: // Return an allocated copy of this object virtual cProtocolNotification * Clone() const = 0; // Notify view of a protocol event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const = 0; }; /*=========================================================================*/ // Class cProtocolQueueNotification // // This class provides notification via a cSyncQueue object // populated with sProtocolNotificationEvent objects /*=========================================================================*/ class cProtocolQueueNotification : public cProtocolNotification { public: // Constructor cProtocolQueueNotification( cSyncQueue * pSQ ); // Copy constructor cProtocolQueueNotification( const cProtocolQueueNotification & notifier ); // Destructor virtual ~cProtocolQueueNotification(); // Return a copy of this object virtual cProtocolNotification * Clone() const; // Notify view of a MIS event virtual void Notify( eProtocolEventType eventType, DWORD param1, DWORD param2 ) const; protected: /* Event notification queue */ mutable cSyncQueue * mpSQ; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolRequest.cpp000077500000000000000000000177471455567757300250650ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.cpp DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolRequest.h" #include "ProtocolNotification.h" #include "ProtocolServer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout const ULONG DEFAULT_REQ_TIMEOUT = 1000; // Minimum and maximum allowable timeout values (in milliseconds) const ULONG MIN_REQ_TIMEOUT = 100; const ULONG MAX_REQ_TIMEOUT = 300000; // Minimum number of attempts a request can be scheduled for const ULONG MIN_REQ_ATTEMPTS = 1; // Value to indicate that a request is to be sent out indefinately const ULONG INFINITE_REQS = 0xFFFFFFFF; // Minimum/default amount of time between repeated requests (in milliseconds) const ULONG MIN_REQ_FREQUENCY = 10; const ULONG DEFAULT_REQ_FREQUENCY = 100; /*=========================================================================*/ // sProtocolRequest Methods /*=========================================================================*/ /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) schedule [ I ] - When (from now, in milliseconds) to send the first request, this isn't a hard value as the request is only guaranteed to go out after this time elapses timeout [ I ] - Milliseconds to wait for a response to an individual request before declaring a timeout. Regardless of what is passed in the timeout value used will be between MIN/MAX_REQ_TIMEOUT requests [ I ] - Number of request attempts to make, this isn't a retry count rather this value is used to specify repeating requests. Regardless of what is passed in the requests value used will be at least MIN_REQ_ATTEMPTS frequency [ I ] - If the 'requests' value is greater than the MIN_REQ_ATTEMPTS than this represents the amount of time to wait between requests (from the completion of the last request attempt, in milliseconds), again this isn't a hard value. Regardless of what is passed in the frequency value used will be at least MIN_REQ_FREQUENCY pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule, ULONG timeout, ULONG requests, ULONG frequency, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( schedule ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( 0 ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Constrain requested timeout to allowable range if (timeout < MIN_REQ_TIMEOUT) { timeout = MIN_REQ_TIMEOUT; } if (timeout > MAX_REQ_TIMEOUT) { timeout = MAX_REQ_TIMEOUT; } mTimeout = timeout; // Constrain request attempts if (requests >= MIN_REQ_ATTEMPTS) { mRequests = requests; } // Constrain frequency if (frequency >= MIN_REQ_FREQUENCY) { mFrequency = frequency; } // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Parameterized constructor (notification with defaults) PARAMETERS: pBuffer [ I ] - Shareable buffer representing the request (must be valid) pNotifier [ I ] - Status notification mechanism (may be 0) RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ) : sProtocolBuffer( pBuffer ), mSchedule( 0 ), mTimeout( DEFAULT_REQ_TIMEOUT ), mRequests( MIN_REQ_ATTEMPTS ), mFrequency( DEFAULT_REQ_FREQUENCY ), mpNotifier( pNotifier ), mpAuxData( 0 ), mAuxDataSize( 0 ), mbTXOnly( false ) { // Clone notifier? if (pNotifier != 0) { mpNotifier = pNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: sProtocolRequest DESCRIPTION: Copy constructor PARAMETERS: req [ I ] - Request to copy RETURN VALUE: None ===========================================================================*/ sProtocolRequest::sProtocolRequest( const sProtocolRequest & req ) : sProtocolBuffer( req ), mSchedule( req.mSchedule ), mTimeout( req.mTimeout ), mRequests( req.mRequests ), mFrequency( req.mFrequency ), mpNotifier( 0 ), mpAuxData( req.mpAuxData ), mAuxDataSize( req.mAuxDataSize ), mbTXOnly( req.mbTXOnly ) { // Clone notifier? if (req.mpNotifier != 0) { mpNotifier = req.mpNotifier->Clone(); } Validate(); } /*=========================================================================== METHOD: ~sProtocolRequest DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sProtocolRequest::~sProtocolRequest() { // Delete cloned notifier? if (mpNotifier != 0) { delete mpNotifier; mpNotifier = 0; } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolRequest.h000077500000000000000000000146261455567757300245230ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolRequest.h DESCRIPTION: Generic protocol request/command related structures and affliated methods, these structures are used by clients of the protocol server to specify outgoing protocol requests PUBLIC CLASSES AND METHODS: sProtocolRequest Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolNotification; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Default protocol request timeout extern const ULONG DEFAULT_REQ_TIMEOUT; // Minimum and maximum allowable timeout values (in milliseconds) extern const ULONG MIN_REQ_TIMEOUT; extern const ULONG MAX_REQ_TIMEOUT; // Minimum number of attempts a request can be scheduled for extern const ULONG MIN_REQ_ATTEMPTS; // Value to indicate that a request is to be sent out indefinately extern const ULONG INFINITE_REQS; // Minimum/default amount of time between repeated requests (in milliseconds) extern const ULONG MIN_REQ_FREQUENCY; extern const ULONG DEFAULT_REQ_FREQUENCY; /*=========================================================================*/ // Struct sProtocolRequest // // Structure to represent a generic request packet, including all the // information needed to schedule the request, send the request, and // (optionally) reschedule the request for another TX/RX attempt // // The default parameters schedule an immediate request (indicated by // passing in '0' for the schedule parameter) to be sent once with // the default timeout value /*=========================================================================*/ struct sProtocolRequest : public sProtocolBuffer { public: // Parameterized constructor sProtocolRequest( sSharedBuffer * pBuffer, ULONG schedule = 0, ULONG timeout = DEFAULT_REQ_TIMEOUT, ULONG requests = MIN_REQ_ATTEMPTS, ULONG frequency = DEFAULT_REQ_FREQUENCY, cProtocolNotification * pNotifier = 0 ); // Parameterized constructor (notification with defaults) sProtocolRequest( sSharedBuffer * pBuffer, cProtocolNotification * pNotifier ); // Copy constructor sProtocolRequest( const sProtocolRequest & req ); // Destructor virtual ~sProtocolRequest(); // (Inline) Get schedule value (value is in milliseconds) ULONG GetSchedule() const { return mSchedule; }; // (Inline) Get timeout value ULONG GetTimeout() const { return mTimeout; }; // (Inline) Get requests value ULONG GetRequests() const { return mRequests; }; // (Inline) Get frequency value (value is in milliseconds) ULONG GetFrequency() const { return mFrequency; }; const cProtocolNotification * GetNotifier() const { return mpNotifier; }; // (Inline) Set auxiliary data void SetAuxiliaryData( const BYTE * pData, ULONG dataSz ) { mpAuxData = pData; mAuxDataSize = dataSz; }; // (Inline) Get auxiliary data const BYTE * GetAuxiliaryData( ULONG & dataSz ) const { dataSz = mAuxDataSize; return mpAuxData; }; // (Inline) Set TX only flag void SetTXOnly() { mbTXOnly = true; }; // (Inline) Get TX only flag bool IsTXOnly() const { return mbTXOnly; }; protected: /* Schedule (approximately when to send the initial request) */ ULONG mSchedule; /* Timeout value for receiving a response */ ULONG mTimeout; /* Number of requests to schedule (must be at least one) */ ULONG mRequests; /* Frequency (approximately how long to wait before next request) */ ULONG mFrequency; /* Notification object */ cProtocolNotification * mpNotifier; /* Auxiliary data */ const BYTE * mpAuxData; /* Auxilary data size */ ULONG mAuxDataSize; /* TX only (i.e. do not wait for a response) ? */ bool mbTXOnly; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolServer.cpp000077500000000000000000001343501455567757300246710ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.cpp DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "ProtocolServer.h" #include "ProtocolNotification.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID const ULONG INVALID_REQUEST_ID = 0; // Default activity timeout value const ULONG DEFAULT_WAIT = 100; // MTU (Maximum Transmission Unit) for auxiliary data (QC USB imposed) const ULONG MAX_AUX_MTU_SIZE = 1024 * 256; // USB's MaxPacketSize const ULONG MAX_PACKET_SIZE = 512; // Maximum amount of time to wait on external access synchronization object #ifdef DEBUG // For the sake of debugging do not be so quick to assume failure const ULONG DEADLOCK_TIME = 180000; #else const ULONG DEADLOCK_TIME = 10000; #endif // Maximum amount of time to wait for the protocol server to process a command const ULONG COMMAND_TIME = DEADLOCK_TIME; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: ScheduleThread (Free Method) DESCRIPTION: Watch schedule for event to process or timeout PARAMETERS: pArg [ I ] - The protocol server object RETURN VALUE: void * - thread exit value (always NULL) ===========================================================================*/ void * ScheduleThread( PVOID pArg ) { // Do we have a server? cProtocolServer * pServer = (cProtocolServer *)pArg; if (pServer == 0) { TRACE( "ScheduleThread started with empty pArg." " Unable to locate cProtocolServer\n" ); ASSERT( 0 ); return NULL; } TRACE( "Schedule thread [%lu] started\n", pthread_self() ); // Default wait event timespec toTime = TimeIn( DEFAULT_WAIT ); // Return value checking int nRet; while (pServer->mbExiting == false) { DWORD nTemp; nRet = pServer->mThreadScheduleEvent.Wait( TimeFromNow( toTime ), nTemp ); if (nRet != 0 && nRet != ETIME) { // Error condition TRACE( "ScheduleThread [%lu] ScheduleThread wait error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Time to exit? if (pServer->mbExiting == true) { break; } // Get Schedule Mutex (non-blocking) nRet = pthread_mutex_trylock( &pServer->mScheduleMutex ); if (nRet == EBUSY) { // Not an error, we're just too slow // Someone else got to the ScheduleMutex before us // We'll wait for the signal again toTime = TimeIn( DEFAULT_WAIT ); TRACE( "ScheduleThread [%lu] unable to lock ScheduleMutex\n", pthread_self() ); continue; } else if (nRet != 0) { // Error condition TRACE( "ScheduleThread [%lu] mScheduleMutex error %d, %s\n", pthread_self(), nRet, strerror( nRet ) ); break; } // Verify time. In the rare event it does move backward // it would simply place all our schedule items as due now pServer->CheckSystemTime(); // Default next wait period toTime = TimeIn( DEFAULT_WAIT ); timespec curTime = TimeIn( 0 ); if (pServer->mpActiveRequest != 0) { if (pServer->mpActiveRequest->mbWaitingForResponse == true) { // Waiting on a response, this takes priority over the next // scheduled event // Has timeout expired? if (pServer->mActiveRequestTimeout <= curTime) { // Response timeout // Note: This may clear mpActiveRequest pServer->RxTimeout(); } else { // Active response timer is not yet due to expire // Default timeout again, or this response's timeout? if (pServer->mActiveRequestTimeout <= toTime) { toTime = pServer->mActiveRequestTimeout; } } } else { // This should never happen TRACE( "ScheduleThread() Sequencing error: " "Active request %lu is not waiting for response ???\n", pServer->mpActiveRequest->mID ); break; } } if (pServer->mpActiveRequest == 0 && pServer->mRequestSchedule.size() > 0) { // No response timer active, ready to start the next // scheduled item if due timespec scheduledItem = pServer->GetNextRequestTime(); // Is item due to be scheduled? if (scheduledItem <= curTime) { // Process scheduled item pServer->ProcessRequest(); } else { // Scheduled item is not yet due to be processed // Default timeout again, or this item's start time? if (scheduledItem <= toTime) { toTime = scheduledItem; } } } /*TRACE( "Updated timer at %llu waiting %lu\n", GetTickCount(), TimeFromNow( toTime ) ); */ // Unlock schedule mutex nRet = pthread_mutex_unlock( &pServer->mScheduleMutex ); if (nRet != 0) { TRACE( "ScheduleThread Unable to unlock schedule mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } TRACE( "Schedule thread [%lu] exited\n", pthread_self() ); return NULL; } /*=========================================================================== METHOD: TimeIn (Free Method) DESCRIPTION: Fill timespec with the time it will be in specified milliseconds Relative time to Absolute time PARAMETERS: millis [ I ] - Milliseconds from current time RETURN VALUE: timespec - resulting time (from epoc) NOTE: tv_sec of 0 is an error ===========================================================================*/ timespec TimeIn( ULONG millis ) { timespec outTime; int nRC = clock_gettime( CLOCK_REALTIME, &outTime ); if (nRC == 0) { // Add avoiding an overflow on (long)nsec outTime.tv_sec += millis / 1000l; outTime.tv_nsec += ( millis % 1000l ) * 1000000l; // Check if we need to carry if (outTime.tv_nsec >= 1000000000l) { outTime.tv_sec += outTime.tv_nsec / 1000000000l; outTime.tv_nsec = outTime.tv_nsec % 1000000000l; } } else { outTime.tv_sec = 0; outTime.tv_nsec = 0; } return outTime; } /*=========================================================================== METHOD: TimeFromNow (Free Method) DESCRIPTION: Find the milliseconds from current time this timespec will occur Absolute time to Relative time PARAMETERS: time [ I ] - Absolute time RETURN VALUE: Milliseconds in which absolute time will occur 0 if time has passed or error has occured ===========================================================================*/ ULONG TimeFromNow( timespec time ) { // Assume failure ULONG nOutTime = 0; timespec now; int nRC = clock_gettime( CLOCK_REALTIME, &now ); if (nRC == -1) { TRACE( "Error %d with gettime, %s\n", errno, strerror( errno ) ); return nOutTime; } if (time <= now) { return nOutTime; } nOutTime = (time.tv_sec - now.tv_sec) * 1000l; nOutTime += (time.tv_nsec - now.tv_nsec) / 1000000l; return nOutTime; } /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime = TimeIn( 0 ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================*/ // cProtocolServerRxCallback Methods /*=========================================================================*/ /*=========================================================================== METHOD: IOComplete (Free Method) DESCRIPTION: The I/O has been completed, process the results PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Bytes received during operation RETURN VALUE: None ===========================================================================*/ void cProtocolServerRxCallback::IOComplete( DWORD status, DWORD bytesReceived ) { if (mpServer != 0) { mpServer->RxComplete( status, bytesReceived ); } } /*=========================================================================*/ // cProtocolServer::sProtocolReqRsp Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Constructor PARAMETERS: requestInfo [ I ] - Underlying request object requestID [ I ] - Request ID auxDataMTU [ I ] - MTU (Maximum Transmission Unit) for auxiliary data RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ) : mRequest( requestInfo ), mID( requestID ), mAttempts( 0 ), mEncodedSize( requestInfo.GetSize() ), mRequiredAuxTxs( 0 ), mCurrentAuxTx( 0 ), mbWaitingForResponse( false ) { ULONG auxDataSz = 0; const BYTE * pAuxData = requestInfo.GetAuxiliaryData( auxDataSz ); // Compute the number of required auxiliary data transmissions? if (auxDataMTU > 0 && pAuxData != 0 && auxDataSz > 0) { mRequiredAuxTxs = 1; if (auxDataSz > auxDataMTU) { mRequiredAuxTxs = auxDataSz / auxDataMTU; if ((auxDataSz % auxDataMTU) != 0) { mRequiredAuxTxs++; } } } } /*=========================================================================== METHOD: cProtocolServer::sProtocolReqRsp (Public Method) DESCRIPTION: Copy constructor PARAMETERS: reqRsp [ I ] - Object being copied RETURN VALUE: None ===========================================================================*/ cProtocolServer::sProtocolReqRsp::sProtocolReqRsp( const sProtocolReqRsp & reqRsp ) : mRequest( reqRsp.mRequest ), mID( reqRsp.mID ), mAttempts( reqRsp.mAttempts ), mEncodedSize( reqRsp.mEncodedSize ), mRequiredAuxTxs( reqRsp.mRequiredAuxTxs ), mCurrentAuxTx( reqRsp.mCurrentAuxTx ), mbWaitingForResponse( reqRsp.mbWaitingForResponse ) { // Nothing to do }; /*=========================================================================*/ // cProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: rxType [ I ] - Protocol type to assign to incoming data txType [ I ] - Protocol type to verify for outgoing data bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ) : mpConnection( 0 ), mConnectionType( eConnectionType_Begin ), mRxCallback(), mScheduleThreadID( 0 ), mThreadScheduleEvent(), mbExiting( false ), mpServerControl( 0 ), mLastRequestID( 1 ), mpActiveRequest( 0 ), mpRxBuffer( 0 ), mRxBufferSize( bufferSzRx ), mRxType( rxType ), mTxType( txType ), mLog( logSz ) { mLastTime = TimeIn( 0 ); // Allocate receive buffer? if (mRxBufferSize > 0) { mpRxBuffer = new BYTE[mRxBufferSize]; } // Before continuing verify receive buffer was allocated if (mpRxBuffer != 0) { // Schedule mutex int nRet = pthread_mutex_init( &mScheduleMutex, NULL ); if (nRet != 0) { TRACE( "Unable to init schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } } } /*=========================================================================== METHOD: ~cProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (destroys sequencing objects) RETURN VALUE: None ===========================================================================*/ cProtocolServer::~cProtocolServer() { // This should have already been called, but ... Exit(); // Schedule mutex int nRet = pthread_mutex_destroy( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to destroy schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); } // Free receive buffer if (mpRxBuffer != 0) { delete [] mpRxBuffer; mpRxBuffer = 0; } } /*=========================================================================== METHOD: HandleRemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request Note: if a request is being processed, it cannot be inturrupted PARAMETERS: reqID [ I ] - Server assigned request ID SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::HandleRemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Find and erase request from request map std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); if (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } mRequestMap.erase( pReqIter ); // Success! bRC = true; // Find and erase request from schedule bool bFound = false; int entryIndex = -1; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { entryIndex++; tSchedule entry = *pScheduleIter; if (entry.second == reqID) { bFound = true; mRequestSchedule.erase( pScheduleIter ); break; } else { pScheduleIter++; } } // Note: schedule will be updated when mutex is unlocked/signaled } else if (mpActiveRequest != 0 && mpActiveRequest->mID == reqID) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Cancel the response timer (when active) if (mpActiveRequest->mbWaitingForResponse == true) { // Schedule will be updated when mutex is unlocked // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)reqID, ECANCELED ); } } else { // This is the active request, cancel the underlying transmit // Note: Because ProcessRequest and RemoveRequest are both muxed // with ScheduleMutex, it is impossible to for the write // to actually be in progress when this code is reached. if (mpConnection != 0) { mpConnection->CancelTx(); } // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, ECANCELED ); } } // Now delete the request delete mpActiveRequest; mpActiveRequest = 0; // Success! bRC = true; } else { TRACE( "cProtocolServer::RemoveRequest( %lu )," " invalid request ID\n", reqID ); } return bRC; } /*=========================================================================== METHOD: ScheduleRequest (Internal Method) DESCRIPTION: Schedule a request for transmission PARAMETERS: reqID [ I ] - ID of the request being scheduled this ID must exist in the internal request/schedule maps schedule [ I ] - Value in milliseconds that indicates the approximate time from now that the request is to be sent out, the actual time that the request is sent will be greater than or equal to this value dependant on requests scheduled before the request in question and standard server processing time SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ScheduleRequest( ULONG reqID, ULONG schedule ) { // Assume failure bool bRC = false; // Schedule adjust is in milliseconds timespec schTimer = TimeIn( schedule ); // Create the schedule entry tSchedule newEntry( schTimer, reqID ); // Fit this request into the schedule (ordered by scheduled time) mRequestSchedule.insert( newEntry ); // Note: timer will be updated when mScheduleMutex is unlocked return bRC; } /*=========================================================================== METHOD: RescheduleActiveRequest (Internal Method) DESCRIPTION: Reschedule (or cleanup) the active request SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RescheduleActiveRequest() { // Are there more attempts to be made? if (mpActiveRequest->mAttempts < mpActiveRequest->mRequest.GetRequests()) { // Yes, first reset the request mpActiveRequest->Reset(); // Now add it back to the request map mRequestMap[mpActiveRequest->mID] = mpActiveRequest; TRACE( "RescheduleActiveRequest(): req %lu rescheduled\n", mpActiveRequest->mID ); // Lastly reschedule the request ScheduleRequest( mpActiveRequest->mID, mpActiveRequest->mRequest.GetFrequency() ); } else { TRACE( "RescheduleActiveRequest(): req %lu removed\n", mpActiveRequest->mID ); // No, we are through with this request delete mpActiveRequest; } // There is no longer an active request mpActiveRequest = 0; } /*=========================================================================== METHOD: ProcessRequest (Internal Method) DESCRIPTION: Process a single outgoing protocol request, this consists of removing the request ID from the head of the schedule, looking up the internal request object in the request map, sending out the request, and setting up the response timer (if a response is required) SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: ===========================================================================*/ void cProtocolServer::ProcessRequest() { // Is there already an active request? if (mpActiveRequest != 0 || mpConnection == 0) { return; } // Grab request ID from the schedule std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); // Did we find the request? if (pScheduleIter == mRequestSchedule.end()) { // No return; } // Yes, grab the request ID ULONG reqID = pScheduleIter->second; // Remove from schedule mRequestSchedule.erase( pScheduleIter ); // Look up the internal request object std::map ::iterator pReqIter; pReqIter = mRequestMap.find( reqID ); // Request not found around? if (pReqIter == mRequestMap.end() || pReqIter->second == 0) { // No return; } // Set this request as the active request mpActiveRequest = pReqIter->second; TRACE( "ProcessRequest(): req %lu started\n", mpActiveRequest->mID ); // Remove request from pending request map mRequestMap.erase( pReqIter ); // Extract the underlying request const sProtocolRequest & req = mpActiveRequest->mRequest; // Increment attempt count? if (req.GetRequests() != INFINITE_REQS) { // This request isn't an indefinite one, so keep track of each attempt mpActiveRequest->mAttempts++; } bool bTxSuccess = false; // Encode data for transmission? bool bEncoded = false; sSharedBuffer * pEncoded = 0; pEncoded = EncodeTxData( req.GetSharedBuffer(), bEncoded ); if (bEncoded == false) { // Note: no longer asynchronus // Send the request data bTxSuccess = mpConnection->TxData( req.GetBuffer(), req.GetSize() ); } else if (bEncoded == true) { if (pEncoded != 0 && pEncoded->IsValid() == true) { // Note: no longer asynchronus // Send the request data mpActiveRequest->mEncodedSize = pEncoded->GetSize(); bTxSuccess = mpConnection->TxData( pEncoded->GetBuffer(), pEncoded->GetSize() ); } } if (bTxSuccess == true) { TRACE( "ProcessRequest(): req %lu finished\n", mpActiveRequest->mID ); TxComplete(); } else { TxError(); TRACE( "ProcessRequest(): req finished with a TxError\n" ); } return; } /*=========================================================================== METHOD: CheckSystemTime (Internal Method) DESCRIPTION: Check that system time hasn't moved backwards. Since we use the system time for scheduling requests we need to periodically check that the user (or system itself) hasn't reset system time backwards, if it has then we reschedule everything to the current system time. This disrupts the schedule but avoids stranding requests Updates mLastTime SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: bool: System time moved backwards? ===========================================================================*/ bool cProtocolServer::CheckSystemTime() { // Assume that time is still marching forward bool bAdjust = false; timespec curTime = TimeIn( 0 ); if (curTime < mLastTime) { // Looks like the system clock has been adjusted to an earlier // value, go through the current schedule and adjust each timer // to reflect the adjustment. This isn't an exact approach but // it prevents requests from being stranded which is our goal // Note: set iterators are constant. This means we need to // create a set with the new data, we can't modify this one std::set < tSchedule, std::less > tempSchedule; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); while (pScheduleIter != mRequestSchedule.end()) { tSchedule entry = *pScheduleIter; entry.first.tv_sec = curTime.tv_sec; entry.first.tv_nsec = curTime.tv_nsec; tempSchedule.insert( entry ); pScheduleIter++; } mRequestSchedule = tempSchedule; // Update mActiveRequestTimeout if ( (mpActiveRequest != 0) && (mpActiveRequest->mbWaitingForResponse == true) ) { // Restart active request's timeout ULONG mTimeout = mpActiveRequest->mRequest.GetTimeout(); mActiveRequestTimeout = TimeIn( mTimeout ); } TRACE( "Time has moved backwards, schedule updated\n" ); // Indicate the change bAdjust = true; } mLastTime.tv_sec = curTime.tv_sec; mLastTime.tv_nsec = curTime.tv_nsec; return bAdjust; } /*=========================================================================== METHOD: RxComplete (Internal Method) DESCRIPTION: Handle completion of receive data operation PARAMETERS: status [ I ] - Status of operation bytesReceived [ I ] - Number of bytes received SEQUENCING: This method is sequenced according to the schedule mutex i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxComplete( DWORD status, DWORD bytesReceived ) { if (status != NO_ERROR) { TRACE( "cProtocolServer::RxComplete() = %lu\n", status ); } if (mpConnection == 0) { TRACE( "cProtocolServer::RxComplete() - Not initialized\n" ); return; } // Error with the read if (status != NO_ERROR || bytesReceived == 0) { // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); return; } // Get Schedule Mutex if (GetScheduleMutex() == false) { TRACE( "RxComplete(), unable to get schedule Mutex\n" ); return; } TRACE( "RxComplete() - Entry at %llu\n", GetTickCount() ); // Decode data bool bAbortTx = false; ULONG rspIdx = INVALID_LOG_INDEX; bool bRsp = DecodeRxData( bytesReceived, rspIdx, bAbortTx ); // Is there an active request that needs to be aborted if (mpActiveRequest != 0 && bAbortTx == true) { // Yes, terminate the transmission and handle the error mpConnection->CancelTx(); TxError(); } // Is there an active request and a valid response? else if (mpActiveRequest != 0 && bRsp == true) { const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client that response was received if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_RECV, (DWORD)mpActiveRequest->mID, (DWORD)rspIdx ); } // Reschedule request as needed RescheduleActiveRequest(); } // Setup the next read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); TRACE( "RxComplete() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return; } return; } /*=========================================================================== METHOD: RxTimeout (Internal Method) DESCRIPTION: Handle the response timer expiring SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::RxTimeout() { // No active request? if (mpActiveRequest == 0) { TRACE( "RxTimeout() with no active request\n" ); ASSERT( 0 ); } TRACE( "RxTimeout() for req %lu\n", mpActiveRequest->mID ); const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to receive response, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_RSP_ERR, (DWORD)mpActiveRequest->mID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: TxComplete (Internal Method) DESCRIPTION: Handle completion of transmit data operation PARAMETERS: SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxComplete() { // No active request? if (mpActiveRequest == 0 || mpConnection == 0) { TRACE( "TxComplete() called with no active request\n" ); ASSERT( 0 ); } TRACE( "TxComplete() req %lu started\n", mpActiveRequest->mID ); ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Notify client of auxiliary data being sent? if (mpActiveRequest->mRequiredAuxTxs && mpActiveRequest->mCurrentAuxTx) { pNotifier->Notify( ePROTOCOL_EVT_AUX_TU_SENT, (DWORD)reqID, (DWORD)mpActiveRequest->mEncodedSize ); } // Check for more auxiliary data to transmit if (mpActiveRequest->mCurrentAuxTx < mpActiveRequest->mRequiredAuxTxs) { ULONG auxDataSz = 0; const BYTE * pAuxData = req.GetAuxiliaryData( auxDataSz ); if (auxDataSz > 0 && pAuxData != 0) { bool bRC = false; // Adjust for current MTU pAuxData += (mpActiveRequest->mCurrentAuxTx * MAX_AUX_MTU_SIZE); mpActiveRequest->mCurrentAuxTx++; // Last MTU? if (mpActiveRequest->mCurrentAuxTx == mpActiveRequest->mRequiredAuxTxs) { // More than one MTU? if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = (auxDataSz % MAX_AUX_MTU_SIZE); if (auxDataSz == 0) { auxDataSz = MAX_AUX_MTU_SIZE; } } if (auxDataSz % MAX_PACKET_SIZE == 0) { // If last write of unframed write request is divisible // by 512, break off last byte and send seperatly. TRACE( "TxComplete() Special case, break off last byte\n" ); bRC = mpConnection->TxData( pAuxData, auxDataSz - 1 ); if (bRC == true) { bRC = mpConnection->TxData( pAuxData + auxDataSz -1, 1 ); } } else { bRC = mpConnection->TxData( pAuxData, auxDataSz ); } } else if (mpActiveRequest->mRequiredAuxTxs > 1) { auxDataSz = MAX_AUX_MTU_SIZE; bRC = mpConnection->TxData( pAuxData, auxDataSz ); } if (bRC == true) { mpActiveRequest->mEncodedSize = auxDataSz; TxComplete(); } else { TxError(); } return; } } // Another successful transmission, add the buffer to the log ULONG reqIdx = INVALID_LOG_INDEX; sProtocolBuffer pb( req.GetSharedBuffer() ); reqIdx = mLog.AddBuffer( pb ); // Notify client? if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_SENT, (DWORD)reqID, (DWORD)reqIdx ); } // Wait for a response? if (mpActiveRequest->mRequest.IsTXOnly() == false) { // We now await the response mpActiveRequest->mbWaitingForResponse = true; mActiveRequestTimeout = TimeIn( mpActiveRequest->mRequest.GetTimeout() ); } else { // Reschedule request as needed RescheduleActiveRequest(); } } /*=========================================================================== METHOD: TxError (Internal Method) DESCRIPTION: Handle transmit data operation error be either rescheduling the request or cleaning it up SEQUENCING: Calling process must have lock on mScheduleMutex RETURN VALUE: None ===========================================================================*/ void cProtocolServer::TxError() { // No active request? if (mpActiveRequest == 0) { return; } ULONG reqID = mpActiveRequest->mID; const sProtocolRequest & req = mpActiveRequest->mRequest; const cProtocolNotification * pNotifier = req.GetNotifier(); // Failure to send request, notify client if (pNotifier != 0) { pNotifier->Notify( ePROTOCOL_EVT_REQ_ERR, (DWORD)reqID, (DWORD)0 ); } // Reschedule request as needed RescheduleActiveRequest(); } /*=========================================================================== METHOD: Initialize (Public Method) DESCRIPTION: Initialize the protocol server by starting up the schedule thread SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Initialize() { // Assume failure bool bRC = false; mbExiting = false; // Get mScheduleMutex if (GetScheduleMutex() == true) { if (mScheduleThreadID == 0) { // Yes, start thread int nRet = pthread_create( &mScheduleThreadID, NULL, ScheduleThread, this ); if (nRet == 0) { // Success! bRC = true; } } } else { TRACE( "cProtocolServer::Initialize(), unable to aquire ScheduleMutex\n" ); return false; } // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } return bRC; } /*=========================================================================== METHOD: Exit (Public Method) DESCRIPTION: Exit the protocol server by exiting the schedule thread (if necessary) SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Exit() { // Assume failure bool bRC = false; if (mScheduleThreadID != 0) { if (GetScheduleMutex() == false) { // This should never happen return false; } // Check that mScheduleTheadID is still not 0 if (mScheduleThreadID == 0) { printf( "mScheduleThreadID was zero!!!\n" ); ReleaseScheduleMutex( false ); return false; } // Set exit event mbExiting = true; // Signal a schedule update if (mThreadScheduleEvent.Set( 1 ) != 0) { // This should never happen return false; } TRACE( "Joining ScheduleThread %lu\n", mScheduleThreadID ); // Allow process to continue until it finishes int nRet = pthread_join( mScheduleThreadID, NULL ); if (nRet == ESRCH) { TRACE( "ScheduleThread has exited already\n" ); } else if (nRet != 0) { TRACE( "Unable to join ScheduleThread. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } TRACE( "cProtocolServer::Exit(), completed thread %lu\n", (ULONG)mScheduleThreadID ); bRC = true; // Release "handle" mScheduleThreadID = 0; // Release mutex lock, don't signal ScheduleThread if (ReleaseScheduleMutex( false ) == false) { // This should never happen return false; } } else { // No ScheduleThread bRC = true; } // Free any allocated requests std::map ::iterator pReqIter; pReqIter = mRequestMap.begin(); while (pReqIter != mRequestMap.end()) { sProtocolReqRsp * pReqRsp = pReqIter->second; if (pReqRsp != 0) { delete pReqRsp; } pReqIter++; } mRequestMap.clear(); // Free log mLog.Clear(); return bRC; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the given communications port PARAMETERS: pPort [ I ] - String pointer representing the device node to connect to (IE: /dev/qcqmi0) SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Connect( LPCSTR pPort ) { // Assume failure bool bRC = false; if (pPort == 0 || pPort[0] == 0 || mpConnection == 0) { return bRC; } // Connect to device // Set callback mRxCallback.SetServer( this ); // Override to initialize port with protocol specific options bRC = mpConnection->Connect( pPort ); if (bRC == true) { bRC = InitializeComm(); if (bRC == true) { // Setup the initial read mpConnection->RxData( mpRxBuffer, (ULONG)mRxBufferSize, (cIOCallback *)&mRxCallback ); } } return bRC; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current communications port SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::Disconnect() { // Disconnect if (mpConnection != 0) { // Cancel any outstanding I/O mpConnection->CancelIO(); } // Empty callback mRxCallback.SetServer( 0 ); // Cleanup COM port CleanupComm(); if (mpConnection != 0) { // Now disconnect bool bDis = mpConnection->Disconnect(); delete mpConnection; return bDis; } else { return true; } } /*=========================================================================== METHOD: IsConnected (Public Method) DESCRIPTION: Are we currently connected to a port? SEQUENCING: None RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::IsConnected() { return (mpConnection != 0 && mpConnection->IsConnected()); } /*=========================================================================== METHOD: AddRequest (Public Method) DESCRIPTION: Add an outgoing protocol request to the protocol server request queue PARAMETERS: req [ I ] - Request being added SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes RETURN VALUE: ULONG - ID of scheduled request (INVALID_REQUEST_ID upon error) ===========================================================================*/ ULONG cProtocolServer::AddRequest( const sProtocolRequest & req ) { // Assume failure ULONG reqID = INVALID_REQUEST_ID; // Server not configured for sending requests? if (IsValid( mTxType ) == false) { return reqID; } // Request type not valid for server? if (req.GetType() != mTxType) { return reqID; } // Invalide request? if (ValidateRequest( req ) == false) { return reqID; } // Get mScheduleMutex if (GetScheduleMutex() == true) { TRACE( "AddRequest() - Entry at %llu\n", GetTickCount() ); // Grab next available request ID if (++mLastRequestID == 0) { mLastRequestID++; } reqID = mLastRequestID; while (mRequestMap.find( reqID ) != mRequestMap.end()) { reqID++; } // Wrap in our internal structure sProtocolReqRsp * pReqRsp = 0; pReqRsp = new sProtocolReqRsp( req, reqID, MAX_AUX_MTU_SIZE ); if (pReqRsp != 0) { // Add to request map mRequestMap[reqID] = pReqRsp; // ... and schedule ScheduleRequest( reqID, req.GetSchedule() ); } TRACE( "AddRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return INVALID_REQUEST_ID; } } else { TRACE( "cProtocolServer::AddRequest(), unable to get schedule Mutex\n" ); } return reqID; } /*=========================================================================== METHOD: RemoveRequest (Public Method) DESCRIPTION: Remove a previously added protocol request SEQUENCING: This method is sequenced according to the schedule mutex, i.e. any other thread that needs to modify the schedule will block until this method completes Note: If a request is being written, it cannot be inturrupted as both ProcessRequest and RemoveRequest depend on the ScheduleMutex and the write is synchronus. If the request has been written but the read has not been triggered it can be removed. PARAMETERS: reqID [ I ] - ID of request being removed RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::RemoveRequest( ULONG reqID ) { // Assume failure bool bRC = false; // Get Schedule Mutex if (GetScheduleMutex() == true) { TRACE( "RemoveRequest() - Entry at %llu\n", GetTickCount() ); bRC = HandleRemoveRequest( reqID ); TRACE( "RemoveRequest() - Exit at %llu\n", GetTickCount() ); // Unlock schedule mutex if (ReleaseScheduleMutex() == false) { // This should never happen return false; } } else { TRACE( "cProtocolServer::RemoveRequest(), unable to get mScheduleMutex\n" ); } return bRC; } /*=========================================================================== METHOD: GetScheduleMutex (Internal Method) DESCRIPTION: Get the schedule mutex. Additionally a check is applied to verify the DEADLOCK_TIME was not exceeded SEQUENCING: This function will block until the mScheduleMutex is aquired PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::GetScheduleMutex() { ULONGLONG nStart = GetTickCount(); //TRACE( "Locking Schedule mutex\n" ); int nRet = pthread_mutex_lock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to lock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } ULONGLONG nEnd = GetTickCount(); if (nEnd - nStart > DEADLOCK_TIME) { TRACE( "Deadlock time exceeded: took %llu ms\n", nEnd - nStart ); ReleaseScheduleMutex( true ); return false; } //TRACE( "Locked ScheduleMutex\n" ); return true; } /*=========================================================================== METHOD: ReleaseScheduleMutex (Internal Method) DESCRIPTION: Release lock on the schedule mutex SEQUENCING: Calling process must have lock PARAMETERS: bSignalThread [ I ] - Signal Schedule thread as well? RETURN VALUE: bool ===========================================================================*/ bool cProtocolServer::ReleaseScheduleMutex( bool bSignalThread ) { if (bSignalThread == true) { if (mThreadScheduleEvent.Set( 1 ) != 0) { return false; } } int nRet = pthread_mutex_unlock( &mScheduleMutex ); if (nRet != 0) { TRACE( "Unable to unlock schedule mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/ProtocolServer.h000077500000000000000000000263721455567757300243420ustar00rootroot00000000000000/*=========================================================================== FILE: ProtocolServer.h DESCRIPTION: Generic protocol packet server PUBLIC CLASSES AND METHODS: cProtocolServer Abstract base class for protocol servers Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Connection.h" #include "ProtocolRequest.h" #include "ProtocolLog.h" #include "Event.h" #include #include //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- class cProtocolServer; struct sServerControl; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid request ID extern const ULONG INVALID_REQUEST_ID; // Fill timespec with the time it will be in specified milliseconds // Relative time to Absolute time timespec TimeIn( ULONG millis ); // Find the milliseconds from current time this timespec will occur // Absolute time to Relative time ULONG TimeFromNow( timespec time ); // Provide a number for sequencing reference, similar to the windows function ULONGLONG GetTickCount(); // timespec < comparison method inline bool operator< (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec < second.tv_nsec) ) ); } // timespec <= comparison method inline bool operator<= (const timespec & first, const timespec & second) { return ( (first.tv_sec < second.tv_sec) ||( (first.tv_sec == second.tv_sec) &&(first.tv_nsec <= second.tv_nsec) ) ); } /*=========================================================================*/ // Class cProtocolServerRxCallback /*=========================================================================*/ class cProtocolServerRxCallback { public: // (Inline) Constructor cProtocolServerRxCallback() : mpServer( 0 ) { }; // (Inline) Destructor virtual ~cProtocolServerRxCallback() { }; // (Inline) Set server object to pass results to void SetServer( cProtocolServer * pServer ) { mpServer = pServer; }; // The I/O has been completed, process the results virtual void IOComplete( DWORD status, DWORD bytesReceived ); protected: /* Protocol server to interact with */ cProtocolServer * mpServer; }; /*=========================================================================*/ // Class cProtocolServer /*=========================================================================*/ class cProtocolServer { public: // Constructor cProtocolServer( eProtocolType rxType, eProtocolType txType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cProtocolServer(); // Initialize the protocol server bool Initialize(); // Exit the protocol server bool Exit(); // Connect to the given communications port bool Connect( LPCSTR pPort ); // Disconnect from target bool Disconnect(); // Are we currently connected to a port? bool IsConnected(); // Add an outgoing protocol request to the protocol server request queue ULONG AddRequest( const sProtocolRequest & req ); // Remove a previously added protocol request bool RemoveRequest( ULONG reqID ); // (Inline) Return the protocol log const cProtocolLog & GetLog() { return mLog; }; protected: // Internal protocol server request/response structure, used to track // info related to sending out a request struct sProtocolReqRsp { public: // Constructor sProtocolReqRsp( const sProtocolRequest & requestInfo, ULONG requestID, ULONG auxDataMTU ); // Copy constructor sProtocolReqRsp( const sProtocolReqRsp & reqRsp ); // (Inline) Reset for next transmission attempt void Reset() { mEncodedSize = mRequest.GetSize(); mCurrentAuxTx = 0; mbWaitingForResponse = 0; }; /* Request ID */ ULONG mID; /* Number of times this request has been attempted */ ULONG mAttempts; /* Size of encoded data being transmitted */ ULONG mEncodedSize; /* Number of required auxiliary data transmissions */ ULONG mRequiredAuxTxs; /* Current auxiliary data transmission */ ULONG mCurrentAuxTx; /* Are we currently waiting for a response? */ bool mbWaitingForResponse; /* Underlying protocol request */ sProtocolRequest mRequest; }; // Handle the remove request bool HandleRemoveRequest( ULONG reqID ); // Schedule a request for transmission bool ScheduleRequest( ULONG reqID, ULONG schedule ); // (Inline) Get next request's time from mRequestSchedule timespec GetNextRequestTime() { timespec outTime; std::set ::iterator pScheduleIter; pScheduleIter = mRequestSchedule.begin(); tSchedule entry = *pScheduleIter; outTime = entry.first; return outTime; } // (Inline) Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ) { return req.IsValid(); }; // Reschedule (or cleanup) the active request void RescheduleActiveRequest(); // Process a single outgoing protocol request void ProcessRequest(); // Check that system time hasn't moved backwards bool CheckSystemTime(); // Perform protocol specific communications port initialization virtual bool InitializeComm() = 0; // Perform protocol specific communications port cleanup virtual bool CleanupComm() = 0; // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) = 0; // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) = 0; // Handle completion of receive data operation void RxComplete( DWORD status, DWORD bytesReceived ); // Handle the response timer expiring void RxTimeout(); // Handle completion of transmit data operation virtual void TxComplete(); // Handle a transmission error void TxError(); /* Underlying communications object */ cConnection * mpConnection; /* Underlying connection type */ enum eConnectionType { eConnectionType_Begin = 0, eConnectionType_RmNet = 1, eConnectionType_SMD = 2, eConnectionType_End } mConnectionType; /* Rx callback */ cProtocolServerRxCallback mRxCallback; /* ID of Schedule thread */ pthread_t mScheduleThreadID; // ScheduleThread signal event cEvent mThreadScheduleEvent; // Schedule mutex // Ensures exclusive access to mRequestSchedule pthread_mutex_t mScheduleMutex; // Is the thread in the process of exiting? // (no new commands will be accepted) bool mbExiting; /* Client/server thread control object */ sSharedBuffer * mpServerControl; /* Protocol request schedule (scheduled time/request ID) */ typedef std::pair tSchedule; std::set < tSchedule, std::less > mRequestSchedule; /* Last system time value (used to check for time changes) */ timespec mLastTime; /* Protocol request map (request ID mapped to internal req/rsp struct) */ std::map mRequestMap; /* Last assigned request ID */ ULONG mLastRequestID; /* Current request being processed */ sProtocolReqRsp * mpActiveRequest; /* Absolute timeout for mpActiveRequest based on when write was completed */ timespec mActiveRequestTimeout; /* Data buffer for incoming data */ BYTE * mpRxBuffer; /* Size of above buffer (i.e. how much data to read in at once) */ ULONG mRxBufferSize; /* Protocol type for incoming/outgoing data*/ eProtocolType mRxType; eProtocolType mTxType; /* Protocol log */ cProtocolLog mLog; // Get a lock on ScheduleMutex bool GetScheduleMutex(); // Release lock on ScheduleMutex // Signal ScheduleThread if desired bool ReleaseScheduleMutex( bool bSignalThread = true ); // Schedule Thread gets full access friend void * ScheduleThread( PVOID pArg ); // Callback objects get full access friend class cProtocolServerRxCallback; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/QMIBuffers.cpp000077500000000000000000000234461455567757300236470ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.cpp DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // sQMIServiceBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sQMIServiceBuffer (Public Method) DESCRIPTION: Constructor PARAMETERS: pBuffer [ I ] - Shareable buffer that contains the DIAG data RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::sQMIServiceBuffer( sSharedBuffer * pBuffer ) : sProtocolBuffer( pBuffer ) { sQMIServiceBuffer::Validate(); } /*=========================================================================== METHOD: ~sQMIServiceBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sQMIServiceBuffer::~sQMIServiceBuffer() { // Nothing to do } /*=========================================================================== METHOD: GetResult (Public Method) DESCRIPTION: Return contents of mandatory result content PARAMETERS: returnCode [ I ] - The return code (should be eQMIResultCode) errorCode [ I ] - The error code (should be eQMIErrorCode) RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::GetResult( ULONG & returnCode, ULONG & errorCode ) { if (IsResponse() == false) { return false; } std::map ::const_iterator pIter; pIter = mContents.find( QMI_TLV_ID_RESULT ); if (pIter == mContents.end()) { return false; } const sQMIRawContentHeader * pContent = pIter->second; if (pContent == 0) { ASSERT( 0 ); return false; } if (pContent->mLength != 4) { return false; } const WORD * pData = (const WORD *)(++pContent); returnCode = (ULONG)*pData++; errorCode = (ULONG)*pData; return true; } /*=========================================================================== METHOD: BuildBuffer (Static Public Method) DESCRIPTION: Build a QMI request PARAMETERS: serviceType [ I ] - QMI service type msgID [ I ] - The QMI message request ID bResponse [ I ] - Build a response? bIndication [ I ] - Build an indication? pPayload [ I ] - Payload payloadLen [ I ] - Size of above payload RETURN VALUE: sSharedBuffer * : The request in an allocated buffer (0 on error) ===========================================================================*/ sSharedBuffer * sQMIServiceBuffer::BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse, bool bIndication, const BYTE * pPayload, ULONG payloadLen ) { const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG totalHdrSz = szTransHdr + szMsgHdr; // Truncate payload? if (payloadLen > (QMI_MAX_BUFFER_SIZE - totalHdrSz)) { payloadLen = QMI_MAX_BUFFER_SIZE - totalHdrSz; } // Make sure length agrees with pointer if (pPayload == 0) { payloadLen = 0; } // Allocate buffer PBYTE pBuffer = new BYTE[payloadLen + totalHdrSz]; if (pBuffer == 0) { return 0; } // Format header sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)&pBuffer[0]; pHdr->mCompound = 0; pHdr->mResponse = 0; pHdr->mIndication = 0; pHdr->mReserved = 0; pHdr->mTransactionID = 1; bool bTX = true; if (bResponse == true) { pHdr->mResponse = 1; bTX = false; } else if (bIndication == true) { pHdr->mIndication = 1; bTX = false; } pHdr++; // Format message header sQMIRawMessageHeader * pMsg = 0; pMsg = (sQMIRawMessageHeader *)pHdr; pMsg->mMessageID = msgID; pMsg->mLength = (WORD)payloadLen; // Copy in payload? if (payloadLen > 0 && pPayload != 0) { memcpy( (LPVOID)&pBuffer[totalHdrSz], (LPCVOID)&pPayload[0], (SIZE_T)payloadLen ); } // Compute total size ULONG sz = payloadLen + totalHdrSz; // Build and return the shared buffer eProtocolType pt = MapQMIServiceToProtocol( serviceType, bTX ); sSharedBuffer * pBuf = new sSharedBuffer( sz, pBuffer, pt ); return pBuf; } /*=========================================================================== METHOD: Validate (Internal Method) DESCRIPTION: Is this open unframed request/response packet valid? RETURN VALUE: bool ===========================================================================*/ bool sQMIServiceBuffer::Validate() { // Assume failure bool bRC = false; // Sanity check protocol type eProtocolType pt = GetType(); if (IsQMIProtocol( pt ) == false) { mbValid = bRC; return bRC; } const ULONG szTransHdr = (ULONG)sizeof(sQMIServiceRawTransactionHeader); const ULONG szMsgHdr = (ULONG)sizeof(sQMIRawMessageHeader); const ULONG szContentHdr = (ULONG)sizeof(sQMIRawContentHeader); // Must be enough space for both headers ULONG sz = GetSize(); if (sz < szTransHdr + szMsgHdr) { mbValid = bRC; return bRC; } const BYTE * pBuffer = GetBuffer(); // Obtain transaction header const sQMIServiceRawTransactionHeader * pTransHdr = 0; pTransHdr = (const sQMIServiceRawTransactionHeader *)pBuffer; pBuffer += szTransHdr; // This is required to be 0 if (pTransHdr->mCompound != 0) { mbValid = bRC; return bRC; } // These are mutually exclusive if (pTransHdr->mIndication == 1 && pTransHdr->mResponse == 1) { mbValid = bRC; return bRC; } // Requests/responses required valid transaction IDs if ( (pTransHdr->mIndication == 0) && (pTransHdr->mTransactionID == (WORD)INVALID_QMI_TRANSACTION_ID) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 1 || pTransHdr->mIndication == 1) && (IsQMIProtocolRX( pt ) == false) ) { mbValid = bRC; return bRC; } if ( (pTransHdr->mResponse == 0 && pTransHdr->mIndication == 0) && (IsQMIProtocolTX( pt ) == false) ) { mbValid = bRC; return bRC; } // Obtain message header const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (const sQMIRawMessageHeader *)pBuffer; pBuffer += szMsgHdr; // Validate reported length if (sz != ((ULONG)pMsgHdr->mLength + szTransHdr + szMsgHdr)) { mbValid = bRC; return bRC; } // Extract content TLV structures ULONG contentProcessed = 0; ULONG contentSz = (ULONG)pMsgHdr->mLength; while (contentProcessed < contentSz) { const sQMIRawContentHeader * pContent = 0; pContent = (const sQMIRawContentHeader *)pBuffer; ULONG tlvLen = szContentHdr + pContent->mLength; contentProcessed += tlvLen; if (contentProcessed <= contentSz) { mContents[(ULONG)pContent->mTypeID] = pContent; } else { mContents.clear(); mbValid = bRC; return bRC; } pBuffer += tlvLen; } // Validate TLV reported lengths if (contentProcessed != contentSz) { mbValid = bRC; return bRC; } // Success! bRC = true; mbValid = bRC; return mbValid; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/QMIBuffers.h000077500000000000000000000275531455567757300233170ustar00rootroot00000000000000/*=========================================================================== FILE: QMIBuffers.h DESCRIPTION: QMI service protocol related structures and affliated methods PUBLIC CLASSES AND METHODS: sQMUXHeader sQMIControlRawTransactionHeader sQMIServiceRawTransactionHeader sQMIRawMessageHeader sQMIRawContentHeader sQMIServiceBuffer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolBuffer.h" #include "QMIEnum.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // QMI maximum buffer size (cannot be larger than MAX_SHARED_BUFFER_SIZE) const ULONG QMI_MAX_BUFFER_SIZE = MAX_SHARED_BUFFER_SIZE; // Content ID for mandatory result TLV const ULONG QMI_TLV_ID_RESULT = 2; /*=========================================================================== METHOD: MapQMIServiceToProtocol (Inline Method) DESCRIPTION: Map QMI service type (eQMIService) and direction to a protocol type (eProtocolType) PARAMETERS: serviceType [ I ] - Enum value being mapped bTransmission [ I ] - Is this a transmission (TX vs. RX)? RETURN VALUE: eProtocolType ===========================================================================*/ inline eProtocolType MapQMIServiceToProtocol( eQMIService serviceType, bool bTransmission = true ) { eProtocolType pt = ePROTOCOL_ENUM_BEGIN; if (IsValid( serviceType ) == false) { return pt; } DWORD tmp = ((DWORD)serviceType * 2) + (DWORD)ePROTOCOL_QMI_CTL_RX; if (bTransmission == true) { tmp++; } if (IsQMIProtocol( (eProtocolType)tmp ) == true) { pt = (eProtocolType)tmp; } return pt; }; /*=========================================================================== METHOD: MapProtocolToQMIService (Inline Method) DESCRIPTION: Map protocol type (eProtocolType) to QMI service type (eQMIService) PARAMETERS: protocolType [ I ] - Enum value being mapped RETURN VALUE: bool ===========================================================================*/ inline eQMIService MapProtocolToQMIService( eProtocolType protocolType ) { eQMIService st = eQMI_SVC_ENUM_BEGIN; if (IsQMIProtocol( protocolType ) == false) { return st; } DWORD tmp = ((DWORD)protocolType - (DWORD)ePROTOCOL_QMI_CTL_RX) / 2; if (IsValid( (eQMIService)tmp ) == true) { st = (eQMIService)tmp; } return st; }; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sQMUXHeader // Struct to represent a QMUX transaction header (raw) /*=========================================================================*/ struct sQMUXHeader { public: WORD mLength; BYTE mFlags; BYTE mServiceType; BYTE mClientID; }; /*=========================================================================*/ // Struct sQMIControlRawTransactionHeader // Struct to represent a QMI control transaction header (raw) /*=========================================================================*/ struct sQMIControlRawTransactionHeader { public: BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 6; BYTE mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIServiceRawTransactionHeader // Struct to represent a QMI service transaction header (raw) /*=========================================================================*/ struct sQMIServiceRawTransactionHeader { public: BYTE mCompound : 1; // Is this a compound transaction? BYTE mResponse : 1; // Is this a response transaction? BYTE mIndication : 1; // Is this an indication transaction? BYTE mReserved : 5; WORD mTransactionID; // Transaction ID }; /*=========================================================================*/ // Struct sQMIRawMessageHeader // Struct to represent a QMI (control/service) message header (raw) /*=========================================================================*/ struct sQMIRawMessageHeader { public: WORD mMessageID; // Message ID WORD mLength; // Length of message (not including this header) }; /*=========================================================================*/ // Struct sQMIRawContentHeader // Struct to represent a QMI (control/service) content // (i.e Type/Length/Value, TLV) header (raw) /*=========================================================================*/ struct sQMIRawContentHeader { public: BYTE mTypeID; // Content type ID WORD mLength; // Content length (not including this header) }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================*/ // Struct sQMIServiceBuffer // Struct to represent a QMI service channel request/response/indication // (shared buffer) /*=========================================================================*/ struct sQMIServiceBuffer : public sProtocolBuffer { public: // Constructor sQMIServiceBuffer( sSharedBuffer * pBuffer ); // Destructor virtual ~sQMIServiceBuffer(); // (Inline) Is this a request? bool IsRequest() const { bool bRequest = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bRequest = (pHdr->mResponse == 0 && pHdr->mIndication == 0); } return bRequest; }; // (Inline) Is this a response? bool IsResponse() const { bool bResponse = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bResponse = (pHdr->mResponse == 1); } return bResponse; }; // (Inline) Is this an indication? bool IsIndication() const { bool bInd = false; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { bInd = (pHdr->mIndication == 1); } return bInd; }; // (Inline) Return raw header const sQMIServiceRawTransactionHeader * GetHeader() const { const sQMIServiceRawTransactionHeader * pHdr = 0; if (IsValid() == true) { pHdr = (const sQMIServiceRawTransactionHeader *)GetBuffer(); } return pHdr; }; // (Inline) Return the message ID ULONG GetMessageID() const { ULONG id = (ULONG)0xffffffff; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; id = pMsgHdr->mMessageID; } return id; }; // (Inline) Return the transaction ID WORD GetTransactionID() const { WORD id = (WORD)INVALID_QMI_TRANSACTION_ID; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { id = pHdr->mTransactionID; } return id; }; // (Inline) Return raw content array const sQMIRawContentHeader * GetRawContents( ULONG & contentLen ) const { // Assume failure ULONG len = 0; const sQMIRawContentHeader * pRaw = 0; const sQMIServiceRawTransactionHeader * pHdr = GetHeader(); if (pHdr != 0) { pHdr++; const sQMIRawMessageHeader * pMsgHdr = 0; pMsgHdr = (sQMIRawMessageHeader *)pHdr; len = pMsgHdr->mLength; pMsgHdr++; if (len > 0) { pRaw = (const sQMIRawContentHeader *)pMsgHdr; } } contentLen = len; return pRaw; }; // (Inline) Return content structures std::map GetContents() const { return mContents; }; // Return contents of mandatory result content bool GetResult( ULONG & returnCode, ULONG & errorCode ); // Build a QMI request/response/indication static sSharedBuffer * BuildBuffer( eQMIService serviceType, WORD msgID, bool bResponse = false, bool bIndication = false, const BYTE * pData = 0, ULONG dataLen = 0 ); protected: // QMI protocol server has to be able to set the transaction ID friend class cQMIProtocolServer; // Set the transaction ID void SetTransactionID( WORD tid ) const { if (tid == (WORD)INVALID_QMI_TRANSACTION_ID || IsValid() == false) { return; } sQMIServiceRawTransactionHeader * pHdr = 0; pHdr = (sQMIServiceRawTransactionHeader *)GetHeader(); if (pHdr != 0) { pHdr->mTransactionID = tid; } }; // Is this QMI request/response/indication packet valid? virtual bool Validate(); /* Content TLV structures (indexed by type ID) */ std::map mContents; private: // Prevent 'upcopying' sQMIServiceBuffer( const sProtocolBuffer & ); sQMIServiceBuffer & operator = ( const sProtocolBuffer & ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/QMIEnum.h000077500000000000000000002223161455567757300226210ustar00rootroot00000000000000/*=========================================================================== FILE: QMIEnum.h DESCRIPTION: QMI protocol enumerations and related methods PUBLIC ENUMERATIONS AND METHODS: eQMIService eQMIMessageCTL eQMIMessageWDS eQMIMessageDMS eQMIMessageNAS eQMIMessageWMS eQMIMessagePDS eQMIMessageAUTH eQMIMessageAT eQMIMessageVoice eQMIMessageUIM eQMIMessagePBM eQMIMessageSAR eQMIMessageRMTFS eQMIMessageCAT eQMIMessageRMS eQMIMessageOMA eQMIResultCode eQMIErrorCode eQMICallEndReason eIPAddressType eSMSMessageMode Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Invalid QMI transaction ID const ULONG INVALID_QMI_TRANSACTION_ID = 0; // QMI DMS PRL size constants const ULONG QMI_DMS_MAX_PRL_SIZE = 16384; const ULONG QMI_DMS_MAX_PRL_BLOCK = 256; /*=========================================================================*/ // eQMIService Enumeration // QMI Service Type Enumeration /*=========================================================================*/ enum eQMIService { eQMI_SVC_ENUM_BEGIN = -1, eQMI_SVC_CONTROL, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_RESERVED_13, // 013 Reserved eQMI_SVC_RMTFS, // 014 Remote file system service eQMI_SVC_RESERVED_15, // 015 Reserved eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_RESERVED_18, // 018 Reserved eQMI_SVC_RESERVED_19, // 019 Reserved eQMI_SVC_CSD, // 020 Core sound driver service eQMI_SVC_EFS, // 021 Embedded file system service eQMI_SVC_RESERVED_22, // 022 Reserved eQMI_SVC_TS, // 023 Thermal sensors service eQMI_SVC_TMD, // 024 Thermal mitigation device service eQMI_SVC_RESERVED_25, // 025 Reserved eQMI_SVC_RESERVED_26, // 026 Reserved eQMI_SVC_RESERVED_27, // 027 Reserved eQMI_SVC_RESERVED_28, // 028 Reserved eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service eQMI_SVC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIService validity check PARAMETERS: svc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIService svc ) { bool retVal = false; if ( (svc > eQMI_SVC_ENUM_BEGIN && svc <= eQMI_SVC_RESERVED_28) || (svc >= eQMI_SVC_CAT && svc < eQMI_SVC_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCTL Enumeration // QMI Control Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCTL { eQMI_CTL_ENUM_BEGIN = -1, eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode eQMI_CTL_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCTL validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCTL msgID ) { bool retVal = false; if (msgID >= eQMI_CTL_SET_INSTANCE_ID && msgID < eQMI_CTL_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWDS Enumeration // QMI WDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWDS { eQMI_WDS_ENUM_BEGIN = -1, eQMI_WDS_RESET, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_SET_INDICATION, // 003 Set indication conditions eQMI_WDS_START_NET = 32, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_AUTOCONNECT = 81, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_TMGI_ACTIVATE, // 101 Activate eMBMS TMGI eQMI_WDS_TMGI_ACT_IND = 101, // 101 eMBMS TMGI activate indication eQMI_WDS_TMGI_DEACTIVATE, // 102 Activate eMBMS TMGI eQMI_WDS_TMGI_DEACT_IND = 102, // 102 eMBMS TMGI activate indication eQMI_WDS_TMGI_LIST_QUERY, // 103 Query for eMBMS TMGI list eQMI_WDS_TMGI_LIST_IND, // 104 eMBMS TMGI list query indication eQMI_WDS_GET_PREF_DATA_SYS, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_GET_CURR_DATA_SYS, // 107 Get current data systems status eQMI_WDS_GET_PDN_THROTTLE, // 108 Get PDN throttle info eQMI_WDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWDS msgID ) { bool retVal = false; if ( (msgID > eQMI_WDS_ENUM_BEGIN && msgID <= eQMI_WDS_SET_INDICATION) || (msgID >= eQMI_WDS_START_NET && msgID <= eQMI_WDS_GET_DORMANCY) || (msgID >= eQMI_WDS_GET_AUTOCONNECT && msgID <= eQMI_WDS_MODEM_INFO_IND) || (msgID >= eQMI_WDS_GET_ACTIVE_MIP && msgID <= eQMI_WDS_SET_IP_FAMILY) || (msgID >= eQMI_WDS_SET_AUTOCONNECT && msgID < eQMI_WDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageDMS Enumeration // QMI DMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageDMS { eQMI_DMS_ENUM_BEGIN = -1, eQMI_DMS_RESET, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageDMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageDMS msgID ) { bool retVal = false; if ( (msgID > eQMI_DMS_ENUM_BEGIN && msgID <= eQMI_DMS_EVENT_IND) || (msgID >= eQMI_DMS_GET_CAPS && msgID < eQMI_DMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageNAS Enumeration // QMI NAS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageNAS { eQMI_NAS_ENUM_BEGIN = -1, eQMI_NAS_RESET, // 000 Reset NAS service state variables eQMI_NAS_ABORT, // 001 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 002 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 002 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 003 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 032 Get the signal strength eQMI_NAS_SCAN_NETS, // 033 Scan for visible network eQMI_NAS_REGISTER_NET, // 034 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 035 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 036 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 036 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 037 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 038 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 039 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 040 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 041 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 042 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 043 Get the technology preference eQMI_NAS_GET_ACCOLC, // 044 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 045 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 046 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 047 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 048 Set various network parameters eQMI_NAS_GET_RF_INFO, // 049 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 050 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 051 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 052 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 052 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 055 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 056 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 056 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 057 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 058 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 059 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 060 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 061 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 062 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 063 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 064 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 065 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 066 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 067 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 068 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 069 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 070 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 071 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 072 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 073 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 075 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 076 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 077 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 078 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 079 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 080 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 081 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 082 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 083 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 084 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 085 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 086 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 087 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 088 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 089 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 090 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 091 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 092 Get dual standby preference eQMI_NAS_DETACH_LTE, // 093 Detach the current LTE system eQMI_NAS_BLOCK_LTE_PLMN, // 094 Block LTE PLMN eQMI_NAS_UNBLOCK_LTE_PLMN, // 095 Unblock LTE PLMN eQMI_NAS_RESET_LTE_PLMN_BLK, // 096 Reset LTE PLMN blocking eQMI_NAS_CUR_PLMN_NAME_IND, // 097 Current PLMN name indication eQMI_NAS_CONFIG_EMBMS, // 098 Configure eMBMS eQMI_NAS_GET_EMBMS_STATUS, // 099 Get eMBMS status eQMI_NAS_EMBMS_STATUS_IND, // 100 eMBMS status indication eQMI_NAS_GET_CDMA_POS_INFO, // 101 Get CDMA position info eQMI_NAS_RF_BAND_INFO_IND, // 102 RF band info indication eQMI_NAS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageNAS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageNAS msgID ) { bool retVal = false; if ( (msgID > eQMI_NAS_ENUM_BEGIN && msgID <= eQMI_NAS_SET_REG_EVENT) || (msgID >= eQMI_NAS_GET_RSSI && msgID <= eQMI_NAS_SYS_SELECT_IND) || (msgID >= eQMI_NAS_SET_DDTM_PREF && msgID <= eQMI_NAS_GET_MODE_PREF) || (msgID >= eQMI_NAS_SET_DSB_PREF && msgID < eQMI_NAS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageWMS Enumeration // QMI WMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageWMS { eQMI_WMS_ENUM_BEGIN = -1, eQMI_WMS_RESET, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageWMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageWMS msgID ) { bool retVal = false; if ( (msgID > eQMI_WMS_ENUM_BEGIN && msgID <= eQMI_WMS_EVENT_IND) || (msgID >= eQMI_WMS_RAW_SEND && msgID <= eQMI_WMS_DELETE) || (msgID >= eQMI_WMS_GET_MSG_PROTOCOL && msgID < eQMI_WMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePDS Enumeration // QMI PDS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDS { eQMI_PDS_ENUM_BEGIN = -1, eQMI_PDS_RESET, // 00 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 01 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 01 PDS report indication eQMI_PDS_GET_STATE = 32, // 32 Return PDS service state eQMI_PDS_STATE_IND = 32, // 32 PDS service state indication eQMI_PDS_SET_STATE, // 33 Set PDS service state eQMI_PDS_START_SESSION, // 34 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 35 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 36 Manual tracking session position eQMI_PDS_END_SESSION, // 37 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 38 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 39 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 40 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 41 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 42 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 43 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 44 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 45 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 46 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 47 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 48 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 49 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 50 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 51 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 52 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 53 Request single position fix eQMI_PDS_GET_VERSION, // 54 Get PDS service version eQMI_PDS_INJECT_XTRA, // 55 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 56 Inject position data eQMI_PDS_INJECT_WIFI, // 57 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 58 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 59 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 60 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 61 Inject absolute time eQMI_PDS_INJECT_EFS, // 62 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 63 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 64 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 65 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 66 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 67 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 68 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 69 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 70 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 70 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 71 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 72 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 72 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 73 Force receiver off eQMI_PDS_GET_METHODS = 80, // 80 Get GPS position methods state eQMI_PDS_SET_METHODS, // 81 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 82 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 83 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 84 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 85 Set sensor config eQMI_PDS_GET_NAV_CFG, // 86 Get navigation config eQMI_PDS_SET_NAV_CFG, // 87 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 90 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 91 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 91 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 92 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 93 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 94 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 95 Set cell database control eQMI_PDS_READY_IND, // 96 Ready indication eQMI_PDS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePDS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePDS msgID ) { bool retVal = false; if ( (msgID > eQMI_PDS_ENUM_BEGIN && msgID <= eQMI_PDS_EVENT_IND) || (msgID >= eQMI_PDS_GET_STATE && msgID <= eQMI_PDS_FORCE_RECEIVER_OFF) || (msgID >= eQMI_PDS_GET_METHODS && msgID <= eQMI_PDS_SET_NAV_CFG) || (msgID >= eQMI_PDS_SET_WLAN_BLANK && msgID < eQMI_PDS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAUTH Enumeration // QMI Authentication Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAUTH { eQMI_AUTH_ENUM_BEGIN = -1, eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND, // 38 AKA algorithm result indication eQMI_AUTH_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAUTH validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAUTH msgID ) { bool retVal = false; if (msgID >= eQMI_AUTH_START_EAP && msgID < eQMI_AUTH_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageAT Enumeration // QMI AT Command Processor Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageAT { eQMI_AT_ENUM_BEGIN = -1, eQMI_AT_RESET, // 00 Reset AT service state variables eQMI_AT_REG_COMMANDS = 32, // 32 Register AT commands to be forwarded eQMI_AT_COMMAND_IND, // 33 AT command indication eQMI_AT_SEND_RESPONSE, // 34 Send the response to an AT command eQMI_AT_ABORT_IND, // 35 AT command abort indication eQMI_AT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageAT msgID ) { bool retVal = false; if ( (msgID == eQMI_AT_RESET) || (msgID >= eQMI_AT_REG_COMMANDS && msgID < eQMI_AT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageVoice Enumeration // QMI Voice Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageVoice { eQMI_VOICE_ENUM_BEGIN = -1, eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls eQMI_VOICE_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageVoice validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageVoice msgID ) { bool retVal = false; if ( (msgID == eQMI_VOICE_INDICATION_REG) || (msgID >= eQMI_VOICE_CALL_ORIGINATE && msgID <= eQMI_VOICE_CALL_ANSWER) || (msgID >= eQMI_VOICE_GET_CALL_INFO && msgID <= eQMI_VOICE_GET_ALL_STATUS) || (msgID >= eQMI_VOICE_MANAGE_CALLS && msgID < eQMI_VOICE_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageUIM Enumeration // QMI UIM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageUIM { eQMI_UIM_ENUM_BEGIN = -1, eQMI_UIM_RESET, // 00 Reset eQMI_UIM_READ_TRANSPARENT = 32, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR eQMI_UIM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageUIM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageUIM msgID ) { bool retVal = false; if ( (msgID == eQMI_UIM_RESET) || (msgID >= eQMI_UIM_READ_TRANSPARENT && msgID < eQMI_UIM_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessagePBM Enumeration // QMI PBM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePBM { eQMI_PBM_ENUM_BEGIN = -1, eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessagePBM validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessagePBM msgID ) { bool retVal = false; if (msgID >= eQMI_PBM_INDICATION_REG && msgID < eQMI_PBM_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageLOC Enumeration // QMI LOC Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageLOC { eQMI_LOC_ENUM_BEGIN = -1, eQMI_LOC_CLIENT_REVISION = 32, // 32 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 33 Register for events/indications eQMI_LOC_START, // 34 Start GPS session eQMI_LOC_STOP, // 35 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 36 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 37 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 38 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 39 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 40 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 41 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 42 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 43 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 44 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 45 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 46 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 47 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 48 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 49 Server connection req indication eQMI_LOC_GET_REV_REQ, // 50 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 50 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 51 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 51 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 52 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 52 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 53 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 53 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 54 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 54 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 55 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 55 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 56 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 56 Inject UTC time indication eQMI_LOC_INJECT_POS, // 57 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 57 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 58 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 58 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 59 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 59 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 60 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 60 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 61 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 61 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 62 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 62 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 63 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 63 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 64 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 64 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 65 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 65 Get low power mode config indication eQMI_LOC_SET_SERVER, // 66 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 66 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 67 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 67 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 68 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 68 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 69 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 69 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 70 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 70 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 71 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 71 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 72 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 72 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 73 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 73 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 74 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 74 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 75 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 75 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 76 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 76 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 77 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 77 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 78 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 78 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 79 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 79 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 80 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 80 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 81 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 81 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 82 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 82 Get external power config indication eQMI_LOC_INFORM_CONN, // 83 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 83 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 84 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 84 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 85 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 85 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 86 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 86 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 87 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 87 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 88 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 88 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 89 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 89 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 90 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 90 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 91 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 91 Get sensor performance control ind eQMI_LOC_INJ_SUPL_CERT, // 92 Inject SUPL certificate eQMI_LOC_INJ_SUPL_CERT_IND = 92, // 92 Inject SUPL certificate indication eQMI_LOC_DEL_SUPL_CERT, // 93 Delete SUPL certificate eQMI_LOC_DEL_SUPL_CERT_IND = 93, // 93 Delete SUPL certificate indication eQMI_LOC_SET_ENGINE_CFG, // 94 Set position engine config eQMI_LOC_SET_ENGINE_CFG_IND = 94,// 94 Set position engine config ind eQMI_LOC_GET_ENGINE_CFG, // 95 Get position engine config eQMI_LOC_GET_ENGINE_CFG_IND = 95,// 95 Get position engine config ind eQMI_LOC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageLOC validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageLOC msgID ) { bool retVal = false; if (msgID >= eQMI_LOC_CLIENT_REVISION && msgID < eQMI_LOC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageSAR Enumeration // QMI SAR Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageSAR { eQMI_SAR_ENUM_BEGIN = -1, eQMI_SAR_SET_RF_SAR_STATE = 1, // 01 Set the RF SAR state eQMI_SAR_GET_RF_SAR_STATE, // 02 Get the RF SAR state eQMI_SAR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageSAR validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageSAR msgID ) { bool retVal = false; if (msgID >= eQMI_SAR_SET_RF_SAR_STATE && msgID < eQMI_SAR_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMTFS Enumeration // QMI Remote Filesystem Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMTFS { eQMI_RMTFS_ENUM_BEGIN = -1, eQMI_RMTFS_OPEN = 1, // 01 Request an open eQMI_RMTFS_CLOSE, // 02 Request a close eQMI_RMTFS_IO_VECTOR, // 03 Request an I/O vector operation eQMI_RMTFS_ALLOC_BUFFER, // 04 Allocate a buffer eQMI_RMTFS_GET_DEV_ERROR, // 05 Return device error for last request eQMI_RMTFS_FORCE_SYNC_IND, // 06 Force sync indication eQMI_RMTFS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMTFS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMTFS msgID ) { bool retVal = false; if (msgID >= eQMI_RMTFS_OPEN && msgID < eQMI_RMTFS_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageCAT Enumeration // QMI CAT Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageCAT { eQMI_CAT_ENUM_BEGIN = -1, eQMI_CAT_RESET, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageCAT validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageCAT msgID ) { bool retVal = false; if ( (msgID > eQMI_CAT_ENUM_BEGIN && msgID <= eQMI_CAT_EVENT_IND) || (msgID >= eQMI_CAT_GET_STATE && msgID < eQMI_CAT_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageRMS Enumeration // QMI RMS Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageRMS { eQMI_RMS_ENUM_BEGIN = -1, eQMI_RMS_RESET, // 00 Reset RMS service state variables eQMI_RMS_GET_SMS_WAKE = 32, // 32 Get SMS wake settings eQMI_RMS_SET_SMS_WAKE, // 33 Set SMS wake settings eQMI_RMS_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageRMS validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageRMS msgID ) { bool retVal = false; if ( (msgID == eQMI_RMS_RESET) || (msgID >= eQMI_RMS_GET_SMS_WAKE && msgID < eQMI_RMS_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIMessageOMA Enumeration // QMI OMA-DM Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessageOMA { eQMI_OMA_ENUM_BEGIN = -1, eQMI_OMA_RESET, // 00 Reset OMA service state variables eQMI_OMA_SET_EVENT, // 01 Set OMA report conditions eQMI_OMA_EVENT_IND = 1, // 01 OMA report indication eQMI_OMA_START_SESSION = 32, // 32 Start client inititated session eQMI_OMA_CANCEL_SESSION, // 33 Cancel session eQMI_OMA_GET_SESSION_INFO, // 34 Get session information eQMI_OMA_SEND_SELECTION, // 35 Send selection for net inititated msg eQMI_OMA_GET_FEATURES, // 36 Get feature settings eQMI_OMA_SET_FEATURES, // 37 Set feature settings eQMI_OMA_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIMessageOMA validity check PARAMETERS: msgID [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIMessageOMA msgID ) { bool retVal = false; if ( (msgID > eQMI_OMA_ENUM_BEGIN && msgID <= eQMI_OMA_EVENT_IND) || (msgID >= eQMI_OMA_START_SESSION && msgID < eQMI_OMA_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIResultCode Enumeration // QMI Result Code Enumeration /*=========================================================================*/ enum eQMIResultCode { eQMI_RC_ENUM_BEGIN = -1, eQMI_RC_SUCCESS, // 00 Success eQMI_RC_ERROR, // 01 Error eQMI_RC_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIResultCode validity check PARAMETERS: rc [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIResultCode rc ) { bool retVal = false; if (rc > eQMI_RC_ENUM_BEGIN && rc < eQMI_RC_ENUM_END) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMIErrorCode Enumeration // QMI Error Code Enumeration /*=========================================================================*/ enum eQMIErrorCode { eQMI_ERR_ENUM_BEGIN = -1, eQMI_ERR_NONE, // 00 eQMI_ERR_MALFORMED_MSG, // 01 eQMI_ERR_NO_MEMORY, // 02 eQMI_ERR_INTERNAL, // 03 eQMI_ERR_ABORTED, // 04 eQMI_ERR_CLIENT_IDS_EXHAUSTED, // 05 eQMI_ERR_UNABORTABLE_TRANSACTION, // 06 eQMI_ERR_INVALID_CLIENT_ID, // 07 eQMI_ERR_NO_THRESHOLDS, // 08 eQMI_ERR_INVALID_HANDLE, // 09 eQMI_ERR_INVALID_PROFILE, // 10 eQMI_ERR_INVALID_PIN_ID, // 11 eQMI_ERR_INCORRECT_PIN, // 12 eQMI_ERR_NO_NETWORK_FOUND, // 13 eQMI_ERR_CALL_FAILED, // 14 eQMI_ERR_OUT_OF_CALL, // 15 eQMI_ERR_NOT_PROVISIONED, // 16 eQMI_ERR_MISSING_ARG, // 17 eQMI_ERR_18, // 18 eQMI_ERR_ARG_TOO_LONG, // 19 eQMI_ERR_20, // 20 eQMI_ERR_21, // 21 eQMI_ERR_INVALID_TX_ID, // 22 eQMI_ERR_DEVICE_IN_USE, // 23 eQMI_ERR_OP_NETWORK_UNSUPPORTED, // 24 eQMI_ERR_OP_DEVICE_UNSUPPORTED, // 25 eQMI_ERR_NO_EFFECT, // 26 eQMI_ERR_NO_FREE_PROFILE, // 27 eQMI_ERR_INVALID_PDP_TYPE, // 28 eQMI_ERR_INVALID_TECH_PREF, // 29 eQMI_ERR_INVALID_PROFILE_TYPE, // 30 eQMI_ERR_INVALID_SERVICE_TYPE, // 31 eQMI_ERR_INVALID_REGISTER_ACTION, // 32 eQMI_ERR_INVALID_PS_ATTACH_ACTION, // 33 eQMI_ERR_AUTHENTICATION_FAILED, // 34 eQMI_ERR_PIN_BLOCKED, // 35 eQMI_ERR_PIN_ALWAYS_BLOCKED, // 36 eQMI_ERR_UIM_UNINITIALIZED, // 37 eQMI_ERR_MAX_QOS_REQUESTS_IN_USE, // 38 eQMI_ERR_INCORRECT_FLOW_FILTER, // 39 eQMI_ERR_NETWORK_QOS_UNAWARE, // 40 eQMI_ERR_INVALID_QOS_ID, // 41 eQMI_ERR_REQUESTED_NUM_UNSUPPORTED, // 42 eQMI_ERR_INTERFACE_NOT_FOUND, // 43 eQMI_ERR_FLOW_SUSPENDED, // 44 eQMI_ERR_INVALID_DATA_FORMAT, // 45 eQMI_ERR_GENERAL, // 46 eQMI_ERR_UNKNOWN, // 47 eQMI_ERR_INVALID_ARG, // 48 eQMI_ERR_INVALID_INDEX, // 49 eQMI_ERR_NO_ENTRY, // 50 eQMI_ERR_DEVICE_STORAGE_FULL, // 51 eQMI_ERR_DEVICE_NOT_READY, // 52 eQMI_ERR_NETWORK_NOT_READY, // 53 eQMI_ERR_WMS_CAUSE_CODE, // 54 eQMI_ERR_WMS_MESSAGE_NOT_SENT, // 55 eQMI_ERR_WMS_MESSAGE_DELIVERY_FAILURE, // 56 eQMI_ERR_WMS_INVALID_MESSAGE_ID, // 57 eQMI_ERR_WMS_ENCODING, // 58 eQMI_ERR_AUTHENTICATION_LOCK, // 59 eQMI_ERR_INVALID_TRANSITION, // 60 eQMI_ERR_61, // 61 eQMI_ERR_62, // 62 eQMI_ERR_63, // 63 eQMI_ERR_64, // 64 eQMI_ERR_SESSION_INACTIVE, // 65 eQMI_ERR_SESSION_INVALID, // 66 eQMI_ERR_SESSION_OWNERSHIP, // 67 eQMI_ERR_INSUFFICIENT_RESOURCES, // 68 eQMI_ERR_DISABLED, // 69 eQMI_ERR_INVALID_OPERATION, // 70 eQMI_ERR_INVALID_QMI_CMD, // 71 eQMI_ERR_WMS_TPDU_TYPE, // 72 eQMI_ERR_WMS_SMSC_ADDR, // 73 eQMI_ERR_INFO_UNAVAILABLE, // 74 eQMI_ERR_SEGMENT_TOO_LONG, // 75 eQMI_ERR_SEGMENT_ORDER, // 76 eQMI_ERR_BUNDLING_NOT_SUPPORTED, // 77 eQMI_ERR_78, // 78 eQMI_ERR_POLICY_MISMATCH, // 79 eQMI_ERR_SIM_FILE_NOT_FOUND, // 80 eQMI_ERR_EXTENDED_EXTERNAL, // 81 eQMI_ERR_ACCESS_DENIED, // 82 eQMI_ERR_HARDWARE_RESTRICTED, // 83 eQMI_ERR_ACK_NOT_SENT, // 84 eQMI_ERR_INCOMPATIBLE_STATE = 90, // 90 eQMI_ERR_FDN_RESTRICT, // 91 eQMI_ERR_SUPS_FAILURE_CAUSE, // 92 eQMI_ERR_NO_RADIO, // 93 eQMI_ERR_NOT_SUPPORTED, // 94 eQMI_ERR_CARD_CALL_CONTROL_FAILED = 96, // 96 eQMI_ERR_NETWORK_ABORTED, // 97 eQMI_ERR_CAT_EVT_REG_FAILED, // 61441 eQMI_ERR_CAT_INVALID_TR, // 61442 eQMI_ERR_CAT_INVALID_ENV_CMD, // 61443 eQMI_ERR_CAT_ENV_CMD_BUSY, // 61444 eQMI_ERR_CAT_ENV_CMD_FAIL, // 61445 eQMI_ERR_ENUM_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMIErrorCode validity check PARAMETERS: ec [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMIErrorCode ec ) { bool retVal = false; if ( (ec > eQMI_ERR_ENUM_BEGIN && ec <= eQMI_ERR_ACK_NOT_SENT) || (ec >= eQMI_ERR_INCOMPATIBLE_STATE && ec <= eQMI_ERR_NOT_SUPPORTED) || (ec == eQMI_ERR_CARD_CALL_CONTROL_FAILED) || (ec == eQMI_ERR_NETWORK_ABORTED) || (ec >= eQMI_ERR_CAT_EVT_REG_FAILED && ec < eQMI_ERR_ENUM_END) ) { retVal = true; } return retVal; }; /*=========================================================================*/ // eQMICallEndReason Enumeration // QMI Call End Reason Enumeration /*=========================================================================*/ enum eQMICallEndReason { eQMI_CALL_END_REASON_BEGIN = -1, // General eQMI_CALL_END_REASON_UNSPECIFIED = 1, // 1 eQMI_CALL_END_REASON_CLIENT_END, // 2 eQMI_CALL_END_REASON_NO_SRV, // 3 eQMI_CALL_END_REASON_FADE, // 4 eQMI_CALL_END_REASON_REL_NORMAL, // 5 eQMI_CALL_END_REASON_ACC_IN_PROG, // 6 eQMI_CALL_END_REASON_ACC_FAIL, // 7 eQMI_CALL_END_REASON_REDIR_OR_HANDOFF, // 8 eQMI_CALL_END_REASON_CLOSE_IN_PROGRESS, // 9 eQMI_CALL_END_REASON_AUTH_FAILED, // 10 eQMI_CALL_END_REASON_INTERNAL, // 11 // CDMA eQMI_CALL_END_REASON_CDMA_LOCK = 500, // 500 eQMI_CALL_END_REASON_INTERCEPT, // 501 eQMI_CALL_END_REASON_REORDER, // 502 eQMI_CALL_END_REASON_REL_SO_REJ, // 503 eQMI_CALL_END_REASON_INCOM_CALL, // 504 eQMI_CALL_END_REASON_ALERT_STOP, // 505 eQMI_CALL_END_REASON_ACTIVATION, // 506 eQMI_CALL_END_REASON_MAX_ACCESS_PROBE, // 507 eQMI_CALL_END_REASON_CCS_NOT_SUPPORTED_BY_BS, // 508 eQMI_CALL_END_REASON_NO_RESPONSE_FROM_BS, // 509 eQMI_CALL_END_REASON_REJECTED_BY_BS, // 510 eQMI_CALL_END_REASON_INCOMPATIBLE, // 511 eQMI_CALL_END_REASON_ALREADY_IN_TC, // 512 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_GPS, // 513 eQMI_CALL_END_REASON_USER_CALL_ORIG_DURING_SMS, // 514 eQMI_CALL_END_REASON_NO_CDMA_SRV, // 515 // GSM/WCDMA eQMI_CALL_END_REASON_CONF_FAILED = 1000, // 1000 eQMI_CALL_END_REASON_INCOM_REJ, // 1001 eQMI_CALL_END_REASON_NO_GW_SRV, // 1002 eQMI_CALL_END_REASON_NETWORK_END, // 1003 eQMI_CALL_END_REASON_LLC_SNDCP_FAILURE, // 1004 eQMI_CALL_END_REASON_INSUFFICIENT_RESOURCES, // 1005 eQMI_CALL_END_REASON_OPTION_TEMP_OOO, // 1006 eQMI_CALL_END_REASON_NSAPI_ALREADY_USED, // 1007 eQMI_CALL_END_REASON_REGULAR_DEACTIVATION, // 1008 eQMI_CALL_END_REASON_NETWORK_FAILURE, // 1009 eQMI_CALL_END_REASON_UMTS_REATTACH_REQ, // 1010 eQMI_CALL_END_REASON_UMTS_PROTOCOL_ERROR, // 1011 eQMI_CALL_END_REASON_OPERATOR_BARRING, // 1012 eQMI_CALL_END_REASON_UNKNOWN_APN, // 1013 eQMI_CALL_END_REASON_UNKNOWN_PDP, // 1014 eQMI_CALL_END_REASON_GGSN_REJECT, // 1015 eQMI_CALL_END_REASON_ACTIVATION_REJECT, // 1016 eQMI_CALL_END_REASON_OPTION_NOT_SUPPORTED, // 1017 eQMI_CALL_END_REASON_OPTION_UNSUBSCRIBED, // 1018 eQMI_CALL_END_REASON_QOS_NOT_ACCEPTED, // 1019 eQMI_CALL_END_REASON_TFT_SEMANTIC_ERROR, // 1020 eQMI_CALL_END_REASON_TFT_SYNTAX_ERROR, // 1021 eQMI_CALL_END_REASON_UNKNOWN_PDP_CONTEXT, // 1022 eQMI_CALL_END_REASON_FILTER_SEMANTIC_ERROR, // 1023 eQMI_CALL_END_REASON_FILTER_SYNTAX_ERROR, // 1024 eQMI_CALL_END_REASON_PDP_WITHOUT_ACTIVE_TFT, // 1025 eQMI_CALL_END_REASON_INVALID_TRANSACTION_ID, // 1026 eQMI_CALL_END_REASON_MESSAGE_SEMANTIC_ERROR, // 1027 eQMI_CALL_END_REASON_INVALID_MANDATORY_INFO, // 1028 eQMI_CALL_END_REASON_TYPE_UNSUPPORTED, // 1029 eQMI_CALL_END_REASON_MSG_TYPE_WRONG_FOR_STATE, // 1030 eQMI_CALL_END_REASON_UNKNOWN_INFO_ELEMENT, // 1031 eQMI_CALL_END_REASON_CONDITIONAL_IE_ERROR, // 1032 eQMI_CALL_END_REASON_MSG_WRONG_FOR_PROTOCOL, // 1033 eQMI_CALL_END_REASON_APN_TYPE_CONFLICT, // 1034 eQMI_CALL_END_REASON_NO_GPRS_CONTEXT, // 1035 eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED, // 1036 // CDMA 1xEV-DO (HDR) eQMI_CALL_END_REASON_CD_GEN_OR_BUSY = 1500, // 1500 eQMI_CALL_END_REASON_CD_BILL_OR_AUTH, // 1501 eQMI_CALL_END_REASON_CHG_HDR, // 1502 eQMI_CALL_END_REASON_EXIT_HDR, // 1503 eQMI_CALL_END_REASON_HDR_NO_SESSION , // 1504 eQMI_CALL_END_REASON_HDR_ORIG_DURING_GPS_FIX, // 1505 eQMI_CALL_END_REASON_HDR_CS_TIMEOUT , // 1506 eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM, // 1507 eQMI_CALL_END_REASON_END }; /*=========================================================================== METHOD: IsValid (Inline Method) DESCRIPTION: eQMICallEndReason validity check PARAMETERS: err [ I ] - Enum value being verified RETURN VALUE: bool ===========================================================================*/ inline bool IsValid( eQMICallEndReason err ) { if ( (err >= eQMI_CALL_END_REASON_UNSPECIFIED) && (err <= eQMI_CALL_END_REASON_INTERNAL) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CDMA_LOCK) && (err <= eQMI_CALL_END_REASON_NO_CDMA_SRV) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CONF_FAILED) && (err <= eQMI_CALL_END_REASON_FEATURE_NOT_SUPPORTED) ) { return true; } if ( (err >= eQMI_CALL_END_REASON_CD_GEN_OR_BUSY) && (err <= eQMI_CALL_END_REASON_HDR_RELEASED_BY_CM) ) { return true; } return false; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/QMIProtocolServer.cpp000077500000000000000000000270511455567757300252370ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.cpp DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "QMIProtocolServer.h" #include "QMIBuffers.h" #include "Comm.h" #include "Socket.h" /*=========================================================================*/ // cQMIProtocolServer Methods /*=========================================================================*/ /*=========================================================================== METHOD: cQMIProtocolServer (Public Method) DESCRIPTION: Constructor PARAMETERS: serviceType [ I ] - QMI service type requested bufferSzRx [ I ] - Size of data buffer for incoming data logSz [ I ] - Size of log (number of buffers) SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ) : cProtocolServer( MapQMIServiceToProtocol( serviceType, false ), MapQMIServiceToProtocol( serviceType, true ), bufferSzRx, logSz ), mLastTID( (WORD)INVALID_QMI_TRANSACTION_ID ), mService( serviceType ) { // Nothing to do } /*=========================================================================== METHOD: ~cQMIProtocolServer (Public Method) DESCRIPTION: Destructor SEQUENCING: None (constructs sequencing objects) RETURN VALUE: None ===========================================================================*/ cQMIProtocolServer::~cQMIProtocolServer() { // Nothing to do } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the configured QMI service using the given QMI control file PARAMETERS: pControlFile [ I ] - QMI control file SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::Connect( LPCSTR pControlFile ) { // Assume failure bool bRC = false; if (IsValid( mService ) == false || mService == eQMI_SVC_CONTROL) { return bRC; } std::string name = pControlFile; if (name.find( "qcqmi" ) != std::string::npos) { mpConnection = new cComm(); mConnectionType = eConnectionType_RmNet; } else { // SMD if (name.find( "QMUXD:" ) == 0) { // Remove qualifier name = name.substr( 6 ); } mpConnection = new cSocket(); mConnectionType = eConnectionType_SMD; } // Pass service file to base class for actual connection bRC = cProtocolServer::Connect( name.c_str() ); if (bRC == false) { TRACE( "QMI connect %d failed\n", mService ); } return bRC; } /*=========================================================================== METHOD: ValidateRequest (Internal Method) DESCRIPTION: Validate a request that is about to be scheduled SEQUENCING: This method is sequenced according to the command event, i.e. any other thread that needs to send a command to the protocol server thread will block until this method completes RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::ValidateRequest( const sProtocolRequest & req ) { if (cProtocolServer::ValidateRequest( req ) == false) { return false; } sQMIServiceBuffer qmiReq( req.GetSharedBuffer() ); return qmiReq.IsValid(); } /*=========================================================================== METHOD: InitializeComm (Internal Method) DESCRIPTION: Perform protocol specific communications port initialization SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::InitializeComm() { bool bResult = false; if (mpConnection == 0) { return bResult; } if (mConnectionType == eConnectionType_RmNet) { // Setup the QMI Service type int result = mpConnection->SendCtl( QMI_GET_SERVICE_FILE_IOCTL, (void*)(unsigned long)mService ); bResult = (result == 0); } else if (mConnectionType == eConnectionType_SMD) { // Setup the QMI Service type int result = mpConnection->SendCtl( eQMUXD_MSG_ALLOC_QMI_CLIENT_ID, (void*)&mService ); bResult = (result == 0); } return bResult; } /*=========================================================================== METHOD: CleanupComm (Internal Method) DESCRIPTION: Perform protocol specific communications port cleanup SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::CleanupComm() { bool bResult = true; if (mpConnection != 0 && mConnectionType == eConnectionType_SMD) { // Delete the QMI client // NOTE: This is generally unnecessary, when you close the channel // it is deleted int result = mpConnection->SendCtl( eQMUXD_MSG_RELEASE_QMI_CLIENT_ID, 0 ); bResult = (result == 0); } // Nothing to actually do here return true; } /*=========================================================================== METHOD: DecodeRxData (Internal Method) DESCRIPTION: Decode incoming data into QMI indications/responses PARAMETERS: bytesReceived [ I ] - Number of bytes to decoded rspIdx [ O ] - Log index of last valid response (not used) bAbortTx [ O ] - Response aborts current transmission? (not used) SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool - Was a response received? ===========================================================================*/ bool cQMIProtocolServer::DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ) { // Assume failure bool bRC = false; rspIdx = INVALID_LOG_INDEX; bAbortTx = false; // Something to decode from? if (bytesReceived == 0) { return bRC; } // Set protocol type (we have to be dealing with a valid QMI service) eProtocolType pt = MapQMIServiceToProtocol( mService, false ); if (pt == ePROTOCOL_ENUM_BEGIN) { return bRC; } sSharedBuffer * pTmp = 0; pTmp = new sSharedBuffer( mpRxBuffer, bytesReceived, pt ); if (pTmp != 0) { sQMIServiceBuffer tmpBuf( pTmp ); if (tmpBuf.IsValid() == true) { rspIdx = mLog.AddBuffer( tmpBuf ); if (IsResponse( tmpBuf ) == true) { bRC = true; } else { rspIdx = INVALID_LOG_INDEX; } } } return bRC; } /*=========================================================================== METHOD: EncodeTxData (Internal Method) DESCRIPTION: Encode data for transmission PARAMETERS: pBuffer [ I ] - Data to be encoded bEncoded [ O ] - Do we even encode data? SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: sSharedBuffer * - Encoded data (0 upon error when encoding is indicated) ===========================================================================*/ sSharedBuffer * cQMIProtocolServer::EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ) { WORD tid = ++mLastTID; if (tid == (WORD)INVALID_QMI_TRANSACTION_ID) { tid++; } sQMIServiceBuffer tmpBuf( pBuffer ); tmpBuf.SetTransactionID( tid ); // No actual encoding required as we alter the original request bEncoded = false; return 0; }; /*=========================================================================== METHOD: IsResponse (Internal Method) DESCRIPTION: Is the passed in data a response to the current request? PARAMETERS: rsp [ I ] - Candidate response SEQUENCING: None (must be called from protocol server thread) RETURN VALUE: bool ===========================================================================*/ bool cQMIProtocolServer::IsResponse( const sProtocolBuffer & rsp ) { // Assume not bool bRC = false; if ( (mpActiveRequest == 0) || (mpActiveRequest->mRequest.IsValid() == false) || (mpActiveRequest->mbWaitingForResponse == false) || (rsp.IsValid() == false) ) { return bRC; } sQMIServiceBuffer qmiReq( mpActiveRequest->mRequest.GetSharedBuffer() ); sQMIServiceBuffer qmiRsp( rsp.GetSharedBuffer() ); if (qmiReq.IsValid() == false || qmiRsp.IsValid() == false) { return bRC; } if (qmiRsp.IsResponse() == false) { return bRC; } WORD reqID = qmiReq.GetTransactionID(); WORD rspID = qmiRsp.GetTransactionID(); if ( (reqID == (WORD)INVALID_QMI_TRANSACTION_ID) || (rspID == (WORD)INVALID_QMI_TRANSACTION_ID) || (reqID != rspID) ) { return bRC; } // Sadly there are documentated cases of firmware returning responses // with a matching transaction ID but a mismatching message ID. There // is no reason for this to be considered valid behavior as of yet ULONG reqMsgID = qmiReq.GetMessageID(); ULONG rspMsgID = qmiRsp.GetMessageID(); if (reqMsgID != rspMsgID) { return bRC; } bRC = true; return bRC; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/QMIProtocolServer.h000077500000000000000000000105201455567757300246750ustar00rootroot00000000000000/*=========================================================================== FILE: QMIProtocolServer.h DESCRIPTION: QMI protocol server PUBLIC CLASSES AND METHODS: cQMIProtocolServer Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "ProtocolServer.h" #include "QMIEnum.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cQMIProtocolServer /*=========================================================================*/ class cQMIProtocolServer : public cProtocolServer { public: // Constructor cQMIProtocolServer( eQMIService serviceType, ULONG bufferSzRx, ULONG logSz ); // Destructor virtual ~cQMIProtocolServer(); // Connect to the given QMI service using the configured QMI // control file bool Connect( LPCSTR pControlFile ); // (Inline) Return the QMI service type eQMIService GetServiceType() { return mService; }; protected: // Validate a request that is about to be scheduled virtual bool ValidateRequest( const sProtocolRequest & req ); // Perform protocol specific communications port initialization virtual bool InitializeComm(); // Perform protocol specific communications port cleanup virtual bool CleanupComm(); // Decode incoming data into packets returning the last response virtual bool DecodeRxData( ULONG bytesReceived, ULONG & rspIdx, bool & bAbortTx ); // Encode data for transmission virtual sSharedBuffer * EncodeTxData( sSharedBuffer * pBuffer, bool & bEncoded ); // Is the passed in data a response to the current request? virtual bool IsResponse( const sProtocolBuffer & rsp ); // (Inline) Is the passed in data a response that aborts the // current request? virtual bool IsTxAbortResponse( const sProtocolBuffer & /* rsp */ ) { // QMI doesn't necessarily require this return false; }; /* Current transaction ID */ SHORT mLastTID; /* Type of QMI service we are serving */ eQMIService mService; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/SharedBuffer.cpp000077500000000000000000000242241455567757300242370ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.cpp DESCRIPTION: Shareable protocol structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "SharedBuffer.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Synchronization object struct sSharedBufferSync { public: // Constructor sSharedBufferSync() : mbInitialized( false ) { int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to init sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } mbInitialized = true; }; // Destructor ~sSharedBufferSync() { mbInitialized = false; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); } }; // Lock sync object void Lock() { if (mbInitialized == true) { int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to lock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // Unlock sync object void Unlock() { if (mbInitialized == true) { int nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SharedBuffer: Unable to unlock sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; protected: /* DIAG buffer critical section */ pthread_mutex_t mSyncSection; /* Has this object been initialized? */ bool mbInitialized; }; // Global (across all shared buffers) reference count guard sSharedBufferSync gRefCount; /*=========================================================================*/ // sSharedBuffer Methods /*=========================================================================*/ /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (copy passed in buffer) PARAMETERS: pDataToCopy [ I ] - The data buffer to copy (should be non-zero) dataLen [ I ] - The length of the above buffer (should be > 1) dataType [ I ] - Type of data (not used internal to class) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, data actually exists? if (pDataToCopy != 0) { // Yes, try to allocate memory mpData = new BYTE[dataLen]; if (mpData != 0) { // Now copy into our allocation memcpy( (PVOID)mpData, (LPCVOID)pDataToCopy, (SIZE_T)dataLen ); // Now set the size, we do this last so that our double // deletion logic is only applied if we had an allocation // in the first place mSize = dataLen; } } } } /*=========================================================================== METHOD: sSharedBuffer (Public Method) DESCRIPTION: Constructor (assume ownership of passed in buffer) PARAMETERS: dataLen [ I ] - The length of the above buffer (should be > 1) pDataToOwn [ I ] - The data buffer to assume ownership of (should be non-zero) dataType [ I ] - Type of data (not used internal to class) NOTE: The order is intentionally reversed from the previous constructor to avoid any cases of mistaken identity (copy versus assume ownership) RETURN VALUE: None ===========================================================================*/ sSharedBuffer::sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ) : mpData( 0 ), mSize( 0 ), mType( dataType ), mRefCount( 0 ) { // Data actually exists? if (pDataToOwn != 0) { // Yes, length not too small/not too big? if (IsValidSize( dataLen ) == true) { // Yes, assume ownership of the passed in buffer mpData = pDataToOwn; mSize = dataLen; } else { // This data buffer is not acceptable to us, but we have assumed // ownership of the memory which we will now free delete [] pDataToOwn; } } } /*=========================================================================== METHOD: ~sSharedBuffer (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ sSharedBuffer::~sSharedBuffer() { ASSERT( mRefCount == 0 ); // Buffer data to free? if (mpData != 0) { // Yes, zero first byte for caution and then delete it mpData[0] = 0; delete [] mpData; // Even more caution, zero out pointer mpData = 0; } else if (mSize != 0) { ASSERT( (PVOID)("Double deletion detected in ~sSharedBuffer") == 0 ); } } /*=========================================================================== METHOD: operator == (Public Method) DESCRIPTION: Equality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator == ( const sSharedBuffer & refBuf ) const { // Assume they are not equal bool bEq = false; // The buffers must be the same if (mpData == refBuf.mpData) { if (mSize == refBuf.mSize) { if (mRefCount == refBuf.mRefCount) { if (mType == refBuf.mType) { // The shared buffers are the same bEq = true; } } else { // Very odd - the buffers are the same, but not the ref count?!? ASSERT( 0 ); } } else { // Very odd - the buffers are the same, but not the size?!? ASSERT( 0 ); } } return bEq; } /*=========================================================================== METHOD: operator != (Public Method) DESCRIPTION: Inequality operator RETURN VALUE: bool ===========================================================================*/ bool sSharedBuffer::operator != ( const sSharedBuffer & refBuf ) const { if (*this == refBuf) { return false; } return true; } /*=========================================================================== METHOD: AddRef (Internal Method) DESCRIPTION: Increment reference count RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::AddRef() { gRefCount.Lock(); mRefCount++; gRefCount.Unlock(); } /*=========================================================================== METHOD: Release (Internal Method) DESCRIPTION: Release reference, delete if reference count zero RETURN VALUE: None ===========================================================================*/ void sSharedBuffer::Release() { gRefCount.Lock(); ASSERT( mRefCount != 0 ); // Decrement reference count if (mRefCount > 0) { mRefCount--; } // ... and delete if reference count now 0 if (mRefCount == 0) { delete this; } gRefCount.Unlock(); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/SharedBuffer.h000077500000000000000000000127671455567757300237150ustar00rootroot00000000000000/*=========================================================================== FILE: SharedBuffer.h DESCRIPTION: Shareable buffer structures and affliated methods PUBLIC CLASSES AND METHODS: sSharedBuffer Simple struct to represent a reference counted shareable (no copy) buffer, as the basis for all buffer related classes Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Forward Declarations //--------------------------------------------------------------------------- struct sProtocolBuffer; //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Maximum size of a shared buffer const ULONG MAX_SHARED_BUFFER_SIZE = 1024 * 16 + 256; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sSharedBuffer // // Simple struct to represent a reference counted shareable (no copy) // buffer, as the basis for all buffer related classes // // NOTE: Do *NOT* create instances of this structure on the stack, it // must be dynamically allocated in order to function correctly /*=========================================================================*/ struct sSharedBuffer { public: // Constructor (copy passed in buffer) sSharedBuffer( const BYTE * pDataToCopy, ULONG dataLen, ULONG dataType ); // Constructor (assume ownership of passed in buffer) sSharedBuffer( ULONG dataLen, PBYTE pDataToOwn, ULONG dataType ); // Destructor virtual ~sSharedBuffer(); // Equality operator bool operator == ( const sSharedBuffer & ) const; // Inequality operator bool operator != ( const sSharedBuffer & ) const; // (Inline) Get buffer const BYTE * GetBuffer() const { return mpData; }; // (Inline) Get buffer size ULONG GetSize() const { return mSize; }; // (Inline) Get buffer type ULONG GetType() const { return mType; }; // (Inline) Is this buffer valid? bool IsValid() const { return (mpData != 0 && IsValidSize( mSize )); }; // (Inline) Get reference count ULONG GetRefCount() const { return mRefCount; }; // (Static Inline) Is the passed in size within the allowable range // a shared buffer? static bool IsValidSize( ULONG sz ) { return (sz > 0 && sz <= MAX_SHARED_BUFFER_SIZE); }; protected: // Add reference void AddRef(); // Release reference, delete if reference count zero void Release(); /* Data */ PBYTE mpData; /* Size of data */ ULONG mSize; /* Type of data */ ULONG mType; /* Reference count */ ULONG mRefCount; private: // Leave copy constructor and assignment operator unimplemented // to prevent unintentional and unauthorized copying of the object // (which would lead to bad reference counting) sSharedBuffer( const sSharedBuffer & ); sSharedBuffer & operator = ( const sSharedBuffer & ); friend struct sProtocolBuffer; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/Socket.cpp000077500000000000000000000507401455567757300231310ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.cpp DESCRIPTION: Implementation of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "Socket.h" #include "ProtocolServer.h" #include #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Thread commands #define START_READ_CMD 0 #define STOP_READ_CMD 1 #define EXIT_CMD 2 // Size of the QMUXD command payload // GET_CLIENT_ID and RELEASE_CLIENT_ID must pass in a buffer of this size #define PAYLOAD_SIZE 664 /*=========================================================================*/ // struct sQMUXDHeader /*=========================================================================*/ #pragma pack( push, 1 ) struct sQMUXDHeader { /* Total size of header and following buffer */ int mTotalSize; /* QMUXD client ID */ int mQMUXDClientID; /* Message type */ eQMUXDMessageTypes mQMUXDMsgID; /* Duplicate of mQMUXDClientID */ int mQMUXDClientIDDuplicate; /* Transaction ID */ unsigned long mTxID; /* System error code */ int mSysErrCode; /* QMI error code (duplicate of TLV 0x02) */ int mQmiErrCode; /* SMD channel. 0 = SMD_DATA_5 */ int mQMUXDConectionType; /* QMI service ID */ int mQMUXServiceID; /* QMI client ID */ unsigned char mQMUXClientID; /* QMI flags */ unsigned char mRxFlags; /* In QMUXD this struct is not packed, so the compiler appends these two bytes */ unsigned short int mMissing2Bytes; }; #pragma pack( pop ) /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: RxSocketThread (Free Method) DESCRIPTION: Thread for simulating asynchronous reads to a socket PARAMETERS: pData [ I ] cSocket pointer RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * RxSocketThread( void * pData ) { cSocket * pSocket = (cSocket*)pData; if (pSocket == NULL || pSocket->IsValid() == false) { return 0; } fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pSocket->mCommandPipe[READING], &inputSet ); int largestFD = pSocket->mCommandPipe[READING]; int status = 0; while (true) { // No FD_COPY() available memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait until we recieve a command or data is available status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { TRACE( "error %d in select, errno %d\n", status, errno ); break; } if (FD_ISSET( pSocket->mCommandPipe[READING], &outputSet ) == true) { // Read command value from the pipe BYTE cmd; status = read( pSocket->mCommandPipe[READING], &cmd, 1 ); if (status != 1) { TRACE( "cmd error %d\n", status ); break; } if (cmd == START_READ_CMD) { FD_SET( pSocket->mSocket, &inputSet ); largestFD = std::max( pSocket->mSocket, pSocket->mCommandPipe[READING] ); } else if (cmd == STOP_READ_CMD) { FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; } else { // EXIT_CMD or anything else pSocket->mpRxCallback = 0; break; } } else if (FD_ISSET( pSocket->mSocket, &outputSet ) == true) { // Stop watching for read data FD_CLR( pSocket->mSocket, &inputSet ); largestFD = pSocket->mCommandPipe[READING]; // Perform a recv for the header sQMUXDHeader recvHdr; status = recv( pSocket->mSocket, &recvHdr, sizeof( recvHdr ), 0 ); if (status != sizeof( recvHdr )) { TRACE( "recv error, bad size %d\n", status ); break; } // Calculate and read the remaining data int remainder = recvHdr.mTotalSize - sizeof( recvHdr ); if (remainder > pSocket->mBuffSz) { TRACE( "read too large for buffer\n" ); break; } status = recv( pSocket->mSocket, pSocket->mpBuffer, remainder, 0 ); // Is this one of our IOCTLS or a standard message? if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_WRITE_QMI_SDU) { cIOCallback * pCallback = pSocket->mpRxCallback; pSocket->mpRxCallback = 0; if (pCallback == (cIOCallback *)1) { // We wanted to read, but not to be notified } else if (status >= 0) { pCallback->IOComplete( 0, status ); } else { pCallback->IOComplete( status, 0 ); } } else { pSocket->mpRxCallback = 0; // Notify SendCtl() that control message completed if (recvHdr.mQMUXDMsgID == eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { DWORD clientID; memcpy( &clientID, &pSocket->mpBuffer[0], 4 ); pSocket->mCtrlMsgComplete.Set( clientID ); } else { // Just set the event pSocket->mCtrlMsgComplete.Set( 0 ); } } } } return 0; }; /*=========================================================================*/ // cSocket Methods /*=========================================================================*/ /*=========================================================================== METHOD: cSocket (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cSocket::cSocket() : mSocket( INVALID_HANDLE_VALUE ), mbCancelWrite( false ), mpBuffer( 0 ), mBuffSz( 0 ), mRxThreadID( 0 ), mCtrlMsgComplete(), mQMUXDClientID( 0 ), mQMUXClientID( 0 ), mQMUXServiceID( 0 ), mChannelID( -1 ), mQMUXDTxID( 0 ) { mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: ~cSocket (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cSocket::~cSocket() { // Disconnect from current port Disconnect(); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } /*=========================================================================== METHOD: IsValid (Public Method) DESCRIPTION: Is this object valid? RETURN VALUE: Bool ===========================================================================*/ bool cSocket::IsValid() { // Nothing to do return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified port PARAMETERS: pChannel [ I ] - Channel number (IE: "0" = SMD_DATA_5 ) RETURN VALUE: bool ===========================================================================*/ bool cSocket::Connect( LPCSTR pChannel ) { if (IsValid() == false || pChannel == 0 || pChannel[0] == 0) { return false; } if (mSocket != INVALID_HANDLE_VALUE) { Disconnect(); } // Initialize command pipe for read thread int nRet = pipe( mCommandPipe ); if (nRet != 0) { TRACE( "cSocket:Connect() pipe creation failed %d\n", nRet ); return false; } // Start the read thread nRet = pthread_create( &mRxThreadID, 0, RxSocketThread, this ); if (nRet != 0) { TRACE( "cSocket::Connect() pthread_create = %d\n", nRet ); Disconnect(); return false; } // Create a socket mSocket = socket( AF_UNIX, SOCK_STREAM, 0 ); if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "unable to create socket %d\n", errno ); Disconnect(); return false; } struct sockaddr_un clientSockAddr; memset( &clientSockAddr, 0, sizeof( clientSockAddr ) ); clientSockAddr.sun_family = AF_UNIX; // Format the client path snprintf( &clientSockAddr.sun_path[0], sizeof( clientSockAddr.sun_path ), "/var/qmux_client_socket%7lu", (unsigned long)getpid() ); // Delete if it exists already unlink( clientSockAddr.sun_path ); // Bind to a client address nRet = bind( mSocket, (struct sockaddr *)&clientSockAddr, sizeof( sockaddr_un ) ); if (nRet == -1) { TRACE( "bad bind %d\n", errno ); Disconnect(); return false; } // Format the connection path struct sockaddr_un connectSockAddr; memset( &connectSockAddr, 0, sizeof( connectSockAddr ) ); connectSockAddr.sun_family = AF_UNIX; snprintf( &connectSockAddr.sun_path[0], sizeof( connectSockAddr.sun_path ), "/var/qmux_connect_socket" ); // Connect to server address nRet = connect( mSocket, (struct sockaddr *)&connectSockAddr, sizeof( sockaddr_un ) ); if (nRet < 0) { TRACE( "bad connect %d\n", errno ); Disconnect(); return false; } int clientID; nRet = recv( mSocket, &clientID, sizeof( clientID ), 0 ); if (nRet != sizeof( clientID )) { printf( "bad client ID %d\n", errno ); Disconnect(); return false; } // Save QMUXD Client ID mQMUXDClientID = clientID; // Save SMD channel mChannelID = strtol( pChannel, 0, 10 ); if (mChannelID == -1) { Disconnect(); return false; } // Success! return true; } /*=========================================================================== METHOD: SendCtl (Public Method) DESCRIPTION: Send a control message to the lower layer PARAMETERS: msgType [ I ] - eQMUXDMessageType pData [I/O] - input or output specific to ioctl request value RETURN VALUE: int - control message return value (0 for success) ===========================================================================*/ int cSocket::SendCtl( UINT msgType, void * pData ) { if (mSocket == INVALID_HANDLE_VALUE) { TRACE( "Invalid file handle\n" ); return -EBADFD; } BYTE msg[sizeof( sQMUXDHeader ) + PAYLOAD_SIZE]; memset( &msg[0], 0, sizeof( msg ) ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)&msg[0]; pHdr->mTotalSize = sizeof( msg ); pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = (eQMUXDMessageTypes)msgType; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; // The Payload BYTE * pPayload = &msg[sizeof( sQMUXDHeader )]; if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { memcpy( &mQMUXServiceID, pData, 4 ); memcpy( &pPayload[0], &mQMUXServiceID, 4 ); } else if (msgType == (int)eQMUXD_MSG_RELEASE_QMI_CLIENT_ID) { memcpy( &pPayload[0], &mQMUXServiceID, 4 ); memcpy( &pPayload[4], &mQMUXClientID, 4 ); } // Send the message int rc = send( mSocket, &msg[0], sizeof( msg ), 0 ); if (rc != sizeof( msg )) { TRACE( "bad write %d\n", rc ); return rc; } if (mpRxCallback == 0) { // No one is currently reading, need to trigger a read // so our data can be recieved RxData( &msg[0], sizeof( msg ), 0 ); } // Wait for the response (10s timeout) DWORD val; rc = mCtrlMsgComplete.Wait( 10000, val ); if (rc != 0) { TRACE( "bad SendCtl() wait %d\n", rc ); return rc; } if (msgType == (int)eQMUXD_MSG_ALLOC_QMI_CLIENT_ID) { // Grab the client ID mQMUXClientID = val; } return 0; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the current port RETURN VALUE: bool ===========================================================================*/ bool cSocket::Disconnect() { // Assume success bool bRC = true; if (mCommandPipe[WRITING] != INVALID_HANDLE_VALUE) { if (mRxThreadID != 0) { // Notify the thread to exit BYTE byte = EXIT_CMD; write( mCommandPipe[WRITING], &byte, 1 ); // And wait for it int nRC = pthread_join( mRxThreadID, 0 ); if (nRC != 0) { TRACE( "failed to join thread %d\n", nRC ); bRC = false; } mRxThreadID = 0; } close( mCommandPipe[WRITING] ); close( mCommandPipe[READING] ); mCommandPipe[READING] = INVALID_HANDLE_VALUE; mCommandPipe[WRITING] = INVALID_HANDLE_VALUE; } if (mSocket != INVALID_HANDLE_VALUE) { close( mSocket ); mSocket = INVALID_HANDLE_VALUE; } // Double check mpRxCallback = 0; mCtrlMsgComplete.Clear(); mQMUXDClientID = 0; mQMUXClientID = 0; mQMUXServiceID = 0; mQMUXDTxID = 0; return bRC; } /*=========================================================================== METHOD: CancelIO (Public Method) DESCRIPTION: Cancel any in-progress I/O PARAMETERS: RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelIO() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } bool bRxCancel = CancelRx(); bool bTxCancel = CancelTx(); return (bRxCancel && bTxCancel); } /*=========================================================================== METHOD: CancelRx (Public Method) DESCRIPTION: Cancel any in-progress receive operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelRx() { if (mSocket == INVALID_HANDLE_VALUE || mCommandPipe[WRITING] == INVALID_HANDLE_VALUE || mpRxCallback == 0 || mRxThreadID == 0) { TRACE( "cannot cancel, thread not active\n" ); mpRxCallback = 0; return false; } // Notify the thread to stop reading BYTE byte = STOP_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d canceling read\n", nRC ); return false; } // Remove the old callback mpRxCallback = 0; return true; } /*=========================================================================== METHOD: CancelTx (Public Method) DESCRIPTION: Cancel any in-progress transmit operation RETURN VALUE: bool ===========================================================================*/ bool cSocket::CancelTx() { if (mSocket == INVALID_HANDLE_VALUE) { return false; } mbCancelWrite = true; return true; } /*=========================================================================== METHOD: RxData (Public Method) DESCRIPTION: Receive data PARAMETERS: pBuf [ I ] - Buffer to contain received data bufSz [ I ] - Amount of data to be received pCallback [ I ] - Callback object to be exercised when the operation completes RETURN VALUE: bool ===========================================================================*/ bool cSocket::RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ) { if (IsValid() == false || mpRxCallback != 0) { return false; } if (pCallback == 0) { // Not interested in being notified, but we still need a value // for this so that only one outstanding I/O operation is active // at any given point in time mpRxCallback = (cIOCallback * )1; } else { mpRxCallback = pCallback; } mpBuffer = pBuf; mBuffSz = bufSz; // Notify the thread to start reading BYTE byte = START_READ_CMD; int nRC = write( mCommandPipe[WRITING], &byte, 1 ); if (nRC != 1) { TRACE( "error %d starting read\n", nRC ); return false; } return true; } /*=========================================================================== METHOD: TxData (Public Method) DESCRIPTION: Transmit data PARAMETERS: pBuf [ I ] - Data to be transmitted bufSz [ I ] - Amount of data to be transmitted RETURN VALUE: bool ===========================================================================*/ bool cSocket::TxData( const BYTE * pBuf, ULONG bufSz ) { if (IsValid() == false) { return false; } #ifdef DEBUG ULONGLONG nStart = GetTickCount(); #endif // Allow ourselves to be interupted mbCancelWrite = false; // Format the header int totalSz = sizeof( sQMUXDHeader ) + bufSz; BYTE * pMsg = new BYTE[totalSz]; if (pMsg == 0) { TRACE( "unable to allocate buffer\n" ); return false; } memset( pMsg, 0, totalSz ); // The important QMUXD header values sQMUXDHeader * pHdr = (sQMUXDHeader *)pMsg; pHdr->mTotalSize = totalSz; pHdr->mQMUXDClientID = mQMUXDClientID; pHdr->mQMUXDMsgID = eQMUXD_MSG_WRITE_QMI_SDU; pHdr->mQMUXDClientIDDuplicate = mQMUXDClientID; // mQMUXDTxID could go to INT_MAX, but rather than dealing with possible // overflow in qmuxd or one of the lower layers, we'll stop early mQMUXDTxID++; if (mQMUXDTxID > 100000) { mQMUXDTxID = 1; } pHdr->mTxID = ++mQMUXDTxID; pHdr->mQMUXServiceID = mQMUXServiceID; pHdr->mQMUXClientID = mQMUXClientID; // The data payload memcpy( &pMsg[sizeof( sQMUXDHeader )], pBuf, bufSz ); // Send the message int nRet = send( mSocket, pMsg, totalSz, 0 ); delete [] pMsg; if (nRet != totalSz) { TRACE( "cSocket::TxData() write returned %d instead of %d\n", nRet, totalSz ); return false; } #ifdef DEBUG TRACE( "Write of %d bytes took %llu miliseconds\n", totalSz, GetTickCount() - nStart ); #endif return true; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/Socket.h000077500000000000000000000116721455567757300225770ustar00rootroot00000000000000/*=========================================================================== FILE: Socket.h DESCRIPTION: Declaration of cSocket class PUBLIC CLASSES AND METHODS: cSocket This class wraps low level communication to qmuxd Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Event.h" #include "Connection.h" //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once /*=========================================================================*/ // Enum eQMUXDMessageTypes // Types to be passed into SendCtl() for cSocket /*=========================================================================*/ enum eQMUXDMessageTypes { eQMUXD_MSG_WRITE_QMI_SDU = 0, eQMUXD_MSG_ALLOC_QMI_CLIENT_ID = 1, eQMUXD_MSG_RELEASE_QMI_CLIENT_ID = 2, }; /*=========================================================================*/ // Class cSocket /*=========================================================================*/ class cSocket : public cConnection { public: // Constructor cSocket(); // Destructor ~cSocket(); // Is this object valid? bool IsValid(); // Connect to the specified channel bool Connect( LPCSTR pChannel ); // Run an IOCTL on the open file handle int SendCtl( UINT ioctlReq, void * pData ); // Disconnect from the current port bool Disconnect(); // Configure the port with the passed in parameters bool ConfigureSettings( termios * pSettings ); // Return the current port settings bool GetSettings( termios * pSettings ); // Cancel any in-progress I/O bool CancelIO(); // Cancel any in-progress receive operation bool CancelRx(); // Cancel any in-progress transmit operation bool CancelTx(); // Receive data bool RxData( BYTE * pBuf, ULONG bufSz, cIOCallback * pCallback ); // Transmit data bool TxData( const BYTE * pBuf, ULONG bufSz ); // (Inline) Return current channel ID int GetChannelID() const { return mChannelID; }; // Are we currently connected to a port? bool IsConnected() { return (mSocket != INVALID_HANDLE_VALUE); }; protected: /* Handle to socket */ int mSocket; // Cancel the write request? bool mbCancelWrite; /* Buffer */ BYTE * mpBuffer; /* Buffer size */ ULONG mBuffSz; /* Pipe for comunication with thread */ int mCommandPipe[2]; /* Thread ID of Rx Thread. */ pthread_t mRxThreadID; /* Control message completion event */ cEvent mCtrlMsgComplete; /* QMUXD client ID */ int mQMUXDClientID; /* QMUX client and service IDs */ int mQMUXClientID; int mQMUXServiceID; /* SMD Channel ID. 0 = SMD_DATA_5 */ int mChannelID; /* The SMD transaction ID */ int mQMUXDTxID; // Rx thread is allowed complete access friend void * RxSocketThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/StdAfx.h000077500000000000000000000141751455567757300225410ustar00rootroot00000000000000/*=========================================================================== FILE: StdAfx.h DESCRIPTION: Application Framework eXtenstions for Linux PUBLIC CLASSES AND FUNCTIONS: Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Includes //--------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //--------------------------------------------------------------------------- // Macro defination //--------------------------------------------------------------------------- #define ASSERT( x ) assert( x ) #ifdef DEBUG #ifdef ANDROID #include // TRACE macro #define TRACE( format, arg... ) \ if (true) \ { \ __android_log_print( ANDROID_LOG_INFO, \ "Gobi", "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ); \ } #else #define TRACE( format, arg... ) \ printf( "%s:%d: " format, \ __FILE__, \ __LINE__, \ ##arg ) #endif #else #define TRACE(...) #endif //--------------------------------------------------------------------------- // data type defination //--------------------------------------------------------------------------- #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef CONST #define CONST const #endif typedef void VOID; typedef unsigned long DWORD; typedef int BOOL; typedef unsigned char BYTE; typedef unsigned short WORD; typedef float FLOAT; typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef double DOUBLE; typedef int INT; typedef unsigned int UINT; typedef unsigned int * PUINT; typedef INT HANDLE; typedef HANDLE HMODULE; typedef char CHAR; typedef short SHORT; typedef long LONG; typedef unsigned long ULONG; typedef ULONG * PULONG; typedef ULONG * ULONG_PTR; typedef unsigned short USHORT; typedef USHORT * PUSHORT; typedef unsigned char UCHAR; typedef UCHAR * PUCHAR; typedef char * PSZ; typedef CONST CHAR * LPCSTR; typedef CHAR * LPSTR; typedef BYTE * PBYTE; typedef BOOL * PBOOL; typedef INT * PINT; typedef UINT * LPINT; typedef WORD * PWORD; typedef PWORD LPWORD; typedef LONG * LPLONG; typedef DWORD * PDWORD; typedef VOID * PVOID; typedef PVOID LPVOID; typedef const void * LPCVOID; typedef size_t SIZE_T; typedef double DATE; // Error code #define NO_ERROR 0L #define ERROR_SUCCESS 0L #define ERROR_NO_MORE_ITEMS 259L #define ERROR_CRC 23L #define ERROR_OUTOFMEMORY 14L #define ERROR_CAN_NOT_COMPLETE 1003L #define ERROR_REVISION_MISMATCH 1306L #define ERROR_BAD_ARGUMENTS 160L #define INVALID_SET_FILE_POINTER -1 #define VALID_HANDLE_VALUE 0 #define INVALID_HANDLE_VALUE -1 #define INVALID_FILE_SZ -1 #define ERROR_GEN_FAILURE 31L #define ERROR_FILE_NOT_FOUND 2L #define ERROR_NOT_ENOUGH_MEMORY 8L #define ERROR_INVALID_PARAMETER 87L #define ERROR_BAD_FORMAT 11L // Other Constant definitions #define MAX_PATH 512 #define INFINITE 0xffffffff // SIOCIWFIRSTPRIV = 0x8BE0 // Device I/O control code for setting QMI service #define QMI_GET_SERVICE_FILE_IOCTL 0x8BE0 + 1 // Device I/O control code for obtaining device VIDPID #define QMI_GET_VIDPID_IOCTL 0x8BE0 + 2 // Device I/O control code for obtaining device MEID #define QMI_GET_MEID_IOCTL 0x8BE0 + 3 // Define the directions for pipes #define READING 0 #define WRITING 1 libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Core/SyncQueue.h000077500000000000000000000301061455567757300232610ustar00rootroot00000000000000/*=========================================================================== FILE: SyncQueue.h DESCRIPTION: Declaration/Implementation of cSyncQueue class PUBLIC CLASSES AND METHODS: cSyncQueue Synchronized shareable (across multiple threads) queue of structures with event notifications Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "Event.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- /*=========================================================================*/ // Class cSyncQueue /*=========================================================================*/ template class cSyncQueue { public: // (Inline) Constructor cSyncQueue( ULONG maxElements, bool bSignalEvent = false ) : mSignature( (ULONG)eSYNC_QUEUE_SIG ), mSignalEvent(), mbSignalEvent( bSignalEvent ), mMaxElements( maxElements ), mTotalElements( 0 ) { // Create sync CS int nRet = pthread_mutex_init( &mSyncSection, NULL ); if (nRet != 0) { TRACE( "SyncQueue: Unable to init sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return; } }; // (Inline) Destructor ~cSyncQueue() { if (IsValid() == false) { ASSERT( (PVOID)"Double deletion detected in ~cSyncQueue" == 0 ); } else { EmptyQueue(); mSignature = 0; int nRet = pthread_mutex_destroy( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to destroy sync mutex." " Error %d: %s\n", nRet, strerror( nRet ) ); return; } } }; // (Inline) Add an element to the queue bool AddElement( const tElementType & elem ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { // Yes, drop oldest element mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Add an element to the queue returning the index of // the element bool AddElement( const tElementType & elem, ULONG & idx ) { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Are we out of space? if ((ULONG)mElementDeque.size() >= mMaxElements) { mElementDeque.pop_front(); } // Add new item to the queue mElementDeque.push_back( elem ); idx = mTotalElements++; // Set event? if (mbSignalEvent == true) { // Signal index of event nRet = mSignalEvent.Set( mTotalElements - 1 ); if (nRet != 0) { TRACE( "SyncQueue: Unable to signal. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } } // Success! bRC = true; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Return given element in the queue bool GetElement( ULONG idx, tElementType & elem ) const { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } // Is this a current element index? ULONG expiredIndices = mTotalElements - (ULONG)mElementDeque.size(); if (idx >= expiredIndices) { // Yes, grab it from the deque idx -= expiredIndices; if (idx < (ULONG)mElementDeque.size()) { elem = mElementDeque[idx]; bRC = true; } } nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } return bRC; }; // (Inline) Empty element queue bool EmptyQueue() { // Assume failure bool bRC = false; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return bRC; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } mElementDeque.clear(); mTotalElements = 0; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return false; } bRC = true; return bRC; }; // (Inline) Return the number of queued elements ULONG GetQueueCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = (ULONG)mElementDeque.size(); nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the total number of elements added to queue ULONG GetTotalCount() const { ULONG elems = 0; if (IsValid() == false) { ASSERT( (PVOID)"Bad cSyncQueue object detected" == 0 ); return elems; } int nRet = pthread_mutex_lock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to lock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } elems = mTotalElements; nRet = pthread_mutex_unlock( &mSyncSection ); if (nRet != 0) { TRACE( "SyncQueue: Unable to unlock sync mutex. Error %d: %s\n", nRet, strerror( nRet ) ); return 0; } return elems; }; // (Inline) Return the signal event cEvent & GetSignalEvent() const { return mSignalEvent; }; // (Inline) Is this sync queue valid? bool IsValid() const { return (mSignature == (ULONG)eSYNC_QUEUE_SIG); }; protected: // Object signature enum eClassConstants { eSYNC_QUEUE_SIG = 0x1799A2BC }; /* Object signature */ ULONG mSignature; /* Multithreaded mutex type */ mutable pthread_mutex_t mSyncSection; /* Signal event, set everytime an element is added (if configured) */ mutable cEvent mSignalEvent; /* Use above signal event? */ bool mbSignalEvent; /* Maximum number of elements to add to the deque */ ULONG mMaxElements; /* Total number of elements added to the deque */ ULONG mTotalElements; /* Element queue */ std::deque mElementDeque; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/000077500000000000000000000000001455567757300236765ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000Translation.cpp000077500000000000000000000071151455567757300300130ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLV DESCRIPTION: Return the starting location and size of TLV buffer. NOTE: does not include the TLV header PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer type [ I ] - Type ID pOutLen [ O ] - Length of the output buffer ppOut [ O ] - Pointer to output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ) { if (pIn == 0 || pOutLen == 0 || ppOut == 0) { return eGOBI_ERR_INVALID_ARG; } for (ULONG offset = 0; offset + sizeof( sQMIRawContentHeader ) <= inLen; offset += sizeof( sQMIRawContentHeader )) { sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pIn + offset); // Is it big enough to contain this TLV? if (offset + sizeof( sQMIRawContentHeader ) + pHeader->mLength > inLen) { return eGOBI_ERR_MALFORMED_RSP; } if (pHeader->mTypeID == typeID) { *pOutLen = pHeader->mLength; *ppOut = pIn + offset + sizeof( sQMIRawContentHeader ); return eGOBI_ERR_NONE; } offset += pHeader->mLength; } // TLV not found return eGOBI_ERR_INVALID_RSP; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000Translation.h000077500000000000000000000654731455567757300274730ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000Translation.h DESCRIPTION: QUALCOMM Tanslation for Gobi 3000 Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include #include #include "GobiConnectionMgmtAPIStructs.h" //--------------------------------------------------------------------------- // Prototypes //--------------------------------------------------------------------------- // Get a TLV ULONG GetTLV( ULONG inLen, const BYTE * pIn, BYTE typeID, ULONG * pOutLen, const BYTE ** ppOut ); // WDS ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ); ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ); ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ); ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ); ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ); ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ); ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ); ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ); ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ); ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ); ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ); ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ); ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ); ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ); ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ); ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ); ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ); ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ); ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ); ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ); ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ); ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ); ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ); ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ); // NAS ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ); ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ); ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ); ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ); ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ); ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ); ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ); ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ); ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ); ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ); ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ); ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ); ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ); ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ); ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ); ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ); ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ); ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ); // DMS ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ); ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ); ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ); ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ); ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ); ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ); ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ); ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ); ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ); ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ); ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ); ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ); ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ); ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ); ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ); // SMS ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ); ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ); ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ); ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ); ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ); ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ); ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ); ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ); ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ); ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ); ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ); ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ); ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ); // DMS UIM ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ); ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ); ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ); ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ); ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ); ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ); ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ); ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ); ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ); // PDS ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ); ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ); ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ); ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ); ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ); ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ); ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ); ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ); ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ); ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ); ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ); ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ); ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ); ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ); ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ); ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ); ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ); // CAT ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ); ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ); // RMS ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ); ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ); // OMADM ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ); ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ); ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ); ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ); ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ); ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ); ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ); // Voice ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationCAT.cpp000077500000000000000000000135341455567757300303450ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationCAT.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Card Application Toolkit Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackCATSendTerminalResponse DESCRIPTION: This function sends the terminal response to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer refID [ I ] - UIM reference ID (from CAT event) dataLen [ I ] - Terminal response data length pData [ I ] - Terminal response data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendTerminalResponse( ULONG * pOutLen, BYTE * pOut, ULONG refID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATSendTerminalResponseRequest_TerminalResponseType * pTLVx01; pTLVx01 = (sCATSendTerminalResponseRequest_TerminalResponseType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mReferenceID = refID; pTLVx01->mTerminalResponseLength = (UINT16)dataLen; offset += sizeof( sCATSendTerminalResponseRequest_TerminalResponseType ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackCATSendEnvelopeCommand DESCRIPTION: This function sends the envelope command to the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer cmdID [ I ] - Envelope command ID dataLen [ I ] - Envelope command data length pData [ I ] - Envelope command data RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackCATSendEnvelopeCommand( ULONG * pOutLen, BYTE * pOut, ULONG cmdID, ULONG dataLen, BYTE * pData ) { // Validate arguments if (pOut == 0 || dataLen == 0 || pData == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ) + (WORD)dataLen; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sCATEnvelopeCommandRequest_EnvelopeCommand * pTLVx01; pTLVx01 = (sCATEnvelopeCommandRequest_EnvelopeCommand*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mEnvelopeCommandType = (eQMICATEnvelopeCommandType)cmdID; pTLVx01->mEnvelopeLength = (UINT16)dataLen; offset += sizeof( sCATEnvelopeCommandRequest_EnvelopeCommand ); if (dataLen > 0) { memcpy( pOut + offset, pData, dataLen ); offset += dataLen; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationDMS.cpp000077500000000000000000001200731455567757300303560ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationDMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetDeviceCapabilities DESCRIPTION: This function gets device capabilities PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMaxTXChannelRate [ O ] - Maximum transmission rate (bps) pMaxRXChannelRate [ O ] - Maximum reception rate (bps) pDataServiceCapability [ O ] - CS/PS data service capability pSimCapability [ O ] - Device SIM support pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDeviceCapabilities( ULONG inLen, const BYTE * pIn, ULONG * pMaxTXChannelRate, ULONG * pMaxRXChannelRate, ULONG * pDataServiceCapability, ULONG * pSimCapability, ULONG * pRadioIfacesSize, BYTE * pRadioIfaces ) { // Validate arguments if (pIn == 0 || pMaxTXChannelRate == 0 || pMaxRXChannelRate == 0 || pDataServiceCapability == 0 || pSimCapability == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxRadioIfaces = (ULONG)*pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; const sDMSGetDeviceCapabilitiesResponse_Capabilities * pTLVx01; ULONG structSzx01 = sizeof( sDMSGetDeviceCapabilitiesResponse_Capabilities ); ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < structSzx01) { return eGOBI_ERR_BUFFER_SZ; } // Populate the variables *pMaxTXChannelRate = pTLVx01->mMaxTXRatebps; *pMaxRXChannelRate = pTLVx01->mMaxRXRatebps; *pDataServiceCapability = pTLVx01->mDataServiceCapability; // SIM capability should be treated as a boolean, even though it's not *pSimCapability = (pTLVx01->mSIMSupported == 0 ? 0 : 1); ULONG activeRadioIfaces = pTLVx01->mRadioInterfaceCount; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMIDMSRadioInterfaces * pInRadioInterfaces; // Verify there is room for the array in the TLV if (outLenx01 < structSzx01 + sizeof( eQMIDMSRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRadioInterfaces = (const eQMIDMSRadioInterfaces *) ((const BYTE *)pTLVx01 + structSzx01); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pInRadioInterfaces; pOutRadioIfaces++; pInRadioInterfaces++; } *pRadioIfacesSize = activeRadioIfaces; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetManufacturer DESCRIPTION: This function returns the device manufacturer name PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetManufacturer( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the manufacturer // sDMSGetDeviceManfacturerResponse_Manfacturer only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetModelID DESCRIPTION: This function returns the device model ID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetModelID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the model // sDMSGetDeviceModelResponse_Model only contains the model const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevision DESCRIPTION: This function returns the device firmware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the PRI revision // sDMSGetDeviceRevisionResponse_UQCNRevision only contains this const CHAR * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx11, outLenx11 ); pString[outLenx11] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetFirmwareRevisions DESCRIPTION: This function returns the device firmware (AMSS, boot, and PRI) revisions PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer amssSize [ I ] - The maximum number of characters (including NULL terminator) that the AMSS string array can contain pAMSSString [ O ] - NULL terminated AMSS revision string bootSize [ I ] - The maximum number of characters (including NULL terminator) that the boot string array can contain pBootString [ O ] - NULL terminated boot code revision string priSize [ I ] - The maximum number of characters (including NULL terminator) that the PRI string array can contain pPRIString [ O ] - NULL terminated PRI revision string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetFirmwareRevisions( ULONG inLen, const BYTE * pIn, BYTE amssSize, CHAR * pAMSSString, BYTE bootSize, CHAR * pBootString, BYTE priSize, CHAR * pPRIString ) { // Validate arguments if (pIn == 0 || amssSize == 0 || pAMSSString == 0 || bootSize == 0 || pBootString == 0 || priSize == 0 || pPRIString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pAMSSString = 0; *pBootString = 0; *pPRIString = 0; // Find the AMSS version // sDMSGetDeviceRevisionResponse_Revision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (amssSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAMSSString, pTLVx01, outLenx01 ); pAMSSString[outLenx01] = 0; // Find the Boot version // sDMSGetDeviceRevisionResponse_BootCodeRevision only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (bootSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pBootString, pTLVx10, outLenx10 ); pBootString[outLenx10] = 0; // The PRI version is returned by ParseGetFirmwareRevision() rc = ParseGetFirmwareRevision( inLen, pIn, priSize, pPRIString ); if (rc != eGOBI_ERR_NONE) { return rc; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetVoiceNumber DESCRIPTION: This function returns the voice number in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer voiceNumberSize [ I ] - The maximum number of characters (including NULL terminator) that the voice number array can contain pVoiceNumber [ O ] - Voice number (MDN or ISDN) string minSize [ I ] - The maximum number of characters (including NULL terminator) that the MIN array can contain pMIN [ O ] - MIN string (empty string returned when MIN is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetVoiceNumber( ULONG inLen, const BYTE * pIn, BYTE voiceNumberSize, CHAR * pVoiceNumber, BYTE minSize, CHAR * pMIN ) { // Validate arguments if (pIn == 0 || voiceNumberSize == 0 || pVoiceNumber == 0 || minSize == 0 || pMIN == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pVoiceNumber = 0; *pMIN = 0; // Find the Voice number // sDMSGetDeviceVoiceNumberResponse_VoiceNumber only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (voiceNumberSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pVoiceNumber, pTLVx01, outLenx01 ); pVoiceNumber[outLenx01] = 0; // Find the Mobile ID (optional) // sDMSGetDeviceVoiceNumberResponse_MobileIDNumber only contains this const CHAR * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Space to perform the copy? if (minSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMIN, pTLVx10, outLenx10 ); pMIN[outLenx10] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIMSI DESCRIPTION: This function returns the device IMSI PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIMSI( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pString = 0; // Find the IMSI // sDMSGetDeviceVoiceNumberResponse_IMSI only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSerialNumbers DESCRIPTION: This command returns all serial numbers assigned to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer esnSize [ I ] - The maximum number of characters (including NULL terminator) that the ESN array can contain pESNString [ O ] - ESN string (empty string returned when ESN is not supported/programmed) imeiSize [ I ] - The maximum number of characters (including NULL terminator) that the IMEI array can contain pIMEIString [ O ] - IMEI string (empty string returned when IMEI is not supported/programmed) meidSize [ I ] - The maximum number of characters (including NULL terminator) that the MEID array can contain pMEIDString [ O ] - MEID string (empty string returned when MEID is not supported/programmed) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSerialNumbers( ULONG inLen, const BYTE * pIn, BYTE esnSize, CHAR * pESNString, BYTE imeiSize, CHAR * pIMEIString, BYTE meidSize, CHAR * pMEIDString ) { // Validate arguments if (pIn == 0 || esnSize == 0 || pESNString == 0 || imeiSize == 0 || pIMEIString == 0 || meidSize == 0 || pMEIDString == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pESNString = 0; *pIMEIString = 0; *pMEIDString = 0; // Find the ESN // sDMSGetDeviceSerialNumbersResponse_ESN only contains this const CHAR * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (esnSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pESNString, pTLVx10, outLenx10 ); pESNString[outLenx10] = 0; // Find the IMEI // sDMSGetDeviceSerialNumbersResponse_IMEI only contains this const CHAR * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (imeiSize < outLenx11 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pIMEIString, pTLVx11, outLenx11 ); pIMEIString[outLenx11] = 0; // Find the MEID // sDMSGetDeviceSerialNumbersResponse_MEID only contains this const CHAR * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (meidSize < outLenx12 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pMEIDString, pTLVx12, outLenx12 ); pMEIDString[outLenx12] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - Desired lock state pCurrentPIN [ I ] - Current four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetLock( ULONG * pOutLen, BYTE * pOut, ULONG state, CHAR * pCurrentPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string thePIN( pCurrentPIN ); if (thePIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (thePIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockStateRequest_LockState ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockStateRequest_LockState * pTLVx01; pTLVx01 = (sDMSSetLockStateRequest_LockState*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mLockState = (eQMIDMSLockStates)state; memcpy( &pTLVx01->mLockCode[0], thePIN.c_str(), thePIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseQueryLock DESCRIPTION: This function sets the user lock state maintained by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Current lock state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseQueryLock( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetLockStateResponse_LockState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetLockStateResponse_LockState )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mLockState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackChangeLockPIN DESCRIPTION: This command sets the user lock code maintained by the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pCurrentPIN [ I ] - Current four digit PIN string pDesiredPIN [ I ] - New four digit PIN string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackChangeLockPIN( ULONG * pOutLen, BYTE * pOut, CHAR * pCurrentPIN, CHAR * pDesiredPIN ) { // Validate arguments if (pOut == 0 || pCurrentPIN == 0 || pCurrentPIN[0] == 0 || pDesiredPIN == 0 || pDesiredPIN[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string theCurPIN( pCurrentPIN ); if (theCurPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theCurPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } std::string theNewPIN( pDesiredPIN ); if (theNewPIN.size() > 4) { return eGOBI_ERR_INVALID_ARG; } if (theNewPIN.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetLockCodeRequest_LockCode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSSetLockCodeRequest_LockCode * pTLVx01; pTLVx01 = (sDMSSetLockCodeRequest_LockCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mCurrentLockCode[0], theCurPIN.c_str(), theCurPIN.size() ); memcpy( &pTLVx01->mNewLockCode[0], theNewPIN.c_str(), theNewPIN.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHardwareRevision DESCRIPTION: This function returns the device hardware revision PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHardwareRevision( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the hardware revision // sDMSGetHardwareRevisionResponse_HardwareRevision only contains this const CHAR * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPRLVersion DESCRIPTION: This function returns the version of the active Preferred Roaming List (PRL) in use by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPRLVersion [ O ] - The PRL version number RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPRLVersion( ULONG inLen, const BYTE * pIn, WORD * pPRLVersion ) { // Validate arguments if (pIn == 0 || pPRLVersion == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetPRLVersionResponse_PRLVersion * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetPRLVersionResponse_PRLVersion )) { return eGOBI_ERR_MALFORMED_RSP; } *pPRLVersion = pTLVx01->mPRLVersion; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetERIFile DESCRIPTION: This command returns the ERI file that is stored in EFS on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pFileSize [I/O] - Upon input the maximum number of bytes that the file contents array can contain. Upon successful output the actual number of bytes written to the file contents array pFile [ O ] - The file contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetERIFile( ULONG inLen, const BYTE * pIn, ULONG * pFileSize, BYTE * pFile ) { // Validate arguments if (pIn == 0 || pFileSize == 0 || *pFileSize == 0 || pFile == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure ULONG maxFileSize = *pFileSize; *pFileSize = 0; // Find the state const sDMSReadERIDataResponse_UserData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG fileSz = pTLVx01->mDataLength; const BYTE * pInFile; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sDMSReadERIDataResponse_UserData ) + sizeof( BYTE ) * fileSz) { return eGOBI_ERR_MALFORMED_RSP; } // Space to copy into? if (fileSz > maxFileSize) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pInFile = (const BYTE *)pTLVx01 + sizeof( sDMSReadERIDataResponse_UserData ); // Perform the copy memcpy( pFile, pInFile, fileSz ); *pFileSize = fileSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackActivateAutomatic DESCRIPTION: This function requests the device to perform automatic service activation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pActivationCode [ I ] - Activation code (maximum string length of 12) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackActivateAutomatic( ULONG * pOutLen, BYTE * pOut, CHAR * pActivationCode ) { // Validate arguments if (pOut == 0 || pActivationCode == 0 || pActivationCode[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string ac( pActivationCode ); if (ac.size() > 12) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSActivateAutomaticRequest_ActivationCode ) + (WORD)ac.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSActivateAutomaticRequest_ActivationCode * pTLVx01; pTLVx01 = (sDMSActivateAutomaticRequest_ActivationCode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mCodeLength = (UINT8)ac.size(); memcpy( (BYTE *)pTLVx01 + sizeof( sDMSActivateAutomaticRequest_ActivationCode ), ac.c_str(), ac.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackResetToFactoryDefaults DESCRIPTION: This function requests the device reset configuration to factory defaults CHANGES: * The client must manually reset the device after this request completes using DMSSetOperatingMode() PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetToFactoryDefaults( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSResetFactoryDefaultsRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSResetFactoryDefaultsRequest_SPC * pTLVx01; pTLVx01 = (sDMSResetFactoryDefaultsRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActivationState DESCRIPTION: This function returns the device activation state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pActivationState [ O ] - Service activation state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActivationState( ULONG inLen, const BYTE * pIn, ULONG * pActivationState ) { // Validate arguments if (pIn == 0 || pActivationState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the state const sDMSGetActivationStateResponse_ActivationState * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetActivationStateResponse_ActivationState )) { return eGOBI_ERR_MALFORMED_RSP; } *pActivationState = pTLVx01->mActivationState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPower DESCRIPTION: This function sets the operating mode of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer powerMode [ I ] - Selected operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPower( ULONG * pOutLen, BYTE * pOut, ULONG powerMode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSSetOperatingModeRequest_OperatingMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Set the mode sDMSSetOperatingModeRequest_OperatingMode * pTLVx01; pTLVx01 = (sDMSSetOperatingModeRequest_OperatingMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mOperatingMode = (eQMIDMSOperatingModes)powerMode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPower DESCRIPTION: This function returns the operating mode of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPowerMode [ O ] - Current operating mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPower( ULONG inLen, const BYTE * pIn, ULONG * pPowerMode ) { // Validate arguments if (pIn == 0 || pPowerMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pPowerMode = 0xffffffff; // Find the mode const sDMSGetOperatingModeResponse_OperatingMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetOperatingModeResponse_OperatingMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pPowerMode = pTLVx01->mOperatingMode; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetOfflineReason DESCRIPTION: This function returns the reason why the operating mode of the device is currently offline PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pReasonMask [ O ] - Bitmask of offline reasons pbPlatform [ O ] - Offline due to being platform retricted? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetOfflineReason( ULONG inLen, const BYTE * pIn, ULONG * pReasonMask, ULONG * pbPlatform ) { // Validate arguments if (pIn == 0 || pReasonMask == 0 || pbPlatform == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pReasonMask = 0; *pbPlatform = 0; // Find the reason mask (optional) const sDMSGetOperatingModeResponse_OfflineReason * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sDMSGetOperatingModeResponse_OfflineReason )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the bitmask to pReasonMask *pReasonMask = *(WORD*)pTLVx10; } // Find the platform restriction (optional) const sDMSGetOperatingModeResponse_PlatformRestricted * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sDMSGetOperatingModeResponse_PlatformRestricted )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy the value *pbPlatform = pTLVx11->mPlatformRestricted; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkTime DESCRIPTION: This function returns the current time of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTimeCount [ O ] - Count of 1.25ms that have elapsed from the start of GPS time (Jan 6, 1980) pTimeSource [ O ] - Source of the timestamp RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkTime( ULONG inLen, const BYTE * pIn, ULONGLONG * pTimeCount, ULONG * pTimeSource ) { // Validate arguments if (pIn == 0 || pTimeCount == 0 || pTimeSource == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the reason mask const sDMSGetTimestampResponse_Timestamp * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sDMSGetTimestampResponse_Timestamp )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pTimeCount = pTLVx01->mTimestamp; // mSource is of type eQMIDMSTimestampSources *pTimeSource = pTLVx01->mSource; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackValidateSPC DESCRIPTION: This function validates the service programming code PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackValidateSPC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sDMSValidateSPCRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sDMSValidateSPCRequest_SPC * pTLVx01; pTLVx01 = (sDMSValidateSPCRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationNAS.cpp000077500000000000000000001621541455567757300303620ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationNAS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (NAS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" // Maximum length for a scanned network description const ULONG MAX_SNI_DESCRIPTION_LEN = 255; //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sEVDOCustomSCPConfig // Struct to represent CDMA 1xEV-DO custom SCP config /*=========================================================================*/ struct sEVDOCustomSCPConfig { public: BYTE mbActive; ULONG mProtocolMask; ULONG mBroadcastMask; ULONG mApplicationMask; }; /*=========================================================================*/ // Struct sScannedNetworkInfo // Struct to represent scanned network information /*=========================================================================*/ struct sScannedNetworkInfo { public: USHORT mMCC; USHORT mMNC; ULONG mInUse; ULONG mRoaming; ULONG mForbidden; ULONG mPreferred; CHAR mDescription[MAX_SNI_DESCRIPTION_LEN]; }; /*=========================================================================*/ // Struct sScannedNetworkRATInfo // Struct to represent scanned network RAT information /*=========================================================================*/ struct sScannedNetworkRATInfo { public: USHORT mMCC; USHORT mMNC; ULONG mRAT; }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: ParseGetANAAAAuthenticationStatus DESCRIPTION: This function gets the AN-AAA authentication status PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - AN-AAA authentication status RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetANAAAAuthenticationStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus ) { // Validate arguments if (pIn == 0 || pStatus == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sNASGetANAAAAuthenticationStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetANAAAAuthenticationStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pStatus = pTLVx01->mANAAAAuthenticationStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSignalStrength DESCRIPTION: This function gets the current signal strength (in dBm) as measured by the device, the signal strength returned will be one of the currently available technologies with preference CDMA 1xEV-DO, CDMA, AMPS, WCDMA, GSM PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSignalStrength [ O ] - Received signal strength (dBm) pRadioInterface [ O ] - Radio interface technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrength( ULONG inLen, const BYTE * pIn, INT8 * pSignalStrength, ULONG * pRadioInterface ) { // Validate arguments if (pSignalStrength == 0 || pRadioInterface == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG sigSz = 12; INT8 sigs[12]; ULONG radios[12]; ULONG qcErr = ParseGetSignalStrengths( inLen, pIn, &sigSz, &sigs[0], &radios[0] ); if (qcErr != eGOBI_ERR_NONE) { return qcErr; } std::map sigMap; for (ULONG s = 0; s < sigSz; s++) { sigMap[radios[s]] = sigs[s]; } std::map ::const_iterator pIter; // HDR? pIter = sigMap.find( 2 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // CDMA? pIter = sigMap.find( 1 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // AMPS? pIter = sigMap.find( 3 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // WCDMA? pIter = sigMap.find( 5 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // GSM? pIter = sigMap.find( 4 ); if (pIter != sigMap.end()) { *pSignalStrength = pIter->second; *pRadioInterface = pIter->first; return eGOBI_ERR_NONE; } // Error values *pSignalStrength = -128; *pRadioInterface = 0; return eGOBI_ERR_NO_SIGNAL; } /*=========================================================================== METHOD: ParseGetSignalStrengths DESCRIPTION: This function gets the current available signal strengths (in dBm) as measured by the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pArraySizes [I/O] - Upon input the maximum number of elements that each array can contain can contain. Upon successful output the actual number of elements in each array pSignalStrengths [ O ] - Received signal strength array (dBm) pRadioInterfaces [ O ] - Radio interface technology array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSignalStrengths( ULONG inLen, const BYTE * pIn, ULONG * pArraySizes, INT8 * pSignalStrengths, ULONG * pRadioInterfaces ) { // Validate arguments if (pIn == 0 || pArraySizes == 0 || *pArraySizes == 0 || pSignalStrengths == 0 || pRadioInterfaces == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxSignals = (ULONG)*pArraySizes; // Assume failure *pArraySizes = 0; // Find the first signal strength value const sNASGetSignalStrengthResponse_SignalStrength * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetSignalStrengthResponse_SignalStrength )) { return eGOBI_ERR_MALFORMED_RSP; } // Weed out bogus values std::map sigMap; INT8 sigVal = pTLVx01->mSignalStrengthdBm; ULONG radioVal = pTLVx01->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Handle list, if present const sNASGetSignalStrengthResponse_SignalStrengthList * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG auxSigs = pTLVx10->mNumberOfInfoInstances; if (auxSigs > maxSignals) { auxSigs = maxSignals; } const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo * pInfo; // Verify there is room for the array in the TLV if (outLenx10 < sizeof( sNASGetSignalStrengthResponse_SignalStrengthList ) + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList::sInfo ) * auxSigs) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInfo = (const sNASGetSignalStrengthResponse_SignalStrengthList::sInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASGetSignalStrengthResponse_SignalStrengthList )); for (ULONG s = 0; s < auxSigs; s++) { sigVal = pInfo->mSignalStrengthdBm; radioVal = pInfo->mRadioInterface; if (sigVal <= -30 && sigVal > -125 && radioVal != 0) { sigMap[radioVal] = sigVal; } // Move pInfo forward one element pInfo++; } } ULONG sigCount = 0; std::map ::const_iterator pIter; for (pIter = sigMap.begin(); pIter != sigMap.end(); pIter++, sigCount++) { if (sigCount < maxSignals) { pSignalStrengths[sigCount] = pIter->second; pRadioInterfaces[sigCount] = pIter->first; *pArraySizes = sigCount + 1; } } // No valid signals? if (sigCount == 0) { return eGOBI_ERR_NO_SIGNAL; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetRFInfo DESCRIPTION: This function gets the current RF information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the RF info instance array can contain. Upon success the actual number of elements in the RF info instance array pInstances [ O ] - The RF info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetRFInfo( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxInstances = *pInstanceSize; *pInstanceSize = 0; // Find the TLV const sNASGetRFInfoResponse_RFInfo * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE ifaceCount = pTLVx01->mNumberOfInstances; if (ifaceCount > maxInstances) { ifaceCount = maxInstances; } const sNASGetRFInfoResponse_RFInfo::sInstance * pInstance; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetRFInfoResponse_RFInfo ) + sizeof( sNASGetRFInfoResponse_RFInfo::sInstance ) * ifaceCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInstance = (const sNASGetRFInfoResponse_RFInfo::sInstance *) ((const BYTE *)pTLVx01 + sizeof( sNASGetRFInfoResponse_RFInfo )); ULONG * pOutput = (ULONG *)pInstances; for (BYTE i = 0; i < ifaceCount; i++) { *pOutput++ = pInstance->mRadioInterface; *pOutput++ = pInstance->mActiveBandClass; *pOutput++ = pInstance->mActiveChannel; // Move pInstance forward one element pInstance++; } *pInstanceSize = ifaceCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkScan DESCRIPTION: This function performs a scan for available networks PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxInstances = *pInstanceSize; // Assume failure *pInstanceSize = 0; // Find the TLV const sNASPerformNetworkScanResponse_NetworkInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sNASPerformNetworkScanResponse_NetworkInfo )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 netCount = pTLVx10->mNumberOfInfoInstances; if (netCount > maxInstances) { netCount = maxInstances; } const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo * pNetInfo; // Align to the first array element pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pTLVx10 + sizeof( sNASPerformNetworkScanResponse_NetworkInfo )); ULONG offset = sizeof( sNASPerformNetworkScanResponse_NetworkInfo ); sScannedNetworkInfo * pNet = (sScannedNetworkInfo *)pInstances; for (BYTE i = 0; i < netCount; i++) { // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } pNet->mMCC = pNetInfo->mMobileCountryCode; pNet->mMNC = pNetInfo->mMobileNetworkCode; pNet->mInUse = pNetInfo->mInUseStatus; pNet->mRoaming = pNetInfo->mRoamingStatus; pNet->mForbidden = pNetInfo->mForbiddenStatus; pNet->mPreferred = pNetInfo->mPreferredStatus; memset( &pNet->mDescription[0], 0, MAX_SNI_DESCRIPTION_LEN ); BYTE descLen = pNetInfo->mDescriptionLength; if (descLen > 0) { // Move pNetInfo forward pNetInfo++; offset += sizeof( sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo ); // Check TLV size if (offset > outLenx10) { return eGOBI_ERR_MALFORMED_RSP; } std::string netDesc( (LPCSTR)pNetInfo ); ULONG actualLen = (ULONG)netDesc.size(); if (actualLen >= MAX_SNI_DESCRIPTION_LEN) { actualLen = MAX_SNI_DESCRIPTION_LEN - 1; } LPCSTR pNetDesc = netDesc.c_str(); memcpy( &pNet->mDescription[0], pNetDesc, actualLen ); // Move pNetInfo past string pNetInfo = (const sNASPerformNetworkScanResponse_NetworkInfo::sNetworkInfo *) ((const BYTE *)pNetInfo + descLen); offset += descLen; } pNet++; } *pInstanceSize = (BYTE)netCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParsePerformNetworkRATScan DESCRIPTION: This function performs a scan for available networks (includes RAT) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pInstanceSize [I/O] - Upon input the maximum number of elements that the network info instance array can contain. Upon success the actual number of elements in the network info instance array pInstances [ O ] - The network info instance array pRATSize [I/O] - Upon input the maximum number of elements that the RAT info instance array can contain. Upon success the actual number of elements in the RAT info instance array pRATInstances [ O ] - The RAT info instance array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParsePerformNetworkRATScan( ULONG inLen, const BYTE * pIn, BYTE * pInstanceSize, BYTE * pInstances, BYTE * pRATSize, BYTE * pRATInstances ) { // Validate arguments if (pIn == 0 || pInstanceSize == 0 || *pInstanceSize == 0 || pInstances == 0 || pRATSize == 0 || *pRATSize == 0 || pRATInstances == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRATInstances = *pRATSize; // Assume failure *pInstanceSize = 0; *pRATSize = 0; // First, generate the instances using ParsePerformNetworkScan ULONG rc = ParsePerformNetworkScan( inLen, pIn, pInstanceSize, pInstances ); if (rc != eGOBI_ERR_NONE) { return rc; } // Now find the RAT info too // Find the TLV const sNASPerformNetworkScanResponse_NetworkRAT * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT )) { return eGOBI_ERR_MALFORMED_RSP; } UINT16 ratCount = pTLVx11->mNumberOfInfoInstances; if (ratCount > maxRATInstances) { ratCount = maxRATInstances; } const sNASPerformNetworkScanResponse_NetworkRAT::sInfo * pRatInfo; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASPerformNetworkScanResponse_NetworkRAT ) + sizeof( sNASPerformNetworkScanResponse_NetworkRAT::sInfo ) * ratCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRatInfo = (const sNASPerformNetworkScanResponse_NetworkRAT::sInfo *) ((const BYTE *)pTLVx11 + sizeof( sNASPerformNetworkScanResponse_NetworkRAT )); sScannedNetworkRATInfo * pRAT = (sScannedNetworkRATInfo *)pRATInstances; for (BYTE r = 0; r < ratCount; r++) { pRAT->mMCC = pRatInfo->mMobileCountryCode; pRAT->mMNC = pRatInfo->mMobileNetworkCode; pRAT->mRAT = pRatInfo->mRadioAccessTechnology; pRAT++; pRatInfo++; } *pRATSize = (BYTE)ratCount; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateNetworkRegistration DESCRIPTION: This function initiates a network registration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer regType [ I ] - Registration type mcc [ I ] - Mobile country code (ignored for auto registration) mnc [ I ] - Mobile network code (ignored for auto registration) rat [ I ] - Radio access type (ignored for auto registration) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateNetworkRegistration( ULONG * pOutLen, BYTE * pOut, ULONG regType, WORD mcc, WORD mnc, ULONG rat ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the action // Check size WORD tlvx01Sz = sizeof( sNASInitiateNetworkRegisterRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_Action * pTLVx01; pTLVx01 = (sNASInitiateNetworkRegisterRequest_Action*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mRegisterAction = (eQMINASRegisterActions)regType; offset += tlvx01Sz; // Set the info // Check size WORD tlvx10Sz = sizeof( sNASInitiateNetworkRegisterRequest_ManualInfo ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset = sizeof( sQMIRawContentHeader ); sNASInitiateNetworkRegisterRequest_ManualInfo * pTLVx10; pTLVx10 = (sNASInitiateNetworkRegisterRequest_ManualInfo*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMobileCountryCode = mcc; pTLVx10->mMobileNetworkCode = mnc; pTLVx10->mRadioAccessTechnology = (eQMINASRadioAccessTechnologies)rat; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackInitiateDomainAttach DESCRIPTION: This function initiates a domain attach (or detach) PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer action [ I ] - PS attach action (attach or detach) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackInitiateDomainAttach( ULONG * pOutLen, BYTE * pOut, ULONG action ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASInitiateAttachRequest_Action ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASInitiateAttachRequest_Action * pTLVx10; pTLVx10 = (sNASInitiateAttachRequest_Action*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mPSAttachAction = (eQMINASPSAttachActions)action; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetwork DESCRIPTION: Gets information regarding the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRegistrationState [ O ] - Registration state pCSDomain [ O ] - Circuit switch domain status pPSDomain [ O ] - Packet switch domain status pRAN [ O ] - Radio access network pRadioIfacesSize [I/O] - Upon input the maximum number of elements that the radio interfaces can contain. Upon successful output the actual number of elements in the radio interface array pRadioIfaces [ O ] - The radio interface array pRoaming [ O ] - Roaming indicator (0xFFFFFFFF - Unknown) pMCC [ O ] - Mobile country code (0xFFFF - Unknown) pMNC [ O ] - Mobile network code (0xFFFF - Unknown) nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetwork( ULONG inLen, const BYTE * pIn, ULONG * pRegistrationState, ULONG * pCSDomain, ULONG * pPSDomain, ULONG * pRAN, BYTE * pRadioIfacesSize, BYTE * pRadioIfaces, ULONG * pRoaming, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName ) { // Validate arguments if (pIn == 0 || pRegistrationState == 0 || pCSDomain == 0 || pPSDomain == 0 || pRAN == 0 || pRadioIfacesSize == 0 || *pRadioIfacesSize == 0 || pRadioIfaces == 0 || pRoaming == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxRadioIfaces = *pRadioIfacesSize; // Assume failure *pRadioIfacesSize = 0; *pRoaming = 0xffffffff; *pMCC = 0xffff; *pMNC = 0xffff; *pName = 0; // Parse the serving system (mandatory) // Find the TLV const sNASGetServingSystemResponse_ServingSystem * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pRegistrationState = pTLVx01->mRegistrationState; *pCSDomain = pTLVx01->mCSAttachState; *pPSDomain = pTLVx01->mPSAttachState; *pRAN = pTLVx01->mRegisteredNetwork; BYTE activeRadioIfaces = pTLVx01->mNumberOfRadioInterfacesInUse; if (activeRadioIfaces > maxRadioIfaces) { activeRadioIfaces = maxRadioIfaces; } const eQMINASRadioInterfaces * pRadioInfo; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetServingSystemResponse_ServingSystem ) + sizeof( eQMINASRadioInterfaces ) * activeRadioIfaces) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pRadioInfo = (const eQMINASRadioInterfaces *) ((const BYTE *)pTLVx01 + sizeof( sNASGetServingSystemResponse_ServingSystem )); ULONG * pOutRadioIfaces = (ULONG *)pRadioIfaces; for (ULONG r = 0; r < activeRadioIfaces; r++) { *pOutRadioIfaces = *pRadioInfo; pOutRadioIfaces++; pRadioInfo++; } *pRadioIfacesSize = activeRadioIfaces; // Find the roaming indicator (optional) const sNASGetServingSystemResponse_RoamingIndicator * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetServingSystemResponse_RoamingIndicator )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pRoaming = (eQMINASRoamingIndicators)pTLVx10->mRoamingIndicator; } // Find the PLMN (optional) const sNASGetServingSystemResponse_CurrentPLMN * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN )) { return eGOBI_ERR_MALFORMED_RSP; } *pMCC = pTLVx12->mMobileCountryCode; *pMNC = pTLVx12->mMobileNetworkCode; ULONG descLen = pTLVx12->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx12 < sizeof( sNASGetServingSystemResponse_CurrentPLMN ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx12 + sizeof( sNASGetServingSystemResponse_CurrentPLMN )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServingNetworkCapabilities DESCRIPTION: Gets information regarding the data capabilities of the system that currently provides service to the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCapsSize [I/O] - Upon input the maximum number of elements that the data capabilities array can contain. Upon success the actual number of elements in the data capabilities array pDataCaps [ O ] - The data capabilities array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServingNetworkCapabilities( ULONG inLen, const BYTE * pIn, BYTE * pDataCapsSize, BYTE * pDataCaps ) { // Validate arguments if (pIn == 0 || pDataCapsSize == 0 || *pDataCapsSize == 0 || pDataCaps == 0) { return eGOBI_ERR_INVALID_ARG; } BYTE maxDataCaps = *pDataCapsSize; // Assume failure *pDataCapsSize = 0; // Find the TLV const sNASGetServingSystemResponse_DataServices * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices )) { return eGOBI_ERR_MALFORMED_RSP; } BYTE activeDataCaps = pTLVx11->mNumberOfDataCapabilities; if (activeDataCaps > maxDataCaps) { activeDataCaps = maxDataCaps; } const eQMINASDataServiceCapabilities2 * pInDataCaps; // Verify there is room for the array in the TLV if (outLenx11 < sizeof( sNASGetServingSystemResponse_DataServices ) + sizeof( eQMINASDataServiceCapabilities2 ) * activeDataCaps) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInDataCaps = (const eQMINASDataServiceCapabilities2 *) ((const BYTE *)pTLVx11 + sizeof( sNASGetServingSystemResponse_DataServices )); ULONG * pOutDataCaps = (ULONG *)pDataCaps; for (ULONG d = 0; d < activeDataCaps; d++) { *pOutDataCaps = *pInDataCaps; pOutDataCaps++; pInDataCaps++; } *pDataCapsSize = activeDataCaps; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetHomeNetwork DESCRIPTION: This function retrieves information about the home network of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - The maximum number of characters (including NULL terminator) that the network name array can contain pName [ O ] - The network name or description represented as a NULL terminated string (empty string returned when unknown) pSID [ O ] - Home network system ID (0xFFFF - Unknown) pNID [ O ] - Home network ID (0xFFFF - Unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetHomeNetwork( ULONG inLen, const BYTE * pIn, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID ) { // Validate arguments if (pIn == 0 || pMCC == 0 || pMNC == 0 || nameSize == 0 || pName == 0 || pSID == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure *pName = 0; *pSID = 0xffff; *pNID = 0xffff; // Find the name (mandatory) const sNASGetHomeNetworkResponse_HomeNetwork * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork )) { return eGOBI_ERR_MALFORMED_RSP; } // Populate the variables *pMCC = pTLVx01->mMobileCountryCode; *pMNC = pTLVx01->mMobileNetworkCode; ULONG descLen = pTLVx01->mDescriptionLength; const CHAR * pDesc; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sNASGetHomeNetworkResponse_HomeNetwork ) + sizeof( CHAR ) * descLen) { return eGOBI_ERR_MALFORMED_RSP; } // Space to perform the copy? if (nameSize < descLen + 1) { return eGOBI_ERR_BUFFER_SZ; } // Align to the first array element pDesc = (const CHAR *)((const BYTE *)pTLVx01 + sizeof( sNASGetHomeNetworkResponse_HomeNetwork )); memcpy( pName, pDesc, descLen ); pName[descLen] = 0; // Find the SID/NID (optional) const sNASGetHomeNetworkResponse_HomeIDs * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetHomeNetworkResponse_HomeIDs )) { return eGOBI_ERR_MALFORMED_RSP; } *pSID = pTLVx10->mSystemID; *pNID = pTLVx10->mNetworkID; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetNetworkPreference DESCRIPTION: This function sets the network registration preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer technologyPref [ I ] - Technology preference bitmap duration [ I ] - Duration of active preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetNetworkPreference( ULONG * pOutLen, BYTE * pOut, ULONG technologyPref, ULONG duration ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetTechnologyPreferenceRequest_Preference ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetTechnologyPreferenceRequest_Preference * pTLVx01; pTLVx01 = (sNASSetTechnologyPreferenceRequest_Preference*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Copy technology preference WORD as-is memcpy( &pTLVx01->mValOfTechnology, &technologyPref, 2 ); pTLVx01->mDuration = (eQMINASTechPrefDurations)duration; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetNetworkPreference DESCRIPTION: This function returns the network registration preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTechnologyPref [ O ] - Technology preference bitmap pDuration [ O ] - Duration of active preference pPersistentTechnologyPref [ O ] - Persistent technology preference bitmap RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetNetworkPreference( ULONG inLen, const BYTE * pIn, ULONG * pTechnologyPref, ULONG * pDuration, ULONG * pPersistentTechnologyPref ) { // Validate arguments if (pIn == 0 || pTechnologyPref == 0 || pDuration == 0 || pPersistentTechnologyPref == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the preference (mandatory) const sNASGetTechnologyPreferenceResponse_ActivePreference * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetTechnologyPreferenceResponse_ActivePreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pTechnologyPref, &pTLVx01->mValOfTechnology, 2 ); *pDuration = pTLVx01->mDuration; // Until we know any better the persistent setting is the current setting *pPersistentTechnologyPref = *pTechnologyPref; // Find the persistant technology preference (optional) const sNASGetTechnologyPreferenceResponse_PersistentPreference * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sNASGetTechnologyPreferenceResponse_PersistentPreference )) { return eGOBI_ERR_MALFORMED_RSP; } // Copy technology preference WORD as-is *pTechnologyPref = 0; memcpy( pPersistentTechnologyPref, &pTLVx10->mValOfTechnology, 2 ); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetCDMANetworkParameters DESCRIPTION: This function sets the desired CDMA network parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pForceRev0 [ I ] - (Optional) Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ I ] - (Optional) Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ I ] - (Optional) Protocol mask for custom SCP config pBroadcast [ I ] - (Optional) Broadcast mask for custom SCP config pApplication [ I ] - (Optional) Application mask for custom SCP config pRoaming [ I ] - (Optional) Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetCDMANetworkParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // If you specify one of the custom SCP config fields then you must // specify them all ULONG scpCount = 0; if (pCustomSCP != 0) { scpCount++; } if (pProtocol != 0) { scpCount++; } if (pBroadcast != 0) { scpCount++; } if (pApplication != 0) { scpCount++; } if (scpCount != 0 && scpCount != 4) { return eGOBI_ERR_INVALID_ARG; } // Rev. 0 and SCP custom config are mutually exclusive if (pForceRev0 != 0 && scpCount == 4) { if (*pForceRev0 != 0 && *pCustomSCP != 0) { return eGOBI_ERR_INVALID_ARG; } } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Need to start with SPC? if (pForceRev0 != 0 || scpCount == 4) { // Validate arguments if (pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx10Sz = sizeof( sNASSetNetworkParametersRequest_SPC ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_SPC * pTLVx10; pTLVx10 = (sNASSetNetworkParametersRequest_SPC*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values memcpy( &pTLVx10->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx10Sz; } // Force Rev. 0? if (pForceRev0 != 0) { // Check size WORD tlvx14Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDORevision ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDORevision * pTLVx14; pTLVx14 = (sNASSetNetworkParametersRequest_CDMA1xEVDORevision*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mForceCDMA1xEVDORev0 = (*pForceRev0 == 0 ? 0 : 1); offset += tlvx14Sz; } if (scpCount == 4) { // Check size WORD tlvx15Sz = sizeof( sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom * pTLVx15; pTLVx15 = (sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the values pTLVx15->mCDMA1xEVDOSCPCustomConfig = (*pCustomSCP == 0 ? 0 : 1); // The pProtocol bitmask pTLVx15->mSubtype2PhysicalLayer = (*pProtocol & 0x00000001 ? 1 : 0); pTLVx15->mEnhancedCCMAC = (*pProtocol & 0x00000002 ? 1 : 0); pTLVx15->mEnhancedACMAC = (*pProtocol & 0x00000004 ? 1 : 0); pTLVx15->mEnhancedFTCMAC = (*pProtocol & 0x00000008 ? 1 : 0); pTLVx15->mSubtype3RTCMAC = (*pProtocol & 0x00000010 ? 1 : 0); pTLVx15->mSubtype1RTCMAC = (*pProtocol & 0x00000020 ? 1 : 0); pTLVx15->mEnhancedIdle = (*pProtocol & 0x00000040 ? 1 : 0); pTLVx15->mGenericMultimodeCapableDiscPort = (*pProtocol & 0x00000080 ? 1 : 0); pTLVx15->mGenericBroadcast = (*pBroadcast & 0x00000001 ? 1 : 0); pTLVx15->mSNMultiflowPacketApplication = (*pApplication & 0x00000001 ? 1 : 0); pTLVx15->mSNEnhancedMultiflowPacketApplication = (*pApplication & 0x00000002 ? 1 : 0); offset += tlvx15Sz; } if (pRoaming != 0) { // Check size WORD tlvx16Sz = sizeof( sNASSetNetworkParametersRequest_Roaming ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sNASSetNetworkParametersRequest_Roaming * pTLVx16; pTLVx16 = (sNASSetNetworkParametersRequest_Roaming*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the values pTLVx16->mRoamPreference = (eQMINASRoamingPreferences)*pRoaming; offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset == 0) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetCDMANetworkParameters DESCRIPTION: This function gets the current CDMA network parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSCI [ O ] - Slot cycle index pSCM [ O ] - Station class mark pRegHomeSID [ O ] - Register on home SID? pRegForeignSID [ O ] - Register on foreign SID? pRegForeignNID [ O ] - Register on foreign NID? pForceRev0 [ O ] - Force CDMA 1x-EV-DO Rev. 0 mode? pCustomSCP [ O ] - Use a custom config for CDMA 1x-EV-DO SCP? pProtocol [ O ] - Protocol mask for custom SCP config pBroadcast [ O ] - Broadcast mask for custom SCP config pApplication [ O ] - Application mask for custom SCP config pRoaming [ O ] - Roaming preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetCDMANetworkParameters( ULONG inLen, const BYTE * pIn, BYTE * pSCI, BYTE * pSCM, BYTE * pRegHomeSID, BYTE * pRegForeignSID, BYTE * pRegForeignNID, BYTE * pForceRev0, BYTE * pCustomSCP, ULONG * pProtocol, ULONG * pBroadcast, ULONG * pApplication, ULONG * pRoaming ) { // Validate arguments if (pIn == 0 || pSCI == 0 || pSCM == 0 || pRegHomeSID == 0 || pRegForeignSID == 0 || pRegForeignNID == 0 || pForceRev0 == 0 || pCustomSCP == 0 || pProtocol == 0 || pBroadcast == 0 || pApplication == 0 || pRoaming == 0) { return eGOBI_ERR_INVALID_ARG; } *pSCI = 0xff; *pSCM = 0xff; *pRegHomeSID = 0xff; *pRegForeignSID = 0xff; *pRegForeignNID = 0xff; *pForceRev0 = 0xff; *pCustomSCP = 0xff; *pProtocol = 0xffffffff; *pBroadcast = 0xffffffff; *pApplication = 0xffffffff; *pRoaming = 0xff; // Find the SCI const sNASGetNetworkParametersResponse_SCI * pTLVx11; ULONG outLenx11; ULONG rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sNASGetNetworkParametersResponse_SCI )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCI = pTLVx11->mSlotCycleIndex; } // Find the SCM const sNASGetNetworkParametersResponse_SCM * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sNASGetNetworkParametersResponse_SCM )) { return eGOBI_ERR_MALFORMED_RSP; } *pSCM = pTLVx12->mStationClassMark; } // Find the Registration const sNASGetNetworkParametersResponse_Registration * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sNASGetNetworkParametersResponse_Registration )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx13->mRegisterOnHomeSystem; *pRegForeignSID = pTLVx13->mRegisterOnForeignSystem; *pRegForeignNID = pTLVx13->mRegisterOnForeignNetwork; } // Rev. 0? const sNASGetNetworkParametersResponse_CDMA1xEVDORevision * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sNASGetNetworkParametersResponse_CDMA1xEVDORevision )) { return eGOBI_ERR_MALFORMED_RSP; } *pRegHomeSID = pTLVx14->mForceCDMA1xEVDORev0; } // We're lazy, so we'll just typecast all the bitmask members from // sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom into their // respective container parameters const sEVDOCustomSCPConfig * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sEVDOCustomSCPConfig )) { return eGOBI_ERR_MALFORMED_RSP; } *pCustomSCP = pTLVx15->mbActive; *pProtocol = pTLVx15->mProtocolMask; *pBroadcast = pTLVx15->mBroadcastMask; *pApplication = pTLVx15->mApplicationMask; } // Roaming? const sNASGetNetworkParametersResponse_Roaming * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sNASGetNetworkParametersResponse_Roaming )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoaming = (eQMINASRoamingPreferences)pTLVx16->mRoamPreference; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetACCOLC DESCRIPTION: This function returns the Access Overload Class (ACCOLC) of the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pACCOLC [ O ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetACCOLC( ULONG inLen, const BYTE * pIn, BYTE * pACCOLC ) { // Validate arguments if (pIn == 0 || pACCOLC == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the ACCOLC (mandatory) const sNASGetACCOLCResponse_ACCOLC * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sNASGetACCOLCResponse_ACCOLC )) { return eGOBI_ERR_MALFORMED_RSP; } *pACCOLC = pTLVx01->mACCOLC; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetACCOLC DESCRIPTION: This function sets the Access Overload Class (ACCOLC) of the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - NULL terminated string representing the six digit service programming code accolc [ I ] - The ACCOLC RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetACCOLC( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE accolc ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASSetACCOLCRequest_ACCOLC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASSetACCOLCRequest_ACCOLC * pTLVx01; pTLVx01 = (sNASSetACCOLCRequest_ACCOLC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mACCOLC = accolc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNMode DESCRIPTION: This function returns the PLMN mode from the CSP PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - PLMN mode RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNMode( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode (mandatory) const sNASGetCSPPLMNModeResponse_Mode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx10 < sizeof( sNASGetCSPPLMNModeResponse_Mode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mRestrictManualPLMNSelection; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mcc [ I ] - Mobile country code mnc [ I ] - Mobile network code RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPLMNName( ULONG * pOutLen, BYTE * pOut, USHORT mcc, USHORT mnc ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sNASGetPLMNNameRequest_PLMN ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sNASGetPLMNNameRequest_PLMN * pTLVx01; pTLVx01 = (sNASGetPLMNNameRequest_PLMN*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMobileCountryCode = mcc; pTLVx01->mMobileNetworkCode = mnc; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPLMNName DESCRIPTION: This function returns PLMN name information for the given MCC/MNC PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pNamesSize [I/O] - Upon input the size in BYTEs of the name structure array. Upon success the actual number of BYTEs copied to the name structure array pNames [ O ] - The name structure array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPLMNName( ULONG inLen, const BYTE * pIn, ULONG * pNamesSize, BYTE * pNames ) { // Validate arguments if (pIn == 0 || *pNamesSize == 0 || pNames == 0) { return eGOBI_ERR_INVALID_ARG; } const BYTE * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // The output format just happens to be the same as // sNASGetPLMNNameResponse_Name. Copy the full TLV to pNames if (outLenx10 > *pNamesSize) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNames, pTLVx10, outLenx10 ); *pNamesSize = outLenx10; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationOMA.cpp000077500000000000000000000336101455567757300303470ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationOMA.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (OMADM Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackOMADMStartSession DESCRIPTION: This function starts an OMA-DM session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionType [ I ] - Type of session to initiate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMStartSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add sessionType // Check size WORD tlvx10Sz = sizeof( sOMAStartSessionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMAStartSessionRequest_Type * pTLVx10; pTLVx10 = (sOMAStartSessionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSessionType = (eQMIOMASessionTypes)sessionType; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetSessionInfo DESCRIPTION: This function returns information related to the current (or previous if no session is active) OMA-DM session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionState [ O ] - State of session pSessionType [ O ] - Type of session pFailureReason [ O ] - Session failure reason (when state indicates failure) pRetryCount [ O ] - Session retry count (when state indicates retrying) pSessionPause [ O ] - Session pause timer (when state indicates retrying) pTimeRemaining [ O ] - Pause time remaining (when state indicates retrying) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetSessionInfo( ULONG inLen, const BYTE * pIn, ULONG * pSessionState, ULONG * pSessionType, ULONG * pFailureReason, BYTE * pRetryCount, WORD * pSessionPause, WORD * pTimeRemaining ) { // Validate arguments if (pIn == 0 || pSessionState == 0 || pSessionType == 0 || pFailureReason == 0 || pRetryCount == 0 || pSessionPause == 0 || pTimeRemaining == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetSessionInfoResponse_Info * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetSessionInfoResponse_Info )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionState = pTLVx10->mSessionState; *pSessionType = pTLVx10->mSessionType; // Find the second TLV const sOMAGetSessionInfoResponse_Failure * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sOMAGetSessionInfoResponse_Failure )) { return eGOBI_ERR_MALFORMED_RSP; } *pFailureReason = pTLVx11->mSessionFailure; // Find the third TLV const sOMAGetSessionInfoResponse_Retry * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sOMAGetSessionInfoResponse_Retry )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryCount = pTLVx12->mRetryCount; *pSessionPause = pTLVx12->mRetryPauseTimer; *pTimeRemaining = pTLVx12->mRemainingTime; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetPendingNIA DESCRIPTION: This function returns information about the pending network initiated alert PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionType [ O ] - Type of session pSessionID [ O ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetPendingNIA( ULONG inLen, const BYTE * pIn, ULONG * pSessionType, USHORT * pSessionID ) { // Validate arguments if (pIn == 0 || pSessionType == 0 || pSessionID == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sOMAGetSessionInfoResponse_NIA * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sOMAGetSessionInfoResponse_NIA )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionID = pTLVx13->mSessionID; *pSessionType = pTLVx13->mSessionType; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSendSelection DESCRIPTION: This function sends the specified OMA-DM selection for the current network initiated session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer selection [ I ] - Selection sessionID [ I ] - Unique session ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSendSelection( ULONG * pOutLen, BYTE * pOut, ULONG selection, USHORT sessionID ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add selection and session ID // Check size WORD tlvx10Sz = sizeof( sOMASendSelectionRequest_Type ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASendSelectionRequest_Type * pTLVx10; pTLVx10 = (sOMASendSelectionRequest_Type*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mSelection = (eQMIOMASelections)selection; pTLVx10->mSessionID = sessionID; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseOMADMGetFeatureSettings DESCRIPTION: This function returns the OMA-DM feature settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbProvisioning [ O ] - Device provisioning service update enabled pbPRLUpdate [ O ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseOMADMGetFeatureSettings( ULONG inLen, const BYTE * pIn, ULONG * pbProvisioning, ULONG * pbPRLUpdate ) { // Validate arguments if (pIn == 0 || pbProvisioning == 0 || pbPRLUpdate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sOMAGetFeaturesResponse_Provisioning * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_Provisioning )) { return eGOBI_ERR_MALFORMED_RSP; } *pbProvisioning = pTLVx10->mDeviceProvisioningServiceUpdateEnabled; // Find the second TLV const sOMAGetFeaturesResponse_PRLUpdate * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sOMAGetFeaturesResponse_PRLUpdate )) { return eGOBI_ERR_MALFORMED_RSP; } *pbPRLUpdate = pTLVx11->mPRLServiceUpdateEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetProvisioningFeature DESCRIPTION: This function sets the OMA-DM device provisioning service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bProvisioning [ I ] - Device provisioning service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetProvisioningFeature( ULONG * pOutLen, BYTE * pOut, ULONG bProvisioning ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bProvisioning // Check size WORD tlvx10Sz = sizeof( sOMASetFeaturesRequest_Provisioning ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_Provisioning * pTLVx10; pTLVx10 = (sOMASetFeaturesRequest_Provisioning*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mDeviceProvisioningServiceUpdateEnabled = (INT8)bProvisioning; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackOMADMSetPRLUpdateFeature DESCRIPTION: This function sets the OMA-DM PRL service update feature setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bPRLUpdate [ I ] - PRL service update enabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOMADMSetPRLUpdateFeature( ULONG * pOutLen, BYTE * pOut, ULONG bPRLUpdate ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bPRLUpdate // Check size WORD tlvx11Sz = sizeof( sOMASetFeaturesRequest_PRLUpdate ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sOMASetFeaturesRequest_PRLUpdate * pTLVx11; pTLVx11 = (sOMASetFeaturesRequest_PRLUpdate*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPRLServiceUpdateEnabled = (INT8)bPRLUpdate; offset += tlvx11Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationPDS.cpp000077500000000000000000001033451455567757300303640ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationPDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Position Determination Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackResetPDSData DESCRIPTION: This function resets the specified PDS data PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pGPSDataMask [ I ] - Bitmask of GPS data to clear (optional) pCellDataMask [ I ] - Bitmask of cell data to clear (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackResetPDSData( ULONG * pOutLen, BYTE * pOut, ULONG * pGPSDataMask, ULONG * pCellDataMask ) { // Validate arguments (at least one mask must be present) if (pOut == 0 || (pGPSDataMask == 0 && pCellDataMask == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Optionally add pGPSDataMask if (pGPSDataMask != 0) { // Check size WORD tlvx10Sz = sizeof( sPDSResetPDSDataRequest_GPSData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_GPSData * pTLVx10; pTLVx10 = (sPDSResetPDSDataRequest_GPSData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx10 = *pGPSDataMask; offset += tlvx10Sz; } // Optionally add pCellDataMask if (pCellDataMask != 0) { // Check size WORD tlvx11Sz = sizeof( sPDSResetPDSDataRequest_CellData ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sPDSResetPDSDataRequest_CellData * pTLVx11; pTLVx11 = (sPDSResetPDSDataRequest_CellData*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Typecast the input over the bitmask *(ULONG *)pTLVx11 = *pCellDataMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPortAutomaticTracking DESCRIPTION: This function sets the automatic tracking configuration for the NMEA COM port PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bAuto [ I ] - Enable automatic tracking for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPortAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetCOMPortAutoTrackingConfigRequest_Config ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetCOMPortAutoTrackingConfigRequest_Config * pTLVx01; pTLVx01 = (sPDSSetCOMPortAutoTrackingConfigRequest_Config*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPortAutomaticTracking DESCRIPTION: This function returns the automatic tracking configuration for the NMEA COM port PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking enabled for NMEA COM port? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPortAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetCOMPortAutoTrackingConfigResponse_Config * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetCOMPortAutoTrackingConfigResponse_Config )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetServiceAutomaticTracking DESCRIPTION: This function sets the automatic tracking state for the service PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pbAuto [ I ] - Start automatic tracking session for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetServiceAutomaticTracking( ULONG * pOutLen, BYTE * pOut, ULONG bAuto ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bAuto // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceAutoTrackingStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceAutoTrackingStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceAutoTrackingStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoTrackingEnabled = (bAuto == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetServiceAutomaticTracking DESCRIPTION: This function returns the automatic tracking state for the service PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbAuto [ O ] - Automatic tracking session started for service? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetServiceAutomaticTracking( ULONG inLen, const BYTE * pIn, ULONG * pbAuto ) { // Validate arguments if (pIn == 0 || pbAuto == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pbAuto const sPDSGetServiceAutoTrackingStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceAutoTrackingStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pbAuto = pTLVx01->mAutoTrackingEnabled; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetAGPSConfig DESCRIPTION: This function sets the PDS AGPS configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer serverAddress [ I ] - IPv4 address of AGPS server serverPort [ I ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetAGPSConfig( ULONG * pOutLen, BYTE * pOut, ULONG serverAddress, ULONG serverPort ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetAGPSConfigRequest_Server ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetAGPSConfigRequest_Server * pTLVx10; pTLVx10 = (sPDSSetAGPSConfigRequest_Server*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (serverAddress & 0x000000FF); ULONG ip1 = (serverAddress & 0x0000FF00) >> 8; ULONG ip2 = (serverAddress & 0x00FF0000) >> 16; ULONG ip3 = (serverAddress & 0xFF000000) >> 24; // Set the values pTLVx10->mServerAddress[0] = (INT8)ip0; pTLVx10->mServerAddress[1] = (INT8)ip1; pTLVx10->mServerAddress[2] = (INT8)ip2; pTLVx10->mServerAddress[3] = (INT8)ip3; pTLVx10->mServerPort = serverPort; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetAGPSConfig DESCRIPTION: This function returns the PDS AGPS configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pServerAddress [ O ] - IPv4 address of AGPS server pServerPort [ O ] - Port number of AGPS server RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetAGPSConfig( ULONG inLen, const BYTE * pIn, ULONG * pServerAddress, ULONG * pServerPort ) { // Validate arguments if (pIn == 0 || pServerAddress == 0 || pServerPort == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetAGPSConfigResponse_ServerAddress * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetAGPSConfigResponse_ServerAddress )) { return eGOBI_ERR_MALFORMED_RSP; } *pServerPort = pTLVx01->mServerPort; ULONG ip0 = (ULONG)pTLVx01->mServerAddress[0]; ULONG ip1 = (ULONG)pTLVx01->mServerAddress[1] << 8; ULONG ip2 = (ULONG)pTLVx01->mServerAddress[2] << 16; ULONG ip3 = (ULONG)pTLVx01->mServerAddress[3] << 24; *pServerAddress = (ip0 | ip1 | ip2 | ip3); return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRATimeState DESCRIPTION: This function sets the XTRA time positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRATimeState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRATime ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRATime * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRATime*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRATimeState DESCRIPTION: This function returns the XTRA time positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA time positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRATimeState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRATime * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRATime )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRADataState DESCRIPTION: This function sets the XTRA data positioning state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer state [ I ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRADataState( ULONG * pOutLen, BYTE * pOut, ULONG state ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add state // Check size WORD tlvx10Sz = sizeof( sPDSSetPositionMethodsStateRequest_XTRAData ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetPositionMethodsStateRequest_XTRAData * pTLVx10; pTLVx10 = (sPDSSetPositionMethodsStateRequest_XTRAData*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMethodState = (eQMIPDSMethodStates)state; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRADataState DESCRIPTION: This function returns the XTRA data positioning state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - XTRA data positioning state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRADataState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pState const sPDSGetPositionMethodsStateResponse_XTRAData * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetPositionMethodsStateResponse_XTRAData )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx10->mMethodState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAValidity DESCRIPTION: This function returns the XTRA database validity period PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pGPSWeek [ O ] - Starting GPS week of validity period pGPSWeekOffset [ O ] - Starting GPS week offset (minutes) of validity period pDuration [ O ] - Length of validity period (hours) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAValidity( ULONG inLen, const BYTE * pIn, USHORT * pGPSWeek, USHORT * pGPSWeekOffset, USHORT * pDuration ) { // Validate arguments if (pIn == 0 || pGPSWeek == 0 || pGPSWeekOffset == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Validity * pTLVx13; ULONG outLenx13; ULONG rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx13 < sizeof( sPDSGetXTRAParametersResponse_Validity )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx13->mValidPeriodDurationInHours; *pGPSWeek = pTLVx13->mValidPeriodGPSStartWeek; *pGPSWeekOffset = pTLVx13->mValidPeriodGPSStartWeekOffsetInMinutes; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRANetwork DESCRIPTION: This function sets the XTRA WWAN network preference PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer preference [ I ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRANetwork( ULONG * pOutLen, BYTE * pOut, ULONG preference ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add preference // Check size WORD tlvx12Sz = sizeof( sPDSSetXTRAParametersRequest_Network ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Network * pTLVx12; pTLVx12 = (sPDSSetXTRAParametersRequest_Network*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mWWANNetworkPreference = (eQMIPDSWWANNetworkPreferences)preference; offset += tlvx12Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRANetwork DESCRIPTION: This function returns the XTRA WWAN network preference PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPreference [ O ] - XTRA WWAN network preference RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRANetwork( ULONG inLen, const BYTE * pIn, ULONG * pPreference ) { // Validate arguments if (pIn == 0 || pPreference == 0) { return eGOBI_ERR_INVALID_ARG; } // Find pPreference const sPDSGetXTRAParametersResponse_Network * pTLVx12; ULONG outLenx12; ULONG rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx12 < sizeof( sPDSGetXTRAParametersResponse_Network )) { return eGOBI_ERR_MALFORMED_RSP; } *pPreference = pTLVx12->mWWANNetworkPreference; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetXTRAAutomaticDownload DESCRIPTION: This function sets the XTRA automatic download configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnabled [ I ] - Automatic download enabled? interval [ I ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetXTRAAutomaticDownload( ULONG * pOutLen, BYTE * pOut, ULONG bEnabled, USHORT interval ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx10Sz = sizeof( sPDSSetXTRAParametersRequest_Automatic ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetXTRAParametersRequest_Automatic * pTLVx10; pTLVx10 = (sPDSSetXTRAParametersRequest_Automatic*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutomaticDownloadEnabled = (bEnabled == 0 ? 0 : 1); pTLVx10->mDownloadIntervalInHours = interval; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetXTRAAutomaticDownload DESCRIPTION: This function returns the XTRA automatic download configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - Automatic download enabled? pInterval [ O ] - Interval (hours) between XTRA downloads RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetXTRAAutomaticDownload( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, USHORT * pInterval ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pInterval == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetXTRAParametersResponse_Automatic * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sPDSGetXTRAParametersResponse_Automatic )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mAutomaticDownloadEnabled; *pInterval = pTLVx10->mDownloadIntervalInHours; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSState DESCRIPTION: This function returns the current PDS state PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Current PDS state (0 = disabled) pTracking [ O ] - Current PDS tracking session state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSState( ULONG inLen, const BYTE * pIn, ULONG * pEnabled, ULONG * pTracking ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pTracking == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetServiceStateResponse_State * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetServiceStateResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx01->mServiceEnabled; *pTracking = pTLVx01->mTrackingSessionState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSState DESCRIPTION: This function sets the PDS state PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer enable [ I ] - Desired PDS state (0 = disable) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSState( ULONG * pOutLen, BYTE * pOut, ULONG enable ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add enable // Check size WORD tlvx01Sz = sizeof( sPDSSetServiceStateRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetServiceStateRequest_State * pTLVx01; pTLVx01 = (sPDSSetServiceStateRequest_State*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mServiceEnabled = (enable == 0 ? 0 : 1); offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackPDSInjectTimeReference DESCRIPTION: This function injects a system time into the PDS engine PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sysTime [ I ] - System time sysDiscontinuities [ I ] - Number of system time discontinuities RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackPDSInjectTimeReference( ULONG * pOutLen, BYTE * pOut, ULONGLONG systemTime, USHORT systemDiscontinuities ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSInjectTimeReferenceRequest_Time ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSInjectTimeReferenceRequest_Time * pTLVx01; pTLVx01 = (sPDSInjectTimeReferenceRequest_Time*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mSystemTimeMilliseconds = systemTime; pTLVx01->mSystemDiscontinuties = systemDiscontinuities; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPDSDefaults DESCRIPTION: This function returns the default tracking session configuration PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOperation [ O ] - Current session operating mode pTimeout [ O ] - Maximum amount of time (seconds) to work on each fix pInterval [ O ] - Interval (milliseconds) between fix requests pAccuracy [ O ] - Current accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPDSDefaults( ULONG inLen, const BYTE * pIn, ULONG * pOperation, BYTE * pTimeout, ULONG * pInterval, ULONG * pAccuracy ) { // Validate arguments if (pIn == 0 || pOperation == 0 || pTimeout == 0 || pInterval == 0 || pAccuracy == 0) { return eGOBI_ERR_INVALID_ARG; } // Find arguments const sPDSGetDefaultsResponse_Defaults * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sPDSGetDefaultsResponse_Defaults )) { return eGOBI_ERR_MALFORMED_RSP; } *pOperation = pTLVx01->mSessionOperation; *pTimeout = pTLVx01->mTimeoutSeconds; *pInterval = pTLVx01->mFixRequestIntervalSeconds; *pAccuracy = pTLVx01->mDesiredAccuracyMeters; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetPDSDefaults DESCRIPTION: This function sets the default tracking session configuration PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer operation [ I ] - Desired session operating mode timeout [ I ] - Maximum amount of time (seconds) to work on each fix interval [ I ] - Interval (milliseconds) between fix requests accuracy [ I ] - Desired accuracy threshold (meters) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetPDSDefaults( ULONG * pOutLen, BYTE * pOut, ULONG operation, BYTE timeout, ULONG interval, ULONG accuracy ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments // Check size WORD tlvx01Sz = sizeof( sPDSSetDefaultsRequest_Defaults ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sPDSSetDefaultsRequest_Defaults * pTLVx01; pTLVx01 = (sPDSSetDefaultsRequest_Defaults*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mDesiredAccuracyMeters = accuracy; pTLVx01->mFixRequestIntervalSeconds = interval; pTLVx01->mSessionOperation = (eQMIPDSOperationTypes)operation; pTLVx01->mTimeoutSeconds = timeout; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationRMS.cpp000077500000000000000000000134261455567757300303770ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationRMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Remote Management Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSMSWake DESCRIPTION: This function queries the state of the SMS wake functionality PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pbEnabled [ O ] - SMS wake functionality enabled? pWakeMask [ O ] - SMS wake mask (only relevant when enabled) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSWake( ULONG inLen, const BYTE * pIn, ULONG * pbEnabled, ULONG * pWakeMask ) { // Validate arguments if (pIn == 0 || pbEnabled == 0 || pWakeMask == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first TLV const sRMSGetSMSWakeResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sRMSGetSMSWakeResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } // Find the second TLV const sRMSGetSMSWakeRequest_Mask * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx11 < sizeof( sRMSGetSMSWakeRequest_Mask )) { return eGOBI_ERR_MALFORMED_RSP; } *pbEnabled = pTLVx10->mSMSWakeEnabled; *pWakeMask = pTLVx11->mMask; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetSMSWake DESCRIPTION: This function enables/disables the SMS wake functionality PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer bEnable [ I ] - Enable SMS wake functionality? wakeMask [ I ] - SMS wake mask (only relevant when enabling) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSWake( ULONG * pOutLen, BYTE * pOut, ULONG bEnable, ULONG wakeMask ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add bEnable // Check size WORD tlvx10Sz = sizeof( sRMSSetSMSWakeRequest_State ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_State * pTLVx10; pTLVx10 = (sRMSSetSMSWakeRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mSMSWakeEnabled = (INT8)bEnable; offset += tlvx10Sz; // Add wakeMask if enabled if (bEnable != 0) { // Check size WORD tlvx11Sz = sizeof( sRMSSetSMSWakeRequest_Mask ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sRMSSetSMSWakeRequest_Mask * pTLVx11; pTLVx11 = (sRMSSetSMSWakeRequest_Mask*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mMask = wakeMask; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationUIM.cpp000077500000000000000000001065171455567757300303740ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationUIM.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (DMS_UIM Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockControlKey( ULONG inLen, const BYTE * pIn, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockControlKeyResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockControlKeyResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockControlKey DESCRIPTION: This function unblocks the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockControlKey( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockControlKeyRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMUnblockControlKeyRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMUnblockControlKeyRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mControlKeyLength = valSz; offset += sizeof( sDMSUIMUnblockControlKeyRequest_Facility ); memcpy( (pOut + offset), (LPCSTR)val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the control key will be blocked (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetControlKeyProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetControlKeyProtectionResponse_Status * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetControlKeyProtectionResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetControlKeyProtection DESCRIPTION: This function changes the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID status [ I ] - Control key status pValue [ I ] - Control key de-personalization string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetControlKeyProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG status, CHAR * pValue ) { // Validate arguments if (pOut == 0 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetControlKeyProtectionRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMSetControlKeyProtectionRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; pTLVx01->mFacilityState = (eQMIDMSUIMFacilityStates)status; pTLVx01->mControlKeyLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetControlKeyProtectionRequest_Facility ); memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked pbBlocking [ O ] - (Optional) Is the facility blocking? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyBlockingStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft, ULONG * pbBlocking ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the first arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; // Find the last (optional) argument if (pbBlocking != 0) { const sDMSUIMGetControlKeyStatusResponse_Blocking * pTLVx10; ULONG tlvLenx10; rc = GetTLV( inLen, pIn, 0x10, &tlvLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLenx10 < sizeof( sDMSUIMGetControlKeyStatusResponse_Blocking )) { return eGOBI_ERR_MALFORMED_RSP; } *pbBlocking = pTLVx10->mOperationBlocking; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyBlockingStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyBlockingStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add id // Check size WORD tlvx01Sz = sizeof( sDMSUIMGetControlKeyStatusRequest_Facility ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMGetControlKeyStatusRequest_Facility * pTLVx01; pTLVx01 = (sDMSUIMGetControlKeyStatusRequest_Facility*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mFacility = (eQMIDMSUIMFacility)id; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetControlKeyStatus DESCRIPTION: This function returns the status of the specified facility control key PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pStatus [ O ] - Control key status pVerifyRetriesLeft [ O ] - The number of retries left, after which the control key will be blocked pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the control key will be permanently blocked RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetControlKeyStatus( ULONG inLen, const BYTE * pIn, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the arguments const sDMSUIMGetControlKeyStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetControlKeyStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx01->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx01->mRemainingUnblockRetries; *pStatus = pTLVx01->mFacilityState; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMGetControlKeyStatus DESCRIPTION: This function requests the status of the specified facility control key PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - Facility ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMGetControlKeyStatus( ULONG * pOutLen, BYTE * pOut, ULONG id ) { // Request is the same as PackUIMGetControlKeyBlockingStatus return PackUIMGetControlKeyBlockingStatus( pOutLen, pOut, id ); } /*=========================================================================== METHOD: ParseUIMGetICCID DESCRIPTION: This function returns the UIM ICCID PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer stringSize [ I ] - The maximum number of characters (including NULL terminator) that the string array can contain pString [ O ] - NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetICCID( ULONG inLen, const BYTE * pIn, BYTE stringSize, CHAR * pString ) { // Validate arguments if (pIn == 0 || stringSize == 0 || pString == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMGetICCIDResponse_ICCID * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sDMSUIMGetICCIDResponse_ICCID )) { return eGOBI_ERR_MALFORMED_RSP; } // The TLV only contains the string // Space to perform the copy? if (stringSize < outLenx01 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pString, (const CHAR*)pTLVx01, outLenx01 ); pString[outLenx01] = 0; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMGetPINStatus DESCRIPTION: This function returns the status of the pin PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer id [ I ] - PIN ID (1/2) pStatus [ O ] - PIN status (0xFFFFFFFF = unknown) pVerifyRetriesLeft [ O ] - The number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - The number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMGetPINStatus( ULONG inLen, const BYTE * pIn, ULONG id, ULONG * pStatus, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || id < 1 || id > 2 || pStatus == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG tlvLen; // The typeID is either 0x11 or 0x12 if (id == 1) { const sDMSUIMGetPINStatusResponse_PIN1Status * pTLV11; ULONG rc = GetTLV( inLen, pIn, 0x11, &tlvLen, (const BYTE **)&pTLV11 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN1Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV11->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV11->mRemainingUnblockRetries; *pStatus = pTLV11->mPINStatus; } else if (id == 2) { const sDMSUIMGetPINStatusResponse_PIN2Status * pTLV12; ULONG rc = GetTLV( inLen, pIn, 0x12, &tlvLen, (const BYTE **)&pTLV12 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (tlvLen < sizeof( sDMSUIMGetPINStatusResponse_PIN2Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLV12->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLV12->mRemainingUnblockRetries; *pStatus = pTLV12->mPINStatus; } else { return eGOBI_ERR_INVALID_ARG; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMChangePIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMChangePINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMChangePINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMChangePIN DESCRIPTION: This function changes the PIN value PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pOldValue [ I ] - Old PIN value of the PIN to change pNewValue [ I ] - New PIN value of the PIN to change RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMChangePIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pOldValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pOldValue == 0 || pOldValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pOldValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMChangePINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMChangePINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMChangePINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mOldPINLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMChangePINRequest_Info1 ); // mOldPINValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMChangePINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMChangePINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMChangePINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMUnblockPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMUnblockPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMUnblockPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMUnblockPIN DESCRIPTION: This function unblocks a blocked PIN PARAMETERS: id [ I ] - PIN ID (1/2) pPUKValue [ I ] - PUK value of the PIN to unblock pNewValue [ I ] - New PIN value of the PIN to unblock RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMUnblockPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pPUKValue, CHAR * pNewValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pPUKValue == 0 || pPUKValue[0] == 0 || pNewValue == 0 || pNewValue[0] == 0 ) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string oldVal( pPUKValue ); ULONG oldValSz = (ULONG)oldVal.size(); std::string newVal( pNewValue ); ULONG newValSz = (ULONG)newVal.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMUnblockPINRequest_Info ) + (WORD)oldValSz + (WORD)newValSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // First part of the TLV sDMSUIMUnblockPINRequest_Info1 * pTLVx01_1; pTLVx01_1 = (sDMSUIMUnblockPINRequest_Info1*)(pOut + offset); memset( pTLVx01_1, 0, tlvx01Sz ); pTLVx01_1->mPINID = (UINT8)id; pTLVx01_1->mPUKLength = (UINT8)oldValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info1 ); // mPUKValue string memcpy( (pOut + offset), oldVal.c_str(), oldValSz ); offset += oldValSz; // Second part of the TLV sDMSUIMUnblockPINRequest_Info2 * pTLVx01_2; pTLVx01_2 = (sDMSUIMUnblockPINRequest_Info2*)(pOut + offset); pTLVx01_2->mNewPINLength = (UINT8)newValSz; offset += sizeof( sDMSUIMUnblockPINRequest_Info2 ); // mNewPINValue string memcpy( (pOut + offset), newVal.c_str(), newValSz ); offset += newValSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMVerifyPIN( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMVerifyPINResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMVerifyPINResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMVerifyPIN DESCRIPTION: This function verifies the PIN before accessing the UIM contents PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) pValue [ I ] - PIN value of the PIN to verify RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMVerifyPIN( ULONG * pOutLen, BYTE * pOut, ULONG id, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); UINT8 valSz = (UINT8)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMVerifyPINRequest_Info ) + valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMVerifyPINRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMVerifyPINRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINLength = valSz; offset += sizeof( sDMSUIMVerifyPINRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pVerifyRetriesLeft [ O ] - Upon operational failure this will indicate the number of retries left, after which the PIN will be blocked (0xFFFFFFFF = unknown) pUnblockRetriesLeft [ O ] - Upon operational failure this will indicate the number of unblock retries left, after which the PIN will be permanently blocked, i.e. UIM is unusable (0xFFFFFFFF = unknown) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseUIMSetPINProtection( ULONG inLen, const BYTE * pIn, ULONG * pVerifyRetriesLeft, ULONG * pUnblockRetriesLeft ) { // Validate arguments if (pIn == 0 || pVerifyRetriesLeft == 0 || pUnblockRetriesLeft == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sDMSUIMSetPINProtectionResponse_RetryInfo * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx10 < sizeof( sDMSUIMSetPINProtectionResponse_RetryInfo )) { return eGOBI_ERR_MALFORMED_RSP; } *pVerifyRetriesLeft = pTLVx10->mRemainingVerifyRetries; *pUnblockRetriesLeft = pTLVx10->mRemainingUnblockRetries; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackUIMSetPINProtection DESCRIPTION: This function enables or disables protection of UIM contents by a given PIN PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer id [ I ] - PIN ID (1/2) bEnable [ I ] - Enable/disable PIN protection (0 = disable)? pValue [ I ] - PIN value of the PIN to be enabled/disabled RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackUIMSetPINProtection( ULONG * pOutLen, BYTE * pOut, ULONG id, ULONG bEnable, CHAR * pValue ) { // Validate arguments if (pOut == 0 || id < 1 || id > 2 || pValue == 0 || pValue[0] == 0) { return eGOBI_ERR_INVALID_ARG; } // Add arguments std::string val( pValue ); ULONG valSz = (ULONG)val.size(); // Check size WORD tlvx01Sz = sizeof( sDMSUIMSetPINProtectionRequest_Info ) + (WORD)valSz; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sDMSUIMSetPINProtectionRequest_Info * pTLVx01; pTLVx01 = (sDMSUIMSetPINProtectionRequest_Info*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mPINID = (UINT8)id; pTLVx01->mPINEnabled = (bEnable == 0 ? 0 : 1); pTLVx01->mPINLength = (UINT8)valSz; offset += sizeof( sDMSUIMSetPINProtectionRequest_Info ); // Add mPINValue memcpy( (pOut + offset), val.c_str(), valSz ); offset += valSz; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationVoice.cpp000077500000000000000000000131311455567757300307740ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationVoice.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (Voice Service for USSD) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" //--------------------------------------------------------------------------- // Pragmas (pack structs) //--------------------------------------------------------------------------- #pragma pack( push, 1 ) /*=========================================================================*/ // Struct sUSSDInfo // Struct to represent USSD/Alpha information header /*=========================================================================*/ struct sUSSDInfoHdr { public: BYTE mDCS; BYTE mLength; // Data of 'mLength' follows }; //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma pack( pop ) /*=========================================================================== METHOD: PackOriginateUSSD DESCRIPTION: This function initiates a USSD operation PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackOriginateUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } // Add pInfo sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackAnswerUSSD DESCRIPTION: This function responds to a USSD request from the network PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pInfo [ I ] - USSD information RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackAnswerUSSD( ULONG * pOutLen, BYTE * pOut, BYTE * pInfo ) { // Validate arguments if (pOut == 0 || pInfo == 0) { return eGOBI_ERR_INVALID_ARG; } const WORD INFO_HDR_SZ = sizeof( sUSSDInfoHdr ); // This assumes that pInfo is at least 2 bytes long sUSSDInfoHdr * pInInfo = (sUSSDInfoHdr *)pInfo; WORD infoLen = pInInfo->mLength + INFO_HDR_SZ; // Check size if (*pOutLen < sizeof( sQMIRawContentHeader ) + infoLen) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = infoLen; ULONG offset = sizeof( sQMIRawContentHeader ); // No pTLVx01 since pInfo is our TLV memcpy( (pOut + offset), pInfo, infoLen ); offset += infoLen; *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationWDS.cpp000077500000000000000000003064571455567757300304040ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWDS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WDS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: ParseGetSessionState DESCRIPTION: This function returns the state of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - State of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetPacketServiceStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetPacketServiceStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mConnectionStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSessionDuration DESCRIPTION: This function returns the duration of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDuration [ O ] - Duration of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSessionDuration( ULONG inLen, const BYTE * pIn, ULONGLONG * pDuration ) { // Validate arguments if (pIn == 0 || pDuration == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataSessionDurationResponse_Duration * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataSessionDurationResponse_Duration )) { return eGOBI_ERR_MALFORMED_RSP; } *pDuration = pTLVx01->mDataSessionDuration; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDormancyState DESCRIPTION: This function returns the dormancy state of the current packet data session (when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pState [ O ] - Dormancy state of the current packet session RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDormancyState( ULONG inLen, const BYTE * pIn, ULONG * pState ) { // Validate arguments if (pIn == 0 || pState == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDormancyResponse_DormancyStatus * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDormancyResponse_DormancyStatus )) { return eGOBI_ERR_MALFORMED_RSP; } *pState = pTLVx01->mDormancyStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetEnhancedAutoconnect DESCRIPTION: This function returns the current autoconnect data session setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSetting [ O ] - NDIS autoconnect setting pRoamSetting [ O ] - NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetEnhancedAutoconnect( ULONG inLen, const BYTE * pIn, ULONG * pSetting, ULONG * pRoamSetting ) { // Validate arguments if (pIn == 0 || pSetting == 0 || pRoamSetting == 0) { return eGOBI_ERR_INVALID_ARG; } *pSetting = 0xffffffff; *pRoamSetting = 0xffffffff; // Find the first TLV const sWDSGetAutoconnectSettingResponse_Autoconnect * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetAutoconnectSettingResponse_Autoconnect )) { return eGOBI_ERR_MALFORMED_RSP; } *pSetting = pTLVx01->mAutoconnectSetting; // Find the second TLV (optional) const sWDSGetAutoconnectSettingResponse_Roam * pTLVx10; ULONG outLenx10; rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { // Is the TLV large enough? if (outLenx10 < sizeof( sWDSGetAutoconnectSettingResponse_Roam )) { return eGOBI_ERR_MALFORMED_RSP; } *pRoamSetting = pTLVx10->mAutoconnectRoamSetting; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetEnhancedAutoconnect DESCRIPTION: This function sets the autoconnect data session setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer setting [ I ] - NDIS autoconnect setting pRoamSetting [ I ] - (Optional) NDIS autoconnect roam setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetEnhancedAutoconnect( ULONG * pOutLen, BYTE * pOut, ULONG setting, ULONG * pRoamSetting ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add setting // Check size WORD tlvx01Sz = sizeof( sWDSSetAutoconnectSettingRequest_Autoconnect ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Autoconnect * pTLVx01; pTLVx01 = (sWDSSetAutoconnectSettingRequest_Autoconnect*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mAutoconnectSetting = (eQMIWDSAutoconnectSettings)setting; offset += tlvx01Sz; // Add roam setting, if specified if (pRoamSetting != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetAutoconnectSettingRequest_Roam ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetAutoconnectSettingRequest_Roam * pTLVx10; pTLVx10 = (sWDSSetAutoconnectSettingRequest_Roam*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mAutoconnectRoamSetting = (eQMIWDSAutoconnectRoamSettings)*pRoamSetting; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDefaultProfile DESCRIPTION: This function writes the default profile settings to the device, the default profile is used during autoconnect pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being written pPDPType [ I ] - (Optional) PDP type pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pName [ I ] - (Optional) The profile name or description pAPNName [ I ] - (Optional) Access point name pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, CHAR * pName, CHAR * pAPNName, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSModifyProfileRequest_ProfileIdentifier ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_ProfileIdentifier * pTLVx01; pTLVx01 = (sWDSModifyProfileRequest_ProfileIdentifier*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; pTLVx01->mProfileIndex = 1; offset += tlvx01Sz; // Add name, if specified if (pName != 0) { std::string name( pName ); // Check size WORD tlvx10Sz = (WORD)name.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( pOut + offset, name.c_str(), name.size() ); offset += tlvx10Sz; } // Add PDP type, if specified if (pPDPType != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSModifyProfileRequest_PDPType ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PDPType * pTLVx11; pTLVx11 = (sWDSModifyProfileRequest_PDPType*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mPDPType = (eQMIPDPTypes)*pPDPType; offset += tlvx11Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSModifyProfileRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_PrimaryDNS * pTLVx15; pTLVx15 = (sWDSModifyProfileRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSModifyProfileRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_SecondaryDNS * pTLVx16; pTLVx16 = (sWDSModifyProfileRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx16->mIPV4Address[0] = (INT8)ip0; pTLVx16->mIPV4Address[1] = (INT8)ip1; pTLVx16->mIPV4Address[2] = (INT8)ip2; pTLVx16->mIPV4Address[3] = (INT8)ip3; offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx1BSz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1BSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1B; pHeader->mLength = tlvx1BSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx1BSz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx1CSz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1CSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1C; pHeader->mLength = tlvx1CSz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx1CSz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx1DSz = sizeof( sWDSModifyProfileRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1DSz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1D; pHeader->mLength = tlvx1DSz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_Authentication * pTLVx1D; pTLVx1D = (sWDSModifyProfileRequest_Authentication*)(pOut + offset); memset( pTLVx1D, 0, tlvx1DSz ); // Set the value pTLVx1D->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx1D->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx1DSz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx1ESz = sizeof( sWDSModifyProfileRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx1ESz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x1E; pHeader->mLength = tlvx1ESz; offset += sizeof( sQMIRawContentHeader ); sWDSModifyProfileRequest_IPAddress * pTLVx1E; pTLVx1E = (sWDSModifyProfileRequest_IPAddress*)(pOut + offset); memset( pTLVx1E, 0, tlvx1ESz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx1E->mIPV4Address[0] = (INT8)ip0; pTLVx1E->mIPV4Address[1] = (INT8)ip1; pTLVx1E->mIPV4Address[2] = (INT8)ip2; pTLVx1E->mIPV4Address[3] = (INT8)ip3; offset += tlvx1ESz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer profileType [ I ] - Profile type being read RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetDefaultProfile( ULONG * pOutLen, BYTE * pOut, ULONG profileType ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add profileType // Check size WORD tlvx01Sz = sizeof( sWDSGetDefaultSettingsRequest_ProfileType ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetDefaultSettingsRequest_ProfileType * pTLVx01; pTLVx01 = (sWDSGetDefaultSettingsRequest_ProfileType*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mProfileType = (eQMIProfileTypes)profileType; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDefaultProfile DESCRIPTION: This function reads the default profile settings from the device, the default profile is used during autoconnect PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPDPType [ O ] - PDP type pIPAddress [ O ] - Preferred assigned IPv4 address pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address pAuthentication [ O ] - Authentication algorithm bitmap nameSize [ I ] - The maximum number of characters (including NULL terminator) that the profile name array can contain pName [ O ] - The profile name or description apnSize [ I ] - The maximum number of characters (including NULL terminator) that the APN name array can contain pAPNName [ O ] - Access point name represented as a NULL terminated string (empty string returned when unknown) userSize [ I ] - The maximum number of characters (including NULL terminator) that the username array can contain pUsername [ O ] - Username used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDefaultProfile( ULONG inLen, const BYTE * pIn, ULONG * pPDPType, ULONG * pIPAddress, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pAuthentication, BYTE nameSize, CHAR * pName, BYTE apnSize, CHAR * pAPNName, BYTE userSize, CHAR * pUsername ) { // Validate arguments if (pIn == 0 || pPDPType == 0 || pIPAddress == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0 || pAuthentication == 0 || nameSize == 0 || pName == 0 || apnSize == 0 || pAPNName == 0 || userSize == 0 || pUsername == 0) { return eGOBI_ERR_INVALID_ARG; } // Set defaults *pPDPType = 0xffffffff; *pIPAddress = 0xffffffff; *pPrimaryDNS = 0xffffffff; *pSecondaryDNS = 0xffffffff; *pAuthentication = 0xffffffff; pName[0] = 0; pAPNName[0] = 0; pUsername[0] = 0; // Find the name const sWDSGetDefaultSettingsResponse_ProfileName * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (nameSize < outLenx10 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pName, (const BYTE *)pTLVx10, outLenx10 ); // Null terminate pName[outLenx10] = 0; } // Find the PDP type const sWDSGetDefaultSettingsResponse_PDPType * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDefaultSettingsResponse_PDPType )) { return eGOBI_ERR_MALFORMED_RSP; } *pPDPType = pTLVx11->mPDPType; } // Find the APN name const sWDSGetDefaultSettingsResponse_APNName * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (apnSize < outLenx14 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx14, outLenx14 ); // Null terminate pAPNName[outLenx14] = 0; } // Find the Primary DNS const sWDSGetDefaultSettingsResponse_PrimaryDNS * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetDefaultSettingsResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx15->mIPV4Address[0]; ULONG ip1 = pTLVx15->mIPV4Address[1] << 8; ULONG ip2 = pTLVx15->mIPV4Address[2] << 16; ULONG ip3 = pTLVx15->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDefaultSettingsResponse_SecondaryDNS * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetDefaultSettingsResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx16->mIPV4Address[0]; ULONG ip1 = pTLVx16->mIPV4Address[1] << 8; ULONG ip2 = pTLVx16->mIPV4Address[2] << 16; ULONG ip3 = pTLVx16->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Username const sWDSGetDefaultSettingsResponse_APNName * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (userSize < outLenx1B + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pAPNName, (const BYTE *)pTLVx1B, outLenx1B ); // Null terminate pAPNName[outLenx1B] = 0; } // Find the Authentication const sWDSGetDefaultSettingsResponse_Authentication * pTLVx1D; ULONG outLenx1D; rc = GetTLV( inLen, pIn, 0x1D, &outLenx1D, (const BYTE **)&pTLVx1D ); if (rc == eGOBI_ERR_NONE) { if (outLenx1D < sizeof( sWDSGetDefaultSettingsResponse_Authentication )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG pap = pTLVx1D->mEnablePAP; ULONG chap = pTLVx1D->mEnableCHAP << 1; *pAuthentication = (pap | chap); } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pTechnology [ I ] - (Optional) Technology bitmap pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address pPrimaryNBNS [ I ] - (Optional) Primary NetBIOS NS IPv4 address pSecondaryNBNS [ I ] - (Optional) Secondary NetBIOS NS IPv4 address pAPNName [ I ] - (Optional) Access point name pIPAddress [ I ] - (Optional) Preferred assigned IPv4 address pAuthentication [ I ] - (Optional) Authentication algorithm bitmap pUsername [ I ] - (Optional) Username used during authentication pPassword [ I ] - (Optional) Password used during authentication RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStartDataSession( ULONG * pOutLen, BYTE * pOut, ULONG * pTechnology, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS, ULONG * pPrimaryNBNS, ULONG * pSecondaryNBNS, CHAR * pAPNName, ULONG * pIPAddress, ULONG * pAuthentication, CHAR * pUsername, CHAR * pPassword ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add technology, if specified if (pTechnology != 0) { // Check size WORD tlvx30Sz = sizeof( sWDSStartNetworkInterfaceRequest_TechnologyPreference ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx30Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x30; pHeader->mLength = tlvx30Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_TechnologyPreference * pTLVx30; pTLVx30 = (sWDSStartNetworkInterfaceRequest_TechnologyPreference*)(pOut + offset); memset( pTLVx30, 0, tlvx30Sz ); // Set the value pTLVx30->mEnable3GPP = ((*pTechnology & 0x00000001) != 0); pTLVx30->mEnable3GPP2 = ((*pTechnology & 0x00000002) != 0); offset += tlvx30Sz; } // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSStartNetworkInterfaceRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSStartNetworkInterfaceRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary NBNS, if specified if (pPrimaryNBNS != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSStartNetworkInterfaceRequest_PrimaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_PrimaryNBNS * pTLVx12; pTLVx12 = (sWDSStartNetworkInterfaceRequest_PrimaryNBNS*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryNBNS & 0x000000FF); ULONG ip1 = (*pPrimaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary NBNS, if specified if (pSecondaryNBNS != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSStartNetworkInterfaceRequest_SecondaryNBNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_SecondaryNBNS * pTLVx13; pTLVx13 = (sWDSStartNetworkInterfaceRequest_SecondaryNBNS*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryNBNS & 0x000000FF); ULONG ip1 = (*pSecondaryNBNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryNBNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryNBNS & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add APN Name, if specified if (pAPNName != 0) { std::string apnName( pAPNName ); // Check size WORD tlvx14Sz = (WORD)apnName.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), apnName.c_str(), apnName.size() ); offset += tlvx14Sz; } // Add IP Address, if specified if (pIPAddress != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSStartNetworkInterfaceRequest_IPAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_IPAddress * pTLVx15; pTLVx15 = (sWDSStartNetworkInterfaceRequest_IPAddress*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); ULONG ip0 = (*pIPAddress & 0x000000FF); ULONG ip1 = (*pIPAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pIPAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pIPAddress & 0xFF000000) >> 24; // Set the value pTLVx15->mIPV4Address[0] = (INT8)ip0; pTLVx15->mIPV4Address[1] = (INT8)ip1; pTLVx15->mIPV4Address[2] = (INT8)ip2; pTLVx15->mIPV4Address[3] = (INT8)ip3; offset += tlvx15Sz; } // Add Authentication, if specified if (pAuthentication != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pTLVx16; pTLVx16 = (sWDSStartNetworkInterfaceRequest_Authentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mEnablePAP = ((*pAuthentication & 0x00000001) != 0); pTLVx16->mEnableCHAP = ((*pAuthentication & 0x00000002) != 0); offset += tlvx16Sz; } // Add Username, if specified if (pUsername != 0) { std::string username( pUsername ); // Check size WORD tlvx17Sz = (WORD)username.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), username.c_str(), username.size() ); offset += tlvx17Sz; } // Add Password, if specified if (pPassword != 0) { std::string password( pPassword ); // Check size WORD tlvx18Sz = (WORD)password.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), password.c_str(), password.size() ); offset += tlvx18Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseStartDataSession DESCRIPTION: This function activates a packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pSessionId [ O ] - The assigned session ID pFailureReason [ O ] - Upon call failure the failure reason provided RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseStartDataSession( ULONG inLen, const BYTE * pIn, ULONG * pSessionId, ULONG * pFailureReason ) { // Validate arguments if (pIn == 0 || pSessionId == 0 || pFailureReason == 0) { return eGOBI_ERR_INVALID_ARG; } // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Still parse call end reason, if present const sWDSStartNetworkInterfaceResponse_CallEndReason * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 >= sizeof( sWDSStartNetworkInterfaceResponse_CallEndReason )) { *pFailureReason = pTLVx10->mCallEnd; } } return rc; } // Find the Session ID const sWDSStartNetworkInterfaceResponse_PacketDataHandle * pTLVx01; ULONG outLenx01; rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSStartNetworkInterfaceResponse_PacketDataHandle )) { return eGOBI_ERR_MALFORMED_RSP; } *pSessionId = pTLVx01->mPacketDataHandle; } // Session ID is mandatory, if it failed return that error return rc; } /*=========================================================================== METHOD: PackStopDataSession DESCRIPTION: This function stops the current data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer sessionId [ I ] - The ID of the session to terminate RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackStopDataSession( ULONG * pOutLen, BYTE * pOut, ULONG sessionId ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Add session ID // Check size WORD tlvx01Sz = sizeof( sWDSStopNetworkInterfaceRequest_PacketDataHandle ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSStopNetworkInterfaceRequest_PacketDataHandle * pTLVx01; pTLVx01 = (sWDSStopNetworkInterfaceRequest_PacketDataHandle*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the value pTLVx01->mPacketDataHandle = sessionId; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetIPAddress( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx10Sz = sizeof( sWDSGetCurrentSettingsRequest_RequestedSettings ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetCurrentSettingsRequest_RequestedSettings * pTLVx10; pTLVx10 = (sWDSGetCurrentSettingsRequest_RequestedSettings*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mIPAddress = true; offset += tlvx10Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetIPAddress DESCRIPTION: This function returns the current packet data session IP address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIPAddress [ O ] - Assigned IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetIPAddress( ULONG inLen, const BYTE * pIn, ULONG * pIPAddress ) { // Validate arguments if (pIn == 0 || pIPAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the IP Address const sWDSGetDefaultSettingsResponse_IPAddress * pTLVx1E; ULONG outLenx1E; ULONG rc = GetTLV( inLen, pIn, 0x1E, &outLenx1E, (const BYTE **)&pTLVx1E ); if (rc == eGOBI_ERR_NONE) { if (outLenx1E < sizeof( sWDSGetDefaultSettingsResponse_IPAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx1E->mIPV4Address[0]; ULONG ip1 = pTLVx1E->mIPV4Address[1] << 8; ULONG ip2 = pTLVx1E->mIPV4Address[2] << 16; ULONG ip3 = pTLVx1E->mIPV4Address[3] << 24; *pIPAddress = (ip0 | ip1 | ip2 | ip3); } // If no IP address is found, fail return rc; } /*=========================================================================== METHOD: ParseGetConnectionRate DESCRIPTION: This function returns connection rate information for the packet data connection PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pCurrentChannelTXRate [ O ] - Current channel TX rate (bps) pCurrentChannelRXRate [ O ] - Current channel RX rate (bps) pMaxChannelTXRate [ O ] - Maximum channel TX rate (bps) pMaxChannelRXRate [ O ] - Maximum channel RX rate (bps) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetConnectionRate( ULONG inLen, const BYTE * pIn, ULONG * pCurrentChannelTXRate, ULONG * pCurrentChannelRXRate, ULONG * pMaxChannelTXRate, ULONG * pMaxChannelRXRate ) { // Validate arguments if (pIn == 0 || pCurrentChannelTXRate == 0 || pCurrentChannelRXRate == 0 || pMaxChannelTXRate == 0 || pMaxChannelRXRate == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the rates const sWDSGetChannelRatesResponse_ChannelRates * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetChannelRatesResponse_ChannelRates )) { return eGOBI_ERR_MALFORMED_RSP; } // Get the values *pCurrentChannelTXRate = pTLVx01->mChannelTXRatebps; *pCurrentChannelRXRate = pTLVx01->mChannelRXRatebps; *pMaxChannelTXRate = pTLVx01->mMaxChannelTXRatebps; *pMaxChannelRXRate = pTLVx01->mMaxChannelRXRatebps; } // If no rates are found, fail return rc; } /*=========================================================================== METHOD: PackGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetPacketStatus( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mReportTXPacketSuccesses = true; pTLVx01->mReportRXPacketSuccesses = true; pTLVx01->mReportTXPacketErrors = true; pTLVx01->mReportRXPacketErrors = true; pTLVx01->mReportTXOverflows = true; pTLVx01->mReportRXOverflows = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetPacketStatus DESCRIPTION: This function returns the packet data transfer statistics since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXPacketSuccesses [ O ] - Packets transmitted without error pRXPacketSuccesses [ O ] - Packets received without error pTXPacketErrors [ O ] - Outgoing packets with framing errors pRXPacketErrors [ O ] - Incoming packets with framing errors pTXPacketOverflows [ O ] - Packets dropped because TX buffer overflowed pRXPacketOverflows [ O ] - Packets dropped because RX buffer overflowed RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetPacketStatus( ULONG inLen, const BYTE * pIn, ULONG * pTXPacketSuccesses, ULONG * pRXPacketSuccesses, ULONG * pTXPacketErrors, ULONG * pRXPacketErrors, ULONG * pTXPacketOverflows, ULONG * pRXPacketOverflows ) { // Validate arguments if (pIn == 0 || pTXPacketSuccesses == 0 || pRXPacketSuccesses == 0 || pTXPacketErrors == 0 || pRXPacketErrors == 0 || pTXPacketOverflows == 0 || pRXPacketOverflows == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX packet sucesses const sWDSGetPacketStatisticsResponse_TXPacketSuccesses * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet sucesses const sWDSGetPacketStatisticsResponse_RXPacketSuccesses * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketSuccesses )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet errors const sWDSGetPacketStatisticsResponse_TXPacketErrors * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetPacketStatisticsResponse_TXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet errors const sWDSGetPacketStatisticsResponse_RXPacketErrors * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetPacketStatisticsResponse_RXPacketErrors )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the TX packet overflows const sWDSGetPacketStatisticsResponse_TXOverflows * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetPacketStatisticsResponse_TXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX packet overflows const sWDSGetPacketStatisticsResponse_RXOverflows * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetPacketStatisticsResponse_RXOverflows )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXPacketSuccesses = pTLVx10->mTXPacketSuccesses; *pRXPacketSuccesses = pTLVx11->mRXPacketSuccesses; *pTXPacketErrors = pTLVx12->mTXPacketErrors; *pRXPacketErrors = pTLVx13->mRXPacketErrors; *pTXPacketOverflows = pTLVx14->mTXOverflows; *pRXPacketOverflows = pTLVx15->mRXOverflows; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetByteTotals( ULONG * pOutLen, BYTE * pOut ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Request the settings // Check size WORD tlvx01Sz = sizeof( sWDSGetPacketStatisticsRequest_PacketStatsMask ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetPacketStatisticsRequest_PacketStatsMask * pTLVx01; pTLVx01 = (sWDSGetPacketStatisticsRequest_PacketStatsMask*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mTXByteTotal = true; pTLVx01->mRXByteTotal = true; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetByteTotals DESCRIPTION: This function returns the RX/TX byte counts since the start of the current packet data session PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pTXTotalBytes [ O ] - Bytes transmitted without error pRXTotalBytes [ O ] - Bytes received without error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetByteTotals( ULONG inLen, const BYTE * pIn, ULONGLONG * pTXTotalBytes, ULONGLONG * pRXTotalBytes ) { // Validate arguments if (pIn == 0 || pTXTotalBytes == 0 || pRXTotalBytes == 0) { return eGOBI_ERR_INVALID_ARG; } // NOTE: All TLVs are required. If any fail then all fail // Find the TX bytes const sWDSGetPacketStatisticsResponse_TXBytes * pTLVx19; ULONG outLenx19; ULONG rc = GetTLV( inLen, pIn, 0x19, &outLenx19, (const BYTE **)&pTLVx19 ); if (rc == eGOBI_ERR_NONE) { if (outLenx19 < sizeof( sWDSGetPacketStatisticsResponse_TXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Find the RX bytes const sWDSGetPacketStatisticsResponse_RXBytes * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetPacketStatisticsResponse_RXBytes )) { return eGOBI_ERR_MALFORMED_RSP; } } else { return rc; } // Populate the statistics *pTXTotalBytes = pTLVx19->mTXByteTotal; *pRXTotalBytes = pTLVx1A->mRXByteTotal; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIP DESCRIPTION: This function sets the current mobile IP setting PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer mode [ I ] - Desired mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIP( ULONG * pOutLen, BYTE * pOut, ULONG mode ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Set the mode // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPModeRequest_MobileIPMode ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPModeRequest_MobileIPMode * pTLVx01; pTLVx01 = (sWDSSetMIPModeRequest_MobileIPMode*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMIPMode = (eQMIMobileIPModes)mode; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIP DESCRIPTION: This function gets the current mobile IP setting PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIP( ULONG inLen, const BYTE * pIn, ULONG * pMode ) { // Validate arguments if (pIn == 0 || pMode == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetMIPModeResponse_MobileIPMode * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetMIPModeResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx01->mMIPMode; } return rc; } /*=========================================================================== METHOD: PackSetActiveMobileIPProfile DESCRIPTION: This function sets the active mobile IP profile index PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Desired mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetActiveMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetActiveMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetActiveMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetActiveMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetActiveMobileIPProfile DESCRIPTION: This function gets the the active mobile IP profile index PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pIndex [ O ] - Active mobile IP profile index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetActiveMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pIndex ) { // Validate arguments if (pIn == 0 || pIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the mode const sWDSGetActiveMIPProfileResponse_Index * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc == eGOBI_ERR_NONE) { if (outLenx01 < sizeof( sWDSGetActiveMIPProfileResponse_Index )) { return eGOBI_ERR_MALFORMED_RSP; } *pIndex = pTLVx01->mProfileIndex; } return rc; } /*=========================================================================== METHOD: PackSetMobileIPProfile DESCRIPTION: This function sets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code index [ I ] - Mobile IP profile ID pEnabled [ I ] - (Optional) Enable MIP profile? pAddress [ I ] - (Optional) Home IPv4 address pPrimaryHA [ I ] - (Optional) Primary home agent IPv4 address pSecondaryHA [ I ] - (Optional) Secondary home agent IPv4 address bRevTunneling [ I ] - (Optional) Enable reverse tunneling? pNAI [ I ] - (Optional) Network access identifier string pHASPI [ I ] - (Optional) HA security parameter index pAAASPI [ I ] - (Optional) AAA security parameter index pMNHA [ I ] - (Optional) MN-HA string pMNAAA [ I ] - (Optional) MN-AAA string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, BYTE index, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, CHAR * pMNHA, CHAR * pMNAAA ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSSetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); pTLVx01->mProfileIndex = index; offset += tlvx01Sz; // Add Enabled, if specified if (pEnabled != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPProfileRequest_State ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_State * pTLVx10; pTLVx10 = (sWDSSetMIPProfileRequest_State*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mEnabled = (*pEnabled == 0 ? 0 : 1); offset += tlvx10Sz; } // Add Home Address, if specified if (pAddress != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPProfileRequest_HomeAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HomeAddress * pTLVx11; pTLVx11 = (sWDSSetMIPProfileRequest_HomeAddress*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pAddress & 0x000000FF); ULONG ip1 = (*pAddress & 0x0000FF00) >> 8; ULONG ip2 = (*pAddress & 0x00FF0000) >> 16; ULONG ip3 = (*pAddress & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } // Add Primary Home Agent Address, if specified if (pPrimaryHA != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress * pTLVx12; pTLVx12 = (sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); ULONG ip0 = (*pPrimaryHA & 0x000000FF); ULONG ip1 = (*pPrimaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryHA & 0xFF000000) >> 24; // Set the value pTLVx12->mIPV4Address[0] = (INT8)ip0; pTLVx12->mIPV4Address[1] = (INT8)ip1; pTLVx12->mIPV4Address[2] = (INT8)ip2; pTLVx12->mIPV4Address[3] = (INT8)ip3; offset += tlvx12Sz; } // Add Secondary Home Agent Address, if specified if (pSecondaryHA != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress * pTLVx13; pTLVx13 = (sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); ULONG ip0 = (*pSecondaryHA & 0x000000FF); ULONG ip1 = (*pSecondaryHA & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryHA & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryHA & 0xFF000000) >> 24; // Set the value pTLVx13->mIPV4Address[0] = (INT8)ip0; pTLVx13->mIPV4Address[1] = (INT8)ip1; pTLVx13->mIPV4Address[2] = (INT8)ip2; pTLVx13->mIPV4Address[3] = (INT8)ip3; offset += tlvx13Sz; } // Add reverse tunneling, if specified if (pRevTunneling != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPProfileRequest_ReverseTunneling ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_ReverseTunneling * pTLVx14; pTLVx14 = (sWDSSetMIPProfileRequest_ReverseTunneling*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReverseTunneling = (*pRevTunneling == 0 ? 0 : 1); offset += tlvx14Sz; } // Add NAI, if specified if (pNAI != 0) { std::string nai( pNAI ); // Check size WORD tlvx15Sz = (WORD)nai.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), nai.c_str(), nai.size() ); offset += tlvx15Sz; } // Add HA SPI, if specified if (pHASPI != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPProfileRequest_HASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequest_HASPI * pTLVx16; pTLVx16 = (sWDSSetMIPProfileRequest_HASPI*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mHASPI = *pHASPI; offset += tlvx16Sz; } // Add AAA SPI, if specified if (pAAASPI != 0) { // Check size WORD tlvx17Sz = sizeof( sWDSSetMIPProfileRequeste_AAASPI ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx17Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x17; pHeader->mLength = tlvx17Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPProfileRequeste_AAASPI * pTLVx17; pTLVx17 = (sWDSSetMIPProfileRequeste_AAASPI*)(pOut + offset); memset( pTLVx17, 0, tlvx17Sz ); // Set the value pTLVx17->mAAASPI = *pAAASPI; offset += tlvx17Sz; } // Add MN-HA key, if specified if (pMNHA != 0) { std::string mnha( pMNHA ); // Check size WORD tlvx18Sz = (WORD)mnha.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx18Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x18; pHeader->mLength = tlvx18Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnha.c_str(), mnha.size() ); offset += tlvx18Sz; } // Add MN-AAA key, if specified if (pMNHA != 0) { std::string mnaaa( pMNAAA ); // Check size WORD tlvx19Sz = (WORD)mnaaa.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx19Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x19; pHeader->mLength = tlvx19Sz; offset += sizeof( sQMIRawContentHeader ); // Set the value memcpy( (pOut + offset), mnaaa.c_str(), mnaaa.size() ); offset += tlvx19Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer index [ I ] - Mobile IP profile ID RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetMobileIPProfile( ULONG * pOutLen, BYTE * pOut, BYTE index ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSGetMIPProfileRequest_Index ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSGetMIPProfileRequest_Index * pTLVx01; pTLVx01 = (sWDSGetMIPProfileRequest_Index*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mProfileIndex = index; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPProfile DESCRIPTION: This function gets the specified mobile IP profile settings PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pEnabled [ O ] - Mobile IP profile enabled? pAddress [ O ] - Home IPv4 address pPrimaryHA [ O ] - Primary home agent IPv4 address pSecondaryHA [ O ] - Secondary home agent IPv4 address pRevTunneling [ O ] - Reverse tunneling enabled? naiSize [ I ] - The maximum number of characters (including NULL terminator) that the NAI array can contain pNAI [ O ] - Network access identifier string pHASPI [ O ] - HA security parameter index pAAASPI [ O ] - AAA security parameter index pHAState [ O ] - HA key state pAAAState [ O ] - AAA key state RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPProfile( ULONG inLen, const BYTE * pIn, BYTE * pEnabled, ULONG * pAddress, ULONG * pPrimaryHA, ULONG * pSecondaryHA, BYTE * pRevTunneling, BYTE naiSize, CHAR * pNAI, ULONG * pHASPI, ULONG * pAAASPI, ULONG * pHAState, ULONG * pAAAState ) { // Validate arguments if (pIn == 0 || pEnabled == 0 || pAddress == 0 || pPrimaryHA == 0 || pSecondaryHA == 0 || pRevTunneling == 0 || naiSize == 0 || pNAI == 0 || pHASPI == 0 || pAAASPI == 0 || pHAState == 0 || pAAAState == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume errors *pEnabled = 0xff; *pAddress = 0xffffffff; *pPrimaryHA = 0xffffffff; *pSecondaryHA = 0xffffffff; *pRevTunneling = 0xff; *pHASPI = 0xffffffff; *pAAASPI = 0xffffffff; *pHAState = 0xffffffff; *pAAAState = 0xffffffff; // Find the State const sWDSGetMIPProfileResponse_State * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_State )) { return eGOBI_ERR_MALFORMED_RSP; } *pEnabled = pTLVx10->mEnabled; } // Find the Home Address const sWDSGetMIPProfileResponse_HomeAddress * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPProfileResponse_HomeAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pAddress = (ip0 | ip1 | ip2 | ip3); } // Find the Primary Home Agent Address const sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx12->mIPV4Address[0]; ULONG ip1 = pTLVx12->mIPV4Address[1] << 8; ULONG ip2 = pTLVx12->mIPV4Address[2] << 16; ULONG ip3 = pTLVx12->mIPV4Address[3] << 24; *pPrimaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary Home Agent Address const sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx13->mIPV4Address[0]; ULONG ip1 = pTLVx13->mIPV4Address[1] << 8; ULONG ip2 = pTLVx13->mIPV4Address[2] << 16; ULONG ip3 = pTLVx13->mIPV4Address[3] << 24; *pSecondaryHA = (ip0 | ip1 | ip2 | ip3); } // Find the Reverse tunneling, if enabled const sWDSGetMIPProfileResponse_ReverseTunneling * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPProfileResponse_ReverseTunneling )) { return eGOBI_ERR_MALFORMED_RSP; } *pRevTunneling = pTLVx14->mReverseTunneling; } // Find the NAI, if enabled const sWDSGetMIPProfileResponse_NAI * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (naiSize < outLenx15 + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pNAI, (const BYTE *)pTLVx15, outLenx15 ); // Null terminate pNAI[outLenx15] = 0; } // Find the HA SPI const sWDSGetMIPProfileResponse_HASPI * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPProfileResponse_HASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pHASPI = pTLVx16->mHASPI; } // Find the AAA SPI const sWDSGetMIPProfileResponse_AAASPI * pTLVx17; ULONG outLenx17; rc = GetTLV( inLen, pIn, 0x17, &outLenx17, (const BYTE **)&pTLVx17 ); if (rc == eGOBI_ERR_NONE) { if (outLenx17 < sizeof( sWDSGetMIPProfileResponse_AAASPI )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAASPI = pTLVx17->mAAASPI; } // Find the HA state const sWDSGetMIPProfileResponse_HAState * pTLVx1A; ULONG outLenx1A; rc = GetTLV( inLen, pIn, 0x1A, &outLenx1A, (const BYTE **)&pTLVx1A ); if (rc == eGOBI_ERR_NONE) { if (outLenx1A < sizeof( sWDSGetMIPProfileResponse_HAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAState = pTLVx1A->mKeyState; } // Find the AAA state const sWDSGetMIPProfileResponse_AAAState * pTLVx1B; ULONG outLenx1B; rc = GetTLV( inLen, pIn, 0x1B, &outLenx1B, (const BYTE **)&pTLVx1B ); if (rc == eGOBI_ERR_NONE) { if (outLenx1B < sizeof( sWDSGetMIPProfileResponse_AAAState )) { return eGOBI_ERR_MALFORMED_RSP; } *pAAAState = pTLVx1B->mKeyState; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetMobileIPParameters DESCRIPTION: This function sets the specified mobile IP parameters PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSPC [ I ] - Six digit service programming code pMode [ I ] - (Optional) Desired mobile IP setting pRetryLimit [ I ] - (Optional) Retry attempt limit pRetryInterval [ I ] - (Optional) Retry attempt interval pReRegPeriod [ I ] - (Optional) Re-registration period pReRegTraffic [ I ] - (Optional) Re-registration only with traffic? pHAAuthenticator [ I ] - (Optional) MH-HA authenticator calculator? pHA2002bis [ I ] - (Optional) MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetMobileIPParameters( ULONG * pOutLen, BYTE * pOut, CHAR * pSPC, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pOut == 0 || pSPC == 0 || pSPC[0] == 0) { return eGOBI_ERR_INVALID_ARG; } std::string spc( pSPC ); if (spc.size() > 6) { return eGOBI_ERR_INVALID_ARG; } if (spc.find_first_not_of( "0123456789" ) != std::string::npos ) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWDSSetMIPParametersRequest_SPC ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)pOut; pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_SPC * pTLVx01; pTLVx01 = (sWDSSetMIPParametersRequest_SPC*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values memcpy( &pTLVx01->mSPC[0], spc.c_str(), spc.size() ); offset += tlvx01Sz; // Add Mode, if specified if (pMode != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetMIPParametersRequest_MobileIPMode ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MobileIPMode * pTLVx10; pTLVx10 = (sWDSSetMIPParametersRequest_MobileIPMode*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the value pTLVx10->mMIPMode = (eQMIMobileIPModes)*pMode; offset += tlvx10Sz; } // Add Retry Limit, if specified if (pRetryLimit != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptLimit ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptLimit * pTLVx11; pTLVx11 = (sWDSSetMIPParametersRequest_RetryAttemptLimit*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the value pTLVx11->mRetryAttemptLimit = *pRetryLimit; offset += tlvx11Sz; } // Add Retry interval, if specified if (pRetryInterval != 0) { // Check size WORD tlvx12Sz = sizeof( sWDSSetMIPParametersRequest_RetryAttemptInterval ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx12Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x12; pHeader->mLength = tlvx12Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_RetryAttemptInterval * pTLVx12; pTLVx12 = (sWDSSetMIPParametersRequest_RetryAttemptInterval*)(pOut + offset); memset( pTLVx12, 0, tlvx12Sz ); // Set the value pTLVx12->mRetryAttemptInterval = *pRetryInterval; offset += tlvx12Sz; } // Add Re-registration period, if specified if (pReRegPeriod != 0) { // Check size WORD tlvx13Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationPeriod ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx13Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x13; pHeader->mLength = tlvx13Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationPeriod * pTLVx13; pTLVx13 = (sWDSSetMIPParametersRequest_ReRegistrationPeriod*)(pOut + offset); memset( pTLVx13, 0, tlvx13Sz ); // Set the value pTLVx13->mReRegistrationPeriod = *pReRegPeriod; offset += tlvx13Sz; } // Add Re-registration on traffic flag, if specified if (pReRegTraffic != 0) { // Check size WORD tlvx14Sz = sizeof( sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx14Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x14; pHeader->mLength = tlvx14Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic * pTLVx14; pTLVx14 = (sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic*)(pOut + offset); memset( pTLVx14, 0, tlvx14Sz ); // Set the value pTLVx14->mReRegistrationOnlyWithTraffic = (*pReRegTraffic == 0 ? 0 : 1); offset += tlvx14Sz; } // Add HA authenticator flag, if specified if (pHAAuthenticator != 0) { // Check size WORD tlvx15Sz = sizeof( sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx15Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x15; pHeader->mLength = tlvx15Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator * pTLVx15; pTLVx15 = (sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator*)(pOut + offset); memset( pTLVx15, 0, tlvx15Sz ); // Set the value pTLVx15->mMNHAAuthenticatorCalculator = (*pHAAuthenticator == 0 ? 0 : 1); offset += tlvx15Sz; } // Add HA RFC2002bis authentication flag, if specified if (pHA2002bis != 0) { // Check size WORD tlvx16Sz = sizeof( sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx16Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x16; pHeader->mLength = tlvx16Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication * pTLVx16; pTLVx16 = (sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication*)(pOut + offset); memset( pTLVx16, 0, tlvx16Sz ); // Set the value pTLVx16->mMNHARFC2002BISAuthentication = (*pHA2002bis == 0 ? 0 : 1); offset += tlvx16Sz; } // At least one of the optional parameters must have been set if (offset <= sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_INVALID_ARG; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetMobileIPParameters DESCRIPTION: This function gets the mobile IP parameters PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMode [ O ] - Current mobile IP setting pRetryLimit [ O ] - Retry attempt limit pRetryInterval [ O ] - Retry attempt interval pReRegPeriod [ O ] - Re-registration period pReRegTraffic [ O ] - Re-registration only with traffic? pHAAuthenticator [ O ] - MH-HA authenticator calculator? pHA2002bis [ O ] - MH-HA RFC 2002bis authentication? RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetMobileIPParameters( ULONG inLen, const BYTE * pIn, ULONG * pMode, BYTE * pRetryLimit, BYTE * pRetryInterval, BYTE * pReRegPeriod, BYTE * pReRegTraffic, BYTE * pHAAuthenticator, BYTE * pHA2002bis ) { // Validate arguments if (pIn == 0 || pMode == 0 || pRetryLimit == 0 || pRetryInterval == 0 || pReRegPeriod == 0 || pReRegTraffic == 0 || pHAAuthenticator == 0 || pHA2002bis == 0) { return eGOBI_ERR_INVALID_ARG; } *pMode = 0xffffffff; *pRetryLimit = 0xff; *pRetryInterval = 0xff; *pReRegPeriod = 0xff; *pReRegTraffic = 0xff; *pHAAuthenticator = 0xff; *pHA2002bis = 0xff; // Find the mode const sWDSGetMIPParametersResponse_MobileIPMode * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetMIPParametersResponse_MobileIPMode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMode = pTLVx10->mMIPMode; } // Find the Retry limit const sWDSGetMIPParametersResponse_RetryAttemptLimit * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptLimit )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryLimit = pTLVx11->mRetryAttemptLimit; } // Find the Retry Interval const sWDSGetMIPParametersResponse_RetryAttemptInterval * pTLVx12; ULONG outLenx12; rc = GetTLV( inLen, pIn, 0x12, &outLenx12, (const BYTE **)&pTLVx12 ); if (rc == eGOBI_ERR_NONE) { if (outLenx12 < sizeof( sWDSGetMIPParametersResponse_RetryAttemptInterval )) { return eGOBI_ERR_MALFORMED_RSP; } *pRetryInterval = pTLVx12->mRetryAttemptInterval; } // Find the Re-registration period const sWDSGetMIPParametersResponse_ReRegistrationPeriod * pTLVx13; ULONG outLenx13; rc = GetTLV( inLen, pIn, 0x13, &outLenx13, (const BYTE **)&pTLVx13 ); if (rc == eGOBI_ERR_NONE) { if (outLenx13 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationPeriod )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegPeriod = pTLVx13->mReRegistrationPeriod; } // Find the Re-register on traffic flag const sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic * pTLVx14; ULONG outLenx14; rc = GetTLV( inLen, pIn, 0x14, &outLenx14, (const BYTE **)&pTLVx14 ); if (rc == eGOBI_ERR_NONE) { if (outLenx14 < sizeof( sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic )) { return eGOBI_ERR_MALFORMED_RSP; } *pReRegTraffic = pTLVx14->mReRegistrationOnlyWithTraffic; } // Find the HA authenticator const sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator * pTLVx15; ULONG outLenx15; rc = GetTLV( inLen, pIn, 0x15, &outLenx15, (const BYTE **)&pTLVx15 ); if (rc == eGOBI_ERR_NONE) { if (outLenx15 < sizeof( sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator )) { return eGOBI_ERR_MALFORMED_RSP; } *pHAAuthenticator = pTLVx15->mMNHAAuthenticatorCalculator; } // Find the HA RFC2002bis authentication flag const sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication * pTLVx16; ULONG outLenx16; rc = GetTLV( inLen, pIn, 0x16, &outLenx16, (const BYTE **)&pTLVx16 ); if (rc == eGOBI_ERR_NONE) { if (outLenx16 < sizeof( sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication )) { return eGOBI_ERR_MALFORMED_RSP; } *pHA2002bis = pTLVx16->mMNHARFC2002BISAuthentication; } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetLastMobileIPError DESCRIPTION: This function gets the last mobile IP error PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pError [ O ] - Last mobile IP error RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetLastMobileIPError( ULONG inLen, const BYTE * pIn, ULONG * pError ) { // Validate arguments if (pIn == 0 || pError == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetLastMIPStatusResponse_Status * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetLastMIPStatusResponse_Status )) { return eGOBI_ERR_MALFORMED_RSP; } *pError = pTLVx01->mLastMIPStatus; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSetDNSSettings DESCRIPTION: This function sets the DNS settings for the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pPrimaryDNS [ I ] - (Optional) Primary DNS IPv4 address pSecondaryDNS [ I ] - (Optional) Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetDNSSettings( ULONG * pOutLen, BYTE * pOut, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments // At least one must be specified if (pOut == 0 || (pPrimaryDNS == 0 && pSecondaryDNS == 0)) { return eGOBI_ERR_INVALID_ARG; } sQMIRawContentHeader * pHeader; ULONG offset = 0; // Add Primary DNS, if specified if (pPrimaryDNS != 0) { // Check size WORD tlvx10Sz = sizeof( sWDSSetDNSSettingRequest_PrimaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_PrimaryDNS * pTLVx10; pTLVx10 = (sWDSSetDNSSettingRequest_PrimaryDNS*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); ULONG ip0 = (*pPrimaryDNS & 0x000000FF); ULONG ip1 = (*pPrimaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pPrimaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pPrimaryDNS & 0xFF000000) >> 24; // Set the value pTLVx10->mIPV4Address[0] = (INT8)ip0; pTLVx10->mIPV4Address[1] = (INT8)ip1; pTLVx10->mIPV4Address[2] = (INT8)ip2; pTLVx10->mIPV4Address[3] = (INT8)ip3; offset += tlvx10Sz; } // Add Secondary DNS, if specified if (pSecondaryDNS != 0) { // Check size WORD tlvx11Sz = sizeof( sWDSSetDNSSettingRequest_SecondaryDNS ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); sWDSSetDNSSettingRequest_SecondaryDNS * pTLVx11; pTLVx11 = (sWDSSetDNSSettingRequest_SecondaryDNS*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); ULONG ip0 = (*pSecondaryDNS & 0x000000FF); ULONG ip1 = (*pSecondaryDNS & 0x0000FF00) >> 8; ULONG ip2 = (*pSecondaryDNS & 0x00FF0000) >> 16; ULONG ip3 = (*pSecondaryDNS & 0xFF000000) >> 24; // Set the value pTLVx11->mIPV4Address[0] = (INT8)ip0; pTLVx11->mIPV4Address[1] = (INT8)ip1; pTLVx11->mIPV4Address[2] = (INT8)ip2; pTLVx11->mIPV4Address[3] = (INT8)ip3; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDNSSettings DESCRIPTION: This function gets the DNS settings for the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pPrimaryDNS [ O ] - Primary DNS IPv4 address pSecondaryDNS [ O ] - Secondary DNS IPv4 address RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDNSSettings( ULONG inLen, const BYTE * pIn, ULONG * pPrimaryDNS, ULONG * pSecondaryDNS ) { // Validate arguments if (pIn == 0 || pPrimaryDNS == 0 || pSecondaryDNS == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the Primary DNS const sWDSGetDNSSettingResponse_PrimaryDNS * pTLVx10; ULONG outLenx10; ULONG rc = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWDSGetDNSSettingResponse_PrimaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx10->mIPV4Address[0]; ULONG ip1 = pTLVx10->mIPV4Address[1] << 8; ULONG ip2 = pTLVx10->mIPV4Address[2] << 16; ULONG ip3 = pTLVx10->mIPV4Address[3] << 24; *pPrimaryDNS = (ip0 | ip1 | ip2 | ip3); } // Find the Secondary DNS const sWDSGetDNSSettingResponse_SecondaryDNS * pTLVx11; ULONG outLenx11; rc = GetTLV( inLen, pIn, 0x11, &outLenx11, (const BYTE **)&pTLVx11 ); if (rc == eGOBI_ERR_NONE) { if (outLenx11 < sizeof( sWDSGetDNSSettingResponse_SecondaryDNS )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG ip0 = pTLVx11->mIPV4Address[0]; ULONG ip1 = pTLVx11->mIPV4Address[1] << 8; ULONG ip2 = pTLVx11->mIPV4Address[2] << 16; ULONG ip3 = pTLVx11->mIPV4Address[3] << 24; *pSecondaryDNS = (ip0 | ip1 | ip2 | ip3); } return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetDataBearerTechnology DESCRIPTION: This function retrieves the current data bearer technology (only valid when connected) PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pDataCaps [ O ] - The data bearer technology RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetDataBearerTechnology( ULONG inLen, const BYTE * pIn, ULONG * pDataBearer ) { // Validate arguments if (pIn == 0 || pDataBearer == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the TLV const sWDSGetDataBearerTechnologyResponse_Technology * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } // Is the TLV large enough? if (outLenx01 < sizeof( sWDSGetDataBearerTechnologyResponse_Technology )) { return eGOBI_ERR_MALFORMED_RSP; } *pDataBearer = pTLVx01->mDataBearerTechnology; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/Gobi3000Translation/Gobi3000TranslationWMS.cpp000077500000000000000000000776661455567757300304240ustar00rootroot00000000000000/*=========================================================================== FILE: Gobi3000TranslationWMS.cpp DESCRIPTION: QUALCOMM Translation for Gobi 3000 (WMS Service) Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "Gobi3000Translation.h" /*=========================================================================== METHOD: PackDeleteSMS DESCRIPTION: This function deletes one or more SMS messages from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pMessageIndex [ I ] - (Optional) message index pMessageTag [ I ] - (Optional) message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackDeleteSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pMessageIndex, ULONG * pMessageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSDeleteRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSDeleteRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message index, if specified if (pMessageIndex != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSDeleteRequest_MessageIndex ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageIndex * pTLVx10; pTLVx10 = (sWMSDeleteRequest_MessageIndex*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mStorageIndex = *pMessageIndex; offset += tlvx10Sz; } // Add the Message tag, if specified if (pMessageTag != 0) { // Check size WORD tlvx11Sz = sizeof( sWMSDeleteRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx11Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x11; pHeader->mLength = tlvx11Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSDeleteRequest_MessageTag * pTLVx11; pTLVx11 = (sWMSDeleteRequest_MessageTag*)(pOut + offset); memset( pTLVx11, 0, tlvx11Sz ); // Set the values pTLVx11->mMessageTag = (eQMIWMSMessageTags)*pMessageTag; offset += tlvx11Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type pRequestedTag [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMSList( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG * pRequestedTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSListMessagesRequest_MemoryStorage ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The storage type sWMSListMessagesRequest_MemoryStorage * pTLVx01; pTLVx01 = (sWMSListMessagesRequest_MemoryStorage*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; offset += tlvx01Sz; // Add the Message tag, if specified if (pRequestedTag != 0) { // Check size WORD tlvx10Sz = sizeof( sWMSListMessagesRequest_MessageTag ); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } pHeader = (sQMIRawContentHeader*)(pOut + offset); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; offset += sizeof( sQMIRawContentHeader ); // The SPC sWMSListMessagesRequest_MessageTag * pTLVx10; pTLVx10 = (sWMSListMessagesRequest_MessageTag*)(pOut + offset); memset( pTLVx10, 0, tlvx10Sz ); // Set the values pTLVx10->mMessageTag = (eQMIWMSMessageTags)*pRequestedTag; offset += tlvx10Sz; } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSList DESCRIPTION: This function returns the list of SMS messages stored on the device PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageListSize [I/O] - Upon input the maximum number of elements that the message list array can contain. Upon successful output the actual number of elements in the message list array pMessageList [ O ] - The message list array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSList( ULONG inLen, const BYTE * pIn, ULONG * pMessageListSize, BYTE * pMessageList ) { // Validate arguments if (pIn == 0 || pMessageListSize == 0 || *pMessageListSize == 0 || pMessageList == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageListSz = *pMessageListSize; // Assume failure *pMessageListSize = 0; // Find the messages const sWMSListMessagesResponse_MessageList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG messageListSz = pTLVx01->mNumberOfMessages; if (messageListSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (maxMessageListSz < messageListSz) { messageListSz = maxMessageListSz; } const sWMSListMessagesResponse_MessageList::sMessage * pMessages; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSListMessagesResponse_MessageList ) + sizeof( sWMSListMessagesResponse_MessageList::sMessage ) * messageListSz) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pMessages = (const sWMSListMessagesResponse_MessageList::sMessage *) ((const BYTE *)pTLVx01 + sizeof( sWMSListMessagesResponse_MessageList )); ULONG * pData = (ULONG *)pMessageList; for (ULONG m = 0; m < messageListSz; m++) { *pData++ = pMessages->mStorageIndex; *pData++ = pMessages->mMessageTag; pMessages++; } *pMessageListSize = messageListSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackGetSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawReadRequest_MessageIndex ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawReadRequest_MessageIndex * pTLVx01; pTLVx01 = (sWMSRawReadRequest_MessageIndex*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMS DESCRIPTION: This function returns an SMS message from device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageTag [ O ] - Message tag pMessageFormat [ O ] - Message format pMessageSize [I/O] - Upon input the maximum number of bytes that can be written to the message array. Upon successful output the actual number of bytes written to the message array pMessage [ O ] - The message contents array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageTag, ULONG * pMessageFormat, ULONG * pMessageSize, BYTE * pMessage ) { // Validate arguments if (pIn == 0 || pMessageTag == 0 || pMessageFormat == 0 || pMessageSize == 0 || *pMessageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } ULONG maxMessageSz = *pMessageSize; // Assume failure *pMessageSize = 0; // Find the messages const sWMSRawReadResponse_MessageData * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageTag = pTLVx01->mMessageTag; *pMessageFormat = pTLVx01->mMessageFormat; ULONG messageSz = pTLVx01->mRawMessageLength; if (messageSz == 0) { // No stored messages, but not necessarily a failure return eGOBI_ERR_NONE; } if (messageSz > maxMessageSz) { messageSz = maxMessageSz; } // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSRawReadResponse_MessageData ) + messageSz) { return eGOBI_ERR_MALFORMED_RSP; } memcpy( pMessage, pTLVx01 + sizeof( sWMSRawReadResponse_MessageData ), messageSz ); *pMessageSize = messageSz; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackModifySMSStatus DESCRIPTION: This function modifies the status of an SMS message saved in storage on the device PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageIndex [ I ] - Message index messageTag [ I ] - Message tag RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackModifySMSStatus( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageIndex, ULONG messageTag ) { // Validate arguments if (pOut == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSModifyTagRequest_MessageTag ); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSModifyTagRequest_MessageTag * pTLVx01; pTLVx01 = (sWMSModifyTagRequest_MessageTag*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mStorageIndex = messageIndex; pTLVx01->mMessageTag = (eQMIWMSMessageTags)messageTag; offset += tlvx01Sz; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer storageType [ I ] - SMS message storage type messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSaveSMS( ULONG * pOutLen, BYTE * pOut, ULONG storageType, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawWriteRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawWriteRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawWriteRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mStorageType = (eQMIWMSStorageTypes)storageType; pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawWriteRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSaveSMS DESCRIPTION: This function saves an SMS message to device memory PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageIndex [ O ] - The message index assigned by the device RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSaveSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageIndex ) { // Validate arguments if (pIn == 0 || pMessageIndex == 0) { return eGOBI_ERR_INVALID_ARG; } // Find the messages const sWMSRawWriteResponse_MessageIndex * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawWriteResponse_MessageIndex )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageIndex = pTLVx01->mStorageIndex; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: PackSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer messageFormat [ I ] - Message format messageSize [ I ] - The length of the message contents in bytes pMessage [ I ] - The message contents RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSendSMS( ULONG * pOutLen, BYTE * pOut, ULONG messageFormat, ULONG messageSize, BYTE * pMessage ) { // Validate arguments if (pOut == 0 || messageSize == 0 || pMessage == 0) { return eGOBI_ERR_INVALID_ARG; } // Check size WORD tlvx01Sz = sizeof( sWMSRawSendRequest_MessageData ) + (WORD)messageSize; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // The index sWMSRawSendRequest_MessageData * pTLVx01; pTLVx01 = (sWMSRawSendRequest_MessageData*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mMessageFormat = (eQMIWMSMessageFormats)messageFormat; pTLVx01->mRawMessageLength = (UINT16)messageSize; offset += sizeof( sWMSRawSendRequest_MessageData ); // Add the message memcpy( (pOut + offset), pMessage, messageSize ); offset += messageSize; *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseSendSMS DESCRIPTION: This function sends an SMS message for immediate over the air transmission PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pMessageFailureCode [ O ] - When the function fails due to an error sending the message this parameter may contain the message failure cause code (see 3GPP2 N.S0005 Section 6.5.2.125). If the cause code is not provided then the value will be 0xFFFFFFFF RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseSendSMS( ULONG inLen, const BYTE * pIn, ULONG * pMessageFailureCode ) { // Validate arguments if (pIn == 0 || pMessageFailureCode == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume we have no message failure cause code *pMessageFailureCode = 0xffffffff; // Check mandatory response const sResultCode * pTLVx02; ULONG outLenx02; ULONG rc = GetTLV( inLen, pIn, 0x02, &outLenx02, (const BYTE **)&pTLVx02 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx02 < sizeof( sResultCode )) { return eGOBI_ERR_MALFORMED_RSP; } if (pTLVx02->mQMIResult != eQMIResults_Success) { rc = pTLVx02->mQMIError + eGOBI_ERR_QMI_OFFSET; } if (rc != eGOBI_ERR_NONE) { // Check for the failure code (optional) const sWMSRawSendResponse_CauseCode * pTLVx10; ULONG outLenx10; ULONG rc2 = GetTLV( inLen, pIn, 0x10, &outLenx10, (const BYTE **)&pTLVx10 ); if (rc2 == eGOBI_ERR_NONE) { if (outLenx10 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } *pMessageFailureCode = pTLVx10->mCauseCode; } } return rc; } /*=========================================================================== METHOD: ParseGetSMSCAddress DESCRIPTION: This function returns the SMS center address PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer addressSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address array can contain pSMSCAddress [ O ] - The SMS center address represented as a NULL terminated string typeSize [ I ] - The maximum number of characters (including NULL terminator) that the SMS center address type array can contain pSMSCType [ O ] - The SMS center address type represented as a NULL terminated string RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSCAddress( ULONG inLen, const BYTE * pIn, BYTE addressSize, CHAR * pSMSCAddress, BYTE typeSize, CHAR * pSMSCType ) { // Validate arguments if (pIn == 0 || addressSize == 0 || pSMSCAddress == 0 || typeSize == 0 || pSMSCType == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume empty pSMSCAddress[0] = 0; pSMSCType[0] = 0; // Get the address (mandatory) const sWMSGetSMSCAddressResponse_Address * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSRawSendResponse_CauseCode )) { return eGOBI_ERR_MALFORMED_RSP; } // Handle the type as a string (maximum 3 chars) std::string smscType( &pTLVx01->mSMSCAddressType[0], 3 ); // Is the SMSC type present? (optional) ULONG smscTypeLen = (ULONG)smscType.size(); if (smscTypeLen > 0) { // Space to perform copy? if (typeSize < smscTypeLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCType, &pTLVx01->mSMSCAddressType[0], smscTypeLen ); pSMSCType[smscTypeLen] = 0; } // Treat the address as a null terminated string std::string smscAddr( (const CHAR *)pTLVx01 + sizeof( sWMSGetSMSCAddressResponse_Address ), pTLVx01->mSMSCAddressLength ); ULONG smscAddrLen = (ULONG)smscAddr.size(); if (addressSize < smscAddrLen + 1) { return eGOBI_ERR_BUFFER_SZ; } memcpy( pSMSCAddress, smscAddr.c_str(), addressSize ); pSMSCAddress[addressSize] = 0; return rc; } /*=========================================================================== METHOD: PackSetSMSCAddress DESCRIPTION: This function sets the SMS center address PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pSMSCAddress [ I ] - The SMS center address represented as a NULL terminated string pSMSCType [ I ] - The SMS center address type represented as a NULL terminated string (optional) RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSCAddress( ULONG * pOutLen, BYTE * pOut, CHAR * pSMSCAddress, CHAR * pSMSCType ) { // Validate arguments if (pOut == 0 || pSMSCAddress == 0) { return eGOBI_ERR_INVALID_ARG; } // The TLV contains only the address std::string smscAddr( pSMSCAddress ); // Check size WORD tlvx01Sz = (WORD)smscAddr.size(); if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscAddr.c_str(), tlvx01Sz ); offset += tlvx01Sz; // smscType is optional if (pSMSCType != 0) { // The TLV contains only the type std::string smscType( pSMSCType ); if (smscType.size() != 0) { // Check size WORD tlvx10Sz = (WORD)smscType.size(); if (*pOutLen < offset + sizeof( sQMIRawContentHeader ) + tlvx10Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x10; pHeader->mLength = tlvx10Sz; ULONG offset = sizeof( sQMIRawContentHeader ); memcpy( (pOut + offset), smscType.c_str(), tlvx10Sz ); offset += tlvx10Sz; } } *pOutLen = offset; return eGOBI_ERR_NONE; } /*=========================================================================== METHOD: ParseGetSMSRoutes DESCRIPTION: This function gets the current incoming SMS routing information PARAMETERS: inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pRouteSize [I/O] - Upon input the maximum number of elements that the SMS route array can contain. Upon succes the actual number of elements in the SMS route array pRoutes [ O ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG ParseGetSMSRoutes( ULONG inLen, const BYTE * pIn, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pIn == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } // Assume failure BYTE maxRoutes = *pRouteSize; *pRouteSize = 0; // Get the route list const sWMSGetRoutesResponse_RouteList * pTLVx01; ULONG outLenx01; ULONG rc = GetTLV( inLen, pIn, 0x01, &outLenx01, (const BYTE **)&pTLVx01 ); if (rc != eGOBI_ERR_NONE) { return rc; } if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList )) { return eGOBI_ERR_MALFORMED_RSP; } ULONG routeCount = pTLVx01->mNumberOfRoutes; if (routeCount > (ULONG)maxRoutes) { routeCount = (ULONG)maxRoutes; } const sWMSGetRoutesResponse_RouteList::sRoute * pInRoute; // Verify there is room for the array in the TLV if (outLenx01 < sizeof( sWMSGetRoutesResponse_RouteList ) + sizeof( sWMSGetRoutesResponse_RouteList::sRoute ) * routeCount) { return eGOBI_ERR_MALFORMED_RSP; } // Align to the first array element pInRoute = (const sWMSGetRoutesResponse_RouteList::sRoute *) ((const BYTE *)pTLVx01 + sizeof( sWMSGetRoutesResponse_RouteList )); ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { *pRouteArray++ = pInRoute->mMessageType; *pRouteArray++ = pInRoute->mMessageClass; *pRouteArray++ = pInRoute->mStorageType; *pRouteArray++ = pInRoute->mRouteValue; pInRoute++; } *pRouteSize = (BYTE)routeCount; return rc; } /*=========================================================================== METHOD: PackSetSMSRoutes DESCRIPTION: This function sets the desired incoming SMS routing information PARAMETERS: pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer pRouteSize [ I ] - The number of elements in the SMS route array pRoutes [ I ] - The SMS route array RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PackSetSMSRoutes( ULONG * pOutLen, BYTE * pOut, BYTE * pRouteSize, BYTE * pRoutes ) { // Validate arguments if (pOut == 0 || pRouteSize == 0 || *pRouteSize == 0 || pRoutes == 0) { return eGOBI_ERR_INVALID_ARG; } UINT16 routeCount = (ULONG)*pRouteSize; // Check size WORD tlvx01Sz = sizeof( sWMSSetRoutesRequest_RouteList ) + sizeof( sWMSSetRoutesRequest_RouteList::sRoute ) * routeCount; if (*pOutLen < sizeof( sQMIRawContentHeader ) + tlvx01Sz) { return eGOBI_ERR_BUFFER_SZ; } sQMIRawContentHeader * pHeader = (sQMIRawContentHeader*)(pOut); pHeader->mTypeID = 0x01; pHeader->mLength = tlvx01Sz; ULONG offset = sizeof( sQMIRawContentHeader ); // Add route count sWMSSetRoutesRequest_RouteList * pTLVx01; pTLVx01 = (sWMSSetRoutesRequest_RouteList*)(pOut + offset); memset( pTLVx01, 0, tlvx01Sz ); // Set the values pTLVx01->mNumberOfRoutes = routeCount; offset += sizeof( sWMSSetRoutesRequest_RouteList ); sWMSSetRoutesRequest_RouteList::sRoute * pOutRoute; // Align to the first array element pOutRoute = (sWMSSetRoutesRequest_RouteList::sRoute *)(pOut + offset); // Add the routes ULONG * pRouteArray = (ULONG *)pRoutes; for (ULONG r = 0; r < routeCount; r++) { pOutRoute->mMessageType = (eQMIWMSMessageTypes)*pRouteArray++; pOutRoute->mMessageClass = (eQMIWMSMessageClasses)*pRouteArray++; pOutRoute->mStorageType = (eQMIWMSStorageTypes)*pRouteArray++; pOutRoute->mReceiptAction = (eQMIWMSReceiptActions)*pRouteArray++; pOutRoute++; offset += sizeof( sWMSSetRoutesRequest_RouteList::sRoute ); } *pOutLen = offset; return eGOBI_ERR_NONE; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiConnectionMgmt/000077500000000000000000000000001455567757300240215ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiConnectionMgmt/GobiConnectionMgmt.cpp000077500000000000000000000377501455567757300302710ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.cpp DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Global object CGobiConnectionMgmtDLL gDLL; // Interval between traffic processing loop iterations (milliseconds) const ULONG TRAFFIC_INTERVAL_MS = 300000; // Maximum amount of time to wait for the traffic thread to exit const ULONG THREAD_EXIT_TIME = 2000; /*=========================================================================== METHOD: TrafficProcessThread (Free Method) DESCRIPTION: QMI traffic process thread - processes all traffic in order to fire off QMI traffic related callbacks PARAMETERS: pArg [ I ] - Object to interface to RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * TrafficProcessThread( PVOID pArg ) { // Keep running? bool bRun = false; // Create a vector of the objects to wait on std::vector events; // Store the index to service type for use later std::map services; // Grab API object cGobiConnectionMgmt * pAPI = (cGobiConnectionMgmt *)pArg; if (pAPI != 0) { // Time to go to work bRun = true; // Add the thread exit event events.push_back( &pAPI->mExitEvent ); // Grab signal events for our protocol servers std::map ::const_iterator pIter; pIter = pAPI->mServers.begin(); while (pIter != pAPI->mServers.end()) { eQMIService svc = pIter->first; cQMIProtocolServer * pServer = pAPI->GetServer( svc ); if (pServer != 0) { // Grab the log from the server const cProtocolLog & log = pServer->GetLog(); // Grab the Signal event, if it exists cEvent & sigEvent = log.GetSignalEvent(); services[events.size()] = svc; events.push_back( &sigEvent ); } pIter++; } } TRACE( "GobiConnectionMgmt traffic thread [%u] started\n", (UINT)pthread_self() ); // Loop waiting for exit event while (bRun == true) { // Wait for activity DWORD ignoredVal, index; int nRet = WaitOnMultipleEvents( events, TRAFFIC_INTERVAL_MS, ignoredVal, index ); // Timeout if (nRet == -ETIME) { // Do nothing } // Error? else if (nRet <= 0) { TRACE( "GobiConnectionMgmt traffic thread wait error %d\n", nRet ); bRun = false; } // Exit event? else if (index == 0) { bRun = false; } else if (index < events.size()) { // Run ProcessTraffic() for this service type if (services.find( index ) != services.end()) { pAPI->ProcessTraffic( services[index] ); } } else { // Fatal error bRun = false; } } TRACE( "GobiConnectionMgmt traffic thread [%u] exited\n", (UINT)pthread_self() ); if (pAPI != 0) { pAPI->mThreadCleanupFinished = true; } return 0; } /*=========================================================================== METHOD: CallbackThread (Free Method) DESCRIPTION: Thread to execute a callback asynchronously PARAMETERS: pArg [ I ] - The cGobiCMCallback object RETURN VALUE: void * - thread exit value (always 0) ===========================================================================*/ void * CallbackThread( PVOID pArg ) { cGobiCMCallback * pCB = (cGobiCMCallback *)pArg; if (pCB == 0) { ASSERT( 0 ); return 0; } pCB->Call(); delete pCB; pCB = 0; return 0; } /*=========================================================================*/ // CGobiConnectionMgmtDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::CGobiConnectionMgmtDLL() { // Create sync CS pthread_mutex_init( &mSyncSection, NULL ); } /*=========================================================================== METHOD: ~CGobiConnectionMgmtDLL (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ CGobiConnectionMgmtDLL::~CGobiConnectionMgmtDLL() { std::map tmpAPI = mAPI; std::map ::const_iterator pIter; pIter = tmpAPI.begin(); while (pIter != tmpAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; if (pAPI != 0) { pAPI->Cleanup(); delete pAPI; } pIter++; } mAPI.clear(); pthread_mutex_destroy( &mSyncSection ); } /*=========================================================================== METHOD: CreateAPI (Public Method) DESCRIPTION: Create a new API object RETURN VALUE: GOBIHANDLE - Handle to new API object (0 upon failure) ===========================================================================*/ GOBIHANDLE CGobiConnectionMgmtDLL::CreateAPI() { pthread_mutex_lock( &mSyncSection ); cGobiConnectionMgmt * pAPI = new cGobiConnectionMgmt; if (pAPI != 0) { bool bInit = pAPI->Initialize(); if (bInit == true) { mAPI[(GOBIHANDLE)pAPI] = pAPI; } } pthread_mutex_unlock( &mSyncSection ); return (GOBIHANDLE)pAPI; } /*=========================================================================== METHOD: DeleteAPI (Public Method) DESCRIPTION: Delete an existing API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: None ===========================================================================*/ void CGobiConnectionMgmtDLL::DeleteAPI( GOBIHANDLE handle ) { pthread_mutex_lock( &mSyncSection ); std::map ::iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { cGobiConnectionMgmt * pAPI = pIter->second; delete pAPI; mAPI.erase( pIter ); } pthread_mutex_unlock( &mSyncSection ); } /*=========================================================================== METHOD: GetAPI (Public Method) DESCRIPTION: Return the requested API object PARAMETERS: handle [ I ] - Handle to API object to return RETURN VALUE: cGobiConnectionMgmt * ===========================================================================*/ cGobiConnectionMgmt * CGobiConnectionMgmtDLL::GetAPI( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = 0; pthread_mutex_lock( &mSyncSection ); std::map ::const_iterator pIter; pIter = mAPI.find( handle ); if (pIter != mAPI.end()) { pAPI = pIter->second; } pthread_mutex_unlock( &mSyncSection ); return pAPI; } /*=========================================================================*/ // cGobiConnectionMgmt Methods /*=========================================================================*/ /*=========================================================================== METHOD: cGobiConnectionMgmt (Public Method) DESCRIPTION: Constructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::cGobiConnectionMgmt() : cGobiQMICore(), mbThreadStarted( false ), mThreadID( 0 ), mThreadCleanupFinished( false ) { // Nothing to do but init those variables } /*=========================================================================== METHOD: ~cGobiConnectionMgmt (Public Method) DESCRIPTION: Destructor RETURN VALUE: None ===========================================================================*/ cGobiConnectionMgmt::~cGobiConnectionMgmt() { Disconnect(); } /*=========================================================================== METHOD: ProcessTraffic (Internal Method) DESCRIPTION: Process traffic in a QMI server protocol log, this is done to exercise QMI indication related callbacks PARAMETERS: svc [ I ] - QMI Service type RETURN VALUE: None ===========================================================================*/ void cGobiConnectionMgmt::ProcessTraffic( eQMIService svc ) { ULONG count = 0; std::map ::iterator pIter; pIter = mServers.find( svc ); if (pIter == mServers.end()) { return; } sServerInfo & si = pIter->second; cQMIProtocolServer * pSvr = si.mpServer; if (pSvr == 0) { return; } // Grab the service ID from the service eQMIService svcID = pSvr->GetServiceType(); if (svcID == eQMI_SVC_ENUM_BEGIN) { return; } // Grab the log from the server const cProtocolLog & logSvr = pSvr->GetLog(); // New items to process? count = logSvr.GetCount(); if (count != INVALID_LOG_INDEX && count > si.mLogsProcessed) { for (ULONG i = si.mLogsProcessed; i < count; i++) { sProtocolBuffer buf = logSvr.GetBuffer( i ); if (buf.IsValid() == false) { continue; } eProtocolType pt = buf.GetType(); if (IsQMIProtocolRX( pt ) == false) { continue; } sQMIServiceBuffer qmiBuf( buf.GetSharedBuffer() ); if (qmiBuf.IsIndication() == false) { continue; } ULONG msgID = qmiBuf.GetMessageID(); tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); if (pIter == mCallbacks.end()) { continue; } ULONG outLen = 0; const BYTE * pOutput = (const BYTE *)qmiBuf.GetRawContents( outLen ); tCallbackValue cv = pIter->second; cGenericCallback * pCB = 0; pCB = new cGenericCallback( cv.first, svcID, msgID, cv.second, outLen, pOutput ); if (pCB != 0) { if (pCB->Initialize() == false) { delete pCB; } } } si.mLogsProcessed = count; } } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Connect to the specified Gobi device PARAMETERS: pQMIFile [ I ] - QMI control file to connect to services [ I ] - QMI services to connect to RETURN VALUE: std::set - Services successfuly configured ===========================================================================*/ std::set cGobiConnectionMgmt::Connect( LPCSTR pQMIFile, std::set & services ) { std::set svcs = cGobiQMICore::Connect( pQMIFile, services ); if (svcs.size() > 0) { // Start the traffic processing thread? if (mbThreadStarted == false) { // Clear mExitEvent; mExitEvent.Clear(); pthread_create( &mThreadID, NULL, TrafficProcessThread, this ); mbThreadStarted = true; } } return svcs; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Disconnect from the currently connected Gobi device RETURN VALUE: bool ===========================================================================*/ bool cGobiConnectionMgmt::Disconnect() { // Clear all callback function pointers mCallbacks.clear(); // Exit traffic processing thread if (mbThreadStarted == true) { // Signal thread to exit mExitEvent.Set( 0 ); // If we are not being called from the thread itself then wait for // it to exit, if not then it will have to exit automatically if (pthread_self() != mThreadID) { if (mThreadID != 0) { pthread_join( mThreadID, NULL ); } } } // Clear out thread handle/ID mbThreadStarted = false; mThreadID = 0; return cGobiQMICore::Disconnect(); } /*=========================================================================== METHOD: SetGenericCallback (Public Method) DESCRIPTION: Enable/disable generic callback function PARAMETERS: svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Generic callback pointer userValue [ I ] - User value to pass back to callback RETURN VALUE: eGobiError - Return code ===========================================================================*/ eGobiError cGobiConnectionMgmt::SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ) { // Assume success eGobiError rc = eGOBI_ERR_NONE; tCallbackKey ck( svcID, msgID ); std::map ::iterator pIter; pIter = mCallbacks.find( ck ); bool bOn = (pCallback != 0 && pIter == mCallbacks.end()); bool bOff = (pCallback == 0 && pIter != mCallbacks.end()); bool bReplace = (pCallback != 0 && pIter != mCallbacks.end()); if (bOn == true || bReplace == true) { tCallbackValue cv( pCallback, userValue ); mCallbacks[ck] = cv; } else if (bOff == true) { mCallbacks.erase( pIter ); } return rc; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiConnectionMgmt/GobiConnectionMgmt.h000077500000000000000000000203171455567757300277250ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmt.h DESCRIPTION: QUALCOMM Connection Management API for Gobi PUBLIC CLASSES AND FUNCTIONS: CGobiConnectionMgmtDLL cGobiConnectionMgmt Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ /*=========================================================================*/ // Pragmas /*=========================================================================*/ #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiQMICore.h" #include "QMIBuffers.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; extern "C" { // Generic callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ); }; // CallbackThread prototype // Thread to execute a callback asynchronously void * CallbackThread( PVOID pArg ); /*=========================================================================*/ // Class cGobiCMCallback /*=========================================================================*/ class cGobiCMCallback { public: // (Inline) Constructor cGobiCMCallback() { }; // (Inline) Destructor virtual ~cGobiCMCallback() { }; // (Inline) Initialize the callback object by starting the thread bool Initialize() { // Start the thread pthread_t threadID; pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); int nRC = pthread_create( &threadID, &attributes, CallbackThread, this ); if (nRC == 0) { // Success! return true; } return false; }; protected: // Call the function virtual void Call() = 0; // Function thread gets full access friend void * CallbackThread( PVOID pArg ); }; /*=========================================================================*/ // Class cGenericCallback /*=========================================================================*/ class cGenericCallback : public cGobiCMCallback { public: // (Inline) Constructor cGenericCallback( tFNGenericCallback pCallback, ULONG svcID, ULONG msgID, ULONG_PTR userValue, ULONG outLen, const BYTE * pOut ) : mServiceID( svcID ), mMessageID( msgID ), mUserValue( userValue ), mOutputLen( 0 ), mpCallback( pCallback ) { memset( &mOutput[0], 0, QMI_MAX_BUFFER_SIZE ); if (outLen <= QMI_MAX_BUFFER_SIZE && pOut != 0) { mOutputLen = outLen; memcpy( &mOutput[0], pOut, outLen ); } }; // (Inline) Destructor virtual ~cGenericCallback() { mpCallback = 0; }; protected: /* Service ID */ ULONG mServiceID; /* Message ID */ ULONG mMessageID; /* User value */ ULONG_PTR mUserValue; /* Actual size of output content */ ULONG mOutputLen; /* Output content buffer */ BYTE mOutput[QMI_MAX_BUFFER_SIZE]; /* Callback function */ tFNGenericCallback mpCallback; // Call the function virtual void Call() { if (mpCallback != 0) { mpCallback( mServiceID, mMessageID, mUserValue, mOutputLen, (const BYTE *)&mOutput[0] ); } }; }; /*=========================================================================*/ // Class cGobiConnectionMgmt /*=========================================================================*/ class cGobiConnectionMgmt : public cGobiQMICore { public: // Constructor cGobiConnectionMgmt(); // Destructor virtual ~cGobiConnectionMgmt(); // Connect to the specified Gobi device interface virtual std::set Connect( LPCSTR pInterface, std::set & services ); // Disconnect from the currently connected device interface virtual bool Disconnect(); // Enable/disable generic callback function eGobiError SetGenericCallback( ULONG svcID, ULONG msgID, tFNGenericCallback pCallback, ULONG_PTR userValue ); protected: // Process new traffic void ProcessTraffic( eQMIService svc ); /* Is there an active thread? */ bool mbThreadStarted; /* ID of traffic processing thread */ pthread_t mThreadID; /* Traffic processing thread exit event */ cEvent mExitEvent; /* Has the protocol server thread finished cleanup? */ bool mThreadCleanupFinished; /* Generic callback function key/value */ typedef std::pair tCallbackKey; typedef std::pair tCallbackValue; /* Callback functions */ std::map mCallbacks; // Traffic process thread gets full access friend VOID * TrafficProcessThread( PVOID pArg ); }; /*=========================================================================*/ // Class CGobiConnectionMgmtDLL /*=========================================================================*/ class CGobiConnectionMgmtDLL { public: // Constructor CGobiConnectionMgmtDLL(); // Destructor virtual ~CGobiConnectionMgmtDLL(); // Create a new API object GOBIHANDLE CreateAPI(); // Delete an existing API object void DeleteAPI( GOBIHANDLE handle ); // Return the requested API object cGobiConnectionMgmt * GetAPI( GOBIHANDLE handle ); protected: /* API interface object */ std::map mAPI; /* Synchronization object */ mutable pthread_mutex_t mSyncSection; }; extern CGobiConnectionMgmtDLL gDLL; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiConnectionMgmt/GobiConnectionMgmtAPI.h000077500000000000000000017646521455567757300303010ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPI.h DESCRIPTION: QUALCOMM Connection Management API for Gobi Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #ifndef GOBI_TYPEDEFS #define GOBI_TYPEDEFS // Type Definitions typedef unsigned long ULONG; typedef unsigned long * ULONG_PTR; typedef unsigned long long ULONGLONG; typedef signed char INT8; typedef unsigned char UINT8; typedef signed short INT16; typedef unsigned short UINT16; typedef signed int INT32; typedef unsigned int UINT32; typedef unsigned char BYTE; typedef char CHAR; typedef unsigned short WORD; typedef unsigned short USHORT; typedef const char * LPCSTR; #ifdef WINDOWS typedef signed __int64 INT64; typedef unsigned __int64 UINT64; #else typedef signed long long INT64; typedef unsigned long long UINT64; #endif #endif /*=========================================================================*/ // Definitions /*=========================================================================*/ // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; #ifdef __cplusplus extern "C" { #endif // Geeneric callback function pointer typedef void (* tFNGenericCallback)( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); #ifdef __cplusplus }; #endif /*=========================================================================*/ // Prototypes /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ); /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ); /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ); /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ); /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WDSEMBMSTMGISwitch DESCRIPTION: The function sends 'WDS/EMBMS TMGI Switch Request' (0x0088) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGISwitch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASConfigureSignalInfo2 DESCRIPTION: The function sends 'NAS/Configure Signal Info 2 Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo2( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: NASGetTDSCDMACellInfo DESCRIPTION: The function sends 'NAS/Get TD-SCDMA Cell Info Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSGetLineSwitchingStatus DESCRIPTION: The function sends 'Voice/ALS Get Line Switching Status Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetLineSwitchingStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: VoiceALSGetSelectedLine DESCRIPTION: The function sends 'Voice/ALS Get Selected Line Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetSelectedLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: UIMRefreshRegisterAll DESCRIPTION: The function sends 'UIM/Refresh Register All Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegisterAll( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMSetCapabilitiesReadOperation DESCRIPTION: The function sends 'PBM/Set Capabilities Read Operation Request' (0x001C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetCapabilitiesReadOperation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedReadRecords DESCRIPTION: The function sends 'PBM/Extended Read Records Request' (0x001D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedWriteRecord DESCRIPTION: The function sends 'PBM/Extended Write Record Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedSearchRecords DESCRIPTION: The function sends 'PBM/Extended Search Records Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PBMExtendedReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Extended Read All Hidden Records Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCInjectMotionData DESCRIPTION: The function sends 'LOC/Inject Motion Data Request' (0x0068) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: LOCGetNIGeofenceIDList DESCRIPTION: The function sends 'LOC/Get NI Geofence ID List Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNIGeofenceIDList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCRegisterForIndications DESCRIPTION: The function sends 'PDC/Register For Indications Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCRegisterForIndications( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCGetSelectedConfig DESCRIPTION: The function sends 'PDC/Get Selected Config Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCSetSelectedConfig DESCRIPTION: The function sends 'PDC/Set Selected Config Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCSetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCListConfigs DESCRIPTION: The function sends 'PDC/List Configs Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCListConfigs( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCDeleteConfig DESCRIPTION: The function sends 'PDC/Delete Config Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCDeleteConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCLoadConfig DESCRIPTION: The function sends 'PDC/Load Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCLoadConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCActivateConfig DESCRIPTION: The function sends 'PDC/Activate Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCActivateConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCGetConfigInfo DESCRIPTION: The function sends 'PDC/Get Config Info Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: PDCGetConfigLimits DESCRIPTION: The function sends 'PDC/Get Config Limits Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigLimits( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiConnectionMgmt/GobiConnectionMgmtAPIEnums.h000077500000000000000000012262501455567757300312740ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIEnums.h DESCRIPTION: Declaration of the Gobi API enumerations Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Gobi API error code enum eGobiError { eGOBI_ERR_ENUM_BEGIN = -1, eGOBI_ERR_NONE, // 00 Success eGOBI_ERR_GENERAL, // 01 General error eGOBI_ERR_INTERNAL, // 02 Internal error eGOBI_ERR_MEMORY, // 03 Memory error eGOBI_ERR_INVALID_ARG, // 04 Invalid argument eGOBI_ERR_BUFFER_SZ, // 05 Buffer too small eGOBI_ERR_NO_DEVICE, // 06 Unable to detect device eGOBI_ERR_INVALID_DEVID, // 07 Invalid device ID eGOBI_ERR_NO_CONNECTION, // 08 No connection to device eGOBI_ERR_IFACE, // 09 Unable to obtain required interace eGOBI_ERR_CONNECT, // 10 Unable to connect to interface eGOBI_ERR_REQ_SCHEDULE, // 11 Unable to schedule request eGOBI_ERR_REQUEST, // 12 Error sending request eGOBI_ERR_RESPONSE, // 13 Error receiving response eGOBI_ERR_REQUEST_TO, // 14 Timeout while sending request eGOBI_ERR_RESPONSE_TO, // 15 Timeout while receiving response eGOBI_ERR_MALFORMED_RSP, // 16 Malformed response received eGOBI_ERR_INVALID_RSP, // 17 Invalid/error response received eGOBI_ERR_INVALID_FILE, // 18 Invalid file path eGOBI_ERR_FILE_OPEN, // 19 Unable to open file eGOBI_ERR_FILE_COPY, // 20 Unable to copy file eGOBI_ERR_QDL_SCM, // 21 Unable to open service control mgr eGOBI_ERR_NO_QDL_SVC, // 22 Unable to detect QDL service eGOBI_ERR_NO_QDL_SVC_INFO, // 23 Unable to obtain QDL service info eGOBI_ERR_NO_QDL_SVC_PATH, // 24 Unable to locate QSL service eGOBI_ERR_QDL_SVC_CFG, // 25 Unable to reconfigure QDL service eGOBI_ERR_QDL_SVC_IFACE, // 26 Unable to interface to QDL service eGOBI_ERR_OFFLINE, // 27 Unable to set device offline eGOBI_ERR_RESET, // 28 Unable to reset device eGOBI_ERR_NO_SIGNAL, // 29 No available signal eGOBI_ERR_MULTIPLE_DEVICES, // 30 Multiple devices detected eGOBI_ERR_DRIVER, // 31 Error interfacing to driver eGOBI_ERR_NO_CANCELABLE_OP, // 32 No cancelable operation is pending eGOBI_ERR_CANCEL_OP, // 33 Error canceling outstanding operation eGOBI_ERR_QDL_CRC, // 34 QDL image data CRC error eGOBI_ERR_QDL_PARSING, // 35 QDL image data parsing error eGOBI_ERR_QDL_AUTH, // 36 QDL image authentication error eGOBI_ERR_QDL_WRITE, // 37 QDL image write error eGOBI_ERR_QDL_OPEN_SIZE, // 38 QDL image size error eGOBI_ERR_QDL_OPEN_TYPE, // 39 QDL image type error eGOBI_ERR_QDL_OPEN_PROT, // 40 QDL memory protection error eGOBI_ERR_QDL_OPEN_SKIP, // 41 QDL image not required eGOBI_ERR_QDL_ERR_GENERAL, // 42 QDL general error eGOBI_ERR_QDL_BAR_MODE, // 43 QDL BAR mode error eGOBI_ERR_ENUM_END, // Offset from which mapped QMI error codes start from (see eQMIErrors) eGOBI_ERR_QMI_OFFSET = 1000, }; // Enum to describe possible QMI services enum eQMIService:BYTE { eQMI_SVC_CONTROL = 0, // 000 Control service eQMI_SVC_WDS, // 001 Wireless data service eQMI_SVC_DMS, // 002 Device management service eQMI_SVC_NAS, // 003 Network access service eQMI_SVC_QOS, // 004 Quality of service, err, service eQMI_SVC_WMS, // 005 Wireless messaging service eQMI_SVC_PDS, // 006 Position determination service eQMI_SVC_AUTH, // 007 Authentication service eQMI_SVC_AT, // 008 AT command processor service eQMI_SVC_VOICE, // 009 Voice service eQMI_SVC_CAT2, // 010 Card application toolkit service (new) eQMI_SVC_UIM, // 011 UIM service eQMI_SVC_PBM, // 012 Phonebook service eQMI_SVC_QCHAT, // 013 QCHAT Service eQMI_SVC_RMTFS, // 014 Remote file system service eQMI_SVC_TEST, // 015 Test service eQMI_SVC_LOC, // 016 Location service eQMI_SVC_SAR, // 017 Specific absorption rate service eQMI_SVC_IMSS, // 018 IMS settings service eQMI_SVC_ADC, // 019 Analog to digital converter driver service eQMI_SVC_CSD, // 020 Core sound driver service eQMI_SVC_MFS, // 021 Modem embedded file system service eQMI_SVC_TIME, // 022 Time service eQMI_SVC_TS, // 023 Thermal sensors service eQMI_SVC_TMD, // 024 Thermal mitigation device service eQMI_SVC_SAP, // 025 Service access proxy service eQMI_SVC_WDA, // 026 Wireless data administrative service eQMI_SVC_TSYNC, // 027 TSYNC control service eQMI_SVC_RESERVED_28, // 028 Reserved eQMI_SVC_CSVT, // 029 Circuit switched videotelephony service eQMI_SVC_QCMAP, // 030 Qualcomm mobile access point service eQMI_SVC_IMSP, // 031 IMS presence service eQMI_SVC_IMSVT, // 032 IMS videotelephony service eQMI_SVC_IMSA, // 033 IMS application service eQMI_SVC_RESERVED_34, // 034 Reserved eQMI_SVC_RESERVED_35, // 035 Reserved eQMI_SVC_PDC, // 036 Persistent device configuration service eQMI_SVC_RESERVED_37, // 037 Reserved eQMI_SVC_RESERVED_38, // 038 Reserved eQMI_SVC_RESERVED_39, // 039 Reserved eQMI_SVC_RESERVED_40, // 040 Reserved eQMI_SVC_CAT = 224, // 224 Card application toolkit service eQMI_SVC_RMS, // 225 Remote management service eQMI_SVC_OMA, // 226 Open mobile alliance dev mgmt service }; // Enum to describe QMI CTL Message types enum eQMIMessageCTL:WORD { eQMI_CTL_SET_INSTANCE_ID = 32, // 32 Set the unique link instance ID eQMI_CTL_GET_VERSION_INFO, // 33 Get supported service version info eQMI_CTL_GET_CLIENT_ID, // 34 Get a unique client ID eQMI_CTL_RELEASE_CLIENT_ID, // 35 Release the unique client ID eQMI_CTL_REVOKE_CLIENT_ID_IND, // 36 Indication of client ID revocation eQMI_CTL_INVALID_CLIENT_ID, // 37 Indication of invalid client ID eQMI_CTL_SET_DATA_FORMAT, // 38 Set host driver data format eQMI_CTL_SYNC, // 39 Synchronize client/server eQMI_CTL_SYNC_IND = 39, // 39 Synchronize indication eQMI_CTL_SET_EVENT, // 40 Set event report conditions eQMI_CTL_EVENT_IND = 40, // 40 Event report indication eQMI_CTL_SET_POWER_SAVE_CFG, // 41 Set power save config eQMI_CTL_SET_POWER_SAVE_MODE, // 42 Set power save mode eQMI_CTL_GET_POWER_SAVE_MODE, // 43 Get power save mode }; // Enum to describe QMI WDS Message types enum eQMIMessageWDS:WORD { eQMI_WDS_RESET = 0, // 000 Reset WDS service state variables eQMI_WDS_SET_EVENT, // 001 Set connection state report conditions eQMI_WDS_EVENT_IND = 1, // 001 Connection state report indication eQMI_WDS_ABORT, // 002 Abort previously issued WDS command eQMI_WDS_SET_INDICATION, // 003 Set indication conditions eQMI_WDS_START_NET = 32, // 032 Start WDS network interface eQMI_WDS_STOP_NET, // 033 Stop WDS network interface eQMI_WDS_GET_PKT_STATUS, // 034 Get packet data connection status eQMI_WDS_PKT_STATUS_IND = 34, // 034 Packet data connection status indication eQMI_WDS_GET_RATES, // 035 Get current bit rates of the connection eQMI_WDS_GET_STATISTICS, // 036 Get the packet data transfer statistics eQMI_WDS_G0_DORMANT, // 037 Go dormant eQMI_WDS_G0_ACTIVE, // 038 Go active eQMI_WDS_CREATE_PROFILE, // 039 Create profile with specified settings eQMI_WDS_MODIFY_PROFILE, // 040 Modify profile with specified settings eQMI_WDS_DELETE_PROFILE, // 041 Delete the specified profile eQMI_WDS_GET_PROFILE_LIST, // 042 Get all profiles eQMI_WDS_GET_PROFILE, // 043 Get the specified profile eQMI_WDS_GET_DEFAULTS, // 044 Get the default data session settings eQMI_WDS_GET_SETTINGS, // 045 Get the runtime data session settings eQMI_WDS_SET_MIP, // 046 Get the mobile IP setting eQMI_WDS_GET_MIP, // 047 Set the mobile IP setting eQMI_WDS_GET_DORMANCY, // 048 Get the dormancy status eQMI_WDS_GET_AUTOCONNECT = 52, // 052 Get the NDIS autoconnect setting eQMI_WDS_GET_DURATION, // 053 Get the duration of data session eQMI_WDS_GET_MODEM_STATUS, // 054 Get the modem status eQMI_WDS_MODEM_IND = 54, // 054 Modem status indication eQMI_WDS_GET_DATA_BEARER, // 055 Get the data bearer type eQMI_WDS_GET_MODEM_INFO, // 056 Get the modem info eQMI_WDS_MODEM_INFO_IND = 56, // 056 Modem info indication eQMI_WDS_GET_ACTIVE_MIP = 60, // 060 Get the active mobile IP profile eQMI_WDS_SET_ACTIVE_MIP, // 061 Set the active mobile IP profile eQMI_WDS_GET_MIP_PROFILE, // 062 Get mobile IP profile settings eQMI_WDS_SET_MIP_PROFILE, // 063 Set mobile IP profile settings eQMI_WDS_GET_MIP_PARAMS, // 064 Get mobile IP parameters eQMI_WDS_SET_MIP_PARAMS, // 065 Set mobile IP parameters eQMI_WDS_GET_LAST_MIP_STATUS, // 066 Get last mobile IP status eQMI_WDS_GET_AAA_AUTH_STATUS, // 067 Get AN-AAA authentication status eQMI_WDS_GET_CUR_DATA_BEARER, // 068 Get current data bearer eQMI_WDS_GET_CALL_LIST, // 069 Get the call history list eQMI_WDS_GET_CALL_ENTRY, // 070 Get an entry from the call history list eQMI_WDS_CLEAR_CALL_LIST, // 071 Clear the call history list eQMI_WDS_GET_CALL_LIST_MAX, // 072 Get maximum size of call history list eQMI_WDS_GET_DEFAULT_PROF_NUM, // 073 Get default profile number eQMI_WDS_SET_DEFAULT_PROF_NUM, // 074 Set default profile number eQMI_WDS_RESET_PROFILE, // 075 Reset profile eQMI_WDS_RESET_PROF_PARAM, // 076 Reset profile param to invalid eQMI_WDS_SET_IP_FAMILY, // 077 Set the client IP family preference eQMI_WDS_SET_FMC_TUNNEL, // 078 Set FMC tunnel parameters eQMI_WDS_CLEAR_FMC_TUNNEL, // 079 Clear FMC tunnel parameters eQMI_WDS_GET_FMC_TUNNEL, // 080 Get FMC tunnel parameters eQMI_WDS_SET_AUTOCONNECT, // 081 Set the NDIS autoconnect setting eQMI_WDS_GET_DNS, // 082 Get the DNS setting eQMI_WDS_SET_DNS, // 083 Set the DNS setting eQMI_WDS_GET_PRE_DORMANCY, // 084 Get the CDMA pre-dormancy settings eQMI_WDS_SET_CAM_TIMER, // 085 Set the CAM timer eQMI_WDS_GET_CAM_TIMER, // 086 Get the CAM timer eQMI_WDS_SET_SCRM, // 087 Set SCRM status eQMI_WDS_GET_SCRM, // 088 Get SCRM status eQMI_WDS_SET_RDUD, // 089 Set RDUD status eQMI_WDS_GET_RDUD, // 090 Get RDUD status eQMI_WDS_GET_SIPMIP_CALL_TYPE, // 091 Set SIP/MIP call type eQMI_WDS_SET_PM_PERIOD, // 092 Set EV-DO page monitor period eQMI_WDS_PM_PERIOD_IND = 92, // 092 EV-DO page monitor period indication eQMI_WDS_SET_FORCE_LONG_SLEEP, // 093 Set EV-DO force long sleep feature eQMI_WDS_GET_PM_PERIOD, // 094 Get EV-DO page monitor period eQMI_WDS_GET_CALL_THROTTLE, // 095 Get call throttle info eQMI_WDS_GET_NSAPI, // 096 Get NSAPI eQMI_WDS_SET_DUN_CTRL_PREF, // 097 Set DUN control preference eQMI_WDS_GET_DUN_CTRL_INFO, // 098 Set DUN control info eQMI_WDS_SET_DUN_CTRL_EVENT, // 099 Set DUN control event preference eQMI_WDS_DUN_CTRL_IND = 99, // 099 DUN control event report indication eQMI_WDS_PENDING_DUN_CTRL, // 100 Control pending DUN call eQMI_WDS_TMGI_ACTIVATE, // 101 Activate eMBMS TMGI eQMI_WDS_TMGI_ACT_IND = 101, // 101 eMBMS TMGI activate indication eQMI_WDS_TMGI_DEACTIVATE, // 102 Activate eMBMS TMGI eQMI_WDS_TMGI_DEACT_IND = 102, // 102 eMBMS TMGI activate indication eQMI_WDS_TMGI_LIST_QUERY, // 103 Query for eMBMS TMGI list eQMI_WDS_TMGI_LIST_IND, // 104 eMBMS TMGI list query indication eQMI_WDS_GET_PREF_DATA_SYS, // 105 Get preferred data system eQMI_WDS_GET_LAST_DATA_STATUS, // 106 Get last data call status eQMI_WDS_GET_CURR_DATA_SYS, // 107 Get current data systems status eQMI_WDS_GET_PDN_THROTTLE, // 108 Get PDN throttle info eQMI_WDS_GET_LTE_ATTACH = 133, // 133 Get LTE attach parameters eQMI_WDS_RESET_PKT_STATS, // 134 Reset packet statistics eQMI_WDS_GET_FLOW_CTRL_STATUS, // 135 Get flow control status eQMI_WDS_TMGI_SWITCH, // 136 Activate/deactivate eMBMS TMGI eQMI_WDS_TMGI_SWITCH_IND = 136,// 136 eMBMS TMGI activate/deactivate ind }; // Enum to describe QMI DMS Message types enum eQMIMessageDMS:WORD { eQMI_DMS_RESET = 0, // 00 Reset DMS service state variables eQMI_DMS_SET_EVENT, // 01 Set connection state report conditions eQMI_DMS_EVENT_IND = 1, // 01 Connection state report indication eQMI_DMS_GET_CAPS = 32, // 32 Get the device capabilities eQMI_DMS_GET_MANUFACTURER, // 33 Get the device manfacturer eQMI_DMS_GET_MODEL_ID, // 34 Get the device model ID eQMI_DMS_GET_REV_ID, // 35 Get the device revision ID eQMI_DMS_GET_NUMBER, // 36 Get the assigned voice number eQMI_DMS_GET_IDS, // 37 Get the ESN/IMEI/MEID eQMI_DMS_GET_POWER_STATE, // 38 Get the get power state eQMI_DMS_UIM_SET_PIN_PROT, // 39 UIM - Set PIN protection eQMI_DMS_UIM_PIN_VERIFY, // 40 UIM - Verify PIN eQMI_DMS_UIM_PIN_UNBLOCK, // 41 UIM - Unblock PIN eQMI_DMS_UIM_PIN_CHANGE, // 42 UIM - Change PIN eQMI_DMS_UIM_GET_PIN_STATUS, // 43 UIM - Get PIN status eQMI_DMS_GET_MSM_ID = 44, // 44 Get MSM ID eQMI_DMS_GET_OPERATING_MODE, // 45 Get the operating mode eQMI_DMS_SET_OPERATING_MODE, // 46 Set the operating mode eQMI_DMS_GET_TIME, // 47 Get timestamp from the device eQMI_DMS_GET_PRL_VERSION, // 48 Get the PRL version eQMI_DMS_GET_ACTIVATED_STATE, // 49 Get the activation state eQMI_DMS_ACTIVATE_AUTOMATIC, // 50 Perform an automatic activation eQMI_DMS_ACTIVATE_MANUAL, // 51 Perform a manual activation eQMI_DMS_GET_USER_LOCK_STATE, // 52 Get the lock state eQMI_DMS_SET_USER_LOCK_STATE, // 53 Set the lock state eQMI_DMS_SET_USER_LOCK_CODE, // 54 Set the lock PIN eQMI_DMS_READ_USER_DATA, // 55 Read user data eQMI_DMS_WRITE_USER_DATA, // 56 Write user data eQMI_DMS_READ_ERI_FILE, // 57 Read the enhanced roaming indicator file eQMI_DMS_FACTORY_DEFAULTS, // 58 Reset to factory defaults eQMI_DMS_VALIDATE_SPC, // 59 Validate service programming code eQMI_DMS_UIM_GET_ICCID, // 60 Get UIM ICCID eQMI_DMS_GET_FIRWARE_ID, // 61 Get firmware ID eQMI_DMS_SET_FIRMWARE_ID, // 62 Set firmware ID eQMI_DMS_GET_HOST_LOCK_ID, // 63 Get host lock ID eQMI_DMS_UIM_GET_CK_STATUS, // 64 UIM - Get control key status eQMI_DMS_UIM_SET_CK_PROT, // 65 UIM - Set control key protection eQMI_DMS_UIM_UNBLOCK_CK, // 66 UIM - Unblock facility control key eQMI_DMS_GET_IMSI, // 67 Get the IMSI eQMI_DMS_UIM_GET_STATE, // 68 UIM - Get the UIM state eQMI_DMS_GET_BAND_CAPS, // 69 Get the device band capabilities eQMI_DMS_GET_FACTORY_ID, // 70 Get the device factory ID eQMI_DMS_GET_FIRMWARE_PREF, // 71 Get firmware preference eQMI_DMS_SET_FIRMWARE_PREF, // 72 Set firmware preference eQMI_DMS_LIST_FIRMWARE, // 73 List all stored firmware eQMI_DMS_DELETE_FIRMWARE, // 74 Delete specified stored firmware eQMI_DMS_SET_TIME, // 75 Set device time eQMI_DMS_GET_FIRMWARE_INFO, // 76 Get stored firmware info eQMI_DMS_GET_ALT_NET_CFG, // 77 Get alternate network config eQMI_DMS_SET_ALT_NET_CFG, // 78 Set alternate network config eQMI_DMS_GET_IMG_DLOAD_MODE, // 79 Get next image download mode eQMI_DMS_SET_IMG_DLOAD_MODE, // 80 Set next image download mode eQMI_DMS_GET_SW_VERSION, // 81 Get software version eQMI_DMS_SET_SPC, // 82 Set SPC eQMI_DMS_GET_CURRENT_PRL_INFO,// 83 Get current PRL info }; // Enum to describe QMI NAS Message types enum eQMIMessageNAS:WORD { eQMI_NAS_RESET = 0, // 000 Reset NAS service state variables eQMI_NAS_ABORT, // 001 Abort previously issued NAS command eQMI_NAS_SET_EVENT, // 002 Set NAS state report conditions eQMI_NAS_EVENT_IND = 2, // 002 Connection state report indication eQMI_NAS_SET_REG_EVENT, // 003 Set NAS registration report conditions eQMI_NAS_GET_RSSI = 32, // 032 Get the signal strength eQMI_NAS_SCAN_NETS, // 033 Scan for visible network eQMI_NAS_REGISTER_NET, // 034 Initiate a network registration eQMI_NAS_ATTACH_DETACH, // 035 Initiate an attach or detach action eQMI_NAS_GET_SS_INFO, // 036 Get info about current serving system eQMI_NAS_SS_INFO_IND = 36, // 036 Current serving system info indication eQMI_NAS_GET_HOME_INFO, // 037 Get info about home network eQMI_NAS_GET_NET_PREF_LIST, // 038 Get the list of preferred networks eQMI_NAS_SET_NET_PREF_LIST, // 039 Set the list of preferred networks eQMI_NAS_GET_NET_BAN_LIST, // 040 Get the list of forbidden networks eQMI_NAS_SET_NET_BAN_LIST, // 041 Set the list of forbidden networks eQMI_NAS_SET_TECH_PREF, // 042 Set the technology preference eQMI_NAS_GET_TECH_PREF, // 043 Get the technology preference eQMI_NAS_GET_ACCOLC, // 044 Get the Access Overload Class eQMI_NAS_SET_ACCOLC, // 045 Set the Access Overload Class eQMI_NAS_GET_SYSPREF, // 046 Get the CDMA system preference eQMI_NAS_GET_NET_PARAMS, // 047 Get various network parameters eQMI_NAS_SET_NET_PARAMS, // 048 Set various network parameters eQMI_NAS_GET_RF_INFO, // 049 Get the SS radio/band channel info eQMI_NAS_GET_AAA_AUTH_STATUS, // 050 Get AN-AAA authentication status eQMI_NAS_SET_SYS_SELECT_PREF, // 051 Set system selection preference eQMI_NAS_GET_SYS_SELECT_PREF, // 052 Get system selection preference eQMI_NAS_SYS_SELECT_IND = 52, // 052 System selection pref indication eQMI_NAS_SET_DDTM_PREF = 55, // 055 Set DDTM preference eQMI_NAS_GET_DDTM_PREF, // 056 Get DDTM preference eQMI_NAS_DDTM_IND = 56, // 056 DDTM preference indication eQMI_NAS_GET_OPERATER_NAME, // 057 Get operator name data eQMI_NAS_OPERATER_NAME_IND, // 058 Operator name data indication eQMI_NAS_GET_PLMN_MODE, // 059 Get PLMN mode bit from CSP eQMI_NAS_PLMN_MODE_IND, // 060 CSP PLMN mode bit indication eQMI_NAS_UPDATE_AKEY, // 061 Update the A-KEY eQMI_NAS_GET_3GPP2_SUBS_INFO, // 062 Get 3GPP2 subscription info eQMI_NAS_SET_3GPP2_SUBS_INFO, // 063 Set 3GPP2 subscription info eQMI_NAS_MOB_CAI_REV, // 064 Get mobile CAI revision information eQMI_NAS_GET_RTRE_CONFIG, // 065 Get RTRE configuration information eQMI_NAS_SET_RTRE_CONFIG, // 066 Set RTRE configuration information eQMI_NAS_GET_CELL_LOC_INFO, // 067 Get cell location information eQMI_NAS_GET_PLMN_NAME, // 068 Get operator name for specified network eQMI_NAS_BIND_SUBS, // 069 Bind client to a specific subscription eQMI_NAS_MANAGED_ROAMING_IND, // 070 Managed roaming indication eQMI_NAS_DSB_PREF_IND, // 071 Dual standby preference indication eQMI_NAS_SUBS_INFO_IND, // 072 Subscription info indication eQMI_NAS_GET_MODE_PREF, // 073 Get mode preference eQMI_NAS_SET_DSB_PREF = 75, // 075 Set dual standby preference eQMI_NAS_NETWORK_TIME_IND, // 076 Network time indication eQMI_NAS_GET_SYSTEM_INFO, // 077 Get system info eQMI_NAS_SYSTEM_INFO_IND, // 078 System info indication eQMI_NAS_GET_SIGNAL_INFO, // 079 Get signal info eQMI_NAS_CFG_SIGNAL_INFO, // 080 Configure signal info report eQMI_NAS_SIGNAL_INFO_IND, // 081 Signal info indication eQMI_NAS_GET_ERROR_RATE, // 082 Get error rate info eQMI_NAS_ERROR_RATE_IND, // 083 Error rate indication eQMI_NAS_EVDO_SESSION_IND, // 084 CDMA 1xEV-DO session close indication eQMI_NAS_EVDO_UATI_IND, // 085 CDMA 1xEV-DO UATI update indication eQMI_NAS_GET_EVDO_SUBTYPE, // 086 Get CDMA 1xEV-DO protocol subtype eQMI_NAS_GET_EVDO_COLOR_CODE, // 087 Get CDMA 1xEV-DO color code eQMI_NAS_GET_ACQ_SYS_MODE, // 088 Get current acquisition system mode eQMI_NAS_SET_RX_DIVERSITY, // 089 Set the RX diversity eQMI_NAS_GET_RX_TX_INFO, // 090 Get detailed RX/TX information eQMI_NAS_UPDATE_AKEY_EXT, // 091 Update the A-KEY (extended) eQMI_NAS_GET_DSB_PREF, // 092 Get dual standby preference eQMI_NAS_DETACH_LTE, // 093 Detach the current LTE system eQMI_NAS_BLOCK_LTE_PLMN, // 094 Block LTE PLMN eQMI_NAS_UNBLOCK_LTE_PLMN, // 095 Unblock LTE PLMN eQMI_NAS_RESET_LTE_PLMN_BLK, // 096 Reset LTE PLMN blocking eQMI_NAS_CUR_PLMN_NAME_IND, // 097 Current PLMN name indication eQMI_NAS_CONFIG_EMBMS, // 098 Configure eMBMS eQMI_NAS_GET_EMBMS_STATUS, // 099 Get eMBMS status eQMI_NAS_EMBMS_STATUS_IND, // 100 eMBMS status indication eQMI_NAS_GET_CDMA_POS_INFO, // 101 Get CDMA position info eQMI_NAS_RF_BAND_INFO_IND, // 102 RF band info indication eQMI_NAS_FORCE_NET_SEARCH, // 103 Force network search eQMI_NAS_NET_REJECT_IND, // 104 Network reject indication eQMI_NAS_GET_MANAGED_ROAM, // 105 Get managed roaming configuration eQMI_NAS_RTRE_CONFIG_IND, // 106 RTRE configuration indication eQMI_NAS_GET_CENTRALIZED_EOM, // 107 Get centralized EONS support eQMI_NAS_CFG_SIGNAL_INFO2, // 108 Configure signal info report (V2) eQMI_NAS_GET_TDS_CELL_INFO, // 109 Get TD-SCDMA cell/position info }; // Enum to describe QMI WMS Message types enum eQMIMessageWMS:WORD { eQMI_WMS_RESET = 0, // 00 Reset WMS service state variables eQMI_WMS_SET_EVENT, // 01 Set new message report conditions eQMI_WMS_EVENT_IND = 1, // 01 New message report indication eQMI_WMS_RAW_SEND = 32, // 32 Send a raw message eQMI_WMS_RAW_WRITE, // 33 Write a raw message to the device eQMI_WMS_RAW_READ, // 34 Read a raw message from the device eQMI_WMS_MODIFY_TAG, // 35 Modify message tag on the device eQMI_WMS_DELETE, // 36 Delete message by index/tag/memory eQMI_WMS_GET_MSG_PROTOCOL = 48, // 48 Get the current message protocol eQMI_WMS_GET_MSG_LIST, // 49 Get list of messages from the device eQMI_WMS_SET_ROUTES, // 50 Set routes for message memory storage eQMI_WMS_GET_ROUTES, // 51 Get routes for message memory storage eQMI_WMS_GET_SMSC_ADDR, // 52 Get SMSC address eQMI_WMS_SET_SMSC_ADDR, // 53 Set SMSC address eQMI_WMS_GET_MSG_LIST_MAX, // 54 Get maximum size of SMS storage eQMI_WMS_SEND_ACK, // 55 Send ACK eQMI_WMS_SET_RETRY_PERIOD, // 56 Set retry period eQMI_WMS_SET_RETRY_INTERVAL, // 57 Set retry interval eQMI_WMS_SET_DC_DISCO_TIMER, // 58 Set DC auto-disconnect timer eQMI_WMS_SET_MEMORY_STATUS, // 59 Set memory storage status eQMI_WMS_SET_BC_ACTIVATION, // 60 Set broadcast activation eQMI_WMS_SET_BC_CONFIG, // 61 Set broadcast config eQMI_WMS_GET_BC_CONFIG, // 62 Get broadcast config eQMI_WMS_MEMORY_FULL_IND, // 63 Memory full indication eQMI_WMS_GET_DOMAIN_PREF, // 64 Get domain preference eQMI_WMS_SET_DOMAIN_PREF, // 65 Set domain preference eQMI_WMS_MEMORY_SEND, // 66 Send message from memory store eQMI_WMS_GET_MSG_WAITING, // 67 Get message waiting info eQMI_WMS_MSG_WAITING_IND, // 68 Message waiting indication eQMI_WMS_SET_PRIMARY_CLIENT, // 69 Set client as primary client eQMI_WMS_SMSC_ADDR_IND, // 70 SMSC address indication eQMI_WMS_INDICATOR_REG, // 71 Register for indicators eQMI_WMS_GET_TRANSPORT_INFO, // 72 Get transport layer info eQMI_WMS_TRANSPORT_INFO_IND, // 73 Transport layer info indication eQMI_WMS_GET_NW_REG_INFO, // 74 Get network registration info eQMI_WMS_NW_REG_INFO_IND, // 75 Network registration info indication eQMI_WMS_BIND_SUBSCRIPTION, // 76 Bind client to a subscription eQMI_WMS_GET_INDICATOR_REG, // 77 Get indicator registration eQMI_WMS_GET_SMS_PARAMETERS, // 78 Get SMS EF-SMSP parameters eQMI_WMS_SET_SMS_PARAMETERS, // 79 Set SMS EF-SMSP parameters eQMI_WMS_CALL_STATUS_IND, // 80 Call status indication eQMI_WMS_GET_DOMAIN_PREF_CFG, // 81 Get domain pref config eQMI_WMS_SET_DOMAIN_PREF_CFG, // 82 Set domain pref config eQMI_WMS_GET_RETRY_PERIOD, // 83 Get retry period eQMI_WMS_GET_RETRY_INTERVAL, // 84 Get retry interval eQMI_WMS_GET_DC_DISCO_TIMER, // 85 Get DC auto-disconnect timer eQMI_WMS_GET_MEMORY_STATUS, // 86 Get memory storage status eQMI_WMS_GET_PRIMARY_CLIENT, // 87 Get primary cleint eQMI_WMS_GET_SUBSCR_BINDING, // 88 Get client subscription binding eQMI_WMS_ASYNC_RAW_SEND, // 89 Asynchronously send a raw message eQMI_WMS_ASYNC_RAW_SEND_IND = 89,// 89 Asynchronous send indication eQMI_WMS_ASYNC_SEND_ACK, // 90 Asynchronously send ACK eQMI_WMS_ASYNC_SEND_ACK_IND = 90,// 90 Asynchronou send ACK indication eQMI_WMS_ASYNC_MEMORY_SEND, // 91 Async send msg from memory store eQMI_WMS_ASYNC_MEM_SEND_IND = 91,// 91 Async memory store send indication eQMI_WMS_GET_SERVICE_READY, // 92 Get service ready status eQMI_WMS_SERVICE_READY_IND, // 93 Service ready status indication eQMI_WMS_BC_CONFIG_IND, // 94 Broadcast config indication }; // Enum to describe QMI PDS Message types enum eQMIMessagePDS:WORD { eQMI_PDS_RESET = 0, // 000 Reset PDS service state variables eQMI_PDS_SET_EVENT, // 001 Set PDS report conditions eQMI_PDS_EVENT_IND = 1, // 001 PDS report indication eQMI_PDS_GET_STATE = 32, // 032 Return PDS service state eQMI_PDS_STATE_IND = 32, // 032 PDS service state indication eQMI_PDS_SET_STATE, // 033 Set PDS service state eQMI_PDS_START_SESSION, // 034 Start a PDS tracking session eQMI_PDS_GET_SESSION_INFO, // 035 Get PDS tracking session info eQMI_PDS_FIX_POSITION, // 036 Manual tracking session position eQMI_PDS_END_SESSION, // 037 End a PDS tracking session eQMI_PDS_GET_NMEA_CFG, // 038 Get NMEA sentence config eQMI_PDS_SET_NMEA_CFG, // 039 Set NMEA sentence config eQMI_PDS_INJECT_TIME, // 040 Inject a time reference eQMI_PDS_GET_DEFAULTS, // 041 Get default tracking session config eQMI_PDS_SET_DEFAULTS, // 042 Set default tracking session config eQMI_PDS_GET_XTRA_PARAMS, // 043 Get the GPS XTRA parameters eQMI_PDS_SET_XTRA_PARAMS, // 044 Set the GPS XTRA parameters eQMI_PDS_FORCE_XTRA_DL, // 045 Force a GPS XTRA database download eQMI_PDS_GET_AGPS_CONFIG, // 046 Get the AGPS mode configuration eQMI_PDS_SET_AGPS_CONFIG, // 047 Set the AGPS mode configuration eQMI_PDS_GET_SVC_AUTOTRACK, // 048 Get the service auto-tracking state eQMI_PDS_SET_SVC_AUTOTRACK, // 049 Set the service auto-tracking state eQMI_PDS_GET_COM_AUTOTRACK, // 050 Get COM port auto-tracking config eQMI_PDS_SET_COM_AUTOTRACK, // 051 Set COM port auto-tracking config eQMI_PDS_RESET_DATA, // 052 Reset PDS service data eQMI_PDS_SINGLE_FIX, // 053 Request single position fix eQMI_PDS_GET_VERSION, // 054 Get PDS service version eQMI_PDS_INJECT_XTRA, // 055 Inject XTRA data eQMI_PDS_INJECT_POSITION, // 056 Inject position data eQMI_PDS_INJECT_WIFI, // 057 Inject Wi-Fi obtained data eQMI_PDS_GET_SBAS_CONFIG, // 058 Get SBAS config eQMI_PDS_SET_SBAS_CONFIG, // 059 Set SBAS config eQMI_PDS_SEND_NI_RESPONSE, // 060 Send network initiated response eQMI_PDS_INJECT_ABS_TIME, // 061 Inject absolute time eQMI_PDS_INJECT_EFS, // 062 Inject EFS data eQMI_PDS_GET_DPO_CONFIG, // 063 Get DPO config eQMI_PDS_SET_DPO_CONFIG, // 064 Set DPO config eQMI_PDS_GET_ODP_CONFIG, // 065 Get ODP config eQMI_PDS_SET_ODP_CONFIG, // 066 Set ODP config eQMI_PDS_CANCEL_SINGLE_FIX, // 067 Cancel single position fix eQMI_PDS_GET_GPS_STATE, // 068 Get GPS state eQMI_PDS_SET_PPM_EVT_REPORT, // 069 Set PPM event report eQMI_PDS_SET_SPI_REPORT, // 070 Set SPI streaming reporting eQMI_PDS_SET_SPI_RPT_IND = 70, // 070 Set SPI streaming indication eQMI_PDS_SET_SPI_STATUS, // 071 Set SPI status eQMI_PDS_SET_PPM_REPORT, // 072 Set PPM reporting state eQMI_PDS_SET_PPM_RPT_IND = 72, // 072 Set PPM reporting state indication eQMI_PDS_FORCE_RECEIVER_OFF, // 073 Force receiver off eQMI_PDS_GET_METHODS = 80, // 080 Get GPS position methods state eQMI_PDS_SET_METHODS, // 081 Set GPS position methods state eQMI_PDS_INJECT_SENSOR, // 082 Inject sensor data eQMI_PDS_INJECT_TIME_SYNC, // 083 Inject time sync data eQMI_PDS_GET_SENSOR_CFG, // 084 Get sensor config eQMI_PDS_SET_SENSOR_CFG, // 085 Set sensor config eQMI_PDS_GET_NAV_CFG, // 086 Get navigation config eQMI_PDS_SET_NAV_CFG, // 087 Set navigation config eQMI_PDS_SET_WLAN_BLANK = 90, // 090 Set WLAN blanking eQMI_PDS_SET_LBS_SC_RPT, // 091 Set LBS security challenge reporting eQMI_PDS_LBS_SC_IND = 91, // 091 LBS security challenge indication eQMI_PDS_SET_LBS_SC, // 092 Set LBS security challenge eQMI_PDS_GET_LBS_ENCRYPT_CFG, // 093 Get LBS security encryption config eQMI_PDS_SET_LBS_UPDATE_RATE, // 094 Set LBS security update rate eQMI_PDS_SET_CELLDB_CONTROL, // 095 Set cell database control eQMI_PDS_READY_IND, // 096 Ready indication eQMI_PDS_INJECT_MOTION_DATA, // 097 Inject motion data eQMI_PDS_SET_GNSS_ERR_REPORT, // 098 Set GNSS error recovery report eQMI_PDS_GNSS_ERR_IND = 98, // 098 GNSS error recovery report indication eQMI_PDS_RESET_SERVICE, // 099 Reset location service eQMI_PDS_INJECT_TEST_DATA, // 100 Inject test data eQMI_PDS_SET_GNSS_RF_CFG, // 101 Set GNSS RF config }; // Enum to describe QMI AUTH Message types enum eQMIMessageAUTH:WORD { eQMI_AUTH_START_EAP = 32, // 32 Start the EAP session eQMI_AUTH_SEND_EAP, // 33 Send and receive EAP packets eQMI_AUTH_EAP_RESULT_IND, // 34 EAP session result indication eQMI_AUTH_GET_EAP_KEYS, // 35 Get the EAP session keys eQMI_AUTH_END_EAP, // 36 End the EAP session eQMI_AUTH_RUN_AKA, // 37 Runs the AKA algorithm eQMI_AUTH_AKA_RESULT_IND, // 38 AKA algorithm result indication }; // Enum to describe QMI VOICE Message types enum eQMIMessageVoice:WORD { eQMI_VOICE_INDICATION_REG = 3, // 03 Set indication registration state eQMI_VOICE_CALL_ORIGINATE = 32, // 32 Originate a voice call eQMI_VOICE_CALL_END, // 33 End a voice call eQMI_VOICE_CALL_ANSWER, // 34 Answer incoming voice call eQMI_VOICE_GET_CALL_INFO = 36, // 36 Get call information eQMI_VOICE_OTASP_STATUS_IND, // 37 OTASP/OTAPA event indication eQMI_VOICE_INFO_REC_IND, // 38 New info record indication eQMI_VOICE_SEND_FLASH, // 39 Send a simple flash eQMI_VOICE_BURST_DTMF, // 40 Send a burst DTMF eQMI_VOICE_START_CONT_DTMF, // 41 Starts a continuous DTMF eQMI_VOICE_STOP_CONT_DTMF, // 42 Stops a continuous DTMF eQMI_VOICE_DTMF_IND, // 43 DTMF event indication eQMI_VOICE_SET_PRIVACY_PREF, // 44 Set privacy preference eQMI_VOICE_PRIVACY_IND, // 45 Privacy change indication eQMI_VOICE_ALL_STATUS_IND, // 46 Voice all call status indication eQMI_VOICE_GET_ALL_STATUS, // 47 Get voice all call status eQMI_VOICE_MANAGE_CALLS = 49, // 49 Manage calls eQMI_VOICE_SUPS_NOTIFICATION_IND, // 50 Supplementary service notifications eQMI_VOICE_SET_SUPS_SERVICE, // 51 Manage supplementary service eQMI_VOICE_GET_CALL_WAITING, // 52 Query sup service call waiting eQMI_VOICE_GET_CALL_BARRING, // 53 Query sup service call barring eQMI_VOICE_GET_CLIP, // 54 Query sup service CLIP eQMI_VOICE_GET_CLIR, // 55 Query sup service CLIR eQMI_VOICE_GET_CALL_FWDING, // 56 Query sup service call forwarding eQMI_VOICE_SET_CALL_BARRING_PWD, // 57 Set call barring password eQMI_VOICE_ORIG_USSD, // 58 Initiate USSD operation then wait eQMI_VOICE_ANSWER_USSD, // 59 Answer USSD request eQMI_VOICE_CANCEL_USSD, // 60 Cancel USSD operation eQMI_VOICE_USSD_RELEASE_IND, // 61 USSD release indication eQMI_VOICE_USSD_IND, // 62 USSD request/notification indication eQMI_VOICE_UUS_IND, // 63 UUS information indication eQMI_VOICE_SET_CONFIG, // 64 Set config eQMI_VOICE_GET_CONFIG, // 65 Get config eQMI_VOICE_SUPS_IND, // 66 Sup service request indication eQMI_VOICE_ASYNC_ORIG_USSD, // 67 Initiate USSD operation eQMI_VOICE_ASYNC_USSD_IND = 67, // 67 USSD request/notification indication eQMI_VOICE_BIND_SUBSCRIPTION, // 68 Bind subscription eQMI_VOICE_ALS_SET_LINE_SW, // 69 ALS set line switching eQMI_VOICE_ALS_SELECT_LINE, // 70 ALS select line eQMI_VOICE_AOC_RESET_ACM, // 71 AOC reset ACM eQMI_VOICE_AOC_SET_ACM_MAX, // 72 ACM set ACM maximum eQMI_VOICE_AOC_GET_CM_INFO, // 73 AOC get call meter info eQMI_VOICE_AOC_LOW_FUNDS_IND, // 74 AOC low funds indication eQMI_VOICE_GET_COLP, // 75 Get COLP info eQMI_VOICE_GET_COLR, // 76 Get COLR info eQMI_VOICE_GET_CNAP, // 77 Get CNAP info eQMI_VOICE_MANAGE_IP_CALLS, // 78 Manage VoIP calls eQMI_VOICE_ALS_GET_LINE_SW, // 79 ALS get line switching eQMI_VOICE_ALS_GET_LINE_SEL, // 80 ALS get selected line eQMI_VOICE_MODIFIED_IND, // 81 Call modified indication eQMI_VOICE_MODIFY_ACCEPT_IND, // 82 Call modify accept indication eQMI_VOICE_SPEECH_CODEC_IND, // 83 Speech codec info indication eQMI_VOICE_HANDOVER_IND, // 84 Handover indication }; // Enum to describe QMI UIM Message types enum eQMIMessageUIM:WORD { eQMI_UIM_RESET = 0, // 00 Reset eQMI_UIM_READ_TRANSPARENT = 32, // 32 Read data eQMI_UIM_READ_TRANSPARENT_IND = 32, // 32 Read data indication eQMI_UIM_READ_RECORD, // 33 Read one or more records eQMI_UIM_READ_RECORD_IND = 33, // 33 Read records indication eQMI_UIM_WRITE_TRANSPARENT, // 34 Write data eQMI_UIM_WRITE_TRANSPARENT_IND = 34, // 34 Write data indication eQMI_UIM_WRITE_RECORD, // 35 Write a record eQMI_UIM_WRITE_RECORD_IND = 35, // 35 Write a record indication eQMI_UIM_GET_FILE_ATTRIBUTES, // 36 Get file attributes eQMI_UIM_GET_FILE_ATTRIBUTES_IND = 36, // 36 Get file attributes indication eQMI_UIM_SET_PIN_PROTECTION, // 37 Set PIN protection eQMI_UIM_SET_PIN_PROTECTION_IND = 37, // 37 Set PIN protection indication eQMI_UIM_VERITFY_PIN, // 38 Verify PIN eQMI_UIM_VERITFY_PIN_IND = 38, // 38 Verify PIN indication eQMI_UIM_UNBLOCK_PIN, // 39 Unblock PIN eQMI_UIM_UNBLOCK_PIN_IND = 39, // 39 Unblock PIN indication eQMI_UIM_CHANGE_PIN, // 40 Change PIN eQMI_UIM_CHANGE_PIN_IND = 40, // 40 Change PIN indication eQMI_UIM_DEPERSONALIZATION, // 41 Depersonalization eQMI_UIM_REFRESH_REGISTER, // 42 Refresh register eQMI_UIM_REFRESH_OK, // 43 Validate refresh eQMI_UIM_REFRESH_COMPLETE, // 44 Complete refresh eQMI_UIM_GET_LAST_REFRESH_EVENT, // 45 Get last refresh event eQMI_UIM_EVENT_REGISTRATION, // 46 Register for indications eQMI_UIM_GET_CARD_STATUS, // 47 Get card status eQMI_UIM_POWER_DOWN, // 48 Power down eQMI_UIM_POWER_UP, // 49 Power up eQMI_UIM_CARD_STATUS_IND, // 50 Card status indication eQMI_UIM_REFRESH_IND, // 51 Refresh indication eQMI_UIM_AUTHENTICATE, // 52 Authenticate eQMI_UIM_AUTHENTICATE_IND = 52, // 52 Authenticate indication eQMI_UIM_CLOSE_SESSION, // 53 Close session eQMI_UIM_GET_SERVICE_STATUS, // 54 Get service status eQMI_UIM_SET_SERVICE_STATUS, // 55 Set service status eQMI_UIM_CHANGE_PROVISIONING, // 56 Change provisioning eQMI_UIM_GET_LABEL, // 57 Get label eQMI_UIM_GET_CONFIG, // 58 Get configuration eQMI_UIM_SEND_ADPU, // 59 Send ADPU eQMI_UIM_SEND_ADPU_IND = 59, // 59 Send ADPU indication eQMI_UIM_SAP_CONNECTION, // 60 SAP connection eQMI_UIM_SAP_REQUEST, // 61 SAP request eQMI_UIM_SAP_CONNECTION_IND, // 62 SAP connection indication eQMI_UIM_LOGICAL_CHANNEL, // 63 Logical channel eQMI_UIM_SUBSCRIPTION_OK, // 64 OK to publish subscription? eQMI_UIM_GET_ATR, // 65 Get ATR eQMI_UIM_SESSION_CLOSED_IND, // 67 Session closed indication eQMI_UIM_REGISTER_REFRESH_ALL, // 68 Register for all refresh }; // Enum to describe QMI PBM Message types enum eQMIMessagePBM:WORD { eQMI_PBM_INDICATION_REG = 1, // 01 Set indication registration state eQMI_PBM_GET_CAPABILITIES, // 02 Get phonebook capabilities by type eQMI_PBM_GET_ALL_CAPABILITIES, // 03 Get all phonebook capabilities eQMI_PBM_READ_RECORDS, // 04 Read phonebook records eQMI_PBM_READ_RECORD_IND = 4, // 04 Read phonebook record indication eQMI_PBM_WRITE_RECORD, // 05 Add/modify a phonebook record eQMI_PBM_DELETE_RECORD, // 06 Delete a phonebook record eQMI_PBM_DELETE_ALL_RECORDS, // 07 Delete all phonebook records eQMI_PBM_SEARCH_RECORDS, // 08 Search phonebook records eQMI_PBM_RECORD_UPDATE_IND, // 09 Phonebook record update indication eQMI_PBM_REFRESH_IND, // 10 Phonebook refresh indication eQMI_PBM_READY_IND, // 11 Phonebook ready indication eQMI_PBM_EMERGENCY_LIST_IND, // 12 Phonebook emergency list indication eQMI_PBM_ALL_READY_IND, // 13 All phonebooks ready indication eQMI_PBM_GET_EMERGENCY_LIST, // 14 Get phonebook emergency list eQMI_PBM_GET_ALL_GROUPS, // 15 Get all phonebook groups eQMI_PBM_SET_GROUP_INFO, // 16 Set phonebook group info eQMI_PBM_GET_STATE, // 17 Get phonebook state eQMI_PBM_READ_ALL_HIDDEN_RECS, // 18 Read all hidden phonebook records eQMI_PBM_HIDDEN_REC_STATUS_IND, // 19 Hidden record status indication eQMI_PBM_GET_NEXT_EMPTY_REC_ID, // 20 Get next empty record ID eQMI_PBM_GET_NEXT_REC_ID, // 21 Get next non-empty record ID eQMI_PBM_GET_AAS_LIST, // 22 Get AAS list eQMI_PBM_SET_AAS, // 23 Add/modify/delete AAS entry eQMI_PBM_UPDATE_AAS_IND, // 24 AAS change indication eQMI_PBM_UPDATE_GAS_IND, // 25 GAS change indication eQMI_PBM_BIND_SUBSCRIPTION, // 26 Bind client to specific subscription eQMI_PBM_GET_SUBSCRIPTION, // 27 Get subscription client is bound to eQMI_PBM_SET_CAPS_READ_OP, // 28 ADN set capabilities read operation eQMI_PBM_SET_CAPS_READ_IND = 28, // 28 ADN set caps read op indication eQMI_PBM_EX_READ_RECORDS, // 29 Read phonebook records eQMI_PBM_EX_READ_RECORD_IND = 29,// 29 Read phonebook record indication eQMI_PBM_EX_WRITE_RECORD, // 30 Add/modify a phonebook record eQMI_PBM_EX_SEARCH_RECORDS, // 31 Search phonebook records eQMI_PBM_EX_READ_ALL_HIDDEN_RECS,// 32 Read all hidden phonebook records eQMI_PBM_SIM_INIT_DONE_IND, // 33 SIM initialization done indication }; // Enum to describe QMI LOC Message types enum eQMIMessageLOC:WORD { eQMI_LOC_CLIENT_REVISION = 32, // 032 Send client revision to service eQMI_LOC_REGISTER_EVENTS, // 033 Register for events/indications eQMI_LOC_START, // 034 Start GPS session eQMI_LOC_STOP, // 035 Start GPS session eQMI_LOC_POSITION_REPORT_IND, // 036 Position report indication eQMI_LOC_GNSS_SAT_INFO_IND, // 037 GNSS satellite info indication eQMI_LOC_NMEA_IND, // 038 NMEA sentence indication eQMI_LOC_NETWORK_REQ_IND, // 039 Network initiated request indication eQMI_LOC_INJECT_TIME_REQ_IND, // 040 Inject time request indication eQMI_LOC_INJECT_ORBITS_REQ_IND, // 041 Inject predicted orbits req ind eQMI_LOC_INJECT_POS_REQ_IND, // 042 Inject position request indication eQMI_LOC_ENGINE_STATE_IND, // 043 Engine state indication eQMI_LOC_FIX_SESSION_STATE_IND, // 044 Fi session state indication eQMI_LOC_WIFI_REQ_IND, // 045 Wi-Fi request indication eQMI_LOC_SENSOR_DATA_IND, // 046 Sensor streaming ready status ind eQMI_LOC_INJECT_TIME_SYNC_IND, // 047 Inject time sync data indication eQMI_LOC_SPI_STREAM_REQ_IND, // 048 SPI streaming reports req indication eQMI_LOC_SVR_CONNECTION_REQ_IND, // 049 Server connection req indication eQMI_LOC_GET_REV_REQ, // 050 Get service revision eQMI_LOC_GET_REV_REQ_IND = 50, // 050 Get service revision indication eQMI_LOC_GET_FIX_CRIT, // 051 Get fix criteria eQMI_LOC_GET_FIX_CRIT_IND = 51, // 051 Get fix criteria indication eQMI_LOC_NI_USER_RSP, // 052 Network initiated user response eQMI_LOC_NI_USER_RSP_IND = 52, // 052 Network initiated user response ind eQMI_LOC_INJECT_ORBITS, // 053 Inject predicted orbits data eQMI_LOC_INJECT_ORBITS_IND = 53, // 053 Inject predicted orbits indication eQMI_LOC_GET_ORBIT_SRC, // 054 Get predicted orbits data source eQMI_LOC_GET_ORBIT_SRC_IND = 54, // 054 Get predicted orbits data source ind eQMI_LOC_GET_ORBIT_VLD, // 055 Get predicted orbits data validity eQMI_LOC_GET_ORBIT_VLD_IND = 55, // 055 Get predicted orbits validity ind eQMI_LOC_INJECT_UTC, // 056 Inject UTC time eQMI_LOC_INJECT_UTC_IND = 56, // 056 Inject UTC time indication eQMI_LOC_INJECT_POS, // 057 Inject position eQMI_LOC_INJECT_POS_IND = 57, // 057 Inject position indication eQMI_LOC_SET_ENG_LOCK, // 058 Set engine lock eQMI_LOC_SET_ENG_LOCK_IND = 58, // 058 Set engine lock indication eQMI_LOC_GET_ENG_LOCK, // 059 Get engine lock eQMI_LOC_GET_ENG_LOCK_IND = 59, // 059 Get engine lock indication eQMI_LOC_SET_SBAS_CFG, // 060 Set SBAS config eQMI_LOC_SET_SBAS_CFG_IND = 60, // 060 Set SBAS config indication eQMI_LOC_GET_SBAS_CFG, // 061 Get SBAS config eQMI_LOC_GET_SBAS_CFG_IND = 61, // 061 Get SBAS config indication eQMI_LOC_SET_NMEA_TYPS, // 062 Set NMEA sentence types eQMI_LOC_SET_NMEA_TYPS_IND = 62, // 062 Set NMEA sentence types indication eQMI_LOC_GET_NMEA_TYPS, // 063 Get NMEA sentence types eQMI_LOC_GET_NMEA_TYPS_IND = 63, // 063 Get NMEA sentence types indication eQMI_LOC_SET_LPM_CFG, // 064 Set low power mode config eQMI_LOC_SET_LPM_CFG_IND = 64, // 064 Set low power mode config indication eQMI_LOC_GET_LPM_CFG, // 065 Get low power mode config eQMI_LOC_GET_LPM_CFG_IND = 65, // 065 Get low power mode config indication eQMI_LOC_SET_SERVER, // 066 Set A-GPS server eQMI_LOC_SET_SERVER_IND = 66, // 066 Set A-GPS server indication eQMI_LOC_GET_SERVER, // 067 Set A-GPS server eQMI_LOC_GET_SERVER_IND = 67, // 067 Set A-GPS server indication eQMI_LOC_DEL_ASST_DATA, // 068 Delete assistance data eQMI_LOC_DEL_ASST_DATA_IND = 68, // 068 Delete assistance data indication eQMI_LOC_SET_XTRA_T, // 069 Set XTRA_T session control eQMI_LOC_SET_XTRA_T_IND = 69, // 069 Set XTRA_T session control indication eQMI_LOC_GET_XTRA_T, // 070 Get XTRA_T session control eQMI_LOC_GET_XTRA_T_IND = 70, // 070 Get XTRA_T session control indication eQMI_LOC_INJECT_WIFI, // 071 Inject Wi-Fi info eQMI_LOC_INJECT_WIFI_IND = 71, // 071 Inject Wi-Fi info indication eQMI_LOC_NOTIFY_WIFI, // 072 Notify server of Wi-Fi status eQMI_LOC_NOTIFY_WIFI_IND = 72, // 072 Notify server of Wi-Fi status ind eQMI_LOC_GET_REG_EVENTS, // 073 Get registered event status eQMI_LOC_GET_REG_EVENTS_IND = 73,// 073 Get registered event status ind eQMI_LOC_SET_OP_MODE, // 074 Set operation mode eQMI_LOC_SET_OP_MODE_IND = 74, // 074 Set operation mode indication eQMI_LOC_GET_OP_MODE, // 075 Get operation mode eQMI_LOC_GET_OP_MODE_IND = 75, // 075 Get operation mode indication eQMI_LOC_SET_SPI_STATUS, // 076 Set SPI status eQMI_LOC_SET_SPI_STATUS_IND = 76,// 076 Set SPI status indication eQMI_LOC_INJECT_SENSOR, // 077 Inject sensor data eQMI_LOC_INJECT_SENSOR_IND = 77, // 077 Inject sensor data indication eQMI_LOC_INJ_TIME_SYNC, // 078 Inject time sync data eQMI_LOC_INJ_TIME_SYNC_IND = 78, // 078 Inject time sync data indication eQMI_LOC_SET_CRADLE, // 079 Set cradle mount config eQMI_LOC_SET_CRADLE_IND = 79, // 079 Set cradle mount config indication eQMI_LOC_GET_CRADLE, // 080 Get cradle mount config eQMI_LOC_GET_CRADLE_IND = 80, // 080 Get cradle mount config indication eQMI_LOC_SET_EXT_POWER, // 081 Set external power config eQMI_LOC_SET_EXT_POWER_IND = 81, // 081 Set external power config indication eQMI_LOC_GET_EXT_POWER, // 082 Get external power config eQMI_LOC_GET_EXT_POWER_IND = 82, // 082 Get external power config indication eQMI_LOC_INFORM_CONN, // 083 Inform service of connection status eQMI_LOC_INFORM_CONN_IND = 83, // 083 Inform connection status indication eQMI_LOC_SET_PROTO_CFG, // 084 Set protocol config eQMI_LOC_SET_PROTO_CFG_IND = 84, // 084 Set protocol config indication eQMI_LOC_GET_PROTO_CFG, // 085 Get protocol config eQMI_LOC_GET_PROTO_CFG_IND = 85, // 085 Get protocol config indication eQMI_LOC_SET_SENSOR_CFG, // 086 Set sensor control config eQMI_LOC_SET_SENSOR_CFG_IND = 86,// 086 Set sensor control config indication eQMI_LOC_GET_SENSOR_CFG, // 087 Get sensor control config eQMI_LOC_GET_SENSOR_CFG_IND = 87,// 087 Get sensor control config indication eQMI_LOC_SET_SENSOR_PRP, // 088 Set sensor properties eQMI_LOC_SET_SENSOR_PRP_IND = 88,// 088 Set sensor properties indication eQMI_LOC_GET_SENSOR_PRP, // 089 Get sensor properties eQMI_LOC_GET_SENSOR_PRP_IND = 89,// 089 Get sensor properties indication eQMI_LOC_SET_SENSOR_PRF, // 090 Set sensor performance control eQMI_LOC_SET_SENSOR_PRF_IND = 90,// 090 Set sensor performance control ind eQMI_LOC_GET_SENSOR_PRF, // 091 Get sensor performance control eQMI_LOC_GET_SENSOR_PRF_IND = 91,// 091 Get sensor performance control ind eQMI_LOC_INJ_SUPL_CERT, // 092 Inject SUPL certificate eQMI_LOC_INJ_SUPL_CERT_IND = 92, // 092 Inject SUPL certificate indication eQMI_LOC_DEL_SUPL_CERT, // 093 Delete SUPL certificate eQMI_LOC_DEL_SUPL_CERT_IND = 93, // 093 Delete SUPL certificate indication eQMI_LOC_SET_ENGINE_CFG, // 094 Set position engine config eQMI_LOC_SET_ENGINE_CFG_IND = 94,// 094 Set position engine config ind eQMI_LOC_GET_ENGINE_CFG, // 095 Get position engine config eQMI_LOC_GET_ENGINE_CFG_IND = 95,// 095 Get position engine config ind eQMI_LOC_GEOFENCE_NOTIF_IND, // 096 Geofence notification indication eQMI_LOC_GEOFENCE_ALERT_IND, // 097 Geofence alert indication eQMI_LOC_GEOFENCE_BREACH_IND, // 098 Geofence breach indication eQMI_LOC_ADD_GEOFENCE, // 099 Add circular geofence eQMI_LOC_ADD_GEOFENCE_IND = 99, // 099 Add circular geofence indication eQMI_LOC_DEL_GEOFENCE, // 100 Delete geofence eQMI_LOC_DEL_GEOFENCE_IND = 100, // 100 Delete geofence indication eQMI_LOC_QRY_GEOFENCE, // 101 Query geofence eQMI_LOC_QRY_GEOFENCE_IND = 101, // 101 Query geofence indication eQMI_LOC_EDIT_GEOFENCE, // 102 Edit geofence eQMI_LOC_EDIT_GEOFENCE_IND = 102,// 102 Edit geofence indication eQMI_LOC_GET_BEST_POS, // 103 Get best available position eQMI_LOC_GET_BEST_POS_IND = 103, // 103 Get best available position ind eQMI_LOC_INJ_MOTION, // 104 Inject motion data eQMI_LOC_INJ_MOTION_IND = 104, // 104 Inject motion data indication eQMI_LOC_GET_NI_GF_IDS, // 105 Get NI geofence ID list eQMI_LOC_GET_NI_GF_IDS_IND = 105,// 105 Get NI geofence ID list indication }; // Enum to describe QMI CAT Message types enum eQMIMessageCAT:WORD { eQMI_CAT_RESET = 0, // 00 Reset CAT service state variables eQMI_CAT_SET_EVENT, // 01 Set new message report conditions eQMI_CAT_EVENT_IND = 1, // 01 New message report indication eQMI_CAT_GET_STATE = 32, // 32 Get service state information eQMI_CAT_SEND_TERMINAL, // 33 Send a terminal response eQMI_CAT_SEND_ENVELOPE, // 34 Send an envelope command eQMI_CAT_GET_EVENT, // 35 Get last message report eQMI_CAT_SEND_DECODED_TERMINAL, // 36 Send a decoded terminal response eQMI_CAT_SEND_DECODED_ENVELOPE, // 37 Send a decoded envelope command eQMI_CAT_EVENT_CONFIRMATION, // 38 Event confirmation eQMI_CAT_SCWS_OPEN_CHANNEL, // 39 Open a channel to a SCWS eQMI_CAT_SCWS_OPEN_IND = 39, // 39 SCWS open channel indication eQMI_CAT_SCWS_CLOSE_CHANNEL, // 40 Close a channel to a SCWS eQMI_CAT_SCWS_CLOSE_IND = 40, // 40 SCWS close channel indication eQMI_CAT_SCWS_SEND_DATA, // 41 Send data to a SCWS eQMI_CAT_SCWS_SEND_IND = 41, // 41 SCWS send data indication eQMI_CAT_SCWS_DATA_AVAILABLE, // 42 Indicate that data is available eQMI_CAT_SCWS_CHANNEL_STATUS, // 43 Provide channel status eQMI_CAT_GET_TERMINAL_PROFILE, // 44 Get current modem terminal profile eQMI_CAT_SET_CONFIG, // 45 Set configuration eQMI_CAT_GET_CONFIG, // 46 Get configuration }; /*=========================================================================*/ // eQMIMessagePDC Enumeration // QMI PDC Service Type Message ID Enumeration /*=========================================================================*/ enum eQMIMessagePDC:WORD { eQMI_PDC_RESET = 0, // 00 Reset the PDC service eQMI_PDC_REG_INDICATIONS = 32, // 32 Register for indications eQMI_PDC_CFG_CHANGE_IND, // 33 Config change indication eQMI_PDC_GET_CFG, // 34 Get selected config eQMI_PDC_GET_CFG_IND = 34, // 34 Get selected config indication eQMI_PDC_SET_CFG, // 35 Set selected config eQMI_PDC_SET_CFG_IND = 35, // 35 Set selected config indication eQMI_PDC_LIST_CFGS, // 36 List configs eQMI_PDC_LIST_CFGS_IND = 36, // 36 List configs indication eQMI_PDC_DEL_CFG, // 37 Delete config eQMI_PDC_DEL_CFG_IND = 37, // 37 Delete config indication eQMI_PDC_LOAD_CFG, // 38 Load config eQMI_PDC_LOAD_CFG_IND = 38, // 38 Load config indication eQMI_PDC_ACTIVATE_CFG, // 39 Activate config eQMI_PDC_ACTIVATE_CFG_IND = 39, // 39 Activate config indication eQMI_PDC_GET_CFG_INFO, // 40 Get config info eQMI_PDC_GET_CFG_INFO_IND = 40, // 40 Get config info indication eQMI_PDC_GET_CFG_LIMITS, // 41 Get config limits eQMI_PDC_GET_CFG_LIMITS_IND = 41, // 41 Get config limits indication }; // Enum to describe QMI AUTH AKA Result enum eQMIAUTHAKAResult:UINT8 { eQMIAUTHAKAResult_Success = 0, eQMIAUTHAKAResult_SyncFailure = 1, eQMIAUTHAKAResult_Failure = 2, }; // Enum to describe QMI AUTH AKA Version enum eQMIAUTHAKAVersion:UINT8 { eQMIAUTHAKAVersion_Version1 = 0, eQMIAUTHAKAVersion_Version2 = 1, }; // Enum to describe QMI AUTH EAP Result enum eQMIAUTHEAPResult:UINT8 { eQMIAUTHEAPResult_Success = 0, eQMIAUTHEAPResult_Failure = 1, }; // Enum to describe QMI AUTH SIM AKA Algorithm enum eQMIAUTHSIMAKAAlgorithm:UINT32 { eQMIAUTHSIMAKAAlgorithm_None = 0, eQMIAUTHSIMAKAAlgorithm_SHA1 = 1, eQMIAUTHSIMAKAAlgorithm_MILENAGE = 2, eQMIAUTHSIMAKAAlgorithm_CAVE = 3, eQMIAUTHSIMAKAAlgorithm_GSM = 4, eQMIAUTHSIMAKAAlgorithm_USIMGSM = 5, }; // Enum to describe QMI CAT Activate Targets enum eQMICATActivateTargets:UINT8 { eQMICATActivateTargets_UICCCLFInterface = 1, }; // Enum to describe QMI CAT Address NPI enum eQMICATAddressNPI:UINT8 { eQMICATAddressNPI_Unknown = 0, eQMICATAddressNPI_ISDNTelephony = 1, eQMICATAddressNPI_DataNPI = 2, eQMICATAddressNPI_TelexNPI = 3, eQMICATAddressNPI_PrivateNPI = 4, eQMICATAddressNPI_ExtensionIsReserved = 15, }; // Enum to describe QMI CAT Address TON enum eQMICATAddressTON:UINT8 { eQMICATAddressTON_Unknown = 0, eQMICATAddressTON_InternationalNumber = 1, eQMICATAddressTON_NationalNumber = 2, eQMICATAddressTON_NetworkSpecificNumber = 3, }; // Enum to describe QMI CAT Address Type enum eQMICATAddressType:UINT8 { eQMICATAddressType_NoAddressGiven = 1, eQMICATAddressType_Dynamic = 2, eQMICATAddressType_IPv4 = 3, eQMICATAddressType_IPv6 = 4, }; // Enum to describe QMI CAT Alpha ID Command Type enum eQMICATAlphaIDCommandType:UINT8 { eQMICATAlphaIDCommandType_SendSMSProactiveCommand = 1, }; // Enum to describe QMI CAT Bearer enum eQMICATBearer:UINT8 { eQMICATBearer_SMS = 0, eQMICATBearer_CSD = 1, eQMICATBearer_USSD = 2, eQMICATBearer_GPRS = 3, eQMICATBearer_Default = 4, }; // Enum to describe QMI CAT Bearer Capability Repeat Indicator enum eQMICATBearerCapabilityRepeatIndicator:UINT8 { eQMICATBearerCapabilityRepeatIndicator_AlternateMode = 0, eQMICATBearerCapabilityRepeatIndicator_SequentialMode = 1, }; // Enum to describe QMI CAT Browser Termination Causes enum eQMICATBrowserTerminationCauses:UINT32 { eQMICATBrowserTerminationCauses_UserTerminated = 0, eQMICATBrowserTerminationCauses_ErrorTerminated = 1, }; // Enum to describe QMI CAT CSD Bearer Name enum eQMICATCSDBearerName:UINT8 { eQMICATCSDBearerName_DataCircuitAsyncUDIOr31kHzModem = 0, eQMICATCSDBearerName_DataCircuitSyncUDIOr31kHzModem = 1, eQMICATCSDBearerName_PADAccessAsyncUDI = 2, eQMICATCSDBearerName_PacketAccessSyncUDI = 3, eQMICATCSDBearerName_DataCircuitAsyncRDI = 4, eQMICATCSDBearerName_DataCircuitSyncRDI = 5, eQMICATCSDBearerName_PADAccessAsyncRDI = 6, eQMICATCSDBearerName_PacketAccessSyncRDI = 7, }; // Enum to describe QMI CAT Call Control Result enum eQMICATCallControlResult:UINT8 { eQMICATCallControlResult_AllowedWithNoModification = 0, eQMICATCallControlResult_NotAllowed = 1, eQMICATCallControlResult_AllowedWithModification = 2, }; // Enum to describe QMI CAT Call Setup Requirement enum eQMICATCallSetupRequirement:UINT8 { eQMICATCallSetupRequirement_NoOtherCalls = 0, eQMICATCallSetupRequirement_HoldActiveCalls = 1, eQMICATCallSetupRequirement_DisconnectActiveCalls = 2, }; // Enum to describe QMI CAT Channel State enum eQMICATChannelState:UINT8 { eQMICATChannelState_ClosedState = 0, eQMICATChannelState_ListenState = 1, eQMICATChannelState_EstablishedState = 2, }; // Enum to describe QMI CAT Command Format enum eQMICATCommandFormat:UINT8 { eQMICATCommandFormat_Raw = 1, eQMICATCommandFormat_Decoded = 2, }; // Enum to describe QMI CAT Command ID enum eQMICATCommandID:UINT8 { eQMICATCommandID_DisplayText = 1, eQMICATCommandID_GetInkey = 2, eQMICATCommandID_GetInput = 3, eQMICATCommandID_LaunchBrowser = 4, eQMICATCommandID_PlayTone = 5, eQMICATCommandID_SelectItem = 6, eQMICATCommandID_SendSMS = 7, eQMICATCommandID_SendSS = 8, eQMICATCommandID_SendUSSD = 9, eQMICATCommandID_SetupCallUserConfiguration = 10, eQMICATCommandID_SetupCallAlphaDisplay = 11, eQMICATCommandID_SetupMenu = 12, eQMICATCommandID_SetupIdleText = 13, eQMICATCommandID_ProvideLocalInformationLanguage = 14, eQMICATCommandID_SendDTMF = 15, eQMICATCommandID_LanguageNotification = 16, eQMICATCommandID_SetupEventUserActivity = 17, eQMICATCommandID_SetupEventIdleScreenNotify = 18, eQMICATCommandID_SetupEventLanguageSelectionNotify = 19, eQMICATCommandID_OpenChannel = 20, eQMICATCommandID_CloseChannel = 21, eQMICATCommandID_ReceiveData = 22, eQMICATCommandID_SendData = 23, eQMICATCommandID_Activate = 24, eQMICATCommandID_SetupEventHCIConnectivity = 25, }; // Enum to describe QMI CAT Config Modes enum eQMICATConfigModes:UINT8 { eQMICATConfigModes_DisabledMode = 0, eQMICATConfigModes_GobiMode = 1, eQMICATConfigModes_AndroidMode = 2, eQMICATConfigModes_DecodedMode = 3, eQMICATConfigModes_DecodedPullOnlyMode = 4, eQMICATConfigModes_CustomRawMode = 5, eQMICATConfigModes_CustomDecodedMode = 6, }; // Enum to describe QMI CAT Connection Element enum eQMICATConnectionElement:UINT8 { eQMICATConnectionElement_Transparent = 0, eQMICATConnectionElement_Nontransparent = 1, eQMICATConnectionElement_BothTransparentPreferred = 2, eQMICATConnectionElement_BothNontransparentPreferred = 3, }; // Enum to describe QMI CAT Data Coding Scheme enum eQMICATDataCodingScheme:UINT8 { eQMICATDataCodingScheme_7BitGSM = 0, eQMICATDataCodingScheme_8BitGSM = 1, eQMICATDataCodingScheme_UCS2 = 2, }; // Enum to describe QMI CAT Decoded Envelope Command enum eQMICATDecodedEnvelopeCommand:UINT16 { eQMICATDecodedEnvelopeCommand_MenuSelection = 1, eQMICATDecodedEnvelopeCommand_EventDownloadLanguageSelection = 2, eQMICATDecodedEnvelopeCommand_EventDownloadUserActivity = 3, eQMICATDecodedEnvelopeCommand_EventDownloadIdleScreenAvailable = 4, eQMICATDecodedEnvelopeCommand_SendCallControl = 5, eQMICATDecodedEnvelopeCommand_EventDownloadHCIConnectivity = 6, eQMICATDecodedEnvelopeCommand_EventBrowserTermination = 7, }; // Enum to describe QMI CAT Deliver Error SDU enum eQMICATDeliverErrorSDU:UINT8 { eQMICATDeliverErrorSDU_No = 0, eQMICATDeliverErrorSDU_Yes = 1, eQMICATDeliverErrorSDU_NoDetect = 2, eQMICATDeliverErrorSDU_SubscribedValue = 3, }; // Enum to describe QMI CAT Delivery Order enum eQMICATDeliveryOrder:UINT8 { eQMICATDeliveryOrder_No = 0, eQMICATDeliveryOrder_Yes = 1, eQMICATDeliveryOrder_SubscribedValue = 2, }; // Enum to describe QMI CAT Display Icon Only enum eQMICATDisplayIconOnly:UINT8 { eQMICATDisplayIconOnly_DoNotDisplayTheIcon = 0, eQMICATDisplayIconOnly_DisplayOnlyTheIcon = 1, }; // Enum to describe QMI CAT Envelope Command Type enum eQMICATEnvelopeCommandType:UINT16 { eQMICATEnvelopeCommandType_MenuSelection = 1, eQMICATEnvelopeCommandType_EventDownloadUserActivity = 2, eQMICATEnvelopeCommandType_EventDownloadIdleScreenAvailable = 3, eQMICATEnvelopeCommandType_EventDownloadLanguageSelection = 4, eQMICATEnvelopeCommandType_UnknownType = 5, eQMICATEnvelopeCommandType_EventDownloadBrowserTermination = 6, eQMICATEnvelopeCommandType_SendCallControl = 7, eQMICATEnvelopeCommandType_EventDownloadHCIConnectivity = 8, }; // Enum to describe QMI CAT Help Available enum eQMICATHelpAvailable:UINT8 { eQMICATHelpAvailable_NoHelpIsAvailable = 0, eQMICATHelpAvailable_HelpIsAvailable = 1, }; // Enum to describe QMI CAT Help Request enum eQMICATHelpRequest:UINT8 { eQMICATHelpRequest_NoHelpIsRequested = 0, eQMICATHelpRequest_HelpIsRequested = 1, }; // Enum to describe QMI CAT High Priority enum eQMICATHighPriority:UINT8 { eQMICATHighPriority_DoNotClearTheScreen = 0, eQMICATHighPriority_ClearAnythingThatIsOnTheScreen = 1, }; // Enum to describe QMI CAT Icon Is Displayed enum eQMICATIconIsDisplayed:UINT8 { eQMICATIconIsDisplayed_No = 0, eQMICATIconIsDisplayed_Yes = 1, }; // Enum to describe QMI CAT Icon Qualifier enum eQMICATIconQualifier:UINT8 { eQMICATIconQualifier_IconIsSelfExplanatory = 0, eQMICATIconQualifier_IconIsNotSelfExplanatory = 1, }; // Enum to describe QMI CAT Image Coding Scheme enum eQMICATImageCodingScheme:UINT8 { eQMICATImageCodingScheme_Unknown = 0, eQMICATImageCodingScheme_Basic = 1, eQMICATImageCodingScheme_Color = 2, }; // Enum to describe QMI CAT Immediate Response enum eQMICATImmediateResponse:UINT8 { eQMICATImmediateResponse_No = 0, eQMICATImmediateResponse_Yes = 1, }; // Enum to describe QMI CAT Is CDMA SMS enum eQMICATIsCDMASMS:UINT8 { eQMICATIsCDMASMS_NotCDMASMS = 0, eQMICATIsCDMASMS_CDMASMS = 1, }; // Enum to describe QMI CAT Launch Mode enum eQMICATLaunchMode:UINT8 { eQMICATLaunchMode_LaunchIfNotAlreadyLaunched = 0, eQMICATLaunchMode_UseTheExistingBrowser = 1, eQMICATLaunchMode_CloseTheExistingBroswer = 2, }; // Enum to describe QMI CAT Next Action enum eQMICATNextAction:UINT8 { eQMICATNextAction_SetupCall = 0, eQMICATNextAction_SendSS = 1, eQMICATNextAction_SendUSSD = 2, eQMICATNextAction_SendShortMessage = 3, eQMICATNextAction_LaunchBrowser = 4, eQMICATNextAction_PlayTone = 5, eQMICATNextAction_DisplayText = 6, eQMICATNextAction_GetInkey = 7, eQMICATNextAction_GetInput = 8, eQMICATNextAction_SelectItem = 9, eQMICATNextAction_SetupMenu = 10, eQMICATNextAction_SetupIdleModeText = 11, eQMICATNextAction_EndOfTheProactiveSession = 12, eQMICATNextAction_ProvideLocalInformation = 13, }; // Enum to describe QMI CAT Notification Required enum eQMICATNotificationRequired:UINT8 { eQMICATNotificationRequired_NotificationIsNotRequired = 0, eQMICATNotificationRequired_NotificationIsRequired = 1, }; // Enum to describe QMI CAT On Demand Link Establish enum eQMICATOnDemandLinkEstablish:UINT8 { eQMICATOnDemandLinkEstablish_LinkIsNotRequired = 0, eQMICATOnDemandLinkEstablish_LinkIsRequired = 1, }; // Enum to describe QMI CAT PDP Type enum eQMICATPDPType:UINT8 { eQMICATPDPType_IP = 2, }; // Enum to describe QMI CAT Packet Data Protocol enum eQMICATPacketDataProtocol:UINT8 { eQMICATPacketDataProtocol_IP = 2, }; // Enum to describe QMI CAT Packing Required enum eQMICATPackingRequired:UINT8 { eQMICATPackingRequired_PackingIsNotRequired = 0, eQMICATPackingRequired_PackingIsRequired = 1, }; // Enum to describe QMI CAT Presentation enum eQMICATPresentation:UINT8 { eQMICATPresentation_NotSpecified = 0, eQMICATPresentation_DataValuePresentation = 1, eQMICATPresentation_NavigationPresentation = 2, }; // Enum to describe QMI CAT Proactive Session End Type enum eQMICATProactiveSessionEndType:UINT8 { eQMICATProactiveSessionEndType_EndProactiveSessionCommandReceivedFromTheCard = 1, eQMICATProactiveSessionEndType_EndProactiveSessionInternalToME = 2, }; // Enum to describe QMI CAT Redial Necessary enum eQMICATRedialNecessary:UINT8 { eQMICATRedialNecessary_RedialIsNotNecessary = 0, eQMICATRedialNecessary_RedialIsNecessary = 1, }; // Enum to describe QMI CAT Refresh Stage enum eQMICATRefreshStage:UINT16 { eQMICATRefreshStage_RefreshStart = 1, eQMICATRefreshStage_RefreshSuccess = 2, eQMICATRefreshStage_RefreshFailed = 3, }; // Enum to describe QMI CAT Response Command enum eQMICATResponseCommand:UINT8 { eQMICATResponseCommand_DisplayText = 1, eQMICATResponseCommand_GetInkey = 2, eQMICATResponseCommand_GetInput = 3, eQMICATResponseCommand_LaunchBrowser = 4, eQMICATResponseCommand_PlayTone = 5, eQMICATResponseCommand_SelectItemRequest = 6, eQMICATResponseCommand_SetupMenu = 7, eQMICATResponseCommand_SetupIdleText = 8, eQMICATResponseCommand_ProvideLocalInformationLanguage = 9, eQMICATResponseCommand_SetupEventUserActivity = 10, eQMICATResponseCommand_SetupEventIdleScreenActivity = 11, eQMICATResponseCommand_SetupEventLanguageSelectNotify = 12, eQMICATResponseCommand_LanguageNotification = 13, eQMICATResponseCommand_Activate = 14, eQMICATResponseCommand_SetupEventHCIConnectivity = 15, }; // Enum to describe QMI CAT Response Format enum eQMICATResponseFormat:UINT8 { eQMICATResponseFormat_SMSDefaultAlphabet = 0, eQMICATResponseFormat_YesOrNo = 1, eQMICATResponseFormat_NumericalOnly = 2, eQMICATResponseFormat_UCS2 = 3, eQMICATResponseFormat_ImmediateDigitResponse = 4, eQMICATResponseFormat_YesOrNoOrImmediateDigitalResponse = 5, }; // Enum to describe QMI CAT Response Packing Format enum eQMICATResponsePackingFormat:UINT8 { eQMICATResponsePackingFormat_UnpacketFormat = 0, eQMICATResponsePackingFormat_PacketFormat = 1, }; // Enum to describe QMI CAT Send Data Immediately enum eQMICATSendDataImmediately:UINT8 { eQMICATSendDataImmediately_NoStoreInTXBuffer = 0, eQMICATSendDataImmediately_Yes = 1, }; // Enum to describe QMI CAT Send Data Result enum eQMICATSendDataResult:UINT8 { eQMICATSendDataResult_Failed = 0, eQMICATSendDataResult_Success = 1, }; // Enum to describe QMI CAT Show User Input enum eQMICATShowUserInput:UINT8 { eQMICATShowUserInput_DeviceCanShowAllCharacters = 0, eQMICATShowUserInput_DeviceCanShowUserInput = 1, }; // Enum to describe QMI CAT Slot enum eQMICATSlot:UINT8 { eQMICATSlot_Slot1 = 1, eQMICATSlot_Slot2 = 2, }; // Enum to describe QMI CAT Softkey Selection enum eQMICATSoftkeySelection:UINT8 { eQMICATSoftkeySelection_SoftkeyIsNotSelected = 0, eQMICATSoftkeySelection_SoftkeyIsSelected = 1, }; // Enum to describe QMI CAT Specific Language Notfication enum eQMICATSpecificLanguageNotfication:UINT8 { eQMICATSpecificLanguageNotfication_No = 0, eQMICATSpecificLanguageNotfication_Yes = 1, }; // Enum to describe QMI CAT Time Units enum eQMICATTimeUnits:UINT8 { eQMICATTimeUnits_Minutes = 0, eQMICATTimeUnits_Seconds = 1, eQMICATTimeUnits_TenthsOfSeconds = 2, eQMICATTimeUnits_DurationIsNotPresent = 255, }; // Enum to describe QMI CAT Tone enum eQMICATTone:UINT8 { eQMICATTone_DialTone = 1, eQMICATTone_CalledSubscriberBusy = 2, eQMICATTone_Congestion = 3, eQMICATTone_RadioPathAck = 4, eQMICATTone_RadioPathNotAvailableCallDrop = 5, eQMICATTone_ErrorTone = 6, eQMICATTone_CallWaitingTone = 7, eQMICATTone_RingingTone = 8, eQMICATTone_GeneralBeep = 9, eQMICATTone_PositiveAckTone = 10, eQMICATTone_NegativeAckTone = 11, eQMICATTone_RingingToneSelectedByUser = 12, eQMICATTone_SMSAlertToneSelectedByUser = 13, eQMICATTone_NotInUse = 255, }; // Enum to describe QMI CAT Traffic Class enum eQMICATTrafficClass:UINT8 { eQMICATTrafficClass_Conversational = 0, eQMICATTrafficClass_Streaming = 1, eQMICATTrafficClass_Interactive = 2, eQMICATTrafficClass_Background = 3, eQMICATTrafficClass_SubscribedValue = 4, }; // Enum to describe QMI CAT Transport Protocol enum eQMICATTransportProtocol:UINT8 { eQMICATTransportProtocol_NotPresent = 0, eQMICATTransportProtocol_UDP = 1, eQMICATTransportProtocol_TCP = 2, }; // Enum to describe QMI CAT USSD Data Coding Scheme enum eQMICATUSSDDataCodingScheme:UINT8 { eQMICATUSSDDataCodingScheme_7BitGSM = 0, eQMICATUSSDDataCodingScheme_8BitGSM = 1, eQMICATUSSDDataCodingScheme_8BitUCS2 = 2, eQMICATUSSDDataCodingScheme_7BitUCS2 = 3, }; // Enum to describe QMI CAT User Confirmed enum eQMICATUserConfirmed:UINT8 { eQMICATUserConfirmed_No = 0, eQMICATUserConfirmed_Yes = 1, }; // Enum to describe QMI CAT User Control enum eQMICATUserControl:UINT8 { eQMICATUserControl_DoNotAllowUserToClearTheScreen = 0, eQMICATUserControl_AllowUserToClearTheScreen = 1, }; // Enum to describe QMI CTL Driver Data Formats enum eQMICTLDriverDataFormats { eQMICTLDriverDataFormats_QoSFlowHeaderAbsent = 0, eQMICTLDriverDataFormats_QoSFlowHeaderPresent = 1, }; // Enum to describe QMI CTL Power Save States enum eQMICTLPowerSaveStates { eQMICTLPowerSaveStates_Normal = 0, eQMICTLPowerSaveStates_Suspend = 1, eQMICTLPowerSaveStates_Powerdown = 2, }; // Enum to describe QMI CTL Service Types enum eQMICTLServiceTypes { eQMICTLServiceTypes_Control = 0, eQMICTLServiceTypes_WDS = 1, eQMICTLServiceTypes_DMS = 2, eQMICTLServiceTypes_NAS = 3, eQMICTLServiceTypes_QOS = 4, eQMICTLServiceTypes_WMS = 5, eQMICTLServiceTypes_PDS = 6, eQMICTLServiceTypes_AUTH = 7, eQMICTLServiceTypes_CAT = 224, eQMICTLServiceTypes_RMS = 225, eQMICTLServiceTypes_OMA = 226, }; // Enum to describe QMI Call End Reasons enum eQMICallEndReasons:UINT16 { eQMICallEndReasons_Unknown = 0, eQMICallEndReasons_Unspecified = 1, eQMICallEndReasons_ClientEnd = 2, eQMICallEndReasons_NoService = 3, eQMICallEndReasons_Fade = 4, eQMICallEndReasons_ReleaseNormal = 5, eQMICallEndReasons_AccInProgress = 6, eQMICallEndReasons_AccFailed = 7, eQMICallEndReasons_RedirectOrHandoff = 8, eQMICallEndReasons_CloseInProgress = 9, eQMICallEndReasons_AuthenticationFailed = 10, eQMICallEndReasons_InternalError = 11, eQMICallEndReasons_CDMALock = 500, eQMICallEndReasons_Intercept = 501, eQMICallEndReasons_Reorder = 502, eQMICallEndReasons_ReleaseServiceOptionRejected = 503, eQMICallEndReasons_IncomingCall = 504, eQMICallEndReasons_AlertStop = 505, eQMICallEndReasons_Activation = 506, eQMICallEndReasons_MaxAccessProbe = 507, eQMICallEndReasons_CCSNotSupportedByBS = 508, eQMICallEndReasons_NoResponseFromBS = 509, eQMICallEndReasons_RejectedByBS = 510, eQMICallEndReasons_Incompatible = 511, eQMICallEndReasons_AlreadyInTC = 512, eQMICallEndReasons_UserCallOrigDuringGPS = 513, eQMICallEndReasons_UserCallOrigDuringSMS = 514, eQMICallEndReasons_NoCDMAService = 515, eQMICallEndReasons_ConfFailed = 1000, eQMICallEndReasons_IncomingRejected = 1001, eQMICallEndReasons_NoGWService = 1002, eQMICallEndReasons_NetworkEnd = 1003, eQMICallEndReasons_LLCOrSNDCPFailure = 1004, eQMICallEndReasons_InsufficientResources = 1005, eQMICallEndReasons_ServiceOptionOutOfOrder = 1006, eQMICallEndReasons_NSAPIAlreadyUsed = 1007, eQMICallEndReasons_RegularPDPContextDeactivation = 1008, eQMICallEndReasons_NetworkFailure = 1009, eQMICallEndReasons_ReactivationRequested = 1010, eQMICallEndReasons_ProtocolError = 1011, eQMICallEndReasons_OperatorDeterminedBarring = 1012, eQMICallEndReasons_UnknownOrMissingAPN = 1013, eQMICallEndReasons_UnknownPDPAddressOrPDPType = 1014, eQMICallEndReasons_ActivationRejectedByGGSN = 1015, eQMICallEndReasons_ActivationRejectedUnspecified = 1016, eQMICallEndReasons_ServiceOptionNotSupported = 1017, eQMICallEndReasons_RequestedServiceOptionNotSubscribed = 1018, eQMICallEndReasons_QoSNotAccepted = 1019, eQMICallEndReasons_SemanticErrorInTheTFTOperation = 1020, eQMICallEndReasons_SyntacticalErrorInTheTFTOperation = 1021, eQMICallEndReasons_UnknownPDPContext = 1022, eQMICallEndReasons_SemanticErrorsInPacketFilters = 1023, eQMICallEndReasons_SyntacticalErrorsInPacketFilters = 1024, eQMICallEndReasons_PDPContextWithoutTFTAlreadyActivated = 1025, eQMICallEndReasons_InvalidTransactionIdentifierValue = 1026, eQMICallEndReasons_SemanticallyIncorrectMessage = 1027, eQMICallEndReasons_InvalidMandatoryInformation = 1028, eQMICallEndReasons_MessageTypeNonExistent = 1029, eQMICallEndReasons_MessageNotCompatibleWithState = 1030, eQMICallEndReasons_InformationElementNonexistent = 1031, eQMICallEndReasons_ConditionalInformationElementError = 1032, eQMICallEndReasons_MessageNotCompatibleWithProtocolState = 1033, eQMICallEndReasons_APNRestrictionValueIncompatibleWithActivePDPContext = 1034, eQMICallEndReasons_NoGPRSContextPresent = 1035, eQMICallEndReasons_RequestedFeatureNotSupported = 1036, eQMICallEndReasons_CDGenOrBusy = 1500, eQMICallEndReasons_CDBillOrAuth = 1501, eQMICallEndReasons_ChangeHDR = 1502, eQMICallEndReasons_ExitHDR = 1503, eQMICallEndReasons_HDRNoSession = 1504, eQMICallEndReasons_HDROrigDuringGPSFix = 1505, eQMICallEndReasons_HDRCSTimeout = 1506, eQMICallEndReasons_HDRReleasedByCM = 1507, }; // Enum to describe QMI Call History Types enum eQMICallHistoryTypes:UINT8 { eQMICallHistoryTypes_Full = 0, eQMICallHistoryTypes_IDsOnly = 1, }; // Enum to describe QMI Call Types enum eQMICallTypes:UINT8 { eQMICallTypes_NDIS = 0, eQMICallTypes_DUN = 1, }; // Enum to describe QMI Connection Status enum eQMIConnectionStatus:UINT8 { eQMIConnectionStatus_Disconnected = 1, eQMIConnectionStatus_Connected = 2, eQMIConnectionStatus_Suspended = 3, eQMIConnectionStatus_Authenticating = 4, }; // Enum to describe QMI DMS Activation States enum eQMIDMSActivationStates:UINT16 { eQMIDMSActivationStates_ServiceNotActivated = 0, eQMIDMSActivationStates_SerivceActivated = 1, eQMIDMSActivationStates_ActivationConnecting = 2, eQMIDMSActivationStates_ActivationInProgress = 3, eQMIDMSActivationStates_OTASPSecurityAuthenticated = 4, eQMIDMSActivationStates_OTASPNAMDownloaded = 5, eQMIDMSActivationStates_OTASPMDNDownloaded = 6, eQMIDMSActivationStates_OTASPIMSIDownloaded = 7, eQMIDMSActivationStates_OTASPPRLDownloaded = 8, eQMIDMSActivationStates_OTASPSPCDownloaded = 9, eQMIDMSActivationStates_OTASPSettingsCommitted = 10, }; // Enum to describe QMI DMS Activation Types enum eQMIDMSActivationTypes { eQMIDMSActivationTypes_OTASP = 0, }; // Enum to describe QMI DMS Data Service Capabilities 1 enum eQMIDMSDataServiceCapabilities1:UINT8 { eQMIDMSDataServiceCapabilities1_NoDataServicesSupported = 0, eQMIDMSDataServiceCapabilities1_OnlyCircuitSwitched = 1, eQMIDMSDataServiceCapabilities1_OnlyPacketSwitched = 2, eQMIDMSDataServiceCapabilities1_SimultaneousCircuitPacketSwitched = 3, eQMIDMSDataServiceCapabilities1_NonsimultaneousCircuitPacketSwitched = 4, }; // Enum to describe QMI DMS Image Types enum eQMIDMSImageTypes { eQMIDMSImageTypes_Modem = 0, eQMIDMSImageTypes_PRI = 1, }; // Enum to describe QMI DMS Lock States enum eQMIDMSLockStates:UINT8 { eQMIDMSLockStates_LockDisabled = 0, eQMIDMSLockStates_LockEnabled = 1, }; // Enum to describe QMI DMS Operating Modes enum eQMIDMSOperatingModes:UINT8 { eQMIDMSOperatingModes_Online = 0, eQMIDMSOperatingModes_LowPower = 1, eQMIDMSOperatingModes_FactoryTestMode = 2, eQMIDMSOperatingModes_Offline = 3, eQMIDMSOperatingModes_Reset = 4, eQMIDMSOperatingModes_Shutdown = 5, eQMIDMSOperatingModes_PersistentLowPower = 6, eQMIDMSOperatingModes_ModeOnlyLowPower = 7, eQMIDMSOperatingModes_GWNetworkTest = 8, }; // Enum to describe QMI DMS PIN Status enum eQMIDMSPINStatus:UINT8 { eQMIDMSPINStatus_PINUninitialized = 0, eQMIDMSPINStatus_PINEnabledUnverified = 1, eQMIDMSPINStatus_PINEnabledVerified = 2, eQMIDMSPINStatus_PINDisabled = 3, eQMIDMSPINStatus_PINBlocked = 4, eQMIDMSPINStatus_PINBlockedPermanently = 5, eQMIDMSPINStatus_PINUnblocked = 6, eQMIDMSPINStatus_PINChanged = 7, }; // Enum to describe QMI DMS Power Sources enum eQMIDMSPowerSources:UINT8 { eQMIDMSPowerSources_Battery = 0, eQMIDMSPowerSources_External = 1, }; // Enum to describe QMI DMS Radio Interfaces enum eQMIDMSRadioInterfaces:UINT8 { eQMIDMSRadioInterfaces_CDMA20001x = 1, eQMIDMSRadioInterfaces_CDMA2000HRPD = 2, eQMIDMSRadioInterfaces_GSM = 4, eQMIDMSRadioInterfaces_UMTS = 5, eQMIDMSRadioInterfaces_LTE = 8, eQMIDMSRadioInterfaces_TDS = 9, }; // Enum to describe QMI DMS Service Capabilities enum eQMIDMSServiceCapabilities:UINT32 { eQMIDMSServiceCapabilities_DataOnly = 1, eQMIDMSServiceCapabilities_VoiceOnly = 2, eQMIDMSServiceCapabilities_SimultaneousVoiceAndData = 3, eQMIDMSServiceCapabilities_NonsimultaneousVoiceAndData = 4, }; // Enum to describe QMI DMS Time References enum eQMIDMSTimeReferences:UINT32 { eQMIDMSTimeReferences_User = 0, }; // Enum to describe QMI DMS Timestamp Sources enum eQMIDMSTimestampSources:UINT16 { eQMIDMSTimestampSources_Device = 0, eQMIDMSTimestampSources_CDMANetwork = 1, eQMIDMSTimestampSources_CDMA1xEVDONetwork = 2, eQMIDMSTimestampSources_GSMNetwork = 3, eQMIDMSTimestampSources_WCDMANetwork = 4, eQMIDMSTimestampSources_GPSNetwork = 5, eQMIDMSTimestampSources_MFLONetwork = 6, }; // Enum to describe QMI DMS UIM Facility enum eQMIDMSUIMFacility:UINT8 { eQMIDMSUIMFacility_PNNetworkPersonalization = 0, eQMIDMSUIMFacility_PUNetworkSubsetPersonalization = 1, eQMIDMSUIMFacility_PPServiceProviderPersonalization = 2, eQMIDMSUIMFacility_PCCorporatePersonalization = 3, eQMIDMSUIMFacility_PFUIMPersonalization = 4, }; // Enum to describe QMI DMS UIM Facility States enum eQMIDMSUIMFacilityStates:UINT8 { eQMIDMSUIMFacilityStates_Deactivated = 0, eQMIDMSUIMFacilityStates_Activated = 1, eQMIDMSUIMFacilityStates_Block = 2, }; // Enum to describe QMI DMS UIM States enum eQMIDMSUIMStates:UINT8 { eQMIDMSUIMStates_InitializationCompleted = 0, eQMIDMSUIMStates_InitializationFailed = 1, eQMIDMSUIMStates_NotPresent = 2, eQMIDMSUIMStates_StateUnavailable = 255, }; // Enum to describe QMI Data Bearer Technologies enum eQMIDataBearerTechnologies:UINT8 { eQMIDataBearerTechnologies_CDMA20001x = 1, eQMIDataBearerTechnologies_CDMA20001xEVDORev0 = 2, eQMIDataBearerTechnologies_GPRS = 3, eQMIDataBearerTechnologies_WCDMA = 4, eQMIDataBearerTechnologies_CDMA20001xEVDORevA = 5, eQMIDataBearerTechnologies_EGPRS = 6, eQMIDataBearerTechnologies_HSDPAWCDMA = 7, eQMIDataBearerTechnologies_WCDMAHSUPA = 8, eQMIDataBearerTechnologies_HSDPAHSUPA = 9, eQMIDataBearerTechnologies_LTE = 10, eQMIDataBearerTechnologies_CDMA2000EHRPD = 11, eQMIDataBearerTechnologies_HSDPAPlusWCDMA = 12, eQMIDataBearerTechnologies_HSDPAPlusHSUPA = 13, eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA = 14, eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA = 15, eQMIDataBearerTechnologies_HSDPAPlus64QAM = 16, eQMIDataBearerTechnologies_HSDPAPlus64QAMHSUPA = 17, eQMIDataBearerTechnologies_TDSCDMA = 18, eQMIDataBearerTechnologies_TDSCDMAHSDPA = 19, eQMIDataBearerTechnologies_Unknown = 255, }; // Enum to describe QMI Dormancy Status enum eQMIDormancyStatus:UINT8 { eQMIDormancyStatus_TrafficChannelDormant = 1, eQMIDormancyStatus_TrafficChannelActive = 2, }; // Enum to describe QMI Erroneous SDU Deliveries enum eQMIErroneousSDUDeliveries:UINT8 { eQMIErroneousSDUDeliveries_Subscribe = 0, eQMIErroneousSDUDeliveries_NoDetection = 1, eQMIErroneousSDUDeliveries_ErroneousSDUIsDelivered = 2, eQMIErroneousSDUDeliveries_ErroneousSDUIsNotDelivered = 3, }; // Enum to describe QMI Errors enum eQMIErrors:UINT16 { eQMIErrors_None = 0, eQMIErrors_MalformedMessage = 1, eQMIErrors_NoMemory = 2, eQMIErrors_Internal = 3, eQMIErrors_Aborted = 4, eQMIErrors_ClientIDsExhausted = 5, eQMIErrors_UnabortableTransaction = 6, eQMIErrors_InvalidClientID = 7, eQMIErrors_NoThresholdsProvided = 8, eQMIErrors_InvalidHandle = 9, eQMIErrors_InvalidProfile = 10, eQMIErrors_InvalidPINID = 11, eQMIErrors_IncorrectPIN = 12, eQMIErrors_NoNetworkFound = 13, eQMIErrors_CallFailed = 14, eQMIErrors_OutOfCall = 15, eQMIErrors_NotProvisioned = 16, eQMIErrors_MissingArgument = 17, eQMIErrors_ArgumentTooLong = 19, eQMIErrors_InvalidTransactionID = 22, eQMIErrors_DeviceInUse = 23, eQMIErrors_NetworkUnsupported = 24, eQMIErrors_DeviceUnsupported = 25, eQMIErrors_NoEffect = 26, eQMIErrors_NoFreeProfile = 27, eQMIErrors_InvalidPDPType = 28, eQMIErrors_InvalidTechnologyPreference = 29, eQMIErrors_InvalidProfileType = 30, eQMIErrors_InvalidServiceType = 31, eQMIErrors_InvalidRegisterAction = 32, eQMIErrors_InvalidPSAttachAction = 33, eQMIErrors_AuthenticationFailed = 34, eQMIErrors_PINBlocked = 35, eQMIErrors_PINAlwaysBlocked = 36, eQMIErrors_UIMUninitialized = 37, eQMIErrors_MaximumQoSRequestsInUse = 38, eQMIErrors_IncorrectFlowFilter = 39, eQMIErrors_NetworkQoSUnaware = 40, eQMIErrors_InvalidQoSID = 41, eQMIErrors_QoSUnavailable = 42, eQMIErrors_FlowSuspended = 43, eQMIErrors_GeneralError = 46, eQMIErrors_UnknownError = 47, eQMIErrors_InvalidArgument = 48, eQMIErrors_InvalidIndex = 49, eQMIErrors_NoEntry = 50, eQMIErrors_DeviceStorageFull = 51, eQMIErrors_DeviceNotReady = 52, eQMIErrors_NetworkNotReady = 53, eQMIErrors_WMSCauseCode = 54, eQMIErrors_WMSMessageNotSent = 55, eQMIErrors_WMSMessageDeliveryFailure = 56, eQMIErrors_WMSInvalidMessageID = 57, eQMIErrors_WMSEncoding = 58, eQMIErrors_AuthenticationLock = 59, eQMIErrors_InvalidTransition = 60, eQMIErrors_SessionInactive = 65, eQMIErrors_SessionInvalid = 66, eQMIErrors_SessionOwnership = 67, eQMIErrors_InsufficientResources = 68, eQMIErrors_Disabled = 69, eQMIErrors_InvalidOperation = 70, eQMIErrors_InvalidQMICommand = 71, eQMIErrors_WMSTPDUType = 72, eQMIErrors_WMSSMSCAddress = 73, eQMIErrors_InformationUnavailable = 74, eQMIErrors_SegmentTooLong = 75, eQMIErrors_SegmentOrder = 76, eQMIErrors_BundlingNotSupported = 77, eQMIErrors_SIMFileNotFound = 80, eQMIErrors_AccessDenied = 82, eQMIErrors_HardwareRestricted = 83, eQMIErrors_CATEventRegistrationFailed = 61441, eQMIErrors_CATInvalidTerminalResponse = 61442, eQMIErrors_CATInvalidEnvelopeCommand = 61443, eQMIErrors_CATEnvelopeCommandBusy = 61444, eQMIErrors_CATEnvelopeCommandFailed = 61445, }; // Enum to describe QMI HA/AAA Key States enum eQMIHAAAAKeyStates:UINT8 { eQMIHAAAAKeyStates_Unset = 0, eQMIHAAAAKeyStates_SetDefault = 1, eQMIHAAAAKeyStates_SetModified = 2, }; // Enum to describe QMI LOC Altitude Assumed enum eQMILOCAltitudeAssumed:UINT32 { eQMILOCAltitudeAssumed_AltitudeIsCalculated = 0, eQMILOCAltitudeAssumed_AltitudeIsAssumed = 1, }; // Enum to describe QMI LOC Altitude Source enum eQMILOCAltitudeSource:UINT32 { eQMILOCAltitudeSource_Unknown = 0, eQMILOCAltitudeSource_GPS = 1, eQMILOCAltitudeSource_CellID = 2, eQMILOCAltitudeSource_EnhancedCellID = 3, eQMILOCAltitudeSource_WiFi = 4, eQMILOCAltitudeSource_Terrestrial = 5, eQMILOCAltitudeSource_TerrestrialHybrid = 6, eQMILOCAltitudeSource_AltitudeDatabase = 7, eQMILOCAltitudeSource_BarometricAltimeter = 8, eQMILOCAltitudeSource_Other = 9, }; // Enum to describe QMI LOC Confidence enum eQMILOCConfidence:UINT32 { eQMILOCConfidence_Low = 1, eQMILOCConfidence_Medium = 2, eQMILOCConfidence_High = 3, }; // Enum to describe QMI LOC Connection Request Type enum eQMILOCConnectionRequestType { eQMILOCConnectionRequestType_Open = 1, eQMILOCConnectionRequestType_Close = 2, }; // Enum to describe QMI LOC Connection Status enum eQMILOCConnectionStatus:UINT32 { eQMILOCConnectionStatus_Success = 1, eQMILOCConnectionStatus_Failure = 2, }; // Enum to describe QMI LOC Control Mode enum eQMILOCControlMode:UINT32 { eQMILOCControlMode_Automatic = 0, eQMILOCControlMode_Forced = 1, }; // Enum to describe QMI LOC Coverage enum eQMILOCCoverage:UINT32 { eQMILOCCoverage_NotSpecified = 0, eQMILOCCoverage_Point = 1, eQMILOCCoverage_Full = 2, }; // Enum to describe QMI LOC Cradle Mount State enum eQMILOCCradleMountState:UINT32 { eQMILOCCradleMountState_NotMounted = 0, eQMILOCCradleMountState_Mounted = 1, eQMILOCCradleMountState_Unknown = 2, }; // Enum to describe QMI LOC Data Coding Scheme enum eQMILOCDataCodingScheme:UINT32 { eQMILOCDataCodingScheme_German = 12, eQMILOCDataCodingScheme_English = 13, eQMILOCDataCodingScheme_Italian = 14, eQMILOCDataCodingScheme_French = 15, eQMILOCDataCodingScheme_Spanish = 16, eQMILOCDataCodingScheme_Dutch = 17, eQMILOCDataCodingScheme_Swedish = 18, eQMILOCDataCodingScheme_Danish = 19, eQMILOCDataCodingScheme_Portuguese = 20, eQMILOCDataCodingScheme_Finnish = 21, eQMILOCDataCodingScheme_Norwegian = 22, eQMILOCDataCodingScheme_Greek = 23, eQMILOCDataCodingScheme_Turkish = 24, eQMILOCDataCodingScheme_Hungarian = 25, eQMILOCDataCodingScheme_Polish = 26, eQMILOCDataCodingScheme_Unspecified = 27, eQMILOCDataCodingScheme_UTF8 = 28, eQMILOCDataCodingScheme_UCS2 = 29, eQMILOCDataCodingScheme_GSMDefault = 30, }; // Enum to describe QMI LOC Encoding Scheme enum eQMILOCEncodingScheme:UINT32 { eQMILOCEncodingScheme_Octet = 0, eQMILOCEncodingScheme_EXNProtocolMessage = 1, eQMILOCEncodingScheme_ASCII = 2, eQMILOCEncodingScheme_IA5 = 3, eQMILOCEncodingScheme_Unicode = 4, eQMILOCEncodingScheme_ShiftJIS = 5, eQMILOCEncodingScheme_Korean = 6, eQMILOCEncodingScheme_LatinHebrew = 7, eQMILOCEncodingScheme_Latin = 8, eQMILOCEncodingScheme_GSM = 9, }; // Enum to describe QMI LOC Engine State enum eQMILOCEngineState { eQMILOCEngineState_On = 1, eQMILOCEngineState_Off = 2, }; // Enum to describe QMI LOC Fix Recurrence Type enum eQMILOCFixRecurrenceType:UINT32 { eQMILOCFixRecurrenceType_RequestPeriodicFixes = 1, eQMILOCFixRecurrenceType_RequestSingleFix = 2, }; // Enum to describe QMI LOC Format Type enum eQMILOCFormatType:UINT32 { eQMILOCFormatType_LogicalName = 0, eQMILOCFormatType_EmailAddress = 1, eQMILOCFormatType_MSISDN = 2, eQMILOCFormatType_URL = 3, eQMILOCFormatType_SIPURL = 4, eQMILOCFormatType_MIN = 5, eQMILOCFormatType_MDN = 6, eQMILOCFormatType_IMSPublicIdentity = 7, eQMILOCFormatType_OSSUnknown = 2147483647, }; // Enum to describe QMI LOC Geofence Breach Type enum eQMILOCGeofenceBreachType { eQMILOCGeofenceBreachType_Entering = 1, eQMILOCGeofenceBreachType_Leaving = 2, }; // Enum to describe QMI LOC Geofence General Alert enum eQMILOCGeofenceGeneralAlert:UINT32 { eQMILOCGeofenceGeneralAlert_GNSSUnavailable = 1, eQMILOCGeofenceGeneralAlert_GNSSAvailable = 2, eQMILOCGeofenceGeneralAlert_OOS = 3, eQMILOCGeofenceGeneralAlert_TimeInvalid = 4, }; // Enum to describe QMI LOC Geofence Operation Mode enum eQMILOCGeofenceOperationMode { eQMILOCGeofenceOperationMode_Added = 1, eQMILOCGeofenceOperationMode_Deleted = 2, eQMILOCGeofenceOperationMode_Edited = 3, }; // Enum to describe QMI LOC Geofence Origin enum eQMILOCGeofenceOrigin:UINT32 { eQMILOCGeofenceOrigin_Network = 1, eQMILOCGeofenceOrigin_Device = 2, }; // Enum to describe QMI LOC Geofence State enum eQMILOCGeofenceState:UINT32 { eQMILOCGeofenceState_Active = 1, eQMILOCGeofenceState_Suspended = 2, }; // Enum to describe QMI LOC Geofence Status enum eQMILOCGeofenceStatus:UINT32 { eQMILOCGeofenceStatus_Success = 0, eQMILOCGeofenceStatus_GeneralFailure = 1, eQMILOCGeofenceStatus_Unsupported = 2, eQMILOCGeofenceStatus_InvalidParameters = 3, eQMILOCGeofenceStatus_EngineBusy = 4, eQMILOCGeofenceStatus_PhoneOffline = 5, eQMILOCGeofenceStatus_Timeout = 6, eQMILOCGeofenceStatus_InsufficientMemory = 8, }; // Enum to describe QMI LOC Health Status enum eQMILOCHealthStatus:UINT8 { eQMILOCHealthStatus_Unhealthy = 0, eQMILOCHealthStatus_Healthy = 1, }; // Enum to describe QMI LOC Horizontal Accuracy enum eQMILOCHorizontalAccuracy:UINT32 { eQMILOCHorizontalAccuracy_Low = 1, eQMILOCHorizontalAccuracy_Medium = 2, eQMILOCHorizontalAccuracy_High = 3, }; // Enum to describe QMI LOC Intermediate Report State enum eQMILOCIntermediateReportState:UINT32 { eQMILOCIntermediateReportState_Enable = 1, eQMILOCIntermediateReportState_Disable = 2, }; // Enum to describe QMI LOC Linkage enum eQMILOCLinkage:UINT32 { eQMILOCLinkage_NotSpecified = 0, eQMILOCLinkage_FullyInterdependent = 1, eQMILOCLinkage_DependsOnLatLong = 2, eQMILOCLinkage_FullyIndependent = 3, }; // Enum to describe QMI LOC Location Server Type enum eQMILOCLocationServerType:UINT32 { eQMILOCLocationServerType_CDMAPDE = 1, eQMILOCLocationServerType_CDMAMPC = 2, eQMILOCLocationServerType_UMTSSLP = 3, eQMILOCLocationServerType_CustomPDE = 4, }; // Enum to describe QMI LOC Location Type enum eQMILOCLocationType:UINT32 { eQMILOCLocationType_CurrentLocation = 1, eQMILOCLocationType_CurrentOrLastKnownLocation = 2, eQMILOCLocationType_InitialLocation = 4, }; // Enum to describe QMI LOC Lock Type enum eQMILOCLockType:UINT32 { eQMILOCLockType_LockNone = 1, eQMILOCLockType_LockMI = 2, eQMILOCLockType_LockMT = 3, eQMILOCLockType_LockAll = 4, }; // Enum to describe QMI LOC Motion Modes enum eQMILOCMotionModes:UINT32 { eQMILOCMotionModes_Unknown = 0, eQMILOCMotionModes_Stationary = 1, eQMILOCMotionModes_PedestrianUnknown = 200, eQMILOCMotionModes_PedestrianWalking = 201, eQMILOCMotionModes_PedestrianRunning = 202, eQMILOCMotionModes_VehicleUnknown = 300, }; // Enum to describe QMI LOC Motion States enum eQMILOCMotionStates:UINT32 { eQMILOCMotionStates_Unknown = 0, eQMILOCMotionStates_Stationary = 1, eQMILOCMotionStates_InMotion = 2, }; // Enum to describe QMI LOC Notification Type enum eQMILOCNotificationType:UINT32 { eQMILOCNotificationType_NoNotifyOrVerify = 1, eQMILOCNotificationType_NotifyOnly = 2, eQMILOCNotificationType_AllowNoResponse = 3, eQMILOCNotificationType_ResponseRequired = 4, eQMILOCNotificationType_PrivacyOverride = 5, }; // Enum to describe QMI LOC Operation Mode enum eQMILOCOperationMode:UINT32 { eQMILOCOperationMode_Default = 1, eQMILOCOperationMode_MSB = 2, eQMILOCOperationMode_MSA = 3, eQMILOCOperationMode_StandAlone = 4, eQMILOCOperationMode_CellID = 5, }; // Enum to describe QMI LOC Orbits Format Type enum eQMILOCOrbitsFormatType:UINT32 { eQMILOCOrbitsFormatType_PredictedOrbitsXTRA = 0, }; // Enum to describe QMI LOC PDN Type enum eQMILOCPDNType:UINT32 { eQMILOCPDNType_IPv4 = 1, eQMILOCPDNType_IPv6 = 2, eQMILOCPDNType_IPv4OrIPv6 = 3, eQMILOCPDNType_PPP = 4, }; // Enum to describe QMI LOC Position enum eQMILOCPosition:UINT32 { eQMILOCPosition_AGPSSetAssisted = 1, eQMILOCPosition_AGPSSetBased = 2, eQMILOCPosition_AGPSSetAssistedPreference = 3, eQMILOCPosition_AGPSSetBasedPreference = 4, eQMILOCPosition_AutonomousGPS = 5, eQMILOCPosition_AFLT = 6, eQMILOCPosition_ECID = 7, eQMILOCPosition_EOTD = 8, eQMILOCPosition_OTDOA = 9, eQMILOCPosition_NoPosition = 10, }; // Enum to describe QMI LOC Position From Geofence enum eQMILOCPositionFromGeofence:UINT32 { eQMILOCPositionFromGeofence_Inside = 1, eQMILOCPositionFromGeofence_Outside = 2, }; // Enum to describe QMI LOC Position Mode enum eQMILOCPositionMode:UINT32 { eQMILOCPositionMode_AssistedOnly = 1, eQMILOCPositionMode_BasedOnly = 2, eQMILOCPositionMode_AssistedPreferredBasedAllowed = 3, eQMILOCPositionMode_BasedPreferredAssistedAllowed = 4, }; // Enum to describe QMI LOC Position Source enum eQMILOCPositionSource:UINT32 { eQMILOCPositionSource_GNSS = 0, eQMILOCPositionSource_CellID = 1, eQMILOCPositionSource_EnhancedCellID = 2, eQMILOCPositionSource_WiFi = 3, eQMILOCPositionSource_Terrestrial = 4, eQMILOCPositionSource_TerrestrialHybrid = 5, eQMILOCPositionSource_Other = 6, }; // Enum to describe QMI LOC Power State enum eQMILOCPowerState:UINT32 { eQMILOCPowerState_NotConnected = 0, eQMILOCPowerState_Connected = 1, eQMILOCPowerState_Unknown = 2, }; // Enum to describe QMI LOC Reliability enum eQMILOCReliability:UINT32 { eQMILOCReliability_NotSet = 0, eQMILOCReliability_VeryLow = 1, eQMILOCReliability_Low = 2, eQMILOCReliability_Medium = 3, eQMILOCReliability_High = 4, }; // Enum to describe QMI LOC Request Type enum eQMILOCRequestType:UINT32 { eQMILOCRequestType_StartPeriodicHighFrequencyFixes = 0, eQMILOCRequestType_StartPeriodicKeepWarmFixes = 1, eQMILOCRequestType_StopPeriodicFixes = 2, }; // Enum to describe QMI LOC Responsiveness enum eQMILOCResponsiveness:UINT32 { eQMILOCResponsiveness_Low = 1, eQMILOCResponsiveness_Medium = 2, eQMILOCResponsiveness_High = 3, }; // Enum to describe QMI LOC SUPL Version enum eQMILOCSUPLVersion:UINT32 { eQMILOCSUPLVersion_10 = 1, eQMILOCSUPLVersion_20 = 2, }; // Enum to describe QMI LOC Satellite Status enum eQMILOCSatelliteStatus:UINT32 { eQMILOCSatelliteStatus_Idle = 1, eQMILOCSatelliteStatus_Searching = 2, eQMILOCSatelliteStatus_Tracking = 3, }; // Enum to describe QMI LOC Sensor Usage enum eQMILOCSensorUsage:UINT32 { eQMILOCSensorUsage_SensorUseEnabled = 0, eQMILOCSensorUsage_SensorUseDisabled = 1, }; // Enum to describe QMI LOC Service Interaction Type enum eQMILOCServiceInteractionType:UINT32 { eQMILOCServiceInteractionType_OngoingNIIncomingMO = 1, }; // Enum to describe QMI LOC Session State enum eQMILOCSessionState:UINT32 { eQMILOCSessionState_Started = 1, eQMILOCSessionState_Finished = 2, }; // Enum to describe QMI LOC Session Status enum eQMILOCSessionStatus:UINT32 { eQMILOCSessionStatus_Success = 0, eQMILOCSessionStatus_InProgress = 1, eQMILOCSessionStatus_GeneralFailure = 2, eQMILOCSessionStatus_Timeout = 3, eQMILOCSessionStatus_UserEnded = 4, eQMILOCSessionStatus_BadParameter = 5, eQMILOCSessionStatus_PhoneOffline = 6, eQMILOCSessionStatus_EngineLocked = 7, }; // Enum to describe QMI LOC Stationary Status enum eQMILOCStationaryStatus { eQMILOCStationaryStatus_DeviceIsNotStationary = 0, eQMILOCStationaryStatus_DeviceIsStationary = 1, }; // Enum to describe QMI LOC Status enum eQMILOCStatus { eQMILOCStatus_Success = 0, eQMILOCStatus_GeneralFailure = 1, eQMILOCStatus_Unsupported = 2, eQMILOCStatus_InvalidParameter = 3, eQMILOCStatus_EngineBusy = 4, eQMILOCStatus_PhoneOffline = 5, eQMILOCStatus_Timeout = 6, }; // Enum to describe QMI LOC System enum eQMILOCSystem:UINT32 { eQMILOCSystem_GlobalPositioningSystem = 1, eQMILOCSystem_Galileo = 2, eQMILOCSystem_SatelliteBasedAugmentationSystem = 3, eQMILOCSystem_COMPASS = 4, eQMILOCSystem_GLONASS = 5, }; // Enum to describe QMI LOC Time Source enum eQMILOCTimeSource:UINT32 { eQMILOCTimeSource_Invalid = 0, eQMILOCTimeSource_NetworkTimeTransfer = 1, eQMILOCTimeSource_NetworkTimeTagging = 2, eQMILOCTimeSource_ExternalInput = 3, eQMILOCTimeSource_TOWDecode = 4, eQMILOCTimeSource_TOWConfirmed = 5, eQMILOCTimeSource_TOWAndWeekConfirmed = 6, eQMILOCTimeSource_NavigationSolution = 7, eQMILOCTimeSource_SolveForTime = 8, }; // Enum to describe QMI LOC Trigger Type enum eQMILOCTriggerType { eQMILOCTriggerType_SingleShot = -1, eQMILOCTriggerType_Periodic = 0, eQMILOCTriggerType_AreaEvent = 1, }; // Enum to describe QMI LOC User Response enum eQMILOCUserResponse:UINT32 { eQMILOCUserResponse_Accept = 1, eQMILOCUserResponse_Deny = 2, eQMILOCUserResponse_NoResponse = 3, }; // Enum to describe QMI LOC VX Version enum eQMILOCVXVersion:UINT32 { eQMILOCVXVersion_V1Only = 1, eQMILOCVXVersion_V2Only = 2, }; // Enum to describe QMI LOC WWAN Type enum eQMILOCWWANType:UINT32 { eQMILOCWWANType_Internet = 0, eQMILOCWWANType_AGNSS = 1, }; // Enum to describe QMI LOC Wi-Fi Fix Error Code enum eQMILOCWiFiFixErrorCode:UINT32 { eQMILOCWiFiFixErrorCode_Success = 0, eQMILOCWiFiFixErrorCode_WiFiNotAvailable = 1, eQMILOCWiFiFixErrorCode_NoAccessPointsFound = 2, eQMILOCWiFiFixErrorCode_Unauthorized = 3, eQMILOCWiFiFixErrorCode_ServerUnavailable = 4, eQMILOCWiFiFixErrorCode_LocationCannotBeDetermined = 5, eQMILOCWiFiFixErrorCode_Unknown = 6, }; // Enum to describe QMI LOC Wi-Fi Status enum eQMILOCWiFiStatus:UINT32 { eQMILOCWiFiStatus_Available = 1, eQMILOCWiFiStatus_Unavailable = 2, }; // Enum to describe QMI Mobile IP Modes enum eQMIMobileIPModes:UINT8 { eQMIMobileIPModes_MIPOffSimpleIPOnly = 0, eQMIMobileIPModes_MIPPreferred = 1, eQMIMobileIPModes_MIPOnly = 2, }; // Enum to describe QMI NAS AN-AAA Authentication Status enum eQMINASANAAAAuthenticationStatus:UINT8 { eQMINASANAAAAuthenticationStatus_AuthenticationFailed = 0, eQMINASANAAAAuthenticationStatus_AuthenticationSuccess = 1, eQMINASANAAAAuthenticationStatus_NoAuthenticationRequested = 2, }; // Enum to describe QMI NAS Acquisition Order enum eQMINASAcquisitionOrder:UINT32 { eQMINASAcquisitionOrder_Automatic = 0, eQMINASAcquisitionOrder_GSMThenWCDMA = 1, eQMINASAcquisitionOrder_WCDMAThenGSM = 2, }; // Enum to describe QMI NAS Active Subscription enum eQMINASActiveSubscription:UINT8 { eQMINASActiveSubscription_NotActive = 0, eQMINASActiveSubscription_Active = 1, }; // Enum to describe QMI NAS Average Period enum eQMINASAveragePeriod:UINT8 { eQMINASAveragePeriod_AverageUsingDefaultConfiguration = 0, eQMINASAveragePeriod_AverageOver1Second = 1, eQMINASAveragePeriod_AverageOver2Second = 2, eQMINASAveragePeriod_AverageOver3Second = 3, eQMINASAveragePeriod_AverageOver4Second = 4, eQMINASAveragePeriod_AverageOver5Second = 5, eQMINASAveragePeriod_AverageOver6Second = 6, eQMINASAveragePeriod_AverageOver7Second = 7, eQMINASAveragePeriod_AverageOver8Second = 8, eQMINASAveragePeriod_AverageOver9Second = 9, eQMINASAveragePeriod_AverageOver10Second = 10, }; // Enum to describe QMI NAS Band Classes enum eQMINASBandClasses:UINT16 { eQMINASBandClasses_CDMABandClass0 = 0, eQMINASBandClasses_CDMABandClass1 = 1, eQMINASBandClasses_CDMABandClass3 = 3, eQMINASBandClasses_CDMABandClass4 = 4, eQMINASBandClasses_CDMABandClass5 = 5, eQMINASBandClasses_CDMABandClass6 = 6, eQMINASBandClasses_CDMABandClass7 = 7, eQMINASBandClasses_CDMABandClass8 = 8, eQMINASBandClasses_CDMABandClass9 = 9, eQMINASBandClasses_CDMABandClass10 = 10, eQMINASBandClasses_CDMABandClass11 = 11, eQMINASBandClasses_CDMABandClass12 = 12, eQMINASBandClasses_CDMABandClass13 = 13, eQMINASBandClasses_CDMABandClass14 = 14, eQMINASBandClasses_CDMABandClass15 = 15, eQMINASBandClasses_CDMABandClass16 = 16, eQMINASBandClasses_CDMABandClass17 = 17, eQMINASBandClasses_CDMABandClass18 = 18, eQMINASBandClasses_CDMABandClass19 = 19, eQMINASBandClasses_GSM450 = 40, eQMINASBandClasses_GSM480 = 41, eQMINASBandClasses_GSM750 = 42, eQMINASBandClasses_GSM850 = 43, eQMINASBandClasses_GSM900Extended = 44, eQMINASBandClasses_GSM900Primary = 45, eQMINASBandClasses_GSM900Railways = 46, eQMINASBandClasses_GSM1800 = 47, eQMINASBandClasses_GSM1900 = 48, eQMINASBandClasses_WCDMA2100 = 80, eQMINASBandClasses_WCDMAPCS1900 = 81, eQMINASBandClasses_WCDMADCS1800 = 82, eQMINASBandClasses_WCDMA1700US = 83, eQMINASBandClasses_WCDMA850 = 84, eQMINASBandClasses_WCDMA800 = 85, eQMINASBandClasses_WCDMA2600 = 86, eQMINASBandClasses_WCDMA900 = 87, eQMINASBandClasses_WCDMA1700Japan = 88, eQMINASBandClasses_WCDMA1500Japan = 90, eQMINASBandClasses_WCDMA850Japan = 91, eQMINASBandClasses_EUTRABand1 = 120, eQMINASBandClasses_EUTRABand2 = 121, eQMINASBandClasses_EUTRABand3 = 122, eQMINASBandClasses_EUTRABand4 = 123, eQMINASBandClasses_EUTRABand5 = 124, eQMINASBandClasses_EUTRABand6 = 125, eQMINASBandClasses_EUTRABand7 = 126, eQMINASBandClasses_EUTRABand8 = 127, eQMINASBandClasses_EUTRABand9 = 128, eQMINASBandClasses_EUTRABand10 = 129, eQMINASBandClasses_EUTRABand11 = 130, eQMINASBandClasses_EUTRABand12 = 131, eQMINASBandClasses_EUTRABand13 = 132, eQMINASBandClasses_EUTRABand14 = 133, eQMINASBandClasses_EUTRABand17 = 134, eQMINASBandClasses_EUTRABand33 = 135, eQMINASBandClasses_EUTRABand34 = 136, eQMINASBandClasses_EUTRABand35 = 137, eQMINASBandClasses_EUTRABand36 = 138, eQMINASBandClasses_EUTRABand37 = 139, eQMINASBandClasses_EUTRABand38 = 140, eQMINASBandClasses_EUTRABand39 = 141, eQMINASBandClasses_EUTRABand40 = 142, eQMINASBandClasses_EUTRABand18 = 143, eQMINASBandClasses_EUTRABand19 = 144, eQMINASBandClasses_EUTRABand20 = 145, eQMINASBandClasses_EUTRABand21 = 146, eQMINASBandClasses_EUTRABand24 = 147, eQMINASBandClasses_EUTRABand25 = 148, eQMINASBandClasses_EUTRABand41 = 149, eQMINASBandClasses_EUTRABand42 = 150, eQMINASBandClasses_EUTRABand43 = 151, eQMINASBandClasses_TDSCDMABandA = 200, eQMINASBandClasses_TDSCDMABandB = 201, eQMINASBandClasses_TDSCDMABandC = 202, eQMINASBandClasses_TDSCDMABandD = 203, eQMINASBandClasses_TDSCDMABandE = 204, eQMINASBandClasses_TDSCDMABandF = 205, }; // Enum to describe QMI NAS CDMA 1xEV-DO Active Protocol enum eQMINASCDMA1xEVDOActiveProtocol:UINT8 { eQMINASCDMA1xEVDOActiveProtocol_None = 0, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORel0 = 2, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelA = 3, eQMINASCDMA1xEVDOActiveProtocol_CDMA1xEVDORelB = 4, }; // Enum to describe QMI NAS CDMA 1xEV-DO Hybrid Information enum eQMINASCDMA1xEVDOHybridInformation:UINT8 { eQMINASCDMA1xEVDOHybridInformation_SystemIsNotHybrid = 0, eQMINASCDMA1xEVDOHybridInformation_SystemIsHybrid = 1, }; // Enum to describe QMI NAS CDMA 1xEV-DO Personality enum eQMINASCDMA1xEVDOPersonality:UINT8 { eQMINASCDMA1xEVDOPersonality_Unknown = 0, eQMINASCDMA1xEVDOPersonality_HRPD = 1, eQMINASCDMA1xEVDOPersonality_EHRPD = 2, }; // Enum to describe QMI NAS CDMA Pilot Types enum eQMINASCDMAPilotTypes:UINT32 { eQMINASCDMAPilotTypes_Active = 0, eQMINASCDMAPilotTypes_Neighbor = 1, }; // Enum to describe QMI NAS CS/PS Attach States enum eQMINASCSPSAttachStates:UINT8 { eQMINASCSPSAttachStates_UnknownNotApplicable = 0, eQMINASCSPSAttachStates_Attached = 1, eQMINASCSPSAttachStates_Detached = 2, }; // Enum to describe QMI NAS Call Barring Status enum eQMINASCallBarringStatus:UINT32 { eQMINASCallBarringStatus_Unknown = 4294967295u, eQMINASCallBarringStatus_NormalCallsOnly = 0, eQMINASCallBarringStatus_EmergencyCallsOnly = 1, eQMINASCallBarringStatus_NoCalls = 2, eQMINASCallBarringStatus_AllCalls = 3, }; // Enum to describe QMI NAS Cell Broadcast Caps enum eQMINASCellBroadcastCaps:UINT32 { eQMINASCellBroadcastCaps_Unknown = 0, eQMINASCellBroadcastCaps_NotSupported = 1, eQMINASCellBroadcastCaps_Supported = 2, }; // Enum to describe QMI NAS Cell Broadcast Caps 2 enum eQMINASCellBroadcastCaps2:UINT32 { eQMINASCellBroadcastCaps2_Unknown = 0, eQMINASCellBroadcastCaps2_NotSupported = 1, eQMINASCellBroadcastCaps2_Supported = 2, }; // Enum to describe QMI NAS Change Duration enum eQMINASChangeDuration:UINT8 { eQMINASChangeDuration_PowerCycle = 0, eQMINASChangeDuration_Permanent = 1, }; // Enum to describe QMI NAS Concurrent Service enum eQMINASConcurrentService:UINT8 { eQMINASConcurrentService_NotAvailable = 0, eQMINASConcurrentService_Available = 1, }; // Enum to describe QMI NAS Concurrent Service Supported enum eQMINASConcurrentServiceSupported:UINT8 { eQMINASConcurrentServiceSupported_NotSupported = 0, eQMINASConcurrentServiceSupported_Supported = 1, }; // Enum to describe QMI NAS DDTM Preferences enum eQMINASDDTMPreferences:UINT8 { eQMINASDDTMPreferences_Off = 0, eQMINASDDTMPreferences_On = 1, eQMINASDDTMPreferences_NoChange = 2, }; // Enum to describe QMI NAS DTM Support enum eQMINASDTMSupport:UINT8 { eQMINASDTMSupport_NotAvailable = 0, eQMINASDTMSupport_Available = 1, }; // Enum to describe QMI NAS Data Service Capabilities 2 enum eQMINASDataServiceCapabilities2:UINT8 { eQMINASDataServiceCapabilities2_GPRS = 1, eQMINASDataServiceCapabilities2_EGPRS = 2, eQMINASDataServiceCapabilities2_HSDPA = 3, eQMINASDataServiceCapabilities2_HSUPA = 4, eQMINASDataServiceCapabilities2_WCDMA = 5, eQMINASDataServiceCapabilities2_CDMA = 6, eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 = 7, eQMINASDataServiceCapabilities2_CDMA1xEVDORevA = 8, eQMINASDataServiceCapabilities2_GSM = 9, eQMINASDataServiceCapabilities2_CDMA1xEVDORevB = 10, eQMINASDataServiceCapabilities2_LTE = 11, eQMINASDataServiceCapabilities2_HSDPAPlus = 12, eQMINASDataServiceCapabilities2_DCHSDPAPlus = 13, }; // Enum to describe QMI NAS Day Of Week enum eQMINASDayOfWeek:UINT8 { eQMINASDayOfWeek_Monday = 0, eQMINASDayOfWeek_Tuesday = 1, eQMINASDayOfWeek_Wednesday = 2, eQMINASDayOfWeek_Thursday = 3, eQMINASDayOfWeek_Friday = 4, eQMINASDayOfWeek_Saturday = 5, eQMINASDayOfWeek_Sunday = 6, }; // Enum to describe QMI NAS Daylight Savings Adjustment enum eQMINASDaylightSavingsAdjustment:UINT8 { eQMINASDaylightSavingsAdjustment_NoAdjustment = 0, eQMINASDaylightSavingsAdjustment_1HourAdjustment = 1, eQMINASDaylightSavingsAdjustment_2HourAdjustment = 2, }; // Enum to describe QMI NAS Dual Transfer Mode enum eQMINASDualTransferMode:UINT8 { eQMINASDualTransferMode_DTMNotSupported = 0, eQMINASDualTransferMode_DTMSupported = 1, }; // Enum to describe QMI NAS E-UTRA Status enum eQMINASEUTRAStatus:UINT8 { eQMINASEUTRAStatus_EUTRACellDetected = 0, eQMINASEUTRAStatus_EUTRACellNotDetected = 1, eQMINASEUTRAStatus_EUTRADetectionUnknown = 2, eQMINASEUTRAStatus_EUTRADetectionUnsupported = 3, }; // Enum to describe QMI NAS EGPRS Support enum eQMINASEGPRSSupport:UINT8 { eQMINASEGPRSSupport_NotAvailable = 0, eQMINASEGPRSSupport_Available = 1, }; // Enum to describe QMI NAS EV-DO Session Close Reasons enum eQMINASEVDOSessionCloseReasons:UINT32 { eQMINASEVDOSessionCloseReasons_ReacquiredNewNetwork = 0, eQMINASEVDOSessionCloseReasons_UATIResponseTimeout = 1, eQMINASEVDOSessionCloseReasons_KeepAliveTimerExpired = 2, eQMINASEVDOSessionCloseReasons_InternalDeactivation = 3, eQMINASEVDOSessionCloseReasons_ReceivedSessionCloseFromAN = 4, eQMINASEVDOSessionCloseReasons_ConnectionOpenFailure = 5, eQMINASEVDOSessionCloseReasons_ConfigurationRequestFailure = 6, eQMINASEVDOSessionCloseReasons_ConfigurationResponseFailure = 7, eQMINASEVDOSessionCloseReasons_ProtocolNegotiationFailure = 8, eQMINASEVDOSessionCloseReasons_ANInitSetupTimerExpired = 9, eQMINASEVDOSessionCloseReasons_ANInitConnectionClosed = 10, eQMINASEVDOSessionCloseReasons_ConnectionDenyReceived = 11, eQMINASEVDOSessionCloseReasons_SilentDeactivation = 12, eQMINASEVDOSessionCloseReasons_NewESN = 13, eQMINASEVDOSessionCloseReasons_ANGUAP = 14, eQMINASEVDOSessionCloseReasons_InvalidPersonalityIndex = 15, eQMINASEVDOSessionCloseReasons_UATINotMaintained = 16, eQMINASEVDOSessionCloseReasons_NewNAI = 17, eQMINASEVDOSessionCloseReasons_EHRPDCredentialsChanged = 18, }; // Enum to describe QMI NAS Forbidden States enum eQMINASForbiddenStates:UINT8 { eQMINASForbiddenStates_Unknown = 0, eQMINASForbiddenStates_Forbidden = 1, eQMINASForbiddenStates_NotForbidden = 2, }; // Enum to describe QMI NAS Force CDMA 1xEV-DO SCP enum eQMINASForceCDMA1xEVDOSCP:UINT8 { eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORev0Only = 0, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPA = 1, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithMFPAAndEMPA = 2, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithMMPA = 3, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevAWithEHRPD = 4, eQMINASForceCDMA1xEVDOSCP_CDMA1xEVDORevBWithEHRPD = 5, }; // Enum to describe QMI NAS High Speed Call Status enum eQMINASHighSpeedCallStatus:UINT8 { eQMINASHighSpeedCallStatus_HSDPAAndHSUPANotSupported = 0, eQMINASHighSpeedCallStatus_HSDPASupported = 1, eQMINASHighSpeedCallStatus_HSUPASupported = 2, eQMINASHighSpeedCallStatus_HSDPAAndHSUPASupported = 3, eQMINASHighSpeedCallStatus_HSDPAPlusSupported = 4, eQMINASHighSpeedCallStatus_HSDPAPlusAndHSUPASupported = 5, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusSupported = 6, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAndHSUPASupported = 7, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMAndHSUPASupported = 8, eQMINASHighSpeedCallStatus_DualCellHSDPAPlusAnd64QAMSupported = 9, }; // Enum to describe QMI NAS In Use States enum eQMINASInUseStates:UINT8 { eQMINASInUseStates_Unknown = 0, eQMINASInUseStates_CurrentServing = 1, eQMINASInUseStates_Available = 2, }; // Enum to describe QMI NAS LTE Signal Rates enum eQMINASLTESignalRates:UINT8 { eQMINASLTESignalRates_Default = 0, eQMINASLTESignalRates_EverySecond = 1, eQMINASLTESignalRates_Every2Seconds = 2, eQMINASLTESignalRates_Every3Seconds = 3, eQMINASLTESignalRates_Every4Seconds = 4, eQMINASLTESignalRates_Every5Seconds = 5, eQMINASLTESignalRates_Every6Seconds = 6, eQMINASLTESignalRates_Every7Seconds = 7, eQMINASLTESignalRates_Every8Seconds = 8, eQMINASLTESignalRates_Every9Seconds = 9, eQMINASLTESignalRates_Every10Seconds = 10, }; // Enum to describe QMI NAS LTE Voice Domains enum eQMINASLTEVoiceDomains:UINT32 { eQMINASLTEVoiceDomains_NoVoiceSupport = 0, eQMINASLTEVoiceDomains_VoiceSupportedOverIMS = 1, eQMINASLTEVoiceDomains_VoiceSupportedOver1X = 2, eQMINASLTEVoiceDomains_VoiceSupportedOver3GPP = 3, }; // Enum to describe QMI NAS Network Description Displays enum eQMINASNetworkDescriptionDisplays:UINT8 { eQMINASNetworkDescriptionDisplays_DoNotDisplay = 0, eQMINASNetworkDescriptionDisplays_Display = 1, eQMINASNetworkDescriptionDisplays_Unknown = 255, }; // Enum to describe QMI NAS Network Description Encodings enum eQMINASNetworkDescriptionEncodings:UINT8 { eQMINASNetworkDescriptionEncodings_UnspecifiedOctet = 0, eQMINASNetworkDescriptionEncodings_ExtendedProtocolMessage = 1, eQMINASNetworkDescriptionEncodings_7BitASCII = 2, eQMINASNetworkDescriptionEncodings_IA5 = 3, eQMINASNetworkDescriptionEncodings_UNICODE = 4, eQMINASNetworkDescriptionEncodings_ShiftJIS = 5, eQMINASNetworkDescriptionEncodings_Korean = 6, eQMINASNetworkDescriptionEncodings_LatinHebrew = 7, eQMINASNetworkDescriptionEncodings_Latin = 8, eQMINASNetworkDescriptionEncodings_GSM7Bit = 9, eQMINASNetworkDescriptionEncodings_GSMDCS = 10, }; // Enum to describe QMI NAS Network Scan Result enum eQMINASNetworkScanResult:UINT32 { eQMINASNetworkScanResult_Success = 0, eQMINASNetworkScanResult_Abort = 1, eQMINASNetworkScanResult_RadioLinkFailure = 2, }; // Enum to describe QMI NAS Network Selection enum eQMINASNetworkSelection:INT8 { eQMINASNetworkSelection_AutomaticRegistration = 0, eQMINASNetworkSelection_ManualRegistration = 1, }; // Enum to describe QMI NAS PLMN Name Country Initials enum eQMINASPLMNNameCountryInitials:UINT8 { eQMINASPLMNNameCountryInitials_DoNotAddCountryInitials = 0, eQMINASPLMNNameCountryInitials_AddCountryInitials = 1, eQMINASPLMNNameCountryInitials_Unspecified = 255, }; // Enum to describe QMI NAS PLMN Name Encoding Schemes enum eQMINASPLMNNameEncodingSchemes:UINT8 { eQMINASPLMNNameEncodingSchemes_ASCII = 0, eQMINASPLMNNameEncodingSchemes_UCS2LE = 1, }; // Enum to describe QMI NAS PLMN Name Spare Bits enum eQMINASPLMNNameSpareBits:UINT8 { eQMINASPLMNNameSpareBits_Unknown = 0, eQMINASPLMNNameSpareBits_Bit8 = 1, eQMINASPLMNNameSpareBits_Bits78 = 2, eQMINASPLMNNameSpareBits_Bits68 = 3, eQMINASPLMNNameSpareBits_Bits58 = 4, eQMINASPLMNNameSpareBits_Bits48 = 5, eQMINASPLMNNameSpareBits_Bits38 = 6, eQMINASPLMNNameSpareBits_Bits28 = 7, }; // Enum to describe QMI NAS PRL Indicator enum eQMINASPRLIndicator:UINT8 { eQMINASPRLIndicator_SystemNotInPRL = 0, eQMINASPRLIndicator_SystemIsInPRL = 1, }; // Enum to describe QMI NAS PRL Preferences enum eQMINASPRLPreferences:UINT16 { eQMINASPRLPreferences_AcquireASideOnly = 1, eQMINASPRLPreferences_AcquireBSideOnly = 2, eQMINASPRLPreferences_AcquireAny = 16383, }; // Enum to describe QMI NAS PS Attach Actions enum eQMINASPSAttachActions:UINT8 { eQMINASPSAttachActions_Attach = 1, eQMINASPSAttachActions_Detach = 2, }; // Enum to describe QMI NAS Preferred Data Bath enum eQMINASPreferredDataBath:UINT8 { eQMINASPreferredDataBath_NotPreferred = 0, eQMINASPreferredDataBath_Preferred = 1, }; // Enum to describe QMI NAS Preferred States enum eQMINASPreferredStates:UINT8 { eQMINASPreferredStates_Unknown = 0, eQMINASPreferredStates_Preferred = 1, eQMINASPreferredStates_NotPreferred = 2, }; // Enum to describe QMI NAS RTRE Configuration enum eQMINASRTREConfiguration:UINT8 { eQMINASRTREConfiguration_RUIMOnly = 1, eQMINASRTREConfiguration_InternalSettingsOnly = 2, eQMINASRTREConfiguration_UseRUIMIfAvailable = 3, eQMINASRTREConfiguration_GSMOn1X = 4, }; // Enum to describe QMI NAS RX Level enum eQMINASRXLevel:UINT16 { eQMINASRXLevel_LessThan110dBm = 0, eQMINASRXLevel_110dBmto109dBm = 1, eQMINASRXLevel_109dBmto108dBm = 2, eQMINASRXLevel_108dBmto107dBm = 3, eQMINASRXLevel_107dBmto106dBm = 4, eQMINASRXLevel_106dBmto105dBm = 5, eQMINASRXLevel_105dBmto104dBm = 6, eQMINASRXLevel_104dBmto103dBm = 7, eQMINASRXLevel_103dBmto102dBm = 8, eQMINASRXLevel_102dBmto101dBm = 9, eQMINASRXLevel_101dBmto100dBm = 10, eQMINASRXLevel_100dBmto99dBm = 11, eQMINASRXLevel_99dBmto98dBm = 12, eQMINASRXLevel_98dBmto97dBm = 13, eQMINASRXLevel_97dBmto96dBm = 14, eQMINASRXLevel_96dBmto95dBm = 15, eQMINASRXLevel_95dBmto94dBm = 16, eQMINASRXLevel_94dBmto93dBm = 17, eQMINASRXLevel_93dBmto92dBm = 18, eQMINASRXLevel_92dBmto91dBm = 19, eQMINASRXLevel_91dBmto90dBm = 20, eQMINASRXLevel_90dBmto89dBm = 21, eQMINASRXLevel_89dBmto88dBm = 22, eQMINASRXLevel_88dBmto87dBm = 23, eQMINASRXLevel_87dBmto86dBm = 24, eQMINASRXLevel_86dBmto85dBm = 25, eQMINASRXLevel_85dBmto84dBm = 26, eQMINASRXLevel_84dBmto83dBm = 27, eQMINASRXLevel_83dBmto82dBm = 28, eQMINASRXLevel_82dBmto81dBm = 29, eQMINASRXLevel_81dBmto80dBm = 30, eQMINASRXLevel_80dBmto79dBm = 31, eQMINASRXLevel_79dBmto78dBm = 32, eQMINASRXLevel_78dBmto77dBm = 33, eQMINASRXLevel_77dBmto76dBm = 34, eQMINASRXLevel_76dBmto75dBm = 35, eQMINASRXLevel_75dBmto74dBm = 36, eQMINASRXLevel_74dBmto73dBm = 37, eQMINASRXLevel_73dBmto72dBm = 38, eQMINASRXLevel_72dBmto71dBm = 39, eQMINASRXLevel_71dBmto70dBm = 40, eQMINASRXLevel_70dBmto69dBm = 41, eQMINASRXLevel_69dBmto68dBm = 42, eQMINASRXLevel_68dBmto67dBm = 43, eQMINASRXLevel_67dBmto66dBm = 44, eQMINASRXLevel_66dBmto65dBm = 45, eQMINASRXLevel_65dBmto64dBm = 46, eQMINASRXLevel_64dBmto63dBm = 47, eQMINASRXLevel_63dBmto62dBm = 48, eQMINASRXLevel_62dBmto61dBm = 49, eQMINASRXLevel_61dBmto60dBm = 50, eQMINASRXLevel_60dBmto59dBm = 51, eQMINASRXLevel_59dBmto58dBm = 52, eQMINASRXLevel_58dBmto57dBm = 53, eQMINASRXLevel_57dBmto56dBm = 54, eQMINASRXLevel_56dBmto55dBm = 55, eQMINASRXLevel_55dBmto54dBm = 56, eQMINASRXLevel_54dBmto53dBm = 57, eQMINASRXLevel_53dBmto52dBm = 58, eQMINASRXLevel_52dBmto51dBm = 59, eQMINASRXLevel_51dBmto50dBm = 60, eQMINASRXLevel_50dBmto49dBm = 61, eQMINASRXLevel_49dBmto48dBm = 62, eQMINASRXLevel_GreaterThan48dBm = 63, }; // Enum to describe QMI NAS Radio Access Technologies enum eQMINASRadioAccessTechnologies:UINT8 { eQMINASRadioAccessTechnologies_GSM = 4, eQMINASRadioAccessTechnologies_UMTS = 5, eQMINASRadioAccessTechnologies_LTE = 8, eQMINASRadioAccessTechnologies_TDSCDMA = 9, eQMINASRadioAccessTechnologies_NoChange = 255, }; // Enum to describe QMI NAS Radio Interfaces enum eQMINASRadioInterfaces:UINT8 { eQMINASRadioInterfaces_NoneNoService = 0, eQMINASRadioInterfaces_CDMA20001x = 1, eQMINASRadioInterfaces_CDMA2000HRPD = 2, eQMINASRadioInterfaces_AMPS = 3, eQMINASRadioInterfaces_GSM = 4, eQMINASRadioInterfaces_UMTS = 5, eQMINASRadioInterfaces_LTE = 8, eQMINASRadioInterfaces_TDSCDMA = 9, }; // Enum to describe QMI NAS Radio System Modes enum eQMINASRadioSystemModes:UINT32 { eQMINASRadioSystemModes_NoService = 0, eQMINASRadioSystemModes_Acquiring = 1, eQMINASRadioSystemModes_InService = 2, }; // Enum to describe QMI NAS Register Actions enum eQMINASRegisterActions:UINT8 { eQMINASRegisterActions_Automatic = 1, eQMINASRegisterActions_Manual = 2, }; // Enum to describe QMI NAS Registered Networks enum eQMINASRegisteredNetworks:UINT8 { eQMINASRegisteredNetworks_Unknown = 0, eQMINASRegisteredNetworks_3GPP2 = 1, eQMINASRegisteredNetworks_3GPP = 2, }; // Enum to describe QMI NAS Registration Domains enum eQMINASRegistrationDomains:UINT32 { eQMINASRegistrationDomains_NotApplicable = 0, eQMINASRegistrationDomains_CSOnly = 1, eQMINASRegistrationDomains_PSOnly = 2, eQMINASRegistrationDomains_CSAndPS = 3, eQMINASRegistrationDomains_LimitedService = 4, }; // Enum to describe QMI NAS Registration Restrictions enum eQMINASRegistrationRestrictions:UINT32 { eQMINASRegistrationRestrictions_Unrestricted = 0, eQMINASRegistrationRestrictions_CampedOnly = 1, eQMINASRegistrationRestrictions_Limited = 2, }; // Enum to describe QMI NAS Registration States enum eQMINASRegistrationStates:UINT8 { eQMINASRegistrationStates_NASNotRegistered = 0, eQMINASRegistrationStates_NASRegistered = 1, eQMINASRegistrationStates_NASNotRegisteredSearching = 2, eQMINASRegistrationStates_NASRegistrationDenied = 3, eQMINASRegistrationStates_RegistrationStateUnknown = 4, }; // Enum to describe QMI NAS Report Rate enum eQMINASReportRate:UINT8 { eQMINASReportRate_ReportUsingDefaultConfig = 0, eQMINASReportRate_ReportEvery1Second = 1, eQMINASReportRate_ReportEvery2Second = 2, eQMINASReportRate_ReportEvery3Second = 3, eQMINASReportRate_ReportEvery4Second = 4, eQMINASReportRate_ReportEvery5Second = 5, }; // Enum to describe QMI NAS Revision enum eQMINASRevision:UINT8 { eQMINASRevision_JSTD088 = 1, eQMINASRevision_IS95RevA = 3, eQMINASRevision_IS95RevB = 4, eQMINASRevision_IS2000 = 6, eQMINASRevision_IS2000RelA = 7, eQMINASRevision_IS2000RelB = 8, eQMINASRevision_IS2000RelC = 9, eQMINASRevision_IS2000RelCMI = 10, eQMINASRevision_IS2000RelD = 11, }; // Enum to describe QMI NAS Roam Status enum eQMINASRoamStatus:UINT8 { eQMINASRoamStatus_Off = 0, eQMINASRoamStatus_On = 1, eQMINASRoamStatus_Blinking = 2, eQMINASRoamStatus_OutOfNeighborhood = 3, eQMINASRoamStatus_OutOfBuilding = 4, eQMINASRoamStatus_PreferredSystem = 5, eQMINASRoamStatus_AvailableSystem = 6, eQMINASRoamStatus_AlliancePartner = 7, eQMINASRoamStatus_PremiumPartner = 8, eQMINASRoamStatus_FullService = 9, eQMINASRoamStatus_PartialService = 10, eQMINASRoamStatus_BannerIsOn = 11, eQMINASRoamStatus_BannerIsOff = 12, }; // Enum to describe QMI NAS Roaming Indicators enum eQMINASRoamingIndicators:UINT8 { eQMINASRoamingIndicators_Roaming = 0, eQMINASRoamingIndicators_Home = 1, eQMINASRoamingIndicators_RoamingPartner = 2, }; // Enum to describe QMI NAS Roaming Preferences enum eQMINASRoamingPreferences:UINT8 { eQMINASRoamingPreferences_Automatic = 0, eQMINASRoamingPreferences_HomeOnly = 1, eQMINASRoamingPreferences_RoamingOnly = 2, eQMINASRoamingPreferences_HomeRoaming = 3, }; // Enum to describe QMI NAS Roaming Preferences 2 enum eQMINASRoamingPreferences2:UINT16 { eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorOff = 1, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotOff = 2, eQMINASRoamingPreferences2_AcquireWhenRoamingIndicatorNotFlashing = 3, eQMINASRoamingPreferences2_AcquireAny = 255, }; // Enum to describe QMI NAS Roaming States enum eQMINASRoamingStates:UINT8 { eQMINASRoamingStates_Unknown = 0, eQMINASRoamingStates_Home = 1, eQMINASRoamingStates_Roam = 2, }; // Enum to describe QMI NAS SIM Reject States enum eQMINASSIMRejectStates:UINT32 { eQMINASSIMRejectStates_NotAvailable = 0, eQMINASSIMRejectStates_Available = 1, eQMINASSIMRejectStates_CSInvalid = 2, eQMINASSIMRejectStates_PSInvalid = 3, eQMINASSIMRejectStates_CSAndPSInvalid = 4, }; // Enum to describe QMI NAS SINR Levels enum eQMINASSINRLevels:UINT8 { eQMINASSINRLevels_Negative9dB = 0, eQMINASSINRLevels_Negative6dB = 1, eQMINASSINRLevels_Negative45dB = 2, eQMINASSINRLevels_Negative3dB = 3, eQMINASSINRLevels_Negative2dB = 4, eQMINASSINRLevels_1dB = 5, eQMINASSINRLevels_3dB = 6, eQMINASSINRLevels_6dB = 7, eQMINASSINRLevels_9dB = 8, }; // Enum to describe QMI NAS Service Domain Prefs enum eQMINASServiceDomainPrefs:UINT32 { eQMINASServiceDomainPrefs_CircuitSwitched = 0, eQMINASServiceDomainPrefs_PacketSwitched = 1, eQMINASServiceDomainPrefs_CircuitPacketSwitched = 2, eQMINASServiceDomainPrefs_PacketSwitchedAttach = 3, eQMINASServiceDomainPrefs_PacketSwitchedDetach = 4, }; // Enum to describe QMI NAS Service Domains enum eQMINASServiceDomains:UINT8 { eQMINASServiceDomains_NoService = 0, eQMINASServiceDomains_CircuitSwitched = 1, }; // Enum to describe QMI NAS Service Option Actions enum eQMINASServiceOptionActions:UINT8 { eQMINASServiceOptionActions_Add = 0, eQMINASServiceOptionActions_Replace = 1, eQMINASServiceOptionActions_Delete = 2, eQMINASServiceOptionActions_NoChange = 3, }; // Enum to describe QMI NAS Service Status enum eQMINASServiceStatus:UINT8 { eQMINASServiceStatus_NoService = 0, eQMINASServiceStatus_LimitedService = 1, eQMINASServiceStatus_ServiceAvailable = 2, eQMINASServiceStatus_LimitedRegionalService = 3, eQMINASServiceStatus_PowerSaveOrDeepSleep = 4, }; // Enum to describe QMI NAS Standby Preference enum eQMINASStandbyPreference:UINT8 { eQMINASStandbyPreference_SingleStandby = 1, eQMINASStandbyPreference_DualStandbyWithTuneAway = 2, eQMINASStandbyPreference_DualStandbyWithoutTuneAway = 4, eQMINASStandbyPreference_AutomaticModeWithTuneAway = 5, eQMINASStandbyPreference_AutomaticModeWithoutTuneAway = 6, }; // Enum to describe QMI NAS Subscription Type enum eQMINASSubscriptionType:UINT8 { eQMINASSubscriptionType_PrimarySubscription = 0, eQMINASSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI NAS System Forbidden enum eQMINASSystemForbidden:UINT8 { eQMINASSystemForbidden_SystemIsNotForbidden = 0, eQMINASSystemForbidden_SystemIsForbidden = 1, }; // Enum to describe QMI NAS System Preferences enum eQMINASSystemPreferences:UINT8 { eQMINASSystemPreferences_Automatic = 0, eQMINASSystemPreferences_AutomaticA = 1, eQMINASSystemPreferences_AutomaticB = 2, }; // Enum to describe QMI NAS System Service Capabilities enum eQMINASSystemServiceCapabilities:UINT8 { eQMINASSystemServiceCapabilities_NoService = 0, eQMINASSystemServiceCapabilities_CircuitSwitchedOnly = 1, eQMINASSystemServiceCapabilities_PacketSwitchedOnly = 2, eQMINASSystemServiceCapabilities_CircuitSwitchedAndPacketSwitched = 3, eQMINASSystemServiceCapabilities_Camped = 4, }; // Enum to describe QMI NAS Tech Pref Durations enum eQMINASTechPrefDurations:UINT8 { eQMINASTechPrefDurations_Permanent = 0, eQMINASTechPrefDurations_PowerCycle = 1, }; // Enum to describe QMI NAS Tech Prefs enum eQMINASTechPrefs:UINT8 { eQMINASTechPrefs_Automatic = 0, eQMINASTechPrefs_3GPP2 = 1, eQMINASTechPrefs_3GPP = 2, eQMINASTechPrefs_Invalid = 3, }; // Enum to describe QMI OMA HFA Done States enum eQMIOMAHFADoneStates:UINT8 { eQMIOMAHFADoneStates_None = 0, eQMIOMAHFADoneStates_Succeeded = 1, eQMIOMAHFADoneStates_Failed = 2, }; // Enum to describe QMI OMA Selections enum eQMIOMASelections:UINT8 { eQMIOMASelections_Reject = 0, eQMIOMASelections_Accept = 1, }; // Enum to describe QMI OMA Session Failure Reasons enum eQMIOMASessionFailureReasons:UINT8 { eQMIOMASessionFailureReasons_Unknown = 0, eQMIOMASessionFailureReasons_NetworkUnavailable = 1, eQMIOMASessionFailureReasons_ServerUnavailable = 2, eQMIOMASessionFailureReasons_AuthenticationFailed = 3, eQMIOMASessionFailureReasons_MaxRetryExceeded = 4, eQMIOMASessionFailureReasons_SessionCancelled = 5, }; // Enum to describe QMI OMA Session States enum eQMIOMASessionStates:UINT8 { eQMIOMASessionStates_CompleteInfoUpdated = 0, eQMIOMASessionStates_CompleteInfoUnavailable = 1, eQMIOMASessionStates_Failed = 2, eQMIOMASessionStates_Retrying = 3, eQMIOMASessionStates_Connecting = 4, eQMIOMASessionStates_Connected = 5, eQMIOMASessionStates_Authenticated = 6, eQMIOMASessionStates_MDNDownloaded = 7, eQMIOMASessionStates_MSIDDownloaded = 8, eQMIOMASessionStates_PRLDownloaded = 9, eQMIOMASessionStates_MIPProfileDownloaded = 10, }; // Enum to describe QMI OMA Session Types enum eQMIOMASessionTypes:UINT8 { eQMIOMASessionTypes_ClientInitiatedDeviceConfigure = 0, eQMIOMASessionTypes_ClientInitiatedPRLUpdate = 1, eQMIOMASessionTypes_ClientInitiatedHandsFreeActivation = 2, eQMIOMASessionTypes_DeviceInitiatedHandsFreeActivation = 3, eQMIOMASessionTypes_NetworkInitiatedPRLUpdate = 4, eQMIOMASessionTypes_NetworkInitiatedDeviceConfigure = 5, }; // Enum to describe QMI PBM AAS Operations enum eQMIPBMAASOperations:UINT8 { eQMIPBMAASOperations_Add = 0, eQMIPBMAASOperations_Modify = 1, eQMIPBMAASOperations_Delete = 2, }; // Enum to describe QMI PBM Emergency Categories enum eQMIPBMEmergencyCategories { eQMIPBMEmergencyCategories_Police = 1, eQMIPBMEmergencyCategories_Ambulance = 2, eQMIPBMEmergencyCategories_FireBrigade = 4, eQMIPBMEmergencyCategories_MarineGuard = 8, eQMIPBMEmergencyCategories_MountainRescue = 16, eQMIPBMEmergencyCategories_ManualECall = 32, eQMIPBMEmergencyCategories_AutomaticECall = 64, eQMIPBMEmergencyCategories_Spare = 128, }; // Enum to describe QMI PBM Field Types enum eQMIPBMFieldTypes:UINT32 { eQMIPBMFieldTypes_Email = 0, eQMIPBMFieldTypes_AdditionalNumber = 1, eQMIPBMFieldTypes_SecondName = 2, eQMIPBMFieldTypes_Group = 3, }; // Enum to describe QMI PBM Mapping Types enum eQMIPBMMappingTypes:UINT32 { eQMIPBMMappingTypes_Linear = 0, eQMIPBMMappingTypes_Nonlinear = 1, }; // Enum to describe QMI PBM Number Plans enum eQMIPBMNumberPlans:UINT8 { eQMIPBMNumberPlans_Unknown = 0, eQMIPBMNumberPlans_ISDN = 1, eQMIPBMNumberPlans_Data = 2, eQMIPBMNumberPlans_Telex = 3, eQMIPBMNumberPlans_National = 4, eQMIPBMNumberPlans_Private = 5, }; // Enum to describe QMI PBM Number Types enum eQMIPBMNumberTypes:UINT8 { eQMIPBMNumberTypes_Unknown = 0, eQMIPBMNumberTypes_International = 1, eQMIPBMNumberTypes_National = 2, eQMIPBMNumberTypes_NetworkSpecific = 3, eQMIPBMNumberTypes_DedicatedAccess = 4, }; // Enum to describe QMI PBM Operations enum eQMIPBMOperations:UINT8 { eQMIPBMOperations_Add = 1, eQMIPBMOperations_Modify = 2, eQMIPBMOperations_Delete = 3, }; // Enum to describe QMI PBM Phonebook Types enum eQMIPBMPhonebookTypes:UINT16 { eQMIPBMPhonebookTypes_AbbreviatedDialingNumber = 1, eQMIPBMPhonebookTypes_FixedDialingNumber = 2, eQMIPBMPhonebookTypes_MobileSubscriberIntegratedServicesDigitalNetwork = 4, eQMIPBMPhonebookTypes_MailBoxDialingNumber = 8, eQMIPBMPhonebookTypes_ServiceDialingNumber = 16, eQMIPBMPhonebookTypes_BarredDialingNumber = 32, eQMIPBMPhonebookTypes_LastNumberDialed = 64, eQMIPBMPhonebookTypes_MailBoxNumber = 128, }; // Enum to describe QMI PBM Protection Methods enum eQMIPBMProtectionMethods:UINT32 { eQMIPBMProtectionMethods_AlwaysAllowed = 0, eQMIPBMProtectionMethods_NeverAllowed = 1, eQMIPBMProtectionMethods_AllowedOnAllPINsVerified = 2, eQMIPBMProtectionMethods_AllowedOnAnyPINVerified = 3, eQMIPBMProtectionMethods_AllowedOnOnePINVerified = 4, }; // Enum to describe QMI PBM Refresh Status enum eQMIPBMRefreshStatus:UINT8 { eQMIPBMRefreshStatus_RefreshStart = 1, eQMIPBMRefreshStatus_RefreshEnd = 2, }; // Enum to describe QMI PBM Session Types enum eQMIPBMSessionTypes:UINT8 { eQMIPBMSessionTypes_GWPrimary = 0, eQMIPBMSessionTypes_1xPrimary = 1, eQMIPBMSessionTypes_GWSecondary = 2, eQMIPBMSessionTypes_1xSecondary = 3, eQMIPBMSessionTypes_NonProvisioningOnSlot1 = 4, eQMIPBMSessionTypes_NonProvisioningOnSlot2 = 5, eQMIPBMSessionTypes_GlobalPhonebookOnSlot1 = 6, eQMIPBMSessionTypes_GlobalPhonebookOnSlot2 = 7, }; // Enum to describe QMI PBM States enum eQMIPBMStates:UINT8 { eQMIPBMStates_Ready = 0, eQMIPBMStates_NotReady = 1, eQMIPBMStates_NotAvailable = 2, eQMIPBMStates_PINRestriction = 3, eQMIPBMStates_PUKRestriction = 4, eQMIPBMStates_Invalidated = 5, eQMIPBMStates_Sync = 6, }; // Enum to describe QMI PBM Subscription Types enum eQMIPBMSubscriptionTypes:UINT8 { eQMIPBMSubscriptionTypes_Primary = 0, eQMIPBMSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI PDC Configurations enum eQMIPDCConfigurations:UINT32 { eQMIPDCConfigurations_Platform = 0, eQMIPDCConfigurations_Software = 1, }; // Enum to describe QMI PDP Types enum eQMIPDPTypes:UINT8 { eQMIPDPTypes_PDPIPv4 = 0, eQMIPDPTypes_PDPPPP = 1, eQMIPDPTypes_PDPIPv6 = 2, eQMIPDPTypes_PDPIPv4OrIPv6 = 3, }; // Enum to describe QMI PDS Altitude Source enum eQMIPDSAltitudeSource:UINT8 { eQMIPDSAltitudeSource_Unknown = 0, eQMIPDSAltitudeSource_GPS = 1, eQMIPDSAltitudeSource_CellID = 2, eQMIPDSAltitudeSource_EnhancedCellID = 3, eQMIPDSAltitudeSource_WiFi = 4, eQMIPDSAltitudeSource_Terrestrial = 5, eQMIPDSAltitudeSource_TerrestrialHybrid = 6, eQMIPDSAltitudeSource_AltitudeDatabase = 7, eQMIPDSAltitudeSource_BarometricAltimeter = 8, eQMIPDSAltitudeSource_Other = 9, }; // Enum to describe QMI PDS Blanking Enable enum eQMIPDSBlankingEnable:UINT8 { eQMIPDSBlankingEnable_DisableBlanking = 0, eQMIPDSBlankingEnable_EnableBlankingUnconditionally = 1, eQMIPDSBlankingEnable_EnableBlankingConditionally = 2, eQMIPDSBlankingEnable_SimulateIMDJamming = 3, }; // Enum to describe QMI PDS Calendar Days enum eQMIPDSCalendarDays:UINT8 { eQMIPDSCalendarDays_Sunday = 0, eQMIPDSCalendarDays_Monday = 1, eQMIPDSCalendarDays_Tuesday = 2, eQMIPDSCalendarDays_Wednesday = 3, eQMIPDSCalendarDays_Thursday = 4, eQMIPDSCalendarDays_Friday = 5, eQMIPDSCalendarDays_Saturday = 6, }; // Enum to describe QMI PDS Calendar Months enum eQMIPDSCalendarMonths:UINT8 { eQMIPDSCalendarMonths_January = 0, eQMIPDSCalendarMonths_February = 1, eQMIPDSCalendarMonths_March = 2, eQMIPDSCalendarMonths_April = 3, eQMIPDSCalendarMonths_May = 4, eQMIPDSCalendarMonths_June = 5, eQMIPDSCalendarMonths_July = 6, eQMIPDSCalendarMonths_August = 7, eQMIPDSCalendarMonths_September = 8, eQMIPDSCalendarMonths_October = 9, eQMIPDSCalendarMonths_November = 10, eQMIPDSCalendarMonths_December = 11, }; // Enum to describe QMI PDS Comm Event Protocols enum eQMIPDSCommEventProtocols:UINT8 { eQMIPDSCommEventProtocols_UMTSUserPlaneSUPL = 0, eQMIPDSCommEventProtocols_1X = 1, eQMIPDSCommEventProtocols_UMTSControlPlaneWCDMA = 2, eQMIPDSCommEventProtocols_UMTSControlPlaneGSM = 3, eQMIPDSCommEventProtocols_V1V2 = 4, eQMIPDSCommEventProtocols_KDDI = 5, eQMIPDSCommEventProtocols_XTRADataDownload = 6, eQMIPDSCommEventProtocols_SNTPTimeDownload = 7, eQMIPDSCommEventProtocols_1XControlPlane = 8, eQMIPDSCommEventProtocols_Unknown = 255, }; // Enum to describe QMI PDS Comm Event Types enum eQMIPDSCommEventTypes:UINT8 { eQMIPDSCommEventTypes_Begin = 0, eQMIPDSCommEventTypes_Connected = 1, eQMIPDSCommEventTypes_Failure = 2, eQMIPDSCommEventTypes_Done = 3, eQMIPDSCommEventTypes_OtherFailure = 4, }; // Enum to describe QMI PDS Config enum eQMIPDSConfig:UINT8 { eQMIPDSConfig_PersistentDisabled = 0, eQMIPDSConfig_PersistentEnabled = 1, eQMIPDSConfig_NotPersistentDisabled = 240, eQMIPDSConfig_NotPersistentEnabled = 241, }; // Enum to describe QMI PDS Cradle Mount State enum eQMIPDSCradleMountState:UINT8 { eQMIPDSCradleMountState_NotMounted = 0, eQMIPDSCradleMountState_Mounted = 1, eQMIPDSCradleMountState_Unknown = 2, }; // Enum to describe QMI PDS EFS File Operations enum eQMIPDSEFSFileOperations:UINT8 { eQMIPDSEFSFileOperations_Write = 0, eQMIPDSEFSFileOperations_Delete = 1, }; // Enum to describe QMI PDS Encryption Algorithm enum eQMIPDSEncryptionAlgorithm:UINT8 { eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmSHA1 = 0, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmMax = 1, eQMIPDSEncryptionAlgorithm_PDSMPDHashAlgorithmNone = 255, }; // Enum to describe QMI PDS External Power State enum eQMIPDSExternalPowerState:UINT8 { eQMIPDSExternalPowerState_NotConnected = 0, eQMIPDSExternalPowerState_Connected = 1, eQMIPDSExternalPowerState_Unknown = 2, }; // Enum to describe QMI PDS Force Receiver Off enum eQMIPDSForceReceiverOff:UINT8 { eQMIPDSForceReceiverOff_Disable = 0, eQMIPDSForceReceiverOff_Enable = 1, }; // Enum to describe QMI PDS IMD Jamming Bands enum eQMIPDSIMDJammingBands:UINT32 { eQMIPDSIMDJammingBands_GPS = 0, eQMIPDSIMDJammingBands_GLONASS = 1, }; // Enum to describe QMI PDS IMD Jamming States enum eQMIPDSIMDJammingStates:UINT8 { eQMIPDSIMDJammingStates_Terminate = 0, eQMIPDSIMDJammingStates_Initiate = 1, }; // Enum to describe QMI PDS Injected Position Sources enum eQMIPDSInjectedPositionSources:UINT8 { eQMIPDSInjectedPositionSources_Unknown = 0, eQMIPDSInjectedPositionSources_GPS = 1, eQMIPDSInjectedPositionSources_CellID = 2, eQMIPDSInjectedPositionSources_EnhancedCellID = 3, eQMIPDSInjectedPositionSources_WiFi = 4, eQMIPDSInjectedPositionSources_Terrestial = 5, eQMIPDSInjectedPositionSources_TerrestialHybrid = 6, eQMIPDSInjectedPositionSources_Other = 7, }; // Enum to describe QMI PDS Mediums enum eQMIPDSMediums:UINT8 { eQMIPDSMediums_WWAN = 0, }; // Enum to describe QMI PDS Method States enum eQMIPDSMethodStates:UINT8 { eQMIPDSMethodStates_Disabled = 0, eQMIPDSMethodStates_Enabled = 1, eQMIPDSMethodStates_NotSupported = 255, }; // Enum to describe QMI PDS Motion Modes enum eQMIPDSMotionModes:UINT8 { eQMIPDSMotionModes_Unknown = 0, eQMIPDSMotionModes_Pedestrian = 1, eQMIPDSMotionModes_Vehicle = 2, }; // Enum to describe QMI PDS Motion States enum eQMIPDSMotionStates:UINT8 { eQMIPDSMotionStates_Unknown = 0, eQMIPDSMotionStates_Stationary = 1, eQMIPDSMotionStates_InMotion = 2, }; // Enum to describe QMI PDS Motion Submodes enum eQMIPDSMotionSubmodes:UINT8 { eQMIPDSMotionSubmodes_Unknown = 0, eQMIPDSMotionSubmodes_Walking = 1, eQMIPDSMotionSubmodes_Running = 2, }; // Enum to describe QMI PDS NMEA Reporting Options enum eQMIPDSNMEAReportingOptions:UINT8 { eQMIPDSNMEAReportingOptions_1HzFromTimeRequestedUntilFinalPositionDetermination = 0, eQMIPDSNMEAReportingOptions_FinalPositionDeterminationOnly = 1, }; // Enum to describe QMI PDS NMEA Sentence Operating Modes enum eQMIPDSNMEASentenceOperatingModes:UINT8 { eQMIPDSNMEASentenceOperatingModes_Standalone = 0, eQMIPDSNMEASentenceOperatingModes_MSBased = 1, eQMIPDSNMEASentenceOperatingModes_MSAssisted = 2, eQMIPDSNMEASentenceOperatingModes_Unknown = 255, }; // Enum to describe QMI PDS Network Mode enum eQMIPDSNetworkMode:UINT8 { eQMIPDSNetworkMode_UMTS = 0, eQMIPDSNetworkMode_CDMA = 1, }; // Enum to describe QMI PDS ODP States enum eQMIPDSODPStates:UINT8 { eQMIPDSODPStates_Disables = 0, eQMIPDSODPStates_EnabledLowPowerMode = 1, eQMIPDSODPStates_EnabledReadyMode = 2, }; // Enum to describe QMI PDS Operation Types enum eQMIPDSOperationTypes:UINT8 { eQMIPDSOperationTypes_Standalone = 0, eQMIPDSOperationTypes_MSBased = 1, eQMIPDSOperationTypes_MSAssisted = 2, }; // Enum to describe QMI PDS Output Devices enum eQMIPDSOutputDevices:UINT8 { eQMIPDSOutputDevices_NoneDisabled = 0, eQMIPDSOutputDevices_USB = 1, eQMIPDSOutputDevices_UART1 = 2, eQMIPDSOutputDevices_UART2 = 3, eQMIPDSOutputDevices_SharedMemory = 4, }; // Enum to describe QMI PDS Privacy Modes enum eQMIPDSPrivacyModes:UINT8 { eQMIPDSPrivacyModes_NoNotifyVerify = 0, eQMIPDSPrivacyModes_Notify = 1, eQMIPDSPrivacyModes_NotifyVerifyAllowNoResponse = 2, eQMIPDSPrivacyModes_NotifyVerifyRequireResponse = 3, eQMIPDSPrivacyModes_PrivacyOverride = 4, }; // Enum to describe QMI PDS Reliability Indicator enum eQMIPDSReliabilityIndicator:UINT8 { eQMIPDSReliabilityIndicator_NotSet = 0, eQMIPDSReliabilityIndicator_VeryLow = 1, eQMIPDSReliabilityIndicator_Low = 2, eQMIPDSReliabilityIndicator_Medium = 3, eQMIPDSReliabilityIndicator_High = 4, }; // Enum to describe QMI PDS Report Security Challenge enum eQMIPDSReportSecurityChallenge:UINT8 { eQMIPDSReportSecurityChallenge_Disable = 0, eQMIPDSReportSecurityChallenge_Enable = 1, }; // Enum to describe QMI PDS Reporting State enum eQMIPDSReportingState:UINT8 { eQMIPDSReportingState_StopReporting = 0, eQMIPDSReportingState_StartReporting = 1, }; // Enum to describe QMI PDS Reset Reasons enum eQMIPDSResetReasons:UINT32 { eQMIPDSResetReasons_PositionEngine = 0, eQMIPDSResetReasons_GNSSBackgroundSCan = 1, eQMIPDSResetReasons_InjectClockInconsistency = 2, eQMIPDSResetReasons_GPSSubframeMisalignment = 3, eQMIPDSResetReasons_DecodedTimeInconsistency = 4, eQMIPDSResetReasons_CodeConsistencyError = 5, eQMIPDSResetReasons_SoftResetFromINTMSError = 6, eQMIPDSResetReasons_SoftResetFromRFFailure = 7, }; // Enum to describe QMI PDS Reset States enum eQMIPDSResetStates:UINT32 { eQMIPDSResetStates_InProgress = 0, eQMIPDSResetStates_Completed = 1, eQMIPDSResetStates_UnableToInitialize = 2, eQMIPDSResetStates_E911CallInProgress = 3, }; // Enum to describe QMI PDS SBAS States enum eQMIPDSSBASStates:UINT8 { eQMIPDSSBASStates_Disabled = 0, eQMIPDSSBASStates_Enabled = 1, eQMIPDSSBASStates_Unknown = 255, }; // Enum to describe QMI PDS SPI State enum eQMIPDSSPIState:UINT8 { eQMIPDSSPIState_DeviceIsNonstationary = 0, eQMIPDSSPIState_DeviceIsStationary = 1, }; // Enum to describe QMI PDS SUPL Data Coding Schemes enum eQMIPDSSUPLDataCodingSchemes:UINT8 { eQMIPDSSUPLDataCodingSchemes_UTF8 = 0, eQMIPDSSUPLDataCodingSchemes_UCS2 = 1, eQMIPDSSUPLDataCodingSchemes_GSM = 2, eQMIPDSSUPLDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL ID/Name Data Coding Schemes enum eQMIPDSSUPLIDNameDataCodingSchemes:UINT8 { eQMIPDSSUPLIDNameDataCodingSchemes_LogicalName = 0, eQMIPDSSUPLIDNameDataCodingSchemes_EmailAddress = 1, eQMIPDSSUPLIDNameDataCodingSchemes_MSISDN = 2, eQMIPDSSUPLIDNameDataCodingSchemes_URL = 3, eQMIPDSSUPLIDNameDataCodingSchemes_SIPURL = 4, eQMIPDSSUPLIDNameDataCodingSchemes_MIN = 5, eQMIPDSSUPLIDNameDataCodingSchemes_MDN = 6, eQMIPDSSUPLIDNameDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS SUPL Modes enum eQMIPDSSUPLModes:UINT8 { eQMIPDSSUPLModes_MSAssisted = 0, eQMIPDSSUPLModes_MSBased = 1, eQMIPDSSUPLModes_MSAssistedPreferred = 2, eQMIPDSSUPLModes_MSBasedPreferred = 3, eQMIPDSSUPLModes_Standalone = 4, eQMIPDSSUPLModes_AFLT = 5, eQMIPDSSUPLModes_ECID = 6, eQMIPDSSUPLModes_EOTD = 7, eQMIPDSSUPLModes_OTDOA = 8, eQMIPDSSUPLModes_NoPosition = 9, }; // Enum to describe QMI PDS SV Almanac Status enum eQMIPDSSVAlmanacStatus:UINT8 { eQMIPDSSVAlmanacStatus_Unavailable = 0, eQMIPDSSVAlmanacStatus_Available = 1, }; // Enum to describe QMI PDS SV Ephemeris Status enum eQMIPDSSVEphemerisStatus:UINT8 { eQMIPDSSVEphemerisStatus_Unavailable = 0, eQMIPDSSVEphemerisStatus_Available = 1, }; // Enum to describe QMI PDS SV Health Status enum eQMIPDSSVHealthStatus:UINT8 { eQMIPDSSVHealthStatus_Unhealthy = 0, eQMIPDSSVHealthStatus_Healthy = 1, }; // Enum to describe QMI PDS SV Processing Status enum eQMIPDSSVProcessingStatus:UINT8 { eQMIPDSSVProcessingStatus_Idle = 1, eQMIPDSSVProcessingStatus_Search = 2, eQMIPDSSVProcessingStatus_SearchVerify = 3, eQMIPDSSVProcessingStatus_BitEdge = 4, eQMIPDSSVProcessingStatus_Track = 5, }; // Enum to describe QMI PDS SV Systems enum eQMIPDSSVSystems:UINT8 { eQMIPDSSVSystems_GPS = 1, eQMIPDSSVSystems_Galileo = 2, eQMIPDSSVSystems_SBAS = 3, eQMIPDSSVSystems_Compass = 4, eQMIPDSSVSystems_Glonass = 5, }; // Enum to describe QMI PDS Server Options enum eQMIPDSServerOptions:UINT8 { eQMIPDSServerOptions_Default = 0, }; // Enum to describe QMI PDS Session Control Types enum eQMIPDSSessionControlTypes:UINT8 { eQMIPDSSessionControlTypes_Automatic = 0, }; // Enum to describe QMI PDS Session Status enum eQMIPDSSessionStatus:UINT8 { eQMIPDSSessionStatus_Success = 0, eQMIPDSSessionStatus_InProgress = 1, eQMIPDSSessionStatus_GeneralFailure = 2, eQMIPDSSessionStatus_Timeout = 3, eQMIPDSSessionStatus_UserEnded = 4, eQMIPDSSessionStatus_BadParameter = 5, eQMIPDSSessionStatus_PhoneOffline = 6, eQMIPDSSessionStatus_EngineLocked = 7, eQMIPDSSessionStatus_E911SessionInProgress = 8, }; // Enum to describe QMI PDS Session Types enum eQMIPDSSessionTypes:UINT8 { eQMIPDSSessionTypes_New = 0, }; // Enum to describe QMI PDS Source Linkage enum eQMIPDSSourceLinkage:UINT8 { eQMIPDSSourceLinkage_NotSpecified = 0, eQMIPDSSourceLinkage_FullyInterDependent = 1, eQMIPDSSourceLinkage_AltitudeDependsOnLatitudeAndLongitude = 2, eQMIPDSSourceLinkage_FullyIndependent = 3, }; // Enum to describe QMI PDS Stop Reason enum eQMIPDSStopReason:UINT8 { eQMIPDSStopReason_UserTerminated = 0, eQMIPDSStopReason_Other = 1, }; // Enum to describe QMI PDS Streaming Status enum eQMIPDSStreamingStatus:UINT8 { eQMIPDSStreamingStatus_NotReadyForStreaming = 0, eQMIPDSStreamingStatus_ReadyForStreaming = 1, }; // Enum to describe QMI PDS Suspend Reason enum eQMIPDSSuspendReason:UINT8 { eQMIPDSSuspendReason_OoS = 0, eQMIPDSSuspendReason_LPM = 1, eQMIPDSSuspendReason_Other = 2, }; // Enum to describe QMI PDS Time Bases enum eQMIPDSTimeBases:UINT8 { eQMIPDSTimeBases_GPS = 0, eQMIPDSTimeBases_UTC = 1, }; // Enum to describe QMI PDS Time Source enum eQMIPDSTimeSource:UINT8 { eQMIPDSTimeSource_Invalid = 0, eQMIPDSTimeSource_NetworkTimeTransfer = 1, eQMIPDSTimeSource_NetworkTimeTagging = 2, eQMIPDSTimeSource_ExternalInput = 3, eQMIPDSTimeSource_TOWDecode = 4, eQMIPDSTimeSource_TOWConfirmed = 5, eQMIPDSTimeSource_TOWAndWeekConfirmed = 6, eQMIPDSTimeSource_TimeAlignment = 7, eQMIPDSTimeSource_NavSolution = 8, eQMIPDSTimeSource_SolveForTime = 9, }; // Enum to describe QMI PDS Time Type enum eQMIPDSTimeType:UINT8 { eQMIPDSTimeType_UTCTime = 0, eQMIPDSTimeType_GPSTime = 1, eQMIPDSTimeType_Age = 2, }; // Enum to describe QMI PDS Tracking Session States enum eQMIPDSTrackingSessionStates:UINT8 { eQMIPDSTrackingSessionStates_Unknown = 0, eQMIPDSTrackingSessionStates_Inactive = 1, eQMIPDSTrackingSessionStates_Active = 2, }; // Enum to describe QMI PDS UMTS CP Data Coding Schemes enum eQMIPDSUMTSCPDataCodingSchemes:UINT8 { eQMIPDSUMTSCPDataCodingSchemes_German = 0, eQMIPDSUMTSCPDataCodingSchemes_English = 1, eQMIPDSUMTSCPDataCodingSchemes_Italian = 2, eQMIPDSUMTSCPDataCodingSchemes_French = 3, eQMIPDSUMTSCPDataCodingSchemes_Spanish = 4, eQMIPDSUMTSCPDataCodingSchemes_Dutch = 5, eQMIPDSUMTSCPDataCodingSchemes_Swedish = 6, eQMIPDSUMTSCPDataCodingSchemes_Danish = 7, eQMIPDSUMTSCPDataCodingSchemes_Portuguese = 8, eQMIPDSUMTSCPDataCodingSchemes_Finnish = 9, eQMIPDSUMTSCPDataCodingSchemes_Norwegian = 10, eQMIPDSUMTSCPDataCodingSchemes_Greek = 11, eQMIPDSUMTSCPDataCodingSchemes_Turkish = 12, eQMIPDSUMTSCPDataCodingSchemes_Hungarian = 13, eQMIPDSUMTSCPDataCodingSchemes_Polish = 14, eQMIPDSUMTSCPDataCodingSchemes_Unknown = 255, }; // Enum to describe QMI PDS UMTS CP Location Types enum eQMIPDSUMTSCPLocationTypes:UINT8 { eQMIPDSUMTSCPLocationTypes_Current = 0, eQMIPDSUMTSCPLocationTypes_CurrentOrLastKnown = 1, eQMIPDSUMTSCPLocationTypes_Initial = 2, }; // Enum to describe QMI PDS Uncertainty Coverage enum eQMIPDSUncertaintyCoverage:UINT8 { eQMIPDSUncertaintyCoverage_NotSpecified = 0, eQMIPDSUncertaintyCoverage_PointUncertainty = 1, eQMIPDSUncertaintyCoverage_FullyUncertainty = 2, }; // Enum to describe QMI PDS VX Data Coding Schemes enum eQMIPDSVXDataCodingSchemes:UINT8 { eQMIPDSVXDataCodingSchemes_Octet = 0, eQMIPDSVXDataCodingSchemes_EXNProtocolMessage = 1, eQMIPDSVXDataCodingSchemes_ASCII = 2, eQMIPDSVXDataCodingSchemes_IA5 = 3, eQMIPDSVXDataCodingSchemes_Unicode = 4, eQMIPDSVXDataCodingSchemes_ShiftJIS = 5, eQMIPDSVXDataCodingSchemes_Korean = 6, eQMIPDSVXDataCodingSchemes_LatinHebrew = 7, eQMIPDSVXDataCodingSchemes_Latin = 8, eQMIPDSVXDataCodingSchemes_GSM = 9, }; // Enum to describe QMI PDS VX Modes enum eQMIPDSVXModes:UINT8 { eQMIPDSVXModes_MSAssisted = 0, eQMIPDSVXModes_MSBased = 1, eQMIPDSVXModes_MSAssistedPreferred = 2, eQMIPDSVXModes_MSBasedPreferred = 3, }; // Enum to describe QMI PDS WWAN Network Preferences enum eQMIPDSWWANNetworkPreferences:UINT8 { eQMIPDSWWANNetworkPreferences_AnyAvailable = 0, eQMIPDSWWANNetworkPreferences_HomeOnly = 1, eQMIPDSWWANNetworkPreferences_RoamOnly = 2, }; // Enum to describe QMI PDS Wi-Fi Request Types enum eQMIPDSWiFiRequestTypes:UINT8 { eQMIPDSWiFiRequestTypes_StartPeriodicFixesHighFrequency = 0, eQMIPDSWiFiRequestTypes_StartPeriodicFixesKeepWarm = 1, eQMIPDSWiFiRequestTypes_StopPeriodicFixes = 2, eQMIPDSWiFiRequestTypes_Suspend = 4, }; // Enum to describe QMI Profile Types enum eQMIProfileTypes:UINT8 { eQMIProfileTypes_3GPP = 0, eQMIProfileTypes_3GPP2 = 1, }; // Enum to describe QMI QCMAP Call End Reasons enum eQMIQCMAPCallEndReasons:UINT32 { eQMIQCMAPCallEndReasons_Unknown = 0, eQMIQCMAPCallEndReasons_Unspecified = 1, eQMIQCMAPCallEndReasons_ClientEnd = 2, eQMIQCMAPCallEndReasons_NoService = 3, eQMIQCMAPCallEndReasons_Fade = 4, eQMIQCMAPCallEndReasons_ReleaseNormal = 5, eQMIQCMAPCallEndReasons_AccInProgress = 6, eQMIQCMAPCallEndReasons_AccFailed = 7, eQMIQCMAPCallEndReasons_RedirectOrHandoff = 8, eQMIQCMAPCallEndReasons_CloseInProgress = 9, eQMIQCMAPCallEndReasons_AuthenticationFailed = 10, eQMIQCMAPCallEndReasons_InternalError = 11, eQMIQCMAPCallEndReasons_CDMALock = 500, eQMIQCMAPCallEndReasons_Intercept = 501, eQMIQCMAPCallEndReasons_Reorder = 502, eQMIQCMAPCallEndReasons_ReleaseServiceOptionRejected = 503, eQMIQCMAPCallEndReasons_IncomingCall = 504, eQMIQCMAPCallEndReasons_AlertStop = 505, eQMIQCMAPCallEndReasons_Activation = 506, eQMIQCMAPCallEndReasons_MaxAccessProbe = 507, eQMIQCMAPCallEndReasons_CCSNotSupportedByBS = 508, eQMIQCMAPCallEndReasons_NoResponseFromBS = 509, eQMIQCMAPCallEndReasons_RejectedByBS = 510, eQMIQCMAPCallEndReasons_Incompatible = 511, eQMIQCMAPCallEndReasons_AlreadyInTC = 512, eQMIQCMAPCallEndReasons_UserCallOrigDuringGPS = 513, eQMIQCMAPCallEndReasons_UserCallOrigDuringSMS = 514, eQMIQCMAPCallEndReasons_NoCDMAService = 515, eQMIQCMAPCallEndReasons_ConfFailed = 1000, eQMIQCMAPCallEndReasons_IncomingRejected = 1001, eQMIQCMAPCallEndReasons_NoGWService = 1002, eQMIQCMAPCallEndReasons_NetworkEnd = 1003, eQMIQCMAPCallEndReasons_LLCOrSNDCPFailure = 1004, eQMIQCMAPCallEndReasons_InsufficientResources = 1005, eQMIQCMAPCallEndReasons_ServiceOptionOutOfOrder = 1006, eQMIQCMAPCallEndReasons_NSAPIAlreadyUsed = 1007, eQMIQCMAPCallEndReasons_RegularPDPContextDeactivation = 1008, eQMIQCMAPCallEndReasons_NetworkFailure = 1009, eQMIQCMAPCallEndReasons_ReactivationRequested = 1010, eQMIQCMAPCallEndReasons_ProtocolError = 1011, eQMIQCMAPCallEndReasons_OperatorDeterminedBarring = 1012, eQMIQCMAPCallEndReasons_UnknownOrMissingAPN = 1013, eQMIQCMAPCallEndReasons_UnknownPDPAddressOrPDPType = 1014, eQMIQCMAPCallEndReasons_ActivationRejectedByGGSN = 1015, eQMIQCMAPCallEndReasons_ActivationRejectedUnspecified = 1016, eQMIQCMAPCallEndReasons_ServiceOptionNotSupported = 1017, eQMIQCMAPCallEndReasons_RequestedServiceOptionNotSubscribed = 1018, eQMIQCMAPCallEndReasons_QoSNotAccepted = 1019, eQMIQCMAPCallEndReasons_SemanticErrorInTheTFTOperation = 1020, eQMIQCMAPCallEndReasons_SyntacticalErrorInTheTFTOperation = 1021, eQMIQCMAPCallEndReasons_UnknownPDPContext = 1022, eQMIQCMAPCallEndReasons_SemanticErrorsInPacketFilters = 1023, eQMIQCMAPCallEndReasons_SyntacticalErrorsInPacketFilters = 1024, eQMIQCMAPCallEndReasons_PDPContextWithoutTFTAlreadyActivated = 1025, eQMIQCMAPCallEndReasons_InvalidTransactionIdentifierValue = 1026, eQMIQCMAPCallEndReasons_SemanticallyIncorrectMessage = 1027, eQMIQCMAPCallEndReasons_InvalidMandatoryInformation = 1028, eQMIQCMAPCallEndReasons_MessageTypeNonExistent = 1029, eQMIQCMAPCallEndReasons_MessageNotCompatibleWithState = 1030, eQMIQCMAPCallEndReasons_InformationElementNonexistent = 1031, eQMIQCMAPCallEndReasons_ConditionalInformationElementError = 1032, eQMIQCMAPCallEndReasons_MessageNotCompatibleWithProtocolState = 1033, eQMIQCMAPCallEndReasons_APNRestrictionValueIncompatibleWithActivePDPContext = 1034, eQMIQCMAPCallEndReasons_NoGPRSContextPresent = 1035, eQMIQCMAPCallEndReasons_RequestedFeatureNotSupported = 1036, eQMIQCMAPCallEndReasons_CDGenOrBusy = 1500, eQMIQCMAPCallEndReasons_CDBillOrAuth = 1501, eQMIQCMAPCallEndReasons_ChangeHDR = 1502, eQMIQCMAPCallEndReasons_ExitHDR = 1503, eQMIQCMAPCallEndReasons_HDRNoSession = 1504, eQMIQCMAPCallEndReasons_HDROrigDuringGPSFix = 1505, eQMIQCMAPCallEndReasons_HDRCSTimeout = 1506, eQMIQCMAPCallEndReasons_HDRReleasedByCM = 1507, }; // Enum to describe QMI QCMAP IP Families enum eQMIQCMAPIPFamilies:UINT32 { eQMIQCMAPIPFamilies_IPv4 = 4, eQMIQCMAPIPFamilies_IPv6 = 6, }; // Enum to describe QMI QCMAP Next Header Protocols enum eQMIQCMAPNextHeaderProtocols:UINT32 { eQMIQCMAPNextHeaderProtocols_TCP = 1, eQMIQCMAPNextHeaderProtocols_UDP = 2, eQMIQCMAPNextHeaderProtocols_ICMPv4 = 3, eQMIQCMAPNextHeaderProtocols_ICMPv6 = 4, eQMIQCMAPNextHeaderProtocols_ESP = 5, eQMIQCMAPNextHeaderProtocols_TCPUDP = 6, }; // Enum to describe QMI QCMAP Packet Service Status enum eQMIQCMAPPacketServiceStatus:UINT32 { eQMIQCMAPPacketServiceStatus_Connecting = 1, eQMIQCMAPPacketServiceStatus_Connected = 2, eQMIQCMAPPacketServiceStatus_Disconnecting = 3, eQMIQCMAPPacketServiceStatus_Disconnected = 4, }; // Enum to describe QMI QCMAP Verbose Call End Reasons enum eQMIQCMAPVerboseCallEndReasons:UINT32 { eQMIQCMAPVerboseCallEndReasons_Unspecified = 0, eQMIQCMAPVerboseCallEndReasons_MIPFAUnspecified = 65600, eQMIQCMAPVerboseCallEndReasons_MIPFAAdministrativelyProhibited = 65601, eQMIQCMAPVerboseCallEndReasons_MIPFAInsufficientResources = 65602, eQMIQCMAPVerboseCallEndReasons_MIPFAMobileNodeAuthenticationFailure = 65603, eQMIQCMAPVerboseCallEndReasons_MIPFAHAAuthenticationFailure = 65604, eQMIQCMAPVerboseCallEndReasons_MIPFARequestedLifetimeTooLong = 65605, eQMIQCMAPVerboseCallEndReasons_MIPFAMalformedRequest = 65606, eQMIQCMAPVerboseCallEndReasons_MIPFAMalformedReply = 65607, eQMIQCMAPVerboseCallEndReasons_MIPFAEncapsulationUnavailable = 65608, eQMIQCMAPVerboseCallEndReasons_MIPFAVJHCUnavailable = 65609, eQMIQCMAPVerboseCallEndReasons_MIPFAReverseTunnelUnavailable = 65610, eQMIQCMAPVerboseCallEndReasons_MIPFAReverseTunnelIsMandatoryAndTBitIsNotSet = 65611, eQMIQCMAPVerboseCallEndReasons_MIPFADeliveryStyleNotSupported = 65615, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingNAI = 65633, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingHA = 65634, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingHomeAddress = 65635, eQMIQCMAPVerboseCallEndReasons_MIPFAUnknownChallenge = 65640, eQMIQCMAPVerboseCallEndReasons_MIPFAMissingChallenge = 65641, eQMIQCMAPVerboseCallEndReasons_MIPFAStaleChallenge = 65642, eQMIQCMAPVerboseCallEndReasons_MIPHAReasonUnspecified = 65664, eQMIQCMAPVerboseCallEndReasons_MIPHAAdministrativelyProhibited = 65665, eQMIQCMAPVerboseCallEndReasons_MIPHAInsufficientResources = 65666, eQMIQCMAPVerboseCallEndReasons_MIPHAMobileNodeAuthenticationFailure = 65667, eQMIQCMAPVerboseCallEndReasons_MIPHAFAAuthenticationFailure = 65668, eQMIQCMAPVerboseCallEndReasons_MIPHARegistrationIDMismatch = 65669, eQMIQCMAPVerboseCallEndReasons_MIPHAMalformedRequest = 65670, eQMIQCMAPVerboseCallEndReasons_MIPHAUnknownHAAddress = 65672, eQMIQCMAPVerboseCallEndReasons_MIPHAReverseTunnelUnavailable = 65673, eQMIQCMAPVerboseCallEndReasons_MIPHAReverseTunnelIsMandatoryAndTBitIsNotSet = 65674, eQMIQCMAPVerboseCallEndReasons_MIPHAEncapsulationUnavailable = 65675, eQMIQCMAPVerboseCallEndReasons_Unknown = 131071, eQMIQCMAPVerboseCallEndReasons_Internal = 131273, eQMIQCMAPVerboseCallEndReasons_CallEnded = 131274, eQMIQCMAPVerboseCallEndReasons_InternalUnknownCauseCode = 131275, eQMIQCMAPVerboseCallEndReasons_UnknownCauseCode = 131276, eQMIQCMAPVerboseCallEndReasons_CloseInProgress = 131277, eQMIQCMAPVerboseCallEndReasons_NWInitiatedTermination = 131278, eQMIQCMAPVerboseCallEndReasons_AppPreempted = 131279, eQMIQCMAPVerboseCallEndReasons_CMCDMALock = 197108, eQMIQCMAPVerboseCallEndReasons_CMIntercept = 197109, eQMIQCMAPVerboseCallEndReasons_CMReorder = 197110, eQMIQCMAPVerboseCallEndReasons_CMReleaseServiceOptionReject = 197111, eQMIQCMAPVerboseCallEndReasons_CMIncomingCall = 197112, eQMIQCMAPVerboseCallEndReasons_CMAlertStop = 197113, eQMIQCMAPVerboseCallEndReasons_CMActivation = 197114, eQMIQCMAPVerboseCallEndReasons_CMMaxAccessProbe = 197115, eQMIQCMAPVerboseCallEndReasons_CMCCSNotSupportedByBS = 197116, eQMIQCMAPVerboseCallEndReasons_CMNoResponseFromBS = 197117, eQMIQCMAPVerboseCallEndReasons_CMRejectedByBS = 197118, eQMIQCMAPVerboseCallEndReasons_CMIncompatible = 197119, eQMIQCMAPVerboseCallEndReasons_CMAlreadyInTC = 197120, eQMIQCMAPVerboseCallEndReasons_CMUserCallOrigDuringGPS = 197121, eQMIQCMAPVerboseCallEndReasons_CMUserCallOrigDuringSMS = 197122, eQMIQCMAPVerboseCallEndReasons_CMNoCDMAService = 197123, eQMIQCMAPVerboseCallEndReasons_CMRetryOrder = 197127, eQMIQCMAPVerboseCallEndReasons_CMConfFailed = 197608, eQMIQCMAPVerboseCallEndReasons_CMIncomingRejected = 197609, eQMIQCMAPVerboseCallEndReasons_CMNoGWService = 197616, eQMIQCMAPVerboseCallEndReasons_CMNoGPRSContext = 197617, eQMIQCMAPVerboseCallEndReasons_CMIllegalMS = 197618, eQMIQCMAPVerboseCallEndReasons_CMIllegalME = 197619, eQMIQCMAPVerboseCallEndReasons_CMGPRSServicesAndNonGPRSServiceNotAllowed = 197620, eQMIQCMAPVerboseCallEndReasons_CMGPRSServicesNotAllowed = 197621, eQMIQCMAPVerboseCallEndReasons_CMMSIdentityCannotBeDerivedByTheNetwork = 197622, eQMIQCMAPVerboseCallEndReasons_CMImplicitlyDetached = 197623, eQMIQCMAPVerboseCallEndReasons_CMPLMNNotAllowed = 197624, eQMIQCMAPVerboseCallEndReasons_CMLANotAllowed = 197625, eQMIQCMAPVerboseCallEndReasons_CMGPRSServicesNotAllowedInThisPLMN = 197626, eQMIQCMAPVerboseCallEndReasons_CMPDPDuplicate = 197627, eQMIQCMAPVerboseCallEndReasons_CMUERATChange = 197628, eQMIQCMAPVerboseCallEndReasons_CMCongestion = 197629, eQMIQCMAPVerboseCallEndReasons_CMNoPDPContextActivated = 197630, eQMIQCMAPVerboseCallEndReasons_CMAccessClassDSACRejection = 197631, eQMIQCMAPVerboseCallEndReasons_CMCDGenOrBusy = 198108, eQMIQCMAPVerboseCallEndReasons_CMCDBillOrAuth = 198109, eQMIQCMAPVerboseCallEndReasons_CMChangeHDR = 198110, eQMIQCMAPVerboseCallEndReasons_CMExitHDR = 198111, eQMIQCMAPVerboseCallEndReasons_CMHDRNoSession = 198112, eQMIQCMAPVerboseCallEndReasons_CMHDROrigDuringGPSFix = 198113, eQMIQCMAPVerboseCallEndReasons_CMHDRCSTimeout = 198114, eQMIQCMAPVerboseCallEndReasons_CMHDRReleasedByCM = 198115, eQMIQCMAPVerboseCallEndReasons_CMNoHybridHDRService = 198118, eQMIQCMAPVerboseCallEndReasons_CMClientEnd = 198608, eQMIQCMAPVerboseCallEndReasons_CMNoService = 198609, eQMIQCMAPVerboseCallEndReasons_CMFade = 198610, eQMIQCMAPVerboseCallEndReasons_CMNormalRelease = 198611, eQMIQCMAPVerboseCallEndReasons_CMAccessInProgress = 198612, eQMIQCMAPVerboseCallEndReasons_CMAccessFail = 198613, eQMIQCMAPVerboseCallEndReasons_CMRedirectOrHandoff = 198614, eQMIQCMAPVerboseCallEndReasons_3GPPOperatorDeterminedBarring = 393224, eQMIQCMAPVerboseCallEndReasons_3GPPLLCSNDCPFailure = 393241, eQMIQCMAPVerboseCallEndReasons_3GPPInsufficientResources = 393242, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownAPN = 393243, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownPDP = 393244, eQMIQCMAPVerboseCallEndReasons_3GPPAuthenticationFailed = 393245, eQMIQCMAPVerboseCallEndReasons_3GPPGGSNReject = 393246, eQMIQCMAPVerboseCallEndReasons_3GPPActivationReject = 393247, eQMIQCMAPVerboseCallEndReasons_3GPPOptionNotSupported = 393248, eQMIQCMAPVerboseCallEndReasons_3GPPOptionUnsubscribed = 393249, eQMIQCMAPVerboseCallEndReasons_3GPPOptionTemporarilyOOO = 393250, eQMIQCMAPVerboseCallEndReasons_3GPPNSAPIAlreadyUsed = 393251, eQMIQCMAPVerboseCallEndReasons_3GPPRegularDeactivation = 393252, eQMIQCMAPVerboseCallEndReasons_3GPPQoSNotAccepted = 393253, eQMIQCMAPVerboseCallEndReasons_3GPPNetworkFailure = 393254, eQMIQCMAPVerboseCallEndReasons_3GPPUMTSReactivationRequest = 393255, eQMIQCMAPVerboseCallEndReasons_3GPPFeatureNotSupported = 393256, eQMIQCMAPVerboseCallEndReasons_3GPPTFTSemanticError = 393257, eQMIQCMAPVerboseCallEndReasons_3GPPTFTSyntaxError = 393258, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownPDPContext = 393259, eQMIQCMAPVerboseCallEndReasons_3GPPFilterSemanticError = 393260, eQMIQCMAPVerboseCallEndReasons_3GPPFilterSyntaxError = 393261, eQMIQCMAPVerboseCallEndReasons_3GPPPDPWithoutActiveTFT = 393262, eQMIQCMAPVerboseCallEndReasons_3GPPInvalidTransactionID = 393297, eQMIQCMAPVerboseCallEndReasons_3GPPMessageIncorrectSemantic = 393311, eQMIQCMAPVerboseCallEndReasons_3GPPInvalidMandatoryID = 393312, eQMIQCMAPVerboseCallEndReasons_3GPPMessageTypeUnsupported = 393313, eQMIQCMAPVerboseCallEndReasons_3GPPMessageTypeNoncompatibleState = 393314, eQMIQCMAPVerboseCallEndReasons_3GPPUnknownInfoElement = 393315, eQMIQCMAPVerboseCallEndReasons_3GPPConditionalInfoElementError = 393316, eQMIQCMAPVerboseCallEndReasons_3GPPMessageAndProtocolStateUncompatible = 393317, eQMIQCMAPVerboseCallEndReasons_3GPPProtocolError = 393327, eQMIQCMAPVerboseCallEndReasons_3GPPAPNTypeConflict = 393328, eQMIQCMAPVerboseCallEndReasons_PPPTimeout = 458753, eQMIQCMAPVerboseCallEndReasons_PPPAuthenticationFailed = 458754, eQMIQCMAPVerboseCallEndReasons_PPPOptionMismatch = 458755, eQMIQCMAPVerboseCallEndReasons_PPPPAPFailure = 458783, eQMIQCMAPVerboseCallEndReasons_PPPCHAPFailure = 458784, eQMIQCMAPVerboseCallEndReasons_PPPUnknown = 524287, eQMIQCMAPVerboseCallEndReasons_EHRPDSubsLimitedToV4 = 524289, eQMIQCMAPVerboseCallEndReasons_EHRPDSubsLimitedToV6 = 524290, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCPTimeout = 524292, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCPFailure = 524293, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IGeneralError = 524294, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IUnauthAPN = 524295, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNLimit = 524296, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2INoPDNGW = 524297, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNGWUnreach = 524298, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNGWRejected = 524299, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IInsufficientParam = 524300, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IResourceUnavailable = 524301, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IAdminProhibited = 524302, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNIDInUse = 524303, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2ISubscriberLimitation = 524304, eQMIQCMAPVerboseCallEndReasons_EHRPDVSNCP3GPP2IPDNExistsForAPN = 524305, eQMIQCMAPVerboseCallEndReasons_PrefixUnavailable = 589825, }; // Enum to describe QMI QoS Delivery Orders enum eQMIQoSDeliveryOrders:UINT8 { eQMIQoSDeliveryOrders_Subscribe = 0, eQMIQoSDeliveryOrders_DeliveryOrderOn = 1, eQMIQoSDeliveryOrders_DeliveryOrderOff = 2, }; // Enum to describe QMI Results enum eQMIResults:UINT16 { eQMIResults_Success = 0, eQMIResults_Failure = 1, }; // Enum to describe QMI SAR RF States enum eQMISARRFStates { eQMISARRFStates_DefaultState = 0, eQMISARRFStates_State1 = 1, eQMISARRFStates_State2 = 2, eQMISARRFStates_State3 = 3, eQMISARRFStates_State4 = 4, eQMISARRFStates_State5 = 5, eQMISARRFStates_State6 = 6, eQMISARRFStates_State7 = 7, eQMISARRFStates_State8 = 8, }; // Enum to describe QMI SDU Error Ratios enum eQMISDUErrorRatios:UINT8 { eQMISDUErrorRatios_Subscribe = 0, eQMISDUErrorRatios_1X102 = 1, eQMISDUErrorRatios_7X103 = 2, eQMISDUErrorRatios_1X103 = 3, eQMISDUErrorRatios_1X104 = 4, eQMISDUErrorRatios_1X105 = 5, eQMISDUErrorRatios_1X106 = 6, eQMISDUErrorRatios_1X101 = 7, }; // Enum to describe QMI SDU Residual Bit Error Ratios enum eQMISDUResidualBitErrorRatios:UINT8 { eQMISDUResidualBitErrorRatios_Subscribe = 0, eQMISDUResidualBitErrorRatios_5X102 = 1, eQMISDUResidualBitErrorRatios_1X102 = 2, eQMISDUResidualBitErrorRatios_5X103 = 3, eQMISDUResidualBitErrorRatios_4X103 = 4, eQMISDUResidualBitErrorRatios_1X103 = 5, eQMISDUResidualBitErrorRatios_1X104 = 6, eQMISDUResidualBitErrorRatios_1X105 = 7, eQMISDUResidualBitErrorRatios_1X106 = 8, eQMISDUResidualBitErrorRatios_6X108 = 9, }; // Enum to describe QMI Traffic Classes enum eQMITrafficClasses:UINT8 { eQMITrafficClasses_Subscribed = 0, eQMITrafficClasses_Conversational = 1, eQMITrafficClasses_Streaming = 2, eQMITrafficClasses_Interactive = 3, eQMITrafficClasses_Background = 4, }; // Enum to describe QMI UIM APDU Response Status enum eQMIUIMAPDUResponseStatus:UINT8 { eQMIUIMAPDUResponseStatus_ReturnIntermediateProcedureBytes = 0, eQMIUIMAPDUResponseStatus_ReturnFinalResultAndStatusWords = 1, }; // Enum to describe QMI UIM Application States enum eQMIUIMApplicationStates:UINT8 { eQMIUIMApplicationStates_Unknown = 0, eQMIUIMApplicationStates_Detected = 1, eQMIUIMApplicationStates_PIN1OrUPINIsRequired = 2, eQMIUIMApplicationStates_PUK1OrPUKForUPINIsRequired = 3, eQMIUIMApplicationStates_PersonalizationStateMustBeChecked = 4, eQMIUIMApplicationStates_PIN1IsBlocked = 5, eQMIUIMApplicationStates_Illegal = 6, eQMIUIMApplicationStates_Ready = 7, }; // Enum to describe QMI UIM Application Types enum eQMIUIMApplicationTypes:UINT8 { eQMIUIMApplicationTypes_Unknown = 0, eQMIUIMApplicationTypes_SIMCard = 1, eQMIUIMApplicationTypes_USIMApplication = 2, eQMIUIMApplicationTypes_RUIMCard = 3, eQMIUIMApplicationTypes_CSIMApplication = 4, eQMIUIMApplicationTypes_ISIMApplication = 5, }; // Enum to describe QMI UIM Authentication Contexts enum eQMIUIMAuthenticationContexts { eQMIUIMAuthenticationContexts_GSMAlgorithm = 0, eQMIUIMAuthenticationContexts_CAVEAlgorithm = 1, eQMIUIMAuthenticationContexts_GSMSecurity = 2, eQMIUIMAuthenticationContexts_3GSecurity = 3, eQMIUIMAuthenticationContexts_VGCSVBSSecurity = 4, eQMIUIMAuthenticationContexts_GBASecurityBootstrappingMode = 5, eQMIUIMAuthenticationContexts_GBASecurityNAFDerivationMode = 6, eQMIUIMAuthenticationContexts_MBMSSecurityMSKUpdateMode = 7, eQMIUIMAuthenticationContexts_MBMSSecurityMTKGenerationMode = 8, eQMIUIMAuthenticationContexts_MBMSSecurityMSKDeletionMode = 9, eQMIUIMAuthenticationContexts_MBMSSecurityMUKDeletionMode = 10, eQMIUIMAuthenticationContexts_IMSAKASecurity = 11, eQMIUIMAuthenticationContexts_HTTPDigestSecurity = 12, eQMIUIMAuthenticationContexts_ComputeIPCHAP = 13, eQMIUIMAuthenticationContexts_ComputeIPMNHA = 14, eQMIUIMAuthenticationContexts_ComputeIPMIPRRQ = 15, eQMIUIMAuthenticationContexts_ComputeIPMNAAA = 16, eQMIUIMAuthenticationContexts_ComputeIPHRPD = 17, }; // Enum to describe QMI UIM CK/Session Operations enum eQMIUIMCKSessionOperations:UINT8 { eQMIUIMCKSessionOperations_Deactivate = 0, eQMIUIMCKSessionOperations_Activate = 1, }; // Enum to describe QMI UIM Card Error Codes enum eQMIUIMCardErrorCodes:UINT8 { eQMIUIMCardErrorCodes_Unknown = 0, eQMIUIMCardErrorCodes_PowerDown = 1, eQMIUIMCardErrorCodes_PollError = 2, eQMIUIMCardErrorCodes_NoATRReceived = 3, eQMIUIMCardErrorCodes_VoltMismatch = 4, eQMIUIMCardErrorCodes_ParityError = 5, eQMIUIMCardErrorCodes_UnknownPossiblyRemoved = 6, eQMIUIMCardErrorCodes_TechnicalProblems = 7, }; // Enum to describe QMI UIM Card States enum eQMIUIMCardStates:UINT8 { eQMIUIMCardStates_Absent = 0, eQMIUIMCardStates_Present = 1, eQMIUIMCardStates_Error = 2, }; // Enum to describe QMI UIM Connect Operations enum eQMIUIMConnectOperations:UINT8 { eQMIUIMConnectOperations_Disconnect = 0, eQMIUIMConnectOperations_Connect = 1, eQMIUIMConnectOperations_CheckStatus = 2, }; // Enum to describe QMI UIM Disonnect Modes enum eQMIUIMDisonnectModes:UINT8 { eQMIUIMDisonnectModes_ImmediateDisconnect = 0, eQMIUIMDisonnectModes_GracefulShutdown = 1, }; // Enum to describe QMI UIM FDN Status Values enum eQMIUIMFDNStatusValues:UINT8 { eQMIUIMFDNStatusValues_NotAvailable = 0, eQMIUIMFDNStatusValues_AvailableButDisabled = 1, eQMIUIMFDNStatusValues_AvailableAndEnabled = 2, }; // Enum to describe QMI UIM File Control Information enum eQMIUIMFileControlInformation:UINT8 { eQMIUIMFileControlInformation_NoData = 0, eQMIUIMFileControlInformation_FCP = 1, eQMIUIMFileControlInformation_FCI = 2, eQMIUIMFileControlInformation_FCIWithInterfaces = 3, eQMIUIMFileControlInformation_FMD = 4, }; // Enum to describe QMI UIM File Types enum eQMIUIMFileTypes:UINT8 { eQMIUIMFileTypes_Transparent = 0, eQMIUIMFileTypes_Cyclic = 1, eQMIUIMFileTypes_LinearFixed = 2, eQMIUIMFileTypes_DedicatedFile = 3, eQMIUIMFileTypes_MasterFile = 4, }; // Enum to describe QMI UIM Hidden Key Status Values enum eQMIUIMHiddenKeyStatusValues:UINT8 { eQMIUIMHiddenKeyStatusValues_NotSupported = 0, eQMIUIMHiddenKeyStatusValues_EnabledAndNotVerified = 1, eQMIUIMHiddenKeyStatusValues_EnabledAndVerified = 2, eQMIUIMHiddenKeyStatusValues_Disabled = 3, }; // Enum to describe QMI UIM Hot-Swap enum eQMIUIMHotSwap:UINT8 { eQMIUIMHotSwap_HotSwapNotSupported = 0, eQMIUIMHotSwap_HotSwapIsSupportedButStatusOfSwitchNotSupported = 1, eQMIUIMHotSwap_SwitchIndicatesThatCardIsPresent = 2, eQMIUIMHotSwap_SwichIndicatesThatCardIsNotPresent = 3, }; // Enum to describe QMI UIM Key Reference ID enum eQMIUIMKeyReferenceID:UINT8 { eQMIUIMKeyReferenceID_PINApplication1 = 1, eQMIUIMKeyReferenceID_PINApplication2 = 2, eQMIUIMKeyReferenceID_PINApplication3 = 3, eQMIUIMKeyReferenceID_PINApplication4 = 4, eQMIUIMKeyReferenceID_PINApplication5 = 5, eQMIUIMKeyReferenceID_PINApplication6 = 6, eQMIUIMKeyReferenceID_PINApplication7 = 7, eQMIUIMKeyReferenceID_PINApplication8 = 8, }; // Enum to describe QMI UIM PIN IDs enum eQMIUIMPINIDs { eQMIUIMPINIDs_PIN1 = 1, eQMIUIMPINIDs_PIN2 = 2, eQMIUIMPINIDs_UniversalPIN = 3, eQMIUIMPINIDs_HiddenKey = 4, }; // Enum to describe QMI UIM PIN Operations enum eQMIUIMPINOperations { eQMIUIMPINOperations_Disable = 0, eQMIUIMPINOperations_Enable = 1, }; // Enum to describe QMI UIM PIN States enum eQMIUIMPINStates:UINT8 { eQMIUIMPINStates_Unknown = 0, eQMIUIMPINStates_EnabledAndNotVerified = 1, eQMIUIMPINStates_EnabledAndVerified = 2, eQMIUIMPINStates_Disabled = 3, eQMIUIMPINStates_Blocked = 4, eQMIUIMPINStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Personalization Features enum eQMIUIMPersonalizationFeatures:UINT8 { eQMIUIMPersonalizationFeatures_GWNetwork = 0, eQMIUIMPersonalizationFeatures_GWNetworkSubset = 1, eQMIUIMPersonalizationFeatures_GWServiceProvider = 2, eQMIUIMPersonalizationFeatures_GWCorporate = 3, eQMIUIMPersonalizationFeatures_GWUIM = 4, eQMIUIMPersonalizationFeatures_1XNetworkType1 = 5, eQMIUIMPersonalizationFeatures_1XNetworkType2 = 6, eQMIUIMPersonalizationFeatures_1XHRPD = 7, eQMIUIMPersonalizationFeatures_1XServiceProvider = 8, eQMIUIMPersonalizationFeatures_1XCorporate = 9, eQMIUIMPersonalizationFeatures_1XRUIM = 10, eQMIUIMPersonalizationFeatures_Unknown = 11, }; // Enum to describe QMI UIM Personalization States enum eQMIUIMPersonalizationStates:UINT8 { eQMIUIMPersonalizationStates_Unknown = 0, eQMIUIMPersonalizationStates_PersonalizationOperationIsInProgress = 1, eQMIUIMPersonalizationStates_Ready = 2, eQMIUIMPersonalizationStates_PersonalizationCodeIsRequired = 3, eQMIUIMPersonalizationStates_PUKForPersonalizationCodeIsRequired = 4, eQMIUIMPersonalizationStates_PermanentlyBlocked = 5, }; // Enum to describe QMI UIM Refresh Modes enum eQMIUIMRefreshModes:UINT8 { eQMIUIMRefreshModes_Reset = 0, eQMIUIMRefreshModes_Init = 1, eQMIUIMRefreshModes_InitAndFCN = 2, eQMIUIMRefreshModes_FCN = 3, eQMIUIMRefreshModes_InitAndFullFCN = 4, eQMIUIMRefreshModes_ApplicationReset = 5, eQMIUIMRefreshModes_3GSessionReset = 6, }; // Enum to describe QMI UIM Refresh Stages enum eQMIUIMRefreshStages:UINT8 { eQMIUIMRefreshStages_WaitingForOK = 0, eQMIUIMRefreshStages_Start = 1, eQMIUIMRefreshStages_EndWithSuccess = 2, eQMIUIMRefreshStages_EndWithFailure = 3, }; // Enum to describe QMI UIM Register Flags enum eQMIUIMRegisterFlags { eQMIUIMRegisterFlags_Deregister = 0, eQMIUIMRegisterFlags_Register = 1, }; // Enum to describe QMI UIM SAP Requests enum eQMIUIMSAPRequests:UINT8 { eQMIUIMSAPRequests_RetrieveATR = 0, eQMIUIMSAPRequests_SendAPDU = 1, eQMIUIMSAPRequests_PowerOffSIM = 2, eQMIUIMSAPRequests_PowerOnSIM = 3, eQMIUIMSAPRequests_ResetSIM = 4, eQMIUIMSAPRequests_RetrieveCardReaderStatus = 5, }; // Enum to describe QMI UIM SAP States enum eQMIUIMSAPStates:UINT8 { eQMIUIMSAPStates_NotEnabled = 0, eQMIUIMSAPStates_Connecting = 1, eQMIUIMSAPStates_ConnectedSuccessfully = 2, eQMIUIMSAPStates_ConnectionError = 3, eQMIUIMSAPStates_Disconnecting = 4, eQMIUIMSAPStates_DisconnectedSuccessfully = 5, }; // Enum to describe QMI UIM Security Attributes enum eQMIUIMSecurityAttributes:UINT8 { eQMIUIMSecurityAttributes_Always = 0, eQMIUIMSecurityAttributes_Never = 1, eQMIUIMSecurityAttributes_ANDCondition = 2, eQMIUIMSecurityAttributes_ORCondition = 3, eQMIUIMSecurityAttributes_SingleCondition = 4, }; // Enum to describe QMI UIM Session Types enum eQMIUIMSessionTypes:UINT8 { eQMIUIMSessionTypes_PrimaryGWProvisioning = 0, eQMIUIMSessionTypes_Primary1XProvisioning = 1, eQMIUIMSessionTypes_SecondaryGWProvisioning = 2, eQMIUIMSessionTypes_Secondary1XProvisioning = 3, eQMIUIMSessionTypes_NonprovisioningOnSlot1 = 4, eQMIUIMSessionTypes_NonprovisioningOnSlot2 = 5, eQMIUIMSessionTypes_CardOnSlot1 = 6, eQMIUIMSessionTypes_CardOnSlot2 = 7, eQMIUIMSessionTypes_LogicalChannelOnSlot1 = 8, eQMIUIMSessionTypes_LogicalChannelOnSlot2 = 9, }; // Enum to describe QMI UIM Slots enum eQMIUIMSlots:UINT8 { eQMIUIMSlots_Slot1 = 1, eQMIUIMSlots_Slot2 = 2, }; // Enum to describe QMI Voice ALS Line Indicators enum eQMIVoiceALSLineIndicators:UINT8 { eQMIVoiceALSLineIndicators_Line1 = 0, eQMIVoiceALSLineIndicators_Line2 = 1, }; // Enum to describe QMI Voice ALS Lines enum eQMIVoiceALSLines:UINT8 { eQMIVoiceALSLines_Line1 = 0, eQMIVoiceALSLines_Line2 = 1, }; // Enum to describe QMI Voice Alerting Patterns enum eQMIVoiceAlertingPatterns:UINT32 { eQMIVoiceAlertingPatterns_Pattern1 = 0, eQMIVoiceAlertingPatterns_Pattern2 = 1, eQMIVoiceAlertingPatterns_Pattern3 = 2, eQMIVoiceAlertingPatterns_Pattern4 = 3, eQMIVoiceAlertingPatterns_Pattern5 = 4, eQMIVoiceAlertingPatterns_Pattern6 = 5, eQMIVoiceAlertingPatterns_Pattern7 = 6, eQMIVoiceAlertingPatterns_Pattern8 = 7, eQMIVoiceAlertingPatterns_Pattern9 = 8, }; // Enum to describe QMI Voice Alerting Types enum eQMIVoiceAlertingTypes:UINT8 { eQMIVoiceAlertingTypes_Local = 0, eQMIVoiceAlertingTypes_Remote = 1, }; // Enum to describe QMI Voice CLIR Causes enum eQMIVoiceCLIRCauses:UINT8 { eQMIVoiceCLIRCauses_None = 0, eQMIVoiceCLIRCauses_RejectedByUser = 1, eQMIVoiceCLIRCauses_InteractionWithOtherServices = 2, eQMIVoiceCLIRCauses_CoinLine = 3, eQMIVoiceCLIRCauses_ServiceUnavailable = 4, eQMIVoiceCLIRCauses_Reserved = 5, }; // Enum to describe QMI Voice CLIR Types enum eQMIVoiceCLIRTypes:UINT8 { eQMIVoiceCLIRTypes_Supression = 1, eQMIVoiceCLIRTypes_Invocation = 2, }; // Enum to describe QMI Voice Call Control Result Types enum eQMIVoiceCallControlResultTypes:UINT8 { eQMIVoiceCallControlResultTypes_Voice = 0, eQMIVoiceCallControlResultTypes_SupplementaryService = 1, eQMIVoiceCallControlResultTypes_USSD = 2, }; // Enum to describe QMI Voice Call Directions enum eQMIVoiceCallDirections:UINT8 { eQMIVoiceCallDirections_MobileOriginated = 1, eQMIVoiceCallDirections_MobileTerminated = 2, }; // Enum to describe QMI Voice Call Modes enum eQMIVoiceCallModes:UINT8 { eQMIVoiceCallModes_NoService = 0, eQMIVoiceCallModes_CDMA = 1, eQMIVoiceCallModes_GSM = 2, eQMIVoiceCallModes_UMTS = 3, eQMIVoiceCallModes_LTE = 4, eQMIVoiceCallModes_TDSCDMA = 5, eQMIVoiceCallModes_Unknown = 6, }; // Enum to describe QMI Voice Call States enum eQMIVoiceCallStates:UINT8 { eQMIVoiceCallStates_Origination = 1, eQMIVoiceCallStates_Incoming = 2, eQMIVoiceCallStates_Conversation = 3, eQMIVoiceCallStates_InProgress = 4, eQMIVoiceCallStates_Alerting = 5, eQMIVoiceCallStates_Hold = 6, eQMIVoiceCallStates_Waiting = 7, eQMIVoiceCallStates_Disconnecting = 8, eQMIVoiceCallStates_End = 9, eQMIVoiceCallStates_Setup = 10, }; // Enum to describe QMI Voice Call Types enum eQMIVoiceCallTypes:UINT8 { eQMIVoiceCallTypes_VoiceAutomaticSelection = 0, eQMIVoiceCallTypes_Forced = 1, eQMIVoiceCallTypes_VoiceOverIP = 2, eQMIVoiceCallTypes_VideoOverIP = 3, eQMIVoiceCallTypes_TestCall = 5, eQMIVoiceCallTypes_OTAPA = 6, eQMIVoiceCallTypes_StandardOTASP = 7, eQMIVoiceCallTypes_NonStandardOTASP = 8, eQMIVoiceCallTypes_Emergency = 9, eQMIVoiceCallTypes_SupplementaryService = 10, }; // Enum to describe QMI Voice DTMF Events enum eQMIVoiceDTMFEvents:UINT8 { eQMIVoiceDTMFEvents_SendDTMFBurst = 0, eQMIVoiceDTMFEvents_StartSendingContinuousDTMFTone = 1, eQMIVoiceDTMFEvents_StopSendingContinuousDTMFTone = 3, eQMIVoiceDTMFEvents_ReceiveDTMFBurst = 4, eQMIVoiceDTMFEvents_StartReceivingContinuousDTMFTone = 6, eQMIVoiceDTMFEvents_StopReceivingContinuousDTMFTone = 7, }; // Enum to describe QMI Voice DTMF Privacy Levels enum eQMIVoiceDTMFPrivacyLevels:UINT8 { eQMIVoiceDTMFPrivacyLevels_Standard = 0, eQMIVoiceDTMFPrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Domains enum eQMIVoiceDomains:UINT8 { eQMIVoiceDomains_CSOnly = 0, eQMIVoiceDomains_PSOnly = 1, eQMIVoiceDomains_CSThenPS = 2, eQMIVoiceDomains_PSThenCS = 3, }; // Enum to describe QMI Voice ECT Call States enum eQMIVoiceECTCallStates:UINT8 { eQMIVoiceECTCallStates_None = 0, eQMIVoiceECTCallStates_Alerting = 1, eQMIVoiceECTCallStates_Active = 2, }; // Enum to describe QMI Voice End Reasons enum eQMIVoiceEndReasons:UINT16 { eQMIVoiceEndReasons_Offline = 0, eQMIVoiceEndReasons_CDMALocked = 20, eQMIVoiceEndReasons_NoService = 21, eQMIVoiceEndReasons_Fade = 22, eQMIVoiceEndReasons_Intercept = 23, eQMIVoiceEndReasons_Reorder = 24, eQMIVoiceEndReasons_NormalRelease = 25, eQMIVoiceEndReasons_SORejectRelease = 26, eQMIVoiceEndReasons_IncomingCall = 27, eQMIVoiceEndReasons_AlertStop = 28, eQMIVoiceEndReasons_ClientEnd = 29, eQMIVoiceEndReasons_Activation = 30, eQMIVoiceEndReasons_MCAbort = 31, eQMIVoiceEndReasons_MaxAccessProbes = 32, eQMIVoiceEndReasons_PersistentTestFailure = 33, eQMIVoiceEndReasons_RUIMNotPresent = 34, eQMIVoiceEndReasons_InProgressAccessAttempt = 35, eQMIVoiceEndReasons_AccessFailure = 36, eQMIVoiceEndReasons_RetryOrderReceived = 37, eQMIVoiceEndReasons_ConcurrentServiceNotSupported = 38, eQMIVoiceEndReasons_NoBaseStationResponse = 39, eQMIVoiceEndReasons_BaseStationReject = 40, eQMIVoiceEndReasons_IncompatibleConcurrentServices = 41, eQMIVoiceEndReasons_AccessBlocked = 42, eQMIVoiceEndReasons_AlreadyinTC = 43, eQMIVoiceEndReasons_EmergencyFlashed = 44, eQMIVoiceEndReasons_GPSCallEnding = 45, eQMIVoiceEndReasons_SMSCallEnding = 46, eQMIVoiceEndReasons_DataCallEnding = 47, eQMIVoiceEndReasons_RedirectionOrHandoff = 48, eQMIVoiceEndReasons_AllAccessBlocked = 49, eQMIVoiceEndReasons_OTASPSPCError = 50, eQMIVoiceEndReasons_MaxIS707BAccessProbes = 51, eQMIVoiceEndReasons_IncomingCallRejected = 102, eQMIVoiceEndReasons_SetupIndicationRejected = 103, eQMIVoiceEndReasons_NetworkEndedCall = 104, eQMIVoiceEndReasons_NoFunds = 105, eQMIVoiceEndReasons_NoGWSErvice = 106, eQMIVoiceEndReasons_NoCDMAService = 107, eQMIVoiceEndReasons_NoFullService = 108, eQMIVoiceEndReasons_MaxPSCalls = 109, eQMIVoiceEndReasons_SUPSUknownSubscriber = 110, eQMIVoiceEndReasons_SUPSIllegalSubscriber = 111, eQMIVoiceEndReasons_SUPSBearerServiceNotProvisioned = 112, eQMIVoiceEndReasons_SUPSTeleserviceNotProvisioned = 113, eQMIVoiceEndReasons_SUPSIllegalEquipment = 114, eQMIVoiceEndReasons_SUPSCallBarred = 115, eQMIVoiceEndReasons_SUPSIllegalSSOperation = 116, eQMIVoiceEndReasons_SUPSSSErrorStatus = 117, eQMIVoiceEndReasons_SUPSSSNotAvailable = 118, eQMIVoiceEndReasons_SUPSSSSubscriptionViolation = 119, eQMIVoiceEndReasons_SUPSSSIncompatibility = 120, eQMIVoiceEndReasons_SUPSFacilityNotSupported = 121, eQMIVoiceEndReasons_SUPSAbscentSubscriber = 122, eQMIVoiceEndReasons_SUPSShortTermDenial = 123, eQMIVoiceEndReasons_SUPSLongTermDenial = 124, eQMIVoiceEndReasons_SUPSSystemFailure = 125, eQMIVoiceEndReasons_SUPSDataMissing = 126, eQMIVoiceEndReasons_SUPSUnexpectedDataValue = 127, eQMIVoiceEndReasons_SUPSPasswordRegistrationFailure = 128, eQMIVoiceEndReasons_SUPSNegativePasswordCheck = 129, eQMIVoiceEndReasons_SUPSPasswordAttemptsViolation = 130, eQMIVoiceEndReasons_SUPSPositionMethodFailure = 131, eQMIVoiceEndReasons_SUPSUnknownAlphabet = 132, eQMIVoiceEndReasons_SUPSUSSDBusy = 133, eQMIVoiceEndReasons_SUPSRejectedByUser = 134, eQMIVoiceEndReasons_SUPSRejectedByNetwork = 135, eQMIVoiceEndReasons_SUPSDelectiontoServedSubscriber = 136, eQMIVoiceEndReasons_SUPSSpecialServiceCode = 137, eQMIVoiceEndReasons_SUPSInvalidDeflectedToNumber = 138, eQMIVoiceEndReasons_SUPSMultipartyParticipantsExceeded = 139, eQMIVoiceEndReasons_SUPSResourcesNotAvailable = 140, eQMIVoiceEndReasons_CCUnassignedNumber = 141, eQMIVoiceEndReasons_CCNoRouteToDestination = 142, eQMIVoiceEndReasons_CCChannelUnacceptable = 143, eQMIVoiceEndReasons_CCOperatorDeterminedBarring = 144, eQMIVoiceEndReasons_CCNormalCallClearing = 145, eQMIVoiceEndReasons_CCUserBusy = 146, eQMIVoiceEndReasons_CCNoUserResponding = 147, eQMIVoiceEndReasons_CCUserAlertingNoAnsewer = 148, eQMIVoiceEndReasons_CCCallRejected = 149, eQMIVoiceEndReasons_CCNumberChanged = 150, eQMIVoiceEndReasons_CCPreemption = 151, eQMIVoiceEndReasons_CCDestinationOutOfOrder = 152, eQMIVoiceEndReasons_CCInvalidNumber = 153, eQMIVoiceEndReasons_CCFacilityRejected = 154, eQMIVoiceEndReasons_CCResponseToStatusEnquiry = 155, eQMIVoiceEndReasons_CCNormalUnspecified = 156, eQMIVoiceEndReasons_CCNoCircuitOrChannelAvailable = 157, eQMIVoiceEndReasons_CCNetworkOutOfOrder = 158, eQMIVoiceEndReasons_CCTemporaryFailure = 159, eQMIVoiceEndReasons_CCSwitchingEquipmentCongestion = 160, eQMIVoiceEndReasons_CCAccessInformationDiscarded = 161, eQMIVoiceEndReasons_CCRequestedCircuitOrChannelNotAvailable = 162, eQMIVoiceEndReasons_CCResourcesUnavailable = 163, eQMIVoiceEndReasons_CCQOSUnavailable = 164, eQMIVoiceEndReasons_CCRequestedFacilityNotSubscribed = 165, eQMIVoiceEndReasons_CCIncomingCallsBarredWithinCUG = 166, eQMIVoiceEndReasons_CCBearerCapabilityNotAuthorized = 167, eQMIVoiceEndReasons_CCBearerCapabilityUnavailable = 168, eQMIVoiceEndReasons_CCServiceOptionNotAvailable = 169, eQMIVoiceEndReasons_CCACMLimitExceeded = 170, eQMIVoiceEndReasons_CCBearerServiceNotImplemented = 171, eQMIVoiceEndReasons_CCRequestedFacilityNotAvailable = 172, eQMIVoiceEndReasons_CCOnlyDigitalInformationBearerAvailable = 173, eQMIVoiceEndReasons_CCServiceOrOptionNotImplemented = 174, eQMIVoiceEndReasons_CCInvalidTransactionIdentifier = 175, eQMIVoiceEndReasons_CCUserNotMemberOfCUG = 176, eQMIVoiceEndReasons_CCIncompatibleDestination = 177, eQMIVoiceEndReasons_CCInvalidTransitNWSelection = 178, eQMIVoiceEndReasons_CCSemanticallyIncorrectMessage = 179, eQMIVoiceEndReasons_CCInvalidMandatoryInformation = 180, eQMIVoiceEndReasons_CCMessageTypeNotImplemented = 181, eQMIVoiceEndReasons_CCMessageTypeNotCompatible = 182, eQMIVoiceEndReasons_CCInformationElementNonexistent = 183, eQMIVoiceEndReasons_CCConditionalInformationElementError = 184, eQMIVoiceEndReasons_CCMessageNotCompatible = 185, eQMIVoiceEndReasons_CCRecoveryOnTimerExpired = 186, eQMIVoiceEndReasons_CCProtocolErrorUnspecified = 187, eQMIVoiceEndReasons_CCInternetworkingUnspecified = 188, eQMIVoiceEndReasons_CCOutgoingCallsBarredWithinCUG = 189, eQMIVoiceEndReasons_CCNoCUGSelection = 190, eQMIVoiceEndReasons_CCUnknownCUGIndex = 191, eQMIVoiceEndReasons_CCIncompatibleCUGIndex = 192, eQMIVoiceEndReasons_CCCUGCallFailureunspecified = 193, eQMIVoiceEndReasons_CCCLIRNotSubscribed = 194, eQMIVoiceEndReasons_CCCCBSPossible = 195, eQMIVoiceEndReasons_CCCCBSNotPossible = 196, eQMIVoiceEndReasons_MMGMMIMSIUnknwonInHLR = 197, eQMIVoiceEndReasons_MMGMMIllegalMS = 198, eQMIVoiceEndReasons_MMGMMIMSIUnknownInVLR = 199, eQMIVoiceEndReasons_MMGMMIMEINotAccepted = 200, eQMIVoiceEndReasons_MMGMMIllegalME = 201, eQMIVoiceEndReasons_MMGMMPLMNNotAllowed = 202, eQMIVoiceEndReasons_MMGMMLocationAreaNotAllowed = 203, eQMIVoiceEndReasons_MMGMMRoamingNotAllowedInThisLocationArea = 204, eQMIVoiceEndReasons_MMGMMNoSuitableCellsInLocationArea = 205, eQMIVoiceEndReasons_MMGMMNetworkFailure = 206, eQMIVoiceEndReasons_MMGMMMACFailure = 207, eQMIVoiceEndReasons_MMGMMSynchFailure = 208, eQMIVoiceEndReasons_MMGMMNetworkCongestion = 209, eQMIVoiceEndReasons_MMGMMGSMAuthenticationUnacceptable = 210, eQMIVoiceEndReasons_MMGMMServiceNotSubscribed = 211, eQMIVoiceEndReasons_MMGMMServiceTemporarilyOutOfOrder = 212, eQMIVoiceEndReasons_MMGMMCallCannotBeIdentified = 213, eQMIVoiceEndReasons_MMGMMIncorrectSemanticsInMessage = 214, eQMIVoiceEndReasons_MMGMMMadatoryInformationInvalid = 215, eQMIVoiceEndReasons_MMGMMAccessStratumFailure = 216, eQMIVoiceEndReasons_MMGMMInvalidSIM = 217, eQMIVoiceEndReasons_MMGMMWrongState = 218, eQMIVoiceEndReasons_MMGMMAcessClassBloacked = 219, eQMIVoiceEndReasons_MMGMMNoResources = 220, eQMIVoiceEndReasons_MMGMMInvalidUserData = 221, eQMIVoiceEndReasons_MMRejectTimerT3230Expired = 222, eQMIVoiceEndReasons_MMRejectNoCellAvailable = 223, eQMIVoiceEndReasons_MMRejectAbortMessageReceived = 224, eQMIVoiceEndReasons_MMRejectRadioLinkLost = 225, eQMIVoiceEndReasons_CNMRejectTimerT303Expired = 226, eQMIVoiceEndReasons_CNMRejectCNMMMReleaseIsPending = 227, eQMIVoiceEndReasons_AccessStratumRRReleaseIndication = 228, eQMIVoiceEndReasons_AccessStratumRandomAccessFailure = 229, eQMIVoiceEndReasons_AccessStratumRRCReleaseIndication = 230, eQMIVoiceEndReasons_AccessStratumCloseSessionIndication = 231, eQMIVoiceEndReasons_AccessStratumOpenSessionFailure = 232, eQMIVoiceEndReasons_AccessStratumLowLevelFailure = 233, eQMIVoiceEndReasons_AccessStratumRedialNotAllowed = 234, eQMIVoiceEndReasons_AccessStratumImmediateRetry = 235, eQMIVoiceEndReasons_AccessStratumAbortRadioUnavailable = 236, eQMIVoiceEndReasons_OTARejectSONotSupported = 237, eQMIVoiceEndReasons_IPBadRequestWaitingForInvite = 300, eQMIVoiceEndReasons_IPBadRequestWaitingForReinvite = 301, eQMIVoiceEndReasons_IPCalledPartyDoesNotExist = 302, eQMIVoiceEndReasons_IPUnsupportedMediaType = 303, eQMIVoiceEndReasons_IPTemporarilyUnavailable = 304, eQMIVoiceEndReasons_IPNoNetworkReponseTimeout = 305, eQMIVoiceEndReasons_IPUnableToPutCallOnHold = 306, eQMIVoiceEndReasons_IPMovedToEHRPD = 307, eQMIVoiceEndReasons_IPUpgradeOrDowngradeRejected = 308, eQMIVoiceEndReasons_IPCallForbidden = 309, eQMIVoiceEndReasons_IPGenericTimeout = 310, eQMIVoiceEndReasons_IPUpgradeOrDowngradeFailed = 311, eQMIVoiceEndReasons_IPUpgradeOrDowngradeCancelled = 312, eQMIVoiceEndReasons_IPSSACBarring = 313, }; // Enum to describe QMI Voice Even Odd Indicators enum eQMIVoiceEvenOddIndicators:UINT8 { eQMIVoiceEvenOddIndicators_EvenNumber = 0, eQMIVoiceEvenOddIndicators_OddNumber = 1, }; // Enum to describe QMI Voice Extended Service Class enum eQMIVoiceExtendedServiceClass { eQMIVoiceExtendedServiceClass_Voice = 1, eQMIVoiceExtendedServiceClass_Data = 2, eQMIVoiceExtendedServiceClass_Fax = 4, eQMIVoiceExtendedServiceClass_AllTeleservicesExceptSMS = 5, eQMIVoiceExtendedServiceClass_SMS = 8, eQMIVoiceExtendedServiceClass_AllTeleservicesData = 12, eQMIVoiceExtendedServiceClass_AllTeleservices = 13, eQMIVoiceExtendedServiceClass_SynchronousData = 16, eQMIVoiceExtendedServiceClass_AllPositionDeterminationServiceData = 17, eQMIVoiceExtendedServiceClass_AsynchronousData = 32, eQMIVoiceExtendedServiceClass_AllSynchronousAsynchronousData = 48, eQMIVoiceExtendedServiceClass_PacketData = 64, eQMIVoiceExtendedServiceClass_AllSynchronousData = 80, eQMIVoiceExtendedServiceClass_PacketAssemblerDisassemblerData = 128, eQMIVoiceExtendedServiceClass_AllAsynchronousData = 160, eQMIVoiceExtendedServiceClass_PLMNSpecificAllTeleservices = 53248, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices1 = 53504, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices2 = 53760, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices3 = 54016, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices4 = 54272, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices5 = 54528, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices6 = 54784, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices7 = 55040, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices8 = 55296, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices9 = 55552, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices10 = 55808, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices11 = 56064, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices12 = 56320, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices13 = 56576, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices14 = 56832, eQMIVoiceExtendedServiceClass_PLMNSpecificTeleservices15 = 57088, }; // Enum to describe QMI Voice Flash Types enum eQMIVoiceFlashTypes:UINT8 { eQMIVoiceFlashTypes_Simple = 0, eQMIVoiceFlashTypes_ActivateAnswerHold = 1, eQMIVoiceFlashTypes_DeactivateAnswerHold = 2, }; // Enum to describe QMI Voice Handover States enum eQMIVoiceHandoverStates:UINT32 { eQMIVoiceHandoverStates_Start = 1, eQMIVoiceHandoverStates_Fail = 2, eQMIVoiceHandoverStates_Complete = 3, }; // Enum to describe QMI Voice Interdigit Intervals enum eQMIVoiceInterdigitIntervals:UINT8 { eQMIVoiceInterdigitIntervals_60ms = 0, eQMIVoiceInterdigitIntervals_100ms = 1, eQMIVoiceInterdigitIntervals_150ms = 2, eQMIVoiceInterdigitIntervals_200ms = 3, }; // Enum to describe QMI Voice NSS Releases enum eQMIVoiceNSSReleases:UINT8 { eQMIVoiceNSSReleases_Finished = 1, }; // Enum to describe QMI Voice Network Mode enum eQMIVoiceNetworkMode:UINT32 { eQMIVoiceNetworkMode_None = 0, eQMIVoiceNetworkMode_GSM = 1, eQMIVoiceNetworkMode_WCDMA = 2, eQMIVoiceNetworkMode_CDMA = 3, eQMIVoiceNetworkMode_LTE = 4, eQMIVoiceNetworkMode_TDSCDMA = 5, }; // Enum to describe QMI Voice Number Plans enum eQMIVoiceNumberPlans:UINT8 { eQMIVoiceNumberPlans_Unknown = 0, eQMIVoiceNumberPlans_ISDN = 1, eQMIVoiceNumberPlans_Data = 3, eQMIVoiceNumberPlans_Telex = 4, eQMIVoiceNumberPlans_National = 8, eQMIVoiceNumberPlans_Private = 9, eQMIVoiceNumberPlans_ReservedCTS = 11, eQMIVoiceNumberPlans_ReservedExtension = 15, }; // Enum to describe QMI Voice Number Types enum eQMIVoiceNumberTypes:UINT8 { eQMIVoiceNumberTypes_Unknown = 0, eQMIVoiceNumberTypes_International = 1, eQMIVoiceNumberTypes_National = 2, eQMIVoiceNumberTypes_NetworkSpecific = 3, eQMIVoiceNumberTypes_Subscriber = 4, eQMIVoiceNumberTypes_Reserved = 5, eQMIVoiceNumberTypes_Abbreviated = 6, eQMIVoiceNumberTypes_ReservedExtension = 7, }; // Enum to describe QMI Voice OTASP Stati enum eQMIVoiceOTASPStati:UINT8 { eQMIVoiceOTASPStati_Unlocked = 0, eQMIVoiceOTASPStati_RetriesExceeded = 1, eQMIVoiceOTASPStati_AKeyExchanged = 2, eQMIVoiceOTASPStati_SSDUpdated = 3, eQMIVoiceOTASPStati_NAMDownloaded = 4, eQMIVoiceOTASPStati_MDNDownloaded = 5, eQMIVoiceOTASPStati_IMSIDownloaded = 6, eQMIVoiceOTASPStati_PRLDownloaded = 7, eQMIVoiceOTASPStati_Committed = 8, eQMIVoiceOTASPStati_OTAPAStarted = 9, eQMIVoiceOTASPStati_OTAPAStopped = 10, eQMIVoiceOTASPStati_OTAPAAborted = 11, eQMIVoiceOTASPStati_OTAPACommitted = 12, }; // Enum to describe QMI Voice Presentation Indicators enum eQMIVoicePresentationIndicators:UINT8 { eQMIVoicePresentationIndicators_Allowed = 0, eQMIVoicePresentationIndicators_Restricted = 1, eQMIVoicePresentationIndicators_Unavailable = 2, eQMIVoicePresentationIndicators_NameRestricted = 3, eQMIVoicePresentationIndicators_PayPhone = 4, }; // Enum to describe QMI Voice Privacy Levels enum eQMIVoicePrivacyLevels:UINT8 { eQMIVoicePrivacyLevels_Standard = 0, eQMIVoicePrivacyLevels_Enhanced = 1, }; // Enum to describe QMI Voice Provisioning States enum eQMIVoiceProvisioningStates:UINT8 { eQMIVoiceProvisioningStates_NotProvisioned = 0, eQMIVoiceProvisioningStates_ProvisionedPermanent = 1, eQMIVoiceProvisioningStates_PresentationRestricted = 2, eQMIVoiceProvisioningStates_PresentationAllowed = 3, }; // Enum to describe QMI Voice Pulse Widths enum eQMIVoicePulseWidths:UINT8 { eQMIVoicePulseWidths_95ms = 0, eQMIVoicePulseWidths_150ms = 1, eQMIVoicePulseWidths_200ms = 2, eQMIVoicePulseWidths_250ms = 3, eQMIVoicePulseWidths_300ms = 4, eQMIVoicePulseWidths_350ms = 5, eQMIVoicePulseWidths_SMSTXSpecial = 6, }; // Enum to describe QMI Voice Screening Indicators enum eQMIVoiceScreeningIndicators:UINT8 { eQMIVoiceScreeningIndicators_UserNotScreened = 0, eQMIVoiceScreeningIndicators_UserPassedVerification = 1, eQMIVoiceScreeningIndicators_UserFailedVerification = 2, eQMIVoiceScreeningIndicators_ProvidedNetwork = 3, }; // Enum to describe QMI Voice Service Options enum eQMIVoiceServiceOptions:UINT16 { eQMIVoiceServiceOptions_Any = 0, eQMIVoiceServiceOptions_IS96A = 1, eQMIVoiceServiceOptions_EVRC = 3, eQMIVoiceServiceOptions_IS73313K = 17, eQMIVoiceServiceOptions_SelectableModeVocoder = 56, eQMIVoiceServiceOptions_4GVNarrowBand = 68, eQMIVoiceServiceOptions_4GVWideBand = 70, eQMIVoiceServiceOptions_13K = 32768, eQMIVoiceServiceOptions_IS96 = 32769, eQMIVoiceServiceOptions_WVRC = 32803, }; // Enum to describe QMI Voice Service Types enum eQMIVoiceServiceTypes:UINT32 { eQMIVoiceServiceTypes_Automatic = 1, eQMIVoiceServiceTypes_GSM = 2, eQMIVoiceServiceTypes_WCDMA = 3, eQMIVoiceServiceTypes_CDMAAutomatic = 4, eQMIVoiceServiceTypes_GSMOrWCDMA = 5, eQMIVoiceServiceTypes_LTE = 6, }; // Enum to describe QMI Voice Speech Codec Type enum eQMIVoiceSpeechCodecType:UINT32 { eQMIVoiceSpeechCodecType_None = 0, eQMIVoiceSpeechCodecType_QCELP13K = 1, eQMIVoiceSpeechCodecType_EVRC = 2, eQMIVoiceSpeechCodecType_EVRCB = 3, eQMIVoiceSpeechCodecType_EVRCWideband = 4, eQMIVoiceSpeechCodecType_EVRCNarrowbandWideband = 5, eQMIVoiceSpeechCodecType_AMRNarrowband = 6, eQMIVoiceSpeechCodecType_AMRWideband = 7, eQMIVoiceSpeechCodecType_GSMEnhancedFullRate = 8, eQMIVoiceSpeechCodecType_GSMFullRate = 9, eQMIVoiceSpeechCodecType_GSMHalfRate = 10, }; // Enum to describe QMI Voice Subaddress Types enum eQMIVoiceSubaddressTypes:UINT8 { eQMIVoiceSubaddressTypes_NSAP = 0, eQMIVoiceSubaddressTypes_User = 1, }; // Enum to describe QMI Voice Subscription Types enum eQMIVoiceSubscriptionTypes:UINT8 { eQMIVoiceSubscriptionTypes_Primary = 0, eQMIVoiceSubscriptionTypes_Secondary = 1, }; // Enum to describe QMI Voice Supplementary Notification Types enum eQMIVoiceSupplementaryNotificationTypes:UINT8 { eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsForwarded = 1, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsWaiting = 2, eQMIVoiceSupplementaryNotificationTypes_OutgoingCUGCall = 3, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallsBarred = 4, eQMIVoiceSupplementaryNotificationTypes_OutgoingCallIsDeflected = 5, eQMIVoiceSupplementaryNotificationTypes_IncomingCUGCall = 6, eQMIVoiceSupplementaryNotificationTypes_IncomingCallsBarred = 7, eQMIVoiceSupplementaryNotificationTypes_IncomingForwardedCall = 8, eQMIVoiceSupplementaryNotificationTypes_IncomingDeflectedCall = 9, eQMIVoiceSupplementaryNotificationTypes_IncomingCallIsForwarded = 10, eQMIVoiceSupplementaryNotificationTypes_UnconditionalCallForwardingActive = 11, eQMIVoiceSupplementaryNotificationTypes_ConditionalCallForwardingActive = 12, eQMIVoiceSupplementaryNotificationTypes_CLIRSuppressionRejected = 13, eQMIVoiceSupplementaryNotificationTypes_CallIsOnHold = 14, eQMIVoiceSupplementaryNotificationTypes_CallIsRetrieved = 15, eQMIVoiceSupplementaryNotificationTypes_CallIsInConference = 16, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsAlerting = 17, eQMIVoiceSupplementaryNotificationTypes_CallIsECTWhileAnotherCallIsActive = 18, }; // Enum to describe QMI Voice Supplementary Service Call Types enum eQMIVoiceSupplementaryServiceCallTypes:UINT8 { eQMIVoiceSupplementaryServiceCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceSupplementaryServiceCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceSupplementaryServiceCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceSupplementaryServiceCallTypes_HoldAllExceptSpecifiedCall = 4, eQMIVoiceSupplementaryServiceCallTypes_MakeConferenceCall = 5, eQMIVoiceSupplementaryServiceCallTypes_ExplicitCallTransfer = 6, eQMIVoiceSupplementaryServiceCallTypes_CCBSActivation = 7, eQMIVoiceSupplementaryServiceCallTypes_EndAllCalls = 8, eQMIVoiceSupplementaryServiceCallTypes_ReleaseSpecifiedCall = 9, }; // Enum to describe QMI Voice Supplementary Service Reasons enum eQMIVoiceSupplementaryServiceReasons:UINT8 { eQMIVoiceSupplementaryServiceReasons_ForwardUnconditional = 1, eQMIVoiceSupplementaryServiceReasons_ForwardMobileBusy = 2, eQMIVoiceSupplementaryServiceReasons_ForwardNoReply = 3, eQMIVoiceSupplementaryServiceReasons_ForwardUnreachable = 4, eQMIVoiceSupplementaryServiceReasons_ForwardAllForwarding = 5, eQMIVoiceSupplementaryServiceReasons_ForwardAllConditional = 6, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoing = 7, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingInt = 8, eQMIVoiceSupplementaryServiceReasons_BarrOutgoingIntExtToHome = 9, eQMIVoiceSupplementaryServiceReasons_BarrAllIncoming = 10, eQMIVoiceSupplementaryServiceReasons_BarrIncomingRoaming = 11, eQMIVoiceSupplementaryServiceReasons_BarrAllBarring = 12, eQMIVoiceSupplementaryServiceReasons_BarrAllOutgoingBarring = 13, eQMIVoiceSupplementaryServiceReasons_BarrAllIncomingBarring = 14, eQMIVoiceSupplementaryServiceReasons_CallWaiting = 15, eQMIVoiceSupplementaryServiceReasons_CLIR = 16, eQMIVoiceSupplementaryServiceReasons_CLIP = 17, }; // Enum to describe QMI Voice Supplementary Service Requests enum eQMIVoiceSupplementaryServiceRequests:UINT8 { eQMIVoiceSupplementaryServiceRequests_Activate = 1, eQMIVoiceSupplementaryServiceRequests_Deactivate = 2, eQMIVoiceSupplementaryServiceRequests_Register = 3, eQMIVoiceSupplementaryServiceRequests_Erase = 4, eQMIVoiceSupplementaryServiceRequests_Interrogate = 5, eQMIVoiceSupplementaryServiceRequests_RegisterPassword = 6, eQMIVoiceSupplementaryServiceRequests_USSD = 7, }; // Enum to describe QMI Voice Supplementary Service Types enum eQMIVoiceSupplementaryServiceTypes:UINT8 { eQMIVoiceSupplementaryServiceTypes_Activate = 0, eQMIVoiceSupplementaryServiceTypes_Deactivate = 1, eQMIVoiceSupplementaryServiceTypes_Register = 2, eQMIVoiceSupplementaryServiceTypes_Erase = 3, }; // Enum to describe QMI Voice Switch Value enum eQMIVoiceSwitchValue:UINT8 { eQMIVoiceSwitchValue_NotAllowed = 0, eQMIVoiceSwitchValue_Allowed = 1, }; // Enum to describe QMI Voice TTY Modes enum eQMIVoiceTTYModes:UINT8 { eQMIVoiceTTYModes_Full = 0, eQMIVoiceTTYModes_VoiceCarryOver = 1, eQMIVoiceTTYModes_HearingCarryOver = 2, eQMIVoiceTTYModes_Off = 3, }; // Enum to describe QMI Voice USSD Alpha Coding Schemes enum eQMIVoiceUSSDAlphaCodingSchemes:UINT8 { eQMIVoiceUSSDAlphaCodingSchemes_GSM = 1, eQMIVoiceUSSDAlphaCodingSchemes_UCS2 = 2, }; // Enum to describe QMI Voice USSD Data Coding Schemes enum eQMIVoiceUSSDDataCodingSchemes:UINT8 { eQMIVoiceUSSDDataCodingSchemes_ASCII = 1, eQMIVoiceUSSDDataCodingSchemes_8Bit = 2, eQMIVoiceUSSDDataCodingSchemes_UCS2 = 3, }; // Enum to describe QMI Voice USSD Notifcation Types enum eQMIVoiceUSSDNotifcationTypes:UINT8 { eQMIVoiceUSSDNotifcationTypes_NoActionRequired = 1, eQMIVoiceUSSDNotifcationTypes_ActionIsRequired = 2, }; // Enum to describe QMI Voice UUS Data Coding Schemes enum eQMIVoiceUUSDataCodingSchemes:UINT8 { eQMIVoiceUUSDataCodingSchemes_USP = 1, eQMIVoiceUUSDataCodingSchemes_OHLP = 2, eQMIVoiceUUSDataCodingSchemes_X244 = 3, eQMIVoiceUUSDataCodingSchemes_SMCF = 4, eQMIVoiceUUSDataCodingSchemes_IA5 = 5, eQMIVoiceUUSDataCodingSchemes_RV12RD = 6, eQMIVoiceUUSDataCodingSchemes_Q931UNCCM = 7, }; // Enum to describe QMI Voice UUS Types enum eQMIVoiceUUSTypes:UINT8 { eQMIVoiceUUSTypes_Data = 0, eQMIVoiceUUSTypes_Type1Implicit = 1, eQMIVoiceUUSTypes_Type1Required = 2, eQMIVoiceUUSTypes_Type1NotRequired = 3, eQMIVoiceUUSTypes_Type2Required = 4, eQMIVoiceUUSTypes_Type2NotRequired = 5, eQMIVoiceUUSTypes_Type3Required = 6, eQMIVoiceUUSTypes_Type3NotRequired = 7, }; // Enum to describe QMI Voice VoIP SUPS Call Types enum eQMIVoiceVoIPSUPSCallTypes:UINT8 { eQMIVoiceVoIPSUPSCallTypes_ReleaseHeldOrWaiting = 1, eQMIVoiceVoIPSUPSCallTypes_ReleaseActiveAcceptHeldOrWaiting = 2, eQMIVoiceVoIPSUPSCallTypes_HoldActiveAcceptHeldOrWaiting = 3, eQMIVoiceVoIPSUPSCallTypes_MakeConferenceCall = 4, eQMIVoiceVoIPSUPSCallTypes_EndAllExistingCalls = 5, eQMIVoiceVoIPSUPSCallTypes_UpgradeDowngradeExistingVTIP = 6, eQMIVoiceVoIPSUPSCallTypes_AcceptCallUpgradeExistingIP = 7, eQMIVoiceVoIPSUPSCallTypes_RejectCallUpgradeExistingIP = 8, eQMIVoiceVoIPSUPSCallTypes_ReleasePartyFromConference = 9, }; // Enum to describe QMI WDS 3GPP Call End Reasons enum eQMIWDS3GPPCallEndReasons:UINT16 { eQMIWDS3GPPCallEndReasons_OperatorDeterminedBarring = 8, eQMIWDS3GPPCallEndReasons_LLCSNDCPFailure = 25, eQMIWDS3GPPCallEndReasons_InsufficientResources = 26, eQMIWDS3GPPCallEndReasons_UnknownAPN = 27, eQMIWDS3GPPCallEndReasons_UnknownPDP = 28, eQMIWDS3GPPCallEndReasons_AuthenticationFailed = 29, eQMIWDS3GPPCallEndReasons_GGSNReject = 30, eQMIWDS3GPPCallEndReasons_ActivationReject = 31, eQMIWDS3GPPCallEndReasons_OptionNotSupported = 32, eQMIWDS3GPPCallEndReasons_OptionUnsubscribed = 33, eQMIWDS3GPPCallEndReasons_OptionTemporarilyOOO = 34, eQMIWDS3GPPCallEndReasons_NSAPIAlreadyUsed = 35, eQMIWDS3GPPCallEndReasons_RegularDeactivation = 36, eQMIWDS3GPPCallEndReasons_QoSNotAccepted = 37, eQMIWDS3GPPCallEndReasons_NetworkFailure = 38, eQMIWDS3GPPCallEndReasons_UMTSReactivationRequest = 39, eQMIWDS3GPPCallEndReasons_FeatureNotSupported = 40, eQMIWDS3GPPCallEndReasons_TFTSemanticError = 41, eQMIWDS3GPPCallEndReasons_TFTSyntaxError = 42, eQMIWDS3GPPCallEndReasons_UnknownPDPContext = 43, eQMIWDS3GPPCallEndReasons_FilterSemanticError = 44, eQMIWDS3GPPCallEndReasons_FilterSyntaxError = 45, eQMIWDS3GPPCallEndReasons_PDPWithoutActiveTFT = 46, eQMIWDS3GPPCallEndReasons_IPv4OnlyAllowed = 50, eQMIWDS3GPPCallEndReasons_IPv6OnlyAllowed = 51, eQMIWDS3GPPCallEndReasons_SingleAddressBearerOnly = 52, eQMIWDS3GPPCallEndReasons_ESMInfoNotReceived = 53, eQMIWDS3GPPCallEndReasons_NoPDNConnection = 54, eQMIWDS3GPPCallEndReasons_MultipleConnectionsNotAllowed = 55, eQMIWDS3GPPCallEndReasons_InvalidTransactionID = 81, eQMIWDS3GPPCallEndReasons_MessageIncorrectSemantic = 95, eQMIWDS3GPPCallEndReasons_InvalidMandatoryID = 96, eQMIWDS3GPPCallEndReasons_MessageTypeUnsupported = 97, eQMIWDS3GPPCallEndReasons_MessageTypeNoncompatibleState = 98, eQMIWDS3GPPCallEndReasons_UnknownInfoElement = 99, eQMIWDS3GPPCallEndReasons_ConditionalInfoElementError = 100, eQMIWDS3GPPCallEndReasons_MessageAndProtocolStateUncompatible = 101, eQMIWDS3GPPCallEndReasons_ProtocolError = 111, eQMIWDS3GPPCallEndReasons_APNTypeConflict = 112, }; // Enum to describe QMI WDS 3GPP2 RAT Types enum eQMIWDS3GPP2RATTypes:UINT8 { eQMIWDS3GPP2RATTypes_HRPD = 1, eQMIWDS3GPP2RATTypes_EHRPD = 2, eQMIWDS3GPP2RATTypes_HRPDEHRPD = 3, }; // Enum to describe QMI WDS Address Allocation Preference enum eQMIWDSAddressAllocationPreference:UINT8 { eQMIWDSAddressAllocationPreference_NASSignaling = 0, eQMIWDSAddressAllocationPreference_DHCP = 1, }; // Enum to describe QMI WDS Application Type enum eQMIWDSApplicationType:UINT32 { eQMIWDSApplicationType_DefaultApplicationType = 0, eQMIWDSApplicationType_LBSApplicationType = 32, eQMIWDSApplicationType_TetheredApplicationType = 64, }; // Enum to describe QMI WDS Authentication Protocol enum eQMIWDSAuthenticationProtocol:UINT8 { eQMIWDSAuthenticationProtocol_PAP = 1, eQMIWDSAuthenticationProtocol_CHAP = 2, eQMIWDSAuthenticationProtocol_PAPOrCHAP = 3, }; // Enum to describe QMI WDS Autoconnect Roam Settings enum eQMIWDSAutoconnectRoamSettings:UINT8 { eQMIWDSAutoconnectRoamSettings_Always = 0, eQMIWDSAutoconnectRoamSettings_HomeOnly = 1, }; // Enum to describe QMI WDS Autoconnect Settings enum eQMIWDSAutoconnectSettings:UINT8 { eQMIWDSAutoconnectSettings_Disabled = 0, eQMIWDSAutoconnectSettings_Enabled = 1, eQMIWDSAutoconnectSettings_Paused = 2, }; // Enum to describe QMI WDS CDMA Networks enum eQMIWDSCDMANetworks:UINT8 { eQMIWDSCDMANetworks_NoService = 0, eQMIWDSCDMANetworks_CDMA = 2, eQMIWDSCDMANetworks_CDMA1xEVDO = 4, }; // Enum to describe QMI WDS CDMA Service Options enum eQMIWDSCDMAServiceOptions:UINT16 { eQMIWDSCDMAServiceOptions_IS657 = 7, eQMIWDSCDMAServiceOptions_IS657OverRateSet2 = 15, eQMIWDSCDMAServiceOptions_IS707AWithRateSet1 = 22, eQMIWDSCDMAServiceOptions_IS707AWithRateSet2 = 25, eQMIWDSCDMAServiceOptions_CDMA2000PacketService = 33, eQMIWDSCDMAServiceOptions_IS707 = 4103, eQMIWDSCDMAServiceOptions_QCProprietaryRateSet2 = 32800, eQMIWDSCDMAServiceOptions_NullServiceOption = 65535, }; // Enum to describe QMI WDS Call End Reason Types enum eQMIWDSCallEndReasonTypes:UINT16 { eQMIWDSCallEndReasonTypes_Unspecified = 0, eQMIWDSCallEndReasonTypes_MobileIP = 1, eQMIWDSCallEndReasonTypes_Internal = 2, eQMIWDSCallEndReasonTypes_CallManagerDefined = 3, eQMIWDSCallEndReasonTypes_3GPPSpecificationDefined = 6, eQMIWDSCallEndReasonTypes_PPP = 7, eQMIWDSCallEndReasonTypes_EHRPD = 8, eQMIWDSCallEndReasonTypes_IPv6 = 9, }; // Enum to describe QMI WDS Call Manager Call End Reasons enum eQMIWDSCallManagerCallEndReasons:UINT16 { eQMIWDSCallManagerCallEndReasons_CDMALock = 500, eQMIWDSCallManagerCallEndReasons_Intercept = 501, eQMIWDSCallManagerCallEndReasons_Reorder = 502, eQMIWDSCallManagerCallEndReasons_ReleaseServiceOptionReject = 503, eQMIWDSCallManagerCallEndReasons_IncomingCall = 504, eQMIWDSCallManagerCallEndReasons_AlertStop = 505, eQMIWDSCallManagerCallEndReasons_Activation = 506, eQMIWDSCallManagerCallEndReasons_MaxAccessProbe = 507, eQMIWDSCallManagerCallEndReasons_CCSNotSupportedByBS = 508, eQMIWDSCallManagerCallEndReasons_NoResponseFromBS = 509, eQMIWDSCallManagerCallEndReasons_RejectedByBS = 510, eQMIWDSCallManagerCallEndReasons_Incompatible = 511, eQMIWDSCallManagerCallEndReasons_AlreadyInTC = 512, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringGPS = 513, eQMIWDSCallManagerCallEndReasons_UserCallOrigDuringSMS = 514, eQMIWDSCallManagerCallEndReasons_NoCDMAService = 515, eQMIWDSCallManagerCallEndReasons_RetryOrder = 519, eQMIWDSCallManagerCallEndReasons_AccessBlock = 520, eQMIWDSCallManagerCallEndReasons_AccessBlockAll = 521, eQMIWDSCallManagerCallEndReasons_IS707BMaxAccess = 522, eQMIWDSCallManagerCallEndReasons_ThermalEmergency = 523, eQMIWDSCallManagerCallEndReasons_CallOriginationThrottled = 524, eQMIWDSCallManagerCallEndReasons_ConfFailed = 1000, eQMIWDSCallManagerCallEndReasons_IncomingRejected = 1001, eQMIWDSCallManagerCallEndReasons_NoGWService = 1002, eQMIWDSCallManagerCallEndReasons_NoGPRSContext = 1003, eQMIWDSCallManagerCallEndReasons_IllegalMS = 1004, eQMIWDSCallManagerCallEndReasons_IllegalME = 1005, eQMIWDSCallManagerCallEndReasons_GPRSServicesAndNonGPRSServiceNotAllowed = 1006, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowed = 1007, eQMIWDSCallManagerCallEndReasons_MSIdentityCannotBeDerivedByTheNetwork = 1008, eQMIWDSCallManagerCallEndReasons_ImplicitlyDetached = 1009, eQMIWDSCallManagerCallEndReasons_PLMNNotAllowed = 1010, eQMIWDSCallManagerCallEndReasons_LANotAllowed = 1011, eQMIWDSCallManagerCallEndReasons_GPRSServicesNotAllowedInThisPLMN = 1012, eQMIWDSCallManagerCallEndReasons_PDPDuplicate = 1013, eQMIWDSCallManagerCallEndReasons_UERATChange = 1014, eQMIWDSCallManagerCallEndReasons_Congestion = 1015, eQMIWDSCallManagerCallEndReasons_NoPDPContextActivated = 1016, eQMIWDSCallManagerCallEndReasons_AccessClassDSACRejection = 1017, eQMIWDSCallManagerCallEndReasons_CDGenOrBusy = 1500, eQMIWDSCallManagerCallEndReasons_CDBillOrAuth = 1501, eQMIWDSCallManagerCallEndReasons_ChangeHDR = 1502, eQMIWDSCallManagerCallEndReasons_ExitHDR = 1503, eQMIWDSCallManagerCallEndReasons_HDRNoSession = 1504, eQMIWDSCallManagerCallEndReasons_HDROrigDuringGPSFix = 1505, eQMIWDSCallManagerCallEndReasons_HDRCSTimeout = 1506, eQMIWDSCallManagerCallEndReasons_HDRReleasedByCM = 1507, eQMIWDSCallManagerCallEndReasons_NoHybridHDRService = 1510, eQMIWDSCallManagerCallEndReasons_ClientEnd = 2000, eQMIWDSCallManagerCallEndReasons_NoService = 2001, eQMIWDSCallManagerCallEndReasons_Fade = 2002, eQMIWDSCallManagerCallEndReasons_NormalRelease = 2003, eQMIWDSCallManagerCallEndReasons_AccessInProgress = 2004, eQMIWDSCallManagerCallEndReasons_AccessFail = 2005, eQMIWDSCallManagerCallEndReasons_RedirectOrHandoff = 2006, eQMIWDSCallManagerCallEndReasons_Offline = 2500, eQMIWDSCallManagerCallEndReasons_EmergencyMode = 2501, eQMIWDSCallManagerCallEndReasons_PhoneInUse = 2502, eQMIWDSCallManagerCallEndReasons_InvalidMode = 2503, eQMIWDSCallManagerCallEndReasons_InvalidSIMState = 2504, eQMIWDSCallManagerCallEndReasons_NoCollocHDR = 2505, eQMIWDSCallManagerCallEndReasons_CallControlRejected = 2506, }; // Enum to describe QMI WDS Call Types enum eQMIWDSCallTypes:UINT8 { eQMIWDSCallTypes_Laptop = 0, eQMIWDSCallTypes_Embedded = 1, }; // Enum to describe QMI WDS DUN Control Events enum eQMIWDSDUNControlEvents:UINT8 { eQMIWDSDUNControlEvents_DUNCall = 1, eQMIWDSDUNControlEvents_Entitlement = 2, eQMIWDSDUNControlEvents_SilentRedial = 3, }; // Enum to describe QMI WDS DUN Control Preferences enum eQMIWDSDUNControlPreferences:UINT8 { eQMIWDSDUNControlPreferences_RelinquishDUNControl = 0, eQMIWDSDUNControlPreferences_ExerciseDUNConrol = 1, }; // Enum to describe QMI WDS Data Call Status enum eQMIWDSDataCallStatus:UINT8 { eQMIWDSDataCallStatus_Unknown = 0, eQMIWDSDataCallStatus_Activated = 1, eQMIWDSDataCallStatus_Terminated = 2, }; // Enum to describe QMI WDS Data Call Types enum eQMIWDSDataCallTypes:UINT8 { eQMIWDSDataCallTypes_Unknown = 0, eQMIWDSDataCallTypes_Embedded = 1, eQMIWDSDataCallTypes_Tethered = 2, eQMIWDSDataCallTypes_ModemEmbedded = 3, }; // Enum to describe QMI WDS Data Mode enum eQMIWDSDataMode:UINT8 { eQMIWDSDataMode_CDMAOrHDR = 0, eQMIWDSDataMode_CDMAOnly = 1, eQMIWDSDataMode_HDROnly = 2, }; // Enum to describe QMI WDS Data Rate enum eQMIWDSDataRate:UINT8 { eQMIWDSDataRate_LowSO15Only = 0, eQMIWDSDataRate_MediumSO33PlusLowRSCH = 1, eQMIWDSDataRate_HighSO33PlusHighRSCH = 2, }; // Enum to describe QMI WDS Data System Network Types enum eQMIWDSDataSystemNetworkTypes:UINT8 { eQMIWDSDataSystemNetworkTypes_3GPP = 0, eQMIWDSDataSystemNetworkTypes_3GPP2 = 1, }; // Enum to describe QMI WDS Data Systems enum eQMIWDSDataSystems:UINT32 { eQMIWDSDataSystems_Unknown = 0, eQMIWDSDataSystems_CDMA1x = 1, eQMIWDSDataSystems_CDMA1xEVDO = 2, eQMIWDSDataSystems_GPRS = 3, eQMIWDSDataSystems_WCDMA = 4, eQMIWDSDataSystems_LTE = 5, eQMIWDSDataSystems_TDSCDMA = 6, }; // Enum to describe QMI WDS EHRPD Call End Reason enum eQMIWDSEHRPDCallEndReason:UINT16 { eQMIWDSEHRPDCallEndReason_SubsLimitedToV4 = 1, eQMIWDSEHRPDCallEndReason_SubsLimitedToV6 = 2, eQMIWDSEHRPDCallEndReason_VSNCPTimeout = 4, eQMIWDSEHRPDCallEndReason_VSNCPFailure = 5, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IGeneralError = 6, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IUnauthAPN = 7, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNLimit = 8, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2INoPDNGW = 9, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWUnreach = 10, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNGWRejected = 11, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IInsufficientParam = 12, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IResourceUnavailable = 13, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IAdminProhibited = 14, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNIDInUse = 15, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2ISubscriberLimitation = 16, eQMIWDSEHRPDCallEndReason_VSNCP3GPP2IPDNExistsForAPN = 17, }; // Enum to describe QMI WDS EMBMS Error Codes enum eQMIWDSEMBMSErrorCodes:UINT16 { eQMIWDSEMBMSErrorCodes_NotSupported = 108, eQMIWDSEMBMSErrorCodes_ActivationInProgress = 111, eQMIWDSEMBMSErrorCodes_Invalid = 124, eQMIWDSEMBMSErrorCodes_DeactivationInProgress = 203, }; // Enum to describe QMI WDS EMBMS List Types enum eQMIWDSEMBMSListTypes:UINT8 { eQMIWDSEMBMSListTypes_Active = 0, eQMIWDSEMBMSListTypes_Available = 1, eQMIWDSEMBMSListTypes_OOSWarning = 2, }; // Enum to describe QMI WDS EMBMS Operation Status enum eQMIWDSEMBMSOperationStatus:UINT32 { eQMIWDSEMBMSOperationStatus_Success = 0, eQMIWDSEMBMSOperationStatus_RadioConfigFailure = 65536, eQMIWDSEMBMSOperationStatus_ChannelUnavailable = 65537, eQMIWDSEMBMSOperationStatus_EMBMBSNotEnabled = 65538, eQMIWDSEMBMSOperationStatus_OutOfCoverage = 65539, eQMIWDSEMBMSOperationStatus_Unknown = 65540, eQMIWDSEMBMSOperationStatus_NotAllowed = 65541, eQMIWDSEMBMSOperationStatus_MissingControlInfo = 65542, eQMIWDSEMBMSOperationStatus_MissingTMGI = 65543, eQMIWDSEMBMSOperationStatus_MulticastOOS = 65544, eQMIWDSEMBMSOperationStatus_UnicastOOS = 65545, eQMIWDSEMBMSOperationStatus_CampedOnOtherFrequency = 65546, }; // Enum to describe QMI WDS Extended Error Code enum eQMIWDSExtendedErrorCode:UINT16 { eQMIWDSExtendedErrorCode_Failure = 1, eQMIWDSExtendedErrorCode_InvalidHandle = 2, eQMIWDSExtendedErrorCode_InvalidOperation = 3, eQMIWDSExtendedErrorCode_InvalidProfileType = 4, eQMIWDSExtendedErrorCode_InvalidProfileNumber = 5, eQMIWDSExtendedErrorCode_InvalidIdentifier = 6, eQMIWDSExtendedErrorCode_InvalidArgument = 7, eQMIWDSExtendedErrorCode_NotInitialized = 8, eQMIWDSExtendedErrorCode_InvalidLength = 9, eQMIWDSExtendedErrorCode_ListEnd = 10, eQMIWDSExtendedErrorCode_InvalidSubscriptionID = 11, eQMIWDSExtendedErrorCode_InvalidProfileFamily = 12, eQMIWDSExtendedErrorCode_3GPPInvalidProfileFamily = 4097, eQMIWDSExtendedErrorCode_3GPPAccessError = 4098, eQMIWDSExtendedErrorCode_3GPPContextNotDefined = 4099, eQMIWDSExtendedErrorCode_3GPPValidFlagNotSet = 4100, eQMIWDSExtendedErrorCode_3GPPReadOnlyFlagSet = 4101, eQMIWDSExtendedErrorCode_3GPPErrorMaxProfileNumber = 4102, eQMIWDSExtendedErrorCode_3GPP2ErrorInvalidIdentifierForProfile = 4353, eQMIWDSExtendedErrorCode_3GPP2ErrorProfileLimitReached = 4354, }; // Enum to describe QMI WDS Extended Tech Prefs enum eQMIWDSExtendedTechPrefs:UINT16 { eQMIWDSExtendedTechPrefs_CDMA = 32769, eQMIWDSExtendedTechPrefs_UMTS = 32772, eQMIWDSExtendedTechPrefs_EPC = 34944, eQMIWDSExtendedTechPrefs_EMBMS = 34946, eQMIWDSExtendedTechPrefs_ModemLinkLocal = 34952, }; // Enum to describe QMI WDS IP Families enum eQMIWDSIPFamilies:UINT8 { eQMIWDSIPFamilies_IPv4 = 4, eQMIWDSIPFamilies_IPv6 = 6, eQMIWDSIPFamilies_Unspecified = 8, }; // Enum to describe QMI WDS IP Version enum eQMIWDSIPVersion:UINT8 { eQMIWDSIPVersion_IPv4 = 4, eQMIWDSIPVersion_IPv6 = 6, }; // Enum to describe QMI WDS IPv6 Call End Reason enum eQMIWDSIPv6CallEndReason:UINT16 { eQMIWDSIPv6CallEndReason_PrefixUnavailable = 1, eQMIWDSIPv6CallEndReason_IPv6HRPDDisabled = 2, }; // Enum to describe QMI WDS Internal Call End Reasons enum eQMIWDSInternalCallEndReasons:UINT16 { eQMIWDSInternalCallEndReasons_Internal = 201, eQMIWDSInternalCallEndReasons_CallEnded = 202, eQMIWDSInternalCallEndReasons_InternalUnknownCauseCode = 203, eQMIWDSInternalCallEndReasons_UnknownCauseCode = 204, eQMIWDSInternalCallEndReasons_CloseInProgress = 205, eQMIWDSInternalCallEndReasons_NWInitiatedTermination = 206, eQMIWDSInternalCallEndReasons_AppPreempted = 207, eQMIWDSInternalCallEndReasons_PDNIPv4CallDisallowed = 208, eQMIWDSInternalCallEndReasons_PDNIPv4CallThrottled = 209, eQMIWDSInternalCallEndReasons_PDNIPv6CallDisallowed = 210, eQMIWDSInternalCallEndReasons_ModemRestart = 212, eQMIWDSInternalCallEndReasons_PDPPPPNotSupported = 213, eQMIWDSInternalCallEndReasons_UnpreferredRAT = 214, eQMIWDSInternalCallEndReasons_PhysicalLinkCloseInProgress = 215, eQMIWDSInternalCallEndReasons_APNPendingHandover = 216, eQMIWDSInternalCallEndReasons_ProfileBearerIncompatible = 217, eQMIWDSInternalCallEndReasons_MMGDSICardEvent = 218, eQMIWDSInternalCallEndReasons_LPMOrPowerDown = 219, eQMIWDSInternalCallEndReasons_APNDisabled = 220, eQMIWDSInternalCallEndReasons_MPITExpired = 221, eQMIWDSInternalCallEndReasons_IPv6AddressTransferFailed = 222, eQMIWDSInternalCallEndReasons_TRATSwapFailed = 223, }; // Enum to describe QMI WDS LTE IP Types enum eQMIWDSLTEIPTypes:UINT8 { eQMIWDSLTEIPTypes_IPv4 = 0, eQMIWDSLTEIPTypes_IPv6 = 1, eQMIWDSLTEIPTypes_IPv4OrIPv6 = 2, }; // Enum to describe QMI WDS Mobile IP Call End Reasons enum eQMIWDSMobileIPCallEndReasons:UINT16 { eQMIWDSMobileIPCallEndReasons_FAUnspecified = 64, eQMIWDSMobileIPCallEndReasons_FAAdministrativelyProhibited = 65, eQMIWDSMobileIPCallEndReasons_FAInsufficientResources = 66, eQMIWDSMobileIPCallEndReasons_FAMobileNodeAuthenticationFailure = 67, eQMIWDSMobileIPCallEndReasons_FAHAAuthenticationFailure = 68, eQMIWDSMobileIPCallEndReasons_FARequestedLifetimeTooLong = 69, eQMIWDSMobileIPCallEndReasons_FAMalformedRequest = 70, eQMIWDSMobileIPCallEndReasons_FAMalformedReply = 71, eQMIWDSMobileIPCallEndReasons_FAEncapsulationUnavailable = 72, eQMIWDSMobileIPCallEndReasons_FAVJHCUnavailable = 73, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelUnavailable = 74, eQMIWDSMobileIPCallEndReasons_FAReverseTunnelIsMandatoryAndTBitIsNotSet = 75, eQMIWDSMobileIPCallEndReasons_FADeliveryStyleNotSupported = 79, eQMIWDSMobileIPCallEndReasons_FAMissingNAI = 97, eQMIWDSMobileIPCallEndReasons_FAMissingHA = 98, eQMIWDSMobileIPCallEndReasons_FAMissingHomeAddress = 99, eQMIWDSMobileIPCallEndReasons_FAUnknownChallenge = 104, eQMIWDSMobileIPCallEndReasons_FAMissingChallenge = 105, eQMIWDSMobileIPCallEndReasons_FAStaleChallenge = 106, eQMIWDSMobileIPCallEndReasons_HAReasonUnspecified = 128, eQMIWDSMobileIPCallEndReasons_HAAdministrativelyProhibited = 129, eQMIWDSMobileIPCallEndReasons_HAInsufficientResources = 130, eQMIWDSMobileIPCallEndReasons_HAMobileNodeAuthenticationFailure = 131, eQMIWDSMobileIPCallEndReasons_HAFAAuthenticationFailure = 132, eQMIWDSMobileIPCallEndReasons_HARegistrationIDMismatch = 133, eQMIWDSMobileIPCallEndReasons_HAMalformedRequest = 134, eQMIWDSMobileIPCallEndReasons_HAUnknownHAAddress = 136, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelUnavailable = 137, eQMIWDSMobileIPCallEndReasons_HAReverseTunnelIsMandatoryAndTBitIsNotSet = 138, eQMIWDSMobileIPCallEndReasons_HAEncapsulationUnavailable = 139, eQMIWDSMobileIPCallEndReasons_Unknown = 65535, }; // Enum to describe QMI WDS Network Types enum eQMIWDSNetworkTypes:UINT8 { eQMIWDSNetworkTypes_Unknown = 0, eQMIWDSNetworkTypes_CDMA = 1, eQMIWDSNetworkTypes_UMTS = 2, }; // Enum to describe QMI WDS OOS Warning Reasons enum eQMIWDSOOSWarningReasons:UINT32 { eQMIWDSOOSWarningReasons_UnicastOOS = 0, eQMIWDSOOSWarningReasons_MulticastOOS = 1, eQMIWDSOOSWarningReasons_Cleared = 2, }; // Enum to describe QMI WDS PDN Type enum eQMIWDSPDNType:UINT8 { eQMIWDSPDNType_IPv4PDNType = 0, eQMIWDSPDNType_IPv6PDNType = 1, eQMIWDSPDNType_IPv4orIPv6PDNType = 2, eQMIWDSPDNType_UnspecifiedPDNType = 3, }; // Enum to describe QMI WDS PDP Access Control Flag enum eQMIWDSPDPAccessControlFlag:UINT8 { eQMIWDSPDPAccessControlFlag_PDPAccessControlNone = 0, eQMIWDSPDPAccessControlFlag_PDPAccessControlReject = 1, eQMIWDSPDPAccessControlFlag_PDPAccessControlPermission = 2, }; // Enum to describe QMI WDS PDP Data Compression Type enum eQMIWDSPDPDataCompressionType:UINT8 { eQMIWDSPDPDataCompressionType_Off = 0, eQMIWDSPDPDataCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPDataCompressionType_V42BIS = 2, eQMIWDSPDPDataCompressionType_V44 = 3, }; // Enum to describe QMI WDS PDP Header Compression Type enum eQMIWDSPDPHeaderCompressionType:UINT8 { eQMIWDSPDPHeaderCompressionType_Off = 0, eQMIWDSPDPHeaderCompressionType_ManufacturerPreferred = 1, eQMIWDSPDPHeaderCompressionType_RFC1144 = 2, eQMIWDSPDPHeaderCompressionType_RFC2507 = 3, eQMIWDSPDPHeaderCompressionType_RFC3095 = 4, }; // Enum to describe QMI WDS PPP Call End Reason enum eQMIWDSPPPCallEndReason:UINT16 { eQMIWDSPPPCallEndReason_Timeout = 1, eQMIWDSPPPCallEndReason_AuthenticationFailed = 2, eQMIWDSPPPCallEndReason_OptionMismatch = 3, eQMIWDSPPPCallEndReason_PAPFailure = 31, eQMIWDSPPPCallEndReason_CHAPFailure = 32, eQMIWDSPPPCallEndReason_Unknown = 65535, }; // Enum to describe QMI WDS Profile Family enum eQMIWDSProfileFamily:UINT8 { eQMIWDSProfileFamily_Embedded = 0, eQMIWDSProfileFamily_TetheredSocketsFamily = 1, }; // Enum to describe QMI WDS Profile Param ID enum eQMIWDSProfileParamID:UINT32 { eQMIWDSProfileParamID_UMTSRequestedQoS = 23, eQMIWDSProfileParamID_UMTSMinimumQoS = 24, eQMIWDSProfileParamID_GPRSRequestedQoS = 25, eQMIWDSProfileParamID_GPRSMinimumQoS = 26, eQMIWDSProfileParamID_TFTFilterID1 = 50, eQMIWDSProfileParamID_TFTFilterID2 = 51, }; // Enum to describe QMI WDS QoS Class Identifier enum eQMIWDSQoSClassIdentifier:UINT8 { eQMIWDSQoSClassIdentifier_NetworkAssignQCI = 0, eQMIWDSQoSClassIdentifier_GuaranteedBitrate1 = 1, eQMIWDSQoSClassIdentifier_GuaranteedBitrate2 = 2, eQMIWDSQoSClassIdentifier_GuaranteedBitrate3 = 3, eQMIWDSQoSClassIdentifier_GuaranteedBitrate4 = 4, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate5 = 5, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate6 = 6, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate7 = 7, eQMIWDSQoSClassIdentifier_NonGuaranteedBitrate8 = 8, }; // Enum to describe QMI WDS SIP/MIP Call Types enum eQMIWDSSIPMIPCallTypes:UINT8 { eQMIWDSSIPMIPCallTypes_NotUp = 0, eQMIWDSSIPMIPCallTypes_SIPUp = 1, eQMIWDSSIPMIPCallTypes_MIPUp = 2, }; // Enum to describe QMI WDS Slot Cycle Set Results enum eQMIWDSSlotCycleSetResults:UINT8 { eQMIWDSSlotCycleSetResults_Succcess = 0, eQMIWDSSlotCycleSetResults_FailureRequestRejected = 1, eQMIWDSSlotCycleSetResults_FailureRequestFailedTX = 2, eQMIWDSSlotCycleSetResults_FailureNotSupported = 3, eQMIWDSSlotCycleSetResults_FailureNoNetwork = 4, }; // Enum to describe QMI WDS Tethered Call Types enum eQMIWDSTetheredCallTypes:UINT8 { eQMIWDSTetheredCallTypes_NonTethered = 0, eQMIWDSTetheredCallTypes_RmNet = 1, eQMIWDSTetheredCallTypes_DUN = 2, }; // Enum to describe QMI WMS ACK Failure Cause enum eQMIWMSACKFailureCause:UINT8 { eQMIWMSACKFailureCause_NoNetworkResponse = 0, eQMIWMSACKFailureCause_NetworkReleasedLink = 1, eQMIWMSACKFailureCause_NotSent = 2, }; // Enum to describe QMI WMS CDMA Service Options enum eQMIWMSCDMAServiceOptions:UINT8 { eQMIWMSCDMAServiceOptions_Automatic = 0, eQMIWMSCDMAServiceOptions_SO6 = 6, eQMIWMSCDMAServiceOptions_SO14 = 14, }; // Enum to describe QMI WMS Cause Codes enum eQMIWMSCauseCodes { eQMIWMSCauseCodes_AddressVacant = 0, eQMIWMSCauseCodes_AddressTranslation = 1, eQMIWMSCauseCodes_NetworkResourceShortage = 2, eQMIWMSCauseCodes_NetworkFailure = 3, eQMIWMSCauseCodes_InvalidTeleserviceID = 4, eQMIWMSCauseCodes_NetworkOther = 5, eQMIWMSCauseCodes_NoPageResponse = 32, eQMIWMSCauseCodes_DestinationBusy = 33, eQMIWMSCauseCodes_DestinationNoACK = 34, eQMIWMSCauseCodes_DestinationResourceShortage = 35, eQMIWMSCauseCodes_DeliveryPostponed = 36, eQMIWMSCauseCodes_DestinationOutOfService = 37, eQMIWMSCauseCodes_DestinationNotAtAddress = 38, eQMIWMSCauseCodes_DestinationOther = 39, eQMIWMSCauseCodes_RadioResourceShortage = 64, eQMIWMSCauseCodes_RadioIncompatibility = 65, eQMIWMSCauseCodes_RadioOther = 66, eQMIWMSCauseCodes_Encoding = 96, eQMIWMSCauseCodes_SMSOriginationDenied = 97, eQMIWMSCauseCodes_SMSDestinationDenied = 98, eQMIWMSCauseCodes_SupplementarySErviceNotSupported = 99, eQMIWMSCauseCodes_SMSNotSupported = 100, eQMIWMSCauseCodes_MissingExpectedParameter = 101, eQMIWMSCauseCodes_MissingMandatoryParameter = 102, eQMIWMSCauseCodes_UnrecognizedParameterValue = 103, eQMIWMSCauseCodes_UnexpectedParameterValue = 104, eQMIWMSCauseCodes_UserDataSizeError = 105, eQMIWMSCauseCodes_GeneralOther = 106, }; // Enum to describe QMI WMS Delivery Failures enum eQMIWMSDeliveryFailures:UINT8 { eQMIWMSDeliveryFailures_BlockedByCallControl = 0, }; // Enum to describe QMI WMS Error Classes enum eQMIWMSErrorClasses:UINT8 { eQMIWMSErrorClasses_Temporary = 0, eQMIWMSErrorClasses_Permanent = 1, }; // Enum to describe QMI WMS Error Classes 2 enum eQMIWMSErrorClasses2:UINT8 { eQMIWMSErrorClasses2_Temporary = 2, eQMIWMSErrorClasses2_Permanent = 3, }; // Enum to describe QMI WMS GSM/WCDMA Domains enum eQMIWMSGSMWCDMADomains:UINT8 { eQMIWMSGSMWCDMADomains_CSPreferred = 0, eQMIWMSGSMWCDMADomains_PSPreferred = 1, eQMIWMSGSMWCDMADomains_CSOnly = 2, eQMIWMSGSMWCDMADomains_PSOnly = 3, }; // Enum to describe QMI WMS LTE Domains enum eQMIWMSLTEDomains:UINT8 { eQMIWMSLTEDomains_None = 0, eQMIWMSLTEDomains_IMS = 1, }; // Enum to describe QMI WMS Language enum eQMIWMSLanguage:UINT16 { eQMIWMSLanguage_Unknown = 0, eQMIWMSLanguage_English = 1, eQMIWMSLanguage_French = 2, eQMIWMSLanguage_Spanish = 3, eQMIWMSLanguage_Japanese = 4, eQMIWMSLanguage_Korean = 5, eQMIWMSLanguage_Chinese = 6, eQMIWMSLanguage_Hebrew = 7, }; // Enum to describe QMI WMS Message Classes enum eQMIWMSMessageClasses:UINT8 { eQMIWMSMessageClasses_Class0 = 0, eQMIWMSMessageClasses_Class1 = 1, eQMIWMSMessageClasses_Class2 = 2, eQMIWMSMessageClasses_Class3 = 3, eQMIWMSMessageClasses_ClassNone = 4, eQMIWMSMessageClasses_ClassCDMA = 5, }; // Enum to describe QMI WMS Message Delivery Failure Type enum eQMIWMSMessageDeliveryFailureType:UINT8 { eQMIWMSMessageDeliveryFailureType_Temporary = 0, eQMIWMSMessageDeliveryFailureType_Permanent = 1, }; // Enum to describe QMI WMS Message Formats enum eQMIWMSMessageFormats:UINT8 { eQMIWMSMessageFormats_CDMA = 0, eQMIWMSMessageFormats_AnalogCLIUnsupported = 1, eQMIWMSMessageFormats_AnalogVoiceMailUnsupported = 2, eQMIWMSMessageFormats_AnalogWMSUnsupported = 3, eQMIWMSMessageFormats_AnalogAWIWMSUnsupported = 4, eQMIWMSMessageFormats_MWIUnsupported = 5, eQMIWMSMessageFormats_GSMWCDMAPP = 6, eQMIWMSMessageFormats_GSMWCDMABC = 7, eQMIWMSMessageFormats_MWI = 8, }; // Enum to describe QMI WMS Message Protocols enum eQMIWMSMessageProtocols:UINT8 { eQMIWMSMessageProtocols_CDMA = 0, eQMIWMSMessageProtocols_GSMWCDMAUnsupported = 1, }; // Enum to describe QMI WMS Message Tags enum eQMIWMSMessageTags:UINT8 { eQMIWMSMessageTags_MTRead = 0, eQMIWMSMessageTags_MTNotRead = 1, eQMIWMSMessageTags_MOSend = 2, eQMIWMSMessageTags_MONotSent = 3, }; // Enum to describe QMI WMS Message Types enum eQMIWMSMessageTypes:UINT8 { eQMIWMSMessageTypes_PointToPoint = 0, eQMIWMSMessageTypes_Broadcast = 1, }; // Enum to describe QMI WMS Network Registration Status enum eQMIWMSNetworkRegistrationStatus:UINT8 { eQMIWMSNetworkRegistrationStatus_NoService = 0, eQMIWMSNetworkRegistrationStatus_InProgress = 1, eQMIWMSNetworkRegistrationStatus_Failed = 2, eQMIWMSNetworkRegistrationStatus_LimitedService = 3, eQMIWMSNetworkRegistrationStatus_FullService = 4, }; // Enum to describe QMI WMS Notification Type enum eQMIWMSNotificationType:UINT8 { eQMIWMSNotificationType_Primary = 0, eQMIWMSNotificationType_SecondaryGSM = 1, eQMIWMSNotificationType_SecondaryUMTS = 2, }; // Enum to describe QMI WMS Protocol Identifier Data enum eQMIWMSProtocolIdentifierData:UINT8 { eQMIWMSProtocolIdentifierData_Default = 0, eQMIWMSProtocolIdentifierData_Implicit = 32, eQMIWMSProtocolIdentifierData_Telex = 33, eQMIWMSProtocolIdentifierData_G3Fax = 34, eQMIWMSProtocolIdentifierData_G4Fax = 35, eQMIWMSProtocolIdentifierData_VoicePhone = 36, eQMIWMSProtocolIdentifierData_Ermes = 37, eQMIWMSProtocolIdentifierData_NATPaging = 38, eQMIWMSProtocolIdentifierData_Videotex = 39, eQMIWMSProtocolIdentifierData_TeltexUnspecified = 40, eQMIWMSProtocolIdentifierData_TeltexPSPDN = 41, eQMIWMSProtocolIdentifierData_TeltexCSPDN = 42, eQMIWMSProtocolIdentifierData_TeltexPSTN = 43, eQMIWMSProtocolIdentifierData_TeltexISDN = 44, eQMIWMSProtocolIdentifierData_UCI = 45, eQMIWMSProtocolIdentifierData_MessageHandling = 48, eQMIWMSProtocolIdentifierData_X400 = 49, eQMIWMSProtocolIdentifierData_InternetEMail = 50, eQMIWMSProtocolIdentifierData_SCSpecific1 = 56, eQMIWMSProtocolIdentifierData_SCSpecific2 = 57, eQMIWMSProtocolIdentifierData_SCSpecific3 = 58, eQMIWMSProtocolIdentifierData_SCSpecific4 = 59, eQMIWMSProtocolIdentifierData_SCSpecific5 = 60, eQMIWMSProtocolIdentifierData_SCSpecific6 = 61, eQMIWMSProtocolIdentifierData_SCSpecific7 = 62, eQMIWMSProtocolIdentifierData_GSMUMTS = 63, eQMIWMSProtocolIdentifierData_SMType0 = 64, eQMIWMSProtocolIdentifierData_ReplaceSM1 = 65, eQMIWMSProtocolIdentifierData_ReplaceSM2 = 66, eQMIWMSProtocolIdentifierData_ReplaceSM3 = 67, eQMIWMSProtocolIdentifierData_ReplaceSM4 = 68, eQMIWMSProtocolIdentifierData_ReplaceSM5 = 69, eQMIWMSProtocolIdentifierData_ReplaceSM6 = 70, eQMIWMSProtocolIdentifierData_ReplaceSM7 = 71, eQMIWMSProtocolIdentifierData_ReturnCall = 95, eQMIWMSProtocolIdentifierData_ANSI136RData = 124, eQMIWMSProtocolIdentifierData_MEDataDownload = 125, eQMIWMSProtocolIdentifierData_MEDepersonalizationShortMessage = 126, eQMIWMSProtocolIdentifierData_SIMDataDownload = 127, }; // Enum to describe QMI WMS RP Cause Codes enum eQMIWMSRPCauseCodes { eQMIWMSRPCauseCodes_UnassignedNumber = 1, eQMIWMSRPCauseCodes_OperatorDeterminedBarring = 8, eQMIWMSRPCauseCodes_CallBarred = 10, eQMIWMSRPCauseCodes_Reserved = 11, eQMIWMSRPCauseCodes_ShortMessageTransferRejected = 21, eQMIWMSRPCauseCodes_MemoryCapacityExceeded = 22, eQMIWMSRPCauseCodes_DestinationOutOfOrder = 27, eQMIWMSRPCauseCodes_UnidentifiedSubscriber = 28, eQMIWMSRPCauseCodes_FacilityRejected = 29, eQMIWMSRPCauseCodes_UnknownSubscriber = 30, eQMIWMSRPCauseCodes_NetworkOutOfOrder = 38, eQMIWMSRPCauseCodes_TemporaryFailure = 41, eQMIWMSRPCauseCodes_Congestion = 42, eQMIWMSRPCauseCodes_UnspecifiedResourcesUnavailable = 47, eQMIWMSRPCauseCodes_RequestedFacilityNotSubscribed = 50, eQMIWMSRPCauseCodes_RequestedFacilityNotImplemented = 69, eQMIWMSRPCauseCodes_InvalidShortMessageTransferValue = 81, eQMIWMSRPCauseCodes_SemanticallyIncorrectMessage = 95, eQMIWMSRPCauseCodes_InvalidManadatoryInfo = 96, eQMIWMSRPCauseCodes_MessageTypeNotImplemented = 97, eQMIWMSRPCauseCodes_MessageNotCompatibleWithSMS = 98, eQMIWMSRPCauseCodes_InfoElementNotImplemented = 99, eQMIWMSRPCauseCodes_UnspecifiedProtocolError = 111, eQMIWMSRPCauseCodes_UnspecifiedInterworking = 127, }; // Enum to describe QMI WMS Receipt Actions enum eQMIWMSReceiptActions:UINT8 { eQMIWMSReceiptActions_Discard = 0, eQMIWMSReceiptActions_StoreAndNotify = 1, eQMIWMSReceiptActions_TransferOnly = 2, eQMIWMSReceiptActions_TransfterAndAcknowledge = 3, }; // Enum to describe QMI WMS Route Values enum eQMIWMSRouteValues:UINT8 { eQMIWMSRouteValues_Discard = 0, eQMIWMSRouteValues_StoreAndNotify = 1, eQMIWMSRouteValues_TransferOnly = 2, eQMIWMSRouteValues_TransferAndAcknowledge = 3, eQMIWMSRouteValues_Unknown = 255, }; // Enum to describe QMI WMS SMS Call Status enum eQMIWMSSMSCallStatus:UINT8 { eQMIWMSSMSCallStatus_Incoming = 0, eQMIWMSSMSCallStatus_Connected = 1, eQMIWMSSMSCallStatus_Aborted = 2, eQMIWMSSMSCallStatus_Disconnected = 3, eQMIWMSSMSCallStatus_Connecting = 4, }; // Enum to describe QMI WMS SMS Message Mode enum eQMIWMSSMSMessageMode:UINT8 { eQMIWMSSMSMessageMode_GSMWCDMA = 1, }; // Enum to describe QMI WMS Service Categories enum eQMIWMSServiceCategories { eQMIWMSServiceCategories_Unknown = 0, eQMIWMSServiceCategories_EmergencyBroadcast = 1, eQMIWMSServiceCategories_Administrative = 2, eQMIWMSServiceCategories_Maintenance = 3, eQMIWMSServiceCategories_GeneralNewsLocal = 4, eQMIWMSServiceCategories_GeneralNewsRegional = 5, eQMIWMSServiceCategories_GeneralNewsNational = 6, eQMIWMSServiceCategories_GeneralNewsInternational = 7, eQMIWMSServiceCategories_BusinessNewsLocal = 8, eQMIWMSServiceCategories_BusinessNewsRegional = 9, eQMIWMSServiceCategories_BusinessNewsNational = 10, eQMIWMSServiceCategories_BusinessNewsInternational = 11, eQMIWMSServiceCategories_SportsNewsLocal = 12, eQMIWMSServiceCategories_SportsNewsRegional = 13, eQMIWMSServiceCategories_SportsNewsNational = 14, eQMIWMSServiceCategories_SportsNewsInternational = 15, eQMIWMSServiceCategories_EntertainmentNewsLocal = 16, eQMIWMSServiceCategories_EntertainmentNewsRegional = 17, eQMIWMSServiceCategories_EntertainmentNewsNational = 18, eQMIWMSServiceCategories_EntertainmentNewsInternational = 19, eQMIWMSServiceCategories_LocalWeather = 20, eQMIWMSServiceCategories_AreaTrafficReports = 21, eQMIWMSServiceCategories_LocalAirplaneFlightSchedules = 22, eQMIWMSServiceCategories_Restaurants = 23, eQMIWMSServiceCategories_Lodgings = 24, eQMIWMSServiceCategories_RetailDirectory = 25, eQMIWMSServiceCategories_Advertisements = 26, eQMIWMSServiceCategories_StockQuotes = 27, eQMIWMSServiceCategories_EmploymentOpportunities = 28, eQMIWMSServiceCategories_MedicalHealthHospitals = 29, eQMIWMSServiceCategories_TechnologyNews = 30, eQMIWMSServiceCategories_Multicategory = 31, eQMIWMSServiceCategories_CardApplicationToolkitProtocolTeleservice = 32, eQMIWMSServiceCategories_PresidentialLevelAlert = 4096, eQMIWMSServiceCategories_ExtremeThreattoLifeandProperty = 4097, eQMIWMSServiceCategories_SevereThreattoLifeandProperty = 4098, eQMIWMSServiceCategories_AMBERChildAbductionEmergency = 4099, eQMIWMSServiceCategories_CMASTestMessage = 4100, }; // Enum to describe QMI WMS Service Ready Status enum eQMIWMSServiceReadyStatus:UINT32 { eQMIWMSServiceReadyStatus_SMSServiceNotReady = 0, eQMIWMSServiceReadyStatus_3GPPSMSServiceReady = 1, eQMIWMSServiceReadyStatus_3GPP2SMSServiceReady = 2, eQMIWMSServiceReadyStatus_3GPPAnd3GPP2SMSServicesReady = 3, }; // Enum to describe QMI WMS Storage Types enum eQMIWMSStorageTypes:UINT8 { eQMIWMSStorageTypes_UIM = 0, eQMIWMSStorageTypes_NV = 1, eQMIWMSStorageTypes_Unknown = 255, }; // Enum to describe QMI WMS Subscription Type enum eQMIWMSSubscriptionType:UINT8 { eQMIWMSSubscriptionType_PrimarySubscription = 0, eQMIWMSSubscriptionType_SecondarySubscription = 1, }; // Enum to describe QMI WMS TP Cause Codes enum eQMIWMSTPCauseCodes { eQMIWMSTPCauseCodes_TelematicInterworkingNotSupported = 128, eQMIWMSTPCauseCodes_ShortMessageType0NotSupported = 129, eQMIWMSTPCauseCodes_CannotReplaceShortMessage = 130, eQMIWMSTPCauseCodes_UnspecifiedPIDError = 143, eQMIWMSTPCauseCodes_DataCodingSchemeNotSupported = 144, eQMIWMSTPCauseCodes_MessageClassNotSupported = 145, eQMIWMSTPCauseCodes_UnspecifiedDCSError = 159, eQMIWMSTPCauseCodes_CommandCannotBeActioned = 160, eQMIWMSTPCauseCodes_CommandUnsupported = 161, eQMIWMSTPCauseCodes_UnspecifiedCommandError = 175, eQMIWMSTPCauseCodes_TPDUNotSupported = 176, eQMIWMSTPCauseCodes_SCBusy = 192, eQMIWMSTPCauseCodes_NoSCSubscription = 193, eQMIWMSTPCauseCodes_SCSystemFailure = 194, eQMIWMSTPCauseCodes_InvalidSMEAddress = 195, eQMIWMSTPCauseCodes_DestinationSMEBarred = 196, eQMIWMSTPCauseCodes_SMRejectedOrDuplicate = 197, eQMIWMSTPCauseCodes_VPFNotSupported = 198, eQMIWMSTPCauseCodes_VPNotSupported = 199, eQMIWMSTPCauseCodes_SIMSMSStorageFull = 208, eQMIWMSTPCauseCodes_NoSIMSMSStorageCapability = 209, eQMIWMSTPCauseCodes_ErrorInMS = 210, eQMIWMSTPCauseCodes_MemoryCapacityExceeded = 211, eQMIWMSTPCauseCodes_SIMApplicationToolkitBusy = 212, eQMIWMSTPCauseCodes_SIMDataDownloadError = 213, eQMIWMSTPCauseCodes_UnspecifiedError = 255, }; // Enum to describe QMI WMS Transport Capability enum eQMIWMSTransportCapability:UINT8 { eQMIWMSTransportCapability_CDMA = 0, eQMIWMSTransportCapability_GW = 1, }; // Enum to describe QMI WMS Transport Type enum eQMIWMSTransportType:UINT8 { eQMIWMSTransportType_IMS = 0, }; // Enum to describe QMI WMS Waiting Message Type enum eQMIWMSWaitingMessageType:UINT8 { eQMIWMSWaitingMessageType_Voicemail = 0, eQMIWMSWaitingMessageType_Fax = 1, eQMIWMSWaitingMessageType_Email = 2, eQMIWMSWaitingMessageType_Other = 3, eQMIWMSWaitingMessageType_Videomail = 4, }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiConnectionMgmt/GobiConnectionMgmtAPIStructs.h000077500000000000000000027022651455567757300316620ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtAPIStructs.h DESCRIPTION: Declaration of the Gobi API structures Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ #pragma once // Include the enumerations #include "GobiConnectionMgmtAPIEnums.h" #pragma pack( push, 1 ) // Structure to represent a QMUX header struct sQMUXHeader { // mIF is always 1 BYTE mIF; // mLength is full size of QMUX message NOT including mIF WORD mLength; // Flags are always 0 for clients BYTE mFlags; eQMIService mServiceType; BYTE mClientID; }; // Structure to represent a QMI Control Raw Transaction Header struct sQMIControlRawTransactionHeader { BYTE mResponse :1; BYTE mIndication :1; BYTE mReserved :6; BYTE mTransactionID; }; // Structure to represent a QMI Service Raw Transaction Header struct sQMIServiceRawTransactionHeader { BYTE mCompound :1; BYTE mResponse :1; BYTE mIndication :1; BYTE mReserved :5; WORD mTransactionID; }; // Structure to represetn a QMI Raw Message Header struct sQMIRawMessageHeader { WORD mMessageID; WORD mLength; // This array must be the size specified by mLength // BYTE mTLV[1]; }; // Structure to represent a QMUX message struct sQMUXMessage { sQMUXHeader mQMUXHeader; // Either a sQMUXControlRawTransactionHeader or // sQMIServiceRawTransactionHeader should go here sQMIRawMessageHeader mQMIRawMessageHeader; }; // Structure to represent a QMI (control/service) content struct sQMIRawContentHeader { BYTE mTypeID; WORD mLength; // This array must be the size specified by mLength // BYTE mValue[1]; }; // Structure to describe request TLV 0x01 for QMI CTL Get Client ID struct sQMICTLGetClientID_ServiceType { eQMIService mQMIService; }; // Structure to describe response TLV 0x01 for QMI CTL Get Client ID struct sQMICTLGetClientID_AssignedClientID { eQMIService mQMIService; BYTE mClientID; }; // Structure to describe TLV 0x02, the Result Code // It is common for all Responses struct sResultCode { eQMIResults mQMIResult; eQMIErrors mQMIError; }; // Structure to describe TLV 0x01 for QMI LOC, the status // It is common for QMI LOC indications above 0x0032 struct sLOCIndication_Status { eQMILOCStatus mStatus; }; // Structure to describe request TLV 0x10 for WDSSetEventReport() struct sWDSSetEventReportRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe request TLV 0x11 for WDSSetEventReport() struct sWDSSetEventReportRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x13 for WDSSetEventReport() struct sWDSSetEventReportRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x14 for WDSSetEventReport() struct sWDSSetEventReportRequest_MIPStatusIndicator { INT8 mReportMIPStatus; }; // Structure to describe request TLV 0x15 for WDSSetEventReport() struct sWDSSetEventReportRequest_CurrentDataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x17 for WDSSetEventReport() struct sWDSSetEventReportRequest_DataCallStatusIndicator { INT8 mReportDataCallStatus; }; // Structure to describe request TLV 0x18 for WDSSetEventReport() struct sWDSSetEventReportRequest_PreferredDataSystemIndicator { INT8 mReportPreferredDataSystem; }; // Structure to describe request TLV 0x19 for WDSSetEventReport() struct sWDSSetEventReportRequest_EVDOPMChangeIndicator { INT8 mReportEVDOPageMonitorPeriodChange; }; // Structure to describe request TLV 0x1A for WDSSetEventReport() struct sWDSSetEventReportRequest_DataSystemsIndicator { INT8 mReportDataSystems; }; // Structure to describe request TLV 0x1B for WDSSetEventReport() struct sWDSSetEventReportRequest_UplinkFlowControlIndicator { INT8 mReportUplinkFlowControl; }; // Structure to describe indication TLV 0x10 for WDS EventReport struct sWDSEventReportIndication_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe indication TLV 0x11 for WDS EventReport struct sWDSEventReportIndication_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe indication TLV 0x12 for WDS EventReport struct sWDSEventReportIndication_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe indication TLV 0x13 for WDS EventReport struct sWDSEventReportIndication_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe indication TLV 0x14 for WDS EventReport struct sWDSEventReportIndication_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe indication TLV 0x15 for WDS EventReport struct sWDSEventReportIndication_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe indication TLV 0x16 for WDS EventReport struct sWDSEventReportIndication_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe indication TLV 0x17 for WDS EventReport struct sWDSEventReportIndication_DataBearerTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x18 for WDS EventReport struct sWDSEventReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x19 for WDS EventReport struct sWDSEventReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x1A for WDS EventReport struct sWDSEventReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x1B for WDS EventReport struct sWDSEventReportIndication_MIPStatus { UINT8 mMIPStatus; }; // Structure to describe indication TLV 0x1D for WDS EventReport struct sWDSEventReportIndication_CurrentDataBearerTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe indication TLV 0x1F for WDS EventReport struct sWDSEventReportIndication_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe indication TLV 0x20 for WDS EventReport struct sWDSEventReportIndication_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe indication TLV 0x22 for WDS EventReport struct sWDSEventReportIndication_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe indication TLV 0x23 for WDS EventReport struct sWDSEventReportIndication_EVDOPageMonitorPeriodChange { UINT8 mEVDOPageMonitorPeriodChange; INT8 mEVDOForceLongSleep; }; // Structure to describe indication TLV 0x24 for WDS EventReport struct sWDSEventReportIndication_DataSystems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe indication TLV 0x25 for WDS EventReport struct sWDSEventReportIndication_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe indication TLV 0x26 for WDS EventReport struct sWDSEventReportIndication_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe indication TLV 0x27 for WDS EventReport struct sWDSEventReportIndication_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe request TLV 0x01 for WDSAbort() struct sWDSAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for WDSSetIndication() struct sWDSSetIndicationRequest_TMGIList { INT8 mReportEMBMSTMGIList; }; // Structure to describe request TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_PrimaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_SecondaryNBNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ContextAPNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x17 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x18 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x19 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x30 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_TechnologyPreference { bool mEnable3GPP:1; bool mEnable3GPP2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x31 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPPProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x32 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_3GPP2ProfileIdentifier { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x33 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x34 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_ExtendedTechnologyPreference { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe request TLV 0x35 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceRequest_CallType { eQMIWDSCallTypes mCallType; }; // Structure to describe response TLV 0x01 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe response TLV 0x10 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x11 for WDSStartNetworkInterface() struct sWDSStartNetworkInterfaceResponse_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_PacketDataHandle { UINT32 mPacketDataHandle; }; // Structure to describe request TLV 0x10 for WDSStopNetworkInterface() struct sWDSStopNetworkInterfaceRequest_Autoconnect { INT8 mAutoconnectOff; }; // Structure to describe response TLV 0x01 for WDSGetPacketServiceStatus() struct sWDSGetPacketServiceStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x01 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; INT8 mReconfigureRequired; }; // Structure to describe indication TLV 0x10 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x11 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_VerboseCallEndReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe indication TLV 0x12 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe indication TLV 0x13 for WDS PacketServiceStatusReport struct sWDSPacketServiceStatusReportIndication_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnology; }; // Structure to describe response TLV 0x01 for WDSGetChannelRates() struct sWDSGetChannelRatesResponse_ChannelRates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe request TLV 0x01 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsRequest_PacketStatsMask { bool mReportTXPacketSuccesses:1; bool mReportRXPacketSuccesses:1; bool mReportTXPacketErrors:1; bool mReportRXPacketErrors:1; bool mReportTXOverflows:1; bool mReportRXOverflows:1; bool mTXByteTotal:1; bool mRXByteTotal:1; bool mTXPacketsDropped:1; bool mRXPacketsDropped:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe response TLV 0x10 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketSuccesses { UINT32 mTXPacketSuccesses; }; // Structure to describe response TLV 0x11 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketSuccesses { UINT32 mRXPacketSuccesses; }; // Structure to describe response TLV 0x12 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketErrors { UINT32 mTXPacketErrors; }; // Structure to describe response TLV 0x13 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketErrors { UINT32 mRXPacketErrors; }; // Structure to describe response TLV 0x14 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXOverflows { UINT32 mTXOverflows; }; // Structure to describe response TLV 0x15 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXOverflows { UINT32 mRXOverflows; }; // Structure to describe response TLV 0x19 for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x1A for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x1B for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x1C for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x1D for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_TXPacketsDropped { UINT32 mTXPacketsDropped; }; // Structure to describe response TLV 0x1E for WDSGetPacketStatistics() struct sWDSGetPacketStatisticsResponse_RXPacketsDropped { UINT32 mRXPacketsDropped; }; // Structure to describe request TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe request TLV 0x10 for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSCreateProfile() struct sWDSCreateProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSCreateProfile() struct sWDSCreateProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSCreateProfile() struct sWDSCreateProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSCreateProfile() struct sWDSCreateProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSCreateProfile() struct sWDSCreateProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSCreateProfile() struct sWDSCreateProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSCreateProfile() struct sWDSCreateProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSCreateProfile() struct sWDSCreateProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSCreateProfile() struct sWDSCreateProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSCreateProfile() struct sWDSCreateProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSCreateProfile() struct sWDSCreateProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSCreateProfile() struct sWDSCreateProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSCreateProfile() struct sWDSCreateProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x8F for WDSCreateProfile() struct sWDSCreateProfileRequest_ProfilePersistent { INT8 mProfilePersistent; }; // Structure to describe request TLV 0x90 for WDSCreateProfile() struct sWDSCreateProfileRequest_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSCreateProfile() struct sWDSCreateProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSCreateProfile() struct sWDSCreateProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSCreateProfile() struct sWDSCreateProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSCreateProfile() struct sWDSCreateProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSCreateProfile() struct sWDSCreateProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSCreateProfile() struct sWDSCreateProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSCreateProfile() struct sWDSCreateProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSCreateProfile() struct sWDSCreateProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSCreateProfile() struct sWDSCreateProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSCreateProfile() struct sWDSCreateProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSCreateProfile() struct sWDSCreateProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSCreateProfile() struct sWDSCreateProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSCreateProfile() struct sWDSCreateProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSCreateProfile() struct sWDSCreateProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSCreateProfile() struct sWDSCreateProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSCreateProfile() struct sWDSCreateProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0x01 for WDSCreateProfile() struct sWDSCreateProfileResponse_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSCreateProfile() struct sWDSCreateProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSModifyProfile() struct sWDSModifyProfileRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSModifyProfile() struct sWDSModifyProfileRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSModifyProfile() struct sWDSModifyProfileRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSModifyProfile() struct sWDSModifyProfileRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSModifyProfile() struct sWDSModifyProfileRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSModifyProfile() struct sWDSModifyProfileRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSModifyProfile() struct sWDSModifyProfileRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSModifyProfile() struct sWDSModifyProfileRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSModifyProfile() struct sWDSModifyProfileRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSModifyProfile() struct sWDSModifyProfileRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSModifyProfile() struct sWDSModifyProfileRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSModifyProfile() struct sWDSModifyProfileRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSModifyProfile() struct sWDSModifyProfileRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x2F for WDSModifyProfile() struct sWDSModifyProfileRequest_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe request TLV 0x30 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe request TLV 0x31 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0x35 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe request TLV 0x90 for WDSModifyProfile() struct sWDSModifyProfileRequest_NegotiateDNSServerPrefrence { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSModifyProfile() struct sWDSModifyProfileRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSModifyProfile() struct sWDSModifyProfileRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSModifyProfile() struct sWDSModifyProfileRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSModifyProfile() struct sWDSModifyProfileRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSModifyProfile() struct sWDSModifyProfileRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSModifyProfile() struct sWDSModifyProfileRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSModifyProfile() struct sWDSModifyProfileRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSModifyProfile() struct sWDSModifyProfileRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSModifyProfile() struct sWDSModifyProfileRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSModifyProfile() struct sWDSModifyProfileRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSModifyProfile() struct sWDSModifyProfileRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSModifyProfile() struct sWDSModifyProfileRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSModifyProfile() struct sWDSModifyProfileRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA8 for WDSModifyProfile() struct sWDSModifyProfileRequest_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe request TLV 0xA9 for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe request TLV 0xAA for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe request TLV 0xAB for WDSModifyProfile() struct sWDSModifyProfileRequest_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe request TLV 0xAD for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0xAE for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe request TLV 0xAF for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0xB0 for WDSModifyProfile() struct sWDSModifyProfileRequest_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSModifyProfile() struct sWDSModifyProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSDeleteProfile() struct sWDSDeleteProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSDeleteProfile() struct sWDSDeleteProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetProfileList() struct sWDSGetProfileListRequest_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe request TLV 0x11 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe request TLV 0x12 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe request TLV 0x13 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe request TLV 0x14 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0x15 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x16 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x17 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x18 for WDSGetProfileList() struct sWDSGetProfileListRequest_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe request TLV 0x19 for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1A for WDSGetProfileList() struct sWDSGetProfileListRequest_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe request TLV 0x1B for WDSGetProfileList() struct sWDSGetProfileListRequest_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x1C for WDSGetProfileList() struct sWDSGetProfileListRequest_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x1D for WDSGetProfileList() struct sWDSGetProfileListRequest_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x1E for WDSGetProfileList() struct sWDSGetProfileListRequest_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x1F for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe request TLV 0x20 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe request TLV 0x21 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe request TLV 0x22 for WDSGetProfileList() struct sWDSGetProfileListRequest_IMCNFlag { INT8 mIMCN; }; // Structure to describe request TLV 0x23 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x24 for WDSGetProfileList() struct sWDSGetProfileListRequest_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe request TLV 0x25 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe request TLV 0x26 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe request TLV 0x27 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe request TLV 0x28 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x29 for WDSGetProfileList() struct sWDSGetProfileListRequest_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2A for WDSGetProfileList() struct sWDSGetProfileListRequest_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe request TLV 0x2B for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2C for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x2D for WDSGetProfileList() struct sWDSGetProfileListRequest_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe request TLV 0x2E for WDSGetProfileList() struct sWDSGetProfileListRequest_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe request TLV 0x90 for WDSGetProfileList() struct sWDSGetProfileListRequest_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe request TLV 0x91 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe request TLV 0x92 for WDSGetProfileList() struct sWDSGetProfileListRequest_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe request TLV 0x93 for WDSGetProfileList() struct sWDSGetProfileListRequest_AllowLinger { INT8 mAllowLinger; }; // Structure to describe request TLV 0x94 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x95 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x96 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe request TLV 0x97 for WDSGetProfileList() struct sWDSGetProfileListRequest_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x98 for WDSGetProfileList() struct sWDSGetProfileListRequest_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe request TLV 0x99 for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe request TLV 0x9A for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe request TLV 0x9B for WDSGetProfileList() struct sWDSGetProfileListRequest_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe request TLV 0x9C for WDSGetProfileList() struct sWDSGetProfileListRequest_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe request TLV 0x9D for WDSGetProfileList() struct sWDSGetProfileListRequest_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe request TLV 0x9E for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe request TLV 0x9F for WDSGetProfileList() struct sWDSGetProfileListRequest_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe request TLV 0xA0 for WDSGetProfileList() struct sWDSGetProfileListRequest_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe request TLV 0xA1 for WDSGetProfileList() struct sWDSGetProfileListRequest_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe request TLV 0xA2 for WDSGetProfileList() struct sWDSGetProfileListRequest_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe request TLV 0xA3 for WDSGetProfileList() struct sWDSGetProfileListRequest_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe request TLV 0xA4 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA5 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0xA6 for WDSGetProfileList() struct sWDSGetProfileListRequest_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0xA7 for WDSGetProfileList() struct sWDSGetProfileListRequest_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetProfileList() struct sWDSGetProfileListResponse_ProfileList { UINT8 mNumberOfProfiles; struct sProfile { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; UINT8 mProfileNameLength; // This array must be the size specified by mProfileNameLength // char mProfileName[1]; }; // This array must be the size specified by mNumberOfProfiles // sProfile mProfiles[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileList() struct sWDSGetProfileListResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetProfileSettings() struct sWDSGetProfileSettingsRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IMCMFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x90 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_NegotiateDNSServerPreference { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSGetProfileSettings() struct sWDSGetProfileSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsRequest_ProfileType { eQMIProfileTypes mProfileType; }; // Structure to describe response TLV 0x10 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x12 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPHeaderCompressionType { eQMIWDSPDPHeaderCompressionType mPDPHeaderCompressionType; }; // Structure to describe response TLV 0x13 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPDataCompressionType { eQMIWDSPDPDataCompressionType mPDPDataCompressionType; }; // Structure to describe response TLV 0x14 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSRequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x18 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UMTSMinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSRequestedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_GPRSMinimumQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Password { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x1D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x20 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPAccessControlFlag { eQMIWDSPDPAccessControlFlag mPDPAccessControlFlag; }; // Structure to describe response TLV 0x21 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressUsingDHCP { INT8 mPCSCFAddressUsingDHCP; }; // Structure to describe response TLV 0x22 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x23 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID1Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x24 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_TrafficFlowTemplateID2Parameters { UINT8 mFilterID; UINT8 mEvaluationID; eQMIWDSIPVersion mIPVersion; // The following union is based on the value of mIPVersion union uValOfIPVersion { // If the value of mIPVersion == 4 struct sIPVersionIs4 { UINT8 mIPV4Address[4]; }; sIPVersionIs4 mIPVersionIs4; // If the value of mIPVersion == 6 struct sIPVersionIs6 { UINT16 mIPv6Address[8]; }; sIPVersionIs6 mIPVersionIs6; // Padding out 128 bits UINT8 mReserved1[16]; }; uValOfIPVersion mValOfIPVersion; UINT8 mSourceIPMask; UINT8 mNextHeader; UINT16 mDestinationPortRangeStart; UINT16 mDestinationPortRangeEnd; UINT16 mSourcePortRangeStart; UINT16 mSourcePortRangeEnd; UINT32 mIPSECSecurityParameterIndex; UINT16 mTOSMask; UINT32 mFlowLabel; }; // Structure to describe response TLV 0x25 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextNumber { UINT8 mPDPContextNumber; }; // Structure to describe response TLV 0x26 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextSecondaryFlag { INT8 mPDPContextSecondaryFlag; }; // Structure to describe response TLV 0x27 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDPContextPrimaryID { UINT8 mPDPPrimaryID; }; // Structure to describe response TLV 0x28 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RequestedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_MinimumQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; INT8 mSignalingIndication; }; // Structure to describe response TLV 0x2B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6 { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x2D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AddressPreference { eQMIWDSAddressAllocationPreference mAddressAllocationPreference; }; // Structure to describe response TLV 0x2E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LTEQoSParameters { eQMIWDSQoSClassIdentifier mQoSClassIdentifier; UINT32 mGuaranteedDownlinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mMaxUplinkBitrate; }; // Structure to describe response TLV 0x2F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNDisabled { INT8 mAPNDisabled; }; // Structure to describe response TLV 0x30 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNInactivityTimer { UINT32 mPDNInactivityTimerSeconds; }; // Structure to describe response TLV 0x31 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0x35 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNBearer { bool mGSM:1; bool mWCDMA:1; bool mLTE:1; // Padding out 60 bits UINT8 mReserved1:5; UINT8 mReserved2[6]; UINT8 mReserved3:7; bool mAny:1; }; // Structure to describe response TLV 0x90 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_NegotiateDNSServerPreferences { INT8 mNegotiateDNSServerPreference; }; // Structure to describe response TLV 0x91 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimerDO { UINT32 mPPPSessionCloseTimerDOSeconds; }; // Structure to describe response TLV 0x92 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PPPSessionCloseTimer1X { UINT32 mPPPSessionCloseTimer1XSeconds; }; // Structure to describe response TLV 0x93 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AllowLinger { INT8 mAllowLinger; }; // Structure to describe response TLV 0x94 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x95 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPACKTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x96 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationTimeout { UINT16 mTimeoutMilliseconds; }; // Structure to describe response TLV 0x97 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_LCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x98 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_IPCPConfigRetryCount { UINT8 mRetryCount; }; // Structure to describe response TLV 0x99 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationRetry { UINT8 mRetryCount; }; // Structure to describe response TLV 0x9A for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0x9B for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_UserID { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x9C for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_AuthenticationPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0x9D for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataRate { eQMIWDSDataRate mDataRate; }; // Structure to describe response TLV 0x9E for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationType { eQMIWDSApplicationType mApplicationType; }; // Structure to describe response TLV 0x9F for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_DataMode { eQMIWDSDataMode mDataMode; }; // Structure to describe response TLV 0xA0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ApplicationPriority { UINT8 mApplicationPriority; }; // Structure to describe response TLV 0xA1 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0xA2 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNType { eQMIWDSPDNType mPDNType; }; // Structure to describe response TLV 0xA3 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PCSCFAddressNeeded { INT8 mPCSCFAddressNeeded; }; // Structure to describe response TLV 0xA4 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA5 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0xA6 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PrimaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA7 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_SecondaryIPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0xA8 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_RATType { eQMIWDS3GPP2RATTypes mRATType; }; // Structure to describe response TLV 0xA9 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNEnabled { INT8 mAPNEnabled; }; // Structure to describe response TLV 0xAA for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2PDNInactivityTimer { UINT32 mPDNInactivityTimerMinutes; }; // Structure to describe response TLV 0xAB for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_3GPP2APNClass { UINT8 mAPNClass; }; // Structure to describe response TLV 0xAD for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNAuthenticationProtocol { eQMIWDSAuthenticationProtocol mAuthenticationProtocol; }; // Structure to describe response TLV 0xAE for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNUserID { // String is variable length, but must be size of the container // char mUserID[1]; }; // Structure to describe response TLV 0xAF for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNPassword { // String is variable length, but must be size of the container // char mPassword[1]; }; // Structure to describe response TLV 0xB0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_PDNLabel { // String is variable length, but must be size of the container // char mLabel[1]; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultSettings() struct sWDSGetDefaultSettingsResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsRequest_RequestedSettings { bool mProfileID:1; bool mProfileName:1; bool mPDPType:1; bool mAPNName:1; bool mDNSAddress:1; bool mGrantedQoS:1; bool mUsername:1; bool mAuthenticationProtocol:1; bool mIPAddress:1; bool mGatewayInfo:1; bool mPCSCFAddress:1; bool mPCSCFServerAddressList:1; bool mPCSCFDomainNameList:1; bool mMTU:1; bool mDomainNameList:1; bool mIPFamily:1; bool mIMCNFlag:1; bool mExtendedTechnology:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileName { // String is variable length, but must be size of the container // char mProfileName[1]; }; // Structure to describe response TLV 0x11 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PDPType { eQMIPDPTypes mPDPType; }; // Structure to describe response TLV 0x14 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_APNName { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x15 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x16 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x17 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_UMTSGrantedQoS { eQMITrafficClasses mTrafficClass; UINT32 mMaxUplinkBitrate; UINT32 mMaxDownlinkBitrate; UINT32 mGuaranteedUplinkBitrate; UINT32 mGuaranteedDownlinkBitrate; eQMIQoSDeliveryOrders mQoSDeliveryOrder; UINT32 mMaxSDUSize; eQMISDUErrorRatios mSDUErrorRatio; eQMISDUResidualBitErrorRatios mSDUResidualBitErrorRatio; eQMIErroneousSDUDeliveries mErroneousSDUDelivery; UINT32 mTransferDelay; UINT32 mTrafficHandlingPriority; }; // Structure to describe response TLV 0x19 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GPRSGrantedQoS { UINT32 mPrecedenceClass; UINT32 mDelayClass; UINT32 mReliabilityClass; UINT32 mPeakThroughputClass; UINT32 mMeanThroughputClass; }; // Structure to describe response TLV 0x1B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Username { // String is variable length, but must be size of the container // char mUsername[1]; }; // Structure to describe response TLV 0x1D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_Authentication { bool mEnablePAP:1; bool mEnableCHAP:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x1E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x1F for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ProfileID { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0x20 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewayAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x21 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_GatewaySubnetMask { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x22 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCF { INT8 mPCSCFAddressUsingPCO; }; // Structure to describe response TLV 0x23 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFServerAddressList { UINT8 mNumberOfInstances; struct sInstance { UINT8 mIPV4Address[4]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x24 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFDomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mFQDNLength; // This array must be the size specified by mFQDNLength // char mFQDN[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x25 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6Address { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x26 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPv6GatewayAddress { UINT16 mIPv6Address[8]; UINT8 mIPPrefixLength; }; // Structure to describe response TLV 0x27 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x28 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x29 for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_MTU { UINT32 mMTU; }; // Structure to describe response TLV 0x2A for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_DomainNameList { UINT8 mNumberOfInstances; struct sInstance { UINT16 mDomainNameLength; // This array must be the size specified by mDomainNameLength // char mDomainName[1]; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x2B for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IPFamily { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe response TLV 0x2C for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_IMCNFlag { INT8 mIMCN; }; // Structure to describe response TLV 0x2D for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_ExtendedTechnology { eQMIWDSExtendedTechPrefs mExtendedTechnologyPreference; }; // Structure to describe response TLV 0x2E for WDSGetCurrentSettings() struct sWDSGetCurrentSettingsResponse_PCSCFIPv6AddressList { UINT8 mNumberOfAddresses; struct sAddress { UINT16 mIPv6Address[8]; }; // This array must be the size specified by mNumberOfAddresses // sAddress mAddresses[1]; }; // Structure to describe request TLV 0x01 for WDSSetMIPMode() struct sWDSSetMIPModeRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetMIPMode() struct sWDSGetMIPModeResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x01 for WDSGetDormancy() struct sWDSGetDormancyResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x01 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe response TLV 0x10 for WDSGetAutoconnectSetting() struct sWDSGetAutoconnectSettingResponse_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x01 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_Duration { UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousDuration { UINT64 mPreviousDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x12 for WDSGetDataSessionDuration() struct sWDSGetDataSessionDurationResponse_PreviousActiveDuration { UINT64 mPreviousDataSessionActiveDuration; }; // Structure to describe response TLV 0x01 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x10 for WDSGetModemStatus() struct sWDSGetModemStatusResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x01 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x10 for WDS ModemStatusReport struct sWDSModemStatusReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x01 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x10 for WDSGetDataBearerTechnology() struct sWDSGetDataBearerTechnologyResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe request TLV 0x01 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_RequestedStatus { bool mConnectionStatus:1; bool mLastCallEndReason:1; bool mRXTXByteTotals:1; bool mDormancyStatus:1; bool mDataBearerTechnology:1; bool mChannelRates:1; bool mDuration:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ConnectionStatusIndicator { INT8 mReportConnectionStatus; }; // Structure to describe request TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_TransferStatisticsIndicator { UINT8 mTransferStatisticsIntervalSeconds; // Padding out 6 bits UINT8 mReserved1:6; bool mTXByteTotal:1; bool mRXByteTotal:1; // Padding out 24 bits UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DormancyStatusIndicator { INT8 mReportDormancyStatus; }; // Structure to describe request TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_DataBearerTechnologyIndicator { INT8 mReportDataBearerTechnology; }; // Structure to describe request TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoRequest_ChannelRateIndicator { INT8 mReportChannelRate; }; // Structure to describe response TLV 0x10 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Status { eQMIConnectionStatus mConnectionStatus; UINT64 mDataSessionDuration; }; // Structure to describe response TLV 0x11 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe response TLV 0x12 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe response TLV 0x13 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe response TLV 0x14 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe response TLV 0x15 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe response TLV 0x16 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; UINT32 mMaxChannelTXRatebps; UINT32 mMaxChannelRXRatebps; }; // Structure to describe response TLV 0x17 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousTXBytes { UINT64 mPreviousCallTXByteTotal; }; // Structure to describe response TLV 0x18 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_PreviousRXBytes { UINT64 mPreviousCallRXByteTotal; }; // Structure to describe response TLV 0x19 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_ActiveDuration { UINT64 mDataSessionActiveDuration; }; // Structure to describe response TLV 0x20 for WDSGetModemInfo() struct sWDSGetModemInfoResponse_LastCallTechnology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x10 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Status { eQMIConnectionStatus mConnectionStatus; }; // Structure to describe indication TLV 0x11 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_CallEndReason { eQMICallEndReasons mCallEnd; }; // Structure to describe indication TLV 0x12 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_TXBytes { UINT64 mTXByteTotal; }; // Structure to describe indication TLV 0x13 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_RXBytes { UINT64 mRXByteTotal; }; // Structure to describe indication TLV 0x14 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_DormancyStatus { eQMIDormancyStatus mDormancyStatus; }; // Structure to describe indication TLV 0x15 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Technology { eQMIDataBearerTechnologies mDataBearerTechnology; }; // Structure to describe indication TLV 0x16 for WDS ModemInfoReport struct sWDSModemInfoReportIndication_Rates { UINT32 mChannelTXRatebps; UINT32 mChannelRXRatebps; }; // Structure to describe response TLV 0x01 for WDSGetActiveMIPProfile() struct sWDSGetActiveMIPProfileResponse_Index { UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSSetActiveMIPProfile() struct sWDSSetActiveMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x01 for WDSGetMIPProfile() struct sWDSGetMIPProfileRequest_Index { UINT8 mProfileIndex; }; // Structure to describe response TLV 0x10 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_State { INT8 mEnabled; }; // Structure to describe response TLV 0x11 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x13 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x14 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe response TLV 0x15 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe response TLV 0x16 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HASPI { UINT32 mHASPI; }; // Structure to describe response TLV 0x17 for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAASPI { UINT32 mAAASPI; }; // Structure to describe response TLV 0x1A for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_HAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe response TLV 0x1B for WDSGetMIPProfile() struct sWDSGetMIPProfileResponse_AAAState { eQMIHAAAAKeyStates mKeyState; }; // Structure to describe request TLV 0x01 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_Index { char mSPC[6]; UINT8 mProfileIndex; }; // Structure to describe request TLV 0x10 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_State { INT8 mEnabled; }; // Structure to describe request TLV 0x11 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HomeAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_PrimaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x13 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_SecondaryHomeAgentAddress { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x14 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_ReverseTunneling { INT8 mReverseTunneling; }; // Structure to describe request TLV 0x15 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_NAI { // String is variable length, but must be size of the container // char mNAI[1]; }; // Structure to describe request TLV 0x16 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_HASPI { UINT32 mHASPI; }; // Structure to describe request TLV 0x17 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequeste_AAASPI { UINT32 mAAASPI; }; // Structure to describe request TLV 0x18 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNHA { // String is variable length, but must be size of the container // char mMNHAKey[1]; }; // Structure to describe request TLV 0x19 for WDSSetMIPProfile() struct sWDSSetMIPProfileRequest_MNAAA { // String is variable length, but must be size of the container // char mMNAAAKey[1]; }; // Structure to describe response TLV 0x10 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe response TLV 0x11 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe response TLV 0x12 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe response TLV 0x13 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe response TLV 0x14 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe response TLV 0x15 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe response TLV 0x16 for WDSGetMIPParameters() struct sWDSGetMIPParametersResponse_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe request TLV 0x01 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x10 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MobileIPMode { eQMIMobileIPModes mMIPMode; }; // Structure to describe request TLV 0x11 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptLimit { UINT8 mRetryAttemptLimit; }; // Structure to describe request TLV 0x12 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_RetryAttemptInterval { UINT8 mRetryAttemptInterval; }; // Structure to describe request TLV 0x13 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationPeriod { UINT8 mReRegistrationPeriod; }; // Structure to describe request TLV 0x14 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_ReRegistrationOnlyWithTraffic { INT8 mReRegistrationOnlyWithTraffic; }; // Structure to describe request TLV 0x15 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHAAuthenticatorCalculator { INT8 mMNHAAuthenticatorCalculator; }; // Structure to describe request TLV 0x16 for WDSSetMIPParameters() struct sWDSSetMIPParametersRequest_MNHARFC2002BISAuthentication { INT8 mMNHARFC2002BISAuthentication; }; // Structure to describe response TLV 0x01 for WDSGetLastMIPStatus() struct sWDSGetLastMIPStatusResponse_Status { UINT8 mLastMIPStatus; }; // Structure to describe response TLV 0x01 for WDSGetANAAAAuthenticationStatus() struct sWDSGetANAAAAuthenticationStatusResponse_Status { INT8 mANAAAAuthenticated; }; // Structure to describe response TLV 0x01 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_Technology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataBearerTechnology() struct sWDSGetCurrentDataBearerTechnologyResponse_LastCallTechnology { eQMIWDSNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; UINT8 mReserved3:7; bool mNullBearer:1; // The following union is for handing both mCDMA1x and mCDMA1xEvDORev(0, A, B) union uValOfCDMA1x_or_CDMA1xEvDORevX { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved4:5; UINT8 mReserved5[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved6:7; UINT8 mReserved7[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved8:4; UINT8 mReserved9[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved10:2; UINT8 mReserved11[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved12[4]; }; uValOfCDMA1x_or_CDMA1xEvDORevX mValOfCDMA1x_or_CDMA1xEvDORevX; }; sNetworkTypeIs1 mNetworkTypeIs1; // If the value of mNetworkType == 2 struct sNetworkTypeIs2 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved13:6; UINT8 mReserved14; UINT8 mReserved15:7; bool mNullBearer:1; }; sNetworkTypeIs2 mNetworkTypeIs2; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // Structure to describe request TLV 0x10 for WDSGetCallList() struct sWDSGetCallListRequest_ListType { eQMICallHistoryTypes mCallListType; }; // Structure to describe response TLV 0x10 for WDSGetCallList() struct sWDSGetCallListResponse_FullList { UINT16 mCallRecords; struct sRecord { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe response TLV 0x11 for WDSGetCallList() struct sWDSGetCallListResponse_IDList { UINT16 mCallRecords; struct sRecord { UINT16 mID; }; // This array must be the size specified by mCallRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordRequest_RecordID { UINT16 mID; }; // Structure to describe response TLV 0x01 for WDSGetCallRecord() struct sWDSGetCallRecordResponse_Record { UINT16 mID; eQMICallTypes mType; eQMIDataBearerTechnologies mDataBearer; UINT64 mTimestamp; UINT8 mIPV4Address[4]; UINT64 mTotalDuration; UINT64 mActiveDuration; UINT64 mRXByteTotal; UINT64 mTXByteTotal; eQMICallEndReasons mCallEnd; UINT8 mPhoneNumberLength; // This array must be the size specified by mPhoneNumberLength // char mPhoneNumber[1]; }; // Structure to describe response TLV 0x01 for WDSGetCallListMaxSize() struct sWDSGetCallListMaxSizeResponse_Maximum { UINT16 mCallListMaxSize; }; // Structure to describe request TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberRequest_ProfileType { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; }; // Structure to describe response TLV 0x01 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ProfileNumber { UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSGetDefaultProfileNumber() struct sWDSGetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; eQMIWDSProfileFamily mProfileFamily; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSSetDefaultProfileNumber() struct sWDSSetDefaultProfileNumberResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfile() struct sWDSResetProfileRequest_ProfileIdentifier { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; }; // Structure to describe response TLV 0xE0 for WDSResetProfile() struct sWDSResetProfileResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidRequest_ProfileParam { eQMIProfileTypes mProfileType; UINT8 mProfileIndex; eQMIWDSProfileParamID mProfileParamID; }; // Structure to describe response TLV 0xE0 for WDSResetProfileParamToInvalid() struct sWDSResetProfileParamToInvalidResponse_ExtendedErrorCode { eQMIWDSExtendedErrorCode mExtendedErrorCode; }; // Structure to describe request TLV 0x01 for WDSSetIPFamilyPreference() struct sWDSSetIPFamilyPreferenceRequest_IPFamilyPreference { eQMIWDSIPFamilies mIPFamily; }; // Structure to describe request TLV 0x01 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe request TLV 0x10 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetFMCTunnelParameters() struct sWDSSetFMCTunnelParametersRequest_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x10 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_Parameters { UINT32 mStreamID; INT8 mNATIsPresent; UINT16 mPortID; }; // Structure to describe response TLV 0x11 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv4Address { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetFMCTunnelParameters() struct sWDSGetFMCTunnelParametersResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x01 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Autoconnect { eQMIWDSAutoconnectSettings mAutoconnectSetting; }; // Structure to describe request TLV 0x10 for WDSSetAutoconnectSetting() struct sWDSSetAutoconnectSettingRequest_Roam { eQMIWDSAutoconnectRoamSettings mAutoconnectRoamSetting; }; // Structure to describe response TLV 0x10 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x11 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe response TLV 0x12 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x13 for WDSGetDNSSetting() struct sWDSGetDNSSettingResponse_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x10 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x11 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryDNS { UINT8 mIPV4Address[4]; }; // Structure to describe request TLV 0x12 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_PrimaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x13 for WDSSetDNSSetting() struct sWDSSetDNSSettingRequest_SecondaryIPv6DNS { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x01 for WDSGetCDMAPreDormancySettings() struct sWDSGetCDMAPreDormancySettingsResponse_Settings { eQMIWDSCDMAServiceOptions mServiceOption; eQMIWDSCDMANetworks mDataSessionNetwork; }; // Structure to describe request TLV 0x01 for WDSSetCAMTimer() struct sWDSSetCAMTimerRequest_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe response TLV 0x01 for WDSGetCAMTimer() struct sWDSGetCAMTimerResponse_Timer { UINT32 mCAMTimerSeconds; }; // Structure to describe request TLV 0x01 for WDSSetSCRM() struct sWDSSetSCRMRequest_SCRM { INT8 mSCRMEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSCRM() struct sWDSGetSCRMResponse_SCRM { INT8 mSCRMEnabled; }; // Structure to describe request TLV 0x01 for WDSSetRDUD() struct sWDSSetRDUDRequest_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetRDUD() struct sWDSGetRDUDResponse_RDUD { INT8 mRDUDEnabled; }; // Structure to describe response TLV 0x01 for WDSGetSIPMIPCallType() struct sWDSGetSIPMIPCallTypeResponse_CallType { eQMIWDSSIPMIPCallTypes mCallType; }; // Structure to describe request TLV 0x01 for WDSSetEVDOPageMonitorPeriod() struct sWDSSetEVDOPageMonitorPeriodRequest_Period { UINT8 mPageMonitorPeriod; }; // Structure to describe indication TLV 0x01 for WDS EVDOPageMonitorPeriodIndication struct sWDSEVDOPageMonitorPeriodIndication_Result { eQMIWDSSlotCycleSetResults mSlotCycleSetResult; }; // Structure to describe request TLV 0x01 for WDSSetEVDOLongSleep() struct sWDSSetEVDOLongSleepRequest_Setting { INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetEVDOPageMonitorPeriod() struct sWDSGetEVDOPageMonitorPeriodResponse_Details { UINT8 mPageMonitorPeriod; INT8 mForceLongSleep; }; // Structure to describe response TLV 0x01 for WDSGetCallThrottleInfo() struct sWDSGetCallThrottleInfoResponse_Details { UINT32 mEVDOThrottledDelaySeconds; UINT32 mCDMAThrottledDelaySeconds; }; // Structure to describe request TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIRequest_APN { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x01 for WDSGetNSAPI() struct sWDSGetNSAPIResponse_NSAPI { UINT8 mNSAPICount; // This array must be the size specified by mNSAPICount // UINT8 mNSAPI[1]; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_Preference { eQMIWDSDUNControlPreferences mDUNControl; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlPreference() struct sWDSSetDUNCallControlPreferenceRequest_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x01 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_Status { INT8 mDUNControlEnabled; }; // Structure to describe response TLV 0x10 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_AllowDUN { INT8 mAllowDUNCalls; }; // Structure to describe response TLV 0x11 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_CurrentClient { INT8 mSetByCurrentClient; }; // Structure to describe response TLV 0x12 for WDSGetDUNCallControlInfo() struct sWDSGetDUNCallControlInfoResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe request TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_CallNotifications { INT8 mEnableDUNCallNotifications; }; // Structure to describe request TLV 0x10 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_EntitlementNotifications { INT8 mEnableEntitlementNotifications; }; // Structure to describe request TLV 0x11 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportRequest_RedialNotifications { INT8 mEnableSilentRedailNotifications; }; // Structure to describe response TLV 0x01 for WDSSetDUNCallControlEventReport() struct sWDSSetDUNCallControlEventReportResponse_ReportMask { bool mSendDUNCallNotifications:1; bool mSendEntitlementNotifications:1; bool mSendSilentRedailNotifications:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x01 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_Event { eQMIWDSDUNControlEvents mDUNControlEvent; }; // Structure to describe indication TLV 0x10 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallNotification { INT8 mDUNCallAllowed; }; // Structure to describe indication TLV 0x11 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_CallID { UINT8 mDUNCallID; }; // Structure to describe indication TLV 0x12 for WDS DUNCallControlEventReport struct sWDSDUNCallControlEventReportIndication_PreviousFailureReason { eQMIWDSCallEndReasonTypes mCallEndReasonType; // The following union is based on the value of mCallEndReasonType union uValOfCallEndReasonType { // Always present UINT16 mCallEndReasonValue; // If the value of mCallEndReasonType == 1 struct sCallEndReasonTypeIs1 { eQMIWDSMobileIPCallEndReasons mMobileIPCallEndReason; }; sCallEndReasonTypeIs1 mCallEndReasonTypeIs1; // If the value of mCallEndReasonType == 2 struct sCallEndReasonTypeIs2 { eQMIWDSInternalCallEndReasons mInternalCallEndReason; }; sCallEndReasonTypeIs2 mCallEndReasonTypeIs2; // If the value of mCallEndReasonType == 3 struct sCallEndReasonTypeIs3 { eQMIWDSCallManagerCallEndReasons mCallManagerCallEndReason; }; sCallEndReasonTypeIs3 mCallEndReasonTypeIs3; // If the value of mCallEndReasonType == 6 struct sCallEndReasonTypeIs6 { eQMIWDS3GPPCallEndReasons m3GPPCallEndReason; }; sCallEndReasonTypeIs6 mCallEndReasonTypeIs6; // If the value of mCallEndReasonType == 7 struct sCallEndReasonTypeIs7 { eQMIWDSPPPCallEndReason mPPPCallEndReason; }; sCallEndReasonTypeIs7 mCallEndReasonTypeIs7; // If the value of mCallEndReasonType == 8 struct sCallEndReasonTypeIs8 { eQMIWDSEHRPDCallEndReason mEHRPDCallEndReason; }; sCallEndReasonTypeIs8 mCallEndReasonTypeIs8; // If the value of mCallEndReasonType == 9 struct sCallEndReasonTypeIs9 { eQMIWDSIPv6CallEndReason mIPv6CallEndReason; }; sCallEndReasonTypeIs9 mCallEndReasonTypeIs9; // Padding out 16 bits UINT8 mReserved1[2]; }; uValOfCallEndReasonType mValOfCallEndReasonType; }; // Structure to describe request TLV 0x01 for WDSPendingDUNCallControl() struct sWDSPendingDUNCallControlRequest_Action { INT8 mDUNCallAllowed; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x11 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_PreemptPriority { UINT32 mPreemptPriority; }; // Structure to describe request TLV 0x12 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateRequest_EARFCNList { UINT8 mEARFCNCount; // This array must be the size specified by mEARFCNCount // UINT16 mEARFCN[1]; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIActivate() struct sWDSEMBMSTMGIActivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIActivateIndication struct sWDSEMBMSTMGIActivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIActivateIndication struct sWDSEMBMSTMGIActivateIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateRequest_TMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIDeactivate() struct sWDSEMBMSTMGIDeactivateResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGIDectivateIndication struct sWDSEMBMSTMGIDectivateIndication_Status { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIDectivateIndication struct sWDSEMBMSTMGIDectivateIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryRequest_Type { eQMIWDSEMBMSListTypes mTMGIListType; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe response TLV 0x11 for WDSEMBMSTMGIListQuery() struct sWDSEMBMSTMGIListQueryResponse_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_List { eQMIWDSEMBMSListTypes mTMGIListType; UINT8 mTMGIListCount; struct sEntry { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // This array must be the size specified by mTMGIListCount // sEntry mEntrys[1]; }; // Structure to describe indication TLV 0x11 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_OOS { eQMIWDSOOSWarningReasons mOOSWarningReason; }; // Structure to describe indication TLV 0x12 for WDS EMBMSTMGIListIndication struct sWDSEMBMSTMGIListIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe response TLV 0x10 for WDSGetPreferredDataSystem() struct sWDSGetPreferredDataSystemResponse_PreferredDataSystem { eQMIWDSDataSystems mPreferredDataSystem; }; // Structure to describe response TLV 0x10 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallStatus { eQMIWDSDataCallStatus mDataCallStatus; }; // Structure to describe response TLV 0x11 for WDSGetLastDataCallStatus() struct sWDSGetLastDataCallStatusResponse_DataCallType { eQMIWDSDataCallTypes mDataCallType; eQMIWDSTetheredCallTypes mTetheredCallType; }; // Structure to describe response TLV 0x10 for WDSGetCurrentDataSystems() struct sWDSGetCurrentDataSystemsResponse_Systems { eQMIWDSDataSystemNetworkTypes mPreferredNetworkType; UINT8 mNetworkCount; struct sNetwork { eQMIWDSDataSystemNetworkTypes mNetworkType; // The following union is based on the value of mNetworkType union uValOfNetworkType { // If the value of mNetworkType == 0 struct sNetworkTypeIs0 { bool mWCDMA:1; bool mGPRS:1; bool mHSDPA:1; bool mHSUPA:1; bool mEDGE:1; bool mLTE:1; bool mHSDPAPlus:1; bool mDualCellHSDPAPlus:1; bool m64QAM:1; bool mTDSCDMA:1; // Padding out 21 bits UINT8 mReserved1:6; UINT8 mReserved2; UINT8 mReserved3:7; bool mNULLBearer:1; }; sNetworkTypeIs0 mNetworkTypeIs0; // If the value of mNetworkType == 1 struct sNetworkTypeIs1 { bool mCDMA1x:1; bool mCDMA1xEvDORev0:1; bool mCDMA1xEvDORevA:1; bool mCDMA1xEvDORevB:1; bool mCDMAEHRPD:1; bool mCDMAFMC:1; // Padding out 25 bits UINT8 mReserved4:2; UINT8 mReserved5[2]; UINT8 mReserved6:7; bool mNULLBearer:1; // The following union is for handing all mCDMA1x types union uValOfCDMA1xTypes { // If the value of mCDMA1x == 1 struct sCDMA1xIs1 { bool mCDMA1xIS95:1; bool mCDMA1xIS2000:1; bool mCDMA1xIS2000RelA:1; // Padding out 29 bits UINT8 mReserved7:5; UINT8 mReserved8[3]; }; sCDMA1xIs1 mCDMA1xIs1; // If the value of mCDMA1xEvDORev0 == 1 struct sCDMA1xEvDORev0Is1 { bool mCDMA1xEvDORev0DPA:1; // Padding out 31 bits UINT8 mReserved9:7; UINT8 mReserved10[3]; }; sCDMA1xEvDORev0Is1 mCDMA1xEvDORev0Is1; // If the value of mCDMA1xEvDORevA == 1 struct sCDMA1xEvDORevAIs1 { bool mCDMA1xEvDORevADPA:1; bool mCDMA1xEvDORevAMFPA:1; bool mCDMA1xEvDORevAEMPA:1; bool mCDMA1xEvDORevAEMPAEHRPD:1; // Padding out 28 bits UINT8 mReserved11:4; UINT8 mReserved12[3]; }; sCDMA1xEvDORevAIs1 mCDMA1xEvDORevAIs1; // If the value of mCDMA1xEvDORevB == 1 struct sCDMA1xEvDORevBIs1 { bool mCDMA1xEvDORevBDPA:1; bool mCDMA1xEvDORevBMFPA:1; bool mCDMA1xEvDORevBEMPA:1; bool mCDMA1xEvDORevBEMPAEHRPD:1; bool mCDMA1xEvDORevBMMPA:1; bool mCDMA1xEvDORevBMMPAEHRPD:1; // Padding out 26 bits UINT8 mReserved13:2; UINT8 mReserved14[3]; }; sCDMA1xEvDORevBIs1 mCDMA1xEvDORevBIs1; // Padding out 32 bits UINT8 mReserved15[4]; }; uValOfCDMA1xTypes mValOfCDMA1xTypes; }; sNetworkTypeIs1 mNetworkTypeIs1; // Padding out 64 bits UINT8 mReserved16[8]; }; uValOfNetworkType mValOfNetworkType; }; // This array must be the size specified by mNetworkCount // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoRequest_Type { eQMIWDSDataSystemNetworkTypes mTechnologyType; }; // Structure to describe response TLV 0x10 for WDSGetPDNThrottleInfo() struct sWDSGetPDNThrottleInfoResponse_Info { UINT8 mThrottleInfoCount; struct sInfo { INT8 mIPv4Throttled; INT8 mIPv6Throttled; UINT32 mIPv4ThrottleTimeLeftInMilliseconds; UINT32 mIPv6ThrottleTimeLeftInMilliseconds; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // This array must be the size specified by mThrottleInfoCount // sInfo mInfos[1]; }; // Structure to describe response TLV 0x10 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_APNString { // String is variable length, but must be size of the container // char mAPNName[1]; }; // Structure to describe response TLV 0x11 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_IPSupport { eQMIWDSLTEIPTypes mIPType; }; // Structure to describe response TLV 0x12 for WDSGetLTEAttachParameters() struct sWDSGetLTEAttachParametersResponse_OTAAttach { INT8 mOTAAttachPerformed; }; // Structure to describe response TLV 0x10 for WDSGetFlowControlStatus() struct sWDSGetFlowControlStatusResponse_UplinkFlowControl { INT8 mUplinkFlowControlEnabled; }; // Structure to describe request TLV 0x01 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_TMGIToActivate { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x11 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_PreemptPriority { UINT32 mPreemptPriority; }; // Structure to describe request TLV 0x12 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchRequest_EARFCNList { UINT8 mEARFCNCount; // This array must be the size specified by mEARFCNCount // UINT16 mEARFCN[1]; }; // Structure to describe response TLV 0x10 for WDSEMBMSTMGISwitch() struct sWDSEMBMSTMGISwitchResponse_ExtendedError { eQMIWDSEMBMSErrorCodes mExtendedEMBMSErrorCode; }; // Structure to describe indication TLV 0x01 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_ActivationStatus { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x03 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_DeactivationStatus { eQMIWDSEMBMSOperationStatus mTMGIOperationStatus; }; // Structure to describe indication TLV 0x04 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_DeactivationTMGI { UINT8 mTMGI[6]; INT8 mSessionIDValid; UINT8 mSessionID; }; // Structure to describe indication TLV 0x10 for WDS EMBMSTMGISwitchIndication struct sWDSEMBMSTMGISwitchIndication_TransactionID { INT16 mTransactionID; }; // Structure to describe request TLV 0x10 for DMSSetEventReport() struct sDMSSetEventReportRequest_PowerState { INT8 mReportPowerState; }; // Structure to describe request TLV 0x11 for DMSSetEventReport() struct sDMSSetEventReportRequest_BatteryLevel { UINT8 mBatteryLevelLowerLimit; UINT8 mBatteryLevelUpperLimit; }; // Structure to describe request TLV 0x12 for DMSSetEventReport() struct sDMSSetEventReportRequest_PINStatus { INT8 mReportPINStatus; }; // Structure to describe request TLV 0x13 for DMSSetEventReport() struct sDMSSetEventReportRequest_ActivationState { INT8 mReportActivationState; }; // Structure to describe request TLV 0x14 for DMSSetEventReport() struct sDMSSetEventReportRequest_OperatingMode { INT8 mReportOperatingMode; }; // Structure to describe request TLV 0x15 for DMSSetEventReport() struct sDMSSetEventReportRequest_UIMState { INT8 mReportUIMState; }; // Structure to describe request TLV 0x16 for DMSSetEventReport() struct sDMSSetEventReportRequest_WirelessDisableState { INT8 mReportWirelessDisableState; }; // Structure to describe request TLV 0x17 for DMSSetEventReport() struct sDMSSetEventReportRequest_PRLInit { INT8 mReportPRLInitialization; }; // Structure to describe indication TLV 0x10 for DMS EventReport struct sDMSEventReportIndication_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe indication TLV 0x11 for DMS EventReport struct sDMSEventReportIndication_PIN1State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x12 for DMS EventReport struct sDMSEventReportIndication_PIN2State { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x13 for DMS EventReport struct sDMSEventReportIndication_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe indication TLV 0x14 for DMS EventReport struct sDMSEventReportIndication_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x15 for DMS EventReport struct sDMSEventReportIndication_UIMState { eQMIDMSUIMStates mUIMState; }; // Structure to describe indication TLV 0x16 for DMS EventReport struct sDMSEventReportIndication_WirelessDisableState { INT8 mWirelessDisableOn; }; // Structure to describe indication TLV 0x17 for DMS EventReport struct sDMSEventReportIndication_PRLInit { INT8 mPRLLoaded; }; // Structure to describe response TLV 0x01 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_Capabilities { UINT32 mMaxTXRatebps; UINT32 mMaxRXRatebps; eQMIDMSDataServiceCapabilities1 mDataServiceCapability; INT8 mSIMSupported; UINT8 mRadioInterfaceCount; // This array must be the size specified by mRadioInterfaceCount // eQMIDMSRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_ServiceCapability { eQMIDMSServiceCapabilities mServiceCapability; }; // Structure to describe response TLV 0x11 for DMSGetDeviceCapabilities() struct sDMSGetDeviceCapabilitiesResponse_VoiceCapability { bool mGWCSFBCapable:1; bool m1xCSFBCapable:1; bool mVoLTECapable:1; // Padding out 61 bits UINT8 mReserved1:5; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceManfacturer() struct sDMSGetDeviceManfacturerResponse_Manfacturer { // String is variable length, but must be size of the container // char mDeviceManfacturer[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceModel() struct sDMSGetDeviceModelResponse_Model { // String is variable length, but must be size of the container // char mDeviceModelID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_Revision { // String is variable length, but must be size of the container // char mDeviceRevisionID[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_BootCodeRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceRevision() struct sDMSGetDeviceRevisionResponse_UQCNRevision { // String is variable length, but must be size of the container // char mBootCodeRevisionID[1]; }; // Structure to describe response TLV 0x01 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_VoiceNumber { // String is variable length, but must be size of the container // char mDeviceVoiceNumber[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_MobileIDNumber { // String is variable length, but must be size of the container // char mDeviceMobileIDNumber[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceVoiceNumber() struct sDMSGetDeviceVoiceNumberResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x10 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_ESN { // String is variable length, but must be size of the container // char mESN[1]; }; // Structure to describe response TLV 0x11 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_IMEI { // String is variable length, but must be size of the container // char mIMEI[1]; }; // Structure to describe response TLV 0x12 for DMSGetDeviceSerialNumbers() struct sDMSGetDeviceSerialNumbersResponse_MEID { // String is variable length, but must be size of the container // char mMEID[1]; }; // Structure to describe response TLV 0x01 for DMSGetPowerState() struct sDMSGetPowerStateResponse_PowerState { eQMIDMSPowerSources mPowerSource:1; bool mBatteryConnected:1; bool mBatteryCharging:1; bool mPowerFault:1; // Padding out 4 bits UINT8 mReserved1:4; UINT8 mBatteryLevel; }; // Structure to describe request TLV 0x01 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionRequest_Info { UINT8 mPINID; UINT8 mPINEnabled; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetPINProtection() struct sDMSUIMSetPINProtectionResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINRequest_Info { UINT8 mPINID; UINT8 mPINLength; // This array must be the size specified by mPINLength // char mPINValue[1]; }; // Structure to describe response TLV 0x10 for DMSUIMVerifyPIN() struct sDMSUIMVerifyPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINRequest_Info1 { UINT8 mPINID; UINT8 mPUKLength; // This array must be the size specified by mPUKLength // char mPUKValue[1]; }; struct sDMSUIMUnblockPINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMUnblockPINRequest_Info { sDMSUIMUnblockPINRequest_Info1 mDMSUIMUnblockPINRequest_Info1; sDMSUIMUnblockPINRequest_Info2 mDMSUIMUnblockPINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockPIN() struct sDMSUIMUnblockPINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for DMSUIMChangePIN() struct sDMSUIMChangePINRequest_Info1 { UINT8 mPINID; UINT8 mOldPINLength; // This array must be the size specified by mOldPINLength // char mOldPINValue[1]; }; struct sDMSUIMChangePINRequest_Info2 { UINT8 mNewPINLength; // This array must be the size specified by mNewPINLength // char mNewPINValue[1]; }; struct sDMSUIMChangePINRequest_Info { sDMSUIMChangePINRequest_Info1 mDMSUIMChangePINRequest_Info1; sDMSUIMChangePINRequest_Info2 mDMSUIMChangePINRequest_Info2; }; // Structure to describe response TLV 0x10 for DMSUIMChangePIN() struct sDMSUIMChangePINResponse_RetryInfo { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN1Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x12 for DMSUIMGetPINStatus() struct sDMSUIMGetPINStatusResponse_PIN2Status { eQMIDMSPINStatus mPINStatus; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetHardwareRevision() struct sDMSGetHardwareRevisionResponse_HardwareRevision { // String is variable length, but must be size of the container // char mDeviceHardwareRevision[1]; }; // Structure to describe response TLV 0x01 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x10 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_OfflineReason { UINT8 mHostImageMismatch:1; UINT8 mUQCNImageMismatch:1; UINT8 mIncompatibleUQCN:1; UINT8 mUQCNCopyIssue:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for DMSGetOperatingMode() struct sDMSGetOperatingModeResponse_PlatformRestricted { INT8 mPlatformRestricted; }; // Structure to describe request TLV 0x01 for DMSSetOperatingMode() struct sDMSSetOperatingModeRequest_OperatingMode { eQMIDMSOperatingModes mOperatingMode; }; // Structure to describe response TLV 0x01 for DMSGetTimestamp() struct sDMSGetTimestampResponse_Timestamp { UINT64 mTimestamp:48; // mSource is of type eQMIDMSTimestampSources UINT64 mSource:16; }; // Structure to describe response TLV 0x01 for DMSGetPRLVersion() struct sDMSGetPRLVersionResponse_PRLVersion { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x01 for DMSGetActivationState() struct sDMSGetActivationStateResponse_ActivationState { eQMIDMSActivationStates mActivationState; }; // Structure to describe request TLV 0x01 for DMSActivateAutomatic() struct sDMSActivateAutomaticRequest_ActivationCode { UINT8 mCodeLength; // This array must be the size specified by mCodeLength // char mCode[1]; }; // Structure to describe request TLV 0x01 for DMSActivateManual() struct sDMSActivateManualRequest_ActivationData1 { char mSPC[6]; UINT16 mSID; UINT8 mMDNLength; // This array must be the size specified by mMDNLength // char mMDN[1]; }; struct sDMSActivateManualRequest_ActivationData2 { UINT8 mMINLength; // This array must be the size specified by mMINLength // char mMIN[1]; }; struct sDMSActivateManualRequest_ActivationData { sDMSActivateManualRequest_ActivationData1 mDMSActivateManualRequest_ActivationData1; sDMSActivateManualRequest_ActivationData2 mDMSActivateManualRequest_ActivationData2; }; // Structure to describe request TLV 0x10 for DMSActivateManual() struct sDMSActivateManualRequest_PRLObsolete { UINT16 mPRLLength; // This array must be the size specified by mPRLLength // UINT8 mPRL[1]; }; // Structure to describe request TLV 0x11 for DMSActivateManual() struct sDMSActivateManualRequest_MNHAKey { UINT8 mMNHALength; // This array must be the size specified by mMNHALength // char mMNHA[1]; }; // Structure to describe request TLV 0x12 for DMSActivateManual() struct sDMSActivateManualRequest_MNAAAKey { UINT8 mMNAAALength; // This array must be the size specified by mMNAAALength // char mMNAAA[1]; }; // Structure to describe request TLV 0x13 for DMSActivateManual() struct sDMSActivateManualRequest_PRL { UINT16 mPRLTotalLength; UINT16 mPRLSegmentLength; UINT8 mPRLSegmentID; // This array must be the size specified by mPRLSegmentLength // UINT8 mPRL[1]; }; // Structure to describe response TLV 0x01 for DMSGetLockState() struct sDMSGetLockStateResponse_LockState { eQMIDMSLockStates mLockState; }; // Structure to describe request TLV 0x01 for DMSSetLockState() struct sDMSSetLockStateRequest_LockState { eQMIDMSLockStates mLockState; char mLockCode[4]; }; // Structure to describe request TLV 0x01 for DMSSetLockCode() struct sDMSSetLockCodeRequest_LockCode { char mCurrentLockCode[4]; char mNewLockCode[4]; }; // Structure to describe response TLV 0x01 for DMSReadUserData() struct sDMSReadUserDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSWriteUserData() struct sDMSWriteUserDataRequest_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x01 for DMSReadERIData() struct sDMSReadERIDataResponse_UserData { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for DMSResetFactoryDefaults() struct sDMSResetFactoryDefaultsRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x01 for DMSValidateSPC() struct sDMSValidateSPCRequest_SPC { char mSPC[6]; }; // Structure to describe response TLV 0x01 for DMSUIMGetICCID() struct sDMSUIMGetICCIDResponse_ICCID { // String is variable length, but must be size of the container // char mICCID[1]; }; // Structure to describe response TLV 0x01 for DMSUIMGetHostLockID() struct sDMSUIMGetHostLockIDResponse_ID { UINT32 mHostLockCode; }; // Structure to describe request TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusRequest_Facility { eQMIDMSUIMFacility mFacility; }; // Structure to describe response TLV 0x01 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Status { eQMIDMSUIMFacilityStates mFacilityState; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x10 for DMSUIMGetControlKeyStatus() struct sDMSUIMGetControlKeyStatusResponse_Blocking { INT8 mOperationBlocking; }; // Structure to describe request TLV 0x01 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionRequest_Facility { eQMIDMSUIMFacility mFacility; eQMIDMSUIMFacilityStates mFacilityState; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMSetControlKeyProtection() struct sDMSUIMSetControlKeyProtectionResponse_Status { UINT8 mRemainingVerifyRetries; }; // Structure to describe request TLV 0x01 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyRequest_Facility { eQMIDMSUIMFacility mFacility; UINT8 mControlKeyLength; // This array must be the size specified by mControlKeyLength // char mControlKey[1]; }; // Structure to describe response TLV 0x10 for DMSUIMUnblockControlKey() struct sDMSUIMUnblockControlKeyResponse_Status { UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x01 for DMSGetIMSI() struct sDMSGetIMSIResponse_IMSI { // String is variable length, but must be size of the container // char mIMSI[1]; }; // Structure to describe response TLV 0x01 for DMSGetUIMState() struct sDMSGetUIMStateResponse_State { eQMIDMSUIMStates mUIMState; }; // Structure to describe response TLV 0x01 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_Bands { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x10 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_LTEBands { bool mEUTRANBand1:1; bool mEUTRANBand2:1; bool mEUTRANBand3:1; bool mEUTRANBand4:1; bool mEUTRANBand5:1; bool mEUTRANBand6:1; bool mEUTRANBand7:1; bool mEUTRANBand8:1; bool mEUTRANBand9:1; bool mEUTRANBand10:1; bool mEUTRANBand11:1; bool mEUTRANBand12:1; bool mEUTRANBand13:1; bool mEUTRANBand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRANBand17:1; bool mEUTRANBand18:1; bool mEUTRANBand19:1; bool mEUTRANBand20:1; bool mEUTRANBand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRANBand24:1; bool mEUTRANBand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRANBand33:1; bool mEUTRANBand34:1; bool mEUTRANBand35:1; bool mEUTRANBand36:1; bool mEUTRANBand37:1; bool mEUTRANBand38:1; bool mEUTRANBand39:1; bool mEUTRANBand40:1; bool mEUTRANBand41:1; // Padding out 23 bits UINT8 mReserved4:7; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x11 for DMSGetBandCapabilities() struct sDMSGetBandCapabilitiesResponse_TDSBands { bool mTDSBandA:1; bool mTDSBandB:1; bool mTDSBandC:1; bool mTDSBandD:1; bool mTDSBandE:1; bool mTDSBandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x01 for DMSGetFactorySerialNumber() struct sDMSGetFactorySerialNumberResponse_ID { // String is variable length, but must be size of the container // char mFactorySerialNumber[1]; }; // Structure to describe request TLV 0x01 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Time { UINT64 mTimeInMilliseconds; }; // Structure to describe request TLV 0x10 for DMSSetDeviceTime() struct sDMSSetDeviceTimeRequest_Type { eQMIDMSTimeReferences mTimeReference; }; // Structure to describe response TLV 0x01 for DMSGetSoftwareVersion() struct sDMSGetSoftwareVersionResponse_Version { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe request TLV 0x01 for DMSSetSPC() struct sDMSSetSPCRequest_CurrentSPC { char mCurrentSPC[6]; }; // Structure to describe response TLV 0x10 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Version { UINT16 mPRLVersion; }; // Structure to describe response TLV 0x11 for DMSGetCurrentPRLInfo() struct sDMSGetCurrentPRLInfoResponse_Preference { INT8 mPRLOnlyPreferenceSet; }; // Structure to describe request TLV 0x01 for NASAbort() struct sNASAbortRequest_TransactionID { UINT16 mTransactionID; }; // Structure to describe request TLV 0x10 for NASSetEventReport() struct sNASSetEventReportRequest_SignalIndicator { INT8 mReportSignalStrength; UINT8 mNumberOfThresholds; // This array must be the size specified by mNumberOfThresholds // INT8 mSignalStrengthThresholddBm[1]; }; // Structure to describe request TLV 0x11 for NASSetEventReport() struct sNASSetEventReportRequest_RFIndicator { INT8 mReportRFInfo; }; // Structure to describe request TLV 0x12 for NASSetEventReport() struct sNASSetEventReportRequest_RegistrationRejectIndicator { INT8 mReportLUReject; }; // Structure to describe request TLV 0x13 for NASSetEventReport() struct sNASSetEventReportRequest_RSSIIndicator { INT8 mReportRSSI; UINT8 mRSSIDelta; }; // Structure to describe request TLV 0x14 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOIndicator { INT8 mReportECIO; UINT8 mECIODelta; }; // Structure to describe request TLV 0x15 for NASSetEventReport() struct sNASSetEventReportRequest_IOIndicator { INT8 mReportIO; UINT8 mIODelta; }; // Structure to describe request TLV 0x16 for NASSetEventReport() struct sNASSetEventReportRequest_SINRIndicator { INT8 mReportSINR; UINT8 mSINRDelta; }; // Structure to describe request TLV 0x17 for NASSetEventReport() struct sNASSetEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x18 for NASSetEventReport() struct sNASSetEventReportRequest_RSRQIndicator { INT8 mReportRSRQ; UINT8 mRSRQDelta; }; // Structure to describe request TLV 0x19 for NASSetEventReport() struct sNASSetEventReportRequest_ECIOThreshold { INT8 mReportECIO; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1A for NASSetEventReport() struct sNASSetEventReportRequest_SINRThreshold { INT8 mReportSINR; UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x1B for NASSetEventReport() struct sNASSetEventReportRequest_LTESNRDelta { INT8 mReportLTESNR; UINT16 mLTESNRDelta; }; // Structure to describe request TLV 0x1C for NASSetEventReport() struct sNASSetEventReportRequest_LTERSPSDelta { INT8 mReportLTERSRP; UINT8 mLTERSRPDelta; }; // Structure to describe indication TLV 0x10 for NAS EventReport struct sNASEventReportIndication_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x11 for NAS EventReport struct sNASEventReportIndication_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for NAS EventReport struct sNASEventReportIndication_RegistrationReject { eQMINASServiceDomains mServiceDomain; UINT16 mRejectCause; }; // Structure to describe indication TLV 0x13 for NAS EventReport struct sNASEventReportIndication_RSSI { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x14 for NAS EventReport struct sNASEventReportIndication_ECIO { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x15 for NAS EventReport struct sNASEventReportIndication_IO { UINT32 mIO; }; // Structure to describe indication TLV 0x16 for NAS EventReport struct sNASEventReportIndication_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe indication TLV 0x17 for NAS EventReport struct sNASEventReportIndication_ErrorRate { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x18 for NAS EventReport struct sNASEventReportIndication_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x19 for NAS EventReport struct sNASEventReportIndication_LTESNR { INT16 mLTESNR; }; // Structure to describe indication TLV 0x1A for NAS EventReport struct sNASEventReportIndication_LTERSRP { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemSelectIndicator { INT8 mReportSystemSelect; }; // Structure to describe request TLV 0x12 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DDTMIndicator { INT8 mReportDDTM; }; // Structure to describe request TLV 0x13 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ServingSystemIndicator { INT8 mReportServingSystem; }; // Structure to describe request TLV 0x14 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_DualStandbyIndicator { INT8 mReportDualStandby; }; // Structure to describe request TLV 0x15 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SubscriptionInformationIndicator { INT8 mReportSubscriptionInformation; }; // Structure to describe request TLV 0x17 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkTimeIndicator { INT8 mReportNetworkTime; }; // Structure to describe request TLV 0x18 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SystemInformationIndicator { INT8 mReportSystemInformation; }; // Structure to describe request TLV 0x19 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_SignalStrengthIndicator { INT8 mReportSignalStrength; }; // Structure to describe request TLV 0x1A for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ErrorRateIndicator { INT8 mReportErrorRate; }; // Structure to describe request TLV 0x1B for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NewEVDOUATIIndicator { INT8 mReportNewEVDOUATI; }; // Structure to describe request TLV 0x1C for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EVDOSessionIndicator { INT8 mReportEVDOSessionClose; }; // Structure to describe request TLV 0x1D for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_ManagedRoamingIndicator { INT8 mReportManagedRoaming; }; // Structure to describe request TLV 0x1E for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CurrentPLMNName { INT8 mReportCurrentPLMNName; }; // Structure to describe request TLV 0x1F for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_EMBMSStatus { INT8 mReportEMBMSStatus; }; // Structure to describe request TLV 0x20 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RFBandInfo { INT8 mReportRFBandInfo; }; // Structure to describe request TLV 0x21 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_NetworkReject { INT8 mNetworkRejectEnabled; INT8 mSupressSytemInfoEnabled; }; // Structure to describe request TLV 0x22 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_OperatorNameData { INT8 mOperatorNameDataEnabled; }; // Structure to describe request TLV 0x23 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_CSPPLMNModeBit { INT8 mCSPPLMNModeBitEnabled; }; // Structure to describe request TLV 0x24 for NASSetRegistrationEventReport() struct sNASSetRegistrationEventReportRequest_RTREConfiguration { INT8 mRTREConfigurationEnabled; }; // Structure to describe request TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthRequest_RequestMask { bool mQueryRSSI:1; bool mQueryECIO:1; bool mQueryIO:1; bool mQuerySINR:1; bool mQueryErrorRate:1; bool mQueryRSRQ:1; bool mQueryLTESNR:1; bool mQueryLTERSRQ:1; // Padding out 8 bits UINT8 mReserved1; }; // Structure to describe response TLV 0x01 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrength { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SignalStrengthList { UINT16 mNumberOfInfoInstances; struct sInfo { INT8 mSignalStrengthdBm; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x11 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSSIList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mRSSIDelta; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x12 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ECIOList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT8 mECIO; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x13 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_IO { UINT32 mIO; }; // Structure to describe response TLV 0x14 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_SINR { eQMINASSINRLevels mSINR; }; // Structure to describe response TLV 0x15 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_ErrorRateList { UINT16 mNumberOfMeasurements; struct sMeasurement { UINT16 mErrorRate; eQMINASRadioInterfaces mRadioInterface; }; // This array must be the size specified by mNumberOfMeasurements // sMeasurement mMeasurements[1]; }; // Structure to describe response TLV 0x16 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_RSRQ { INT8 mRSRQ; eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x17 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTESNR { INT16 mLTESNR; }; // Structure to describe response TLV 0x18 for NASGetSignalStrength() struct sNASGetSignalStrengthResponse_LTERSRQ { INT16 mLTERSRP; }; // Structure to describe request TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanRequest_NetworkMask { bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x10 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkInfo { UINT16 mNumberOfInfoInstances; struct sNetworkInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASInUseStates mInUseStatus:2; eQMINASRoamingStates mRoamingStatus:2; eQMINASForbiddenStates mForbiddenStatus:2; eQMINASPreferredStates mPreferredStatus:2; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // This array must be the size specified by mNumberOfInfoInstances // sNetworkInfo mNetworkInfos[1]; }; // Structure to describe response TLV 0x11 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkRAT { UINT16 mNumberOfInfoInstances; struct sInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // This array must be the size specified by mNumberOfInfoInstances // sInfo mInfos[1]; }; // Structure to describe response TLV 0x12 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_PCSInfo { UINT16 mPCSInfoCount; struct sPCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // This array must be the size specified by mPCSInfoCount // sPCSInfo mPCSInfos[1]; }; // Structure to describe response TLV 0x13 for NASPerformNetworkScan() struct sNASPerformNetworkScanResponse_NetworkScanResult { eQMINASNetworkScanResult mNetworkScanResult; }; // Structure to describe request TLV 0x01 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_Action { eQMINASRegisterActions mRegisterAction; }; // Structure to describe request TLV 0x10 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ManualInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASRadioAccessTechnologies mRadioAccessTechnology; }; // Structure to describe request TLV 0x11 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x12 for NASInitiateNetworkRegister() struct sNASInitiateNetworkRegisterRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASInitiateAttach() struct sNASInitiateAttachRequest_Action { eQMINASPSAttachActions mPSAttachAction; }; // Structure to describe response TLV 0x01 for NASGetServingSystem() struct sNASGetServingSystemResponse_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x10 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x11 for NASGetServingSystem() struct sNASGetServingSystemResponse_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe response TLV 0x12 for NASGetServingSystem() struct sNASGetServingSystemResponse_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x13 for NASGetServingSystem() struct sNASGetServingSystemResponse_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x14 for NASGetServingSystem() struct sNASGetServingSystemResponse_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x15 for NASGetServingSystem() struct sNASGetServingSystemResponse_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for NASGetServingSystem() struct sNASGetServingSystemResponse_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe response TLV 0x17 for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe response TLV 0x18 for NASGetServingSystem() struct sNASGetServingSystemResponse_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe response TLV 0x1A for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe response TLV 0x1B for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPDaylightSavingsAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe response TLV 0x1C for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe response TLV 0x1D for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPPCellID { UINT32 mCellID; }; // Structure to describe response TLV 0x1E for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe response TLV 0x1F for NASGetServingSystem() struct sNASGetServingSystemResponse_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe response TLV 0x20 for NASGetServingSystem() struct sNASGetServingSystemResponse_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe response TLV 0x21 for NASGetServingSystem() struct sNASGetServingSystemResponse_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe response TLV 0x22 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe response TLV 0x23 for NASGetServingSystem() struct sNASGetServingSystemResponse_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe response TLV 0x24 for NASGetServingSystem() struct sNASGetServingSystemResponse_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x25 for NASGetServingSystem() struct sNASGetServingSystemResponse_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x26 for NASGetServingSystem() struct sNASGetServingSystemResponse_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x27 for NASGetServingSystem() struct sNASGetServingSystemResponse_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x28 for NASGetServingSystem() struct sNASGetServingSystemResponse_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe indication TLV 0x01 for NAS ServingSystemIndication struct sNASServingSystemIndication_ServingSystem { eQMINASRegistrationStates mRegistrationState; eQMINASCSPSAttachStates mCSAttachState; eQMINASCSPSAttachStates mPSAttachState; eQMINASRegisteredNetworks mRegisteredNetwork; UINT8 mNumberOfRadioInterfacesInUse; // This array must be the size specified by mNumberOfRadioInterfacesInUse // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x10 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingIndicator { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x11 for NAS ServingSystemIndication struct sNASServingSystemIndication_DataServices { UINT8 mNumberOfDataCapabilities; // This array must be the size specified by mNumberOfDataCapabilities // eQMINASDataServiceCapabilities2 mDataCapability[1]; }; // Structure to describe indication TLV 0x12 for NAS ServingSystemIndication struct sNASServingSystemIndication_CurrentPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe indication TLV 0x13 for NAS ServingSystemIndication struct sNASServingSystemIndication_SystemID { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe indication TLV 0x14 for NAS ServingSystemIndication struct sNASServingSystemIndication_BaseStation { UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe indication TLV 0x15 for NAS ServingSystemIndication struct sNASServingSystemIndication_RoamingList { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASRoamingIndicators mRoamingIndicator; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for NAS ServingSystemIndication struct sNASServingSystemIndication_DefaultRoaming { eQMINASRoamingIndicators mRoamingIndicator; }; // Structure to describe indication TLV 0x17 for NAS ServingSystemIndication struct sNASServingSystemIndication_TimeZone { UINT8 mLeapSeconds; INT8 mLocalTimeOffset; INT8 mDaylightSavingsInEffect; }; // Structure to describe indication TLV 0x18 for NAS ServingSystemIndication struct sNASServingSystemIndication_ProtocolRevision { eQMINASRevision mProtocolRevision; }; // Structure to describe indication TLV 0x19 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChange { INT8 mPLMNChanged; }; // Structure to describe indication TLV 0x1A for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPTimeZone { INT8 m3GPPTimeZone; }; // Structure to describe indication TLV 0x1B for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPDaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x1C for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPUniversalTimeAndZone { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x1D for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPLocationAreaCode { UINT16 mLocationAreaCode; }; // Structure to describe indication TLV 0x1E for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPPCellID { UINT32 mCellID; }; // Structure to describe indication TLV 0x1F for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2ConcurrentService { eQMINASConcurrentService mConcurrentService; }; // Structure to describe indication TLV 0x20 for NAS ServingSystemIndication struct sNASServingSystemIndication_3GPP2PRLIndicator { eQMINASPRLIndicator mPRLIndicator; }; // Structure to describe indication TLV 0x21 for NAS ServingSystemIndication struct sNASServingSystemIndication_DualTransferModeIndication { eQMINASDualTransferMode mDualTransferMode; }; // Structure to describe indication TLV 0x22 for NAS ServingSystemIndication struct sNASServingSystemIndication_DetailedServiceInformation { eQMINASServiceStatus mServiceStatus; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; eQMINASServiceStatus mCDMA1xEVDOServiceStatus; eQMINASCDMA1xEVDOHybridInformation mCDMA1xEVDOHybridInformation; eQMINASSystemForbidden mSystemForbidden; }; // Structure to describe indication TLV 0x23 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMASystemInformation { UINT16 mMobileCountryCode; UINT8 mIMSI_11_12; }; // Structure to describe indication TLV 0x24 for NAS ServingSystemIndication struct sNASServingSystemIndication_CDMA1xEVDOPersonality { eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; }; // Structure to describe indication TLV 0x25 for NAS ServingSystemIndication struct sNASServingSystemIndication_TrackingAreaCode { UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x26 for NAS ServingSystemIndication struct sNASServingSystemIndication_CallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x27 for NAS ServingSystemIndication struct sNASServingSystemIndication_PLMNChangeStatus { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x28 for NAS ServingSystemIndication struct sNASServingSystemIndication_UMTSPSC { UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x29 for NAS ServingSystemIndication struct sNASServingSystemIndication_PCSInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x2A for NAS ServingSystemIndication struct sNASServingSystemIndication_HSCallStatus { eQMINASHighSpeedCallStatus mHighSpeedCallStatus; }; // Structure to describe response TLV 0x01 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_HomeIDs { UINT16 mSystemID; UINT16 mNetworkID; }; // Structure to describe response TLV 0x11 for NASGetHomeNetwork() struct sNASGetHomeNetworkResponse_ExtendedHomeNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; eQMINASNetworkDescriptionDisplays mDisplayNetworkDescription; eQMINASNetworkDescriptionEncodings mNetworkDescriptionEncoding; UINT8 mNetworkDescriptionLength; // This array must be the size specified by mNetworkDescriptionLength // UINT8 mNetworkDescription[1]; }; // Structure to describe response TLV 0x10 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x11 for NASGetPreferredNetworks() struct sNASGetPreferredNetworksResponse_StaticNetworks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetPreferredNetworks() struct sNASSetPreferredNetworksRequest_Networks { UINT16 mNumberOfPreferredNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; // Padding out 6 bits UINT8 mReserved1:6; bool mGSMCompact:1; bool mGSM:1; // Padding out 6 bits UINT8 mReserved2:6; bool mLTE:1; bool mUMTS:1; }; // This array must be the size specified by mNumberOfPreferredNetworks // sNetwork mNetworks[1]; }; // Structure to describe response TLV 0x10 for NASGetForbiddenNetworks() struct sNASGetForbiddenNetworksResponse_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x10 for NASSetForbiddenNetworks() struct sNASSetForbiddenNetworksRequest_Networks { UINT16 mNumberOfForbiddenNetworks; struct sNetwork { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // This array must be the size specified by mNumberOfForbiddenNetworks // sNetwork mNetworks[1]; }; // Structure to describe request TLV 0x01 for NASSetTechnologyPreference() struct sNASSetTechnologyPreferenceRequest_Preference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x01 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_ActivePreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; eQMINASTechPrefDurations mDuration; }; // Structure to describe response TLV 0x10 for NASGetTechnologyPreference() struct sNASGetTechnologyPreferenceResponse_PersistentPreference { // mTechnology must be the first two bits of a UINT8 // whose remaining bits are described in the optional // structs following. // The following union is based on the value of mTechnology union uValOfTechnology { // Always present eQMINASTechPrefs mTechnology:2; // If the value of mTechnology == 1 struct sTechnologyIs1 { // Padding out 2 bits UINT8 mReserved1:2; UINT8 mAnalog:1; UINT8 mDigital:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved2:2; }; sTechnologyIs1 mTechnologyIs1; // If the value of mTechnology == 2 struct sTechnologyIs2 { // Padding out 2 bits UINT8 mReserved3:2; UINT8 mGSM:1; UINT8 mWCDMA:1; UINT8 mEVDO:1; UINT8 mLTE:1; // Padding out 2 bits UINT8 mReserved4:2; }; sTechnologyIs2 mTechnologyIs2; // Padding out 8 bits UINT8 mReserved5; }; uValOfTechnology mValOfTechnology; // Padding out 8 bits UINT8 mReserved6; }; // Structure to describe response TLV 0x01 for NASGetACCOLC() struct sNASGetACCOLCResponse_ACCOLC { UINT8 mACCOLC; }; // Structure to describe request TLV 0x01 for NASSetACCOLC() struct sNASSetACCOLCRequest_ACCOLC { char mSPC[6]; UINT8 mACCOLC; }; // Structure to describe indication TLV 0x01 for NAS GetSystemPreference struct sNASGetSystemPreferenceIndication_Pref { eQMINASSystemPreferences mSystemPreference; }; // Structure to describe response TLV 0x11 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCI { UINT8 mSlotCycleIndex; }; // Structure to describe response TLV 0x12 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_SCM { UINT8 mStationClassMark; }; // Structure to describe response TLV 0x13 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Registration { INT8 mRegisterOnHomeSystem; INT8 mRegisterOnForeignSystem; INT8 mRegisterOnForeignNetwork; }; // Structure to describe response TLV 0x14 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe response TLV 0x15 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe response TLV 0x16 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x17 for NASGetNetworkParameters() struct sNASGetNetworkParametersResponse_ForceCDMA1xEVDOSCP { eQMINASForceCDMA1xEVDOSCP mForceCDMA1xEVDOSCP; }; // Structure to describe request TLV 0x10 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_SPC { char mSPC[6]; }; // Structure to describe request TLV 0x14 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDORevision { INT8 mForceCDMA1xEVDORev0; }; // Structure to describe request TLV 0x15 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_CDMA1xEVDOSCPCustom { INT8 mCDMA1xEVDOSCPCustomConfig; bool mSubtype2PhysicalLayer:1; bool mEnhancedCCMAC:1; bool mEnhancedACMAC:1; bool mEnhancedFTCMAC:1; bool mSubtype3RTCMAC:1; bool mSubtype1RTCMAC:1; bool mEnhancedIdle:1; bool mGenericMultimodeCapableDiscPort:1; // Padding out 24 bits UINT8 mReserved1[3]; bool mGenericBroadcast:1; // Padding out 31 bits UINT8 mReserved2:7; UINT8 mReserved3[3]; bool mSNMultiflowPacketApplication:1; bool mSNEnhancedMultiflowPacketApplication:1; // Padding out 30 bits UINT8 mReserved4:6; UINT8 mReserved5[3]; }; // Structure to describe request TLV 0x16 for NASSetNetworkParameters() struct sNASSetNetworkParametersRequest_Roaming { eQMINASRoamingPreferences mRoamPreference; }; // Structure to describe response TLV 0x01 for NASGetRFInfo() struct sNASGetRFInfoResponse_RFInfo { UINT8 mNumberOfInstances; struct sInstance { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x01 for NASGetANAAAAuthenticationStatus() struct sNASGetANAAAAuthenticationStatusResponse_Status { eQMINASANAAAAuthenticationStatus mANAAAAuthenticationStatus; }; // Structure to describe request TLV 0x10 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe request TLV 0x11 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x12 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe request TLV 0x13 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe request TLV 0x14 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe request TLV 0x15 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe request TLV 0x16 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x17 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ChangeDuration { eQMINASChangeDuration mChangeDuration; }; // Structure to describe request TLV 0x18 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_ServiceDomain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x19 for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_GWAcquisitionOrder { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x1A for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_PCSInfo { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x1B for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe request TLV 0x1C for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe request TLV 0x1D for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x1E for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe request TLV 0x1F for NASSetSystemSelectionPref() struct sNASSetSystemSelectionPrefRequest_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe response TLV 0x10 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe response TLV 0x11 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x12 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe response TLV 0x13 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe response TLV 0x14 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe response TLV 0x15 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe response TLV 0x16 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe response TLV 0x18 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe response TLV 0x19 for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe response TLV 0x1A for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1B for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe response TLV 0x1C for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe response TLV 0x1D for NASGetSystemSelectionPref() struct sNASGetSystemSelectionPrefResponse_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe indication TLV 0x10 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_EmergencyMode { INT8 mEmergencyModeOn; }; // Structure to describe indication TLV 0x11 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Mode { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe indication TLV 0x12 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Band { bool mBandClass0ASystem:1; bool mBandClass0BSystem:1; bool mBandClass1:1; bool mBandClass2:1; bool mBandClass3ASystem:1; bool mBandClass4:1; bool mBandClass5:1; bool mGSMDCS:1; bool mGSMPrimary:1; bool mGSMExtended:1; bool mBandClass6:1; bool mBandClass7:1; bool mBandClass8:1; bool mBandClass9:1; bool mBandClass10:1; bool mBandClass11:1; bool mGSM450:1; bool mGSM480:1; bool mGSM750:1; bool mGSM850:1; bool mGSMRailways:1; bool mGSMPCS:1; bool mWCDMA2100I:1; bool mWCDMAPCS1900:1; bool mWCDMADCS1800:1; bool mWCDMA1700US:1; bool mWCDMA850:1; bool mWCDMA800:1; bool mBandClass12:1; bool mBandClass14:1; // Padding out 1 bits UINT8 mReserved1:1; bool mBandClass15:1; // Padding out 16 bits UINT8 mReserved2[2]; bool mWCDMA2600:1; bool mWCDMA900:1; bool mWCDMA1700Japan:1; // Padding out 5 bits UINT8 mReserved3:5; bool mBandClass16:1; bool mBandClass17:1; bool mBandClass18:1; bool mBandClass19:1; // Padding out 4 bits UINT8 mReserved4:4; }; // Structure to describe indication TLV 0x13 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_PRL { eQMINASPRLPreferences mPRLPreference; }; // Structure to describe indication TLV 0x14 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Roaming { eQMINASRoamingPreferences2 mRoamingPreference; }; // Structure to describe indication TLV 0x15 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_LTEBand { bool mEUTRABand1:1; bool mEUTRABand2:1; bool mEUTRABand3:1; bool mEUTRABand4:1; bool mEUTRABand5:1; bool mEUTRABand6:1; bool mEUTRABand7:1; bool mEUTRABand8:1; bool mEUTRABand9:1; bool mEUTRABand10:1; bool mEUTRABand11:1; bool mEUTRABand12:1; bool mEUTRABand13:1; bool mEUTRABand14:1; // Padding out 2 bits UINT8 mReserved1:2; bool mEUTRABand17:1; bool mEUTRABand18:1; bool mEUTRABand19:1; bool mEUTRABand20:1; bool mEUTRABand21:1; // Padding out 2 bits UINT8 mReserved2:2; bool mEUTRABand24:1; bool mEUTRABand25:1; // Padding out 7 bits UINT8 mReserved3:7; bool mEUTRABand33:1; bool mEUTRABand34:1; bool mEUTRABand35:1; bool mEUTRABand36:1; bool mEUTRABand37:1; bool mEUTRABand38:1; bool mEUTRABand39:1; bool mEUTRABand40:1; bool mEUTRABand41:1; bool mEUTRABand42:1; bool mEUTRABand43:1; // Padding out 21 bits UINT8 mReserved4:5; UINT8 mReserved5[2]; }; // Structure to describe indication TLV 0x16 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_NetworkSelection { eQMINASNetworkSelection mNetworkSelection; }; // Structure to describe indication TLV 0x18 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Domain { eQMINASServiceDomainPrefs mServiceDomainPreference; }; // Structure to describe indication TLV 0x19 for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_Acquisition { eQMINASAcquisitionOrder mAcquisitionOrderPreference; }; // Structure to describe indication TLV 0x1A for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_TDSCDMABand { bool mTDSCDMABandA:1; bool mTDSCDMABandB:1; bool mTDSCDMABandC:1; bool mTDSCDMABandD:1; bool mTDSCDMABandE:1; bool mTDSCDMABandF:1; // Padding out 58 bits UINT8 mReserved1:2; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x1B for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_ManualPLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x1C for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_AcquisitionOrder { UINT8 mNumberOfRadioInterfaces; // This array must be the size specified by mNumberOfRadioInterfaces // eQMINASRadioInterfaces mRadioInterface[1]; }; // Structure to describe indication TLV 0x1D for NAS SystemSelectionPrefIndication struct sNASSystemSelectionPrefIndication_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe request TLV 0x01 for NASSetDDTMPreference() struct sNASSetDDTMPreferenceRequest_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x01 for NASGetDDTMPreference() struct sNASGetDDTMPreferenceResponse_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe indication TLV 0x01 for NAS DDTMPreferenceIndication struct sNASDDTMPreferenceIndication_DDTM { eQMINASDDTMPreferences mDDTMPreference; bool mSuppressL2ACK:1; bool mSuppress1xRegistrations:1; bool mIgnoreServiceOptionPages:1; bool mBlockMobileOriginatedSMSAndDBM:1; // Padding out 12 bits UINT8 mReserved1:4; UINT8 mReserved2; eQMINASServiceOptionActions mServiceOptionAction; UINT8 mNumberOfInstances; // This array must be the size specified by mNumberOfInstances // UINT16 mServiceOption[1]; }; // Structure to describe response TLV 0x10 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe response TLV 0x11 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe response TLV 0x12 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe response TLV 0x13 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe response TLV 0x14 for NASGetOperatorNameData() struct sNASGetOperatorNameDataResponse_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetOperatorNameDataResponse_NITZInformation { sNASGetOperatorNameDataResponse_NITZInformation1 mNASGetOperatorNameDataResponse_NITZInformation1; sNASGetOperatorNameDataResponse_NITZInformation2 mNASGetOperatorNameDataResponse_NITZInformation2; }; // Structure to describe indication TLV 0x10 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_ServiceProviderName { UINT8 mDisplayCondition; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x11 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorPLMNList { UINT16 mPLMNListLength; struct sPLNM { char mMobileCountryCode[3]; char mMobileNetworkCode[3]; UINT16 mLocationAreaCode1; UINT16 mLocationAreaCode2; UINT8 mPLMNNameRecordIdentifier; }; // This array must be the size specified by mPLMNListLength // sPLNM mPLNMs[1]; }; // Structure to describe indication TLV 0x12 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_PLMNName { UINT8 mPLMNCount; struct sPLMNName1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sPLMNName2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sPLMNName { sPLMNName1 mPLMNName1; sPLMNName2 mPLMNName2; }; // This array must be the size specified by mPLMNCount // sPLMNName mPLMNNames[1]; }; // Structure to describe indication TLV 0x13 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_OperatorStringName { // String is variable length, but must be size of the container // char mPLMNOperatorName[1]; }; // Structure to describe indication TLV 0x14 for NAS OperatorNameDataIndication struct sNASOperatorNameDataIndication_NITZInformation1 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASOperatorNameDataIndication_NITZInformation2 { UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASOperatorNameDataIndication_NITZInformation { sNASOperatorNameDataIndication_NITZInformation1 mNASOperatorNameDataIndication_NITZInformation1; sNASOperatorNameDataIndication_NITZInformation2 mNASOperatorNameDataIndication_NITZInformation2; }; // Structure to describe response TLV 0x10 for NASGetCSPPLMNMode() struct sNASGetCSPPLMNModeResponse_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe indication TLV 0x10 for NAS CSPPLMNModeIndication struct sNASCSPPLMNModeIndication_Mode { INT8 mRestrictManualPLMNSelection; }; // Structure to describe request TLV 0x01 for NASUpdateAKEY() struct sNASUpdateAKEYRequest_AKEY { char mAKEY[26]; }; // Structure to describe request TLV 0x01 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoRequest_InfoMask { bool mNAMName:1; bool mDirectoryNumber:1; bool mHomeID:1; bool mMINBasedIMSI:1; bool mTrueIMSI:1; bool mCDMAChannel:1; bool mMobileDirectoryNumber:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe response TLV 0x11 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe response TLV 0x12 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe response TLV 0x13 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x14 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe response TLV 0x15 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe response TLV 0x16 for NASGet3GPP2SubscriptionInfo() struct sNASGet3GPP2SubscriptionInfoResponse_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe request TLV 0x01 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMID { UINT8 mNAMID; }; // Structure to describe request TLV 0x10 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_DirectoryNumber { UINT8 mDirectoryNumberLength; // This array must be the size specified by mDirectoryNumberLength // char mDirectoryNumber[1]; }; // Structure to describe request TLV 0x11 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_HomeID { UINT8 mHomeIDCount; struct sHomeID { UINT16 mSystemID; UINT16 mNetworkID; }; // This array must be the size specified by mHomeIDCount // sHomeID mHomeIDs[1]; }; // Structure to describe request TLV 0x12 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MINBasedIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x13 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_TrueIMSI { char mMobileCountryCode[3]; char mIMSI11_12[2]; char mIMSIS1[7]; char mIMSIS2[3]; UINT8 mIMSIAddressNumber; }; // Structure to describe request TLV 0x14 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_CDMAChannel { UINT16 mAChannelForPrimaryCarrier; UINT16 mBChannelForPrimaryCarrier; UINT16 mAChannelForSecondaryCarrier; UINT16 mBChannelForSecondaryCarrier; }; // Structure to describe request TLV 0x15 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_NAMName { UINT8 mNAMNameLength; // This array must be the size specified by mNAMNameLength // char mNAMName[1]; }; // Structure to describe request TLV 0x16 for NASSet3GPP2SubscriptionInfo() struct sNASSet3GPP2SubscriptionInfoRequest_MDN { UINT8 mMobileDirectoryNumberLength; // This array must be the size specified by mMobileDirectoryNumberLength // char mMobileDirectoryNumber[1]; }; // Structure to describe response TLV 0x10 for NASGetMobileCAIRevision() struct sNASGetMobileCAIRevisionResponse_CAIRevision { eQMINASRevision mCAIRevision; }; // Structure to describe response TLV 0x10 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_CurrentRTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x11 for NASGetRTREConfig() struct sNASGetRTREConfigResponse_RTREConfigPreference { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe request TLV 0x01 for NASSetRTREConfig() struct sNASSetRTREConfigRequest_RTREConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe response TLV 0x10 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_GERANInfo { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; UINT32 mTimingAdvance; eQMINASRXLevel mRXLevel; UINT8 mNMRCellCount; struct sNMRCell { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileCountryCode0:4; UINT8 mPLMNMobileCountryCode1:4; UINT8 mPLMNMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mPLMNMobileNetworkCode0:4; UINT8 mPLMNMobileNetworkCode1:4; UINT8 mPLMNMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mBaseStationIdentityCodeBCC:3; UINT8 mBaseStationIdentityCodeNCC:3; // Padding out 2 bits UINT8 mReserved2:2; eQMINASRXLevel mRXLevel; }; // This array must be the size specified by mNMRCellCount // sNMRCell mNMRCells[1]; }; // Structure to describe response TLV 0x11 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSInfo1 { UINT32 mCellID; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mLocationAreaCode; UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; UINT8 mUTRAUMTSMonitoredCellCount; struct sUMTSMonitoredCell { UINT16 mUTRAAbsoluteRFChannelNumber; UINT16 mPrimaryScramblingCode; INT16 mReceivedSignalCodePower; UINT16 mECIO; }; // This array must be the size specified by mUTRAUMTSMonitoredCellCount // sUMTSMonitoredCell mUMTSMonitoredCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo2 { UINT8 mGERANNBRCellCount; struct sGERANNBRCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mNetworkColorCode; UINT8 mBaseStationColorCode; INT16 mRSSI; }; // This array must be the size specified by mGERANNBRCellCount // sGERANNBRCell mGERANNBRCells[1]; }; struct sNASGetCellLocationInfoResponse_UMTSInfo { sNASGetCellLocationInfoResponse_UMTSInfo1 mNASGetCellLocationInfoResponse_UMTSInfo1; sNASGetCellLocationInfoResponse_UMTSInfo2 mNASGetCellLocationInfoResponse_UMTSInfo2; }; // Structure to describe response TLV 0x12 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_CDMAInfo { UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mReferencePN; INT32 mLatitude; INT32 mLongitude; }; // Structure to describe response TLV 0x13 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_IntrafrequencyLTEInfo { INT8 mUEInIdleMode; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; UINT16 mTrackingAreaCode; UINT32 mGlobalCellID; UINT16 mEUTRAAbsoluteRFChannelNumber; UINT16 mServingCellID; UINT8 mCellReselectionPriority; UINT8 mSNonIntraSearchThreshold; UINT8 mServingCellLowThreshold; UINT8 mSIntraSearchThreshold; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // Structure to describe response TLV 0x14 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_InterfrequencyLTEInfo { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mEUTRAAbsoluteRFChannelNumber; UINT8 mCellSelectionRXLevelLowThreshold; UINT8 mCellSelectionRXLevelHighThreshold; UINT8 mCellReselectionPriority; UINT8 mCellCount; struct sCell { UINT16 mPhysicalCellID; INT16 mRSRQ; INT16 mRSRP; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x15 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringGSM { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; // Bitfield arrays are not possible in c, unrolling the array bool mNCCPermitted0:1; bool mNCCPermitted1:1; bool mNCCPermitted2:1; bool mNCCPermitted3:1; bool mNCCPermitted4:1; bool mNCCPermitted5:1; bool mNCCPermitted6:1; bool mNCCPermitted7:1; UINT8 mCellCount; struct sCell { UINT16 mAbsoluteRFChannelNumber; INT8 mBandIs1900; INT8 mCellIDValid; UINT8 mBCC:3; UINT8 mNCC:3; // Padding out 2 bits UINT8 mReserved1:2; INT16 mRSSI; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x16 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_LTEInfoNeighboringWCDMA { INT8 mUEInIdleMode; UINT8 mFrequencyCount; struct sFrequency { UINT16 mUTRAAbsoluteRFChannelNumber; UINT8 mCellReselectionPriority; UINT8 mCellReselectionHighThreshold; UINT8 mCellReselectionLowThreshold; UINT8 mCellCount; struct sCell { UINT16 mPrimaryScramblingCode; INT16 mCPICHRSCP; INT16 mCPICHEcNo; INT16 mCellSelectionRXLevel; }; // This array must be the size specified by mCellCount // sCell mCells[1]; }; // This array must be the size specified by mFrequencyCount // sFrequency mFrequencys[1]; }; // Structure to describe response TLV 0x17 for NASGetCellLocationInfo() struct sNASGetCellLocationInfoResponse_UMTSCellID { UINT32 mCellID; }; // Structure to describe request TLV 0x01 for NASGetPLMNName() struct sNASGetPLMNNameRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe request TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameRequest_SupressSIMError { INT8 mSIMInitNotChecked; }; // Structure to describe request TLV 0x11 for NASGetPLMNName() struct sNASGetPLMNNameRequest_MNCPCSDigitIncludeStatus { INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x12 for NASGetPLMNName() struct sNASGetPLMNNameRequest_AlwaysSendPLMNName { INT8 mAlwaysSendPLMNName; }; // Structure to describe request TLV 0x13 for NASGetPLMNName() struct sNASGetPLMNNameRequest_UseStaticTableOnly { INT8 mUseStaticTableOnly; }; // Structure to describe response TLV 0x10 for NASGetPLMNName() struct sNASGetPLMNNameResponse_Name1 { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; struct sNASGetPLMNNameResponse_Name2 { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; struct sNASGetPLMNNameResponse_Name3 { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; struct sNASGetPLMNNameResponse_Name { sNASGetPLMNNameResponse_Name1 mNASGetPLMNNameResponse_Name1; sNASGetPLMNNameResponse_Name2 mNASGetPLMNNameResponse_Name2; sNASGetPLMNNameResponse_Name3 mNASGetPLMNNameResponse_Name3; }; // Structure to describe request TLV 0x01 for NASBindSubscription() struct sNASBindSubscriptionRequest_SubscriptionType { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x10 for NAS ManagedRoamingIndication struct sNASManagedRoamingIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x10 for NAS DualStandbyPrefIndication struct sNASDualStandbyPrefIndication_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; eQMINASSubscriptionType mPrioritySubscription; eQMINASSubscriptionType mActiveSubscription; eQMINASSubscriptionType mDefaultDataSubscription; }; // Structure to describe indication TLV 0x10 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_PrioritySubscriptionInfo { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x11 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_ActiveSubscriptionInfo { eQMINASActiveSubscription mActiveSubscription; }; // Structure to describe indication TLV 0x12 for NAS SubscriptionInfoIndication struct sNASSubscriptionInfoIndication_DefaultDataSubscriptionInfo { INT8 mDefaultDataSubscription; }; // Structure to describe response TLV 0x10 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX0 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe response TLV 0x11 for NASGetModePref() struct sNASGetModePrefResponse_ModePreferenceForIDX1 { bool mCDMA1x:1; bool mCDMA1xEVDO:1; bool mGSM:1; bool mUMTS:1; bool mLTE:1; bool mTDSCDMA:1; // Padding out 10 bits UINT8 mReserved1:2; UINT8 mReserved2; }; // Structure to describe request TLV 0x10 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe request TLV 0x11 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x12 for NASSetDualStandbyPreference() struct sNASSetDualStandbyPreferenceRequest_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe indication TLV 0x01 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_UniversalTime { UINT16 mYear; UINT8 mMonth; UINT8 mDay; UINT8 mHour; UINT8 mMinute; UINT8 mSecond; eQMINASDayOfWeek mDayOfWeek; }; // Structure to describe indication TLV 0x10 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_TimeZone { INT8 mTimeZoneOffset; }; // Structure to describe indication TLV 0x11 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_DaylightSavingAdjustment { eQMINASDaylightSavingsAdjustment mDaylightSavingsAdjustment; }; // Structure to describe indication TLV 0x12 for NAS NetworkTimeIndication struct sNASNetworkTimeIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe response TLV 0x10 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x11 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x12 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x13 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x14 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x15 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe response TLV 0x16 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe response TLV 0x17 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe response TLV 0x18 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe response TLV 0x19 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe response TLV 0x1A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe response TLV 0x1B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe response TLV 0x1E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe response TLV 0x1F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x20 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe response TLV 0x21 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe response TLV 0x22 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x23 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x24 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe response TLV 0x25 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe response TLV 0x26 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe response TLV 0x27 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe response TLV 0x28 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe response TLV 0x29 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe response TLV 0x2A for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTEVoiceDomain { eQMINASLTEVoiceDomains mLTEVoiceDomain; }; // Structure to describe response TLV 0x2B for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMARegZoneID { UINT16 mCDMARegZoneID; }; // Structure to describe response TLV 0x2C for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMRAC { UINT8 mGSMRoutingAreaCode; }; // Structure to describe response TLV 0x2D for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMARAC { UINT8 mWCDMARoutingAreaCode; }; // Structure to describe response TLV 0x2E for NASGetSystemInfo() struct sNASGetSystemInfoResponse_CDMAResolvedMCC { UINT16 mCDMAMCCResolvedViaSIDLookup; }; // Structure to describe response TLV 0x2F for NASGetSystemInfo() struct sNASGetSystemInfoResponse_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe response TLV 0x30 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_TDSCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x31 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_LTERegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x32 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_WCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x33 for NASGetSystemInfo() struct sNASGetSystemInfoResponse_GSMRegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x10 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x11 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x12 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x13 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x14 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x15 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mPRevInUseValid; eQMINASRevision mProtocolRevisionInUse; INT8 mBaseStationPRevValid; eQMINASRevision mBaseStationProtocolRevision; INT8 mConcurrentServiceSupportedValid; eQMINASConcurrentServiceSupported mConcurrentServiceSupported; INT8 mCDMASystemIDValid; UINT16 mSystemID; UINT16 mNetworkID; INT8 mBaseStationInfoValid; UINT16 mBaseStationID; INT32 mLatitude; INT32 mLongitude; INT8 mPacketZoneValid; UINT16 mPacketZone; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; }; // Structure to describe indication TLV 0x16 for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMA1xEVDOSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mSystemPRLMatchValid; eQMINASPRLIndicator mSystemPRLMatch; INT8 mCDMA1xEVDOPersonalityValid; eQMINASCDMA1xEVDOPersonality mCDMA1xEVDOPersonality; INT8 mCDMA1xEVDOActiveProtocolValid; eQMINASCDMA1xEVDOActiveProtocol mCDMA1xEVDOActiveProtocol; INT8 mSectorIDValid; UINT8 mSectorID[16]; }; // Structure to describe indication TLV 0x17 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMSystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mEGPRSSupportValid; eQMINASEGPRSSupport mEGPRSSupport; INT8 mDTMSupportValid; eQMINASDTMSupport mDTMSupport; }; // Structure to describe indication TLV 0x18 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mPrimaryScramblingCodeValue; UINT16 mPrimaryScramblingCode; }; // Structure to describe indication TLV 0x19 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTESystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mTrackingAreaCodeValid; UINT16 mTrackingAreaCode; }; // Structure to describe indication TLV 0x1A for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMASystemInfo { UINT16 mGeoSystemIndex; UINT16 mRegistrationPeriod; }; // Structure to describe indication TLV 0x1B for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreCDMA1xEVDOSystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1C for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreGSMSystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1D for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreWCDMASystemInfo { UINT16 mGeoSystemIndex; eQMINASCellBroadcastCaps mCellBroadcastCapability; }; // Structure to describe indication TLV 0x1E for NAS SystemInfoIndication struct sNASSystemInfoIndication_MoreLTESystemInfo { UINT16 mGeoSystemIndex; }; // Structure to describe indication TLV 0x1F for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x20 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACallBarring { eQMINASCallBarringStatus mCSCallBarringStatus; eQMINASCallBarringStatus mPSCallBarringStatus; }; // Structure to describe indication TLV 0x21 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoice { INT8 mLTEVoiceSupported; }; // Structure to describe indication TLV 0x22 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMCipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x23 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMACipher { eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x24 for NAS SystemInfoIndication struct sNASSystemInfoIndication_NoPLMNChange { INT8 mNoPLMNChange; }; // Structure to describe indication TLV 0x25 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMAServiceStatusInfo { eQMINASServiceStatus mServiceStatus; eQMINASServiceStatus mTrueServiceStatus; eQMINASPreferredDataBath mPreferredDataPath; }; // Structure to describe indication TLV 0x26 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMASystemInfo { INT8 mServiceDomainValid; eQMINASSystemServiceCapabilities mServiceDomain; INT8 mServiceCapabilityValid; eQMINASSystemServiceCapabilities mSystemServiceCapabilities; INT8 mRoamStatusValid; eQMINASRoamStatus mRoamStatus; INT8 mSystemForbiddenValid; eQMINASSystemForbidden mSystemForbidden; INT8 mLocationAreaCodeValid; UINT16 mLocationAreaCode; INT8 mCellIDValid; UINT32 mCellID; INT8 mRegistrationRejectInformationValid; eQMINASSystemServiceCapabilities mRegistrationRejectServiceDomain; UINT8 mRejectCause; INT8 mNetworkIDValid; char mMobileCountryCode[3]; char mMobileNetworkCode[3]; INT8 mHighSpeedCallStatusValid; eQMINASHighSpeedCallStatus mHighSpeedCallStatus; INT8 mHighSpeedServiceIndicationValid; eQMINASHighSpeedCallStatus mHighSpeedServiceIndication; INT8 mCellParameterIDValid; UINT16 mCellParameterID; INT8 mCellBroadcastCapabilityValid; eQMINASCellBroadcastCaps2 mCellBroadcastCapability; INT8 mCSBarringStatusValid; eQMINASCallBarringStatus mCSCallBarringStatus; INT8 mPSBarringStatusValid; eQMINASCallBarringStatus mPSCallBarringStatus; INT8 mCipheringValid; eQMINASServiceDomains mCipheringOnServiceDomain; }; // Structure to describe indication TLV 0x27 for NAS SystemInfoIndication struct sNASSystemInfoIndication_EMBMSCoverage { INT8 mEMBMSSupported; }; // Structure to describe indication TLV 0x28 for NAS SystemInfoIndication struct sNASSystemInfoIndication_SIMRejectInfo { eQMINASSIMRejectStates mSIMRejectInfo; }; // Structure to describe indication TLV 0x29 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMAEUTRADetection { eQMINASEUTRAStatus mEUTRADetectionStatus; }; // Structure to describe indication TLV 0x2A for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEIMSVoice { INT8 mIMSVoiceSupportAvailable; }; // Structure to describe indication TLV 0x2B for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTEVoiceDomain { eQMINASLTEVoiceDomains mLTEVoiceDomain; }; // Structure to describe indication TLV 0x2C for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMARegZoneID { UINT16 mCDMARegZoneID; }; // Structure to describe indication TLV 0x2D for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMRAC { UINT8 mGSMRoutingAreaCode; }; // Structure to describe indication TLV 0x2E for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMARAC { UINT8 mWCDMARoutingAreaCode; }; // Structure to describe indication TLV 0x2F for NAS SystemInfoIndication struct sNASSystemInfoIndication_CDMAResolvedMCC { UINT16 mCDMAMCCResolvedViaSIDLookup; }; // Structure to describe indication TLV 0x30 for NAS SystemInfoIndication struct sNASSystemInfoIndication_RegistrationRestriction { eQMINASRegistrationRestrictions mRegistrationRestriction; }; // Structure to describe indication TLV 0x31 for NAS SystemInfoIndication struct sNASSystemInfoIndication_TDSCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x32 for NAS SystemInfoIndication struct sNASSystemInfoIndication_LTERegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x33 for NAS SystemInfoIndication struct sNASSystemInfoIndication_WCDMARegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe indication TLV 0x34 for NAS SystemInfoIndication struct sNASSystemInfoIndication_GSMRegistrationDomain { eQMINASRegistrationDomains mTDSCDMARegistrationDomain; }; // Structure to describe response TLV 0x10 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x11 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe response TLV 0x12 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe response TLV 0x13 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe response TLV 0x14 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe response TLV 0x15 for NASGetSignalInfo() struct sNASGetSignalInfoResponse_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_ECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_CDMA1xEVDOSINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // UINT8 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTESINRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_IOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT32 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mThreshold[1]; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_LTEConfig { eQMINASLTESignalRates mLTESignalCheckRate; eQMINASLTESignalRates mLTESignalAveragingRate; }; // Structure to describe request TLV 0x18 for NASConfigureSignalInfo() struct sNASConfigureSignalInfoRequest_RSCPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT8 mRSCPThreshold[1]; }; // Structure to describe indication TLV 0x10 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x11 for NAS SignalInfoIndication struct sNASSignalInfoIndication_CDMA1xEVDOSignalInfo { INT8 mRSSI; UINT16 mECIO; eQMINASSINRLevels mSINR; UINT32 mIO; }; // Structure to describe indication TLV 0x12 for NAS SignalInfoIndication struct sNASSignalInfoIndication_GSMSignalInfo { INT8 mRSSI; }; // Structure to describe indication TLV 0x13 for NAS SignalInfoIndication struct sNASSignalInfoIndication_WCDMASignalInfo { INT8 mRSSI; UINT16 mECIO; }; // Structure to describe indication TLV 0x14 for NAS SignalInfoIndication struct sNASSignalInfoIndication_LTESignalInfo { INT8 mRSSI; INT8 mRSRQ; INT16 mRSRP; INT16 mSNR; }; // Structure to describe indication TLV 0x15 for NAS SignalInfoIndication struct sNASSignalInfoIndication_TDSCDMASignalInfo { INT8 mPCCPCHRSCP; }; // Structure to describe response TLV 0x10 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x11 for NASGetErrorRate() struct sNASGetErrorRateResponse_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe response TLV 0x12 for NASGetErrorRate() struct sNASGetErrorRateResponse_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x13 for NASGetErrorRate() struct sNASGetErrorRateResponse_WCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe response TLV 0x14 for NASGetErrorRate() struct sNASGetErrorRateResponse_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x10 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMAFrameErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x11 for NAS ErrorRateIndication struct sNASErrorRateIndication_CDMA1xEVDOPacketErrorRate { UINT16 mErrorRate; }; // Structure to describe indication TLV 0x12 for NAS ErrorRateIndication struct sNASErrorRateIndication_GSMBitErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x13 for NAS ErrorRateIndication struct sNASErrorRateIndication_WCDMAFrameErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x14 for NAS ErrorRateIndication struct sNASErrorRateIndication_TDSCDMABlockErrorRate { UINT8 mErrorRate; }; // Structure to describe indication TLV 0x01 for NAS EVDOSessionCloseIndication struct sNASEVDOSessionCloseIndication_Reason { eQMINASEVDOSessionCloseReasons mSessionCloseReason; }; // Structure to describe indication TLV 0x01 for NAS EVDOUATIUpdateIndication struct sNASEVDOUATIUpdateIndication_UATI { UINT8 mUATI[16]; }; // Structure to describe request TLV 0x01 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeRequest_Protocol { UINT32 mEVDOProtocol; }; // Structure to describe response TLV 0x10 for NASGetEVDOProtocolSubtype() struct sNASGetEVDOProtocolSubtypeResponse_Subtype { UINT16 mEVDOProtocolSubtype; }; // Structure to describe response TLV 0x10 for NASGetEVDOColorCode() struct sNASGetEVDOColorCodeResponse_Value { UINT8 mEVDOColorCode; }; // Structure to describe response TLV 0x10 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x11 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_CDMA1xEVDO { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x12 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_GSM { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x13 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_UMTS { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x14 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_LTE { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe response TLV 0x15 for NASGetAcquisitionSystemMode() struct sNASGetAcquisitionSystemModeResponse_TDSCDMA { eQMINASRadioSystemModes mRadioSystemMode; }; // Structure to describe request TLV 0x01 for NASSetRXDiversity() struct sNASSetRXDiversityRequest_Diversity { eQMINASRadioInterfaces mRadioInterface; bool mEnableRXChain0:1; bool mEnableRXChain1:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX0Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x11 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_RX1Info { INT8 mRadioTuned; INT32 mRXPower; INT32 mEcIo; INT32 mRSCP; INT32 mRSRP; INT32 mPhase; }; // Structure to describe response TLV 0x12 for NASGetRXTXInfo() struct sNASGetRXTXInfoResponse_TXInfo { INT8 mInTraffic; INT32 mTXPower; }; // Structure to describe request TLV 0x01 for NASUpdateAKEYExtended() struct sNASUpdateAKEYExtendedRequest_AKEY { char mSPC[6]; char mAKEY[26]; }; // Structure to describe response TLV 0x10 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_StandbyPreference { eQMINASStandbyPreference mStandbyPreference; }; // Structure to describe response TLV 0x11 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_PrioritySubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x12 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_ActiveSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x13 for NASGetDualStandbyPreference() struct sNASGetDualStandbyPreferenceResponse_DefaultDataSubs { eQMINASSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe request TLV 0x10 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_AbsoluteTime { UINT32 mBlockingIntervalInMilliseconds; }; // Structure to describe request TLV 0x11 for NASBlockLTEPLMN() struct sNASBlockLTEPLMNRequest_T3204Multiplier { UINT32 mBlockingIntervalAsT3204Multiplier; }; // Structure to describe request TLV 0x01 for NASUnblockLTEPLMN() struct sNASUnblockLTEPLMNRequest_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x10 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_PLMN { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; INT8 mMNCIncludesPCSDigit; }; // Structure to describe indication TLV 0x11 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_SPN { eQMINASPLMNNameEncodingSchemes mSPNEncoding; UINT8 mSPNLength; // This array must be the size specified by mSPNLength // UINT8 mSPN[1]; }; // Structure to describe indication TLV 0x12 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_ShortName { eQMINASPLMNNameEncodingSchemes mPLMNShortEncoding; eQMINASPLMNNameCountryInitials mPLMNShortCountryInitials; eQMINASPLMNNameSpareBits mPLMNSpareBits; UINT8 mPLMNShortLength; // This array must be the size specified by mPLMNShortLength // UINT8 mPLMNShort[1]; }; // Structure to describe indication TLV 0x13 for NAS CurrentPLMNNameIndication struct sNASCurrentPLMNNameIndication_LongName { eQMINASPLMNNameEncodingSchemes mPLMNLongEncoding; eQMINASPLMNNameCountryInitials mPLMNLongCountryInitials; eQMINASPLMNNameSpareBits mPLMNLongBits; UINT8 mPLMNLongLength; // This array must be the size specified by mPLMNLongLength // UINT8 mPLMNLong[1]; }; // Structure to describe request TLV 0x01 for NASConfigureEMBMS() struct sNASConfigureEMBMSRequest_Config { INT8 mEMBMSEnabled; }; // Structure to describe response TLV 0x10 for NASGetEMBMSStatus() struct sNASGetEMBMSStatusResponse_Status { INT8 mEMBMSEnabled; }; // Structure to describe indication TLV 0x01 for NAS EMBMSStatusIndication struct sNASEMBMSStatusIndication_Status { INT8 mEMBMSEnabled; }; // Structure to describe response TLV 0x10 for NASGetCDMAPositionInfo() struct sNASGetCDMAPositionInfoResponse_Info { INT8 mUEInIdleMode; UINT8 mBaseStationCount; struct sBaseStation { eQMINASCDMAPilotTypes mPilotType; UINT16 mSystemID; UINT16 mNetworkID; UINT16 mBaseStationID; UINT16 mPilotPN; UINT16 mPilotStrength; INT32 mLatitude; INT32 mLongitude; UINT64 mGPSTimeInMilliseconds; }; // This array must be the size specified by mBaseStationCount // sBaseStation mBaseStations[1]; }; // Structure to describe indication TLV 0x01 for NAS RFBandInfoIndication struct sNASRFBandInfoIndication_BandInfo { eQMINASRadioInterfaces mRadioInterface; eQMINASBandClasses mActiveBandClass; UINT16 mActiveChannel; }; // Structure to describe indication TLV 0x01 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RadioInterface { eQMINASRadioInterfaces mRadioInterface; }; // Structure to describe indication TLV 0x03 for NAS NetworkRejectIndication struct sNASNetworkRejectIndication_RejectCause { UINT8 mRejectCause; }; // Structure to describe response TLV 0x10 for NASGetManagedRoamingConfig() struct sNASGetManagedRoamingConfigResponse_Config { INT8 mManagedRoamingSupported; }; // Structure to describe indication TLV 0x10 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_CurrentConfig { eQMINASRTREConfiguration mRTREConfiguration; }; // Structure to describe indication TLV 0x11 for NAS RTREConfigurationIndication struct sNASRTREConfigurationIndication_ConfigPreference { eQMINASRTREConfiguration mRTREPreference; }; // Structure to describe response TLV 0x10 for NASGetCentralizedEONSSupport() struct sNASGetCentralizedEONSSupportResponse_Status { INT8 mCentralizedEONSSupported; }; // Structure to describe request TLV 0x10 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMARSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x11 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMARSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x12 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMAECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x13 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_CDMAECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x14 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRRSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x15 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRRSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x16 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x17 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x18 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRSINRThresholdList { UINT8 mSINRThresholdCount; // This array must be the size specified by mSINRThresholdCount // eQMINASSINRLevels mSINRThreshold[1]; }; // Structure to describe request TLV 0x19 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRSINRDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1A for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRIOThreshold { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1B for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_HDRIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1C for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_GSMRSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1D for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_GSMRSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x1E for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMARSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x1F for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMARSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x20 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMAECIOThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x21 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_WCDMAECIODelta { UINT16 mDelta; }; // Structure to describe request TLV 0x22 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSSIThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x23 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSSIDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x24 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESNRThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x25 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESNRDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x26 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRQThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x27 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRQDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x28 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x29 for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTERSRPDelta { UINT16 mDelta; }; // Structure to describe request TLV 0x2A for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_LTESignalReportConfig { eQMINASReportRate mReportRate; eQMINASAveragePeriod mAveragePeriod; }; // Structure to describe request TLV 0x2B for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSCPThresholdList { UINT8 mThresholdCount; // This array must be the size specified by mThresholdCount // INT16 mThreshold[1]; }; // Structure to describe request TLV 0x2C for NASConfigureSignalInfo2() struct sNASConfigureSignalInfo2Request_TDSCDMARSCPDelta { UINT16 mDelta; }; // Structure to describe response TLV 0x10 for NASGetTDSCDMACellInfo() struct sNASGetTDSCDMACellInfoResponse_CellInfo { // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileCountryCode0:4; UINT8 mMobileCountryCode1:4; UINT8 mMobileCountryCode2:4; // Bitfield arrays are not possible in c, unrolling the array UINT8 mMobileNetworkCode0:4; UINT8 mMobileNetworkCode1:4; UINT8 mMobileNetworkCode2:4; INT8 mMNCIncludesPCSDigit; UINT16 mLocationAreaCode; UINT16 mAbsoluteRFChannelNumber; UINT32 mCellID; UINT8 mCellParameterID; UINT8 mPathLossdB; float mTimingAdvanceSeconds; float mRSCPdBm; }; // Structure to describe response TLV 0x11 for NASGetTDSCDMACellInfo() struct sNASGetTDSCDMACellInfoResponse_NeighborCellInfo { UINT8 mNeighborCellCount; struct sNeighborCell { UINT16 mAbsoluteRFChannelNumber; UINT8 mCellParameterID; float mRSCPdBm; }; // This array must be the size specified by mNeighborCellCount // sNeighborCell mNeighborCells[1]; }; // Structure to describe request TLV 0x10 for WMSSetEventReport() struct sWMSSetEventReportRequest_NewMTMessageIndicator { INT8 mReportNewMTMessages; }; // Structure to describe indication TLV 0x10 for WMS EventReport struct sWMSEventReportIndication_ReceivedMTMessage { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe indication TLV 0x11 for WMS EventReport struct sWMSEventReportIndication_TransferRouteMTMessage { INT8 mACKRequired; UINT32 mTransactionID; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x12 for WMS EventReport struct sWMSEventReportIndication_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x13 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSMessage { eQMIWMSNotificationType mNotificationType; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe indication TLV 0x14 for WMS EventReport struct sWMSEventReportIndication_ReceivedETWSPLMNInfo { UINT16 mMobileCountryCode; UINT16 mMobileNetworkCode; }; // Structure to describe indication TLV 0x15 for WMS EventReport struct sWMSEventReportIndication_ReceivedSMSCAddress { UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe indication TLV 0x16 for WMS EventReport struct sWMSEventReportIndication_SMSOnIMS { INT8 mMessageReceivedFromIMS; }; // Structure to describe request TLV 0x01 for WMSRawSend() struct sWMSRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSRawSend() struct sWMSRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSRawSend() struct sWMSRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSRawSend() struct sWMSRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSRawSend() struct sWMSRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSRawSend() struct sWMSRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSRawSend() struct sWMSRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe response TLV 0x01 for WMSRawSend() struct sWMSRawSendResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x10 for WMSRawSend() struct sWMSRawSendResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x11 for WMSRawSend() struct sWMSRawSendResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x12 for WMSRawSend() struct sWMSRawSendResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x13 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x14 for WMSRawSend() struct sWMSRawSendResponse_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe response TLV 0x15 for WMSRawSend() struct sWMSRawSendResponse_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe request TLV 0x01 for WMSRawWrite() struct sWMSRawWriteRequest_MessageData { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSRawWrite() struct sWMSRawWriteRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe response TLV 0x01 for WMSRawWrite() struct sWMSRawWriteResponse_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x01 for WMSRawRead() struct sWMSRawReadRequest_MessageIndex { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; }; // Structure to describe request TLV 0x10 for WMSRawRead() struct sWMSRawReadRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x11 for WMSRawRead() struct sWMSRawReadRequest_SMSOnIMS { INT8 mMessageToBeReadFromIMS; }; // Structure to describe response TLV 0x01 for WMSRawRead() struct sWMSRawReadResponse_MessageData { eQMIWMSMessageTags mMessageTag; eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x01 for WMSModifyTag() struct sWMSModifyTagRequest_MessageTag { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x10 for WMSModifyTag() struct sWMSModifyTagRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSDelete() struct sWMSDeleteRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSDelete() struct sWMSDeleteRequest_MessageIndex { UINT32 mStorageIndex; }; // Structure to describe request TLV 0x11 for WMSDelete() struct sWMSDeleteRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x12 for WMSDelete() struct sWMSDeleteRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetMessageProtocol() struct sWMSGetMessageProtocolResponse_MessageProtocol { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x01 for WMSListMessages() struct sWMSListMessagesRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSListMessages() struct sWMSListMessagesRequest_MessageTag { eQMIWMSMessageTags mMessageTag; }; // Structure to describe request TLV 0x11 for WMSListMessages() struct sWMSListMessagesRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSListMessages() struct sWMSListMessagesResponse_MessageList { UINT32 mNumberOfMessages; struct sMessage { UINT32 mStorageIndex; eQMIWMSMessageTags mMessageTag; }; // This array must be the size specified by mNumberOfMessages // sMessage mMessages[1]; }; // Structure to describe request TLV 0x01 for WMSSetRoutes() struct sWMSSetRoutesRequest_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSReceiptActions mReceiptAction; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe request TLV 0x10 for WMSSetRoutes() struct sWMSSetRoutesRequest_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetRoutes() struct sWMSGetRoutesResponse_RouteList { UINT16 mNumberOfRoutes; struct sRoute { eQMIWMSMessageTypes mMessageType; eQMIWMSMessageClasses mMessageClass; eQMIWMSStorageTypes mStorageType; eQMIWMSRouteValues mRouteValue; }; // This array must be the size specified by mNumberOfRoutes // sRoute mRoutes[1]; }; // Structure to describe response TLV 0x10 for WMSGetRoutes() struct sWMSGetRoutesResponse_TransferStatusReport { INT8 mTransferStatusReports; }; // Structure to describe response TLV 0x01 for WMSGetSMSCAddress() struct sWMSGetSMSCAddressResponse_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x01 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_Address { // String is variable length, but must be size of the container // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSSetSMSCAddress() struct sWMSSetSMSCAddressRequest_AddressType { // String is variable length, but must be size of the container // char mSMSCAddressType[1]; }; // Structure to describe request TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MemoryStorage { eQMIWMSStorageTypes mStorageType; }; // Structure to describe request TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeRequest_MessageMode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_MaxSize { UINT32 mMaxStorageSizeInMessages; }; // Structure to describe response TLV 0x10 for WMSGetStorageMaxSize() struct sWMSGetStorageMaxSizeResponse_AvailableSize { UINT32 mFreeStorageSizeInMessages; }; // Structure to describe request TLV 0x01 for WMSSendACK() struct sWMSSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSSendACK() struct sWMSSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSSendACK() struct sWMSSendACKRequest_3GPPFailureInfo { UINT8 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSSendACK() struct sWMSSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendACK() struct sWMSSendACKResponse_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe request TLV 0x01 for WMSSetRetryPeriod() struct sWMSSetRetryPeriodRequest_Period { UINT32 mRetryPeriodInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetRetryInterval() struct sWMSSetRetryIntervalRequest_Interval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetDCDisconnectTimer() struct sWMSSetDCDisconnectTimerRequest_Timer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe request TLV 0x01 for WMSSetMemoryStatus() struct sWMSSetMemoryStatusRequest_Status { INT8 mMemoryIsAvailable; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastActivation() struct sWMSSetBroadcastActivationRequest_BCInfo { eQMIWMSMessageProtocols mMode; INT8 mActivateBroadcast; }; // Structure to describe request TLV 0x10 for WMSSetBroadcastActivation() struct sWMSSetBroadcastActivationRequest_BCFiltering { INT8 mNoBroadcastMessageFiltering; }; // Structure to describe request TLV 0x01 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPPInfo { UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x11 for WMSSetBroadcastConfig() struct sWMSSetBroadcastConfigRequest_3GPP2Info { UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigRequest_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x10 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for WMSGetBroadcastConfig() struct sWMSGetBroadcastConfigResponse_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x01 for WMS MemoryFullIndication struct sWMSMemoryFullIndication_Info { eQMIWMSStorageTypes mStorageType; eQMIWMSMessageProtocols mMode; }; // Structure to describe response TLV 0x01 for WMSGetDomainPreference() struct sWMSGetDomainPreferenceResponse_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSetDomainPreference() struct sWMSSetDomainPreferenceRequest_Pref { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe request TLV 0x01 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe response TLV 0x10 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageID { UINT16 mMessageID; }; // Structure to describe response TLV 0x11 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseCode { UINT16 mCauseCode; }; // Structure to describe response TLV 0x12 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe response TLV 0x13 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe response TLV 0x14 for WMSSendFromMemoryStore() struct sWMSSendFromMemoryStoreResponse_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe response TLV 0x01 for WMSGetWaitingMessage() struct sWMSGetWaitingMessageResponse_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe indication TLV 0x01 for WMS WaitingMessageIndication struct sWMSWaitingMessageIndication_WaitingMessageInfo { UINT8 mNumberOfWaitingMessages; eQMIWMSWaitingMessageType mWaitingMessageType; INT8 mActiveIndication; UINT8 mMessageCount; }; // Structure to describe request TLV 0x01 for WMSSetPrimaryClient() struct sWMSSetPrimaryClientRequest_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe indication TLV 0x01 for WMS SMSCAddressIndication struct sWMSSMSCAddressIndication_Address { char mSMSCAddressType[3]; UINT8 mSMSCAddressLength; // This array must be the size specified by mSMSCAddressLength // char mSMSCAddress[1]; }; // Structure to describe request TLV 0x10 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe request TLV 0x11 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe request TLV 0x12 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe request TLV 0x13 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe request TLV 0x14 for WMSIndicatorRegistration() struct sWMSIndicatorRegistrationRequest_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe response TLV 0x10 for WMSGetTransportInfoLayer() struct sWMSGetTransportInfoLayerResponse_TransportLayerRegistrationInfo { INT8 mRegistered; }; // Structure to describe response TLV 0x11 for WMSGetTransportLayerInfo() struct sWMSGetTransportLayerInfoResponse_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe indication TLV 0x01 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerRegInfo { INT8 mRegistered; }; // Structure to describe indication TLV 0x10 for WMS TransportLayerInfoIndication struct sWMSTransportLayerInfoIndication_TransportLayerInfo { eQMIWMSTransportType mTransportType; eQMIWMSTransportCapability mTransportCapability; }; // Structure to describe response TLV 0x10 for WMSGetNetworkRegistrationInfo() struct sWMSGetNetworkRegistrationInfoResponse_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe indication TLV 0x01 for WMS NetworkRegistrationInfoIndication struct sWMSNetworkRegistrationInfoIndication_NetworkRegistrationInfo { eQMIWMSNetworkRegistrationStatus mNetworkRegistrationStatus; }; // Structure to describe request TLV 0x01 for WMSBindSubscription() struct sWMSBindSubscriptionRequest_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe response TLV 0x10 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_TransportLayerInfoEvents { INT8 mTransportLayerInfoEvents; }; // Structure to describe response TLV 0x11 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_NetworkRegistrationInfoEvents { INT8 mNetworkRegistrationInfoEvents; }; // Structure to describe response TLV 0x12 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_CallStatusInfoEvents { INT8 mCallStatusInfoEvents; }; // Structure to describe response TLV 0x13 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x14 for WMSGetIndicatorRegistration() struct sWMSGetIndicatorRegistrationResponse_BroadcastConfigEvents { INT8 mBroadcastConfigEvents; }; // Structure to describe request TLV 0x01 for WMSGetSMSParameters() struct sWMSGetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe response TLV 0x10 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe response TLV 0x11 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe response TLV 0x12 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe response TLV 0x13 for WMSGetSMSParameters() struct sWMSGetSMSParametersResponse_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe request TLV 0x01 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_MessageMode { eQMIWMSSMSMessageMode mSMSMessageMode; }; // Structure to describe request TLV 0x10 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DestinationAddress { UINT8 mDestinationAddressLength; // This array must be the size specified by mDestinationAddressLength // UINT8 mDestinationAddress[1]; }; // Structure to describe request TLV 0x11 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ProtocolIdentifierData { eQMIWMSProtocolIdentifierData mProtocolIdentifierData; }; // Structure to describe request TLV 0x12 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_DataCodingScheme { UINT8 mDataCodingScheme; }; // Structure to describe request TLV 0x13 for WMSSetSMSParameters() struct sWMSSetSMSParametersRequest_ValidityPeriod { UINT8 mValidityPeriod; }; // Structure to describe indication TLV 0x01 for WMS CallStatusIndication struct sWMSCallStatusIndication_SMSCallStatusInfo { eQMIWMSSMSCallStatus mSMSCallStatus; }; // Structure to describe response TLV 0x10 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSGetDomainPreferenceConfig() struct sWMSGetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEDomain { eQMIWMSLTEDomains mLTEDomainPreference; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWDomain { eQMIWMSGSMWCDMADomains mDomainPreference; }; // Structure to describe response TLV 0x10 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_LTEOutcome { UINT16 mLTEDomainPreferenceOutcome; }; // Structure to describe response TLV 0x11 for WMSSetDomainPreferenceConfig() struct sWMSSetDomainPreferenceConfigResponse_GWOutcome { UINT16 mGWDomainPreferenceOutcome; }; // Structure to describe response TLV 0x10 for WMSGetRetryPeriod() struct sWMSGetRetryPeriodResponse_RetryPeriod { UINT32 mRetryPeriodInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetRetryInterval() struct sWMSGetRetryIntervalResponse_RetryInterval { UINT32 mRetryIntervalInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetDCDisconnectTimer() struct sWMSGetDCDisconnectTimerResponse_DCDisconnectTimer { UINT32 mDCDisconnectTimerInSeconds; }; // Structure to describe response TLV 0x10 for WMSGetMemoryStatus() struct sWMSGetMemoryStatusResponse_MemoryStatus { INT8 mMemoryIsAvailable; }; // Structure to describe response TLV 0x10 for WMSGetPrimaryClient() struct sWMSGetPrimaryClientResponse_PrimaryClientInfo { INT8 mPrimaryClient; }; // Structure to describe response TLV 0x10 for WMSGetSubscriptionBinding() struct sWMSGetSubscriptionBindingResponse_SubscriptionType { eQMIWMSSubscriptionType mSubscriptionType; }; // Structure to describe request TLV 0x01 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_MessageData { eQMIWMSMessageFormats mMessageFormat; UINT16 mRawMessageLength; // This array must be the size specified by mRawMessageLength // UINT8 mRawMessage[1]; }; // Structure to describe request TLV 0x10 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_ForceOnDC { INT8 mForceSendOnDC; eQMIWMSCDMAServiceOptions mServiceOption; }; // Structure to describe request TLV 0x11 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_FollowOnDC { INT8 mDoNotDisconnectDC; }; // Structure to describe request TLV 0x12 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_LinkControl { UINT8 mLinkTimerInSeconds; }; // Structure to describe request TLV 0x13 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x14 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessage { INT8 mMessageIsARetry; }; // Structure to describe request TLV 0x15 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_RetryMessageID { UINT32 mMessageRetryID; }; // Structure to describe request TLV 0x16 for WMSAsyncRawSend() struct sWMSAsyncRawSendRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseCode { UINT16 mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncRawSendIndication struct sWMSAsyncRawSendIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_ACK { UINT32 mTransactionID; eQMIWMSMessageProtocols mMode; INT8 mProcessedSuccessfully; }; // Structure to describe request TLV 0x10 for WMSAysncSendACK() struct sWMSAysncSendACKRequest_3GPP2FailureInfo { eQMIWMSErrorClasses2 mErrorClass; UINT8 mTransportLayerStatus; }; // Structure to describe request TLV 0x11 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_3GPPFailureInfo { UINT8 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe request TLV 0x12 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_SMSOnIMS { INT8 mACKToBeSentOnIMS; }; // Structure to describe request TLV 0x13 for WMSAsyncSendACK() struct sWMSAsyncSendACKRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_ACKFailureCause { eQMIWMSACKFailureCause mACKFailureCause; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendACKIndication struct sWMSAsyncSendACKIndication_UserData { UINT32 mUserData; }; // Structure to describe request TLV 0x01 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_Info { eQMIWMSStorageTypes mStorageType; UINT32 mStorageIndex; eQMIWMSMessageProtocols mMode; }; // Structure to describe request TLV 0x10 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_SMSOnIMS { INT8 mMessageToBeSentOnIMS; }; // Structure to describe request TLV 0x11 for WMSAsyncSendFromMemoryStore() struct sWMSAsyncSendFromMemoryStoreRequest_UserData { UINT32 mUserData; }; // Structure to describe indication TLV 0x01 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_Status { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageID { UINT16 mMessageID; }; // Structure to describe indication TLV 0x11 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseCode { UINT16 mCauseCode; }; // Structure to describe indication TLV 0x12 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_ErrorClass { eQMIWMSErrorClasses mErrorClass; }; // Structure to describe indication TLV 0x13 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CauseInfo { UINT16 mGSMWCDMARPCause; UINT8 mGSMWCDMATPCause; }; // Structure to describe indication TLV 0x14 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureType { eQMIWMSMessageDeliveryFailureType mMessageDeliveryFailureType; }; // Structure to describe indication TLV 0x15 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_MessageDeliveryFailureCause { eQMIWMSDeliveryFailures mDeliveryFailureCause; }; // Structure to describe indication TLV 0x16 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_CallControlModifiedInfo { UINT8 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x17 for WMS AsyncSendFromMemoryStoreIndication struct sWMSAsyncSendFromMemoryStoreIndication_UserData { UINT32 mUserData; }; // Structure to describe response TLV 0x10 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyEvents { INT8 mServiceReadyEvents; }; // Structure to describe response TLV 0x11 for WMSGetServiceReadyStatus() struct sWMSGetServiceReadyStatusResponse_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS ServiceReadyStatusIndication struct sWMSServiceReadyStatusIndication_ServiceReadyStatus { eQMIWMSServiceReadyStatus mReadyStatus; }; // Structure to describe indication TLV 0x01 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_Mode { eQMIWMSMessageProtocols mMode; }; // Structure to describe indication TLV 0x10 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPPInfo { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mMessageIDStart; UINT16 mMessageIDEnd; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for WMS BroadcastConfigIndication struct sWMSBroadcastConfigIndication_3GPP2Info { INT8 mActivated; UINT16 mNumberOfInstances; struct sInstance { UINT16 mServiceCategory; eQMIWMSLanguage mLanguage; INT8 mSelected; }; // This array must be the size specified by mNumberOfInstances // sInstance mInstances[1]; }; // Structure to describe request TLV 0x10 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEAIndicator { INT8 mReportNMEASentences; }; // Structure to describe request TLV 0x11 for PDSSetEventReport() struct sPDSSetEventReportRequest_ModeIndicator { INT8 mReportNMEASentencesPlusMode; }; // Structure to describe request TLV 0x12 for PDSSetEventReport() struct sPDSSetEventReportRequest_RawIndicator { INT8 mReportRawPositionData; }; // Structure to describe request TLV 0x13 for PDSSetEventReport() struct sPDSSetEventReportRequest_XTRARequestIndicator { INT8 mReportExternalXTRADataRequests; }; // Structure to describe request TLV 0x14 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeInjectionIndicator { INT8 mReportExternalTimeInjections; }; // Structure to describe request TLV 0x15 for PDSSetEventReport() struct sPDSSetEventReportRequest_WiFiIndicator { INT8 mReportExternalWiFiRequests; }; // Structure to describe request TLV 0x16 for PDSSetEventReport() struct sPDSSetEventReportRequest_SatelliteIndicator { INT8 mReportSatelliteInfo; }; // Structure to describe request TLV 0x17 for PDSSetEventReport() struct sPDSSetEventReportRequest_VXNetworkIndicator { INT8 mReportVXNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x18 for PDSSetEventReport() struct sPDSSetEventReportRequest_SUPLNetworkIndicator { INT8 mReportSUPLNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x19 for PDSSetEventReport() struct sPDSSetEventReportRequest_UMTSCPNetworkIndicator { INT8 mReportUMTSCPNetworkInitiatedPrompts; }; // Structure to describe request TLV 0x1A for PDSSetEventReport() struct sPDSSetEventReportRequest_PDSCommIndicator { INT8 mReportPDSCommEvents; }; // Structure to describe request TLV 0x1B for PDSSetEventReport() struct sPDSSetEventReportRequest_AccelerometerDataIndicator { INT8 mReportAccelerometerDataStatus; }; // Structure to describe request TLV 0x1C for PDSSetEventReport() struct sPDSSetEventReportRequest_GyroDataIndicator { INT8 mReportGyroDataStatus; }; // Structure to describe request TLV 0x1D for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSyncIndication { INT8 mReportTimeSyncRequest; }; // Structure to describe request TLV 0x1E for PDSSetEventReport() struct sPDSSetEventReportRequest_PositionReliablilityIndicator { INT8 mReportPositionReliability; }; // Structure to describe request TLV 0x1F for PDSSetEventReport() struct sPDSSetEventReportRequest_SensorDataUsageIndicator { INT8 mReportSensorDataUsage; }; // Structure to describe request TLV 0x20 for PDSSetEventReport() struct sPDSSetEventReportRequest_TimeSourceInformationIndicator { INT8 mReportTimeSourceInformation; }; // Structure to describe request TLV 0x21 for PDSSetEventReport() struct sPDSSetEventReportRequest_HeadingUncertaintyIndicator { INT8 mReportHeadingUncertaintyInformation; }; // Structure to describe request TLV 0x22 for PDSSetEventReport() struct sPDSSetEventReportRequest_NMEADebugStringIndicator { INT8 mReportNMEADebugStrings; }; // Structure to describe request TLV 0x23 for PDSSetEventReport() struct sPDSSetEventReportRequest_ExternalXTRADataIndicator { INT8 mReportExtendedXTRAData; }; // Structure to describe request TLV 0x24 for PDSSetEventReport() struct sPDSSetEventReportRequest_ServiceResetStatus { INT8 mReportServiceResetStatus; }; // Structure to describe indication TLV 0x10 for PDS EventReport struct sPDSEventReportIndication_NMEASentence { // String is variable length, but must be size of the container // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x11 for PDS EventReport struct sPDSEventReportIndication_NMEASentencePlusMode { eQMIPDSNMEASentenceOperatingModes mNMEASentenceOperatingMode; UINT16 mNMEASentenceLength; // This array must be the size specified by mNMEASentenceLength // char mNMEASentence[1]; }; // Structure to describe indication TLV 0x12 for PDS EventReport struct sPDSEventReportIndication_PositionSessionStatus { eQMIPDSSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x13 for PDS EventReport struct sPDSEventReportIndication_ParsedPositionData { bool mTimestampCalendarValid:1; bool mTimestampUTCValid:1; bool mLeapSecondsValid:1; bool mTimeUncertaintyValid:1; bool mLatitudeValid:1; bool mLongitudeValid:1; bool mEllipsoidAltitudeValid:1; bool mMeanSeaLevelAltitudeValid:1; bool mHorizontalSpeedValid:1; bool mVerticalSpeedValid:1; bool mHeadingValid:1; bool mHorizontalUncertaintyCircularValid:1; bool mHorizontalUncertaintyEllipseSemiMajorValid:1; bool mHorizontalUncertaintyEllipseSemiMinorValid:1; bool mHorizontalUncertaintyEllipseOrientAzimuthValid:1; bool mVerticalUncertaintyValid:1; bool mHorizontalVelocityUncertaintyValid:1; bool mVerticalVelocityUncertaintyValid:1; bool mHorizontalConfidenceValid:1; bool mPositionDOPValid:1; bool mHorizontalDOPValid:1; bool mVerticalDOPValid:1; bool mOperatingModeUsedValid:1; // Padding out 9 bits UINT8 mReserved1:1; UINT8 mReserved2; UINT16 mCalendarYear; eQMIPDSCalendarMonths mCalendarMonth; eQMIPDSCalendarDays mCalendarDay; UINT8 mCalendarDayOfMonth; UINT8 mCalendarHour; UINT8 mCalendarMinute; UINT8 mCalendarSecond; UINT16 mCalendarMillisecond; UINT8 mCalendarLeapSeconds; UINT64 mUTCTimestamp; UINT32 mUTCTimestampUncertainty; double mLatitude; double mLongitude; float mEllipsoidAltitude; float mMeanSeaLevelAltitude; float mHorizontalSpeed; float mVerticalSpeed; float mHeading; float mHorizontalUncertaintyCircular; float mHorizontalUncertaintyEllipseSemiMajor; float mHorizontalUncertaintyEllipseSemiMinor; float mHorizontalUncertaintyEllipseOrientAzimuth; float mVerticalUncertainty; float mHorizontalVelocityUncertainty; float mVerticalVelocityUncertainty; UINT8 mHorizontalConfidence; float mPositionDOP; float mHorizontalDOP; float mVerticalDOP; eQMIPDSNMEASentenceOperatingModes mOperatingMode; }; // Structure to describe indication TLV 0x14 for PDS EventReport struct sPDSEventReportIndication_ExternalXTRARequest { UINT16 mMaximumFileSize; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x15 for PDS EventReport struct sPDSEventReportIndication_ExternalTimeInjectionRequest { UINT32 mDelayThresholdMilliseconds; UINT8 mURLRecordCount; struct sURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // This array must be the size specified by mURLRecordCount // sURL mURLs[1]; }; // Structure to describe indication TLV 0x16 for PDS EventReport struct sPDSEventReportIndication_ExternalWiFiPositionRequest { eQMIPDSWiFiRequestTypes mWiFiRequestType; UINT16 mWiFiRequestTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x17 for PDS EventReport struct sPDSEventReportIndication_SatelliteInfo { bool mIonoValid:1; bool mSatelliteCountValid:1; bool mSatelliteListValid:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; INT8 mIonosphericCorrections; UINT8 mSVRecordCount; struct sSV { bool mSystemValid:1; bool mPRNValid:1; bool mHealthStatusValid:1; bool mProcessStatusValid:1; bool mEphemerisStateValid:1; bool mAlmanacStateValid:1; bool mElevationValid:1; bool mAzimuthValid:1; bool mCN0Valid:1; // Padding out 23 bits UINT8 mReserved3:7; UINT8 mReserved4[2]; eQMIPDSSVSystems mSystem; UINT8 mPRN; eQMIPDSSVHealthStatus mHealthLevel; eQMIPDSSVProcessingStatus mProcessingStatus; eQMIPDSSVEphemerisStatus mEphemerisState; eQMIPDSSVAlmanacStatus mAlmanacState; INT32 mElevation; UINT16 mAzimuth; UINT16 mCN0; }; // This array must be the size specified by mSVRecordCount // sSV mSVs[1]; }; // Structure to describe indication TLV 0x18 for PDS EventReport struct sPDSEventReportIndication_VXNetworkInitiatedPrompt { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe indication TLV 0x19 for PDS EventReport struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSEventReportIndication_SUPLNetworkInitiatedPrompt { sPDSEventReportIndication_SUPLNetworkInitiatedPrompt1 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt1; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt2 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt2; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt3 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt3; sPDSEventReportIndication_SUPLNetworkInitiatedPrompt4 mPDSEventReportIndication_SUPLNetworkInitiatedPrompt4; }; // Structure to describe indication TLV 0x1A for PDS EventReport struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 { UINT8 mServiceTypeID; }; struct sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt { sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt1; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt2; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt3; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt4; sPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5 mPDSEventReportIndication_UMTSCPNetworkInitiatedPrompt5; }; // Structure to describe indication TLV 0x1B for PDS EventReport struct sPDSEventReportIndication_CommEvents { eQMIPDSCommEventTypes mType; eQMIPDSCommEventProtocols mProtocolDataType; }; // Structure to describe indication TLV 0x1C for PDS EventReport struct sPDSEventReportIndication_PositionSource { bool mGPS:1; bool mCellID:1; bool mGlonass:1; bool mNetwork:1; bool mEPI:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x1D for PDS EventReport struct sPDSEventReportIndication_AccelerometerStreamingStatus { eQMIPDSStreamingStatus mAccelerometerStreamingStatus; }; // Structure to describe indication TLV 0x1E for PDS EventReport struct sPDSEventReportIndication_GyroStreamingStatus { eQMIPDSStreamingStatus mGyroStreamingStatus; }; // Structure to describe indication TLV 0x1F for PDS EventReport struct sPDSEventReportIndication_TimeSyncRequest { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x20 for PDS EventReport struct sPDSEventReportIndication_PositionReliabilityCounter { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe indication TLV 0x21 for PDS EventReport struct sPDSEventReportIndication_SensorDataUsage { bool mAccelerometer:1; bool mGyro:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; bool mHeadingAidedWithSensorData:1; bool mSpeedAidedWithSensorData:1; bool mPositionAidedWithSensorData:1; bool mVelocityAidedWithSensorData:1; // Padding out 12 bits UINT8 mReserved3:4; UINT8 mReserved4; }; // Structure to describe indication TLV 0x22 for PDS EventReport struct sPDSEventReportIndication_TimeSourceInformation { INT8 mTimeValid; eQMIPDSTimeSource mTimeSource; UINT32 mTimeUncertaintyMilliseconds; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT32 mReserved1; UINT32 mReserved2; UINT32 mReserved3; UINT32 mReserved4; UINT32 mReserved5; }; // Structure to describe indication TLV 0x23 for PDS EventReport struct sPDSEventReportIndication_EncryptedPositionInformation { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe indication TLV 0x24 for PDS EventReport struct sPDSEventReportIndication_HeadingUncertaintyInformation { float mHeadingUncertainty; float mGNSSHeadingUncertainty; UINT32 mReserved1; UINT32 mReserved2; }; // Structure to describe indication TLV 0x25 for PDS EventReport struct sPDSEventReportIndication_ProprietaryNMEADebugSentences { // String is variable length, but must be size of the container // char mNMEADebug[1]; }; // Structure to describe indication TLV 0x26 for PDS EventReport struct sPDSEventReportIndication_ExtendedExternalXTRADatabaseRequest { UINT32 mMaximumFileSize; UINT8 mURLCount; UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe indication TLV 0x27 for PDS EventReport struct sPDSEventReportIndication_ServiceResetStatus { eQMIPDSResetStates mServiceResetStatus; }; // Structure to describe response TLV 0x01 for PDSGetServiceState() struct sPDSGetServiceStateResponse_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe indication TLV 0x01 for PDS ServiceStateIndication struct sPDSServiceStateIndication_State { INT8 mServiceEnabled; eQMIPDSTrackingSessionStates mTrackingSessionState; }; // Structure to describe request TLV 0x01 for PDSSetServiceState() struct sPDSSetServiceStateRequest_State { INT8 mServiceEnabled; }; // Structure to describe request TLV 0x01 for PDSStartTrackingSession() struct sPDSStartTrackingSessionRequest_Session { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetTrackingSessionInfo() struct sPDSGetTrackingSessionInfoResponse_Info { eQMIPDSSessionControlTypes mSessionControl; eQMIPDSSessionTypes mSessionType; eQMIPDSOperationTypes mSessionOperation; eQMIPDSServerOptions mServerOption; UINT8 mTimeoutSeconds; UINT32 mSessionFixRequests; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe response TLV 0x10 for PDSGetNMEAConfig() struct sPDSGetNMEAConfigResponse_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_Config { bool mGPGGANMEASentences:1; bool mGPRMCNMEASentences:1; bool mGPGSVNMEASentences:1; bool mGPGSANMEASentences:1; bool mGPVTGNMEASentences:1; bool mGLGSVNMEASentences:1; bool mGNGSANMEASentences:1; bool mGNGNSNMEASentences:1; eQMIPDSOutputDevices mOutputDevice; eQMIPDSNMEAReportingOptions mNMEAReporting; }; // Structure to describe request TLV 0x10 for PDSSetNMEAConfig() struct sPDSSetNMEAConfigRequest_AdditionalConfig { bool mPQXFI:1; bool mPSTIS:1; // Padding out 14 bits UINT8 mReserved1:6; UINT8 mReserved2; }; // Structure to describe request TLV 0x01 for PDSInjectTimeReference() struct sPDSInjectTimeReferenceRequest_Time { UINT64 mSystemTimeMilliseconds; UINT16 mSystemDiscontinuties; }; // Structure to describe response TLV 0x01 for PDSGetDefaults() struct sPDSGetDefaultsResponse_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe request TLV 0x01 for PDSSetDefaults() struct sPDSSetDefaultsRequest_Defaults { eQMIPDSOperationTypes mSessionOperation; UINT8 mTimeoutSeconds; UINT32 mFixRequestIntervalSeconds; UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x10 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe response TLV 0x11 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe response TLV 0x12 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe response TLV 0x13 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Validity { UINT16 mValidPeriodGPSStartWeek; UINT16 mValidPeriodGPSStartWeekOffsetInMinutes; UINT16 mValidPeriodDurationInHours; }; // Structure to describe response TLV 0x14 for PDSGetXTRAParameters() struct sPDSGetXTRAParametersResponse_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x10 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Automatic { INT8 mAutomaticDownloadEnabled; UINT16 mDownloadIntervalInHours; }; // Structure to describe request TLV 0x11 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Medium { UINT8 mMediumPreferences; // This array must be the size specified by mMediumPreferences // eQMIPDSMediums mMediumPreference[1]; }; // Structure to describe request TLV 0x12 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Network { eQMIPDSWWANNetworkPreferences mWWANNetworkPreference; }; // Structure to describe request TLV 0x14 for PDSSetXTRAParameters() struct sPDSSetXTRAParametersRequest_Embedded { INT8 mEmbeddedXTRADataClientEnabled; INT8 mEmbeddedXTRATimeClientEnabled; }; // Structure to describe request TLV 0x12 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x10 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerAddress { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe response TLV 0x11 for PDSGetAGPSConfig() struct sPDSGetAGPSConfigResponse_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x10 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_Server { UINT8 mServerAddress[4]; UINT32 mServerPort; }; // Structure to describe request TLV 0x11 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_ServerURL { UINT8 mURLLength; // This array must be the size specified by mURLLength // char mURL[1]; }; // Structure to describe request TLV 0x12 for PDSSetAGPSConfig() struct sPDSSetAGPSConfigRequest_NetworkMode { eQMIPDSNetworkMode mNetworkMode; }; // Structure to describe response TLV 0x01 for PDSGetServiceAutoTrackingState() struct sPDSGetServiceAutoTrackingStateResponse_State { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetServiceAutoTrackingState() struct sPDSSetServiceAutoTrackingStateRequest_State { INT8 mAutoTrackingEnabled; }; // Structure to describe response TLV 0x01 for PDSGetCOMPortAutoTrackingConfig() struct sPDSGetCOMPortAutoTrackingConfigResponse_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x01 for PDSSetCOMPortAutoTrackingConfig() struct sPDSSetCOMPortAutoTrackingConfigRequest_Config { INT8 mAutoTrackingEnabled; }; // Structure to describe request TLV 0x10 for PDSResetPDSData() struct sPDSResetPDSDataRequest_GPSData { bool mResetEPH:1; bool mResetALM:1; bool mResetPOS:1; bool mResetTIME:1; bool mResetIONO:1; bool mResetUTC:1; bool mResetHEALTH:1; bool mResetSVDIR:1; bool mResetSVSTEER:1; bool mResetSADATA:1; bool mResetRTI:1; bool mResetALMCORR:1; bool mResetFREQBIASEST:1; // Padding out 19 bits UINT8 mReserved1:3; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x11 for PDSResetPDSData() struct sPDSResetPDSDataRequest_CellData { bool mResetPOS:1; bool mResetLATESTGPSPOS:1; bool mResetOTAPOS:1; bool mResetEXTREFPOS:1; bool mResetTIMETAG:1; bool mResetCELLID:1; bool mResetCACHEDCELLID:1; bool mResetLASTSRVCELL:1; bool mResetCURSRVCELL:1; bool mResetNEIGHBORINFO:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x10 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Mode { eQMIPDSOperationTypes mSessionOperation; }; // Structure to describe request TLV 0x11 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Timeout { UINT8 mTimeoutSeconds; }; // Structure to describe request TLV 0x12 for PDSSinglePositionFix() struct sPDSSinglePositionFixRequest_Accuracy { UINT32 mDesiredAccuracyMeters; }; // Structure to describe response TLV 0x01 for PDSGetServiceVersion() struct sPDSGetServiceVersionResponse_Version { UINT8 mServiceMajorVersion; UINT8 mServiceMinorVersion; }; // Structure to describe request TLV 0x01 for PDSInjectXTRAData() struct sPDSInjectXTRADataRequest_Data { UINT8 mSequenceNumber; UINT16 mTotalLength; UINT16 mSequenceLength; // This array must be the size specified by mSequenceLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Timestamp { UINT64 mUTCTimestamp; }; // Structure to describe request TLV 0x11 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Latitude { double mLatitude; }; // Structure to describe request TLV 0x12 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Longitude { double mLongitude; }; // Structure to describe request TLV 0x13 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeEllipsoid { float mEllipsoidAltitude; }; // Structure to describe request TLV 0x14 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeSeaLevel { float mMeanSeaLevelAltitude; }; // Structure to describe request TLV 0x15 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalUncertainty { float mHorizontalUncertaintyCircular; }; // Structure to describe request TLV 0x16 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalUncertainty { float mVerticalUncertainty; }; // Structure to describe request TLV 0x17 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_HorizontalConfidence { UINT8 mHorizontalConfidence; }; // Structure to describe request TLV 0x18 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_VerticalConfidence { UINT8 mVerticalConfidence; }; // Structure to describe request TLV 0x19 for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_Source { eQMIPDSInjectedPositionSources mSource; }; // Structure to describe request TLV 0x1A for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_TimeType { eQMIPDSTimeType mTimeType; }; // Structure to describe request TLV 0x1B for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; eQMIPDSReliabilityIndicator mReliabilityIndicatorVertical; }; // Structure to describe request TLV 0x1C for PDSInjectPositionData() struct sPDSInjectPositionDataRequest_AltitudeInformation { eQMIPDSAltitudeSource mAltitudeSource; eQMIPDSSourceLinkage mSourceLinkage; eQMIPDSUncertaintyCoverage mUncertaintyCoverage; }; // Structure to describe request TLV 0x10 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Time { UINT32 mWiFiTimeCounterMilliseconds; }; // Structure to describe request TLV 0x11 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_Position { INT32 mWiFiLatitude; INT32 mWiFiLongitude; UINT16 mHEPEInMeters; UINT8 mAPCount; UINT8 mErrorCode; }; // Structure to describe request TLV 0x12 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_APInfo { UINT8 mAPCount; struct sAP { UINT8 mMACAddress[6]; UINT32 mRSSI; UINT16 mBeaconChannel; bool mUsedForPosition:1; bool mHiddenSSID:1; bool mEncryptionOn:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mAPCount // sAP mAPs[1]; }; // Structure to describe request TLV 0x13 for PDSInjectWiFiPositionData() struct sPDSInjectWiFiPositionDataRequest_PositionReliability { eQMIPDSReliabilityIndicator mReliabilityIndicatorHorizontal; }; // Structure to describe response TLV 0x10 for PDSGetSBASConfig() struct sPDSGetSBASConfigResponse_Config { eQMIPDSSBASStates mState; }; // Structure to describe request TLV 0x10 for PDSSetSBASConfig() struct sPDSSetSBASConfigRequest_Config { INT8 mEnableSBAS; }; // Structure to describe request TLV 0x01 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_Action { INT8 mAllowRequest; }; // Structure to describe request TLV 0x10 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_VX { bool mPrivacyValid:1; bool mQoSValid:1; bool mCountValid:1; bool mIntervalValid:1; bool mModeValid:1; bool mRequestorIDValid:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mQoS; UINT32 mPositionCount; UINT32 mIntervalBetweenFixesSeconds; eQMIPDSVXModes mMode; eQMIPDSVXDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; // Structure to describe request TLV 0x11 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_SUPL1 { bool mPrivacyValid:1; bool mINITHashValid:1; bool mModeValid:1; bool mSLPSessionIDValid:1; bool mSLPServerIPv4AddressValid:1; bool mSLPServerIPv6AddressValid:1; bool mSLPServerURLAddressValid:1; bool mDCSValid:1; bool mRequestorIDValid:1; bool mClientNameValid:1; bool mQoPHorizontalAccuracyValid:1; bool mQoPVerticalAccuracyValid:1; bool mQoPMaxLocationAgeValid:1; bool mQoPDelayValid:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; eQMIPDSPrivacyModes mPrivacy; UINT64 mINITHash; eQMIPDSSUPLModes mMode; UINT32 mSLPSessionID; UINT32 mSLPServerIPv4Port; UINT8 mSLPServerIPv4Address[4]; UINT32 mSLPServerIPv6Port; UINT8 mSLPServerIPv6Address[16]; UINT8 mSLPServerURLLength; // This array must be the size specified by mSLPServerURLLength // char mSLPServerURLAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL2 { eQMIPDSSUPLDataCodingSchemes mRequestDCS; eQMIPDSSUPLIDNameDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL3 { eQMIPDSSUPLIDNameDataCodingSchemes mClientNameDCS; UINT8 mClientNameLength; // This array must be the size specified by mClientNameLength // UINT8 mClientName[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL4 { UINT8 mQoPHorizontalAccuracy; UINT8 mQoPVerticalAccuracy; UINT8 mQoPMaxLocationAge; UINT8 mQoPDelay; }; struct sPDSSendNetworkInitiatedResponseRequest_SUPL { sPDSSendNetworkInitiatedResponseRequest_SUPL1 mPDSSendNetworkInitiatedResponseRequest_SUPL1; sPDSSendNetworkInitiatedResponseRequest_SUPL2 mPDSSendNetworkInitiatedResponseRequest_SUPL2; sPDSSendNetworkInitiatedResponseRequest_SUPL3 mPDSSendNetworkInitiatedResponseRequest_SUPL3; sPDSSendNetworkInitiatedResponseRequest_SUPL4 mPDSSendNetworkInitiatedResponseRequest_SUPL4; }; // Structure to describe request TLV 0x12 for PDSSendNetworkInitiatedResponse() struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 { bool mPrivacyValid:1; bool mInvokeIDValid:1; bool mNotificationTextValid:1; bool mClientAddressValid:1; bool mLocationTypeValid:1; bool mRequestorIDValid:1; bool mCodewordStringValid:1; bool mServiceTypeIDValid:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMIPDSPrivacyModes mPrivacy; UINT8 mInvokeID; eQMIPDSUMTSCPDataCodingSchemes mNotificationTextDCS; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // char mClientAddress[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 { eQMIPDSUMTSCPLocationTypes mLocationType; eQMIPDSUMTSCPDataCodingSchemes mRequestorIDDCS; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 { eQMIPDSUMTSCPDataCodingSchemes mCodewordDCS; UINT8 mCodewordLength; // This array must be the size specified by mCodewordLength // UINT8 mCodeword[1]; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 { UINT8 mServiceTypeID; }; struct sPDSSendNetworkInitiatedResponseRequest_UMTSCP { sPDSSendNetworkInitiatedResponseRequest_UMTSCP1 mPDSSendNetworkInitiatedResponseRequest_UMTSCP1; sPDSSendNetworkInitiatedResponseRequest_UMTSCP2 mPDSSendNetworkInitiatedResponseRequest_UMTSCP2; sPDSSendNetworkInitiatedResponseRequest_UMTSCP3 mPDSSendNetworkInitiatedResponseRequest_UMTSCP3; sPDSSendNetworkInitiatedResponseRequest_UMTSCP4 mPDSSendNetworkInitiatedResponseRequest_UMTSCP4; sPDSSendNetworkInitiatedResponseRequest_UMTSCP5 mPDSSendNetworkInitiatedResponseRequest_UMTSCP5; }; // Structure to describe request TLV 0x01 for PDSInjectAbsoluteTime() struct sPDSInjectAbsoluteTimeRequest_Time { UINT64 mTimestampMilliseconds; UINT32 mTimeUncertaintyMilliseconds; eQMIPDSTimeBases mTimeBase; INT8 mForceAcceptance; }; // Structure to describe request TLV 0x01 for PDSInjectEFSData() struct sPDSInjectEFSDataRequest_DateFile1 { UINT8 mFilenameLength; // This array must be the size specified by mFilenameLength // char mFilename[1]; }; struct sPDSInjectEFSDataRequest_DateFile2 { eQMIPDSEFSFileOperations mFileOperation; UINT32 mDataLength; UINT8 mPartNumber; UINT8 mTotalParts; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; struct sPDSInjectEFSDataRequest_DateFile { sPDSInjectEFSDataRequest_DateFile1 mPDSInjectEFSDataRequest_DateFile1; sPDSInjectEFSDataRequest_DateFile2 mPDSInjectEFSDataRequest_DateFile2; }; // Structure to describe response TLV 0x10 for PDSGetDPOConfig() struct sPDSGetDPOConfigResponse_Config { INT8 mDataPowerOptimizationEnabled; }; // Structure to describe request TLV 0x10 for PDSSetDPOConfig() struct sPDSSetDPOConfigRequest_Config { eQMIPDSConfig mConfiguration; }; // Structure to describe response TLV 0x10 for PDSGetODPConfig() struct sPDSGetODPConfigResponse_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe request TLV 0x10 for PDSSetODPConfig() struct sPDSSetODPConfigRequest_Config { eQMIPDSODPStates mOnDemandPositioning; }; // Structure to describe response TLV 0x10 for PDSGetGPSState() struct sPDSGetGPSStateResponse_State { INT8 mEngineEnabled; bool mPositionValid:1; bool mAltitudeVerticalUncertaintyValid:1; bool mTimeMillisecondsValid:1; bool mTimeWeekNumberValid:1; bool mTimeUncertaintyValid:1; bool mIonoValid:1; bool mGPSEphemerisValid:1; bool mGPSAlmanacValid:1; bool mGPSHealthValid:1; bool mGPSVisibleSVsValid:1; bool mGlonassEphemerisValid:1; bool mGlonassAlmanacValid:1; bool mGlonassHealthValid:1; bool mGlonassVisibleSVsValid:1; bool mSBASEphemerisValid:1; bool mSBASAlmanacValid:1; bool mSBASHealthValid:1; bool mSBASVisibleSVsValid:1; bool mXTRAInformationValid:1; // Padding out 5 bits UINT8 mReserved1:5; double mLatitude; double mLongitude; float mHorizontalUncertaintyCircular; float mEllipsoidAltitude; float mVerticalUncertainty; UINT32 mTimestampInTOWMilliseconds; UINT16 mGPSWeekNumber; UINT32 mTimeUncertaintyMilliseconds; INT8 mIonoIsValid; UINT32 mGPSEphemerisSVMask; UINT32 mGPSAlmanacSVMask; UINT32 mGPSHealthSVMask; UINT32 mGPSVisibleSVMask; UINT32 mGlonassEphemerisSVMask; UINT32 mGlonassAlmanacSVMask; UINT32 mGlonassHealthSVMask; UINT32 mGlonassVisibleSVMask; UINT32 mSBASEphemerisSVMask; UINT32 mSBASAlmanacSVMask; UINT32 mSBASHealthSVMask; UINT32 mSBASVisibleSVMask; UINT16 mXTRAGPSStartWeek; UINT16 mXTRAGPSStartMinutes; INT32 mElevation; }; // Structure to describe request TLV 0x01 for PDSSetPPMEventReport() struct sPDSSetPPMEventReportRequest_ReportPPMEvents { INT8 mReportPPMEvents; }; // Structure to describe request TLV 0x01 for PDSSetSPIStreamingReport() struct sPDSSetSPIStreamingReportRequest_ReportEvents { INT8 mReportSPIEvents; }; // Structure to describe indication TLV 0x10 for PDS SetSPIStreamingReportIndication struct sPDSSetSPIStreamingReportIndication_SPIStreamingRequest { INT8 mStreamSPIStatus; }; // Structure to describe request TLV 0x01 for PDSSetSPIStatus() struct sPDSSetSPIStatusRequest_Status { eQMIPDSSPIState mSPIState; UINT8 mSPIConfidence; }; // Structure to describe request TLV 0x01 for PDSSetPPMReportingState() struct sPDSSetPPMReportingStateRequest_PPMReportingState { eQMIPDSReportingState mReportingState; UINT16 mReportingPeriodSeconds; }; // Structure to describe indication TLV 0x10 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMPageReport { UINT32 mPageTimeMilliseconds; UINT16 mPagePNOffset; UINT8 mPageBandClass; UINT16 mPageCDMAFrequency; UINT16 mPageBaseID; UINT16 mPageSystemID; UINT16 mPageNetworkID; }; // Structure to describe indication TLV 0x11 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMMeasurementReport { UINT32 mReferenceTimeMilliseconds; UINT8 mReferenceBandClass; UINT16 mReferenceCDMAFrequency; UINT8 mReferenceTotalRXPower; UINT16 mReferencePNOffset; UINT8 mReferenceStrength; UINT8 mReferenceRMSErrorPhase; UINT8 mNumberOfPilots; struct sPilot { UINT16 mPilotPNOffset; UINT8 mPilotStrength; UINT8 mPilotRMSErrorPhase; INT16 mPilotPhase; }; // This array must be the size specified by mNumberOfPilots // sPilot mPilots[1]; }; // Structure to describe indication TLV 0x12 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMSuspendReason { eQMIPDSSuspendReason mSuspendReason; }; // Structure to describe indication TLV 0x13 for PDS SetPPMReportingStateIndication struct sPDSSetPPMReportingStateIndication_PPMStopReason { eQMIPDSStopReason mStopReason; }; // Structure to describe request TLV 0x01 for PDSForceReceiverOff() struct sPDSForceReceiverOffRequest_ForceReceiverOff { eQMIPDSForceReceiverOff mForceReceiverOff; }; // Structure to describe response TLV 0x10 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x11 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe response TLV 0x12 for PDSGetPositionMethodsState() struct sPDSGetPositionMethodsStateResponse_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRATime { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x11 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_XTRAData { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x12 for PDSSetPositionMethodsState() struct sPDSSetPositionMethodsStateRequest_WiFi { eQMIPDSMethodStates mMethodState; }; // Structure to describe request TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisAccelerometerData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe request TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataRequest_3AxisGyroData { UINT32 mSensorTimeOfFirstSampleMilliseconds; bool mSignReversalRequired:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mNumberOfSamples; struct sSample { UINT16 mSampleTimeOffsetMilliseconds; float mXAxisSample; float mYAxisSample; float mZAxisSample; }; // This array must be the size specified by mNumberOfSamples // sSample mSamples[1]; }; // Structure to describe response TLV 0x10 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_AccelerometerSampleSetCount { UINT8 mAccelerometerSampleSetCount; }; // Structure to describe response TLV 0x11 for PDSInjectSensorData() struct sPDSInjectSensorDataResponse_GyroSampleSetCount { UINT8 mGyroSampleSetCount; }; // Structure to describe request TLV 0x01 for PDSInjectTimeSyncData() struct sPDSInjectTimeSyncDataRequest_TimeTag { UINT32 mReferenceCounter; UINT32 mSensorProcessorRXTimeMilliseconds; UINT32 mSensorProcessorTXTimeMilliseconds; }; // Structure to describe response TLV 0x10 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe response TLV 0x11 for PDSGetSensorConfig() struct sPDSGetSensorConfigResponse_ExternalPowerSupplyState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe request TLV 0x10 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_CradleMountState { eQMIPDSCradleMountState mCradleMountState; UINT8 mCradleMountStateConfidence; }; // Structure to describe request TLV 0x11 for PDSSetSensorConfig() struct sPDSSetSensorConfigRequest_ExternalPowerState { eQMIPDSExternalPowerState mExternalPowerSupplyState; }; // Structure to describe response TLV 0x10 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe response TLV 0x11 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe response TLV 0x12 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VirtualGyroGravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe response TLV 0x13 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe response TLV 0x14 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe response TLV 0x15 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x16 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x17 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x18 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x19 for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe response TLV 0x1A for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x1B for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe response TLV 0x1C for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe response TLV 0x1D for PDSGetSensorNavigation() struct sPDSGetSensorNavigationResponse_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe request TLV 0x10 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroDataVariance { float mGyroDataVariance; }; // Structure to describe request TLV 0x11 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_GyroBiasRandomWalk { float mGyroBiasRandomWalk; }; // Structure to describe request TLV 0x12 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VirtualGyroCravityAveragingLength { UINT32 mVirtualGyroGravityAveragingLengthMilliseconds; }; // Structure to describe request TLV 0x13 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_HeadingFilterMode { INT8 mHeadingFilterMode; }; // Structure to describe request TLV 0x14 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_VelocityConstraintVariance { float mVelocityConstraintVariance; }; // Structure to describe request TLV 0x15 for PDSSetNavigationConfig() struct sPDSSetNavigationConfigRequest_PositioningMethod { bool mSuppressInjectedPosition:1; bool mReportUsingInstantaneousInformation:1; bool mDisablePersistentMemoryStorage:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x16 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x17 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x18 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x19 for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x1A for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_SensorAlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x1B for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_MaximumDeadReckoningTime { UINT32 mMaximumDeadReckoningTimeSeconds; }; // Structure to describe request TLV 0x1C for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterLowThreshold { UINT8 mINSFilterCrossCheckSigmaLowThreshold; }; // Structure to describe request TLV 0x1D for PDSSetSensorNavigation() struct sPDSSetSensorNavigationRequest_INSFilterHighThreshold { UINT8 mINSFilterCrossCheckSigmaHighThreshold; }; // Structure to describe request TLV 0x10 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BlankingEnable { eQMIPDSBlankingEnable mBlankingEnable; }; // Structure to describe request TLV 0x11 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_ActiveChannels { bool mChannel1:1; bool mChannel2:1; bool mChannel3:1; bool mChannel4:1; bool mChannel5:1; bool mChannel6:1; bool mChannel7:1; bool mChannel8:1; bool mChannel9:1; bool mChannel10:1; bool mChannel11:1; bool mChannel12:1; bool mChannel13:1; bool mChannel14:1; // Padding out 18 bits UINT8 mReserved1:2; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x12 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_BluetoothJamming { INT8 mBluetoothJammingActive; }; // Structure to describe request TLV 0x13 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_IMDJamming { eQMIPDSIMDJammingStates mSimulateIMDJamming; }; // Structure to describe request TLV 0x14 for PDSSetWLANBlanking() struct sPDSSetWLANBlankingRequest_JammingBands { eQMIPDSIMDJammingBands mBandstoJam; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallengeReport() struct sPDSSetSecurityChallengeReportRequest_EnableSecurity { eQMIPDSReportSecurityChallenge mReportSecurityChallenge; }; // Structure to describe indication TLV 0x10 for PDS SetSecurityChallengeReportIndication struct sPDSSetSecurityChallengeReportIndication_EnableSecurity { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityChallenge() struct sPDSSetSecurityChallengeRequest_SecureHashAlgorithm { UINT8 mEncryptionDataID; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe response TLV 0x10 for PDSGetSecurityEncryptionConfig() struct sPDSGetSecurityEncryptionConfigResponse_SecureClientTimestamp { eQMIPDSEncryptionAlgorithm mEncryptionAlgorithm; UINT64 mEncryptionTimestampMilliseconds; UINT8 mEncryptionDataLength; // This array must be the size specified by mEncryptionDataLength // UINT8 mEncryptionData[1]; }; // Structure to describe request TLV 0x10 for PDSSetSecurityUpdateRate() struct sPDSSetSecurityUpdateRateRequest_EnableSecurity { UINT8 mUpdateRate; }; // Structure to describe request TLV 0x10 for PDSSetCellDatabaseControl() struct sPDSSetCellDatabaseControlRequest_Control { bool mPositionInfoStorage:1; bool mTimeInfoStorage:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PDSInjectMotionData() struct sPDSInjectMotionDataRequest_MotionData { eQMIPDSMotionStates mMotionState; eQMIPDSMotionModes mMotionMode; eQMIPDSMotionSubmodes mMotionSubmode; float mStateProbability; UINT16 mMotionDataAgeMilliseconds; UINT16 mMotionDataTimoutMilliseconds; }; // Structure to describe request TLV 0x01 for PDSSetGNSSEngineErrorRecoveryReport() struct sPDSSetGNSSEngineErrorRecoveryReportRequest_Indicator { INT8 mReportGNSSEngineErrorRecovery; }; // Structure to describe indication TLV 0x01 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_Reason { eQMIPDSResetReasons mResetReason; }; // Structure to describe indication TLV 0x10 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_CurrentSystemTime { UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x11 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ScanParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mCN0; UINT16 mSubMillisecondDifferenceMicroseconds; INT16 mDopplerDifferenceHz; }; // Structure to describe indication TLV 0x12 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_ClockParameters { eQMIPDSSVSystems mSystem; eQMIPDSTimeSource mCurrentTimeSource; eQMIPDSTimeSource mInjectedTimeSource; UINT32 mTimeDifferenceMilliseconds; UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe indication TLV 0x13 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_SubframeParameters { UINT8 mPRN; INT32 mGPSDataDemodulationINProgress; UINT16 mObservedCycleSlips; UINT16 mParityErrors; UINT32 mGPSSubframeWordWithTimingError; }; // Structure to describe indication TLV 0x14 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_TimeParameters { eQMIPDSSVSystems mSystem; UINT8 mPRN; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT16 mGNSSNumberOfDays; UINT32 mGNSSMilliseconds; UINT32 mClockDifferenceMilliseconds; }; // Structure to describe indication TLV 0x15 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_MeasurementParameters { eQMIPDSSVSystems mSystem; UINT16 mGPSWeekNumber; UINT32 mGPSTimeOfWeekMilliseconds; UINT8 mObservedMeasurementInconsistencies; UINT16 mObservationDuration; }; // Structure to describe indication TLV 0x16 for PDS GNSSEngineErrorRecoveryReport struct sPDSGNSSEngineErrorRecoveryReportIndication_RFParameters { UINT32 mQualitySignalStrength; UINT32 mResetSignalStrength; }; // Structure to describe request TLV 0x10 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeUncertainty { UINT32 mTimeUncertaintyMicroseconds; }; // Structure to describe request TLV 0x11 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionUncertainty { UINT32 mPositionUncertaintyCentimeters; }; // Structure to describe request TLV 0x12 for PDSInjectTestData() struct sPDSInjectTestDataRequest_TimeOffset { UINT64 mTimeOffsetMicroseconds; }; // Structure to describe request TLV 0x13 for PDSInjectTestData() struct sPDSInjectTestDataRequest_PositionOffset { UINT32 mPositionOffsetMeters; }; // Structure to describe request TLV 0x01 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_PeakAntennaGain { INT16 mPeakAntennaGain; }; // Structure to describe request TLV 0x10 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GPSRFLoss { UINT16 mRFLoss; }; // Structure to describe request TLV 0x11 for PDSSetGNSSRFConfig() struct sPDSSetGNSSRFConfigRequest_GlonassRFLoss { UINT16 mRFLossFrequency0; UINT16 mRFLossFrequencyMinus7; UINT16 mRFLossFrequencyPlus6; }; // Structure to describe request TLV 0x10 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MethodMask { bool mEAPSIM:1; bool mEAPAKA:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x11 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_UserID { UINT8 mUserIDLength; // This array must be the size specified by mUserIDLength // UINT8 mUserID[1]; }; // Structure to describe request TLV 0x12 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_MetaIdentity { UINT8 mMetaIdentityLength; // This array must be the size specified by mMetaIdentityLength // UINT8 mMetaIdentity[1]; }; // Structure to describe request TLV 0x13 for AUTHStartEAPSession() struct sAUTHStartEAPSessionRequest_SIMAKAAlgorithm { eQMIAUTHSIMAKAAlgorithm mSIMAKAAlgorithm; }; // Structure to describe request TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketRequest_RequestPacket { UINT8 mEAPRequestPacket[9999]; }; // Structure to describe response TLV 0x01 for AUTHSendEAPPacket() struct sAUTHSendEAPPacketResponse_ResponsePacket { UINT8 mResponsePacket[9999]; }; // Structure to describe indication TLV 0x01 for AUTH EAPSessionResultIndication struct sAUTHEAPSessionResultIndication_Result { eQMIAUTHEAPResult mResult; }; // Structure to describe response TLV 0x01 for AUTHGetEAPSessionKeys() struct sAUTHGetEAPSessionKeysResponse_SessionKeys { UINT8 mSessionKeys[9999]; }; // Structure to describe request TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKARequest_Version { eQMIAUTHAKAVersion mAKAVersion; }; // Structure to describe request TLV 0x10 for AUTHRunAKA() struct sAUTHRunAKARequest_Parameters1 { UINT8 mRandomChallengeLength; // This array must be the size specified by mRandomChallengeLength // UINT8 mRandomChallenge[1]; }; struct sAUTHRunAKARequest_Parameters2 { UINT8 mAuthenticationTokenLength; // This array must be the size specified by mAuthenticationTokenLength // UINT8 mAuthenticationToken[1]; }; struct sAUTHRunAKARequest_Parameters { sAUTHRunAKARequest_Parameters1 mAUTHRunAKARequest_Parameters1; sAUTHRunAKARequest_Parameters2 mAUTHRunAKARequest_Parameters2; }; // Structure to describe response TLV 0x01 for AUTHRunAKA() struct sAUTHRunAKAResponse_Handle { UINT32 mHandle; }; // Structure to describe indication TLV 0x01 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_Result { UINT32 mHandle; eQMIAUTHAKAResult mResult; }; // Structure to describe indication TLV 0x10 for AUTH AKAResultIndication struct sAUTHAKAResultIndication_V1V2ResponseData1 { UINT8 mDigestLength; // This array must be the size specified by mDigestLength // UINT8 mDigest[1]; }; struct sAUTHAKAResultIndication_V1V2ResponseData2 { UINT8 mAKADataLength; // This array must be the size specified by mAKADataLength // UINT8 mAKAData[1]; }; struct sAUTHAKAResultIndication_V1V2ResponseData { sAUTHAKAResultIndication_V1V2ResponseData1 mAUTHAKAResultIndication_V1V2ResponseData1; sAUTHAKAResultIndication_V1V2ResponseData2 mAUTHAKAResultIndication_V1V2ResponseData2; }; // Structure to describe request TLV 0x10 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_DTMF { INT8 mEnableEvents; }; // Structure to describe request TLV 0x11 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_VoicePrivacy { INT8 mEnableEvents; }; // Structure to describe request TLV 0x12 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SupplementaryService { INT8 mEnableEvents; }; // Structure to describe request TLV 0x13 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_CallNotification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x14 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Handover { INT8 mEnableEvents; }; // Structure to describe request TLV 0x15 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_SpeechCodec { INT8 mEnableEvents; }; // Structure to describe request TLV 0x16 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_USSDNotification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x17 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Supplementary { INT8 mEnableEvents; }; // Structure to describe request TLV 0x18 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_Modification { INT8 mEnableEvents; }; // Structure to describe request TLV 0x19 for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_UUS { INT8 mEnableEvents; }; // Structure to describe request TLV 0x1A for VoiceIndicationRegistration() struct sVoiceIndicationRegistrationRequest_AOC { INT8 mEnableEvents; }; // Structure to describe request TLV 0x01 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallingNumber { // String is variable length, but must be size of the container // char mCallingNumber[1]; }; // Structure to describe request TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CLIR { eQMIVoiceCLIRTypes mCLIRType; }; // Structure to describe request TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CUG { UINT16 mCUGIndex; INT8 mSuppressPreferentialCUG; INT8 mSuppressOASubscription; }; // Structure to describe request TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_EmergencyCategory { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualCall:1; bool mAutomaticCall:1; bool mReserved:1; }; // Structure to describe request TLV 0x15 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_CalledPartySubaddress { eQMIVoiceSubaddressTypes mSubaddressType; eQMIVoiceEvenOddIndicators mAddressSignals; UINT8 mSubaddressLength; // This array must be the size specified by mSubaddressLength // UINT8 mSubaddress[1]; }; // Structure to describe request TLV 0x16 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_ServiceType { eQMIVoiceServiceTypes mServiceType; }; // Structure to describe request TLV 0x17 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_SIPURIOverflow { // String is variable length, but must be size of the container // char mSIPURIOverflow[1]; }; // Structure to describe request TLV 0x18 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x19 for VoiceCallOriginate() struct sVoiceCallOriginateRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x10 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x14 for VoiceCallOriginate() struct sVoiceCallOriginateResponse_EndReason { eQMIVoiceEndReasons mEndReason; }; // Structure to describe request TLV 0x01 for VoiceCallEnd() struct sVoiceCallEndRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceCallEnd() struct sVoiceCallEndResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x11 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x12 for VoiceCallAnswer() struct sVoiceCallAnswerRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x10 for VoiceCallAnswer() struct sVoiceCallAnswerResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceGetCallInfo() struct sVoiceGetCallInfoRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_CallInfo { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; }; // Structure to describe response TLV 0x11 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyNumber { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x12 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ServiceOption { UINT16 mServiceOption; }; // Structure to describe response TLV 0x13 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x14 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x15 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_RemotePartyName { eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // Structure to describe response TLV 0x16 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_UUS { eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingType { eQMIVoiceAlertingTypes mAlertingType; }; // Structure to describe response TLV 0x18 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x19 for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe response TLV 0x1A for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_DiagnosticInfo { UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // Structure to describe response TLV 0x1B for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AlertingPattern { eQMIVoiceAlertingPatterns mAlertingPattern; }; // Structure to describe response TLV 0x1C for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe response TLV 0x1D for VoiceGetCallInfo() struct sVoiceGetCallInfoResponse_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for Voice OTASPIndication struct sVoiceOTASPIndication_OTASPStatus { UINT8 mCallID; eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe indication TLV 0x01 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Signal { UINT8 mSignalType; UINT8 mAlertPitch; UINT8 mSignal; }; // Structure to describe indication TLV 0x11 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerID { UINT8 mPresentationIndicator; UINT8 mCallerIDLength; // This array must be the size specified by mCallerIDLength // char mCallerID[1]; }; // Structure to describe indication TLV 0x12 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_Display { // String is variable length, but must be size of the container // char mDisplayBuffer[1]; }; // Structure to describe indication TLV 0x13 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplay { UINT8 mExtendedDisplayBuffer[182]; }; // Structure to describe indication TLV 0x14 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallerName { // String is variable length, but must be size of the container // char mCallerName[1]; }; // Structure to describe indication TLV 0x15 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallWaiting { INT8 mNewCallWaiting; }; // Structure to describe indication TLV 0x16 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ConnectedNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x17 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CallingPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x18 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CalledPartyNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x19 for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_RedirectingNumberInfo { UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mRedirectReason; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe indication TLV 0x1A for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_CLIRCause { eQMIVoiceCLIRCauses mCLIRCause; }; // Structure to describe indication TLV 0x1B for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSAudio { UINT8 mUpLink; UINT8 mDownLink; }; // Structure to describe indication TLV 0x1C for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_NSSRelease { eQMIVoiceNSSReleases mNSSRelease; }; // Structure to describe indication TLV 0x1D for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_LineControlInfo { INT8 mPolarityIncluded; INT8 mToggleMode; INT8 mReversePolarity; UINT8 mPowerDenialTime; }; // Structure to describe indication TLV 0x1E for Voice InfoRecordIndication struct sVoiceInfoRecordIndication_ExtendedDisplayInfo { UINT8 mDisplayType; UINT8 mExtendedDisplayInfoLength; // This array must be the size specified by mExtendedDisplayInfoLength // UINT8 mExtendedDisplayInfo[1]; }; // Structure to describe request TLV 0x01 for VoiceSendFlash() struct sVoiceSendFlashRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashRequest_Payload { // String is variable length, but must be size of the container // char mFlashPayload[1]; }; // Structure to describe request TLV 0x11 for VoiceSendFlash() struct sVoiceSendFlashRequest_Type { eQMIVoiceFlashTypes mFlashType; }; // Structure to describe response TLV 0x10 for VoiceSendFlash() struct sVoiceSendFlashResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Info { UINT8 mCallID; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe request TLV 0x10 for VoiceBurstDTMF() struct sVoiceBurstDTMFRequest_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceStartContinuousDTMF() struct sVoiceStartContinuousDTMFRequest_Info { UINT8 mCallID; char mDTMFDigit; }; // Structure to describe response TLV 0x10 for VoiceStartContinuous() struct sVoiceStartContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x01 for VoiceStopContinuousDTMF() struct sVoiceStopContinuousDTMFRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceStopContinuous() struct sVoiceStopContinuousResponse_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x01 for Voice DTMFIndication struct sVoiceDTMFIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFEvents mDTMFEvent; UINT8 mDTMFBufferLength; // This array must be the size specified by mDTMFBufferLength // char mDTMFBuffer[1]; }; // Structure to describe indication TLV 0x10 for Voice DTMFIndication struct sVoiceDTMFIndication_Lengths { eQMIVoicePulseWidths mDTMFPulseWidth; eQMIVoiceInterdigitIntervals mDTMFInterdigitInterval; }; // Structure to describe request TLV 0x01 for VoiceSetPreferredPrivacy() struct sVoiceSetPreferredPrivacyRequest_Preference { eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice PrivacyIndication struct sVoicePrivacyIndication_DTMFInfo { UINT8 mCallID; eQMIVoiceDTMFPrivacyLevels mPrivacyLevel; }; // Structure to describe indication TLV 0x01 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x10 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x11 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x12 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x13 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x14 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceEndReasons mEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x15 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x16 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x17 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x18 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x19 for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x1A for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe indication TLV 0x1B for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_AudioAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe indication TLV 0x1C for Voice AllCallStatusIndication struct sVoiceAllCallStatusIndication_VideoAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe response TLV 0x10 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceCallStates mCallState; eQMIVoiceCallTypes mCallType; eQMIVoiceCallDirections mDirection; eQMIVoiceCallModes mMode; INT8 mMultiparty; eQMIVoiceALSLineIndicators mALSLineIndicator; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyNumber { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x12 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RemotePartyName { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mCodingScheme; UINT8 mCallerNameLength; // This array must be the size specified by mCallerNameLength // UINT8 mCallerName[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x13 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingType { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingTypes mAlertingType; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x14 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_UUS { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x15 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ServiceOption { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT16 mServiceOption; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x16 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_OTASPStatus { eQMIVoiceOTASPStati mOTASPStatus; }; // Structure to describe response TLV 0x17 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VoicePrivacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x18 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CallEndReason { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceEndReasons mEndReason; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x19 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlphaID { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1A for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_ConnectedNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1B for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_DiagnosticInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mDiagnosticInfoLength; // This array must be the size specified by mDiagnosticInfoLength // UINT8 mDiagnosticInfo[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1C for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_CalledPartyNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1D for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_RedirectingNumberInfo { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1E for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AlertingPattern { UINT8 mCallInstanceCount; struct sInstance { UINT8 mCallID; eQMIVoiceAlertingPatterns mAlertingPattern; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x1F for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_AudioAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe response TLV 0x20 for VoiceGetAllCallInfo() struct sVoiceGetAllCallInfoResponse_VideoAttributesArray { UINT8 mAttributesCount; struct sAttributes { UINT8 mCallID; bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // This array must be the size specified by mAttributesCount // sAttributes mAttributeses[1]; }; // Structure to describe request TLV 0x01 for VoiceManageCalls() struct sVoiceManageCallsRequest_Info { eQMIVoiceSupplementaryServiceCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x10 for VoiceManageCalls() struct sVoiceManageCallsResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe indication TLV 0x01 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_Info { UINT8 mCallID; eQMIVoiceSupplementaryNotificationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_CUG { UINT16 mCUGIndex; }; // Structure to describe indication TLV 0x11 for Voice SupplementaryServiceIndication struct sVoiceSupplementaryServiceIndication_ECT { eQMIVoiceECTCallStates mECTCallState; eQMIVoicePresentationIndicators mPresentationIndicator; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x01 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Info { eQMIVoiceSupplementaryServiceTypes mService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_CallForwarding { eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; }; // Structure to describe request TLV 0x15 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x15 for VoiceSetSupplementaryService() struct sVoiceSetSupplementaryServiceResponse_ServiceStatus { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallWaitinge() struct sVoiceGetCallWaitingeResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallWaiting() struct sVoiceGetCallWaitingResponse_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe request TLV 0x01 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe response TLV 0x11 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallBarring() struct sVoiceGetCallBarringResponse_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_Status { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIP() struct sVoiceGetCLIPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_Status { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe response TLV 0x11 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCLIR() struct sVoiceGetCLIRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ServiceClass { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingRequest_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe response TLV 0x10 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_Info { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x11 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe response TLV 0x17 for VoiceGetCallForwarding() struct sVoiceGetCallForwardingResponse_ExtendedInfo2 { UINT8 mCallInstanceCount; struct sInstance { INT8 mServiceActive; eQMIVoiceExtendedServiceClass mExtendedServiceClass; UINT8 mNoReplyTimerSeconds; UINT8 mPresentationIndicator; eQMIVoiceScreeningIndicators mScreeningIndicator; eQMIVoiceNumberTypes mNumberType; eQMIVoiceNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // This array must be the size specified by mCallInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x01 for VoiceSetCallBarringPassword() struct sVoiceSetCallBarringPasswordRequest_Info { eQMIVoiceSupplementaryServiceReasons mReason; char mOldCallBarringPassword[4]; char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe response TLV 0x10 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x13 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x14 for VoiceSetCallBarring() struct sVoiceSetCallBarringResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x10 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x11 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x12 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe response TLV 0x13 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x16 for VoiceInitiateUSSD() struct sVoiceInitiateUSSDResponse_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x01 for VoiceAnswerUSSD() struct sVoiceAnswerUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x01 for Voice USSDIndication struct sVoiceUSSDIndication_Type { eQMIVoiceUSSDNotifcationTypes mNotificationType; }; // Structure to describe indication TLV 0x10 for Voice USSDIndication struct sVoiceUSSDIndication_Data { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x11 for Voice USSDIndication struct sVoiceUSSDIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe indication TLV 0x01 for Voice USSIndication struct sVoiceUSSIndication_Info { UINT8 mCallID; eQMIVoiceUUSTypes mUUSType; eQMIVoiceUUSDataCodingSchemes mUUSDCS; UINT8 mUUSLength; // This array must be the size specified by mUUSLength // UINT8 mUUSData[1]; }; // Structure to describe request TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigRequest_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe request TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigRequest_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe request TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigRequest_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe request TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigRequest_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe request TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe request TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigRequest_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe response TLV 0x10 for VoiceSetConfig() struct sVoiceSetConfigResponse_AutoAnswer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x11 for VoiceSetConfig() struct sVoiceSetConfigResponse_AirTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x12 for VoiceSetConfig() struct sVoiceSetConfigResponse_RoamTimer { INT8 mWriteFailed; }; // Structure to describe response TLV 0x13 for VoiceSetConfig() struct sVoiceSetConfigResponse_TTYMode { INT8 mWriteFailed; }; // Structure to describe response TLV 0x14 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceSO { INT8 mWriteFailed; }; // Structure to describe response TLV 0x15 for VoiceSetConfig() struct sVoiceSetConfigResponse_PreferredVoiceDomain { INT8 mWriteFailed; }; // Structure to describe request TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigRequest_AutoAnswer { INT8 mInclude; }; // Structure to describe request TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigRequest_AirTimer { INT8 mInclude; }; // Structure to describe request TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigRequest_RoamTimer { INT8 mInclude; }; // Structure to describe request TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigRequest_TTYMode { INT8 mInclude; }; // Structure to describe request TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoiceSO { INT8 mInclude; }; // Structure to describe request TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigRequest_AMRStatus { INT8 mInclude; }; // Structure to describe request TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigRequest_PreferredVoicePrivacy { INT8 mInclude; }; // Structure to describe request TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigRequest_NAM { UINT8 mNAMID; }; // Structure to describe request TLV 0x18 for VoiceGetConfig() struct sVoiceGetConfigRequest_VoiceDomain { INT8 mInclude; }; // Structure to describe response TLV 0x10 for VoiceGetConfig() struct sVoiceGetConfigResponse_AutoAnswer { INT8 mAutoAnswer; }; // Structure to describe response TLV 0x11 for VoiceGetConfig() struct sVoiceGetConfigResponse_AirTimer { UINT8 mNAMID; UINT32 mAirTimerMinutes; }; // Structure to describe response TLV 0x12 for VoiceGetConfig() struct sVoiceGetConfigResponse_RoamTimer { UINT8 mNAMID; UINT32 mRoamTimerMinutes; }; // Structure to describe response TLV 0x13 for VoiceGetConfig() struct sVoiceGetConfigResponse_TTYMode { eQMIVoiceTTYModes mTTYMode; }; // Structure to describe response TLV 0x14 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceSO { UINT8 mNAMID; INT8 mEVRCCapability; eQMIVoiceServiceOptions mHomePageVoiceServiceOption; eQMIVoiceServiceOptions mHomeOriginationVoiceServiceOption; eQMIVoiceServiceOptions mRoamOriginationVoiceServiceOption; }; // Structure to describe response TLV 0x15 for VoiceGetConfig() struct sVoiceGetConfigResponse_AMRConfig { INT8 mGSMAMR; bool mWCDMAAMRWB:1; bool mGSMHRAMR:1; bool mGSMAMRWB:1; bool mGSMAMRNB:1; // Padding out 4 bits UINT8 mReserved1:4; }; // Structure to describe response TLV 0x16 for VoiceGetConfig() struct sVoiceGetConfigResponse_Privacy { eQMIVoicePrivacyLevels mVoicePrivacy; }; // Structure to describe response TLV 0x17 for VoiceGetConfig() struct sVoiceGetConfigResponse_PreferredVoiceDomain { eQMIVoiceDomains mPreferredDomain; }; // Structure to describe request TLV 0x01 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Info { eQMIVoiceSupplementaryServiceRequests mSupplementaryServiceRequest; INT8 mModifiedByCallControl; }; // Structure to describe request TLV 0x10 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Class { bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; }; // Structure to describe request TLV 0x11 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Reason { eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x12 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Number { // String is variable length, but must be size of the container // char mCallForwardingNumber[1]; }; // Structure to describe request TLV 0x13 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Timer { UINT8 mNoReplyTimerSeconds; }; // Structure to describe request TLV 0x14 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_USSData { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe request TLV 0x15 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x16 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe request TLV 0x17 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_Password { char mCallBarringPassword[4]; }; // Structure to describe request TLV 0x18 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_NewPassword { char mNewCallBarringPassword[4]; char mNewCallBarringPasswordRepeat[4]; }; // Structure to describe request TLV 0x19 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_DataSource { INT8 mResponseData; }; // Structure to describe request TLV 0x1A for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe request TLV 0x1B for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CallForwarding { UINT8 mInstanceCount; struct sInstance1 { INT8 mServiceActive; bool mSupplementaryServiceClassVoice:1; bool mSupplementaryServiceClassData:1; bool mSupplementaryServiceClassFax:1; bool mSupplementaryServiceClassSMS:1; bool mSupplementaryServiceClassDataCircuitSync:1; bool mSupplementaryServiceClassDataCircuitAsync:1; bool mSupplementaryServiceClassPacketAccess:1; bool mSupplementaryServiceClassPadAccess:1; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sInstance2 { UINT8 mNoReplyTimerSeconds; }; struct sInstance { sInstance1 mInstance1; sInstance2 mInstance2; }; // This array must be the size specified by mInstanceCount // sInstance mInstances[1]; }; // Structure to describe request TLV 0x1C for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIR { INT8 mCLIRActive; eQMIVoiceProvisioningStates mCLIRProvisionStatus; }; // Structure to describe request TLV 0x1D for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CLIP { INT8 mCLIPActive; INT8 mCLIPProvisioned; }; // Structure to describe request TLV 0x1E for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x1F for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x20 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe request TLV 0x21 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x22 for VoiceSupplementaryService() struct sVoiceSupplementaryServiceRequestIndication_ExtendedServiceClass { eQMIVoiceExtendedServiceClass mExtendedServiceClass; }; // Structure to describe request TLV 0x01 for VoiceAsyncInitiateUSSD() struct sVoiceAsyncInitiateUSSDRequest_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x10 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x11 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_FailCause { UINT16 mFailureCause; }; // Structure to describe indication TLV 0x12 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_Info { eQMIVoiceUSSDDataCodingSchemes mUSSDCS; UINT8 mUSSLength; // This array must be the size specified by mUSSLength // UINT8 mUSSData[1]; }; // Structure to describe indication TLV 0x13 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe indication TLV 0x14 for Voice USSDAsyncIndication struct sVoiceUSSDAsyncIndication_EncodedData { UINT8 mServiceInformationLength; // This array must be the size specified by mServiceInformationLength // wchar_t mServiceInformation[1]; }; // Structure to describe request TLV 0x01 for VoiceBindSubscription() struct sVoiceBindSubscriptionRequest_Type { eQMIVoiceSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for VoiceALSSetLineSwitching() struct sVoiceALSSetLineSwitchingRequest_Switching { INT8 mLineSwitchingAllowed; }; // Structure to describe request TLV 0x01 for VoiceALSSelectLine() struct sVoiceALSSelectLineRequest_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe request TLV 0x01 for VoiceAOCSetACMMaximum() struct sVoiceAOCSetACMMaximumRequest_ACMMax { UINT32 mACMMaximum; }; // Structure to describe request TLV 0x01 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoRequest_Mask { bool mACM:1; bool mACMMaximum:1; bool mCCM:1; // Padding out 13 bits UINT8 mReserved1:5; UINT8 mReserved2; }; // Structure to describe response TLV 0x10 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACM { UINT32 mACM; }; // Structure to describe response TLV 0x11 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_ACMMax { UINT32 mACMMaximum; }; // Structure to describe response TLV 0x12 for VoiceAOCGetCallMeterInfo() struct sVoiceAOCGetCallMeterInfoResponse_CCM { UINT32 mCCM; }; // Structure to describe response TLV 0x10 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_COLP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLP() struct sVoiceGetCOLPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_COLR { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCOLR() struct sVoiceGetCOLRResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe response TLV 0x10 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CNAP { INT8 mActive; INT8 mProvisioned; }; // Structure to describe response TLV 0x11 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_FailCause { UINT16 mFailureCause; }; // Structure to describe response TLV 0x12 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_AlphaID { eQMIVoiceUSSDAlphaCodingSchemes mAlphaDCS; UINT8 mAlphaLength; // This array must be the size specified by mAlphaLength // UINT8 mAlphaData[1]; }; // Structure to describe response TLV 0x13 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallControl { eQMIVoiceCallControlResultTypes mCallControlResult; }; // Structure to describe response TLV 0x14 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x15 for VoiceGetCNAP() struct sVoiceGetCNAPResponse_SupplementaryService { eQMIVoiceSupplementaryServiceRequests mSupplementaryService; eQMIVoiceSupplementaryServiceReasons mReason; }; // Structure to describe request TLV 0x01 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_Info { eQMIVoiceVoIPSUPSCallTypes mSupplementaryServiceType; }; // Structure to describe request TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_CallID { UINT8 mCallID; }; // Structure to describe request TLV 0x11 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe request TLV 0x12 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x13 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x14 for VoiceManageIPCalls() struct sVoiceManageIPCallsRequest_SIPURI { // String is variable length, but must be size of the container // char mSIPURIOverflow[1]; }; // Structure to describe response TLV 0x10 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_CallID { UINT8 mCallID; }; // Structure to describe response TLV 0x11 for VoiceManageIPCalls() struct sVoiceManageIPCallsResponse_FailureCause { eQMIVoiceEndReasons mFailureCause; }; // Structure to describe response TLV 0x10 for VoiceALSGetLineSwitchingStatus() struct sVoiceALSGetLineSwitchingStatusResponse_SwitchValue { eQMIVoiceSwitchValue mSwitchValue; }; // Structure to describe response TLV 0x10 for VoiceALSGetSelectedLine() struct sVoiceALSGetSelectedLineResponse_Line { eQMIVoiceALSLines mLineValue; }; // Structure to describe indication TLV 0x01 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe indication TLV 0x11 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x12 for Voice CallModifiedIndication struct sVoiceCallModifiedIndication_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x01 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_CallID { UINT8 mCallID; }; // Structure to describe indication TLV 0x10 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_CallType { eQMIVoiceCallTypes mCallType; }; // Structure to describe indication TLV 0x11 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_AudioAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x12 for Voice CallModifyAcceptIndication struct sVoiceCallModifyAcceptIndication_VideoAttribute { bool mVoiceCallTX:1; bool mVoiceCallRX:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_NetworkMode { eQMIVoiceNetworkMode mNetworkMode; }; // Structure to describe indication TLV 0x11 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_Type { eQMIVoiceSpeechCodecType mType; }; // Structure to describe indication TLV 0x12 for Voice SpeechCodecInformationIndication struct sVoiceSpeechCodecInformationIndication_SamplingRate { UINT32 mSamplingRateHz; }; // Structure to describe indication TLV 0x01 for Voice HandoverIndication struct sVoiceHandoverIndication_State { eQMIVoiceHandoverStates mHandoverState; }; // Structure to describe request TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe request TLV 0x12 for CAT2SetEventReport() struct sCAT2SetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CAT2SetEventReport() struct sCAT2SetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe indication TLV 0x10 for CAT2 EventReport struct sCAT2EventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT2 EventReport struct sCAT2EventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT2 EventReport struct sCAT2EventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT2 EventReport struct sCAT2EventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT2 EventReport struct sCAT2EventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT2 EventReport struct sCAT2EventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT2 EventReport struct sCAT2EventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT2 EventReport struct sCAT2EventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT2 EventReport struct sCAT2EventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT2 EventReport struct sCAT2EventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT2 EventReport struct sCAT2EventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT2 EventReport struct sCAT2EventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT2 EventReport struct sCAT2EventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT2 EventReport struct sCAT2EventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT2 EventReport struct sCAT2EventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT2 EventReport struct sCAT2EventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT2 EventReport struct sCAT2EventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT2 EventReport struct sCAT2EventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT2 EventReport struct sCAT2EventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT2 EventReport struct sCAT2EventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT2 EventReport struct sCAT2EventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT2 EventReport struct sCAT2EventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT2 EventReport struct sCAT2EventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT2 EventReport struct sCAT2EventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT2 EventReport struct sCAT2EventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT2 EventReport struct sCAT2EventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT2 EventReport struct sCAT2EventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT2 EventReport struct sCAT2EventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT2 EventReport struct sCAT2EventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT2 EventReport struct sCAT2EventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT2 EventReport struct sCAT2EventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT2 EventReport struct sCAT2EventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT2 EventReport struct sCAT2EventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT2 EventReport struct sCAT2EventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT2 EventReport struct sCAT2EventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT2 EventReport struct sCAT2EventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT2 EventReport struct sCAT2EventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT2 EventReport struct sCAT2EventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT2 EventReport struct sCAT2EventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT2 EventReport struct sCAT2EventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT2 EventReport struct sCAT2EventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT2 EventReport struct sCAT2EventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT2 EventReport struct sCAT2EventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT2 EventReport struct sCAT2EventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT2 EventReport struct sCAT2EventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT2 EventReport struct sCAT2EventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT2 EventReport struct sCAT2EventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT2 EventReport struct sCAT2EventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT2 EventReport struct sCAT2EventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT2 EventReport struct sCAT2EventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT2 EventReport struct sCAT2EventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT2 EventReport struct sCAT2EventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT2 EventReport struct sCAT2EventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT2 EventReport struct sCAT2EventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT2 EventReport struct sCAT2EventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT2 EventReport struct sCAT2EventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT2 EventReport struct sCAT2EventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT2 EventReport struct sCAT2EventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT2 EventReport struct sCAT2EventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT2 EventReport struct sCAT2EventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT2 EventReport struct sCAT2EventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT2 EventReport struct sCAT2EventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT2 EventReport struct sCAT2EventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT2 EventReport struct sCAT2EventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT2 EventReport struct sCAT2EventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT2 EventReport struct sCAT2EventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT2 EventReport struct sCAT2EventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT2 EventReport struct sCAT2EventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT2 EventReport struct sCAT2EventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT2 EventReport struct sCAT2EventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT2 EventReport struct sCAT2EventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT2 EventReport struct sCAT2EventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT2 EventReport struct sCAT2EventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT2 EventReport struct sCAT2EventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT2 EventReport struct sCAT2EventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT2 EventReport struct sCAT2EventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT2 EventReport struct sCAT2EventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT2 EventReport struct sCAT2EventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT2 EventReport struct sCAT2EventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT2 EventReport struct sCAT2EventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x01 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; bool mCommonActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; bool mControlActivate:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CAT2GetServiceState() struct sCAT2GetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved6:6; }; // Structure to describe request TLV 0x01 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CAT2SendTerminalResponse() struct sCAT2SendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2SendTerminal() struct sCAT2SendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2EnvelopeCommand() struct sCAT2EnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2GetEventReport() struct sCAT2GetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CAT2GetEventReport() struct sCAT2GetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CAT2GetEventReport() struct sCAT2GetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CAT2GetEventReport() struct sCAT2GetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CAT2GetEventReport() struct sCAT2GetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CAT2GetEventReport() struct sCAT2GetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CAT2GetEventReport() struct sCAT2GetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedTerminalResponse() struct sCAT2SendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedTerminal() struct sCAT2SendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe response TLV 0x10 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CAT2SendDecodedEnvelopeCommand() struct sCAT2SendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CAT2EventConfirmation() struct sCAT2EventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSOpenChannel() struct sCAT2SCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSOpenChannelIndication struct sCAT2SCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSCloseChannelIndication struct sCAT2SCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CAT2SCWSCloseChannel() struct sCAT2SCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CAT2SCWSSendData() struct sCAT2SCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT2 SCWSSendDataIndication struct sCAT2SCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CAT2SCWSDataAvailable() struct sCAT2SCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CAT2SCWSChannelStatus() struct sCAT2SCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CAT2GetTerminalProfile() struct sCAT2GetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CAT2SetConfiguration() struct sCAT2SetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CAT2GetConfiguration() struct sCAT2GetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for UIMReadTransparent() struct sUIMReadTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadTransparent() struct sUIMReadTransparentRequest_Buffer { UINT16 mOffset; UINT16 mLength; }; // Structure to describe request TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe request TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentRequest_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x10 for UIMReadTransparent() struct sUIMReadTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadTransparent() struct sUIMReadTransparentResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadTransparent() struct sUIMReadTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x13 for UIMReadTransparent() struct sUIMReadTransparentResponse_Encryption { INT8 mDataEncrypted; }; // Structure to describe response TLV 0x14 for UIMReadTransparent() struct sUIMReadTransparentResponse_RequestedLength { UINT16 mFileLength; }; // Structure to describe indication TLV 0x01 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_Encryption { INT8 mDataEncrypted; }; // Structure to describe indication TLV 0x13 for UIM ReadTransparentIndication struct sUIMReadTransparentIndication_RequestedLength { UINT16 mFileLength; }; // Structure to describe request TLV 0x01 for UIMReadRecord() struct sUIMReadRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMReadRecord() struct sUIMReadRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; }; // Structure to describe request TLV 0x10 for UIMReadRecord() struct sUIMReadRecordRequest_LastRecord { UINT16 mRecordNumber; }; // Structure to describe request TLV 0x11 for UIMReadRecord() struct sUIMReadRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMReadRecord() struct sUIMReadRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMReadRecord() struct sUIMReadRecordResponse_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMReadRecord() struct sUIMReadRecordResponse_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe response TLV 0x13 for UIMReadRecord() struct sUIMReadRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ReadRecordIndication struct sUIMReadRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ReadRecordIndication struct sUIMReadRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM ReadRecordIndication struct sUIMReadRecordIndication_ReadResult { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe indication TLV 0x12 for UIM ReadRecordIndication struct sUIMReadRecordIndication_AdditionalReadResult { UINT16 mContentLength; struct sRecord { // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // This array is variable length based on the size of the container // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_Buffer { UINT16 mOffset; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentRequest_ResponseInIndicaiton { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteTransparent() struct sUIMWriteTransparentResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteTransparentIndication struct sUIMWriteTransparentIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMWriteRecord() struct sUIMWriteRecordRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x03 for UIMWriteRecord() struct sUIMWriteRecordRequest_Record { UINT16 mRecordNumber; UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMWriteRecord() struct sUIMWriteRecordResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMWriteRecord() struct sUIMWriteRecordResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM WriteRecordIndication struct sUIMWriteRecordIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe request TLV 0x01 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_Attributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMGetFileAttributes() struct sUIMGetFileAttributesResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM GetFileAttributesIndication struct sUIMGetFileAttributesIndication_FileAttributes { UINT16 mFileSize; UINT16 mFileID; eQMIUIMFileTypes mFileType; UINT16 mRecordSize; UINT16 mRecordCount; eQMIUIMSecurityAttributes mReadSecurityAttributes; bool mReadPIN1:1; bool mReadPIN2:1; bool mReadUPIN:1; bool mReadADM:1; // Padding out 4 bits UINT8 mReserved1:4; eQMIUIMSecurityAttributes mWriteSecurityAttributes; bool mWritePIN1:1; bool mWritePIN2:1; bool mWriteUPIN:1; bool mWriteADM:1; // Padding out 4 bits UINT8 mReserved2:4; eQMIUIMSecurityAttributes mIncreaseSecurityAttributes; bool mIncreasePIN1:1; bool mIncreasePIN2:1; bool mIncreaseUPIN:1; bool mIncreaseADM:1; // Padding out 4 bits UINT8 mReserved3:4; eQMIUIMSecurityAttributes mDeactivateSecurityAttributes; bool mDeactivatePIN1:1; bool mDeactivatePIN2:1; bool mDeactivateUPIN:1; bool mDeactivateADM:1; // Padding out 4 bits UINT8 mReserved4:4; eQMIUIMSecurityAttributes mActivateSecurityAttributes; bool mActivatePIN1:1; bool mActivatePIN2:1; bool mActivateUPIN:1; bool mActivateADM:1; // Padding out 4 bits UINT8 mReserved5:4; UINT16 mValueLength; // This array must be the size specified by mValueLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMSetPINProtection() struct sUIMSetPINProtectionResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM SetPINProtectionIndication struct sUIMSetPINProtectionIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMVerifyPIN() struct sUIMVerifyPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINRequest_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMVerifyPIN() struct sUIMVerifyPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMVerifyPIN() struct sUIMVerifyPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMVerifyPIN() struct sUIMVerifyPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM VerifyPINIndication struct sUIMVerifyPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMUnblockPIN() struct sUIMUnblockPINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMUnblockPIN() struct sUIMUnblockPINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMUnblockPIN() struct sUIMUnblockPINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMUnblockPIN() struct sUIMUnblockPINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM UnblockPINIndication struct sUIMUnblockPINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMChangePIN() struct sUIMChangePINRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMChangePIN() struct sUIMChangePINRequest_KeyReferenceID { eQMIUIMKeyReferenceID mKeyReferenceID; }; // Structure to describe request TLV 0x11 for UIMChangePIN() struct sUIMChangePINRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMChangePIN() struct sUIMChangePINResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe response TLV 0x11 for UIMChangePIN() struct sUIMChangePINResponse_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe response TLV 0x12 for UIMChangePIN() struct sUIMChangePINResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM ChangePINIndication struct sUIMChangePINIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM ChangePINIndication struct sUIMChangePINIndication_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe indication TLV 0x11 for UIM ChangePINIndication struct sUIMChangePINIndication_EncryptedPIN1 { UINT8 mPINLength; // This array must be the size specified by mPINLength // UINT8 mValue[1]; }; // Structure to describe request TLV 0x01 for UIMDepersonalization() struct sUIMDepersonalizationRequest_Info { eQMIUIMPersonalizationFeatures mFeature; eQMIUIMCKSessionOperations mOperation; UINT8 mCKLength; // This array must be the size specified by mCKLength // char mCKValue[1]; }; // Structure to describe response TLV 0x10 for UIMDepersonalization() struct sUIMDepersonalizationResponse_Retries { UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // Structure to describe request TLV 0x01 for UIMRefreshRegister() struct sUIMRefreshRegisterRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshOK() struct sUIMRefreshOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMRefreshComplete() struct sUIMRefreshCompleteRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLastRefreshEvent() struct sUIMGetLastRefreshEventResponse_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMGetLastRefreshEventResponse_RefreshEvent { sUIMGetLastRefreshEventResponse_RefreshEvent1 mUIMGetLastRefreshEventResponse_RefreshEvent1; sUIMGetLastRefreshEventResponse_RefreshEvent2 mUIMGetLastRefreshEventResponse_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMEventRegistration() struct sUIMEventRegistrationRequest_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMEventRegistration() struct sUIMEventRegistrationResponse_Mask { bool mCardStatus:1; bool mSAPConnection:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMGetCardStatusResponse_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMGetCardStatusResponse_Status { sUIMGetCardStatusResponse_Status1 mUIMGetCardStatusResponse_Status1; sUIMGetCardStatusResponse_Status2 mUIMGetCardStatusResponse_Status2; }; // Structure to describe response TLV 0x11 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_HotSwapStatus { UINT8 mHotSwapLength; // This array must be the size specified by mHotSwapLength // eQMIUIMHotSwap mHotSwap[1]; }; // Structure to describe response TLV 0x12 for UIMGetCardStatus() struct sUIMGetCardStatusResponse_ValidCardStatus { UINT8 mCardStatusValidCount; // This array must be the size specified by mCardStatusValidCount // INT8 mCardStatusValid[1]; }; // Structure to describe request TLV 0x01 for UIMPowerDown() struct sUIMPowerDownRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMPowerUp() struct sUIMPowerUpRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMPowerUp() struct sUIMPowerUpRequest_IgnoreHotSwapSwitch { INT8 mIgnoreHotSwapSwitch; }; // Structure to describe indication TLV 0x10 for UIM CardStatusIndication struct sUIMCardStatusIndication_Status1 { UINT8 mPrimaryGWSlot; UINT8 mPrimaryGWApplication; UINT8 mPrimary1XSlot; UINT8 mPrimary1XApplication; UINT8 mSecondaryGWSlot; UINT8 mSecondaryGWApplication; UINT8 mSecondary1XSlot; UINT8 mSecondary1XApplication; UINT8 mSlotsAvailable; eQMIUIMCardStates mCardState; eQMIUIMPINStates mUPINState; UINT8 mRemainingUPINVerifyRetries; UINT8 mRemainingUPINUnblockRetries; eQMIUIMCardErrorCodes mCardErrorCode; UINT8 mApplicationsAvailable; eQMIUIMApplicationTypes mApplicationType; eQMIUIMApplicationStates mApplicationState; eQMIUIMPersonalizationStates mPersonalizationState; eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingPersonalizationVerifyRetries; UINT8 mRemainingPersonalizationUnblockRetries; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMCardStatusIndication_Status2 { INT8 mUPINReplacesPIN1; eQMIUIMPINStates mPIN1State; UINT8 mRemainingPIN1VerifyRetries; UINT8 mRemainingPIN1UnblockRetries; eQMIUIMPINStates mPIN2State; UINT8 mRemainingPIN2VerifyRetries; UINT8 mRemainingPIN2UnblockRetries; }; struct sUIMCardStatusIndication_Status { sUIMCardStatusIndication_Status1 mUIMCardStatusIndication_Status1; sUIMCardStatusIndication_Status2 mUIMCardStatusIndication_Status2; }; // Structure to describe indication TLV 0x11 for UIM CardStatusIndication struct sUIMCardStatusIndication_ValidCardStatus { UINT8 mCardStatusValidCount; // This array must be the size specified by mCardStatusValidCount // INT8 mCardStatusValid[1]; }; // Structure to describe indication TLV 0x10 for UIM RefreshIndication struct sUIMRefreshIndication_RefreshEvent1 { eQMIUIMRefreshStages mStage; eQMIUIMRefreshModes mMode; eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; struct sUIMRefreshIndication_RefreshEvent2 { UINT16 mFileCount; struct sFile { UINT16 mFileID; UINT8 mPathLength; // This array must be the size specified by mPathLength // UINT16 mPath[1]; }; // This array must be the size specified by mFileCount // sFile mFiles[1]; }; struct sUIMRefreshIndication_RefreshEvent { sUIMRefreshIndication_RefreshEvent1 mUIMRefreshIndication_RefreshEvent1; sUIMRefreshIndication_RefreshEvent2 mUIMRefreshIndication_RefreshEvent2; }; // Structure to describe request TLV 0x01 for UIMAuthenticate() struct sUIMAuthenticateRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateRequest_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe response TLV 0x10 for UIMAuthenticate() struct sUIMAuthenticateResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x11 for UIMAuthenticate() struct sUIMAuthenticateResponse_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe response TLV 0x12 for UIMAuthenticate() struct sUIMAuthenticateResponse_ResponseInIndication { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_OriginalToken { UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x10 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe indication TLV 0x11 for UIM AuthenticateIndication struct sUIMAuthenticateIndication_Data { UINT16 mContentLength; // This array must be the size specified by mContentLength // UINT8 mContent[1]; }; // Structure to describe request TLV 0x01 for UIMCloseSession() struct sUIMCloseSessionRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetServiceStatus() struct sUIMGetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_FDNStatus { eQMIUIMFDNStatusValues mFDNStatus; }; // Structure to describe response TLV 0x11 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_HiddenKeyStatus { eQMIUIMHiddenKeyStatusValues mHiddenKeyStatus; }; // Structure to describe response TLV 0x12 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_Index { UINT8 mEFDIRIndex; }; // Structure to describe response TLV 0x13 for UIMGetServiceStatus() struct sUIMGetServiceStatusResponse_ESNStatus { INT8 mESNChanged; }; // Structure to describe request TLV 0x01 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSetServiceStatus() struct sUIMSetServiceStatusRequest_FDNStatus { INT8 mEnableFDN; }; // Structure to describe request TLV 0x01 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_SessionChange { eQMIUIMSessionTypes mSessionType; eQMIUIMCKSessionOperations mOperation; }; // Structure to describe request TLV 0x10 for UIMChangeProvisioningSession() struct sUIMChangeProvisioningSessionRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x01 for UIMGetLabel() struct sUIMGetLabelRequest_AppInfo { eQMIUIMSlots mSlot; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe response TLV 0x10 for UIMGetLabel() struct sUIMGetLabelResponse_AppLabel { UINT8 mLabelLength; // This array must be the size specified by mLabelLength // char mLabelValue[1]; }; // Structure to describe request TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationRequest_Mask { bool mAutomaticSelection:1; bool mPersonalizationStatus:1; bool mHaltSubscription:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_AutoSelection { INT8 mAutomaticProvisioningOn; }; // Structure to describe response TLV 0x11 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Personalization { UINT8 mFeatureCount; struct sFeature { eQMIUIMPersonalizationFeatures mPersonalizationFeature; UINT8 mRemainingVerifyRetries; UINT8 mRemainingUnblockRetries; }; // This array must be the size specified by mFeatureCount // sFeature mFeatures[1]; }; // Structure to describe response TLV 0x12 for UIMGetConfiguration() struct sUIMGetConfigurationResponse_Subscription { INT8 mPublishSubscription; }; // Structure to describe request TLV 0x01 for UIMSendADPU() struct sUIMSendADPURequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSendADPU() struct sUIMSendADPURequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x11 for UIMSendADPU() struct sUIMSendADPURequest_IntermediateProcedureBytes { eQMIUIMAPDUResponseStatus mIntermediateProcedureBytes; }; // Structure to describe response TLV 0x10 for UIMSendADPU() struct sUIMSendADPUResponse_APDUResponse { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSendADPU() struct sUIMSendADPUResponse_LongAPDUResponse { UINT16 mTotalLength; UINT32 mIndicationToken; }; // Structure to describe indication TLV 0x01 for UIM SendADPUIndication struct sUIMSendADPUIndication_APDUResponseChunk { UINT32 mIndicationToken; UINT16 mTotalLength; UINT16 mOffset; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x01 for UIMSAPConnection() struct sUIMSAPConnectionRequest_Slot { eQMIUIMConnectOperations mOperation; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionRequest_DisconnectMode { eQMIUIMDisonnectModes mDisconnectMode; }; // Structure to describe request TLV 0x11 for UIMSAPConnection() struct sUIMSAPConnectionRequest_IntermediateGetResponse { INT8 mReturnIntermediateGetResponse; }; // Structure to describe response TLV 0x10 for UIMSAPConnection() struct sUIMSAPConnectionResponse_State { eQMIUIMSAPStates mSAPState; }; // Structure to describe request TLV 0x01 for UIMSAP() struct sUIMSAPRequestRequest_Request { eQMIUIMSAPRequests mSAPRequest; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMSAP() struct sUIMSAPRequestRequest_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x10 for UIMSAPRequest() struct sUIMSAPRequestResponse_ATR { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x11 for UIMSAPRequest() struct sUIMSAPRequestResponse_APDU { UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe response TLV 0x12 for UIMSAPRequest() struct sUIMSAPRequestResponse_CardReaderStatus { UINT8 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x10 for UIM SAPConnectionIndication struct sUIMSAPConnectionIndication_CardStatus { eQMIUIMSAPStates mSAPState; eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x01 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe request TLV 0x13 for UIMLogicalChannel() struct sUIMLogicalChannelRequest_TerminateApplication { INT8 mTerminateApplication; }; // Structure to describe response TLV 0x10 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMLogicalChannel() struct sUIMLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe request TLV 0x01 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMSubscriptionOK() struct sUIMSubscriptionOKRequest_EncryptedIMSI { UINT8 mEncryptedIMSILength; // This array must be the size specified by mEncryptedIMSILength // UINT8 mEncryptedIMSI[1]; }; // Structure to describe request TLV 0x01 for UIMGetATR() struct sUIMGetATRRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe response TLV 0x10 for UIMGetATR() struct sUIMGetATRResponse_ATRValue { UINT8 mATRValueLength; // This array must be the size specified by mATRValueLength // UINT8 mATRValue[1]; }; // Structure to describe request TLV 0x01 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_Slot { eQMIUIMSlots mSlot; }; // Structure to describe request TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelRequest_FileControlInformation { eQMIUIMFileControlInformation mFileControlInformation; }; // Structure to describe response TLV 0x10 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_LogicalChannel { UINT8 mChannelID; }; // Structure to describe response TLV 0x11 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_CardResult { UINT8 mSW1; UINT8 mSW2; }; // Structure to describe response TLV 0x12 for UIMOpenLogicalChannel() struct sUIMOpenLogicalChannelResponse_ResponseToSelectCommand { UINT8 mResponseLength; // This array must be the size specified by mResponseLength // UINT8 mResponse[1]; }; // Structure to describe indication TLV 0x01 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_Slot { eQMIUIMSlots mSlot; }; // Structure to describe indication TLV 0x10 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_AID { UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe indication TLV 0x11 for UIM SessionClosedIndication struct sUIMSessionClosedIndication_LogicalChannel { UINT8 mChannelID; }; // Structure to describe request TLV 0x01 for UIMRefreshRegisterAll() struct sUIMRefreshRegisterAllRequest_SessionInfo { eQMIUIMSessionTypes mSessionType; UINT8 mAIDLength; // This array must be the size specified by mAIDLength // UINT8 mAID[1]; }; // Structure to describe request TLV 0x10 for UIMRefreshRegisterAll() struct sUIMRefreshRegisterAllRequest_VoteForInit { INT8 mVoteForInitialization; }; // Structure to describe request TLV 0x01 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateRequest_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x10 for PBMSetIndicationRegistrationState() struct sPBMSetIndicationRegistrationStateResponse_Mask { bool mRecordUpdate:1; bool mPhonebookReady:1; bool mEmergencyNumberList:1; bool mHiddenRecordStatus:1; bool mAASUpdate:1; bool mGASUpdate:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for PBMGetCapabilities() struct sPBMGetCapabilitiesRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Basic { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // Structure to describe response TLV 0x11 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Group { UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // Structure to describe response TLV 0x12 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AdditionalNumber { UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // Structure to describe response TLV 0x13 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Email { UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // Structure to describe response TLV 0x14 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_SecondName { UINT8 mMaximumSecondNameLength; }; // Structure to describe response TLV 0x15 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_HiddenRecords { INT8 mHiddenEntrySupported; }; // Structure to describe response TLV 0x16 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_GAS { UINT8 mMaximumGASStringLength; }; // Structure to describe response TLV 0x17 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_AAS { UINT8 mMaximumAASStringLength; }; // Structure to describe response TLV 0x18 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Protection { eQMIPBMProtectionMethods mProtectionMethod; }; // Structure to describe response TLV 0x19 for PBMGetCapabilities() struct sPBMGetCapabilitiesResponse_Sets { UINT16 mNumberOfPhonebookSets; }; // Structure to describe response TLV 0x10 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Basic { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberOfPhonebooks; struct sPhonebook { eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordsUsed; UINT16 mMaximumRecords; UINT8 mMaximumNumberLength; UINT8 mMaximumNameLength; }; // This array must be the size specified by mNumberOfPhonebooks // sPhonebook mPhonebooks[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x11 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Group { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumGroupsPossible; UINT8 mMaximumGroupTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x12 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AdditionalNumber { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumAdditionalNumbersPossible; UINT8 mMaximumAdditionalNumberLength; UINT8 mMaximumAdditionalNumberTagLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_Email { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumEmailsPossible; UINT8 mMaximumEmailAddressLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x14 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_SecondName { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumSecondNameLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x15 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_HiddenRecords { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; INT8 mHiddenEntrySupported; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x16 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_GAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumGASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x17 for PBMGetAllCapabilities() struct sPBMGetAllCapabilitiesResponse_AAS { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mMaximumRecords; UINT8 mRecordsUsed; UINT8 mMaximumAASStringLength; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMReadRecords() struct sPBMReadRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mStartingRecordID; UINT16 mEndingRecordID; }; // Structure to describe response TLV 0x10 for PBMReadRecords() struct sPBMReadRecordsResponse_RecordsRead { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Basic { UINT16 mSequenceNumber; eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT8 mNumberOfRecords; struct sRecord1 { UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sRecord2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sRecord { sRecord1 mRecord1; sRecord2 mRecord2; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x10 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_SecondName { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mSecondNameLength; // This array must be the size (in BYTEs) specified by mSecondNameLength // wchar_t mSecondName[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x11 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_AdditionalNumber { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x12 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Group { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x13 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Email { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe indication TLV 0x14 for PBM ReadRecordsIndication struct sPBMReadRecordsIndication_Hidden { UINT8 mNumberOfRecords; struct sRecord { UINT16 mRecordID; INT8 mHidden; }; // This array must be the size specified by mNumberOfRecords // sRecord mRecords[1]; }; // Structure to describe request TLV 0x01 for PBMWriteRecord() struct sPBMWriteRecordRequest_Info1 { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sPBMWriteRecordRequest_Info2 { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; struct sPBMWriteRecordRequest_Info { sPBMWriteRecordRequest_Info1 mPBMWriteRecordRequest_Info1; sPBMWriteRecordRequest_Info2 mPBMWriteRecordRequest_Info2; }; // Structure to describe request TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordRequest_SecondName { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe request TLV 0x11 for PBMWriteRecord() struct sPBMWriteRecordRequest_AdditionalNumber { UINT8 mAdditionalNumberCount; struct sAdditionalNumber1 { eQMIPBMNumberTypes mNumberType; eQMIPBMNumberPlans mNumberPlan; UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; struct sAdditionalNumber2 { UINT8 mTagID; }; struct sAdditionalNumber { sAdditionalNumber1 mAdditionalNumber1; sAdditionalNumber2 mAdditionalNumber2; }; // This array must be the size specified by mAdditionalNumberCount // sAdditionalNumber mAdditionalNumbers[1]; }; // Structure to describe request TLV 0x12 for PBMWriteRecord() struct sPBMWriteRecordRequest_Group { UINT8 mGroupCount; // This array must be the size specified by mGroupCount // UINT8 mGroupID[1]; }; // Structure to describe request TLV 0x13 for PBMWriteRecord() struct sPBMWriteRecordRequest_Email { UINT8 mEmailCount; struct sEmail { UINT8 mAddressLength; // This array must be the size (in BYTEs) specified by mAddressLength // wchar_t mAddress[1]; }; // This array must be the size specified by mEmailCount // sEmail mEmails[1]; }; // Structure to describe request TLV 0x14 for PBMWriteRecord() struct sPBMWriteRecordRequest_Hidden { INT8 mHidden; }; // Structure to describe response TLV 0x10 for PBMWriteRecord() struct sPBMWriteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteRecord() struct sPBMDeleteRecordRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMDeleteRecord() struct sPBMDeleteRecordResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMDeleteAllRecords() struct sPBMDeleteAllRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x01 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe request TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Number { UINT8 mNumberLength; // This array must be the size specified by mNumberLength // char mNumber[1]; }; // Structure to describe request TLV 0x11 for PBMSearchRecords() struct sPBMSearchRecordsRequest_Name { UINT8 mNameLength; // This array must be the size (in BYTEs) specified by mNameLength // wchar_t mName[1]; }; // Structure to describe response TLV 0x10 for PBMSearchRecords() struct sPBMSearchRecordsResponse_List { UINT16 mNumberOfRecordIDs; // This array must be the size specified by mNumberOfRecordIDs // UINT16 mRecordID[1]; }; // Structure to describe indication TLV 0x01 for PBM RecordUpdateIndication struct sPBMRecordUpdateIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMOperations mOperation; UINT16 mRecordID; }; // Structure to describe indication TLV 0x01 for PBM RefreshIndication struct sPBMRefreshIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMRefreshStatus mStatus; }; // Structure to describe indication TLV 0x01 for PBM ReadyIndication struct sPBMReadyIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe indication TLV 0x01 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x10 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x11 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x12 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe indication TLV 0x13 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_HardCodedNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x14 for PBM EmergencyListIndication struct sPBMEmergencyListIndication_NVNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe indication TLV 0x01 for PBM AllReadyIndication struct sPBMAllReadyIndication_Info { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; bool mAbbreviatedDialingNumber:1; bool mFixedDialingNumber:1; bool mMobileSubscriberIntegratedServicesDigitalNetwork:1; bool mMailBoxDialingNumber:1; bool mServiceDialingNumber:1; bool mBarredDialingNumber:1; bool mLastNumberDialed:1; bool mMailBoxNumber:1; // Padding out 8 bits UINT8 mReserved1; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x10 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_HardCodedNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x11 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NVNumbers { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x12 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_CardNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x13 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NetworkNumbers { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mNumberCount; struct sNumber { bool mPolice:1; bool mAmbulance:1; bool mFireBrigade:1; bool mMarineGuard:1; bool mMountainRescue:1; bool mManualECall:1; bool mAutomaticECall:1; bool mSpare:1; UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe response TLV 0x14 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_HardCodedNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x15 for PBMGetEmergencyList() struct sPBMGetEmergencyListResponse_NVNumbersEx { UINT8 mNumberCount; struct sNumber { UINT8 mEmergencyNumberLength; // This array must be the size specified by mEmergencyNumberLength // char mEmergencyNumber[1]; }; // This array must be the size specified by mNumberCount // sNumber mNumbers[1]; }; // Structure to describe response TLV 0x10 for PBMGetAllGroups() struct sPBMGetAllGroupsResponse_Groups { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mGroupCount; struct sGroup { UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // This array must be the size specified by mGroupCount // sGroup mGroups[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x01 for PBMSetGroupInfo() struct sPBMSetGroupInfoRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGroupID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe response TLV 0x10 for PBMSetGroupInfo() struct sPBMSetGroupInfoResponse_ID { eQMIPBMSessionTypes mSessionType; UINT8 mGroupID; }; // Structure to describe request TLV 0x01 for PBMGetState() struct sPBMGetStateRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; }; // Structure to describe response TLV 0x10 for PBMGetStateInfo() struct sPBMGetStateInfoResponse_State { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; eQMIPBMStates mState; }; // Structure to describe request TLV 0x01 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsRequest_Info { eQMIPBMSessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for PBMReadAllHiddenRecords() struct sPBMReadAllHiddenRecordsResponse_Records { UINT16 mNumberOfRecords; }; // Structure to describe indication TLV 0x01 for PBM HiddenRecordStatusIndication struct sPBMHiddenRecordStatusIndication_Status { eQMIPBMSessionTypes mSessionType; INT8 mHiddenRecordsValid; }; // Structure to describe request TLV 0x01 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextEmptyRecordID() struct sPBMGetNextEmptyRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe request TLV 0x01 for PBMGetNextRecordID() struct sPBMGetNextRecordIDRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMPhonebookTypes mPhonebookType; UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetNextRecordID() struct sPBMGetNextRecordIDResponse_Info { UINT16 mRecordID; }; // Structure to describe response TLV 0x10 for PBMGetAASList() struct sPBMGetAASListResponse_List { UINT8 mNumberOfSessions; struct sSession { eQMIPBMSessionTypes mSessionType; UINT8 mAASCount; struct sAAS { UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // This array must be the size specified by mAASCount // sAAS mAASs[1]; }; // This array must be the size specified by mNumberOfSessions // sSession mSessions[1]; }; // Structure to describe request TLV 0x10 for PBMSetAAS() struct sPBMSetAASRequest_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMAASOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe response TLV 0x10 for PBMSetAAS() struct sPBMSetAASResponse_Info { eQMIPBMSessionTypes mSessionType; UINT8 mAASID; }; // Structure to describe indication TLV 0x01 for PBM AASChangeIndication struct sPBMAASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mAASID; UINT8 mAlphaStringLength; // This array must be the size (in BYTEs) specified by mAlphaStringLength // wchar_t mAlphaString[1]; }; // Structure to describe indication TLV 0x01 for PBM GASChangeIndication struct sPBMGASChangeIndication_Info { eQMIPBMSessionTypes mSessionType; eQMIPBMOperations mOperation; UINT8 mGASID; UINT8 mGroupNameLength; // This array must be the size (in BYTEs) specified by mGroupNameLength // wchar_t mGroupName[1]; }; // Structure to describe request TLV 0x10 for PBMBindSubscription() struct sPBMBindSubscriptionRequest_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe response TLV 0x10 for PBMGetSubscription() struct sPBMGetSubscriptionResponse_Type { eQMIPBMSubscriptionTypes mSubscriptionType; }; // Structure to describe request TLV 0x01 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationRequest_Session { eQMIPBMSessionTypes mSessionType; }; // Structure to describe request TLV 0x10 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationRequest_StartID { UINT16 mStartingSetID; }; // Structure to describe request TLV 0x11 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationRequest_EndID { UINT16 mEndingSetID; }; // Structure to describe response TLV 0x10 for PBMSetCapabilitiesReadOperation() struct sPBMSetCapabilitiesReadOperationResponse_Sets { UINT16 mNumberOfPhonebookSets; }; // Structure to describe indication TLV 0x01 for PBM SetCapabilitiesReadOperationIndication struct sPBMSetCapabilitiesReadOperationIndication_Data { eQMIPBMSessionTypes mSessionType; UINT8 mNumberOfPhonebookSets; struct sSet { UINT16 mSetID; UINT8 mNumberOfUSIMFiles; struct sField { eQMIPBMFieldTypes mFieldID; eQMIPBMMappingTypes mMappingType; UINT16 mNumberOfRecords; UINT16 mNumberOfFreeRecords; UINT16 mRecordLength; }; // This array must be the size specified by mNumberOfUSIMFiles // sField mFields[1]; }; // This array must be the size specified by mNumberOfPhonebookSets // sSet mSets[1]; }; // Structure to describe request TLV 0x01 for LOCClientRevision() struct sLOCClientRevisionRequest_Revision { UINT32 mRevision; }; // Structure to describe request TLV 0x01 for LOCRegisterEvents() struct sLOCRegisterEventsRequest_EventRegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; // Padding out 47 bits UINT8 mReserved1:7; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCStart() struct sLOCStartRequest_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x10 for LOCStart() struct sLOCStartRequest_FixRecurrenceType { eQMILOCFixRecurrenceType mFixRecurrenceType; }; // Structure to describe request TLV 0x11 for LOCStart() struct sLOCStartRequest_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe request TLV 0x12 for LOCStart() struct sLOCStartRequest_EnableIntermediateReports { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe request TLV 0x13 for LOCStart() struct sLOCStartRequest_MinimumIntervalBetweenPositionReports { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe request TLV 0x14 for LOCStart() struct sLOCStartRequest_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCStartRequest_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCStartRequest_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCStartRequest_ApplicationID { sLOCStartRequest_ApplicationID1 mLOCStartRequest_ApplicationID1; sLOCStartRequest_ApplicationID2 mLOCStartRequest_ApplicationID2; sLOCStartRequest_ApplicationID3 mLOCStartRequest_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCStop() struct sLOCStopRequest_SessionID { UINT8 mSessionID; }; // Structure to describe indication TLV 0x01 for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionStatus { eQMILOCSessionStatus mSessionStatus; }; // Structure to describe indication TLV 0x10 for LOC PositionReportIndication struct sLOCPositionReportIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x11 for LOC PositionReportIndication struct sLOCPositionReportIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x13 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x14 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x15 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x16 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x17 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x18 for LOC PositionReportIndication struct sLOCPositionReportIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x19 for LOC PositionReportIndication struct sLOCPositionReportIndication_SpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x1A for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x1B for LOC PositionReportIndication struct sLOCPositionReportIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x1C for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x1D for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x1E for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x1F for LOC PositionReportIndication struct sLOCPositionReportIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC PositionReportIndication struct sLOCPositionReportIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x21 for LOC PositionReportIndication struct sLOCPositionReportIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x22 for LOC PositionReportIndication struct sLOCPositionReportIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x23 for LOC PositionReportIndication struct sLOCPositionReportIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; bool mInjectedPosition:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x24 for LOC PositionReportIndication struct sLOCPositionReportIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x25 for LOC PositionReportIndication struct sLOCPositionReportIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x26 for LOC PositionReportIndication struct sLOCPositionReportIndication_LeapSeconds { UINT8 mLeapSeconds; }; // Structure to describe indication TLV 0x27 for LOC PositionReportIndication struct sLOCPositionReportIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x28 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x29 for LOC PositionReportIndication struct sLOCPositionReportIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2A for LOC PositionReportIndication struct sLOCPositionReportIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2B for LOC PositionReportIndication struct sLOCPositionReportIndication_SessionFixCount { UINT32 mSessionFixCount; }; // Structure to describe indication TLV 0x2C for LOC PositionReportIndication struct sLOCPositionReportIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe indication TLV 0x01 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_AltitudeSource { eQMILOCAltitudeAssumed mAltitudeAssumed; }; // Structure to describe indication TLV 0x10 for LOC GNSSSatelliteInfoIndication struct sLOCGNSSSatelliteInfoIndication_SatelliteInfo { UINT8 mSatelliteInfoCount; bool mValidSystem:1; bool mValidGNSSSatelliteID:1; bool mValidHealthStatus:1; bool mValidProcessStatus:1; bool mValidSatelliteInfoMask:1; bool mValidElevation:1; bool mValidAzimuth:1; bool mValidSignalToNoiseRatio:1; // Padding out 24 bits UINT8 mReserved1[3]; eQMILOCSystem mSystem; UINT16 mGNSSSatelliteID; eQMILOCHealthStatus mHealthStatus; eQMILOCSatelliteStatus mSatelliteStatus; bool mHasEphemeris:1; bool mHasAlmanac:1; // Padding out 6 bits UINT8 mReserved2:6; float mElevationDegrees; float mAzimuthDegrees; float mSignalToNoiseRatiodBHz; }; // Structure to describe indication TLV 0x01 for LOC NMEAIndication struct sLOCNMEAIndication_NMEAString { // String is variable length, but must be size of the container // char mNMEAString[1]; }; // Structure to describe request TLV 0x01 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_NotificationType { eQMILOCNotificationType mNotificationType; }; // Structure to describe request TLV 0x10 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_VxRequest { sLOCNetworkInitiatedRequestIndication_VxRequest1 mLOCNetworkInitiatedRequestIndication_VxRequest1; sLOCNetworkInitiatedRequestIndication_VxRequest2 mLOCNetworkInitiatedRequestIndication_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_SUPLRequest { sLOCNetworkInitiatedRequestIndication_SUPLRequest1 mLOCNetworkInitiatedRequestIndication_SUPLRequest1; sLOCNetworkInitiatedRequestIndication_SUPLRequest2 mLOCNetworkInitiatedRequestIndication_SUPLRequest2; sLOCNetworkInitiatedRequestIndication_SUPLRequest3 mLOCNetworkInitiatedRequestIndication_SUPLRequest3; sLOCNetworkInitiatedRequestIndication_SUPLRequest4 mLOCNetworkInitiatedRequestIndication_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest { sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest1; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest2; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest3; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest4; sLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5 mLOCNetworkInitiatedRequestIndication_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCNetworkInitiated() struct sLOCNetworkInitiatedRequestIndication_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe indication TLV 0x10 for LOC InjectTimeIndication struct sLOCInjectTimeIndication_TimeServerInfo { UINT32 mDelayThresholdMilliseconds; UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_AllowedSize { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsIndication struct sLOCInjectPredictedOrbitsIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x01 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x03 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x04 for LOC InjectPositionIndication struct sLOCInjectPositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x01 for LOC EngineStateIndication struct sLOCEngineStateIndication_EngineState { eQMILOCEngineState mEngineState; }; // Structure to describe indication TLV 0x01 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionState { eQMILOCSessionState mSessionState; }; // Structure to describe indication TLV 0x10 for LOC FixSessionStateIndication struct sLOCFixSessionStateIndication_SessionID { UINT8 mSessionID; }; // Structure to describe request TLV 0x01 for LOCWiFi() struct sLOCWiFiRequestIndication_RequestType { eQMILOCRequestType mRequestType; }; // Structure to describe request TLV 0x10 for LOCWiFi() struct sLOCWiFiRequestIndication_TimeBetweenFixes { UINT16 mTimeBetweenFixesMilliseconds; }; // Structure to describe indication TLV 0x10 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_AccelerometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x11 for LOC SensorStreamingReadyStatusIndication struct sLOCSensorStreamingReadyStatusIndication_GyrometerReady { INT8 mReadyForInjection; UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x01 for LOCTimeSync() struct sLOCTimeSyncRequestIndication_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe indication TLV 0x01 for LOC SetSPIStreamingReportIndication struct sLOCSetSPIStreamingReportIndication_SPIRequests { INT8 mEnableSPIRequests; }; // Structure to describe request TLV 0x01 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCLocationServerConnection() struct sLOCLocationServerConnectionRequestIndication_WWANType { eQMILOCWWANType mWWANType; }; // Structure to describe indication TLV 0x10 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSMeasurementEngineFirmwareVersion { // String is variable length, but must be size of the container // char mFirmwareVersion[1]; }; // Structure to describe indication TLV 0x11 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSHostedSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x12 for LOC GetServiceRevisionIndication struct sLOCGetServiceRevisionIndication_GNSSSoftwareVersion { // String is variable length, but must be size of the container // char mSoftwareVersion[1]; }; // Structure to describe indication TLV 0x10 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_HorizontalAccuracy { eQMILOCHorizontalAccuracy mHorizontalAccuracy; }; // Structure to describe indication TLV 0x11 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_IntermediateFixes { eQMILOCIntermediateReportState mEnableIntermediateReports; }; // Structure to describe indication TLV 0x12 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_MinimumIntervalBetweenFixes { UINT32 mMinimumTimeIntervalMilliseconds; }; // Structure to describe indication TLV 0x13 for LOC GetFixCriteriaIndication struct sLOCGetFixCriteriaIndication_ApplicationID1 { UINT8 mApplicationProviderLength; // This array must be the size specified by mApplicationProviderLength // char mApplicationProvider[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID2 { UINT8 mApplicationNameLength; // This array must be the size specified by mApplicationNameLength // char mApplicationName[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID3 { INT8 mApplicationVersionValid; UINT8 mApplicationVersionLength; // This array must be the size specified by mApplicationVersionLength // char mApplicationVersion[1]; }; struct sLOCGetFixCriteriaIndication_ApplicationID { sLOCGetFixCriteriaIndication_ApplicationID1 mLOCGetFixCriteriaIndication_ApplicationID1; sLOCGetFixCriteriaIndication_ApplicationID2 mLOCGetFixCriteriaIndication_ApplicationID2; sLOCGetFixCriteriaIndication_ApplicationID3 mLOCGetFixCriteriaIndication_ApplicationID3; }; // Structure to describe request TLV 0x01 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UserResponse { eQMILOCUserResponse mUserResponse; }; // Structure to describe request TLV 0x10 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_VxRequest1 { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; // This array must be the size specified by mRequestorIDLength // UINT8 mRequestorID[1]; }; struct sLOCProvideNIUserResponseRequest_VxRequest2 { UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_VxRequest { sLOCProvideNIUserResponseRequest_VxRequest1 mLOCProvideNIUserResponseRequest_VxRequest1; sLOCProvideNIUserResponseRequest_VxRequest2 mLOCProvideNIUserResponseRequest_VxRequest2; }; // Structure to describe request TLV 0x11 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLRequest1 { bool mValidServerInfo:1; bool mValidSessionID:1; bool mValidHash:1; bool mValidPositionMethod:1; bool mValidDataCodingScheme:1; bool mValidRequestorID:1; bool mValidClientName:1; bool mValidQualityOfPosition:1; bool mValidUserResponseTimer:1; // Padding out 23 bits UINT8 mReserved1:7; UINT8 mReserved2[2]; bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved3:5; UINT32 mIPv4Address; UINT16 mIPv4Port; UINT8 mIPv6Address[16]; UINT32 mIPv6Port; UINT8 mURLAddressLength; // This array must be the size specified by mURLAddressLength // char mURLAddress[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest2 { UINT8 mSUPLSessionID[4]; UINT8 mSUPLHash[8]; eQMILOCPosition mPositionMethod; eQMILOCDataCodingScheme mDataCodingScheme; eQMILOCFormatType mRequestorIDFormatType; UINT8 mRequestorIDFormattedStringLength; // This array must be the size specified by mRequestorIDFormattedStringLength // UINT8 mRequestorIDFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest3 { eQMILOCFormatType mClientNameFormatType; UINT8 mClientNameFormattedStringLength; // This array must be the size specified by mClientNameFormattedStringLength // UINT8 mClientNameFormattedString[1]; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest4 { bool mQoPHorizontalAccelerationValid:1; bool mQoPVerticalAccelerationValid:1; bool mQoPMaximumAge:1; bool mQoPDelayValid:1; // Padding out 4 bits UINT8 mReserved4:4; UINT8 mHorizontalAccuracyMeters; UINT8 mVerticalAccuracyMeters; UINT16 mMaximumLocationAgeSeconds; UINT8 mDelaySeconds; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_SUPLRequest { sLOCProvideNIUserResponseRequest_SUPLRequest1 mLOCProvideNIUserResponseRequest_SUPLRequest1; sLOCProvideNIUserResponseRequest_SUPLRequest2 mLOCProvideNIUserResponseRequest_SUPLRequest2; sLOCProvideNIUserResponseRequest_SUPLRequest3 mLOCProvideNIUserResponseRequest_SUPLRequest3; sLOCProvideNIUserResponseRequest_SUPLRequest4 mLOCProvideNIUserResponseRequest_SUPLRequest4; }; // Structure to describe request TLV 0x12 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 { bool mValidInvokeID:1; bool mValidDataCodingScheme:1; bool mValidNotificationText:1; bool mValidClientAddress:1; bool mValidLocationType:1; bool mValidRequestorID:1; bool mValidCodewordString:1; bool mValidServiceTypeMask:1; bool mValidUserResponseTImer:1; // Padding out 7 bits UINT8 mReserved1:7; UINT8 mInvokeID; eQMILOCDataCodingScheme mDataCodingScheme; UINT8 mNotificationTextLength; // This array must be the size specified by mNotificationTextLength // UINT8 mNotificationText[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 { UINT8 mClientAddressLength; // This array must be the size specified by mClientAddressLength // UINT8 mClientAddress[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 { eQMILOCLocationType mLocationType; eQMILOCDataCodingScheme mRequestorIDDataCodingScheme; UINT8 mRequestorIDCodedStingLength; // This array must be the size specified by mRequestorIDCodedStingLength // UINT8 mRequestorIDCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 { eQMILOCDataCodingScheme mCodewordStringDataCodingScheme; UINT8 mCodewordStringCodedStringLength; // This array must be the size specified by mCodewordStringCodedStringLength // UINT8 mCodewordStringCodedString[1]; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 { UINT8 mServiceTypeID; UINT16 mUserResponseTimerSeconds; }; struct sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest { sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest1; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest2; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest3; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest4; sLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5 mLOCProvideNIUserResponseRequest_UMTSControlPlaneRequest5; }; // Structure to describe request TLV 0x13 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_ServiceInteractionRequest { INT8 mPositionQoSIncluded; UINT8 mPositionQoSTimeoutSeconds; UINT32 mMaxNumberOfFixes; UINT32 mTimeBetweenFixesSeconds; eQMILOCPositionMode mPosistionMode; eQMILOCEncodingScheme mEncodingScheme; UINT8 mRequestorIDLength; UINT8 mRequestorID; UINT16 mUserResponseTimerSeconds; eQMILOCServiceInteractionType mServiceInteractionType; }; // Structure to describe request TLV 0x14 for LOCProvideNIUserResponse() struct sLOCProvideNIUserResponseRequest_SUPLVersion2Extension { bool mWLAN:1; bool mGSM:1; bool mWCDMA:1; bool mCDMA:1; bool mHRDP:1; bool mUMB:1; bool mLTE:1; bool mWIMAX:1; bool mHISTORIC:1; bool mNONSVRV:1; // Padding out 6 bits UINT8 mReserved1:6; eQMILOCTriggerType mTriggerType; bool mGPS:1; bool mGLONASS:1; bool mGALILEO:1; bool mSBAS:1; bool mQZSS:1; bool mMODERNGPS:1; // Padding out 10 bits UINT8 mReserved2:2; UINT8 mReserved3; }; // Structure to describe request TLV 0x01 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_TotalSize { UINT32 mTotalSize; }; // Structure to describe request TLV 0x03 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartNumber { UINT16 mPartNumber; }; // Structure to describe request TLV 0x04 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_PartData { UINT16 mPartDataLength; // This array must be the size specified by mPartDataLength // UINT8 mPartData[1]; }; // Structure to describe request TLV 0x10 for LOCInjectPredictedOrbitsData() struct sLOCInjectPredictedOrbitsDataRequest_FormatType { eQMILOCOrbitsFormatType mOrbitsFormatType; }; // Structure to describe indication TLV 0x10 for LOC InjectPredictedOrbitsDataIndication struct sLOCInjectPredictedOrbitsDataIndication_PartNumber { UINT16 mPartNumber; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_AllowedSizes { UINT32 mMaximumFileSizeBytes; UINT32 mMaximumPartSizeBytes; }; // Structure to describe indication TLV 0x11 for LOC GetPredictedOrbitsDataSourceIndication struct sLOCGetPredictedOrbitsDataSourceIndication_ServerList { UINT8 mServerListLength; struct sServer { UINT8 mServerURLLength; // This array must be the size specified by mServerURLLength // char mServerURL[1]; }; // This array must be the size specified by mServerListLength // sServer mServers[1]; }; // Structure to describe indication TLV 0x10 for LOC GetPredictedOrbitsDataValidityIndication struct sLOCGetPredictedOrbitsDataValidityIndication_ValidityInfo { UINT64 mStartTimeInUTC; UINT16 mDurationHours; }; // Structure to describe request TLV 0x01 for LOCInjectUTCTime() struct sLOCInjectUTCTimeRequest_UTCTime { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x10 for LOCInjectPosition() struct sLOCInjectPositionRequest_Latitude { double mLatitudeDegrees; }; // Structure to describe request TLV 0x11 for LOCInjectPosition() struct sLOCInjectPositionRequest_Longitude { double mLongitudeDegrees; }; // Structure to describe request TLV 0x12 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe request TLV 0x13 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalConfidence { UINT8 mHorizontalConfidencePercent; }; // Structure to describe request TLV 0x14 for LOCInjectPosition() struct sLOCInjectPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x15 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe request TLV 0x16 for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe request TLV 0x17 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe request TLV 0x18 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe request TLV 0x19 for LOCInjectPosition() struct sLOCInjectPositionRequest_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe request TLV 0x1A for LOCInjectPosition() struct sLOCInjectPositionRequest_AltitudeSource { eQMILOCAltitudeSource mAltitudeSource; eQMILOCLinkage mLinkage; eQMILOCCoverage mCoverage; }; // Structure to describe request TLV 0x1B for LOCInjectPosition() struct sLOCInjectPositionRequest_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe request TLV 0x1C for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionAge { UINT32 mAgeTimestampMilliseconds; }; // Structure to describe request TLV 0x1D for LOCInjectPosition() struct sLOCInjectPositionRequest_PositionSource { eQMILOCPositionSource mPositionSource; }; // Structure to describe request TLV 0x01 for LOCSetEngineLock() struct sLOCSetEngineLockRequest_LockType { eQMILOCLockType mLockType; }; // Structure to describe indication TLV 0x10 for LOC GetEngineLockIndication struct sLOCGetEngineLockIndication_LockType { eQMILOCLockType mLockType; }; // Structure to describe request TLV 0x01 for LOCSetSBASConfig() struct sLOCSetSBASConfigRequest_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe response TLV 0x10 for LOCGetSBASConfig() struct sLOCGetSBASConfigResponse_SBASConfig { INT8 mSBASEnabled; }; // Structure to describe request TLV 0x01 for LOCSetNMEATypes() struct sLOCSetNMEATypesRequest_SentenceTypes { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetNMEATypesIndication struct sLOCGetNMEATypesIndication_SentenceType { bool mGGASentence:1; bool mRMCSentence:1; bool mGSVSentence:1; bool mGSASentence:1; bool mVTGSentence:1; bool mPQXFISentence:1; bool mPSTISSentence:1; // Padding out 25 bits UINT8 mReserved1:1; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCSetLowPowerMode() struct sLOCSetLowPowerModeRequest_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe indication TLV 0x10 for LOC GetLowPowerModeIndication struct sLOCGetLowPowerModeIndication_EnableLPM { INT8 mEnableLowPowerMode; }; // Structure to describe request TLV 0x01 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe request TLV 0x11 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe request TLV 0x12 for LOCSetLocationServer() struct sLOCSetLocationServerRequest_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_ServerType { eQMILOCLocationServerType mServerType; }; // Structure to describe request TLV 0x10 for LOCGetLocationServer() struct sLOCGetLocationServerRequest_AddressType { bool mIPv4:1; bool mIPv6:1; bool mURL:1; // Padding out 5 bits UINT8 mReserved1:5; }; // Structure to describe indication TLV 0x10 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv4Address { UINT32 mIPv4Address; UINT16 mIPv4Port; }; // Structure to describe indication TLV 0x11 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_IPv6Address { UINT8 mIPv6Address[16]; UINT32 mIPv6Port; }; // Structure to describe indication TLV 0x12 for LOC GetLocationServerIndication struct sLOCGetLocationServerIndication_URLAddress { // String is variable length, but must be size of the container // char mURLAddress[1]; }; // Structure to describe request TLV 0x01 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteAll { INT8 mDeleteAll; }; // Structure to describe request TLV 0x10 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteSatelliteInfo { UINT8 mSatelliteInfoCount; struct sSatelliteInfo { UINT16 mGNSSSatelliteID; eQMILOCSystem mSystem; bool mDeleteEphemeris:1; bool mDeleteAlmanac:1; // Padding out 6 bits UINT8 mReserved1:6; }; // This array must be the size specified by mSatelliteInfoCount // sSatelliteInfo mSatelliteInfos[1]; }; // Structure to describe request TLV 0x11 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteGNSData { bool mDeleteGPSSatelliteDirectory:1; bool mDeleteGPSSatelliteSteering:1; bool mDeleteGPSTime:1; bool mDeleteGPSAlmanacCorrection:1; bool mDeleteGLOSatelliteDirectory:1; bool mDeleteGLOSatelliteSteering:1; bool mDeleteGLOTime:1; bool mDeleteGLOAlmanacCorrection:1; bool mDeleteSBASSatelliteDirectory:1; bool mDeleteSBASSatelliteSteering:1; bool mDeletePosition:1; bool mDeleteTime:1; bool mDeleteIONO:1; bool mDeleteUTCTimestamp:1; bool mDeleteHealth:1; bool mDeleteSAData:1; bool mDeleteRTI:1; bool mDeleteSatelliteNoExist:1; bool mDeleteFrequencyBiasEstimate:1; // Padding out 45 bits UINT8 mReserved1:5; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x12 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteCellDatabase { bool mDeletePosition:1; bool mDeleteLatestGPSPosition:1; bool mDeleteOTAPosition:1; bool mDeleteEXTReferencePosition:1; bool mDeleteTimeTag:1; bool mDeleteCellID:1; bool mDeleteCachedCellID:1; bool mDeleteLastServerCell:1; bool mDeleteCurrentServerCell:1; bool mDeleteNeighborInfo:1; // Padding out 22 bits UINT8 mReserved1:6; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x13 for LOCDeleteAssistData() struct sLOCDeleteAssistDataRequest_DeleteClockInfo { bool mDeleteTimeEstimate:1; bool mDeleteFrequencyEstimate:1; bool mDeleteWeekNumber:1; bool mDeleteRTCTime:1; bool mDeleteTimeTransfer:1; bool mDeleteGPSTimeEstimate:1; bool mDeleteGLOTimeEstimate:1; bool mDeleteGLODayNumber:1; bool mDeleteGLOYearNumber:1; bool mDeleteGLORFGroupDelay:1; bool mDeleteDisableTT:1; // Padding out 21 bits UINT8 mReserved1:5; UINT8 mReserved2[2]; }; // Structure to describe request TLV 0x01 for LOCSetXTRATSessionControl() struct sLOCSetXTRATSessionControlRequest_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe indication TLV 0x10 for LOC GetXTRATSessionControlIndication struct sLOCGetXTRATSessionControlIndication_EnableXTRAT { INT8 mEnableXTRAT; }; // Structure to describe request TLV 0x10 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_Time { UINT32 mWiFiPositionTime; }; // Structure to describe request TLV 0x11 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_WiFiPosition { double mLatitudeDegrees; double mLongitudeDegrees; UINT16 mHEPEMeters; UINT8 mNumberOfAccessPointsUsed; eQMILOCWiFiFixErrorCode mFixErrorCode; }; // Structure to describe request TLV 0x12 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_AccessPointInformation { UINT8 mNumberOfAccessPoints; struct sAccessPointInfo { UINT8 mMACAddress[6]; INT32 mRSSIdBm; UINT16 mChannel; bool mBeingUsed:1; bool mHiddenSSID:1; bool mPrivate:1; bool mInfrastructureMode:1; // Padding out 4 bits UINT8 mReserved1:4; }; // This array must be the size specified by mNumberOfAccessPoints // sAccessPointInfo mAccessPointInfos[1]; }; // Structure to describe request TLV 0x13 for LOCInjectWiFiPosition() struct sLOCInjectWiFiPositionRequest_HorizontalReliability { eQMILOCReliability mHorizontalReliability; }; // Structure to describe request TLV 0x01 for LOCProvideWiFiStatus() struct sLOCProvideWiFiStatusRequest_WiFiStatus { eQMILOCWiFiStatus mWiFiStatus; }; // Structure to describe indication TLV 0x10 for LOC GetRegisteredEventsIndication struct sLOCGetRegisteredEventsIndication_RegistrationMask { bool mPositionReport:1; bool mGNSSSatelliteInfo:1; bool mNMEA:1; bool mNINotifyVerifyRequest:1; bool mInjectTimeRequest:1; bool mInjectPredictedOrbitsRequest:1; bool mInjectPositionRequest:1; bool mEngineState:1; bool mFixSessionState:1; bool mWiFiRequest:1; bool mSensorStreamingReadyStatus:1; bool mTimeSyncRequest:1; bool mSetSPIStreamingReport:1; bool mLocationServerConnectionRequest:1; bool mNIGeofenceNotification:1; bool mGeofenceGeneralAlert:1; bool mGeofenceBreachNotification:1; // Padding out 47 bits UINT8 mReserved1:7; UINT8 mReserved2[5]; }; // Structure to describe request TLV 0x01 for LOCSetOperationMode() struct sLOCSetOperationModeRequest_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe indication TLV 0x10 for LOC GetOperationModeIndication struct sLOCGetOperationModeIndication_OperationMode { eQMILOCOperationMode mOperationMode; }; // Structure to describe request TLV 0x01 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_StationaryStatus { INT8 mDeviceIsStationary; }; // Structure to describe request TLV 0x10 for LOCSetSPIStatus() struct sLOCSetSPIStatusRequest_Confidence { UINT8 mStationaryConfidence; }; // Structure to describe request TLV 0x10 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe request TLV 0x11 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_AccelerometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe request TLV 0x12 for LOCInjectSensorData() struct sLOCInjectSensorDataRequest_GyrometerData { UINT32 mTimeOfFirstSampleMilliseconds; bool mSignReversal:1; bool mSensorTimeIsModemTime:1; // Padding out 6 bits UINT8 mReserved1:6; UINT8 mSensorDataLength; struct sSensorData { UINT16 mTimeOffsetMilliseconds; float mXAxis; float mYAxis; float mZAxis; }; // This array must be the size specified by mSensorDataLength // sSensorData mSensorDatas[1]; }; // Structure to describe indication TLV 0x10 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_OpaqueIdentifier { UINT32 mOpaqueIdentifier; }; // Structure to describe indication TLV 0x11 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_AccelerometerSampleAccepted { INT8 mAccelerometerSampleAccepted; }; // Structure to describe indication TLV 0x12 for LOC InjectSensorDataIndication struct sLOCInjectSensorDataIndication_GyrometerSamplesAccepted { INT8 mGyrometerSamplesAccepted; }; // Structure to describe request TLV 0x01 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_ReferenceCounter { UINT32 mReferenceCounter; }; // Structure to describe request TLV 0x03 for LOCInjectTimeSyncData() struct sLOCInjectTimeSyncDataRequest_SensorTransmitTime { UINT32 mProcessTXTimeMilliseconds; }; // Structure to describe request TLV 0x01 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe request TLV 0x10 for LOCSetCradleMountConfig() struct sLOCSetCradleMountConfigRequest_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe indication TLV 0x10 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_State { eQMILOCCradleMountState mCradleMountState; }; // Structure to describe indication TLV 0x11 for LOC GetCradleMountConfigIndication struct sLOCGetCradleMountConfigIndication_Confidence { UINT8 mCradleMountConfidence; }; // Structure to describe request TLV 0x01 for LOCSetExternalPowerConfig() struct sLOCSetExternalPowerConfigRequest_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe indication TLV 0x10 for LOC GetExternalPowerConfigIndication struct sLOCGetExternalPowerConfigIndication_PowerState { eQMILOCPowerState mPowerState; }; // Structure to describe request TLV 0x01 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionHandle { UINT32 mConnectionHandle; }; // Structure to describe request TLV 0x03 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_ConnectionStatus { eQMILOCConnectionStatus mConnectionStatus; }; // Structure to describe request TLV 0x10 for LOCProvideConnectionStatus() struct sLOCProvideConnectionStatusRequest_APNProfile { eQMILOCPDNType mPDNType; UINT8 mAPNNameLength; // This array must be the size specified by mAPNNameLength // char mAPNName[1]; }; // Structure to describe request TLV 0x10 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe request TLV 0x11 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe request TLV 0x12 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe request TLV 0x13 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x14 for LOCSetProtocolConfigParameters() struct sLOCSetProtocolConfigParametersRequest_AssistedGLONASS { bool mRRCCP:1; bool mRRLPUP:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC SetProtocolConfigParametersIndication struct sLOCSetProtocolConfigParametersIndication_FailedParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; bool mLLPConfiguration:1; bool mAssistedGLONASS:1; // Padding out 59 bits UINT8 mReserved1:3; UINT8 mReserved2[7]; }; // Structure to describe request TLV 0x01 for LOCGetProtocolConfigParameters() struct sLOCGetProtocolConfigParametersRequest_ConfigParameters { bool mSUPLSecurity:1; bool mVXVersion:1; bool mSUPLVersion:1; bool mLLPConfiguration:1; bool mAssistedGLONASS:1; // Padding out 59 bits UINT8 mReserved1:3; UINT8 mReserved2[7]; }; // Structure to describe indication TLV 0x10 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLSecurity { INT8 mSUPLSecurityEnabled; }; // Structure to describe indication TLV 0x11 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_VXVersion { eQMILOCVXVersion mVXVersion; }; // Structure to describe indication TLV 0x12 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_SUPLVersion { eQMILOCSUPLVersion mSUPLVersion; }; // Structure to describe indication TLV 0x13 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_LPPConfiguration { bool mEnableUserPlane:1; bool mEnableControlPlane:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x14 for LOC GetProtocolConfigParametersIndication struct sLOCGetProtocolConfigParametersIndication_AssistedGLONASS { bool mRRCCP:1; bool mRRLPUP:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x10 for LOCSetSensorControlConfig() struct sLOCSetSensorControlConfigRequest_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe indication TLV 0x10 for LOC GetSensorControlConfigIndication struct sLOCGetSensorControlConfigIndication_SensorUsage { eQMILOCSensorUsage mSensorUsage; }; // Structure to describe request TLV 0x10 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe request TLV 0x11 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x12 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x13 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x14 for LOCSetSensorProperties() struct sLOCSetSensorPropertiesRequest_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPropertiesIndication struct sLOCSetSensorPropertiesIndication_Failures { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetSensorProperties() struct sLOCGetSensorPropertiesRequest_Properties { bool mGyroBiasVariance:1; bool mVelocityRandomWalkSpectralDensity:1; bool mAccelerationRandomWalkSpectralDensity:1; bool mAngleRandomWalkSpectralDensity:1; bool mRateRandomWalkSpectralDensity:1; // Padding out 27 bits UINT8 mReserved1:3; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_GyroBiasVariance { float mGyroBiasVariance; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_VelocityRWSD { float mVelocityRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AccelerationRWSD { float mAccelerationRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_AngleRWSD { float mAngleRandomWalkSpectralDensity; }; // Structure to describe indication TLV 0x14 for LOC GetSensorPropertiesIndication struct sLOCGetSensorPropertiesIndication_RateRWSD { float mRateRandomWalkSpectralDensity; }; // Structure to describe request TLV 0x10 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe request TLV 0x11 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x12 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x13 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x14 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_HDRFAccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x15 for LOCSetSensorPerformanceConfig() struct sLOCSetSensorPerformanceConfigRequest_HDRFGyroscopeSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x10 for LOC SetSensorPerformanceConfigIndication struct sLOCSetSensorPerformanceConfigIndication_FailedConfiguration { bool mPerformanceMode:1; bool mAccelerometerSampling:1; bool mGyrometerSampling:1; bool mAlgorithmConfig:1; bool mHDRFAccelerometerSampling:1; bool mHDRFGyroscopeSampling:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_ControlMode { eQMILOCControlMode mControlMode; }; // Structure to describe indication TLV 0x11 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x12 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_GyrometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x13 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_AlgorithmConfig { bool mDisableINSPositioningFilter:1; // Padding out 31 bits UINT8 mReserved1:7; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x14 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_HDRFAccelerometerSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe indication TLV 0x15 for LOC GetSensorPerformanceConfigIndication struct sLOCGetSensorPerformanceConfigIndication_HDRFGyroscopeSampling { UINT16 mSamplesPerBatch; UINT16 mBatchesPerSecond; }; // Structure to describe request TLV 0x01 for LOCInjectSUPLCertificate() struct sLOCInjectSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x10 for LOCDeleteSUPLCertificate() struct sLOCDeleteSUPLCertificateRequest_ID { UINT8 mSUPLCertificateID; }; // Structure to describe request TLV 0x10 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe request TLV 0x11 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe request TLV 0x12 for LOCSetPositionEngineConfig() struct sLOCSetPositionEngineConfigRequest_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x10 for LOC SetPositionEngineConfigIndication struct sLOCSetPositionEngineConfigIndication_FailedParameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetPositionEngineConfig() struct sLOCGetPositionEngineConfigRequest_Parameters { bool mInjectedPosition:1; bool mFilterSVUsage:1; bool mStoreAssistData:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x10 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_InjectedPosition { INT8 mUseInjectedPositionInCalculations; }; // Structure to describe indication TLV 0x11 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_FilterSVUsage { INT8 mFilterUsageOfSVs; }; // Structure to describe indication TLV 0x12 for LOC GetPositionEngineConfigIndication struct sLOCGetPositionEngineConfigIndication_StoreAssistData { INT8 mStoreAssistanceData; }; // Structure to describe indication TLV 0x01 for LOC NetworkInitiatedGeofenceIndication struct sLOCNetworkInitiatedGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceGeneralAlertIndication struct sLOCEventGeofenceGeneralAlertIndication_GeofenceGeneralAlert { eQMILOCGeofenceGeneralAlert mGeofenceGeneralAlert; }; // Structure to describe indication TLV 0x01 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x10 for LOC EventGeofenceBreachIndication struct sLOCEventGeofenceBreachIndication_GeofencePosition { UINT64 mUTCTimestampMilliseconds; double mLatitudeDegrees; double mLongitudeDegrees; float mHorizontalUncertaintyEllipticalMinorMeters; float mHorizontalUncertaintyEllipticalMajorMeters; float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; INT8 mHorizontalSpeedValid; float mHorizontalSpeedMetersSecond; INT8 mAltitudeEllipsoidValid; float mAltitudeFromEllipsoidMeters; INT8 mVerticalUncertaintyValid; float mVerticalUncertaintyMeters; INT8 mVerticalSpeedValid; float mVerticalSpeedMetersSecond; INT8 mHeadingValid; float mHeadingDegrees; }; // Structure to describe request TLV 0x01 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x03 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe request TLV 0x04 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_IncludePositionInBreachEvent { INT8 mIncludePositionInBreachEvent; }; // Structure to describe request TLV 0x10 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Responsiveness { eQMILOCResponsiveness mResponsiveness; }; // Structure to describe request TLV 0x11 for LOCAddCircularGeofence() struct sLOCAddCircularGeofenceRequest_Confidence { eQMILOCConfidence mConfidence; }; // Structure to describe indication TLV 0x01 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC AddCircularGeofenceIndication struct sLOCAddCircularGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x01 for LOCDeleteGeofence() struct sLOCDeleteGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceStatus { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC DeleteGeofenceIndication struct sLOCDeleteGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe request TLV 0x01 for LOCQueryGeofence() struct sLOCQueryGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x01 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Origin { eQMILOCGeofenceOrigin mGeofenceOrigin; }; // Structure to describe indication TLV 0x13 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_PositionFromGeofence { eQMILOCPositionFromGeofence mPositionFromGeofence; }; // Structure to describe indication TLV 0x14 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_Parameters { double mLatitudeDegrees; double mLongitudeDegrees; UINT32 mRadiusMeters; }; // Structure to describe indication TLV 0x15 for LOC QueryGeofenceIndication struct sLOCQueryGeofenceIndication_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x01 for LOCEditGeofence() struct sLOCEditGeofenceRequest_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe request TLV 0x10 for LOCEditGeofence() struct sLOCEditGeofenceRequest_State { eQMILOCGeofenceState mGeofenceState; }; // Structure to describe request TLV 0x11 for LOCEditGeofence() struct sLOCEditGeofenceRequest_BreachEventMask { bool mEnteringGeofence:1; bool mLeavingGeofence:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe indication TLV 0x01 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_GeofenceID { UINT32 mGeofenceID; }; // Structure to describe indication TLV 0x11 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x12 for LOC EditGeofenceIndication struct sLOCEditGeofenceIndication_FailedParameters { bool mGeofenceState:1; bool mBreachMask:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; }; // Structure to describe request TLV 0x01 for LOCGetBestAvailablePosition() struct sLOCGetBestAvailablePositionRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Latitude { double mLatitudeDegrees; }; // Structure to describe indication TLV 0x12 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Longitude { double mLongitudeDegrees; }; // Structure to describe indication TLV 0x13 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyCircular { float mHorizontalUncertaintyCircularMeters; }; // Structure to describe indication TLV 0x14 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromEllipsoid { float mAltitudeFromEllipsoidMeters; }; // Structure to describe indication TLV 0x15 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalUncertainty { float mVerticalUncertaintyMeters; }; // Structure to describe indication TLV 0x16 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_UTCTimestamp { UINT64 mUTCTimestampMilliseconds; }; // Structure to describe indication TLV 0x17 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeUncertainty { float mTimeUncertaintyMilliseconds; }; // Structure to describe indication TLV 0x18 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMinor { float mHorizontalUncertaintyEllipticalMinorMeters; }; // Structure to describe indication TLV 0x19 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalMajor { float mHorizontalUncertaintyEllipticalMajorMeters; }; // Structure to describe indication TLV 0x1A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalUncertaintyEllipticalAzimuth { float mHorizontalUncertaintyEllipticalAzimuthDecimalDegrees; }; // Structure to describe indication TLV 0x1B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceCircular { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalConfidenceElliptical { UINT8 mHorizontalConfidencePercent; }; // Structure to describe indication TLV 0x1D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalReliablility { eQMILOCReliability mHorizontalReliability; }; // Structure to describe indication TLV 0x1E for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeed { float mHorizontalSpeedMetersSecond; }; // Structure to describe indication TLV 0x1F for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HorizontalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x20 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_AltitudeFromSeaLevel { float mAltitudeFromSeaLevelMeters; }; // Structure to describe indication TLV 0x21 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalConfidence { UINT8 mVerticalConfidencePercent; }; // Structure to describe indication TLV 0x22 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalReliability { eQMILOCReliability mVerticalReliability; }; // Structure to describe indication TLV 0x23 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeed { float mVerticalSpeedMetersSecond; }; // Structure to describe indication TLV 0x24 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_VerticalSpeedUncertainty { float mSpeedUncertaintyMetersSecond; }; // Structure to describe indication TLV 0x25 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_Heading { float mHeadingDegrees; }; // Structure to describe indication TLV 0x26 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_HeadingUncertainty { float mHeadingUncertaintyDegrees; }; // Structure to describe indication TLV 0x27 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_MagneticDeviation { float mMagneticDeviation; }; // Structure to describe indication TLV 0x28 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TechnologyUsed { bool mSatellite:1; bool mCellular:1; bool mWiFi:1; bool mSensors:1; bool mReferenceLocation:1; bool mInjectedPosition:1; // Padding out 26 bits UINT8 mReserved1:2; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x29 for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_DilutionOfPrecision { float mPositionDilutionOfPrecision; float mHorizontalDilutionOfPrecision; float mVerticalDilutionOfPrecision; }; // Structure to describe indication TLV 0x2A for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_GPSTime { UINT16 mGPSWeeks; UINT32 mGPSTimeOfWeekMilliseconds; }; // Structure to describe indication TLV 0x2B for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_TimeSource { eQMILOCTimeSource mTimeSource; }; // Structure to describe indication TLV 0x2C for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SensorDataUsage { bool mAccelerometerUsed:1; bool mGyroUsed:1; // Padding out 30 bits UINT8 mReserved1:6; UINT8 mReserved2[3]; bool mAidedHeading:1; bool mAidedSpeed:1; bool mAidedPosition:1; bool mAidedVelocity:1; // Padding out 28 bits UINT8 mReserved3:4; UINT8 mReserved4[3]; }; // Structure to describe indication TLV 0x2D for LOC GetBestAvailablePositionIndication struct sLOCGetBestAvailablePositionIndication_SatellitesUsed { UINT8 mSatellitesUsedCount; // This array must be the size specified by mSatellitesUsedCount // UINT16 mSatellitesUsed[1]; }; // Structure to describe request TLV 0x01 for LOCInjectMotionData() struct sLOCInjectMotionDataRequest_MotionData { eQMILOCMotionStates mMotionState; eQMILOCMotionModes mMotionMode; float mProbabilityOfState; UINT16 mAgeMilliseconds; UINT16 mTimeoutMilliseconds; }; // Structure to describe indication TLV 0x01 for LOC InjectMotionDataIndication struct sLOCInjectMotionDataIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe request TLV 0x01 for LOCGetNIGeofenceIDList() struct sLOCGetNIGeofenceIDListRequest_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x01 for LOC GetNIGeofenceIDListIndication struct sLOCGetNIGeofenceIDListIndication_Status { eQMILOCGeofenceStatus mGeofenceStatus; }; // Structure to describe indication TLV 0x10 for LOC GetNIGeofenceIDListIndication struct sLOCGetNIGeofenceIDListIndication_TransactionID { UINT32 mTransactionID; }; // Structure to describe indication TLV 0x11 for LOC GetNIGeofenceIDListIndication struct sLOCGetNIGeofenceIDListIndication_GeofenceIDList { UINT8 mGeofenceIDCount; // This array must be the size specified by mGeofenceIDCount // UINT32 mGeofenceID[1]; }; // Structure to describe request TLV 0x01 for QCMAPEnable() struct sQCMAPEnableRequest_IPFamily { eQMIQCMAPIPFamilies mIPFamily; }; // Structure to describe request TLV 0x10 for QCMAPEnable() struct sQCMAPEnableRequest_IPAddress { UINT8 mSubnetMask[4]; UINT8 mNATIPAddress[4]; UINT8 mNATDNSAddress[4]; UINT8 mUSBIPAddress[4]; UINT8 mUSBGatewayAddress[4]; UINT8 mApplicationsIPAddress[4]; UINT8 mApplicationsGatewayAddress[4]; }; // Structure to describe request TLV 0x11 for QCMAPEnable() struct sQCMAPEnableRequest_NetworkPolicy { bool m3GPP:1; bool m3GPP2:1; // Padding out 62 bits UINT8 mReserved1:6; UINT8 mReserved2[7]; UINT8 m3GPP2ProfileID; UINT8 m3GPPProfileID; }; // Structure to describe response TLV 0x10 for QCMAPEnable() struct sQCMAPEnableResponse_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPDisable() struct sQCMAPDisableRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPBringUpWWAN() struct sQCMAPBringUpWWANRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x01 for QCMAP BringUpWWANIndication struct sQCMAPBringUpWWANIndication_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPTearDownWWAN() struct sQCMAPTearDownWWANRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x01 for QCMAP TearDownWWANIndication struct sQCMAPTearDownWWANIndication_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusResponse_CallEndReason { eQMIQCMAPCallEndReasons mCallEndReason; }; // Structure to describe response TLV 0x11 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusResponse_VerboseCallEndReason { eQMIQCMAPVerboseCallEndReasons mVerboseCallEndReason; }; // Structure to describe response TLV 0x12 for QCMAPGetWWANStatus() struct sQCMAPGetWWANStatusResponse_PacketServiceStatus { eQMIQCMAPPacketServiceStatus mPacketServiceStatus; }; // Structure to describe request TLV 0x01 for QCMAPGetIPSecVPNPassthrough() struct sQCMAPGetIPSecVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetIPSecVPNPassthrough() struct sQCMAPGetIPSecVPNPassthroughResponse_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPSetIPSecVPNPassthrough() struct sQCMAPSetIPSecVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetPPTPVPNPassthrough() struct sQCMAPGetPPTPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetPPTPVPNPassthrough() struct sQCMAPGetPPTPVPNPassthroughResponse_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPSetPPTPVPNPassthrough() struct sQCMAPSetPPTPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetL2TPVPNPassthrough() struct sQCMAPGetL2TPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetL2TPVPNPassthrough() struct sQCMAPGetL2TPVPNPassthroughResponse_Passthrough { INT8 mVPNPassthroughAllowed; }; // Structure to describe request TLV 0x01 for QCMAPSetL2TPVPNPassthrough() struct sQCMAPSetL2TPVPNPassthroughRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetDynamicNATEntryTimeout() struct sQCMAPGetDynamicNATEntryTimeoutRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetDynamicNATEntryTimeout() struct sQCMAPGetDynamicNATEntryTimeoutResponse_Timeout { UINT16 mTimeout; }; // Structure to describe request TLV 0x01 for QCMAPSetDynamicNATEntryTimeout() struct sQCMAPSetDynamicNATEntryTimeoutRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPAddStaticNATEntry() struct sQCMAPAddStaticNATEntryRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPDeleteStaticNATEntry() struct sQCMAPDeleteStaticNATEntryRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetStaticNATEntries() struct sQCMAPGetStaticNATEntriesRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetStaticNATEntries() struct sQCMAPGetStaticNATEntriesResponse_SNATEntries { UINT8 mSNATEntriesCount; struct sSNATEntry { UINT8 mPrivateIPAddress[4]; UINT16 mPrivatePort; UINT16 mGlobalPort; UINT8 mProtocol; }; // This array must be the size specified by mSNATEntriesCount // sSNATEntry mSNATEntrys[1]; }; // Structure to describe request TLV 0x01 for QCMAPSetDMZ() struct sQCMAPSetDMZRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPDeleteDMZ() struct sQCMAPDeleteDMZRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetDMZ() struct sQCMAPGetDMZRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetDMZ() struct sQCMAPGetDMZResponse_DMZIPAddress { UINT8 mDMZIPAddress[4]; }; // Structure to describe request TLV 0x01 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv4Address { UINT8 mIPv4Address[4]; }; // Structure to describe response TLV 0x11 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv6Address { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x12 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv4PrimaryDNSAddress { UINT8 mIPv4Address[4]; }; // Structure to describe response TLV 0x13 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv4SecondaryDNSAddress { UINT8 mIPv4Address[4]; }; // Structure to describe response TLV 0x14 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv6PrimaryDNSAddress { UINT16 mIPv6Address[8]; }; // Structure to describe response TLV 0x15 for QCMAPGetWWANConfig() struct sQCMAPGetWWANConfigResponse_IPv6SecondaryDNSAddress { UINT16 mIPv6Address[8]; }; // Structure to describe request TLV 0x01 for QCMAPEnableFirewallSetting() struct sQCMAPEnableFirewallSettingRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetFirewallSetting() struct sQCMAPGetFirewallSettingRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetFirewallSetting() struct sQCMAPGetFirewallSettingResponse_FirewallEnabled { INT8 mFirewallEnabled; }; // Structure to describe response TLV 0x11 for QCMAPGetFirewallSetting() struct sQCMAPGetFirewallSettingResponse_PacketsAllowed { INT8 mPacketsMatchingFirewallRuleAllowed; }; // Structure to describe request TLV 0x01 for QCMAPDisableFirewallSetting() struct sQCMAPDisableFirewallSettingRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPAddFirewallConfig() struct sQCMAPAddFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPAddFirewallConfig() struct sQCMAPAddFirewallConfigResponse_FirewallHandle { UINT32 mFirewallHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetFirewallConfig() struct sQCMAPGetFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetFirewallConfig() struct sQCMAPGetFirewallConfigResponse_FirewallEntries { UINT8 mFirewallEntriesCount; struct sFirewallEntry { UINT32 mFirewallHandle; UINT16 mStartingDestinationPort; UINT16 mEndingDestinationPort; UINT8 mProtocol; }; // This array must be the size specified by mFirewallEntriesCount // sFirewallEntry mFirewallEntrys[1]; }; // Structure to describe request TLV 0x01 for QCMAPDeleteFirewallConfig() struct sQCMAPDeleteFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPWWANStatusIndicationRegister() struct sQCMAPWWANStatusIndicationRegisterRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPStationModeEnable() struct sQCMAPStationModeEnableRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPStationModeDisable() struct sQCMAPStationModeDisableRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetStationMode() struct sQCMAPGetStationModeRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetStationMode() struct sQCMAPGetStationModeResponse_StationMode { INT8 mStationModeEnabled; }; // Structure to describe indication TLV 0x01 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_Handle { UINT32 mMAPHandle; }; // Structure to describe indication TLV 0x03 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_PacketServiceStatus { eQMIQCMAPPacketServiceStatus mPacketServiceStatus; }; // Structure to describe indication TLV 0x04 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_ReconfigRequired { INT8 mReconfigurationRequired; }; // Structure to describe indication TLV 0x10 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_CallEndReason { eQMIQCMAPCallEndReasons mCallEndReason; }; // Structure to describe indication TLV 0x11 for QCMAP WWANStatusIndication struct sQCMAPWWANStatusIndication_VerboseCallEndReason { eQMIQCMAPVerboseCallEndReasons mVerboseCallEndReason; }; // Structure to describe request TLV 0x01 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe request TLV 0x10 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_TCPUDPSource { UINT16 mPort; UINT16 mRange; }; // Structure to describe request TLV 0x11 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_TCPUDPDestination { UINT16 mPort; UINT16 mRange; }; // Structure to describe request TLV 0x12 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_ICMPType { UINT8 mICMPType; }; // Structure to describe request TLV 0x13 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_ICMPCode { UINT8 mICMPCode; }; // Structure to describe request TLV 0x14 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_ESPSPI { UINT32 mESPSPI; }; // Structure to describe request TLV 0x15 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv4SourceAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe request TLV 0x16 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv4DestinationAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe request TLV 0x17 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv4TOS { UINT8 mTOSValue; UINT8 mTOSMask; }; // Structure to describe request TLV 0x18 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv6SourceAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe request TLV 0x19 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv6DestinationAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe request TLV 0x1A for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigRequest_IPv6TrafficClass { UINT8 mTrafficClassValue; UINT8 mTrafficClassMask; }; // Structure to describe response TLV 0x10 for QCMAPAddExtendedFirewallConfig() struct sQCMAPAddExtendedFirewallConfigResponse_FirewallHandle { UINT32 mFirewallHandle; }; // Structure to describe request TLV 0x01 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_NextHeaderProtocol { eQMIQCMAPNextHeaderProtocols mNextHeaderProtocol; }; // Structure to describe response TLV 0x11 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_TCPUDPSource { UINT16 mPort; UINT16 mRange; }; // Structure to describe response TLV 0x12 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_TCPUDPDestination { UINT16 mPort; UINT16 mRange; }; // Structure to describe response TLV 0x13 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_ICMPType { UINT8 mICMPType; }; // Structure to describe response TLV 0x14 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_ICMPCode { UINT8 mICMPCode; }; // Structure to describe response TLV 0x15 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_ESPSPI { UINT32 mESPSPI; }; // Structure to describe response TLV 0x16 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv4SourceAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe response TLV 0x17 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv4DestinationAddress { UINT8 mIPv4Address[4]; UINT8 mSubnetMask[4]; }; // Structure to describe response TLV 0x18 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv4TOS { UINT8 mTOSValue; UINT8 mTOSMask; }; // Structure to describe response TLV 0x19 for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv6SourceAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe response TLV 0x1A for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv6DestinationAddress { UINT16 mIPv6Address[8]; UINT8 mPrefixLength; }; // Structure to describe response TLV 0x1B for QCMAPGetExtendedFirewallConfig() struct sQCMAPGetExtendedFirewallConfigResponse_IPv6TrafficClass { UINT8 mTrafficClassValue; UINT8 mTrafficClassMask; }; // Structure to describe request TLV 0x01 for QCMAPGetFirewallHandles() struct sQCMAPGetFirewallHandlesRequest_Handle { UINT32 mMAPHandle; }; // Structure to describe response TLV 0x10 for QCMAPGetFirewallHandles() struct sQCMAPGetFirewallHandlesResponse_Handles { UINT8 mFirewallHandlesCount; // This array must be the size specified by mFirewallHandlesCount // UINT32 mFirewallHandle[1]; }; // Structure to describe request TLV 0x10 for PDCRegisterForIndications() struct sPDCRegisterForIndicationsRequest_Config { INT8 mEnableReporting; }; // Structure to describe indication TLV 0x01 for PDC ConfigChangeIndication struct sPDCConfigChangeIndication_Config { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x01 for PDCGetSelectedConfig() struct sPDCGetSelectedConfigRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCGetSelectedConfig() struct sPDCGetSelectedConfigRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_ActiveID { UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe indication TLV 0x12 for PDC GetSelectedConfigIndication struct sPDCGetSelectedConfigIndication_PendingID { UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x01 for PDCSetSelectedConfig() struct sPDCSetSelectedConfigRequest_Config { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x10 for PDCSetSelectedConfig() struct sPDCSetSelectedConfigRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC SetSelectedConfigIndication struct sPDCSetSelectedConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC SetSelectedConfigIndication struct sPDCSetSelectedConfigIndication_Token { UINT32 mToken; }; // Structure to describe request TLV 0x10 for PDCListConfigs() struct sPDCListConfigsRequest_Token { UINT32 mToken; }; // Structure to describe request TLV 0x11 for PDCListConfigs() struct sPDCListConfigsRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe indication TLV 0x01 for PDC ListConfigsIndication struct sPDCListConfigsIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC ListConfigsIndication struct sPDCListConfigsIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC ListConfigsIndication struct sPDCListConfigsIndication_List { UINT8 mConfigListLength; struct sConfig { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // This array must be the size specified by mConfigListLength // sConfig mConfigs[1]; }; // Structure to describe request TLV 0x01 for PDCDeleteConfig() struct sPDCDeleteConfigRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCDeleteConfig() struct sPDCDeleteConfigRequest_Token { UINT32 mToken; }; // Structure to describe request TLV 0x11 for PDCDeleteConfig() struct sPDCDeleteConfigRequest_ID { UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe indication TLV 0x01 for PDC DeleteConfigIndication struct sPDCDeleteConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC DeleteConfigIndication struct sPDCDeleteConfigIndication_Token { UINT32 mToken; }; // Structure to describe request TLV 0x01 for PDCLoadConfig() struct sPDCLoadConfigRequest_Frame1 { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; struct sPDCLoadConfigRequest_Frame2 { UINT32 mTotalSize; UINT16 mFrameSize; // This array must be the size specified by mFrameSize // UINT8 mFrame[1]; }; struct sPDCLoadConfigRequest_Frame { sPDCLoadConfigRequest_Frame1 mPDCLoadConfigRequest_Frame1; sPDCLoadConfigRequest_Frame2 mPDCLoadConfigRequest_Frame2; }; // Structure to describe request TLV 0x10 for PDCLoadConfig() struct sPDCLoadConfigRequest_Token { UINT32 mToken; }; // Structure to describe response TLV 0x10 for PDCLoadConfig() struct sPDCLoadConfigResponse_Reset { INT8 mFrameReset; }; // Structure to describe indication TLV 0x01 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Received { UINT32 mReceivedSize; }; // Structure to describe indication TLV 0x12 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Remaining { UINT32 mRemainingSize; }; // Structure to describe indication TLV 0x13 for PDC LoadConfigIndication struct sPDCLoadConfigIndication_Reset { INT8 mFrameReset; }; // Structure to describe request TLV 0x01 for PDCActivateConfig() struct sPDCActivateConfigRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCActivateConfig() struct sPDCActivateConfigRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC ActivateConfigIndication struct sPDCActivateConfigIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC ActivateConfigIndication struct sPDCActivateConfigIndication_Token { UINT32 mToken; }; // Structure to describe request TLV 0x01 for PDCGetConfigInfo() struct sPDCGetConfigInfoRequest_Config { eQMIPDCConfigurations mConfigType; UINT8 mConfigIDLength; // This array must be the size specified by mConfigIDLength // UINT8 mConfigID[1]; }; // Structure to describe request TLV 0x10 for PDCGetConfigInfo() struct sPDCGetConfigInfoRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Size { UINT32 mTotalSize; }; // Structure to describe indication TLV 0x12 for PDC GetConfigInfoIndication struct sPDCGetConfigInfoIndication_Description { UINT8 mDescriptionLength; // This array must be the size specified by mDescriptionLength // char mDescription[1]; }; // Structure to describe request TLV 0x01 for PDCGetConfigLimits() struct sPDCGetConfigLimitsRequest_Type { eQMIPDCConfigurations mConfigType; }; // Structure to describe request TLV 0x10 for PDCGetConfigLimits() struct sPDCGetConfigLimitsRequest_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x01 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_Error { eQMIErrors mQMIError; }; // Structure to describe indication TLV 0x10 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_Token { UINT32 mToken; }; // Structure to describe indication TLV 0x11 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_MaximumSize { UINT64 mMaximumSize; }; // Structure to describe indication TLV 0x12 for PDC GetConfigLimitsIndication struct sPDCGetConfigLimitsIndication_CurrentSize { UINT64 mCurrentSize; }; // Structure to describe request TLV 0x10 for CATSetEventReport() struct sCATSetEventReportRequest_ReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe request TLV 0x11 for CATSetEventReport() struct sCATSetEventReportRequest_DecodeReportMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe request TLV 0x12 for CATSetEventReport() struct sCATSetEventReportRequest_Slot { bool mSlot1:1; bool mSlot2:1; // Padding out 6 bits UINT8 mReserved1:6; }; // Structure to describe response TLV 0x10 for CATSetEventReport() struct sCATSetEventReportResponse_RegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; bool mRefresh:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; bool mSetupEventBrowserTermination:1; bool mProvideLocalInformationTime:1; bool mActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; }; // Structure to describe response TLV 0x11 for CATSetEventReport() struct sCATSetEventReportResponse_DecodedRegStatusMask { bool mDisplayText:1; bool mGetInkey:1; bool mGetInput:1; bool mSetupMenu:1; bool mSelectItem:1; bool mSendSMSAlphaIdentifier:1; bool mSetupEventUserActivity:1; bool mSetupEventIdleScreenNotify:1; bool mSetupEventLanguageSelNotify:1; bool mSetupIdleModeText:1; bool mLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mEndProactiveSession:1; bool mPlayTone:1; bool mSetupCall:1; bool mSendDTMF:1; bool mLaunchBrowser:1; bool mSendSS:1; bool mSendUSSD:1; bool mProvideLocalInformationLanguage:1; bool mBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mSCWSEvent:1; bool mActivate:1; bool mSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; }; // Structure to describe indication TLV 0x10 for CAT EventReport struct sCATEventReportIndication_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe indication TLV 0x11 for CAT EventReport struct sCATEventReportIndication_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe indication TLV 0x12 for CAT EventReport struct sCATEventReportIndication_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe indication TLV 0x13 for CAT EventReport struct sCATEventReportIndication_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe indication TLV 0x14 for CAT EventReport struct sCATEventReportIndication_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe indication TLV 0x15 for CAT EventReport struct sCATEventReportIndication_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe indication TLV 0x16 for CAT EventReport struct sCATEventReportIndication_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe indication TLV 0x17 for CAT EventReport struct sCATEventReportIndication_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe indication TLV 0x18 for CAT EventReport struct sCATEventReportIndication_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe indication TLV 0x19 for CAT EventReport struct sCATEventReportIndication_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe indication TLV 0x1A for CAT EventReport struct sCATEventReportIndication_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe indication TLV 0x1B for CAT EventReport struct sCATEventReportIndication_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe indication TLV 0x1C for CAT EventReport struct sCATEventReportIndication_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x1D for CAT EventReport struct sCATEventReportIndication_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe indication TLV 0x1E for CAT EventReport struct sCATEventReportIndication_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe indication TLV 0x1F for CAT EventReport struct sCATEventReportIndication_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x20 for CAT EventReport struct sCATEventReportIndication_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x21 for CAT EventReport struct sCATEventReportIndication_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe indication TLV 0x22 for CAT EventReport struct sCATEventReportIndication_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe indication TLV 0x23 for CAT EventReport struct sCATEventReportIndication_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe indication TLV 0x24 for CAT EventReport struct sCATEventReportIndication_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe indication TLV 0x25 for CAT EventReport struct sCATEventReportIndication_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe indication TLV 0x26 for CAT EventReport struct sCATEventReportIndication_Tone { eQMICATTone mTone; }; // Structure to describe indication TLV 0x27 for CAT EventReport struct sCATEventReportIndication_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe indication TLV 0x28 for CAT EventReport struct sCATEventReportIndication_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x29 for CAT EventReport struct sCATEventReportIndication_DefaultItem { UINT8 mDefaultItem; }; // Structure to describe indication TLV 0x2A for CAT EventReport struct sCATEventReportIndication_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe indication TLV 0x2B for CAT EventReport struct sCATEventReportIndication_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x2C for CAT EventReport struct sCATEventReportIndication_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe indication TLV 0x2D for CAT EventReport struct sCATEventReportIndication_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe indication TLV 0x2E for CAT EventReport struct sCATEventReportIndication_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe indication TLV 0x2F for CAT EventReport struct sCATEventReportIndication_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe indication TLV 0x30 for CAT EventReport struct sCATEventReportIndication_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x31 for CAT EventReport struct sCATEventReportIndication_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe indication TLV 0x32 for CAT EventReport struct sCATEventReportIndication_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe indication TLV 0x33 for CAT EventReport struct sCATEventReportIndication_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe indication TLV 0x34 for CAT EventReport struct sCATEventReportIndication_CapabilitiesConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe indication TLV 0x35 for CAT EventReport struct sCATEventReportIndication_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe indication TLV 0x36 for CAT EventReport struct sCATEventReportIndication_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe indication TLV 0x37 for CAT EventReport struct sCATEventReportIndication_Language { char mLanguage[2]; }; // Structure to describe indication TLV 0x38 for CAT EventReport struct sCATEventReportIndication_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe indication TLV 0x39 for CAT EventReport struct sCATEventReportIndication_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe indication TLV 0x3A for CAT EventReport struct sCATEventReportIndication_BrowserID { UINT8 mBrowserID; }; // Structure to describe indication TLV 0x3B for CAT EventReport struct sCATEventReportIndication_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe indication TLV 0x3C for CAT EventReport struct sCATEventReportIndication_ProvisioningFile { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe indication TLV 0x3D for CAT EventReport struct sCATEventReportIndication_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe indication TLV 0x3E for CAT EventReport struct sCATEventReportIndication_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x3F for CAT EventReport struct sCATEventReportIndication_ImmediateResponseRequired { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe indication TLV 0x40 for CAT EventReport struct sCATEventReportIndication_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x41 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x42 for CAT EventReport struct sCATEventReportIndication_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x43 for CAT EventReport struct sCATEventReportIndication_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe indication TLV 0x44 for CAT EventReport struct sCATEventReportIndication_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x45 for CAT EventReport struct sCATEventReportIndication_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x46 for CAT EventReport struct sCATEventReportIndication_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe indication TLV 0x47 for CAT EventReport struct sCATEventReportIndication_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe indication TLV 0x48 for CAT EventReport struct sCATEventReportIndication_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe indication TLV 0x49 for CAT EventReport struct sCATEventReportIndication_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe indication TLV 0x4A for CAT EventReport struct sCATEventReportIndication_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe indication TLV 0x4B for CAT EventReport struct sCATEventReportIndication_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe indication TLV 0x4C for CAT EventReport struct sCATEventReportIndication_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe indication TLV 0x4D for CAT EventReport struct sCATEventReportIndication_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe indication TLV 0x4E for CAT EventReport struct sCATEventReportIndication_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe indication TLV 0x4F for CAT EventReport struct sCATEventReportIndication_SetupRawEventList { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe indication TLV 0x50 for CAT EventReport struct sCATEventReportIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x51 for CAT EventReport struct sCATEventReportIndication_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe indication TLV 0x52 for CAT EventReport struct sCATEventReportIndication_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe indication TLV 0x53 for CAT EventReport struct sCATEventReportIndication_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe indication TLV 0x54 for CAT EventReport struct sCATEventReportIndication_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe indication TLV 0x55 for CAT EventReport struct sCATEventReportIndication_OnDemmandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe indication TLV 0x56 for CAT EventReport struct sCATEventReportIndication_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe indication TLV 0x57 for CAT EventReport struct sCATEventReportIndication_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe indication TLV 0x58 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x59 for CAT EventReport struct sCATEventReportIndication_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe indication TLV 0x5A for CAT EventReport struct sCATEventReportIndication_BufferSize { UINT16 mBufferSize; }; // Structure to describe indication TLV 0x5B for CAT EventReport struct sCATEventReportIndication_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe indication TLV 0x5C for CAT EventReport struct sCATEventReportIndication_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x5D for CAT EventReport struct sCATEventReportIndication_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5E for CAT EventReport struct sCATEventReportIndication_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe indication TLV 0x5F for CAT EventReport struct sCATEventReportIndication_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe indication TLV 0x60 for CAT EventReport struct sCATEventReportIndication_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe indication TLV 0x61 for CAT EventReport struct sCATEventReportIndication_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe indication TLV 0x62 for CAT EventReport struct sCATEventReportIndication_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe indication TLV 0x63 for CAT EventReport struct sCATEventReportIndication_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe indication TLV 0x64 for CAT EventReport struct sCATEventReportIndication_ChannelID { UINT8 mChannelID; }; // Structure to describe indication TLV 0x65 for CAT EventReport struct sCATEventReportIndication_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe indication TLV 0x66 for CAT EventReport struct sCATEventReportIndication_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe indication TLV 0x67 for CAT EventReport struct sCATEventReportIndication_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe response TLV 0x01 for CATGetServiceState() struct sCATGetServiceStateResponse_CATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; bool mCommonRefresh:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; bool mCommonSetupEventBrowserTermination:1; bool mCommonProvideLocalInformationTime:1; bool mCommonActivate:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved2:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; bool mControlRefresh:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; bool mControlSetupEventBrowserTermination:1; bool mControlProvideLocalInformationTime:1; bool mControlActivate:1; // Padding out 1 bits UINT8 mReserved3:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved4:6; }; // Structure to describe response TLV 0x10 for CATGetServiceState() struct sCATGetServiceStateResponse_DecodedCATServiceState { bool mCommonDisplayText:1; bool mCommonGetInkey:1; bool mCommonGetInput:1; bool mCommonSetupMenu:1; bool mCommonSelectItem:1; bool mCommonSendSMSAlphaIdentifier:1; bool mCommonSetupEventUserActivity:1; bool mCommonSetupEventIdleScreenNotify:1; bool mCommonSetupEventLanguageSelNotify:1; bool mCommonSetupIdleModeText:1; bool mCommonLanguageNotification:1; // Padding out 1 bits UINT8 mReserved1:1; bool mCommonEndProactiveSession:1; bool mCommonPlayTone:1; bool mCommonSetupCall:1; bool mCommonSendDTMF:1; bool mCommonLaunchBrowser:1; bool mCommonSendSS:1; bool mCommonSendUSSD:1; bool mCommonProvideLocalInformationLanguage:1; bool mCommonBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved2:2; bool mCommonSCWSEvent:1; bool mCommonActivate:1; bool mCommonSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved3:6; bool mControlDisplayText:1; bool mControlGetInkey:1; bool mControlGetInput:1; bool mControlSetupMenu:1; bool mControlSelectItem:1; bool mControlSendSMSAlphaIdentifier:1; bool mControlSetupEventUserActivity:1; bool mControlSetupEventIdleScreenNotify:1; bool mControlSetupEventLanguageSelNotify:1; bool mControlSetupIdleModeText:1; bool mControlLanguageNotification:1; // Padding out 1 bits UINT8 mReserved4:1; bool mControlEndProactiveSession:1; bool mControlPlayTone:1; bool mControlSetupCall:1; bool mControlSendDTMF:1; bool mControlLaunchBrowser:1; bool mControlSendSS:1; bool mControlSendUSSD:1; bool mControlProvideLocalInformationLanguage:1; bool mControlBearerIndependentProtocol:1; // Padding out 2 bits UINT8 mReserved5:2; bool mControlSCWSEvent:1; bool mControlActivate:1; bool mControlSetupEventHCIConnectivity:1; // Padding out 6 bits UINT8 mReserved6:6; }; // Structure to describe request TLV 0x01 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_TerminalResponseType { UINT32 mReferenceID; UINT16 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponse[1]; }; // Structure to describe request TLV 0x10 for CATSendTerminalResponse() struct sCATSendTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATSendTerminal() struct sCATSendTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_EnvelopeCommand { eQMICATEnvelopeCommandType mEnvelopeCommandType; UINT16 mEnvelopeLength; // This array must be the size specified by mEnvelopeLength // UINT8 mEnvelopeData[1]; }; // Structure to describe request TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATEnvelopeCommand() struct sCATEnvelopeCommandResponse_RawResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mEnvelopeResponseLength; // This array must be the size specified by mEnvelopeResponseLength // UINT8 mEnvelopeResponseData[1]; }; // Structure to describe request TLV 0x01 for CATGetEventReport() struct sCATGetEventReportRequest_CommandInput { UINT32 mCommandID; eQMICATCommandFormat mCommandFormat; }; // Structure to describe response TLV 0x10 for CATGetEventReport() struct sCATGetEventReportResponse_DisplayTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mDisplayTextCommand[1]; }; // Structure to describe response TLV 0x11 for CATGetEventReport() struct sCATGetEventReportResponse_GetInkeyEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInkeyCommand[1]; }; // Structure to describe response TLV 0x12 for CATGetEventReport() struct sCATGetEventReportResponse_GetInputEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mGetInputCommand[1]; }; // Structure to describe response TLV 0x13 for CATGetEventReport() struct sCATGetEventReportResponse_SetupMenuEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupMenuCommand[1]; }; // Structure to describe response TLV 0x14 for CATGetEventReport() struct sCATGetEventReportResponse_SelectItemEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSelectItemCommand[1]; }; // Structure to describe response TLV 0x15 for CATGetEventReport() struct sCATGetEventReportResponse_AlphaIDAvailable { eQMICATAlphaIDCommandType mAlphaIDCommandType; UINT16 mAlphaIDLength; // This array must be the size specified by mAlphaIDLength // UINT8 mAlphaID[1]; }; // Structure to describe response TLV 0x16 for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventList { bool mUserActivityNotify:1; bool mIdleScreenAvailable:1; bool mLanguageSelectionNotify:1; // Padding out 29 bits UINT8 mReserved1:5; UINT8 mReserved2[3]; }; // Structure to describe response TLV 0x17 for CATGetEventReport() struct sCATGetEventReportResponse_SetupIdleModeTextEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupIdleModeTextCommand[1]; }; // Structure to describe response TLV 0x18 for CATGetEventReport() struct sCATGetEventReportResponse_LanguageNotificationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLanguageNotificationCommand[1]; }; // Structure to describe response TLV 0x19 for CATGetEventReport() struct sCATGetEventReportResponse_RefreshEvent { UINT16 mRefreshMode; eQMICATRefreshStage mRefreshStage; }; // Structure to describe response TLV 0x1A for CATGetEventReport() struct sCATGetEventReportResponse_EndProactiveSession { eQMICATProactiveSessionEndType mProactiveSessionEndType; }; // Structure to describe response TLV 0x1B for CATGetEventReport() struct sCATGetEventReportResponse_DecodedHeaderID { eQMICATCommandID mCommandID; UINT32 mReferenceID; UINT8 mCommandNumber; }; // Structure to describe response TLV 0x1C for CATGetEventReport() struct sCATGetEventReportResponse_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x1D for CATGetEventReport() struct sCATGetEventReportResponse_HighPriority { eQMICATHighPriority mHighPriority; }; // Structure to describe response TLV 0x1E for CATGetEventReport() struct sCATGetEventReportResponse_UserControl { eQMICATUserControl mUserControl; }; // Structure to describe response TLV 0x1F for CATGetEventReport() struct sCATGetEventReportResponse_Icon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x20 for CATGetEventReport() struct sCATGetEventReportResponse_Duration { eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x21 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseFormat { eQMICATResponseFormat mResponseFormat; }; // Structure to describe response TLV 0x22 for CATGetEventReport() struct sCATGetEventReportResponse_HelpAvailable { eQMICATHelpAvailable mHelpAvailable; }; // Structure to describe response TLV 0x23 for CATGetEventReport() struct sCATGetEventReportResponse_ResponsePackingFormat { eQMICATResponsePackingFormat mResponsePackingFormat; }; // Structure to describe response TLV 0x24 for CATGetEventReport() struct sCATGetEventReportResponse_ResponseLength { UINT8 mMaximumUserInput; UINT8 mMinimumUserInput; }; // Structure to describe response TLV 0x25 for CATGetEventReport() struct sCATGetEventReportResponse_ShowUserInput { eQMICATShowUserInput mShowUserInput; }; // Structure to describe response TLV 0x26 for CATGetEventReport() struct sCATGetEventReportResponse_Tone { eQMICATTone mTone; }; // Structure to describe response TLV 0x27 for CATGetEventReport() struct sCATGetEventReportResponse_SoftkeySelection { eQMICATSoftkeySelection mSoftkeySelection; }; // Structure to describe response TLV 0x28 for CATGetEventReport() struct sCATGetEventReportResponse_Items { UINT8 mItemsLength; struct sItem { UINT8 mItemID; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x29 for CATGetEventReport() struct sCATGetEventReportResponse_DefaultItems { UINT8 mDefaultItem; }; // Structure to describe response TLV 0x2A for CATGetEventReport() struct sCATGetEventReportResponse_NextActionIdentifier { UINT8 mActionsLength; // This array must be the size specified by mActionsLength // eQMICATNextAction mNextAction[1]; }; // Structure to describe response TLV 0x2B for CATGetEventReport() struct sCATGetEventReportResponse_IconIDList { eQMICATDisplayIconOnly mDisplayIconOnly; UINT8 mItemsLength; struct sItem { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x2C for CATGetEventReport() struct sCATGetEventReportResponse_Presentation { eQMICATPresentation mPresentation; }; // Structure to describe response TLV 0x2D for CATGetEventReport() struct sCATGetEventReportResponse_PackingRequired { eQMICATPackingRequired mPackingRequired; }; // Structure to describe response TLV 0x2E for CATGetEventReport() struct sCATGetEventReportResponse_SMSTPDU { UINT8 mSMSTPDUDataLength; // This array must be the size specified by mSMSTPDUDataLength // UINT8 mSMSTPDUData[1]; }; // Structure to describe response TLV 0x2F for CATGetEventReport() struct sCATGetEventReportResponse_IsCDMASMS { eQMICATIsCDMASMS mIsCDMASMS; }; // Structure to describe response TLV 0x30 for CATGetEventReport() struct sCATGetEventReportResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x31 for CATGetEventReport() struct sCATGetEventReportResponse_CallSetupRequirement { eQMICATCallSetupRequirement mCallSetupRequirement; }; // Structure to describe response TLV 0x32 for CATGetEventReport() struct sCATGetEventReportResponse_Redial { eQMICATRedialNecessary mRedialNecessary; eQMICATTimeUnits mUnits; UINT8 mInterval; }; // Structure to describe response TLV 0x33 for CATGetEventReport() struct sCATGetEventReportResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x34 for CATGetEventReport() struct sCATGetEventReportResponse_CapabilityConfiguration { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x35 for CATGetEventReport() struct sCATGetEventReportResponse_DTMF { UINT8 mDTMFDataLength; struct sDTMFData { UINT8 mDTMFData1:4; UINT8 mDTMFData2:4; }; // This array must be the size specified by mDTMFDataLength // sDTMFData mDTMFDatas[1]; }; // Structure to describe response TLV 0x36 for CATGetEventReport() struct sCATGetEventReportResponse_SpecificLanguageNotification { eQMICATSpecificLanguageNotfication mSpecificLanguageNotification; }; // Structure to describe response TLV 0x37 for CATGetEventReport() struct sCATGetEventReportResponse_Language { char mLanguage[2]; }; // Structure to describe response TLV 0x38 for CATGetEventReport() struct sCATGetEventReportResponse_LaunchMode { eQMICATLaunchMode mLaunchMode; }; // Structure to describe response TLV 0x39 for CATGetEventReport() struct sCATGetEventReportResponse_URL { UINT8 mURLDataLength; // This array must be the size specified by mURLDataLength // char mURLData[1]; }; // Structure to describe response TLV 0x3A for CATGetEventReport() struct sCATGetEventReportResponse_BrowserID { UINT8 mBrowserID; }; // Structure to describe response TLV 0x3B for CATGetEventReport() struct sCATGetEventReportResponse_BearerList { UINT8 mBearerListLength; // This array must be the size specified by mBearerListLength // eQMICATBearer mBearerList[1]; }; // Structure to describe response TLV 0x3C for CATGetEventReport() struct sCATGetEventReportResponse_ProvisioningFiles { UINT32 mNumberOfProvisioningFiles; struct sFile { UINT8 mPathLength; // This array must be the size specified by mPathLength // char mPath[1]; }; // This array must be the size specified by mNumberOfProvisioningFiles // sFile mFiles[1]; }; // Structure to describe response TLV 0x3D for CATGetEventReport() struct sCATGetEventReportResponse_USSDString { eQMICATUSSDDataCodingScheme mOriginalDataCodingScheme; eQMICATUSSDDataCodingScheme mDataCodingScheme; UINT8 mUSSDTextLength; // This array must be the size specified by mUSSDTextLength // UINT8 mUSSDText[1]; }; // Structure to describe response TLV 0x3E for CATGetEventReport() struct sCATGetEventReportResponse_DefaultText { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x3F for CATGetEventReport() struct sCATGetEventReportResponse_ImmediateResponseRequest { eQMICATImmediateResponse mImmediateResponse; }; // Structure to describe response TLV 0x40 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x41 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayAlpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x42 for CATGetEventReport() struct sCATGetEventReportResponse_UserConfirmationIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x43 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallDisplayIcon { eQMICATIconQualifier mIconQualifier; UINT8 mHeight; UINT8 mWidth; eQMICATImageCodingScheme mImageCodingScheme; UINT8 mRecordNumber; UINT16 mIconDataLength; // This array must be the size specified by mIconDataLength // UINT8 mIconData[1]; }; // Structure to describe response TLV 0x44 for CATGetEventReport() struct sCATGetEventReportResponse_GatewayProxy { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x45 for CATGetEventReport() struct sCATGetEventReportResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x46 for CATGetEventReport() struct sCATGetEventReportResponse_NotificationRequired { eQMICATNotificationRequired mNotificationRequired; }; // Structure to describe response TLV 0x47 for CATGetEventReport() struct sCATGetEventReportResponse_PlayToneEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mPlayToneCommand[1]; }; // Structure to describe response TLV 0x48 for CATGetEventReport() struct sCATGetEventReportResponse_SetupCallEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupCallCommand[1]; }; // Structure to describe response TLV 0x49 for CATGetEventReport() struct sCATGetEventReportResponse_SendDTMFEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDTMFCommand[1]; }; // Structure to describe response TLV 0x4A for CATGetEventReport() struct sCATGetEventReportResponse_LaunchBrowserEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mLaunchBrowserCommand[1]; }; // Structure to describe response TLV 0x4B for CATGetEventReport() struct sCATGetEventReportResponse_SendSMSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSMSCommand[1]; }; // Structure to describe response TLV 0x4C for CATGetEventReport() struct sCATGetEventReportResponse_SendSSEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendSSCommand[1]; }; // Structure to describe response TLV 0x4D for CATGetEventReport() struct sCATGetEventReportResponse_SendUSSDEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendUSSDCommand[1]; }; // Structure to describe response TLV 0x4E for CATGetEventReport() struct sCATGetEventReportResponse_ProvideLocalInformationEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mProvideLocalInformationCommand[1]; }; // Structure to describe response TLV 0x4F for CATGetEventReport() struct sCATGetEventReportResponse_SetupEventListRawEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSetupEventListCommand[1]; }; // Structure to describe response TLV 0x50 for CATGetEventReport() struct sCATGetEventReportResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x51 for CATGetEventReport() struct sCATGetEventReportResponse_OpenChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mOpenChannelCommand[1]; }; // Structure to describe response TLV 0x52 for CATGetEventReport() struct sCATGetEventReportResponse_CloseChannelEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mCloseChannelCommand[1]; }; // Structure to describe response TLV 0x53 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mSendDataCommand[1]; }; // Structure to describe response TLV 0x54 for CATGetEventReport() struct sCATGetEventReportResponse_ReceiveDataEvent { UINT32 mReferenceID; UINT16 mCommandLength; // This array must be the size specified by mCommandLength // UINT8 mReceiveDataCommand[1]; }; // Structure to describe response TLV 0x55 for CATGetEventReport() struct sCATGetEventReportResponse_OnDemandLinkEstablish { eQMICATOnDemandLinkEstablish mOnDemandLinkEstablish; }; // Structure to describe response TLV 0x56 for CATGetEventReport() struct sCATGetEventReportResponse_CSDBearerDescription { UINT8 mSpeed; eQMICATCSDBearerName mCSDBearerName; eQMICATConnectionElement mConnectionElement; }; // Structure to describe response TLV 0x57 for CATGetEventReport() struct sCATGetEventReportResponse_GPRSBearerDescription { UINT8 mPrecedenceClass; UINT8 mDelayClass; UINT8 mReliabilityClass; UINT8 mPeakThroughput; UINT8 mMeanThroughput; eQMICATPacketDataProtocol mPacketDataProtocol; }; // Structure to describe response TLV 0x58 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalParameterBearerDescription { eQMICATTrafficClass mTrafficClass; UINT16 mMaxUploadBitrate; UINT16 mMaxDownloadBitrate; UINT16 mGuaranteedUploadBitrate; UINT16 mGuaranteedDownloadBitrate; eQMICATDeliveryOrder mDeliveryOrder; UINT8 mMaxSDUSize; UINT8 mMaxSDUErrorRatio; UINT8 mResidualBitErrorRatio; eQMICATDeliverErrorSDU mDeliverErrorSDU; UINT8 mTransferDelay; UINT8 mTrafficHandlingPRI; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x59 for CATGetEventReport() struct sCATGetEventReportResponse_EUTRANExternalMappedUTRANBearerDescription { UINT8 mQCI; UINT8 mMaxUploadBitrate; UINT8 mMaxDownloadBitrate; UINT8 mGuaranteedUploadBitrate; UINT8 mGuaranteedDownloadBitrate; UINT8 mMaximumUploadBitrateExt; UINT8 mMaximumDownloadBitrateExt; UINT8 mGuaranteedUploadBitrateExt; UINT8 mGuaranteedDownloadBitrateExt; eQMICATPDPType mPDPType; }; // Structure to describe response TLV 0x5A for CATGetEventReport() struct sCATGetEventReportResponse_BufferSize { UINT16 mBufferSize; }; // Structure to describe response TLV 0x5B for CATGetEventReport() struct sCATGetEventReportResponse_NetworkAccessName { UINT8 mNetworkAccessNameLength; // This array must be the size specified by mNetworkAccessNameLength // UINT8 mNetworkAccessName[1]; }; // Structure to describe response TLV 0x5C for CATGetEventReport() struct sCATGetEventReportResponse_OtherAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x5D for CATGetEventReport() struct sCATGetEventReportResponse_UserLogin { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5E for CATGetEventReport() struct sCATGetEventReportResponse_UserPassword { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x5F for CATGetEventReport() struct sCATGetEventReportResponse_TransportLevel { eQMICATTransportProtocol mTransportProtocol; UINT16 mPortNumber; }; // Structure to describe response TLV 0x60 for CATGetEventReport() struct sCATGetEventReportResponse_DataDestinationAddress { eQMICATAddressType mAddressType; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x61 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelDataLength { UINT8 mChannelDataLength; }; // Structure to describe response TLV 0x62 for CATGetEventReport() struct sCATGetEventReportResponse_SendDataImmediately { eQMICATSendDataImmediately mSendDataImmediately; }; // Structure to describe response TLV 0x63 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelData { UINT16 mChannelDataLength; // This array must be the size specified by mChannelDataLength // UINT8 mChannelData[1]; }; // Structure to describe response TLV 0x64 for CATGetEventReport() struct sCATGetEventReportResponse_ChannelID { UINT8 mChannelID; }; // Structure to describe response TLV 0x65 for CATGetEventReport() struct sCATGetEventReportResponse_ItemsWithDCS { UINT8 mItemsLength; struct sItem { UINT8 mItemID; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mItemTextLength; // This array must be the size specified by mItemTextLength // UINT8 mItemText[1]; }; // This array must be the size specified by mItemsLength // sItem mItems[1]; }; // Structure to describe response TLV 0x66 for CATGetEventReport() struct sCATGetEventReportResponse_Activate { UINT32 mReferenceID; UINT16 mActivateLength; // This array must be the size specified by mActivateLength // UINT8 mActivate[1]; }; // Structure to describe response TLV 0x67 for CATGetEventReport() struct sCATGetEventReportResponse_ActivateTarget { eQMICATActivateTargets mActivateTarget; }; // Structure to describe request TLV 0x01 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TerminalResponse { UINT32 mReferenceID; UINT8 mCommandNumber; eQMICATResponseCommand mResponseCommand; UINT8 mGeneralResult; UINT8 mAdditionalInformationLength; // This array must be the size specified by mAdditionalInformationLength // UINT8 mTerminalResponseAdditionalInformation[1]; }; // Structure to describe request TLV 0x10 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_TextString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x11 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x12 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyExtraInfo { eQMICATTimeUnits mUnits; UINT8 mInterval; eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x13 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_LanguageInfo { char mLanguage[2]; }; // Structure to describe request TLV 0x14 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x15 for CATSendDecodedTerminalResponse() struct sCATSendDecodedTerminalResponseRequest_GetInkeyYesInput { eQMICATTimeUnits mUnits; UINT8 mInterval; INT8 mGetInkeyYesInput; }; // Structure to describe response TLV 0x10 for CATSendDecodedTerminal() struct sCATSendDecodedTerminalResponseResponse_TRResponse { UINT8 mSW1; UINT8 mSW2; UINT8 mTerminalResponseLength; // This array must be the size specified by mTerminalResponseLength // UINT8 mTerminalResponseData[1]; }; // Structure to describe request TLV 0x01 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EnvelopeCommand { eQMICATDecodedEnvelopeCommand mEnvelopeCommand; }; // Structure to describe request TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_ItemIdentifier { UINT8 mItemIdentifier; }; // Structure to describe request TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_HelpRequest { eQMICATHelpRequest mHelpRequest; }; // Structure to describe request TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Language { char mLanguage[2]; }; // Structure to describe request TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe request TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe request TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe request TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe request TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe request TLV 0x1A for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe request TLV 0x1B for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandRequest_BrowserTerminationCause { eQMICATBrowserTerminationCauses mBrowserTerminationCause; }; // Structure to describe response TLV 0x10 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CallControlResult { eQMICATCallControlResult mCallControlResult; }; // Structure to describe response TLV 0x11 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Address { eQMICATAddressTON mAddressTON; eQMICATAddressNPI mAddressNPI; UINT8 mAddressDataLength; // This array must be the size specified by mAddressDataLength // char mAddressData[1]; }; // Structure to describe response TLV 0x12 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Subaddress { UINT8 mSubaddressDataLength; struct sSubaddressData { UINT8 mSubaddressData1:4; UINT8 mSubaddressData2:4; }; // This array must be the size specified by mSubaddressDataLength // sSubaddressData mSubaddressDatas[1]; }; // Structure to describe response TLV 0x13 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam1 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x14 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_CapabilityConfigParam2 { UINT8 mCapabilitesConfigurationLength; // This array must be the size specified by mCapabilitesConfigurationLength // UINT8 mCapabilitiesConfiguration[1]; }; // Structure to describe response TLV 0x15 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_USSDString { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x16 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_PDPContextActivation { UINT8 mPDPContextActivationDataLength; // This array must be the size specified by mPDPContextActivationDataLength // UINT8 mPDPContextActivationData[1]; }; // Structure to describe response TLV 0x17 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_EPSPDNConnectActivation { UINT8 mEPSPDNConnectActivationDataLength; // This array must be the size specified by mEPSPDNConnectActivationDataLength // UINT8 mEPSPDNConnectActivationData[1]; }; // Structure to describe response TLV 0x18 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_Alpha { eQMICATDataCodingScheme mDataCodingScheme; UINT8 mTextDataLength; // This array must be the size specified by mTextDataLength // UINT8 mTextData[1]; }; // Structure to describe response TLV 0x19 for CATSendDecodedEnvelopeCommand() struct sCATSendDecodedEnvelopeCommandResponse_BCRepeatIndicator { eQMICATBearerCapabilityRepeatIndicator mBearerCapabilityRepeatIndicator; }; // Structure to describe request TLV 0x10 for CATEventConfirmation() struct sCATEventConfirmationRequest_UserConfirmed { eQMICATUserConfirmed mUserConfirmed; }; // Structure to describe request TLV 0x11 for CATEventConfirmation() struct sCATEventConfirmationRequest_IconIsDisplayed { eQMICATIconIsDisplayed mIconIsDisplayed; }; // Structure to describe request TLV 0x12 for CATEventConfirmation() struct sCATEventConfirmationRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSOpenChannel() struct sCATSCWSOpenChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_OpenChannelInformation { UINT32 mChannelID; UINT16 mPortNumber; UINT16 mBufferSize; }; // Structure to describe indication TLV 0x11 for CAT SCWSOpenChannelIndication struct sCATSCWSOpenChannelIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSCloseChannelIndication struct sCATSCWSCloseChannelIndication_CloseChannelInfo { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe response TLV 0x11 for CATSCWSCloseChannel() struct sCATSCWSCloseChannelResponse_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSSendData() struct sCATSCWSSendDataRequest_ChannelStatus { UINT32 mChannelID; eQMICATSendDataResult mDataSendResult; }; // Structure to describe request TLV 0x10 for CATSCWSSendData() struct sCATSCWSSendDataRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe indication TLV 0x10 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_SendDataInfo { UINT32 mChannelID; UINT8 mTotalPackets; UINT8 mCurrentPacket; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe indication TLV 0x11 for CAT SCWSSendDataIndication struct sCATSCWSSendDataIndication_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_RemainingData { UINT32 mChannelID; UINT16 mDataLength; // This array must be the size specified by mDataLength // UINT8 mData[1]; }; // Structure to describe request TLV 0x10 for CATSCWSDataAvailable() struct sCATSCWSDataAvailableRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x01 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_ChannelStatus { UINT32 mChannelID; eQMICATChannelState mChannelState; }; // Structure to describe request TLV 0x10 for CATSCWSChannelStatus() struct sCATSCWSChannelStatusRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe request TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileRequest_Slot { eQMICATSlot mSlot; }; // Structure to describe response TLV 0x10 for CATGetTerminalProfile() struct sCATGetTerminalProfileResponse_RawData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe request TLV 0x01 for CATSetConfiguration() struct sCATSetConfigurationRequest_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe request TLV 0x10 for CATSetConfiguration() struct sCATSetConfigurationRequest_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for CATGetConfiguration() struct sCATGetConfigurationResponse_Mode { eQMICATConfigModes mConfigMode; }; // Structure to describe response TLV 0x11 for CATGetConfiguration() struct sCATGetConfigurationResponse_CustomData { UINT8 mTerminalProfileLength; // This array must be the size specified by mTerminalProfileLength // UINT8 mTerminalProfileData[1]; }; // Structure to describe response TLV 0x10 for RMSGetSMSWake() struct sRMSGetSMSWakeResponse_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSGetSMSWake() struct sRMSGetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_State { INT8 mSMSWakeEnabled; }; // Structure to describe request TLV 0x11 for RMSSetSMSWake() struct sRMSSetSMSWakeRequest_Mask { UINT32 mMask; }; // Structure to describe request TLV 0x10 for OMASetEventReport() struct sOMASetEventReportRequest_NIA { INT8 mReportNetworkInitiatedAlerts; }; // Structure to describe request TLV 0x11 for OMASetEventReport() struct sOMASetEventReportRequest_Status { INT8 mReportSessionStatus; }; // Structure to describe indication TLV 0x10 for OMA EventReport struct sOMAEventReportIndication_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe indication TLV 0x11 for OMA EventReport struct sOMAEventReportIndication_Status { eQMIOMASessionStates mSessionState; }; // Structure to describe indication TLV 0x12 for OMA EventReport struct sOMAEventReportIndication_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe request TLV 0x10 for OMAStartSession() struct sOMAStartSessionRequest_Type { eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x10 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Info { eQMIOMASessionStates mSessionState; eQMIOMASessionTypes mSessionType; }; // Structure to describe response TLV 0x11 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Failure { eQMIOMASessionFailureReasons mSessionFailure; }; // Structure to describe response TLV 0x12 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_Retry { UINT8 mRetryCount; UINT16 mRetryPauseTimer; UINT16 mRemainingTime; }; // Structure to describe response TLV 0x13 for OMAGetSessionInfo() struct sOMAGetSessionInfoResponse_NIA { eQMIOMASessionTypes mSessionType; UINT16 mSessionID; }; // Structure to describe request TLV 0x10 for OMASendSelection() struct sOMASendSelectionRequest_Type { eQMIOMASelections mSelection; UINT16 mSessionID; }; // Structure to describe response TLV 0x10 for OMAGetFeatures() struct sOMAGetFeaturesResponse_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe response TLV 0x11 for OMAGetFeatures() struct sOMAGetFeaturesResponse_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe response TLV 0x12 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFAFeature { INT8 mHFAFeatureEnabled; }; // Structure to describe response TLV 0x13 for OMAGetFeatures() struct sOMAGetFeaturesResponse_HFADoneState { eQMIOMAHFADoneStates mHFAFeatureDoneState; }; // Structure to describe request TLV 0x10 for OMASetFeatures() struct sOMASetFeaturesRequest_Provisioning { INT8 mDeviceProvisioningServiceUpdateEnabled; }; // Structure to describe request TLV 0x11 for OMASetFeatures() struct sOMASetFeaturesRequest_PRLUpdate { INT8 mPRLServiceUpdateEnabled; }; // Structure to describe request TLV 0x12 for OMASetFeatures() struct sOMASetFeaturesRequest_HFAFeature { INT8 mHFAFeatureEnabled; }; #pragma pack( pop ) libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiConnectionMgmt/GobiConnectionMgmtExports.cpp000077500000000000000000023405141455567757300316530ustar00rootroot00000000000000/*=========================================================================== FILE: GobiConnectionMgmtExports.cpp DESCRIPTION: QUALCOMM Gobi Connection Management API exports Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ==========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiConnectionMgmt.h" /*=========================================================================*/ // Exported Methods /*=========================================================================*/ /*=========================================================================== METHOD: GobiConnect DESCRIPTION: This function connects the CM API library to the specified Gobi device PARAMETERS: pQMIFile [ I ] - Device interface to connect to pServicesCount [I/O] - Upon input the number of QMI services to connect to, upon output the number of QMI services successfully connected to pServices [I/O] - Upon input the array of QMI service IDs to connect to, upon output the array of QMI service IDs successfully connected to pHandle [ O ] - The returned Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiConnect( LPCSTR pInterface, ULONG * pServicesCount, ULONG * pServices, GOBIHANDLE * pHandle ) { // Validate arguments if ( (pInterface == 0) || (pServicesCount == 0) || (*pServicesCount == 0) || (pServices == 0) || (pHandle == 0) ) { return (ULONG)eGOBI_ERR_INVALID_ARG; } GOBIHANDLE handle = gDLL.CreateAPI(); if (handle == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcCount = *pServicesCount; *pServicesCount = 0; *pHandle = 0; std::set inSvcs; std::set outSvcs; ULONG s = 0; for (s = 0; s < svcCount; s++) { inSvcs.insert( (eQMIService)pServices[s] ); } outSvcs = pAPI->Connect( pInterface, inSvcs ); ULONG outSvcsCount = (ULONG)outSvcs.size(); if (outSvcsCount > svcCount) { outSvcsCount = svcCount; } if (outSvcsCount == 0) { ULONG rc = (ULONG)pAPI->GetCorrectedLastError(); pAPI = 0; gDLL.DeleteAPI( handle ); return rc; } std::set ::const_iterator pOutSvc = outSvcs.begin(); for (s = 0; s < svcCount; s++) { pServices[s] = UCHAR_MAX; if (s < outSvcsCount) { pServices[s] = (ULONG)*pOutSvc++; } } *pHandle = handle; *pServicesCount = outSvcsCount; return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: GobiCancel DESCRIPTION: This function cancels the most recent outstanding request for the specified QMI service PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service whose outstanding request is to be cancelled pTXID [ O ] - QMI transaction ID of outstanding request RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiCancel( GOBIHANDLE handle, ULONG svcID, ULONG * pTXID ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->CancelSend( svcID, pTXID ); } /*=========================================================================== METHOD: GobiDisconnect DESCRIPTION: This function disconnects the CM API library from the currently connected Gobi device PARAMETERS: handle [ I ] - Gobi interface handle RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG GobiDisconnect( GOBIHANDLE handle ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } bool bDisco = pAPI->Disconnect(); if (bDisco == false) { return (ULONG)pAPI->GetCorrectedLastError(); } return (ULONG)eGOBI_ERR_NONE; } /*=========================================================================== METHOD: SetGenericCallback DESCRIPTION: This function enables/disables a generic callback PARAMETERS: handle [ I ] - Gobi interface handle svcID [ I ] - Service ID to monitor msgID [ I ] - Message ID to look for pCallback [ I ] - Callback function RETURN VALUE: ULONG ===========================================================================*/ ULONG SetGenericCallback( GOBIHANDLE handle, ULONG svcID, ULONG msgID, tFNGenericCallback pCallback ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } return (ULONG)pAPI->SetGenericCallback( svcID, msgID, pCallback, handle ); } /*=========================================================================== METHOD: WDSReset DESCRIPTION: The function sends 'WDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEventReport DESCRIPTION: The function sends 'WDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSAbort DESCRIPTION: The function sends 'WDS/Abort Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIndication DESCRIPTION: The function sends 'WDS/Set Indication Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIndication( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStartNetworkInterface DESCRIPTION: The function sends 'WDS/Start Network Interface Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStartNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSStopNetworkInterface DESCRIPTION: The function sends 'WDS/Stop Network Interface Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSStopNetworkInterface( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketServiceStatus DESCRIPTION: The function sends 'WDS/Get Packet Service Status Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetChannelRates DESCRIPTION: The function sends 'WDS/Get Channel Rates Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetChannelRates( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPacketStatistics DESCRIPTION: The function sends 'WDS/Get Packet Statistics Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoDormant DESCRIPTION: The function sends 'WDS/Go Dormant Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoDormant( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGoActive DESCRIPTION: The function sends 'WDS/Go Active Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGoActive( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSCreateProfile DESCRIPTION: The function sends 'WDS/Create Profile Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSCreateProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSModifyProfile DESCRIPTION: The function sends 'WDS/Modify Profile Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSModifyProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSDeleteProfile DESCRIPTION: The function sends 'WDS/Delete Profile Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSDeleteProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileList DESCRIPTION: The function sends 'WDS/Get Profile List Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetProfileSettings DESCRIPTION: The function sends 'WDS/Get Profile Settings Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetProfileSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultSettings DESCRIPTION: The function sends 'WDS/Get Default Settings Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentSettings DESCRIPTION: The function sends 'WDS/Get Current Settings Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentSettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPMode DESCRIPTION: The function sends 'WDS/Set MIP Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPMode DESCRIPTION: The function sends 'WDS/Get MIP Mode Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDormancy DESCRIPTION: The function sends 'WDS/Get Dormancy Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDormancy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Get Autoconnect Setting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataSessionDuration DESCRIPTION: The function sends 'WDS/Get Data Session Duration Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataSessionDuration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemStatus DESCRIPTION: The function sends 'WDS/Get Modem Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Data Bearer Technology Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetModemInfo DESCRIPTION: The function sends 'WDS/Get Modem Info Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetModemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Get Active MIP Profile Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetActiveMIPProfile DESCRIPTION: The function sends 'WDS/Set Active MIP Profile Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetActiveMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPProfile DESCRIPTION: The function sends 'WDS/Get MIP Profile Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPProfile DESCRIPTION: The function sends 'WDS/Set MIP Profile Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetMIPParameters DESCRIPTION: The function sends 'WDS/Get MIP Parameters Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetMIPParameters DESCRIPTION: The function sends 'WDS/Set MIP Parameters Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetMIPParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastMIPStatus DESCRIPTION: The function sends 'WDS/Get Last MIP Status Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastMIPStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'WDS/Get AN-AAA Authentication Status Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataBearerTechnology DESCRIPTION: The function sends 'WDS/Get Current Data Bearer Technology Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataBearerTechnology( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallList DESCRIPTION: The function sends 'WDS/Get Call List Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallRecord DESCRIPTION: The function sends 'WDS/Get Call Record Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearCallList DESCRIPTION: The function sends 'WDS/Clear Call List Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearCallList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallListMaxSize DESCRIPTION: The function sends 'WDS/Get Call List Max Size Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallListMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Get Default Profile Number Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDefaultProfileNumber DESCRIPTION: The function sends 'WDS/Set Default Profile Number Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDefaultProfileNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfile DESCRIPTION: The function sends 'WDS/Reset Profile Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetProfileParamToInvalid DESCRIPTION: The function sends 'WDS/Reset Profile Param To Invalid Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetProfileParamToInvalid( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetIPFamilyPreference DESCRIPTION: The function sends 'WDS/Set IP Family Preference Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetIPFamilyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Set FMC Tunnel Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSClearFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Clear FMC Tunnel Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSClearFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFMCTunnelParameters DESCRIPTION: The function sends 'WDS/Get FMC Tunnel Parameters Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFMCTunnelParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetAutoconnectSetting DESCRIPTION: The function sends 'WDS/Set Autoconnect Setting Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetAutoconnectSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDNSSetting DESCRIPTION: The function sends 'WDS/Get DNS Setting Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDNSSetting DESCRIPTION: The function sends 'WDS/Set DNS Setting Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDNSSetting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCDMAPreDormancySettings DESCRIPTION: The function sends 'WDS/Get CDMA Pre-Dormancy Settings Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCDMAPreDormancySettings( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetCAMTimer DESCRIPTION: The function sends 'WDS/Set CAM Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCAMTimer DESCRIPTION: The function sends 'WDS/Get CAM Timer Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCAMTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetSCRM DESCRIPTION: The function sends 'WDS/Set SCRM Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSCRM DESCRIPTION: The function sends 'WDS/Get SCRM Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSCRM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetRDUD DESCRIPTION: The function sends 'WDS/Set RDUD Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetRDUD DESCRIPTION: The function sends 'WDS/Get RDUD Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetRDUD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetSIPMIPCallType DESCRIPTION: The function sends 'WDS/Get SIP/MIP Call Type Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetSIPMIPCallType( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Set EV-DO Page Monitor Period Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetEVDOLongSleep DESCRIPTION: The function sends 'WDS/Set EV-DO Long Sleep Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetEVDOLongSleep( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetEVDOPageMonitorPeriod DESCRIPTION: The function sends 'WDS/Get EV-DO Page Monitor Period Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetEVDOPageMonitorPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCallThrottleInfo DESCRIPTION: The function sends 'WDS/Get Call Throttle Info Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCallThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetNSAPI DESCRIPTION: The function sends 'WDS/Get NSAPI Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetNSAPI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlPreference DESCRIPTION: The function sends 'WDS/Set DUN Call Control Preference Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetDUNCallControlInfo DESCRIPTION: The function sends 'WDS/Get DUN Call Control Info Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetDUNCallControlInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSSetDUNCallControlEventReport DESCRIPTION: The function sends 'WDS/Set DUN Call Control Event Report Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSSetDUNCallControlEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSPendingDUNCallControl DESCRIPTION: The function sends 'WDS/Pending DUN Call Control Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSPendingDUNCallControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIActivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Activate Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIActivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIDeactivate DESCRIPTION: The function sends 'WDS/EMBMS TMGI Deactivate Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIDeactivate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGIListQuery DESCRIPTION: The function sends 'WDS/EMBMS TMGI List Query Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGIListQuery( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPreferredDataSystem DESCRIPTION: The function sends 'WDS/Get Preferred Data System Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPreferredDataSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLastDataCallStatus DESCRIPTION: The function sends 'WDS/Get Last Data Call Status Request' (0x006A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLastDataCallStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 106; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetCurrentDataSystems DESCRIPTION: The function sends 'WDS/Get Current Data Systems Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetCurrentDataSystems( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetPDNThrottleInfo DESCRIPTION: The function sends 'WDS/Get PDN Throttle Info Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetPDNThrottleInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetLTEAttachParameters DESCRIPTION: The function sends 'WDS/Get LTE Attach Parameters Request' (0x0085) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetLTEAttachParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 133; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSResetPacketStatistics DESCRIPTION: The function sends 'WDS/Reset Packet Statistics Request' (0x0086) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSResetPacketStatistics( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 134; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSGetFlowControlStatus DESCRIPTION: The function sends 'WDS/Get Flow Control Status Request' (0x0087) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSGetFlowControlStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 135; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WDSEMBMSTMGISwitch DESCRIPTION: The function sends 'WDS/EMBMS TMGI Switch Request' (0x0088) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WDSEMBMSTMGISwitch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 1; ULONG msgID = 136; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReset DESCRIPTION: The function sends 'DMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetEventReport DESCRIPTION: The function sends 'DMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceCapabilities DESCRIPTION: The function sends 'DMS/Get Device Capabilities Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceManfacturer DESCRIPTION: The function sends 'DMS/Get Device Manfacturer Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceManfacturer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceModel DESCRIPTION: The function sends 'DMS/Get Device Model Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceModel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceRevision DESCRIPTION: The function sends 'DMS/Get Device Revision Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceVoiceNumber DESCRIPTION: The function sends 'DMS/Get Device Voice Number Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceVoiceNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetDeviceSerialNumbers DESCRIPTION: The function sends 'DMS/Get Device Serial Numbers Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetDeviceSerialNumbers( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPowerState DESCRIPTION: The function sends 'DMS/Get Power State Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPowerState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetPINProtection DESCRIPTION: The function sends 'DMS/UIM Set PIN Protection Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMVerifyPIN DESCRIPTION: The function sends 'DMS/UIM Verify PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockPIN DESCRIPTION: The function sends 'DMS/UIM Unblock PIN Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMChangePIN DESCRIPTION: The function sends 'DMS/UIM Change PIN Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetPINStatus DESCRIPTION: The function sends 'DMS/UIM Get PIN Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetPINStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetHardwareRevision DESCRIPTION: The function sends 'DMS/Get Hardware Revision Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetHardwareRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetOperatingMode DESCRIPTION: The function sends 'DMS/Get Operating Mode Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetOperatingMode DESCRIPTION: The function sends 'DMS/Set Operating Mode Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetOperatingMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetTimestamp DESCRIPTION: The function sends 'DMS/Get Timestamp Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetTimestamp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetPRLVersion DESCRIPTION: The function sends 'DMS/Get PRL Version Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetPRLVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetActivationState DESCRIPTION: The function sends 'DMS/Get Activation State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetActivationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateAutomatic DESCRIPTION: The function sends 'DMS/Activate Automatic Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateAutomatic( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSActivateManual DESCRIPTION: The function sends 'DMS/Activate Manual Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSActivateManual( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetLockState DESCRIPTION: The function sends 'DMS/Get Lock State Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockState DESCRIPTION: The function sends 'DMS/Set Lock State Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetLockCode DESCRIPTION: The function sends 'DMS/Set Lock Code Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetLockCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadUserData DESCRIPTION: The function sends 'DMS/Read User Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSWriteUserData DESCRIPTION: The function sends 'DMS/Write User Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSWriteUserData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSReadERIData DESCRIPTION: The function sends 'DMS/Read ERI Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSReadERIData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSResetFactoryDefaults DESCRIPTION: The function sends 'DMS/Reset Factory Defaults Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSResetFactoryDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSValidateSPC DESCRIPTION: The function sends 'DMS/Validate SPC Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSValidateSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetICCID DESCRIPTION: The function sends 'DMS/UIM Get ICCID Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetICCID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetHostLockID DESCRIPTION: The function sends 'DMS/UIM Get Host Lock ID Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetHostLockID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMGetControlKeyStatus DESCRIPTION: The function sends 'DMS/UIM Get Control Key Status Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMGetControlKeyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMSetControlKeyProtection DESCRIPTION: The function sends 'DMS/UIM Set Control Key Protection Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMSetControlKeyProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSUIMUnblockControlKey DESCRIPTION: The function sends 'DMS/UIM Unblock Control Key Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSUIMUnblockControlKey( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetIMSI DESCRIPTION: The function sends 'DMS/Get IMSI Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetIMSI( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetUIMState DESCRIPTION: The function sends 'DMS/Get UIM State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetUIMState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetBandCapabilities DESCRIPTION: The function sends 'DMS/Get Band Capabilities Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetBandCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetFactorySerialNumber DESCRIPTION: The function sends 'DMS/Get Factory Serial Number Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetFactorySerialNumber( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetDeviceTime DESCRIPTION: The function sends 'DMS/Set Device Time Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetDeviceTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetSoftwareVersion DESCRIPTION: The function sends 'DMS/Get Software Version Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetSoftwareVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSSetSPC DESCRIPTION: The function sends 'DMS/Set SPC Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSSetSPC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: DMSGetCurrentPRLInfo DESCRIPTION: The function sends 'DMS/Get Current PRL Info Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG DMSGetCurrentPRLInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 2; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASReset DESCRIPTION: The function sends 'NAS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASAbort DESCRIPTION: The function sends 'NAS/Abort Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASAbort( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetEventReport DESCRIPTION: The function sends 'NAS/Set Event Report Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRegistrationEventReport DESCRIPTION: The function sends 'NAS/Set Registration Event Report Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRegistrationEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalStrength DESCRIPTION: The function sends 'NAS/Get Signal Strength Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalStrength( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASPerformNetworkScan DESCRIPTION: The function sends 'NAS/Perform Network Scan Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASPerformNetworkScan( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateNetworkRegister DESCRIPTION: The function sends 'NAS/Initiate Network Register Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateNetworkRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASInitiateAttach DESCRIPTION: The function sends 'NAS/Initiate Attach Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASInitiateAttach( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetServingSystem DESCRIPTION: The function sends 'NAS/Get Serving System Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetServingSystem( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetHomeNetwork DESCRIPTION: The function sends 'NAS/Get Home Network Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetHomeNetwork( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPreferredNetworks DESCRIPTION: The function sends 'NAS/Get Preferred Networks Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetPreferredNetworks DESCRIPTION: The function sends 'NAS/Set Preferred Networks Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetPreferredNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Get Forbidden Networks Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetForbiddenNetworks DESCRIPTION: The function sends 'NAS/Set Forbidden Networks Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetForbiddenNetworks( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetTechnologyPreference DESCRIPTION: The function sends 'NAS/Set Technology Preference Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTechnologyPreference DESCRIPTION: The function sends 'NAS/Get Technology Preference Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTechnologyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetACCOLC DESCRIPTION: The function sends 'NAS/Get ACCOLC Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetACCOLC DESCRIPTION: The function sends 'NAS/Set ACCOLC Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetACCOLC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemPreference DESCRIPTION: The function sends 'NAS/Get System Preference' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetNetworkParameters DESCRIPTION: The function sends 'NAS/Get Network Parameters Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetNetworkParameters DESCRIPTION: The function sends 'NAS/Set Network Parameters Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetNetworkParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRFInfo DESCRIPTION: The function sends 'NAS/Get RF Info Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRFInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetANAAAAuthenticationStatus DESCRIPTION: The function sends 'NAS/Get AN-AAA Authentication Status Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetANAAAAuthenticationStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Set System Selection Pref Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemSelectionPref DESCRIPTION: The function sends 'NAS/Get System Selection Pref Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemSelectionPref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDDTMPreference DESCRIPTION: The function sends 'NAS/Set DDTM Preference Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDDTMPreference DESCRIPTION: The function sends 'NAS/Get DDTM Preference Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDDTMPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetOperatorNameData DESCRIPTION: The function sends 'NAS/Get Operator Name Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetOperatorNameData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCSPPLMNMode DESCRIPTION: The function sends 'NAS/Get CSP PLMN Mode Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCSPPLMNMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEY DESCRIPTION: The function sends 'NAS/Update AKEY Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEY( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Get 3GPP2 Subscription Info Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSet3GPP2SubscriptionInfo DESCRIPTION: The function sends 'NAS/Set 3GPP2 Subscription Info Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSet3GPP2SubscriptionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetMobileCAIRevision DESCRIPTION: The function sends 'NAS/Get Mobile CAI Revision Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetMobileCAIRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRTREConfig DESCRIPTION: The function sends 'NAS/Get RTRE Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRTREConfig DESCRIPTION: The function sends 'NAS/Set RTRE Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRTREConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCellLocationInfo DESCRIPTION: The function sends 'NAS/Get Cell Location Info Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCellLocationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetPLMNName DESCRIPTION: The function sends 'NAS/Get PLMN Name Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetPLMNName( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBindSubscription DESCRIPTION: The function sends 'NAS/Bind Subscription Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetModePref DESCRIPTION: The function sends 'NAS/Get Mode Pref Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetModePref( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Set Dual Standby Preference Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSystemInfo DESCRIPTION: The function sends 'NAS/Get System Info Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSystemInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetSignalInfo DESCRIPTION: The function sends 'NAS/Get Signal Info Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo DESCRIPTION: The function sends 'NAS/Configure Signal Info Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetErrorRate DESCRIPTION: The function sends 'NAS/Get Error Rate Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetErrorRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOProtocolSubtype DESCRIPTION: The function sends 'NAS/Get EV-DO Protocol Subtype Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOProtocolSubtype( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEVDOColorCode DESCRIPTION: The function sends 'NAS/Get EV-DO Color Code Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEVDOColorCode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetAcquisitionSystemMode DESCRIPTION: The function sends 'NAS/Get Acquisition System Mode Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetAcquisitionSystemMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASSetRXDiversity DESCRIPTION: The function sends 'NAS/Set RX Diversity Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASSetRXDiversity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetRXTXInfo DESCRIPTION: The function sends 'NAS/Get RX/TX Info Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetRXTXInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUpdateAKEYExtended DESCRIPTION: The function sends 'NAS/Update A-KEY Extended Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUpdateAKEYExtended( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetDualStandbyPreference DESCRIPTION: The function sends 'NAS/Get Dual Standby Preference Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetDualStandbyPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASDetachLTE DESCRIPTION: The function sends 'NAS/Detach LTE Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASDetachLTE( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASBlockLTEPLMN DESCRIPTION: The function sends 'NAS/Block LTE PLMN Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASBlockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASUnblockLTEPLMN DESCRIPTION: The function sends 'NAS/Unblock LTE PLMN Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASUnblockLTEPLMN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASResetLTEPLMNBlock DESCRIPTION: The function sends 'NAS/Reset LTE PLMN Block Request' (0x0060) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASResetLTEPLMNBlock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 96; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureEMBMS DESCRIPTION: The function sends 'NAS/Configure EMBMS Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureEMBMS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetEMBMSStatus DESCRIPTION: The function sends 'NAS/Get EMBMS Status Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetEMBMSStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCDMAPositionInfo DESCRIPTION: The function sends 'NAS/Get CDMA Position Info Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCDMAPositionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASForceNetworkSearch DESCRIPTION: The function sends 'NAS/Force Network Search Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASForceNetworkSearch( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetManagedRoamingConfig DESCRIPTION: The function sends 'NAS/Get Managed Roaming Config Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetManagedRoamingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetCentralizedEONSSupport DESCRIPTION: The function sends 'NAS/Get Centralized EONS Support Request' (0x006B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetCentralizedEONSSupport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 107; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASConfigureSignalInfo2 DESCRIPTION: The function sends 'NAS/Configure Signal Info 2 Request' (0x006C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASConfigureSignalInfo2( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 108; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: NASGetTDSCDMACellInfo DESCRIPTION: The function sends 'NAS/Get TD-SCDMA Cell Info Request' (0x006D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG NASGetTDSCDMACellInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 3; ULONG msgID = 109; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSReset DESCRIPTION: The function sends 'WMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetEventReport DESCRIPTION: The function sends 'WMS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawSend DESCRIPTION: The function sends 'WMS/Raw Send Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawWrite DESCRIPTION: The function sends 'WMS/Raw Write Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawWrite( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSRawRead DESCRIPTION: The function sends 'WMS/Raw Read Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSRawRead( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSModifyTag DESCRIPTION: The function sends 'WMS/Modify Tag Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSModifyTag( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSDelete DESCRIPTION: The function sends 'WMS/Delete Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSDelete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMessageProtocol DESCRIPTION: The function sends 'WMS/Get Message Protocol Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMessageProtocol( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSListMessages DESCRIPTION: The function sends 'WMS/List Messages Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSListMessages( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRoutes DESCRIPTION: The function sends 'WMS/Set Routes Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRoutes DESCRIPTION: The function sends 'WMS/Get Routes Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRoutes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSCAddress DESCRIPTION: The function sends 'WMS/Get SMSC Address Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSCAddress DESCRIPTION: The function sends 'WMS/Set SMSC Address Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSCAddress( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetStorageMaxSize DESCRIPTION: The function sends 'WMS/Get Storage Max Size Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetStorageMaxSize( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendACK DESCRIPTION: The function sends 'WMS/Send ACK Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryPeriod DESCRIPTION: The function sends 'WMS/Set Retry Period Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetRetryInterval DESCRIPTION: The function sends 'WMS/Set Retry Interval Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Set DC Disconnect Timer Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetMemoryStatus DESCRIPTION: The function sends 'WMS/Set Memory Status Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastActivation DESCRIPTION: The function sends 'WMS/Set Broadcast Activation Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastActivation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetBroadcastConfig DESCRIPTION: The function sends 'WMS/Set Broadcast Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetBroadcastConfig DESCRIPTION: The function sends 'WMS/Get Broadcast Config Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetBroadcastConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreference DESCRIPTION: The function sends 'WMS/Get Domain Preference Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreference DESCRIPTION: The function sends 'WMS/Set Domain Preference Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Send From Memory Store Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetWaitingMessage DESCRIPTION: The function sends 'WMS/Get Waiting Message Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetWaitingMessage( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetPrimaryClient DESCRIPTION: The function sends 'WMS/Set Primary Client Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSIndicatorRegistration DESCRIPTION: The function sends 'WMS/Indicator Registration Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetTransportLayerInfo DESCRIPTION: The function sends 'WMS/Get Transport Layer Info Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetTransportLayerInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetNetworkRegistrationInfo DESCRIPTION: The function sends 'WMS/Get Network Registration Info Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetNetworkRegistrationInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSBindSubscription DESCRIPTION: The function sends 'WMS/Bind Subscription Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetIndicatorRegistration DESCRIPTION: The function sends 'WMS/Get Indicator Registration Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetIndicatorRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSMSParameters DESCRIPTION: The function sends 'WMS/Get SMS Parameters Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetSMSParameters DESCRIPTION: The function sends 'WMS/Set SMS Parameters Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetSMSParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Get Domain Preference Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSSetDomainPreferenceConfig DESCRIPTION: The function sends 'WMS/Set Domain Preference Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSSetDomainPreferenceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryPeriod DESCRIPTION: The function sends 'WMS/Get Retry Period Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryPeriod( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetRetryInterval DESCRIPTION: The function sends 'WMS/Get Retry Interval Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetRetryInterval( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetDCDisconnectTimer DESCRIPTION: The function sends 'WMS/Get DC Disconnect Timer Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetDCDisconnectTimer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetMemoryStatus DESCRIPTION: The function sends 'WMS/Get Memory Status Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetMemoryStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetPrimaryClient DESCRIPTION: The function sends 'WMS/Get Primary Client Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetPrimaryClient( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetSubscriptionBinding DESCRIPTION: The function sends 'WMS/Get Subscription Binding Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetSubscriptionBinding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncRawSend DESCRIPTION: The function sends 'WMS/Async Raw Send Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncRawSend( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendACK DESCRIPTION: The function sends 'WMS/Async Send ACK Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendACK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSAsyncSendFromMemoryStore DESCRIPTION: The function sends 'WMS/Async Send From Memory Store Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSAsyncSendFromMemoryStore( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: WMSGetServiceReadyStatus DESCRIPTION: The function sends 'WMS/Get Service Ready Status Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG WMSGetServiceReadyStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 5; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSReset DESCRIPTION: The function sends 'PDS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetEventReport DESCRIPTION: The function sends 'PDS/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceState DESCRIPTION: The function sends 'PDS/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceState DESCRIPTION: The function sends 'PDS/Set Service State Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSStartTrackingSession DESCRIPTION: The function sends 'PDS/Start Tracking Session Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSStartTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetTrackingSessionInfo DESCRIPTION: The function sends 'PDS/Get Tracking Session Info Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetTrackingSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSFixPosition DESCRIPTION: The function sends 'PDS/Fix Position Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSFixPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSEndTrackingSession DESCRIPTION: The function sends 'PDS/End Tracking Session Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSEndTrackingSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetNMEAConfig DESCRIPTION: The function sends 'PDS/Get NMEA Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNMEAConfig DESCRIPTION: The function sends 'PDS/Set NMEA Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNMEAConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeReference DESCRIPTION: The function sends 'PDS/Inject Time Reference Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeReference( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDefaults DESCRIPTION: The function sends 'PDS/Get Defaults Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDefaults DESCRIPTION: The function sends 'PDS/Set Defaults Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDefaults( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetXTRAParameters DESCRIPTION: The function sends 'PDS/Get XTRA Parameters Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetXTRAParameters DESCRIPTION: The function sends 'PDS/Set XTRA Parameters Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetXTRAParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceXTRADownload DESCRIPTION: The function sends 'PDS/Force XTRA Download Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceXTRADownload( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetAGPSConfig DESCRIPTION: The function sends 'PDS/Get AGPS Config Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetAGPSConfig DESCRIPTION: The function sends 'PDS/Set AGPS Config Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetAGPSConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Get Service Auto-Tracking State Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetServiceAutoTrackingState DESCRIPTION: The function sends 'PDS/Set Service Auto-Tracking State Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetServiceAutoTrackingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Get COM Port Auto-Tracking Config Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCOMPortAutoTrackingConfig DESCRIPTION: The function sends 'PDS/Set COM Port Auto-Tracking Config Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCOMPortAutoTrackingConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetPDSData DESCRIPTION: The function sends 'PDS/Reset PDS Data Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetPDSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSinglePositionFix DESCRIPTION: The function sends 'PDS/Single Position Fix Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetServiceVersion DESCRIPTION: The function sends 'PDS/Get Service Version Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetServiceVersion( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectXTRAData DESCRIPTION: The function sends 'PDS/Inject XTRA Data Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectXTRAData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectPositionData DESCRIPTION: The function sends 'PDS/Inject Position Data Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectWiFiPositionData DESCRIPTION: The function sends 'PDS/Inject Wi-Fi Position Data Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectWiFiPositionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSBASConfig DESCRIPTION: The function sends 'PDS/Get SBAS Config Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSBASConfig DESCRIPTION: The function sends 'PDS/Set SBAS Config Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSendNetworkInitiatedResponse DESCRIPTION: The function sends 'PDS/Send Network Initiated Response Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSendNetworkInitiatedResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectAbsoluteTime DESCRIPTION: The function sends 'PDS/Inject Absolute Time Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectAbsoluteTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectEFSData DESCRIPTION: The function sends 'PDS/Inject EFS Data Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectEFSData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetDPOConfig DESCRIPTION: The function sends 'PDS/Get DPO Config Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetDPOConfig DESCRIPTION: The function sends 'PDS/Set DPO Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetDPOConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetODPConfig DESCRIPTION: The function sends 'PDS/Get ODP Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetODPConfig DESCRIPTION: The function sends 'PDS/Set ODP Config Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetODPConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSCancelSinglePositionFix DESCRIPTION: The function sends 'PDS/Cancel Single Position Fix Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSCancelSinglePositionFix( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetGPSState DESCRIPTION: The function sends 'PDS/Get GPS State Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetGPSState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMEventReport DESCRIPTION: The function sends 'PDS/Set PPM Event Report Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStreamingReport DESCRIPTION: The function sends 'PDS/Set SPI Streaming Report Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStreamingReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSPIStatus DESCRIPTION: The function sends 'PDS/Set SPI Status Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPPMReportingState DESCRIPTION: The function sends 'PDS/Set PPM Reporting State Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPPMReportingState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSForceReceiverOff DESCRIPTION: The function sends 'PDS/Force Receiver Off Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSForceReceiverOff( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetPositionMethodsState DESCRIPTION: The function sends 'PDS/Get Position Methods State Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetPositionMethodsState DESCRIPTION: The function sends 'PDS/Set Position Methods State Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetPositionMethodsState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectSensorData DESCRIPTION: The function sends 'PDS/Inject Sensor Data Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTimeSyncData DESCRIPTION: The function sends 'PDS/Inject Time Sync Data Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorConfig DESCRIPTION: The function sends 'PDS/Get Sensor Config Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSensorConfig DESCRIPTION: The function sends 'PDS/Set Sensor Config Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSensorConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSensorNavigation DESCRIPTION: The function sends 'PDS/Get Sensor Navigation Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSensorNavigation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetNavigationConfig DESCRIPTION: The function sends 'PDS/Set Navigation Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetNavigationConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetWLANBlanking DESCRIPTION: The function sends 'PDS/Set WLAN Blanking Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetWLANBlanking( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallengeReport DESCRIPTION: The function sends 'PDS/Set Security Challenge Report Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallengeReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityChallenge DESCRIPTION: The function sends 'PDS/Set Security Challenge Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityChallenge( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSGetSecurityEncryptionConfig DESCRIPTION: The function sends 'PDS/Get Security Encryption Config Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSGetSecurityEncryptionConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetSecurityUpdateRate DESCRIPTION: The function sends 'PDS/Set Security Update Rate Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetSecurityUpdateRate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetCellDatabaseControl DESCRIPTION: The function sends 'PDS/Set Cell Database Control Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetCellDatabaseControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectMotionData DESCRIPTION: The function sends 'PDS/Inject Motion Data Request' (0x0061) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 97; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSEngineErrorRecoveryReport DESCRIPTION: The function sends 'PDS/Set GNSS Engine Error Recovery Report Request' (0x0062) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSEngineErrorRecoveryReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 98; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSResetLocationService DESCRIPTION: The function sends 'PDS/Reset Location Service Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSResetLocationService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSInjectTestData DESCRIPTION: The function sends 'PDS/Inject Test Data Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSInjectTestData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDSSetGNSSRFConfig DESCRIPTION: The function sends 'PDS/Set GNSS RF Config Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDSSetGNSSRFConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 6; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHStartEAPSession DESCRIPTION: The function sends 'AUTH/Start EAP Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHStartEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHSendEAPPacket DESCRIPTION: The function sends 'AUTH/Send EAP Packet Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHSendEAPPacket( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHGetEAPSessionKeys DESCRIPTION: The function sends 'AUTH/Get EAP Session Keys Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHGetEAPSessionKeys( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHEndEAPSession DESCRIPTION: The function sends 'AUTH/End EAP Session Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHEndEAPSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: AUTHRunAKA DESCRIPTION: The function sends 'AUTH/Run AKA Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG AUTHRunAKA( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 7; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceIndicationRegistration DESCRIPTION: The function sends 'Voice/Indication Registration Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceIndicationRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallOriginate DESCRIPTION: The function sends 'Voice/Call Originate Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallOriginate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallEnd DESCRIPTION: The function sends 'Voice/Call End Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallEnd( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCallAnswer DESCRIPTION: The function sends 'Voice/Call Answer Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCallAnswer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallInfo DESCRIPTION: The function sends 'Voice/Get Call Info Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSendFlash DESCRIPTION: The function sends 'Voice/Send Flash Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSendFlash( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBurstDTMF DESCRIPTION: The function sends 'Voice/Burst DTMF Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBurstDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStartContinuousDTMF DESCRIPTION: The function sends 'Voice/Start Continuous DTMF Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStartContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceStopContinuousDTMF DESCRIPTION: The function sends 'Voice/Stop Continuous DTMF Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceStopContinuousDTMF( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetPreferredPrivacy DESCRIPTION: The function sends 'Voice/Set Preferred Privacy Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetPreferredPrivacy( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetAllCallInfo DESCRIPTION: The function sends 'Voice/Get All Call Info Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetAllCallInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageCalls DESCRIPTION: The function sends 'Voice/Manage Calls Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetSupplementaryService DESCRIPTION: The function sends 'Voice/Set Supplementary Service Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetSupplementaryService( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallWaiting DESCRIPTION: The function sends 'Voice/Get Call Waiting Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallWaiting( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallBarring DESCRIPTION: The function sends 'Voice/Get Call Barring Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallBarring( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIP DESCRIPTION: The function sends 'Voice/Get CLIP Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCLIR DESCRIPTION: The function sends 'Voice/Get CLIR Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCLIR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCallForwarding DESCRIPTION: The function sends 'Voice/Get Call Forwarding Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCallForwarding( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetCallBarringPassword DESCRIPTION: The function sends 'Voice/Set Call Barring Password Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetCallBarringPassword( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceInitiateUSSD DESCRIPTION: The function sends 'Voice/Initiate USSD Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAnswerUSSD DESCRIPTION: The function sends 'Voice/Answer USSD Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAnswerUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceCancelUSSD DESCRIPTION: The function sends 'Voice/Cancel USSD Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceCancelUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceSetConfig DESCRIPTION: The function sends 'Voice/Set Config Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceSetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetConfig DESCRIPTION: The function sends 'Voice/Get Config Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAsyncInitiateUSSD DESCRIPTION: The function sends 'Voice/Async Initiate USSD Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAsyncInitiateUSSD( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceBindSubscription DESCRIPTION: The function sends 'Voice/Bind Subscription Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSetLineSwitching DESCRIPTION: The function sends 'Voice/ALS Set Line Switching Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSetLineSwitching( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSSelectLine DESCRIPTION: The function sends 'Voice/ALS Select Line Request' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSSelectLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCResetACM DESCRIPTION: The function sends 'Voice/AOC Reset ACM Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCResetACM( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCSetACMMaximum DESCRIPTION: The function sends 'Voice/AOC Set ACM Maximum Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCSetACMMaximum( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceAOCGetCallMeterInfo DESCRIPTION: The function sends 'Voice/AOC Get Call Meter Info Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceAOCGetCallMeterInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLP DESCRIPTION: The function sends 'Voice/Get COLP Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCOLR DESCRIPTION: The function sends 'Voice/Get COLR Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCOLR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceGetCNAP DESCRIPTION: The function sends 'Voice/Get CNAP Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceGetCNAP( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceManageIPCalls DESCRIPTION: The function sends 'Voice/Manage IP Calls Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceManageIPCalls( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSGetLineSwitchingStatus DESCRIPTION: The function sends 'Voice/ALS Get Line Switching Status Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetLineSwitchingStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: VoiceALSGetSelectedLine DESCRIPTION: The function sends 'Voice/ALS Get Selected Line Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG VoiceALSGetSelectedLine( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 9; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2Reset DESCRIPTION: The function sends 'CAT2/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2Reset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetEventReport DESCRIPTION: The function sends 'CAT2/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetServiceState DESCRIPTION: The function sends 'CAT2/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EnvelopeCommand DESCRIPTION: The function sends 'CAT2/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetEventReport DESCRIPTION: The function sends 'CAT2/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT2/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT2/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2EventConfirmation DESCRIPTION: The function sends 'CAT2/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2EventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSOpenChannel DESCRIPTION: The function sends 'CAT2/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSCloseChannel DESCRIPTION: The function sends 'CAT2/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSSendData DESCRIPTION: The function sends 'CAT2/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSDataAvailable DESCRIPTION: The function sends 'CAT2/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SCWSChannelStatus DESCRIPTION: The function sends 'CAT2/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetTerminalProfile DESCRIPTION: The function sends 'CAT2/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2SetConfiguration DESCRIPTION: The function sends 'CAT2/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2SetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CAT2GetConfiguration DESCRIPTION: The function sends 'CAT2/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CAT2GetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 10; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReset DESCRIPTION: The function sends 'UIM/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadTransparent DESCRIPTION: The function sends 'UIM/Read Transparent Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMReadRecord DESCRIPTION: The function sends 'UIM/Read Record Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMReadRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteTransparent DESCRIPTION: The function sends 'UIM/Write Transparent Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteTransparent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMWriteRecord DESCRIPTION: The function sends 'UIM/Write Record Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetFileAttributes DESCRIPTION: The function sends 'UIM/Get File Attributes Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetFileAttributes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetPINProtection DESCRIPTION: The function sends 'UIM/Set PIN Protection Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetPINProtection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMVerifyPIN DESCRIPTION: The function sends 'UIM/Verify PIN Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMVerifyPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMUnblockPIN DESCRIPTION: The function sends 'UIM/Unblock PIN Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMUnblockPIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangePIN DESCRIPTION: The function sends 'UIM/Change PIN Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangePIN( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMDepersonalization DESCRIPTION: The function sends 'UIM/Depersonalization Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMDepersonalization( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshRegister DESCRIPTION: The function sends 'UIM/Refresh Register Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegister( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshOK DESCRIPTION: The function sends 'UIM/Refresh OK Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshComplete DESCRIPTION: The function sends 'UIM/Refresh Complete Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshComplete( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLastRefreshEvent DESCRIPTION: The function sends 'UIM/Get Last Refresh Event Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLastRefreshEvent( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMEventRegistration DESCRIPTION: The function sends 'UIM/Event Registration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMEventRegistration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetCardStatus DESCRIPTION: The function sends 'UIM/Get Card Status Request' (0x002F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetCardStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 47; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerDown DESCRIPTION: The function sends 'UIM/Power Down Request' (0x0030) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerDown( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 48; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMPowerUp DESCRIPTION: The function sends 'UIM/Power Up Request' (0x0031) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMPowerUp( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 49; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMAuthenticate DESCRIPTION: The function sends 'UIM/Authenticate Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMAuthenticate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMCloseSession DESCRIPTION: The function sends 'UIM/Close Session Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMCloseSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetServiceStatus DESCRIPTION: The function sends 'UIM/Get Service Status Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSetServiceStatus DESCRIPTION: The function sends 'UIM/Set Service Status Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSetServiceStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMChangeProvisioningSession DESCRIPTION: The function sends 'UIM/Change Provisioning Session Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMChangeProvisioningSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetLabel DESCRIPTION: The function sends 'UIM/Get Label Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetLabel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetConfiguration DESCRIPTION: The function sends 'UIM/Get Configuration Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSendADPU DESCRIPTION: The function sends 'UIM/Send ADPU Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSendADPU( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPConnection DESCRIPTION: The function sends 'UIM/SAP Connection Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPConnection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSAPRequest DESCRIPTION: The function sends 'UIM/SAP Request Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSAPRequest( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMLogicalChannel DESCRIPTION: The function sends 'UIM/Logical Channel Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMSubscriptionOK DESCRIPTION: The function sends 'UIM/Subscription OK Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMSubscriptionOK( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMGetATR DESCRIPTION: The function sends 'UIM/Get ATR Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMGetATR( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMOpenLogicalChannel DESCRIPTION: The function sends 'UIM/Open Logical Channel Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMOpenLogicalChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: UIMRefreshRegisterAll DESCRIPTION: The function sends 'UIM/Refresh Register All Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG UIMRefreshRegisterAll( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 11; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetIndicationRegistrationState DESCRIPTION: The function sends 'PBM/Set Indication Registration State Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetIndicationRegistrationState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetCapabilities DESCRIPTION: The function sends 'PBM/Get Capabilities Request' (0x0002) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 2; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllCapabilities DESCRIPTION: The function sends 'PBM/Get All Capabilities Request' (0x0003) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllCapabilities( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 3; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadRecords DESCRIPTION: The function sends 'PBM/Read Records Request' (0x0004) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 4; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMWriteRecord DESCRIPTION: The function sends 'PBM/Write Record Request' (0x0005) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 5; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteRecord DESCRIPTION: The function sends 'PBM/Delete Record Request' (0x0006) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 6; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMDeleteAllRecords DESCRIPTION: The function sends 'PBM/Delete All Records Request' (0x0007) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMDeleteAllRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 7; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSearchRecords DESCRIPTION: The function sends 'PBM/Search Records Request' (0x0008) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 8; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetEmergencyList DESCRIPTION: The function sends 'PBM/Get Emergency List Request' (0x000E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetEmergencyList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 14; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAllGroups DESCRIPTION: The function sends 'PBM/Get All Groups Request' (0x000F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAllGroups( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 15; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetGroupInfo DESCRIPTION: The function sends 'PBM/Set Group Info Request' (0x0010) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetGroupInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 16; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetState DESCRIPTION: The function sends 'PBM/Get State Request' (0x0011) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 17; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Read All Hidden Records Request' (0x0012) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 18; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextEmptyRecordID DESCRIPTION: The function sends 'PBM/Get Next Empty Record ID Request' (0x0014) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextEmptyRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 20; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetNextRecordID DESCRIPTION: The function sends 'PBM/Get Next Record ID Request' (0x0015) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetNextRecordID( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 21; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetAASList DESCRIPTION: The function sends 'PBM/Get AAS List Request' (0x0016) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetAASList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 22; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetAAS DESCRIPTION: The function sends 'PBM/Set AAS Request' (0x0017) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetAAS( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 23; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMBindSubscription DESCRIPTION: The function sends 'PBM/Bind Subscription Request' (0x001A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMBindSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 26; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMGetSubscription DESCRIPTION: The function sends 'PBM/Get Subscription Request' (0x001B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMGetSubscription( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 27; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMSetCapabilitiesReadOperation DESCRIPTION: The function sends 'PBM/Set Capabilities Read Operation Request' (0x001C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMSetCapabilitiesReadOperation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 28; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedReadRecords DESCRIPTION: The function sends 'PBM/Extended Read Records Request' (0x001D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 29; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedWriteRecord DESCRIPTION: The function sends 'PBM/Extended Write Record Request' (0x001E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedWriteRecord( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 30; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedSearchRecords DESCRIPTION: The function sends 'PBM/Extended Search Records Request' (0x001F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedSearchRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 31; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PBMExtendedReadAllHiddenRecords DESCRIPTION: The function sends 'PBM/Extended Read All Hidden Records Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PBMExtendedReadAllHiddenRecords( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 12; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCClientRevision DESCRIPTION: The function sends 'LOC/Client Revision Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCClientRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCRegisterEvents DESCRIPTION: The function sends 'LOC/Register Events Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCRegisterEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStart DESCRIPTION: The function sends 'LOC/Start Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStart( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCStop DESCRIPTION: The function sends 'LOC/Stop Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCStop( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetServiceRevision DESCRIPTION: The function sends 'LOC/Get Service Revision Request' (0x0032) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetServiceRevision( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 50; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetFixCriteria DESCRIPTION: The function sends 'LOC/Get Fix Criteria Request' (0x0033) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetFixCriteria( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 51; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideNIUserResponse DESCRIPTION: The function sends 'LOC/Provide NI User Response Request' (0x0034) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideNIUserResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 52; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPredictedOrbitsData DESCRIPTION: The function sends 'LOC/Inject Predicted Orbits Data Request' (0x0035) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPredictedOrbitsData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 53; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataSource DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Source Request' (0x0036) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataSource( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 54; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPredictedOrbitsDataValidity DESCRIPTION: The function sends 'LOC/Get Predicted Orbits Data Validity Request' (0x0037) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPredictedOrbitsDataValidity( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 55; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectUTCTime DESCRIPTION: The function sends 'LOC/Inject UTC Time Request' (0x0038) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectUTCTime( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 56; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectPosition DESCRIPTION: The function sends 'LOC/Inject Position Request' (0x0039) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 57; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetEngineLock DESCRIPTION: The function sends 'LOC/Set Engine Lock Request' (0x003A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 58; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetEngineLock DESCRIPTION: The function sends 'LOC/Get Engine Lock Request' (0x003B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetEngineLock( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 59; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSBASConfig DESCRIPTION: The function sends 'LOC/Set SBAS Config Request' (0x003C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 60; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSBASConfig DESCRIPTION: The function sends 'LOC/Get SBAS Config Request' (0x003D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSBASConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 61; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetNMEATypes DESCRIPTION: The function sends 'LOC/Set NMEA Types Request' (0x003E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 62; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetNMEATypes DESCRIPTION: The function sends 'LOC/Get NMEA Types Request' (0x003F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNMEATypes( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 63; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLowPowerMode DESCRIPTION: The function sends 'LOC/Set Low Power Mode Request' (0x0040) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 64; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLowPowerMode DESCRIPTION: The function sends 'LOC/Get Low Power Mode Request' (0x0041) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLowPowerMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 65; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetLocationServer DESCRIPTION: The function sends 'LOC/Set Location Server Request' (0x0042) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 66; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetLocationServer DESCRIPTION: The function sends 'LOC/Get Location Server Request' (0x0043) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetLocationServer( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 67; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteAssistData DESCRIPTION: The function sends 'LOC/Delete Assist Data Request' (0x0044) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteAssistData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 68; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetXTRATSessionControl DESCRIPTION: The function sends 'LOC/Set XTRA-T Session Control Request' (0x0045) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetXTRATSessionControl( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 69; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOC DESCRIPTION: The function sends 'LOC' (0x0046) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOC( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 70; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectWiFiPosition DESCRIPTION: The function sends 'LOC/Inject Wi-Fi Position Request' (0x0047) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectWiFiPosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 71; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideWiFiStatus DESCRIPTION: The function sends 'LOC/Provide Wi-Fi Status Request' (0x0048) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideWiFiStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 72; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetRegisteredEvents DESCRIPTION: The function sends 'LOC/Get Registered Events Request' (0x0049) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetRegisteredEvents( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 73; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetOperationMode DESCRIPTION: The function sends 'LOC/Set Operation Mode Request' (0x004A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 74; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetOperationMode DESCRIPTION: The function sends 'LOC/Get Operation Mode Request' (0x004B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetOperationMode( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 75; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSPIStatus DESCRIPTION: The function sends 'LOC/Set SPI Status Request' (0x004C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSPIStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 76; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSensorData DESCRIPTION: The function sends 'LOC/Inject Sensor Data Request' (0x004D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSensorData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 77; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectTimeSyncData DESCRIPTION: The function sends 'LOC/Inject Time Sync Data Request' (0x004E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectTimeSyncData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 78; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetCradleMountConfig DESCRIPTION: The function sends 'LOC/Set Cradle Mount Config Request' (0x004F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 79; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetCradleMountConfig DESCRIPTION: The function sends 'LOC/Get Cradle Mount Config Request' (0x0050) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetCradleMountConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 80; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Set External Power Config Request' (0x0051) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 81; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetExternalPowerConfig DESCRIPTION: The function sends 'LOC/Get External Power Config Request' (0x0052) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetExternalPowerConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 82; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCProvideConnectionStatus DESCRIPTION: The function sends 'LOC/Provide Connection Status Request' (0x0053) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCProvideConnectionStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 83; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Set Protocol Config Parameters Request' (0x0054) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 84; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetProtocolConfigParameters DESCRIPTION: The function sends 'LOC/Get Protocol Config Parameters Request' (0x0055) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetProtocolConfigParameters( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 85; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorControlConfig DESCRIPTION: The function sends 'LOC/Set Sensor Control Config Request' (0x0056) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 86; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorControlConfig DESCRIPTION: The function sends 'LOC/Get Sensor Control Config Request' (0x0057) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorControlConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 87; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorProperties DESCRIPTION: The function sends 'LOC/Set Sensor Properties Request' (0x0058) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 88; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorProperties DESCRIPTION: The function sends 'LOC/Get Sensor Properties Request' (0x0059) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorProperties( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 89; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Set Sensor Performance Config Request' (0x005A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 90; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetSensorPerformanceConfig DESCRIPTION: The function sends 'LOC/Get Sensor Performance Config Request' (0x005B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetSensorPerformanceConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 91; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectSUPLCertificate DESCRIPTION: The function sends 'LOC/Inject SUPL Certificate Request' (0x005C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 92; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteSUPLCertificate DESCRIPTION: The function sends 'LOC/Delete SUPL Certificate Request' (0x005D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteSUPLCertificate( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 93; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCSetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Set Position Engine Config Request' (0x005E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCSetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 94; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetPositionEngineConfig DESCRIPTION: The function sends 'LOC/Get Position Engine Config Request' (0x005F) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetPositionEngineConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 95; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCAddCircularGeofence DESCRIPTION: The function sends 'LOC/Add Circular Geofence Request' (0x0063) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCAddCircularGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 99; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCDeleteGeofence DESCRIPTION: The function sends 'LOC/Delete Geofence Request' (0x0064) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCDeleteGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 100; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCQueryGeofence DESCRIPTION: The function sends 'LOC/Query Geofence Request' (0x0065) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCQueryGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 101; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCEditGeofence DESCRIPTION: The function sends 'LOC/Edit Geofence Request' (0x0066) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCEditGeofence( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 102; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetBestAvailablePosition DESCRIPTION: The function sends 'LOC/Get Best Available Position Request' (0x0067) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetBestAvailablePosition( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 103; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCInjectMotionData DESCRIPTION: The function sends 'LOC/Inject Motion Data Request' (0x0068) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCInjectMotionData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 104; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: LOCGetNIGeofenceIDList DESCRIPTION: The function sends 'LOC/Get NI Geofence ID List Request' (0x0069) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG LOCGetNIGeofenceIDList( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 18; ULONG msgID = 105; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCRegisterForIndications DESCRIPTION: The function sends 'PDC/Register For Indications Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCRegisterForIndications( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCGetSelectedConfig DESCRIPTION: The function sends 'PDC/Get Selected Config Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCSetSelectedConfig DESCRIPTION: The function sends 'PDC/Set Selected Config Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCSetSelectedConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCListConfigs DESCRIPTION: The function sends 'PDC/List Configs Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCListConfigs( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCDeleteConfig DESCRIPTION: The function sends 'PDC/Delete Config Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCDeleteConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCLoadConfig DESCRIPTION: The function sends 'PDC/Load Config Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCLoadConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCActivateConfig DESCRIPTION: The function sends 'PDC/Activate Config Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCActivateConfig( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCGetConfigInfo DESCRIPTION: The function sends 'PDC/Get Config Info Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: PDCGetConfigLimits DESCRIPTION: The function sends 'PDC/Get Config Limits Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG PDCGetConfigLimits( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 36; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATReset DESCRIPTION: The function sends 'CAT/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetEventReport DESCRIPTION: The function sends 'CAT/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetServiceState DESCRIPTION: The function sends 'CAT/Get Service State Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetServiceState( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendTerminalResponse DESCRIPTION: The function sends 'CAT/Send Terminal Response Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEnvelopeCommand DESCRIPTION: The function sends 'CAT/Envelope Command Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetEventReport DESCRIPTION: The function sends 'CAT/Get Event Report Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedTerminalResponse DESCRIPTION: The function sends 'CAT/Send Decoded Terminal Response Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedTerminalResponse( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSendDecodedEnvelopeCommand DESCRIPTION: The function sends 'CAT/Send Decoded Envelope Command Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSendDecodedEnvelopeCommand( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATEventConfirmation DESCRIPTION: The function sends 'CAT/Event Confirmation Request' (0x0026) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATEventConfirmation( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 38; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSOpenChannel DESCRIPTION: The function sends 'CAT/SCWS Open Channel Request' (0x0027) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSOpenChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 39; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSCloseChannel DESCRIPTION: The function sends 'CAT/SCWS Close Channel Request' (0x0028) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSCloseChannel( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 40; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSSendData DESCRIPTION: The function sends 'CAT/SCWS Send Data Request' (0x0029) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSSendData( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 41; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSDataAvailable DESCRIPTION: The function sends 'CAT/SCWS Data Available Request' (0x002A) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSDataAvailable( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 42; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSCWSChannelStatus DESCRIPTION: The function sends 'CAT/SCWS Channel Status Request' (0x002B) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSCWSChannelStatus( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 43; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetTerminalProfile DESCRIPTION: The function sends 'CAT/Get Terminal Profile Request' (0x002C) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetTerminalProfile( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 44; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATSetConfiguration DESCRIPTION: The function sends 'CAT/Set Configuration Request' (0x002D) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATSetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 45; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: CATGetConfiguration DESCRIPTION: The function sends 'CAT/Get Configuration Request' (0x002E) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG CATGetConfiguration( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 224; ULONG msgID = 46; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSReset DESCRIPTION: The function sends 'RMS/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSGetSMSWake DESCRIPTION: The function sends 'RMS/Get SMS Wake Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSGetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: RMSSetSMSWake DESCRIPTION: The function sends 'RMS/Set SMS Wake Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG RMSSetSMSWake( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 225; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAReset DESCRIPTION: The function sends 'OMA/Reset Request' (0x0000) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAReset( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 0; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetEventReport DESCRIPTION: The function sends 'OMA/Set Event Report Request' (0x0001) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetEventReport( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 1; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAStartSession DESCRIPTION: The function sends 'OMA/Start Session Request' (0x0020) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAStartSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 32; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMACancelSession DESCRIPTION: The function sends 'OMA/Cancel Session Request' (0x0021) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMACancelSession( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 33; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetSessionInfo DESCRIPTION: The function sends 'OMA/Get Session Info Request' (0x0022) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetSessionInfo( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 34; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASendSelection DESCRIPTION: The function sends 'OMA/Send Selection Request' (0x0023) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASendSelection( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 35; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMAGetFeatures DESCRIPTION: The function sends 'OMA/Get Features Request' (0x0024) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Reserved for future use (set to 0) pIn [ I ] - Reserved for future use (set to 0) pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMAGetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 36; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } /*=========================================================================== METHOD: OMASetFeatures DESCRIPTION: The function sends 'OMA/Set Features Request' (0x0025) and returns the response PARAMETERS: handle [ I ] - Gobi interface handle to [ I ] - Timeout for transaction (in milliseconds) inLen [ I ] - Length of input buffer pIn [ I ] - Input buffer pOutLen [I/O] - Upon input the maximum number of BYTEs pOut can contain, upon output the number of BYTEs copied to pOut pOut [ O ] - Output buffer RETURN VALUE: ULONG - Return code ===========================================================================*/ ULONG OMASetFeatures( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ) { cGobiConnectionMgmt * pAPI = gDLL.GetAPI( handle ); if (pAPI == 0) { return (ULONG)eGOBI_ERR_INTERNAL; } ULONG svcID = 226; ULONG msgID = 37; return pAPI->Send( svcID, msgID, to, inLen, pIn, pOutLen, pOut ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/000077500000000000000000000000001455567757300225365ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/GobiCMCallback.cpp000077500000000000000000000236641455567757300257750ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.cpp DESCRIPTION: Contains the implementation of each Gobi CM callback function. Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMCallback.h" #include /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: WDSEventReportCallback (Free Method) DESCRIPTION: Function called by WDS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 1) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x17 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_DataBearerTechnology)) { pTmp++; const sWDSEventReportIndication_DataBearerTechnology * pDBT = (const sWDSEventReportIndication_DataBearerTechnology *)pTmp; gpCM->OnDataBearerCBNotification( pDBT->mDataBearerTechnology ); } } ULONGLONG txTotalBytes = ULLONG_MAX; ULONGLONG rxTotalBytes = ULLONG_MAX; pIter = tlvs.find( 0x19 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_TXBytes)) { pTmp++; const sWDSEventReportIndication_TXBytes * pTX = (const sWDSEventReportIndication_TXBytes *)pTmp; txTotalBytes = pTX->mTXByteTotal; } } pIter = tlvs.find( 0x1A ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSEventReportIndication_RXBytes)) { pTmp++; const sWDSEventReportIndication_RXBytes * pRX = (const sWDSEventReportIndication_RXBytes *)pTmp; rxTotalBytes = pRX->mRXByteTotal; } } if (txTotalBytes != ULLONG_MAX || rxTotalBytes != ULLONG_MAX) { gpCM->OnByteTotalsNotification( rxTotalBytes, txTotalBytes ); } } /*=========================================================================== METHOD: WDSSessionStateCallback (Free Method) DESCRIPTION: Function called by WDS packet service status callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 1 || msgID != 34) { return; } ULONG state = ULONG_MAX; std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x01 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sWDSPacketServiceStatusReportIndication_Status)) { pTmp++; const sWDSPacketServiceStatusReportIndication_Status * pState = (const sWDSPacketServiceStatusReportIndication_Status *)pTmp; state = pState->mConnectionStatus; } } if (state != ULONG_MAX) { gpCM->OnSessionStateCBNotification( state ); } } /*=========================================================================== METHOD: NASEventReportCallback (Free Method) DESCRIPTION: Function called by NAS event report callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 2) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter == tlvs.end()) { return; } const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASEventReportIndication_SignalStrength)) { pTmp++; const sNASEventReportIndication_SignalStrength * pSS = (const sNASEventReportIndication_SignalStrength *)pTmp; gpCM->OnSignalStrengthCBNotificaion( pSS->mSignalStrengthdBm, pSS->mRadioInterface ); } } /*=========================================================================== METHOD: NASServingSystemCallback (Free Method) DESCRIPTION: Function called by NAS serving system callback PARAMETERS: svcID [ I ] - QMI service ID msgID [ I ] - QMI message ID handle [ I ] - Handle to Gobi API connection outLen [ I ] - Length of indication buffer pOut [ I ] - Indication buffer RETURN VALUE: None ===========================================================================*/ void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE /* handle */, ULONG outLen, const BYTE * pOut ) { if (gpCM == 0 || svcID != 3 || msgID != 36) { return; } std::map tlvs = GetTLVs( &pOut[0], outLen ); std::map ::const_iterator pIter = tlvs.find( 0x10 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; if (pTmp->mLength >= sizeof (sNASServingSystemIndication_RoamingIndicator)) { pTmp++; const sNASServingSystemIndication_RoamingIndicator * pRI = (const sNASServingSystemIndication_RoamingIndicator *)pTmp; BYTE roam = pRI->mRoamingIndicator; if (roam == 0xFF) { gpCM->SetRoam( "Unknown" ); } else { std::ostringstream roamStr; roamStr << roam; gpCM->SetRoam( roamStr.str() ); } } } pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASServingSystemIndication_DataServices ); if (tlvLen < dsLen) { return; } pTmp++; const sNASServingSystemIndication_DataServices * pDS = (const sNASServingSystemIndication_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return; } pDS++; gpCM->OnDataCapsNotification( dcCount, (eQMINASDataServiceCapabilities2 *)pDS ); } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/GobiCMCallback.h000077500000000000000000000067311455567757300254360ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMCallback.h DESCRIPTION: Contains the declaration of each Gobi CM callback function, structures needed for these callbacks and message IDs for each callback Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // WDS event report callback void WDSEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // WDS packet service status callback void WDSSessionStateCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS event report callback void NASEventReportCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); // NAS serving system callback void NASServingSystemCallback( ULONG svcID, ULONG msgID, GOBIHANDLE handle, ULONG outLen, const BYTE * pOut ); libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/GobiCMDLL.cpp000077500000000000000000001005221455567757300247010ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.cpp DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiCMDLL.h" #include "GobiConnectionMgmtAPIStructs.h" #include "Gobi3000Translation.h" #include /*=========================================================================*/ // cGobiCMDLL Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetString (Internal Method) DESCRIPTION: Call a Gobi CM API function that returns a string PARAMETERS: mpFnString [ I ] - Gobi CM API function pointer tlvID [ I ] - ID of response TLV that contains the string strSz [ I ] - Max string size (including NULL terminator) pStr [ O ] - Buffer to hold the string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ) { // Assume failure if (strSz > 0 && pStr != 0) { pStr[0] = 0; } // Query for string? ULONG status = eGOBI_ERR_GENERAL; if (mpFnString == 0 || mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = mpFnString( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( tlvID ); if (pIter == tlvs.end()) { return eGOBI_ERR_GENERAL; } const sQMIRawContentHeader * pTmp = pIter->second; ULONG strLen = (ULONG)pTmp->mLength; pTmp++; if (strLen != 0 && strSz > 0 && pStr != 0) { ULONG needLen = strLen; if (needLen + 1 > strSz) { needLen = strSz - 1; } memcpy( pStr, pTmp, needLen ); pStr[needLen] = 0; } return status; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Calls GobiConnect PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Connect( LPCSTR pInterface ) { // Connect to WDS, DMS, and NAS services ULONG svc[3] = { 1, 2, 3 }; ULONG svcCount = 3; GOBIHANDLE handle = 0; ULONG status = GobiConnect( pInterface, &svcCount, &svc[0], &handle ); if (status == 0) { if (svcCount == 3) { mhGobi = handle; } else { // We require WDS, DMS, and NAS services Disconnect(); status = eGOBI_ERR_GENERAL; } } return status; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::Disconnect() { if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } return GobiDisconnect( mhGobi ); } /*=========================================================================== ETHOD: StartDataSession (Public Method) DESCRIPTION: Calls WDSStartNetworkInterface PARAMETERS: pAPN [ I ] - Access point name pUser [ I ] - Username pPwd [ I ] - Password pSessionID [ O ] - Session ID pFailureCode [ O ] - Failure code (if present) RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ) { // Assume failure if (pSessionID != 0) { *pSessionID = 0xFFFFFFFF; } // Start a data session? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x16; pTLV->mLength = (UINT16)sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); pData += sizeof( sQMIRawContentHeader ); sWDSStartNetworkInterfaceRequest_Authentication * pAuth = (sWDSStartNetworkInterfaceRequest_Authentication *)pData; pAuth->mEnablePAP = 1; pAuth->mEnableCHAP = 1; pData += sizeof( sWDSStartNetworkInterfaceRequest_Authentication ); if (pAPN != 0 && pAPN[0] != 0) { size_t len = strnlen( pAPN, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x14; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pAPN, len ); pData += len; } if (pUser != 0 && pUser[0] != 0) { size_t len = strnlen( pUser, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x17; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pUser, len ); pData += len; } if (pPwd != 0 && pPwd[0] != 0) { size_t len = strnlen( pPwd, 256 ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x18; pTLV->mLength = (UINT16)len; pData += sizeof( sQMIRawContentHeader ); memcpy( pData, pPwd, len ); pData += len; } ULONG li = (ULONG)pData - (ULONG)&req[0]; ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSStartNetworkInterface( mhGobi, 300000, li, &req[0], &lo, &rsp[0] ); // On success pSessionID is valid, on failure pFailureCode is valid ULONG status2 = ParseStartDataSession( lo, &rsp[0], pSessionID, pFailureCode ); if (status == eGOBI_ERR_NONE) { return status2; } return status; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Calls GobiCancel/WDSAbort RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::CancelDataSession() { // Cancel outstanding API request? if (mhGobi == 0) { return eGOBI_ERR_GENERAL; } // Cancel the request with the API ULONG svcID = 1; ULONG txID = 0xFFFFFFFF; ULONG status = GobiCancel( mhGobi, svcID, &txID ); if (status != 0 || txID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } UINT8 req[256] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x01; pTLV->mLength = (UINT16)sizeof( sWDSAbortRequest_TransactionID ); pData += sizeof( sQMIRawContentHeader ); sWDSAbortRequest_TransactionID * pID = (sWDSAbortRequest_TransactionID *)pData; pID->mTransactionID = (UINT16)txID; pData += sizeof( sWDSAbortRequest_TransactionID ); // Cancel the request with the device ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSAbort( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: StopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface PARAMETERS: sessionID [ I ] - Session ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::StopDataSession( ULONG sessionID ) { ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } UINT8 req[256] = { 0 }; ULONG li = 256; status = PackStopDataSession( &li, &req[0], sessionID ); if (status != 0) { return status; } // Stop data session status = WDSStopNetworkInterface( mhGobi, 2000, li, &req[0], 0, 0 ); return status; } /*=========================================================================== METHOD: GetSessionState (Public Method) DESCRIPTION: Calls WDSGetPacketServiceStatus PARAMETERS: pSessionState [ O ] - Current session state RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionState( ULONG * pSessionState ) { // Assume failure if (pSessionState != 0) { *pSessionState = 0xFFFFFFFF; } ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetPacketServiceStatus( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionState( lo, &rsp[0], pSessionState ); return status; } /*=========================================================================== METHOD: GetSessionDuration (Public Method) DESCRIPTION: Calls WDSGetDataSessionDuration PARAMETERS: pSessionDuration [ O ] - Session duration RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSessionDuration( ULONGLONG * pSessionDuration ) { // Assume failure if (pSessionDuration != 0) { *pSessionDuration = 0xFFFFFFFF; } // Query for session duration ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataSessionDuration( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSessionDuration( lo, &rsp[0], pSessionDuration ); return status; } /*=========================================================================== METHOD: GetDataBearerTechnology (Public Method) DESCRIPTION: Calls WDSGetDataBearerTechnology PARAMETERS: pDataBearerTech [ O ] - Data bearer technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetDataBearerTechnology( ULONG * pDataBearerTech ) { // Assume failure if (pDataBearerTech != 0) { *pDataBearerTech = 0xFFFFFFFF; } // Query for data bearer duration? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetDataBearerTechnology( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetDataBearerTechnology( lo, &rsp[0], pDataBearerTech ); return status; } /*=========================================================================== METHOD: GetConnectionRate (Public Method) DESCRIPTION: Calls WDSGetChannelRates PARAMETERS: pCurTX [ O ] - Current TX rate pCurRX [ O ] - Current RX rate pMaxTX [ O ] - Max TX rate pMaxRX [ O ] - Max RX rate RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ) { // Assume failure pCurTX != 0 ? *pCurTX = 0xFFFFFFFF : 0; pCurRX != 0 ? *pCurRX = 0xFFFFFFFF : 0; pMaxTX != 0 ? *pMaxTX = 0xFFFFFFFF : 0; pMaxRX != 0 ? *pMaxRX = 0xFFFFFFFF : 0; // Query for rates? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = WDSGetChannelRates( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetConnectionRate( lo, &rsp[0], pCurTX, pCurRX, pMaxTX, pMaxRX ); return status; } /*=========================================================================== METHOD: GetFirmwareRevision (Public Method) DESCRIPTION: Calls DMSGetDeviceRevision PARAMETERS: strSz [ I ] - Maximum number of characters pStr [ O ] - Firmware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetFirmwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetManufacturer (Public Method) DESCRIPTION: Calls DMSGetDeviceManfacturer PARAMETERS: strSz [ I ] - Maximum string size pStr [ O ] - Manufacturer string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetManufacturer( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceManfacturer, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetModelID (Public Method) DESCRIPTION: Calls GetModelID PARAMETERS: strSz [ I ] - Max string size pStr [ O ] - Model ID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetModelID( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetDeviceModel, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetHardwareRevision (Public Method) DESCRIPTION: Calls DMSGetHardwareRevision PARAMETERS: strSz [ I ] - Max size of string pStr [ O ] - Hardware revision string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHardwareRevision( BYTE strSz, CHAR * pStr ) { return GetString( DMSGetHardwareRevision, 0x01, strSz, pStr ); } /*=========================================================================== METHOD: GetVoiceNumber (Public Method) DESCRIPTION: Calls GetVoiceNumber PARAMETERS: voiceSz [ I ] - Max characters in voice string pVoiceStr [ O ] - Voice number string minSz [ I ] - Max characters in MIN string pMINStr [ O ] - MIN string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ) { // Assume failure if (voiceSz > 0 && pVoiceStr != 0) { pVoiceStr[0] = 0; } if (minSz > 0 && pMINStr != 0) { pMINStr[0] = 0; } // Query for voice numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceVoiceNumber( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetVoiceNumber( lo, &rsp[0], voiceSz, pVoiceStr, minSz, pMINStr ); return status; } /*=========================================================================== METHOD: GetSerialNumbers (Public Method) DESCRIPTION: Calls DMSGetDeviceSerialNumbers PARAMETERS: esnSz [ I ] - ESN size pESNStr [ O ] - ESN string imeiSz [ I ] - IMEI size pIMEIStr [ O ] - IMSI string meidSz [ I ] - MEID size pMEIDStr [ O ] - MEID string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ) { // Assume failure if (esnSz > 0 && pESNStr != 0) { pESNStr[0] = 0; } if (imeiSz > 0 && pIMEIStr != 0) { pIMEIStr[0] = 0; } if (meidSz > 0 && pMEIDStr != 0) { pMEIDStr[0] = 0; } // Query for serial numbers? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = DMSGetDeviceSerialNumbers( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSerialNumbers( lo, &rsp[0], esnSz, pESNStr, imeiSz, pIMEIStr, meidSz, pMEIDStr ); return status; } /*=========================================================================== METHOD: GetIMSI (Public Method) DESCRIPTION: Get IMSI PARAMETERS: imsiSz [ I ] - IMSI size pIMSIStr [ O ] - IMSI string RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ) { return GetString( DMSGetDeviceVoiceNumber, 0x11, imsiSz, pIMSIStr ); } /*=========================================================================== METHOD: GetSignalStrengths (Public Method) DESCRIPTION: Calls NASGetSignalStrength PARAMETERS: pSigStrengths [ O ] - Received signal strength pRadioInterfaces [ O ] - Radio interface technology RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ) { // Assume failure for (ULONG s = 0; s < MAX_SIGNALS; s++) { pSigStrengths[s] = 0; pRadioInterfaces[s] = 0xFFFFFFFF; } // Query for signal strengths? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 1024; BYTE rsp[1024] = { 0 }; status = NASGetSignalStrength( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetSignalStrength( lo, &rsp[0], pSigStrengths, pRadioInterfaces ); return status; } /*=========================================================================== METHOD: GetServingNetwork (Public Method) DESCRIPTION: Calls NASGetServingSystem PARAMETERS: pDataCapabilities [ O ] - Data capabilities pMCC [ O ] - Mobile country code pMNC [ O ] - Mobile network code nameSize [ I ] - Network name max size pName [ O ] - Network name pSID [ O ] - System ID pNID [ O ] - Network ID pRoam [ O ] - Roaming indicator RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ) { // Assume failure for (ULONG d = 0; d < MAX_DATA_CAPABILITIES; d++) { pDataCapabilities[d] = 0xFFFFFFFF; } if (nameSize > 0 && pName != 0) { pName[0] = 0; } pMCC != 0 ? *pMCC = 0xFFFF : 0; pMNC != 0 ? *pMNC = 0xFFFF : 0; pRoam != 0 ? *pRoam = 0xFFFFFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for serving system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetServingSystem( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } std::map tlvs = GetTLVs( &rsp[0], lo ); std::map ::const_iterator pIter = tlvs.find( 0x11 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG dsLen = (ULONG)sizeof( sNASGetServingSystemResponse_DataServices ); if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DataServices * pDS = (const sNASGetServingSystemResponse_DataServices *)pTmp; ULONG dcCount = (ULONG)pDS->mNumberOfDataCapabilities; ULONG dcSz = (ULONG)sizeof( eQMINASDataServiceCapabilities2 ); dsLen += dcCount * dcSz; if (tlvLen < dsLen) { return eGOBI_ERR_GENERAL; } pDS++; eQMINASDataServiceCapabilities2 * pCap = (eQMINASDataServiceCapabilities2 *)pDS; if (dcCount > MAX_DATA_CAPABILITIES) { dcCount = MAX_DATA_CAPABILITIES; } for (ULONG i = 0; i < dcCount; i++) { pDataCapabilities[i] = (ULONG)*pCap++; } } pIter = tlvs.find( 0x12 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG plmnLen = (ULONG)sizeof( sNASGetServingSystemResponse_CurrentPLMN ); if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_CurrentPLMN * pPLMN = (const sNASGetServingSystemResponse_CurrentPLMN *)pTmp; ULONG strLen = (ULONG)pPLMN->mDescriptionLength; plmnLen += strLen; if (tlvLen < plmnLen) { return eGOBI_ERR_GENERAL; } pMCC != 0 ? *pMCC = (ULONG)pPLMN->mMobileCountryCode : 0; pMNC != 0 ? *pMNC = (ULONG)pPLMN->mMobileNetworkCode : 0; pPLMN++; if (strLen != 0 && nameSize > 0 && pName != 0) { ULONG needLen = strLen; if (needLen + 1 > nameSize) { needLen = nameSize - 1; } memcpy( pName, pPLMN, needLen ); pName[needLen] = 0; } } pIter = tlvs.find( 0x13 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG sysLen = (ULONG)sizeof( sNASGetServingSystemResponse_SystemID ); if (tlvLen < sysLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_SystemID * pSys = (const sNASGetServingSystemResponse_SystemID *)pTmp; pSID != 0 ? *pSID = (ULONG)pSys->mSystemID : 0; pNID != 0 ? *pNID = (ULONG)pSys->mNetworkID : 0; } pIter = tlvs.find( 0x16 ); if (pIter != tlvs.end()) { const sQMIRawContentHeader * pTmp = pIter->second; ULONG tlvLen = (ULONG)pTmp->mLength; ULONG roamLen = (ULONG)sizeof( sNASGetServingSystemResponse_DefaultRoaming ); if (tlvLen < roamLen) { return eGOBI_ERR_GENERAL; } pTmp++; const sNASGetServingSystemResponse_DefaultRoaming * pDR = (const sNASGetServingSystemResponse_DefaultRoaming *)pTmp; pRoam != 0 ? *pRoam = (ULONG)pDR->mRoamingIndicator : 0; } return status; } /*=========================================================================== METHOD: GetHomeNetwork (Public Method) DESCRIPTION: Calls NASGetHomeNetwork PARAMETERS: pHomeMCC [ O ] - Mobile country code pHomeMNC [ O ] - Mobile network code homeNameSize [ I ] - Max name size pHomeName [ O ] - Home network name pSID [ O ] - System ID pNID [ O ] - Network ID RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ) { // Assume failure if (homeNameSize > 0 && pHomeName != 0) { pHomeName[0] = 0; } pHomeMCC != 0 ? *pHomeMCC = 0xFFFF : 0; pHomeMNC != 0 ? *pHomeMNC = 0xFFFF : 0; pSID != 0 ? *pSID = 0xFFFF : 0; pNID != 0 ? *pNID = 0xFFFF : 0; // Query for home system? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } ULONG lo = 8096; BYTE rsp[8096] = { 0 }; status = NASGetHomeNetwork( mhGobi, 2000, 0, 0, &lo, &rsp[0] ); if (status != 0) { return status; } status = ParseGetHomeNetwork( lo, &rsp[0], pHomeMCC, pHomeMNC, homeNameSize, pHomeName, pSID, pNID ); return status; } /*=========================================================================== METHOD: SetWDSEventReportCB (Public Method) DESCRIPTION: Calls WDSSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer interval [ I ] - Interval (in seconds) for transfer statistics RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ) { // Set WDS event callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x11; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_TransferStatisticsIndicator * pTS = (sWDSSetEventReportRequest_TransferStatisticsIndicator *)pData; pTS->mTransferStatisticsIntervalSeconds = interval; pTS->mReportTXPacketSuccesses = 0; pTS->mReportRXPacketSuccesses = 0; pTS->mReportTXPacketErrors = 0; pTS->mReportRXPacketErrors = 0; pTS->mReportTXOverflows = 0; pTS->mReportRXOverflows = 0; pTS->mTXByteTotal = 1; pTS->mRXByteTotal = 1; pData += sizeof( sWDSSetEventReportRequest_TransferStatisticsIndicator ); pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x12; pTLV->mLength = (UINT16)sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); pData += sizeof( sQMIRawContentHeader ); sWDSSetEventReportRequest_DataBearerTechnologyIndicator * pTI = (sWDSSetEventReportRequest_DataBearerTechnologyIndicator *)pData; pTI->mReportDataBearerTechnology = 1; pData += sizeof( sWDSSetEventReportRequest_DataBearerTechnologyIndicator ); ULONG li = (ULONG)pData - (ULONG)&req[0]; status = WDSSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 1, pCallback ); return status; } /*=========================================================================== METHOD: SetWDSSessionStateCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetWDSSessionStateCB( tFNGenericCallback pCallback ) { // Set WDS packet service status callback? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 1, 34, pCallback ); return status; } /*=========================================================================== METHOD: SetNASEventReportCB (Public Method) DESCRIPTION: Calls NASSetEventReport/SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer thresholdsSize [ I ] - Threshold size pThresholds [ I ] - Array of thresholds RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ) { // Set NAS event report callback request? ULONG status = eGOBI_ERR_GENERAL; if ( (mhGobi == 0) || (thresholdsSize > 0 && pThresholds == 0) ) { return status; } // Configure the QMI service UINT8 req[1024] = { 0 }; UINT8 * pData = (UINT8 *)&req[0]; sQMIRawContentHeader * pTLV = (sQMIRawContentHeader *)pData; pTLV->mTypeID = 0x10; pTLV->mLength = (UINT16)sizeof( sNASSetEventReportRequest_SignalIndicator ); pTLV->mLength += (UINT16)thresholdsSize; pData += sizeof( sQMIRawContentHeader ); sNASSetEventReportRequest_SignalIndicator * pSI = (sNASSetEventReportRequest_SignalIndicator *)pData; pSI->mReportSignalStrength = 1; pSI->mNumberOfThresholds = thresholdsSize; pData += sizeof( sNASSetEventReportRequest_SignalIndicator ); for (UINT8 i = 0; i < thresholdsSize; i++) { INT8 * pThresh = (INT8 *)pData; *pThresh = pThresholds[i]; pData++; } ULONG li = (ULONG)pData - (ULONG)&req[0]; status = NASSetEventReport( mhGobi, 2000, li, &req[0], 0, 0 ); if (status != 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 2, pCallback ); return status; } /*=========================================================================== METHOD: SetNASServingSystemCB (Public Method) DESCRIPTION: Calls SetGenericCallback PARAMETERS: pCallback [ I ] - Callback function pointer RETURN VALUE: ULONG ===========================================================================*/ ULONG cGobiCMDLL::SetNASServingSystemCB( tFNGenericCallback pCallback ) { // Set NAS serving system request? ULONG status = eGOBI_ERR_GENERAL; if (mhGobi == 0) { return status; } // Configure the callback with the API status = SetGenericCallback( mhGobi, 3, 36, pCallback ); return status; } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/GobiCMDLL.h000077500000000000000000000212371455567757300243530ustar00rootroot00000000000000/*=========================================================================== FILE: GobiCMDLL.h DESCRIPTION: Simple class to load and interface to the Gobi CM DLL PUBLIC CLASSES AND METHODS: cGobiCMDLL This class loads the Gobi CM DLL and then interfaces to it Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "GobiConnectionMgmtAPI.h" #include "GobiConnectionMgmtAPIStructs.h" #include //--------------------------------------------------------------------------- // Definitions //--------------------------------------------------------------------------- // Handle to Gobi API typedef ULONG_PTR GOBIHANDLE; // The maximum number of signals const ULONG MAX_SIGNALS = 12; // The maximum number of data capabilities const ULONG MAX_DATA_CAPABILITIES = 12; // Gobi input/output function pointer typedef ULONG (* tFNGobiInputOutput)( GOBIHANDLE handle, ULONG to, ULONG inLen, const BYTE * pIn, ULONG * pOutLen, BYTE * pOut ); /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTLVs (Internal Method) DESCRIPTION: Convert response buffer to a TLV map PARAMETERS: pRsp [ I ] - The response buffer rspSz [ I ] - The size of the above buffer RETURN VALUE: std::map ===========================================================================*/ inline std::map GetTLVs( const UINT8 * pRsp, ULONG rspSz ) { std::map retMap; ULONG dataProcessed = 0; const UINT8 * pData = &pRsp[0]; while (dataProcessed < rspSz) { dataProcessed += (ULONG)sizeof( sQMIRawContentHeader ); if (dataProcessed > rspSz) { break; } const sQMIRawContentHeader * pTLV = (const sQMIRawContentHeader *)pData; dataProcessed += (ULONG)pTLV->mLength; if (dataProcessed > rspSz) { break; } retMap[pTLV->mTypeID] = pTLV; pData = &pRsp[dataProcessed]; } return retMap; }; /*=========================================================================*/ // Class cGobiCMDLL /*=========================================================================*/ class cGobiCMDLL { public: // Constructor cGobiCMDLL() : mhGobi( 0 ) { } // Destructor ~cGobiCMDLL() { } // Connect ULONG Connect( LPCSTR pInterface ); // Disconnect ULONG Disconnect(); // Start data session ULONG StartDataSession( LPCSTR pAPN, LPCSTR pUser, LPCSTR pPwd, ULONG * pSessionID, ULONG * pFailureCode ); // Cancel data session ULONG CancelDataSession(); // Stop data session ULONG StopDataSession( ULONG sessionID ); // Get session state ULONG GetSessionState( ULONG * pSessionState ); // Get session duration ULONG GetSessionDuration( ULONGLONG * pSessionDuration ); // Get data bearer technology ULONG GetDataBearerTechnology( ULONG * pDataBearerTech ); // Get connection rate ULONG GetConnectionRate( ULONG * pCurTX, ULONG * pCurRX, ULONG * pMaxTX, ULONG * pMaxRX ); // Get firmware revision ULONG GetFirmwareRevision( BYTE strSz, CHAR * pStr ); // Get manufacturer ULONG GetManufacturer( BYTE strSz, CHAR * pStr ); // Get model ID ULONG GetModelID( BYTE strSz, CHAR * pStr ); // Get hardware revision ULONG GetHardwareRevision( BYTE strSz, CHAR * pStr ); // Get voice number ULONG GetVoiceNumber( BYTE voiceSz, CHAR * pVoiceStr, BYTE minSz, CHAR * pMINStr ); // Get serial numbers ULONG GetSerialNumbers( BYTE esnSz, CHAR * pESNStr, BYTE imeiSz, CHAR * pIMEIStr, BYTE meidSz, CHAR * pMEIDStr ); // Get IMSI ULONG GetIMSI( BYTE imsiSz, CHAR * pIMSIStr ); // Get signal strengths ULONG GetSignalStrengths( INT8 * pSigStrengths, ULONG * pRadioInterfaces ); // Get serving network ULONG GetServingNetwork( ULONG * pDataCapabilities, WORD * pMCC, WORD * pMNC, BYTE nameSize, CHAR * pName, WORD * pSID, WORD * pNID, ULONG * pRoam ); // Get home network ULONG GetHomeNetwork( WORD * pHomeMCC, WORD * pHomeMNC, BYTE homeNameSize, CHAR * pHomeName, WORD * pSID, WORD * pNID ); // Set WDS event report callback ULONG SetWDSEventReportCB( tFNGenericCallback pCallback, BYTE interval ); // Set WDS packet service status callback ULONG SetWDSSessionStateCB( tFNGenericCallback pCallback ); // Set NAS event report callback ULONG SetNASEventReportCB( tFNGenericCallback pCallback, BYTE thresholdsSize, INT8 * pThresholds ); // Set NAS serving system callback ULONG SetNASServingSystemCB( tFNGenericCallback pCallback ); protected: // Call a Gobi CM API function that returns a string ULONG GetString( tFNGobiInputOutput mpFnString, BYTE tlvID, BYTE strSz, CHAR * pStr ); /* Handle to Gobi API */ GOBIHANDLE mhGobi; }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/QTSampleCM.cpp000077500000000000000000000227361455567757300251650ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.cpp DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cQTSampleCM QT implementation of the Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "QTSampleCM.h" /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: AsyncConnectThread (Free Method) DESCRIPTION: Start a data session PARAMETERS: pData [ I ] - cQTSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * AsyncConnectThread( void * pData ) { cQTSampleCM * pCM = (cQTSampleCM*)pData; if (pCM == NULL) { return NULL; } // Open the dialog window, disable the info and connection stats buttons pCM->mView.rootContext()->setContextProperty( "dialogText", "Connecting, please wait..." ); pCM->mView.rootContext()->setContextProperty( "windowState", "connectingDialog" ); ULONG failureCode = 0xFFFFFFFF; ULONG rc = pCM->OnStartDataSession( &failureCode ); if (rc != eGOBI_ERR_NONE) { std::ostringstream error; error << "Failed to connect, error " << rc; TRACE( "rc %lu, failure code %lu", rc, failureCode ); // Show failure code, if present if (rc == 1014 && failureCode != 0xFFFFFFFF) { error << "\nCall failure reason " << failureCode; } pCM->mView.rootContext()->setContextProperty( "dialogText", error.str().c_str() ); pCM->SetConnectButtonText( "Connect" ); } else { pCM->mView.rootContext()->setContextProperty( "dialogText", "Success!" ); // Connect button should be updated by state change indication } // Leave the dialog up for 2s sleep( 2 ); pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return NULL; } /*=========================================================================== METHOD: OnInfosButton (Free Method) DESCRIPTION: Move to the info stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnInfosButton( cQTSampleCM * pCM ) { pCM->mView.rootContext()->setContextProperty( "windowState", "infos" ); return 0; } /*=========================================================================== METHOD: OnConnectionsButton (Free Method) DESCRIPTION: Move to the connection stats page PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectionsButton( cQTSampleCM * pCM ) { // "" is the default state (connection stats page) pCM->mView.rootContext()->setContextProperty( "windowState", "" ); return 0; } /*=========================================================================== METHOD: OnConnectButton (Free Method) DESCRIPTION: Start, cancel, or disconnect from a data session NOTE: The UI is not updated until this function returns, so the connection will be established asynchronously PARAMETERS: pCM [ I ] - cQTSampleCM object RETURN VALUE: QVariant - always 0 ===========================================================================*/ QVariant OnConnectButton( cQTSampleCM * pCM ) { // Double check if there a device connected if (pCM->mDeviceID.size() == 0 || pCM->mConnectButtonText.compare( "No Device" ) == 0) { TRACE( "No Device" ); return 0; } // Start a connection if (pCM->mConnectButtonText.compare( "Connect" ) == 0) { pCM->SetConnectButtonText( "Cancel" ); // Create a detached thread to start the connection asynchronously pthread_attr_t attributes; pthread_attr_init( &attributes ); pthread_attr_setdetachstate( &attributes, PTHREAD_CREATE_DETACHED ); pthread_create( &pCM->mAsyncConnectThreadID, &attributes, AsyncConnectThread, pCM ); } else if (pCM->mConnectButtonText.compare( "Cancel" ) == 0) { pCM->OnCancelDataSession(); pCM->SetConnectButtonText( "Connect" ); } else if (pCM->mConnectButtonText.compare( "Disconnect" ) == 0) { pCM->OnStopDataSession(); pCM->SetConnectButtonText( "Connect" ); } else { // Externally connected, etc TRACE( "Unknown connect button state %s", pCM->mConnectButtonText.c_str() ); } return 0; } /*=========================================================================*/ // cQTSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI RETURN VALUE: bool ===========================================================================*/ bool cQTSampleCM::Init() { // Use the current screen orientation mView.setOrientation( QmlApplicationViewer::ScreenOrientationAuto ); // The buttons mView.rootContext()->setContextProperty( "connectButton", &mConnectButton ); mView.rootContext()->setContextProperty( "infosButton", &mInfosButton ); mView.rootContext()->setContextProperty( "connectionsButton", &mConnectionsButton ); // The input fields mView.rootContext()->setContextProperty( "apnNameText", &mAPNText ); mView.rootContext()->setContextProperty( "usernameText", &mUsernameText ); mView.rootContext()->setContextProperty( "passwordText", &mPasswordText ); // Default button value SetConnectButtonText( "No Device" ); // Default state mView.rootContext()->setContextProperty( "windowState", "" ); mView.rootContext()->setContextProperty( "dialogText", "" ); bool bRC = cSampleCM::Init(); mView.setMainQmlFile( "qml/GobiSampleCM/main.qml" ); mView.show(); return bRC; } /*=========================================================================== METHOD: Run (Public Method) DESCRIPTION: Run the GUI (blocks until exit) RETURN VALUE: bool ===========================================================================*/ int cQTSampleCM::Run() { return mApp.exec(); } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::Disconnect() { SetConnectButtonText( "No device" ); return cSampleCM::Disconnect(); } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Updates apn, username, and password input field values before starting a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cQTSampleCM::OnStartDataSession( ULONG * pFailureCode ) { // Grab the APN, username, and password mAPN = mAPNText.getText().toUtf8().constData(); mUsername = mUsernameText.getText().toUtf8().constData(); mPassword = mPasswordText.getText().toUtf8().constData(); return cSampleCM::OnStartDataSession( pFailureCode ); } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/QTSampleCM.h000077500000000000000000000307051455567757300246250ustar00rootroot00000000000000/*=========================================================================== FILE: QTSampleCM.h DESCRIPTION: QT implementation of the Sample CM PUBLIC CLASSES AND METHODS: cButton Generic clickable button for QT cTextInput Generic text input field for QT cQTSampleCM QT implementation of the Sample CM Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include #include "qmlapplicationviewer.h" #include #include #include "SampleCM.h" // Prototypes class cQTSampleCM; void * AsyncConnectThread( void * pData ); QVariant OnInfosButton( cQTSampleCM * pCM ); QVariant OnConnectionsButton( cQTSampleCM * pCM ); QVariant OnConnectButton( cQTSampleCM * pCM ); /*=========================================================================*/ // Class cButton // Generic clickable button for QT /*=========================================================================*/ class cButton : public QObject { Q_OBJECT public: // Constructor cButton( cQTSampleCM * pCM, QVariant (*pOnClick)( cQTSampleCM * ) ) { mpCM = pCM; mpOnClick = pOnClick; } public slots: // Function to be run on a click event QVariant Click() { if (mpOnClick != 0) { return mpOnClick( mpCM ); } return ""; } protected: /* The main object */ cQTSampleCM * mpCM; /* Function to run when clicked */ QVariant (* mpOnClick)( cQTSampleCM * ); }; /*=========================================================================*/ // cTextInput // Generic text input field for QT /*=========================================================================*/ class cTextInput : public QObject { Q_OBJECT Q_PROPERTY( QString text READ getText WRITE setText ) public slots: // Get the value QString getText() const { return mText; } // Set the value void setText( const QString & text ) { mText = text; } private: /* The text */ QString mText; }; /*=========================================================================*/ // Class cQTSampleCM /*=========================================================================*/ class cQTSampleCM : public cSampleCM { public: // Constructor cQTSampleCM( int argc, char ** argv ) : mApp( argc, argv ), mConnectButtonText( "No Device" ), mConnectButton( this, OnConnectButton ), mInfosButton( this, OnInfosButton ), mConnectionsButton( this, OnConnectionsButton ) { } // Initialize UI, begin waiting for devices bool Init(); // Run the GUI (blocks until exit) int Run(); // Disconnect ULONG Disconnect(); // Process a start data session request ULONG OnStartDataSession( ULONG * pFailureCode ); // Set mState and the connection button void SetState( const std::string & state ) { cSampleCM::SetState( state ); // Update the connection button as well switch (mSessionState) { case eQMIConnectionStatus_Disconnected: { SetConnectButtonText( "Connect" ); if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { // Clear the initial state mInitialState = eQMIConnectionStatus_Disconnected; } } break; case eQMIConnectionStatus_Connected: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "External Con" ); } else { SetConnectButtonText( "Disconnect" ); } } break; case eQMIConnectionStatus_Authenticating: { if (mInitialState != eQMIConnectionStatus_Disconnected && mInitialState != eQMIConnectionStatus_Suspended) { SetConnectButtonText( "Ext Connecting" ); } else { SetConnectButtonText( "Cancel" ); } } break; case eQMIConnectionStatus_Suspended: default: break; } // No more than 12 characters if (mState.size() > 12) { mState.resize( 12 ); } // Note: "state" is already a property, can't duplicate // using "status" instead mView.rootContext()->setContextProperty( "status", mState.c_str() ); } // Set mRSSI void SetRSSI( const std::string & rssi ) { cSampleCM::SetRSSI( rssi ); mView.rootContext()->setContextProperty( "rssi", mRSSI.c_str() ); } // Set mTech void SetTech( const std::string & tech ) { cSampleCM::SetTech( tech ); // No more than 12 characters if (mTech.size() > 12) { mTech.resize( 12 ); } mView.rootContext()->setContextProperty( "tech", mTech.c_str() ); } // Set mRx void SetRx( const std::string & rx ) { cSampleCM::SetRx( rx ); mView.rootContext()->setContextProperty( "rx", mRx.c_str() ); } // Set mTx void SetTx( const std::string & tx ) { cSampleCM::SetTx( tx ); mView.rootContext()->setContextProperty( "tx", mTx.c_str() ); } // Set mMaxRx void SetMaxRx( const std::string & maxRx ) { cSampleCM::SetMaxRx( maxRx ); mView.rootContext()->setContextProperty( "maxRx", mMaxRx.c_str() ); } // Set mMaxTx void SetMaxTx( const std::string & maxTx ) { cSampleCM::SetMaxTx( maxTx ); mView.rootContext()->setContextProperty( "maxTx", mMaxTx.c_str() ); } // Set mRoam void SetRoam( const std::string & roam ) { cSampleCM::SetRoam( roam ); mView.rootContext()->setContextProperty( "roam", mRoam.c_str() ); } // Set mDuration void SetDuration( const std::string & duration ) { cSampleCM::SetDuration( duration ); mView.rootContext()->setContextProperty( "duration", mDuration.c_str() ); } // Set mLifeDuration void SetLifeDuration( const std::string & lifeDuration ) { cSampleCM::SetLifeDuration( lifeDuration ); mView.rootContext()->setContextProperty( "lifeDuration", mLifeDuration.c_str() ); } // Set mLifeRx void SetLifeRx( const std::string & lifeRx ) { cSampleCM::SetLifeRx( lifeRx ); mView.rootContext()->setContextProperty( "lifeRx", mLifeRx.c_str() ); } // Set mLifeTx void SetLifeTx( const std::string & lifeTx ) { cSampleCM::SetLifeTx( lifeTx ); mView.rootContext()->setContextProperty( "lifeTx", mLifeTx.c_str() ); } // Set mManufact void SetManufact( const std::string & manufact ) { cSampleCM::SetManufact( manufact ); mView.rootContext()->setContextProperty( "manufact", mManufact.c_str() ); } // Set mModel void SetModel( const std::string & model ) { cSampleCM::SetModel( model ); // No more than 20 characters if (mModel.size() > 20) { mModel.resize( 20 ); } mView.rootContext()->setContextProperty( "model", mModel.c_str() ); } // Set mHardware void SetHardware( const std::string & hardware ) { cSampleCM::SetHardware( hardware ); mView.rootContext()->setContextProperty( "hardware", mHardware.c_str() ); } // Set mFirmware void SetFirmware( const std::string & firmware ) { cSampleCM::SetFirmware( firmware ); // No more than 20 characters if (mFirmware.size() > 20) { mFirmware.resize( 20 ); } mView.rootContext()->setContextProperty( "firmware", mFirmware.c_str() ); } // Set mMDN void SetMDN( const std::string & mdn ) { cSampleCM::SetMDN( mdn ); mView.rootContext()->setContextProperty( "mdn", mMDN.c_str() ); } // Set mMIN void SetMIN( const std::string & min ) { cSampleCM::SetMIN( min ); mView.rootContext()->setContextProperty( "min", mMIN.c_str() ); } // Set mESN void SetESN( const std::string & esn ) { cSampleCM::SetESN( esn ); mView.rootContext()->setContextProperty( "esn", mESN.c_str() ); } // Set mMEID void SetMEID( const std::string & meid ) { cSampleCM::SetMEID( meid ); mView.rootContext()->setContextProperty( "meid", mMEID.c_str() ); } // Set mIMEI void SetIMEI( const std::string & imei ) { cSampleCM::SetIMEI( imei ); mView.rootContext()->setContextProperty( "imei", mIMEI.c_str() ); } // Set mIMSI void SetIMSI( const std::string & imsi ) { cSampleCM::SetIMSI( imsi ); mView.rootContext()->setContextProperty( "imsi", mIMSI.c_str() ); } // Set mConnectButtonText void SetConnectButtonText( const std::string & connectButtonText ) { mConnectButtonText = connectButtonText; mView.rootContext()->setContextProperty( "connectButtonText", connectButtonText.c_str() ); } protected: /* QApplication object */ QApplication mApp; /* QmlApplicationViewer object */ QmlApplicationViewer mView; /* APN text input field */ cTextInput mAPNText; /* Username text input field */ cTextInput mUsernameText; /* Password text input field */ cTextInput mPasswordText; /* "Connect" button's text */ std::string mConnectButtonText; /* "Connect" button */ cButton mConnectButton; /* "Info Stats" button */ cButton mInfosButton; /* "Connection Stats" button */ cButton mConnectionsButton; /* Async connection thread ID */ pthread_t mAsyncConnectThreadID; // Friend functions friend void * AsyncConnectThread( void * pData ); friend QVariant OnInfosButton( cQTSampleCM * pCM ); friend QVariant OnConnectionsButton( cQTSampleCM * pCM ); friend QVariant OnConnectButton( cQTSampleCM * pCM ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/SampleCM.cpp000077500000000000000000001337271455567757300247230ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.cpp DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "SampleCM.h" #include "GobiCMDLL.h" #include "GobiCMCallback.h" #include "GobiConnectionMgmtAPIStructs.h" #include #include #include #include #include // Global pointer for callbacks to reference class cSampleCM * gpCM; /*=========================================================================*/ // Free Methods /*=========================================================================*/ /*=========================================================================== METHOD: GetTickCount (Free Method) DESCRIPTION: Provide a number for sequencing reference, similar to the windows ::GetTickCount(). NOTE: This number is based on the time since epoc, not uptime. PARAMETERS: RETURN VALUE: ULONGLONG - Number of milliseconds system has been up ===========================================================================*/ ULONGLONG GetTickCount() { timespec curtime; clock_gettime( CLOCK_REALTIME, &curtime ); ULONGLONG outtime = curtime.tv_sec * 1000LL; outtime += curtime.tv_nsec / 1000000LL; return outtime; } /*=========================================================================== METHOD: DeviceDetectionThread (Free Method) DESCRIPTION: Scans for and detects devices PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * DeviceDetectionThread( void * pData ) { cSampleCM * pCM = (cSampleCM *)pData; if (pCM == NULL) { return NULL; } // Get inotify handle int inotify = inotify_init(); if (inotify == -1) { TRACE( "inotify_init failed\n" ); return NULL; } // Start a watch on the /dev directory int inotifyFlags = IN_CREATE | IN_MODIFY | IN_DELETE; int watchD = inotify_add_watch( inotify, "/dev/", inotifyFlags ); if (watchD == -1) { TRACE( "inotify_add_watch failed\n" ); close( inotify ); return NULL; } // Does a device already exist? dirent ** ppDevFiles; // Yes, scandir really takes a triple pointer for its second param int numDevs = scandir( "/dev/", &ppDevFiles, NULL, NULL ); for (int i = 0; i < numDevs; i++) { std::string deviceID = "/dev/"; deviceID += ppDevFiles[i]->d_name; free( ppDevFiles[i] ); if (deviceID.find( "qcqmi" ) != std::string::npos) { pCM->Connect( deviceID.c_str() ); break; } } // Cleanup from scandir if (numDevs != -1) { free( ppDevFiles ); } else { TRACE( "Scandir failed\n" ); } // Begin async reading fd_set inputSet, outputSet; FD_ZERO( &inputSet ); FD_SET( pCM->mDeviceDetectionStopPipe[READING], &inputSet ); FD_SET( inotify, &inputSet ); int largestFD = std::max( pCM->mDeviceDetectionStopPipe[READING], inotify ); while (true) { // No FD_COPY() available in android memcpy( &outputSet, &inputSet, sizeof( fd_set ) ); // Wait for data on either the inotify or the stop pipe int status = select( largestFD + 1, &outputSet, NULL, NULL, NULL ); if (status <= 0) { break; } else if (FD_ISSET( pCM->mDeviceDetectionStopPipe[READING], &outputSet ) == true) { // Time to close break; } else if (FD_ISSET( inotify, &outputSet ) == true) { // Perform a read BYTE buffer[1024] = { 0 }; int rc = read( inotify, &buffer[0], 1024 ); if (rc < (int)sizeof( inotify_event )) { continue; } // Typecast the buffer to an inotify event struct inotify_event * pIEvent = (struct inotify_event *)&buffer[0]; // Check the length of the name if (pIEvent->len < 5) { continue; } // Is this a matching device? if (strncmp( pIEvent->name, "qcqmi", 5 ) != 0) { continue; } std::string deviceID = "/dev/"; deviceID += pIEvent->name; if (pIEvent->mask & IN_CREATE || pIEvent->mask & IN_MODIFY) { pCM->Connect( deviceID.c_str() ); } if (pIEvent->mask & IN_DELETE) { // Was it the connected device which was removed? if (pCM->mDeviceID.compare( deviceID ) == 0) { pCM->Disconnect(); } } } } // Cleanup inotify_rm_watch( inotify, watchD ); close( inotify ); return NULL; } /*=========================================================================== METHOD: UpdateNetworkInfoThread (Free Method) DESCRIPTION: Updates the network stats every 1s (while device is present) PARAMETERS: pData [ I ] - cSampleCM object RETURN VALUE: void * - always NULL ===========================================================================*/ void * UpdateNetworkInfoThread( void * pData ) { cSampleCM * pCM = (cSampleCM*)pData; if (pCM == NULL) { return NULL; } // Update once pCM->CheckConnectedStats(); int rc; do { // Update rates and times every 1s pCM->UpdateRateDisplay(); pCM->UpdateTimeDisplay(); DWORD temp; rc = pCM->mUpdateNetworkInfoEvent.Wait( 1000, temp ); } while (rc == ETIME); return NULL; } /*=========================================================================== METHOD: ParseStats (Free Method) DESCRIPTION: Parse the stats file and obtain the TX/RX bytes and connection duration NOTE: The stats text file consists of one line in the following format: Total RX Bytes; Total TX Bytes; Total Duration PARAMETERS: line [ I ] - Line to parse lifeTotalRX [ O ] - Total RX bytes lifeTotalTX [ O ] - Total TX bytes lifeTotalDuration [ O ] - Total connection duration RETURN VALUE: bool ===========================================================================*/ bool ParseStats( std::istringstream & line, ULONGLONG & lifeTotalRX, ULONGLONG & lifeTotalTX, ULONGLONG & lifeTotalDuration ) { ULONGLONG temp1, temp2, temp3; char c1, c2; // Attempt to parse into temp variables, skipping whitespace line >> std::skipws >> temp1 >> c1 >> temp2 >> c2 >> temp3; // Was parsing successful? if (line.fail() == true) { TRACE( "failed to parse stats file\n" ); return false; } else { TRACE( "read %llu, %llu, %llu", temp1, temp2, temp3 ); lifeTotalRX = temp1; lifeTotalTX = temp2; lifeTotalDuration = temp3; return true; } } /*=========================================================================*/ // cSampleCM Methods /*=========================================================================*/ /*=========================================================================== METHOD: ~cSampleCM (Public Method) DESCRIPTION: Destructor - Stops the data session, Stops device detection thread, Writes stats to file RETURN VALUE: None ===========================================================================*/ cSampleCM::~cSampleCM() { // These functions will most likely fail. That's ok. OnCancelDataSession(); OnStopDataSession(); Disconnect(); // Close device detection thread, if open if (mDeviceDetectionStopPipe[WRITING] != -1) { if (mDeviceDetectionThreadID != 0) { BYTE byte = 1; write( mDeviceDetectionStopPipe[WRITING], &byte, 1 ); pthread_join( mDeviceDetectionThreadID, NULL ); mDeviceDetectionThreadID = 0; } close( mDeviceDetectionStopPipe[WRITING] ); close( mDeviceDetectionStopPipe[READING] ); mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; } // Write stats to file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int flags = O_CREAT | O_TRUNC | O_WRONLY; mode_t mode = S_IRUSR | S_IWUSR; int statsFile = open( config.c_str(), flags, mode ); if (statsFile < 0) { TRACE( "Unable to create stats file\n" ); } else { std::ostringstream out; out << mLifeTotalRX << "; " << mLifeTotalTX << "; " << mLifeTotalDuration; int rc = write( statsFile, out.str().c_str(), out.str().size() ); if (rc < 0) { TRACE( "Unable to write stats to file\n" ); } close( statsFile ); } } /*=========================================================================== METHOD: Init (Public Method) DESCRIPTION: Initialize GUI, begin waiting for devices RETURN VALUE: bool ===========================================================================*/ bool cSampleCM::Init() { Disconnect(); // Read in the stats file std::string config = getenv( "HOME" ); config += "/.GobiSampleCMStats.txt"; int statsFile = open( config.c_str(), O_RDONLY ); if (statsFile < 0) { // Non-fatal error TRACE( "Unable to open config file %s", config.c_str() ); } else { CHAR buf[100]; int len = read( statsFile, &buf[0], 100 ); if (len < 0) { // Non-fatal error TRACE( "failed to read from file\n" ); } else { std::string asString( &buf[0], len ); std::istringstream line( asString ); ULONGLONG lrx, ltx, ld; if (ParseStats( line, lrx, ltx, ld ) == true) { mLifeTotalRX = lrx; mLifeTotalTX = ltx; mLifeTotalDuration = ld; } } close( statsFile ); } // Life totals will just be zeros if the file was not present std::ostringstream tmp; tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); tmp.str( "" ); tmp << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (mLifeTotalDuration / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << mLifeTotalDuration % 60; SetLifeDuration( tmp.str() ); // Set the global pointer, used by callbacks gpCM = this; // Initialize command pipe int ret = pipe( mDeviceDetectionStopPipe ); if (ret != 0) { // Should never happen, but just in case... return false; } // Begin scanning for devices ret = pthread_create( &mDeviceDetectionThreadID, 0, DeviceDetectionThread, this ); if (ret != 0) { return false; } return true; } /*=========================================================================== METHOD: Connect (Public Method) DESCRIPTION: Initializes the Gobi API to the current device PARAMETERS: pInterface [ I ] - Interace to connect to RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Connect( LPCSTR pInterface ) { // Are we already connected to a device? if (mDeviceID.size() != 0) { return eGOBI_ERR_MULTIPLE_DEVICES; } // Connect to the device ULONG rc = mGobi.Connect( pInterface ); if (rc != eGOBI_ERR_NONE) { TRACE( "GobiConnect error %lu\n", rc ); return rc; } UpdateDeviceInfo(); UpdateConnectionInfo(); // Any connection at this point is an external connection UpdateSessionState( true, mSessionState ); // Success mDeviceID = pInterface; return rc; } /*=========================================================================== METHOD: Disconnect (Public Method) DESCRIPTION: Calls GobiDisconnect RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::Disconnect() { // Stop a data session, if present OnCancelDataSession(); OnStopDataSession(); mGobi.Disconnect(); // Reset state mSessionID = 0xFFFFFFFF; mInitialState = 0xFFFFFFFF; mDataBearerTech = 0; // Store life total mLifeTotalDuration += mTotalDuration; // Reset all totals mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; SetState( "No Device" ); SetRSSI( "Unknown" ); SetTech( "Unknown" ); SetRx( "Unknown" ); SetTx( "Unknown" ); SetMaxRx( "Unknown" ); SetMaxTx( "Unknown" ); SetRoam( "Unknown" ); SetDuration( "Unknown" ); SetLifeDuration( "Unknown" ); SetLifeRx( "Unknown" ); SetLifeTx( "Unknown" ); SetManufact( "Unknown" ); SetModel( "Unknown" ); SetHardware( "Unknown" ); SetFirmware( "Unknown" ); SetMDN( "Unknown" ); SetMIN( "Unknown" ); SetESN( "Unknown" ); SetMEID( "Unknown" ); SetIMEI( "Unknown" ); SetIMSI( "Unknown" ); return eGOBI_ERR_NONE; } /*=========================================================================== ETHOD: OnStartDataSession (Public Method) DESCRIPTION: Starts a data session PARAMETERS: pFailureCode [ O ] - Call failure code, if provided RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStartDataSession( ULONG * pFailureCode ) { mbInitiatedStartDataSession = true; // Use provided values, if not empty strings LPCSTR pAPN = (mAPN.size() == 0) ? 0 : mAPN.c_str(); LPCSTR pUsername = (mUsername.size() == 0) ? 0 : mUsername.c_str(); LPCSTR pPassword = (mPassword.size() == 0) ? 0 : mPassword.c_str(); ULONG rc = mGobi.StartDataSession( pAPN, pUsername, pPassword, &mSessionID, pFailureCode ); if (rc == eGOBI_ERR_NONE) { mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = GetTickCount(); } else { mbInitiatedStartDataSession = false; } return rc; } /*=========================================================================== METHOD: CancelDataSession (Public Method) DESCRIPTION: Cancels an in progress data session request RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnCancelDataSession() { return mGobi.CancelDataSession(); } /*=========================================================================== METHOD: OnStopDataSession (Public Method) DESCRIPTION: Calls WDSStopNetworkInterface RETURN VALUE: ULONG ===========================================================================*/ ULONG cSampleCM::OnStopDataSession() { if (mSessionID == 0xFFFFFFFF) { return eGOBI_ERR_GENERAL; } mbInitiatedStopDataSession = true; mDataBearerTech = 0; ULONG rc = mGobi.StopDataSession( mSessionID ); mSessionID = 0xFFFFFFFF; return rc; } /*=========================================================================== METHOD: OnSignalStrengthCBNotification (Internal Method) DESCRIPTION: Handle signal strength callback notification PARAMETERS: signalStr [ I ] - Signal strength radioInterface [ I ] - Radio interface ===========================================================================*/ void cSampleCM::OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ) { // Update mServiceSignals mServiceSignals[radioInterface] = signalStr; if (mSessionState == eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnSessionStateCBNotification (Internal Method) DESCRIPTION: Handle session state callback notification PARAMETERS: state [ I ] - Session state ===========================================================================*/ void cSampleCM::OnSessionStateCBNotification( ULONG state ) { // Was the state change triggered externally? bool bStateChangeExternal = false; // Save session state if (state == eQMIConnectionStatus_Connected) { // Started externally if (mbInitiatedStartDataSession == false) { bStateChangeExternal = true; mStartTime = GetTickCount(); } } else { mDataBearerTech = 0; // Stopped externally if (mbInitiatedStopDataSession == false) { // Store all life total variables mLifeTotalDuration += mTotalDuration; // Reset all totals bStateChangeExternal = true; mStartTime = 0; mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; } } // Update the session state UpdateSessionState( bStateChangeExternal, state ); // Update the signal strength and technology UpdateSignalAndTech(); // Reset to false mbInitiatedStartDataSession = false; mbInitiatedStopDataSession = false; } /*=========================================================================== METHOD: OnDataBearerCBNotification (Internal Method) DESCRIPTION: Handle data bearer callback notification PARAMETERS: dataBearerTech [ I ] - Data bearer technology ===========================================================================*/ void cSampleCM::OnDataBearerCBNotification( ULONG dataBearerTech ) { if (dataBearerTech != eQMIDataBearerTechnologies_Unknown) { mDataBearerTech = dataBearerTech; UpdateSignalAndTech(); } } /*=========================================================================== METHOD: OnDataCapsNotification (Internal Method) DESCRIPTION: Handle data capabilities callback notification PARAMETERS: numDataCaps [ I ] - Number of data capabilities pDataCaps [ I ] - Data Capabilites ===========================================================================*/ void cSampleCM::OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ) { // Clear saved data capabilities in order to update mDataCapabilities.clear(); // Populate list with new capabilities for (ULONG c = 0; c < numDataCaps; c++) { ULONG dataCaps = pDataCaps[c]; if ( (dataCaps != 0xFFFFFFFF) && (dataCaps != 0) ) { mDataCapabilities.push_back( pDataCaps[c] ); } } UpdateSignalAndTech(); } /*=========================================================================== METHOD: OnByteTotalsNotification (Internal Method) DESCRIPTION: Handle byte totals callback notification PARAMETERS: rx [ I ] - received bytes tx [ I ] - transmitted bytes ===========================================================================*/ void cSampleCM::OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ) { mTotalTX = tx; mTotalRX = rx; } /*=========================================================================== METHOD: UpdateSignalAndTech (Public Method) DESCRIPTION: Update the signal strength and technology display ===========================================================================*/ void cSampleCM::UpdateSignalAndTech() { std::string radioStr = "Unknown"; std::string ssStr = "Unknown"; ULONG radioVal = eQMINASRadioInterfaces_NoneNoService; // If connected, use data bearer if (mDataBearerTech != 0) { switch (mDataBearerTech) { case eQMIDataBearerTechnologies_CDMA20001x: radioStr = "CDMA 1xRTT"; radioVal = eQMINASRadioInterfaces_CDMA20001x; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORev0: radioStr = "CDMA 1xEVDO Rev 0"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_GPRS: radioStr = "GRPS"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_WCDMA: radioStr = "WCDMA"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_CDMA20001xEVDORevA: radioStr = "CDMA 1xEVDO Rev A"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_EGPRS: radioStr = "EDGE"; radioVal = eQMINASRadioInterfaces_GSM; break; case eQMIDataBearerTechnologies_HSDPAWCDMA: radioStr = "HSDPA DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_WCDMAHSUPA: radioStr = "WCDMA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAHSUPA: radioStr = "HSDPA DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_LTE: radioStr = "LTE"; radioVal = eQMINASRadioInterfaces_LTE; break; case eQMIDataBearerTechnologies_CDMA2000EHRPD: radioStr = "CDMA 1xEVDO eHRPD"; radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; break; case eQMIDataBearerTechnologies_HSDPAPlusWCDMA: radioStr = "HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_HSDPAPlusHSUPA: radioStr = "HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusWCDMA: radioStr = "Dual Cell HSDPA+ DL, WCDMA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; case eQMIDataBearerTechnologies_DualCellHSDPAPlusHSUPA: radioStr = "Dual Cell HSDPA+ DL, HSUPA UL"; radioVal = eQMINASRadioInterfaces_UMTS; break; } if ( (radioVal != eQMINASRadioInterfaces_NoneNoService) && (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } else { // When not connected we have to pick the most preferred data capability eQMINASDataServiceCapabilities2 mostPreferredCap = (eQMINASDataServiceCapabilities2)0xff; std::list ::const_iterator pIter; std::list ::const_iterator pDataCapsItr; pIter = mPreferredServices.begin(); bool bDone = false; while ( (pIter != mPreferredServices.end()) && (bDone != true) ) { pDataCapsItr = mDataCapabilities.begin(); while (pDataCapsItr != mDataCapabilities.end()) { if (*pIter == *pDataCapsItr) { mostPreferredCap = (eQMINASDataServiceCapabilities2)*pIter; bDone = true; break; } pDataCapsItr++; } pIter++; } // Determine the best radio interface reported eQMINASRadioInterfaces preferredRadioIf; preferredRadioIf = eQMINASRadioInterfaces_NoneNoService; if (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_LTE; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA2000HRPD; } else if (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_CDMA20001x; } else if (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_UMTS; } else if (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) { preferredRadioIf = eQMINASRadioInterfaces_GSM; } radioStr = "Unknown"; ssStr = "Unknown"; radioVal = eQMINASRadioInterfaces_NoneNoService; // Determine sig strength and radio interface to display based on // most preferred data capabilities switch (preferredRadioIf) { case eQMINASRadioInterfaces_CDMA2000HRPD: radioStr = "CDMA 1xEVDO"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevB) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORevA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA1xEVDORev0) ) { radioVal = eQMINASRadioInterfaces_CDMA2000HRPD; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_CDMA20001x: radioStr = "CDMA 1xRTT"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_CDMA) { radioVal = eQMINASRadioInterfaces_CDMA20001x; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_UMTS: radioStr = "WCDMA"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_DCHSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPAPlus) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSDPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_HSUPA) || (mostPreferredCap == eQMINASDataServiceCapabilities2_WCDMA) ) { radioVal = eQMINASRadioInterfaces_UMTS; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_GSM: radioStr = "GSM"; if ( (mostPreferredCap == eQMINASDataServiceCapabilities2_GPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_EGPRS) || (mostPreferredCap == eQMINASDataServiceCapabilities2_GSM) ) { radioVal = eQMINASRadioInterfaces_GSM; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_LTE: radioStr = "LTE"; if (mostPreferredCap == eQMINASDataServiceCapabilities2_LTE) { radioVal = eQMINASRadioInterfaces_LTE; if ( (mServiceSignals.find( radioVal ) != mServiceSignals.end()) && (mServiceSignals[radioVal] != SCHAR_MAX) ) { std::ostringstream temp; temp << (INT)mServiceSignals[radioVal]; ssStr = temp.str(); } } break; case eQMINASRadioInterfaces_NoneNoService: if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA2000HRPD ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] != SCHAR_MAX) ) { radioStr = "CDMA 1xEVDO"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_CDMA20001x ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] != SCHAR_MAX) ) { radioStr = "CDMA 1xRTT"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_CDMA20001x]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_UMTS ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_UMTS] != SCHAR_MAX) ) { radioStr = "WCDMA"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_UMTS]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_GSM ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_GSM] != SCHAR_MAX) ) { radioStr = "GSM"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_GSM]; ssStr = temp.str(); } else if ( (mServiceSignals.find( eQMINASRadioInterfaces_LTE ) != mServiceSignals.end()) && (mServiceSignals[eQMINASRadioInterfaces_LTE] != SCHAR_MAX) ) { radioStr = "LTE"; std::ostringstream temp; temp << (INT)mServiceSignals[eQMINASRadioInterfaces_LTE]; ssStr = temp.str(); } break; default: radioStr = "Unknown"; ssStr = "Unknown"; } } SetRSSI( ssStr ); SetTech( radioStr ); } /*=========================================================================== METHOD: UpdateSessionState (Public Method) DESCRIPTION: Update the session state display Start/stop UpdateNetworkInfo thread PARAMETERS: bExternal [ I ] - Was the state change triggered externally state [ I ] - State of session RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateSessionState( bool bExternal, ULONG state ) { mSessionState = state; if (bExternal == true) { mInitialState = state; } LPCSTR pState = "Unknown"; switch (state) { // Disconnected case 1: { pState = "Disconnected"; // Stop the network info thread, if running if (mUpdateNetworkInfoThreadID != 0) { mUpdateNetworkInfoEvent.Set( 0 ); pthread_join( mUpdateNetworkInfoThreadID, NULL ); mUpdateNetworkInfoThreadID = 0; mLifeTotalDuration += mTotalDuration; } // Reset all totals mPreviousRX = 0; mPreviousTX = 0; mTotalRX = 0; mTotalTX = 0; mTotalDuration = 0; mStartTime = 0; UpdateRateDisplay(); UpdateTimeDisplay(); } break; // Connected case 2: { if (bExternal == true) { pState = "External Con"; } else { pState = "Connected"; } // Start the network info thread, if not running if (mUpdateNetworkInfoThreadID == 0) { // Begin updating network info int rc = pthread_create( &mUpdateNetworkInfoThreadID, 0, UpdateNetworkInfoThread, this ); if (rc != 0) { TRACE( "error starting network info thread\n" ); } } } break; // Suspended case 3: pState = "Suspended"; break; // Connecting case 4: if (bExternal == true) { pState = "Ext Connecting"; } else { pState = "Connecting"; } break; } SetState( pState ); } /*=========================================================================== METHOD: UpdateRateDisplay (Public Method) DESCRIPTION: Calculate and update the tx, rx rates being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateRateDisplay() { // Update TX/RX Bytes ULONGLONG deltaRX = 0; ULONGLONG deltaTX = 0; // Only update rates if connected if (mSessionState == eQMIConnectionStatus_Connected) { // First time through, don't use the deltas if (mTotalRX != 0) { deltaRX = mTotalRX - mPreviousRX; } if (mTotalTX != 0) { deltaTX = mTotalTX - mPreviousTX; } // Update life total byte variables mLifeTotalRX += deltaRX; mLifeTotalTX += deltaTX; mPreviousRX = mTotalRX; mPreviousTX = mTotalTX; } std::ostringstream tmp; tmp << deltaRX; SetRx( tmp.str() ); tmp.str( "" ); tmp << deltaTX; SetTx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalRX; SetLifeRx( tmp.str() ); tmp.str( "" ); tmp << mLifeTotalTX; SetLifeTx( tmp.str() ); } /*=========================================================================== METHOD: UpdateTimeDisplay (Public Method) DESCRIPTION: Calculate and update the connection time being displayed PARAMETERS: None RETURN VALUE: None ===========================================================================*/ void cSampleCM::UpdateTimeDisplay() { DWORD elapsedTime = 0; DWORD lifeTotalTime = 0; // Update session duration if ( (mSessionState == eQMIConnectionStatus_Connected) && (mStartTime != 0) ) { // Convert ms to seconds mTotalDuration = (GetTickCount() - mStartTime) / 1000; elapsedTime = (DWORD)mTotalDuration; lifeTotalTime = (DWORD)(mLifeTotalDuration + mTotalDuration); } else { elapsedTime = 0; lifeTotalTime = (DWORD)mLifeTotalDuration; } std::ostringstream timeStr; // Format both into hh:mm:ss // "%02d:%02d:%02d" timeStr << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (elapsedTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << elapsedTime % 60; SetDuration( timeStr.str() ); timeStr.str( "" ); timeStr << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 3600) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << (lifeTotalTime / 60) % 60 << std::setw( 1 ) << ":" << std::setfill( '0' ) << std::setw( 2 ) << lifeTotalTime % 60; SetLifeDuration( timeStr.str() ); } /*=========================================================================== METHOD: CheckConnectedStats (Public Method) DESCRIPTION: Check stats which are only valid during a connection ===========================================================================*/ void cSampleCM::CheckConnectedStats() { ULONG rc = mGobi.GetDataBearerTechnology( &mDataBearerTech ); if (rc != eGOBI_ERR_NONE || mDataBearerTech == ULONG_MAX) { TRACE( "GetDataBearerTechnology error %lu\n", rc ); return; } ULONGLONG duration; rc = mGobi.GetSessionDuration( &duration ); if (rc != eGOBI_ERR_NONE) { TRACE( "GetSessionDuration error %lu\n", rc ); return; } mStartTime = GetTickCount() - duration; UpdateSignalAndTech(); } /*=========================================================================== METHOD: UpdateDeviceInfo (Public Method) DESCRIPTION: Update the device info stats ===========================================================================*/ void cSampleCM::UpdateDeviceInfo() { ULONG status = 0; BYTE strSz1 = 255; BYTE strSz2 = 255; BYTE strSz3 = 255; CHAR str1[255]; CHAR str2[255]; CHAR str3[255]; str1[0] = 0; str2[0] = 0; str3[0] = 0; // Get manufacturer status = mGobi.GetManufacturer( strSz1, str1 ); if (status != 0) { TRACE( "GetManufacturer() = %lu\n", status ); return; } if (str1[0] != 0) { SetManufact( &str1[0] ); } // Get model ID str1[0] = 0; status = mGobi.GetModelID( strSz1, str1 ); if (status != 0) { TRACE( "GetModelID() = %lu\n", status ); return; } if (str1[0] != 0) { std::ostringstream tmp; if (strncmp( "88", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-1000"; } else if (strncmp( "12", &str1[0], 2 ) == 0) { tmp << "Gobi MDM-2000"; } else { tmp << "Unknown (" << &str1[0] << ")"; } SetModel( tmp.str() ); } // Get firmware revision str1[0] = 0; status = mGobi.GetFirmwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetFirmwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetFirmware( &str1[0] ); } // Get hardware revision str1[0] = 0; status = mGobi.GetHardwareRevision( strSz1, str1 ); if (status != 0) { TRACE( "GetHardwareRevision() = %lu\n", status ); return; } if (str1[0] != 0) { SetHardware( &str1[0] ); } // Get MDN/MIN str1[0] = 0; str2[0] = 0; status = mGobi.GetVoiceNumber( strSz1, str1, strSz2, str2 ); if (status != 0) { if (status == 1016) { // Not provisioned SetMDN( "Not provisioned" ); SetMIN( "Not provisioned" ); } else { TRACE( "GetVoiceNumber() = %lu\n", status ); return; } } if (str1[0] != 0) { SetMDN( &str1[0] ); } if (str2[0] != 0) { SetMIN( &str2[0] ); } // Get ESN/IMEI/MEID str1[0] = 0; str2[0] = 0; str3[0] = 0; status = mGobi.GetSerialNumbers( strSz1, str1, strSz2, str2, strSz3, str3 ); if (status != 0) { if (status == 1016) { // Not provisioned SetESN( "Not provisioned" ); SetIMEI( "Not provisioned" ); SetMEID( "Not provisioned" ); } else { TRACE( "GetSerialNumbers() = %lu\n", status ); return; } } if (str1[0] != 0) { SetESN( &str1[0] ); } if (str2[0] != 0) { SetIMEI( &str2[0] ); } if (str3[0] != 0) { SetMEID( &str3[0] ); } // Get IMSI str1[0] = 0; status = mGobi.GetIMSI( strSz1, str1 ); if (status != 0) { if (status == 1016) { // Not provisioned SetIMSI( "Not provisioned" ); } else { TRACE( "GetIMSI() = %lu\n", status ); return; } } if (str1[0] != 0) { SetIMSI( &str1[0] ); } } /*=========================================================================== METHOD: UpdateConnectionInfo (Public Method) DESCRIPTION: Update the connection info stats ===========================================================================*/ void cSampleCM::UpdateConnectionInfo() { // Re-usable buffer std::ostringstream tmp; // Get session state ULONG rc = mGobi.GetSessionState( &mSessionState ); if (rc != eGOBI_ERR_NONE || mSessionState == ULONG_MAX) { TRACE( "GetSessionState error %lu\n", rc ); return; } UpdateSessionState( mSessionID != 0xFFFFFFFF, mSessionState ); // If connected, refresh data bearer technology and session duration if (mSessionState == eQMIConnectionStatus_Connected) { CheckConnectedStats(); } INT8 signalStrengths[MAX_SIGNALS]; ULONG radioInterfaces[MAX_SIGNALS]; // Get the signal strengths rc = mGobi.GetSignalStrengths( &signalStrengths[0], &radioInterfaces[0] ); if (rc != eGOBI_ERR_NONE && rc != eGOBI_ERR_NO_SIGNAL) { TRACE( "GetSignalStrengths error %lu\n", rc ); return; } // Map signal strengths to RadioIf types for (ULONG s = 0; s < MAX_SIGNALS; s++) { INT8 signal = signalStrengths[s]; switch (radioInterfaces[s]) { case eQMINASRadioInterfaces_NoneNoService: mServiceSignals[eQMINASRadioInterfaces_NoneNoService] = signal; break; case eQMINASRadioInterfaces_CDMA20001x: mServiceSignals[eQMINASRadioInterfaces_CDMA20001x] = signal; break; case eQMINASRadioInterfaces_CDMA2000HRPD: mServiceSignals[eQMINASRadioInterfaces_CDMA2000HRPD] = signal; break; case eQMINASRadioInterfaces_AMPS: mServiceSignals[eQMINASRadioInterfaces_AMPS] = signal; break; case eQMINASRadioInterfaces_GSM: mServiceSignals[eQMINASRadioInterfaces_GSM] = signal; break; case eQMINASRadioInterfaces_UMTS: mServiceSignals[eQMINASRadioInterfaces_UMTS] = signal; break; case eQMINASRadioInterfaces_LTE: mServiceSignals[eQMINASRadioInterfaces_LTE] = signal; break; } } ULONG curTX = 0; ULONG curRX = 0; ULONG maxTX = 0; ULONG maxRX = 0; // Get the connection rate rc = mGobi.GetConnectionRate( &curTX, &curRX, &maxTX, &maxRX ); if (rc != 0) { TRACE( "GetConnectionRate error %lu\n", rc ); return; } // Store the max data rates tmp.str( "" ); tmp << maxRX; SetMaxRx( tmp.str() ); tmp.str( "" ); tmp << maxTX; SetMaxTx( tmp.str() ); ULONG dataCapabilities[MAX_DATA_CAPABILITIES]; WORD srvMCC = 0; WORD srvMNC = 0; BYTE srvNameSize = 255; CHAR srvName[255]; srvName[0] = 0; WORD sid = 0; WORD nid = 0; ULONG roam = 0; // Get the serving network info rc = mGobi.GetServingNetwork( &dataCapabilities[0], &srvMCC, &srvMNC, srvNameSize, &srvName[0], &sid, &nid, &roam ); if (rc != 0) { TRACE( "GetServingNetwork error %lu\n", rc ); return; } // Store data capabilities for (ULONG c = 0; c < MAX_DATA_CAPABILITIES; c++) { if ( (dataCapabilities[c] != ULONG_MAX) && (dataCapabilities[c] != 0) ) { mDataCapabilities.push_back( dataCapabilities[c] ); } } if (roam == 0xFFFFFFFF) { SetRoam( "Unknown" ); } else { tmp.str( "" ); tmp << roam; SetRoam( tmp.str() ); } // Update the signal strength and technology fields if (mSessionState != eQMIConnectionStatus_Connected) { mDataBearerTech = 0; } UpdateSignalAndTech(); // Setup callbacks rc = mGobi.SetWDSEventReportCB( WDSEventReportCallback, 1 ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetWDSSessionStateCB( WDSSessionStateCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetWDSSessionStateCB error %lu\n", rc ); return; } BYTE thresSz = 5; INT8 thres[5] = {-90, -85, -80, -75, -70}; rc = mGobi.SetNASEventReportCB( NASEventReportCallback, thresSz, &thres[0] ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASEventReportCB error %lu\n", rc ); return; } rc = mGobi.SetNASServingSystemCB( NASServingSystemCallback ); if (rc != eGOBI_ERR_NONE) { TRACE( "SetNASServingSystemCB error %lu\n", rc ); return; } } libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/SampleCM.h000077500000000000000000000270151455567757300243600ustar00rootroot00000000000000/*=========================================================================== FILE: SampleCM.h DESCRIPTION: Generic class to act as Sample CM interface PUBLIC CLASSES AND METHODS: cSampleCM Generic class to act as Sample CM interface Copyright (c) 2012, Code Aurora Forum. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Code Aurora Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ===========================================================================*/ //--------------------------------------------------------------------------- // Pragmas //--------------------------------------------------------------------------- #pragma once //--------------------------------------------------------------------------- // Include Files //--------------------------------------------------------------------------- #include "StdAfx.h" #include "GobiCMDLL.h" #include "Event.h" #include #include #include // Prototypes void * DeviceDetectionThread( void * pData ); void * UpdateNetworkInfo( void * pData ); // A global pointer to the CM, used by the callbacks extern class cSampleCM * gpCM; /*=========================================================================*/ // Class cSampleCM /*=========================================================================*/ class cSampleCM { public: // Constructor cSampleCM() : mDeviceID(), mSessionState( 0 ), mSessionID( 0xFFFFFFFF ), mInitialState( 0xFFFFFFFF ), mStartTime( 0 ), mPreviousRX( 0 ), mPreviousTX( 0 ), mTotalRX( 0 ), mTotalTX( 0 ), mLifeTotalRX( 0 ), mLifeTotalTX( 0 ), mCurrentDuration( 0 ), mTotalDuration( 0 ), mLifeTotalDuration( 0 ), mbInitiatedStartDataSession( false ), mbInitiatedStopDataSession( false ), mDataBearerTech( eQMIDataBearerTechnologies_Unknown ), mDeviceDetectionThreadID( 0 ), mUpdateNetworkInfoThreadID( 0 ) { mDeviceDetectionStopPipe[READING] = -1; mDeviceDetectionStopPipe[WRITING] = -1; // Create an ordered list of service preferences mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevB ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORevA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA1xEVDORev0 ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_CDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_DCHSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPAPlus ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_HSDPA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_WCDMA ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_EGPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GPRS ); mPreferredServices.push_back( eQMINASDataServiceCapabilities2_GSM ); } // Destructor ~cSampleCM(); // Initialize UI, begin waiting for devices virtual bool Init(); // Connect to a device and send initial callback registrations virtual ULONG Connect( LPCSTR pInterface ); // Disconnect from a device and set members as "Unknown" virtual ULONG Disconnect(); // Process a start data session request virtual ULONG OnStartDataSession( ULONG * pFailureCode ); // Process a cancel data session request virtual ULONG OnCancelDataSession(); // Process a stop data session request virtual ULONG OnStopDataSession(); // Set mState virtual void SetState( const std::string & state ) { mState = state; } // Set mRSSI virtual void SetRSSI( const std::string & rssi ) { mRSSI = rssi; } // Set mTech virtual void SetTech( const std::string & tech ) { mTech = tech; } // Set mRx virtual void SetRx( const std::string & rx ) { mRx = rx; } // Set mTx virtual void SetTx( const std::string & tx ) { mTx = tx; } // Set mMaxRx virtual void SetMaxRx( const std::string & maxRx ) { mMaxRx = maxRx; } // Set mMaxTx virtual void SetMaxTx( const std::string & maxTx ) { mMaxTx = maxTx; } // Set mRoam virtual void SetRoam( const std::string & roam ) { mRoam = roam; } // Set mDuration virtual void SetDuration( const std::string & duration ) { mDuration = duration; } // Set mLifeDuration virtual void SetLifeDuration( const std::string & lifeDuration ) { mLifeDuration = lifeDuration; } // Set mLifeRx virtual void SetLifeRx( const std::string & lifeRx ) { mLifeRx = lifeRx; } // Set mLifeTx virtual void SetLifeTx( const std::string & lifeTx ) { mLifeTx = lifeTx; } // Set mManufact virtual void SetManufact( const std::string & manufact ) { mManufact = manufact; } // Set mModel virtual void SetModel( const std::string & model ) { mModel = model; } // Set mHardware virtual void SetHardware( const std::string & hardware ) { mHardware = hardware; } // Set mFirmware virtual void SetFirmware( const std::string & firmware ) { mFirmware = firmware; } // Set mMDN virtual void SetMDN( const std::string & mdn ) { mMDN = mdn; } // Set mMIN virtual void SetMIN( const std::string & min ) { mMIN = min; } // Set mESN virtual void SetESN( const std::string & esn ) { mESN = esn; } // Set mMEID virtual void SetMEID( const std::string & meid ) { mMEID = meid; } // Set mIMEI virtual void SetIMEI( const std::string & imei ) { mIMEI = imei; } // Set mIMSI virtual void SetIMSI( const std::string & imsi ) { mIMSI = imsi; } // Handle signal strength callback notification void OnSignalStrengthCBNotificaion( INT8 signalStr, ULONG radioInterface ); // Handle session state callback notification void OnSessionStateCBNotification( ULONG state ); // Handle data bearer callback notification void OnDataBearerCBNotification( ULONG dataBearerTech ); // Handle data capabilities callback notification void OnDataCapsNotification( ULONG numDataCaps, eQMINASDataServiceCapabilities2 * pDataCaps ); // Handle byte totals callback notification void OnByteTotalsNotification( ULONGLONG rx, ULONGLONG tx ); // Update the signal strength and technology void UpdateSignalAndTech(); // Update the session state void UpdateSessionState( bool bExternal, ULONG state ); // Calculate and update the connection time being displayed void UpdateTimeDisplay(); // Calculate and update the tx and rx rates being displayed void UpdateRateDisplay(); // Check data bearer and duration, which are only available while // connected void CheckConnectedStats(); // Update the device info stats void UpdateDeviceInfo(); // Update the Connection Stats void UpdateConnectionInfo(); protected: /* Class for interfacing with Gobi API */ cGobiCMDLL mGobi; /* Connected device's ID */ std::string mDeviceID; /* All the display elements */ std::string mState; std::string mRSSI; std::string mTech; std::string mRx; std::string mTx; std::string mMaxRx; std::string mMaxTx; std::string mRoam; std::string mDuration; std::string mLifeDuration; std::string mLifeRx; std::string mLifeTx; std::string mManufact; std::string mModel; std::string mHardware; std::string mFirmware; std::string mMDN; std::string mMIN; std::string mESN; std::string mMEID; std::string mIMEI; std::string mIMSI; /* All the input elements */ std::string mAPN; std::string mUsername; std::string mPassword; /* Session state */ ULONG mSessionState; /* Data session ID */ ULONG mSessionID; /* Initial state, used to determine if the connection was initiated internally or externally */ ULONG mInitialState; /* Preferred service order */ std::list mPreferredServices; /* Stores the time that connection was started */ ULONGLONG mStartTime; /* Stores the connection rates updated by callbacks */ ULONGLONG mPreviousRX; ULONGLONG mPreviousTX; ULONGLONG mTotalRX; ULONGLONG mTotalTX; ULONGLONG mLifeTotalRX; ULONGLONG mLifeTotalTX; // Current and total durations ULONGLONG mCurrentDuration; ULONGLONG mTotalDuration; ULONGLONG mLifeTotalDuration; /* Did we initiate a start data session? */ bool mbInitiatedStartDataSession; /* Did we initiate a stop data session? */ bool mbInitiatedStopDataSession; /* Current signal map */ std::map mServiceSignals; /* Current data bearer technology */ ULONG mDataBearerTech; /* Current data capabilities */ std::list mDataCapabilities; /* Handle to the device detection thread */ pthread_t mDeviceDetectionThreadID; int mDeviceDetectionStopPipe[2]; // Device detection "thread" friend void * DeviceDetectionThread( void * pData ); /* Handle to the UpdateNetworkInfo thread */ pthread_t mUpdateNetworkInfoThreadID; cEvent mUpdateNetworkInfoEvent; // Async Network info updater friend void * UpdateNetworkInfoThread( void * pData ); }; libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/000077500000000000000000000000001455567757300241565ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/assets/000077500000000000000000000000001455567757300254605ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/assets/qml/000077500000000000000000000000001455567757300262515ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/assets/qml/GobiSampleCM/000077500000000000000000000000001455567757300305135ustar00rootroot00000000000000Connect.png000077500000000000000000000127151455567757300325440ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/assets/qml/GobiSampleCMPNG  IHDR@@iqsRGBbKGD pHYs  tIMEx?AMIDATxśy]U缡T2U1 I6![ ]B[A K ;NdRdHI@$@{=wz2K޺{{%"^|DTYVQ8';@л({cGqM!7a:M3:HZg/i~(77HDQ~f5,_;T_Y+ )$ ΁s`YSH}f3|ٴL z*^qnT؇FM# |PDЈ.<?pVU8oUC0Zf c's=@ "#( jn Oob䶳 ^~ q ^n cFQ}96s akԞ ݞ/?$ۯ<U#JŸ $ Cf\(k=B,5Eet Nlx? *յOJoHxFh@" ; hH`  `ѵ+"iMp)Sh{_4@!̕sX f._E£Q.h˫q9HʃI{ck~DPG}IW - NO NuXXAN^TS*qe܁h%(VڽR(-(b kqfMGw Ӯ|s]'*o*A}t 5` gr--pݥǬ& %Io_(\>xWmF|a:sHKz/eʅס @iڧy}t #aP*@c;!tˡ捠sAEm&zCj@,8GӬt^Mo sj/R oChgiZt Y5jen/Q6zd"!X 3~jbo2JTv"c2LsAt^i娦ftHÿqqGN FạbOr UDՎrߞJ1m`Uoϒ H~N N* . qCoԴ!R}Nekh㈩M2,> An׶-O5*ҁY TS;~0$cMK)hjA=)o}ly:3yQڋ NurpW O܈8bQ_ u;&ݑX IM}gaK}[˶ $TQ7]T~>a+(rEȋ!yoy3;_=Dv9}],B.ax V w zNkȯ 1 >Uf TXvL)Ҁ\Z"&@,vfwYx6;tQV#\?y0yzfgd'AX@vnP > 'uH '(T蒖Nh2f%L)d:fg-'%NS: rtںҩ͝V7e{En? S^ᜁcM! D8> $P(4$SJ{A#ǠR# Hkw_ƲԖOi4]MMS{ʆ<^VI!#/&Ƥ ۗCQM$R"+BOiu 1$}H8qr׉꼣OlvJde2p<{'ly"ܜb~ᆁA:Bk9GѪ;SʒZ] +) )>i bȠIBz7V36F252xP螁V*7iǪ2Ȅ.yϪPCIӺ)]Ӧc+NXˢoP.8qOa5e]]]tvu6q%r!ar*9Uq+NF"߹4&Bsep>n\e„.VtOVaLaBx&OBTbӫ) 6?ϜfST1X .7}A;yEuN%^bsF q58 lFq"/y  GϢ_jʾRqQ.Xqw2{m3S"5{LLu+4z21 $ǩ(C=K UQh½x̒_䷫ g}?N8x_* 0<2BkK3Xسoc}/mmm R#u㻘7oZj&RrȂChkkvd4/<ţ?3&!3B ? HT&xJHǞpUMƾvq!A~q QTV0eD `τ 4jAʬIYг`f~G9~`m/IJԧ 2mr.h2WpN!۷a,̛%88aiB0PAr~RN(ZXڇ{9#&\4nX®͸ I 8]_] q(\`z. X'9x_^V1TeZ,_*Q-Z@˚9S)7@ԥ'K?=+.lEN㬎7l6ںMzVh,?FWGC( 0A꣥2jb,9\gkeN* 0x)wTzz; &MkW5g;^ n⣨|>SIn|$MvdLD+Gb2xЍpFarh6u8kchá-w{/?Un4'0JuB Q;|VѡMt-9oވf(]ļUh]ӱC=ff"]*$BE48WP:C.Cvsld ~wvp+J2MiSY%B$Z8eu Y]Oqy_ޫ{r4@'Ad$/%\ΥF4]K-W &,8Sj{%1W n{cGqb=")2Q}w0>)NgszoW{m?|W73m\r"=;}\*,rIENDB`Info.png000077500000000000000000000122641455567757300320450ustar00rootroot00000000000000libqmi-1.35.2-dev/gobi-api/GobiAPI_2012-09-12-0719/GobiSampleCM/android/assets/qml/GobiSampleCMPNG  IHDR@@iqsRGBbKGD pHYs  tIME 4IDATxś{]Uuks;7A$*!'ЂUTQ;J/h:DB(o@x$Mr9gfXk9&!A{=s~ߜs9a/"R?w=kT\;@:'f{H_ytev\jppmɤ}H̤}G#h@-߻77 }b0ċ}ϊҽc#)$sXpR}L>Lt뢈=R@bke q7*m)϶~Z!hD;@k '9ґ1nf2߰${׬3 ~̺@(\`ŷӶx9vp7OjI.8xA`Yg#@5^1hā:m,8C. ݳv[mJ[E d_(}Lj̺~1jQ`(+@% *s8`m@mdgw\V_"^2|i/(ު|Ͽ--ȯL!%DΩ@]GCM[t G\+I[뇀Ln:o8ٲPMGer *n"5' gUD@C8{4s׬STc3B8[un!a`ٺmi 7x|I@=cL޸*]݈ЂV J1D) P!K\ zHeTYH? tFQ#Nvxtp#We䡟3tJ,UF)f]S6j7eT! tOC/ҒEwgh\sks?@>0'$zGINUer[? NuXXiʶ{~.~ft7}LwXڟ~ @+W \na,_ :OQ9zter TT%](]v.?z_%<2Kܦ5 *@SI -EƗP|%v[